@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
package/src/theme/cards.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
2
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
3
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
4
|
+
import { spacingTokens } from '@/theme/spacingTokens'
|
|
5
|
+
|
|
6
|
+
import './tokens.css'
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* Card surface tokens - Figma `Cards/card/*` and `Cards/subcard/*`.
|
|
@@ -7,54 +12,49 @@ import palette, { common } from '@/theme/palette'
|
|
|
7
12
|
* anything needing a boxed row reads the same values instead of copying them.
|
|
8
13
|
* `MuiCard` keeps its own radius until `RcSesCard` is deprecated.
|
|
9
14
|
*/
|
|
10
|
-
const borderWidth = '
|
|
15
|
+
const borderWidth = borderTokens['stroke-1']
|
|
11
16
|
|
|
12
17
|
const card = {
|
|
13
|
-
borderRadius: '
|
|
14
|
-
gap:
|
|
15
|
-
footerGap: '
|
|
16
|
-
padding:
|
|
18
|
+
borderRadius: borderTokens['radius-card'],
|
|
19
|
+
gap: spacingTokens['spacing-aliases-cards-card-section-gap'],
|
|
20
|
+
footerGap: spacingTokens['spacing-aliases-cards-card-section-gap'],
|
|
21
|
+
padding: spacingTokens['spacing-aliases-cards-card-padding'],
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
const subcard = {
|
|
20
|
-
borderRadius: '
|
|
21
|
-
gap:
|
|
22
|
-
footerGap: '
|
|
23
|
-
padding:
|
|
25
|
+
borderRadius: borderTokens['radius-subcard'],
|
|
26
|
+
gap: spacingTokens['spacing-aliases-cards-subcard-section-gap'],
|
|
27
|
+
footerGap: spacingTokens['spacing-aliases-cards-subcard-section-gap'],
|
|
28
|
+
padding: spacingTokens['spacing-aliases-cards-subcard-padding'],
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
/**
|
|
27
|
-
* Card header values.
|
|
28
|
-
*
|
|
29
|
-
* 1.25rem line. The three gaps follow the surrounding components - the row gap
|
|
30
|
-
* matches the card gap and the actions gap matches the footer - rather than a
|
|
31
|
-
* measured token. All six are pending confirmation against the DS.
|
|
32
|
+
* Card header values.
|
|
33
|
+
* All spacing and typography line-height values use design tokens.
|
|
32
34
|
*/
|
|
33
35
|
const header = {
|
|
34
|
-
actionsGap: '
|
|
35
|
-
badgeGap: '
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
rowGap: '1rem',
|
|
39
|
-
titleFontWeight: 600,
|
|
36
|
+
actionsGap: spacingRoleBasedTokens['space-12'],
|
|
37
|
+
badgeGap: spacingRoleBasedTokens['space-8'],
|
|
38
|
+
gap: spacingTokens['spacing-aliases-cards-card-heading-gap'],
|
|
39
|
+
rowGap: spacingRoleBasedTokens['space-16'],
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const footer = {
|
|
43
|
-
gap: '
|
|
43
|
+
gap: spacingTokens['spacing-aliases-button-group-gap'],
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const themes = {
|
|
47
47
|
brand: {
|
|
48
|
-
backgroundColor:
|
|
49
|
-
borderColor:
|
|
48
|
+
backgroundColor: colorTokens['surface-brand-subtle'],
|
|
49
|
+
borderColor: colorTokens['border-brand-subtle'],
|
|
50
50
|
},
|
|
51
51
|
default: {
|
|
52
|
-
backgroundColor:
|
|
53
|
-
borderColor:
|
|
52
|
+
backgroundColor: colorTokens['surface-base'],
|
|
53
|
+
borderColor: colorTokens['border-subtle'],
|
|
54
54
|
},
|
|
55
55
|
sunken: {
|
|
56
|
-
backgroundColor:
|
|
57
|
-
borderColor:
|
|
56
|
+
backgroundColor: colorTokens['surface-sunken'],
|
|
57
|
+
borderColor: colorTokens['surface-sunken'],
|
|
58
58
|
},
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { describe, expect, test } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { colorPrimitives, colorTokens } from './colorTokens'
|
|
5
|
+
|
|
6
|
+
const css = readFileSync('src/theme/tokens.css', 'utf8')
|
|
7
|
+
const primitives = new Map(
|
|
8
|
+
Array.from(
|
|
9
|
+
css.matchAll(/(--rc-color-[\w-]+): (?!var\()([^;]+);/g),
|
|
10
|
+
([, key, value]) => [key, value],
|
|
11
|
+
),
|
|
12
|
+
)
|
|
13
|
+
const semantics = new Map(
|
|
14
|
+
Array.from(
|
|
15
|
+
css.matchAll(/(--rc-color-[\w-]+): var\((--rc-[\w-]+)\);/g),
|
|
16
|
+
([, key, value]) => [key, value],
|
|
17
|
+
),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
describe('Figma Light color foundations', () => {
|
|
21
|
+
test('all 60 primitives and 64 semantic aliases exist and aliases resolve without cycles', () => {
|
|
22
|
+
expect(primitives.size).toBe(60)
|
|
23
|
+
expect(semantics.size).toBe(64)
|
|
24
|
+
const references = Object.values(colorTokens).map((value) => value.slice(4, -1))
|
|
25
|
+
expect(references).toHaveLength(64)
|
|
26
|
+
references.forEach((reference) => {
|
|
27
|
+
expect(semantics.has(reference)).toBe(true)
|
|
28
|
+
})
|
|
29
|
+
semantics.forEach((target, key) => {
|
|
30
|
+
const visited = new Set([key])
|
|
31
|
+
let current = target
|
|
32
|
+
while (semantics.has(current)) {
|
|
33
|
+
expect(visited.has(current)).toBe(false)
|
|
34
|
+
visited.add(current)
|
|
35
|
+
current = semantics.get(current)!
|
|
36
|
+
}
|
|
37
|
+
expect(primitives.has(current)).toBe(true)
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
test('sunken and muted remain distinct and secondary text uses neutral 600', () => {
|
|
41
|
+
expect(semantics.get('--rc-color-surface-sunken')).toBe('--rc-color-neutrals-50')
|
|
42
|
+
expect(semantics.get('--rc-color-surface-muted')).toBe('--rc-color-neutrals-100')
|
|
43
|
+
expect(semantics.get('--rc-color-text-secondary')).toBe('--rc-color-neutrals-600')
|
|
44
|
+
expect(colorPrimitives.neutrals[50]).toBe('#f9fafb')
|
|
45
|
+
expect(colorPrimitives.neutrals[600]).toBe('#6b747f')
|
|
46
|
+
})
|
|
47
|
+
test('controls, borders and icons use the accessible Figma primitives', () => {
|
|
48
|
+
Object.entries({
|
|
49
|
+
'text-muted': 'neutrals-600',
|
|
50
|
+
'border-strong': 'neutrals-600',
|
|
51
|
+
'border-focus': 'cyans-600',
|
|
52
|
+
'border-focus-error': 'red-600',
|
|
53
|
+
'border-brand-subtle': 'cyans-200',
|
|
54
|
+
'control-border': 'neutrals-600',
|
|
55
|
+
'control-unselected': 'neutrals-600',
|
|
56
|
+
'control-unselected-hover': 'neutrals-700',
|
|
57
|
+
'control-selected': 'cyans-600',
|
|
58
|
+
'control-selected-hover': 'cyans-700',
|
|
59
|
+
'status-info-icon': 'cyans-800',
|
|
60
|
+
'status-success-icon': 'greens-800',
|
|
61
|
+
'status-warning-icon': 'yellows-800',
|
|
62
|
+
}).forEach(([role, primitive]) => {
|
|
63
|
+
expect(semantics.get(`--rc-color-${role}`), role).toBe(`--rc-color-${primitive}`)
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
})
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { common, error, grey, overlays, primary, secondary, warning } from './palette'
|
|
2
|
+
|
|
3
|
+
const { main: primaryMain, ...cyans } = primary
|
|
4
|
+
const { main: secondaryMain, ...greens } = secondary
|
|
5
|
+
const { main: greyMain, ...neutrals } = grey
|
|
6
|
+
const { main: warningMain, ...yellows } = warning
|
|
7
|
+
const { main: errorMain, ...red } = error
|
|
8
|
+
|
|
9
|
+
export const colorPrimitives = {
|
|
10
|
+
cyans,
|
|
11
|
+
greens,
|
|
12
|
+
neutrals,
|
|
13
|
+
yellows,
|
|
14
|
+
red,
|
|
15
|
+
white: common.white,
|
|
16
|
+
overlays: { black: overlays.black, white: overlays.white },
|
|
17
|
+
} as const
|
|
18
|
+
|
|
19
|
+
const colorTokens = {
|
|
20
|
+
'action-destructive-bg': 'var(--rc-color-action-destructive-bg)',
|
|
21
|
+
'action-destructive-bg-hover': 'var(--rc-color-action-destructive-bg-hover)',
|
|
22
|
+
'action-destructive-bg-pressed': 'var(--rc-color-action-destructive-bg-pressed)',
|
|
23
|
+
'action-destructive-text': 'var(--rc-color-action-destructive-text)',
|
|
24
|
+
'action-link-text': 'var(--rc-color-action-link-text)',
|
|
25
|
+
'action-link-text-hover': 'var(--rc-color-action-link-text-hover)',
|
|
26
|
+
'action-primary-bg': 'var(--rc-color-action-primary-bg)',
|
|
27
|
+
'action-primary-bg-disabled': 'var(--rc-color-action-primary-bg-disabled)',
|
|
28
|
+
'action-primary-bg-hover': 'var(--rc-color-action-primary-bg-hover)',
|
|
29
|
+
'action-primary-bg-pressed': 'var(--rc-color-action-primary-bg-pressed)',
|
|
30
|
+
'action-primary-text': 'var(--rc-color-action-primary-text)',
|
|
31
|
+
'action-primary-text-disabled': 'var(--rc-color-action-primary-text-disabled)',
|
|
32
|
+
'action-secondary-bg': 'var(--rc-color-action-secondary-bg)',
|
|
33
|
+
'action-secondary-bg-hover': 'var(--rc-color-action-secondary-bg-hover)',
|
|
34
|
+
'action-secondary-border': 'var(--rc-color-action-secondary-border)',
|
|
35
|
+
'action-secondary-border-hover': 'var(--rc-color-action-secondary-border-hover)',
|
|
36
|
+
'action-secondary-text': 'var(--rc-color-action-secondary-text)',
|
|
37
|
+
'border-brand-subtle': 'var(--rc-color-border-brand-subtle)',
|
|
38
|
+
'border-default': 'var(--rc-color-border-default)',
|
|
39
|
+
'border-focus': 'var(--rc-color-border-focus)',
|
|
40
|
+
'border-focus-error': 'var(--rc-color-border-focus-error)',
|
|
41
|
+
'border-inverse': 'var(--rc-color-border-inverse)',
|
|
42
|
+
'border-strong': 'var(--rc-color-border-strong)',
|
|
43
|
+
'border-subtle': 'var(--rc-color-border-subtle)',
|
|
44
|
+
'control-border': 'var(--rc-color-control-border)',
|
|
45
|
+
'control-disabled': 'var(--rc-color-control-disabled)',
|
|
46
|
+
'control-disabled-selected': 'var(--rc-color-control-disabled-selected)',
|
|
47
|
+
'control-foreground': 'var(--rc-color-control-foreground)',
|
|
48
|
+
'control-selected': 'var(--rc-color-control-selected)',
|
|
49
|
+
'control-selected-hover': 'var(--rc-color-control-selected-hover)',
|
|
50
|
+
'control-unselected': 'var(--rc-color-control-unselected)',
|
|
51
|
+
'control-unselected-hover': 'var(--rc-color-control-unselected-hover)',
|
|
52
|
+
'flow-destructive': 'var(--rc-color-flow-destructive)',
|
|
53
|
+
'flow-edge': 'var(--rc-color-flow-edge)',
|
|
54
|
+
'flow-progress': 'var(--rc-color-flow-progress)',
|
|
55
|
+
'status-error-bg': 'var(--rc-color-status-error-bg)',
|
|
56
|
+
'status-error-border': 'var(--rc-color-status-error-border)',
|
|
57
|
+
'status-error-icon': 'var(--rc-color-status-error-icon)',
|
|
58
|
+
'status-error-text': 'var(--rc-color-status-error-text)',
|
|
59
|
+
'status-info-bg': 'var(--rc-color-status-info-bg)',
|
|
60
|
+
'status-info-border': 'var(--rc-color-status-info-border)',
|
|
61
|
+
'status-info-icon': 'var(--rc-color-status-info-icon)',
|
|
62
|
+
'status-info-text': 'var(--rc-color-status-info-text)',
|
|
63
|
+
'status-success-bg': 'var(--rc-color-status-success-bg)',
|
|
64
|
+
'status-success-border': 'var(--rc-color-status-success-border)',
|
|
65
|
+
'status-success-icon': 'var(--rc-color-status-success-icon)',
|
|
66
|
+
'status-success-text': 'var(--rc-color-status-success-text)',
|
|
67
|
+
'status-warning-bg': 'var(--rc-color-status-warning-bg)',
|
|
68
|
+
'status-warning-border': 'var(--rc-color-status-warning-border)',
|
|
69
|
+
'status-warning-icon': 'var(--rc-color-status-warning-icon)',
|
|
70
|
+
'status-warning-text': 'var(--rc-color-status-warning-text)',
|
|
71
|
+
'surface-base': 'var(--rc-color-surface-base)',
|
|
72
|
+
'surface-brand-subtle': 'var(--rc-color-surface-brand-subtle)',
|
|
73
|
+
'surface-inverse': 'var(--rc-color-surface-inverse)',
|
|
74
|
+
'surface-muted': 'var(--rc-color-surface-muted)',
|
|
75
|
+
'surface-raised': 'var(--rc-color-surface-raised)',
|
|
76
|
+
'surface-sunken': 'var(--rc-color-surface-sunken)',
|
|
77
|
+
'text-default': 'var(--rc-color-text-default)',
|
|
78
|
+
'text-disabled': 'var(--rc-color-text-disabled)',
|
|
79
|
+
'text-inverse': 'var(--rc-color-text-inverse)',
|
|
80
|
+
'text-link': 'var(--rc-color-text-link)',
|
|
81
|
+
'text-link-hover': 'var(--rc-color-text-link-hover)',
|
|
82
|
+
'text-muted': 'var(--rc-color-text-muted)',
|
|
83
|
+
'text-secondary': 'var(--rc-color-text-secondary)',
|
|
84
|
+
} as const
|
|
85
|
+
|
|
86
|
+
export { colorTokens }
|
|
87
|
+
export default colorTokens
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { expect, test } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { effectTokens } from './effectTokens'
|
|
5
|
+
|
|
6
|
+
test('five effects match the supplied Figma Dev Mode CSS, including shadow layer order', () => {
|
|
7
|
+
const expected = {
|
|
8
|
+
'elevation-sm': '0 4px 6px 0 #00000014, 0 1px 3px 0 #0000000f',
|
|
9
|
+
'elevation-md': '0 4px 16px 0 #00000014',
|
|
10
|
+
'elevation-lg': '0 8px 16px 0 #0000001f',
|
|
11
|
+
'focus-ring-default': '0 0 0 2px var(--rc-color-border-focus)',
|
|
12
|
+
'focus-ring-error': '0 0 0 2px var(--rc-color-border-focus-error)',
|
|
13
|
+
}
|
|
14
|
+
const blocks = readFileSync('src/theme/tokens.css', 'utf8').split('@media')
|
|
15
|
+
const declarations = Object.fromEntries(
|
|
16
|
+
Array.from(
|
|
17
|
+
blocks[0].matchAll(/--rc-((?:elevation|focus-ring)-[\w-]+): ([^;]+);/g),
|
|
18
|
+
([, name, value]) => [name, value],
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
expect(declarations).toEqual(expected)
|
|
22
|
+
expect(Object.keys(effectTokens).sort()).toEqual(Object.keys(expected).sort())
|
|
23
|
+
Object.entries(effectTokens).forEach(([name, reference]) => {
|
|
24
|
+
expect(reference).toBe(`var(--rc-${name})`)
|
|
25
|
+
})
|
|
26
|
+
blocks
|
|
27
|
+
.slice(1)
|
|
28
|
+
.forEach((block) => expect(block).not.toMatch(/--rc-(?:elevation|focus-ring)-/))
|
|
29
|
+
})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// CSS variable references; values live in tokens.css.
|
|
2
|
+
const effectTokens = {
|
|
3
|
+
'elevation-sm': 'var(--rc-elevation-sm)',
|
|
4
|
+
'elevation-md': 'var(--rc-elevation-md)',
|
|
5
|
+
'elevation-lg': 'var(--rc-elevation-lg)',
|
|
6
|
+
'focus-ring-default': 'var(--rc-focus-ring-default)',
|
|
7
|
+
'focus-ring-error': 'var(--rc-focus-ring-error)',
|
|
8
|
+
} as const
|
|
9
|
+
|
|
10
|
+
export { effectTokens }
|
|
11
|
+
export default effectTokens
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { expect, test } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { layoutTokens } from './layoutTokens'
|
|
5
|
+
|
|
6
|
+
// Layout.zip: xs, sm, md, lg. All 8 exported values are dimensions, in px.
|
|
7
|
+
const expected = {
|
|
8
|
+
'column-width': [72, 72, 72, 72],
|
|
9
|
+
'container-narrow-width': [343, 720, 744, 744],
|
|
10
|
+
'container-medium-width': [343, 720, 936, 936],
|
|
11
|
+
'container-wide-width': [343, 720, 1128, 1128],
|
|
12
|
+
'grid-width-lg': [1128, 1128, 1128, 1128],
|
|
13
|
+
gutter: [16, 16, 24, 24],
|
|
14
|
+
'outer-container-max-width': [1200, 1200, 1200, 1200],
|
|
15
|
+
'outer-padding': [16, 24, 24, 36],
|
|
16
|
+
} as const
|
|
17
|
+
|
|
18
|
+
test('all 8 layout dimensions match Figma in rem across four CSS modes', () => {
|
|
19
|
+
const blocks = readFileSync('src/theme/tokens.css', 'utf8').split('@media')
|
|
20
|
+
expect(blocks).toHaveLength(4)
|
|
21
|
+
expect(blocks[1]).toContain('min-width: 600px')
|
|
22
|
+
expect(blocks[2]).toContain('min-width: 900px')
|
|
23
|
+
expect(blocks[3]).toContain('min-width: 1200px')
|
|
24
|
+
expect(Object.keys(layoutTokens).sort()).toEqual(Object.keys(expected).sort())
|
|
25
|
+
const declarations = new Map<string, string>()
|
|
26
|
+
blocks.forEach((block, mode) => {
|
|
27
|
+
const changes = new Map(
|
|
28
|
+
Array.from(block.matchAll(/--rc-layout-([\w-]+): ([^;]+);/g), ([, key, value]) => [
|
|
29
|
+
key,
|
|
30
|
+
value,
|
|
31
|
+
]),
|
|
32
|
+
)
|
|
33
|
+
changes.forEach((value, key) => declarations.set(key, value))
|
|
34
|
+
expect(declarations.size).toBe(8)
|
|
35
|
+
Object.entries(expected).forEach(([key, values]) => {
|
|
36
|
+
expect(declarations.get(key)).toBe(`${values[mode] / 16}rem`)
|
|
37
|
+
expect(layoutTokens[key as keyof typeof layoutTokens]).toBe(
|
|
38
|
+
`var(--rc-layout-${key})`,
|
|
39
|
+
)
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// CSS variable references. Values and responsive modes live in tokens.css.
|
|
2
|
+
const layoutTokens = {
|
|
3
|
+
'column-width': 'var(--rc-layout-column-width)',
|
|
4
|
+
'container-medium-width': 'var(--rc-layout-container-medium-width)',
|
|
5
|
+
'container-narrow-width': 'var(--rc-layout-container-narrow-width)',
|
|
6
|
+
'container-wide-width': 'var(--rc-layout-container-wide-width)',
|
|
7
|
+
'grid-width-lg': 'var(--rc-layout-grid-width-lg)',
|
|
8
|
+
gutter: 'var(--rc-layout-gutter)',
|
|
9
|
+
'outer-container-max-width': 'var(--rc-layout-outer-container-max-width)',
|
|
10
|
+
'outer-padding': 'var(--rc-layout-outer-padding)',
|
|
11
|
+
} as const
|
|
12
|
+
|
|
13
|
+
export { layoutTokens }
|
|
14
|
+
export default layoutTokens
|
|
@@ -1,49 +1,53 @@
|
|
|
1
|
-
import { Components } from '@mui/material'
|
|
1
|
+
import { Components, Theme } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { borderTokens } from '../borderTokens'
|
|
4
|
+
import { colorTokens } from '../colorTokens'
|
|
5
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
4
6
|
|
|
5
|
-
const MuiAccordion: Components['MuiAccordion'] = {
|
|
7
|
+
const MuiAccordion: Components<Theme>['MuiAccordion'] = {
|
|
6
8
|
defaultProps: {
|
|
7
9
|
elevation: 0,
|
|
8
10
|
disableGutters: true,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
md: '1px',
|
|
13
|
-
},
|
|
14
|
-
borderRadius: {
|
|
15
|
-
xs: 0,
|
|
16
|
-
md: '.375rem',
|
|
17
|
-
},
|
|
18
|
-
margin: {
|
|
19
|
-
xs: '.5rem 0',
|
|
20
|
-
md: '1rem 0',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
11
|
+
// MUI's rounded variant sets its own first/last-of-type radii, which outrank
|
|
12
|
+
// the radius below.
|
|
13
|
+
square: true,
|
|
23
14
|
},
|
|
24
15
|
styleOverrides: {
|
|
25
|
-
root: {
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
root: ({ theme }) => ({
|
|
17
|
+
borderWidth: borderTokens['stroke-1'],
|
|
18
|
+
borderRadius: borderTokens['radius-card'],
|
|
19
|
+
margin: `${spacingRoleBasedTokens['space-8']} 0`,
|
|
20
|
+
[theme.breakpoints.up('md')]: {
|
|
21
|
+
margin: `${spacingRoleBasedTokens['space-16']} 0`,
|
|
22
|
+
},
|
|
23
|
+
backgroundColor: colorTokens['surface-base'],
|
|
24
|
+
borderColor: colorTokens['border-default'],
|
|
28
25
|
borderStyle: 'solid',
|
|
29
|
-
// boderWidth: 1,
|
|
30
26
|
padding: 0,
|
|
27
|
+
'& > .MuiAccordion-heading': { margin: 0, font: 'inherit' },
|
|
31
28
|
|
|
32
29
|
':before': {
|
|
33
30
|
content: 'unset',
|
|
34
31
|
},
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
// Figma draws keyboard focus on the whole section, not just its header.
|
|
34
|
+
'&:has(.MuiAccordionSummary-root.Mui-focusVisible)': {
|
|
35
|
+
outline: `${borderTokens['border-focus']} solid ${colorTokens['border-focus']}`,
|
|
36
|
+
outlineOffset: 0,
|
|
37
|
+
},
|
|
40
38
|
|
|
39
|
+
'&.Mui-disabled': {
|
|
40
|
+
backgroundColor: colorTokens['surface-base'],
|
|
41
|
+
opacity: 1,
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
'&.Mui-expanded': {
|
|
41
45
|
'.MuiAccordionSummary-root': {
|
|
42
46
|
borderBottomLeftRadius: 0,
|
|
43
47
|
borderBottomRightRadius: 0,
|
|
44
48
|
},
|
|
45
49
|
},
|
|
46
|
-
},
|
|
50
|
+
}),
|
|
47
51
|
},
|
|
48
52
|
}
|
|
49
53
|
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
+
import { spacingTokens } from '../spacingTokens'
|
|
4
|
+
|
|
3
5
|
const MuiAccordionDetails: Components['MuiAccordionDetails'] = {
|
|
4
6
|
defaultProps: {
|
|
5
7
|
sx: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
8
|
+
paddingBottom: spacingTokens['spacing-aliases-card-padding-bottom'],
|
|
9
|
+
paddingInline: spacingTokens['spacing-aliases-card-padding-x'],
|
|
10
|
+
paddingTop: spacingTokens['spacing-aliases-card-padding-top'],
|
|
10
11
|
},
|
|
11
12
|
},
|
|
12
13
|
styleOverrides: {
|
|
13
|
-
root: {
|
|
14
|
+
root: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
gap: spacingTokens['spacing-aliases-form-field-gap'],
|
|
18
|
+
},
|
|
14
19
|
},
|
|
15
20
|
}
|
|
16
21
|
|
|
@@ -2,32 +2,46 @@ import { Components } from '@mui/material'
|
|
|
2
2
|
|
|
3
3
|
import { CaretDownIcon } from '@/assets/icons/phosphorIcons'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { borderTokens } from '../borderTokens'
|
|
6
|
+
import { colorTokens } from '../colorTokens'
|
|
7
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
8
|
+
import { spacingTokens } from '../spacingTokens'
|
|
9
|
+
import { typographyTokens } from '../typographyTokens'
|
|
10
|
+
|
|
11
|
+
// The header sits inside the section's 1px border, so its corners use the
|
|
12
|
+
// card radius minus that border.
|
|
13
|
+
const HEADER_RADIUS = `calc(${borderTokens['radius-card']} - ${borderTokens['stroke-1']})`
|
|
14
|
+
|
|
15
|
+
export const accordionSummaryRootStyles = {
|
|
16
|
+
fontFamily: typographyTokens['font-family'],
|
|
17
|
+
gap: spacingTokens['spacing-aliases-stack-default'],
|
|
18
|
+
paddingBlock: spacingRoleBasedTokens['space-20'],
|
|
19
|
+
paddingInline: spacingTokens['spacing-aliases-card-padding-x'],
|
|
20
|
+
backgroundColor: colorTokens['surface-sunken'],
|
|
21
|
+
borderRadius: HEADER_RADIUS,
|
|
22
|
+
minHeight: '44px',
|
|
23
|
+
'&:hover:not(.Mui-disabled)': { backgroundColor: colorTokens['surface-muted'] },
|
|
24
|
+
'&.Mui-focusVisible': { backgroundColor: colorTokens['surface-sunken'] },
|
|
25
|
+
'&.Mui-disabled': { color: colorTokens['text-disabled'], opacity: 1 },
|
|
26
|
+
}
|
|
6
27
|
|
|
7
28
|
const MuiAccordionSummary: Components['MuiAccordionSummary'] = {
|
|
8
29
|
defaultProps: {
|
|
9
30
|
expandIcon: <CaretDownIcon />,
|
|
10
31
|
sx: {
|
|
11
|
-
backgroundColor:
|
|
12
|
-
|
|
13
|
-
md: palette.grey['50'],
|
|
14
|
-
},
|
|
15
|
-
borderRadius: {
|
|
16
|
-
xs: 0,
|
|
17
|
-
md: '.375rem',
|
|
18
|
-
},
|
|
32
|
+
backgroundColor: colorTokens['surface-sunken'],
|
|
33
|
+
borderRadius: HEADER_RADIUS,
|
|
19
34
|
},
|
|
20
35
|
},
|
|
21
36
|
styleOverrides: {
|
|
22
|
-
root:
|
|
23
|
-
paddingLeft: '1.5rem',
|
|
24
|
-
},
|
|
37
|
+
root: accordionSummaryRootStyles,
|
|
25
38
|
content: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
color: 'inherit',
|
|
40
|
+
fontSize: typographyTokens['font-size-heading-card-title'],
|
|
41
|
+
fontWeight: typographyTokens['font-weight-heading-card-title'],
|
|
42
|
+
lineHeight: typographyTokens['line-height-heading-card-title'],
|
|
43
|
+
letterSpacing: typographyTokens['letter-spacing-heading-card-title'],
|
|
44
|
+
margin: 0,
|
|
31
45
|
},
|
|
32
46
|
},
|
|
33
47
|
}
|