@soyfri/shared-library 2.0.0-beta.9 → 2.0.0-beta8
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/Autocomplete-BA-cGASd.js +316 -0
- package/Autocomplete-BA-cGASd.js.map +1 -0
- package/Autocomplete-C2x-lBvZ.cjs +315 -0
- package/Autocomplete-C2x-lBvZ.cjs.map +1 -0
- package/Avatar-9L7YMxya.cjs +162 -0
- package/Avatar-9L7YMxya.cjs.map +1 -0
- package/Avatar-BJTr-PBd.js +163 -0
- package/Avatar-BJTr-PBd.js.map +1 -0
- package/Card-DG_crfkK.cjs +185 -0
- package/Card-DG_crfkK.cjs.map +1 -0
- package/Card-Ug-ttVSh.js +186 -0
- package/Card-Ug-ttVSh.js.map +1 -0
- package/Chip-OPYQ1uQ_.js +74 -0
- package/Chip-OPYQ1uQ_.js.map +1 -0
- package/Chip-qoJLDiva.cjs +73 -0
- package/Chip-qoJLDiva.cjs.map +1 -0
- package/DatePicker-8f_9bwhS.js +202 -0
- package/DatePicker-8f_9bwhS.js.map +1 -0
- package/DatePicker-DLSfkgGA.cjs +201 -0
- package/DatePicker-DLSfkgGA.cjs.map +1 -0
- package/DateRangePicker-BVpeJCHI.js +76 -0
- package/DateRangePicker-BVpeJCHI.js.map +1 -0
- package/DateRangePicker-B_hKQhbj.cjs +75 -0
- package/DateRangePicker-B_hKQhbj.cjs.map +1 -0
- package/DateTimePicker-CWNW09-O.cjs +220 -0
- package/DateTimePicker-CWNW09-O.cjs.map +1 -0
- package/DateTimePicker-D4L9GAod.js +221 -0
- package/DateTimePicker-D4L9GAod.js.map +1 -0
- package/Input-Cp911l23.js +174 -0
- package/Input-Cp911l23.js.map +1 -0
- package/Input-DI0jfq5X.cjs +173 -0
- package/Input-DI0jfq5X.cjs.map +1 -0
- package/Modal-Bm_HH9cv.cjs +319 -0
- package/Modal-Bm_HH9cv.cjs.map +1 -0
- package/Modal-Bnz6d9m9.js +320 -0
- package/Modal-Bnz6d9m9.js.map +1 -0
- package/RadioGroup-CxqDHap1.cjs +200 -0
- package/RadioGroup-CxqDHap1.cjs.map +1 -0
- package/RadioGroup-DMi9FvMP.js +201 -0
- package/RadioGroup-DMi9FvMP.js.map +1 -0
- package/Select-3CBOfM2H.js +447 -0
- package/Select-3CBOfM2H.js.map +1 -0
- package/Select-Bku4f4f8.cjs +446 -0
- package/Select-Bku4f4f8.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-C5B6oGZ_.cjs +78 -0
- package/StatusMessage-C5B6oGZ_.cjs.map +1 -0
- package/StatusMessage-D1GlfQdz.js +79 -0
- package/StatusMessage-D1GlfQdz.js.map +1 -0
- package/Step-Dq0N72YB.js +49 -0
- package/Step-Dq0N72YB.js.map +1 -0
- package/Step-a8U8O-91.cjs +48 -0
- package/Step-a8U8O-91.cjs.map +1 -0
- package/Switch-BIeobv6i.cjs +179 -0
- package/Switch-BIeobv6i.cjs.map +1 -0
- package/Switch-DQEOxM2R.js +180 -0
- package/Switch-DQEOxM2R.js.map +1 -0
- package/Tab-Co31KY2k.cjs +95 -0
- package/Tab-Co31KY2k.cjs.map +1 -0
- package/Tab-DiK62gRz.js +96 -0
- package/Tab-DiK62gRz.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/AppBar/AppBar.cjs +1 -1
- package/components/AppBar/AppBar.js +1 -1
- package/components/Autocomplete/Autocomplete.cjs +4 -311
- package/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/components/Autocomplete/Autocomplete.js +4 -311
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Avatar/Avatar.cjs +2 -160
- package/components/Avatar/Avatar.cjs.map +1 -1
- package/components/Avatar/Avatar.js +2 -160
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Card/Card.cjs +7 -184
- package/components/Card/Card.cjs.map +1 -1
- package/components/Card/Card.js +7 -184
- package/components/Card/Card.js.map +1 -1
- package/components/Chip/Chip.cjs +2 -71
- package/components/Chip/Chip.cjs.map +1 -1
- package/components/Chip/Chip.js +2 -71
- package/components/Chip/Chip.js.map +1 -1
- 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.js +3 -200
- package/components/DatePicker/DatePicker.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.cjs +2 -73
- package/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/components/DateRangePicker/DateRangePicker.js +2 -73
- package/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/components/DateTimePicker/DateTimePicker.cjs +3 -219
- package/components/DateTimePicker/DateTimePicker.cjs.map +1 -1
- package/components/DateTimePicker/DateTimePicker.js +3 -219
- package/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/components/Drawer/Drawer.cjs +1 -1
- package/components/Drawer/Drawer.js +1 -1
- package/components/Input/Input.cjs +3 -172
- package/components/Input/Input.cjs.map +1 -1
- package/components/Input/Input.js +3 -172
- package/components/Input/Input.js.map +1 -1
- package/components/Modal/Modal.cjs +7 -317
- package/components/Modal/Modal.cjs.map +1 -1
- package/components/Modal/Modal.js +6 -316
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/index.d.ts +2 -1
- package/components/Modal.d.ts +4 -0
- package/components/RadioGroup/RadioGroup.cjs +3 -199
- package/components/RadioGroup/RadioGroup.cjs.map +1 -1
- package/components/RadioGroup/RadioGroup.js +3 -199
- package/components/RadioGroup/RadioGroup.js.map +1 -1
- package/components/ScrollTopButton/ScrollTopButton.cjs +1 -1
- package/components/ScrollTopButton/ScrollTopButton.js +1 -1
- package/components/Select/Select.cjs +4 -445
- package/components/Select/Select.cjs.map +1 -1
- package/components/Select/Select.js +4 -445
- package/components/Select/Select.js.map +1 -1
- package/components/Stat/Stat.cjs +2 -81
- package/components/Stat/Stat.cjs.map +1 -1
- package/components/Stat/Stat.js +2 -81
- package/components/Stat/Stat.js.map +1 -1
- package/components/StatusMessage/StatusMessage.cjs +4 -77
- package/components/StatusMessage/StatusMessage.cjs.map +1 -1
- package/components/StatusMessage/StatusMessage.d.ts +1 -1
- 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 +3 -89
- package/components/Stepper/Stepper.cjs.map +1 -1
- package/components/Stepper/Stepper.d.ts +0 -12
- package/components/Stepper/Stepper.js +3 -89
- package/components/Stepper/Stepper.js.map +1 -1
- package/components/Switch/Switch.cjs +3 -178
- package/components/Switch/Switch.cjs.map +1 -1
- package/components/Switch/Switch.js +3 -178
- package/components/Switch/Switch.js.map +1 -1
- 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 +3 -93
- package/components/Tabs/Tabs.cjs.map +1 -1
- package/components/Tabs/Tabs.js +3 -93
- package/components/Tabs/Tabs.js.map +1 -1
- package/hooks/Wizard/WizardContext.d.ts +2 -2
- package/index.cjs +46 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +30 -0
- package/index.js +46 -1
- package/index.js.map +1 -1
- package/package.json +5 -3
- 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/useWizard-CWdIxZzX.cjs.map +1 -1
- package/useWizard-CWq--C3o.js.map +1 -1
package/components/Stat/Stat.js
CHANGED
|
@@ -1,85 +1,6 @@
|
|
|
1
1
|
import '../../styles.css';/* empty css */
|
|
2
|
-
import {
|
|
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
|
-
};
|
|
2
|
+
import { S } from "../../Stat-C06A_izS.js";
|
|
82
3
|
export {
|
|
83
|
-
Stat
|
|
4
|
+
S as Stat
|
|
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,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-C5B6oGZ_.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":";;;;;"}
|
|
@@ -40,5 +40,5 @@ export interface StatusMessageProps {
|
|
|
40
40
|
close?: () => void;
|
|
41
41
|
open?: boolean;
|
|
42
42
|
}
|
|
43
|
-
declare const StatusMessage: ({ title, description, messageType, displayType, close, open, }: StatusMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
export declare const StatusMessage: ({ title, description, messageType, displayType, close, open, }: StatusMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
44
44
|
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-D1GlfQdz.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,92 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const Stepper = ({
|
|
26
|
-
children,
|
|
27
|
-
orientation = "horizontal",
|
|
28
|
-
alternateLabel = false,
|
|
29
|
-
responsive = true,
|
|
30
|
-
mobileBreakpoint = "sm",
|
|
31
|
-
sx,
|
|
32
|
-
currentStep: currentStepProp
|
|
33
|
-
}) => {
|
|
34
|
-
const theme = material.useTheme();
|
|
35
|
-
const isMobile = material.useMediaQuery(theme.breakpoints.down(mobileBreakpoint));
|
|
36
|
-
const mobileAdapt = responsive && isMobile && orientation === "horizontal";
|
|
37
|
-
const effectiveOrientation = mobileAdapt && children.length > 3 ? "vertical" : orientation;
|
|
38
|
-
const hideLabelsOnMobile = mobileAdapt && children.length <= 3;
|
|
39
|
-
const effectiveAlternateLabel = alternateLabel && effectiveOrientation === "horizontal";
|
|
40
|
-
const wizard = useWizard.useWizard();
|
|
41
|
-
const currentStep = currentStepProp !== void 0 ? currentStepProp : wizard.totalSteps > 0 ? wizard.currentStep : 0;
|
|
42
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: __spreadValues({ width: "100%", overflowX: "hidden" }, sx), children: [
|
|
43
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
-
material.Stepper,
|
|
45
|
-
{
|
|
46
|
-
activeStep: currentStep,
|
|
47
|
-
orientation: effectiveOrientation,
|
|
48
|
-
alternativeLabel: effectiveAlternateLabel,
|
|
49
|
-
sx: __spreadValues({}, effectiveOrientation === "horizontal" && {
|
|
50
|
-
flexWrap: "wrap",
|
|
51
|
-
rowGap: 1,
|
|
52
|
-
"& .MuiStepLabel-label": { textAlign: "center" }
|
|
53
|
-
}),
|
|
54
|
-
children: children.map((child, idx) => {
|
|
55
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
56
|
-
return /* @__PURE__ */ jsxRuntime.jsx(material.Step, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
-
material.StepLabel,
|
|
58
|
-
{
|
|
59
|
-
sx: __spreadProps(__spreadValues({
|
|
60
|
-
pointerEvents: "none"
|
|
61
|
-
}, hideLabelsOnMobile && {
|
|
62
|
-
"& .MuiStepLabel-labelContainer": { display: "none" }
|
|
63
|
-
}), {
|
|
64
|
-
"& .MuiStepIcon-root": {
|
|
65
|
-
color: dotColor
|
|
66
|
-
},
|
|
67
|
-
"& .MuiStepIcon-active": {
|
|
68
|
-
color: activeDotColor
|
|
69
|
-
},
|
|
70
|
-
"& .MuiStepIcon-completed": {
|
|
71
|
-
color: completedDotColor
|
|
72
|
-
},
|
|
73
|
-
"& .MuiStepIcon-text": {
|
|
74
|
-
fill: iconTextColor
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
children: label
|
|
78
|
-
}
|
|
79
|
-
) }, idx);
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { mt: 2, children: children.map(
|
|
84
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: child.props.children }, idx) : null
|
|
85
|
-
) })
|
|
86
|
-
] });
|
|
87
|
-
};
|
|
88
|
-
const Step = (_) => null;
|
|
89
|
-
Step.displayName = "Step";
|
|
90
|
-
exports.Step = Step;
|
|
91
|
-
exports.Stepper = Stepper;
|
|
3
|
+
const Step = require("../../Step-a8U8O-91.cjs");
|
|
4
|
+
exports.Step = Step.Step;
|
|
5
|
+
exports.Stepper = Step.Stepper;
|
|
92
6
|
//# sourceMappingURL=Stepper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"Stepper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React, ReactElement } from 'react';
|
|
2
|
-
import { Breakpoint } from '@mui/material';
|
|
3
2
|
import { StepProps } from './Step';
|
|
4
3
|
interface MyStepperProps {
|
|
5
4
|
children: ReactElement<StepProps>[];
|
|
@@ -12,17 +11,6 @@ interface MyStepperProps {
|
|
|
12
11
|
* Si tampoco hay provider, el default es 0.
|
|
13
12
|
*/
|
|
14
13
|
currentStep?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Cuando es true (default), en pantallas más angostas que `mobileBreakpoint`
|
|
17
|
-
* el stepper horizontal automáticamente:
|
|
18
|
-
* - cambia a orientación vertical si hay >3 steps, o
|
|
19
|
-
* - oculta los labels (solo dots) si hay ≤3 steps,
|
|
20
|
-
* para evitar que se desborde del contenedor.
|
|
21
|
-
* Si pasas `orientation="vertical"` explícito, no se altera.
|
|
22
|
-
*/
|
|
23
|
-
responsive?: boolean;
|
|
24
|
-
/** Breakpoint debajo del cual aplica el modo mobile. Default: "sm". */
|
|
25
|
-
mobileBreakpoint?: Breakpoint;
|
|
26
14
|
}
|
|
27
15
|
export declare const Stepper: React.FC<MyStepperProps>;
|
|
28
16
|
export default Stepper;
|
|
@@ -1,92 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
21
|
-
import { useTheme, useMediaQuery, Box, Stepper as Stepper$1, Step as Step$1, StepLabel } from "@mui/material";
|
|
22
|
-
import { u as useWizard } from "../../useWizard-CWq--C3o.js";
|
|
23
|
-
const Stepper = ({
|
|
24
|
-
children,
|
|
25
|
-
orientation = "horizontal",
|
|
26
|
-
alternateLabel = false,
|
|
27
|
-
responsive = true,
|
|
28
|
-
mobileBreakpoint = "sm",
|
|
29
|
-
sx,
|
|
30
|
-
currentStep: currentStepProp
|
|
31
|
-
}) => {
|
|
32
|
-
const theme = useTheme();
|
|
33
|
-
const isMobile = useMediaQuery(theme.breakpoints.down(mobileBreakpoint));
|
|
34
|
-
const mobileAdapt = responsive && isMobile && orientation === "horizontal";
|
|
35
|
-
const effectiveOrientation = mobileAdapt && children.length > 3 ? "vertical" : orientation;
|
|
36
|
-
const hideLabelsOnMobile = mobileAdapt && children.length <= 3;
|
|
37
|
-
const effectiveAlternateLabel = alternateLabel && effectiveOrientation === "horizontal";
|
|
38
|
-
const wizard = useWizard();
|
|
39
|
-
const currentStep = currentStepProp !== void 0 ? currentStepProp : wizard.totalSteps > 0 ? wizard.currentStep : 0;
|
|
40
|
-
return /* @__PURE__ */ jsxs(Box, { sx: __spreadValues({ width: "100%", overflowX: "hidden" }, sx), children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
Stepper$1,
|
|
43
|
-
{
|
|
44
|
-
activeStep: currentStep,
|
|
45
|
-
orientation: effectiveOrientation,
|
|
46
|
-
alternativeLabel: effectiveAlternateLabel,
|
|
47
|
-
sx: __spreadValues({}, effectiveOrientation === "horizontal" && {
|
|
48
|
-
flexWrap: "wrap",
|
|
49
|
-
rowGap: 1,
|
|
50
|
-
"& .MuiStepLabel-label": { textAlign: "center" }
|
|
51
|
-
}),
|
|
52
|
-
children: children.map((child, idx) => {
|
|
53
|
-
const { label, completed, disabled, className, sx: stepSx, dotColor, activeDotColor, completedDotColor, iconTextColor } = child.props;
|
|
54
|
-
return /* @__PURE__ */ jsx(Step$1, { completed, disabled, className, sx: stepSx, children: /* @__PURE__ */ jsx(
|
|
55
|
-
StepLabel,
|
|
56
|
-
{
|
|
57
|
-
sx: __spreadProps(__spreadValues({
|
|
58
|
-
pointerEvents: "none"
|
|
59
|
-
}, hideLabelsOnMobile && {
|
|
60
|
-
"& .MuiStepLabel-labelContainer": { display: "none" }
|
|
61
|
-
}), {
|
|
62
|
-
"& .MuiStepIcon-root": {
|
|
63
|
-
color: dotColor
|
|
64
|
-
},
|
|
65
|
-
"& .MuiStepIcon-active": {
|
|
66
|
-
color: activeDotColor
|
|
67
|
-
},
|
|
68
|
-
"& .MuiStepIcon-completed": {
|
|
69
|
-
color: completedDotColor
|
|
70
|
-
},
|
|
71
|
-
"& .MuiStepIcon-text": {
|
|
72
|
-
fill: iconTextColor
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
children: label
|
|
76
|
-
}
|
|
77
|
-
) }, idx);
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(Box, { mt: 2, children: children.map(
|
|
82
|
-
(child, idx) => idx === currentStep ? /* @__PURE__ */ jsx(Box, { children: child.props.children }, idx) : null
|
|
83
|
-
) })
|
|
84
|
-
] });
|
|
85
|
-
};
|
|
86
|
-
const Step = (_) => null;
|
|
87
|
-
Step.displayName = "Step";
|
|
1
|
+
import { a, S } from "../../Step-Dq0N72YB.js";
|
|
88
2
|
export {
|
|
89
|
-
Step,
|
|
90
|
-
Stepper
|
|
3
|
+
a as Step,
|
|
4
|
+
S as Stepper
|
|
91
5
|
};
|
|
92
6
|
//# sourceMappingURL=Stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":[
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|