@soyfri/shared-library 1.5.0 → 1.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Button-C17mExpd.cjs.map +1 -0
- package/Button-UkkP-bNw.js.map +1 -0
- package/components/ActionMenu/ActionMenu.cjs +107 -0
- package/components/ActionMenu/ActionMenu.cjs.map +1 -0
- package/components/ActionMenu/ActionMenu.d.ts +44 -0
- package/components/ActionMenu/ActionMenu.js +107 -0
- package/components/ActionMenu/ActionMenu.js.map +1 -0
- package/components/ActionMenu/index.d.ts +2 -0
- package/components/ActionMenu.d.ts +6 -0
- package/components/AppBar/AppBar.cjs +129 -0
- package/components/AppBar/AppBar.cjs.map +1 -0
- package/components/AppBar/AppBar.d.ts +55 -0
- package/components/AppBar/AppBar.js +129 -0
- package/components/AppBar/AppBar.js.map +1 -0
- package/components/AppBar/AppBar.sx.d.ts +12 -0
- package/components/AppBar/AppBarContext.d.ts +18 -0
- package/components/AppBar/AppBarMenuToggle.d.ts +39 -0
- package/components/AppBar/index.d.ts +6 -0
- package/components/AppBar.d.ts +6 -0
- package/components/Autocomplete/Autocomplete.cjs +313 -0
- package/components/Autocomplete/Autocomplete.cjs.map +1 -0
- package/components/Autocomplete/Autocomplete.d.ts +86 -0
- package/components/Autocomplete/Autocomplete.definitions.d.ts +16 -0
- package/components/Autocomplete/Autocomplete.helpers.d.ts +22 -0
- package/components/Autocomplete/Autocomplete.js +313 -0
- package/components/Autocomplete/Autocomplete.js.map +1 -0
- package/components/Autocomplete/Autocomplete.sx.d.ts +7 -0
- package/components/Autocomplete/_parts/AutocompleteChips.d.ts +20 -0
- package/components/Autocomplete/_parts/AutocompleteLoader.d.ts +9 -0
- package/components/Autocomplete/_parts/AutocompleteOption.d.ts +16 -0
- package/components/Autocomplete/index.d.ts +2 -0
- package/components/Autocomplete.d.ts +6 -0
- package/components/Avatar/Avatar.cjs +162 -0
- package/components/Avatar/Avatar.cjs.map +1 -0
- package/components/Avatar/Avatar.d.ts +33 -0
- package/components/Avatar/Avatar.definitions.d.ts +11 -0
- package/components/Avatar/Avatar.js +162 -0
- package/components/Avatar/Avatar.js.map +1 -0
- package/components/Avatar/index.d.ts +2 -0
- package/{dist/components → components}/Button/Button.d.ts +5 -5
- package/{dist/components → components}/Button/index.d.ts +1 -0
- package/components/Card/Card.cjs +99 -0
- package/components/Card/Card.cjs.map +1 -0
- package/components/Card/Card.d.ts +36 -0
- package/components/Card/Card.js +99 -0
- package/components/Card/Card.js.map +1 -0
- package/components/Card/Card.sx.d.ts +14 -0
- package/components/Card/index.d.ts +4 -0
- package/components/Card.d.ts +6 -0
- package/components/Checkbox/Checkbox.cjs +189 -0
- package/components/Checkbox/Checkbox.cjs.map +1 -0
- package/components/Checkbox/Checkbox.d.ts +55 -0
- package/components/Checkbox/Checkbox.js +189 -0
- package/components/Checkbox/Checkbox.js.map +1 -0
- package/components/Checkbox/Checkbox.sx.d.ts +13 -0
- package/components/Checkbox/index.d.ts +2 -0
- package/components/Checkbox.d.ts +6 -0
- package/{dist/components → components}/Chip/Chip.cjs +2 -1
- package/components/Chip/Chip.cjs.map +1 -0
- package/{dist/components → components}/Chip/Chip.js +2 -1
- package/components/Chip/Chip.js.map +1 -0
- package/components/Chip/index.d.ts +2 -0
- package/components/Chip.d.ts +6 -0
- package/components/DatePicker/DatePicker.cjs +180 -0
- package/components/DatePicker/DatePicker.cjs.map +1 -0
- package/components/DatePicker/DatePicker.d.ts +44 -0
- package/{dist/components → components}/DatePicker/DatePicker.definitions.d.ts +1 -0
- package/components/DatePicker/DatePicker.helpers.d.ts +7 -0
- package/components/DatePicker/DatePicker.js +180 -0
- package/components/DatePicker/DatePicker.js.map +1 -0
- package/components/DatePicker/DatePicker.sx.d.ts +9 -0
- package/components/DatePicker/index.d.ts +2 -0
- package/components/DatePicker.d.ts +6 -0
- package/components/DateTimePicker/DateTimePicker.cjs +198 -0
- package/components/DateTimePicker/DateTimePicker.cjs.map +1 -0
- package/components/DateTimePicker/DateTimePicker.d.ts +57 -0
- package/{dist/components → components}/DateTimePicker/DateTimePicker.definitions.d.ts +3 -0
- package/components/DateTimePicker/DateTimePicker.helpers.d.ts +13 -0
- package/components/DateTimePicker/DateTimePicker.js +198 -0
- package/components/DateTimePicker/DateTimePicker.js.map +1 -0
- package/components/DateTimePicker/DateTimePicker.sx.d.ts +7 -0
- package/components/DateTimePicker/index.d.ts +2 -0
- package/components/DateTimePicker.d.ts +6 -0
- package/components/Drawer/Drawer.cjs +272 -0
- package/components/Drawer/Drawer.cjs.map +1 -0
- package/components/Drawer/Drawer.d.ts +58 -0
- package/components/Drawer/Drawer.js +272 -0
- package/components/Drawer/Drawer.js.map +1 -0
- package/components/Drawer/Drawer.sx.d.ts +23 -0
- package/components/Drawer/DrawerContext.d.ts +18 -0
- package/components/Drawer/DrawerItem.d.ts +40 -0
- package/components/Drawer/index.d.ts +6 -0
- package/components/Drawer.d.ts +6 -0
- package/{dist/components → components}/Gallery/Gallery.cjs +154 -79
- package/components/Gallery/Gallery.cjs.map +1 -0
- package/components/Gallery/Gallery.d.ts +28 -0
- package/{dist/components → components}/Gallery/Gallery.js +154 -79
- package/components/Gallery/Gallery.js.map +1 -0
- package/components/Gallery/GalleryLightbox.d.ts +16 -0
- package/{dist/components → components}/Gallery/GalleryMain.d.ts +3 -7
- package/components/Gallery/GalleryThumbnails.d.ts +13 -0
- package/components/Gallery/index.d.ts +2 -0
- package/components/Gallery.d.ts +6 -0
- package/{dist/components → components}/Icon/Icon.cjs +49 -10
- package/components/Icon/Icon.cjs.map +1 -0
- package/components/Icon/Icon.d.ts +48 -0
- package/{dist/components → components}/Icon/Icon.js +49 -10
- package/components/Icon/Icon.js.map +1 -0
- package/components/Icon/index.d.ts +2 -0
- package/components/Icon.d.ts +6 -0
- package/components/Input/Input.cjs +188 -0
- package/components/Input/Input.cjs.map +1 -0
- package/components/Input/Input.d.ts +44 -0
- package/{dist/components → components}/Input/Input.definitions.d.ts +6 -2
- package/components/Input/Input.helpers.d.ts +14 -0
- package/components/Input/Input.js +188 -0
- package/components/Input/Input.js.map +1 -0
- package/components/Input/Input.sx.d.ts +8 -0
- package/components/Input/index.d.ts +2 -0
- package/components/Input.d.ts +6 -0
- package/components/InputGroup/InputGroup.cjs +140 -0
- package/components/InputGroup/InputGroup.cjs.map +1 -0
- package/components/InputGroup/InputGroup.d.ts +42 -0
- package/components/InputGroup/InputGroup.definitions.d.ts +6 -0
- package/components/InputGroup/InputGroup.js +140 -0
- package/components/InputGroup/InputGroup.js.map +1 -0
- package/components/InputGroup/index.d.ts +2 -0
- package/components/InputGroup.d.ts +6 -0
- package/components/Modal/Modal.cjs +348 -0
- package/components/Modal/Modal.cjs.map +1 -0
- package/components/Modal/Modal.d.ts +80 -0
- package/components/Modal/Modal.js +348 -0
- package/components/Modal/Modal.js.map +1 -0
- package/components/Modal/ModalBody.d.ts +11 -0
- package/components/Modal/ModalFooter.d.ts +27 -0
- package/components/Modal/ModalHeader.d.ts +11 -0
- package/components/Modal/index.d.ts +8 -0
- package/components/Modal.d.ts +6 -0
- package/components/RadioGroup/RadioGroup.cjs +204 -0
- package/components/RadioGroup/RadioGroup.cjs.map +1 -0
- package/components/RadioGroup/RadioGroup.d.ts +59 -0
- package/components/RadioGroup/RadioGroup.definitions.d.ts +6 -0
- package/components/RadioGroup/RadioGroup.js +204 -0
- package/components/RadioGroup/RadioGroup.js.map +1 -0
- package/components/RadioGroup/RadioGroup.sx.d.ts +20 -0
- package/components/RadioGroup/index.d.ts +2 -0
- package/components/RadioGroup.d.ts +6 -0
- package/components/Select/Select.cjs +313 -0
- package/components/Select/Select.cjs.map +1 -0
- package/components/Select/Select.d.ts +95 -0
- package/components/Select/Select.helpers.d.ts +15 -0
- package/components/Select/Select.js +313 -0
- package/components/Select/Select.js.map +1 -0
- package/components/Select/Select.sx.d.ts +7 -0
- package/components/Select/_parts/SelectMenuItem.d.ts +20 -0
- package/components/Select/index.d.ts +2 -0
- package/components/Select.d.ts +6 -0
- package/{dist/components → components}/Stat/Stat.cjs +2 -2
- package/{dist/components → components}/Stat/Stat.cjs.map +1 -1
- package/{dist/components → components}/Stat/Stat.js +2 -2
- package/{dist/components → components}/Stat/Stat.js.map +1 -1
- package/components/Stat/index.d.ts +2 -0
- package/components/Stat.d.ts +6 -0
- package/components/StatusMessage/StatusMessage.cjs +90 -0
- package/components/StatusMessage/StatusMessage.cjs.map +1 -0
- package/components/StatusMessage/StatusMessage.d.ts +28 -0
- package/components/StatusMessage/StatusMessage.js +90 -0
- package/components/StatusMessage/StatusMessage.js.map +1 -0
- package/components/StatusMessage/index.d.ts +2 -0
- package/components/StatusMessage.d.ts +6 -0
- package/components/Stepper/Stepper.cjs +302 -0
- package/components/Stepper/Stepper.cjs.map +1 -0
- package/components/Stepper/Stepper.d.ts +17 -0
- package/components/Stepper/Stepper.js +302 -0
- package/components/Stepper/Stepper.js.map +1 -0
- package/components/Stepper/StepperContext.d.ts +73 -0
- package/components/Stepper/_hooks/useHorizontalScroll.d.ts +19 -0
- package/components/Stepper/_parts/StepperScrollArrow.d.ts +19 -0
- package/components/Stepper/index.d.ts +6 -0
- package/components/Stepper.d.ts +6 -0
- package/components/Switch/Switch.cjs +184 -0
- package/components/Switch/Switch.cjs.map +1 -0
- package/components/Switch/Switch.d.ts +48 -0
- package/components/Switch/Switch.definitions.d.ts +7 -0
- package/components/Switch/Switch.js +184 -0
- package/components/Switch/Switch.js.map +1 -0
- package/components/Switch/Switch.sx.d.ts +22 -0
- package/components/Switch/Switch.types.d.ts +1 -0
- package/components/Switch/index.d.ts +2 -0
- package/components/Switch.d.ts +6 -0
- package/components/Tabs/Tabs.cjs +112 -0
- package/components/Tabs/Tabs.cjs.map +1 -0
- package/components/Tabs/Tabs.d.ts +24 -0
- package/components/Tabs/Tabs.js +112 -0
- package/components/Tabs/Tabs.js.map +1 -0
- package/components/Tabs/index.d.ts +4 -0
- package/components/Tabs.d.ts +6 -0
- package/{dist/components → components}/Timeline/Timeline.cjs +3 -2
- package/components/Timeline/Timeline.cjs.map +1 -0
- package/components/Timeline/Timeline.d.ts +9 -0
- package/{dist/components → components}/Timeline/Timeline.js +3 -2
- package/components/Timeline/Timeline.js.map +1 -0
- package/components/Timeline/index.d.ts +4 -0
- package/components/Timeline.d.ts +6 -0
- package/components/_shared/formField.sx.d.ts +33 -0
- package/components/_shared/mergeSx.d.ts +7 -0
- package/components/_shared/resolvePreset.d.ts +18 -0
- package/formField.sx-8_QRnKxv.js +68 -0
- package/formField.sx-8_QRnKxv.js.map +1 -0
- package/formField.sx-BAX7KwMR.cjs +67 -0
- package/formField.sx-BAX7KwMR.cjs.map +1 -0
- package/index.cjs +145 -0
- package/index.cjs.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +49 -0
- package/index.js.map +1 -0
- package/mergeSx-BXoNZjB_.js +10 -0
- package/mergeSx-BXoNZjB_.js.map +1 -0
- package/mergeSx-Dbccoo_H.cjs +9 -0
- package/mergeSx-Dbccoo_H.cjs.map +1 -0
- package/mui.d.ts +7 -0
- package/package.json +164 -43
- package/resolvePreset-B-IB0ehH.js +15 -0
- package/resolvePreset-B-IB0ehH.js.map +1 -0
- package/resolvePreset-CT3kU-K2.cjs +14 -0
- package/resolvePreset-CT3kU-K2.cjs.map +1 -0
- package/theme/componentStyles.d.ts +32 -0
- package/theme/tokens.d.ts +28 -0
- package/tokens-BRrcP_p_.js +21 -0
- package/tokens-BRrcP_p_.js.map +1 -0
- package/tokens-jaWWNk39.cjs +20 -0
- package/tokens-jaWWNk39.cjs.map +1 -0
- package/utils/index.d.ts +2 -0
- package/utils/scrollToTop.d.ts +28 -0
- package/.dockerignore +0 -8
- package/.github/workflows/publish.yml +0 -107
- package/.prettierrc +0 -3
- package/.storybook/main.ts +0 -19
- package/.storybook/preview.ts +0 -14
- package/.storybook/vitest.setup.ts +0 -9
- package/Dockerfile +0 -37
- package/build.js +0 -102
- package/chromatic.config.json +0 -5
- package/cleanDirectories.js +0 -40
- package/dist/Button-C17mExpd.cjs.map +0 -1
- package/dist/Button-UkkP-bNw.js.map +0 -1
- package/dist/DatePicker-BSNboVhN.js +0 -201
- package/dist/DatePicker-BSNboVhN.js.map +0 -1
- package/dist/DatePicker-BoqxWAhj.cjs +0 -200
- package/dist/DatePicker-BoqxWAhj.cjs.map +0 -1
- package/dist/Input-DFHs7cJ_.js +0 -171
- package/dist/Input-DFHs7cJ_.js.map +0 -1
- package/dist/Input-c8MwNNPg.cjs +0 -170
- package/dist/Input-c8MwNNPg.cjs.map +0 -1
- package/dist/Select-BO2N56sm.cjs +0 -411
- package/dist/Select-BO2N56sm.cjs.map +0 -1
- package/dist/Select-BcLkyHSE.js +0 -412
- package/dist/Select-BcLkyHSE.js.map +0 -1
- package/dist/components/Autocomplete/Autocomplete.cjs +0 -109
- package/dist/components/Autocomplete/Autocomplete.cjs.map +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -28
- package/dist/components/Autocomplete/Autocomplete.definitions.d.ts +0 -9
- package/dist/components/Autocomplete/Autocomplete.js +0 -109
- package/dist/components/Autocomplete/Autocomplete.js.map +0 -1
- package/dist/components/Autocomplete/index.d.ts +0 -1
- package/dist/components/Autocomplete.d.ts +0 -2
- package/dist/components/Avatar/Avatar.cjs +0 -126
- package/dist/components/Avatar/Avatar.cjs.map +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -19
- package/dist/components/Avatar/Avatar.js +0 -126
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Card/Card.cjs +0 -28
- package/dist/components/Card/Card.cjs.map +0 -1
- package/dist/components/Card/Card.d.ts +0 -13
- package/dist/components/Card/Card.js +0 -28
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/index.d.ts +0 -1
- package/dist/components/Card.d.ts +0 -2
- package/dist/components/Chip/Chip.cjs.map +0 -1
- package/dist/components/Chip/Chip.js.map +0 -1
- package/dist/components/Chip/index.d.ts +0 -1
- package/dist/components/Chip.d.ts +0 -2
- package/dist/components/DatePicker/DatePicker.cjs +0 -5
- package/dist/components/DatePicker/DatePicker.cjs.map +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -18
- package/dist/components/DatePicker/DatePicker.js +0 -5
- package/dist/components/DatePicker/DatePicker.js.map +0 -1
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/DatePicker.d.ts +0 -2
- package/dist/components/DateTimePicker/DateTimePicker.cjs +0 -208
- package/dist/components/DateTimePicker/DateTimePicker.cjs.map +0 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +0 -28
- package/dist/components/DateTimePicker/DateTimePicker.js +0 -208
- package/dist/components/DateTimePicker/DateTimePicker.js.map +0 -1
- package/dist/components/DateTimePicker/index.d.ts +0 -1
- package/dist/components/DateTimePicker.d.ts +0 -2
- package/dist/components/Gallery/Gallery.cjs.map +0 -1
- package/dist/components/Gallery/Gallery.d.ts +0 -12
- package/dist/components/Gallery/Gallery.js.map +0 -1
- package/dist/components/Gallery/GalleryLightbox.d.ts +0 -20
- package/dist/components/Gallery/GalleryThumbnails.d.ts +0 -17
- package/dist/components/Gallery/index.d.ts +0 -1
- package/dist/components/Gallery.d.ts +0 -2
- package/dist/components/Icon/Icon.cjs.map +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -21
- package/dist/components/Icon/Icon.js.map +0 -1
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Icon.d.ts +0 -2
- package/dist/components/Input/Input.cjs +0 -5
- package/dist/components/Input/Input.cjs.map +0 -1
- package/dist/components/Input/Input.d.ts +0 -32
- package/dist/components/Input/Input.js +0 -5
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input.d.ts +0 -2
- package/dist/components/InputGroup/InputGroup.cjs +0 -126
- package/dist/components/InputGroup/InputGroup.cjs.map +0 -1
- package/dist/components/InputGroup/InputGroup.d.ts +0 -6
- package/dist/components/InputGroup/InputGroup.js +0 -126
- package/dist/components/InputGroup/InputGroup.js.map +0 -1
- package/dist/components/InputGroup/index.d.ts +0 -1
- package/dist/components/InputGroup.d.ts +0 -2
- package/dist/components/Modal/Modal.cjs +0 -209
- package/dist/components/Modal/Modal.cjs.map +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -29
- package/dist/components/Modal/Modal.js +0 -209
- package/dist/components/Modal/Modal.js.map +0 -1
- package/dist/components/Modal/ModalBody.d.ts +0 -6
- package/dist/components/Modal/ModalFooter.d.ts +0 -19
- package/dist/components/Modal/ModalHeader.d.ts +0 -6
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/Modal.d.ts +0 -2
- package/dist/components/Select/Select.cjs +0 -6
- package/dist/components/Select/Select.cjs.map +0 -1
- package/dist/components/Select/Select.d.ts +0 -60
- package/dist/components/Select/Select.definitions.d.ts +0 -14
- package/dist/components/Select/Select.js +0 -6
- package/dist/components/Select/Select.js.map +0 -1
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Select.d.ts +0 -2
- package/dist/components/Stat/index.d.ts +0 -1
- package/dist/components/Stat.d.ts +0 -2
- package/dist/components/StatusMessage/StatusMessage.cjs +0 -79
- package/dist/components/StatusMessage/StatusMessage.cjs.map +0 -1
- package/dist/components/StatusMessage/StatusMessage.d.ts +0 -44
- package/dist/components/StatusMessage/StatusMessage.js +0 -79
- package/dist/components/StatusMessage/StatusMessage.js.map +0 -1
- package/dist/components/StatusMessage/index.d.ts +0 -1
- package/dist/components/StatusMessage.d.ts +0 -2
- package/dist/components/Stepper/Stepper.cjs +0 -46
- package/dist/components/Stepper/Stepper.cjs.map +0 -1
- package/dist/components/Stepper/Stepper.d.ts +0 -11
- package/dist/components/Stepper/Stepper.js +0 -46
- package/dist/components/Stepper/Stepper.js.map +0 -1
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Stepper.d.ts +0 -2
- package/dist/components/Tabs/Tabs.cjs +0 -96
- package/dist/components/Tabs/Tabs.cjs.map +0 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -19
- package/dist/components/Tabs/Tabs.js +0 -96
- package/dist/components/Tabs/Tabs.js.map +0 -1
- package/dist/components/Tabs/index.d.ts +0 -2
- package/dist/components/Tabs.d.ts +0 -2
- package/dist/components/Timeline/Timeline.cjs.map +0 -1
- package/dist/components/Timeline/Timeline.d.ts +0 -13
- package/dist/components/Timeline/Timeline.js.map +0 -1
- package/dist/components/Timeline/index.d.ts +0 -2
- package/dist/components/Timeline.d.ts +0 -2
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/styles.css +0 -112
- package/rollup.config.cjs +0 -87
- package/src/components/Autocomplete/Autocomplete.definitions.ts +0 -254
- package/src/components/Autocomplete/Autocomplete.stories.tsx +0 -387
- package/src/components/Autocomplete/Autocomplete.tsx +0 -139
- package/src/components/Autocomplete/index.ts +0 -1
- package/src/components/Avatar/Avatar.stories.tsx +0 -54
- package/src/components/Avatar/Avatar.tsx +0 -143
- package/src/components/Avatar/index.ts +0 -1
- package/src/components/Button/Button.definition.ts +0 -97
- package/src/components/Button/Button.stories.tsx +0 -285
- package/src/components/Button/Button.tsx +0 -67
- package/src/components/Button/index.ts +0 -1
- package/src/components/Card/Card.definition.ts +0 -5
- package/src/components/Card/Card.stories.tsx +0 -32
- package/src/components/Card/Card.tsx +0 -44
- package/src/components/Card/index.ts +0 -1
- package/src/components/Chip/Chip.definitions.ts +0 -167
- package/src/components/Chip/Chip.stories.tsx +0 -265
- package/src/components/Chip/Chip.tsx +0 -61
- package/src/components/Chip/index.ts +0 -1
- package/src/components/Column/Column.tsx +0 -29
- package/src/components/Column/index.ts +0 -1
- package/src/components/DatePicker/DatePicker.definitions.ts +0 -205
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -282
- package/src/components/DatePicker/DatePicker.tsx +0 -165
- package/src/components/DatePicker/index.ts +0 -1
- package/src/components/DateRangePicker/DateRangePicker.definitions.ts +0 -191
- package/src/components/DateRangePicker/DateRangePicker.stories.tsx +0 -252
- package/src/components/DateRangePicker/DateRangePicker.tsx +0 -56
- package/src/components/DateRangePicker/index.ts +0 -1
- package/src/components/DateTimePicker/DateTimePicker.definitions.ts +0 -232
- package/src/components/DateTimePicker/DateTimePicker.stories.tsx +0 -390
- package/src/components/DateTimePicker/DateTimePicker.tsx +0 -191
- package/src/components/DateTimePicker/index.ts +0 -1
- package/src/components/Flyout/Flyout.stories.tsx +0 -274
- package/src/components/Flyout/Flyout.tsx +0 -122
- package/src/components/Flyout/index.ts +0 -1
- package/src/components/Gallery/Gallery.definition.tsx +0 -37
- package/src/components/Gallery/Gallery.stories.tsx +0 -82
- package/src/components/Gallery/Gallery.tsx +0 -118
- package/src/components/Gallery/GalleryLightbox.tsx +0 -170
- package/src/components/Gallery/GalleryMain.tsx +0 -84
- package/src/components/Gallery/GalleryThumbnails.tsx +0 -106
- package/src/components/Gallery/index.ts +0 -1
- package/src/components/Icon/Icon.stories.tsx +0 -54
- package/src/components/Icon/Icon.tsx +0 -94
- package/src/components/Icon/index.ts +0 -2
- package/src/components/Input/Input.definitions.ts +0 -252
- package/src/components/Input/Input.stories.tsx +0 -387
- package/src/components/Input/Input.tsx +0 -186
- package/src/components/Input/index.ts +0 -1
- package/src/components/InputGroup/InputGroup.stories.tsx +0 -136
- package/src/components/InputGroup/InputGroup.tsx +0 -136
- package/src/components/InputGroup/index.ts +0 -1
- package/src/components/MenuButton/MenuButton.stories.tsx +0 -197
- package/src/components/MenuButton/MenuButton.tsx +0 -100
- package/src/components/MenuButton/index.ts +0 -1
- package/src/components/Modal/Modal.stories.tsx +0 -293
- package/src/components/Modal/Modal.tsx +0 -173
- package/src/components/Modal/ModalBody.tsx +0 -16
- package/src/components/Modal/ModalFooter.tsx +0 -61
- package/src/components/Modal/ModalHeader.tsx +0 -18
- package/src/components/Modal/index.ts +0 -1
- package/src/components/Select/Select.definitions.ts +0 -488
- package/src/components/Select/Select.stories.tsx +0 -569
- package/src/components/Select/Select.tsx +0 -468
- package/src/components/Select/index.ts +0 -1
- package/src/components/Stat/Stat.stories.tsx +0 -85
- package/src/components/Stat/Stat.tsx +0 -117
- package/src/components/Stat/index.ts +0 -2
- package/src/components/StatusMessage/StatusMessage.stories.tsx +0 -130
- package/src/components/StatusMessage/StatusMessage.tsx +0 -162
- package/src/components/StatusMessage/index.ts +0 -2
- package/src/components/Stepper/Step.tsx +0 -21
- package/src/components/Stepper/Stepper.definition.ts +0 -75
- package/src/components/Stepper/Stepper.stories.tsx +0 -122
- package/src/components/Stepper/Stepper.tsx +0 -59
- package/src/components/Stepper/index.ts +0 -2
- package/src/components/Table/EmptyTable.png +0 -0
- package/src/components/Table/Table.definition.ts +0 -580
- package/src/components/Table/Table.stories.tsx +0 -853
- package/src/components/Table/Table.tsx +0 -495
- package/src/components/Table/data.ts +0 -134
- package/src/components/Table/exportsUtils.ts +0 -195
- package/src/components/Table/index.ts +0 -3
- package/src/components/Table/types.ts +0 -34
- package/src/components/Tabs/Tab.definition.ts +0 -53
- package/src/components/Tabs/Tab.tsx +0 -19
- package/src/components/Tabs/Tabs.stories.tsx +0 -118
- package/src/components/Tabs/Tabs.tsx +0 -99
- package/src/components/Tabs/_tabUtils.tsx +0 -4
- package/src/components/Tabs/index.ts +0 -2
- package/src/components/Timeline/Timeline.definition.ts +0 -43
- package/src/components/Timeline/Timeline.stories.tsx +0 -108
- package/src/components/Timeline/Timeline.tsx +0 -49
- package/src/components/Timeline/TimelineItem.tsx +0 -31
- package/src/components/Timeline/index.ts +0 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -117
- package/src/components/Tooltip/Tooltip.tsx +0 -58
- package/src/components/Tooltip/index.ts +0 -1
- package/src/hooks/ClipBoard/ClipBoard.stories.tsx +0 -168
- package/src/hooks/ClipBoard/ClipBoard.tsx +0 -131
- package/src/hooks/ClipBoard/ClipboardUnifiedDemo.tsx +0 -111
- package/src/hooks/ClipBoard/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/styles.css +0 -3
- package/tailwind.config.js +0 -10
- package/tsconfig.json +0 -48
- package/tsup.config.js +0 -41
- package/vite.config.js +0 -132
- package/vitest.config.ts +0 -35
- /package/{dist/Button-C17mExpd.cjs → Button-C17mExpd.cjs} +0 -0
- /package/{dist/Button-UkkP-bNw.js → Button-UkkP-bNw.js} +0 -0
- /package/{Readme.md → README.md} +0 -0
- /package/{dist/components → components}/Avatar.d.ts +0 -0
- /package/{dist/components → components}/Button/Button.cjs +0 -0
- /package/{dist/components → components}/Button/Button.cjs.map +0 -0
- /package/{dist/components → components}/Button/Button.definition.d.ts +0 -0
- /package/{dist/components → components}/Button/Button.js +0 -0
- /package/{dist/components → components}/Button/Button.js.map +0 -0
- /package/{dist/components → components}/Button.d.ts +0 -0
- /package/{dist/components → components}/Card/Card.definition.d.ts +0 -0
- /package/{dist/components → components}/Chip/Chip.d.ts +0 -0
- /package/{dist/components → components}/Chip/Chip.definitions.d.ts +0 -0
- /package/{dist/components → components}/Column/Column.cjs +0 -0
- /package/{dist/components → components}/Column/Column.cjs.map +0 -0
- /package/{dist/components → components}/Column/Column.d.ts +0 -0
- /package/{dist/components → components}/Column/Column.js +0 -0
- /package/{dist/components → components}/Column/Column.js.map +0 -0
- /package/{dist/components → components}/Column/index.d.ts +0 -0
- /package/{dist/components → components}/Column.d.ts +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.cjs +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.cjs.map +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.d.ts +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.definitions.d.ts +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.js +0 -0
- /package/{dist/components → components}/DateRangePicker/DateRangePicker.js.map +0 -0
- /package/{dist/components → components}/DateRangePicker/index.d.ts +0 -0
- /package/{dist/components → components}/DateRangePicker.d.ts +0 -0
- /package/{dist/components → components}/Flyout/Flyout.cjs +0 -0
- /package/{dist/components → components}/Flyout/Flyout.cjs.map +0 -0
- /package/{dist/components → components}/Flyout/Flyout.d.ts +0 -0
- /package/{dist/components → components}/Flyout/Flyout.js +0 -0
- /package/{dist/components → components}/Flyout/Flyout.js.map +0 -0
- /package/{dist/components → components}/Flyout/index.d.ts +0 -0
- /package/{dist/components → components}/Flyout.d.ts +0 -0
- /package/{dist/components → components}/Gallery/Gallery.definition.d.ts +0 -0
- /package/{dist/components → components}/MenuButton/MenuButton.cjs +0 -0
- /package/{dist/components → components}/MenuButton/MenuButton.cjs.map +0 -0
- /package/{dist/components → components}/MenuButton/MenuButton.d.ts +0 -0
- /package/{dist/components → components}/MenuButton/MenuButton.js +0 -0
- /package/{dist/components → components}/MenuButton/MenuButton.js.map +0 -0
- /package/{dist/components → components}/MenuButton/index.d.ts +0 -0
- /package/{dist/components → components}/MenuButton.d.ts +0 -0
- /package/{dist/components → components}/Stat/Stat.d.ts +0 -0
- /package/{dist/components → components}/Stepper/Step.d.ts +0 -0
- /package/{dist/components → components}/Stepper/Stepper.definition.d.ts +0 -0
- /package/{dist/components → components}/Table/Table.cjs +0 -0
- /package/{dist/components → components}/Table/Table.cjs.map +0 -0
- /package/{dist/components → components}/Table/Table.d.ts +0 -0
- /package/{dist/components → components}/Table/Table.definition.d.ts +0 -0
- /package/{dist/components → components}/Table/Table.js +0 -0
- /package/{dist/components → components}/Table/Table.js.map +0 -0
- /package/{dist/components → components}/Table/data.d.ts +0 -0
- /package/{dist/components → components}/Table/exportsUtils.d.ts +0 -0
- /package/{dist/components → components}/Table/index.d.ts +0 -0
- /package/{dist/components → components}/Table/types.d.ts +0 -0
- /package/{dist/components → components}/Table.d.ts +0 -0
- /package/{dist/components → components}/Tabs/Tab.d.ts +0 -0
- /package/{dist/components → components}/Tabs/Tab.definition.d.ts +0 -0
- /package/{dist/components → components}/Tabs/_tabUtils.d.ts +0 -0
- /package/{dist/components → components}/Timeline/Timeline.definition.d.ts +0 -0
- /package/{dist/components → components}/Timeline/TimelineItem.d.ts +0 -0
- /package/{dist/components → components}/Tooltip/Tooltip.cjs +0 -0
- /package/{dist/components → components}/Tooltip/Tooltip.cjs.map +0 -0
- /package/{dist/components → components}/Tooltip/Tooltip.d.ts +0 -0
- /package/{dist/components → components}/Tooltip/Tooltip.js +0 -0
- /package/{dist/components → components}/Tooltip/Tooltip.js.map +0 -0
- /package/{dist/components → components}/Tooltip/index.d.ts +0 -0
- /package/{dist/components → components}/Tooltip.d.ts +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipBoard.cjs +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipBoard.cjs.map +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipBoard.d.ts +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipBoard.js +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipBoard.js.map +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/ClipboardUnifiedDemo.d.ts +0 -0
- /package/{dist/hooks → hooks}/ClipBoard/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/ClipBoard.d.ts +0 -0
- /package/{dist/index.css → index.css} +0 -0
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `StatusMessage` es un componente de React que muestra mensajes de éxito, error o advertencia
|
|
3
|
-
* en un modal o una alerta, utilizando el sistema de diseño de Material-UI.
|
|
4
|
-
*
|
|
5
|
-
* El componente puede mostrar alertas con estilos específicos o un modal personalizable
|
|
6
|
-
* usando `Dialog` y otros componentes de MUI. También puede incluir una función opcional
|
|
7
|
-
* para cerrar el mensaje.
|
|
8
|
-
*
|
|
9
|
-
* @param {StatusMessageProps} props - Las propiedades del componente.
|
|
10
|
-
* @param {string | undefined} props.title - Título del mensaje que se muestra en el modal o alerta.
|
|
11
|
-
* @param {string} [props.description] - Descripción o contenido detallado del mensaje.
|
|
12
|
-
* @param {'success' | 'danger' | 'warning'} [props.messageType='success'] - Tipo de mensaje que determina el estilo visual. 'danger' se mapea a 'error' de MUI.
|
|
13
|
-
* @param {'alert' | 'modal'} [props.displayType='alert'] - Determina si el mensaje se muestra como alerta o modal.
|
|
14
|
-
* @param {() => void} [props.close] - Función opcional para ejecutar al cerrar el mensaje.
|
|
15
|
-
* @returns {React.FC<StatusMessageProps>} Un componente funcional de React que muestra mensajes personalizados.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Ejemplo de uso como una alerta:
|
|
19
|
-
* <StatusMessage
|
|
20
|
-
* title="Operación Exitosa"
|
|
21
|
-
* description="La operación se ha completado correctamente."
|
|
22
|
-
* messageType="success"
|
|
23
|
-
* displayType="alert"
|
|
24
|
-
* />
|
|
25
|
-
*
|
|
26
|
-
* // Ejemplo de uso como un modal:
|
|
27
|
-
* <StatusMessage
|
|
28
|
-
* title="Advertencia"
|
|
29
|
-
* description="Se ha producido un error inesperado."
|
|
30
|
-
* messageType="danger"
|
|
31
|
-
* displayType="modal"
|
|
32
|
-
* close={() => console.log('Modal cerrado')}
|
|
33
|
-
* />
|
|
34
|
-
*/
|
|
35
|
-
export interface StatusMessageProps {
|
|
36
|
-
title: string | undefined;
|
|
37
|
-
description?: string;
|
|
38
|
-
messageType?: 'success' | 'danger' | 'warning';
|
|
39
|
-
displayType?: 'alert' | 'modal';
|
|
40
|
-
close?: () => void;
|
|
41
|
-
open?: boolean;
|
|
42
|
-
}
|
|
43
|
-
declare const StatusMessage: ({ title, description, messageType, displayType, close, open, }: StatusMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
44
|
-
export default StatusMessage;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, DialogContent, Box, Typography, DialogActions, Button, Alert } from "@mui/material";
|
|
3
|
-
import { WarningAmber, ErrorOutline, CheckCircleOutline } from "@mui/icons-material";
|
|
4
|
-
const StatusMessage = ({
|
|
5
|
-
title,
|
|
6
|
-
description,
|
|
7
|
-
messageType = "success",
|
|
8
|
-
displayType = "alert",
|
|
9
|
-
close,
|
|
10
|
-
open = true
|
|
11
|
-
}) => {
|
|
12
|
-
const getAlertVariant = () => {
|
|
13
|
-
switch (messageType) {
|
|
14
|
-
case "success":
|
|
15
|
-
return "success";
|
|
16
|
-
case "danger":
|
|
17
|
-
return "error";
|
|
18
|
-
case "warning":
|
|
19
|
-
return "warning";
|
|
20
|
-
default:
|
|
21
|
-
return "info";
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const getIcon = () => {
|
|
25
|
-
switch (messageType) {
|
|
26
|
-
case "success":
|
|
27
|
-
return /* @__PURE__ */ jsx(CheckCircleOutline, { sx: { fontSize: "64px", color: "success.main" } });
|
|
28
|
-
case "danger":
|
|
29
|
-
return /* @__PURE__ */ jsx(ErrorOutline, { sx: { fontSize: "64px", color: "error.main" } });
|
|
30
|
-
case "warning":
|
|
31
|
-
return /* @__PURE__ */ jsx(WarningAmber, { sx: { fontSize: "64px", color: "warning.main" } });
|
|
32
|
-
default:
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const alertVariant = getAlertVariant();
|
|
37
|
-
if (!description) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ jsx(Fragment, { children: displayType === "modal" ? /* @__PURE__ */ jsxs(
|
|
41
|
-
Dialog,
|
|
42
|
-
{
|
|
43
|
-
open,
|
|
44
|
-
onClose: close,
|
|
45
|
-
"aria-labelledby": "message-dialog-title",
|
|
46
|
-
maxWidth: "md",
|
|
47
|
-
PaperProps: {
|
|
48
|
-
sx: {
|
|
49
|
-
borderRadius: "16px",
|
|
50
|
-
p: 2
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsxs(DialogContent, { sx: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", p: 4, gap: 2 }, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Box, { sx: { mb: 2 }, children: getIcon() }),
|
|
56
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h4", component: "h2", sx: { fontWeight: "bold" }, children: title || "" }),
|
|
57
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", color: "text.secondary", children: description })
|
|
58
|
-
] }),
|
|
59
|
-
close && /* @__PURE__ */ jsx(DialogActions, { sx: { justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx(Button, { onClick: close, variant: "contained", color: alertVariant, children: "Aceptar" }) })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ jsxs(
|
|
63
|
-
Alert,
|
|
64
|
-
{
|
|
65
|
-
severity: alertVariant,
|
|
66
|
-
sx: { mb: 2, mt: 2 },
|
|
67
|
-
onClose: close,
|
|
68
|
-
action: close && /* @__PURE__ */ jsx(Button, { onClick: close, size: "small", color: "inherit", children: "Cerrar" }),
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", sx: { fontWeight: "bold" }, children: title }),
|
|
71
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { mt: 1 }, children: description })
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
) });
|
|
75
|
-
};
|
|
76
|
-
export {
|
|
77
|
-
StatusMessage
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=StatusMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessage.js","sources":["../../../src/components/StatusMessage/StatusMessage.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Alert,\n Box,\n Typography,\n Dialog,\n DialogContent,\n DialogActions,\n Button\n} from '@mui/material';\nimport {\n ErrorOutline as ErrorOutlineIcon,\n CheckCircleOutline as CheckCircleOutlineIcon,\n WarningAmber as WarningAmberIcon\n} from '@mui/icons-material';\n\n/**\n * `StatusMessage` es un componente de React que muestra mensajes de éxito, error o advertencia\n * en un modal o una alerta, utilizando el sistema de diseño de Material-UI.\n *\n * El componente puede mostrar alertas con estilos específicos o un modal personalizable\n * usando `Dialog` y otros componentes de MUI. También puede incluir una función opcional\n * para cerrar el mensaje.\n *\n * @param {StatusMessageProps} props - Las propiedades del componente.\n * @param {string | undefined} props.title - Título del mensaje que se muestra en el modal o alerta.\n * @param {string} [props.description] - Descripción o contenido detallado del mensaje.\n * @param {'success' | 'danger' | 'warning'} [props.messageType='success'] - Tipo de mensaje que determina el estilo visual. 'danger' se mapea a 'error' de MUI.\n * @param {'alert' | 'modal'} [props.displayType='alert'] - Determina si el mensaje se muestra como alerta o modal.\n * @param {() => void} [props.close] - Función opcional para ejecutar al cerrar el mensaje.\n * @returns {React.FC<StatusMessageProps>} Un componente funcional de React que muestra mensajes personalizados.\n *\n * @example\n * // Ejemplo de uso como una alerta:\n * <StatusMessage\n * title=\"Operación Exitosa\"\n * description=\"La operación se ha completado correctamente.\"\n * messageType=\"success\"\n * displayType=\"alert\"\n * />\n *\n * // Ejemplo de uso como un modal:\n * <StatusMessage\n * title=\"Advertencia\"\n * description=\"Se ha producido un error inesperado.\"\n * messageType=\"danger\"\n * displayType=\"modal\"\n * close={() => console.log('Modal cerrado')}\n * />\n */\n\nexport interface StatusMessageProps {\n title: string | undefined;\n description?: string;\n messageType?: 'success' | 'danger' | 'warning';\n displayType?: 'alert' | 'modal';\n close?: () => void;\n // Propiedad para controlar la visibilidad del modal desde el padre\n open?: boolean;\n}\n\nconst StatusMessage = ({\n title,\n description,\n messageType = 'success',\n displayType = 'alert',\n close,\n open = true,\n}: StatusMessageProps) => {\n\n const getAlertVariant = () => {\n switch (messageType) {\n case 'success':\n return 'success';\n case 'danger':\n return 'error';\n case 'warning':\n return 'warning';\n default:\n return 'info'; // Fallback\n }\n };\n\n const getIcon = () => {\n switch (messageType) {\n case 'success':\n return <CheckCircleOutlineIcon sx={{ fontSize: '64px', color: 'success.main' }} />;\n case 'danger':\n return <ErrorOutlineIcon sx={{ fontSize: '64px', color: 'error.main' }} />;\n case 'warning':\n return <WarningAmberIcon sx={{ fontSize: '64px', color: 'warning.main' }} />;\n default:\n return null;\n }\n };\n\n const alertVariant = getAlertVariant();\n\n if (!description) {\n return null;\n }\n\n return (\n <>\n {displayType === 'modal' ? (\n <Dialog\n open={open}\n onClose={close}\n aria-labelledby=\"message-dialog-title\"\n maxWidth=\"md\"\n PaperProps={{\n sx: {\n borderRadius: '16px',\n p: 2,\n },\n }}\n >\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', textAlign: 'center', p: 4, gap: 2 }}>\n <Box sx={{ mb: 2 }}>\n {getIcon()}\n </Box>\n <Typography variant=\"h4\" component=\"h2\" sx={{ fontWeight: 'bold' }}>\n {title || ''}\n </Typography>\n <Typography variant=\"body1\" color=\"text.secondary\">\n {description}\n </Typography>\n </DialogContent>\n {close && (\n <DialogActions sx={{ justifyContent: 'center', p: 2 }}>\n <Button onClick={close} variant=\"contained\" color={alertVariant}>\n Aceptar\n </Button>\n </DialogActions>\n )}\n </Dialog>\n ) : (\n <Alert\n severity={alertVariant}\n sx={{ mb: 2, mt: 2 }}\n onClose={close}\n action={\n close && (\n <Button onClick={close} size=\"small\" color=\"inherit\">\n Cerrar\n </Button>\n )\n }\n >\n <Typography variant=\"h6\" sx={{ fontWeight: 'bold' }}>\n {title}\n </Typography>\n <Typography variant=\"body2\" sx={{ mt: 1 }}>\n {description}\n </Typography>\n </Alert>\n )}\n </>\n );\n};\n\nexport default StatusMessage;\n"],"names":["CheckCircleOutlineIcon","ErrorOutlineIcon","WarningAmberIcon"],"mappings":";;;AA6DA,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA,OAAO;AACT,MAA0B;AAExB,QAAM,kBAAkB,MAAM;AAC5B,YAAQ,aAAA;AAAA,MACN,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IAAA;AAAA,EAEb;AAEA,QAAM,UAAU,MAAM;AACpB,YAAQ,aAAA;AAAA,MACN,KAAK;AACH,eAAO,oBAACA,sBAAuB,IAAI,EAAE,UAAU,QAAQ,OAAO,kBAAkB;AAAA,MAClF,KAAK;AACH,eAAO,oBAACC,gBAAiB,IAAI,EAAE,UAAU,QAAQ,OAAO,gBAAgB;AAAA,MAC1E,KAAK;AACH,eAAO,oBAACC,gBAAiB,IAAI,EAAE,UAAU,QAAQ,OAAO,kBAAkB;AAAA,MAC5E;AACE,eAAO;AAAA,IAAA;AAAA,EAEb;AAEA,QAAM,eAAe,gBAAA;AAErB,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAEA,SACE,oBAAA,UAAA,EACG,0BAAgB,UACf;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAS;AAAA,MACT,mBAAgB;AAAA,MAChB,UAAS;AAAA,MACT,YAAY;AAAA,QACV,IAAI;AAAA,UACF,cAAc;AAAA,UACd,GAAG;AAAA,QAAA;AAAA,MACL;AAAA,MAGF,UAAA;AAAA,QAAA,qBAAC,eAAA,EAAc,IAAI,EAAE,SAAS,QAAQ,eAAe,UAAU,YAAY,UAAU,WAAW,UAAU,GAAG,GAAG,KAAK,KACnH,UAAA;AAAA,UAAA,oBAAC,OAAI,IAAI,EAAE,IAAI,KACZ,qBACH;AAAA,UACA,oBAAC,YAAA,EAAW,SAAQ,MAAK,WAAU,MAAK,IAAI,EAAE,YAAY,OAAA,GACvD,UAAA,SAAS,GAAA,CACZ;AAAA,8BACC,YAAA,EAAW,SAAQ,SAAQ,OAAM,kBAC/B,UAAA,YAAA,CACH;AAAA,QAAA,GACF;AAAA,QACC,SACC,oBAAC,eAAA,EAAc,IAAI,EAAE,gBAAgB,UAAU,GAAG,EAAA,GAChD,UAAA,oBAAC,QAAA,EAAO,SAAS,OAAO,SAAQ,aAAY,OAAO,cAAc,qBAEjE,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAIJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,IAAI,EAAE,IAAI,GAAG,IAAI,EAAA;AAAA,MACjB,SAAS;AAAA,MACT,QACE,SACE,oBAAC,QAAA,EAAO,SAAS,OAAO,MAAK,SAAQ,OAAM,WAAU,UAAA,SAAA,CAErD;AAAA,MAIJ,UAAA;AAAA,QAAA,oBAAC,YAAA,EAAW,SAAQ,MAAK,IAAI,EAAE,YAAY,OAAA,GACxC,UAAA,MAAA,CACH;AAAA,QACA,oBAAC,cAAW,SAAQ,SAAQ,IAAI,EAAE,IAAI,EAAA,GACnC,UAAA,YAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as StatusMessage } from './StatusMessage';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const material = require("@mui/material");
|
|
5
|
-
const Stepper = ({
|
|
6
|
-
children,
|
|
7
|
-
orientation = "horizontal",
|
|
8
|
-
alternateLabel = false,
|
|
9
|
-
sx,
|
|
10
|
-
currentStep = 0
|
|
11
|
-
}) => {
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx, children: [
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Stepper, { activeStep: currentStep, orientation, alternativeLabel: alternateLabel, children: children.map((child, idx) => {
|
|
14
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(material.Step, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
-
material.StepLabel,
|
|
17
|
-
{
|
|
18
|
-
sx: {
|
|
19
|
-
pointerEvents: "none",
|
|
20
|
-
"& .MuiStepIcon-root": {
|
|
21
|
-
color: dotColor
|
|
22
|
-
},
|
|
23
|
-
"& .MuiStepIcon-active": {
|
|
24
|
-
color: activeDotColor
|
|
25
|
-
},
|
|
26
|
-
"& .MuiStepIcon-completed": {
|
|
27
|
-
color: completedDotColor
|
|
28
|
-
},
|
|
29
|
-
"& .MuiStepIcon-text": {
|
|
30
|
-
fill: iconTextColor
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
children: label
|
|
34
|
-
}
|
|
35
|
-
) }, idx);
|
|
36
|
-
}) }),
|
|
37
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { mt: 2, children: children.map(
|
|
38
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: child.props.children }, idx) : null
|
|
39
|
-
) })
|
|
40
|
-
] });
|
|
41
|
-
};
|
|
42
|
-
const Step = (_) => null;
|
|
43
|
-
Step.displayName = "Step";
|
|
44
|
-
exports.Step = Step;
|
|
45
|
-
exports.Stepper = Stepper;
|
|
46
|
-
//# sourceMappingURL=Stepper.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.cjs","sources":["../../../src/components/Stepper/Stepper.tsx","../../../src/components/Stepper/Step.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\nimport { Stepper as MuiStepper, Step as MuiStep, StepLabel as MuiStepLabel, Box } from \"@mui/material\";\nimport { StepProps } from \"./Step\";\n\ninterface MyStepperProps {\n children: ReactElement<StepProps>[];\n orientation?: \"horizontal\" | \"vertical\";\n sx?: object;\n alternateLabel?: boolean;\n currentStep?: number;\n}\n\nexport const Stepper: React.FC<MyStepperProps> = ({\n children,\n orientation = \"horizontal\",\n alternateLabel = false,\n\n sx,\n currentStep = 0,\n}) => {\n\n return (\n <Box sx={sx}>\n <MuiStepper activeStep={currentStep} orientation={orientation} alternativeLabel={alternateLabel} >\n {children.map((child, idx) => {\n const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;\n return (\n <MuiStep key={idx} completed={completed} disabled={disabled} className={className} sx={stepSx}>\n <MuiStepLabel sx={{\n pointerEvents: 'none',\n \"& .MuiStepIcon-root\": {\n color: dotColor,\n },\n \"& .MuiStepIcon-active\": {\n color: activeDotColor,\n },\n \"& .MuiStepIcon-completed\": {\n color: completedDotColor,\n },\n \"& .MuiStepIcon-text\": {\n fill: iconTextColor,\n },\n }}\n >{label}\n </MuiStepLabel>\n </MuiStep>\n );\n })}\n </MuiStepper>\n <Box mt={2}>\n {children.map((child, idx) =>\n idx === currentStep ? <Box key={idx}>{child.props.children}</Box> : null\n )}\n </Box>\n </Box>\n );\n};\n\nexport default Stepper;","import React from \"react\";\nimport { StepProps as MuiStepProps } from \"@mui/material\";\n\ntype PickMuiStepProps = Pick<MuiStepProps, \"completed\" | \"disabled\" | \"sx\" | \"className\">;\n\nexport interface StepProps extends PickMuiStepProps {\n label: React.ReactNode;\n children?: React.ReactNode;\n disabled?: boolean;\n sx?: object;\n dotColor?: string; // dot base\n activeDotColor?: string; // dot activa\n completedDotColor?: string; // dot completada\n iconTextColor?: string; // número o check dentro\n}\n\nexport const Step = (_: StepProps): null => null;\n\nStep.displayName = \"Step\";\n\nexport default Step;"],"names":["jsxs","Box","jsx","MuiStepper","MuiStep","MuiStepLabel"],"mappings":";;;;AAYO,MAAM,UAAoC,CAAC;AAAA,EAChD;AAAA,EACA,cAAc;AAAA,EACd,iBAAiB;AAAA,EAEjB;AAAA,EACA,cAAc;AAChB,MAAM;AAEJ,SACEA,gCAACC,SAAAA,OAAI,IACH,UAAA;AAAA,IAAAC,2BAAAA,IAACC,SAAAA,SAAA,EAAW,YAAY,aAAa,aAA0B,kBAAkB,gBAC9E,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;AAC5B,YAAM,EAAE,OAAO,WAAW,UAAU,WAAW,IAAI,QAAQ,UAAU,gBAAgB,mBAAmB,cAAA,IAAkB,MAAM;AAChI,4CACGC,eAAA,EAAkB,WAAsB,UAAoB,WAAsB,IAAI,QACrF,UAAAF,2BAAAA;AAAAA,QAACG,SAAAA;AAAAA,QAAA;AAAA,UAAa,IAAI;AAAA,YAChB,eAAe;AAAA,YACf,uBAAuB;AAAA,cACrB,OAAO;AAAA,YAAA;AAAA,YAET,yBAAyB;AAAA,cACvB,OAAO;AAAA,YAAA;AAAA,YAET,4BAA4B;AAAA,cAC1B,OAAO;AAAA,YAAA;AAAA,YAET,uBAAuB;AAAA,cACrB,MAAM;AAAA,YAAA;AAAA,UACR;AAAA,UAEA,UAAA;AAAA,QAAA;AAAA,MAAA,KAhBU,GAkBd;AAAA,IAEJ,CAAC,EAAA,CACH;AAAA,IACAH,2BAAAA,IAACD,SAAAA,KAAA,EAAI,IAAI,GACN,UAAA,SAAS;AAAA,MAAI,CAAC,OAAO,QACpB,QAAQ,cAAcC,2BAAAA,IAACD,SAAAA,KAAA,EAAe,UAAA,MAAM,MAAM,SAAA,GAAlB,GAA2B,IAAS;AAAA,IAAA,EACtE,CACF;AAAA,EAAA,GACF;AAEJ;ACxCO,MAAM,OAAO,CAAC,MAAuB;AAE5C,KAAK,cAAc;;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactElement } from 'react';
|
|
2
|
-
import { StepProps } from './Step';
|
|
3
|
-
interface MyStepperProps {
|
|
4
|
-
children: ReactElement<StepProps>[];
|
|
5
|
-
orientation?: "horizontal" | "vertical";
|
|
6
|
-
sx?: object;
|
|
7
|
-
alternateLabel?: boolean;
|
|
8
|
-
currentStep?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const Stepper: React.FC<MyStepperProps>;
|
|
11
|
-
export default Stepper;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Stepper as Stepper$1, Step as Step$1, StepLabel } from "@mui/material";
|
|
3
|
-
const Stepper = ({
|
|
4
|
-
children,
|
|
5
|
-
orientation = "horizontal",
|
|
6
|
-
alternateLabel = false,
|
|
7
|
-
sx,
|
|
8
|
-
currentStep = 0
|
|
9
|
-
}) => {
|
|
10
|
-
return /* @__PURE__ */ jsxs(Box, { sx, children: [
|
|
11
|
-
/* @__PURE__ */ jsx(Stepper$1, { activeStep: currentStep, orientation, alternativeLabel: alternateLabel, children: children.map((child, idx) => {
|
|
12
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
13
|
-
return /* @__PURE__ */ jsx(Step$1, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsx(
|
|
14
|
-
StepLabel,
|
|
15
|
-
{
|
|
16
|
-
sx: {
|
|
17
|
-
pointerEvents: "none",
|
|
18
|
-
"& .MuiStepIcon-root": {
|
|
19
|
-
color: dotColor
|
|
20
|
-
},
|
|
21
|
-
"& .MuiStepIcon-active": {
|
|
22
|
-
color: activeDotColor
|
|
23
|
-
},
|
|
24
|
-
"& .MuiStepIcon-completed": {
|
|
25
|
-
color: completedDotColor
|
|
26
|
-
},
|
|
27
|
-
"& .MuiStepIcon-text": {
|
|
28
|
-
fill: iconTextColor
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
children: label
|
|
32
|
-
}
|
|
33
|
-
) }, idx);
|
|
34
|
-
}) }),
|
|
35
|
-
/* @__PURE__ */ jsx(Box, { mt: 2, children: children.map(
|
|
36
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsx(Box, { children: child.props.children }, idx) : null
|
|
37
|
-
) })
|
|
38
|
-
] });
|
|
39
|
-
};
|
|
40
|
-
const Step = (_) => null;
|
|
41
|
-
Step.displayName = "Step";
|
|
42
|
-
export {
|
|
43
|
-
Step,
|
|
44
|
-
Stepper
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=Stepper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":["../../../src/components/Stepper/Stepper.tsx","../../../src/components/Stepper/Step.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\nimport { Stepper as MuiStepper, Step as MuiStep, StepLabel as MuiStepLabel, Box } from \"@mui/material\";\nimport { StepProps } from \"./Step\";\n\ninterface MyStepperProps {\n children: ReactElement<StepProps>[];\n orientation?: \"horizontal\" | \"vertical\";\n sx?: object;\n alternateLabel?: boolean;\n currentStep?: number;\n}\n\nexport const Stepper: React.FC<MyStepperProps> = ({\n children,\n orientation = \"horizontal\",\n alternateLabel = false,\n\n sx,\n currentStep = 0,\n}) => {\n\n return (\n <Box sx={sx}>\n <MuiStepper activeStep={currentStep} orientation={orientation} alternativeLabel={alternateLabel} >\n {children.map((child, idx) => {\n const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;\n return (\n <MuiStep key={idx} completed={completed} disabled={disabled} className={className} sx={stepSx}>\n <MuiStepLabel sx={{\n pointerEvents: 'none',\n \"& .MuiStepIcon-root\": {\n color: dotColor,\n },\n \"& .MuiStepIcon-active\": {\n color: activeDotColor,\n },\n \"& .MuiStepIcon-completed\": {\n color: completedDotColor,\n },\n \"& .MuiStepIcon-text\": {\n fill: iconTextColor,\n },\n }}\n >{label}\n </MuiStepLabel>\n </MuiStep>\n );\n })}\n </MuiStepper>\n <Box mt={2}>\n {children.map((child, idx) =>\n idx === currentStep ? <Box key={idx}>{child.props.children}</Box> : null\n )}\n </Box>\n </Box>\n );\n};\n\nexport default Stepper;","import React from \"react\";\nimport { StepProps as MuiStepProps } from \"@mui/material\";\n\ntype PickMuiStepProps = Pick<MuiStepProps, \"completed\" | \"disabled\" | \"sx\" | \"className\">;\n\nexport interface StepProps extends PickMuiStepProps {\n label: React.ReactNode;\n children?: React.ReactNode;\n disabled?: boolean;\n sx?: object;\n dotColor?: string; // dot base\n activeDotColor?: string; // dot activa\n completedDotColor?: string; // dot completada\n iconTextColor?: string; // número o check dentro\n}\n\nexport const Step = (_: StepProps): null => null;\n\nStep.displayName = \"Step\";\n\nexport default Step;"],"names":["MuiStepper","MuiStep","MuiStepLabel"],"mappings":";;AAYO,MAAM,UAAoC,CAAC;AAAA,EAChD;AAAA,EACA,cAAc;AAAA,EACd,iBAAiB;AAAA,EAEjB;AAAA,EACA,cAAc;AAChB,MAAM;AAEJ,SACE,qBAAC,OAAI,IACH,UAAA;AAAA,IAAA,oBAACA,WAAA,EAAW,YAAY,aAAa,aAA0B,kBAAkB,gBAC9E,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;AAC5B,YAAM,EAAE,OAAO,WAAW,UAAU,WAAW,IAAI,QAAQ,UAAU,gBAAgB,mBAAmB,cAAA,IAAkB,MAAM;AAChI,iCACGC,QAAA,EAAkB,WAAsB,UAAoB,WAAsB,IAAI,QACrF,UAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UAAa,IAAI;AAAA,YAChB,eAAe;AAAA,YACf,uBAAuB;AAAA,cACrB,OAAO;AAAA,YAAA;AAAA,YAET,yBAAyB;AAAA,cACvB,OAAO;AAAA,YAAA;AAAA,YAET,4BAA4B;AAAA,cAC1B,OAAO;AAAA,YAAA;AAAA,YAET,uBAAuB;AAAA,cACrB,MAAM;AAAA,YAAA;AAAA,UACR;AAAA,UAEA,UAAA;AAAA,QAAA;AAAA,MAAA,KAhBU,GAkBd;AAAA,IAEJ,CAAC,EAAA,CACH;AAAA,IACA,oBAAC,KAAA,EAAI,IAAI,GACN,UAAA,SAAS;AAAA,MAAI,CAAC,OAAO,QACpB,QAAQ,cAAc,oBAAC,KAAA,EAAe,UAAA,MAAM,MAAM,SAAA,GAAlB,GAA2B,IAAS;AAAA,IAAA,EACtE,CACF;AAAA,EAAA,GACF;AAEJ;ACxCO,MAAM,OAAO,CAAC,MAAuB;AAE5C,KAAK,cAAc;"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const React = require("react");
|
|
21
|
-
const material = require("@mui/material");
|
|
22
|
-
const TAB_DISPLAY_MAP = {
|
|
23
|
-
horizontal: { display: "flex", flexDirection: "column" },
|
|
24
|
-
vertical: { display: "flex", flexDirection: "row" }
|
|
25
|
-
};
|
|
26
|
-
const Tabs = ({
|
|
27
|
-
children,
|
|
28
|
-
defaultValue,
|
|
29
|
-
onChange,
|
|
30
|
-
centered = true,
|
|
31
|
-
orientation = "horizontal",
|
|
32
|
-
scrollButtons = "auto",
|
|
33
|
-
variant = "standard",
|
|
34
|
-
indicatorColor = "primary",
|
|
35
|
-
labelColor = "primary",
|
|
36
|
-
className,
|
|
37
|
-
onChangeValue,
|
|
38
|
-
allowScrollButtonsMobile = true,
|
|
39
|
-
sx
|
|
40
|
-
}) => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
const firstValue = (_a = children[0]) == null ? void 0 : _a.props.value;
|
|
43
|
-
const [currentValue, setCurrentValue] = React.useState(
|
|
44
|
-
(_b = defaultValue != null ? defaultValue : firstValue) != null ? _b : 0
|
|
45
|
-
);
|
|
46
|
-
const handleChange = (event, newValue) => {
|
|
47
|
-
setCurrentValue(newValue);
|
|
48
|
-
onChange == null ? void 0 : onChange();
|
|
49
|
-
onChangeValue == null ? void 0 : onChangeValue(newValue);
|
|
50
|
-
};
|
|
51
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { display: TAB_DISPLAY_MAP[orientation].display, flexDirection: TAB_DISPLAY_MAP[orientation].flexDirection }, children: [
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
53
|
-
material.Tabs,
|
|
54
|
-
{
|
|
55
|
-
value: currentValue,
|
|
56
|
-
onChange: handleChange,
|
|
57
|
-
centered,
|
|
58
|
-
indicatorColor,
|
|
59
|
-
orientation,
|
|
60
|
-
scrollButtons,
|
|
61
|
-
variant,
|
|
62
|
-
className,
|
|
63
|
-
textColor: labelColor,
|
|
64
|
-
sx: __spreadValues({}, sx),
|
|
65
|
-
allowScrollButtonsMobile,
|
|
66
|
-
children: children.map((child, idx) => {
|
|
67
|
-
const { label, icon, value = idx, disabled, wrapped, iconPosition, className: tabClassName, sx: tabSx } = child.props;
|
|
68
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
-
material.Tab,
|
|
70
|
-
{
|
|
71
|
-
label,
|
|
72
|
-
icon,
|
|
73
|
-
value,
|
|
74
|
-
disabled,
|
|
75
|
-
wrapped,
|
|
76
|
-
iconPosition,
|
|
77
|
-
className: tabClassName,
|
|
78
|
-
sx: tabSx
|
|
79
|
-
},
|
|
80
|
-
value
|
|
81
|
-
);
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { m: 2, role: "tabpanel", sx: { width: "100%" }, children: children.map((child, idx) => {
|
|
86
|
-
var _a2;
|
|
87
|
-
const value = (_a2 = child.props.value) != null ? _a2 : idx;
|
|
88
|
-
return value === currentValue ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: child.props.children }, value) : null;
|
|
89
|
-
}) })
|
|
90
|
-
] });
|
|
91
|
-
};
|
|
92
|
-
const Tab = (_) => null;
|
|
93
|
-
Tab.displayName = "Tab";
|
|
94
|
-
exports.Tab = Tab;
|
|
95
|
-
exports.Tabs = Tabs;
|
|
96
|
-
//# sourceMappingURL=Tabs.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.cjs","sources":["../../../src/components/Tabs/_tabUtils.tsx","../../../src/components/Tabs/Tabs.tsx","../../../src/components/Tabs/Tab.tsx"],"sourcesContent":["export const TAB_DISPLAY_MAP: Record<\"horizontal\" | \"vertical\", { display: string, flexDirection: string }> = {\n horizontal: { display: \"flex\", flexDirection: \"column\" },\n vertical: { display: \"flex\", flexDirection: \"row\" }\n};","import React, { useState, ReactElement } from \"react\";\nimport { Tabs as MuiTabs, Tab as MuiTab, Box, TabsProps as MuiTabsProps } from \"@mui/material\";\nimport { TabProps } from \"./Tab\";\nimport { TAB_DISPLAY_MAP } from \"./_tabUtils\";\n\ntype PickTabsProps = Pick<\n MuiTabsProps,\n \"centered\" | \"indicatorColor\" | \"orientation\" | \"scrollButtons\" | \"variant\" | \"className\" | \"sx\" | \"visibleScrollbar\" | 'indicatorColor'| 'allowScrollButtonsMobile'\n>;\n\ninterface MyTabsProps extends PickTabsProps {\n children: ReactElement<TabProps>[];\n defaultValue?: number;\n onChange?: () => void;\n centered?: boolean;\n orientation?: \"horizontal\" | \"vertical\";\n scrollButtons?: \"auto\" | false | true;\n variant?: \"standard\" | \"scrollable\" | \"fullWidth\";\n indicatorColor?: \"primary\" | \"secondary\";\n labelColor?: \"primary\" | \"secondary\" | \"inherit\";\n onChangeValue?: (newValue: number) => void;\n allowScrollButtonsMobile?: boolean;\n}\n\nexport const Tabs: React.FC<MyTabsProps> = ({\n children,\n defaultValue,\n onChange,\n centered = true,\n orientation = 'horizontal',\n scrollButtons = \"auto\",\n variant = \"standard\",\n indicatorColor = \"primary\",\n labelColor = \"primary\",\n className,\n onChangeValue,\n allowScrollButtonsMobile = true,\n sx,\n}) => {\n const firstValue = children[0]?.props.value;\n const [currentValue, setCurrentValue] = useState<string | number>(\n defaultValue ?? firstValue ?? 0\n );\n\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n setCurrentValue(newValue);\n onChange?.();\n onChangeValue?.(newValue);\n };\n\n return (\n <Box sx={{ display: TAB_DISPLAY_MAP[orientation].display, flexDirection: TAB_DISPLAY_MAP[orientation].flexDirection}}>\n <MuiTabs\n value={currentValue}\n onChange={handleChange}\n centered={centered}\n indicatorColor={indicatorColor}\n orientation={orientation}\n scrollButtons={scrollButtons}\n variant={variant}\n className={className}\n textColor={labelColor}\n sx={{ ...sx }}\n allowScrollButtonsMobile={allowScrollButtonsMobile}\n \n\n >\n {children.map((child, idx) => {\n const { label, icon, value = idx, disabled, wrapped, iconPosition, className: tabClassName, sx: tabSx } = child.props;\n return (\n <MuiTab\n key={value}\n label={label}\n icon={icon}\n value={value}\n disabled={disabled}\n wrapped={wrapped}\n iconPosition={iconPosition}\n className={tabClassName}\n sx={tabSx}\n />\n );\n })}\n </MuiTabs>\n\n <Box m={2} role=\"tabpanel\" sx={{width:'100%'}} >\n {children.map((child, idx) => {\n const value = child.props.value ?? idx;\n return value === currentValue ? (\n <Box key={value}>{child.props.children}</Box>\n ) : null;\n })}\n </Box>\n </Box>\n\n );\n};\n\nexport default Tabs;\n","import React from \"react\";\nimport { TabProps as MuiTabProps } from \"@mui/material\";\n\ntype PickMuiTabProps = Pick<\n MuiTabProps,\n \"label\" | \"icon\" | \"disabled\" | \"sx\" | \"value\" | \"wrapped\" | \"iconPosition\" | \"className\" | \"disabled\"| 'disableRipple'\n>;\n\nexport interface TabProps extends PickMuiTabProps {\n value?: number;\n onChange?: () => void;\n children?: React.ReactNode;\n}\n\nexport const Tab = (_: TabProps): null => null;\n\nTab.displayName = \"Tab\";\n\nexport default Tab;\n"],"names":["useState","jsxs","Box","jsx","MuiTabs","MuiTab","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,kBAAiG;AAAA,EAC5G,YAAY,EAAE,SAAS,QAAQ,eAAe,SAAA;AAAA,EAC9C,UAAU,EAAE,SAAS,QAAQ,eAAe,MAAA;AAC9C;ACqBO,MAAM,OAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,2BAA2B;AAAA,EAC3B;AACF,MAAM;;AACJ,QAAM,cAAa,cAAS,CAAC,MAAV,mBAAa,MAAM;AACtC,QAAM,CAAC,cAAc,eAAe,IAAIA,MAAAA;AAAAA,KACtC,2CAAgB,eAAhB,YAA8B;AAAA,EAAA;AAGhC,QAAM,eAAe,CAAC,OAA6B,aAAqB;AACtE,oBAAgB,QAAQ;AACxB;AACA,mDAAgB;AAAA,EAClB;AAEA,SACEC,2BAAAA,KAACC,SAAAA,KAAA,EAAI,IAAI,EAAE,SAAS,gBAAgB,WAAW,EAAE,SAAS,eAAe,gBAAgB,WAAW,EAAE,iBACpG,UAAA;AAAA,IAAAC,2BAAAA;AAAAA,MAACC,SAAAA;AAAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX,IAAI,mBAAK;AAAA,QACT;AAAA,QAIC,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;AAC5B,gBAAM,EAAE,OAAO,MAAM,QAAQ,KAAK,UAAU,SAAS,cAAc,WAAW,cAAc,IAAI,MAAA,IAAU,MAAM;AAChH,iBACED,2BAAAA;AAAAA,YAACE,SAAAA;AAAAA,YAAA;AAAA,cAEC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,WAAW;AAAA,cACX,IAAI;AAAA,YAAA;AAAA,YARC;AAAA,UAAA;AAAA,QAWX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGHF,2BAAAA,IAACD,SAAAA,KAAA,EAAI,GAAG,GAAG,MAAK,YAAW,IAAI,EAAC,OAAM,UACnC,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;;AAC5B,YAAM,SAAQI,MAAA,MAAM,MAAM,UAAZ,OAAAA,MAAqB;AACnC,aAAO,UAAU,eACfH,2BAAAA,IAACD,SAAAA,KAAA,EAAiB,gBAAM,MAAM,YAApB,KAA6B,IACrC;AAAA,IACN,CAAC,EAAA,CACH;AAAA,EAAA,GACF;AAGJ;AClFO,MAAM,MAAM,CAAC,MAAsB;AAE1C,IAAI,cAAc;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactElement } from 'react';
|
|
2
|
-
import { TabsProps as MuiTabsProps } from '@mui/material';
|
|
3
|
-
import { TabProps } from './Tab';
|
|
4
|
-
type PickTabsProps = Pick<MuiTabsProps, "centered" | "indicatorColor" | "orientation" | "scrollButtons" | "variant" | "className" | "sx" | "visibleScrollbar" | 'indicatorColor' | 'allowScrollButtonsMobile'>;
|
|
5
|
-
interface MyTabsProps extends PickTabsProps {
|
|
6
|
-
children: ReactElement<TabProps>[];
|
|
7
|
-
defaultValue?: number;
|
|
8
|
-
onChange?: () => void;
|
|
9
|
-
centered?: boolean;
|
|
10
|
-
orientation?: "horizontal" | "vertical";
|
|
11
|
-
scrollButtons?: "auto" | false | true;
|
|
12
|
-
variant?: "standard" | "scrollable" | "fullWidth";
|
|
13
|
-
indicatorColor?: "primary" | "secondary";
|
|
14
|
-
labelColor?: "primary" | "secondary" | "inherit";
|
|
15
|
-
onChangeValue?: (newValue: number) => void;
|
|
16
|
-
allowScrollButtonsMobile?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const Tabs: React.FC<MyTabsProps>;
|
|
19
|
-
export default Tabs;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
18
|
-
import { useState } from "react";
|
|
19
|
-
import { Box, Tabs as Tabs$1, Tab as Tab$1 } from "@mui/material";
|
|
20
|
-
const TAB_DISPLAY_MAP = {
|
|
21
|
-
horizontal: { display: "flex", flexDirection: "column" },
|
|
22
|
-
vertical: { display: "flex", flexDirection: "row" }
|
|
23
|
-
};
|
|
24
|
-
const Tabs = ({
|
|
25
|
-
children,
|
|
26
|
-
defaultValue,
|
|
27
|
-
onChange,
|
|
28
|
-
centered = true,
|
|
29
|
-
orientation = "horizontal",
|
|
30
|
-
scrollButtons = "auto",
|
|
31
|
-
variant = "standard",
|
|
32
|
-
indicatorColor = "primary",
|
|
33
|
-
labelColor = "primary",
|
|
34
|
-
className,
|
|
35
|
-
onChangeValue,
|
|
36
|
-
allowScrollButtonsMobile = true,
|
|
37
|
-
sx
|
|
38
|
-
}) => {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
const firstValue = (_a = children[0]) == null ? void 0 : _a.props.value;
|
|
41
|
-
const [currentValue, setCurrentValue] = useState(
|
|
42
|
-
(_b = defaultValue != null ? defaultValue : firstValue) != null ? _b : 0
|
|
43
|
-
);
|
|
44
|
-
const handleChange = (event, newValue) => {
|
|
45
|
-
setCurrentValue(newValue);
|
|
46
|
-
onChange == null ? void 0 : onChange();
|
|
47
|
-
onChangeValue == null ? void 0 : onChangeValue(newValue);
|
|
48
|
-
};
|
|
49
|
-
return /* @__PURE__ */ jsxs(Box, { sx: { display: TAB_DISPLAY_MAP[orientation].display, flexDirection: TAB_DISPLAY_MAP[orientation].flexDirection }, children: [
|
|
50
|
-
/* @__PURE__ */ jsx(
|
|
51
|
-
Tabs$1,
|
|
52
|
-
{
|
|
53
|
-
value: currentValue,
|
|
54
|
-
onChange: handleChange,
|
|
55
|
-
centered,
|
|
56
|
-
indicatorColor,
|
|
57
|
-
orientation,
|
|
58
|
-
scrollButtons,
|
|
59
|
-
variant,
|
|
60
|
-
className,
|
|
61
|
-
textColor: labelColor,
|
|
62
|
-
sx: __spreadValues({}, sx),
|
|
63
|
-
allowScrollButtonsMobile,
|
|
64
|
-
children: children.map((child, idx) => {
|
|
65
|
-
const { label, icon, value = idx, disabled, wrapped, iconPosition, className: tabClassName, sx: tabSx } = child.props;
|
|
66
|
-
return /* @__PURE__ */ jsx(
|
|
67
|
-
Tab$1,
|
|
68
|
-
{
|
|
69
|
-
label,
|
|
70
|
-
icon,
|
|
71
|
-
value,
|
|
72
|
-
disabled,
|
|
73
|
-
wrapped,
|
|
74
|
-
iconPosition,
|
|
75
|
-
className: tabClassName,
|
|
76
|
-
sx: tabSx
|
|
77
|
-
},
|
|
78
|
-
value
|
|
79
|
-
);
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsx(Box, { m: 2, role: "tabpanel", sx: { width: "100%" }, children: children.map((child, idx) => {
|
|
84
|
-
var _a2;
|
|
85
|
-
const value = (_a2 = child.props.value) != null ? _a2 : idx;
|
|
86
|
-
return value === currentValue ? /* @__PURE__ */ jsx(Box, { children: child.props.children }, value) : null;
|
|
87
|
-
}) })
|
|
88
|
-
] });
|
|
89
|
-
};
|
|
90
|
-
const Tab = (_) => null;
|
|
91
|
-
Tab.displayName = "Tab";
|
|
92
|
-
export {
|
|
93
|
-
Tab,
|
|
94
|
-
Tabs
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sources":["../../../src/components/Tabs/_tabUtils.tsx","../../../src/components/Tabs/Tabs.tsx","../../../src/components/Tabs/Tab.tsx"],"sourcesContent":["export const TAB_DISPLAY_MAP: Record<\"horizontal\" | \"vertical\", { display: string, flexDirection: string }> = {\n horizontal: { display: \"flex\", flexDirection: \"column\" },\n vertical: { display: \"flex\", flexDirection: \"row\" }\n};","import React, { useState, ReactElement } from \"react\";\nimport { Tabs as MuiTabs, Tab as MuiTab, Box, TabsProps as MuiTabsProps } from \"@mui/material\";\nimport { TabProps } from \"./Tab\";\nimport { TAB_DISPLAY_MAP } from \"./_tabUtils\";\n\ntype PickTabsProps = Pick<\n MuiTabsProps,\n \"centered\" | \"indicatorColor\" | \"orientation\" | \"scrollButtons\" | \"variant\" | \"className\" | \"sx\" | \"visibleScrollbar\" | 'indicatorColor'| 'allowScrollButtonsMobile'\n>;\n\ninterface MyTabsProps extends PickTabsProps {\n children: ReactElement<TabProps>[];\n defaultValue?: number;\n onChange?: () => void;\n centered?: boolean;\n orientation?: \"horizontal\" | \"vertical\";\n scrollButtons?: \"auto\" | false | true;\n variant?: \"standard\" | \"scrollable\" | \"fullWidth\";\n indicatorColor?: \"primary\" | \"secondary\";\n labelColor?: \"primary\" | \"secondary\" | \"inherit\";\n onChangeValue?: (newValue: number) => void;\n allowScrollButtonsMobile?: boolean;\n}\n\nexport const Tabs: React.FC<MyTabsProps> = ({\n children,\n defaultValue,\n onChange,\n centered = true,\n orientation = 'horizontal',\n scrollButtons = \"auto\",\n variant = \"standard\",\n indicatorColor = \"primary\",\n labelColor = \"primary\",\n className,\n onChangeValue,\n allowScrollButtonsMobile = true,\n sx,\n}) => {\n const firstValue = children[0]?.props.value;\n const [currentValue, setCurrentValue] = useState<string | number>(\n defaultValue ?? firstValue ?? 0\n );\n\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n setCurrentValue(newValue);\n onChange?.();\n onChangeValue?.(newValue);\n };\n\n return (\n <Box sx={{ display: TAB_DISPLAY_MAP[orientation].display, flexDirection: TAB_DISPLAY_MAP[orientation].flexDirection}}>\n <MuiTabs\n value={currentValue}\n onChange={handleChange}\n centered={centered}\n indicatorColor={indicatorColor}\n orientation={orientation}\n scrollButtons={scrollButtons}\n variant={variant}\n className={className}\n textColor={labelColor}\n sx={{ ...sx }}\n allowScrollButtonsMobile={allowScrollButtonsMobile}\n \n\n >\n {children.map((child, idx) => {\n const { label, icon, value = idx, disabled, wrapped, iconPosition, className: tabClassName, sx: tabSx } = child.props;\n return (\n <MuiTab\n key={value}\n label={label}\n icon={icon}\n value={value}\n disabled={disabled}\n wrapped={wrapped}\n iconPosition={iconPosition}\n className={tabClassName}\n sx={tabSx}\n />\n );\n })}\n </MuiTabs>\n\n <Box m={2} role=\"tabpanel\" sx={{width:'100%'}} >\n {children.map((child, idx) => {\n const value = child.props.value ?? idx;\n return value === currentValue ? (\n <Box key={value}>{child.props.children}</Box>\n ) : null;\n })}\n </Box>\n </Box>\n\n );\n};\n\nexport default Tabs;\n","import React from \"react\";\nimport { TabProps as MuiTabProps } from \"@mui/material\";\n\ntype PickMuiTabProps = Pick<\n MuiTabProps,\n \"label\" | \"icon\" | \"disabled\" | \"sx\" | \"value\" | \"wrapped\" | \"iconPosition\" | \"className\" | \"disabled\"| 'disableRipple'\n>;\n\nexport interface TabProps extends PickMuiTabProps {\n value?: number;\n onChange?: () => void;\n children?: React.ReactNode;\n}\n\nexport const Tab = (_: TabProps): null => null;\n\nTab.displayName = \"Tab\";\n\nexport default Tab;\n"],"names":["MuiTabs","MuiTab","_a"],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,MAAM,kBAAiG;AAAA,EAC5G,YAAY,EAAE,SAAS,QAAQ,eAAe,SAAA;AAAA,EAC9C,UAAU,EAAE,SAAS,QAAQ,eAAe,MAAA;AAC9C;ACqBO,MAAM,OAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,2BAA2B;AAAA,EAC3B;AACF,MAAM;;AACJ,QAAM,cAAa,cAAS,CAAC,MAAV,mBAAa,MAAM;AACtC,QAAM,CAAC,cAAc,eAAe,IAAI;AAAA,KACtC,2CAAgB,eAAhB,YAA8B;AAAA,EAAA;AAGhC,QAAM,eAAe,CAAC,OAA6B,aAAqB;AACtE,oBAAgB,QAAQ;AACxB;AACA,mDAAgB;AAAA,EAClB;AAEA,SACE,qBAAC,KAAA,EAAI,IAAI,EAAE,SAAS,gBAAgB,WAAW,EAAE,SAAS,eAAe,gBAAgB,WAAW,EAAE,iBACpG,UAAA;AAAA,IAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX,IAAI,mBAAK;AAAA,QACT;AAAA,QAIC,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;AAC5B,gBAAM,EAAE,OAAO,MAAM,QAAQ,KAAK,UAAU,SAAS,cAAc,WAAW,cAAc,IAAI,MAAA,IAAU,MAAM;AAChH,iBACE;AAAA,YAACC;AAAAA,YAAA;AAAA,cAEC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,WAAW;AAAA,cACX,IAAI;AAAA,YAAA;AAAA,YARC;AAAA,UAAA;AAAA,QAWX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGH,oBAAC,KAAA,EAAI,GAAG,GAAG,MAAK,YAAW,IAAI,EAAC,OAAM,UACnC,UAAA,SAAS,IAAI,CAAC,OAAO,QAAQ;;AAC5B,YAAM,SAAQC,MAAA,MAAM,MAAM,UAAZ,OAAAA,MAAqB;AACnC,aAAO,UAAU,eACf,oBAAC,KAAA,EAAiB,gBAAM,MAAM,YAApB,KAA6B,IACrC;AAAA,IACN,CAAC,EAAA,CACH;AAAA,EAAA,GACF;AAGJ;AClFO,MAAM,MAAM,CAAC,MAAsB;AAE1C,IAAI,cAAc;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.cjs","sources":["../../../src/components/Timeline/Timeline.tsx","../../../src/components/Timeline/TimelineItem.tsx"],"sourcesContent":["import * as React from \"react\";\nimport MuiTimeline from \"@mui/lab/Timeline\";\nimport { timelineContentClasses } from \"@mui/lab/TimelineContent\";\nimport { timelineItemClasses, TimelineItemProps as MuiTimelineItemProps } from \"@mui/lab/TimelineItem\";\nimport { Box } from \"@mui/material\";\n\ninterface TimelineItemProps extends MuiTimelineItemProps {\n connectorColor?: string;\n sx?: object;\n}\n\ninterface TimelineProps {\n children: React.ReactElement<TimelineItemProps>[];\n position?: \"left\" | \"right\" | 'alternate' | 'alternate-reverse' ;\n sx?: object;\n}\n\nexport const Timeline: React.FC<TimelineProps> = ({ children, position = \"right\", sx }) => {\n const count = React.Children.count(children);\n\n const customSx = (position === \"left\" || position === \"right\")\n ? {\n [`& .${timelineItemClasses.root}:before`]: {\n flex: 0,\n padding: 0,\n },\n ...sx,\n }\n : sx;\n \n return (\n <MuiTimeline position={position}\n sx={{...customSx}}\n >\n {React.Children.map(children, (child, idx) =>\n React.isValidElement(child)\n ? React.cloneElement(child, {\n connectorColor: idx < count - 1\n ? child.props.connectorColor ?? 'gray.main'\n : undefined,\n })\n : null\n )}\n </MuiTimeline>\n\n );\n};\n\nexport default Timeline;","\nimport MuiTimelineItem from \"@mui/lab/TimelineItem\";\nimport MuiTimelineSeparator from \"@mui/lab/TimelineSeparator\";\nimport MuiTimelineConnector from \"@mui/lab/TimelineConnector\";\nimport MuiTimelineContent from \"@mui/lab/TimelineContent\";\nimport MuiTimelineDot from \"@mui/lab/TimelineDot\";\n\nexport interface TimelineItemProps {\n dotColor?: 'primary' | 'secondary' | 'grey' | 'inherit' | 'success' | 'error' | 'info' | 'warning';\n connectorColor?: 'success' | 'error' | 'info' | 'warning' | 'primary' | 'secondary' | 'grey';\n children: React.ReactNode;\n}\n\nexport const TimelineItem: React.FC<TimelineItemProps> = ({\n dotColor = 'grey',\n connectorColor,\n children\n}) => {\n const color = connectorColor ? `${connectorColor}.main` : 'secondary.main';\n return (\n <MuiTimelineItem>\n <MuiTimelineSeparator>\n <MuiTimelineDot color={dotColor} />\n {connectorColor !== undefined && <MuiTimelineConnector sx={{ bgcolor: color }} />}\n </MuiTimelineSeparator>\n <MuiTimelineContent>{children}</MuiTimelineContent>\n </MuiTimelineItem>\n );\n};\n\nexport default TimelineItem"],"names":["React","timelineItemClasses","jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAM,WAAoC,CAAC,EAAE,UAAU,WAAW,SAAS,SAAS;AACzF,QAAM,QAAQA,iBAAM,SAAS,MAAM,QAAQ;AAEzC,QAAM,WAAY,aAAa,UAAU,aAAa,UACpD;AAAA,IACE,CAAC,MAAMC,gBAAAA,oBAAoB,IAAI,SAAS,GAAG;AAAA,MACzC,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,KAER,MAEL;AAEJ,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MAAY;AAAA,MACX,IAAI,mBAAI;AAAA,MAEP,2BAAM,SAAS;AAAA,QAAI;AAAA,QAAU,CAAC,OAAO,QAAA;;AACpCF,kCAAM,eAAe,KAAK,IACtBA,iBAAM,aAAa,OAAO;AAAA,YAC1B,gBAAgB,MAAM,QAAQ,KAC1B,WAAM,MAAM,mBAAZ,YAA8B,cAC9B;AAAA,UAAA,CACL,IACC;AAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIN;ACjCO,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX;AAAA,EACA;AACF,MAAM;AACJ,QAAM,QAAQ,iBAAiB,GAAG,cAAc,UAAU;AAC1D,yCACG,iBAAA,EACC,UAAA;AAAA,IAAAG,gCAAC,sBAAA,EACC,UAAA;AAAA,MAAAD,2BAAAA,IAAC,gBAAA,EAAe,OAAO,SAAA,CAAU;AAAA,MAChC,mBAAmB,UAAaA,2BAAAA,IAAC,sBAAA,EAAqB,IAAI,EAAE,SAAS,QAAM,CAAG;AAAA,IAAA,GACjF;AAAA,IACAA,+BAAC,sBAAoB,SAAA,CAAS;AAAA,EAAA,GAChC;AAEJ;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TimelineItemProps as MuiTimelineItemProps } from '@mui/lab/TimelineItem';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
interface TimelineItemProps extends MuiTimelineItemProps {
|
|
4
|
-
connectorColor?: string;
|
|
5
|
-
sx?: object;
|
|
6
|
-
}
|
|
7
|
-
interface TimelineProps {
|
|
8
|
-
children: React.ReactElement<TimelineItemProps>[];
|
|
9
|
-
position?: "left" | "right" | 'alternate' | 'alternate-reverse';
|
|
10
|
-
sx?: object;
|
|
11
|
-
}
|
|
12
|
-
export declare const Timeline: React.FC<TimelineProps>;
|
|
13
|
-
export default Timeline;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.js","sources":["../../../src/components/Timeline/Timeline.tsx","../../../src/components/Timeline/TimelineItem.tsx"],"sourcesContent":["import * as React from \"react\";\nimport MuiTimeline from \"@mui/lab/Timeline\";\nimport { timelineContentClasses } from \"@mui/lab/TimelineContent\";\nimport { timelineItemClasses, TimelineItemProps as MuiTimelineItemProps } from \"@mui/lab/TimelineItem\";\nimport { Box } from \"@mui/material\";\n\ninterface TimelineItemProps extends MuiTimelineItemProps {\n connectorColor?: string;\n sx?: object;\n}\n\ninterface TimelineProps {\n children: React.ReactElement<TimelineItemProps>[];\n position?: \"left\" | \"right\" | 'alternate' | 'alternate-reverse' ;\n sx?: object;\n}\n\nexport const Timeline: React.FC<TimelineProps> = ({ children, position = \"right\", sx }) => {\n const count = React.Children.count(children);\n\n const customSx = (position === \"left\" || position === \"right\")\n ? {\n [`& .${timelineItemClasses.root}:before`]: {\n flex: 0,\n padding: 0,\n },\n ...sx,\n }\n : sx;\n \n return (\n <MuiTimeline position={position}\n sx={{...customSx}}\n >\n {React.Children.map(children, (child, idx) =>\n React.isValidElement(child)\n ? React.cloneElement(child, {\n connectorColor: idx < count - 1\n ? child.props.connectorColor ?? 'gray.main'\n : undefined,\n })\n : null\n )}\n </MuiTimeline>\n\n );\n};\n\nexport default Timeline;","\nimport MuiTimelineItem from \"@mui/lab/TimelineItem\";\nimport MuiTimelineSeparator from \"@mui/lab/TimelineSeparator\";\nimport MuiTimelineConnector from \"@mui/lab/TimelineConnector\";\nimport MuiTimelineContent from \"@mui/lab/TimelineContent\";\nimport MuiTimelineDot from \"@mui/lab/TimelineDot\";\n\nexport interface TimelineItemProps {\n dotColor?: 'primary' | 'secondary' | 'grey' | 'inherit' | 'success' | 'error' | 'info' | 'warning';\n connectorColor?: 'success' | 'error' | 'info' | 'warning' | 'primary' | 'secondary' | 'grey';\n children: React.ReactNode;\n}\n\nexport const TimelineItem: React.FC<TimelineItemProps> = ({\n dotColor = 'grey',\n connectorColor,\n children\n}) => {\n const color = connectorColor ? `${connectorColor}.main` : 'secondary.main';\n return (\n <MuiTimelineItem>\n <MuiTimelineSeparator>\n <MuiTimelineDot color={dotColor} />\n {connectorColor !== undefined && <MuiTimelineConnector sx={{ bgcolor: color }} />}\n </MuiTimelineSeparator>\n <MuiTimelineContent>{children}</MuiTimelineContent>\n </MuiTimelineItem>\n );\n};\n\nexport default TimelineItem"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAM,WAAoC,CAAC,EAAE,UAAU,WAAW,SAAS,SAAS;AACzF,QAAM,QAAQ,MAAM,SAAS,MAAM,QAAQ;AAEzC,QAAM,WAAY,aAAa,UAAU,aAAa,UACpD;AAAA,IACE,CAAC,MAAM,oBAAoB,IAAI,SAAS,GAAG;AAAA,MACzC,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,KAER,MAEL;AAEJ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MAAY;AAAA,MACX,IAAI,mBAAI;AAAA,MAEP,gBAAM,SAAS;AAAA,QAAI;AAAA,QAAU,CAAC,OAAO,QAAA;;AACpC,uBAAM,eAAe,KAAK,IACtB,MAAM,aAAa,OAAO;AAAA,YAC1B,gBAAgB,MAAM,QAAQ,KAC1B,WAAM,MAAM,mBAAZ,YAA8B,cAC9B;AAAA,UAAA,CACL,IACC;AAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIN;ACjCO,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX;AAAA,EACA;AACF,MAAM;AACJ,QAAM,QAAQ,iBAAiB,GAAG,cAAc,UAAU;AAC1D,8BACG,iBAAA,EACC,UAAA;AAAA,IAAA,qBAAC,sBAAA,EACC,UAAA;AAAA,MAAA,oBAAC,gBAAA,EAAe,OAAO,SAAA,CAAU;AAAA,MAChC,mBAAmB,UAAa,oBAAC,sBAAA,EAAqB,IAAI,EAAE,SAAS,QAAM,CAAG;AAAA,IAAA,GACjF;AAAA,IACA,oBAAC,sBAAoB,SAAA,CAAS;AAAA,EAAA,GAChC;AAEJ;"}
|
package/dist/index.cjs
DELETED
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
DELETED
|
File without changes
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|