@opencxh/ui-kit 3.132.0 → 3.136.0
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1126 -1120
- package/dist/index.js.map +1 -1
- package/dist/src/content/Table.d.ts +12 -0
- package/dist/src/federated-resource/index.d.ts +10 -1
- package/dist/src/forms/Form.d.ts +24 -5
- package/dist/src/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx as We } from "clsx";
|
|
2
2
|
import { jsxs as c, jsx as e, Fragment as xe } from "react/jsx-runtime";
|
|
3
3
|
import { VideoOff as Ke, User as Ge, MicOff as Je, Mic as Ye, X as we, ChevronDown as ge, ExternalLink as Xe, Calendar as Ze, ChevronLeft as ke, ChevronRight as Ce, ChevronDownIcon as Qe, Loader2 as et, Search as Se, Check as Te, ChevronUp as tt, ChevronsLeft as rt, ChevronsRight as nt, FileText as Ee, HardDrive as _e, ArrowLeft as st, FolderPlus as at, Upload as lt, Folder as Ae, Trash2 as ot, Plus as ct, Sparkles as it, ImageOff as dt, Pencil as ut, ArrowUpRight as mt } from "lucide-react";
|
|
4
|
-
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as
|
|
4
|
+
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as R, useLayoutEffect as ft, useMemo as he, useCallback as ue, createContext as ht, Component as xt } from "react";
|
|
5
5
|
import bt from "dompurify";
|
|
6
6
|
import pt from "react-markdown";
|
|
7
7
|
import gt from "remark-gfm";
|
|
@@ -112,15 +112,15 @@ const vt = {
|
|
|
112
112
|
iconOnly: l = !1,
|
|
113
113
|
shape: u = "default",
|
|
114
114
|
className: m,
|
|
115
|
-
children:
|
|
116
|
-
disabled:
|
|
117
|
-
...
|
|
118
|
-
},
|
|
119
|
-
const p =
|
|
115
|
+
children: N,
|
|
116
|
+
disabled: f,
|
|
117
|
+
...h
|
|
118
|
+
}, b) => {
|
|
119
|
+
const p = f || s;
|
|
120
120
|
return /* @__PURE__ */ c(
|
|
121
121
|
"button",
|
|
122
122
|
{
|
|
123
|
-
ref:
|
|
123
|
+
ref: b,
|
|
124
124
|
type: "button",
|
|
125
125
|
className: d(
|
|
126
126
|
"inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-semibold",
|
|
@@ -137,7 +137,7 @@ const vt = {
|
|
|
137
137
|
),
|
|
138
138
|
disabled: p,
|
|
139
139
|
"aria-busy": s || void 0,
|
|
140
|
-
...
|
|
140
|
+
...h,
|
|
141
141
|
children: [
|
|
142
142
|
s && /* @__PURE__ */ e(
|
|
143
143
|
"span",
|
|
@@ -147,9 +147,9 @@ const vt = {
|
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
149
|
!s && a && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: a }),
|
|
150
|
-
!l &&
|
|
150
|
+
!l && N,
|
|
151
151
|
!s && o && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: o }),
|
|
152
|
-
l && !s && !a && !o &&
|
|
152
|
+
l && !s && !a && !o && N
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
155
|
);
|
|
@@ -206,7 +206,7 @@ const ln = ({
|
|
|
206
206
|
"aria-label": l,
|
|
207
207
|
...u
|
|
208
208
|
}) => {
|
|
209
|
-
const m = typeof r == "number" ? r : kt(r),
|
|
209
|
+
const m = typeof r == "number" ? r : kt(r), N = d(
|
|
210
210
|
"inline-block shrink-0",
|
|
211
211
|
wt[n],
|
|
212
212
|
s && [
|
|
@@ -214,21 +214,21 @@ const ln = ({
|
|
|
214
214
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
215
215
|
],
|
|
216
216
|
o
|
|
217
|
-
),
|
|
217
|
+
), f = {
|
|
218
218
|
size: m,
|
|
219
219
|
strokeWidth: 2,
|
|
220
|
-
className:
|
|
220
|
+
className: N,
|
|
221
221
|
onClick: s ? a : void 0,
|
|
222
222
|
"aria-label": l,
|
|
223
223
|
"aria-hidden": l ? void 0 : !0,
|
|
224
224
|
role: s ? "button" : void 0,
|
|
225
225
|
tabIndex: s ? 0 : void 0,
|
|
226
|
-
onKeyDown: s ? (
|
|
227
|
-
(
|
|
226
|
+
onKeyDown: s ? (h) => {
|
|
227
|
+
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), a?.());
|
|
228
228
|
} : void 0,
|
|
229
229
|
...u
|
|
230
230
|
};
|
|
231
|
-
return /* @__PURE__ */ e(t, { ...
|
|
231
|
+
return /* @__PURE__ */ e(t, { ...f });
|
|
232
232
|
};
|
|
233
233
|
function kt(t) {
|
|
234
234
|
return {
|
|
@@ -256,11 +256,11 @@ function on({
|
|
|
256
256
|
caret: l = !1,
|
|
257
257
|
onClear: u,
|
|
258
258
|
clearLabel: m = "Filter wissen",
|
|
259
|
-
onClick:
|
|
260
|
-
title:
|
|
261
|
-
className:
|
|
259
|
+
onClick: N,
|
|
260
|
+
title: f,
|
|
261
|
+
className: h
|
|
262
262
|
}) {
|
|
263
|
-
const
|
|
263
|
+
const b = o && !!u, p = s === "pill" ? "rounded-full" : "rounded-md", C = d(
|
|
264
264
|
// A button's default cursor is an arrow, so it has to be asked for.
|
|
265
265
|
"inline-flex cursor-pointer select-none items-center text-sm font-semibold",
|
|
266
266
|
a === "sm" ? "h-control-sm" : "h-control-md",
|
|
@@ -268,19 +268,19 @@ function on({
|
|
|
268
268
|
p,
|
|
269
269
|
// Picking a value outranks whatever the value happens to mean.
|
|
270
270
|
o ? "bg-accent text-accent-fg" : d("border", Ct[n]),
|
|
271
|
-
|
|
271
|
+
h
|
|
272
272
|
), g = /* @__PURE__ */ c(xe, { children: [
|
|
273
273
|
r,
|
|
274
274
|
t,
|
|
275
275
|
l && /* @__PURE__ */ e(Y, { icon: ge, size: "xs" })
|
|
276
|
-
] }),
|
|
276
|
+
] }), x = d(
|
|
277
277
|
"inline-flex items-center gap-1.5 pl-3",
|
|
278
278
|
p,
|
|
279
|
-
|
|
279
|
+
b ? "pr-1.5" : "pr-3",
|
|
280
280
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
281
281
|
);
|
|
282
|
-
return
|
|
283
|
-
/* @__PURE__ */ e("button", { type: "button", onClick:
|
|
282
|
+
return b ? /* @__PURE__ */ c("span", { className: C, title: f, children: [
|
|
283
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: N, className: x, children: g }),
|
|
284
284
|
/* @__PURE__ */ e(
|
|
285
285
|
"button",
|
|
286
286
|
{
|
|
@@ -291,7 +291,7 @@ function on({
|
|
|
291
291
|
children: /* @__PURE__ */ e(Y, { icon: we, size: "xs" })
|
|
292
292
|
}
|
|
293
293
|
)
|
|
294
|
-
] }) : /* @__PURE__ */ e("button", { type: "button", title:
|
|
294
|
+
] }) : /* @__PURE__ */ e("button", { type: "button", title: f, onClick: N, className: d(C, x), children: g });
|
|
295
295
|
}
|
|
296
296
|
const St = {
|
|
297
297
|
xs: "text-xs",
|
|
@@ -327,10 +327,10 @@ const St = {
|
|
|
327
327
|
children: l,
|
|
328
328
|
href: u,
|
|
329
329
|
target: m,
|
|
330
|
-
rel:
|
|
331
|
-
...
|
|
330
|
+
rel: N,
|
|
331
|
+
...f
|
|
332
332
|
}) => {
|
|
333
|
-
const
|
|
333
|
+
const h = a || u && (u.startsWith("http") || u.startsWith("mailto:")), b = d(
|
|
334
334
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
335
335
|
"transition-colors duration-fast ease-out",
|
|
336
336
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -345,15 +345,15 @@ const St = {
|
|
|
345
345
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
346
346
|
o
|
|
347
347
|
), p = {
|
|
348
|
-
...
|
|
348
|
+
...f,
|
|
349
349
|
href: s ? void 0 : u,
|
|
350
|
-
target:
|
|
351
|
-
rel:
|
|
350
|
+
target: h ? "_blank" : m,
|
|
351
|
+
rel: h ? "noopener noreferrer" : N,
|
|
352
352
|
"aria-disabled": s || void 0
|
|
353
353
|
};
|
|
354
|
-
return /* @__PURE__ */ c("a", { className:
|
|
354
|
+
return /* @__PURE__ */ c("a", { className: b, ...p, children: [
|
|
355
355
|
l,
|
|
356
|
-
|
|
356
|
+
h && /* @__PURE__ */ e(Xe, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
357
357
|
] });
|
|
358
358
|
}, Mt = {
|
|
359
359
|
sm: "h-control-sm px-3 text-sm",
|
|
@@ -398,14 +398,14 @@ function dn({
|
|
|
398
398
|
);
|
|
399
399
|
}
|
|
400
400
|
function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
401
|
-
const [o, l] =
|
|
401
|
+
const [o, l] = R({});
|
|
402
402
|
return ft(() => {
|
|
403
403
|
if (!t) return;
|
|
404
404
|
const u = () => {
|
|
405
405
|
const m = r.current;
|
|
406
406
|
if (!m) return;
|
|
407
|
-
const
|
|
408
|
-
|
|
407
|
+
const N = m.getBoundingClientRect(), f = window.innerHeight - N.bottom, h = N.top, b = a.startsWith("top"), p = b ? h < 200 && f > h : f < 200 && h > f, C = b !== p, g = { position: "fixed" };
|
|
408
|
+
C ? (g.bottom = window.innerHeight - N.top + n, g.maxHeight = Math.max(120, h - n * 2)) : (g.top = N.bottom + n, g.maxHeight = Math.max(120, f - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - N.right : g.left = N.left, s && (g.width = N.width), l(g);
|
|
409
409
|
};
|
|
410
410
|
return u(), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
|
|
411
411
|
window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
|
|
@@ -422,26 +422,26 @@ const $t = ({
|
|
|
422
422
|
disabled: l = !1,
|
|
423
423
|
triggerLabel: u
|
|
424
424
|
}) => {
|
|
425
|
-
const [m,
|
|
425
|
+
const [m, N] = R(!1), f = se(null), h = se(null), b = ze(m, h, { placement: n });
|
|
426
426
|
Q(() => {
|
|
427
427
|
if (!m) return;
|
|
428
|
-
const g = (
|
|
429
|
-
|
|
430
|
-
},
|
|
431
|
-
|
|
428
|
+
const g = (_) => {
|
|
429
|
+
f.current && !f.current.contains(_.target) && N(!1);
|
|
430
|
+
}, x = (_) => {
|
|
431
|
+
_.key === "Escape" && N(!1);
|
|
432
432
|
};
|
|
433
|
-
return document.addEventListener("mousedown", g), document.addEventListener("keydown",
|
|
434
|
-
document.removeEventListener("mousedown", g), document.removeEventListener("keydown",
|
|
433
|
+
return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
|
|
434
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
|
|
435
435
|
};
|
|
436
436
|
}, [m]);
|
|
437
437
|
const p = (g) => {
|
|
438
|
-
g.stopPropagation(), !l &&
|
|
439
|
-
},
|
|
440
|
-
return /* @__PURE__ */ c("div", { ref:
|
|
438
|
+
g.stopPropagation(), !l && N((x) => !x);
|
|
439
|
+
}, C = () => N(!1);
|
|
440
|
+
return /* @__PURE__ */ c("div", { ref: f, className: d("relative inline-flex", a), children: [
|
|
441
441
|
/* @__PURE__ */ e(
|
|
442
442
|
"button",
|
|
443
443
|
{
|
|
444
|
-
ref:
|
|
444
|
+
ref: h,
|
|
445
445
|
type: "button",
|
|
446
446
|
onClick: p,
|
|
447
447
|
disabled: l,
|
|
@@ -464,8 +464,8 @@ const $t = ({
|
|
|
464
464
|
"fixed z-overlay overflow-y-auto rounded-lg border border-border bg-surface shadow-overlay",
|
|
465
465
|
s
|
|
466
466
|
),
|
|
467
|
-
style:
|
|
468
|
-
children: typeof r == "function" ? r(
|
|
467
|
+
style: b,
|
|
468
|
+
children: typeof r == "function" ? r(C) : r
|
|
469
469
|
}
|
|
470
470
|
)
|
|
471
471
|
] });
|
|
@@ -477,7 +477,7 @@ const $t = ({
|
|
|
477
477
|
sm: "h-control-sm w-7",
|
|
478
478
|
md: "h-control-md w-8"
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function Re({
|
|
481
481
|
label: t,
|
|
482
482
|
onClick: r,
|
|
483
483
|
variant: n = "primary",
|
|
@@ -487,9 +487,9 @@ function Fe({
|
|
|
487
487
|
disabled: l = !1,
|
|
488
488
|
loading: u = !1,
|
|
489
489
|
menuPlacement: m = "bottom-end",
|
|
490
|
-
menuLabel:
|
|
490
|
+
menuLabel: N = "More options"
|
|
491
491
|
}) {
|
|
492
|
-
const
|
|
492
|
+
const f = l || u, h = o.length > 0;
|
|
493
493
|
return /* @__PURE__ */ c("div", { className: d("inline-flex items-center", n === "primary" && "gap-0.5"), children: [
|
|
494
494
|
/* @__PURE__ */ e(
|
|
495
495
|
ne,
|
|
@@ -500,16 +500,16 @@ function Fe({
|
|
|
500
500
|
disabled: l,
|
|
501
501
|
loading: u,
|
|
502
502
|
leftIcon: a,
|
|
503
|
-
className: d(
|
|
503
|
+
className: d(h && "rounded-r-none"),
|
|
504
504
|
children: t
|
|
505
505
|
}
|
|
506
506
|
),
|
|
507
|
-
|
|
507
|
+
h && /* @__PURE__ */ e(
|
|
508
508
|
$t,
|
|
509
509
|
{
|
|
510
510
|
placement: m,
|
|
511
|
-
disabled:
|
|
512
|
-
triggerLabel:
|
|
511
|
+
disabled: f,
|
|
512
|
+
triggerLabel: N,
|
|
513
513
|
className: "min-w-menu py-1",
|
|
514
514
|
trigger: /* @__PURE__ */ e(
|
|
515
515
|
"span",
|
|
@@ -520,17 +520,17 @@ function Fe({
|
|
|
520
520
|
"transition-colors duration-fast ease-out",
|
|
521
521
|
Dt[n],
|
|
522
522
|
Tt[s],
|
|
523
|
-
|
|
523
|
+
f && "cursor-not-allowed opacity-50"
|
|
524
524
|
),
|
|
525
525
|
children: /* @__PURE__ */ e(ge, { className: "size-icon-md" })
|
|
526
526
|
}
|
|
527
527
|
),
|
|
528
|
-
children: (
|
|
528
|
+
children: (b) => /* @__PURE__ */ e(xe, { children: o.map((p) => /* @__PURE__ */ c(
|
|
529
529
|
"button",
|
|
530
530
|
{
|
|
531
531
|
type: "button",
|
|
532
532
|
onClick: () => {
|
|
533
|
-
p.onClick(),
|
|
533
|
+
p.onClick(), b();
|
|
534
534
|
},
|
|
535
535
|
className: d(
|
|
536
536
|
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
|
|
@@ -575,23 +575,23 @@ const _t = {
|
|
|
575
575
|
labelClassName: l,
|
|
576
576
|
className: u,
|
|
577
577
|
id: m,
|
|
578
|
-
...
|
|
579
|
-
},
|
|
580
|
-
const
|
|
581
|
-
(
|
|
582
|
-
|
|
578
|
+
...N
|
|
579
|
+
}, f) => {
|
|
580
|
+
const h = oe.useId(), b = m || `checkbox-${h}`, p = !!n, C = oe.useRef(null), g = oe.useCallback(
|
|
581
|
+
(x) => {
|
|
582
|
+
C.current = x, typeof f == "function" ? f(x) : f && typeof f == "object" && (f.current = x);
|
|
583
583
|
},
|
|
584
|
-
[
|
|
584
|
+
[f]
|
|
585
585
|
);
|
|
586
586
|
return oe.useEffect(() => {
|
|
587
|
-
|
|
587
|
+
C.current && (C.current.indeterminate = a);
|
|
588
588
|
}, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col", o), children: [
|
|
589
589
|
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3", At[s]), children: [
|
|
590
590
|
/* @__PURE__ */ e(
|
|
591
591
|
"input",
|
|
592
592
|
{
|
|
593
593
|
ref: g,
|
|
594
|
-
id:
|
|
594
|
+
id: b,
|
|
595
595
|
type: "checkbox",
|
|
596
596
|
"aria-invalid": p || void 0,
|
|
597
597
|
className: d(
|
|
@@ -605,14 +605,14 @@ const _t = {
|
|
|
605
605
|
p ? "border-danger-border" : "border-border-strong",
|
|
606
606
|
u
|
|
607
607
|
),
|
|
608
|
-
...
|
|
608
|
+
...N
|
|
609
609
|
}
|
|
610
610
|
),
|
|
611
611
|
t && /* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
612
612
|
/* @__PURE__ */ e(
|
|
613
613
|
"label",
|
|
614
614
|
{
|
|
615
|
-
htmlFor:
|
|
615
|
+
htmlFor: b,
|
|
616
616
|
className: d(
|
|
617
617
|
"cursor-pointer",
|
|
618
618
|
p ? "text-danger-fg" : "text-text",
|
|
@@ -640,47 +640,47 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
640
640
|
className: l,
|
|
641
641
|
minDate: u,
|
|
642
642
|
maxDate: m,
|
|
643
|
-
format:
|
|
644
|
-
withTime:
|
|
645
|
-
},
|
|
646
|
-
const [
|
|
643
|
+
format: N = "MM/dd/yyyy",
|
|
644
|
+
withTime: f = !1
|
|
645
|
+
}, h) => {
|
|
646
|
+
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null), _ = se(null), E = ze(b, _);
|
|
647
647
|
Q(() => {
|
|
648
648
|
const i = (S) => {
|
|
649
|
-
|
|
649
|
+
x.current && !x.current.contains(S.target) && p(!1);
|
|
650
650
|
};
|
|
651
|
-
return
|
|
651
|
+
return b && document.addEventListener("mousedown", i), () => {
|
|
652
652
|
document.removeEventListener("mousedown", i);
|
|
653
653
|
};
|
|
654
|
-
}, [
|
|
655
|
-
const
|
|
654
|
+
}, [b]);
|
|
655
|
+
const W = (i) => {
|
|
656
656
|
if (!i) return "";
|
|
657
|
-
const S = i.getDate().toString().padStart(2, "0"),
|
|
658
|
-
return
|
|
659
|
-
},
|
|
660
|
-
const [S,
|
|
661
|
-
if (Number.isNaN(S) || Number.isNaN(
|
|
662
|
-
const
|
|
663
|
-
|
|
657
|
+
const S = i.getDate().toString().padStart(2, "0"), y = (i.getMonth() + 1).toString().padStart(2, "0"), A = i.getFullYear(), w = N === "dd/MM/yyyy" ? `${S}/${y}/${A}` : N === "yyyy-MM-dd" ? `${A}-${y}-${S}` : `${y}/${S}/${A}`;
|
|
658
|
+
return f ? `${w} ${D(i)}` : w;
|
|
659
|
+
}, D = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, X = (i) => {
|
|
660
|
+
const [S, y] = i.split(":").map(Number);
|
|
661
|
+
if (Number.isNaN(S) || Number.isNaN(y)) return;
|
|
662
|
+
const A = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
663
|
+
A.setHours(S, y, 0, 0), r?.(A);
|
|
664
664
|
}, U = () => {
|
|
665
|
-
const i =
|
|
666
|
-
|
|
667
|
-
const
|
|
665
|
+
const i = C.getFullYear(), S = C.getMonth(), y = new Date(i, S, 1), A = new Date(y);
|
|
666
|
+
A.setDate(A.getDate() - y.getDay());
|
|
667
|
+
const w = [], ee = new Date(A);
|
|
668
668
|
for (let ae = 0; ae < 42; ae++)
|
|
669
|
-
|
|
670
|
-
return
|
|
669
|
+
w.push(new Date(ee)), ee.setDate(ee.getDate() + 1);
|
|
670
|
+
return w;
|
|
671
671
|
}, I = (i) => {
|
|
672
|
-
if (i.getMonth() ===
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
|
|
672
|
+
if (i.getMonth() === C.getMonth() && !(u && i < u) && !(m && i > m)) {
|
|
673
|
+
if (f) {
|
|
674
|
+
const y = new Date(i);
|
|
675
|
+
y.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(y);
|
|
676
676
|
return;
|
|
677
677
|
}
|
|
678
678
|
r?.(i), p(!1);
|
|
679
679
|
}
|
|
680
680
|
}, q = () => {
|
|
681
|
-
g(new Date(
|
|
682
|
-
},
|
|
683
|
-
g(new Date(
|
|
681
|
+
g(new Date(C.getFullYear(), C.getMonth() - 1, 1));
|
|
682
|
+
}, K = () => {
|
|
683
|
+
g(new Date(C.getFullYear(), C.getMonth() + 1, 1));
|
|
684
684
|
}, re = () => {
|
|
685
685
|
r?.(null), p(!1);
|
|
686
686
|
}, P = d(
|
|
@@ -696,7 +696,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
696
696
|
"h-control-md w-full px-3 text-base": o === "full"
|
|
697
697
|
},
|
|
698
698
|
l
|
|
699
|
-
), ce = U(),
|
|
699
|
+
), ce = U(), k = [
|
|
700
700
|
"January",
|
|
701
701
|
"February",
|
|
702
702
|
"March",
|
|
@@ -710,19 +710,19 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
710
710
|
"November",
|
|
711
711
|
"December"
|
|
712
712
|
];
|
|
713
|
-
return /* @__PURE__ */ c("div", { ref:
|
|
714
|
-
/* @__PURE__ */ c("div", { ref:
|
|
713
|
+
return /* @__PURE__ */ c("div", { ref: x, className: "relative", children: [
|
|
714
|
+
/* @__PURE__ */ c("div", { ref: _, className: "relative", children: [
|
|
715
715
|
/* @__PURE__ */ e(
|
|
716
716
|
"input",
|
|
717
717
|
{
|
|
718
|
-
ref:
|
|
718
|
+
ref: h,
|
|
719
719
|
type: "text",
|
|
720
|
-
value:
|
|
720
|
+
value: W(t ?? null),
|
|
721
721
|
placeholder: n,
|
|
722
722
|
disabled: s,
|
|
723
723
|
required: a,
|
|
724
724
|
readOnly: !0,
|
|
725
|
-
onClick: () => !s && p(!
|
|
725
|
+
onClick: () => !s && p(!b),
|
|
726
726
|
className: d(P, "pr-10 cursor-pointer")
|
|
727
727
|
}
|
|
728
728
|
),
|
|
@@ -730,14 +730,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
730
730
|
"button",
|
|
731
731
|
{
|
|
732
732
|
type: "button",
|
|
733
|
-
onClick: () => !s && p(!
|
|
733
|
+
onClick: () => !s && p(!b),
|
|
734
734
|
disabled: s,
|
|
735
735
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
736
736
|
children: /* @__PURE__ */ e(It, {})
|
|
737
737
|
}
|
|
738
738
|
)
|
|
739
739
|
] }),
|
|
740
|
-
|
|
740
|
+
b && /* @__PURE__ */ c("div", { style: E, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
|
|
741
741
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
|
|
742
742
|
/* @__PURE__ */ e(
|
|
743
743
|
"button",
|
|
@@ -748,14 +748,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
748
748
|
}
|
|
749
749
|
),
|
|
750
750
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
751
|
-
C
|
|
751
|
+
k[C.getMonth()],
|
|
752
752
|
" ",
|
|
753
|
-
|
|
753
|
+
C.getFullYear()
|
|
754
754
|
] }),
|
|
755
755
|
/* @__PURE__ */ e(
|
|
756
756
|
"button",
|
|
757
757
|
{
|
|
758
|
-
onClick:
|
|
758
|
+
onClick: K,
|
|
759
759
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
760
760
|
children: /* @__PURE__ */ e(Pt, {})
|
|
761
761
|
}
|
|
@@ -763,7 +763,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
763
763
|
] }),
|
|
764
764
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((i) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: i }, i)) }),
|
|
765
765
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ce.map((i, S) => {
|
|
766
|
-
const
|
|
766
|
+
const y = i.getMonth() === C.getMonth(), A = t && i.toDateString() === t.toDateString(), w = i.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), ee = !y || u && i < u || m && i > m;
|
|
767
767
|
return /* @__PURE__ */ e(
|
|
768
768
|
"button",
|
|
769
769
|
{
|
|
@@ -772,9 +772,9 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
772
772
|
className: d(
|
|
773
773
|
"w-8 h-8 text-sm rounded transition-colors duration-fast",
|
|
774
774
|
{
|
|
775
|
-
"text-text hover:bg-surface-hover":
|
|
776
|
-
"bg-accent text-accent-fg":
|
|
777
|
-
"bg-surface-hover text-text":
|
|
775
|
+
"text-text hover:bg-surface-hover": y && !A && !ee,
|
|
776
|
+
"bg-accent text-accent-fg": A,
|
|
777
|
+
"bg-surface-hover text-text": w && !A,
|
|
778
778
|
"text-text-muted cursor-not-allowed": ee
|
|
779
779
|
}
|
|
780
780
|
),
|
|
@@ -783,14 +783,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
783
783
|
S
|
|
784
784
|
);
|
|
785
785
|
}) }),
|
|
786
|
-
|
|
786
|
+
f && /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
|
|
787
787
|
/* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
|
|
788
788
|
/* @__PURE__ */ e(
|
|
789
789
|
"input",
|
|
790
790
|
{
|
|
791
791
|
id: "datepicker-time",
|
|
792
792
|
type: "time",
|
|
793
|
-
value: t ?
|
|
793
|
+
value: t ? D(t) : "",
|
|
794
794
|
onChange: (i) => X(i.target.value),
|
|
795
795
|
className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
|
|
796
796
|
}
|
|
@@ -832,70 +832,70 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
832
832
|
options: l,
|
|
833
833
|
placeholder: u,
|
|
834
834
|
containerClassName: m,
|
|
835
|
-
labelClassName:
|
|
836
|
-
className:
|
|
837
|
-
id:
|
|
838
|
-
searchable:
|
|
835
|
+
labelClassName: N,
|
|
836
|
+
className: f,
|
|
837
|
+
id: h,
|
|
838
|
+
searchable: b,
|
|
839
839
|
multiple: p,
|
|
840
|
-
value:
|
|
840
|
+
value: C,
|
|
841
841
|
onChange: g,
|
|
842
|
-
allowCreate:
|
|
843
|
-
onCreateOption:
|
|
844
|
-
...
|
|
845
|
-
},
|
|
846
|
-
const
|
|
847
|
-
oe.useImperativeHandle(
|
|
848
|
-
const
|
|
849
|
-
re.current && !re.current.contains(
|
|
842
|
+
allowCreate: x,
|
|
843
|
+
onCreateOption: _,
|
|
844
|
+
...E
|
|
845
|
+
}, W) => {
|
|
846
|
+
const D = h || `select-${Math.random().toString(36).substr(2, 9)}`, X = !!n, [U, I] = oe.useState(!1), [q, K] = oe.useState(""), re = oe.useRef(null), P = oe.useRef(null), ce = ze(U, P, { matchWidth: !0 }), [k, i] = oe.useState(l);
|
|
847
|
+
oe.useImperativeHandle(W, () => re.current), oe.useEffect(() => {
|
|
848
|
+
const M = (T) => {
|
|
849
|
+
re.current && !re.current.contains(T.target) && I(!1);
|
|
850
850
|
};
|
|
851
|
-
return document.addEventListener("mousedown",
|
|
851
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
852
852
|
}, []);
|
|
853
853
|
const S = oe.useCallback(
|
|
854
|
-
(
|
|
855
|
-
(z) => ye(z.value) === ye(
|
|
854
|
+
(M, T) => M.some(
|
|
855
|
+
(z) => ye(z.value) === ye(T) || ye(z.label) === ye(T)
|
|
856
856
|
),
|
|
857
857
|
[]
|
|
858
|
-
),
|
|
859
|
-
(
|
|
860
|
-
const z = [...
|
|
861
|
-
const
|
|
862
|
-
|
|
858
|
+
), y = oe.useCallback(
|
|
859
|
+
(M, T) => {
|
|
860
|
+
const z = [...M], B = (F) => {
|
|
861
|
+
const H = (F ?? "").trim();
|
|
862
|
+
H && (S(z, H) || z.push({ value: H, label: H }));
|
|
863
863
|
};
|
|
864
|
-
return Array.isArray(
|
|
864
|
+
return Array.isArray(T) ? T.forEach(B) : B(T), z;
|
|
865
865
|
},
|
|
866
866
|
[S]
|
|
867
867
|
);
|
|
868
868
|
oe.useEffect(() => {
|
|
869
|
-
i((
|
|
870
|
-
const
|
|
871
|
-
return
|
|
872
|
-
!S(
|
|
873
|
-
}),
|
|
869
|
+
i((M) => {
|
|
870
|
+
const T = [...l];
|
|
871
|
+
return M.forEach((z) => {
|
|
872
|
+
!S(T, z.value) && !S(T, z.label) && T.push(z);
|
|
873
|
+
}), y(T, C);
|
|
874
874
|
});
|
|
875
|
-
}, [l,
|
|
876
|
-
const
|
|
875
|
+
}, [l, C, y, S]);
|
|
876
|
+
const A = (M) => {
|
|
877
877
|
if (p) {
|
|
878
|
-
const
|
|
878
|
+
const T = Array.isArray(C) ? C : [], z = T.includes(M) ? T.filter((B) => B !== M) : [...T, M];
|
|
879
879
|
g?.(z);
|
|
880
880
|
} else
|
|
881
|
-
g?.(
|
|
882
|
-
},
|
|
883
|
-
(
|
|
884
|
-
) : [], ae =
|
|
885
|
-
(
|
|
886
|
-
) :
|
|
887
|
-
const
|
|
888
|
-
if (!
|
|
889
|
-
const z =
|
|
890
|
-
value:
|
|
891
|
-
label:
|
|
881
|
+
g?.(M), I(!1), K("");
|
|
882
|
+
}, w = p ? null : k.find((M) => M.value === C), ee = p ? k.filter(
|
|
883
|
+
(M) => Array.isArray(C) && C.includes(M.value)
|
|
884
|
+
) : [], ae = b && q ? k.filter(
|
|
885
|
+
(M) => M.label.toLowerCase().includes(q.toLowerCase())
|
|
886
|
+
) : k, le = !!x && !!b && !!q.trim() && !S(k, q), G = (M) => {
|
|
887
|
+
const T = M.trim();
|
|
888
|
+
if (!T) return;
|
|
889
|
+
const z = _?.(T) ?? {
|
|
890
|
+
value: T,
|
|
891
|
+
label: T
|
|
892
892
|
};
|
|
893
|
-
if (S(
|
|
894
|
-
|
|
893
|
+
if (S(k, z.value) || S(k, z.label)) {
|
|
894
|
+
A(z.value), K(""), p || I(!1);
|
|
895
895
|
return;
|
|
896
896
|
}
|
|
897
|
-
i((
|
|
898
|
-
}, j = () => p ? ee.length > 0 ? ee.map((
|
|
897
|
+
i((B) => [...B, z]), A(z.value), K(""), p || I(!1);
|
|
898
|
+
}, j = () => p ? ee.length > 0 ? ee.map((M) => M.label).join(", ") : u || "Select options" : w?.label || u || "Select an option";
|
|
899
899
|
return /* @__PURE__ */ c(
|
|
900
900
|
"div",
|
|
901
901
|
{
|
|
@@ -905,17 +905,17 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
905
905
|
a && "w-full",
|
|
906
906
|
m
|
|
907
907
|
),
|
|
908
|
-
...
|
|
908
|
+
...E,
|
|
909
909
|
children: [
|
|
910
910
|
t && /* @__PURE__ */ e(
|
|
911
911
|
"label",
|
|
912
912
|
{
|
|
913
|
-
htmlFor:
|
|
913
|
+
htmlFor: D,
|
|
914
914
|
onClick: () => I(!U),
|
|
915
915
|
className: d(
|
|
916
916
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
917
917
|
X ? "text-danger-fg" : "text-text-muted",
|
|
918
|
-
|
|
918
|
+
N
|
|
919
919
|
),
|
|
920
920
|
children: t
|
|
921
921
|
}
|
|
@@ -926,7 +926,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
926
926
|
{
|
|
927
927
|
ref: P,
|
|
928
928
|
type: "button",
|
|
929
|
-
id:
|
|
929
|
+
id: D,
|
|
930
930
|
disabled: o,
|
|
931
931
|
onClick: () => I(!U),
|
|
932
932
|
className: d(
|
|
@@ -936,7 +936,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
936
936
|
"bg-surface",
|
|
937
937
|
Ot[s],
|
|
938
938
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
939
|
-
|
|
939
|
+
f
|
|
940
940
|
),
|
|
941
941
|
children: [
|
|
942
942
|
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: j() }),
|
|
@@ -954,15 +954,15 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
U && /* @__PURE__ */ c("div", { style: ce, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
|
|
957
|
-
|
|
957
|
+
b && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
|
|
958
958
|
"input",
|
|
959
959
|
{
|
|
960
960
|
type: "text",
|
|
961
961
|
placeholder: "Search...",
|
|
962
962
|
value: q,
|
|
963
|
-
onChange: (
|
|
964
|
-
onKeyDown: (
|
|
965
|
-
|
|
963
|
+
onChange: (M) => K(M.target.value),
|
|
964
|
+
onKeyDown: (M) => {
|
|
965
|
+
M.key === "Enter" && le && (M.preventDefault(), G(q));
|
|
966
966
|
},
|
|
967
967
|
className: d(
|
|
968
968
|
"w-full px-3 py-2 text-sm rounded-md border",
|
|
@@ -996,32 +996,32 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
996
996
|
children: u
|
|
997
997
|
}
|
|
998
998
|
),
|
|
999
|
-
ae.map((
|
|
1000
|
-
const
|
|
999
|
+
ae.map((M) => {
|
|
1000
|
+
const T = p ? Array.isArray(C) && C.includes(M.value) : C === M.value;
|
|
1001
1001
|
return /* @__PURE__ */ e(
|
|
1002
1002
|
"li",
|
|
1003
1003
|
{
|
|
1004
|
-
onClick: () => !
|
|
1004
|
+
onClick: () => !M.disabled && A(M.value),
|
|
1005
1005
|
className: d(
|
|
1006
1006
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1007
1007
|
"text-text",
|
|
1008
|
-
|
|
1009
|
-
|
|
1008
|
+
M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1009
|
+
T && "bg-accent-soft text-accent font-semibold"
|
|
1010
1010
|
),
|
|
1011
1011
|
children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
|
|
1012
1012
|
p && /* @__PURE__ */ e(
|
|
1013
1013
|
"input",
|
|
1014
1014
|
{
|
|
1015
1015
|
type: "checkbox",
|
|
1016
|
-
checked:
|
|
1016
|
+
checked: T,
|
|
1017
1017
|
readOnly: !0,
|
|
1018
1018
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1019
1019
|
}
|
|
1020
1020
|
),
|
|
1021
|
-
/* @__PURE__ */ e("span", { children:
|
|
1021
|
+
/* @__PURE__ */ e("span", { children: M.label })
|
|
1022
1022
|
] })
|
|
1023
1023
|
},
|
|
1024
|
-
|
|
1024
|
+
M.value
|
|
1025
1025
|
);
|
|
1026
1026
|
})
|
|
1027
1027
|
] })
|
|
@@ -1043,12 +1043,12 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1043
1043
|
}
|
|
1044
1044
|
);
|
|
1045
1045
|
Ne.displayName = "Select";
|
|
1046
|
-
const
|
|
1046
|
+
const Ft = {
|
|
1047
1047
|
sm: "h-control-sm px-3 text-sm",
|
|
1048
1048
|
md: "h-control-md px-3 text-base",
|
|
1049
1049
|
lg: "h-control-lg px-3 text-base",
|
|
1050
1050
|
full: "h-control-md px-3 text-base"
|
|
1051
|
-
},
|
|
1051
|
+
}, Be = "mb-1.5 block text-xs font-semibold uppercase tracking-label", be = me(
|
|
1052
1052
|
({
|
|
1053
1053
|
label: t,
|
|
1054
1054
|
helperText: r,
|
|
@@ -1059,21 +1059,21 @@ const Bt = {
|
|
|
1059
1059
|
endIcon: l,
|
|
1060
1060
|
loading: u = !1,
|
|
1061
1061
|
containerClassName: m,
|
|
1062
|
-
labelClassName:
|
|
1063
|
-
className:
|
|
1064
|
-
id:
|
|
1065
|
-
...
|
|
1062
|
+
labelClassName: N,
|
|
1063
|
+
className: f,
|
|
1064
|
+
id: h,
|
|
1065
|
+
...b
|
|
1066
1066
|
}, p) => {
|
|
1067
|
-
const
|
|
1067
|
+
const C = oe.useId(), g = h || `textfield-${C}`, x = !!n, _ = n || r ? `${g}-description` : void 0;
|
|
1068
1068
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", m), children: [
|
|
1069
1069
|
t && /* @__PURE__ */ e(
|
|
1070
1070
|
"label",
|
|
1071
1071
|
{
|
|
1072
1072
|
htmlFor: g,
|
|
1073
1073
|
className: d(
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1074
|
+
Be,
|
|
1075
|
+
x ? "text-danger-fg" : "text-text-subtle",
|
|
1076
|
+
N
|
|
1077
1077
|
),
|
|
1078
1078
|
children: t
|
|
1079
1079
|
}
|
|
@@ -1085,21 +1085,21 @@ const Bt = {
|
|
|
1085
1085
|
{
|
|
1086
1086
|
ref: p,
|
|
1087
1087
|
id: g,
|
|
1088
|
-
"aria-invalid":
|
|
1089
|
-
"aria-describedby":
|
|
1088
|
+
"aria-invalid": x || void 0,
|
|
1089
|
+
"aria-describedby": _,
|
|
1090
1090
|
className: d(
|
|
1091
1091
|
"block w-full rounded-md border bg-surface-input text-text",
|
|
1092
1092
|
"transition-colors duration-fast ease-out",
|
|
1093
1093
|
"placeholder:text-text-subtle",
|
|
1094
1094
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1095
1095
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1096
|
-
|
|
1096
|
+
Ft[s],
|
|
1097
1097
|
o && "pl-9",
|
|
1098
1098
|
(l || u) && "pr-9",
|
|
1099
|
-
|
|
1100
|
-
|
|
1099
|
+
x ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
1100
|
+
f
|
|
1101
1101
|
),
|
|
1102
|
-
...
|
|
1102
|
+
...b
|
|
1103
1103
|
}
|
|
1104
1104
|
),
|
|
1105
1105
|
(l || u) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: u ? /* @__PURE__ */ e(
|
|
@@ -1113,8 +1113,8 @@ const Bt = {
|
|
|
1113
1113
|
(n || r) && /* @__PURE__ */ e(
|
|
1114
1114
|
"p",
|
|
1115
1115
|
{
|
|
1116
|
-
id:
|
|
1117
|
-
className: d("mt-1 text-xs",
|
|
1116
|
+
id: _,
|
|
1117
|
+
className: d("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
|
|
1118
1118
|
children: n || r
|
|
1119
1119
|
}
|
|
1120
1120
|
)
|
|
@@ -1122,7 +1122,7 @@ const Bt = {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
);
|
|
1124
1124
|
be.displayName = "TextField";
|
|
1125
|
-
function
|
|
1125
|
+
function Rt({
|
|
1126
1126
|
value: t,
|
|
1127
1127
|
onChange: r,
|
|
1128
1128
|
onListFolders: n,
|
|
@@ -1132,27 +1132,27 @@ function Ft({
|
|
|
1132
1132
|
templatePlaceholder: l,
|
|
1133
1133
|
showTemplate: u = !0
|
|
1134
1134
|
}) {
|
|
1135
|
-
const [m,
|
|
1135
|
+
const [m, N] = R([]);
|
|
1136
1136
|
Q(() => {
|
|
1137
|
-
let
|
|
1138
|
-
return Promise.resolve(n?.()).then((
|
|
1139
|
-
|
|
1137
|
+
let h = !0;
|
|
1138
|
+
return Promise.resolve(n?.()).then((b) => {
|
|
1139
|
+
h && b && N(b.data ?? []);
|
|
1140
1140
|
}).catch(() => {
|
|
1141
1141
|
}), () => {
|
|
1142
|
-
|
|
1142
|
+
h = !1;
|
|
1143
1143
|
};
|
|
1144
1144
|
}, []);
|
|
1145
|
-
const
|
|
1145
|
+
const f = t ?? {};
|
|
1146
1146
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
1147
1147
|
/* @__PURE__ */ e(
|
|
1148
1148
|
Ne,
|
|
1149
1149
|
{
|
|
1150
1150
|
size: a,
|
|
1151
1151
|
fullWidth: !0,
|
|
1152
|
-
value:
|
|
1153
|
-
options: m.map((
|
|
1152
|
+
value: f.folderId ?? "",
|
|
1153
|
+
options: m.map((h) => ({ value: h.id, label: h.name })),
|
|
1154
1154
|
placeholder: o ?? "Select a folder",
|
|
1155
|
-
onChange: (
|
|
1155
|
+
onChange: (h) => r?.({ ...f, folderId: h })
|
|
1156
1156
|
}
|
|
1157
1157
|
),
|
|
1158
1158
|
u && /* @__PURE__ */ e(
|
|
@@ -1160,14 +1160,14 @@ function Ft({
|
|
|
1160
1160
|
{
|
|
1161
1161
|
size: a,
|
|
1162
1162
|
disabled: s ?? !1,
|
|
1163
|
-
value:
|
|
1163
|
+
value: f.pathTemplate ?? "",
|
|
1164
1164
|
placeholder: l ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
|
|
1165
|
-
onChange: (
|
|
1165
|
+
onChange: (h) => r?.({ ...f, pathTemplate: h.target.value })
|
|
1166
1166
|
}
|
|
1167
1167
|
)
|
|
1168
1168
|
] });
|
|
1169
1169
|
}
|
|
1170
|
-
const fe = (...t) => t.filter(Boolean).join(" "),
|
|
1170
|
+
const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ht = (t) => /* @__PURE__ */ e(ge, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Vt = {
|
|
1171
1171
|
sm: "h-control-sm px-3 text-sm",
|
|
1172
1172
|
md: "h-control-md px-3 text-base",
|
|
1173
1173
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1184,64 +1184,64 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1184
1184
|
error: n,
|
|
1185
1185
|
size: s = "md",
|
|
1186
1186
|
fullWidth: a = !1,
|
|
1187
|
-
startIcon: o = /* @__PURE__ */ e(
|
|
1187
|
+
startIcon: o = /* @__PURE__ */ e(Bt, {}),
|
|
1188
1188
|
loading: l = !1,
|
|
1189
1189
|
containerClassName: u,
|
|
1190
1190
|
labelClassName: m,
|
|
1191
|
-
className:
|
|
1192
|
-
id:
|
|
1193
|
-
options:
|
|
1194
|
-
onRemoteSearch:
|
|
1191
|
+
className: N,
|
|
1192
|
+
id: f,
|
|
1193
|
+
options: h,
|
|
1194
|
+
onRemoteSearch: b,
|
|
1195
1195
|
onSelect: p,
|
|
1196
|
-
debounceTime:
|
|
1196
|
+
debounceTime: C = 500,
|
|
1197
1197
|
showAllOnOpen: g = !1,
|
|
1198
|
-
value:
|
|
1199
|
-
onChange:
|
|
1200
|
-
...
|
|
1201
|
-
},
|
|
1202
|
-
const
|
|
1198
|
+
value: x,
|
|
1199
|
+
onChange: _,
|
|
1200
|
+
...E
|
|
1201
|
+
}, W) => {
|
|
1202
|
+
const D = f || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, K] = R(x || ""), [re, P] = R(!1), [ce, k] = R(!1), [i, S] = R(!1);
|
|
1203
1203
|
Q(() => {
|
|
1204
|
-
|
|
1205
|
-
}, [
|
|
1206
|
-
const
|
|
1207
|
-
if (g && !i || !q) return
|
|
1204
|
+
x !== void 0 && K(x);
|
|
1205
|
+
}, [x]);
|
|
1206
|
+
const y = he(() => {
|
|
1207
|
+
if (g && !i || !q) return h;
|
|
1208
1208
|
const j = String(q).toLowerCase();
|
|
1209
|
-
return
|
|
1210
|
-
(
|
|
1209
|
+
return h.filter(
|
|
1210
|
+
(M) => String(M.label).toLowerCase().includes(j)
|
|
1211
1211
|
);
|
|
1212
|
-
}, [q,
|
|
1212
|
+
}, [q, h, g, i]);
|
|
1213
1213
|
Q(() => {
|
|
1214
|
-
if (!
|
|
1215
|
-
|
|
1214
|
+
if (!b || !q) {
|
|
1215
|
+
k(!1);
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
const j = setTimeout(async () => {
|
|
1219
|
-
|
|
1219
|
+
k(!0);
|
|
1220
1220
|
try {
|
|
1221
|
-
await
|
|
1222
|
-
} catch (
|
|
1223
|
-
console.error("Remote search failed:",
|
|
1221
|
+
await b(String(q));
|
|
1222
|
+
} catch (M) {
|
|
1223
|
+
console.error("Remote search failed:", M);
|
|
1224
1224
|
} finally {
|
|
1225
|
-
|
|
1225
|
+
k(!1);
|
|
1226
1226
|
}
|
|
1227
|
-
},
|
|
1227
|
+
}, C);
|
|
1228
1228
|
return () => {
|
|
1229
|
-
clearTimeout(j),
|
|
1229
|
+
clearTimeout(j), k(!1);
|
|
1230
1230
|
};
|
|
1231
|
-
}, [q,
|
|
1232
|
-
const j = (
|
|
1233
|
-
U.current && !U.current.contains(
|
|
1231
|
+
}, [q, C, b]), Q(() => {
|
|
1232
|
+
const j = (M) => {
|
|
1233
|
+
U.current && !U.current.contains(M.target) && P(!1);
|
|
1234
1234
|
};
|
|
1235
1235
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1236
1236
|
}, []);
|
|
1237
|
-
const
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
|
|
1237
|
+
const A = (j) => {
|
|
1238
|
+
const M = j.target.value;
|
|
1239
|
+
K(M), P(!0), S(!0), _ && _(j);
|
|
1240
|
+
}, w = (j) => {
|
|
1241
|
+
K(j.label), P(!1), S(!1), p && p(j.value);
|
|
1242
1242
|
}, ee = () => {
|
|
1243
|
-
(
|
|
1244
|
-
}, ae = l || ce, le = re && (
|
|
1243
|
+
(h.length > 0 || b) && (P(!0), S(!1));
|
|
1244
|
+
}, ae = l || ce, le = re && (y.length > 0 || ae), G = he(() => W || I, [W]);
|
|
1245
1245
|
return /* @__PURE__ */ c(
|
|
1246
1246
|
"div",
|
|
1247
1247
|
{
|
|
@@ -1256,7 +1256,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1256
1256
|
t && /* @__PURE__ */ e(
|
|
1257
1257
|
"label",
|
|
1258
1258
|
{
|
|
1259
|
-
htmlFor:
|
|
1259
|
+
htmlFor: D,
|
|
1260
1260
|
className: fe(
|
|
1261
1261
|
"block text-sm font-medium mb-1",
|
|
1262
1262
|
X ? "text-danger-fg" : "text-text",
|
|
@@ -1271,9 +1271,9 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1271
1271
|
"input",
|
|
1272
1272
|
{
|
|
1273
1273
|
ref: G,
|
|
1274
|
-
id:
|
|
1274
|
+
id: D,
|
|
1275
1275
|
value: q,
|
|
1276
|
-
onChange:
|
|
1276
|
+
onChange: A,
|
|
1277
1277
|
onFocus: ee,
|
|
1278
1278
|
className: fe(
|
|
1279
1279
|
// Base styles
|
|
@@ -1281,16 +1281,16 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1281
1281
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1282
1282
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1283
1283
|
// Size styles
|
|
1284
|
-
|
|
1284
|
+
Vt[s],
|
|
1285
1285
|
// Icon padding
|
|
1286
1286
|
o ? "pl-10" : "",
|
|
1287
1287
|
"pr-10",
|
|
1288
1288
|
// Altijd padding rechts voor de dropdown/loading icon
|
|
1289
1289
|
// State styles
|
|
1290
1290
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
1291
|
-
|
|
1291
|
+
N || ""
|
|
1292
1292
|
),
|
|
1293
|
-
...
|
|
1293
|
+
...E
|
|
1294
1294
|
}
|
|
1295
1295
|
),
|
|
1296
1296
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || l ? (
|
|
@@ -1305,7 +1305,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1305
1305
|
) : (
|
|
1306
1306
|
// Dropdown Chevron
|
|
1307
1307
|
/* @__PURE__ */ e(
|
|
1308
|
-
|
|
1308
|
+
Ht,
|
|
1309
1309
|
{
|
|
1310
1310
|
className: fe(
|
|
1311
1311
|
"text-text-muted cursor-pointer transition-transform",
|
|
@@ -1324,11 +1324,11 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1324
1324
|
{
|
|
1325
1325
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1326
1326
|
role: "listbox",
|
|
1327
|
-
children:
|
|
1327
|
+
children: y.length > 0 ? y.map((j) => /* @__PURE__ */ e(
|
|
1328
1328
|
"li",
|
|
1329
1329
|
{
|
|
1330
1330
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1331
|
-
onClick: () =>
|
|
1331
|
+
onClick: () => w(j),
|
|
1332
1332
|
role: "option",
|
|
1333
1333
|
"aria-selected": q === j.label,
|
|
1334
1334
|
children: j.label
|
|
@@ -1347,7 +1347,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1347
1347
|
children: n || r
|
|
1348
1348
|
}
|
|
1349
1349
|
),
|
|
1350
|
-
|
|
1350
|
+
b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
|
|
1351
1351
|
"Huidige zoekterm (niet-gedebounced): ",
|
|
1352
1352
|
String(q)
|
|
1353
1353
|
] })
|
|
@@ -1447,12 +1447,12 @@ function Wt({
|
|
|
1447
1447
|
{
|
|
1448
1448
|
className: "grid gap-2 border-t border-border-subtle p-3",
|
|
1449
1449
|
style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
|
|
1450
|
-
children: Array.from({ length: s }).map((m,
|
|
1450
|
+
children: Array.from({ length: s }).map((m, N) => /* @__PURE__ */ e(
|
|
1451
1451
|
"div",
|
|
1452
1452
|
{
|
|
1453
1453
|
className: "h-4 w-full rounded-sm bg-surface-hover"
|
|
1454
1454
|
},
|
|
1455
|
-
`cell-${u}-${
|
|
1455
|
+
`cell-${u}-${N}`
|
|
1456
1456
|
))
|
|
1457
1457
|
},
|
|
1458
1458
|
`row-${u}`
|
|
@@ -1471,66 +1471,66 @@ const Kt = ({
|
|
|
1471
1471
|
showCheck: u = !0,
|
|
1472
1472
|
header: m
|
|
1473
1473
|
}) => {
|
|
1474
|
-
const [
|
|
1475
|
-
|
|
1474
|
+
const [N, f] = R(!1), [h, b] = R(null), [p, C] = R({ top: 0, left: 0 }), g = se(null), x = se(null), _ = se(null), E = se(null), W = ze(N, x, { placement: a }), D = se(null), X = () => Array.from(
|
|
1475
|
+
E.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1476
1476
|
);
|
|
1477
1477
|
Q(() => {
|
|
1478
|
-
|
|
1479
|
-
}, [
|
|
1478
|
+
N && X()[0]?.focus();
|
|
1479
|
+
}, [N]);
|
|
1480
1480
|
const U = (i) => {
|
|
1481
1481
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key)) return;
|
|
1482
|
-
const
|
|
1483
|
-
if (
|
|
1482
|
+
const y = X();
|
|
1483
|
+
if (y.length === 0) return;
|
|
1484
1484
|
i.preventDefault();
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1485
|
+
const A = y.indexOf(document.activeElement), w = i.key === "Home" ? 0 : i.key === "End" ? y.length - 1 : i.key === "ArrowDown" ? (A + 1) % y.length : (A - 1 + y.length) % y.length;
|
|
1486
|
+
y[w]?.focus();
|
|
1487
1487
|
};
|
|
1488
1488
|
Q(() => {
|
|
1489
1489
|
const i = (S) => {
|
|
1490
|
-
g.current && (!g.current.contains(S.target) ||
|
|
1490
|
+
g.current && (!g.current.contains(S.target) || _.current && !_.current.contains(S.target)) && (f(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1491
1491
|
};
|
|
1492
|
-
return
|
|
1492
|
+
return N && document.addEventListener("mousedown", i), () => {
|
|
1493
1493
|
document.removeEventListener("mousedown", i);
|
|
1494
1494
|
};
|
|
1495
|
-
}, [
|
|
1495
|
+
}, [N]), Q(() => {
|
|
1496
1496
|
const i = (S) => {
|
|
1497
|
-
S.key === "Escape" && (
|
|
1497
|
+
S.key === "Escape" && (f(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
|
|
1498
1498
|
};
|
|
1499
|
-
return
|
|
1499
|
+
return N && document.addEventListener("keydown", i), () => {
|
|
1500
1500
|
document.removeEventListener("keydown", i);
|
|
1501
1501
|
};
|
|
1502
|
-
}, [
|
|
1503
|
-
if (
|
|
1502
|
+
}, [N]), Q(() => {
|
|
1503
|
+
if (h && g.current) {
|
|
1504
1504
|
const i = g.current.querySelector(
|
|
1505
|
-
`[data-option-value="${
|
|
1505
|
+
`[data-option-value="${h}"]`
|
|
1506
1506
|
);
|
|
1507
1507
|
if (i) {
|
|
1508
1508
|
const S = i.getBoundingClientRect();
|
|
1509
|
-
|
|
1509
|
+
C({
|
|
1510
1510
|
top: S.top,
|
|
1511
1511
|
left: S.right + 8
|
|
1512
1512
|
});
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
}, [
|
|
1516
|
-
|
|
1515
|
+
}, [h]), Q(() => () => {
|
|
1516
|
+
D.current && clearTimeout(D.current);
|
|
1517
1517
|
}, []);
|
|
1518
1518
|
const I = (i) => {
|
|
1519
|
-
i.stopPropagation(), !o && (
|
|
1520
|
-
}, q = (i, S,
|
|
1521
|
-
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value,
|
|
1522
|
-
},
|
|
1523
|
-
|
|
1519
|
+
i.stopPropagation(), !o && (f(!N), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1520
|
+
}, q = (i, S, y) => {
|
|
1521
|
+
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, y), f(!1), b(null));
|
|
1522
|
+
}, K = (i) => {
|
|
1523
|
+
D.current && (clearTimeout(D.current), D.current = null), i.children && i.children.length > 0 ? b(i.value) : b(null);
|
|
1524
1524
|
}, re = (i) => {
|
|
1525
|
-
i.children && i.children.length > 0 ?
|
|
1526
|
-
|
|
1527
|
-
}, 150) :
|
|
1528
|
-
}, P = (i, S,
|
|
1529
|
-
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value,
|
|
1525
|
+
i.children && i.children.length > 0 ? D.current = setTimeout(() => {
|
|
1526
|
+
b(null);
|
|
1527
|
+
}, 150) : b(null);
|
|
1528
|
+
}, P = (i, S, y) => {
|
|
1529
|
+
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, y), f(!1), b(null));
|
|
1530
1530
|
}, ce = d(
|
|
1531
1531
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1532
1532
|
"max-h-60 overflow-auto"
|
|
1533
|
-
),
|
|
1533
|
+
), k = d(
|
|
1534
1534
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1535
1535
|
"max-h-60 overflow-auto"
|
|
1536
1536
|
);
|
|
@@ -1546,18 +1546,18 @@ const Kt = ({
|
|
|
1546
1546
|
/* @__PURE__ */ e(
|
|
1547
1547
|
"button",
|
|
1548
1548
|
{
|
|
1549
|
-
ref:
|
|
1549
|
+
ref: x,
|
|
1550
1550
|
onClick: I,
|
|
1551
1551
|
disabled: o,
|
|
1552
1552
|
"aria-haspopup": "menu",
|
|
1553
|
-
"aria-expanded":
|
|
1553
|
+
"aria-expanded": N,
|
|
1554
1554
|
className: d("inline-flex items-center justify-center", {
|
|
1555
1555
|
"opacity-50 cursor-not-allowed": o
|
|
1556
1556
|
}),
|
|
1557
1557
|
children: t
|
|
1558
1558
|
}
|
|
1559
1559
|
),
|
|
1560
|
-
|
|
1560
|
+
N && /* @__PURE__ */ e("div", { ref: E, className: ce, style: W, onKeyDown: U, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
|
|
1561
1561
|
m && (typeof m == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: m }) : m),
|
|
1562
1562
|
r.map((i, S) => {
|
|
1563
1563
|
if (i.divider)
|
|
@@ -1568,23 +1568,23 @@ const Kt = ({
|
|
|
1568
1568
|
},
|
|
1569
1569
|
`divider-${S}`
|
|
1570
1570
|
);
|
|
1571
|
-
const
|
|
1571
|
+
const y = i.children && i.children.length > 0, A = h === i.value;
|
|
1572
1572
|
return /* @__PURE__ */ c("div", { className: "relative group", children: [
|
|
1573
1573
|
/* @__PURE__ */ c(
|
|
1574
1574
|
"button",
|
|
1575
1575
|
{
|
|
1576
1576
|
"data-option-value": i.value,
|
|
1577
1577
|
role: "menuitem",
|
|
1578
|
-
"aria-haspopup":
|
|
1579
|
-
onClick: (
|
|
1580
|
-
onMouseEnter: () =>
|
|
1578
|
+
"aria-haspopup": y ? "menu" : void 0,
|
|
1579
|
+
onClick: (w) => q(w, i),
|
|
1580
|
+
onMouseEnter: () => K(i),
|
|
1581
1581
|
onMouseLeave: () => re(i),
|
|
1582
1582
|
disabled: i.disabled,
|
|
1583
1583
|
className: d(
|
|
1584
1584
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
|
|
1585
1585
|
{
|
|
1586
1586
|
"opacity-50 cursor-not-allowed": i.disabled,
|
|
1587
|
-
"bg-surface-hover":
|
|
1587
|
+
"bg-surface-hover": A && y
|
|
1588
1588
|
}
|
|
1589
1589
|
),
|
|
1590
1590
|
children: [
|
|
@@ -1597,30 +1597,30 @@ const Kt = ({
|
|
|
1597
1597
|
] }),
|
|
1598
1598
|
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
|
|
1599
1599
|
u && n === i.value && /* @__PURE__ */ e(Te, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
|
|
1600
|
-
|
|
1600
|
+
y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
|
|
1601
1601
|
] })
|
|
1602
1602
|
]
|
|
1603
1603
|
}
|
|
1604
1604
|
),
|
|
1605
|
-
|
|
1605
|
+
y && A && /* @__PURE__ */ e(
|
|
1606
1606
|
"div",
|
|
1607
1607
|
{
|
|
1608
|
-
ref:
|
|
1609
|
-
className:
|
|
1608
|
+
ref: _,
|
|
1609
|
+
className: k,
|
|
1610
1610
|
style: {
|
|
1611
1611
|
top: `${p.top}px`,
|
|
1612
1612
|
left: `${p.left}px`
|
|
1613
1613
|
},
|
|
1614
1614
|
onMouseEnter: () => {
|
|
1615
|
-
|
|
1615
|
+
D.current && (clearTimeout(D.current), D.current = null), b(i.value);
|
|
1616
1616
|
},
|
|
1617
1617
|
onMouseLeave: () => {
|
|
1618
|
-
|
|
1619
|
-
|
|
1618
|
+
D.current = setTimeout(() => {
|
|
1619
|
+
b(null);
|
|
1620
1620
|
}, 150);
|
|
1621
1621
|
},
|
|
1622
|
-
children: /* @__PURE__ */ e("div", { className: "p-2", children: i.children.map((
|
|
1623
|
-
if (
|
|
1622
|
+
children: /* @__PURE__ */ e("div", { className: "p-2", children: i.children.map((w, ee) => {
|
|
1623
|
+
if (w.divider)
|
|
1624
1624
|
return /* @__PURE__ */ e(
|
|
1625
1625
|
"div",
|
|
1626
1626
|
{
|
|
@@ -1629,35 +1629,35 @@ const Kt = ({
|
|
|
1629
1629
|
`divider-${ee}`
|
|
1630
1630
|
);
|
|
1631
1631
|
const ae = typeof n == "object" && n[i.value] && n[i.value].includes(
|
|
1632
|
-
|
|
1633
|
-
) || n ===
|
|
1632
|
+
w.value
|
|
1633
|
+
) || n === w.value;
|
|
1634
1634
|
return /* @__PURE__ */ c(
|
|
1635
1635
|
"button",
|
|
1636
1636
|
{
|
|
1637
1637
|
onClick: (le) => P(
|
|
1638
1638
|
le,
|
|
1639
|
-
|
|
1639
|
+
w,
|
|
1640
1640
|
i.value
|
|
1641
1641
|
),
|
|
1642
|
-
disabled:
|
|
1642
|
+
disabled: w.disabled,
|
|
1643
1643
|
className: d(
|
|
1644
1644
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
1645
1645
|
{
|
|
1646
|
-
"opacity-50 cursor-not-allowed":
|
|
1646
|
+
"opacity-50 cursor-not-allowed": w.disabled
|
|
1647
1647
|
}
|
|
1648
1648
|
),
|
|
1649
1649
|
children: [
|
|
1650
1650
|
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
1651
|
-
|
|
1651
|
+
w.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: w.icon }),
|
|
1652
1652
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
1653
|
-
/* @__PURE__ */ e("span", { className: "font-base truncate", children:
|
|
1654
|
-
|
|
1653
|
+
/* @__PURE__ */ e("span", { className: "font-base truncate", children: w.label }),
|
|
1654
|
+
w.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: w.description })
|
|
1655
1655
|
] })
|
|
1656
1656
|
] }),
|
|
1657
1657
|
u && ae && /* @__PURE__ */ e(Te, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
|
|
1658
1658
|
]
|
|
1659
1659
|
},
|
|
1660
|
-
|
|
1660
|
+
w.value
|
|
1661
1661
|
);
|
|
1662
1662
|
}) })
|
|
1663
1663
|
}
|
|
@@ -1665,10 +1665,10 @@ const Kt = ({
|
|
|
1665
1665
|
] }, i.value);
|
|
1666
1666
|
}),
|
|
1667
1667
|
(() => {
|
|
1668
|
-
const i = r.reduce((S,
|
|
1669
|
-
if (
|
|
1670
|
-
const
|
|
1671
|
-
return S + 1 +
|
|
1668
|
+
const i = r.reduce((S, y) => {
|
|
1669
|
+
if (y.divider) return S;
|
|
1670
|
+
const A = y.children ? y.children.filter((w) => !w.divider).length : 0;
|
|
1671
|
+
return S + 1 + A;
|
|
1672
1672
|
}, 0);
|
|
1673
1673
|
return i > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
1674
1674
|
i,
|
|
@@ -1679,7 +1679,7 @@ const Kt = ({
|
|
|
1679
1679
|
]
|
|
1680
1680
|
}
|
|
1681
1681
|
);
|
|
1682
|
-
}, Le = {
|
|
1682
|
+
}, un = (t) => (r) => t(r instanceof Date ? r : null), mn = (t) => (r) => t(typeof r == "string" ? r : ""), Le = {
|
|
1683
1683
|
none: "pl-0",
|
|
1684
1684
|
sm: "pl-2",
|
|
1685
1685
|
md: "pl-4",
|
|
@@ -1689,7 +1689,7 @@ const Kt = ({
|
|
|
1689
1689
|
sm: "pr-2",
|
|
1690
1690
|
md: "pr-4",
|
|
1691
1691
|
lg: "pr-6"
|
|
1692
|
-
}, Gt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Jt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: tt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ge, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Zt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: rt, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }),
|
|
1692
|
+
}, Gt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Jt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: tt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ge, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Zt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: rt, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }), He = () => /* @__PURE__ */ e(Y, { icon: ge, size: "md", color: "current" }), tr = (t) => {
|
|
1693
1693
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1694
1694
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1695
1695
|
};
|
|
@@ -1708,7 +1708,7 @@ const Kt = ({
|
|
|
1708
1708
|
/* @__PURE__ */ e("span", { className: "text-text", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1709
1709
|
(s) => t.options?.find((a) => a.value === s)?.label
|
|
1710
1710
|
).join(", ") : t.options?.find((s) => s.value === t.value)?.label }),
|
|
1711
|
-
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(
|
|
1711
|
+
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(He, {}) })
|
|
1712
1712
|
] }),
|
|
1713
1713
|
/* @__PURE__ */ c("div", { className: "absolute z-10 left-0 mt-1 bg-surface border border-border rounded-lg shadow-overlay p-2 w-48", children: [
|
|
1714
1714
|
t.options?.map((s) => /* @__PURE__ */ e(
|
|
@@ -1746,105 +1746,105 @@ const Kt = ({
|
|
|
1746
1746
|
paginated: l = !1,
|
|
1747
1747
|
pageSizeOptions: u = [10, 25, 50, 100],
|
|
1748
1748
|
defaultPageSize: m = 10,
|
|
1749
|
-
actions:
|
|
1750
|
-
onRowClick:
|
|
1751
|
-
selectable:
|
|
1752
|
-
selectedRows:
|
|
1749
|
+
actions: N = [],
|
|
1750
|
+
onRowClick: f,
|
|
1751
|
+
selectable: h = !1,
|
|
1752
|
+
selectedRows: b = [],
|
|
1753
1753
|
onSelectionChange: p,
|
|
1754
|
-
getRowKey:
|
|
1754
|
+
getRowKey: C = (I, q) => q,
|
|
1755
1755
|
emptyContent: g,
|
|
1756
|
-
hoverable:
|
|
1757
|
-
bordered:
|
|
1758
|
-
striped:
|
|
1759
|
-
padding:
|
|
1760
|
-
className:
|
|
1756
|
+
hoverable: x = !0,
|
|
1757
|
+
bordered: _ = !1,
|
|
1758
|
+
striped: E = !1,
|
|
1759
|
+
padding: W = "md",
|
|
1760
|
+
className: D,
|
|
1761
1761
|
rowClassName: X,
|
|
1762
1762
|
headerBackground: U = !0
|
|
1763
1763
|
}) => {
|
|
1764
|
-
const [I, q] =
|
|
1764
|
+
const [I, q] = R(""), [K, re] = R({
|
|
1765
1765
|
column: null,
|
|
1766
1766
|
direction: null
|
|
1767
|
-
}), [P, ce] =
|
|
1767
|
+
}), [P, ce] = R({
|
|
1768
1768
|
page: 0,
|
|
1769
1769
|
pageSize: m
|
|
1770
|
-
}),
|
|
1770
|
+
}), k = se(null), i = he(() => {
|
|
1771
1771
|
let v = t;
|
|
1772
1772
|
if (s && I.trim()) {
|
|
1773
|
-
const
|
|
1773
|
+
const V = r.filter(
|
|
1774
1774
|
(J) => J.searchable !== !1
|
|
1775
1775
|
), Z = I.toLowerCase();
|
|
1776
|
-
v = v.filter((J) =>
|
|
1776
|
+
v = v.filter((J) => V.some((O) => {
|
|
1777
1777
|
const ie = typeof O.accessor == "function" ? O.accessor(J) : J[O.accessor];
|
|
1778
1778
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1779
1779
|
}));
|
|
1780
1780
|
}
|
|
1781
|
-
return o.forEach((
|
|
1782
|
-
|
|
1783
|
-
const J = r.find((ie) => ie.id ===
|
|
1781
|
+
return o.forEach((V) => {
|
|
1782
|
+
V.value && V.value !== "all" && (v = v.filter((Z) => {
|
|
1783
|
+
const J = r.find((ie) => ie.id === V.id);
|
|
1784
1784
|
if (!J) return !0;
|
|
1785
1785
|
const O = typeof J.accessor == "function" ? J.accessor(Z) : Z[J.accessor];
|
|
1786
|
-
return String(O || "") ===
|
|
1786
|
+
return String(O || "") === V.value;
|
|
1787
1787
|
}));
|
|
1788
1788
|
}), v;
|
|
1789
1789
|
}, [t, I, r, s, o]), S = he(() => {
|
|
1790
|
-
if (!
|
|
1791
|
-
const v = r.find((
|
|
1792
|
-
return v ? [...i].sort((
|
|
1793
|
-
const J = typeof v.accessor == "function" ? v.accessor(
|
|
1790
|
+
if (!K.column || !K.direction) return i;
|
|
1791
|
+
const v = r.find((V) => V.id === K.column);
|
|
1792
|
+
return v ? [...i].sort((V, Z) => {
|
|
1793
|
+
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor], O = typeof v.accessor == "function" ? v.accessor(Z) : Z[v.accessor];
|
|
1794
1794
|
let ie = 0;
|
|
1795
|
-
return J < O ? ie = -1 : J > O && (ie = 1),
|
|
1795
|
+
return J < O ? ie = -1 : J > O && (ie = 1), K.direction === "desc" ? -ie : ie;
|
|
1796
1796
|
}) : i;
|
|
1797
|
-
}, [i,
|
|
1797
|
+
}, [i, K, r]), y = he(() => {
|
|
1798
1798
|
if (!l) return S;
|
|
1799
|
-
const v = P.page * P.pageSize,
|
|
1800
|
-
return S.slice(v,
|
|
1801
|
-
}, [S, P, l]),
|
|
1799
|
+
const v = P.page * P.pageSize, V = v + P.pageSize;
|
|
1800
|
+
return S.slice(v, V);
|
|
1801
|
+
}, [S, P, l]), A = ue(
|
|
1802
1802
|
(v) => {
|
|
1803
1803
|
r.find((Z) => Z.id === v)?.sortable && re((Z) => Z.column !== v ? { column: v, direction: "asc" } : Z.direction === "asc" ? { column: v, direction: "desc" } : { column: null, direction: null });
|
|
1804
1804
|
},
|
|
1805
1805
|
[r]
|
|
1806
|
-
),
|
|
1807
|
-
ce((
|
|
1806
|
+
), w = ue((v) => {
|
|
1807
|
+
ce((V) => ({ ...V, page: v }));
|
|
1808
1808
|
}, []), ee = ue((v) => {
|
|
1809
1809
|
ce({ page: 0, pageSize: v });
|
|
1810
1810
|
}, []), ae = ue(
|
|
1811
|
-
(v,
|
|
1811
|
+
(v, V) => {
|
|
1812
1812
|
if (!p) return;
|
|
1813
|
-
const Z =
|
|
1814
|
-
|
|
1815
|
-
(J, O) =>
|
|
1813
|
+
const Z = C(v, 0);
|
|
1814
|
+
b.map((J, O) => C(J, O)), p(V ? [...b, v] : b.filter(
|
|
1815
|
+
(J, O) => C(b[O], O) !== Z
|
|
1816
1816
|
));
|
|
1817
1817
|
},
|
|
1818
|
-
[
|
|
1818
|
+
[b, p, C]
|
|
1819
1819
|
), le = ue(
|
|
1820
1820
|
(v) => {
|
|
1821
|
-
p && p(v ? [...
|
|
1821
|
+
p && p(v ? [...y] : []);
|
|
1822
1822
|
},
|
|
1823
|
-
[
|
|
1823
|
+
[y, p]
|
|
1824
1824
|
);
|
|
1825
1825
|
Q(() => {
|
|
1826
1826
|
ce((v) => ({ ...v, page: 0 }));
|
|
1827
|
-
}, [I,
|
|
1827
|
+
}, [I, K]), Q(() => {
|
|
1828
1828
|
ce((v) => ({ ...v, page: 0 }));
|
|
1829
1829
|
}, [o.map((v) => v.value).join(",")]);
|
|
1830
|
-
const G = S.length, j = Math.ceil(G / P.pageSize),
|
|
1831
|
-
const
|
|
1832
|
-
return
|
|
1833
|
-
(Z, J) =>
|
|
1830
|
+
const G = S.length, j = Math.ceil(G / P.pageSize), M = P.page * P.pageSize + 1, T = Math.min(M + P.pageSize - 1, G), z = y.length > 0 && y.every((v) => {
|
|
1831
|
+
const V = C(v, 0);
|
|
1832
|
+
return b.some(
|
|
1833
|
+
(Z, J) => C(Z, J) === V
|
|
1834
1834
|
);
|
|
1835
|
-
}),
|
|
1836
|
-
const
|
|
1837
|
-
return
|
|
1838
|
-
(Z, J) =>
|
|
1835
|
+
}), B = y.some((v) => {
|
|
1836
|
+
const V = C(v, 0);
|
|
1837
|
+
return b.some(
|
|
1838
|
+
(Z, J) => C(Z, J) === V
|
|
1839
1839
|
);
|
|
1840
|
-
}),
|
|
1840
|
+
}), F = d(
|
|
1841
1841
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1842
|
-
|
|
1843
|
-
),
|
|
1842
|
+
D
|
|
1843
|
+
), H = U ? "bg-surface-sunk border-border border-t" : "bg-surface", $ = d(H, "h-control-lg"), L = d(
|
|
1844
1844
|
"text-text border-b border-border p-2"
|
|
1845
1845
|
), te = d("h-row-lg", {
|
|
1846
|
-
"hover:bg-surface-sunk":
|
|
1847
|
-
"cursor-pointer":
|
|
1846
|
+
"hover:bg-surface-sunk": x,
|
|
1847
|
+
"cursor-pointer": f
|
|
1848
1848
|
});
|
|
1849
1849
|
return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
1850
1850
|
(s || o.length > 0) && /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
@@ -1869,21 +1869,21 @@ const Kt = ({
|
|
|
1869
1869
|
tableColumns: r.length
|
|
1870
1870
|
}
|
|
1871
1871
|
) }),
|
|
1872
|
-
/* @__PURE__ */ c("table", { ref:
|
|
1873
|
-
/* @__PURE__ */ e("thead", { className:
|
|
1874
|
-
|
|
1872
|
+
/* @__PURE__ */ c("table", { ref: k, className: d(F, "min-w-full"), children: [
|
|
1873
|
+
/* @__PURE__ */ e("thead", { className: $, children: /* @__PURE__ */ c("tr", { children: [
|
|
1874
|
+
h && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1875
1875
|
"input",
|
|
1876
1876
|
{
|
|
1877
1877
|
type: "checkbox",
|
|
1878
1878
|
checked: z,
|
|
1879
1879
|
ref: (v) => {
|
|
1880
|
-
v && (v.indeterminate =
|
|
1880
|
+
v && (v.indeterminate = B && !z);
|
|
1881
1881
|
},
|
|
1882
1882
|
onChange: (v) => le(v.target.checked),
|
|
1883
1883
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1884
1884
|
}
|
|
1885
1885
|
) }),
|
|
1886
|
-
!n && r.map((v,
|
|
1886
|
+
!n && r.map((v, V) => /* @__PURE__ */ e(
|
|
1887
1887
|
"th",
|
|
1888
1888
|
{
|
|
1889
1889
|
className: d(
|
|
@@ -1895,14 +1895,14 @@ const Kt = ({
|
|
|
1895
1895
|
"text-center": v.align === "center",
|
|
1896
1896
|
"text-right": v.align === "right",
|
|
1897
1897
|
"cursor-pointer select-none": v.sortable,
|
|
1898
|
-
[`sticky left-0 ${
|
|
1899
|
-
[`sticky right-0 ${
|
|
1898
|
+
[`sticky left-0 ${H}`]: v.sticky === "left",
|
|
1899
|
+
[`sticky right-0 ${H}`]: v.sticky === "right"
|
|
1900
1900
|
},
|
|
1901
|
-
|
|
1902
|
-
|
|
1901
|
+
V === 0 && Le[W],
|
|
1902
|
+
V === r.length - 1 && Ie[W]
|
|
1903
1903
|
),
|
|
1904
1904
|
style: { width: v.width },
|
|
1905
|
-
onClick: () => v.sortable &&
|
|
1905
|
+
onClick: () => v.sortable && A(v.id),
|
|
1906
1906
|
children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1907
1907
|
v.headerCell ? v.headerCell() : v.header,
|
|
1908
1908
|
v.sortable && /* @__PURE__ */ c(
|
|
@@ -1910,19 +1910,19 @@ const Kt = ({
|
|
|
1910
1910
|
{
|
|
1911
1911
|
className: d(
|
|
1912
1912
|
"flex flex-col opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1913
|
-
|
|
1913
|
+
K.column === v.id && "opacity-100"
|
|
1914
1914
|
),
|
|
1915
1915
|
children: [
|
|
1916
1916
|
/* @__PURE__ */ e(
|
|
1917
1917
|
Jt,
|
|
1918
1918
|
{
|
|
1919
|
-
active:
|
|
1919
|
+
active: K.column === v.id && K.direction === "asc"
|
|
1920
1920
|
}
|
|
1921
1921
|
),
|
|
1922
1922
|
/* @__PURE__ */ e(
|
|
1923
1923
|
Yt,
|
|
1924
1924
|
{
|
|
1925
|
-
active:
|
|
1925
|
+
active: K.column === v.id && K.direction === "desc"
|
|
1926
1926
|
}
|
|
1927
1927
|
)
|
|
1928
1928
|
]
|
|
@@ -1932,21 +1932,21 @@ const Kt = ({
|
|
|
1932
1932
|
},
|
|
1933
1933
|
v.id
|
|
1934
1934
|
)),
|
|
1935
|
-
|
|
1935
|
+
N.length > 0 && /* @__PURE__ */ e("th", { className: d(L, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1936
1936
|
] }) }),
|
|
1937
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
1937
|
+
/* @__PURE__ */ e("tbody", { children: y.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1938
1938
|
"td",
|
|
1939
1939
|
{
|
|
1940
|
-
colSpan: r.length + (
|
|
1940
|
+
colSpan: r.length + (h ? 1 : 0) + (N.length > 0 ? 1 : 0),
|
|
1941
1941
|
className: d(
|
|
1942
1942
|
L,
|
|
1943
1943
|
"text-center py-8 text-text-muted"
|
|
1944
1944
|
),
|
|
1945
1945
|
children: g || "No data available"
|
|
1946
1946
|
}
|
|
1947
|
-
) }) :
|
|
1948
|
-
const Z =
|
|
1949
|
-
(O, ie) =>
|
|
1947
|
+
) }) : y.map((v, V) => {
|
|
1948
|
+
const Z = C(v, V), J = b.some(
|
|
1949
|
+
(O, ie) => C(O, ie) === Z
|
|
1950
1950
|
);
|
|
1951
1951
|
return /* @__PURE__ */ c(
|
|
1952
1952
|
"tr",
|
|
@@ -1954,13 +1954,13 @@ const Kt = ({
|
|
|
1954
1954
|
className: d(
|
|
1955
1955
|
te,
|
|
1956
1956
|
{ "bg-accent-soft": J },
|
|
1957
|
-
X?.(v,
|
|
1957
|
+
X?.(v, V)
|
|
1958
1958
|
),
|
|
1959
1959
|
onClick: (O) => {
|
|
1960
|
-
O.stopPropagation(),
|
|
1960
|
+
O.stopPropagation(), f?.(v, V);
|
|
1961
1961
|
},
|
|
1962
1962
|
children: [
|
|
1963
|
-
|
|
1963
|
+
h && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
1964
1964
|
"input",
|
|
1965
1965
|
{
|
|
1966
1966
|
type: "checkbox",
|
|
@@ -1985,32 +1985,32 @@ const Kt = ({
|
|
|
1985
1985
|
"sticky left-0 bg-surface": O.sticky === "left",
|
|
1986
1986
|
"sticky right-0 bg-surface": O.sticky === "right"
|
|
1987
1987
|
},
|
|
1988
|
-
ie === 0 && Le[
|
|
1989
|
-
ie === r.length - 1 && Ie[
|
|
1988
|
+
ie === 0 && Le[W],
|
|
1989
|
+
ie === r.length - 1 && Ie[W]
|
|
1990
1990
|
),
|
|
1991
1991
|
children: O.cell ? O.cell(ve, v, ie) : String(ve || "")
|
|
1992
1992
|
},
|
|
1993
1993
|
O.id
|
|
1994
1994
|
);
|
|
1995
1995
|
}),
|
|
1996
|
-
|
|
1996
|
+
N.length > 0 && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
1997
1997
|
Kt,
|
|
1998
1998
|
{
|
|
1999
1999
|
trigger: /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
|
|
2000
2000
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
2001
|
-
/* @__PURE__ */ e(
|
|
2001
|
+
/* @__PURE__ */ e(He, {})
|
|
2002
2002
|
] }),
|
|
2003
|
-
options:
|
|
2003
|
+
options: N.map((O) => ({
|
|
2004
2004
|
value: O.id,
|
|
2005
2005
|
label: O.label,
|
|
2006
2006
|
icon: O.icon,
|
|
2007
2007
|
disabled: O.disabled?.(v)
|
|
2008
2008
|
})),
|
|
2009
2009
|
onSelect: (O) => {
|
|
2010
|
-
const ie =
|
|
2010
|
+
const ie = N.find(
|
|
2011
2011
|
(ve) => ve.id === O
|
|
2012
2012
|
);
|
|
2013
|
-
ie && ie.onClick(v,
|
|
2013
|
+
ie && ie.onClick(v, V);
|
|
2014
2014
|
},
|
|
2015
2015
|
placement: "bottom-end"
|
|
2016
2016
|
}
|
|
@@ -2026,9 +2026,9 @@ const Kt = ({
|
|
|
2026
2026
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-4", children: [
|
|
2027
2027
|
/* @__PURE__ */ c("span", { className: "text-sm text-text-muted", children: [
|
|
2028
2028
|
"Showing ",
|
|
2029
|
-
|
|
2029
|
+
M,
|
|
2030
2030
|
" to ",
|
|
2031
|
-
|
|
2031
|
+
T,
|
|
2032
2032
|
" of ",
|
|
2033
2033
|
G,
|
|
2034
2034
|
" results"
|
|
@@ -2052,7 +2052,7 @@ const Kt = ({
|
|
|
2052
2052
|
{
|
|
2053
2053
|
size: "sm",
|
|
2054
2054
|
variant: "ghost",
|
|
2055
|
-
onClick: () =>
|
|
2055
|
+
onClick: () => w(0),
|
|
2056
2056
|
disabled: P.page === 0,
|
|
2057
2057
|
iconOnly: !0,
|
|
2058
2058
|
children: /* @__PURE__ */ e(Qt, {})
|
|
@@ -2063,7 +2063,7 @@ const Kt = ({
|
|
|
2063
2063
|
{
|
|
2064
2064
|
size: "sm",
|
|
2065
2065
|
variant: "ghost",
|
|
2066
|
-
onClick: () =>
|
|
2066
|
+
onClick: () => w(P.page - 1),
|
|
2067
2067
|
disabled: P.page === 0,
|
|
2068
2068
|
iconOnly: !0,
|
|
2069
2069
|
children: /* @__PURE__ */ e(Xt, {})
|
|
@@ -2080,7 +2080,7 @@ const Kt = ({
|
|
|
2080
2080
|
{
|
|
2081
2081
|
size: "sm",
|
|
2082
2082
|
variant: "ghost",
|
|
2083
|
-
onClick: () =>
|
|
2083
|
+
onClick: () => w(P.page + 1),
|
|
2084
2084
|
disabled: P.page >= j - 1,
|
|
2085
2085
|
iconOnly: !0,
|
|
2086
2086
|
children: /* @__PURE__ */ e(Zt, {})
|
|
@@ -2091,7 +2091,7 @@ const Kt = ({
|
|
|
2091
2091
|
{
|
|
2092
2092
|
size: "sm",
|
|
2093
2093
|
variant: "ghost",
|
|
2094
|
-
onClick: () =>
|
|
2094
|
+
onClick: () => w(j - 1),
|
|
2095
2095
|
disabled: P.page >= j - 1,
|
|
2096
2096
|
iconOnly: !0,
|
|
2097
2097
|
children: /* @__PURE__ */ e(er, {})
|
|
@@ -2100,13 +2100,13 @@ const Kt = ({
|
|
|
2100
2100
|
] })
|
|
2101
2101
|
] })
|
|
2102
2102
|
] });
|
|
2103
|
-
}, rr = ht(null),
|
|
2103
|
+
}, rr = ht(null), fn = ({
|
|
2104
2104
|
items: t,
|
|
2105
2105
|
activeTab: r,
|
|
2106
2106
|
onTabChange: n,
|
|
2107
2107
|
className: s
|
|
2108
2108
|
}) => {
|
|
2109
|
-
const [a, o] =
|
|
2109
|
+
const [a, o] = R(t[0]?.id || ""), l = r || a, u = (m) => {
|
|
2110
2110
|
n ? n(m) : o(m);
|
|
2111
2111
|
};
|
|
2112
2112
|
return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((m) => /* @__PURE__ */ e(
|
|
@@ -2141,14 +2141,14 @@ const Kt = ({
|
|
|
2141
2141
|
size: o = "md",
|
|
2142
2142
|
className: l
|
|
2143
2143
|
}) => {
|
|
2144
|
-
const [u, m] =
|
|
2144
|
+
const [u, m] = R(
|
|
2145
2145
|
r || n || t[0]?.id || ""
|
|
2146
|
-
),
|
|
2146
|
+
), N = n || u, f = (g) => {
|
|
2147
2147
|
s ? s(g) : m(g);
|
|
2148
|
-
},
|
|
2149
|
-
activeTab:
|
|
2150
|
-
setActiveTab:
|
|
2151
|
-
},
|
|
2148
|
+
}, h = {
|
|
2149
|
+
activeTab: N,
|
|
2150
|
+
setActiveTab: f
|
|
2151
|
+
}, b = t.find((g) => g.id === N), p = d(
|
|
2152
2152
|
"flex",
|
|
2153
2153
|
{
|
|
2154
2154
|
"border-b border-border px-2": a === "default" || a === "underline",
|
|
@@ -2157,42 +2157,42 @@ const Kt = ({
|
|
|
2157
2157
|
"space-x-8": a === "default" || a === "underline"
|
|
2158
2158
|
},
|
|
2159
2159
|
l
|
|
2160
|
-
),
|
|
2161
|
-
const
|
|
2160
|
+
), C = (g, x) => {
|
|
2161
|
+
const _ = "transition-colors duration-fast font-medium", E = {
|
|
2162
2162
|
"text-xs px-2 py-1": o === "sm",
|
|
2163
2163
|
"text-sm px-3 py-2": o === "md",
|
|
2164
2164
|
"text-base px-4 py-3": o === "lg"
|
|
2165
|
-
},
|
|
2165
|
+
}, W = {
|
|
2166
2166
|
// Default variant
|
|
2167
2167
|
"border-b-2 -mb-px": a === "default",
|
|
2168
2168
|
// Pills variant
|
|
2169
2169
|
"rounded-md": a === "pills",
|
|
2170
2170
|
// Underline variant
|
|
2171
2171
|
"border-b-2 pb-2": a === "underline"
|
|
2172
|
-
},
|
|
2172
|
+
}, D = {
|
|
2173
2173
|
"opacity-50 cursor-not-allowed": g.disabled,
|
|
2174
2174
|
"cursor-pointer": !g.disabled
|
|
2175
|
-
}, X =
|
|
2175
|
+
}, X = x ? {
|
|
2176
2176
|
"border-accent-border text-text": a === "default" || a === "underline",
|
|
2177
2177
|
"bg-surface text-text shadow-none": a === "pills"
|
|
2178
|
-
} : {}, U = !
|
|
2178
|
+
} : {}, U = !x && !g.disabled ? {
|
|
2179
2179
|
"border-transparent text-text-muted hover:text-text": a === "default",
|
|
2180
2180
|
"text-text-muted hover:text-text": a === "pills",
|
|
2181
2181
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2182
2182
|
} : {};
|
|
2183
|
-
return d(
|
|
2183
|
+
return d(_, E, W, D, X, U);
|
|
2184
2184
|
};
|
|
2185
|
-
return /* @__PURE__ */ e(rr.Provider, { value:
|
|
2185
|
+
return /* @__PURE__ */ e(rr.Provider, { value: h, children: /* @__PURE__ */ c("div", { children: [
|
|
2186
2186
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2187
2187
|
"button",
|
|
2188
2188
|
{
|
|
2189
2189
|
type: "button",
|
|
2190
2190
|
role: "tab",
|
|
2191
|
-
"aria-selected":
|
|
2191
|
+
"aria-selected": N === g.id,
|
|
2192
2192
|
"aria-controls": `tabpanel-${g.id}`,
|
|
2193
2193
|
disabled: g.disabled,
|
|
2194
|
-
onClick: () => !g.disabled &&
|
|
2195
|
-
className:
|
|
2194
|
+
onClick: () => !g.disabled && f(g.id),
|
|
2195
|
+
className: C(g, N === g.id),
|
|
2196
2196
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
|
|
2197
2197
|
g.label,
|
|
2198
2198
|
g.badge && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-surface-hover text-text-muted", children: g.badge })
|
|
@@ -2200,14 +2200,14 @@ const Kt = ({
|
|
|
2200
2200
|
},
|
|
2201
2201
|
g.id
|
|
2202
2202
|
)) }),
|
|
2203
|
-
|
|
2203
|
+
b?.content && /* @__PURE__ */ e(
|
|
2204
2204
|
"div",
|
|
2205
2205
|
{
|
|
2206
2206
|
role: "tabpanel",
|
|
2207
|
-
id: `tabpanel-${
|
|
2208
|
-
"aria-labelledby": `tab-${
|
|
2207
|
+
id: `tabpanel-${N}`,
|
|
2208
|
+
"aria-labelledby": `tab-${N}`,
|
|
2209
2209
|
className: "mt-4",
|
|
2210
|
-
children:
|
|
2210
|
+
children: b.content
|
|
2211
2211
|
}
|
|
2212
2212
|
)
|
|
2213
2213
|
] }) });
|
|
@@ -2218,7 +2218,7 @@ const Kt = ({
|
|
|
2218
2218
|
xl: "max-w-4xl",
|
|
2219
2219
|
full: "max-w-full mx-4"
|
|
2220
2220
|
};
|
|
2221
|
-
function
|
|
2221
|
+
function Ve({
|
|
2222
2222
|
open: t,
|
|
2223
2223
|
onClose: r,
|
|
2224
2224
|
title: n,
|
|
@@ -2228,21 +2228,21 @@ function He({
|
|
|
2228
2228
|
className: l,
|
|
2229
2229
|
backdropClassName: u,
|
|
2230
2230
|
children: m,
|
|
2231
|
-
footer:
|
|
2232
|
-
showCloseButton:
|
|
2231
|
+
footer: N,
|
|
2232
|
+
showCloseButton: f = !0
|
|
2233
2233
|
}) {
|
|
2234
|
-
const
|
|
2234
|
+
const h = se(null), b = se(null);
|
|
2235
2235
|
Q(() => {
|
|
2236
2236
|
if (!t || !o) return;
|
|
2237
|
-
const
|
|
2237
|
+
const C = (g) => {
|
|
2238
2238
|
g.key === "Escape" && r();
|
|
2239
2239
|
};
|
|
2240
|
-
return document.addEventListener("keydown",
|
|
2241
|
-
}, [t, o, r]), Q(() => (t ? (
|
|
2240
|
+
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
2241
|
+
}, [t, o, r]), Q(() => (t ? (b.current = document.activeElement, h.current && h.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
|
|
2242
2242
|
document.body.style.overflow = "";
|
|
2243
2243
|
}), [t]);
|
|
2244
|
-
const p = (
|
|
2245
|
-
a &&
|
|
2244
|
+
const p = (C) => {
|
|
2245
|
+
a && C.target === C.currentTarget && r();
|
|
2246
2246
|
};
|
|
2247
2247
|
return t ? /* @__PURE__ */ e(
|
|
2248
2248
|
"div",
|
|
@@ -2257,7 +2257,7 @@ function He({
|
|
|
2257
2257
|
children: /* @__PURE__ */ c(
|
|
2258
2258
|
"div",
|
|
2259
2259
|
{
|
|
2260
|
-
ref:
|
|
2260
|
+
ref: h,
|
|
2261
2261
|
className: d(
|
|
2262
2262
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2263
2263
|
// 'animate-scale-in',
|
|
@@ -2270,7 +2270,7 @@ function He({
|
|
|
2270
2270
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
2271
2271
|
tabIndex: -1,
|
|
2272
2272
|
children: [
|
|
2273
|
-
(n ||
|
|
2273
|
+
(n || f) && /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-6 pb-0", children: [
|
|
2274
2274
|
n && /* @__PURE__ */ e(
|
|
2275
2275
|
"span",
|
|
2276
2276
|
{
|
|
@@ -2279,7 +2279,7 @@ function He({
|
|
|
2279
2279
|
children: n
|
|
2280
2280
|
}
|
|
2281
2281
|
),
|
|
2282
|
-
|
|
2282
|
+
f && /* @__PURE__ */ e(
|
|
2283
2283
|
"button",
|
|
2284
2284
|
{
|
|
2285
2285
|
onClick: r,
|
|
@@ -2290,7 +2290,7 @@ function He({
|
|
|
2290
2290
|
)
|
|
2291
2291
|
] }),
|
|
2292
2292
|
/* @__PURE__ */ e("div", { className: "p-6", children: m }),
|
|
2293
|
-
|
|
2293
|
+
N && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: N })
|
|
2294
2294
|
]
|
|
2295
2295
|
}
|
|
2296
2296
|
)
|
|
@@ -2339,19 +2339,19 @@ const ar = {
|
|
|
2339
2339
|
italic: l = !1,
|
|
2340
2340
|
underline: u = !1,
|
|
2341
2341
|
lineHeight: m = "normal",
|
|
2342
|
-
as:
|
|
2343
|
-
className:
|
|
2344
|
-
children:
|
|
2345
|
-
...
|
|
2342
|
+
as: N,
|
|
2343
|
+
className: f,
|
|
2344
|
+
children: h,
|
|
2345
|
+
...b
|
|
2346
2346
|
}) => {
|
|
2347
|
-
const p =
|
|
2347
|
+
const p = N || dr(t), C = t === "caption", g = t === "label", x = t === "code", _ = d(
|
|
2348
2348
|
"font-sans",
|
|
2349
2349
|
// Variant — caption and label pin their own size/weight
|
|
2350
|
-
|
|
2350
|
+
C && "text-xs text-text-subtle",
|
|
2351
2351
|
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2352
|
-
|
|
2352
|
+
x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2353
2353
|
// Size — only where the variant does not pin it
|
|
2354
|
-
!
|
|
2354
|
+
!C && !g && !x && ar[r],
|
|
2355
2355
|
// Weight — label owns its weight
|
|
2356
2356
|
!g && lr[n],
|
|
2357
2357
|
or[s],
|
|
@@ -2361,9 +2361,9 @@ const ar = {
|
|
|
2361
2361
|
l && "italic",
|
|
2362
2362
|
u && "underline",
|
|
2363
2363
|
o && "truncate",
|
|
2364
|
-
|
|
2364
|
+
f
|
|
2365
2365
|
);
|
|
2366
|
-
return /* @__PURE__ */ e(p, { className:
|
|
2366
|
+
return /* @__PURE__ */ e(p, { className: _, ...b, children: h });
|
|
2367
2367
|
};
|
|
2368
2368
|
function dr(t) {
|
|
2369
2369
|
return {
|
|
@@ -2383,46 +2383,46 @@ const ur = ({
|
|
|
2383
2383
|
accept: l,
|
|
2384
2384
|
onListFiles: u,
|
|
2385
2385
|
onListMounts: m,
|
|
2386
|
-
onUploadFile:
|
|
2387
|
-
onDownloadFile:
|
|
2388
|
-
onRegisterFile:
|
|
2386
|
+
onUploadFile: N,
|
|
2387
|
+
onDownloadFile: f,
|
|
2388
|
+
onRegisterFile: h
|
|
2389
2389
|
}) => {
|
|
2390
|
-
const [
|
|
2390
|
+
const [b, p] = R(!1), [C, g] = R([]), [x, _] = R(null), [E, W] = R("/"), [D, X] = R([]), [U, I] = R(!1), [q, K] = R(""), [re, P] = R(
|
|
2391
2391
|
typeof t == "object" ? t : null
|
|
2392
|
-
), [ce,
|
|
2392
|
+
), [ce, k] = R(!1), [i, S] = R(""), y = se(null);
|
|
2393
2393
|
Q(() => {
|
|
2394
|
-
|
|
2395
|
-
}, [
|
|
2396
|
-
|
|
2397
|
-
}, [
|
|
2398
|
-
const
|
|
2394
|
+
b && A();
|
|
2395
|
+
}, [b]), Q(() => {
|
|
2396
|
+
b && x && w();
|
|
2397
|
+
}, [b, x, E, q]);
|
|
2398
|
+
const A = async () => {
|
|
2399
2399
|
I(!0);
|
|
2400
2400
|
try {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
} catch (
|
|
2404
|
-
console.error("Failed to load mounts",
|
|
2401
|
+
const $ = await m?.();
|
|
2402
|
+
$?.data && g($.data);
|
|
2403
|
+
} catch ($) {
|
|
2404
|
+
console.error("Failed to load mounts", $);
|
|
2405
2405
|
} finally {
|
|
2406
2406
|
I(!1);
|
|
2407
2407
|
}
|
|
2408
|
-
},
|
|
2409
|
-
if (
|
|
2408
|
+
}, w = async () => {
|
|
2409
|
+
if (x) {
|
|
2410
2410
|
I(!0);
|
|
2411
2411
|
try {
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2414
|
-
} catch (
|
|
2415
|
-
console.error("Failed to load files",
|
|
2412
|
+
const $ = await u?.({ mountId: x.id, name: q, path: E });
|
|
2413
|
+
$?.data && X($.data);
|
|
2414
|
+
} catch ($) {
|
|
2415
|
+
console.error("Failed to load files", $);
|
|
2416
2416
|
} finally {
|
|
2417
2417
|
I(!1);
|
|
2418
2418
|
}
|
|
2419
2419
|
}
|
|
2420
|
-
}, ee = async (
|
|
2421
|
-
const L =
|
|
2420
|
+
}, ee = async ($) => {
|
|
2421
|
+
const L = $.target.files?.[0];
|
|
2422
2422
|
if (L) {
|
|
2423
2423
|
I(!0);
|
|
2424
2424
|
try {
|
|
2425
|
-
const te = await L.arrayBuffer(), v = new Uint8Array(te),
|
|
2425
|
+
const te = await L.arrayBuffer(), v = new Uint8Array(te), V = {
|
|
2426
2426
|
id: `local-${Date.now()}`,
|
|
2427
2427
|
name: L.name,
|
|
2428
2428
|
type: "file",
|
|
@@ -2433,28 +2433,28 @@ const ur = ({
|
|
|
2433
2433
|
providerKey: L.name,
|
|
2434
2434
|
ownerId: "me"
|
|
2435
2435
|
};
|
|
2436
|
-
P(
|
|
2436
|
+
P(V), r(V, v), p(!1);
|
|
2437
2437
|
} catch (te) {
|
|
2438
2438
|
console.error("Local file selection failed", te);
|
|
2439
2439
|
} finally {
|
|
2440
2440
|
I(!1);
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
|
-
}, ae = async (
|
|
2444
|
-
const L =
|
|
2445
|
-
if (!(!L || !
|
|
2443
|
+
}, ae = async ($) => {
|
|
2444
|
+
const L = $.target.files?.[0];
|
|
2445
|
+
if (!(!L || !x)) {
|
|
2446
2446
|
I(!0);
|
|
2447
2447
|
try {
|
|
2448
|
-
const te = await L.arrayBuffer(), v = await
|
|
2448
|
+
const te = await L.arrayBuffer(), v = await N?.({
|
|
2449
2449
|
file: new Uint8Array(te),
|
|
2450
2450
|
filename: L.name,
|
|
2451
2451
|
mimeType: L.type || "application/octet-stream",
|
|
2452
|
-
mountId:
|
|
2453
|
-
path:
|
|
2452
|
+
mountId: x.id,
|
|
2453
|
+
path: E
|
|
2454
2454
|
});
|
|
2455
2455
|
if (v?.data) {
|
|
2456
|
-
const
|
|
2457
|
-
P(
|
|
2456
|
+
const V = v.data;
|
|
2457
|
+
P(V), r(V, new Uint8Array(te)), p(!1);
|
|
2458
2458
|
}
|
|
2459
2459
|
} catch (te) {
|
|
2460
2460
|
console.error("Upload failed", te);
|
|
@@ -2463,74 +2463,74 @@ const ur = ({
|
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
}, le = async () => {
|
|
2466
|
-
if (!(!i || !
|
|
2466
|
+
if (!(!i || !x)) {
|
|
2467
2467
|
I(!0);
|
|
2468
2468
|
try {
|
|
2469
|
-
const
|
|
2470
|
-
|
|
2469
|
+
const $ = `${E}${i}/`;
|
|
2470
|
+
h && (await h({
|
|
2471
2471
|
name: i,
|
|
2472
2472
|
type: "folder",
|
|
2473
|
-
path:
|
|
2473
|
+
path: E,
|
|
2474
2474
|
mimeType: "application/x-directory",
|
|
2475
2475
|
size: 0,
|
|
2476
|
-
mountId:
|
|
2477
|
-
providerKey:
|
|
2476
|
+
mountId: x.id,
|
|
2477
|
+
providerKey: $,
|
|
2478
2478
|
ownerId: "me"
|
|
2479
|
-
}), await
|
|
2480
|
-
} catch (
|
|
2481
|
-
console.error("Failed to create folder",
|
|
2479
|
+
}), await w()), k(!1), S("");
|
|
2480
|
+
} catch ($) {
|
|
2481
|
+
console.error("Failed to create folder", $);
|
|
2482
2482
|
} finally {
|
|
2483
2483
|
I(!1);
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
|
-
}, G = async (
|
|
2486
|
+
}, G = async ($) => {
|
|
2487
2487
|
I(!0);
|
|
2488
2488
|
try {
|
|
2489
|
-
const L = await
|
|
2490
|
-
P(
|
|
2489
|
+
const L = await f?.($.id);
|
|
2490
|
+
P($), r($, L), p(!1);
|
|
2491
2491
|
} catch (L) {
|
|
2492
2492
|
console.error("Failed to download file", L);
|
|
2493
2493
|
} finally {
|
|
2494
2494
|
I(!1);
|
|
2495
2495
|
}
|
|
2496
|
-
}, j = (
|
|
2497
|
-
|
|
2498
|
-
},
|
|
2499
|
-
const
|
|
2500
|
-
return
|
|
2496
|
+
}, j = ($) => {
|
|
2497
|
+
$.stopPropagation(), P(null), r(null);
|
|
2498
|
+
}, M = he(() => {
|
|
2499
|
+
const $ = /* @__PURE__ */ new Set(), L = [];
|
|
2500
|
+
return D.forEach((te) => {
|
|
2501
2501
|
if (te.type === "folder") {
|
|
2502
|
-
te.path ===
|
|
2502
|
+
te.path === E && $.add(te.name);
|
|
2503
2503
|
return;
|
|
2504
2504
|
}
|
|
2505
|
-
const v = te.providerKey || te.name, Z = (
|
|
2506
|
-
Z.length > 1 ?
|
|
2505
|
+
const v = te.providerKey || te.name, Z = (E ? v.substring(E.length) : v).split("/").filter((J) => J !== "");
|
|
2506
|
+
Z.length > 1 ? $.add(Z[0]) : Z.length === 1 && L.push(te);
|
|
2507
2507
|
}), {
|
|
2508
|
-
folders: Array.from(
|
|
2508
|
+
folders: Array.from($).sort(),
|
|
2509
2509
|
files: L.sort((te, v) => te.name.localeCompare(v.name))
|
|
2510
2510
|
};
|
|
2511
|
-
}, [
|
|
2512
|
-
|
|
2511
|
+
}, [D, E]), T = ($) => {
|
|
2512
|
+
W((L) => `${L}${$}/`);
|
|
2513
2513
|
}, z = () => {
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2516
|
-
},
|
|
2517
|
-
const
|
|
2514
|
+
const $ = E.split("/").filter((L) => L !== "");
|
|
2515
|
+
$.pop(), $.length === 0 ? W("/") : W(`${$.join("/")}/`);
|
|
2516
|
+
}, B = he(() => {
|
|
2517
|
+
const $ = M.folders.map((L) => ({
|
|
2518
2518
|
id: `folder-${L}`,
|
|
2519
2519
|
name: L,
|
|
2520
2520
|
type: "folder"
|
|
2521
2521
|
}));
|
|
2522
|
-
return
|
|
2523
|
-
|
|
2522
|
+
return M.files.forEach((L) => {
|
|
2523
|
+
$.push({
|
|
2524
2524
|
...L,
|
|
2525
2525
|
type: "file"
|
|
2526
2526
|
});
|
|
2527
|
-
}),
|
|
2528
|
-
}, [
|
|
2527
|
+
}), $;
|
|
2528
|
+
}, [M]), F = [
|
|
2529
2529
|
{
|
|
2530
2530
|
id: "name",
|
|
2531
2531
|
header: "Name",
|
|
2532
2532
|
accessor: "name",
|
|
2533
|
-
cell: (
|
|
2533
|
+
cell: ($, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
2534
2534
|
/* @__PURE__ */ e(
|
|
2535
2535
|
Y,
|
|
2536
2536
|
{
|
|
@@ -2539,45 +2539,45 @@ const ur = ({
|
|
|
2539
2539
|
color: L.type === "folder" ? "warning" : "secondary"
|
|
2540
2540
|
}
|
|
2541
2541
|
),
|
|
2542
|
-
/* @__PURE__ */ e("span", { className: d(L.type === "folder" && "font-medium"), children:
|
|
2542
|
+
/* @__PURE__ */ e("span", { className: d(L.type === "folder" && "font-medium"), children: $ })
|
|
2543
2543
|
] })
|
|
2544
2544
|
},
|
|
2545
2545
|
{
|
|
2546
2546
|
id: "type",
|
|
2547
2547
|
header: "Type",
|
|
2548
|
-
accessor: (
|
|
2548
|
+
accessor: ($) => $.type === "folder" ? "Folder" : $.mimeType
|
|
2549
2549
|
},
|
|
2550
2550
|
{
|
|
2551
2551
|
id: "size",
|
|
2552
2552
|
header: "Size",
|
|
2553
|
-
accessor: (
|
|
2553
|
+
accessor: ($) => $.type === "file" ? `${($.size / 1024).toFixed(1)} KB` : "-"
|
|
2554
2554
|
},
|
|
2555
2555
|
{
|
|
2556
2556
|
id: "actions",
|
|
2557
2557
|
header: "",
|
|
2558
2558
|
accessor: "id",
|
|
2559
2559
|
align: "right",
|
|
2560
|
-
cell: (
|
|
2560
|
+
cell: ($, L) => /* @__PURE__ */ e(
|
|
2561
2561
|
ne,
|
|
2562
2562
|
{
|
|
2563
2563
|
size: "sm",
|
|
2564
2564
|
variant: "outline",
|
|
2565
2565
|
onClick: (te) => {
|
|
2566
|
-
te.stopPropagation(), L.type === "folder" ?
|
|
2566
|
+
te.stopPropagation(), L.type === "folder" ? T(L.name) : G(L);
|
|
2567
2567
|
},
|
|
2568
2568
|
loading: U && L.type === "file" && re?.id === L.id,
|
|
2569
2569
|
children: L.type === "folder" ? "Open" : "Select"
|
|
2570
2570
|
}
|
|
2571
2571
|
)
|
|
2572
2572
|
}
|
|
2573
|
-
],
|
|
2573
|
+
], H = [
|
|
2574
2574
|
{
|
|
2575
2575
|
id: "name",
|
|
2576
2576
|
header: "Mount Name",
|
|
2577
2577
|
accessor: "name",
|
|
2578
|
-
cell: (
|
|
2578
|
+
cell: ($) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
2579
2579
|
/* @__PURE__ */ e(Y, { icon: _e, size: "sm", color: "primary" }),
|
|
2580
|
-
/* @__PURE__ */ e("span", { children:
|
|
2580
|
+
/* @__PURE__ */ e("span", { children: $ })
|
|
2581
2581
|
] })
|
|
2582
2582
|
},
|
|
2583
2583
|
{
|
|
@@ -2585,7 +2585,7 @@ const ur = ({
|
|
|
2585
2585
|
header: "",
|
|
2586
2586
|
accessor: "id",
|
|
2587
2587
|
align: "right",
|
|
2588
|
-
cell: (
|
|
2588
|
+
cell: ($, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () => _(L), children: "Open" })
|
|
2589
2589
|
}
|
|
2590
2590
|
];
|
|
2591
2591
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2616,13 +2616,13 @@ const ur = ({
|
|
|
2616
2616
|
),
|
|
2617
2617
|
a && /* @__PURE__ */ e(de, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2618
2618
|
/* @__PURE__ */ e(
|
|
2619
|
-
|
|
2619
|
+
Ve,
|
|
2620
2620
|
{
|
|
2621
|
-
open:
|
|
2621
|
+
open: b,
|
|
2622
2622
|
onClose: () => {
|
|
2623
|
-
p(!1),
|
|
2623
|
+
p(!1), _(null), W("/"), k(!1);
|
|
2624
2624
|
},
|
|
2625
|
-
title:
|
|
2625
|
+
title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
|
|
2626
2626
|
size: "lg",
|
|
2627
2627
|
children: /* @__PURE__ */ e(
|
|
2628
2628
|
nr,
|
|
@@ -2632,7 +2632,7 @@ const ur = ({
|
|
|
2632
2632
|
{
|
|
2633
2633
|
id: "remote",
|
|
2634
2634
|
label: "Platform Storage",
|
|
2635
|
-
content: /* @__PURE__ */ e("div", { className: "space-y-4", children:
|
|
2635
|
+
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: x ? /* @__PURE__ */ c(xe, { children: [
|
|
2636
2636
|
/* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2637
2637
|
/* @__PURE__ */ e(
|
|
2638
2638
|
ne,
|
|
@@ -2640,19 +2640,19 @@ const ur = ({
|
|
|
2640
2640
|
variant: "ghost",
|
|
2641
2641
|
size: "sm",
|
|
2642
2642
|
onClick: () => {
|
|
2643
|
-
|
|
2643
|
+
E && E !== "/" ? z() : _(null);
|
|
2644
2644
|
},
|
|
2645
2645
|
leftIcon: /* @__PURE__ */ e(Y, { icon: st, size: "xs" }),
|
|
2646
|
-
children:
|
|
2646
|
+
children: E ? "Back" : "Back to Mounts"
|
|
2647
2647
|
}
|
|
2648
2648
|
),
|
|
2649
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children:
|
|
2649
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children: E }) }),
|
|
2650
2650
|
/* @__PURE__ */ e("div", { className: "flex-grow min-w-40", children: /* @__PURE__ */ e(
|
|
2651
2651
|
be,
|
|
2652
2652
|
{
|
|
2653
2653
|
placeholder: "Search...",
|
|
2654
2654
|
value: q,
|
|
2655
|
-
onChange: (
|
|
2655
|
+
onChange: ($) => K($.target.value),
|
|
2656
2656
|
startIcon: /* @__PURE__ */ e(Se, { size: 14 }),
|
|
2657
2657
|
fullWidth: !0,
|
|
2658
2658
|
size: "sm"
|
|
@@ -2664,7 +2664,7 @@ const ur = ({
|
|
|
2664
2664
|
{
|
|
2665
2665
|
variant: "outline",
|
|
2666
2666
|
size: "sm",
|
|
2667
|
-
onClick: () =>
|
|
2667
|
+
onClick: () => k(!0),
|
|
2668
2668
|
leftIcon: /* @__PURE__ */ e(Y, { icon: at, size: "xs" }),
|
|
2669
2669
|
children: "New Folder"
|
|
2670
2670
|
}
|
|
@@ -2674,7 +2674,7 @@ const ur = ({
|
|
|
2674
2674
|
{
|
|
2675
2675
|
variant: "primary",
|
|
2676
2676
|
size: "sm",
|
|
2677
|
-
onClick: () =>
|
|
2677
|
+
onClick: () => y.current?.click(),
|
|
2678
2678
|
leftIcon: /* @__PURE__ */ e(Y, { icon: lt, size: "xs" }),
|
|
2679
2679
|
loading: U,
|
|
2680
2680
|
children: "Upload"
|
|
@@ -2685,7 +2685,7 @@ const ur = ({
|
|
|
2685
2685
|
{
|
|
2686
2686
|
type: "file",
|
|
2687
2687
|
className: "hidden",
|
|
2688
|
-
ref:
|
|
2688
|
+
ref: y,
|
|
2689
2689
|
onChange: ae,
|
|
2690
2690
|
accept: l
|
|
2691
2691
|
}
|
|
@@ -2700,31 +2700,31 @@ const ur = ({
|
|
|
2700
2700
|
size: "sm",
|
|
2701
2701
|
placeholder: "Folder name",
|
|
2702
2702
|
value: i,
|
|
2703
|
-
onChange: (
|
|
2703
|
+
onChange: ($) => S($.target.value),
|
|
2704
2704
|
autoFocus: !0
|
|
2705
2705
|
}
|
|
2706
2706
|
),
|
|
2707
2707
|
/* @__PURE__ */ e(ne, { size: "sm", onClick: le, loading: U, children: "Create" }),
|
|
2708
|
-
/* @__PURE__ */ e(ne, { size: "sm", variant: "ghost", onClick: () =>
|
|
2708
|
+
/* @__PURE__ */ e(ne, { size: "sm", variant: "ghost", onClick: () => k(!1), children: "Cancel" })
|
|
2709
2709
|
] }),
|
|
2710
2710
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2711
2711
|
je,
|
|
2712
2712
|
{
|
|
2713
|
-
data:
|
|
2714
|
-
columns:
|
|
2713
|
+
data: B,
|
|
2714
|
+
columns: F,
|
|
2715
2715
|
loading: U,
|
|
2716
2716
|
emptyContent: "This folder is empty",
|
|
2717
|
-
onRowClick: (
|
|
2717
|
+
onRowClick: ($) => $.type === "folder" ? T($.name) : G($)
|
|
2718
2718
|
}
|
|
2719
2719
|
) })
|
|
2720
2720
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2721
2721
|
je,
|
|
2722
2722
|
{
|
|
2723
|
-
data:
|
|
2724
|
-
columns:
|
|
2723
|
+
data: C,
|
|
2724
|
+
columns: H,
|
|
2725
2725
|
loading: U,
|
|
2726
2726
|
emptyContent: "No storage mounts configured",
|
|
2727
|
-
onRowClick: (
|
|
2727
|
+
onRowClick: ($) => _($)
|
|
2728
2728
|
}
|
|
2729
2729
|
) }) })
|
|
2730
2730
|
},
|
|
@@ -2776,18 +2776,18 @@ const ur = ({
|
|
|
2776
2776
|
containerClassName: l,
|
|
2777
2777
|
labelClassName: u,
|
|
2778
2778
|
className: m,
|
|
2779
|
-
id:
|
|
2780
|
-
rows:
|
|
2781
|
-
...
|
|
2782
|
-
},
|
|
2783
|
-
const p = oe.useId(),
|
|
2779
|
+
id: N,
|
|
2780
|
+
rows: f = 4,
|
|
2781
|
+
...h
|
|
2782
|
+
}, b) => {
|
|
2783
|
+
const p = oe.useId(), C = N || `textarea-${p}`, g = !!n, x = n || r ? `${C}-description` : void 0;
|
|
2784
2784
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", l), children: [
|
|
2785
2785
|
t && /* @__PURE__ */ e(
|
|
2786
2786
|
"label",
|
|
2787
2787
|
{
|
|
2788
|
-
htmlFor:
|
|
2788
|
+
htmlFor: C,
|
|
2789
2789
|
className: d(
|
|
2790
|
-
|
|
2790
|
+
Be,
|
|
2791
2791
|
g ? "text-danger-fg" : "text-text-subtle",
|
|
2792
2792
|
u
|
|
2793
2793
|
),
|
|
@@ -2798,11 +2798,11 @@ const ur = ({
|
|
|
2798
2798
|
/* @__PURE__ */ e(
|
|
2799
2799
|
"textarea",
|
|
2800
2800
|
{
|
|
2801
|
-
ref:
|
|
2802
|
-
id:
|
|
2803
|
-
rows:
|
|
2801
|
+
ref: b,
|
|
2802
|
+
id: C,
|
|
2803
|
+
rows: f,
|
|
2804
2804
|
"aria-invalid": g || void 0,
|
|
2805
|
-
"aria-describedby":
|
|
2805
|
+
"aria-describedby": x,
|
|
2806
2806
|
className: d(
|
|
2807
2807
|
"block w-full resize-y rounded-md border bg-surface-input text-text",
|
|
2808
2808
|
"transition-colors duration-fast ease-out",
|
|
@@ -2813,7 +2813,7 @@ const ur = ({
|
|
|
2813
2813
|
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2814
2814
|
m
|
|
2815
2815
|
),
|
|
2816
|
-
...
|
|
2816
|
+
...h
|
|
2817
2817
|
}
|
|
2818
2818
|
),
|
|
2819
2819
|
o && /* @__PURE__ */ e(
|
|
@@ -2827,7 +2827,7 @@ const ur = ({
|
|
|
2827
2827
|
(n || r) && /* @__PURE__ */ e(
|
|
2828
2828
|
"p",
|
|
2829
2829
|
{
|
|
2830
|
-
id:
|
|
2830
|
+
id: x,
|
|
2831
2831
|
className: d("mt-1 text-xs", g ? "text-danger-fg" : "text-text-subtle"),
|
|
2832
2832
|
children: n || r
|
|
2833
2833
|
}
|
|
@@ -2861,7 +2861,7 @@ function hr(t, r) {
|
|
|
2861
2861
|
}
|
|
2862
2862
|
return delete a[n[n.length - 1]], s;
|
|
2863
2863
|
}
|
|
2864
|
-
const
|
|
2864
|
+
const hn = ({
|
|
2865
2865
|
groups: t,
|
|
2866
2866
|
data: r,
|
|
2867
2867
|
onSubmit: n,
|
|
@@ -2871,100 +2871,100 @@ const mn = ({
|
|
|
2871
2871
|
validate: l,
|
|
2872
2872
|
submitButton: u = { label: "Submit", variant: "primary" },
|
|
2873
2873
|
cancelButton: m = { label: "Cancel", variant: "outline" },
|
|
2874
|
-
showButtons:
|
|
2875
|
-
layout:
|
|
2876
|
-
size:
|
|
2877
|
-
loading:
|
|
2874
|
+
showButtons: N = !0,
|
|
2875
|
+
layout: f = "vertical",
|
|
2876
|
+
size: h = "md",
|
|
2877
|
+
loading: b = !1,
|
|
2878
2878
|
className: p,
|
|
2879
|
-
ref:
|
|
2879
|
+
ref: C,
|
|
2880
2880
|
sdk: g
|
|
2881
2881
|
}) => {
|
|
2882
|
-
const [
|
|
2882
|
+
const [x, _] = R(r || {}), [E, W] = R({}), [D, X] = R({});
|
|
2883
2883
|
Q(() => {
|
|
2884
|
-
r &&
|
|
2884
|
+
r && _({ ...r });
|
|
2885
2885
|
}, [r]);
|
|
2886
2886
|
const U = ue(
|
|
2887
|
-
(
|
|
2888
|
-
const
|
|
2889
|
-
if (!
|
|
2890
|
-
if (
|
|
2891
|
-
return `${
|
|
2892
|
-
if (
|
|
2893
|
-
if (
|
|
2894
|
-
return `${
|
|
2887
|
+
(k, i, S) => {
|
|
2888
|
+
const y = t.flatMap((A) => A.items).find((A) => A.name === k);
|
|
2889
|
+
if (!y) return null;
|
|
2890
|
+
if (y.required && (i == null || i === ""))
|
|
2891
|
+
return `${y.label} is required`;
|
|
2892
|
+
if (y.type === "array") {
|
|
2893
|
+
if (y.required && (!i || i.length === 0))
|
|
2894
|
+
return `${y.label} cannot be empty.`;
|
|
2895
2895
|
if (i && !Array.isArray(i))
|
|
2896
|
-
return `${
|
|
2897
|
-
if (Array.isArray(i) &&
|
|
2898
|
-
const
|
|
2899
|
-
let
|
|
2896
|
+
return `${y.label} must be an array.`;
|
|
2897
|
+
if (Array.isArray(i) && y.arrayFields) {
|
|
2898
|
+
const A = [];
|
|
2899
|
+
let w = !1;
|
|
2900
2900
|
if (i.forEach((ee, ae) => {
|
|
2901
2901
|
const le = {};
|
|
2902
|
-
for (const G of
|
|
2902
|
+
for (const G of y.arrayFields) {
|
|
2903
2903
|
const j = ee?.[G.name];
|
|
2904
2904
|
if (G.required && (j == null || j === ""))
|
|
2905
|
-
le[G.name] = `${G.label} is required`,
|
|
2905
|
+
le[G.name] = `${G.label} is required`, w = !0;
|
|
2906
2906
|
else if (G.validator) {
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2907
|
+
const M = G.validator(j, ee);
|
|
2908
|
+
M && (le[G.name] = M, w = !0);
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
|
-
|
|
2912
|
-
}),
|
|
2913
|
-
return JSON.stringify(
|
|
2911
|
+
A[ae] = le;
|
|
2912
|
+
}), w)
|
|
2913
|
+
return JSON.stringify(A);
|
|
2914
2914
|
}
|
|
2915
2915
|
}
|
|
2916
|
-
return
|
|
2916
|
+
return y.validator ? y.validator(i, S) : null;
|
|
2917
2917
|
},
|
|
2918
2918
|
[t]
|
|
2919
2919
|
), I = ue(
|
|
2920
|
-
(
|
|
2920
|
+
(k, i) => {
|
|
2921
2921
|
let S = fr(
|
|
2922
|
-
|
|
2923
|
-
|
|
2922
|
+
x,
|
|
2923
|
+
k,
|
|
2924
2924
|
i
|
|
2925
2925
|
);
|
|
2926
|
-
t.flatMap((
|
|
2927
|
-
const
|
|
2928
|
-
|
|
2929
|
-
...
|
|
2930
|
-
[
|
|
2931
|
-
})), a?.(S,
|
|
2926
|
+
t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (i == null || i === "") && (S = hr(S, k)), _(S), X((w) => ({ ...w, [k]: !0 }));
|
|
2927
|
+
const A = U(k, i, S);
|
|
2928
|
+
W((w) => ({
|
|
2929
|
+
...w,
|
|
2930
|
+
[k]: A || ""
|
|
2931
|
+
})), a?.(S, k);
|
|
2932
2932
|
},
|
|
2933
|
-
[
|
|
2933
|
+
[x, t, U, a]
|
|
2934
2934
|
), q = ue(
|
|
2935
|
-
async (
|
|
2936
|
-
if (
|
|
2937
|
-
const i = {}, S = t.flatMap((
|
|
2938
|
-
for (const
|
|
2939
|
-
if (
|
|
2935
|
+
async (k) => {
|
|
2936
|
+
if (k.preventDefault(), b) return;
|
|
2937
|
+
const i = {}, S = t.flatMap((A) => A.items);
|
|
2938
|
+
for (const A of S) {
|
|
2939
|
+
if (A.hidden || A.conditional && !A.conditional(x))
|
|
2940
2940
|
continue;
|
|
2941
|
-
const
|
|
2942
|
-
|
|
2943
|
-
Pe(
|
|
2944
|
-
|
|
2941
|
+
const w = U(
|
|
2942
|
+
A.name,
|
|
2943
|
+
Pe(x, A.name),
|
|
2944
|
+
x
|
|
2945
2945
|
);
|
|
2946
|
-
|
|
2946
|
+
w && (i[A.name] = w);
|
|
2947
2947
|
}
|
|
2948
2948
|
if (l) {
|
|
2949
|
-
const
|
|
2950
|
-
|
|
2949
|
+
const A = l(x);
|
|
2950
|
+
A && Object.assign(i, A);
|
|
2951
2951
|
}
|
|
2952
|
-
if (
|
|
2952
|
+
if (W(i), Object.keys(i).some((A) => i[A]))
|
|
2953
2953
|
return;
|
|
2954
|
-
const
|
|
2955
|
-
await n?.(
|
|
2954
|
+
const y = o ? o(x) : x;
|
|
2955
|
+
await n?.(x, y);
|
|
2956
2956
|
},
|
|
2957
|
-
[
|
|
2958
|
-
),
|
|
2959
|
-
(
|
|
2960
|
-
const i = Pe(
|
|
2957
|
+
[x, t, U, l, o, n, b]
|
|
2958
|
+
), K = ue(
|
|
2959
|
+
(k) => {
|
|
2960
|
+
const i = Pe(x, k.name), S = D[k.name] ? E[k.name] : void 0, y = k.disabled || b, A = {
|
|
2961
2961
|
value: i || "",
|
|
2962
|
-
disabled:
|
|
2963
|
-
required:
|
|
2964
|
-
placeholder:
|
|
2965
|
-
...
|
|
2962
|
+
disabled: y,
|
|
2963
|
+
required: k.required,
|
|
2964
|
+
placeholder: k.placeholder,
|
|
2965
|
+
...k.fieldProps
|
|
2966
2966
|
};
|
|
2967
|
-
switch (
|
|
2967
|
+
switch (k.type) {
|
|
2968
2968
|
case "text":
|
|
2969
2969
|
case "email":
|
|
2970
2970
|
case "password":
|
|
@@ -2974,55 +2974,55 @@ const mn = ({
|
|
|
2974
2974
|
return /* @__PURE__ */ e(
|
|
2975
2975
|
be,
|
|
2976
2976
|
{
|
|
2977
|
-
...
|
|
2978
|
-
onChange: (
|
|
2979
|
-
type:
|
|
2980
|
-
autoComplete:
|
|
2977
|
+
...A,
|
|
2978
|
+
onChange: (w) => I(k.name, w.target.value),
|
|
2979
|
+
type: k.textType || k.type,
|
|
2980
|
+
autoComplete: k.autocomplete,
|
|
2981
2981
|
error: S,
|
|
2982
|
-
size:
|
|
2982
|
+
size: h
|
|
2983
2983
|
}
|
|
2984
2984
|
);
|
|
2985
2985
|
case "textarea":
|
|
2986
2986
|
return /* @__PURE__ */ e(
|
|
2987
2987
|
De,
|
|
2988
2988
|
{
|
|
2989
|
-
...
|
|
2990
|
-
onChange: (
|
|
2989
|
+
...A,
|
|
2990
|
+
onChange: (w) => I(k.name, w.target.value),
|
|
2991
2991
|
rows: 4,
|
|
2992
2992
|
error: S,
|
|
2993
|
-
size:
|
|
2993
|
+
size: h
|
|
2994
2994
|
}
|
|
2995
2995
|
);
|
|
2996
2996
|
case "select":
|
|
2997
2997
|
return /* @__PURE__ */ e(
|
|
2998
2998
|
Ne,
|
|
2999
2999
|
{
|
|
3000
|
-
...
|
|
3001
|
-
onChange: (
|
|
3002
|
-
options: (
|
|
3003
|
-
...
|
|
3004
|
-
value: String(
|
|
3000
|
+
...A,
|
|
3001
|
+
onChange: (w) => I(k.name, w),
|
|
3002
|
+
options: (k.options || []).map((w) => ({
|
|
3003
|
+
...w,
|
|
3004
|
+
value: String(w.value)
|
|
3005
3005
|
})),
|
|
3006
|
-
searchable:
|
|
3007
|
-
multiple:
|
|
3008
|
-
allowCreate:
|
|
3006
|
+
searchable: k.searchable,
|
|
3007
|
+
multiple: k.multiple,
|
|
3008
|
+
allowCreate: k.allowCreate,
|
|
3009
3009
|
error: S,
|
|
3010
|
-
size:
|
|
3010
|
+
size: h
|
|
3011
3011
|
}
|
|
3012
3012
|
);
|
|
3013
3013
|
case "checkbox":
|
|
3014
3014
|
return /* @__PURE__ */ e(
|
|
3015
3015
|
pe,
|
|
3016
3016
|
{
|
|
3017
|
-
...
|
|
3018
|
-
label:
|
|
3017
|
+
...A,
|
|
3018
|
+
label: k.label,
|
|
3019
3019
|
checked: !!i,
|
|
3020
|
-
onChange: (
|
|
3021
|
-
size:
|
|
3020
|
+
onChange: (w) => I(k.name, w.target.checked),
|
|
3021
|
+
size: h
|
|
3022
3022
|
}
|
|
3023
3023
|
);
|
|
3024
3024
|
case "radio":
|
|
3025
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3025
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: k.options?.map((w) => /* @__PURE__ */ c(
|
|
3026
3026
|
"label",
|
|
3027
3027
|
{
|
|
3028
3028
|
className: "flex cursor-pointer items-center gap-3 text-base text-text",
|
|
@@ -3031,86 +3031,86 @@ const mn = ({
|
|
|
3031
3031
|
"input",
|
|
3032
3032
|
{
|
|
3033
3033
|
type: "radio",
|
|
3034
|
-
name:
|
|
3035
|
-
value:
|
|
3036
|
-
checked: i ===
|
|
3037
|
-
onChange: () => I(
|
|
3038
|
-
disabled:
|
|
3034
|
+
name: k.name,
|
|
3035
|
+
value: w.value,
|
|
3036
|
+
checked: i === w.value,
|
|
3037
|
+
onChange: () => I(k.name, w.value),
|
|
3038
|
+
disabled: y || w.disabled,
|
|
3039
3039
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3040
3040
|
}
|
|
3041
3041
|
),
|
|
3042
|
-
|
|
3042
|
+
w.label
|
|
3043
3043
|
]
|
|
3044
3044
|
},
|
|
3045
|
-
|
|
3045
|
+
w.value
|
|
3046
3046
|
)) });
|
|
3047
3047
|
case "date":
|
|
3048
3048
|
return /* @__PURE__ */ e(
|
|
3049
3049
|
$e,
|
|
3050
3050
|
{
|
|
3051
|
-
...
|
|
3051
|
+
...A,
|
|
3052
3052
|
value: i ? new Date(i) : null,
|
|
3053
|
-
onChange: (
|
|
3054
|
-
size:
|
|
3053
|
+
onChange: (w) => I(k.name, w),
|
|
3054
|
+
size: h
|
|
3055
3055
|
}
|
|
3056
3056
|
);
|
|
3057
3057
|
case "file":
|
|
3058
3058
|
return /* @__PURE__ */ e(
|
|
3059
3059
|
ur,
|
|
3060
3060
|
{
|
|
3061
|
-
...
|
|
3061
|
+
...A,
|
|
3062
3062
|
value: i,
|
|
3063
|
-
onChange: (
|
|
3063
|
+
onChange: (w) => I(k.name, w),
|
|
3064
3064
|
error: S,
|
|
3065
|
-
onListFiles: (
|
|
3065
|
+
onListFiles: (w) => g?.http.invoke({
|
|
3066
3066
|
method: "POST",
|
|
3067
3067
|
action: "storage.file.list",
|
|
3068
|
-
body:
|
|
3068
|
+
body: w
|
|
3069
3069
|
}),
|
|
3070
3070
|
onListMounts: () => g?.http.invoke({
|
|
3071
3071
|
method: "GET",
|
|
3072
3072
|
action: "storage.mount"
|
|
3073
3073
|
}),
|
|
3074
|
-
onUploadFile: (
|
|
3074
|
+
onUploadFile: (w) => g?.http.invoke({
|
|
3075
3075
|
method: "POST",
|
|
3076
3076
|
action: "storage.file.upload",
|
|
3077
|
-
body:
|
|
3077
|
+
body: w
|
|
3078
3078
|
}),
|
|
3079
|
-
onDownloadFile: (
|
|
3079
|
+
onDownloadFile: (w) => g?.http.invoke({
|
|
3080
3080
|
method: "GET",
|
|
3081
|
-
action: `storage.file.${
|
|
3081
|
+
action: `storage.file.${w}.download`
|
|
3082
3082
|
}),
|
|
3083
|
-
onRegisterFile: (
|
|
3083
|
+
onRegisterFile: (w) => g?.http.invoke({
|
|
3084
3084
|
method: "POST",
|
|
3085
3085
|
action: "storage.file.folder",
|
|
3086
|
-
body:
|
|
3086
|
+
body: w
|
|
3087
3087
|
})
|
|
3088
3088
|
}
|
|
3089
3089
|
);
|
|
3090
3090
|
case "folder":
|
|
3091
3091
|
return /* @__PURE__ */ e(
|
|
3092
|
-
|
|
3092
|
+
Rt,
|
|
3093
3093
|
{
|
|
3094
3094
|
value: i || {},
|
|
3095
|
-
onChange: (
|
|
3095
|
+
onChange: (w) => I(k.name, w),
|
|
3096
3096
|
onListFolders: () => g?.http.invoke({
|
|
3097
3097
|
method: "GET",
|
|
3098
3098
|
action: "storage.mount"
|
|
3099
3099
|
}),
|
|
3100
|
-
disabled:
|
|
3101
|
-
size:
|
|
3102
|
-
placeholder:
|
|
3100
|
+
disabled: y,
|
|
3101
|
+
size: h,
|
|
3102
|
+
placeholder: k.placeholder
|
|
3103
3103
|
}
|
|
3104
3104
|
);
|
|
3105
3105
|
case "custom":
|
|
3106
|
-
return
|
|
3106
|
+
return k.customComponent?.({
|
|
3107
3107
|
value: i,
|
|
3108
|
-
onChange: (
|
|
3108
|
+
onChange: (w) => I(k.name, w),
|
|
3109
3109
|
error: S,
|
|
3110
|
-
disabled:
|
|
3110
|
+
disabled: y
|
|
3111
3111
|
});
|
|
3112
3112
|
case "array": {
|
|
3113
|
-
const
|
|
3113
|
+
const w = i || [];
|
|
3114
3114
|
let ee = [];
|
|
3115
3115
|
if (typeof S == "string" && S.startsWith("["))
|
|
3116
3116
|
try {
|
|
@@ -3118,41 +3118,41 @@ const mn = ({
|
|
|
3118
3118
|
} catch {
|
|
3119
3119
|
}
|
|
3120
3120
|
const ae = () => {
|
|
3121
|
-
I(
|
|
3121
|
+
I(k.name, [...w, {}]);
|
|
3122
3122
|
}, le = (j) => {
|
|
3123
3123
|
I(
|
|
3124
|
-
|
|
3125
|
-
|
|
3124
|
+
k.name,
|
|
3125
|
+
w.filter((M, T) => T !== j)
|
|
3126
3126
|
);
|
|
3127
|
-
}, G = (j,
|
|
3128
|
-
const z = [...
|
|
3127
|
+
}, G = (j, M, T) => {
|
|
3128
|
+
const z = [...w];
|
|
3129
3129
|
z[j] = {
|
|
3130
3130
|
...z[j],
|
|
3131
|
-
[
|
|
3132
|
-
}, I(
|
|
3131
|
+
[M]: T
|
|
3132
|
+
}, I(k.name, z);
|
|
3133
3133
|
};
|
|
3134
3134
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
3135
|
-
|
|
3136
|
-
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children:
|
|
3137
|
-
const z = ee?.[
|
|
3135
|
+
w.map((j, M) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3136
|
+
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((T) => {
|
|
3137
|
+
const z = ee?.[M]?.[T.name];
|
|
3138
3138
|
return /* @__PURE__ */ c(
|
|
3139
3139
|
"div",
|
|
3140
3140
|
{
|
|
3141
3141
|
className: "flex flex-col gap-1",
|
|
3142
3142
|
children: [
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3143
|
+
M === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3144
|
+
T.label,
|
|
3145
|
+
T.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3146
3146
|
] }),
|
|
3147
3147
|
(() => {
|
|
3148
|
-
const
|
|
3149
|
-
value: j?.[
|
|
3150
|
-
disabled:
|
|
3151
|
-
required:
|
|
3152
|
-
placeholder:
|
|
3153
|
-
...
|
|
3148
|
+
const B = {
|
|
3149
|
+
value: j?.[T.name] || "",
|
|
3150
|
+
disabled: y,
|
|
3151
|
+
required: T.required,
|
|
3152
|
+
placeholder: T.placeholder,
|
|
3153
|
+
...T.fieldProps
|
|
3154
3154
|
};
|
|
3155
|
-
switch (
|
|
3155
|
+
switch (T.type) {
|
|
3156
3156
|
case "text":
|
|
3157
3157
|
case "email":
|
|
3158
3158
|
case "password":
|
|
@@ -3162,72 +3162,72 @@ const mn = ({
|
|
|
3162
3162
|
return /* @__PURE__ */ e(
|
|
3163
3163
|
be,
|
|
3164
3164
|
{
|
|
3165
|
-
...
|
|
3166
|
-
onChange: (
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3165
|
+
...B,
|
|
3166
|
+
onChange: (F) => G(
|
|
3167
|
+
M,
|
|
3168
|
+
T.name,
|
|
3169
|
+
F.target.value
|
|
3170
3170
|
),
|
|
3171
|
-
type:
|
|
3172
|
-
autoComplete:
|
|
3171
|
+
type: T.textType || T.type,
|
|
3172
|
+
autoComplete: T.autocomplete,
|
|
3173
3173
|
error: z,
|
|
3174
|
-
size:
|
|
3174
|
+
size: h
|
|
3175
3175
|
}
|
|
3176
3176
|
);
|
|
3177
3177
|
case "textarea":
|
|
3178
3178
|
return /* @__PURE__ */ e(
|
|
3179
3179
|
De,
|
|
3180
3180
|
{
|
|
3181
|
-
...
|
|
3182
|
-
onChange: (
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3181
|
+
...B,
|
|
3182
|
+
onChange: (F) => G(
|
|
3183
|
+
M,
|
|
3184
|
+
T.name,
|
|
3185
|
+
F.target.value
|
|
3186
3186
|
),
|
|
3187
3187
|
rows: 4,
|
|
3188
3188
|
error: z,
|
|
3189
|
-
size:
|
|
3189
|
+
size: h
|
|
3190
3190
|
}
|
|
3191
3191
|
);
|
|
3192
3192
|
case "select":
|
|
3193
3193
|
return /* @__PURE__ */ e(
|
|
3194
3194
|
Ne,
|
|
3195
3195
|
{
|
|
3196
|
-
...
|
|
3197
|
-
onChange: (
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3196
|
+
...B,
|
|
3197
|
+
onChange: (F) => G(
|
|
3198
|
+
M,
|
|
3199
|
+
T.name,
|
|
3200
|
+
F
|
|
3201
3201
|
),
|
|
3202
|
-
options: (
|
|
3203
|
-
(
|
|
3204
|
-
...
|
|
3205
|
-
value: String(
|
|
3202
|
+
options: (T.options || []).map(
|
|
3203
|
+
(F) => ({
|
|
3204
|
+
...F,
|
|
3205
|
+
value: String(F.value)
|
|
3206
3206
|
})
|
|
3207
3207
|
),
|
|
3208
|
-
searchable:
|
|
3209
|
-
multiple:
|
|
3210
|
-
allowCreate:
|
|
3208
|
+
searchable: T.searchable,
|
|
3209
|
+
multiple: T.multiple,
|
|
3210
|
+
allowCreate: T.allowCreate,
|
|
3211
3211
|
error: z,
|
|
3212
|
-
size:
|
|
3212
|
+
size: h
|
|
3213
3213
|
}
|
|
3214
3214
|
);
|
|
3215
3215
|
case "checkbox":
|
|
3216
3216
|
return /* @__PURE__ */ e(
|
|
3217
3217
|
pe,
|
|
3218
3218
|
{
|
|
3219
|
-
...
|
|
3220
|
-
checked: !!j?.[
|
|
3221
|
-
onChange: (
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3219
|
+
...B,
|
|
3220
|
+
checked: !!j?.[T.name],
|
|
3221
|
+
onChange: (F) => G(
|
|
3222
|
+
M,
|
|
3223
|
+
T.name,
|
|
3224
|
+
F.target.checked
|
|
3225
3225
|
),
|
|
3226
|
-
size:
|
|
3226
|
+
size: h
|
|
3227
3227
|
}
|
|
3228
3228
|
);
|
|
3229
3229
|
case "radio":
|
|
3230
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3230
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: T.options?.map((F) => /* @__PURE__ */ c(
|
|
3231
3231
|
"label",
|
|
3232
3232
|
{
|
|
3233
3233
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3236,63 +3236,63 @@ const mn = ({
|
|
|
3236
3236
|
"input",
|
|
3237
3237
|
{
|
|
3238
3238
|
type: "radio",
|
|
3239
|
-
name: `${
|
|
3240
|
-
value:
|
|
3241
|
-
checked: j?.[
|
|
3239
|
+
name: `${k.name}.${M}.${T.name}`,
|
|
3240
|
+
value: F.value,
|
|
3241
|
+
checked: j?.[T.name] === F.value,
|
|
3242
3242
|
onChange: () => G(
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3243
|
+
M,
|
|
3244
|
+
T.name,
|
|
3245
|
+
F.value
|
|
3246
3246
|
),
|
|
3247
|
-
disabled:
|
|
3247
|
+
disabled: y || F.disabled,
|
|
3248
3248
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3249
3249
|
}
|
|
3250
3250
|
),
|
|
3251
|
-
|
|
3251
|
+
F.label
|
|
3252
3252
|
]
|
|
3253
3253
|
},
|
|
3254
|
-
|
|
3254
|
+
F.value
|
|
3255
3255
|
)) });
|
|
3256
3256
|
case "date": {
|
|
3257
|
-
const
|
|
3257
|
+
const F = j?.[T.name];
|
|
3258
3258
|
return /* @__PURE__ */ e(
|
|
3259
3259
|
$e,
|
|
3260
3260
|
{
|
|
3261
|
-
...
|
|
3262
|
-
value:
|
|
3263
|
-
onChange: (
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3261
|
+
...B,
|
|
3262
|
+
value: F ? new Date(F) : null,
|
|
3263
|
+
onChange: (H) => G(
|
|
3264
|
+
M,
|
|
3265
|
+
T.name,
|
|
3266
|
+
H
|
|
3267
3267
|
),
|
|
3268
|
-
size:
|
|
3268
|
+
size: h
|
|
3269
3269
|
}
|
|
3270
3270
|
);
|
|
3271
3271
|
}
|
|
3272
3272
|
case "custom":
|
|
3273
|
-
return
|
|
3274
|
-
value: j?.[
|
|
3275
|
-
onChange: (
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3273
|
+
return T.customComponent?.({
|
|
3274
|
+
value: j?.[T.name],
|
|
3275
|
+
onChange: (F) => G(
|
|
3276
|
+
M,
|
|
3277
|
+
T.name,
|
|
3278
|
+
F
|
|
3279
3279
|
),
|
|
3280
3280
|
error: z,
|
|
3281
|
-
disabled:
|
|
3281
|
+
disabled: y
|
|
3282
3282
|
});
|
|
3283
3283
|
// Add other field types here as needed
|
|
3284
3284
|
default:
|
|
3285
3285
|
return /* @__PURE__ */ c("p", { children: [
|
|
3286
3286
|
"Unsupported field type in array:",
|
|
3287
3287
|
" ",
|
|
3288
|
-
|
|
3288
|
+
T.type
|
|
3289
3289
|
] });
|
|
3290
3290
|
}
|
|
3291
3291
|
})(),
|
|
3292
3292
|
z && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: z })
|
|
3293
3293
|
]
|
|
3294
3294
|
},
|
|
3295
|
-
|
|
3295
|
+
T.name
|
|
3296
3296
|
);
|
|
3297
3297
|
}) }),
|
|
3298
3298
|
/* @__PURE__ */ e(
|
|
@@ -3302,14 +3302,14 @@ const mn = ({
|
|
|
3302
3302
|
iconOnly: !0,
|
|
3303
3303
|
variant: "ghost",
|
|
3304
3304
|
size: "md",
|
|
3305
|
-
"aria-label": `${
|
|
3306
|
-
onClick: () => le(
|
|
3307
|
-
disabled:
|
|
3308
|
-
className: d("shrink-0",
|
|
3305
|
+
"aria-label": `${k.label} verwijderen`,
|
|
3306
|
+
onClick: () => le(M),
|
|
3307
|
+
disabled: y,
|
|
3308
|
+
className: d("shrink-0", M === 0 && "mt-5"),
|
|
3309
3309
|
children: /* @__PURE__ */ e(ot, { className: "size-icon-md" })
|
|
3310
3310
|
}
|
|
3311
3311
|
)
|
|
3312
|
-
] },
|
|
3312
|
+
] }, M)),
|
|
3313
3313
|
/* @__PURE__ */ c(
|
|
3314
3314
|
ne,
|
|
3315
3315
|
{
|
|
@@ -3318,9 +3318,9 @@ const mn = ({
|
|
|
3318
3318
|
size: "sm",
|
|
3319
3319
|
leftIcon: /* @__PURE__ */ e(ct, { className: "size-icon-sm" }),
|
|
3320
3320
|
onClick: ae,
|
|
3321
|
-
disabled:
|
|
3321
|
+
disabled: y,
|
|
3322
3322
|
children: [
|
|
3323
|
-
|
|
3323
|
+
k.label,
|
|
3324
3324
|
" toevoegen"
|
|
3325
3325
|
]
|
|
3326
3326
|
}
|
|
@@ -3331,22 +3331,22 @@ const mn = ({
|
|
|
3331
3331
|
return null;
|
|
3332
3332
|
}
|
|
3333
3333
|
},
|
|
3334
|
-
[
|
|
3334
|
+
[x, D, E, b, h, I]
|
|
3335
3335
|
), re = ue(
|
|
3336
|
-
(
|
|
3337
|
-
if (
|
|
3336
|
+
(k) => {
|
|
3337
|
+
if (k.conditional && !k.conditional(x))
|
|
3338
3338
|
return null;
|
|
3339
|
-
const i =
|
|
3339
|
+
const i = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
|
|
3340
3340
|
if (i.length === 0) return null;
|
|
3341
3341
|
const S = d(
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
"grid-cols-1": !
|
|
3345
|
-
"grid-cols-2":
|
|
3346
|
-
"grid-cols-3":
|
|
3347
|
-
"grid-cols-4":
|
|
3342
|
+
k.layout === "flex" ? "flex flex-wrap gap-3" : "grid gap-3",
|
|
3343
|
+
k.layout !== "flex" && {
|
|
3344
|
+
"grid-cols-1": !k.columns || k.columns === 1,
|
|
3345
|
+
"grid-cols-2": k.columns === 2,
|
|
3346
|
+
"grid-cols-3": k.columns === 3,
|
|
3347
|
+
"grid-cols-4": k.columns === 4
|
|
3348
3348
|
},
|
|
3349
|
-
|
|
3349
|
+
k.className
|
|
3350
3350
|
);
|
|
3351
3351
|
return /* @__PURE__ */ c(
|
|
3352
3352
|
"div",
|
|
@@ -3354,54 +3354,54 @@ const mn = ({
|
|
|
3354
3354
|
className: "flex flex-col gap-4 px-5 py-4 not-first:border-t not-first:border-border-subtle sm:flex-row sm:gap-5",
|
|
3355
3355
|
children: [
|
|
3356
3356
|
/* @__PURE__ */ c("div", { className: "w-full shrink-0 sm:w-form-label", children: [
|
|
3357
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children:
|
|
3358
|
-
|
|
3357
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children: k.title }),
|
|
3358
|
+
k.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: k.description })
|
|
3359
3359
|
] }),
|
|
3360
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((
|
|
3361
|
-
const
|
|
3360
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((y) => {
|
|
3361
|
+
const A = D[y.name] ? E[y.name] : void 0;
|
|
3362
3362
|
return /* @__PURE__ */ c(
|
|
3363
3363
|
"div",
|
|
3364
3364
|
{
|
|
3365
3365
|
className: d(
|
|
3366
3366
|
"flex min-w-0 flex-col gap-1.5",
|
|
3367
|
-
|
|
3367
|
+
y.type === "checkbox" && "justify-center"
|
|
3368
3368
|
),
|
|
3369
3369
|
style: {
|
|
3370
|
-
width: typeof
|
|
3371
|
-
gridColumn: typeof
|
|
3370
|
+
width: typeof y.width == "string" ? y.width : void 0,
|
|
3371
|
+
gridColumn: typeof y.width == "number" ? `span ${y.width} / span ${y.width}` : void 0
|
|
3372
3372
|
},
|
|
3373
3373
|
children: [
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3374
|
+
y.type !== "custom" && y.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3375
|
+
y.label,
|
|
3376
|
+
y.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3377
3377
|
] }),
|
|
3378
|
-
|
|
3379
|
-
|
|
3378
|
+
K(y),
|
|
3379
|
+
y.help && !A && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: y.help })
|
|
3380
3380
|
]
|
|
3381
3381
|
},
|
|
3382
|
-
|
|
3382
|
+
y.name
|
|
3383
3383
|
);
|
|
3384
3384
|
}) }) })
|
|
3385
3385
|
]
|
|
3386
3386
|
},
|
|
3387
|
-
|
|
3387
|
+
k.id
|
|
3388
3388
|
);
|
|
3389
3389
|
},
|
|
3390
|
-
[
|
|
3390
|
+
[x, D, E, K]
|
|
3391
3391
|
), P = d(
|
|
3392
3392
|
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3393
3393
|
{
|
|
3394
|
-
"max-w-md":
|
|
3395
|
-
"max-w-2xl":
|
|
3396
|
-
"max-w-4xl":
|
|
3397
|
-
"max-w-full":
|
|
3394
|
+
"max-w-md": h === "sm",
|
|
3395
|
+
"max-w-2xl": h === "md",
|
|
3396
|
+
"max-w-4xl": h === "lg",
|
|
3397
|
+
"max-w-full": h === "full"
|
|
3398
3398
|
},
|
|
3399
3399
|
p
|
|
3400
|
-
), ce =
|
|
3401
|
-
return /* @__PURE__ */ c("form", { ref:
|
|
3402
|
-
!
|
|
3400
|
+
), ce = h === "full" ? "md" : h;
|
|
3401
|
+
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className: P, children: [
|
|
3402
|
+
!N && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3403
3403
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(re) }),
|
|
3404
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children:
|
|
3404
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: N && /* @__PURE__ */ c(xe, { children: [
|
|
3405
3405
|
/* @__PURE__ */ e("div", { className: "ml-auto" }),
|
|
3406
3406
|
s && /* @__PURE__ */ e(
|
|
3407
3407
|
ne,
|
|
@@ -3409,7 +3409,7 @@ const mn = ({
|
|
|
3409
3409
|
type: "button",
|
|
3410
3410
|
variant: m.variant ?? "ghost",
|
|
3411
3411
|
size: m.size || ce,
|
|
3412
|
-
disabled: m.disabled ||
|
|
3412
|
+
disabled: m.disabled || b,
|
|
3413
3413
|
onClick: s,
|
|
3414
3414
|
className: m.className,
|
|
3415
3415
|
children: m.label
|
|
@@ -3421,8 +3421,8 @@ const mn = ({
|
|
|
3421
3421
|
type: "submit",
|
|
3422
3422
|
variant: u.variant,
|
|
3423
3423
|
size: u.size || ce,
|
|
3424
|
-
disabled: u.disabled ||
|
|
3425
|
-
loading:
|
|
3424
|
+
disabled: u.disabled || b,
|
|
3425
|
+
loading: b,
|
|
3426
3426
|
className: u.className,
|
|
3427
3427
|
children: u.label
|
|
3428
3428
|
}
|
|
@@ -3430,7 +3430,7 @@ const mn = ({
|
|
|
3430
3430
|
] }) })
|
|
3431
3431
|
] });
|
|
3432
3432
|
};
|
|
3433
|
-
function
|
|
3433
|
+
function xn({
|
|
3434
3434
|
open: t,
|
|
3435
3435
|
title: r,
|
|
3436
3436
|
description: n,
|
|
@@ -3442,7 +3442,7 @@ function fn({
|
|
|
3442
3442
|
onCancel: m
|
|
3443
3443
|
}) {
|
|
3444
3444
|
return /* @__PURE__ */ e(
|
|
3445
|
-
|
|
3445
|
+
Ve,
|
|
3446
3446
|
{
|
|
3447
3447
|
open: t,
|
|
3448
3448
|
onClose: m,
|
|
@@ -3488,7 +3488,7 @@ const xr = {
|
|
|
3488
3488
|
info: "bg-info",
|
|
3489
3489
|
note: "bg-note"
|
|
3490
3490
|
};
|
|
3491
|
-
function
|
|
3491
|
+
function bn({
|
|
3492
3492
|
variant: t = "default",
|
|
3493
3493
|
size: r = "md",
|
|
3494
3494
|
dot: n = !1,
|
|
@@ -3541,7 +3541,7 @@ const gr = {
|
|
|
3541
3541
|
neutral: "bg-surface-hover text-text-muted",
|
|
3542
3542
|
success: "bg-success-soft text-success-fg"
|
|
3543
3543
|
};
|
|
3544
|
-
function
|
|
3544
|
+
function pn({
|
|
3545
3545
|
icon: t,
|
|
3546
3546
|
tone: r = "neutral",
|
|
3547
3547
|
title: n,
|
|
@@ -3569,7 +3569,7 @@ function xn({
|
|
|
3569
3569
|
}
|
|
3570
3570
|
);
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function gn({ children: t, className: r, ...n }) {
|
|
3573
3573
|
return /* @__PURE__ */ e(
|
|
3574
3574
|
"kbd",
|
|
3575
3575
|
{
|
|
@@ -3589,7 +3589,7 @@ const vr = {
|
|
|
3589
3589
|
accent: "bg-accent",
|
|
3590
3590
|
success: "bg-success"
|
|
3591
3591
|
};
|
|
3592
|
-
function
|
|
3592
|
+
function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3593
3593
|
const o = Math.max(0, Math.min(100, t));
|
|
3594
3594
|
return /* @__PURE__ */ e(
|
|
3595
3595
|
"div",
|
|
@@ -3628,7 +3628,7 @@ const Nr = {
|
|
|
3628
3628
|
lg: "text-base",
|
|
3629
3629
|
xl: "text-lg"
|
|
3630
3630
|
};
|
|
3631
|
-
function
|
|
3631
|
+
function yn({
|
|
3632
3632
|
size: t = "md",
|
|
3633
3633
|
variant: r = "primary",
|
|
3634
3634
|
label: n = "Loading...",
|
|
@@ -3710,7 +3710,7 @@ const Cr = {
|
|
|
3710
3710
|
"cat-4": "bg-cat-4",
|
|
3711
3711
|
"cat-5": "bg-cat-5"
|
|
3712
3712
|
};
|
|
3713
|
-
function
|
|
3713
|
+
function Nn({
|
|
3714
3714
|
tone: t = "neutral",
|
|
3715
3715
|
shape: r = "round",
|
|
3716
3716
|
pulse: n = !1,
|
|
@@ -3733,7 +3733,7 @@ function vn({
|
|
|
3733
3733
|
}
|
|
3734
3734
|
);
|
|
3735
3735
|
}
|
|
3736
|
-
function
|
|
3736
|
+
function wn({
|
|
3737
3737
|
steps: t,
|
|
3738
3738
|
current: r,
|
|
3739
3739
|
variant: n = "numbered",
|
|
@@ -3769,7 +3769,7 @@ function yn({
|
|
|
3769
3769
|
m < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3770
3770
|
] }, u)) });
|
|
3771
3771
|
}
|
|
3772
|
-
function
|
|
3772
|
+
function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...o }) {
|
|
3773
3773
|
return /* @__PURE__ */ c(
|
|
3774
3774
|
"div",
|
|
3775
3775
|
{
|
|
@@ -3817,7 +3817,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3817
3817
|
onError: () => l(!0)
|
|
3818
3818
|
}
|
|
3819
3819
|
) : /* @__PURE__ */ e("span", { className: u, title: a ?? t, "aria-label": t, children: zr(t) });
|
|
3820
|
-
}, Oe = "ring-surface", Mr = "ring-surface-accent",
|
|
3820
|
+
}, Oe = "ring-surface", Mr = "ring-surface-accent", Cn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3821
3821
|
if (t.length === 0) return null;
|
|
3822
3822
|
const a = t.slice(0, r), o = t.length - a.length;
|
|
3823
3823
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
@@ -3851,7 +3851,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3851
3851
|
}
|
|
3852
3852
|
)
|
|
3853
3853
|
] });
|
|
3854
|
-
},
|
|
3854
|
+
}, Fe = {
|
|
3855
3855
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
3856
3856
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
3857
3857
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
@@ -3862,8 +3862,8 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3862
3862
|
md: "size-avatar-sm rounded-md text-xs",
|
|
3863
3863
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3864
3864
|
};
|
|
3865
|
-
function
|
|
3866
|
-
const o =
|
|
3865
|
+
function Sn({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3866
|
+
const o = Fe[t in Fe ? t : "note"];
|
|
3867
3867
|
return /* @__PURE__ */ e(
|
|
3868
3868
|
"span",
|
|
3869
3869
|
{
|
|
@@ -3879,7 +3879,7 @@ function kn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3879
3879
|
}
|
|
3880
3880
|
);
|
|
3881
3881
|
}
|
|
3882
|
-
const
|
|
3882
|
+
const zn = ({
|
|
3883
3883
|
src: t,
|
|
3884
3884
|
alt: r,
|
|
3885
3885
|
size: n = "md",
|
|
@@ -3889,20 +3889,20 @@ const Cn = ({
|
|
|
3889
3889
|
showError: l = !0,
|
|
3890
3890
|
fallback: u,
|
|
3891
3891
|
loadingContent: m,
|
|
3892
|
-
errorContent:
|
|
3893
|
-
className:
|
|
3894
|
-
onLoad:
|
|
3895
|
-
onError:
|
|
3892
|
+
errorContent: N,
|
|
3893
|
+
className: f,
|
|
3894
|
+
onLoad: h,
|
|
3895
|
+
onError: b,
|
|
3896
3896
|
...p
|
|
3897
3897
|
}) => {
|
|
3898
|
-
const [
|
|
3899
|
-
g(!1),
|
|
3898
|
+
const [C, g] = R(!0), [x, _] = R(!1), [E, W] = R(t), D = (P) => {
|
|
3899
|
+
g(!1), _(!1), h?.(P);
|
|
3900
3900
|
}, X = (P) => {
|
|
3901
|
-
if (g(!1),
|
|
3902
|
-
|
|
3901
|
+
if (g(!1), _(!0), u && E !== u) {
|
|
3902
|
+
W(u), _(!1), g(!0);
|
|
3903
3903
|
return;
|
|
3904
3904
|
}
|
|
3905
|
-
|
|
3905
|
+
b?.(P);
|
|
3906
3906
|
}, U = d(
|
|
3907
3907
|
"relative overflow-hidden bg-surface-hover",
|
|
3908
3908
|
// Size variants
|
|
@@ -3930,17 +3930,17 @@ const Cn = ({
|
|
|
3930
3930
|
"rounded-xl": a === "xl",
|
|
3931
3931
|
"rounded-full": a === "full"
|
|
3932
3932
|
},
|
|
3933
|
-
|
|
3933
|
+
f
|
|
3934
3934
|
), I = d(
|
|
3935
3935
|
"w-full h-full object-cover transition-opacity duration-fast",
|
|
3936
3936
|
{
|
|
3937
|
-
"opacity-0":
|
|
3938
|
-
"opacity-100": !
|
|
3937
|
+
"opacity-0": C || x,
|
|
3938
|
+
"opacity-100": !C && !x
|
|
3939
3939
|
}
|
|
3940
3940
|
), q = d(
|
|
3941
3941
|
"absolute inset-0 flex items-center justify-center",
|
|
3942
3942
|
"text-text-muted"
|
|
3943
|
-
),
|
|
3943
|
+
), K = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), re = /* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
3944
3944
|
/* @__PURE__ */ e(Y, { icon: dt, size: "lg", className: "mx-auto mb-1" }),
|
|
3945
3945
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
3946
3946
|
] });
|
|
@@ -3949,18 +3949,18 @@ const Cn = ({
|
|
|
3949
3949
|
"img",
|
|
3950
3950
|
{
|
|
3951
3951
|
...p,
|
|
3952
|
-
src:
|
|
3952
|
+
src: E,
|
|
3953
3953
|
alt: r,
|
|
3954
3954
|
className: I,
|
|
3955
|
-
onLoad:
|
|
3955
|
+
onLoad: D,
|
|
3956
3956
|
onError: X
|
|
3957
3957
|
}
|
|
3958
3958
|
),
|
|
3959
|
-
|
|
3960
|
-
|
|
3959
|
+
C && o && /* @__PURE__ */ e("div", { className: q, children: m || K }),
|
|
3960
|
+
x && l && /* @__PURE__ */ e("div", { className: q, children: N || re })
|
|
3961
3961
|
] });
|
|
3962
3962
|
};
|
|
3963
|
-
function
|
|
3963
|
+
function En({
|
|
3964
3964
|
items: t,
|
|
3965
3965
|
getRowKey: r,
|
|
3966
3966
|
variant: n = "divided",
|
|
@@ -3970,56 +3970,56 @@ function Sn({
|
|
|
3970
3970
|
onSelect: l,
|
|
3971
3971
|
onActiveIndexChange: u,
|
|
3972
3972
|
isActive: m,
|
|
3973
|
-
unread:
|
|
3974
|
-
dimmed:
|
|
3975
|
-
groupBy:
|
|
3976
|
-
groups:
|
|
3973
|
+
unread: N,
|
|
3974
|
+
dimmed: f,
|
|
3975
|
+
groupBy: h,
|
|
3976
|
+
groups: b,
|
|
3977
3977
|
renderGroupHeader: p,
|
|
3978
|
-
stickyGroupHeaders:
|
|
3978
|
+
stickyGroupHeaders: C = !1,
|
|
3979
3979
|
collapsibleGroups: g = !1,
|
|
3980
|
-
hideGroupCount:
|
|
3981
|
-
selectable:
|
|
3982
|
-
selectedItems:
|
|
3983
|
-
onSelectionChange:
|
|
3984
|
-
bulkActions:
|
|
3980
|
+
hideGroupCount: x = !1,
|
|
3981
|
+
selectable: _ = !1,
|
|
3982
|
+
selectedItems: E = [],
|
|
3983
|
+
onSelectionChange: W,
|
|
3984
|
+
bulkActions: D,
|
|
3985
3985
|
header: X,
|
|
3986
3986
|
stickyHeader: U = !1,
|
|
3987
3987
|
bordered: I = !1,
|
|
3988
3988
|
emptyContent: q,
|
|
3989
|
-
loading:
|
|
3989
|
+
loading: K = !1,
|
|
3990
3990
|
loadingRows: re = 4,
|
|
3991
3991
|
className: P,
|
|
3992
3992
|
"aria-label": ce
|
|
3993
3993
|
}) {
|
|
3994
|
-
const [
|
|
3994
|
+
const [k, i] = oe.useState(
|
|
3995
3995
|
() => Object.fromEntries(
|
|
3996
|
-
(
|
|
3996
|
+
(b ?? []).filter((z) => z.defaultCollapsed).map((z) => [z.id, !0])
|
|
3997
3997
|
)
|
|
3998
|
-
), S = oe.useRef(null),
|
|
3998
|
+
), S = oe.useRef(null), y = (z) => {
|
|
3999
3999
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(z.key)) return;
|
|
4000
|
-
const
|
|
4000
|
+
const F = Array.from(
|
|
4001
4001
|
S.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
4002
4002
|
);
|
|
4003
|
-
if (
|
|
4003
|
+
if (F.length === 0) return;
|
|
4004
4004
|
z.preventDefault();
|
|
4005
|
-
const
|
|
4006
|
-
|
|
4007
|
-
},
|
|
4008
|
-
|
|
4009
|
-
|
|
4005
|
+
const H = F.indexOf(document.activeElement), $ = z.key === "Home" ? 0 : z.key === "End" ? F.length - 1 : z.key === "ArrowDown" ? (H + 1) % F.length : (H - 1 + F.length) % F.length;
|
|
4006
|
+
F[$]?.focus();
|
|
4007
|
+
}, A = (z, B) => r ? r(z, B) : B, w = (z) => E.includes(z), ee = (z, B) => {
|
|
4008
|
+
W && W(
|
|
4009
|
+
B ? [...E, z] : E.filter((F) => F !== z)
|
|
4010
4010
|
);
|
|
4011
|
-
}, ae = (z) =>
|
|
4011
|
+
}, ae = (z) => W?.(z ? [...t] : []), le = d(
|
|
4012
4012
|
"flex flex-col",
|
|
4013
4013
|
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4014
4014
|
P
|
|
4015
4015
|
);
|
|
4016
|
-
if (
|
|
4017
|
-
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z,
|
|
4016
|
+
if (K)
|
|
4017
|
+
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z, B) => /* @__PURE__ */ c(
|
|
4018
4018
|
"div",
|
|
4019
4019
|
{
|
|
4020
4020
|
className: d(
|
|
4021
4021
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
4022
|
-
n === "divided" &&
|
|
4022
|
+
n === "divided" && B > 0 && "border-t border-border-subtle"
|
|
4023
4023
|
),
|
|
4024
4024
|
children: [
|
|
4025
4025
|
/* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
|
|
@@ -4028,12 +4028,12 @@ function Sn({
|
|
|
4028
4028
|
/* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
|
|
4029
4029
|
]
|
|
4030
4030
|
},
|
|
4031
|
-
`skeleton-${
|
|
4031
|
+
`skeleton-${B}`
|
|
4032
4032
|
)) });
|
|
4033
4033
|
if (t.length === 0 && q)
|
|
4034
4034
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4035
|
-
const G = t.length > 0 &&
|
|
4036
|
-
const
|
|
4035
|
+
const G = t.length > 0 && E.length === t.length, j = E.length > 0 && !G, M = (z, B, F) => {
|
|
4036
|
+
const H = m?.(z, B) ?? !1, $ = N?.(z, B) ?? !1, L = f?.(z, B) ?? !1, te = _ && w(z);
|
|
4037
4037
|
return /* @__PURE__ */ c(
|
|
4038
4038
|
"li",
|
|
4039
4039
|
{
|
|
@@ -4041,27 +4041,27 @@ function Sn({
|
|
|
4041
4041
|
role: "button",
|
|
4042
4042
|
tabIndex: 0,
|
|
4043
4043
|
"data-list-row": "",
|
|
4044
|
-
"aria-current":
|
|
4045
|
-
onClick: () => l(z,
|
|
4046
|
-
onFocus: () => u?.(
|
|
4044
|
+
"aria-current": H || void 0,
|
|
4045
|
+
onClick: () => l(z, B),
|
|
4046
|
+
onFocus: () => u?.(B),
|
|
4047
4047
|
onKeyDown: (v) => {
|
|
4048
|
-
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), l(z,
|
|
4048
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), l(z, B));
|
|
4049
4049
|
}
|
|
4050
4050
|
} : {},
|
|
4051
4051
|
className: d(
|
|
4052
4052
|
"flex items-center gap-3 px-4 py-2 text-base",
|
|
4053
4053
|
"transition-colors duration-fast ease-out",
|
|
4054
|
-
n === "divided" && !
|
|
4054
|
+
n === "divided" && !F && "border-t border-border-subtle",
|
|
4055
4055
|
l && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4056
|
-
|
|
4057
|
-
|
|
4056
|
+
H || te ? "bg-accent-soft text-text" : l && "hover:bg-surface-hover",
|
|
4057
|
+
$ && "font-bold",
|
|
4058
4058
|
L && "opacity-55"
|
|
4059
4059
|
),
|
|
4060
4060
|
children: [
|
|
4061
|
-
|
|
4061
|
+
_ && /* @__PURE__ */ e("span", { onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4062
4062
|
pe,
|
|
4063
4063
|
{
|
|
4064
|
-
checked:
|
|
4064
|
+
checked: w(z),
|
|
4065
4065
|
onChange: (v) => ee(z, v.target.checked),
|
|
4066
4066
|
"aria-label": "Rij selecteren"
|
|
4067
4067
|
}
|
|
@@ -4073,42 +4073,42 @@ function Sn({
|
|
|
4073
4073
|
className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
|
|
4074
4074
|
}
|
|
4075
4075
|
),
|
|
4076
|
-
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z,
|
|
4077
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z,
|
|
4078
|
-
o && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: o(z,
|
|
4076
|
+
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z, B) }),
|
|
4077
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z, B) : String(z) }),
|
|
4078
|
+
o && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: o(z, B) })
|
|
4079
4079
|
]
|
|
4080
4080
|
},
|
|
4081
|
-
|
|
4081
|
+
A(z, B)
|
|
4082
4082
|
);
|
|
4083
|
-
},
|
|
4084
|
-
if (!
|
|
4085
|
-
return t.map((
|
|
4083
|
+
}, T = (() => {
|
|
4084
|
+
if (!h)
|
|
4085
|
+
return t.map((H, $) => M(H, $, $ === 0));
|
|
4086
4086
|
const z = /* @__PURE__ */ new Map();
|
|
4087
|
-
t.forEach((
|
|
4088
|
-
const L =
|
|
4089
|
-
z.has(L) || z.set(L, []), z.get(L).push({ item:
|
|
4087
|
+
t.forEach((H, $) => {
|
|
4088
|
+
const L = h(H, $);
|
|
4089
|
+
z.has(L) || z.set(L, []), z.get(L).push({ item: H, index: $ });
|
|
4090
4090
|
});
|
|
4091
|
-
const
|
|
4091
|
+
const B = b ?? [];
|
|
4092
4092
|
return [
|
|
4093
|
-
...
|
|
4094
|
-
...[...z.keys()].filter((
|
|
4095
|
-
].flatMap((
|
|
4096
|
-
const L = z.get(
|
|
4093
|
+
...B.filter((H) => z.has(H.id)),
|
|
4094
|
+
...[...z.keys()].filter((H) => !B.some(($) => $.id === H)).map((H) => ({ id: H }))
|
|
4095
|
+
].flatMap((H, $) => {
|
|
4096
|
+
const L = z.get(H.id) ?? [], te = g && k[H.id], v = H.title ?? H.id, V = H.count ?? L.length, Z = /* @__PURE__ */ e(
|
|
4097
4097
|
"li",
|
|
4098
4098
|
{
|
|
4099
|
-
onClick: g ? () => i((J) => ({ ...J, [
|
|
4099
|
+
onClick: g ? () => i((J) => ({ ...J, [H.id]: !J[H.id] })) : void 0,
|
|
4100
4100
|
className: d(
|
|
4101
4101
|
"flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
|
|
4102
4102
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4103
4103
|
"border-border-subtle",
|
|
4104
|
-
|
|
4104
|
+
$ > 0 && "border-t",
|
|
4105
4105
|
"border-b",
|
|
4106
|
-
|
|
4106
|
+
C && "sticky z-10",
|
|
4107
4107
|
g && "cursor-pointer select-none hover:text-text"
|
|
4108
4108
|
),
|
|
4109
4109
|
"aria-expanded": g ? !te : void 0,
|
|
4110
|
-
style:
|
|
4111
|
-
children: p ? p(
|
|
4110
|
+
style: C ? { top: U ? 28 : 0 } : void 0,
|
|
4111
|
+
children: p ? p(H, L.map((J) => J.item)) : /* @__PURE__ */ c(xe, { children: [
|
|
4112
4112
|
g && /* @__PURE__ */ e(
|
|
4113
4113
|
Ce,
|
|
4114
4114
|
{
|
|
@@ -4120,21 +4120,21 @@ function Sn({
|
|
|
4120
4120
|
}
|
|
4121
4121
|
),
|
|
4122
4122
|
/* @__PURE__ */ e("span", { children: v }),
|
|
4123
|
-
!
|
|
4123
|
+
!x && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: V })
|
|
4124
4124
|
] })
|
|
4125
4125
|
},
|
|
4126
|
-
`group-${
|
|
4126
|
+
`group-${H.id}`
|
|
4127
4127
|
);
|
|
4128
4128
|
return te ? [Z] : [
|
|
4129
4129
|
Z,
|
|
4130
4130
|
...L.map(
|
|
4131
|
-
({ item: J, index: O }, ie) =>
|
|
4131
|
+
({ item: J, index: O }, ie) => M(J, O, ie === 0)
|
|
4132
4132
|
)
|
|
4133
4133
|
];
|
|
4134
4134
|
});
|
|
4135
4135
|
})();
|
|
4136
|
-
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown: l ?
|
|
4137
|
-
|
|
4136
|
+
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown: l ? y : void 0, children: [
|
|
4137
|
+
_ && E.length > 0 && /* @__PURE__ */ c("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
|
|
4138
4138
|
/* @__PURE__ */ e(
|
|
4139
4139
|
pe,
|
|
4140
4140
|
{
|
|
@@ -4145,10 +4145,10 @@ function Sn({
|
|
|
4145
4145
|
}
|
|
4146
4146
|
),
|
|
4147
4147
|
/* @__PURE__ */ c("span", { className: "text-xs text-text-subtle", children: [
|
|
4148
|
-
|
|
4148
|
+
E.length,
|
|
4149
4149
|
" geselecteerd"
|
|
4150
4150
|
] }),
|
|
4151
|
-
|
|
4151
|
+
D && /* @__PURE__ */ e("div", { className: "ml-auto flex gap-2", children: D })
|
|
4152
4152
|
] }),
|
|
4153
4153
|
X && /* @__PURE__ */ e(
|
|
4154
4154
|
"div",
|
|
@@ -4161,10 +4161,10 @@ function Sn({
|
|
|
4161
4161
|
children: X
|
|
4162
4162
|
}
|
|
4163
4163
|
),
|
|
4164
|
-
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children:
|
|
4164
|
+
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: T })
|
|
4165
4165
|
] });
|
|
4166
4166
|
}
|
|
4167
|
-
function
|
|
4167
|
+
function Mn({
|
|
4168
4168
|
side: t,
|
|
4169
4169
|
continued: r = !1,
|
|
4170
4170
|
tone: n = "default",
|
|
@@ -4199,13 +4199,13 @@ const Dr = {
|
|
|
4199
4199
|
urgent: "text-danger-fg",
|
|
4200
4200
|
success: "text-success-fg"
|
|
4201
4201
|
};
|
|
4202
|
-
function
|
|
4202
|
+
function $n({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4203
4203
|
return /* @__PURE__ */ c("div", { className: d("rounded-xl shadow-sm bg-surface px-4 py-3.5", s), ...a, children: [
|
|
4204
4204
|
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Dr[n]), children: t }),
|
|
4205
4205
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4206
4206
|
] });
|
|
4207
4207
|
}
|
|
4208
|
-
const
|
|
4208
|
+
const Dn = ({
|
|
4209
4209
|
surface: t = !1,
|
|
4210
4210
|
title: r,
|
|
4211
4211
|
subtitle: n,
|
|
@@ -4215,22 +4215,22 @@ const Mn = ({
|
|
|
4215
4215
|
className: l,
|
|
4216
4216
|
backLabel: u = "Back",
|
|
4217
4217
|
backClassName: m,
|
|
4218
|
-
onBack:
|
|
4219
|
-
editable:
|
|
4220
|
-
onTitleChange:
|
|
4218
|
+
onBack: N,
|
|
4219
|
+
editable: f = !1,
|
|
4220
|
+
onTitleChange: h
|
|
4221
4221
|
}) => {
|
|
4222
|
-
const [
|
|
4222
|
+
const [b, p] = R(!1), [C, g] = R(r), x = se(null);
|
|
4223
4223
|
Q(() => {
|
|
4224
4224
|
g(r);
|
|
4225
4225
|
}, [r]), Q(() => {
|
|
4226
|
-
|
|
4227
|
-
}, [
|
|
4228
|
-
const
|
|
4229
|
-
|
|
4230
|
-
},
|
|
4231
|
-
p(!1),
|
|
4232
|
-
},
|
|
4233
|
-
|
|
4226
|
+
b && x.current && (x.current.focus(), x.current.select());
|
|
4227
|
+
}, [b]);
|
|
4228
|
+
const _ = () => {
|
|
4229
|
+
f && p(!0);
|
|
4230
|
+
}, E = () => {
|
|
4231
|
+
p(!1), C.trim() !== "" && C !== r && h ? h(C.trim()) : g(r);
|
|
4232
|
+
}, W = (D) => {
|
|
4233
|
+
D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), p(!1));
|
|
4234
4234
|
};
|
|
4235
4235
|
return /* @__PURE__ */ c(
|
|
4236
4236
|
"div",
|
|
@@ -4244,38 +4244,38 @@ const Mn = ({
|
|
|
4244
4244
|
children: [
|
|
4245
4245
|
/* @__PURE__ */ c("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
|
|
4246
4246
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-4 text-text", children: [
|
|
4247
|
-
|
|
4247
|
+
N && /* @__PURE__ */ e(ne, { variant: "outline", onClick: N, leftIcon: /* @__PURE__ */ e(Y, { icon: ke, size: "sm" }), iconOnly: !0 }),
|
|
4248
4248
|
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
|
|
4249
|
-
|
|
4249
|
+
b ? /* @__PURE__ */ e(
|
|
4250
4250
|
"input",
|
|
4251
4251
|
{
|
|
4252
|
-
ref:
|
|
4252
|
+
ref: x,
|
|
4253
4253
|
type: "text",
|
|
4254
|
-
value:
|
|
4255
|
-
onChange: (
|
|
4256
|
-
onBlur:
|
|
4257
|
-
onKeyDown:
|
|
4254
|
+
value: C,
|
|
4255
|
+
onChange: (D) => g(D.target.value),
|
|
4256
|
+
onBlur: E,
|
|
4257
|
+
onKeyDown: W,
|
|
4258
4258
|
className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
|
|
4259
4259
|
}
|
|
4260
4260
|
) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
|
|
4261
4261
|
/* @__PURE__ */ e(
|
|
4262
4262
|
"h2",
|
|
4263
4263
|
{
|
|
4264
|
-
onClick:
|
|
4264
|
+
onClick: _,
|
|
4265
4265
|
className: d(
|
|
4266
4266
|
"text-xl font-semibold truncate",
|
|
4267
|
-
|
|
4267
|
+
f && "cursor-pointer"
|
|
4268
4268
|
),
|
|
4269
|
-
title:
|
|
4269
|
+
title: f ? "Click to edit" : void 0,
|
|
4270
4270
|
children: r
|
|
4271
4271
|
}
|
|
4272
4272
|
),
|
|
4273
4273
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4274
|
-
|
|
4274
|
+
f && /* @__PURE__ */ e(
|
|
4275
4275
|
ut,
|
|
4276
4276
|
{
|
|
4277
4277
|
size: 15,
|
|
4278
|
-
onClick:
|
|
4278
|
+
onClick: _,
|
|
4279
4279
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4280
4280
|
}
|
|
4281
4281
|
)
|
|
@@ -4284,29 +4284,29 @@ const Mn = ({
|
|
|
4284
4284
|
] })
|
|
4285
4285
|
] }) }),
|
|
4286
4286
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4287
|
-
(
|
|
4288
|
-
|
|
4287
|
+
(D) => D.render ? /* @__PURE__ */ e(oe.Fragment, { children: D.render() }, D.id) : D.splitOptions && D.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4288
|
+
Re,
|
|
4289
4289
|
{
|
|
4290
|
-
label:
|
|
4291
|
-
onClick:
|
|
4292
|
-
icon:
|
|
4293
|
-
variant:
|
|
4294
|
-
options:
|
|
4295
|
-
disabled:
|
|
4290
|
+
label: D.label,
|
|
4291
|
+
onClick: D.onClick,
|
|
4292
|
+
icon: D.icon,
|
|
4293
|
+
variant: D.variant === "primary" ? "primary" : "outline",
|
|
4294
|
+
options: D.splitOptions,
|
|
4295
|
+
disabled: D.disabled
|
|
4296
4296
|
},
|
|
4297
|
-
|
|
4297
|
+
D.id
|
|
4298
4298
|
) : /* @__PURE__ */ e(
|
|
4299
4299
|
ne,
|
|
4300
4300
|
{
|
|
4301
|
-
variant:
|
|
4301
|
+
variant: D.variant ?? "secondary",
|
|
4302
4302
|
onClick: (X) => {
|
|
4303
|
-
X.stopPropagation(), X.target.blur(),
|
|
4303
|
+
X.stopPropagation(), X.target.blur(), D.onClick();
|
|
4304
4304
|
},
|
|
4305
|
-
disabled:
|
|
4306
|
-
leftIcon:
|
|
4307
|
-
children:
|
|
4305
|
+
disabled: D.disabled,
|
|
4306
|
+
leftIcon: D.icon,
|
|
4307
|
+
children: D.label
|
|
4308
4308
|
},
|
|
4309
|
-
|
|
4309
|
+
D.id
|
|
4310
4310
|
)
|
|
4311
4311
|
) })
|
|
4312
4312
|
] }),
|
|
@@ -4319,7 +4319,7 @@ const Mn = ({
|
|
|
4319
4319
|
sm: "p-2",
|
|
4320
4320
|
md: "p-4",
|
|
4321
4321
|
lg: "p-6"
|
|
4322
|
-
},
|
|
4322
|
+
}, Tn = ({
|
|
4323
4323
|
actions: t = [],
|
|
4324
4324
|
onBack: r,
|
|
4325
4325
|
backLabel: n = "Back",
|
|
@@ -4331,7 +4331,7 @@ const Mn = ({
|
|
|
4331
4331
|
o && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: o }),
|
|
4332
4332
|
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !o && "ml-auto"), children: t.map(
|
|
4333
4333
|
(l) => l.splitOptions && l.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4334
|
-
|
|
4334
|
+
Re,
|
|
4335
4335
|
{
|
|
4336
4336
|
label: l.label,
|
|
4337
4337
|
onClick: l.onClick,
|
|
@@ -4394,7 +4394,7 @@ const Mn = ({
|
|
|
4394
4394
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4395
4395
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4396
4396
|
};
|
|
4397
|
-
function
|
|
4397
|
+
function _n({ text: t, className: r, as: n }) {
|
|
4398
4398
|
const s = t ?? "";
|
|
4399
4399
|
return (n ? n === "html" : _r.test(s)) ? /* @__PURE__ */ e(
|
|
4400
4400
|
"div",
|
|
@@ -4404,7 +4404,7 @@ function Dn({ text: t, className: r, as: n }) {
|
|
|
4404
4404
|
}
|
|
4405
4405
|
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(pt, { remarkPlugins: [gt], components: Lr, children: s }) });
|
|
4406
4406
|
}
|
|
4407
|
-
function
|
|
4407
|
+
function An({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4408
4408
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4409
4409
|
return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: d("flex items-center gap-3 py-2", s), children: [
|
|
4410
4410
|
n === "center" && a,
|
|
@@ -4413,7 +4413,7 @@ function Tn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
4413
4413
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4414
4414
|
] });
|
|
4415
4415
|
}
|
|
4416
|
-
function
|
|
4416
|
+
function Ln({
|
|
4417
4417
|
label: t,
|
|
4418
4418
|
description: r,
|
|
4419
4419
|
control: n,
|
|
@@ -4440,7 +4440,7 @@ function _n({
|
|
|
4440
4440
|
}
|
|
4441
4441
|
);
|
|
4442
4442
|
}
|
|
4443
|
-
function
|
|
4443
|
+
function In({
|
|
4444
4444
|
icon: t,
|
|
4445
4445
|
title: r,
|
|
4446
4446
|
description: n,
|
|
@@ -4460,7 +4460,7 @@ function An({
|
|
|
4460
4460
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4461
4461
|
] });
|
|
4462
4462
|
}
|
|
4463
|
-
function
|
|
4463
|
+
function jn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4464
4464
|
return /* @__PURE__ */ c(
|
|
4465
4465
|
"button",
|
|
4466
4466
|
{
|
|
@@ -4484,32 +4484,32 @@ function Ir(t, r) {
|
|
|
4484
4484
|
t
|
|
4485
4485
|
);
|
|
4486
4486
|
}
|
|
4487
|
-
const
|
|
4487
|
+
const Pn = ({
|
|
4488
4488
|
groups: t,
|
|
4489
4489
|
data: r,
|
|
4490
4490
|
size: n = "md",
|
|
4491
4491
|
className: s
|
|
4492
4492
|
}) => {
|
|
4493
|
-
const a = (
|
|
4494
|
-
if (!
|
|
4493
|
+
const a = (f) => {
|
|
4494
|
+
if (!f) return "-";
|
|
4495
4495
|
try {
|
|
4496
|
-
return new Date(
|
|
4496
|
+
return new Date(f).toLocaleDateString("nl-NL", {
|
|
4497
4497
|
year: "numeric",
|
|
4498
4498
|
month: "long",
|
|
4499
4499
|
day: "numeric"
|
|
4500
4500
|
});
|
|
4501
4501
|
} catch {
|
|
4502
|
-
return String(
|
|
4502
|
+
return String(f);
|
|
4503
4503
|
}
|
|
4504
|
-
}, o = (
|
|
4505
|
-
if (!
|
|
4506
|
-
const
|
|
4507
|
-
return
|
|
4504
|
+
}, o = (f) => f ? "Ja" : "Nee", l = (f, h) => {
|
|
4505
|
+
if (!h) return String(f || "-");
|
|
4506
|
+
const b = h.find((p) => p.value === f);
|
|
4507
|
+
return b ? b.label : String(f || "-");
|
|
4508
4508
|
}, u = ue(
|
|
4509
|
-
(
|
|
4510
|
-
const
|
|
4511
|
-
if (
|
|
4512
|
-
const p =
|
|
4509
|
+
(f) => {
|
|
4510
|
+
const h = Ir(r, f.name);
|
|
4511
|
+
if (f.type === "array") {
|
|
4512
|
+
const p = h;
|
|
4513
4513
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
4514
4514
|
de,
|
|
4515
4515
|
{
|
|
@@ -4518,7 +4518,7 @@ const In = ({
|
|
|
4518
4518
|
className: "text-text-muted",
|
|
4519
4519
|
children: "Geen items"
|
|
4520
4520
|
}
|
|
4521
|
-
) : /* @__PURE__ */ e("div", { className: "space-y-3", children: p.map((
|
|
4521
|
+
) : /* @__PURE__ */ e("div", { className: "space-y-3", children: p.map((C, g) => /* @__PURE__ */ c(
|
|
4522
4522
|
"div",
|
|
4523
4523
|
{
|
|
4524
4524
|
className: "p-4 border border-border rounded-xl space-y-3",
|
|
@@ -4531,53 +4531,53 @@ const In = ({
|
|
|
4531
4531
|
weight: "medium",
|
|
4532
4532
|
className: "text-text-muted",
|
|
4533
4533
|
children: [
|
|
4534
|
-
|
|
4534
|
+
f.label,
|
|
4535
4535
|
" ",
|
|
4536
4536
|
g + 1
|
|
4537
4537
|
]
|
|
4538
4538
|
}
|
|
4539
4539
|
) }),
|
|
4540
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children:
|
|
4541
|
-
const
|
|
4542
|
-
let
|
|
4543
|
-
switch (
|
|
4540
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: f.arrayFields?.map((x) => {
|
|
4541
|
+
const _ = C?.[x.name];
|
|
4542
|
+
let E = "-";
|
|
4543
|
+
switch (x.type) {
|
|
4544
4544
|
case "text":
|
|
4545
4545
|
case "email":
|
|
4546
4546
|
case "number":
|
|
4547
4547
|
case "tel":
|
|
4548
4548
|
case "url":
|
|
4549
4549
|
case "textarea":
|
|
4550
|
-
|
|
4550
|
+
E = _ || "-";
|
|
4551
4551
|
break;
|
|
4552
4552
|
case "select":
|
|
4553
4553
|
case "radio":
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4554
|
+
E = l(
|
|
4555
|
+
_,
|
|
4556
|
+
x.options
|
|
4557
4557
|
);
|
|
4558
4558
|
break;
|
|
4559
4559
|
case "checkbox":
|
|
4560
|
-
|
|
4560
|
+
E = o(_);
|
|
4561
4561
|
break;
|
|
4562
4562
|
case "date":
|
|
4563
|
-
|
|
4563
|
+
E = a(_);
|
|
4564
4564
|
break;
|
|
4565
4565
|
case "custom":
|
|
4566
|
-
|
|
4567
|
-
value:
|
|
4566
|
+
E = x.customComponent?.({
|
|
4567
|
+
value: _
|
|
4568
4568
|
});
|
|
4569
4569
|
break;
|
|
4570
4570
|
default:
|
|
4571
|
-
|
|
4571
|
+
E = String(_ || "-");
|
|
4572
4572
|
}
|
|
4573
|
-
return
|
|
4573
|
+
return x.format && (E = x.format(_, C)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4574
4574
|
/* @__PURE__ */ e(
|
|
4575
4575
|
de,
|
|
4576
4576
|
{
|
|
4577
4577
|
variant: "label",
|
|
4578
4578
|
size: "xs",
|
|
4579
4579
|
className: "text-text-muted",
|
|
4580
|
-
children:
|
|
4580
|
+
children: x.label
|
|
4581
4581
|
}
|
|
4582
4582
|
),
|
|
4583
4583
|
/* @__PURE__ */ e(
|
|
@@ -4586,20 +4586,20 @@ const In = ({
|
|
|
4586
4586
|
variant: "body",
|
|
4587
4587
|
size: "sm",
|
|
4588
4588
|
className: "text-text",
|
|
4589
|
-
children:
|
|
4589
|
+
children: E
|
|
4590
4590
|
}
|
|
4591
4591
|
)
|
|
4592
|
-
] },
|
|
4592
|
+
] }, x.name);
|
|
4593
4593
|
}) })
|
|
4594
4594
|
]
|
|
4595
4595
|
},
|
|
4596
4596
|
g
|
|
4597
4597
|
)) });
|
|
4598
4598
|
}
|
|
4599
|
-
if (
|
|
4600
|
-
return
|
|
4601
|
-
if (
|
|
4602
|
-
const p =
|
|
4599
|
+
if (f.type === "custom" && f.customComponent)
|
|
4600
|
+
return f.customComponent({ value: h });
|
|
4601
|
+
if (f.format) {
|
|
4602
|
+
const p = f.format(h, r);
|
|
4603
4603
|
return /* @__PURE__ */ e(
|
|
4604
4604
|
de,
|
|
4605
4605
|
{
|
|
@@ -4610,31 +4610,31 @@ const In = ({
|
|
|
4610
4610
|
}
|
|
4611
4611
|
);
|
|
4612
4612
|
}
|
|
4613
|
-
let
|
|
4614
|
-
switch (
|
|
4613
|
+
let b = "-";
|
|
4614
|
+
switch (f.type) {
|
|
4615
4615
|
case "text":
|
|
4616
4616
|
case "email":
|
|
4617
4617
|
case "password":
|
|
4618
4618
|
case "number":
|
|
4619
4619
|
case "tel":
|
|
4620
4620
|
case "url":
|
|
4621
|
-
|
|
4621
|
+
b = h ? String(h) : "-";
|
|
4622
4622
|
break;
|
|
4623
4623
|
case "textarea":
|
|
4624
|
-
|
|
4624
|
+
b = h ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(h || "-") }) : "-";
|
|
4625
4625
|
break;
|
|
4626
4626
|
case "select":
|
|
4627
4627
|
case "radio":
|
|
4628
|
-
|
|
4628
|
+
b = l(h, f.options);
|
|
4629
4629
|
break;
|
|
4630
4630
|
case "checkbox":
|
|
4631
|
-
|
|
4631
|
+
b = o(h);
|
|
4632
4632
|
break;
|
|
4633
4633
|
case "date":
|
|
4634
|
-
|
|
4634
|
+
b = a(h);
|
|
4635
4635
|
break;
|
|
4636
4636
|
default:
|
|
4637
|
-
|
|
4637
|
+
b = h ? String(h) : "-";
|
|
4638
4638
|
}
|
|
4639
4639
|
return /* @__PURE__ */ e(
|
|
4640
4640
|
de,
|
|
@@ -4642,30 +4642,30 @@ const In = ({
|
|
|
4642
4642
|
variant: "body",
|
|
4643
4643
|
size: "sm",
|
|
4644
4644
|
className: "text-text",
|
|
4645
|
-
children:
|
|
4645
|
+
children: b
|
|
4646
4646
|
}
|
|
4647
4647
|
);
|
|
4648
4648
|
},
|
|
4649
4649
|
[r]
|
|
4650
4650
|
), m = ue(
|
|
4651
|
-
(
|
|
4652
|
-
if (
|
|
4651
|
+
(f) => {
|
|
4652
|
+
if (f.conditional && !f.conditional(r))
|
|
4653
4653
|
return null;
|
|
4654
|
-
const
|
|
4655
|
-
if (
|
|
4656
|
-
const
|
|
4654
|
+
const h = f.items.filter((p) => !(p.hidden || p.conditional && !p.conditional(r)));
|
|
4655
|
+
if (h.length === 0) return null;
|
|
4656
|
+
const b = d(
|
|
4657
4657
|
"space-y-4",
|
|
4658
4658
|
{
|
|
4659
|
-
"grid gap-4":
|
|
4660
|
-
"flex flex-wrap gap-4":
|
|
4659
|
+
"grid gap-4": f.layout === "grid",
|
|
4660
|
+
"flex flex-wrap gap-4": f.layout === "flex"
|
|
4661
4661
|
},
|
|
4662
|
-
|
|
4663
|
-
"grid-cols-1": !
|
|
4664
|
-
"grid-cols-2":
|
|
4665
|
-
"grid-cols-3":
|
|
4666
|
-
"grid-cols-4":
|
|
4662
|
+
f.layout === "grid" && {
|
|
4663
|
+
"grid-cols-1": !f.columns || f.columns === 1,
|
|
4664
|
+
"grid-cols-2": f.columns === 2,
|
|
4665
|
+
"grid-cols-3": f.columns === 3,
|
|
4666
|
+
"grid-cols-4": f.columns === 4
|
|
4667
4667
|
},
|
|
4668
|
-
|
|
4668
|
+
f.className
|
|
4669
4669
|
);
|
|
4670
4670
|
return /* @__PURE__ */ c(
|
|
4671
4671
|
"div",
|
|
@@ -4680,20 +4680,20 @@ const In = ({
|
|
|
4680
4680
|
size: "lg",
|
|
4681
4681
|
weight: "semibold",
|
|
4682
4682
|
className: "text-text",
|
|
4683
|
-
children:
|
|
4683
|
+
children: f.title
|
|
4684
4684
|
}
|
|
4685
4685
|
),
|
|
4686
|
-
|
|
4686
|
+
f.description && /* @__PURE__ */ e(
|
|
4687
4687
|
de,
|
|
4688
4688
|
{
|
|
4689
4689
|
variant: "body",
|
|
4690
4690
|
size: "sm",
|
|
4691
4691
|
className: "text-text-muted mt-1",
|
|
4692
|
-
children:
|
|
4692
|
+
children: f.description
|
|
4693
4693
|
}
|
|
4694
4694
|
)
|
|
4695
4695
|
] }),
|
|
4696
|
-
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className:
|
|
4696
|
+
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: h.map((p) => /* @__PURE__ */ c(
|
|
4697
4697
|
"div",
|
|
4698
4698
|
{
|
|
4699
4699
|
className: "space-y-1",
|
|
@@ -4718,11 +4718,11 @@ const In = ({
|
|
|
4718
4718
|
)) }) })
|
|
4719
4719
|
]
|
|
4720
4720
|
},
|
|
4721
|
-
|
|
4721
|
+
f.id
|
|
4722
4722
|
);
|
|
4723
4723
|
},
|
|
4724
4724
|
[r, u]
|
|
4725
|
-
),
|
|
4725
|
+
), N = d(
|
|
4726
4726
|
"space-y-6",
|
|
4727
4727
|
{
|
|
4728
4728
|
"max-w-md": n === "sm",
|
|
@@ -4732,7 +4732,7 @@ const In = ({
|
|
|
4732
4732
|
},
|
|
4733
4733
|
s
|
|
4734
4734
|
);
|
|
4735
|
-
return /* @__PURE__ */ e("div", { className:
|
|
4735
|
+
return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(m) }) });
|
|
4736
4736
|
}, qe = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
4737
4737
|
const a = !!(t.children && t.children.length > 0), o = r ? r(t.path) : !1;
|
|
4738
4738
|
if (a)
|
|
@@ -4749,7 +4749,7 @@ const In = ({
|
|
|
4749
4749
|
]
|
|
4750
4750
|
}
|
|
4751
4751
|
),
|
|
4752
|
-
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-0.5", children: t.children?.map((m,
|
|
4752
|
+
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-0.5", children: t.children?.map((m, N) => /* @__PURE__ */ e(
|
|
4753
4753
|
qe,
|
|
4754
4754
|
{
|
|
4755
4755
|
item: m,
|
|
@@ -4757,7 +4757,7 @@ const In = ({
|
|
|
4757
4757
|
onClick: n,
|
|
4758
4758
|
depth: s + 1
|
|
4759
4759
|
},
|
|
4760
|
-
|
|
4760
|
+
N
|
|
4761
4761
|
)) })
|
|
4762
4762
|
] });
|
|
4763
4763
|
const l = t.action, u = l?.visibility !== "always";
|
|
@@ -4813,7 +4813,7 @@ const In = ({
|
|
|
4813
4813
|
]
|
|
4814
4814
|
}
|
|
4815
4815
|
) });
|
|
4816
|
-
},
|
|
4816
|
+
}, On = ({
|
|
4817
4817
|
title: t,
|
|
4818
4818
|
actionIcons: r,
|
|
4819
4819
|
items: n,
|
|
@@ -4873,11 +4873,11 @@ const In = ({
|
|
|
4873
4873
|
info: "text-info-fg",
|
|
4874
4874
|
neutral: "text-text",
|
|
4875
4875
|
current: "text-current"
|
|
4876
|
-
},
|
|
4876
|
+
}, Fr = {
|
|
4877
4877
|
left: "text-left",
|
|
4878
4878
|
center: "text-center",
|
|
4879
4879
|
right: "text-right"
|
|
4880
|
-
},
|
|
4880
|
+
}, Fn = ({
|
|
4881
4881
|
level: t = 1,
|
|
4882
4882
|
size: r,
|
|
4883
4883
|
weight: n = "semibold",
|
|
@@ -4888,18 +4888,18 @@ const In = ({
|
|
|
4888
4888
|
children: u,
|
|
4889
4889
|
...m
|
|
4890
4890
|
}) => {
|
|
4891
|
-
const
|
|
4891
|
+
const N = `h${t}`, f = d(
|
|
4892
4892
|
"font-sans text-pretty",
|
|
4893
|
-
jr[r ||
|
|
4893
|
+
jr[r || Rr(t)],
|
|
4894
4894
|
Pr[n],
|
|
4895
4895
|
Or[s],
|
|
4896
|
-
|
|
4896
|
+
Fr[a],
|
|
4897
4897
|
o && "truncate",
|
|
4898
4898
|
l
|
|
4899
4899
|
);
|
|
4900
|
-
return /* @__PURE__ */ e(
|
|
4900
|
+
return /* @__PURE__ */ e(N, { className: f, ...m, children: u });
|
|
4901
4901
|
};
|
|
4902
|
-
function
|
|
4902
|
+
function Rr(t) {
|
|
4903
4903
|
return {
|
|
4904
4904
|
1: "2xl",
|
|
4905
4905
|
2: "xl",
|
|
@@ -4909,7 +4909,7 @@ function Fr(t) {
|
|
|
4909
4909
|
6: "md"
|
|
4910
4910
|
}[t] || "md";
|
|
4911
4911
|
}
|
|
4912
|
-
const
|
|
4912
|
+
const Rn = ({
|
|
4913
4913
|
commands: t,
|
|
4914
4914
|
isOpen: r,
|
|
4915
4915
|
onClose: n,
|
|
@@ -4917,44 +4917,44 @@ const On = ({
|
|
|
4917
4917
|
initialCommandPath: a,
|
|
4918
4918
|
initialActiveIndex: o
|
|
4919
4919
|
}) => {
|
|
4920
|
-
const [l, u] =
|
|
4921
|
-
(
|
|
4920
|
+
const [l, u] = R(""), [m, N] = R(a || []), [f, h] = R(o || 0), b = se(null), p = se(null), g = (m.length ? t.find((x) => x.id === m[0])?.subCommands || [] : t).filter(
|
|
4921
|
+
(x) => x.label.toLowerCase().includes(l.toLowerCase())
|
|
4922
4922
|
);
|
|
4923
4923
|
return Q(() => {
|
|
4924
|
-
r || (u(""),
|
|
4924
|
+
r || (u(""), N(a || []), h(o || 0));
|
|
4925
4925
|
}, [r]), Q(() => {
|
|
4926
|
-
const
|
|
4926
|
+
const x = (_) => {
|
|
4927
4927
|
if (r) {
|
|
4928
|
-
if (
|
|
4928
|
+
if (_.key === "Escape")
|
|
4929
4929
|
n();
|
|
4930
|
-
else if (
|
|
4931
|
-
|
|
4932
|
-
(
|
|
4930
|
+
else if (_.key === "ArrowUp")
|
|
4931
|
+
h(
|
|
4932
|
+
(E) => E > 0 ? E - 1 : g.length - 1
|
|
4933
4933
|
);
|
|
4934
|
-
else if (
|
|
4935
|
-
|
|
4936
|
-
(
|
|
4934
|
+
else if (_.key === "ArrowDown")
|
|
4935
|
+
h(
|
|
4936
|
+
(E) => E < g.length - 1 ? E + 1 : 0
|
|
4937
4937
|
);
|
|
4938
|
-
else if (
|
|
4939
|
-
const
|
|
4940
|
-
|
|
4938
|
+
else if (_.key === "Enter") {
|
|
4939
|
+
const E = g[f];
|
|
4940
|
+
E && (E.subCommands ? (N([...m, E.id]), h(0)) : E.action && (E.action(), n()));
|
|
4941
4941
|
}
|
|
4942
4942
|
}
|
|
4943
4943
|
};
|
|
4944
|
-
return document.addEventListener("keydown",
|
|
4945
|
-
}, [r, n, g,
|
|
4946
|
-
const
|
|
4947
|
-
|
|
4944
|
+
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
4945
|
+
}, [r, n, g, f, m]), Q(() => {
|
|
4946
|
+
const x = (_) => {
|
|
4947
|
+
b.current && !b.current.contains(_.target) && n();
|
|
4948
4948
|
};
|
|
4949
|
-
return r && document.addEventListener("mousedown",
|
|
4949
|
+
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
4950
4950
|
}, [r, n]), Q(() => {
|
|
4951
4951
|
if (!r) return;
|
|
4952
|
-
p.current?.querySelector(`[data-index="${
|
|
4953
|
-
}, [
|
|
4952
|
+
p.current?.querySelector(`[data-index="${f}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4953
|
+
}, [f, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
|
|
4954
4954
|
"div",
|
|
4955
4955
|
{
|
|
4956
4956
|
className: "flex flex-col w-full max-w-lg max-h-dialog p-2 mx-auto rounded-lg border border-border shadow-modal bg-surface",
|
|
4957
|
-
ref:
|
|
4957
|
+
ref: b,
|
|
4958
4958
|
children: [
|
|
4959
4959
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
|
|
4960
4960
|
/* @__PURE__ */ e(Se, { className: "w-4 h-4 text-text-muted shrink-0" }),
|
|
@@ -4965,7 +4965,7 @@ const On = ({
|
|
|
4965
4965
|
autoFocus: !0,
|
|
4966
4966
|
placeholder: s?.searchPlaceholder || "Search commands...",
|
|
4967
4967
|
value: l,
|
|
4968
|
-
onChange: (
|
|
4968
|
+
onChange: (x) => u(x.target.value),
|
|
4969
4969
|
className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
|
|
4970
4970
|
}
|
|
4971
4971
|
)
|
|
@@ -4977,22 +4977,22 @@ const On = ({
|
|
|
4977
4977
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
4978
4978
|
children: [
|
|
4979
4979
|
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
4980
|
-
g.map((
|
|
4980
|
+
g.map((x, _) => /* @__PURE__ */ c(
|
|
4981
4981
|
"div",
|
|
4982
4982
|
{
|
|
4983
|
-
"data-index":
|
|
4984
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
4983
|
+
"data-index": _,
|
|
4984
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${_ === f ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4985
4985
|
onClick: () => {
|
|
4986
|
-
|
|
4986
|
+
x.subCommands ? (N([...m, x.id]), h(0)) : x.action && (x.action(), n());
|
|
4987
4987
|
},
|
|
4988
|
-
onMouseEnter: () =>
|
|
4988
|
+
onMouseEnter: () => h(_),
|
|
4989
4989
|
children: [
|
|
4990
|
-
|
|
4991
|
-
/* @__PURE__ */ e("span", { className: "flex-grow", children:
|
|
4992
|
-
|
|
4990
|
+
x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
|
|
4991
|
+
/* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
|
|
4992
|
+
x.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(Ce, { className: "w-4 h-4" }) })
|
|
4993
4993
|
]
|
|
4994
4994
|
},
|
|
4995
|
-
|
|
4995
|
+
x.id
|
|
4996
4996
|
))
|
|
4997
4997
|
]
|
|
4998
4998
|
}
|
|
@@ -5014,7 +5014,7 @@ const On = ({
|
|
|
5014
5014
|
]
|
|
5015
5015
|
}
|
|
5016
5016
|
) }) : null;
|
|
5017
|
-
},
|
|
5017
|
+
}, Br = {
|
|
5018
5018
|
none: "p-0",
|
|
5019
5019
|
xs: "p-1",
|
|
5020
5020
|
sm: "p-2",
|
|
@@ -5022,7 +5022,7 @@ const On = ({
|
|
|
5022
5022
|
lg: "p-6",
|
|
5023
5023
|
xl: "p-8",
|
|
5024
5024
|
"2xl": "p-12"
|
|
5025
|
-
},
|
|
5025
|
+
}, Hr = {
|
|
5026
5026
|
none: "m-0",
|
|
5027
5027
|
xs: "m-1",
|
|
5028
5028
|
sm: "m-2",
|
|
@@ -5030,7 +5030,7 @@ const On = ({
|
|
|
5030
5030
|
lg: "m-6",
|
|
5031
5031
|
xl: "m-8",
|
|
5032
5032
|
"2xl": "m-12"
|
|
5033
|
-
},
|
|
5033
|
+
}, Vr = {
|
|
5034
5034
|
none: "",
|
|
5035
5035
|
primary: "bg-accent text-accent-fg",
|
|
5036
5036
|
secondary: "bg-surface-hover",
|
|
@@ -5086,22 +5086,22 @@ const On = ({
|
|
|
5086
5086
|
borderColor: l,
|
|
5087
5087
|
className: u,
|
|
5088
5088
|
children: m,
|
|
5089
|
-
...
|
|
5090
|
-
},
|
|
5089
|
+
...N
|
|
5090
|
+
}, f) => /* @__PURE__ */ e(
|
|
5091
5091
|
"div",
|
|
5092
5092
|
{
|
|
5093
|
-
ref:
|
|
5093
|
+
ref: f,
|
|
5094
5094
|
className: d(
|
|
5095
|
-
t &&
|
|
5096
|
-
r &&
|
|
5097
|
-
n &&
|
|
5095
|
+
t && Br[t],
|
|
5096
|
+
r && Hr[r],
|
|
5097
|
+
n && Vr[n],
|
|
5098
5098
|
s && qr[s],
|
|
5099
5099
|
a && Ur[a],
|
|
5100
5100
|
o && Wr[o],
|
|
5101
5101
|
l && Kr[l],
|
|
5102
5102
|
u
|
|
5103
5103
|
),
|
|
5104
|
-
...
|
|
5104
|
+
...N,
|
|
5105
5105
|
children: m
|
|
5106
5106
|
}
|
|
5107
5107
|
)
|
|
@@ -5122,55 +5122,59 @@ const Bn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5122
5122
|
]
|
|
5123
5123
|
}
|
|
5124
5124
|
);
|
|
5125
|
-
function
|
|
5125
|
+
function Hn({
|
|
5126
5126
|
identifier: t,
|
|
5127
5127
|
resourceLoader: r,
|
|
5128
5128
|
framework: n = "react",
|
|
5129
5129
|
fallback: s,
|
|
5130
|
-
|
|
5131
|
-
|
|
5130
|
+
errorFallback: a,
|
|
5131
|
+
componentProps: o,
|
|
5132
|
+
className: l
|
|
5132
5133
|
}) {
|
|
5133
|
-
const
|
|
5134
|
-
|
|
5134
|
+
const u = se(null), [m, N] = R(!0), [f, h] = R(!1), [b, p] = R(null), C = se(null);
|
|
5135
|
+
se(null);
|
|
5136
|
+
const g = se(r);
|
|
5137
|
+
return g.current = r, Q(() => {
|
|
5135
5138
|
let x = !0;
|
|
5136
5139
|
return (async () => {
|
|
5137
|
-
|
|
5140
|
+
N(!0), h(!1), p(null);
|
|
5138
5141
|
try {
|
|
5139
|
-
const
|
|
5142
|
+
const E = await g.current();
|
|
5140
5143
|
if (!x) return;
|
|
5141
|
-
const
|
|
5142
|
-
|
|
5143
|
-
} catch (
|
|
5144
|
-
console.error(`[FederatedResource] Load failed: ${t}`,
|
|
5144
|
+
const W = E.component || E.default || E;
|
|
5145
|
+
p(n === "react" ? () => W : () => E);
|
|
5146
|
+
} catch (E) {
|
|
5147
|
+
console.error(`[FederatedResource] Load failed: ${t}`, E), x && h(!0);
|
|
5145
5148
|
} finally {
|
|
5146
|
-
x &&
|
|
5149
|
+
x && N(!1);
|
|
5147
5150
|
}
|
|
5148
5151
|
})(), () => {
|
|
5149
5152
|
x = !1;
|
|
5150
5153
|
};
|
|
5151
|
-
}, [t,
|
|
5152
|
-
if (
|
|
5153
|
-
const x =
|
|
5154
|
+
}, [t, n]), Q(() => {
|
|
5155
|
+
if (m || !b || n === "react") return;
|
|
5156
|
+
const x = u.current;
|
|
5154
5157
|
if (x) {
|
|
5155
5158
|
if (n === "svelte") {
|
|
5156
|
-
const
|
|
5157
|
-
return
|
|
5159
|
+
const _ = b.default || b, E = new _({ target: x, props: o || {} });
|
|
5160
|
+
return C.current = E, () => E.$destroy();
|
|
5158
5161
|
}
|
|
5159
|
-
if (
|
|
5160
|
-
const
|
|
5162
|
+
if (b.mount) {
|
|
5163
|
+
const _ = b.mount({ container: x, props: o || {} });
|
|
5161
5164
|
return () => {
|
|
5162
|
-
typeof
|
|
5165
|
+
typeof _ == "function" ? _() : b.unmount?.(x);
|
|
5163
5166
|
};
|
|
5164
5167
|
}
|
|
5165
5168
|
}
|
|
5166
|
-
}, [
|
|
5167
|
-
n === "svelte" &&
|
|
5168
|
-
}, [
|
|
5169
|
-
|
|
5170
|
-
|
|
5169
|
+
}, [b, n, m]), Q(() => {
|
|
5170
|
+
n === "svelte" && C.current && C.current.$set?.(o);
|
|
5171
|
+
}, [o, n]), /* @__PURE__ */ c("div", { ref: u, className: l, style: { display: "contents" }, children: [
|
|
5172
|
+
m && s,
|
|
5173
|
+
!m && f && a,
|
|
5174
|
+
n === "react" && !f && b && /* @__PURE__ */ e(b, { ...o })
|
|
5171
5175
|
] });
|
|
5172
5176
|
}
|
|
5173
|
-
class
|
|
5177
|
+
class Vn extends xt {
|
|
5174
5178
|
constructor() {
|
|
5175
5179
|
super(...arguments), this.state = {
|
|
5176
5180
|
hasError: !1,
|
|
@@ -5199,67 +5203,69 @@ class Rn extends xt {
|
|
|
5199
5203
|
}
|
|
5200
5204
|
}
|
|
5201
5205
|
export {
|
|
5202
|
-
|
|
5206
|
+
kn as AssistantCard,
|
|
5203
5207
|
Er as Avatar,
|
|
5204
|
-
|
|
5205
|
-
|
|
5208
|
+
Cn as AvatarStack,
|
|
5209
|
+
bn as Badge,
|
|
5206
5210
|
Ue as Box,
|
|
5207
5211
|
ne as Button,
|
|
5208
5212
|
ln as ButtonGroup,
|
|
5209
5213
|
Bn as Card,
|
|
5210
|
-
|
|
5214
|
+
Sn as ChannelBadge,
|
|
5211
5215
|
pe as Checkbox,
|
|
5212
|
-
|
|
5213
|
-
|
|
5216
|
+
Rn as CommandPalette,
|
|
5217
|
+
xn as ConfirmDialog,
|
|
5214
5218
|
Wt as ContentLoading,
|
|
5215
5219
|
$e as DatePicker,
|
|
5216
5220
|
Kt as Dropdown,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5221
|
+
pn as EmptyState,
|
|
5222
|
+
Vn as ErrorBoundary,
|
|
5223
|
+
Hn as FederatedResource,
|
|
5220
5224
|
on as FilterChip,
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5225
|
+
Rt as FolderSelect,
|
|
5226
|
+
hn as Form,
|
|
5227
|
+
Fn as Heading,
|
|
5224
5228
|
Y as Icon,
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5229
|
+
zn as Image,
|
|
5230
|
+
gn as Kbd,
|
|
5231
|
+
$n as KpiCard,
|
|
5228
5232
|
cn as Link,
|
|
5229
|
-
|
|
5233
|
+
En as List,
|
|
5230
5234
|
nn as MeetingGrid,
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
+
Mn as MessageBubble,
|
|
5236
|
+
Ve as Modal,
|
|
5237
|
+
Dn as PageHeader,
|
|
5238
|
+
Tn as PageToolbar,
|
|
5235
5239
|
sn as ParticipantTile,
|
|
5236
5240
|
$t as Popover,
|
|
5237
|
-
|
|
5238
|
-
|
|
5241
|
+
vn as ProgressBar,
|
|
5242
|
+
_n as RichText,
|
|
5239
5243
|
qt as SearchableTextField,
|
|
5240
|
-
|
|
5244
|
+
An as SectionDivider,
|
|
5241
5245
|
dn as SegmentedToggle,
|
|
5242
5246
|
Ne as Select,
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5247
|
+
Ln as SettingsRow,
|
|
5248
|
+
In as SettingsSection,
|
|
5249
|
+
On as SidebarMenu,
|
|
5250
|
+
jn as SourceChip,
|
|
5251
|
+
yn as Spinner,
|
|
5252
|
+
Re as SplitButton,
|
|
5253
|
+
Nn as StatusDot,
|
|
5254
|
+
wn as StepIndicator,
|
|
5251
5255
|
ur as StorageInput,
|
|
5252
5256
|
Ut as Switch,
|
|
5253
|
-
|
|
5257
|
+
fn as TabBar,
|
|
5254
5258
|
je as Table,
|
|
5255
5259
|
nr as Tabs,
|
|
5256
5260
|
de as Text,
|
|
5257
5261
|
De as TextArea,
|
|
5258
5262
|
be as TextField,
|
|
5259
5263
|
an as VideoSurface,
|
|
5260
|
-
|
|
5264
|
+
Pn as View,
|
|
5261
5265
|
d as cn,
|
|
5262
5266
|
rn as createSizes,
|
|
5263
|
-
tn as createVariants
|
|
5267
|
+
tn as createVariants,
|
|
5268
|
+
un as dateFilterHandler,
|
|
5269
|
+
mn as selectFilterHandler
|
|
5264
5270
|
};
|
|
5265
5271
|
//# sourceMappingURL=index.js.map
|