prometeo-design-system 3.0.2 → 3.0.4
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/dist/Avatar.es.js +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BB-IP1MR.js → CardProfile-DUBuThnz.js} +13 -13
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +5 -5
- package/dist/DatePicker-CzpFYO6L.js +3568 -0
- package/dist/DatePicker.es.js +1 -1
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +6 -6
- package/dist/FAButton.es.js +2 -2
- package/dist/Header.es.js +1 -1
- package/dist/{HelperComponent-D_Cqdf1J.js → HelperComponent-E_C-E8Iu.js} +8 -8
- package/dist/Icons/Home.d.ts +2 -0
- package/dist/Icons/Home.es.js +7 -0
- package/dist/Icons-BJgYCS_W.js +979 -0
- package/dist/Icons.es.js +5 -976
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-CjaJ0UCN.js → ImageGallery-DqUwjAKn.js} +35 -35
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-CLsH2Ea0.js → Input-ZXkhyFlL.js} +3 -3
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +35 -35
- package/dist/{LayoutGeneric-B6E-yOYJ.js → LayoutGeneric-CbaoatQB.js} +1 -1
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +2 -2
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +44 -44
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/RadioButton.es.js +2 -2
- package/dist/RecurrentDatePicker.es.js +5 -5
- package/dist/RecurrentDatePickerRRule.es.js +2 -2
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/{Select-Co4rzd96.js → Select-DgUVs2c6.js} +46 -46
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +2 -2
- package/dist/Skeleton.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +2 -2
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +1 -1
- package/dist/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Toast.es.js +23 -23
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +2 -2
- package/dist/exports/Icons.d.ts +4 -2
- package/dist/{jsx-runtime-ByW6EXIE.js → jsx-runtime-DKDX3adD.js} +94 -96
- package/dist/prometeo-design-system.es.js +48 -48
- package/dist/styles.css +1 -1
- package/package.json +298 -294
- package/src/styles/app.css +1 -1
- package/src/styles/base.css +1332 -1332
- package/src/styles/fonts.css +45 -45
- package/src/styles/palette.css +83 -83
- package/dist/DatePicker-odNBd49H.js +0 -3628
package/dist/OtpInput.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as p } from "./jsx-runtime-
|
|
2
|
-
import {
|
|
1
|
+
import { j as p } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { C as Re, E as De } from "./Icons-BJgYCS_W.js";
|
|
3
3
|
import { c as $ } from "./cn-B6yFEsav.js";
|
|
4
4
|
import * as n from "react";
|
|
5
5
|
import ge, { memo as Oe } from "react";
|
|
@@ -28,8 +28,8 @@ function Ge({ containerRef: t, inputRef: a, pushPasswordManagerStrategy: r, isFo
|
|
|
28
28
|
let [M, d] = n.useState(!1), [D, k] = n.useState(!1), [O, B] = n.useState(!1), _ = n.useMemo(() => r === "none" ? !1 : (r === "increase-width" || r === "experimental-no-flickering") && M && D, [M, D, r]), x = n.useCallback(() => {
|
|
29
29
|
let f = t.current, v = a.current;
|
|
30
30
|
if (!f || !v || O || r === "none") return;
|
|
31
|
-
let m = f, b = m.getBoundingClientRect().left + m.offsetWidth, w = m.getBoundingClientRect().top + m.offsetHeight / 2, o = b - Le,
|
|
32
|
-
document.querySelectorAll(ze).length === 0 && document.elementFromPoint(o,
|
|
31
|
+
let m = f, b = m.getBoundingClientRect().left + m.offsetWidth, w = m.getBoundingClientRect().top + m.offsetHeight / 2, o = b - Le, C = w;
|
|
32
|
+
document.querySelectorAll(ze).length === 0 && document.elementFromPoint(o, C) === f || (d(!0), B(!0));
|
|
33
33
|
}, [t, a, O, r]);
|
|
34
34
|
return n.useEffect(() => {
|
|
35
35
|
let f = t.current;
|
|
@@ -55,10 +55,10 @@ function Ge({ containerRef: t, inputRef: a, pushPasswordManagerStrategy: r, isFo
|
|
|
55
55
|
}, [a, u, r, x]), { hasPWMBadge: M, willPushPWMBadge: _, PWM_BADGE_SPACE_WIDTH: $e };
|
|
56
56
|
}
|
|
57
57
|
var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
58
|
-
var r = t, { value: u, onChange: M, maxLength: d, textAlign: D = "left", pattern: k, placeholder: O, inputMode: B = "numeric", onComplete: _, pushPasswordManagerStrategy: x = "increase-width", pasteTransformer: f, containerClassName: v, noScriptCSSFallback: m = qe, render: b, children: w } = r, o = Ie(r, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]),
|
|
59
|
-
let [te, ne] = n.useState(typeof o.defaultValue == "string" ? o.defaultValue : ""),
|
|
58
|
+
var r = t, { value: u, onChange: M, maxLength: d, textAlign: D = "left", pattern: k, placeholder: O, inputMode: B = "numeric", onComplete: _, pushPasswordManagerStrategy: x = "increase-width", pasteTransformer: f, containerClassName: v, noScriptCSSFallback: m = qe, render: b, children: w } = r, o = Ie(r, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), C, N, U, T, V;
|
|
59
|
+
let [te, ne] = n.useState(typeof o.defaultValue == "string" ? o.defaultValue : ""), s = u ?? te, E = He(s), q = n.useCallback((e) => {
|
|
60
60
|
M?.(e), ne(e);
|
|
61
|
-
}, [M]),
|
|
61
|
+
}, [M]), P = n.useMemo(() => k ? typeof k == "string" ? new RegExp(k) : k : null, [k]), c = n.useRef(null), le = n.useRef(null), ae = n.useRef({ value: s, onChange: q, isIOS: typeof window < "u" && ((N = (C = window?.CSS) == null ? void 0 : C.supports) == null ? void 0 : N.call(C, "-webkit-touch-callout", "none")) }), X = n.useRef({ prev: [(U = c.current) == null ? void 0 : U.selectionStart, (T = c.current) == null ? void 0 : T.selectionEnd, (V = c.current) == null ? void 0 : V.selectionDirection] });
|
|
62
62
|
n.useImperativeHandle(a, () => c.current, []), n.useEffect(() => {
|
|
63
63
|
let e = c.current, l = le.current;
|
|
64
64
|
if (!e || !l) return;
|
|
@@ -68,33 +68,33 @@ var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
|
68
68
|
J(null), K(null);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
if (F.length !== 0 &&
|
|
73
|
-
let Me =
|
|
71
|
+
let i = e.selectionStart, g = e.selectionEnd, Y = e.selectionDirection, j = e.maxLength, F = e.value, R = X.current.prev, W = -1, A = -1, H;
|
|
72
|
+
if (F.length !== 0 && i !== null && g !== null) {
|
|
73
|
+
let Me = i === g, ke = i === F.length && F.length < j;
|
|
74
74
|
if (Me && !ke) {
|
|
75
|
-
let L =
|
|
75
|
+
let L = i;
|
|
76
76
|
if (L === 0) W = 0, A = 1, H = "forward";
|
|
77
77
|
else if (L === j) W = L - 1, A = L, H = "backward";
|
|
78
78
|
else if (j > 1 && F.length > 1) {
|
|
79
|
-
let
|
|
79
|
+
let se = 0;
|
|
80
80
|
if (R[0] !== null && R[1] !== null) {
|
|
81
81
|
H = L < R[1] ? "backward" : "forward";
|
|
82
82
|
let Ne = R[0] === R[1] && R[0] < j;
|
|
83
|
-
H === "backward" && !Ne && (
|
|
83
|
+
H === "backward" && !Ne && (se = -1);
|
|
84
84
|
}
|
|
85
|
-
W =
|
|
85
|
+
W = se + L, A = se + L + 1;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
W !== -1 && A !== -1 && W !== A && c.current.setSelectionRange(W, A, H);
|
|
89
89
|
}
|
|
90
|
-
let he = W !== -1 ? W :
|
|
91
|
-
J(he), K(ve), X.current.prev = [he, ve,
|
|
90
|
+
let he = W !== -1 ? W : i, ve = A !== -1 ? A : g, Pe = H ?? Y;
|
|
91
|
+
J(he), K(ve), X.current.prev = [he, ve, Pe];
|
|
92
92
|
}
|
|
93
93
|
if (document.addEventListener("selectionchange", h, { capture: !0 }), h(), document.activeElement === e && re(!0), !document.getElementById("input-otp-style")) {
|
|
94
|
-
let
|
|
95
|
-
if (
|
|
94
|
+
let i = document.createElement("style");
|
|
95
|
+
if (i.id = "input-otp-style", document.head.appendChild(i), i.sheet) {
|
|
96
96
|
let g = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
97
|
-
Q(
|
|
97
|
+
Q(i.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), Q(i.sheet, `[data-input-otp]:autofill { ${g} }`), Q(i.sheet, `[data-input-otp]:-webkit-autofill { ${g} }`), Q(i.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), Q(i.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
let y = () => {
|
|
@@ -111,20 +111,20 @@ var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
|
111
111
|
Fe(() => {
|
|
112
112
|
var e, l, h, y;
|
|
113
113
|
(e = c.current) == null || e.dispatchEvent(new Event("input"));
|
|
114
|
-
let S = (l = c.current) == null ? void 0 : l.selectionStart,
|
|
115
|
-
S !== null &&
|
|
114
|
+
let S = (l = c.current) == null ? void 0 : l.selectionStart, i = (h = c.current) == null ? void 0 : h.selectionEnd, g = (y = c.current) == null ? void 0 : y.selectionDirection;
|
|
115
|
+
S !== null && i !== null && (J(S), K(i), X.current.prev = [S, i, g]);
|
|
116
116
|
});
|
|
117
|
-
}, [
|
|
118
|
-
E !== void 0 &&
|
|
119
|
-
}, [d, _, E,
|
|
117
|
+
}, [s, Z]), n.useEffect(() => {
|
|
118
|
+
E !== void 0 && s !== E && E.length < d && s.length === d && _?.(s);
|
|
119
|
+
}, [d, _, E, s]);
|
|
120
120
|
let G = Ge({ containerRef: le, inputRef: c, pushPasswordManagerStrategy: x, isFocused: Z }), de = n.useCallback((e) => {
|
|
121
121
|
let l = e.currentTarget.value.slice(0, d);
|
|
122
|
-
if (l.length > 0 &&
|
|
122
|
+
if (l.length > 0 && P && !P.test(l)) {
|
|
123
123
|
e.preventDefault();
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
typeof E == "string" && l.length < E.length && document.dispatchEvent(new Event("selectionchange")), q(l);
|
|
127
|
-
}, [d, q, E,
|
|
127
|
+
}, [d, q, E, P]), fe = n.useCallback(() => {
|
|
128
128
|
var e;
|
|
129
129
|
if (c.current) {
|
|
130
130
|
let l = Math.min(c.current.value.length, d - 1), h = c.current.value.length;
|
|
@@ -135,14 +135,14 @@ var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
|
135
135
|
var l, h;
|
|
136
136
|
let y = c.current;
|
|
137
137
|
if (!f && (!ae.current.isIOS || !e.clipboardData || !y)) return;
|
|
138
|
-
let S = e.clipboardData.getData("text/plain"),
|
|
138
|
+
let S = e.clipboardData.getData("text/plain"), i = f ? f(S) : S;
|
|
139
139
|
e.preventDefault();
|
|
140
|
-
let g = (l = c.current) == null ? void 0 : l.selectionStart, Y = (h = c.current) == null ? void 0 : h.selectionEnd, j = (g !== Y ?
|
|
141
|
-
if (j.length > 0 &&
|
|
140
|
+
let g = (l = c.current) == null ? void 0 : l.selectionStart, Y = (h = c.current) == null ? void 0 : h.selectionEnd, j = (g !== Y ? s.slice(0, g) + i + s.slice(Y) : s.slice(0, g) + i + s.slice(g)).slice(0, d);
|
|
141
|
+
if (j.length > 0 && P && !P.test(j)) return;
|
|
142
142
|
y.value = j, q(j);
|
|
143
143
|
let F = Math.min(j.length, d - 1), R = j.length;
|
|
144
144
|
y.setSelectionRange(F, R), J(F), K(R);
|
|
145
|
-
}, [d, q,
|
|
145
|
+
}, [d, q, P, s]), Ee = n.useMemo(() => ({ position: "relative", cursor: o.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [o.disabled]), me = n.useMemo(() => ({ position: "absolute", inset: 0, width: G.willPushPWMBadge ? `calc(100% + ${G.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: G.willPushPWMBadge ? `inset(0 ${G.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: D, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [G.PWM_BADGE_SPACE_WIDTH, G.willPushPWMBadge, D]), je = n.useMemo(() => n.createElement("input", _e(Be({ autoComplete: o.autoComplete || "one-time-code" }, o), { "data-input-otp": !0, "data-input-otp-placeholder-shown": s.length === 0 || void 0, "data-input-otp-mss": I, "data-input-otp-mse": z, inputMode: B, pattern: P?.source, "aria-placeholder": O, style: me, maxLength: d, value: s, ref: c, onPaste: (e) => {
|
|
146
146
|
var l;
|
|
147
147
|
pe(e), (l = o.onPaste) == null || l.call(o, e);
|
|
148
148
|
}, onChange: de, onMouseOver: (e) => {
|
|
@@ -157,12 +157,12 @@ var Ve = n.createContext({}), Se = n.forwardRef((t, a) => {
|
|
|
157
157
|
}, onBlur: (e) => {
|
|
158
158
|
var l;
|
|
159
159
|
re(!1), (l = o.onBlur) == null || l.call(o, e);
|
|
160
|
-
} })), [de, fe, pe, B, me, d, z, I, o,
|
|
160
|
+
} })), [de, fe, pe, B, me, d, z, I, o, P?.source, s]), oe = n.useMemo(() => ({ slots: Array.from({ length: d }).map((e, l) => {
|
|
161
161
|
var h;
|
|
162
|
-
let y = Z && I !== null && z !== null && (I === z && l === I || l >= I && l < z), S =
|
|
163
|
-
return { char: S, placeholderChar:
|
|
164
|
-
}), isFocused: Z, isHovering: !o.disabled && ue }), [Z, ue, d, z, I, o.disabled,
|
|
165
|
-
return n.createElement(n.Fragment, null, m !== null && n.createElement("noscript", null, n.createElement("style", null, m)), n.createElement("div", { ref: le, "data-input-otp-container": !0, style: Ee, className: v },
|
|
162
|
+
let y = Z && I !== null && z !== null && (I === z && l === I || l >= I && l < z), S = s[l] !== void 0 ? s[l] : null, i = s[0] !== void 0 ? null : (h = O?.[l]) != null ? h : null;
|
|
163
|
+
return { char: S, placeholderChar: i, isActive: y, hasFakeCaret: y && S === null };
|
|
164
|
+
}), isFocused: Z, isHovering: !o.disabled && ue }), [Z, ue, d, z, I, o.disabled, s]), Ce = n.useMemo(() => b ? b(oe) : n.createElement(Ve.Provider, { value: oe }, w), [w, oe, b]);
|
|
165
|
+
return n.createElement(n.Fragment, null, m !== null && n.createElement("noscript", null, n.createElement("style", null, m)), n.createElement("div", { ref: le, "data-input-otp-container": !0, style: Ee, className: v }, Ce, n.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, je)));
|
|
166
166
|
});
|
|
167
167
|
Se.displayName = "Input";
|
|
168
168
|
function Q(t, a) {
|
|
@@ -212,7 +212,7 @@ const Ze = ({
|
|
|
212
212
|
variant: w = "default",
|
|
213
213
|
hideSlotsMiddleSeparator: o = !1
|
|
214
214
|
}) => {
|
|
215
|
-
const
|
|
215
|
+
const C = m === "left" ? "justify-start w-full text-left" : m === "center" ? "justify-center" : "justify-end text-right w-full", N = {
|
|
216
216
|
default: {
|
|
217
217
|
text: "text-neutral-default-default",
|
|
218
218
|
icon: null
|
|
@@ -246,23 +246,23 @@ const Ze = ({
|
|
|
246
246
|
const V = Math.floor(T.length / 2), te = T.slice(0, V), ne = T.slice(V);
|
|
247
247
|
return /* @__PURE__ */ p.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
248
248
|
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center", children: [
|
|
249
|
-
/* @__PURE__ */ p.jsx("div", { className: "flex", children: te.map((
|
|
249
|
+
/* @__PURE__ */ p.jsx("div", { className: "flex", children: te.map((s, E) => /* @__PURE__ */ p.jsx(ie, { ...s, placeholder: D, hasError: f, className: b, variant: w }, E)) }),
|
|
250
250
|
/* @__PURE__ */ p.jsx("hr", { className: $("w-2 h-1 mx-2 border-neutral-default-default", o && "hidden") }),
|
|
251
|
-
/* @__PURE__ */ p.jsx("div", { className: "flex", children: ne.map((
|
|
251
|
+
/* @__PURE__ */ p.jsx("div", { className: "flex", children: ne.map((s, E) => /* @__PURE__ */ p.jsx(ie, { ...s, placeholder: D, hasError: f, variant: w, className: b }, E)) })
|
|
252
252
|
] }),
|
|
253
|
-
f && x && (typeof x == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-error-default-default text-xs mt-1 flex items-center gap-1",
|
|
253
|
+
f && x && (typeof x == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-error-default-default text-xs mt-1 flex items-center gap-1", C, N.error.text), children: [
|
|
254
254
|
N.error.icon,
|
|
255
255
|
x
|
|
256
256
|
] }) : ge.cloneElement(x, { className: $(
|
|
257
257
|
"text-error-default-default text-xs mt-1",
|
|
258
|
-
|
|
258
|
+
C,
|
|
259
259
|
N.error.text,
|
|
260
260
|
x?.props?.className
|
|
261
261
|
) })),
|
|
262
|
-
v && m && (typeof v == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-neutral-medium-default text-xs mt-1 flex items-center gap-1", N[w].text,
|
|
262
|
+
v && m && (typeof v == "string" ? /* @__PURE__ */ p.jsxs("span", { className: $("text-neutral-medium-default text-xs mt-1 flex items-center gap-1", N[w].text, C), children: [
|
|
263
263
|
N[w].icon,
|
|
264
264
|
v
|
|
265
|
-
] }) : ge.cloneElement(v, { className: $("text-neutral-medium-default text-xs mt-1",
|
|
265
|
+
] }) : ge.cloneElement(v, { className: $("text-neutral-medium-default text-xs mt-1", C, N[w].text, v?.props?.className) }))
|
|
266
266
|
] });
|
|
267
267
|
}
|
|
268
268
|
}
|
|
@@ -294,8 +294,8 @@ const Je = (t) => {
|
|
|
294
294
|
]
|
|
295
295
|
}
|
|
296
296
|
);
|
|
297
|
-
},
|
|
298
|
-
|
|
297
|
+
}, ie = Oe(Je);
|
|
298
|
+
ie.displayName = "Slot";
|
|
299
299
|
export {
|
|
300
300
|
Ze as default
|
|
301
301
|
};
|
package/dist/Pagination.es.js
CHANGED
package/dist/ProgressBar.es.js
CHANGED
package/dist/RadioButton.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as t } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { memo as x, forwardRef as k, useRef as g, useEffect as y } from "react";
|
|
4
|
-
import { H as j } from "./HelperComponent-
|
|
4
|
+
import { H as j } from "./HelperComponent-E_C-E8Iu.js";
|
|
5
5
|
const s = k((n, a) => {
|
|
6
6
|
const r = g(null);
|
|
7
7
|
y(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import O, { useMemo as D, memo as b, useRef as M, useCallback as g, useState as L, useEffect as W } from "react";
|
|
3
|
-
import { D as I } from "./DatePicker-
|
|
4
|
-
import { S as f } from "./Select-
|
|
5
|
-
import { I as R } from "./Input-
|
|
3
|
+
import { D as I } from "./DatePicker-CzpFYO6L.js";
|
|
4
|
+
import { S as f } from "./Select-DgUVs2c6.js";
|
|
5
|
+
import { I as R } from "./Input-ZXkhyFlL.js";
|
|
6
6
|
import _ from "./CheckBox.es.js";
|
|
7
7
|
import { c as p } from "./cn-B6yFEsav.js";
|
|
8
|
-
import { H as A } from "./HelperComponent-
|
|
8
|
+
import { H as A } from "./HelperComponent-E_C-E8Iu.js";
|
|
9
9
|
import w from "./RadioButton.es.js";
|
|
10
10
|
const B = [
|
|
11
11
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as J } from "./jsx-runtime-
|
|
1
|
+
import { j as J } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { memo as Ie, useState as he, useRef as _e, useEffect as ye } from "react";
|
|
3
3
|
import { RecurrentDatePicker as We } from "./RecurrentDatePicker.es.js";
|
|
4
|
-
import { C as He } from "./DatePicker-
|
|
4
|
+
import { C as He } from "./DatePicker-CzpFYO6L.js";
|
|
5
5
|
var re = [
|
|
6
6
|
"MO",
|
|
7
7
|
"TU",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-
|
|
2
|
-
import {
|
|
1
|
+
import { j as s } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { a as Qe, O as Xe, g as Ue, k as Ye } from "./Icons-BJgYCS_W.js";
|
|
3
3
|
import { c as f } from "./cn-B6yFEsav.js";
|
|
4
4
|
import Ne, { memo as Z, useState as De, useRef as ce, useMemo as oe, useCallback as U, useEffect as ve, useImperativeHandle as Ze } from "react";
|
|
5
5
|
import et from "./Spinner.es.js";
|
|
6
6
|
import { createPortal as tt } from "react-dom";
|
|
7
7
|
import { u as nt } from "./useDragScroll-CHN9OMwn.js";
|
|
8
|
-
import { u as rt, I as lt } from "./Input-
|
|
9
|
-
import { H as ot } from "./HelperComponent-
|
|
8
|
+
import { u as rt, I as lt } from "./Input-ZXkhyFlL.js";
|
|
9
|
+
import { H as ot } from "./HelperComponent-E_C-E8Iu.js";
|
|
10
10
|
import st from "./CheckBox.es.js";
|
|
11
11
|
import Ke from "./Skeleton.es.js";
|
|
12
12
|
const at = {
|
|
@@ -85,8 +85,8 @@ const qe = (e, n) => {
|
|
|
85
85
|
if (u.length > i.length) return !1;
|
|
86
86
|
const j = Math.floor(u.length * m);
|
|
87
87
|
if (j <= 0) return !1;
|
|
88
|
-
const p = (b,
|
|
89
|
-
const I = b.length, W =
|
|
88
|
+
const p = (b, E) => {
|
|
89
|
+
const I = b.length, W = E.length;
|
|
90
90
|
if (I === 0) return W;
|
|
91
91
|
if (W === 0) return I;
|
|
92
92
|
const A = new Array(W + 1);
|
|
@@ -95,15 +95,15 @@ const qe = (e, n) => {
|
|
|
95
95
|
let S = x - 1;
|
|
96
96
|
A[0] = x;
|
|
97
97
|
for (let z = 1; z <= W; z++) {
|
|
98
|
-
const se = A[z], K = b.charCodeAt(x - 1) ===
|
|
98
|
+
const se = A[z], K = b.charCodeAt(x - 1) === E.charCodeAt(z - 1) ? 0 : 1, V = A[z] + 1, M = A[z - 1] + 1, N = S + K;
|
|
99
99
|
A[z] = V < M ? V < N ? V : N : M < N ? M : N, S = se;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
return A[W];
|
|
103
103
|
};
|
|
104
104
|
for (let b = 0; b <= i.length - u.length; b++) {
|
|
105
|
-
const
|
|
106
|
-
if (p(
|
|
105
|
+
const E = i.slice(b, b + u.length);
|
|
106
|
+
if (p(E, u) <= j) return !0;
|
|
107
107
|
}
|
|
108
108
|
return !1;
|
|
109
109
|
}, ut = (e) => {
|
|
@@ -167,7 +167,7 @@ const qe = (e, n) => {
|
|
|
167
167
|
)
|
|
168
168
|
};
|
|
169
169
|
function ct(e) {
|
|
170
|
-
const [n, m] = De(!1), [i, u] = De([]), [v, h] = De(""), j = ce(null), p = ce(null), b = ce(null),
|
|
170
|
+
const [n, m] = De(!1), [i, u] = De([]), [v, h] = De(""), j = ce(null), p = ce(null), b = ce(null), E = ce(null), I = ce(
|
|
171
171
|
() => {
|
|
172
172
|
}
|
|
173
173
|
), W = ce(null), A = ce(/* @__PURE__ */ new Set()), {
|
|
@@ -179,7 +179,7 @@ function ct(e) {
|
|
|
179
179
|
controls: V,
|
|
180
180
|
className: M,
|
|
181
181
|
placeholder: N,
|
|
182
|
-
optionValue:
|
|
182
|
+
optionValue: k,
|
|
183
183
|
optionLabel: de,
|
|
184
184
|
renderOption: J,
|
|
185
185
|
renderOptionGroupHeader: fe,
|
|
@@ -191,7 +191,7 @@ function ct(e) {
|
|
|
191
191
|
dropdownOptions: O,
|
|
192
192
|
helperComponent: ee,
|
|
193
193
|
errorComponent: Ce,
|
|
194
|
-
onRemoveOption:
|
|
194
|
+
onRemoveOption: ke,
|
|
195
195
|
onOptionClick: X,
|
|
196
196
|
onClose: Se,
|
|
197
197
|
onClear: me,
|
|
@@ -203,7 +203,7 @@ function ct(e) {
|
|
|
203
203
|
displayMode: we = "compact",
|
|
204
204
|
labelVariant: ie = "default",
|
|
205
205
|
disableOpenOnFocus: ze = !1,
|
|
206
|
-
emptyMessage:
|
|
206
|
+
emptyMessage: Ee = "No hay opciones disponibles"
|
|
207
207
|
} = e, { ref: Oe } = rt(), { bind: ne, ref: Me } = nt({
|
|
208
208
|
axis: "x",
|
|
209
209
|
cursor: { idle: "default", dragging: "grabbing" }
|
|
@@ -224,11 +224,11 @@ function ct(e) {
|
|
|
224
224
|
return t[ie][a];
|
|
225
225
|
}, T = U(
|
|
226
226
|
(t) => ({
|
|
227
|
-
id: G(t,
|
|
228
|
-
value: G(t,
|
|
227
|
+
id: G(t, k),
|
|
228
|
+
value: G(t, k),
|
|
229
229
|
label: G(t, de)
|
|
230
230
|
}),
|
|
231
|
-
[
|
|
231
|
+
[k, de]
|
|
232
232
|
), Y = oe(() => ut(K), [K]), ge = oe(
|
|
233
233
|
() => Y.map(T),
|
|
234
234
|
[Y, T]
|
|
@@ -237,18 +237,18 @@ function ct(e) {
|
|
|
237
237
|
if (e.multiple)
|
|
238
238
|
e.value?.forEach((a) => {
|
|
239
239
|
const l = Y?.find(
|
|
240
|
-
(g) => G(g,
|
|
240
|
+
(g) => G(g, k) === a
|
|
241
241
|
);
|
|
242
242
|
l && t.push(l);
|
|
243
243
|
});
|
|
244
244
|
else {
|
|
245
245
|
const a = Y?.find(
|
|
246
|
-
(l) => G(l,
|
|
246
|
+
(l) => G(l, k) === e.value
|
|
247
247
|
);
|
|
248
248
|
a && t.push(a);
|
|
249
249
|
}
|
|
250
250
|
return t;
|
|
251
|
-
}, [e.value,
|
|
251
|
+
}, [e.value, k, Y, e.multiple]), o = oe(
|
|
252
252
|
() => r.map(T),
|
|
253
253
|
[r, T]
|
|
254
254
|
), c = oe(
|
|
@@ -259,7 +259,7 @@ function ct(e) {
|
|
|
259
259
|
return K.forEach((a, l) => {
|
|
260
260
|
const g = a, H = g.options;
|
|
261
261
|
if (Array.isArray(H) && H.length > 0) {
|
|
262
|
-
const $ = g.label, P = G(a,
|
|
262
|
+
const $ = g.label, P = G(a, k), le = `__group-${String(P ?? l)}`, xe = {
|
|
263
263
|
id: le,
|
|
264
264
|
value: le,
|
|
265
265
|
label: typeof $ == "string" ? $ : String(P ?? `Grupo ${l + 1}`),
|
|
@@ -276,7 +276,7 @@ function ct(e) {
|
|
|
276
276
|
} else
|
|
277
277
|
J ? t.push(a) : t.push(T(a));
|
|
278
278
|
}), t;
|
|
279
|
-
}, [K,
|
|
279
|
+
}, [K, k, J, T]), w = U(
|
|
280
280
|
(t, a) => {
|
|
281
281
|
if (!t || t.length === 0) return;
|
|
282
282
|
const l = t.map(
|
|
@@ -349,21 +349,21 @@ function ct(e) {
|
|
|
349
349
|
(t) => {
|
|
350
350
|
e.multiple || e.onChange?.(void 0, S);
|
|
351
351
|
const a = Y.find(
|
|
352
|
-
(g) => G(g,
|
|
352
|
+
(g) => G(g, k) === t
|
|
353
353
|
);
|
|
354
354
|
if (!a) return;
|
|
355
355
|
const l = T(a);
|
|
356
|
-
X?.(l, S), I.current?.(l),
|
|
356
|
+
X?.(l, S), I.current?.(l), ke?.(a);
|
|
357
357
|
},
|
|
358
358
|
[
|
|
359
359
|
X,
|
|
360
|
-
|
|
360
|
+
ke,
|
|
361
361
|
Y,
|
|
362
362
|
S,
|
|
363
363
|
e.multiple,
|
|
364
364
|
e.onChange,
|
|
365
365
|
T,
|
|
366
|
-
|
|
366
|
+
k
|
|
367
367
|
]
|
|
368
368
|
), re = U(
|
|
369
369
|
(t) => {
|
|
@@ -452,7 +452,7 @@ function ct(e) {
|
|
|
452
452
|
id: x,
|
|
453
453
|
tabIndex: 0,
|
|
454
454
|
role: "button",
|
|
455
|
-
ref:
|
|
455
|
+
ref: E,
|
|
456
456
|
onFocus: be,
|
|
457
457
|
onKeyDown: ue,
|
|
458
458
|
onClick: (t) => {
|
|
@@ -560,9 +560,9 @@ function ct(e) {
|
|
|
560
560
|
label: z,
|
|
561
561
|
isOpen: n,
|
|
562
562
|
disabled: te,
|
|
563
|
-
optionValue:
|
|
563
|
+
optionValue: k,
|
|
564
564
|
optionLabel: de,
|
|
565
|
-
emptyMessage:
|
|
565
|
+
emptyMessage: Ee,
|
|
566
566
|
labelVariant: ie,
|
|
567
567
|
renderOption: J,
|
|
568
568
|
renderOptionGroupHeader: fe,
|
|
@@ -576,7 +576,7 @@ function ct(e) {
|
|
|
576
576
|
options: d,
|
|
577
577
|
selectRef: j,
|
|
578
578
|
dropdownRef: p,
|
|
579
|
-
selectButtonRef:
|
|
579
|
+
selectButtonRef: E,
|
|
580
580
|
helperComponentRef: W,
|
|
581
581
|
onOptionClick: y,
|
|
582
582
|
onCloseDropdown: () => m(!1),
|
|
@@ -621,7 +621,7 @@ function ft({
|
|
|
621
621
|
inputProps: j,
|
|
622
622
|
dropdownRef: p,
|
|
623
623
|
optionLabel: b,
|
|
624
|
-
optionValue:
|
|
624
|
+
optionValue: E,
|
|
625
625
|
searchValue: I,
|
|
626
626
|
labelVariant: W,
|
|
627
627
|
emptyMessage: A,
|
|
@@ -633,7 +633,7 @@ function ft({
|
|
|
633
633
|
searchInputRef: V,
|
|
634
634
|
setSearchValue: M,
|
|
635
635
|
dropdownHeight: N,
|
|
636
|
-
attachToParent:
|
|
636
|
+
attachToParent: k,
|
|
637
637
|
filteredOptions: de,
|
|
638
638
|
selectButtonRef: J,
|
|
639
639
|
onCloseDropdown: fe,
|
|
@@ -645,7 +645,7 @@ function ft({
|
|
|
645
645
|
onSearchValueChange: O,
|
|
646
646
|
isLoading: ee = !1,
|
|
647
647
|
hideSearchBar: Ce = !1,
|
|
648
|
-
inputSearchPlaceholder:
|
|
648
|
+
inputSearchPlaceholder: ke = "Buscar opciones",
|
|
649
649
|
enableGroupToggle: X = !0,
|
|
650
650
|
onGroupSelectChange: Se
|
|
651
651
|
}) {
|
|
@@ -657,7 +657,7 @@ function ft({
|
|
|
657
657
|
), ze = U(
|
|
658
658
|
(r) => !we.has(r),
|
|
659
659
|
[we]
|
|
660
|
-
),
|
|
660
|
+
), Ee = U(
|
|
661
661
|
(r, o) => {
|
|
662
662
|
ie((c) => {
|
|
663
663
|
const d = new Set(c), w = d.has(r);
|
|
@@ -690,7 +690,7 @@ function ft({
|
|
|
690
690
|
p.current.style.maxHeight = "0", p.current.style.opacity = "0", p.current.style.pointerEvents = "none";
|
|
691
691
|
return;
|
|
692
692
|
}
|
|
693
|
-
if (!
|
|
693
|
+
if (!k) {
|
|
694
694
|
const o = Me();
|
|
695
695
|
Ae(o), Oe(o.direction), ne(o.height);
|
|
696
696
|
}
|
|
@@ -698,7 +698,7 @@ function ft({
|
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
700
|
ve(() => {
|
|
701
|
-
|
|
701
|
+
k || !h.current || !n || Oe();
|
|
702
702
|
}, [ae]), ve(() => {
|
|
703
703
|
pe(n);
|
|
704
704
|
}, [n]), ve(() => {
|
|
@@ -757,7 +757,7 @@ function ft({
|
|
|
757
757
|
if (K) {
|
|
758
758
|
K(), Q(
|
|
759
759
|
i.filter((r) => {
|
|
760
|
-
const o = x ? G(r,
|
|
760
|
+
const o = x ? G(r, E) : r.id;
|
|
761
761
|
return ae.has(o);
|
|
762
762
|
})
|
|
763
763
|
);
|
|
@@ -767,7 +767,7 @@ function ft({
|
|
|
767
767
|
}, [
|
|
768
768
|
i,
|
|
769
769
|
ae,
|
|
770
|
-
|
|
770
|
+
E,
|
|
771
771
|
K,
|
|
772
772
|
Q,
|
|
773
773
|
M,
|
|
@@ -839,7 +839,7 @@ function ft({
|
|
|
839
839
|
className: f(
|
|
840
840
|
" z-100! w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-lg shadow-lg",
|
|
841
841
|
" overflow-hidden focus-visible:bg-neutral-default-hover ",
|
|
842
|
-
|
|
842
|
+
k ? "absolute z-50 " : "fixed z-100 top-0 left-0",
|
|
843
843
|
he.direction === "up" ? "h-auto" : " h-max",
|
|
844
844
|
Ie
|
|
845
845
|
),
|
|
@@ -871,7 +871,7 @@ function ft({
|
|
|
871
871
|
onKeyDown: $e,
|
|
872
872
|
onClear: Ge,
|
|
873
873
|
onChange: (r) => Te(r.target.value),
|
|
874
|
-
placeholder:
|
|
874
|
+
placeholder: ke,
|
|
875
875
|
className: " bg-neutral-medium-pressed",
|
|
876
876
|
...j
|
|
877
877
|
}
|
|
@@ -879,10 +879,10 @@ function ft({
|
|
|
879
879
|
/* @__PURE__ */ s.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: de.length === 0 ? ee ? /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: je || Y }) : /* @__PURE__ */ s.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: I ? `No se encontraron resultados para "${I}"` : A }) : (() => {
|
|
880
880
|
let r = !0;
|
|
881
881
|
return de.map((o) => {
|
|
882
|
-
const c = o, d = !!c.isGroupHeader, w = x && !d ? G(o,
|
|
882
|
+
const c = o, d = !!c.isGroupHeader, w = x && !d ? G(o, E) : c.id, L = ae.has(w), y = (l) => !x || d ? l : {
|
|
883
883
|
id: w,
|
|
884
884
|
label: String(G(l, b)),
|
|
885
|
-
value: G(l,
|
|
885
|
+
value: G(l, E)
|
|
886
886
|
}, R = (l) => {
|
|
887
887
|
d || se(
|
|
888
888
|
y(o),
|
|
@@ -918,12 +918,12 @@ function ft({
|
|
|
918
918
|
const l = c.groupLabelNode ?? c.label, g = String(c.id), H = X === !1 ? !0 : ze(g);
|
|
919
919
|
r = H;
|
|
920
920
|
const $ = c.originalOption, P = c.groupData?.groupOptions ?? [], le = (_) => {
|
|
921
|
-
X &&
|
|
921
|
+
X && Ee(g, _);
|
|
922
922
|
}, xe = (_) => {
|
|
923
923
|
!P || P.length === 0 || Se && Se(P, _);
|
|
924
924
|
}, ye = P.filter(
|
|
925
|
-
(_) => ae.has(G(_,
|
|
926
|
-
).map((_) => String(G(_,
|
|
925
|
+
(_) => ae.has(G(_, E))
|
|
926
|
+
).map((_) => String(G(_, E)));
|
|
927
927
|
if (z) {
|
|
928
928
|
const _ = Z(
|
|
929
929
|
z,
|
|
@@ -949,7 +949,7 @@ function ft({
|
|
|
949
949
|
"div",
|
|
950
950
|
{
|
|
951
951
|
className: "cursor-pointer",
|
|
952
|
-
onClick: () =>
|
|
952
|
+
onClick: () => Ee(g),
|
|
953
953
|
children: /* @__PURE__ */ s.jsx(
|
|
954
954
|
Ue,
|
|
955
955
|
{
|
|
@@ -1013,7 +1013,7 @@ function ft({
|
|
|
1013
1013
|
)
|
|
1014
1014
|
}
|
|
1015
1015
|
);
|
|
1016
|
-
return
|
|
1016
|
+
return k ? ge : tt(ge, document.body);
|
|
1017
1017
|
}
|
|
1018
1018
|
const mt = Z(
|
|
1019
1019
|
ft,
|
package/dist/Select.es.js
CHANGED
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as G } from "./jsx-runtime-
|
|
2
|
-
import { g as i, S as H } from "./Select-
|
|
1
|
+
import { j as G } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { g as i, S as H } from "./Select-DgUVs2c6.js";
|
|
3
3
|
import { useState as T, useRef as I, useEffect as h, useMemo as Q, useCallback as X } from "react";
|
|
4
4
|
function te(e) {
|
|
5
5
|
const {
|
package/dist/Skeleton.es.js
CHANGED
package/dist/Spinner.es.js
CHANGED
package/dist/Steps.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import {
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { C as j } from "./Icons-BJgYCS_W.js";
|
|
3
3
|
import { c as y } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { motion as r } from "framer-motion";
|
|
5
5
|
import N from "react";
|
package/dist/Switch.es.js
CHANGED