@soyfri/shared-library 2.0.0-beta.3 → 2.0.0-beta.31
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/Alert-B3SMPD1s.cjs +31 -0
- package/Alert-B3SMPD1s.cjs.map +1 -0
- package/Alert-YsPScpSE.js +32 -0
- package/Alert-YsPScpSE.js.map +1 -0
- package/Autocomplete-C_lW1VER.js +337 -0
- package/Autocomplete-C_lW1VER.js.map +1 -0
- package/Autocomplete-CejWztBY.cjs +336 -0
- package/Autocomplete-CejWztBY.cjs.map +1 -0
- package/Avatar-Dw5rzayR.cjs +166 -0
- package/Avatar-Dw5rzayR.cjs.map +1 -0
- package/Avatar-H8akSege.js +167 -0
- package/Avatar-H8akSege.js.map +1 -0
- package/Button-C17mExpd.cjs.map +1 -1
- package/Button-UkkP-bNw.js.map +1 -1
- package/Card-DYKGY-NG.js +116 -0
- package/Card-DYKGY-NG.js.map +1 -0
- package/Card-Dr1-ATRY.cjs +115 -0
- package/Card-Dr1-ATRY.cjs.map +1 -0
- package/Checkbox-BCqMFWt4.cjs +187 -0
- package/Checkbox-BCqMFWt4.cjs.map +1 -0
- package/Checkbox-gB5YKkVo.js +188 -0
- package/Checkbox-gB5YKkVo.js.map +1 -0
- package/{components/DateRangePicker/DateRangePicker.js → Chip-OPYQ1uQ_.js} +33 -35
- package/Chip-OPYQ1uQ_.js.map +1 -0
- package/{components/DateRangePicker/DateRangePicker.cjs → Chip-qoJLDiva.cjs} +33 -36
- package/Chip-qoJLDiva.cjs.map +1 -0
- package/DatePicker-_IGWc3I5.js +178 -0
- package/DatePicker-_IGWc3I5.js.map +1 -0
- package/DatePicker-t7uDTZMl.cjs +177 -0
- package/DatePicker-t7uDTZMl.cjs.map +1 -0
- package/DateTimePicker-BxQyjTCY.cjs +229 -0
- package/DateTimePicker-BxQyjTCY.cjs.map +1 -0
- package/DateTimePicker-CrmWav_j.js +230 -0
- package/DateTimePicker-CrmWav_j.js.map +1 -0
- package/Input-CScC87J5.cjs +185 -0
- package/Input-CScC87J5.cjs.map +1 -0
- package/Input-DP_fKl38.js +186 -0
- package/Input-DP_fKl38.js.map +1 -0
- package/Modal-BFpX5AFV.js +347 -0
- package/Modal-BFpX5AFV.js.map +1 -0
- package/Modal-CkpuI8ns.cjs +346 -0
- package/Modal-CkpuI8ns.cjs.map +1 -0
- package/RadioGroup-Dd0rHXSX.cjs +202 -0
- package/RadioGroup-Dd0rHXSX.cjs.map +1 -0
- package/RadioGroup-bO-ahP9T.js +203 -0
- package/RadioGroup-bO-ahP9T.js.map +1 -0
- package/Select-BY5Y0qZ1.js +376 -0
- package/Select-BY5Y0qZ1.js.map +1 -0
- package/Select-CURrHSyl.cjs +375 -0
- package/Select-CURrHSyl.cjs.map +1 -0
- package/Spinner-B6sThC1p.js +74 -0
- package/Spinner-B6sThC1p.js.map +1 -0
- package/Spinner-D7qRmNS9.cjs +73 -0
- package/Spinner-D7qRmNS9.cjs.map +1 -0
- package/Stat-BUcFCGrz.cjs +83 -0
- package/Stat-BUcFCGrz.cjs.map +1 -0
- package/Stat-C06A_izS.js +84 -0
- package/Stat-C06A_izS.js.map +1 -0
- package/StatusMessage-B3nXpuRl.cjs +88 -0
- package/StatusMessage-B3nXpuRl.cjs.map +1 -0
- package/StatusMessage-D0WgSBx7.js +89 -0
- package/StatusMessage-D0WgSBx7.js.map +1 -0
- package/Step-BArsou1V.js +301 -0
- package/Step-BArsou1V.js.map +1 -0
- package/Step-Nd7SJbRZ.cjs +300 -0
- package/Step-Nd7SJbRZ.cjs.map +1 -0
- package/Switch-CQFOopYy.cjs +182 -0
- package/Switch-CQFOopYy.cjs.map +1 -0
- package/Switch-D72dpkH2.js +183 -0
- package/Switch-D72dpkH2.js.map +1 -0
- package/Tab-BbP8jBcK.cjs +110 -0
- package/Tab-BbP8jBcK.cjs.map +1 -0
- package/Tab-BxSxKJsP.js +111 -0
- package/Tab-BxSxKJsP.js.map +1 -0
- package/Table-C2LbW0B1.js +531 -0
- package/Table-C2LbW0B1.js.map +1 -0
- package/Table-C4OM6rrC.cjs +530 -0
- package/Table-C4OM6rrC.cjs.map +1 -0
- package/components/ActionMenu/ActionMenu.cjs +52 -52
- package/components/ActionMenu/ActionMenu.cjs.map +1 -1
- package/components/ActionMenu/ActionMenu.d.ts +20 -36
- package/components/ActionMenu/ActionMenu.js +55 -55
- package/components/ActionMenu/ActionMenu.js.map +1 -1
- package/components/ActionMenu/index.d.ts +2 -2
- package/components/Alert/Alert.cjs +6 -0
- package/components/Alert/Alert.cjs.map +1 -0
- package/components/Alert/Alert.d.ts +31 -0
- package/components/Alert/Alert.js +6 -0
- package/components/Alert/Alert.js.map +1 -0
- package/components/Alert/index.d.ts +2 -0
- package/components/Alert.d.ts +6 -0
- package/components/AppBar/AppBar.cjs +3 -220
- package/components/AppBar/AppBar.cjs.map +1 -1
- package/components/AppBar/AppBar.d.ts +6 -6
- package/components/AppBar/AppBar.js +6 -223
- package/components/AppBar/AppBar.js.map +1 -1
- package/components/AppBar/index.d.ts +0 -6
- package/components/Autocomplete/Autocomplete.cjs +4 -311
- package/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +8 -6
- package/components/Autocomplete/Autocomplete.helpers.d.ts +8 -4
- package/components/Autocomplete/Autocomplete.js +4 -311
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Autocomplete/_parts/AutocompleteOption.d.ts +5 -8
- package/components/Autocomplete/index.d.ts +1 -1
- package/components/Avatar/Avatar.cjs +2 -160
- package/components/Avatar/Avatar.cjs.map +1 -1
- package/components/Avatar/Avatar.d.ts +16 -1
- package/components/Avatar/Avatar.js +2 -160
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Avatar/index.d.ts +1 -0
- package/components/Button/Button.d.ts +5 -5
- package/components/Button/index.d.ts +1 -0
- package/components/Card/Card.cjs +4 -184
- package/components/Card/Card.cjs.map +1 -1
- package/components/Card/Card.d.ts +21 -50
- package/components/Card/Card.js +4 -184
- package/components/Card/Card.js.map +1 -1
- package/components/Card/Card.sx.d.ts +3 -6
- package/components/Card/index.d.ts +1 -1
- package/components/Checkbox/Checkbox.cjs +6 -0
- package/components/Checkbox/Checkbox.cjs.map +1 -0
- package/components/Checkbox/Checkbox.d.ts +55 -0
- package/components/Checkbox/Checkbox.js +6 -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/components/Chip/Chip.cjs +4 -72
- package/components/Chip/Chip.cjs.map +1 -1
- package/components/Chip/Chip.js +3 -71
- package/components/Chip/Chip.js.map +1 -1
- package/components/Chip/index.d.ts +2 -1
- package/components/Chip.d.ts +4 -0
- package/components/Column/Column.cjs +1 -1
- package/components/Column/Column.cjs.map +1 -1
- package/components/Column/Column.d.ts +1 -1
- package/components/Column/Column.js +1 -1
- package/components/Column/Column.js.map +1 -1
- package/components/Column/index.d.ts +1 -0
- package/components/DatePicker/DatePicker.cjs +3 -200
- package/components/DatePicker/DatePicker.cjs.map +1 -1
- package/components/DatePicker/DatePicker.d.ts +1 -13
- package/components/DatePicker/DatePicker.js +3 -200
- package/components/DatePicker/DatePicker.js.map +1 -1
- package/components/DatePicker/index.d.ts +1 -1
- package/components/DateTimePicker/DateTimePicker.cjs +3 -219
- package/components/DateTimePicker/DateTimePicker.cjs.map +1 -1
- package/components/DateTimePicker/DateTimePicker.d.ts +10 -6
- package/components/DateTimePicker/DateTimePicker.definitions.d.ts +2 -0
- package/components/DateTimePicker/DateTimePicker.helpers.d.ts +4 -2
- package/components/DateTimePicker/DateTimePicker.js +3 -219
- package/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/components/DateTimePicker/index.d.ts +1 -1
- package/components/Drawer/Drawer.cjs +25 -24
- package/components/Drawer/Drawer.cjs.map +1 -1
- package/components/Drawer/Drawer.d.ts +8 -1
- package/components/Drawer/Drawer.js +26 -25
- package/components/Drawer/Drawer.js.map +1 -1
- package/components/Drawer/DrawerItem.d.ts +6 -1
- package/components/Gallery/Gallery.cjs +154 -79
- package/components/Gallery/Gallery.cjs.map +1 -1
- package/components/Gallery/Gallery.d.ts +25 -9
- package/components/Gallery/Gallery.js +154 -79
- package/components/Gallery/Gallery.js.map +1 -1
- package/components/Gallery/GalleryLightbox.d.ts +6 -10
- package/components/Gallery/GalleryMain.d.ts +3 -7
- package/components/Gallery/GalleryThumbnails.d.ts +7 -11
- package/components/Gallery/index.d.ts +2 -1
- package/components/Gallery.d.ts +4 -0
- package/components/Icon/Icon.cjs +6 -8
- package/components/Icon/Icon.cjs.map +1 -1
- package/components/Icon/Icon.d.ts +11 -17
- package/components/Icon/Icon.js +6 -8
- package/components/Icon/Icon.js.map +1 -1
- package/components/Icon/index.d.ts +2 -1
- package/components/Icon.d.ts +4 -0
- package/components/Input/Input.cjs +3 -172
- package/components/Input/Input.cjs.map +1 -1
- package/components/Input/Input.d.ts +9 -2
- package/components/Input/Input.definitions.d.ts +1 -0
- package/components/Input/Input.helpers.d.ts +3 -3
- package/components/Input/Input.js +3 -172
- package/components/Input/Input.js.map +1 -1
- package/components/Input/index.d.ts +1 -1
- package/components/InputGroup/InputGroup.cjs +23 -22
- package/components/InputGroup/InputGroup.cjs.map +1 -1
- package/components/InputGroup/InputGroup.d.ts +4 -4
- package/components/InputGroup/InputGroup.js +22 -21
- package/components/InputGroup/InputGroup.js.map +1 -1
- package/components/InputGroup/index.d.ts +2 -1
- package/components/InputGroup.d.ts +4 -0
- package/components/Modal/Modal.cjs +7 -317
- package/components/Modal/Modal.cjs.map +1 -1
- package/components/Modal/Modal.d.ts +20 -5
- package/components/Modal/Modal.js +6 -316
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/ModalBody.d.ts +6 -1
- package/components/Modal/ModalFooter.d.ts +4 -4
- package/components/Modal/ModalHeader.d.ts +6 -1
- package/components/Modal/index.d.ts +3 -1
- package/components/Modal.d.ts +4 -0
- package/components/RadioGroup/RadioGroup.cjs +6 -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 +6 -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 +4 -445
- package/components/Select/Select.cjs.map +1 -1
- package/components/Select/Select.d.ts +37 -18
- package/components/Select/Select.helpers.d.ts +5 -19
- package/components/Select/Select.js +4 -445
- package/components/Select/Select.js.map +1 -1
- package/components/Select/index.d.ts +1 -1
- package/components/Spinner/Spinner.cjs +6 -0
- package/components/Spinner/Spinner.cjs.map +1 -0
- package/components/Spinner/Spinner.d.ts +26 -0
- package/components/Spinner/Spinner.js +6 -0
- package/components/Spinner/Spinner.js.map +1 -0
- package/components/Spinner/index.d.ts +2 -0
- package/components/Spinner.d.ts +6 -0
- package/components/Stat/Stat.cjs +4 -83
- package/components/Stat/Stat.cjs.map +1 -1
- package/components/Stat/Stat.js +3 -82
- package/components/Stat/Stat.js.map +1 -1
- package/components/Stat/index.d.ts +2 -1
- package/components/Stat.d.ts +4 -0
- package/components/StatusMessage/StatusMessage.cjs +4 -77
- package/components/StatusMessage/StatusMessage.cjs.map +1 -1
- package/components/StatusMessage/StatusMessage.d.ts +20 -36
- package/components/StatusMessage/StatusMessage.js +3 -76
- package/components/StatusMessage/StatusMessage.js.map +1 -1
- package/components/StatusMessage/index.d.ts +2 -1
- package/components/StatusMessage.d.ts +4 -0
- package/components/Stepper/Stepper.cjs +8 -47
- package/components/Stepper/Stepper.cjs.map +1 -1
- package/components/Stepper/Stepper.d.ts +9 -8
- package/components/Stepper/Stepper.js +7 -46
- package/components/Stepper/Stepper.js.map +1 -1
- package/{hooks/Wizard/WizardContext.d.ts → components/Stepper/StepperContext.d.ts} +29 -23
- 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 -2
- package/components/Stepper.d.ts +4 -0
- package/components/Switch/Switch.cjs +6 -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 +6 -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/Table/Table.cjs +2 -528
- package/components/Table/Table.cjs.map +1 -1
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/Table.js +2 -528
- package/components/Table/Table.js.map +1 -1
- package/components/Tabs/Tabs.cjs +5 -94
- package/components/Tabs/Tabs.cjs.map +1 -1
- package/components/Tabs/Tabs.d.ts +21 -16
- package/components/Tabs/Tabs.js +4 -93
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/index.d.ts +4 -2
- package/components/Tabs.d.ts +4 -0
- package/components/Timeline/Timeline.cjs +3 -2
- package/components/Timeline/Timeline.cjs.map +1 -1
- package/components/Timeline/Timeline.d.ts +4 -8
- package/components/Timeline/Timeline.js +3 -2
- package/components/Timeline/Timeline.js.map +1 -1
- package/components/Timeline/index.d.ts +4 -2
- package/components/Timeline.d.ts +4 -0
- package/components/_shared/mergeSx.d.ts +7 -0
- package/{formField.sx-DfVbMe0V.js → formField.sx-8_QRnKxv.js} +2 -11
- package/formField.sx-8_QRnKxv.js.map +1 -0
- package/{formField.sx-CQ1mbk9M.cjs → formField.sx-BAX7KwMR.cjs} +10 -19
- package/formField.sx-BAX7KwMR.cjs.map +1 -0
- package/index.cjs +96 -6
- package/index.cjs.map +1 -1
- package/index.d.ts +36 -0
- package/index.js +70 -4
- package/index.js.map +1 -1
- package/local/affiliations/affiliations.dev.soyfri.com-key.pem +28 -0
- package/local/affiliations/affiliations.dev.soyfri.com.pem +27 -0
- package/local/aficiliaciones/afiliaciones.dev.soyfri.com-key.pem +28 -0
- package/local/aficiliaciones/afiliaciones.dev.soyfri.com.pem +27 -0
- package/local/afiliaciones/afiliaciones.dev.soyfri.com-key.pem +28 -0
- package/local/afiliaciones/afiliaciones.dev.soyfri.com.pem +27 -0
- package/local/root/rootCA-key.pem +40 -0
- package/local/root/rootCA.pem +30 -0
- package/local/soporte/supportweb.dev.soyfri.com-key.pem +28 -0
- package/local/soporte/supportweb.dev.soyfri.com.pem +27 -0
- package/local/support/supportweb.dev.soyfri.com-key.pem +28 -0
- package/local/support/supportweb.dev.soyfri.com.pem +27 -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 +3 -1
- package/package.json +78 -73
- package/{resolvePreset-CT3kU-K2.cjs → resolvePreset-CxTI6_Ln.cjs} +3 -3
- package/{resolvePreset-CT3kU-K2.cjs.map → resolvePreset-CxTI6_Ln.cjs.map} +1 -1
- package/{resolvePreset-B-IB0ehH.js → resolvePreset-K6_BfWHD.js} +3 -3
- package/{resolvePreset-B-IB0ehH.js.map → resolvePreset-K6_BfWHD.js.map} +1 -1
- package/theme/componentStyles.d.ts +1 -1
- 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/{components/ScrollTopButton → utils}/scrollToTop.d.ts +6 -7
- package/components/AppBar/AppBarBrand.d.ts +0 -31
- package/components/AppBar/AppBarUserMenu.d.ts +0 -65
- package/components/Autocomplete/Autocomplete.types.d.ts +0 -1
- package/components/DatePicker/DatePicker.types.d.ts +0 -1
- package/components/DateRangePicker/DateRangePicker.cjs.map +0 -1
- package/components/DateRangePicker/DateRangePicker.d.ts +0 -15
- package/components/DateRangePicker/DateRangePicker.definitions.d.ts +0 -6
- package/components/DateRangePicker/DateRangePicker.js.map +0 -1
- package/components/DateRangePicker/index.d.ts +0 -1
- package/components/DateRangePicker.d.ts +0 -2
- package/components/DateTimePicker/DateTimePicker.types.d.ts +0 -1
- package/components/Input/Input.types.d.ts +0 -1
- package/components/PageLoader/PageLoader.cjs +0 -61
- package/components/PageLoader/PageLoader.cjs.map +0 -1
- package/components/PageLoader/PageLoader.d.ts +0 -38
- package/components/PageLoader/PageLoader.js +0 -61
- package/components/PageLoader/PageLoader.js.map +0 -1
- package/components/PageLoader/index.d.ts +0 -2
- package/components/PageLoader.d.ts +0 -6
- package/components/ScrollTopButton/ScrollTopButton.cjs +0 -79
- package/components/ScrollTopButton/ScrollTopButton.cjs.map +0 -1
- package/components/ScrollTopButton/ScrollTopButton.d.ts +0 -48
- package/components/ScrollTopButton/ScrollTopButton.js +0 -79
- package/components/ScrollTopButton/ScrollTopButton.js.map +0 -1
- package/components/ScrollTopButton/index.d.ts +0 -4
- package/components/ScrollTopButton.d.ts +0 -6
- package/components/Select/Select.definitions.d.ts +0 -17
- package/components/Select/Select.types.d.ts +0 -1
- package/components/Select/_parts/SelectSearchHeader.d.ts +0 -15
- package/formField.sx-CQ1mbk9M.cjs.map +0 -1
- package/formField.sx-DfVbMe0V.js.map +0 -1
- package/hooks/Wizard/Wizard.cjs +0 -7
- package/hooks/Wizard/Wizard.cjs.map +0 -1
- package/hooks/Wizard/Wizard.js +0 -7
- package/hooks/Wizard/Wizard.js.map +0 -1
- package/hooks/Wizard/index.d.ts +0 -3
- package/hooks/Wizard/useWizard.d.ts +0 -9
- package/hooks/Wizard.d.ts +0 -2
- package/useWizard-CWdIxZzX.cjs +0 -94
- package/useWizard-CWdIxZzX.cjs.map +0 -1
- package/useWizard-CWq--C3o.js +0 -95
- package/useWizard-CWq--C3o.js.map +0 -1
- /package/{styles.css → index.css} +0 -0
|
@@ -1,49 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Box, Stepper as Stepper$1, Step as Step$1, StepLabel } from "@mui/material";
|
|
3
|
-
import { u as useWizard } from "../../useWizard-CWq--C3o.js";
|
|
4
|
-
const Stepper = ({
|
|
5
|
-
children,
|
|
6
|
-
orientation = "horizontal",
|
|
7
|
-
alternateLabel = false,
|
|
8
|
-
sx,
|
|
9
|
-
currentStep: currentStepProp
|
|
10
|
-
}) => {
|
|
11
|
-
const wizard = useWizard();
|
|
12
|
-
const currentStep = currentStepProp !== void 0 ? currentStepProp : wizard.totalSteps > 0 ? wizard.currentStep : 0;
|
|
13
|
-
return /* @__PURE__ */ jsxs(Box, { sx, children: [
|
|
14
|
-
/* @__PURE__ */ jsx(Stepper$1, { activeStep: currentStep, orientation, alternativeLabel: alternateLabel, children: children.map((child, idx) => {
|
|
15
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
16
|
-
return /* @__PURE__ */ jsx(Step$1, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsx(
|
|
17
|
-
StepLabel,
|
|
18
|
-
{
|
|
19
|
-
sx: {
|
|
20
|
-
pointerEvents: "none",
|
|
21
|
-
"& .MuiStepIcon-root": {
|
|
22
|
-
color: dotColor
|
|
23
|
-
},
|
|
24
|
-
"& .MuiStepIcon-active": {
|
|
25
|
-
color: activeDotColor
|
|
26
|
-
},
|
|
27
|
-
"& .MuiStepIcon-completed": {
|
|
28
|
-
color: completedDotColor
|
|
29
|
-
},
|
|
30
|
-
"& .MuiStepIcon-text": {
|
|
31
|
-
fill: iconTextColor
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
children: label
|
|
35
|
-
}
|
|
36
|
-
) }, idx);
|
|
37
|
-
}) }),
|
|
38
|
-
/* @__PURE__ */ jsx(Box, { mt: 2, children: children.map(
|
|
39
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsx(Box, { children: child.props.children }, idx) : null
|
|
40
|
-
) })
|
|
41
|
-
] });
|
|
42
|
-
};
|
|
43
|
-
const Step = (_) => null;
|
|
44
|
-
Step.displayName = "Step";
|
|
1
|
+
import { a, S, c, b, S as S2, u } from "../../Step-BArsou1V.js";
|
|
45
2
|
export {
|
|
46
|
-
Step,
|
|
47
|
-
Stepper
|
|
3
|
+
a as Step,
|
|
4
|
+
S as Stepper,
|
|
5
|
+
c as StepperContext,
|
|
6
|
+
b as StepperProvider,
|
|
7
|
+
S2 as default,
|
|
8
|
+
u as useStepper
|
|
48
9
|
};
|
|
49
10
|
//# sourceMappingURL=Stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":[
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* API expuesta por `
|
|
4
|
-
*
|
|
5
|
-
* Nota de retro-compatibilidad: los nombres `submitStep`, `nextStep`,
|
|
6
|
-
* `prevStep`, `goToStep` se mantienen idénticos al `WizardContext` de
|
|
7
|
-
* `@soyfri/fri-web-components` para que consumers migrando no tengan que
|
|
8
|
-
* cambiar sus llamadas. Se agregan campos extra opcionales que antes no
|
|
9
|
-
* existían (`currentStep`, `totalSteps`, `isFirst`, `isLast`, `completed`).
|
|
3
|
+
* API expuesta por `useStepper()`.
|
|
10
4
|
*/
|
|
11
|
-
export interface
|
|
5
|
+
export interface StepperContextValue {
|
|
12
6
|
/** Índice del paso actual (0-based). */
|
|
13
7
|
currentStep: number;
|
|
14
|
-
/** Total de pasos del
|
|
8
|
+
/** Total de pasos del stepper. */
|
|
15
9
|
totalSteps: number;
|
|
16
10
|
/** True si `currentStep === 0`. */
|
|
17
11
|
isFirst: boolean;
|
|
@@ -26,16 +20,25 @@ export interface WizardContextValue {
|
|
|
26
20
|
/** Salta a un paso específico (0-based). No-op si fuera de rango. */
|
|
27
21
|
goToStep: (stepNumber: number) => void;
|
|
28
22
|
/**
|
|
29
|
-
* Envía el
|
|
23
|
+
* Envía el stepper. Marca `completed = true` y dispara el callback
|
|
30
24
|
* `onSubmit` del provider. En el último paso suele reemplazar a `nextStep`.
|
|
31
25
|
*/
|
|
32
26
|
submitStep: () => void;
|
|
33
|
-
/** Resetea
|
|
27
|
+
/** Resetea al paso inicial y limpia `completed`. */
|
|
34
28
|
reset: () => void;
|
|
35
29
|
}
|
|
36
|
-
export declare const
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
export declare const StepperContext: import('react').Context<StepperContextValue>;
|
|
31
|
+
/**
|
|
32
|
+
* Hook para consumir el `StepperContext` desde cualquier descendiente de
|
|
33
|
+
* `<StepperProvider>`.
|
|
34
|
+
*
|
|
35
|
+
* Si se llama fuera de un provider, devuelve los valores por defecto (no-op)
|
|
36
|
+
* para que componentes como `<Stepper>` puedan leerlo sin romper cuando no
|
|
37
|
+
* hay provider envolvente.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useStepper(): StepperContextValue;
|
|
40
|
+
export interface StepperProviderProps {
|
|
41
|
+
/** Número total de pasos. Requerido. */
|
|
39
42
|
totalSteps: number;
|
|
40
43
|
/** Paso inicial (0-based). Default: 0. */
|
|
41
44
|
initialStep?: number;
|
|
@@ -52,16 +55,19 @@ export interface WizardProviderProps {
|
|
|
52
55
|
children?: ReactNode;
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
|
-
* Provider del
|
|
56
|
-
* no necesita gestionar estado —
|
|
58
|
+
* Provider del stepper. Administra el `currentStep` internamente. El consumer
|
|
59
|
+
* no necesita gestionar estado — solo consumirlo con `useStepper()` desde
|
|
57
60
|
* cualquier descendiente.
|
|
58
61
|
*
|
|
59
62
|
* ```tsx
|
|
60
|
-
* <
|
|
61
|
-
* <Stepper
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
63
|
+
* <StepperProvider totalSteps={3} onSubmit={handleFinalSubmit}>
|
|
64
|
+
* <Stepper>
|
|
65
|
+
* <Step label="Paso 1"><StepOne /></Step>
|
|
66
|
+
* <Step label="Paso 2"><StepTwo /></Step>
|
|
67
|
+
* <Step label="Paso 3"><StepThree /></Step>
|
|
68
|
+
* </Stepper>
|
|
69
|
+
* <StepperControls />
|
|
70
|
+
* </StepperProvider>
|
|
65
71
|
* ```
|
|
66
72
|
*/
|
|
67
|
-
export declare const
|
|
73
|
+
export declare const StepperProvider: FC<StepperProviderProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook interno del Stepper para manejar scroll horizontal cuando los steps
|
|
3
|
+
* no caben en el contenedor. No se exporta desde el barrel — es un detalle
|
|
4
|
+
* de implementación.
|
|
5
|
+
*
|
|
6
|
+
* @param enabled - Si el scroll está activo (típicamente sólo en orientación horizontal).
|
|
7
|
+
* @param deps - Cosas que afectan el layout y disparan un recompute (ej. cantidad de steps, paso activo).
|
|
8
|
+
*
|
|
9
|
+
* Retorna:
|
|
10
|
+
* - `scrollRef`: ref a asignar al contenedor con `overflow-x: auto`.
|
|
11
|
+
* - `canScrollLeft` / `canScrollRight`: flags para habilitar/deshabilitar flechas.
|
|
12
|
+
* - `scrollBy(delta)`: imperativo con scroll suave.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useHorizontalScroll(enabled: boolean, deps?: unknown[]): {
|
|
15
|
+
scrollRef: import('react').RefObject<HTMLDivElement | null>;
|
|
16
|
+
canScrollLeft: boolean;
|
|
17
|
+
canScrollRight: boolean;
|
|
18
|
+
scrollBy: (delta: number) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface StepperScrollArrowProps {
|
|
2
|
+
direction: 'left' | 'right';
|
|
3
|
+
/** Cuando `false`, el botón está deshabilitado (por ejemplo, ya estás al inicio). */
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Cuando `false`, el botón queda con `visibility: hidden` (reserva su
|
|
7
|
+
* espacio pero no se ve). Útil para que el área de scroll no se corra
|
|
8
|
+
* horizontalmente cuando no hay overflow en ningún lado.
|
|
9
|
+
*/
|
|
10
|
+
visible: boolean;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Flecha de scroll (`<` / `>`) del Stepper horizontal. Se muestra a los
|
|
15
|
+
* costados del área scrollable cuando hay overflow. Componente privado —
|
|
16
|
+
* no se exporta del barrel.
|
|
17
|
+
*/
|
|
18
|
+
export declare const StepperScrollArrow: ({ direction, enabled, visible, onClick, }: StepperScrollArrowProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export { default
|
|
2
|
-
export {
|
|
1
|
+
export { Stepper, default } from './Stepper';
|
|
2
|
+
export type { StepperProps } from './Stepper';
|
|
3
|
+
export { Step } from './Step';
|
|
4
|
+
export type { StepProps } from './Step';
|
|
5
|
+
export { StepperProvider, StepperContext, useStepper, } from './StepperContext';
|
|
6
|
+
export type { StepperContextValue, StepperProviderProps, } from './StepperContext';
|
package/components/Stepper.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Switch = require("../../Switch-CQFOopYy.cjs");
|
|
4
|
+
exports.Switch = Switch.Switch;
|
|
5
|
+
exports.default = Switch.Switch;
|
|
6
|
+
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SwitchProps as MuiSwitchProps, SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export type SwitchSize = 'small' | 'medium';
|
|
4
|
+
export type SwitchLabelPlacement = 'start' | 'end' | 'top' | 'bottom';
|
|
5
|
+
export interface BaseSwitchProps extends Omit<MuiSwitchProps, 'value' | 'onChange' | 'checked' | 'defaultChecked' | 'size'> {
|
|
6
|
+
/** Texto al lado del switch. Si está ausente, no se renderiza FormControlLabel. */
|
|
7
|
+
label?: string;
|
|
8
|
+
size?: SwitchSize;
|
|
9
|
+
/** Posición del label. Default: 'end' (legacy `FormToggleInput` lo ponía a la izquierda con su flex-stack). */
|
|
10
|
+
labelPlacement?: SwitchLabelPlacement;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
/** Renderiza un contenedor con borde alrededor del switch + label. Default: false. */
|
|
15
|
+
bordered?: boolean;
|
|
16
|
+
/** Border radius del contenedor (cuando bordered). Default: 10. */
|
|
17
|
+
borderRadius?: number | string;
|
|
18
|
+
defaultChecked?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Nombre del preset de estilo registrado en `theme.styles.Switch`.
|
|
21
|
+
* - `"default"` (o ausente) = estilo built-in del paquete.
|
|
22
|
+
* - Cualquier otro string = mergea el preset encima del estilo built-in.
|
|
23
|
+
*/
|
|
24
|
+
preset?: string;
|
|
25
|
+
sx?: SxProps<Theme>;
|
|
26
|
+
}
|
|
27
|
+
export interface RHFSwitchProps extends BaseSwitchProps {
|
|
28
|
+
name: string;
|
|
29
|
+
control: any;
|
|
30
|
+
validation?: RegisterOptions;
|
|
31
|
+
/**
|
|
32
|
+
* Side-effect que corre después de que RHF actualiza el form state.
|
|
33
|
+
* Útil para cascadas entre campos. NO reemplaza al handler de RHF.
|
|
34
|
+
*/
|
|
35
|
+
onValueChange?: (checked: boolean) => void;
|
|
36
|
+
checked?: never;
|
|
37
|
+
onChange?: never;
|
|
38
|
+
}
|
|
39
|
+
export interface ControlledSwitchProps extends BaseSwitchProps {
|
|
40
|
+
name?: string;
|
|
41
|
+
control?: never;
|
|
42
|
+
validation?: never;
|
|
43
|
+
checked: boolean;
|
|
44
|
+
onChange: (checked: boolean) => void;
|
|
45
|
+
}
|
|
46
|
+
export type SwitchProps = RHFSwitchProps | ControlledSwitchProps;
|
|
47
|
+
export declare const Switch: React.FC<SwitchProps>;
|
|
48
|
+
export default Switch;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const BasicSwitchDefinition = "\nimport React, { useState } from 'react';\nimport { Switch } from './Switch';\nimport { Box, Typography } from '@mui/material';\n\nexport const BasicSwitchExample = () => {\n const [checked, setChecked] = useState(false);\n return (\n <Box sx={{ width: 280 }}>\n <Switch checked={checked} onChange={setChecked} />\n <Typography sx={{ mt: 2 }}>Estado: {checked ? 'ON' : 'OFF'}</Typography>\n </Box>\n );\n};\n";
|
|
2
|
+
export declare const SwitchWithLabelDefinition = "\nimport React, { useState } from 'react';\nimport { Switch } from './Switch';\nimport { Box } from '@mui/material';\n\nexport const SwitchWithLabelExample = () => {\n const [checked, setChecked] = useState(true);\n return (\n <Box sx={{ width: 280 }}>\n <Switch\n label=\"Notificaciones por email\"\n checked={checked}\n onChange={setChecked}\n />\n </Box>\n );\n};\n";
|
|
3
|
+
export declare const BorderedSwitchDefinition = "\nimport React, { useState } from 'react';\nimport { Switch } from './Switch';\nimport { Box } from '@mui/material';\n\nexport const BorderedSwitchExample = () => {\n const [checked, setChecked] = useState(true);\n return (\n <Box sx={{ width: 360 }}>\n <Switch\n label=\"Recibir reportes diarios\"\n checked={checked}\n onChange={setChecked}\n bordered\n />\n </Box>\n );\n};\n";
|
|
4
|
+
export declare const SwitchSizesDefinition = "\nimport React, { useState } from 'react';\nimport { Switch } from './Switch';\nimport { Box } from '@mui/material';\n\nexport const SwitchSizesExample = () => {\n const [a, setA] = useState(false);\n const [b, setB] = useState(true);\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, width: 280 }}>\n <Switch label=\"Peque\u00F1o\" size=\"small\" checked={a} onChange={setA} />\n <Switch label=\"Mediano (default)\" size=\"medium\" checked={b} onChange={setB} />\n </Box>\n );\n};\n";
|
|
5
|
+
export declare const SwitchWithErrorDefinition = "\nimport React, { useState } from 'react';\nimport { Switch } from './Switch';\nimport { Box } from '@mui/material';\n\nexport const SwitchWithErrorExample = () => {\n const [checked, setChecked] = useState(false);\n const hasError = !checked;\n return (\n <Box sx={{ width: 320 }}>\n <Switch\n label=\"Aceptar t\u00E9rminos y condiciones\"\n checked={checked}\n onChange={setChecked}\n error={hasError}\n helperText={hasError ? 'Debes aceptar los t\u00E9rminos para continuar' : ''}\n />\n </Box>\n );\n};\n";
|
|
6
|
+
export declare const DisabledSwitchDefinition = "\nimport React from 'react';\nimport { Switch } from './Switch';\nimport { Box } from '@mui/material';\n\nexport const DisabledSwitchExample = () => (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, width: 280 }}>\n <Switch label=\"Off bloqueado\" checked={false} onChange={() => {}} disabled />\n <Switch label=\"On bloqueado\" checked={true} onChange={() => {}} disabled />\n </Box>\n);\n";
|
|
7
|
+
export declare const RHFSwitchDefinition = "\nimport React from 'react';\nimport { useForm } from 'react-hook-form';\nimport { Switch } from './Switch';\nimport { Box, Button, Typography } from '@mui/material';\n\nexport const RHFSwitchExample = () => {\n const { control, handleSubmit, watch } = useForm({\n defaultValues: { darkMode: false },\n });\n const value = watch('darkMode');\n return (\n <Box sx={{ width: 320 }} component=\"form\" onSubmit={handleSubmit(console.log)}>\n <Switch\n label=\"Modo oscuro\"\n name=\"darkMode\"\n control={control}\n bordered\n />\n <Typography sx={{ mt: 2 }}>Valor en el form: {String(value)}</Typography>\n <Button type=\"submit\" sx={{ mt: 1 }}>Enviar</Button>\n </Box>\n );\n};\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface BuildSwitchSxOptions {
|
|
3
|
+
bordered: boolean;
|
|
4
|
+
borderRadius: number | string;
|
|
5
|
+
hasLabel: boolean;
|
|
6
|
+
error: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Builder de sx para Switch. Reproduce el estilo del antiguo
|
|
10
|
+
* `FormToggleInput` legacy cuando `bordered=true`: contenedor con borde,
|
|
11
|
+
* label a la izquierda y switch a la derecha (vía justify-content: space-between).
|
|
12
|
+
*
|
|
13
|
+
* Cuando `bordered=true`, el contenedor gana:
|
|
14
|
+
* - `:focus-within` → borde + shadow primario (mismo patrón que `InputGroup`).
|
|
15
|
+
* - `error=true` → borde + shadow de error (palette.error.main).
|
|
16
|
+
*
|
|
17
|
+
* El shadow es de 1px, así que no hay shift de layout — sólo se intensifica
|
|
18
|
+
* visualmente el borde sin empujar nada alrededor.
|
|
19
|
+
*
|
|
20
|
+
* Si `bordered=false`, sólo aplica un reset de margin del helper text.
|
|
21
|
+
*/
|
|
22
|
+
export declare const buildSwitchSx: ({ bordered, borderRadius, hasLabel, error, }: BuildSwitchSxOptions) => SxProps<Theme>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SwitchSize, SwitchLabelPlacement, BaseSwitchProps, RHFSwitchProps, ControlledSwitchProps, SwitchProps, } from './Switch';
|