Skip to content
Merged
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
39 changes: 39 additions & 0 deletions pages/theming/themed-stroke-width.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
SelectProps,
SpaceBetween,
StatusIndicator,
Tabs,
TabsProps,
} from '~components';
import Icon, { IconProps } from '~components/icon';
import icons from '~components/icon/generated/icons';
Expand Down Expand Up @@ -45,6 +47,34 @@ const createStrokeHandler = (setter: (value: string) => void) => {
};
};

function TabsExample() {
const tabs: TabsProps.Tab[] = [
{
id: 'first',
label: 'First tab',
content: 'First tab content area',
dismissible: true,
dismissLabel: 'Dismiss first tab',
},
{
id: 'second',
label: 'Second tab',
content: 'Second tab content area',
dismissible: true,
dismissLabel: 'Dismiss second tab',
},
{ id: 'third', label: 'Third tab', content: 'Third tab content area' },
{ id: 'fourth', label: 'Fourth tab', disabled: true, content: 'Fourth tab content area' },
];

return (
<SpaceBetween size="l">
<Tabs tabs={tabs} />
<Tabs tabs={tabs} variant="container" />
</SpaceBetween>
);
}

export default function ThemedStrokeWidthPage() {
const [themed, setThemed] = useState<boolean>(false);
const [strokeSmall, setStrokeSmall] = useState<string>('2');
Expand Down Expand Up @@ -74,6 +104,11 @@ export default function ThemedStrokeWidthPage() {
borderWidthIconBig: strokeBig ? `${strokeBig}px` : '1.5px',
borderWidthIconLarge: strokeLarge ? `${strokeLarge}px` : '2px',
borderRadiusButton: '8px',
fontSizeTabs: '14px',
lineHeightTabs: '16px',
fontWeightTabs: '700',
fontWeightTabsDisabled: '700',
spaceTabsVertical: { comfortable: '2px', compact: '0px' },
},
};

