Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions src/__integ__/__snapshots__/themes.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"border-radius-item-card-embedded": "2px",
"border-radius-popover": "2px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "16px",
"border-radius-tabs-focus-ring": "0px",
"border-radius-tiles": "2px",
"border-radius-token": "2px",
Expand Down Expand Up @@ -176,6 +177,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"color-background-slider-range-warning-default": "#906806",
"color-background-slider-track-default": "#879596",
"color-background-status-error": "#fdf3f1",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#f1faff",
"color-background-status-success": "#f2f8f0",
"color-background-status-warning": "#fffef0",
Expand Down Expand Up @@ -838,6 +844,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "0px",
"space-table-embedded-header-top": "8px",
"space-table-footer-horizontal": "20px",
Expand Down Expand Up @@ -904,6 +911,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"border-radius-item-card-embedded": "2px",
"border-radius-popover": "2px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "16px",
"border-radius-tabs-focus-ring": "0px",
"border-radius-tiles": "2px",
"border-radius-token": "2px",
Expand Down Expand Up @@ -1037,6 +1045,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"color-background-slider-range-warning-default": "#fbd332",
"color-background-slider-track-default": "#687078",
"color-background-status-error": "#270a11",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#12293b",
"color-background-status-success": "#172211",
"color-background-status-warning": "#191100",
Expand Down Expand Up @@ -1699,6 +1712,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "0px",
"space-table-embedded-header-top": "12px",
"space-table-footer-horizontal": "20px",
Expand Down Expand Up @@ -1765,6 +1779,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"border-radius-item-card-embedded": "2px",
"border-radius-popover": "2px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "16px",
"border-radius-tabs-focus-ring": "0px",
"border-radius-tiles": "2px",
"border-radius-token": "2px",
Expand Down Expand Up @@ -1898,6 +1913,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"color-background-slider-range-warning-default": "#906806",
"color-background-slider-track-default": "#879596",
"color-background-status-error": "#fdf3f1",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#f1faff",
"color-background-status-success": "#f2f8f0",
"color-background-status-warning": "#fffef0",
Expand Down Expand Up @@ -2560,6 +2580,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "0px",
"space-table-embedded-header-top": "12px",
"space-table-footer-horizontal": "20px",
Expand Down Expand Up @@ -2626,6 +2647,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"border-radius-item-card-embedded": "2px",
"border-radius-popover": "2px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "16px",
"border-radius-tabs-focus-ring": "0px",
"border-radius-tiles": "2px",
"border-radius-token": "2px",
Expand Down Expand Up @@ -2759,6 +2781,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"color-background-slider-range-warning-default": "#906806",
"color-background-slider-track-default": "#879596",
"color-background-status-error": "#fdf3f1",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#f1faff",
"color-background-status-success": "#f2f8f0",
"color-background-status-warning": "#fffef0",
Expand Down Expand Up @@ -3421,6 +3448,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "0px",
"space-table-embedded-header-top": "12px",
"space-table-footer-horizontal": "20px",
Expand Down Expand Up @@ -3487,6 +3515,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"border-radius-item-card-embedded": "8px",
"border-radius-popover": "8px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "4px",
"border-radius-tabs-focus-ring": "20px",
"border-radius-tiles": "8px",
"border-radius-token": "8px",
Expand Down Expand Up @@ -3620,6 +3649,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"color-background-slider-range-warning-default": "#855900",
"color-background-slider-track-default": "#8c8c94",
"color-background-status-error": "#fff5f5",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#f0fbff",
"color-background-status-success": "#effff1",
"color-background-status-warning": "#fffef0",
Expand Down Expand Up @@ -4282,6 +4316,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "4px",
"space-table-embedded-header-top": "0px",
"space-table-footer-horizontal": "0px",
Expand Down Expand Up @@ -4348,6 +4383,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"border-radius-item-card-embedded": "8px",
"border-radius-popover": "8px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "4px",
"border-radius-tabs-focus-ring": "20px",
"border-radius-tiles": "8px",
"border-radius-token": "8px",
Expand Down Expand Up @@ -4481,6 +4517,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"color-background-slider-range-warning-default": "#855900",
"color-background-slider-track-default": "#8c8c94",
"color-background-status-error": "#fff5f5",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#f0fbff",
"color-background-status-success": "#effff1",
"color-background-status-warning": "#fffef0",
Expand Down Expand Up @@ -5143,6 +5184,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "4px",
"space-table-embedded-header-top": "0px",
"space-table-footer-horizontal": "0px",
Expand Down Expand Up @@ -5209,6 +5251,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"border-radius-item-card-embedded": "8px",
"border-radius-popover": "8px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "4px",
"border-radius-tabs-focus-ring": "20px",
"border-radius-tiles": "8px",
"border-radius-token": "8px",
Expand Down Expand Up @@ -5342,6 +5385,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"color-background-slider-range-warning-default": "#fbd332",
"color-background-slider-track-default": "#656871",
"color-background-status-error": "#1f0000",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#001129",
"color-background-status-success": "#001401",
"color-background-status-warning": "#191100",
Expand Down Expand Up @@ -6004,6 +6052,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "4px",
"space-table-embedded-header-top": "0px",
"space-table-footer-horizontal": "0px",
Expand Down Expand Up @@ -6070,6 +6119,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"border-radius-item-card-embedded": "8px",
"border-radius-popover": "8px",
"border-radius-skeleton": "8px",
"border-radius-status-indicator": "4px",
"border-radius-tabs-focus-ring": "20px",
"border-radius-tiles": "8px",
"border-radius-token": "8px",
Expand Down Expand Up @@ -6203,6 +6253,11 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"color-background-slider-range-warning-default": "#fbd332",
"color-background-slider-track-default": "#656871",
"color-background-status-error": "#1f0000",
"color-background-status-indicator-error": "transparent",
"color-background-status-indicator-info": "transparent",
"color-background-status-indicator-neutral": "transparent",
"color-background-status-indicator-success": "transparent",
"color-background-status-indicator-warning": "transparent",
"color-background-status-info": "#001129",
"color-background-status-success": "#001401",
"color-background-status-warning": "#191100",
Expand Down Expand Up @@ -6865,6 +6920,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-static-xxs": "4px",
"space-static-xxxl": "40px",
"space-static-xxxs": "2px",
"space-status-indicator-padding-horizontal": "0px",
"space-table-content-bottom": "4px",
"space-table-embedded-header-top": "0px",
"space-table-footer-horizontal": "0px",
Expand Down
22 changes: 22 additions & 0 deletions src/status-indicator/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ $_color-overrides: (
'yellow': awsui.$color-text-status-warning,
);

