componentables 0.1.17 → 0.1.21
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/componentables.css +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/ExpandableCard/ExpandableCard.d.ts +1 -1
- package/dist/components/ExpandableCard/ExpandableCard.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +400 -386
- package/dist/index.js.map +1 -1
- package/package.json +67 -67
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as y, jsx as
|
|
1
|
+
import { jsxs as y, jsx as l, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import B, { useMemo as Ie, useEffect as W, createContext as je, useContext as Oe, useState as $, useCallback as ve, useRef as ce } from "react";
|
|
3
3
|
import { Oval as Te } from "react-loader-spinner";
|
|
4
4
|
import { createPortal as $e } from "react-dom";
|
|
@@ -12,11 +12,11 @@ function we(e) {
|
|
|
12
12
|
} else for (t in e) e[t] && (o && (o += " "), o += t);
|
|
13
13
|
return o;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Re() {
|
|
16
16
|
for (var e, r, t = 0, o = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (r = we(e)) && (o && (o += " "), o += r);
|
|
17
17
|
return o;
|
|
18
18
|
}
|
|
19
|
-
const ue = "-",
|
|
19
|
+
const ue = "-", Fe = (e) => {
|
|
20
20
|
const r = Ve(e), {
|
|
21
21
|
conflictingClassGroups: t,
|
|
22
22
|
conflictingClassGroupModifiers: o
|
|
@@ -39,10 +39,10 @@ const ue = "-", Re = (e) => {
|
|
|
39
39
|
return a;
|
|
40
40
|
if (r.validators.length === 0)
|
|
41
41
|
return;
|
|
42
|
-
const
|
|
42
|
+
const s = e.join(ue);
|
|
43
43
|
return r.validators.find(({
|
|
44
44
|
validator: i
|
|
45
|
-
}) => i(
|
|
45
|
+
}) => i(s))?.classGroupId;
|
|
46
46
|
}, pe = /^\[(.+)\]$/, _e = (e) => {
|
|
47
47
|
if (pe.test(e)) {
|
|
48
48
|
const r = pe.exec(e)[1], t = r?.substring(0, r.indexOf(":"));
|
|
@@ -57,14 +57,14 @@ const ue = "-", Re = (e) => {
|
|
|
57
57
|
nextPart: /* @__PURE__ */ new Map(),
|
|
58
58
|
validators: []
|
|
59
59
|
};
|
|
60
|
-
return Ge(Object.entries(e.classGroups), t).forEach(([
|
|
61
|
-
de(i, o,
|
|
60
|
+
return Ge(Object.entries(e.classGroups), t).forEach(([s, i]) => {
|
|
61
|
+
de(i, o, s, r);
|
|
62
62
|
}), o;
|
|
63
63
|
}, de = (e, r, t, o) => {
|
|
64
64
|
e.forEach((a) => {
|
|
65
65
|
if (typeof a == "string") {
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const s = a === "" ? r : me(r, a);
|
|
67
|
+
s.classGroupId = t;
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
if (typeof a == "function") {
|
|
@@ -78,8 +78,8 @@ const ue = "-", Re = (e) => {
|
|
|
78
78
|
});
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
Object.entries(a).forEach(([
|
|
82
|
-
de(i, me(r,
|
|
81
|
+
Object.entries(a).forEach(([s, i]) => {
|
|
82
|
+
de(i, me(r, s), t, o);
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
}, me = (e, r) => {
|
|
@@ -91,7 +91,7 @@ const ue = "-", Re = (e) => {
|
|
|
91
91
|
}), t = t.nextPart.get(o);
|
|
92
92
|
}), t;
|
|
93
93
|
}, Be = (e) => e.isThemeGetter, Ge = (e, r) => r ? e.map(([t, o]) => {
|
|
94
|
-
const a = o.map((
|
|
94
|
+
const a = o.map((s) => typeof s == "string" ? r + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([i, n]) => [r + i, n])) : s);
|
|
95
95
|
return [t, a];
|
|
96
96
|
}) : e, We = (e) => {
|
|
97
97
|
if (e < 1)
|
|
@@ -102,33 +102,33 @@ const ue = "-", Re = (e) => {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
let r = 0, t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
105
|
-
const a = (
|
|
106
|
-
t.set(
|
|
105
|
+
const a = (s, i) => {
|
|
106
|
+
t.set(s, i), r++, r > e && (r = 0, o = t, t = /* @__PURE__ */ new Map());
|
|
107
107
|
};
|
|
108
108
|
return {
|
|
109
|
-
get(
|
|
110
|
-
let i = t.get(
|
|
109
|
+
get(s) {
|
|
110
|
+
let i = t.get(s);
|
|
111
111
|
if (i !== void 0)
|
|
112
112
|
return i;
|
|
113
|
-
if ((i = o.get(
|
|
114
|
-
return a(
|
|
113
|
+
if ((i = o.get(s)) !== void 0)
|
|
114
|
+
return a(s, i), i;
|
|
115
115
|
},
|
|
116
|
-
set(
|
|
117
|
-
t.has(
|
|
116
|
+
set(s, i) {
|
|
117
|
+
t.has(s) ? t.set(s, i) : a(s, i);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
}, Ce = "!", He = (e) => {
|
|
121
121
|
const {
|
|
122
122
|
separator: r,
|
|
123
123
|
experimentalParseClassName: t
|
|
124
|
-
} = e, o = r.length === 1, a = r[0],
|
|
124
|
+
} = e, o = r.length === 1, a = r[0], s = r.length, i = (n) => {
|
|
125
125
|
const c = [];
|
|
126
126
|
let d = 0, b = 0, k;
|
|
127
127
|
for (let u = 0; u < n.length; u++) {
|
|
128
128
|
let w = n[u];
|
|
129
129
|
if (d === 0) {
|
|
130
|
-
if (w === a && (o || n.slice(u, u +
|
|
131
|
-
c.push(n.slice(b, u)), b = u +
|
|
130
|
+
if (w === a && (o || n.slice(u, u + s) === r)) {
|
|
131
|
+
c.push(n.slice(b, u)), b = u + s;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
134
|
if (w === "/") {
|
|
@@ -138,7 +138,7 @@ const ue = "-", Re = (e) => {
|
|
|
138
138
|
}
|
|
139
139
|
w === "[" ? d++ : w === "]" && d--;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const h = c.length === 0 ? n : n.substring(b), v = h.startsWith(Ce), m = v ? h.substring(1) : h, x = k && k > b ? k - b : void 0;
|
|
142
142
|
return {
|
|
143
143
|
modifiers: c,
|
|
144
144
|
hasImportantModifier: v,
|
|
@@ -161,41 +161,41 @@ const ue = "-", Re = (e) => {
|
|
|
161
161
|
}, Ye = (e) => ({
|
|
162
162
|
cache: We(e.cacheSize),
|
|
163
163
|
parseClassName: He(e),
|
|
164
|
-
...
|
|
164
|
+
...Fe(e)
|
|
165
165
|
}), Je = /\s+/, Ke = (e, r) => {
|
|
166
166
|
const {
|
|
167
167
|
parseClassName: t,
|
|
168
168
|
getClassGroupId: o,
|
|
169
169
|
getConflictingClassGroupIds: a
|
|
170
|
-
} = r,
|
|
170
|
+
} = r, s = [], i = e.trim().split(Je);
|
|
171
171
|
let n = "";
|
|
172
172
|
for (let c = i.length - 1; c >= 0; c -= 1) {
|
|
173
173
|
const d = i[c], {
|
|
174
174
|
modifiers: b,
|
|
175
175
|
hasImportantModifier: k,
|
|
176
|
-
baseClassName:
|
|
176
|
+
baseClassName: h,
|
|
177
177
|
maybePostfixModifierPosition: v
|
|
178
178
|
} = t(d);
|
|
179
|
-
let m = !!v, x = o(m ?
|
|
179
|
+
let m = !!v, x = o(m ? h.substring(0, v) : h);
|
|
180
180
|
if (!x) {
|
|
181
181
|
if (!m) {
|
|
182
182
|
n = d + (n.length > 0 ? " " + n : n);
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
185
|
-
if (x = o(
|
|
185
|
+
if (x = o(h), !x) {
|
|
186
186
|
n = d + (n.length > 0 ? " " + n : n);
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
189
|
m = !1;
|
|
190
190
|
}
|
|
191
|
-
const u = Ue(b).join(":"), w = k ? u + Ce : u,
|
|
192
|
-
if (
|
|
191
|
+
const u = Ue(b).join(":"), w = k ? u + Ce : u, f = w + x;
|
|
192
|
+
if (s.includes(f))
|
|
193
193
|
continue;
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
for (let E = 0; E <
|
|
197
|
-
const z =
|
|
198
|
-
|
|
194
|
+
s.push(f);
|
|
195
|
+
const D = a(x, m);
|
|
196
|
+
for (let E = 0; E < D.length; ++E) {
|
|
197
|
+
const z = D[E];
|
|
198
|
+
s.push(w + z);
|
|
199
199
|
}
|
|
200
200
|
n = d + (n.length > 0 ? " " + n : n);
|
|
201
201
|
}
|
|
@@ -216,10 +216,10 @@ const Ne = (e) => {
|
|
|
216
216
|
return t;
|
|
217
217
|
};
|
|
218
218
|
function Xe(e, ...r) {
|
|
219
|
-
let t, o, a,
|
|
219
|
+
let t, o, a, s = i;
|
|
220
220
|
function i(c) {
|
|
221
221
|
const d = r.reduce((b, k) => k(b), e());
|
|
222
|
-
return t = Ye(d), o = t.cache.get, a = t.cache.set,
|
|
222
|
+
return t = Ye(d), o = t.cache.get, a = t.cache.set, s = n, n(c);
|
|
223
223
|
}
|
|
224
224
|
function n(c) {
|
|
225
225
|
const d = o(c);
|
|
@@ -229,7 +229,7 @@ function Xe(e, ...r) {
|
|
|
229
229
|
return a(c, b), b;
|
|
230
230
|
}
|
|
231
231
|
return function() {
|
|
232
|
-
return
|
|
232
|
+
return s(Ze.apply(null, arguments));
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
const I = (e) => {
|
|
@@ -244,7 +244,7 @@ const I = (e) => {
|
|
|
244
244
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
245
245
|
rr.test(e) && !tr.test(e)
|
|
246
246
|
), ze = () => !1, mr = (e) => or.test(e), br = (e) => nr.test(e), gr = () => {
|
|
247
|
-
const e = I("colors"), r = I("spacing"), t = I("blur"), o = I("brightness"), a = I("borderColor"),
|
|
247
|
+
const e = I("colors"), r = I("spacing"), t = I("blur"), o = I("brightness"), a = I("borderColor"), s = I("borderRadius"), i = I("borderSpacing"), n = I("borderWidth"), c = I("contrast"), d = I("grayscale"), b = I("hueRotate"), k = I("invert"), h = I("gap"), v = I("gradientColorStops"), m = I("gradientColorStopPositions"), x = I("inset"), u = I("margin"), w = I("opacity"), f = I("padding"), D = I("saturate"), E = I("scale"), z = I("sepia"), P = I("skew"), g = I("space"), j = I("translate"), R = () => ["auto", "contain", "none"], G = () => ["auto", "hidden", "clip", "visible", "scroll"], K = () => ["auto", N, r], S = () => [N, r], M = () => ["", H, U], A = () => ["auto", Q, N], V = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], Z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], C = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], L = () => ["", "0", N], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], _ = () => [Q, N];
|
|
248
248
|
return {
|
|
249
249
|
cacheSize: 500,
|
|
250
250
|
separator: ":",
|
|
@@ -258,9 +258,9 @@ const I = (e) => {
|
|
|
258
258
|
borderSpacing: S(),
|
|
259
259
|
borderWidth: M(),
|
|
260
260
|
contrast: _(),
|
|
261
|
-
grayscale:
|
|
261
|
+
grayscale: L(),
|
|
262
262
|
hueRotate: _(),
|
|
263
|
-
invert:
|
|
263
|
+
invert: L(),
|
|
264
264
|
gap: S(),
|
|
265
265
|
gradientColorStops: [e],
|
|
266
266
|
gradientColorStopPositions: [ar, U],
|
|
@@ -270,7 +270,7 @@ const I = (e) => {
|
|
|
270
270
|
padding: S(),
|
|
271
271
|
saturate: _(),
|
|
272
272
|
scale: _(),
|
|
273
|
-
sepia:
|
|
273
|
+
sepia: L(),
|
|
274
274
|
skew: _(),
|
|
275
275
|
space: S(),
|
|
276
276
|
translate: S()
|
|
@@ -301,14 +301,14 @@ const I = (e) => {
|
|
|
301
301
|
* @see https://tailwindcss.com/docs/break-after
|
|
302
302
|
*/
|
|
303
303
|
"break-after": [{
|
|
304
|
-
"break-after":
|
|
304
|
+
"break-after": F()
|
|
305
305
|
}],
|
|
306
306
|
/**
|
|
307
307
|
* Break Before
|
|
308
308
|
* @see https://tailwindcss.com/docs/break-before
|
|
309
309
|
*/
|
|
310
310
|
"break-before": [{
|
|
311
|
-
"break-before":
|
|
311
|
+
"break-before": F()
|
|
312
312
|
}],
|
|
313
313
|
/**
|
|
314
314
|
* Break Inside
|
|
@@ -395,21 +395,21 @@ const I = (e) => {
|
|
|
395
395
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
396
396
|
*/
|
|
397
397
|
overscroll: [{
|
|
398
|
-
overscroll:
|
|
398
|
+
overscroll: R()
|
|
399
399
|
}],
|
|
400
400
|
/**
|
|
401
401
|
* Overscroll Behavior X
|
|
402
402
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
403
403
|
*/
|
|
404
404
|
"overscroll-x": [{
|
|
405
|
-
"overscroll-x":
|
|
405
|
+
"overscroll-x": R()
|
|
406
406
|
}],
|
|
407
407
|
/**
|
|
408
408
|
* Overscroll Behavior Y
|
|
409
409
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
410
410
|
*/
|
|
411
411
|
"overscroll-y": [{
|
|
412
|
-
"overscroll-y":
|
|
412
|
+
"overscroll-y": R()
|
|
413
413
|
}],
|
|
414
414
|
/**
|
|
415
415
|
* Position
|
|
@@ -525,14 +525,14 @@ const I = (e) => {
|
|
|
525
525
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
526
526
|
*/
|
|
527
527
|
grow: [{
|
|
528
|
-
grow:
|
|
528
|
+
grow: L()
|
|
529
529
|
}],
|
|
530
530
|
/**
|
|
531
531
|
* Flex Shrink
|
|
532
532
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
533
533
|
*/
|
|
534
534
|
shrink: [{
|
|
535
|
-
shrink:
|
|
535
|
+
shrink: L()
|
|
536
536
|
}],
|
|
537
537
|
/**
|
|
538
538
|
* Order
|
|
@@ -627,21 +627,21 @@ const I = (e) => {
|
|
|
627
627
|
* @see https://tailwindcss.com/docs/gap
|
|
628
628
|
*/
|
|
629
629
|
gap: [{
|
|
630
|
-
gap: [
|
|
630
|
+
gap: [h]
|
|
631
631
|
}],
|
|
632
632
|
/**
|
|
633
633
|
* Gap X
|
|
634
634
|
* @see https://tailwindcss.com/docs/gap
|
|
635
635
|
*/
|
|
636
636
|
"gap-x": [{
|
|
637
|
-
"gap-x": [
|
|
637
|
+
"gap-x": [h]
|
|
638
638
|
}],
|
|
639
639
|
/**
|
|
640
640
|
* Gap Y
|
|
641
641
|
* @see https://tailwindcss.com/docs/gap
|
|
642
642
|
*/
|
|
643
643
|
"gap-y": [{
|
|
644
|
-
"gap-y": [
|
|
644
|
+
"gap-y": [h]
|
|
645
645
|
}],
|
|
646
646
|
/**
|
|
647
647
|
* Justify Content
|
|
@@ -712,63 +712,63 @@ const I = (e) => {
|
|
|
712
712
|
* @see https://tailwindcss.com/docs/padding
|
|
713
713
|
*/
|
|
714
714
|
p: [{
|
|
715
|
-
p: [
|
|
715
|
+
p: [f]
|
|
716
716
|
}],
|
|
717
717
|
/**
|
|
718
718
|
* Padding X
|
|
719
719
|
* @see https://tailwindcss.com/docs/padding
|
|
720
720
|
*/
|
|
721
721
|
px: [{
|
|
722
|
-
px: [
|
|
722
|
+
px: [f]
|
|
723
723
|
}],
|
|
724
724
|
/**
|
|
725
725
|
* Padding Y
|
|
726
726
|
* @see https://tailwindcss.com/docs/padding
|
|
727
727
|
*/
|
|
728
728
|
py: [{
|
|
729
|
-
py: [
|
|
729
|
+
py: [f]
|
|
730
730
|
}],
|
|
731
731
|
/**
|
|
732
732
|
* Padding Start
|
|
733
733
|
* @see https://tailwindcss.com/docs/padding
|
|
734
734
|
*/
|
|
735
735
|
ps: [{
|
|
736
|
-
ps: [
|
|
736
|
+
ps: [f]
|
|
737
737
|
}],
|
|
738
738
|
/**
|
|
739
739
|
* Padding End
|
|
740
740
|
* @see https://tailwindcss.com/docs/padding
|
|
741
741
|
*/
|
|
742
742
|
pe: [{
|
|
743
|
-
pe: [
|
|
743
|
+
pe: [f]
|
|
744
744
|
}],
|
|
745
745
|
/**
|
|
746
746
|
* Padding Top
|
|
747
747
|
* @see https://tailwindcss.com/docs/padding
|
|
748
748
|
*/
|
|
749
749
|
pt: [{
|
|
750
|
-
pt: [
|
|
750
|
+
pt: [f]
|
|
751
751
|
}],
|
|
752
752
|
/**
|
|
753
753
|
* Padding Right
|
|
754
754
|
* @see https://tailwindcss.com/docs/padding
|
|
755
755
|
*/
|
|
756
756
|
pr: [{
|
|
757
|
-
pr: [
|
|
757
|
+
pr: [f]
|
|
758
758
|
}],
|
|
759
759
|
/**
|
|
760
760
|
* Padding Bottom
|
|
761
761
|
* @see https://tailwindcss.com/docs/padding
|
|
762
762
|
*/
|
|
763
763
|
pb: [{
|
|
764
|
-
pb: [
|
|
764
|
+
pb: [f]
|
|
765
765
|
}],
|
|
766
766
|
/**
|
|
767
767
|
* Padding Left
|
|
768
768
|
* @see https://tailwindcss.com/docs/padding
|
|
769
769
|
*/
|
|
770
770
|
pl: [{
|
|
771
|
-
pl: [
|
|
771
|
+
pl: [f]
|
|
772
772
|
}],
|
|
773
773
|
/**
|
|
774
774
|
* Margin
|
|
@@ -1258,105 +1258,105 @@ const I = (e) => {
|
|
|
1258
1258
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1259
1259
|
*/
|
|
1260
1260
|
rounded: [{
|
|
1261
|
-
rounded: [
|
|
1261
|
+
rounded: [s]
|
|
1262
1262
|
}],
|
|
1263
1263
|
/**
|
|
1264
1264
|
* Border Radius Start
|
|
1265
1265
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1266
1266
|
*/
|
|
1267
1267
|
"rounded-s": [{
|
|
1268
|
-
"rounded-s": [
|
|
1268
|
+
"rounded-s": [s]
|
|
1269
1269
|
}],
|
|
1270
1270
|
/**
|
|
1271
1271
|
* Border Radius End
|
|
1272
1272
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1273
1273
|
*/
|
|
1274
1274
|
"rounded-e": [{
|
|
1275
|
-
"rounded-e": [
|
|
1275
|
+
"rounded-e": [s]
|
|
1276
1276
|
}],
|
|
1277
1277
|
/**
|
|
1278
1278
|
* Border Radius Top
|
|
1279
1279
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1280
1280
|
*/
|
|
1281
1281
|
"rounded-t": [{
|
|
1282
|
-
"rounded-t": [
|
|
1282
|
+
"rounded-t": [s]
|
|
1283
1283
|
}],
|
|
1284
1284
|
/**
|
|
1285
1285
|
* Border Radius Right
|
|
1286
1286
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1287
1287
|
*/
|
|
1288
1288
|
"rounded-r": [{
|
|
1289
|
-
"rounded-r": [
|
|
1289
|
+
"rounded-r": [s]
|
|
1290
1290
|
}],
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Border Radius Bottom
|
|
1293
1293
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1294
1294
|
*/
|
|
1295
1295
|
"rounded-b": [{
|
|
1296
|
-
"rounded-b": [
|
|
1296
|
+
"rounded-b": [s]
|
|
1297
1297
|
}],
|
|
1298
1298
|
/**
|
|
1299
1299
|
* Border Radius Left
|
|
1300
1300
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1301
1301
|
*/
|
|
1302
1302
|
"rounded-l": [{
|
|
1303
|
-
"rounded-l": [
|
|
1303
|
+
"rounded-l": [s]
|
|
1304
1304
|
}],
|
|
1305
1305
|
/**
|
|
1306
1306
|
* Border Radius Start Start
|
|
1307
1307
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1308
1308
|
*/
|
|
1309
1309
|
"rounded-ss": [{
|
|
1310
|
-
"rounded-ss": [
|
|
1310
|
+
"rounded-ss": [s]
|
|
1311
1311
|
}],
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Border Radius Start End
|
|
1314
1314
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1315
1315
|
*/
|
|
1316
1316
|
"rounded-se": [{
|
|
1317
|
-
"rounded-se": [
|
|
1317
|
+
"rounded-se": [s]
|
|
1318
1318
|
}],
|
|
1319
1319
|
/**
|
|
1320
1320
|
* Border Radius End End
|
|
1321
1321
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1322
1322
|
*/
|
|
1323
1323
|
"rounded-ee": [{
|
|
1324
|
-
"rounded-ee": [
|
|
1324
|
+
"rounded-ee": [s]
|
|
1325
1325
|
}],
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Border Radius End Start
|
|
1328
1328
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1329
1329
|
*/
|
|
1330
1330
|
"rounded-es": [{
|
|
1331
|
-
"rounded-es": [
|
|
1331
|
+
"rounded-es": [s]
|
|
1332
1332
|
}],
|
|
1333
1333
|
/**
|
|
1334
1334
|
* Border Radius Top Left
|
|
1335
1335
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1336
1336
|
*/
|
|
1337
1337
|
"rounded-tl": [{
|
|
1338
|
-
"rounded-tl": [
|
|
1338
|
+
"rounded-tl": [s]
|
|
1339
1339
|
}],
|
|
1340
1340
|
/**
|
|
1341
1341
|
* Border Radius Top Right
|
|
1342
1342
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1343
1343
|
*/
|
|
1344
1344
|
"rounded-tr": [{
|
|
1345
|
-
"rounded-tr": [
|
|
1345
|
+
"rounded-tr": [s]
|
|
1346
1346
|
}],
|
|
1347
1347
|
/**
|
|
1348
1348
|
* Border Radius Bottom Right
|
|
1349
1349
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1350
1350
|
*/
|
|
1351
1351
|
"rounded-br": [{
|
|
1352
|
-
"rounded-br": [
|
|
1352
|
+
"rounded-br": [s]
|
|
1353
1353
|
}],
|
|
1354
1354
|
/**
|
|
1355
1355
|
* Border Radius Bottom Left
|
|
1356
1356
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1357
1357
|
*/
|
|
1358
1358
|
"rounded-bl": [{
|
|
1359
|
-
"rounded-bl": [
|
|
1359
|
+
"rounded-bl": [s]
|
|
1360
1360
|
}],
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Border Width
|
|
@@ -1710,7 +1710,7 @@ const I = (e) => {
|
|
|
1710
1710
|
* @see https://tailwindcss.com/docs/saturate
|
|
1711
1711
|
*/
|
|
1712
1712
|
saturate: [{
|
|
1713
|
-
saturate: [
|
|
1713
|
+
saturate: [D]
|
|
1714
1714
|
}],
|
|
1715
1715
|
/**
|
|
1716
1716
|
* Sepia
|
|
@@ -1781,7 +1781,7 @@ const I = (e) => {
|
|
|
1781
1781
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1782
1782
|
*/
|
|
1783
1783
|
"backdrop-saturate": [{
|
|
1784
|
-
"backdrop-saturate": [
|
|
1784
|
+
"backdrop-saturate": [D]
|
|
1785
1785
|
}],
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Backdrop Sepia
|
|
@@ -2274,15 +2274,15 @@ const I = (e) => {
|
|
|
2274
2274
|
};
|
|
2275
2275
|
}, fr = /* @__PURE__ */ Xe(gr);
|
|
2276
2276
|
function p(...e) {
|
|
2277
|
-
return fr(
|
|
2277
|
+
return fr(Re(e));
|
|
2278
2278
|
}
|
|
2279
2279
|
function hr(e) {
|
|
2280
|
-
const r = parseInt(e.slice(1, 3), 16) / 255, t = parseInt(e.slice(3, 5), 16) / 255, o = parseInt(e.slice(5, 7), 16) / 255, a = Math.max(r, t, o),
|
|
2280
|
+
const r = parseInt(e.slice(1, 3), 16) / 255, t = parseInt(e.slice(3, 5), 16) / 255, o = parseInt(e.slice(5, 7), 16) / 255, a = Math.max(r, t, o), s = Math.min(r, t, o);
|
|
2281
2281
|
let i = 0, n = 0;
|
|
2282
|
-
const c = (a +
|
|
2283
|
-
if (a !==
|
|
2284
|
-
const d = a -
|
|
2285
|
-
switch (n = c > 0.5 ? d / (2 - a -
|
|
2282
|
+
const c = (a + s) / 2;
|
|
2283
|
+
if (a !== s) {
|
|
2284
|
+
const d = a - s;
|
|
2285
|
+
switch (n = c > 0.5 ? d / (2 - a - s) : d / (a + s), a) {
|
|
2286
2286
|
case r:
|
|
2287
2287
|
i = ((t - o) / d + (t < o ? 6 : 0)) / 6;
|
|
2288
2288
|
break;
|
|
@@ -2298,8 +2298,8 @@ function hr(e) {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
function be(e, r, t) {
|
|
2300
2300
|
t /= 100;
|
|
2301
|
-
const o = r * Math.min(t, 1 - t) / 100, a = (
|
|
2302
|
-
const i = (
|
|
2301
|
+
const o = r * Math.min(t, 1 - t) / 100, a = (s) => {
|
|
2302
|
+
const i = (s + e / 30) % 12, n = t - o * Math.max(Math.min(i - 3, 9 - i, 1), -1);
|
|
2303
2303
|
return Math.round(255 * n).toString(16).padStart(2, "0");
|
|
2304
2304
|
};
|
|
2305
2305
|
return `#${a(0)}${a(8)}${a(4)}`;
|
|
@@ -2378,15 +2378,15 @@ function Jr({
|
|
|
2378
2378
|
theme: r
|
|
2379
2379
|
}) {
|
|
2380
2380
|
const t = Ie(() => {
|
|
2381
|
-
const o = r?.colors || {}, a = o.primary ? le(o.primary) : null,
|
|
2381
|
+
const o = r?.colors || {}, a = o.primary ? le(o.primary) : null, s = o.secondary ? le(o.secondary) : null, i = o.danger ? le(o.danger) : null;
|
|
2382
2382
|
return {
|
|
2383
2383
|
colors: {
|
|
2384
2384
|
primary: o.primary || O.colors.primary,
|
|
2385
2385
|
primaryLight: a?.light || O.colors.primaryLight,
|
|
2386
2386
|
primaryDark: a?.dark || O.colors.primaryDark,
|
|
2387
2387
|
secondary: o.secondary || O.colors.secondary,
|
|
2388
|
-
secondaryLight:
|
|
2389
|
-
secondaryDark:
|
|
2388
|
+
secondaryLight: s?.light || O.colors.secondaryLight,
|
|
2389
|
+
secondaryDark: s?.dark || O.colors.secondaryDark,
|
|
2390
2390
|
danger: o.danger || O.colors.danger,
|
|
2391
2391
|
dangerLight: i?.light || O.colors.dangerLight,
|
|
2392
2392
|
dangerDark: i?.dark || O.colors.dangerDark,
|
|
@@ -2411,11 +2411,13 @@ function Jr({
|
|
|
2411
2411
|
const yr = {
|
|
2412
2412
|
primary: "bg-primary text-white border-primary hover:bg-primary-dark hover:border-primary-dark active:bg-active",
|
|
2413
2413
|
secondary: "bg-secondary text-white border-secondary hover:bg-secondary-dark hover:border-secondary-dark",
|
|
2414
|
-
outline: "bg-transparent text-primary border-primary hover:bg-primary hover:text-white",
|
|
2414
|
+
"primary-outline": "bg-transparent text-primary border-primary hover:bg-primary hover:text-white",
|
|
2415
|
+
"secondary-outline": "bg-transparent text-secondary border-secondary hover:bg-secondary hover:text-white",
|
|
2415
2416
|
ghost: "bg-transparent text-primary border-transparent hover:bg-primary hover:text-white hover:border-primary",
|
|
2416
2417
|
light: "bg-light text-text border-border hover:bg-background-light",
|
|
2417
2418
|
danger: "bg-transparent text-danger border-danger hover:text-white hover:bg-danger hover:border-danger active:bg-danger-dark",
|
|
2418
|
-
link: "bg-transparent text-secondary-light! underline hover:text-primary! border-0"
|
|
2419
|
+
link: "bg-transparent text-secondary-light! underline hover:text-primary! border-0",
|
|
2420
|
+
dark: "bg-gray-800 text-white border-gray-800 hover:bg-gray-900 hover:border-gray-900"
|
|
2419
2421
|
}, xr = {
|
|
2420
2422
|
sm: "px-3 py-1.5 text-sm",
|
|
2421
2423
|
md: "px-4 py-2 text-base",
|
|
@@ -2428,7 +2430,7 @@ function q({
|
|
|
2428
2430
|
disabled: t = !1,
|
|
2429
2431
|
type: o = "button",
|
|
2430
2432
|
variant: a = "primary",
|
|
2431
|
-
size:
|
|
2433
|
+
size: s = "md",
|
|
2432
2434
|
fullWidth: i = !1,
|
|
2433
2435
|
loading: n = !1,
|
|
2434
2436
|
className: c = "",
|
|
@@ -2443,7 +2445,7 @@ function q({
|
|
|
2443
2445
|
className: p(
|
|
2444
2446
|
"inline-flex shadow-md hover:shadow-lg cursor-pointer items-center justify-center font-medium rounded-lg border transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50",
|
|
2445
2447
|
t || n ? "bg-disabled text-text-muted border-disabled cursor-not-allowed hover:bg-disabled hover:border-disabled hover:text-text-muted" : yr[a],
|
|
2446
|
-
xr[
|
|
2448
|
+
xr[s],
|
|
2447
2449
|
i && "w-full",
|
|
2448
2450
|
n && "cursor-wait opacity-75",
|
|
2449
2451
|
c
|
|
@@ -2457,7 +2459,7 @@ function q({
|
|
|
2457
2459
|
fill: "none",
|
|
2458
2460
|
viewBox: "0 0 24 24",
|
|
2459
2461
|
children: [
|
|
2460
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ l(
|
|
2461
2463
|
"circle",
|
|
2462
2464
|
{
|
|
2463
2465
|
className: "opacity-25",
|
|
@@ -2468,7 +2470,7 @@ function q({
|
|
|
2468
2470
|
strokeWidth: "4"
|
|
2469
2471
|
}
|
|
2470
2472
|
),
|
|
2471
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ l(
|
|
2472
2474
|
"path",
|
|
2473
2475
|
{
|
|
2474
2476
|
className: "opacity-75",
|
|
@@ -2490,14 +2492,14 @@ function vr({
|
|
|
2490
2492
|
type: t = "text",
|
|
2491
2493
|
value: o,
|
|
2492
2494
|
onChange: a,
|
|
2493
|
-
placeholder:
|
|
2495
|
+
placeholder: s,
|
|
2494
2496
|
label: i,
|
|
2495
2497
|
error: n,
|
|
2496
2498
|
disabled: c = !1,
|
|
2497
2499
|
required: d = !1,
|
|
2498
2500
|
colorScheme: b = "secondary",
|
|
2499
2501
|
className: k = "",
|
|
2500
|
-
...
|
|
2502
|
+
...h
|
|
2501
2503
|
}) {
|
|
2502
2504
|
const v = () => {
|
|
2503
2505
|
const x = "w-full p-4 border-2 rounded-lg text-base bg-white transition-all duration-300 focus:outline-none focus:ring-1 disabled:bg-light disabled:text-text-muted disabled:cursor-not-allowed placeholder:text-text-muted";
|
|
@@ -2528,11 +2530,11 @@ function vr({
|
|
|
2528
2530
|
className: p("block mb-2 text-sm font-medium", m()),
|
|
2529
2531
|
children: [
|
|
2530
2532
|
i,
|
|
2531
|
-
d && /* @__PURE__ */
|
|
2533
|
+
d && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
2532
2534
|
]
|
|
2533
2535
|
}
|
|
2534
2536
|
),
|
|
2535
|
-
/* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ l(
|
|
2536
2538
|
"input",
|
|
2537
2539
|
{
|
|
2538
2540
|
id: e,
|
|
@@ -2540,14 +2542,14 @@ function vr({
|
|
|
2540
2542
|
type: t,
|
|
2541
2543
|
value: o,
|
|
2542
2544
|
onChange: a,
|
|
2543
|
-
placeholder:
|
|
2545
|
+
placeholder: s,
|
|
2544
2546
|
disabled: c,
|
|
2545
2547
|
required: d,
|
|
2546
2548
|
className: v(),
|
|
2547
|
-
...
|
|
2549
|
+
...h
|
|
2548
2550
|
}
|
|
2549
2551
|
),
|
|
2550
|
-
n && /* @__PURE__ */
|
|
2552
|
+
n && /* @__PURE__ */ l("span", { className: "block mt-1 text-xs text-danger font-medium", children: n })
|
|
2551
2553
|
] });
|
|
2552
2554
|
}
|
|
2553
2555
|
function wr({
|
|
@@ -2556,14 +2558,14 @@ function wr({
|
|
|
2556
2558
|
value: t,
|
|
2557
2559
|
onChange: o,
|
|
2558
2560
|
placeholder: a,
|
|
2559
|
-
label:
|
|
2561
|
+
label: s,
|
|
2560
2562
|
error: i,
|
|
2561
2563
|
disabled: n = !1,
|
|
2562
2564
|
required: c = !1,
|
|
2563
2565
|
colorScheme: d = "secondary",
|
|
2564
2566
|
className: b = "",
|
|
2565
2567
|
rows: k = 4,
|
|
2566
|
-
...
|
|
2568
|
+
...h
|
|
2567
2569
|
}) {
|
|
2568
2570
|
const v = () => {
|
|
2569
2571
|
const x = "w-full p-4 border-2 rounded-lg text-base bg-white transition-all duration-300 focus:outline-none focus:ring-1 disabled:bg-light disabled:text-text-muted disabled:cursor-not-allowed placeholder:text-text-muted resize-none";
|
|
@@ -2587,18 +2589,18 @@ function wr({
|
|
|
2587
2589
|
}
|
|
2588
2590
|
}, m = () => d === "primary" ? "text-primary" : "text-secondary";
|
|
2589
2591
|
return /* @__PURE__ */ y("div", { className: p("mb-6", b), children: [
|
|
2590
|
-
|
|
2592
|
+
s && /* @__PURE__ */ y(
|
|
2591
2593
|
"label",
|
|
2592
2594
|
{
|
|
2593
2595
|
htmlFor: e,
|
|
2594
2596
|
className: p("block mb-2 text-sm font-medium", m()),
|
|
2595
2597
|
children: [
|
|
2596
|
-
|
|
2597
|
-
c && /* @__PURE__ */
|
|
2598
|
+
s,
|
|
2599
|
+
c && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
2598
2600
|
]
|
|
2599
2601
|
}
|
|
2600
2602
|
),
|
|
2601
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ l(
|
|
2602
2604
|
"textarea",
|
|
2603
2605
|
{
|
|
2604
2606
|
id: e,
|
|
@@ -2610,10 +2612,10 @@ function wr({
|
|
|
2610
2612
|
required: c,
|
|
2611
2613
|
rows: k,
|
|
2612
2614
|
className: v(),
|
|
2613
|
-
...
|
|
2615
|
+
...h
|
|
2614
2616
|
}
|
|
2615
2617
|
),
|
|
2616
|
-
i && /* @__PURE__ */
|
|
2618
|
+
i && /* @__PURE__ */ l("span", { className: "block mt-1 text-xs text-danger font-medium", children: i })
|
|
2617
2619
|
] });
|
|
2618
2620
|
}
|
|
2619
2621
|
const De = { Input: vr, InputArea: wr };
|
|
@@ -2623,7 +2625,7 @@ function Kr({
|
|
|
2623
2625
|
checked: t = !1,
|
|
2624
2626
|
onChange: o,
|
|
2625
2627
|
disabled: a = !1,
|
|
2626
|
-
label:
|
|
2628
|
+
label: s,
|
|
2627
2629
|
colorScheme: i = "secondary",
|
|
2628
2630
|
size: n = "md",
|
|
2629
2631
|
className: c = "",
|
|
@@ -2633,9 +2635,10 @@ function Kr({
|
|
|
2633
2635
|
W(() => {
|
|
2634
2636
|
k(t);
|
|
2635
2637
|
}, [t]);
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2638
|
-
|
|
2638
|
+
const h = () => {
|
|
2639
|
+
if (a) return;
|
|
2640
|
+
const f = !b;
|
|
2641
|
+
k(f), o?.(f);
|
|
2639
2642
|
}, v = () => ({
|
|
2640
2643
|
primary: {
|
|
2641
2644
|
bg: "bg-primary",
|
|
@@ -2679,57 +2682,68 @@ function Kr({
|
|
|
2679
2682
|
return "translate-x-6";
|
|
2680
2683
|
}
|
|
2681
2684
|
}, w = v();
|
|
2682
|
-
return /* @__PURE__ */ y(
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
name: r,
|
|
2690
|
-
checked: b,
|
|
2691
|
-
onChange: f,
|
|
2692
|
-
disabled: a,
|
|
2693
|
-
className: "sr-only",
|
|
2694
|
-
...d
|
|
2695
|
-
}
|
|
2685
|
+
return /* @__PURE__ */ y(
|
|
2686
|
+
"div",
|
|
2687
|
+
{
|
|
2688
|
+
className: p(
|
|
2689
|
+
"flex items-center gap-3",
|
|
2690
|
+
a ? "cursor-not-allowed" : "cursor-pointer",
|
|
2691
|
+
c
|
|
2696
2692
|
),
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
{
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2693
|
+
onClick: h,
|
|
2694
|
+
children: [
|
|
2695
|
+
/* @__PURE__ */ y("div", { className: "relative", children: [
|
|
2696
|
+
/* @__PURE__ */ l(
|
|
2697
|
+
"input",
|
|
2698
|
+
{
|
|
2699
|
+
type: "checkbox",
|
|
2700
|
+
id: e,
|
|
2701
|
+
name: r,
|
|
2702
|
+
checked: b,
|
|
2703
|
+
onChange: () => {
|
|
2704
|
+
},
|
|
2705
|
+
disabled: a,
|
|
2706
|
+
className: "sr-only",
|
|
2707
|
+
"aria-label": s || r,
|
|
2708
|
+
...d
|
|
2709
|
+
}
|
|
2706
2710
|
),
|
|
2707
|
-
|
|
2708
|
-
"
|
|
2711
|
+
/* @__PURE__ */ l(
|
|
2712
|
+
"div",
|
|
2709
2713
|
{
|
|
2710
2714
|
className: p(
|
|
2711
|
-
"
|
|
2712
|
-
|
|
2713
|
-
|
|
2715
|
+
"block transition-all duration-300 rounded-full border-2",
|
|
2716
|
+
m(),
|
|
2717
|
+
b ? p(w.bg, w.border) : "bg-gray-200 border-gray-300",
|
|
2718
|
+
a ? "opacity-50" : "hover:shadow-md"
|
|
2719
|
+
),
|
|
2720
|
+
children: /* @__PURE__ */ l(
|
|
2721
|
+
"span",
|
|
2722
|
+
{
|
|
2723
|
+
className: p(
|
|
2724
|
+
"absolute top-0.5 left-0.5 inline-block rounded-full bg-white transition-all duration-300 shadow-sm",
|
|
2725
|
+
x(),
|
|
2726
|
+
u()
|
|
2727
|
+
)
|
|
2728
|
+
}
|
|
2714
2729
|
)
|
|
2715
2730
|
}
|
|
2716
2731
|
)
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
)
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
] });
|
|
2732
|
+
] }),
|
|
2733
|
+
s && /* @__PURE__ */ l(
|
|
2734
|
+
"span",
|
|
2735
|
+
{
|
|
2736
|
+
className: p(
|
|
2737
|
+
"text-sm font-medium select-none",
|
|
2738
|
+
w.text,
|
|
2739
|
+
a && "opacity-50"
|
|
2740
|
+
),
|
|
2741
|
+
children: s
|
|
2742
|
+
}
|
|
2743
|
+
)
|
|
2744
|
+
]
|
|
2745
|
+
}
|
|
2746
|
+
);
|
|
2733
2747
|
}
|
|
2734
2748
|
const kr = ({
|
|
2735
2749
|
size: e = 40,
|
|
@@ -2737,7 +2751,7 @@ const kr = ({
|
|
|
2737
2751
|
wrapperClass: t = "",
|
|
2738
2752
|
ariaLabel: o = "Cargando...",
|
|
2739
2753
|
label: a = "Cargando...",
|
|
2740
|
-
visible:
|
|
2754
|
+
visible: s = !0,
|
|
2741
2755
|
direction: i = "column"
|
|
2742
2756
|
}) => {
|
|
2743
2757
|
const n = {
|
|
@@ -2749,11 +2763,11 @@ const kr = ({
|
|
|
2749
2763
|
...r
|
|
2750
2764
|
};
|
|
2751
2765
|
return /* @__PURE__ */ y("div", { style: n, className: t, children: [
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
/* @__PURE__ */
|
|
2766
|
+
/* @__PURE__ */ l("label", { children: a }),
|
|
2767
|
+
/* @__PURE__ */ l(
|
|
2754
2768
|
Te,
|
|
2755
2769
|
{
|
|
2756
|
-
visible:
|
|
2770
|
+
visible: s,
|
|
2757
2771
|
height: e,
|
|
2758
2772
|
width: e,
|
|
2759
2773
|
ariaLabel: o,
|
|
@@ -2770,12 +2784,12 @@ const kr = ({
|
|
|
2770
2784
|
onlyForgotPassword: t = !1,
|
|
2771
2785
|
className: o = "",
|
|
2772
2786
|
onLogin: a,
|
|
2773
|
-
onForgotPassword:
|
|
2787
|
+
onForgotPassword: s
|
|
2774
2788
|
}) => {
|
|
2775
2789
|
const [i, n] = $({
|
|
2776
2790
|
email: "",
|
|
2777
2791
|
password: ""
|
|
2778
|
-
}), [c, d] = $({}), [b, k] = $(!1), [
|
|
2792
|
+
}), [c, d] = $({}), [b, k] = $(!1), [h, v] = $(
|
|
2779
2793
|
t ? "forgot" : "login"
|
|
2780
2794
|
), m = (P, g) => {
|
|
2781
2795
|
switch (P) {
|
|
@@ -2788,16 +2802,16 @@ const kr = ({
|
|
|
2788
2802
|
}
|
|
2789
2803
|
}, x = (P) => {
|
|
2790
2804
|
const { name: g, value: j } = P.target;
|
|
2791
|
-
n((
|
|
2792
|
-
...
|
|
2805
|
+
n((R) => ({
|
|
2806
|
+
...R,
|
|
2793
2807
|
[g]: j
|
|
2794
|
-
})), c[g] && d((
|
|
2795
|
-
...
|
|
2808
|
+
})), c[g] && d((R) => ({
|
|
2809
|
+
...R,
|
|
2796
2810
|
[g]: ""
|
|
2797
2811
|
}));
|
|
2798
2812
|
}, u = () => {
|
|
2799
2813
|
const P = {}, g = m("email", i.email);
|
|
2800
|
-
if (g && (P.email = g),
|
|
2814
|
+
if (g && (P.email = g), h === "login") {
|
|
2801
2815
|
const j = m("password", i.password);
|
|
2802
2816
|
j && (P.password = j);
|
|
2803
2817
|
}
|
|
@@ -2806,7 +2820,7 @@ const kr = ({
|
|
|
2806
2820
|
if (P.preventDefault(), !!u()) {
|
|
2807
2821
|
k(!0);
|
|
2808
2822
|
try {
|
|
2809
|
-
switch (
|
|
2823
|
+
switch (h) {
|
|
2810
2824
|
case "login":
|
|
2811
2825
|
a && await a({
|
|
2812
2826
|
email: i.email,
|
|
@@ -2814,7 +2828,7 @@ const kr = ({
|
|
|
2814
2828
|
});
|
|
2815
2829
|
break;
|
|
2816
2830
|
case "forgot":
|
|
2817
|
-
|
|
2831
|
+
s && await s(i.email);
|
|
2818
2832
|
break;
|
|
2819
2833
|
}
|
|
2820
2834
|
} catch (g) {
|
|
@@ -2823,12 +2837,12 @@ const kr = ({
|
|
|
2823
2837
|
k(!1);
|
|
2824
2838
|
}
|
|
2825
2839
|
}
|
|
2826
|
-
},
|
|
2840
|
+
}, f = (P) => {
|
|
2827
2841
|
v(P), d({}), n({ email: i.email, password: "" });
|
|
2828
|
-
},
|
|
2829
|
-
switch (
|
|
2842
|
+
}, D = () => {
|
|
2843
|
+
switch (h) {
|
|
2830
2844
|
case "forgot":
|
|
2831
|
-
return /* @__PURE__ */
|
|
2845
|
+
return /* @__PURE__ */ l(
|
|
2832
2846
|
ie,
|
|
2833
2847
|
{
|
|
2834
2848
|
id: "email",
|
|
@@ -2845,7 +2859,7 @@ const kr = ({
|
|
|
2845
2859
|
);
|
|
2846
2860
|
default:
|
|
2847
2861
|
return /* @__PURE__ */ y(Ae, { children: [
|
|
2848
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ l(
|
|
2849
2863
|
ie,
|
|
2850
2864
|
{
|
|
2851
2865
|
id: "email",
|
|
@@ -2860,7 +2874,7 @@ const kr = ({
|
|
|
2860
2874
|
colorScheme: "secondary"
|
|
2861
2875
|
}
|
|
2862
2876
|
),
|
|
2863
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ l(
|
|
2864
2878
|
ie,
|
|
2865
2879
|
{
|
|
2866
2880
|
id: "password",
|
|
@@ -2878,7 +2892,7 @@ const kr = ({
|
|
|
2878
2892
|
] });
|
|
2879
2893
|
}
|
|
2880
2894
|
}, E = () => {
|
|
2881
|
-
switch (
|
|
2895
|
+
switch (h) {
|
|
2882
2896
|
case "forgot":
|
|
2883
2897
|
return t ? "Cambiar Contraseña" : "Recuperar Contraseña";
|
|
2884
2898
|
default:
|
|
@@ -2886,22 +2900,22 @@ const kr = ({
|
|
|
2886
2900
|
}
|
|
2887
2901
|
}, z = () => {
|
|
2888
2902
|
if (b)
|
|
2889
|
-
return /* @__PURE__ */
|
|
2890
|
-
switch (
|
|
2903
|
+
return /* @__PURE__ */ l(kr, { size: 20, wrapperStyle: { minHeight: "auto" } });
|
|
2904
|
+
switch (h) {
|
|
2891
2905
|
case "forgot":
|
|
2892
2906
|
return "Enviar Enlace";
|
|
2893
2907
|
default:
|
|
2894
2908
|
return "Entrar";
|
|
2895
2909
|
}
|
|
2896
2910
|
};
|
|
2897
|
-
return /* @__PURE__ */
|
|
2911
|
+
return /* @__PURE__ */ l(
|
|
2898
2912
|
"div",
|
|
2899
2913
|
{
|
|
2900
2914
|
className: `flex justify-center items-center min-h-[90vh] p-6 bg-background sm:p-4 ${o || ""}`,
|
|
2901
2915
|
children: /* @__PURE__ */ y("div", { className: "w-full max-w-100 p-12 bg-white rounded-2xl shadow-lg animate-[fadeIn_0.3s_ease-out] sm:p-8", children: [
|
|
2902
|
-
/* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
2904
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ l("h2", { className: "text-center mb-12 text-3xl font-semibold text-primary sm:text-2xl sm:mb-8", children: E() }),
|
|
2917
|
+
/* @__PURE__ */ l("div", { className: "space-y-4 mb-6", children: D() }),
|
|
2918
|
+
/* @__PURE__ */ l("form", { onSubmit: w, children: /* @__PURE__ */ l(
|
|
2905
2919
|
q,
|
|
2906
2920
|
{
|
|
2907
2921
|
type: "submit",
|
|
@@ -2914,11 +2928,11 @@ const kr = ({
|
|
|
2914
2928
|
children: !b && z()
|
|
2915
2929
|
}
|
|
2916
2930
|
) }),
|
|
2917
|
-
|
|
2931
|
+
h === "login" && r && /* @__PURE__ */ l(
|
|
2918
2932
|
q,
|
|
2919
2933
|
{
|
|
2920
2934
|
type: "button",
|
|
2921
|
-
onClick: () =>
|
|
2935
|
+
onClick: () => f("forgot"),
|
|
2922
2936
|
variant: "link",
|
|
2923
2937
|
size: "sm",
|
|
2924
2938
|
fullWidth: !0,
|
|
@@ -2926,11 +2940,11 @@ const kr = ({
|
|
|
2926
2940
|
children: "¿Olvidaste tu contraseña?"
|
|
2927
2941
|
}
|
|
2928
2942
|
),
|
|
2929
|
-
|
|
2943
|
+
h === "forgot" && !t && /* @__PURE__ */ l(
|
|
2930
2944
|
q,
|
|
2931
2945
|
{
|
|
2932
2946
|
type: "button",
|
|
2933
|
-
onClick: () =>
|
|
2947
|
+
onClick: () => f("login"),
|
|
2934
2948
|
variant: "link",
|
|
2935
2949
|
size: "sm",
|
|
2936
2950
|
fullWidth: !0,
|
|
@@ -2953,9 +2967,9 @@ function Nr(e, r) {
|
|
|
2953
2967
|
if (e == null) return {};
|
|
2954
2968
|
var t = Mr(e, r), o, a;
|
|
2955
2969
|
if (Object.getOwnPropertySymbols) {
|
|
2956
|
-
var
|
|
2957
|
-
for (a = 0; a <
|
|
2958
|
-
o =
|
|
2970
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
2971
|
+
for (a = 0; a < s.length; a++)
|
|
2972
|
+
o = s[a], !(r.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (t[o] = e[o]);
|
|
2959
2973
|
}
|
|
2960
2974
|
return t;
|
|
2961
2975
|
}
|
|
@@ -3032,7 +3046,7 @@ function Sr(e) {
|
|
|
3032
3046
|
var {
|
|
3033
3047
|
attr: o,
|
|
3034
3048
|
size: a,
|
|
3035
|
-
title:
|
|
3049
|
+
title: s
|
|
3036
3050
|
} = e, i = Nr(e, Cr), n = a || t.size || "1em", c;
|
|
3037
3051
|
return t.className && (c = t.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ B.createElement("svg", ne({
|
|
3038
3052
|
stroke: "currentColor",
|
|
@@ -3046,7 +3060,7 @@ function Sr(e) {
|
|
|
3046
3060
|
height: n,
|
|
3047
3061
|
width: n,
|
|
3048
3062
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3049
|
-
}),
|
|
3063
|
+
}), s && /* @__PURE__ */ B.createElement("title", null, s), e.children);
|
|
3050
3064
|
};
|
|
3051
3065
|
return fe !== void 0 ? /* @__PURE__ */ B.createElement(fe.Consumer, null, (t) => r(t)) : r(Se);
|
|
3052
3066
|
}
|
|
@@ -3108,17 +3122,17 @@ function qr({
|
|
|
3108
3122
|
placeholder: t = "Search...",
|
|
3109
3123
|
disabled: o = !1,
|
|
3110
3124
|
colorScheme: a = "secondary",
|
|
3111
|
-
label:
|
|
3125
|
+
label: s,
|
|
3112
3126
|
className: i = "",
|
|
3113
3127
|
debounceDelay: n = 500,
|
|
3114
3128
|
...c
|
|
3115
3129
|
}) {
|
|
3116
|
-
const [d, b] = $(e || ""), k = Pr(d, n),
|
|
3130
|
+
const [d, b] = $(e || ""), k = Pr(d, n), h = ve(r, [r]);
|
|
3117
3131
|
W(() => {
|
|
3118
|
-
|
|
3119
|
-
}, [k,
|
|
3132
|
+
h(k);
|
|
3133
|
+
}, [k, h]);
|
|
3120
3134
|
const v = () => {
|
|
3121
|
-
const u = "w-full px-4 py-
|
|
3135
|
+
const u = "w-full px-4 py-2.5 pl-10 border-2 rounded-lg text-base bg-white transition-all duration-300 focus:outline-none focus:ring-1 disabled:bg-light disabled:text-text-muted disabled:cursor-not-allowed placeholder:text-text-muted";
|
|
3122
3136
|
switch (a) {
|
|
3123
3137
|
case "primary":
|
|
3124
3138
|
return p(
|
|
@@ -3134,15 +3148,15 @@ function qr({
|
|
|
3134
3148
|
}
|
|
3135
3149
|
}, m = () => a === "primary" ? "text-primary" : "text-secondary", x = () => a === "primary" ? "text-primary" : "text-secondary";
|
|
3136
3150
|
return /* @__PURE__ */ y("div", { className: p("mb-0", i), children: [
|
|
3137
|
-
|
|
3151
|
+
s && /* @__PURE__ */ l(
|
|
3138
3152
|
"label",
|
|
3139
3153
|
{
|
|
3140
3154
|
className: p("block mb-2 text-sm font-medium", x()),
|
|
3141
|
-
children:
|
|
3155
|
+
children: s
|
|
3142
3156
|
}
|
|
3143
3157
|
),
|
|
3144
3158
|
/* @__PURE__ */ y("div", { className: "relative w-full", children: [
|
|
3145
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ l(
|
|
3146
3160
|
Er,
|
|
3147
3161
|
{
|
|
3148
3162
|
className: p(
|
|
@@ -3151,7 +3165,7 @@ function qr({
|
|
|
3151
3165
|
)
|
|
3152
3166
|
}
|
|
3153
3167
|
),
|
|
3154
|
-
/* @__PURE__ */
|
|
3168
|
+
/* @__PURE__ */ l(
|
|
3155
3169
|
"input",
|
|
3156
3170
|
{
|
|
3157
3171
|
type: "text",
|
|
@@ -3178,7 +3192,7 @@ function et({
|
|
|
3178
3192
|
setPagination: t,
|
|
3179
3193
|
totalPages: o,
|
|
3180
3194
|
currentPage: a,
|
|
3181
|
-
showLabel:
|
|
3195
|
+
showLabel: s = !0,
|
|
3182
3196
|
className: i = "",
|
|
3183
3197
|
isLoading: n = !1,
|
|
3184
3198
|
fetchPage: c
|
|
@@ -3188,30 +3202,30 @@ function et({
|
|
|
3188
3202
|
...v,
|
|
3189
3203
|
page: v.page - 1
|
|
3190
3204
|
})));
|
|
3191
|
-
},
|
|
3205
|
+
}, h = () => {
|
|
3192
3206
|
n || (c ? c(a + 1) : t && t((v) => ({
|
|
3193
3207
|
...v,
|
|
3194
3208
|
page: v.page + 1
|
|
3195
3209
|
})));
|
|
3196
3210
|
};
|
|
3197
3211
|
return /* @__PURE__ */ y("div", { className: p("flex justify-center items-center mt-8", i), children: [
|
|
3198
|
-
/* @__PURE__ */
|
|
3212
|
+
/* @__PURE__ */ l(
|
|
3199
3213
|
q,
|
|
3200
3214
|
{
|
|
3201
3215
|
disabled: d,
|
|
3202
3216
|
onClick: k,
|
|
3203
3217
|
variant: "secondary",
|
|
3204
|
-
children: /* @__PURE__ */
|
|
3218
|
+
children: /* @__PURE__ */ l(Ar, { size: 14 })
|
|
3205
3219
|
}
|
|
3206
3220
|
),
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3221
|
+
/* @__PURE__ */ l("h5", { className: "font-bold mx-2.5 text-text", children: `${s ? e : ""} ${a}${s ? ` ${r} ` : " / "}${o}` }),
|
|
3222
|
+
/* @__PURE__ */ l(
|
|
3209
3223
|
q,
|
|
3210
3224
|
{
|
|
3211
3225
|
disabled: b,
|
|
3212
|
-
onClick:
|
|
3226
|
+
onClick: h,
|
|
3213
3227
|
variant: "primary",
|
|
3214
|
-
children: /* @__PURE__ */
|
|
3228
|
+
children: /* @__PURE__ */ l(Ir, { size: 14 })
|
|
3215
3229
|
}
|
|
3216
3230
|
)
|
|
3217
3231
|
] });
|
|
@@ -3231,17 +3245,17 @@ function rt({
|
|
|
3231
3245
|
children: t,
|
|
3232
3246
|
defaultExpanded: o = !1,
|
|
3233
3247
|
expanded: a,
|
|
3234
|
-
onToggle:
|
|
3248
|
+
onToggle: s,
|
|
3235
3249
|
className: i = "",
|
|
3236
3250
|
colorScheme: n = "primary",
|
|
3237
3251
|
icon: c,
|
|
3238
3252
|
disabled: d = !1,
|
|
3239
3253
|
headerExtra: b
|
|
3240
3254
|
}) {
|
|
3241
|
-
const [k,
|
|
3255
|
+
const [k, h] = $(o), v = a !== void 0 ? a : k, m = () => {
|
|
3242
3256
|
if (d) return;
|
|
3243
|
-
const
|
|
3244
|
-
a === void 0 && f
|
|
3257
|
+
const f = !v;
|
|
3258
|
+
a === void 0 && h(f), s?.(f);
|
|
3245
3259
|
}, x = () => n === "primary" ? "border-primary" : "border-secondary", u = () => n === "primary" ? "text-primary" : "text-secondary", w = () => n === "primary" ? "hover:bg-primary/5" : "hover:bg-secondary/5";
|
|
3246
3260
|
return /* @__PURE__ */ y(
|
|
3247
3261
|
"div",
|
|
@@ -3267,21 +3281,21 @@ function rt({
|
|
|
3267
3281
|
"aria-expanded": v,
|
|
3268
3282
|
children: [
|
|
3269
3283
|
/* @__PURE__ */ y("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
3270
|
-
c && /* @__PURE__ */
|
|
3284
|
+
c && /* @__PURE__ */ l("div", { className: p("shrink-0", u()), children: c }),
|
|
3271
3285
|
/* @__PURE__ */ y("div", { className: "flex-1 min-w-0", children: [
|
|
3272
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ l(
|
|
3273
3287
|
"h3",
|
|
3274
3288
|
{
|
|
3275
3289
|
className: p("text-base font-medium truncate", u()),
|
|
3276
3290
|
children: e
|
|
3277
3291
|
}
|
|
3278
3292
|
),
|
|
3279
|
-
r && /* @__PURE__ */
|
|
3293
|
+
r && /* @__PURE__ */ l("p", { className: "text-sm text-text-muted truncate mt-0.5", children: r })
|
|
3280
3294
|
] })
|
|
3281
3295
|
] }),
|
|
3282
3296
|
/* @__PURE__ */ y("div", { className: "flex items-center gap-3 shrink-0", children: [
|
|
3283
|
-
b && /* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3297
|
+
b && /* @__PURE__ */ l("div", { onClick: (f) => f.stopPropagation(), children: b }),
|
|
3298
|
+
/* @__PURE__ */ l(
|
|
3285
3299
|
"div",
|
|
3286
3300
|
{
|
|
3287
3301
|
className: p(
|
|
@@ -3289,21 +3303,21 @@ function rt({
|
|
|
3289
3303
|
u(),
|
|
3290
3304
|
v && "rotate-180"
|
|
3291
3305
|
),
|
|
3292
|
-
children: /* @__PURE__ */
|
|
3306
|
+
children: /* @__PURE__ */ l(Pe, { className: "h-5 w-5" })
|
|
3293
3307
|
}
|
|
3294
3308
|
)
|
|
3295
3309
|
] })
|
|
3296
3310
|
]
|
|
3297
3311
|
}
|
|
3298
3312
|
),
|
|
3299
|
-
/* @__PURE__ */
|
|
3313
|
+
/* @__PURE__ */ l(
|
|
3300
3314
|
"div",
|
|
3301
3315
|
{
|
|
3302
3316
|
className: p(
|
|
3303
3317
|
"overflow-hidden transition-all duration-300 ease-in-out",
|
|
3304
3318
|
v ? "max-h-500 opacity-100" : "max-h-0 opacity-0"
|
|
3305
3319
|
),
|
|
3306
|
-
children: /* @__PURE__ */
|
|
3320
|
+
children: /* @__PURE__ */ l("div", { className: p("p-4 pt-0 border-t-0", x()), children: /* @__PURE__ */ l("div", { className: "border-t border-border pt-4", children: t }) })
|
|
3307
3321
|
}
|
|
3308
3322
|
)
|
|
3309
3323
|
]
|
|
@@ -3311,7 +3325,7 @@ function rt({
|
|
|
3311
3325
|
);
|
|
3312
3326
|
}
|
|
3313
3327
|
function tt({ children: e, className: r = "" }) {
|
|
3314
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ l("div", { className: p("py-4", r), children: e });
|
|
3315
3329
|
}
|
|
3316
3330
|
function ot({
|
|
3317
3331
|
options: e,
|
|
@@ -3319,7 +3333,7 @@ function ot({
|
|
|
3319
3333
|
onChange: t,
|
|
3320
3334
|
children: o,
|
|
3321
3335
|
className: a = "",
|
|
3322
|
-
colorScheme:
|
|
3336
|
+
colorScheme: s = "primary",
|
|
3323
3337
|
variant: i = "underline"
|
|
3324
3338
|
}) {
|
|
3325
3339
|
const [n, c] = $(
|
|
@@ -3335,23 +3349,23 @@ function ot({
|
|
|
3335
3349
|
return p(
|
|
3336
3350
|
w,
|
|
3337
3351
|
"rounded-lg",
|
|
3338
|
-
u ?
|
|
3352
|
+
u ? s === "primary" ? "bg-primary text-white" : "bg-secondary text-white" : "text-text-muted hover:bg-background-light"
|
|
3339
3353
|
);
|
|
3340
3354
|
case "pills":
|
|
3341
3355
|
return p(
|
|
3342
3356
|
w,
|
|
3343
3357
|
"rounded-full",
|
|
3344
|
-
u ?
|
|
3358
|
+
u ? s === "primary" ? "bg-primary/10 text-primary border-2 border-primary" : "bg-secondary/10 text-secondary border-2 border-secondary" : "text-text-muted hover:bg-background-light border-2 border-transparent"
|
|
3345
3359
|
);
|
|
3346
3360
|
case "underline":
|
|
3347
3361
|
default:
|
|
3348
3362
|
return p(
|
|
3349
3363
|
w,
|
|
3350
3364
|
"border-b-2 flex items-center gap-2",
|
|
3351
|
-
u ?
|
|
3365
|
+
u ? s === "primary" ? "border-primary text-primary" : "border-secondary text-secondary" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
3352
3366
|
);
|
|
3353
3367
|
}
|
|
3354
|
-
},
|
|
3368
|
+
}, h = () => {
|
|
3355
3369
|
switch (i) {
|
|
3356
3370
|
case "filled":
|
|
3357
3371
|
return "flex gap-1 p-1 bg-background-light rounded-lg";
|
|
@@ -3363,7 +3377,7 @@ function ot({
|
|
|
3363
3377
|
}
|
|
3364
3378
|
}, v = B.Children.toArray(o).find((m) => B.isValidElement(m) ? m.props.value === d : !1);
|
|
3365
3379
|
return /* @__PURE__ */ y("div", { className: p("w-full", a), children: [
|
|
3366
|
-
/* @__PURE__ */
|
|
3380
|
+
/* @__PURE__ */ l("div", { className: h(), role: "tablist", children: e.map((m) => /* @__PURE__ */ y(
|
|
3367
3381
|
"button",
|
|
3368
3382
|
{
|
|
3369
3383
|
type: "button",
|
|
@@ -3374,13 +3388,13 @@ function ot({
|
|
|
3374
3388
|
onClick: () => !m.disabled && b(m.value),
|
|
3375
3389
|
className: k(m.value, m.disabled),
|
|
3376
3390
|
children: [
|
|
3377
|
-
m.icon && /* @__PURE__ */
|
|
3391
|
+
m.icon && /* @__PURE__ */ l("span", { className: "shrink-0", children: m.icon }),
|
|
3378
3392
|
m.label
|
|
3379
3393
|
]
|
|
3380
3394
|
},
|
|
3381
3395
|
m.value
|
|
3382
3396
|
)) }),
|
|
3383
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ l("div", { role: "tabpanel", id: `tabpanel-${d}`, children: v })
|
|
3384
3398
|
] });
|
|
3385
3399
|
}
|
|
3386
3400
|
function ye(e) {
|
|
@@ -3405,7 +3419,7 @@ const Tr = [
|
|
|
3405
3419
|
"Vie",
|
|
3406
3420
|
"Sáb",
|
|
3407
3421
|
"Dom"
|
|
3408
|
-
],
|
|
3422
|
+
], Rr = [
|
|
3409
3423
|
"January",
|
|
3410
3424
|
"February",
|
|
3411
3425
|
"March",
|
|
@@ -3418,7 +3432,7 @@ const Tr = [
|
|
|
3418
3432
|
"October",
|
|
3419
3433
|
"November",
|
|
3420
3434
|
"December"
|
|
3421
|
-
],
|
|
3435
|
+
], Fr = [
|
|
3422
3436
|
"Enero",
|
|
3423
3437
|
"Febrero",
|
|
3424
3438
|
"Marzo",
|
|
@@ -3445,7 +3459,7 @@ function nt({
|
|
|
3445
3459
|
disabled: t = !1,
|
|
3446
3460
|
className: o = "",
|
|
3447
3461
|
colorScheme: a = "secondary",
|
|
3448
|
-
lang:
|
|
3462
|
+
lang: s = "en",
|
|
3449
3463
|
...i
|
|
3450
3464
|
}) {
|
|
3451
3465
|
const [n, c] = $(e || /* @__PURE__ */ new Date()), d = {
|
|
@@ -3455,12 +3469,12 @@ function nt({
|
|
|
3455
3469
|
en: Tr,
|
|
3456
3470
|
es: $r
|
|
3457
3471
|
}, k = {
|
|
3458
|
-
en:
|
|
3459
|
-
es:
|
|
3460
|
-
},
|
|
3472
|
+
en: Rr,
|
|
3473
|
+
es: Fr
|
|
3474
|
+
}, h = _r(n), v = Vr(n), m = [];
|
|
3461
3475
|
for (let g = 0; g < v; g++)
|
|
3462
3476
|
m.push(null);
|
|
3463
|
-
for (let g = 1; g <=
|
|
3477
|
+
for (let g = 1; g <= h; g++) {
|
|
3464
3478
|
const j = new Date(
|
|
3465
3479
|
n.getFullYear(),
|
|
3466
3480
|
n.getMonth(),
|
|
@@ -3504,7 +3518,7 @@ function nt({
|
|
|
3504
3518
|
0
|
|
3505
3519
|
)
|
|
3506
3520
|
);
|
|
3507
|
-
},
|
|
3521
|
+
}, f = () => {
|
|
3508
3522
|
c(
|
|
3509
3523
|
new Date(
|
|
3510
3524
|
n.getFullYear() + 1,
|
|
@@ -3515,7 +3529,7 @@ function nt({
|
|
|
3515
3529
|
0
|
|
3516
3530
|
)
|
|
3517
3531
|
);
|
|
3518
|
-
},
|
|
3532
|
+
}, D = (g) => {
|
|
3519
3533
|
if (g && !t) {
|
|
3520
3534
|
const j = new Date(
|
|
3521
3535
|
g.getFullYear(),
|
|
@@ -3564,7 +3578,7 @@ function nt({
|
|
|
3564
3578
|
z.header
|
|
3565
3579
|
),
|
|
3566
3580
|
children: [
|
|
3567
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ l(
|
|
3568
3582
|
"button",
|
|
3569
3583
|
{
|
|
3570
3584
|
type: "button",
|
|
@@ -3575,29 +3589,29 @@ function nt({
|
|
|
3575
3589
|
z.button,
|
|
3576
3590
|
t && "opacity-50 cursor-not-allowed"
|
|
3577
3591
|
),
|
|
3578
|
-
children: /* @__PURE__ */
|
|
3592
|
+
children: /* @__PURE__ */ l(ye, { size: 18 })
|
|
3579
3593
|
}
|
|
3580
3594
|
),
|
|
3581
|
-
/* @__PURE__ */
|
|
3582
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ l("h2", { className: "font-semibold text-lg", children: n.getFullYear() }),
|
|
3596
|
+
/* @__PURE__ */ l(
|
|
3583
3597
|
"button",
|
|
3584
3598
|
{
|
|
3585
3599
|
type: "button",
|
|
3586
|
-
onClick:
|
|
3600
|
+
onClick: f,
|
|
3587
3601
|
disabled: t,
|
|
3588
3602
|
className: p(
|
|
3589
3603
|
"p-2 rounded-lg border transition-all duration-300",
|
|
3590
3604
|
z.button,
|
|
3591
3605
|
t && "opacity-50 cursor-not-allowed"
|
|
3592
3606
|
),
|
|
3593
|
-
children: /* @__PURE__ */
|
|
3607
|
+
children: /* @__PURE__ */ l(xe, { size: 18 })
|
|
3594
3608
|
}
|
|
3595
3609
|
)
|
|
3596
3610
|
]
|
|
3597
3611
|
}
|
|
3598
3612
|
),
|
|
3599
3613
|
/* @__PURE__ */ y("div", { className: p("flex items-center justify-between", z.header), children: [
|
|
3600
|
-
/* @__PURE__ */
|
|
3614
|
+
/* @__PURE__ */ l(
|
|
3601
3615
|
"button",
|
|
3602
3616
|
{
|
|
3603
3617
|
type: "button",
|
|
@@ -3608,11 +3622,11 @@ function nt({
|
|
|
3608
3622
|
z.button,
|
|
3609
3623
|
t && "opacity-50 cursor-not-allowed"
|
|
3610
3624
|
),
|
|
3611
|
-
children: /* @__PURE__ */
|
|
3625
|
+
children: /* @__PURE__ */ l(ye, { size: 18 })
|
|
3612
3626
|
}
|
|
3613
3627
|
),
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3628
|
+
/* @__PURE__ */ l("h2", { className: "font-semibold text-lg", children: k[s][n.getMonth()] }),
|
|
3629
|
+
/* @__PURE__ */ l(
|
|
3616
3630
|
"button",
|
|
3617
3631
|
{
|
|
3618
3632
|
type: "button",
|
|
@@ -3623,12 +3637,12 @@ function nt({
|
|
|
3623
3637
|
z.button,
|
|
3624
3638
|
t && "opacity-50 cursor-not-allowed"
|
|
3625
3639
|
),
|
|
3626
|
-
children: /* @__PURE__ */
|
|
3640
|
+
children: /* @__PURE__ */ l(xe, { size: 18 })
|
|
3627
3641
|
}
|
|
3628
3642
|
)
|
|
3629
3643
|
] })
|
|
3630
3644
|
] }),
|
|
3631
|
-
/* @__PURE__ */
|
|
3645
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-7 gap-2 mb-4", children: b[s].map((g) => /* @__PURE__ */ l(
|
|
3632
3646
|
"div",
|
|
3633
3647
|
{
|
|
3634
3648
|
className: p(
|
|
@@ -3639,11 +3653,11 @@ function nt({
|
|
|
3639
3653
|
},
|
|
3640
3654
|
g
|
|
3641
3655
|
)) }),
|
|
3642
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-7 gap-2", children: m.map((g, j) => /* @__PURE__ */ l(
|
|
3643
3657
|
"button",
|
|
3644
3658
|
{
|
|
3645
3659
|
type: "button",
|
|
3646
|
-
onClick: () =>
|
|
3660
|
+
onClick: () => D(g),
|
|
3647
3661
|
disabled: !g || t,
|
|
3648
3662
|
className: p(
|
|
3649
3663
|
"p-2 rounded-lg text-sm font-medium transition-all duration-300",
|
|
@@ -3658,14 +3672,14 @@ function nt({
|
|
|
3658
3672
|
},
|
|
3659
3673
|
j
|
|
3660
3674
|
)) }),
|
|
3661
|
-
e && /* @__PURE__ */
|
|
3675
|
+
e && /* @__PURE__ */ l(
|
|
3662
3676
|
"div",
|
|
3663
3677
|
{
|
|
3664
3678
|
className: p(
|
|
3665
3679
|
"mt-6 p-3 rounded-lg bg-background-dark border border-border text-center text-sm font-medium",
|
|
3666
3680
|
z.header
|
|
3667
3681
|
),
|
|
3668
|
-
children: e.toLocaleDateString(d[
|
|
3682
|
+
children: e.toLocaleDateString(d[s], {
|
|
3669
3683
|
year: "numeric",
|
|
3670
3684
|
month: "long",
|
|
3671
3685
|
day: "numeric"
|
|
@@ -3682,48 +3696,48 @@ function at({
|
|
|
3682
3696
|
loading: t,
|
|
3683
3697
|
loadingText: o = "Loading...",
|
|
3684
3698
|
actions: a,
|
|
3685
|
-
actionsHeader:
|
|
3699
|
+
actionsHeader: s = "Actions",
|
|
3686
3700
|
onRowClick: i,
|
|
3687
3701
|
className: n = "",
|
|
3688
3702
|
rowClassName: c = "",
|
|
3689
3703
|
cellClassName: d = "",
|
|
3690
3704
|
headerClassName: b = "",
|
|
3691
3705
|
emptyText: k = "No data available",
|
|
3692
|
-
showCount:
|
|
3706
|
+
showCount: h = !0,
|
|
3693
3707
|
countText: v = (x) => `Showing ${x} record${x !== 1 ? "s" : ""}`,
|
|
3694
3708
|
keyExtractor: m = (x, u) => x._id || x.id || u
|
|
3695
3709
|
}) {
|
|
3696
3710
|
if (t)
|
|
3697
|
-
return /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ l("div", { className: "flex justify-center items-center min-h-50", children: /* @__PURE__ */ l("div", { className: "text-lg text-text-light", children: o }) });
|
|
3698
3712
|
if (r.length === 0)
|
|
3699
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ l("div", { className: "flex justify-center items-center min-h-50", children: /* @__PURE__ */ l("div", { className: "text-lg text-text-muted", children: k }) });
|
|
3700
3714
|
const x = (u, w) => {
|
|
3701
|
-
const
|
|
3702
|
-
let
|
|
3703
|
-
if (
|
|
3715
|
+
const f = w.toLowerCase().replace(/\s+/g, "_");
|
|
3716
|
+
let D = u[f];
|
|
3717
|
+
if (D === void 0) {
|
|
3704
3718
|
const E = [
|
|
3705
|
-
|
|
3719
|
+
f.replace(/_/g, ""),
|
|
3706
3720
|
w.toLowerCase().replace(/\s+/g, ""),
|
|
3707
|
-
|
|
3721
|
+
f.replace(/_([a-z])/g, (z, P) => P.toUpperCase())
|
|
3708
3722
|
];
|
|
3709
3723
|
for (const z of E)
|
|
3710
3724
|
if (u[z] !== void 0) {
|
|
3711
|
-
|
|
3725
|
+
D = u[z];
|
|
3712
3726
|
break;
|
|
3713
3727
|
}
|
|
3714
3728
|
}
|
|
3715
|
-
if (
|
|
3729
|
+
if (D === void 0) {
|
|
3716
3730
|
const E = w.toLowerCase().split(" "), z = Object.keys(u).find(
|
|
3717
3731
|
(P) => E.some((g) => P.toLowerCase().includes(g))
|
|
3718
3732
|
);
|
|
3719
|
-
z && (
|
|
3733
|
+
z && (D = u[z]);
|
|
3720
3734
|
}
|
|
3721
|
-
return
|
|
3735
|
+
return D != null ? String(D) : "N/A";
|
|
3722
3736
|
};
|
|
3723
3737
|
return /* @__PURE__ */ y("div", { className: p("overflow-x-auto", n), children: [
|
|
3724
3738
|
/* @__PURE__ */ y("table", { className: "w-full border-collapse", children: [
|
|
3725
|
-
/* @__PURE__ */
|
|
3726
|
-
e.map((u, w) => /* @__PURE__ */
|
|
3739
|
+
/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ y("tr", { className: "border-b-2 border-border", children: [
|
|
3740
|
+
e.map((u, w) => /* @__PURE__ */ l(
|
|
3727
3741
|
"th",
|
|
3728
3742
|
{
|
|
3729
3743
|
className: p(
|
|
@@ -3734,18 +3748,18 @@ function at({
|
|
|
3734
3748
|
},
|
|
3735
3749
|
w
|
|
3736
3750
|
)),
|
|
3737
|
-
a && /* @__PURE__ */
|
|
3751
|
+
a && /* @__PURE__ */ l(
|
|
3738
3752
|
"th",
|
|
3739
3753
|
{
|
|
3740
3754
|
className: p(
|
|
3741
3755
|
"text-center py-3 px-4 font-semibold text-text",
|
|
3742
3756
|
b
|
|
3743
3757
|
),
|
|
3744
|
-
children:
|
|
3758
|
+
children: s
|
|
3745
3759
|
}
|
|
3746
3760
|
)
|
|
3747
3761
|
] }) }),
|
|
3748
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ l("tbody", { children: r.map((u, w) => /* @__PURE__ */ y(
|
|
3749
3763
|
"tr",
|
|
3750
3764
|
{
|
|
3751
3765
|
className: p(
|
|
@@ -3755,39 +3769,39 @@ function at({
|
|
|
3755
3769
|
),
|
|
3756
3770
|
onClick: () => i?.(u),
|
|
3757
3771
|
children: [
|
|
3758
|
-
e.map((
|
|
3759
|
-
a && /* @__PURE__ */
|
|
3772
|
+
e.map((f, D) => /* @__PURE__ */ l("td", { className: p("py-4 px-4", d), children: /* @__PURE__ */ l("div", { className: "text-text-light", children: x(u, f) }) }, D)),
|
|
3773
|
+
a && /* @__PURE__ */ l("td", { className: p("py-4 px-4", d), children: /* @__PURE__ */ l("div", { className: "flex gap-2 justify-center", children: a.map((f, D) => {
|
|
3760
3774
|
const E = (z) => {
|
|
3761
|
-
z?.stopPropagation(),
|
|
3775
|
+
z?.stopPropagation(), f.onClick?.(u);
|
|
3762
3776
|
};
|
|
3763
|
-
if (
|
|
3764
|
-
const z =
|
|
3777
|
+
if (f.component) {
|
|
3778
|
+
const z = f.component;
|
|
3765
3779
|
return /* @__PURE__ */ y(
|
|
3766
3780
|
z,
|
|
3767
3781
|
{
|
|
3768
3782
|
onClick: E,
|
|
3769
|
-
className:
|
|
3770
|
-
...
|
|
3783
|
+
className: f.className || "",
|
|
3784
|
+
...f.props || {},
|
|
3771
3785
|
children: [
|
|
3772
|
-
|
|
3773
|
-
|
|
3786
|
+
f.icon && /* @__PURE__ */ l("span", { className: "inline-block", children: B.createElement(f.icon) }),
|
|
3787
|
+
f.label && f.label
|
|
3774
3788
|
]
|
|
3775
3789
|
},
|
|
3776
|
-
|
|
3790
|
+
D
|
|
3777
3791
|
);
|
|
3778
3792
|
}
|
|
3779
3793
|
return /* @__PURE__ */ y(
|
|
3780
3794
|
q,
|
|
3781
3795
|
{
|
|
3782
3796
|
onClick: E,
|
|
3783
|
-
className:
|
|
3784
|
-
...
|
|
3797
|
+
className: f.className || "",
|
|
3798
|
+
...f.props || {},
|
|
3785
3799
|
children: [
|
|
3786
|
-
|
|
3787
|
-
|
|
3800
|
+
f.icon && /* @__PURE__ */ l("span", { className: "inline-block", children: B.createElement(f.icon) }),
|
|
3801
|
+
f.label && f.label
|
|
3788
3802
|
]
|
|
3789
3803
|
},
|
|
3790
|
-
|
|
3804
|
+
D
|
|
3791
3805
|
);
|
|
3792
3806
|
}) }) })
|
|
3793
3807
|
]
|
|
@@ -3795,7 +3809,7 @@ function at({
|
|
|
3795
3809
|
m(u, w)
|
|
3796
3810
|
)) })
|
|
3797
3811
|
] }),
|
|
3798
|
-
|
|
3812
|
+
h && r.length > 0 && /* @__PURE__ */ l("div", { className: "mt-6 text-center text-text-light text-sm", children: v(r.length) })
|
|
3799
3813
|
] });
|
|
3800
3814
|
}
|
|
3801
3815
|
function st({
|
|
@@ -3804,29 +3818,29 @@ function st({
|
|
|
3804
3818
|
value: t = "",
|
|
3805
3819
|
onChange: o,
|
|
3806
3820
|
multiple: a = !1,
|
|
3807
|
-
className:
|
|
3821
|
+
className: s = "",
|
|
3808
3822
|
searchable: i = !1,
|
|
3809
3823
|
onSearchInputCustom: n,
|
|
3810
3824
|
placeholder: c = "Select...",
|
|
3811
3825
|
disabled: d = !1,
|
|
3812
3826
|
error: b,
|
|
3813
3827
|
required: k = !1,
|
|
3814
|
-
colorScheme:
|
|
3828
|
+
colorScheme: h = "primary",
|
|
3815
3829
|
noResultsText: v = "No results found",
|
|
3816
3830
|
searchPlaceholder: m = "Search...",
|
|
3817
3831
|
...x
|
|
3818
3832
|
}) {
|
|
3819
|
-
const [u, w] = $(!1), [
|
|
3833
|
+
const [u, w] = $(!1), [f, D] = $(""), [E, z] = $({
|
|
3820
3834
|
top: 0,
|
|
3821
3835
|
left: 0,
|
|
3822
3836
|
openUpward: !1
|
|
3823
3837
|
}), P = Array.isArray(t) ? t : t ? [t] : [], [g, j] = $(
|
|
3824
|
-
P.map((C) => r.find((
|
|
3825
|
-
),
|
|
3838
|
+
P.map((C) => r.find((L) => L.value === C)).filter(Boolean)
|
|
3839
|
+
), R = ce(null), G = ce(null), K = () => {
|
|
3826
3840
|
const C = "w-full p-4 border-2 rounded-lg text-base bg-white transition-all duration-300 focus:outline-none focus:ring-1 disabled:bg-light disabled:text-text-muted disabled:cursor-not-allowed";
|
|
3827
3841
|
if (b)
|
|
3828
3842
|
return p(C, "border-danger focus:border-danger");
|
|
3829
|
-
switch (
|
|
3843
|
+
switch (h) {
|
|
3830
3844
|
case "primary":
|
|
3831
3845
|
return p(
|
|
3832
3846
|
C,
|
|
@@ -3839,16 +3853,16 @@ function st({
|
|
|
3839
3853
|
"text-secondary border-secondary focus:border-secondary"
|
|
3840
3854
|
);
|
|
3841
3855
|
}
|
|
3842
|
-
}, S = () =>
|
|
3856
|
+
}, S = () => h === "primary" ? "text-primary" : "text-secondary";
|
|
3843
3857
|
W(() => {
|
|
3844
|
-
const
|
|
3845
|
-
j(
|
|
3858
|
+
const L = (Array.isArray(t) ? t : t !== "" && t !== null && t !== void 0 ? [t] : []).map((F) => r.find((_) => _.value === F)).filter(Boolean);
|
|
3859
|
+
j(L);
|
|
3846
3860
|
}, [t, r]), W(() => {
|
|
3847
3861
|
u && i && G.current && G.current.focus();
|
|
3848
3862
|
}, [u, i]);
|
|
3849
3863
|
const M = ve(() => {
|
|
3850
|
-
if (!
|
|
3851
|
-
const C =
|
|
3864
|
+
if (!R.current) return;
|
|
3865
|
+
const C = R.current.getBoundingClientRect(), L = window.innerHeight, F = 250, X = L - C.bottom < F && C.top > F;
|
|
3852
3866
|
z({
|
|
3853
3867
|
top: X ? C.top : C.bottom,
|
|
3854
3868
|
left: C.left,
|
|
@@ -3857,40 +3871,40 @@ function st({
|
|
|
3857
3871
|
});
|
|
3858
3872
|
}, []);
|
|
3859
3873
|
W(() => {
|
|
3860
|
-
function C(
|
|
3861
|
-
|
|
3874
|
+
function C(F) {
|
|
3875
|
+
R.current && !R.current.contains(F.target) && w(!1);
|
|
3862
3876
|
}
|
|
3863
|
-
function
|
|
3877
|
+
function L() {
|
|
3864
3878
|
u && M();
|
|
3865
3879
|
}
|
|
3866
|
-
return document.addEventListener("mousedown", C), window.addEventListener("scroll",
|
|
3867
|
-
document.removeEventListener("mousedown", C), window.removeEventListener("scroll",
|
|
3880
|
+
return document.addEventListener("mousedown", C), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), () => {
|
|
3881
|
+
document.removeEventListener("mousedown", C), window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L);
|
|
3868
3882
|
};
|
|
3869
3883
|
}, [u, M]);
|
|
3870
3884
|
const A = (C) => {
|
|
3871
|
-
const
|
|
3885
|
+
const L = r.find(
|
|
3872
3886
|
(_) => _.value === C
|
|
3873
3887
|
);
|
|
3874
|
-
if (!
|
|
3875
|
-
let
|
|
3876
|
-
a ? (
|
|
3888
|
+
if (!L) return;
|
|
3889
|
+
let F;
|
|
3890
|
+
a ? (F = g.some((X) => X.value === C) ? g.filter((X) => X.value !== C) : [...g, L], j(F), o(F)) : (F = [L], j(F), o(L), w(!1), D(""));
|
|
3877
3891
|
}, V = (C) => {
|
|
3878
|
-
|
|
3892
|
+
D(C), n?.(C);
|
|
3879
3893
|
}, T = i ? r.filter(
|
|
3880
|
-
(C) => C.label.toLowerCase().includes(
|
|
3894
|
+
(C) => C.label.toLowerCase().includes(f.toLowerCase())
|
|
3881
3895
|
) : r, Z = () => g.length === 0 ? c : a ? g.length === 1 ? g[0].label : `${g.length} selected` : g[0]?.label || c;
|
|
3882
|
-
return /* @__PURE__ */ y("div", { className: p("mb-6",
|
|
3896
|
+
return /* @__PURE__ */ y("div", { className: p("mb-6", s), children: [
|
|
3883
3897
|
e && /* @__PURE__ */ y(
|
|
3884
3898
|
"label",
|
|
3885
3899
|
{
|
|
3886
3900
|
className: p("block mb-2 text-sm font-medium", S()),
|
|
3887
3901
|
children: [
|
|
3888
3902
|
e,
|
|
3889
|
-
k && /* @__PURE__ */
|
|
3903
|
+
k && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
3890
3904
|
]
|
|
3891
3905
|
}
|
|
3892
3906
|
),
|
|
3893
|
-
/* @__PURE__ */ y("div", { ref:
|
|
3907
|
+
/* @__PURE__ */ y("div", { ref: R, className: "relative w-full", children: [
|
|
3894
3908
|
/* @__PURE__ */ y(
|
|
3895
3909
|
"button",
|
|
3896
3910
|
{
|
|
@@ -3908,14 +3922,14 @@ function st({
|
|
|
3908
3922
|
...x,
|
|
3909
3923
|
children: [
|
|
3910
3924
|
/* @__PURE__ */ y("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3911
|
-
g.length > 0 && g[0].hex && /* @__PURE__ */
|
|
3925
|
+
g.length > 0 && g[0].hex && /* @__PURE__ */ l(
|
|
3912
3926
|
"div",
|
|
3913
3927
|
{
|
|
3914
3928
|
className: "h-4 w-4 rounded border border-border",
|
|
3915
3929
|
style: { backgroundColor: g[0].hex }
|
|
3916
3930
|
}
|
|
3917
3931
|
),
|
|
3918
|
-
/* @__PURE__ */
|
|
3932
|
+
/* @__PURE__ */ l(
|
|
3919
3933
|
"span",
|
|
3920
3934
|
{
|
|
3921
3935
|
className: g.length > 0 ? "" : "text-text-muted",
|
|
@@ -3923,14 +3937,14 @@ function st({
|
|
|
3923
3937
|
}
|
|
3924
3938
|
)
|
|
3925
3939
|
] }),
|
|
3926
|
-
/* @__PURE__ */
|
|
3940
|
+
/* @__PURE__ */ l(
|
|
3927
3941
|
"div",
|
|
3928
3942
|
{
|
|
3929
3943
|
className: p(
|
|
3930
3944
|
"h-5 w-5 transition-transform duration-200",
|
|
3931
3945
|
u && "rotate-180"
|
|
3932
3946
|
),
|
|
3933
|
-
children: /* @__PURE__ */
|
|
3947
|
+
children: /* @__PURE__ */ l(Pe, { className: "h-5 w-5" })
|
|
3934
3948
|
}
|
|
3935
3949
|
)
|
|
3936
3950
|
]
|
|
@@ -3941,7 +3955,7 @@ function st({
|
|
|
3941
3955
|
{
|
|
3942
3956
|
className: p(
|
|
3943
3957
|
"fixed z-9999 rounded-lg border-2 bg-white shadow-xl",
|
|
3944
|
-
b ? "border-danger" :
|
|
3958
|
+
b ? "border-danger" : h === "primary" ? "border-primary" : "border-secondary"
|
|
3945
3959
|
),
|
|
3946
3960
|
style: {
|
|
3947
3961
|
top: `${E.top + (E.openUpward ? 0 : 8)}px`,
|
|
@@ -3950,59 +3964,59 @@ function st({
|
|
|
3950
3964
|
transform: E.openUpward ? "translateY(-100%)" : "none"
|
|
3951
3965
|
},
|
|
3952
3966
|
children: [
|
|
3953
|
-
i && /* @__PURE__ */
|
|
3954
|
-
/* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
3967
|
+
i && /* @__PURE__ */ l("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ y("div", { className: "relative", children: [
|
|
3968
|
+
/* @__PURE__ */ l(Or, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-text-muted" }),
|
|
3969
|
+
/* @__PURE__ */ l(
|
|
3956
3970
|
"input",
|
|
3957
3971
|
{
|
|
3958
3972
|
ref: G,
|
|
3959
3973
|
type: "text",
|
|
3960
|
-
value:
|
|
3974
|
+
value: f,
|
|
3961
3975
|
onChange: (C) => V(C.target.value),
|
|
3962
3976
|
placeholder: m,
|
|
3963
3977
|
className: p(
|
|
3964
3978
|
"w-full rounded-lg border-2 py-2 pr-10 pl-10 text-sm transition-all duration-300 focus:outline-none focus:ring-1",
|
|
3965
|
-
|
|
3979
|
+
h === "primary" ? "border-primary text-primary" : "border-secondary text-secondary"
|
|
3966
3980
|
)
|
|
3967
3981
|
}
|
|
3968
3982
|
),
|
|
3969
|
-
|
|
3983
|
+
f && /* @__PURE__ */ l(
|
|
3970
3984
|
"button",
|
|
3971
3985
|
{
|
|
3972
3986
|
type: "button",
|
|
3973
|
-
onClick: () =>
|
|
3987
|
+
onClick: () => D(""),
|
|
3974
3988
|
className: "absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 transform text-text-muted hover:text-text",
|
|
3975
|
-
children: /* @__PURE__ */
|
|
3989
|
+
children: /* @__PURE__ */ l(jr, { className: "h-4 w-4" })
|
|
3976
3990
|
}
|
|
3977
3991
|
)
|
|
3978
3992
|
] }) }),
|
|
3979
3993
|
/* @__PURE__ */ y("div", { className: "max-h-60 overflow-y-auto py-1", children: [
|
|
3980
|
-
T.map((C) => /* @__PURE__ */
|
|
3994
|
+
T.map((C) => /* @__PURE__ */ l(
|
|
3981
3995
|
"button",
|
|
3982
3996
|
{
|
|
3983
3997
|
type: "button",
|
|
3984
3998
|
onClick: () => A(C.value ?? ""),
|
|
3985
3999
|
className: p(
|
|
3986
4000
|
"w-full px-4 py-3 text-left text-sm transition-colors",
|
|
3987
|
-
g.some((
|
|
4001
|
+
g.some((L) => L.value === C.value) ? h === "primary" ? "bg-primary/10 text-primary font-medium" : "bg-secondary/10 text-secondary font-medium" : "text-text hover:bg-background-light"
|
|
3988
4002
|
),
|
|
3989
4003
|
children: /* @__PURE__ */ y("div", { className: "flex items-center gap-3", children: [
|
|
3990
|
-
a && /* @__PURE__ */
|
|
4004
|
+
a && /* @__PURE__ */ l(
|
|
3991
4005
|
"div",
|
|
3992
4006
|
{
|
|
3993
4007
|
className: p(
|
|
3994
4008
|
"flex h-4 w-4 items-center justify-center rounded border-2 transition-colors",
|
|
3995
|
-
g.some((
|
|
4009
|
+
g.some((L) => L.value === C.value) ? h === "primary" ? "border-primary bg-primary" : "border-secondary bg-secondary" : "border-border"
|
|
3996
4010
|
),
|
|
3997
4011
|
children: g.some(
|
|
3998
|
-
(
|
|
3999
|
-
) && /* @__PURE__ */
|
|
4012
|
+
(L) => L.value === C.value
|
|
4013
|
+
) && /* @__PURE__ */ l(
|
|
4000
4014
|
"svg",
|
|
4001
4015
|
{
|
|
4002
4016
|
className: "h-3 w-3 text-white",
|
|
4003
4017
|
fill: "currentColor",
|
|
4004
4018
|
viewBox: "0 0 20 20",
|
|
4005
|
-
children: /* @__PURE__ */
|
|
4019
|
+
children: /* @__PURE__ */ l(
|
|
4006
4020
|
"path",
|
|
4007
4021
|
{
|
|
4008
4022
|
fillRule: "evenodd",
|
|
@@ -4014,25 +4028,25 @@ function st({
|
|
|
4014
4028
|
)
|
|
4015
4029
|
}
|
|
4016
4030
|
),
|
|
4017
|
-
C.hex && /* @__PURE__ */
|
|
4031
|
+
C.hex && /* @__PURE__ */ l(
|
|
4018
4032
|
"div",
|
|
4019
4033
|
{
|
|
4020
4034
|
className: "h-4 w-4 rounded border border-border",
|
|
4021
4035
|
style: { backgroundColor: C.hex }
|
|
4022
4036
|
}
|
|
4023
4037
|
),
|
|
4024
|
-
/* @__PURE__ */
|
|
4038
|
+
/* @__PURE__ */ l("span", { children: C.label })
|
|
4025
4039
|
] })
|
|
4026
4040
|
},
|
|
4027
4041
|
C.value
|
|
4028
4042
|
)),
|
|
4029
|
-
T.length === 0 &&
|
|
4043
|
+
T.length === 0 && f && r.length > 0 && /* @__PURE__ */ l("div", { className: "px-4 py-3", children: /* @__PURE__ */ l("span", { className: "text-sm text-text-muted", children: v }) })
|
|
4030
4044
|
] })
|
|
4031
4045
|
]
|
|
4032
4046
|
}
|
|
4033
4047
|
)
|
|
4034
4048
|
] }),
|
|
4035
|
-
b && /* @__PURE__ */
|
|
4049
|
+
b && /* @__PURE__ */ l("span", { className: "block mt-1 text-xs text-danger font-medium", children: b })
|
|
4036
4050
|
] });
|
|
4037
4051
|
}
|
|
4038
4052
|
const lt = ({
|
|
@@ -4041,7 +4055,7 @@ const lt = ({
|
|
|
4041
4055
|
onFilesSelected: t,
|
|
4042
4056
|
placeholder: o = "Arrastra y suelta archivos aquí o haz clic para seleccionar",
|
|
4043
4057
|
labelSelectedFiles: a = "archivo:",
|
|
4044
|
-
label:
|
|
4058
|
+
label: s,
|
|
4045
4059
|
error: i,
|
|
4046
4060
|
disabled: n = !1,
|
|
4047
4061
|
required: c = !1,
|
|
@@ -4050,10 +4064,10 @@ const lt = ({
|
|
|
4050
4064
|
className: b = "",
|
|
4051
4065
|
accept: k = "*/*",
|
|
4052
4066
|
// Tipos de archivo aceptados: "image/*", "application/pdf", ".doc,.docx", etc.
|
|
4053
|
-
multiple:
|
|
4067
|
+
multiple: h = !1,
|
|
4054
4068
|
...v
|
|
4055
4069
|
}) => {
|
|
4056
|
-
const m = ce(null), [x, u] = $(!1), [w,
|
|
4070
|
+
const m = ce(null), [x, u] = $(!1), [w, f] = $([]), D = () => {
|
|
4057
4071
|
const M = "w-full p-4 border-2 rounded-lg text-base bg-white transition-all duration-300 focus:outline-none disabled:bg-light disabled:text-text-muted disabled:cursor-not-allowed cursor-pointer min-h-[120px]";
|
|
4058
4072
|
if (i)
|
|
4059
4073
|
return p(
|
|
@@ -4093,40 +4107,40 @@ const lt = ({
|
|
|
4093
4107
|
}, j = (M) => {
|
|
4094
4108
|
const A = Array.from(M);
|
|
4095
4109
|
if (k !== "*/*") {
|
|
4096
|
-
const V = A.filter((T) =>
|
|
4110
|
+
const V = A.filter((T) => R(T, k));
|
|
4097
4111
|
if (V.length === 0) {
|
|
4098
4112
|
console.warn("No valid files selected");
|
|
4099
4113
|
return;
|
|
4100
4114
|
}
|
|
4101
|
-
h
|
|
4115
|
+
f(h ? V : [V[0]]), t(h ? V : [V[0]]);
|
|
4102
4116
|
} else
|
|
4103
|
-
h
|
|
4104
|
-
},
|
|
4117
|
+
f(h ? A : [A[0]]), t(h ? A : [A[0]]);
|
|
4118
|
+
}, R = (M, A) => A.split(",").map((T) => T.trim()).some((T) => {
|
|
4105
4119
|
if (T.startsWith("."))
|
|
4106
4120
|
return M.name.toLowerCase().endsWith(T.toLowerCase());
|
|
4107
4121
|
if (T.includes("/")) {
|
|
4108
|
-
const [Z, C] = T.split("/"),
|
|
4109
|
-
return C === "*" ?
|
|
4122
|
+
const [Z, C] = T.split("/"), L = M.type.split("/")[0];
|
|
4123
|
+
return C === "*" ? L === Z : M.type === T;
|
|
4110
4124
|
}
|
|
4111
4125
|
return !1;
|
|
4112
4126
|
}), G = () => {
|
|
4113
4127
|
n || m.current?.click();
|
|
4114
4128
|
}, K = (M) => {
|
|
4115
4129
|
const A = w.filter((V, T) => T !== M);
|
|
4116
|
-
|
|
4130
|
+
f(A), t(A);
|
|
4117
4131
|
}, S = (M) => {
|
|
4118
4132
|
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), G());
|
|
4119
4133
|
};
|
|
4120
4134
|
return /* @__PURE__ */ y("div", { className: `mb-6 ${b}`, children: [
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
c && /* @__PURE__ */
|
|
4135
|
+
s && /* @__PURE__ */ y("label", { className: `block mb-2 text-sm font-medium ${E()}`, children: [
|
|
4136
|
+
s,
|
|
4137
|
+
c && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
4124
4138
|
] }),
|
|
4125
4139
|
/* @__PURE__ */ y(
|
|
4126
4140
|
"div",
|
|
4127
4141
|
{
|
|
4128
4142
|
className: p(
|
|
4129
|
-
|
|
4143
|
+
D(),
|
|
4130
4144
|
x && "bg-background-light border-2-dashed"
|
|
4131
4145
|
),
|
|
4132
4146
|
onDragEnter: z,
|
|
@@ -4138,7 +4152,7 @@ const lt = ({
|
|
|
4138
4152
|
role: "button",
|
|
4139
4153
|
tabIndex: n ? -1 : 0,
|
|
4140
4154
|
children: [
|
|
4141
|
-
/* @__PURE__ */
|
|
4155
|
+
/* @__PURE__ */ l(
|
|
4142
4156
|
"input",
|
|
4143
4157
|
{
|
|
4144
4158
|
ref: m,
|
|
@@ -4149,20 +4163,20 @@ const lt = ({
|
|
|
4149
4163
|
disabled: n,
|
|
4150
4164
|
required: c,
|
|
4151
4165
|
accept: k,
|
|
4152
|
-
multiple:
|
|
4166
|
+
multiple: h,
|
|
4153
4167
|
className: "hidden",
|
|
4154
4168
|
...v
|
|
4155
4169
|
}
|
|
4156
4170
|
),
|
|
4157
4171
|
/* @__PURE__ */ y("div", { className: "flex flex-col items-center justify-center py-4", children: [
|
|
4158
|
-
/* @__PURE__ */
|
|
4172
|
+
/* @__PURE__ */ l(
|
|
4159
4173
|
"svg",
|
|
4160
4174
|
{
|
|
4161
4175
|
className: `w-8 h-8 mb-2 ${d === "primary" ? "text-primary" : "text-secondary"}`,
|
|
4162
4176
|
fill: "none",
|
|
4163
4177
|
stroke: "currentColor",
|
|
4164
4178
|
viewBox: "0 0 24 24",
|
|
4165
|
-
children: /* @__PURE__ */
|
|
4179
|
+
children: /* @__PURE__ */ l(
|
|
4166
4180
|
"path",
|
|
4167
4181
|
{
|
|
4168
4182
|
strokeLinecap: "round",
|
|
@@ -4173,7 +4187,7 @@ const lt = ({
|
|
|
4173
4187
|
)
|
|
4174
4188
|
}
|
|
4175
4189
|
),
|
|
4176
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ l("p", { className: `text-sm ${E()}`, children: o })
|
|
4177
4191
|
] })
|
|
4178
4192
|
]
|
|
4179
4193
|
}
|
|
@@ -4185,7 +4199,7 @@ const lt = ({
|
|
|
4185
4199
|
a,
|
|
4186
4200
|
"(s) seleccionado(s):"
|
|
4187
4201
|
] }),
|
|
4188
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ l("ul", { className: "space-y-1", children: w.map((M, A) => /* @__PURE__ */ y(
|
|
4189
4203
|
"li",
|
|
4190
4204
|
{
|
|
4191
4205
|
className: "flex items-center justify-between p-2 bg-light rounded border border-border",
|
|
@@ -4198,14 +4212,14 @@ const lt = ({
|
|
|
4198
4212
|
fill: "currentColor",
|
|
4199
4213
|
viewBox: "0 0 20 20",
|
|
4200
4214
|
children: [
|
|
4201
|
-
/* @__PURE__ */
|
|
4202
|
-
/* @__PURE__ */
|
|
4215
|
+
/* @__PURE__ */ l("path", { d: "M8 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM15 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z" }),
|
|
4216
|
+
/* @__PURE__ */ l("path", { d: "M3 4a1 1 0 00-1 1v10a1 1 0 001 1h1.05a2.5 2.5 0 014.9 0H10a1 1 0 001-1V5a1 1 0 00-1-1H3zM14 7a1 1 0 00-1 1v6.05A2.5 2.5 0 0115.95 10H17a1 1 0 001-1v-3a1 1 0 00-1-1h-3z" })
|
|
4203
4217
|
]
|
|
4204
4218
|
}
|
|
4205
4219
|
),
|
|
4206
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ l("span", { className: "text-sm text-text truncate", children: M.name })
|
|
4207
4221
|
] }),
|
|
4208
|
-
/* @__PURE__ */
|
|
4222
|
+
/* @__PURE__ */ l(
|
|
4209
4223
|
"button",
|
|
4210
4224
|
{
|
|
4211
4225
|
onClick: (V) => {
|
|
@@ -4221,7 +4235,7 @@ const lt = ({
|
|
|
4221
4235
|
A
|
|
4222
4236
|
)) })
|
|
4223
4237
|
] }),
|
|
4224
|
-
i && /* @__PURE__ */
|
|
4238
|
+
i && /* @__PURE__ */ l("span", { className: "block mt-1 text-xs text-danger font-medium", children: i })
|
|
4225
4239
|
] });
|
|
4226
4240
|
}, it = ({
|
|
4227
4241
|
text: e,
|
|
@@ -4231,15 +4245,15 @@ const lt = ({
|
|
|
4231
4245
|
...a
|
|
4232
4246
|
}) => {
|
|
4233
4247
|
if (!o) return null;
|
|
4234
|
-
const
|
|
4248
|
+
const s = {
|
|
4235
4249
|
default: "bg-gray-200 text-gray-800",
|
|
4236
4250
|
primary: "bg-primary text-white",
|
|
4237
4251
|
secondary: "bg-secondary text-white",
|
|
4238
4252
|
secondaryDark: "bg-secondary-dark text-white",
|
|
4239
4253
|
danger: "bg-danger text-white",
|
|
4240
4254
|
warning: "bg-warning text-white"
|
|
4241
|
-
}, i = "inline-flex items-center px-3 py-1 rounded-full text-xs font-bold uppercase shadow-md", n =
|
|
4242
|
-
return /* @__PURE__ */
|
|
4255
|
+
}, i = "inline-flex items-center px-3 py-1 rounded-full text-xs font-bold uppercase shadow-md", n = s[t] || s.default;
|
|
4256
|
+
return /* @__PURE__ */ l("div", { className: `${i} ${n} ${r}`, ...a, children: e });
|
|
4243
4257
|
};
|
|
4244
4258
|
function ct({
|
|
4245
4259
|
isOpen: e,
|
|
@@ -4247,7 +4261,7 @@ function ct({
|
|
|
4247
4261
|
title: t,
|
|
4248
4262
|
children: o,
|
|
4249
4263
|
size: a = "md",
|
|
4250
|
-
className:
|
|
4264
|
+
className: s = "",
|
|
4251
4265
|
overlayClassName: i = "",
|
|
4252
4266
|
showCloseButton: n = !0,
|
|
4253
4267
|
closeOnOverlayClick: c = !0,
|
|
@@ -4273,7 +4287,7 @@ function ct({
|
|
|
4273
4287
|
"2xl": "max-w-2xl"
|
|
4274
4288
|
}, k = () => {
|
|
4275
4289
|
c && r();
|
|
4276
|
-
},
|
|
4290
|
+
}, h = /* @__PURE__ */ l(
|
|
4277
4291
|
"div",
|
|
4278
4292
|
{
|
|
4279
4293
|
className: p(
|
|
@@ -4290,12 +4304,12 @@ function ct({
|
|
|
4290
4304
|
className: p(
|
|
4291
4305
|
"relative bg-white rounded-xl shadow-2xl max-h-[90vh] flex flex-col w-full transition-all duration-300",
|
|
4292
4306
|
b[a],
|
|
4293
|
-
|
|
4307
|
+
s
|
|
4294
4308
|
),
|
|
4295
4309
|
onClick: (v) => v.stopPropagation(),
|
|
4296
4310
|
children: [
|
|
4297
4311
|
(t || n) && /* @__PURE__ */ y("div", { className: "flex justify-between items-center px-6 py-5 border-b border-border rounded-t-xl shrink-0", children: [
|
|
4298
|
-
t && /* @__PURE__ */
|
|
4312
|
+
t && /* @__PURE__ */ l(
|
|
4299
4313
|
"h2",
|
|
4300
4314
|
{
|
|
4301
4315
|
id: "modal-title",
|
|
@@ -4303,24 +4317,24 @@ function ct({
|
|
|
4303
4317
|
children: t
|
|
4304
4318
|
}
|
|
4305
4319
|
),
|
|
4306
|
-
n && /* @__PURE__ */
|
|
4320
|
+
n && /* @__PURE__ */ l(
|
|
4307
4321
|
"button",
|
|
4308
4322
|
{
|
|
4309
4323
|
className: "flex items-center justify-center w-8 h-8 text-text-muted hover:text-text hover:bg-background-light transition-colors duration-200 rounded-lg",
|
|
4310
4324
|
onClick: r,
|
|
4311
4325
|
"aria-label": "Cerrar modal",
|
|
4312
4326
|
type: "button",
|
|
4313
|
-
children: /* @__PURE__ */
|
|
4327
|
+
children: /* @__PURE__ */ l("span", { className: "text-2xl font-light leading-none", children: "×" })
|
|
4314
4328
|
}
|
|
4315
4329
|
)
|
|
4316
4330
|
] }),
|
|
4317
|
-
/* @__PURE__ */
|
|
4331
|
+
/* @__PURE__ */ l("div", { className: "p-6 overflow-y-auto flex-1", children: o })
|
|
4318
4332
|
]
|
|
4319
4333
|
}
|
|
4320
4334
|
)
|
|
4321
4335
|
}
|
|
4322
4336
|
);
|
|
4323
|
-
return $e(
|
|
4337
|
+
return $e(h, document.body);
|
|
4324
4338
|
}
|
|
4325
4339
|
function dt({
|
|
4326
4340
|
id: e,
|
|
@@ -4328,16 +4342,16 @@ function dt({
|
|
|
4328
4342
|
checked: t = !1,
|
|
4329
4343
|
onChange: o,
|
|
4330
4344
|
disabled: a = !1,
|
|
4331
|
-
required:
|
|
4345
|
+
required: s = !1,
|
|
4332
4346
|
colorScheme: i = "secondary",
|
|
4333
4347
|
variant: n = "solid",
|
|
4334
4348
|
label: c,
|
|
4335
4349
|
className: d = "",
|
|
4336
4350
|
...b
|
|
4337
4351
|
}) {
|
|
4338
|
-
const k = (
|
|
4352
|
+
const k = (h, v) => {
|
|
4339
4353
|
const m = "checkbox-input size-4 shrink-0 rounded transition-all duration-300 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-opacity-50 disabled:cursor-not-allowed disabled:opacity-50";
|
|
4340
|
-
if (
|
|
4354
|
+
if (h === "outline")
|
|
4341
4355
|
switch (v) {
|
|
4342
4356
|
case "primary":
|
|
4343
4357
|
return `${m} checkbox-outline checkbox-primary`;
|
|
@@ -4355,7 +4369,7 @@ function dt({
|
|
|
4355
4369
|
}
|
|
4356
4370
|
};
|
|
4357
4371
|
return c ? /* @__PURE__ */ y("div", { className: `flex items-center gap-2 ${d}`, children: [
|
|
4358
|
-
/* @__PURE__ */
|
|
4372
|
+
/* @__PURE__ */ l(
|
|
4359
4373
|
"input",
|
|
4360
4374
|
{
|
|
4361
4375
|
id: e,
|
|
@@ -4364,7 +4378,7 @@ function dt({
|
|
|
4364
4378
|
checked: t,
|
|
4365
4379
|
onChange: o,
|
|
4366
4380
|
disabled: a,
|
|
4367
|
-
required:
|
|
4381
|
+
required: s,
|
|
4368
4382
|
className: k(n, i),
|
|
4369
4383
|
...b
|
|
4370
4384
|
}
|
|
@@ -4376,11 +4390,11 @@ function dt({
|
|
|
4376
4390
|
className: "text-sm text-text cursor-pointer font-medium",
|
|
4377
4391
|
children: [
|
|
4378
4392
|
c,
|
|
4379
|
-
|
|
4393
|
+
s && /* @__PURE__ */ l("span", { className: "text-red-500 ml-1", children: "*" })
|
|
4380
4394
|
]
|
|
4381
4395
|
}
|
|
4382
4396
|
)
|
|
4383
|
-
] }) : /* @__PURE__ */
|
|
4397
|
+
] }) : /* @__PURE__ */ l(
|
|
4384
4398
|
"input",
|
|
4385
4399
|
{
|
|
4386
4400
|
id: e,
|
|
@@ -4389,7 +4403,7 @@ function dt({
|
|
|
4389
4403
|
checked: t,
|
|
4390
4404
|
onChange: o,
|
|
4391
4405
|
disabled: a,
|
|
4392
|
-
required:
|
|
4406
|
+
required: s,
|
|
4393
4407
|
className: `${k(n, i)} ${d}`,
|
|
4394
4408
|
style: {
|
|
4395
4409
|
accentColor: "white"
|
|
@@ -4406,9 +4420,9 @@ export {
|
|
|
4406
4420
|
dt as Checkbox,
|
|
4407
4421
|
st as Dropdown,
|
|
4408
4422
|
Tr as EN_DEFAULT_DAY_NAMES,
|
|
4409
|
-
|
|
4423
|
+
Rr as EN_DEFAULT_MONTH_NAMES,
|
|
4410
4424
|
$r as ES_DEFAULT_DAY_NAMES,
|
|
4411
|
-
|
|
4425
|
+
Fr as ES_DEFAULT_MONTH_NAMES,
|
|
4412
4426
|
rt as ExpandableCard,
|
|
4413
4427
|
lt as FileDropZone,
|
|
4414
4428
|
ut as Input,
|