@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,5 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components": {
|
|
3
|
+
"RcSesTextField": {
|
|
4
|
+
"clear": "Clear value",
|
|
5
|
+
"togglePassword": "Show password",
|
|
6
|
+
"explain": "Help: {{label}}",
|
|
7
|
+
"field": "field",
|
|
8
|
+
"loading": "Loading"
|
|
9
|
+
},
|
|
10
|
+
"DataPagination": {
|
|
11
|
+
"navigation": "Pagination",
|
|
12
|
+
"page": "Go to page {{page}}",
|
|
13
|
+
"previous": "Previous page",
|
|
14
|
+
"next": "Next page",
|
|
15
|
+
"previousText": "Previous",
|
|
16
|
+
"nextText": "Next",
|
|
17
|
+
"loading": "Loading records",
|
|
18
|
+
"showMore": "Show more",
|
|
19
|
+
"showLess": "Show less"
|
|
20
|
+
},
|
|
3
21
|
"RcSesAlert": {
|
|
4
22
|
"close": "Close"
|
|
5
23
|
},
|
|
@@ -22,11 +40,34 @@
|
|
|
22
40
|
"openCalendar": "Open datepicker calendar"
|
|
23
41
|
},
|
|
24
42
|
"prevYear": "Previous year",
|
|
25
|
-
"nextYear": "Next year"
|
|
43
|
+
"nextYear": "Next year",
|
|
44
|
+
"range": {
|
|
45
|
+
"calendar": "Choose a date range",
|
|
46
|
+
"start": "Range start",
|
|
47
|
+
"end": "Range end",
|
|
48
|
+
"inRange": "Part of selected range",
|
|
49
|
+
"preview": "Range preview",
|
|
50
|
+
"chooseStart": "Choose the start date",
|
|
51
|
+
"chooseEnd": "From {{start}}. Choose the end date.",
|
|
52
|
+
"selected": "From {{start}} to {{end}}"
|
|
53
|
+
},
|
|
54
|
+
"views": {
|
|
55
|
+
"calendar": "Calendar view",
|
|
56
|
+
"months": "Months view",
|
|
57
|
+
"years": "Years view",
|
|
58
|
+
"chooseMonth": "Choose month",
|
|
59
|
+
"chooseYear": "Choose year",
|
|
60
|
+
"returnMonths": "Return to months",
|
|
61
|
+
"previousYears": "Previous 12 years",
|
|
62
|
+
"nextYears": "Next 12 years"
|
|
63
|
+
}
|
|
26
64
|
},
|
|
27
65
|
|
|
28
66
|
"RcSesFileDropzone": {
|
|
29
|
-
"label": "Drag and drop file over this area or <1>click here</1> to browse"
|
|
67
|
+
"label": "Drag and drop file over this area or <1>click here</1> to browse",
|
|
68
|
+
"aria": {
|
|
69
|
+
"dropzoneLabel": "File upload area"
|
|
70
|
+
}
|
|
30
71
|
},
|
|
31
72
|
|
|
32
73
|
"RcSesFileUpload": {
|
|
@@ -60,8 +101,10 @@
|
|
|
60
101
|
"RcSesSelect": {
|
|
61
102
|
"searchPlaceholder": "Search",
|
|
62
103
|
"selectAllLabel": "All",
|
|
104
|
+
"placeholder": "Select",
|
|
63
105
|
"noOptionsText": "No results found",
|
|
64
|
-
"loadingText": "Loading..."
|
|
106
|
+
"loadingText": "Loading...",
|
|
107
|
+
"hiddenTagOverflow": "and {{count}} more"
|
|
65
108
|
},
|
|
66
109
|
|
|
67
110
|
"RcSesSearchInput": {
|
|
@@ -95,7 +138,8 @@
|
|
|
95
138
|
|
|
96
139
|
"RcSesBottomSheet": {
|
|
97
140
|
"aria": {
|
|
98
|
-
"back": "Back"
|
|
141
|
+
"back": "Back",
|
|
142
|
+
"close": "Close"
|
|
99
143
|
}
|
|
100
144
|
},
|
|
101
145
|
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components": {
|
|
3
|
+
"RcSesTextField": {
|
|
4
|
+
"clear": "Išvalyti reikšmę",
|
|
5
|
+
"togglePassword": "Rodyti slaptažodį",
|
|
6
|
+
"explain": "Paaiškinimas: {{label}}",
|
|
7
|
+
"field": "laukas",
|
|
8
|
+
"loading": "Kraunama"
|
|
9
|
+
},
|
|
10
|
+
"DataPagination": {
|
|
11
|
+
"navigation": "Puslapiavimas",
|
|
12
|
+
"page": "Eiti į {{page}} puslapį",
|
|
13
|
+
"previous": "Ankstesnis puslapis",
|
|
14
|
+
"next": "Kitas puslapis",
|
|
15
|
+
"previousText": "Atgal",
|
|
16
|
+
"nextText": "Kitas",
|
|
17
|
+
"loading": "Įkeliami įrašai",
|
|
18
|
+
"showMore": "Rodyti daugiau",
|
|
19
|
+
"showLess": "Rodyti mažiau"
|
|
20
|
+
},
|
|
3
21
|
"RcSesAlert": {
|
|
4
22
|
"close": "Uždaryti"
|
|
5
23
|
},
|
|
@@ -22,11 +40,34 @@
|
|
|
22
40
|
"openCalendar": "Atverti datos pasirinkimo kalendorių"
|
|
23
41
|
},
|
|
24
42
|
"prevYear": "Ankstesni metai",
|
|
25
|
-
"nextYear": "Ateinantys metai"
|
|
43
|
+
"nextYear": "Ateinantys metai",
|
|
44
|
+
"range": {
|
|
45
|
+
"calendar": "Pasirinkite datos intervalą",
|
|
46
|
+
"start": "Intervalo pradžia",
|
|
47
|
+
"end": "Intervalo pabaiga",
|
|
48
|
+
"inRange": "Pasirinkto intervalo dalis",
|
|
49
|
+
"preview": "Intervalo peržiūra",
|
|
50
|
+
"chooseStart": "Pasirinkite pradžios datą",
|
|
51
|
+
"chooseEnd": "Nuo {{start}}. Pasirinkite pabaigos datą.",
|
|
52
|
+
"selected": "Nuo {{start}} iki {{end}}"
|
|
53
|
+
},
|
|
54
|
+
"views": {
|
|
55
|
+
"calendar": "Kalendoriaus vaizdas",
|
|
56
|
+
"months": "Mėnesių vaizdas",
|
|
57
|
+
"years": "Metų vaizdas",
|
|
58
|
+
"chooseMonth": "Pasirinkti mėnesį",
|
|
59
|
+
"chooseYear": "Pasirinkti metus",
|
|
60
|
+
"returnMonths": "Grįžti į mėnesius",
|
|
61
|
+
"previousYears": "Ankstesni 12 metų",
|
|
62
|
+
"nextYears": "Kiti 12 metų"
|
|
63
|
+
}
|
|
26
64
|
},
|
|
27
65
|
|
|
28
66
|
"RcSesFileDropzone": {
|
|
29
|
-
"label": "Nutempkite failą čia arba <1>įkelkite</1> iš kompiuterio"
|
|
67
|
+
"label": "Nutempkite failą čia arba <1>įkelkite</1> iš kompiuterio",
|
|
68
|
+
"aria": {
|
|
69
|
+
"dropzoneLabel": "Failų įkėlimo sritis"
|
|
70
|
+
}
|
|
30
71
|
},
|
|
31
72
|
|
|
32
73
|
"RcSesFileUpload": {
|
|
@@ -60,8 +101,10 @@
|
|
|
60
101
|
"RcSesSelect": {
|
|
61
102
|
"searchPlaceholder": "Ieškoti",
|
|
62
103
|
"selectAllLabel": "Visi",
|
|
104
|
+
"placeholder": "Pasirinkite",
|
|
63
105
|
"noOptionsText": "Rezultatų nerasta",
|
|
64
|
-
"loadingText": "Kraunama..."
|
|
106
|
+
"loadingText": "Kraunama...",
|
|
107
|
+
"hiddenTagOverflow": "ir dar {{count}}"
|
|
65
108
|
},
|
|
66
109
|
|
|
67
110
|
"RcSesSearchInput": {
|
|
@@ -95,7 +138,8 @@
|
|
|
95
138
|
|
|
96
139
|
"RcSesBottomSheet": {
|
|
97
140
|
"aria": {
|
|
98
|
-
"back": "Atgal"
|
|
141
|
+
"back": "Atgal",
|
|
142
|
+
"close": "Uždaryti"
|
|
99
143
|
}
|
|
100
144
|
},
|
|
101
145
|
|
package/src/library/index.ts
CHANGED
|
@@ -17,10 +17,13 @@ import RcSesCard from '@/components/common/Card'
|
|
|
17
17
|
import RcSesCardShell from '@/components/common/CardShell'
|
|
18
18
|
import RcSesCardFooter from '@/components/common/CardShell/CardFooter'
|
|
19
19
|
import DataPagination from '@/components/common/DataPagination'
|
|
20
|
+
import RcSesDivider from '@/components/common/Divider'
|
|
21
|
+
import RcSesEmptyState from '@/components/common/EmptyState'
|
|
20
22
|
import RcSesFilterChip from '@/components/common/FilterChip'
|
|
21
23
|
import RcSesIconWithCircularBackground from '@/components/common/IconWithCircularBackground'
|
|
22
24
|
import RcSesIconWithSquareBackground from '@/components/common/IconWithSquareBackground'
|
|
23
25
|
import RcSesImageCard from '@/components/common/ImageCard'
|
|
26
|
+
import RcSesLinkTile from '@/components/common/LinkTile'
|
|
24
27
|
import ListWithIcons from '@/components/common/ListWithIcons'
|
|
25
28
|
import RcSesSegmentedControl from '@/components/common/SegmentedControl'
|
|
26
29
|
import RcSesServiceLinks from '@/components/common/ServiceLinks'
|
|
@@ -70,6 +73,7 @@ import RcSesDrawer from '@/components/overlays/Drawer'
|
|
|
70
73
|
import RcSesModal from '@/components/overlays/Modal'
|
|
71
74
|
import RcSesTheme from '@/theme/light'
|
|
72
75
|
import RcSesPalette from '@/theme/palette'
|
|
76
|
+
import '@/theme/tokens.css'
|
|
73
77
|
|
|
74
78
|
import SelectableCardList from '../components/common/SelectableCardList'
|
|
75
79
|
|
|
@@ -80,10 +84,18 @@ declare module '@mui/x-date-pickers/models' {
|
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
export { RcSesPalette, RcSesTheme }
|
|
87
|
+
export { createRcSesTokenTheme } from '@/theme/tokenTheme'
|
|
88
|
+
export type { RcSesTokenThemeOptions, RcSesNativeTheme } from '@/theme/tokenTheme'
|
|
83
89
|
export { RcSesAccordion, useAccordionController }
|
|
90
|
+
export type { AccordionProps, AccordionMenuItem } from '@/components/common/Accordion'
|
|
91
|
+
export { RcSesLinkTile }
|
|
92
|
+
export type { LinkTileProps } from '@/components/common/LinkTile'
|
|
93
|
+
export { RcSesDivider }
|
|
94
|
+
export type { DividerProps } from '@/components/common/Divider'
|
|
84
95
|
export { RcSesAdvancedList, RcSesAdvancedListItem, RcSesAdvancedListItemShell }
|
|
85
96
|
export {
|
|
86
97
|
RcSesAlert,
|
|
98
|
+
RcSesEmptyState,
|
|
87
99
|
RcSesBadge,
|
|
88
100
|
RcSesFilterChip,
|
|
89
101
|
RcSesBreadcrumbs,
|
|
@@ -110,8 +122,22 @@ export {
|
|
|
110
122
|
export { RcSesSegmentedControl }
|
|
111
123
|
export { RcSesSideNavLayout }
|
|
112
124
|
export { RcSesCheckbox, RcSesCheckboxFormControl, RcSesSimpleCheckbox }
|
|
125
|
+
export { default as RcSesCheckboxMark } from '@/components/common/CheckboxMark'
|
|
126
|
+
export type {
|
|
127
|
+
EmptyStateProps,
|
|
128
|
+
EmptyStateType,
|
|
129
|
+
EmptyStateSize,
|
|
130
|
+
} from '@/components/common/EmptyState'
|
|
131
|
+
export type { CheckboxMarkProps } from '@/components/common/CheckboxMark'
|
|
132
|
+
export { default as RcSesRadioMark } from '@/components/common/RadioMark'
|
|
133
|
+
export type { RadioMarkProps } from '@/components/common/RadioMark'
|
|
113
134
|
export { useSnackbar }
|
|
114
135
|
export { RcSesDatepicker }
|
|
136
|
+
export type {
|
|
137
|
+
DatepickerProps,
|
|
138
|
+
DateRangeValue,
|
|
139
|
+
RangeDatepickerProps,
|
|
140
|
+
} from '@/components/form/inputs/Datepicker'
|
|
115
141
|
export { RcSesFileUpload }
|
|
116
142
|
export { RcSesFileDropzone }
|
|
117
143
|
export { RcSesNumberStepper }
|
|
@@ -123,7 +149,11 @@ export { RcSesSelect }
|
|
|
123
149
|
export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper }
|
|
124
150
|
export { RcSesTooltip }
|
|
125
151
|
export { RcSesTextField }
|
|
152
|
+
export type { TextFieldProps, TextFieldPreset } from '@/components/form/inputs/TextField'
|
|
126
153
|
export { DataPagination }
|
|
154
|
+
export type { DataPaginationProps } from '@/components/common/DataPagination'
|
|
155
|
+
export { default as ExpandButton } from '@/components/common/DataPagination/components/ExpandButton'
|
|
156
|
+
export type { ExpandButtonProps } from '@/components/common/DataPagination/components/ExpandButton'
|
|
127
157
|
export { ListWithIcons }
|
|
128
158
|
export { RcSesServiceLinks }
|
|
129
159
|
export { ServiceWizardStepper }
|
|
@@ -146,3 +176,23 @@ export { RcSesIconWithCircularBackground }
|
|
|
146
176
|
export { RcSesIconWithSquareBackground }
|
|
147
177
|
|
|
148
178
|
export * from './icons'
|
|
179
|
+
|
|
180
|
+
export { colorPrimitives, colorTokens } from '@/theme/colorTokens'
|
|
181
|
+
|
|
182
|
+
export { typographyTokens, typographyRoleVariants } from '@/theme/typographyTokens'
|
|
183
|
+
export type {
|
|
184
|
+
RcSesTypographyRole,
|
|
185
|
+
RcSesNamedTypographyVariant,
|
|
186
|
+
} from '@/theme/typographyTokens'
|
|
187
|
+
|
|
188
|
+
export { spacingRoleBasedTokens } from '@/theme/spacingRoleBasedTokens'
|
|
189
|
+
|
|
190
|
+
export { layoutTokens } from '@/theme/layoutTokens'
|
|
191
|
+
|
|
192
|
+
export { borderTokens } from '@/theme/borderTokens'
|
|
193
|
+
|
|
194
|
+
export { sizeTokens } from '@/theme/sizeTokens'
|
|
195
|
+
|
|
196
|
+
export { effectTokens } from '@/theme/effectTokens'
|
|
197
|
+
|
|
198
|
+
export { backdropTokens } from '@/theme/backdropTokens'
|
|
@@ -8,6 +8,7 @@ import FieldPreview from '@/components/storybook/FieldPreview'
|
|
|
8
8
|
import FieldView from '@/components/storybook/FieldView'
|
|
9
9
|
import Fields from '@/components/storybook/Fields'
|
|
10
10
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
11
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
11
12
|
|
|
12
13
|
const variants: RcSesBadgeProps['variant'][] = [
|
|
13
14
|
'neutral',
|
|
@@ -99,7 +100,7 @@ export const AllCombinations: Story = {
|
|
|
99
100
|
<Typography
|
|
100
101
|
variant='body2'
|
|
101
102
|
sx={{
|
|
102
|
-
fontWeight:
|
|
103
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
103
104
|
gridRow: 'span 2',
|
|
104
105
|
}}
|
|
105
106
|
>
|
|
@@ -6,7 +6,8 @@ import { fn } from 'storybook/test'
|
|
|
6
6
|
import { PlusBoldIcon } from '@/assets/icons/phosphorIcons'
|
|
7
7
|
import Button from '@/components/common/Button'
|
|
8
8
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
9
|
-
import {
|
|
9
|
+
import { colorTokens as colors } from '@/theme/colorTokens'
|
|
10
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
10
11
|
import { ButtonProps } from '@/types/buttons/ButtonProps'
|
|
11
12
|
|
|
12
13
|
const variantOptions: ButtonProps['variant'][] = ['contained', 'outlined', 'link', 'text']
|
|
@@ -64,6 +65,97 @@ export const PrimaryContained: Story = {
|
|
|
64
65
|
},
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
// The names describe DS roles; the component keeps its existing MUI props.
|
|
69
|
+
const designRoles = [
|
|
70
|
+
{ name: 'Primary', variant: 'contained', color: 'primary' },
|
|
71
|
+
{ name: 'Secondary', variant: 'outlined', color: 'grey' },
|
|
72
|
+
{ name: 'Error', variant: 'contained', color: 'error' },
|
|
73
|
+
{ name: 'Link', variant: 'link', color: 'primary' },
|
|
74
|
+
] as const
|
|
75
|
+
|
|
76
|
+
export const DesignCombinations: Story = {
|
|
77
|
+
parameters: { layout: 'padded' },
|
|
78
|
+
render: () => (
|
|
79
|
+
<Box sx={{ display: 'grid', gap: 4 }}>
|
|
80
|
+
{designRoles.flatMap((role) =>
|
|
81
|
+
(['medium', 'small'] as const).map((size) => (
|
|
82
|
+
<Box key={`${role.name}-${size}`}>
|
|
83
|
+
<Typography sx={{ mb: 2 }}>
|
|
84
|
+
{role.name} — {size === 'medium' ? 'Regular' : 'Small'}
|
|
85
|
+
</Typography>
|
|
86
|
+
<Box
|
|
87
|
+
sx={{
|
|
88
|
+
display: 'grid',
|
|
89
|
+
gridTemplateColumns: 'repeat(4, max-content)',
|
|
90
|
+
gap: 2,
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
{(['none', 'left', 'right', 'only'] as const).map((position) => (
|
|
95
|
+
<Typography key={position}>{position}</Typography>
|
|
96
|
+
))}
|
|
97
|
+
{(['rest', 'disabled', 'loading'] as const).flatMap((state) =>
|
|
98
|
+
(['none', 'left', 'right', 'only'] as const).map((position) => (
|
|
99
|
+
<Button
|
|
100
|
+
key={`${state}-${position}`}
|
|
101
|
+
data-testid={`ds-${role.name}-${size}-${state}-${position}`}
|
|
102
|
+
variant={role.variant}
|
|
103
|
+
color={role.color}
|
|
104
|
+
size={size}
|
|
105
|
+
disabled={state === 'disabled'}
|
|
106
|
+
loading={state === 'loading'}
|
|
107
|
+
loadingPosition={
|
|
108
|
+
position === 'only' || position === 'none'
|
|
109
|
+
? 'center'
|
|
110
|
+
: ({ left: 'start', right: 'end' } as const)[position]
|
|
111
|
+
}
|
|
112
|
+
iconOnly={position === 'only'}
|
|
113
|
+
aria-label={position === 'only' ? 'Pridėti' : undefined}
|
|
114
|
+
startIcon={position === 'left' ? <PlusBoldIcon /> : undefined}
|
|
115
|
+
endIcon={position === 'right' ? <PlusBoldIcon /> : undefined}
|
|
116
|
+
>
|
|
117
|
+
{position === 'only' ? <PlusBoldIcon /> : 'Button'}
|
|
118
|
+
</Button>
|
|
119
|
+
)),
|
|
120
|
+
)}
|
|
121
|
+
</Box>
|
|
122
|
+
</Box>
|
|
123
|
+
)),
|
|
124
|
+
)}
|
|
125
|
+
</Box>
|
|
126
|
+
),
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export const TokenBindings: Story = {
|
|
130
|
+
parameters: { layout: 'padded' },
|
|
131
|
+
render: () => (
|
|
132
|
+
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
|
133
|
+
<Button startIcon={<PlusBoldIcon />}>Pridėti pasirinktas (4)</Button>
|
|
134
|
+
<Button variant='outlined' color='grey'>
|
|
135
|
+
Atšaukti
|
|
136
|
+
</Button>
|
|
137
|
+
<Button color='error'>Pašalinti</Button>
|
|
138
|
+
<Button variant='link'>Skaityti daugiau</Button>
|
|
139
|
+
</Box>
|
|
140
|
+
),
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export const TokenOverrides: Story = {
|
|
144
|
+
tags: ['no-snapshot'],
|
|
145
|
+
render: () => (
|
|
146
|
+
<Box sx={{ display: 'flex', gap: 2 }}>
|
|
147
|
+
<Button
|
|
148
|
+
iconOnly
|
|
149
|
+
aria-label='Custom button'
|
|
150
|
+
sx={{ width: '5rem', height: '4rem', borderRadius: '3px' }}
|
|
151
|
+
>
|
|
152
|
+
<PlusBoldIcon />
|
|
153
|
+
</Button>
|
|
154
|
+
<Button sx={{ px: 0 }}>Custom padding</Button>
|
|
155
|
+
</Box>
|
|
156
|
+
),
|
|
157
|
+
}
|
|
158
|
+
|
|
67
159
|
const disableColorContrast = {
|
|
68
160
|
a11y: {
|
|
69
161
|
config: {
|
|
@@ -162,7 +254,7 @@ const CombinationsGrid = ({
|
|
|
162
254
|
onDark?: boolean
|
|
163
255
|
}) => {
|
|
164
256
|
const rowSpans = rowSpansFor(combos)
|
|
165
|
-
const labelColor = onDark ?
|
|
257
|
+
const labelColor = onDark ? colors['text-inverse'] : colors['text-secondary']
|
|
166
258
|
return (
|
|
167
259
|
<Box
|
|
168
260
|
sx={{
|
|
@@ -196,8 +288,8 @@ const CombinationsGrid = ({
|
|
|
196
288
|
<Typography
|
|
197
289
|
variant='body2'
|
|
198
290
|
sx={{
|
|
199
|
-
color: onDark ?
|
|
200
|
-
fontWeight:
|
|
291
|
+
color: onDark ? colors['text-inverse'] : undefined,
|
|
292
|
+
fontWeight: typographyTokens['font-weight-semibold'],
|
|
201
293
|
gridRow: `span ${rowSpan}`,
|
|
202
294
|
}}
|
|
203
295
|
>
|
|
@@ -248,10 +340,10 @@ export const DarkSurfaceCombinations: Story = {
|
|
|
248
340
|
render: () => (
|
|
249
341
|
<Box
|
|
250
342
|
sx={{
|
|
251
|
-
backgroundColor:
|
|
343
|
+
backgroundColor: colors['surface-inverse'],
|
|
252
344
|
borderRadius: 1,
|
|
253
345
|
p: 3,
|
|
254
|
-
color:
|
|
346
|
+
color: colors['text-inverse'],
|
|
255
347
|
width: 'fit-content',
|
|
256
348
|
minWidth: '100%',
|
|
257
349
|
}}
|
|
@@ -265,3 +357,29 @@ export const DarkSurfaceCombinations: Story = {
|
|
|
265
357
|
</Box>
|
|
266
358
|
),
|
|
267
359
|
}
|
|
360
|
+
|
|
361
|
+
export const LinkFocus: Story = {
|
|
362
|
+
tags: ['no-snapshot'],
|
|
363
|
+
parameters: { layout: 'padded' },
|
|
364
|
+
render: () => (
|
|
365
|
+
<Box sx={{ display: 'grid', gap: 2, justifyItems: 'start' }}>
|
|
366
|
+
<Typography>
|
|
367
|
+
Click with the mouse, release, then move the pointer away. The current link must
|
|
368
|
+
return to its base color, even while focused. Then use Tab to reach it: a visible
|
|
369
|
+
keyboard focus indicator must appear.
|
|
370
|
+
</Typography>
|
|
371
|
+
<Typography>Current library behavior</Typography>
|
|
372
|
+
<Button variant='link'>Current link</Button>
|
|
373
|
+
<Button variant='link' disabled>
|
|
374
|
+
Disabled link
|
|
375
|
+
</Button>
|
|
376
|
+
<Typography>Before: local simulation only, not library behavior</Typography>
|
|
377
|
+
<Button
|
|
378
|
+
variant='link'
|
|
379
|
+
sx={{ '&:not(.Mui-disabled):focus': { color: colors['text-default'] } }}
|
|
380
|
+
>
|
|
381
|
+
Before: retained focus color
|
|
382
|
+
</Button>
|
|
383
|
+
</Box>
|
|
384
|
+
),
|
|
385
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Box, Checkbox, FormControlLabel, Stack, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
import RcSesCheckboxMark from '@/components/common/CheckboxMark'
|
|
5
|
+
|
|
6
|
+
const types = ['unchecked', 'checked', 'indeterminate'] as const
|
|
7
|
+
const meta: Meta<typeof RcSesCheckboxMark> = {
|
|
8
|
+
title: 'Atoms/CheckboxMark',
|
|
9
|
+
component: RcSesCheckboxMark,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component:
|
|
15
|
+
'Decorative 24px Checkbox-mark. Add an accessible native input, label and interaction states in the consuming control. The mark itself is hidden from assistive technology.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
argTypes: { type: { control: 'select', options: types } },
|
|
20
|
+
}
|
|
21
|
+
export default meta
|
|
22
|
+
type Story = StoryObj<typeof RcSesCheckboxMark>
|
|
23
|
+
|
|
24
|
+
export const Main: Story = { args: { type: 'unchecked', disabled: false } }
|
|
25
|
+
|
|
26
|
+
export const AllStates: Story = {
|
|
27
|
+
render: () => (
|
|
28
|
+
<Stack spacing={3}>
|
|
29
|
+
{[false, true].map((disabled) => (
|
|
30
|
+
<Stack key={String(disabled)} direction='row' spacing={4}>
|
|
31
|
+
{types.map((type) => (
|
|
32
|
+
<Stack key={type} spacing={1} sx={{ alignItems: 'center' }}>
|
|
33
|
+
<RcSesCheckboxMark type={type} disabled={disabled} />
|
|
34
|
+
<Typography variant='caption'>
|
|
35
|
+
{type}
|
|
36
|
+
{disabled ? ' / disabled' : ''}
|
|
37
|
+
</Typography>
|
|
38
|
+
</Stack>
|
|
39
|
+
))}
|
|
40
|
+
</Stack>
|
|
41
|
+
))}
|
|
42
|
+
</Stack>
|
|
43
|
+
),
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const TokenOverrides: Story = {
|
|
47
|
+
render: () => (
|
|
48
|
+
<Box
|
|
49
|
+
sx={{
|
|
50
|
+
'--rc-color-control-selected': '#654321',
|
|
51
|
+
'--rc-color-control-border': '#654321',
|
|
52
|
+
'--rc-icon-size-control': '22px',
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<RcSesCheckboxMark /> <RcSesCheckboxMark type='checked' />{' '}
|
|
56
|
+
<RcSesCheckboxMark type='indeterminate' />
|
|
57
|
+
</Box>
|
|
58
|
+
),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const NativeControls: Story = {
|
|
62
|
+
render: () => (
|
|
63
|
+
<Stack>
|
|
64
|
+
<FormControlLabel control={<Checkbox />} label='Checkbox' />
|
|
65
|
+
<FormControlLabel control={<Checkbox defaultChecked />} label='Checked checkbox' />
|
|
66
|
+
<FormControlLabel control={<Checkbox indeterminate />} label='Mixed checkbox' />
|
|
67
|
+
<FormControlLabel
|
|
68
|
+
disabled
|
|
69
|
+
control={<Checkbox />}
|
|
70
|
+
label='Inherited disabled checkbox'
|
|
71
|
+
/>
|
|
72
|
+
<FormControlLabel
|
|
73
|
+
disabled
|
|
74
|
+
control={<Checkbox defaultChecked />}
|
|
75
|
+
label='Inherited disabled checked checkbox'
|
|
76
|
+
/>
|
|
77
|
+
</Stack>
|
|
78
|
+
),
|
|
79
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
List,
|
|
4
|
+
ListItem,
|
|
5
|
+
ListItemButton,
|
|
6
|
+
ListItemText,
|
|
7
|
+
Stack,
|
|
8
|
+
Typography,
|
|
9
|
+
} from '@mui/material'
|
|
10
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
11
|
+
import { useState } from 'react'
|
|
12
|
+
|
|
13
|
+
import RcSesButton from '@/components/common/Button'
|
|
14
|
+
import RcSesDivider from '@/components/common/Divider'
|
|
15
|
+
import RcSesBottomSheet from '@/components/overlays/BottomSheet'
|
|
16
|
+
import { borderTokens } from '@/theme/borderTokens'
|
|
17
|
+
import { colorTokens } from '@/theme/colorTokens'
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: 'Atoms/Divider',
|
|
21
|
+
component: RcSesDivider,
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
args: { inset: 'none' },
|
|
24
|
+
argTypes: {
|
|
25
|
+
inset: { control: 'select', options: ['none', 16] },
|
|
26
|
+
role: { control: 'select', options: [undefined, 'separator'] },
|
|
27
|
+
},
|
|
28
|
+
parameters: {
|
|
29
|
+
docs: {
|
|
30
|
+
description: {
|
|
31
|
+
component:
|
|
32
|
+
'Horizontal Divider: a 16px frame with a 1px Border/subtle line positioned 8px from its top. Inset 16 adds 16px at both inline edges. Decorative by default (aria-hidden); pass role="separator" to divide meaningful groups. In ordinary lists, use component="li" for decorative dividers. Place semantic dividers between separate lists to distinguish meaningful groups without breaking list semantics. Insert between row groups in Menu-panel or in Bottom-sheet children, rather than adding separators between every row. Parent containers control additional section spacing.',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
} satisfies Meta<typeof RcSesDivider>
|
|
37
|
+
|
|
38
|
+
export default meta
|
|
39
|
+
type Story = StoryObj<typeof meta>
|
|
40
|
+
|
|
41
|
+
export const None: Story = {}
|
|
42
|
+
export const Inset16: Story = { args: { inset: 16 } }
|
|
43
|
+
export const Semantic: Story = {
|
|
44
|
+
args: { role: 'separator', inset: 16, 'aria-label': 'Paskyros ir seanso veiksmai' },
|
|
45
|
+
}
|
|
46
|
+
export const Variants: Story = {
|
|
47
|
+
render: () => (
|
|
48
|
+
<Stack spacing={3} sx={{ width: '100%', maxWidth: 320 }}>
|
|
49
|
+
<Box>
|
|
50
|
+
<Typography variant='caption'>Inset None</Typography>
|
|
51
|
+
<RcSesDivider />
|
|
52
|
+
</Box>
|
|
53
|
+
<Box>
|
|
54
|
+
<Typography variant='caption'>Inset 16</Typography>
|
|
55
|
+
<RcSesDivider inset={16} />
|
|
56
|
+
</Box>
|
|
57
|
+
</Stack>
|
|
58
|
+
),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function AccountGroups() {
|
|
62
|
+
return (
|
|
63
|
+
<Box>
|
|
64
|
+
<List disablePadding aria-label='Paskyros veiksmai'>
|
|
65
|
+
{['Mano duomenys', 'Nustatymai'].map((label) => (
|
|
66
|
+
<ListItem key={label} disablePadding>
|
|
67
|
+
<ListItemButton
|
|
68
|
+
component='a'
|
|
69
|
+
href='#account'
|
|
70
|
+
onClick={(event) => event.preventDefault()}
|
|
71
|
+
>
|
|
72
|
+
<ListItemText primary={label} />
|
|
73
|
+
</ListItemButton>
|
|
74
|
+
</ListItem>
|
|
75
|
+
))}
|
|
76
|
+
</List>
|
|
77
|
+
<RcSesDivider inset={16} role='separator' aria-label='Seanso veiksmai' />
|
|
78
|
+
<List disablePadding aria-label='Seanso veiksmai'>
|
|
79
|
+
<ListItem disablePadding>
|
|
80
|
+
<ListItemButton
|
|
81
|
+
component='a'
|
|
82
|
+
href='#logout'
|
|
83
|
+
onClick={(event) => event.preventDefault()}
|
|
84
|
+
>
|
|
85
|
+
<ListItemText primary='Atsijungti' />
|
|
86
|
+
</ListItemButton>
|
|
87
|
+
</ListItem>
|
|
88
|
+
</List>
|
|
89
|
+
</Box>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const MenuPanel: Story = {
|
|
94
|
+
render: () => (
|
|
95
|
+
<Box
|
|
96
|
+
component='nav'
|
|
97
|
+
aria-label='Paskyros meniu'
|
|
98
|
+
sx={{
|
|
99
|
+
maxWidth: 320,
|
|
100
|
+
border: `${borderTokens['stroke-1']} solid ${colorTokens['border-subtle']}`,
|
|
101
|
+
borderRadius: borderTokens['radius-subcard'],
|
|
102
|
+
backgroundColor: colorTokens['surface-base'],
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
<AccountGroups />
|
|
106
|
+
</Box>
|
|
107
|
+
),
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const BottomSheet: Story = {
|
|
111
|
+
render: function Render() {
|
|
112
|
+
const [open, setOpen] = useState(false)
|
|
113
|
+
return (
|
|
114
|
+
<>
|
|
115
|
+
<RcSesButton onClick={() => setOpen(true)}>
|
|
116
|
+
Atidaryti paskyros veiksmus
|
|
117
|
+
</RcSesButton>
|
|
118
|
+
<RcSesBottomSheet
|
|
119
|
+
open={open}
|
|
120
|
+
title='Paskyros veiksmai'
|
|
121
|
+
onClose={() => setOpen(false)}
|
|
122
|
+
>
|
|
123
|
+
<AccountGroups />
|
|
124
|
+
</RcSesBottomSheet>
|
|
125
|
+
</>
|
|
126
|
+
)
|
|
127
|
+
},
|
|
128
|
+
tags: ['viewport-375'],
|
|
129
|
+
}
|
|
@@ -4,6 +4,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
4
4
|
import { useState } from 'react'
|
|
5
5
|
|
|
6
6
|
import RcSesFilterChip from '@/components/common/FilterChip'
|
|
7
|
+
import { typographyTokens } from '@/theme/typographyTokens'
|
|
7
8
|
|
|
8
9
|
type Story = StoryObj<typeof RcSesFilterChip>
|
|
9
10
|
|
|
@@ -64,7 +65,14 @@ export const LongLabelEdgeCase: Story = {
|
|
|
64
65
|
return (
|
|
65
66
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}>
|
|
66
67
|
<Box>
|
|
67
|
-
<Box
|
|
68
|
+
<Box
|
|
69
|
+
sx={{
|
|
70
|
+
mb: 1,
|
|
71
|
+
fontSize: '0.875rem',
|
|
72
|
+
fontWeight: typographyTokens['font-weight-medium'],
|
|
73
|
+
color: grey[600],
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
68
76
|
Long Label (truncated with tooltip)
|
|
69
77
|
</Box>
|
|
70
78
|
<Box sx={{ maxWidth: '250px', mb: 1, p: 1, border: `1px dashed ${grey[300]}` }}>
|