@soyfri/shared-library 2.0.0-beta.2 → 2.0.0-beta.20
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/.dockerignore +8 -0
- package/.github/workflows/publish.yml +107 -0
- package/.prettierrc +3 -0
- package/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +14 -0
- package/.storybook/vitest.setup.ts +9 -0
- package/Dockerfile +37 -0
- package/build.js +117 -0
- package/chromatic.config.json +5 -0
- package/cleanDirectories.js +40 -0
- package/dist/Autocomplete-C_lW1VER.js +337 -0
- package/dist/Autocomplete-C_lW1VER.js.map +1 -0
- package/dist/Autocomplete-CejWztBY.cjs +336 -0
- package/dist/Autocomplete-CejWztBY.cjs.map +1 -0
- package/dist/Avatar-CgT7955R.js +162 -0
- package/dist/Avatar-CgT7955R.js.map +1 -0
- package/dist/Avatar-CuSrK8Wn.cjs +161 -0
- package/dist/Avatar-CuSrK8Wn.cjs.map +1 -0
- package/dist/Button-C17mExpd.cjs.map +1 -1
- package/dist/Button-UkkP-bNw.js.map +1 -1
- package/dist/Card-B1wtavyl.js +98 -0
- package/dist/Card-B1wtavyl.js.map +1 -0
- package/dist/Card-DfdU610V.cjs +97 -0
- package/dist/Card-DfdU610V.cjs.map +1 -0
- package/dist/Checkbox-BCqMFWt4.cjs +187 -0
- package/dist/Checkbox-BCqMFWt4.cjs.map +1 -0
- package/dist/Checkbox-gB5YKkVo.js +188 -0
- package/dist/Checkbox-gB5YKkVo.js.map +1 -0
- package/dist/{components/DateRangePicker/DateRangePicker.js → Chip-OPYQ1uQ_.js} +33 -35
- package/dist/Chip-OPYQ1uQ_.js.map +1 -0
- package/dist/{components/DateRangePicker/DateRangePicker.cjs → Chip-qoJLDiva.cjs} +33 -36
- package/dist/Chip-qoJLDiva.cjs.map +1 -0
- package/dist/DatePicker-_IGWc3I5.js +178 -0
- package/dist/DatePicker-_IGWc3I5.js.map +1 -0
- package/dist/DatePicker-t7uDTZMl.cjs +177 -0
- package/dist/DatePicker-t7uDTZMl.cjs.map +1 -0
- package/dist/DateTimePicker-BxQyjTCY.cjs +229 -0
- package/dist/DateTimePicker-BxQyjTCY.cjs.map +1 -0
- package/dist/DateTimePicker-CrmWav_j.js +230 -0
- package/dist/DateTimePicker-CrmWav_j.js.map +1 -0
- package/dist/Input-CScC87J5.cjs +185 -0
- package/dist/Input-CScC87J5.cjs.map +1 -0
- package/dist/Input-DP_fKl38.js +186 -0
- package/dist/Input-DP_fKl38.js.map +1 -0
- package/dist/Modal-BN5s-Tfk.cjs +347 -0
- package/dist/Modal-BN5s-Tfk.cjs.map +1 -0
- package/dist/Modal-BRZMPwDj.js +348 -0
- package/dist/Modal-BRZMPwDj.js.map +1 -0
- package/dist/README.md +243 -0
- package/dist/RadioGroup-Dd0rHXSX.cjs +202 -0
- package/dist/RadioGroup-Dd0rHXSX.cjs.map +1 -0
- package/dist/RadioGroup-bO-ahP9T.js +203 -0
- package/dist/RadioGroup-bO-ahP9T.js.map +1 -0
- package/dist/Select-D5OrjVj3.js +253 -0
- package/dist/Select-D5OrjVj3.js.map +1 -0
- package/dist/Select-Dyvc4bVo.cjs +252 -0
- package/dist/Select-Dyvc4bVo.cjs.map +1 -0
- package/dist/Stat-BUcFCGrz.cjs +83 -0
- package/dist/Stat-BUcFCGrz.cjs.map +1 -0
- package/dist/Stat-C06A_izS.js +84 -0
- package/dist/Stat-C06A_izS.js.map +1 -0
- package/dist/StatusMessage-B3nXpuRl.cjs +88 -0
- package/dist/StatusMessage-B3nXpuRl.cjs.map +1 -0
- package/dist/StatusMessage-D0WgSBx7.js +89 -0
- package/dist/StatusMessage-D0WgSBx7.js.map +1 -0
- package/dist/Step-BArsou1V.js +301 -0
- package/dist/Step-BArsou1V.js.map +1 -0
- package/dist/Step-Nd7SJbRZ.cjs +300 -0
- package/dist/Step-Nd7SJbRZ.cjs.map +1 -0
- package/dist/Switch-CQFOopYy.cjs +182 -0
- package/dist/Switch-CQFOopYy.cjs.map +1 -0
- package/dist/Switch-D72dpkH2.js +183 -0
- package/dist/Switch-D72dpkH2.js.map +1 -0
- package/dist/Tab-BbP8jBcK.cjs +110 -0
- package/dist/Tab-BbP8jBcK.cjs.map +1 -0
- package/dist/Tab-BxSxKJsP.js +111 -0
- package/dist/Tab-BxSxKJsP.js.map +1 -0
- package/dist/Table-C2LbW0B1.js +531 -0
- package/dist/Table-C2LbW0B1.js.map +1 -0
- package/dist/Table-C4OM6rrC.cjs +530 -0
- package/dist/Table-C4OM6rrC.cjs.map +1 -0
- package/dist/components/ActionMenu/ActionMenu.cjs +52 -52
- package/dist/components/ActionMenu/ActionMenu.cjs.map +1 -1
- package/dist/components/ActionMenu/ActionMenu.d.ts +20 -36
- package/dist/components/ActionMenu/ActionMenu.js +55 -55
- package/dist/components/ActionMenu/ActionMenu.js.map +1 -1
- package/dist/components/ActionMenu/index.d.ts +2 -2
- package/dist/components/AppBar/AppBar.cjs +3 -220
- package/dist/components/AppBar/AppBar.cjs.map +1 -1
- package/dist/components/AppBar/AppBar.d.ts +6 -6
- package/dist/components/AppBar/AppBar.js +6 -223
- package/dist/components/AppBar/AppBar.js.map +1 -1
- package/dist/components/AppBar/index.d.ts +0 -6
- package/dist/components/Autocomplete/Autocomplete.cjs +4 -311
- package/dist/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +8 -6
- package/dist/components/Autocomplete/Autocomplete.helpers.d.ts +8 -4
- package/dist/components/Autocomplete/Autocomplete.js +4 -311
- package/dist/components/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/components/Autocomplete/_parts/AutocompleteOption.d.ts +5 -8
- package/dist/components/Autocomplete/index.d.ts +1 -1
- package/dist/components/Avatar/Avatar.cjs +2 -160
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.js +2 -160
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +5 -5
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Card/Card.cjs +4 -184
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +3 -50
- package/dist/components/Card/Card.js +4 -184
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.sx.d.ts +3 -6
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +6 -0
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +55 -0
- package/dist/components/Checkbox/Checkbox.js +6 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.sx.d.ts +13 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox.d.ts +6 -0
- package/dist/components/Chip/Chip.cjs +4 -72
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.js +3 -71
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/index.d.ts +2 -1
- package/dist/components/Chip.d.ts +4 -0
- package/dist/components/Column/Column.cjs +1 -1
- package/dist/components/Column/Column.cjs.map +1 -1
- package/dist/components/Column/Column.d.ts +1 -1
- package/dist/components/Column/Column.js +1 -1
- package/dist/components/Column/Column.js.map +1 -1
- package/dist/components/Column/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +3 -200
- package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -13
- package/dist/components/DatePicker/DatePicker.js +3 -200
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.cjs +3 -219
- package/dist/components/DateTimePicker/DateTimePicker.cjs.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +10 -6
- package/dist/components/DateTimePicker/DateTimePicker.definitions.d.ts +2 -0
- package/dist/components/DateTimePicker/DateTimePicker.helpers.d.ts +4 -2
- package/dist/components/DateTimePicker/DateTimePicker.js +3 -219
- package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/DateTimePicker/index.d.ts +1 -1
- package/dist/components/Drawer/Drawer.cjs +25 -24
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +8 -1
- package/dist/components/Drawer/Drawer.js +26 -25
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/DrawerItem.d.ts +6 -1
- package/dist/components/Gallery/Gallery.cjs +154 -79
- package/dist/components/Gallery/Gallery.cjs.map +1 -1
- package/dist/components/Gallery/Gallery.d.ts +25 -9
- package/dist/components/Gallery/Gallery.js +154 -79
- package/dist/components/Gallery/Gallery.js.map +1 -1
- package/dist/components/Gallery/GalleryLightbox.d.ts +6 -10
- package/dist/components/Gallery/GalleryMain.d.ts +3 -7
- package/dist/components/Gallery/GalleryThumbnails.d.ts +7 -11
- package/dist/components/Gallery/index.d.ts +2 -1
- package/dist/components/Gallery.d.ts +4 -0
- package/dist/components/Icon/Icon.cjs +6 -8
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +11 -17
- package/dist/components/Icon/Icon.js +7 -9
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -1
- package/dist/components/Icon.d.ts +4 -0
- package/dist/components/Input/Input.cjs +3 -172
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +9 -2
- package/dist/components/Input/Input.definitions.d.ts +1 -0
- package/dist/components/Input/Input.helpers.d.ts +3 -3
- package/dist/components/Input/Input.js +3 -172
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/InputGroup/InputGroup.cjs +23 -22
- package/dist/components/InputGroup/InputGroup.cjs.map +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +4 -4
- package/dist/components/InputGroup/InputGroup.js +22 -21
- package/dist/components/InputGroup/InputGroup.js.map +1 -1
- package/dist/components/InputGroup/index.d.ts +2 -1
- package/dist/components/InputGroup.d.ts +4 -0
- package/dist/components/Modal/Modal.cjs +7 -317
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.d.ts +20 -5
- package/dist/components/Modal/Modal.js +6 -316
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalBody.d.ts +6 -1
- package/dist/components/Modal/ModalFooter.d.ts +4 -4
- package/dist/components/Modal/ModalHeader.d.ts +6 -1
- package/dist/components/Modal/index.d.ts +4 -1
- package/dist/components/Modal.d.ts +4 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +6 -0
- package/dist/components/RadioGroup/RadioGroup.cjs.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +59 -0
- package/dist/components/RadioGroup/RadioGroup.definitions.d.ts +6 -0
- package/dist/components/RadioGroup/RadioGroup.js +6 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.sx.d.ts +20 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup.d.ts +6 -0
- package/dist/components/Select/Select.cjs +4 -445
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +13 -18
- package/dist/components/Select/Select.helpers.d.ts +5 -19
- package/dist/components/Select/Select.js +4 -445
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Stat/Stat.cjs +4 -83
- package/dist/components/Stat/Stat.cjs.map +1 -1
- package/dist/components/Stat/Stat.js +3 -82
- package/dist/components/Stat/Stat.js.map +1 -1
- package/dist/components/Stat/index.d.ts +2 -1
- package/dist/components/Stat.d.ts +4 -0
- package/dist/components/StatusMessage/StatusMessage.cjs +4 -77
- package/dist/components/StatusMessage/StatusMessage.cjs.map +1 -1
- package/dist/components/StatusMessage/StatusMessage.d.ts +20 -36
- package/dist/components/StatusMessage/StatusMessage.js +3 -76
- package/dist/components/StatusMessage/StatusMessage.js.map +1 -1
- package/dist/components/StatusMessage/index.d.ts +2 -1
- package/dist/components/StatusMessage.d.ts +4 -0
- package/dist/components/Stepper/Stepper.cjs +8 -47
- package/dist/components/Stepper/Stepper.cjs.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +9 -8
- package/dist/components/Stepper/Stepper.js +7 -46
- package/dist/components/Stepper/Stepper.js.map +1 -1
- package/dist/{hooks/Wizard/WizardContext.d.ts → components/Stepper/StepperContext.d.ts} +29 -23
- package/dist/components/Stepper/_hooks/useHorizontalScroll.d.ts +19 -0
- package/dist/components/Stepper/_parts/StepperScrollArrow.d.ts +19 -0
- package/dist/components/Stepper/index.d.ts +6 -2
- package/dist/components/Stepper.d.ts +4 -0
- package/dist/components/Switch/Switch.cjs +6 -0
- package/dist/components/Switch/Switch.cjs.map +1 -0
- package/dist/components/Switch/Switch.d.ts +48 -0
- package/dist/components/Switch/Switch.definitions.d.ts +7 -0
- package/dist/components/Switch/Switch.js +6 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/Switch.sx.d.ts +22 -0
- package/dist/components/Switch/Switch.types.d.ts +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch.d.ts +6 -0
- package/dist/components/Table/Table.cjs +2 -528
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +2 -528
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Tabs/Tabs.cjs +5 -94
- package/dist/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +21 -16
- package/dist/components/Tabs/Tabs.js +4 -93
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +4 -2
- package/dist/components/Tabs.d.ts +4 -0
- package/dist/components/Timeline/Timeline.cjs +3 -2
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +4 -8
- package/dist/components/Timeline/Timeline.js +3 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline/index.d.ts +4 -2
- package/dist/components/Timeline.d.ts +4 -0
- package/dist/components/_shared/mergeSx.d.ts +7 -0
- package/dist/{formField.sx-DfVbMe0V.js → formField.sx-8_QRnKxv.js} +2 -11
- package/dist/formField.sx-8_QRnKxv.js.map +1 -0
- package/dist/{formField.sx-CQ1mbk9M.cjs → formField.sx-BAX7KwMR.cjs} +10 -19
- package/dist/formField.sx-BAX7KwMR.cjs.map +1 -0
- package/dist/index.cjs +92 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/index.js +66 -3
- package/dist/index.js.map +1 -1
- package/dist/mergeSx-BXoNZjB_.js +10 -0
- package/dist/mergeSx-BXoNZjB_.js.map +1 -0
- package/dist/mergeSx-Dbccoo_H.cjs +9 -0
- package/dist/mergeSx-Dbccoo_H.cjs.map +1 -0
- package/dist/mui.d.ts +3 -1
- package/dist/package.json +190 -0
- package/dist/{resolvePreset-CT3kU-K2.cjs → resolvePreset-CxTI6_Ln.cjs} +3 -3
- package/dist/{resolvePreset-CT3kU-K2.cjs.map → resolvePreset-CxTI6_Ln.cjs.map} +1 -1
- package/dist/{resolvePreset-B-IB0ehH.js → resolvePreset-K6_BfWHD.js} +3 -3
- package/dist/{resolvePreset-B-IB0ehH.js.map → resolvePreset-K6_BfWHD.js.map} +1 -1
- package/dist/theme/componentStyles.d.ts +1 -1
- package/dist/tokens-BRrcP_p_.js +21 -0
- package/dist/tokens-BRrcP_p_.js.map +1 -0
- package/dist/tokens-jaWWNk39.cjs +20 -0
- package/dist/tokens-jaWWNk39.cjs.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/{components/ScrollTopButton → utils}/scrollToTop.d.ts +6 -7
- package/package.json +25 -48
- package/rollup.config.cjs +87 -0
- package/scripts/gen-dist-pkg.mjs +15 -0
- package/shared-library-comercios-MUI.code-workspace +10 -0
- package/src/components/ActionMenu/ActionMenu.stories.tsx +427 -0
- package/src/components/ActionMenu/ActionMenu.tsx +153 -0
- package/src/components/ActionMenu/index.ts +2 -0
- package/src/components/AppBar/AppBar.stories.tsx +316 -0
- package/src/components/AppBar/AppBar.sx.ts +32 -0
- package/src/components/AppBar/AppBar.tsx +119 -0
- package/src/components/AppBar/AppBarContext.ts +25 -0
- package/src/components/AppBar/AppBarMenuToggle.tsx +90 -0
- package/src/components/AppBar/index.ts +12 -0
- package/src/components/Autocomplete/Autocomplete.definitions.ts +477 -0
- package/src/components/Autocomplete/Autocomplete.helpers.ts +80 -0
- package/src/components/Autocomplete/Autocomplete.stories.tsx +784 -0
- package/src/components/Autocomplete/Autocomplete.sx.ts +30 -0
- package/src/components/Autocomplete/Autocomplete.tsx +393 -0
- package/src/components/Autocomplete/_parts/AutocompleteChips.tsx +55 -0
- package/src/components/Autocomplete/_parts/AutocompleteLoader.tsx +17 -0
- package/src/components/Autocomplete/_parts/AutocompleteOption.tsx +29 -0
- package/src/components/Autocomplete/index.ts +12 -0
- package/src/components/Avatar/Avatar.definitions.ts +162 -0
- package/src/components/Avatar/Avatar.stories.tsx +258 -0
- package/src/components/Avatar/Avatar.tsx +206 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Button/Button.definition.ts +97 -0
- package/src/components/Button/Button.stories.tsx +285 -0
- package/src/components/Button/Button.tsx +66 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Card/Card.definition.ts +5 -0
- package/src/components/Card/Card.stories.tsx +102 -0
- package/src/components/Card/Card.sx.ts +58 -0
- package/src/components/Card/Card.tsx +85 -0
- package/src/components/Card/index.ts +4 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +212 -0
- package/src/components/Checkbox/Checkbox.sx.ts +67 -0
- package/src/components/Checkbox/Checkbox.tsx +208 -0
- package/src/components/Checkbox/index.ts +10 -0
- package/src/components/Chip/Chip.definitions.ts +167 -0
- package/src/components/Chip/Chip.stories.tsx +265 -0
- package/src/components/Chip/Chip.tsx +61 -0
- package/src/components/Chip/index.ts +2 -0
- package/src/components/Column/Column.tsx +29 -0
- package/src/components/Column/index.ts +2 -0
- package/src/components/DatePicker/DatePicker.definitions.ts +228 -0
- package/src/components/DatePicker/DatePicker.helpers.ts +24 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +309 -0
- package/src/components/DatePicker/DatePicker.sx.ts +33 -0
- package/src/components/DatePicker/DatePicker.tsx +133 -0
- package/src/components/DatePicker/index.ts +7 -0
- package/src/components/DateTimePicker/DateTimePicker.definitions.ts +317 -0
- package/src/components/DateTimePicker/DateTimePicker.helpers.ts +45 -0
- package/src/components/DateTimePicker/DateTimePicker.stories.tsx +415 -0
- package/src/components/DateTimePicker/DateTimePicker.sx.ts +30 -0
- package/src/components/DateTimePicker/DateTimePicker.tsx +240 -0
- package/src/components/DateTimePicker/index.ts +9 -0
- package/src/components/Drawer/Drawer.stories.tsx +438 -0
- package/src/components/Drawer/Drawer.sx.ts +106 -0
- package/src/components/Drawer/Drawer.tsx +224 -0
- package/src/components/Drawer/DrawerContext.ts +26 -0
- package/src/components/Drawer/DrawerItem.tsx +120 -0
- package/src/components/Drawer/index.ts +10 -0
- package/src/components/Flyout/Flyout.stories.tsx +282 -0
- package/src/components/Flyout/Flyout.tsx +122 -0
- package/src/components/Flyout/index.ts +1 -0
- package/src/components/Gallery/Gallery.definition.tsx +37 -0
- package/src/components/Gallery/Gallery.stories.tsx +82 -0
- package/src/components/Gallery/Gallery.tsx +158 -0
- package/src/components/Gallery/GalleryLightbox.tsx +186 -0
- package/src/components/Gallery/GalleryMain.tsx +87 -0
- package/src/components/Gallery/GalleryThumbnails.tsx +122 -0
- package/src/components/Gallery/index.ts +2 -0
- package/src/components/Icon/Icon.stories.tsx +121 -0
- package/src/components/Icon/Icon.tsx +163 -0
- package/src/components/Icon/index.ts +2 -0
- package/src/components/Input/Input.definitions.ts +348 -0
- package/src/components/Input/Input.helpers.ts +50 -0
- package/src/components/Input/Input.stories.tsx +528 -0
- package/src/components/Input/Input.sx.ts +42 -0
- package/src/components/Input/Input.tsx +162 -0
- package/src/components/Input/index.ts +10 -0
- package/src/components/InputGroup/InputGroup.definitions.ts +158 -0
- package/src/components/InputGroup/InputGroup.stories.tsx +267 -0
- package/src/components/InputGroup/InputGroup.tsx +180 -0
- package/src/components/InputGroup/index.ts +2 -0
- package/src/components/MenuButton/MenuButton.stories.tsx +197 -0
- package/src/components/MenuButton/MenuButton.tsx +100 -0
- package/src/components/MenuButton/index.ts +1 -0
- package/src/components/Modal/Modal.stories.tsx +721 -0
- package/src/components/Modal/Modal.tsx +407 -0
- package/src/components/Modal/ModalBody.tsx +23 -0
- package/src/components/Modal/ModalFooter.tsx +83 -0
- package/src/components/Modal/ModalHeader.tsx +33 -0
- package/src/components/Modal/index.ts +11 -0
- package/src/components/RadioGroup/RadioGroup.definitions.ts +177 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +231 -0
- package/src/components/RadioGroup/RadioGroup.sx.ts +75 -0
- package/src/components/RadioGroup/RadioGroup.tsx +207 -0
- package/src/components/RadioGroup/index.ts +10 -0
- package/src/components/Select/Select.helpers.ts +31 -0
- package/src/components/Select/Select.stories.tsx +393 -0
- package/src/components/Select/Select.sx.ts +14 -0
- package/src/components/Select/Select.tsx +327 -0
- package/src/components/Select/_parts/SelectMenuItem.tsx +40 -0
- package/src/components/Select/_parts/SelectValue.tsx +95 -0
- package/src/components/Select/index.ts +12 -0
- package/src/components/Stat/Stat.stories.tsx +85 -0
- package/src/components/Stat/Stat.tsx +117 -0
- package/src/components/Stat/index.ts +2 -0
- package/src/components/StatusMessage/StatusMessage.stories.tsx +159 -0
- package/src/components/StatusMessage/StatusMessage.tsx +143 -0
- package/src/components/StatusMessage/index.ts +3 -0
- package/src/components/Stepper/Step.tsx +21 -0
- package/src/components/Stepper/Stepper.definition.ts +75 -0
- package/src/components/Stepper/Stepper.stories.tsx +194 -0
- package/src/components/Stepper/Stepper.tsx +194 -0
- package/src/components/Stepper/StepperContext.tsx +176 -0
- package/src/components/Stepper/StepperProvider.stories.tsx +286 -0
- package/src/components/Stepper/_hooks/useHorizontalScroll.ts +56 -0
- package/src/components/Stepper/_parts/StepperScrollArrow.tsx +50 -0
- package/src/components/Stepper/index.ts +15 -0
- package/src/components/Switch/Switch.definitions.ts +134 -0
- package/src/components/Switch/Switch.stories.tsx +213 -0
- package/src/components/Switch/Switch.sx.ts +81 -0
- package/src/components/Switch/Switch.tsx +188 -0
- package/src/components/Switch/Switch.types.ts +10 -0
- package/src/components/Switch/index.ts +9 -0
- package/src/components/Table/EmptyTable.png +0 -0
- package/src/components/Table/Table.definition.ts +580 -0
- package/src/components/Table/Table.stories.tsx +853 -0
- package/src/components/Table/Table.tsx +494 -0
- package/src/components/Table/data.ts +134 -0
- package/src/components/Table/exportsUtils.ts +195 -0
- package/src/components/Table/index.ts +3 -0
- package/src/components/Table/types.ts +34 -0
- package/src/components/Tabs/Tab.definition.ts +53 -0
- package/src/components/Tabs/Tab.tsx +19 -0
- package/src/components/Tabs/Tabs.stories.tsx +118 -0
- package/src/components/Tabs/Tabs.tsx +163 -0
- package/src/components/Tabs/_tabUtils.tsx +4 -0
- package/src/components/Tabs/index.ts +5 -0
- package/src/components/Timeline/Timeline.definition.ts +43 -0
- package/src/components/Timeline/Timeline.stories.tsx +108 -0
- package/src/components/Timeline/Timeline.tsx +44 -0
- package/src/components/Timeline/TimelineItem.tsx +31 -0
- package/src/components/Timeline/index.ts +5 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +129 -0
- package/src/components/Tooltip/Tooltip.tsx +58 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/_shared/formField.sx.ts +118 -0
- package/src/components/_shared/mergeSx.ts +16 -0
- package/src/components/_shared/resolvePreset.ts +38 -0
- package/src/hooks/ClipBoard/ClipBoard.stories.tsx +168 -0
- package/src/hooks/ClipBoard/ClipBoard.tsx +131 -0
- package/src/hooks/ClipBoard/ClipboardUnifiedDemo.tsx +111 -0
- package/src/hooks/ClipBoard/index.ts +1 -0
- package/src/index.ts +51 -0
- package/src/mui.ts +57 -0
- package/src/styles.css +3 -0
- package/src/theme/componentStyles.ts +50 -0
- package/src/theme/tokens.ts +43 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/scrollToTop.ts +36 -0
- package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/storybook-static/assets/AccountCircle-BDZFsbTw.js +1 -0
- package/storybook-static/assets/ActionMenu-EynP8yU1.js +19 -0
- package/storybook-static/assets/ActionMenu.stories-DqSqRGix.js +185 -0
- package/storybook-static/assets/Alert-3zvTPc0p.js +1 -0
- package/storybook-static/assets/AppBar.stories-DcX3M5th.js +172 -0
- package/storybook-static/assets/Autocomplete.stories-CXJm8FOT.js +788 -0
- package/storybook-static/assets/Avatar-NbFfkZws.js +1 -0
- package/storybook-static/assets/Avatar.stories-CwOYCzqU.js +390 -0
- package/storybook-static/assets/Box-BnhEcfFm.js +1 -0
- package/storybook-static/assets/Button-D9h7OggD.js +1 -0
- package/storybook-static/assets/Button-DBpqmVB_.js +1 -0
- package/storybook-static/assets/Button.stories-F20dmnjq.js +320 -0
- package/storybook-static/assets/ButtonBase-qyaMEhe4.js +74 -0
- package/storybook-static/assets/Card.stories-B3NpAhO0.js +154 -0
- package/storybook-static/assets/CheckCircleOutline-CEj5mDsl.js +1 -0
- package/storybook-static/assets/Chip-C3vKPpzR.js +1 -0
- package/storybook-static/assets/Chip.stories-sxcfHVo9.js +333 -0
- package/storybook-static/assets/CircularProgress-DC7ZNWwl.js +28 -0
- package/storybook-static/assets/Clear-4kYcKvT3.js +1 -0
- package/storybook-static/assets/ClipBoard-DvLBdNHe.js +1 -0
- package/storybook-static/assets/ClipBoard.stories-BGUo47r6.js +108 -0
- package/storybook-static/assets/Close-CgHeRgmh.js +1 -0
- package/storybook-static/assets/Close-Cy8nELYU.js +1 -0
- package/storybook-static/assets/Color-AVL7NMMY-BJKvwERm.js +1 -0
- package/storybook-static/assets/ContentCopy-BfLTDb10.js +1 -0
- package/storybook-static/assets/DatePicker-Clkpr-Ku.js +1 -0
- package/storybook-static/assets/DatePicker.stories-EaUCMkh3.js +444 -0
- package/storybook-static/assets/DateRangePicker.stories-BMlkj-8K.js +390 -0
- package/storybook-static/assets/DateTimePicker.stories-B6gdzKq5.js +555 -0
- package/storybook-static/assets/DefaultPropsProvider-BGoQxtDa.js +16 -0
- package/storybook-static/assets/Delete-D2SMMmIA.js +1 -0
- package/storybook-static/assets/DialogContent-BeCDKgax.js +1 -0
- package/storybook-static/assets/Divider-BbCj9wT4.js +1 -0
- package/storybook-static/assets/DocsRenderer-PQXLIZUC-BebLK5Y_.js +1243 -0
- package/storybook-static/assets/Drawer-DcFwy73r.js +1 -0
- package/storybook-static/assets/Drawer.stories-C5AZkJBk.js +173 -0
- package/storybook-static/assets/EmptyTable-B-RKtgVs.png +0 -0
- package/storybook-static/assets/ErrorOutline-D9gM7ART.js +1 -0
- package/storybook-static/assets/Fade-Ll96CvH8.js +1 -0
- package/storybook-static/assets/Flyout.stories-Cf7z6MNw.js +163 -0
- package/storybook-static/assets/Gallery.stories-DdpWVTF6.js +127 -0
- package/storybook-static/assets/Grow-8y4FglGK.js +1 -0
- package/storybook-static/assets/Home-BRvJEp2L.js +1 -0
- package/storybook-static/assets/Icon.stories-D0mUiW_t.js +78 -0
- package/storybook-static/assets/IconButton-9OYSTH58.js +1 -0
- package/storybook-static/assets/Input-CjX0t4h-.js +1 -0
- package/storybook-static/assets/Input.stories-BRxekliy.js +650 -0
- package/storybook-static/assets/InputGroup.stories-DH6gUfmn.js +306 -0
- package/storybook-static/assets/KeyboardArrowRight-WO_attK2.js +1 -0
- package/storybook-static/assets/KeyboardArrowUp-DsyVef-i.js +1 -0
- package/storybook-static/assets/ListItem-D3O0103N.js +1 -0
- package/storybook-static/assets/ListItemIcon-hca6xN79.js +1 -0
- package/storybook-static/assets/ListItemText-BFLAwLdl.js +1 -0
- package/storybook-static/assets/Logout-gj-P3AfU.js +1 -0
- package/storybook-static/assets/Menu-ClzfjLc3.js +1 -0
- package/storybook-static/assets/MenuButton.stories-B-W_QVDt.js +162 -0
- package/storybook-static/assets/MenuItem-iU6tAqJI.js +1 -0
- package/storybook-static/assets/Modal-3okp9H2i.js +1 -0
- package/storybook-static/assets/Modal.stories-DIWzm4qR.js +468 -0
- package/storybook-static/assets/MoreVert-BoIVG4gh.js +1 -0
- package/storybook-static/assets/Notifications-DY_A-Sho.js +1 -0
- package/storybook-static/assets/PageLoader.stories-DmtO1mlm.js +158 -0
- package/storybook-static/assets/Paper-SwQBhqI7.js +1 -0
- package/storybook-static/assets/Person-CkQl-mpq.js +1 -0
- package/storybook-static/assets/PickersModalDialog-Tjnr_cu5.js +10 -0
- package/storybook-static/assets/PickersToolbarButton-Tt185-si.js +1 -0
- package/storybook-static/assets/Popper-CnCTYXxy.js +1 -0
- package/storybook-static/assets/Portal-Cj8XF9Lf.js +1 -0
- package/storybook-static/assets/ScrollTopButton.stories-BflQCwNP.js +90 -0
- package/storybook-static/assets/Select-CjcuMAY0.js +4 -0
- package/storybook-static/assets/Select-DJh2biEb.js +3 -0
- package/storybook-static/assets/Select.stories-DU1Gb3I2.js +1103 -0
- package/storybook-static/assets/Settings-BLKc1CnO.js +1 -0
- package/storybook-static/assets/Snackbar-BtVeKTw6.js +1 -0
- package/storybook-static/assets/Stack-D01OUIXi.js +1 -0
- package/storybook-static/assets/Stat.stories-Bn9-iuPT.js +60 -0
- package/storybook-static/assets/StatusMessage.stories-hnfX8FeU.js +73 -0
- package/storybook-static/assets/Stepper-BtKB5ykn.js +2 -0
- package/storybook-static/assets/Stepper.stories-CTEZbgPc.js +165 -0
- package/storybook-static/assets/Table.stories-CTn2Ktmn.js +1260 -0
- package/storybook-static/assets/TableContainer-CzLNaEU-.js +1 -0
- package/storybook-static/assets/TableRow-CS88-1HF.js +2 -0
- package/storybook-static/assets/Tabs-DLpDOu_n.js +1 -0
- package/storybook-static/assets/Tabs.stories-BFVuFy_5.js +159 -0
- package/storybook-static/assets/TextField-22T-xHBm.js +1 -0
- package/storybook-static/assets/Timeline.stories-DJU_U2Hv.js +97 -0
- package/storybook-static/assets/Tooltip-DbnHUxNj.js +1 -0
- package/storybook-static/assets/Tooltip.stories-B7tA3dnV.js +66 -0
- package/storybook-static/assets/Typography-BgntX2Ep.js +1 -0
- package/storybook-static/assets/Wizard.stories-CVrJLK_D.js +23 -0
- package/storybook-static/assets/createSimplePaletteValueFilter-bm0fmN_7.js +1 -0
- package/storybook-static/assets/createSvgIcon-D_Gca4vA.js +1 -0
- package/storybook-static/assets/debounce-Be36O1Ab.js +1 -0
- package/storybook-static/assets/emotion-react.browser.esm--g-C9cX9.js +8 -0
- package/storybook-static/assets/extendSxProp-CEpa30hT.js +1 -0
- package/storybook-static/assets/formField.sx-DMCmZIAa.js +1 -0
- package/storybook-static/assets/getReactElementRef-BQ3ANZdy.js +1 -0
- package/storybook-static/assets/iframe-BAJnc_4n.js +1079 -0
- package/storybook-static/assets/index-B1tlhOpe.js +240 -0
- package/storybook-static/assets/index-BF3FAXTk.js +9 -0
- package/storybook-static/assets/index-CIeucmOB.js +2 -0
- package/storybook-static/assets/index-CY7j4a7o.js +1 -0
- package/storybook-static/assets/index-CxkKctw5.js +1 -0
- package/storybook-static/assets/isFocusVisible-B8k4qzLc.js +1 -0
- package/storybook-static/assets/isMuiElement-CTZSFcY5.js +1 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/listItemTextClasses-CC_rwJam.js +1 -0
- package/storybook-static/assets/mergeSlotProps-B0UBKBMe.js +1 -0
- package/storybook-static/assets/ownerDocument-DW-IO8s5.js +1 -0
- package/storybook-static/assets/ownerWindow-HkKU3E4x.js +1 -0
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/storybook-static/assets/react-18-BUJ64QCV.js +25 -0
- package/storybook-static/assets/resolvePreset-CN2aOJJr.js +1 -0
- package/storybook-static/assets/useControlled-DsVh1a5j.js +1 -0
- package/storybook-static/assets/useForkRef-0ANIrxcF.js +1 -0
- package/storybook-static/assets/useId-b4fZxjOL.js +1 -0
- package/storybook-static/assets/useMobilePicker-DK-c8xbD.js +1 -0
- package/storybook-static/assets/usePreviousProps-WR0rG4aR.js +1 -0
- package/storybook-static/assets/useSlot-b6pXgp5_.js +1 -0
- package/storybook-static/assets/useSlotProps-C0uMfuBt.js +1 -0
- package/storybook-static/assets/useTheme-BmOJK7ra.js +1 -0
- package/storybook-static/assets/useThemeProps-DYtxXiUU.js +1 -0
- package/storybook-static/assets/useThemeProps-U4yXiZ_5.js +1 -0
- package/storybook-static/assets/useTimeout-DNjRaOWc.js +1 -0
- package/storybook-static/assets/visuallyHidden-Dan1xhjv.js +1 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +686 -0
- package/storybook-static/index.html +160 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-2/manager-bundle.js +356 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-2/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/docs-4/manager-bundle.js +151 -0
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +127 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/storybook-static/sb-addons/vitest-3/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +797 -0
- package/storybook-static/sb-manager/globals-runtime.js +69679 -0
- package/storybook-static/sb-manager/globals.js +34 -0
- package/storybook-static/sb-manager/runtime.js +13195 -0
- package/storybook-static/vite-inject-mocker-entry.js +18 -0
- package/tailwind.config.js +10 -0
- package/tsconfig.json +48 -0
- package/tsup.config.js +41 -0
- package/vite.config.js +132 -0
- package/vitest.config.ts +35 -0
- package/dist/components/AppBar/AppBarBrand.d.ts +0 -31
- package/dist/components/AppBar/AppBarUserMenu.d.ts +0 -65
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +0 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs.map +0 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +0 -15
- package/dist/components/DateRangePicker/DateRangePicker.definitions.d.ts +0 -6
- package/dist/components/DateRangePicker/DateRangePicker.js.map +0 -1
- package/dist/components/DateRangePicker/index.d.ts +0 -1
- package/dist/components/DateRangePicker.d.ts +0 -2
- package/dist/components/DateTimePicker/DateTimePicker.types.d.ts +0 -1
- package/dist/components/Input/Input.types.d.ts +0 -1
- package/dist/components/PageLoader/PageLoader.cjs +0 -61
- package/dist/components/PageLoader/PageLoader.cjs.map +0 -1
- package/dist/components/PageLoader/PageLoader.d.ts +0 -38
- package/dist/components/PageLoader/PageLoader.js +0 -61
- package/dist/components/PageLoader/PageLoader.js.map +0 -1
- package/dist/components/PageLoader/index.d.ts +0 -2
- package/dist/components/PageLoader.d.ts +0 -6
- package/dist/components/ScrollTopButton/ScrollTopButton.cjs +0 -79
- package/dist/components/ScrollTopButton/ScrollTopButton.cjs.map +0 -1
- package/dist/components/ScrollTopButton/ScrollTopButton.d.ts +0 -48
- package/dist/components/ScrollTopButton/ScrollTopButton.js +0 -79
- package/dist/components/ScrollTopButton/ScrollTopButton.js.map +0 -1
- package/dist/components/ScrollTopButton/index.d.ts +0 -4
- package/dist/components/ScrollTopButton.d.ts +0 -6
- package/dist/components/Select/Select.definitions.d.ts +0 -17
- package/dist/components/Select/Select.types.d.ts +0 -1
- package/dist/components/Select/_parts/SelectSearchHeader.d.ts +0 -15
- package/dist/formField.sx-CQ1mbk9M.cjs.map +0 -1
- package/dist/formField.sx-DfVbMe0V.js.map +0 -1
- package/dist/hooks/Wizard/Wizard.cjs +0 -7
- package/dist/hooks/Wizard/Wizard.cjs.map +0 -1
- package/dist/hooks/Wizard/Wizard.js +0 -7
- package/dist/hooks/Wizard/Wizard.js.map +0 -1
- package/dist/hooks/Wizard/index.d.ts +0 -3
- package/dist/hooks/Wizard/useWizard.d.ts +0 -9
- package/dist/hooks/Wizard.d.ts +0 -2
- package/dist/useWizard-CWdIxZzX.cjs +0 -94
- package/dist/useWizard-CWdIxZzX.cjs.map +0 -1
- package/dist/useWizard-CWq--C3o.js +0 -95
- package/dist/useWizard-CWq--C3o.js.map +0 -1
- /package/dist/{styles.css → index.css} +0 -0
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as n}from"./iframe-BAJnc_4n.js";import{I as r}from"./Input-CjX0t4h-.js";import{B as s}from"./Box-BnhEcfFm.js";import{T as d}from"./Typography-BgntX2Ep.js";import"./preload-helper-PPVm8Dsz.js";import"./formField.sx-DMCmZIAa.js";import"./resolvePreset-CN2aOJJr.js";import"./useTheme-BmOJK7ra.js";import"./DefaultPropsProvider-BGoQxtDa.js";import"./extendSxProp-CEpa30hT.js";import"./TextField-22T-xHBm.js";import"./useSlot-b6pXgp5_.js";import"./useForkRef-0ANIrxcF.js";import"./useId-b4fZxjOL.js";import"./Select-DJh2biEb.js";import"./Menu-ClzfjLc3.js";import"./useSlotProps-C0uMfuBt.js";import"./Paper-SwQBhqI7.js";import"./ownerDocument-DW-IO8s5.js";import"./ownerWindow-HkKU3E4x.js";import"./debounce-Be36O1Ab.js";import"./Grow-8y4FglGK.js";import"./getReactElementRef-BQ3ANZdy.js";import"./useTimeout-DNjRaOWc.js";import"./index-CY7j4a7o.js";import"./index-BF3FAXTk.js";import"./mergeSlotProps-B0UBKBMe.js";import"./Modal-3okp9H2i.js";import"./Portal-Cj8XF9Lf.js";import"./Fade-Ll96CvH8.js";import"./useControlled-DsVh1a5j.js";import"./createSvgIcon-D_Gca4vA.js";import"./createSimplePaletteValueFilter-bm0fmN_7.js";import"./isMuiElement-CTZSFcY5.js";import"./emotion-react.browser.esm--g-C9cX9.js";const E=`
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
4
|
+
import { Box, Typography } from '@mui/material';
|
|
5
|
+
|
|
6
|
+
export const BasicTextInputExample = () => {
|
|
7
|
+
const [value, setValue] = useState('Texto de ejemplo');
|
|
8
|
+
return (
|
|
9
|
+
<Box sx={{ width: 300 }}>
|
|
10
|
+
<Input
|
|
11
|
+
label="Nombre"
|
|
12
|
+
value={value}
|
|
13
|
+
onChange={setValue}
|
|
14
|
+
/>
|
|
15
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
16
|
+
</Box>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
`,w=`
|
|
20
|
+
import React, { useState } from 'react';
|
|
21
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
22
|
+
import { Box, Typography } from '@mui/material';
|
|
23
|
+
|
|
24
|
+
export const NumberInputExample = () => {
|
|
25
|
+
const [value, setValue] = useState(123);
|
|
26
|
+
return (
|
|
27
|
+
<Box sx={{ width: 300 }}>
|
|
28
|
+
<Input
|
|
29
|
+
label="Cantidad"
|
|
30
|
+
type="number"
|
|
31
|
+
value={value}
|
|
32
|
+
onChange={setValue}
|
|
33
|
+
/>
|
|
34
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
35
|
+
</Box>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
`,D=`
|
|
39
|
+
import React, { useState } from 'react';
|
|
40
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
41
|
+
import { Box, Typography } from '@mui/material';
|
|
42
|
+
|
|
43
|
+
export const EmailInputExample = () => {
|
|
44
|
+
const [value, setValue] = useState('ejemplo@dominio.com');
|
|
45
|
+
return (
|
|
46
|
+
<Box sx={{ width: 300 }}>
|
|
47
|
+
<Input
|
|
48
|
+
label="Correo Electrónico"
|
|
49
|
+
type="email"
|
|
50
|
+
value={value}
|
|
51
|
+
onChange={setValue}
|
|
52
|
+
/>
|
|
53
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
54
|
+
</Box>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
`,R=`
|
|
58
|
+
import React, { useState } from 'react';
|
|
59
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
60
|
+
import { Box, Typography } from '@mui/material';
|
|
61
|
+
|
|
62
|
+
export const PasswordInputExample = () => {
|
|
63
|
+
const [value, setValue] = useState('micontraseña');
|
|
64
|
+
return (
|
|
65
|
+
<Box sx={{ width: 300 }}>
|
|
66
|
+
<Input
|
|
67
|
+
label="Contraseña"
|
|
68
|
+
type="password"
|
|
69
|
+
value={value}
|
|
70
|
+
onChange={setValue}
|
|
71
|
+
/>
|
|
72
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
73
|
+
</Box>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
`,M=`
|
|
77
|
+
import React, { useState } from 'react';
|
|
78
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
79
|
+
import { Box, Typography } from '@mui/material';
|
|
80
|
+
|
|
81
|
+
export const InputWithPlaceholderExample = () => {
|
|
82
|
+
const [value, setValue] = useState('');
|
|
83
|
+
return (
|
|
84
|
+
<Box sx={{ width: 300 }}>
|
|
85
|
+
<Input
|
|
86
|
+
label="Búsqueda"
|
|
87
|
+
placeholder="Escribe tu término de búsqueda..."
|
|
88
|
+
value={value}
|
|
89
|
+
onChange={setValue}
|
|
90
|
+
/>
|
|
91
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value || 'Vacío'}</Typography>
|
|
92
|
+
</Box>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
`,q=`
|
|
96
|
+
import React, { useState } from 'react';
|
|
97
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
98
|
+
import { Box, Typography } from '@mui/material';
|
|
99
|
+
|
|
100
|
+
export const InputWithErrorExample = () => {
|
|
101
|
+
const [value, setValue] = useState('invalido');
|
|
102
|
+
const hasError = value.length < 5 && value.length > 0;
|
|
103
|
+
return (
|
|
104
|
+
<Box sx={{ width: 300 }}>
|
|
105
|
+
<Input
|
|
106
|
+
label="Nombre de usuario"
|
|
107
|
+
value={value}
|
|
108
|
+
onChange={setValue}
|
|
109
|
+
error={hasError}
|
|
110
|
+
helperText={hasError ? 'Mínimo 5 caracteres' : ''}
|
|
111
|
+
/>
|
|
112
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
113
|
+
</Box>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
`,F=`
|
|
117
|
+
import React, { useState } from 'react';
|
|
118
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
119
|
+
import { Box, Typography } from '@mui/material';
|
|
120
|
+
|
|
121
|
+
export const DisabledInputExample = () => {
|
|
122
|
+
const [value, setValue] = useState('Campo deshabilitado');
|
|
123
|
+
return (
|
|
124
|
+
<Box sx={{ width: 300 }}>
|
|
125
|
+
<Input
|
|
126
|
+
label="Estado"
|
|
127
|
+
value={value}
|
|
128
|
+
onChange={setValue}
|
|
129
|
+
disabled
|
|
130
|
+
/>
|
|
131
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
132
|
+
</Box>
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
`,P=`
|
|
136
|
+
import React, { useState } from 'react';
|
|
137
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
138
|
+
import { Box, Typography } from '@mui/material';
|
|
139
|
+
|
|
140
|
+
export const ReadOnlyInputExample = () => {
|
|
141
|
+
const [value, setValue] = useState('Valor de solo lectura');
|
|
142
|
+
return (
|
|
143
|
+
<Box sx={{ width: 300 }}>
|
|
144
|
+
<Input
|
|
145
|
+
label="Información"
|
|
146
|
+
value={value}
|
|
147
|
+
onChange={setValue}
|
|
148
|
+
readOnly
|
|
149
|
+
/>
|
|
150
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
151
|
+
</Box>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
`,U=`
|
|
155
|
+
import React, { useState } from 'react';
|
|
156
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
157
|
+
import { Box, Typography } from '@mui/material';
|
|
158
|
+
|
|
159
|
+
export const InputVariantsExample = () => {
|
|
160
|
+
const [valueOutlined, setValueOutlined] = useState('Outlined');
|
|
161
|
+
const [valueFilled, setValueFilled] = useState('Filled');
|
|
162
|
+
const [valueStandard, setValueStandard] = useState('Standard');
|
|
163
|
+
return (
|
|
164
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, width: 300 }}>
|
|
165
|
+
<Input
|
|
166
|
+
label="Esquema Outlined"
|
|
167
|
+
value={valueOutlined}
|
|
168
|
+
onChange={setValueOutlined}
|
|
169
|
+
variant="outlined"
|
|
170
|
+
/>
|
|
171
|
+
<Input
|
|
172
|
+
label="Esquema Filled"
|
|
173
|
+
value={valueFilled}
|
|
174
|
+
onChange={setValueFilled}
|
|
175
|
+
variant="filled"
|
|
176
|
+
/>
|
|
177
|
+
<Input
|
|
178
|
+
label="Esquema Standard"
|
|
179
|
+
value={valueStandard}
|
|
180
|
+
onChange={setValueStandard}
|
|
181
|
+
variant="standard"
|
|
182
|
+
/>
|
|
183
|
+
</Box>
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
`,W=`
|
|
187
|
+
import React, { useState } from 'react';
|
|
188
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
189
|
+
import { Box, Typography } from '@mui/material';
|
|
190
|
+
|
|
191
|
+
export const InputSizesExample = () => {
|
|
192
|
+
const [valueMedium, setValueMedium] = useState('Tamaño Mediano');
|
|
193
|
+
const [valueSmall, setValueSmall] = useState('Tamaño Pequeño');
|
|
194
|
+
return (
|
|
195
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, width: 300 }}>
|
|
196
|
+
<Input
|
|
197
|
+
label="Input Mediano"
|
|
198
|
+
value={valueMedium}
|
|
199
|
+
onChange={setValueMedium}
|
|
200
|
+
size="medium"
|
|
201
|
+
/>
|
|
202
|
+
<Input
|
|
203
|
+
label="Input Pequeño"
|
|
204
|
+
value={valueSmall}
|
|
205
|
+
onChange={setValueSmall}
|
|
206
|
+
size="small"
|
|
207
|
+
/>
|
|
208
|
+
</Box>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
`,A=`
|
|
212
|
+
import React, { useState } from 'react';
|
|
213
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
214
|
+
import { Box, Typography } from '@mui/material';
|
|
215
|
+
|
|
216
|
+
export const FullWidthInputExample = () => {
|
|
217
|
+
const [value, setValue] = useState('Ocupa todo el ancho');
|
|
218
|
+
return (
|
|
219
|
+
<Box sx={{ width: '100%' }}>
|
|
220
|
+
<Input
|
|
221
|
+
label="Input de Ancho Completo"
|
|
222
|
+
value={value}
|
|
223
|
+
onChange={setValue}
|
|
224
|
+
fullWidth
|
|
225
|
+
/>
|
|
226
|
+
<Typography sx={{ mt: 2 }}>Valor actual: {value}</Typography>
|
|
227
|
+
</Box>
|
|
228
|
+
);
|
|
229
|
+
};
|
|
230
|
+
`,L=`
|
|
231
|
+
import React, { useState } from 'react';
|
|
232
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
233
|
+
import { Box } from '@mui/material';
|
|
234
|
+
|
|
235
|
+
export const LabelPositionExample = () => {
|
|
236
|
+
const [outside, setOutside] = useState('Outside (default)');
|
|
237
|
+
const [floating, setFloating] = useState('Floating');
|
|
238
|
+
return (
|
|
239
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, width: 300 }}>
|
|
240
|
+
<Input
|
|
241
|
+
label="Label outside"
|
|
242
|
+
value={outside}
|
|
243
|
+
onChange={setOutside}
|
|
244
|
+
labelPosition="outside"
|
|
245
|
+
/>
|
|
246
|
+
<Input
|
|
247
|
+
label="Label floating (MUI clásico)"
|
|
248
|
+
value={floating}
|
|
249
|
+
onChange={setFloating}
|
|
250
|
+
labelPosition="floating"
|
|
251
|
+
/>
|
|
252
|
+
</Box>
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
`,z=`
|
|
256
|
+
import React, { useState } from 'react';
|
|
257
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
258
|
+
import { Box } from '@mui/material';
|
|
259
|
+
|
|
260
|
+
export const CustomBorderRadiusExample = () => {
|
|
261
|
+
const [v, setV] = useState('Texto');
|
|
262
|
+
return (
|
|
263
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, width: 300 }}>
|
|
264
|
+
<Input label="Sin radius" value={v} onChange={setV} borderRadius={0} />
|
|
265
|
+
<Input label="Radius 4px" value={v} onChange={setV} borderRadius={4} />
|
|
266
|
+
<Input label="Default (10px)" value={v} onChange={setV} />
|
|
267
|
+
<Input label="Pill (24px)" value={v} onChange={setV} borderRadius={24} />
|
|
268
|
+
</Box>
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
`,N=`
|
|
272
|
+
import React, { useState } from 'react';
|
|
273
|
+
import { Input } from './Input'; // Ajusta la ruta si es necesario
|
|
274
|
+
import { Box } from '@mui/material';
|
|
275
|
+
|
|
276
|
+
export const CustomStylingExample = () => {
|
|
277
|
+
const [v, setV] = useState('Custom completo');
|
|
278
|
+
return (
|
|
279
|
+
<Box sx={{ width: 300 }}>
|
|
280
|
+
<Input
|
|
281
|
+
label="Combinado: bg + borderColor + label color"
|
|
282
|
+
value={v}
|
|
283
|
+
onChange={setV}
|
|
284
|
+
sx={{
|
|
285
|
+
'& .MuiInputLabel-root': { color: 'primary.main' },
|
|
286
|
+
'& .MuiOutlinedInput-root': { bgcolor: '#fff7e6' },
|
|
287
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
288
|
+
borderColor: 'warning.main',
|
|
289
|
+
borderWidth: 2,
|
|
290
|
+
},
|
|
291
|
+
}}
|
|
292
|
+
/>
|
|
293
|
+
</Box>
|
|
294
|
+
);
|
|
295
|
+
};
|
|
296
|
+
`,Be={title:"Components/Input",component:r,tags:["autodocs"],parameters:{layout:"centered",docs:{description:{component:"Un componente `Input` personalizado basado en `TextField` de Material UI, que soporta varios tipos de entrada HTML y propiedades de `TextField`."}}},argTypes:{label:{control:"text",description:"Etiqueta flotante para el campo de entrada."},value:{control:"text",description:"El valor actual del campo de entrada.",type:{name:"string",required:!0}},onChange:{action:"valueChanged",description:"Callback que se dispara cuando el valor del campo de entrada cambia."},type:{control:"select",options:["text","number","email","password","tel","url","search","date","datetime-local","month","week","time","color"],description:"El tipo HTML del campo de entrada (controla el teclado en móviles, etc.).",defaultValue:"text"},placeholder:{control:"text",description:"Texto de marcador de posición cuando el campo está vacío."},disabled:{control:"boolean",description:"Si es verdadero, el campo de entrada estará deshabilitado."},error:{control:"boolean",description:"Si es verdadero, el campo de entrada estará en estado de error."},helperText:{control:"text",description:"Texto auxiliar que se muestra debajo del campo de entrada."},variant:{control:"radio",options:["outlined","filled","standard"],description:"La variante de diseño del campo de entrada.",defaultValue:"outlined"},size:{control:"radio",options:["small","medium"],description:"El tamaño del campo de entrada.",defaultValue:"small"},labelPosition:{control:"radio",options:["outside","floating"],description:'"outside" (default): label arriba del input. "floating": label clásico de MUI dentro del notched outline.',defaultValue:"outside"},borderRadius:{control:{type:"number"},description:"Border radius del input en px (o string CSS). Default: 10.",defaultValue:10},fullWidth:{control:"boolean",description:"Si es verdadero, el campo de entrada ocupará todo el ancho disponible.",defaultValue:!1}}},m={render:()=>{const[t,o]=n.useState("Texto de ejemplo");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Nombre",value:t,onChange:a=>o(a.toString())}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{description:{story:"Un campo de entrada de texto básico con una etiqueta."},source:{code:E.trim()}}}},x={render:()=>{const[t,o]=n.useState(123);return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Cantidad",type:"number",value:t.toString(),onChange:a=>o(Number(a))}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{description:{story:"Un campo de entrada numérico. Permite solo números y controla el teclado numérico en dispositivos móviles."},source:{code:w.trim()}}}},g={render:()=>{const[t,o]=n.useState("ejemplo@dominio.com");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Correo Electrónico",type:"email",value:t.toString(),onChange:a=>o(a.toString())}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{description:{story:"Un campo de entrada para correo electrónico. Proporciona validación básica del navegador y sugiere correos electrónicos."},source:{code:D.trim()}}}},v={render:()=>{const[t,o]=n.useState("micontraseña");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Contraseña",type:"password",value:t.toString(),onChange:a=>o(a.toString())}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{description:{story:"Un campo de entrada de contraseña. Oculta los caracteres a medida que se escriben."},source:{code:R.trim()}}}},h={render:()=>{const[t,o]=n.useState("");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Búsqueda",placeholder:"Escribe tu término de búsqueda...",value:t.toString(),onChange:a=>o(a.toString())}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t||"Vacío"]})]})},parameters:{docs:{description:{story:"Un campo de entrada con un texto de marcador de posición visible cuando el campo está vacío."},source:{code:M.trim()}}}},b={render:()=>{const[t,o]=n.useState("invalido"),a=t.length<5&&t.length>0;return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Nombre de usuario",value:t.toString(),onChange:u=>o(u.toString()),error:a,helperText:a?"Mínimo 5 caracteres":""}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{description:{story:"Un campo de entrada que muestra un estado de error y un texto de ayuda cuando la validación falla."},source:{code:q.trim()}}}},S={render:()=>{const[t,o]=n.useState("Campo deshabilitado");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Estado",value:t.toString(),onChange:a=>o(a.toString()),disabled:!0}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{story:"Un campo de entrada deshabilitado, lo que impide la interacción del usuario."},source:{code:F.trim()}}},y={render:()=>{const[t,o]=n.useState("Valor de solo lectura");return e.jsxs(s,{sx:{width:300},children:[e.jsx(r,{label:"Información",value:t.toString(),onChange:a=>o(a.toString()),readOnly:!0}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{story:"Un campo de entrada de solo lectura, el usuario puede ver el valor pero no modificarlo."},source:{code:P.trim()}}},f={render:()=>{const[t,o]=n.useState("Outlined"),[a,u]=n.useState("Filled"),[l,p]=n.useState("Standard");return e.jsxs(s,{sx:{display:"flex",flexDirection:"column",gap:3,width:300},children:[e.jsx(r,{label:"Esquema Outlined",value:t.toString(),onChange:i=>o(i.toString()),variant:"outlined"}),e.jsx(r,{label:"Esquema Filled",value:a.toString(),onChange:i=>u(i.toString()),variant:"filled"}),e.jsx(r,{label:"Esquema Standard",value:l.toString(),onChange:i=>p(i.toString()),variant:"standard"})]})},parameters:{docs:{story:"Demuestra las diferentes variantes de diseño: `outlined`, `filled` y `standard`."},source:{code:U.trim()}}},I={render:()=>{const[t,o]=n.useState("Tamaño Mediano"),[a,u]=n.useState("Tamaño Pequeño");return e.jsxs(s,{sx:{display:"flex",flexDirection:"column",gap:3,width:300},children:[e.jsx(r,{label:"Input Mediano",value:t.toString(),onChange:l=>o(l.toString()),size:"medium"}),e.jsx(r,{label:"Input Pequeño",value:a.toString(),onChange:l=>u(l.toString()),size:"small"})]})},parameters:{docs:{story:"Demuestra los diferentes tamaños del campo de entrada: `medium` (por defecto) y `small`."},source:{code:W.trim()}}},V={render:()=>{const[t,o]=n.useState("Ocupa todo el ancho");return e.jsxs(s,{sx:{width:"100%"},children:[e.jsx(r,{label:"Input de Ancho Completo",value:t.toString(),onChange:a=>o(a.toString()),fullWidth:!0}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{story:"Un campo de entrada que ocupa todo el ancho disponible de su contenedor."},source:{code:A.trim()}}},C={render:()=>{const[t,o]=n.useState("Ocupa todo el ancho");return e.jsxs(s,{sx:{width:"100%"},children:[e.jsx(r,{value:t.toString(),variant:"standard",onChange:a=>o(a.toString()),fullWidth:!0}),e.jsxs(d,{sx:{mt:2},children:["Valor actual: ",t]})]})},parameters:{docs:{story:"Un campo de entrada que ocupa todo el ancho disponible de su contenedor."}}},B={render:()=>{const[t,o]=n.useState("Outside (default)"),[a,u]=n.useState("Floating");return e.jsxs(s,{sx:{display:"flex",flexDirection:"column",gap:3,width:300},children:[e.jsx(r,{label:"Label outside",value:t.toString(),onChange:l=>o(l.toString()),labelPosition:"outside"}),e.jsx(r,{label:"Label floating (MUI clásico)",value:a.toString(),onChange:l=>u(l.toString()),labelPosition:"floating"})]})},parameters:{docs:{description:{story:"Compara `labelPosition='outside'` (default, label arriba del input) vs `labelPosition='floating'` (label flotante clásico de MUI dentro del notched outline)."},source:{code:L.trim()}}}},T={render:()=>{const[t,o]=n.useState("Sin radius"),[a,u]=n.useState("Radius 4px"),[l,p]=n.useState("Radius 10px (default)"),[i,O]=n.useState("Radius 24px (pill)");return e.jsxs(s,{sx:{display:"flex",flexDirection:"column",gap:3,width:300},children:[e.jsx(r,{label:"borderRadius={0}",value:t,onChange:c=>o(c.toString()),borderRadius:0}),e.jsx(r,{label:"borderRadius={4}",value:a,onChange:c=>u(c.toString()),borderRadius:4}),e.jsx(r,{label:"borderRadius={10} (default)",value:l,onChange:c=>p(c.toString())}),e.jsx(r,{label:"borderRadius={24}",value:i,onChange:c=>O(c.toString()),borderRadius:24})]})},parameters:{docs:{description:{story:"El prop `borderRadius` acepta un número (px) o un string CSS. Override directo del default `10`."},source:{code:z.trim()}}}},j={render:()=>{const[t,o]=n.useState("Fondo gris claro"),[a,u]=n.useState("Borde rojo"),[l,p]=n.useState("Custom completo");return e.jsxs(s,{sx:{display:"flex",flexDirection:"column",gap:3,width:300},children:[e.jsx(r,{label:"Override de background",value:t,onChange:i=>o(i.toString()),sx:{"& .MuiOutlinedInput-root":{bgcolor:"#f5f5f5"}}}),e.jsx(r,{label:"Override de borderColor",value:a,onChange:i=>u(i.toString()),sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"red"}}}),e.jsx(r,{label:"Combinado: bg + borderColor + label color",value:l,onChange:i=>p(i.toString()),sx:{"& .MuiInputLabel-root":{color:"primary.main"},"& .MuiOutlinedInput-root":{bgcolor:"#fff7e6"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"warning.main",borderWidth:2}}})]})},parameters:{docs:{description:{story:"Demuestra que el prop `sx` se mergea al final y siempre gana sobre los defaults internos. Antes esto no funcionaba por culpa del `styled()` interno."},source:{code:N.trim()}}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
297
|
+
render: () => {
|
|
298
|
+
const [value, setValue] = useState('Texto de ejemplo');
|
|
299
|
+
return <Box sx={{
|
|
300
|
+
width: 300
|
|
301
|
+
}}>
|
|
302
|
+
<Input label="Nombre" value={value} onChange={value => setValue(value.toString())} />
|
|
303
|
+
<Typography sx={{
|
|
304
|
+
mt: 2
|
|
305
|
+
}}>Valor actual: {value}</Typography>
|
|
306
|
+
</Box>;
|
|
307
|
+
},
|
|
308
|
+
parameters: {
|
|
309
|
+
docs: {
|
|
310
|
+
description: {
|
|
311
|
+
story: "Un campo de entrada de texto básico con una etiqueta."
|
|
312
|
+
},
|
|
313
|
+
source: {
|
|
314
|
+
code: BasicTextInputDefinition.trim()
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}`,...m.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
|
|
319
|
+
render: () => {
|
|
320
|
+
const [value, setValue] = useState(123);
|
|
321
|
+
return <Box sx={{
|
|
322
|
+
width: 300
|
|
323
|
+
}}>
|
|
324
|
+
<Input label="Cantidad" type="number" value={value.toString()} onChange={value => setValue(Number(value))} />
|
|
325
|
+
<Typography sx={{
|
|
326
|
+
mt: 2
|
|
327
|
+
}}>Valor actual: {value}</Typography>
|
|
328
|
+
</Box>;
|
|
329
|
+
},
|
|
330
|
+
parameters: {
|
|
331
|
+
docs: {
|
|
332
|
+
description: {
|
|
333
|
+
story: "Un campo de entrada numérico. Permite solo números y controla el teclado numérico en dispositivos móviles."
|
|
334
|
+
},
|
|
335
|
+
source: {
|
|
336
|
+
code: NumberInputDefinition.trim()
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}`,...x.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
341
|
+
render: () => {
|
|
342
|
+
const [value, setValue] = useState('ejemplo@dominio.com');
|
|
343
|
+
return <Box sx={{
|
|
344
|
+
width: 300
|
|
345
|
+
}}>
|
|
346
|
+
<Input label="Correo Electrónico" type="email" value={value.toString()} onChange={value => setValue(value.toString())} />
|
|
347
|
+
<Typography sx={{
|
|
348
|
+
mt: 2
|
|
349
|
+
}}>Valor actual: {value}</Typography>
|
|
350
|
+
</Box>;
|
|
351
|
+
},
|
|
352
|
+
parameters: {
|
|
353
|
+
docs: {
|
|
354
|
+
description: {
|
|
355
|
+
story: "Un campo de entrada para correo electrónico. Proporciona validación básica del navegador y sugiere correos electrónicos."
|
|
356
|
+
},
|
|
357
|
+
source: {
|
|
358
|
+
code: EmailInputDefinition.trim()
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}`,...g.parameters?.docs?.source}}};v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
363
|
+
render: () => {
|
|
364
|
+
const [value, setValue] = useState('micontraseña');
|
|
365
|
+
return <Box sx={{
|
|
366
|
+
width: 300
|
|
367
|
+
}}>
|
|
368
|
+
<Input label="Contraseña" type="password" value={value.toString()} onChange={value => setValue(value.toString())} />
|
|
369
|
+
<Typography sx={{
|
|
370
|
+
mt: 2
|
|
371
|
+
}}>Valor actual: {value}</Typography>
|
|
372
|
+
</Box>;
|
|
373
|
+
},
|
|
374
|
+
parameters: {
|
|
375
|
+
docs: {
|
|
376
|
+
description: {
|
|
377
|
+
story: "Un campo de entrada de contraseña. Oculta los caracteres a medida que se escriben."
|
|
378
|
+
},
|
|
379
|
+
source: {
|
|
380
|
+
code: PasswordInputDefinition.trim()
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}`,...v.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
385
|
+
render: () => {
|
|
386
|
+
const [value, setValue] = useState('');
|
|
387
|
+
return <Box sx={{
|
|
388
|
+
width: 300
|
|
389
|
+
}}>
|
|
390
|
+
<Input label="Búsqueda" placeholder="Escribe tu término de búsqueda..." value={value.toString()} onChange={value => setValue(value.toString())} />
|
|
391
|
+
<Typography sx={{
|
|
392
|
+
mt: 2
|
|
393
|
+
}}>Valor actual: {value || 'Vacío'}</Typography>
|
|
394
|
+
</Box>;
|
|
395
|
+
},
|
|
396
|
+
parameters: {
|
|
397
|
+
docs: {
|
|
398
|
+
description: {
|
|
399
|
+
story: "Un campo de entrada con un texto de marcador de posición visible cuando el campo está vacío."
|
|
400
|
+
},
|
|
401
|
+
source: {
|
|
402
|
+
code: InputWithPlaceholderDefinition.trim()
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}`,...h.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
|
|
407
|
+
render: () => {
|
|
408
|
+
const [value, setValue] = useState('invalido');
|
|
409
|
+
// Lógica simple de error para la demostración
|
|
410
|
+
const hasError = value.length < 5 && value.length > 0;
|
|
411
|
+
return <Box sx={{
|
|
412
|
+
width: 300
|
|
413
|
+
}}>
|
|
414
|
+
<Input label="Nombre de usuario" value={value.toString()} onChange={value => setValue(value.toString())} error={hasError} helperText={hasError ? 'Mínimo 5 caracteres' : ''} />
|
|
415
|
+
<Typography sx={{
|
|
416
|
+
mt: 2
|
|
417
|
+
}}>Valor actual: {value}</Typography>
|
|
418
|
+
</Box>;
|
|
419
|
+
},
|
|
420
|
+
parameters: {
|
|
421
|
+
docs: {
|
|
422
|
+
description: {
|
|
423
|
+
story: "Un campo de entrada que muestra un estado de error y un texto de ayuda cuando la validación falla."
|
|
424
|
+
},
|
|
425
|
+
source: {
|
|
426
|
+
code: InputWithErrorDefinition.trim()
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}`,...b.parameters?.docs?.source}}};S.parameters={...S.parameters,docs:{...S.parameters?.docs,source:{originalSource:`{
|
|
431
|
+
render: () => {
|
|
432
|
+
const [value, setValue] = useState('Campo deshabilitado');
|
|
433
|
+
return <Box sx={{
|
|
434
|
+
width: 300
|
|
435
|
+
}}>
|
|
436
|
+
<Input label="Estado" value={value.toString()} onChange={value => setValue(value.toString())} disabled />
|
|
437
|
+
<Typography sx={{
|
|
438
|
+
mt: 2
|
|
439
|
+
}}>Valor actual: {value}</Typography>
|
|
440
|
+
</Box>;
|
|
441
|
+
},
|
|
442
|
+
parameters: {
|
|
443
|
+
docs: {
|
|
444
|
+
story: "Un campo de entrada deshabilitado, lo que impide la interacción del usuario."
|
|
445
|
+
},
|
|
446
|
+
source: {
|
|
447
|
+
code: DisabledInputDefinition.trim()
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}`,...S.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
451
|
+
render: () => {
|
|
452
|
+
const [value, setValue] = useState('Valor de solo lectura');
|
|
453
|
+
return <Box sx={{
|
|
454
|
+
width: 300
|
|
455
|
+
}}>
|
|
456
|
+
<Input label="Información" value={value.toString()} onChange={value => setValue(value.toString())} readOnly />
|
|
457
|
+
<Typography sx={{
|
|
458
|
+
mt: 2
|
|
459
|
+
}}>Valor actual: {value}</Typography>
|
|
460
|
+
</Box>;
|
|
461
|
+
},
|
|
462
|
+
parameters: {
|
|
463
|
+
docs: {
|
|
464
|
+
story: "Un campo de entrada de solo lectura, el usuario puede ver el valor pero no modificarlo."
|
|
465
|
+
},
|
|
466
|
+
source: {
|
|
467
|
+
code: ReadOnlyInputDefinition.trim()
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}`,...y.parameters?.docs?.source}}};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
471
|
+
render: () => {
|
|
472
|
+
const [valueOutlined, setValueOutlined] = useState('Outlined');
|
|
473
|
+
const [valueFilled, setValueFilled] = useState('Filled');
|
|
474
|
+
const [valueStandard, setValueStandard] = useState('Standard');
|
|
475
|
+
return <Box sx={{
|
|
476
|
+
display: 'flex',
|
|
477
|
+
flexDirection: 'column',
|
|
478
|
+
gap: 3,
|
|
479
|
+
width: 300
|
|
480
|
+
}}>
|
|
481
|
+
<Input label="Esquema Outlined" value={valueOutlined.toString()} onChange={value => setValueOutlined(value.toString())} variant="outlined" />
|
|
482
|
+
<Input label="Esquema Filled" value={valueFilled.toString()} onChange={value => setValueFilled(value.toString())} variant="filled" />
|
|
483
|
+
<Input label="Esquema Standard" value={valueStandard.toString()} onChange={value => setValueStandard(value.toString())} variant="standard" />
|
|
484
|
+
</Box>;
|
|
485
|
+
},
|
|
486
|
+
parameters: {
|
|
487
|
+
docs: {
|
|
488
|
+
story: "Demuestra las diferentes variantes de diseño: \`outlined\`, \`filled\` y \`standard\`."
|
|
489
|
+
},
|
|
490
|
+
source: {
|
|
491
|
+
code: InputVariantsDefinition.trim()
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}`,...f.parameters?.docs?.source}}};I.parameters={...I.parameters,docs:{...I.parameters?.docs,source:{originalSource:`{
|
|
495
|
+
render: () => {
|
|
496
|
+
const [valueMedium, setValueMedium] = useState('Tamaño Mediano');
|
|
497
|
+
const [valueSmall, setValueSmall] = useState('Tamaño Pequeño');
|
|
498
|
+
return <Box sx={{
|
|
499
|
+
display: 'flex',
|
|
500
|
+
flexDirection: 'column',
|
|
501
|
+
gap: 3,
|
|
502
|
+
width: 300
|
|
503
|
+
}}>
|
|
504
|
+
<Input label="Input Mediano" value={valueMedium.toString()} onChange={value => setValueMedium(value.toString())} size="medium" />
|
|
505
|
+
<Input label="Input Pequeño" value={valueSmall.toString()} onChange={value => setValueSmall(value.toString())} size="small" />
|
|
506
|
+
</Box>;
|
|
507
|
+
},
|
|
508
|
+
parameters: {
|
|
509
|
+
docs: {
|
|
510
|
+
story: "Demuestra los diferentes tamaños del campo de entrada: \`medium\` (por defecto) y \`small\`."
|
|
511
|
+
},
|
|
512
|
+
source: {
|
|
513
|
+
code: InputSizesDefinition.trim()
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}`,...I.parameters?.docs?.source}}};V.parameters={...V.parameters,docs:{...V.parameters?.docs,source:{originalSource:`{
|
|
517
|
+
render: () => {
|
|
518
|
+
const [value, setValue] = useState('Ocupa todo el ancho');
|
|
519
|
+
return <Box sx={{
|
|
520
|
+
width: '100%'
|
|
521
|
+
}}>
|
|
522
|
+
<Input label="Input de Ancho Completo" value={value.toString()} onChange={value => setValue(value.toString())} fullWidth />
|
|
523
|
+
<Typography sx={{
|
|
524
|
+
mt: 2
|
|
525
|
+
}}>Valor actual: {value}</Typography>
|
|
526
|
+
</Box>;
|
|
527
|
+
},
|
|
528
|
+
parameters: {
|
|
529
|
+
docs: {
|
|
530
|
+
story: "Un campo de entrada que ocupa todo el ancho disponible de su contenedor."
|
|
531
|
+
},
|
|
532
|
+
source: {
|
|
533
|
+
code: FullWidthInputDefinition.trim()
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}`,...V.parameters?.docs?.source}}};C.parameters={...C.parameters,docs:{...C.parameters?.docs,source:{originalSource:`{
|
|
537
|
+
render: () => {
|
|
538
|
+
const [value, setValue] = useState('Ocupa todo el ancho');
|
|
539
|
+
return <Box sx={{
|
|
540
|
+
width: '100%'
|
|
541
|
+
}}>
|
|
542
|
+
<Input value={value.toString()} variant='standard' onChange={value => setValue(value.toString())} fullWidth />
|
|
543
|
+
<Typography sx={{
|
|
544
|
+
mt: 2
|
|
545
|
+
}}>Valor actual: {value}</Typography>
|
|
546
|
+
</Box>;
|
|
547
|
+
},
|
|
548
|
+
parameters: {
|
|
549
|
+
docs: {
|
|
550
|
+
story: "Un campo de entrada que ocupa todo el ancho disponible de su contenedor."
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}`,...C.parameters?.docs?.source}}};B.parameters={...B.parameters,docs:{...B.parameters?.docs,source:{originalSource:`{
|
|
554
|
+
render: () => {
|
|
555
|
+
const [valueOutside, setValueOutside] = useState('Outside (default)');
|
|
556
|
+
const [valueFloating, setValueFloating] = useState('Floating');
|
|
557
|
+
return <Box sx={{
|
|
558
|
+
display: 'flex',
|
|
559
|
+
flexDirection: 'column',
|
|
560
|
+
gap: 3,
|
|
561
|
+
width: 300
|
|
562
|
+
}}>
|
|
563
|
+
<Input label="Label outside" value={valueOutside.toString()} onChange={value => setValueOutside(value.toString())} labelPosition="outside" />
|
|
564
|
+
<Input label="Label floating (MUI clásico)" value={valueFloating.toString()} onChange={value => setValueFloating(value.toString())} labelPosition="floating" />
|
|
565
|
+
</Box>;
|
|
566
|
+
},
|
|
567
|
+
parameters: {
|
|
568
|
+
docs: {
|
|
569
|
+
description: {
|
|
570
|
+
story: "Compara \`labelPosition='outside'\` (default, label arriba del input) vs \`labelPosition='floating'\` (label flotante clásico de MUI dentro del notched outline)."
|
|
571
|
+
},
|
|
572
|
+
source: {
|
|
573
|
+
code: LabelPositionFloatingDefinition.trim()
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}`,...B.parameters?.docs?.source}}};T.parameters={...T.parameters,docs:{...T.parameters?.docs,source:{originalSource:`{
|
|
578
|
+
render: () => {
|
|
579
|
+
const [v0, setV0] = useState('Sin radius');
|
|
580
|
+
const [v4, setV4] = useState('Radius 4px');
|
|
581
|
+
const [v10, setV10] = useState('Radius 10px (default)');
|
|
582
|
+
const [v24, setV24] = useState('Radius 24px (pill)');
|
|
583
|
+
return <Box sx={{
|
|
584
|
+
display: 'flex',
|
|
585
|
+
flexDirection: 'column',
|
|
586
|
+
gap: 3,
|
|
587
|
+
width: 300
|
|
588
|
+
}}>
|
|
589
|
+
<Input label="borderRadius={0}" value={v0} onChange={v => setV0(v.toString())} borderRadius={0} />
|
|
590
|
+
<Input label="borderRadius={4}" value={v4} onChange={v => setV4(v.toString())} borderRadius={4} />
|
|
591
|
+
<Input label="borderRadius={10} (default)" value={v10} onChange={v => setV10(v.toString())} />
|
|
592
|
+
<Input label="borderRadius={24}" value={v24} onChange={v => setV24(v.toString())} borderRadius={24} />
|
|
593
|
+
</Box>;
|
|
594
|
+
},
|
|
595
|
+
parameters: {
|
|
596
|
+
docs: {
|
|
597
|
+
description: {
|
|
598
|
+
story: "El prop \`borderRadius\` acepta un número (px) o un string CSS. Override directo del default \`10\`."
|
|
599
|
+
},
|
|
600
|
+
source: {
|
|
601
|
+
code: CustomBorderRadiusDefinition.trim()
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}`,...T.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
|
|
606
|
+
render: () => {
|
|
607
|
+
const [bg, setBg] = useState('Fondo gris claro');
|
|
608
|
+
const [color, setColor] = useState('Borde rojo');
|
|
609
|
+
const [combined, setCombined] = useState('Custom completo');
|
|
610
|
+
return <Box sx={{
|
|
611
|
+
display: 'flex',
|
|
612
|
+
flexDirection: 'column',
|
|
613
|
+
gap: 3,
|
|
614
|
+
width: 300
|
|
615
|
+
}}>
|
|
616
|
+
<Input label="Override de background" value={bg} onChange={v => setBg(v.toString())} sx={{
|
|
617
|
+
'& .MuiOutlinedInput-root': {
|
|
618
|
+
bgcolor: '#f5f5f5'
|
|
619
|
+
}
|
|
620
|
+
}} />
|
|
621
|
+
<Input label="Override de borderColor" value={color} onChange={v => setColor(v.toString())} sx={{
|
|
622
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
623
|
+
borderColor: 'red'
|
|
624
|
+
}
|
|
625
|
+
}} />
|
|
626
|
+
<Input label="Combinado: bg + borderColor + label color" value={combined} onChange={v => setCombined(v.toString())} sx={{
|
|
627
|
+
'& .MuiInputLabel-root': {
|
|
628
|
+
color: 'primary.main'
|
|
629
|
+
},
|
|
630
|
+
'& .MuiOutlinedInput-root': {
|
|
631
|
+
bgcolor: '#fff7e6'
|
|
632
|
+
},
|
|
633
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
634
|
+
borderColor: 'warning.main',
|
|
635
|
+
borderWidth: 2
|
|
636
|
+
}
|
|
637
|
+
}} />
|
|
638
|
+
</Box>;
|
|
639
|
+
},
|
|
640
|
+
parameters: {
|
|
641
|
+
docs: {
|
|
642
|
+
description: {
|
|
643
|
+
story: "Demuestra que el prop \`sx\` se mergea al final y siempre gana sobre los defaults internos. Antes esto no funcionaba por culpa del \`styled()\` interno."
|
|
644
|
+
},
|
|
645
|
+
source: {
|
|
646
|
+
code: CustomStylingDefinition.trim()
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}`,...j.parameters?.docs?.source}}};const Te=["BasicTextInput","NumberInput","EmailInput","PasswordInput","InputWithPlaceholder","InputWithError","DisabledInput","ReadOnlyInput","InputVariants","InputSizes","FullWidthInput","StandardVariant","LabelPositionFloating","CustomBorderRadius","CustomStyling"];export{m as BasicTextInput,T as CustomBorderRadius,j as CustomStyling,S as DisabledInput,g as EmailInput,V as FullWidthInput,I as InputSizes,f as InputVariants,b as InputWithError,h as InputWithPlaceholder,B as LabelPositionFloating,x as NumberInput,v as PasswordInput,y as ReadOnlyInput,C as StandardVariant,Te as __namedExportsOrder,Be as default};
|