@registrucentras/rc-ses-react-components 1.10.0 → 2.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/ArrowLeftIcon.d.ts +1 -1
- package/dist/assets/icons/ArrowRightIcon.d.ts +1 -1
- package/dist/assets/icons/ArrowsClockwiseIcon.d.ts +1 -1
- package/dist/assets/icons/BarcodeIcon.d.ts +1 -1
- package/dist/assets/icons/CalendarBlankIcon.d.ts +1 -1
- package/dist/assets/icons/CaretDoubleLeftBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CaretDoubleRightBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CaretDownBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CaretDownFill.d.ts +1 -1
- package/dist/assets/icons/CaretDownIcon.d.ts +1 -1
- package/dist/assets/icons/CaretLeftBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CaretLeftIcon.d.ts +1 -1
- package/dist/assets/icons/CaretRightBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CheckBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CheckCircleFillIcon.d.ts +1 -1
- package/dist/assets/icons/CheckIcon.d.ts +1 -1
- package/dist/assets/icons/CheckUncheckedBoldIcon.d.ts +1 -1
- package/dist/assets/icons/CircleFilledIcon.d.ts +1 -1
- package/dist/assets/icons/CloseIcon.d.ts +1 -1
- package/dist/assets/icons/CollapseChevronsIcon.d.ts +1 -1
- package/dist/assets/icons/CopyIcon.d.ts +1 -1
- package/dist/assets/icons/DotCircleFilledIcon.d.ts +1 -1
- package/dist/assets/icons/ExpandChevronsIcon.d.ts +1 -1
- package/dist/assets/icons/InfoFillIcon.d.ts +1 -1
- package/dist/assets/icons/MagnifyingGlassIcon.d.ts +1 -1
- package/dist/assets/icons/MapPinAreaIcon.d.ts +1 -1
- package/dist/assets/icons/MinusBoldIcon.d.ts +1 -1
- package/dist/assets/icons/PencilSimpleLineIcon.d.ts +1 -1
- package/dist/assets/icons/PlusBoldIcon.d.ts +1 -1
- package/dist/assets/icons/QuestionFillIcon.d.ts +1 -1
- package/dist/assets/icons/QuestionIcon.d.ts +1 -1
- package/dist/assets/icons/ScalesIcon.d.ts +1 -1
- package/dist/assets/icons/ScrollIcon.d.ts +1 -1
- package/dist/assets/icons/SearchHelpIcon.d.ts +1 -1
- package/dist/assets/icons/SearchXIcon.d.ts +1 -1
- package/dist/assets/icons/SpinnerGapBoldIcon.d.ts +1 -1
- package/dist/assets/icons/UploadSimpleIcon.d.ts +1 -1
- package/dist/assets/icons/WarningCircleIcon.d.ts +1 -1
- package/dist/assets/icons/WarningDiamondFillIcon.d.ts +1 -1
- package/dist/assets/icons/WarningFillIcon.d.ts +1 -1
- package/dist/assets/icons/XCircleFillIcon.d.ts +1 -1
- package/dist/components/common/Accordion/index.d.ts +1 -1
- package/dist/components/common/Alert/index.d.ts +1 -1
- package/dist/components/common/Badge/index.d.ts +10 -0
- package/dist/components/common/Breadcrumbs/index.d.ts +1 -1
- package/dist/components/common/Button/ButtonWithPopover.d.ts +1 -1
- package/dist/components/common/Button/index.d.ts +2 -4
- package/dist/components/common/Card/index.d.ts +1 -1
- package/dist/components/common/DataPagination/components/DataPaginationSkeleton.d.ts +1 -1
- package/dist/components/common/DataPagination/components/PaginationButton.d.ts +1 -1
- package/dist/components/common/DataPagination/index.d.ts +1 -1
- package/dist/components/common/IconWithCircularBackground.d.ts +1 -1
- package/dist/components/common/ImageCard/index.d.ts +1 -1
- package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +1 -1
- package/dist/components/common/ListWithIcons/index.d.ts +1 -1
- package/dist/components/common/Popover/index.d.ts +1 -1
- package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +1 -1
- package/dist/components/common/SelectableCardList/index.d.ts +1 -1
- package/dist/components/common/Snackbar/SnackbarProvider.d.ts +1 -1
- package/dist/components/common/Snackbar/index.d.ts +1 -1
- package/dist/components/common/Switch/index.d.ts +10 -0
- package/dist/components/common/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/common/Tabs/TabsWrapper.d.ts +1 -1
- package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +1 -1
- package/dist/components/form/components/FormControlWrapper/index.d.ts +1 -1
- package/dist/components/form/inputs/Checkbox.d.ts +1 -1
- package/dist/components/form/inputs/CheckboxFormControl.d.ts +1 -1
- package/dist/components/form/inputs/Datepicker/components/RcSesDatepickerActionBar.d.ts +1 -1
- package/dist/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.d.ts +2 -1
- package/dist/components/form/inputs/Datepicker/index.d.ts +1 -1
- package/dist/components/form/inputs/FileDropzone.d.ts +1 -1
- package/dist/components/form/inputs/FileUpload.d.ts +1 -1
- package/dist/components/form/inputs/FormControlLabel.d.ts +2 -2
- package/dist/components/form/inputs/NumberStepper.d.ts +2 -1
- package/dist/components/form/inputs/PhoneInput.d.ts +2 -1
- package/dist/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.d.ts +1 -1
- package/dist/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.d.ts +13 -0
- package/dist/components/form/inputs/PhoneInputFormControl/components/PopperComponent.d.ts +1 -1
- package/dist/components/form/inputs/PhoneInputFormControl/components/RowComponent.d.ts +5 -2
- package/dist/components/form/inputs/PhoneInputFormControl/index.d.ts +2 -1
- package/dist/components/form/inputs/Select/index.d.ts +2 -1
- package/dist/components/form/inputs/SimpleCheckbox.d.ts +2 -1
- package/dist/components/layout/Footer/index.d.ts +1 -1
- package/dist/components/layout/ServiceFormActions.d.ts +1 -1
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +1 -1
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +1 -1
- package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +1 -1
- package/dist/components/layout/ServiceHeader.d.ts +1 -1
- package/dist/components/layout/ServicePage.d.ts +1 -1
- package/dist/components/layout/ServiceWizardStepper/components/CustomStepIcon.d.ts +1 -1
- package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +1 -1
- package/dist/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.d.ts +1 -1
- package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +1 -1
- package/dist/components/layout/ServiceWizardStepper/index.d.ts +1 -1
- package/dist/components/loaders/FullPageLoader/index.d.ts +1 -1
- package/dist/components/loaders/Loader/index.d.ts +1 -1
- package/dist/components/loaders/LoadingSpinner/index.d.ts +1 -1
- package/dist/components/overlays/Dialog/index.d.ts +1 -1
- package/dist/components/overlays/Modal/index.d.ts +1 -1
- package/dist/components/utils/loading.d.ts +1 -1
- package/dist/i18n/@mui/x-date-pickers/ltLT.d.ts +1 -71
- package/dist/library/index.d.ts +3 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -30
- package/dist/registrucentras-rc-ses-react-components.js +6258 -7835
- package/dist/stories/assets/Logo.stories.d.ts +1 -1
- package/dist/stories/components/actions/Button.stories.d.ts +2 -2
- package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +1 -1
- package/dist/stories/components/display/Badge.stories.d.ts +9 -0
- package/dist/stories/components/display/Card.stories.d.ts +1 -1
- package/dist/stories/components/display/ImageCard.stories.d.ts +1 -1
- package/dist/stories/components/display/ListWithIcons.stories.d.ts +2 -2
- package/dist/stories/components/display/SegmentedControl.stories.d.ts +9 -9
- package/dist/stories/components/display/SelectableCardList.stories.d.ts +2 -2
- package/dist/stories/components/feedback/Alert.stories.d.ts +1 -1
- package/dist/stories/components/feedback/Snackbar.stories.d.ts +7 -7
- package/dist/stories/components/form/CardFormContainer.stories.d.ts +1 -1
- package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +1 -1
- package/dist/stories/components/form/FormControlWrapper.stories.d.ts +1 -1
- package/dist/stories/components/form/ServiceFormActions.stories.d.ts +1 -1
- package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +2 -2
- package/dist/stories/components/form/SimpleCheckbox.stories.d.ts +1 -1
- package/dist/stories/components/icons/IconWithCircularBackground.stories.d.ts +1 -1
- package/dist/stories/components/icons/Icons.stories.d.ts +1 -1
- package/dist/stories/components/inputs/Checkbox.stories.d.ts +2 -2
- package/dist/stories/components/inputs/DatePicker.stories.d.ts +2 -2
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +1 -1
- package/dist/stories/components/inputs/FileUpload.stories.d.ts +2 -2
- package/dist/stories/components/inputs/NumberStepper.stories.d.ts +1 -1
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +2 -2
- package/dist/stories/components/inputs/PhoneInputFormControl.stories.d.ts +1 -1
- package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/stories/components/inputs/SearchInput.stories.d.ts +1 -1
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +1 -1
- package/dist/stories/components/inputs/Select.stories.d.ts +1 -1
- package/dist/stories/components/inputs/Switch.stories.d.ts +17 -0
- package/dist/stories/components/inputs/TextField.stories.d.ts +1 -1
- package/dist/stories/components/layout/Footer.stories.d.ts +1 -1
- package/dist/stories/components/layout/ServiceHeader.stories.d.ts +1 -1
- package/dist/stories/components/layout/ServicePage.stories.d.ts +1 -1
- package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +1 -1
- package/dist/stories/components/loaders/Loader.stories.d.ts +1 -1
- package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +1 -1
- package/dist/stories/components/navigation/Accordion.stories.d.ts +2 -2
- package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +1 -1
- package/dist/stories/components/navigation/DataPagination.stories.d.ts +2 -2
- package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +1 -1
- package/dist/stories/components/overlays/Dialog.stories.d.ts +1 -1
- package/dist/stories/components/overlays/Modal.stories.d.ts +1 -1
- package/dist/stories/components/tabs/Tab.stories.d.ts +1 -1
- package/dist/stories/components/tabs/TabPanel.stories.d.ts +1 -1
- package/dist/stories/components/tabs/Tabs.stories.d.ts +1 -1
- package/dist/stories/components/tabs/TabsWrapper.stories.d.ts +1 -1
- package/dist/theme/light/MuiSwitch.d.ts +3 -0
- package/package.json +63 -62
- package/src/components/common/Accordion/index.tsx +0 -1
- package/src/components/common/Alert/index.test.tsx +1 -1
- package/src/components/common/Badge/index.test.tsx +129 -0
- package/src/components/common/Badge/index.tsx +162 -0
- package/src/components/common/Button/index.test.tsx +5 -2
- package/src/components/common/Button/index.tsx +10 -4
- package/src/components/common/Card/index.test.tsx +1 -1
- package/src/components/common/DataPagination/index.test.tsx +1 -1
- package/src/components/common/DataPagination/index.tsx +14 -2
- package/src/components/common/ImageCard/index.test.tsx +1 -1
- package/src/components/common/ListWithIcons/index.test.tsx +1 -1
- package/src/components/common/SegmentedControl/components/SegmentButton/index.test.tsx +1 -1
- package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +2 -0
- package/src/components/common/SegmentedControl/index.test.tsx +1 -1
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +14 -2
- package/src/components/common/SelectableCardList/index.test.tsx +1 -1
- package/src/components/common/Snackbar/SnackbarProvider.tsx +1 -1
- package/src/components/common/Snackbar/index.test.tsx +1 -1
- package/src/components/common/Snackbar/index.tsx +3 -1
- package/src/components/common/Switch/index.test.tsx +214 -0
- package/src/components/common/Switch/index.tsx +64 -0
- package/src/components/form/components/FormControlWrapper/const/FormControlLayoutVariables.ts +1 -1
- package/src/components/form/inputs/CheckboxFormControl.tsx +7 -3
- package/src/components/form/inputs/Datepicker/components/RcSesDatepickerActionBar.tsx +8 -5
- package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +12 -12
- package/src/components/form/inputs/Datepicker/index.tsx +37 -32
- package/src/components/form/inputs/FileDropzone.tsx +6 -1
- package/src/components/form/inputs/NumberStepper.tsx +10 -5
- package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +15 -11
- package/src/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.tsx +31 -27
- package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +8 -4
- package/src/components/form/inputs/PhoneInputFormControl/index.test.tsx +57 -2
- package/src/components/form/inputs/PhoneInputFormControl/index.tsx +66 -53
- package/src/components/form/inputs/RadioButtonGroup.tsx +0 -1
- package/src/components/form/inputs/SearchInput/index.test.tsx +1 -1
- package/src/components/form/inputs/SearchInput/index.tsx +23 -13
- package/src/components/form/inputs/SearchableField.test.tsx +126 -0
- package/src/components/form/inputs/SearchableField.tsx +29 -24
- package/src/components/form/inputs/Select/index.tsx +67 -36
- package/src/components/form/inputs/TextField.tsx +1 -7
- package/src/components/layout/Footer/index.test.tsx +1 -1
- package/src/components/layout/ServiceFormActions.tsx +3 -3
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +2 -2
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +2 -2
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +1 -1
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +2 -1
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +8 -6
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +2 -1
- package/src/components/loaders/FullPageLoader/index.test.tsx +1 -1
- package/src/components/loaders/FullPageLoader/index.tsx +4 -3
- package/src/components/loaders/Loader/index.test.tsx +1 -1
- package/src/components/loaders/Loader/index.tsx +14 -4
- package/src/components/loaders/LoadingSpinner/index.test.tsx +1 -1
- package/src/components/overlays/Dialog/index.test.tsx +1 -1
- package/src/components/overlays/Dialog/index.tsx +7 -5
- package/src/components/overlays/Modal/index.test.tsx +1 -1
- package/src/components/overlays/Modal/index.tsx +4 -2
- package/src/env.tsx +1 -1
- package/src/examples/MultipleStepForm/components/ServiceDetailsForm.tsx +0 -5
- package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +0 -2
- package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +2 -2
- package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +12 -8
- package/src/examples/SingleStepForm/index.tsx +0 -2
- package/src/i18n/@mui/x-date-pickers/ltLT.ts +15 -1
- package/src/i18n/namespaces/input/en.json +6 -0
- package/src/i18n/namespaces/input/lt.json +6 -0
- package/src/library/index.ts +4 -0
- package/src/main.tsx +1 -1
- package/src/stories/Colors.mdx +1 -1
- package/src/stories/Welcome.mdx +1 -1
- package/src/stories/assets/Logo.stories.tsx +1 -1
- package/src/stories/components/actions/Button.stories.tsx +2 -2
- package/src/stories/components/actions/ButtonWithPopover.stories.tsx +1 -1
- package/src/stories/components/display/Badge.stories.tsx +184 -0
- package/src/stories/components/display/Card.stories.tsx +1 -1
- package/src/stories/components/display/ImageCard.stories.tsx +1 -1
- package/src/stories/components/display/ListWithIcons.stories.tsx +1 -1
- package/src/stories/components/display/SegmentedControl.stories.tsx +1 -1
- package/src/stories/components/display/SelectableCardList.stories.tsx +1 -1
- package/src/stories/components/feedback/Alert.stories.tsx +1 -1
- package/src/stories/components/feedback/Snackbar.stories.tsx +1 -1
- package/src/stories/components/form/CardFormContainer.stories.tsx +1 -1
- package/src/stories/components/form/CheckboxFormControl.stories.tsx +1 -1
- package/src/stories/components/form/FormControlWrapper.stories.tsx +1 -1
- package/src/stories/components/form/ServiceFormActions.stories.tsx +1 -1
- package/src/stories/components/form/ServiceFormContainer.stories.tsx +1 -3
- package/src/stories/components/form/SimpleCheckbox.stories.tsx +1 -1
- package/src/stories/components/icons/IconWithCircularBackground.stories.tsx +1 -1
- package/src/stories/components/icons/Icons.stories.tsx +1 -2
- package/src/stories/components/inputs/Checkbox.stories.tsx +1 -2
- package/src/stories/components/inputs/DatePicker.stories.tsx +2 -3
- package/src/stories/components/inputs/FileDropzone.stories.tsx +1 -1
- package/src/stories/components/inputs/FileUpload.stories.tsx +1 -2
- package/src/stories/components/inputs/NumberStepper.stories.tsx +1 -1
- package/src/stories/components/inputs/PhoneInput.stories.tsx +1 -2
- package/src/stories/components/inputs/PhoneInputFormControl.stories.tsx +3 -2
- package/src/stories/components/inputs/RadioButtonGroup.stories.tsx +1 -1
- package/src/stories/components/inputs/SearchInput.stories.tsx +2 -2
- package/src/stories/components/inputs/SearchableField.stories.tsx +1 -1
- package/src/stories/components/inputs/Select.stories.tsx +1 -2
- package/src/stories/components/inputs/Switch.stories.tsx +70 -0
- package/src/stories/components/inputs/TextField.stories.tsx +1 -1
- package/src/stories/components/layout/Footer.stories.tsx +1 -1
- package/src/stories/components/layout/ServiceHeader.stories.tsx +1 -1
- package/src/stories/components/layout/ServicePage.stories.tsx +1 -1
- package/src/stories/components/loaders/FullPageLoader.stories.tsx +1 -1
- package/src/stories/components/loaders/Loader.stories.tsx +1 -1
- package/src/stories/components/loaders/LoadingSpinner.stories.tsx +1 -1
- package/src/stories/components/navigation/Accordion.stories.tsx +1 -2
- package/src/stories/components/navigation/Breadcrumbs.stories.tsx +1 -1
- package/src/stories/components/navigation/DataPagination.stories.tsx +8 -2
- package/src/stories/components/navigation/ServiceWizardStepper.stories.tsx +1 -1
- package/src/stories/components/overlays/Dialog.stories.tsx +1 -1
- package/src/stories/components/overlays/Modal.stories.tsx +1 -1
- package/src/stories/components/tabs/Tab.stories.tsx +12 -1
- package/src/stories/components/tabs/TabPanel.stories.tsx +1 -1
- package/src/stories/components/tabs/Tabs.stories.tsx +1 -1
- package/src/stories/components/tabs/TabsWrapper.stories.tsx +1 -1
- package/src/theme/light/MuiAlert.tsx +82 -75
- package/src/theme/light/MuiLinearProgress.ts +6 -2
- package/src/theme/light/MuiPickersLayout.ts +4 -4
- package/src/theme/light/MuiSwitch.tsx +77 -0
- package/src/theme/light/MuiTabs.tsx +2 -1
- package/src/theme/light/index.tsx +2 -0
- package/src/types/common/ColorType.tsx +1 -7
- package/dist/components/form/inputs/PhoneInputFormControl/components/OuterElementType.d.ts +0 -5
- package/dist/components/form/inputs/PhoneInputFormControl/hooks/useResetCache.d.ts +0 -4
- package/src/components/form/inputs/PhoneInputFormControl/components/OuterElementType.tsx +0 -13
- package/src/components/form/inputs/PhoneInputFormControl/hooks/useResetCache.ts +0 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@registrucentras/rc-ses-react-components",
|
|
3
3
|
"author": "VĮ REGISTRŲ CENTRAS",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-rc.0",
|
|
5
5
|
"description": "RC SES React komponentų biblioteka",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
@@ -35,91 +35,92 @@
|
|
|
35
35
|
"storybook-build": "storybook build",
|
|
36
36
|
"test": "vitest",
|
|
37
37
|
"test:run": "vitest run",
|
|
38
|
-
"test:coverage": "vitest run --coverage"
|
|
38
|
+
"test:coverage": "vitest run --coverage",
|
|
39
|
+
"test:visual": "playwright test",
|
|
40
|
+
"test:visual:ci": "npm run storybook-build && playwright test",
|
|
41
|
+
"test:visual:update": "docker run --rm -v .:/work -v rcses-visual-node-modules:/work/node_modules -w /work mcr.microsoft.com/playwright:v1.62.0-noble bash -c \"npm ci --no-audit --no-fund && npm run storybook-build && npx playwright test --update-snapshots\"",
|
|
42
|
+
"test:visual:report": "playwright show-report"
|
|
39
43
|
},
|
|
40
44
|
"repository": {
|
|
41
45
|
"type": "git",
|
|
42
46
|
"url": "https://github.com/registrucentras/rc-ses-react-components.git"
|
|
43
47
|
},
|
|
44
48
|
"peerDependencies": {
|
|
45
|
-
"@emotion/react": "11.13.3",
|
|
46
|
-
"@emotion/styled": "11.13.0",
|
|
47
|
-
"@mui/material": "
|
|
48
|
-
"@mui/system": "
|
|
49
|
-
"@mui/x-date-pickers": "
|
|
50
|
-
"date-fns": "3.6.0",
|
|
51
|
-
"date-fns-tz": "3.
|
|
52
|
-
"
|
|
53
|
-
"react": "18.3.1",
|
|
54
|
-
"react-
|
|
55
|
-
"react-i18next": "14.1.3"
|
|
49
|
+
"@emotion/react": "^11.13.3",
|
|
50
|
+
"@emotion/styled": "^11.13.0",
|
|
51
|
+
"@mui/material": "^9.2.0",
|
|
52
|
+
"@mui/system": "^9.2.0",
|
|
53
|
+
"@mui/x-date-pickers": "^9.10.1",
|
|
54
|
+
"date-fns": "^3.6.0 || ^4.0.0",
|
|
55
|
+
"date-fns-tz": "^3.2.0",
|
|
56
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
57
|
+
"react-dom": "^18.3.1 || ^19.0.0",
|
|
58
|
+
"react-hook-form": "^7.53.2"
|
|
56
59
|
},
|
|
57
60
|
"dependencies": {
|
|
58
|
-
"@fontsource/public-sans": "^5.0.18",
|
|
59
61
|
"@phosphor-icons/react": "^2.1.10",
|
|
60
|
-
"axios": "^1.7.2",
|
|
61
62
|
"countries-phone-masks": "^1.1.1",
|
|
63
|
+
"i18next": "^26.3.6",
|
|
62
64
|
"js-cookie": "^3.0.5",
|
|
63
65
|
"maska": "^3.2.0",
|
|
64
|
-
"
|
|
65
|
-
"react-
|
|
66
|
-
"react-
|
|
67
|
-
"
|
|
68
|
-
"react-window": "^1.8.11",
|
|
69
|
-
"uuid": "^11.0.3"
|
|
66
|
+
"react-dropzone": "19.1.1",
|
|
67
|
+
"react-i18next": "^17.0.11",
|
|
68
|
+
"react-window": "^2.3.0",
|
|
69
|
+
"uuid": "^14.0.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@chromatic-com/storybook": "^
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@storybook/
|
|
84
|
-
"@storybook/
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@
|
|
72
|
+
"@chromatic-com/storybook": "^5.2.1",
|
|
73
|
+
"@emotion/react": "11.13.3",
|
|
74
|
+
"@emotion/styled": "11.13.0",
|
|
75
|
+
"@eslint/js": "^9.39.5",
|
|
76
|
+
"@fontsource/public-sans": "^5.3.0",
|
|
77
|
+
"@microsoft/api-extractor": "^7.58.12",
|
|
78
|
+
"@mui/material": "9.2.0",
|
|
79
|
+
"@mui/system": "9.2.0",
|
|
80
|
+
"@mui/x-date-pickers": "9.10.1",
|
|
81
|
+
"@playwright/test": "^1.62.0",
|
|
82
|
+
"@rollup/plugin-commonjs": "^26.0.3",
|
|
83
|
+
"@storybook/addon-a11y": "^10.5.5",
|
|
84
|
+
"@storybook/addon-coverage": "^3.0.2",
|
|
85
|
+
"@storybook/addon-docs": "^10.5.5",
|
|
86
|
+
"@storybook/addon-links": "^10.5.5",
|
|
87
|
+
"@storybook/addon-onboarding": "^10.5.5",
|
|
88
|
+
"@storybook/addon-themes": "^10.5.5",
|
|
89
|
+
"@storybook/react": "^10.5.5",
|
|
90
|
+
"@storybook/react-vite": "^10.5.5",
|
|
91
|
+
"@storybook/test-runner": "^0.24.4",
|
|
92
|
+
"@testing-library/jest-dom": "^7.0.0",
|
|
87
93
|
"@testing-library/react": "^16.3.0",
|
|
88
|
-
"@trivago/prettier-plugin-sort-imports": "^
|
|
94
|
+
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
89
95
|
"@types/js-cookie": "^3.0.6",
|
|
90
96
|
"@types/react": "^18.3.3",
|
|
91
97
|
"@types/react-dom": "^18.3.0",
|
|
92
|
-
"@types/react-helmet": "^6.1.11",
|
|
93
|
-
"@types/react-window": "^1.8.8",
|
|
94
|
-
"@types/uuid": "^10.0.0",
|
|
95
|
-
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
96
|
-
"@typescript-eslint/parser": "^7.13.0",
|
|
97
98
|
"@vitejs/plugin-react": "^4.3.4",
|
|
98
99
|
"@vitest/coverage-v8": "^4.0.15",
|
|
99
100
|
"axe-playwright": "^2.0.1",
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"eslint
|
|
103
|
-
"eslint-config-
|
|
104
|
-
"eslint-
|
|
105
|
-
"eslint-import-resolver-typescript": "^
|
|
106
|
-
"eslint-plugin-import": "^2.29.1",
|
|
107
|
-
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
108
|
-
"eslint-plugin-n": "^17.9.0",
|
|
101
|
+
"date-fns": "4.4.0",
|
|
102
|
+
"date-fns-tz": "3.2.0",
|
|
103
|
+
"eslint": "^9.39.5",
|
|
104
|
+
"eslint-config-airbnb-extended": "^3.1.1",
|
|
105
|
+
"eslint-config-prettier": "^10.1.8",
|
|
106
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
109
107
|
"eslint-plugin-prettier": "^5.1.3",
|
|
110
|
-
"eslint-plugin-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"eslint-plugin-storybook": "^0.8.0",
|
|
114
|
-
"jsdom": "^27.3.0",
|
|
108
|
+
"eslint-plugin-storybook": "^10.5.5",
|
|
109
|
+
"globals": "^17.8.0",
|
|
110
|
+
"jsdom": "^29.1.1",
|
|
115
111
|
"prettier": "^3.3.2",
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
112
|
+
"react": "18.3.1",
|
|
113
|
+
"react-dom": "18.3.1",
|
|
114
|
+
"react-hook-form": "7.53.2",
|
|
115
|
+
"react-router-dom": "6.26.2",
|
|
116
|
+
"rollup-plugin-typescript2": "^0.37.0",
|
|
117
|
+
"storybook": "^10.5.5",
|
|
118
|
+
"typescript": "^5.9.3",
|
|
119
|
+
"typescript-eslint": "^8.65.0",
|
|
120
|
+
"vite": "^7.3.6",
|
|
120
121
|
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
121
|
-
"vite-plugin-dts": "^
|
|
122
|
-
"vite-plugin-static-copy": "^
|
|
122
|
+
"vite-plugin-dts": "^5.0.3",
|
|
123
|
+
"vite-plugin-static-copy": "^4.1.1",
|
|
123
124
|
"vitest": "^4.0.15"
|
|
124
125
|
},
|
|
125
126
|
"optionalDependencies": {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ThemeProvider } from '@mui/material/styles'
|
|
2
|
+
import { fireEvent, render, screen } from '@testing-library/react'
|
|
3
|
+
import { ReactElement } from 'react'
|
|
4
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
5
|
+
|
|
6
|
+
import i18n from '@/i18n/i18n'
|
|
7
|
+
import theme from '@/theme/light'
|
|
8
|
+
|
|
9
|
+
import RcSesBadge from '.'
|
|
10
|
+
|
|
11
|
+
const getCloseAriaLabel = (label: string) =>
|
|
12
|
+
i18n.t('components.RcSesBadge.aria.close', { label, ns: 'input' })
|
|
13
|
+
|
|
14
|
+
const renderBadge = (ui: ReactElement) =>
|
|
15
|
+
render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>)
|
|
16
|
+
|
|
17
|
+
describe('RcSesBadge', () => {
|
|
18
|
+
beforeEach(async () => {
|
|
19
|
+
await i18n.changeLanguage('lt')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('renders the label', () => {
|
|
23
|
+
renderBadge(<RcSesBadge label='Dabartinė' variant='success' size='regular' />)
|
|
24
|
+
|
|
25
|
+
expect(screen.getByText('Dabartinė')).toBeInTheDocument()
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('sets the label as the title attribute for truncation tooltips', () => {
|
|
29
|
+
renderBadge(
|
|
30
|
+
<RcSesBadge label='Labai ilgas pavadinimas' variant='info' size='regular' />,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
expect(screen.getByText('Labai ilgas pavadinimas')).toHaveAttribute(
|
|
34
|
+
'title',
|
|
35
|
+
'Labai ilgas pavadinimas',
|
|
36
|
+
)
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it.each([
|
|
40
|
+
['small', '1.625rem'],
|
|
41
|
+
['regular', '2.125rem'],
|
|
42
|
+
] as const)('renders the %s size', (size, expectedHeight) => {
|
|
43
|
+
const { container } = renderBadge(
|
|
44
|
+
<RcSesBadge label='Label' variant='neutral' size={size} />,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
expect(container.firstChild).toHaveStyle({ height: expectedHeight })
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('shows the status icon by default', () => {
|
|
51
|
+
const { container } = renderBadge(
|
|
52
|
+
<RcSesBadge label='Label' variant='neutral' size='regular' />,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
expect(container.querySelector('svg')).toBeInTheDocument()
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('hides the status icon when showIcon is false', () => {
|
|
59
|
+
const { container } = renderBadge(
|
|
60
|
+
<RcSesBadge label='Label' variant='neutral' size='regular' showIcon={false} />,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
expect(container.querySelector('svg')).not.toBeInTheDocument()
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
it('does not render a close button by default', () => {
|
|
67
|
+
renderBadge(<RcSesBadge label='Label' variant='neutral' size='regular' />)
|
|
68
|
+
|
|
69
|
+
expect(screen.queryByRole('button')).not.toBeInTheDocument()
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('renders a close button with a translated aria-label when showClose is true', () => {
|
|
73
|
+
renderBadge(
|
|
74
|
+
<RcSesBadge
|
|
75
|
+
label='Dabartinė'
|
|
76
|
+
variant='neutral'
|
|
77
|
+
size='regular'
|
|
78
|
+
showClose
|
|
79
|
+
onClose={() => {}}
|
|
80
|
+
/>,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
expect(
|
|
84
|
+
screen.getByRole('button', { name: getCloseAriaLabel('Dabartinė') }),
|
|
85
|
+
).toBeInTheDocument()
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
it('calls onClose when the close button is clicked', () => {
|
|
89
|
+
const handleClose = vi.fn()
|
|
90
|
+
renderBadge(
|
|
91
|
+
<RcSesBadge
|
|
92
|
+
label='Dabartinė'
|
|
93
|
+
variant='neutral'
|
|
94
|
+
size='regular'
|
|
95
|
+
showClose
|
|
96
|
+
onClose={handleClose}
|
|
97
|
+
/>,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
fireEvent.click(screen.getByRole('button', { name: getCloseAriaLabel('Dabartinė') }))
|
|
101
|
+
|
|
102
|
+
expect(handleClose).toHaveBeenCalledTimes(1)
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
it('renders in English when the language is changed', async () => {
|
|
106
|
+
await i18n.changeLanguage('en')
|
|
107
|
+
renderBadge(
|
|
108
|
+
<RcSesBadge
|
|
109
|
+
label='Current'
|
|
110
|
+
variant='neutral'
|
|
111
|
+
size='regular'
|
|
112
|
+
showClose
|
|
113
|
+
onClose={() => {}}
|
|
114
|
+
/>,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
expect(
|
|
118
|
+
screen.getByRole('button', { name: getCloseAriaLabel('Current') }),
|
|
119
|
+
).toBeInTheDocument()
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
it('does not throw when the close button is clicked without an onClose handler', () => {
|
|
123
|
+
renderBadge(<RcSesBadge label='Label' variant='neutral' size='regular' showClose />)
|
|
124
|
+
|
|
125
|
+
expect(() =>
|
|
126
|
+
fireEvent.click(screen.getByRole('button', { name: getCloseAriaLabel('Label') })),
|
|
127
|
+
).not.toThrow()
|
|
128
|
+
})
|
|
129
|
+
})
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Box } from '@mui/material'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
|
|
4
|
+
import CircleFilledIcon from '@/assets/icons/CircleFilledIcon'
|
|
5
|
+
import CloseIcon from '@/assets/icons/CloseIcon'
|
|
6
|
+
import { common, error, grey, primary, secondary, warning } from '@/theme/palette'
|
|
7
|
+
|
|
8
|
+
export type RcSesBadgeProps = {
|
|
9
|
+
label: string
|
|
10
|
+
variant: 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'brand'
|
|
11
|
+
size: 'small' | 'regular'
|
|
12
|
+
showIcon?: boolean
|
|
13
|
+
showClose?: boolean
|
|
14
|
+
onClose?: () => void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type VariantStyle = {
|
|
18
|
+
border: string
|
|
19
|
+
background: string
|
|
20
|
+
iconColor: string
|
|
21
|
+
color: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const variantStyles: Record<RcSesBadgeProps['variant'], VariantStyle> = {
|
|
25
|
+
neutral: {
|
|
26
|
+
border: grey['300'],
|
|
27
|
+
background: common.white,
|
|
28
|
+
iconColor: grey['900'],
|
|
29
|
+
color: grey['900'],
|
|
30
|
+
},
|
|
31
|
+
success: {
|
|
32
|
+
border: secondary['500'],
|
|
33
|
+
background: secondary['100'],
|
|
34
|
+
iconColor: secondary['600'],
|
|
35
|
+
color: secondary['800'],
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
border: warning['400'],
|
|
39
|
+
background: warning['100'],
|
|
40
|
+
iconColor: warning['500'],
|
|
41
|
+
color: warning['800'],
|
|
42
|
+
},
|
|
43
|
+
error: {
|
|
44
|
+
border: error['500'],
|
|
45
|
+
background: error['100'],
|
|
46
|
+
iconColor: error['600'],
|
|
47
|
+
color: error['700'],
|
|
48
|
+
},
|
|
49
|
+
info: {
|
|
50
|
+
border: primary['400'],
|
|
51
|
+
background: primary['100'],
|
|
52
|
+
iconColor: primary['500'],
|
|
53
|
+
color: primary['800'],
|
|
54
|
+
},
|
|
55
|
+
brand: {
|
|
56
|
+
border: primary['500'],
|
|
57
|
+
background: primary['200'],
|
|
58
|
+
iconColor: primary['950'],
|
|
59
|
+
color: primary['950'],
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
type SizeStyle = {
|
|
64
|
+
height: string
|
|
65
|
+
padding: string
|
|
66
|
+
fontSize: string
|
|
67
|
+
lineHeight: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const sizeStyles: Record<RcSesBadgeProps['size'], SizeStyle> = {
|
|
71
|
+
small: {
|
|
72
|
+
height: '1.625rem',
|
|
73
|
+
padding: '0.25rem 0.5rem',
|
|
74
|
+
fontSize: '0.8125rem',
|
|
75
|
+
lineHeight: '1.125rem',
|
|
76
|
+
},
|
|
77
|
+
regular: {
|
|
78
|
+
height: '2.125rem',
|
|
79
|
+
padding: '0.375rem 0.75rem',
|
|
80
|
+
fontSize: '0.9375rem',
|
|
81
|
+
lineHeight: '1.375rem',
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function RcSesBadge(props: RcSesBadgeProps) {
|
|
86
|
+
const { label, variant, size, showIcon = true, showClose = false, onClose } = props
|
|
87
|
+
const { t } = useTranslation('input', { keyPrefix: 'components.RcSesBadge' })
|
|
88
|
+
|
|
89
|
+
const variantStyle = variantStyles[variant]
|
|
90
|
+
const sizeStyle = sizeStyles[size]
|
|
91
|
+
|
|
92
|
+
const baseStyle = {
|
|
93
|
+
display: 'inline-flex',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
verticalAlign: 'baseline',
|
|
97
|
+
gap: '0.25rem',
|
|
98
|
+
maxWidth: '100%',
|
|
99
|
+
borderRadius: '9999px',
|
|
100
|
+
border: `1px solid ${variantStyle.border}`,
|
|
101
|
+
background: variantStyle.background,
|
|
102
|
+
color: variantStyle.color,
|
|
103
|
+
...sizeStyle,
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<Box sx={baseStyle}>
|
|
108
|
+
{showIcon && (
|
|
109
|
+
<CircleFilledIcon
|
|
110
|
+
size={14}
|
|
111
|
+
fillColor={variantStyle.iconColor}
|
|
112
|
+
aria-hidden
|
|
113
|
+
focusable={false}
|
|
114
|
+
style={{ flexShrink: 0 }}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
117
|
+
<Box
|
|
118
|
+
component='span'
|
|
119
|
+
title={label}
|
|
120
|
+
sx={{
|
|
121
|
+
overflow: 'hidden',
|
|
122
|
+
textOverflow: 'ellipsis',
|
|
123
|
+
whiteSpace: 'nowrap',
|
|
124
|
+
minWidth: 0,
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
{label}
|
|
128
|
+
</Box>
|
|
129
|
+
{showClose && (
|
|
130
|
+
<Box
|
|
131
|
+
component='button'
|
|
132
|
+
type='button'
|
|
133
|
+
onClick={onClose}
|
|
134
|
+
aria-label={t('aria.close', { label })}
|
|
135
|
+
sx={{
|
|
136
|
+
display: 'inline-flex',
|
|
137
|
+
alignItems: 'center',
|
|
138
|
+
justifyContent: 'center',
|
|
139
|
+
flexShrink: 0,
|
|
140
|
+
minWidth: 16,
|
|
141
|
+
minHeight: 16,
|
|
142
|
+
padding: 0,
|
|
143
|
+
border: 'none',
|
|
144
|
+
background: 'none',
|
|
145
|
+
cursor: onClose ? 'pointer' : 'default',
|
|
146
|
+
opacity: 0.6,
|
|
147
|
+
'&:hover': { opacity: 1 },
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
<CloseIcon
|
|
151
|
+
size={14}
|
|
152
|
+
fillColor={variantStyle.iconColor}
|
|
153
|
+
aria-hidden
|
|
154
|
+
focusable={false}
|
|
155
|
+
/>
|
|
156
|
+
</Box>
|
|
157
|
+
)}
|
|
158
|
+
</Box>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export default RcSesBadge
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fireEvent, render, screen } from '@testing-library/react'
|
|
2
2
|
import { describe, expect, it, vi } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import Button from '
|
|
4
|
+
import Button from '.'
|
|
5
5
|
|
|
6
6
|
describe('Button Component', () => {
|
|
7
7
|
describe('Loading State', () => {
|
|
@@ -128,7 +128,10 @@ describe('Button Component', () => {
|
|
|
128
128
|
render(<Button variant='text'>Save</Button>)
|
|
129
129
|
|
|
130
130
|
const button = screen.getByRole('button')
|
|
131
|
-
|
|
131
|
+
// MUI 9 removed the combined variant+colour classes: MuiButton-textPrimary
|
|
132
|
+
// is now expressed as MuiButton-text plus MuiButton-colorPrimary.
|
|
133
|
+
expect(button).toHaveClass('MuiButton-text')
|
|
134
|
+
expect(button).toHaveClass('MuiButton-colorPrimary')
|
|
132
135
|
})
|
|
133
136
|
})
|
|
134
137
|
|
|
@@ -16,10 +16,16 @@ const ICON_ONLY_SIZE_MAP = {
|
|
|
16
16
|
large: '3rem',
|
|
17
17
|
} as const
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
// MUI 6 added a native `loading` prop (`boolean | null`, alongside
|
|
20
|
+
// `loadingIndicator` and `loadingPosition`), so it no longer needs declaring
|
|
21
|
+
// here - re-declaring it as `boolean` conflicted with MUI's nullable type at
|
|
22
|
+
// every call site that spreads ButtonProps.
|
|
23
|
+
//
|
|
24
|
+
// Behaviour is unchanged: `loading` is still destructured out below and drives
|
|
25
|
+
// the custom RcSesLoadingSpinner, so it never reaches MuiButton and the native
|
|
26
|
+
// indicator stays inactive. Switching over to MUI's implementation is a
|
|
27
|
+
// breaking change, tracked as SAV-5916.
|
|
28
|
+
type Props = ButtonProps
|
|
23
29
|
|
|
24
30
|
function RcSesButton(props: Props) {
|
|
25
31
|
const { t } = useTranslation('common')
|
|
@@ -4,8 +4,8 @@ import { render, screen } from '@testing-library/react'
|
|
|
4
4
|
import { type ReactElement } from 'react'
|
|
5
5
|
import { describe, expect, test } from 'vitest'
|
|
6
6
|
|
|
7
|
+
import RcSesCard from '.'
|
|
7
8
|
import theme from '../../../theme/light'
|
|
8
|
-
import RcSesCard from './index'
|
|
9
9
|
|
|
10
10
|
const renderCard = (ui: ReactElement) =>
|
|
11
11
|
render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>)
|
|
@@ -6,7 +6,7 @@ import { beforeEach, describe, expect, test, vi } from 'vitest'
|
|
|
6
6
|
|
|
7
7
|
import theme from '@/theme/light'
|
|
8
8
|
|
|
9
|
-
import DataPagination from '
|
|
9
|
+
import DataPagination from '.'
|
|
10
10
|
|
|
11
11
|
vi.mock('@mui/material', async () => {
|
|
12
12
|
const actual = await vi.importActual<typeof import('@mui/material')>('@mui/material')
|
|
@@ -45,7 +45,13 @@ const DataPagination = ({
|
|
|
45
45
|
|
|
46
46
|
if (isLoading) {
|
|
47
47
|
return (
|
|
48
|
-
<Box
|
|
48
|
+
<Box
|
|
49
|
+
sx={{
|
|
50
|
+
display: 'flex',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
gap: 1,
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
49
55
|
<DataPaginationSkeleton isMobile={isMobile} />
|
|
50
56
|
</Box>
|
|
51
57
|
)
|
|
@@ -58,7 +64,13 @@ const DataPagination = ({
|
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
return (
|
|
61
|
-
<Box
|
|
67
|
+
<Box
|
|
68
|
+
sx={{
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
gap: 1,
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
62
74
|
<>
|
|
63
75
|
<PaginationButton
|
|
64
76
|
onClick={() => handlePageChange(currentPage - 1)}
|
|
@@ -4,8 +4,8 @@ import { render, screen } from '@testing-library/react'
|
|
|
4
4
|
import { type ReactElement } from 'react'
|
|
5
5
|
import { describe, expect, test } from 'vitest'
|
|
6
6
|
|
|
7
|
+
import RcSesImageCard from '.'
|
|
7
8
|
import theme from '../../../theme/light'
|
|
8
|
-
import RcSesImageCard from './index'
|
|
9
9
|
|
|
10
10
|
const renderCard = (ui: ReactElement) =>
|
|
11
11
|
render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>)
|
|
@@ -5,7 +5,7 @@ import { describe, expect, test } from 'vitest'
|
|
|
5
5
|
|
|
6
6
|
import theme from '@/theme/light'
|
|
7
7
|
|
|
8
|
-
import ListWithIcons from '
|
|
8
|
+
import ListWithIcons from '.'
|
|
9
9
|
|
|
10
10
|
const renderListWithIcons = (ui: ReactElement) =>
|
|
11
11
|
render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fireEvent, render, screen } from '@testing-library/react'
|
|
2
2
|
import { describe, expect, test, vi } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import RcSesSegmentButton, { type RcSesSegmentOption } from '
|
|
4
|
+
import RcSesSegmentButton, { type RcSesSegmentOption } from '.'
|
|
5
5
|
|
|
6
6
|
describe('RcSesSegmentButton', () => {
|
|
7
7
|
const defaultOption: RcSesSegmentOption = {
|
|
@@ -63,9 +63,11 @@ const RcSesSegmentButton = React.forwardRef<HTMLButtonElement, RcSesSegmentButto
|
|
|
63
63
|
wordBreak: 'break-word',
|
|
64
64
|
fontFamily: '"Public Sans", sans-serif !important',
|
|
65
65
|
border: `2px solid ${isFocused && !isDisabled ? primary['500'] : 'transparent'}`,
|
|
66
|
+
|
|
66
67
|
backgroundColor: isSelected
|
|
67
68
|
? `${primary['50']} !important`
|
|
68
69
|
: 'transparent !important',
|
|
70
|
+
|
|
69
71
|
color: textColor,
|
|
70
72
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
71
73
|
fontWeight: 500,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fireEvent, render, screen } from '@testing-library/react'
|
|
2
2
|
import { describe, expect, test, vi } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import RcSesSegmentedControl, { type RcSesSegmentOption } from '
|
|
4
|
+
import RcSesSegmentedControl, { type RcSesSegmentOption } from '.'
|
|
5
5
|
|
|
6
6
|
describe('RcSesSegmentedControl', () => {
|
|
7
7
|
const options: RcSesSegmentOption[] = [
|
|
@@ -24,12 +24,24 @@ const SelectableCardListItem = ({
|
|
|
24
24
|
isLoading = false,
|
|
25
25
|
}: Props) => {
|
|
26
26
|
const titleTemplate = isLoading ? (
|
|
27
|
-
<Stack
|
|
27
|
+
<Stack
|
|
28
|
+
direction='row'
|
|
29
|
+
sx={{
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
gap: '0.75rem',
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
28
34
|
<Skeleton variant='circular' width={20} height={20} />
|
|
29
35
|
<Skeleton variant='text' width={100} />
|
|
30
36
|
</Stack>
|
|
31
37
|
) : (
|
|
32
|
-
<Stack
|
|
38
|
+
<Stack
|
|
39
|
+
direction='row'
|
|
40
|
+
sx={{
|
|
41
|
+
alignItems: 'flex-start',
|
|
42
|
+
gap: '0.75rem',
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
33
45
|
<Radio
|
|
34
46
|
aria-label={`Select ${title}`}
|
|
35
47
|
checked={selected}
|
|
@@ -6,7 +6,7 @@ import { beforeEach, describe, expect, test, vi } from 'vitest'
|
|
|
6
6
|
|
|
7
7
|
import theme from '@/theme/light'
|
|
8
8
|
|
|
9
|
-
import SelectableCardList, { type SelectableCardListItemData } from '
|
|
9
|
+
import SelectableCardList, { type SelectableCardListItemData } from '.'
|
|
10
10
|
|
|
11
11
|
vi.mock('@mui/material', async () => {
|
|
12
12
|
const actual = await vi.importActual<typeof import('@mui/material')>('@mui/material')
|