prometeo-design-system 2.5.3 → 2.5.5
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-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-DV3gwvqE.js → CardProfile-DA-HDUpi.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DatePicker.es.js +3 -3
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +1 -3
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-BeADef_g.js} +2 -2
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-PNwH7rb6.js → Input-DwIAUqcc.js} +2 -2
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/LayoutGeneric-B6E-yOYJ.js +26 -0
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/Select-C1MxM6yq.js +813 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +55 -29
- package/dist/SelectFormikLegacy.es.js +1 -1
- package/dist/SelectSearch.es.js +167 -132
- package/dist/Skeleton.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- 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 +2 -2
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Autocomplete/useAutocomplete.d.ts +14 -6
- package/dist/components/Select/Select.d.ts +19 -7
- package/dist/components/SelectFormik/SelectFormik.d.ts +5 -3
- package/dist/components/SelectSearch/SelectSearch.d.ts +12 -4
- package/dist/components/Sidebar/context/SidebarContext.d.ts +2 -0
- package/dist/components/TabSwitch/TabSwitch.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/prometeo-design-system.es.js +141 -134
- package/package.json +1 -1
- package/dist/LayoutGeneric-p4Pll4Cm.js +0 -24
- package/dist/Select-C-aLaiJu.js +0 -804
package/dist/Select.es.js
CHANGED
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,35 +1,61 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useField as
|
|
3
|
-
import { S as
|
|
4
|
-
import { useRef as
|
|
5
|
-
function
|
|
6
|
-
return Array.isArray(
|
|
7
|
-
(
|
|
1
|
+
import { j as d } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { useField as y } from "formik";
|
|
3
|
+
import { S as m } from "./Select-C1MxM6yq.js";
|
|
4
|
+
import { useRef as p, useEffect as g } from "react";
|
|
5
|
+
function f(e) {
|
|
6
|
+
return Array.isArray(e) && e.every(
|
|
7
|
+
(r) => typeof r == "string" || typeof r == "number"
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function v(e) {
|
|
11
|
+
return e == null || typeof e == "string" || typeof e == "number";
|
|
12
|
+
}
|
|
13
|
+
const b = (e) => {
|
|
14
|
+
const [r, a, l] = y(e.name), u = p(!1), o = Array.isArray(r.value);
|
|
15
|
+
if (g(() => {
|
|
16
|
+
u.current || (u.current = !0, o ? f(r.value) || (console.warn(
|
|
17
|
+
`SelectFormik: El valor del campo "${e.name}" no es un array válido de string | number. Valor recibido:`,
|
|
18
|
+
r.value,
|
|
16
19
|
"Inicializando como array vacío."
|
|
17
|
-
),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
), l.setValue([])) : v(r.value) || (console.warn(
|
|
21
|
+
`SelectFormik: El valor del campo "${e.name}" no es un valor válido (string | number | null). Valor recibido:`,
|
|
22
|
+
r.value,
|
|
23
|
+
"Inicializando como null."
|
|
24
|
+
), l.setValue(null)));
|
|
25
|
+
}, [r.value, l, e.name, o]), o) {
|
|
26
|
+
const n = (c) => {
|
|
27
|
+
l.setValue(c.map((s) => s.value));
|
|
28
|
+
}, i = f(r.value) ? r.value : [], t = e?.displayMode || "chips";
|
|
29
|
+
return /* @__PURE__ */ d.jsx(
|
|
30
|
+
m,
|
|
31
|
+
{
|
|
32
|
+
...e,
|
|
33
|
+
displayMode: t,
|
|
34
|
+
multiple: !0,
|
|
35
|
+
value: i,
|
|
36
|
+
onChange: n,
|
|
37
|
+
variant: a.error ? "error" : "default",
|
|
38
|
+
errorComponent: a.error || void 0
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
} else {
|
|
42
|
+
const n = (s) => {
|
|
43
|
+
l.setValue(s?.value ?? null);
|
|
44
|
+
}, i = v(r.value) ? r.value : void 0, { ...t } = e;
|
|
45
|
+
return /* @__PURE__ */ d.jsx(
|
|
46
|
+
m,
|
|
47
|
+
{
|
|
48
|
+
...t,
|
|
49
|
+
displayMode: "compact",
|
|
50
|
+
multiple: !1,
|
|
51
|
+
value: i,
|
|
52
|
+
onChange: n,
|
|
53
|
+
variant: a.error ? "error" : "default",
|
|
54
|
+
errorComponent: a.error || void 0
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
32
58
|
};
|
|
33
59
|
export {
|
|
34
|
-
|
|
60
|
+
b as default
|
|
35
61
|
};
|
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,195 +1,230 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as
|
|
3
|
-
import { useState as
|
|
1
|
+
import { j as G } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { g as i, S as H } from "./Select-C1MxM6yq.js";
|
|
3
|
+
import { useState as w, useRef as T, useEffect as m, useMemo as Q, useCallback as X } from "react";
|
|
4
4
|
function te(e) {
|
|
5
5
|
const {
|
|
6
|
-
options:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
debounceDelay: m = 500,
|
|
6
|
+
options: L,
|
|
7
|
+
fetcher: s,
|
|
8
|
+
asyncMode: V = "fetch_in_open",
|
|
9
|
+
disabled: x = !1,
|
|
10
|
+
debounceDelay: I = 500,
|
|
12
11
|
minCharacters: S = 3,
|
|
13
|
-
optionLabel:
|
|
14
|
-
optionValue:
|
|
15
|
-
controlledValue:
|
|
16
|
-
isOpen:
|
|
17
|
-
inputRef:
|
|
18
|
-
name:
|
|
19
|
-
} = e || {}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
e?.options && (
|
|
12
|
+
optionLabel: f,
|
|
13
|
+
optionValue: u,
|
|
14
|
+
controlledValue: h,
|
|
15
|
+
isOpen: F,
|
|
16
|
+
inputRef: R,
|
|
17
|
+
name: p
|
|
18
|
+
} = e || {}, [O, j] = w(L || []), [J, y] = w(L || []), [a, k] = w(""), [M, r] = w(!1), [C, b] = w(!1), g = T(null), D = T(null), N = T(!1), E = T(s), P = e?.multiple === !0 || !1, _ = T(P ? [] : void 0), [d, A] = w(P ? [] : void 0);
|
|
19
|
+
m(() => {
|
|
20
|
+
E.current = s;
|
|
21
|
+
}, [s]), m(() => {
|
|
22
|
+
h !== void 0 && A(h);
|
|
23
|
+
}, [h]), m(() => {
|
|
24
|
+
_.current = h !== void 0 ? h : d;
|
|
25
|
+
}, [h, d]), m(() => {
|
|
26
|
+
e?.options && (j(e.options), y(e.options));
|
|
28
27
|
}, [e?.options]);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
}), [
|
|
32
|
-
const n =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
const U = Q(() => (t, n) => new Promise((o, l) => {
|
|
29
|
+
g.current && clearTimeout(g.current), g.current = setTimeout(() => t(a).then(o).catch(l), n);
|
|
30
|
+
}), [a]), Y = (t) => {
|
|
31
|
+
const n = h !== void 0, o = (l) => u ? i(l, u) : i(l, "id");
|
|
32
|
+
if (e?.multiple === !0) {
|
|
33
|
+
const l = _.current || [];
|
|
34
|
+
let c;
|
|
35
|
+
l.some((v) => o(v) === o(t)) ? c = l.filter((v) => o(v) !== o(t)) : c = [...l, t], n ? (_.current = c, e?.onChange?.(c, p)) : (_.current = c, A(c), e?.onChange?.(c, p));
|
|
36
|
+
} else
|
|
37
|
+
n ? (_.current = t, e?.onChange?.(t, p)) : (_.current = t, A(t), e?.onChange?.(t, p));
|
|
38
|
+
}, W = (t) => (e?.onFetchingStart?.(), E.current?.(t) || Promise.resolve([])), K = X((t, n) => t.length === 0 ? n : u ? n.filter((o) => !t.some((l) => i(l, u) === i(o, u))) : n.filter((o) => !t.some((l) => i(l, "id") === i(o, "id"))), [u]);
|
|
39
|
+
m(() => {
|
|
38
40
|
const t = e?.subscribeOpenChange;
|
|
39
41
|
if (!t) return;
|
|
40
|
-
const n = t((
|
|
41
|
-
|
|
42
|
+
const n = t((o) => {
|
|
43
|
+
b(o);
|
|
42
44
|
});
|
|
43
45
|
return () => {
|
|
44
46
|
n && n();
|
|
45
47
|
};
|
|
46
48
|
}, [e?.subscribeOpenChange]);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
if (!
|
|
51
|
-
|
|
49
|
+
const B = F !== void 0 ? F : C;
|
|
50
|
+
m(() => {
|
|
51
|
+
if (!x && E.current && V === "fetch_on_type") {
|
|
52
|
+
if (!a || a === "" || a.length < S) {
|
|
53
|
+
g.current && clearTimeout(g.current), r(!1);
|
|
52
54
|
return;
|
|
53
55
|
}
|
|
54
|
-
const t =
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
const t = U(W, I);
|
|
57
|
+
r(!0), t.then((n) => {
|
|
58
|
+
j(n);
|
|
57
59
|
}).finally(() => {
|
|
58
|
-
|
|
60
|
+
r(!1), e?.onFetchingEnd?.();
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
|
-
}, [
|
|
62
|
-
if (
|
|
63
|
-
if (e?.onOpen?.(),
|
|
64
|
-
if (!
|
|
63
|
+
}, [V, a, x, I, U, S]), m(() => {
|
|
64
|
+
if (B) {
|
|
65
|
+
if (e?.onOpen?.(), V === "fetch_in_open") {
|
|
66
|
+
if (!E.current)
|
|
65
67
|
return;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
r(!0), W().then((t) => {
|
|
69
|
+
j(() => P && d.length > 0 ? [...K(d, t), ...d] : t);
|
|
68
70
|
}).finally(() => {
|
|
69
|
-
|
|
71
|
+
r(!1), e?.onFetchingEnd?.();
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
} else
|
|
73
75
|
e?.onClose?.();
|
|
74
|
-
}, [
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
switch (typeof
|
|
76
|
+
}, [B, V]);
|
|
77
|
+
const q = (t, n) => t.filter((o) => {
|
|
78
|
+
if (f)
|
|
79
|
+
return i(o, f).toLowerCase().includes(n.toLowerCase());
|
|
80
|
+
switch (typeof o) {
|
|
79
81
|
case "string":
|
|
80
|
-
return
|
|
82
|
+
return o.toLowerCase().includes(n.toLowerCase());
|
|
81
83
|
case "number":
|
|
82
|
-
return
|
|
84
|
+
return o.toString().includes(n);
|
|
83
85
|
case "object":
|
|
84
|
-
return Object.values(
|
|
86
|
+
return Object.values(o).some((c) => c.toString().toLowerCase().includes(n.toLowerCase()));
|
|
85
87
|
default:
|
|
86
88
|
return !1;
|
|
87
89
|
}
|
|
88
|
-
}),
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
90
|
+
}), Z = (t) => t.sort((n, o) => {
|
|
91
|
+
if (f)
|
|
92
|
+
return i(n, f) < i(o, f) ? -1 : 1;
|
|
91
93
|
{
|
|
92
|
-
const
|
|
94
|
+
const c = ["label", "name", "value"].find((v) => typeof n == "object" && Object.keys(n).includes(v));
|
|
93
95
|
switch (typeof n) {
|
|
94
96
|
case "string":
|
|
95
|
-
return n <
|
|
97
|
+
return n < o ? -1 : 1;
|
|
96
98
|
case "number":
|
|
97
|
-
return n <
|
|
99
|
+
return n < o ? -1 : 1;
|
|
98
100
|
case "object":
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
101
|
-
return
|
|
101
|
+
if (c) {
|
|
102
|
+
const v = i(n, c), ee = i(o, c);
|
|
103
|
+
return v < ee ? -1 : 1;
|
|
102
104
|
} else
|
|
103
105
|
return 1;
|
|
104
106
|
default:
|
|
105
107
|
return 1;
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
}),
|
|
109
|
-
const n = typeof
|
|
110
|
-
t.target === n?.current && (D.current && clearTimeout(D.current),
|
|
111
|
-
|
|
112
|
-
},
|
|
110
|
+
}), z = (t) => {
|
|
111
|
+
const n = typeof R == "function" ? R() : R;
|
|
112
|
+
t.target === n?.current && (D.current && clearTimeout(D.current), N.current || (N.current = !0, e?.onTypeStart?.()), D.current = setTimeout(() => {
|
|
113
|
+
N.current = !1;
|
|
114
|
+
}, I));
|
|
113
115
|
};
|
|
114
|
-
return
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
else {
|
|
118
|
-
const t =
|
|
119
|
-
|
|
116
|
+
return m(() => {
|
|
117
|
+
if (a === "")
|
|
118
|
+
y(Z(O));
|
|
119
|
+
else if (P) {
|
|
120
|
+
const t = K(d, O);
|
|
121
|
+
y([...q(t, a), ...d]);
|
|
122
|
+
} else {
|
|
123
|
+
const t = K([d], O);
|
|
124
|
+
y([...q(t, a), d]);
|
|
120
125
|
}
|
|
121
|
-
}, [
|
|
122
|
-
document.removeEventListener("keydown",
|
|
126
|
+
}, [O]), m(() => (document.addEventListener("keydown", z), () => {
|
|
127
|
+
document.removeEventListener("keydown", z);
|
|
123
128
|
}), []), {
|
|
124
|
-
inputValue:
|
|
125
|
-
setInputValue:
|
|
129
|
+
inputValue: a,
|
|
130
|
+
setInputValue: k,
|
|
126
131
|
cleanInputValue: () => {
|
|
127
|
-
|
|
132
|
+
k("");
|
|
128
133
|
},
|
|
129
|
-
filteredOptions:
|
|
134
|
+
filteredOptions: J,
|
|
130
135
|
isLoading: M,
|
|
131
|
-
value:
|
|
136
|
+
value: d,
|
|
132
137
|
setValue: A,
|
|
133
|
-
onOptionClick:
|
|
138
|
+
onOptionClick: Y
|
|
134
139
|
};
|
|
135
140
|
}
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
141
|
+
const ie = (e) => {
|
|
142
|
+
const L = T(null), { asyncMode: s = "fetch_in_open" } = e, V = (r, C, b) => {
|
|
143
|
+
const g = {
|
|
144
|
+
options: r.options,
|
|
145
|
+
fetcher: r.fetcher,
|
|
146
|
+
asyncMode: C,
|
|
147
|
+
debounceDelay: r.debounceDelay,
|
|
148
|
+
minCharacters: r.minCharacters,
|
|
149
|
+
disabled: r.disabled,
|
|
150
|
+
optionValue: r.optionValue,
|
|
151
|
+
optionLabel: r.optionLabel,
|
|
152
|
+
onFetchingStart: () => {
|
|
153
|
+
C === "fetch_on_type" && b.current?.open();
|
|
154
|
+
},
|
|
155
|
+
onTypeStart: () => {
|
|
156
|
+
!r?.fetcher && b.current?.open();
|
|
157
|
+
},
|
|
158
|
+
inputRef: () => b.current?.searchInputRef,
|
|
159
|
+
subscribeOpenChange: b.current?.subscribeOpenChange,
|
|
160
|
+
name: r.name
|
|
161
|
+
};
|
|
162
|
+
return r.multiple ? {
|
|
163
|
+
...g,
|
|
164
|
+
multiple: !0,
|
|
165
|
+
controlledValue: r.value,
|
|
166
|
+
onChange: r.onChange
|
|
167
|
+
} : {
|
|
168
|
+
...g,
|
|
169
|
+
multiple: !1,
|
|
170
|
+
controlledValue: r.value,
|
|
171
|
+
onChange: r.onChange
|
|
172
|
+
};
|
|
173
|
+
}, { inputValue: x, setInputValue: I, filteredOptions: S, isLoading: f, value: u, onOptionClick: h, cleanInputValue: F } = te(V(e, s, L)), R = X(() => s === "fetch_on_type" ? f : !1, [s, f]), p = Q(() => e.multiple ? u.map((r) => i(r, e.optionValue)) : u ? i(u, e.optionValue) : void 0, [u, e.optionValue, e.multiple]), O = (r) => {
|
|
174
|
+
const C = S.find((b) => i(b, e.optionValue) === r.id);
|
|
175
|
+
C && h(C);
|
|
176
|
+
}, { displayMode: j = e.multiple ? "chips" : "compact", dropdownOptions: J, overflow: y = "scroll", onChange: a, ...k } = e.selectComponentProps || {}, M = {
|
|
177
|
+
controledSearchValue: x,
|
|
178
|
+
onSearchValueChange: s === "fetch_on_type" ? I : void 0,
|
|
179
|
+
onSearchClear: s === "fetch_on_type" ? F : void 0,
|
|
166
180
|
inputSearchPlaceholder: e.inputSearchPlaceholder,
|
|
167
|
-
isLoading:
|
|
168
|
-
...
|
|
181
|
+
isLoading: R(),
|
|
182
|
+
...J || {}
|
|
169
183
|
};
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
|
|
184
|
+
return e.multiple ? /* @__PURE__ */ G.jsx(
|
|
185
|
+
H,
|
|
186
|
+
{
|
|
187
|
+
className: e.className,
|
|
188
|
+
name: e.name,
|
|
189
|
+
overflow: y,
|
|
190
|
+
...k,
|
|
191
|
+
multiple: !0,
|
|
192
|
+
value: p,
|
|
193
|
+
label: e.label || "",
|
|
194
|
+
options: S,
|
|
195
|
+
optionValue: e.optionValue,
|
|
196
|
+
optionLabel: e.optionLabel,
|
|
197
|
+
renderOption: e.renderOption,
|
|
198
|
+
onOptionClick: O,
|
|
199
|
+
displayMode: j,
|
|
200
|
+
controls: L,
|
|
201
|
+
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
202
|
+
dropdownOptions: M,
|
|
203
|
+
isLoading: s === "fetch_in_open" ? f : !1
|
|
204
|
+
}
|
|
205
|
+
) : /* @__PURE__ */ G.jsx(
|
|
206
|
+
H,
|
|
172
207
|
{
|
|
208
|
+
...k,
|
|
173
209
|
className: e.className,
|
|
210
|
+
overflow: y,
|
|
174
211
|
name: e.name,
|
|
175
|
-
|
|
176
|
-
|
|
212
|
+
multiple: !1,
|
|
213
|
+
value: p,
|
|
177
214
|
label: e.label || "",
|
|
178
|
-
|
|
179
|
-
options: v,
|
|
215
|
+
options: S,
|
|
180
216
|
optionValue: e.optionValue,
|
|
181
217
|
optionLabel: e.optionLabel,
|
|
182
218
|
renderOption: e.renderOption,
|
|
183
|
-
onOptionClick:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
controls: f,
|
|
219
|
+
onOptionClick: O,
|
|
220
|
+
displayMode: "compact",
|
|
221
|
+
controls: L,
|
|
187
222
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
188
|
-
dropdownOptions:
|
|
189
|
-
isLoading:
|
|
223
|
+
dropdownOptions: M,
|
|
224
|
+
isLoading: s === "fetch_in_open" ? f : !1
|
|
190
225
|
}
|
|
191
226
|
);
|
|
192
227
|
};
|
|
193
228
|
export {
|
|
194
|
-
|
|
229
|
+
ie as default
|
|
195
230
|
};
|
package/dist/Skeleton.es.js
CHANGED
package/dist/Spinner.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
|
|
3
3
|
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
const y = ({
|
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
package/dist/TabLinks.es.js
CHANGED
package/dist/Table.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Toast.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import b from "react";
|
|
3
3
|
import { toast as p } from "sonner";
|
|
4
4
|
import { Icons as m } from "./Icons.es.js";
|
|
5
5
|
import { c as s } from "./cn-B6yFEsav.js";
|
|
6
|
-
import { B as u } from "./Button-
|
|
6
|
+
import { B as u } from "./Button-Bc0LYLfg.js";
|
|
7
7
|
const x = {
|
|
8
8
|
dark: {
|
|
9
9
|
success: {
|
package/dist/ToastProvider.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Toaster as r } from "sonner";
|
|
3
3
|
const i = ({ ...o }) => /* @__PURE__ */ t.jsx(r, { ...o, position: "bottom-right", richColors: !1, theme: "light" });
|
|
4
4
|
export {
|
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Icons as b } from "./Icons.es.js";
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { OptionAccessor } from '../Shared/types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface UseAutocompleteOptionsMultiple<T> extends UseAutocompleteBaseOptions<T> {
|
|
3
|
+
multiple: true;
|
|
4
|
+
controlledValue?: T[];
|
|
5
|
+
onChange?: (newValue: T[], name?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UseAutocompleteOptionsSingle<T> extends UseAutocompleteBaseOptions<T> {
|
|
8
|
+
multiple?: false;
|
|
9
|
+
controlledValue?: T;
|
|
10
|
+
onChange?: (newValue: T, name?: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface UseAutocompleteBaseOptions<T> {
|
|
3
13
|
options?: T[];
|
|
4
|
-
multiple?: boolean;
|
|
5
14
|
fetcher?: (input?: string) => Promise<T[]>;
|
|
6
15
|
asyncMode?: 'fetch_in_open' | 'fetch_on_type';
|
|
7
16
|
disabled?: boolean;
|
|
@@ -15,19 +24,18 @@ export interface UseAutocompleteOptions<T> {
|
|
|
15
24
|
onTypeStart?: () => void;
|
|
16
25
|
onOpen?: () => void;
|
|
17
26
|
onClose?: () => void;
|
|
18
|
-
controlledValue?: T[];
|
|
19
27
|
isOpen?: boolean;
|
|
20
28
|
subscribeOpenChange?: (cb: (open: boolean) => void) => (() => void) | undefined;
|
|
21
|
-
onChange?: (newValue: T[], name?: string) => void;
|
|
22
29
|
name?: string;
|
|
23
30
|
}
|
|
31
|
+
export type UseAutocompleteOptions<T> = UseAutocompleteOptionsMultiple<T> | UseAutocompleteOptionsSingle<T>;
|
|
24
32
|
export declare function useAutocomplete<T>(options?: UseAutocompleteOptions<T>): {
|
|
25
33
|
inputValue: string;
|
|
26
34
|
setInputValue: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
27
35
|
cleanInputValue: () => void;
|
|
28
36
|
filteredOptions: T[];
|
|
29
37
|
isLoading: boolean;
|
|
30
|
-
value: T[];
|
|
31
|
-
setValue: import('react').Dispatch<import('react').SetStateAction<T[]>>;
|
|
38
|
+
value: T | T[] | undefined;
|
|
39
|
+
setValue: import('react').Dispatch<import('react').SetStateAction<T | T[] | undefined>>;
|
|
32
40
|
onOptionClick: (option: T) => void;
|
|
33
41
|
};
|