@moondreamsdev/dreamer-ui 1.7.12 → 1.7.13
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/{Toast-Dj3X8g0Q.cjs → Toast-BJPMjPG-.cjs} +2 -2
- package/dist/Toast-BJPMjPG-.cjs.map +1 -0
- package/dist/{Toast-DUpf_XxS.js → Toast-DXhZLxdl.js} +16 -12
- package/dist/Toast-DXhZLxdl.js.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +702 -717
- package/dist/components.esm.js.map +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.esm.js +8 -6
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.cjs.js.map +1 -1
- package/dist/providers.esm.js +116 -68
- package/dist/providers.esm.js.map +1 -1
- package/dist/src/components/panel/Panel.d.ts +1 -4
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/useTheme.d.ts +9 -0
- package/dist/src/providers/ActionModalProvider.d.ts +11 -0
- package/dist/src/providers/DreamerUIProvider.d.ts +12 -0
- package/dist/src/providers/ThemeProvider.d.ts +15 -0
- package/dist/src/providers/ToastProvider.d.ts +6 -2
- package/dist/src/providers/index.d.ts +3 -1
- package/dist/useTheme-Bdg1t0Zr.cjs +2 -0
- package/dist/useTheme-Bdg1t0Zr.cjs.map +1 -0
- package/dist/useTheme-CYIEopvl.js +31 -0
- package/dist/useTheme-CYIEopvl.js.map +1 -0
- package/package.json +1 -1
- package/dist/Toast-DUpf_XxS.js.map +0 -1
- package/dist/Toast-Dj3X8g0Q.cjs.map +0 -1
- package/dist/src/components/panel/variants.d.ts +0 -12
- package/dist/useToast-CEKvEJVB.js +0 -22
- package/dist/useToast-CEKvEJVB.js.map +0 -1
- package/dist/useToast-CraVIawn.cjs +0 -2
- package/dist/useToast-CraVIawn.cjs.map +0 -1
package/dist/components.esm.js
CHANGED
|
@@ -2,13 +2,13 @@ var et = Object.defineProperty;
|
|
|
2
2
|
var tt = (r, o, t) => o in r ? et(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
|
|
3
3
|
var Re = (r, o, t) => tt(r, typeof o != "symbol" ? o + "" : o, t);
|
|
4
4
|
import { jsxs as w, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
5
|
+
import Z, { useId as J, useState as R, createElement as rt, useEffect as V, useCallback as $, useMemo as ne, useRef as q, Component as nt, isValidElement as at, cloneElement as ot } from "react";
|
|
6
6
|
import { j as k } from "./join-BmgR_f4v.js";
|
|
7
|
-
import { f as Ne, g as ye, h as he, k as st, c as
|
|
8
|
-
import { u as Me, D as wt, n as
|
|
9
|
-
import { A as
|
|
7
|
+
import { f as Ne, g as ye, h as he, k as st, c as Ze, D as Qe, b as ze, W as lt, l as it, j as ct, C as dt, a as ut, G as ft, i as Ue, T as mt, P as pt, Q as ht, m as bt, E as gt, I as xt, d as yt, e as vt } from "./Window-bavT8vOT.js";
|
|
8
|
+
import { u as Me, D as wt, n as Y, a as kt, b as Te } from "./Toast-DXhZLxdl.js";
|
|
9
|
+
import { A as Ma, T as Ta } from "./Toast-DXhZLxdl.js";
|
|
10
10
|
import { X as be, E as ve, C as Nt, I as Be } from "./X-CIoyLewf.js";
|
|
11
|
-
import "./
|
|
11
|
+
import "./useTheme-CYIEopvl.js";
|
|
12
12
|
import { u as Dt } from "./useScreenSize-DiuQZBHb.js";
|
|
13
13
|
import { createPortal as De } from "react-dom";
|
|
14
14
|
import { downloadFile as Ct, mergeRefs as Et } from "./utils.esm.js";
|
|
@@ -20,13 +20,13 @@ function Ce({
|
|
|
20
20
|
className: n = "",
|
|
21
21
|
disabled: a = !1,
|
|
22
22
|
isOpen: l = !1,
|
|
23
|
-
onToggle:
|
|
23
|
+
onToggle: d,
|
|
24
24
|
triggerClassName: i = "",
|
|
25
25
|
bodyClassName: f = ""
|
|
26
26
|
}) {
|
|
27
|
-
const u = J(),
|
|
28
|
-
!a &&
|
|
29
|
-
},
|
|
27
|
+
const u = J(), c = r || `accordion-item-${u}`, m = `${c}-header`, p = `${c}-panel`, x = () => {
|
|
28
|
+
!a && d && d();
|
|
29
|
+
}, v = (b) => {
|
|
30
30
|
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), x());
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ w("div", { className: k("border-b border-gray-200", a && "opacity-60 cursor-not-allowed", n), children: [
|
|
@@ -44,7 +44,7 @@ function Ce({
|
|
|
44
44
|
"aria-controls": p,
|
|
45
45
|
disabled: a,
|
|
46
46
|
onClick: x,
|
|
47
|
-
onKeyDown:
|
|
47
|
+
onKeyDown: v,
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ e("span", { children: o }),
|
|
50
50
|
/* @__PURE__ */ e(
|
|
@@ -77,7 +77,7 @@ function Ce({
|
|
|
77
77
|
)
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ea({
|
|
81
81
|
id: r,
|
|
82
82
|
items: o = [],
|
|
83
83
|
children: t,
|
|
@@ -85,15 +85,15 @@ function ta({
|
|
|
85
85
|
itemClassName: n = "",
|
|
86
86
|
allowMultiple: a = !1,
|
|
87
87
|
defaultOpenItems: l = [],
|
|
88
|
-
triggersClassName:
|
|
88
|
+
triggersClassName: d = "",
|
|
89
89
|
bodiesClassName: i = ""
|
|
90
90
|
}) {
|
|
91
|
-
const f = J(), u = r || `accordion-group-${f}`, [
|
|
91
|
+
const f = J(), u = r || `accordion-group-${f}`, [c, m] = R(new Set(l)), p = (b) => {
|
|
92
92
|
m((D) => {
|
|
93
93
|
const h = new Set(D);
|
|
94
94
|
return h.has(b) ? h.delete(b) : (a || h.clear(), h.add(b)), h;
|
|
95
95
|
});
|
|
96
|
-
}, x = (b) => `${f}-item-${b}`,
|
|
96
|
+
}, x = (b) => `${f}-item-${b}`, v = (b) => c.has(b);
|
|
97
97
|
return /* @__PURE__ */ w("div", { id: u, className: s, children: [
|
|
98
98
|
o.length > 0 && o.map((b, D) => {
|
|
99
99
|
const h = b.id || x(D);
|
|
@@ -104,17 +104,17 @@ function ta({
|
|
|
104
104
|
title: b.title,
|
|
105
105
|
content: b.content,
|
|
106
106
|
disabled: b.disabled,
|
|
107
|
-
isOpen:
|
|
107
|
+
isOpen: v(h),
|
|
108
108
|
onToggle: () => p(h),
|
|
109
109
|
className: n,
|
|
110
|
-
triggerClassName:
|
|
110
|
+
triggerClassName: d,
|
|
111
111
|
bodyClassName: i
|
|
112
112
|
},
|
|
113
113
|
h
|
|
114
114
|
);
|
|
115
115
|
}),
|
|
116
|
-
o.length === 0 && t &&
|
|
117
|
-
if (
|
|
116
|
+
o.length === 0 && t && Z.Children.map(t, (b, D) => {
|
|
117
|
+
if (Z.isValidElement(b) && b.type === Ce) {
|
|
118
118
|
const h = b.props.id || x(D);
|
|
119
119
|
return /* @__PURE__ */ rt(
|
|
120
120
|
Ce,
|
|
@@ -123,9 +123,9 @@ function ta({
|
|
|
123
123
|
key: h,
|
|
124
124
|
id: h,
|
|
125
125
|
className: k(n, b.props.className),
|
|
126
|
-
isOpen:
|
|
126
|
+
isOpen: v(h),
|
|
127
127
|
onToggle: () => p(h),
|
|
128
|
-
triggerClassName: k(
|
|
128
|
+
triggerClassName: k(d, b.props.triggerClassName),
|
|
129
129
|
bodyClassName: k(i, b.props.bodyClassName)
|
|
130
130
|
}
|
|
131
131
|
);
|
|
@@ -408,7 +408,7 @@ const Gt = {
|
|
|
408
408
|
circle: "rounded-full",
|
|
409
409
|
square: "rounded-lg"
|
|
410
410
|
};
|
|
411
|
-
function
|
|
411
|
+
function ta({
|
|
412
412
|
id: r,
|
|
413
413
|
ref: o,
|
|
414
414
|
size: t = "md",
|
|
@@ -416,11 +416,11 @@ function ra({
|
|
|
416
416
|
preset: n,
|
|
417
417
|
alt: a,
|
|
418
418
|
className: l,
|
|
419
|
-
src:
|
|
419
|
+
src: d,
|
|
420
420
|
initials: i,
|
|
421
421
|
...f
|
|
422
422
|
}) {
|
|
423
|
-
const u = jt[t],
|
|
423
|
+
const u = jt[t], c = Wt[s], m = n ? Gt[n] : null;
|
|
424
424
|
return /* @__PURE__ */ e(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
@@ -429,7 +429,7 @@ function ra({
|
|
|
429
429
|
className: k(
|
|
430
430
|
"relative inline-flex items-center justify-center overflow-hidden bg-gray-100 border-2 border-border",
|
|
431
431
|
u.size,
|
|
432
|
-
|
|
432
|
+
c,
|
|
433
433
|
l
|
|
434
434
|
),
|
|
435
435
|
"data-size": t,
|
|
@@ -438,7 +438,7 @@ function ra({
|
|
|
438
438
|
role: "img",
|
|
439
439
|
"aria-label": a || `Avatar ${n ? `of ${n}` : ""}`,
|
|
440
440
|
...f,
|
|
441
|
-
children:
|
|
441
|
+
children: d ? /* @__PURE__ */ e("img", { src: d, alt: a || "User avatar", className: "w-full h-full object-cover" }) : m ? /* @__PURE__ */ e(m, { size: u.iconSize }) : i ? /* @__PURE__ */ e("span", { className: "text-gray-600 font-medium text-sm", children: i.slice(0, 2).toUpperCase() }) : /* @__PURE__ */ e("div", { className: "w-full h-full bg-gradient-to-br from-gray-300 to-gray-400" })
|
|
442
442
|
}
|
|
443
443
|
);
|
|
444
444
|
}
|
|
@@ -479,7 +479,7 @@ const _t = {
|
|
|
479
479
|
aspectVideo: "px-3 py-1.5"
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
|
-
function
|
|
482
|
+
function ra({
|
|
483
483
|
id: r,
|
|
484
484
|
ref: o,
|
|
485
485
|
variant: t = "muted",
|
|
@@ -487,7 +487,7 @@ function na({
|
|
|
487
487
|
children: n,
|
|
488
488
|
className: a,
|
|
489
489
|
aspect: l = "video",
|
|
490
|
-
use:
|
|
490
|
+
use: d = "decorative",
|
|
491
491
|
size: i = "xs",
|
|
492
492
|
...f
|
|
493
493
|
}) {
|
|
@@ -507,9 +507,9 @@ function na({
|
|
|
507
507
|
"data-variant": t,
|
|
508
508
|
"data-outline": s,
|
|
509
509
|
"data-aspect": l,
|
|
510
|
-
"data-use":
|
|
510
|
+
"data-use": d,
|
|
511
511
|
"data-size": i,
|
|
512
|
-
..._t[
|
|
512
|
+
..._t[d],
|
|
513
513
|
...f,
|
|
514
514
|
children: n
|
|
515
515
|
}
|
|
@@ -541,7 +541,7 @@ const Ht = {
|
|
|
541
541
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
542
542
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
543
543
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
544
|
-
},
|
|
544
|
+
}, Yt = {
|
|
545
545
|
stripped: "",
|
|
546
546
|
fitted: "size-fit leading-0",
|
|
547
547
|
sm: "px-2 py-1 text-sm",
|
|
@@ -549,7 +549,7 @@ const Ht = {
|
|
|
549
549
|
lg: "px-6 py-3 text-lg",
|
|
550
550
|
icon: "p-1 w-fit aspect-square",
|
|
551
551
|
full: "p-2 w-full"
|
|
552
|
-
},
|
|
552
|
+
}, Zt = {
|
|
553
553
|
none: "rounded-none",
|
|
554
554
|
sm: "rounded-sm",
|
|
555
555
|
md: "rounded-md",
|
|
@@ -573,8 +573,8 @@ function Qt({
|
|
|
573
573
|
const i = k(
|
|
574
574
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
575
575
|
Ht[r],
|
|
576
|
-
|
|
577
|
-
|
|
576
|
+
Yt[l],
|
|
577
|
+
Zt[t],
|
|
578
578
|
s && "relative pointer-events-none",
|
|
579
579
|
n
|
|
580
580
|
);
|
|
@@ -591,10 +591,10 @@ function Qt({
|
|
|
591
591
|
children: a.children
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
|
-
const f = a, u = () => f.children ? typeof f.children == "string" || typeof f.children == "number" || typeof f.children == "boolean" ? /* @__PURE__ */ e("span", { className: k(s && "invisible"), children: f.children }) :
|
|
595
|
-
if (
|
|
594
|
+
const f = a, u = () => f.children ? typeof f.children == "string" || typeof f.children == "number" || typeof f.children == "boolean" ? /* @__PURE__ */ e("span", { className: k(s && "invisible"), children: f.children }) : Z.Children.map(f.children, (m, p) => {
|
|
595
|
+
if (Z.isValidElement(m)) {
|
|
596
596
|
const x = m.props;
|
|
597
|
-
return
|
|
597
|
+
return Z.cloneElement(m, {
|
|
598
598
|
key: p,
|
|
599
599
|
className: k(s && "invisible", x.className)
|
|
600
600
|
});
|
|
@@ -626,7 +626,7 @@ function Ut(r = {}) {
|
|
|
626
626
|
maxDate: n,
|
|
627
627
|
view: a = "month",
|
|
628
628
|
onDateSelect: l,
|
|
629
|
-
onRangeSelect:
|
|
629
|
+
onRangeSelect: d
|
|
630
630
|
} = r, [i, f] = R({
|
|
631
631
|
currentDate: o,
|
|
632
632
|
selectedDate: t === "single" ? o : null,
|
|
@@ -635,23 +635,23 @@ function Ut(r = {}) {
|
|
|
635
635
|
}), u = $(
|
|
636
636
|
(E) => !!(s && E < s || n && E > n),
|
|
637
637
|
[s, n]
|
|
638
|
-
),
|
|
638
|
+
), c = $(
|
|
639
639
|
(E) => {
|
|
640
640
|
u(E) || (t === "single" ? (f((C) => ({ ...C, selectedDate: E })), l == null || l(E)) : t === "range" && f((C) => {
|
|
641
641
|
const { selectedRange: z } = C;
|
|
642
642
|
if (!(z != null && z.start) || z.start && z.end) {
|
|
643
643
|
const T = { start: E, end: null };
|
|
644
|
-
return
|
|
644
|
+
return d == null || d(T), { ...C, selectedRange: T };
|
|
645
645
|
} else {
|
|
646
646
|
const T = z.start, M = E, I = {
|
|
647
647
|
start: T < M ? T : M,
|
|
648
648
|
end: T < M ? M : T
|
|
649
649
|
};
|
|
650
|
-
return
|
|
650
|
+
return d == null || d(I), { ...C, selectedRange: I };
|
|
651
651
|
}
|
|
652
652
|
}));
|
|
653
653
|
},
|
|
654
|
-
[t, u, l,
|
|
654
|
+
[t, u, l, d]
|
|
655
655
|
), m = $((E) => {
|
|
656
656
|
f((C) => {
|
|
657
657
|
const z = new Date(C.currentDate);
|
|
@@ -667,7 +667,7 @@ function Ut(r = {}) {
|
|
|
667
667
|
const z = new Date(C.currentDate), T = E === "prev" ? -1 : 1;
|
|
668
668
|
return z.setDate(z.getDate() + T), { ...C, currentDate: z };
|
|
669
669
|
});
|
|
670
|
-
}, []),
|
|
670
|
+
}, []), v = $(
|
|
671
671
|
(E) => {
|
|
672
672
|
i.view === "month" ? m(E) : i.view === "week" ? p(E) : x(E);
|
|
673
673
|
},
|
|
@@ -686,7 +686,7 @@ function Ut(r = {}) {
|
|
|
686
686
|
const z = new Date(C.currentDate);
|
|
687
687
|
return z.setFullYear(E), { ...C, currentDate: z };
|
|
688
688
|
});
|
|
689
|
-
}, []),
|
|
689
|
+
}, []), y = ne(() => {
|
|
690
690
|
const { currentDate: E, view: C } = i, z = [];
|
|
691
691
|
if (C === "month") {
|
|
692
692
|
const T = new Date(E.getFullYear(), E.getMonth(), 1), M = new Date(T);
|
|
@@ -749,10 +749,10 @@ function Ut(r = {}) {
|
|
|
749
749
|
selectedRange: i.selectedRange,
|
|
750
750
|
view: i.view,
|
|
751
751
|
// Data
|
|
752
|
-
daysInView:
|
|
752
|
+
daysInView: y,
|
|
753
753
|
// Actions
|
|
754
|
-
selectDate:
|
|
755
|
-
navigate:
|
|
754
|
+
selectDate: c,
|
|
755
|
+
navigate: v,
|
|
756
756
|
changeView: b,
|
|
757
757
|
goToDate: D,
|
|
758
758
|
changeMonth: h,
|
|
@@ -815,7 +815,7 @@ const Jt = {
|
|
|
815
815
|
"November",
|
|
816
816
|
"December"
|
|
817
817
|
], Ve = 100;
|
|
818
|
-
function
|
|
818
|
+
function na({
|
|
819
819
|
id: r,
|
|
820
820
|
ref: o,
|
|
821
821
|
className: t,
|
|
@@ -823,28 +823,28 @@ function aa({
|
|
|
823
823
|
customStyles: n = {},
|
|
824
824
|
view: a = Le.view,
|
|
825
825
|
mode: l = "single",
|
|
826
|
-
initialDate:
|
|
826
|
+
initialDate: d,
|
|
827
827
|
minDate: i,
|
|
828
828
|
maxDate: f,
|
|
829
829
|
renderCell: u,
|
|
830
|
-
showViewSelector:
|
|
830
|
+
showViewSelector: c = !1,
|
|
831
831
|
showNavigation: m = !0,
|
|
832
832
|
navigationLayout: p = "around",
|
|
833
833
|
useMonthYearSelector: x = !1,
|
|
834
|
-
showTodayButton:
|
|
834
|
+
showTodayButton: v = !1,
|
|
835
835
|
onDateSelect: b,
|
|
836
836
|
onRangeSelect: D,
|
|
837
837
|
...h
|
|
838
838
|
}) {
|
|
839
839
|
const g = Ut({
|
|
840
|
-
initialDate:
|
|
840
|
+
initialDate: d,
|
|
841
841
|
mode: l,
|
|
842
842
|
minDate: i,
|
|
843
843
|
maxDate: f,
|
|
844
844
|
view: a,
|
|
845
845
|
onDateSelect: b,
|
|
846
846
|
onRangeSelect: D
|
|
847
|
-
}),
|
|
847
|
+
}), y = Jt[s], F = Xt[g.view], B = (S) => {
|
|
848
848
|
const j = /* @__PURE__ */ new Date();
|
|
849
849
|
return S.toDateString() === j.toDateString();
|
|
850
850
|
}, N = (S) => S.getMonth() === g.currentDate.getMonth() && S.getFullYear() === g.currentDate.getFullYear(), A = () => {
|
|
@@ -860,7 +860,7 @@ function aa({
|
|
|
860
860
|
return O.setDate(O.getDate() + 6), P.getMonth() === O.getMonth() ? `${X} ${P.getDate()}-${O.getDate()}, ${U}` : `${me[P.getMonth()]} ${P.getDate()} - ${me[O.getMonth()]} ${O.getDate()}, ${U}`;
|
|
861
861
|
}
|
|
862
862
|
return `${X} ${S.getDate()}, ${U}`;
|
|
863
|
-
}, C = () =>
|
|
863
|
+
}, C = () => c ? /* @__PURE__ */ e("div", { className: K, children: ["month", "week", "day"].map((S) => /* @__PURE__ */ e(
|
|
864
864
|
"button",
|
|
865
865
|
{
|
|
866
866
|
onClick: () => g.changeView(S),
|
|
@@ -901,7 +901,7 @@ function aa({
|
|
|
901
901
|
)
|
|
902
902
|
] });
|
|
903
903
|
}, T = () => {
|
|
904
|
-
if (!
|
|
904
|
+
if (!v) return null;
|
|
905
905
|
const S = k(
|
|
906
906
|
"px-3 py-1 text-xs rounded border border-border hover:bg-accent/20 transition-colors focus:outline-none focus:ring focus:ring-accent/50",
|
|
907
907
|
n.todayButtonClassName
|
|
@@ -911,7 +911,7 @@ function aa({
|
|
|
911
911
|
const j = g.isDateSelected(S), X = g.isDateDisabled(S), U = B(S), P = g.isDateInRange(S), O = g.isDateRangeStart(S), H = g.isDateRangeEnd(S), ce = N(S), de = k(
|
|
912
912
|
"w-full flex items-center justify-center transition-colors cursor-pointer",
|
|
913
913
|
"focus:outline-none",
|
|
914
|
-
|
|
914
|
+
y.cell
|
|
915
915
|
), _ = k(
|
|
916
916
|
!P && "rounded-md",
|
|
917
917
|
!j && "hover:bg-accent/20 focus:bg-accent/20",
|
|
@@ -949,25 +949,25 @@ function aa({
|
|
|
949
949
|
);
|
|
950
950
|
}, I = k(
|
|
951
951
|
"bg-background border rounded-lg",
|
|
952
|
-
|
|
952
|
+
y.container,
|
|
953
953
|
n.containerClassName,
|
|
954
954
|
t
|
|
955
955
|
), G = k(
|
|
956
956
|
"flex items-center border-b px-4 py-2",
|
|
957
957
|
"justify-between",
|
|
958
|
-
|
|
958
|
+
y.header,
|
|
959
959
|
n.headerClassName
|
|
960
960
|
), W = k("flex items-center gap-1", n.navigationClassName), Q = k(
|
|
961
961
|
"p-1 rounded hover:bg-accent/20 transition-colors",
|
|
962
|
-
|
|
962
|
+
y.navigation,
|
|
963
963
|
n.prevButtonClassName
|
|
964
964
|
), re = k(
|
|
965
965
|
"p-1 rounded hover:bg-accent/20 transition-colors",
|
|
966
|
-
|
|
966
|
+
y.navigation,
|
|
967
967
|
n.nextButtonClassName
|
|
968
968
|
), L = k("font-semibold text-foreground", n.titleClassName), K = k("flex gap-1 text-xs", n.viewSelectorClassName), ae = k(
|
|
969
969
|
"grid grid-cols-7 border-b text-muted-foreground font-medium",
|
|
970
|
-
|
|
970
|
+
y.weekdays,
|
|
971
971
|
n.weekdaysClassName
|
|
972
972
|
), le = k("text-center", n.weekdayClassName), ie = k(
|
|
973
973
|
"grid gap-y-1 p-2",
|
|
@@ -1068,11 +1068,11 @@ const er = {
|
|
|
1068
1068
|
}, tr = {
|
|
1069
1069
|
info: /* @__PURE__ */ e(Be, { size: 22 }),
|
|
1070
1070
|
destructive: /* @__PURE__ */ e(Nt, { size: 22 }),
|
|
1071
|
-
success: /* @__PURE__ */ e(
|
|
1071
|
+
success: /* @__PURE__ */ e(Ze, { size: 22 }),
|
|
1072
1072
|
warning: /* @__PURE__ */ e(ve, { size: 20 }),
|
|
1073
1073
|
base: /* @__PURE__ */ e(st, { size: 22 })
|
|
1074
1074
|
};
|
|
1075
|
-
function
|
|
1075
|
+
function aa({
|
|
1076
1076
|
id: r,
|
|
1077
1077
|
ref: o,
|
|
1078
1078
|
variant: t = "base",
|
|
@@ -1080,13 +1080,13 @@ function oa({
|
|
|
1080
1080
|
title: n,
|
|
1081
1081
|
description: a,
|
|
1082
1082
|
className: l,
|
|
1083
|
-
dismissible:
|
|
1083
|
+
dismissible: d = !1,
|
|
1084
1084
|
onDismiss: i
|
|
1085
1085
|
}) {
|
|
1086
|
-
const f = J(), u = r || `callout-${f}`, [
|
|
1086
|
+
const f = J(), u = r || `callout-${f}`, [c, m] = R(!1), p = er[t], x = tr[t], v = () => {
|
|
1087
1087
|
m(!0), i && i();
|
|
1088
1088
|
};
|
|
1089
|
-
return
|
|
1089
|
+
return c ? null : /* @__PURE__ */ w(
|
|
1090
1090
|
"div",
|
|
1091
1091
|
{
|
|
1092
1092
|
id: u,
|
|
@@ -1104,11 +1104,11 @@ function oa({
|
|
|
1104
1104
|
a && /* @__PURE__ */ e("div", { id: `${u}-description`, className: k("mt-0.5 font-light", p.description), children: a })
|
|
1105
1105
|
] })
|
|
1106
1106
|
] }),
|
|
1107
|
-
|
|
1107
|
+
d && /* @__PURE__ */ e(
|
|
1108
1108
|
"button",
|
|
1109
1109
|
{
|
|
1110
1110
|
type: "button",
|
|
1111
|
-
onClick:
|
|
1111
|
+
onClick: v,
|
|
1112
1112
|
"data-callout-close-button": "true",
|
|
1113
1113
|
className: k(
|
|
1114
1114
|
p.core,
|
|
@@ -1145,7 +1145,7 @@ const rr = {
|
|
|
1145
1145
|
paddingMulti: 1
|
|
1146
1146
|
}
|
|
1147
1147
|
};
|
|
1148
|
-
function
|
|
1148
|
+
function oa({
|
|
1149
1149
|
id: r,
|
|
1150
1150
|
className: o,
|
|
1151
1151
|
ref: t,
|
|
@@ -1153,11 +1153,11 @@ function sa({
|
|
|
1153
1153
|
padding: n = 16,
|
|
1154
1154
|
header: a,
|
|
1155
1155
|
footer: l,
|
|
1156
|
-
children:
|
|
1156
|
+
children: d,
|
|
1157
1157
|
imageSrc: i,
|
|
1158
1158
|
imageAlt: f,
|
|
1159
1159
|
imageComponent: u,
|
|
1160
|
-
imageToEdge:
|
|
1160
|
+
imageToEdge: c = !0,
|
|
1161
1161
|
...m
|
|
1162
1162
|
}) {
|
|
1163
1163
|
const p = rr[s], x = i || u;
|
|
@@ -1183,14 +1183,14 @@ function sa({
|
|
|
1183
1183
|
x && /* @__PURE__ */ e(
|
|
1184
1184
|
"div",
|
|
1185
1185
|
{
|
|
1186
|
-
style:
|
|
1186
|
+
style: c ? void 0 : { padding: n, paddingBottom: 0 },
|
|
1187
1187
|
className: "w-full overflow-hidden",
|
|
1188
1188
|
children: u || /* @__PURE__ */ e("img", { src: i, alt: f || "", className: "w-full h-auto object-cover rounded-xs", loading: "lazy" })
|
|
1189
1189
|
}
|
|
1190
1190
|
),
|
|
1191
1191
|
/* @__PURE__ */ w("div", { style: { padding: n, rowGap: n * p.paddingMulti }, className: "flex flex-col", children: [
|
|
1192
1192
|
a && /* @__PURE__ */ e("div", { className: p.header, children: a }),
|
|
1193
|
-
|
|
1193
|
+
d && /* @__PURE__ */ e("div", { className: p.content, children: d }),
|
|
1194
1194
|
l && /* @__PURE__ */ e("div", { className: p.footer, children: l })
|
|
1195
1195
|
] })
|
|
1196
1196
|
]
|
|
@@ -1205,25 +1205,25 @@ function nr({
|
|
|
1205
1205
|
scrollInterval: n,
|
|
1206
1206
|
pauseScrollOnHover: a,
|
|
1207
1207
|
currentIndex: l,
|
|
1208
|
-
onIndexChange:
|
|
1208
|
+
onIndexChange: d
|
|
1209
1209
|
}) {
|
|
1210
|
-
const [i, f] = R(l || 0), [u,
|
|
1210
|
+
const [i, f] = R(l || 0), [u, c] = R(!1), m = q(null), p = Math.ceil(r / o), x = t || i > 0, v = t || i < p - 1, b = $(
|
|
1211
1211
|
(g) => {
|
|
1212
|
-
const
|
|
1213
|
-
f(
|
|
1212
|
+
const y = Math.max(0, Math.min(g, p - 1));
|
|
1213
|
+
f(y), d == null || d(y);
|
|
1214
1214
|
},
|
|
1215
|
-
[p,
|
|
1215
|
+
[p, d]
|
|
1216
1216
|
), D = $(() => {
|
|
1217
1217
|
if (x) {
|
|
1218
1218
|
const g = i === 0 && t ? p - 1 : i - 1;
|
|
1219
1219
|
b(g);
|
|
1220
1220
|
}
|
|
1221
1221
|
}, [i, x, t, p, b]), h = $(() => {
|
|
1222
|
-
if (
|
|
1222
|
+
if (v) {
|
|
1223
1223
|
const g = i === p - 1 && t ? 0 : i + 1;
|
|
1224
1224
|
b(g);
|
|
1225
1225
|
}
|
|
1226
|
-
}, [i,
|
|
1226
|
+
}, [i, v, t, p, b]);
|
|
1227
1227
|
return V(() => {
|
|
1228
1228
|
l !== void 0 && l !== i && f(l);
|
|
1229
1229
|
}, [l, i]), V(() => {
|
|
@@ -1232,21 +1232,21 @@ function nr({
|
|
|
1232
1232
|
m.current = setInterval(() => {
|
|
1233
1233
|
a && u || h();
|
|
1234
1234
|
}, n);
|
|
1235
|
-
},
|
|
1235
|
+
}, y = () => {
|
|
1236
1236
|
m.current && (clearInterval(m.current), m.current = null);
|
|
1237
1237
|
};
|
|
1238
|
-
return !u || !a ? g() :
|
|
1238
|
+
return !u || !a ? g() : y(), y;
|
|
1239
1239
|
}, [s, n, a, u, h]), V(() => {
|
|
1240
1240
|
f(0);
|
|
1241
1241
|
}, [o]), {
|
|
1242
1242
|
currentSlide: i,
|
|
1243
1243
|
canGoPrev: x,
|
|
1244
|
-
canGoNext:
|
|
1244
|
+
canGoNext: v,
|
|
1245
1245
|
goToPrev: D,
|
|
1246
1246
|
goToNext: h,
|
|
1247
1247
|
goToSlide: b,
|
|
1248
1248
|
isHovered: u,
|
|
1249
|
-
setIsHovered:
|
|
1249
|
+
setIsHovered: c
|
|
1250
1250
|
};
|
|
1251
1251
|
}
|
|
1252
1252
|
const ge = {
|
|
@@ -1280,7 +1280,7 @@ const ge = {
|
|
|
1280
1280
|
next: "absolute right-2 top-1/2 -translate-y-1/2 z-10"
|
|
1281
1281
|
}
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function sa({
|
|
1284
1284
|
children: r,
|
|
1285
1285
|
id: o,
|
|
1286
1286
|
ref: t,
|
|
@@ -1288,43 +1288,43 @@ function la({
|
|
|
1288
1288
|
autoScroll: n = !1,
|
|
1289
1289
|
scrollInterval: a = 3e3,
|
|
1290
1290
|
pauseScrollOnHover: l = !0,
|
|
1291
|
-
currentIndex:
|
|
1291
|
+
currentIndex: d,
|
|
1292
1292
|
onIndexChange: i,
|
|
1293
1293
|
hidePrevNext: f = !1,
|
|
1294
1294
|
hideDots: u = !1,
|
|
1295
|
-
itemsToShow:
|
|
1295
|
+
itemsToShow: c = 1,
|
|
1296
1296
|
buttonSize: m = "md",
|
|
1297
1297
|
buttonVariant: p = "default",
|
|
1298
1298
|
buttonPosition: x = "exterior",
|
|
1299
|
-
infinite:
|
|
1299
|
+
infinite: v = !0,
|
|
1300
1300
|
prevButton: b,
|
|
1301
1301
|
nextButton: D,
|
|
1302
1302
|
itemsClassName: h,
|
|
1303
1303
|
containerClassName: g,
|
|
1304
|
-
dotsClassName:
|
|
1304
|
+
dotsClassName: y,
|
|
1305
1305
|
gap: F = 8
|
|
1306
1306
|
}) {
|
|
1307
1307
|
var j, X;
|
|
1308
|
-
const B = q(null), N =
|
|
1309
|
-
if (typeof
|
|
1310
|
-
return
|
|
1311
|
-
if (typeof
|
|
1308
|
+
const B = q(null), N = Z.Children.toArray(r).filter(Z.isValidElement), A = N.length, { screenSize: E } = Dt(), C = ne(() => {
|
|
1309
|
+
if (typeof c == "number")
|
|
1310
|
+
return c;
|
|
1311
|
+
if (typeof c == "object" && c && E) {
|
|
1312
1312
|
const U = ["2xl", "xl", "lg", "md", "sm", "xs"], P = U.indexOf(E);
|
|
1313
1313
|
for (let O = P; O < U.length; O++) {
|
|
1314
1314
|
const H = U[O];
|
|
1315
|
-
if (
|
|
1316
|
-
return
|
|
1315
|
+
if (c[H] !== void 0)
|
|
1316
|
+
return c[H];
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
1319
|
return 1;
|
|
1320
|
-
}, [
|
|
1320
|
+
}, [c, E]), { currentSlide: z, canGoPrev: T, canGoNext: M, goToPrev: I, goToNext: G, goToSlide: W, setIsHovered: Q } = nr({
|
|
1321
1321
|
totalItems: A,
|
|
1322
1322
|
itemsToShow: C,
|
|
1323
|
-
infinite:
|
|
1323
|
+
infinite: v,
|
|
1324
1324
|
autoScroll: n,
|
|
1325
1325
|
scrollInterval: a,
|
|
1326
1326
|
pauseScrollOnHover: l,
|
|
1327
|
-
currentIndex:
|
|
1327
|
+
currentIndex: d,
|
|
1328
1328
|
onIndexChange: i
|
|
1329
1329
|
}), re = $(
|
|
1330
1330
|
(U) => {
|
|
@@ -1347,7 +1347,7 @@ function la({
|
|
|
1347
1347
|
x === "aligned" ? "disabled:opacity-90" : "disabled:opacity-50"
|
|
1348
1348
|
);
|
|
1349
1349
|
return /* @__PURE__ */ w("div", { className: k("relative", s), "data-carousel-wrapper": "true", children: [
|
|
1350
|
-
!f && /* @__PURE__ */ e(te, { children: b ?
|
|
1350
|
+
!f && /* @__PURE__ */ e(te, { children: b ? Z.cloneElement(
|
|
1351
1351
|
b,
|
|
1352
1352
|
{
|
|
1353
1353
|
onClick: L,
|
|
@@ -1429,7 +1429,7 @@ function la({
|
|
|
1429
1429
|
className: k(
|
|
1430
1430
|
"w-2 h-2 rounded-full transition-colors duration-200",
|
|
1431
1431
|
P === z ? "bg-accent" : "bg-muted hover:bg-muted-foreground/50",
|
|
1432
|
-
|
|
1432
|
+
y
|
|
1433
1433
|
),
|
|
1434
1434
|
"aria-label": `Go to slide ${P + 1}`,
|
|
1435
1435
|
"data-carousel-dot": P
|
|
@@ -1439,7 +1439,7 @@ function la({
|
|
|
1439
1439
|
]
|
|
1440
1440
|
}
|
|
1441
1441
|
),
|
|
1442
|
-
!f && /* @__PURE__ */ e(te, { children: D ?
|
|
1442
|
+
!f && /* @__PURE__ */ e(te, { children: D ? Z.cloneElement(
|
|
1443
1443
|
D,
|
|
1444
1444
|
{
|
|
1445
1445
|
onClick: K,
|
|
@@ -1477,8 +1477,8 @@ function ar(r) {
|
|
|
1477
1477
|
const [o, t] = R(""), s = $((n) => {
|
|
1478
1478
|
let a = n, l = "";
|
|
1479
1479
|
for (; a && !l; ) {
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1480
|
+
const d = window.getComputedStyle(a).backgroundColor;
|
|
1481
|
+
d && d !== "transparent" && d !== "rgba(0, 0, 0, 0)" && (l = d), a = a.parentElement;
|
|
1482
1482
|
}
|
|
1483
1483
|
return l || "transparent";
|
|
1484
1484
|
}, []);
|
|
@@ -1498,29 +1498,29 @@ function $e({
|
|
|
1498
1498
|
filled: n = !1,
|
|
1499
1499
|
rounded: a = !0,
|
|
1500
1500
|
checked: l = !1,
|
|
1501
|
-
indeterminate:
|
|
1501
|
+
indeterminate: d = !1,
|
|
1502
1502
|
onCheckedChange: i,
|
|
1503
1503
|
disabled: f,
|
|
1504
1504
|
className: u = "",
|
|
1505
|
-
display:
|
|
1505
|
+
display: c = "inline",
|
|
1506
1506
|
...m
|
|
1507
1507
|
}) {
|
|
1508
|
-
const p = J(), x = ne(() => o || `checkbox-${p}`, [o, p]),
|
|
1508
|
+
const p = J(), x = ne(() => o || `checkbox-${p}`, [o, p]), v = ar(x), [b, D] = R(l), [h, g] = R(d);
|
|
1509
1509
|
V(() => {
|
|
1510
1510
|
D(l);
|
|
1511
1511
|
}, [l]), V(() => {
|
|
1512
|
-
g(
|
|
1513
|
-
}, [
|
|
1514
|
-
const
|
|
1512
|
+
g(d);
|
|
1513
|
+
}, [d]);
|
|
1514
|
+
const y = () => {
|
|
1515
1515
|
if (!f) {
|
|
1516
1516
|
const N = h ? !0 : !b;
|
|
1517
1517
|
D(N), g(!1), i == null || i(N);
|
|
1518
1518
|
}
|
|
1519
1519
|
}, F = (N) => {
|
|
1520
|
-
N.key === " " && (N.preventDefault(),
|
|
1520
|
+
N.key === " " && (N.preventDefault(), y());
|
|
1521
1521
|
}, B = k(
|
|
1522
1522
|
"items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",
|
|
1523
|
-
|
|
1523
|
+
c === "inline" ? "inline-flex" : "flex",
|
|
1524
1524
|
a && "rounded",
|
|
1525
1525
|
f && "opacity-40 cursor-not-allowed",
|
|
1526
1526
|
!f && "cursor-pointer",
|
|
@@ -1534,7 +1534,7 @@ function $e({
|
|
|
1534
1534
|
ref: r,
|
|
1535
1535
|
tabIndex: 0,
|
|
1536
1536
|
role: "checkbox",
|
|
1537
|
-
onClick:
|
|
1537
|
+
onClick: y,
|
|
1538
1538
|
"aria-checked": h ? "mixed" : b,
|
|
1539
1539
|
"aria-disabled": f,
|
|
1540
1540
|
onKeyDownCapture: F,
|
|
@@ -1546,18 +1546,18 @@ function $e({
|
|
|
1546
1546
|
},
|
|
1547
1547
|
className: B,
|
|
1548
1548
|
...m,
|
|
1549
|
-
children: h ? /* @__PURE__ */ e(Qe, { size: t, color: n ?
|
|
1549
|
+
children: h ? /* @__PURE__ */ e(Qe, { size: t, color: n ? v : void 0 }) : /* @__PURE__ */ e(
|
|
1550
1550
|
ze,
|
|
1551
1551
|
{
|
|
1552
1552
|
size: t,
|
|
1553
|
-
color: n ?
|
|
1553
|
+
color: n ? v : void 0,
|
|
1554
1554
|
className: b ? "opacity-100" : "opacity-0"
|
|
1555
1555
|
}
|
|
1556
1556
|
)
|
|
1557
1557
|
}
|
|
1558
1558
|
);
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function la({
|
|
1561
1561
|
children: r,
|
|
1562
1562
|
className: o,
|
|
1563
1563
|
linkTo: t,
|
|
@@ -1591,15 +1591,15 @@ function ia({
|
|
|
1591
1591
|
function or(r) {
|
|
1592
1592
|
const [o, t] = R(null);
|
|
1593
1593
|
return V(() => {
|
|
1594
|
-
var
|
|
1595
|
-
const s = (
|
|
1594
|
+
var d;
|
|
1595
|
+
const s = (d = document.getElementById(r)) == null ? void 0 : d.parentElement;
|
|
1596
1596
|
if (!s) return;
|
|
1597
1597
|
const n = () => {
|
|
1598
|
-
const i = window.getComputedStyle(s), f = parseFloat(i.fontSize), u = i.lineHeight === "normal" ? f * 1.2 : parseFloat(i.lineHeight),
|
|
1598
|
+
const i = window.getComputedStyle(s), f = parseFloat(i.fontSize), u = i.lineHeight === "normal" ? f * 1.2 : parseFloat(i.lineHeight), c = f - 2, m = c / f, p = u * m;
|
|
1599
1599
|
t({
|
|
1600
1600
|
fontSize: f,
|
|
1601
1601
|
lineHeight: u,
|
|
1602
|
-
smallerFontSize:
|
|
1602
|
+
smallerFontSize: c,
|
|
1603
1603
|
smallerLineHeight: p
|
|
1604
1604
|
});
|
|
1605
1605
|
};
|
|
@@ -1622,8 +1622,8 @@ const sr = {
|
|
|
1622
1622
|
accent: "text-accent bg-muted/10",
|
|
1623
1623
|
current: "text-current bg-current/10"
|
|
1624
1624
|
};
|
|
1625
|
-
function
|
|
1626
|
-
const
|
|
1625
|
+
function ia({ id: r, ref: o, content: t, variant: s = "accent", className: n, style: a, ...l }) {
|
|
1626
|
+
const d = J(), i = r || `code-${d}`, f = or(i);
|
|
1627
1627
|
return /* @__PURE__ */ e(
|
|
1628
1628
|
"code",
|
|
1629
1629
|
{
|
|
@@ -1738,9 +1738,9 @@ function pr(r) {
|
|
|
1738
1738
|
for (; t < r.length && a > 0; )
|
|
1739
1739
|
r[t] === "{" ? a++ : r[t] === "}" && a--, a > 0 && t++;
|
|
1740
1740
|
if (a === 0) {
|
|
1741
|
-
const
|
|
1742
|
-
if (
|
|
1743
|
-
const i = we(
|
|
1741
|
+
const d = r.slice(l, t);
|
|
1742
|
+
if (d.trim().length > 0) {
|
|
1743
|
+
const i = we(d, !1, 0);
|
|
1744
1744
|
o.push(...i);
|
|
1745
1745
|
}
|
|
1746
1746
|
o.push({ text: "}", type: "string" }), t++;
|
|
@@ -1774,9 +1774,9 @@ function hr(r) {
|
|
|
1774
1774
|
for (; t < r.length && a > 0; )
|
|
1775
1775
|
r[t] === "{" ? a++ : r[t] === "}" && a--, a > 0 && t++;
|
|
1776
1776
|
if (a === 0) {
|
|
1777
|
-
const
|
|
1778
|
-
if (
|
|
1779
|
-
const i = we(
|
|
1777
|
+
const d = r.slice(l, t);
|
|
1778
|
+
if (d.trim().length > 0) {
|
|
1779
|
+
const i = we(d, !1, 0, !1);
|
|
1780
1780
|
o.push(...i);
|
|
1781
1781
|
}
|
|
1782
1782
|
o.push({ text: "}", type: "string" }), t++;
|
|
@@ -1805,16 +1805,16 @@ function Je(r) {
|
|
|
1805
1805
|
return [{ text: "$(", type: "operator" }, ...Je(l), { text: ")", type: "operator" }];
|
|
1806
1806
|
}
|
|
1807
1807
|
if (/^".*"$/.test(a)) {
|
|
1808
|
-
const l = a.slice(1, -1),
|
|
1808
|
+
const l = a.slice(1, -1), d = [];
|
|
1809
1809
|
let i = 0;
|
|
1810
1810
|
const f = /\$[\w_]+/g;
|
|
1811
1811
|
let u;
|
|
1812
1812
|
for (; (u = f.exec(l)) !== null; )
|
|
1813
|
-
u.index > i &&
|
|
1813
|
+
u.index > i && d.push({
|
|
1814
1814
|
text: l.slice(i, u.index),
|
|
1815
1815
|
type: "string"
|
|
1816
|
-
}),
|
|
1817
|
-
return i < l.length &&
|
|
1816
|
+
}), d.push({ text: u[0], type: "variable" }), i = u.index + u[0].length;
|
|
1817
|
+
return i < l.length && d.push({ text: l.slice(i), type: "string" }), [{ text: '"', type: "string" }, ...d, { text: '"', type: "string" }];
|
|
1818
1818
|
}
|
|
1819
1819
|
return /^'.*'$/.test(a) ? [{ text: a, type: "string" }] : /^\$[\w_]+$/.test(a) ? [{ text: a, type: "variable" }] : /^[a-zA-Z_]\w*=$/.test(a) ? [{ text: a, type: "variable" }] : /^--?[a-zA-Z0-9][\w-]*(=.*)?$/.test(a) ? [{ text: a, type: "option" }] : /^>>|>$/.test(a) ? [{ text: a, type: "operator" }] : /^#.*$/.test(a) ? [{ text: a, type: "comment" }] : /^\s+$/.test(a) ? [{ text: a, type: "plain" }] : fr.has(a) ? [{ text: a, type: "keyword" }] : mr.has(a) ? [{ text: a, type: "runner" }] : [{ text: a, type: "command" }];
|
|
1820
1820
|
};
|
|
@@ -1831,28 +1831,28 @@ function br(r, o = !1) {
|
|
|
1831
1831
|
let n = "selector", a = 0;
|
|
1832
1832
|
r.match(/^\s+/) && r.includes(":") && !r.includes("{") && (n = "property", a = 1);
|
|
1833
1833
|
const l = /(\/\*[\s\S]*?\*\/|\/\*[\s\S]*$|\*\/)|(@[a-zA-Z-]+)|(\{|\}|:|;|,|\(|\))|("(?:[^"]*)"|'(?:[^']*)')|([a-zA-Z-]+)(?=\()|([0-9.]+(?:px|rem|em|%|vh|vw|deg|s|ms|fr)?)|(#[a-fA-F0-9]{3,8})|([a-zA-Z0-9_-]+|[.#][a-zA-Z0-9_-]+)|(\s+)|(\S+)/g;
|
|
1834
|
-
let
|
|
1835
|
-
for (;
|
|
1836
|
-
const [, i, f, u,
|
|
1834
|
+
let d;
|
|
1835
|
+
for (; d = l.exec(r); ) {
|
|
1836
|
+
const [, i, f, u, c, m, p, x, v, b, D] = d;
|
|
1837
1837
|
if (i)
|
|
1838
1838
|
i.includes("/*") && !i.includes("*/") ? s = !0 : i.includes("*/") && (s = !1), t.push({ text: i, type: "comment" });
|
|
1839
1839
|
else if (s)
|
|
1840
|
-
|
|
1840
|
+
d[0].includes("*/") && (s = !1), t.push({ text: d[0], type: "comment" });
|
|
1841
1841
|
else if (f)
|
|
1842
1842
|
t.push({ text: f, type: "atRule" });
|
|
1843
1843
|
else if (m)
|
|
1844
1844
|
t.push({ text: m, type: "function" });
|
|
1845
1845
|
else if (u)
|
|
1846
1846
|
u === "{" ? (a++, n = "property") : u === "}" ? (a--, n = a > 0 ? "property" : "selector") : u === ":" ? n === "property" && (n = "value") : u === ";" ? a > 0 && (n = "property") : u === "," && a === 0 && (n = "selector"), t.push({ text: u, type: "punctuation" });
|
|
1847
|
-
else if (
|
|
1848
|
-
t.push({ text:
|
|
1847
|
+
else if (c)
|
|
1848
|
+
t.push({ text: c, type: "string" });
|
|
1849
1849
|
else if (p)
|
|
1850
1850
|
t.push({ text: p, type: "number" });
|
|
1851
1851
|
else if (x)
|
|
1852
1852
|
t.push({ text: x, type: "value" });
|
|
1853
|
-
else if (
|
|
1853
|
+
else if (v) {
|
|
1854
1854
|
let h;
|
|
1855
|
-
|
|
1855
|
+
v.startsWith(".") || v.startsWith("#") || n === "selector" ? h = "selector" : n === "property" ? h = "property" : h = "value", t.push({ text: v, type: h });
|
|
1856
1856
|
} else if (b)
|
|
1857
1857
|
t.push({ text: b.replace(/ /g, " "), type: "plain" });
|
|
1858
1858
|
else if (D) {
|
|
@@ -1871,7 +1871,7 @@ function gr(r) {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
function we(r, o = !1, t = 0, s = !1) {
|
|
1873
1873
|
const n = [];
|
|
1874
|
-
let a = r, l = o,
|
|
1874
|
+
let a = r, l = o, d = t;
|
|
1875
1875
|
if (s) {
|
|
1876
1876
|
const i = hr(a);
|
|
1877
1877
|
return n.push(...i.tokens), n;
|
|
@@ -1892,9 +1892,9 @@ function we(r, o = !1, t = 0, s = !1) {
|
|
|
1892
1892
|
n.push(...A.tokens), a = a.slice(A.consumed);
|
|
1893
1893
|
continue;
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1896
|
-
if (
|
|
1897
|
-
n.push({ text:
|
|
1895
|
+
const c = a.match(/^("[^"]*"|'[^']*')/);
|
|
1896
|
+
if (c) {
|
|
1897
|
+
n.push({ text: c[0], type: "string" }), a = a.slice(c[0].length);
|
|
1898
1898
|
continue;
|
|
1899
1899
|
}
|
|
1900
1900
|
const m = a.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);
|
|
@@ -1915,13 +1915,13 @@ function we(r, o = !1, t = 0, s = !1) {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
}
|
|
1917
1917
|
const x = a.match(/^([a-zA-Z][a-zA-Z0-9]*)(\s*)(=)/);
|
|
1918
|
-
if (x && l &&
|
|
1918
|
+
if (x && l && d === 0) {
|
|
1919
1919
|
n.push({ text: x[1], type: "jsx-attribute" }), x[2] && n.push({ text: x[2], type: "plain" }), n.push({ text: "=", type: "plain" }), a = a.slice(x[0].length);
|
|
1920
1920
|
continue;
|
|
1921
1921
|
}
|
|
1922
|
-
const
|
|
1923
|
-
if (
|
|
1924
|
-
n.push({ text:
|
|
1922
|
+
const v = a.match(/^[{}]/);
|
|
1923
|
+
if (v) {
|
|
1924
|
+
n.push({ text: v[0], type: "jsx-brace" }), v[0] === "{" ? d++ : v[0] === "}" && d--, a = a.slice(1);
|
|
1925
1925
|
continue;
|
|
1926
1926
|
}
|
|
1927
1927
|
const b = a.match(/^\s+/);
|
|
@@ -1946,9 +1946,9 @@ function we(r, o = !1, t = 0, s = !1) {
|
|
|
1946
1946
|
n.push({ text: g[0], type: "hook" }), a = a.slice(g[0].length);
|
|
1947
1947
|
continue;
|
|
1948
1948
|
}
|
|
1949
|
-
const
|
|
1950
|
-
if (
|
|
1951
|
-
n.push({ text:
|
|
1949
|
+
const y = a.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?=(\?\.)?\()/);
|
|
1950
|
+
if (y) {
|
|
1951
|
+
n.push({ text: y[1], type: "function" }), a = a.slice(y[1].length);
|
|
1952
1952
|
continue;
|
|
1953
1953
|
}
|
|
1954
1954
|
const F = a.match(
|
|
@@ -2021,15 +2021,15 @@ function yr(r, o) {
|
|
|
2021
2021
|
};
|
|
2022
2022
|
return r.map((s, n) => {
|
|
2023
2023
|
const a = Je(s);
|
|
2024
|
-
return /* @__PURE__ */ e("div", { className: "leading-6", children: a.map((l,
|
|
2024
|
+
return /* @__PURE__ */ e("div", { className: "leading-6", children: a.map((l, d) => /* @__PURE__ */ e("span", { className: t[l.type] || "text-gray-100", children: l.text }, d)) }, n);
|
|
2025
2025
|
});
|
|
2026
2026
|
}
|
|
2027
2027
|
function vr(r, o) {
|
|
2028
2028
|
const t = { ...ir, ...o };
|
|
2029
2029
|
let s = !1;
|
|
2030
2030
|
return r.map((n, a) => {
|
|
2031
|
-
const { tokens: l, inComment:
|
|
2032
|
-
return s =
|
|
2031
|
+
const { tokens: l, inComment: d } = br(n, s);
|
|
2032
|
+
return s = d, /* @__PURE__ */ e("div", { className: "leading-6", children: l.map((i, f) => /* @__PURE__ */ e("span", { className: t[i.type] || "text-gray-100", children: i.text }, f)) }, a);
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
2035
|
function wr(r, o) {
|
|
@@ -2039,20 +2039,20 @@ function wr(r, o) {
|
|
|
2039
2039
|
function kr(r, o) {
|
|
2040
2040
|
const t = { ...ur, ...o };
|
|
2041
2041
|
let s = !1, n = 0, a = !1;
|
|
2042
|
-
return r.map((l,
|
|
2042
|
+
return r.map((l, d) => {
|
|
2043
2043
|
if (l.trim() === "")
|
|
2044
|
-
return /* @__PURE__ */ e("div", { className: "leading-6", children: " " },
|
|
2044
|
+
return /* @__PURE__ */ e("div", { className: "leading-6", children: " " }, d);
|
|
2045
2045
|
const i = we(l, s, n, a);
|
|
2046
2046
|
(l.match(/`/g) || []).length % 2 === 1 && (a = !a), l.includes("<") && l.match(/<[a-zA-Z]/) && (s = !0), l.includes(">") && !l.includes("<") && (s = !1, n = 0);
|
|
2047
|
-
const u = (l.match(/\{/g) || []).length,
|
|
2048
|
-
return n += u -
|
|
2047
|
+
const u = (l.match(/\{/g) || []).length, c = (l.match(/\}/g) || []).length;
|
|
2048
|
+
return n += u - c, n < 0 && (n = 0), /* @__PURE__ */ e("div", { className: "leading-6", children: i.map((m, p) => /* @__PURE__ */ e(
|
|
2049
2049
|
"span",
|
|
2050
2050
|
{
|
|
2051
2051
|
className: t[m.type] || "text-gray-100",
|
|
2052
2052
|
children: m.text
|
|
2053
2053
|
},
|
|
2054
2054
|
p
|
|
2055
|
-
)) },
|
|
2055
|
+
)) }, d);
|
|
2056
2056
|
});
|
|
2057
2057
|
}
|
|
2058
2058
|
function Nr(r, o) {
|
|
@@ -2115,7 +2115,7 @@ function Fr(r) {
|
|
|
2115
2115
|
return "txt";
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function ca({
|
|
2119
2119
|
code: r,
|
|
2120
2120
|
language: o = "typescript",
|
|
2121
2121
|
allowCopy: t = !0,
|
|
@@ -2123,22 +2123,22 @@ function da({
|
|
|
2123
2123
|
allowFullscreen: n = !1,
|
|
2124
2124
|
filename: a,
|
|
2125
2125
|
showTrafficLights: l = !0,
|
|
2126
|
-
showLineNumbers:
|
|
2126
|
+
showLineNumbers: d = !1,
|
|
2127
2127
|
hideHeader: i = !1,
|
|
2128
2128
|
hideFiletype: f = !1,
|
|
2129
2129
|
maxHeight: u,
|
|
2130
|
-
tokenClasses:
|
|
2130
|
+
tokenClasses: c,
|
|
2131
2131
|
className: m,
|
|
2132
2132
|
id: p,
|
|
2133
2133
|
ref: x,
|
|
2134
|
-
...
|
|
2134
|
+
...v
|
|
2135
2135
|
}) {
|
|
2136
|
-
const [b, D] = R(!1), { containerRef: h } = Cr(b, D), { copied: g, handleCopy:
|
|
2136
|
+
const [b, D] = R(!1), { containerRef: h } = Cr(b, D), { copied: g, handleCopy: y } = Dr(r), F = $(() => {
|
|
2137
2137
|
const I = a || `code.${Fr(o)}`;
|
|
2138
2138
|
Ct(r, I);
|
|
2139
2139
|
}, [r, a, o]), B = $(() => {
|
|
2140
2140
|
D((I) => !I);
|
|
2141
|
-
}, []), { handleKeyDown: N } = Er(t, n,
|
|
2141
|
+
}, []), { handleKeyDown: N } = Er(t, n, y, B), A = ne(() => r.split(`
|
|
2142
2142
|
`), [r]), E = $(
|
|
2143
2143
|
(I = !0) => /* @__PURE__ */ w("div", { className: k("flex items-center space-x-2", !I && "absolute top-2 right-2 z-10"), children: [
|
|
2144
2144
|
!f && /* @__PURE__ */ e(
|
|
@@ -2175,7 +2175,7 @@ function da({
|
|
|
2175
2175
|
t && /* @__PURE__ */ e(
|
|
2176
2176
|
"button",
|
|
2177
2177
|
{
|
|
2178
|
-
onClick:
|
|
2178
|
+
onClick: y,
|
|
2179
2179
|
className: "p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5",
|
|
2180
2180
|
title: g ? "Code copied!" : "Copy code",
|
|
2181
2181
|
"aria-label": g ? "Code copied to clipboard" : "Copy code to clipboard",
|
|
@@ -2193,13 +2193,13 @@ function da({
|
|
|
2193
2193
|
s,
|
|
2194
2194
|
F,
|
|
2195
2195
|
t,
|
|
2196
|
-
|
|
2196
|
+
y,
|
|
2197
2197
|
g,
|
|
2198
2198
|
B
|
|
2199
2199
|
]
|
|
2200
|
-
), C = ne(() => o === "json" ? wr(A,
|
|
2200
|
+
), C = ne(() => o === "json" ? wr(A, c) : o === "tsx" || o === "ts" || o === "typescript" ? kr(A, c) : o === "bash" || o === "sh" ? yr(A, c) : o === "css" ? vr(A, c) : o === "markdown" || o === "md" ? Nr(A, c) : [
|
|
2201
2201
|
/* @__PURE__ */ e("span", { className: "text-gray-400", children: "Unsupported language" }, 0)
|
|
2202
|
-
], [A,
|
|
2202
|
+
], [A, c, o]), z = ne(() => d ? A.map((I, G) => /* @__PURE__ */ e(
|
|
2203
2203
|
"div",
|
|
2204
2204
|
{
|
|
2205
2205
|
className: "text-gray-500 text-right pl-3 pr-1 select-none min-w-8 text-sm font-mono leading-6",
|
|
@@ -2208,7 +2208,7 @@ function da({
|
|
|
2208
2208
|
children: G + 1
|
|
2209
2209
|
},
|
|
2210
2210
|
G
|
|
2211
|
-
)) : null, [
|
|
2211
|
+
)) : null, [d, A]), T = ne(
|
|
2212
2212
|
() => ({
|
|
2213
2213
|
maxHeight: u && !b ? `${u}px` : b ? i ? "calc(100vh - 5px)" : "calc(100vh - 45px)" : void 0,
|
|
2214
2214
|
overflow: u || b ? "auto" : "visible"
|
|
@@ -2231,12 +2231,12 @@ function da({
|
|
|
2231
2231
|
"data-fullscreen": b,
|
|
2232
2232
|
role: "region",
|
|
2233
2233
|
"aria-label": `Code block${a ? ` for ${a}` : ""} in ${o}`,
|
|
2234
|
-
"aria-describedby":
|
|
2234
|
+
"aria-describedby": d ? `${p}-description` : void 0,
|
|
2235
2235
|
tabIndex: 0,
|
|
2236
2236
|
onKeyDown: N,
|
|
2237
|
-
...
|
|
2237
|
+
...v,
|
|
2238
2238
|
children: [
|
|
2239
|
-
|
|
2239
|
+
d && /* @__PURE__ */ w("div", { id: `${p}-description`, className: "sr-only", children: [
|
|
2240
2240
|
"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.",
|
|
2241
2241
|
n && " Press F to toggle fullscreen."
|
|
2242
2242
|
] }),
|
|
@@ -2255,7 +2255,7 @@ function da({
|
|
|
2255
2255
|
/* @__PURE__ */ w("div", { className: k("flex overflow-hidden", i && "relative"), style: T, children: [
|
|
2256
2256
|
i && E(!1),
|
|
2257
2257
|
/* @__PURE__ */ e("div", { className: "flex-1 overflow-x-auto", children: /* @__PURE__ */ w("div", { className: "flex", children: [
|
|
2258
|
-
|
|
2258
|
+
d && /* @__PURE__ */ e(
|
|
2259
2259
|
"div",
|
|
2260
2260
|
{
|
|
2261
2261
|
className: "bg-gray-800 py-4 border-r border-gray-700 flex flex-col flex-shrink-0",
|
|
@@ -2297,7 +2297,7 @@ function da({
|
|
|
2297
2297
|
)
|
|
2298
2298
|
] });
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function da({
|
|
2301
2301
|
children: r,
|
|
2302
2302
|
label: o,
|
|
2303
2303
|
isOpen: t,
|
|
@@ -2305,15 +2305,15 @@ function ua({
|
|
|
2305
2305
|
id: n,
|
|
2306
2306
|
ref: a,
|
|
2307
2307
|
disabled: l = !1,
|
|
2308
|
-
className:
|
|
2308
|
+
className: d,
|
|
2309
2309
|
buttonClassName: i
|
|
2310
2310
|
}) {
|
|
2311
|
-
const f = J(), u = n ?? f, [
|
|
2312
|
-
l || (t === void 0 && m((
|
|
2311
|
+
const f = J(), u = n ?? f, [c, m] = R(!1), p = t !== void 0 ? t : c, x = () => {
|
|
2312
|
+
l || (t === void 0 && m((v) => !v), s == null || s(!p));
|
|
2313
2313
|
};
|
|
2314
2314
|
return V(() => {
|
|
2315
2315
|
m(t ?? !1);
|
|
2316
|
-
}, [t]), /* @__PURE__ */ w("div", { ref: a, id: u, "data-open": p, className: k("overflow-hidden",
|
|
2316
|
+
}, [t]), /* @__PURE__ */ w("div", { ref: a, id: u, "data-open": p, className: k("overflow-hidden", d), children: [
|
|
2317
2317
|
/* @__PURE__ */ e(
|
|
2318
2318
|
"button",
|
|
2319
2319
|
{
|
|
@@ -2328,8 +2328,8 @@ function ua({
|
|
|
2328
2328
|
i
|
|
2329
2329
|
),
|
|
2330
2330
|
onClick: x,
|
|
2331
|
-
onKeyDown: (
|
|
2332
|
-
(
|
|
2331
|
+
onKeyDown: (v) => {
|
|
2332
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), x());
|
|
2333
2333
|
},
|
|
2334
2334
|
"data-open": p,
|
|
2335
2335
|
"data-label": typeof o == "string" ? o : void 0,
|
|
@@ -2361,41 +2361,41 @@ function Ar({
|
|
|
2361
2361
|
onClose: o,
|
|
2362
2362
|
enabled: t = !0
|
|
2363
2363
|
}) {
|
|
2364
|
-
const [s, n] = R(!1), [a, l] = R(0), [
|
|
2365
|
-
!t || !r || (n(!0), i(
|
|
2366
|
-
}, [t, r]), u = $((
|
|
2364
|
+
const [s, n] = R(!1), [a, l] = R(0), [d, i] = R(0), f = $((y) => {
|
|
2365
|
+
!t || !r || (n(!0), i(y), document.body.style.userSelect = "none");
|
|
2366
|
+
}, [t, r]), u = $((y) => {
|
|
2367
2367
|
if (!s || !t) return;
|
|
2368
|
-
const F =
|
|
2368
|
+
const F = y - d, B = Math.max(0, F);
|
|
2369
2369
|
l(B);
|
|
2370
|
-
}, [s, t,
|
|
2370
|
+
}, [s, t, d]), c = $(() => {
|
|
2371
2371
|
if (!s || !t) return;
|
|
2372
2372
|
n(!1), document.body.style.userSelect = "", a > 100 && o(), l(0);
|
|
2373
|
-
}, [s, t, a, o]), m = $((
|
|
2374
|
-
|
|
2375
|
-
}, [f]), p = $((
|
|
2376
|
-
u(
|
|
2373
|
+
}, [s, t, a, o]), m = $((y) => {
|
|
2374
|
+
y.preventDefault(), f(y.clientY);
|
|
2375
|
+
}, [f]), p = $((y) => {
|
|
2376
|
+
u(y.clientY);
|
|
2377
2377
|
}, [u]), x = $(() => {
|
|
2378
|
-
|
|
2379
|
-
}, [
|
|
2380
|
-
|
|
2381
|
-
}, [f]), b = $((
|
|
2382
|
-
|
|
2378
|
+
c();
|
|
2379
|
+
}, [c]), v = $((y) => {
|
|
2380
|
+
y.preventDefault(), f(y.touches[0].clientY);
|
|
2381
|
+
}, [f]), b = $((y) => {
|
|
2382
|
+
y.preventDefault(), u(y.touches[0].clientY);
|
|
2383
2383
|
}, [u]), D = $(() => {
|
|
2384
|
-
|
|
2385
|
-
}, [
|
|
2384
|
+
c();
|
|
2385
|
+
}, [c]);
|
|
2386
2386
|
V(() => {
|
|
2387
2387
|
if (s)
|
|
2388
2388
|
return document.addEventListener("mousemove", p), document.addEventListener("mouseup", x), document.addEventListener("touchmove", b, { passive: !1 }), document.addEventListener("touchend", D), () => {
|
|
2389
2389
|
document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", x), document.removeEventListener("touchmove", b), document.removeEventListener("touchend", D);
|
|
2390
2390
|
};
|
|
2391
2391
|
}, [s, p, x, b, D]);
|
|
2392
|
-
const h = $((
|
|
2393
|
-
t && (
|
|
2392
|
+
const h = $((y) => {
|
|
2393
|
+
t && (y.key === "ArrowDown" || y.key === "Escape") && (y.preventDefault(), o());
|
|
2394
2394
|
}, [t, o]);
|
|
2395
2395
|
return {
|
|
2396
2396
|
dragHandlers: t ? {
|
|
2397
2397
|
onMouseDown: m,
|
|
2398
|
-
onTouchStart:
|
|
2398
|
+
onTouchStart: v,
|
|
2399
2399
|
onKeyDown: h
|
|
2400
2400
|
} : {},
|
|
2401
2401
|
translateY: a,
|
|
@@ -2413,9 +2413,9 @@ function Ir(r, o) {
|
|
|
2413
2413
|
if (a.key !== "Tab") return;
|
|
2414
2414
|
const l = document.getElementById(r);
|
|
2415
2415
|
if (!l) return;
|
|
2416
|
-
const
|
|
2416
|
+
const d = l.querySelectorAll(
|
|
2417
2417
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2418
|
-
), i =
|
|
2418
|
+
), i = d[0], f = d[d.length - 1];
|
|
2419
2419
|
a.shiftKey && document.activeElement === i ? (a.preventDefault(), f == null || f.focus()) : !a.shiftKey && document.activeElement === f && (a.preventDefault(), i == null || i.focus());
|
|
2420
2420
|
};
|
|
2421
2421
|
return document.addEventListener("keydown", n), () => {
|
|
@@ -2436,7 +2436,7 @@ function $r(r, o) {
|
|
|
2436
2436
|
};
|
|
2437
2437
|
}, [r, o]);
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function ua({
|
|
2440
2440
|
ref: r,
|
|
2441
2441
|
id: o,
|
|
2442
2442
|
isOpen: t,
|
|
@@ -2444,25 +2444,25 @@ function fa({
|
|
|
2444
2444
|
title: n,
|
|
2445
2445
|
children: a,
|
|
2446
2446
|
footer: l,
|
|
2447
|
-
className:
|
|
2447
|
+
className: d,
|
|
2448
2448
|
overlayClassName: i,
|
|
2449
2449
|
showCloseButton: f = !1,
|
|
2450
2450
|
disableCloseOnOverlayClick: u = !1,
|
|
2451
|
-
enableDragGestures:
|
|
2451
|
+
enableDragGestures: c = !0,
|
|
2452
2452
|
ariaLabelledBy: m,
|
|
2453
2453
|
ariaDescribedBy: p
|
|
2454
2454
|
}) {
|
|
2455
|
-
const x = J(),
|
|
2455
|
+
const x = J(), v = o || `drawer-${x}`, b = `${x}-title`, { show: D, shouldRender: h } = Sr(t), { dragHandlers: g, translateY: y, isDragging: F } = Ar({
|
|
2456
2456
|
isOpen: t,
|
|
2457
2457
|
onClose: s,
|
|
2458
|
-
enabled:
|
|
2458
|
+
enabled: c
|
|
2459
2459
|
});
|
|
2460
|
-
if (Ir(
|
|
2461
|
-
const B = () => n ?
|
|
2460
|
+
if (Ir(v, h), $r(h, s), !h) return null;
|
|
2461
|
+
const B = () => n ? Z.isValidElement(n) ? /* @__PURE__ */ e("div", { children: n }) : /* @__PURE__ */ e("h2", { className: "text-2xl font-semibold", id: b, children: n }) : null, N = () => {
|
|
2462
2462
|
if (!l) return null;
|
|
2463
|
-
if (
|
|
2463
|
+
if (Z.isValidElement(l)) {
|
|
2464
2464
|
const A = l, E = A.props.className || "";
|
|
2465
|
-
return
|
|
2465
|
+
return Z.cloneElement(A, { className: k("px-6 py-4", E) });
|
|
2466
2466
|
}
|
|
2467
2467
|
return /* @__PURE__ */ e("div", { className: "px-6 py-4", children: l });
|
|
2468
2468
|
};
|
|
@@ -2493,36 +2493,36 @@ function fa({
|
|
|
2493
2493
|
/* @__PURE__ */ e("div", { className: "fixed inset-x-0 bottom-0 flex max-h-full", children: /* @__PURE__ */ e(
|
|
2494
2494
|
"div",
|
|
2495
2495
|
{
|
|
2496
|
-
id:
|
|
2496
|
+
id: v,
|
|
2497
2497
|
ref: r,
|
|
2498
2498
|
tabIndex: -1,
|
|
2499
2499
|
className: k(
|
|
2500
2500
|
"relative w-screen transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out border-t border-border rounded-t-lg",
|
|
2501
2501
|
D ? "translate-y-0" : "translate-y-full",
|
|
2502
|
-
|
|
2502
|
+
d
|
|
2503
2503
|
),
|
|
2504
2504
|
style: {
|
|
2505
|
-
transform:
|
|
2506
|
-
transition:
|
|
2505
|
+
transform: c && y !== 0 ? `translateY(${y}px)` : void 0,
|
|
2506
|
+
transition: y !== 0 ? "none" : void 0
|
|
2507
2507
|
},
|
|
2508
2508
|
children: /* @__PURE__ */ w("div", { className: "flex h-full flex-col", children: [
|
|
2509
|
-
|
|
2509
|
+
c && /* @__PURE__ */ e(
|
|
2510
2510
|
"div",
|
|
2511
2511
|
{
|
|
2512
2512
|
className: k(
|
|
2513
2513
|
"flex justify-center pt-3 pb-2 cursor-grab active:cursor-grabbing",
|
|
2514
|
-
|
|
2514
|
+
c && "select-none"
|
|
2515
2515
|
),
|
|
2516
2516
|
...g,
|
|
2517
|
-
role:
|
|
2518
|
-
tabIndex:
|
|
2519
|
-
"aria-label":
|
|
2517
|
+
role: c ? "button" : void 0,
|
|
2518
|
+
tabIndex: c ? 0 : void 0,
|
|
2519
|
+
"aria-label": c ? "Drag to resize drawer" : void 0,
|
|
2520
2520
|
children: /* @__PURE__ */ e(
|
|
2521
2521
|
"div",
|
|
2522
2522
|
{
|
|
2523
2523
|
className: k(
|
|
2524
2524
|
"w-12 h-1.5 bg-popover-foreground/25 rounded-full transition-colors",
|
|
2525
|
-
|
|
2525
|
+
c && "hover:bg-popover-foreground/50",
|
|
2526
2526
|
F && "bg-popover-foreground/50"
|
|
2527
2527
|
)
|
|
2528
2528
|
}
|
|
@@ -2572,22 +2572,22 @@ function Mr({
|
|
|
2572
2572
|
triggerRef: n,
|
|
2573
2573
|
popoverRef: a
|
|
2574
2574
|
}) {
|
|
2575
|
-
const [l,
|
|
2575
|
+
const [l, d] = R(t);
|
|
2576
2576
|
return V(() => {
|
|
2577
2577
|
if (!r || !o) return;
|
|
2578
2578
|
const i = () => {
|
|
2579
2579
|
if (!n.current || !a.current) return;
|
|
2580
|
-
const
|
|
2581
|
-
let
|
|
2580
|
+
const c = n.current.getBoundingClientRect(), m = a.current.getBoundingClientRect(), p = window.innerWidth, x = window.innerHeight;
|
|
2581
|
+
let v = t;
|
|
2582
2582
|
const b = zr(t);
|
|
2583
2583
|
if (t === "top" || t === "bottom") {
|
|
2584
|
-
const D = t === "top" ?
|
|
2585
|
-
!D && h && (
|
|
2584
|
+
const D = t === "top" ? c.top >= m.height + s : x - c.bottom >= m.height + s, h = b === "top" ? c.top >= m.height + s : x - c.bottom >= m.height + s;
|
|
2585
|
+
!D && h && (v = b);
|
|
2586
2586
|
} else {
|
|
2587
|
-
const D = t === "left" ?
|
|
2588
|
-
!D && h && (
|
|
2587
|
+
const D = t === "left" ? c.left >= m.width + s : p - c.right >= m.width + s, h = b === "left" ? c.left >= m.width + s : p - c.right >= m.width + s;
|
|
2588
|
+
!D && h && (v = b);
|
|
2589
2589
|
}
|
|
2590
|
-
|
|
2590
|
+
d(v);
|
|
2591
2591
|
};
|
|
2592
2592
|
i();
|
|
2593
2593
|
const f = () => i();
|
|
@@ -2642,39 +2642,39 @@ function Rr({
|
|
|
2642
2642
|
children: n,
|
|
2643
2643
|
className: a,
|
|
2644
2644
|
closeOnOverlayClick: l = !0,
|
|
2645
|
-
trigger:
|
|
2645
|
+
trigger: d,
|
|
2646
2646
|
placement: i = "bottom",
|
|
2647
2647
|
alignment: f = "center",
|
|
2648
2648
|
closeOnTriggerClick: u = !0,
|
|
2649
|
-
offset:
|
|
2649
|
+
offset: c = 8,
|
|
2650
2650
|
autoSwitchPlacement: m = !0,
|
|
2651
2651
|
hoverable: p = !1
|
|
2652
2652
|
}) {
|
|
2653
|
-
const [x,
|
|
2653
|
+
const [x, v] = R(t ?? !1), b = q(null), D = q(null), h = q(null), g = J(), y = q(null), F = Mr({
|
|
2654
2654
|
internalIsOpen: x,
|
|
2655
2655
|
autoSwitchPlacement: m,
|
|
2656
2656
|
placement: i,
|
|
2657
|
-
offset:
|
|
2657
|
+
offset: c,
|
|
2658
2658
|
triggerRef: D,
|
|
2659
2659
|
popoverRef: b
|
|
2660
2660
|
}), B = $(
|
|
2661
2661
|
(T) => {
|
|
2662
|
-
s && s(T), t === void 0 &&
|
|
2662
|
+
s && s(T), t === void 0 && v(T);
|
|
2663
2663
|
},
|
|
2664
2664
|
[t, s]
|
|
2665
2665
|
), N = $(() => {
|
|
2666
|
-
|
|
2666
|
+
y.current && (clearTimeout(y.current), y.current = null);
|
|
2667
2667
|
}, []), A = $(() => {
|
|
2668
2668
|
p && (N(), B(!0));
|
|
2669
2669
|
}, [p, N, B]), E = $(() => {
|
|
2670
|
-
p && (N(),
|
|
2670
|
+
p && (N(), y.current = setTimeout(() => {
|
|
2671
2671
|
B(!1);
|
|
2672
2672
|
}, 200));
|
|
2673
2673
|
}, [p, N, B]);
|
|
2674
2674
|
V(() => {
|
|
2675
|
-
t !== void 0 &&
|
|
2675
|
+
t !== void 0 && v(t);
|
|
2676
2676
|
}, [t]), V(() => () => {
|
|
2677
|
-
|
|
2677
|
+
y.current && clearTimeout(y.current);
|
|
2678
2678
|
}, []), V(() => {
|
|
2679
2679
|
if (!x) return;
|
|
2680
2680
|
const T = (M) => {
|
|
@@ -2692,7 +2692,7 @@ function Rr({
|
|
|
2692
2692
|
var T, M;
|
|
2693
2693
|
x ? (h.current = document.activeElement, (T = b.current) == null || T.focus()) : ((M = h.current) == null || M.focus(), h.current = null);
|
|
2694
2694
|
}, [x]);
|
|
2695
|
-
const C =
|
|
2695
|
+
const C = d.props, z = Z.cloneElement(d, {
|
|
2696
2696
|
"aria-expanded": x,
|
|
2697
2697
|
"aria-haspopup": "dialog",
|
|
2698
2698
|
"aria-controls": g,
|
|
@@ -2726,7 +2726,7 @@ function Rr({
|
|
|
2726
2726
|
Tr[F][f],
|
|
2727
2727
|
a
|
|
2728
2728
|
),
|
|
2729
|
-
style: Br(F,
|
|
2729
|
+
style: Br(F, c),
|
|
2730
2730
|
role: "dialog",
|
|
2731
2731
|
"aria-modal": "true",
|
|
2732
2732
|
tabIndex: -1,
|
|
@@ -2766,13 +2766,13 @@ function Xe({ option: r, ...o }) {
|
|
|
2766
2766
|
);
|
|
2767
2767
|
}
|
|
2768
2768
|
function Lr({ option: r, level: o, index: t }) {
|
|
2769
|
-
const { focus: s, setFocus: n } = Me(), [a, l] = R(!1), [
|
|
2769
|
+
const { focus: s, setFocus: n } = Me(), [a, l] = R(!1), [d, i] = R(!1), f = q(null), u = q(void 0), c = J(), m = () => {
|
|
2770
2770
|
r.disabled || (n({ level: o, index: t }), x());
|
|
2771
2771
|
}, p = () => {
|
|
2772
|
-
n(null),
|
|
2772
|
+
n(null), v();
|
|
2773
2773
|
}, x = () => {
|
|
2774
2774
|
l(!0);
|
|
2775
|
-
},
|
|
2775
|
+
}, v = () => {
|
|
2776
2776
|
l(!1);
|
|
2777
2777
|
}, b = (g) => {
|
|
2778
2778
|
if (g.key === "ArrowRight") {
|
|
@@ -2781,10 +2781,10 @@ function Lr({ option: r, level: o, index: t }) {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
};
|
|
2783
2783
|
V(() => {
|
|
2784
|
-
const g = s == null ? void 0 : s.level,
|
|
2785
|
-
g &&
|
|
2784
|
+
const g = s == null ? void 0 : s.level, y = u.current, F = o + 1;
|
|
2785
|
+
g && y && y === F && g === y - 1 ? i(!0) : i(!1), u.current = g;
|
|
2786
2786
|
}, [s, o]);
|
|
2787
|
-
const D = r.subItems !== void 0 && r.subItems.length > 0, h = a && !
|
|
2787
|
+
const D = r.subItems !== void 0 && r.subItems.length > 0, h = a && !d && D;
|
|
2788
2788
|
return /* @__PURE__ */ w(
|
|
2789
2789
|
"div",
|
|
2790
2790
|
{
|
|
@@ -2793,7 +2793,7 @@ function Lr({ option: r, level: o, index: t }) {
|
|
|
2793
2793
|
onMouseEnter: m,
|
|
2794
2794
|
onMouseLeave: p,
|
|
2795
2795
|
onFocus: x,
|
|
2796
|
-
onBlur:
|
|
2796
|
+
onBlur: v,
|
|
2797
2797
|
onKeyDown: b,
|
|
2798
2798
|
tabIndex: 0,
|
|
2799
2799
|
"data-menu-item": r.value,
|
|
@@ -2803,10 +2803,10 @@ function Lr({ option: r, level: o, index: t }) {
|
|
|
2803
2803
|
"aria-expanded": h ? "true" : "false",
|
|
2804
2804
|
"aria-disabled": r.disabled ? "true" : void 0,
|
|
2805
2805
|
"aria-label": r.label,
|
|
2806
|
-
"aria-controls": h ?
|
|
2806
|
+
"aria-controls": h ? c : void 0,
|
|
2807
2807
|
children: [
|
|
2808
2808
|
/* @__PURE__ */ e(Xe, { option: r }),
|
|
2809
|
-
h && /* @__PURE__ */ e("div", { className: "absolute left-full top-0 z-30", children: /* @__PURE__ */ e(Oe, { items: r.subItems ?? [], level: o + 1, id:
|
|
2809
|
+
h && /* @__PURE__ */ e("div", { className: "absolute left-full top-0 z-30", children: /* @__PURE__ */ e(Oe, { items: r.subItems ?? [], level: o + 1, id: c }) })
|
|
2810
2810
|
]
|
|
2811
2811
|
}
|
|
2812
2812
|
);
|
|
@@ -2814,20 +2814,20 @@ function Lr({ option: r, level: o, index: t }) {
|
|
|
2814
2814
|
function Oe({ items: r, level: o, id: t }) {
|
|
2815
2815
|
const { setFocus: s, className: n = "" } = Me();
|
|
2816
2816
|
let a = 0;
|
|
2817
|
-
const l = (
|
|
2818
|
-
switch (
|
|
2817
|
+
const l = (d, i) => {
|
|
2818
|
+
switch (d.__type) {
|
|
2819
2819
|
case "option":
|
|
2820
|
-
return
|
|
2820
|
+
return d.subItems && d.subItems.length > 0 ? /* @__PURE__ */ e(Lr, { option: d, level: o, index: a++ }, i) : /* @__PURE__ */ e(
|
|
2821
2821
|
Xe,
|
|
2822
2822
|
{
|
|
2823
|
-
option:
|
|
2824
|
-
"data-menu-item":
|
|
2823
|
+
option: d,
|
|
2824
|
+
"data-menu-item": d.value,
|
|
2825
2825
|
"data-level": o,
|
|
2826
2826
|
"data-index": a++,
|
|
2827
2827
|
tabIndex: -1,
|
|
2828
|
-
"aria-disabled":
|
|
2828
|
+
"aria-disabled": d.disabled ? "true" : void 0,
|
|
2829
2829
|
onMouseEnter: (f) => {
|
|
2830
|
-
if (f.preventDefault(),
|
|
2830
|
+
if (f.preventDefault(), d.disabled) return;
|
|
2831
2831
|
const u = Number(f.currentTarget.getAttribute("data-index"));
|
|
2832
2832
|
s({ level: o, index: u });
|
|
2833
2833
|
},
|
|
@@ -2839,13 +2839,13 @@ function Oe({ items: r, level: o, id: t }) {
|
|
|
2839
2839
|
);
|
|
2840
2840
|
case "group":
|
|
2841
2841
|
return /* @__PURE__ */ w("div", { children: [
|
|
2842
|
-
|
|
2843
|
-
|
|
2842
|
+
d.title && /* @__PURE__ */ e("div", { className: "px-3 py-2 text-xs font-semibold text-popover-foreground/50 uppercase", children: d.title }),
|
|
2843
|
+
d.items.map((f, u) => l(f, `${i}-${u}`))
|
|
2844
2844
|
] }, i);
|
|
2845
2845
|
case "separator":
|
|
2846
2846
|
return /* @__PURE__ */ e("div", { "aria-hidden": !0, className: "my-1 mx-2 border-t border-popover-foreground/20" }, i);
|
|
2847
2847
|
case "custom":
|
|
2848
|
-
return /* @__PURE__ */ e("div", { children:
|
|
2848
|
+
return /* @__PURE__ */ e("div", { children: d.render() }, i);
|
|
2849
2849
|
default:
|
|
2850
2850
|
return null;
|
|
2851
2851
|
}
|
|
@@ -2863,7 +2863,7 @@ function Oe({ items: r, level: o, id: t }) {
|
|
|
2863
2863
|
"data-menu": !0,
|
|
2864
2864
|
role: "menu",
|
|
2865
2865
|
"aria-label": `Dropdown menu level ${o}`,
|
|
2866
|
-
children: r.map((
|
|
2866
|
+
children: r.map((d, i) => l(d, String(i)))
|
|
2867
2867
|
}
|
|
2868
2868
|
);
|
|
2869
2869
|
}
|
|
@@ -2891,43 +2891,43 @@ function jr(r, o) {
|
|
|
2891
2891
|
function Wr({ dropdownId: r, focus: o, setFocus: t, isOpen: s, onClose: n }) {
|
|
2892
2892
|
const a = $(
|
|
2893
2893
|
(l) => {
|
|
2894
|
-
var
|
|
2894
|
+
var c;
|
|
2895
2895
|
if (!s) return;
|
|
2896
|
-
const { level:
|
|
2896
|
+
const { level: d, index: i } = o || { level: 1, index: null }, f = document.querySelector(`#${r} [data-menu][data-level="${d}"]`);
|
|
2897
2897
|
if (!f) return;
|
|
2898
|
-
const u = Vr(f,
|
|
2898
|
+
const u = Vr(f, d);
|
|
2899
2899
|
if (u.length !== 0)
|
|
2900
2900
|
switch (l.key) {
|
|
2901
2901
|
case "ArrowDown": {
|
|
2902
2902
|
l.preventDefault();
|
|
2903
2903
|
const m = Gr(u, i);
|
|
2904
2904
|
if (m === -1) return;
|
|
2905
|
-
t({ level:
|
|
2905
|
+
t({ level: d, index: m });
|
|
2906
2906
|
break;
|
|
2907
2907
|
}
|
|
2908
2908
|
case "ArrowUp": {
|
|
2909
2909
|
l.preventDefault();
|
|
2910
2910
|
const m = jr(u, i);
|
|
2911
2911
|
if (m === -1) return;
|
|
2912
|
-
t({ level:
|
|
2912
|
+
t({ level: d, index: m });
|
|
2913
2913
|
break;
|
|
2914
2914
|
}
|
|
2915
2915
|
case "ArrowRight": {
|
|
2916
2916
|
if (l.preventDefault(), i !== null) {
|
|
2917
2917
|
const p = u[i].querySelector("[data-menu]");
|
|
2918
|
-
p && p.querySelector("[data-menu-item]") && t({ level:
|
|
2918
|
+
p && p.querySelector("[data-menu-item]") && t({ level: d + 1, index: 0 });
|
|
2919
2919
|
}
|
|
2920
2920
|
break;
|
|
2921
2921
|
}
|
|
2922
2922
|
case "ArrowLeft": {
|
|
2923
2923
|
l.preventDefault();
|
|
2924
|
-
const m = (
|
|
2924
|
+
const m = (c = f.parentElement) == null ? void 0 : c.closest("[data-menu-item]");
|
|
2925
2925
|
if (!m) {
|
|
2926
|
-
console.error(`No parent menu found leaving menu level ${
|
|
2926
|
+
console.error(`No parent menu found leaving menu level ${d}`);
|
|
2927
2927
|
return;
|
|
2928
2928
|
}
|
|
2929
2929
|
const p = m.getAttribute("data-index") ? Number(m.getAttribute("data-index")) : -1;
|
|
2930
|
-
m && t({ level:
|
|
2930
|
+
m && t({ level: d - 1, index: p === -1 ? 0 : p });
|
|
2931
2931
|
break;
|
|
2932
2932
|
}
|
|
2933
2933
|
case "Enter": {
|
|
@@ -2961,7 +2961,7 @@ function _r(r, o, t) {
|
|
|
2961
2961
|
`#${r} [data-menu-item][data-level="${o}"][data-index="${t}"]`
|
|
2962
2962
|
);
|
|
2963
2963
|
}
|
|
2964
|
-
function
|
|
2964
|
+
function fa({
|
|
2965
2965
|
id: r,
|
|
2966
2966
|
items: o,
|
|
2967
2967
|
onItemSelect: t,
|
|
@@ -2969,25 +2969,25 @@ function ma({
|
|
|
2969
2969
|
isOpen: n,
|
|
2970
2970
|
placement: a = "bottom",
|
|
2971
2971
|
alignment: l = "start",
|
|
2972
|
-
onOpenChange:
|
|
2972
|
+
onOpenChange: d,
|
|
2973
2973
|
className: i = "",
|
|
2974
2974
|
...f
|
|
2975
2975
|
}) {
|
|
2976
|
-
const u = J(),
|
|
2977
|
-
p(null),
|
|
2976
|
+
const u = J(), c = r || `dropdown-menu-${u}`, [m, p] = R(null), [x, v] = R(!1), b = n === void 0, D = b ? x : n, h = $(() => {
|
|
2977
|
+
p(null), v(!1);
|
|
2978
2978
|
}, []), g = $(
|
|
2979
2979
|
(N) => {
|
|
2980
2980
|
t && t(N), h();
|
|
2981
2981
|
},
|
|
2982
2982
|
[t, h]
|
|
2983
|
-
),
|
|
2983
|
+
), y = $(
|
|
2984
2984
|
(N) => {
|
|
2985
|
-
b &&
|
|
2985
|
+
b && v(N), d && d(N);
|
|
2986
2986
|
},
|
|
2987
|
-
[b,
|
|
2987
|
+
[b, d]
|
|
2988
2988
|
), F = ne(
|
|
2989
2989
|
() => ({
|
|
2990
|
-
id:
|
|
2990
|
+
id: c,
|
|
2991
2991
|
focus: m,
|
|
2992
2992
|
setFocus: p,
|
|
2993
2993
|
isOpen: D,
|
|
@@ -2995,36 +2995,36 @@ function ma({
|
|
|
2995
2995
|
onClose: h,
|
|
2996
2996
|
className: i
|
|
2997
2997
|
}),
|
|
2998
|
-
[m, p, g, h, i, D,
|
|
2998
|
+
[m, p, g, h, i, D, c]
|
|
2999
2999
|
);
|
|
3000
3000
|
Wr({
|
|
3001
|
-
dropdownId:
|
|
3001
|
+
dropdownId: c,
|
|
3002
3002
|
focus: m,
|
|
3003
3003
|
setFocus: p,
|
|
3004
3004
|
isOpen: D,
|
|
3005
3005
|
onClose: h
|
|
3006
3006
|
});
|
|
3007
|
-
const B = ne(() =>
|
|
3007
|
+
const B = ne(() => Z.cloneElement(s, {
|
|
3008
3008
|
onClick: (N) => {
|
|
3009
|
-
b &&
|
|
3009
|
+
b && v((E) => !E);
|
|
3010
3010
|
const A = s.props;
|
|
3011
3011
|
A.onClick && A.onClick(N);
|
|
3012
3012
|
}
|
|
3013
|
-
}), [b,
|
|
3013
|
+
}), [b, v, s]);
|
|
3014
3014
|
return V(() => {
|
|
3015
3015
|
if (m) {
|
|
3016
|
-
const N = _r(
|
|
3016
|
+
const N = _r(c, m.level, m.index);
|
|
3017
3017
|
N == null || N.focus();
|
|
3018
3018
|
}
|
|
3019
|
-
}, [m,
|
|
3019
|
+
}, [m, c]), /* @__PURE__ */ e(
|
|
3020
3020
|
Rr,
|
|
3021
3021
|
{
|
|
3022
|
-
id:
|
|
3022
|
+
id: c,
|
|
3023
3023
|
isOpen: b ? x : D,
|
|
3024
3024
|
trigger: B,
|
|
3025
3025
|
placement: a,
|
|
3026
3026
|
alignment: l,
|
|
3027
|
-
onOpenChange:
|
|
3027
|
+
onOpenChange: y,
|
|
3028
3028
|
className: k("min-w-52", i),
|
|
3029
3029
|
...f,
|
|
3030
3030
|
children: /* @__PURE__ */ e(wt.Provider, { value: F, children: /* @__PURE__ */ e(Oe, { items: o, level: 1 }) })
|
|
@@ -3043,69 +3043,69 @@ const Kr = (r) => ({
|
|
|
3043
3043
|
}), Hr = (r) => ({
|
|
3044
3044
|
__type: "custom",
|
|
3045
3045
|
render: r
|
|
3046
|
-
}),
|
|
3046
|
+
}), ma = {
|
|
3047
3047
|
option: Kr,
|
|
3048
3048
|
group: Pr,
|
|
3049
3049
|
separator: qr,
|
|
3050
3050
|
custom: Hr
|
|
3051
3051
|
};
|
|
3052
|
-
function
|
|
3053
|
-
const [o, t] = R(r), [s, n] = R(null), [a, l] = R(null),
|
|
3054
|
-
const
|
|
3052
|
+
function Yr(r = []) {
|
|
3053
|
+
const [o, t] = R(r), [s, n] = R(null), [a, l] = R(null), d = q(null), i = $((h, g) => {
|
|
3054
|
+
const y = {
|
|
3055
3055
|
...g,
|
|
3056
3056
|
id: `item-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
3057
3057
|
content: h
|
|
3058
3058
|
};
|
|
3059
|
-
return t((F) => [...F,
|
|
3059
|
+
return t((F) => [...F, y]), y;
|
|
3060
3060
|
}, []), f = $((h) => {
|
|
3061
|
-
t((g) => g.filter((
|
|
3061
|
+
t((g) => g.filter((y) => y.id !== h));
|
|
3062
3062
|
}, []), u = $((h, g) => {
|
|
3063
|
-
h !== g && t((
|
|
3064
|
-
const F = [...
|
|
3063
|
+
h !== g && t((y) => {
|
|
3064
|
+
const F = [...y], [B] = F.splice(h, 1);
|
|
3065
3065
|
return F.splice(g, 0, B), F;
|
|
3066
3066
|
});
|
|
3067
|
-
}, []),
|
|
3067
|
+
}, []), c = $((h) => {
|
|
3068
3068
|
h > 0 && u(h, h - 1);
|
|
3069
3069
|
}, [u]), m = $((h) => {
|
|
3070
3070
|
h < o.length - 1 && u(h, h + 1);
|
|
3071
3071
|
}, [u, o.length]), p = $((h, g) => {
|
|
3072
|
-
n(h),
|
|
3072
|
+
n(h), d.current = g, l(g);
|
|
3073
3073
|
}, []), x = $((h, g) => {
|
|
3074
3074
|
h.preventDefault(), l(g);
|
|
3075
|
-
}, []),
|
|
3076
|
-
if (s && a !== null &&
|
|
3077
|
-
const h =
|
|
3075
|
+
}, []), v = $(() => {
|
|
3076
|
+
if (s && a !== null && d.current !== null) {
|
|
3077
|
+
const h = d.current, g = a;
|
|
3078
3078
|
h !== g && u(h, g);
|
|
3079
3079
|
}
|
|
3080
|
-
n(null), l(null),
|
|
3080
|
+
n(null), l(null), d.current = null;
|
|
3081
3081
|
}, [s, a, u]), b = $((h) => {
|
|
3082
|
-
h.preventDefault(),
|
|
3083
|
-
}, [
|
|
3084
|
-
if (!s || a === null ||
|
|
3082
|
+
h.preventDefault(), v();
|
|
3083
|
+
}, [v]), D = $(() => {
|
|
3084
|
+
if (!s || a === null || d.current === null)
|
|
3085
3085
|
return o;
|
|
3086
|
-
const h =
|
|
3086
|
+
const h = d.current, g = a;
|
|
3087
3087
|
if (h === g)
|
|
3088
3088
|
return o;
|
|
3089
|
-
const
|
|
3090
|
-
return
|
|
3091
|
-
}, [o, s, a,
|
|
3089
|
+
const y = [...o], [F] = y.splice(h, 1);
|
|
3090
|
+
return y.splice(g, 0, F), y;
|
|
3091
|
+
}, [o, s, a, d]);
|
|
3092
3092
|
return {
|
|
3093
3093
|
items: o,
|
|
3094
3094
|
visualItems: D(),
|
|
3095
3095
|
addItem: i,
|
|
3096
3096
|
deleteItem: f,
|
|
3097
3097
|
moveItem: u,
|
|
3098
|
-
moveItemUp:
|
|
3098
|
+
moveItemUp: c,
|
|
3099
3099
|
moveItemDown: m,
|
|
3100
3100
|
draggedItem: s,
|
|
3101
3101
|
draggedOverIndex: a,
|
|
3102
3102
|
handleDragStart: p,
|
|
3103
3103
|
handleDragOver: x,
|
|
3104
|
-
handleDragEnd:
|
|
3104
|
+
handleDragEnd: v,
|
|
3105
3105
|
handleDrop: b
|
|
3106
3106
|
};
|
|
3107
3107
|
}
|
|
3108
|
-
const
|
|
3108
|
+
const Zr = {
|
|
3109
3109
|
sm: "text-sm",
|
|
3110
3110
|
md: "text-base",
|
|
3111
3111
|
lg: "text-lg"
|
|
@@ -3142,7 +3142,7 @@ function Jr({ size: r = 12, className: o = "" }) {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
);
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function pa({
|
|
3146
3146
|
items: r = [],
|
|
3147
3147
|
size: o = "md",
|
|
3148
3148
|
id: t,
|
|
@@ -3150,18 +3150,18 @@ function ha({
|
|
|
3150
3150
|
ref: n,
|
|
3151
3151
|
allowAdd: a = !0,
|
|
3152
3152
|
allowDelete: l = !0,
|
|
3153
|
-
allowReorder:
|
|
3153
|
+
allowReorder: d = !0,
|
|
3154
3154
|
addPlaceholder: i = "Add new item...",
|
|
3155
3155
|
onItemsChange: f,
|
|
3156
3156
|
renderItem: u,
|
|
3157
|
-
marker:
|
|
3157
|
+
marker: c,
|
|
3158
3158
|
itemRenderer: m,
|
|
3159
3159
|
showDividers: p = !0,
|
|
3160
3160
|
showReorderButtons: x = !0,
|
|
3161
|
-
title:
|
|
3161
|
+
title: v,
|
|
3162
3162
|
truncateText: b = !1
|
|
3163
3163
|
}) {
|
|
3164
|
-
const [D, h] = R(""), [g,
|
|
3164
|
+
const [D, h] = R(""), [g, y] = R(null), F = q(null), B = J(), N = q(!1), A = q(r), E = t || `dynamic-list-${B}`, C = `${E}-title`, {
|
|
3165
3165
|
items: z,
|
|
3166
3166
|
visualItems: T,
|
|
3167
3167
|
addItem: M,
|
|
@@ -3174,7 +3174,7 @@ function ha({
|
|
|
3174
3174
|
handleDragOver: K,
|
|
3175
3175
|
handleDragEnd: ae,
|
|
3176
3176
|
handleDrop: le
|
|
3177
|
-
} =
|
|
3177
|
+
} = Yr(r), ie = m || u;
|
|
3178
3178
|
V(() => {
|
|
3179
3179
|
if (!N.current) {
|
|
3180
3180
|
N.current = !0;
|
|
@@ -3197,18 +3197,18 @@ function ha({
|
|
|
3197
3197
|
I(z[ee].id), oe >= 0 && ue ? setTimeout(() => {
|
|
3198
3198
|
const se = S(ue.id);
|
|
3199
3199
|
se == null || se.focus();
|
|
3200
|
-
}, 0) : ((fe = F.current) == null || fe.focus(),
|
|
3200
|
+
}, 0) : ((fe = F.current) == null || fe.focus(), y(null));
|
|
3201
3201
|
}, U = (_) => {
|
|
3202
3202
|
_.key === "Enter" && j();
|
|
3203
3203
|
}, P = (_, ee) => {
|
|
3204
3204
|
switch (_.key) {
|
|
3205
3205
|
case "ArrowUp":
|
|
3206
|
-
if (!
|
|
3207
|
-
_.preventDefault(), G(ee), ee > 0 &&
|
|
3206
|
+
if (!d) return;
|
|
3207
|
+
_.preventDefault(), G(ee), ee > 0 && y(ee - 1);
|
|
3208
3208
|
break;
|
|
3209
3209
|
case "ArrowDown":
|
|
3210
|
-
if (!
|
|
3211
|
-
_.preventDefault(), W(ee), ee < z.length - 1 &&
|
|
3210
|
+
if (!d) return;
|
|
3211
|
+
_.preventDefault(), W(ee), ee < z.length - 1 && y(ee + 1);
|
|
3212
3212
|
break;
|
|
3213
3213
|
case "Backspace":
|
|
3214
3214
|
case "Delete":
|
|
@@ -3216,17 +3216,17 @@ function ha({
|
|
|
3216
3216
|
break;
|
|
3217
3217
|
}
|
|
3218
3218
|
}, O = () => {
|
|
3219
|
-
if (!
|
|
3220
|
-
const _ = k("font-medium opacity-60",
|
|
3221
|
-
if (typeof
|
|
3222
|
-
return /* @__PURE__ */ e("h4", { id: C, className: _, children:
|
|
3223
|
-
const ee =
|
|
3224
|
-
return
|
|
3219
|
+
if (!v) return null;
|
|
3220
|
+
const _ = k("font-medium opacity-60", Zr[o]);
|
|
3221
|
+
if (typeof v == "string")
|
|
3222
|
+
return /* @__PURE__ */ e("h4", { id: C, className: _, children: v });
|
|
3223
|
+
const ee = v.props;
|
|
3224
|
+
return Z.cloneElement(v, { id: C, className: k(_, ee.className) });
|
|
3225
3225
|
}, H = (_) => {
|
|
3226
|
-
if (!
|
|
3227
|
-
if (
|
|
3228
|
-
return
|
|
3229
|
-
switch (
|
|
3226
|
+
if (!c) return null;
|
|
3227
|
+
if (Z.isValidElement(c))
|
|
3228
|
+
return c;
|
|
3229
|
+
switch (c) {
|
|
3230
3230
|
case "disc":
|
|
3231
3231
|
return /* @__PURE__ */ e(We, { className: "text-muted-foreground" });
|
|
3232
3232
|
case "dash":
|
|
@@ -3249,11 +3249,11 @@ function ha({
|
|
|
3249
3249
|
"data-size": o,
|
|
3250
3250
|
"data-allow-add": a,
|
|
3251
3251
|
"data-allow-delete": l,
|
|
3252
|
-
"data-allow-reorder":
|
|
3253
|
-
"data-marker": typeof
|
|
3252
|
+
"data-allow-reorder": d,
|
|
3253
|
+
"data-marker": typeof c == "string" ? c : "custom",
|
|
3254
3254
|
children: [
|
|
3255
3255
|
O(),
|
|
3256
|
-
/* @__PURE__ */ w("ul", { className: ce, role: "list", "aria-labelledby":
|
|
3256
|
+
/* @__PURE__ */ w("ul", { className: ce, role: "list", "aria-labelledby": v ? C : void 0, children: [
|
|
3257
3257
|
T.map((_, ee) => {
|
|
3258
3258
|
const oe = z.findIndex((se) => se.id === _.id), ue = (Q == null ? void 0 : Q.id) === _.id, fe = g === oe;
|
|
3259
3259
|
return /* @__PURE__ */ w("div", { children: [
|
|
@@ -3268,26 +3268,26 @@ function ha({
|
|
|
3268
3268
|
// Drag feedback styling
|
|
3269
3269
|
Q && re === ee && !ue ? "border-t-2 border-primary" : ""
|
|
3270
3270
|
),
|
|
3271
|
-
draggable:
|
|
3271
|
+
draggable: d,
|
|
3272
3272
|
onDragStart: (se) => {
|
|
3273
3273
|
se.dataTransfer.effectAllowed = "move", L(_, oe);
|
|
3274
3274
|
},
|
|
3275
3275
|
onDragOver: (se) => K(se, ee),
|
|
3276
3276
|
onDragEnd: ae,
|
|
3277
3277
|
onDrop: le,
|
|
3278
|
-
onMouseEnter: () =>
|
|
3279
|
-
onMouseLeave: () =>
|
|
3278
|
+
onMouseEnter: () => y(oe),
|
|
3279
|
+
onMouseLeave: () => y(null),
|
|
3280
3280
|
onFocus: (se) => {
|
|
3281
|
-
se.currentTarget === se.target &&
|
|
3281
|
+
se.currentTarget === se.target && y(oe);
|
|
3282
3282
|
},
|
|
3283
3283
|
tabIndex: 0,
|
|
3284
3284
|
role: "listitem",
|
|
3285
3285
|
"aria-label": `List item ${oe + 1}: ${_.content}`,
|
|
3286
3286
|
onKeyDown: (se) => P(se, oe),
|
|
3287
|
-
"aria-description": `${
|
|
3287
|
+
"aria-description": `${d ? "Use up/down arrow keys to reorder. " : ""}${l ? "Press Backspace/Delete to remove this item." : ""}`,
|
|
3288
3288
|
children: [
|
|
3289
|
-
|
|
3290
|
-
|
|
3289
|
+
d && /* @__PURE__ */ e("div", { className: k("absolute -translate-x-full flex-shrink-0 pl-2 pr-1 py-2 cursor-move transition-opacity opacity-0", (ue || fe && !Q) && "opacity-100"), children: /* @__PURE__ */ e(ft, { size: de + 2 }) }),
|
|
3290
|
+
c && /* @__PURE__ */ e("div", { className: k("flex-shrink-0 flex items-center justify-center py-2 pr-2"), children: H(oe) }),
|
|
3291
3291
|
/* @__PURE__ */ w("div", { className: k("flex-1 flex min-w-0"), children: [
|
|
3292
3292
|
/* @__PURE__ */ e("div", { className: k("flex-1 min-w-0 py-2 pr-2"), children: ie ? ie(_, oe) : /* @__PURE__ */ e("span", { className: k("block", b && "truncate"), children: _.content }) }),
|
|
3293
3293
|
!Q && /* @__PURE__ */ w(
|
|
@@ -3298,7 +3298,7 @@ function ha({
|
|
|
3298
3298
|
fe && "opacity-100"
|
|
3299
3299
|
),
|
|
3300
3300
|
children: [
|
|
3301
|
-
|
|
3301
|
+
d && x && /* @__PURE__ */ w(te, { children: [
|
|
3302
3302
|
/* @__PURE__ */ e(
|
|
3303
3303
|
"button",
|
|
3304
3304
|
{
|
|
@@ -3411,7 +3411,7 @@ const Xr = {
|
|
|
3411
3411
|
warning: /* @__PURE__ */ e(ve, { size: 24 }),
|
|
3412
3412
|
info: /* @__PURE__ */ e(Be, { size: 24 })
|
|
3413
3413
|
};
|
|
3414
|
-
function
|
|
3414
|
+
function ha({
|
|
3415
3415
|
id: r,
|
|
3416
3416
|
variant: o = "danger",
|
|
3417
3417
|
showRetry: t = !0,
|
|
@@ -3419,7 +3419,7 @@ function ba({
|
|
|
3419
3419
|
fallback: n,
|
|
3420
3420
|
onRetry: a,
|
|
3421
3421
|
onError: l,
|
|
3422
|
-
className:
|
|
3422
|
+
className: d,
|
|
3423
3423
|
children: i,
|
|
3424
3424
|
inDevEnv: f = !1
|
|
3425
3425
|
}) {
|
|
@@ -3433,7 +3433,7 @@ function ba({
|
|
|
3433
3433
|
fallback: n,
|
|
3434
3434
|
onRetry: a,
|
|
3435
3435
|
onError: l,
|
|
3436
|
-
className:
|
|
3436
|
+
className: d,
|
|
3437
3437
|
inDevEnv: f,
|
|
3438
3438
|
children: i
|
|
3439
3439
|
}
|
|
@@ -3463,13 +3463,13 @@ class en extends nt {
|
|
|
3463
3463
|
showRetry: n = !0,
|
|
3464
3464
|
fallbackMessage: a = "Something went wrong",
|
|
3465
3465
|
fallback: l,
|
|
3466
|
-
className:
|
|
3466
|
+
className: d,
|
|
3467
3467
|
inDevEnv: i
|
|
3468
3468
|
} = this.props;
|
|
3469
3469
|
if (this.state.hasError) {
|
|
3470
3470
|
if (l)
|
|
3471
3471
|
return l;
|
|
3472
|
-
const u = Xr[s],
|
|
3472
|
+
const u = Xr[s], c = Or[s];
|
|
3473
3473
|
return /* @__PURE__ */ w(
|
|
3474
3474
|
"div",
|
|
3475
3475
|
{
|
|
@@ -3479,12 +3479,12 @@ class en extends nt {
|
|
|
3479
3479
|
className: k(
|
|
3480
3480
|
"rounded-lg border p-6 text-center",
|
|
3481
3481
|
u.container,
|
|
3482
|
-
|
|
3482
|
+
d
|
|
3483
3483
|
),
|
|
3484
3484
|
role: "alert",
|
|
3485
3485
|
"aria-live": "assertive",
|
|
3486
3486
|
children: [
|
|
3487
|
-
/* @__PURE__ */ e("div", { className: k("mb-4 flex justify-center", u.icon), children:
|
|
3487
|
+
/* @__PURE__ */ e("div", { className: k("mb-4 flex justify-center", u.icon), children: c }),
|
|
3488
3488
|
/* @__PURE__ */ e("h3", { className: k("text-lg font-semibold mb-2", u.title), children: "Oops! Something went wrong" }),
|
|
3489
3489
|
/* @__PURE__ */ e("p", { className: k("text-sm mb-4", u.description), children: a }),
|
|
3490
3490
|
i && this.state.error && /* @__PURE__ */ w("details", { className: "mt-4 text-left", children: [
|
|
@@ -3537,7 +3537,7 @@ const tn = (r) => ({
|
|
|
3537
3537
|
}), on = (r) => ({
|
|
3538
3538
|
__type: "radio",
|
|
3539
3539
|
...r
|
|
3540
|
-
}),
|
|
3540
|
+
}), ba = {
|
|
3541
3541
|
input: tn,
|
|
3542
3542
|
textarea: rn,
|
|
3543
3543
|
select: nn,
|
|
@@ -3545,38 +3545,38 @@ const tn = (r) => ({
|
|
|
3545
3545
|
radio: on
|
|
3546
3546
|
};
|
|
3547
3547
|
function sn(r, o) {
|
|
3548
|
-
const [t, s] = R({}), n = $((u,
|
|
3549
|
-
if (u.required && (!
|
|
3548
|
+
const [t, s] = R({}), n = $((u, c) => {
|
|
3549
|
+
if (u.required && (!c || typeof c == "string" && c.trim() === ""))
|
|
3550
3550
|
return `${u.label} is required`;
|
|
3551
|
-
if (u.isValid &&
|
|
3552
|
-
const m = u.isValid, p = m(
|
|
3551
|
+
if (u.isValid && c) {
|
|
3552
|
+
const m = u.isValid, p = m(c);
|
|
3553
3553
|
if (!p.valid)
|
|
3554
3554
|
return p.message || `${u.label} is invalid`;
|
|
3555
3555
|
}
|
|
3556
3556
|
return null;
|
|
3557
3557
|
}, []), a = $((u = o) => {
|
|
3558
|
-
const
|
|
3558
|
+
const c = {};
|
|
3559
3559
|
return r.forEach((m) => {
|
|
3560
3560
|
const p = n(m, u[m.name]);
|
|
3561
|
-
p && (
|
|
3562
|
-
}), s(
|
|
3563
|
-
}, [r, o, n]), l = $((u,
|
|
3561
|
+
p && (c[m.name] = p);
|
|
3562
|
+
}), s(c), Object.keys(c).length === 0;
|
|
3563
|
+
}, [r, o, n]), l = $((u, c) => {
|
|
3564
3564
|
const m = r.find((x) => x.name === u);
|
|
3565
3565
|
if (!m) return;
|
|
3566
|
-
const p = n(m,
|
|
3566
|
+
const p = n(m, c);
|
|
3567
3567
|
return s((x) => {
|
|
3568
|
-
const
|
|
3569
|
-
return p ?
|
|
3568
|
+
const v = { ...x };
|
|
3569
|
+
return p ? v[u] = p : delete v[u], v;
|
|
3570
3570
|
}), !p;
|
|
3571
|
-
}, [r, n]),
|
|
3571
|
+
}, [r, n]), d = $(() => {
|
|
3572
3572
|
s({});
|
|
3573
3573
|
}, []), i = ne(() => Object.values(t).some((u) => u), [t]), f = ne(() => r.every((u) => {
|
|
3574
|
-
const
|
|
3575
|
-
if (u.required && (!
|
|
3574
|
+
const c = o[u.name];
|
|
3575
|
+
if (u.required && (!c || typeof c == "string" && c.trim() === ""))
|
|
3576
3576
|
return !1;
|
|
3577
|
-
if (u.isValid &&
|
|
3577
|
+
if (u.isValid && c) {
|
|
3578
3578
|
const m = u.isValid;
|
|
3579
|
-
return m(
|
|
3579
|
+
return m(c).valid;
|
|
3580
3580
|
}
|
|
3581
3581
|
return !0;
|
|
3582
3582
|
}) && !i, [r, o, i]);
|
|
@@ -3586,7 +3586,7 @@ function sn(r, o) {
|
|
|
3586
3586
|
isFormValid: f,
|
|
3587
3587
|
validateForm: a,
|
|
3588
3588
|
validateSingleField: l,
|
|
3589
|
-
clearErrors:
|
|
3589
|
+
clearErrors: d
|
|
3590
3590
|
};
|
|
3591
3591
|
}
|
|
3592
3592
|
const Se = {
|
|
@@ -3621,12 +3621,12 @@ function pe({
|
|
|
3621
3621
|
helpMessage: n,
|
|
3622
3622
|
suffix: a,
|
|
3623
3623
|
htmlFor: l,
|
|
3624
|
-
children:
|
|
3624
|
+
children: d,
|
|
3625
3625
|
description: i,
|
|
3626
3626
|
...f
|
|
3627
3627
|
}) {
|
|
3628
|
-
var
|
|
3629
|
-
const u = J(),
|
|
3628
|
+
var v, b;
|
|
3629
|
+
const u = J(), c = (((v = n == null ? void 0 : n.trim()) == null ? void 0 : v.length) || 0) > 0, m = (((b = i == null ? void 0 : i.trim()) == null ? void 0 : b.length) || 0) > 0, p = c ? `${l ?? u}-help` : void 0, x = m ? `${l ?? u}-description` : void 0;
|
|
3630
3630
|
return /* @__PURE__ */ w(
|
|
3631
3631
|
"div",
|
|
3632
3632
|
{
|
|
@@ -3635,10 +3635,10 @@ function pe({
|
|
|
3635
3635
|
children: [
|
|
3636
3636
|
/* @__PURE__ */ w("div", { className: "relative flex", children: [
|
|
3637
3637
|
/* @__PURE__ */ w("label", { className: "font-medium", htmlFor: l, ...f, children: [
|
|
3638
|
-
|
|
3638
|
+
d,
|
|
3639
3639
|
s && /* @__PURE__ */ e("span", { className: "text-red-500 font-medium ml-1", "aria-label": "required", children: "*" })
|
|
3640
3640
|
] }),
|
|
3641
|
-
|
|
3641
|
+
c && /* @__PURE__ */ e(
|
|
3642
3642
|
"span",
|
|
3643
3643
|
{
|
|
3644
3644
|
className: "text-gray-500 ml-1 size-fit -translate-y-1/3",
|
|
@@ -3648,7 +3648,7 @@ function pe({
|
|
|
3648
3648
|
children: /* @__PURE__ */ e(ht, {})
|
|
3649
3649
|
}
|
|
3650
3650
|
),
|
|
3651
|
-
|
|
3651
|
+
c && /* @__PURE__ */ e("div", { id: p, className: "sr-only", children: n }),
|
|
3652
3652
|
a && /* @__PURE__ */ e("span", { className: "ml-1", children: a })
|
|
3653
3653
|
] }),
|
|
3654
3654
|
m && /* @__PURE__ */ e("small", { id: x, className: "block opacity-80 mt-0.5", role: "note", children: i })
|
|
@@ -3682,7 +3682,7 @@ function ke({ elementId: r, type: o, message: t }) {
|
|
|
3682
3682
|
),
|
|
3683
3683
|
role: "status",
|
|
3684
3684
|
children: [
|
|
3685
|
-
o === "error" ? /* @__PURE__ */ e(ve, {}) : /* @__PURE__ */ e(
|
|
3685
|
+
o === "error" ? /* @__PURE__ */ e(ve, {}) : /* @__PURE__ */ e(Ze, {}),
|
|
3686
3686
|
/* @__PURE__ */ e("span", { id: `${r}-${o}-message`, children: t })
|
|
3687
3687
|
]
|
|
3688
3688
|
}
|
|
@@ -3711,32 +3711,32 @@ function dn({
|
|
|
3711
3711
|
successMessage: n,
|
|
3712
3712
|
type: a = "text",
|
|
3713
3713
|
className: l,
|
|
3714
|
-
...
|
|
3714
|
+
...d
|
|
3715
3715
|
}) {
|
|
3716
3716
|
const i = J(), [f, u] = R(!1);
|
|
3717
|
-
let
|
|
3718
|
-
r === "outline" && !o && (
|
|
3717
|
+
let c = o;
|
|
3718
|
+
r === "outline" && !o && (c = "md"), c = c || _e.rounded;
|
|
3719
3719
|
const x = k(
|
|
3720
3720
|
"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
|
|
3721
3721
|
"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",
|
|
3722
3722
|
!t && ln[r],
|
|
3723
|
-
!t && cn[
|
|
3723
|
+
!t && cn[c],
|
|
3724
3724
|
a === "password" && "pr-10",
|
|
3725
3725
|
!t && "px-2 py-1",
|
|
3726
3726
|
t && "pointer-events-none",
|
|
3727
3727
|
l
|
|
3728
3728
|
);
|
|
3729
|
-
return /* @__PURE__ */ w("div", { className: k(t && "cursor-text"), style: { height:
|
|
3729
|
+
return /* @__PURE__ */ w("div", { className: k(t && "cursor-text"), style: { height: d.height, width: d.width }, children: [
|
|
3730
3730
|
/* @__PURE__ */ w("div", { className: k(a === "password" && "relative"), children: [
|
|
3731
3731
|
/* @__PURE__ */ e(
|
|
3732
3732
|
"input",
|
|
3733
3733
|
{
|
|
3734
|
-
...
|
|
3734
|
+
...d,
|
|
3735
3735
|
id: i,
|
|
3736
3736
|
type: a === "password" && f ? "text" : a,
|
|
3737
|
-
"aria-disabled":
|
|
3737
|
+
"aria-disabled": d.disabled,
|
|
3738
3738
|
readOnly: t,
|
|
3739
|
-
"aria-readonly": t ||
|
|
3739
|
+
"aria-readonly": t || d["aria-readonly"],
|
|
3740
3740
|
"data-error": s ? !0 : void 0,
|
|
3741
3741
|
"data-success": n ? !0 : void 0,
|
|
3742
3742
|
className: x
|
|
@@ -3766,8 +3766,8 @@ function un({ elementId: r, maxLength: o }) {
|
|
|
3766
3766
|
const a = () => {
|
|
3767
3767
|
const l = n.value.length;
|
|
3768
3768
|
s(l);
|
|
3769
|
-
const
|
|
3770
|
-
n.setAttribute("aria-describedby", `${r}-character-count`), n.setAttribute("aria-invalid",
|
|
3769
|
+
const d = l >= o;
|
|
3770
|
+
n.setAttribute("aria-describedby", `${r}-character-count`), n.setAttribute("aria-invalid", d ? "true" : "false"), d ? n.setAttribute("data-error", "true") : n.removeAttribute("data-error");
|
|
3771
3771
|
};
|
|
3772
3772
|
return a(), n.addEventListener("input", a), n.setAttribute("maxlength", String(o)), () => {
|
|
3773
3773
|
n.removeEventListener("input", a), n.removeAttribute("maxlength"), n.removeAttribute("aria-describedby"), n.removeAttribute("aria-invalid"), n.removeAttribute("data-error");
|
|
@@ -3829,20 +3829,20 @@ function hn({
|
|
|
3829
3829
|
successMessage: n,
|
|
3830
3830
|
hideResizeHandle: a = !1,
|
|
3831
3831
|
autoExpand: l = !1,
|
|
3832
|
-
characterLimit:
|
|
3832
|
+
characterLimit: d = 0,
|
|
3833
3833
|
className: i,
|
|
3834
3834
|
...f
|
|
3835
3835
|
}) {
|
|
3836
3836
|
const u = J();
|
|
3837
3837
|
fn(u, l || t);
|
|
3838
|
-
let
|
|
3839
|
-
r === "outline" && !o && (
|
|
3838
|
+
let c = o;
|
|
3839
|
+
r === "outline" && !o && (c = "md"), c = c || Ke.rounded;
|
|
3840
3840
|
let m = a;
|
|
3841
3841
|
(t || r === "left-line" && !a) && (m = !0);
|
|
3842
3842
|
const x = k(
|
|
3843
3843
|
"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
|
|
3844
3844
|
!t && mn[r],
|
|
3845
|
-
!t && pn[
|
|
3845
|
+
!t && pn[c],
|
|
3846
3846
|
!t && "px-2 py-1",
|
|
3847
3847
|
t && "pointer-events-none",
|
|
3848
3848
|
m && "no-resize-handle",
|
|
@@ -3863,7 +3863,7 @@ function hn({
|
|
|
3863
3863
|
className: x
|
|
3864
3864
|
}
|
|
3865
3865
|
),
|
|
3866
|
-
|
|
3866
|
+
d > 0 && /* @__PURE__ */ e(un, { elementId: u, maxLength: d }),
|
|
3867
3867
|
!t && /* @__PURE__ */ e(ke, { elementId: u, type: "error", message: s }),
|
|
3868
3868
|
!t && /* @__PURE__ */ e(ke, { elementId: u, type: "success", message: n })
|
|
3869
3869
|
] });
|
|
@@ -3892,15 +3892,15 @@ function gn({
|
|
|
3892
3892
|
o(!0);
|
|
3893
3893
|
else {
|
|
3894
3894
|
const u = s < t.length - 1 ? s + 1 : 0;
|
|
3895
|
-
let
|
|
3895
|
+
let c = u;
|
|
3896
3896
|
for (let m = 0; m < t.length; m++) {
|
|
3897
3897
|
const p = (u + m) % t.length;
|
|
3898
3898
|
if (!t[p].disabled) {
|
|
3899
|
-
|
|
3899
|
+
c = p;
|
|
3900
3900
|
break;
|
|
3901
3901
|
}
|
|
3902
3902
|
}
|
|
3903
|
-
n(
|
|
3903
|
+
n(c);
|
|
3904
3904
|
}
|
|
3905
3905
|
break;
|
|
3906
3906
|
case "ArrowUp":
|
|
@@ -3908,15 +3908,15 @@ function gn({
|
|
|
3908
3908
|
o(!0);
|
|
3909
3909
|
else {
|
|
3910
3910
|
const u = s > 0 ? s - 1 : t.length - 1;
|
|
3911
|
-
let
|
|
3911
|
+
let c = u;
|
|
3912
3912
|
for (let m = 0; m < t.length; m++) {
|
|
3913
3913
|
const p = (u - m + t.length) % t.length;
|
|
3914
3914
|
if (!t[p].disabled) {
|
|
3915
|
-
|
|
3915
|
+
c = p;
|
|
3916
3916
|
break;
|
|
3917
3917
|
}
|
|
3918
3918
|
}
|
|
3919
|
-
n(
|
|
3919
|
+
n(c);
|
|
3920
3920
|
}
|
|
3921
3921
|
break;
|
|
3922
3922
|
case "Enter":
|
|
@@ -3946,24 +3946,24 @@ function xn({
|
|
|
3946
3946
|
shouldRender: s,
|
|
3947
3947
|
optionsContainerRef: n
|
|
3948
3948
|
}) {
|
|
3949
|
-
const [a, l] = R(-1),
|
|
3949
|
+
const [a, l] = R(-1), d = ne(() => t ? o.findIndex((i) => i.value === t.value) : -1, [o, t]);
|
|
3950
3950
|
return V(() => {
|
|
3951
|
-
r && o.length > 0 ? l(t &&
|
|
3952
|
-
}, [o, r, t,
|
|
3951
|
+
r && o.length > 0 ? l(t && d >= 0 ? d : 0) : l(-1);
|
|
3952
|
+
}, [o, r, t, d]), V(() => {
|
|
3953
3953
|
if (a >= 0 && n.current && s) {
|
|
3954
3954
|
const i = () => {
|
|
3955
3955
|
const f = n.current, u = f == null ? void 0 : f.querySelector(`[data-option-index="${a}"]`);
|
|
3956
3956
|
if (u) {
|
|
3957
|
-
const
|
|
3957
|
+
const c = r && t && a === d ? "auto" : "smooth";
|
|
3958
3958
|
u.scrollIntoView({
|
|
3959
|
-
behavior:
|
|
3959
|
+
behavior: c,
|
|
3960
3960
|
block: "nearest"
|
|
3961
3961
|
});
|
|
3962
3962
|
}
|
|
3963
3963
|
};
|
|
3964
3964
|
r && s && t ? setTimeout(i, 10) : i();
|
|
3965
3965
|
}
|
|
3966
|
-
}, [a, s, r, t, o, n,
|
|
3966
|
+
}, [a, s, r, t, o, n, d]), { highlightedIndex: a, setHighlightedIndex: l };
|
|
3967
3967
|
}
|
|
3968
3968
|
const Pe = {
|
|
3969
3969
|
sm: {
|
|
@@ -3980,44 +3980,44 @@ const Pe = {
|
|
|
3980
3980
|
}
|
|
3981
3981
|
};
|
|
3982
3982
|
function yn(r) {
|
|
3983
|
-
const o = q(null), t = q(null), s = q(null), [n, a] = R(!1), [l,
|
|
3983
|
+
const o = q(null), t = q(null), s = q(null), [n, a] = R(!1), [l, d] = R(!1), [i, f] = R({
|
|
3984
3984
|
vertical: !1,
|
|
3985
3985
|
horizontal: !1
|
|
3986
|
-
}), u = q(null),
|
|
3987
|
-
const
|
|
3988
|
-
if (!
|
|
3989
|
-
const b =
|
|
3986
|
+
}), u = q(null), c = q(null), m = $(() => {
|
|
3987
|
+
const v = o.current;
|
|
3988
|
+
if (!v) return;
|
|
3989
|
+
const b = v.scrollHeight > v.clientHeight, D = v.scrollWidth > v.clientWidth;
|
|
3990
3990
|
f({
|
|
3991
3991
|
vertical: b,
|
|
3992
3992
|
horizontal: D
|
|
3993
3993
|
});
|
|
3994
3994
|
}, []), p = $(() => {
|
|
3995
|
-
const
|
|
3996
|
-
if (
|
|
3995
|
+
const v = o.current, b = t.current, D = s.current;
|
|
3996
|
+
if (v) {
|
|
3997
3997
|
if (b && i.vertical) {
|
|
3998
|
-
const g = (i.horizontal ?
|
|
3999
|
-
b.style.height = `${
|
|
3998
|
+
const g = (i.horizontal ? v.clientHeight - r : v.clientHeight) / v.scrollHeight, y = Math.max(g * 100, 10), F = v.scrollHeight - v.clientHeight, B = F > 0 ? v.scrollTop / F : 0, N = 100 - y, A = B * N;
|
|
3999
|
+
b.style.height = `${y}%`, b.style.top = `${A}%`, b.style.transform = "none";
|
|
4000
4000
|
}
|
|
4001
4001
|
if (D && i.horizontal) {
|
|
4002
|
-
const g = (i.vertical ?
|
|
4003
|
-
D.style.width = `${
|
|
4002
|
+
const g = (i.vertical ? v.clientWidth - r : v.clientWidth) / v.scrollWidth, y = Math.max(g * 100, 10), F = v.scrollWidth - v.clientWidth, B = F > 0 ? v.scrollLeft / F : 0, N = 100 - y, A = B * N;
|
|
4003
|
+
D.style.width = `${y}%`, D.style.left = `${A}%`, D.style.transform = "none";
|
|
4004
4004
|
}
|
|
4005
4005
|
}
|
|
4006
4006
|
}, [i, r]), x = $(() => {
|
|
4007
|
-
u.current && clearTimeout(u.current),
|
|
4008
|
-
|
|
4009
|
-
a(!1),
|
|
4007
|
+
u.current && clearTimeout(u.current), c.current && clearTimeout(c.current), a(!0), d(!1), p(), u.current = setTimeout(() => {
|
|
4008
|
+
d(!0), c.current = setTimeout(() => {
|
|
4009
|
+
a(!1), d(!1);
|
|
4010
4010
|
}, 300);
|
|
4011
4011
|
}, 1e3);
|
|
4012
4012
|
}, [p]);
|
|
4013
4013
|
return V(() => {
|
|
4014
|
-
const
|
|
4015
|
-
if (!
|
|
4014
|
+
const v = o.current;
|
|
4015
|
+
if (!v) return;
|
|
4016
4016
|
m();
|
|
4017
4017
|
const b = new ResizeObserver(m);
|
|
4018
|
-
b.observe(
|
|
4018
|
+
b.observe(v);
|
|
4019
4019
|
const D = new MutationObserver(m);
|
|
4020
|
-
return D.observe(
|
|
4020
|
+
return D.observe(v, {
|
|
4021
4021
|
childList: !0,
|
|
4022
4022
|
subtree: !0,
|
|
4023
4023
|
attributes: !0
|
|
@@ -4027,7 +4027,7 @@ function yn(r) {
|
|
|
4027
4027
|
}, [m]), V(() => {
|
|
4028
4028
|
p();
|
|
4029
4029
|
}, [i, p]), V(() => () => {
|
|
4030
|
-
u.current && clearTimeout(u.current),
|
|
4030
|
+
u.current && clearTimeout(u.current), c.current && clearTimeout(c.current);
|
|
4031
4031
|
}, []), {
|
|
4032
4032
|
viewportRef: o,
|
|
4033
4033
|
verticalThumbRef: t,
|
|
@@ -4046,23 +4046,23 @@ function vn({
|
|
|
4046
4046
|
scrollbarThickness: n = 8,
|
|
4047
4047
|
children: a,
|
|
4048
4048
|
id: l,
|
|
4049
|
-
ref:
|
|
4049
|
+
ref: d,
|
|
4050
4050
|
...i
|
|
4051
4051
|
}) {
|
|
4052
|
-
const { viewportRef: f, verticalThumbRef: u, horizontalThumbRef:
|
|
4052
|
+
const { viewportRef: f, verticalThumbRef: u, horizontalThumbRef: c, isScrolling: m, isFadingOut: p, scrollbarVisible: x, handleScroll: v } = yn(n), b = Y(
|
|
4053
4053
|
"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400",
|
|
4054
4054
|
o
|
|
4055
4055
|
);
|
|
4056
|
-
return /* @__PURE__ */ w("div", { ref:
|
|
4056
|
+
return /* @__PURE__ */ w("div", { ref: d, id: l, className: Y("relative overflow-hidden", r), "data-scroll-area-root": "", ...i, children: [
|
|
4057
4057
|
/* @__PURE__ */ e(
|
|
4058
4058
|
"div",
|
|
4059
4059
|
{
|
|
4060
4060
|
ref: f,
|
|
4061
|
-
className:
|
|
4061
|
+
className: Y(
|
|
4062
4062
|
"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
4063
4063
|
t
|
|
4064
4064
|
),
|
|
4065
|
-
onScroll:
|
|
4065
|
+
onScroll: v,
|
|
4066
4066
|
"data-scroll-area-viewport": "",
|
|
4067
4067
|
children: a
|
|
4068
4068
|
}
|
|
@@ -4070,7 +4070,7 @@ function vn({
|
|
|
4070
4070
|
x.vertical && (m || p) && /* @__PURE__ */ e(
|
|
4071
4071
|
"div",
|
|
4072
4072
|
{
|
|
4073
|
-
className:
|
|
4073
|
+
className: Y(
|
|
4074
4074
|
"touch-none select-none transition-all duration-300",
|
|
4075
4075
|
"p-[1px]",
|
|
4076
4076
|
"absolute right-0 top-0",
|
|
@@ -4087,7 +4087,7 @@ function vn({
|
|
|
4087
4087
|
"div",
|
|
4088
4088
|
{
|
|
4089
4089
|
ref: u,
|
|
4090
|
-
className:
|
|
4090
|
+
className: Y("absolute rounded-full", b),
|
|
4091
4091
|
"data-scroll-area-thumb": "",
|
|
4092
4092
|
style: { height: "20%", top: "0%", width: "100%" }
|
|
4093
4093
|
}
|
|
@@ -4097,7 +4097,7 @@ function vn({
|
|
|
4097
4097
|
x.horizontal && (m || p) && /* @__PURE__ */ e(
|
|
4098
4098
|
"div",
|
|
4099
4099
|
{
|
|
4100
|
-
className:
|
|
4100
|
+
className: Y(
|
|
4101
4101
|
"touch-none select-none transition-all duration-300",
|
|
4102
4102
|
"p-[1px]",
|
|
4103
4103
|
"absolute bottom-0 left-0",
|
|
@@ -4113,8 +4113,8 @@ function vn({
|
|
|
4113
4113
|
children: /* @__PURE__ */ e(
|
|
4114
4114
|
"div",
|
|
4115
4115
|
{
|
|
4116
|
-
ref:
|
|
4117
|
-
className:
|
|
4116
|
+
ref: c,
|
|
4117
|
+
className: Y("absolute rounded-full", b),
|
|
4118
4118
|
"data-scroll-area-thumb": "",
|
|
4119
4119
|
style: { width: "20%", left: "0%", height: "100%" }
|
|
4120
4120
|
}
|
|
@@ -4124,7 +4124,7 @@ function vn({
|
|
|
4124
4124
|
x.vertical && x.horizontal && /* @__PURE__ */ e(
|
|
4125
4125
|
"div",
|
|
4126
4126
|
{
|
|
4127
|
-
className:
|
|
4127
|
+
className: Y("bg-transparent", "absolute bottom-0 right-0"),
|
|
4128
4128
|
"data-scroll-area-corner": "",
|
|
4129
4129
|
style: {
|
|
4130
4130
|
height: `${n}px`,
|
|
@@ -4142,16 +4142,16 @@ function wn({
|
|
|
4142
4142
|
disabled: n = !1,
|
|
4143
4143
|
clearable: a = !1,
|
|
4144
4144
|
size: l = "md",
|
|
4145
|
-
className:
|
|
4145
|
+
className: d,
|
|
4146
4146
|
triggerClassName: i,
|
|
4147
4147
|
dropdownClassName: f,
|
|
4148
4148
|
id: u,
|
|
4149
|
-
ref:
|
|
4149
|
+
ref: c,
|
|
4150
4150
|
onChange: m,
|
|
4151
4151
|
onSearch: p,
|
|
4152
4152
|
searchPlaceholder: x = "Search options..."
|
|
4153
4153
|
}) {
|
|
4154
|
-
const
|
|
4154
|
+
const v = J(), D = `${u ?? v}-listbox`, h = (S) => `${D}-option-${S}`, [g, y] = R(!1), [F, B] = R(""), N = q(null), A = q(null), E = q(null), C = q(null), { show: z, shouldRender: T } = bn(g), M = ne(() => !s || !F ? r : r.filter(
|
|
4155
4155
|
(S) => {
|
|
4156
4156
|
var j;
|
|
4157
4157
|
return S.text.toLowerCase().includes(F.toLowerCase()) || ((j = S.description) == null ? void 0 : j.toLowerCase().includes(F.toLowerCase()));
|
|
@@ -4169,12 +4169,12 @@ function wn({
|
|
|
4169
4169
|
const re = $(
|
|
4170
4170
|
(S) => {
|
|
4171
4171
|
var j;
|
|
4172
|
-
S.disabled || (m == null || m(S.value),
|
|
4172
|
+
S.disabled || (m == null || m(S.value), y(!1), B(""), (j = N.current) == null || j.focus());
|
|
4173
4173
|
},
|
|
4174
4174
|
[m]
|
|
4175
4175
|
), { handleKeyDown: L } = gn({
|
|
4176
4176
|
isOpen: g,
|
|
4177
|
-
setIsOpen:
|
|
4177
|
+
setIsOpen: y,
|
|
4178
4178
|
filteredOptions: M,
|
|
4179
4179
|
highlightedIndex: G,
|
|
4180
4180
|
setHighlightedIndex: W,
|
|
@@ -4186,14 +4186,14 @@ function wn({
|
|
|
4186
4186
|
return;
|
|
4187
4187
|
const S = (j) => {
|
|
4188
4188
|
var X;
|
|
4189
|
-
E.current && !E.current.contains(j.target) && !((X = N.current) != null && X.contains(j.target)) && (
|
|
4189
|
+
E.current && !E.current.contains(j.target) && !((X = N.current) != null && X.contains(j.target)) && (y(!1), B(""));
|
|
4190
4190
|
};
|
|
4191
4191
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
4192
4192
|
}, [g]);
|
|
4193
4193
|
const K = () => {
|
|
4194
|
-
n || (
|
|
4194
|
+
n || (y(!g), g || (B(""), W(-1)));
|
|
4195
4195
|
}, ae = (S) => {
|
|
4196
|
-
S.disabled || (m == null || m(S.value),
|
|
4196
|
+
S.disabled || (m == null || m(S.value), y(!1), B(""));
|
|
4197
4197
|
}, le = (S) => {
|
|
4198
4198
|
const j = S.target.value;
|
|
4199
4199
|
B(j), p == null || p(j), W(-1);
|
|
@@ -4203,9 +4203,9 @@ function wn({
|
|
|
4203
4203
|
return /* @__PURE__ */ w(
|
|
4204
4204
|
"div",
|
|
4205
4205
|
{
|
|
4206
|
-
className: k("relative",
|
|
4206
|
+
className: k("relative", d),
|
|
4207
4207
|
id: u,
|
|
4208
|
-
ref:
|
|
4208
|
+
ref: c,
|
|
4209
4209
|
"data-select": "true",
|
|
4210
4210
|
"data-value": o,
|
|
4211
4211
|
"data-searchable": s,
|
|
@@ -4321,7 +4321,7 @@ function wn({
|
|
|
4321
4321
|
);
|
|
4322
4322
|
}
|
|
4323
4323
|
function kn({ itemId: r, checked: o, onChange: t, name: s, disabled: n = !1, className: a = "" }) {
|
|
4324
|
-
const l = "relative inline-flex items-center justify-center rounded-full",
|
|
4324
|
+
const l = "relative inline-flex items-center justify-center rounded-full", d = () => {
|
|
4325
4325
|
n || t();
|
|
4326
4326
|
}, i = k(
|
|
4327
4327
|
l,
|
|
@@ -4340,7 +4340,7 @@ function kn({ itemId: r, checked: o, onChange: t, name: s, disabled: n = !1, cla
|
|
|
4340
4340
|
"aria-disabled": n,
|
|
4341
4341
|
"aria-description": `Radio button for ${s}`,
|
|
4342
4342
|
"aria-labelledby": `${r}-label`,
|
|
4343
|
-
onClick:
|
|
4343
|
+
onClick: d,
|
|
4344
4344
|
className: i,
|
|
4345
4345
|
style: {
|
|
4346
4346
|
width: "1em",
|
|
@@ -4365,16 +4365,16 @@ function Ie({
|
|
|
4365
4365
|
onChange: n,
|
|
4366
4366
|
disabled: a = !1,
|
|
4367
4367
|
hideInput: l = !1,
|
|
4368
|
-
description:
|
|
4368
|
+
description: d,
|
|
4369
4369
|
name: i
|
|
4370
4370
|
}) {
|
|
4371
|
-
const u = `radio-${J()}-${r}`,
|
|
4371
|
+
const u = `radio-${J()}-${r}`, c = () => {
|
|
4372
4372
|
a || n == null || n(r);
|
|
4373
4373
|
};
|
|
4374
4374
|
return /* @__PURE__ */ w(
|
|
4375
4375
|
"div",
|
|
4376
4376
|
{
|
|
4377
|
-
title:
|
|
4377
|
+
title: d,
|
|
4378
4378
|
className: k(
|
|
4379
4379
|
"relative flex items-center",
|
|
4380
4380
|
t,
|
|
@@ -4394,7 +4394,7 @@ function Ie({
|
|
|
4394
4394
|
itemId: u,
|
|
4395
4395
|
name: i || "",
|
|
4396
4396
|
checked: s,
|
|
4397
|
-
onChange:
|
|
4397
|
+
onChange: c,
|
|
4398
4398
|
disabled: a,
|
|
4399
4399
|
className: k(l && "")
|
|
4400
4400
|
}
|
|
@@ -4405,17 +4405,17 @@ function Ie({
|
|
|
4405
4405
|
id: l ? u : void 0,
|
|
4406
4406
|
tabIndex: l ? -1 : void 0,
|
|
4407
4407
|
role: l ? "radio" : void 0,
|
|
4408
|
-
onClick: l ?
|
|
4408
|
+
onClick: l ? c : void 0,
|
|
4409
4409
|
"aria-checked": l ? s ? "true" : "false" : void 0,
|
|
4410
4410
|
"aria-disabled": l ? a : void 0,
|
|
4411
|
-
"aria-description": l ?
|
|
4411
|
+
"aria-description": l ? d || `Radio button for ${i}` : void 0,
|
|
4412
4412
|
"aria-labelledby": l ? `${u}-label` : void 0,
|
|
4413
4413
|
className: k(l && "size-full", typeof o == "object" && "grow focus:outline-none"),
|
|
4414
4414
|
children: /* @__PURE__ */ e(
|
|
4415
4415
|
"label",
|
|
4416
4416
|
{
|
|
4417
4417
|
id: `${u}-label`,
|
|
4418
|
-
onClick: l ? void 0 :
|
|
4418
|
+
onClick: l ? void 0 : c,
|
|
4419
4419
|
className: k(a && "cursor-not-allowed", !a && "cursor-pointer"),
|
|
4420
4420
|
children: o
|
|
4421
4421
|
}
|
|
@@ -4427,16 +4427,16 @@ function Ie({
|
|
|
4427
4427
|
);
|
|
4428
4428
|
}
|
|
4429
4429
|
function Nn(r, o) {
|
|
4430
|
-
const [t, s] = R(o), [n, a] = R(-1), [l,
|
|
4430
|
+
const [t, s] = R(o), [n, a] = R(-1), [l, d] = R(!1), i = $((p, x) => {
|
|
4431
4431
|
var D;
|
|
4432
|
-
const
|
|
4433
|
-
|
|
4432
|
+
const v = p[x];
|
|
4433
|
+
v.hasAttribute("disabled") || v.getAttribute("aria-disabled") === "true" || ((D = p[x]) == null || D.click(), a(x));
|
|
4434
4434
|
}, []), f = $(
|
|
4435
4435
|
(p, x) => {
|
|
4436
4436
|
var b;
|
|
4437
4437
|
if (p.preventDefault(), l || !x.length) return;
|
|
4438
|
-
const
|
|
4439
|
-
(b = x[
|
|
4438
|
+
const v = o !== -1 ? o : 0;
|
|
4439
|
+
(b = x[v]) == null || b.focus(), s(v), o !== -1 && i(x, v);
|
|
4440
4440
|
},
|
|
4441
4441
|
[o, l, i]
|
|
4442
4442
|
), u = $(
|
|
@@ -4449,16 +4449,16 @@ function Nn(r, o) {
|
|
|
4449
4449
|
document.querySelectorAll(
|
|
4450
4450
|
'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
4451
4451
|
)
|
|
4452
|
-
).filter((h) => !h.hasAttribute("disabled") && h.tabIndex >= 0),
|
|
4452
|
+
).filter((h) => !h.hasAttribute("disabled") && h.tabIndex >= 0), v = x.findIndex((h) => h.id === r), b = v > 0 ? v - 1 : x.length - 1;
|
|
4453
4453
|
(D = x[b]) == null || D.focus();
|
|
4454
4454
|
},
|
|
4455
4455
|
[r]
|
|
4456
|
-
),
|
|
4456
|
+
), c = $(
|
|
4457
4457
|
(p, x) => {
|
|
4458
4458
|
var g;
|
|
4459
4459
|
if (!x.length) return;
|
|
4460
|
-
const
|
|
4461
|
-
if (!x.some((
|
|
4460
|
+
const v = p.target;
|
|
4461
|
+
if (!x.some((y) => y.id === v.id)) return;
|
|
4462
4462
|
const D = t !== -1 ? t : 0;
|
|
4463
4463
|
let h = D;
|
|
4464
4464
|
switch (p.key) {
|
|
@@ -4490,11 +4490,11 @@ function Nn(r, o) {
|
|
|
4490
4490
|
V(() => {
|
|
4491
4491
|
const p = document.querySelector(`[id="${r}"][role="radiogroup"]`);
|
|
4492
4492
|
if (!p) return;
|
|
4493
|
-
const x = m(),
|
|
4494
|
-
return document.addEventListener("keydown", b), p.addEventListener("focus",
|
|
4495
|
-
document.removeEventListener("keydown", b), p.removeEventListener("focus",
|
|
4493
|
+
const x = m(), v = (g) => f(g, x), b = (g) => c(g, x), D = () => d(!0), h = () => d(!1);
|
|
4494
|
+
return document.addEventListener("keydown", b), p.addEventListener("focus", v), p.addEventListener("mousedown", D), document.addEventListener("mouseup", h), () => {
|
|
4495
|
+
document.removeEventListener("keydown", b), p.removeEventListener("focus", v), p.removeEventListener("mousedown", D), document.removeEventListener("mouseup", h);
|
|
4496
4496
|
};
|
|
4497
|
-
}, [r, m, f,
|
|
4497
|
+
}, [r, m, f, c]);
|
|
4498
4498
|
}
|
|
4499
4499
|
function Dn({
|
|
4500
4500
|
options: r = [],
|
|
@@ -4504,45 +4504,45 @@ function Dn({
|
|
|
4504
4504
|
children: n,
|
|
4505
4505
|
className: a = "",
|
|
4506
4506
|
childrenClassName: l = "",
|
|
4507
|
-
hideInputs:
|
|
4507
|
+
hideInputs: d = !1
|
|
4508
4508
|
}) {
|
|
4509
4509
|
const i = J(), f = s || `radio-group-${i}`;
|
|
4510
4510
|
Nn(
|
|
4511
4511
|
f,
|
|
4512
|
-
r.findIndex((
|
|
4512
|
+
r.findIndex((c) => c === o)
|
|
4513
4513
|
);
|
|
4514
|
-
const u = ne(() => r.reduce((
|
|
4514
|
+
const u = ne(() => r.reduce((c, m) => (typeof m == "string" ? c.some((p) => p.value === m) || c.push({ label: m, value: m }) : c.push(m), c), []), [r]);
|
|
4515
4515
|
return /* @__PURE__ */ w("div", { id: f, role: "radiogroup", tabIndex: 0, className: k(a, "focus:outline-none"), children: [
|
|
4516
|
-
u.length > 0 && u.map((
|
|
4516
|
+
u.length > 0 && u.map((c, m) => /* @__PURE__ */ e(
|
|
4517
4517
|
Ie,
|
|
4518
4518
|
{
|
|
4519
|
-
value:
|
|
4520
|
-
isSelected: o ===
|
|
4519
|
+
value: c.value,
|
|
4520
|
+
isSelected: o === c.value,
|
|
4521
4521
|
onChange: t,
|
|
4522
4522
|
name: f,
|
|
4523
|
-
disabled:
|
|
4524
|
-
description:
|
|
4525
|
-
hideInput:
|
|
4523
|
+
disabled: c.disabled,
|
|
4524
|
+
description: c.description,
|
|
4525
|
+
hideInput: d,
|
|
4526
4526
|
className: l,
|
|
4527
|
-
children:
|
|
4527
|
+
children: c.label
|
|
4528
4528
|
},
|
|
4529
|
-
`${
|
|
4529
|
+
`${c.value}-${m}`
|
|
4530
4530
|
)),
|
|
4531
|
-
u.length === 0 && n &&
|
|
4531
|
+
u.length === 0 && n && Z.Children.map(n, (c) => Z.isValidElement(c) && c.type === Ie ? /* @__PURE__ */ e(
|
|
4532
4532
|
Ie,
|
|
4533
4533
|
{
|
|
4534
|
-
...
|
|
4535
|
-
className: k(l,
|
|
4536
|
-
hideInput:
|
|
4537
|
-
isSelected: o ===
|
|
4534
|
+
...c.props,
|
|
4535
|
+
className: k(l, c.props.className),
|
|
4536
|
+
hideInput: c.props.hideInput || d,
|
|
4537
|
+
isSelected: o === c.props.value,
|
|
4538
4538
|
onChange: t,
|
|
4539
4539
|
name: f,
|
|
4540
|
-
children:
|
|
4540
|
+
children: c.props.children
|
|
4541
4541
|
}
|
|
4542
4542
|
) : null)
|
|
4543
4543
|
] });
|
|
4544
4544
|
}
|
|
4545
|
-
function
|
|
4545
|
+
function ga({
|
|
4546
4546
|
form: r,
|
|
4547
4547
|
initialData: o = {},
|
|
4548
4548
|
onDataChange: t,
|
|
@@ -4550,31 +4550,31 @@ function xa({
|
|
|
4550
4550
|
submitButton: n,
|
|
4551
4551
|
columns: a = Ae.columns,
|
|
4552
4552
|
responsive: l = Ae.responsive,
|
|
4553
|
-
spacing:
|
|
4553
|
+
spacing: d = Ae.spacing,
|
|
4554
4554
|
className: i,
|
|
4555
4555
|
id: f,
|
|
4556
4556
|
ref: u
|
|
4557
4557
|
}) {
|
|
4558
|
-
const [
|
|
4558
|
+
const [c, m] = R(o), { errors: p, validateForm: x, validateSingleField: v, isFormValid: b } = sn(r, c), D = $(
|
|
4559
4559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4560
4560
|
(N, A) => {
|
|
4561
|
-
const E = { ...
|
|
4562
|
-
m(E), t == null || t(E),
|
|
4561
|
+
const E = { ...c, [N]: A };
|
|
4562
|
+
m(E), t == null || t(E), v(N, A);
|
|
4563
4563
|
},
|
|
4564
|
-
[
|
|
4564
|
+
[c, t, v]
|
|
4565
4565
|
), h = $(
|
|
4566
4566
|
(N) => {
|
|
4567
|
-
N.preventDefault(), x(
|
|
4567
|
+
N.preventDefault(), x(c) && s && s(c);
|
|
4568
4568
|
},
|
|
4569
|
-
[
|
|
4569
|
+
[c, x, s]
|
|
4570
4570
|
), g = (N) => {
|
|
4571
4571
|
const A = [], E = {};
|
|
4572
4572
|
return N.colSpan && a > 1 && A.push(Se.colSpan[N.colSpan]), {
|
|
4573
4573
|
className: k(A.join(" "), N.className),
|
|
4574
4574
|
style: E
|
|
4575
4575
|
};
|
|
4576
|
-
},
|
|
4577
|
-
const A =
|
|
4576
|
+
}, y = (N) => {
|
|
4577
|
+
const A = c[N.name], E = p[N.name], C = f ? `${f}-${N.name}` : N.name, { className: z, style: T } = g(N);
|
|
4578
4578
|
return /* @__PURE__ */ e("div", { className: z, style: T, children: (() => {
|
|
4579
4579
|
switch (N.__type) {
|
|
4580
4580
|
case "input": {
|
|
@@ -4702,7 +4702,7 @@ function xa({
|
|
|
4702
4702
|
}, F = k(
|
|
4703
4703
|
"grid",
|
|
4704
4704
|
a && a > 1 ? Se.columns[a] : "grid-cols-1",
|
|
4705
|
-
Se.spacing[
|
|
4705
|
+
Se.spacing[d],
|
|
4706
4706
|
i
|
|
4707
4707
|
), B = () => n ? at(n) ? ot(n, {
|
|
4708
4708
|
disabled: !b,
|
|
@@ -4721,7 +4721,7 @@ function xa({
|
|
|
4721
4721
|
"data-form-responsive": l,
|
|
4722
4722
|
"data-form-valid": b,
|
|
4723
4723
|
children: [
|
|
4724
|
-
r.map(
|
|
4724
|
+
r.map(y),
|
|
4725
4725
|
B()
|
|
4726
4726
|
]
|
|
4727
4727
|
}
|
|
@@ -4735,13 +4735,13 @@ function Cn({
|
|
|
4735
4735
|
disabled: n = !1,
|
|
4736
4736
|
delay: a = 100,
|
|
4737
4737
|
showArrow: l = !0,
|
|
4738
|
-
className:
|
|
4738
|
+
className: d
|
|
4739
4739
|
}) {
|
|
4740
|
-
const [i, f] = R(!1), [u,
|
|
4740
|
+
const [i, f] = R(!1), [u, c] = R(!1), [m, p] = R(!1), [x, v] = R(!1), b = q(null), D = J(), h = r ?? D, g = $(() => {
|
|
4741
4741
|
n || (b.current && clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
4742
4742
|
f(!0);
|
|
4743
4743
|
}, a));
|
|
4744
|
-
}, [n, a]),
|
|
4744
|
+
}, [n, a]), y = $((A = !1) => {
|
|
4745
4745
|
if (b.current && clearTimeout(b.current), A) {
|
|
4746
4746
|
f(!1);
|
|
4747
4747
|
return;
|
|
@@ -4751,16 +4751,16 @@ function Cn({
|
|
|
4751
4751
|
}, 100);
|
|
4752
4752
|
}, []);
|
|
4753
4753
|
V(() => {
|
|
4754
|
-
!u && !m && !x && i &&
|
|
4755
|
-
}, [u, m, x, i,
|
|
4754
|
+
!u && !m && !x && i && y();
|
|
4755
|
+
}, [u, m, x, i, y]), V(() => {
|
|
4756
4756
|
if (!i) return;
|
|
4757
4757
|
const A = () => {
|
|
4758
|
-
|
|
4758
|
+
y(!0);
|
|
4759
4759
|
};
|
|
4760
4760
|
return window.addEventListener("scroll", A, !0), () => {
|
|
4761
4761
|
window.removeEventListener("scroll", A, !0);
|
|
4762
4762
|
};
|
|
4763
|
-
}, [i,
|
|
4763
|
+
}, [i, y]), V(() => () => {
|
|
4764
4764
|
b.current && clearTimeout(b.current);
|
|
4765
4765
|
}, []);
|
|
4766
4766
|
const F = () => {
|
|
@@ -4775,32 +4775,32 @@ function Cn({
|
|
|
4775
4775
|
left: "origin-right",
|
|
4776
4776
|
right: "origin-left"
|
|
4777
4777
|
};
|
|
4778
|
-
return k(A, C[s], z[s], E,
|
|
4778
|
+
return k(A, C[s], z[s], E, d);
|
|
4779
4779
|
}, B = () => l ? k("absolute w-0 h-0 pointer-events-none", {
|
|
4780
4780
|
top: "top-full left-1/2 -translate-x-1/2 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-tooltip",
|
|
4781
4781
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-l-[6px] border-r-[6px] border-b-[6px] border-l-transparent border-r-transparent border-b-tooltip",
|
|
4782
4782
|
left: "left-full top-1/2 -translate-y-1/2 border-t-[6px] border-b-[6px] border-l-[6px] border-t-transparent border-b-transparent border-l-tooltip",
|
|
4783
4783
|
right: "right-full top-1/2 -translate-y-1/2 border-t-[6px] border-b-[6px] border-r-[6px] border-t-transparent border-b-transparent border-r-tooltip"
|
|
4784
4784
|
}[s]) : "", N = o.props;
|
|
4785
|
-
return /* @__PURE__ */ e(te, { children:
|
|
4785
|
+
return /* @__PURE__ */ e(te, { children: Z.cloneElement(o, {
|
|
4786
4786
|
style: {
|
|
4787
4787
|
...N.style,
|
|
4788
4788
|
position: "relative"
|
|
4789
4789
|
},
|
|
4790
4790
|
onMouseEnter: () => {
|
|
4791
|
-
|
|
4791
|
+
c(!0), g();
|
|
4792
4792
|
},
|
|
4793
4793
|
onMouseLeave: () => {
|
|
4794
|
-
|
|
4794
|
+
c(!1);
|
|
4795
4795
|
},
|
|
4796
4796
|
onFocus: () => {
|
|
4797
|
-
|
|
4797
|
+
v(!0), g();
|
|
4798
4798
|
},
|
|
4799
4799
|
onBlur: () => {
|
|
4800
|
-
|
|
4800
|
+
v(!1), y(!0);
|
|
4801
4801
|
},
|
|
4802
4802
|
onKeyDown: (A) => {
|
|
4803
|
-
A.key === "Escape" &&
|
|
4803
|
+
A.key === "Escape" && y(!0);
|
|
4804
4804
|
},
|
|
4805
4805
|
"aria-describedby": n ? void 0 : h,
|
|
4806
4806
|
children: /* @__PURE__ */ w(te, { children: [
|
|
@@ -4828,7 +4828,7 @@ function Cn({
|
|
|
4828
4828
|
] })
|
|
4829
4829
|
}) });
|
|
4830
4830
|
}
|
|
4831
|
-
function
|
|
4831
|
+
function xa({ id: r, ref: o, design: t = "filled", iconSize: s = 14, className: n, ...a }) {
|
|
4832
4832
|
const l = t === "filled" ? xt : Be;
|
|
4833
4833
|
return /* @__PURE__ */ e(Cn, { ...a, children: /* @__PURE__ */ e(
|
|
4834
4834
|
"div",
|
|
@@ -4875,9 +4875,9 @@ function Sn(r, o) {
|
|
|
4875
4875
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
4876
4876
|
);
|
|
4877
4877
|
if (l.length > 0) {
|
|
4878
|
-
const
|
|
4879
|
-
if (
|
|
4880
|
-
|
|
4878
|
+
const d = Array.from(l).filter((i) => !(i instanceof HTMLButtonElement && i.getAttribute("data-modal-close-button") === "true"));
|
|
4879
|
+
if (d.length > 0) {
|
|
4880
|
+
d[0].focus();
|
|
4881
4881
|
return;
|
|
4882
4882
|
}
|
|
4883
4883
|
l[0].focus();
|
|
@@ -4889,7 +4889,7 @@ function Sn(r, o) {
|
|
|
4889
4889
|
document.body.style.overflow = "auto", t.current instanceof HTMLElement && t.current.focus();
|
|
4890
4890
|
}), [o, s]);
|
|
4891
4891
|
}
|
|
4892
|
-
function
|
|
4892
|
+
function ya({
|
|
4893
4893
|
id: r,
|
|
4894
4894
|
isOpen: o,
|
|
4895
4895
|
onClose: t,
|
|
@@ -4897,17 +4897,17 @@ function va({
|
|
|
4897
4897
|
children: n,
|
|
4898
4898
|
contentOnly: a = !1,
|
|
4899
4899
|
className: l,
|
|
4900
|
-
overlayClassName:
|
|
4900
|
+
overlayClassName: d,
|
|
4901
4901
|
containerClassName: i,
|
|
4902
4902
|
hideCloseButton: f = !1,
|
|
4903
4903
|
actions: u = [],
|
|
4904
|
-
disableCloseOnOverlayClick:
|
|
4904
|
+
disableCloseOnOverlayClick: c = !1,
|
|
4905
4905
|
ariaLabelledBy: m,
|
|
4906
4906
|
ariaDescribedBy: p
|
|
4907
4907
|
}) {
|
|
4908
|
-
const x = J(),
|
|
4909
|
-
if (Sn(
|
|
4910
|
-
const g = () => s ?
|
|
4908
|
+
const x = J(), v = r || `modal-${x}`, b = r ? `${r}-title` : `modal-title-${x}`, { show: D, shouldRender: h } = En(o);
|
|
4909
|
+
if (Sn(v, h), Fn(h, t), !h) return null;
|
|
4910
|
+
const g = () => s ? Z.isValidElement(s) ? /* @__PURE__ */ e("div", { className: "mb-4", children: s }) : /* @__PURE__ */ e("h2", { className: "mb-4 text-xl font-semibold", id: b, children: s }) : null, y = () => u.length === 0 ? null : /* @__PURE__ */ e("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: u.map((F, B) => {
|
|
4911
4911
|
const { label: N, ...A } = F;
|
|
4912
4912
|
return /* @__PURE__ */ e(Qt, { ...A, "data-modal-action": "true", children: N }, B);
|
|
4913
4913
|
}) });
|
|
@@ -4920,23 +4920,23 @@ function va({
|
|
|
4920
4920
|
role: "dialog",
|
|
4921
4921
|
"aria-modal": "true",
|
|
4922
4922
|
className: "fixed inset-0 z-[100] overflow-y-auto",
|
|
4923
|
-
children: /* @__PURE__ */ w("div", { className:
|
|
4923
|
+
children: /* @__PURE__ */ w("div", { className: Y("flex min-h-screen items-center justify-center p-4", i), children: [
|
|
4924
4924
|
/* @__PURE__ */ e(
|
|
4925
4925
|
"div",
|
|
4926
4926
|
{
|
|
4927
|
-
className:
|
|
4927
|
+
className: Y("fixed inset-0 bg-black/20 transition-all", d),
|
|
4928
4928
|
onClick: () => {
|
|
4929
|
-
|
|
4929
|
+
c || t();
|
|
4930
4930
|
}
|
|
4931
4931
|
}
|
|
4932
4932
|
),
|
|
4933
|
-
a && /* @__PURE__ */ e("div", { className:
|
|
4933
|
+
a && /* @__PURE__ */ e("div", { className: Y("relative w-fit", l), children: n }),
|
|
4934
4934
|
!a && /* @__PURE__ */ w(
|
|
4935
4935
|
"div",
|
|
4936
4936
|
{
|
|
4937
|
-
id:
|
|
4937
|
+
id: v,
|
|
4938
4938
|
tabIndex: -1,
|
|
4939
|
-
className:
|
|
4939
|
+
className: Y(
|
|
4940
4940
|
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75",
|
|
4941
4941
|
D ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
4942
4942
|
l
|
|
@@ -4954,7 +4954,7 @@ function va({
|
|
|
4954
4954
|
),
|
|
4955
4955
|
g(),
|
|
4956
4956
|
n,
|
|
4957
|
-
|
|
4957
|
+
y()
|
|
4958
4958
|
]
|
|
4959
4959
|
}
|
|
4960
4960
|
)
|
|
@@ -4972,7 +4972,7 @@ const An = {
|
|
|
4972
4972
|
sm: "px-2 py-1 text-sm min-w-[32px] min-h-8",
|
|
4973
4973
|
md: "px-2 py-1 text-base min-w-[40px] min-h-10"
|
|
4974
4974
|
};
|
|
4975
|
-
function
|
|
4975
|
+
function va({
|
|
4976
4976
|
page: r,
|
|
4977
4977
|
pageCount: o = 5,
|
|
4978
4978
|
maxVisiblePages: t = 5,
|
|
@@ -4980,39 +4980,39 @@ function wa({
|
|
|
4980
4980
|
onPageChange: n,
|
|
4981
4981
|
size: a = "md",
|
|
4982
4982
|
variant: l = "link",
|
|
4983
|
-
className:
|
|
4983
|
+
className: d,
|
|
4984
4984
|
ref: i,
|
|
4985
4985
|
buttonsClassName: f,
|
|
4986
4986
|
...u
|
|
4987
4987
|
}) {
|
|
4988
|
-
const
|
|
4989
|
-
if (
|
|
4990
|
-
const
|
|
4991
|
-
if (
|
|
4992
|
-
return Array.from({ length:
|
|
4988
|
+
const c = o === 1 / 0, p = $(() => {
|
|
4989
|
+
if (c) return [];
|
|
4990
|
+
const y = o, F = Math.min(t, y);
|
|
4991
|
+
if (y <= F)
|
|
4992
|
+
return Array.from({ length: y }, (E, C) => C + 1);
|
|
4993
4993
|
const B = Math.floor(F / 2);
|
|
4994
|
-
let N = Math.max(1, r - B), A = Math.min(
|
|
4995
|
-
return A - N + 1 < F && (N = Math.max(1, A - F + 1), A = Math.min(
|
|
4996
|
-
}, [
|
|
4997
|
-
|
|
4994
|
+
let N = Math.max(1, r - B), A = Math.min(y, N + F - 1);
|
|
4995
|
+
return A - N + 1 < F && (N = Math.max(1, A - F + 1), A = Math.min(y, N + F - 1)), Array.from({ length: A - N + 1 }, (E, C) => N + C);
|
|
4996
|
+
}, [c, t, r, o])(), x = r > 1, v = c || r < o, b = s && !c, D = s && !c, h = (y) => {
|
|
4997
|
+
y >= 1 && (c || y <= o) && n(y);
|
|
4998
4998
|
}, g = $(() => {
|
|
4999
|
-
const
|
|
4999
|
+
const y = Y(
|
|
5000
5000
|
"flex items-center justify-center min-w-fit",
|
|
5001
5001
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
5002
5002
|
In[a],
|
|
5003
5003
|
"rounded-md"
|
|
5004
5004
|
);
|
|
5005
|
-
return
|
|
5005
|
+
return Y(y, An[l], f);
|
|
5006
5006
|
}, [l, a, f]);
|
|
5007
5007
|
return /* @__PURE__ */ w(
|
|
5008
5008
|
"nav",
|
|
5009
5009
|
{
|
|
5010
5010
|
ref: i,
|
|
5011
|
-
className:
|
|
5011
|
+
className: Y("flex items-center justify-center gap-1", d),
|
|
5012
5012
|
role: "navigation",
|
|
5013
5013
|
"aria-label": "Pagination",
|
|
5014
5014
|
"data-page": r,
|
|
5015
|
-
"data-page-count":
|
|
5015
|
+
"data-page-count": c ? "infinite" : o,
|
|
5016
5016
|
...u,
|
|
5017
5017
|
children: [
|
|
5018
5018
|
b && /* @__PURE__ */ w(
|
|
@@ -5041,23 +5041,23 @@ function wa({
|
|
|
5041
5041
|
]
|
|
5042
5042
|
}
|
|
5043
5043
|
),
|
|
5044
|
-
!
|
|
5044
|
+
!c && p.map((y) => /* @__PURE__ */ e(
|
|
5045
5045
|
"button",
|
|
5046
5046
|
{
|
|
5047
|
-
onClick: () => h(
|
|
5048
|
-
className:
|
|
5049
|
-
"aria-label": `Go to page ${
|
|
5050
|
-
"aria-current":
|
|
5051
|
-
children:
|
|
5047
|
+
onClick: () => h(y),
|
|
5048
|
+
className: Y(g(), "aspect-square"),
|
|
5049
|
+
"aria-label": `Go to page ${y}`,
|
|
5050
|
+
"aria-current": y === r ? !0 : void 0,
|
|
5051
|
+
children: y
|
|
5052
5052
|
},
|
|
5053
|
-
|
|
5053
|
+
y
|
|
5054
5054
|
)),
|
|
5055
5055
|
/* @__PURE__ */ w(
|
|
5056
5056
|
"button",
|
|
5057
5057
|
{
|
|
5058
5058
|
onClick: () => h(r + 1),
|
|
5059
5059
|
className: g(),
|
|
5060
|
-
disabled: !
|
|
5060
|
+
disabled: !v,
|
|
5061
5061
|
"aria-label": "Go to next page",
|
|
5062
5062
|
children: [
|
|
5063
5063
|
/* @__PURE__ */ e("span", { className: "mr-1", children: "Next" }),
|
|
@@ -5111,9 +5111,9 @@ function Mn(r, o) {
|
|
|
5111
5111
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
5112
5112
|
);
|
|
5113
5113
|
if (l.length > 0) {
|
|
5114
|
-
const
|
|
5115
|
-
if (
|
|
5116
|
-
|
|
5114
|
+
const d = Array.from(l).filter((i) => !(i instanceof HTMLButtonElement && i.getAttribute("data-panel-close-button") === "true"));
|
|
5115
|
+
if (d.length > 0) {
|
|
5116
|
+
d[0].focus();
|
|
5117
5117
|
return;
|
|
5118
5118
|
}
|
|
5119
5119
|
l[0].focus();
|
|
@@ -5125,18 +5125,7 @@ function Mn(r, o) {
|
|
|
5125
5125
|
document.body.style.overflow = "auto", t.current instanceof HTMLElement && t.current.focus();
|
|
5126
5126
|
}), [o, s]);
|
|
5127
5127
|
}
|
|
5128
|
-
|
|
5129
|
-
size: {
|
|
5130
|
-
sm: "max-w-sm",
|
|
5131
|
-
md: "max-w-md",
|
|
5132
|
-
lg: "max-w-lg",
|
|
5133
|
-
xl: "max-w-xl",
|
|
5134
|
-
"2xl": "max-w-2xl",
|
|
5135
|
-
full: "w-full",
|
|
5136
|
-
screen: "w-screen"
|
|
5137
|
-
}
|
|
5138
|
-
};
|
|
5139
|
-
function ka({
|
|
5128
|
+
function wa({
|
|
5140
5129
|
ref: r,
|
|
5141
5130
|
id: o,
|
|
5142
5131
|
isOpen: t,
|
|
@@ -5144,21 +5133,20 @@ function ka({
|
|
|
5144
5133
|
title: n,
|
|
5145
5134
|
children: a,
|
|
5146
5135
|
footer: l,
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
ariaDescribedBy: p
|
|
5136
|
+
className: d,
|
|
5137
|
+
overlayClassName: i,
|
|
5138
|
+
hideCloseButton: f = !1,
|
|
5139
|
+
disableCloseOnOverlayClick: u = !1,
|
|
5140
|
+
ariaLabelledBy: c,
|
|
5141
|
+
ariaDescribedBy: m
|
|
5154
5142
|
}) {
|
|
5155
|
-
const
|
|
5156
|
-
if (Mn(
|
|
5157
|
-
const
|
|
5143
|
+
const p = J(), x = o || `panel-${p}`, v = o ? `${o}-title` : `panel-title-${p}`, { show: b, shouldRender: D } = $n(t);
|
|
5144
|
+
if (Mn(x, D), zn(D, s), !D) return null;
|
|
5145
|
+
const h = () => n ? Z.isValidElement(n) ? /* @__PURE__ */ e("div", { children: n }) : /* @__PURE__ */ e("h2", { className: "text-2xl font-semibold", id: v, children: n }) : null, g = () => {
|
|
5158
5146
|
if (!l) return null;
|
|
5159
|
-
if (
|
|
5160
|
-
const
|
|
5161
|
-
return
|
|
5147
|
+
if (Z.isValidElement(l)) {
|
|
5148
|
+
const y = l, F = y.props.className || "";
|
|
5149
|
+
return Z.cloneElement(y, { className: Y("px-6 py-4", F) });
|
|
5162
5150
|
}
|
|
5163
5151
|
return /* @__PURE__ */ e("div", { className: "px-6 py-4", children: l });
|
|
5164
5152
|
};
|
|
@@ -5166,8 +5154,8 @@ function ka({
|
|
|
5166
5154
|
/* @__PURE__ */ w(
|
|
5167
5155
|
"div",
|
|
5168
5156
|
{
|
|
5169
|
-
"aria-labelledby":
|
|
5170
|
-
"aria-describedby":
|
|
5157
|
+
"aria-labelledby": c ?? n ? v : void 0,
|
|
5158
|
+
"aria-describedby": m,
|
|
5171
5159
|
role: "dialog",
|
|
5172
5160
|
"aria-modal": "true",
|
|
5173
5161
|
className: "fixed inset-0 z-[100] overflow-hidden",
|
|
@@ -5176,33 +5164,30 @@ function ka({
|
|
|
5176
5164
|
/* @__PURE__ */ e(
|
|
5177
5165
|
"div",
|
|
5178
5166
|
{
|
|
5179
|
-
className:
|
|
5167
|
+
className: Y(
|
|
5180
5168
|
"fixed inset-0 bg-black/40 transition-opacity duration-300",
|
|
5181
|
-
|
|
5182
|
-
|
|
5169
|
+
b ? "opacity-100" : "opacity-0",
|
|
5170
|
+
i
|
|
5183
5171
|
),
|
|
5184
5172
|
onClick: () => {
|
|
5185
|
-
|
|
5173
|
+
u || s();
|
|
5186
5174
|
}
|
|
5187
5175
|
}
|
|
5188
5176
|
),
|
|
5189
5177
|
/* @__PURE__ */ e("div", { className: "fixed inset-y-0 right-0 flex max-w-full", children: /* @__PURE__ */ e(
|
|
5190
5178
|
"div",
|
|
5191
5179
|
{
|
|
5192
|
-
id:
|
|
5180
|
+
id: x,
|
|
5193
5181
|
ref: r,
|
|
5194
5182
|
tabIndex: -1,
|
|
5195
|
-
className:
|
|
5196
|
-
"relative h-full transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out",
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
D ? "translate-x-0" : "translate-x-full",
|
|
5200
|
-
i
|
|
5183
|
+
className: Y(
|
|
5184
|
+
"relative h-full max-w-md transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out border-l border-border",
|
|
5185
|
+
b ? "translate-x-0" : "translate-x-full",
|
|
5186
|
+
d
|
|
5201
5187
|
),
|
|
5202
|
-
"data-panel-size": c,
|
|
5203
5188
|
children: /* @__PURE__ */ w("div", { className: "flex h-full flex-col", children: [
|
|
5204
|
-
n && /* @__PURE__ */ e("div", { className: "px-6 pt-6", children:
|
|
5205
|
-
!
|
|
5189
|
+
n && /* @__PURE__ */ e("div", { className: "px-6 pt-6", children: h() }),
|
|
5190
|
+
!f && /* @__PURE__ */ e(
|
|
5206
5191
|
"button",
|
|
5207
5192
|
{
|
|
5208
5193
|
type: "button",
|
|
@@ -5213,8 +5198,8 @@ function ka({
|
|
|
5213
5198
|
children: /* @__PURE__ */ e(be, { size: 18 })
|
|
5214
5199
|
}
|
|
5215
5200
|
),
|
|
5216
|
-
/* @__PURE__ */ e("div", { className:
|
|
5217
|
-
|
|
5201
|
+
/* @__PURE__ */ e("div", { className: Y("flex-1 overflow-y-auto px-6 pb-6", n ? "pt-6" : "pt-10"), children: a }),
|
|
5202
|
+
g()
|
|
5218
5203
|
] })
|
|
5219
5204
|
}
|
|
5220
5205
|
) })
|
|
@@ -5224,7 +5209,7 @@ function ka({
|
|
|
5224
5209
|
document.body
|
|
5225
5210
|
) });
|
|
5226
5211
|
}
|
|
5227
|
-
const
|
|
5212
|
+
const Tn = {
|
|
5228
5213
|
thin: {
|
|
5229
5214
|
horizontal: "h-px",
|
|
5230
5215
|
vertical: "w-px"
|
|
@@ -5241,11 +5226,11 @@ const Bn = {
|
|
|
5241
5226
|
horizontal: "h-2",
|
|
5242
5227
|
vertical: "w-2"
|
|
5243
5228
|
}
|
|
5244
|
-
},
|
|
5229
|
+
}, Bn = {
|
|
5245
5230
|
horizontal: "w-full",
|
|
5246
5231
|
vertical: "min-h-4 h-full"
|
|
5247
5232
|
};
|
|
5248
|
-
function
|
|
5233
|
+
function ka({
|
|
5249
5234
|
orientation: r = "horizontal",
|
|
5250
5235
|
decorative: o = !1,
|
|
5251
5236
|
thickness: t = "thin",
|
|
@@ -5254,8 +5239,8 @@ function Na({
|
|
|
5254
5239
|
}) {
|
|
5255
5240
|
const a = k(
|
|
5256
5241
|
"shrink-0 bg-border",
|
|
5257
|
-
|
|
5258
|
-
|
|
5242
|
+
Bn[r],
|
|
5243
|
+
Tn[t][r],
|
|
5259
5244
|
s
|
|
5260
5245
|
);
|
|
5261
5246
|
return /* @__PURE__ */ e(
|
|
@@ -5285,7 +5270,7 @@ const qe = {
|
|
|
5285
5270
|
xl: "space-y-6"
|
|
5286
5271
|
}
|
|
5287
5272
|
};
|
|
5288
|
-
function
|
|
5273
|
+
function Na({
|
|
5289
5274
|
shape: r = "rectangle",
|
|
5290
5275
|
lineSpacing: o = "sm",
|
|
5291
5276
|
className: t,
|
|
@@ -5294,7 +5279,7 @@ function Da({
|
|
|
5294
5279
|
ref: a,
|
|
5295
5280
|
...l
|
|
5296
5281
|
}) {
|
|
5297
|
-
const
|
|
5282
|
+
const d = k("bg-muted/70", n && "animate-pulse", qe.shape[r], t);
|
|
5298
5283
|
return s > 1 ? /* @__PURE__ */ e(
|
|
5299
5284
|
"div",
|
|
5300
5285
|
{
|
|
@@ -5311,7 +5296,7 @@ function Da({
|
|
|
5311
5296
|
"div",
|
|
5312
5297
|
{
|
|
5313
5298
|
className: k(
|
|
5314
|
-
|
|
5299
|
+
d,
|
|
5315
5300
|
// Make last line shorter for a more natural text appearance
|
|
5316
5301
|
f === s - 1 && "w-3/4"
|
|
5317
5302
|
),
|
|
@@ -5327,7 +5312,7 @@ function Da({
|
|
|
5327
5312
|
"div",
|
|
5328
5313
|
{
|
|
5329
5314
|
ref: a,
|
|
5330
|
-
className:
|
|
5315
|
+
className: d,
|
|
5331
5316
|
role: "presentation",
|
|
5332
5317
|
"aria-hidden": "true",
|
|
5333
5318
|
"data-testid": "skeleton",
|
|
@@ -5337,7 +5322,7 @@ function Da({
|
|
|
5337
5322
|
}
|
|
5338
5323
|
);
|
|
5339
5324
|
}
|
|
5340
|
-
function
|
|
5325
|
+
function Da({
|
|
5341
5326
|
id: r,
|
|
5342
5327
|
value: o,
|
|
5343
5328
|
defaultValue: t = 0,
|
|
@@ -5345,17 +5330,17 @@ function Ca({
|
|
|
5345
5330
|
min: n = 0,
|
|
5346
5331
|
max: a = 100,
|
|
5347
5332
|
step: l = 1,
|
|
5348
|
-
disabled:
|
|
5333
|
+
disabled: d = !1,
|
|
5349
5334
|
trackClassName: i,
|
|
5350
5335
|
rangeClassName: f,
|
|
5351
5336
|
thumbClassName: u,
|
|
5352
|
-
className:
|
|
5337
|
+
className: c,
|
|
5353
5338
|
ref: m,
|
|
5354
5339
|
ariaLabel: p,
|
|
5355
5340
|
ariaLabelledBy: x,
|
|
5356
|
-
...
|
|
5341
|
+
...v
|
|
5357
5342
|
}) {
|
|
5358
|
-
const [b, D] = R(t), h = o !== void 0, g = h ? o : b,
|
|
5343
|
+
const [b, D] = R(t), h = o !== void 0, g = h ? o : b, y = q(null), F = q(!1), B = q(0), N = $(
|
|
5359
5344
|
(M) => {
|
|
5360
5345
|
const I = Math.max(n, Math.min(a, M)), G = Math.round(I / l) * l;
|
|
5361
5346
|
h || D(G), s == null || s(G);
|
|
@@ -5364,7 +5349,7 @@ function Ca({
|
|
|
5364
5349
|
), A = $(
|
|
5365
5350
|
(M, I = !1) => {
|
|
5366
5351
|
var re;
|
|
5367
|
-
const G = (re =
|
|
5352
|
+
const G = (re = y.current) == null ? void 0 : re.getBoundingClientRect();
|
|
5368
5353
|
if (!G) return g;
|
|
5369
5354
|
let W = M.clientX;
|
|
5370
5355
|
I && (W = W - B.current);
|
|
@@ -5374,17 +5359,17 @@ function Ca({
|
|
|
5374
5359
|
[n, a, g]
|
|
5375
5360
|
), E = $(
|
|
5376
5361
|
(M) => {
|
|
5377
|
-
if (
|
|
5362
|
+
if (d || M.target !== M.currentTarget) return;
|
|
5378
5363
|
const I = A(M);
|
|
5379
5364
|
N(I);
|
|
5380
5365
|
},
|
|
5381
|
-
[
|
|
5366
|
+
[d, A, N]
|
|
5382
5367
|
), C = $(
|
|
5383
5368
|
(M) => {
|
|
5384
5369
|
var re;
|
|
5385
|
-
if (
|
|
5370
|
+
if (d) return;
|
|
5386
5371
|
M.stopPropagation(), F.current = !0;
|
|
5387
|
-
const I = (re =
|
|
5372
|
+
const I = (re = y.current) == null ? void 0 : re.getBoundingClientRect(), G = M.currentTarget.getBoundingClientRect();
|
|
5388
5373
|
if (I && G) {
|
|
5389
5374
|
const L = G.left + G.width / 2;
|
|
5390
5375
|
B.current = M.clientX - L;
|
|
@@ -5406,10 +5391,10 @@ function Ca({
|
|
|
5406
5391
|
};
|
|
5407
5392
|
document.addEventListener("pointermove", W), document.addEventListener("pointerup", Q);
|
|
5408
5393
|
},
|
|
5409
|
-
[
|
|
5394
|
+
[d, A, N]
|
|
5410
5395
|
), z = $(
|
|
5411
5396
|
(M) => {
|
|
5412
|
-
if (
|
|
5397
|
+
if (d) return;
|
|
5413
5398
|
let I = g;
|
|
5414
5399
|
switch (M.key) {
|
|
5415
5400
|
case "ArrowRight":
|
|
@@ -5437,31 +5422,31 @@ function Ca({
|
|
|
5437
5422
|
}
|
|
5438
5423
|
M.preventDefault(), N(I);
|
|
5439
5424
|
},
|
|
5440
|
-
[
|
|
5425
|
+
[d, g, l, n, a, N]
|
|
5441
5426
|
), T = a === n ? 0 : (g - n) / (a - n) * 100;
|
|
5442
5427
|
return /* @__PURE__ */ e(
|
|
5443
5428
|
"div",
|
|
5444
5429
|
{
|
|
5445
5430
|
id: r,
|
|
5446
5431
|
ref: m,
|
|
5447
|
-
className:
|
|
5432
|
+
className: Y(
|
|
5448
5433
|
"relative flex items-center w-full touch-none select-none",
|
|
5449
|
-
|
|
5450
|
-
|
|
5434
|
+
d && "opacity-50 cursor-not-allowed",
|
|
5435
|
+
c
|
|
5451
5436
|
),
|
|
5452
|
-
"data-disabled":
|
|
5437
|
+
"data-disabled": d,
|
|
5453
5438
|
"data-value": g,
|
|
5454
5439
|
"data-min": n,
|
|
5455
5440
|
"data-max": a,
|
|
5456
5441
|
"data-step": l,
|
|
5457
|
-
...
|
|
5442
|
+
...v,
|
|
5458
5443
|
children: /* @__PURE__ */ w(
|
|
5459
5444
|
"div",
|
|
5460
5445
|
{
|
|
5461
|
-
ref:
|
|
5462
|
-
className:
|
|
5446
|
+
ref: y,
|
|
5447
|
+
className: Y(
|
|
5463
5448
|
"relative h-1.5 w-full rounded-full bg-muted cursor-pointer",
|
|
5464
|
-
|
|
5449
|
+
d && "cursor-not-allowed",
|
|
5465
5450
|
i
|
|
5466
5451
|
),
|
|
5467
5452
|
onPointerDown: E,
|
|
@@ -5469,7 +5454,7 @@ function Ca({
|
|
|
5469
5454
|
/* @__PURE__ */ e(
|
|
5470
5455
|
"div",
|
|
5471
5456
|
{
|
|
5472
|
-
className:
|
|
5457
|
+
className: Y(
|
|
5473
5458
|
"absolute h-full rounded-full pointer-events-none",
|
|
5474
5459
|
// pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior
|
|
5475
5460
|
!F.current && "transition-all",
|
|
@@ -5481,22 +5466,22 @@ function Ca({
|
|
|
5481
5466
|
/* @__PURE__ */ e(
|
|
5482
5467
|
"div",
|
|
5483
5468
|
{
|
|
5484
|
-
className:
|
|
5469
|
+
className: Y(
|
|
5485
5470
|
"absolute size-5 -top-2 rounded-full shadow-md cursor-grab",
|
|
5486
|
-
|
|
5487
|
-
!
|
|
5471
|
+
d && "cursor-not-allowed",
|
|
5472
|
+
!d && "cursor-grab focus:outline-none focus:ring-2",
|
|
5488
5473
|
F.current ? "cursor-grabbing scale-110" : "transition-all",
|
|
5489
5474
|
u
|
|
5490
5475
|
),
|
|
5491
5476
|
style: { left: `calc(${T}% - 10px)` },
|
|
5492
|
-
tabIndex:
|
|
5477
|
+
tabIndex: d ? -1 : 0,
|
|
5493
5478
|
role: "slider",
|
|
5494
5479
|
"aria-valuemin": n,
|
|
5495
5480
|
"aria-valuemax": a,
|
|
5496
5481
|
"aria-valuenow": g,
|
|
5497
5482
|
"aria-label": p,
|
|
5498
5483
|
"aria-labelledby": x,
|
|
5499
|
-
"aria-disabled":
|
|
5484
|
+
"aria-disabled": d,
|
|
5500
5485
|
onKeyDown: z,
|
|
5501
5486
|
onPointerDown: C
|
|
5502
5487
|
}
|
|
@@ -5507,7 +5492,7 @@ function Ca({
|
|
|
5507
5492
|
}
|
|
5508
5493
|
);
|
|
5509
5494
|
}
|
|
5510
|
-
function
|
|
5495
|
+
function Rn({
|
|
5511
5496
|
data: r,
|
|
5512
5497
|
initialSort: o = { key: null, direction: null }
|
|
5513
5498
|
}) {
|
|
@@ -5517,31 +5502,31 @@ function Ln({
|
|
|
5517
5502
|
const p = n(i, f);
|
|
5518
5503
|
return t.direction === "desc" ? -p : p;
|
|
5519
5504
|
}
|
|
5520
|
-
const u = i[t.key],
|
|
5521
|
-
if (u ===
|
|
5505
|
+
const u = i[t.key], c = f[t.key];
|
|
5506
|
+
if (u === c) return 0;
|
|
5522
5507
|
let m = 0;
|
|
5523
|
-
return typeof u == "string" && typeof
|
|
5508
|
+
return typeof u == "string" && typeof c == "string" ? m = u.localeCompare(c) : typeof u == "number" && typeof c == "number" ? m = u - c : u instanceof Date && c instanceof Date ? m = u.getTime() - c.getTime() : m = String(u).localeCompare(String(c)), t.direction === "desc" ? -m : m;
|
|
5524
5509
|
}), [r, t, n]), sortConfig: t, handleSort: (i, f) => {
|
|
5525
5510
|
a(() => f), s((u) => {
|
|
5526
5511
|
if (u.key === i) {
|
|
5527
|
-
const
|
|
5528
|
-
return { key:
|
|
5512
|
+
const c = u.direction === "asc" ? "desc" : u.direction === "desc" ? null : "asc";
|
|
5513
|
+
return { key: c ? i : null, direction: c };
|
|
5529
5514
|
} else
|
|
5530
5515
|
return { key: i, direction: "asc" };
|
|
5531
5516
|
});
|
|
5532
5517
|
} };
|
|
5533
5518
|
}
|
|
5534
|
-
function
|
|
5519
|
+
function Ln({ initialSelected: r = [] } = {}) {
|
|
5535
5520
|
const [o, t] = R(new Set(r));
|
|
5536
5521
|
return {
|
|
5537
5522
|
selectedRows: o,
|
|
5538
5523
|
isRowSelected: (u) => o.has(u),
|
|
5539
5524
|
selectRow: (u) => {
|
|
5540
|
-
t((
|
|
5525
|
+
t((c) => /* @__PURE__ */ new Set([...c, u]));
|
|
5541
5526
|
},
|
|
5542
5527
|
deselectRow: (u) => {
|
|
5543
|
-
t((
|
|
5544
|
-
const m = new Set(
|
|
5528
|
+
t((c) => {
|
|
5529
|
+
const m = new Set(c);
|
|
5545
5530
|
return m.delete(u), m;
|
|
5546
5531
|
});
|
|
5547
5532
|
},
|
|
@@ -5551,14 +5536,14 @@ function Vn({ initialSelected: r = [] } = {}) {
|
|
|
5551
5536
|
deselectAll: () => {
|
|
5552
5537
|
t(/* @__PURE__ */ new Set());
|
|
5553
5538
|
},
|
|
5554
|
-
isAllSelected: (u) => u.length > 0 && u.every((
|
|
5539
|
+
isAllSelected: (u) => u.length > 0 && u.every((c) => o.has(c)),
|
|
5555
5540
|
isPartiallySelected: (u) => {
|
|
5556
|
-
const
|
|
5557
|
-
return
|
|
5541
|
+
const c = u.filter((m) => o.has(m)).length;
|
|
5542
|
+
return c > 0 && c < u.length;
|
|
5558
5543
|
}
|
|
5559
5544
|
};
|
|
5560
5545
|
}
|
|
5561
|
-
const
|
|
5546
|
+
const Vn = {
|
|
5562
5547
|
sm: {
|
|
5563
5548
|
container: "text-sm",
|
|
5564
5549
|
table: "w-full border-collapse",
|
|
@@ -5593,7 +5578,7 @@ const Gn = {
|
|
|
5593
5578
|
checkboxSize: 18
|
|
5594
5579
|
}
|
|
5595
5580
|
};
|
|
5596
|
-
function
|
|
5581
|
+
function Ca({
|
|
5597
5582
|
id: r,
|
|
5598
5583
|
className: o,
|
|
5599
5584
|
ref: t,
|
|
@@ -5601,19 +5586,19 @@ function Ea({
|
|
|
5601
5586
|
data: n,
|
|
5602
5587
|
columns: a,
|
|
5603
5588
|
selectable: l = !1,
|
|
5604
|
-
getRowId:
|
|
5589
|
+
getRowId: d = (h, g) => g,
|
|
5605
5590
|
initialSelected: i = [],
|
|
5606
5591
|
onSelectionChange: f,
|
|
5607
5592
|
showHeader: u = !0,
|
|
5608
|
-
striped:
|
|
5593
|
+
striped: c = !1,
|
|
5609
5594
|
hoverable: m = !0,
|
|
5610
5595
|
emptyState: p,
|
|
5611
5596
|
loading: x = !1,
|
|
5612
|
-
loadingContent:
|
|
5597
|
+
loadingContent: v,
|
|
5613
5598
|
caption: b,
|
|
5614
5599
|
...D
|
|
5615
5600
|
}) {
|
|
5616
|
-
const h =
|
|
5601
|
+
const h = Vn[s], { sortedData: g, sortConfig: y, handleSort: F } = Rn({
|
|
5617
5602
|
data: n,
|
|
5618
5603
|
initialSort: { key: null, direction: null }
|
|
5619
5604
|
}), {
|
|
@@ -5625,8 +5610,8 @@ function Ea({
|
|
|
5625
5610
|
deselectAll: z,
|
|
5626
5611
|
isAllSelected: T,
|
|
5627
5612
|
isPartiallySelected: M
|
|
5628
|
-
} =
|
|
5629
|
-
|
|
5613
|
+
} = Ln({ initialSelected: i }), I = n.map((L, K) => d(L, K));
|
|
5614
|
+
Z.useEffect(() => {
|
|
5630
5615
|
f && f(Array.from(B));
|
|
5631
5616
|
}, [B, f]);
|
|
5632
5617
|
const G = () => {
|
|
@@ -5651,7 +5636,7 @@ function Ea({
|
|
|
5651
5636
|
ref: t,
|
|
5652
5637
|
className: k("flex items-center justify-center p-8", h.container, o),
|
|
5653
5638
|
...D,
|
|
5654
|
-
children:
|
|
5639
|
+
children: v || /* @__PURE__ */ e("div", { children: "Loading..." })
|
|
5655
5640
|
}
|
|
5656
5641
|
) : n.length === 0 ? /* @__PURE__ */ e(
|
|
5657
5642
|
"div",
|
|
@@ -5691,13 +5676,13 @@ function Ea({
|
|
|
5691
5676
|
}
|
|
5692
5677
|
) }),
|
|
5693
5678
|
a.map((L) => {
|
|
5694
|
-
const K =
|
|
5679
|
+
const K = y.key === L.key ? y.direction : null;
|
|
5695
5680
|
return /* @__PURE__ */ e(
|
|
5696
5681
|
"th",
|
|
5697
5682
|
{
|
|
5698
5683
|
className: k(h.headerCell, re(L.align), L.headerClassName),
|
|
5699
5684
|
role: "columnheader",
|
|
5700
|
-
"aria-sort":
|
|
5685
|
+
"aria-sort": y.key === L.key ? y.direction === "asc" ? "ascending" : y.direction === "desc" ? "descending" : "none" : L.sortable ? "none" : void 0,
|
|
5701
5686
|
children: L.sortable ? /* @__PURE__ */ w(
|
|
5702
5687
|
"button",
|
|
5703
5688
|
{
|
|
@@ -5731,7 +5716,7 @@ function Ea({
|
|
|
5731
5716
|
})
|
|
5732
5717
|
] }) }),
|
|
5733
5718
|
/* @__PURE__ */ e("tbody", { role: "rowgroup", children: g.map((L, K) => {
|
|
5734
|
-
const ae =
|
|
5719
|
+
const ae = d(L, K), le = N(ae), ie = K === g.length - 1;
|
|
5735
5720
|
return /* @__PURE__ */ w(
|
|
5736
5721
|
"tr",
|
|
5737
5722
|
{
|
|
@@ -5739,7 +5724,7 @@ function Ea({
|
|
|
5739
5724
|
"transition-all",
|
|
5740
5725
|
!ie && "border-b border-border",
|
|
5741
5726
|
m && "hover:bg-accent/15",
|
|
5742
|
-
|
|
5727
|
+
c && K % 2 === 1 && "bg-accent/25",
|
|
5743
5728
|
le && h.selectedRow
|
|
5744
5729
|
),
|
|
5745
5730
|
role: "row",
|
|
@@ -5777,16 +5762,16 @@ function Ea({
|
|
|
5777
5762
|
}
|
|
5778
5763
|
);
|
|
5779
5764
|
}
|
|
5780
|
-
const
|
|
5781
|
-
const [s, n] = R(r || ""), a = o !== void 0, l = a ? o : s,
|
|
5765
|
+
const Gn = ({ defaultValue: r, value: o, onValueChange: t } = {}) => {
|
|
5766
|
+
const [s, n] = R(r || ""), a = o !== void 0, l = a ? o : s, d = $((i) => {
|
|
5782
5767
|
a || n(i), t == null || t(i);
|
|
5783
5768
|
}, [a, t]);
|
|
5784
5769
|
return {
|
|
5785
5770
|
value: l,
|
|
5786
|
-
onValueChange:
|
|
5771
|
+
onValueChange: d
|
|
5787
5772
|
};
|
|
5788
5773
|
};
|
|
5789
|
-
function
|
|
5774
|
+
function Ea({
|
|
5790
5775
|
defaultValue: r,
|
|
5791
5776
|
value: o,
|
|
5792
5777
|
onValueChange: t,
|
|
@@ -5794,26 +5779,26 @@ function Fa({
|
|
|
5794
5779
|
variant: n = "underline",
|
|
5795
5780
|
className: a,
|
|
5796
5781
|
children: l,
|
|
5797
|
-
ref:
|
|
5782
|
+
ref: d,
|
|
5798
5783
|
id: i,
|
|
5799
5784
|
triggersClassName: f,
|
|
5800
5785
|
contentClassName: u
|
|
5801
5786
|
}) {
|
|
5802
|
-
const { value:
|
|
5787
|
+
const { value: c, onValueChange: m } = Gn({
|
|
5803
5788
|
defaultValue: r,
|
|
5804
5789
|
value: o,
|
|
5805
5790
|
onValueChange: t
|
|
5806
5791
|
}), p = {
|
|
5807
|
-
selectedValue:
|
|
5792
|
+
selectedValue: c,
|
|
5808
5793
|
onValueChange: m,
|
|
5809
5794
|
tabsWidth: s,
|
|
5810
5795
|
variant: n,
|
|
5811
5796
|
triggersClassName: f,
|
|
5812
5797
|
contentClassName: u
|
|
5813
5798
|
};
|
|
5814
|
-
return /* @__PURE__ */ e(kt.Provider, { value: p, children: /* @__PURE__ */ e("div", { id: i, ref:
|
|
5799
|
+
return /* @__PURE__ */ e(kt.Provider, { value: p, children: /* @__PURE__ */ e("div", { id: i, ref: d, className: a, "data-tabs-width": s, "data-variant": n, children: l }) });
|
|
5815
5800
|
}
|
|
5816
|
-
function
|
|
5801
|
+
function Fa({ value: r, className: o, children: t, ref: s }) {
|
|
5817
5802
|
const { selectedValue: n, contentClassName: a } = Te(), l = n === r;
|
|
5818
5803
|
return l ? /* @__PURE__ */ e(
|
|
5819
5804
|
"div",
|
|
@@ -5840,12 +5825,12 @@ const He = {
|
|
|
5840
5825
|
pills: "",
|
|
5841
5826
|
bordered: "border border-border rounded-lg p-1"
|
|
5842
5827
|
}
|
|
5843
|
-
},
|
|
5828
|
+
}, jn = {
|
|
5844
5829
|
underline: "border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground",
|
|
5845
5830
|
pills: "rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30",
|
|
5846
5831
|
bordered: "rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30"
|
|
5847
5832
|
};
|
|
5848
|
-
function
|
|
5833
|
+
function Sa({ children: r, className: o, id: t, ref: s }) {
|
|
5849
5834
|
const { tabsWidth: n, variant: a } = Te();
|
|
5850
5835
|
return /* @__PURE__ */ e(
|
|
5851
5836
|
"div",
|
|
@@ -5860,8 +5845,8 @@ function Aa({ children: r, className: o, id: t, ref: s }) {
|
|
|
5860
5845
|
}
|
|
5861
5846
|
);
|
|
5862
5847
|
}
|
|
5863
|
-
function
|
|
5864
|
-
const { selectedValue:
|
|
5848
|
+
function Aa({ value: r, disabled: o = !1, className: t, children: s, onClick: n, id: a, ref: l }) {
|
|
5849
|
+
const { selectedValue: d, onValueChange: i, variant: f, triggersClassName: u } = Te(), c = d === r, m = (x) => {
|
|
5865
5850
|
o || i(r), n == null || n(x);
|
|
5866
5851
|
};
|
|
5867
5852
|
return /* @__PURE__ */ e(
|
|
@@ -5871,15 +5856,15 @@ function Ia({ value: r, disabled: o = !1, className: t, children: s, onClick: n,
|
|
|
5871
5856
|
ref: l,
|
|
5872
5857
|
role: "tab",
|
|
5873
5858
|
type: "button",
|
|
5874
|
-
"aria-selected":
|
|
5859
|
+
"aria-selected": c,
|
|
5875
5860
|
"aria-controls": `tabs-content-${r}`,
|
|
5876
|
-
"data-state":
|
|
5861
|
+
"data-state": c ? "active" : "inactive",
|
|
5877
5862
|
"data-value": r,
|
|
5878
5863
|
disabled: o,
|
|
5879
5864
|
className: k(
|
|
5880
5865
|
"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
5881
|
-
|
|
5882
|
-
|
|
5866
|
+
c ? "font-medium" : "font-light",
|
|
5867
|
+
jn[f],
|
|
5883
5868
|
u,
|
|
5884
5869
|
t
|
|
5885
5870
|
),
|
|
@@ -5888,7 +5873,7 @@ function Ia({ value: r, disabled: o = !1, className: t, children: s, onClick: n,
|
|
|
5888
5873
|
}
|
|
5889
5874
|
);
|
|
5890
5875
|
}
|
|
5891
|
-
const
|
|
5876
|
+
const Wn = {
|
|
5892
5877
|
sm: {
|
|
5893
5878
|
container: "h-5 min-w-9 w-9",
|
|
5894
5879
|
thumb: "h-4 w-4",
|
|
@@ -5904,7 +5889,7 @@ const _n = {
|
|
|
5904
5889
|
thumb: "h-6 w-6",
|
|
5905
5890
|
translate: "translate-x-6"
|
|
5906
5891
|
}
|
|
5907
|
-
},
|
|
5892
|
+
}, _n = {
|
|
5908
5893
|
default: {
|
|
5909
5894
|
unchecked: "bg-muted",
|
|
5910
5895
|
checked: "bg-primary"
|
|
@@ -5917,35 +5902,35 @@ const _n = {
|
|
|
5917
5902
|
unchecked: "bg-muted",
|
|
5918
5903
|
checked: "bg-destructive"
|
|
5919
5904
|
}
|
|
5920
|
-
},
|
|
5905
|
+
}, Ye = {
|
|
5921
5906
|
variant: "default",
|
|
5922
5907
|
size: "md"
|
|
5923
5908
|
};
|
|
5924
|
-
function
|
|
5909
|
+
function Ia({
|
|
5925
5910
|
ref: r,
|
|
5926
5911
|
id: o,
|
|
5927
|
-
size: t =
|
|
5928
|
-
variant: s =
|
|
5912
|
+
size: t = Ye.size,
|
|
5913
|
+
variant: s = Ye.variant,
|
|
5929
5914
|
checked: n,
|
|
5930
5915
|
onCheckedChange: a,
|
|
5931
5916
|
disabled: l = !1,
|
|
5932
|
-
className:
|
|
5917
|
+
className: d,
|
|
5933
5918
|
thumbClassName: i,
|
|
5934
5919
|
backgroundClassNames: f,
|
|
5935
5920
|
...u
|
|
5936
5921
|
}) {
|
|
5937
|
-
const
|
|
5922
|
+
const c = J(), m = ne(() => o || `toggle-${c}`, [o, c]), [p, x] = R(n);
|
|
5938
5923
|
V(() => {
|
|
5939
5924
|
x(n);
|
|
5940
5925
|
}, [n]);
|
|
5941
|
-
const
|
|
5926
|
+
const v = () => {
|
|
5942
5927
|
if (!l) {
|
|
5943
5928
|
const F = !p;
|
|
5944
5929
|
n === void 0 && x(F), a == null || a(F);
|
|
5945
5930
|
}
|
|
5946
5931
|
}, b = (F) => {
|
|
5947
|
-
(F.key === " " || F.key === "Enter") && (F.preventDefault(),
|
|
5948
|
-
}, D =
|
|
5932
|
+
(F.key === " " || F.key === "Enter") && (F.preventDefault(), v());
|
|
5933
|
+
}, D = Wn[t], h = _n[s], g = k(
|
|
5949
5934
|
// Base styles
|
|
5950
5935
|
"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out",
|
|
5951
5936
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
@@ -5956,8 +5941,8 @@ function $a({
|
|
|
5956
5941
|
// Disabled state
|
|
5957
5942
|
l && "opacity-50 cursor-not-allowed",
|
|
5958
5943
|
!l && "cursor-pointer",
|
|
5959
|
-
|
|
5960
|
-
),
|
|
5944
|
+
d
|
|
5945
|
+
), y = k(
|
|
5961
5946
|
// Base thumb styles
|
|
5962
5947
|
"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",
|
|
5963
5948
|
// Size
|
|
@@ -5977,64 +5962,64 @@ function $a({
|
|
|
5977
5962
|
"aria-checked": p,
|
|
5978
5963
|
"aria-disabled": l,
|
|
5979
5964
|
disabled: l,
|
|
5980
|
-
onClick:
|
|
5965
|
+
onClick: v,
|
|
5981
5966
|
onKeyDown: b,
|
|
5982
5967
|
className: g,
|
|
5983
5968
|
...u,
|
|
5984
5969
|
children: [
|
|
5985
|
-
/* @__PURE__ */ e("span", { className:
|
|
5970
|
+
/* @__PURE__ */ e("span", { className: y }),
|
|
5986
5971
|
/* @__PURE__ */ e("span", { className: "sr-only", children: p ? "Enabled" : "Disabled" })
|
|
5987
5972
|
]
|
|
5988
5973
|
}
|
|
5989
5974
|
);
|
|
5990
5975
|
}
|
|
5991
5976
|
export {
|
|
5992
|
-
|
|
5977
|
+
ea as Accordion,
|
|
5993
5978
|
Ce as AccordionItem,
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5979
|
+
Ma as ActionModal,
|
|
5980
|
+
ta as Avatar,
|
|
5981
|
+
ra as Badge,
|
|
5997
5982
|
Qt as Button,
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
5983
|
+
na as Calendar,
|
|
5984
|
+
aa as Callout,
|
|
5985
|
+
oa as Card,
|
|
5986
|
+
sa as Carousel,
|
|
6002
5987
|
$e as Checkbox,
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
5988
|
+
la as Clickable,
|
|
5989
|
+
ia as Code,
|
|
5990
|
+
ca as CodeBlock,
|
|
5991
|
+
da as Disclosure,
|
|
5992
|
+
ua as Drawer,
|
|
5993
|
+
fa as DropdownMenu,
|
|
5994
|
+
ma as DropdownMenuFactories,
|
|
5995
|
+
pa as DynamicList,
|
|
5996
|
+
ha as ErrorBoundary,
|
|
5997
|
+
ga as Form,
|
|
5998
|
+
ba as FormFactories,
|
|
5999
|
+
xa as HelpIcon,
|
|
6015
6000
|
dn as Input,
|
|
6016
6001
|
pe as Label,
|
|
6017
6002
|
qt as LoadingDots,
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6003
|
+
ya as Modal,
|
|
6004
|
+
va as Pagination,
|
|
6005
|
+
wa as Panel,
|
|
6021
6006
|
Rr as Popover,
|
|
6022
6007
|
Dn as RadioGroup,
|
|
6023
6008
|
Ie as RadioGroupItem,
|
|
6024
6009
|
kn as RadioInput,
|
|
6025
6010
|
vn as ScrollArea,
|
|
6026
6011
|
wn as Select,
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6012
|
+
ka as Separator,
|
|
6013
|
+
Na as Skeleton,
|
|
6014
|
+
Da as Slider,
|
|
6015
|
+
Ca as Table,
|
|
6016
|
+
Ea as Tabs,
|
|
6017
|
+
Fa as TabsContent,
|
|
6018
|
+
Sa as TabsList,
|
|
6019
|
+
Aa as TabsTrigger,
|
|
6035
6020
|
hn as Textarea,
|
|
6036
|
-
|
|
6037
|
-
|
|
6021
|
+
Ta as Toast,
|
|
6022
|
+
Ia as Toggle,
|
|
6038
6023
|
Cn as Tooltip
|
|
6039
6024
|
};
|
|
6040
6025
|
//# sourceMappingURL=components.esm.js.map
|