$_status-backgrounds: (
'error': awsui.$color-background-status-indicator-error,
'warning': awsui.$color-background-status-indicator-warning,
'success': awsui.$color-background-status-indicator-success,
'info': awsui.$color-background-status-indicator-info,
'stopped': awsui.$color-background-status-indicator-neutral,
'pending': awsui.$color-background-status-indicator-neutral,
'in-progress': awsui.$color-background-status-indicator-neutral,
'loading': awsui.$color-background-status-indicator-neutral,
'not-started': awsui.$color-background-status-indicator-neutral,
);

.root {
@include styles.default-text-style;
@each $status in map.keys($_status-colors) {
Expand All @@ -41,9 +53,19 @@ $_color-overrides: (
color: #{map.get($_color-overrides, $color)};
}
}
@each $status in map.keys($_status-backgrounds) {
&.status-#{$status} > .container {
background: #{map.get($_status-backgrounds, $status)};
}
}
}

.container {
padding-inline: awsui.$space-status-indicator-padding-horizontal;
border-start-start-radius: awsui.$border-radius-status-indicator;
border-start-end-radius: awsui.$border-radius-status-indicator;
border-end-start-radius: awsui.$border-radius-status-indicator;
border-end-end-radius: awsui.$border-radius-status-indicator;
&.display-inline {
@include styles.text-wrapping;
display: inline;
Expand Down
9 changes: 8 additions & 1 deletion style-dictionary/utils/token-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ export type ColorsTokenName =
| 'colorTextHomeHeaderSecondary'
| 'colorTextIconCaret'
| 'colorTextIconSubtle'
| 'colorBackgroundStatusIndicatorError'
| 'colorBackgroundStatusIndicatorWarning'
| 'colorBackgroundStatusIndicatorSuccess'
| 'colorBackgroundStatusIndicatorInfo'
| 'colorBackgroundStatusIndicatorNeutral'
| 'colorTextInputDisabled'
| 'colorTextInputPlaceholder'
| 'colorTextInputPlaceholderDisabled'
Expand Down Expand Up @@ -900,6 +905,7 @@ export type BordersTokenName =
| 'borderPanelTopWidth'
| 'borderRadiusAlert'
| 'borderRadiusBadge'
| 'borderRadiusStatusIndicator'
| 'borderRadiusButton'
| 'borderRadiusCalendarDayFocusRing'
| 'borderRadiusCardDefault'
Expand Down Expand Up @@ -1121,7 +1127,8 @@ export type SpacingTokenName =
| 'spaceActionCardDescriptionPaddingTop'
| 'spaceActionCardContentPaddingTop'
| 'spaceOptionPaddingVertical'
| 'spaceOptionPaddingHorizontal';
| 'spaceOptionPaddingHorizontal'
| 'spaceStatusIndicatorPaddingHorizontal';
export type ShadowsTokenName =
| 'shadowCard'
| 'shadowItemCard'
Expand Down
53 changes: 27 additions & 26 deletions style-dictionary/visual-refresh/borders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,60 @@ export const tokens: StyleDictionary.BordersDictionary = {
borderLineChartDashArray: '3 5',
borderLineChartLineJoin: 'round',
borderLineChartWidth: '2px',
borderLinkFocusRingOutline: '0',
borderLinkFocusRingShadowSpread: '2px',
borderPanelHeaderWidth: '1px',
borderPanelTopWidth: '1px',
borderRadiusActionCardDefault: '{borderRadiusCardDefault}',
borderRadiusActionCardEmbedded: '{borderRadiusCardEmbedded}',
borderRadiusAlert: '{borderRadiusFlashbar}',
borderRadiusBadge: '4px',
borderRadiusButton: '20px',
borderRadiusCalendarDayFocusRing: '3px',
borderRadiusCodeEditor: '{borderRadiusInput}',
borderRadiusCardDefault: '{borderRadiusContainer}',
borderRadiusCardEmbedded: '{borderRadiusChatBubble}',
borderRadiusItemCardDefault: '{borderRadiusCardDefault}',
borderRadiusItemCardEmbedded: '{borderRadiusCardEmbedded}',
borderRadiusChatBubble: '8px',
borderRadiusCodeEditor: '{borderRadiusInput}',
borderRadiusContainer: '16px',
borderRadiusControlCircularFocusRing: '4px',
borderRadiusControlDefaultFocusRing: '4px',
borderRadiusDropdown: '{borderRadiusItem}',
borderRadiusDropzone: '12px',
borderRadiusFlashbar: '12px',
borderRadiusItem: '8px',
borderRadiusInput: '8px',
borderRadiusItem: '8px',
borderRadiusItemCardDefault: '{borderRadiusCardDefault}',
borderRadiusItemCardEmbedded: '{borderRadiusCardEmbedded}',
borderRadiusPopover: '{borderRadiusInput}',
borderRadiusSkeleton: '8px',
borderRadiusStatusIndicator: '{borderRadiusBadge}',
borderRadiusTabsFocusRing: '20px',
borderRadiusTiles: '{borderRadiusInput}',
borderRadiusToken: '{borderRadiusInput}',
borderRadiusChatBubble: '8px',
borderRadiusTutorialPanelItem: '{borderRadiusInput}',
borderTableStickyWidth: '1px',
borderLinkFocusRingOutline: '0',
borderLinkFocusRingShadowSpread: '2px',
borderWidthCard: '{borderDividerSectionWidth}',
borderWidthCardSelected: '{borderItemWidth}',
borderWidthItemCard: '{borderWidthCard}',
borderWidthItemCardHighlighted: '{borderWidthCardSelected}',
borderWidthItemSelected: '2px',
borderWidthActionCardActive: '{borderWidthCard}',
borderWidthActionCardDefault: '{borderWidthCard}',
borderWidthActionCardDisabled: '{borderWidthCard}',
borderWidthActionCardHover: '{borderWidthCard}',
borderWidthAlert: '2px',
borderWidthAlertBlockStart: '{borderWidthAlert}',
borderWidthAlertBlockEnd: '{borderWidthAlert}',
borderWidthAlertInlineStart: '{borderWidthAlert}',
borderWidthAlertBlockStart: '{borderWidthAlert}',
borderWidthAlertInlineEnd: '{borderWidthAlert}',
borderWidthAlertInlineStart: '{borderWidthAlert}',
borderWidthButton: '2px',
borderWidthCard: '{borderDividerSectionWidth}',
borderWidthCardSelected: '{borderItemWidth}',
borderWidthDropdown: '2px',
borderWidthField: '1px',
borderWidthPopover: '2px',
borderWidthToken: '2px',
borderWidthIconSmall: '2px',
borderWidthIconNormal: '2px',
borderWidthIconMedium: '2px',
borderWidthIconBig: '3px',
borderWidthIconLarge: '4px',
borderRadiusActionCardDefault: '{borderRadiusCardDefault}',
borderRadiusActionCardEmbedded: '{borderRadiusCardEmbedded}',
borderWidthActionCardDefault: '{borderWidthCard}',
borderWidthActionCardHover: '{borderWidthCard}',
borderWidthActionCardActive: '{borderWidthCard}',
borderWidthActionCardDisabled: '{borderWidthCard}',
borderRadiusSkeleton: '8px',
borderWidthIconMedium: '2px',
borderWidthIconNormal: '2px',
borderWidthIconSmall: '2px',
borderWidthItemCard: '{borderWidthCard}',
borderWidthItemCardHighlighted: '{borderWidthCardSelected}',
borderWidthItemSelected: '2px',
borderWidthPopover: '2px',
borderWidthToken: '2px',
};
5 changes: 5 additions & 0 deletions style-dictionary/visual-refresh/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ const tokens: StyleDictionary.ColorsDictionary = {
colorTextAvatar: '{colorWhite}',
colorBackgroundLoadingBarGenAi:
'linear-gradient(90deg, #b8e7ff 0%, #0099ff 10%, #5c7fff 24%, #8575ff 50%, #962eff 76%, #0099ff 90%, #b8e7ff 100%)',
colorBackgroundStatusIndicatorError: 'transparent',
colorBackgroundStatusIndicatorWarning: 'transparent',
colorBackgroundStatusIndicatorSuccess: 'transparent',
colorBackgroundStatusIndicatorInfo: 'transparent',
colorBackgroundStatusIndicatorNeutral: 'transparent',
colorBackgroundChatBubbleOutgoing: 'transparent',
colorBackgroundChatBubbleIncoming: { light: '{colorNeutral150}', dark: '{colorNeutral950}' },
colorTextChatBubbleOutgoing: '{colorTextBodyDefault}',
Expand Down
Loading
Loading