@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,529 @@
|
|
|
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 InfoFillIcon from '@/assets/icons/InfoFillIcon'
|
|
15
|
+
import NotePencilIcon from '@/assets/icons/NotePencilIcon'
|
|
16
|
+
import TrashIcon from '@/assets/icons/TrashIcon'
|
|
17
|
+
import UserIcon from '@/assets/icons/UserIcon'
|
|
18
|
+
import AdvancedList, { type AdvancedListItemData } from '@/components/common/AdvancedList'
|
|
19
|
+
|
|
20
|
+
const buildItems = (): AdvancedListItemData[] =>
|
|
21
|
+
Array.from({ length: 8 }, (_, index) => ({
|
|
22
|
+
id: `item-${index + 1}`,
|
|
23
|
+
title: `Service option ${index + 1}`,
|
|
24
|
+
subtitle: index % 2 === 0 ? 'Recommended for most users' : 'Alternative flow',
|
|
25
|
+
}))
|
|
26
|
+
|
|
27
|
+
const meta = {
|
|
28
|
+
title: 'components/display/AdvancedList',
|
|
29
|
+
component: AdvancedList,
|
|
30
|
+
tags: ['autodocs'],
|
|
31
|
+
args: {
|
|
32
|
+
items: buildItems(),
|
|
33
|
+
error: undefined,
|
|
34
|
+
},
|
|
35
|
+
argTypes: {
|
|
36
|
+
items: {
|
|
37
|
+
control: false,
|
|
38
|
+
},
|
|
39
|
+
error: {
|
|
40
|
+
control: false,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} satisfies Meta<typeof AdvancedList>
|
|
44
|
+
|
|
45
|
+
export default meta
|
|
46
|
+
|
|
47
|
+
type Story = StoryObj<typeof meta>
|
|
48
|
+
|
|
49
|
+
const MainStory = () => {
|
|
50
|
+
const [selectedId, setSelectedId] = useState('item-1')
|
|
51
|
+
|
|
52
|
+
const items: AdvancedListItemData[] = buildItems().map((item) => ({
|
|
53
|
+
...item,
|
|
54
|
+
state: selectedId === item.id ? 'selected' : 'rest',
|
|
55
|
+
leading: {
|
|
56
|
+
type: 'radio',
|
|
57
|
+
name: 'service-option',
|
|
58
|
+
checked: selectedId === item.id,
|
|
59
|
+
onChange: () => setSelectedId(item.id),
|
|
60
|
+
},
|
|
61
|
+
}))
|
|
62
|
+
|
|
63
|
+
return <AdvancedList items={items} />
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Main: Story = {
|
|
67
|
+
render: () => <MainStory />,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Error: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
error: 'Unable to load list items. Please try again.',
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const OWNER_TYPE_OPTIONS = [
|
|
77
|
+
{ id: 'owner-individual', title: 'Savininkas fizinis asmuo' },
|
|
78
|
+
{ id: 'owner-legal', title: 'Savininkas juridinis asmuo' },
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
const KitchenSinkStory = () => {
|
|
82
|
+
const [igaliotojaiChecked, setIgaliotojaiChecked] = useState(false)
|
|
83
|
+
const [signatoryToggle, setSignatoryToggle] = useState(false)
|
|
84
|
+
const [propertyChecked, setPropertyChecked] = useState(true)
|
|
85
|
+
|
|
86
|
+
const items: AdvancedListItemData[] = [
|
|
87
|
+
{
|
|
88
|
+
id: 'igaliotojai',
|
|
89
|
+
title: 'Jonas Jonaitis',
|
|
90
|
+
subtitle: 'a.k. 3850.........',
|
|
91
|
+
state: igaliotojaiChecked ? 'selected' : 'rest',
|
|
92
|
+
leadingMedia: <Avatar sx={{ width: '2rem', height: '2rem' }}>JJ</Avatar>,
|
|
93
|
+
leading: {
|
|
94
|
+
type: 'checkbox',
|
|
95
|
+
checked: igaliotojaiChecked,
|
|
96
|
+
onChange: setIgaliotojaiChecked,
|
|
97
|
+
},
|
|
98
|
+
trailing: {
|
|
99
|
+
type: 'actions',
|
|
100
|
+
actions: [
|
|
101
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
102
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'ja-atstovai-redaguojama',
|
|
108
|
+
title: 'Petras Petraitis',
|
|
109
|
+
subtitle: 'Vadovas',
|
|
110
|
+
leading: { type: 'reorder', onMoveUp: () => {}, onMoveDown: () => {} },
|
|
111
|
+
trailing: {
|
|
112
|
+
type: 'toggle',
|
|
113
|
+
checked: signatoryToggle,
|
|
114
|
+
onChange: setSignatoryToggle,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'ja-atstovai-perziura',
|
|
119
|
+
title: 'Ona Onaitė',
|
|
120
|
+
subtitle: 'a.k. 3850.........',
|
|
121
|
+
trailing: { type: 'status', label: 'Laukiama parašo', color: 'warning' },
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: 'pasirenkamas-sarasas',
|
|
125
|
+
title: 'Nekilnojamasis daiktas',
|
|
126
|
+
subtitle: 'Unikalus Nr. 4400.....',
|
|
127
|
+
state: propertyChecked ? 'selected' : 'rest',
|
|
128
|
+
leading: {
|
|
129
|
+
type: 'checkbox',
|
|
130
|
+
checked: propertyChecked,
|
|
131
|
+
onChange: setPropertyChecked,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'krepselis',
|
|
136
|
+
title: 'NTR išrašas (objekto)',
|
|
137
|
+
subtitle: 'Elektroninis dokumentas (PDF)',
|
|
138
|
+
trailing: { type: 'price', amount: '12,00 €', caption: 'su PVM' },
|
|
139
|
+
},
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
return <AdvancedList items={items} />
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export const KitchenSink: Story = {
|
|
146
|
+
name: 'Presetai: 5 realūs naudojimo atvejai',
|
|
147
|
+
render: () => <KitchenSinkStory />,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const OwnerTypeExpandStory = () => {
|
|
151
|
+
const [ownerTypeId, setOwnerTypeId] = useState(OWNER_TYPE_OPTIONS[0].id)
|
|
152
|
+
const [declaration, setDeclaration] = useState('yes')
|
|
153
|
+
|
|
154
|
+
const items: AdvancedListItemData[] = OWNER_TYPE_OPTIONS.map((option) => ({
|
|
155
|
+
id: option.id,
|
|
156
|
+
title: option.title,
|
|
157
|
+
state: ownerTypeId === option.id ? 'selected' : 'rest',
|
|
158
|
+
leading: {
|
|
159
|
+
type: 'radio',
|
|
160
|
+
name: 'owner-type',
|
|
161
|
+
checked: ownerTypeId === option.id,
|
|
162
|
+
onChange: () => setOwnerTypeId(option.id),
|
|
163
|
+
},
|
|
164
|
+
expanded: ownerTypeId === option.id,
|
|
165
|
+
expandedContent:
|
|
166
|
+
option.id === 'owner-legal' ? (
|
|
167
|
+
<Stack sx={{ gap: 1.5 }}>
|
|
168
|
+
<TextField label='Įmonės pavadinimas' size='small' />
|
|
169
|
+
<TextField label='Įmonės kodas' size='small' />
|
|
170
|
+
<TextField label='Adresas' size='small' />
|
|
171
|
+
<FormControl>
|
|
172
|
+
<FormLabel id='declaration-label'>Deklaracija teikiama</FormLabel>
|
|
173
|
+
<RadioGroup
|
|
174
|
+
aria-labelledby='declaration-label'
|
|
175
|
+
value={declaration}
|
|
176
|
+
onChange={(e) => setDeclaration(e.target.value)}
|
|
177
|
+
>
|
|
178
|
+
<FormControlLabel value='yes' control={<Radio />} label='Taip' />
|
|
179
|
+
<FormControlLabel value='no' control={<Radio />} label='Ne' />
|
|
180
|
+
</RadioGroup>
|
|
181
|
+
</FormControl>
|
|
182
|
+
</Stack>
|
|
183
|
+
) : undefined,
|
|
184
|
+
}))
|
|
185
|
+
|
|
186
|
+
return <AdvancedList items={items} />
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const OwnerTypeExpand: Story = {
|
|
190
|
+
name: 'Preset: savininko tipas (radio + expand)',
|
|
191
|
+
render: () => <OwnerTypeExpandStory />,
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const FigmaAnatomyStory = () => {
|
|
195
|
+
const [selectedId, setSelectedId] = useState<string | null>(null)
|
|
196
|
+
|
|
197
|
+
const items: AdvancedListItemData[] = ['anatomy-1', 'anatomy-2', 'anatomy-3'].map(
|
|
198
|
+
(id) => ({
|
|
199
|
+
id,
|
|
200
|
+
title: 'Įrašo pavadinimas',
|
|
201
|
+
label: 'Label',
|
|
202
|
+
subtitle: 'a.k. 3850.........',
|
|
203
|
+
metaItems: [
|
|
204
|
+
{ icon: InfoFillIcon, text: 'Meta info 1' },
|
|
205
|
+
{ icon: InfoFillIcon, text: 'Meta info 2' },
|
|
206
|
+
{ icon: InfoFillIcon, text: 'Meta info 3' },
|
|
207
|
+
],
|
|
208
|
+
state: selectedId === id ? 'selected' : 'rest',
|
|
209
|
+
leading: {
|
|
210
|
+
type: 'radio',
|
|
211
|
+
name: 'anatomy-demo',
|
|
212
|
+
checked: selectedId === id,
|
|
213
|
+
onChange: () => setSelectedId(id),
|
|
214
|
+
},
|
|
215
|
+
trailing: {
|
|
216
|
+
type: 'actions',
|
|
217
|
+
actions: [
|
|
218
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
219
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
expanded: selectedId === id,
|
|
223
|
+
expandedContent: 'Išplėstas turinys — pakeiskite čia (pvz. JA atstovų sąrašas)',
|
|
224
|
+
}),
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
return <AdvancedList items={items} />
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export const FigmaAnatomy: Story = {
|
|
231
|
+
name: 'Anatomija: Leading × Trailing × Label × Meta × Expand',
|
|
232
|
+
render: () => <FigmaAnatomyStory />,
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const LeadingOptionsStory = () => {
|
|
236
|
+
const [checked, setChecked] = useState(false)
|
|
237
|
+
const [selected, setSelected] = useState(false)
|
|
238
|
+
|
|
239
|
+
const items: AdvancedListItemData[] = [
|
|
240
|
+
{
|
|
241
|
+
id: 'leading-none',
|
|
242
|
+
title: 'Nėra',
|
|
243
|
+
subtitle: 'Show-leading: nėra (leading praleistas)',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: 'leading-reorder-both',
|
|
247
|
+
title: 'Reorder (abu)',
|
|
248
|
+
subtitle: 'Show-leading: reorder-both',
|
|
249
|
+
leading: { type: 'reorder', onMoveUp: () => {}, onMoveDown: () => {} },
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: 'leading-reorder-up',
|
|
253
|
+
title: 'Reorder (aukštyn)',
|
|
254
|
+
subtitle: 'Show-leading: reorder-up',
|
|
255
|
+
leading: { type: 'reorder', onMoveUp: () => {} },
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
id: 'leading-reorder-down',
|
|
259
|
+
title: 'Reorder (žemyn)',
|
|
260
|
+
subtitle: 'Show-leading: reorder-down',
|
|
261
|
+
leading: { type: 'reorder', onMoveDown: () => {} },
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: 'leading-checkbox',
|
|
265
|
+
title: 'Checkbox',
|
|
266
|
+
subtitle: 'Show-leading: checkbox',
|
|
267
|
+
leading: { type: 'checkbox', checked, onChange: setChecked },
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: 'leading-radio',
|
|
271
|
+
title: 'Radio',
|
|
272
|
+
subtitle: 'Show-leading: radio',
|
|
273
|
+
leading: { type: 'radio', checked: selected, onChange: setSelected },
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: 'leading-drag',
|
|
277
|
+
title: 'Drag',
|
|
278
|
+
subtitle: 'Show-leading: drag',
|
|
279
|
+
leading: { type: 'drag', 'aria-label': 'Vilkti ir pertvarkyti' },
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: 'leading-icon',
|
|
283
|
+
title: 'Icon',
|
|
284
|
+
subtitle: 'Show-leading: icon',
|
|
285
|
+
leading: { type: 'icon', icon: UserIcon, 'aria-label': 'Naudotojas' },
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: 'leading-avatar',
|
|
289
|
+
title: 'Avatar',
|
|
290
|
+
subtitle: 'Show-leading: avatar',
|
|
291
|
+
leading: { type: 'avatar', initials: 'JP' },
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
id: 'leading-index',
|
|
295
|
+
title: 'Index',
|
|
296
|
+
subtitle: 'Show-leading: index',
|
|
297
|
+
leading: { type: 'index', index: 1 },
|
|
298
|
+
},
|
|
299
|
+
]
|
|
300
|
+
|
|
301
|
+
return <AdvancedList items={items} />
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export const LeadingOptions: Story = {
|
|
305
|
+
name: 'Kitchen sink: visos Leading parinktys (paginuota)',
|
|
306
|
+
render: () => <LeadingOptionsStory />,
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const TrailingOptionsStory = () => {
|
|
310
|
+
const [toggleChecked, setToggleChecked] = useState(false)
|
|
311
|
+
const [checkboxChecked, setCheckboxChecked] = useState(false)
|
|
312
|
+
const [radioChecked, setRadioChecked] = useState(false)
|
|
313
|
+
const [stepperValue, setStepperValue] = useState(1)
|
|
314
|
+
|
|
315
|
+
const items: AdvancedListItemData[] = [
|
|
316
|
+
{
|
|
317
|
+
id: 'trailing-none',
|
|
318
|
+
title: 'Nėra',
|
|
319
|
+
subtitle: 'Show-trailing: nėra (trailing praleistas)',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: 'trailing-actions',
|
|
323
|
+
title: 'Actions',
|
|
324
|
+
subtitle: 'Show-trailing: actions',
|
|
325
|
+
trailing: {
|
|
326
|
+
type: 'actions',
|
|
327
|
+
actions: [
|
|
328
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
329
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
id: 'trailing-toggle',
|
|
335
|
+
title: 'Toggle',
|
|
336
|
+
subtitle: 'Show-trailing: toggle',
|
|
337
|
+
trailing: { type: 'toggle', checked: toggleChecked, onChange: setToggleChecked },
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: 'trailing-status',
|
|
341
|
+
title: 'Status',
|
|
342
|
+
subtitle: 'Show-trailing: status',
|
|
343
|
+
trailing: { type: 'status', label: 'Laukiama parašo', color: 'warning' },
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: 'trailing-checkbox',
|
|
347
|
+
title: 'Checkbox',
|
|
348
|
+
subtitle: 'Show-trailing: checkbox',
|
|
349
|
+
trailing: {
|
|
350
|
+
type: 'checkbox',
|
|
351
|
+
checked: checkboxChecked,
|
|
352
|
+
onChange: setCheckboxChecked,
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
id: 'trailing-radio',
|
|
357
|
+
title: 'Radio',
|
|
358
|
+
subtitle: 'Show-trailing: radio',
|
|
359
|
+
trailing: { type: 'radio', checked: radioChecked, onChange: setRadioChecked },
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
id: 'trailing-chevron',
|
|
363
|
+
title: 'Chevron',
|
|
364
|
+
subtitle: 'Show-trailing: chevron',
|
|
365
|
+
trailing: { type: 'chevron' },
|
|
366
|
+
onClick: () => console.log('Chevron row clicked — navigate to details'),
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
id: 'trailing-price',
|
|
370
|
+
title: 'Price',
|
|
371
|
+
subtitle: 'Show-trailing: price',
|
|
372
|
+
trailing: { type: 'price', amount: '12,00 €', caption: 'su PVM' },
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: 'trailing-stepper',
|
|
376
|
+
title: 'Stepper',
|
|
377
|
+
subtitle: 'Show-trailing: stepper',
|
|
378
|
+
trailing: {
|
|
379
|
+
type: 'stepper',
|
|
380
|
+
value: stepperValue,
|
|
381
|
+
onChange: setStepperValue,
|
|
382
|
+
min: 0,
|
|
383
|
+
'aria-label': 'Kiekis',
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
]
|
|
387
|
+
|
|
388
|
+
return <AdvancedList items={items} />
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export const TrailingOptions: Story = {
|
|
392
|
+
name: 'Kitchen sink: visos Trailing parinktys (paginuota)',
|
|
393
|
+
render: () => <TrailingOptionsStory />,
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const STATE_VARIANTS = ['rest', 'selected', 'disabled', 'error'] as const
|
|
397
|
+
|
|
398
|
+
const StateShowcaseStory = () => {
|
|
399
|
+
const items: AdvancedListItemData[] = STATE_VARIANTS.map((state) => ({
|
|
400
|
+
id: `state-${state}`,
|
|
401
|
+
title: 'Pavyzdys',
|
|
402
|
+
state,
|
|
403
|
+
leading: { type: 'radio', checked: state === 'selected', onChange: () => {} },
|
|
404
|
+
trailing: {
|
|
405
|
+
type: 'actions',
|
|
406
|
+
actions: [
|
|
407
|
+
{ label: 'Keisti', icon: NotePencilIcon, onClick: () => {} },
|
|
408
|
+
{ label: 'Pašalinti', icon: TrashIcon, onClick: () => {} },
|
|
409
|
+
],
|
|
410
|
+
},
|
|
411
|
+
}))
|
|
412
|
+
|
|
413
|
+
return <AdvancedList items={items} />
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export const StateShowcase: Story = {
|
|
417
|
+
name: 'Kitchen sink: visi state (rest/selected/disabled/error)',
|
|
418
|
+
render: () => <StateShowcaseStory />,
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const UNIVERSAL_PRESET_OPTIONS = [
|
|
422
|
+
{ id: 'with-name', title: 'Rodyti su asmens vardu, pavarde ir gimimo data' },
|
|
423
|
+
{
|
|
424
|
+
id: 'anonymised',
|
|
425
|
+
title: 'Nuasmenintas (be asmens vardo, pavardės, gimimo datos ir asmens kodo)',
|
|
426
|
+
},
|
|
427
|
+
]
|
|
428
|
+
|
|
429
|
+
const UniversalPresetListStory = () => {
|
|
430
|
+
const [selectedId, setSelectedId] = useState(UNIVERSAL_PRESET_OPTIONS[0].id)
|
|
431
|
+
|
|
432
|
+
const items: AdvancedListItemData[] = UNIVERSAL_PRESET_OPTIONS.map((option) => ({
|
|
433
|
+
...option,
|
|
434
|
+
state: selectedId === option.id ? 'selected' : 'rest',
|
|
435
|
+
leading: {
|
|
436
|
+
type: 'radio',
|
|
437
|
+
name: 'universal-preset',
|
|
438
|
+
checked: selectedId === option.id,
|
|
439
|
+
onChange: () => setSelectedId(option.id),
|
|
440
|
+
},
|
|
441
|
+
}))
|
|
442
|
+
|
|
443
|
+
return <AdvancedList items={items} />
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export const UniversalPresetList: Story = {
|
|
447
|
+
name: 'Preset: pasirenkamų radijo eilučių sąrašas (universalus)',
|
|
448
|
+
render: () => <UniversalPresetListStory />,
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const PAYMENT_TILE_BANKS = [
|
|
452
|
+
{ id: 'swedbank', title: 'Swedbank', initials: 'SW' },
|
|
453
|
+
{ id: 'seb', title: 'SEB bankas', initials: 'SE' },
|
|
454
|
+
{ id: 'luminor', title: 'Luminor', initials: 'Lu' },
|
|
455
|
+
]
|
|
456
|
+
|
|
457
|
+
const PaymentTileListStory = () => {
|
|
458
|
+
const [paymentMethodId, setPaymentMethodId] = useState(PAYMENT_TILE_BANKS[0].id)
|
|
459
|
+
|
|
460
|
+
const items: AdvancedListItemData[] = PAYMENT_TILE_BANKS.map((bank) => ({
|
|
461
|
+
id: bank.id,
|
|
462
|
+
title: bank.title,
|
|
463
|
+
state: paymentMethodId === bank.id ? 'selected' : 'rest',
|
|
464
|
+
leadingMedia: (
|
|
465
|
+
<Avatar
|
|
466
|
+
variant='rounded'
|
|
467
|
+
sx={{ width: '2rem', height: '2rem', bgcolor: 'grey.200', color: 'grey.700' }}
|
|
468
|
+
>
|
|
469
|
+
{bank.initials}
|
|
470
|
+
</Avatar>
|
|
471
|
+
),
|
|
472
|
+
leading: {
|
|
473
|
+
type: 'radio',
|
|
474
|
+
name: 'payment-method',
|
|
475
|
+
checked: paymentMethodId === bank.id,
|
|
476
|
+
onChange: () => setPaymentMethodId(bank.id),
|
|
477
|
+
},
|
|
478
|
+
}))
|
|
479
|
+
|
|
480
|
+
return <AdvancedList items={items} />
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export const PaymentTileList: Story = {
|
|
484
|
+
name: 'Preset: Payment tile (Card + Radio + Leading-media logo)',
|
|
485
|
+
render: () => <PaymentTileListStory />,
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const CART_ITEMS_SOURCE = [
|
|
489
|
+
{
|
|
490
|
+
id: 'ntr-israsas',
|
|
491
|
+
title: 'NTR išrašas (objekto)',
|
|
492
|
+
subtitle: 'Reg. Nr. 4400-1234-5678',
|
|
493
|
+
amount: '12,00 €',
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
id: 'jar-israsas',
|
|
497
|
+
title: 'JAR išrašas',
|
|
498
|
+
subtitle: 'Įmonės kodas 300000000',
|
|
499
|
+
amount: '8,00 €',
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: 'kadastro-israsas',
|
|
503
|
+
title: 'Kadastro žemėlapio ištrauka',
|
|
504
|
+
subtitle: 'Reg. Nr. 4400-9876-5432',
|
|
505
|
+
amount: '5,00 €',
|
|
506
|
+
},
|
|
507
|
+
]
|
|
508
|
+
|
|
509
|
+
const CartWithDeleteListStory = () => {
|
|
510
|
+
const items: AdvancedListItemData[] = CART_ITEMS_SOURCE.map((item) => ({
|
|
511
|
+
id: item.id,
|
|
512
|
+
title: item.title,
|
|
513
|
+
subtitle: item.subtitle,
|
|
514
|
+
trailing: {
|
|
515
|
+
type: 'price',
|
|
516
|
+
amount: item.amount,
|
|
517
|
+
caption: 'su PVM',
|
|
518
|
+
onDelete: () => {},
|
|
519
|
+
deleteAriaLabel: `Pašalinti "${item.title}" iš krepšelio`,
|
|
520
|
+
},
|
|
521
|
+
}))
|
|
522
|
+
|
|
523
|
+
return <AdvancedList items={items} />
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export const CartWithDeleteList: Story = {
|
|
527
|
+
name: 'Preset: Krepšelis (su trynimu)',
|
|
528
|
+
render: () => <CartWithDeleteListStory />,
|
|
529
|
+
}
|