@opencxh/ui-kit 3.136.2 → 3.136.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +747 -690
- package/dist/index.js.map +1 -1
- package/dist/src/content/List.d.ts +30 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/input/TextField.d.ts +17 -2
- package/dist/src/utils/catTone.d.ts +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { clsx as
|
|
1
|
+
import { clsx as Je } from "clsx";
|
|
2
2
|
import { jsxs as c, jsx as e, Fragment as xe } from "react/jsx-runtime";
|
|
3
|
-
import { VideoOff as
|
|
4
|
-
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as R, useLayoutEffect as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { VideoOff as Ye, User as Xe, MicOff as Ze, Mic as Qe, X as ge, ChevronDown as ve, ExternalLink as et, Calendar as tt, ChevronLeft as ke, ChevronRight as Ce, ChevronDownIcon as rt, Loader2 as nt, Search as Se, Check as Te, ChevronUp as st, ChevronsLeft as at, ChevronsRight as lt, FileText as Ee, HardDrive as _e, ArrowLeft as ot, FolderPlus as ct, Upload as it, Folder as Ae, Trash2 as dt, Plus as ut, Sparkles as mt, ImageOff as ft, Pencil as ht, ArrowUpRight as xt } from "lucide-react";
|
|
4
|
+
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as R, useLayoutEffect as bt, useMemo as he, useCallback as ue, createContext as pt, Component as gt } from "react";
|
|
5
|
+
import vt from "dompurify";
|
|
6
|
+
import yt from "react-markdown";
|
|
7
|
+
import Nt from "remark-gfm";
|
|
8
8
|
function d(...t) {
|
|
9
|
-
return
|
|
9
|
+
return Je(t);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function sn(t) {
|
|
12
12
|
return (r, n) => t[r]?.[n] || "";
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function an(t) {
|
|
15
15
|
return (r) => t[r] || "";
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
const Le = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
|
|
18
|
+
function ln(t) {
|
|
19
|
+
let r = 0;
|
|
20
|
+
for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
|
|
21
|
+
return Le[r % Le.length];
|
|
22
|
+
}
|
|
23
|
+
function on({ tiles: t, pinned: r, className: n }) {
|
|
18
24
|
if (r)
|
|
19
25
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
|
|
20
26
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
|
|
@@ -23,7 +29,7 @@ function nn({ tiles: t, pinned: r, className: n }) {
|
|
|
23
29
|
const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
24
30
|
return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
|
|
25
31
|
}
|
|
26
|
-
function
|
|
32
|
+
function cn({
|
|
27
33
|
name: t,
|
|
28
34
|
avatarUrl: r,
|
|
29
35
|
muted: n,
|
|
@@ -43,16 +49,16 @@ function sn({
|
|
|
43
49
|
o
|
|
44
50
|
),
|
|
45
51
|
children: [
|
|
46
|
-
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(
|
|
52
|
+
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(Ye, { className: "w-8 h-8" }) : /* @__PURE__ */ e(Xe, { className: "w-8 h-8" }) }) }),
|
|
47
53
|
/* @__PURE__ */ c("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
|
|
48
|
-
n ? /* @__PURE__ */ e(
|
|
54
|
+
n ? /* @__PURE__ */ e(Ze, { className: "w-3 h-3" }) : /* @__PURE__ */ e(Qe, { className: "w-3 h-3" }),
|
|
49
55
|
/* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
|
|
50
56
|
] })
|
|
51
57
|
]
|
|
52
58
|
}
|
|
53
59
|
);
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function dn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
56
62
|
const a = se(null);
|
|
57
63
|
return Q(() => {
|
|
58
64
|
if (!r || !a.current) return;
|
|
@@ -72,7 +78,7 @@ function an({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
72
78
|
}
|
|
73
79
|
);
|
|
74
80
|
}
|
|
75
|
-
const
|
|
81
|
+
const wt = {
|
|
76
82
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
|
|
77
83
|
secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
|
|
78
84
|
// No resting fill, so no disabled fill either — a greyed-out plate where
|
|
@@ -85,7 +91,7 @@ const vt = {
|
|
|
85
91
|
success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
86
92
|
warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
87
93
|
"danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
|
|
88
|
-
},
|
|
94
|
+
}, kt = {
|
|
89
95
|
xs: "h-control-xs px-2 text-xs",
|
|
90
96
|
sm: "h-control-sm px-3 text-sm",
|
|
91
97
|
md: "h-control-md px-4 text-sm",
|
|
@@ -93,7 +99,7 @@ const vt = {
|
|
|
93
99
|
xl: "h-control-xl px-6 text-base",
|
|
94
100
|
"2xl": "h-control-2xl px-6 text-base",
|
|
95
101
|
full: "h-control-md px-4 text-sm"
|
|
96
|
-
},
|
|
102
|
+
}, Ct = {
|
|
97
103
|
xs: "h-control-xs w-6",
|
|
98
104
|
sm: "h-control-sm w-7",
|
|
99
105
|
md: "h-control-md w-8",
|
|
@@ -132,8 +138,8 @@ const vt = {
|
|
|
132
138
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
133
139
|
"disabled:cursor-not-allowed disabled:border-border-subtle",
|
|
134
140
|
"disabled:text-text-disabled",
|
|
135
|
-
|
|
136
|
-
o ?
|
|
141
|
+
wt[t],
|
|
142
|
+
o ? Ct[r] : kt[r],
|
|
137
143
|
(n || r === "full") && "w-full",
|
|
138
144
|
s && "cursor-wait",
|
|
139
145
|
u
|
|
@@ -159,7 +165,7 @@ const vt = {
|
|
|
159
165
|
}
|
|
160
166
|
);
|
|
161
167
|
ne.displayName = "Button";
|
|
162
|
-
const
|
|
168
|
+
const un = ({
|
|
163
169
|
children: t,
|
|
164
170
|
size: r = "md",
|
|
165
171
|
orientation: n = "horizontal",
|
|
@@ -189,7 +195,7 @@ const ln = ({
|
|
|
189
195
|
a
|
|
190
196
|
);
|
|
191
197
|
return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
|
|
192
|
-
},
|
|
198
|
+
}, St = {
|
|
193
199
|
primary: "text-text",
|
|
194
200
|
secondary: "text-text-muted",
|
|
195
201
|
accent: "text-accent",
|
|
@@ -209,9 +215,9 @@ const ln = ({
|
|
|
209
215
|
"aria-label": o,
|
|
210
216
|
...h
|
|
211
217
|
}) => {
|
|
212
|
-
const u = typeof r == "number" ? r :
|
|
218
|
+
const u = typeof r == "number" ? r : zt(r), N = d(
|
|
213
219
|
"inline-block shrink-0",
|
|
214
|
-
|
|
220
|
+
St[n],
|
|
215
221
|
s && [
|
|
216
222
|
"cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
|
|
217
223
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -233,7 +239,7 @@ const ln = ({
|
|
|
233
239
|
};
|
|
234
240
|
return /* @__PURE__ */ e(t, { ...m });
|
|
235
241
|
};
|
|
236
|
-
function
|
|
242
|
+
function zt(t) {
|
|
237
243
|
return {
|
|
238
244
|
xs: 12,
|
|
239
245
|
sm: 14,
|
|
@@ -242,14 +248,14 @@ function kt(t) {
|
|
|
242
248
|
xl: 24
|
|
243
249
|
}[t];
|
|
244
250
|
}
|
|
245
|
-
const
|
|
251
|
+
const Et = {
|
|
246
252
|
none: "hover:bg-surface-sunk hover:text-text",
|
|
247
253
|
default: "bg-surface-sunk text-text-muted hover:text-text",
|
|
248
254
|
muted: "bg-surface-sunk text-text-subtle hover:text-text",
|
|
249
255
|
warning: "bg-warning-soft text-warning-fg",
|
|
250
256
|
danger: "bg-danger-soft text-danger-fg"
|
|
251
257
|
};
|
|
252
|
-
function
|
|
258
|
+
function mn({
|
|
253
259
|
label: t,
|
|
254
260
|
icon: r,
|
|
255
261
|
tone: n = "default",
|
|
@@ -270,12 +276,12 @@ function on({
|
|
|
270
276
|
"transition-colors duration-fast ease-out",
|
|
271
277
|
p,
|
|
272
278
|
// Picking a value outranks whatever the value happens to mean.
|
|
273
|
-
l ? "bg-info-soft text-info-fg" :
|
|
279
|
+
l ? "bg-info-soft text-info-fg" : Et[n],
|
|
274
280
|
f
|
|
275
281
|
), g = /* @__PURE__ */ c(xe, { children: [
|
|
276
282
|
r,
|
|
277
283
|
t,
|
|
278
|
-
o && /* @__PURE__ */ e(Y, { icon:
|
|
284
|
+
o && /* @__PURE__ */ e(Y, { icon: ve, size: "xs" })
|
|
279
285
|
] }), x = d(
|
|
280
286
|
"inline-flex items-center gap-1.5 pl-3",
|
|
281
287
|
p,
|
|
@@ -291,18 +297,18 @@ function on({
|
|
|
291
297
|
"aria-label": u,
|
|
292
298
|
onClick: h,
|
|
293
299
|
className: d("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
|
|
294
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
300
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "xs" })
|
|
295
301
|
}
|
|
296
302
|
)
|
|
297
303
|
] }) : /* @__PURE__ */ e("button", { type: "button", title: m, onClick: N, className: d(C, x), children: g });
|
|
298
304
|
}
|
|
299
|
-
const
|
|
305
|
+
const Mt = {
|
|
300
306
|
xs: "text-xs",
|
|
301
307
|
sm: "text-sm",
|
|
302
308
|
md: "text-base",
|
|
303
309
|
lg: "text-md",
|
|
304
310
|
xl: "text-lg"
|
|
305
|
-
},
|
|
311
|
+
}, $t = {
|
|
306
312
|
primary: "text-text hover:text-info-fg hover:underline",
|
|
307
313
|
info: "text-info-fg hover:underline",
|
|
308
314
|
secondary: "text-text-muted hover:text-text",
|
|
@@ -311,7 +317,7 @@ const St = {
|
|
|
311
317
|
success: "text-success-fg hover:underline",
|
|
312
318
|
warning: "text-warning-fg hover:underline",
|
|
313
319
|
error: "text-danger-fg hover:underline"
|
|
314
|
-
},
|
|
320
|
+
}, Dt = {
|
|
315
321
|
primary: "bg-accent-soft",
|
|
316
322
|
accent: "bg-accent-soft",
|
|
317
323
|
secondary: "bg-surface-hover",
|
|
@@ -320,7 +326,7 @@ const St = {
|
|
|
320
326
|
warning: "bg-warning-soft",
|
|
321
327
|
error: "bg-danger-soft",
|
|
322
328
|
info: "bg-info-soft"
|
|
323
|
-
},
|
|
329
|
+
}, fn = ({
|
|
324
330
|
variant: t = "default",
|
|
325
331
|
size: r = "md",
|
|
326
332
|
color: n = "primary",
|
|
@@ -337,13 +343,13 @@ const St = {
|
|
|
337
343
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
338
344
|
"transition-colors duration-fast ease-out",
|
|
339
345
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
340
|
-
|
|
341
|
-
!s &&
|
|
346
|
+
Mt[r],
|
|
347
|
+
!s && $t[n],
|
|
342
348
|
t === "subtle" && "no-underline opacity-70 hover:opacity-100",
|
|
343
349
|
t === "underline" && "underline decoration-1 hover:decoration-2",
|
|
344
350
|
t === "button" && [
|
|
345
351
|
"h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
|
|
346
|
-
|
|
352
|
+
Dt[n]
|
|
347
353
|
],
|
|
348
354
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
349
355
|
l
|
|
@@ -356,13 +362,13 @@ const St = {
|
|
|
356
362
|
};
|
|
357
363
|
return /* @__PURE__ */ c("a", { className: b, ...p, children: [
|
|
358
364
|
o,
|
|
359
|
-
f && /* @__PURE__ */ e(
|
|
365
|
+
f && /* @__PURE__ */ e(et, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
360
366
|
] });
|
|
361
|
-
},
|
|
367
|
+
}, Tt = {
|
|
362
368
|
sm: "h-control-sm px-3 text-sm",
|
|
363
369
|
md: "h-control-md px-3 text-sm"
|
|
364
370
|
};
|
|
365
|
-
function
|
|
371
|
+
function hn({
|
|
366
372
|
options: t,
|
|
367
373
|
value: r,
|
|
368
374
|
onChange: n,
|
|
@@ -389,7 +395,7 @@ function dn({
|
|
|
389
395
|
"inline-flex items-center justify-center rounded-sm",
|
|
390
396
|
"transition-colors duration-fast ease-out",
|
|
391
397
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
392
|
-
|
|
398
|
+
Tt[s],
|
|
393
399
|
h ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
|
|
394
400
|
),
|
|
395
401
|
children: o.label
|
|
@@ -402,7 +408,7 @@ function dn({
|
|
|
402
408
|
}
|
|
403
409
|
function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
404
410
|
const [l, o] = R({});
|
|
405
|
-
return
|
|
411
|
+
return bt(() => {
|
|
406
412
|
if (!t) return;
|
|
407
413
|
const h = () => {
|
|
408
414
|
const u = r.current;
|
|
@@ -415,7 +421,7 @@ function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
|
|
|
415
421
|
};
|
|
416
422
|
}, [t, r, n, s, a]), l;
|
|
417
423
|
}
|
|
418
|
-
const
|
|
424
|
+
const _t = ({
|
|
419
425
|
trigger: t,
|
|
420
426
|
children: r,
|
|
421
427
|
placement: n = "bottom-start",
|
|
@@ -428,10 +434,10 @@ const $t = ({
|
|
|
428
434
|
const [u, N] = R(!1), m = se(null), f = se(null), b = ze(u, f, { placement: n });
|
|
429
435
|
Q(() => {
|
|
430
436
|
if (!u) return;
|
|
431
|
-
const g = (
|
|
432
|
-
m.current && !m.current.contains(
|
|
433
|
-
}, x = (
|
|
434
|
-
|
|
437
|
+
const g = (D) => {
|
|
438
|
+
m.current && !m.current.contains(D.target) && N(!1);
|
|
439
|
+
}, x = (D) => {
|
|
440
|
+
D.key === "Escape" && N(!1);
|
|
435
441
|
};
|
|
436
442
|
return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
|
|
437
443
|
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
|
|
@@ -472,11 +478,11 @@ const $t = ({
|
|
|
472
478
|
}
|
|
473
479
|
)
|
|
474
480
|
] });
|
|
475
|
-
},
|
|
481
|
+
}, At = {
|
|
476
482
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover",
|
|
477
483
|
secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
|
|
478
484
|
outline: "border border-accent-border text-accent hover:bg-accent-soft"
|
|
479
|
-
},
|
|
485
|
+
}, Lt = {
|
|
480
486
|
sm: "h-control-sm w-7",
|
|
481
487
|
md: "h-control-md w-8"
|
|
482
488
|
};
|
|
@@ -508,7 +514,7 @@ function Re({
|
|
|
508
514
|
}
|
|
509
515
|
),
|
|
510
516
|
f && /* @__PURE__ */ e(
|
|
511
|
-
|
|
517
|
+
_t,
|
|
512
518
|
{
|
|
513
519
|
placement: u,
|
|
514
520
|
disabled: m,
|
|
@@ -521,11 +527,11 @@ function Re({
|
|
|
521
527
|
className: d(
|
|
522
528
|
"inline-flex items-center justify-center rounded-md rounded-l-none",
|
|
523
529
|
"transition-colors duration-fast ease-out",
|
|
524
|
-
|
|
525
|
-
|
|
530
|
+
At[n],
|
|
531
|
+
Lt[s],
|
|
526
532
|
m && "cursor-not-allowed opacity-50"
|
|
527
533
|
),
|
|
528
|
-
children: /* @__PURE__ */ e(
|
|
534
|
+
children: /* @__PURE__ */ e(ve, { className: "size-icon-md" })
|
|
529
535
|
}
|
|
530
536
|
),
|
|
531
537
|
children: (b) => /* @__PURE__ */ e(xe, { children: l.map((p) => /* @__PURE__ */ c(
|
|
@@ -552,17 +558,17 @@ function Re({
|
|
|
552
558
|
)
|
|
553
559
|
] });
|
|
554
560
|
}
|
|
555
|
-
const
|
|
561
|
+
const It = {
|
|
556
562
|
sm: "size-checkbox-sm",
|
|
557
563
|
md: "size-checkbox",
|
|
558
564
|
lg: "size-checkbox-lg",
|
|
559
565
|
full: "size-checkbox"
|
|
560
|
-
},
|
|
566
|
+
}, jt = {
|
|
561
567
|
sm: "min-h-control-sm",
|
|
562
568
|
md: "min-h-control-md",
|
|
563
569
|
lg: "min-h-control-lg",
|
|
564
570
|
full: "min-h-control-md"
|
|
565
|
-
},
|
|
571
|
+
}, Pt = {
|
|
566
572
|
sm: "text-sm",
|
|
567
573
|
md: "text-base",
|
|
568
574
|
lg: "text-md",
|
|
@@ -589,7 +595,7 @@ const _t = {
|
|
|
589
595
|
return oe.useEffect(() => {
|
|
590
596
|
C.current && (C.current.indeterminate = a);
|
|
591
597
|
}, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col", l), children: [
|
|
592
|
-
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3",
|
|
598
|
+
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3", jt[s]), children: [
|
|
593
599
|
/* @__PURE__ */ e(
|
|
594
600
|
"input",
|
|
595
601
|
{
|
|
@@ -598,13 +604,15 @@ const _t = {
|
|
|
598
604
|
type: "checkbox",
|
|
599
605
|
"aria-invalid": p || void 0,
|
|
600
606
|
className: d(
|
|
601
|
-
//
|
|
602
|
-
//
|
|
603
|
-
|
|
607
|
+
// radius-xs (5px): its own step on the scale. At 16px the 9px
|
|
608
|
+
// button radius reads as a circle and the 7px chip radius still
|
|
609
|
+
// rounds the corners away — a checkbox has to stay a square you
|
|
610
|
+
// can aim at, with the corner just knocked off.
|
|
611
|
+
"shrink-0 rounded-xs border accent-accent",
|
|
604
612
|
"transition-colors duration-fast ease-out",
|
|
605
613
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
606
614
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
607
|
-
|
|
615
|
+
It[s],
|
|
608
616
|
p ? "border-danger-border" : "border-border-strong",
|
|
609
617
|
h
|
|
610
618
|
),
|
|
@@ -619,7 +627,7 @@ const _t = {
|
|
|
619
627
|
className: d(
|
|
620
628
|
"cursor-pointer",
|
|
621
629
|
p ? "text-danger-fg" : "text-text",
|
|
622
|
-
|
|
630
|
+
Pt[s],
|
|
623
631
|
o
|
|
624
632
|
),
|
|
625
633
|
children: t
|
|
@@ -633,7 +641,7 @@ const _t = {
|
|
|
633
641
|
}
|
|
634
642
|
);
|
|
635
643
|
pe.displayName = "Checkbox";
|
|
636
|
-
const
|
|
644
|
+
const Ot = () => /* @__PURE__ */ e(Y, { icon: tt, size: "md", color: "current" }), Ft = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Bt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), $e = me(({
|
|
637
645
|
value: t,
|
|
638
646
|
onChange: r,
|
|
639
647
|
placeholder: n = "Select date",
|
|
@@ -646,7 +654,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
646
654
|
format: N = "MM/dd/yyyy",
|
|
647
655
|
withTime: m = !1
|
|
648
656
|
}, f) => {
|
|
649
|
-
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null),
|
|
657
|
+
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null), D = se(null), E = ze(b, D);
|
|
650
658
|
Q(() => {
|
|
651
659
|
const i = (S) => {
|
|
652
660
|
x.current && !x.current.contains(S.target) && p(!1);
|
|
@@ -658,8 +666,8 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
658
666
|
const W = (i) => {
|
|
659
667
|
if (!i) return "";
|
|
660
668
|
const S = i.getDate().toString().padStart(2, "0"), y = (i.getMonth() + 1).toString().padStart(2, "0"), A = i.getFullYear(), w = N === "dd/MM/yyyy" ? `${S}/${y}/${A}` : N === "yyyy-MM-dd" ? `${A}-${y}-${S}` : `${y}/${S}/${A}`;
|
|
661
|
-
return m ? `${w} ${
|
|
662
|
-
},
|
|
669
|
+
return m ? `${w} ${T(i)}` : w;
|
|
670
|
+
}, T = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, X = (i) => {
|
|
663
671
|
const [S, y] = i.split(":").map(Number);
|
|
664
672
|
if (Number.isNaN(S) || Number.isNaN(y)) return;
|
|
665
673
|
const A = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
@@ -686,8 +694,8 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
686
694
|
g(new Date(C.getFullYear(), C.getMonth() + 1, 1));
|
|
687
695
|
}, re = () => {
|
|
688
696
|
r?.(null), p(!1);
|
|
689
|
-
},
|
|
690
|
-
"w-full border border-border rounded-
|
|
697
|
+
}, P = d(
|
|
698
|
+
"w-full border border-border-strong rounded-tile transition-colors duration-fast",
|
|
691
699
|
"bg-surface text-text",
|
|
692
700
|
"placeholder:text-text-muted",
|
|
693
701
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -714,7 +722,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
714
722
|
"December"
|
|
715
723
|
];
|
|
716
724
|
return /* @__PURE__ */ c("div", { ref: x, className: "relative", children: [
|
|
717
|
-
/* @__PURE__ */ c("div", { ref:
|
|
725
|
+
/* @__PURE__ */ c("div", { ref: D, className: "relative", children: [
|
|
718
726
|
/* @__PURE__ */ e(
|
|
719
727
|
"input",
|
|
720
728
|
{
|
|
@@ -726,7 +734,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
726
734
|
required: a,
|
|
727
735
|
readOnly: !0,
|
|
728
736
|
onClick: () => !s && p(!b),
|
|
729
|
-
className: d(
|
|
737
|
+
className: d(P, "pr-10 cursor-pointer")
|
|
730
738
|
}
|
|
731
739
|
),
|
|
732
740
|
/* @__PURE__ */ e(
|
|
@@ -736,7 +744,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
736
744
|
onClick: () => !s && p(!b),
|
|
737
745
|
disabled: s,
|
|
738
746
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
739
|
-
children: /* @__PURE__ */ e(
|
|
747
|
+
children: /* @__PURE__ */ e(Ot, {})
|
|
740
748
|
}
|
|
741
749
|
)
|
|
742
750
|
] }),
|
|
@@ -747,7 +755,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
747
755
|
{
|
|
748
756
|
onClick: q,
|
|
749
757
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
750
|
-
children: /* @__PURE__ */ e(
|
|
758
|
+
children: /* @__PURE__ */ e(Ft, {})
|
|
751
759
|
}
|
|
752
760
|
),
|
|
753
761
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
@@ -760,7 +768,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
760
768
|
{
|
|
761
769
|
onClick: K,
|
|
762
770
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
763
|
-
children: /* @__PURE__ */ e(
|
|
771
|
+
children: /* @__PURE__ */ e(Bt, {})
|
|
764
772
|
}
|
|
765
773
|
)
|
|
766
774
|
] }),
|
|
@@ -793,7 +801,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
793
801
|
{
|
|
794
802
|
id: "datepicker-time",
|
|
795
803
|
type: "time",
|
|
796
|
-
value: t ?
|
|
804
|
+
value: t ? T(t) : "",
|
|
797
805
|
onChange: (i) => X(i.target.value),
|
|
798
806
|
className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
|
|
799
807
|
}
|
|
@@ -819,12 +827,12 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
819
827
|
] })
|
|
820
828
|
] })
|
|
821
829
|
] });
|
|
822
|
-
}),
|
|
830
|
+
}), Rt = {
|
|
823
831
|
sm: "h-control-sm px-3 text-sm",
|
|
824
832
|
md: "h-control-md px-3 text-sm",
|
|
825
833
|
lg: "h-control-lg px-3 text-base",
|
|
826
834
|
full: "h-control-md w-full px-3 text-sm"
|
|
827
|
-
},
|
|
835
|
+
}, Ne = (t) => t.trim().toLowerCase(), we = me(
|
|
828
836
|
({
|
|
829
837
|
label: t,
|
|
830
838
|
helperText: r,
|
|
@@ -843,42 +851,42 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
843
851
|
value: C,
|
|
844
852
|
onChange: g,
|
|
845
853
|
allowCreate: x,
|
|
846
|
-
onCreateOption:
|
|
854
|
+
onCreateOption: D,
|
|
847
855
|
...E
|
|
848
856
|
}, W) => {
|
|
849
|
-
const
|
|
857
|
+
const T = f || `select-${Math.random().toString(36).substr(2, 9)}`, X = !!n, [U, I] = oe.useState(!1), [q, K] = oe.useState(""), re = oe.useRef(null), P = oe.useRef(null), ce = ze(U, P, { matchWidth: !0 }), [k, i] = oe.useState(o);
|
|
850
858
|
oe.useImperativeHandle(W, () => re.current), oe.useEffect(() => {
|
|
851
|
-
const M = (
|
|
852
|
-
re.current && !re.current.contains(
|
|
859
|
+
const M = (_) => {
|
|
860
|
+
re.current && !re.current.contains(_.target) && I(!1);
|
|
853
861
|
};
|
|
854
862
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
855
863
|
}, []);
|
|
856
864
|
const S = oe.useCallback(
|
|
857
|
-
(M,
|
|
858
|
-
(z) =>
|
|
865
|
+
(M, _) => M.some(
|
|
866
|
+
(z) => Ne(z.value) === Ne(_) || Ne(z.label) === Ne(_)
|
|
859
867
|
),
|
|
860
868
|
[]
|
|
861
869
|
), y = oe.useCallback(
|
|
862
|
-
(M,
|
|
863
|
-
const z = [...M],
|
|
864
|
-
const
|
|
865
|
-
|
|
870
|
+
(M, _) => {
|
|
871
|
+
const z = [...M], H = (B) => {
|
|
872
|
+
const O = (B ?? "").trim();
|
|
873
|
+
O && (S(z, O) || z.push({ value: O, label: O }));
|
|
866
874
|
};
|
|
867
|
-
return Array.isArray(
|
|
875
|
+
return Array.isArray(_) ? _.forEach(H) : H(_), z;
|
|
868
876
|
},
|
|
869
877
|
[S]
|
|
870
878
|
);
|
|
871
879
|
oe.useEffect(() => {
|
|
872
880
|
i((M) => {
|
|
873
|
-
const
|
|
881
|
+
const _ = [...o];
|
|
874
882
|
return M.forEach((z) => {
|
|
875
|
-
!S(
|
|
876
|
-
}), y(
|
|
883
|
+
!S(_, z.value) && !S(_, z.label) && _.push(z);
|
|
884
|
+
}), y(_, C);
|
|
877
885
|
});
|
|
878
886
|
}, [o, C, y, S]);
|
|
879
887
|
const A = (M) => {
|
|
880
888
|
if (p) {
|
|
881
|
-
const
|
|
889
|
+
const _ = Array.isArray(C) ? C : [], z = _.includes(M) ? _.filter((H) => H !== M) : [..._, M];
|
|
882
890
|
g?.(z);
|
|
883
891
|
} else
|
|
884
892
|
g?.(M), I(!1), K("");
|
|
@@ -887,18 +895,18 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
887
895
|
) : [], ae = b && q ? k.filter(
|
|
888
896
|
(M) => M.label.toLowerCase().includes(q.toLowerCase())
|
|
889
897
|
) : k, le = !!x && !!b && !!q.trim() && !S(k, q), G = (M) => {
|
|
890
|
-
const
|
|
891
|
-
if (!
|
|
892
|
-
const z =
|
|
893
|
-
value:
|
|
894
|
-
label:
|
|
898
|
+
const _ = M.trim();
|
|
899
|
+
if (!_) return;
|
|
900
|
+
const z = D?.(_) ?? {
|
|
901
|
+
value: _,
|
|
902
|
+
label: _
|
|
895
903
|
};
|
|
896
904
|
if (S(k, z.value) || S(k, z.label)) {
|
|
897
905
|
A(z.value), K(""), p || I(!1);
|
|
898
906
|
return;
|
|
899
907
|
}
|
|
900
|
-
i((
|
|
901
|
-
},
|
|
908
|
+
i((H) => [...H, z]), A(z.value), K(""), p || I(!1);
|
|
909
|
+
}, j = () => p ? ee.length > 0 ? ee.map((M) => M.label).join(", ") : h || "Select options" : w?.label || h || "Select an option";
|
|
902
910
|
return /* @__PURE__ */ c(
|
|
903
911
|
"div",
|
|
904
912
|
{
|
|
@@ -913,7 +921,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
913
921
|
t && /* @__PURE__ */ e(
|
|
914
922
|
"label",
|
|
915
923
|
{
|
|
916
|
-
htmlFor:
|
|
924
|
+
htmlFor: T,
|
|
917
925
|
onClick: () => I(!U),
|
|
918
926
|
className: d(
|
|
919
927
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
@@ -927,24 +935,24 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
927
935
|
/* @__PURE__ */ c(
|
|
928
936
|
"button",
|
|
929
937
|
{
|
|
930
|
-
ref:
|
|
938
|
+
ref: P,
|
|
931
939
|
type: "button",
|
|
932
|
-
id:
|
|
940
|
+
id: T,
|
|
933
941
|
disabled: l,
|
|
934
942
|
onClick: () => I(!U),
|
|
935
943
|
className: d(
|
|
936
|
-
"flex w-full items-center justify-between gap-2 rounded-
|
|
944
|
+
"flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
|
|
937
945
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
938
946
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
939
947
|
"bg-surface",
|
|
940
|
-
|
|
941
|
-
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
948
|
+
Rt[s],
|
|
949
|
+
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
942
950
|
m
|
|
943
951
|
),
|
|
944
952
|
children: [
|
|
945
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children:
|
|
953
|
+
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: j() }),
|
|
946
954
|
/* @__PURE__ */ e(
|
|
947
|
-
|
|
955
|
+
rt,
|
|
948
956
|
{
|
|
949
957
|
size: 16,
|
|
950
958
|
className: d(
|
|
@@ -1000,7 +1008,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1000
1008
|
}
|
|
1001
1009
|
),
|
|
1002
1010
|
ae.map((M) => {
|
|
1003
|
-
const
|
|
1011
|
+
const _ = p ? Array.isArray(C) && C.includes(M.value) : C === M.value;
|
|
1004
1012
|
return /* @__PURE__ */ e(
|
|
1005
1013
|
"li",
|
|
1006
1014
|
{
|
|
@@ -1009,14 +1017,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1009
1017
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1010
1018
|
"text-text",
|
|
1011
1019
|
M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1012
|
-
|
|
1020
|
+
_ && "bg-accent-soft text-accent font-semibold"
|
|
1013
1021
|
),
|
|
1014
1022
|
children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
|
|
1015
1023
|
p && /* @__PURE__ */ e(
|
|
1016
1024
|
"input",
|
|
1017
1025
|
{
|
|
1018
1026
|
type: "checkbox",
|
|
1019
|
-
checked:
|
|
1027
|
+
checked: _,
|
|
1020
1028
|
readOnly: !0,
|
|
1021
1029
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1022
1030
|
}
|
|
@@ -1045,13 +1053,13 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1045
1053
|
);
|
|
1046
1054
|
}
|
|
1047
1055
|
);
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1056
|
+
we.displayName = "Select";
|
|
1057
|
+
const Ht = {
|
|
1050
1058
|
sm: "h-control-sm px-3 text-sm",
|
|
1051
1059
|
md: "h-control-md px-3 text-base",
|
|
1052
1060
|
lg: "h-control-lg px-3 text-base",
|
|
1053
1061
|
full: "h-control-md px-3 text-base"
|
|
1054
|
-
},
|
|
1062
|
+
}, He = "mb-1.5 block text-sm font-medium", Ve = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", qe = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", be = me(
|
|
1055
1063
|
({
|
|
1056
1064
|
label: t,
|
|
1057
1065
|
helperText: r,
|
|
@@ -1067,15 +1075,15 @@ const Ft = {
|
|
|
1067
1075
|
id: f,
|
|
1068
1076
|
...b
|
|
1069
1077
|
}, p) => {
|
|
1070
|
-
const C = oe.useId(), g = f || `textfield-${C}`, x = !!n,
|
|
1078
|
+
const C = oe.useId(), g = f || `textfield-${C}`, x = !!n, D = n || r ? `${g}-description` : void 0;
|
|
1071
1079
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", u), children: [
|
|
1072
1080
|
t && /* @__PURE__ */ e(
|
|
1073
1081
|
"label",
|
|
1074
1082
|
{
|
|
1075
1083
|
htmlFor: g,
|
|
1076
1084
|
className: d(
|
|
1077
|
-
|
|
1078
|
-
x ? "text-danger-fg" : "text-text-
|
|
1085
|
+
He,
|
|
1086
|
+
x ? "text-danger-fg" : "text-text-muted",
|
|
1079
1087
|
N
|
|
1080
1088
|
),
|
|
1081
1089
|
children: t
|
|
@@ -1089,17 +1097,13 @@ const Ft = {
|
|
|
1089
1097
|
ref: p,
|
|
1090
1098
|
id: g,
|
|
1091
1099
|
"aria-invalid": x || void 0,
|
|
1092
|
-
"aria-describedby":
|
|
1100
|
+
"aria-describedby": D,
|
|
1093
1101
|
className: d(
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
"placeholder:text-text-subtle",
|
|
1097
|
-
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1098
|
-
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1099
|
-
Ft[s],
|
|
1102
|
+
Ve,
|
|
1103
|
+
Ht[s],
|
|
1100
1104
|
l && "pl-9",
|
|
1101
1105
|
(o || h) && "pr-9",
|
|
1102
|
-
x
|
|
1106
|
+
qe(x),
|
|
1103
1107
|
m
|
|
1104
1108
|
),
|
|
1105
1109
|
...b
|
|
@@ -1116,7 +1120,7 @@ const Ft = {
|
|
|
1116
1120
|
(n || r) && /* @__PURE__ */ e(
|
|
1117
1121
|
"p",
|
|
1118
1122
|
{
|
|
1119
|
-
id:
|
|
1123
|
+
id: D,
|
|
1120
1124
|
className: d("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
|
|
1121
1125
|
children: n || r
|
|
1122
1126
|
}
|
|
@@ -1125,7 +1129,7 @@ const Ft = {
|
|
|
1125
1129
|
}
|
|
1126
1130
|
);
|
|
1127
1131
|
be.displayName = "TextField";
|
|
1128
|
-
function
|
|
1132
|
+
function Vt({
|
|
1129
1133
|
value: t,
|
|
1130
1134
|
onChange: r,
|
|
1131
1135
|
onListFolders: n,
|
|
@@ -1148,7 +1152,7 @@ function Rt({
|
|
|
1148
1152
|
const m = t ?? {};
|
|
1149
1153
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
1150
1154
|
/* @__PURE__ */ e(
|
|
1151
|
-
|
|
1155
|
+
we,
|
|
1152
1156
|
{
|
|
1153
1157
|
size: a,
|
|
1154
1158
|
fullWidth: !0,
|
|
@@ -1170,7 +1174,7 @@ function Rt({
|
|
|
1170
1174
|
)
|
|
1171
1175
|
] });
|
|
1172
1176
|
}
|
|
1173
|
-
const fe = (...t) => t.filter(Boolean).join(" "),
|
|
1177
|
+
const fe = (...t) => t.filter(Boolean).join(" "), qt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ut = (t) => /* @__PURE__ */ e(ve, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Wt = {
|
|
1174
1178
|
sm: "h-control-sm px-3 text-sm",
|
|
1175
1179
|
md: "h-control-md px-3 text-base",
|
|
1176
1180
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1180,14 +1184,14 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1180
1184
|
md: "h-5 w-5",
|
|
1181
1185
|
lg: "h-6 w-6",
|
|
1182
1186
|
full: "h-6 w-6"
|
|
1183
|
-
},
|
|
1187
|
+
}, Kt = me(
|
|
1184
1188
|
({
|
|
1185
1189
|
label: t,
|
|
1186
1190
|
helperText: r,
|
|
1187
1191
|
error: n,
|
|
1188
1192
|
size: s = "md",
|
|
1189
1193
|
fullWidth: a = !1,
|
|
1190
|
-
startIcon: l = /* @__PURE__ */ e(
|
|
1194
|
+
startIcon: l = /* @__PURE__ */ e(qt, {}),
|
|
1191
1195
|
loading: o = !1,
|
|
1192
1196
|
containerClassName: h,
|
|
1193
1197
|
labelClassName: u,
|
|
@@ -1199,18 +1203,18 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1199
1203
|
debounceTime: C = 500,
|
|
1200
1204
|
showAllOnOpen: g = !1,
|
|
1201
1205
|
value: x,
|
|
1202
|
-
onChange:
|
|
1206
|
+
onChange: D,
|
|
1203
1207
|
...E
|
|
1204
1208
|
}, W) => {
|
|
1205
|
-
const
|
|
1209
|
+
const T = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, K] = R(x || ""), [re, P] = R(!1), [ce, k] = R(!1), [i, S] = R(!1);
|
|
1206
1210
|
Q(() => {
|
|
1207
1211
|
x !== void 0 && K(x);
|
|
1208
1212
|
}, [x]);
|
|
1209
1213
|
const y = he(() => {
|
|
1210
1214
|
if (g && !i || !q) return f;
|
|
1211
|
-
const
|
|
1215
|
+
const j = String(q).toLowerCase();
|
|
1212
1216
|
return f.filter(
|
|
1213
|
-
(M) => String(M.label).toLowerCase().includes(
|
|
1217
|
+
(M) => String(M.label).toLowerCase().includes(j)
|
|
1214
1218
|
);
|
|
1215
1219
|
}, [q, f, g, i]);
|
|
1216
1220
|
Q(() => {
|
|
@@ -1218,7 +1222,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1218
1222
|
k(!1);
|
|
1219
1223
|
return;
|
|
1220
1224
|
}
|
|
1221
|
-
const
|
|
1225
|
+
const j = setTimeout(async () => {
|
|
1222
1226
|
k(!0);
|
|
1223
1227
|
try {
|
|
1224
1228
|
await b(String(q));
|
|
@@ -1229,21 +1233,21 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1229
1233
|
}
|
|
1230
1234
|
}, C);
|
|
1231
1235
|
return () => {
|
|
1232
|
-
clearTimeout(
|
|
1236
|
+
clearTimeout(j), k(!1);
|
|
1233
1237
|
};
|
|
1234
1238
|
}, [q, C, b]), Q(() => {
|
|
1235
|
-
const
|
|
1236
|
-
U.current && !U.current.contains(M.target) &&
|
|
1239
|
+
const j = (M) => {
|
|
1240
|
+
U.current && !U.current.contains(M.target) && P(!1);
|
|
1237
1241
|
};
|
|
1238
|
-
return document.addEventListener("mousedown",
|
|
1242
|
+
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1239
1243
|
}, []);
|
|
1240
|
-
const A = (
|
|
1241
|
-
const M =
|
|
1242
|
-
K(M),
|
|
1243
|
-
}, w = (
|
|
1244
|
-
K(
|
|
1244
|
+
const A = (j) => {
|
|
1245
|
+
const M = j.target.value;
|
|
1246
|
+
K(M), P(!0), S(!0), D && D(j);
|
|
1247
|
+
}, w = (j) => {
|
|
1248
|
+
K(j.label), P(!1), S(!1), p && p(j.value);
|
|
1245
1249
|
}, ee = () => {
|
|
1246
|
-
(f.length > 0 || b) && (
|
|
1250
|
+
(f.length > 0 || b) && (P(!0), S(!1));
|
|
1247
1251
|
}, ae = o || ce, le = re && (y.length > 0 || ae), G = he(() => W || I, [W]);
|
|
1248
1252
|
return /* @__PURE__ */ c(
|
|
1249
1253
|
"div",
|
|
@@ -1259,7 +1263,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1259
1263
|
t && /* @__PURE__ */ e(
|
|
1260
1264
|
"label",
|
|
1261
1265
|
{
|
|
1262
|
-
htmlFor:
|
|
1266
|
+
htmlFor: T,
|
|
1263
1267
|
className: fe(
|
|
1264
1268
|
"block text-sm font-medium mb-1",
|
|
1265
1269
|
X ? "text-danger-fg" : "text-text",
|
|
@@ -1274,23 +1278,23 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1274
1278
|
"input",
|
|
1275
1279
|
{
|
|
1276
1280
|
ref: G,
|
|
1277
|
-
id:
|
|
1281
|
+
id: T,
|
|
1278
1282
|
value: q,
|
|
1279
1283
|
onChange: A,
|
|
1280
1284
|
onFocus: ee,
|
|
1281
1285
|
className: fe(
|
|
1282
1286
|
// Base styles
|
|
1283
|
-
"block w-full rounded-
|
|
1287
|
+
"block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
|
|
1284
1288
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1285
1289
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1286
1290
|
// Size styles
|
|
1287
|
-
|
|
1291
|
+
Wt[s],
|
|
1288
1292
|
// Icon padding
|
|
1289
1293
|
l ? "pl-10" : "",
|
|
1290
1294
|
"pr-10",
|
|
1291
1295
|
// Altijd padding rechts voor de dropdown/loading icon
|
|
1292
1296
|
// State styles
|
|
1293
|
-
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
1297
|
+
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
1294
1298
|
N || ""
|
|
1295
1299
|
),
|
|
1296
1300
|
...E
|
|
@@ -1299,7 +1303,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1299
1303
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || o ? (
|
|
1300
1304
|
// Loading Spinner
|
|
1301
1305
|
/* @__PURE__ */ e(
|
|
1302
|
-
|
|
1306
|
+
nt,
|
|
1303
1307
|
{
|
|
1304
1308
|
className: fe("animate-spin text-info-fg", Me[s]),
|
|
1305
1309
|
"aria-hidden": !0
|
|
@@ -1308,7 +1312,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1308
1312
|
) : (
|
|
1309
1313
|
// Dropdown Chevron
|
|
1310
1314
|
/* @__PURE__ */ e(
|
|
1311
|
-
|
|
1315
|
+
Ut,
|
|
1312
1316
|
{
|
|
1313
1317
|
className: fe(
|
|
1314
1318
|
"text-text-muted cursor-pointer transition-transform",
|
|
@@ -1316,7 +1320,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1316
1320
|
re ? "rotate-180" : "rotate-0"
|
|
1317
1321
|
),
|
|
1318
1322
|
onClick: () => {
|
|
1319
|
-
|
|
1323
|
+
P((j) => (j || S(!1), !j));
|
|
1320
1324
|
}
|
|
1321
1325
|
}
|
|
1322
1326
|
)
|
|
@@ -1327,16 +1331,16 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1327
1331
|
{
|
|
1328
1332
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1329
1333
|
role: "listbox",
|
|
1330
|
-
children: y.length > 0 ? y.map((
|
|
1334
|
+
children: y.length > 0 ? y.map((j) => /* @__PURE__ */ e(
|
|
1331
1335
|
"li",
|
|
1332
1336
|
{
|
|
1333
1337
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1334
|
-
onClick: () => w(
|
|
1338
|
+
onClick: () => w(j),
|
|
1335
1339
|
role: "option",
|
|
1336
|
-
"aria-selected": q ===
|
|
1337
|
-
children:
|
|
1340
|
+
"aria-selected": q === j.label,
|
|
1341
|
+
children: j.label
|
|
1338
1342
|
},
|
|
1339
|
-
|
|
1343
|
+
j.value
|
|
1340
1344
|
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ae || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
1341
1345
|
}
|
|
1342
1346
|
),
|
|
@@ -1359,8 +1363,8 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1359
1363
|
);
|
|
1360
1364
|
}
|
|
1361
1365
|
);
|
|
1362
|
-
|
|
1363
|
-
const
|
|
1366
|
+
Kt.displayName = "SearchableTextField";
|
|
1367
|
+
const Gt = me(
|
|
1364
1368
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
1365
1369
|
const h = /* @__PURE__ */ e(
|
|
1366
1370
|
"span",
|
|
@@ -1413,8 +1417,8 @@ const Ut = me(
|
|
|
1413
1417
|
);
|
|
1414
1418
|
}
|
|
1415
1419
|
);
|
|
1416
|
-
|
|
1417
|
-
function
|
|
1420
|
+
Gt.displayName = "Switch";
|
|
1421
|
+
function Jt({
|
|
1418
1422
|
variant: t = "page",
|
|
1419
1423
|
children: r,
|
|
1420
1424
|
showTableSkeleton: n = !1,
|
|
@@ -1463,7 +1467,7 @@ function Wt({
|
|
|
1463
1467
|
] })
|
|
1464
1468
|
] }) });
|
|
1465
1469
|
}
|
|
1466
|
-
const
|
|
1470
|
+
const Yt = ({
|
|
1467
1471
|
trigger: t,
|
|
1468
1472
|
options: r,
|
|
1469
1473
|
value: n,
|
|
@@ -1474,7 +1478,7 @@ const Kt = ({
|
|
|
1474
1478
|
showCheck: h = !0,
|
|
1475
1479
|
header: u
|
|
1476
1480
|
}) => {
|
|
1477
|
-
const [N, m] = R(!1), [f, b] = R(null), [p, C] = R({ top: 0, left: 0 }), g = se(null), x = se(null),
|
|
1481
|
+
const [N, m] = R(!1), [f, b] = R(null), [p, C] = R({ top: 0, left: 0 }), g = se(null), x = se(null), D = se(null), E = se(null), W = ze(N, x, { placement: a }), T = se(null), X = () => Array.from(
|
|
1478
1482
|
E.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1479
1483
|
);
|
|
1480
1484
|
Q(() => {
|
|
@@ -1490,14 +1494,14 @@ const Kt = ({
|
|
|
1490
1494
|
};
|
|
1491
1495
|
Q(() => {
|
|
1492
1496
|
const i = (S) => {
|
|
1493
|
-
g.current && (!g.current.contains(S.target) ||
|
|
1497
|
+
g.current && (!g.current.contains(S.target) || D.current && !D.current.contains(S.target)) && (m(!1), b(null), T.current && (clearTimeout(T.current), T.current = null));
|
|
1494
1498
|
};
|
|
1495
1499
|
return N && document.addEventListener("mousedown", i), () => {
|
|
1496
1500
|
document.removeEventListener("mousedown", i);
|
|
1497
1501
|
};
|
|
1498
1502
|
}, [N]), Q(() => {
|
|
1499
1503
|
const i = (S) => {
|
|
1500
|
-
S.key === "Escape" && (m(!1), b(null), x.current?.focus(),
|
|
1504
|
+
S.key === "Escape" && (m(!1), b(null), x.current?.focus(), T.current && (clearTimeout(T.current), T.current = null));
|
|
1501
1505
|
};
|
|
1502
1506
|
return N && document.addEventListener("keydown", i), () => {
|
|
1503
1507
|
document.removeEventListener("keydown", i);
|
|
@@ -1516,19 +1520,19 @@ const Kt = ({
|
|
|
1516
1520
|
}
|
|
1517
1521
|
}
|
|
1518
1522
|
}, [f]), Q(() => () => {
|
|
1519
|
-
|
|
1523
|
+
T.current && clearTimeout(T.current);
|
|
1520
1524
|
}, []);
|
|
1521
1525
|
const I = (i) => {
|
|
1522
|
-
i.stopPropagation(), !l && (m(!N), b(null),
|
|
1526
|
+
i.stopPropagation(), !l && (m(!N), b(null), T.current && (clearTimeout(T.current), T.current = null));
|
|
1523
1527
|
}, q = (i, S, y) => {
|
|
1524
1528
|
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, y), m(!1), b(null));
|
|
1525
1529
|
}, K = (i) => {
|
|
1526
|
-
|
|
1530
|
+
T.current && (clearTimeout(T.current), T.current = null), i.children && i.children.length > 0 ? b(i.value) : b(null);
|
|
1527
1531
|
}, re = (i) => {
|
|
1528
|
-
i.children && i.children.length > 0 ?
|
|
1532
|
+
i.children && i.children.length > 0 ? T.current = setTimeout(() => {
|
|
1529
1533
|
b(null);
|
|
1530
1534
|
}, 150) : b(null);
|
|
1531
|
-
},
|
|
1535
|
+
}, P = (i, S, y) => {
|
|
1532
1536
|
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, y), m(!1), b(null));
|
|
1533
1537
|
}, ce = d(
|
|
1534
1538
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
@@ -1608,17 +1612,17 @@ const Kt = ({
|
|
|
1608
1612
|
y && A && /* @__PURE__ */ e(
|
|
1609
1613
|
"div",
|
|
1610
1614
|
{
|
|
1611
|
-
ref:
|
|
1615
|
+
ref: D,
|
|
1612
1616
|
className: k,
|
|
1613
1617
|
style: {
|
|
1614
1618
|
top: `${p.top}px`,
|
|
1615
1619
|
left: `${p.left}px`
|
|
1616
1620
|
},
|
|
1617
1621
|
onMouseEnter: () => {
|
|
1618
|
-
|
|
1622
|
+
T.current && (clearTimeout(T.current), T.current = null), b(i.value);
|
|
1619
1623
|
},
|
|
1620
1624
|
onMouseLeave: () => {
|
|
1621
|
-
|
|
1625
|
+
T.current = setTimeout(() => {
|
|
1622
1626
|
b(null);
|
|
1623
1627
|
}, 150);
|
|
1624
1628
|
},
|
|
@@ -1637,7 +1641,7 @@ const Kt = ({
|
|
|
1637
1641
|
return /* @__PURE__ */ c(
|
|
1638
1642
|
"button",
|
|
1639
1643
|
{
|
|
1640
|
-
onClick: (le) =>
|
|
1644
|
+
onClick: (le) => P(
|
|
1641
1645
|
le,
|
|
1642
1646
|
w,
|
|
1643
1647
|
i.value
|
|
@@ -1682,17 +1686,17 @@ const Kt = ({
|
|
|
1682
1686
|
]
|
|
1683
1687
|
}
|
|
1684
1688
|
);
|
|
1685
|
-
},
|
|
1689
|
+
}, xn = (t) => (r) => t(r instanceof Date ? r : null), bn = (t) => (r) => t(typeof r == "string" ? r : ""), Ie = {
|
|
1686
1690
|
none: "pl-0",
|
|
1687
1691
|
sm: "pl-2",
|
|
1688
1692
|
md: "pl-4",
|
|
1689
1693
|
lg: "pl-6"
|
|
1690
|
-
},
|
|
1694
|
+
}, je = {
|
|
1691
1695
|
none: "pr-0",
|
|
1692
1696
|
sm: "pr-2",
|
|
1693
1697
|
md: "pr-4",
|
|
1694
1698
|
lg: "pr-6"
|
|
1695
|
-
},
|
|
1699
|
+
}, Xt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Zt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: st, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Qt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ve, size: "sm", className: t ? "text-text" : "text-text-subtle" }), er = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), tr = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), rr = () => /* @__PURE__ */ e(Y, { icon: at, size: "md", color: "current" }), nr = () => /* @__PURE__ */ e(Y, { icon: lt, size: "md", color: "current" }), Ue = () => /* @__PURE__ */ e(Y, { icon: ve, size: "md", color: "current" }), sr = (t) => {
|
|
1696
1700
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1697
1701
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1698
1702
|
};
|
|
@@ -1711,7 +1715,7 @@ const Kt = ({
|
|
|
1711
1715
|
/* @__PURE__ */ e("span", { className: "text-text", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1712
1716
|
(s) => t.options?.find((a) => a.value === s)?.label
|
|
1713
1717
|
).join(", ") : t.options?.find((s) => s.value === t.value)?.label }),
|
|
1714
|
-
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(
|
|
1718
|
+
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(Ue, {}) })
|
|
1715
1719
|
] }),
|
|
1716
1720
|
/* @__PURE__ */ c("div", { className: "absolute z-10 left-0 mt-1 bg-surface border border-border rounded-lg shadow-overlay p-2 w-48", children: [
|
|
1717
1721
|
t.options?.map((s) => /* @__PURE__ */ e(
|
|
@@ -1757,17 +1761,17 @@ const Kt = ({
|
|
|
1757
1761
|
getRowKey: C = (I, q) => q,
|
|
1758
1762
|
emptyContent: g,
|
|
1759
1763
|
hoverable: x = !0,
|
|
1760
|
-
bordered:
|
|
1764
|
+
bordered: D = !1,
|
|
1761
1765
|
striped: E = !1,
|
|
1762
1766
|
padding: W = "md",
|
|
1763
|
-
className:
|
|
1767
|
+
className: T,
|
|
1764
1768
|
rowClassName: X,
|
|
1765
1769
|
headerBackground: U = !0
|
|
1766
1770
|
}) => {
|
|
1767
1771
|
const [I, q] = R(""), [K, re] = R({
|
|
1768
1772
|
column: null,
|
|
1769
1773
|
direction: null
|
|
1770
|
-
}), [
|
|
1774
|
+
}), [P, ce] = R({
|
|
1771
1775
|
page: 0,
|
|
1772
1776
|
pageSize: u
|
|
1773
1777
|
}), k = se(null), i = he(() => {
|
|
@@ -1776,8 +1780,8 @@ const Kt = ({
|
|
|
1776
1780
|
const V = r.filter(
|
|
1777
1781
|
(J) => J.searchable !== !1
|
|
1778
1782
|
), Z = I.toLowerCase();
|
|
1779
|
-
v = v.filter((J) => V.some((
|
|
1780
|
-
const ie = typeof
|
|
1783
|
+
v = v.filter((J) => V.some((F) => {
|
|
1784
|
+
const ie = typeof F.accessor == "function" ? F.accessor(J) : J[F.accessor];
|
|
1781
1785
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1782
1786
|
}));
|
|
1783
1787
|
}
|
|
@@ -1785,23 +1789,23 @@ const Kt = ({
|
|
|
1785
1789
|
V.value && V.value !== "all" && (v = v.filter((Z) => {
|
|
1786
1790
|
const J = r.find((ie) => ie.id === V.id);
|
|
1787
1791
|
if (!J) return !0;
|
|
1788
|
-
const
|
|
1789
|
-
return String(
|
|
1792
|
+
const F = typeof J.accessor == "function" ? J.accessor(Z) : Z[J.accessor];
|
|
1793
|
+
return String(F || "") === V.value;
|
|
1790
1794
|
}));
|
|
1791
1795
|
}), v;
|
|
1792
1796
|
}, [t, I, r, s, l]), S = he(() => {
|
|
1793
1797
|
if (!K.column || !K.direction) return i;
|
|
1794
1798
|
const v = r.find((V) => V.id === K.column);
|
|
1795
1799
|
return v ? [...i].sort((V, Z) => {
|
|
1796
|
-
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor],
|
|
1800
|
+
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor], F = typeof v.accessor == "function" ? v.accessor(Z) : Z[v.accessor];
|
|
1797
1801
|
let ie = 0;
|
|
1798
|
-
return J <
|
|
1802
|
+
return J < F ? ie = -1 : J > F && (ie = 1), K.direction === "desc" ? -ie : ie;
|
|
1799
1803
|
}) : i;
|
|
1800
1804
|
}, [i, K, r]), y = he(() => {
|
|
1801
1805
|
if (!o) return S;
|
|
1802
|
-
const v =
|
|
1806
|
+
const v = P.page * P.pageSize, V = v + P.pageSize;
|
|
1803
1807
|
return S.slice(v, V);
|
|
1804
|
-
}, [S,
|
|
1808
|
+
}, [S, P, o]), A = ue(
|
|
1805
1809
|
(v) => {
|
|
1806
1810
|
r.find((Z) => Z.id === v)?.sortable && re((Z) => Z.column !== v ? { column: v, direction: "asc" } : Z.direction === "asc" ? { column: v, direction: "desc" } : { column: null, direction: null });
|
|
1807
1811
|
},
|
|
@@ -1814,8 +1818,8 @@ const Kt = ({
|
|
|
1814
1818
|
(v, V) => {
|
|
1815
1819
|
if (!p) return;
|
|
1816
1820
|
const Z = C(v, 0);
|
|
1817
|
-
b.map((J,
|
|
1818
|
-
(J,
|
|
1821
|
+
b.map((J, F) => C(J, F)), p(V ? [...b, v] : b.filter(
|
|
1822
|
+
(J, F) => C(b[F], F) !== Z
|
|
1819
1823
|
));
|
|
1820
1824
|
},
|
|
1821
1825
|
[b, p, C]
|
|
@@ -1830,20 +1834,20 @@ const Kt = ({
|
|
|
1830
1834
|
}, [I, K]), Q(() => {
|
|
1831
1835
|
ce((v) => ({ ...v, page: 0 }));
|
|
1832
1836
|
}, [l.map((v) => v.value).join(",")]);
|
|
1833
|
-
const G = S.length,
|
|
1837
|
+
const G = S.length, j = Math.ceil(G / P.pageSize), M = P.page * P.pageSize + 1, _ = Math.min(M + P.pageSize - 1, G), z = y.length > 0 && y.every((v) => {
|
|
1834
1838
|
const V = C(v, 0);
|
|
1835
1839
|
return b.some(
|
|
1836
1840
|
(Z, J) => C(Z, J) === V
|
|
1837
1841
|
);
|
|
1838
|
-
}),
|
|
1842
|
+
}), H = y.some((v) => {
|
|
1839
1843
|
const V = C(v, 0);
|
|
1840
1844
|
return b.some(
|
|
1841
1845
|
(Z, J) => C(Z, J) === V
|
|
1842
1846
|
);
|
|
1843
|
-
}),
|
|
1847
|
+
}), B = d(
|
|
1844
1848
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1845
|
-
|
|
1846
|
-
),
|
|
1849
|
+
T
|
|
1850
|
+
), O = U ? "bg-surface-sunk border-border border-t" : "bg-surface", $ = d(O, "h-control-lg"), L = d(
|
|
1847
1851
|
"text-text border-b border-border p-2"
|
|
1848
1852
|
), te = d("h-row-lg", {
|
|
1849
1853
|
"hover:bg-surface-sunk": x,
|
|
@@ -1851,28 +1855,28 @@ const Kt = ({
|
|
|
1851
1855
|
});
|
|
1852
1856
|
return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
1853
1857
|
(s || l.length > 0) && /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
1854
|
-
l.map((v) => /* @__PURE__ */ e(
|
|
1858
|
+
l.map((v) => /* @__PURE__ */ e(sr, { ...v }, v.id)),
|
|
1855
1859
|
/* @__PURE__ */ e("div", { className: "w-full sm:w-auto sm:ml-auto min-w-menu", children: /* @__PURE__ */ e(
|
|
1856
1860
|
be,
|
|
1857
1861
|
{
|
|
1858
1862
|
placeholder: a,
|
|
1859
1863
|
value: I,
|
|
1860
1864
|
onChange: (v) => q(v.target.value),
|
|
1861
|
-
startIcon: /* @__PURE__ */ e(
|
|
1865
|
+
startIcon: /* @__PURE__ */ e(Xt, {}),
|
|
1862
1866
|
className: "max-w-sm"
|
|
1863
1867
|
}
|
|
1864
1868
|
) })
|
|
1865
1869
|
] }) }),
|
|
1866
1870
|
/* @__PURE__ */ c("div", { className: "relative w-full overflow-x-auto min-h-100", children: [
|
|
1867
1871
|
n && /* @__PURE__ */ e("div", { className: "flex items-center justify-center z-10", children: /* @__PURE__ */ e(
|
|
1868
|
-
|
|
1872
|
+
Jt,
|
|
1869
1873
|
{
|
|
1870
1874
|
showTableSkeleton: !0,
|
|
1871
1875
|
tableRows: 10,
|
|
1872
1876
|
tableColumns: r.length
|
|
1873
1877
|
}
|
|
1874
1878
|
) }),
|
|
1875
|
-
/* @__PURE__ */ c("table", { ref: k, className: d(
|
|
1879
|
+
/* @__PURE__ */ c("table", { ref: k, className: d(B, "min-w-full"), children: [
|
|
1876
1880
|
/* @__PURE__ */ e("thead", { className: $, children: /* @__PURE__ */ c("tr", { children: [
|
|
1877
1881
|
f && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1878
1882
|
"input",
|
|
@@ -1880,7 +1884,7 @@ const Kt = ({
|
|
|
1880
1884
|
type: "checkbox",
|
|
1881
1885
|
checked: z,
|
|
1882
1886
|
ref: (v) => {
|
|
1883
|
-
v && (v.indeterminate =
|
|
1887
|
+
v && (v.indeterminate = H && !z);
|
|
1884
1888
|
},
|
|
1885
1889
|
onChange: (v) => le(v.target.checked),
|
|
1886
1890
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
@@ -1898,11 +1902,11 @@ const Kt = ({
|
|
|
1898
1902
|
"text-center": v.align === "center",
|
|
1899
1903
|
"text-right": v.align === "right",
|
|
1900
1904
|
"cursor-pointer select-none": v.sortable,
|
|
1901
|
-
[`sticky left-0 ${
|
|
1902
|
-
[`sticky right-0 ${
|
|
1905
|
+
[`sticky left-0 ${O}`]: v.sticky === "left",
|
|
1906
|
+
[`sticky right-0 ${O}`]: v.sticky === "right"
|
|
1903
1907
|
},
|
|
1904
|
-
V === 0 &&
|
|
1905
|
-
V === r.length - 1 &&
|
|
1908
|
+
V === 0 && Ie[W],
|
|
1909
|
+
V === r.length - 1 && je[W]
|
|
1906
1910
|
),
|
|
1907
1911
|
style: { width: v.width },
|
|
1908
1912
|
onClick: () => v.sortable && A(v.id),
|
|
@@ -1917,13 +1921,13 @@ const Kt = ({
|
|
|
1917
1921
|
),
|
|
1918
1922
|
children: [
|
|
1919
1923
|
/* @__PURE__ */ e(
|
|
1920
|
-
|
|
1924
|
+
Zt,
|
|
1921
1925
|
{
|
|
1922
1926
|
active: K.column === v.id && K.direction === "asc"
|
|
1923
1927
|
}
|
|
1924
1928
|
),
|
|
1925
1929
|
/* @__PURE__ */ e(
|
|
1926
|
-
|
|
1930
|
+
Qt,
|
|
1927
1931
|
{
|
|
1928
1932
|
active: K.column === v.id && K.direction === "desc"
|
|
1929
1933
|
}
|
|
@@ -1949,7 +1953,7 @@ const Kt = ({
|
|
|
1949
1953
|
}
|
|
1950
1954
|
) }) : y.map((v, V) => {
|
|
1951
1955
|
const Z = C(v, V), J = b.some(
|
|
1952
|
-
(
|
|
1956
|
+
(F, ie) => C(F, ie) === Z
|
|
1953
1957
|
);
|
|
1954
1958
|
return /* @__PURE__ */ c(
|
|
1955
1959
|
"tr",
|
|
@@ -1959,8 +1963,8 @@ const Kt = ({
|
|
|
1959
1963
|
{ "bg-accent-soft": J },
|
|
1960
1964
|
X?.(v, V)
|
|
1961
1965
|
),
|
|
1962
|
-
onClick: (
|
|
1963
|
-
|
|
1966
|
+
onClick: (F) => {
|
|
1967
|
+
F.stopPropagation(), m?.(v, V);
|
|
1964
1968
|
},
|
|
1965
1969
|
children: [
|
|
1966
1970
|
f && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
@@ -1968,50 +1972,50 @@ const Kt = ({
|
|
|
1968
1972
|
{
|
|
1969
1973
|
type: "checkbox",
|
|
1970
1974
|
checked: J,
|
|
1971
|
-
onChange: (
|
|
1972
|
-
|
|
1975
|
+
onChange: (F) => {
|
|
1976
|
+
F.stopPropagation(), ae(v, F.target.checked);
|
|
1973
1977
|
},
|
|
1974
1978
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1975
1979
|
}
|
|
1976
1980
|
) }),
|
|
1977
|
-
r.map((
|
|
1978
|
-
const
|
|
1981
|
+
r.map((F, ie) => {
|
|
1982
|
+
const ye = typeof F.accessor == "function" ? F.accessor(v) : v[F.accessor];
|
|
1979
1983
|
return /* @__PURE__ */ e(
|
|
1980
1984
|
"td",
|
|
1981
1985
|
{
|
|
1982
1986
|
className: d(
|
|
1983
1987
|
L,
|
|
1984
1988
|
{
|
|
1985
|
-
"text-left":
|
|
1986
|
-
"text-center":
|
|
1987
|
-
"text-right":
|
|
1988
|
-
"sticky left-0 bg-surface":
|
|
1989
|
-
"sticky right-0 bg-surface":
|
|
1989
|
+
"text-left": F.align === "left" || !F.align,
|
|
1990
|
+
"text-center": F.align === "center",
|
|
1991
|
+
"text-right": F.align === "right",
|
|
1992
|
+
"sticky left-0 bg-surface": F.sticky === "left",
|
|
1993
|
+
"sticky right-0 bg-surface": F.sticky === "right"
|
|
1990
1994
|
},
|
|
1991
|
-
ie === 0 &&
|
|
1992
|
-
ie === r.length - 1 &&
|
|
1995
|
+
ie === 0 && Ie[W],
|
|
1996
|
+
ie === r.length - 1 && je[W]
|
|
1993
1997
|
),
|
|
1994
|
-
children:
|
|
1998
|
+
children: F.cell ? F.cell(ye, v, ie) : String(ye || "")
|
|
1995
1999
|
},
|
|
1996
|
-
|
|
2000
|
+
F.id
|
|
1997
2001
|
);
|
|
1998
2002
|
}),
|
|
1999
2003
|
N.length > 0 && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
2000
|
-
|
|
2004
|
+
Yt,
|
|
2001
2005
|
{
|
|
2002
2006
|
trigger: /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
|
|
2003
2007
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
2004
|
-
/* @__PURE__ */ e(
|
|
2008
|
+
/* @__PURE__ */ e(Ue, {})
|
|
2005
2009
|
] }),
|
|
2006
|
-
options: N.map((
|
|
2007
|
-
value:
|
|
2008
|
-
label:
|
|
2009
|
-
icon:
|
|
2010
|
-
disabled:
|
|
2010
|
+
options: N.map((F) => ({
|
|
2011
|
+
value: F.id,
|
|
2012
|
+
label: F.label,
|
|
2013
|
+
icon: F.icon,
|
|
2014
|
+
disabled: F.disabled?.(v)
|
|
2011
2015
|
})),
|
|
2012
|
-
onSelect: (
|
|
2016
|
+
onSelect: (F) => {
|
|
2013
2017
|
const ie = N.find(
|
|
2014
|
-
(
|
|
2018
|
+
(ye) => ye.id === F
|
|
2015
2019
|
);
|
|
2016
2020
|
ie && ie.onClick(v, V);
|
|
2017
2021
|
},
|
|
@@ -2031,7 +2035,7 @@ const Kt = ({
|
|
|
2031
2035
|
"Showing ",
|
|
2032
2036
|
M,
|
|
2033
2037
|
" to ",
|
|
2034
|
-
|
|
2038
|
+
_,
|
|
2035
2039
|
" of ",
|
|
2036
2040
|
G,
|
|
2037
2041
|
" results"
|
|
@@ -2041,7 +2045,7 @@ const Kt = ({
|
|
|
2041
2045
|
/* @__PURE__ */ e(
|
|
2042
2046
|
"select",
|
|
2043
2047
|
{
|
|
2044
|
-
value:
|
|
2048
|
+
value: P.pageSize,
|
|
2045
2049
|
onChange: (v) => ee(Number(v.target.value)),
|
|
2046
2050
|
className: "h-control-sm w-16 rounded-md border border-border bg-surface-input px-2 text-sm text-text",
|
|
2047
2051
|
children: h.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
|
|
@@ -2056,9 +2060,9 @@ const Kt = ({
|
|
|
2056
2060
|
size: "sm",
|
|
2057
2061
|
variant: "ghost",
|
|
2058
2062
|
onClick: () => w(0),
|
|
2059
|
-
disabled:
|
|
2063
|
+
disabled: P.page === 0,
|
|
2060
2064
|
iconOnly: !0,
|
|
2061
|
-
children: /* @__PURE__ */ e(
|
|
2065
|
+
children: /* @__PURE__ */ e(rr, {})
|
|
2062
2066
|
}
|
|
2063
2067
|
),
|
|
2064
2068
|
/* @__PURE__ */ e(
|
|
@@ -2066,27 +2070,27 @@ const Kt = ({
|
|
|
2066
2070
|
{
|
|
2067
2071
|
size: "sm",
|
|
2068
2072
|
variant: "ghost",
|
|
2069
|
-
onClick: () => w(
|
|
2070
|
-
disabled:
|
|
2073
|
+
onClick: () => w(P.page - 1),
|
|
2074
|
+
disabled: P.page === 0,
|
|
2071
2075
|
iconOnly: !0,
|
|
2072
|
-
children: /* @__PURE__ */ e(
|
|
2076
|
+
children: /* @__PURE__ */ e(er, {})
|
|
2073
2077
|
}
|
|
2074
2078
|
),
|
|
2075
2079
|
/* @__PURE__ */ c("span", { className: "px-3 py-1 text-sm text-text-muted", children: [
|
|
2076
2080
|
"Page ",
|
|
2077
|
-
|
|
2081
|
+
P.page + 1,
|
|
2078
2082
|
" of ",
|
|
2079
|
-
|
|
2083
|
+
j
|
|
2080
2084
|
] }),
|
|
2081
2085
|
/* @__PURE__ */ e(
|
|
2082
2086
|
ne,
|
|
2083
2087
|
{
|
|
2084
2088
|
size: "sm",
|
|
2085
2089
|
variant: "ghost",
|
|
2086
|
-
onClick: () => w(
|
|
2087
|
-
disabled:
|
|
2090
|
+
onClick: () => w(P.page + 1),
|
|
2091
|
+
disabled: P.page >= j - 1,
|
|
2088
2092
|
iconOnly: !0,
|
|
2089
|
-
children: /* @__PURE__ */ e(
|
|
2093
|
+
children: /* @__PURE__ */ e(tr, {})
|
|
2090
2094
|
}
|
|
2091
2095
|
),
|
|
2092
2096
|
/* @__PURE__ */ e(
|
|
@@ -2094,16 +2098,16 @@ const Kt = ({
|
|
|
2094
2098
|
{
|
|
2095
2099
|
size: "sm",
|
|
2096
2100
|
variant: "ghost",
|
|
2097
|
-
onClick: () => w(
|
|
2098
|
-
disabled:
|
|
2101
|
+
onClick: () => w(j - 1),
|
|
2102
|
+
disabled: P.page >= j - 1,
|
|
2099
2103
|
iconOnly: !0,
|
|
2100
|
-
children: /* @__PURE__ */ e(
|
|
2104
|
+
children: /* @__PURE__ */ e(nr, {})
|
|
2101
2105
|
}
|
|
2102
2106
|
)
|
|
2103
2107
|
] })
|
|
2104
2108
|
] })
|
|
2105
2109
|
] });
|
|
2106
|
-
},
|
|
2110
|
+
}, ar = pt(null), pn = ({
|
|
2107
2111
|
items: t,
|
|
2108
2112
|
activeTab: r,
|
|
2109
2113
|
onTabChange: n,
|
|
@@ -2135,7 +2139,7 @@ const Kt = ({
|
|
|
2135
2139
|
},
|
|
2136
2140
|
u.id
|
|
2137
2141
|
)) }) });
|
|
2138
|
-
},
|
|
2142
|
+
}, lr = ({
|
|
2139
2143
|
items: t,
|
|
2140
2144
|
defaultTab: r,
|
|
2141
2145
|
activeTab: n,
|
|
@@ -2161,7 +2165,7 @@ const Kt = ({
|
|
|
2161
2165
|
},
|
|
2162
2166
|
o
|
|
2163
2167
|
), C = (g, x) => {
|
|
2164
|
-
const
|
|
2168
|
+
const D = "transition-colors duration-fast font-medium", E = {
|
|
2165
2169
|
"text-xs px-2 py-1": l === "sm",
|
|
2166
2170
|
"text-sm px-3 py-2": l === "md",
|
|
2167
2171
|
"text-base px-4 py-3": l === "lg"
|
|
@@ -2172,7 +2176,7 @@ const Kt = ({
|
|
|
2172
2176
|
"rounded-md": a === "pills",
|
|
2173
2177
|
// Underline variant
|
|
2174
2178
|
"border-b-2 pb-2": a === "underline"
|
|
2175
|
-
},
|
|
2179
|
+
}, T = {
|
|
2176
2180
|
"opacity-50 cursor-not-allowed": g.disabled,
|
|
2177
2181
|
"cursor-pointer": !g.disabled
|
|
2178
2182
|
}, X = x ? {
|
|
@@ -2183,9 +2187,9 @@ const Kt = ({
|
|
|
2183
2187
|
"text-text-muted hover:text-text": a === "pills",
|
|
2184
2188
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2185
2189
|
} : {};
|
|
2186
|
-
return d(
|
|
2190
|
+
return d(D, E, W, T, X, U);
|
|
2187
2191
|
};
|
|
2188
|
-
return /* @__PURE__ */ e(
|
|
2192
|
+
return /* @__PURE__ */ e(ar.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
2189
2193
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2190
2194
|
"button",
|
|
2191
2195
|
{
|
|
@@ -2214,14 +2218,14 @@ const Kt = ({
|
|
|
2214
2218
|
}
|
|
2215
2219
|
)
|
|
2216
2220
|
] }) });
|
|
2217
|
-
},
|
|
2221
|
+
}, or = {
|
|
2218
2222
|
sm: "max-w-md",
|
|
2219
2223
|
md: "max-w-lg",
|
|
2220
2224
|
lg: "max-w-2xl",
|
|
2221
2225
|
xl: "max-w-4xl",
|
|
2222
2226
|
full: "max-w-full mx-4"
|
|
2223
2227
|
};
|
|
2224
|
-
function
|
|
2228
|
+
function We({
|
|
2225
2229
|
open: t,
|
|
2226
2230
|
onClose: r,
|
|
2227
2231
|
title: n,
|
|
@@ -2265,7 +2269,7 @@ function Ve({
|
|
|
2265
2269
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2266
2270
|
// 'animate-scale-in',
|
|
2267
2271
|
"focus:outline-none",
|
|
2268
|
-
|
|
2272
|
+
or[s],
|
|
2269
2273
|
o
|
|
2270
2274
|
),
|
|
2271
2275
|
role: "dialog",
|
|
@@ -2288,7 +2292,7 @@ function Ve({
|
|
|
2288
2292
|
onClick: r,
|
|
2289
2293
|
className: "p-1 text-text-muted hover:text-text transition-colors",
|
|
2290
2294
|
"aria-label": "Close modal",
|
|
2291
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
2295
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "lg", color: "current" })
|
|
2292
2296
|
}
|
|
2293
2297
|
)
|
|
2294
2298
|
] }),
|
|
@@ -2300,19 +2304,19 @@ function Ve({
|
|
|
2300
2304
|
}
|
|
2301
2305
|
) : null;
|
|
2302
2306
|
}
|
|
2303
|
-
const
|
|
2307
|
+
const cr = {
|
|
2304
2308
|
xs: "text-xs",
|
|
2305
2309
|
sm: "text-sm",
|
|
2306
2310
|
md: "text-base",
|
|
2307
2311
|
lg: "text-md",
|
|
2308
2312
|
xl: "text-lg"
|
|
2309
|
-
},
|
|
2313
|
+
}, ir = {
|
|
2310
2314
|
light: "font-normal",
|
|
2311
2315
|
normal: "font-normal",
|
|
2312
2316
|
medium: "font-medium",
|
|
2313
2317
|
semibold: "font-semibold",
|
|
2314
2318
|
bold: "font-bold"
|
|
2315
|
-
},
|
|
2319
|
+
}, dr = {
|
|
2316
2320
|
primary: "text-text",
|
|
2317
2321
|
secondary: "text-text-muted",
|
|
2318
2322
|
accent: "text-accent",
|
|
@@ -2323,12 +2327,12 @@ const ar = {
|
|
|
2323
2327
|
neutral: "text-text",
|
|
2324
2328
|
current: "text-current",
|
|
2325
2329
|
muted: "text-text-subtle"
|
|
2326
|
-
},
|
|
2330
|
+
}, ur = {
|
|
2327
2331
|
left: "text-left",
|
|
2328
2332
|
center: "text-center",
|
|
2329
2333
|
right: "text-right",
|
|
2330
2334
|
justify: "text-justify"
|
|
2331
|
-
},
|
|
2335
|
+
}, mr = {
|
|
2332
2336
|
tight: "leading-tight",
|
|
2333
2337
|
normal: "leading-normal",
|
|
2334
2338
|
relaxed: "leading-relaxed"
|
|
@@ -2347,28 +2351,28 @@ const ar = {
|
|
|
2347
2351
|
children: f,
|
|
2348
2352
|
...b
|
|
2349
2353
|
}) => {
|
|
2350
|
-
const p = N ||
|
|
2354
|
+
const p = N || fr(t), C = t === "caption", g = t === "label", x = t === "code", D = d(
|
|
2351
2355
|
"font-sans",
|
|
2352
2356
|
// Variant — caption and label pin their own size/weight
|
|
2353
2357
|
C && "text-xs text-text-subtle",
|
|
2354
2358
|
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2355
2359
|
x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2356
2360
|
// Size — only where the variant does not pin it
|
|
2357
|
-
!C && !g && !x &&
|
|
2361
|
+
!C && !g && !x && cr[r],
|
|
2358
2362
|
// Weight — label owns its weight
|
|
2359
|
-
!g &&
|
|
2360
|
-
|
|
2361
|
-
|
|
2363
|
+
!g && ir[n],
|
|
2364
|
+
dr[s],
|
|
2365
|
+
ur[a],
|
|
2362
2366
|
// Line height only overrides the body variant
|
|
2363
|
-
t === "body" &&
|
|
2367
|
+
t === "body" && mr[u],
|
|
2364
2368
|
o && "italic",
|
|
2365
2369
|
h && "underline",
|
|
2366
2370
|
l && "truncate",
|
|
2367
2371
|
m
|
|
2368
2372
|
);
|
|
2369
|
-
return /* @__PURE__ */ e(p, { className:
|
|
2373
|
+
return /* @__PURE__ */ e(p, { className: D, ...b, children: f });
|
|
2370
2374
|
};
|
|
2371
|
-
function
|
|
2375
|
+
function fr(t) {
|
|
2372
2376
|
return {
|
|
2373
2377
|
body: "p",
|
|
2374
2378
|
caption: "span",
|
|
@@ -2376,7 +2380,7 @@ function dr(t) {
|
|
|
2376
2380
|
code: "code"
|
|
2377
2381
|
}[t] || "p";
|
|
2378
2382
|
}
|
|
2379
|
-
const
|
|
2383
|
+
const hr = ({
|
|
2380
2384
|
value: t,
|
|
2381
2385
|
onChange: r,
|
|
2382
2386
|
label: n,
|
|
@@ -2390,7 +2394,7 @@ const ur = ({
|
|
|
2390
2394
|
onDownloadFile: m,
|
|
2391
2395
|
onRegisterFile: f
|
|
2392
2396
|
}) => {
|
|
2393
|
-
const [b, p] = R(!1), [C, g] = R([]), [x,
|
|
2397
|
+
const [b, p] = R(!1), [C, g] = R([]), [x, D] = R(null), [E, W] = R("/"), [T, X] = R([]), [U, I] = R(!1), [q, K] = R(""), [re, P] = R(
|
|
2394
2398
|
typeof t == "object" ? t : null
|
|
2395
2399
|
), [ce, k] = R(!1), [i, S] = R(""), y = se(null);
|
|
2396
2400
|
Q(() => {
|
|
@@ -2436,7 +2440,7 @@ const ur = ({
|
|
|
2436
2440
|
providerKey: L.name,
|
|
2437
2441
|
ownerId: "me"
|
|
2438
2442
|
};
|
|
2439
|
-
|
|
2443
|
+
P(V), r(V, v), p(!1);
|
|
2440
2444
|
} catch (te) {
|
|
2441
2445
|
console.error("Local file selection failed", te);
|
|
2442
2446
|
} finally {
|
|
@@ -2457,7 +2461,7 @@ const ur = ({
|
|
|
2457
2461
|
});
|
|
2458
2462
|
if (v?.data) {
|
|
2459
2463
|
const V = v.data;
|
|
2460
|
-
|
|
2464
|
+
P(V), r(V, new Uint8Array(te)), p(!1);
|
|
2461
2465
|
}
|
|
2462
2466
|
} catch (te) {
|
|
2463
2467
|
console.error("Upload failed", te);
|
|
@@ -2490,17 +2494,17 @@ const ur = ({
|
|
|
2490
2494
|
I(!0);
|
|
2491
2495
|
try {
|
|
2492
2496
|
const L = await m?.($.id);
|
|
2493
|
-
|
|
2497
|
+
P($), r($, L), p(!1);
|
|
2494
2498
|
} catch (L) {
|
|
2495
2499
|
console.error("Failed to download file", L);
|
|
2496
2500
|
} finally {
|
|
2497
2501
|
I(!1);
|
|
2498
2502
|
}
|
|
2499
|
-
},
|
|
2500
|
-
$.stopPropagation(),
|
|
2503
|
+
}, j = ($) => {
|
|
2504
|
+
$.stopPropagation(), P(null), r(null);
|
|
2501
2505
|
}, M = he(() => {
|
|
2502
2506
|
const $ = /* @__PURE__ */ new Set(), L = [];
|
|
2503
|
-
return
|
|
2507
|
+
return T.forEach((te) => {
|
|
2504
2508
|
if (te.type === "folder") {
|
|
2505
2509
|
te.path === E && $.add(te.name);
|
|
2506
2510
|
return;
|
|
@@ -2511,12 +2515,12 @@ const ur = ({
|
|
|
2511
2515
|
folders: Array.from($).sort(),
|
|
2512
2516
|
files: L.sort((te, v) => te.name.localeCompare(v.name))
|
|
2513
2517
|
};
|
|
2514
|
-
}, [
|
|
2518
|
+
}, [T, E]), _ = ($) => {
|
|
2515
2519
|
W((L) => `${L}${$}/`);
|
|
2516
2520
|
}, z = () => {
|
|
2517
2521
|
const $ = E.split("/").filter((L) => L !== "");
|
|
2518
2522
|
$.pop(), $.length === 0 ? W("/") : W(`${$.join("/")}/`);
|
|
2519
|
-
},
|
|
2523
|
+
}, H = he(() => {
|
|
2520
2524
|
const $ = M.folders.map((L) => ({
|
|
2521
2525
|
id: `folder-${L}`,
|
|
2522
2526
|
name: L,
|
|
@@ -2528,7 +2532,7 @@ const ur = ({
|
|
|
2528
2532
|
type: "file"
|
|
2529
2533
|
});
|
|
2530
2534
|
}), $;
|
|
2531
|
-
}, [M]),
|
|
2535
|
+
}, [M]), B = [
|
|
2532
2536
|
{
|
|
2533
2537
|
id: "name",
|
|
2534
2538
|
header: "Name",
|
|
@@ -2566,14 +2570,14 @@ const ur = ({
|
|
|
2566
2570
|
size: "sm",
|
|
2567
2571
|
variant: "outline",
|
|
2568
2572
|
onClick: (te) => {
|
|
2569
|
-
te.stopPropagation(), L.type === "folder" ?
|
|
2573
|
+
te.stopPropagation(), L.type === "folder" ? _(L.name) : G(L);
|
|
2570
2574
|
},
|
|
2571
2575
|
loading: U && L.type === "file" && re?.id === L.id,
|
|
2572
2576
|
children: L.type === "folder" ? "Open" : "Select"
|
|
2573
2577
|
}
|
|
2574
2578
|
)
|
|
2575
2579
|
}
|
|
2576
|
-
],
|
|
2580
|
+
], O = [
|
|
2577
2581
|
{
|
|
2578
2582
|
id: "name",
|
|
2579
2583
|
header: "Mount Name",
|
|
@@ -2588,7 +2592,7 @@ const ur = ({
|
|
|
2588
2592
|
header: "",
|
|
2589
2593
|
accessor: "id",
|
|
2590
2594
|
align: "right",
|
|
2591
|
-
cell: ($, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () =>
|
|
2595
|
+
cell: ($, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () => D(L), children: "Open" })
|
|
2592
2596
|
}
|
|
2593
2597
|
];
|
|
2594
2598
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2609,9 +2613,9 @@ const ur = ({
|
|
|
2609
2613
|
re && !l && /* @__PURE__ */ e(
|
|
2610
2614
|
"button",
|
|
2611
2615
|
{
|
|
2612
|
-
onClick:
|
|
2616
|
+
onClick: j,
|
|
2613
2617
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2614
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
2618
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "xs" })
|
|
2615
2619
|
}
|
|
2616
2620
|
)
|
|
2617
2621
|
]
|
|
@@ -2619,16 +2623,16 @@ const ur = ({
|
|
|
2619
2623
|
),
|
|
2620
2624
|
a && /* @__PURE__ */ e(de, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2621
2625
|
/* @__PURE__ */ e(
|
|
2622
|
-
|
|
2626
|
+
We,
|
|
2623
2627
|
{
|
|
2624
2628
|
open: b,
|
|
2625
2629
|
onClose: () => {
|
|
2626
|
-
p(!1),
|
|
2630
|
+
p(!1), D(null), W("/"), k(!1);
|
|
2627
2631
|
},
|
|
2628
2632
|
title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
|
|
2629
2633
|
size: "lg",
|
|
2630
2634
|
children: /* @__PURE__ */ e(
|
|
2631
|
-
|
|
2635
|
+
lr,
|
|
2632
2636
|
{
|
|
2633
2637
|
variant: "pills",
|
|
2634
2638
|
items: [
|
|
@@ -2643,9 +2647,9 @@ const ur = ({
|
|
|
2643
2647
|
variant: "ghost",
|
|
2644
2648
|
size: "sm",
|
|
2645
2649
|
onClick: () => {
|
|
2646
|
-
E && E !== "/" ? z() :
|
|
2650
|
+
E && E !== "/" ? z() : D(null);
|
|
2647
2651
|
},
|
|
2648
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2652
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: ot, size: "xs" }),
|
|
2649
2653
|
children: E ? "Back" : "Back to Mounts"
|
|
2650
2654
|
}
|
|
2651
2655
|
),
|
|
@@ -2668,7 +2672,7 @@ const ur = ({
|
|
|
2668
2672
|
variant: "outline",
|
|
2669
2673
|
size: "sm",
|
|
2670
2674
|
onClick: () => k(!0),
|
|
2671
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2675
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: ct, size: "xs" }),
|
|
2672
2676
|
children: "New Folder"
|
|
2673
2677
|
}
|
|
2674
2678
|
),
|
|
@@ -2678,7 +2682,7 @@ const ur = ({
|
|
|
2678
2682
|
variant: "primary",
|
|
2679
2683
|
size: "sm",
|
|
2680
2684
|
onClick: () => y.current?.click(),
|
|
2681
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2685
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: it, size: "xs" }),
|
|
2682
2686
|
loading: U,
|
|
2683
2687
|
children: "Upload"
|
|
2684
2688
|
}
|
|
@@ -2713,21 +2717,21 @@ const ur = ({
|
|
|
2713
2717
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2714
2718
|
Pe,
|
|
2715
2719
|
{
|
|
2716
|
-
data:
|
|
2717
|
-
columns:
|
|
2720
|
+
data: H,
|
|
2721
|
+
columns: B,
|
|
2718
2722
|
loading: U,
|
|
2719
2723
|
emptyContent: "This folder is empty",
|
|
2720
|
-
onRowClick: ($) => $.type === "folder" ?
|
|
2724
|
+
onRowClick: ($) => $.type === "folder" ? _($.name) : G($)
|
|
2721
2725
|
}
|
|
2722
2726
|
) })
|
|
2723
2727
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2724
2728
|
Pe,
|
|
2725
2729
|
{
|
|
2726
2730
|
data: C,
|
|
2727
|
-
columns:
|
|
2731
|
+
columns: O,
|
|
2728
2732
|
loading: U,
|
|
2729
2733
|
emptyContent: "No storage mounts configured",
|
|
2730
|
-
onRowClick: ($) =>
|
|
2734
|
+
onRowClick: ($) => D($)
|
|
2731
2735
|
}
|
|
2732
2736
|
) }) })
|
|
2733
2737
|
},
|
|
@@ -2763,7 +2767,7 @@ const ur = ({
|
|
|
2763
2767
|
}
|
|
2764
2768
|
)
|
|
2765
2769
|
] });
|
|
2766
|
-
},
|
|
2770
|
+
}, xr = {
|
|
2767
2771
|
sm: "px-3 py-1.5 text-sm",
|
|
2768
2772
|
md: "px-3 py-2 text-base",
|
|
2769
2773
|
lg: "px-3 py-2 text-md",
|
|
@@ -2790,8 +2794,8 @@ const ur = ({
|
|
|
2790
2794
|
{
|
|
2791
2795
|
htmlFor: C,
|
|
2792
2796
|
className: d(
|
|
2793
|
-
|
|
2794
|
-
g ? "text-danger-fg" : "text-text-
|
|
2797
|
+
He,
|
|
2798
|
+
g ? "text-danger-fg" : "text-text-muted",
|
|
2795
2799
|
h
|
|
2796
2800
|
),
|
|
2797
2801
|
children: t
|
|
@@ -2807,13 +2811,10 @@ const ur = ({
|
|
|
2807
2811
|
"aria-invalid": g || void 0,
|
|
2808
2812
|
"aria-describedby": x,
|
|
2809
2813
|
className: d(
|
|
2810
|
-
|
|
2811
|
-
"
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
2815
|
-
mr[s],
|
|
2816
|
-
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2814
|
+
Ve,
|
|
2815
|
+
"resize-y leading-relaxed",
|
|
2816
|
+
xr[s],
|
|
2817
|
+
qe(g),
|
|
2817
2818
|
u
|
|
2818
2819
|
),
|
|
2819
2820
|
...f
|
|
@@ -2839,13 +2840,13 @@ const ur = ({
|
|
|
2839
2840
|
}
|
|
2840
2841
|
);
|
|
2841
2842
|
De.displayName = "TextArea";
|
|
2842
|
-
function
|
|
2843
|
+
function Oe(t, r) {
|
|
2843
2844
|
return r.split(".").reduce(
|
|
2844
2845
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2845
2846
|
t
|
|
2846
2847
|
);
|
|
2847
2848
|
}
|
|
2848
|
-
function
|
|
2849
|
+
function br(t, r, n) {
|
|
2849
2850
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2850
2851
|
let l = a;
|
|
2851
2852
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -2854,7 +2855,7 @@ function fr(t, r, n) {
|
|
|
2854
2855
|
}
|
|
2855
2856
|
return l[s[s.length - 1]] = n, a;
|
|
2856
2857
|
}
|
|
2857
|
-
function
|
|
2858
|
+
function pr(t, r) {
|
|
2858
2859
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2859
2860
|
let a = s;
|
|
2860
2861
|
for (let l = 0; l < n.length - 1; l++) {
|
|
@@ -2864,7 +2865,7 @@ function hr(t, r) {
|
|
|
2864
2865
|
}
|
|
2865
2866
|
return delete a[n[n.length - 1]], s;
|
|
2866
2867
|
}
|
|
2867
|
-
const
|
|
2868
|
+
const gn = ({
|
|
2868
2869
|
groups: t,
|
|
2869
2870
|
data: r,
|
|
2870
2871
|
onSubmit: n,
|
|
@@ -2882,9 +2883,9 @@ const hn = ({
|
|
|
2882
2883
|
ref: C,
|
|
2883
2884
|
sdk: g
|
|
2884
2885
|
}) => {
|
|
2885
|
-
const [x,
|
|
2886
|
+
const [x, D] = R(r || {}), [E, W] = R({}), [T, X] = R({});
|
|
2886
2887
|
Q(() => {
|
|
2887
|
-
r &&
|
|
2888
|
+
r && D({ ...r });
|
|
2888
2889
|
}, [r]);
|
|
2889
2890
|
const U = ue(
|
|
2890
2891
|
(k, i, S) => {
|
|
@@ -2903,11 +2904,11 @@ const hn = ({
|
|
|
2903
2904
|
if (i.forEach((ee, ae) => {
|
|
2904
2905
|
const le = {};
|
|
2905
2906
|
for (const G of y.arrayFields) {
|
|
2906
|
-
const
|
|
2907
|
-
if (G.required && (
|
|
2907
|
+
const j = ee?.[G.name];
|
|
2908
|
+
if (G.required && (j == null || j === ""))
|
|
2908
2909
|
le[G.name] = `${G.label} is required`, w = !0;
|
|
2909
2910
|
else if (G.validator) {
|
|
2910
|
-
const M = G.validator(
|
|
2911
|
+
const M = G.validator(j, ee);
|
|
2911
2912
|
M && (le[G.name] = M, w = !0);
|
|
2912
2913
|
}
|
|
2913
2914
|
}
|
|
@@ -2921,12 +2922,12 @@ const hn = ({
|
|
|
2921
2922
|
[t]
|
|
2922
2923
|
), I = ue(
|
|
2923
2924
|
(k, i) => {
|
|
2924
|
-
let S =
|
|
2925
|
+
let S = br(
|
|
2925
2926
|
x,
|
|
2926
2927
|
k,
|
|
2927
2928
|
i
|
|
2928
2929
|
);
|
|
2929
|
-
t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (i == null || i === "") && (S =
|
|
2930
|
+
t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (i == null || i === "") && (S = pr(S, k)), D(S), X((w) => ({ ...w, [k]: !0 }));
|
|
2930
2931
|
const A = U(k, i, S);
|
|
2931
2932
|
W((w) => ({
|
|
2932
2933
|
...w,
|
|
@@ -2943,7 +2944,7 @@ const hn = ({
|
|
|
2943
2944
|
continue;
|
|
2944
2945
|
const w = U(
|
|
2945
2946
|
A.name,
|
|
2946
|
-
|
|
2947
|
+
Oe(x, A.name),
|
|
2947
2948
|
x
|
|
2948
2949
|
);
|
|
2949
2950
|
w && (i[A.name] = w);
|
|
@@ -2960,7 +2961,7 @@ const hn = ({
|
|
|
2960
2961
|
[x, t, U, o, l, n, b]
|
|
2961
2962
|
), K = ue(
|
|
2962
2963
|
(k) => {
|
|
2963
|
-
const i =
|
|
2964
|
+
const i = Oe(x, k.name), S = T[k.name] ? E[k.name] : void 0, y = k.disabled || b, A = {
|
|
2964
2965
|
value: i || "",
|
|
2965
2966
|
disabled: y,
|
|
2966
2967
|
required: k.required,
|
|
@@ -2998,7 +2999,7 @@ const hn = ({
|
|
|
2998
2999
|
);
|
|
2999
3000
|
case "select":
|
|
3000
3001
|
return /* @__PURE__ */ e(
|
|
3001
|
-
|
|
3002
|
+
we,
|
|
3002
3003
|
{
|
|
3003
3004
|
...A,
|
|
3004
3005
|
onChange: (w) => I(k.name, w),
|
|
@@ -3039,7 +3040,7 @@ const hn = ({
|
|
|
3039
3040
|
checked: i === w.value,
|
|
3040
3041
|
onChange: () => I(k.name, w.value),
|
|
3041
3042
|
disabled: y || w.disabled,
|
|
3042
|
-
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3043
|
+
className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3043
3044
|
}
|
|
3044
3045
|
),
|
|
3045
3046
|
w.label
|
|
@@ -3059,7 +3060,7 @@ const hn = ({
|
|
|
3059
3060
|
);
|
|
3060
3061
|
case "file":
|
|
3061
3062
|
return /* @__PURE__ */ e(
|
|
3062
|
-
|
|
3063
|
+
hr,
|
|
3063
3064
|
{
|
|
3064
3065
|
...A,
|
|
3065
3066
|
value: i,
|
|
@@ -3092,7 +3093,7 @@ const hn = ({
|
|
|
3092
3093
|
);
|
|
3093
3094
|
case "folder":
|
|
3094
3095
|
return /* @__PURE__ */ e(
|
|
3095
|
-
|
|
3096
|
+
Vt,
|
|
3096
3097
|
{
|
|
3097
3098
|
value: i || {},
|
|
3098
3099
|
onChange: (w) => I(k.name, w),
|
|
@@ -3122,40 +3123,40 @@ const hn = ({
|
|
|
3122
3123
|
}
|
|
3123
3124
|
const ae = () => {
|
|
3124
3125
|
I(k.name, [...w, {}]);
|
|
3125
|
-
}, le = (
|
|
3126
|
+
}, le = (j) => {
|
|
3126
3127
|
I(
|
|
3127
3128
|
k.name,
|
|
3128
|
-
w.filter((M,
|
|
3129
|
+
w.filter((M, _) => _ !== j)
|
|
3129
3130
|
);
|
|
3130
|
-
}, G = (
|
|
3131
|
+
}, G = (j, M, _) => {
|
|
3131
3132
|
const z = [...w];
|
|
3132
|
-
z[
|
|
3133
|
-
...z[
|
|
3134
|
-
[M]:
|
|
3133
|
+
z[j] = {
|
|
3134
|
+
...z[j],
|
|
3135
|
+
[M]: _
|
|
3135
3136
|
}, I(k.name, z);
|
|
3136
3137
|
};
|
|
3137
3138
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
3138
|
-
w.map((
|
|
3139
|
-
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((
|
|
3140
|
-
const z = ee?.[M]?.[
|
|
3139
|
+
w.map((j, M) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3140
|
+
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((_) => {
|
|
3141
|
+
const z = ee?.[M]?.[_.name];
|
|
3141
3142
|
return /* @__PURE__ */ c(
|
|
3142
3143
|
"div",
|
|
3143
3144
|
{
|
|
3144
3145
|
className: "flex flex-col gap-1",
|
|
3145
3146
|
children: [
|
|
3146
3147
|
M === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3147
|
-
|
|
3148
|
-
|
|
3148
|
+
_.label,
|
|
3149
|
+
_.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3149
3150
|
] }),
|
|
3150
3151
|
(() => {
|
|
3151
|
-
const
|
|
3152
|
-
value:
|
|
3152
|
+
const H = {
|
|
3153
|
+
value: j?.[_.name] || "",
|
|
3153
3154
|
disabled: y,
|
|
3154
|
-
required:
|
|
3155
|
-
placeholder:
|
|
3156
|
-
...
|
|
3155
|
+
required: _.required,
|
|
3156
|
+
placeholder: _.placeholder,
|
|
3157
|
+
..._.fieldProps
|
|
3157
3158
|
};
|
|
3158
|
-
switch (
|
|
3159
|
+
switch (_.type) {
|
|
3159
3160
|
case "text":
|
|
3160
3161
|
case "email":
|
|
3161
3162
|
case "password":
|
|
@@ -3165,14 +3166,14 @@ const hn = ({
|
|
|
3165
3166
|
return /* @__PURE__ */ e(
|
|
3166
3167
|
be,
|
|
3167
3168
|
{
|
|
3168
|
-
...
|
|
3169
|
-
onChange: (
|
|
3169
|
+
...H,
|
|
3170
|
+
onChange: (B) => G(
|
|
3170
3171
|
M,
|
|
3171
|
-
|
|
3172
|
-
|
|
3172
|
+
_.name,
|
|
3173
|
+
B.target.value
|
|
3173
3174
|
),
|
|
3174
|
-
type:
|
|
3175
|
-
autoComplete:
|
|
3175
|
+
type: _.textType || _.type,
|
|
3176
|
+
autoComplete: _.autocomplete,
|
|
3176
3177
|
error: z,
|
|
3177
3178
|
size: f
|
|
3178
3179
|
}
|
|
@@ -3181,11 +3182,11 @@ const hn = ({
|
|
|
3181
3182
|
return /* @__PURE__ */ e(
|
|
3182
3183
|
De,
|
|
3183
3184
|
{
|
|
3184
|
-
...
|
|
3185
|
-
onChange: (
|
|
3185
|
+
...H,
|
|
3186
|
+
onChange: (B) => G(
|
|
3186
3187
|
M,
|
|
3187
|
-
|
|
3188
|
-
|
|
3188
|
+
_.name,
|
|
3189
|
+
B.target.value
|
|
3189
3190
|
),
|
|
3190
3191
|
rows: 4,
|
|
3191
3192
|
error: z,
|
|
@@ -3194,23 +3195,23 @@ const hn = ({
|
|
|
3194
3195
|
);
|
|
3195
3196
|
case "select":
|
|
3196
3197
|
return /* @__PURE__ */ e(
|
|
3197
|
-
|
|
3198
|
+
we,
|
|
3198
3199
|
{
|
|
3199
|
-
...
|
|
3200
|
-
onChange: (
|
|
3200
|
+
...H,
|
|
3201
|
+
onChange: (B) => G(
|
|
3201
3202
|
M,
|
|
3202
|
-
|
|
3203
|
-
|
|
3203
|
+
_.name,
|
|
3204
|
+
B
|
|
3204
3205
|
),
|
|
3205
|
-
options: (
|
|
3206
|
-
(
|
|
3207
|
-
...
|
|
3208
|
-
value: String(
|
|
3206
|
+
options: (_.options || []).map(
|
|
3207
|
+
(B) => ({
|
|
3208
|
+
...B,
|
|
3209
|
+
value: String(B.value)
|
|
3209
3210
|
})
|
|
3210
3211
|
),
|
|
3211
|
-
searchable:
|
|
3212
|
-
multiple:
|
|
3213
|
-
allowCreate:
|
|
3212
|
+
searchable: _.searchable,
|
|
3213
|
+
multiple: _.multiple,
|
|
3214
|
+
allowCreate: _.allowCreate,
|
|
3214
3215
|
error: z,
|
|
3215
3216
|
size: f
|
|
3216
3217
|
}
|
|
@@ -3219,18 +3220,18 @@ const hn = ({
|
|
|
3219
3220
|
return /* @__PURE__ */ e(
|
|
3220
3221
|
pe,
|
|
3221
3222
|
{
|
|
3222
|
-
...
|
|
3223
|
-
checked: !!
|
|
3224
|
-
onChange: (
|
|
3223
|
+
...H,
|
|
3224
|
+
checked: !!j?.[_.name],
|
|
3225
|
+
onChange: (B) => G(
|
|
3225
3226
|
M,
|
|
3226
|
-
|
|
3227
|
-
|
|
3227
|
+
_.name,
|
|
3228
|
+
B.target.checked
|
|
3228
3229
|
),
|
|
3229
3230
|
size: f
|
|
3230
3231
|
}
|
|
3231
3232
|
);
|
|
3232
3233
|
case "radio":
|
|
3233
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3234
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _.options?.map((B) => /* @__PURE__ */ c(
|
|
3234
3235
|
"label",
|
|
3235
3236
|
{
|
|
3236
3237
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3239,46 +3240,46 @@ const hn = ({
|
|
|
3239
3240
|
"input",
|
|
3240
3241
|
{
|
|
3241
3242
|
type: "radio",
|
|
3242
|
-
name: `${k.name}.${M}.${
|
|
3243
|
-
value:
|
|
3244
|
-
checked:
|
|
3243
|
+
name: `${k.name}.${M}.${_.name}`,
|
|
3244
|
+
value: B.value,
|
|
3245
|
+
checked: j?.[_.name] === B.value,
|
|
3245
3246
|
onChange: () => G(
|
|
3246
3247
|
M,
|
|
3247
|
-
|
|
3248
|
-
|
|
3248
|
+
_.name,
|
|
3249
|
+
B.value
|
|
3249
3250
|
),
|
|
3250
|
-
disabled: y ||
|
|
3251
|
-
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3251
|
+
disabled: y || B.disabled,
|
|
3252
|
+
className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3252
3253
|
}
|
|
3253
3254
|
),
|
|
3254
|
-
|
|
3255
|
+
B.label
|
|
3255
3256
|
]
|
|
3256
3257
|
},
|
|
3257
|
-
|
|
3258
|
+
B.value
|
|
3258
3259
|
)) });
|
|
3259
3260
|
case "date": {
|
|
3260
|
-
const
|
|
3261
|
+
const B = j?.[_.name];
|
|
3261
3262
|
return /* @__PURE__ */ e(
|
|
3262
3263
|
$e,
|
|
3263
3264
|
{
|
|
3264
|
-
...
|
|
3265
|
-
value:
|
|
3266
|
-
onChange: (
|
|
3265
|
+
...H,
|
|
3266
|
+
value: B ? new Date(B) : null,
|
|
3267
|
+
onChange: (O) => G(
|
|
3267
3268
|
M,
|
|
3268
|
-
|
|
3269
|
-
|
|
3269
|
+
_.name,
|
|
3270
|
+
O
|
|
3270
3271
|
),
|
|
3271
3272
|
size: f
|
|
3272
3273
|
}
|
|
3273
3274
|
);
|
|
3274
3275
|
}
|
|
3275
3276
|
case "custom":
|
|
3276
|
-
return
|
|
3277
|
-
value:
|
|
3278
|
-
onChange: (
|
|
3277
|
+
return _.customComponent?.({
|
|
3278
|
+
value: j?.[_.name],
|
|
3279
|
+
onChange: (B) => G(
|
|
3279
3280
|
M,
|
|
3280
|
-
|
|
3281
|
-
|
|
3281
|
+
_.name,
|
|
3282
|
+
B
|
|
3282
3283
|
),
|
|
3283
3284
|
error: z,
|
|
3284
3285
|
disabled: y
|
|
@@ -3288,14 +3289,14 @@ const hn = ({
|
|
|
3288
3289
|
return /* @__PURE__ */ c("p", { children: [
|
|
3289
3290
|
"Unsupported field type in array:",
|
|
3290
3291
|
" ",
|
|
3291
|
-
|
|
3292
|
+
_.type
|
|
3292
3293
|
] });
|
|
3293
3294
|
}
|
|
3294
3295
|
})(),
|
|
3295
3296
|
z && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: z })
|
|
3296
3297
|
]
|
|
3297
3298
|
},
|
|
3298
|
-
|
|
3299
|
+
_.name
|
|
3299
3300
|
);
|
|
3300
3301
|
}) }),
|
|
3301
3302
|
/* @__PURE__ */ e(
|
|
@@ -3309,7 +3310,7 @@ const hn = ({
|
|
|
3309
3310
|
onClick: () => le(M),
|
|
3310
3311
|
disabled: y,
|
|
3311
3312
|
className: d("shrink-0", M === 0 && "mt-5"),
|
|
3312
|
-
children: /* @__PURE__ */ e(
|
|
3313
|
+
children: /* @__PURE__ */ e(dt, { className: "size-icon-md" })
|
|
3313
3314
|
}
|
|
3314
3315
|
)
|
|
3315
3316
|
] }, M)),
|
|
@@ -3319,7 +3320,7 @@ const hn = ({
|
|
|
3319
3320
|
type: "button",
|
|
3320
3321
|
variant: "secondary",
|
|
3321
3322
|
size: "sm",
|
|
3322
|
-
leftIcon: /* @__PURE__ */ e(
|
|
3323
|
+
leftIcon: /* @__PURE__ */ e(ut, { className: "size-icon-sm" }),
|
|
3323
3324
|
onClick: ae,
|
|
3324
3325
|
disabled: y,
|
|
3325
3326
|
children: [
|
|
@@ -3334,7 +3335,7 @@ const hn = ({
|
|
|
3334
3335
|
return null;
|
|
3335
3336
|
}
|
|
3336
3337
|
},
|
|
3337
|
-
[x,
|
|
3338
|
+
[x, T, E, b, f, I]
|
|
3338
3339
|
), re = ue(
|
|
3339
3340
|
(k) => {
|
|
3340
3341
|
if (k.conditional && !k.conditional(x))
|
|
@@ -3342,7 +3343,7 @@ const hn = ({
|
|
|
3342
3343
|
const i = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
|
|
3343
3344
|
if (i.length === 0) return null;
|
|
3344
3345
|
const S = d(
|
|
3345
|
-
k.layout === "flex" ? "flex flex-wrap gap-3" : "grid gap-3",
|
|
3346
|
+
k.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
|
|
3346
3347
|
k.layout !== "flex" && {
|
|
3347
3348
|
"grid-cols-1": !k.columns || k.columns === 1,
|
|
3348
3349
|
"grid-cols-2": k.columns === 2,
|
|
@@ -3354,14 +3355,14 @@ const hn = ({
|
|
|
3354
3355
|
return /* @__PURE__ */ c(
|
|
3355
3356
|
"div",
|
|
3356
3357
|
{
|
|
3357
|
-
className: "flex flex-col gap-4
|
|
3358
|
+
className: "flex flex-col gap-4 py-6 not-last:border-b not-last:border-border-subtle sm:flex-row sm:gap-8",
|
|
3358
3359
|
children: [
|
|
3359
3360
|
/* @__PURE__ */ c("div", { className: "w-full shrink-0 sm:w-form-label", children: [
|
|
3360
|
-
/* @__PURE__ */ e("span", { className: "text-
|
|
3361
|
-
k.description && /* @__PURE__ */ e("p", { className: "mt-1 text-
|
|
3361
|
+
/* @__PURE__ */ e("span", { className: "text-base font-semibold text-text", children: k.title }),
|
|
3362
|
+
k.description && /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-relaxed text-pretty text-text-subtle", children: k.description })
|
|
3362
3363
|
] }),
|
|
3363
3364
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((y) => {
|
|
3364
|
-
const A =
|
|
3365
|
+
const A = T[y.name] ? E[y.name] : void 0;
|
|
3365
3366
|
return /* @__PURE__ */ c(
|
|
3366
3367
|
"div",
|
|
3367
3368
|
{
|
|
@@ -3374,7 +3375,7 @@ const hn = ({
|
|
|
3374
3375
|
gridColumn: typeof y.width == "number" ? `span ${y.width} / span ${y.width}` : void 0
|
|
3375
3376
|
},
|
|
3376
3377
|
children: [
|
|
3377
|
-
y.type !== "custom" && y.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-
|
|
3378
|
+
y.type !== "custom" && y.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-sm font-medium text-text-muted", children: [
|
|
3378
3379
|
y.label,
|
|
3379
3380
|
y.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3380
3381
|
] }),
|
|
@@ -3390,21 +3391,20 @@ const hn = ({
|
|
|
3390
3391
|
k.id
|
|
3391
3392
|
);
|
|
3392
3393
|
},
|
|
3393
|
-
[x,
|
|
3394
|
-
),
|
|
3395
|
-
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3394
|
+
[x, T, E, K]
|
|
3395
|
+
), P = d(
|
|
3396
3396
|
{
|
|
3397
|
-
"max-w-
|
|
3398
|
-
"max-w-
|
|
3399
|
-
"max-w-
|
|
3397
|
+
"max-w-settings": f === "sm",
|
|
3398
|
+
"max-w-form": f === "md",
|
|
3399
|
+
"max-w-6xl": f === "lg",
|
|
3400
3400
|
"max-w-full": f === "full"
|
|
3401
3401
|
},
|
|
3402
3402
|
p
|
|
3403
3403
|
), ce = f === "full" ? "md" : f;
|
|
3404
|
-
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className:
|
|
3404
|
+
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className: P, children: [
|
|
3405
3405
|
!N && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3406
3406
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(re) }),
|
|
3407
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle
|
|
3407
|
+
N && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(xe, { children: [
|
|
3408
3408
|
/* @__PURE__ */ e("div", { className: "ml-auto" }),
|
|
3409
3409
|
s && /* @__PURE__ */ e(
|
|
3410
3410
|
ne,
|
|
@@ -3433,7 +3433,7 @@ const hn = ({
|
|
|
3433
3433
|
] }) })
|
|
3434
3434
|
] });
|
|
3435
3435
|
};
|
|
3436
|
-
function
|
|
3436
|
+
function vn({
|
|
3437
3437
|
open: t,
|
|
3438
3438
|
title: r,
|
|
3439
3439
|
description: n,
|
|
@@ -3445,7 +3445,7 @@ function xn({
|
|
|
3445
3445
|
onCancel: u
|
|
3446
3446
|
}) {
|
|
3447
3447
|
return /* @__PURE__ */ e(
|
|
3448
|
-
|
|
3448
|
+
We,
|
|
3449
3449
|
{
|
|
3450
3450
|
open: t,
|
|
3451
3451
|
onClose: u,
|
|
@@ -3467,7 +3467,7 @@ function xn({
|
|
|
3467
3467
|
}
|
|
3468
3468
|
);
|
|
3469
3469
|
}
|
|
3470
|
-
const
|
|
3470
|
+
const gr = {
|
|
3471
3471
|
default: "bg-surface-hover text-text",
|
|
3472
3472
|
primary: "bg-accent-soft text-accent",
|
|
3473
3473
|
secondary: "bg-surface-hover text-text-muted",
|
|
@@ -3477,11 +3477,11 @@ const xr = {
|
|
|
3477
3477
|
info: "bg-info-soft text-info-fg",
|
|
3478
3478
|
// Internal-note amber. Never for customer-visible content.
|
|
3479
3479
|
note: "bg-note-soft text-note"
|
|
3480
|
-
},
|
|
3480
|
+
}, vr = {
|
|
3481
3481
|
sm: "px-2 py-0.5 text-xs",
|
|
3482
3482
|
md: "px-2.5 py-1 text-sm",
|
|
3483
3483
|
lg: "px-3 py-1.5 text-base"
|
|
3484
|
-
},
|
|
3484
|
+
}, yr = {
|
|
3485
3485
|
default: "bg-surface-hover",
|
|
3486
3486
|
primary: "bg-accent",
|
|
3487
3487
|
secondary: "bg-surface-hover",
|
|
@@ -3491,7 +3491,7 @@ const xr = {
|
|
|
3491
3491
|
info: "bg-info",
|
|
3492
3492
|
note: "bg-note"
|
|
3493
3493
|
};
|
|
3494
|
-
function
|
|
3494
|
+
function yn({
|
|
3495
3495
|
variant: t = "default",
|
|
3496
3496
|
size: r = "md",
|
|
3497
3497
|
dot: n = !1,
|
|
@@ -3509,9 +3509,9 @@ function bn({
|
|
|
3509
3509
|
// Base styles
|
|
3510
3510
|
"inline-flex items-center font-medium rounded-full",
|
|
3511
3511
|
// Variant styles
|
|
3512
|
-
|
|
3512
|
+
gr[t],
|
|
3513
3513
|
// Size styles
|
|
3514
|
-
|
|
3514
|
+
vr[r],
|
|
3515
3515
|
o
|
|
3516
3516
|
),
|
|
3517
3517
|
...u,
|
|
@@ -3521,7 +3521,7 @@ function bn({
|
|
|
3521
3521
|
{
|
|
3522
3522
|
className: d(
|
|
3523
3523
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3524
|
-
|
|
3524
|
+
yr[t]
|
|
3525
3525
|
)
|
|
3526
3526
|
}
|
|
3527
3527
|
),
|
|
@@ -3533,18 +3533,18 @@ function bn({
|
|
|
3533
3533
|
onClick: l,
|
|
3534
3534
|
className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
|
|
3535
3535
|
"aria-label": "Remove badge",
|
|
3536
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
3536
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "xs", color: "current" })
|
|
3537
3537
|
}
|
|
3538
3538
|
)
|
|
3539
3539
|
]
|
|
3540
3540
|
}
|
|
3541
3541
|
);
|
|
3542
3542
|
}
|
|
3543
|
-
const
|
|
3543
|
+
const Nr = {
|
|
3544
3544
|
neutral: "bg-surface-hover text-text-muted",
|
|
3545
3545
|
success: "bg-success-soft text-success-fg"
|
|
3546
3546
|
};
|
|
3547
|
-
function
|
|
3547
|
+
function Nn({
|
|
3548
3548
|
icon: t,
|
|
3549
3549
|
tone: r = "neutral",
|
|
3550
3550
|
title: n,
|
|
@@ -3564,7 +3564,7 @@ function pn({
|
|
|
3564
3564
|
),
|
|
3565
3565
|
...h,
|
|
3566
3566
|
children: [
|
|
3567
|
-
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl",
|
|
3567
|
+
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", Nr[r]), children: t }),
|
|
3568
3568
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3569
3569
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3570
3570
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3572,7 +3572,7 @@ function pn({
|
|
|
3572
3572
|
}
|
|
3573
3573
|
);
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function wn({ children: t, className: r, ...n }) {
|
|
3576
3576
|
return /* @__PURE__ */ e(
|
|
3577
3577
|
"kbd",
|
|
3578
3578
|
{
|
|
@@ -3585,14 +3585,14 @@ function gn({ children: t, className: r, ...n }) {
|
|
|
3585
3585
|
}
|
|
3586
3586
|
);
|
|
3587
3587
|
}
|
|
3588
|
-
const
|
|
3588
|
+
const wr = {
|
|
3589
3589
|
sm: "h-1",
|
|
3590
3590
|
md: "h-1.5"
|
|
3591
|
-
},
|
|
3591
|
+
}, kr = {
|
|
3592
3592
|
accent: "bg-accent",
|
|
3593
3593
|
success: "bg-success"
|
|
3594
3594
|
};
|
|
3595
|
-
function
|
|
3595
|
+
function kn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3596
3596
|
const l = Math.max(0, Math.min(100, t));
|
|
3597
3597
|
return /* @__PURE__ */ e(
|
|
3598
3598
|
"div",
|
|
@@ -3601,37 +3601,37 @@ function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3601
3601
|
"aria-valuenow": Math.round(l),
|
|
3602
3602
|
"aria-valuemin": 0,
|
|
3603
3603
|
"aria-valuemax": 100,
|
|
3604
|
-
className: d("w-full overflow-hidden rounded-full bg-surface-hover",
|
|
3604
|
+
className: d("w-full overflow-hidden rounded-full bg-surface-hover", wr[n], s),
|
|
3605
3605
|
...a,
|
|
3606
3606
|
children: /* @__PURE__ */ e(
|
|
3607
3607
|
"div",
|
|
3608
3608
|
{
|
|
3609
|
-
className: d("h-full rounded-full transition-[width] duration-300 ease-out",
|
|
3609
|
+
className: d("h-full rounded-full transition-[width] duration-300 ease-out", kr[r]),
|
|
3610
3610
|
style: { width: `${l}%` }
|
|
3611
3611
|
}
|
|
3612
3612
|
)
|
|
3613
3613
|
}
|
|
3614
3614
|
);
|
|
3615
3615
|
}
|
|
3616
|
-
const
|
|
3616
|
+
const Cr = {
|
|
3617
3617
|
xs: "h-3 w-3",
|
|
3618
3618
|
sm: "h-4 w-4",
|
|
3619
3619
|
md: "h-6 w-6",
|
|
3620
3620
|
lg: "h-8 w-8",
|
|
3621
3621
|
xl: "h-12 w-12"
|
|
3622
|
-
},
|
|
3622
|
+
}, Sr = {
|
|
3623
3623
|
primary: "text-accent",
|
|
3624
3624
|
secondary: "text-text-muted",
|
|
3625
3625
|
white: "text-white",
|
|
3626
3626
|
current: "text-current"
|
|
3627
|
-
},
|
|
3627
|
+
}, zr = {
|
|
3628
3628
|
xs: "text-xs",
|
|
3629
3629
|
sm: "text-sm",
|
|
3630
3630
|
md: "text-sm",
|
|
3631
3631
|
lg: "text-base",
|
|
3632
3632
|
xl: "text-lg"
|
|
3633
3633
|
};
|
|
3634
|
-
function
|
|
3634
|
+
function Cn({
|
|
3635
3635
|
size: t = "md",
|
|
3636
3636
|
variant: r = "primary",
|
|
3637
3637
|
label: n = "Loading...",
|
|
@@ -3654,8 +3654,8 @@ function yn({
|
|
|
3654
3654
|
{
|
|
3655
3655
|
className: d(
|
|
3656
3656
|
"animate-spin",
|
|
3657
|
-
|
|
3658
|
-
|
|
3657
|
+
Cr[t],
|
|
3658
|
+
Sr[r]
|
|
3659
3659
|
),
|
|
3660
3660
|
fill: "none",
|
|
3661
3661
|
viewBox: "0 0 24 24",
|
|
@@ -3689,7 +3689,7 @@ function yn({
|
|
|
3689
3689
|
{
|
|
3690
3690
|
className: d(
|
|
3691
3691
|
"text-text-muted",
|
|
3692
|
-
|
|
3692
|
+
zr[t]
|
|
3693
3693
|
),
|
|
3694
3694
|
children: n
|
|
3695
3695
|
}
|
|
@@ -3699,7 +3699,7 @@ function yn({
|
|
|
3699
3699
|
}
|
|
3700
3700
|
);
|
|
3701
3701
|
}
|
|
3702
|
-
const
|
|
3702
|
+
const Er = {
|
|
3703
3703
|
neutral: "bg-text-disabled",
|
|
3704
3704
|
accent: "bg-accent",
|
|
3705
3705
|
success: "bg-success",
|
|
@@ -3713,7 +3713,7 @@ const Cr = {
|
|
|
3713
3713
|
"cat-4": "bg-cat-4",
|
|
3714
3714
|
"cat-5": "bg-cat-5"
|
|
3715
3715
|
};
|
|
3716
|
-
function
|
|
3716
|
+
function Sn({
|
|
3717
3717
|
tone: t = "neutral",
|
|
3718
3718
|
shape: r = "round",
|
|
3719
3719
|
pulse: n = !1,
|
|
@@ -3729,14 +3729,14 @@ function Nn({
|
|
|
3729
3729
|
className: d(
|
|
3730
3730
|
"inline-block size-dot shrink-0",
|
|
3731
3731
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
3732
|
-
|
|
3732
|
+
Er[t],
|
|
3733
3733
|
n && "animate-pulse",
|
|
3734
3734
|
a
|
|
3735
3735
|
)
|
|
3736
3736
|
}
|
|
3737
3737
|
);
|
|
3738
3738
|
}
|
|
3739
|
-
function
|
|
3739
|
+
function zn({
|
|
3740
3740
|
steps: t,
|
|
3741
3741
|
current: r,
|
|
3742
3742
|
variant: n = "numbered",
|
|
@@ -3772,7 +3772,7 @@ function wn({
|
|
|
3772
3772
|
u < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3773
3773
|
] }, h)) });
|
|
3774
3774
|
}
|
|
3775
|
-
function
|
|
3775
|
+
function En({ title: t, icon: r = /* @__PURE__ */ e(mt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
|
|
3776
3776
|
return /* @__PURE__ */ c(
|
|
3777
3777
|
"div",
|
|
3778
3778
|
{
|
|
@@ -3793,21 +3793,21 @@ function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-
|
|
|
3793
3793
|
}
|
|
3794
3794
|
);
|
|
3795
3795
|
}
|
|
3796
|
-
const
|
|
3796
|
+
const Mr = {
|
|
3797
3797
|
xs: "w-5 h-5 text-xs",
|
|
3798
3798
|
sm: "w-6 h-6 text-xs",
|
|
3799
3799
|
md: "w-7 h-7 text-base",
|
|
3800
3800
|
lg: "w-9 h-9 text-sm"
|
|
3801
3801
|
};
|
|
3802
|
-
function
|
|
3802
|
+
function $r(t) {
|
|
3803
3803
|
if (!t) return "?";
|
|
3804
3804
|
const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
3805
3805
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3806
3806
|
}
|
|
3807
|
-
const
|
|
3807
|
+
const Dr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
3808
3808
|
const [l, o] = oe.useState(!1), h = d(
|
|
3809
3809
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover text-text",
|
|
3810
|
-
|
|
3810
|
+
Mr[n],
|
|
3811
3811
|
s
|
|
3812
3812
|
);
|
|
3813
3813
|
return r && !l ? /* @__PURE__ */ e(
|
|
@@ -3819,13 +3819,13 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3819
3819
|
className: d(h, "object-cover"),
|
|
3820
3820
|
onError: () => o(!0)
|
|
3821
3821
|
}
|
|
3822
|
-
) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children:
|
|
3823
|
-
},
|
|
3822
|
+
) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children: $r(t) });
|
|
3823
|
+
}, Fe = "ring-surface", Tr = "ring-surface-accent", Mn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3824
3824
|
if (t.length === 0) return null;
|
|
3825
3825
|
const a = t.slice(0, r), l = t.length - a.length;
|
|
3826
3826
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
3827
3827
|
a.map((o, h) => /* @__PURE__ */ e(
|
|
3828
|
-
|
|
3828
|
+
Dr,
|
|
3829
3829
|
{
|
|
3830
3830
|
name: o.name,
|
|
3831
3831
|
src: o.src,
|
|
@@ -3833,7 +3833,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3833
3833
|
title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
|
|
3834
3834
|
className: d(
|
|
3835
3835
|
h > 0 && "-ml-2",
|
|
3836
|
-
o.owner ?
|
|
3836
|
+
o.owner ? Tr : Fe,
|
|
3837
3837
|
o.seen === !1 && "opacity-40"
|
|
3838
3838
|
)
|
|
3839
3839
|
},
|
|
@@ -3845,7 +3845,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3845
3845
|
className: d(
|
|
3846
3846
|
"inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-surface-hover text-text-muted",
|
|
3847
3847
|
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",
|
|
3848
|
-
|
|
3848
|
+
Fe
|
|
3849
3849
|
),
|
|
3850
3850
|
children: [
|
|
3851
3851
|
"+",
|
|
@@ -3854,26 +3854,26 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3854
3854
|
}
|
|
3855
3855
|
)
|
|
3856
3856
|
] });
|
|
3857
|
-
},
|
|
3857
|
+
}, Be = {
|
|
3858
3858
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
3859
3859
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
3860
3860
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
3861
3861
|
tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
|
|
3862
3862
|
note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
|
|
3863
|
-
},
|
|
3863
|
+
}, _r = {
|
|
3864
3864
|
sm: "size-avatar-xs rounded-sm text-xs",
|
|
3865
3865
|
md: "size-avatar-sm rounded-md text-xs",
|
|
3866
3866
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3867
3867
|
};
|
|
3868
|
-
function
|
|
3869
|
-
const l =
|
|
3868
|
+
function $n({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3869
|
+
const l = Be[t in Be ? t : "note"];
|
|
3870
3870
|
return /* @__PURE__ */ e(
|
|
3871
3871
|
"span",
|
|
3872
3872
|
{
|
|
3873
3873
|
title: a,
|
|
3874
3874
|
className: d(
|
|
3875
3875
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
3876
|
-
|
|
3876
|
+
_r[n],
|
|
3877
3877
|
l.fg,
|
|
3878
3878
|
l.bg,
|
|
3879
3879
|
s
|
|
@@ -3882,7 +3882,7 @@ function Sn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3882
3882
|
}
|
|
3883
3883
|
);
|
|
3884
3884
|
}
|
|
3885
|
-
const
|
|
3885
|
+
const Dn = ({
|
|
3886
3886
|
src: t,
|
|
3887
3887
|
alt: r,
|
|
3888
3888
|
size: n = "md",
|
|
@@ -3898,14 +3898,14 @@ const zn = ({
|
|
|
3898
3898
|
onError: b,
|
|
3899
3899
|
...p
|
|
3900
3900
|
}) => {
|
|
3901
|
-
const [C, g] = R(!0), [x,
|
|
3902
|
-
g(!1),
|
|
3903
|
-
}, X = (
|
|
3904
|
-
if (g(!1),
|
|
3905
|
-
W(h),
|
|
3901
|
+
const [C, g] = R(!0), [x, D] = R(!1), [E, W] = R(t), T = (P) => {
|
|
3902
|
+
g(!1), D(!1), f?.(P);
|
|
3903
|
+
}, X = (P) => {
|
|
3904
|
+
if (g(!1), D(!0), h && E !== h) {
|
|
3905
|
+
W(h), D(!1), g(!0);
|
|
3906
3906
|
return;
|
|
3907
3907
|
}
|
|
3908
|
-
b?.(
|
|
3908
|
+
b?.(P);
|
|
3909
3909
|
}, U = d(
|
|
3910
3910
|
"relative overflow-hidden bg-surface-hover",
|
|
3911
3911
|
// Size variants
|
|
@@ -3944,7 +3944,7 @@ const zn = ({
|
|
|
3944
3944
|
"absolute inset-0 flex items-center justify-center",
|
|
3945
3945
|
"text-text-muted"
|
|
3946
3946
|
), K = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), re = /* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
3947
|
-
/* @__PURE__ */ e(Y, { icon:
|
|
3947
|
+
/* @__PURE__ */ e(Y, { icon: ft, size: "lg", className: "mx-auto mb-1" }),
|
|
3948
3948
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
3949
3949
|
] });
|
|
3950
3950
|
return /* @__PURE__ */ c("div", { className: U, children: [
|
|
@@ -3955,7 +3955,7 @@ const zn = ({
|
|
|
3955
3955
|
src: E,
|
|
3956
3956
|
alt: r,
|
|
3957
3957
|
className: I,
|
|
3958
|
-
onLoad:
|
|
3958
|
+
onLoad: T,
|
|
3959
3959
|
onError: X
|
|
3960
3960
|
}
|
|
3961
3961
|
),
|
|
@@ -3963,7 +3963,30 @@ const zn = ({
|
|
|
3963
3963
|
x && o && /* @__PURE__ */ e("div", { className: q, children: N || re })
|
|
3964
3964
|
] });
|
|
3965
3965
|
};
|
|
3966
|
-
function
|
|
3966
|
+
function Tn({
|
|
3967
|
+
icon: t,
|
|
3968
|
+
onClick: r,
|
|
3969
|
+
children: n
|
|
3970
|
+
}) {
|
|
3971
|
+
return /* @__PURE__ */ c(
|
|
3972
|
+
"button",
|
|
3973
|
+
{
|
|
3974
|
+
type: "button",
|
|
3975
|
+
onClick: r,
|
|
3976
|
+
className: d(
|
|
3977
|
+
"inline-flex h-control-sm shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2.5",
|
|
3978
|
+
"text-sm font-medium whitespace-nowrap",
|
|
3979
|
+
"transition-colors duration-fast ease-out hover:bg-white/15",
|
|
3980
|
+
"focus-visible:outline-none focus-visible:focus-ring"
|
|
3981
|
+
),
|
|
3982
|
+
children: [
|
|
3983
|
+
t,
|
|
3984
|
+
n
|
|
3985
|
+
]
|
|
3986
|
+
}
|
|
3987
|
+
);
|
|
3988
|
+
}
|
|
3989
|
+
function _n({
|
|
3967
3990
|
items: t,
|
|
3968
3991
|
getRowKey: r,
|
|
3969
3992
|
variant: n = "divided",
|
|
@@ -3981,17 +4004,17 @@ function En({
|
|
|
3981
4004
|
stickyGroupHeaders: C = !1,
|
|
3982
4005
|
collapsibleGroups: g = !1,
|
|
3983
4006
|
hideGroupCount: x = !1,
|
|
3984
|
-
selectable:
|
|
4007
|
+
selectable: D = !1,
|
|
3985
4008
|
selectedItems: E = [],
|
|
3986
4009
|
onSelectionChange: W,
|
|
3987
|
-
bulkActions:
|
|
4010
|
+
bulkActions: T,
|
|
3988
4011
|
header: X,
|
|
3989
4012
|
stickyHeader: U = !1,
|
|
3990
4013
|
bordered: I = !1,
|
|
3991
4014
|
emptyContent: q,
|
|
3992
4015
|
loading: K = !1,
|
|
3993
4016
|
loadingRows: re = 4,
|
|
3994
|
-
className:
|
|
4017
|
+
className: P,
|
|
3995
4018
|
"aria-label": ce
|
|
3996
4019
|
}) {
|
|
3997
4020
|
const [k, i] = oe.useState(
|
|
@@ -4000,29 +4023,29 @@ function En({
|
|
|
4000
4023
|
)
|
|
4001
4024
|
), S = oe.useRef(null), y = (z) => {
|
|
4002
4025
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(z.key)) return;
|
|
4003
|
-
const
|
|
4026
|
+
const B = Array.from(
|
|
4004
4027
|
S.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
4005
4028
|
);
|
|
4006
|
-
if (
|
|
4029
|
+
if (B.length === 0) return;
|
|
4007
4030
|
z.preventDefault();
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4010
|
-
}, A = (z,
|
|
4031
|
+
const O = B.indexOf(document.activeElement), $ = z.key === "Home" ? 0 : z.key === "End" ? B.length - 1 : z.key === "ArrowDown" ? (O + 1) % B.length : (O - 1 + B.length) % B.length;
|
|
4032
|
+
B[$]?.focus();
|
|
4033
|
+
}, A = (z, H) => r ? r(z, H) : H, w = (z) => E.includes(z), ee = (z, H) => {
|
|
4011
4034
|
W && W(
|
|
4012
|
-
|
|
4035
|
+
H ? [...E, z] : E.filter((B) => B !== z)
|
|
4013
4036
|
);
|
|
4014
4037
|
}, ae = (z) => W?.(z ? [...t] : []), le = d(
|
|
4015
4038
|
"flex flex-col",
|
|
4016
4039
|
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4017
|
-
|
|
4040
|
+
P
|
|
4018
4041
|
);
|
|
4019
4042
|
if (K)
|
|
4020
|
-
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z,
|
|
4043
|
+
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z, H) => /* @__PURE__ */ c(
|
|
4021
4044
|
"div",
|
|
4022
4045
|
{
|
|
4023
4046
|
className: d(
|
|
4024
4047
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
4025
|
-
n === "divided" &&
|
|
4048
|
+
n === "divided" && H > 0 && "border-t border-border-subtle"
|
|
4026
4049
|
),
|
|
4027
4050
|
children: [
|
|
4028
4051
|
/* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
|
|
@@ -4031,12 +4054,12 @@ function En({
|
|
|
4031
4054
|
/* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
|
|
4032
4055
|
]
|
|
4033
4056
|
},
|
|
4034
|
-
`skeleton-${
|
|
4057
|
+
`skeleton-${H}`
|
|
4035
4058
|
)) });
|
|
4036
4059
|
if (t.length === 0 && q)
|
|
4037
4060
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4038
|
-
const G = t.length > 0 && E.length === t.length,
|
|
4039
|
-
const
|
|
4061
|
+
const G = t.length > 0 && E.length === t.length, j = E.length > 0 && !G, M = (z, H, B) => {
|
|
4062
|
+
const O = u?.(z, H) ?? !1, $ = N?.(z, H) ?? !1, L = m?.(z, H) ?? !1, te = D && w(z);
|
|
4040
4063
|
return /* @__PURE__ */ c(
|
|
4041
4064
|
"li",
|
|
4042
4065
|
{
|
|
@@ -4044,24 +4067,30 @@ function En({
|
|
|
4044
4067
|
role: "button",
|
|
4045
4068
|
tabIndex: 0,
|
|
4046
4069
|
"data-list-row": "",
|
|
4047
|
-
"aria-current":
|
|
4048
|
-
onClick: () => o(z,
|
|
4049
|
-
onFocus: () => h?.(
|
|
4070
|
+
"aria-current": O || void 0,
|
|
4071
|
+
onClick: () => o(z, H),
|
|
4072
|
+
onFocus: () => h?.(H),
|
|
4050
4073
|
onKeyDown: (v) => {
|
|
4051
|
-
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), o(z,
|
|
4074
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), o(z, H));
|
|
4052
4075
|
}
|
|
4053
4076
|
} : {},
|
|
4054
4077
|
className: d(
|
|
4055
|
-
"flex items-center gap-3
|
|
4078
|
+
"flex items-center gap-3 text-base",
|
|
4056
4079
|
"transition-colors duration-fast ease-out",
|
|
4057
|
-
n === "
|
|
4080
|
+
n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
|
|
4081
|
+
n === "divided" && !B && "border-t border-border-subtle",
|
|
4058
4082
|
o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4083
|
+
// An unread row is tinted, not bolded: at five columns a bold row
|
|
4084
|
+
// shouts across all of them, while the tint marks the row and leaves
|
|
4085
|
+
// the consumer free to weight only the sender and the subject.
|
|
4086
|
+
O || te ? "bg-accent-soft text-text" : $ ? d("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
|
|
4087
|
+
// Read rows stay at full opacity — fading them also fades the avatars
|
|
4088
|
+
// and team dots, which is exactly the identity you scan by. They read
|
|
4089
|
+
// as secondary through weight and text colour instead.
|
|
4090
|
+
L && "text-text-muted"
|
|
4062
4091
|
),
|
|
4063
4092
|
children: [
|
|
4064
|
-
|
|
4093
|
+
D && /* @__PURE__ */ e("span", { onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4065
4094
|
pe,
|
|
4066
4095
|
{
|
|
4067
4096
|
checked: w(z),
|
|
@@ -4076,98 +4105,124 @@ function En({
|
|
|
4076
4105
|
className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
|
|
4077
4106
|
}
|
|
4078
4107
|
),
|
|
4079
|
-
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z,
|
|
4080
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z,
|
|
4081
|
-
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(z,
|
|
4108
|
+
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z, H) }),
|
|
4109
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z, H) : String(z) }),
|
|
4110
|
+
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(z, H) })
|
|
4082
4111
|
]
|
|
4083
4112
|
},
|
|
4084
|
-
A(z,
|
|
4113
|
+
A(z, H)
|
|
4085
4114
|
);
|
|
4086
|
-
},
|
|
4115
|
+
}, _ = (() => {
|
|
4087
4116
|
if (!f)
|
|
4088
|
-
return t.map((
|
|
4117
|
+
return t.map((O, $) => M(O, $, $ === 0));
|
|
4089
4118
|
const z = /* @__PURE__ */ new Map();
|
|
4090
|
-
t.forEach((
|
|
4091
|
-
const L = f(
|
|
4092
|
-
z.has(L) || z.set(L, []), z.get(L).push({ item:
|
|
4119
|
+
t.forEach((O, $) => {
|
|
4120
|
+
const L = f(O, $);
|
|
4121
|
+
z.has(L) || z.set(L, []), z.get(L).push({ item: O, index: $ });
|
|
4093
4122
|
});
|
|
4094
|
-
const
|
|
4123
|
+
const H = b ?? [];
|
|
4095
4124
|
return [
|
|
4096
|
-
...
|
|
4097
|
-
...[...z.keys()].filter((
|
|
4098
|
-
].flatMap((
|
|
4099
|
-
const L = z.get(
|
|
4125
|
+
...H.filter((O) => z.has(O.id)),
|
|
4126
|
+
...[...z.keys()].filter((O) => !H.some(($) => $.id === O)).map((O) => ({ id: O }))
|
|
4127
|
+
].flatMap((O, $) => {
|
|
4128
|
+
const L = z.get(O.id) ?? [], te = g && k[O.id], v = O.title ?? O.id, V = O.count ?? L.length, Z = /* @__PURE__ */ e(
|
|
4100
4129
|
"li",
|
|
4101
4130
|
{
|
|
4102
|
-
onClick: g ? () => i((J) => ({ ...J, [
|
|
4131
|
+
onClick: g ? () => i((J) => ({ ...J, [O.id]: !J[O.id] })) : void 0,
|
|
4103
4132
|
className: d(
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
"
|
|
4133
|
+
// A caption over its rows, not a band across the table: same
|
|
4134
|
+
// surface as the rows, no rules, and the count as a quiet pill.
|
|
4135
|
+
// The old grey uppercase strip read as a second column header.
|
|
4136
|
+
"flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
|
|
4137
|
+
$ > 0 ? "pt-5" : "pt-3",
|
|
4138
|
+
O.tone === "danger" ? "text-danger-fg" : O.tone === "muted" ? "text-text-subtle" : "text-text",
|
|
4109
4139
|
C && "sticky z-10",
|
|
4110
|
-
g && "cursor-pointer select-none
|
|
4140
|
+
g && "cursor-pointer select-none"
|
|
4111
4141
|
),
|
|
4112
4142
|
"aria-expanded": g ? !te : void 0,
|
|
4113
4143
|
style: C ? { top: U ? 28 : 0 } : void 0,
|
|
4114
|
-
children: p ? p(
|
|
4144
|
+
children: p ? p(O, L.map((J) => J.item)) : /* @__PURE__ */ c(xe, { children: [
|
|
4115
4145
|
g && /* @__PURE__ */ e(
|
|
4116
4146
|
Ce,
|
|
4117
4147
|
{
|
|
4118
4148
|
"aria-hidden": !0,
|
|
4119
4149
|
className: d(
|
|
4120
|
-
"size-icon-
|
|
4150
|
+
"size-icon-md shrink-0 text-text-subtle transition-transform duration-fast ease-out",
|
|
4121
4151
|
!te && "rotate-90"
|
|
4122
4152
|
)
|
|
4123
4153
|
}
|
|
4124
4154
|
),
|
|
4125
4155
|
/* @__PURE__ */ e("span", { children: v }),
|
|
4126
|
-
!x && /* @__PURE__ */ e(
|
|
4156
|
+
!x && /* @__PURE__ */ e(
|
|
4157
|
+
"span",
|
|
4158
|
+
{
|
|
4159
|
+
className: d(
|
|
4160
|
+
"rounded-full px-2 text-xs font-normal tabular-nums",
|
|
4161
|
+
O.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
|
|
4162
|
+
),
|
|
4163
|
+
children: V
|
|
4164
|
+
}
|
|
4165
|
+
)
|
|
4127
4166
|
] })
|
|
4128
4167
|
},
|
|
4129
|
-
`group-${
|
|
4168
|
+
`group-${O.id}`
|
|
4130
4169
|
);
|
|
4131
4170
|
return te ? [Z] : [
|
|
4132
4171
|
Z,
|
|
4133
4172
|
...L.map(
|
|
4134
|
-
({ item: J, index:
|
|
4173
|
+
({ item: J, index: F }, ie) => M(J, F, ie === 0)
|
|
4135
4174
|
)
|
|
4136
4175
|
];
|
|
4137
4176
|
});
|
|
4138
4177
|
})();
|
|
4139
4178
|
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown: o ? y : void 0, children: [
|
|
4140
|
-
|
|
4141
|
-
/* @__PURE__ */ e(
|
|
4142
|
-
pe,
|
|
4143
|
-
{
|
|
4144
|
-
checked: G,
|
|
4145
|
-
indeterminate: P,
|
|
4146
|
-
onChange: (z) => ae(z.target.checked),
|
|
4147
|
-
"aria-label": "Alles selecteren"
|
|
4148
|
-
}
|
|
4149
|
-
),
|
|
4150
|
-
/* @__PURE__ */ c("span", { className: "text-xs text-text-subtle", children: [
|
|
4151
|
-
E.length,
|
|
4152
|
-
" geselecteerd"
|
|
4153
|
-
] }),
|
|
4154
|
-
D && /* @__PURE__ */ e("div", { className: "ml-auto flex gap-2", children: D })
|
|
4155
|
-
] }),
|
|
4156
|
-
X && /* @__PURE__ */ e(
|
|
4179
|
+
X && /* @__PURE__ */ c(
|
|
4157
4180
|
"div",
|
|
4158
4181
|
{
|
|
4159
4182
|
className: d(
|
|
4160
|
-
|
|
4161
|
-
|
|
4183
|
+
// h-row-sm keeps the strip exactly 28px, which is the offset the
|
|
4184
|
+
// sticky group headers park against.
|
|
4185
|
+
"flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
|
|
4186
|
+
"text-xs font-semibold uppercase tracking-wider text-text-disabled",
|
|
4162
4187
|
U && "sticky top-0 z-20"
|
|
4163
4188
|
),
|
|
4164
|
-
children:
|
|
4189
|
+
children: [
|
|
4190
|
+
D && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
4191
|
+
pe,
|
|
4192
|
+
{
|
|
4193
|
+
checked: G,
|
|
4194
|
+
indeterminate: j,
|
|
4195
|
+
onChange: (z) => ae(z.target.checked),
|
|
4196
|
+
"aria-label": "Alles selecteren"
|
|
4197
|
+
}
|
|
4198
|
+
) }),
|
|
4199
|
+
X
|
|
4200
|
+
]
|
|
4165
4201
|
}
|
|
4166
4202
|
),
|
|
4167
|
-
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children:
|
|
4203
|
+
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: _ }),
|
|
4204
|
+
D && E.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
|
|
4205
|
+
/* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
|
|
4206
|
+
E.length,
|
|
4207
|
+
" geselecteerd"
|
|
4208
|
+
] }),
|
|
4209
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
4210
|
+
T,
|
|
4211
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
4212
|
+
/* @__PURE__ */ e(
|
|
4213
|
+
"button",
|
|
4214
|
+
{
|
|
4215
|
+
type: "button",
|
|
4216
|
+
onClick: () => W?.([]),
|
|
4217
|
+
"aria-label": "Selectie wissen",
|
|
4218
|
+
className: "grid size-tile-md shrink-0 cursor-pointer place-items-center rounded-md transition-colors duration-fast ease-out hover:bg-white/15 focus-visible:outline-none focus-visible:focus-ring",
|
|
4219
|
+
children: /* @__PURE__ */ e(ge, { className: "size-icon-lg" })
|
|
4220
|
+
}
|
|
4221
|
+
)
|
|
4222
|
+
] }) })
|
|
4168
4223
|
] });
|
|
4169
4224
|
}
|
|
4170
|
-
function
|
|
4225
|
+
function An({
|
|
4171
4226
|
side: t,
|
|
4172
4227
|
continued: r = !1,
|
|
4173
4228
|
tone: n = "default",
|
|
@@ -4197,18 +4252,18 @@ function Mn({
|
|
|
4197
4252
|
}
|
|
4198
4253
|
);
|
|
4199
4254
|
}
|
|
4200
|
-
const
|
|
4255
|
+
const Ar = {
|
|
4201
4256
|
default: "text-text",
|
|
4202
4257
|
urgent: "text-danger-fg",
|
|
4203
4258
|
success: "text-success-fg"
|
|
4204
4259
|
};
|
|
4205
|
-
function
|
|
4260
|
+
function Ln({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4206
4261
|
return /* @__PURE__ */ c("div", { className: d("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
|
|
4207
|
-
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold",
|
|
4262
|
+
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Ar[n]), children: t }),
|
|
4208
4263
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4209
4264
|
] });
|
|
4210
4265
|
}
|
|
4211
|
-
const
|
|
4266
|
+
const In = ({
|
|
4212
4267
|
surface: t = !1,
|
|
4213
4268
|
title: r,
|
|
4214
4269
|
subtitle: n,
|
|
@@ -4228,12 +4283,12 @@ const Dn = ({
|
|
|
4228
4283
|
}, [r]), Q(() => {
|
|
4229
4284
|
b && x.current && (x.current.focus(), x.current.select());
|
|
4230
4285
|
}, [b]);
|
|
4231
|
-
const
|
|
4286
|
+
const D = () => {
|
|
4232
4287
|
m && p(!0);
|
|
4233
4288
|
}, E = () => {
|
|
4234
4289
|
p(!1), C.trim() !== "" && C !== r && f ? f(C.trim()) : g(r);
|
|
4235
|
-
}, W = (
|
|
4236
|
-
|
|
4290
|
+
}, W = (T) => {
|
|
4291
|
+
T.key === "Enter" ? x.current?.blur() : T.key === "Escape" && (g(r), p(!1));
|
|
4237
4292
|
};
|
|
4238
4293
|
return /* @__PURE__ */ c(
|
|
4239
4294
|
"div",
|
|
@@ -4258,7 +4313,7 @@ const Dn = ({
|
|
|
4258
4313
|
ref: x,
|
|
4259
4314
|
type: "text",
|
|
4260
4315
|
value: C,
|
|
4261
|
-
onChange: (
|
|
4316
|
+
onChange: (T) => g(T.target.value),
|
|
4262
4317
|
onBlur: E,
|
|
4263
4318
|
onKeyDown: W,
|
|
4264
4319
|
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"
|
|
@@ -4267,7 +4322,7 @@ const Dn = ({
|
|
|
4267
4322
|
/* @__PURE__ */ e(
|
|
4268
4323
|
"h2",
|
|
4269
4324
|
{
|
|
4270
|
-
onClick:
|
|
4325
|
+
onClick: D,
|
|
4271
4326
|
className: d(
|
|
4272
4327
|
"text-lg font-semibold tracking-title truncate",
|
|
4273
4328
|
m && "cursor-pointer"
|
|
@@ -4278,10 +4333,10 @@ const Dn = ({
|
|
|
4278
4333
|
),
|
|
4279
4334
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4280
4335
|
m && /* @__PURE__ */ e(
|
|
4281
|
-
|
|
4336
|
+
ht,
|
|
4282
4337
|
{
|
|
4283
4338
|
size: 15,
|
|
4284
|
-
onClick:
|
|
4339
|
+
onClick: D,
|
|
4285
4340
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4286
4341
|
}
|
|
4287
4342
|
)
|
|
@@ -4290,29 +4345,29 @@ const Dn = ({
|
|
|
4290
4345
|
] })
|
|
4291
4346
|
] }) }),
|
|
4292
4347
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4293
|
-
(
|
|
4348
|
+
(T) => T.render ? /* @__PURE__ */ e(oe.Fragment, { children: T.render() }, T.id) : T.splitOptions && T.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4294
4349
|
Re,
|
|
4295
4350
|
{
|
|
4296
|
-
label:
|
|
4297
|
-
onClick:
|
|
4298
|
-
icon:
|
|
4299
|
-
variant:
|
|
4300
|
-
options:
|
|
4301
|
-
disabled:
|
|
4351
|
+
label: T.label,
|
|
4352
|
+
onClick: T.onClick,
|
|
4353
|
+
icon: T.icon,
|
|
4354
|
+
variant: T.variant === "primary" ? "primary" : "outline",
|
|
4355
|
+
options: T.splitOptions,
|
|
4356
|
+
disabled: T.disabled
|
|
4302
4357
|
},
|
|
4303
|
-
|
|
4358
|
+
T.id
|
|
4304
4359
|
) : /* @__PURE__ */ e(
|
|
4305
4360
|
ne,
|
|
4306
4361
|
{
|
|
4307
|
-
variant:
|
|
4362
|
+
variant: T.variant ?? "secondary",
|
|
4308
4363
|
onClick: (X) => {
|
|
4309
|
-
X.stopPropagation(), X.target.blur(),
|
|
4364
|
+
X.stopPropagation(), X.target.blur(), T.onClick();
|
|
4310
4365
|
},
|
|
4311
|
-
disabled:
|
|
4312
|
-
leftIcon:
|
|
4313
|
-
children:
|
|
4366
|
+
disabled: T.disabled,
|
|
4367
|
+
leftIcon: T.icon,
|
|
4368
|
+
children: T.label
|
|
4314
4369
|
},
|
|
4315
|
-
|
|
4370
|
+
T.id
|
|
4316
4371
|
)
|
|
4317
4372
|
) })
|
|
4318
4373
|
] }),
|
|
@@ -4320,19 +4375,19 @@ const Dn = ({
|
|
|
4320
4375
|
]
|
|
4321
4376
|
}
|
|
4322
4377
|
);
|
|
4323
|
-
},
|
|
4378
|
+
}, Lr = {
|
|
4324
4379
|
none: "p-0",
|
|
4325
4380
|
sm: "p-2",
|
|
4326
4381
|
md: "p-4",
|
|
4327
4382
|
lg: "p-6"
|
|
4328
|
-
},
|
|
4383
|
+
}, jn = ({
|
|
4329
4384
|
actions: t = [],
|
|
4330
4385
|
onBack: r,
|
|
4331
4386
|
backLabel: n = "Back",
|
|
4332
4387
|
className: s,
|
|
4333
4388
|
padding: a = "md",
|
|
4334
4389
|
children: l
|
|
4335
|
-
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3",
|
|
4390
|
+
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3", Lr[a], s), children: [
|
|
4336
4391
|
r && /* @__PURE__ */ e(ne, { variant: "secondary", onClick: r, leftIcon: /* @__PURE__ */ e(Y, { icon: ke, size: "sm" }), iconOnly: !0 }),
|
|
4337
4392
|
l && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: l }),
|
|
4338
4393
|
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !l && "ml-auto"), children: t.map(
|
|
@@ -4362,7 +4417,7 @@ const Dn = ({
|
|
|
4362
4417
|
o.id
|
|
4363
4418
|
)
|
|
4364
4419
|
) })
|
|
4365
|
-
] }),
|
|
4420
|
+
] }), Ir = /<[a-z][\s\S]*>/i, jr = [
|
|
4366
4421
|
"[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
|
|
4367
4422
|
"[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
|
|
4368
4423
|
"[&_strong]:font-semibold [&_em]:italic",
|
|
@@ -4377,7 +4432,7 @@ const Dn = ({
|
|
|
4377
4432
|
"[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
|
|
4378
4433
|
"[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
|
|
4379
4434
|
"[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
|
|
4380
|
-
].join(" "),
|
|
4435
|
+
].join(" "), Pr = {
|
|
4381
4436
|
p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
|
|
4382
4437
|
a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
|
|
4383
4438
|
strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
|
|
@@ -4400,17 +4455,17 @@ const Dn = ({
|
|
|
4400
4455
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4401
4456
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4402
4457
|
};
|
|
4403
|
-
function
|
|
4458
|
+
function Pn({ text: t, className: r, as: n }) {
|
|
4404
4459
|
const s = t ?? "";
|
|
4405
|
-
return (n ? n === "html" :
|
|
4460
|
+
return (n ? n === "html" : Ir.test(s)) ? /* @__PURE__ */ e(
|
|
4406
4461
|
"div",
|
|
4407
4462
|
{
|
|
4408
|
-
className: d("break-words",
|
|
4409
|
-
dangerouslySetInnerHTML: { __html:
|
|
4463
|
+
className: d("break-words", jr, r),
|
|
4464
|
+
dangerouslySetInnerHTML: { __html: vt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
|
|
4410
4465
|
}
|
|
4411
|
-
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(
|
|
4466
|
+
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(yt, { remarkPlugins: [Nt], components: Pr, children: s }) });
|
|
4412
4467
|
}
|
|
4413
|
-
function
|
|
4468
|
+
function On({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4414
4469
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4415
4470
|
return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: d("flex items-center gap-3 py-2", s), children: [
|
|
4416
4471
|
n === "center" && a,
|
|
@@ -4419,7 +4474,7 @@ function An({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
4419
4474
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4420
4475
|
] });
|
|
4421
4476
|
}
|
|
4422
|
-
function
|
|
4477
|
+
function Fn({
|
|
4423
4478
|
label: t,
|
|
4424
4479
|
description: r,
|
|
4425
4480
|
control: n,
|
|
@@ -4446,7 +4501,7 @@ function Ln({
|
|
|
4446
4501
|
}
|
|
4447
4502
|
);
|
|
4448
4503
|
}
|
|
4449
|
-
function
|
|
4504
|
+
function Bn({
|
|
4450
4505
|
icon: t,
|
|
4451
4506
|
title: r,
|
|
4452
4507
|
description: n,
|
|
@@ -4466,7 +4521,7 @@ function In({
|
|
|
4466
4521
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4467
4522
|
] });
|
|
4468
4523
|
}
|
|
4469
|
-
function
|
|
4524
|
+
function Rn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4470
4525
|
return /* @__PURE__ */ c(
|
|
4471
4526
|
"button",
|
|
4472
4527
|
{
|
|
@@ -4479,18 +4534,18 @@ function Pn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
4479
4534
|
children: [
|
|
4480
4535
|
r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
|
|
4481
4536
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
|
|
4482
|
-
/* @__PURE__ */ e(Y, { icon:
|
|
4537
|
+
/* @__PURE__ */ e(Y, { icon: xt, size: "xs", className: "opacity-70" })
|
|
4483
4538
|
]
|
|
4484
4539
|
}
|
|
4485
4540
|
);
|
|
4486
4541
|
}
|
|
4487
|
-
function
|
|
4542
|
+
function Or(t, r) {
|
|
4488
4543
|
return r.split(".").reduce(
|
|
4489
4544
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
4490
4545
|
t
|
|
4491
4546
|
);
|
|
4492
4547
|
}
|
|
4493
|
-
const
|
|
4548
|
+
const Hn = ({
|
|
4494
4549
|
groups: t,
|
|
4495
4550
|
data: r,
|
|
4496
4551
|
size: n = "md",
|
|
@@ -4513,7 +4568,7 @@ const jn = ({
|
|
|
4513
4568
|
return b ? b.label : String(m || "-");
|
|
4514
4569
|
}, h = ue(
|
|
4515
4570
|
(m) => {
|
|
4516
|
-
const f =
|
|
4571
|
+
const f = Or(r, m.name);
|
|
4517
4572
|
if (m.type === "array") {
|
|
4518
4573
|
const p = f;
|
|
4519
4574
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -4544,7 +4599,7 @@ const jn = ({
|
|
|
4544
4599
|
}
|
|
4545
4600
|
) }),
|
|
4546
4601
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: m.arrayFields?.map((x) => {
|
|
4547
|
-
const
|
|
4602
|
+
const D = C?.[x.name];
|
|
4548
4603
|
let E = "-";
|
|
4549
4604
|
switch (x.type) {
|
|
4550
4605
|
case "text":
|
|
@@ -4553,30 +4608,30 @@ const jn = ({
|
|
|
4553
4608
|
case "tel":
|
|
4554
4609
|
case "url":
|
|
4555
4610
|
case "textarea":
|
|
4556
|
-
E =
|
|
4611
|
+
E = D || "-";
|
|
4557
4612
|
break;
|
|
4558
4613
|
case "select":
|
|
4559
4614
|
case "radio":
|
|
4560
4615
|
E = o(
|
|
4561
|
-
|
|
4616
|
+
D,
|
|
4562
4617
|
x.options
|
|
4563
4618
|
);
|
|
4564
4619
|
break;
|
|
4565
4620
|
case "checkbox":
|
|
4566
|
-
E = l(
|
|
4621
|
+
E = l(D);
|
|
4567
4622
|
break;
|
|
4568
4623
|
case "date":
|
|
4569
|
-
E = a(
|
|
4624
|
+
E = a(D);
|
|
4570
4625
|
break;
|
|
4571
4626
|
case "custom":
|
|
4572
4627
|
E = x.customComponent?.({
|
|
4573
|
-
value:
|
|
4628
|
+
value: D
|
|
4574
4629
|
});
|
|
4575
4630
|
break;
|
|
4576
4631
|
default:
|
|
4577
|
-
E = String(
|
|
4632
|
+
E = String(D || "-");
|
|
4578
4633
|
}
|
|
4579
|
-
return x.format && (E = x.format(
|
|
4634
|
+
return x.format && (E = x.format(D, C)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4580
4635
|
/* @__PURE__ */ e(
|
|
4581
4636
|
de,
|
|
4582
4637
|
{
|
|
@@ -4739,7 +4794,7 @@ const jn = ({
|
|
|
4739
4794
|
s
|
|
4740
4795
|
);
|
|
4741
4796
|
return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(u) }) });
|
|
4742
|
-
},
|
|
4797
|
+
}, Ke = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
4743
4798
|
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
4744
4799
|
if (a)
|
|
4745
4800
|
return /* @__PURE__ */ c("li", { children: [
|
|
@@ -4756,7 +4811,7 @@ const jn = ({
|
|
|
4756
4811
|
}
|
|
4757
4812
|
),
|
|
4758
4813
|
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((u, N) => /* @__PURE__ */ e(
|
|
4759
|
-
|
|
4814
|
+
Ke,
|
|
4760
4815
|
{
|
|
4761
4816
|
item: u,
|
|
4762
4817
|
isSelectedHandler: r,
|
|
@@ -4831,7 +4886,7 @@ const jn = ({
|
|
|
4831
4886
|
]
|
|
4832
4887
|
}
|
|
4833
4888
|
) });
|
|
4834
|
-
},
|
|
4889
|
+
}, Vn = ({
|
|
4835
4890
|
items: t,
|
|
4836
4891
|
isSelectedHandler: r,
|
|
4837
4892
|
onClick: n,
|
|
@@ -4840,7 +4895,7 @@ const jn = ({
|
|
|
4840
4895
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
4841
4896
|
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
4842
4897
|
(a, l) => !a.path && !a.label && !a.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, l) : /* @__PURE__ */ e(
|
|
4843
|
-
|
|
4898
|
+
Ke,
|
|
4844
4899
|
{
|
|
4845
4900
|
item: a,
|
|
4846
4901
|
isSelectedHandler: r,
|
|
@@ -4849,7 +4904,7 @@ const jn = ({
|
|
|
4849
4904
|
l
|
|
4850
4905
|
)
|
|
4851
4906
|
) })
|
|
4852
|
-
] }),
|
|
4907
|
+
] }), Fr = {
|
|
4853
4908
|
xs: "text-xs",
|
|
4854
4909
|
sm: "text-sm",
|
|
4855
4910
|
md: "text-base",
|
|
@@ -4858,13 +4913,13 @@ const jn = ({
|
|
|
4858
4913
|
"2xl": "text-2xl",
|
|
4859
4914
|
"3xl": "text-3xl",
|
|
4860
4915
|
"4xl": "text-3xl"
|
|
4861
|
-
},
|
|
4916
|
+
}, Br = {
|
|
4862
4917
|
light: "font-normal",
|
|
4863
4918
|
normal: "font-normal",
|
|
4864
4919
|
medium: "font-medium",
|
|
4865
4920
|
semibold: "font-semibold",
|
|
4866
4921
|
bold: "font-bold"
|
|
4867
|
-
},
|
|
4922
|
+
}, Rr = {
|
|
4868
4923
|
primary: "text-text",
|
|
4869
4924
|
secondary: "text-text-muted",
|
|
4870
4925
|
accent: "text-accent",
|
|
@@ -4874,11 +4929,11 @@ const jn = ({
|
|
|
4874
4929
|
info: "text-info-fg",
|
|
4875
4930
|
neutral: "text-text",
|
|
4876
4931
|
current: "text-current"
|
|
4877
|
-
},
|
|
4932
|
+
}, Hr = {
|
|
4878
4933
|
left: "text-left",
|
|
4879
4934
|
center: "text-center",
|
|
4880
4935
|
right: "text-right"
|
|
4881
|
-
},
|
|
4936
|
+
}, qn = ({
|
|
4882
4937
|
level: t = 1,
|
|
4883
4938
|
size: r,
|
|
4884
4939
|
weight: n = "semibold",
|
|
@@ -4891,16 +4946,16 @@ const jn = ({
|
|
|
4891
4946
|
}) => {
|
|
4892
4947
|
const N = `h${t}`, m = d(
|
|
4893
4948
|
"font-sans text-pretty",
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4949
|
+
Fr[r || Vr(t)],
|
|
4950
|
+
Br[n],
|
|
4951
|
+
Rr[s],
|
|
4952
|
+
Hr[a],
|
|
4898
4953
|
l && "truncate",
|
|
4899
4954
|
o
|
|
4900
4955
|
);
|
|
4901
4956
|
return /* @__PURE__ */ e(N, { className: m, ...u, children: h });
|
|
4902
4957
|
};
|
|
4903
|
-
function
|
|
4958
|
+
function Vr(t) {
|
|
4904
4959
|
return {
|
|
4905
4960
|
1: "2xl",
|
|
4906
4961
|
2: "xl",
|
|
@@ -4910,7 +4965,7 @@ function Rr(t) {
|
|
|
4910
4965
|
6: "md"
|
|
4911
4966
|
}[t] || "md";
|
|
4912
4967
|
}
|
|
4913
|
-
const
|
|
4968
|
+
const Un = ({
|
|
4914
4969
|
commands: t,
|
|
4915
4970
|
isOpen: r,
|
|
4916
4971
|
onClose: n,
|
|
@@ -4924,19 +4979,19 @@ const Rn = ({
|
|
|
4924
4979
|
return Q(() => {
|
|
4925
4980
|
r || (h(""), N(a || []), f(l || 0));
|
|
4926
4981
|
}, [r]), Q(() => {
|
|
4927
|
-
const x = (
|
|
4982
|
+
const x = (D) => {
|
|
4928
4983
|
if (r) {
|
|
4929
|
-
if (
|
|
4984
|
+
if (D.key === "Escape")
|
|
4930
4985
|
n();
|
|
4931
|
-
else if (
|
|
4986
|
+
else if (D.key === "ArrowUp")
|
|
4932
4987
|
f(
|
|
4933
4988
|
(E) => E > 0 ? E - 1 : g.length - 1
|
|
4934
4989
|
);
|
|
4935
|
-
else if (
|
|
4990
|
+
else if (D.key === "ArrowDown")
|
|
4936
4991
|
f(
|
|
4937
4992
|
(E) => E < g.length - 1 ? E + 1 : 0
|
|
4938
4993
|
);
|
|
4939
|
-
else if (
|
|
4994
|
+
else if (D.key === "Enter") {
|
|
4940
4995
|
const E = g[m];
|
|
4941
4996
|
E && (E.subCommands ? (N([...u, E.id]), f(0)) : E.action && (E.action(), n()));
|
|
4942
4997
|
}
|
|
@@ -4944,8 +4999,8 @@ const Rn = ({
|
|
|
4944
4999
|
};
|
|
4945
5000
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
4946
5001
|
}, [r, n, g, m, u]), Q(() => {
|
|
4947
|
-
const x = (
|
|
4948
|
-
b.current && !b.current.contains(
|
|
5002
|
+
const x = (D) => {
|
|
5003
|
+
b.current && !b.current.contains(D.target) && n();
|
|
4949
5004
|
};
|
|
4950
5005
|
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
4951
5006
|
}, [r, n]), Q(() => {
|
|
@@ -4978,15 +5033,15 @@ const Rn = ({
|
|
|
4978
5033
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
4979
5034
|
children: [
|
|
4980
5035
|
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
4981
|
-
g.map((x,
|
|
5036
|
+
g.map((x, D) => /* @__PURE__ */ c(
|
|
4982
5037
|
"div",
|
|
4983
5038
|
{
|
|
4984
|
-
"data-index":
|
|
4985
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
5039
|
+
"data-index": D,
|
|
5040
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${D === m ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4986
5041
|
onClick: () => {
|
|
4987
5042
|
x.subCommands ? (N([...u, x.id]), f(0)) : x.action && (x.action(), n());
|
|
4988
5043
|
},
|
|
4989
|
-
onMouseEnter: () => f(
|
|
5044
|
+
onMouseEnter: () => f(D),
|
|
4990
5045
|
children: [
|
|
4991
5046
|
x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
|
|
4992
5047
|
/* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
|
|
@@ -5015,7 +5070,7 @@ const Rn = ({
|
|
|
5015
5070
|
]
|
|
5016
5071
|
}
|
|
5017
5072
|
) }) : null;
|
|
5018
|
-
},
|
|
5073
|
+
}, qr = {
|
|
5019
5074
|
none: "p-0",
|
|
5020
5075
|
xs: "p-1",
|
|
5021
5076
|
sm: "p-2",
|
|
@@ -5023,7 +5078,7 @@ const Rn = ({
|
|
|
5023
5078
|
lg: "p-6",
|
|
5024
5079
|
xl: "p-8",
|
|
5025
5080
|
"2xl": "p-12"
|
|
5026
|
-
},
|
|
5081
|
+
}, Ur = {
|
|
5027
5082
|
none: "m-0",
|
|
5028
5083
|
xs: "m-1",
|
|
5029
5084
|
sm: "m-2",
|
|
@@ -5031,7 +5086,7 @@ const Rn = ({
|
|
|
5031
5086
|
lg: "m-6",
|
|
5032
5087
|
xl: "m-8",
|
|
5033
5088
|
"2xl": "m-12"
|
|
5034
|
-
},
|
|
5089
|
+
}, Wr = {
|
|
5035
5090
|
none: "",
|
|
5036
5091
|
primary: "bg-accent text-accent-fg",
|
|
5037
5092
|
secondary: "bg-surface-hover",
|
|
@@ -5047,26 +5102,26 @@ const Rn = ({
|
|
|
5047
5102
|
backdrop: "bg-page",
|
|
5048
5103
|
editor: "bg-surface",
|
|
5049
5104
|
input: "bg-surface-input"
|
|
5050
|
-
},
|
|
5105
|
+
}, Kr = {
|
|
5051
5106
|
none: "rounded-none",
|
|
5052
5107
|
sm: "rounded-sm",
|
|
5053
5108
|
md: "rounded-md",
|
|
5054
5109
|
lg: "rounded-lg",
|
|
5055
5110
|
xl: "rounded-xl",
|
|
5056
5111
|
full: "rounded-full"
|
|
5057
|
-
},
|
|
5112
|
+
}, Gr = {
|
|
5058
5113
|
none: "shadow-none",
|
|
5059
5114
|
sm: "shadow-none",
|
|
5060
5115
|
md: "shadow-overlay",
|
|
5061
5116
|
lg: "shadow-overlay",
|
|
5062
5117
|
xl: "shadow-modal",
|
|
5063
5118
|
"2xl": "shadow-modal"
|
|
5064
|
-
},
|
|
5119
|
+
}, Jr = {
|
|
5065
5120
|
none: "border-0",
|
|
5066
5121
|
sm: "border",
|
|
5067
5122
|
md: "border-2",
|
|
5068
5123
|
lg: "border-4"
|
|
5069
|
-
},
|
|
5124
|
+
}, Yr = {
|
|
5070
5125
|
primary: "border-accent-border",
|
|
5071
5126
|
secondary: "border-border",
|
|
5072
5127
|
accent: "border-accent-border",
|
|
@@ -5076,7 +5131,7 @@ const Rn = ({
|
|
|
5076
5131
|
info: "border-info-border",
|
|
5077
5132
|
neutral: "border-border-subtle",
|
|
5078
5133
|
white: "border-border-subtle"
|
|
5079
|
-
},
|
|
5134
|
+
}, Ge = me(
|
|
5080
5135
|
({
|
|
5081
5136
|
padding: t,
|
|
5082
5137
|
margin: r,
|
|
@@ -5093,13 +5148,13 @@ const Rn = ({
|
|
|
5093
5148
|
{
|
|
5094
5149
|
ref: m,
|
|
5095
5150
|
className: d(
|
|
5096
|
-
t &&
|
|
5097
|
-
r &&
|
|
5098
|
-
n &&
|
|
5099
|
-
s &&
|
|
5100
|
-
a &&
|
|
5101
|
-
l &&
|
|
5102
|
-
o &&
|
|
5151
|
+
t && qr[t],
|
|
5152
|
+
r && Ur[r],
|
|
5153
|
+
n && Wr[n],
|
|
5154
|
+
s && Kr[s],
|
|
5155
|
+
a && Gr[a],
|
|
5156
|
+
l && Jr[l],
|
|
5157
|
+
o && Yr[o],
|
|
5103
5158
|
h
|
|
5104
5159
|
),
|
|
5105
5160
|
...N,
|
|
@@ -5107,9 +5162,9 @@ const Rn = ({
|
|
|
5107
5162
|
}
|
|
5108
5163
|
)
|
|
5109
5164
|
);
|
|
5110
|
-
|
|
5111
|
-
const
|
|
5112
|
-
|
|
5165
|
+
Ge.displayName = "Box";
|
|
5166
|
+
const Wn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
5167
|
+
Ge,
|
|
5113
5168
|
{
|
|
5114
5169
|
background: "module",
|
|
5115
5170
|
radius: "lg",
|
|
@@ -5123,7 +5178,7 @@ const Bn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5123
5178
|
]
|
|
5124
5179
|
}
|
|
5125
5180
|
);
|
|
5126
|
-
function
|
|
5181
|
+
function Kn({
|
|
5127
5182
|
identifier: t,
|
|
5128
5183
|
resourceLoader: r,
|
|
5129
5184
|
framework: n = "react",
|
|
@@ -5157,13 +5212,13 @@ function Hn({
|
|
|
5157
5212
|
const x = h.current;
|
|
5158
5213
|
if (x) {
|
|
5159
5214
|
if (n === "svelte") {
|
|
5160
|
-
const
|
|
5215
|
+
const D = b.default || b, E = new D({ target: x, props: l || {} });
|
|
5161
5216
|
return C.current = E, () => E.$destroy();
|
|
5162
5217
|
}
|
|
5163
5218
|
if (b.mount) {
|
|
5164
|
-
const
|
|
5219
|
+
const D = b.mount({ container: x, props: l || {} });
|
|
5165
5220
|
return () => {
|
|
5166
|
-
typeof
|
|
5221
|
+
typeof D == "function" ? D() : b.unmount?.(x);
|
|
5167
5222
|
};
|
|
5168
5223
|
}
|
|
5169
5224
|
}
|
|
@@ -5175,7 +5230,7 @@ function Hn({
|
|
|
5175
5230
|
n === "react" && !m && b && /* @__PURE__ */ e(b, { ...l })
|
|
5176
5231
|
] });
|
|
5177
5232
|
}
|
|
5178
|
-
class
|
|
5233
|
+
class Gn extends gt {
|
|
5179
5234
|
constructor() {
|
|
5180
5235
|
super(...arguments), this.state = {
|
|
5181
5236
|
hasError: !1,
|
|
@@ -5204,69 +5259,71 @@ class Vn extends xt {
|
|
|
5204
5259
|
}
|
|
5205
5260
|
}
|
|
5206
5261
|
export {
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5262
|
+
En as AssistantCard,
|
|
5263
|
+
Dr as Avatar,
|
|
5264
|
+
Mn as AvatarStack,
|
|
5265
|
+
yn as Badge,
|
|
5266
|
+
Ge as Box,
|
|
5212
5267
|
ne as Button,
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5268
|
+
un as ButtonGroup,
|
|
5269
|
+
Wn as Card,
|
|
5270
|
+
$n as ChannelBadge,
|
|
5216
5271
|
pe as Checkbox,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5272
|
+
Un as CommandPalette,
|
|
5273
|
+
vn as ConfirmDialog,
|
|
5274
|
+
Jt as ContentLoading,
|
|
5220
5275
|
$e as DatePicker,
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5276
|
+
Yt as Dropdown,
|
|
5277
|
+
Nn as EmptyState,
|
|
5278
|
+
Gn as ErrorBoundary,
|
|
5279
|
+
Kn as FederatedResource,
|
|
5280
|
+
mn as FilterChip,
|
|
5281
|
+
Vt as FolderSelect,
|
|
5282
|
+
gn as Form,
|
|
5283
|
+
qn as Heading,
|
|
5229
5284
|
Y as Icon,
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5285
|
+
Dn as Image,
|
|
5286
|
+
wn as Kbd,
|
|
5287
|
+
Ln as KpiCard,
|
|
5288
|
+
fn as Link,
|
|
5289
|
+
_n as List,
|
|
5290
|
+
Tn as ListBulkAction,
|
|
5291
|
+
on as MeetingGrid,
|
|
5292
|
+
An as MessageBubble,
|
|
5293
|
+
We as Modal,
|
|
5294
|
+
In as PageHeader,
|
|
5295
|
+
jn as PageToolbar,
|
|
5296
|
+
cn as ParticipantTile,
|
|
5297
|
+
_t as Popover,
|
|
5298
|
+
kn as ProgressBar,
|
|
5299
|
+
Pn as RichText,
|
|
5300
|
+
Kt as SearchableTextField,
|
|
5301
|
+
On as SectionDivider,
|
|
5302
|
+
hn as SegmentedToggle,
|
|
5303
|
+
we as Select,
|
|
5304
|
+
Fn as SettingsRow,
|
|
5305
|
+
Bn as SettingsSection,
|
|
5306
|
+
Vn as SidebarMenu,
|
|
5307
|
+
Rn as SourceChip,
|
|
5308
|
+
Cn as Spinner,
|
|
5253
5309
|
Re as SplitButton,
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5310
|
+
Sn as StatusDot,
|
|
5311
|
+
zn as StepIndicator,
|
|
5312
|
+
hr as StorageInput,
|
|
5313
|
+
Gt as Switch,
|
|
5314
|
+
pn as TabBar,
|
|
5259
5315
|
Pe as Table,
|
|
5260
|
-
|
|
5316
|
+
lr as Tabs,
|
|
5261
5317
|
de as Text,
|
|
5262
5318
|
De as TextArea,
|
|
5263
5319
|
be as TextField,
|
|
5264
|
-
|
|
5265
|
-
|
|
5320
|
+
dn as VideoSurface,
|
|
5321
|
+
Hn as View,
|
|
5322
|
+
ln as catTone,
|
|
5266
5323
|
d as cn,
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5324
|
+
an as createSizes,
|
|
5325
|
+
sn as createVariants,
|
|
5326
|
+
xn as dateFilterHandler,
|
|
5327
|
+
bn as selectFilterHandler
|
|
5271
5328
|
};
|
|
5272
5329
|
//# sourceMappingURL=index.js.map
|