@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
|
@@ -2,7 +2,11 @@ import { Box } from '@mui/material'
|
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
|
|
4
4
|
import { CircleFilledIcon, CloseIcon } from '@/assets/icons/phosphorIcons'
|
|
5
|
-
import {
|
|
5
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
6
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
7
|
+
import { sizeTokens } from '@/theme/sizeTokens'
|
|
8
|
+
import { spacingTokens } from '@/theme/spacingTokens'
|
|
9
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
6
10
|
|
|
7
11
|
export interface RcSesBadgeProps {
|
|
8
12
|
label: string
|
|
@@ -23,40 +27,40 @@ interface VariantStyle {
|
|
|
23
27
|
|
|
24
28
|
const variantStyles: Record<RcSesBadgeProps['variant'], VariantStyle> = {
|
|
25
29
|
neutral: {
|
|
26
|
-
border:
|
|
27
|
-
background:
|
|
28
|
-
iconColor:
|
|
29
|
-
color:
|
|
30
|
+
border: colorTokens['border-default'],
|
|
31
|
+
background: colorTokens['surface-base'],
|
|
32
|
+
iconColor: colorTokens['text-default'],
|
|
33
|
+
color: colorTokens['text-default'],
|
|
30
34
|
},
|
|
31
35
|
success: {
|
|
32
|
-
border:
|
|
33
|
-
background:
|
|
34
|
-
iconColor:
|
|
35
|
-
color:
|
|
36
|
+
border: colorTokens['status-success-border'],
|
|
37
|
+
background: colorTokens['status-success-bg'],
|
|
38
|
+
iconColor: colorTokens['status-success-icon'],
|
|
39
|
+
color: colorTokens['status-success-text'],
|
|
36
40
|
},
|
|
37
41
|
warning: {
|
|
38
|
-
border:
|
|
39
|
-
background:
|
|
40
|
-
iconColor:
|
|
41
|
-
color:
|
|
42
|
+
border: colorTokens['status-warning-border'],
|
|
43
|
+
background: colorTokens['status-warning-bg'],
|
|
44
|
+
iconColor: colorTokens['status-warning-icon'],
|
|
45
|
+
color: colorTokens['status-warning-text'],
|
|
42
46
|
},
|
|
43
47
|
error: {
|
|
44
|
-
border:
|
|
45
|
-
background:
|
|
46
|
-
iconColor:
|
|
47
|
-
color:
|
|
48
|
+
border: colorTokens['status-error-border'],
|
|
49
|
+
background: colorTokens['status-error-bg'],
|
|
50
|
+
iconColor: colorTokens['status-error-icon'],
|
|
51
|
+
color: colorTokens['status-error-text'],
|
|
48
52
|
},
|
|
49
53
|
info: {
|
|
50
|
-
border:
|
|
51
|
-
background:
|
|
52
|
-
iconColor:
|
|
53
|
-
color:
|
|
54
|
+
border: colorTokens['status-info-border'],
|
|
55
|
+
background: colorTokens['status-info-bg'],
|
|
56
|
+
iconColor: colorTokens['status-info-icon'],
|
|
57
|
+
color: colorTokens['status-info-text'],
|
|
54
58
|
},
|
|
55
59
|
brand: {
|
|
56
|
-
border:
|
|
57
|
-
background:
|
|
58
|
-
iconColor:
|
|
59
|
-
color:
|
|
60
|
+
border: 'var(--rc-color-cyans-500)',
|
|
61
|
+
background: colorTokens['action-primary-bg'],
|
|
62
|
+
iconColor: colorTokens['action-primary-text'],
|
|
63
|
+
color: colorTokens['action-primary-text'],
|
|
60
64
|
},
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -70,15 +74,15 @@ interface SizeStyle {
|
|
|
70
74
|
const sizeStyles: Record<RcSesBadgeProps['size'], SizeStyle> = {
|
|
71
75
|
small: {
|
|
72
76
|
height: '1.625rem',
|
|
73
|
-
padding: '
|
|
74
|
-
fontSize: '
|
|
75
|
-
lineHeight: '
|
|
77
|
+
padding: `${spacingTokens['spacing-aliases-badge-padding-y-small']} ${spacingTokens['spacing-aliases-badge-padding-x-small']}`,
|
|
78
|
+
fontSize: typographyTokens['font-size-body-caption'],
|
|
79
|
+
lineHeight: typographyTokens['line-height-body-caption'],
|
|
76
80
|
},
|
|
77
81
|
regular: {
|
|
78
82
|
height: '2.125rem',
|
|
79
|
-
padding: '
|
|
80
|
-
fontSize: '
|
|
81
|
-
lineHeight: '
|
|
83
|
+
padding: `${spacingTokens['spacing-aliases-badge-padding-y-regular']} ${spacingTokens['spacing-aliases-badge-padding-x-regular']}`,
|
|
84
|
+
fontSize: typographyTokens['font-size-body-regular'],
|
|
85
|
+
lineHeight: typographyTokens['line-height-body-regular'],
|
|
82
86
|
},
|
|
83
87
|
}
|
|
84
88
|
|
|
@@ -102,10 +106,10 @@ function RcSesBadge(props: RcSesBadgeProps) {
|
|
|
102
106
|
alignItems: 'center',
|
|
103
107
|
justifyContent: 'center',
|
|
104
108
|
verticalAlign: 'baseline',
|
|
105
|
-
gap: '
|
|
109
|
+
gap: spacingTokens['spacing-aliases-badge-icon-text-gap'],
|
|
106
110
|
maxWidth: '100%',
|
|
107
|
-
borderRadius: '
|
|
108
|
-
border:
|
|
111
|
+
borderRadius: borderTokens['radius-pill'],
|
|
112
|
+
border: `${borderTokens['border-default']} solid ${variantStyle.border}`,
|
|
109
113
|
background: variantStyle.background,
|
|
110
114
|
color: variantStyle.color,
|
|
111
115
|
...sizeStyle,
|
|
@@ -121,8 +125,8 @@ function RcSesBadge(props: RcSesBadgeProps) {
|
|
|
121
125
|
display: 'flex',
|
|
122
126
|
alignItems: 'center',
|
|
123
127
|
justifyContent: 'center',
|
|
124
|
-
width:
|
|
125
|
-
height:
|
|
128
|
+
width: sizeTokens['icon-size-badge'],
|
|
129
|
+
height: sizeTokens['icon-size-badge'],
|
|
126
130
|
flexShrink: 0,
|
|
127
131
|
}}
|
|
128
132
|
>
|
|
@@ -134,7 +138,11 @@ function RcSesBadge(props: RcSesBadgeProps) {
|
|
|
134
138
|
fillColor={variantStyle.iconColor}
|
|
135
139
|
aria-hidden
|
|
136
140
|
focusable={false}
|
|
137
|
-
style={{
|
|
141
|
+
style={{
|
|
142
|
+
flexShrink: 0,
|
|
143
|
+
width: sizeTokens['icon-size-badge'],
|
|
144
|
+
height: sizeTokens['icon-size-badge'],
|
|
145
|
+
}}
|
|
138
146
|
/>
|
|
139
147
|
))}
|
|
140
148
|
<Box
|
|
@@ -175,6 +183,11 @@ function RcSesBadge(props: RcSesBadgeProps) {
|
|
|
175
183
|
fillColor={variantStyle.iconColor}
|
|
176
184
|
aria-hidden
|
|
177
185
|
focusable={false}
|
|
186
|
+
style={{
|
|
187
|
+
flexShrink: 0,
|
|
188
|
+
width: sizeTokens['icon-size-badge'],
|
|
189
|
+
height: sizeTokens['icon-size-badge'],
|
|
190
|
+
}}
|
|
178
191
|
/>
|
|
179
192
|
</Box>
|
|
180
193
|
)}
|
|
@@ -4,6 +4,8 @@ import type { ExtendButtonBase } from '@mui/material/ButtonBase'
|
|
|
4
4
|
import { useTranslation } from 'react-i18next'
|
|
5
5
|
|
|
6
6
|
import RcSesLoadingSpinner from '@/components/loaders/LoadingSpinner'
|
|
7
|
+
import { buttonDimensions } from '@/theme/light/MuiButton'
|
|
8
|
+
import '@/theme/tokens.css'
|
|
7
9
|
import { ButtonProps } from '@/types/buttons/ButtonProps'
|
|
8
10
|
|
|
9
11
|
const defaultProps: Partial<MuiButtonProps> = {
|
|
@@ -12,12 +14,6 @@ const defaultProps: Partial<MuiButtonProps> = {
|
|
|
12
14
|
variant: 'contained',
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
const ICON_ONLY_SIZE_MAP = {
|
|
16
|
-
small: '2.25rem',
|
|
17
|
-
medium: '2.75rem',
|
|
18
|
-
large: '3rem',
|
|
19
|
-
} as const
|
|
20
|
-
|
|
21
17
|
type Props = ButtonProps
|
|
22
18
|
|
|
23
19
|
function RcSesButtonComponent(props: Props) {
|
|
@@ -26,7 +22,10 @@ function RcSesButtonComponent(props: Props) {
|
|
|
26
22
|
|
|
27
23
|
const currentVariant = variant ?? defaultProps.variant
|
|
28
24
|
const isIconOnly =
|
|
29
|
-
!!iconOnly &&
|
|
25
|
+
!!iconOnly &&
|
|
26
|
+
(currentVariant === 'contained' ||
|
|
27
|
+
currentVariant === 'outlined' ||
|
|
28
|
+
currentVariant === 'link')
|
|
30
29
|
|
|
31
30
|
return (
|
|
32
31
|
<MuiButton
|
|
@@ -48,9 +47,12 @@ function RcSesButtonComponent(props: Props) {
|
|
|
48
47
|
isIconOnly
|
|
49
48
|
? {
|
|
50
49
|
minWidth: 0,
|
|
51
|
-
padding:
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
padding:
|
|
51
|
+
size === 'small'
|
|
52
|
+
? buttonDimensions.iconPaddingSmall
|
|
53
|
+
: buttonDimensions.iconPaddingRegular,
|
|
54
|
+
width: buttonDimensions[size],
|
|
55
|
+
height: buttonDimensions[size],
|
|
54
56
|
'.MuiButton-startIcon, .MuiButton-endIcon': {
|
|
55
57
|
margin: 0,
|
|
56
58
|
},
|
|
@@ -12,6 +12,7 @@ import { ReactNode } from 'react'
|
|
|
12
12
|
|
|
13
13
|
import normalizeSx from '@/components/utils/normalizeSx'
|
|
14
14
|
import palette from '@/theme/palette'
|
|
15
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
15
16
|
|
|
16
17
|
export interface RcSesCardTestIds {
|
|
17
18
|
root?: string
|
|
@@ -50,6 +51,10 @@ export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use `RcSesCardShell` instead. Will be removed in a future major release.
|
|
56
|
+
*/
|
|
57
|
+
|
|
53
58
|
function RcSesCard({
|
|
54
59
|
title,
|
|
55
60
|
description,
|
|
@@ -163,7 +168,7 @@ function RcSesCard({
|
|
|
163
168
|
sx={[
|
|
164
169
|
{
|
|
165
170
|
color: palette.grey[800],
|
|
166
|
-
fontWeight:
|
|
171
|
+
fontWeight: typographyTokens['font-weight-light'],
|
|
167
172
|
lineHeight: '1.25rem',
|
|
168
173
|
...(centered ? { textAlign: 'center' } : {}),
|
|
169
174
|
},
|
|
@@ -6,6 +6,7 @@ import { type ReactElement } from 'react'
|
|
|
6
6
|
import { describe, expect, test } from 'vitest'
|
|
7
7
|
|
|
8
8
|
import RcSesButton from '@/components/common/Button'
|
|
9
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
9
10
|
import theme from '@/theme/light'
|
|
10
11
|
|
|
11
12
|
import RcSesCardShell from '.'
|
|
@@ -101,7 +102,7 @@ describe('RcSesCardShell', () => {
|
|
|
101
102
|
)
|
|
102
103
|
|
|
103
104
|
const card = screen.getByTestId('card-root')
|
|
104
|
-
expect(card).
|
|
105
|
+
expect(getComputedStyle(card).borderRadius).toBe('var(--rc-radius-card)')
|
|
105
106
|
})
|
|
106
107
|
|
|
107
108
|
test('variant="subcard" applies smaller border-radius', () => {
|
|
@@ -112,13 +113,13 @@ describe('RcSesCardShell', () => {
|
|
|
112
113
|
)
|
|
113
114
|
|
|
114
115
|
const card = screen.getByTestId('card-root')
|
|
115
|
-
expect(card).
|
|
116
|
+
expect(getComputedStyle(card).borderRadius).toBe('var(--rc-radius-subcard)')
|
|
116
117
|
})
|
|
117
118
|
|
|
118
119
|
test.each([
|
|
119
|
-
['default', '
|
|
120
|
-
['brand', '
|
|
121
|
-
['sunken', '
|
|
120
|
+
['default', colorTokens['surface-base'], colorTokens['border-subtle']],
|
|
121
|
+
['brand', colorTokens['surface-brand-subtle'], colorTokens['border-brand-subtle']],
|
|
122
|
+
['sunken', colorTokens['surface-sunken'], colorTokens['surface-sunken']],
|
|
122
123
|
] as const)(
|
|
123
124
|
'theme=%s paints its own background and border',
|
|
124
125
|
(name, background, border) => {
|
|
@@ -128,9 +129,18 @@ describe('RcSesCardShell', () => {
|
|
|
128
129
|
</RcSesCardShell>,
|
|
129
130
|
)
|
|
130
131
|
|
|
132
|
+
const emitted = Array.from(document.querySelectorAll('style[data-emotion]'))
|
|
133
|
+
.flatMap((style) =>
|
|
134
|
+
Array.from(
|
|
135
|
+
(style as HTMLStyleElement).sheet?.cssRules ?? [],
|
|
136
|
+
(rule) => rule.cssText,
|
|
137
|
+
),
|
|
138
|
+
)
|
|
139
|
+
.join('\n')
|
|
140
|
+
if (border.startsWith('var(')) expect(emitted).toContain(border)
|
|
141
|
+
else expect(screen.getByTestId('card-root')).toHaveStyle({ borderColor: border })
|
|
131
142
|
expect(screen.getByTestId('card-root')).toHaveStyle({
|
|
132
143
|
backgroundColor: background,
|
|
133
|
-
borderColor: border,
|
|
134
144
|
})
|
|
135
145
|
},
|
|
136
146
|
)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles'
|
|
2
|
+
import { CSSProperties } from 'react'
|
|
3
|
+
|
|
4
|
+
import { CheckIcon, MinusBoldIcon } from '@/assets/icons/phosphorIcons'
|
|
5
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
6
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
7
|
+
import { sizeTokens } from '@/theme/sizeTokens'
|
|
8
|
+
|
|
9
|
+
export interface CheckboxMarkProps {
|
|
10
|
+
type?: 'unchecked' | 'checked' | 'indeterminate'
|
|
11
|
+
disabled?: boolean
|
|
12
|
+
className?: string
|
|
13
|
+
style?: CSSProperties
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const Mark = styled('span')({
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
display: 'inline-flex',
|
|
19
|
+
flexShrink: 0,
|
|
20
|
+
height: sizeTokens['icon-size-24'],
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
pointerEvents: 'none',
|
|
23
|
+
verticalAlign: 'middle',
|
|
24
|
+
width: sizeTokens['icon-size-24'],
|
|
25
|
+
'& > span': {
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
borderRadius: borderTokens['radius-4'],
|
|
28
|
+
borderStyle: 'solid',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
display: 'inline-flex',
|
|
31
|
+
height: sizeTokens['icon-size-control'],
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
width: sizeTokens['icon-size-control'],
|
|
34
|
+
'& > svg': {
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
height: sizeTokens['icon-size-16'],
|
|
37
|
+
width: sizeTokens['icon-size-16'],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
export default function RcSesCheckboxMark({
|
|
43
|
+
type = 'unchecked',
|
|
44
|
+
disabled = false,
|
|
45
|
+
...props
|
|
46
|
+
}: CheckboxMarkProps) {
|
|
47
|
+
const selected = type !== 'unchecked'
|
|
48
|
+
// --rc-mark-* are component hooks set by the MuiCheckbox/MuiRadio/MuiFormControl
|
|
49
|
+
// themes for hover, error and disabled states; they are not DS tokens.
|
|
50
|
+
const selectedColor = disabled
|
|
51
|
+
? colorTokens['control-disabled-selected']
|
|
52
|
+
: `var(--rc-mark-selected, ${colorTokens['control-selected']})`
|
|
53
|
+
const borderColor = disabled
|
|
54
|
+
? colorTokens['control-disabled-selected']
|
|
55
|
+
: `var(--rc-mark-border, ${colorTokens['control-border']})`
|
|
56
|
+
const surface = disabled
|
|
57
|
+
? colorTokens['control-disabled']
|
|
58
|
+
: `var(--rc-mark-surface, ${colorTokens['surface-base']})`
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Mark {...props} aria-hidden='true' data-rc-checkbox-mark={type}>
|
|
62
|
+
<span
|
|
63
|
+
data-rc-mark-shape
|
|
64
|
+
style={{
|
|
65
|
+
backgroundColor: selected ? selectedColor : surface,
|
|
66
|
+
borderColor: selected ? selectedColor : borderColor,
|
|
67
|
+
borderWidth:
|
|
68
|
+
selected && !disabled
|
|
69
|
+
? `var(--rc-mark-selected-stroke, ${borderTokens['border-default']})`
|
|
70
|
+
: borderTokens['border-focus'],
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
{type === 'checked' && (
|
|
74
|
+
<CheckIcon
|
|
75
|
+
size={16}
|
|
76
|
+
weight='bold'
|
|
77
|
+
fillColor={colorTokens['control-foreground']}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
{type === 'indeterminate' && (
|
|
81
|
+
<MinusBoldIcon size={16} fillColor={colorTokens['control-foreground']} />
|
|
82
|
+
)}
|
|
83
|
+
</span>
|
|
84
|
+
</Mark>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Box, Skeleton } from '@mui/material'
|
|
2
2
|
|
|
3
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
4
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
5
|
+
import { spacingTokens } from '@/theme/spacingTokens'
|
|
6
|
+
|
|
3
7
|
interface DataPaginationSkeletonProps {
|
|
4
8
|
isMobile: boolean
|
|
5
9
|
}
|
|
6
10
|
|
|
7
11
|
const SIZES = {
|
|
8
|
-
item: '
|
|
9
|
-
buttonDesktop: '
|
|
10
|
-
gap: '
|
|
11
|
-
|
|
12
|
-
radius: '0.5rem',
|
|
12
|
+
item: spacingRoleBasedTokens['space-40'],
|
|
13
|
+
buttonDesktop: spacingRoleBasedTokens['space-80'],
|
|
14
|
+
gap: spacingTokens['spacing-aliases-pagination-button-gap'],
|
|
15
|
+
radius: borderTokens['radius-button'],
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
const ITEMS_COUNT = 5
|
|
@@ -24,8 +27,7 @@ const DataPaginationSkeleton = ({ isMobile }: DataPaginationSkeletonProps) => {
|
|
|
24
27
|
<Box
|
|
25
28
|
sx={{
|
|
26
29
|
display: 'flex',
|
|
27
|
-
gap: SIZES.gap,
|
|
28
|
-
px: SIZES.paddingX,
|
|
30
|
+
gap: isMobile ? 0 : SIZES.gap,
|
|
29
31
|
borderRadius: SIZES.radius,
|
|
30
32
|
}}
|
|
31
33
|
>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ButtonProps } from '@mui/material'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
|
|
4
|
+
import { CaretDownIcon, CaretUpIcon } from '@/assets/icons/phosphorIcons'
|
|
5
|
+
import '@/i18n/i18n'
|
|
6
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
7
|
+
|
|
8
|
+
import PaginationButton from './PaginationButton'
|
|
9
|
+
|
|
10
|
+
export interface ExpandButtonProps extends Omit<ButtonProps, 'children'> {
|
|
11
|
+
expanded: boolean
|
|
12
|
+
moreLabel?: string
|
|
13
|
+
lessLabel?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function ExpandButton({
|
|
17
|
+
expanded,
|
|
18
|
+
moreLabel,
|
|
19
|
+
lessLabel,
|
|
20
|
+
...props
|
|
21
|
+
}: ExpandButtonProps) {
|
|
22
|
+
const { t } = useTranslation('input', { keyPrefix: 'components.DataPagination' })
|
|
23
|
+
return (
|
|
24
|
+
<PaginationButton
|
|
25
|
+
{...props}
|
|
26
|
+
aria-expanded={expanded}
|
|
27
|
+
label={expanded ? (lessLabel ?? t('showLess')) : (moreLabel ?? t('showMore'))}
|
|
28
|
+
icon={
|
|
29
|
+
expanded ? (
|
|
30
|
+
<CaretUpIcon size={16} aria-hidden />
|
|
31
|
+
) : (
|
|
32
|
+
<CaretDownIcon size={16} aria-hidden />
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
iconPosition='end'
|
|
36
|
+
hideLabelOnMobile={false}
|
|
37
|
+
sx={[
|
|
38
|
+
{
|
|
39
|
+
'&&': {
|
|
40
|
+
pl: spacingRoleBasedTokens['space-16'],
|
|
41
|
+
pr: spacingRoleBasedTokens['space-12'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
...(Array.isArray(props.sx) ? props.sx : [props.sx ?? {}]),
|
|
45
|
+
]}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -1,45 +1,56 @@
|
|
|
1
1
|
import { Box, Button, ButtonProps } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import normalizeSx from '@/components/utils/normalizeSx'
|
|
4
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
5
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
6
|
+
import { sizeTokens } from '@/theme/sizeTokens'
|
|
7
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
8
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
4
9
|
|
|
5
10
|
interface PaginationButtonProps extends ButtonProps {
|
|
6
11
|
label: string
|
|
7
12
|
icon: React.ReactNode
|
|
8
13
|
iconPosition?: 'start' | 'end'
|
|
14
|
+
hideLabelOnMobile?: boolean
|
|
9
15
|
}
|
|
10
16
|
|
|
11
17
|
const baseButtonSx = {
|
|
12
18
|
'&&': {
|
|
13
19
|
minWidth: 40,
|
|
14
20
|
height: 40,
|
|
15
|
-
px:
|
|
16
|
-
borderRadius:
|
|
17
|
-
fontSize:
|
|
18
|
-
|
|
21
|
+
px: spacingRoleBasedTokens['space-10'],
|
|
22
|
+
borderRadius: borderTokens['radius-button'],
|
|
23
|
+
fontSize: typographyTokens['font-size-body-small'],
|
|
24
|
+
lineHeight: typographyTokens['line-height-body-small'],
|
|
25
|
+
fontWeight: typographyTokens['font-weight-body-small'],
|
|
19
26
|
textTransform: 'none',
|
|
20
27
|
backgroundColor: 'transparent',
|
|
21
|
-
color:
|
|
22
|
-
|
|
28
|
+
color: 'var(--rc-color-neutrals-800)',
|
|
23
29
|
display: 'flex',
|
|
24
30
|
alignItems: 'center',
|
|
25
|
-
gap:
|
|
26
|
-
|
|
31
|
+
gap: spacingRoleBasedTokens['space-8'],
|
|
32
|
+
'& > svg': {
|
|
33
|
+
width: sizeTokens['icon-size-inline'],
|
|
34
|
+
height: sizeTokens['icon-size-inline'],
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
},
|
|
27
37
|
'&:hover': {
|
|
28
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: 'var(--rc-color-neutrals-200)',
|
|
39
|
+
color: colorTokens['text-default'],
|
|
29
40
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
'&:active, &.Mui-selected': {
|
|
42
|
+
backgroundColor: 'var(--rc-color-neutrals-300)',
|
|
43
|
+
color: colorTokens['text-default'],
|
|
33
44
|
},
|
|
34
|
-
|
|
35
45
|
'&.Mui-focusVisible': {
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
backgroundColor: 'var(--rc-color-neutrals-50)',
|
|
47
|
+
border: `${borderTokens['border-focus']} solid var(--rc-color-neutrals-950)`,
|
|
48
|
+
boxShadow: 'none',
|
|
49
|
+
color: colorTokens['text-default'],
|
|
38
50
|
},
|
|
39
|
-
|
|
40
51
|
'&.Mui-disabled': {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
color:
|
|
52
|
+
backgroundColor: 'var(--rc-color-neutrals-100)',
|
|
53
|
+
color: colorTokens['text-disabled'],
|
|
43
54
|
},
|
|
44
55
|
},
|
|
45
56
|
}
|
|
@@ -48,12 +59,28 @@ const PaginationButton = ({
|
|
|
48
59
|
label,
|
|
49
60
|
icon,
|
|
50
61
|
iconPosition = 'start',
|
|
62
|
+
hideLabelOnMobile = true,
|
|
63
|
+
sx,
|
|
51
64
|
...props
|
|
52
65
|
}: PaginationButtonProps) => (
|
|
53
|
-
<Button
|
|
66
|
+
<Button
|
|
67
|
+
type='button'
|
|
68
|
+
variant='text'
|
|
69
|
+
color='inherit'
|
|
70
|
+
disableRipple
|
|
71
|
+
aria-label={label}
|
|
72
|
+
aria-disabled={props.disabled || undefined}
|
|
73
|
+
{...props}
|
|
74
|
+
sx={[baseButtonSx, ...normalizeSx(sx)]}
|
|
75
|
+
>
|
|
54
76
|
{iconPosition === 'start' && icon}
|
|
55
77
|
|
|
56
|
-
<Box
|
|
78
|
+
<Box
|
|
79
|
+
component='span'
|
|
80
|
+
sx={{ display: hideLabelOnMobile ? { xs: 'none', md: 'block' } : 'block' }}
|
|
81
|
+
>
|
|
82
|
+
{label}
|
|
83
|
+
</Box>
|
|
57
84
|
|
|
58
85
|
{iconPosition === 'end' && icon}
|
|
59
86
|
</Button>
|