@uxuissk/design-system 0.8.5 → 0.8.6
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/sellsuki-ds.css +1 -1
- package/dist/sellsuki-ds.js +281 -264
- package/dist/sellsuki-ds.umd.cjs +18 -18
- package/package.json +1 -1
package/dist/sellsuki-ds.js
CHANGED
|
@@ -198,14 +198,14 @@ const Fr = {
|
|
|
198
198
|
className: W = "",
|
|
199
199
|
...M
|
|
200
200
|
}, F) => {
|
|
201
|
-
const [L,
|
|
201
|
+
const [L, E] = j(!1), [C, N] = j(!1), [S, A] = j(w ?? ""), I = y !== void 0 ? y : S, _ = String(I).length, H = M.maxLength, B = Fr[l], q = Wr[i], R = n ? "error" : d, K = m === "password", ae = K && C ? "text" : m, G = Q(
|
|
202
202
|
(T) => {
|
|
203
203
|
A(T.target.value), z == null || z(T);
|
|
204
204
|
},
|
|
205
205
|
[z]
|
|
206
206
|
), re = Q(() => {
|
|
207
207
|
A(""), $ == null || $();
|
|
208
|
-
}, [$]), Y = String(
|
|
208
|
+
}, [$]), Y = String(I).length > 0;
|
|
209
209
|
return /* @__PURE__ */ a("div", { className: `${p ? "w-full" : "inline-flex flex-col"} ${W}`, children: [
|
|
210
210
|
t && /* @__PURE__ */ a("label", { className: "block mb-1.5 text-foreground", children: [
|
|
211
211
|
t,
|
|
@@ -220,7 +220,7 @@ const Fr = {
|
|
|
220
220
|
${k ? "" : q.hover}
|
|
221
221
|
${L && !k ? q.focus : ""}
|
|
222
222
|
${k ? "opacity-50 cursor-not-allowed" : ""}
|
|
223
|
-
${Mr[
|
|
223
|
+
${Mr[R]}
|
|
224
224
|
`,
|
|
225
225
|
children: [
|
|
226
226
|
c && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-muted-foreground", children: c }),
|
|
@@ -231,10 +231,10 @@ const Fr = {
|
|
|
231
231
|
ref: F,
|
|
232
232
|
type: ae,
|
|
233
233
|
disabled: k || u,
|
|
234
|
-
value:
|
|
234
|
+
value: I,
|
|
235
235
|
onChange: G,
|
|
236
|
-
onFocus: () =>
|
|
237
|
-
onBlur: () =>
|
|
236
|
+
onFocus: () => E(!0),
|
|
237
|
+
onBlur: () => E(!1),
|
|
238
238
|
className: "flex-1 min-w-0 bg-transparent border-none outline-none text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed",
|
|
239
239
|
style: B.textStyle,
|
|
240
240
|
...M
|
|
@@ -264,18 +264,18 @@ const Fr = {
|
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
),
|
|
267
|
-
g &&
|
|
268
|
-
|
|
267
|
+
g && H && /* @__PURE__ */ a("div", { className: "flex justify-end mt-1", style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", color: _ >= H ? "var(--destructive)" : "var(--muted-foreground)" }, children: [
|
|
268
|
+
_,
|
|
269
269
|
" / ",
|
|
270
|
-
|
|
270
|
+
H
|
|
271
271
|
] }),
|
|
272
272
|
(r || n || o) && /* @__PURE__ */ a("div", { className: "mt-1.5 flex items-center gap-1", children: [
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
R === "error" && /* @__PURE__ */ e(Pe, { size: 12, className: "text-destructive flex-shrink-0" }),
|
|
274
|
+
R === "success" && /* @__PURE__ */ e($e, { size: 12, className: "text-chart-2 flex-shrink-0" }),
|
|
275
275
|
/* @__PURE__ */ e(
|
|
276
276
|
"span",
|
|
277
277
|
{
|
|
278
|
-
className: `${
|
|
278
|
+
className: `${R === "error" ? "text-destructive" : R === "success" ? "text-chart-2" : "text-muted-foreground"}`,
|
|
279
279
|
style: ot,
|
|
280
280
|
children: n || o || r
|
|
281
281
|
}
|
|
@@ -760,7 +760,7 @@ function yi({
|
|
|
760
760
|
footer: w,
|
|
761
761
|
fullWidth: z = !1
|
|
762
762
|
}) {
|
|
763
|
-
const [W, M] = j(!1), [F, L] = j(() => t ?? /* @__PURE__ */ new Date()), [
|
|
763
|
+
const [W, M] = j(!1), [F, L] = j(() => t ?? /* @__PURE__ */ new Date()), [E, C] = j("days"), [N, S] = j(null), [A, I] = j(() => t ? t.getHours() : 0), [_, H] = j(() => t ? t.getMinutes() : 0), B = V(null), q = V(null), R = V(null), [K, ae] = j(null), G = so[h];
|
|
764
764
|
ne(() => {
|
|
765
765
|
if (!W || !q.current) return;
|
|
766
766
|
const O = () => {
|
|
@@ -773,7 +773,7 @@ function yi({
|
|
|
773
773
|
}, [W, l, g]), ne(() => {
|
|
774
774
|
function O(ee) {
|
|
775
775
|
var be, De;
|
|
776
|
-
const ye = ee.target, oe = ((be = B.current) == null ? void 0 : be.contains(ye)) ?? !1, je = ((De =
|
|
776
|
+
const ye = ee.target, oe = ((be = B.current) == null ? void 0 : be.contains(ye)) ?? !1, je = ((De = R.current) == null ? void 0 : De.contains(ye)) ?? !1;
|
|
777
777
|
!oe && !je && (M(!1), C("days"));
|
|
778
778
|
}
|
|
779
779
|
return W && document.addEventListener("mousedown", O), () => document.removeEventListener("mousedown", O);
|
|
@@ -786,25 +786,25 @@ function yi({
|
|
|
786
786
|
if (!Zt(O, $, k, m))
|
|
787
787
|
if (l === "single") {
|
|
788
788
|
let ee = new Date(O);
|
|
789
|
-
g && ee.setHours(A,
|
|
789
|
+
g && ee.setHours(A, _), n == null || n(ee), g || (M(!1), C("days"));
|
|
790
790
|
} else {
|
|
791
791
|
const ee = r == null ? void 0 : r.start, ye = r == null ? void 0 : r.end;
|
|
792
792
|
!ee || ee && ye ? o == null || o({ start: O, end: null }) : (O < ee ? o == null || o({ start: O, end: ee }) : o == null || o({ start: ee, end: O }), M(!1), C("days"));
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
|
-
[l, n, o, r, $, k, m, g, A,
|
|
795
|
+
[l, n, o, r, $, k, m, g, A, _]
|
|
796
796
|
), ze = (O) => {
|
|
797
797
|
O.stopPropagation(), l === "single" ? n == null || n(null) : o == null || o({ start: null, end: null });
|
|
798
798
|
}, Ye = () => {
|
|
799
799
|
const O = /* @__PURE__ */ new Date();
|
|
800
800
|
if (L(O), l === "single") {
|
|
801
801
|
const ee = new Date(O);
|
|
802
|
-
g && ee.setHours(A,
|
|
802
|
+
g && ee.setHours(A, _), n == null || n(ee), g || (M(!1), C("days"));
|
|
803
803
|
}
|
|
804
804
|
}, Z = () => {
|
|
805
805
|
if (t) {
|
|
806
806
|
const O = new Date(t);
|
|
807
|
-
O.setHours(A,
|
|
807
|
+
O.setHours(A, _), n == null || n(O);
|
|
808
808
|
}
|
|
809
809
|
M(!1), C("days");
|
|
810
810
|
}, Fe = se(() => l === "single" ? et(t, g) : r != null && r.start && (r != null && r.end) ? `${et(r.start)} – ${et(r.end)}` : r != null && r.start ? `${et(r.start)} – ...` : "", [l, t, r, g]), Le = l === "single" ? !!t : !!(r != null && r.start || r != null && r.end), xe = x === "error" ? /* @__PURE__ */ e(Pe, { size: G.icon, className: "text-destructive flex-shrink-0" }) : x === "success" ? /* @__PURE__ */ e($e, { size: G.icon, className: "text-chart-2 flex-shrink-0" }) : null, Te = x === "error" ? s : x === "success" ? f : c, Ve = x === "error" ? "text-destructive" : x === "success" ? "text-chart-2" : "text-muted-foreground", mt = {
|
|
@@ -860,7 +860,7 @@ function yi({
|
|
|
860
860
|
/* @__PURE__ */ a(
|
|
861
861
|
"div",
|
|
862
862
|
{
|
|
863
|
-
ref:
|
|
863
|
+
ref: R,
|
|
864
864
|
className: "bg-popover border border-border rounded-[var(--radius-md)] shadow-elevation-sm overflow-hidden",
|
|
865
865
|
style: {
|
|
866
866
|
position: "fixed",
|
|
@@ -879,7 +879,7 @@ function yi({
|
|
|
879
879
|
/* @__PURE__ */ e(
|
|
880
880
|
"button",
|
|
881
881
|
{
|
|
882
|
-
onClick: () => C(
|
|
882
|
+
onClick: () => C(E === "months" ? "days" : "months"),
|
|
883
883
|
className: "px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",
|
|
884
884
|
style: le,
|
|
885
885
|
children: bt[F.getMonth()]
|
|
@@ -888,7 +888,7 @@ function yi({
|
|
|
888
888
|
/* @__PURE__ */ e(
|
|
889
889
|
"button",
|
|
890
890
|
{
|
|
891
|
-
onClick: () => C(
|
|
891
|
+
onClick: () => C(E === "years" ? "days" : "years"),
|
|
892
892
|
className: "px-2 py-1 rounded-[var(--radius-sm)] hover:bg-muted text-foreground transition-colors cursor-pointer",
|
|
893
893
|
style: le,
|
|
894
894
|
children: F.getFullYear()
|
|
@@ -900,7 +900,7 @@ function yi({
|
|
|
900
900
|
/* @__PURE__ */ e("button", { onClick: X, className: "p-1 rounded-[var(--radius-sm)] hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer", title: "Next year", children: /* @__PURE__ */ e(Ct, { size: 16 }) })
|
|
901
901
|
] })
|
|
902
902
|
] }),
|
|
903
|
-
|
|
903
|
+
E === "days" && /* @__PURE__ */ e("div", { className: `p-3 ${l === "range" ? "flex gap-3" : ""}`, children: (l === "range" ? [0, 1] : [0]).map((O) => {
|
|
904
904
|
const ee = new Date(F.getFullYear(), F.getMonth() + O, 1), ye = Xt(ee.getFullYear(), ee.getMonth());
|
|
905
905
|
return /* @__PURE__ */ a("div", { className: "flex-1", children: [
|
|
906
906
|
O > 0 && /* @__PURE__ */ a("div", { className: "text-center mb-2 text-foreground", style: le, children: [
|
|
@@ -945,7 +945,7 @@ function yi({
|
|
|
945
945
|
}) })
|
|
946
946
|
] }, O);
|
|
947
947
|
}) }),
|
|
948
|
-
|
|
948
|
+
E === "months" && /* @__PURE__ */ e("div", { className: "p-3 grid grid-cols-3 gap-2", children: bt.map((O, ee) => /* @__PURE__ */ e(
|
|
949
949
|
"button",
|
|
950
950
|
{
|
|
951
951
|
onClick: () => {
|
|
@@ -960,7 +960,7 @@ function yi({
|
|
|
960
960
|
},
|
|
961
961
|
O
|
|
962
962
|
)) }),
|
|
963
|
-
|
|
963
|
+
E === "years" && /* @__PURE__ */ a("div", { className: "p-3", children: [
|
|
964
964
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-3", children: [
|
|
965
965
|
/* @__PURE__ */ e(
|
|
966
966
|
"button",
|
|
@@ -1001,7 +1001,7 @@ function yi({
|
|
|
1001
1001
|
O
|
|
1002
1002
|
)) })
|
|
1003
1003
|
] }),
|
|
1004
|
-
g && l === "single" &&
|
|
1004
|
+
g && l === "single" && E === "days" && /* @__PURE__ */ a("div", { className: "px-4 py-3 border-t border-border flex items-center gap-3", children: [
|
|
1005
1005
|
/* @__PURE__ */ e(jt, { size: 14, className: "text-muted-foreground" }),
|
|
1006
1006
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
|
|
1007
1007
|
/* @__PURE__ */ e(
|
|
@@ -1011,7 +1011,7 @@ function yi({
|
|
|
1011
1011
|
min: 0,
|
|
1012
1012
|
max: 23,
|
|
1013
1013
|
value: String(A).padStart(2, "0"),
|
|
1014
|
-
onChange: (O) =>
|
|
1014
|
+
onChange: (O) => I(Math.max(0, Math.min(23, Number(O.target.value)))),
|
|
1015
1015
|
className: "w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",
|
|
1016
1016
|
style: le
|
|
1017
1017
|
}
|
|
@@ -1023,8 +1023,8 @@ function yi({
|
|
|
1023
1023
|
type: "number",
|
|
1024
1024
|
min: 0,
|
|
1025
1025
|
max: 59,
|
|
1026
|
-
value: String(
|
|
1027
|
-
onChange: (O) =>
|
|
1026
|
+
value: String(_).padStart(2, "0"),
|
|
1027
|
+
onChange: (O) => H(Math.max(0, Math.min(59, Number(O.target.value)))),
|
|
1028
1028
|
className: "w-10 text-center bg-input-background border border-border rounded-[var(--radius-sm)] py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-ring/30",
|
|
1029
1029
|
style: le
|
|
1030
1030
|
}
|
|
@@ -1273,10 +1273,10 @@ function Ni({
|
|
|
1273
1273
|
!u && L >= 1 && L <= r && n(L);
|
|
1274
1274
|
},
|
|
1275
1275
|
[u, r, n]
|
|
1276
|
-
), z = (L,
|
|
1276
|
+
), z = (L, E) => `inline-flex items-center justify-center rounded-[var(--radius-md)] transition-all cursor-pointer select-none
|
|
1277
1277
|
${m.btn}
|
|
1278
|
-
${
|
|
1279
|
-
${L ? y.active : `${y.base} ${
|
|
1278
|
+
${E ? "opacity-40 pointer-events-none cursor-default" : ""}
|
|
1279
|
+
${L ? y.active : `${y.base} ${E ? "" : y.hover}`}`, W = h ? (t - 1) * s + 1 : 0, M = h ? Math.min(t * s, h) : 0, F = {
|
|
1280
1280
|
fontFamily: "var(--font-label)",
|
|
1281
1281
|
fontSize: "var(--text-label)",
|
|
1282
1282
|
fontWeight: "var(--weight-label)"
|
|
@@ -1339,7 +1339,7 @@ function Ni({
|
|
|
1339
1339
|
children: g ?? /* @__PURE__ */ e(Me, { size: m.icon })
|
|
1340
1340
|
}
|
|
1341
1341
|
),
|
|
1342
|
-
k.map((L,
|
|
1342
|
+
k.map((L, E) => L === "dots-left" || L === "dots-right" ? /* @__PURE__ */ e(
|
|
1343
1343
|
"span",
|
|
1344
1344
|
{
|
|
1345
1345
|
className: `inline-flex items-center justify-center text-muted-foreground ${m.btn}`,
|
|
@@ -1432,7 +1432,7 @@ function $i({
|
|
|
1432
1432
|
}, []), ne(() => {
|
|
1433
1433
|
$(c.length > 0 && y.length > 0), m(-1);
|
|
1434
1434
|
}, [c, y]);
|
|
1435
|
-
const
|
|
1435
|
+
const E = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }, C = { fontFamily: "var(--font-label)", fontSize: "var(--text-button)", fontWeight: "var(--weight-button)" };
|
|
1436
1436
|
return /* @__PURE__ */ a("div", { ref: z, className: `relative ${u}`, children: [
|
|
1437
1437
|
/* @__PURE__ */ a("div", { className: `relative rounded-[var(--radius-md)] transition-all ${vo[i]} ${h ? "opacity-50 pointer-events-none" : ""}`, children: [
|
|
1438
1438
|
/* @__PURE__ */ e("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none", children: /* @__PURE__ */ e(qe, { size: M.icon }) }),
|
|
@@ -1478,7 +1478,7 @@ function $i({
|
|
|
1478
1478
|
children: [
|
|
1479
1479
|
N.icon && /* @__PURE__ */ e("span", { className: "text-muted-foreground flex-shrink-0", children: N.icon }),
|
|
1480
1480
|
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
|
|
1481
|
-
/* @__PURE__ */ e("span", { className: "text-foreground block truncate", style:
|
|
1481
|
+
/* @__PURE__ */ e("span", { className: "text-foreground block truncate", style: E, children: N.label }),
|
|
1482
1482
|
N.description && /* @__PURE__ */ e("span", { className: "text-muted-foreground block truncate", style: { marginTop: "var(--Spacing--Spacing-xxs)", ...C }, children: N.description })
|
|
1483
1483
|
] })
|
|
1484
1484
|
]
|
|
@@ -1511,19 +1511,19 @@ function Si({
|
|
|
1511
1511
|
}) {
|
|
1512
1512
|
const [b, g] = j(null), [$, k] = j("asc"), [m, y] = j(/* @__PURE__ */ new Set()), w = c ?? m, z = (A) => {
|
|
1513
1513
|
c || y(A), s == null || s(A);
|
|
1514
|
-
}, W = se(() => b ? [...r].sort((A,
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1517
|
-
if (
|
|
1518
|
-
const B = typeof
|
|
1514
|
+
}, W = se(() => b ? [...r].sort((A, I) => {
|
|
1515
|
+
const _ = A[b], H = I[b];
|
|
1516
|
+
if (_ == null) return 1;
|
|
1517
|
+
if (H == null) return -1;
|
|
1518
|
+
const B = typeof _ == "string" ? _.localeCompare(H) : _ - H;
|
|
1519
1519
|
return $ === "asc" ? B : -B;
|
|
1520
1520
|
}) : r, [r, b, $]), M = (A) => {
|
|
1521
|
-
b === A ? k((
|
|
1522
|
-
}, F = r.length > 0 && w.size === r.length, L = w.size > 0 && !F,
|
|
1523
|
-
z(F ? /* @__PURE__ */ new Set() : new Set(r.map((A,
|
|
1521
|
+
b === A ? k((I) => I === "asc" ? "desc" : "asc") : (g(A), k("asc"));
|
|
1522
|
+
}, F = r.length > 0 && w.size === r.length, L = w.size > 0 && !F, E = () => {
|
|
1523
|
+
z(F ? /* @__PURE__ */ new Set() : new Set(r.map((A, I) => I)));
|
|
1524
1524
|
}, C = (A) => {
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1525
|
+
const I = new Set(w);
|
|
1526
|
+
I.has(A) ? I.delete(A) : I.add(A), z(I);
|
|
1527
1527
|
}, N = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-label)" }, S = { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", fontWeight: "var(--weight-button)" };
|
|
1528
1528
|
return /* @__PURE__ */ e("div", { className: `${u ? "" : "rounded-[var(--radius-md)] border border-border"} overflow-hidden ${p}`, children: /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a("table", { className: "w-full border-collapse", children: [
|
|
1529
1529
|
/* @__PURE__ */ e("thead", { className: x ? "sticky top-0 z-10" : "", children: /* @__PURE__ */ a("tr", { className: "border-b border-border", style: { backgroundColor: "color-mix(in srgb, var(--muted) 30%, var(--background) 70%)" }, children: [
|
|
@@ -1533,7 +1533,7 @@ function Si({
|
|
|
1533
1533
|
size: "sm",
|
|
1534
1534
|
checked: F,
|
|
1535
1535
|
indeterminate: L,
|
|
1536
|
-
onChange:
|
|
1536
|
+
onChange: E
|
|
1537
1537
|
}
|
|
1538
1538
|
) }),
|
|
1539
1539
|
t.map((A) => /* @__PURE__ */ e(
|
|
@@ -1553,33 +1553,33 @@ function Si({
|
|
|
1553
1553
|
/* @__PURE__ */ e("tbody", { children: f ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${Ee[n]} text-center text-muted-foreground`, children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center gap-2 py-8", children: [
|
|
1554
1554
|
/* @__PURE__ */ e("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }),
|
|
1555
1555
|
/* @__PURE__ */ e("span", { style: N, children: "Loading..." })
|
|
1556
|
-
] }) }) }) : h ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${Ee[n]} text-center py-12`, children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e("span", { style: { ...N, color: "var(--destructive)" }, children: h }) }) }) }) : W.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${Ee[n]} text-center text-muted-foreground py-12`, children: /* @__PURE__ */ e("span", { style: N, children: v }) }) }) : W.map((A,
|
|
1557
|
-
const
|
|
1556
|
+
] }) }) }) : h ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${Ee[n]} text-center py-12`, children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e("span", { style: { ...N, color: "var(--destructive)" }, children: h }) }) }) }) : W.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (d ? 1 : 0), className: `${Ee[n]} text-center text-muted-foreground py-12`, children: /* @__PURE__ */ e("span", { style: N, children: v }) }) }) : W.map((A, I) => {
|
|
1557
|
+
const _ = w.has(I);
|
|
1558
1558
|
return /* @__PURE__ */ a(
|
|
1559
1559
|
"tr",
|
|
1560
1560
|
{
|
|
1561
|
-
className: `border-b border-border last:border-b-0 transition-colors ${
|
|
1561
|
+
className: `border-b border-border last:border-b-0 transition-colors ${_ ? "bg-primary/5" : o && I % 2 === 1 ? "bg-muted/20" : "bg-card"} ${l ? "hover:bg-[var(--row-hover-bg)]" : ""}`,
|
|
1562
1562
|
children: [
|
|
1563
1563
|
d && /* @__PURE__ */ e("td", { className: `${Ee[n]} w-12`, children: /* @__PURE__ */ e(
|
|
1564
1564
|
st,
|
|
1565
1565
|
{
|
|
1566
1566
|
size: "sm",
|
|
1567
|
-
checked:
|
|
1568
|
-
onChange: () => C(
|
|
1567
|
+
checked: _,
|
|
1568
|
+
onChange: () => C(I)
|
|
1569
1569
|
}
|
|
1570
1570
|
) }),
|
|
1571
|
-
t.map((
|
|
1571
|
+
t.map((H) => /* @__PURE__ */ e(
|
|
1572
1572
|
"td",
|
|
1573
1573
|
{
|
|
1574
|
-
className: `${Ee[n]} text-${
|
|
1574
|
+
className: `${Ee[n]} text-${H.align ?? "left"} text-foreground ${i ? "border-x border-border first:border-l-0 last:border-r-0" : ""}`,
|
|
1575
1575
|
style: N,
|
|
1576
|
-
children:
|
|
1576
|
+
children: H.render ? H.render(A[H.key], A, I) : A[H.key]
|
|
1577
1577
|
},
|
|
1578
|
-
|
|
1578
|
+
H.key
|
|
1579
1579
|
))
|
|
1580
1580
|
]
|
|
1581
1581
|
},
|
|
1582
|
-
|
|
1582
|
+
I
|
|
1583
1583
|
);
|
|
1584
1584
|
}) })
|
|
1585
1585
|
] }) }) });
|
|
@@ -2202,18 +2202,18 @@ const Go = {
|
|
|
2202
2202
|
creatable: M = !1,
|
|
2203
2203
|
onCreateOption: F,
|
|
2204
2204
|
createLabel: L = 'Create "{query}"',
|
|
2205
|
-
emptyState:
|
|
2205
|
+
emptyState: E,
|
|
2206
2206
|
footer: C,
|
|
2207
2207
|
onSearch: N,
|
|
2208
2208
|
searchDebounce: S = 300,
|
|
2209
2209
|
searchLoading: A = !1,
|
|
2210
|
-
renderOption:
|
|
2211
|
-
},
|
|
2212
|
-
const [
|
|
2210
|
+
renderOption: I
|
|
2211
|
+
}, _) => {
|
|
2212
|
+
const [H, B] = j(!1), [q, R] = j(""), [K, ae] = j(-1), [G, re] = j(
|
|
2213
2213
|
n ?? (g ? [] : "")
|
|
2214
2214
|
), Y = r ?? G, T = V(null), J = V(null), X = V(null), ue = V(null), [ze, Ye] = j({ top: 0, left: 0, width: 0 }), Z = Go[f], Fe = Uo[h];
|
|
2215
2215
|
ne(() => {
|
|
2216
|
-
if (!
|
|
2216
|
+
if (!H || !T.current) return;
|
|
2217
2217
|
const D = () => {
|
|
2218
2218
|
const P = T.current.getBoundingClientRect();
|
|
2219
2219
|
Ye({ top: P.bottom + 4, left: P.left, width: P.width });
|
|
@@ -2221,10 +2221,10 @@ const Go = {
|
|
|
2221
2221
|
return D(), window.addEventListener("scroll", D, !0), window.addEventListener("resize", D), () => {
|
|
2222
2222
|
window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D);
|
|
2223
2223
|
};
|
|
2224
|
-
}, [
|
|
2224
|
+
}, [H]);
|
|
2225
2225
|
const Le = Q(
|
|
2226
2226
|
(D) => {
|
|
2227
|
-
|
|
2227
|
+
R(D), N && (ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
|
|
2228
2228
|
N(D);
|
|
2229
2229
|
}, S));
|
|
2230
2230
|
},
|
|
@@ -2267,7 +2267,7 @@ const Go = {
|
|
|
2267
2267
|
re(P), o == null || o(P);
|
|
2268
2268
|
} else
|
|
2269
2269
|
re(D), o == null || o(D), B(!1);
|
|
2270
|
-
|
|
2270
|
+
R("");
|
|
2271
2271
|
},
|
|
2272
2272
|
[Y, g, $, o]
|
|
2273
2273
|
), le = se(
|
|
@@ -2288,7 +2288,7 @@ const Go = {
|
|
|
2288
2288
|
re(D), o == null || o(D);
|
|
2289
2289
|
}
|
|
2290
2290
|
}, [g, he, Y, le, $, o]), ye = Q(() => {
|
|
2291
|
-
q.trim() && (F == null || F(q.trim()),
|
|
2291
|
+
q.trim() && (F == null || F(q.trim()), R(""));
|
|
2292
2292
|
}, [q, F]), oe = se(() => !M || !q.trim() ? !1 : !t.some((D) => D.label.toLowerCase() === q.toLowerCase()), [M, q, t]), je = Q(
|
|
2293
2293
|
(D) => {
|
|
2294
2294
|
D.stopPropagation();
|
|
@@ -2302,7 +2302,7 @@ const Go = {
|
|
|
2302
2302
|
if (!(x || u))
|
|
2303
2303
|
switch (D.key) {
|
|
2304
2304
|
case "ArrowDown":
|
|
2305
|
-
D.preventDefault(),
|
|
2305
|
+
D.preventDefault(), H ? ae(
|
|
2306
2306
|
(U) => U < be.length - 1 ? U + 1 : 0
|
|
2307
2307
|
) : B(!0);
|
|
2308
2308
|
break;
|
|
@@ -2313,7 +2313,7 @@ const Go = {
|
|
|
2313
2313
|
break;
|
|
2314
2314
|
case "Enter":
|
|
2315
2315
|
case " ":
|
|
2316
|
-
if (D.preventDefault(),
|
|
2316
|
+
if (D.preventDefault(), H && K >= 0) {
|
|
2317
2317
|
const U = be[K];
|
|
2318
2318
|
U && !U.disabled && Ce(U.value);
|
|
2319
2319
|
} else
|
|
@@ -2324,20 +2324,20 @@ const Go = {
|
|
|
2324
2324
|
break;
|
|
2325
2325
|
}
|
|
2326
2326
|
},
|
|
2327
|
-
[x, u,
|
|
2327
|
+
[x, u, H, K, be, Ce]
|
|
2328
2328
|
);
|
|
2329
2329
|
ne(() => {
|
|
2330
2330
|
const D = (P) => {
|
|
2331
2331
|
const U = P.target;
|
|
2332
|
-
T.current && !T.current.contains(U) && J.current && !J.current.contains(U) && (B(!1),
|
|
2332
|
+
T.current && !T.current.contains(U) && J.current && !J.current.contains(U) && (B(!1), R(""));
|
|
2333
2333
|
};
|
|
2334
2334
|
return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
2335
2335
|
}, []), ne(() => {
|
|
2336
|
-
|
|
2336
|
+
H && p && setTimeout(() => {
|
|
2337
2337
|
var D;
|
|
2338
2338
|
return (D = X.current) == null ? void 0 : D.focus();
|
|
2339
|
-
}, 50),
|
|
2340
|
-
}, [
|
|
2339
|
+
}, 50), H && ae(-1);
|
|
2340
|
+
}, [H, p]);
|
|
2341
2341
|
const Ae = g ? Array.isArray(Y) && Y.length > 0 : !!Y, Be = c ? "error" : v, rn = () => {
|
|
2342
2342
|
const D = Ve, P = W && W > 0 ? W : D.length, U = D.slice(0, P), _e = D.length - U.length;
|
|
2343
2343
|
return /* @__PURE__ */ a("span", { className: "flex flex-wrap gap-1", children: [
|
|
@@ -2379,7 +2379,7 @@ const Go = {
|
|
|
2379
2379
|
] });
|
|
2380
2380
|
}, Ht = (D, P) => {
|
|
2381
2381
|
const U = mt(D.value);
|
|
2382
|
-
return
|
|
2382
|
+
return I ? /* @__PURE__ */ e(
|
|
2383
2383
|
"button",
|
|
2384
2384
|
{
|
|
2385
2385
|
type: "button",
|
|
@@ -2394,7 +2394,7 @@ const Go = {
|
|
|
2394
2394
|
style: Z.optionStyle,
|
|
2395
2395
|
onClick: () => !D.disabled && Ce(D.value),
|
|
2396
2396
|
onMouseEnter: () => ae(P),
|
|
2397
|
-
children:
|
|
2397
|
+
children: I(D, U)
|
|
2398
2398
|
},
|
|
2399
2399
|
D.value
|
|
2400
2400
|
) : /* @__PURE__ */ a(
|
|
@@ -2450,7 +2450,7 @@ const Go = {
|
|
|
2450
2450
|
);
|
|
2451
2451
|
};
|
|
2452
2452
|
let Rt = 0;
|
|
2453
|
-
return /* @__PURE__ */ a("div", { ref:
|
|
2453
|
+
return /* @__PURE__ */ a("div", { ref: _, className: `relative w-full ${w}`, id: y, children: [
|
|
2454
2454
|
i && /* @__PURE__ */ a(
|
|
2455
2455
|
"label",
|
|
2456
2456
|
{
|
|
@@ -2468,15 +2468,15 @@ const Go = {
|
|
|
2468
2468
|
ref: T,
|
|
2469
2469
|
type: "button",
|
|
2470
2470
|
role: "combobox",
|
|
2471
|
-
"aria-expanded":
|
|
2471
|
+
"aria-expanded": H,
|
|
2472
2472
|
"aria-haspopup": "listbox",
|
|
2473
2473
|
disabled: x || u,
|
|
2474
|
-
onClick: () => !x && !u && B(!
|
|
2474
|
+
onClick: () => !x && !u && B(!H),
|
|
2475
2475
|
onKeyDown: De,
|
|
2476
2476
|
className: `w-full flex items-center rounded-[var(--radius-md)] transition-all duration-150 ${Z.trigger}
|
|
2477
2477
|
${Fe.base}
|
|
2478
2478
|
${!x && !u ? Fe.hover : ""}
|
|
2479
|
-
${
|
|
2479
|
+
${H ? Fe.focus : ""}
|
|
2480
2480
|
${x ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
2481
2481
|
${u ? "opacity-70 cursor-wait" : ""}
|
|
2482
2482
|
${Ko[Be]}
|
|
@@ -2497,13 +2497,13 @@ const Go = {
|
|
|
2497
2497
|
Ie,
|
|
2498
2498
|
{
|
|
2499
2499
|
size: Z.icon,
|
|
2500
|
-
className: `flex-shrink-0 text-muted-foreground transition-transform duration-200 ${
|
|
2500
|
+
className: `flex-shrink-0 text-muted-foreground transition-transform duration-200 ${H ? "rotate-180" : ""}`
|
|
2501
2501
|
}
|
|
2502
2502
|
)
|
|
2503
2503
|
]
|
|
2504
2504
|
}
|
|
2505
2505
|
),
|
|
2506
|
-
|
|
2506
|
+
H && Qe(
|
|
2507
2507
|
/* @__PURE__ */ a(
|
|
2508
2508
|
"div",
|
|
2509
2509
|
{
|
|
@@ -2568,7 +2568,7 @@ const Go = {
|
|
|
2568
2568
|
A ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-6 gap-2 text-muted-foreground", children: [
|
|
2569
2569
|
/* @__PURE__ */ e(Ze, { size: 16, className: "animate-spin" }),
|
|
2570
2570
|
/* @__PURE__ */ e("span", { style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)" }, children: "Searching\\u2026" })
|
|
2571
|
-
] }) : xe.length === 0 && !oe ?
|
|
2571
|
+
] }) : xe.length === 0 && !oe ? E ? /* @__PURE__ */ e("div", { className: "py-4 px-3", children: E }) : /* @__PURE__ */ a("div", { className: "text-center py-6 text-muted-foreground flex flex-col items-center gap-2", children: [
|
|
2572
2572
|
/* @__PURE__ */ e(cn, { size: 24, className: "opacity-40" }),
|
|
2573
2573
|
/* @__PURE__ */ e("span", { style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)" }, children: "No options found" })
|
|
2574
2574
|
] }) : k && Te ? Object.entries(Te).map(([D, P]) => /* @__PURE__ */ a("div", { children: [
|
|
@@ -4754,13 +4754,13 @@ function Hi({
|
|
|
4754
4754
|
}, L = () => {
|
|
4755
4755
|
const S = new Set(v);
|
|
4756
4756
|
b.forEach((A) => S.delete(A)), x(S), g(/* @__PURE__ */ new Set());
|
|
4757
|
-
},
|
|
4757
|
+
}, E = () => {
|
|
4758
4758
|
x(new Set(n.filter((S) => !S.disabled).map((S) => S.id))), p(/* @__PURE__ */ new Set());
|
|
4759
4759
|
}, C = () => {
|
|
4760
4760
|
x(/* @__PURE__ */ new Set()), g(/* @__PURE__ */ new Set());
|
|
4761
|
-
}, N = (S, A,
|
|
4762
|
-
const
|
|
4763
|
-
|
|
4761
|
+
}, N = (S, A, I) => {
|
|
4762
|
+
const _ = new Set(A);
|
|
4763
|
+
_.has(S) ? _.delete(S) : _.add(S), I(_);
|
|
4764
4764
|
};
|
|
4765
4765
|
return s ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center rounded-[var(--radius-md)] border border-border bg-card px-6 py-10 text-center", children: /* @__PURE__ */ e("span", { style: { fontFamily: "var(--font-label)", fontSize: "var(--text-label)", color: "var(--destructive)" }, children: s }) }) : c ? /* @__PURE__ */ e("div", { className: "flex items-stretch gap-3 flex-wrap opacity-60 pointer-events-none", children: [t, r].map((S) => /* @__PURE__ */ a("div", { className: "flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden", children: [
|
|
4766
4766
|
/* @__PURE__ */ e("div", { className: "px-3 py-2.5 border-b border-border bg-muted/30", children: /* @__PURE__ */ e("span", { style: Yr, children: S }) }),
|
|
@@ -4782,7 +4782,7 @@ function Hi({
|
|
|
4782
4782
|
/* @__PURE__ */ e(
|
|
4783
4783
|
"button",
|
|
4784
4784
|
{
|
|
4785
|
-
onClick:
|
|
4785
|
+
onClick: E,
|
|
4786
4786
|
disabled: w.length === 0,
|
|
4787
4787
|
className: "w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",
|
|
4788
4788
|
children: /* @__PURE__ */ e(Ct, { size: 14 })
|
|
@@ -5661,23 +5661,23 @@ function Zi({
|
|
|
5661
5661
|
}, []), L = se(
|
|
5662
5662
|
() => t.filter((T) => !W.has(T.key)),
|
|
5663
5663
|
[t, W]
|
|
5664
|
-
), [
|
|
5664
|
+
), [E, C] = j(/* @__PURE__ */ new Set()), N = f ?? E, S = Q(
|
|
5665
5665
|
(T) => {
|
|
5666
5666
|
f || C(T);
|
|
5667
5667
|
const J = r.filter((X) => T.has(X[n]));
|
|
5668
5668
|
h == null || h(T, J);
|
|
5669
5669
|
},
|
|
5670
5670
|
[f, r, n, h]
|
|
5671
|
-
), A = se(() => r.map((T) => T[n]), [r, n]),
|
|
5672
|
-
S(
|
|
5673
|
-
}, [
|
|
5671
|
+
), A = se(() => r.map((T) => T[n]), [r, n]), I = A.length > 0 && A.every((T) => N.has(T)), _ = N.size > 0 && !I, H = Q(() => {
|
|
5672
|
+
S(I ? /* @__PURE__ */ new Set() : new Set(A));
|
|
5673
|
+
}, [I, A, S]), B = Q(
|
|
5674
5674
|
(T) => {
|
|
5675
5675
|
const J = new Set(N);
|
|
5676
5676
|
J.has(T) ? J.delete(T) : J.add(T), S(J);
|
|
5677
5677
|
},
|
|
5678
5678
|
[N, S]
|
|
5679
|
-
), [q,
|
|
5680
|
-
|
|
5679
|
+
), [q, R] = j(/* @__PURE__ */ new Set()), K = Q((T) => {
|
|
5680
|
+
R((J) => {
|
|
5681
5681
|
const X = new Set(J);
|
|
5682
5682
|
return X.has(T) ? X.delete(T) : X.add(T), X;
|
|
5683
5683
|
});
|
|
@@ -5716,9 +5716,9 @@ function Zi({
|
|
|
5716
5716
|
st,
|
|
5717
5717
|
{
|
|
5718
5718
|
size: "sm",
|
|
5719
|
-
checked:
|
|
5720
|
-
indeterminate:
|
|
5721
|
-
onChange:
|
|
5719
|
+
checked: I,
|
|
5720
|
+
indeterminate: _ && !I,
|
|
5721
|
+
onChange: H
|
|
5722
5722
|
}
|
|
5723
5723
|
) }),
|
|
5724
5724
|
L.map((T) => {
|
|
@@ -5903,14 +5903,14 @@ function dl({
|
|
|
5903
5903
|
mr();
|
|
5904
5904
|
const v = V(null), [x, u] = j(null);
|
|
5905
5905
|
if (!t.length || !t[0].data.length) return null;
|
|
5906
|
-
const p = t[0].data.map((
|
|
5907
|
-
function M(
|
|
5908
|
-
return k.left +
|
|
5906
|
+
const p = t[0].data.map((E) => E.label), b = t.flatMap((E) => E.data.map((C) => C.value)), g = dt(b), $ = 0, k = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, m = n ?? 600, y = r, w = m - k.left - k.right, z = y - k.top - k.bottom, W = p.length > 1 ? w / (p.length - 1) : w;
|
|
5907
|
+
function M(E) {
|
|
5908
|
+
return k.left + E * W;
|
|
5909
5909
|
}
|
|
5910
|
-
function F(
|
|
5911
|
-
return k.top + z - (
|
|
5910
|
+
function F(E) {
|
|
5911
|
+
return k.top + z - (E - $) / (g - $ || 1) * z;
|
|
5912
5912
|
}
|
|
5913
|
-
const L = Array.from({ length: 5 }, (
|
|
5913
|
+
const L = Array.from({ length: 5 }, (E, C) => $ + C / 4 * (g - $));
|
|
5914
5914
|
return /* @__PURE__ */ a("div", { className: `w-full ${h}`, children: [
|
|
5915
5915
|
/* @__PURE__ */ a(
|
|
5916
5916
|
"svg",
|
|
@@ -5921,32 +5921,32 @@ function dl({
|
|
|
5921
5921
|
viewBox: `0 0 ${m} ${y}`,
|
|
5922
5922
|
onMouseLeave: () => u(null),
|
|
5923
5923
|
children: [
|
|
5924
|
-
i && L.map((
|
|
5924
|
+
i && L.map((E, C) => /* @__PURE__ */ e(
|
|
5925
5925
|
"line",
|
|
5926
5926
|
{
|
|
5927
5927
|
x1: k.left,
|
|
5928
|
-
y1: F(
|
|
5928
|
+
y1: F(E),
|
|
5929
5929
|
x2: m - k.right,
|
|
5930
|
-
y2: F(
|
|
5930
|
+
y2: F(E),
|
|
5931
5931
|
stroke: "var(--border)",
|
|
5932
5932
|
strokeWidth: 0.5,
|
|
5933
5933
|
strokeDasharray: "4 2"
|
|
5934
5934
|
},
|
|
5935
5935
|
C
|
|
5936
5936
|
)),
|
|
5937
|
-
l && L.map((
|
|
5937
|
+
l && L.map((E, C) => /* @__PURE__ */ e(
|
|
5938
5938
|
"text",
|
|
5939
5939
|
{
|
|
5940
5940
|
x: k.left - 8,
|
|
5941
|
-
y: F(
|
|
5941
|
+
y: F(E) + 4,
|
|
5942
5942
|
textAnchor: "end",
|
|
5943
5943
|
fill: "var(--muted-foreground)",
|
|
5944
5944
|
style: ce,
|
|
5945
|
-
children:
|
|
5945
|
+
children: E >= 1e3 ? `${(E / 1e3).toFixed(1)}k` : E
|
|
5946
5946
|
},
|
|
5947
5947
|
C
|
|
5948
5948
|
)),
|
|
5949
|
-
o && p.map((
|
|
5949
|
+
o && p.map((E, C) => {
|
|
5950
5950
|
const N = Math.max(1, Math.floor(p.length / 8));
|
|
5951
5951
|
return C % N !== 0 && C !== p.length - 1 ? null : /* @__PURE__ */ e(
|
|
5952
5952
|
"text",
|
|
@@ -5956,13 +5956,13 @@ function dl({
|
|
|
5956
5956
|
textAnchor: "middle",
|
|
5957
5957
|
fill: "var(--muted-foreground)",
|
|
5958
5958
|
style: ce,
|
|
5959
|
-
children:
|
|
5959
|
+
children: E
|
|
5960
5960
|
},
|
|
5961
5961
|
C
|
|
5962
5962
|
);
|
|
5963
5963
|
}),
|
|
5964
|
-
t.map((
|
|
5965
|
-
const N = pe(
|
|
5964
|
+
t.map((E, C) => {
|
|
5965
|
+
const N = pe(E, C), S = E.data.map((I, _) => [M(_), F(I.value)]), A = It(S, f);
|
|
5966
5966
|
return /* @__PURE__ */ a("g", { children: [
|
|
5967
5967
|
/* @__PURE__ */ e(
|
|
5968
5968
|
"path",
|
|
@@ -5975,21 +5975,21 @@ function dl({
|
|
|
5975
5975
|
strokeLinejoin: "round"
|
|
5976
5976
|
}
|
|
5977
5977
|
),
|
|
5978
|
-
s && S.map(([
|
|
5978
|
+
s && S.map(([I, _], H) => /* @__PURE__ */ e(
|
|
5979
5979
|
"circle",
|
|
5980
5980
|
{
|
|
5981
|
-
cx:
|
|
5982
|
-
cy:
|
|
5981
|
+
cx: I,
|
|
5982
|
+
cy: _,
|
|
5983
5983
|
r: 3,
|
|
5984
5984
|
fill: "var(--card)",
|
|
5985
5985
|
stroke: N,
|
|
5986
5986
|
strokeWidth: 2
|
|
5987
5987
|
},
|
|
5988
|
-
|
|
5988
|
+
H
|
|
5989
5989
|
))
|
|
5990
5990
|
] }, C);
|
|
5991
5991
|
}),
|
|
5992
|
-
c && p.map((
|
|
5992
|
+
c && p.map((E, C) => /* @__PURE__ */ e(
|
|
5993
5993
|
"rect",
|
|
5994
5994
|
{
|
|
5995
5995
|
x: M(C) - W / 2,
|
|
@@ -6019,12 +6019,12 @@ function dl({
|
|
|
6019
6019
|
x: Et(M(x.labelIdx) + 8, k.left, m - 180),
|
|
6020
6020
|
y: k.top,
|
|
6021
6021
|
label: p[x.labelIdx],
|
|
6022
|
-
items: t.map((
|
|
6022
|
+
items: t.map((E, C) => {
|
|
6023
6023
|
var N;
|
|
6024
6024
|
return {
|
|
6025
|
-
name:
|
|
6026
|
-
value: ((N =
|
|
6027
|
-
color: pe(
|
|
6025
|
+
name: E.name,
|
|
6026
|
+
value: ((N = E.data[x.labelIdx]) == null ? void 0 : N.value) ?? 0,
|
|
6027
|
+
color: pe(E, C)
|
|
6028
6028
|
};
|
|
6029
6029
|
})
|
|
6030
6030
|
}
|
|
@@ -6032,9 +6032,9 @@ function dl({
|
|
|
6032
6032
|
]
|
|
6033
6033
|
}
|
|
6034
6034
|
),
|
|
6035
|
-
d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map((
|
|
6036
|
-
/* @__PURE__ */ e("div", { className: "w-3 h-0.5 rounded-full", style: { backgroundColor: pe(
|
|
6037
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children:
|
|
6035
|
+
d && t.length > 1 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4 mt-2 justify-center", children: t.map((E, C) => /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", style: ce, children: [
|
|
6036
|
+
/* @__PURE__ */ e("div", { className: "w-3 h-0.5 rounded-full", style: { backgroundColor: pe(E, C) } }),
|
|
6037
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: E.name })
|
|
6038
6038
|
] }, C)) })
|
|
6039
6039
|
] });
|
|
6040
6040
|
}
|
|
@@ -6062,7 +6062,7 @@ function cl({
|
|
|
6062
6062
|
function L(N) {
|
|
6063
6063
|
return m.top + W - (N - k) / ($ - k || 1) * W;
|
|
6064
6064
|
}
|
|
6065
|
-
const
|
|
6065
|
+
const E = Array.from({ length: 5 }, (N, S) => k + S / 4 * ($ - k)), C = m.top + W;
|
|
6066
6066
|
return /* @__PURE__ */ a("div", { className: `w-full ${v}`, children: [
|
|
6067
6067
|
/* @__PURE__ */ a(
|
|
6068
6068
|
"svg",
|
|
@@ -6076,7 +6076,7 @@ function cl({
|
|
|
6076
6076
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: pe(N, S), stopOpacity: h * 4 }),
|
|
6077
6077
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: pe(N, S), stopOpacity: 0 })
|
|
6078
6078
|
] }, S)) }),
|
|
6079
|
-
i &&
|
|
6079
|
+
i && E.map((N, S) => /* @__PURE__ */ e(
|
|
6080
6080
|
"line",
|
|
6081
6081
|
{
|
|
6082
6082
|
x1: m.left,
|
|
@@ -6089,7 +6089,7 @@ function cl({
|
|
|
6089
6089
|
},
|
|
6090
6090
|
S
|
|
6091
6091
|
)),
|
|
6092
|
-
l &&
|
|
6092
|
+
l && E.map((N, S) => /* @__PURE__ */ e(
|
|
6093
6093
|
"text",
|
|
6094
6094
|
{
|
|
6095
6095
|
x: m.left - 8,
|
|
@@ -6117,11 +6117,11 @@ function cl({
|
|
|
6117
6117
|
);
|
|
6118
6118
|
}),
|
|
6119
6119
|
t.map((N, S) => {
|
|
6120
|
-
const A = pe(N, S),
|
|
6120
|
+
const A = pe(N, S), I = N.data.map((B, q) => [F(q), L(B.value)]), _ = It(I, f), H = _ + ` L${I[I.length - 1][0]},${C} L${I[0][0]},${C} Z`;
|
|
6121
6121
|
return /* @__PURE__ */ a("g", { children: [
|
|
6122
|
-
/* @__PURE__ */ e("path", { d:
|
|
6123
|
-
/* @__PURE__ */ e("path", { d:
|
|
6124
|
-
s &&
|
|
6122
|
+
/* @__PURE__ */ e("path", { d: H, fill: `url(#${x}-grad-${S})` }),
|
|
6123
|
+
/* @__PURE__ */ e("path", { d: _, fill: "none", stroke: A, strokeWidth: 2, strokeLinecap: "round" }),
|
|
6124
|
+
s && I.map(([B, q], R) => /* @__PURE__ */ e("circle", { cx: B, cy: q, r: 3, fill: "var(--card)", stroke: A, strokeWidth: 2 }, R))
|
|
6125
6125
|
] }, S);
|
|
6126
6126
|
}),
|
|
6127
6127
|
c && b.map((N, S) => /* @__PURE__ */ e(
|
|
@@ -6193,8 +6193,8 @@ function ul({
|
|
|
6193
6193
|
let p;
|
|
6194
6194
|
s ? p = dt(
|
|
6195
6195
|
u.map((C, N) => t.reduce((S, A) => {
|
|
6196
|
-
var
|
|
6197
|
-
return S + (((
|
|
6196
|
+
var I;
|
|
6197
|
+
return S + (((I = A.data[N]) == null ? void 0 : I.value) ?? 0);
|
|
6198
6198
|
}, 0))
|
|
6199
6199
|
) : p = dt(t.flatMap((C) => C.data.map((N) => N.value)));
|
|
6200
6200
|
const b = { top: 12, right: 16, bottom: o ? 36 : 12, left: l ? 48 : 16 }, g = n ?? 600, $ = r, k = g - b.left - b.right, m = $ - b.top - b.bottom, y = k / u.length, w = y * 0.2, z = y - w * 2, W = s ? z : z / t.length;
|
|
@@ -6207,7 +6207,7 @@ function ul({
|
|
|
6207
6207
|
function L(C) {
|
|
6208
6208
|
return b.left + C * y + w;
|
|
6209
6209
|
}
|
|
6210
|
-
const
|
|
6210
|
+
const E = Array.from({ length: 5 }, (C, N) => N / 4 * p);
|
|
6211
6211
|
return /* @__PURE__ */ a("div", { className: `w-full ${h}`, children: [
|
|
6212
6212
|
/* @__PURE__ */ a(
|
|
6213
6213
|
"svg",
|
|
@@ -6217,7 +6217,7 @@ function ul({
|
|
|
6217
6217
|
viewBox: `0 0 ${g} ${$}`,
|
|
6218
6218
|
onMouseLeave: () => x(null),
|
|
6219
6219
|
children: [
|
|
6220
|
-
i &&
|
|
6220
|
+
i && E.map((C, N) => /* @__PURE__ */ e(
|
|
6221
6221
|
"line",
|
|
6222
6222
|
{
|
|
6223
6223
|
x1: b.left,
|
|
@@ -6230,7 +6230,7 @@ function ul({
|
|
|
6230
6230
|
},
|
|
6231
6231
|
N
|
|
6232
6232
|
)),
|
|
6233
|
-
l &&
|
|
6233
|
+
l && E.map((C, N) => /* @__PURE__ */ e(
|
|
6234
6234
|
"text",
|
|
6235
6235
|
{
|
|
6236
6236
|
x: b.left - 8,
|
|
@@ -6257,21 +6257,21 @@ function ul({
|
|
|
6257
6257
|
u.map((C, N) => {
|
|
6258
6258
|
if (s) {
|
|
6259
6259
|
let S = b.top + m;
|
|
6260
|
-
return /* @__PURE__ */ e("g", { children: t.map((A,
|
|
6260
|
+
return /* @__PURE__ */ e("g", { children: t.map((A, I) => {
|
|
6261
6261
|
var J;
|
|
6262
|
-
const
|
|
6262
|
+
const _ = ((J = A.data[N]) == null ? void 0 : J.value) ?? 0, H = F(_), B = S - H;
|
|
6263
6263
|
S = B;
|
|
6264
|
-
const q = pe(A,
|
|
6265
|
-
return /* @__PURE__ */ e("path", { d: T, fill: q },
|
|
6264
|
+
const q = pe(A, I), R = I === t.length - 1, K = I === 0, ae = f, G = L(N), re = z, Y = H, T = R && K ? `M${G},${B + ae} Q${G},${B} ${G + ae},${B} L${G + re - ae},${B} Q${G + re},${B} ${G + re},${B + ae} L${G + re},${B + Y} L${G},${B + Y} Z` : R ? `M${G},${B + ae} Q${G},${B} ${G + ae},${B} L${G + re - ae},${B} Q${G + re},${B} ${G + re},${B + ae} L${G + re},${B + Y} L${G},${B + Y} Z` : `M${G},${B} L${G + re},${B} L${G + re},${B + Y} L${G},${B + Y} Z`;
|
|
6265
|
+
return /* @__PURE__ */ e("path", { d: T, fill: q }, I);
|
|
6266
6266
|
}) }, N);
|
|
6267
6267
|
} else
|
|
6268
6268
|
return /* @__PURE__ */ e("g", { children: t.map((S, A) => {
|
|
6269
6269
|
var K;
|
|
6270
|
-
const
|
|
6270
|
+
const I = ((K = S.data[N]) == null ? void 0 : K.value) ?? 0, _ = F(I), H = L(N) + A * W, B = M(I), q = pe(S, A), R = Math.min(f, W / 2);
|
|
6271
6271
|
return /* @__PURE__ */ e(
|
|
6272
6272
|
"path",
|
|
6273
6273
|
{
|
|
6274
|
-
d: `M${
|
|
6274
|
+
d: `M${H},${B + R} Q${H},${B} ${H + R},${B} L${H + W - R},${B} Q${H + W},${B} ${H + W},${B + R} L${H + W},${B + _} L${H},${B + _} Z`,
|
|
6275
6275
|
fill: q
|
|
6276
6276
|
},
|
|
6277
6277
|
A
|
|
@@ -6334,12 +6334,12 @@ function fl({
|
|
|
6334
6334
|
const g = t.map((m, y) => {
|
|
6335
6335
|
const w = m.value / h, z = b, W = b + w * 2 * Math.PI;
|
|
6336
6336
|
b = W;
|
|
6337
|
-
const M = v + u * Math.cos(z), F = x + u * Math.sin(z), L = v + u * Math.cos(W),
|
|
6337
|
+
const M = v + u * Math.cos(z), F = x + u * Math.sin(z), L = v + u * Math.cos(W), E = x + u * Math.sin(W), C = v + p * Math.cos(W), N = x + p * Math.sin(W), S = v + p * Math.cos(z), A = x + p * Math.sin(z), I = w > 0.5 ? 1 : 0;
|
|
6338
6338
|
return { path: [
|
|
6339
6339
|
`M${M},${F}`,
|
|
6340
|
-
`A${u},${u} 0 ${
|
|
6340
|
+
`A${u},${u} 0 ${I} 1 ${L},${E}`,
|
|
6341
6341
|
`L${C},${N}`,
|
|
6342
|
-
`A${p},${p} 0 ${
|
|
6342
|
+
`A${p},${p} 0 ${I} 0 ${S},${A}`,
|
|
6343
6343
|
"Z"
|
|
6344
6344
|
].join(" "), color: m.color ?? Re[y % Re.length], ratio: w, d: m, i: y };
|
|
6345
6345
|
}), $ = l ?? h.toLocaleString(), k = s !== null ? t[s] : null;
|
|
@@ -6651,45 +6651,45 @@ function yl({
|
|
|
6651
6651
|
disabled: s = !1,
|
|
6652
6652
|
className: f = ""
|
|
6653
6653
|
}) {
|
|
6654
|
-
const h = /* @__PURE__ */ new Date(), [v, x] = j(!1), [u, p] = j({ from: null, to: null }), [b, g] = j(null), [$, k] = j(void 0), [m, y] = j(h.getMonth()), [w, z] = j(h.getFullYear()), [W, M] = j("from"), [F, L] = j({ top: 0, left: 0, width: 0 }),
|
|
6654
|
+
const h = /* @__PURE__ */ new Date(), [v, x] = j(!1), [u, p] = j({ from: null, to: null }), [b, g] = j(null), [$, k] = j(void 0), [m, y] = j(h.getMonth()), [w, z] = j(h.getFullYear()), [W, M] = j("from"), [F, L] = j({ top: 0, left: 0, width: 0 }), E = V(null), C = V(null), N = t ?? u, S = (m + 1) % 12, A = m === 11 ? w + 1 : w;
|
|
6655
6655
|
ne(() => {
|
|
6656
|
-
function
|
|
6657
|
-
|
|
6656
|
+
function R(K) {
|
|
6657
|
+
E.current && !E.current.contains(K.target) && x(!1);
|
|
6658
6658
|
}
|
|
6659
|
-
return document.addEventListener("mousedown",
|
|
6659
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
6660
6660
|
}, []), ne(() => {
|
|
6661
6661
|
if (!v || !C.current) return;
|
|
6662
|
-
const
|
|
6662
|
+
const R = () => {
|
|
6663
6663
|
const K = C.current.getBoundingClientRect();
|
|
6664
6664
|
L({ top: K.bottom + 4, left: K.left, width: K.width });
|
|
6665
6665
|
};
|
|
6666
|
-
return
|
|
6667
|
-
window.removeEventListener("scroll",
|
|
6666
|
+
return R(), window.addEventListener("scroll", R, !0), window.addEventListener("resize", R), () => {
|
|
6667
|
+
window.removeEventListener("scroll", R, !0), window.removeEventListener("resize", R);
|
|
6668
6668
|
};
|
|
6669
6669
|
}, [v]);
|
|
6670
|
-
function
|
|
6671
|
-
if (
|
|
6670
|
+
function I(R) {
|
|
6671
|
+
if (R.value === "custom") {
|
|
6672
6672
|
k("custom");
|
|
6673
6673
|
return;
|
|
6674
6674
|
}
|
|
6675
|
-
const K =
|
|
6676
|
-
p(K), r == null || r(K,
|
|
6675
|
+
const K = R.range();
|
|
6676
|
+
p(K), r == null || r(K, R.value), k(R.value), x(!1);
|
|
6677
6677
|
}
|
|
6678
|
-
function R
|
|
6678
|
+
function _(R) {
|
|
6679
6679
|
if (W === "from")
|
|
6680
|
-
p({ from: Se(
|
|
6680
|
+
p({ from: Se(R), to: null }), M("to");
|
|
6681
6681
|
else {
|
|
6682
|
-
const K = u.from, [ae, G] =
|
|
6682
|
+
const K = u.from, [ae, G] = R >= K ? [K, ke(R)] : [Se(R), ke(K)], re = { from: ae, to: G };
|
|
6683
6683
|
p(re), r == null || r(re, "custom"), k("custom"), M("from"), x(!1);
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
6686
|
-
function
|
|
6687
|
-
|
|
6686
|
+
function H(R) {
|
|
6687
|
+
R.stopPropagation();
|
|
6688
6688
|
const K = { from: null, to: null };
|
|
6689
6689
|
p(K), r == null || r(K, void 0), k(void 0);
|
|
6690
6690
|
}
|
|
6691
|
-
const B = N.from && N.to ? `${wt(N.from)} – ${wt(N.to)}` : N.from ? `${wt(N.from)} – ...` : "", q = hl.filter((
|
|
6692
|
-
return /* @__PURE__ */ a("div", { ref:
|
|
6691
|
+
const B = N.from && N.to ? `${wt(N.from)} – ${wt(N.to)}` : N.from ? `${wt(N.from)} – ...` : "", q = hl.filter((R) => n.includes(R.value));
|
|
6692
|
+
return /* @__PURE__ */ a("div", { ref: E, className: `relative inline-block ${f}`, children: [
|
|
6693
6693
|
/* @__PURE__ */ a(
|
|
6694
6694
|
"button",
|
|
6695
6695
|
{
|
|
@@ -6712,8 +6712,8 @@ function yl({
|
|
|
6712
6712
|
{
|
|
6713
6713
|
role: "button",
|
|
6714
6714
|
tabIndex: 0,
|
|
6715
|
-
onClick:
|
|
6716
|
-
onKeyDown: (
|
|
6715
|
+
onClick: H,
|
|
6716
|
+
onKeyDown: (R) => R.key === "Enter" && H(R),
|
|
6717
6717
|
className: "text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex-shrink-0",
|
|
6718
6718
|
children: /* @__PURE__ */ e(ie, { size: 12 })
|
|
6719
6719
|
}
|
|
@@ -6728,19 +6728,19 @@ function yl({
|
|
|
6728
6728
|
className: "fixed z-[9999] bg-card border border-border rounded-[var(--radius-md)] shadow-[0_4px_24px_0_rgba(0,0,0,0.1)] flex overflow-y-auto",
|
|
6729
6729
|
style: { top: F.top, left: F.left, minWidth: "620px", maxHeight: "calc(100vh - 120px)" },
|
|
6730
6730
|
children: [
|
|
6731
|
-
/* @__PURE__ */ e("div", { className: "w-36 border-r border-border py-2 flex flex-col gap-0.5 flex-shrink-0", children: q.map((
|
|
6731
|
+
/* @__PURE__ */ e("div", { className: "w-36 border-r border-border py-2 flex flex-col gap-0.5 flex-shrink-0", children: q.map((R) => /* @__PURE__ */ e(
|
|
6732
6732
|
"button",
|
|
6733
6733
|
{
|
|
6734
6734
|
type: "button",
|
|
6735
|
-
onClick: () =>
|
|
6735
|
+
onClick: () => I(R),
|
|
6736
6736
|
className: [
|
|
6737
6737
|
"w-full text-left px-3 py-1.5 rounded-none transition-colors",
|
|
6738
|
-
$ ===
|
|
6738
|
+
$ === R.value ? "bg-primary/10 text-primary" : "text-foreground hover:bg-muted/30"
|
|
6739
6739
|
].join(" "),
|
|
6740
6740
|
style: Zr,
|
|
6741
|
-
children:
|
|
6741
|
+
children: R.label
|
|
6742
6742
|
},
|
|
6743
|
-
|
|
6743
|
+
R.value
|
|
6744
6744
|
)) }),
|
|
6745
6745
|
/* @__PURE__ */ a("div", { className: "flex gap-4 p-4 flex-1 min-w-0", children: [
|
|
6746
6746
|
/* @__PURE__ */ e(
|
|
@@ -6751,7 +6751,7 @@ function yl({
|
|
|
6751
6751
|
range: N,
|
|
6752
6752
|
hovered: b,
|
|
6753
6753
|
onHover: g,
|
|
6754
|
-
onSelect:
|
|
6754
|
+
onSelect: _,
|
|
6755
6755
|
onPrevMonth: () => {
|
|
6756
6756
|
m === 0 ? (y(11), z(w - 1)) : y(m - 1);
|
|
6757
6757
|
},
|
|
@@ -6771,7 +6771,7 @@ function yl({
|
|
|
6771
6771
|
range: N,
|
|
6772
6772
|
hovered: b,
|
|
6773
6773
|
onHover: g,
|
|
6774
|
-
onSelect:
|
|
6774
|
+
onSelect: _,
|
|
6775
6775
|
onPrevMonth: () => {
|
|
6776
6776
|
m === 0 ? (y(11), z(w - 1)) : y(m - 1);
|
|
6777
6777
|
},
|
|
@@ -6878,8 +6878,8 @@ function Qr({
|
|
|
6878
6878
|
}
|
|
6879
6879
|
const y = Xr(p, n, o), w = t !== void 0 || v.hours !== 0 || v.minutes !== 0, z = n === "12h" ? p.hours % 12 || 12 : p.hours, W = p.hours < 12;
|
|
6880
6880
|
function M(F, L) {
|
|
6881
|
-
let
|
|
6882
|
-
L || (
|
|
6881
|
+
let E = F % 12;
|
|
6882
|
+
L || (E += 12), m({ hours: E });
|
|
6883
6883
|
}
|
|
6884
6884
|
return /* @__PURE__ */ a("div", { ref: u, className: `relative inline-block ${s}`, children: [
|
|
6885
6885
|
/* @__PURE__ */ a(
|
|
@@ -6994,13 +6994,13 @@ function wl({
|
|
|
6994
6994
|
}
|
|
6995
6995
|
const M = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], F = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
6996
6996
|
function L() {
|
|
6997
|
-
const S = [], A = new Date(m, $, 1),
|
|
6998
|
-
|
|
6999
|
-
for (let
|
|
7000
|
-
S.push(new Date(
|
|
6997
|
+
const S = [], A = new Date(m, $, 1), I = new Date(A);
|
|
6998
|
+
I.setDate(I.getDate() - I.getDay());
|
|
6999
|
+
for (let _ = 0; _ < 42; _++)
|
|
7000
|
+
S.push(new Date(I)), I.setDate(I.getDate() + 1);
|
|
7001
7001
|
return S;
|
|
7002
7002
|
}
|
|
7003
|
-
const
|
|
7003
|
+
const E = {
|
|
7004
7004
|
fontFamily: "var(--font-label)",
|
|
7005
7005
|
fontSize: "var(--text-label)",
|
|
7006
7006
|
fontWeight: "var(--weight-label)"
|
|
@@ -7064,9 +7064,9 @@ function wl({
|
|
|
7064
7064
|
}
|
|
7065
7065
|
)
|
|
7066
7066
|
] }),
|
|
7067
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: F.map((S) => /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground", style:
|
|
7067
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: F.map((S) => /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground", style: E, children: S }, S)) }),
|
|
7068
7068
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-0.5", children: L().map((S, A) => {
|
|
7069
|
-
const
|
|
7069
|
+
const I = S.getMonth() === $, _ = t ? S.toDateString() === t.toDateString() : S.toDateString() === x.toDateString(), H = S.toDateString() === g.toDateString();
|
|
7070
7070
|
return /* @__PURE__ */ e(
|
|
7071
7071
|
"button",
|
|
7072
7072
|
{
|
|
@@ -7074,10 +7074,10 @@ function wl({
|
|
|
7074
7074
|
onClick: () => z(S),
|
|
7075
7075
|
className: [
|
|
7076
7076
|
"h-7 w-full text-center transition-colors rounded-[var(--radius-md)] cursor-pointer",
|
|
7077
|
-
|
|
7078
|
-
|
|
7077
|
+
I ? "" : "text-muted-foreground/40",
|
|
7078
|
+
_ ? "bg-primary text-primary-foreground font-semibold" : H ? "border border-primary text-primary" : "hover:bg-muted/40"
|
|
7079
7079
|
].filter(Boolean).join(" "),
|
|
7080
|
-
style:
|
|
7080
|
+
style: E,
|
|
7081
7081
|
children: S.getDate()
|
|
7082
7082
|
},
|
|
7083
7083
|
A
|
|
@@ -7086,7 +7086,7 @@ function wl({
|
|
|
7086
7086
|
] }),
|
|
7087
7087
|
/* @__PURE__ */ e("div", { className: "w-px bg-border" }),
|
|
7088
7088
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2", children: [
|
|
7089
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", style:
|
|
7089
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", style: E, children: "Time" }),
|
|
7090
7090
|
/* @__PURE__ */ e(
|
|
7091
7091
|
Qr,
|
|
7092
7092
|
{
|
|
@@ -7611,16 +7611,16 @@ function Pl({
|
|
|
7611
7611
|
const L = Hl[M];
|
|
7612
7612
|
return /* @__PURE__ */ a(ge.Fragment, { children: [
|
|
7613
7613
|
F > 0 && /* @__PURE__ */ e("div", { className: "w-px h-5 bg-border mx-1" }),
|
|
7614
|
-
L.map((
|
|
7615
|
-
const C =
|
|
7614
|
+
L.map((E) => {
|
|
7615
|
+
const C = E.icon, N = p.has(E.cmd);
|
|
7616
7616
|
return /* @__PURE__ */ e(
|
|
7617
7617
|
"button",
|
|
7618
7618
|
{
|
|
7619
7619
|
type: "button",
|
|
7620
|
-
title:
|
|
7620
|
+
title: E.title,
|
|
7621
7621
|
disabled: c,
|
|
7622
7622
|
onMouseDown: (S) => {
|
|
7623
|
-
S.preventDefault(), m(
|
|
7623
|
+
S.preventDefault(), m(E.cmd);
|
|
7624
7624
|
},
|
|
7625
7625
|
className: [
|
|
7626
7626
|
"w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)] transition-colors",
|
|
@@ -7629,7 +7629,7 @@ function Pl({
|
|
|
7629
7629
|
].join(" "),
|
|
7630
7630
|
children: /* @__PURE__ */ e(C, { size: 13 })
|
|
7631
7631
|
},
|
|
7632
|
-
|
|
7632
|
+
E.cmd
|
|
7633
7633
|
);
|
|
7634
7634
|
})
|
|
7635
7635
|
] }, M);
|
|
@@ -8329,7 +8329,7 @@ function si({
|
|
|
8329
8329
|
children: h,
|
|
8330
8330
|
className: v = ""
|
|
8331
8331
|
}) {
|
|
8332
|
-
var
|
|
8332
|
+
var N, S, A, I;
|
|
8333
8333
|
const {
|
|
8334
8334
|
sidebarOpen: x,
|
|
8335
8335
|
setSidebarOpen: u,
|
|
@@ -8341,21 +8341,21 @@ function si({
|
|
|
8341
8341
|
navError: m,
|
|
8342
8342
|
refreshNav: y
|
|
8343
8343
|
} = Zl(), [w, z] = j(
|
|
8344
|
-
!(((
|
|
8344
|
+
!(((N = b == null ? void 0 : b.shell) == null ? void 0 : N.sidebarDefaultOpen) ?? !0)
|
|
8345
8345
|
), [W, M] = j(!1);
|
|
8346
8346
|
ne(() => {
|
|
8347
|
-
function
|
|
8347
|
+
function _() {
|
|
8348
8348
|
window.innerWidth >= 768 && M(!1);
|
|
8349
8349
|
}
|
|
8350
|
-
return window.addEventListener("resize",
|
|
8350
|
+
return window.addEventListener("resize", _), () => window.removeEventListener("resize", _);
|
|
8351
8351
|
}, []);
|
|
8352
8352
|
const F = ii($), L = Q(
|
|
8353
|
-
(
|
|
8354
|
-
const
|
|
8355
|
-
|
|
8353
|
+
(_) => {
|
|
8354
|
+
const H = $.flatMap((B) => B.items).find((B) => B.id === _.id);
|
|
8355
|
+
H && r && r(H), M(!1);
|
|
8356
8356
|
},
|
|
8357
8357
|
[$, r]
|
|
8358
|
-
),
|
|
8358
|
+
), E = /* @__PURE__ */ e(
|
|
8359
8359
|
zt,
|
|
8360
8360
|
{
|
|
8361
8361
|
brand: b ? { name: b.brand.name } : { name: "Sellsuki" },
|
|
@@ -8364,97 +8364,114 @@ function si({
|
|
|
8364
8364
|
onNavigate: L,
|
|
8365
8365
|
collapsed: w,
|
|
8366
8366
|
onCollapsedChange: z,
|
|
8367
|
-
showCollapseToggle: ((
|
|
8367
|
+
showCollapseToggle: ((S = b == null ? void 0 : b.shell) == null ? void 0 : S.sidebarCollapsible) ?? !0,
|
|
8368
8368
|
version: c,
|
|
8369
8369
|
versionDate: s
|
|
8370
8370
|
}
|
|
8371
|
-
);
|
|
8371
|
+
), C = w ? "var(--shell-sidebar-collapsed, 64px)" : "var(--shell-sidebar-width, 240px)";
|
|
8372
8372
|
return /* @__PURE__ */ a(
|
|
8373
8373
|
"div",
|
|
8374
8374
|
{
|
|
8375
|
-
className: `min-h-screen bg-[var(--background)]
|
|
8375
|
+
className: `min-h-screen bg-[var(--background)] ${v}`,
|
|
8376
8376
|
"data-product": b == null ? void 0 : b.product,
|
|
8377
8377
|
children: [
|
|
8378
8378
|
/* @__PURE__ */ e(
|
|
8379
|
-
|
|
8379
|
+
"div",
|
|
8380
8380
|
{
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8381
|
+
className: "fixed top-0 left-0 right-0",
|
|
8382
|
+
style: { zIndex: "var(--z-shell-navbar, 100)" },
|
|
8383
|
+
children: /* @__PURE__ */ e(
|
|
8384
|
+
Pr,
|
|
8385
|
+
{
|
|
8386
|
+
brand: b ? { name: b.brand.name, logo: b.brand.logo } : { name: "Sellsuki" },
|
|
8387
|
+
breadcrumbs: g.map((_) => ({ label: _.label, href: _.href })),
|
|
8388
|
+
user: p ? { name: p.name, avatar: p.avatar } : void 0,
|
|
8389
|
+
showSearch: d,
|
|
8390
|
+
onSearchClick: i,
|
|
8391
|
+
notificationCount: n,
|
|
8392
|
+
onNotificationClick: o,
|
|
8393
|
+
onUserClick: l,
|
|
8394
|
+
workspaceSwitcher: (A = b == null ? void 0 : b.brand) == null ? void 0 : A.workspaceSwitcher,
|
|
8395
|
+
onSidebarToggle: () => {
|
|
8396
|
+
window.innerWidth < 768 ? M((_) => !_) : z((_) => !_);
|
|
8397
|
+
},
|
|
8398
|
+
onMobileMenuClick: () => M((_) => !_)
|
|
8399
|
+
}
|
|
8400
|
+
)
|
|
8401
|
+
}
|
|
8402
|
+
),
|
|
8403
|
+
/* @__PURE__ */ e(
|
|
8404
|
+
"aside",
|
|
8405
|
+
{
|
|
8406
|
+
className: "hidden md:flex flex-col fixed left-0 bottom-0 overflow-y-auto bg-card border-r border-border",
|
|
8407
|
+
style: {
|
|
8408
|
+
top: "var(--shell-navbar-height, 56px)",
|
|
8409
|
+
width: C,
|
|
8410
|
+
zIndex: "var(--z-shell-sidebar, 90)",
|
|
8411
|
+
transition: "width var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1))"
|
|
8392
8412
|
},
|
|
8393
|
-
|
|
8413
|
+
children: k ? /* @__PURE__ */ e("div", { className: "p-4 w-full", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : m ? /* @__PURE__ */ a("div", { className: "p-3", children: [
|
|
8414
|
+
/* @__PURE__ */ e(Lr, { variant: "error", children: /* @__PURE__ */ e("span", { style: { fontSize: "var(--text-label)" }, children: "Nav load failed" }) }),
|
|
8415
|
+
/* @__PURE__ */ e(
|
|
8416
|
+
"button",
|
|
8417
|
+
{
|
|
8418
|
+
type: "button",
|
|
8419
|
+
className: "mt-2 text-primary cursor-pointer hover:underline",
|
|
8420
|
+
style: { fontSize: "var(--text-label)" },
|
|
8421
|
+
onClick: y,
|
|
8422
|
+
children: "Retry"
|
|
8423
|
+
}
|
|
8424
|
+
)
|
|
8425
|
+
] }) : E
|
|
8394
8426
|
}
|
|
8395
8427
|
),
|
|
8396
|
-
/* @__PURE__ */ a(
|
|
8428
|
+
W && /* @__PURE__ */ a(ve, { children: [
|
|
8397
8429
|
/* @__PURE__ */ e(
|
|
8398
8430
|
"div",
|
|
8399
8431
|
{
|
|
8400
|
-
className: "
|
|
8401
|
-
style: {
|
|
8402
|
-
|
|
8403
|
-
transition: "width var(--duration-sidebar, 250ms) var(--easing-default, cubic-bezier(0.4,0,0.2,1))"
|
|
8404
|
-
},
|
|
8405
|
-
children: k ? /* @__PURE__ */ e("div", { className: "p-4 w-full", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : m ? /* @__PURE__ */ a("div", { className: "p-3", children: [
|
|
8406
|
-
/* @__PURE__ */ e(Lr, { variant: "error", children: /* @__PURE__ */ e("span", { style: { fontSize: "var(--text-label)" }, children: "Nav load failed" }) }),
|
|
8407
|
-
/* @__PURE__ */ e(
|
|
8408
|
-
"button",
|
|
8409
|
-
{
|
|
8410
|
-
type: "button",
|
|
8411
|
-
className: "mt-2 text-primary cursor-pointer hover:underline",
|
|
8412
|
-
style: { fontSize: "var(--text-label)" },
|
|
8413
|
-
onClick: y,
|
|
8414
|
-
children: "Retry"
|
|
8415
|
-
}
|
|
8416
|
-
)
|
|
8417
|
-
] }) : I
|
|
8432
|
+
className: "fixed inset-0 bg-black/40 md:hidden",
|
|
8433
|
+
style: { zIndex: "var(--z-shell-overlay, 80)" },
|
|
8434
|
+
onClick: () => M(!1)
|
|
8418
8435
|
}
|
|
8419
8436
|
),
|
|
8420
|
-
W && /* @__PURE__ */ a(ve, { children: [
|
|
8421
|
-
/* @__PURE__ */ e(
|
|
8422
|
-
"div",
|
|
8423
|
-
{
|
|
8424
|
-
className: "fixed inset-0 z-[var(--z-shell-overlay,80)] bg-black/40 md:hidden",
|
|
8425
|
-
onClick: () => M(!1)
|
|
8426
|
-
}
|
|
8427
|
-
),
|
|
8428
|
-
/* @__PURE__ */ e(
|
|
8429
|
-
"div",
|
|
8430
|
-
{
|
|
8431
|
-
className: "fixed left-0 top-[56px] bottom-0 z-[var(--z-shell-sidebar,90)] w-[240px] bg-card shadow-lg md:hidden overflow-y-auto",
|
|
8432
|
-
style: { transition: "transform var(--duration-sidebar, 250ms) var(--easing-default)" },
|
|
8433
|
-
children: k ? /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : /* @__PURE__ */ e(
|
|
8434
|
-
zt,
|
|
8435
|
-
{
|
|
8436
|
-
brand: b ? { name: b.brand.name } : { name: "Sellsuki" },
|
|
8437
|
-
groups: F,
|
|
8438
|
-
activeItem: t,
|
|
8439
|
-
onNavigate: L,
|
|
8440
|
-
collapsed: !1,
|
|
8441
|
-
showCollapseToggle: !1,
|
|
8442
|
-
version: c,
|
|
8443
|
-
versionDate: s
|
|
8444
|
-
}
|
|
8445
|
-
)
|
|
8446
|
-
}
|
|
8447
|
-
)
|
|
8448
|
-
] }),
|
|
8449
8437
|
/* @__PURE__ */ e(
|
|
8450
|
-
"
|
|
8438
|
+
"div",
|
|
8451
8439
|
{
|
|
8452
|
-
className:
|
|
8453
|
-
style: {
|
|
8454
|
-
|
|
8440
|
+
className: "fixed left-0 bottom-0 bg-card shadow-lg md:hidden overflow-y-auto",
|
|
8441
|
+
style: {
|
|
8442
|
+
top: "var(--shell-navbar-height, 56px)",
|
|
8443
|
+
width: "var(--shell-sidebar-width, 240px)",
|
|
8444
|
+
zIndex: "var(--z-shell-sidebar, 90)"
|
|
8445
|
+
},
|
|
8446
|
+
children: k ? /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(tr, { rows: 6 }) }) : /* @__PURE__ */ e(
|
|
8447
|
+
zt,
|
|
8448
|
+
{
|
|
8449
|
+
brand: b ? { name: b.brand.name } : { name: "Sellsuki" },
|
|
8450
|
+
groups: F,
|
|
8451
|
+
activeItem: t,
|
|
8452
|
+
onNavigate: L,
|
|
8453
|
+
collapsed: !1,
|
|
8454
|
+
showCollapseToggle: !1,
|
|
8455
|
+
version: c,
|
|
8456
|
+
versionDate: s
|
|
8457
|
+
}
|
|
8458
|
+
)
|
|
8455
8459
|
}
|
|
8456
8460
|
)
|
|
8457
8461
|
] }),
|
|
8462
|
+
/* @__PURE__ */ e(
|
|
8463
|
+
"main",
|
|
8464
|
+
{
|
|
8465
|
+
className: `min-h-screen ${f ? "" : "p-0"}`,
|
|
8466
|
+
style: {
|
|
8467
|
+
paddingTop: "var(--shell-navbar-height, 56px)",
|
|
8468
|
+
marginLeft: C,
|
|
8469
|
+
transition: "margin-left var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1))",
|
|
8470
|
+
maxWidth: (I = b == null ? void 0 : b.shell) == null ? void 0 : I.contentMaxWidth
|
|
8471
|
+
},
|
|
8472
|
+
children: /* @__PURE__ */ e(Xl, { children: h })
|
|
8473
|
+
}
|
|
8474
|
+
),
|
|
8458
8475
|
/* @__PURE__ */ e(eo, {})
|
|
8459
8476
|
]
|
|
8460
8477
|
}
|