componentables 0.1.1 → 0.1.3
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/components/Table.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +277 -261
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import I, { useMemo as Pe, useEffect as K, createContext as Se, useContext as De, useState as T, useCallback as he, useRef as ce } from "react";
|
|
2
2
|
import { jsxs as k, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
function ye(e) {
|
|
4
4
|
var r, t, o = "";
|
|
@@ -13,14 +13,14 @@ function Ae() {
|
|
|
13
13
|
for (var e, r, t = 0, o = "", n = arguments.length; t < n; t++) (e = arguments[t]) && (r = ye(e)) && (o && (o += " "), o += r);
|
|
14
14
|
return o;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
const r =
|
|
16
|
+
const ie = "-", je = (e) => {
|
|
17
|
+
const r = Ee(e), {
|
|
18
18
|
conflictingClassGroups: t,
|
|
19
19
|
conflictingClassGroupModifiers: o
|
|
20
20
|
} = e;
|
|
21
21
|
return {
|
|
22
22
|
getClassGroupId: (i) => {
|
|
23
|
-
const a = i.split(
|
|
23
|
+
const a = i.split(ie);
|
|
24
24
|
return a[0] === "" && a.length !== 1 && a.shift(), xe(a, r) || Oe(i);
|
|
25
25
|
},
|
|
26
26
|
getConflictingClassGroupIds: (i, a) => {
|
|
@@ -36,17 +36,17 @@ const le = "-", je = (e) => {
|
|
|
36
36
|
return n;
|
|
37
37
|
if (r.validators.length === 0)
|
|
38
38
|
return;
|
|
39
|
-
const s = e.join(
|
|
39
|
+
const s = e.join(ie);
|
|
40
40
|
return r.validators.find(({
|
|
41
41
|
validator: i
|
|
42
42
|
}) => i(s))?.classGroupId;
|
|
43
|
-
},
|
|
44
|
-
if (
|
|
45
|
-
const r =
|
|
43
|
+
}, de = /^\[(.+)\]$/, Oe = (e) => {
|
|
44
|
+
if (de.test(e)) {
|
|
45
|
+
const r = de.exec(e)[1], t = r?.substring(0, r.indexOf(":"));
|
|
46
46
|
if (t)
|
|
47
47
|
return "arbitrary.." + t;
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, Ee = (e) => {
|
|
50
50
|
const {
|
|
51
51
|
theme: r,
|
|
52
52
|
prefix: t
|
|
@@ -60,12 +60,12 @@ const le = "-", je = (e) => {
|
|
|
60
60
|
}, ae = (e, r, t, o) => {
|
|
61
61
|
e.forEach((n) => {
|
|
62
62
|
if (typeof n == "string") {
|
|
63
|
-
const s = n === "" ? r :
|
|
63
|
+
const s = n === "" ? r : ue(r, n);
|
|
64
64
|
s.classGroupId = t;
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
if (typeof n == "function") {
|
|
68
|
-
if (
|
|
68
|
+
if (Ie(n)) {
|
|
69
69
|
ae(n(o), r, t, o);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
@@ -76,18 +76,18 @@ const le = "-", je = (e) => {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
Object.entries(n).forEach(([s, i]) => {
|
|
79
|
-
ae(i,
|
|
79
|
+
ae(i, ue(r, s), t, o);
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
-
},
|
|
82
|
+
}, ue = (e, r) => {
|
|
83
83
|
let t = e;
|
|
84
|
-
return r.split(
|
|
84
|
+
return r.split(ie).forEach((o) => {
|
|
85
85
|
t.nextPart.has(o) || t.nextPart.set(o, {
|
|
86
86
|
nextPart: /* @__PURE__ */ new Map(),
|
|
87
87
|
validators: []
|
|
88
88
|
}), t = t.nextPart.get(o);
|
|
89
89
|
}), t;
|
|
90
|
-
},
|
|
90
|
+
}, Ie = (e) => e.isThemeGetter, Te = (e, r) => r ? e.map(([t, o]) => {
|
|
91
91
|
const n = o.map((s) => typeof s == "string" ? r + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([i, a]) => [r + i, a])) : s);
|
|
92
92
|
return [t, n];
|
|
93
93
|
}) : e, Re = (e) => {
|
|
@@ -120,12 +120,12 @@ const le = "-", je = (e) => {
|
|
|
120
120
|
experimentalParseClassName: t
|
|
121
121
|
} = e, o = r.length === 1, n = r[0], s = r.length, i = (a) => {
|
|
122
122
|
const p = [];
|
|
123
|
-
let c = 0,
|
|
123
|
+
let c = 0, m = 0, C;
|
|
124
124
|
for (let d = 0; d < a.length; d++) {
|
|
125
125
|
let y = a[d];
|
|
126
126
|
if (c === 0) {
|
|
127
127
|
if (y === n && (o || a.slice(d, d + s) === r)) {
|
|
128
|
-
p.push(a.slice(
|
|
128
|
+
p.push(a.slice(m, d)), m = d + s;
|
|
129
129
|
continue;
|
|
130
130
|
}
|
|
131
131
|
if (y === "/") {
|
|
@@ -135,12 +135,12 @@ const le = "-", je = (e) => {
|
|
|
135
135
|
}
|
|
136
136
|
y === "[" ? c++ : y === "]" && c--;
|
|
137
137
|
}
|
|
138
|
-
const w = p.length === 0 ? a : a.substring(
|
|
138
|
+
const w = p.length === 0 ? a : a.substring(m), v = w.startsWith(ve), f = v ? w.substring(1) : w, g = C && C > m ? C - m : void 0;
|
|
139
139
|
return {
|
|
140
140
|
modifiers: p,
|
|
141
141
|
hasImportantModifier: v,
|
|
142
|
-
baseClassName:
|
|
143
|
-
maybePostfixModifierPosition:
|
|
142
|
+
baseClassName: f,
|
|
143
|
+
maybePostfixModifierPosition: g
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
return t ? (a) => t({
|
|
@@ -168,30 +168,30 @@ const le = "-", je = (e) => {
|
|
|
168
168
|
let a = "";
|
|
169
169
|
for (let p = i.length - 1; p >= 0; p -= 1) {
|
|
170
170
|
const c = i[p], {
|
|
171
|
-
modifiers:
|
|
171
|
+
modifiers: m,
|
|
172
172
|
hasImportantModifier: C,
|
|
173
173
|
baseClassName: w,
|
|
174
174
|
maybePostfixModifierPosition: v
|
|
175
175
|
} = t(c);
|
|
176
|
-
let
|
|
177
|
-
if (!
|
|
178
|
-
if (!
|
|
176
|
+
let f = !!v, g = o(f ? w.substring(0, v) : w);
|
|
177
|
+
if (!g) {
|
|
178
|
+
if (!f) {
|
|
179
179
|
a = c + (a.length > 0 ? " " + a : a);
|
|
180
180
|
continue;
|
|
181
181
|
}
|
|
182
|
-
if (
|
|
182
|
+
if (g = o(w), !g) {
|
|
183
183
|
a = c + (a.length > 0 ? " " + a : a);
|
|
184
184
|
continue;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
f = !1;
|
|
187
187
|
}
|
|
188
|
-
const d = Ge(
|
|
189
|
-
if (s.includes(
|
|
188
|
+
const d = Ge(m).join(":"), y = C ? d + ve : d, b = y + g;
|
|
189
|
+
if (s.includes(b))
|
|
190
190
|
continue;
|
|
191
|
-
s.push(
|
|
192
|
-
const
|
|
193
|
-
for (let M = 0; M <
|
|
194
|
-
const j =
|
|
191
|
+
s.push(b);
|
|
192
|
+
const P = n(g, f);
|
|
193
|
+
for (let M = 0; M < P.length; ++M) {
|
|
194
|
+
const j = P[M];
|
|
195
195
|
s.push(y + j);
|
|
196
196
|
}
|
|
197
197
|
a = c + (a.length > 0 ? " " + a : a);
|
|
@@ -215,15 +215,15 @@ const we = (e) => {
|
|
|
215
215
|
function We(e, ...r) {
|
|
216
216
|
let t, o, n, s = i;
|
|
217
217
|
function i(p) {
|
|
218
|
-
const c = r.reduce((
|
|
218
|
+
const c = r.reduce((m, C) => C(m), e());
|
|
219
219
|
return t = Fe(c), o = t.cache.get, n = t.cache.set, s = a, a(p);
|
|
220
220
|
}
|
|
221
221
|
function a(p) {
|
|
222
222
|
const c = o(p);
|
|
223
223
|
if (c)
|
|
224
224
|
return c;
|
|
225
|
-
const
|
|
226
|
-
return n(p,
|
|
225
|
+
const m = _e(p, t);
|
|
226
|
+
return n(p, m), m;
|
|
227
227
|
}
|
|
228
228
|
return function() {
|
|
229
229
|
return s($e.apply(null, arguments));
|
|
@@ -241,7 +241,7 @@ const D = (e) => {
|
|
|
241
241
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
242
242
|
Ke.test(e) && !Je.test(e)
|
|
243
243
|
), Ce = () => !1, ar = (e) => Xe.test(e), lr = (e) => Ze.test(e), ir = () => {
|
|
244
|
-
const e = D("colors"), r = D("spacing"), t = D("blur"), o = D("brightness"), n = D("borderColor"), s = D("borderRadius"), i = D("borderSpacing"), a = D("borderWidth"), p = D("contrast"), c = D("grayscale"),
|
|
244
|
+
const e = D("colors"), r = D("spacing"), t = D("blur"), o = D("brightness"), n = D("borderColor"), s = D("borderRadius"), i = D("borderSpacing"), a = D("borderWidth"), p = D("contrast"), c = D("grayscale"), m = D("hueRotate"), C = D("invert"), w = D("gap"), v = D("gradientColorStops"), f = D("gradientColorStopPositions"), g = D("inset"), d = D("margin"), y = D("opacity"), b = D("padding"), P = D("saturate"), M = D("scale"), j = D("sepia"), N = D("skew"), z = D("space"), W = D("translate"), R = () => ["auto", "contain", "none"], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], Z = () => ["auto", x, r], S = () => [x, r], U = () => ["", V, G], H = () => ["auto", J, x], ee = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], $ = () => ["solid", "dashed", "dotted", "double", "none"], re = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], h = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], L = () => ["", "0", x], O = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], E = () => [J, x];
|
|
245
245
|
return {
|
|
246
246
|
cacheSize: 500,
|
|
247
247
|
separator: ":",
|
|
@@ -249,28 +249,28 @@ const D = (e) => {
|
|
|
249
249
|
colors: [Q],
|
|
250
250
|
spacing: [V, G],
|
|
251
251
|
blur: ["none", "", F, x],
|
|
252
|
-
brightness:
|
|
252
|
+
brightness: E(),
|
|
253
253
|
borderColor: [e],
|
|
254
254
|
borderRadius: ["none", "", "full", F, x],
|
|
255
|
-
borderSpacing:
|
|
255
|
+
borderSpacing: S(),
|
|
256
256
|
borderWidth: U(),
|
|
257
|
-
contrast:
|
|
257
|
+
contrast: E(),
|
|
258
258
|
grayscale: L(),
|
|
259
|
-
hueRotate:
|
|
259
|
+
hueRotate: E(),
|
|
260
260
|
invert: L(),
|
|
261
|
-
gap:
|
|
261
|
+
gap: S(),
|
|
262
262
|
gradientColorStops: [e],
|
|
263
263
|
gradientColorStopPositions: [qe, G],
|
|
264
264
|
inset: Z(),
|
|
265
265
|
margin: Z(),
|
|
266
|
-
opacity:
|
|
267
|
-
padding:
|
|
268
|
-
saturate:
|
|
269
|
-
scale:
|
|
266
|
+
opacity: E(),
|
|
267
|
+
padding: S(),
|
|
268
|
+
saturate: E(),
|
|
269
|
+
scale: E(),
|
|
270
270
|
sepia: L(),
|
|
271
|
-
skew:
|
|
272
|
-
space:
|
|
273
|
-
translate:
|
|
271
|
+
skew: E(),
|
|
272
|
+
space: S(),
|
|
273
|
+
translate: S()
|
|
274
274
|
},
|
|
275
275
|
classGroups: {
|
|
276
276
|
// Layout
|
|
@@ -418,63 +418,63 @@ const D = (e) => {
|
|
|
418
418
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
419
419
|
*/
|
|
420
420
|
inset: [{
|
|
421
|
-
inset: [
|
|
421
|
+
inset: [g]
|
|
422
422
|
}],
|
|
423
423
|
/**
|
|
424
424
|
* Right / Left
|
|
425
425
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
426
426
|
*/
|
|
427
427
|
"inset-x": [{
|
|
428
|
-
"inset-x": [
|
|
428
|
+
"inset-x": [g]
|
|
429
429
|
}],
|
|
430
430
|
/**
|
|
431
431
|
* Top / Bottom
|
|
432
432
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
433
433
|
*/
|
|
434
434
|
"inset-y": [{
|
|
435
|
-
"inset-y": [
|
|
435
|
+
"inset-y": [g]
|
|
436
436
|
}],
|
|
437
437
|
/**
|
|
438
438
|
* Start
|
|
439
439
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
440
440
|
*/
|
|
441
441
|
start: [{
|
|
442
|
-
start: [
|
|
442
|
+
start: [g]
|
|
443
443
|
}],
|
|
444
444
|
/**
|
|
445
445
|
* End
|
|
446
446
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
447
447
|
*/
|
|
448
448
|
end: [{
|
|
449
|
-
end: [
|
|
449
|
+
end: [g]
|
|
450
450
|
}],
|
|
451
451
|
/**
|
|
452
452
|
* Top
|
|
453
453
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
454
454
|
*/
|
|
455
455
|
top: [{
|
|
456
|
-
top: [
|
|
456
|
+
top: [g]
|
|
457
457
|
}],
|
|
458
458
|
/**
|
|
459
459
|
* Right
|
|
460
460
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
461
461
|
*/
|
|
462
462
|
right: [{
|
|
463
|
-
right: [
|
|
463
|
+
right: [g]
|
|
464
464
|
}],
|
|
465
465
|
/**
|
|
466
466
|
* Bottom
|
|
467
467
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
468
468
|
*/
|
|
469
469
|
bottom: [{
|
|
470
|
-
bottom: [
|
|
470
|
+
bottom: [g]
|
|
471
471
|
}],
|
|
472
472
|
/**
|
|
473
473
|
* Left
|
|
474
474
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
475
475
|
*/
|
|
476
476
|
left: [{
|
|
477
|
-
left: [
|
|
477
|
+
left: [g]
|
|
478
478
|
}],
|
|
479
479
|
/**
|
|
480
480
|
* Visibility
|
|
@@ -645,7 +645,7 @@ const D = (e) => {
|
|
|
645
645
|
* @see https://tailwindcss.com/docs/justify-content
|
|
646
646
|
*/
|
|
647
647
|
"justify-content": [{
|
|
648
|
-
justify: ["normal", ...
|
|
648
|
+
justify: ["normal", ...h()]
|
|
649
649
|
}],
|
|
650
650
|
/**
|
|
651
651
|
* Justify Items
|
|
@@ -666,7 +666,7 @@ const D = (e) => {
|
|
|
666
666
|
* @see https://tailwindcss.com/docs/align-content
|
|
667
667
|
*/
|
|
668
668
|
"align-content": [{
|
|
669
|
-
content: ["normal", ...
|
|
669
|
+
content: ["normal", ...h(), "baseline"]
|
|
670
670
|
}],
|
|
671
671
|
/**
|
|
672
672
|
* Align Items
|
|
@@ -687,7 +687,7 @@ const D = (e) => {
|
|
|
687
687
|
* @see https://tailwindcss.com/docs/place-content
|
|
688
688
|
*/
|
|
689
689
|
"place-content": [{
|
|
690
|
-
"place-content": [...
|
|
690
|
+
"place-content": [...h(), "baseline"]
|
|
691
691
|
}],
|
|
692
692
|
/**
|
|
693
693
|
* Place Items
|
|
@@ -709,63 +709,63 @@ const D = (e) => {
|
|
|
709
709
|
* @see https://tailwindcss.com/docs/padding
|
|
710
710
|
*/
|
|
711
711
|
p: [{
|
|
712
|
-
p: [
|
|
712
|
+
p: [b]
|
|
713
713
|
}],
|
|
714
714
|
/**
|
|
715
715
|
* Padding X
|
|
716
716
|
* @see https://tailwindcss.com/docs/padding
|
|
717
717
|
*/
|
|
718
718
|
px: [{
|
|
719
|
-
px: [
|
|
719
|
+
px: [b]
|
|
720
720
|
}],
|
|
721
721
|
/**
|
|
722
722
|
* Padding Y
|
|
723
723
|
* @see https://tailwindcss.com/docs/padding
|
|
724
724
|
*/
|
|
725
725
|
py: [{
|
|
726
|
-
py: [
|
|
726
|
+
py: [b]
|
|
727
727
|
}],
|
|
728
728
|
/**
|
|
729
729
|
* Padding Start
|
|
730
730
|
* @see https://tailwindcss.com/docs/padding
|
|
731
731
|
*/
|
|
732
732
|
ps: [{
|
|
733
|
-
ps: [
|
|
733
|
+
ps: [b]
|
|
734
734
|
}],
|
|
735
735
|
/**
|
|
736
736
|
* Padding End
|
|
737
737
|
* @see https://tailwindcss.com/docs/padding
|
|
738
738
|
*/
|
|
739
739
|
pe: [{
|
|
740
|
-
pe: [
|
|
740
|
+
pe: [b]
|
|
741
741
|
}],
|
|
742
742
|
/**
|
|
743
743
|
* Padding Top
|
|
744
744
|
* @see https://tailwindcss.com/docs/padding
|
|
745
745
|
*/
|
|
746
746
|
pt: [{
|
|
747
|
-
pt: [
|
|
747
|
+
pt: [b]
|
|
748
748
|
}],
|
|
749
749
|
/**
|
|
750
750
|
* Padding Right
|
|
751
751
|
* @see https://tailwindcss.com/docs/padding
|
|
752
752
|
*/
|
|
753
753
|
pr: [{
|
|
754
|
-
pr: [
|
|
754
|
+
pr: [b]
|
|
755
755
|
}],
|
|
756
756
|
/**
|
|
757
757
|
* Padding Bottom
|
|
758
758
|
* @see https://tailwindcss.com/docs/padding
|
|
759
759
|
*/
|
|
760
760
|
pb: [{
|
|
761
|
-
pb: [
|
|
761
|
+
pb: [b]
|
|
762
762
|
}],
|
|
763
763
|
/**
|
|
764
764
|
* Padding Left
|
|
765
765
|
* @see https://tailwindcss.com/docs/padding
|
|
766
766
|
*/
|
|
767
767
|
pl: [{
|
|
768
|
-
pl: [
|
|
768
|
+
pl: [b]
|
|
769
769
|
}],
|
|
770
770
|
/**
|
|
771
771
|
* Margin
|
|
@@ -1101,7 +1101,7 @@ const D = (e) => {
|
|
|
1101
1101
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1102
1102
|
*/
|
|
1103
1103
|
indent: [{
|
|
1104
|
-
indent:
|
|
1104
|
+
indent: S()
|
|
1105
1105
|
}],
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Vertical Alignment
|
|
@@ -1212,21 +1212,21 @@ const D = (e) => {
|
|
|
1212
1212
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1213
1213
|
*/
|
|
1214
1214
|
"gradient-from-pos": [{
|
|
1215
|
-
from: [
|
|
1215
|
+
from: [f]
|
|
1216
1216
|
}],
|
|
1217
1217
|
/**
|
|
1218
1218
|
* Gradient Color Stops Via Position
|
|
1219
1219
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1220
1220
|
*/
|
|
1221
1221
|
"gradient-via-pos": [{
|
|
1222
|
-
via: [
|
|
1222
|
+
via: [f]
|
|
1223
1223
|
}],
|
|
1224
1224
|
/**
|
|
1225
1225
|
* Gradient Color Stops To Position
|
|
1226
1226
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1227
1227
|
*/
|
|
1228
1228
|
"gradient-to-pos": [{
|
|
1229
|
-
to: [
|
|
1229
|
+
to: [f]
|
|
1230
1230
|
}],
|
|
1231
1231
|
/**
|
|
1232
1232
|
* Gradient Color Stops From
|
|
@@ -1693,7 +1693,7 @@ const D = (e) => {
|
|
|
1693
1693
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
1694
1694
|
*/
|
|
1695
1695
|
"hue-rotate": [{
|
|
1696
|
-
"hue-rotate": [
|
|
1696
|
+
"hue-rotate": [m]
|
|
1697
1697
|
}],
|
|
1698
1698
|
/**
|
|
1699
1699
|
* Invert
|
|
@@ -1707,7 +1707,7 @@ const D = (e) => {
|
|
|
1707
1707
|
* @see https://tailwindcss.com/docs/saturate
|
|
1708
1708
|
*/
|
|
1709
1709
|
saturate: [{
|
|
1710
|
-
saturate: [
|
|
1710
|
+
saturate: [P]
|
|
1711
1711
|
}],
|
|
1712
1712
|
/**
|
|
1713
1713
|
* Sepia
|
|
@@ -1757,7 +1757,7 @@ const D = (e) => {
|
|
|
1757
1757
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
1758
1758
|
*/
|
|
1759
1759
|
"backdrop-hue-rotate": [{
|
|
1760
|
-
"backdrop-hue-rotate": [
|
|
1760
|
+
"backdrop-hue-rotate": [m]
|
|
1761
1761
|
}],
|
|
1762
1762
|
/**
|
|
1763
1763
|
* Backdrop Invert
|
|
@@ -1778,7 +1778,7 @@ const D = (e) => {
|
|
|
1778
1778
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1779
1779
|
*/
|
|
1780
1780
|
"backdrop-saturate": [{
|
|
1781
|
-
"backdrop-saturate": [
|
|
1781
|
+
"backdrop-saturate": [P]
|
|
1782
1782
|
}],
|
|
1783
1783
|
/**
|
|
1784
1784
|
* Backdrop Sepia
|
|
@@ -1843,7 +1843,7 @@ const D = (e) => {
|
|
|
1843
1843
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
1844
1844
|
*/
|
|
1845
1845
|
duration: [{
|
|
1846
|
-
duration:
|
|
1846
|
+
duration: E()
|
|
1847
1847
|
}],
|
|
1848
1848
|
/**
|
|
1849
1849
|
* Transition Timing Function
|
|
@@ -1857,7 +1857,7 @@ const D = (e) => {
|
|
|
1857
1857
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
1858
1858
|
*/
|
|
1859
1859
|
delay: [{
|
|
1860
|
-
delay:
|
|
1860
|
+
delay: E()
|
|
1861
1861
|
}],
|
|
1862
1862
|
/**
|
|
1863
1863
|
* Animation
|
|
@@ -1992,126 +1992,126 @@ const D = (e) => {
|
|
|
1992
1992
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
1993
1993
|
*/
|
|
1994
1994
|
"scroll-m": [{
|
|
1995
|
-
"scroll-m":
|
|
1995
|
+
"scroll-m": S()
|
|
1996
1996
|
}],
|
|
1997
1997
|
/**
|
|
1998
1998
|
* Scroll Margin X
|
|
1999
1999
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2000
2000
|
*/
|
|
2001
2001
|
"scroll-mx": [{
|
|
2002
|
-
"scroll-mx":
|
|
2002
|
+
"scroll-mx": S()
|
|
2003
2003
|
}],
|
|
2004
2004
|
/**
|
|
2005
2005
|
* Scroll Margin Y
|
|
2006
2006
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2007
2007
|
*/
|
|
2008
2008
|
"scroll-my": [{
|
|
2009
|
-
"scroll-my":
|
|
2009
|
+
"scroll-my": S()
|
|
2010
2010
|
}],
|
|
2011
2011
|
/**
|
|
2012
2012
|
* Scroll Margin Start
|
|
2013
2013
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2014
2014
|
*/
|
|
2015
2015
|
"scroll-ms": [{
|
|
2016
|
-
"scroll-ms":
|
|
2016
|
+
"scroll-ms": S()
|
|
2017
2017
|
}],
|
|
2018
2018
|
/**
|
|
2019
2019
|
* Scroll Margin End
|
|
2020
2020
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2021
2021
|
*/
|
|
2022
2022
|
"scroll-me": [{
|
|
2023
|
-
"scroll-me":
|
|
2023
|
+
"scroll-me": S()
|
|
2024
2024
|
}],
|
|
2025
2025
|
/**
|
|
2026
2026
|
* Scroll Margin Top
|
|
2027
2027
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2028
2028
|
*/
|
|
2029
2029
|
"scroll-mt": [{
|
|
2030
|
-
"scroll-mt":
|
|
2030
|
+
"scroll-mt": S()
|
|
2031
2031
|
}],
|
|
2032
2032
|
/**
|
|
2033
2033
|
* Scroll Margin Right
|
|
2034
2034
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2035
2035
|
*/
|
|
2036
2036
|
"scroll-mr": [{
|
|
2037
|
-
"scroll-mr":
|
|
2037
|
+
"scroll-mr": S()
|
|
2038
2038
|
}],
|
|
2039
2039
|
/**
|
|
2040
2040
|
* Scroll Margin Bottom
|
|
2041
2041
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2042
2042
|
*/
|
|
2043
2043
|
"scroll-mb": [{
|
|
2044
|
-
"scroll-mb":
|
|
2044
|
+
"scroll-mb": S()
|
|
2045
2045
|
}],
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Scroll Margin Left
|
|
2048
2048
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2049
2049
|
*/
|
|
2050
2050
|
"scroll-ml": [{
|
|
2051
|
-
"scroll-ml":
|
|
2051
|
+
"scroll-ml": S()
|
|
2052
2052
|
}],
|
|
2053
2053
|
/**
|
|
2054
2054
|
* Scroll Padding
|
|
2055
2055
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2056
2056
|
*/
|
|
2057
2057
|
"scroll-p": [{
|
|
2058
|
-
"scroll-p":
|
|
2058
|
+
"scroll-p": S()
|
|
2059
2059
|
}],
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Scroll Padding X
|
|
2062
2062
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2063
2063
|
*/
|
|
2064
2064
|
"scroll-px": [{
|
|
2065
|
-
"scroll-px":
|
|
2065
|
+
"scroll-px": S()
|
|
2066
2066
|
}],
|
|
2067
2067
|
/**
|
|
2068
2068
|
* Scroll Padding Y
|
|
2069
2069
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2070
2070
|
*/
|
|
2071
2071
|
"scroll-py": [{
|
|
2072
|
-
"scroll-py":
|
|
2072
|
+
"scroll-py": S()
|
|
2073
2073
|
}],
|
|
2074
2074
|
/**
|
|
2075
2075
|
* Scroll Padding Start
|
|
2076
2076
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2077
2077
|
*/
|
|
2078
2078
|
"scroll-ps": [{
|
|
2079
|
-
"scroll-ps":
|
|
2079
|
+
"scroll-ps": S()
|
|
2080
2080
|
}],
|
|
2081
2081
|
/**
|
|
2082
2082
|
* Scroll Padding End
|
|
2083
2083
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2084
2084
|
*/
|
|
2085
2085
|
"scroll-pe": [{
|
|
2086
|
-
"scroll-pe":
|
|
2086
|
+
"scroll-pe": S()
|
|
2087
2087
|
}],
|
|
2088
2088
|
/**
|
|
2089
2089
|
* Scroll Padding Top
|
|
2090
2090
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2091
2091
|
*/
|
|
2092
2092
|
"scroll-pt": [{
|
|
2093
|
-
"scroll-pt":
|
|
2093
|
+
"scroll-pt": S()
|
|
2094
2094
|
}],
|
|
2095
2095
|
/**
|
|
2096
2096
|
* Scroll Padding Right
|
|
2097
2097
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2098
2098
|
*/
|
|
2099
2099
|
"scroll-pr": [{
|
|
2100
|
-
"scroll-pr":
|
|
2100
|
+
"scroll-pr": S()
|
|
2101
2101
|
}],
|
|
2102
2102
|
/**
|
|
2103
2103
|
* Scroll Padding Bottom
|
|
2104
2104
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2105
2105
|
*/
|
|
2106
2106
|
"scroll-pb": [{
|
|
2107
|
-
"scroll-pb":
|
|
2107
|
+
"scroll-pb": S()
|
|
2108
2108
|
}],
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Scroll Padding Left
|
|
2111
2111
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2112
2112
|
*/
|
|
2113
2113
|
"scroll-pl": [{
|
|
2114
|
-
"scroll-pl":
|
|
2114
|
+
"scroll-pl": S()
|
|
2115
2115
|
}],
|
|
2116
2116
|
/**
|
|
2117
2117
|
* Scroll Snap Align
|
|
@@ -2293,7 +2293,7 @@ function dr(e) {
|
|
|
2293
2293
|
}
|
|
2294
2294
|
return [i * 360, a * 100, p * 100];
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function pe(e, r, t) {
|
|
2297
2297
|
t /= 100;
|
|
2298
2298
|
const o = r * Math.min(t, 1 - t) / 100, n = (s) => {
|
|
2299
2299
|
const i = (s + e / 30) % 12, a = t - o * Math.max(Math.min(i - 3, 9 - i, 1), -1);
|
|
@@ -2305,8 +2305,8 @@ function se(e) {
|
|
|
2305
2305
|
const [r, t, o] = dr(e);
|
|
2306
2306
|
return {
|
|
2307
2307
|
base: e,
|
|
2308
|
-
light:
|
|
2309
|
-
dark:
|
|
2308
|
+
light: pe(r, Math.max(0, t - 10), Math.min(100, o + 15)),
|
|
2309
|
+
dark: pe(r, Math.min(100, t + 10), Math.max(0, o - 15))
|
|
2310
2310
|
};
|
|
2311
2311
|
}
|
|
2312
2312
|
const A = {
|
|
@@ -2370,7 +2370,7 @@ function ur(e) {
|
|
|
2370
2370
|
e.colors.backgroundLight
|
|
2371
2371
|
), r.style.setProperty("--componentables-disabled", e.colors.disabled), r.style.setProperty("--componentables-light", e.colors.light), r.style.setProperty("--componentables-active", e.colors.active);
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function Er({
|
|
2374
2374
|
children: e,
|
|
2375
2375
|
theme: r
|
|
2376
2376
|
}) {
|
|
@@ -2403,7 +2403,7 @@ function Ir({
|
|
|
2403
2403
|
}, [r]);
|
|
2404
2404
|
return K(() => {
|
|
2405
2405
|
ur(t);
|
|
2406
|
-
}, [t]),
|
|
2406
|
+
}, [t]), I.createElement(Ne.Provider, { value: t }, e);
|
|
2407
2407
|
}
|
|
2408
2408
|
const pr = {
|
|
2409
2409
|
primary: "bg-primary text-white border-primary hover:bg-primary-dark hover:border-primary-dark active:bg-active",
|
|
@@ -2418,7 +2418,7 @@ const pr = {
|
|
|
2418
2418
|
lg: "px-6 py-3 text-lg",
|
|
2419
2419
|
xl: "px-8 py-4 text-xl"
|
|
2420
2420
|
};
|
|
2421
|
-
function
|
|
2421
|
+
function le({
|
|
2422
2422
|
children: e,
|
|
2423
2423
|
onClick: r,
|
|
2424
2424
|
disabled: t = !1,
|
|
@@ -2480,7 +2480,7 @@ function pe({
|
|
|
2480
2480
|
}
|
|
2481
2481
|
);
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2483
|
+
function Ir({
|
|
2484
2484
|
id: e,
|
|
2485
2485
|
name: r,
|
|
2486
2486
|
type: t = "text",
|
|
@@ -2491,37 +2491,37 @@ function Er({
|
|
|
2491
2491
|
error: a,
|
|
2492
2492
|
disabled: p = !1,
|
|
2493
2493
|
required: c = !1,
|
|
2494
|
-
colorScheme:
|
|
2494
|
+
colorScheme: m = "secondary",
|
|
2495
2495
|
className: C = "",
|
|
2496
2496
|
...w
|
|
2497
2497
|
}) {
|
|
2498
2498
|
const v = () => {
|
|
2499
|
-
const
|
|
2499
|
+
const g = "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";
|
|
2500
2500
|
if (a)
|
|
2501
2501
|
return u(
|
|
2502
|
-
|
|
2502
|
+
g,
|
|
2503
2503
|
"border-danger focus:border-danger focus:shadow-danger-light"
|
|
2504
2504
|
);
|
|
2505
|
-
switch (
|
|
2505
|
+
switch (m) {
|
|
2506
2506
|
case "primary":
|
|
2507
2507
|
return u(
|
|
2508
|
-
|
|
2508
|
+
g,
|
|
2509
2509
|
"text-primary border-primary focus:border-primary"
|
|
2510
2510
|
);
|
|
2511
2511
|
case "secondary":
|
|
2512
2512
|
default:
|
|
2513
2513
|
return u(
|
|
2514
|
-
|
|
2514
|
+
g,
|
|
2515
2515
|
"text-secondary border-secondary focus:border-secondary"
|
|
2516
2516
|
);
|
|
2517
2517
|
}
|
|
2518
|
-
},
|
|
2518
|
+
}, f = () => m === "primary" ? "text-primary" : "text-secondary";
|
|
2519
2519
|
return /* @__PURE__ */ k("div", { className: u("mb-6", C), children: [
|
|
2520
2520
|
i && /* @__PURE__ */ k(
|
|
2521
2521
|
"label",
|
|
2522
2522
|
{
|
|
2523
2523
|
htmlFor: e,
|
|
2524
|
-
className: u("block mb-2 text-sm font-medium",
|
|
2524
|
+
className: u("block mb-2 text-sm font-medium", f()),
|
|
2525
2525
|
children: [
|
|
2526
2526
|
i,
|
|
2527
2527
|
c && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -2557,37 +2557,37 @@ function Tr({
|
|
|
2557
2557
|
disabled: a = !1,
|
|
2558
2558
|
required: p = !1,
|
|
2559
2559
|
colorScheme: c = "secondary",
|
|
2560
|
-
className:
|
|
2560
|
+
className: m = "",
|
|
2561
2561
|
rows: C = 4,
|
|
2562
2562
|
...w
|
|
2563
2563
|
}) {
|
|
2564
2564
|
const v = () => {
|
|
2565
|
-
const
|
|
2565
|
+
const g = "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";
|
|
2566
2566
|
if (i)
|
|
2567
2567
|
return u(
|
|
2568
|
-
|
|
2568
|
+
g,
|
|
2569
2569
|
"border-danger focus:border-danger focus:shadow-danger-light"
|
|
2570
2570
|
);
|
|
2571
2571
|
switch (c) {
|
|
2572
2572
|
case "primary":
|
|
2573
2573
|
return u(
|
|
2574
|
-
|
|
2574
|
+
g,
|
|
2575
2575
|
"text-primary border-primary focus:border-primary"
|
|
2576
2576
|
);
|
|
2577
2577
|
case "secondary":
|
|
2578
2578
|
default:
|
|
2579
2579
|
return u(
|
|
2580
|
-
|
|
2580
|
+
g,
|
|
2581
2581
|
"text-secondary border-secondary focus:border-secondary"
|
|
2582
2582
|
);
|
|
2583
2583
|
}
|
|
2584
|
-
},
|
|
2585
|
-
return /* @__PURE__ */ k("div", { className: u("mb-6",
|
|
2584
|
+
}, f = () => c === "primary" ? "text-primary" : "text-secondary";
|
|
2585
|
+
return /* @__PURE__ */ k("div", { className: u("mb-6", m), children: [
|
|
2586
2586
|
s && /* @__PURE__ */ k(
|
|
2587
2587
|
"label",
|
|
2588
2588
|
{
|
|
2589
2589
|
htmlFor: e,
|
|
2590
|
-
className: u("block mb-2 text-sm font-medium",
|
|
2590
|
+
className: u("block mb-2 text-sm font-medium", f()),
|
|
2591
2591
|
children: [
|
|
2592
2592
|
s,
|
|
2593
2593
|
p && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -2624,9 +2624,9 @@ function Rr({
|
|
|
2624
2624
|
className: p = "",
|
|
2625
2625
|
...c
|
|
2626
2626
|
}) {
|
|
2627
|
-
const [
|
|
2628
|
-
const
|
|
2629
|
-
C(
|
|
2627
|
+
const [m, C] = T(t), w = (b) => {
|
|
2628
|
+
const P = b.target.checked;
|
|
2629
|
+
C(P), o?.(P);
|
|
2630
2630
|
}, v = () => ({
|
|
2631
2631
|
primary: {
|
|
2632
2632
|
bg: "bg-primary",
|
|
@@ -2638,7 +2638,7 @@ function Rr({
|
|
|
2638
2638
|
border: "border-secondary",
|
|
2639
2639
|
text: "text-secondary"
|
|
2640
2640
|
}
|
|
2641
|
-
})[i],
|
|
2641
|
+
})[i], f = () => {
|
|
2642
2642
|
switch (a) {
|
|
2643
2643
|
case "sm":
|
|
2644
2644
|
return "w-10 h-6";
|
|
@@ -2648,7 +2648,7 @@ function Rr({
|
|
|
2648
2648
|
default:
|
|
2649
2649
|
return "w-13 h-7";
|
|
2650
2650
|
}
|
|
2651
|
-
},
|
|
2651
|
+
}, g = () => {
|
|
2652
2652
|
switch (a) {
|
|
2653
2653
|
case "sm":
|
|
2654
2654
|
return "w-5 h-5";
|
|
@@ -2659,7 +2659,7 @@ function Rr({
|
|
|
2659
2659
|
return "w-6 h-6";
|
|
2660
2660
|
}
|
|
2661
2661
|
}, d = () => {
|
|
2662
|
-
if (!
|
|
2662
|
+
if (!m) return "translate-x-0";
|
|
2663
2663
|
switch (a) {
|
|
2664
2664
|
case "sm":
|
|
2665
2665
|
return "translate-x-5";
|
|
@@ -2678,7 +2678,7 @@ function Rr({
|
|
|
2678
2678
|
type: "checkbox",
|
|
2679
2679
|
id: e,
|
|
2680
2680
|
name: r,
|
|
2681
|
-
checked:
|
|
2681
|
+
checked: m,
|
|
2682
2682
|
onChange: w,
|
|
2683
2683
|
disabled: n,
|
|
2684
2684
|
className: "sr-only",
|
|
@@ -2691,8 +2691,8 @@ function Rr({
|
|
|
2691
2691
|
htmlFor: e,
|
|
2692
2692
|
className: u(
|
|
2693
2693
|
"block cursor-pointer transition-all duration-300 rounded-full border-2",
|
|
2694
|
-
|
|
2695
|
-
|
|
2694
|
+
f(),
|
|
2695
|
+
m ? u(y.bg, y.border) : "bg-gray-200 border-gray-300",
|
|
2696
2696
|
n ? "opacity-50 cursor-not-allowed" : "hover:shadow-md"
|
|
2697
2697
|
),
|
|
2698
2698
|
children: /* @__PURE__ */ l(
|
|
@@ -2700,7 +2700,7 @@ function Rr({
|
|
|
2700
2700
|
{
|
|
2701
2701
|
className: u(
|
|
2702
2702
|
"absolute top-0.5 left-0.5 inline-block rounded-full bg-white transition-all duration-300 shadow-sm",
|
|
2703
|
-
|
|
2703
|
+
g(),
|
|
2704
2704
|
d()
|
|
2705
2705
|
)
|
|
2706
2706
|
}
|
|
@@ -2728,7 +2728,7 @@ var Me = {
|
|
|
2728
2728
|
className: void 0,
|
|
2729
2729
|
style: void 0,
|
|
2730
2730
|
attr: void 0
|
|
2731
|
-
}, be =
|
|
2731
|
+
}, be = I.createContext && /* @__PURE__ */ I.createContext(Me), mr = ["attr", "size", "title"];
|
|
2732
2732
|
function gr(e, r) {
|
|
2733
2733
|
if (e == null) return {};
|
|
2734
2734
|
var t = fr(e, r), o, n;
|
|
@@ -2798,12 +2798,12 @@ function xr(e, r) {
|
|
|
2798
2798
|
return (r === "string" ? String : Number)(e);
|
|
2799
2799
|
}
|
|
2800
2800
|
function ze(e) {
|
|
2801
|
-
return e && e.map((r, t) => /* @__PURE__ */
|
|
2801
|
+
return e && e.map((r, t) => /* @__PURE__ */ I.createElement(r.tag, oe({
|
|
2802
2802
|
key: t
|
|
2803
2803
|
}, r.attr), ze(r.child)));
|
|
2804
2804
|
}
|
|
2805
2805
|
function B(e) {
|
|
2806
|
-
return (r) => /* @__PURE__ */
|
|
2806
|
+
return (r) => /* @__PURE__ */ I.createElement(vr, te({
|
|
2807
2807
|
attr: oe({}, e.attr)
|
|
2808
2808
|
}, r), ze(e.child));
|
|
2809
2809
|
}
|
|
@@ -2814,7 +2814,7 @@ function vr(e) {
|
|
|
2814
2814
|
size: n,
|
|
2815
2815
|
title: s
|
|
2816
2816
|
} = e, i = gr(e, mr), a = n || t.size || "1em", p;
|
|
2817
|
-
return t.className && (p = t.className), e.className && (p = (p ? p + " " : "") + e.className), /* @__PURE__ */
|
|
2817
|
+
return t.className && (p = t.className), e.className && (p = (p ? p + " " : "") + e.className), /* @__PURE__ */ I.createElement("svg", te({
|
|
2818
2818
|
stroke: "currentColor",
|
|
2819
2819
|
fill: "currentColor",
|
|
2820
2820
|
strokeWidth: "0"
|
|
@@ -2826,9 +2826,9 @@ function vr(e) {
|
|
|
2826
2826
|
height: a,
|
|
2827
2827
|
width: a,
|
|
2828
2828
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2829
|
-
}), s && /* @__PURE__ */
|
|
2829
|
+
}), s && /* @__PURE__ */ I.createElement("title", null, s), e.children);
|
|
2830
2830
|
};
|
|
2831
|
-
return be !== void 0 ? /* @__PURE__ */
|
|
2831
|
+
return be !== void 0 ? /* @__PURE__ */ I.createElement(be.Consumer, null, (t) => r(t)) : r(Me);
|
|
2832
2832
|
}
|
|
2833
2833
|
function wr(e) {
|
|
2834
2834
|
return B({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(e);
|
|
@@ -2855,12 +2855,12 @@ function Vr({
|
|
|
2855
2855
|
debounceDelay: a = 500,
|
|
2856
2856
|
...p
|
|
2857
2857
|
}) {
|
|
2858
|
-
const [c,
|
|
2858
|
+
const [c, m] = T(e || ""), C = kr(c, a), w = he(r, [r]);
|
|
2859
2859
|
K(() => {
|
|
2860
2860
|
w(C);
|
|
2861
2861
|
}, [C, w]);
|
|
2862
2862
|
const v = () => {
|
|
2863
|
-
const d = "w-full px-4 py-4 pl-10 border-2 rounded-lg text-base bg-
|
|
2863
|
+
const d = "w-full px-4 py-4 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";
|
|
2864
2864
|
switch (n) {
|
|
2865
2865
|
case "primary":
|
|
2866
2866
|
return u(
|
|
@@ -2874,12 +2874,12 @@ function Vr({
|
|
|
2874
2874
|
"text-secondary border-secondary focus:border-secondary"
|
|
2875
2875
|
);
|
|
2876
2876
|
}
|
|
2877
|
-
},
|
|
2877
|
+
}, f = () => n === "primary" ? "text-primary" : "text-secondary", g = () => n === "primary" ? "text-primary" : "text-secondary";
|
|
2878
2878
|
return /* @__PURE__ */ k("div", { className: u("mb-0", i), children: [
|
|
2879
2879
|
s && /* @__PURE__ */ l(
|
|
2880
2880
|
"label",
|
|
2881
2881
|
{
|
|
2882
|
-
className: u("block mb-2 text-sm font-medium",
|
|
2882
|
+
className: u("block mb-2 text-sm font-medium", g()),
|
|
2883
2883
|
children: s
|
|
2884
2884
|
}
|
|
2885
2885
|
),
|
|
@@ -2889,7 +2889,7 @@ function Vr({
|
|
|
2889
2889
|
{
|
|
2890
2890
|
className: u(
|
|
2891
2891
|
"absolute left-3 top-1/2 -translate-y-1/2 text-base pointer-events-none",
|
|
2892
|
-
|
|
2892
|
+
f()
|
|
2893
2893
|
)
|
|
2894
2894
|
}
|
|
2895
2895
|
),
|
|
@@ -2898,7 +2898,7 @@ function Vr({
|
|
|
2898
2898
|
{
|
|
2899
2899
|
type: "text",
|
|
2900
2900
|
value: c,
|
|
2901
|
-
onChange: (d) =>
|
|
2901
|
+
onChange: (d) => m(d.target.value),
|
|
2902
2902
|
placeholder: t,
|
|
2903
2903
|
disabled: o,
|
|
2904
2904
|
className: v(),
|
|
@@ -2925,7 +2925,7 @@ function Gr({
|
|
|
2925
2925
|
isLoading: a = !1,
|
|
2926
2926
|
fetchPage: p
|
|
2927
2927
|
}) {
|
|
2928
|
-
const c = parseInt(String(n)) === 1 || parseInt(String(o)) === 0 || a,
|
|
2928
|
+
const c = parseInt(String(n)) === 1 || parseInt(String(o)) === 0 || a, m = parseInt(String(n)) === parseInt(String(o)) || parseInt(String(o)) === 0 || a, C = () => {
|
|
2929
2929
|
a || (p ? p(n - 1) : t && t((v) => ({
|
|
2930
2930
|
...v,
|
|
2931
2931
|
page: v.page - 1
|
|
@@ -2938,7 +2938,7 @@ function Gr({
|
|
|
2938
2938
|
};
|
|
2939
2939
|
return /* @__PURE__ */ k("div", { className: u("flex justify-center items-center mt-8", i), children: [
|
|
2940
2940
|
/* @__PURE__ */ l(
|
|
2941
|
-
|
|
2941
|
+
le,
|
|
2942
2942
|
{
|
|
2943
2943
|
disabled: c,
|
|
2944
2944
|
onClick: C,
|
|
@@ -2948,9 +2948,9 @@ function Gr({
|
|
|
2948
2948
|
),
|
|
2949
2949
|
/* @__PURE__ */ l("h5", { className: "font-bold mx-2.5 text-text", children: `${s ? e : ""} ${n}${s ? ` ${r} ` : " / "}${o}` }),
|
|
2950
2950
|
/* @__PURE__ */ l(
|
|
2951
|
-
|
|
2951
|
+
le,
|
|
2952
2952
|
{
|
|
2953
|
-
disabled:
|
|
2953
|
+
disabled: m,
|
|
2954
2954
|
onClick: w,
|
|
2955
2955
|
variant: "primary",
|
|
2956
2956
|
children: /* @__PURE__ */ l(Nr, { size: 14 })
|
|
@@ -2978,19 +2978,19 @@ function Fr({
|
|
|
2978
2978
|
colorScheme: a = "primary",
|
|
2979
2979
|
icon: p,
|
|
2980
2980
|
disabled: c = !1,
|
|
2981
|
-
headerExtra:
|
|
2981
|
+
headerExtra: m
|
|
2982
2982
|
}) {
|
|
2983
|
-
const [C, w] = T(o), v = n !== void 0 ? n : C,
|
|
2983
|
+
const [C, w] = T(o), v = n !== void 0 ? n : C, f = () => {
|
|
2984
2984
|
if (c) return;
|
|
2985
|
-
const
|
|
2986
|
-
n === void 0 && w(
|
|
2987
|
-
},
|
|
2985
|
+
const b = !v;
|
|
2986
|
+
n === void 0 && w(b), s?.(b);
|
|
2987
|
+
}, g = () => a === "primary" ? "border-primary" : "border-secondary", d = () => a === "primary" ? "text-primary" : "text-secondary", y = () => a === "primary" ? "hover:bg-primary/5" : "hover:bg-secondary/5";
|
|
2988
2988
|
return /* @__PURE__ */ k(
|
|
2989
2989
|
"div",
|
|
2990
2990
|
{
|
|
2991
2991
|
className: u(
|
|
2992
2992
|
"w-full rounded-lg border-2 bg-background transition-all duration-300",
|
|
2993
|
-
|
|
2993
|
+
g(),
|
|
2994
2994
|
v && "shadow-lg",
|
|
2995
2995
|
i
|
|
2996
2996
|
),
|
|
@@ -2999,7 +2999,7 @@ function Fr({
|
|
|
2999
2999
|
"button",
|
|
3000
3000
|
{
|
|
3001
3001
|
type: "button",
|
|
3002
|
-
onClick:
|
|
3002
|
+
onClick: f,
|
|
3003
3003
|
disabled: c,
|
|
3004
3004
|
className: u(
|
|
3005
3005
|
"w-full flex cursor-pointer items-center justify-between p-4 text-left transition-all duration-300 rounded-lg",
|
|
@@ -3022,7 +3022,7 @@ function Fr({
|
|
|
3022
3022
|
] })
|
|
3023
3023
|
] }),
|
|
3024
3024
|
/* @__PURE__ */ k("div", { className: "flex items-center gap-3 shrink-0", children: [
|
|
3025
|
-
|
|
3025
|
+
m && /* @__PURE__ */ l("div", { onClick: (b) => b.stopPropagation(), children: m }),
|
|
3026
3026
|
/* @__PURE__ */ l(
|
|
3027
3027
|
"div",
|
|
3028
3028
|
{
|
|
@@ -3045,7 +3045,7 @@ function Fr({
|
|
|
3045
3045
|
"overflow-hidden transition-all duration-300 ease-in-out",
|
|
3046
3046
|
v ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"
|
|
3047
3047
|
),
|
|
3048
|
-
children: /* @__PURE__ */ l("div", { className: u("p-4 pt-0 border-t-0",
|
|
3048
|
+
children: /* @__PURE__ */ l("div", { className: u("p-4 pt-0 border-t-0", g()), children: /* @__PURE__ */ l("div", { className: "border-t border-border pt-4", children: t }) })
|
|
3049
3049
|
}
|
|
3050
3050
|
)
|
|
3051
3051
|
]
|
|
@@ -3066,11 +3066,11 @@ function _r({
|
|
|
3066
3066
|
}) {
|
|
3067
3067
|
const [a, p] = T(
|
|
3068
3068
|
r ?? e[0]?.value ?? ""
|
|
3069
|
-
), c = r !== void 0 ? r : a,
|
|
3070
|
-
r === void 0 && p(
|
|
3071
|
-
}, C = (
|
|
3072
|
-
const d = c ===
|
|
3073
|
-
if (
|
|
3069
|
+
), c = r !== void 0 ? r : a, m = (f) => {
|
|
3070
|
+
r === void 0 && p(f), t?.(f);
|
|
3071
|
+
}, C = (f, g) => {
|
|
3072
|
+
const d = c === f, y = "px-4 py-3 cursor-pointer text-sm font-medium transition-all duration-300 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed";
|
|
3073
|
+
if (g)
|
|
3074
3074
|
return u(y, "text-text-muted");
|
|
3075
3075
|
switch (i) {
|
|
3076
3076
|
case "filled":
|
|
@@ -3103,21 +3103,21 @@ function _r({
|
|
|
3103
3103
|
default:
|
|
3104
3104
|
return "flex border-b-2 border-border";
|
|
3105
3105
|
}
|
|
3106
|
-
}, v =
|
|
3106
|
+
}, v = I.Children.toArray(o).find((f) => I.isValidElement(f) ? f.props.value === c : !1);
|
|
3107
3107
|
return /* @__PURE__ */ k("div", { className: u("w-full", n), children: [
|
|
3108
|
-
/* @__PURE__ */ l("div", { className: w(), role: "tablist", children: e.map((
|
|
3108
|
+
/* @__PURE__ */ l("div", { className: w(), role: "tablist", children: e.map((f) => /* @__PURE__ */ l(
|
|
3109
3109
|
"button",
|
|
3110
3110
|
{
|
|
3111
3111
|
type: "button",
|
|
3112
3112
|
role: "tab",
|
|
3113
|
-
"aria-selected": c ===
|
|
3114
|
-
"aria-controls": `tabpanel-${
|
|
3115
|
-
disabled:
|
|
3116
|
-
onClick: () => !
|
|
3117
|
-
className: C(
|
|
3118
|
-
children:
|
|
3113
|
+
"aria-selected": c === f.value,
|
|
3114
|
+
"aria-controls": `tabpanel-${f.value}`,
|
|
3115
|
+
disabled: f.disabled,
|
|
3116
|
+
onClick: () => !f.disabled && m(f.value),
|
|
3117
|
+
className: C(f.value, f.disabled),
|
|
3118
|
+
children: f.label
|
|
3119
3119
|
},
|
|
3120
|
-
|
|
3120
|
+
f.value
|
|
3121
3121
|
)) }),
|
|
3122
3122
|
/* @__PURE__ */ l("div", { role: "tabpanel", id: `tabpanel-${c}`, children: v })
|
|
3123
3123
|
] });
|
|
@@ -3160,7 +3160,7 @@ function $r({
|
|
|
3160
3160
|
monthNames: a = Pr,
|
|
3161
3161
|
...p
|
|
3162
3162
|
}) {
|
|
3163
|
-
const [c,
|
|
3163
|
+
const [c, m] = T(e || /* @__PURE__ */ new Date()), C = Sr(c), w = Dr(c), v = [];
|
|
3164
3164
|
for (let N = 0; N < w; N++)
|
|
3165
3165
|
v.push(null);
|
|
3166
3166
|
for (let N = 1; N <= C; N++) {
|
|
@@ -3174,8 +3174,8 @@ function $r({
|
|
|
3174
3174
|
);
|
|
3175
3175
|
v.push(z);
|
|
3176
3176
|
}
|
|
3177
|
-
const
|
|
3178
|
-
|
|
3177
|
+
const f = () => {
|
|
3178
|
+
m(
|
|
3179
3179
|
new Date(
|
|
3180
3180
|
c.getFullYear(),
|
|
3181
3181
|
c.getMonth() - 1,
|
|
@@ -3185,8 +3185,8 @@ function $r({
|
|
|
3185
3185
|
0
|
|
3186
3186
|
)
|
|
3187
3187
|
);
|
|
3188
|
-
},
|
|
3189
|
-
|
|
3188
|
+
}, g = () => {
|
|
3189
|
+
m(
|
|
3190
3190
|
new Date(
|
|
3191
3191
|
c.getFullYear(),
|
|
3192
3192
|
c.getMonth() + 1,
|
|
@@ -3197,7 +3197,7 @@ function $r({
|
|
|
3197
3197
|
)
|
|
3198
3198
|
);
|
|
3199
3199
|
}, d = () => {
|
|
3200
|
-
|
|
3200
|
+
m(
|
|
3201
3201
|
new Date(
|
|
3202
3202
|
c.getFullYear() - 1,
|
|
3203
3203
|
c.getMonth(),
|
|
@@ -3208,7 +3208,7 @@ function $r({
|
|
|
3208
3208
|
)
|
|
3209
3209
|
);
|
|
3210
3210
|
}, y = () => {
|
|
3211
|
-
|
|
3211
|
+
m(
|
|
3212
3212
|
new Date(
|
|
3213
3213
|
c.getFullYear() + 1,
|
|
3214
3214
|
c.getMonth(),
|
|
@@ -3218,7 +3218,7 @@ function $r({
|
|
|
3218
3218
|
0
|
|
3219
3219
|
)
|
|
3220
3220
|
);
|
|
3221
|
-
},
|
|
3221
|
+
}, b = (N) => {
|
|
3222
3222
|
if (N && !t) {
|
|
3223
3223
|
const z = new Date(
|
|
3224
3224
|
N.getFullYear(),
|
|
@@ -3228,7 +3228,7 @@ function $r({
|
|
|
3228
3228
|
0,
|
|
3229
3229
|
0
|
|
3230
3230
|
);
|
|
3231
|
-
|
|
3231
|
+
m(z), r?.(z);
|
|
3232
3232
|
}
|
|
3233
3233
|
}, M = (() => {
|
|
3234
3234
|
switch (n) {
|
|
@@ -3304,7 +3304,7 @@ function $r({
|
|
|
3304
3304
|
"button",
|
|
3305
3305
|
{
|
|
3306
3306
|
type: "button",
|
|
3307
|
-
onClick:
|
|
3307
|
+
onClick: f,
|
|
3308
3308
|
disabled: t,
|
|
3309
3309
|
className: u(
|
|
3310
3310
|
"p-2 rounded-lg border transition-all duration-300",
|
|
@@ -3319,7 +3319,7 @@ function $r({
|
|
|
3319
3319
|
"button",
|
|
3320
3320
|
{
|
|
3321
3321
|
type: "button",
|
|
3322
|
-
onClick:
|
|
3322
|
+
onClick: g,
|
|
3323
3323
|
disabled: t,
|
|
3324
3324
|
className: u(
|
|
3325
3325
|
"p-2 rounded-lg border transition-all duration-300",
|
|
@@ -3346,7 +3346,7 @@ function $r({
|
|
|
3346
3346
|
"button",
|
|
3347
3347
|
{
|
|
3348
3348
|
type: "button",
|
|
3349
|
-
onClick: () =>
|
|
3349
|
+
onClick: () => b(N),
|
|
3350
3350
|
disabled: !N || t,
|
|
3351
3351
|
className: u(
|
|
3352
3352
|
"p-2 rounded-lg text-sm font-medium transition-all duration-300",
|
|
@@ -3390,38 +3390,38 @@ function Wr({
|
|
|
3390
3390
|
className: a = "",
|
|
3391
3391
|
rowClassName: p = "",
|
|
3392
3392
|
cellClassName: c = "",
|
|
3393
|
-
headerClassName:
|
|
3393
|
+
headerClassName: m = "",
|
|
3394
3394
|
emptyText: C = "No data available",
|
|
3395
3395
|
showCount: w = !0,
|
|
3396
|
-
countText: v = (
|
|
3397
|
-
keyExtractor:
|
|
3396
|
+
countText: v = (g) => `Showing ${g} record${g !== 1 ? "s" : ""}`,
|
|
3397
|
+
keyExtractor: f = (g, d) => g._id || g.id || d
|
|
3398
3398
|
}) {
|
|
3399
3399
|
if (t)
|
|
3400
3400
|
return /* @__PURE__ */ l("div", { className: "flex justify-center items-center min-h-[400px]", children: /* @__PURE__ */ l("div", { className: "text-lg text-text-light", children: o }) });
|
|
3401
3401
|
if (r.length === 0)
|
|
3402
3402
|
return /* @__PURE__ */ l("div", { className: "flex justify-center items-center min-h-[200px]", children: /* @__PURE__ */ l("div", { className: "text-lg text-text-muted", children: C }) });
|
|
3403
|
-
const
|
|
3404
|
-
const
|
|
3405
|
-
let
|
|
3406
|
-
if (
|
|
3403
|
+
const g = (d, y) => {
|
|
3404
|
+
const b = y.toLowerCase().replace(/\s+/g, "_");
|
|
3405
|
+
let P = d[b];
|
|
3406
|
+
if (P === void 0) {
|
|
3407
3407
|
const M = [
|
|
3408
|
-
|
|
3408
|
+
b.replace(/_/g, ""),
|
|
3409
3409
|
y.toLowerCase().replace(/\s+/g, ""),
|
|
3410
|
-
|
|
3410
|
+
b.replace(/_([a-z])/g, (j, N) => N.toUpperCase())
|
|
3411
3411
|
];
|
|
3412
3412
|
for (const j of M)
|
|
3413
3413
|
if (d[j] !== void 0) {
|
|
3414
|
-
|
|
3414
|
+
P = d[j];
|
|
3415
3415
|
break;
|
|
3416
3416
|
}
|
|
3417
3417
|
}
|
|
3418
|
-
if (
|
|
3418
|
+
if (P === void 0) {
|
|
3419
3419
|
const M = y.toLowerCase().split(" "), j = Object.keys(d).find(
|
|
3420
3420
|
(N) => M.some((z) => N.toLowerCase().includes(z))
|
|
3421
3421
|
);
|
|
3422
|
-
j && (
|
|
3422
|
+
j && (P = d[j]);
|
|
3423
3423
|
}
|
|
3424
|
-
return
|
|
3424
|
+
return P != null ? String(P) : "N/A";
|
|
3425
3425
|
};
|
|
3426
3426
|
return /* @__PURE__ */ k("div", { className: u("overflow-x-auto", a), children: [
|
|
3427
3427
|
/* @__PURE__ */ k("table", { className: "w-full border-collapse", children: [
|
|
@@ -3431,7 +3431,7 @@ function Wr({
|
|
|
3431
3431
|
{
|
|
3432
3432
|
className: u(
|
|
3433
3433
|
"text-left py-3 px-4 font-semibold text-text",
|
|
3434
|
-
|
|
3434
|
+
m
|
|
3435
3435
|
),
|
|
3436
3436
|
children: d
|
|
3437
3437
|
},
|
|
@@ -3442,7 +3442,7 @@ function Wr({
|
|
|
3442
3442
|
{
|
|
3443
3443
|
className: u(
|
|
3444
3444
|
"text-center py-3 px-4 font-semibold text-text",
|
|
3445
|
-
|
|
3445
|
+
m
|
|
3446
3446
|
),
|
|
3447
3447
|
children: s
|
|
3448
3448
|
}
|
|
@@ -3458,28 +3458,44 @@ function Wr({
|
|
|
3458
3458
|
),
|
|
3459
3459
|
onClick: () => i?.(d),
|
|
3460
3460
|
children: [
|
|
3461
|
-
e.map((
|
|
3462
|
-
n && /* @__PURE__ */ l("td", { className: u("py-4 px-4", c), children: /* @__PURE__ */ l("div", { className: "flex gap-2 justify-center", children: n.map((
|
|
3463
|
-
const M =
|
|
3461
|
+
e.map((b, P) => /* @__PURE__ */ l("td", { className: u("py-4 px-4", c), children: /* @__PURE__ */ l("div", { className: "text-text-light", children: g(d, b) }) }, P)),
|
|
3462
|
+
n && /* @__PURE__ */ l("td", { className: u("py-4 px-4", c), children: /* @__PURE__ */ l("div", { className: "flex gap-2 justify-center", children: n.map((b, P) => {
|
|
3463
|
+
const M = (j) => {
|
|
3464
|
+
j?.stopPropagation(), b.onClick?.(d);
|
|
3465
|
+
};
|
|
3466
|
+
if (b.component) {
|
|
3467
|
+
const j = b.component;
|
|
3468
|
+
return /* @__PURE__ */ k(
|
|
3469
|
+
j,
|
|
3470
|
+
{
|
|
3471
|
+
onClick: M,
|
|
3472
|
+
className: b.className || "",
|
|
3473
|
+
...b.props || {},
|
|
3474
|
+
children: [
|
|
3475
|
+
b.icon && /* @__PURE__ */ l("span", { className: "inline-block", children: I.createElement(b.icon) }),
|
|
3476
|
+
b.label && b.label
|
|
3477
|
+
]
|
|
3478
|
+
},
|
|
3479
|
+
P
|
|
3480
|
+
);
|
|
3481
|
+
}
|
|
3464
3482
|
return /* @__PURE__ */ k(
|
|
3465
|
-
|
|
3483
|
+
le,
|
|
3466
3484
|
{
|
|
3467
|
-
onClick:
|
|
3468
|
-
|
|
3469
|
-
},
|
|
3470
|
-
className: h.className || "",
|
|
3471
|
-
...h.props || {},
|
|
3485
|
+
onClick: M,
|
|
3486
|
+
className: b.className || "",
|
|
3487
|
+
...b.props || {},
|
|
3472
3488
|
children: [
|
|
3473
|
-
|
|
3474
|
-
|
|
3489
|
+
b.icon && /* @__PURE__ */ l("span", { className: "inline-block", children: I.createElement(b.icon) }),
|
|
3490
|
+
b.label && b.label
|
|
3475
3491
|
]
|
|
3476
3492
|
},
|
|
3477
|
-
|
|
3493
|
+
P
|
|
3478
3494
|
);
|
|
3479
3495
|
}) }) })
|
|
3480
3496
|
]
|
|
3481
3497
|
},
|
|
3482
|
-
|
|
3498
|
+
f(d, y)
|
|
3483
3499
|
)) })
|
|
3484
3500
|
] }),
|
|
3485
3501
|
w && r.length > 0 && /* @__PURE__ */ l("div", { className: "mt-6 text-center text-text-light text-sm", children: v(r.length) })
|
|
@@ -3496,79 +3512,79 @@ function Ur({
|
|
|
3496
3512
|
onSearchInputCustom: a,
|
|
3497
3513
|
placeholder: p = "Select...",
|
|
3498
3514
|
disabled: c = !1,
|
|
3499
|
-
error:
|
|
3515
|
+
error: m,
|
|
3500
3516
|
required: C = !1,
|
|
3501
3517
|
colorScheme: w = "primary",
|
|
3502
3518
|
noResultsText: v = "No results found",
|
|
3503
|
-
searchPlaceholder:
|
|
3504
|
-
...
|
|
3519
|
+
searchPlaceholder: f = "Search...",
|
|
3520
|
+
...g
|
|
3505
3521
|
}) {
|
|
3506
|
-
const [d, y] = T(!1), [
|
|
3522
|
+
const [d, y] = T(!1), [b, P] = T(""), [M, j] = T({
|
|
3507
3523
|
top: 0,
|
|
3508
3524
|
left: 0,
|
|
3509
3525
|
openUpward: !1
|
|
3510
3526
|
}), N = Array.isArray(t) ? t : t ? [t] : [], [z, W] = T(
|
|
3511
|
-
N.map((
|
|
3512
|
-
), R =
|
|
3513
|
-
const
|
|
3514
|
-
if (
|
|
3515
|
-
return u(
|
|
3527
|
+
N.map((h) => r.find((L) => L.value === h)).filter(Boolean)
|
|
3528
|
+
), R = ce(null), _ = ce(null), Z = () => {
|
|
3529
|
+
const h = "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";
|
|
3530
|
+
if (m)
|
|
3531
|
+
return u(h, "border-danger focus:border-danger");
|
|
3516
3532
|
switch (w) {
|
|
3517
3533
|
case "primary":
|
|
3518
3534
|
return u(
|
|
3519
|
-
|
|
3535
|
+
h,
|
|
3520
3536
|
"text-primary border-primary focus:border-primary"
|
|
3521
3537
|
);
|
|
3522
3538
|
case "secondary":
|
|
3523
3539
|
default:
|
|
3524
3540
|
return u(
|
|
3525
|
-
|
|
3541
|
+
h,
|
|
3526
3542
|
"text-secondary border-secondary focus:border-secondary"
|
|
3527
3543
|
);
|
|
3528
3544
|
}
|
|
3529
|
-
},
|
|
3545
|
+
}, S = () => w === "primary" ? "text-primary" : "text-secondary";
|
|
3530
3546
|
K(() => {
|
|
3531
|
-
const L = (Array.isArray(t) ? t : t !== "" && t !== null && t !== void 0 ? [t] : []).map((O) => r.find((
|
|
3547
|
+
const L = (Array.isArray(t) ? t : t !== "" && t !== null && t !== void 0 ? [t] : []).map((O) => r.find((E) => E.value === O)).filter(Boolean);
|
|
3532
3548
|
W(L);
|
|
3533
3549
|
}, [t, r]), K(() => {
|
|
3534
3550
|
d && i && _.current && _.current.focus();
|
|
3535
3551
|
}, [d, i]);
|
|
3536
3552
|
const U = he(() => {
|
|
3537
3553
|
if (!R.current) return;
|
|
3538
|
-
const
|
|
3554
|
+
const h = R.current.getBoundingClientRect(), L = window.innerHeight, O = 250, Y = L - h.bottom < O && h.top > O;
|
|
3539
3555
|
j({
|
|
3540
|
-
top: Y ?
|
|
3541
|
-
left:
|
|
3542
|
-
width:
|
|
3556
|
+
top: Y ? h.top : h.bottom,
|
|
3557
|
+
left: h.left,
|
|
3558
|
+
width: h.width,
|
|
3543
3559
|
openUpward: Y
|
|
3544
3560
|
});
|
|
3545
3561
|
}, []);
|
|
3546
3562
|
K(() => {
|
|
3547
|
-
function
|
|
3563
|
+
function h(O) {
|
|
3548
3564
|
R.current && !R.current.contains(O.target) && y(!1);
|
|
3549
3565
|
}
|
|
3550
3566
|
function L() {
|
|
3551
3567
|
d && U();
|
|
3552
3568
|
}
|
|
3553
|
-
return document.addEventListener("mousedown",
|
|
3554
|
-
document.removeEventListener("mousedown",
|
|
3569
|
+
return document.addEventListener("mousedown", h), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), () => {
|
|
3570
|
+
document.removeEventListener("mousedown", h), window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L);
|
|
3555
3571
|
};
|
|
3556
3572
|
}, [d, U]);
|
|
3557
|
-
const H = (
|
|
3558
|
-
const L = r.find((
|
|
3573
|
+
const H = (h) => {
|
|
3574
|
+
const L = r.find((E) => E.value === h);
|
|
3559
3575
|
if (!L) return;
|
|
3560
3576
|
let O;
|
|
3561
|
-
n ? (O = z.some((Y) => Y.value ===
|
|
3562
|
-
}, ee = (
|
|
3563
|
-
|
|
3577
|
+
n ? (O = z.some((Y) => Y.value === h) ? z.filter((Y) => Y.value !== h) : [...z, L], W(O), o(O)) : (O = [L], W(O), o(L), y(!1), P(""));
|
|
3578
|
+
}, ee = (h) => {
|
|
3579
|
+
P(h), a?.(h);
|
|
3564
3580
|
}, $ = i ? r.filter(
|
|
3565
|
-
(
|
|
3581
|
+
(h) => h.label.toLowerCase().includes(b.toLowerCase())
|
|
3566
3582
|
) : r, re = () => z.length === 0 ? p : n ? z.length === 1 ? z[0].label : `${z.length} selected` : z[0]?.label || p;
|
|
3567
3583
|
return /* @__PURE__ */ k("div", { className: u("mb-6", s), children: [
|
|
3568
3584
|
e && /* @__PURE__ */ k(
|
|
3569
3585
|
"label",
|
|
3570
3586
|
{
|
|
3571
|
-
className: u("block mb-2 text-sm font-medium",
|
|
3587
|
+
className: u("block mb-2 text-sm font-medium", S()),
|
|
3572
3588
|
children: [
|
|
3573
3589
|
e,
|
|
3574
3590
|
C && /* @__PURE__ */ l("span", { className: "text-danger ml-1", children: "*" })
|
|
@@ -3580,8 +3596,8 @@ function Ur({
|
|
|
3580
3596
|
"button",
|
|
3581
3597
|
{
|
|
3582
3598
|
type: "button",
|
|
3583
|
-
onClick: (
|
|
3584
|
-
|
|
3599
|
+
onClick: (h) => {
|
|
3600
|
+
h.preventDefault(), h.stopPropagation(), d || U(), y(!d);
|
|
3585
3601
|
},
|
|
3586
3602
|
className: u(
|
|
3587
3603
|
Z(),
|
|
@@ -3590,7 +3606,7 @@ function Ur({
|
|
|
3590
3606
|
d && "ring-1"
|
|
3591
3607
|
),
|
|
3592
3608
|
disabled: c,
|
|
3593
|
-
...
|
|
3609
|
+
...g,
|
|
3594
3610
|
children: [
|
|
3595
3611
|
/* @__PURE__ */ k("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3596
3612
|
z.length > 0 && z[0].hex && /* @__PURE__ */ l(
|
|
@@ -3625,8 +3641,8 @@ function Ur({
|
|
|
3625
3641
|
"div",
|
|
3626
3642
|
{
|
|
3627
3643
|
className: u(
|
|
3628
|
-
"fixed z-[9999] rounded-lg border-2 bg-
|
|
3629
|
-
|
|
3644
|
+
"fixed z-[9999] rounded-lg border-2 bg-white shadow-xl",
|
|
3645
|
+
m ? "border-danger" : w === "primary" ? "border-primary" : "border-secondary"
|
|
3630
3646
|
),
|
|
3631
3647
|
style: {
|
|
3632
3648
|
top: `${M.top + (M.openUpward ? 0 : 8)}px`,
|
|
@@ -3642,34 +3658,34 @@ function Ur({
|
|
|
3642
3658
|
{
|
|
3643
3659
|
ref: _,
|
|
3644
3660
|
type: "text",
|
|
3645
|
-
value:
|
|
3646
|
-
onChange: (
|
|
3647
|
-
placeholder:
|
|
3661
|
+
value: b,
|
|
3662
|
+
onChange: (h) => ee(h.target.value),
|
|
3663
|
+
placeholder: f,
|
|
3648
3664
|
className: u(
|
|
3649
3665
|
"w-full rounded-lg border-2 py-2 pr-10 pl-10 text-sm transition-all duration-300 focus:outline-none focus:ring-1",
|
|
3650
3666
|
w === "primary" ? "border-primary text-primary" : "border-secondary text-secondary"
|
|
3651
3667
|
)
|
|
3652
3668
|
}
|
|
3653
3669
|
),
|
|
3654
|
-
|
|
3670
|
+
b && /* @__PURE__ */ l(
|
|
3655
3671
|
"button",
|
|
3656
3672
|
{
|
|
3657
3673
|
type: "button",
|
|
3658
|
-
onClick: () =>
|
|
3674
|
+
onClick: () => P(""),
|
|
3659
3675
|
className: "absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 transform text-text-muted hover:text-text",
|
|
3660
3676
|
children: /* @__PURE__ */ l(Mr, { className: "h-4 w-4" })
|
|
3661
3677
|
}
|
|
3662
3678
|
)
|
|
3663
3679
|
] }) }),
|
|
3664
3680
|
/* @__PURE__ */ k("div", { className: "max-h-60 overflow-y-auto py-1", children: [
|
|
3665
|
-
$.map((
|
|
3681
|
+
$.map((h) => /* @__PURE__ */ l(
|
|
3666
3682
|
"button",
|
|
3667
3683
|
{
|
|
3668
3684
|
type: "button",
|
|
3669
|
-
onClick: () => H(
|
|
3685
|
+
onClick: () => H(h.value ?? ""),
|
|
3670
3686
|
className: u(
|
|
3671
3687
|
"w-full px-4 py-3 text-left text-sm transition-colors",
|
|
3672
|
-
z.some((L) => L.value ===
|
|
3688
|
+
z.some((L) => L.value === h.value) ? w === "primary" ? "bg-primary/10 text-primary font-medium" : "bg-secondary/10 text-secondary font-medium" : "text-text hover:bg-background-light"
|
|
3673
3689
|
),
|
|
3674
3690
|
children: /* @__PURE__ */ k("div", { className: "flex items-center gap-3", children: [
|
|
3675
3691
|
n && /* @__PURE__ */ l(
|
|
@@ -3677,10 +3693,10 @@ function Ur({
|
|
|
3677
3693
|
{
|
|
3678
3694
|
className: u(
|
|
3679
3695
|
"flex h-4 w-4 items-center justify-center rounded border-2 transition-colors",
|
|
3680
|
-
z.some((L) => L.value ===
|
|
3696
|
+
z.some((L) => L.value === h.value) ? w === "primary" ? "border-primary bg-primary" : "border-secondary bg-secondary" : "border-border"
|
|
3681
3697
|
),
|
|
3682
3698
|
children: z.some(
|
|
3683
|
-
(L) => L.value ===
|
|
3699
|
+
(L) => L.value === h.value
|
|
3684
3700
|
) && /* @__PURE__ */ l(
|
|
3685
3701
|
"svg",
|
|
3686
3702
|
{
|
|
@@ -3699,46 +3715,46 @@ function Ur({
|
|
|
3699
3715
|
)
|
|
3700
3716
|
}
|
|
3701
3717
|
),
|
|
3702
|
-
|
|
3718
|
+
h.hex && /* @__PURE__ */ l(
|
|
3703
3719
|
"div",
|
|
3704
3720
|
{
|
|
3705
3721
|
className: "h-4 w-4 rounded border border-border",
|
|
3706
|
-
style: { backgroundColor:
|
|
3722
|
+
style: { backgroundColor: h.hex }
|
|
3707
3723
|
}
|
|
3708
3724
|
),
|
|
3709
|
-
/* @__PURE__ */ l("span", { children:
|
|
3725
|
+
/* @__PURE__ */ l("span", { children: h.label })
|
|
3710
3726
|
] })
|
|
3711
3727
|
},
|
|
3712
|
-
|
|
3728
|
+
h.value
|
|
3713
3729
|
)),
|
|
3714
|
-
$.length === 0 &&
|
|
3730
|
+
$.length === 0 && b && r.length > 0 && /* @__PURE__ */ l("div", { className: "px-4 py-3", children: /* @__PURE__ */ l("span", { className: "text-sm text-text-muted", children: v }) })
|
|
3715
3731
|
] })
|
|
3716
3732
|
]
|
|
3717
3733
|
}
|
|
3718
3734
|
)
|
|
3719
3735
|
] }),
|
|
3720
|
-
|
|
3736
|
+
m && /* @__PURE__ */ l("span", { className: "block mt-1 text-xs text-danger font-medium", children: m })
|
|
3721
3737
|
] });
|
|
3722
3738
|
}
|
|
3723
3739
|
export {
|
|
3724
|
-
|
|
3740
|
+
le as Button,
|
|
3725
3741
|
$r as Calendar,
|
|
3726
3742
|
Ur as Dropdown,
|
|
3727
3743
|
Fr as ExpandableCard,
|
|
3728
|
-
|
|
3744
|
+
Ir as Input,
|
|
3729
3745
|
Tr as InputArea,
|
|
3730
3746
|
Gr as Pagination,
|
|
3731
3747
|
Vr as SearchInput,
|
|
3732
3748
|
Br as TabPanel,
|
|
3733
3749
|
Wr as Table,
|
|
3734
3750
|
_r as Tabs,
|
|
3735
|
-
|
|
3751
|
+
Er as ThemeProvider,
|
|
3736
3752
|
Rr as Toggle,
|
|
3737
3753
|
u as cn,
|
|
3738
3754
|
A as defaultTheme,
|
|
3739
3755
|
se as generateColorVariants,
|
|
3740
3756
|
dr as hexToHsl,
|
|
3741
|
-
|
|
3757
|
+
pe as hslToHex,
|
|
3742
3758
|
Or as useTheme
|
|
3743
3759
|
};
|
|
3744
3760
|
//# sourceMappingURL=index.js.map
|