@registrucentras/rc-ses-react-components 2.7.2 → 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 +24 -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 +11144 -8374
- 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 +11 -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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
4
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
4
5
|
|
|
5
6
|
const MuiCard: Components['MuiCard'] = {
|
|
6
7
|
defaultProps: {
|
|
@@ -9,16 +10,16 @@ const MuiCard: Components['MuiCard'] = {
|
|
|
9
10
|
},
|
|
10
11
|
styleOverrides: {
|
|
11
12
|
root: {
|
|
12
|
-
borderRadius: '
|
|
13
|
+
borderRadius: borderTokens['radius-card'],
|
|
13
14
|
// Paint the default outlined border on the root instead of a
|
|
14
15
|
// `variants[{ variant: 'outlined' }]` entry. `styleOverrides` deep-
|
|
15
16
|
// merges when a consumer calls `createTheme(RcSesTheme, {...})`, but
|
|
16
17
|
// arrays like `variants` are replaced wholesale - so a consumer theme
|
|
17
18
|
// that declares its own MuiCard variants would otherwise strip our
|
|
18
19
|
// outlined-border rule and leave every card borderless.
|
|
19
|
-
borderWidth: 1,
|
|
20
|
+
borderWidth: borderTokens['stroke-1'],
|
|
20
21
|
borderStyle: 'solid',
|
|
21
|
-
borderColor:
|
|
22
|
+
borderColor: colorTokens['border-default'],
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
variants: [
|
|
@@ -1,25 +1,56 @@
|
|
|
1
|
-
import { Components
|
|
1
|
+
import type { Components } from '@mui/material'
|
|
2
|
+
import { createElement } from 'react'
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
+
import RcSesCheckboxMark from '@/components/common/CheckboxMark'
|
|
5
|
+
|
|
6
|
+
import { borderTokens } from '../borderTokens'
|
|
7
|
+
import { colorTokens } from '../colorTokens'
|
|
8
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
9
|
+
|
|
10
|
+
// Figma's hover halo has no variable; it is a 20% tint of cyans-400.
|
|
11
|
+
const hoverHalo =
|
|
12
|
+
'0 0 0 4px color-mix(in srgb, var(--rc-color-cyans-400) 20%, transparent)'
|
|
4
13
|
|
|
5
14
|
const MuiCheckbox: Components['MuiCheckbox'] = {
|
|
6
|
-
defaultProps: {
|
|
15
|
+
defaultProps: {
|
|
16
|
+
disableRipple: true,
|
|
17
|
+
icon: createElement(RcSesCheckboxMark),
|
|
18
|
+
checkedIcon: createElement(RcSesCheckboxMark, { type: 'checked' }),
|
|
19
|
+
indeterminateIcon: createElement(RcSesCheckboxMark, { type: 'indeterminate' }),
|
|
20
|
+
},
|
|
7
21
|
styleOverrides: {
|
|
8
|
-
root: {
|
|
9
|
-
|
|
10
|
-
|
|
22
|
+
root: ({ ownerState }) => ({
|
|
23
|
+
color: colorTokens['control-border'],
|
|
24
|
+
'--rc-mark-border': 'currentColor',
|
|
25
|
+
'--rc-mark-selected': 'currentColor',
|
|
26
|
+
...(ownerState.color === 'primary' && {
|
|
27
|
+
'&.Mui-checked, &.MuiCheckbox-indeterminate': {
|
|
28
|
+
color: colorTokens['control-selected'],
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
'&.Mui-disabled': {
|
|
32
|
+
'--rc-mark-border': colorTokens['control-disabled-selected'],
|
|
33
|
+
'--rc-mark-selected': colorTokens['control-disabled-selected'],
|
|
34
|
+
'--rc-mark-surface': colorTokens['control-disabled'],
|
|
35
|
+
'--rc-mark-selected-stroke': borderTokens['border-focus'],
|
|
36
|
+
},
|
|
37
|
+
'&.Mui-focusVisible [data-rc-mark-shape]': {
|
|
38
|
+
outline: `${borderTokens['border-focus']} solid ${colorTokens['border-focus']}`,
|
|
39
|
+
outlineOffset: spacingRoleBasedTokens['space-2'],
|
|
40
|
+
boxShadow: 'none',
|
|
11
41
|
},
|
|
12
42
|
|
|
13
|
-
'&:hover': {
|
|
14
|
-
|
|
15
|
-
|
|
43
|
+
'&:hover:not(.Mui-disabled, .Mui-focusVisible) [data-rc-mark-shape]': {
|
|
44
|
+
boxShadow: hoverHalo,
|
|
45
|
+
},
|
|
16
46
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
47
|
+
// Only the unchecked outline changes color on hover, so custom checked colors stay.
|
|
48
|
+
// One :not() list keeps specificity below the error color in MuiFormControl.
|
|
49
|
+
'&:hover:not(.Mui-disabled, .Mui-checked, .MuiCheckbox-indeterminate, .Mui-focusVisible)':
|
|
50
|
+
{
|
|
51
|
+
color: colorTokens['control-selected'],
|
|
20
52
|
},
|
|
21
|
-
|
|
22
|
-
},
|
|
53
|
+
}),
|
|
23
54
|
},
|
|
24
55
|
}
|
|
25
56
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
4
|
+
|
|
3
5
|
const MuiChip: Components['MuiChip'] = {
|
|
4
6
|
defaultProps: {},
|
|
5
7
|
styleOverrides: {
|
|
6
8
|
root: {
|
|
7
9
|
fontSize: '0.875rem',
|
|
8
|
-
fontWeight:
|
|
10
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
9
11
|
},
|
|
10
12
|
},
|
|
11
13
|
}
|
|
@@ -1,22 +1,61 @@
|
|
|
1
1
|
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
+
import { backdropTokens } from '../backdropTokens'
|
|
4
|
+
import { borderTokens } from '../borderTokens'
|
|
5
|
+
import { colorTokens } from '../colorTokens'
|
|
6
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
7
|
+
import { spacingTokens } from '../spacingTokens'
|
|
8
|
+
import { typographyTokens } from '../typographyTokens'
|
|
9
|
+
|
|
10
|
+
// Figma defines these effects locally, without matching foundation effect roles.
|
|
11
|
+
const modalShadow =
|
|
12
|
+
'0 8px 24px color-mix(in srgb, var(--rc-color-neutrals-950) 12%, transparent)'
|
|
13
|
+
|
|
3
14
|
const MuiDialog: Components['MuiDialog'] = {
|
|
4
15
|
defaultProps: {},
|
|
5
16
|
styleOverrides: {
|
|
6
17
|
root: {
|
|
7
18
|
'.MuiDialogTitle-root': {
|
|
8
19
|
fontSize: '1.5rem',
|
|
9
|
-
fontWeight:
|
|
20
|
+
fontWeight: typographyTokens['font-weight-heading-h2'],
|
|
10
21
|
lineHeight: '2rem',
|
|
11
22
|
padding: '2rem 2.25rem 1rem',
|
|
12
23
|
},
|
|
24
|
+
'.MuiDialogContent-root': { padding: '.5rem 2.25rem 2.25rem' },
|
|
25
|
+
'.MuiDialogActions-root': { padding: '.5rem 2.25rem 2rem' },
|
|
26
|
+
// Drawer and BottomSheet also use MuiDialog; migrate only this wrapper.
|
|
27
|
+
'&:where(.RcSesDialog-root)': {
|
|
28
|
+
'.MuiBackdrop-root': { backgroundColor: backdropTokens['backdrop-dark'] },
|
|
29
|
+
'.MuiDialogTitle-root': {
|
|
30
|
+
color: colorTokens['text-default'],
|
|
31
|
+
fontSize: typographyTokens['font-size-heading-h2'],
|
|
32
|
+
fontWeight: typographyTokens['font-weight-heading-h2'],
|
|
33
|
+
lineHeight: typographyTokens['line-height-heading-h2'],
|
|
34
|
+
letterSpacing: typographyTokens['letter-spacing-heading-h2'],
|
|
35
|
+
padding: `0 0 ${spacingRoleBasedTokens['space-12']}`,
|
|
36
|
+
},
|
|
13
37
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
38
|
+
'.MuiDialogContent-root': {
|
|
39
|
+
color: colorTokens['text-default'],
|
|
40
|
+
fontSize: typographyTokens['font-size-body-regular'],
|
|
41
|
+
lineHeight: typographyTokens['line-height-body-regular'],
|
|
42
|
+
padding: 0,
|
|
43
|
+
},
|
|
17
44
|
|
|
18
|
-
|
|
19
|
-
|
|
45
|
+
'.MuiDialogActions-root': {
|
|
46
|
+
padding: `${spacingTokens['spacing-aliases-card-section-gap']} 0 0`,
|
|
47
|
+
gap: spacingRoleBasedTokens['space-12'],
|
|
48
|
+
'& > :not(style) ~ :not(style)': { marginLeft: 0 },
|
|
49
|
+
},
|
|
50
|
+
'.MuiDialog-paper': {
|
|
51
|
+
backgroundColor: colorTokens['surface-base'],
|
|
52
|
+
backgroundImage: 'none',
|
|
53
|
+
color: colorTokens['text-default'],
|
|
54
|
+
border: `${borderTokens['border-default']} solid ${colorTokens['border-default']}`,
|
|
55
|
+
borderRadius: borderTokens['radius-modal'],
|
|
56
|
+
boxShadow: modalShadow,
|
|
57
|
+
padding: spacingRoleBasedTokens['space-32'],
|
|
58
|
+
},
|
|
20
59
|
},
|
|
21
60
|
},
|
|
22
61
|
},
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { Components
|
|
1
|
+
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { borderTokens } from '../borderTokens'
|
|
4
|
+
import { colorTokens } from '../colorTokens'
|
|
5
|
+
|
|
6
|
+
// Figma's error hover halo has no variable; it is a 20% tint of red-600.
|
|
7
|
+
const errorHoverHalo =
|
|
8
|
+
'0 0 0 4px color-mix(in srgb, var(--rc-color-red-600) 20%, transparent)'
|
|
4
9
|
|
|
5
10
|
const MuiFormControl: Components['MuiFormControl'] = {
|
|
6
11
|
defaultProps: {},
|
|
@@ -8,17 +13,22 @@ const MuiFormControl: Components['MuiFormControl'] = {
|
|
|
8
13
|
root: {
|
|
9
14
|
'.MuiFormControlLabel-root': {
|
|
10
15
|
'&.Mui-error': {
|
|
11
|
-
'.MuiCheckbox-root': {
|
|
12
|
-
'
|
|
13
|
-
|
|
14
|
-
},
|
|
16
|
+
'.MuiCheckbox-root:not(.Mui-disabled)': {
|
|
17
|
+
'--rc-mark-border': colorTokens['status-error-border'],
|
|
18
|
+
'--rc-mark-selected': colorTokens['status-error-border'],
|
|
15
19
|
|
|
16
|
-
'&:hover': {
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
'&:hover:not(.Mui-focusVisible)': {
|
|
21
|
+
'--rc-mark-selected-stroke': borderTokens['border-focus'],
|
|
22
|
+
'[data-rc-mark-shape]': {
|
|
23
|
+
boxShadow: errorHoverHalo,
|
|
19
24
|
},
|
|
20
25
|
},
|
|
21
26
|
},
|
|
27
|
+
'.MuiRadio-root:not(.Mui-disabled)': {
|
|
28
|
+
'--rc-mark-border': colorTokens['status-error-border'],
|
|
29
|
+
'--rc-mark-selected': colorTokens['status-error-border'],
|
|
30
|
+
'--rc-radio-hover-halo': errorHoverHalo,
|
|
31
|
+
},
|
|
22
32
|
},
|
|
23
33
|
},
|
|
24
34
|
},
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { Components
|
|
1
|
+
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
4
|
+
|
|
5
|
+
import { colorTokens } from '../colorTokens'
|
|
6
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
7
|
+
|
|
8
|
+
// No semantic role covers the pressed radio fill, so the primitive stays local.
|
|
9
|
+
const radioPressedFill = 'var(--rc-color-cyans-100)'
|
|
4
10
|
|
|
5
11
|
const MuiFormControlLabel: Components['MuiFormControlLabel'] = {
|
|
6
12
|
defaultProps: {},
|
|
@@ -9,37 +15,22 @@ const MuiFormControlLabel: Components['MuiFormControlLabel'] = {
|
|
|
9
15
|
position: 'relative',
|
|
10
16
|
|
|
11
17
|
'&:hover': {
|
|
12
|
-
'.MuiRadio-root': {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'[data-name="outer"]': {
|
|
16
|
-
stroke: palette.primary[500],
|
|
17
|
-
},
|
|
18
|
+
'.MuiRadio-root:not(.Mui-disabled, .Mui-focusVisible)': {
|
|
19
|
+
'--rc-mark-border': colorTokens['control-selected'],
|
|
20
|
+
'[data-rc-mark-shape]': { boxShadow: 'var(--rc-radio-hover-halo)' },
|
|
18
21
|
},
|
|
19
22
|
},
|
|
20
23
|
|
|
21
24
|
'&:active': {
|
|
22
|
-
'.MuiRadio-root': {
|
|
23
|
-
'
|
|
24
|
-
fill: palette.primary[100],
|
|
25
|
-
},
|
|
25
|
+
'.MuiRadio-root:not(.Mui-disabled, .Mui-checked)': {
|
|
26
|
+
'--rc-mark-surface': radioPressedFill,
|
|
26
27
|
},
|
|
27
28
|
},
|
|
28
29
|
|
|
29
30
|
'.MuiFormControlLabel-asterisk': {
|
|
30
|
-
color:
|
|
31
|
-
fontWeight:
|
|
32
|
-
marginLeft: '
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
'.PrivateSwitchBase-input': {
|
|
36
|
-
'&:focus, &:focus-visible': {
|
|
37
|
-
'& + svg': {
|
|
38
|
-
outline: `.125rem solid ${palette.grey[950]}`,
|
|
39
|
-
outlineOffset: '.125rem',
|
|
40
|
-
outlineStyle: 'auto',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
31
|
+
color: colorTokens['status-error-text'],
|
|
32
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
33
|
+
marginLeft: spacingRoleBasedTokens['space-2'],
|
|
43
34
|
},
|
|
44
35
|
},
|
|
45
36
|
},
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Components
|
|
1
|
+
import type { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { borderTokens } from '../borderTokens'
|
|
4
|
+
import { colorTokens } from '../colorTokens'
|
|
5
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
6
|
+
import { typographyTokens } from '../typographyTokens'
|
|
4
7
|
|
|
5
8
|
const MuiFormGroup: Components['MuiFormGroup'] = {
|
|
6
9
|
defaultProps: {},
|
|
@@ -10,30 +13,30 @@ const MuiFormGroup: Components['MuiFormGroup'] = {
|
|
|
10
13
|
flexDirection: 'row',
|
|
11
14
|
|
|
12
15
|
'&.rc-ses-hide-native-radio': {
|
|
13
|
-
margin: '
|
|
16
|
+
margin: `calc(-1 * ${spacingRoleBasedTokens['space-4']})`,
|
|
14
17
|
|
|
15
18
|
'.MuiButtonBase-root': {
|
|
16
|
-
margin: 0,
|
|
19
|
+
margin: spacingRoleBasedTokens['space-0'],
|
|
17
20
|
opacity: 0,
|
|
18
|
-
padding: 0,
|
|
21
|
+
padding: spacingRoleBasedTokens['space-0'],
|
|
19
22
|
postion: 'absolute',
|
|
20
23
|
},
|
|
21
24
|
|
|
22
25
|
'.MuiFormControlLabel-root': {
|
|
23
|
-
borderColor:
|
|
26
|
+
borderColor: colorTokens['control-unselected'],
|
|
24
27
|
borderRadius: '.1875rem',
|
|
25
28
|
borderStyle: 'solid',
|
|
26
|
-
borderWidth: '
|
|
29
|
+
borderWidth: borderTokens['stroke-1'],
|
|
27
30
|
flex: '0 0 0%',
|
|
28
|
-
lineHeight: '
|
|
29
|
-
margin: '
|
|
30
|
-
padding: '
|
|
31
|
+
lineHeight: typographyTokens['line-height-body-caption'],
|
|
32
|
+
margin: spacingRoleBasedTokens['space-4'],
|
|
33
|
+
padding: `${spacingRoleBasedTokens['space-12']} ${spacingRoleBasedTokens['space-16']}`,
|
|
31
34
|
whiteSpace: 'nowrap',
|
|
32
35
|
|
|
33
36
|
'&.Mui-disabled': {
|
|
34
|
-
backgroundColor:
|
|
35
|
-
borderColor:
|
|
36
|
-
color:
|
|
37
|
+
backgroundColor: colorTokens['surface-muted'],
|
|
38
|
+
borderColor: colorTokens['border-strong'],
|
|
39
|
+
color: colorTokens['text-disabled'],
|
|
37
40
|
},
|
|
38
41
|
|
|
39
42
|
'&:not(.Mui-disabled)': {
|
|
@@ -42,27 +45,27 @@ const MuiFormGroup: Components['MuiFormGroup'] = {
|
|
|
42
45
|
{
|
|
43
46
|
content: '""',
|
|
44
47
|
background: 'transparent',
|
|
45
|
-
border: '
|
|
46
|
-
borderColor:
|
|
47
|
-
borderRadius: '
|
|
48
|
-
height:
|
|
49
|
-
left: '
|
|
48
|
+
border: `${borderTokens['border-focus']} solid`,
|
|
49
|
+
borderColor: colorTokens['border-focus'],
|
|
50
|
+
borderRadius: borderTokens['radius-6'],
|
|
51
|
+
height: `calc(100% + ${spacingRoleBasedTokens['space-6']})`,
|
|
52
|
+
left: '-.1875rem',
|
|
50
53
|
position: 'absolute',
|
|
51
|
-
top: '
|
|
52
|
-
width:
|
|
54
|
+
top: '-.1875rem',
|
|
55
|
+
width: `calc(100% + ${spacingRoleBasedTokens['space-6']})`,
|
|
53
56
|
zIndex: 1,
|
|
54
57
|
},
|
|
55
58
|
},
|
|
56
59
|
|
|
57
60
|
'&:hover': {
|
|
58
|
-
backgroundColor:
|
|
59
|
-
borderColor:
|
|
61
|
+
backgroundColor: colorTokens['surface-brand-subtle'],
|
|
62
|
+
borderColor: colorTokens['control-selected'],
|
|
60
63
|
},
|
|
61
64
|
|
|
62
65
|
'&.Mui-checked': {
|
|
63
|
-
backgroundColor:
|
|
64
|
-
borderColor:
|
|
65
|
-
color: '
|
|
66
|
+
backgroundColor: colorTokens['control-selected'],
|
|
67
|
+
borderColor: colorTokens['control-selected'],
|
|
68
|
+
color: colorTokens['control-foreground'],
|
|
66
69
|
},
|
|
67
70
|
},
|
|
68
71
|
},
|
|
@@ -72,7 +75,7 @@ const MuiFormGroup: Components['MuiFormGroup'] = {
|
|
|
72
75
|
},
|
|
73
76
|
|
|
74
77
|
'.MuiTypography-root': {
|
|
75
|
-
lineHeight: '
|
|
78
|
+
lineHeight: typographyTokens['line-height-body-caption'],
|
|
76
79
|
},
|
|
77
80
|
},
|
|
78
81
|
},
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { colorTokens } from '../colorTokens'
|
|
4
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
5
|
+
import { typographyTokens } from '../typographyTokens'
|
|
4
6
|
|
|
5
7
|
const MuiFormHelperText: Components['MuiFormHelperText'] = {
|
|
6
8
|
styleOverrides: {
|
|
7
9
|
root: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
color: colorTokens['text-secondary'],
|
|
11
|
+
fontSize: typographyTokens['font-size-body-caption'],
|
|
12
|
+
fontStyle: 'normal',
|
|
13
|
+
fontWeight: typographyTokens['font-weight-body-caption'],
|
|
14
|
+
lineHeight: typographyTokens['line-height-body-caption'],
|
|
15
|
+
marginInline: spacingRoleBasedTokens['space-0'],
|
|
16
|
+
marginTop: spacingRoleBasedTokens['space-4'],
|
|
10
17
|
|
|
11
18
|
'&.Mui-error': {
|
|
12
|
-
color:
|
|
19
|
+
color: colorTokens['status-error-border'],
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'&.Mui-disabled': {
|
|
23
|
+
color: colorTokens['text-disabled'],
|
|
13
24
|
},
|
|
14
25
|
},
|
|
15
26
|
},
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { Components, createTheme } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { colorTokens } from '../colorTokens'
|
|
4
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
5
|
+
import { typographyTokens } from '../typographyTokens'
|
|
4
6
|
|
|
5
7
|
const { breakpoints } = createTheme()
|
|
6
8
|
|
|
7
9
|
const MuiFormLabel: Components['MuiFormLabel'] = {
|
|
8
10
|
styleOverrides: {
|
|
9
11
|
root: {
|
|
10
|
-
color:
|
|
11
|
-
fontSize: '
|
|
12
|
-
fontWeight:
|
|
13
|
-
lineHeight: '
|
|
12
|
+
color: colorTokens['text-default'],
|
|
13
|
+
fontSize: typographyTokens['font-size-body-regular'],
|
|
14
|
+
fontWeight: typographyTokens['font-weight-body-regular'],
|
|
15
|
+
lineHeight: typographyTokens['line-height-body-regular'],
|
|
14
16
|
|
|
15
17
|
[breakpoints.up('md')]: {
|
|
16
|
-
|
|
17
|
-
fontWeight: 500,
|
|
18
|
-
lineHeight: '1.125rem',
|
|
18
|
+
fontWeight: typographyTokens['font-weight-medium'],
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
-
'&.Mui-focused': {
|
|
22
|
-
color: '
|
|
21
|
+
'&.Mui-focused, &.Mui-error': {
|
|
22
|
+
color: colorTokens['text-default'],
|
|
23
23
|
},
|
|
24
24
|
|
|
25
|
-
'&.Mui-
|
|
26
|
-
color: '
|
|
25
|
+
'&.Mui-disabled': {
|
|
26
|
+
color: colorTokens['text-disabled'],
|
|
27
27
|
},
|
|
28
28
|
|
|
29
29
|
'.MuiFormLabel-asterisk': {
|
|
30
|
-
color:
|
|
31
|
-
fontWeight:
|
|
32
|
-
marginLeft: '
|
|
30
|
+
color: colorTokens['status-error-border'],
|
|
31
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
32
|
+
marginLeft: spacingRoleBasedTokens['space-2'],
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
'.rc-ses-label-subtitle': {
|
|
36
|
-
color:
|
|
36
|
+
color: colorTokens['text-secondary'],
|
|
37
37
|
display: 'block',
|
|
38
|
-
fontSize: '
|
|
38
|
+
fontSize: typographyTokens['font-size-body-caption'],
|
|
39
39
|
fontStyle: 'italic',
|
|
40
|
-
fontWeight:
|
|
41
|
-
lineHeight: '
|
|
42
|
-
marginTop: '
|
|
40
|
+
fontWeight: typographyTokens['font-weight-body-caption'],
|
|
41
|
+
lineHeight: typographyTokens['line-height-body-caption'],
|
|
42
|
+
marginTop: spacingRoleBasedTokens['space-2'],
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
},
|
|
@@ -1,105 +1,70 @@
|
|
|
1
|
-
import { Components
|
|
1
|
+
import type { Components } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { borderTokens } from '../borderTokens'
|
|
4
|
+
import { colorTokens } from '../colorTokens'
|
|
5
|
+
import { sizeTokens } from '../sizeTokens'
|
|
6
|
+
import { spacingRoleBasedTokens } from '../spacingRoleBasedTokens'
|
|
7
|
+
import { spacingTokens } from '../spacingTokens'
|
|
8
|
+
import { typographyTokens } from '../typographyTokens'
|
|
9
|
+
|
|
10
|
+
// Internal shared values, with rem fallbacks for when DS CSS is absent.
|
|
11
|
+
export const inputPadding = `${spacingTokens['spacing-aliases-input-padding-y'].slice(0, -1)}, 0.625rem) ${spacingRoleBasedTokens['space-12'].slice(0, -1)}, 0.75rem)`
|
|
12
|
+
// Input v2 fields are 44px: 10px padding around a 24px content row. Figma has no
|
|
13
|
+
// height variable, and the 22px line height alone would leave the field at 42px.
|
|
14
|
+
export const inputMinHeight = '2.75rem'
|
|
4
15
|
|
|
5
16
|
const MuiInputBase: Components['MuiInputBase'] = {
|
|
6
17
|
defaultProps: {},
|
|
7
18
|
styleOverrides: {
|
|
8
19
|
root: {
|
|
9
|
-
backgroundColor: '
|
|
10
|
-
borderRadius: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
backgroundColor: colorTokens['surface-base'],
|
|
21
|
+
borderRadius: borderTokens['radius-input'],
|
|
22
|
+
gap: spacingRoleBasedTokens['space-8'],
|
|
23
|
+
minHeight: inputMinHeight,
|
|
24
|
+
'&.Mui-disabled': { backgroundColor: colorTokens['surface-muted'] },
|
|
25
|
+
'.MuiInputAdornment-root': {
|
|
26
|
+
color: colorTokens['text-secondary'],
|
|
27
|
+
margin: spacingRoleBasedTokens['space-0'],
|
|
28
|
+
// Direct icons only: nested loading spinners keep their own dimensions.
|
|
29
|
+
'& > svg': {
|
|
30
|
+
display: 'block',
|
|
31
|
+
width: sizeTokens['icon-size-control'],
|
|
32
|
+
height: sizeTokens['icon-size-control'],
|
|
21
33
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
'&.Mui-error': {
|
|
29
|
-
'.MuiOutlinedInput-notchedOutline': {
|
|
30
|
-
borderColor: `${palette.error['600']} !important`,
|
|
34
|
+
'.MuiTypography-root': {
|
|
35
|
+
color: 'inherit',
|
|
36
|
+
fontSize: typographyTokens['font-size-body-regular'],
|
|
37
|
+
lineHeight: typographyTokens['line-height-body-regular'],
|
|
31
38
|
},
|
|
32
39
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'.MuiOutlinedInput-notchedOutline': {
|
|
43
|
-
borderColor: `${palette.error['600']} !important`,
|
|
44
|
-
borderWidth: '.125rem',
|
|
45
|
-
borderRadius: '.5rem',
|
|
46
|
-
boxShadow: `0px 0px 0px 3px rgba(${decomposeColor(palette.error['600']).values}, .2)`,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
'&.Mui-readOnly': {
|
|
52
|
-
'.MuiOutlinedInput-notchedOutline': {
|
|
53
|
-
borderColor: `${palette.grey['600']} !important`,
|
|
54
|
-
borderWidth: '1px !important',
|
|
55
|
-
boxShadow: 'none !important',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
|
|
40
|
+
},
|
|
41
|
+
input: {
|
|
42
|
+
color: colorTokens['text-default'],
|
|
43
|
+
fontSize: typographyTokens['font-size-body-regular'],
|
|
44
|
+
lineHeight: typographyTokens['line-height-body-regular'],
|
|
45
|
+
height: 'auto',
|
|
46
|
+
// No horizontal Input padding role exists; retain its spacing primitive.
|
|
47
|
+
padding: inputPadding,
|
|
48
|
+
'&::placeholder': { color: colorTokens['text-secondary'], opacity: 1 },
|
|
59
49
|
'&.Mui-disabled': {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
'
|
|
63
|
-
borderColor: `${palette.grey['600']} !important`,
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
'.MuiInputBase-input': {
|
|
67
|
-
color: `${palette.grey['600']} !important`,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
'&:hover:not(.Mui-disabled):not(.Mui-readOnly)': {
|
|
72
|
-
'.MuiOutlinedInput-notchedOutline': {
|
|
73
|
-
borderColor: palette.grey['900'],
|
|
74
|
-
},
|
|
50
|
+
color: colorTokens['text-disabled'],
|
|
51
|
+
WebkitTextFillColor: colorTokens['text-disabled'],
|
|
52
|
+
'&::placeholder': { color: colorTokens['text-disabled'] },
|
|
75
53
|
},
|
|
76
54
|
},
|
|
77
55
|
multiline: {
|
|
78
|
-
padding: '0
|
|
79
|
-
|
|
80
|
-
'.MuiInputBase-inputMultiline': {
|
|
81
|
-
overflowWrap: 'anywhere',
|
|
82
|
-
},
|
|
56
|
+
padding: spacingRoleBasedTokens['space-0'],
|
|
57
|
+
'.MuiInputBase-inputMultiline': { overflowWrap: 'anywhere' },
|
|
83
58
|
},
|
|
84
59
|
adornedStart: {
|
|
85
|
-
paddingLeft: '
|
|
86
|
-
|
|
87
|
-
'.
|
|
88
|
-
paddingLeft: 0,
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
'.MuiIconButton-edgeStart': {
|
|
92
|
-
marginLeft: 0,
|
|
93
|
-
},
|
|
60
|
+
paddingLeft: spacingRoleBasedTokens['space-12'],
|
|
61
|
+
'.MuiInputBase-input': { paddingLeft: spacingRoleBasedTokens['space-0'] },
|
|
62
|
+
'.MuiIconButton-edgeStart': { marginLeft: spacingRoleBasedTokens['space-0'] },
|
|
94
63
|
},
|
|
95
64
|
adornedEnd: {
|
|
96
|
-
paddingRight: '
|
|
97
|
-
|
|
98
|
-
'.MuiInputBase-input': {
|
|
99
|
-
paddingRight: 0,
|
|
100
|
-
},
|
|
65
|
+
paddingRight: spacingRoleBasedTokens['space-12'],
|
|
66
|
+
'.MuiInputBase-input': { paddingRight: spacingRoleBasedTokens['space-0'] },
|
|
101
67
|
},
|
|
102
68
|
},
|
|
103
69
|
}
|
|
104
|
-
|
|
105
70
|
export default MuiInputBase
|