@registrucentras/rc-ses-react-components 1.12.0 → 2.0.0-rc.1
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/CaretUpBoldIcon.d.ts +3 -0
- package/dist/assets/icons/CaretUpIcon.d.ts +3 -0
- 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/ListIcon.d.ts +3 -0
- 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/MinusIcon.d.ts +3 -0
- package/dist/assets/icons/NotePencilIcon.d.ts +3 -0
- package/dist/assets/icons/PencilSimpleLineIcon.d.ts +1 -1
- package/dist/assets/icons/PlusBoldIcon.d.ts +1 -1
- package/dist/assets/icons/PlusIcon.d.ts +3 -0
- 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/TrashIcon.d.ts +3 -0
- package/dist/assets/icons/UploadSimpleIcon.d.ts +1 -1
- package/dist/assets/icons/UserIcon.d.ts +3 -0
- 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/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +106 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +12 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +7 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.d.ts +2 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/index.d.ts +4 -0
- package/dist/components/common/AdvancedList/index.d.ts +11 -0
- package/dist/components/common/Alert/index.d.ts +1 -1
- package/dist/components/common/Badge/index.d.ts +1 -1
- 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 +13 -5
- 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 +4 -1
- package/dist/components/common/SelectableCardList/index.d.ts +4 -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 +1 -1
- package/dist/components/common/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/common/Tabs/TabsWrapper.d.ts +1 -1
- package/dist/components/common/Tooltip/index.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/icons.d.ts +9 -1
- package/dist/library/index.d.ts +3 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -30
- package/dist/registrucentras-rc-ses-react-components.js +6698 -7777
- package/dist/stories/assets/Logo.stories.d.ts +1 -1
- package/dist/stories/components/actions/Button.stories.d.ts +6 -5
- package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +1 -1
- package/dist/stories/components/display/AdvancedList.stories.d.ts +32 -0
- package/dist/stories/components/display/AdvancedListItem.stories.d.ts +33 -0
- package/dist/stories/components/display/Badge.stories.d.ts +1 -1
- 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/display/Tooltip.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 +25 -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 +1 -1
- 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 +4 -4
- 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 +7 -1
- package/dist/stories/components/overlays/Modal.stories.d.ts +1 -1
- package/dist/stories/components/overlays/Popover.stories.d.ts +12 -0
- 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/stories/theme/ThemedMuiComponents.stories.d.ts +25 -0
- package/dist/theme/motion.d.ts +16 -0
- package/package.json +64 -62
- package/src/assets/icons/CaretUpBoldIcon.tsx +17 -0
- package/src/assets/icons/CaretUpIcon.tsx +9 -0
- package/src/assets/icons/ListIcon.tsx +17 -0
- package/src/assets/icons/MinusIcon.tsx +9 -0
- package/src/assets/icons/NotePencilIcon.tsx +9 -0
- package/src/assets/icons/PlusIcon.tsx +9 -0
- package/src/assets/icons/TrashIcon.tsx +23 -0
- package/src/assets/icons/UserIcon.tsx +17 -0
- package/src/components/common/Accordion/index.tsx +0 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +100 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +224 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +263 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.test.ts +80 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.ts +28 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +631 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +332 -0
- package/src/components/common/AdvancedList/index.test.tsx +97 -0
- package/src/components/common/AdvancedList/index.tsx +52 -0
- package/src/components/common/Alert/index.test.tsx +1 -1
- package/src/components/common/Badge/index.test.tsx +1 -1
- package/src/components/common/Button/index.test.tsx +5 -2
- package/src/components/common/Button/index.tsx +25 -5
- 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.test.tsx +50 -0
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +48 -2
- package/src/components/common/SelectableCardList/index.test.tsx +1 -1
- package/src/components/common/SelectableCardList/index.tsx +6 -0
- 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 +1 -1
- package/src/components/common/Switch/index.tsx +21 -6
- package/src/components/common/Tooltip/index.test.tsx +2 -4
- package/src/components/common/Tooltip/index.tsx +5 -4
- 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.test.tsx +1 -1
- package/src/components/form/inputs/Select/index.tsx +95 -65
- 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/common/en.json +11 -0
- package/src/i18n/namespaces/common/lt.json +11 -0
- package/src/library/icons.ts +16 -0
- package/src/library/index.ts +3 -0
- package/src/main.tsx +1 -1
- package/src/setupTests.ts +7 -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/AdvancedList.stories.tsx +529 -0
- package/src/stories/components/display/AdvancedListItem.stories.tsx +653 -0
- package/src/stories/components/display/Badge.stories.tsx +24 -5
- 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 +4 -1
- package/src/stories/components/display/Tooltip.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 +38 -4
- 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 +1 -1
- 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 +35 -1
- package/src/stories/components/overlays/Modal.stories.tsx +1 -1
- package/src/stories/components/overlays/Popover.stories.tsx +65 -0
- 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/stories/theme/ThemedMuiComponents.stories.tsx +177 -0
- 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/MuiTabs.tsx +2 -1
- package/src/theme/motion.tsx +10 -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
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Avatar,
|
|
3
|
+
FormControl,
|
|
4
|
+
FormControlLabel,
|
|
5
|
+
FormLabel,
|
|
6
|
+
Radio,
|
|
7
|
+
RadioGroup,
|
|
8
|
+
Stack,
|
|
9
|
+
TextField,
|
|
10
|
+
} from '@mui/material'
|
|
11
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
12
|
+
import { useState } from 'react'
|
|
13
|
+
|
|
14
|
+
import NotePencilIcon from '@/assets/icons/NotePencilIcon'
|
|
15
|
+
import TrashIcon from '@/assets/icons/TrashIcon'
|
|
16
|
+
import UserIcon from '@/assets/icons/UserIcon'
|
|
17
|
+
import AdvancedListItem from '@/components/common/AdvancedList/components/AdvancedListItem'
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: 'components/display/AdvancedListItem',
|
|
21
|
+
component: AdvancedListItem,
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
args: {
|
|
24
|
+
title: 'Įrašo pavadinimas',
|
|
25
|
+
subtitle: 'a.k. 3850.........',
|
|
26
|
+
state: 'rest',
|
|
27
|
+
},
|
|
28
|
+
} satisfies Meta<typeof AdvancedListItem>
|
|
29
|
+
|
|
30
|
+
export default meta
|
|
31
|
+
|
|
32
|
+
type Story = StoryObj<typeof meta>
|
|
33
|
+
|
|
34
|
+
export const Main: Story = {}
|
|
35
|
+
|
|
36
|
+
export const Selected: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
state: 'selected',
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Disabled: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
state: 'disabled',
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const ErrorState: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
state: 'error',
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const IgaliotojaiPreset: Story = {
|
|
55
|
+
name: 'Preset: Įgaliotojai (reorder + actions)',
|
|
56
|
+
render: () => (
|
|
57
|
+
<AdvancedListItem
|
|
58
|
+
title='Jonas Jonaitis'
|
|
59
|
+
subtitle='a.k. 3850.........'
|
|
60
|
+
leading={{ type: 'reorder', onMoveUp: () => {}, onMoveDown: () => {} }}
|
|
61
|
+
trailing={{
|
|
62
|
+
type: 'actions',
|
|
63
|
+
actions: [
|
|
64
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
65
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
66
|
+
],
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
),
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const JaAtstovaiRedaguojamaStory = () => {
|
|
73
|
+
const [checked, setChecked] = useState(false)
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<AdvancedListItem
|
|
77
|
+
title='Petras Petraitis'
|
|
78
|
+
subtitle='Vadovas'
|
|
79
|
+
leading={{ type: 'reorder', onMoveUp: () => {}, onMoveDown: () => {} }}
|
|
80
|
+
trailing={{ type: 'toggle', checked, onChange: setChecked }}
|
|
81
|
+
/>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const JaAtstovaiRedaguojamaPreset: Story = {
|
|
86
|
+
name: 'Preset: JA atstovai redaguojama (reorder + toggle)',
|
|
87
|
+
render: () => <JaAtstovaiRedaguojamaStory />,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const JaAtstovaiPerziuraPreset: Story = {
|
|
91
|
+
name: 'Preset: JA atstovai peržiūra (status badge)',
|
|
92
|
+
render: () => (
|
|
93
|
+
<AdvancedListItem
|
|
94
|
+
title='Ona Onaitė'
|
|
95
|
+
subtitle='a.k. 3850.........'
|
|
96
|
+
trailing={{ type: 'status', label: 'Laukiama parašo', color: 'warning' }}
|
|
97
|
+
/>
|
|
98
|
+
),
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const PasirenkamasSarasasStory = () => {
|
|
102
|
+
const [checked, setChecked] = useState(true)
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<AdvancedListItem
|
|
106
|
+
title='Nekilnojamasis daiktas'
|
|
107
|
+
subtitle='Unikalus Nr. 4400.....'
|
|
108
|
+
state={checked ? 'selected' : 'rest'}
|
|
109
|
+
leading={{ type: 'checkbox', checked, onChange: setChecked }}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const PasirenkamasSarasasPreset: Story = {
|
|
115
|
+
name: 'Preset: Pasirenkamas sąrašas (checkbox, selected)',
|
|
116
|
+
render: () => <PasirenkamasSarasasStory />,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const PEOPLE_LIST_ITEMS = [
|
|
120
|
+
{ id: 'rep-1', title: 'Petras Petraitis', subtitle: 'Vadovas', initials: 'PP' },
|
|
121
|
+
{ id: 'rep-2', title: 'Ona Onaitė', subtitle: 'Prokuristė', initials: 'OO' },
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
const LeadingMediaStory = () => {
|
|
125
|
+
const [checkedIds, setCheckedIds] = useState<string[]>(['rep-1'])
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<Stack
|
|
129
|
+
sx={{
|
|
130
|
+
gap: 1,
|
|
131
|
+
width: '100%',
|
|
132
|
+
maxWidth: '32rem',
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
{PEOPLE_LIST_ITEMS.map((item) => {
|
|
136
|
+
const checked = checkedIds.includes(item.id)
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<AdvancedListItem
|
|
140
|
+
key={item.id}
|
|
141
|
+
title={item.title}
|
|
142
|
+
subtitle={item.subtitle}
|
|
143
|
+
state={checked ? 'selected' : 'rest'}
|
|
144
|
+
leadingMedia={
|
|
145
|
+
<Avatar sx={{ width: '2rem', height: '2rem' }}>{item.initials}</Avatar>
|
|
146
|
+
}
|
|
147
|
+
leading={{
|
|
148
|
+
type: 'checkbox',
|
|
149
|
+
checked,
|
|
150
|
+
onChange: (next) =>
|
|
151
|
+
setCheckedIds((prev) =>
|
|
152
|
+
next ? [...prev, item.id] : prev.filter((id) => id !== item.id),
|
|
153
|
+
),
|
|
154
|
+
}}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
})}
|
|
158
|
+
</Stack>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export const CheckboxWithLeadingMedia: Story = {
|
|
163
|
+
name: 'Leading-media: avatar + checkbox people list',
|
|
164
|
+
render: () => <LeadingMediaStory />,
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export const KrepselisPreset: Story = {
|
|
168
|
+
name: 'Preset: Krepšelis (price)',
|
|
169
|
+
render: () => (
|
|
170
|
+
<AdvancedListItem
|
|
171
|
+
title='NTR išrašas (objekto)'
|
|
172
|
+
subtitle='Elektroninis dokumentas (PDF)'
|
|
173
|
+
trailing={{ type: 'price', amount: '12,00 €', caption: 'su PVM' }}
|
|
174
|
+
/>
|
|
175
|
+
),
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const OWNER_OPTIONS = [
|
|
179
|
+
{ id: 'owner-individual', title: 'Savininkas fizinis asmuo' },
|
|
180
|
+
{ id: 'owner-legal', title: 'Savininkas juridinis asmuo' },
|
|
181
|
+
]
|
|
182
|
+
|
|
183
|
+
const RadioExpandStory = () => {
|
|
184
|
+
const [ownerId, setOwnerId] = useState(OWNER_OPTIONS[0].id)
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<Stack
|
|
188
|
+
sx={{
|
|
189
|
+
gap: 1,
|
|
190
|
+
width: '100%',
|
|
191
|
+
maxWidth: '32rem',
|
|
192
|
+
}}
|
|
193
|
+
>
|
|
194
|
+
{OWNER_OPTIONS.map((option) => (
|
|
195
|
+
<AdvancedListItem
|
|
196
|
+
key={option.id}
|
|
197
|
+
title={option.title}
|
|
198
|
+
state={ownerId === option.id ? 'selected' : 'rest'}
|
|
199
|
+
leading={{
|
|
200
|
+
type: 'radio',
|
|
201
|
+
name: 'owner-type',
|
|
202
|
+
checked: ownerId === option.id,
|
|
203
|
+
onChange: () => setOwnerId(option.id),
|
|
204
|
+
}}
|
|
205
|
+
expanded={ownerId === option.id}
|
|
206
|
+
expandedContent={
|
|
207
|
+
option.id === 'owner-legal' ? (
|
|
208
|
+
<Stack
|
|
209
|
+
sx={{
|
|
210
|
+
gap: 1.5,
|
|
211
|
+
}}
|
|
212
|
+
>
|
|
213
|
+
<TextField label='Įmonės pavadinimas' size='small' />
|
|
214
|
+
<TextField label='Įmonės kodas' size='small' />
|
|
215
|
+
<TextField label='Adresas' size='small' />
|
|
216
|
+
</Stack>
|
|
217
|
+
) : undefined
|
|
218
|
+
}
|
|
219
|
+
/>
|
|
220
|
+
))}
|
|
221
|
+
</Stack>
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export const RadioExpand: Story = {
|
|
226
|
+
name: 'GRM-12030: radio-expand (only one open at a time)',
|
|
227
|
+
render: () => <RadioExpandStory />,
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const CHECKBOX_EXPAND_ITEMS = [
|
|
231
|
+
{ id: 'rep-1', title: 'Petras Petraitis', subtitle: 'Vadovas' },
|
|
232
|
+
{ id: 'rep-2', title: 'Ona Onaitė', subtitle: 'Prokuristė' },
|
|
233
|
+
]
|
|
234
|
+
|
|
235
|
+
const CheckboxExpandStory = () => {
|
|
236
|
+
const [checkedIds, setCheckedIds] = useState<string[]>(['rep-1'])
|
|
237
|
+
|
|
238
|
+
return (
|
|
239
|
+
<Stack
|
|
240
|
+
sx={{
|
|
241
|
+
gap: 1,
|
|
242
|
+
width: '100%',
|
|
243
|
+
maxWidth: '32rem',
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
{CHECKBOX_EXPAND_ITEMS.map((item) => {
|
|
247
|
+
const checked = checkedIds.includes(item.id)
|
|
248
|
+
|
|
249
|
+
return (
|
|
250
|
+
<AdvancedListItem
|
|
251
|
+
key={item.id}
|
|
252
|
+
title={item.title}
|
|
253
|
+
subtitle={item.subtitle}
|
|
254
|
+
state={checked ? 'selected' : 'rest'}
|
|
255
|
+
leading={{
|
|
256
|
+
type: 'checkbox',
|
|
257
|
+
checked,
|
|
258
|
+
onChange: (next) =>
|
|
259
|
+
setCheckedIds((prev) =>
|
|
260
|
+
next ? [...prev, item.id] : prev.filter((id) => id !== item.id),
|
|
261
|
+
),
|
|
262
|
+
}}
|
|
263
|
+
expanded={checked}
|
|
264
|
+
expandedContent={<TextField label='Kontaktinis el. paštas' size='small' />}
|
|
265
|
+
/>
|
|
266
|
+
)
|
|
267
|
+
})}
|
|
268
|
+
</Stack>
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export const CheckboxExpand: Story = {
|
|
273
|
+
name: 'GRM-12030: checkbox-expand (several open independently)',
|
|
274
|
+
render: () => <CheckboxExpandStory />,
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const NestedRadioGroupStory = () => {
|
|
278
|
+
const [checked, setChecked] = useState(true)
|
|
279
|
+
const [declaration, setDeclaration] = useState('yes')
|
|
280
|
+
|
|
281
|
+
return (
|
|
282
|
+
<AdvancedListItem
|
|
283
|
+
title='Savininkas juridinis asmuo'
|
|
284
|
+
state={checked ? 'selected' : 'rest'}
|
|
285
|
+
leading={{ type: 'radio', checked, onChange: setChecked }}
|
|
286
|
+
expanded={checked}
|
|
287
|
+
expandedContent={
|
|
288
|
+
<Stack
|
|
289
|
+
sx={{
|
|
290
|
+
gap: 1.5,
|
|
291
|
+
}}
|
|
292
|
+
>
|
|
293
|
+
<TextField label='Įmonės pavadinimas' size='small' />
|
|
294
|
+
<TextField label='Adresas' size='small' />
|
|
295
|
+
<FormControl>
|
|
296
|
+
<FormLabel id='declaration-label'>Deklaracija teikiama</FormLabel>
|
|
297
|
+
<RadioGroup
|
|
298
|
+
aria-labelledby='declaration-label'
|
|
299
|
+
value={declaration}
|
|
300
|
+
onChange={(e) => setDeclaration(e.target.value)}
|
|
301
|
+
>
|
|
302
|
+
<FormControlLabel value='yes' control={<Radio />} label='Taip' />
|
|
303
|
+
<FormControlLabel value='no' control={<Radio />} label='Ne' />
|
|
304
|
+
</RadioGroup>
|
|
305
|
+
</FormControl>
|
|
306
|
+
</Stack>
|
|
307
|
+
}
|
|
308
|
+
/>
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export const NestedRadioGroup: Story = {
|
|
313
|
+
name: 'GRM-12030: nested radio group inside expanded content',
|
|
314
|
+
render: () => <NestedRadioGroupStory />,
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const LongExpandedContentStory = () => {
|
|
318
|
+
const [checked, setChecked] = useState(true)
|
|
319
|
+
|
|
320
|
+
return (
|
|
321
|
+
<AdvancedListItem
|
|
322
|
+
title='Nekilnojamasis daiktas su ilgu turiniu'
|
|
323
|
+
state={checked ? 'selected' : 'rest'}
|
|
324
|
+
leading={{ type: 'checkbox', checked, onChange: setChecked }}
|
|
325
|
+
expanded={checked}
|
|
326
|
+
expandedContent={
|
|
327
|
+
<Stack
|
|
328
|
+
sx={{
|
|
329
|
+
gap: 1.5,
|
|
330
|
+
}}
|
|
331
|
+
>
|
|
332
|
+
{Array.from({ length: 10 }).map((_, index) => (
|
|
333
|
+
<TextField
|
|
334
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
335
|
+
key={index}
|
|
336
|
+
label={`Laukas ${index + 1}`}
|
|
337
|
+
size='small'
|
|
338
|
+
/>
|
|
339
|
+
))}
|
|
340
|
+
</Stack>
|
|
341
|
+
}
|
|
342
|
+
/>
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export const LongExpandedContent: Story = {
|
|
347
|
+
name: 'GRM-12030: long expanded content (no internal scroll)',
|
|
348
|
+
render: () => <LongExpandedContentStory />,
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const TrailingShowcaseStory = () => {
|
|
352
|
+
const [toggleChecked, setToggleChecked] = useState(false)
|
|
353
|
+
const [checkboxChecked, setCheckboxChecked] = useState(false)
|
|
354
|
+
const [radioChecked, setRadioChecked] = useState(false)
|
|
355
|
+
const [stepperValue, setStepperValue] = useState(1)
|
|
356
|
+
|
|
357
|
+
return (
|
|
358
|
+
<Stack
|
|
359
|
+
sx={{
|
|
360
|
+
gap: 1,
|
|
361
|
+
width: '100%',
|
|
362
|
+
maxWidth: '32rem',
|
|
363
|
+
}}
|
|
364
|
+
>
|
|
365
|
+
<AdvancedListItem
|
|
366
|
+
title='Nėra'
|
|
367
|
+
subtitle='Show-trailing: nėra (trailing praleistas)'
|
|
368
|
+
/>
|
|
369
|
+
<AdvancedListItem
|
|
370
|
+
title='Actions'
|
|
371
|
+
subtitle='Show-trailing: actions'
|
|
372
|
+
trailing={{
|
|
373
|
+
type: 'actions',
|
|
374
|
+
actions: [
|
|
375
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
376
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
377
|
+
],
|
|
378
|
+
}}
|
|
379
|
+
/>
|
|
380
|
+
<AdvancedListItem
|
|
381
|
+
title='Toggle'
|
|
382
|
+
subtitle='Show-trailing: toggle'
|
|
383
|
+
trailing={{ type: 'toggle', checked: toggleChecked, onChange: setToggleChecked }}
|
|
384
|
+
/>
|
|
385
|
+
<AdvancedListItem
|
|
386
|
+
title='Status'
|
|
387
|
+
subtitle='Show-trailing: status'
|
|
388
|
+
trailing={{ type: 'status', label: 'Laukiama parašo', color: 'warning' }}
|
|
389
|
+
/>
|
|
390
|
+
<AdvancedListItem
|
|
391
|
+
title='Checkbox'
|
|
392
|
+
subtitle='Show-trailing: checkbox'
|
|
393
|
+
trailing={{
|
|
394
|
+
type: 'checkbox',
|
|
395
|
+
checked: checkboxChecked,
|
|
396
|
+
onChange: setCheckboxChecked,
|
|
397
|
+
}}
|
|
398
|
+
/>
|
|
399
|
+
<AdvancedListItem
|
|
400
|
+
title='Radio'
|
|
401
|
+
subtitle='Show-trailing: radio'
|
|
402
|
+
trailing={{ type: 'radio', checked: radioChecked, onChange: setRadioChecked }}
|
|
403
|
+
/>
|
|
404
|
+
<AdvancedListItem
|
|
405
|
+
title='Chevron'
|
|
406
|
+
subtitle='Show-trailing: chevron'
|
|
407
|
+
trailing={{ type: 'chevron' }}
|
|
408
|
+
onClick={() => console.log('Chevron row clicked — navigate to details')}
|
|
409
|
+
/>
|
|
410
|
+
<AdvancedListItem
|
|
411
|
+
title='Price'
|
|
412
|
+
subtitle='Show-trailing: price'
|
|
413
|
+
trailing={{ type: 'price', amount: '12,00 €', caption: 'su PVM' }}
|
|
414
|
+
/>
|
|
415
|
+
<AdvancedListItem
|
|
416
|
+
title='Stepper'
|
|
417
|
+
subtitle='Show-trailing: stepper'
|
|
418
|
+
trailing={{
|
|
419
|
+
type: 'stepper',
|
|
420
|
+
value: stepperValue,
|
|
421
|
+
onChange: setStepperValue,
|
|
422
|
+
min: 0,
|
|
423
|
+
}}
|
|
424
|
+
/>
|
|
425
|
+
<AdvancedListItem
|
|
426
|
+
title='Price (su Pašalinti)'
|
|
427
|
+
subtitle='Show-trailing: price + onDelete'
|
|
428
|
+
trailing={{
|
|
429
|
+
type: 'price',
|
|
430
|
+
amount: '12,00 €',
|
|
431
|
+
caption: 'su PVM',
|
|
432
|
+
onDelete: () => {},
|
|
433
|
+
}}
|
|
434
|
+
/>
|
|
435
|
+
</Stack>
|
|
436
|
+
)
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export const TrailingShowcase: Story = {
|
|
440
|
+
name: 'Preset: Show-trailing (visos trailing reikšmės)',
|
|
441
|
+
render: () => <TrailingShowcaseStory />,
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
const LeadingShowcaseStory = () => {
|
|
445
|
+
const [checked, setChecked] = useState(false)
|
|
446
|
+
const [selected, setSelected] = useState(false)
|
|
447
|
+
|
|
448
|
+
return (
|
|
449
|
+
<Stack
|
|
450
|
+
sx={{
|
|
451
|
+
gap: 1,
|
|
452
|
+
width: '100%',
|
|
453
|
+
maxWidth: '32rem',
|
|
454
|
+
}}
|
|
455
|
+
>
|
|
456
|
+
<AdvancedListItem title='Nėra' subtitle='Show-leading: nėra (leading praleistas)' />
|
|
457
|
+
<AdvancedListItem
|
|
458
|
+
title='Reorder (abu)'
|
|
459
|
+
subtitle='Show-leading: reorder-both'
|
|
460
|
+
leading={{ type: 'reorder', onMoveUp: () => {}, onMoveDown: () => {} }}
|
|
461
|
+
/>
|
|
462
|
+
<AdvancedListItem
|
|
463
|
+
title='Reorder (aukštyn)'
|
|
464
|
+
subtitle='Show-leading: reorder-up'
|
|
465
|
+
leading={{ type: 'reorder', onMoveUp: () => {} }}
|
|
466
|
+
/>
|
|
467
|
+
<AdvancedListItem
|
|
468
|
+
title='Reorder (žemyn)'
|
|
469
|
+
subtitle='Show-leading: reorder-down'
|
|
470
|
+
leading={{ type: 'reorder', onMoveDown: () => {} }}
|
|
471
|
+
/>
|
|
472
|
+
<AdvancedListItem
|
|
473
|
+
title='Checkbox'
|
|
474
|
+
subtitle='Show-leading: checkbox'
|
|
475
|
+
leading={{ type: 'checkbox', checked, onChange: setChecked }}
|
|
476
|
+
/>
|
|
477
|
+
<AdvancedListItem
|
|
478
|
+
title='Radio'
|
|
479
|
+
subtitle='Show-leading: radio'
|
|
480
|
+
leading={{ type: 'radio', checked: selected, onChange: setSelected }}
|
|
481
|
+
/>
|
|
482
|
+
<AdvancedListItem
|
|
483
|
+
title='Drag'
|
|
484
|
+
subtitle='Show-leading: drag'
|
|
485
|
+
leading={{ type: 'drag', 'aria-label': 'Vilkti ir pertvarkyti' }}
|
|
486
|
+
/>
|
|
487
|
+
<AdvancedListItem
|
|
488
|
+
title='Icon'
|
|
489
|
+
subtitle='Show-leading: icon'
|
|
490
|
+
leading={{ type: 'icon', icon: UserIcon, 'aria-label': 'Naudotojas' }}
|
|
491
|
+
/>
|
|
492
|
+
<AdvancedListItem
|
|
493
|
+
title='Avatar'
|
|
494
|
+
subtitle='Show-leading: avatar'
|
|
495
|
+
leading={{ type: 'avatar', initials: 'JP' }}
|
|
496
|
+
/>
|
|
497
|
+
<AdvancedListItem
|
|
498
|
+
title='Index'
|
|
499
|
+
subtitle='Show-leading: index'
|
|
500
|
+
leading={{ type: 'index', index: 1 }}
|
|
501
|
+
/>
|
|
502
|
+
</Stack>
|
|
503
|
+
)
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export const LeadingShowcase: Story = {
|
|
507
|
+
name: 'Preset: Show-leading (visos leading reikšmės)',
|
|
508
|
+
render: () => <LeadingShowcaseStory />,
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
const UNIVERSAL_PRESET_OPTIONS = [
|
|
512
|
+
{ id: 'with-name', title: 'Rodyti su asmens vardu, pavarde ir gimimo data' },
|
|
513
|
+
{
|
|
514
|
+
id: 'anonymised',
|
|
515
|
+
title: 'Nuasmenintas (be asmens vardo, pavardės, gimimo datos ir asmens kodo)',
|
|
516
|
+
},
|
|
517
|
+
]
|
|
518
|
+
|
|
519
|
+
const UniversalPresetStory = () => {
|
|
520
|
+
const [selectedId, setSelectedId] = useState(UNIVERSAL_PRESET_OPTIONS[0].id)
|
|
521
|
+
|
|
522
|
+
return (
|
|
523
|
+
<Stack
|
|
524
|
+
sx={{
|
|
525
|
+
gap: 1,
|
|
526
|
+
width: '100%',
|
|
527
|
+
maxWidth: '32rem',
|
|
528
|
+
}}
|
|
529
|
+
>
|
|
530
|
+
{UNIVERSAL_PRESET_OPTIONS.map((option) => (
|
|
531
|
+
<AdvancedListItem
|
|
532
|
+
key={option.id}
|
|
533
|
+
title={option.title}
|
|
534
|
+
state={selectedId === option.id ? 'selected' : 'rest'}
|
|
535
|
+
leading={{
|
|
536
|
+
type: 'radio',
|
|
537
|
+
name: 'universal-preset',
|
|
538
|
+
checked: selectedId === option.id,
|
|
539
|
+
onChange: () => setSelectedId(option.id),
|
|
540
|
+
}}
|
|
541
|
+
/>
|
|
542
|
+
))}
|
|
543
|
+
</Stack>
|
|
544
|
+
)
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export const UniversalPreset: Story = {
|
|
548
|
+
name: 'Preset: pasirenkamų radijo eilučių sąrašas (universalus)',
|
|
549
|
+
render: () => <UniversalPresetStory />,
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
const PAYMENT_TILE_BANKS = [
|
|
553
|
+
{ id: 'swedbank', title: 'Swedbank', initials: 'SW' },
|
|
554
|
+
{ id: 'seb', title: 'SEB bankas', initials: 'SE' },
|
|
555
|
+
{ id: 'luminor', title: 'Luminor', initials: 'Lu' },
|
|
556
|
+
]
|
|
557
|
+
|
|
558
|
+
const PaymentTileStory = () => {
|
|
559
|
+
const [selectedId, setSelectedId] = useState(PAYMENT_TILE_BANKS[0].id)
|
|
560
|
+
|
|
561
|
+
return (
|
|
562
|
+
<Stack
|
|
563
|
+
sx={{
|
|
564
|
+
gap: 1,
|
|
565
|
+
width: '100%',
|
|
566
|
+
maxWidth: '32rem',
|
|
567
|
+
}}
|
|
568
|
+
>
|
|
569
|
+
{PAYMENT_TILE_BANKS.map((bank) => (
|
|
570
|
+
<AdvancedListItem
|
|
571
|
+
key={bank.id}
|
|
572
|
+
title={bank.title}
|
|
573
|
+
state={selectedId === bank.id ? 'selected' : 'rest'}
|
|
574
|
+
leadingMedia={
|
|
575
|
+
<Avatar
|
|
576
|
+
variant='rounded'
|
|
577
|
+
sx={{
|
|
578
|
+
width: '2rem',
|
|
579
|
+
height: '2rem',
|
|
580
|
+
bgcolor: 'grey.200',
|
|
581
|
+
color: 'grey.700',
|
|
582
|
+
}}
|
|
583
|
+
>
|
|
584
|
+
{bank.initials}
|
|
585
|
+
</Avatar>
|
|
586
|
+
}
|
|
587
|
+
leading={{
|
|
588
|
+
type: 'radio',
|
|
589
|
+
name: 'payment-method',
|
|
590
|
+
checked: selectedId === bank.id,
|
|
591
|
+
onChange: () => setSelectedId(bank.id),
|
|
592
|
+
}}
|
|
593
|
+
/>
|
|
594
|
+
))}
|
|
595
|
+
</Stack>
|
|
596
|
+
)
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export const PaymentTilePreset: Story = {
|
|
600
|
+
name: 'Preset: Payment tile (Card + Radio + Leading-media logo)',
|
|
601
|
+
render: () => <PaymentTileStory />,
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
const KREPSELIS_ITEMS = [
|
|
605
|
+
{
|
|
606
|
+
id: 'ntr-israsas',
|
|
607
|
+
title: 'NTR išrašas (objekto)',
|
|
608
|
+
subtitle: 'Reg. Nr. 4400-1234-5678',
|
|
609
|
+
amount: '12,00 €',
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
id: 'jar-israsas',
|
|
613
|
+
title: 'JAR išrašas',
|
|
614
|
+
subtitle: 'Įmonės kodas 300000000',
|
|
615
|
+
amount: '8,00 €',
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
id: 'kadastro-israsas',
|
|
619
|
+
title: 'Kadastro žemėlapio ištrauka',
|
|
620
|
+
subtitle: 'Reg. Nr. 4400-9876-5432',
|
|
621
|
+
amount: '5,00 €',
|
|
622
|
+
},
|
|
623
|
+
]
|
|
624
|
+
|
|
625
|
+
const KrepselisWithDeleteStory = () => (
|
|
626
|
+
<Stack
|
|
627
|
+
sx={{
|
|
628
|
+
gap: 1,
|
|
629
|
+
width: '100%',
|
|
630
|
+
maxWidth: '32rem',
|
|
631
|
+
}}
|
|
632
|
+
>
|
|
633
|
+
{KREPSELIS_ITEMS.map((item) => (
|
|
634
|
+
<AdvancedListItem
|
|
635
|
+
key={item.id}
|
|
636
|
+
title={item.title}
|
|
637
|
+
subtitle={item.subtitle}
|
|
638
|
+
trailing={{
|
|
639
|
+
type: 'price',
|
|
640
|
+
amount: item.amount,
|
|
641
|
+
caption: 'su PVM',
|
|
642
|
+
onDelete: () => {},
|
|
643
|
+
deleteAriaLabel: `Pašalinti "${item.title}" iš krepšelio`,
|
|
644
|
+
}}
|
|
645
|
+
/>
|
|
646
|
+
))}
|
|
647
|
+
</Stack>
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
export const KrepselisWithDeletePreset: Story = {
|
|
651
|
+
name: 'Preset: Krepšelis (su trynimu)',
|
|
652
|
+
render: () => <KrepselisWithDeleteStory />,
|
|
653
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box, Typography } from '@mui/material'
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
3
|
import { Fragment } from 'react'
|
|
4
4
|
|
|
5
5
|
import RcSesBadge, { RcSesBadgeProps } from '@/components/common/Badge'
|
|
@@ -83,8 +83,10 @@ export const AllCombinations: Story = {
|
|
|
83
83
|
<Typography
|
|
84
84
|
key={combo.key}
|
|
85
85
|
align='center'
|
|
86
|
-
color='text.secondary'
|
|
87
86
|
variant='body2'
|
|
87
|
+
sx={{
|
|
88
|
+
color: 'text.secondary',
|
|
89
|
+
}}
|
|
88
90
|
>
|
|
89
91
|
{combo.label}
|
|
90
92
|
</Typography>
|
|
@@ -93,15 +95,32 @@ export const AllCombinations: Story = {
|
|
|
93
95
|
sizes.map((size, sizeIndex) => (
|
|
94
96
|
<Fragment key={`${variant}-${size}`}>
|
|
95
97
|
{sizeIndex === 0 && (
|
|
96
|
-
<Typography
|
|
98
|
+
<Typography
|
|
99
|
+
variant='body2'
|
|
100
|
+
sx={{
|
|
101
|
+
fontWeight: 600,
|
|
102
|
+
gridRow: 'span 2',
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
97
105
|
{variant}
|
|
98
106
|
</Typography>
|
|
99
107
|
)}
|
|
100
|
-
<Typography
|
|
108
|
+
<Typography
|
|
109
|
+
variant='body2'
|
|
110
|
+
sx={{
|
|
111
|
+
color: 'text.secondary',
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
101
114
|
{size}
|
|
102
115
|
</Typography>
|
|
103
116
|
{combos.map((combo) => (
|
|
104
|
-
<Box
|
|
117
|
+
<Box
|
|
118
|
+
key={combo.key}
|
|
119
|
+
sx={{
|
|
120
|
+
display: 'flex',
|
|
121
|
+
justifyContent: 'center',
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
105
124
|
<RcSesBadge
|
|
106
125
|
label='Label'
|
|
107
126
|
variant={variant}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box, Typography } from '@mui/material'
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
3
|
|
|
4
4
|
import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
|
|
5
5
|
import MagnifyingGlassIcon from '@/assets/icons/MagnifyingGlassIcon'
|