@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
package/components/Stat/Stat.cjs
CHANGED
|
@@ -1,85 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
require(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const material = require("@mui/material");
|
|
7
|
-
const Stat = ({
|
|
8
|
-
stat,
|
|
9
|
-
stat2,
|
|
10
|
-
label,
|
|
11
|
-
color = "#1469B8",
|
|
12
|
-
chipColor = "#1469B8",
|
|
13
|
-
chips = [],
|
|
14
|
-
simple = false,
|
|
15
|
-
chip = false,
|
|
16
|
-
chipList = false,
|
|
17
|
-
children,
|
|
18
|
-
statDisplay
|
|
19
|
-
}) => {
|
|
20
|
-
const selectedTemplate = React.useMemo(() => {
|
|
21
|
-
if (simple) return "simple";
|
|
22
|
-
if (chip) return "chip";
|
|
23
|
-
if (chipList) return "chipList";
|
|
24
|
-
return "default";
|
|
25
|
-
}, [simple, chip, chipList]);
|
|
26
|
-
const renderStatDisplay = () => {
|
|
27
|
-
return statDisplay ? statDisplay(stat) : /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", children: stat });
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30
|
-
selectedTemplate === "default" && /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "stat", children: [
|
|
31
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h4", "data-testid": "selection-template-option-outlet", children: renderStatDisplay() }),
|
|
32
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "stat__label", display: "flex", alignItems: "center", gap: 1, children: [
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", children: label }),
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
-
material.Box,
|
|
36
|
-
{
|
|
37
|
-
width: 40,
|
|
38
|
-
height: 4,
|
|
39
|
-
bgcolor: color,
|
|
40
|
-
"data-testid": "stat-border",
|
|
41
|
-
borderRadius: 2
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] })
|
|
45
|
-
] }),
|
|
46
|
-
selectedTemplate === "simple" && /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", children: label }),
|
|
48
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { "data-testid": "selection-template-option-outlet", children: renderStatDisplay() }),
|
|
49
|
-
stat2 && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { children: stat2 })
|
|
50
|
-
] }),
|
|
51
|
-
selectedTemplate === "chip" && /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
52
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", children: label }),
|
|
53
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
-
material.Chip,
|
|
55
|
-
{
|
|
56
|
-
"data-testid": "chip-template-option-outlet",
|
|
57
|
-
label: renderStatDisplay(),
|
|
58
|
-
sx: {
|
|
59
|
-
backgroundColor: chipColor,
|
|
60
|
-
color: "#fff",
|
|
61
|
-
fontWeight: "bold"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
] }),
|
|
66
|
-
selectedTemplate === "chipList" && /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
67
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", children: label }),
|
|
68
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Stack, { direction: "row", spacing: 1, children: chips.map((chip2, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
-
material.Chip,
|
|
70
|
-
{
|
|
71
|
-
label: chip2.stat,
|
|
72
|
-
sx: {
|
|
73
|
-
backgroundColor: chip2.chipColor,
|
|
74
|
-
color: "#fff",
|
|
75
|
-
fontWeight: "bold"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
i
|
|
79
|
-
)) })
|
|
80
|
-
] }),
|
|
81
|
-
children
|
|
82
|
-
] });
|
|
83
|
-
};
|
|
84
|
-
exports.Stat = Stat;
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Stat = require("../../Stat-BUcFCGrz.cjs");
|
|
4
|
+
exports.Stat = Stat.Stat;
|
|
5
|
+
exports.default = Stat.Stat;
|
|
85
6
|
//# sourceMappingURL=Stat.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stat.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"Stat.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/components/Stat/Stat.js
CHANGED
|
@@ -1,85 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { Box, Typography, Stack, Chip } from "@mui/material";
|
|
5
|
-
const Stat = ({
|
|
6
|
-
stat,
|
|
7
|
-
stat2,
|
|
8
|
-
label,
|
|
9
|
-
color = "#1469B8",
|
|
10
|
-
chipColor = "#1469B8",
|
|
11
|
-
chips = [],
|
|
12
|
-
simple = false,
|
|
13
|
-
chip = false,
|
|
14
|
-
chipList = false,
|
|
15
|
-
children,
|
|
16
|
-
statDisplay
|
|
17
|
-
}) => {
|
|
18
|
-
const selectedTemplate = useMemo(() => {
|
|
19
|
-
if (simple) return "simple";
|
|
20
|
-
if (chip) return "chip";
|
|
21
|
-
if (chipList) return "chipList";
|
|
22
|
-
return "default";
|
|
23
|
-
}, [simple, chip, chipList]);
|
|
24
|
-
const renderStatDisplay = () => {
|
|
25
|
-
return statDisplay ? statDisplay(stat) : /* @__PURE__ */ jsx(Typography, { variant: "h6", children: stat });
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
-
selectedTemplate === "default" && /* @__PURE__ */ jsxs(Box, { className: "stat", children: [
|
|
29
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h4", "data-testid": "selection-template-option-outlet", children: renderStatDisplay() }),
|
|
30
|
-
/* @__PURE__ */ jsxs(Box, { className: "stat__label", display: "flex", alignItems: "center", gap: 1, children: [
|
|
31
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: label }),
|
|
32
|
-
/* @__PURE__ */ jsx(
|
|
33
|
-
Box,
|
|
34
|
-
{
|
|
35
|
-
width: 40,
|
|
36
|
-
height: 4,
|
|
37
|
-
bgcolor: color,
|
|
38
|
-
"data-testid": "stat-border",
|
|
39
|
-
borderRadius: 2
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] })
|
|
43
|
-
] }),
|
|
44
|
-
selectedTemplate === "simple" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
45
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: label }),
|
|
46
|
-
/* @__PURE__ */ jsx(Typography, { "data-testid": "selection-template-option-outlet", children: renderStatDisplay() }),
|
|
47
|
-
stat2 && /* @__PURE__ */ jsx(Typography, { children: stat2 })
|
|
48
|
-
] }),
|
|
49
|
-
selectedTemplate === "chip" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
50
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: label }),
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
52
|
-
Chip,
|
|
53
|
-
{
|
|
54
|
-
"data-testid": "chip-template-option-outlet",
|
|
55
|
-
label: renderStatDisplay(),
|
|
56
|
-
sx: {
|
|
57
|
-
backgroundColor: chipColor,
|
|
58
|
-
color: "#fff",
|
|
59
|
-
fontWeight: "bold"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] }),
|
|
64
|
-
selectedTemplate === "chipList" && /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
65
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: label }),
|
|
66
|
-
/* @__PURE__ */ jsx(Stack, { direction: "row", spacing: 1, children: chips.map((chip2, i) => /* @__PURE__ */ jsx(
|
|
67
|
-
Chip,
|
|
68
|
-
{
|
|
69
|
-
label: chip2.stat,
|
|
70
|
-
sx: {
|
|
71
|
-
backgroundColor: chip2.chipColor,
|
|
72
|
-
color: "#fff",
|
|
73
|
-
fontWeight: "bold"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
i
|
|
77
|
-
)) })
|
|
78
|
-
] }),
|
|
79
|
-
children
|
|
80
|
-
] });
|
|
81
|
-
};
|
|
1
|
+
import { S, S as S2 } from "../../Stat-C06A_izS.js";
|
|
82
2
|
export {
|
|
83
|
-
Stat
|
|
3
|
+
S as Stat,
|
|
4
|
+
S2 as default
|
|
84
5
|
};
|
|
85
6
|
//# sourceMappingURL=Stat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stat.js","sources":[
|
|
1
|
+
{"version":3,"file":"Stat.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { Stat, default } from './Stat';
|
|
2
|
+
export type { StatProps, StatChip } from './Stat';
|
package/components/Stat.d.ts
CHANGED
|
@@ -1,79 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const StatusMessage = ({
|
|
7
|
-
title,
|
|
8
|
-
description,
|
|
9
|
-
messageType = "success",
|
|
10
|
-
displayType = "alert",
|
|
11
|
-
close,
|
|
12
|
-
open = true
|
|
13
|
-
}) => {
|
|
14
|
-
const getAlertVariant = () => {
|
|
15
|
-
switch (messageType) {
|
|
16
|
-
case "success":
|
|
17
|
-
return "success";
|
|
18
|
-
case "danger":
|
|
19
|
-
return "error";
|
|
20
|
-
case "warning":
|
|
21
|
-
return "warning";
|
|
22
|
-
default:
|
|
23
|
-
return "info";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const getIcon = () => {
|
|
27
|
-
switch (messageType) {
|
|
28
|
-
case "success":
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.CheckCircleOutline, { sx: { fontSize: "64px", color: "success.main" } });
|
|
30
|
-
case "danger":
|
|
31
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ErrorOutline, { sx: { fontSize: "64px", color: "error.main" } });
|
|
32
|
-
case "warning":
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.WarningAmber, { sx: { fontSize: "64px", color: "warning.main" } });
|
|
34
|
-
default:
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const alertVariant = getAlertVariant();
|
|
39
|
-
if (!description) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: displayType === "modal" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43
|
-
material.Dialog,
|
|
44
|
-
{
|
|
45
|
-
open,
|
|
46
|
-
onClose: close,
|
|
47
|
-
"aria-labelledby": "message-dialog-title",
|
|
48
|
-
maxWidth: "md",
|
|
49
|
-
PaperProps: {
|
|
50
|
-
sx: {
|
|
51
|
-
borderRadius: "16px",
|
|
52
|
-
p: 2
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogContent, { sx: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", p: 4, gap: 2 }, children: [
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { mb: 2 }, children: getIcon() }),
|
|
58
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h4", component: "h2", sx: { fontWeight: "bold" }, children: title || "" }),
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", color: "text.secondary", children: description })
|
|
60
|
-
] }),
|
|
61
|
-
close && /* @__PURE__ */ jsxRuntime.jsx(material.DialogActions, { sx: { justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.Button, { onClick: close, variant: "contained", color: alertVariant, children: "Aceptar" }) })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
65
|
-
material.Alert,
|
|
66
|
-
{
|
|
67
|
-
severity: alertVariant,
|
|
68
|
-
sx: { mb: 2, mt: 2 },
|
|
69
|
-
onClose: close,
|
|
70
|
-
action: close && /* @__PURE__ */ jsxRuntime.jsx(material.Button, { onClick: close, size: "small", color: "inherit", children: "Cerrar" }),
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", sx: { fontWeight: "bold" }, children: title }),
|
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", sx: { mt: 1 }, children: description })
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
) });
|
|
77
|
-
};
|
|
78
|
-
exports.StatusMessage = StatusMessage;
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const StatusMessage = require("../../StatusMessage-B3nXpuRl.cjs");
|
|
4
|
+
exports.StatusMessage = StatusMessage.StatusMessage;
|
|
5
|
+
exports.default = StatusMessage.StatusMessage;
|
|
79
6
|
//# sourceMappingURL=StatusMessage.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessage.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"StatusMessage.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
* `StatusMessage` es un componente de React que muestra mensajes de éxito, error o advertencia
|
|
3
|
-
* en un modal o una alerta, utilizando el sistema de diseño de Material-UI.
|
|
4
|
-
*
|
|
5
|
-
* El componente puede mostrar alertas con estilos específicos o un modal personalizable
|
|
6
|
-
* usando `Dialog` y otros componentes de MUI. También puede incluir una función opcional
|
|
7
|
-
* para cerrar el mensaje.
|
|
8
|
-
*
|
|
9
|
-
* @param {StatusMessageProps} props - Las propiedades del componente.
|
|
10
|
-
* @param {string | undefined} props.title - Título del mensaje que se muestra en el modal o alerta.
|
|
11
|
-
* @param {string} [props.description] - Descripción o contenido detallado del mensaje.
|
|
12
|
-
* @param {'success' | 'danger' | 'warning'} [props.messageType='success'] - Tipo de mensaje que determina el estilo visual. 'danger' se mapea a 'error' de MUI.
|
|
13
|
-
* @param {'alert' | 'modal'} [props.displayType='alert'] - Determina si el mensaje se muestra como alerta o modal.
|
|
14
|
-
* @param {() => void} [props.close] - Función opcional para ejecutar al cerrar el mensaje.
|
|
15
|
-
* @returns {React.FC<StatusMessageProps>} Un componente funcional de React que muestra mensajes personalizados.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Ejemplo de uso como una alerta:
|
|
19
|
-
* <StatusMessage
|
|
20
|
-
* title="Operación Exitosa"
|
|
21
|
-
* description="La operación se ha completado correctamente."
|
|
22
|
-
* messageType="success"
|
|
23
|
-
* displayType="alert"
|
|
24
|
-
* />
|
|
25
|
-
*
|
|
26
|
-
* // Ejemplo de uso como un modal:
|
|
27
|
-
* <StatusMessage
|
|
28
|
-
* title="Advertencia"
|
|
29
|
-
* description="Se ha producido un error inesperado."
|
|
30
|
-
* messageType="danger"
|
|
31
|
-
* displayType="modal"
|
|
32
|
-
* close={() => console.log('Modal cerrado')}
|
|
33
|
-
* />
|
|
34
|
-
*/
|
|
1
|
+
import { FC } from 'react';
|
|
35
2
|
export interface StatusMessageProps {
|
|
36
|
-
|
|
3
|
+
/** Título del mensaje. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Descripción/contenido detallado. Requerido para que el componente renderice. */
|
|
37
6
|
description?: string;
|
|
7
|
+
/** Tipo de mensaje (controla color + icono). `danger` mapea a `error` de MUI. */
|
|
38
8
|
messageType?: 'success' | 'danger' | 'warning';
|
|
9
|
+
/** Forma de presentación: alerta inline o modal. Default: `'alert'`. */
|
|
39
10
|
displayType?: 'alert' | 'modal';
|
|
11
|
+
/** Callback al cerrar. Si se omite, no se muestra botón de cerrar. */
|
|
40
12
|
close?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Controla visibilidad. Si se omite, el componente maneja su propio
|
|
15
|
+
* state (se oculta solo al llamar `close`). Si se pasa, queda controlled
|
|
16
|
+
* y el consumer es responsable de actualizarlo.
|
|
17
|
+
*/
|
|
41
18
|
open?: boolean;
|
|
42
19
|
}
|
|
43
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Mensaje de éxito / error / advertencia en forma de alerta inline o modal.
|
|
22
|
+
*
|
|
23
|
+
* - **Uncontrolled**: sin pasar `open`, el componente maneja su propia
|
|
24
|
+
* visibilidad. Al llamar `close`, se oculta automáticamente.
|
|
25
|
+
* - **Controlled**: pasando `open`, el consumer decide cuándo mostrar/ocultar.
|
|
26
|
+
*/
|
|
27
|
+
export declare const StatusMessage: FC<StatusMessageProps>;
|
|
44
28
|
export default StatusMessage;
|
|
@@ -1,79 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dialog, DialogContent, Box, Typography, DialogActions, Button, Alert } from "@mui/material";
|
|
3
|
-
import { WarningAmber, ErrorOutline, CheckCircleOutline } from "@mui/icons-material";
|
|
4
|
-
const StatusMessage = ({
|
|
5
|
-
title,
|
|
6
|
-
description,
|
|
7
|
-
messageType = "success",
|
|
8
|
-
displayType = "alert",
|
|
9
|
-
close,
|
|
10
|
-
open = true
|
|
11
|
-
}) => {
|
|
12
|
-
const getAlertVariant = () => {
|
|
13
|
-
switch (messageType) {
|
|
14
|
-
case "success":
|
|
15
|
-
return "success";
|
|
16
|
-
case "danger":
|
|
17
|
-
return "error";
|
|
18
|
-
case "warning":
|
|
19
|
-
return "warning";
|
|
20
|
-
default:
|
|
21
|
-
return "info";
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const getIcon = () => {
|
|
25
|
-
switch (messageType) {
|
|
26
|
-
case "success":
|
|
27
|
-
return /* @__PURE__ */ jsx(CheckCircleOutline, { sx: { fontSize: "64px", color: "success.main" } });
|
|
28
|
-
case "danger":
|
|
29
|
-
return /* @__PURE__ */ jsx(ErrorOutline, { sx: { fontSize: "64px", color: "error.main" } });
|
|
30
|
-
case "warning":
|
|
31
|
-
return /* @__PURE__ */ jsx(WarningAmber, { sx: { fontSize: "64px", color: "warning.main" } });
|
|
32
|
-
default:
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const alertVariant = getAlertVariant();
|
|
37
|
-
if (!description) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ jsx(Fragment, { children: displayType === "modal" ? /* @__PURE__ */ jsxs(
|
|
41
|
-
Dialog,
|
|
42
|
-
{
|
|
43
|
-
open,
|
|
44
|
-
onClose: close,
|
|
45
|
-
"aria-labelledby": "message-dialog-title",
|
|
46
|
-
maxWidth: "md",
|
|
47
|
-
PaperProps: {
|
|
48
|
-
sx: {
|
|
49
|
-
borderRadius: "16px",
|
|
50
|
-
p: 2
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsxs(DialogContent, { sx: { display: "flex", flexDirection: "column", alignItems: "center", textAlign: "center", p: 4, gap: 2 }, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Box, { sx: { mb: 2 }, children: getIcon() }),
|
|
56
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h4", component: "h2", sx: { fontWeight: "bold" }, children: title || "" }),
|
|
57
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", color: "text.secondary", children: description })
|
|
58
|
-
] }),
|
|
59
|
-
close && /* @__PURE__ */ jsx(DialogActions, { sx: { justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx(Button, { onClick: close, variant: "contained", color: alertVariant, children: "Aceptar" }) })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ jsxs(
|
|
63
|
-
Alert,
|
|
64
|
-
{
|
|
65
|
-
severity: alertVariant,
|
|
66
|
-
sx: { mb: 2, mt: 2 },
|
|
67
|
-
onClose: close,
|
|
68
|
-
action: close && /* @__PURE__ */ jsx(Button, { onClick: close, size: "small", color: "inherit", children: "Cerrar" }),
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", sx: { fontWeight: "bold" }, children: title }),
|
|
71
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { mt: 1 }, children: description })
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
) });
|
|
75
|
-
};
|
|
1
|
+
import { S, S as S2 } from "../../StatusMessage-D0WgSBx7.js";
|
|
76
2
|
export {
|
|
77
|
-
StatusMessage
|
|
3
|
+
S as StatusMessage,
|
|
4
|
+
S2 as default
|
|
78
5
|
};
|
|
79
6
|
//# sourceMappingURL=StatusMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessage.js","sources":[
|
|
1
|
+
{"version":3,"file":"StatusMessage.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { StatusMessage, default } from './StatusMessage';
|
|
2
|
+
export type { StatusMessageProps } from './StatusMessage';
|
|
@@ -1,49 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sx,
|
|
11
|
-
currentStep: currentStepProp
|
|
12
|
-
}) => {
|
|
13
|
-
const wizard = useWizard.useWizard();
|
|
14
|
-
const currentStep = currentStepProp !== void 0 ? currentStepProp : wizard.totalSteps > 0 ? wizard.currentStep : 0;
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx, children: [
|
|
16
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Stepper, { activeStep: currentStep, orientation, alternativeLabel: alternateLabel, children: children.map((child, idx) => {
|
|
17
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx(material.Step, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19
|
-
material.StepLabel,
|
|
20
|
-
{
|
|
21
|
-
sx: {
|
|
22
|
-
pointerEvents: "none",
|
|
23
|
-
"& .MuiStepIcon-root": {
|
|
24
|
-
color: dotColor
|
|
25
|
-
},
|
|
26
|
-
"& .MuiStepIcon-active": {
|
|
27
|
-
color: activeDotColor
|
|
28
|
-
},
|
|
29
|
-
"& .MuiStepIcon-completed": {
|
|
30
|
-
color: completedDotColor
|
|
31
|
-
},
|
|
32
|
-
"& .MuiStepIcon-text": {
|
|
33
|
-
fill: iconTextColor
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
children: label
|
|
37
|
-
}
|
|
38
|
-
) }, idx);
|
|
39
|
-
}) }),
|
|
40
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { mt: 2, children: children.map(
|
|
41
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: child.props.children }, idx) : null
|
|
42
|
-
) })
|
|
43
|
-
] });
|
|
44
|
-
};
|
|
45
|
-
const Step = (_) => null;
|
|
46
|
-
Step.displayName = "Step";
|
|
47
|
-
exports.Step = Step;
|
|
48
|
-
exports.Stepper = Stepper;
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Step = require("../../Step-Nd7SJbRZ.cjs");
|
|
4
|
+
exports.Step = Step.Step;
|
|
5
|
+
exports.Stepper = Step.Stepper;
|
|
6
|
+
exports.StepperContext = Step.StepperContext;
|
|
7
|
+
exports.StepperProvider = Step.StepperProvider;
|
|
8
|
+
exports.default = Step.Stepper;
|
|
9
|
+
exports.useStepper = Step.useStepper;
|
|
49
10
|
//# sourceMappingURL=Stepper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"Stepper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children:
|
|
5
|
-
orientation?:
|
|
6
|
-
sx?: object;
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface StepperProps {
|
|
3
|
+
/** Uno o varios `<Step>`. Children que no sean `<Step>` se ignoran. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
orientation?: 'horizontal' | 'vertical';
|
|
7
6
|
alternateLabel?: boolean;
|
|
8
7
|
/**
|
|
9
8
|
* Índice 0-based del paso activo. Si no se provee, el Stepper intenta
|
|
10
|
-
* leerlo del `
|
|
9
|
+
* leerlo del `StepperContext` (si está dentro de un `<StepperProvider>`).
|
|
11
10
|
* Si tampoco hay provider, el default es 0.
|
|
12
11
|
*/
|
|
13
12
|
currentStep?: number;
|
|
13
|
+
keepMounted?: boolean;
|
|
14
|
+
sx?: object;
|
|
14
15
|
}
|
|
15
|
-
export declare const Stepper:
|
|
16
|
+
export declare const Stepper: FC<StepperProps>;
|
|
16
17
|
export default Stepper;
|