Expand Down Expand Up @@ -269,6 +304,10 @@ export default function ThemedStrokeWidthPage() {
<StatusIndicator type="warning">Warning</StatusIndicator>
<StatusIndicator type="info">Info</StatusIndicator>
</SpaceBetween>

<div>
<TabsExample />
</div>
<IconProvider
icons={{
'status-positive': (
Expand Down
64 changes: 40 additions & 24 deletions src/__integ__/__snapshots__/themes.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"font-size-heading-s": "16px",
"font-size-heading-xl": "28px",
"font-size-heading-xs": "16px",
"font-size-tabs": "14px",
"font-smoothing-moz-osx": "auto",
"font-smoothing-webkit": "auto",
"font-tabs-disabled-weight": "400",
"font-tabs-line-height": "22px",
"font-tabs-size": "14px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -612,6 +610,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"font-weight-heading-xl": "400",
"font-weight-heading-xs": "400",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "400",
"letter-spacing-body-s": "normal",
"letter-spacing-display-l": "normal",
"letter-spacing-heading-l": "normal",
Expand All @@ -627,6 +627,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"line-height-heading-s": "20px",
"line-height-heading-xl": "36px",
"line-height-heading-xs": "20px",
"line-height-tabs": "22px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "270ms",
Expand Down Expand Up @@ -784,6 +785,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "compact" 1`] =
"space-table-horizontal": "0px",
"space-tabs-content-top": "12px",
"space-tabs-focus-outline-gutter": "0px",
"space-tabs-vertical": "4px",
"space-tile-gutter": "16px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -1392,11 +1394,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"font-size-heading-s": "16px",
"font-size-heading-xl": "28px",
"font-size-heading-xs": "16px",
"font-size-tabs": "14px",
"font-smoothing-moz-osx": "auto",
"font-smoothing-webkit": "auto",
"font-tabs-disabled-weight": "400",
"font-tabs-line-height": "22px",
"font-tabs-size": "14px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -1407,6 +1407,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"font-weight-heading-xl": "400",
"font-weight-heading-xs": "400",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "400",
"letter-spacing-body-s": "normal",
"letter-spacing-display-l": "normal",
"letter-spacing-heading-l": "normal",
Expand All @@ -1422,6 +1424,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"line-height-heading-s": "20px",
"line-height-heading-xl": "36px",
"line-height-heading-xs": "20px",
"line-height-tabs": "22px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "270ms",
Expand Down Expand Up @@ -1579,6 +1582,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "dark" 1`] = `
"space-table-horizontal": "0px",
"space-tabs-content-top": "16px",
"space-tabs-focus-outline-gutter": "0px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -2187,11 +2191,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"font-size-heading-s": "16px",
"font-size-heading-xl": "28px",
"font-size-heading-xs": "16px",
"font-size-tabs": "14px",
"font-smoothing-moz-osx": "auto",
"font-smoothing-webkit": "auto",
"font-tabs-disabled-weight": "400",
"font-tabs-line-height": "22px",
"font-tabs-size": "14px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -2202,6 +2204,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"font-weight-heading-xl": "400",
"font-weight-heading-xs": "400",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "400",
"letter-spacing-body-s": "normal",
"letter-spacing-display-l": "normal",
"letter-spacing-heading-l": "normal",
Expand All @@ -2217,6 +2221,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"line-height-heading-s": "20px",
"line-height-heading-xl": "36px",
"line-height-heading-xs": "20px",
"line-height-tabs": "22px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "270ms",
Expand Down Expand Up @@ -2374,6 +2379,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "light" 1`] = `
"space-table-horizontal": "0px",
"space-tabs-content-top": "16px",
"space-tabs-focus-outline-gutter": "0px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -2982,11 +2988,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"font-size-heading-s": "16px",
"font-size-heading-xl": "28px",
"font-size-heading-xs": "16px",
"font-size-tabs": "14px",
"font-smoothing-moz-osx": "auto",
"font-smoothing-webkit": "auto",
"font-tabs-disabled-weight": "400",
"font-tabs-line-height": "22px",
"font-tabs-size": "14px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -2997,6 +3001,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"font-weight-heading-xl": "400",
"font-weight-heading-xs": "400",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "400",
"letter-spacing-body-s": "normal",
"letter-spacing-display-l": "normal",
"letter-spacing-heading-l": "normal",
Expand All @@ -3012,6 +3018,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"line-height-heading-s": "20px",
"line-height-heading-xl": "36px",
"line-height-heading-xs": "20px",
"line-height-tabs": "22px",
"motion-duration-avatar-gen-ai-gradient": "0ms",
"motion-duration-avatar-loading-dots": "0ms",
"motion-duration-complex": "0ms",
Expand Down Expand Up @@ -3169,6 +3176,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "reduced-motion"
"space-table-horizontal": "0px",
"space-tabs-content-top": "16px",
"space-tabs-focus-outline-gutter": "0px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -3777,11 +3785,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"font-size-heading-s": "16px",
"font-size-heading-xl": "24px",
"font-size-heading-xs": "14px",
"font-size-tabs": "16px",
"font-smoothing-moz-osx": "grayscale",
"font-smoothing-webkit": "antialiased",
"font-tabs-disabled-weight": "700",
"font-tabs-line-height": "20px",
"font-tabs-size": "16px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -3792,6 +3798,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"font-weight-heading-xl": "700",
"font-weight-heading-xs": "700",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "700",
"letter-spacing-body-s": "0.005em",
"letter-spacing-display-l": "-0.03em",
"letter-spacing-heading-l": "-0.015em",
Expand All @@ -3807,6 +3815,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"line-height-heading-s": "20px",
"line-height-heading-xl": "30px",
"line-height-heading-xs": "18px",
"line-height-tabs": "20px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "250ms",
Expand Down Expand Up @@ -3964,6 +3973,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh"
"space-table-horizontal": "20px",
"space-tabs-content-top": "12px",
"space-tabs-focus-outline-gutter": "-8px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -4572,11 +4582,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-size-heading-s": "16px",
"font-size-heading-xl": "24px",
"font-size-heading-xs": "14px",
"font-size-tabs": "16px",
"font-smoothing-moz-osx": "grayscale",
"font-smoothing-webkit": "antialiased",
"font-tabs-disabled-weight": "700",
"font-tabs-line-height": "20px",
"font-tabs-size": "16px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -4587,6 +4595,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-weight-heading-xl": "700",
"font-weight-heading-xs": "700",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "700",
"letter-spacing-body-s": "0.005em",
"letter-spacing-display-l": "-0.03em",
"letter-spacing-heading-l": "-0.015em",
Expand All @@ -4602,6 +4612,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"line-height-heading-s": "20px",
"line-height-heading-xl": "30px",
"line-height-heading-xs": "18px",
"line-height-tabs": "20px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "250ms",
Expand Down Expand Up @@ -4759,6 +4770,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-table-horizontal": "20px",
"space-tabs-content-top": "8px",
"space-tabs-focus-outline-gutter": "-8px",
"space-tabs-vertical": "4px",
"space-tile-gutter": "16px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -5367,11 +5379,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-size-heading-s": "16px",
"font-size-heading-xl": "24px",
"font-size-heading-xs": "14px",
"font-size-tabs": "16px",
"font-smoothing-moz-osx": "grayscale",
"font-smoothing-webkit": "antialiased",
"font-tabs-disabled-weight": "700",
"font-tabs-line-height": "20px",
"font-tabs-size": "16px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -5382,6 +5392,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-weight-heading-xl": "700",
"font-weight-heading-xs": "700",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "700",
"letter-spacing-body-s": "0.005em",
"letter-spacing-display-l": "-0.03em",
"letter-spacing-heading-l": "-0.015em",
Expand All @@ -5397,6 +5409,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"line-height-heading-s": "20px",
"line-height-heading-xl": "30px",
"line-height-heading-xs": "18px",
"line-height-tabs": "20px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "250ms",
Expand Down Expand Up @@ -5554,6 +5567,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-table-horizontal": "20px",
"space-tabs-content-top": "12px",
"space-tabs-focus-outline-gutter": "-8px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down Expand Up @@ -6162,11 +6176,9 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-size-heading-s": "16px",
"font-size-heading-xl": "24px",
"font-size-heading-xs": "14px",
"font-size-tabs": "16px",
"font-smoothing-moz-osx": "grayscale",
"font-smoothing-webkit": "antialiased",
"font-tabs-disabled-weight": "700",
"font-tabs-line-height": "20px",
"font-tabs-size": "16px",
"font-wayfinding-link-active-weight": "700",
"font-weight-alert-header": "700",
"font-weight-button": "700",
Expand All @@ -6177,6 +6189,8 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"font-weight-heading-xl": "700",
"font-weight-heading-xs": "700",
"font-weight-heavy": "700",
"font-weight-tabs": "700",
"font-weight-tabs-disabled": "700",
"letter-spacing-body-s": "0.005em",
"letter-spacing-display-l": "-0.03em",
"letter-spacing-heading-l": "-0.015em",
Expand All @@ -6192,6 +6206,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"line-height-heading-s": "20px",
"line-height-heading-xl": "30px",
"line-height-heading-xs": "18px",
"line-height-tabs": "20px",
"motion-duration-avatar-gen-ai-gradient": "3600ms",
"motion-duration-avatar-loading-dots": "1200ms",
"motion-duration-complex": "250ms",
Expand Down Expand Up @@ -6349,6 +6364,7 @@ exports[`CSS Custom Properties match previous snapshot for mode "visual-refresh-
"space-table-horizontal": "20px",
"space-tabs-content-top": "12px",
"space-tabs-focus-outline-gutter": "-8px",
"space-tabs-vertical": "8px",
"space-tile-gutter": "24px",
"space-tree-view-indentation": "24px",
"space-xl": "24px",
Expand Down
Loading
Loading