@registrucentras/rc-ses-react-components 2.7.3 → 3.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/phosphorIcons.d.ts +4 -0
- package/dist/components/common/Accordion/hooks/useAccordionController.d.ts +2 -1
- package/dist/components/common/Accordion/index.d.ts +18 -4
- package/dist/components/common/Accordion/types/AccordionControllerState.d.ts +1 -0
- package/dist/components/common/Card/index.d.ts +3 -0
- package/dist/components/common/CheckboxMark/index.d.ts +8 -0
- package/dist/components/common/DataPagination/components/ExpandButton.d.ts +7 -0
- package/dist/components/common/DataPagination/components/PaginationButton.d.ts +2 -1
- package/dist/components/common/DataPagination/index.d.ts +13 -3
- package/dist/components/common/DataPagination/paginationModel.d.ts +4 -0
- package/dist/components/common/Divider/index.d.ts +6 -0
- package/dist/components/common/EmptyState/index.d.ts +21 -0
- package/dist/components/common/IconWithSquareBackground/index.d.ts +2 -2
- package/dist/components/common/ImageCard/index.d.ts +5 -0
- package/dist/components/common/LinkTile/index.d.ts +11 -0
- package/dist/components/common/RadioMark/index.d.ts +8 -0
- package/dist/components/common/StepCard/StepCardFooter/index.d.ts +1 -1
- package/dist/components/common/TitleBlock/types.d.ts +4 -2
- package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -1
- package/dist/components/form/inputs/Datepicker/RangeDatepicker.d.ts +23 -0
- package/dist/components/form/inputs/Datepicker/SingleDatepicker.d.ts +24 -0
- package/dist/components/form/inputs/Datepicker/components/CalendarViewsHeader.d.ts +18 -0
- package/dist/components/form/inputs/Datepicker/index.d.ts +10 -14
- package/dist/components/form/inputs/Datepicker/rangeModel.d.ts +4 -0
- package/dist/components/form/inputs/FileDropzone.d.ts +2 -2
- package/dist/components/form/inputs/RadioButtonGroup.d.ts +1 -0
- package/dist/components/form/inputs/Select/Select.styles.d.ts +84 -0
- package/dist/components/form/inputs/Select/components/OptionCheckbox.d.ts +2 -1
- package/dist/components/form/inputs/TextField.d.ts +27 -12
- package/dist/components/form/inputs/TextField.styles.d.ts +101 -0
- package/dist/components/layout/ServiceWizardStepper/stepperTokens.d.ts +5 -0
- package/dist/components/loaders/Loader/index.d.ts +12 -9
- package/dist/components/overlays/BottomSheet/index.d.ts +3 -2
- package/dist/components/overlays/Dialog/index.d.ts +1 -1
- package/dist/components/storybook/FileUploadTokenPreview.d.ts +4 -0
- package/dist/components/storybook/TabsTokenPreview.d.ts +3 -0
- package/dist/components/storybook/TokenDocs.d.ts +74 -0
- package/dist/library/index.d.ts +30 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +2 -2
- package/dist/registrucentras-rc-ses-react-components.js +11143 -8378
- package/dist/theme/backdropTokens.d.ts +6 -0
- package/dist/theme/borderTokens.d.ts +33 -0
- package/dist/theme/cards.d.ts +42 -73
- package/dist/theme/colorTokens.d.ts +146 -0
- package/dist/theme/effectTokens.d.ts +9 -0
- package/dist/theme/layoutTokens.d.ts +12 -0
- package/dist/theme/light/MuiAccordion.d.ts +2 -2
- package/dist/theme/light/MuiAccordionSummary.d.ts +19 -0
- package/dist/theme/light/MuiButton.d.ts +7 -0
- package/dist/theme/light/MuiInputBase.d.ts +2 -0
- package/dist/theme/light/MuiPickerPopper.d.ts +3 -0
- package/dist/theme/light/MuiTypography.d.ts +0 -14
- package/dist/theme/palette.d.ts +8 -0
- package/dist/theme/sizeTokens.d.ts +20 -0
- package/dist/theme/spacingRoleBasedTokens.d.ts +38 -0
- package/dist/theme/spacingTokens.d.ts +97 -0
- package/dist/theme/tokenTheme.d.ts +13 -0
- package/dist/theme/typographyTokens.d.ts +104 -0
- package/package.json +2 -2
- package/src/assets/icons/phosphorIcons.ts +1 -0
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +39 -7
- package/src/components/common/Accordion/index.test.tsx +132 -0
- package/src/components/common/Accordion/index.tsx +302 -25
- package/src/components/common/Accordion/types/AccordionControllerState.ts +1 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +3 -3
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +8 -3
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +3 -2
- package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.test.tsx +3 -3
- package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.tsx +23 -19
- package/src/components/common/AdvancedList/index.test.tsx +4 -2
- package/src/components/common/Alert/index.tsx +10 -6
- package/src/components/common/Badge/index.tsx +50 -37
- package/src/components/common/Button/index.tsx +12 -10
- package/src/components/common/Card/index.tsx +6 -1
- package/src/components/common/CardShell/index.test.tsx +16 -6
- package/src/components/common/CheckboxMark/index.tsx +86 -0
- package/src/components/common/DataPagination/components/DataPaginationSkeleton.tsx +9 -7
- package/src/components/common/DataPagination/components/ExpandButton.tsx +48 -0
- package/src/components/common/DataPagination/components/PaginationButton.tsx +48 -21
- package/src/components/common/DataPagination/index.test.tsx +229 -12
- package/src/components/common/DataPagination/index.tsx +135 -60
- package/src/components/common/DataPagination/paginationModel.ts +35 -0
- package/src/components/common/Divider/index.test.tsx +33 -0
- package/src/components/common/Divider/index.tsx +52 -0
- package/src/components/common/EmptyState/index.test.tsx +56 -0
- package/src/components/common/EmptyState/index.tsx +211 -0
- package/src/components/common/FilterChip/index.tsx +24 -19
- package/src/components/common/IconWithCircularBackground.tsx +24 -6
- package/src/components/common/IconWithSquareBackground/index.test.tsx +14 -2
- package/src/components/common/IconWithSquareBackground/index.tsx +36 -17
- package/src/components/common/ImageCard/index.test.tsx +16 -0
- package/src/components/common/ImageCard/index.tsx +54 -1
- package/src/components/common/LinkTile/index.test.tsx +57 -0
- package/src/components/common/LinkTile/index.tsx +136 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +39 -23
- package/src/components/common/ListWithIcons/index.test.tsx +20 -9
- package/src/components/common/ListWithIcons/index.tsx +6 -6
- package/src/components/common/Popover/index.tsx +11 -1
- package/src/components/common/RadioMark/index.tsx +76 -0
- package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +49 -25
- package/src/components/common/SegmentedControl/index.tsx +10 -6
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +7 -5
- package/src/components/common/SelectableCardList/index.test.tsx +8 -6
- package/src/components/common/SelectionMarks.test.tsx +92 -0
- package/src/components/common/ServiceLinks/ServiceLinkItem/index.tsx +20 -11
- package/src/components/common/ServiceLinks/index.tsx +3 -3
- package/src/components/common/SideNav/SideNavLayout.tsx +6 -1
- package/src/components/common/SideNav/components/SideNavPill.tsx +24 -12
- package/src/components/common/SideNav/components/SideNavPillList.tsx +18 -12
- package/src/components/common/SideNav/components/SideNavRow.tsx +22 -15
- package/src/components/common/SideNav/index.tsx +10 -9
- package/src/components/common/Snackbar/config.ts +27 -8
- package/src/components/common/Snackbar/index.tsx +39 -16
- package/src/components/common/StepCard/StepCardFooter/index.tsx +28 -6
- package/src/components/common/StepCard/index.tsx +18 -6
- package/src/components/common/Switch/index.tsx +10 -4
- package/src/components/common/Tabs/TabPanel.tsx +6 -3
- package/src/components/common/Tabs/TabsWrapper.tsx +15 -7
- package/src/components/common/TitleBlock/index.test.tsx +14 -17
- package/src/components/common/TitleBlock/index.tsx +120 -15
- package/src/components/common/TitleBlock/types.ts +4 -2
- package/src/components/common/Tooltip/index.tsx +32 -3
- package/src/components/form/components/FormControlWrapper/index.tsx +43 -14
- package/src/components/form/inputs/CheckboxFormControl.tsx +25 -13
- package/src/components/form/inputs/Datepicker/RangeDatepicker.tsx +356 -0
- package/src/components/form/inputs/Datepicker/SingleDatepicker.tsx +207 -0
- package/src/components/form/inputs/Datepicker/components/CalendarViewsHeader.tsx +335 -0
- package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +22 -10
- package/src/components/form/inputs/Datepicker/index.test.tsx +23 -18
- package/src/components/form/inputs/Datepicker/index.tsx +20 -150
- package/src/components/form/inputs/Datepicker/rangeModel.test.ts +35 -0
- package/src/components/form/inputs/Datepicker/rangeModel.ts +25 -0
- package/src/components/form/inputs/FileDropzone.tsx +73 -46
- package/src/components/form/inputs/FileUpload.tsx +25 -16
- package/src/components/form/inputs/NumberStepper.tsx +36 -14
- package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +10 -5
- package/src/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.tsx +7 -1
- package/src/components/form/inputs/PhoneInputFormControl/components/PopperComponent.tsx +5 -2
- package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +9 -5
- package/src/components/form/inputs/PhoneInputFormControl/index.tsx +48 -24
- package/src/components/form/inputs/RadioButtonGroup.tsx +14 -6
- package/src/components/form/inputs/Select/Select.styles.ts +76 -0
- package/src/components/form/inputs/Select/components/OptionCheckbox.tsx +6 -33
- package/src/components/form/inputs/Select/index.tsx +124 -86
- package/src/components/form/inputs/SimpleCheckbox.tsx +10 -3
- package/src/components/form/inputs/TextField.presets.test.tsx +284 -0
- package/src/components/form/inputs/TextField.styles.ts +96 -0
- package/src/components/form/inputs/TextField.test.tsx +153 -0
- package/src/components/form/inputs/TextField.tsx +315 -42
- package/src/components/layout/Footer/index.test.tsx +1 -1
- package/src/components/layout/Footer/index.tsx +17 -7
- package/src/components/layout/ServiceFormActions.tsx +5 -1
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +3 -3
- package/src/components/layout/ServiceHeader.tsx +19 -19
- package/src/components/layout/ServiceWizardStepper/ServiceWizardStepper.css +10 -10
- package/src/components/layout/ServiceWizardStepper/StepConnector.tsx +8 -5
- package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.tsx +22 -7
- package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.tsx +15 -11
- package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +28 -11
- package/src/components/layout/ServiceWizardStepper/stepperTokens.ts +8 -0
- package/src/components/loaders/FullPageLoader/index.test.tsx +18 -7
- package/src/components/loaders/FullPageLoader/index.tsx +14 -9
- package/src/components/loaders/Loader/index.tsx +48 -17
- package/src/components/overlays/BottomSheet/index.test.tsx +36 -3
- package/src/components/overlays/BottomSheet/index.tsx +54 -21
- package/src/components/overlays/Dialog/index.tsx +5 -23
- package/src/components/overlays/Drawer/index.tsx +29 -14
- package/src/components/overlays/Modal/index.tsx +46 -8
- package/src/components/storybook/FileUploadTokenPreview.tsx +68 -0
- package/src/components/storybook/TabsTokenPreview.tsx +58 -0
- package/src/components/storybook/TokenDocs.tsx +347 -0
- package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +5 -1
- package/src/i18n/namespaces/input/en.json +48 -4
- package/src/i18n/namespaces/input/lt.json +48 -4
- package/src/library/index.ts +50 -0
- package/src/stories/atoms/Badge.stories.tsx +2 -1
- package/src/stories/atoms/Button.stories.tsx +124 -6
- package/src/stories/atoms/CheckboxMark.stories.tsx +79 -0
- package/src/stories/atoms/Divider.stories.tsx +129 -0
- package/src/stories/atoms/FilterChip.stories.tsx +9 -1
- package/src/stories/atoms/IconWithSquareBackground.stories.tsx +7 -7
- package/src/stories/atoms/Icons.stories.tsx +1 -1
- package/src/stories/atoms/NumberStepper.stories.tsx +44 -0
- package/src/stories/atoms/PhoneInput.stories.tsx +42 -0
- package/src/stories/atoms/RadioMark.stories.tsx +132 -0
- package/src/stories/atoms/Select.stories.tsx +139 -2
- package/src/stories/atoms/SimpleCheckbox.stories.tsx +74 -0
- package/src/stories/atoms/Switch.stories.tsx +46 -1
- package/src/stories/atoms/TextField.stories.tsx +508 -0
- package/src/stories/atoms/Tooltip.stories.tsx +5 -0
- package/src/stories/fixtures/foundations/Borders.stories.tsx +84 -0
- package/src/stories/fixtures/foundations/Effects.stories.tsx +204 -0
- package/src/stories/fixtures/foundations/Layout.stories.tsx +76 -0
- package/src/stories/fixtures/foundations/Sizes.stories.tsx +42 -0
- package/src/stories/fixtures/foundations/Spacing.stories.tsx +48 -0
- package/src/stories/fixtures/foundations/Typography.stories.tsx +49 -0
- package/src/stories/foundations/Borders.stories.tsx +179 -0
- package/src/stories/foundations/Colors.stories.tsx +253 -0
- package/src/stories/foundations/Effects.stories.tsx +116 -0
- package/src/stories/foundations/Layout.stories.tsx +177 -0
- package/src/stories/foundations/Sizes.stories.tsx +123 -0
- package/src/stories/foundations/Spacing.stories.tsx +159 -0
- package/src/stories/foundations/ThemeAdapter.stories.tsx +389 -0
- package/src/stories/foundations/Typography.stories.tsx +148 -0
- package/src/stories/molecules/Alert.stories.tsx +18 -0
- package/src/stories/molecules/Breadcrumbs.stories.tsx +51 -0
- package/src/stories/molecules/Card.stories.tsx +1 -1
- package/src/stories/molecules/CardShell.stories.tsx +1 -0
- package/src/stories/molecules/DatePicker.stories.tsx +133 -3
- package/src/stories/molecules/EmptyState.stories.tsx +106 -0
- package/src/stories/molecules/FormControlWrapper.stories.tsx +59 -0
- package/src/stories/molecules/LinkTile.stories.tsx +151 -0
- package/src/stories/molecules/ListWithIcons.stories.tsx +27 -2
- package/src/stories/molecules/RadioButtonGroup.stories.tsx +23 -0
- package/src/stories/molecules/SegmentedControl.stories.tsx +62 -1
- package/src/stories/molecules/Tabs.stories.tsx +4 -0
- package/src/stories/molecules/TitleBlock.stories.tsx +16 -16
- package/src/stories/organisms/Accordion.stories.tsx +132 -0
- package/src/stories/organisms/AdvancedListItemShell.stories.tsx +63 -23
- package/src/stories/organisms/BottomSheet.stories.tsx +48 -1
- package/src/stories/organisms/DataPagination.stories.tsx +127 -3
- package/src/stories/organisms/Dialog.stories.tsx +13 -0
- package/src/stories/organisms/FileDropzone.stories.tsx +6 -0
- package/src/stories/organisms/FileUpload.stories.tsx +4 -0
- package/src/stories/organisms/Footer.stories.tsx +20 -0
- package/src/stories/organisms/Modal.stories.tsx +53 -0
- package/src/stories/organisms/ServiceHeader.stories.tsx +25 -3
- package/src/stories/organisms/ServiceLinks.stories.tsx +1 -1
- package/src/stories/organisms/ServiceWizardStepper.stories.tsx +37 -1
- package/src/stories/organisms/SideNav.stories.tsx +8 -1
- package/src/theme/backdropTokens.test.ts +11 -0
- package/src/theme/backdropTokens.ts +11 -0
- package/src/theme/borderTokens.test.ts +59 -0
- package/src/theme/borderTokens.ts +36 -0
- package/src/theme/cards.ts +28 -28
- package/src/theme/colorTokens.test.ts +66 -0
- package/src/theme/colorTokens.ts +87 -0
- package/src/theme/effectTokens.test.ts +29 -0
- package/src/theme/effectTokens.ts +11 -0
- package/src/theme/layoutTokens.test.ts +42 -0
- package/src/theme/layoutTokens.ts +14 -0
- package/src/theme/light/MuiAccordion.tsx +30 -26
- package/src/theme/light/MuiAccordionDetails.ts +10 -5
- package/src/theme/light/MuiAccordionSummary.tsx +31 -17
- package/src/theme/light/MuiAlert.tsx +42 -65
- package/src/theme/light/MuiAutocomplete.ts +14 -7
- package/src/theme/light/MuiBreadcrumbs.tsx +17 -9
- package/src/theme/light/MuiButton.tsx +213 -204
- package/src/theme/light/MuiCard.tsx +5 -4
- package/src/theme/light/MuiCheckbox.ts +45 -14
- package/src/theme/light/MuiChip.tsx +3 -1
- package/src/theme/light/MuiDialog.ts +45 -6
- package/src/theme/light/MuiFormControl.ts +19 -9
- package/src/theme/light/MuiFormControlLabel.ts +16 -25
- package/src/theme/light/MuiFormGroup.ts +29 -26
- package/src/theme/light/MuiFormHelperText.ts +15 -4
- package/src/theme/light/MuiFormLabel.ts +20 -20
- package/src/theme/light/MuiInputBase.ts +49 -84
- package/src/theme/light/MuiOutlinedInput.ts +50 -6
- package/src/theme/light/MuiPagination.ts +21 -21
- package/src/theme/light/MuiPickerPopper.ts +17 -0
- package/src/theme/light/MuiPickersLayout.ts +63 -34
- package/src/theme/light/MuiPickersOutlinedInput.ts +38 -38
- package/src/theme/light/MuiPopover.ts +3 -1
- package/src/theme/light/MuiRadio.tsx +35 -52
- package/src/theme/light/MuiStepper.ts +21 -17
- package/src/theme/light/MuiSwitch.tsx +27 -23
- package/src/theme/light/MuiTab.tsx +27 -18
- package/src/theme/light/MuiTableCell.ts +4 -2
- package/src/theme/light/MuiTabs.tsx +11 -9
- package/src/theme/light/MuiTooltip.ts +2 -1
- package/src/theme/light/MuiTypography.tsx +0 -17
- package/src/theme/light/index.tsx +2 -0
- package/src/theme/light/themePalette.tsx +1 -0
- package/src/theme/palette.tsx +9 -0
- package/src/theme/sizeTokens.test.ts +37 -0
- package/src/theme/sizeTokens.ts +21 -0
- package/src/theme/spacingRoleBasedTokens.ts +41 -0
- package/src/theme/spacingTokens.test.ts +58 -0
- package/src/theme/spacingTokens.ts +114 -0
- package/src/theme/tokenTheme.test.tsx +402 -0
- package/src/theme/tokenTheme.ts +429 -0
- package/src/theme/tokens.css +476 -0
- package/src/theme/tokens.test.ts +174 -0
- package/src/theme/typographyTokens.test.ts +120 -0
- package/src/theme/typographyTokens.ts +119 -0
- package/dist/theme/spacing.d.ts +0 -4
- package/src/stories/foundations/Colors.mdx +0 -127
- package/src/theme/spacing.ts +0 -5
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Autocomplete,
|
|
3
|
+
Box,
|
|
4
|
+
Button,
|
|
5
|
+
Dialog,
|
|
6
|
+
DialogTitle,
|
|
7
|
+
Menu,
|
|
8
|
+
MenuItem,
|
|
9
|
+
Paper,
|
|
10
|
+
Popover,
|
|
11
|
+
Snackbar,
|
|
12
|
+
Stack,
|
|
13
|
+
TextField,
|
|
14
|
+
ThemeProvider,
|
|
15
|
+
Typography,
|
|
16
|
+
} from '@mui/material'
|
|
17
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
18
|
+
import { useState } from 'react'
|
|
19
|
+
|
|
20
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
21
|
+
import { effectTokens } from '@/theme/effectTokens'
|
|
22
|
+
import legacyTheme from '@/theme/light'
|
|
23
|
+
import { createRcSesTokenTheme } from '@/theme/tokenTheme'
|
|
24
|
+
|
|
25
|
+
const tokenTheme = createRcSesTokenTheme()
|
|
26
|
+
|
|
27
|
+
const meta = {
|
|
28
|
+
title: 'Fixtures/Foundations/Effects',
|
|
29
|
+
tags: ['!dev'],
|
|
30
|
+
parameters: { layout: 'padded' },
|
|
31
|
+
} satisfies Meta
|
|
32
|
+
export default meta
|
|
33
|
+
type Story = StoryObj<typeof meta>
|
|
34
|
+
|
|
35
|
+
export const Overview: Story = {
|
|
36
|
+
render: () => (
|
|
37
|
+
<ThemeProvider theme={tokenTheme}>
|
|
38
|
+
<Stack spacing={3} sx={{ p: 2 }}>
|
|
39
|
+
<Typography variant='h2'>Elevation and focus rings</Typography>
|
|
40
|
+
<Typography>
|
|
41
|
+
Elevation tokens are selected by component role. Numeric MUI shadows stay
|
|
42
|
+
unchanged.
|
|
43
|
+
</Typography>
|
|
44
|
+
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 3 }}>
|
|
45
|
+
{(['sm', 'md', 'lg'] as const).map((role) => (
|
|
46
|
+
<Paper
|
|
47
|
+
key={role}
|
|
48
|
+
elevation={0}
|
|
49
|
+
data-testid={`elevation-${role}`}
|
|
50
|
+
sx={{
|
|
51
|
+
p: 3,
|
|
52
|
+
borderRadius: '1rem',
|
|
53
|
+
bgcolor: colorTokens['surface-base'],
|
|
54
|
+
boxShadow: effectTokens[`elevation-${role}`],
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
Elevation/{role}
|
|
58
|
+
</Paper>
|
|
59
|
+
))}
|
|
60
|
+
</Box>
|
|
61
|
+
<Typography>
|
|
62
|
+
Focus references and Tab specimens. Component rebinding belongs to phase 2.
|
|
63
|
+
</Typography>
|
|
64
|
+
{(['default', 'error'] as const).map((role) => (
|
|
65
|
+
<Box key={role} sx={{ display: 'flex', flexWrap: 'wrap', gap: 3 }}>
|
|
66
|
+
<Box
|
|
67
|
+
data-testid={`focus-reference-${role}`}
|
|
68
|
+
sx={{
|
|
69
|
+
boxShadow: effectTokens[`focus-ring-${role}`],
|
|
70
|
+
p: 2,
|
|
71
|
+
borderRadius: '0.375rem',
|
|
72
|
+
border: '1px solid',
|
|
73
|
+
borderColor:
|
|
74
|
+
colorTokens[role === 'default' ? 'border-focus' : 'border-strong'],
|
|
75
|
+
bgcolor: colorTokens['surface-base'],
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
Focus-ring/{role}
|
|
79
|
+
</Box>
|
|
80
|
+
<Box
|
|
81
|
+
component='button'
|
|
82
|
+
type='button'
|
|
83
|
+
data-testid={`focus-${role}`}
|
|
84
|
+
sx={{
|
|
85
|
+
p: 2,
|
|
86
|
+
border: '1px solid',
|
|
87
|
+
borderColor:
|
|
88
|
+
colorTokens[role === 'default' ? 'border-focus' : 'border-strong'],
|
|
89
|
+
borderRadius: '0.375rem',
|
|
90
|
+
bgcolor: colorTokens['surface-base'],
|
|
91
|
+
color: 'text.primary',
|
|
92
|
+
boxShadow: effectTokens['elevation-md'],
|
|
93
|
+
'&:focus-visible': {
|
|
94
|
+
outline: 'none',
|
|
95
|
+
boxShadow: `${effectTokens['elevation-md']}, ${effectTokens[`focus-ring-${role}`]}`,
|
|
96
|
+
},
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
Tab: {role} ring with elevation
|
|
100
|
+
</Box>
|
|
101
|
+
</Box>
|
|
102
|
+
))}
|
|
103
|
+
<Autocomplete
|
|
104
|
+
data-testid='effects-autocomplete'
|
|
105
|
+
options={['Elevation/md popup']}
|
|
106
|
+
renderInput={(params) => (
|
|
107
|
+
<TextField {...params} label='Autocomplete popup uses md' />
|
|
108
|
+
)}
|
|
109
|
+
/>
|
|
110
|
+
</Stack>
|
|
111
|
+
</ThemeProvider>
|
|
112
|
+
),
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export const ComponentRoles: Story = {
|
|
116
|
+
tags: ['no-snapshot'],
|
|
117
|
+
render: function Render() {
|
|
118
|
+
const [overlay, setOverlay] = useState<
|
|
119
|
+
'popover' | 'menu' | 'dialog' | 'snackbar' | null
|
|
120
|
+
>(null)
|
|
121
|
+
const [anchor, setAnchor] = useState<HTMLButtonElement | null>(null)
|
|
122
|
+
return (
|
|
123
|
+
<ThemeProvider theme={tokenTheme}>
|
|
124
|
+
<Stack spacing={3} sx={{ p: 2 }}>
|
|
125
|
+
<Typography variant='h2'>Elevation by component role</Typography>
|
|
126
|
+
<Typography>
|
|
127
|
+
Popover, Menu and Select use md; Dialog and SnackbarContent use lg. Escape
|
|
128
|
+
closes each specimen.
|
|
129
|
+
</Typography>
|
|
130
|
+
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 2 }}>
|
|
131
|
+
{(['popover', 'menu', 'dialog', 'snackbar'] as const).map((role) => (
|
|
132
|
+
<Button
|
|
133
|
+
key={role}
|
|
134
|
+
onClick={(event) => {
|
|
135
|
+
setAnchor(event.currentTarget)
|
|
136
|
+
setOverlay(role)
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
Open {role}
|
|
140
|
+
</Button>
|
|
141
|
+
))}
|
|
142
|
+
</Box>
|
|
143
|
+
<TextField
|
|
144
|
+
select
|
|
145
|
+
label='Role select'
|
|
146
|
+
defaultValue='one'
|
|
147
|
+
slotProps={{
|
|
148
|
+
select: {
|
|
149
|
+
MenuProps: { slotProps: { paper: { className: 'effects-role-select' } } },
|
|
150
|
+
},
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
<MenuItem value='one'>Select dropdown: md</MenuItem>
|
|
154
|
+
<MenuItem value='two'>Second option</MenuItem>
|
|
155
|
+
</TextField>
|
|
156
|
+
<Popover
|
|
157
|
+
open={overlay === 'popover'}
|
|
158
|
+
anchorEl={anchor}
|
|
159
|
+
onClose={() => setOverlay(null)}
|
|
160
|
+
slotProps={{ paper: { className: 'effects-role-popover' } }}
|
|
161
|
+
>
|
|
162
|
+
<Typography>Popover: md</Typography>
|
|
163
|
+
</Popover>
|
|
164
|
+
<Menu
|
|
165
|
+
open={overlay === 'menu'}
|
|
166
|
+
anchorEl={anchor}
|
|
167
|
+
onClose={() => setOverlay(null)}
|
|
168
|
+
slotProps={{ paper: { className: 'effects-role-menu' } }}
|
|
169
|
+
>
|
|
170
|
+
<MenuItem>Menu: md</MenuItem>
|
|
171
|
+
</Menu>
|
|
172
|
+
<Dialog
|
|
173
|
+
open={overlay === 'dialog'}
|
|
174
|
+
onClose={() => setOverlay(null)}
|
|
175
|
+
slotProps={{ paper: { className: 'effects-role-dialog' } }}
|
|
176
|
+
>
|
|
177
|
+
<DialogTitle>Dialog: lg</DialogTitle>
|
|
178
|
+
</Dialog>
|
|
179
|
+
<Snackbar
|
|
180
|
+
open={overlay === 'snackbar'}
|
|
181
|
+
message='SnackbarContent: lg'
|
|
182
|
+
onClose={() => setOverlay(null)}
|
|
183
|
+
slotProps={{ content: { className: 'effects-role-snackbar' } }}
|
|
184
|
+
/>
|
|
185
|
+
<Typography>
|
|
186
|
+
Legacy shadows below are references for missing-token fallbacks.
|
|
187
|
+
</Typography>
|
|
188
|
+
<ThemeProvider theme={legacyTheme}>
|
|
189
|
+
{([8, 24, 6] as const).map((level) => (
|
|
190
|
+
<Paper
|
|
191
|
+
key={level}
|
|
192
|
+
elevation={level}
|
|
193
|
+
data-testid={`legacy-shadow-${level}`}
|
|
194
|
+
sx={{ p: 2 }}
|
|
195
|
+
>
|
|
196
|
+
Legacy elevation {level}
|
|
197
|
+
</Paper>
|
|
198
|
+
))}
|
|
199
|
+
</ThemeProvider>
|
|
200
|
+
</Stack>
|
|
201
|
+
</ThemeProvider>
|
|
202
|
+
)
|
|
203
|
+
},
|
|
204
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Box, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
import { layoutTokens } from '@/theme/layoutTokens'
|
|
5
|
+
import '@/theme/tokens.css'
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Fixtures/Foundations/Layout',
|
|
9
|
+
tags: ['no-snapshot', '!dev'],
|
|
10
|
+
parameters: { layout: 'fullscreen' },
|
|
11
|
+
} satisfies Meta
|
|
12
|
+
export default meta
|
|
13
|
+
type Story = StoryObj<typeof meta>
|
|
14
|
+
|
|
15
|
+
export const Fluid: Story = {
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
story:
|
|
20
|
+
'Admin panel container: full width minus the responsive outer padding, with no max-width. The specimen uses 12 equal stretch columns with token gutters. The nominal column-width token is not used as a minimum.',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
render: () => (
|
|
25
|
+
<Box
|
|
26
|
+
data-testid='layout-fluid'
|
|
27
|
+
sx={{
|
|
28
|
+
width: '100%',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
px: layoutTokens['outer-padding'],
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<Typography variant='h2'>Fluid container and grid</Typography>
|
|
34
|
+
<Box
|
|
35
|
+
data-testid='layout-grid'
|
|
36
|
+
sx={{
|
|
37
|
+
display: 'grid',
|
|
38
|
+
gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',
|
|
39
|
+
gap: layoutTokens.gutter,
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
{Array.from({ length: 12 }, (_, index) => (
|
|
43
|
+
<Box
|
|
44
|
+
key={index}
|
|
45
|
+
data-testid='layout-cell'
|
|
46
|
+
sx={{
|
|
47
|
+
minWidth: 0,
|
|
48
|
+
minHeight: '2rem',
|
|
49
|
+
border: '0.0625rem solid',
|
|
50
|
+
borderColor: 'divider',
|
|
51
|
+
display: 'grid',
|
|
52
|
+
placeItems: 'center',
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{index + 1}
|
|
56
|
+
</Box>
|
|
57
|
+
))}
|
|
58
|
+
</Box>
|
|
59
|
+
{(['narrow', 'medium', 'wide'] as const).map((variant) => (
|
|
60
|
+
<Box
|
|
61
|
+
key={variant}
|
|
62
|
+
data-testid={`layout-${variant}`}
|
|
63
|
+
sx={{
|
|
64
|
+
width: '100%',
|
|
65
|
+
maxWidth: layoutTokens[`container-${variant}-width`],
|
|
66
|
+
marginInline: 'auto',
|
|
67
|
+
border: '0.0625rem solid',
|
|
68
|
+
borderColor: 'divider',
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
{variant} container
|
|
72
|
+
</Box>
|
|
73
|
+
))}
|
|
74
|
+
</Box>
|
|
75
|
+
),
|
|
76
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Box, Stack, Typography } from '@mui/material'
|
|
2
|
+
import { CheckIcon } from '@phosphor-icons/react'
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
4
|
+
|
|
5
|
+
import { sizeTokens } from '@/theme/sizeTokens'
|
|
6
|
+
import '@/theme/tokens.css'
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Fixtures/Foundations/Sizes',
|
|
10
|
+
tags: ['no-snapshot', '!dev'],
|
|
11
|
+
parameters: { layout: 'padded' },
|
|
12
|
+
} satisfies Meta
|
|
13
|
+
export default meta
|
|
14
|
+
type Story = StoryObj<typeof meta>
|
|
15
|
+
|
|
16
|
+
export const Icons: Story = {
|
|
17
|
+
render: () => (
|
|
18
|
+
<Stack spacing={2}>
|
|
19
|
+
{(['primitives', 'aliases'] as const).map((group) => (
|
|
20
|
+
<Stack key={group} spacing={1}>
|
|
21
|
+
<Typography variant='h2'>Icon {group}</Typography>
|
|
22
|
+
{Object.entries(sizeTokens)
|
|
23
|
+
.filter(([name]) =>
|
|
24
|
+
group === 'primitives'
|
|
25
|
+
? /^icon-size-\d+$/.test(name)
|
|
26
|
+
: !/^icon-size-\d+$/.test(name),
|
|
27
|
+
)
|
|
28
|
+
.map(([name, value]) => (
|
|
29
|
+
<Box key={name} sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
|
30
|
+
<CheckIcon
|
|
31
|
+
data-testid={name}
|
|
32
|
+
aria-hidden
|
|
33
|
+
style={{ width: value, height: value, flexShrink: 0 }}
|
|
34
|
+
/>
|
|
35
|
+
<span>{name}</span>
|
|
36
|
+
</Box>
|
|
37
|
+
))}
|
|
38
|
+
</Stack>
|
|
39
|
+
))}
|
|
40
|
+
</Stack>
|
|
41
|
+
),
|
|
42
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Box, Stack, ThemeProvider, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
5
|
+
import { createRcSesTokenTheme } from '@/theme/tokenTheme'
|
|
6
|
+
|
|
7
|
+
const tokenTheme = createRcSesTokenTheme()
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Fixtures/Foundations/Spacing',
|
|
11
|
+
tags: ['no-snapshot', '!dev'],
|
|
12
|
+
parameters: { layout: 'padded' },
|
|
13
|
+
} satisfies Meta
|
|
14
|
+
export default meta
|
|
15
|
+
type Story = StoryObj<typeof meta>
|
|
16
|
+
|
|
17
|
+
export const Tokens: Story = {
|
|
18
|
+
render: () => (
|
|
19
|
+
<ThemeProvider theme={tokenTheme}>
|
|
20
|
+
<Stack spacing={2}>
|
|
21
|
+
<Typography variant='h2'>Spacing roles</Typography>
|
|
22
|
+
{Object.entries(spacingRoleBasedTokens)
|
|
23
|
+
.filter(([name]) => !name.startsWith('space-'))
|
|
24
|
+
.map(([name, value]) => (
|
|
25
|
+
<Box
|
|
26
|
+
key={name}
|
|
27
|
+
data-testid={name}
|
|
28
|
+
sx={
|
|
29
|
+
name.startsWith('gap-')
|
|
30
|
+
? { display: 'flex', gap: value }
|
|
31
|
+
: { py: value, px: name.startsWith('padding-') ? value : 0 }
|
|
32
|
+
}
|
|
33
|
+
>
|
|
34
|
+
<span>{name}</span>
|
|
35
|
+
<span>A</span>
|
|
36
|
+
<span>B</span>
|
|
37
|
+
</Box>
|
|
38
|
+
))}
|
|
39
|
+
<Box data-testid='theme-spacing' sx={{ p: 3 }}>
|
|
40
|
+
theme.spacing(3)
|
|
41
|
+
</Box>
|
|
42
|
+
<Box data-testid='fraction-spacing' sx={{ p: 1.75 }}>
|
|
43
|
+
theme.spacing(1.75)
|
|
44
|
+
</Box>
|
|
45
|
+
</Stack>
|
|
46
|
+
</ThemeProvider>
|
|
47
|
+
),
|
|
48
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Box, Stack, ThemeProvider, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
import { createRcSesTokenTheme } from '@/theme/tokenTheme'
|
|
5
|
+
import { typographyRoleVariants } from '@/theme/typographyTokens'
|
|
6
|
+
|
|
7
|
+
const tokenTheme = createRcSesTokenTheme()
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Fixtures/Foundations/Typography',
|
|
11
|
+
tags: ['no-snapshot', '!dev'],
|
|
12
|
+
parameters: { layout: 'padded' },
|
|
13
|
+
} satisfies Meta
|
|
14
|
+
export default meta
|
|
15
|
+
type Story = StoryObj<typeof meta>
|
|
16
|
+
|
|
17
|
+
export const Dimensions: Story = {
|
|
18
|
+
render: () => (
|
|
19
|
+
<ThemeProvider theme={tokenTheme}>
|
|
20
|
+
<Stack spacing={2}>
|
|
21
|
+
<Typography variant='h2'>Typography from theme</Typography>
|
|
22
|
+
<Typography>
|
|
23
|
+
All 14 roles use theme typography variants. Existing font attributes are
|
|
24
|
+
retained; new named styles inherit family and weight until the Figma text styles
|
|
25
|
+
export is available.
|
|
26
|
+
</Typography>
|
|
27
|
+
{Object.entries(typographyRoleVariants).map(([role, variant]) => (
|
|
28
|
+
<Typography key={role} variant={variant} data-testid={role}>
|
|
29
|
+
{role}: Aa Bb 0123456789
|
|
30
|
+
</Typography>
|
|
31
|
+
))}
|
|
32
|
+
</Stack>
|
|
33
|
+
</ThemeProvider>
|
|
34
|
+
),
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Inheritance: Story = {
|
|
38
|
+
render: () => (
|
|
39
|
+
<ThemeProvider theme={tokenTheme}>
|
|
40
|
+
<Box sx={{ fontFamily: 'monospace', fontWeight: 700 }}>
|
|
41
|
+
{(['headingCardTitle', 'bodyLarge', 'buttonCompact'] as const).map((variant) => (
|
|
42
|
+
<Typography key={variant} variant={variant} data-testid={variant}>
|
|
43
|
+
{variant}: inherited family and weight
|
|
44
|
+
</Typography>
|
|
45
|
+
))}
|
|
46
|
+
</Box>
|
|
47
|
+
</ThemeProvider>
|
|
48
|
+
),
|
|
49
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Box, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Chain,
|
|
6
|
+
Code,
|
|
7
|
+
DocPage,
|
|
8
|
+
Row,
|
|
9
|
+
Section,
|
|
10
|
+
Stage,
|
|
11
|
+
Table,
|
|
12
|
+
cssName,
|
|
13
|
+
hairline,
|
|
14
|
+
literalOf,
|
|
15
|
+
numericSuffix,
|
|
16
|
+
toPx,
|
|
17
|
+
} from '@/components/storybook/TokenDocs'
|
|
18
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
19
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
20
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
21
|
+
|
|
22
|
+
const meta = {
|
|
23
|
+
title: 'Foundations/Borders',
|
|
24
|
+
tags: ['no-snapshot'],
|
|
25
|
+
parameters: { layout: 'padded' },
|
|
26
|
+
} satisfies Meta
|
|
27
|
+
export default meta
|
|
28
|
+
type Story = StoryObj<typeof meta>
|
|
29
|
+
|
|
30
|
+
type BorderToken = keyof typeof borderTokens
|
|
31
|
+
|
|
32
|
+
const rank = (name: string) =>
|
|
33
|
+
Number.isNaN(numericSuffix(name)) ? Infinity : numericSuffix(name)
|
|
34
|
+
|
|
35
|
+
const all = Object.keys(borderTokens) as BorderToken[]
|
|
36
|
+
const radiusScale = all
|
|
37
|
+
.filter((name) => /^radius-(\d+|full)$/.test(name))
|
|
38
|
+
.sort((a, b) => rank(a) - rank(b))
|
|
39
|
+
const css = (name: BorderToken) => cssName(borderTokens[name])
|
|
40
|
+
|
|
41
|
+
const radiusRoles = all.filter(
|
|
42
|
+
(name) =>
|
|
43
|
+
(name.startsWith('radius-') && !radiusScale.includes(name)) ||
|
|
44
|
+
name.endsWith('-border-radius'),
|
|
45
|
+
)
|
|
46
|
+
const strokes = all
|
|
47
|
+
.filter((name) => name.startsWith('stroke-'))
|
|
48
|
+
.sort((a, b) => numericSuffix(a) - numericSuffix(b))
|
|
49
|
+
const borderRoles = all.filter((name) => name.startsWith('border-'))
|
|
50
|
+
|
|
51
|
+
const shapeFor: Partial<
|
|
52
|
+
Record<BorderToken, { width: number; height: number; label?: string }>
|
|
53
|
+
> = {
|
|
54
|
+
'radius-button': { width: 96, height: 36, label: 'Button' },
|
|
55
|
+
'button-border-radius': { width: 96, height: 36, label: 'Button' },
|
|
56
|
+
'radius-chip': { width: 64, height: 24, label: 'Chip' },
|
|
57
|
+
'radius-input': { width: 104, height: 40 },
|
|
58
|
+
'radius-list-item': { width: 104, height: 32 },
|
|
59
|
+
'radius-pill': { width: 88, height: 28, label: 'Pill' },
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function Shape({ token }: { token: BorderToken }) {
|
|
63
|
+
const shape = shapeFor[token] ?? { width: 96, height: 56 }
|
|
64
|
+
return (
|
|
65
|
+
<Box
|
|
66
|
+
sx={{
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
backgroundColor: colorTokens['surface-base'],
|
|
69
|
+
border: `${borderTokens['border-default']} solid ${colorTokens['border-strong']}`,
|
|
70
|
+
borderRadius: borderTokens[token],
|
|
71
|
+
color: colorTokens['text-secondary'],
|
|
72
|
+
display: 'flex',
|
|
73
|
+
fontSize: '0.75rem',
|
|
74
|
+
height: shape.height,
|
|
75
|
+
justifyContent: 'center',
|
|
76
|
+
width: shape.width,
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
{shape.label}
|
|
80
|
+
</Box>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function Borders() {
|
|
85
|
+
return (
|
|
86
|
+
<DocPage
|
|
87
|
+
title='Borders'
|
|
88
|
+
lead='Corner radius and stroke width. Components bind to the role tokens; the scale is what the roles draw from.'
|
|
89
|
+
>
|
|
90
|
+
<Section title='Radius scale'>
|
|
91
|
+
<Box
|
|
92
|
+
sx={{
|
|
93
|
+
display: 'grid',
|
|
94
|
+
gap: 2,
|
|
95
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(112px, 1fr))',
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{radiusScale.map((name) => (
|
|
99
|
+
<Box
|
|
100
|
+
key={name}
|
|
101
|
+
sx={{
|
|
102
|
+
alignItems: 'center',
|
|
103
|
+
border: hairline,
|
|
104
|
+
borderRadius: borderTokens['radius-12'],
|
|
105
|
+
display: 'flex',
|
|
106
|
+
flexDirection: 'column',
|
|
107
|
+
gap: 1.5,
|
|
108
|
+
p: 2,
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
<Box
|
|
112
|
+
sx={{
|
|
113
|
+
backgroundColor: colorTokens['surface-brand-subtle'],
|
|
114
|
+
borderColor: colorTokens['border-focus'],
|
|
115
|
+
borderRadius: `0 ${borderTokens[name]} 0 0`,
|
|
116
|
+
borderRight: `2px solid`,
|
|
117
|
+
borderTop: `2px solid`,
|
|
118
|
+
height: 56,
|
|
119
|
+
width: 56,
|
|
120
|
+
}}
|
|
121
|
+
/>
|
|
122
|
+
<Box sx={{ textAlign: 'center' }}>
|
|
123
|
+
<Typography
|
|
124
|
+
sx={{
|
|
125
|
+
fontSize: '1.25rem',
|
|
126
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
{name === 'radius-full' ? 'full' : numericSuffix(name)}
|
|
130
|
+
</Typography>
|
|
131
|
+
<Code muted>{toPx(literalOf(css(name)))}</Code>
|
|
132
|
+
</Box>
|
|
133
|
+
</Box>
|
|
134
|
+
))}
|
|
135
|
+
</Box>
|
|
136
|
+
</Section>
|
|
137
|
+
|
|
138
|
+
<Section title='Radius roles' lead='What each component shape uses.'>
|
|
139
|
+
<Table columns='136px minmax(0, 1fr) 72px' head={['', 'Token', 'Value']}>
|
|
140
|
+
{radiusRoles.map((name) => (
|
|
141
|
+
<Row key={name}>
|
|
142
|
+
<Stage height={64} width={136}>
|
|
143
|
+
<Shape token={name} />
|
|
144
|
+
</Stage>
|
|
145
|
+
<Box sx={{ minWidth: 0 }}>
|
|
146
|
+
<Code>{name}</Code>
|
|
147
|
+
<Chain name={css(name)} />
|
|
148
|
+
</Box>
|
|
149
|
+
<Code muted>{toPx(literalOf(css(name)))}</Code>
|
|
150
|
+
</Row>
|
|
151
|
+
))}
|
|
152
|
+
</Table>
|
|
153
|
+
</Section>
|
|
154
|
+
|
|
155
|
+
<Section title='Stroke' lead='Line widths, and the border roles that use them.'>
|
|
156
|
+
<Table columns='136px minmax(0, 1fr) 72px' head={['', 'Token', 'Value']}>
|
|
157
|
+
{[...strokes, ...borderRoles].map((name) => (
|
|
158
|
+
<Row key={name}>
|
|
159
|
+
<Box
|
|
160
|
+
sx={{
|
|
161
|
+
backgroundColor: colorTokens['border-strong'],
|
|
162
|
+
height: borderTokens[name],
|
|
163
|
+
width: 112,
|
|
164
|
+
}}
|
|
165
|
+
/>
|
|
166
|
+
<Box sx={{ minWidth: 0 }}>
|
|
167
|
+
<Code>{name}</Code>
|
|
168
|
+
<Chain name={css(name)} />
|
|
169
|
+
</Box>
|
|
170
|
+
<Code muted>{literalOf(css(name))}</Code>
|
|
171
|
+
</Row>
|
|
172
|
+
))}
|
|
173
|
+
</Table>
|
|
174
|
+
</Section>
|
|
175
|
+
</DocPage>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export const Overview: Story = { render: () => <Borders /> }
|