@opencxh/ui-kit 3.112.1 → 3.112.2
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +879 -877
- package/dist/index.js.map +1 -1
- package/dist/src/content/PageHeader.d.ts +3 -2
- package/dist/src/input/Checkbox.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { clsx as
|
|
1
|
+
import { clsx as Ue } from "clsx";
|
|
2
2
|
import { jsxs as i, jsx as e, Fragment as fe } from "react/jsx-runtime";
|
|
3
3
|
import { VideoOff as We, User as Ke, MicOff as _e, Mic as Ge, X as ve, ChevronDown as be, ExternalLink as Je, Calendar as Ye, ChevronLeft as Pe, ChevronRight as ye, ChevronDownIcon as Xe, Loader2 as Ze, Search as Ne, Check as Me, ChevronUp as Qe, ChevronsLeft as et, ChevronsRight as tt, FileText as we, HardDrive as $e, ArrowLeft as ze, FolderPlus as rt, Upload as nt, Folder as De, Trash2 as st, Plus as at, Sparkles as lt, ImageOff as ot, Pencil as ct, ArrowUpRight as it } from "lucide-react";
|
|
4
4
|
import le, { useRef as se, useEffect as Y, forwardRef as de, useState as R, useLayoutEffect as dt, useMemo as me, useCallback as ce, createContext as ut, Component as mt } from "react";
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function u(...t) {
|
|
6
|
+
return Ue(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function qr(t) {
|
|
9
9
|
return (r, n) => t[r]?.[n] || "";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function Ur(t) {
|
|
12
12
|
return (r) => t[r] || "";
|
|
13
13
|
}
|
|
14
14
|
function Wr({ tiles: t, pinned: r, className: n }) {
|
|
15
15
|
if (r)
|
|
16
|
-
return /* @__PURE__ */ i("div", { className:
|
|
16
|
+
return /* @__PURE__ */ i("div", { className: u("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
|
|
17
17
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
|
|
18
18
|
t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-w-40 md:min-w-0", children: a }, l)) })
|
|
19
19
|
] });
|
|
20
20
|
const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
21
|
-
return /* @__PURE__ */ e("div", { className:
|
|
21
|
+
return /* @__PURE__ */ e("div", { className: u("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
|
|
22
22
|
}
|
|
23
23
|
function Kr({
|
|
24
24
|
name: t,
|
|
@@ -33,7 +33,7 @@ function Kr({
|
|
|
33
33
|
return /* @__PURE__ */ i(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
className:
|
|
36
|
+
className: u(
|
|
37
37
|
"relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
|
|
38
38
|
f ? "h-full w-full" : "aspect-video",
|
|
39
39
|
s && "ring-2 ring-speaking",
|
|
@@ -61,7 +61,7 @@ function _r({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
ref: a,
|
|
64
|
-
className:
|
|
64
|
+
className: u(
|
|
65
65
|
"w-full h-full bg-video-surface-strong overflow-hidden",
|
|
66
66
|
n && "[&>*]:scale-x-[-1]",
|
|
67
67
|
s
|
|
@@ -108,16 +108,16 @@ const ft = {
|
|
|
108
108
|
shape: f = "default",
|
|
109
109
|
className: p,
|
|
110
110
|
children: N,
|
|
111
|
-
disabled:
|
|
112
|
-
...
|
|
113
|
-
},
|
|
114
|
-
const
|
|
111
|
+
disabled: x,
|
|
112
|
+
...d
|
|
113
|
+
}, h) => {
|
|
114
|
+
const y = x || s;
|
|
115
115
|
return /* @__PURE__ */ i(
|
|
116
116
|
"button",
|
|
117
117
|
{
|
|
118
|
-
ref:
|
|
118
|
+
ref: h,
|
|
119
119
|
type: "button",
|
|
120
|
-
className:
|
|
120
|
+
className: u(
|
|
121
121
|
"inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-semibold",
|
|
122
122
|
f === "circle" ? "rounded-full" : "rounded-md",
|
|
123
123
|
"transition-colors duration-fast ease-out",
|
|
@@ -130,9 +130,9 @@ const ft = {
|
|
|
130
130
|
s && "cursor-wait",
|
|
131
131
|
p
|
|
132
132
|
),
|
|
133
|
-
disabled:
|
|
133
|
+
disabled: y,
|
|
134
134
|
"aria-busy": s || void 0,
|
|
135
|
-
...
|
|
135
|
+
...d,
|
|
136
136
|
children: [
|
|
137
137
|
s && /* @__PURE__ */ e(
|
|
138
138
|
"span",
|
|
@@ -158,7 +158,7 @@ const Gr = ({
|
|
|
158
158
|
attached: s = !0,
|
|
159
159
|
className: a
|
|
160
160
|
}) => {
|
|
161
|
-
const l =
|
|
161
|
+
const l = u(
|
|
162
162
|
"inline-flex",
|
|
163
163
|
{
|
|
164
164
|
// Orientation
|
|
@@ -201,7 +201,7 @@ const Gr = ({
|
|
|
201
201
|
"aria-label": c,
|
|
202
202
|
...f
|
|
203
203
|
}) => {
|
|
204
|
-
const p = typeof r == "number" ? r : gt(r), N =
|
|
204
|
+
const p = typeof r == "number" ? r : gt(r), N = u(
|
|
205
205
|
"inline-block shrink-0",
|
|
206
206
|
bt[n],
|
|
207
207
|
s && [
|
|
@@ -209,7 +209,7 @@ const Gr = ({
|
|
|
209
209
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
210
210
|
],
|
|
211
211
|
l
|
|
212
|
-
),
|
|
212
|
+
), x = {
|
|
213
213
|
size: p,
|
|
214
214
|
strokeWidth: 2,
|
|
215
215
|
className: N,
|
|
@@ -218,12 +218,12 @@ const Gr = ({
|
|
|
218
218
|
"aria-hidden": c ? void 0 : !0,
|
|
219
219
|
role: s ? "button" : void 0,
|
|
220
220
|
tabIndex: s ? 0 : void 0,
|
|
221
|
-
onKeyDown: s ? (
|
|
222
|
-
(
|
|
221
|
+
onKeyDown: s ? (d) => {
|
|
222
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), a?.());
|
|
223
223
|
} : void 0,
|
|
224
224
|
...f
|
|
225
225
|
};
|
|
226
|
-
return /* @__PURE__ */ e(t, { ...
|
|
226
|
+
return /* @__PURE__ */ e(t, { ...x });
|
|
227
227
|
};
|
|
228
228
|
function gt(t) {
|
|
229
229
|
return {
|
|
@@ -251,41 +251,41 @@ function Jr({
|
|
|
251
251
|
onClear: f,
|
|
252
252
|
clearLabel: p = "Filter wissen",
|
|
253
253
|
onClick: N,
|
|
254
|
-
title:
|
|
255
|
-
className:
|
|
254
|
+
title: x,
|
|
255
|
+
className: d
|
|
256
256
|
}) {
|
|
257
|
-
const
|
|
257
|
+
const h = l && !!f, y = s === "pill" ? "rounded-full" : "rounded-md", C = u(
|
|
258
258
|
// A button's default cursor is an arrow, so it has to be asked for.
|
|
259
259
|
"inline-flex cursor-pointer select-none items-center text-sm font-semibold",
|
|
260
260
|
a === "sm" ? "h-control-sm" : "h-control-md",
|
|
261
261
|
"transition-colors duration-fast ease-out",
|
|
262
|
-
|
|
262
|
+
y,
|
|
263
263
|
// Picking a value outranks whatever the value happens to mean.
|
|
264
|
-
l ? "bg-accent text-accent-fg" :
|
|
265
|
-
|
|
266
|
-
),
|
|
264
|
+
l ? "bg-accent text-accent-fg" : u("border", pt[n]),
|
|
265
|
+
d
|
|
266
|
+
), g = /* @__PURE__ */ i(fe, { children: [
|
|
267
267
|
r,
|
|
268
268
|
t,
|
|
269
269
|
c && /* @__PURE__ */ e(J, { icon: be, size: "xs" })
|
|
270
|
-
] }),
|
|
270
|
+
] }), v = u(
|
|
271
271
|
"inline-flex items-center gap-1.5 pl-3",
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
y,
|
|
273
|
+
h ? "pr-1.5" : "pr-3",
|
|
274
274
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
275
275
|
);
|
|
276
|
-
return
|
|
277
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: N, className:
|
|
276
|
+
return h ? /* @__PURE__ */ i("span", { className: C, title: x, children: [
|
|
277
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: N, className: v, children: g }),
|
|
278
278
|
/* @__PURE__ */ e(
|
|
279
279
|
"button",
|
|
280
280
|
{
|
|
281
281
|
type: "button",
|
|
282
282
|
"aria-label": p,
|
|
283
283
|
onClick: f,
|
|
284
|
-
className:
|
|
284
|
+
className: u("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", y),
|
|
285
285
|
children: /* @__PURE__ */ e(J, { icon: ve, size: "xs" })
|
|
286
286
|
}
|
|
287
287
|
)
|
|
288
|
-
] }) : /* @__PURE__ */ e("button", { type: "button", title:
|
|
288
|
+
] }) : /* @__PURE__ */ e("button", { type: "button", title: x, onClick: N, className: u(C, v), children: g });
|
|
289
289
|
}
|
|
290
290
|
const vt = {
|
|
291
291
|
xs: "text-xs",
|
|
@@ -322,9 +322,9 @@ const vt = {
|
|
|
322
322
|
href: f,
|
|
323
323
|
target: p,
|
|
324
324
|
rel: N,
|
|
325
|
-
...
|
|
325
|
+
...x
|
|
326
326
|
}) => {
|
|
327
|
-
const
|
|
327
|
+
const d = a || f && (f.startsWith("http") || f.startsWith("mailto:")), h = u(
|
|
328
328
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
329
329
|
"transition-colors duration-fast ease-out",
|
|
330
330
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -338,16 +338,16 @@ const vt = {
|
|
|
338
338
|
],
|
|
339
339
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
340
340
|
l
|
|
341
|
-
),
|
|
342
|
-
...
|
|
341
|
+
), y = {
|
|
342
|
+
...x,
|
|
343
343
|
href: s ? void 0 : f,
|
|
344
|
-
target:
|
|
345
|
-
rel:
|
|
344
|
+
target: d ? "_blank" : p,
|
|
345
|
+
rel: d ? "noopener noreferrer" : N,
|
|
346
346
|
"aria-disabled": s || void 0
|
|
347
347
|
};
|
|
348
|
-
return /* @__PURE__ */ i("a", { className:
|
|
348
|
+
return /* @__PURE__ */ i("a", { className: h, ...y, children: [
|
|
349
349
|
c,
|
|
350
|
-
|
|
350
|
+
d && /* @__PURE__ */ e(Je, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
351
351
|
] });
|
|
352
352
|
}, wt = {
|
|
353
353
|
sm: "h-control-sm px-3 text-sm",
|
|
@@ -366,7 +366,7 @@ function Xr({
|
|
|
366
366
|
{
|
|
367
367
|
role: "tablist",
|
|
368
368
|
"aria-label": l,
|
|
369
|
-
className:
|
|
369
|
+
className: u("inline-flex gap-0.5 rounded-md bg-surface-hover p-0.5", a),
|
|
370
370
|
children: t.map((c) => {
|
|
371
371
|
const f = c.value === r;
|
|
372
372
|
return /* @__PURE__ */ e(
|
|
@@ -376,7 +376,7 @@ function Xr({
|
|
|
376
376
|
"aria-selected": f,
|
|
377
377
|
type: "button",
|
|
378
378
|
onClick: () => n(c.value),
|
|
379
|
-
className:
|
|
379
|
+
className: u(
|
|
380
380
|
"inline-flex items-center justify-center rounded-sm",
|
|
381
381
|
"transition-colors duration-fast ease-out",
|
|
382
382
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -399,53 +399,53 @@ const kt = ({
|
|
|
399
399
|
disabled: a = !1,
|
|
400
400
|
triggerLabel: l
|
|
401
401
|
}) => {
|
|
402
|
-
const [c, f] = R(!1), [p, N] = R({}),
|
|
402
|
+
const [c, f] = R(!1), [p, N] = R({}), x = se(null), d = se(null);
|
|
403
403
|
Y(() => {
|
|
404
404
|
if (!c) return;
|
|
405
|
-
const C = (
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
|
|
405
|
+
const C = (v) => {
|
|
406
|
+
x.current && !x.current.contains(v.target) && f(!1);
|
|
407
|
+
}, g = (v) => {
|
|
408
|
+
v.key === "Escape" && f(!1);
|
|
409
409
|
};
|
|
410
|
-
return document.addEventListener("mousedown", C), document.addEventListener("keydown",
|
|
411
|
-
document.removeEventListener("mousedown", C), document.removeEventListener("keydown",
|
|
410
|
+
return document.addEventListener("mousedown", C), document.addEventListener("keydown", g), () => {
|
|
411
|
+
document.removeEventListener("mousedown", C), document.removeEventListener("keydown", g);
|
|
412
412
|
};
|
|
413
413
|
}, [c]);
|
|
414
|
-
const
|
|
414
|
+
const h = (C) => {
|
|
415
415
|
if (C.stopPropagation(), !a) {
|
|
416
416
|
if (!c) {
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
420
|
-
n.startsWith("bottom") ?
|
|
417
|
+
const g = d.current?.getBoundingClientRect();
|
|
418
|
+
if (g) {
|
|
419
|
+
const $ = {};
|
|
420
|
+
n.startsWith("bottom") ? $.top = g.bottom + 6 : $.bottom = window.innerHeight - g.top + 6, n.endsWith("start") ? $.left = g.left : $.right = window.innerWidth - g.right, N($);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
f((
|
|
423
|
+
f((g) => !g);
|
|
424
424
|
}
|
|
425
|
-
},
|
|
426
|
-
return /* @__PURE__ */ i("div", { ref:
|
|
425
|
+
}, y = () => f(!1);
|
|
426
|
+
return /* @__PURE__ */ i("div", { ref: x, className: "relative inline-flex", children: [
|
|
427
427
|
/* @__PURE__ */ e(
|
|
428
428
|
"button",
|
|
429
429
|
{
|
|
430
|
-
ref:
|
|
430
|
+
ref: d,
|
|
431
431
|
type: "button",
|
|
432
|
-
onClick:
|
|
432
|
+
onClick: h,
|
|
433
433
|
disabled: a,
|
|
434
434
|
"aria-label": l,
|
|
435
435
|
"aria-expanded": c,
|
|
436
|
-
className:
|
|
436
|
+
className: u("inline-flex items-center", a && "cursor-not-allowed opacity-50"),
|
|
437
437
|
children: t
|
|
438
438
|
}
|
|
439
439
|
),
|
|
440
440
|
c && /* @__PURE__ */ e(
|
|
441
441
|
"div",
|
|
442
442
|
{
|
|
443
|
-
className:
|
|
443
|
+
className: u(
|
|
444
444
|
"fixed z-overlay bg-surface rounded-lg shadow-overlay border border-border",
|
|
445
445
|
s
|
|
446
446
|
),
|
|
447
447
|
style: p,
|
|
448
|
-
children: typeof r == "function" ? r(
|
|
448
|
+
children: typeof r == "function" ? r(y) : r
|
|
449
449
|
}
|
|
450
450
|
)
|
|
451
451
|
] });
|
|
@@ -469,7 +469,7 @@ function je({
|
|
|
469
469
|
menuPlacement: p = "bottom-end",
|
|
470
470
|
menuLabel: N = "More options"
|
|
471
471
|
}) {
|
|
472
|
-
const
|
|
472
|
+
const x = c || f, d = l.length > 0;
|
|
473
473
|
return /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-px", children: [
|
|
474
474
|
/* @__PURE__ */ e(
|
|
475
475
|
ee,
|
|
@@ -480,50 +480,50 @@ function je({
|
|
|
480
480
|
disabled: c,
|
|
481
481
|
loading: f,
|
|
482
482
|
leftIcon: a,
|
|
483
|
-
className: d
|
|
483
|
+
className: u(d && "rounded-r-none"),
|
|
484
484
|
children: t
|
|
485
485
|
}
|
|
486
486
|
),
|
|
487
|
-
|
|
487
|
+
d && /* @__PURE__ */ e(
|
|
488
488
|
kt,
|
|
489
489
|
{
|
|
490
490
|
placement: p,
|
|
491
|
-
disabled:
|
|
491
|
+
disabled: x,
|
|
492
492
|
triggerLabel: N,
|
|
493
493
|
className: "min-w-menu py-1",
|
|
494
494
|
trigger: /* @__PURE__ */ e(
|
|
495
495
|
"span",
|
|
496
496
|
{
|
|
497
497
|
"aria-hidden": "true",
|
|
498
|
-
className:
|
|
498
|
+
className: u(
|
|
499
499
|
"inline-flex items-center justify-center rounded-md rounded-l-none",
|
|
500
500
|
"transition-colors duration-fast ease-out",
|
|
501
501
|
Ct[n],
|
|
502
502
|
St[s],
|
|
503
|
-
|
|
503
|
+
x && "cursor-not-allowed opacity-50"
|
|
504
504
|
),
|
|
505
505
|
children: /* @__PURE__ */ e(be, { className: "size-icon-md" })
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
|
-
children: (
|
|
508
|
+
children: (h) => /* @__PURE__ */ e(fe, { children: l.map((y) => /* @__PURE__ */ i(
|
|
509
509
|
"button",
|
|
510
510
|
{
|
|
511
511
|
type: "button",
|
|
512
512
|
onClick: () => {
|
|
513
|
-
|
|
513
|
+
y.onClick(), h();
|
|
514
514
|
},
|
|
515
|
-
className:
|
|
515
|
+
className: u(
|
|
516
516
|
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
|
|
517
517
|
"transition-colors duration-fast ease-out",
|
|
518
518
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
519
|
-
|
|
519
|
+
y.variant === "destructive" ? "text-danger-fg hover:bg-danger-soft" : "text-text hover:bg-surface-hover"
|
|
520
520
|
),
|
|
521
521
|
children: [
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
y.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: y.icon }),
|
|
523
|
+
y.label
|
|
524
524
|
]
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
y.id
|
|
527
527
|
)) })
|
|
528
528
|
}
|
|
529
529
|
)
|
|
@@ -551,51 +551,53 @@ const zt = {
|
|
|
551
551
|
error: n,
|
|
552
552
|
size: s = "md",
|
|
553
553
|
indeterminate: a = !1,
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
554
|
+
shape: l = "square",
|
|
555
|
+
containerClassName: c,
|
|
556
|
+
labelClassName: f,
|
|
557
|
+
className: p,
|
|
558
|
+
id: N,
|
|
559
|
+
...x
|
|
560
|
+
}, d) => {
|
|
561
|
+
const h = le.useId(), y = N || `checkbox-${h}`, C = !!n, g = le.useRef(null), v = le.useCallback(
|
|
562
|
+
($) => {
|
|
563
|
+
g.current = $, typeof d == "function" ? d($) : d && typeof d == "object" && (d.current = $);
|
|
563
564
|
},
|
|
564
|
-
[
|
|
565
|
+
[d]
|
|
565
566
|
);
|
|
566
567
|
return le.useEffect(() => {
|
|
567
|
-
|
|
568
|
-
}, [a]), /* @__PURE__ */ i("div", { className:
|
|
569
|
-
/* @__PURE__ */ i("div", { className:
|
|
568
|
+
g.current && (g.current.indeterminate = a);
|
|
569
|
+
}, [a]), /* @__PURE__ */ i("div", { className: u("flex flex-col", c), children: [
|
|
570
|
+
/* @__PURE__ */ i("div", { className: u("flex items-center gap-3", Et[s]), children: [
|
|
570
571
|
/* @__PURE__ */ e(
|
|
571
572
|
"input",
|
|
572
573
|
{
|
|
573
|
-
ref:
|
|
574
|
-
id:
|
|
574
|
+
ref: v,
|
|
575
|
+
id: y,
|
|
575
576
|
type: "checkbox",
|
|
576
|
-
"aria-invalid":
|
|
577
|
-
className:
|
|
578
|
-
"shrink-0
|
|
577
|
+
"aria-invalid": C || void 0,
|
|
578
|
+
className: u(
|
|
579
|
+
"shrink-0 border bg-surface-input accent-accent",
|
|
580
|
+
l === "circle" ? "rounded-full" : "rounded-sm",
|
|
579
581
|
"transition-colors duration-fast ease-out",
|
|
580
582
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
581
583
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
582
584
|
zt[s],
|
|
583
|
-
|
|
584
|
-
|
|
585
|
+
C ? "border-danger-border" : "border-border-strong",
|
|
586
|
+
p
|
|
585
587
|
),
|
|
586
|
-
...
|
|
588
|
+
...x
|
|
587
589
|
}
|
|
588
590
|
),
|
|
589
591
|
t && /* @__PURE__ */ i("div", { className: "flex-1", children: [
|
|
590
592
|
/* @__PURE__ */ e(
|
|
591
593
|
"label",
|
|
592
594
|
{
|
|
593
|
-
htmlFor:
|
|
594
|
-
className:
|
|
595
|
+
htmlFor: y,
|
|
596
|
+
className: u(
|
|
595
597
|
"cursor-pointer",
|
|
596
|
-
|
|
598
|
+
C ? "text-danger-fg" : "text-text",
|
|
597
599
|
Mt[s],
|
|
598
|
-
|
|
600
|
+
f
|
|
599
601
|
),
|
|
600
602
|
children: t
|
|
601
603
|
}
|
|
@@ -615,8 +617,8 @@ function Ee(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
|
|
|
615
617
|
const f = () => {
|
|
616
618
|
const p = r.current;
|
|
617
619
|
if (!p) return;
|
|
618
|
-
const N = p.getBoundingClientRect(),
|
|
619
|
-
C ? (
|
|
620
|
+
const N = p.getBoundingClientRect(), x = window.innerHeight - N.bottom, d = N.top, h = a.startsWith("top"), y = h ? d < 200 && x > d : x < 200 && d > x, C = h !== y, g = { position: "fixed" };
|
|
621
|
+
C ? (g.bottom = window.innerHeight - N.top + n, g.maxHeight = Math.max(120, d - n * 2)) : (g.top = N.bottom + n, g.maxHeight = Math.max(120, x - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - N.right : g.left = N.left, s && (g.width = N.width), c(g);
|
|
620
622
|
};
|
|
621
623
|
return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
622
624
|
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
@@ -634,28 +636,28 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
634
636
|
minDate: f,
|
|
635
637
|
maxDate: p,
|
|
636
638
|
format: N = "MM/dd/yyyy",
|
|
637
|
-
withTime:
|
|
638
|
-
},
|
|
639
|
-
const [
|
|
639
|
+
withTime: x = !1
|
|
640
|
+
}, d) => {
|
|
641
|
+
const [h, y] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), v = se(null), $ = Ee(h, v);
|
|
640
642
|
Y(() => {
|
|
641
|
-
const b = (
|
|
642
|
-
|
|
643
|
+
const b = (m) => {
|
|
644
|
+
v.current && !v.current.contains(m.target) && y(!1);
|
|
643
645
|
};
|
|
644
|
-
return
|
|
646
|
+
return h && document.addEventListener("mousedown", b), () => {
|
|
645
647
|
document.removeEventListener("mousedown", b);
|
|
646
648
|
};
|
|
647
|
-
}, [
|
|
648
|
-
const
|
|
649
|
+
}, [h]);
|
|
650
|
+
const D = (b) => {
|
|
649
651
|
if (!b) return "";
|
|
650
|
-
const
|
|
651
|
-
return
|
|
652
|
+
const m = b.getDate().toString().padStart(2, "0"), E = (b.getMonth() + 1).toString().padStart(2, "0"), w = b.getFullYear(), P = N === "dd/MM/yyyy" ? `${m}/${E}/${w}` : N === "yyyy-MM-dd" ? `${w}-${E}-${m}` : `${E}/${m}/${w}`;
|
|
653
|
+
return x ? `${P} ${_(b)}` : P;
|
|
652
654
|
}, _ = (b) => `${b.getHours().toString().padStart(2, "0")}:${b.getMinutes().toString().padStart(2, "0")}`, M = (b) => {
|
|
653
|
-
const [
|
|
654
|
-
if (Number.isNaN(
|
|
655
|
+
const [m, E] = b.split(":").map(Number);
|
|
656
|
+
if (Number.isNaN(m) || Number.isNaN(E)) return;
|
|
655
657
|
const w = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
656
|
-
w.setHours(
|
|
657
|
-
},
|
|
658
|
-
const b = C.getFullYear(),
|
|
658
|
+
w.setHours(m, E, 0, 0), r?.(w);
|
|
659
|
+
}, q = () => {
|
|
660
|
+
const b = C.getFullYear(), m = C.getMonth(), E = new Date(b, m, 1), w = new Date(E);
|
|
659
661
|
w.setDate(w.getDate() - E.getDay());
|
|
660
662
|
const P = [], k = new Date(w);
|
|
661
663
|
for (let ae = 0; ae < 42; ae++)
|
|
@@ -663,20 +665,20 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
663
665
|
return P;
|
|
664
666
|
}, V = (b) => {
|
|
665
667
|
if (b.getMonth() === C.getMonth() && !(f && b < f) && !(p && b > p)) {
|
|
666
|
-
if (
|
|
668
|
+
if (x) {
|
|
667
669
|
const E = new Date(b);
|
|
668
670
|
E.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(E);
|
|
669
671
|
return;
|
|
670
672
|
}
|
|
671
|
-
r?.(b),
|
|
673
|
+
r?.(b), y(!1);
|
|
672
674
|
}
|
|
673
675
|
}, I = () => {
|
|
674
|
-
|
|
676
|
+
g(new Date(C.getFullYear(), C.getMonth() - 1, 1));
|
|
675
677
|
}, W = () => {
|
|
676
|
-
|
|
678
|
+
g(new Date(C.getFullYear(), C.getMonth() + 1, 1));
|
|
677
679
|
}, H = () => {
|
|
678
|
-
r?.(null),
|
|
679
|
-
}, X =
|
|
680
|
+
r?.(null), y(!1);
|
|
681
|
+
}, X = u(
|
|
680
682
|
"w-full border border-border rounded-md transition-colors duration-fast",
|
|
681
683
|
"bg-surface text-text",
|
|
682
684
|
"placeholder:text-text-muted",
|
|
@@ -689,7 +691,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
689
691
|
"h-control-md w-full px-3 text-base": l === "full"
|
|
690
692
|
},
|
|
691
693
|
c
|
|
692
|
-
), Z =
|
|
694
|
+
), Z = q(), Q = [
|
|
693
695
|
"January",
|
|
694
696
|
"February",
|
|
695
697
|
"March",
|
|
@@ -703,34 +705,34 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
703
705
|
"November",
|
|
704
706
|
"December"
|
|
705
707
|
];
|
|
706
|
-
return /* @__PURE__ */ i("div", { ref:
|
|
708
|
+
return /* @__PURE__ */ i("div", { ref: v, className: "relative", children: [
|
|
707
709
|
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
708
710
|
/* @__PURE__ */ e(
|
|
709
711
|
"input",
|
|
710
712
|
{
|
|
711
|
-
ref:
|
|
713
|
+
ref: d,
|
|
712
714
|
type: "text",
|
|
713
|
-
value:
|
|
715
|
+
value: D(t ?? null),
|
|
714
716
|
placeholder: n,
|
|
715
717
|
disabled: s,
|
|
716
718
|
required: a,
|
|
717
719
|
readOnly: !0,
|
|
718
|
-
onClick: () => !s &&
|
|
719
|
-
className:
|
|
720
|
+
onClick: () => !s && y(!h),
|
|
721
|
+
className: u(X, "pr-10 cursor-pointer")
|
|
720
722
|
}
|
|
721
723
|
),
|
|
722
724
|
/* @__PURE__ */ e(
|
|
723
725
|
"button",
|
|
724
726
|
{
|
|
725
727
|
type: "button",
|
|
726
|
-
onClick: () => !s &&
|
|
728
|
+
onClick: () => !s && y(!h),
|
|
727
729
|
disabled: s,
|
|
728
730
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
729
731
|
children: /* @__PURE__ */ e($t, {})
|
|
730
732
|
}
|
|
731
733
|
)
|
|
732
734
|
] }),
|
|
733
|
-
|
|
735
|
+
h && /* @__PURE__ */ i("div", { style: $, className: "z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
|
|
734
736
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
|
|
735
737
|
/* @__PURE__ */ e(
|
|
736
738
|
"button",
|
|
@@ -755,14 +757,14 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
755
757
|
)
|
|
756
758
|
] }),
|
|
757
759
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((b) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: b }, b)) }),
|
|
758
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: Z.map((b,
|
|
760
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: Z.map((b, m) => {
|
|
759
761
|
const E = b.getMonth() === C.getMonth(), w = t && b.toDateString() === t.toDateString(), P = b.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), k = !E || f && b < f || p && b > p;
|
|
760
762
|
return /* @__PURE__ */ e(
|
|
761
763
|
"button",
|
|
762
764
|
{
|
|
763
765
|
onClick: () => !k && V(b),
|
|
764
766
|
disabled: k,
|
|
765
|
-
className:
|
|
767
|
+
className: u(
|
|
766
768
|
"w-8 h-8 text-sm rounded transition-colors duration-fast",
|
|
767
769
|
{
|
|
768
770
|
"text-text hover:bg-surface-hover": E && !w && !k,
|
|
@@ -773,10 +775,10 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
773
775
|
),
|
|
774
776
|
children: b.getDate()
|
|
775
777
|
},
|
|
776
|
-
|
|
778
|
+
m
|
|
777
779
|
);
|
|
778
780
|
}) }),
|
|
779
|
-
|
|
781
|
+
x && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
|
|
780
782
|
/* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
|
|
781
783
|
/* @__PURE__ */ e(
|
|
782
784
|
"input",
|
|
@@ -801,7 +803,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
801
803
|
/* @__PURE__ */ e(
|
|
802
804
|
"button",
|
|
803
805
|
{
|
|
804
|
-
onClick: () =>
|
|
806
|
+
onClick: () => y(!1),
|
|
805
807
|
className: "text-sm text-info-fg hover:underline",
|
|
806
808
|
children: "Close"
|
|
807
809
|
}
|
|
@@ -826,85 +828,85 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
826
828
|
containerClassName: f,
|
|
827
829
|
labelClassName: p,
|
|
828
830
|
className: N,
|
|
829
|
-
id:
|
|
830
|
-
searchable:
|
|
831
|
-
multiple:
|
|
832
|
-
value:
|
|
831
|
+
id: x,
|
|
832
|
+
searchable: d,
|
|
833
|
+
multiple: h,
|
|
834
|
+
value: y,
|
|
833
835
|
onChange: C,
|
|
834
|
-
allowCreate:
|
|
835
|
-
onCreateOption:
|
|
836
|
-
|
|
837
|
-
},
|
|
838
|
-
const _ =
|
|
839
|
-
le.useImperativeHandle(
|
|
840
|
-
const S = (
|
|
841
|
-
H.current && !H.current.contains(
|
|
836
|
+
allowCreate: g,
|
|
837
|
+
onCreateOption: v,
|
|
838
|
+
...$
|
|
839
|
+
}, D) => {
|
|
840
|
+
const _ = x || `select-${Math.random().toString(36).substr(2, 9)}`, M = !!n, [q, V] = le.useState(!1), [I, W] = le.useState(""), H = le.useRef(null), X = le.useRef(null), Z = Ee(q, X, { matchWidth: !0 }), [Q, b] = le.useState(l);
|
|
841
|
+
le.useImperativeHandle(D, () => H.current), le.useEffect(() => {
|
|
842
|
+
const S = (A) => {
|
|
843
|
+
H.current && !H.current.contains(A.target) && V(!1);
|
|
842
844
|
};
|
|
843
845
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
844
846
|
}, []);
|
|
845
|
-
const
|
|
846
|
-
(S,
|
|
847
|
-
(L) => ge(L.value) === ge(
|
|
847
|
+
const m = le.useCallback(
|
|
848
|
+
(S, A) => S.some(
|
|
849
|
+
(L) => ge(L.value) === ge(A) || ge(L.label) === ge(A)
|
|
848
850
|
),
|
|
849
851
|
[]
|
|
850
852
|
), E = le.useCallback(
|
|
851
|
-
(S,
|
|
852
|
-
const L = [...S],
|
|
853
|
-
const j = (
|
|
854
|
-
j && (
|
|
853
|
+
(S, A) => {
|
|
854
|
+
const L = [...S], T = (U) => {
|
|
855
|
+
const j = (U ?? "").trim();
|
|
856
|
+
j && (m(L, j) || L.push({ value: j, label: j }));
|
|
855
857
|
};
|
|
856
|
-
return Array.isArray(
|
|
858
|
+
return Array.isArray(A) ? A.forEach(T) : T(A), L;
|
|
857
859
|
},
|
|
858
|
-
[
|
|
860
|
+
[m]
|
|
859
861
|
);
|
|
860
862
|
le.useEffect(() => {
|
|
861
863
|
b((S) => {
|
|
862
|
-
const
|
|
864
|
+
const A = [...l];
|
|
863
865
|
return S.forEach((L) => {
|
|
864
|
-
!
|
|
865
|
-
}), E(
|
|
866
|
+
!m(A, L.value) && !m(A, L.label) && A.push(L);
|
|
867
|
+
}), E(A, y);
|
|
866
868
|
});
|
|
867
|
-
}, [l,
|
|
869
|
+
}, [l, y, E, m]);
|
|
868
870
|
const w = (S) => {
|
|
869
|
-
if (
|
|
870
|
-
const
|
|
871
|
+
if (h) {
|
|
872
|
+
const A = Array.isArray(y) ? y : [], L = A.includes(S) ? A.filter((T) => T !== S) : [...A, S];
|
|
871
873
|
C?.(L);
|
|
872
874
|
} else
|
|
873
875
|
C?.(S), V(!1), W("");
|
|
874
|
-
}, P =
|
|
875
|
-
(S) => Array.isArray(
|
|
876
|
-
) : [], ae =
|
|
876
|
+
}, P = h ? null : Q.find((S) => S.value === y), k = h ? Q.filter(
|
|
877
|
+
(S) => Array.isArray(y) && y.includes(S.value)
|
|
878
|
+
) : [], ae = d && I ? Q.filter(
|
|
877
879
|
(S) => S.label.toLowerCase().includes(I.toLowerCase())
|
|
878
|
-
) : Q, ne = !!
|
|
879
|
-
const
|
|
880
|
-
if (!
|
|
881
|
-
const L =
|
|
882
|
-
value:
|
|
883
|
-
label:
|
|
880
|
+
) : Q, ne = !!g && !!d && !!I.trim() && !m(Q, I), te = (S) => {
|
|
881
|
+
const A = S.trim();
|
|
882
|
+
if (!A) return;
|
|
883
|
+
const L = v?.(A) ?? {
|
|
884
|
+
value: A,
|
|
885
|
+
label: A
|
|
884
886
|
};
|
|
885
|
-
if (
|
|
886
|
-
w(L.value), W(""),
|
|
887
|
+
if (m(Q, L.value) || m(Q, L.label)) {
|
|
888
|
+
w(L.value), W(""), h || V(!1);
|
|
887
889
|
return;
|
|
888
890
|
}
|
|
889
|
-
b((
|
|
890
|
-
}, G = () =>
|
|
891
|
+
b((T) => [...T, L]), w(L.value), W(""), h || V(!1);
|
|
892
|
+
}, G = () => h ? k.length > 0 ? k.map((S) => S.label).join(", ") : c || "Select options" : P?.label || c || "Select an option";
|
|
891
893
|
return /* @__PURE__ */ i(
|
|
892
894
|
"div",
|
|
893
895
|
{
|
|
894
896
|
ref: H,
|
|
895
|
-
className:
|
|
897
|
+
className: u(
|
|
896
898
|
"relative flex flex-col",
|
|
897
899
|
a && "w-full",
|
|
898
900
|
f
|
|
899
901
|
),
|
|
900
|
-
|
|
902
|
+
...$,
|
|
901
903
|
children: [
|
|
902
904
|
t && /* @__PURE__ */ e(
|
|
903
905
|
"label",
|
|
904
906
|
{
|
|
905
907
|
htmlFor: _,
|
|
906
|
-
onClick: () => V(!
|
|
907
|
-
className:
|
|
908
|
+
onClick: () => V(!q),
|
|
909
|
+
className: u(
|
|
908
910
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
909
911
|
M ? "text-danger-fg" : "text-text-muted",
|
|
910
912
|
p
|
|
@@ -919,8 +921,8 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
919
921
|
ref: X,
|
|
920
922
|
type: "button",
|
|
921
923
|
id: _,
|
|
922
|
-
onClick: () => V(!
|
|
923
|
-
className:
|
|
924
|
+
onClick: () => V(!q),
|
|
925
|
+
className: u(
|
|
924
926
|
"flex w-full items-center justify-between gap-2 rounded-md border transition-colors duration-fast text-left",
|
|
925
927
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
926
928
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
@@ -935,17 +937,17 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
935
937
|
Xe,
|
|
936
938
|
{
|
|
937
939
|
size: 16,
|
|
938
|
-
className:
|
|
940
|
+
className: u(
|
|
939
941
|
"shrink-0 opacity-60 transition-transform duration-fast",
|
|
940
|
-
|
|
942
|
+
q && "rotate-180"
|
|
941
943
|
)
|
|
942
944
|
}
|
|
943
945
|
)
|
|
944
946
|
]
|
|
945
947
|
}
|
|
946
948
|
),
|
|
947
|
-
|
|
948
|
-
|
|
949
|
+
q && /* @__PURE__ */ i("div", { style: Z, className: "z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
|
|
950
|
+
d && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
|
|
949
951
|
"input",
|
|
950
952
|
{
|
|
951
953
|
type: "text",
|
|
@@ -955,7 +957,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
955
957
|
onKeyDown: (S) => {
|
|
956
958
|
S.key === "Enter" && ne && (S.preventDefault(), te(I));
|
|
957
959
|
},
|
|
958
|
-
className:
|
|
960
|
+
className: u(
|
|
959
961
|
"w-full px-3 py-2 text-sm rounded-md border",
|
|
960
962
|
"text-text border-border focus-visible:outline-none focus-visible:focus-ring"
|
|
961
963
|
)
|
|
@@ -964,7 +966,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
964
966
|
ne && /* @__PURE__ */ i(
|
|
965
967
|
"div",
|
|
966
968
|
{
|
|
967
|
-
className:
|
|
969
|
+
className: u(
|
|
968
970
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
969
971
|
"text-info-fg hover:bg-surface-hover"
|
|
970
972
|
),
|
|
@@ -977,7 +979,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
977
979
|
}
|
|
978
980
|
),
|
|
979
981
|
/* @__PURE__ */ i("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
|
|
980
|
-
c && !
|
|
982
|
+
c && !h && /* @__PURE__ */ e(
|
|
981
983
|
"li",
|
|
982
984
|
{
|
|
983
985
|
className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
|
|
@@ -988,23 +990,23 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
988
990
|
}
|
|
989
991
|
),
|
|
990
992
|
ae.map((S) => {
|
|
991
|
-
const
|
|
993
|
+
const A = h ? Array.isArray(y) && y.includes(S.value) : y === S.value;
|
|
992
994
|
return /* @__PURE__ */ e(
|
|
993
995
|
"li",
|
|
994
996
|
{
|
|
995
997
|
onClick: () => !S.disabled && w(S.value),
|
|
996
|
-
className:
|
|
998
|
+
className: u(
|
|
997
999
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
998
1000
|
"text-text",
|
|
999
1001
|
S.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1000
|
-
|
|
1002
|
+
A && "bg-accent-soft text-accent font-semibold"
|
|
1001
1003
|
),
|
|
1002
1004
|
children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
1003
|
-
|
|
1005
|
+
h && /* @__PURE__ */ e(
|
|
1004
1006
|
"input",
|
|
1005
1007
|
{
|
|
1006
1008
|
type: "checkbox",
|
|
1007
|
-
checked:
|
|
1009
|
+
checked: A,
|
|
1008
1010
|
readOnly: !0,
|
|
1009
1011
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1010
1012
|
}
|
|
@@ -1021,7 +1023,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
|
|
|
1021
1023
|
(n || r) && /* @__PURE__ */ e(
|
|
1022
1024
|
"p",
|
|
1023
1025
|
{
|
|
1024
|
-
className:
|
|
1026
|
+
className: u(
|
|
1025
1027
|
"mt-1 text-xs",
|
|
1026
1028
|
M ? "text-danger-fg" : "text-text-muted"
|
|
1027
1029
|
),
|
|
@@ -1051,19 +1053,19 @@ const Lt = {
|
|
|
1051
1053
|
loading: f = !1,
|
|
1052
1054
|
containerClassName: p,
|
|
1053
1055
|
labelClassName: N,
|
|
1054
|
-
className:
|
|
1055
|
-
id:
|
|
1056
|
-
...
|
|
1057
|
-
},
|
|
1058
|
-
const C = le.useId(),
|
|
1059
|
-
return /* @__PURE__ */ i("div", { className:
|
|
1056
|
+
className: x,
|
|
1057
|
+
id: d,
|
|
1058
|
+
...h
|
|
1059
|
+
}, y) => {
|
|
1060
|
+
const C = le.useId(), g = d || `textfield-${C}`, v = !!n, $ = n || r ? `${g}-description` : void 0;
|
|
1061
|
+
return /* @__PURE__ */ i("div", { className: u("flex flex-col", a && "w-full", p), children: [
|
|
1060
1062
|
t && /* @__PURE__ */ e(
|
|
1061
1063
|
"label",
|
|
1062
1064
|
{
|
|
1063
|
-
htmlFor:
|
|
1064
|
-
className:
|
|
1065
|
+
htmlFor: g,
|
|
1066
|
+
className: u(
|
|
1065
1067
|
Oe,
|
|
1066
|
-
|
|
1068
|
+
v ? "text-danger-fg" : "text-text-subtle",
|
|
1067
1069
|
N
|
|
1068
1070
|
),
|
|
1069
1071
|
children: t
|
|
@@ -1074,11 +1076,11 @@ const Lt = {
|
|
|
1074
1076
|
/* @__PURE__ */ e(
|
|
1075
1077
|
"input",
|
|
1076
1078
|
{
|
|
1077
|
-
ref:
|
|
1078
|
-
id:
|
|
1079
|
-
"aria-invalid":
|
|
1080
|
-
"aria-describedby":
|
|
1081
|
-
className:
|
|
1079
|
+
ref: y,
|
|
1080
|
+
id: g,
|
|
1081
|
+
"aria-invalid": v || void 0,
|
|
1082
|
+
"aria-describedby": $,
|
|
1083
|
+
className: u(
|
|
1082
1084
|
"block w-full rounded-md border bg-surface-input text-text",
|
|
1083
1085
|
"transition-colors duration-fast ease-out",
|
|
1084
1086
|
"placeholder:text-text-subtle",
|
|
@@ -1087,10 +1089,10 @@ const Lt = {
|
|
|
1087
1089
|
Lt[s],
|
|
1088
1090
|
l && "pl-9",
|
|
1089
1091
|
(c || f) && "pr-9",
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
+
v ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
1093
|
+
x
|
|
1092
1094
|
),
|
|
1093
|
-
...
|
|
1095
|
+
...h
|
|
1094
1096
|
}
|
|
1095
1097
|
),
|
|
1096
1098
|
(c || f) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: f ? /* @__PURE__ */ e(
|
|
@@ -1104,8 +1106,8 @@ const Lt = {
|
|
|
1104
1106
|
(n || r) && /* @__PURE__ */ e(
|
|
1105
1107
|
"p",
|
|
1106
1108
|
{
|
|
1107
|
-
id:
|
|
1108
|
-
className:
|
|
1109
|
+
id: $,
|
|
1110
|
+
className: u("mt-1 text-xs", v ? "text-danger-fg" : "text-text-subtle"),
|
|
1109
1111
|
children: n || r
|
|
1110
1112
|
}
|
|
1111
1113
|
)
|
|
@@ -1125,25 +1127,25 @@ function It({
|
|
|
1125
1127
|
}) {
|
|
1126
1128
|
const [p, N] = R([]);
|
|
1127
1129
|
Y(() => {
|
|
1128
|
-
let
|
|
1129
|
-
return Promise.resolve(n?.()).then((
|
|
1130
|
-
|
|
1130
|
+
let d = !0;
|
|
1131
|
+
return Promise.resolve(n?.()).then((h) => {
|
|
1132
|
+
d && h && N(h.data ?? []);
|
|
1131
1133
|
}).catch(() => {
|
|
1132
1134
|
}), () => {
|
|
1133
|
-
|
|
1135
|
+
d = !1;
|
|
1134
1136
|
};
|
|
1135
1137
|
}, []);
|
|
1136
|
-
const
|
|
1138
|
+
const x = t ?? {};
|
|
1137
1139
|
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
1138
1140
|
/* @__PURE__ */ e(
|
|
1139
1141
|
pe,
|
|
1140
1142
|
{
|
|
1141
1143
|
size: a,
|
|
1142
1144
|
fullWidth: !0,
|
|
1143
|
-
value:
|
|
1144
|
-
options: p.map((
|
|
1145
|
+
value: x.folderId ?? "",
|
|
1146
|
+
options: p.map((d) => ({ value: d.id, label: d.name })),
|
|
1145
1147
|
placeholder: l ?? "Select a folder",
|
|
1146
|
-
onChange: (
|
|
1148
|
+
onChange: (d) => r?.({ ...x, folderId: d })
|
|
1147
1149
|
}
|
|
1148
1150
|
),
|
|
1149
1151
|
f && /* @__PURE__ */ e(
|
|
@@ -1151,9 +1153,9 @@ function It({
|
|
|
1151
1153
|
{
|
|
1152
1154
|
size: a,
|
|
1153
1155
|
disabled: s ?? !1,
|
|
1154
|
-
value:
|
|
1156
|
+
value: x.pathTemplate ?? "",
|
|
1155
1157
|
placeholder: c ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
|
|
1156
|
-
onChange: (
|
|
1158
|
+
onChange: (d) => r?.({ ...x, pathTemplate: d.target.value })
|
|
1157
1159
|
}
|
|
1158
1160
|
)
|
|
1159
1161
|
] });
|
|
@@ -1180,38 +1182,38 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
|
|
|
1180
1182
|
containerClassName: f,
|
|
1181
1183
|
labelClassName: p,
|
|
1182
1184
|
className: N,
|
|
1183
|
-
id:
|
|
1184
|
-
options:
|
|
1185
|
-
onRemoteSearch:
|
|
1186
|
-
onSelect:
|
|
1185
|
+
id: x,
|
|
1186
|
+
options: d,
|
|
1187
|
+
onRemoteSearch: h,
|
|
1188
|
+
onSelect: y,
|
|
1187
1189
|
debounceTime: C = 500,
|
|
1188
|
-
showAllOnOpen:
|
|
1189
|
-
value:
|
|
1190
|
-
onChange:
|
|
1191
|
-
|
|
1190
|
+
showAllOnOpen: g = !1,
|
|
1191
|
+
value: v,
|
|
1192
|
+
onChange: $,
|
|
1193
|
+
...D
|
|
1192
1194
|
}, _) => {
|
|
1193
|
-
const M =
|
|
1195
|
+
const M = x || `searchfield-${Math.random().toString(36).substr(2, 9)}`, q = !!n, V = se(null), I = se(null), [W, H] = R(v || ""), [X, Z] = R(!1), [Q, b] = R(!1), [m, E] = R(!1);
|
|
1194
1196
|
Y(() => {
|
|
1195
|
-
|
|
1196
|
-
}, [
|
|
1197
|
+
v !== void 0 && H(v);
|
|
1198
|
+
}, [v]);
|
|
1197
1199
|
const w = me(() => {
|
|
1198
|
-
if (
|
|
1200
|
+
if (g && !m || !W) return d;
|
|
1199
1201
|
const S = String(W).toLowerCase();
|
|
1200
|
-
return
|
|
1201
|
-
(
|
|
1202
|
+
return d.filter(
|
|
1203
|
+
(A) => String(A.label).toLowerCase().includes(S)
|
|
1202
1204
|
);
|
|
1203
|
-
}, [W,
|
|
1205
|
+
}, [W, d, g, m]);
|
|
1204
1206
|
Y(() => {
|
|
1205
|
-
if (!
|
|
1207
|
+
if (!h || !W) {
|
|
1206
1208
|
b(!1);
|
|
1207
1209
|
return;
|
|
1208
1210
|
}
|
|
1209
1211
|
const S = setTimeout(async () => {
|
|
1210
1212
|
b(!0);
|
|
1211
1213
|
try {
|
|
1212
|
-
await
|
|
1213
|
-
} catch (
|
|
1214
|
-
console.error("Remote search failed:",
|
|
1214
|
+
await h(String(W));
|
|
1215
|
+
} catch (A) {
|
|
1216
|
+
console.error("Remote search failed:", A);
|
|
1215
1217
|
} finally {
|
|
1216
1218
|
b(!1);
|
|
1217
1219
|
}
|
|
@@ -1219,19 +1221,19 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
|
|
|
1219
1221
|
return () => {
|
|
1220
1222
|
clearTimeout(S), b(!1);
|
|
1221
1223
|
};
|
|
1222
|
-
}, [W, C,
|
|
1223
|
-
const S = (
|
|
1224
|
-
V.current && !V.current.contains(
|
|
1224
|
+
}, [W, C, h]), Y(() => {
|
|
1225
|
+
const S = (A) => {
|
|
1226
|
+
V.current && !V.current.contains(A.target) && Z(!1);
|
|
1225
1227
|
};
|
|
1226
1228
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
1227
1229
|
}, []);
|
|
1228
1230
|
const P = (S) => {
|
|
1229
|
-
const
|
|
1230
|
-
H(
|
|
1231
|
+
const A = S.target.value;
|
|
1232
|
+
H(A), Z(!0), E(!0), $ && $(S);
|
|
1231
1233
|
}, k = (S) => {
|
|
1232
|
-
H(S.label), Z(!1), E(!1),
|
|
1234
|
+
H(S.label), Z(!1), E(!1), y && y(S.value);
|
|
1233
1235
|
}, ae = () => {
|
|
1234
|
-
(
|
|
1236
|
+
(d.length > 0 || h) && (Z(!0), E(!1));
|
|
1235
1237
|
}, ne = c || Q, te = X && (w.length > 0 || ne), G = me(() => _ || I, [_]);
|
|
1236
1238
|
return /* @__PURE__ */ i(
|
|
1237
1239
|
"div",
|
|
@@ -1250,7 +1252,7 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
|
|
|
1250
1252
|
htmlFor: M,
|
|
1251
1253
|
className: ue(
|
|
1252
1254
|
"block text-sm font-medium mb-1",
|
|
1253
|
-
|
|
1255
|
+
q ? "text-danger-fg" : "text-text",
|
|
1254
1256
|
p || ""
|
|
1255
1257
|
),
|
|
1256
1258
|
children: t
|
|
@@ -1278,10 +1280,10 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
|
|
|
1278
1280
|
"pr-10",
|
|
1279
1281
|
// Altijd padding rechts voor de dropdown/loading icon
|
|
1280
1282
|
// State styles
|
|
1281
|
-
|
|
1283
|
+
q ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
1282
1284
|
N || ""
|
|
1283
1285
|
),
|
|
1284
|
-
|
|
1286
|
+
...D
|
|
1285
1287
|
}
|
|
1286
1288
|
),
|
|
1287
1289
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ne || c ? (
|
|
@@ -1333,12 +1335,12 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
|
|
|
1333
1335
|
{
|
|
1334
1336
|
className: ue(
|
|
1335
1337
|
"mt-1 text-xs",
|
|
1336
|
-
|
|
1338
|
+
q ? "text-danger-fg" : "text-text-muted"
|
|
1337
1339
|
),
|
|
1338
1340
|
children: n || r
|
|
1339
1341
|
}
|
|
1340
1342
|
),
|
|
1341
|
-
|
|
1343
|
+
h && /* @__PURE__ */ i("p", { className: "mt-2 text-xs text-success-fg", children: [
|
|
1342
1344
|
"Huidige zoekterm (niet-gedebounced): ",
|
|
1343
1345
|
String(W)
|
|
1344
1346
|
] })
|
|
@@ -1354,7 +1356,7 @@ const Ft = de(
|
|
|
1354
1356
|
"span",
|
|
1355
1357
|
{
|
|
1356
1358
|
"aria-hidden": !0,
|
|
1357
|
-
className:
|
|
1359
|
+
className: u(
|
|
1358
1360
|
"relative inline-flex size-switch-track shrink-0 items-center rounded-full",
|
|
1359
1361
|
"transition-colors duration-fast ease-out",
|
|
1360
1362
|
t ? "bg-accent" : "bg-surface-hover",
|
|
@@ -1363,7 +1365,7 @@ const Ft = de(
|
|
|
1363
1365
|
children: /* @__PURE__ */ e(
|
|
1364
1366
|
"span",
|
|
1365
1367
|
{
|
|
1366
|
-
className:
|
|
1368
|
+
className: u(
|
|
1367
1369
|
"absolute left-0.5 size-switch-knob rounded-full bg-surface shadow-overlay",
|
|
1368
1370
|
"transition-transform duration-fast ease-out",
|
|
1369
1371
|
t && "translate-switch"
|
|
@@ -1375,7 +1377,7 @@ const Ft = de(
|
|
|
1375
1377
|
return /* @__PURE__ */ i(
|
|
1376
1378
|
"label",
|
|
1377
1379
|
{
|
|
1378
|
-
className:
|
|
1380
|
+
className: u(
|
|
1379
1381
|
"inline-flex items-center gap-2",
|
|
1380
1382
|
s ? "cursor-not-allowed" : "cursor-pointer",
|
|
1381
1383
|
a
|
|
@@ -1462,74 +1464,74 @@ const Vt = ({
|
|
|
1462
1464
|
showCheck: f = !0,
|
|
1463
1465
|
header: p
|
|
1464
1466
|
}) => {
|
|
1465
|
-
const [N,
|
|
1466
|
-
|
|
1467
|
+
const [N, x] = R(!1), [d, h] = R(null), [y, C] = R({ top: 0, left: 0 }), g = se(null), v = se(null), $ = se(null), D = se(null), _ = Ee(N, v, { placement: a }), M = se(null), q = () => Array.from(
|
|
1468
|
+
D.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1467
1469
|
);
|
|
1468
1470
|
Y(() => {
|
|
1469
|
-
N &&
|
|
1471
|
+
N && q()[0]?.focus();
|
|
1470
1472
|
}, [N]);
|
|
1471
|
-
const V = (
|
|
1472
|
-
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
1473
|
-
const w =
|
|
1473
|
+
const V = (m) => {
|
|
1474
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(m.key)) return;
|
|
1475
|
+
const w = q();
|
|
1474
1476
|
if (w.length === 0) return;
|
|
1475
|
-
|
|
1476
|
-
const P = w.indexOf(document.activeElement), k =
|
|
1477
|
+
m.preventDefault();
|
|
1478
|
+
const P = w.indexOf(document.activeElement), k = m.key === "Home" ? 0 : m.key === "End" ? w.length - 1 : m.key === "ArrowDown" ? (P + 1) % w.length : (P - 1 + w.length) % w.length;
|
|
1477
1479
|
w[k]?.focus();
|
|
1478
1480
|
};
|
|
1479
1481
|
Y(() => {
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1482
|
+
const m = (E) => {
|
|
1483
|
+
g.current && (!g.current.contains(E.target) || $.current && !$.current.contains(E.target)) && (x(!1), h(null), M.current && (clearTimeout(M.current), M.current = null));
|
|
1482
1484
|
};
|
|
1483
|
-
return N && document.addEventListener("mousedown",
|
|
1484
|
-
document.removeEventListener("mousedown",
|
|
1485
|
+
return N && document.addEventListener("mousedown", m), () => {
|
|
1486
|
+
document.removeEventListener("mousedown", m);
|
|
1485
1487
|
};
|
|
1486
1488
|
}, [N]), Y(() => {
|
|
1487
|
-
const
|
|
1488
|
-
E.key === "Escape" && (
|
|
1489
|
+
const m = (E) => {
|
|
1490
|
+
E.key === "Escape" && (x(!1), h(null), v.current?.focus(), M.current && (clearTimeout(M.current), M.current = null));
|
|
1489
1491
|
};
|
|
1490
|
-
return N && document.addEventListener("keydown",
|
|
1491
|
-
document.removeEventListener("keydown",
|
|
1492
|
+
return N && document.addEventListener("keydown", m), () => {
|
|
1493
|
+
document.removeEventListener("keydown", m);
|
|
1492
1494
|
};
|
|
1493
1495
|
}, [N]), Y(() => {
|
|
1494
|
-
if (
|
|
1495
|
-
const
|
|
1496
|
-
`[data-option-value="${
|
|
1496
|
+
if (d && g.current) {
|
|
1497
|
+
const m = g.current.querySelector(
|
|
1498
|
+
`[data-option-value="${d}"]`
|
|
1497
1499
|
);
|
|
1498
|
-
if (
|
|
1499
|
-
const E =
|
|
1500
|
+
if (m) {
|
|
1501
|
+
const E = m.getBoundingClientRect();
|
|
1500
1502
|
C({
|
|
1501
1503
|
top: E.top,
|
|
1502
1504
|
left: E.right + 8
|
|
1503
1505
|
});
|
|
1504
1506
|
}
|
|
1505
1507
|
}
|
|
1506
|
-
}, [
|
|
1508
|
+
}, [d]), Y(() => () => {
|
|
1507
1509
|
M.current && clearTimeout(M.current);
|
|
1508
1510
|
}, []);
|
|
1509
|
-
const I = (
|
|
1510
|
-
|
|
1511
|
-
}, W = (
|
|
1512
|
-
|
|
1513
|
-
}, H = (
|
|
1514
|
-
M.current && (clearTimeout(M.current), M.current = null),
|
|
1515
|
-
}, X = (
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
}, 150) :
|
|
1519
|
-
}, Z = (
|
|
1520
|
-
|
|
1521
|
-
}, Q =
|
|
1511
|
+
const I = (m) => {
|
|
1512
|
+
m.stopPropagation(), !l && (x(!N), h(null), M.current && (clearTimeout(M.current), M.current = null));
|
|
1513
|
+
}, W = (m, E, w) => {
|
|
1514
|
+
m.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, w), x(!1), h(null));
|
|
1515
|
+
}, H = (m) => {
|
|
1516
|
+
M.current && (clearTimeout(M.current), M.current = null), m.children && m.children.length > 0 ? h(m.value) : h(null);
|
|
1517
|
+
}, X = (m) => {
|
|
1518
|
+
m.children && m.children.length > 0 ? M.current = setTimeout(() => {
|
|
1519
|
+
h(null);
|
|
1520
|
+
}, 150) : h(null);
|
|
1521
|
+
}, Z = (m, E, w) => {
|
|
1522
|
+
m.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, w), x(!1), h(null));
|
|
1523
|
+
}, Q = u(
|
|
1522
1524
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1523
1525
|
"max-h-60 overflow-auto"
|
|
1524
|
-
), b =
|
|
1526
|
+
), b = u(
|
|
1525
1527
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1526
1528
|
"max-h-60 overflow-auto"
|
|
1527
1529
|
);
|
|
1528
1530
|
return /* @__PURE__ */ i(
|
|
1529
1531
|
"div",
|
|
1530
1532
|
{
|
|
1531
|
-
ref:
|
|
1532
|
-
className:
|
|
1533
|
+
ref: g,
|
|
1534
|
+
className: u(
|
|
1533
1535
|
"relative flex flex-row items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
1534
1536
|
c
|
|
1535
1537
|
),
|
|
@@ -1537,21 +1539,21 @@ const Vt = ({
|
|
|
1537
1539
|
/* @__PURE__ */ e(
|
|
1538
1540
|
"button",
|
|
1539
1541
|
{
|
|
1540
|
-
ref:
|
|
1542
|
+
ref: v,
|
|
1541
1543
|
onClick: I,
|
|
1542
1544
|
disabled: l,
|
|
1543
1545
|
"aria-haspopup": "menu",
|
|
1544
1546
|
"aria-expanded": N,
|
|
1545
|
-
className:
|
|
1547
|
+
className: u("inline-flex items-center justify-center", {
|
|
1546
1548
|
"opacity-50 cursor-not-allowed": l
|
|
1547
1549
|
}),
|
|
1548
1550
|
children: t
|
|
1549
1551
|
}
|
|
1550
1552
|
),
|
|
1551
|
-
N && /* @__PURE__ */ e("div", { ref:
|
|
1553
|
+
N && /* @__PURE__ */ e("div", { ref: D, className: Q, style: _, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
|
|
1552
1554
|
p && (typeof p == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: p }) : p),
|
|
1553
|
-
r.map((
|
|
1554
|
-
if (
|
|
1555
|
+
r.map((m, E) => {
|
|
1556
|
+
if (m.divider)
|
|
1555
1557
|
return /* @__PURE__ */ e(
|
|
1556
1558
|
"div",
|
|
1557
1559
|
{
|
|
@@ -1559,35 +1561,35 @@ const Vt = ({
|
|
|
1559
1561
|
},
|
|
1560
1562
|
`divider-${E}`
|
|
1561
1563
|
);
|
|
1562
|
-
const w =
|
|
1564
|
+
const w = m.children && m.children.length > 0, P = d === m.value;
|
|
1563
1565
|
return /* @__PURE__ */ i("div", { className: "relative group", children: [
|
|
1564
1566
|
/* @__PURE__ */ i(
|
|
1565
1567
|
"button",
|
|
1566
1568
|
{
|
|
1567
|
-
"data-option-value":
|
|
1569
|
+
"data-option-value": m.value,
|
|
1568
1570
|
role: "menuitem",
|
|
1569
1571
|
"aria-haspopup": w ? "menu" : void 0,
|
|
1570
|
-
onClick: (k) => W(k,
|
|
1571
|
-
onMouseEnter: () => H(
|
|
1572
|
-
onMouseLeave: () => X(
|
|
1573
|
-
disabled:
|
|
1574
|
-
className:
|
|
1572
|
+
onClick: (k) => W(k, m),
|
|
1573
|
+
onMouseEnter: () => H(m),
|
|
1574
|
+
onMouseLeave: () => X(m),
|
|
1575
|
+
disabled: m.disabled,
|
|
1576
|
+
className: u(
|
|
1575
1577
|
"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",
|
|
1576
1578
|
{
|
|
1577
|
-
"opacity-50 cursor-not-allowed":
|
|
1579
|
+
"opacity-50 cursor-not-allowed": m.disabled,
|
|
1578
1580
|
"bg-surface-hover": P && w
|
|
1579
1581
|
}
|
|
1580
1582
|
),
|
|
1581
1583
|
children: [
|
|
1582
1584
|
/* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
1583
|
-
|
|
1585
|
+
m.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: m.icon }),
|
|
1584
1586
|
/* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
1585
|
-
/* @__PURE__ */ e("span", { className: "font-base truncate", children:
|
|
1586
|
-
|
|
1587
|
+
/* @__PURE__ */ e("span", { className: "font-base truncate", children: m.label }),
|
|
1588
|
+
m.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: m.description })
|
|
1587
1589
|
] })
|
|
1588
1590
|
] }),
|
|
1589
1591
|
/* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
1590
|
-
f && n ===
|
|
1592
|
+
f && n === m.value && /* @__PURE__ */ e(Me, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
|
|
1591
1593
|
w && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
|
|
1592
1594
|
] })
|
|
1593
1595
|
]
|
|
@@ -1596,21 +1598,21 @@ const Vt = ({
|
|
|
1596
1598
|
w && P && /* @__PURE__ */ e(
|
|
1597
1599
|
"div",
|
|
1598
1600
|
{
|
|
1599
|
-
ref:
|
|
1601
|
+
ref: $,
|
|
1600
1602
|
className: b,
|
|
1601
1603
|
style: {
|
|
1602
|
-
top: `${
|
|
1603
|
-
left: `${
|
|
1604
|
+
top: `${y.top}px`,
|
|
1605
|
+
left: `${y.left}px`
|
|
1604
1606
|
},
|
|
1605
1607
|
onMouseEnter: () => {
|
|
1606
|
-
M.current && (clearTimeout(M.current), M.current = null),
|
|
1608
|
+
M.current && (clearTimeout(M.current), M.current = null), h(m.value);
|
|
1607
1609
|
},
|
|
1608
1610
|
onMouseLeave: () => {
|
|
1609
1611
|
M.current = setTimeout(() => {
|
|
1610
|
-
|
|
1612
|
+
h(null);
|
|
1611
1613
|
}, 150);
|
|
1612
1614
|
},
|
|
1613
|
-
children: /* @__PURE__ */ e("div", { className: "p-2", children:
|
|
1615
|
+
children: /* @__PURE__ */ e("div", { className: "p-2", children: m.children.map((k, ae) => {
|
|
1614
1616
|
if (k.divider)
|
|
1615
1617
|
return /* @__PURE__ */ e(
|
|
1616
1618
|
"div",
|
|
@@ -1619,7 +1621,7 @@ const Vt = ({
|
|
|
1619
1621
|
},
|
|
1620
1622
|
`divider-${ae}`
|
|
1621
1623
|
);
|
|
1622
|
-
const ne = typeof n == "object" && n[
|
|
1624
|
+
const ne = typeof n == "object" && n[m.value] && n[m.value].includes(
|
|
1623
1625
|
k.value
|
|
1624
1626
|
) || n === k.value;
|
|
1625
1627
|
return /* @__PURE__ */ i(
|
|
@@ -1628,10 +1630,10 @@ const Vt = ({
|
|
|
1628
1630
|
onClick: (te) => Z(
|
|
1629
1631
|
te,
|
|
1630
1632
|
k,
|
|
1631
|
-
|
|
1633
|
+
m.value
|
|
1632
1634
|
),
|
|
1633
1635
|
disabled: k.disabled,
|
|
1634
|
-
className:
|
|
1636
|
+
className: u(
|
|
1635
1637
|
"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",
|
|
1636
1638
|
{
|
|
1637
1639
|
"opacity-50 cursor-not-allowed": k.disabled
|
|
@@ -1653,16 +1655,16 @@ const Vt = ({
|
|
|
1653
1655
|
}) })
|
|
1654
1656
|
}
|
|
1655
1657
|
)
|
|
1656
|
-
] },
|
|
1658
|
+
] }, m.value);
|
|
1657
1659
|
}),
|
|
1658
1660
|
(() => {
|
|
1659
|
-
const
|
|
1661
|
+
const m = r.reduce((E, w) => {
|
|
1660
1662
|
if (w.divider) return E;
|
|
1661
1663
|
const P = w.children ? w.children.filter((k) => !k.divider).length : 0;
|
|
1662
1664
|
return E + 1 + P;
|
|
1663
1665
|
}, 0);
|
|
1664
|
-
return
|
|
1665
|
-
|
|
1666
|
+
return m > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
1667
|
+
m,
|
|
1666
1668
|
" options available"
|
|
1667
1669
|
] }) });
|
|
1668
1670
|
})()
|
|
@@ -1670,7 +1672,7 @@ const Vt = ({
|
|
|
1670
1672
|
]
|
|
1671
1673
|
}
|
|
1672
1674
|
);
|
|
1673
|
-
}, Ht = () => /* @__PURE__ */ e(J, { icon: Ne, size: "md", color: "current" }),
|
|
1675
|
+
}, Ht = () => /* @__PURE__ */ e(J, { icon: Ne, size: "md", color: "current" }), qt = ({ active: t }) => /* @__PURE__ */ e(J, { icon: Qe, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Ut = ({ active: t }) => /* @__PURE__ */ e(J, { icon: be, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Wt = () => /* @__PURE__ */ e(J, { icon: Pe, size: "md", color: "current" }), Kt = () => /* @__PURE__ */ e(J, { icon: ye, size: "md", color: "current" }), _t = () => /* @__PURE__ */ e(J, { icon: et, size: "md", color: "current" }), Gt = () => /* @__PURE__ */ e(J, { icon: tt, size: "md", color: "current" }), Be = () => /* @__PURE__ */ e(J, { icon: be, size: "md", color: "current" }), Jt = (t) => {
|
|
1674
1676
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1675
1677
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1676
1678
|
};
|
|
@@ -1700,7 +1702,7 @@ const Vt = ({
|
|
|
1700
1702
|
children: /* @__PURE__ */ e(
|
|
1701
1703
|
"span",
|
|
1702
1704
|
{
|
|
1703
|
-
className:
|
|
1705
|
+
className: u(r(s.value) && "text-accent"),
|
|
1704
1706
|
children: s.label
|
|
1705
1707
|
}
|
|
1706
1708
|
)
|
|
@@ -1728,19 +1730,19 @@ const Vt = ({
|
|
|
1728
1730
|
pageSizeOptions: f = [10, 25, 50, 100],
|
|
1729
1731
|
defaultPageSize: p = 10,
|
|
1730
1732
|
actions: N = [],
|
|
1731
|
-
onRowClick:
|
|
1732
|
-
selectable:
|
|
1733
|
-
selectedRows:
|
|
1734
|
-
onSelectionChange:
|
|
1735
|
-
getRowKey: C = (
|
|
1736
|
-
emptyContent:
|
|
1737
|
-
hoverable:
|
|
1738
|
-
bordered:
|
|
1739
|
-
striped:
|
|
1733
|
+
onRowClick: x,
|
|
1734
|
+
selectable: d = !1,
|
|
1735
|
+
selectedRows: h = [],
|
|
1736
|
+
onSelectionChange: y,
|
|
1737
|
+
getRowKey: C = (q, V) => V,
|
|
1738
|
+
emptyContent: g,
|
|
1739
|
+
hoverable: v = !0,
|
|
1740
|
+
bordered: $ = !1,
|
|
1741
|
+
striped: D = !1,
|
|
1740
1742
|
className: _,
|
|
1741
1743
|
rowClassName: M
|
|
1742
1744
|
}) => {
|
|
1743
|
-
const [
|
|
1745
|
+
const [q, V] = R(""), [I, W] = R({
|
|
1744
1746
|
column: null,
|
|
1745
1747
|
direction: null
|
|
1746
1748
|
}), [H, X] = R({
|
|
@@ -1748,10 +1750,10 @@ const Vt = ({
|
|
|
1748
1750
|
pageSize: p
|
|
1749
1751
|
}), Z = se(null), Q = me(() => {
|
|
1750
1752
|
let o = t;
|
|
1751
|
-
if (s &&
|
|
1753
|
+
if (s && q.trim()) {
|
|
1752
1754
|
const z = r.filter(
|
|
1753
1755
|
(F) => F.searchable !== !1
|
|
1754
|
-
), B =
|
|
1756
|
+
), B = q.toLowerCase();
|
|
1755
1757
|
o = o.filter((F) => z.some((O) => {
|
|
1756
1758
|
const re = typeof O.accessor == "function" ? O.accessor(F) : F[O.accessor];
|
|
1757
1759
|
return String(re || "").toLowerCase().includes(B);
|
|
@@ -1765,7 +1767,7 @@ const Vt = ({
|
|
|
1765
1767
|
return String(O || "") === z.value;
|
|
1766
1768
|
}));
|
|
1767
1769
|
}), o;
|
|
1768
|
-
}, [t,
|
|
1770
|
+
}, [t, q, r, s, l]), b = me(() => {
|
|
1769
1771
|
if (!I.column || !I.direction) return Q;
|
|
1770
1772
|
const o = r.find((z) => z.id === I.column);
|
|
1771
1773
|
return o ? [...Q].sort((z, B) => {
|
|
@@ -1773,7 +1775,7 @@ const Vt = ({
|
|
|
1773
1775
|
let re = 0;
|
|
1774
1776
|
return F < O ? re = -1 : F > O && (re = 1), I.direction === "desc" ? -re : re;
|
|
1775
1777
|
}) : Q;
|
|
1776
|
-
}, [Q, I, r]),
|
|
1778
|
+
}, [Q, I, r]), m = me(() => {
|
|
1777
1779
|
if (!c) return b;
|
|
1778
1780
|
const o = H.page * H.pageSize, z = o + H.pageSize;
|
|
1779
1781
|
return b.slice(o, z);
|
|
@@ -1788,42 +1790,42 @@ const Vt = ({
|
|
|
1788
1790
|
X({ page: 0, pageSize: o });
|
|
1789
1791
|
}, []), k = ce(
|
|
1790
1792
|
(o, z) => {
|
|
1791
|
-
if (!
|
|
1793
|
+
if (!y) return;
|
|
1792
1794
|
const B = C(o, 0);
|
|
1793
|
-
|
|
1794
|
-
(F, O) => C(
|
|
1795
|
+
h.map((F, O) => C(F, O)), y(z ? [...h, o] : h.filter(
|
|
1796
|
+
(F, O) => C(h[O], O) !== B
|
|
1795
1797
|
));
|
|
1796
1798
|
},
|
|
1797
|
-
[
|
|
1799
|
+
[h, y, C]
|
|
1798
1800
|
), ae = ce(
|
|
1799
1801
|
(o) => {
|
|
1800
|
-
|
|
1802
|
+
y && y(o ? [...m] : []);
|
|
1801
1803
|
},
|
|
1802
|
-
[
|
|
1804
|
+
[m, y]
|
|
1803
1805
|
);
|
|
1804
1806
|
Y(() => {
|
|
1805
1807
|
X((o) => ({ ...o, page: 0 }));
|
|
1806
|
-
}, [
|
|
1808
|
+
}, [q, I]), Y(() => {
|
|
1807
1809
|
X((o) => ({ ...o, page: 0 }));
|
|
1808
1810
|
}, [l.map((o) => o.value).join(",")]);
|
|
1809
|
-
const ne = b.length, te = Math.ceil(ne / H.pageSize), G = H.page * H.pageSize + 1, S = Math.min(G + H.pageSize - 1, ne),
|
|
1811
|
+
const ne = b.length, te = Math.ceil(ne / H.pageSize), G = H.page * H.pageSize + 1, S = Math.min(G + H.pageSize - 1, ne), A = m.length > 0 && m.every((o) => {
|
|
1810
1812
|
const z = C(o, 0);
|
|
1811
|
-
return
|
|
1813
|
+
return h.some(
|
|
1812
1814
|
(B, F) => C(B, F) === z
|
|
1813
1815
|
);
|
|
1814
|
-
}), L =
|
|
1816
|
+
}), L = m.some((o) => {
|
|
1815
1817
|
const z = C(o, 0);
|
|
1816
|
-
return
|
|
1818
|
+
return h.some(
|
|
1817
1819
|
(B, F) => C(B, F) === z
|
|
1818
1820
|
);
|
|
1819
|
-
}),
|
|
1821
|
+
}), T = u(
|
|
1820
1822
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1821
1823
|
_
|
|
1822
|
-
),
|
|
1824
|
+
), U = u("bg-surface"), j = u(
|
|
1823
1825
|
"text-text p-3 border-b border-border"
|
|
1824
|
-
), K =
|
|
1825
|
-
"hover:bg-surface-sunk":
|
|
1826
|
-
"cursor-pointer":
|
|
1826
|
+
), K = u("h-row-lg", {
|
|
1827
|
+
"hover:bg-surface-sunk": v,
|
|
1828
|
+
"cursor-pointer": x
|
|
1827
1829
|
});
|
|
1828
1830
|
return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
|
|
1829
1831
|
(s || l.length > 0) && /* @__PURE__ */ e("div", { className: "pt-4 pb-2", children: /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
@@ -1832,7 +1834,7 @@ const Vt = ({
|
|
|
1832
1834
|
he,
|
|
1833
1835
|
{
|
|
1834
1836
|
placeholder: a,
|
|
1835
|
-
value:
|
|
1837
|
+
value: q,
|
|
1836
1838
|
onChange: (o) => V(o.target.value),
|
|
1837
1839
|
startIcon: /* @__PURE__ */ e(Ht, {}),
|
|
1838
1840
|
className: "max-w-sm"
|
|
@@ -1848,15 +1850,15 @@ const Vt = ({
|
|
|
1848
1850
|
tableColumns: r.length
|
|
1849
1851
|
}
|
|
1850
1852
|
) }),
|
|
1851
|
-
/* @__PURE__ */ i("table", { ref: Z, className:
|
|
1852
|
-
/* @__PURE__ */ e("thead", { className:
|
|
1853
|
-
|
|
1853
|
+
/* @__PURE__ */ i("table", { ref: Z, className: u(T, "min-w-full"), children: [
|
|
1854
|
+
/* @__PURE__ */ e("thead", { className: U, children: /* @__PURE__ */ i("tr", { children: [
|
|
1855
|
+
d && /* @__PURE__ */ e("th", { className: u(j, "w-12"), children: /* @__PURE__ */ e(
|
|
1854
1856
|
"input",
|
|
1855
1857
|
{
|
|
1856
1858
|
type: "checkbox",
|
|
1857
|
-
checked:
|
|
1859
|
+
checked: A,
|
|
1858
1860
|
ref: (o) => {
|
|
1859
|
-
o && (o.indeterminate = L && !
|
|
1861
|
+
o && (o.indeterminate = L && !A);
|
|
1860
1862
|
},
|
|
1861
1863
|
onChange: (o) => ae(o.target.checked),
|
|
1862
1864
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
@@ -1865,7 +1867,7 @@ const Vt = ({
|
|
|
1865
1867
|
!n && r.map((o) => /* @__PURE__ */ e(
|
|
1866
1868
|
"th",
|
|
1867
1869
|
{
|
|
1868
|
-
className:
|
|
1870
|
+
className: u(
|
|
1869
1871
|
j,
|
|
1870
1872
|
"font-semibold text-xs text-text-muted uppercase tracking-label",
|
|
1871
1873
|
"group",
|
|
@@ -1885,19 +1887,19 @@ const Vt = ({
|
|
|
1885
1887
|
o.sortable && /* @__PURE__ */ i(
|
|
1886
1888
|
"div",
|
|
1887
1889
|
{
|
|
1888
|
-
className:
|
|
1890
|
+
className: u(
|
|
1889
1891
|
"flex flex-col opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1890
1892
|
I.column === o.id && "opacity-100"
|
|
1891
1893
|
),
|
|
1892
1894
|
children: [
|
|
1893
1895
|
/* @__PURE__ */ e(
|
|
1894
|
-
|
|
1896
|
+
qt,
|
|
1895
1897
|
{
|
|
1896
1898
|
active: I.column === o.id && I.direction === "asc"
|
|
1897
1899
|
}
|
|
1898
1900
|
),
|
|
1899
1901
|
/* @__PURE__ */ e(
|
|
1900
|
-
|
|
1902
|
+
Ut,
|
|
1901
1903
|
{
|
|
1902
1904
|
active: I.column === o.id && I.direction === "desc"
|
|
1903
1905
|
}
|
|
@@ -1909,35 +1911,35 @@ const Vt = ({
|
|
|
1909
1911
|
},
|
|
1910
1912
|
o.id
|
|
1911
1913
|
)),
|
|
1912
|
-
N.length > 0 && /* @__PURE__ */ e("th", { className:
|
|
1914
|
+
N.length > 0 && /* @__PURE__ */ e("th", { className: u(j, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1913
1915
|
] }) }),
|
|
1914
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
1916
|
+
/* @__PURE__ */ e("tbody", { children: m.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1915
1917
|
"td",
|
|
1916
1918
|
{
|
|
1917
|
-
colSpan: r.length + (
|
|
1918
|
-
className:
|
|
1919
|
+
colSpan: r.length + (d ? 1 : 0) + (N.length > 0 ? 1 : 0),
|
|
1920
|
+
className: u(
|
|
1919
1921
|
j,
|
|
1920
1922
|
"text-center py-8 text-text-muted"
|
|
1921
1923
|
),
|
|
1922
|
-
children:
|
|
1924
|
+
children: g || "No data available"
|
|
1923
1925
|
}
|
|
1924
|
-
) }) :
|
|
1925
|
-
const B = C(o, z), F =
|
|
1926
|
+
) }) : m.map((o, z) => {
|
|
1927
|
+
const B = C(o, z), F = h.some(
|
|
1926
1928
|
(O, re) => C(O, re) === B
|
|
1927
1929
|
);
|
|
1928
1930
|
return /* @__PURE__ */ i(
|
|
1929
1931
|
"tr",
|
|
1930
1932
|
{
|
|
1931
|
-
className:
|
|
1933
|
+
className: u(
|
|
1932
1934
|
K,
|
|
1933
1935
|
{ "bg-accent-soft": F },
|
|
1934
1936
|
M?.(o, z)
|
|
1935
1937
|
),
|
|
1936
1938
|
onClick: (O) => {
|
|
1937
|
-
O.stopPropagation(),
|
|
1939
|
+
O.stopPropagation(), x?.(o, z);
|
|
1938
1940
|
},
|
|
1939
1941
|
children: [
|
|
1940
|
-
|
|
1942
|
+
d && /* @__PURE__ */ e("td", { className: j, children: /* @__PURE__ */ e(
|
|
1941
1943
|
"input",
|
|
1942
1944
|
{
|
|
1943
1945
|
type: "checkbox",
|
|
@@ -1953,7 +1955,7 @@ const Vt = ({
|
|
|
1953
1955
|
return /* @__PURE__ */ e(
|
|
1954
1956
|
"td",
|
|
1955
1957
|
{
|
|
1956
|
-
className:
|
|
1958
|
+
className: u(j, {
|
|
1957
1959
|
"text-left": O.align === "left" || !O.align,
|
|
1958
1960
|
"text-center": O.align === "center",
|
|
1959
1961
|
"text-right": O.align === "right",
|
|
@@ -2081,12 +2083,12 @@ const Vt = ({
|
|
|
2081
2083
|
const [a, l] = R(t[0]?.id || ""), c = r || a, f = (p) => {
|
|
2082
2084
|
n ? n(p) : l(p);
|
|
2083
2085
|
};
|
|
2084
|
-
return /* @__PURE__ */ e("div", { className:
|
|
2086
|
+
return /* @__PURE__ */ e("div", { className: u("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((p) => /* @__PURE__ */ e(
|
|
2085
2087
|
"button",
|
|
2086
2088
|
{
|
|
2087
2089
|
onClick: () => !p.disabled && f(p.id),
|
|
2088
2090
|
disabled: p.disabled,
|
|
2089
|
-
className:
|
|
2091
|
+
className: u(
|
|
2090
2092
|
"border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
|
|
2091
2093
|
{
|
|
2092
2094
|
"border-accent-border text-text": c === p.id,
|
|
@@ -2096,7 +2098,7 @@ const Vt = ({
|
|
|
2096
2098
|
),
|
|
2097
2099
|
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
2098
2100
|
p.label,
|
|
2099
|
-
p.badge && /* @__PURE__ */ e("span", { className:
|
|
2101
|
+
p.badge && /* @__PURE__ */ e("span", { className: u(
|
|
2100
2102
|
"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
|
|
2101
2103
|
c === p.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
|
|
2102
2104
|
), children: p.badge })
|
|
@@ -2115,12 +2117,12 @@ const Vt = ({
|
|
|
2115
2117
|
}) => {
|
|
2116
2118
|
const [f, p] = R(
|
|
2117
2119
|
r || n || t[0]?.id || ""
|
|
2118
|
-
), N = n || f,
|
|
2119
|
-
s ? s(
|
|
2120
|
-
},
|
|
2120
|
+
), N = n || f, x = (g) => {
|
|
2121
|
+
s ? s(g) : p(g);
|
|
2122
|
+
}, d = {
|
|
2121
2123
|
activeTab: N,
|
|
2122
|
-
setActiveTab:
|
|
2123
|
-
},
|
|
2124
|
+
setActiveTab: x
|
|
2125
|
+
}, h = t.find((g) => g.id === N), y = u(
|
|
2124
2126
|
"flex",
|
|
2125
2127
|
{
|
|
2126
2128
|
"border-b border-border px-2": a === "default" || a === "underline",
|
|
@@ -2129,8 +2131,8 @@ const Vt = ({
|
|
|
2129
2131
|
"space-x-8": a === "default" || a === "underline"
|
|
2130
2132
|
},
|
|
2131
2133
|
c
|
|
2132
|
-
), C = (
|
|
2133
|
-
const
|
|
2134
|
+
), C = (g, v) => {
|
|
2135
|
+
const $ = "transition-colors duration-fast font-medium", D = {
|
|
2134
2136
|
"text-xs px-2 py-1": l === "sm",
|
|
2135
2137
|
"text-sm px-3 py-2": l === "md",
|
|
2136
2138
|
"text-base px-4 py-3": l === "lg"
|
|
@@ -2142,44 +2144,44 @@ const Vt = ({
|
|
|
2142
2144
|
// Underline variant
|
|
2143
2145
|
"border-b-2 pb-2": a === "underline"
|
|
2144
2146
|
}, M = {
|
|
2145
|
-
"opacity-50 cursor-not-allowed":
|
|
2146
|
-
"cursor-pointer": !
|
|
2147
|
-
},
|
|
2147
|
+
"opacity-50 cursor-not-allowed": g.disabled,
|
|
2148
|
+
"cursor-pointer": !g.disabled
|
|
2149
|
+
}, q = v ? {
|
|
2148
2150
|
"border-accent-border text-text": a === "default" || a === "underline",
|
|
2149
2151
|
"bg-surface text-text shadow-none": a === "pills"
|
|
2150
|
-
} : {}, V = !
|
|
2152
|
+
} : {}, V = !v && !g.disabled ? {
|
|
2151
2153
|
"border-transparent text-text-muted hover:text-text": a === "default",
|
|
2152
2154
|
"text-text-muted hover:text-text": a === "pills",
|
|
2153
2155
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2154
2156
|
} : {};
|
|
2155
|
-
return
|
|
2157
|
+
return u($, D, _, M, q, V);
|
|
2156
2158
|
};
|
|
2157
|
-
return /* @__PURE__ */ e(Yt.Provider, { value:
|
|
2158
|
-
/* @__PURE__ */ e("div", { className:
|
|
2159
|
+
return /* @__PURE__ */ e(Yt.Provider, { value: d, children: /* @__PURE__ */ i("div", { children: [
|
|
2160
|
+
/* @__PURE__ */ e("div", { className: y, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2159
2161
|
"button",
|
|
2160
2162
|
{
|
|
2161
2163
|
type: "button",
|
|
2162
2164
|
role: "tab",
|
|
2163
|
-
"aria-selected": N ===
|
|
2164
|
-
"aria-controls": `tabpanel-${
|
|
2165
|
-
disabled:
|
|
2166
|
-
onClick: () => !
|
|
2167
|
-
className: C(
|
|
2165
|
+
"aria-selected": N === g.id,
|
|
2166
|
+
"aria-controls": `tabpanel-${g.id}`,
|
|
2167
|
+
disabled: g.disabled,
|
|
2168
|
+
onClick: () => !g.disabled && x(g.id),
|
|
2169
|
+
className: C(g, N === g.id),
|
|
2168
2170
|
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
+
g.label,
|
|
2172
|
+
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 })
|
|
2171
2173
|
] })
|
|
2172
2174
|
},
|
|
2173
|
-
|
|
2175
|
+
g.id
|
|
2174
2176
|
)) }),
|
|
2175
|
-
|
|
2177
|
+
h?.content && /* @__PURE__ */ e(
|
|
2176
2178
|
"div",
|
|
2177
2179
|
{
|
|
2178
2180
|
role: "tabpanel",
|
|
2179
2181
|
id: `tabpanel-${N}`,
|
|
2180
2182
|
"aria-labelledby": `tab-${N}`,
|
|
2181
2183
|
className: "mt-4",
|
|
2182
|
-
children:
|
|
2184
|
+
children: h.content
|
|
2183
2185
|
}
|
|
2184
2186
|
)
|
|
2185
2187
|
] }) });
|
|
@@ -2201,36 +2203,36 @@ function Fe({
|
|
|
2201
2203
|
backdropClassName: f,
|
|
2202
2204
|
children: p,
|
|
2203
2205
|
footer: N,
|
|
2204
|
-
showCloseButton:
|
|
2206
|
+
showCloseButton: x = !0
|
|
2205
2207
|
}) {
|
|
2206
|
-
const
|
|
2208
|
+
const d = se(null), h = se(null);
|
|
2207
2209
|
Y(() => {
|
|
2208
2210
|
if (!t || !l) return;
|
|
2209
|
-
const C = (
|
|
2210
|
-
|
|
2211
|
+
const C = (g) => {
|
|
2212
|
+
g.key === "Escape" && r();
|
|
2211
2213
|
};
|
|
2212
2214
|
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
2213
|
-
}, [t, l, r]), Y(() => (t ? (
|
|
2215
|
+
}, [t, l, r]), Y(() => (t ? (h.current = document.activeElement, d.current && d.current.focus(), document.body.style.overflow = "hidden") : (h.current && h.current.focus(), document.body.style.overflow = ""), () => {
|
|
2214
2216
|
document.body.style.overflow = "";
|
|
2215
2217
|
}), [t]);
|
|
2216
|
-
const
|
|
2218
|
+
const y = (C) => {
|
|
2217
2219
|
a && C.target === C.currentTarget && r();
|
|
2218
2220
|
};
|
|
2219
2221
|
return t ? /* @__PURE__ */ e(
|
|
2220
2222
|
"div",
|
|
2221
2223
|
{
|
|
2222
|
-
className:
|
|
2224
|
+
className: u(
|
|
2223
2225
|
"fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2224
2226
|
"bg-scrim",
|
|
2225
2227
|
// 'animate-fade-in',
|
|
2226
2228
|
f
|
|
2227
2229
|
),
|
|
2228
|
-
onClick:
|
|
2230
|
+
onClick: y,
|
|
2229
2231
|
children: /* @__PURE__ */ i(
|
|
2230
2232
|
"div",
|
|
2231
2233
|
{
|
|
2232
|
-
ref:
|
|
2233
|
-
className:
|
|
2234
|
+
ref: d,
|
|
2235
|
+
className: u(
|
|
2234
2236
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2235
2237
|
// 'animate-scale-in',
|
|
2236
2238
|
"focus:outline-none",
|
|
@@ -2242,7 +2244,7 @@ function Fe({
|
|
|
2242
2244
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
2243
2245
|
tabIndex: -1,
|
|
2244
2246
|
children: [
|
|
2245
|
-
(n ||
|
|
2247
|
+
(n || x) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-6 pb-0", children: [
|
|
2246
2248
|
n && /* @__PURE__ */ e(
|
|
2247
2249
|
"span",
|
|
2248
2250
|
{
|
|
@@ -2251,7 +2253,7 @@ function Fe({
|
|
|
2251
2253
|
children: n
|
|
2252
2254
|
}
|
|
2253
2255
|
),
|
|
2254
|
-
|
|
2256
|
+
x && /* @__PURE__ */ e(
|
|
2255
2257
|
"button",
|
|
2256
2258
|
{
|
|
2257
2259
|
onClick: r,
|
|
@@ -2312,20 +2314,20 @@ const Qt = {
|
|
|
2312
2314
|
underline: f = !1,
|
|
2313
2315
|
lineHeight: p = "normal",
|
|
2314
2316
|
as: N,
|
|
2315
|
-
className:
|
|
2316
|
-
children:
|
|
2317
|
-
...
|
|
2317
|
+
className: x,
|
|
2318
|
+
children: d,
|
|
2319
|
+
...h
|
|
2318
2320
|
}) => {
|
|
2319
|
-
const
|
|
2321
|
+
const y = N || sr(t), C = t === "caption", g = t === "label", v = t === "code", $ = u(
|
|
2320
2322
|
"font-sans",
|
|
2321
2323
|
// Variant — caption and label pin their own size/weight
|
|
2322
2324
|
C && "text-xs text-text-subtle",
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
+
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2326
|
+
v && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2325
2327
|
// Size — only where the variant does not pin it
|
|
2326
|
-
!C && !
|
|
2328
|
+
!C && !g && !v && Qt[r],
|
|
2327
2329
|
// Weight — label owns its weight
|
|
2328
|
-
!
|
|
2330
|
+
!g && er[n],
|
|
2329
2331
|
tr[s],
|
|
2330
2332
|
rr[a],
|
|
2331
2333
|
// Line height only overrides the body variant
|
|
@@ -2333,9 +2335,9 @@ const Qt = {
|
|
|
2333
2335
|
c && "italic",
|
|
2334
2336
|
f && "underline",
|
|
2335
2337
|
l && "truncate",
|
|
2336
|
-
|
|
2338
|
+
x
|
|
2337
2339
|
);
|
|
2338
|
-
return /* @__PURE__ */ e(
|
|
2340
|
+
return /* @__PURE__ */ e(y, { className: $, ...h, children: d });
|
|
2339
2341
|
};
|
|
2340
2342
|
function sr(t) {
|
|
2341
2343
|
return {
|
|
@@ -2356,33 +2358,33 @@ const ar = ({
|
|
|
2356
2358
|
onListFiles: f,
|
|
2357
2359
|
onListMounts: p,
|
|
2358
2360
|
onUploadFile: N,
|
|
2359
|
-
onDownloadFile:
|
|
2360
|
-
onRegisterFile:
|
|
2361
|
+
onDownloadFile: x,
|
|
2362
|
+
onRegisterFile: d
|
|
2361
2363
|
}) => {
|
|
2362
|
-
const [
|
|
2364
|
+
const [h, y] = R(!1), [C, g] = R([]), [v, $] = R(null), [D, _] = R("/"), [M, q] = R([]), [V, I] = R(!1), [W, H] = R(""), [X, Z] = R(
|
|
2363
2365
|
typeof t == "object" ? t : null
|
|
2364
|
-
), [Q, b] = R(!1), [
|
|
2366
|
+
), [Q, b] = R(!1), [m, E] = R(""), w = se(null);
|
|
2365
2367
|
Y(() => {
|
|
2366
|
-
|
|
2367
|
-
}, [
|
|
2368
|
-
|
|
2369
|
-
}, [
|
|
2368
|
+
h && P();
|
|
2369
|
+
}, [h]), Y(() => {
|
|
2370
|
+
h && v && k();
|
|
2371
|
+
}, [h, v, D, W]);
|
|
2370
2372
|
const P = async () => {
|
|
2371
2373
|
I(!0);
|
|
2372
2374
|
try {
|
|
2373
2375
|
const o = await p?.();
|
|
2374
|
-
o?.data &&
|
|
2376
|
+
o?.data && g(o.data);
|
|
2375
2377
|
} catch (o) {
|
|
2376
2378
|
console.error("Failed to load mounts", o);
|
|
2377
2379
|
} finally {
|
|
2378
2380
|
I(!1);
|
|
2379
2381
|
}
|
|
2380
2382
|
}, k = async () => {
|
|
2381
|
-
if (
|
|
2383
|
+
if (v) {
|
|
2382
2384
|
I(!0);
|
|
2383
2385
|
try {
|
|
2384
|
-
const o = await f?.({ mountId:
|
|
2385
|
-
o?.data &&
|
|
2386
|
+
const o = await f?.({ mountId: v.id, name: W, path: D });
|
|
2387
|
+
o?.data && q(o.data);
|
|
2386
2388
|
} catch (o) {
|
|
2387
2389
|
console.error("Failed to load files", o);
|
|
2388
2390
|
} finally {
|
|
@@ -2405,7 +2407,7 @@ const ar = ({
|
|
|
2405
2407
|
providerKey: z.name,
|
|
2406
2408
|
ownerId: "me"
|
|
2407
2409
|
};
|
|
2408
|
-
Z(O), r(O, F),
|
|
2410
|
+
Z(O), r(O, F), y(!1);
|
|
2409
2411
|
} catch (B) {
|
|
2410
2412
|
console.error("Local file selection failed", B);
|
|
2411
2413
|
} finally {
|
|
@@ -2414,19 +2416,19 @@ const ar = ({
|
|
|
2414
2416
|
}
|
|
2415
2417
|
}, ne = async (o) => {
|
|
2416
2418
|
const z = o.target.files?.[0];
|
|
2417
|
-
if (!(!z || !
|
|
2419
|
+
if (!(!z || !v)) {
|
|
2418
2420
|
I(!0);
|
|
2419
2421
|
try {
|
|
2420
2422
|
const B = await z.arrayBuffer(), F = await N?.({
|
|
2421
2423
|
file: new Uint8Array(B),
|
|
2422
2424
|
filename: z.name,
|
|
2423
2425
|
mimeType: z.type || "application/octet-stream",
|
|
2424
|
-
mountId:
|
|
2425
|
-
path:
|
|
2426
|
+
mountId: v.id,
|
|
2427
|
+
path: D
|
|
2426
2428
|
});
|
|
2427
2429
|
if (F?.data) {
|
|
2428
2430
|
const O = F.data;
|
|
2429
|
-
Z(O), r(O, new Uint8Array(B)),
|
|
2431
|
+
Z(O), r(O, new Uint8Array(B)), y(!1);
|
|
2430
2432
|
}
|
|
2431
2433
|
} catch (B) {
|
|
2432
2434
|
console.error("Upload failed", B);
|
|
@@ -2435,17 +2437,17 @@ const ar = ({
|
|
|
2435
2437
|
}
|
|
2436
2438
|
}
|
|
2437
2439
|
}, te = async () => {
|
|
2438
|
-
if (!(!
|
|
2440
|
+
if (!(!m || !v)) {
|
|
2439
2441
|
I(!0);
|
|
2440
2442
|
try {
|
|
2441
|
-
const o = `${
|
|
2442
|
-
|
|
2443
|
-
name:
|
|
2443
|
+
const o = `${D}${m}/`;
|
|
2444
|
+
d && (await d({
|
|
2445
|
+
name: m,
|
|
2444
2446
|
type: "folder",
|
|
2445
|
-
path:
|
|
2447
|
+
path: D,
|
|
2446
2448
|
mimeType: "application/x-directory",
|
|
2447
2449
|
size: 0,
|
|
2448
|
-
mountId:
|
|
2450
|
+
mountId: v.id,
|
|
2449
2451
|
providerKey: o,
|
|
2450
2452
|
ownerId: "me"
|
|
2451
2453
|
}), await k()), b(!1), E("");
|
|
@@ -2458,8 +2460,8 @@ const ar = ({
|
|
|
2458
2460
|
}, G = async (o) => {
|
|
2459
2461
|
I(!0);
|
|
2460
2462
|
try {
|
|
2461
|
-
const z = await
|
|
2462
|
-
Z(o), r(o, z),
|
|
2463
|
+
const z = await x?.(o.id);
|
|
2464
|
+
Z(o), r(o, z), y(!1);
|
|
2463
2465
|
} catch (z) {
|
|
2464
2466
|
console.error("Failed to download file", z);
|
|
2465
2467
|
} finally {
|
|
@@ -2467,37 +2469,37 @@ const ar = ({
|
|
|
2467
2469
|
}
|
|
2468
2470
|
}, S = (o) => {
|
|
2469
2471
|
o.stopPropagation(), Z(null), r(null);
|
|
2470
|
-
},
|
|
2472
|
+
}, A = me(() => {
|
|
2471
2473
|
const o = /* @__PURE__ */ new Set(), z = [];
|
|
2472
2474
|
return M.forEach((B) => {
|
|
2473
2475
|
if (B.type === "folder") {
|
|
2474
|
-
B.path ===
|
|
2476
|
+
B.path === D && o.add(B.name);
|
|
2475
2477
|
return;
|
|
2476
2478
|
}
|
|
2477
|
-
const F = B.providerKey || B.name, re = (
|
|
2479
|
+
const F = B.providerKey || B.name, re = (D ? F.substring(D.length) : F).split("/").filter((ie) => ie !== "");
|
|
2478
2480
|
re.length > 1 ? o.add(re[0]) : re.length === 1 && z.push(B);
|
|
2479
2481
|
}), {
|
|
2480
2482
|
folders: Array.from(o).sort(),
|
|
2481
2483
|
files: z.sort((B, F) => B.name.localeCompare(F.name))
|
|
2482
2484
|
};
|
|
2483
|
-
}, [M,
|
|
2485
|
+
}, [M, D]), L = (o) => {
|
|
2484
2486
|
_((z) => `${z}${o}/`);
|
|
2485
|
-
},
|
|
2486
|
-
const o =
|
|
2487
|
+
}, T = () => {
|
|
2488
|
+
const o = D.split("/").filter((z) => z !== "");
|
|
2487
2489
|
o.pop(), o.length === 0 ? _("/") : _(`${o.join("/")}/`);
|
|
2488
|
-
},
|
|
2489
|
-
const o =
|
|
2490
|
+
}, U = me(() => {
|
|
2491
|
+
const o = A.folders.map((z) => ({
|
|
2490
2492
|
id: `folder-${z}`,
|
|
2491
2493
|
name: z,
|
|
2492
2494
|
type: "folder"
|
|
2493
2495
|
}));
|
|
2494
|
-
return
|
|
2496
|
+
return A.files.forEach((z) => {
|
|
2495
2497
|
o.push({
|
|
2496
2498
|
...z,
|
|
2497
2499
|
type: "file"
|
|
2498
2500
|
});
|
|
2499
2501
|
}), o;
|
|
2500
|
-
}, [
|
|
2502
|
+
}, [A]), j = [
|
|
2501
2503
|
{
|
|
2502
2504
|
id: "name",
|
|
2503
2505
|
header: "Name",
|
|
@@ -2511,7 +2513,7 @@ const ar = ({
|
|
|
2511
2513
|
color: z.type === "folder" ? "warning" : "secondary"
|
|
2512
2514
|
}
|
|
2513
2515
|
),
|
|
2514
|
-
/* @__PURE__ */ e("span", { className:
|
|
2516
|
+
/* @__PURE__ */ e("span", { className: u(z.type === "folder" && "font-medium"), children: o })
|
|
2515
2517
|
] })
|
|
2516
2518
|
},
|
|
2517
2519
|
{
|
|
@@ -2557,7 +2559,7 @@ const ar = ({
|
|
|
2557
2559
|
header: "",
|
|
2558
2560
|
accessor: "id",
|
|
2559
2561
|
align: "right",
|
|
2560
|
-
cell: (o, z) => /* @__PURE__ */ e(ee, { size: "sm", variant: "outline", onClick: () =>
|
|
2562
|
+
cell: (o, z) => /* @__PURE__ */ e(ee, { size: "sm", variant: "outline", onClick: () => $(z), children: "Open" })
|
|
2561
2563
|
}
|
|
2562
2564
|
];
|
|
2563
2565
|
return /* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
@@ -2565,8 +2567,8 @@ const ar = ({
|
|
|
2565
2567
|
/* @__PURE__ */ i(
|
|
2566
2568
|
"div",
|
|
2567
2569
|
{
|
|
2568
|
-
onClick: () => !l &&
|
|
2569
|
-
className:
|
|
2570
|
+
onClick: () => !l && y(!0),
|
|
2571
|
+
className: u(
|
|
2570
2572
|
"flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
|
|
2571
2573
|
"hover:border-border-strong bg-surface",
|
|
2572
2574
|
a ? "border-danger-border" : "border-border",
|
|
@@ -2590,11 +2592,11 @@ const ar = ({
|
|
|
2590
2592
|
/* @__PURE__ */ e(
|
|
2591
2593
|
Fe,
|
|
2592
2594
|
{
|
|
2593
|
-
open:
|
|
2595
|
+
open: h,
|
|
2594
2596
|
onClose: () => {
|
|
2595
|
-
|
|
2597
|
+
y(!1), $(null), _("/"), b(!1);
|
|
2596
2598
|
},
|
|
2597
|
-
title:
|
|
2599
|
+
title: v ? `Explorer: ${v.name}` : "Select Storage Mount",
|
|
2598
2600
|
size: "lg",
|
|
2599
2601
|
children: /* @__PURE__ */ e(
|
|
2600
2602
|
Xt,
|
|
@@ -2604,7 +2606,7 @@ const ar = ({
|
|
|
2604
2606
|
{
|
|
2605
2607
|
id: "remote",
|
|
2606
2608
|
label: "Platform Storage",
|
|
2607
|
-
content: /* @__PURE__ */ e("div", { className: "space-y-4", children:
|
|
2609
|
+
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: v ? /* @__PURE__ */ i(fe, { children: [
|
|
2608
2610
|
/* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2609
2611
|
/* @__PURE__ */ e(
|
|
2610
2612
|
ee,
|
|
@@ -2612,13 +2614,13 @@ const ar = ({
|
|
|
2612
2614
|
variant: "ghost",
|
|
2613
2615
|
size: "sm",
|
|
2614
2616
|
onClick: () => {
|
|
2615
|
-
|
|
2617
|
+
D && D !== "/" ? T() : $(null);
|
|
2616
2618
|
},
|
|
2617
2619
|
leftIcon: /* @__PURE__ */ e(J, { icon: ze, size: "xs" }),
|
|
2618
|
-
children:
|
|
2620
|
+
children: D ? "Back" : "Back to Mounts"
|
|
2619
2621
|
}
|
|
2620
2622
|
),
|
|
2621
|
-
/* @__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:
|
|
2623
|
+
/* @__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: D }) }),
|
|
2622
2624
|
/* @__PURE__ */ e("div", { className: "flex-grow min-w-40", children: /* @__PURE__ */ e(
|
|
2623
2625
|
he,
|
|
2624
2626
|
{
|
|
@@ -2671,7 +2673,7 @@ const ar = ({
|
|
|
2671
2673
|
{
|
|
2672
2674
|
size: "sm",
|
|
2673
2675
|
placeholder: "Folder name",
|
|
2674
|
-
value:
|
|
2676
|
+
value: m,
|
|
2675
2677
|
onChange: (o) => E(o.target.value),
|
|
2676
2678
|
autoFocus: !0
|
|
2677
2679
|
}
|
|
@@ -2682,7 +2684,7 @@ const ar = ({
|
|
|
2682
2684
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2683
2685
|
Te,
|
|
2684
2686
|
{
|
|
2685
|
-
data:
|
|
2687
|
+
data: U,
|
|
2686
2688
|
columns: j,
|
|
2687
2689
|
loading: V,
|
|
2688
2690
|
emptyContent: "This folder is empty",
|
|
@@ -2696,7 +2698,7 @@ const ar = ({
|
|
|
2696
2698
|
columns: K,
|
|
2697
2699
|
loading: V,
|
|
2698
2700
|
emptyContent: "No storage mounts configured",
|
|
2699
|
-
onRowClick: (o) =>
|
|
2701
|
+
onRowClick: (o) => $(o)
|
|
2700
2702
|
}
|
|
2701
2703
|
) }) })
|
|
2702
2704
|
},
|
|
@@ -2749,18 +2751,18 @@ const ar = ({
|
|
|
2749
2751
|
labelClassName: f,
|
|
2750
2752
|
className: p,
|
|
2751
2753
|
id: N,
|
|
2752
|
-
rows:
|
|
2753
|
-
...
|
|
2754
|
-
},
|
|
2755
|
-
const
|
|
2756
|
-
return /* @__PURE__ */ i("div", { className:
|
|
2754
|
+
rows: x = 4,
|
|
2755
|
+
...d
|
|
2756
|
+
}, h) => {
|
|
2757
|
+
const y = le.useId(), C = N || `textarea-${y}`, g = !!n, v = n || r ? `${C}-description` : void 0;
|
|
2758
|
+
return /* @__PURE__ */ i("div", { className: u("flex flex-col", a && "w-full", c), children: [
|
|
2757
2759
|
t && /* @__PURE__ */ e(
|
|
2758
2760
|
"label",
|
|
2759
2761
|
{
|
|
2760
2762
|
htmlFor: C,
|
|
2761
|
-
className:
|
|
2763
|
+
className: u(
|
|
2762
2764
|
Oe,
|
|
2763
|
-
|
|
2765
|
+
g ? "text-danger-fg" : "text-text-subtle",
|
|
2764
2766
|
f
|
|
2765
2767
|
),
|
|
2766
2768
|
children: t
|
|
@@ -2770,22 +2772,22 @@ const ar = ({
|
|
|
2770
2772
|
/* @__PURE__ */ e(
|
|
2771
2773
|
"textarea",
|
|
2772
2774
|
{
|
|
2773
|
-
ref:
|
|
2775
|
+
ref: h,
|
|
2774
2776
|
id: C,
|
|
2775
|
-
rows:
|
|
2776
|
-
"aria-invalid":
|
|
2777
|
-
"aria-describedby":
|
|
2778
|
-
className:
|
|
2777
|
+
rows: x,
|
|
2778
|
+
"aria-invalid": g || void 0,
|
|
2779
|
+
"aria-describedby": v,
|
|
2780
|
+
className: u(
|
|
2779
2781
|
"block w-full resize-y rounded-md border bg-surface-input text-text",
|
|
2780
2782
|
"transition-colors duration-fast ease-out",
|
|
2781
2783
|
"placeholder:text-text-subtle",
|
|
2782
2784
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
2783
2785
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
2784
2786
|
lr[s],
|
|
2785
|
-
|
|
2787
|
+
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2786
2788
|
p
|
|
2787
2789
|
),
|
|
2788
|
-
...
|
|
2790
|
+
...d
|
|
2789
2791
|
}
|
|
2790
2792
|
),
|
|
2791
2793
|
l && /* @__PURE__ */ e(
|
|
@@ -2799,8 +2801,8 @@ const ar = ({
|
|
|
2799
2801
|
(n || r) && /* @__PURE__ */ e(
|
|
2800
2802
|
"p",
|
|
2801
2803
|
{
|
|
2802
|
-
id:
|
|
2803
|
-
className:
|
|
2804
|
+
id: v,
|
|
2805
|
+
className: u("mt-1 text-xs", g ? "text-danger-fg" : "text-text-subtle"),
|
|
2804
2806
|
children: n || r
|
|
2805
2807
|
}
|
|
2806
2808
|
)
|
|
@@ -2844,40 +2846,40 @@ const Qr = ({
|
|
|
2844
2846
|
submitButton: f = { label: "Submit", variant: "primary" },
|
|
2845
2847
|
cancelButton: p = { label: "Cancel", variant: "outline" },
|
|
2846
2848
|
showButtons: N = !0,
|
|
2847
|
-
layout:
|
|
2848
|
-
size:
|
|
2849
|
-
loading:
|
|
2850
|
-
className:
|
|
2849
|
+
layout: x = "vertical",
|
|
2850
|
+
size: d = "md",
|
|
2851
|
+
loading: h = !1,
|
|
2852
|
+
className: y,
|
|
2851
2853
|
ref: C,
|
|
2852
|
-
sdk:
|
|
2854
|
+
sdk: g
|
|
2853
2855
|
}) => {
|
|
2854
|
-
const [
|
|
2856
|
+
const [v, $] = R(r || {}), [D, _] = R({}), [M, q] = R({});
|
|
2855
2857
|
Y(() => {
|
|
2856
|
-
r &&
|
|
2858
|
+
r && $({ ...r });
|
|
2857
2859
|
}, [r]);
|
|
2858
2860
|
const V = ce(
|
|
2859
|
-
(b,
|
|
2861
|
+
(b, m, E) => {
|
|
2860
2862
|
const w = t.flatMap((P) => P.items).find((P) => P.name === b);
|
|
2861
2863
|
if (!w) return null;
|
|
2862
|
-
if (w.required && (
|
|
2864
|
+
if (w.required && (m == null || m === ""))
|
|
2863
2865
|
return `${w.label} is required`;
|
|
2864
2866
|
if (w.type === "array") {
|
|
2865
|
-
if (w.required && (!
|
|
2867
|
+
if (w.required && (!m || m.length === 0))
|
|
2866
2868
|
return `${w.label} cannot be empty.`;
|
|
2867
|
-
if (
|
|
2869
|
+
if (m && !Array.isArray(m))
|
|
2868
2870
|
return `${w.label} must be an array.`;
|
|
2869
|
-
if (Array.isArray(
|
|
2871
|
+
if (Array.isArray(m) && w.arrayFields) {
|
|
2870
2872
|
const P = [];
|
|
2871
2873
|
let k = !1;
|
|
2872
|
-
if (
|
|
2874
|
+
if (m.forEach((ae, ne) => {
|
|
2873
2875
|
const te = {};
|
|
2874
2876
|
for (const G of w.arrayFields) {
|
|
2875
2877
|
const S = ae?.[G.name];
|
|
2876
2878
|
if (G.required && (S == null || S === ""))
|
|
2877
2879
|
te[G.name] = `${G.label} is required`, k = !0;
|
|
2878
2880
|
else if (G.validator) {
|
|
2879
|
-
const
|
|
2880
|
-
|
|
2881
|
+
const A = G.validator(S, ae);
|
|
2882
|
+
A && (te[G.name] = A, k = !0);
|
|
2881
2883
|
}
|
|
2882
2884
|
}
|
|
2883
2885
|
P[ne] = te;
|
|
@@ -2885,52 +2887,52 @@ const Qr = ({
|
|
|
2885
2887
|
return JSON.stringify(P);
|
|
2886
2888
|
}
|
|
2887
2889
|
}
|
|
2888
|
-
return w.validator ? w.validator(
|
|
2890
|
+
return w.validator ? w.validator(m, E) : null;
|
|
2889
2891
|
},
|
|
2890
2892
|
[t]
|
|
2891
2893
|
), I = ce(
|
|
2892
|
-
(b,
|
|
2894
|
+
(b, m) => {
|
|
2893
2895
|
let E = or(
|
|
2894
|
-
|
|
2896
|
+
v,
|
|
2895
2897
|
b,
|
|
2896
|
-
|
|
2898
|
+
m
|
|
2897
2899
|
);
|
|
2898
|
-
t.flatMap((k) => k.items).find((k) => k.name === b)?.removeIfEmpty && (
|
|
2899
|
-
const P = V(b,
|
|
2900
|
+
t.flatMap((k) => k.items).find((k) => k.name === b)?.removeIfEmpty && (m == null || m === "") && (E = cr(E, b)), $(E), q((k) => ({ ...k, [b]: !0 }));
|
|
2901
|
+
const P = V(b, m, E);
|
|
2900
2902
|
_((k) => ({
|
|
2901
2903
|
...k,
|
|
2902
2904
|
[b]: P || ""
|
|
2903
2905
|
})), a?.(E, b);
|
|
2904
2906
|
},
|
|
2905
|
-
[
|
|
2907
|
+
[v, t, V, a]
|
|
2906
2908
|
), W = ce(
|
|
2907
2909
|
async (b) => {
|
|
2908
|
-
if (b.preventDefault(),
|
|
2909
|
-
const
|
|
2910
|
+
if (b.preventDefault(), h) return;
|
|
2911
|
+
const m = {}, E = t.flatMap((P) => P.items);
|
|
2910
2912
|
for (const P of E) {
|
|
2911
|
-
if (P.hidden || P.conditional && !P.conditional(
|
|
2913
|
+
if (P.hidden || P.conditional && !P.conditional(v))
|
|
2912
2914
|
continue;
|
|
2913
2915
|
const k = V(
|
|
2914
2916
|
P.name,
|
|
2915
|
-
Ae(
|
|
2916
|
-
|
|
2917
|
+
Ae(v, P.name),
|
|
2918
|
+
v
|
|
2917
2919
|
);
|
|
2918
|
-
k && (
|
|
2920
|
+
k && (m[P.name] = k);
|
|
2919
2921
|
}
|
|
2920
2922
|
if (c) {
|
|
2921
|
-
const P = c(
|
|
2922
|
-
P && Object.assign(
|
|
2923
|
+
const P = c(v);
|
|
2924
|
+
P && Object.assign(m, P);
|
|
2923
2925
|
}
|
|
2924
|
-
if (_(
|
|
2926
|
+
if (_(m), Object.keys(m).some((P) => m[P]))
|
|
2925
2927
|
return;
|
|
2926
|
-
const w = l ? l(
|
|
2927
|
-
await n?.(
|
|
2928
|
+
const w = l ? l(v) : v;
|
|
2929
|
+
await n?.(v, w);
|
|
2928
2930
|
},
|
|
2929
|
-
[
|
|
2931
|
+
[v, t, V, c, l, n, h]
|
|
2930
2932
|
), H = ce(
|
|
2931
2933
|
(b) => {
|
|
2932
|
-
const
|
|
2933
|
-
value:
|
|
2934
|
+
const m = Ae(v, b.name), E = M[b.name] ? D[b.name] : void 0, w = b.disabled || h, P = {
|
|
2935
|
+
value: m || "",
|
|
2934
2936
|
disabled: w,
|
|
2935
2937
|
required: b.required,
|
|
2936
2938
|
placeholder: b.placeholder,
|
|
@@ -2951,7 +2953,7 @@ const Qr = ({
|
|
|
2951
2953
|
type: b.textType || b.type,
|
|
2952
2954
|
autoComplete: b.autocomplete,
|
|
2953
2955
|
error: E,
|
|
2954
|
-
size:
|
|
2956
|
+
size: d
|
|
2955
2957
|
}
|
|
2956
2958
|
);
|
|
2957
2959
|
case "textarea":
|
|
@@ -2962,7 +2964,7 @@ const Qr = ({
|
|
|
2962
2964
|
onChange: (k) => I(b.name, k.target.value),
|
|
2963
2965
|
rows: 4,
|
|
2964
2966
|
error: E,
|
|
2965
|
-
size:
|
|
2967
|
+
size: d
|
|
2966
2968
|
}
|
|
2967
2969
|
);
|
|
2968
2970
|
case "select":
|
|
@@ -2979,7 +2981,7 @@ const Qr = ({
|
|
|
2979
2981
|
multiple: b.multiple,
|
|
2980
2982
|
allowCreate: b.allowCreate,
|
|
2981
2983
|
error: E,
|
|
2982
|
-
size:
|
|
2984
|
+
size: d
|
|
2983
2985
|
}
|
|
2984
2986
|
);
|
|
2985
2987
|
case "checkbox":
|
|
@@ -2987,9 +2989,9 @@ const Qr = ({
|
|
|
2987
2989
|
xe,
|
|
2988
2990
|
{
|
|
2989
2991
|
...P,
|
|
2990
|
-
checked: !!
|
|
2992
|
+
checked: !!m,
|
|
2991
2993
|
onChange: (k) => I(b.name, k.target.checked),
|
|
2992
|
-
size:
|
|
2994
|
+
size: d
|
|
2993
2995
|
}
|
|
2994
2996
|
);
|
|
2995
2997
|
case "radio":
|
|
@@ -3004,7 +3006,7 @@ const Qr = ({
|
|
|
3004
3006
|
type: "radio",
|
|
3005
3007
|
name: b.name,
|
|
3006
3008
|
value: k.value,
|
|
3007
|
-
checked:
|
|
3009
|
+
checked: m === k.value,
|
|
3008
3010
|
onChange: () => I(b.name, k.value),
|
|
3009
3011
|
disabled: w || k.disabled,
|
|
3010
3012
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -3020,9 +3022,9 @@ const Qr = ({
|
|
|
3020
3022
|
Ce,
|
|
3021
3023
|
{
|
|
3022
3024
|
...P,
|
|
3023
|
-
value:
|
|
3025
|
+
value: m ? new Date(m) : null,
|
|
3024
3026
|
onChange: (k) => I(b.name, k),
|
|
3025
|
-
size:
|
|
3027
|
+
size: d
|
|
3026
3028
|
}
|
|
3027
3029
|
);
|
|
3028
3030
|
case "file":
|
|
@@ -3030,28 +3032,28 @@ const Qr = ({
|
|
|
3030
3032
|
ar,
|
|
3031
3033
|
{
|
|
3032
3034
|
...P,
|
|
3033
|
-
value:
|
|
3035
|
+
value: m,
|
|
3034
3036
|
onChange: (k) => I(b.name, k),
|
|
3035
3037
|
error: E,
|
|
3036
|
-
onListFiles: (k) =>
|
|
3038
|
+
onListFiles: (k) => g?.http.invoke({
|
|
3037
3039
|
method: "POST",
|
|
3038
3040
|
action: "storage.file.list",
|
|
3039
3041
|
body: k
|
|
3040
3042
|
}),
|
|
3041
|
-
onListMounts: () =>
|
|
3043
|
+
onListMounts: () => g?.http.invoke({
|
|
3042
3044
|
method: "GET",
|
|
3043
3045
|
action: "storage.mount"
|
|
3044
3046
|
}),
|
|
3045
|
-
onUploadFile: (k) =>
|
|
3047
|
+
onUploadFile: (k) => g?.http.invoke({
|
|
3046
3048
|
method: "POST",
|
|
3047
3049
|
action: "storage.file.upload",
|
|
3048
3050
|
body: k
|
|
3049
3051
|
}),
|
|
3050
|
-
onDownloadFile: (k) =>
|
|
3052
|
+
onDownloadFile: (k) => g?.http.invoke({
|
|
3051
3053
|
method: "GET",
|
|
3052
3054
|
action: `storage.file.${k}.download`
|
|
3053
3055
|
}),
|
|
3054
|
-
onRegisterFile: (k) =>
|
|
3056
|
+
onRegisterFile: (k) => g?.http.invoke({
|
|
3055
3057
|
method: "POST",
|
|
3056
3058
|
action: "storage.file.folder",
|
|
3057
3059
|
body: k
|
|
@@ -3062,26 +3064,26 @@ const Qr = ({
|
|
|
3062
3064
|
return /* @__PURE__ */ e(
|
|
3063
3065
|
It,
|
|
3064
3066
|
{
|
|
3065
|
-
value:
|
|
3067
|
+
value: m || {},
|
|
3066
3068
|
onChange: (k) => I(b.name, k),
|
|
3067
|
-
onListFolders: () =>
|
|
3069
|
+
onListFolders: () => g?.http.invoke({
|
|
3068
3070
|
method: "GET",
|
|
3069
3071
|
action: "storage.mount"
|
|
3070
3072
|
}),
|
|
3071
3073
|
disabled: w,
|
|
3072
|
-
size:
|
|
3074
|
+
size: d,
|
|
3073
3075
|
placeholder: b.placeholder
|
|
3074
3076
|
}
|
|
3075
3077
|
);
|
|
3076
3078
|
case "custom":
|
|
3077
3079
|
return b.customComponent?.({
|
|
3078
|
-
value:
|
|
3080
|
+
value: m,
|
|
3079
3081
|
onChange: (k) => I(b.name, k),
|
|
3080
3082
|
error: E,
|
|
3081
3083
|
disabled: w
|
|
3082
3084
|
});
|
|
3083
3085
|
case "array": {
|
|
3084
|
-
const k =
|
|
3086
|
+
const k = m || [];
|
|
3085
3087
|
let ae = [];
|
|
3086
3088
|
if (typeof E == "string" && E.startsWith("["))
|
|
3087
3089
|
try {
|
|
@@ -3093,30 +3095,30 @@ const Qr = ({
|
|
|
3093
3095
|
}, te = (S) => {
|
|
3094
3096
|
I(
|
|
3095
3097
|
b.name,
|
|
3096
|
-
k.filter((
|
|
3098
|
+
k.filter((A, L) => L !== S)
|
|
3097
3099
|
);
|
|
3098
|
-
}, G = (S,
|
|
3099
|
-
const
|
|
3100
|
-
|
|
3101
|
-
...
|
|
3102
|
-
[
|
|
3103
|
-
}, I(b.name,
|
|
3100
|
+
}, G = (S, A, L) => {
|
|
3101
|
+
const T = [...k];
|
|
3102
|
+
T[S] = {
|
|
3103
|
+
...T[S],
|
|
3104
|
+
[A]: L
|
|
3105
|
+
}, I(b.name, T);
|
|
3104
3106
|
};
|
|
3105
3107
|
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
3106
|
-
k.map((S,
|
|
3108
|
+
k.map((S, A) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
|
|
3107
3109
|
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: b.arrayFields?.map((L) => {
|
|
3108
|
-
const
|
|
3110
|
+
const T = ae?.[A]?.[L.name];
|
|
3109
3111
|
return /* @__PURE__ */ i(
|
|
3110
3112
|
"div",
|
|
3111
3113
|
{
|
|
3112
3114
|
className: "flex flex-col gap-1",
|
|
3113
3115
|
children: [
|
|
3114
|
-
|
|
3116
|
+
A === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3115
3117
|
L.label,
|
|
3116
3118
|
L.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3117
3119
|
] }),
|
|
3118
3120
|
(() => {
|
|
3119
|
-
const
|
|
3121
|
+
const U = {
|
|
3120
3122
|
value: S?.[L.name] || "",
|
|
3121
3123
|
disabled: w,
|
|
3122
3124
|
required: L.required,
|
|
@@ -3133,40 +3135,40 @@ const Qr = ({
|
|
|
3133
3135
|
return /* @__PURE__ */ e(
|
|
3134
3136
|
he,
|
|
3135
3137
|
{
|
|
3136
|
-
...
|
|
3138
|
+
...U,
|
|
3137
3139
|
onChange: (j) => G(
|
|
3138
|
-
|
|
3140
|
+
A,
|
|
3139
3141
|
L.name,
|
|
3140
3142
|
j.target.value
|
|
3141
3143
|
),
|
|
3142
3144
|
type: L.textType || L.type,
|
|
3143
3145
|
autoComplete: L.autocomplete,
|
|
3144
|
-
error:
|
|
3145
|
-
size:
|
|
3146
|
+
error: T,
|
|
3147
|
+
size: d
|
|
3146
3148
|
}
|
|
3147
3149
|
);
|
|
3148
3150
|
case "textarea":
|
|
3149
3151
|
return /* @__PURE__ */ e(
|
|
3150
3152
|
Se,
|
|
3151
3153
|
{
|
|
3152
|
-
...
|
|
3154
|
+
...U,
|
|
3153
3155
|
onChange: (j) => G(
|
|
3154
|
-
|
|
3156
|
+
A,
|
|
3155
3157
|
L.name,
|
|
3156
3158
|
j.target.value
|
|
3157
3159
|
),
|
|
3158
3160
|
rows: 4,
|
|
3159
|
-
error:
|
|
3160
|
-
size:
|
|
3161
|
+
error: T,
|
|
3162
|
+
size: d
|
|
3161
3163
|
}
|
|
3162
3164
|
);
|
|
3163
3165
|
case "select":
|
|
3164
3166
|
return /* @__PURE__ */ e(
|
|
3165
3167
|
pe,
|
|
3166
3168
|
{
|
|
3167
|
-
...
|
|
3169
|
+
...U,
|
|
3168
3170
|
onChange: (j) => G(
|
|
3169
|
-
|
|
3171
|
+
A,
|
|
3170
3172
|
L.name,
|
|
3171
3173
|
j
|
|
3172
3174
|
),
|
|
@@ -3179,22 +3181,22 @@ const Qr = ({
|
|
|
3179
3181
|
searchable: L.searchable,
|
|
3180
3182
|
multiple: L.multiple,
|
|
3181
3183
|
allowCreate: L.allowCreate,
|
|
3182
|
-
error:
|
|
3183
|
-
size:
|
|
3184
|
+
error: T,
|
|
3185
|
+
size: d
|
|
3184
3186
|
}
|
|
3185
3187
|
);
|
|
3186
3188
|
case "checkbox":
|
|
3187
3189
|
return /* @__PURE__ */ e(
|
|
3188
3190
|
xe,
|
|
3189
3191
|
{
|
|
3190
|
-
...
|
|
3192
|
+
...U,
|
|
3191
3193
|
checked: !!S?.[L.name],
|
|
3192
3194
|
onChange: (j) => G(
|
|
3193
|
-
|
|
3195
|
+
A,
|
|
3194
3196
|
L.name,
|
|
3195
3197
|
j.target.checked
|
|
3196
3198
|
),
|
|
3197
|
-
size:
|
|
3199
|
+
size: d
|
|
3198
3200
|
}
|
|
3199
3201
|
);
|
|
3200
3202
|
case "radio":
|
|
@@ -3207,11 +3209,11 @@ const Qr = ({
|
|
|
3207
3209
|
"input",
|
|
3208
3210
|
{
|
|
3209
3211
|
type: "radio",
|
|
3210
|
-
name: `${b.name}.${
|
|
3212
|
+
name: `${b.name}.${A}.${L.name}`,
|
|
3211
3213
|
value: j.value,
|
|
3212
3214
|
checked: S?.[L.name] === j.value,
|
|
3213
3215
|
onChange: () => G(
|
|
3214
|
-
|
|
3216
|
+
A,
|
|
3215
3217
|
L.name,
|
|
3216
3218
|
j.value
|
|
3217
3219
|
),
|
|
@@ -3229,14 +3231,14 @@ const Qr = ({
|
|
|
3229
3231
|
return /* @__PURE__ */ e(
|
|
3230
3232
|
Ce,
|
|
3231
3233
|
{
|
|
3232
|
-
...
|
|
3234
|
+
...U,
|
|
3233
3235
|
value: j ? new Date(j) : null,
|
|
3234
3236
|
onChange: (K) => G(
|
|
3235
|
-
|
|
3237
|
+
A,
|
|
3236
3238
|
L.name,
|
|
3237
3239
|
K
|
|
3238
3240
|
),
|
|
3239
|
-
size:
|
|
3241
|
+
size: d
|
|
3240
3242
|
}
|
|
3241
3243
|
);
|
|
3242
3244
|
}
|
|
@@ -3244,11 +3246,11 @@ const Qr = ({
|
|
|
3244
3246
|
return L.customComponent?.({
|
|
3245
3247
|
value: S?.[L.name],
|
|
3246
3248
|
onChange: (j) => G(
|
|
3247
|
-
|
|
3249
|
+
A,
|
|
3248
3250
|
L.name,
|
|
3249
3251
|
j
|
|
3250
3252
|
),
|
|
3251
|
-
error:
|
|
3253
|
+
error: T,
|
|
3252
3254
|
disabled: w
|
|
3253
3255
|
});
|
|
3254
3256
|
// Add other field types here as needed
|
|
@@ -3260,7 +3262,7 @@ const Qr = ({
|
|
|
3260
3262
|
] });
|
|
3261
3263
|
}
|
|
3262
3264
|
})(),
|
|
3263
|
-
|
|
3265
|
+
T && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: T })
|
|
3264
3266
|
]
|
|
3265
3267
|
},
|
|
3266
3268
|
L.name
|
|
@@ -3274,13 +3276,13 @@ const Qr = ({
|
|
|
3274
3276
|
variant: "ghost",
|
|
3275
3277
|
size: "md",
|
|
3276
3278
|
"aria-label": `${b.label} verwijderen`,
|
|
3277
|
-
onClick: () => te(
|
|
3279
|
+
onClick: () => te(A),
|
|
3278
3280
|
disabled: w,
|
|
3279
|
-
className:
|
|
3281
|
+
className: u("shrink-0", A === 0 && "mt-5"),
|
|
3280
3282
|
children: /* @__PURE__ */ e(st, { className: "size-icon-md" })
|
|
3281
3283
|
}
|
|
3282
3284
|
)
|
|
3283
|
-
] },
|
|
3285
|
+
] }, A)),
|
|
3284
3286
|
/* @__PURE__ */ i(
|
|
3285
3287
|
ee,
|
|
3286
3288
|
{
|
|
@@ -3302,14 +3304,14 @@ const Qr = ({
|
|
|
3302
3304
|
return null;
|
|
3303
3305
|
}
|
|
3304
3306
|
},
|
|
3305
|
-
[
|
|
3307
|
+
[v, M, D, h, d, I]
|
|
3306
3308
|
), X = ce(
|
|
3307
3309
|
(b) => {
|
|
3308
|
-
if (b.conditional && !b.conditional(
|
|
3310
|
+
if (b.conditional && !b.conditional(v))
|
|
3309
3311
|
return null;
|
|
3310
|
-
const
|
|
3311
|
-
if (
|
|
3312
|
-
const E =
|
|
3312
|
+
const m = b.items.filter((w) => !(w.hidden || w.conditional && !w.conditional(v)));
|
|
3313
|
+
if (m.length === 0) return null;
|
|
3314
|
+
const E = u(
|
|
3313
3315
|
b.layout === "flex" ? "flex flex-wrap gap-3" : "grid gap-3",
|
|
3314
3316
|
b.layout !== "flex" && {
|
|
3315
3317
|
"grid-cols-1": !b.columns || b.columns === 1,
|
|
@@ -3328,10 +3330,10 @@ const Qr = ({
|
|
|
3328
3330
|
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children: b.title }),
|
|
3329
3331
|
b.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: b.description })
|
|
3330
3332
|
] }),
|
|
3331
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: E, children:
|
|
3333
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: E, children: m.map((w) => (M[w.name] && D[w.name], /* @__PURE__ */ i(
|
|
3332
3334
|
"div",
|
|
3333
3335
|
{
|
|
3334
|
-
className:
|
|
3336
|
+
className: u(
|
|
3335
3337
|
"flex min-w-0 flex-col gap-1.5",
|
|
3336
3338
|
w.type === "checkbox" && "justify-center"
|
|
3337
3339
|
),
|
|
@@ -3354,17 +3356,17 @@ const Qr = ({
|
|
|
3354
3356
|
b.id
|
|
3355
3357
|
);
|
|
3356
3358
|
},
|
|
3357
|
-
[
|
|
3358
|
-
), Z =
|
|
3359
|
+
[v, M, D, H]
|
|
3360
|
+
), Z = u(
|
|
3359
3361
|
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3360
3362
|
{
|
|
3361
|
-
"max-w-md":
|
|
3362
|
-
"max-w-2xl":
|
|
3363
|
-
"max-w-4xl":
|
|
3364
|
-
"max-w-full":
|
|
3363
|
+
"max-w-md": d === "sm",
|
|
3364
|
+
"max-w-2xl": d === "md",
|
|
3365
|
+
"max-w-4xl": d === "lg",
|
|
3366
|
+
"max-w-full": d === "full"
|
|
3365
3367
|
},
|
|
3366
|
-
|
|
3367
|
-
), Q =
|
|
3368
|
+
y
|
|
3369
|
+
), Q = d === "full" ? "md" : d;
|
|
3368
3370
|
return /* @__PURE__ */ i("form", { ref: C, onSubmit: W, className: Z, children: [
|
|
3369
3371
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(X) }),
|
|
3370
3372
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: N && /* @__PURE__ */ i(fe, { children: [
|
|
@@ -3375,7 +3377,7 @@ const Qr = ({
|
|
|
3375
3377
|
type: "button",
|
|
3376
3378
|
variant: p.variant ?? "ghost",
|
|
3377
3379
|
size: p.size || Q,
|
|
3378
|
-
disabled: p.disabled ||
|
|
3380
|
+
disabled: p.disabled || h,
|
|
3379
3381
|
onClick: s,
|
|
3380
3382
|
className: p.className,
|
|
3381
3383
|
children: p.label
|
|
@@ -3387,8 +3389,8 @@ const Qr = ({
|
|
|
3387
3389
|
type: "submit",
|
|
3388
3390
|
variant: f.variant,
|
|
3389
3391
|
size: f.size || Q,
|
|
3390
|
-
disabled: f.disabled ||
|
|
3391
|
-
loading:
|
|
3392
|
+
disabled: f.disabled || h,
|
|
3393
|
+
loading: h,
|
|
3392
3394
|
className: f.className,
|
|
3393
3395
|
children: f.label
|
|
3394
3396
|
}
|
|
@@ -3468,7 +3470,7 @@ function tn({
|
|
|
3468
3470
|
return /* @__PURE__ */ i(
|
|
3469
3471
|
"span",
|
|
3470
3472
|
{
|
|
3471
|
-
className:
|
|
3473
|
+
className: u(
|
|
3472
3474
|
// Base styles
|
|
3473
3475
|
"inline-flex items-center font-medium rounded-full",
|
|
3474
3476
|
// Variant styles
|
|
@@ -3482,13 +3484,13 @@ function tn({
|
|
|
3482
3484
|
n && /* @__PURE__ */ e(
|
|
3483
3485
|
"span",
|
|
3484
3486
|
{
|
|
3485
|
-
className:
|
|
3487
|
+
className: u(
|
|
3486
3488
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3487
3489
|
ur[t]
|
|
3488
3490
|
)
|
|
3489
3491
|
}
|
|
3490
3492
|
),
|
|
3491
|
-
s && /* @__PURE__ */ e("span", { className:
|
|
3493
|
+
s && /* @__PURE__ */ e("span", { className: u("flex-shrink-0", f && "mr-1"), children: s }),
|
|
3492
3494
|
f,
|
|
3493
3495
|
a && l && /* @__PURE__ */ e(
|
|
3494
3496
|
"button",
|
|
@@ -3520,14 +3522,14 @@ function rn({
|
|
|
3520
3522
|
return /* @__PURE__ */ i(
|
|
3521
3523
|
"div",
|
|
3522
3524
|
{
|
|
3523
|
-
className:
|
|
3525
|
+
className: u(
|
|
3524
3526
|
"flex flex-col items-center gap-2.5 text-center",
|
|
3525
3527
|
l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
|
|
3526
3528
|
c
|
|
3527
3529
|
),
|
|
3528
3530
|
...f,
|
|
3529
3531
|
children: [
|
|
3530
|
-
t != null && /* @__PURE__ */ e("span", { className:
|
|
3532
|
+
t != null && /* @__PURE__ */ e("span", { className: u("flex size-disc items-center justify-center rounded-full text-2xl", mr[r]), children: t }),
|
|
3531
3533
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3532
3534
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3533
3535
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3539,7 +3541,7 @@ function nn({ children: t, className: r, ...n }) {
|
|
|
3539
3541
|
return /* @__PURE__ */ e(
|
|
3540
3542
|
"kbd",
|
|
3541
3543
|
{
|
|
3542
|
-
className:
|
|
3544
|
+
className: u(
|
|
3543
3545
|
"inline-flex items-center rounded border border-border px-1.5 py-px text-xs font-medium leading-none text-text-muted",
|
|
3544
3546
|
r
|
|
3545
3547
|
),
|
|
@@ -3564,12 +3566,12 @@ function sn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3564
3566
|
"aria-valuenow": Math.round(l),
|
|
3565
3567
|
"aria-valuemin": 0,
|
|
3566
3568
|
"aria-valuemax": 100,
|
|
3567
|
-
className:
|
|
3569
|
+
className: u("w-full overflow-hidden rounded-full bg-surface-hover", fr[n], s),
|
|
3568
3570
|
...a,
|
|
3569
3571
|
children: /* @__PURE__ */ e(
|
|
3570
3572
|
"div",
|
|
3571
3573
|
{
|
|
3572
|
-
className:
|
|
3574
|
+
className: u("h-full rounded-full transition-[width] duration-300 ease-out", hr[r]),
|
|
3573
3575
|
style: { width: `${l}%` }
|
|
3574
3576
|
}
|
|
3575
3577
|
)
|
|
@@ -3605,7 +3607,7 @@ function an({
|
|
|
3605
3607
|
return /* @__PURE__ */ i(
|
|
3606
3608
|
"div",
|
|
3607
3609
|
{
|
|
3608
|
-
className:
|
|
3610
|
+
className: u(
|
|
3609
3611
|
"inline-flex items-center",
|
|
3610
3612
|
s ? "flex-col space-y-2" : "",
|
|
3611
3613
|
a
|
|
@@ -3615,7 +3617,7 @@ function an({
|
|
|
3615
3617
|
/* @__PURE__ */ i(
|
|
3616
3618
|
"svg",
|
|
3617
3619
|
{
|
|
3618
|
-
className:
|
|
3620
|
+
className: u(
|
|
3619
3621
|
"animate-spin",
|
|
3620
3622
|
xr[t],
|
|
3621
3623
|
br[r]
|
|
@@ -3650,7 +3652,7 @@ function an({
|
|
|
3650
3652
|
s && /* @__PURE__ */ e(
|
|
3651
3653
|
"span",
|
|
3652
3654
|
{
|
|
3653
|
-
className:
|
|
3655
|
+
className: u(
|
|
3654
3656
|
"text-text-muted",
|
|
3655
3657
|
gr[t]
|
|
3656
3658
|
),
|
|
@@ -3689,7 +3691,7 @@ function ln({
|
|
|
3689
3691
|
role: s ? "img" : void 0,
|
|
3690
3692
|
"aria-label": s,
|
|
3691
3693
|
"aria-hidden": s ? void 0 : !0,
|
|
3692
|
-
className:
|
|
3694
|
+
className: u(
|
|
3693
3695
|
"inline-block size-dot shrink-0",
|
|
3694
3696
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
3695
3697
|
pr[t],
|
|
@@ -3707,10 +3709,10 @@ function on({
|
|
|
3707
3709
|
className: a
|
|
3708
3710
|
}) {
|
|
3709
3711
|
const l = t.indexOf(r), c = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
|
|
3710
|
-
return n === "dots" ? /* @__PURE__ */ e("div", { ...c, className:
|
|
3712
|
+
return n === "dots" ? /* @__PURE__ */ e("div", { ...c, className: u("flex items-center gap-1.5", a), children: t.map((f, p) => /* @__PURE__ */ e(
|
|
3711
3713
|
"span",
|
|
3712
3714
|
{
|
|
3713
|
-
className:
|
|
3715
|
+
className: u(
|
|
3714
3716
|
"h-step-bar rounded-full transition-all duration-fast ease-out",
|
|
3715
3717
|
p === l ? "w-5 bg-accent" : "w-3.5",
|
|
3716
3718
|
p < l && "bg-border-strong",
|
|
@@ -3718,12 +3720,12 @@ function on({
|
|
|
3718
3720
|
)
|
|
3719
3721
|
},
|
|
3720
3722
|
f
|
|
3721
|
-
)) }) : /* @__PURE__ */ e("div", { ...c, className:
|
|
3723
|
+
)) }) : /* @__PURE__ */ e("div", { ...c, className: u("flex items-center gap-2", a), children: t.map((f, p) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
3722
3724
|
/* @__PURE__ */ e(
|
|
3723
3725
|
"span",
|
|
3724
3726
|
{
|
|
3725
3727
|
"aria-current": p === l ? "step" : void 0,
|
|
3726
|
-
className:
|
|
3728
|
+
className: u(
|
|
3727
3729
|
"flex size-tile-sm items-center justify-center rounded-full text-xs font-medium",
|
|
3728
3730
|
p === l && "bg-accent text-accent-fg",
|
|
3729
3731
|
p < l && "bg-accent-soft text-accent",
|
|
@@ -3739,7 +3741,7 @@ function cn({ title: t, icon: r = /* @__PURE__ */ e(lt, { className: "size-icon-
|
|
|
3739
3741
|
return /* @__PURE__ */ i(
|
|
3740
3742
|
"div",
|
|
3741
3743
|
{
|
|
3742
|
-
className:
|
|
3744
|
+
className: u(
|
|
3743
3745
|
"flex flex-col gap-2 rounded-xl border p-4",
|
|
3744
3746
|
"border-assistant-border bg-assistant-soft",
|
|
3745
3747
|
a
|
|
@@ -3768,7 +3770,7 @@ function yr(t) {
|
|
|
3768
3770
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3769
3771
|
}
|
|
3770
3772
|
const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
3771
|
-
const [l, c] = le.useState(!1), f =
|
|
3773
|
+
const [l, c] = le.useState(!1), f = u(
|
|
3772
3774
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover-border-emphasis text-text",
|
|
3773
3775
|
vr[n],
|
|
3774
3776
|
s
|
|
@@ -3779,14 +3781,14 @@ const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3779
3781
|
src: r,
|
|
3780
3782
|
alt: t ?? "",
|
|
3781
3783
|
title: a ?? t,
|
|
3782
|
-
className:
|
|
3784
|
+
className: u(f, "object-cover"),
|
|
3783
3785
|
onError: () => c(!0)
|
|
3784
3786
|
}
|
|
3785
3787
|
) : /* @__PURE__ */ e("span", { className: f, title: a ?? t, "aria-label": t, children: yr(t) });
|
|
3786
3788
|
}, Le = "ring-surface", wr = "ring-surface-accent", dn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3787
3789
|
if (t.length === 0) return null;
|
|
3788
3790
|
const a = t.slice(0, r), l = t.length - a.length;
|
|
3789
|
-
return /* @__PURE__ */ i("span", { className:
|
|
3791
|
+
return /* @__PURE__ */ i("span", { className: u("inline-flex items-center", s), children: [
|
|
3790
3792
|
a.map((c, f) => /* @__PURE__ */ e(
|
|
3791
3793
|
Nr,
|
|
3792
3794
|
{
|
|
@@ -3794,7 +3796,7 @@ const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3794
3796
|
src: c.src,
|
|
3795
3797
|
size: n,
|
|
3796
3798
|
title: c.name ? c.seen === !1 ? `${c.name} — nog niet gelezen` : c.name : void 0,
|
|
3797
|
-
className:
|
|
3799
|
+
className: u(
|
|
3798
3800
|
f > 0 && "-ml-2",
|
|
3799
3801
|
c.owner ? wr : Le,
|
|
3800
3802
|
c.seen === !1 && "opacity-40"
|
|
@@ -3805,7 +3807,7 @@ const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3805
3807
|
l > 0 && /* @__PURE__ */ i(
|
|
3806
3808
|
"span",
|
|
3807
3809
|
{
|
|
3808
|
-
className:
|
|
3810
|
+
className: u(
|
|
3809
3811
|
"inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-surface-hover text-text-muted",
|
|
3810
3812
|
n === "xs" ? "w-5 h-5 text-xs" : n === "md" ? "w-7 h-7 text-xs" : n === "lg" ? "w-9 h-9 text-xs" : "w-6 h-6 text-xs",
|
|
3811
3813
|
Le
|
|
@@ -3834,7 +3836,7 @@ function un({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3834
3836
|
"span",
|
|
3835
3837
|
{
|
|
3836
3838
|
title: a,
|
|
3837
|
-
className:
|
|
3839
|
+
className: u(
|
|
3838
3840
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
3839
3841
|
kr[n],
|
|
3840
3842
|
l.fg,
|
|
@@ -3856,20 +3858,20 @@ const mn = ({
|
|
|
3856
3858
|
fallback: f,
|
|
3857
3859
|
loadingContent: p,
|
|
3858
3860
|
errorContent: N,
|
|
3859
|
-
className:
|
|
3860
|
-
onLoad:
|
|
3861
|
-
onError:
|
|
3862
|
-
...
|
|
3861
|
+
className: x,
|
|
3862
|
+
onLoad: d,
|
|
3863
|
+
onError: h,
|
|
3864
|
+
...y
|
|
3863
3865
|
}) => {
|
|
3864
|
-
const [C,
|
|
3865
|
-
|
|
3866
|
-
},
|
|
3867
|
-
if (
|
|
3868
|
-
_(f),
|
|
3866
|
+
const [C, g] = R(!0), [v, $] = R(!1), [D, _] = R(t), M = (Z) => {
|
|
3867
|
+
g(!1), $(!1), d?.(Z);
|
|
3868
|
+
}, q = (Z) => {
|
|
3869
|
+
if (g(!1), $(!0), f && D !== f) {
|
|
3870
|
+
_(f), $(!1), g(!0);
|
|
3869
3871
|
return;
|
|
3870
3872
|
}
|
|
3871
|
-
|
|
3872
|
-
}, V =
|
|
3873
|
+
h?.(Z);
|
|
3874
|
+
}, V = u(
|
|
3873
3875
|
"relative overflow-hidden bg-surface-hover",
|
|
3874
3876
|
// Size variants
|
|
3875
3877
|
{
|
|
@@ -3896,14 +3898,14 @@ const mn = ({
|
|
|
3896
3898
|
"rounded-xl": a === "xl",
|
|
3897
3899
|
"rounded-full": a === "full"
|
|
3898
3900
|
},
|
|
3899
|
-
|
|
3900
|
-
), I =
|
|
3901
|
+
x
|
|
3902
|
+
), I = u(
|
|
3901
3903
|
"w-full h-full object-cover transition-opacity duration-fast",
|
|
3902
3904
|
{
|
|
3903
|
-
"opacity-0": C ||
|
|
3904
|
-
"opacity-100": !C && !
|
|
3905
|
+
"opacity-0": C || v,
|
|
3906
|
+
"opacity-100": !C && !v
|
|
3905
3907
|
}
|
|
3906
|
-
), W =
|
|
3908
|
+
), W = u(
|
|
3907
3909
|
"absolute inset-0 flex items-center justify-center",
|
|
3908
3910
|
"text-text-muted"
|
|
3909
3911
|
), H = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), X = /* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
@@ -3914,16 +3916,16 @@ const mn = ({
|
|
|
3914
3916
|
/* @__PURE__ */ e(
|
|
3915
3917
|
"img",
|
|
3916
3918
|
{
|
|
3917
|
-
...
|
|
3918
|
-
src:
|
|
3919
|
+
...y,
|
|
3920
|
+
src: D,
|
|
3919
3921
|
alt: r,
|
|
3920
3922
|
className: I,
|
|
3921
3923
|
onLoad: M,
|
|
3922
|
-
onError:
|
|
3924
|
+
onError: q
|
|
3923
3925
|
}
|
|
3924
3926
|
),
|
|
3925
3927
|
C && l && /* @__PURE__ */ e("div", { className: W, children: p || H }),
|
|
3926
|
-
|
|
3928
|
+
v && c && /* @__PURE__ */ e("div", { className: W, children: N || X })
|
|
3927
3929
|
] });
|
|
3928
3930
|
};
|
|
3929
3931
|
function fn({
|
|
@@ -3937,18 +3939,18 @@ function fn({
|
|
|
3937
3939
|
onActiveIndexChange: f,
|
|
3938
3940
|
isActive: p,
|
|
3939
3941
|
unread: N,
|
|
3940
|
-
dimmed:
|
|
3941
|
-
groupBy:
|
|
3942
|
-
groups:
|
|
3943
|
-
renderGroupHeader:
|
|
3942
|
+
dimmed: x,
|
|
3943
|
+
groupBy: d,
|
|
3944
|
+
groups: h,
|
|
3945
|
+
renderGroupHeader: y,
|
|
3944
3946
|
stickyGroupHeaders: C = !1,
|
|
3945
|
-
collapsibleGroups:
|
|
3946
|
-
hideGroupCount:
|
|
3947
|
-
selectable:
|
|
3948
|
-
selectedItems:
|
|
3947
|
+
collapsibleGroups: g = !1,
|
|
3948
|
+
hideGroupCount: v = !1,
|
|
3949
|
+
selectable: $ = !1,
|
|
3950
|
+
selectedItems: D = [],
|
|
3949
3951
|
onSelectionChange: _,
|
|
3950
3952
|
bulkActions: M,
|
|
3951
|
-
header:
|
|
3953
|
+
header: q,
|
|
3952
3954
|
stickyHeader: V = !1,
|
|
3953
3955
|
bordered: I = !1,
|
|
3954
3956
|
emptyContent: W,
|
|
@@ -3957,35 +3959,35 @@ function fn({
|
|
|
3957
3959
|
className: Z,
|
|
3958
3960
|
"aria-label": Q
|
|
3959
3961
|
}) {
|
|
3960
|
-
const [b,
|
|
3962
|
+
const [b, m] = le.useState(
|
|
3961
3963
|
() => Object.fromEntries(
|
|
3962
|
-
(
|
|
3964
|
+
(h ?? []).filter((T) => T.defaultCollapsed).map((T) => [T.id, !0])
|
|
3963
3965
|
)
|
|
3964
|
-
), E = le.useRef(null), w = (
|
|
3965
|
-
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
3966
|
+
), E = le.useRef(null), w = (T) => {
|
|
3967
|
+
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(T.key)) return;
|
|
3966
3968
|
const j = Array.from(
|
|
3967
3969
|
E.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
3968
3970
|
);
|
|
3969
3971
|
if (j.length === 0) return;
|
|
3970
|
-
|
|
3971
|
-
const K = j.indexOf(document.activeElement), o =
|
|
3972
|
+
T.preventDefault();
|
|
3973
|
+
const K = j.indexOf(document.activeElement), o = T.key === "Home" ? 0 : T.key === "End" ? j.length - 1 : T.key === "ArrowDown" ? (K + 1) % j.length : (K - 1 + j.length) % j.length;
|
|
3972
3974
|
j[o]?.focus();
|
|
3973
|
-
}, P = (
|
|
3975
|
+
}, P = (T, U) => r ? r(T, U) : U, k = (T) => D.includes(T), ae = (T, U) => {
|
|
3974
3976
|
_ && _(
|
|
3975
|
-
|
|
3977
|
+
U ? [...D, T] : D.filter((j) => j !== T)
|
|
3976
3978
|
);
|
|
3977
|
-
}, ne = (
|
|
3979
|
+
}, ne = (T) => _?.(T ? [...t] : []), te = u(
|
|
3978
3980
|
"flex flex-col",
|
|
3979
3981
|
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
3980
3982
|
Z
|
|
3981
3983
|
);
|
|
3982
3984
|
if (H)
|
|
3983
|
-
return /* @__PURE__ */ e("div", { className: te, children: Array.from({ length: X }).map((
|
|
3985
|
+
return /* @__PURE__ */ e("div", { className: te, children: Array.from({ length: X }).map((T, U) => /* @__PURE__ */ i(
|
|
3984
3986
|
"div",
|
|
3985
3987
|
{
|
|
3986
|
-
className:
|
|
3988
|
+
className: u(
|
|
3987
3989
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
3988
|
-
n === "divided" &&
|
|
3990
|
+
n === "divided" && U > 0 && "border-t border-border-subtle"
|
|
3989
3991
|
),
|
|
3990
3992
|
children: [
|
|
3991
3993
|
/* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
|
|
@@ -3994,12 +3996,12 @@ function fn({
|
|
|
3994
3996
|
/* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
|
|
3995
3997
|
]
|
|
3996
3998
|
},
|
|
3997
|
-
`skeleton-${
|
|
3999
|
+
`skeleton-${U}`
|
|
3998
4000
|
)) });
|
|
3999
4001
|
if (t.length === 0 && W)
|
|
4000
4002
|
return /* @__PURE__ */ e("div", { className: te, children: W });
|
|
4001
|
-
const G = t.length > 0 &&
|
|
4002
|
-
const K = p?.(
|
|
4003
|
+
const G = t.length > 0 && D.length === t.length, S = D.length > 0 && !G, A = (T, U, j) => {
|
|
4004
|
+
const K = p?.(T, U) ?? !1, o = N?.(T, U) ?? !1, z = x?.(T, U) ?? !1, B = $ && k(T);
|
|
4003
4005
|
return /* @__PURE__ */ i(
|
|
4004
4006
|
"li",
|
|
4005
4007
|
{
|
|
@@ -4008,13 +4010,13 @@ function fn({
|
|
|
4008
4010
|
tabIndex: 0,
|
|
4009
4011
|
"data-list-row": "",
|
|
4010
4012
|
"aria-current": K || void 0,
|
|
4011
|
-
onClick: () => c(
|
|
4012
|
-
onFocus: () => f?.(
|
|
4013
|
+
onClick: () => c(T, U),
|
|
4014
|
+
onFocus: () => f?.(U),
|
|
4013
4015
|
onKeyDown: (F) => {
|
|
4014
|
-
F.key !== "Enter" && F.key !== " " || (F.preventDefault(), c(
|
|
4016
|
+
F.key !== "Enter" && F.key !== " " || (F.preventDefault(), c(T, U));
|
|
4015
4017
|
}
|
|
4016
4018
|
} : {},
|
|
4017
|
-
className:
|
|
4019
|
+
className: u(
|
|
4018
4020
|
"flex items-center gap-3 px-4 py-2 text-base",
|
|
4019
4021
|
"transition-colors duration-fast ease-out",
|
|
4020
4022
|
n === "divided" && !j && "border-t border-border-subtle",
|
|
@@ -4024,11 +4026,11 @@ function fn({
|
|
|
4024
4026
|
z && "opacity-55"
|
|
4025
4027
|
),
|
|
4026
4028
|
children: [
|
|
4027
|
-
|
|
4029
|
+
$ && /* @__PURE__ */ e("span", { onClick: (F) => F.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4028
4030
|
xe,
|
|
4029
4031
|
{
|
|
4030
|
-
checked: k(
|
|
4031
|
-
onChange: (F) => ae(
|
|
4032
|
+
checked: k(T),
|
|
4033
|
+
onChange: (F) => ae(T, F.target.checked),
|
|
4032
4034
|
"aria-label": "Rij selecteren"
|
|
4033
4035
|
}
|
|
4034
4036
|
) }),
|
|
@@ -4039,54 +4041,54 @@ function fn({
|
|
|
4039
4041
|
className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
|
|
4040
4042
|
}
|
|
4041
4043
|
),
|
|
4042
|
-
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(
|
|
4043
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(
|
|
4044
|
-
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(
|
|
4044
|
+
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(T, U) }),
|
|
4045
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(T, U) : String(T) }),
|
|
4046
|
+
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(T, U) })
|
|
4045
4047
|
]
|
|
4046
4048
|
},
|
|
4047
|
-
P(
|
|
4049
|
+
P(T, U)
|
|
4048
4050
|
);
|
|
4049
4051
|
}, L = (() => {
|
|
4050
|
-
if (!
|
|
4051
|
-
return t.map((K, o) =>
|
|
4052
|
-
const
|
|
4052
|
+
if (!d)
|
|
4053
|
+
return t.map((K, o) => A(K, o, o === 0));
|
|
4054
|
+
const T = /* @__PURE__ */ new Map();
|
|
4053
4055
|
t.forEach((K, o) => {
|
|
4054
|
-
const z =
|
|
4055
|
-
|
|
4056
|
+
const z = d(K, o);
|
|
4057
|
+
T.has(z) || T.set(z, []), T.get(z).push({ item: K, index: o });
|
|
4056
4058
|
});
|
|
4057
|
-
const
|
|
4059
|
+
const U = h ?? [];
|
|
4058
4060
|
return [
|
|
4059
|
-
...
|
|
4060
|
-
...[...
|
|
4061
|
+
...U.filter((K) => T.has(K.id)),
|
|
4062
|
+
...[...T.keys()].filter((K) => !U.some((o) => o.id === K)).map((K) => ({ id: K }))
|
|
4061
4063
|
].flatMap((K, o) => {
|
|
4062
|
-
const z =
|
|
4064
|
+
const z = T.get(K.id) ?? [], B = g && b[K.id], F = K.title ?? K.id, O = K.count ?? z.length, re = /* @__PURE__ */ e(
|
|
4063
4065
|
"li",
|
|
4064
4066
|
{
|
|
4065
|
-
onClick:
|
|
4066
|
-
className:
|
|
4067
|
+
onClick: g ? () => m((ie) => ({ ...ie, [K.id]: !ie[K.id] })) : void 0,
|
|
4068
|
+
className: u(
|
|
4067
4069
|
"flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
|
|
4068
4070
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4069
4071
|
"border-border-subtle",
|
|
4070
4072
|
o > 0 && "border-t",
|
|
4071
4073
|
"border-b",
|
|
4072
4074
|
C && "sticky z-10",
|
|
4073
|
-
|
|
4075
|
+
g && "cursor-pointer select-none hover:text-text"
|
|
4074
4076
|
),
|
|
4075
|
-
"aria-expanded":
|
|
4077
|
+
"aria-expanded": g ? !B : void 0,
|
|
4076
4078
|
style: C ? { top: V ? 28 : 0 } : void 0,
|
|
4077
|
-
children:
|
|
4078
|
-
|
|
4079
|
+
children: y ? y(K, z.map((ie) => ie.item)) : /* @__PURE__ */ i(fe, { children: [
|
|
4080
|
+
g && /* @__PURE__ */ e(
|
|
4079
4081
|
ye,
|
|
4080
4082
|
{
|
|
4081
4083
|
"aria-hidden": !0,
|
|
4082
|
-
className:
|
|
4084
|
+
className: u(
|
|
4083
4085
|
"size-icon-sm shrink-0 transition-transform duration-fast ease-out",
|
|
4084
4086
|
!B && "rotate-90"
|
|
4085
4087
|
)
|
|
4086
4088
|
}
|
|
4087
4089
|
),
|
|
4088
4090
|
/* @__PURE__ */ e("span", { children: F }),
|
|
4089
|
-
!
|
|
4091
|
+
!v && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: O })
|
|
4090
4092
|
] })
|
|
4091
4093
|
},
|
|
4092
4094
|
`group-${K.id}`
|
|
@@ -4094,37 +4096,37 @@ function fn({
|
|
|
4094
4096
|
return B ? [re] : [
|
|
4095
4097
|
re,
|
|
4096
4098
|
...z.map(
|
|
4097
|
-
({ item: ie, index: He },
|
|
4099
|
+
({ item: ie, index: He }, qe) => A(ie, He, qe === 0)
|
|
4098
4100
|
)
|
|
4099
4101
|
];
|
|
4100
4102
|
});
|
|
4101
4103
|
})();
|
|
4102
4104
|
return /* @__PURE__ */ i("div", { ref: E, className: te, onKeyDown: c ? w : void 0, children: [
|
|
4103
|
-
|
|
4105
|
+
$ && D.length > 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
|
|
4104
4106
|
/* @__PURE__ */ e(
|
|
4105
4107
|
xe,
|
|
4106
4108
|
{
|
|
4107
4109
|
checked: G,
|
|
4108
4110
|
indeterminate: S,
|
|
4109
|
-
onChange: (
|
|
4111
|
+
onChange: (T) => ne(T.target.checked),
|
|
4110
4112
|
"aria-label": "Alles selecteren"
|
|
4111
4113
|
}
|
|
4112
4114
|
),
|
|
4113
4115
|
/* @__PURE__ */ i("span", { className: "text-xs text-text-subtle", children: [
|
|
4114
|
-
|
|
4116
|
+
D.length,
|
|
4115
4117
|
" geselecteerd"
|
|
4116
4118
|
] }),
|
|
4117
4119
|
M && /* @__PURE__ */ e("div", { className: "ml-auto flex gap-2", children: M })
|
|
4118
4120
|
] }),
|
|
4119
|
-
|
|
4121
|
+
q && /* @__PURE__ */ e(
|
|
4120
4122
|
"div",
|
|
4121
4123
|
{
|
|
4122
|
-
className:
|
|
4124
|
+
className: u(
|
|
4123
4125
|
"flex items-center gap-3 border-b border-border-subtle px-4 py-1.5",
|
|
4124
4126
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4125
4127
|
V && "sticky top-0 z-20"
|
|
4126
4128
|
),
|
|
4127
|
-
children:
|
|
4129
|
+
children: q
|
|
4128
4130
|
}
|
|
4129
4131
|
),
|
|
4130
4132
|
/* @__PURE__ */ e("ul", { "aria-label": Q, className: "flex flex-col", children: L })
|
|
@@ -4140,7 +4142,7 @@ function hn({
|
|
|
4140
4142
|
return /* @__PURE__ */ e(
|
|
4141
4143
|
"div",
|
|
4142
4144
|
{
|
|
4143
|
-
className:
|
|
4145
|
+
className: u(
|
|
4144
4146
|
// A bubble never spans the whole column; it narrows further from md,
|
|
4145
4147
|
// where the thread itself is wide enough for the difference to matter.
|
|
4146
4148
|
"min-w-0 max-w-bubble border md:max-w-bubble-md",
|
|
@@ -4167,8 +4169,8 @@ const Cr = {
|
|
|
4167
4169
|
success: "border-border"
|
|
4168
4170
|
};
|
|
4169
4171
|
function xn({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4170
|
-
return /* @__PURE__ */ i("div", { className:
|
|
4171
|
-
/* @__PURE__ */ e("div", { className:
|
|
4172
|
+
return /* @__PURE__ */ i("div", { className: u("rounded-xl border bg-surface px-4 py-3.5", Sr[n], s), ...a, children: [
|
|
4173
|
+
/* @__PURE__ */ e("div", { className: u("text-2xl font-semibold", Cr[n]), children: t }),
|
|
4172
4174
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4173
4175
|
] });
|
|
4174
4176
|
}
|
|
@@ -4183,26 +4185,26 @@ const bn = ({
|
|
|
4183
4185
|
backLabel: f = "Back",
|
|
4184
4186
|
backClassName: p,
|
|
4185
4187
|
onBack: N,
|
|
4186
|
-
editable:
|
|
4187
|
-
onTitleChange:
|
|
4188
|
+
editable: x = !1,
|
|
4189
|
+
onTitleChange: d
|
|
4188
4190
|
}) => {
|
|
4189
|
-
const [
|
|
4191
|
+
const [h, y] = R(!1), [C, g] = R(r), v = se(null);
|
|
4190
4192
|
Y(() => {
|
|
4191
|
-
|
|
4193
|
+
g(r);
|
|
4192
4194
|
}, [r]), Y(() => {
|
|
4193
|
-
|
|
4194
|
-
}, [
|
|
4195
|
-
const
|
|
4196
|
-
|
|
4197
|
-
},
|
|
4198
|
-
|
|
4195
|
+
h && v.current && (v.current.focus(), v.current.select());
|
|
4196
|
+
}, [h]);
|
|
4197
|
+
const $ = () => {
|
|
4198
|
+
x && y(!0);
|
|
4199
|
+
}, D = () => {
|
|
4200
|
+
y(!1), C.trim() !== "" && C !== r && d ? d(C.trim()) : g(r);
|
|
4199
4201
|
}, _ = (M) => {
|
|
4200
|
-
M.key === "Enter" ?
|
|
4202
|
+
M.key === "Enter" ? v.current?.blur() : M.key === "Escape" && (g(r), y(!1));
|
|
4201
4203
|
};
|
|
4202
4204
|
return /* @__PURE__ */ i(
|
|
4203
4205
|
"div",
|
|
4204
4206
|
{
|
|
4205
|
-
className:
|
|
4207
|
+
className: u(
|
|
4206
4208
|
"p-5 pb-3",
|
|
4207
4209
|
// App-bar treatment: own background, full-bleed, closed with a rule.
|
|
4208
4210
|
t && "bg-surface border-b border-border",
|
|
@@ -4213,14 +4215,14 @@ const bn = ({
|
|
|
4213
4215
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-2 text-text", children: [
|
|
4214
4216
|
N && /* @__PURE__ */ e(ee, { variant: "secondary", onClick: N, leftIcon: /* @__PURE__ */ e(J, { icon: ze, size: "sm" }), iconOnly: !0 }),
|
|
4215
4217
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
4216
|
-
|
|
4218
|
+
h ? /* @__PURE__ */ e(
|
|
4217
4219
|
"input",
|
|
4218
4220
|
{
|
|
4219
|
-
ref:
|
|
4221
|
+
ref: v,
|
|
4220
4222
|
type: "text",
|
|
4221
4223
|
value: C,
|
|
4222
|
-
onChange: (M) =>
|
|
4223
|
-
onBlur:
|
|
4224
|
+
onChange: (M) => g(M.target.value),
|
|
4225
|
+
onBlur: D,
|
|
4224
4226
|
onKeyDown: _,
|
|
4225
4227
|
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"
|
|
4226
4228
|
}
|
|
@@ -4228,21 +4230,21 @@ const bn = ({
|
|
|
4228
4230
|
/* @__PURE__ */ e(
|
|
4229
4231
|
"h2",
|
|
4230
4232
|
{
|
|
4231
|
-
onClick:
|
|
4232
|
-
className:
|
|
4233
|
+
onClick: $,
|
|
4234
|
+
className: u(
|
|
4233
4235
|
"text-2xl font-semibold truncate",
|
|
4234
|
-
|
|
4236
|
+
x && "cursor-pointer"
|
|
4235
4237
|
),
|
|
4236
|
-
title:
|
|
4238
|
+
title: x ? "Klik om te bewerken" : void 0,
|
|
4237
4239
|
children: r
|
|
4238
4240
|
}
|
|
4239
4241
|
),
|
|
4240
4242
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4241
|
-
|
|
4243
|
+
x && /* @__PURE__ */ e(
|
|
4242
4244
|
ct,
|
|
4243
4245
|
{
|
|
4244
4246
|
size: 15,
|
|
4245
|
-
onClick:
|
|
4247
|
+
onClick: $,
|
|
4246
4248
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4247
4249
|
}
|
|
4248
4250
|
)
|
|
@@ -4266,8 +4268,8 @@ const bn = ({
|
|
|
4266
4268
|
ee,
|
|
4267
4269
|
{
|
|
4268
4270
|
variant: M.variant ?? "secondary",
|
|
4269
|
-
onClick: (
|
|
4270
|
-
|
|
4271
|
+
onClick: (q) => {
|
|
4272
|
+
q.stopPropagation(), q.target.blur(), M.onClick();
|
|
4271
4273
|
},
|
|
4272
4274
|
disabled: M.disabled,
|
|
4273
4275
|
leftIcon: M.icon,
|
|
@@ -4287,10 +4289,10 @@ const bn = ({
|
|
|
4287
4289
|
backLabel: n = "Back",
|
|
4288
4290
|
className: s,
|
|
4289
4291
|
children: a
|
|
4290
|
-
}) => /* @__PURE__ */ i("div", { className:
|
|
4292
|
+
}) => /* @__PURE__ */ i("div", { className: u("flex items-center gap-2 mb-3", s), children: [
|
|
4291
4293
|
r && /* @__PURE__ */ e(ee, { variant: "ghost", size: "sm", onClick: r, leftIcon: /* @__PURE__ */ e(ze, { size: 14 }), children: n }),
|
|
4292
4294
|
a && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: a }),
|
|
4293
|
-
t.length > 0 && /* @__PURE__ */ e("div", { className:
|
|
4295
|
+
t.length > 0 && /* @__PURE__ */ e("div", { className: u("flex flex-wrap gap-2", !a && "ml-auto"), children: t.map(
|
|
4294
4296
|
(l) => l.splitOptions && l.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4295
4297
|
je,
|
|
4296
4298
|
{
|
|
@@ -4320,7 +4322,7 @@ const bn = ({
|
|
|
4320
4322
|
] });
|
|
4321
4323
|
function pn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4322
4324
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4323
|
-
return !t && !r ? /* @__PURE__ */ e("div", { className:
|
|
4325
|
+
return !t && !r ? /* @__PURE__ */ e("div", { className: u("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: u("flex items-center gap-3 py-2", s), children: [
|
|
4324
4326
|
n === "center" && a,
|
|
4325
4327
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-xs font-medium text-text-muted", children: t }),
|
|
4326
4328
|
a,
|
|
@@ -4338,7 +4340,7 @@ function vn({
|
|
|
4338
4340
|
return /* @__PURE__ */ i(
|
|
4339
4341
|
"div",
|
|
4340
4342
|
{
|
|
4341
|
-
className:
|
|
4343
|
+
className: u(
|
|
4342
4344
|
"flex items-center justify-between gap-4 py-2",
|
|
4343
4345
|
s && "rounded-lg border border-border px-3",
|
|
4344
4346
|
a && "opacity-50",
|
|
@@ -4362,7 +4364,7 @@ function yn({
|
|
|
4362
4364
|
children: a,
|
|
4363
4365
|
className: l
|
|
4364
4366
|
}) {
|
|
4365
|
-
return /* @__PURE__ */ i("section", { className:
|
|
4367
|
+
return /* @__PURE__ */ i("section", { className: u("flex flex-col gap-2", l), children: [
|
|
4366
4368
|
/* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
|
|
4367
4369
|
t && /* @__PURE__ */ e(J, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
|
|
4368
4370
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -4371,7 +4373,7 @@ function yn({
|
|
|
4371
4373
|
] }),
|
|
4372
4374
|
s && /* @__PURE__ */ e("div", { className: "shrink-0", children: s })
|
|
4373
4375
|
] }),
|
|
4374
|
-
/* @__PURE__ */ e("div", { className:
|
|
4376
|
+
/* @__PURE__ */ e("div", { className: u("flex flex-col", t && "pl-6"), children: a })
|
|
4375
4377
|
] });
|
|
4376
4378
|
}
|
|
4377
4379
|
function Nn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
@@ -4380,7 +4382,7 @@ function Nn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
4380
4382
|
{
|
|
4381
4383
|
type: "button",
|
|
4382
4384
|
onClick: n,
|
|
4383
|
-
className:
|
|
4385
|
+
className: u(
|
|
4384
4386
|
"inline-flex max-w-full items-center gap-1.5 rounded-full bg-surface-sunk px-2.5 py-1 text-xs text-text-muted transition-colors duration-fast ease-out hover:bg-surface-hover hover:text-text",
|
|
4385
4387
|
s
|
|
4386
4388
|
),
|
|
@@ -4404,27 +4406,27 @@ const wn = ({
|
|
|
4404
4406
|
size: n = "md",
|
|
4405
4407
|
className: s
|
|
4406
4408
|
}) => {
|
|
4407
|
-
const a = (
|
|
4408
|
-
if (!
|
|
4409
|
+
const a = (x) => {
|
|
4410
|
+
if (!x) return "-";
|
|
4409
4411
|
try {
|
|
4410
|
-
return new Date(
|
|
4412
|
+
return new Date(x).toLocaleDateString("nl-NL", {
|
|
4411
4413
|
year: "numeric",
|
|
4412
4414
|
month: "long",
|
|
4413
4415
|
day: "numeric"
|
|
4414
4416
|
});
|
|
4415
4417
|
} catch {
|
|
4416
|
-
return String(
|
|
4418
|
+
return String(x);
|
|
4417
4419
|
}
|
|
4418
|
-
}, l = (
|
|
4419
|
-
if (!
|
|
4420
|
-
const
|
|
4421
|
-
return
|
|
4420
|
+
}, l = (x) => x ? "Ja" : "Nee", c = (x, d) => {
|
|
4421
|
+
if (!d) return String(x || "-");
|
|
4422
|
+
const h = d.find((y) => y.value === x);
|
|
4423
|
+
return h ? h.label : String(x || "-");
|
|
4422
4424
|
}, f = ce(
|
|
4423
|
-
(
|
|
4424
|
-
const
|
|
4425
|
-
if (
|
|
4426
|
-
const
|
|
4427
|
-
return !
|
|
4425
|
+
(x) => {
|
|
4426
|
+
const d = zr(r, x.name);
|
|
4427
|
+
if (x.type === "array") {
|
|
4428
|
+
const y = d;
|
|
4429
|
+
return !y || y.length === 0 ? /* @__PURE__ */ e(
|
|
4428
4430
|
oe,
|
|
4429
4431
|
{
|
|
4430
4432
|
variant: "body",
|
|
@@ -4432,7 +4434,7 @@ const wn = ({
|
|
|
4432
4434
|
className: "text-text-muted",
|
|
4433
4435
|
children: "Geen items"
|
|
4434
4436
|
}
|
|
4435
|
-
) : /* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
4437
|
+
) : /* @__PURE__ */ e("div", { className: "space-y-3", children: y.map((C, g) => /* @__PURE__ */ i(
|
|
4436
4438
|
"div",
|
|
4437
4439
|
{
|
|
4438
4440
|
className: "p-4 border border-border rounded-xl space-y-3",
|
|
@@ -4445,53 +4447,53 @@ const wn = ({
|
|
|
4445
4447
|
weight: "medium",
|
|
4446
4448
|
className: "text-text-muted",
|
|
4447
4449
|
children: [
|
|
4448
|
-
|
|
4450
|
+
x.label,
|
|
4449
4451
|
" ",
|
|
4450
|
-
|
|
4452
|
+
g + 1
|
|
4451
4453
|
]
|
|
4452
4454
|
}
|
|
4453
4455
|
) }),
|
|
4454
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children:
|
|
4455
|
-
const
|
|
4456
|
-
let
|
|
4457
|
-
switch (
|
|
4456
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: x.arrayFields?.map((v) => {
|
|
4457
|
+
const $ = C?.[v.name];
|
|
4458
|
+
let D = "-";
|
|
4459
|
+
switch (v.type) {
|
|
4458
4460
|
case "text":
|
|
4459
4461
|
case "email":
|
|
4460
4462
|
case "number":
|
|
4461
4463
|
case "tel":
|
|
4462
4464
|
case "url":
|
|
4463
4465
|
case "textarea":
|
|
4464
|
-
|
|
4466
|
+
D = $ || "-";
|
|
4465
4467
|
break;
|
|
4466
4468
|
case "select":
|
|
4467
4469
|
case "radio":
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4470
|
+
D = c(
|
|
4471
|
+
$,
|
|
4472
|
+
v.options
|
|
4471
4473
|
);
|
|
4472
4474
|
break;
|
|
4473
4475
|
case "checkbox":
|
|
4474
|
-
|
|
4476
|
+
D = l($);
|
|
4475
4477
|
break;
|
|
4476
4478
|
case "date":
|
|
4477
|
-
|
|
4479
|
+
D = a($);
|
|
4478
4480
|
break;
|
|
4479
4481
|
case "custom":
|
|
4480
|
-
|
|
4481
|
-
value:
|
|
4482
|
+
D = v.customComponent?.({
|
|
4483
|
+
value: $
|
|
4482
4484
|
});
|
|
4483
4485
|
break;
|
|
4484
4486
|
default:
|
|
4485
|
-
|
|
4487
|
+
D = String($ || "-");
|
|
4486
4488
|
}
|
|
4487
|
-
return
|
|
4489
|
+
return v.format && (D = v.format($, C)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
4488
4490
|
/* @__PURE__ */ e(
|
|
4489
4491
|
oe,
|
|
4490
4492
|
{
|
|
4491
4493
|
variant: "label",
|
|
4492
4494
|
size: "xs",
|
|
4493
4495
|
className: "text-text-muted",
|
|
4494
|
-
children:
|
|
4496
|
+
children: v.label
|
|
4495
4497
|
}
|
|
4496
4498
|
),
|
|
4497
4499
|
/* @__PURE__ */ e(
|
|
@@ -4500,55 +4502,55 @@ const wn = ({
|
|
|
4500
4502
|
variant: "body",
|
|
4501
4503
|
size: "sm",
|
|
4502
4504
|
className: "text-text",
|
|
4503
|
-
children:
|
|
4505
|
+
children: D
|
|
4504
4506
|
}
|
|
4505
4507
|
)
|
|
4506
|
-
] },
|
|
4508
|
+
] }, v.name);
|
|
4507
4509
|
}) })
|
|
4508
4510
|
]
|
|
4509
4511
|
},
|
|
4510
|
-
|
|
4512
|
+
g
|
|
4511
4513
|
)) });
|
|
4512
4514
|
}
|
|
4513
|
-
if (
|
|
4514
|
-
return
|
|
4515
|
-
if (
|
|
4516
|
-
const
|
|
4515
|
+
if (x.type === "custom" && x.customComponent)
|
|
4516
|
+
return x.customComponent({ value: d });
|
|
4517
|
+
if (x.format) {
|
|
4518
|
+
const y = x.format(d, r);
|
|
4517
4519
|
return /* @__PURE__ */ e(
|
|
4518
4520
|
oe,
|
|
4519
4521
|
{
|
|
4520
4522
|
variant: "body",
|
|
4521
4523
|
size: "sm",
|
|
4522
4524
|
className: "text-text",
|
|
4523
|
-
children:
|
|
4525
|
+
children: y
|
|
4524
4526
|
}
|
|
4525
4527
|
);
|
|
4526
4528
|
}
|
|
4527
|
-
let
|
|
4528
|
-
switch (
|
|
4529
|
+
let h = "-";
|
|
4530
|
+
switch (x.type) {
|
|
4529
4531
|
case "text":
|
|
4530
4532
|
case "email":
|
|
4531
4533
|
case "password":
|
|
4532
4534
|
case "number":
|
|
4533
4535
|
case "tel":
|
|
4534
4536
|
case "url":
|
|
4535
|
-
|
|
4537
|
+
h = d ? String(d) : "-";
|
|
4536
4538
|
break;
|
|
4537
4539
|
case "textarea":
|
|
4538
|
-
|
|
4540
|
+
h = d ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(d || "-") }) : "-";
|
|
4539
4541
|
break;
|
|
4540
4542
|
case "select":
|
|
4541
4543
|
case "radio":
|
|
4542
|
-
|
|
4544
|
+
h = c(d, x.options);
|
|
4543
4545
|
break;
|
|
4544
4546
|
case "checkbox":
|
|
4545
|
-
|
|
4547
|
+
h = l(d);
|
|
4546
4548
|
break;
|
|
4547
4549
|
case "date":
|
|
4548
|
-
|
|
4550
|
+
h = a(d);
|
|
4549
4551
|
break;
|
|
4550
4552
|
default:
|
|
4551
|
-
|
|
4553
|
+
h = d ? String(d) : "-";
|
|
4552
4554
|
}
|
|
4553
4555
|
return /* @__PURE__ */ e(
|
|
4554
4556
|
oe,
|
|
@@ -4556,30 +4558,30 @@ const wn = ({
|
|
|
4556
4558
|
variant: "body",
|
|
4557
4559
|
size: "sm",
|
|
4558
4560
|
className: "text-text",
|
|
4559
|
-
children:
|
|
4561
|
+
children: h
|
|
4560
4562
|
}
|
|
4561
4563
|
);
|
|
4562
4564
|
},
|
|
4563
4565
|
[r]
|
|
4564
4566
|
), p = ce(
|
|
4565
|
-
(
|
|
4566
|
-
if (
|
|
4567
|
+
(x) => {
|
|
4568
|
+
if (x.conditional && !x.conditional(r))
|
|
4567
4569
|
return null;
|
|
4568
|
-
const
|
|
4569
|
-
if (
|
|
4570
|
-
const
|
|
4570
|
+
const d = x.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(r)));
|
|
4571
|
+
if (d.length === 0) return null;
|
|
4572
|
+
const h = u(
|
|
4571
4573
|
"space-y-4",
|
|
4572
4574
|
{
|
|
4573
|
-
"grid gap-4":
|
|
4574
|
-
"flex flex-wrap gap-4":
|
|
4575
|
+
"grid gap-4": x.layout === "grid",
|
|
4576
|
+
"flex flex-wrap gap-4": x.layout === "flex"
|
|
4575
4577
|
},
|
|
4576
|
-
|
|
4577
|
-
"grid-cols-1": !
|
|
4578
|
-
"grid-cols-2":
|
|
4579
|
-
"grid-cols-3":
|
|
4580
|
-
"grid-cols-4":
|
|
4578
|
+
x.layout === "grid" && {
|
|
4579
|
+
"grid-cols-1": !x.columns || x.columns === 1,
|
|
4580
|
+
"grid-cols-2": x.columns === 2,
|
|
4581
|
+
"grid-cols-3": x.columns === 3,
|
|
4582
|
+
"grid-cols-4": x.columns === 4
|
|
4581
4583
|
},
|
|
4582
|
-
|
|
4584
|
+
x.className
|
|
4583
4585
|
);
|
|
4584
4586
|
return /* @__PURE__ */ i(
|
|
4585
4587
|
"div",
|
|
@@ -4594,49 +4596,49 @@ const wn = ({
|
|
|
4594
4596
|
size: "lg",
|
|
4595
4597
|
weight: "semibold",
|
|
4596
4598
|
className: "text-text",
|
|
4597
|
-
children:
|
|
4599
|
+
children: x.title
|
|
4598
4600
|
}
|
|
4599
4601
|
),
|
|
4600
|
-
|
|
4602
|
+
x.description && /* @__PURE__ */ e(
|
|
4601
4603
|
oe,
|
|
4602
4604
|
{
|
|
4603
4605
|
variant: "body",
|
|
4604
4606
|
size: "sm",
|
|
4605
4607
|
className: "text-text-muted mt-1",
|
|
4606
|
-
children:
|
|
4608
|
+
children: x.description
|
|
4607
4609
|
}
|
|
4608
4610
|
)
|
|
4609
4611
|
] }),
|
|
4610
|
-
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className:
|
|
4612
|
+
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: h, children: d.map((y) => /* @__PURE__ */ i(
|
|
4611
4613
|
"div",
|
|
4612
4614
|
{
|
|
4613
4615
|
className: "space-y-1",
|
|
4614
4616
|
style: {
|
|
4615
|
-
width: typeof
|
|
4616
|
-
gridColumn: typeof
|
|
4617
|
+
width: typeof y.width == "string" ? y.width : void 0,
|
|
4618
|
+
gridColumn: typeof y.width == "number" ? `span ${y.width} / span ${y.width}` : void 0
|
|
4617
4619
|
},
|
|
4618
4620
|
children: [
|
|
4619
|
-
|
|
4621
|
+
y.type !== "custom" && /* @__PURE__ */ e(
|
|
4620
4622
|
oe,
|
|
4621
4623
|
{
|
|
4622
4624
|
variant: "label",
|
|
4623
4625
|
size: "sm",
|
|
4624
4626
|
className: "font-medium text-text-muted",
|
|
4625
|
-
children:
|
|
4627
|
+
children: y.label
|
|
4626
4628
|
}
|
|
4627
4629
|
),
|
|
4628
|
-
f(
|
|
4630
|
+
f(y)
|
|
4629
4631
|
]
|
|
4630
4632
|
},
|
|
4631
|
-
|
|
4633
|
+
y.name
|
|
4632
4634
|
)) }) })
|
|
4633
4635
|
]
|
|
4634
4636
|
},
|
|
4635
|
-
|
|
4637
|
+
x.id
|
|
4636
4638
|
);
|
|
4637
4639
|
},
|
|
4638
4640
|
[r, f]
|
|
4639
|
-
), N =
|
|
4641
|
+
), N = u(
|
|
4640
4642
|
"space-y-6",
|
|
4641
4643
|
{
|
|
4642
4644
|
"max-w-md": n === "sm",
|
|
@@ -4653,7 +4655,7 @@ const wn = ({
|
|
|
4653
4655
|
/* @__PURE__ */ i(
|
|
4654
4656
|
"div",
|
|
4655
4657
|
{
|
|
4656
|
-
className:
|
|
4658
|
+
className: u(
|
|
4657
4659
|
"flex items-center gap-2 px-2 pt-4 pb-1 text-xs font-semibold uppercase tracking-label text-text-subtle"
|
|
4658
4660
|
),
|
|
4659
4661
|
children: [
|
|
@@ -4681,7 +4683,7 @@ const wn = ({
|
|
|
4681
4683
|
onKeyDown: (c) => {
|
|
4682
4684
|
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), t.path && n?.(t.path));
|
|
4683
4685
|
},
|
|
4684
|
-
className:
|
|
4686
|
+
className: u(
|
|
4685
4687
|
"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-base no-underline",
|
|
4686
4688
|
"transition-colors duration-fast ease-out",
|
|
4687
4689
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -4693,7 +4695,7 @@ const wn = ({
|
|
|
4693
4695
|
t.count !== void 0 && t.count > 0 && /* @__PURE__ */ e(
|
|
4694
4696
|
"span",
|
|
4695
4697
|
{
|
|
4696
|
-
className:
|
|
4698
|
+
className: u(
|
|
4697
4699
|
"shrink-0 text-xs tabular-nums",
|
|
4698
4700
|
l ? "rounded-full bg-accent px-2 font-semibold text-accent-fg" : "text-text-subtle"
|
|
4699
4701
|
),
|
|
@@ -4716,7 +4718,7 @@ const wn = ({
|
|
|
4716
4718
|
r && r.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: r.map((c, f) => /* @__PURE__ */ e(
|
|
4717
4719
|
"span",
|
|
4718
4720
|
{
|
|
4719
|
-
className:
|
|
4721
|
+
className: u(
|
|
4720
4722
|
"flex h-control-sm w-7 cursor-pointer items-center justify-center rounded-md text-text-strong",
|
|
4721
4723
|
"transition-colors duration-fast ease-out hover:bg-surface-hover hover:text-text-strong",
|
|
4722
4724
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -4778,7 +4780,7 @@ const wn = ({
|
|
|
4778
4780
|
children: f,
|
|
4779
4781
|
...p
|
|
4780
4782
|
}) => {
|
|
4781
|
-
const N = `h${t}`,
|
|
4783
|
+
const N = `h${t}`, x = u(
|
|
4782
4784
|
"font-sans text-pretty",
|
|
4783
4785
|
Er[r || Tr(t)],
|
|
4784
4786
|
Mr[n],
|
|
@@ -4787,7 +4789,7 @@ const wn = ({
|
|
|
4787
4789
|
l && "truncate",
|
|
4788
4790
|
c
|
|
4789
4791
|
);
|
|
4790
|
-
return /* @__PURE__ */ e(N, { className:
|
|
4792
|
+
return /* @__PURE__ */ e(N, { className: x, ...p, children: f });
|
|
4791
4793
|
};
|
|
4792
4794
|
function Tr(t) {
|
|
4793
4795
|
return {
|
|
@@ -4807,44 +4809,44 @@ const Sn = ({
|
|
|
4807
4809
|
initialCommandPath: a,
|
|
4808
4810
|
initialActiveIndex: l
|
|
4809
4811
|
}) => {
|
|
4810
|
-
const [c, f] = R(""), [p, N] = R(a || []), [
|
|
4811
|
-
(
|
|
4812
|
+
const [c, f] = R(""), [p, N] = R(a || []), [x, d] = R(l || 0), h = se(null), y = se(null), g = (p.length ? t.find((v) => v.id === p[0])?.subCommands || [] : t).filter(
|
|
4813
|
+
(v) => v.label.toLowerCase().includes(c.toLowerCase())
|
|
4812
4814
|
);
|
|
4813
4815
|
return Y(() => {
|
|
4814
|
-
r || (f(""), N(a || []),
|
|
4816
|
+
r || (f(""), N(a || []), d(l || 0));
|
|
4815
4817
|
}, [r]), Y(() => {
|
|
4816
|
-
const
|
|
4818
|
+
const v = ($) => {
|
|
4817
4819
|
if (r) {
|
|
4818
|
-
if (
|
|
4820
|
+
if ($.key === "Escape")
|
|
4819
4821
|
n();
|
|
4820
|
-
else if (
|
|
4821
|
-
|
|
4822
|
-
(
|
|
4822
|
+
else if ($.key === "ArrowUp")
|
|
4823
|
+
d(
|
|
4824
|
+
(D) => D > 0 ? D - 1 : g.length - 1
|
|
4823
4825
|
);
|
|
4824
|
-
else if (
|
|
4825
|
-
|
|
4826
|
-
(
|
|
4826
|
+
else if ($.key === "ArrowDown")
|
|
4827
|
+
d(
|
|
4828
|
+
(D) => D < g.length - 1 ? D + 1 : 0
|
|
4827
4829
|
);
|
|
4828
|
-
else if (
|
|
4829
|
-
const
|
|
4830
|
-
|
|
4830
|
+
else if ($.key === "Enter") {
|
|
4831
|
+
const D = g[x];
|
|
4832
|
+
D && (D.subCommands ? (N([...p, D.id]), d(0)) : D.action && (D.action(), n()));
|
|
4831
4833
|
}
|
|
4832
4834
|
}
|
|
4833
4835
|
};
|
|
4834
|
-
return document.addEventListener("keydown",
|
|
4835
|
-
}, [r, n,
|
|
4836
|
-
const
|
|
4837
|
-
|
|
4836
|
+
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
4837
|
+
}, [r, n, g, x, p]), Y(() => {
|
|
4838
|
+
const v = ($) => {
|
|
4839
|
+
h.current && !h.current.contains($.target) && n();
|
|
4838
4840
|
};
|
|
4839
|
-
return r && document.addEventListener("mousedown",
|
|
4841
|
+
return r && document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
4840
4842
|
}, [r, n]), Y(() => {
|
|
4841
4843
|
if (!r) return;
|
|
4842
|
-
|
|
4843
|
-
}, [
|
|
4844
|
+
y.current?.querySelector(`[data-index="${x}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4845
|
+
}, [x, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
|
|
4844
4846
|
"div",
|
|
4845
4847
|
{
|
|
4846
4848
|
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",
|
|
4847
|
-
ref:
|
|
4849
|
+
ref: h,
|
|
4848
4850
|
children: [
|
|
4849
4851
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
|
|
4850
4852
|
/* @__PURE__ */ e(Ne, { className: "w-4 h-4 text-text-muted shrink-0" }),
|
|
@@ -4855,7 +4857,7 @@ const Sn = ({
|
|
|
4855
4857
|
autoFocus: !0,
|
|
4856
4858
|
placeholder: s?.searchPlaceholder || "Search commands...",
|
|
4857
4859
|
value: c,
|
|
4858
|
-
onChange: (
|
|
4860
|
+
onChange: (v) => f(v.target.value),
|
|
4859
4861
|
className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
|
|
4860
4862
|
}
|
|
4861
4863
|
)
|
|
@@ -4863,26 +4865,26 @@ const Sn = ({
|
|
|
4863
4865
|
/* @__PURE__ */ i(
|
|
4864
4866
|
"div",
|
|
4865
4867
|
{
|
|
4866
|
-
ref:
|
|
4868
|
+
ref: y,
|
|
4867
4869
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
4868
4870
|
children: [
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
+
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
4872
|
+
g.map((v, $) => /* @__PURE__ */ i(
|
|
4871
4873
|
"div",
|
|
4872
4874
|
{
|
|
4873
|
-
"data-index":
|
|
4874
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
4875
|
+
"data-index": $,
|
|
4876
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${$ === x ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4875
4877
|
onClick: () => {
|
|
4876
|
-
|
|
4878
|
+
v.subCommands ? (N([...p, v.id]), d(0)) : v.action && (v.action(), n());
|
|
4877
4879
|
},
|
|
4878
|
-
onMouseEnter: () =>
|
|
4880
|
+
onMouseEnter: () => d($),
|
|
4879
4881
|
children: [
|
|
4880
|
-
|
|
4881
|
-
/* @__PURE__ */ e("span", { className: "flex-grow", children:
|
|
4882
|
-
|
|
4882
|
+
v.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: v.icon }),
|
|
4883
|
+
/* @__PURE__ */ e("span", { className: "flex-grow", children: v.label }),
|
|
4884
|
+
v.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(ye, { className: "w-4 h-4" }) })
|
|
4883
4885
|
]
|
|
4884
4886
|
},
|
|
4885
|
-
|
|
4887
|
+
v.id
|
|
4886
4888
|
))
|
|
4887
4889
|
]
|
|
4888
4890
|
}
|
|
@@ -4977,11 +4979,11 @@ const Sn = ({
|
|
|
4977
4979
|
className: f,
|
|
4978
4980
|
children: p,
|
|
4979
4981
|
...N
|
|
4980
|
-
},
|
|
4982
|
+
}, x) => /* @__PURE__ */ e(
|
|
4981
4983
|
"div",
|
|
4982
4984
|
{
|
|
4983
|
-
ref:
|
|
4984
|
-
className:
|
|
4985
|
+
ref: x,
|
|
4986
|
+
className: u(
|
|
4985
4987
|
t && Ar[t],
|
|
4986
4988
|
r && Lr[r],
|
|
4987
4989
|
n && Ir[n],
|
|
@@ -5020,41 +5022,41 @@ function En({
|
|
|
5020
5022
|
componentProps: a,
|
|
5021
5023
|
className: l
|
|
5022
5024
|
}) {
|
|
5023
|
-
const c = se(null), [f, p] = R(!0), [N,
|
|
5025
|
+
const c = se(null), [f, p] = R(!0), [N, x] = R(null), d = se(null);
|
|
5024
5026
|
return se(null), Y(() => {
|
|
5025
|
-
let
|
|
5027
|
+
let h = !0;
|
|
5026
5028
|
return (async () => {
|
|
5027
5029
|
p(!0);
|
|
5028
5030
|
try {
|
|
5029
5031
|
const C = await r();
|
|
5030
|
-
if (!
|
|
5031
|
-
const
|
|
5032
|
-
|
|
5032
|
+
if (!h) return;
|
|
5033
|
+
const g = C.component || C.default || C;
|
|
5034
|
+
x(n === "react" ? () => g : () => C);
|
|
5033
5035
|
} catch (C) {
|
|
5034
5036
|
console.error(`[FederatedResource] Load failed: ${t}`, C);
|
|
5035
5037
|
} finally {
|
|
5036
|
-
|
|
5038
|
+
h && p(!1);
|
|
5037
5039
|
}
|
|
5038
5040
|
})(), () => {
|
|
5039
|
-
|
|
5041
|
+
h = !1;
|
|
5040
5042
|
};
|
|
5041
5043
|
}, [t, r]), Y(() => {
|
|
5042
5044
|
if (f || !N || n === "react") return;
|
|
5043
|
-
const
|
|
5044
|
-
if (
|
|
5045
|
+
const h = c.current;
|
|
5046
|
+
if (h) {
|
|
5045
5047
|
if (n === "svelte") {
|
|
5046
|
-
const
|
|
5047
|
-
return
|
|
5048
|
+
const y = N.default || N, C = new y({ target: h, props: a || {} });
|
|
5049
|
+
return d.current = C, () => C.$destroy();
|
|
5048
5050
|
}
|
|
5049
5051
|
if (N.mount) {
|
|
5050
|
-
const
|
|
5052
|
+
const y = N.mount({ container: h, props: a || {} });
|
|
5051
5053
|
return () => {
|
|
5052
|
-
typeof
|
|
5054
|
+
typeof y == "function" ? y() : N.unmount?.(h);
|
|
5053
5055
|
};
|
|
5054
5056
|
}
|
|
5055
5057
|
}
|
|
5056
5058
|
}, [N, n, f]), Y(() => {
|
|
5057
|
-
n === "svelte" &&
|
|
5059
|
+
n === "svelte" && d.current && d.current.$set?.(a);
|
|
5058
5060
|
}, [a, n]), /* @__PURE__ */ i("div", { ref: c, className: l, style: { display: "contents" }, children: [
|
|
5059
5061
|
f && s,
|
|
5060
5062
|
n === "react" && N && /* @__PURE__ */ e(N, { ...a })
|
|
@@ -5147,8 +5149,8 @@ export {
|
|
|
5147
5149
|
he as TextField,
|
|
5148
5150
|
_r as VideoSurface,
|
|
5149
5151
|
wn as View,
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5152
|
+
u as cn,
|
|
5153
|
+
Ur as createSizes,
|
|
5154
|
+
qr as createVariants
|
|
5153
5155
|
};
|
|
5154
5156
|
//# sourceMappingURL=index.js.map
|