componentables 0.1.26 → 0.1.27
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/README.md +11 -0
- package/dist/componentables.css +1 -1
- package/dist/components/Table/Table.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 +388 -392
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as p, jsx as n, Fragment as Oe } from "react/jsx-runtime";
|
|
2
|
-
import G, { useMemo as Te, useEffect as
|
|
2
|
+
import G, { useMemo as Te, useEffect as U, createContext as $e, useContext as _e, useState as _, useCallback as Ne, useRef as ue } from "react";
|
|
3
3
|
import { Oval as Re } from "react-loader-spinner";
|
|
4
4
|
import { createPortal as Fe } from "react-dom";
|
|
5
5
|
import { toast as te } from "react-toastify";
|
|
@@ -123,12 +123,12 @@ const pe = "-", Be = (e) => {
|
|
|
123
123
|
experimentalParseClassName: t
|
|
124
124
|
} = e, o = r.length === 1, s = r[0], l = r.length, i = (a) => {
|
|
125
125
|
const d = [];
|
|
126
|
-
let u = 0,
|
|
126
|
+
let u = 0, g = 0, v;
|
|
127
127
|
for (let m = 0; m < a.length; m++) {
|
|
128
128
|
let k = a[m];
|
|
129
129
|
if (u === 0) {
|
|
130
130
|
if (k === s && (o || a.slice(m, m + l) === r)) {
|
|
131
|
-
d.push(a.slice(
|
|
131
|
+
d.push(a.slice(g, m)), g = m + l;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
134
|
if (k === "/") {
|
|
@@ -138,12 +138,12 @@ const pe = "-", Be = (e) => {
|
|
|
138
138
|
}
|
|
139
139
|
k === "[" ? u++ : k === "]" && u--;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const f = d.length === 0 ? a : a.substring(g), x = f.startsWith(ze), b = x ? f.substring(1) : f, w = v && v > g ? v - g : void 0;
|
|
142
142
|
return {
|
|
143
143
|
modifiers: d,
|
|
144
|
-
hasImportantModifier:
|
|
145
|
-
baseClassName:
|
|
146
|
-
maybePostfixModifierPosition:
|
|
144
|
+
hasImportantModifier: x,
|
|
145
|
+
baseClassName: b,
|
|
146
|
+
maybePostfixModifierPosition: w
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
149
|
return t ? (a) => t({
|
|
@@ -171,31 +171,31 @@ const pe = "-", Be = (e) => {
|
|
|
171
171
|
let a = "";
|
|
172
172
|
for (let d = i.length - 1; d >= 0; d -= 1) {
|
|
173
173
|
const u = i[d], {
|
|
174
|
-
modifiers:
|
|
174
|
+
modifiers: g,
|
|
175
175
|
hasImportantModifier: v,
|
|
176
|
-
baseClassName:
|
|
177
|
-
maybePostfixModifierPosition:
|
|
176
|
+
baseClassName: f,
|
|
177
|
+
maybePostfixModifierPosition: x
|
|
178
178
|
} = t(u);
|
|
179
|
-
let
|
|
180
|
-
if (!
|
|
181
|
-
if (!
|
|
179
|
+
let b = !!x, w = o(b ? f.substring(0, x) : f);
|
|
180
|
+
if (!w) {
|
|
181
|
+
if (!b) {
|
|
182
182
|
a = u + (a.length > 0 ? " " + a : a);
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
185
|
+
if (w = o(f), !w) {
|
|
186
186
|
a = u + (a.length > 0 ? " " + a : a);
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
b = !1;
|
|
190
190
|
}
|
|
191
|
-
const m = Ke(
|
|
191
|
+
const m = Ke(g).join(":"), k = v ? m + ze : m, y = k + w;
|
|
192
192
|
if (l.includes(y))
|
|
193
193
|
continue;
|
|
194
194
|
l.push(y);
|
|
195
|
-
const
|
|
196
|
-
for (let
|
|
197
|
-
const
|
|
198
|
-
l.push(k +
|
|
195
|
+
const z = s(w, b);
|
|
196
|
+
for (let D = 0; D < z.length; ++D) {
|
|
197
|
+
const L = z[D];
|
|
198
|
+
l.push(k + L);
|
|
199
199
|
}
|
|
200
200
|
a = u + (a.length > 0 ? " " + a : a);
|
|
201
201
|
}
|
|
@@ -218,15 +218,15 @@ const Le = (e) => {
|
|
|
218
218
|
function er(e, ...r) {
|
|
219
219
|
let t, o, s, l = i;
|
|
220
220
|
function i(d) {
|
|
221
|
-
const u = r.reduce((
|
|
221
|
+
const u = r.reduce((g, v) => v(g), e());
|
|
222
222
|
return t = Ze(u), o = t.cache.get, s = t.cache.set, l = a, a(d);
|
|
223
223
|
}
|
|
224
224
|
function a(d) {
|
|
225
225
|
const u = o(d);
|
|
226
226
|
if (u)
|
|
227
227
|
return u;
|
|
228
|
-
const
|
|
229
|
-
return s(d,
|
|
228
|
+
const g = Qe(d, t);
|
|
229
|
+
return s(d, g), g;
|
|
230
230
|
}
|
|
231
231
|
return function() {
|
|
232
232
|
return l(qe.apply(null, arguments));
|
|
@@ -235,7 +235,7 @@ function er(e, ...r) {
|
|
|
235
235
|
const I = (e) => {
|
|
236
236
|
const r = (t) => t[e] || [];
|
|
237
237
|
return r.isThemeGetter = !0, r;
|
|
238
|
-
}, De = /^\[(?:([a-z-]+):)?(.+)\]$/i, rr = /^\d+\/\d+$/, tr = /* @__PURE__ */ new Set(["px", "full", "screen"]), or = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, sr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ar = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, lr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,
|
|
238
|
+
}, De = /^\[(?:([a-z-]+):)?(.+)\]$/i, rr = /^\d+\/\d+$/, tr = /* @__PURE__ */ new Set(["px", "full", "screen"]), or = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, sr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ar = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, lr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, H = (e) => q(e) || tr.has(e) || rr.test(e), Y = (e) => re(e, "length", gr), q = (e) => !!e && !Number.isNaN(Number(e)), ie = (e) => re(e, "number", q), oe = (e) => !!e && Number.isInteger(Number(e)), ir = (e) => e.endsWith("%") && q(e.slice(0, -1)), C = (e) => De.test(e), J = (e) => or.test(e), cr = /* @__PURE__ */ new Set(["length", "size", "percentage"]), dr = (e) => re(e, cr, Se), ur = (e) => re(e, "position", Se), mr = /* @__PURE__ */ new Set(["image", "url"]), pr = (e) => re(e, mr, hr), br = (e) => re(e, "", fr), ne = () => !0, re = (e, r, t) => {
|
|
239
239
|
const o = De.exec(e);
|
|
240
240
|
return o ? o[1] ? typeof r == "string" ? o[1] === r : r.has(o[1]) : t(o[2]) : !1;
|
|
241
241
|
}, gr = (e) => (
|
|
@@ -244,36 +244,36 @@ const I = (e) => {
|
|
|
244
244
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
245
245
|
nr.test(e) && !sr.test(e)
|
|
246
246
|
), Se = () => !1, fr = (e) => ar.test(e), hr = (e) => lr.test(e), yr = () => {
|
|
247
|
-
const e = I("colors"), r = I("spacing"), t = I("blur"), o = I("brightness"), s = I("borderColor"), l = I("borderRadius"), i = I("borderSpacing"), a = I("borderWidth"), d = I("contrast"), u = I("grayscale"),
|
|
247
|
+
const e = I("colors"), r = I("spacing"), t = I("blur"), o = I("brightness"), s = I("borderColor"), l = I("borderRadius"), i = I("borderSpacing"), a = I("borderWidth"), d = I("contrast"), u = I("grayscale"), g = I("hueRotate"), v = I("invert"), f = I("gap"), x = I("gradientColorStops"), b = I("gradientColorStopPositions"), w = I("inset"), m = I("margin"), k = I("opacity"), y = I("padding"), z = I("saturate"), D = I("scale"), L = I("sepia"), E = I("skew"), h = I("space"), O = I("translate"), R = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], Z = () => ["auto", C, r], A = () => [C, r], M = () => ["", H, Y], P = () => ["auto", q, C], B = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], $ = () => ["solid", "dashed", "dotted", "double", "none"], X = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], N = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], S = () => ["", "0", C], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], V = () => [q, C];
|
|
248
248
|
return {
|
|
249
249
|
cacheSize: 500,
|
|
250
250
|
separator: ":",
|
|
251
251
|
theme: {
|
|
252
252
|
colors: [ne],
|
|
253
|
-
spacing: [
|
|
253
|
+
spacing: [H, Y],
|
|
254
254
|
blur: ["none", "", J, C],
|
|
255
255
|
brightness: V(),
|
|
256
256
|
borderColor: [e],
|
|
257
257
|
borderRadius: ["none", "", "full", J, C],
|
|
258
|
-
borderSpacing:
|
|
258
|
+
borderSpacing: A(),
|
|
259
259
|
borderWidth: M(),
|
|
260
260
|
contrast: V(),
|
|
261
|
-
grayscale:
|
|
261
|
+
grayscale: S(),
|
|
262
262
|
hueRotate: V(),
|
|
263
|
-
invert:
|
|
264
|
-
gap:
|
|
263
|
+
invert: S(),
|
|
264
|
+
gap: A(),
|
|
265
265
|
gradientColorStops: [e],
|
|
266
266
|
gradientColorStopPositions: [ir, Y],
|
|
267
267
|
inset: Z(),
|
|
268
268
|
margin: Z(),
|
|
269
269
|
opacity: V(),
|
|
270
|
-
padding:
|
|
270
|
+
padding: A(),
|
|
271
271
|
saturate: V(),
|
|
272
272
|
scale: V(),
|
|
273
|
-
sepia:
|
|
273
|
+
sepia: S(),
|
|
274
274
|
skew: V(),
|
|
275
|
-
space:
|
|
276
|
-
translate:
|
|
275
|
+
space: A(),
|
|
276
|
+
translate: A()
|
|
277
277
|
},
|
|
278
278
|
classGroups: {
|
|
279
279
|
// Layout
|
|
@@ -421,63 +421,63 @@ const I = (e) => {
|
|
|
421
421
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
422
422
|
*/
|
|
423
423
|
inset: [{
|
|
424
|
-
inset: [
|
|
424
|
+
inset: [w]
|
|
425
425
|
}],
|
|
426
426
|
/**
|
|
427
427
|
* Right / Left
|
|
428
428
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
429
429
|
*/
|
|
430
430
|
"inset-x": [{
|
|
431
|
-
"inset-x": [
|
|
431
|
+
"inset-x": [w]
|
|
432
432
|
}],
|
|
433
433
|
/**
|
|
434
434
|
* Top / Bottom
|
|
435
435
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
436
436
|
*/
|
|
437
437
|
"inset-y": [{
|
|
438
|
-
"inset-y": [
|
|
438
|
+
"inset-y": [w]
|
|
439
439
|
}],
|
|
440
440
|
/**
|
|
441
441
|
* Start
|
|
442
442
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
443
443
|
*/
|
|
444
444
|
start: [{
|
|
445
|
-
start: [
|
|
445
|
+
start: [w]
|
|
446
446
|
}],
|
|
447
447
|
/**
|
|
448
448
|
* End
|
|
449
449
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
450
450
|
*/
|
|
451
451
|
end: [{
|
|
452
|
-
end: [
|
|
452
|
+
end: [w]
|
|
453
453
|
}],
|
|
454
454
|
/**
|
|
455
455
|
* Top
|
|
456
456
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
457
457
|
*/
|
|
458
458
|
top: [{
|
|
459
|
-
top: [
|
|
459
|
+
top: [w]
|
|
460
460
|
}],
|
|
461
461
|
/**
|
|
462
462
|
* Right
|
|
463
463
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
464
464
|
*/
|
|
465
465
|
right: [{
|
|
466
|
-
right: [
|
|
466
|
+
right: [w]
|
|
467
467
|
}],
|
|
468
468
|
/**
|
|
469
469
|
* Bottom
|
|
470
470
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
471
471
|
*/
|
|
472
472
|
bottom: [{
|
|
473
|
-
bottom: [
|
|
473
|
+
bottom: [w]
|
|
474
474
|
}],
|
|
475
475
|
/**
|
|
476
476
|
* Left
|
|
477
477
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
478
478
|
*/
|
|
479
479
|
left: [{
|
|
480
|
-
left: [
|
|
480
|
+
left: [w]
|
|
481
481
|
}],
|
|
482
482
|
/**
|
|
483
483
|
* Visibility
|
|
@@ -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: S()
|
|
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: S()
|
|
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: [f]
|
|
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": [f]
|
|
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": [f]
|
|
645
645
|
}],
|
|
646
646
|
/**
|
|
647
647
|
* Justify Content
|
|
@@ -838,7 +838,7 @@ const I = (e) => {
|
|
|
838
838
|
* @see https://tailwindcss.com/docs/space
|
|
839
839
|
*/
|
|
840
840
|
"space-x": [{
|
|
841
|
-
"space-x": [
|
|
841
|
+
"space-x": [h]
|
|
842
842
|
}],
|
|
843
843
|
/**
|
|
844
844
|
* Space Between X Reverse
|
|
@@ -850,7 +850,7 @@ const I = (e) => {
|
|
|
850
850
|
* @see https://tailwindcss.com/docs/space
|
|
851
851
|
*/
|
|
852
852
|
"space-y": [{
|
|
853
|
-
"space-y": [
|
|
853
|
+
"space-y": [h]
|
|
854
854
|
}],
|
|
855
855
|
/**
|
|
856
856
|
* Space Between Y Reverse
|
|
@@ -990,7 +990,7 @@ const I = (e) => {
|
|
|
990
990
|
* @see https://tailwindcss.com/docs/line-height
|
|
991
991
|
*/
|
|
992
992
|
leading: [{
|
|
993
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
993
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", H, C]
|
|
994
994
|
}],
|
|
995
995
|
/**
|
|
996
996
|
* List Style Image
|
|
@@ -1066,14 +1066,14 @@ const I = (e) => {
|
|
|
1066
1066
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1067
1067
|
*/
|
|
1068
1068
|
"text-decoration-thickness": [{
|
|
1069
|
-
decoration: ["auto", "from-font",
|
|
1069
|
+
decoration: ["auto", "from-font", H, Y]
|
|
1070
1070
|
}],
|
|
1071
1071
|
/**
|
|
1072
1072
|
* Text Underline Offset
|
|
1073
1073
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1074
1074
|
*/
|
|
1075
1075
|
"underline-offset": [{
|
|
1076
|
-
"underline-offset": ["auto",
|
|
1076
|
+
"underline-offset": ["auto", H, C]
|
|
1077
1077
|
}],
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Text Decoration Color
|
|
@@ -1104,7 +1104,7 @@ const I = (e) => {
|
|
|
1104
1104
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1105
1105
|
*/
|
|
1106
1106
|
indent: [{
|
|
1107
|
-
indent:
|
|
1107
|
+
indent: A()
|
|
1108
1108
|
}],
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Vertical Alignment
|
|
@@ -1215,42 +1215,42 @@ const I = (e) => {
|
|
|
1215
1215
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1216
1216
|
*/
|
|
1217
1217
|
"gradient-from-pos": [{
|
|
1218
|
-
from: [
|
|
1218
|
+
from: [b]
|
|
1219
1219
|
}],
|
|
1220
1220
|
/**
|
|
1221
1221
|
* Gradient Color Stops Via Position
|
|
1222
1222
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1223
1223
|
*/
|
|
1224
1224
|
"gradient-via-pos": [{
|
|
1225
|
-
via: [
|
|
1225
|
+
via: [b]
|
|
1226
1226
|
}],
|
|
1227
1227
|
/**
|
|
1228
1228
|
* Gradient Color Stops To Position
|
|
1229
1229
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1230
1230
|
*/
|
|
1231
1231
|
"gradient-to-pos": [{
|
|
1232
|
-
to: [
|
|
1232
|
+
to: [b]
|
|
1233
1233
|
}],
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Gradient Color Stops From
|
|
1236
1236
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1237
1237
|
*/
|
|
1238
1238
|
"gradient-from": [{
|
|
1239
|
-
from: [
|
|
1239
|
+
from: [x]
|
|
1240
1240
|
}],
|
|
1241
1241
|
/**
|
|
1242
1242
|
* Gradient Color Stops Via
|
|
1243
1243
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1244
1244
|
*/
|
|
1245
1245
|
"gradient-via": [{
|
|
1246
|
-
via: [
|
|
1246
|
+
via: [x]
|
|
1247
1247
|
}],
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Gradient Color Stops To
|
|
1250
1250
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1251
1251
|
*/
|
|
1252
1252
|
"gradient-to": [{
|
|
1253
|
-
to: [
|
|
1253
|
+
to: [x]
|
|
1254
1254
|
}],
|
|
1255
1255
|
// Borders
|
|
1256
1256
|
/**
|
|
@@ -1555,14 +1555,14 @@ const I = (e) => {
|
|
|
1555
1555
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
1556
1556
|
*/
|
|
1557
1557
|
"outline-offset": [{
|
|
1558
|
-
"outline-offset": [
|
|
1558
|
+
"outline-offset": [H, C]
|
|
1559
1559
|
}],
|
|
1560
1560
|
/**
|
|
1561
1561
|
* Outline Width
|
|
1562
1562
|
* @see https://tailwindcss.com/docs/outline-width
|
|
1563
1563
|
*/
|
|
1564
1564
|
"outline-w": [{
|
|
1565
|
-
outline: [
|
|
1565
|
+
outline: [H, Y]
|
|
1566
1566
|
}],
|
|
1567
1567
|
/**
|
|
1568
1568
|
* Outline Color
|
|
@@ -1602,7 +1602,7 @@ const I = (e) => {
|
|
|
1602
1602
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
1603
1603
|
*/
|
|
1604
1604
|
"ring-offset-w": [{
|
|
1605
|
-
"ring-offset": [
|
|
1605
|
+
"ring-offset": [H, Y]
|
|
1606
1606
|
}],
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Ring Offset Color
|
|
@@ -1696,7 +1696,7 @@ const I = (e) => {
|
|
|
1696
1696
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
1697
1697
|
*/
|
|
1698
1698
|
"hue-rotate": [{
|
|
1699
|
-
"hue-rotate": [
|
|
1699
|
+
"hue-rotate": [g]
|
|
1700
1700
|
}],
|
|
1701
1701
|
/**
|
|
1702
1702
|
* Invert
|
|
@@ -1710,14 +1710,14 @@ const I = (e) => {
|
|
|
1710
1710
|
* @see https://tailwindcss.com/docs/saturate
|
|
1711
1711
|
*/
|
|
1712
1712
|
saturate: [{
|
|
1713
|
-
saturate: [
|
|
1713
|
+
saturate: [z]
|
|
1714
1714
|
}],
|
|
1715
1715
|
/**
|
|
1716
1716
|
* Sepia
|
|
1717
1717
|
* @see https://tailwindcss.com/docs/sepia
|
|
1718
1718
|
*/
|
|
1719
1719
|
sepia: [{
|
|
1720
|
-
sepia: [
|
|
1720
|
+
sepia: [L]
|
|
1721
1721
|
}],
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Backdrop Filter
|
|
@@ -1760,7 +1760,7 @@ const I = (e) => {
|
|
|
1760
1760
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
1761
1761
|
*/
|
|
1762
1762
|
"backdrop-hue-rotate": [{
|
|
1763
|
-
"backdrop-hue-rotate": [
|
|
1763
|
+
"backdrop-hue-rotate": [g]
|
|
1764
1764
|
}],
|
|
1765
1765
|
/**
|
|
1766
1766
|
* Backdrop Invert
|
|
@@ -1781,14 +1781,14 @@ const I = (e) => {
|
|
|
1781
1781
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1782
1782
|
*/
|
|
1783
1783
|
"backdrop-saturate": [{
|
|
1784
|
-
"backdrop-saturate": [
|
|
1784
|
+
"backdrop-saturate": [z]
|
|
1785
1785
|
}],
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Backdrop Sepia
|
|
1788
1788
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
1789
1789
|
*/
|
|
1790
1790
|
"backdrop-sepia": [{
|
|
1791
|
-
"backdrop-sepia": [
|
|
1791
|
+
"backdrop-sepia": [L]
|
|
1792
1792
|
}],
|
|
1793
1793
|
// Tables
|
|
1794
1794
|
/**
|
|
@@ -1882,21 +1882,21 @@ const I = (e) => {
|
|
|
1882
1882
|
* @see https://tailwindcss.com/docs/scale
|
|
1883
1883
|
*/
|
|
1884
1884
|
scale: [{
|
|
1885
|
-
scale: [
|
|
1885
|
+
scale: [D]
|
|
1886
1886
|
}],
|
|
1887
1887
|
/**
|
|
1888
1888
|
* Scale X
|
|
1889
1889
|
* @see https://tailwindcss.com/docs/scale
|
|
1890
1890
|
*/
|
|
1891
1891
|
"scale-x": [{
|
|
1892
|
-
"scale-x": [
|
|
1892
|
+
"scale-x": [D]
|
|
1893
1893
|
}],
|
|
1894
1894
|
/**
|
|
1895
1895
|
* Scale Y
|
|
1896
1896
|
* @see https://tailwindcss.com/docs/scale
|
|
1897
1897
|
*/
|
|
1898
1898
|
"scale-y": [{
|
|
1899
|
-
"scale-y": [
|
|
1899
|
+
"scale-y": [D]
|
|
1900
1900
|
}],
|
|
1901
1901
|
/**
|
|
1902
1902
|
* Rotate
|
|
@@ -1995,126 +1995,126 @@ const I = (e) => {
|
|
|
1995
1995
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
1996
1996
|
*/
|
|
1997
1997
|
"scroll-m": [{
|
|
1998
|
-
"scroll-m":
|
|
1998
|
+
"scroll-m": A()
|
|
1999
1999
|
}],
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Scroll Margin X
|
|
2002
2002
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2003
2003
|
*/
|
|
2004
2004
|
"scroll-mx": [{
|
|
2005
|
-
"scroll-mx":
|
|
2005
|
+
"scroll-mx": A()
|
|
2006
2006
|
}],
|
|
2007
2007
|
/**
|
|
2008
2008
|
* Scroll Margin Y
|
|
2009
2009
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2010
2010
|
*/
|
|
2011
2011
|
"scroll-my": [{
|
|
2012
|
-
"scroll-my":
|
|
2012
|
+
"scroll-my": A()
|
|
2013
2013
|
}],
|
|
2014
2014
|
/**
|
|
2015
2015
|
* Scroll Margin Start
|
|
2016
2016
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2017
2017
|
*/
|
|
2018
2018
|
"scroll-ms": [{
|
|
2019
|
-
"scroll-ms":
|
|
2019
|
+
"scroll-ms": A()
|
|
2020
2020
|
}],
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Scroll Margin End
|
|
2023
2023
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2024
2024
|
*/
|
|
2025
2025
|
"scroll-me": [{
|
|
2026
|
-
"scroll-me":
|
|
2026
|
+
"scroll-me": A()
|
|
2027
2027
|
}],
|
|
2028
2028
|
/**
|
|
2029
2029
|
* Scroll Margin Top
|
|
2030
2030
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2031
2031
|
*/
|
|
2032
2032
|
"scroll-mt": [{
|
|
2033
|
-
"scroll-mt":
|
|
2033
|
+
"scroll-mt": A()
|
|
2034
2034
|
}],
|
|
2035
2035
|
/**
|
|
2036
2036
|
* Scroll Margin Right
|
|
2037
2037
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2038
2038
|
*/
|
|
2039
2039
|
"scroll-mr": [{
|
|
2040
|
-
"scroll-mr":
|
|
2040
|
+
"scroll-mr": A()
|
|
2041
2041
|
}],
|
|
2042
2042
|
/**
|
|
2043
2043
|
* Scroll Margin Bottom
|
|
2044
2044
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2045
2045
|
*/
|
|
2046
2046
|
"scroll-mb": [{
|
|
2047
|
-
"scroll-mb":
|
|
2047
|
+
"scroll-mb": A()
|
|
2048
2048
|
}],
|
|
2049
2049
|
/**
|
|
2050
2050
|
* Scroll Margin Left
|
|
2051
2051
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2052
2052
|
*/
|
|
2053
2053
|
"scroll-ml": [{
|
|
2054
|
-
"scroll-ml":
|
|
2054
|
+
"scroll-ml": A()
|
|
2055
2055
|
}],
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Scroll Padding
|
|
2058
2058
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2059
2059
|
*/
|
|
2060
2060
|
"scroll-p": [{
|
|
2061
|
-
"scroll-p":
|
|
2061
|
+
"scroll-p": A()
|
|
2062
2062
|
}],
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Scroll Padding X
|
|
2065
2065
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2066
2066
|
*/
|
|
2067
2067
|
"scroll-px": [{
|
|
2068
|
-
"scroll-px":
|
|
2068
|
+
"scroll-px": A()
|
|
2069
2069
|
}],
|
|
2070
2070
|
/**
|
|
2071
2071
|
* Scroll Padding Y
|
|
2072
2072
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2073
2073
|
*/
|
|
2074
2074
|
"scroll-py": [{
|
|
2075
|
-
"scroll-py":
|
|
2075
|
+
"scroll-py": A()
|
|
2076
2076
|
}],
|
|
2077
2077
|
/**
|
|
2078
2078
|
* Scroll Padding Start
|
|
2079
2079
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2080
2080
|
*/
|
|
2081
2081
|
"scroll-ps": [{
|
|
2082
|
-
"scroll-ps":
|
|
2082
|
+
"scroll-ps": A()
|
|
2083
2083
|
}],
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Scroll Padding End
|
|
2086
2086
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2087
2087
|
*/
|
|
2088
2088
|
"scroll-pe": [{
|
|
2089
|
-
"scroll-pe":
|
|
2089
|
+
"scroll-pe": A()
|
|
2090
2090
|
}],
|
|
2091
2091
|
/**
|
|
2092
2092
|
* Scroll Padding Top
|
|
2093
2093
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2094
2094
|
*/
|
|
2095
2095
|
"scroll-pt": [{
|
|
2096
|
-
"scroll-pt":
|
|
2096
|
+
"scroll-pt": A()
|
|
2097
2097
|
}],
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Scroll Padding Right
|
|
2100
2100
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2101
2101
|
*/
|
|
2102
2102
|
"scroll-pr": [{
|
|
2103
|
-
"scroll-pr":
|
|
2103
|
+
"scroll-pr": A()
|
|
2104
2104
|
}],
|
|
2105
2105
|
/**
|
|
2106
2106
|
* Scroll Padding Bottom
|
|
2107
2107
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2108
2108
|
*/
|
|
2109
2109
|
"scroll-pb": [{
|
|
2110
|
-
"scroll-pb":
|
|
2110
|
+
"scroll-pb": A()
|
|
2111
2111
|
}],
|
|
2112
2112
|
/**
|
|
2113
2113
|
* Scroll Padding Left
|
|
2114
2114
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2115
2115
|
*/
|
|
2116
2116
|
"scroll-pl": [{
|
|
2117
|
-
"scroll-pl":
|
|
2117
|
+
"scroll-pl": A()
|
|
2118
2118
|
}],
|
|
2119
2119
|
/**
|
|
2120
2120
|
* Scroll Snap Align
|
|
@@ -2197,7 +2197,7 @@ const I = (e) => {
|
|
|
2197
2197
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
2198
2198
|
*/
|
|
2199
2199
|
"stroke-w": [{
|
|
2200
|
-
stroke: [
|
|
2200
|
+
stroke: [H, Y, ie]
|
|
2201
2201
|
}],
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Stroke
|
|
@@ -2404,7 +2404,7 @@ function ot({
|
|
|
2404
2404
|
}
|
|
2405
2405
|
};
|
|
2406
2406
|
}, [r]);
|
|
2407
|
-
return typeof window < "u" && he(t),
|
|
2407
|
+
return typeof window < "u" && he(t), U(() => {
|
|
2408
2408
|
he(t);
|
|
2409
2409
|
}, [t]), G.createElement(Ae.Provider, { value: t }, e);
|
|
2410
2410
|
}
|
|
@@ -2497,37 +2497,37 @@ function Nr({
|
|
|
2497
2497
|
error: a,
|
|
2498
2498
|
disabled: d = !1,
|
|
2499
2499
|
required: u = !1,
|
|
2500
|
-
colorScheme:
|
|
2500
|
+
colorScheme: g = "secondary",
|
|
2501
2501
|
className: v = "",
|
|
2502
|
-
...
|
|
2502
|
+
...f
|
|
2503
2503
|
}) {
|
|
2504
|
-
const
|
|
2505
|
-
const
|
|
2504
|
+
const x = () => {
|
|
2505
|
+
const w = "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";
|
|
2506
2506
|
if (a)
|
|
2507
2507
|
return c(
|
|
2508
|
-
|
|
2508
|
+
w,
|
|
2509
2509
|
"border-danger focus:border-danger focus:shadow-danger-light"
|
|
2510
2510
|
);
|
|
2511
|
-
switch (
|
|
2511
|
+
switch (g) {
|
|
2512
2512
|
case "primary":
|
|
2513
2513
|
return c(
|
|
2514
|
-
|
|
2514
|
+
w,
|
|
2515
2515
|
"text-primary border-primary focus:border-primary"
|
|
2516
2516
|
);
|
|
2517
2517
|
case "secondary":
|
|
2518
2518
|
default:
|
|
2519
2519
|
return c(
|
|
2520
|
-
|
|
2520
|
+
w,
|
|
2521
2521
|
"text-secondary border-secondary focus:border-secondary"
|
|
2522
2522
|
);
|
|
2523
2523
|
}
|
|
2524
|
-
},
|
|
2524
|
+
}, b = () => g === "primary" ? "text-primary" : "text-secondary";
|
|
2525
2525
|
return /* @__PURE__ */ p("div", { className: c("mb-6", v), children: [
|
|
2526
2526
|
i && /* @__PURE__ */ p(
|
|
2527
2527
|
"label",
|
|
2528
2528
|
{
|
|
2529
2529
|
htmlFor: e,
|
|
2530
|
-
className: c("block mb-2 text-sm font-medium",
|
|
2530
|
+
className: c("block mb-2 text-sm font-medium", b()),
|
|
2531
2531
|
children: [
|
|
2532
2532
|
i,
|
|
2533
2533
|
u && /* @__PURE__ */ n("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -2545,8 +2545,8 @@ function Nr({
|
|
|
2545
2545
|
placeholder: l,
|
|
2546
2546
|
disabled: d,
|
|
2547
2547
|
required: u,
|
|
2548
|
-
className:
|
|
2549
|
-
...
|
|
2548
|
+
className: x(),
|
|
2549
|
+
...f
|
|
2550
2550
|
}
|
|
2551
2551
|
),
|
|
2552
2552
|
a && /* @__PURE__ */ n("span", { className: "block mt-1 text-xs text-danger font-medium", children: a })
|
|
@@ -2563,37 +2563,37 @@ function Cr({
|
|
|
2563
2563
|
disabled: a = !1,
|
|
2564
2564
|
required: d = !1,
|
|
2565
2565
|
colorScheme: u = "secondary",
|
|
2566
|
-
className:
|
|
2566
|
+
className: g = "",
|
|
2567
2567
|
rows: v = 4,
|
|
2568
|
-
...
|
|
2568
|
+
...f
|
|
2569
2569
|
}) {
|
|
2570
|
-
const
|
|
2571
|
-
const
|
|
2570
|
+
const x = () => {
|
|
2571
|
+
const w = "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";
|
|
2572
2572
|
if (i)
|
|
2573
2573
|
return c(
|
|
2574
|
-
|
|
2574
|
+
w,
|
|
2575
2575
|
"border-danger focus:border-danger focus:shadow-danger-light"
|
|
2576
2576
|
);
|
|
2577
2577
|
switch (u) {
|
|
2578
2578
|
case "primary":
|
|
2579
2579
|
return c(
|
|
2580
|
-
|
|
2580
|
+
w,
|
|
2581
2581
|
"text-primary border-primary focus:border-primary"
|
|
2582
2582
|
);
|
|
2583
2583
|
case "secondary":
|
|
2584
2584
|
default:
|
|
2585
2585
|
return c(
|
|
2586
|
-
|
|
2586
|
+
w,
|
|
2587
2587
|
"text-secondary border-secondary focus:border-secondary"
|
|
2588
2588
|
);
|
|
2589
2589
|
}
|
|
2590
|
-
},
|
|
2591
|
-
return /* @__PURE__ */ p("div", { className: c("mb-6",
|
|
2590
|
+
}, b = () => u === "primary" ? "text-primary" : "text-secondary";
|
|
2591
|
+
return /* @__PURE__ */ p("div", { className: c("mb-6", g), children: [
|
|
2592
2592
|
l && /* @__PURE__ */ p(
|
|
2593
2593
|
"label",
|
|
2594
2594
|
{
|
|
2595
2595
|
htmlFor: e,
|
|
2596
|
-
className: c("block mb-2 text-sm font-medium",
|
|
2596
|
+
className: c("block mb-2 text-sm font-medium", b()),
|
|
2597
2597
|
children: [
|
|
2598
2598
|
l,
|
|
2599
2599
|
d && /* @__PURE__ */ n("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -2611,8 +2611,8 @@ function Cr({
|
|
|
2611
2611
|
disabled: a,
|
|
2612
2612
|
required: d,
|
|
2613
2613
|
rows: v,
|
|
2614
|
-
className:
|
|
2615
|
-
...
|
|
2614
|
+
className: x(),
|
|
2615
|
+
...f
|
|
2616
2616
|
}
|
|
2617
2617
|
),
|
|
2618
2618
|
i && /* @__PURE__ */ n("span", { className: "block mt-1 text-xs text-danger font-medium", children: i })
|
|
@@ -2622,7 +2622,7 @@ const Ee = { Input: Nr, InputArea: Cr };
|
|
|
2622
2622
|
function nt({
|
|
2623
2623
|
id: e,
|
|
2624
2624
|
name: r,
|
|
2625
|
-
checked: t
|
|
2625
|
+
checked: t,
|
|
2626
2626
|
onChange: o,
|
|
2627
2627
|
disabled: s = !1,
|
|
2628
2628
|
label: l,
|
|
@@ -2631,14 +2631,10 @@ function nt({
|
|
|
2631
2631
|
className: d = "",
|
|
2632
2632
|
...u
|
|
2633
2633
|
}) {
|
|
2634
|
-
const [
|
|
2635
|
-
H(() => {
|
|
2636
|
-
v(t);
|
|
2637
|
-
}, [t]);
|
|
2638
|
-
const h = () => {
|
|
2634
|
+
const [g, v] = _(!1), f = t !== void 0, x = f ? t : g, b = () => {
|
|
2639
2635
|
if (s) return;
|
|
2640
|
-
const
|
|
2641
|
-
v(
|
|
2636
|
+
const D = !x;
|
|
2637
|
+
f || v(D), o?.(D);
|
|
2642
2638
|
}, w = () => ({
|
|
2643
2639
|
primary: {
|
|
2644
2640
|
bg: "bg-primary",
|
|
@@ -2650,7 +2646,7 @@ function nt({
|
|
|
2650
2646
|
border: "border-secondary",
|
|
2651
2647
|
text: "text-secondary"
|
|
2652
2648
|
}
|
|
2653
|
-
})[i],
|
|
2649
|
+
})[i], m = () => {
|
|
2654
2650
|
switch (a) {
|
|
2655
2651
|
case "sm":
|
|
2656
2652
|
return "w-10 h-6";
|
|
@@ -2660,7 +2656,7 @@ function nt({
|
|
|
2660
2656
|
default:
|
|
2661
2657
|
return "w-13 h-7";
|
|
2662
2658
|
}
|
|
2663
|
-
},
|
|
2659
|
+
}, k = () => {
|
|
2664
2660
|
switch (a) {
|
|
2665
2661
|
case "sm":
|
|
2666
2662
|
return "w-5 h-5";
|
|
@@ -2670,18 +2666,18 @@ function nt({
|
|
|
2670
2666
|
default:
|
|
2671
2667
|
return "w-6 h-6";
|
|
2672
2668
|
}
|
|
2673
|
-
},
|
|
2674
|
-
if (!
|
|
2669
|
+
}, y = () => {
|
|
2670
|
+
if (!x) return "translate-x-0";
|
|
2675
2671
|
switch (a) {
|
|
2676
2672
|
case "sm":
|
|
2677
|
-
return "translate-x-
|
|
2673
|
+
return "translate-x-4";
|
|
2678
2674
|
case "lg":
|
|
2679
2675
|
return "translate-x-8";
|
|
2680
2676
|
case "md":
|
|
2681
2677
|
default:
|
|
2682
2678
|
return "translate-x-6";
|
|
2683
2679
|
}
|
|
2684
|
-
},
|
|
2680
|
+
}, z = w();
|
|
2685
2681
|
return /* @__PURE__ */ p(
|
|
2686
2682
|
"div",
|
|
2687
2683
|
{
|
|
@@ -2690,7 +2686,7 @@ function nt({
|
|
|
2690
2686
|
s ? "cursor-not-allowed" : "cursor-pointer",
|
|
2691
2687
|
d
|
|
2692
2688
|
),
|
|
2693
|
-
onClick:
|
|
2689
|
+
onClick: b,
|
|
2694
2690
|
children: [
|
|
2695
2691
|
/* @__PURE__ */ p("div", { className: "relative", children: [
|
|
2696
2692
|
/* @__PURE__ */ n(
|
|
@@ -2699,9 +2695,9 @@ function nt({
|
|
|
2699
2695
|
type: "checkbox",
|
|
2700
2696
|
id: e,
|
|
2701
2697
|
name: r,
|
|
2702
|
-
checked:
|
|
2703
|
-
onChange:
|
|
2704
|
-
|
|
2698
|
+
checked: x,
|
|
2699
|
+
onChange: b,
|
|
2700
|
+
onClick: (D) => D.stopPropagation(),
|
|
2705
2701
|
disabled: s,
|
|
2706
2702
|
className: "sr-only",
|
|
2707
2703
|
"aria-label": l || r,
|
|
@@ -2713,8 +2709,8 @@ function nt({
|
|
|
2713
2709
|
{
|
|
2714
2710
|
className: c(
|
|
2715
2711
|
"block transition-all duration-300 rounded-full border-2",
|
|
2716
|
-
|
|
2717
|
-
|
|
2712
|
+
m(),
|
|
2713
|
+
x ? c(z.bg, z.border) : "bg-gray-200 border-gray-300",
|
|
2718
2714
|
s ? "opacity-50" : "hover:shadow-md"
|
|
2719
2715
|
),
|
|
2720
2716
|
children: /* @__PURE__ */ n(
|
|
@@ -2722,8 +2718,8 @@ function nt({
|
|
|
2722
2718
|
{
|
|
2723
2719
|
className: c(
|
|
2724
2720
|
"absolute top-0.5 left-0.5 inline-block rounded-full bg-white transition-all duration-300 shadow-sm",
|
|
2725
|
-
|
|
2726
|
-
|
|
2721
|
+
k(),
|
|
2722
|
+
y()
|
|
2727
2723
|
)
|
|
2728
2724
|
}
|
|
2729
2725
|
)
|
|
@@ -2735,7 +2731,7 @@ function nt({
|
|
|
2735
2731
|
{
|
|
2736
2732
|
className: c(
|
|
2737
2733
|
"text-sm font-medium select-none",
|
|
2738
|
-
|
|
2734
|
+
z.text,
|
|
2739
2735
|
s && "opacity-50"
|
|
2740
2736
|
),
|
|
2741
2737
|
children: l
|
|
@@ -2789,30 +2785,30 @@ const Mr = ({
|
|
|
2789
2785
|
const [i, a] = _({
|
|
2790
2786
|
email: "",
|
|
2791
2787
|
password: ""
|
|
2792
|
-
}), [d, u] = _({}), [
|
|
2788
|
+
}), [d, u] = _({}), [g, v] = _(!1), [f, x] = _(
|
|
2793
2789
|
t ? "forgot" : "login"
|
|
2794
|
-
),
|
|
2790
|
+
), b = (E, h) => {
|
|
2795
2791
|
switch (E) {
|
|
2796
2792
|
case "email":
|
|
2797
|
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(
|
|
2793
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(h) ? "" : "Por favor ingresa un email válido";
|
|
2798
2794
|
case "password":
|
|
2799
|
-
return
|
|
2795
|
+
return h.length >= 6 ? "" : "La contraseña debe tener al menos 6 caracteres";
|
|
2800
2796
|
default:
|
|
2801
2797
|
return "";
|
|
2802
2798
|
}
|
|
2803
|
-
},
|
|
2804
|
-
const { name:
|
|
2799
|
+
}, w = (E) => {
|
|
2800
|
+
const { name: h, value: O } = E.target;
|
|
2805
2801
|
a((R) => ({
|
|
2806
2802
|
...R,
|
|
2807
|
-
[
|
|
2808
|
-
})), d[
|
|
2803
|
+
[h]: O
|
|
2804
|
+
})), d[h] && u((R) => ({
|
|
2809
2805
|
...R,
|
|
2810
|
-
[
|
|
2806
|
+
[h]: ""
|
|
2811
2807
|
}));
|
|
2812
2808
|
}, m = () => {
|
|
2813
|
-
const E = {},
|
|
2814
|
-
if (
|
|
2815
|
-
const O =
|
|
2809
|
+
const E = {}, h = b("email", i.email);
|
|
2810
|
+
if (h && (E.email = h), f === "login") {
|
|
2811
|
+
const O = b("password", i.password);
|
|
2816
2812
|
O && (E.password = O);
|
|
2817
2813
|
}
|
|
2818
2814
|
return u(E), Object.keys(E).length === 0;
|
|
@@ -2820,7 +2816,7 @@ const Mr = ({
|
|
|
2820
2816
|
if (E.preventDefault(), !!m()) {
|
|
2821
2817
|
v(!0);
|
|
2822
2818
|
try {
|
|
2823
|
-
switch (
|
|
2819
|
+
switch (f) {
|
|
2824
2820
|
case "login":
|
|
2825
2821
|
s && await s({
|
|
2826
2822
|
email: i.email,
|
|
@@ -2831,16 +2827,16 @@ const Mr = ({
|
|
|
2831
2827
|
l && await l(i.email);
|
|
2832
2828
|
break;
|
|
2833
2829
|
}
|
|
2834
|
-
} catch (
|
|
2835
|
-
console.error("Login error:",
|
|
2830
|
+
} catch (h) {
|
|
2831
|
+
console.error("Login error:", h);
|
|
2836
2832
|
} finally {
|
|
2837
2833
|
v(!1);
|
|
2838
2834
|
}
|
|
2839
2835
|
}
|
|
2840
2836
|
}, y = (E) => {
|
|
2841
|
-
|
|
2842
|
-
},
|
|
2843
|
-
switch (
|
|
2837
|
+
x(E), u({}), a({ email: i.email, password: "" });
|
|
2838
|
+
}, z = () => {
|
|
2839
|
+
switch (f) {
|
|
2844
2840
|
case "forgot":
|
|
2845
2841
|
return /* @__PURE__ */ n(
|
|
2846
2842
|
de,
|
|
@@ -2851,9 +2847,9 @@ const Mr = ({
|
|
|
2851
2847
|
placeholder: "Ingresa tu email",
|
|
2852
2848
|
label: "Email",
|
|
2853
2849
|
value: i.email,
|
|
2854
|
-
onChange:
|
|
2850
|
+
onChange: w,
|
|
2855
2851
|
error: d.email,
|
|
2856
|
-
disabled:
|
|
2852
|
+
disabled: g,
|
|
2857
2853
|
colorScheme: "secondary"
|
|
2858
2854
|
}
|
|
2859
2855
|
);
|
|
@@ -2868,9 +2864,9 @@ const Mr = ({
|
|
|
2868
2864
|
placeholder: "Ingresa tu email",
|
|
2869
2865
|
label: "Email",
|
|
2870
2866
|
value: i.email,
|
|
2871
|
-
onChange:
|
|
2867
|
+
onChange: w,
|
|
2872
2868
|
error: d.email,
|
|
2873
|
-
disabled:
|
|
2869
|
+
disabled: g,
|
|
2874
2870
|
colorScheme: "secondary"
|
|
2875
2871
|
}
|
|
2876
2872
|
),
|
|
@@ -2883,25 +2879,25 @@ const Mr = ({
|
|
|
2883
2879
|
placeholder: "Ingresa tu contraseña",
|
|
2884
2880
|
label: "Contraseña",
|
|
2885
2881
|
value: i.password,
|
|
2886
|
-
onChange:
|
|
2882
|
+
onChange: w,
|
|
2887
2883
|
error: d.password,
|
|
2888
|
-
disabled:
|
|
2884
|
+
disabled: g,
|
|
2889
2885
|
colorScheme: "secondary"
|
|
2890
2886
|
}
|
|
2891
2887
|
)
|
|
2892
2888
|
] });
|
|
2893
2889
|
}
|
|
2894
|
-
},
|
|
2895
|
-
switch (
|
|
2890
|
+
}, D = () => {
|
|
2891
|
+
switch (f) {
|
|
2896
2892
|
case "forgot":
|
|
2897
2893
|
return t ? "Cambiar Contraseña" : "Recuperar Contraseña";
|
|
2898
2894
|
default:
|
|
2899
2895
|
return e;
|
|
2900
2896
|
}
|
|
2901
|
-
},
|
|
2902
|
-
if (
|
|
2897
|
+
}, L = () => {
|
|
2898
|
+
if (g)
|
|
2903
2899
|
return /* @__PURE__ */ n(Mr, { size: 20, wrapperStyle: { minHeight: "auto" } });
|
|
2904
|
-
switch (
|
|
2900
|
+
switch (f) {
|
|
2905
2901
|
case "forgot":
|
|
2906
2902
|
return "Enviar Enlace";
|
|
2907
2903
|
default:
|
|
@@ -2913,24 +2909,24 @@ const Mr = ({
|
|
|
2913
2909
|
{
|
|
2914
2910
|
className: `flex justify-center items-center min-h-[90vh] p-4 bg-background ${o || ""}`,
|
|
2915
2911
|
children: /* @__PURE__ */ p("div", { className: "w-full max-w-100 p-6 bg-white rounded-2xl shadow-lg animate-[fadeIn_0.3s_ease-out] sm:p-8", children: [
|
|
2916
|
-
/* @__PURE__ */ n("h2", { className: "text-center mb-8 text-2xl font-semibold text-primary", children:
|
|
2912
|
+
/* @__PURE__ */ n("h2", { className: "text-center mb-8 text-2xl font-semibold text-primary", children: D() }),
|
|
2917
2913
|
/* @__PURE__ */ p("form", { onSubmit: k, children: [
|
|
2918
|
-
/* @__PURE__ */ n("div", { className: "space-y-4 mb-6", children:
|
|
2914
|
+
/* @__PURE__ */ n("div", { className: "space-y-4 mb-6", children: z() }),
|
|
2919
2915
|
/* @__PURE__ */ n(
|
|
2920
2916
|
ee,
|
|
2921
2917
|
{
|
|
2922
2918
|
type: "submit",
|
|
2923
|
-
disabled:
|
|
2924
|
-
loading:
|
|
2919
|
+
disabled: g,
|
|
2920
|
+
loading: g,
|
|
2925
2921
|
fullWidth: !0,
|
|
2926
2922
|
variant: "primary",
|
|
2927
2923
|
size: "lg",
|
|
2928
2924
|
className: "mb-6",
|
|
2929
|
-
children: !
|
|
2925
|
+
children: !g && L()
|
|
2930
2926
|
}
|
|
2931
2927
|
)
|
|
2932
2928
|
] }),
|
|
2933
|
-
|
|
2929
|
+
f === "login" && r && /* @__PURE__ */ n(
|
|
2934
2930
|
ee,
|
|
2935
2931
|
{
|
|
2936
2932
|
type: "button",
|
|
@@ -2942,7 +2938,7 @@ const Mr = ({
|
|
|
2942
2938
|
children: "¿Olvidaste tu contraseña?"
|
|
2943
2939
|
}
|
|
2944
2940
|
),
|
|
2945
|
-
|
|
2941
|
+
f === "forgot" && !t && /* @__PURE__ */ n(
|
|
2946
2942
|
ee,
|
|
2947
2943
|
{
|
|
2948
2944
|
type: "button",
|
|
@@ -3071,7 +3067,7 @@ function Ir(e) {
|
|
|
3071
3067
|
}
|
|
3072
3068
|
const jr = (e, r = 500) => {
|
|
3073
3069
|
const [t, o] = _(e);
|
|
3074
|
-
return
|
|
3070
|
+
return U(() => {
|
|
3075
3071
|
const s = setTimeout(() => {
|
|
3076
3072
|
o(e);
|
|
3077
3073
|
}, r);
|
|
@@ -3107,7 +3103,7 @@ const jr = (e, r = 500) => {
|
|
|
3107
3103
|
} });
|
|
3108
3104
|
function lt(e = 768) {
|
|
3109
3105
|
const [r, t] = _(() => typeof window > "u" ? !1 : window.innerWidth < e);
|
|
3110
|
-
return
|
|
3106
|
+
return U(() => {
|
|
3111
3107
|
if (typeof window > "u")
|
|
3112
3108
|
return;
|
|
3113
3109
|
const o = () => {
|
|
@@ -3129,11 +3125,11 @@ function it({
|
|
|
3129
3125
|
debounceDelay: a = 500,
|
|
3130
3126
|
...d
|
|
3131
3127
|
}) {
|
|
3132
|
-
const [u,
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
}, [v,
|
|
3136
|
-
const
|
|
3128
|
+
const [u, g] = _(e || ""), v = jr(u, a), f = Ne(r, [r]);
|
|
3129
|
+
U(() => {
|
|
3130
|
+
f(v);
|
|
3131
|
+
}, [v, f]);
|
|
3132
|
+
const x = () => {
|
|
3137
3133
|
const m = "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";
|
|
3138
3134
|
switch (s) {
|
|
3139
3135
|
case "primary":
|
|
@@ -3148,12 +3144,12 @@ function it({
|
|
|
3148
3144
|
"text-secondary border-secondary focus:border-secondary"
|
|
3149
3145
|
);
|
|
3150
3146
|
}
|
|
3151
|
-
},
|
|
3147
|
+
}, b = () => s === "primary" ? "text-primary" : "text-secondary", w = () => s === "primary" ? "text-primary" : "text-secondary";
|
|
3152
3148
|
return /* @__PURE__ */ p("div", { className: c("mb-0", i), children: [
|
|
3153
3149
|
l && /* @__PURE__ */ n(
|
|
3154
3150
|
"label",
|
|
3155
3151
|
{
|
|
3156
|
-
className: c("block mb-2 text-sm font-medium",
|
|
3152
|
+
className: c("block mb-2 text-sm font-medium", w()),
|
|
3157
3153
|
children: l
|
|
3158
3154
|
}
|
|
3159
3155
|
),
|
|
@@ -3163,7 +3159,7 @@ function it({
|
|
|
3163
3159
|
{
|
|
3164
3160
|
className: c(
|
|
3165
3161
|
"absolute left-3 top-1/2 -translate-y-1/2 text-base pointer-events-none",
|
|
3166
|
-
|
|
3162
|
+
b()
|
|
3167
3163
|
)
|
|
3168
3164
|
}
|
|
3169
3165
|
),
|
|
@@ -3172,10 +3168,10 @@ function it({
|
|
|
3172
3168
|
{
|
|
3173
3169
|
type: "text",
|
|
3174
3170
|
value: u,
|
|
3175
|
-
onChange: (m) =>
|
|
3171
|
+
onChange: (m) => g(m.target.value),
|
|
3176
3172
|
placeholder: t,
|
|
3177
3173
|
disabled: o,
|
|
3178
|
-
className:
|
|
3174
|
+
className: x(),
|
|
3179
3175
|
...d
|
|
3180
3176
|
}
|
|
3181
3177
|
)
|
|
@@ -3199,15 +3195,15 @@ function ct({
|
|
|
3199
3195
|
isLoading: a = !1,
|
|
3200
3196
|
fetchPage: d
|
|
3201
3197
|
}) {
|
|
3202
|
-
const u = parseInt(String(s)) === 1 || parseInt(String(o)) === 0 || a,
|
|
3203
|
-
a || (d ? d(s - 1) : t && t((
|
|
3204
|
-
...
|
|
3205
|
-
page:
|
|
3198
|
+
const u = parseInt(String(s)) === 1 || parseInt(String(o)) === 0 || a, g = parseInt(String(s)) === parseInt(String(o)) || parseInt(String(o)) === 0 || a, v = () => {
|
|
3199
|
+
a || (d ? d(s - 1) : t && t((x) => ({
|
|
3200
|
+
...x,
|
|
3201
|
+
page: x.page - 1
|
|
3206
3202
|
})));
|
|
3207
|
-
},
|
|
3208
|
-
a || (d ? d(s + 1) : t && t((
|
|
3209
|
-
...
|
|
3210
|
-
page:
|
|
3203
|
+
}, f = () => {
|
|
3204
|
+
a || (d ? d(s + 1) : t && t((x) => ({
|
|
3205
|
+
...x,
|
|
3206
|
+
page: x.page + 1
|
|
3211
3207
|
})));
|
|
3212
3208
|
};
|
|
3213
3209
|
return /* @__PURE__ */ p("div", { className: c("flex justify-center items-center mt-8", i), children: [
|
|
@@ -3224,8 +3220,8 @@ function ct({
|
|
|
3224
3220
|
/* @__PURE__ */ n(
|
|
3225
3221
|
ee,
|
|
3226
3222
|
{
|
|
3227
|
-
disabled:
|
|
3228
|
-
onClick:
|
|
3223
|
+
disabled: g,
|
|
3224
|
+
onClick: f,
|
|
3229
3225
|
variant: "primary",
|
|
3230
3226
|
children: /* @__PURE__ */ n(Tr, { size: 14 })
|
|
3231
3227
|
}
|
|
@@ -3252,20 +3248,20 @@ function dt({
|
|
|
3252
3248
|
colorScheme: a = "primary",
|
|
3253
3249
|
icon: d,
|
|
3254
3250
|
disabled: u = !1,
|
|
3255
|
-
headerExtra:
|
|
3251
|
+
headerExtra: g
|
|
3256
3252
|
}) {
|
|
3257
|
-
const [v,
|
|
3253
|
+
const [v, f] = _(o), x = s !== void 0 ? s : v, b = () => {
|
|
3258
3254
|
if (u) return;
|
|
3259
|
-
const y = !
|
|
3260
|
-
s === void 0 &&
|
|
3261
|
-
},
|
|
3255
|
+
const y = !x;
|
|
3256
|
+
s === void 0 && f(y), l?.(y);
|
|
3257
|
+
}, w = () => a === "primary" ? "border-primary" : "border-secondary", m = () => a === "primary" ? "text-primary" : "text-secondary", k = () => a === "primary" ? "hover:bg-primary/5" : "hover:bg-secondary/5";
|
|
3262
3258
|
return /* @__PURE__ */ p(
|
|
3263
3259
|
"div",
|
|
3264
3260
|
{
|
|
3265
3261
|
className: c(
|
|
3266
3262
|
"w-full rounded-lg border-2 bg-background transition-all duration-300",
|
|
3267
|
-
|
|
3268
|
-
|
|
3263
|
+
w(),
|
|
3264
|
+
x && "shadow-lg",
|
|
3269
3265
|
i
|
|
3270
3266
|
),
|
|
3271
3267
|
children: [
|
|
@@ -3273,14 +3269,14 @@ function dt({
|
|
|
3273
3269
|
"button",
|
|
3274
3270
|
{
|
|
3275
3271
|
type: "button",
|
|
3276
|
-
onClick:
|
|
3272
|
+
onClick: b,
|
|
3277
3273
|
disabled: u,
|
|
3278
3274
|
className: c(
|
|
3279
3275
|
"w-full flex cursor-pointer items-center justify-between p-4 text-left transition-all duration-300 rounded-lg",
|
|
3280
3276
|
!u && k(),
|
|
3281
3277
|
u && "opacity-50"
|
|
3282
3278
|
),
|
|
3283
|
-
"aria-expanded":
|
|
3279
|
+
"aria-expanded": x,
|
|
3284
3280
|
children: [
|
|
3285
3281
|
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
3286
3282
|
d && /* @__PURE__ */ n("div", { className: c("shrink-0", m()), children: d }),
|
|
@@ -3296,14 +3292,14 @@ function dt({
|
|
|
3296
3292
|
] })
|
|
3297
3293
|
] }),
|
|
3298
3294
|
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 shrink-0", children: [
|
|
3299
|
-
|
|
3295
|
+
g && /* @__PURE__ */ n("div", { onClick: (y) => y.stopPropagation(), children: g }),
|
|
3300
3296
|
/* @__PURE__ */ n(
|
|
3301
3297
|
"div",
|
|
3302
3298
|
{
|
|
3303
3299
|
className: c(
|
|
3304
3300
|
"h-5 w-5 transition-transform duration-300",
|
|
3305
3301
|
m(),
|
|
3306
|
-
|
|
3302
|
+
x && "rotate-180"
|
|
3307
3303
|
),
|
|
3308
3304
|
children: /* @__PURE__ */ n(je, { className: "h-5 w-5" })
|
|
3309
3305
|
}
|
|
@@ -3317,9 +3313,9 @@ function dt({
|
|
|
3317
3313
|
{
|
|
3318
3314
|
className: c(
|
|
3319
3315
|
"overflow-hidden transition-all duration-300 ease-in-out",
|
|
3320
|
-
|
|
3316
|
+
x ? "max-h-500 opacity-100" : "max-h-0 opacity-0"
|
|
3321
3317
|
),
|
|
3322
|
-
children: /* @__PURE__ */ n("div", { className: c("p-4 pt-0 border-t-0",
|
|
3318
|
+
children: /* @__PURE__ */ n("div", { className: c("p-4 pt-0 border-t-0", w()), children: /* @__PURE__ */ n("div", { className: "border-t border-border pt-4", children: t }) })
|
|
3323
3319
|
}
|
|
3324
3320
|
)
|
|
3325
3321
|
]
|
|
@@ -3340,11 +3336,11 @@ function mt({
|
|
|
3340
3336
|
}) {
|
|
3341
3337
|
const [a, d] = _(
|
|
3342
3338
|
r ?? e[0]?.value ?? ""
|
|
3343
|
-
), u = r !== void 0 ? r : a,
|
|
3344
|
-
r === void 0 && d(
|
|
3345
|
-
}, v = (
|
|
3346
|
-
const m = u ===
|
|
3347
|
-
if (
|
|
3339
|
+
), u = r !== void 0 ? r : a, g = (b) => {
|
|
3340
|
+
r === void 0 && d(b), t?.(b);
|
|
3341
|
+
}, v = (b, w) => {
|
|
3342
|
+
const m = u === b, k = "px-4 py-3 cursor-pointer text-sm font-medium transition-all duration-300 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed";
|
|
3343
|
+
if (w)
|
|
3348
3344
|
return c(k, "text-text-muted");
|
|
3349
3345
|
switch (i) {
|
|
3350
3346
|
case "filled":
|
|
@@ -3367,7 +3363,7 @@ function mt({
|
|
|
3367
3363
|
m ? l === "primary" ? "border-primary text-primary" : "border-secondary text-secondary" : "border-transparent text-gray-500 hover:text-gray-700"
|
|
3368
3364
|
);
|
|
3369
3365
|
}
|
|
3370
|
-
},
|
|
3366
|
+
}, f = () => {
|
|
3371
3367
|
switch (i) {
|
|
3372
3368
|
case "filled":
|
|
3373
3369
|
return "flex gap-1 p-1 bg-background-light rounded-lg";
|
|
@@ -3377,26 +3373,26 @@ function mt({
|
|
|
3377
3373
|
default:
|
|
3378
3374
|
return "flex gap-2 border-b border-gray-200";
|
|
3379
3375
|
}
|
|
3380
|
-
},
|
|
3376
|
+
}, x = G.Children.toArray(o).find((b) => G.isValidElement(b) ? b.props.value === u : !1);
|
|
3381
3377
|
return /* @__PURE__ */ p("div", { className: c("w-full", s), children: [
|
|
3382
|
-
/* @__PURE__ */ n("div", { className:
|
|
3378
|
+
/* @__PURE__ */ n("div", { className: f(), role: "tablist", children: e.map((b) => /* @__PURE__ */ p(
|
|
3383
3379
|
"button",
|
|
3384
3380
|
{
|
|
3385
3381
|
type: "button",
|
|
3386
3382
|
role: "tab",
|
|
3387
|
-
"aria-selected": u ===
|
|
3388
|
-
"aria-controls": `tabpanel-${
|
|
3389
|
-
disabled:
|
|
3390
|
-
onClick: () => !
|
|
3391
|
-
className: v(
|
|
3383
|
+
"aria-selected": u === b.value,
|
|
3384
|
+
"aria-controls": `tabpanel-${b.value}`,
|
|
3385
|
+
disabled: b.disabled,
|
|
3386
|
+
onClick: () => !b.disabled && g(b.value),
|
|
3387
|
+
className: v(b.value, b.disabled),
|
|
3392
3388
|
children: [
|
|
3393
|
-
|
|
3394
|
-
|
|
3389
|
+
b.icon && /* @__PURE__ */ n("span", { className: "shrink-0", children: b.icon }),
|
|
3390
|
+
b.label
|
|
3395
3391
|
]
|
|
3396
3392
|
},
|
|
3397
|
-
|
|
3393
|
+
b.value
|
|
3398
3394
|
)) }),
|
|
3399
|
-
/* @__PURE__ */ n("div", { role: "tabpanel", id: `tabpanel-${u}`, children:
|
|
3395
|
+
/* @__PURE__ */ n("div", { role: "tabpanel", id: `tabpanel-${u}`, children: x })
|
|
3400
3396
|
] });
|
|
3401
3397
|
}
|
|
3402
3398
|
function we(e) {
|
|
@@ -3467,27 +3463,27 @@ function pt({
|
|
|
3467
3463
|
const [a, d] = _(e || /* @__PURE__ */ new Date()), u = {
|
|
3468
3464
|
en: "en-US",
|
|
3469
3465
|
es: "es-ES"
|
|
3470
|
-
},
|
|
3466
|
+
}, g = {
|
|
3471
3467
|
en: Rr,
|
|
3472
3468
|
es: Fr
|
|
3473
3469
|
}, v = {
|
|
3474
3470
|
en: Vr,
|
|
3475
3471
|
es: Br
|
|
3476
|
-
},
|
|
3477
|
-
for (let
|
|
3478
|
-
|
|
3479
|
-
for (let
|
|
3472
|
+
}, f = Gr(a), x = Wr(a), b = [];
|
|
3473
|
+
for (let h = 0; h < x; h++)
|
|
3474
|
+
b.push(null);
|
|
3475
|
+
for (let h = 1; h <= f; h++) {
|
|
3480
3476
|
const O = new Date(
|
|
3481
3477
|
a.getFullYear(),
|
|
3482
3478
|
a.getMonth(),
|
|
3483
|
-
|
|
3479
|
+
h,
|
|
3484
3480
|
12,
|
|
3485
3481
|
0,
|
|
3486
3482
|
0
|
|
3487
3483
|
);
|
|
3488
|
-
|
|
3484
|
+
b.push(O);
|
|
3489
3485
|
}
|
|
3490
|
-
const
|
|
3486
|
+
const w = () => {
|
|
3491
3487
|
d(
|
|
3492
3488
|
new Date(
|
|
3493
3489
|
a.getFullYear(),
|
|
@@ -3531,19 +3527,19 @@ function pt({
|
|
|
3531
3527
|
0
|
|
3532
3528
|
)
|
|
3533
3529
|
);
|
|
3534
|
-
},
|
|
3535
|
-
if (
|
|
3530
|
+
}, z = (h) => {
|
|
3531
|
+
if (h && !t) {
|
|
3536
3532
|
const O = new Date(
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3533
|
+
h.getFullYear(),
|
|
3534
|
+
h.getMonth(),
|
|
3535
|
+
h.getDate(),
|
|
3540
3536
|
12,
|
|
3541
3537
|
0,
|
|
3542
3538
|
0
|
|
3543
3539
|
);
|
|
3544
3540
|
d(O), r?.(O);
|
|
3545
3541
|
}
|
|
3546
|
-
},
|
|
3542
|
+
}, L = (() => {
|
|
3547
3543
|
switch (s) {
|
|
3548
3544
|
case "primary":
|
|
3549
3545
|
return {
|
|
@@ -3561,7 +3557,7 @@ function pt({
|
|
|
3561
3557
|
button: "text-secondary border-secondary hover:bg-secondary/20"
|
|
3562
3558
|
};
|
|
3563
3559
|
}
|
|
3564
|
-
})(), E = (
|
|
3560
|
+
})(), E = (h) => h && e ? h.toDateString() === e.toDateString() : !1;
|
|
3565
3561
|
return /* @__PURE__ */ p(
|
|
3566
3562
|
"div",
|
|
3567
3563
|
{
|
|
@@ -3577,7 +3573,7 @@ function pt({
|
|
|
3577
3573
|
{
|
|
3578
3574
|
className: c(
|
|
3579
3575
|
"flex items-center justify-between mb-4",
|
|
3580
|
-
|
|
3576
|
+
L.header
|
|
3581
3577
|
),
|
|
3582
3578
|
children: [
|
|
3583
3579
|
/* @__PURE__ */ n(
|
|
@@ -3588,7 +3584,7 @@ function pt({
|
|
|
3588
3584
|
disabled: t,
|
|
3589
3585
|
className: c(
|
|
3590
3586
|
"p-2 rounded-lg border transition-all duration-300",
|
|
3591
|
-
|
|
3587
|
+
L.button,
|
|
3592
3588
|
t && "opacity-50 cursor-not-allowed"
|
|
3593
3589
|
),
|
|
3594
3590
|
children: /* @__PURE__ */ n(we, { size: 18 })
|
|
@@ -3603,7 +3599,7 @@ function pt({
|
|
|
3603
3599
|
disabled: t,
|
|
3604
3600
|
className: c(
|
|
3605
3601
|
"p-2 rounded-lg border transition-all duration-300",
|
|
3606
|
-
|
|
3602
|
+
L.button,
|
|
3607
3603
|
t && "opacity-50 cursor-not-allowed"
|
|
3608
3604
|
),
|
|
3609
3605
|
children: /* @__PURE__ */ n(ve, { size: 18 })
|
|
@@ -3612,16 +3608,16 @@ function pt({
|
|
|
3612
3608
|
]
|
|
3613
3609
|
}
|
|
3614
3610
|
),
|
|
3615
|
-
/* @__PURE__ */ p("div", { className: c("flex items-center justify-between",
|
|
3611
|
+
/* @__PURE__ */ p("div", { className: c("flex items-center justify-between", L.header), children: [
|
|
3616
3612
|
/* @__PURE__ */ n(
|
|
3617
3613
|
"button",
|
|
3618
3614
|
{
|
|
3619
3615
|
type: "button",
|
|
3620
|
-
onClick:
|
|
3616
|
+
onClick: w,
|
|
3621
3617
|
disabled: t,
|
|
3622
3618
|
className: c(
|
|
3623
3619
|
"p-2 rounded-lg border transition-all duration-300",
|
|
3624
|
-
|
|
3620
|
+
L.button,
|
|
3625
3621
|
t && "opacity-50 cursor-not-allowed"
|
|
3626
3622
|
),
|
|
3627
3623
|
children: /* @__PURE__ */ n(we, { size: 18 })
|
|
@@ -3636,7 +3632,7 @@ function pt({
|
|
|
3636
3632
|
disabled: t,
|
|
3637
3633
|
className: c(
|
|
3638
3634
|
"p-2 rounded-lg border transition-all duration-300",
|
|
3639
|
-
|
|
3635
|
+
L.button,
|
|
3640
3636
|
t && "opacity-50 cursor-not-allowed"
|
|
3641
3637
|
),
|
|
3642
3638
|
children: /* @__PURE__ */ n(ve, { size: 18 })
|
|
@@ -3644,33 +3640,33 @@ function pt({
|
|
|
3644
3640
|
)
|
|
3645
3641
|
] })
|
|
3646
3642
|
] }),
|
|
3647
|
-
/* @__PURE__ */ n("div", { className: "grid grid-cols-7 gap-2 mb-4", children:
|
|
3643
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-7 gap-2 mb-4", children: g[l].map((h) => /* @__PURE__ */ n(
|
|
3648
3644
|
"div",
|
|
3649
3645
|
{
|
|
3650
3646
|
className: c(
|
|
3651
3647
|
"text-center text-sm font-medium py-2",
|
|
3652
|
-
|
|
3648
|
+
L.header
|
|
3653
3649
|
),
|
|
3654
|
-
children:
|
|
3650
|
+
children: h
|
|
3655
3651
|
},
|
|
3656
|
-
|
|
3652
|
+
h
|
|
3657
3653
|
)) }),
|
|
3658
|
-
/* @__PURE__ */ n("div", { className: "grid grid-cols-7 gap-2", children:
|
|
3654
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-7 gap-2", children: b.map((h, O) => /* @__PURE__ */ n(
|
|
3659
3655
|
"button",
|
|
3660
3656
|
{
|
|
3661
3657
|
type: "button",
|
|
3662
|
-
onClick: () =>
|
|
3663
|
-
disabled: !
|
|
3658
|
+
onClick: () => z(h),
|
|
3659
|
+
disabled: !h || t,
|
|
3664
3660
|
className: c(
|
|
3665
3661
|
"p-2 rounded-lg text-sm font-medium transition-all duration-300",
|
|
3666
|
-
|
|
3662
|
+
h ? c(
|
|
3667
3663
|
"cursor-pointer",
|
|
3668
|
-
|
|
3669
|
-
E(
|
|
3664
|
+
L.hover,
|
|
3665
|
+
E(h) ? L.selected : "text-text border border-transparent hover:border-border",
|
|
3670
3666
|
t && "opacity-50 cursor-not-allowed"
|
|
3671
3667
|
) : "cursor-default"
|
|
3672
3668
|
),
|
|
3673
|
-
children:
|
|
3669
|
+
children: h ? h.getDate() : ""
|
|
3674
3670
|
},
|
|
3675
3671
|
O
|
|
3676
3672
|
)) }),
|
|
@@ -3679,7 +3675,7 @@ function pt({
|
|
|
3679
3675
|
{
|
|
3680
3676
|
className: c(
|
|
3681
3677
|
"mt-6 p-3 rounded-lg bg-background-dark border border-border text-center text-sm font-medium",
|
|
3682
|
-
|
|
3678
|
+
L.header
|
|
3683
3679
|
),
|
|
3684
3680
|
children: e.toLocaleDateString(u[l], {
|
|
3685
3681
|
year: "numeric",
|
|
@@ -3703,38 +3699,38 @@ function bt({
|
|
|
3703
3699
|
className: a = "",
|
|
3704
3700
|
rowClassName: d = "",
|
|
3705
3701
|
cellClassName: u = "",
|
|
3706
|
-
headerClassName:
|
|
3702
|
+
headerClassName: g = "",
|
|
3707
3703
|
emptyText: v = "No data available",
|
|
3708
|
-
showCount:
|
|
3709
|
-
countText:
|
|
3710
|
-
keyExtractor:
|
|
3704
|
+
showCount: f = !0,
|
|
3705
|
+
countText: x = (w) => `Showing ${w} record${w !== 1 ? "s" : ""}`,
|
|
3706
|
+
keyExtractor: b = (w, m) => w._id || w.id || m
|
|
3711
3707
|
}) {
|
|
3712
3708
|
if (t)
|
|
3713
3709
|
return /* @__PURE__ */ n("div", { className: "flex justify-center items-center min-h-50", children: /* @__PURE__ */ n("div", { className: "text-lg text-text-light", children: o }) });
|
|
3714
3710
|
if (r.length === 0)
|
|
3715
3711
|
return /* @__PURE__ */ n("div", { className: "flex justify-center items-center min-h-50", children: /* @__PURE__ */ n("div", { className: "text-lg text-text-muted", children: v }) });
|
|
3716
|
-
const
|
|
3712
|
+
const w = (m, k) => {
|
|
3717
3713
|
const y = k.toLowerCase().replace(/\s+/g, "_");
|
|
3718
|
-
let
|
|
3719
|
-
if (
|
|
3720
|
-
const
|
|
3714
|
+
let z = m[y];
|
|
3715
|
+
if (z === void 0) {
|
|
3716
|
+
const D = [
|
|
3721
3717
|
y.replace(/_/g, ""),
|
|
3722
3718
|
k.toLowerCase().replace(/\s+/g, ""),
|
|
3723
|
-
y.replace(/_([a-z])/g, (
|
|
3719
|
+
y.replace(/_([a-z])/g, (L, E) => E.toUpperCase())
|
|
3724
3720
|
];
|
|
3725
|
-
for (const
|
|
3726
|
-
if (m[
|
|
3727
|
-
|
|
3721
|
+
for (const L of D)
|
|
3722
|
+
if (m[L] !== void 0) {
|
|
3723
|
+
z = m[L];
|
|
3728
3724
|
break;
|
|
3729
3725
|
}
|
|
3730
3726
|
}
|
|
3731
|
-
if (
|
|
3732
|
-
const
|
|
3733
|
-
(E) =>
|
|
3727
|
+
if (z === void 0) {
|
|
3728
|
+
const D = k.toLowerCase().split(" "), L = Object.keys(m).find(
|
|
3729
|
+
(E) => D.some((h) => E.toLowerCase().includes(h))
|
|
3734
3730
|
);
|
|
3735
|
-
|
|
3731
|
+
L && (z = m[L]);
|
|
3736
3732
|
}
|
|
3737
|
-
return
|
|
3733
|
+
return G.isValidElement(z) ? z : z != null ? String(z) : "N/A";
|
|
3738
3734
|
};
|
|
3739
3735
|
return /* @__PURE__ */ p("div", { className: c("overflow-x-auto", a), children: [
|
|
3740
3736
|
/* @__PURE__ */ p("table", { className: "w-full border-collapse", children: [
|
|
@@ -3744,7 +3740,7 @@ function bt({
|
|
|
3744
3740
|
{
|
|
3745
3741
|
className: c(
|
|
3746
3742
|
"text-left py-3 px-4 font-semibold text-text",
|
|
3747
|
-
|
|
3743
|
+
g
|
|
3748
3744
|
),
|
|
3749
3745
|
children: m
|
|
3750
3746
|
},
|
|
@@ -3755,7 +3751,7 @@ function bt({
|
|
|
3755
3751
|
{
|
|
3756
3752
|
className: c(
|
|
3757
3753
|
"text-center py-3 px-4 font-semibold text-text",
|
|
3758
|
-
|
|
3754
|
+
g
|
|
3759
3755
|
),
|
|
3760
3756
|
children: l
|
|
3761
3757
|
}
|
|
@@ -3771,17 +3767,17 @@ function bt({
|
|
|
3771
3767
|
),
|
|
3772
3768
|
onClick: () => i?.(m),
|
|
3773
3769
|
children: [
|
|
3774
|
-
e.map((y,
|
|
3775
|
-
s && /* @__PURE__ */ n("td", { className: c("py-4 px-4", u), children: /* @__PURE__ */ n("div", { className: "flex gap-2 justify-center", children: s.map((y,
|
|
3776
|
-
const
|
|
3777
|
-
|
|
3770
|
+
e.map((y, z) => /* @__PURE__ */ n("td", { className: c("py-4 px-4", u), children: /* @__PURE__ */ n("div", { className: "text-text-light", children: w(m, y) }) }, z)),
|
|
3771
|
+
s && /* @__PURE__ */ n("td", { className: c("py-4 px-4", u), children: /* @__PURE__ */ n("div", { className: "flex gap-2 justify-center", children: s.map((y, z) => {
|
|
3772
|
+
const D = (L) => {
|
|
3773
|
+
L?.stopPropagation(), y.onClick?.(m);
|
|
3778
3774
|
};
|
|
3779
3775
|
if (y.component) {
|
|
3780
|
-
const
|
|
3776
|
+
const L = y.component;
|
|
3781
3777
|
return /* @__PURE__ */ p(
|
|
3782
|
-
|
|
3778
|
+
L,
|
|
3783
3779
|
{
|
|
3784
|
-
onClick:
|
|
3780
|
+
onClick: D,
|
|
3785
3781
|
className: y.className || "",
|
|
3786
3782
|
...y.props || {},
|
|
3787
3783
|
children: [
|
|
@@ -3789,13 +3785,13 @@ function bt({
|
|
|
3789
3785
|
y.label && y.label
|
|
3790
3786
|
]
|
|
3791
3787
|
},
|
|
3792
|
-
|
|
3788
|
+
z
|
|
3793
3789
|
);
|
|
3794
3790
|
}
|
|
3795
3791
|
return /* @__PURE__ */ p(
|
|
3796
3792
|
ee,
|
|
3797
3793
|
{
|
|
3798
|
-
onClick:
|
|
3794
|
+
onClick: D,
|
|
3799
3795
|
className: y.className || "",
|
|
3800
3796
|
...y.props || {},
|
|
3801
3797
|
children: [
|
|
@@ -3803,15 +3799,15 @@ function bt({
|
|
|
3803
3799
|
y.label && y.label
|
|
3804
3800
|
]
|
|
3805
3801
|
},
|
|
3806
|
-
|
|
3802
|
+
z
|
|
3807
3803
|
);
|
|
3808
3804
|
}) }) })
|
|
3809
3805
|
]
|
|
3810
3806
|
},
|
|
3811
|
-
|
|
3807
|
+
b(m, k)
|
|
3812
3808
|
)) })
|
|
3813
3809
|
] }),
|
|
3814
|
-
|
|
3810
|
+
f && r.length > 0 && /* @__PURE__ */ n("div", { className: "mt-6 text-center text-text-light text-sm", children: x(r.length) })
|
|
3815
3811
|
] });
|
|
3816
3812
|
}
|
|
3817
3813
|
function gt({
|
|
@@ -3825,24 +3821,24 @@ function gt({
|
|
|
3825
3821
|
onSearchInputCustom: a,
|
|
3826
3822
|
placeholder: d = "Select...",
|
|
3827
3823
|
disabled: u = !1,
|
|
3828
|
-
error:
|
|
3824
|
+
error: g,
|
|
3829
3825
|
required: v = !1,
|
|
3830
|
-
colorScheme:
|
|
3831
|
-
noResultsText:
|
|
3832
|
-
searchPlaceholder:
|
|
3833
|
-
...
|
|
3826
|
+
colorScheme: f = "primary",
|
|
3827
|
+
noResultsText: x = "No results found",
|
|
3828
|
+
searchPlaceholder: b = "Search...",
|
|
3829
|
+
...w
|
|
3834
3830
|
}) {
|
|
3835
|
-
const [m, k] = _(!1), [y,
|
|
3831
|
+
const [m, k] = _(!1), [y, z] = _(""), [D, L] = _({
|
|
3836
3832
|
top: 0,
|
|
3837
3833
|
left: 0,
|
|
3838
3834
|
openUpward: !1
|
|
3839
|
-
}), E = Array.isArray(t) ? t : t ? [t] : [], [
|
|
3840
|
-
E.map((N) => r.find((
|
|
3835
|
+
}), E = Array.isArray(t) ? t : t ? [t] : [], [h, O] = _(
|
|
3836
|
+
E.map((N) => r.find((S) => S.value === N)).filter(Boolean)
|
|
3841
3837
|
), R = ue(null), W = ue(null), Z = () => {
|
|
3842
3838
|
const N = "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";
|
|
3843
|
-
if (
|
|
3839
|
+
if (g)
|
|
3844
3840
|
return c(N, "border-danger focus:border-danger");
|
|
3845
|
-
switch (
|
|
3841
|
+
switch (f) {
|
|
3846
3842
|
case "primary":
|
|
3847
3843
|
return c(
|
|
3848
3844
|
N,
|
|
@@ -3855,51 +3851,51 @@ function gt({
|
|
|
3855
3851
|
"text-secondary border-secondary focus:border-secondary"
|
|
3856
3852
|
);
|
|
3857
3853
|
}
|
|
3858
|
-
},
|
|
3859
|
-
|
|
3860
|
-
const
|
|
3861
|
-
O(
|
|
3862
|
-
}, [t, r]),
|
|
3854
|
+
}, A = () => f === "primary" ? "text-primary" : "text-secondary";
|
|
3855
|
+
U(() => {
|
|
3856
|
+
const S = (Array.isArray(t) ? t : t !== "" && t !== null && t !== void 0 ? [t] : []).map((F) => r.find((V) => V.value === F)).filter(Boolean);
|
|
3857
|
+
O(S);
|
|
3858
|
+
}, [t, r]), U(() => {
|
|
3863
3859
|
m && i && W.current && W.current.focus();
|
|
3864
3860
|
}, [m, i]);
|
|
3865
3861
|
const M = Ne(() => {
|
|
3866
3862
|
if (!R.current) return;
|
|
3867
|
-
const N = R.current.getBoundingClientRect(),
|
|
3868
|
-
|
|
3863
|
+
const N = R.current.getBoundingClientRect(), S = window.innerHeight, F = 250, Q = S - N.bottom < F && N.top > F;
|
|
3864
|
+
L({
|
|
3869
3865
|
top: Q ? N.top : N.bottom,
|
|
3870
3866
|
left: N.left,
|
|
3871
3867
|
width: N.width,
|
|
3872
3868
|
openUpward: Q
|
|
3873
3869
|
});
|
|
3874
3870
|
}, []);
|
|
3875
|
-
|
|
3871
|
+
U(() => {
|
|
3876
3872
|
function N(F) {
|
|
3877
3873
|
R.current && !R.current.contains(F.target) && k(!1);
|
|
3878
3874
|
}
|
|
3879
|
-
function
|
|
3875
|
+
function S() {
|
|
3880
3876
|
m && M();
|
|
3881
3877
|
}
|
|
3882
|
-
return document.addEventListener("mousedown", N), window.addEventListener("scroll",
|
|
3883
|
-
document.removeEventListener("mousedown", N), window.removeEventListener("scroll",
|
|
3878
|
+
return document.addEventListener("mousedown", N), window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
|
|
3879
|
+
document.removeEventListener("mousedown", N), window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
|
|
3884
3880
|
};
|
|
3885
3881
|
}, [m, M]);
|
|
3886
3882
|
const P = (N) => {
|
|
3887
|
-
const
|
|
3883
|
+
const S = r.find(
|
|
3888
3884
|
(V) => V.value === N
|
|
3889
3885
|
);
|
|
3890
|
-
if (!
|
|
3886
|
+
if (!S) return;
|
|
3891
3887
|
let F;
|
|
3892
|
-
s ? (F =
|
|
3888
|
+
s ? (F = h.some((Q) => Q.value === N) ? h.filter((Q) => Q.value !== N) : [...h, S], O(F), o(F)) : (F = [S], O(F), o(S), k(!1), z(""));
|
|
3893
3889
|
}, B = (N) => {
|
|
3894
|
-
|
|
3890
|
+
z(N), a?.(N);
|
|
3895
3891
|
}, $ = i ? r.filter(
|
|
3896
3892
|
(N) => N.label.toLowerCase().includes(y.toLowerCase())
|
|
3897
|
-
) : r, X = () =>
|
|
3893
|
+
) : r, X = () => h.length === 0 ? d : s ? h.length === 1 ? h[0].label : `${h.length} selected` : h[0]?.label || d;
|
|
3898
3894
|
return /* @__PURE__ */ p("div", { className: c("mb-6", l), children: [
|
|
3899
3895
|
e && /* @__PURE__ */ p(
|
|
3900
3896
|
"label",
|
|
3901
3897
|
{
|
|
3902
|
-
className: c("block mb-2 text-sm font-medium",
|
|
3898
|
+
className: c("block mb-2 text-sm font-medium", A()),
|
|
3903
3899
|
children: [
|
|
3904
3900
|
e,
|
|
3905
3901
|
v && /* @__PURE__ */ n("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -3921,20 +3917,20 @@ function gt({
|
|
|
3921
3917
|
m && "ring-1"
|
|
3922
3918
|
),
|
|
3923
3919
|
disabled: u,
|
|
3924
|
-
...
|
|
3920
|
+
...w,
|
|
3925
3921
|
children: [
|
|
3926
3922
|
/* @__PURE__ */ p("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3927
|
-
|
|
3923
|
+
h.length > 0 && h[0].hex && /* @__PURE__ */ n(
|
|
3928
3924
|
"div",
|
|
3929
3925
|
{
|
|
3930
3926
|
className: "h-4 w-4 rounded border border-border",
|
|
3931
|
-
style: { backgroundColor:
|
|
3927
|
+
style: { backgroundColor: h[0].hex }
|
|
3932
3928
|
}
|
|
3933
3929
|
),
|
|
3934
3930
|
/* @__PURE__ */ n(
|
|
3935
3931
|
"span",
|
|
3936
3932
|
{
|
|
3937
|
-
className:
|
|
3933
|
+
className: h.length > 0 ? "" : "text-text-muted",
|
|
3938
3934
|
children: X()
|
|
3939
3935
|
}
|
|
3940
3936
|
)
|
|
@@ -3957,13 +3953,13 @@ function gt({
|
|
|
3957
3953
|
{
|
|
3958
3954
|
className: c(
|
|
3959
3955
|
"fixed z-9999 rounded-lg border-2 bg-white shadow-xl",
|
|
3960
|
-
|
|
3956
|
+
g ? "border-danger" : f === "primary" ? "border-primary" : "border-secondary"
|
|
3961
3957
|
),
|
|
3962
3958
|
style: {
|
|
3963
|
-
top: `${
|
|
3964
|
-
left: `${
|
|
3965
|
-
width: `${
|
|
3966
|
-
transform:
|
|
3959
|
+
top: `${D.top + (D.openUpward ? 0 : 8)}px`,
|
|
3960
|
+
left: `${D.left}px`,
|
|
3961
|
+
width: `${D.width}px`,
|
|
3962
|
+
transform: D.openUpward ? "translateY(-100%)" : "none"
|
|
3967
3963
|
},
|
|
3968
3964
|
children: [
|
|
3969
3965
|
i && /* @__PURE__ */ n("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ p("div", { className: "relative", children: [
|
|
@@ -3975,10 +3971,10 @@ function gt({
|
|
|
3975
3971
|
type: "text",
|
|
3976
3972
|
value: y,
|
|
3977
3973
|
onChange: (N) => B(N.target.value),
|
|
3978
|
-
placeholder:
|
|
3974
|
+
placeholder: b,
|
|
3979
3975
|
className: c(
|
|
3980
3976
|
"w-full rounded-lg border-2 py-2 pr-10 pl-10 text-sm transition-all duration-300 focus:outline-none focus:ring-1",
|
|
3981
|
-
|
|
3977
|
+
f === "primary" ? "border-primary text-primary" : "border-secondary text-secondary"
|
|
3982
3978
|
)
|
|
3983
3979
|
}
|
|
3984
3980
|
),
|
|
@@ -3986,7 +3982,7 @@ function gt({
|
|
|
3986
3982
|
"button",
|
|
3987
3983
|
{
|
|
3988
3984
|
type: "button",
|
|
3989
|
-
onClick: () =>
|
|
3985
|
+
onClick: () => z(""),
|
|
3990
3986
|
className: "absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 transform text-text-muted hover:text-text",
|
|
3991
3987
|
children: /* @__PURE__ */ n($r, { className: "h-4 w-4" })
|
|
3992
3988
|
}
|
|
@@ -4000,7 +3996,7 @@ function gt({
|
|
|
4000
3996
|
onClick: () => P(N.value ?? ""),
|
|
4001
3997
|
className: c(
|
|
4002
3998
|
"w-full px-4 py-3 text-left text-sm transition-colors",
|
|
4003
|
-
|
|
3999
|
+
h.some((S) => S.value === N.value) ? f === "primary" ? "bg-primary/10 text-primary font-medium" : "bg-secondary/10 text-secondary font-medium" : "text-text hover:bg-background-light"
|
|
4004
4000
|
),
|
|
4005
4001
|
children: /* @__PURE__ */ p("div", { className: "flex items-center gap-3", children: [
|
|
4006
4002
|
s && /* @__PURE__ */ n(
|
|
@@ -4008,10 +4004,10 @@ function gt({
|
|
|
4008
4004
|
{
|
|
4009
4005
|
className: c(
|
|
4010
4006
|
"flex h-4 w-4 items-center justify-center rounded border-2 transition-colors",
|
|
4011
|
-
|
|
4007
|
+
h.some((S) => S.value === N.value) ? f === "primary" ? "border-primary bg-primary" : "border-secondary bg-secondary" : "border-border"
|
|
4012
4008
|
),
|
|
4013
|
-
children:
|
|
4014
|
-
(
|
|
4009
|
+
children: h.some(
|
|
4010
|
+
(S) => S.value === N.value
|
|
4015
4011
|
) && /* @__PURE__ */ n(
|
|
4016
4012
|
"svg",
|
|
4017
4013
|
{
|
|
@@ -4042,13 +4038,13 @@ function gt({
|
|
|
4042
4038
|
},
|
|
4043
4039
|
N.value
|
|
4044
4040
|
)),
|
|
4045
|
-
$.length === 0 && y && r.length > 0 && /* @__PURE__ */ n("div", { className: "px-4 py-3", children: /* @__PURE__ */ n("span", { className: "text-sm text-text-muted", children:
|
|
4041
|
+
$.length === 0 && y && r.length > 0 && /* @__PURE__ */ n("div", { className: "px-4 py-3", children: /* @__PURE__ */ n("span", { className: "text-sm text-text-muted", children: x }) })
|
|
4046
4042
|
] })
|
|
4047
4043
|
]
|
|
4048
4044
|
}
|
|
4049
4045
|
)
|
|
4050
4046
|
] }),
|
|
4051
|
-
|
|
4047
|
+
g && /* @__PURE__ */ n("span", { className: "block mt-1 text-xs text-danger font-medium", children: g })
|
|
4052
4048
|
] });
|
|
4053
4049
|
}
|
|
4054
4050
|
const ft = ({
|
|
@@ -4063,13 +4059,13 @@ const ft = ({
|
|
|
4063
4059
|
required: d = !1,
|
|
4064
4060
|
colorScheme: u = "secondary",
|
|
4065
4061
|
// "primary" | "secondary"
|
|
4066
|
-
className:
|
|
4062
|
+
className: g = "",
|
|
4067
4063
|
accept: v = "*/*",
|
|
4068
4064
|
// Tipos de archivo aceptados: "image/*", "application/pdf", ".doc,.docx", etc.
|
|
4069
|
-
multiple:
|
|
4070
|
-
...
|
|
4065
|
+
multiple: f = !1,
|
|
4066
|
+
...x
|
|
4071
4067
|
}) => {
|
|
4072
|
-
const
|
|
4068
|
+
const b = ue(null), [w, m] = _(!1), [k, y] = _([]), z = () => {
|
|
4073
4069
|
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]";
|
|
4074
4070
|
if (i)
|
|
4075
4071
|
return c(
|
|
@@ -4089,7 +4085,7 @@ const ft = ({
|
|
|
4089
4085
|
"border-secondary focus:border-secondary focus:ring-1 focus:ring-secondary hover:border-secondary-dark"
|
|
4090
4086
|
);
|
|
4091
4087
|
}
|
|
4092
|
-
},
|
|
4088
|
+
}, D = () => {
|
|
4093
4089
|
switch (u) {
|
|
4094
4090
|
case "primary":
|
|
4095
4091
|
return "text-primary";
|
|
@@ -4097,13 +4093,13 @@ const ft = ({
|
|
|
4097
4093
|
default:
|
|
4098
4094
|
return "text-secondary";
|
|
4099
4095
|
}
|
|
4100
|
-
},
|
|
4096
|
+
}, L = (M) => {
|
|
4101
4097
|
M.preventDefault(), M.stopPropagation(), a || (M.type === "dragenter" || M.type === "dragover" ? m(!0) : M.type === "dragleave" && m(!1));
|
|
4102
4098
|
}, E = (M) => {
|
|
4103
4099
|
if (M.preventDefault(), M.stopPropagation(), m(!1), a) return;
|
|
4104
4100
|
const P = M.dataTransfer.files;
|
|
4105
4101
|
O(P);
|
|
4106
|
-
},
|
|
4102
|
+
}, h = (M) => {
|
|
4107
4103
|
const P = M.target.files;
|
|
4108
4104
|
P && O(P);
|
|
4109
4105
|
}, O = (M) => {
|
|
@@ -4114,27 +4110,27 @@ const ft = ({
|
|
|
4114
4110
|
console.warn("No valid files selected");
|
|
4115
4111
|
return;
|
|
4116
4112
|
}
|
|
4117
|
-
y(
|
|
4113
|
+
y(f ? B : [B[0]]), t(f ? B : [B[0]]);
|
|
4118
4114
|
} else
|
|
4119
|
-
y(
|
|
4115
|
+
y(f ? P : [P[0]]), t(f ? P : [P[0]]);
|
|
4120
4116
|
}, R = (M, P) => P.split(",").map(($) => $.trim()).some(($) => {
|
|
4121
4117
|
if ($.startsWith("."))
|
|
4122
4118
|
return M.name.toLowerCase().endsWith($.toLowerCase());
|
|
4123
4119
|
if ($.includes("/")) {
|
|
4124
|
-
const [X, N] = $.split("/"),
|
|
4125
|
-
return N === "*" ?
|
|
4120
|
+
const [X, N] = $.split("/"), S = M.type.split("/")[0];
|
|
4121
|
+
return N === "*" ? S === X : M.type === $;
|
|
4126
4122
|
}
|
|
4127
4123
|
return !1;
|
|
4128
4124
|
}), W = () => {
|
|
4129
|
-
a ||
|
|
4125
|
+
a || b.current?.click();
|
|
4130
4126
|
}, Z = (M) => {
|
|
4131
4127
|
const P = k.filter((B, $) => $ !== M);
|
|
4132
4128
|
y(P), t(P);
|
|
4133
|
-
},
|
|
4129
|
+
}, A = (M) => {
|
|
4134
4130
|
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), W());
|
|
4135
4131
|
};
|
|
4136
|
-
return /* @__PURE__ */ p("div", { className: `mb-6 ${
|
|
4137
|
-
l && /* @__PURE__ */ p("label", { className: `block mb-2 text-sm font-medium ${
|
|
4132
|
+
return /* @__PURE__ */ p("div", { className: `mb-6 ${g}`, children: [
|
|
4133
|
+
l && /* @__PURE__ */ p("label", { className: `block mb-2 text-sm font-medium ${D()}`, children: [
|
|
4138
4134
|
l,
|
|
4139
4135
|
d && /* @__PURE__ */ n("span", { className: "text-danger ml-1", children: "*" })
|
|
4140
4136
|
] }),
|
|
@@ -4142,32 +4138,32 @@ const ft = ({
|
|
|
4142
4138
|
"div",
|
|
4143
4139
|
{
|
|
4144
4140
|
className: c(
|
|
4145
|
-
|
|
4146
|
-
|
|
4141
|
+
z(),
|
|
4142
|
+
w && "bg-background-light border-2-dashed"
|
|
4147
4143
|
),
|
|
4148
|
-
onDragEnter:
|
|
4149
|
-
onDragLeave:
|
|
4150
|
-
onDragOver:
|
|
4144
|
+
onDragEnter: L,
|
|
4145
|
+
onDragLeave: L,
|
|
4146
|
+
onDragOver: L,
|
|
4151
4147
|
onDrop: E,
|
|
4152
4148
|
onClick: W,
|
|
4153
|
-
onKeyDown:
|
|
4149
|
+
onKeyDown: A,
|
|
4154
4150
|
role: "button",
|
|
4155
4151
|
tabIndex: a ? -1 : 0,
|
|
4156
4152
|
children: [
|
|
4157
4153
|
/* @__PURE__ */ n(
|
|
4158
4154
|
"input",
|
|
4159
4155
|
{
|
|
4160
|
-
ref:
|
|
4156
|
+
ref: b,
|
|
4161
4157
|
id: e,
|
|
4162
4158
|
name: r,
|
|
4163
4159
|
type: "file",
|
|
4164
|
-
onChange:
|
|
4160
|
+
onChange: h,
|
|
4165
4161
|
disabled: a,
|
|
4166
4162
|
required: d,
|
|
4167
4163
|
accept: v,
|
|
4168
|
-
multiple:
|
|
4164
|
+
multiple: f,
|
|
4169
4165
|
className: "hidden",
|
|
4170
|
-
...
|
|
4166
|
+
...x
|
|
4171
4167
|
}
|
|
4172
4168
|
),
|
|
4173
4169
|
/* @__PURE__ */ p("div", { className: "flex flex-col items-center justify-center py-4", children: [
|
|
@@ -4189,13 +4185,13 @@ const ft = ({
|
|
|
4189
4185
|
)
|
|
4190
4186
|
}
|
|
4191
4187
|
),
|
|
4192
|
-
/* @__PURE__ */ n("p", { className: `text-sm ${
|
|
4188
|
+
/* @__PURE__ */ n("p", { className: `text-sm ${D()}`, children: o })
|
|
4193
4189
|
] })
|
|
4194
4190
|
]
|
|
4195
4191
|
}
|
|
4196
4192
|
),
|
|
4197
4193
|
/* @__PURE__ */ p("div", { className: "mt-4 space-y-2", children: [
|
|
4198
|
-
/* @__PURE__ */ p("p", { className: `text-sm font-medium ${
|
|
4194
|
+
/* @__PURE__ */ p("p", { className: `text-sm font-medium ${D()}`, children: [
|
|
4199
4195
|
k.length,
|
|
4200
4196
|
" ",
|
|
4201
4197
|
s,
|
|
@@ -4269,19 +4265,19 @@ function yt({
|
|
|
4269
4265
|
closeOnOverlayClick: d = !0,
|
|
4270
4266
|
closeOnEscape: u = !0
|
|
4271
4267
|
}) {
|
|
4272
|
-
if (
|
|
4268
|
+
if (U(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
4273
4269
|
document.body.style.overflow = "unset";
|
|
4274
|
-
}), [e]),
|
|
4270
|
+
}), [e]), U(() => {
|
|
4275
4271
|
if (!u || !e)
|
|
4276
4272
|
return;
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4273
|
+
const x = (b) => {
|
|
4274
|
+
b.key === "Escape" && r();
|
|
4279
4275
|
};
|
|
4280
|
-
return document.addEventListener("keydown",
|
|
4281
|
-
document.removeEventListener("keydown",
|
|
4276
|
+
return document.addEventListener("keydown", x), () => {
|
|
4277
|
+
document.removeEventListener("keydown", x);
|
|
4282
4278
|
};
|
|
4283
4279
|
}, [e, r, u]), !e) return null;
|
|
4284
|
-
const
|
|
4280
|
+
const g = {
|
|
4285
4281
|
sm: "max-w-sm",
|
|
4286
4282
|
md: "max-w-md",
|
|
4287
4283
|
lg: "max-w-lg",
|
|
@@ -4289,7 +4285,7 @@ function yt({
|
|
|
4289
4285
|
"2xl": "max-w-2xl"
|
|
4290
4286
|
}, v = () => {
|
|
4291
4287
|
d && r();
|
|
4292
|
-
},
|
|
4288
|
+
}, f = /* @__PURE__ */ n(
|
|
4293
4289
|
"div",
|
|
4294
4290
|
{
|
|
4295
4291
|
className: c(
|
|
@@ -4305,10 +4301,10 @@ function yt({
|
|
|
4305
4301
|
{
|
|
4306
4302
|
className: c(
|
|
4307
4303
|
"relative bg-white rounded-xl shadow-2xl max-h-[90vh] flex flex-col w-full transition-all duration-300",
|
|
4308
|
-
|
|
4304
|
+
g[s],
|
|
4309
4305
|
l
|
|
4310
4306
|
),
|
|
4311
|
-
onClick: (
|
|
4307
|
+
onClick: (x) => x.stopPropagation(),
|
|
4312
4308
|
children: [
|
|
4313
4309
|
(t || a) && /* @__PURE__ */ p("div", { className: "flex justify-between items-center px-6 py-5 border-b border-border rounded-t-xl shrink-0", children: [
|
|
4314
4310
|
t && /* @__PURE__ */ n(
|
|
@@ -4336,7 +4332,7 @@ function yt({
|
|
|
4336
4332
|
)
|
|
4337
4333
|
}
|
|
4338
4334
|
);
|
|
4339
|
-
return Fe(
|
|
4335
|
+
return Fe(f, document.body);
|
|
4340
4336
|
}
|
|
4341
4337
|
function xt({
|
|
4342
4338
|
id: e,
|
|
@@ -4349,25 +4345,25 @@ function xt({
|
|
|
4349
4345
|
variant: a = "solid",
|
|
4350
4346
|
label: d,
|
|
4351
4347
|
className: u = "",
|
|
4352
|
-
...
|
|
4348
|
+
...g
|
|
4353
4349
|
}) {
|
|
4354
|
-
const v = (
|
|
4355
|
-
const
|
|
4356
|
-
if (
|
|
4357
|
-
switch (
|
|
4350
|
+
const v = (f, x) => {
|
|
4351
|
+
const b = "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";
|
|
4352
|
+
if (f === "outline")
|
|
4353
|
+
switch (x) {
|
|
4358
4354
|
case "primary":
|
|
4359
|
-
return `${
|
|
4355
|
+
return `${b} checkbox-outline checkbox-primary`;
|
|
4360
4356
|
case "secondary":
|
|
4361
4357
|
default:
|
|
4362
|
-
return `${
|
|
4358
|
+
return `${b} checkbox-outline checkbox-secondary`;
|
|
4363
4359
|
}
|
|
4364
4360
|
else
|
|
4365
|
-
switch (
|
|
4361
|
+
switch (x) {
|
|
4366
4362
|
case "primary":
|
|
4367
|
-
return `${
|
|
4363
|
+
return `${b} checkbox-solid checkbox-primary`;
|
|
4368
4364
|
case "secondary":
|
|
4369
4365
|
default:
|
|
4370
|
-
return `${
|
|
4366
|
+
return `${b} checkbox-solid checkbox-secondary`;
|
|
4371
4367
|
}
|
|
4372
4368
|
};
|
|
4373
4369
|
return d ? /* @__PURE__ */ p("div", { className: `flex items-center gap-2 ${u}`, children: [
|
|
@@ -4382,7 +4378,7 @@ function xt({
|
|
|
4382
4378
|
disabled: s,
|
|
4383
4379
|
required: l,
|
|
4384
4380
|
className: v(a, i),
|
|
4385
|
-
...
|
|
4381
|
+
...g
|
|
4386
4382
|
}
|
|
4387
4383
|
),
|
|
4388
4384
|
/* @__PURE__ */ p(
|
|
@@ -4410,7 +4406,7 @@ function xt({
|
|
|
4410
4406
|
style: {
|
|
4411
4407
|
accentColor: "white"
|
|
4412
4408
|
},
|
|
4413
|
-
...
|
|
4409
|
+
...g
|
|
4414
4410
|
}
|
|
4415
4411
|
);
|
|
4416
4412
|
}
|
|
@@ -4430,14 +4426,14 @@ function wt({
|
|
|
4430
4426
|
disabled: a = !1,
|
|
4431
4427
|
required: d = !1,
|
|
4432
4428
|
colorScheme: u = "secondary",
|
|
4433
|
-
className:
|
|
4429
|
+
className: g = "",
|
|
4434
4430
|
...v
|
|
4435
4431
|
}) {
|
|
4436
|
-
const
|
|
4432
|
+
const f = c(
|
|
4437
4433
|
"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",
|
|
4438
4434
|
i ? "border-danger focus:border-danger focus:shadow-danger-light" : u === "primary" ? "text-primary border-primary focus:border-primary" : "text-secondary border-secondary focus:border-secondary"
|
|
4439
4435
|
);
|
|
4440
|
-
return /* @__PURE__ */ p("div", { className: c("mb-6",
|
|
4436
|
+
return /* @__PURE__ */ p("div", { className: c("mb-6", g), children: [
|
|
4441
4437
|
l && /* @__PURE__ */ p(
|
|
4442
4438
|
"label",
|
|
4443
4439
|
{
|
|
@@ -4459,12 +4455,12 @@ function wt({
|
|
|
4459
4455
|
name: r,
|
|
4460
4456
|
type: "datetime-local",
|
|
4461
4457
|
value: ke(t),
|
|
4462
|
-
onChange: (
|
|
4458
|
+
onChange: (x) => o(Hr(x.target.value)),
|
|
4463
4459
|
min: s ? ke(s) : void 0,
|
|
4464
4460
|
disabled: a,
|
|
4465
4461
|
required: d,
|
|
4466
4462
|
"aria-invalid": i ? !0 : void 0,
|
|
4467
|
-
className:
|
|
4463
|
+
className: f,
|
|
4468
4464
|
...v
|
|
4469
4465
|
}
|
|
4470
4466
|
),
|