@m4l/components 9.3.12 → 9.3.13-JT010925.beta.2
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/@types/types.d.ts +207 -61
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/filterFieldsSeedData.d.ts +1 -1
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/getRowsWithBackendSimulation.d.ts +2 -2
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/sortsSeedData.d.ts +1 -1
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/types.d.ts +3 -3
- package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/useSeed.d.ts +2 -2
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +1 -1
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +2 -2
- package/components/ObjectLogs/subcomponents/DetailDialog/index.js +2 -4
- package/components/SideBar/tests/constants.d.ts +1 -0
- package/components/Stepper/Stepper.d.ts +8 -0
- package/components/Stepper/Stepper.js +77 -0
- package/components/Stepper/Stepper.styles.d.ts +2 -0
- package/components/Stepper/Stepper.styles.js +302 -0
- package/components/Stepper/constants.d.ts +2 -0
- package/components/Stepper/constants.js +6 -0
- package/components/Stepper/dictionary.d.ts +8 -0
- package/components/Stepper/dictionary.js +14 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.d.ts +9 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.js +17 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/index.d.ts +4 -0
- package/components/Stepper/helpers/index.js +1 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.js +16 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.d.ts +6 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.js +25 -0
- package/components/Stepper/hooks/useStepper/index.d.ts +5 -0
- package/components/Stepper/hooks/useStepper/index.js +14 -0
- package/components/Stepper/hooks/useStepperActions/index.d.ts +8 -0
- package/components/Stepper/hooks/useStepperActions/index.js +76 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.d.ts +7 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.js +20 -0
- package/components/Stepper/icons.d.ts +9 -0
- package/components/Stepper/icons.js +12 -0
- package/components/Stepper/index.d.ts +14 -0
- package/components/Stepper/index.js +1 -0
- package/components/Stepper/slots/StepperEnum.d.ts +27 -0
- package/components/Stepper/slots/StepperEnum.js +37 -0
- package/components/Stepper/slots/StepperSlot.d.ts +60 -0
- package/components/Stepper/slots/StepperSlot.js +102 -0
- package/components/Stepper/store/StepperContext/index.d.ts +17 -0
- package/components/Stepper/store/StepperContext/index.js +91 -0
- package/components/Stepper/store/StepperStore/index.d.ts +16 -0
- package/components/Stepper/store/StepperStore/index.js +131 -0
- package/components/Stepper/store/types.d.ts +61 -0
- package/components/Stepper/subcomponents/ContentArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/ContentArea/index.js +24 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.d.ts +4 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.js +26 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.d.ts +4 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.js +23 -0
- package/components/Stepper/subcomponents/StepArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepArea/index.js +139 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts +5 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +82 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +25 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +42 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +49 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +20 -0
- package/components/Stepper/subcomponents/StepperButtons/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/index.js +1 -0
- package/components/Stepper/subcomponents/StepperContent/index.d.ts +7 -0
- package/components/Stepper/subcomponents/StepperContent/index.js +23 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +42 -0
- package/components/Stepper/subcomponents/StepperFooter/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/index.js +48 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.js +9 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.js +33 -0
- package/components/Stepper/types.d.ts +162 -0
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/extended/React-Json-Viewer/ReactJsonViewer.js +2 -2
- package/components/extended/React-Json-Viewer/helpers/getReactJsonViewerTheme/getReactJsonViewerTheme.d.ts +2 -2
- package/components/extended/React-Json-Viewer/helpers/getReactJsonViewerTheme/getReactJsonViewerTheme.js +16 -16
- package/components/extended/React-Json-Viewer/types.d.ts +2 -2
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/hook-form/RHFormContext/index.js +5 -4
- package/components/hook-form/RHFormContext/types.d.ts +3 -1
- package/components/index.d.ts +1 -0
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.d.ts +11 -0
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.js +44 -0
- package/helpers/getStepsAndValidationSchema/index.d.ts +2 -0
- package/helpers/getStepsAndValidationSchema/index.js +1 -0
- package/helpers/getStepsAndValidationSchema/types.d.ts +21 -0
- package/helpers/getStepsAndValidationSchema/types.js +1 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +80 -52
- package/package.json +2 -2
- package/.storybook/constants.d.ts +0 -21
- package/.storybook/decorators/WithAppearanceContext/WithAppearanceContext.d.ts +0 -6
- package/.storybook/decorators/WithAppearanceContext/index.d.ts +0 -0
- package/.storybook/decorators/WithContexts/WithContexts.d.ts +0 -5
- package/.storybook/decorators/WithContexts/constants.d.ts +0 -10
- package/.storybook/decorators/WithContexts/index.d.ts +0 -1
- package/.storybook/decorators/WithContexts/styles.d.ts +0 -1
- package/.storybook/decorators/WithContexts/subcomponents/AppWithTheme.d.ts +0 -6
- package/.storybook/decorators/WithContexts/types.d.ts +0 -7
- package/.storybook/decorators/WithDictionaryContext/WithDictionaryContext.d.ts +0 -21
- package/.storybook/decorators/WithDictionaryContext/contants.d.ts +0 -3
- package/.storybook/decorators/WithDictionaryContext/index.d.ts +0 -1
- package/.storybook/decorators/WithForm/WithForm.d.ts +0 -8
- package/.storybook/decorators/WithForm/index.d.ts +0 -1
- package/.storybook/decorators/WithFormAutoValidation/WithFormAutoValidation.d.ts +0 -7
- package/.storybook/decorators/WithFormAutoValidation/index.d.ts +0 -1
- package/.storybook/decorators/WithPopupsProvider/WithPopupsProvider.d.ts +0 -10
- package/.storybook/decorators/WithPopupsProvider/index.d.ts +0 -1
- package/.storybook/decorators/WithScaleIcons/WithScaleIcons.d.ts +0 -7
- package/.storybook/decorators/WithScaleIcons/index.d.ts +0 -1
- package/.storybook/decorators/WithWindowsContainer/WithWindowsContainer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsContainer/index.d.ts +0 -2
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/WindowsContainer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/index.d.ts +0 -1
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/types.d.ts +0 -4
- package/.storybook/decorators/WithWindowsContainerSizer/WithWindowsContainerSizer.d.ts +0 -5
- package/.storybook/decorators/WithWindowsToolsAndParmsMFContexts/WithWindowsToolsAndParmsMFContexts.d.ts +0 -5
- package/.storybook/decorators/WithWrapper/WithWrapper.d.ts +0 -24
- package/.storybook/decorators/WithWrapper/index.d.ts +0 -1
- package/.storybook/decorators/WithWrapper/types.d.ts +0 -11
- package/.storybook/decorators/index.d.ts +0 -7
- package/.storybook/main.d.ts +0 -3
- package/.storybook/mocks/config-msw.d.ts +0 -21
- package/.storybook/mocks/index.d.ts +0 -2
- package/.storybook/mocks/network-mocks.d.ts +0 -1
- package/.storybook/storybook.vite.d.ts +0 -2
- package/.storybook/test-utils/index.d.ts +0 -1
- package/.storybook/test-utils/waitForHelpers.d.ts +0 -4
- package/.storybook/utils/flattenDeep.d.ts +0 -8
- package/.storybook/utils/getGlobalsFromSearchParams.d.ts +0 -7
- package/.storybook/utils/getStylesColorsByMode.d.ts +0 -820
- package/components/extended/React-Resizable/Resizable/stories/constants.d.ts +0 -3
- package/components/extended/React-Resizable/Resizable/stories/types.d.ts +0 -3
- package/components/extended/React-Resizable/ResizableBox/stories/constants.d.ts +0 -3
- package/components/extended/React-Resizable/ResizableBox/stories/types.d.ts +0 -3
- package/components/mui_extended/FormControlLabel/FormControlLabel.stories.d.ts +0 -15
- package/hooks/useComponentSize/useComponentSize.stories.d.ts +0 -47
- package/storybook/components/AccountPopover/AccountPopover.stories.d.ts +0 -11
- package/storybook/components/Areas/AreasAdmin/AreasAdmin.stories.d.ts +0 -8
- package/storybook/components/Areas/AreasViewer/AreasViewer.stories.d.ts +0 -7
- package/storybook/components/Areas/AreasViewer/hooks/useWindowsActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/moks/mokData.d.ts +0 -14
- package/storybook/components/Areas/AreasViewer/subcomponents/AreasViewerRender.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/Launcher.d.ts +0 -5
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupButton.d.ts +0 -21
- package/storybook/components/Areas/AreasViewer/subcomponents/Launcher/PopupContentExample.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/ClientsLayout.d.ts +0 -4
- package/storybook/components/Areas/AreasViewer/subcomponents/layouts/UsersLayout.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/AreasViewerWithNetwork.stories.d.ts +0 -7
- package/storybook/components/Areas/AreasViewerWithNetwork/moks/mokData.d.ts +0 -14
- package/storybook/components/Areas/AreasViewerWithNetwork/moks/mokRed.d.ts +0 -1
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/ClientsHeaderActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/UsersHeaderActions.d.ts +0 -4
- package/storybook/components/Areas/AreasViewerWithNetwork/subcomponents/WithExtendedContainer.d.ts +0 -5
- package/storybook/components/Card/Card.stories.d.ts +0 -45
- package/storybook/components/Card/subcomponents/ContentCard.d.ts +0 -8
- package/storybook/components/Card/subcomponents/constants.d.ts +0 -9
- package/storybook/components/Chip/Chip.stories.d.ts +0 -37
- package/storybook/components/Color/Color.stories.d.ts +0 -14
- package/storybook/components/ContainerFlow/ContainerFlow.stories.d.ts +0 -32
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn1Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn2Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn3Wrappers/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderFlexWrap/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/subcomponents/RenderGridLayout/index.d.ts +0 -5
- package/storybook/components/ContainerFlow/wrapperItems/index.d.ts +0 -10
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +0 -87
- package/storybook/components/DataGrid/MswHandles.d.ts +0 -1
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +0 -18
- package/storybook/components/DragResizeWindowRND/stories/DragResizeWindowRND.stories.d.ts +0 -10
- package/storybook/components/DragResizeWindowRND/stories/constants.d.ts +0 -3
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/ContentExample.d.ts +0 -4
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/RNDWindowsContainer.d.ts +0 -5
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/index.d.ts +0 -1
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/RNDWindowsContainer/types.d.ts +0 -4
- package/storybook/components/DragResizeWindowRND/stories/subcomponents/WithExtendedContainer.d.ts +0 -5
- package/storybook/components/DragResizeWindowRND/stories/types.d.ts +0 -3
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +0 -49
- package/storybook/components/DynamicFilter/mocks/mocksData.d.ts +0 -1
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +0 -45
- package/storybook/components/FormContainer/FormContainer.stories.d.ts +0 -9
- package/storybook/components/HelperError/HelperError.stories.d.ts +0 -9
- package/storybook/components/Icon/Icon.stories.d.ts +0 -25
- package/storybook/components/Label/Label.stories.d.ts +0 -18
- package/storybook/components/LanguagePopover/LanguagePopover.stories.d.ts +0 -17
- package/storybook/components/LanguagePopover/moks/mokData.d.ts +0 -4
- package/storybook/components/LoadingError/Loadingerror.stories.d.ts +0 -9
- package/storybook/components/MenuActions/MenuActions.stories.d.ts +0 -72
- package/storybook/components/ModalDialog/ModalDialog.stories.d.ts +0 -8
- package/storybook/components/ModalDialog/subcomponent/WithExtendedContainer.d.ts +0 -33
- package/storybook/components/NoItemPrivileges/NoItemPrivileges.stories.d.ts +0 -12
- package/storybook/components/NoItemSelect/NoItemSelect.stories.d.ts +0 -12
- package/storybook/components/NumberInput/NumberInput.default.stories.d.ts +0 -17
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +0 -7
- package/storybook/components/ObjectLogs/mockData/index.d.ts +0 -4
- package/storybook/components/PDFViewer/PDFViewer.stories.d.ts +0 -9
- package/storybook/components/Pager/Pager.stories.d.ts +0 -21
- package/storybook/components/Pager/subcomopnents/WithContextDataProvider.d.ts +0 -4
- package/storybook/components/PaperForm/PaperForm.stories.d.ts +0 -31
- package/storybook/components/PopupsViewer/basic.stories.d.ts +0 -16
- package/storybook/components/PopupsViewer/dictionary.d.ts +0 -1
- package/storybook/components/PopupsViewer/subcomponents/PopupActions.d.ts +0 -6
- package/storybook/components/PopupsViewer/subcomponents/PopupContentExample.d.ts +0 -5
- package/storybook/components/PopupsViewer/subcomponents/WithExtendedPopupsContainer.d.ts +0 -5
- package/storybook/components/PopupsViewer/subcomponents/initialPopups.d.ts +0 -6
- package/storybook/components/PopupsViewer/types.d.ts +0 -3
- package/storybook/components/PrintingSystem/PrintingSystem.stories.d.ts +0 -6
- package/storybook/components/PropertyValue/PropertyValue.stories.d.ts +0 -65
- package/storybook/components/ScrollBar/ScrollBar.stories.d.ts +0 -7
- package/storybook/components/SettingsLayout/SettingsLayout.stories.d.ts +0 -6
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/SettingsLayoutsRender.d.ts +0 -5
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/index.d.ts +0 -1
- package/storybook/components/SideBar/SideBar.stories.d.ts +0 -24
- package/storybook/components/SideBar/data/menuData.d.ts +0 -2
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/constants.d.ts +0 -3
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +0 -14
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/SibarDecorator.d.ts +0 -3
- package/storybook/components/ToastContainer/ToastContainer.stories.d.ts +0 -47
- package/storybook/components/WindowBase/windowBase.stories.d.ts +0 -69
- package/storybook/components/WindowConfirm/windowConfirm.stories.d.ts +0 -8
- package/storybook/components/appBar/AppBar.stories.d.ts +0 -9
- package/storybook/components/commonActions/components/ActionCancel/ActionCancel.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionFormCancel/ActionFormCancel.stories.d.ts +0 -6
- package/storybook/components/commonActions/components/ActionFormIntro/ActionFormIntro.stories.d.ts +0 -14
- package/storybook/components/commonActions/components/ActionIntro/ActionIntro.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionsContainer/ActionsContainer.stories.d.ts +0 -13
- package/storybook/components/extended/React-Json-Viewer/ReactJsonViewer.stories.d.ts +0 -9
- package/storybook/components/extended/React-Router-Dom/NavLink/NavLInk.stories.d.ts +0 -16
- package/storybook/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.stories.d.ts +0 -9
- package/storybook/components/extended/React-Splitter-Layout/SplitLayout.stories.d.ts +0 -13
- package/storybook/components/extended/React-resizable-panels/SplitLayout.stories.d.ts +0 -13
- package/storybook/components/extended/mui/Accordion/Accordion.stories.d.ts +0 -77
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +0 -21
- package/storybook/components/extended/mui/Badge/Badge.stories.d.ts +0 -37
- package/storybook/components/extended/mui/Button/Button.stories.d.ts +0 -19
- package/storybook/components/extended/mui/Button/ButtonDataGridWithActions.d.ts +0 -5
- package/storybook/components/extended/mui/CheckBox/CheckBox.stories.d.ts +0 -19
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.default.stories.d.ts +0 -14
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.sizes.stories.d.ts +0 -18
- package/storybook/components/extended/mui/DataTimePicker/DataTimePicker.stories.d.ts +0 -21
- package/storybook/components/extended/mui/Dialog/Dialog.stories.d.ts +0 -7
- package/storybook/components/extended/mui/Dialog/subcomponents/ContentExample.d.ts +0 -29
- package/storybook/components/extended/mui/Dialog/subcomponents/WithExtendedContainer.d.ts +0 -34
- package/storybook/components/extended/mui/Divider/Divider.stories.d.ts +0 -15
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -39
- package/storybook/components/extended/mui/LoadingButton/LoadingButton.stories.d.ts +0 -42
- package/storybook/components/extended/mui/MenuDivider/MenuDivider.stories.d.ts +0 -25
- package/storybook/components/extended/mui/MenuItem/MenuItem.stories.d.ts +0 -65
- package/storybook/components/extended/mui/Popover/Popover.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Popover/WithPopoverContext.d.ts +0 -11
- package/storybook/components/extended/mui/Popover/types.d.ts +0 -11
- package/storybook/components/extended/mui/Popper/Popper.stories.d.ts +0 -9
- package/storybook/components/extended/mui/Select/Select.stories.d.ts +0 -38
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Circular/skeleton.defaultCircular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rectangular/skeleton.defaultRectangular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rounded/skeleton.defaultRounded.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Text/skeleton.defaultText.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Stack/Stack.stories.d.ts +0 -13
- package/storybook/components/extended/mui/Tab/Tab.stories.d.ts +0 -57
- package/storybook/components/extended/mui/TabContent/TabContent.stories.d.ts +0 -17
- package/storybook/components/extended/mui/Tabs/Tabs.stories.d.ts +0 -8
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +0 -32
- package/storybook/components/extended/mui/TimePicker/TimePicker.stories.d.ts +0 -21
- package/storybook/components/extended/mui/ToggleButton/ToggleButton.stories.d.ts +0 -53
- package/storybook/components/extended/mui/ToggleIconButton/ToggleIconButton.stories.d.ts +0 -49
- package/storybook/components/extended/mui/Tooltip/Tooltip.stories.d.ts +0 -17
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/body/Estados/typography.body.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/bodyDens/Estados/typography.bodyDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h1/Estados/typography.h1.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h2/Estados/typography.h2.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h3/Estados/typography.h3.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h5/Estados/typography.h5.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraph/Estados/typography.paragraph.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraphDens/Estados/typography.paragraphDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitle/Estados/typography.subtitle.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitleDens/Estados/typography.subtitleDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/avatar/Avatar.stories.d.ts +0 -12
- package/storybook/components/extended/react-resizable/ResizableBox/resizableBox.stories.d.ts +0 -13
- package/storybook/components/formatters/BooleanFormatter/BooleanFormatter.stories.d.ts +0 -41
- package/storybook/components/formatters/ChipStatusFormatter/ChipStatusFormatter.stories.d.ts +0 -13
- package/storybook/components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.stories.d.ts +0 -13
- package/storybook/components/formatters/DateFormatter/DateFormatter.stories.d.ts +0 -29
- package/storybook/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.stories.d.ts +0 -157
- package/storybook/components/formatters/DistanceToNowFormatter/subcomponents/WithDTNFProvider.d.ts +0 -5
- package/storybook/components/formatters/DistanceToNowFormatter/types.d.ts +0 -3
- package/storybook/components/formatters/PeriodFormatter/PeriodFormatter.stories.d.ts +0 -36
- package/storybook/components/formatters/PoinsFormatter/PointsFormatter.stories.d.ts +0 -21
- package/storybook/components/formatters/PriceFormatter/PriceFormatter.stories.d.ts +0 -17
- package/storybook/components/formatters/UncertaintyFormatter/UncertaintyFormatter.stories.d.ts +0 -13
- package/storybook/components/image/image.stories.d.ts +0 -11
- package/storybook/hook-form/RHFAutocomplete/RHFAutocomplete.stories.d.ts +0 -22
- package/storybook/hook-form/RHFAutocomplete/constants.d.ts +0 -23
- package/storybook/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.stories.d.ts +0 -23
- package/storybook/hook-form/RHFAutocompleteAsync/constants.d.ts +0 -14
- package/storybook/hook-form/RHFAutocompleteAsync/handlers.d.ts +0 -1
- package/storybook/hook-form/RHFCheckBox/RHFCheckBox.stories.d.ts +0 -8
- package/storybook/hook-form/RHFColorPicker/RHFColorPicker.stories.d.ts +0 -21
- package/storybook/hook-form/RHFDateTime/RHFDateTime.stories.d.ts +0 -21
- package/storybook/hook-form/RHFNumberInput/RHFNumberInput.stories.d.ts +0 -21
- package/storybook/hook-form/RHFPeriod/RHFPeriod.stories.d.ts +0 -8
- package/storybook/hook-form/RHFSelect/RHFSelect.stories.d.ts +0 -32
- package/storybook/hook-form/RHFTextField/RHFTextField.stories.d.ts +0 -25
- package/storybook/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.stories.d.ts +0 -27
- package/storybook/hook-form/RHFTimePicker/RHFTimePicker.stories.d.ts +0 -21
- package/storybook/hook-form/RHFUploadImage/RHFUploadImage.stories.d.ts +0 -8
- package/storybook/hook-form/RHFUploadSingleFile/RHFUploadSingleFile.stories.d.ts +0 -11
- package/storybook/wrappers/LineGuide/LineGuide.d.ts +0 -9
- package/storybook/wrappers/LineGuide/styles.d.ts +0 -1
- package/storybook/wrappers/LineGuide/types.d.ts +0 -5
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/getRows.d.ts +0 -0
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/icons.d.ts +0 -0
- /package/{storybook/components/DataGrid → components/DataGrid/tests}/helpers/useColumns.d.ts +0 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
+
const stepperStyles = {
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Estilos para el contenedor principal del Stepper.
|
|
6
|
+
*/
|
|
7
|
+
stepperRoot: ({ theme, ownerState }) => ({
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
justifyContent: ownerState?.stepperFooterSticky ? "flex-start" : "space-between",
|
|
11
|
+
background: theme.vars.palette.background.default,
|
|
12
|
+
width: "100%",
|
|
13
|
+
height: "100%",
|
|
14
|
+
borderRadius: theme.vars.size.borderRadius.r1
|
|
15
|
+
}),
|
|
16
|
+
/**
|
|
17
|
+
* Estilos para la sección que contiene los pasos del Stepper.
|
|
18
|
+
*/
|
|
19
|
+
contentSection: ({ theme, ownerState }) => ({
|
|
20
|
+
display: "flex",
|
|
21
|
+
flex: 1,
|
|
22
|
+
height: "100%",
|
|
23
|
+
overflow: "hidden",
|
|
24
|
+
flexDirection: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "column" : "row",
|
|
25
|
+
gap: theme.vars.size.baseSpacings.sp8
|
|
26
|
+
}),
|
|
27
|
+
/**
|
|
28
|
+
* Estilos para la sección que contiene los botones de acción del Stepper.
|
|
29
|
+
*/
|
|
30
|
+
stepArea: ({ theme, ownerState }) => ({
|
|
31
|
+
...ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "start",
|
|
34
|
+
width: "100%",
|
|
35
|
+
minWidth: "350px",
|
|
36
|
+
overflowX: "auto",
|
|
37
|
+
overflowY: "hidden"
|
|
38
|
+
} : {
|
|
39
|
+
maxWidth: "116px",
|
|
40
|
+
overflowY: "auto"
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
/**
|
|
44
|
+
* Estilos para el área de contenido del Stepper.
|
|
45
|
+
*/
|
|
46
|
+
contentArea: ({ theme, ownerState }) => ({
|
|
47
|
+
flex: 1,
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: "column",
|
|
50
|
+
gap: theme.vars.size.baseSpacings.sp6,
|
|
51
|
+
...ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? {
|
|
52
|
+
borderTop: "1px solid",
|
|
53
|
+
paddingTop: theme.vars.size.baseSpacings.sp8
|
|
54
|
+
} : {
|
|
55
|
+
borderLeft: "1px solid",
|
|
56
|
+
paddingLeft: theme.vars.size.baseSpacings.sp8
|
|
57
|
+
},
|
|
58
|
+
borderColor: theme.vars.palette?.border.disabled
|
|
59
|
+
}),
|
|
60
|
+
/**
|
|
61
|
+
* Estilos para cada paso del Stepper.
|
|
62
|
+
*/
|
|
63
|
+
step: ({ theme, ownerState }) => {
|
|
64
|
+
const currentStep = ownerState?.currentStep ?? 0;
|
|
65
|
+
const step = ownerState?.step ?? 0;
|
|
66
|
+
const totalSteps = ownerState?.totalSteps ?? 0;
|
|
67
|
+
const isCompleted = currentStep > step;
|
|
68
|
+
const isLastStep = step === totalSteps - 1;
|
|
69
|
+
return {
|
|
70
|
+
cursor: "pointer",
|
|
71
|
+
display: "flex",
|
|
72
|
+
flexDirection: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "column" : "row",
|
|
73
|
+
alignItems: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "center" : "start",
|
|
74
|
+
justifyContent: ownerState?.visibleTitle ? "space-between" : "center",
|
|
75
|
+
gap: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? theme.vars.size.baseSpacings.sp1 : theme.vars.size.baseSpacings.sp4,
|
|
76
|
+
width: "100%",
|
|
77
|
+
...(ownerState?.orientation === "vertical" || theme.generalSettings.isMobile) && {
|
|
78
|
+
minWidth: theme.vars.size.baseSpacings.sp10
|
|
79
|
+
},
|
|
80
|
+
height: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "auto" : theme.vars.size.baseSpacings.sp13,
|
|
81
|
+
position: "relative",
|
|
82
|
+
...!isLastStep && (ownerState?.orientation === "vertical" || theme.generalSettings.isMobile) && {
|
|
83
|
+
"&::after": {
|
|
84
|
+
content: '""',
|
|
85
|
+
position: "absolute",
|
|
86
|
+
top: ownerState?.orientation === "horizontal" && theme.generalSettings.isMobile ? "16px" : "10px",
|
|
87
|
+
// Ajustado para coincidir con el centro del indicador cuando alignItems es start
|
|
88
|
+
height: "1px",
|
|
89
|
+
borderTop: `1px ${isCompleted ? "solid" : "dashed"} ${isCompleted ? theme.vars.palette.primary.enabled : theme.vars.palette.border.default}`,
|
|
90
|
+
left: "50%",
|
|
91
|
+
width: "100%"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Estilos para el nombre del paso dentro del Stepper.
|
|
98
|
+
*/
|
|
99
|
+
stepName: ({ theme, ownerState }) => ({
|
|
100
|
+
...ownerState?.orientation === "horizontal" && {
|
|
101
|
+
height: theme.generalSettings.isMobile ? theme.vars.size.mobile.medium.action : theme.vars.size.desktop.large.action
|
|
102
|
+
},
|
|
103
|
+
...(ownerState?.orientation === "vertical" || theme.generalSettings.isMobile) && {
|
|
104
|
+
maxWidth: "120px",
|
|
105
|
+
width: "100%",
|
|
106
|
+
lineHeight: "1.2",
|
|
107
|
+
marginTop: theme.vars.size.baseSpacings.sp1
|
|
108
|
+
},
|
|
109
|
+
alignContent: "center",
|
|
110
|
+
cursor: "pointer",
|
|
111
|
+
overflow: "hidden",
|
|
112
|
+
...theme.generalSettings.isMobile ? {
|
|
113
|
+
display: "none"
|
|
114
|
+
} : {
|
|
115
|
+
display: ownerState?.visibleTitle ? "-webkit-box" : "none"
|
|
116
|
+
},
|
|
117
|
+
WebkitBoxOrient: "vertical",
|
|
118
|
+
WebkitLineClamp: 2,
|
|
119
|
+
textOverflow: "ellipsis",
|
|
120
|
+
flex: 1,
|
|
121
|
+
minWidth: 0,
|
|
122
|
+
whiteSpace: "normal",
|
|
123
|
+
order: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? 1 : 0,
|
|
124
|
+
"&.M4LTypography-root": {
|
|
125
|
+
color: (ownerState?.currentStep ?? 0) > (ownerState?.step ?? 0) ? theme.vars.palette.primary.semanticText : (ownerState?.currentStep ?? 0) === (ownerState?.step ?? 0) ? theme.vars.palette.text.primary : theme.vars.palette.text.secondary,
|
|
126
|
+
textAlign: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? "center" : "right"
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
/**
|
|
130
|
+
* Estilos para el indicador numérico de cada paso del Stepper.
|
|
131
|
+
*/
|
|
132
|
+
indicator: ({ theme, ownerState }) => {
|
|
133
|
+
const currentStep = ownerState?.currentStep ?? 0;
|
|
134
|
+
const step = ownerState?.step ?? 0;
|
|
135
|
+
const totalSteps = ownerState?.totalSteps ?? 0;
|
|
136
|
+
const isCompleted = currentStep > step;
|
|
137
|
+
const isCurrent = currentStep === step;
|
|
138
|
+
const isLastStep = step === totalSteps - 1;
|
|
139
|
+
const isValidStep = ownerState?.stepValidationStatus?.[step] ?? true;
|
|
140
|
+
return {
|
|
141
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "case", (size) => {
|
|
142
|
+
return {
|
|
143
|
+
width: size,
|
|
144
|
+
height: size
|
|
145
|
+
};
|
|
146
|
+
}),
|
|
147
|
+
...ownerState?.orientation === "horizontal" ? {
|
|
148
|
+
marginTop: theme.generalSettings.isMobile ? "6px" : theme.vars.size.baseSpacings.sp1
|
|
149
|
+
} : {},
|
|
150
|
+
display: "flex",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center",
|
|
153
|
+
flexShrink: 0,
|
|
154
|
+
order: ownerState?.orientation === "vertical" || theme.generalSettings.isMobile ? 0 : 1,
|
|
155
|
+
background: isCompleted ? ownerState?.indicatorType === "dot" || theme.generalSettings.isMobile ? theme.vars.palette.background.default : theme.vars.palette.primary.toneOpacity : !isValidStep ? theme.vars.palette.error.enabled : ownerState?.indicatorType === "dot" || theme.generalSettings.isMobile ? theme.vars.palette.background.default : isCurrent ? theme.vars.palette.primary.enabled : theme.vars.palette.default.enabled,
|
|
156
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
157
|
+
...ownerState?.indicatorType === "number" && !theme.generalSettings.isMobile && {
|
|
158
|
+
boxShadow: isCurrent ? "0 2px 8px 0 rgb(0, 100, 255, 0.16)" : "none"
|
|
159
|
+
},
|
|
160
|
+
position: "relative",
|
|
161
|
+
...!isLastStep && ownerState?.orientation === "horizontal" && !theme.generalSettings.isMobile && {
|
|
162
|
+
"&::after": {
|
|
163
|
+
content: '""',
|
|
164
|
+
position: "absolute",
|
|
165
|
+
top: "100%",
|
|
166
|
+
left: "50%",
|
|
167
|
+
transform: "translateX(-50%)",
|
|
168
|
+
width: "1px",
|
|
169
|
+
height: theme.vars.size.baseSpacings.sp12,
|
|
170
|
+
borderLeft: `1px ${isCompleted ? "solid" : "dashed"} ${isCompleted ? theme.vars.palette.primary.enabled : theme.vars.palette.border.default}`
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
/**
|
|
176
|
+
* Estilos para el número de texto dentro del indicador numérico del Stepper.
|
|
177
|
+
*/
|
|
178
|
+
textNumber: ({ theme, ownerState }) => {
|
|
179
|
+
const currentStep = ownerState?.currentStep ?? 0;
|
|
180
|
+
const step = ownerState?.step ?? 0;
|
|
181
|
+
const isCompleted = currentStep > step;
|
|
182
|
+
const isCurrent = currentStep === step;
|
|
183
|
+
return {
|
|
184
|
+
"&.M4LTypography-root": {
|
|
185
|
+
color: isCompleted || isCurrent ? theme.vars.palette.primary.contrastText : theme.vars.palette.text.primary
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Estilos para el área de contenido del Stepper.
|
|
191
|
+
*/
|
|
192
|
+
contentAreaHeader: ({ theme }) => ({
|
|
193
|
+
display: "flex",
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
gap: theme.size.baseSpacings.sp3,
|
|
196
|
+
position: "sticky",
|
|
197
|
+
top: 0,
|
|
198
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
199
|
+
zIndex: 10,
|
|
200
|
+
paddingBottom: theme.vars.size.baseSpacings.sp2
|
|
201
|
+
}),
|
|
202
|
+
/**
|
|
203
|
+
* Estilos para el cuerpo del área de contenido del Stepper
|
|
204
|
+
*/
|
|
205
|
+
contentAreaBody: ({ theme }) => ({
|
|
206
|
+
flex: 1,
|
|
207
|
+
overflowY: "auto",
|
|
208
|
+
display: "flex",
|
|
209
|
+
flexDirection: "column",
|
|
210
|
+
gap: theme.vars.size.baseSpacings.sp6
|
|
211
|
+
}),
|
|
212
|
+
/**
|
|
213
|
+
* Estilos para el contenedor del icono del titulo del Stepper.
|
|
214
|
+
*/
|
|
215
|
+
wrapperIcon: ({ theme, ownerState }) => ({
|
|
216
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "box", (size) => {
|
|
217
|
+
return {
|
|
218
|
+
width: size,
|
|
219
|
+
height: size
|
|
220
|
+
};
|
|
221
|
+
}),
|
|
222
|
+
display: "flex",
|
|
223
|
+
alignItems: "center",
|
|
224
|
+
justifyContent: "center",
|
|
225
|
+
background: theme.vars.palette.primary.enabledOpacity,
|
|
226
|
+
borderRadius: theme.vars.size.borderRadius["r1-5"]
|
|
227
|
+
}),
|
|
228
|
+
/**
|
|
229
|
+
* Estilos para el título del Stepper.
|
|
230
|
+
*/
|
|
231
|
+
wrapperTitle: ({ theme }) => ({
|
|
232
|
+
color: theme.vars.palette.text.primary,
|
|
233
|
+
display: "flex",
|
|
234
|
+
flexDirection: "column",
|
|
235
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
236
|
+
}),
|
|
237
|
+
/**
|
|
238
|
+
* Estilos para el icono del Stepper.
|
|
239
|
+
*/
|
|
240
|
+
icon: ({ theme, ownerState }) => ({
|
|
241
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "case", (size) => {
|
|
242
|
+
return {
|
|
243
|
+
width: size,
|
|
244
|
+
height: size
|
|
245
|
+
};
|
|
246
|
+
})
|
|
247
|
+
}),
|
|
248
|
+
/**
|
|
249
|
+
* Estilos para el título del Stepper.
|
|
250
|
+
*/
|
|
251
|
+
title: () => ({}),
|
|
252
|
+
/**
|
|
253
|
+
* Estilos para la descripción del Stepper.
|
|
254
|
+
*/
|
|
255
|
+
description: ({ theme }) => ({
|
|
256
|
+
"&.M4LTypography-root": {
|
|
257
|
+
color: theme.vars.palette.text.secondary
|
|
258
|
+
}
|
|
259
|
+
}),
|
|
260
|
+
/**
|
|
261
|
+
* Estilos para la sección de botones de acción del Stepper.
|
|
262
|
+
*/
|
|
263
|
+
stepperFooterSection: ({ theme, ownerState }) => ({
|
|
264
|
+
display: "flex",
|
|
265
|
+
alignItems: "center",
|
|
266
|
+
justifyContent: "space-between",
|
|
267
|
+
paddingTop: theme.vars.size.baseSpacings.sp4,
|
|
268
|
+
...ownerState?.stepperFooterSticky && {
|
|
269
|
+
position: "sticky",
|
|
270
|
+
bottom: 0,
|
|
271
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
272
|
+
marginTop: "auto",
|
|
273
|
+
zIndex: 10
|
|
274
|
+
}
|
|
275
|
+
}),
|
|
276
|
+
/**
|
|
277
|
+
* Estilos para las acciones del lado izquierdo del StepperFooter.
|
|
278
|
+
*/
|
|
279
|
+
stepperFooterLeftActions: ({ theme }) => ({
|
|
280
|
+
display: "flex",
|
|
281
|
+
alignItems: "center",
|
|
282
|
+
gap: theme.vars.size.baseSpacings.sp3
|
|
283
|
+
}),
|
|
284
|
+
/**
|
|
285
|
+
* Estilos para las acciones del lado derecho del StepperFooter.
|
|
286
|
+
*/
|
|
287
|
+
stepperFooterRightActions: ({ theme }) => ({
|
|
288
|
+
display: "flex",
|
|
289
|
+
alignItems: "center",
|
|
290
|
+
gap: theme.vars.size.baseSpacings.sp3
|
|
291
|
+
}),
|
|
292
|
+
/**
|
|
293
|
+
* Estilos para el contenedor de los botones del Stepper.
|
|
294
|
+
*/
|
|
295
|
+
wrapperButtons: ({ theme }) => ({
|
|
296
|
+
display: "flex",
|
|
297
|
+
gap: theme.size.baseSpacings.sp3
|
|
298
|
+
})
|
|
299
|
+
};
|
|
300
|
+
export {
|
|
301
|
+
stepperStyles as s
|
|
302
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const STEPPER_DICTIONARY_ID = "stepper";
|
|
2
|
+
export declare function getStepperComponentsDictionary(): string[];
|
|
3
|
+
export declare const DICTIONARY: {
|
|
4
|
+
LABEL_PREV_BUTTON: string;
|
|
5
|
+
LABEL_NEXT_BUTTON: string;
|
|
6
|
+
LABEL_CANCEL_BUTTON: string;
|
|
7
|
+
LABEL_SUBMIT_BUTTON: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const STEPPER_DICTIONARY_ID = "stepper";
|
|
2
|
+
function getStepperComponentsDictionary() {
|
|
3
|
+
return [STEPPER_DICTIONARY_ID];
|
|
4
|
+
}
|
|
5
|
+
const DICTIONARY = {
|
|
6
|
+
LABEL_PREV_BUTTON: `${STEPPER_DICTIONARY_ID}.label_prev_button`,
|
|
7
|
+
LABEL_NEXT_BUTTON: `${STEPPER_DICTIONARY_ID}.label_next_button`,
|
|
8
|
+
LABEL_CANCEL_BUTTON: `${STEPPER_DICTIONARY_ID}.label_cancel_button`,
|
|
9
|
+
LABEL_SUBMIT_BUTTON: `${STEPPER_DICTIONARY_ID}.label_submit_button`
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
DICTIONARY as D,
|
|
13
|
+
getStepperComponentsDictionary as g
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormData, Step, VisibilityData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* evaluateVisibilityStepCondition - Función helper que evalúa si un step debe ser visible según su condition
|
|
4
|
+
* @param step - El step a evaluar
|
|
5
|
+
* @param formData - Datos del formulario actual para evaluar la condition
|
|
6
|
+
* @param visibilityData - Datos adicionales para evaluar la condition (ej: objectId)
|
|
7
|
+
* @returns boolean - Retorna true si el step debe ser visible, false en caso contrario
|
|
8
|
+
*/
|
|
9
|
+
export declare const evaluateVisibilityStepCondition: (step: Step, formData?: FormData, visibilityData?: VisibilityData) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const evaluateVisibilityStepCondition = (step, formData, visibilityData) => {
|
|
2
|
+
if (!step.visibilityCondition) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
try {
|
|
6
|
+
return step.visibilityCondition(formData || {}, visibilityData);
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.error(
|
|
9
|
+
`Error evualuando la condición del step "${step.key}":`,
|
|
10
|
+
error
|
|
11
|
+
);
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
evaluateVisibilityStepCondition as e
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormData, Step, VisibilityData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* findNextVisibleValidStep - Función helper que busca el siguiente step válido según su visibilityCondition.
|
|
4
|
+
* @param currentStepIndex - Índice del step actual
|
|
5
|
+
* @param steps - Lista de todos los steps del Stepper
|
|
6
|
+
* @param formData - Datos del formulario actual para evaluar las conditions
|
|
7
|
+
* @param visibilityData - Datos adicionales para evaluar las conditions (ej: objectId)
|
|
8
|
+
* @returns number - Retorna el índice del siguiente step válido, o steps.length si no hay más steps válidos
|
|
9
|
+
*/
|
|
10
|
+
export declare const findNextVisibleValidStep: (currentStepIndex: number, steps: Step[], formData?: FormData, visibilityData?: VisibilityData) => number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { e as evaluateVisibilityStepCondition } from "../evaluateVisibilityStepCondition/index.js";
|
|
2
|
+
const findNextVisibleValidStep = (currentStepIndex, steps, formData, visibilityData) => {
|
|
3
|
+
for (let i = currentStepIndex + 1; i < steps.length; i++) {
|
|
4
|
+
const step = steps[i];
|
|
5
|
+
if (evaluateVisibilityStepCondition(step, formData || {}, visibilityData)) {
|
|
6
|
+
return i;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return steps.length;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
findNextVisibleValidStep as f
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormData, Step, VisibilityData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* findPrevVisibleValidStep - Función helper que busca el paso anterior válido según su condition
|
|
4
|
+
* @param currentStepIndex - Índice del step actual
|
|
5
|
+
* @param steps - Lista de todos los steps del Stepper
|
|
6
|
+
* @param formData - Datos del formulario actual para evaluar las conditions
|
|
7
|
+
* @param visibilityData - Datos adicionales para evaluar las conditions (ej: objectId)
|
|
8
|
+
* @returns number - Retorna el índice del step anterior válido, o -1 si no hay steps anteriores válidos
|
|
9
|
+
*/
|
|
10
|
+
export declare const findPrevVisibleValidStep: (currentStepIndex: number, steps: Step[], formData?: FormData, visibilityData?: VisibilityData) => number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { e as evaluateVisibilityStepCondition } from "../evaluateVisibilityStepCondition/index.js";
|
|
2
|
+
const findPrevVisibleValidStep = (currentStepIndex, steps, formData, visibilityData) => {
|
|
3
|
+
for (let i = currentStepIndex - 1; i >= 0; i--) {
|
|
4
|
+
const step = steps[i];
|
|
5
|
+
if (evaluateVisibilityStepCondition(step, formData || {}, visibilityData)) {
|
|
6
|
+
return i;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return -1;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
findPrevVisibleValidStep as f
|
|
13
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { evaluateVisibilityStepCondition } from './evaluateVisibilityStepCondition';
|
|
2
|
+
export { findNextVisibleValidStep } from './findNextVisibleValidStep';
|
|
3
|
+
export { findPrevVisibleValidStep } from './findPrevVisibleValidStep';
|
|
4
|
+
export { isLastVisibleValidStep } from './isLastVisibleValidStep';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormData, Step, VisibilityData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* isLastVisibleValidStep - Función helper que determina si el paso actual es el último paso válido
|
|
4
|
+
* @param currentStepIndex - Índice del step actual
|
|
5
|
+
* @param steps - Lista de todos los steps del Stepper
|
|
6
|
+
* @param formData - Datos del formulario actual para evaluar las conditions
|
|
7
|
+
* @param visibilityData - Datos adicionales para evaluar las conditions (ej: objectId)
|
|
8
|
+
* @returns boolean - Retorna true si el paso actual es el último paso válido
|
|
9
|
+
*/
|
|
10
|
+
export declare const isLastVisibleValidStep: (currentStepIndex: number, steps: Step[], formData?: FormData, visibilityData?: VisibilityData) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { e as evaluateVisibilityStepCondition } from "../evaluateVisibilityStepCondition/index.js";
|
|
2
|
+
const isLastVisibleValidStep = (currentStepIndex, steps, formData, visibilityData) => {
|
|
3
|
+
if (!steps || currentStepIndex >= steps.length || currentStepIndex < 0) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
for (let i = currentStepIndex + 1; i < steps.length; i++) {
|
|
7
|
+
const step = steps[i];
|
|
8
|
+
if (evaluateVisibilityStepCondition(step, formData || {}, visibilityData)) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
isLastVisibleValidStep as i
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useIsLastVisibleValidStep - Hook que determina si el paso actual es el último paso válido
|
|
3
|
+
* considerando la "visibilityCondition" de cada step y los datos actuales del formulario
|
|
4
|
+
* @returns boolean - true si estamos en el último paso válido
|
|
5
|
+
*/
|
|
6
|
+
export declare const useIsLastVisibleValidStep: () => boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useFormContext } from "react-hook-form";
|
|
2
|
+
import { u as useStepper } from "../useStepper/index.js";
|
|
3
|
+
import { shallow } from "zustand/shallow";
|
|
4
|
+
import { i as isLastVisibleValidStep } from "../../helpers/isLastVisibleValidStep/index.js";
|
|
5
|
+
const useIsLastVisibleValidStep = () => {
|
|
6
|
+
const { getValues } = useFormContext();
|
|
7
|
+
const { currentStep, steps, visibilityData } = useStepper(
|
|
8
|
+
(state) => ({
|
|
9
|
+
currentStep: state.currentStep,
|
|
10
|
+
steps: state.steps,
|
|
11
|
+
visibilityData: state.visibilityData
|
|
12
|
+
}),
|
|
13
|
+
shallow
|
|
14
|
+
);
|
|
15
|
+
const formData = getValues();
|
|
16
|
+
return isLastVisibleValidStep(
|
|
17
|
+
currentStep,
|
|
18
|
+
steps || [],
|
|
19
|
+
formData,
|
|
20
|
+
visibilityData
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
useIsLastVisibleValidStep as u
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { useStore } from "zustand";
|
|
3
|
+
import { shallow } from "zustand/shallow";
|
|
4
|
+
import { a as StepperContext } from "../../store/StepperContext/index.js";
|
|
5
|
+
function useStepper(selector, equalityFn) {
|
|
6
|
+
const store = useContext(StepperContext);
|
|
7
|
+
if (!store) {
|
|
8
|
+
throw new Error("useStepper context must be use inside StepperContext");
|
|
9
|
+
}
|
|
10
|
+
return useStore(store, selector, equalityFn ?? shallow);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useStepper as u
|
|
14
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { u as useStepper } from "../useStepper/index.js";
|
|
3
|
+
import { useFormContext } from "react-hook-form";
|
|
4
|
+
import { shallow } from "zustand/shallow";
|
|
5
|
+
function useStepperActions() {
|
|
6
|
+
const { trigger, clearErrors, getValues, reset } = useFormContext();
|
|
7
|
+
const {
|
|
8
|
+
nextStep,
|
|
9
|
+
prevStep,
|
|
10
|
+
currentStep,
|
|
11
|
+
steps,
|
|
12
|
+
setStepValidationStatus,
|
|
13
|
+
resetStepper
|
|
14
|
+
} = useStepper(
|
|
15
|
+
(state) => ({
|
|
16
|
+
nextStep: state.actions.nextStep,
|
|
17
|
+
prevStep: state.actions.prevStep,
|
|
18
|
+
currentStep: state.currentStep,
|
|
19
|
+
steps: state.steps,
|
|
20
|
+
setStepValidationStatus: state.actions.setStepValidationStatus,
|
|
21
|
+
resetStepper: state.actions.resetStepper
|
|
22
|
+
}),
|
|
23
|
+
shallow
|
|
24
|
+
);
|
|
25
|
+
const prevStepAction = useCallback(() => {
|
|
26
|
+
const formData = getValues();
|
|
27
|
+
prevStep(formData);
|
|
28
|
+
}, [prevStep, getValues]);
|
|
29
|
+
const nextStepAction = useCallback(async () => {
|
|
30
|
+
const formData = getValues();
|
|
31
|
+
const futureSteps = steps.slice(currentStep + 1);
|
|
32
|
+
const futureFields = [];
|
|
33
|
+
futureSteps.forEach((step) => {
|
|
34
|
+
if (step.validationFields) {
|
|
35
|
+
futureFields.push(...step.validationFields);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const validateFn = async () => {
|
|
39
|
+
const currentStepData = steps[currentStep];
|
|
40
|
+
const fieldsToValidate = currentStepData?.validationFields || [];
|
|
41
|
+
if (fieldsToValidate.length === 0) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return await trigger(fieldsToValidate);
|
|
45
|
+
};
|
|
46
|
+
const success = await nextStep(validateFn, formData);
|
|
47
|
+
if (success && futureFields.length > 0) {
|
|
48
|
+
clearErrors(futureFields);
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
clearErrors(futureFields);
|
|
51
|
+
futureSteps.forEach((_, index) => {
|
|
52
|
+
const stepIndex = currentStep + 1 + index;
|
|
53
|
+
setStepValidationStatus(stepIndex, true);
|
|
54
|
+
});
|
|
55
|
+
}, 100);
|
|
56
|
+
}
|
|
57
|
+
return success;
|
|
58
|
+
}, [
|
|
59
|
+
nextStep,
|
|
60
|
+
clearErrors,
|
|
61
|
+
setStepValidationStatus,
|
|
62
|
+
steps,
|
|
63
|
+
currentStep,
|
|
64
|
+
trigger,
|
|
65
|
+
getValues
|
|
66
|
+
]);
|
|
67
|
+
const cancelAction = useCallback(() => {
|
|
68
|
+
reset();
|
|
69
|
+
clearErrors();
|
|
70
|
+
resetStepper();
|
|
71
|
+
}, [reset, clearErrors, resetStepper]);
|
|
72
|
+
return { prevStepAction, nextStepAction, cancelAction };
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
useStepperActions as u
|
|
76
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para determinar cuando el footer del Stepper debe usar posición sticky.
|
|
3
|
+
* @param containerRef - Referencia al contenedor del Stepper
|
|
4
|
+
* @param contentRef - Referencia al área de contenido del Stepper
|
|
5
|
+
* @returns boolean - true si el footer debe ser sticky, false en caso contrario
|
|
6
|
+
*/
|
|
7
|
+
export declare function useStickyStepperFooter(containerRef: React.RefObject<HTMLDivElement>, contentRef: React.RefObject<HTMLElement>): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { u as useSizeContainer } from "../../../../hooks/useSizeContainer/index.js";
|
|
3
|
+
function useStickyStepperFooter(containerRef, contentRef) {
|
|
4
|
+
const containerSize = useSizeContainer(containerRef.current);
|
|
5
|
+
const shouldBeSticky = useMemo(() => {
|
|
6
|
+
if (!containerRef.current || !contentRef.current) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
const containerHeight = containerRef.current.clientHeight;
|
|
10
|
+
const contentHeight = contentRef.current.clientHeight;
|
|
11
|
+
const totalContentHeight = contentHeight + 80;
|
|
12
|
+
const exceedsContainer = totalContentHeight > containerHeight;
|
|
13
|
+
const hasMinimumSpace = containerHeight > 120;
|
|
14
|
+
return exceedsContainer && hasMinimumSpace;
|
|
15
|
+
}, [containerSize, containerRef, contentRef]);
|
|
16
|
+
return shouldBeSticky;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
useStickyStepperFooter as u
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const pathIcons = {
|
|
2
|
+
patronum: "frontend/components/step/assets/icons/patronum_fill.svg",
|
|
3
|
+
arrowLeft: "frontend/components/step/assets/icons/arrow_left.svg",
|
|
4
|
+
arrowRight: "frontend/components/step/assets/icons/arrow_right.svg",
|
|
5
|
+
circleCheck: "frontend/components/step/assets/icons/circle_check.svg",
|
|
6
|
+
circleError: "frontend/components/step/assets/icons/circle_error.svg",
|
|
7
|
+
dotOutline: "frontend/components/step/assets/icons/dot_outline.svg",
|
|
8
|
+
dotSelected: "frontend/components/step/assets/icons/dot_selected.svg"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
pathIcons as p
|
|
12
|
+
};
|