@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
|
@@ -1,53 +1,326 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '@mui/material'
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { Box, IconButton, InputAdornment, TextField } from '@mui/material'
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
3
|
+
import type { OutlinedTextFieldProps } from '@mui/material/TextField'
|
|
4
|
+
import { useForkRef } from '@mui/material/utils'
|
|
5
|
+
import type { SystemStyleObject } from '@mui/system'
|
|
6
|
+
import { EyeIcon, EyeSlashIcon, XCircleIcon } from '@phosphor-icons/react'
|
|
7
|
+
import React, { useEffect, useId, useRef, useState } from 'react'
|
|
8
|
+
import type { FieldError } from 'react-hook-form'
|
|
9
|
+
import { useTranslation } from 'react-i18next'
|
|
10
|
+
|
|
11
|
+
import { MagnifyingGlassIcon } from '@/assets/icons/phosphorIcons'
|
|
12
|
+
import RcSesTooltip from '@/components/common/Tooltip'
|
|
13
|
+
import RcSesLoadingSpinner from '@/components/loaders/LoadingSpinner'
|
|
14
|
+
import normalizeSx from '@/components/utils/normalizeSx'
|
|
15
|
+
import '@/i18n/i18n'
|
|
16
|
+
import { sizeTokens } from '@/theme/sizeTokens'
|
|
7
17
|
|
|
8
18
|
import RcSesFormControlWrapper, {
|
|
9
|
-
RcSesFormControlWrapperProps,
|
|
19
|
+
type RcSesFormControlWrapperProps,
|
|
10
20
|
} from '../components/FormControlWrapper'
|
|
21
|
+
import { inputActionStyles, textFieldStyles } from './TextField.styles'
|
|
11
22
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
// Existing MUI field/input sx must remain authoritative over scoped DS defaults.
|
|
24
|
+
const consumerStyles = (sx: SxProps<Theme> | undefined): SxProps<Theme> =>
|
|
25
|
+
normalizeSx(sx).map((entry) => (theme): SystemStyleObject<Theme> => {
|
|
26
|
+
if (!entry || typeof entry === 'boolean') return {}
|
|
27
|
+
return { '&&&&': typeof entry === 'function' ? entry(theme) : entry }
|
|
28
|
+
})
|
|
15
29
|
|
|
16
|
-
type
|
|
17
|
-
type ImmediateWrapperProps = 'label' | 'errors'
|
|
30
|
+
export type TextFieldPreset = 'text' | 'search' | 'password' | 'phone' | 'number'
|
|
18
31
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
export interface TextFieldProps extends Omit<
|
|
33
|
+
OutlinedTextFieldProps,
|
|
34
|
+
| 'variant'
|
|
35
|
+
| 'label'
|
|
36
|
+
| 'helperText'
|
|
37
|
+
| 'error'
|
|
38
|
+
| 'select'
|
|
39
|
+
| 'slotProps'
|
|
40
|
+
| 'value'
|
|
41
|
+
| 'defaultValue'
|
|
42
|
+
| 'prefix'
|
|
43
|
+
> {
|
|
44
|
+
preset?: TextFieldPreset
|
|
45
|
+
value?: string | number
|
|
46
|
+
defaultValue?: string | number
|
|
47
|
+
label?: React.ReactNode
|
|
48
|
+
helperText?: React.ReactNode
|
|
49
|
+
error?: boolean
|
|
50
|
+
/** Enables the error state. Supporting text follows the shared wrapper contract. */
|
|
51
|
+
errorText?: React.ReactNode
|
|
52
|
+
explainer?: string
|
|
53
|
+
leading?: React.ReactNode
|
|
54
|
+
trailing?: React.ReactNode
|
|
55
|
+
prefix?: React.ReactNode
|
|
56
|
+
suffix?: React.ReactNode
|
|
57
|
+
readOnly?: boolean
|
|
58
|
+
loading?: boolean
|
|
59
|
+
/** Existing react-hook-form error API. */
|
|
60
|
+
errors?: FieldError
|
|
61
|
+
slotProps?: NonNullable<OutlinedTextFieldProps['slotProps']> & {
|
|
62
|
+
field?: Partial<Omit<OutlinedTextFieldProps, 'variant'>>
|
|
63
|
+
wrapper?: Partial<Omit<RcSesFormControlWrapperProps, 'children' | 'label' | 'errors'>>
|
|
26
64
|
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** DS field presets with shared form-control labels and supporting text. */
|
|
68
|
+
const RcSesTextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
|
|
69
|
+
(props, ref) => {
|
|
70
|
+
const { field: legacyField, wrapper, ...nativeSlots } = props.slotProps ?? {}
|
|
71
|
+
const options = {
|
|
72
|
+
...legacyField,
|
|
73
|
+
...props,
|
|
74
|
+
slotProps: { ...legacyField?.slotProps, ...nativeSlots },
|
|
75
|
+
}
|
|
76
|
+
const {
|
|
77
|
+
preset = 'text',
|
|
78
|
+
label,
|
|
79
|
+
helperText: providedHelper,
|
|
80
|
+
error = false,
|
|
81
|
+
errorText: providedErrorText,
|
|
82
|
+
errors,
|
|
83
|
+
explainer,
|
|
84
|
+
leading,
|
|
85
|
+
trailing,
|
|
86
|
+
prefix,
|
|
87
|
+
suffix,
|
|
88
|
+
readOnly = false,
|
|
89
|
+
loading = false,
|
|
90
|
+
disabled = false,
|
|
91
|
+
required = wrapper?.required ?? false,
|
|
92
|
+
multiline = false,
|
|
93
|
+
value,
|
|
94
|
+
defaultValue,
|
|
95
|
+
onChange,
|
|
96
|
+
inputRef: consumerInputRef,
|
|
97
|
+
id: providedId,
|
|
98
|
+
slotProps,
|
|
99
|
+
sx,
|
|
100
|
+
className,
|
|
101
|
+
type: providedType,
|
|
102
|
+
'aria-describedby': describedBy,
|
|
103
|
+
...fieldProps
|
|
104
|
+
} = options
|
|
105
|
+
const { t } = useTranslation('input', { keyPrefix: 'components.RcSesTextField' })
|
|
106
|
+
const generatedId = useId()
|
|
107
|
+
const id = providedId ?? `rc-input-${generatedId}`
|
|
108
|
+
const nativeRef = useRef<HTMLInputElement>(null)
|
|
109
|
+
const forwardedRef = useForkRef(ref, consumerInputRef)
|
|
110
|
+
const handleRef = useForkRef(nativeRef, forwardedRef)
|
|
111
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? '')
|
|
112
|
+
const [showPassword, setShowPassword] = useState(false)
|
|
113
|
+
const hasValue = String(value ?? uncontrolledValue).length > 0
|
|
114
|
+
const helperText = providedHelper ?? wrapper?.description
|
|
115
|
+
const isError = error || !!providedErrorText || !!errors
|
|
116
|
+
const wrapperErrors = errors ?? (isError ? { type: 'manual' } : undefined)
|
|
117
|
+
const supportIds = [helperText && `${id}-description`, isError && `${id}-errors`]
|
|
118
|
+
const fieldSuffix = explainer ? (
|
|
119
|
+
<>
|
|
120
|
+
<RcSesTooltip
|
|
121
|
+
title={explainer}
|
|
122
|
+
slotProps={{
|
|
123
|
+
trigger: {
|
|
124
|
+
'aria-label': t('explain', {
|
|
125
|
+
label: typeof label === 'string' ? label : t('field'),
|
|
126
|
+
}),
|
|
127
|
+
},
|
|
128
|
+
}}
|
|
129
|
+
/>
|
|
130
|
+
{wrapper?.fieldSuffix}
|
|
131
|
+
</>
|
|
132
|
+
) : (
|
|
133
|
+
wrapper?.fieldSuffix
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
// register()/reset() may populate an uncontrolled DOM field through its ref.
|
|
137
|
+
// Read it after commits so preset actions reflect the native value as well.
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
if (value === undefined) setUncontrolledValue(nativeRef.current?.value ?? '')
|
|
140
|
+
}, [props, value])
|
|
141
|
+
|
|
142
|
+
// Native form.reset() does not fire input/change. Synchronize the Clear affordance
|
|
143
|
+
// after the browser restores an uncontrolled field's default value.
|
|
144
|
+
useEffect(() => {
|
|
145
|
+
const form = nativeRef.current?.form
|
|
146
|
+
let resetTimer: ReturnType<typeof setTimeout> | undefined
|
|
147
|
+
const onReset = (event: Event) => {
|
|
148
|
+
resetTimer = setTimeout(() => {
|
|
149
|
+
if (!event.defaultPrevented)
|
|
150
|
+
setUncontrolledValue(nativeRef.current?.value ?? '')
|
|
151
|
+
}, 0)
|
|
152
|
+
}
|
|
153
|
+
form?.addEventListener('reset', onReset)
|
|
154
|
+
return () => {
|
|
155
|
+
form?.removeEventListener('reset', onReset)
|
|
156
|
+
clearTimeout(resetTimer)
|
|
157
|
+
}
|
|
158
|
+
}, [])
|
|
159
|
+
|
|
160
|
+
const clear = () => {
|
|
161
|
+
const input = nativeRef.current
|
|
162
|
+
if (!input || input.disabled || input.readOnly) return
|
|
163
|
+
// Dispatch a real input event so onChange, controlled parents and RHF receive
|
|
164
|
+
// the normal native event contract rather than a fabricated change object.
|
|
165
|
+
const view = input.ownerDocument.defaultView
|
|
166
|
+
if (!view) return
|
|
167
|
+
const nativePrototype =
|
|
168
|
+
input.tagName === 'TEXTAREA'
|
|
169
|
+
? view.HTMLTextAreaElement.prototype
|
|
170
|
+
: view.HTMLInputElement.prototype
|
|
171
|
+
Object.getOwnPropertyDescriptor(nativePrototype, 'value')?.set?.call(input, '')
|
|
172
|
+
input.dispatchEvent(new view.Event('input', { bubbles: true }))
|
|
173
|
+
input.focus()
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
let nativeType = providedType ?? 'text'
|
|
177
|
+
if (!providedType && preset === 'phone') nativeType = 'tel'
|
|
178
|
+
if (!providedType && preset === 'search') nativeType = 'search'
|
|
179
|
+
if (preset === 'password') nativeType = showPassword ? 'text' : 'password'
|
|
180
|
+
const iconSize = sizeTokens['icon-size-control']
|
|
181
|
+
let presetLeading: React.ReactNode = prefix
|
|
182
|
+
if (presetLeading === undefined && preset === 'phone') presetLeading = '+370'
|
|
183
|
+
if (presetLeading === undefined && preset === 'search')
|
|
184
|
+
presetLeading = <MagnifyingGlassIcon aria-hidden />
|
|
185
|
+
|
|
186
|
+
let presetTrailing: React.ReactNode = suffix
|
|
187
|
+
if (preset === 'search' && hasValue)
|
|
188
|
+
presetTrailing = (
|
|
189
|
+
<IconButton
|
|
190
|
+
type='button'
|
|
191
|
+
aria-label={t('clear')}
|
|
192
|
+
disabled={disabled || readOnly}
|
|
193
|
+
onClick={clear}
|
|
194
|
+
sx={inputActionStyles}
|
|
195
|
+
>
|
|
196
|
+
<XCircleIcon size={iconSize} aria-hidden />
|
|
197
|
+
</IconButton>
|
|
198
|
+
)
|
|
199
|
+
if (preset === 'password')
|
|
200
|
+
presetTrailing = (
|
|
201
|
+
<IconButton
|
|
202
|
+
type='button'
|
|
203
|
+
aria-label={t('togglePassword')}
|
|
204
|
+
aria-pressed={showPassword}
|
|
205
|
+
disabled={disabled}
|
|
206
|
+
onMouseDown={(event) => event.preventDefault()}
|
|
207
|
+
onClick={() => setShowPassword(!showPassword)}
|
|
208
|
+
sx={inputActionStyles}
|
|
209
|
+
>
|
|
210
|
+
{showPassword ? (
|
|
211
|
+
<EyeSlashIcon size={iconSize} aria-hidden />
|
|
212
|
+
) : (
|
|
213
|
+
<EyeIcon size={iconSize} aria-hidden />
|
|
214
|
+
)}
|
|
215
|
+
</IconButton>
|
|
216
|
+
)
|
|
27
217
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const id = useMemo(() => fieldProps.id ?? uuidv4(), [fieldProps.id])
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<RcSesFormControlWrapper
|
|
35
|
-
id={id}
|
|
36
|
-
errors={errors}
|
|
37
|
-
label={label}
|
|
38
|
-
required={props.required}
|
|
39
|
-
{...slotProps?.wrapper}
|
|
40
|
-
>
|
|
41
|
-
<TextField
|
|
42
|
-
{...fieldProps}
|
|
43
|
-
inputRef={ref}
|
|
44
|
-
fullWidth
|
|
45
|
-
{...slotProps?.field}
|
|
218
|
+
return (
|
|
219
|
+
<RcSesFormControlWrapper
|
|
220
|
+
{...wrapper}
|
|
46
221
|
id={id}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
222
|
+
className={['RcSesTextField-root', wrapper?.className].filter(Boolean).join(' ')}
|
|
223
|
+
label={label}
|
|
224
|
+
required={required}
|
|
225
|
+
description={helperText}
|
|
226
|
+
errors={wrapperErrors}
|
|
227
|
+
errorMessage={providedErrorText}
|
|
228
|
+
fieldSuffix={fieldSuffix}
|
|
229
|
+
>
|
|
230
|
+
<Box
|
|
231
|
+
data-leading-hidden={leading === null || prefix === null || undefined}
|
|
232
|
+
data-trailing-hidden={trailing === null || suffix === null || undefined}
|
|
233
|
+
data-multiline={multiline || undefined}
|
|
234
|
+
sx={textFieldStyles}
|
|
235
|
+
>
|
|
236
|
+
<TextField
|
|
237
|
+
{...fieldProps}
|
|
238
|
+
id={id}
|
|
239
|
+
className={['RcSesTextField-field', className].filter(Boolean).join(' ')}
|
|
240
|
+
sx={consumerStyles(sx)}
|
|
241
|
+
variant='outlined'
|
|
242
|
+
fullWidth
|
|
243
|
+
disabled={disabled}
|
|
244
|
+
required={required}
|
|
245
|
+
multiline={multiline}
|
|
246
|
+
error={isError}
|
|
247
|
+
type={nativeType}
|
|
248
|
+
value={value}
|
|
249
|
+
defaultValue={defaultValue}
|
|
250
|
+
inputRef={handleRef}
|
|
251
|
+
onChange={(event) => {
|
|
252
|
+
setUncontrolledValue(event.target.value)
|
|
253
|
+
onChange?.(event)
|
|
254
|
+
}}
|
|
255
|
+
slotProps={{
|
|
256
|
+
...slotProps,
|
|
257
|
+
input: (ownerState) => {
|
|
258
|
+
const consumer =
|
|
259
|
+
typeof slotProps?.input === 'function'
|
|
260
|
+
? slotProps.input(ownerState)
|
|
261
|
+
: slotProps?.input
|
|
262
|
+
const start = leading === undefined ? presetLeading : leading
|
|
263
|
+
const end = trailing === undefined ? presetTrailing : trailing
|
|
264
|
+
let endAdornment = consumer?.endAdornment
|
|
265
|
+
if (end !== undefined)
|
|
266
|
+
endAdornment = end && (
|
|
267
|
+
<InputAdornment position='end'>{end}</InputAdornment>
|
|
268
|
+
)
|
|
269
|
+
if (loading)
|
|
270
|
+
endAdornment = (
|
|
271
|
+
<InputAdornment position='end'>
|
|
272
|
+
<Box aria-label={t('loading')} role='status'>
|
|
273
|
+
<Box aria-hidden sx={{ display: 'flex' }}>
|
|
274
|
+
<RcSesLoadingSpinner size='medium' color='primary' />
|
|
275
|
+
</Box>
|
|
276
|
+
</Box>
|
|
277
|
+
</InputAdornment>
|
|
278
|
+
)
|
|
279
|
+
return {
|
|
280
|
+
...consumer,
|
|
281
|
+
sx: consumerStyles(consumer?.sx),
|
|
282
|
+
readOnly: readOnly || consumer?.readOnly,
|
|
283
|
+
startAdornment:
|
|
284
|
+
start !== undefined
|
|
285
|
+
? start && <InputAdornment position='start'>{start}</InputAdornment>
|
|
286
|
+
: consumer?.startAdornment,
|
|
287
|
+
endAdornment,
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
htmlInput: (ownerState) => {
|
|
291
|
+
const consumer =
|
|
292
|
+
typeof slotProps?.htmlInput === 'function'
|
|
293
|
+
? slotProps.htmlInput(ownerState)
|
|
294
|
+
: slotProps?.htmlInput
|
|
295
|
+
return {
|
|
296
|
+
...(preset === 'number' ? { inputMode: 'decimal' as const } : {}),
|
|
297
|
+
...consumer,
|
|
298
|
+
'aria-label':
|
|
299
|
+
consumer?.['aria-label'] ??
|
|
300
|
+
((wrapper?.hideLabel || explainer) && typeof label === 'string'
|
|
301
|
+
? label
|
|
302
|
+
: undefined),
|
|
303
|
+
'aria-describedby':
|
|
304
|
+
[
|
|
305
|
+
...new Set(
|
|
306
|
+
[
|
|
307
|
+
describedBy,
|
|
308
|
+
consumer?.['aria-describedby'],
|
|
309
|
+
...supportIds,
|
|
310
|
+
].filter(Boolean),
|
|
311
|
+
),
|
|
312
|
+
].join(' ') || undefined,
|
|
313
|
+
'aria-invalid': isError || consumer?.['aria-invalid'],
|
|
314
|
+
'aria-busy': loading || consumer?.['aria-busy'],
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
}}
|
|
318
|
+
/>
|
|
319
|
+
</Box>
|
|
320
|
+
</RcSesFormControlWrapper>
|
|
321
|
+
)
|
|
322
|
+
},
|
|
323
|
+
)
|
|
52
324
|
|
|
325
|
+
RcSesTextField.displayName = 'RcSesTextField'
|
|
53
326
|
export default RcSesTextField
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Box, Container, Typography } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
4
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
5
|
+
|
|
6
|
+
// Figma's Inner-page-footer binds the Neutrals/200 and Neutrals/950 primitives
|
|
7
|
+
// directly; no role matches.
|
|
8
|
+
const footerTextColor = 'var(--rc-color-neutrals-200)'
|
|
9
|
+
const footerBackground = 'var(--rc-color-neutrals-950)'
|
|
4
10
|
|
|
5
11
|
interface Props {
|
|
6
12
|
text: string
|
|
@@ -10,9 +16,12 @@ function RcSesFooter({ text }: Props) {
|
|
|
10
16
|
return (
|
|
11
17
|
<Box
|
|
12
18
|
sx={{
|
|
13
|
-
backgroundColor:
|
|
14
|
-
px: {
|
|
15
|
-
|
|
19
|
+
backgroundColor: footerBackground,
|
|
20
|
+
px: {
|
|
21
|
+
xs: spacingRoleBasedTokens['space-16'],
|
|
22
|
+
md: spacingRoleBasedTokens['space-32'],
|
|
23
|
+
},
|
|
24
|
+
py: spacingRoleBasedTokens['space-24'],
|
|
16
25
|
textAlign: 'center',
|
|
17
26
|
}}
|
|
18
27
|
>
|
|
@@ -20,11 +29,12 @@ function RcSesFooter({ text }: Props) {
|
|
|
20
29
|
<Typography
|
|
21
30
|
component='div'
|
|
22
31
|
sx={{
|
|
23
|
-
color:
|
|
24
|
-
|
|
32
|
+
color: footerTextColor,
|
|
33
|
+
fontSize: typographyTokens['font-size-body-small'],
|
|
34
|
+
lineHeight: typographyTokens['line-height-body-small'],
|
|
25
35
|
whiteSpace: 'pre-line',
|
|
26
36
|
}}
|
|
27
|
-
variant='
|
|
37
|
+
variant='body2'
|
|
28
38
|
>
|
|
29
39
|
{text}
|
|
30
40
|
</Typography>
|
|
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'
|
|
|
4
4
|
import { ArrowRightIcon, CaretLeftIcon } from '@/assets/icons/phosphorIcons'
|
|
5
5
|
import Button from '@/components/common/Button'
|
|
6
6
|
import palette from '@/theme/palette'
|
|
7
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
7
8
|
|
|
8
9
|
interface Props {
|
|
9
10
|
onDiscard: () => void
|
|
@@ -75,7 +76,10 @@ function ServiceFormActions({
|
|
|
75
76
|
variant='text'
|
|
76
77
|
size='small'
|
|
77
78
|
color='grey'
|
|
78
|
-
sx={{
|
|
79
|
+
sx={{
|
|
80
|
+
fontWeight: typographyTokens['font-weight-button-regular'],
|
|
81
|
+
textDecoration: 'underline',
|
|
82
|
+
}}
|
|
79
83
|
onClick={() => onDiscard()}
|
|
80
84
|
>
|
|
81
85
|
{t('discard')}
|
|
@@ -3,7 +3,7 @@ import { ContainerProps } from '@mui/system'
|
|
|
3
3
|
import React, { useMemo } from 'react'
|
|
4
4
|
|
|
5
5
|
import useAccordionController from '@/components/common/Accordion/hooks/useAccordionController'
|
|
6
|
-
import
|
|
6
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
7
7
|
|
|
8
8
|
import ServiceWizardStepper from '../../ServiceWizardStepper'
|
|
9
9
|
import AccordionCollapseControls from './components/AccordionCollapseControls'
|
|
@@ -53,10 +53,10 @@ function RcSesServiceFormContainer({
|
|
|
53
53
|
maxWidth={showProgressStepper ? 'lg' : 'md'}
|
|
54
54
|
{...slotProps?.container}
|
|
55
55
|
sx={{
|
|
56
|
-
backgroundColor:
|
|
56
|
+
backgroundColor: colorTokens['surface-base'],
|
|
57
57
|
pb: { md: 8 },
|
|
58
58
|
pt: { xs: 0, md: 6 },
|
|
59
|
-
px: {
|
|
59
|
+
px: { md: 3 },
|
|
60
60
|
...slotProps?.container?.sx,
|
|
61
61
|
}}
|
|
62
62
|
>
|
|
@@ -2,8 +2,10 @@ import { Box, Container, Typography } from '@mui/material'
|
|
|
2
2
|
import React, { type CSSProperties } from 'react'
|
|
3
3
|
|
|
4
4
|
import RcSesBreadcrumbs from '@/components/common/Breadcrumbs'
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
6
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
7
|
+
import { spacingTokens } from '@/theme/spacingTokens'
|
|
8
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
7
9
|
|
|
8
10
|
interface Props {
|
|
9
11
|
breadcrumbsProps: React.ComponentProps<typeof RcSesBreadcrumbs>
|
|
@@ -15,15 +17,16 @@ function ServiceHeader({
|
|
|
15
17
|
breadcrumbsProps,
|
|
16
18
|
children,
|
|
17
19
|
title,
|
|
18
|
-
backgroundColor =
|
|
20
|
+
backgroundColor = colorTokens['surface-base'],
|
|
19
21
|
}: Props) {
|
|
20
22
|
return (
|
|
21
23
|
<Box sx={{ backgroundColor }}>
|
|
22
24
|
<Container
|
|
25
|
+
disableGutters
|
|
23
26
|
sx={{
|
|
24
|
-
pb:
|
|
25
|
-
pt:
|
|
26
|
-
px: '
|
|
27
|
+
pb: spacingTokens['spacing-aliases-header-padding-bottom'],
|
|
28
|
+
pt: spacingTokens['spacing-aliases-header-padding-top'],
|
|
29
|
+
px: spacingTokens['spacing-aliases-header-padding-x'],
|
|
27
30
|
display: 'flex',
|
|
28
31
|
justifyContent: 'center',
|
|
29
32
|
flexDirection: 'column',
|
|
@@ -32,16 +35,18 @@ function ServiceHeader({
|
|
|
32
35
|
<RcSesBreadcrumbs
|
|
33
36
|
{...breadcrumbsProps}
|
|
34
37
|
sx={{
|
|
35
|
-
pb:
|
|
36
|
-
fontSize: '0.75rem',
|
|
37
|
-
lineHeight: '1.25rem',
|
|
38
|
+
pb: spacingRoleBasedTokens['space-6'],
|
|
38
39
|
}}
|
|
39
40
|
/>
|
|
40
41
|
|
|
41
42
|
<Typography
|
|
42
43
|
variant='h1'
|
|
43
44
|
sx={{
|
|
44
|
-
|
|
45
|
+
'&&': {
|
|
46
|
+
fontSize: typographyTokens['font-size-heading-h1'],
|
|
47
|
+
lineHeight: typographyTokens['line-height-heading-h1'],
|
|
48
|
+
letterSpacing: typographyTokens['letter-spacing-heading-h1'],
|
|
49
|
+
},
|
|
45
50
|
}}
|
|
46
51
|
>
|
|
47
52
|
{title}
|
|
@@ -52,17 +57,12 @@ function ServiceHeader({
|
|
|
52
57
|
sx={{
|
|
53
58
|
display: 'flex',
|
|
54
59
|
flexDirection: 'column',
|
|
55
|
-
mt:
|
|
56
|
-
rowGap: '
|
|
60
|
+
mt: spacingRoleBasedTokens['space-8'],
|
|
61
|
+
rowGap: spacingRoleBasedTokens['space-10'],
|
|
57
62
|
|
|
58
63
|
'.MuiTypography-body1': {
|
|
59
|
-
fontSize: '
|
|
60
|
-
lineHeight: '
|
|
61
|
-
|
|
62
|
-
[theme.breakpoints.down('md')]: {
|
|
63
|
-
fontSize: '.8125rem',
|
|
64
|
-
lineHeight: '1.125rem',
|
|
65
|
-
},
|
|
64
|
+
fontSize: typographyTokens['font-size-body-large'],
|
|
65
|
+
lineHeight: typographyTokens['line-height-body-large'],
|
|
66
66
|
},
|
|
67
67
|
}}
|
|
68
68
|
>
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
.ServiceWizardStepper-MobileStepperWrapper {
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
|
-
padding: 0
|
|
9
|
-
gap:
|
|
8
|
+
padding: var(--rc-space-0) var(--rc-space-20);
|
|
9
|
+
gap: var(--rc-space-12);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.ServiceWizardStepper-NavSlot {
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
13
|
+
width: var(--rc-space-36);
|
|
14
|
+
height: var(--rc-space-36);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ServiceWizardStepper-MobileStepperContent {
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.MobileStepperWrapper {
|
|
22
|
-
gap:
|
|
22
|
+
gap: var(--rc-space-12);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ServiceWizardStepper .MuiStep-root {
|
|
26
|
-
padding-left:
|
|
27
|
-
padding-right:
|
|
26
|
+
padding-left: var(--rc-space-0);
|
|
27
|
+
padding-right: var(--rc-space-0);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.ServiceWizardStepper .MuiStep-root:first-child,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.ServiceWizardStepper.MuiStepper-vertical .MuiStep-root {
|
|
36
|
-
margin-bottom:
|
|
36
|
+
margin-bottom: var(--rc-space-10);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ServiceWizardStepper-horizontal .MuiStep-root:first-child .MuiStepLabel-root {
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.ServiceWizardStepper.MuiStepper-horizontal .MuiStepConnector-line {
|
|
75
|
-
border-top-width:
|
|
76
|
-
border-radius:
|
|
75
|
+
border-top-width: var(--rc-stroke-2);
|
|
76
|
+
border-radius: var(--rc-radius-full);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.ServiceWizardStepper.MuiStepper-vertical .MuiStepConnector-line {
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import styled from '@emotion/styled'
|
|
2
2
|
import { StepConnector as MuiStepConnector, stepConnectorClasses } from '@mui/material'
|
|
3
3
|
|
|
4
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
4
5
|
import theme from '@/theme/light'
|
|
5
|
-
import
|
|
6
|
+
import { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
7
|
+
|
|
8
|
+
import stepperColors from './stepperTokens'
|
|
6
9
|
|
|
7
10
|
const StepConnector = styled(MuiStepConnector)(() => ({
|
|
8
11
|
[`&.${stepConnectorClasses.alternativeLabel}`]: {
|
|
9
|
-
top: 12,
|
|
12
|
+
top: spacingRoleBasedTokens['space-12'],
|
|
10
13
|
[theme.breakpoints.up('md')]: {
|
|
11
14
|
top: 9,
|
|
12
15
|
},
|
|
13
16
|
},
|
|
14
17
|
[`&.${stepConnectorClasses.active}`]: {
|
|
15
18
|
[`& .${stepConnectorClasses.line}`]: {
|
|
16
|
-
borderColor:
|
|
19
|
+
borderColor: stepperColors.progress,
|
|
17
20
|
},
|
|
18
21
|
},
|
|
19
22
|
[`&.${stepConnectorClasses.completed}`]: {
|
|
20
23
|
[`& .${stepConnectorClasses.line}`]: {
|
|
21
|
-
borderColor:
|
|
24
|
+
borderColor: stepperColors.progress,
|
|
22
25
|
},
|
|
23
26
|
},
|
|
24
27
|
[`& .${stepConnectorClasses.line}`]: {
|
|
25
|
-
borderColor:
|
|
28
|
+
borderColor: colorTokens['border-default'],
|
|
26
29
|
},
|
|
27
30
|
}))
|
|
28
31
|
|