@opencxh/ui-kit 3.136.1 → 3.136.3
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 +713 -650
- 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/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 Ke } 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 Ge, User as Je, MicOff as Ye, Mic as Xe, X as ge, ChevronDown as ve, ExternalLink as Ze, Calendar as Qe, ChevronLeft as ke, ChevronRight as Ce, ChevronDownIcon as et, Loader2 as tt, Search as Se, Check as Te, ChevronUp as rt, ChevronsLeft as nt, ChevronsRight as st, FileText as Ee, HardDrive as _e, ArrowLeft as at, FolderPlus as lt, Upload as ot, Folder as Ae, Trash2 as ct, Plus as it, Sparkles as dt, ImageOff as ut, Pencil as mt, ArrowUpRight as ft } from "lucide-react";
|
|
4
|
+
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as R, useLayoutEffect as ht, useMemo as he, useCallback as ue, createContext as xt, Component as bt } from "react";
|
|
5
|
+
import pt from "dompurify";
|
|
6
|
+
import gt from "react-markdown";
|
|
7
|
+
import vt from "remark-gfm";
|
|
8
8
|
function d(...t) {
|
|
9
|
-
return
|
|
9
|
+
return Ke(t);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function rn(t) {
|
|
12
12
|
return (r, n) => t[r]?.[n] || "";
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function nn(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 sn(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 an({ 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 ln({
|
|
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(Ge, { className: "w-8 h-8" }) : /* @__PURE__ */ e(Je, { 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(Ye, { className: "w-3 h-3" }) : /* @__PURE__ */ e(Xe, { 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 on({ 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 yt = {
|
|
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
|
+
}, Nt = {
|
|
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
|
+
}, wt = {
|
|
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
|
+
yt[t],
|
|
142
|
+
o ? wt[r] : Nt[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 cn = ({
|
|
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
|
+
}, kt = {
|
|
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 : Ct(r), N = d(
|
|
213
219
|
"inline-block shrink-0",
|
|
214
|
-
|
|
220
|
+
kt[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 Ct(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 St = {
|
|
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 dn({
|
|
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" : St[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 zt = {
|
|
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
|
+
}, Et = {
|
|
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
|
+
}, Mt = {
|
|
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
|
+
}, un = ({
|
|
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
|
+
zt[r],
|
|
347
|
+
!s && Et[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
|
+
Mt[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(Ze, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
360
366
|
] });
|
|
361
|
-
},
|
|
367
|
+
}, $t = {
|
|
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 mn({
|
|
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
|
+
$t[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 ht(() => {
|
|
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 Dt = ({
|
|
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
|
+
}, Tt = {
|
|
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
|
+
}, _t = {
|
|
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
|
+
Dt,
|
|
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
|
+
Tt[n],
|
|
531
|
+
_t[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 At = {
|
|
556
562
|
sm: "size-checkbox-sm",
|
|
557
563
|
md: "size-checkbox",
|
|
558
564
|
lg: "size-checkbox-lg",
|
|
559
565
|
full: "size-checkbox"
|
|
560
|
-
},
|
|
566
|
+
}, Lt = {
|
|
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
|
+
}, It = {
|
|
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", Lt[s]), children: [
|
|
593
599
|
/* @__PURE__ */ e(
|
|
594
600
|
"input",
|
|
595
601
|
{
|
|
@@ -604,7 +610,7 @@ const _t = {
|
|
|
604
610
|
"transition-colors duration-fast ease-out",
|
|
605
611
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
606
612
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
607
|
-
|
|
613
|
+
At[s],
|
|
608
614
|
p ? "border-danger-border" : "border-border-strong",
|
|
609
615
|
h
|
|
610
616
|
),
|
|
@@ -619,7 +625,7 @@ const _t = {
|
|
|
619
625
|
className: d(
|
|
620
626
|
"cursor-pointer",
|
|
621
627
|
p ? "text-danger-fg" : "text-text",
|
|
622
|
-
|
|
628
|
+
It[s],
|
|
623
629
|
o
|
|
624
630
|
),
|
|
625
631
|
children: t
|
|
@@ -633,7 +639,7 @@ const _t = {
|
|
|
633
639
|
}
|
|
634
640
|
);
|
|
635
641
|
pe.displayName = "Checkbox";
|
|
636
|
-
const
|
|
642
|
+
const jt = () => /* @__PURE__ */ e(Y, { icon: Qe, size: "md", color: "current" }), Pt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Ot = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), $e = me(({
|
|
637
643
|
value: t,
|
|
638
644
|
onChange: r,
|
|
639
645
|
placeholder: n = "Select date",
|
|
@@ -646,7 +652,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
646
652
|
format: N = "MM/dd/yyyy",
|
|
647
653
|
withTime: m = !1
|
|
648
654
|
}, f) => {
|
|
649
|
-
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null),
|
|
655
|
+
const [b, p] = R(!1), [C, g] = R(() => t || /* @__PURE__ */ new Date()), x = se(null), D = se(null), E = ze(b, D);
|
|
650
656
|
Q(() => {
|
|
651
657
|
const i = (S) => {
|
|
652
658
|
x.current && !x.current.contains(S.target) && p(!1);
|
|
@@ -658,8 +664,8 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
658
664
|
const W = (i) => {
|
|
659
665
|
if (!i) return "";
|
|
660
666
|
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
|
-
},
|
|
667
|
+
return m ? `${w} ${T(i)}` : w;
|
|
668
|
+
}, T = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, X = (i) => {
|
|
663
669
|
const [S, y] = i.split(":").map(Number);
|
|
664
670
|
if (Number.isNaN(S) || Number.isNaN(y)) return;
|
|
665
671
|
const A = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
@@ -686,7 +692,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
686
692
|
g(new Date(C.getFullYear(), C.getMonth() + 1, 1));
|
|
687
693
|
}, re = () => {
|
|
688
694
|
r?.(null), p(!1);
|
|
689
|
-
},
|
|
695
|
+
}, P = d(
|
|
690
696
|
"w-full border border-border rounded-md transition-colors duration-fast",
|
|
691
697
|
"bg-surface text-text",
|
|
692
698
|
"placeholder:text-text-muted",
|
|
@@ -714,7 +720,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
714
720
|
"December"
|
|
715
721
|
];
|
|
716
722
|
return /* @__PURE__ */ c("div", { ref: x, className: "relative", children: [
|
|
717
|
-
/* @__PURE__ */ c("div", { ref:
|
|
723
|
+
/* @__PURE__ */ c("div", { ref: D, className: "relative", children: [
|
|
718
724
|
/* @__PURE__ */ e(
|
|
719
725
|
"input",
|
|
720
726
|
{
|
|
@@ -726,7 +732,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
726
732
|
required: a,
|
|
727
733
|
readOnly: !0,
|
|
728
734
|
onClick: () => !s && p(!b),
|
|
729
|
-
className: d(
|
|
735
|
+
className: d(P, "pr-10 cursor-pointer")
|
|
730
736
|
}
|
|
731
737
|
),
|
|
732
738
|
/* @__PURE__ */ e(
|
|
@@ -736,7 +742,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
736
742
|
onClick: () => !s && p(!b),
|
|
737
743
|
disabled: s,
|
|
738
744
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
739
|
-
children: /* @__PURE__ */ e(
|
|
745
|
+
children: /* @__PURE__ */ e(jt, {})
|
|
740
746
|
}
|
|
741
747
|
)
|
|
742
748
|
] }),
|
|
@@ -760,7 +766,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
760
766
|
{
|
|
761
767
|
onClick: K,
|
|
762
768
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
763
|
-
children: /* @__PURE__ */ e(
|
|
769
|
+
children: /* @__PURE__ */ e(Ot, {})
|
|
764
770
|
}
|
|
765
771
|
)
|
|
766
772
|
] }),
|
|
@@ -793,7 +799,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
793
799
|
{
|
|
794
800
|
id: "datepicker-time",
|
|
795
801
|
type: "time",
|
|
796
|
-
value: t ?
|
|
802
|
+
value: t ? T(t) : "",
|
|
797
803
|
onChange: (i) => X(i.target.value),
|
|
798
804
|
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
805
|
}
|
|
@@ -819,12 +825,12 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
819
825
|
] })
|
|
820
826
|
] })
|
|
821
827
|
] });
|
|
822
|
-
}),
|
|
828
|
+
}), Ft = {
|
|
823
829
|
sm: "h-control-sm px-3 text-sm",
|
|
824
830
|
md: "h-control-md px-3 text-sm",
|
|
825
831
|
lg: "h-control-lg px-3 text-base",
|
|
826
832
|
full: "h-control-md w-full px-3 text-sm"
|
|
827
|
-
},
|
|
833
|
+
}, Ne = (t) => t.trim().toLowerCase(), we = me(
|
|
828
834
|
({
|
|
829
835
|
label: t,
|
|
830
836
|
helperText: r,
|
|
@@ -843,42 +849,42 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
843
849
|
value: C,
|
|
844
850
|
onChange: g,
|
|
845
851
|
allowCreate: x,
|
|
846
|
-
onCreateOption:
|
|
852
|
+
onCreateOption: D,
|
|
847
853
|
...E
|
|
848
854
|
}, W) => {
|
|
849
|
-
const
|
|
855
|
+
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
856
|
oe.useImperativeHandle(W, () => re.current), oe.useEffect(() => {
|
|
851
|
-
const M = (
|
|
852
|
-
re.current && !re.current.contains(
|
|
857
|
+
const M = (_) => {
|
|
858
|
+
re.current && !re.current.contains(_.target) && I(!1);
|
|
853
859
|
};
|
|
854
860
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
855
861
|
}, []);
|
|
856
862
|
const S = oe.useCallback(
|
|
857
|
-
(M,
|
|
858
|
-
(z) =>
|
|
863
|
+
(M, _) => M.some(
|
|
864
|
+
(z) => Ne(z.value) === Ne(_) || Ne(z.label) === Ne(_)
|
|
859
865
|
),
|
|
860
866
|
[]
|
|
861
867
|
), y = oe.useCallback(
|
|
862
|
-
(M,
|
|
863
|
-
const z = [...M],
|
|
864
|
-
const
|
|
865
|
-
|
|
868
|
+
(M, _) => {
|
|
869
|
+
const z = [...M], H = (B) => {
|
|
870
|
+
const O = (B ?? "").trim();
|
|
871
|
+
O && (S(z, O) || z.push({ value: O, label: O }));
|
|
866
872
|
};
|
|
867
|
-
return Array.isArray(
|
|
873
|
+
return Array.isArray(_) ? _.forEach(H) : H(_), z;
|
|
868
874
|
},
|
|
869
875
|
[S]
|
|
870
876
|
);
|
|
871
877
|
oe.useEffect(() => {
|
|
872
878
|
i((M) => {
|
|
873
|
-
const
|
|
879
|
+
const _ = [...o];
|
|
874
880
|
return M.forEach((z) => {
|
|
875
|
-
!S(
|
|
876
|
-
}), y(
|
|
881
|
+
!S(_, z.value) && !S(_, z.label) && _.push(z);
|
|
882
|
+
}), y(_, C);
|
|
877
883
|
});
|
|
878
884
|
}, [o, C, y, S]);
|
|
879
885
|
const A = (M) => {
|
|
880
886
|
if (p) {
|
|
881
|
-
const
|
|
887
|
+
const _ = Array.isArray(C) ? C : [], z = _.includes(M) ? _.filter((H) => H !== M) : [..._, M];
|
|
882
888
|
g?.(z);
|
|
883
889
|
} else
|
|
884
890
|
g?.(M), I(!1), K("");
|
|
@@ -887,18 +893,18 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
887
893
|
) : [], ae = b && q ? k.filter(
|
|
888
894
|
(M) => M.label.toLowerCase().includes(q.toLowerCase())
|
|
889
895
|
) : k, le = !!x && !!b && !!q.trim() && !S(k, q), G = (M) => {
|
|
890
|
-
const
|
|
891
|
-
if (!
|
|
892
|
-
const z =
|
|
893
|
-
value:
|
|
894
|
-
label:
|
|
896
|
+
const _ = M.trim();
|
|
897
|
+
if (!_) return;
|
|
898
|
+
const z = D?.(_) ?? {
|
|
899
|
+
value: _,
|
|
900
|
+
label: _
|
|
895
901
|
};
|
|
896
902
|
if (S(k, z.value) || S(k, z.label)) {
|
|
897
903
|
A(z.value), K(""), p || I(!1);
|
|
898
904
|
return;
|
|
899
905
|
}
|
|
900
|
-
i((
|
|
901
|
-
},
|
|
906
|
+
i((H) => [...H, z]), A(z.value), K(""), p || I(!1);
|
|
907
|
+
}, j = () => p ? ee.length > 0 ? ee.map((M) => M.label).join(", ") : h || "Select options" : w?.label || h || "Select an option";
|
|
902
908
|
return /* @__PURE__ */ c(
|
|
903
909
|
"div",
|
|
904
910
|
{
|
|
@@ -913,7 +919,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
913
919
|
t && /* @__PURE__ */ e(
|
|
914
920
|
"label",
|
|
915
921
|
{
|
|
916
|
-
htmlFor:
|
|
922
|
+
htmlFor: T,
|
|
917
923
|
onClick: () => I(!U),
|
|
918
924
|
className: d(
|
|
919
925
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
@@ -927,9 +933,9 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
927
933
|
/* @__PURE__ */ c(
|
|
928
934
|
"button",
|
|
929
935
|
{
|
|
930
|
-
ref:
|
|
936
|
+
ref: P,
|
|
931
937
|
type: "button",
|
|
932
|
-
id:
|
|
938
|
+
id: T,
|
|
933
939
|
disabled: l,
|
|
934
940
|
onClick: () => I(!U),
|
|
935
941
|
className: d(
|
|
@@ -937,14 +943,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
937
943
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
938
944
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
939
945
|
"bg-surface",
|
|
940
|
-
|
|
946
|
+
Ft[s],
|
|
941
947
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
942
948
|
m
|
|
943
949
|
),
|
|
944
950
|
children: [
|
|
945
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children:
|
|
951
|
+
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: j() }),
|
|
946
952
|
/* @__PURE__ */ e(
|
|
947
|
-
|
|
953
|
+
et,
|
|
948
954
|
{
|
|
949
955
|
size: 16,
|
|
950
956
|
className: d(
|
|
@@ -1000,7 +1006,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1000
1006
|
}
|
|
1001
1007
|
),
|
|
1002
1008
|
ae.map((M) => {
|
|
1003
|
-
const
|
|
1009
|
+
const _ = p ? Array.isArray(C) && C.includes(M.value) : C === M.value;
|
|
1004
1010
|
return /* @__PURE__ */ e(
|
|
1005
1011
|
"li",
|
|
1006
1012
|
{
|
|
@@ -1009,14 +1015,14 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1009
1015
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1010
1016
|
"text-text",
|
|
1011
1017
|
M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1012
|
-
|
|
1018
|
+
_ && "bg-accent-soft text-accent font-semibold"
|
|
1013
1019
|
),
|
|
1014
1020
|
children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
|
|
1015
1021
|
p && /* @__PURE__ */ e(
|
|
1016
1022
|
"input",
|
|
1017
1023
|
{
|
|
1018
1024
|
type: "checkbox",
|
|
1019
|
-
checked:
|
|
1025
|
+
checked: _,
|
|
1020
1026
|
readOnly: !0,
|
|
1021
1027
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1022
1028
|
}
|
|
@@ -1045,13 +1051,13 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1045
1051
|
);
|
|
1046
1052
|
}
|
|
1047
1053
|
);
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1054
|
+
we.displayName = "Select";
|
|
1055
|
+
const Bt = {
|
|
1050
1056
|
sm: "h-control-sm px-3 text-sm",
|
|
1051
1057
|
md: "h-control-md px-3 text-base",
|
|
1052
1058
|
lg: "h-control-lg px-3 text-base",
|
|
1053
1059
|
full: "h-control-md px-3 text-base"
|
|
1054
|
-
},
|
|
1060
|
+
}, He = "mb-1.5 block text-xs font-semibold uppercase tracking-label", be = me(
|
|
1055
1061
|
({
|
|
1056
1062
|
label: t,
|
|
1057
1063
|
helperText: r,
|
|
@@ -1067,14 +1073,14 @@ const Ft = {
|
|
|
1067
1073
|
id: f,
|
|
1068
1074
|
...b
|
|
1069
1075
|
}, p) => {
|
|
1070
|
-
const C = oe.useId(), g = f || `textfield-${C}`, x = !!n,
|
|
1076
|
+
const C = oe.useId(), g = f || `textfield-${C}`, x = !!n, D = n || r ? `${g}-description` : void 0;
|
|
1071
1077
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", u), children: [
|
|
1072
1078
|
t && /* @__PURE__ */ e(
|
|
1073
1079
|
"label",
|
|
1074
1080
|
{
|
|
1075
1081
|
htmlFor: g,
|
|
1076
1082
|
className: d(
|
|
1077
|
-
|
|
1083
|
+
He,
|
|
1078
1084
|
x ? "text-danger-fg" : "text-text-subtle",
|
|
1079
1085
|
N
|
|
1080
1086
|
),
|
|
@@ -1089,14 +1095,14 @@ const Ft = {
|
|
|
1089
1095
|
ref: p,
|
|
1090
1096
|
id: g,
|
|
1091
1097
|
"aria-invalid": x || void 0,
|
|
1092
|
-
"aria-describedby":
|
|
1098
|
+
"aria-describedby": D,
|
|
1093
1099
|
className: d(
|
|
1094
1100
|
"block w-full rounded-md border bg-surface-input text-text",
|
|
1095
1101
|
"transition-colors duration-fast ease-out",
|
|
1096
1102
|
"placeholder:text-text-subtle",
|
|
1097
1103
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1098
1104
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1099
|
-
|
|
1105
|
+
Bt[s],
|
|
1100
1106
|
l && "pl-9",
|
|
1101
1107
|
(o || h) && "pr-9",
|
|
1102
1108
|
x ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
@@ -1116,7 +1122,7 @@ const Ft = {
|
|
|
1116
1122
|
(n || r) && /* @__PURE__ */ e(
|
|
1117
1123
|
"p",
|
|
1118
1124
|
{
|
|
1119
|
-
id:
|
|
1125
|
+
id: D,
|
|
1120
1126
|
className: d("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
|
|
1121
1127
|
children: n || r
|
|
1122
1128
|
}
|
|
@@ -1148,7 +1154,7 @@ function Rt({
|
|
|
1148
1154
|
const m = t ?? {};
|
|
1149
1155
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
1150
1156
|
/* @__PURE__ */ e(
|
|
1151
|
-
|
|
1157
|
+
we,
|
|
1152
1158
|
{
|
|
1153
1159
|
size: a,
|
|
1154
1160
|
fullWidth: !0,
|
|
@@ -1170,7 +1176,7 @@ function Rt({
|
|
|
1170
1176
|
)
|
|
1171
1177
|
] });
|
|
1172
1178
|
}
|
|
1173
|
-
const fe = (...t) => t.filter(Boolean).join(" "),
|
|
1179
|
+
const fe = (...t) => t.filter(Boolean).join(" "), Ht = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Vt = (t) => /* @__PURE__ */ e(ve, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), qt = {
|
|
1174
1180
|
sm: "h-control-sm px-3 text-sm",
|
|
1175
1181
|
md: "h-control-md px-3 text-base",
|
|
1176
1182
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1180,14 +1186,14 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1180
1186
|
md: "h-5 w-5",
|
|
1181
1187
|
lg: "h-6 w-6",
|
|
1182
1188
|
full: "h-6 w-6"
|
|
1183
|
-
},
|
|
1189
|
+
}, Ut = me(
|
|
1184
1190
|
({
|
|
1185
1191
|
label: t,
|
|
1186
1192
|
helperText: r,
|
|
1187
1193
|
error: n,
|
|
1188
1194
|
size: s = "md",
|
|
1189
1195
|
fullWidth: a = !1,
|
|
1190
|
-
startIcon: l = /* @__PURE__ */ e(
|
|
1196
|
+
startIcon: l = /* @__PURE__ */ e(Ht, {}),
|
|
1191
1197
|
loading: o = !1,
|
|
1192
1198
|
containerClassName: h,
|
|
1193
1199
|
labelClassName: u,
|
|
@@ -1199,18 +1205,18 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1199
1205
|
debounceTime: C = 500,
|
|
1200
1206
|
showAllOnOpen: g = !1,
|
|
1201
1207
|
value: x,
|
|
1202
|
-
onChange:
|
|
1208
|
+
onChange: D,
|
|
1203
1209
|
...E
|
|
1204
1210
|
}, W) => {
|
|
1205
|
-
const
|
|
1211
|
+
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
1212
|
Q(() => {
|
|
1207
1213
|
x !== void 0 && K(x);
|
|
1208
1214
|
}, [x]);
|
|
1209
1215
|
const y = he(() => {
|
|
1210
1216
|
if (g && !i || !q) return f;
|
|
1211
|
-
const
|
|
1217
|
+
const j = String(q).toLowerCase();
|
|
1212
1218
|
return f.filter(
|
|
1213
|
-
(M) => String(M.label).toLowerCase().includes(
|
|
1219
|
+
(M) => String(M.label).toLowerCase().includes(j)
|
|
1214
1220
|
);
|
|
1215
1221
|
}, [q, f, g, i]);
|
|
1216
1222
|
Q(() => {
|
|
@@ -1218,7 +1224,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1218
1224
|
k(!1);
|
|
1219
1225
|
return;
|
|
1220
1226
|
}
|
|
1221
|
-
const
|
|
1227
|
+
const j = setTimeout(async () => {
|
|
1222
1228
|
k(!0);
|
|
1223
1229
|
try {
|
|
1224
1230
|
await b(String(q));
|
|
@@ -1229,21 +1235,21 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1229
1235
|
}
|
|
1230
1236
|
}, C);
|
|
1231
1237
|
return () => {
|
|
1232
|
-
clearTimeout(
|
|
1238
|
+
clearTimeout(j), k(!1);
|
|
1233
1239
|
};
|
|
1234
1240
|
}, [q, C, b]), Q(() => {
|
|
1235
|
-
const
|
|
1236
|
-
U.current && !U.current.contains(M.target) &&
|
|
1241
|
+
const j = (M) => {
|
|
1242
|
+
U.current && !U.current.contains(M.target) && P(!1);
|
|
1237
1243
|
};
|
|
1238
|
-
return document.addEventListener("mousedown",
|
|
1244
|
+
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1239
1245
|
}, []);
|
|
1240
|
-
const A = (
|
|
1241
|
-
const M =
|
|
1242
|
-
K(M),
|
|
1243
|
-
}, w = (
|
|
1244
|
-
K(
|
|
1246
|
+
const A = (j) => {
|
|
1247
|
+
const M = j.target.value;
|
|
1248
|
+
K(M), P(!0), S(!0), D && D(j);
|
|
1249
|
+
}, w = (j) => {
|
|
1250
|
+
K(j.label), P(!1), S(!1), p && p(j.value);
|
|
1245
1251
|
}, ee = () => {
|
|
1246
|
-
(f.length > 0 || b) && (
|
|
1252
|
+
(f.length > 0 || b) && (P(!0), S(!1));
|
|
1247
1253
|
}, ae = o || ce, le = re && (y.length > 0 || ae), G = he(() => W || I, [W]);
|
|
1248
1254
|
return /* @__PURE__ */ c(
|
|
1249
1255
|
"div",
|
|
@@ -1259,7 +1265,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1259
1265
|
t && /* @__PURE__ */ e(
|
|
1260
1266
|
"label",
|
|
1261
1267
|
{
|
|
1262
|
-
htmlFor:
|
|
1268
|
+
htmlFor: T,
|
|
1263
1269
|
className: fe(
|
|
1264
1270
|
"block text-sm font-medium mb-1",
|
|
1265
1271
|
X ? "text-danger-fg" : "text-text",
|
|
@@ -1274,7 +1280,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1274
1280
|
"input",
|
|
1275
1281
|
{
|
|
1276
1282
|
ref: G,
|
|
1277
|
-
id:
|
|
1283
|
+
id: T,
|
|
1278
1284
|
value: q,
|
|
1279
1285
|
onChange: A,
|
|
1280
1286
|
onFocus: ee,
|
|
@@ -1284,7 +1290,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1284
1290
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1285
1291
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1286
1292
|
// Size styles
|
|
1287
|
-
|
|
1293
|
+
qt[s],
|
|
1288
1294
|
// Icon padding
|
|
1289
1295
|
l ? "pl-10" : "",
|
|
1290
1296
|
"pr-10",
|
|
@@ -1299,7 +1305,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1299
1305
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || o ? (
|
|
1300
1306
|
// Loading Spinner
|
|
1301
1307
|
/* @__PURE__ */ e(
|
|
1302
|
-
|
|
1308
|
+
tt,
|
|
1303
1309
|
{
|
|
1304
1310
|
className: fe("animate-spin text-info-fg", Me[s]),
|
|
1305
1311
|
"aria-hidden": !0
|
|
@@ -1308,7 +1314,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1308
1314
|
) : (
|
|
1309
1315
|
// Dropdown Chevron
|
|
1310
1316
|
/* @__PURE__ */ e(
|
|
1311
|
-
|
|
1317
|
+
Vt,
|
|
1312
1318
|
{
|
|
1313
1319
|
className: fe(
|
|
1314
1320
|
"text-text-muted cursor-pointer transition-transform",
|
|
@@ -1316,7 +1322,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1316
1322
|
re ? "rotate-180" : "rotate-0"
|
|
1317
1323
|
),
|
|
1318
1324
|
onClick: () => {
|
|
1319
|
-
|
|
1325
|
+
P((j) => (j || S(!1), !j));
|
|
1320
1326
|
}
|
|
1321
1327
|
}
|
|
1322
1328
|
)
|
|
@@ -1327,16 +1333,16 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1327
1333
|
{
|
|
1328
1334
|
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
1335
|
role: "listbox",
|
|
1330
|
-
children: y.length > 0 ? y.map((
|
|
1336
|
+
children: y.length > 0 ? y.map((j) => /* @__PURE__ */ e(
|
|
1331
1337
|
"li",
|
|
1332
1338
|
{
|
|
1333
1339
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1334
|
-
onClick: () => w(
|
|
1340
|
+
onClick: () => w(j),
|
|
1335
1341
|
role: "option",
|
|
1336
|
-
"aria-selected": q ===
|
|
1337
|
-
children:
|
|
1342
|
+
"aria-selected": q === j.label,
|
|
1343
|
+
children: j.label
|
|
1338
1344
|
},
|
|
1339
|
-
|
|
1345
|
+
j.value
|
|
1340
1346
|
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ae || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
1341
1347
|
}
|
|
1342
1348
|
),
|
|
@@ -1359,8 +1365,8 @@ const fe = (...t) => t.filter(Boolean).join(" "), Bt = (t) => /* @__PURE__ */ e(
|
|
|
1359
1365
|
);
|
|
1360
1366
|
}
|
|
1361
1367
|
);
|
|
1362
|
-
|
|
1363
|
-
const
|
|
1368
|
+
Ut.displayName = "SearchableTextField";
|
|
1369
|
+
const Wt = me(
|
|
1364
1370
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
1365
1371
|
const h = /* @__PURE__ */ e(
|
|
1366
1372
|
"span",
|
|
@@ -1413,8 +1419,8 @@ const Ut = me(
|
|
|
1413
1419
|
);
|
|
1414
1420
|
}
|
|
1415
1421
|
);
|
|
1416
|
-
|
|
1417
|
-
function
|
|
1422
|
+
Wt.displayName = "Switch";
|
|
1423
|
+
function Kt({
|
|
1418
1424
|
variant: t = "page",
|
|
1419
1425
|
children: r,
|
|
1420
1426
|
showTableSkeleton: n = !1,
|
|
@@ -1463,7 +1469,7 @@ function Wt({
|
|
|
1463
1469
|
] })
|
|
1464
1470
|
] }) });
|
|
1465
1471
|
}
|
|
1466
|
-
const
|
|
1472
|
+
const Gt = ({
|
|
1467
1473
|
trigger: t,
|
|
1468
1474
|
options: r,
|
|
1469
1475
|
value: n,
|
|
@@ -1474,7 +1480,7 @@ const Kt = ({
|
|
|
1474
1480
|
showCheck: h = !0,
|
|
1475
1481
|
header: u
|
|
1476
1482
|
}) => {
|
|
1477
|
-
const [N, m] = R(!1), [f, b] = R(null), [p, C] = R({ top: 0, left: 0 }), g = se(null), x = se(null),
|
|
1483
|
+
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
1484
|
E.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1479
1485
|
);
|
|
1480
1486
|
Q(() => {
|
|
@@ -1490,14 +1496,14 @@ const Kt = ({
|
|
|
1490
1496
|
};
|
|
1491
1497
|
Q(() => {
|
|
1492
1498
|
const i = (S) => {
|
|
1493
|
-
g.current && (!g.current.contains(S.target) ||
|
|
1499
|
+
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
1500
|
};
|
|
1495
1501
|
return N && document.addEventListener("mousedown", i), () => {
|
|
1496
1502
|
document.removeEventListener("mousedown", i);
|
|
1497
1503
|
};
|
|
1498
1504
|
}, [N]), Q(() => {
|
|
1499
1505
|
const i = (S) => {
|
|
1500
|
-
S.key === "Escape" && (m(!1), b(null), x.current?.focus(),
|
|
1506
|
+
S.key === "Escape" && (m(!1), b(null), x.current?.focus(), T.current && (clearTimeout(T.current), T.current = null));
|
|
1501
1507
|
};
|
|
1502
1508
|
return N && document.addEventListener("keydown", i), () => {
|
|
1503
1509
|
document.removeEventListener("keydown", i);
|
|
@@ -1516,19 +1522,19 @@ const Kt = ({
|
|
|
1516
1522
|
}
|
|
1517
1523
|
}
|
|
1518
1524
|
}, [f]), Q(() => () => {
|
|
1519
|
-
|
|
1525
|
+
T.current && clearTimeout(T.current);
|
|
1520
1526
|
}, []);
|
|
1521
1527
|
const I = (i) => {
|
|
1522
|
-
i.stopPropagation(), !l && (m(!N), b(null),
|
|
1528
|
+
i.stopPropagation(), !l && (m(!N), b(null), T.current && (clearTimeout(T.current), T.current = null));
|
|
1523
1529
|
}, q = (i, S, y) => {
|
|
1524
1530
|
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, y), m(!1), b(null));
|
|
1525
1531
|
}, K = (i) => {
|
|
1526
|
-
|
|
1532
|
+
T.current && (clearTimeout(T.current), T.current = null), i.children && i.children.length > 0 ? b(i.value) : b(null);
|
|
1527
1533
|
}, re = (i) => {
|
|
1528
|
-
i.children && i.children.length > 0 ?
|
|
1534
|
+
i.children && i.children.length > 0 ? T.current = setTimeout(() => {
|
|
1529
1535
|
b(null);
|
|
1530
1536
|
}, 150) : b(null);
|
|
1531
|
-
},
|
|
1537
|
+
}, P = (i, S, y) => {
|
|
1532
1538
|
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, y), m(!1), b(null));
|
|
1533
1539
|
}, ce = d(
|
|
1534
1540
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
@@ -1608,17 +1614,17 @@ const Kt = ({
|
|
|
1608
1614
|
y && A && /* @__PURE__ */ e(
|
|
1609
1615
|
"div",
|
|
1610
1616
|
{
|
|
1611
|
-
ref:
|
|
1617
|
+
ref: D,
|
|
1612
1618
|
className: k,
|
|
1613
1619
|
style: {
|
|
1614
1620
|
top: `${p.top}px`,
|
|
1615
1621
|
left: `${p.left}px`
|
|
1616
1622
|
},
|
|
1617
1623
|
onMouseEnter: () => {
|
|
1618
|
-
|
|
1624
|
+
T.current && (clearTimeout(T.current), T.current = null), b(i.value);
|
|
1619
1625
|
},
|
|
1620
1626
|
onMouseLeave: () => {
|
|
1621
|
-
|
|
1627
|
+
T.current = setTimeout(() => {
|
|
1622
1628
|
b(null);
|
|
1623
1629
|
}, 150);
|
|
1624
1630
|
},
|
|
@@ -1637,7 +1643,7 @@ const Kt = ({
|
|
|
1637
1643
|
return /* @__PURE__ */ c(
|
|
1638
1644
|
"button",
|
|
1639
1645
|
{
|
|
1640
|
-
onClick: (le) =>
|
|
1646
|
+
onClick: (le) => P(
|
|
1641
1647
|
le,
|
|
1642
1648
|
w,
|
|
1643
1649
|
i.value
|
|
@@ -1682,17 +1688,17 @@ const Kt = ({
|
|
|
1682
1688
|
]
|
|
1683
1689
|
}
|
|
1684
1690
|
);
|
|
1685
|
-
},
|
|
1691
|
+
}, fn = (t) => (r) => t(r instanceof Date ? r : null), hn = (t) => (r) => t(typeof r == "string" ? r : ""), Ie = {
|
|
1686
1692
|
none: "pl-0",
|
|
1687
1693
|
sm: "pl-2",
|
|
1688
1694
|
md: "pl-4",
|
|
1689
1695
|
lg: "pl-6"
|
|
1690
|
-
},
|
|
1696
|
+
}, je = {
|
|
1691
1697
|
none: "pr-0",
|
|
1692
1698
|
sm: "pr-2",
|
|
1693
1699
|
md: "pr-4",
|
|
1694
1700
|
lg: "pr-6"
|
|
1695
|
-
},
|
|
1701
|
+
}, Jt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: rt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ve, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Zt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }), tr = () => /* @__PURE__ */ e(Y, { icon: st, size: "md", color: "current" }), Ve = () => /* @__PURE__ */ e(Y, { icon: ve, size: "md", color: "current" }), rr = (t) => {
|
|
1696
1702
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1697
1703
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1698
1704
|
};
|
|
@@ -1711,7 +1717,7 @@ const Kt = ({
|
|
|
1711
1717
|
/* @__PURE__ */ e("span", { className: "text-text", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1712
1718
|
(s) => t.options?.find((a) => a.value === s)?.label
|
|
1713
1719
|
).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(
|
|
1720
|
+
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(Ve, {}) })
|
|
1715
1721
|
] }),
|
|
1716
1722
|
/* @__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
1723
|
t.options?.map((s) => /* @__PURE__ */ e(
|
|
@@ -1757,17 +1763,17 @@ const Kt = ({
|
|
|
1757
1763
|
getRowKey: C = (I, q) => q,
|
|
1758
1764
|
emptyContent: g,
|
|
1759
1765
|
hoverable: x = !0,
|
|
1760
|
-
bordered:
|
|
1766
|
+
bordered: D = !1,
|
|
1761
1767
|
striped: E = !1,
|
|
1762
1768
|
padding: W = "md",
|
|
1763
|
-
className:
|
|
1769
|
+
className: T,
|
|
1764
1770
|
rowClassName: X,
|
|
1765
1771
|
headerBackground: U = !0
|
|
1766
1772
|
}) => {
|
|
1767
1773
|
const [I, q] = R(""), [K, re] = R({
|
|
1768
1774
|
column: null,
|
|
1769
1775
|
direction: null
|
|
1770
|
-
}), [
|
|
1776
|
+
}), [P, ce] = R({
|
|
1771
1777
|
page: 0,
|
|
1772
1778
|
pageSize: u
|
|
1773
1779
|
}), k = se(null), i = he(() => {
|
|
@@ -1776,8 +1782,8 @@ const Kt = ({
|
|
|
1776
1782
|
const V = r.filter(
|
|
1777
1783
|
(J) => J.searchable !== !1
|
|
1778
1784
|
), Z = I.toLowerCase();
|
|
1779
|
-
v = v.filter((J) => V.some((
|
|
1780
|
-
const ie = typeof
|
|
1785
|
+
v = v.filter((J) => V.some((F) => {
|
|
1786
|
+
const ie = typeof F.accessor == "function" ? F.accessor(J) : J[F.accessor];
|
|
1781
1787
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1782
1788
|
}));
|
|
1783
1789
|
}
|
|
@@ -1785,23 +1791,23 @@ const Kt = ({
|
|
|
1785
1791
|
V.value && V.value !== "all" && (v = v.filter((Z) => {
|
|
1786
1792
|
const J = r.find((ie) => ie.id === V.id);
|
|
1787
1793
|
if (!J) return !0;
|
|
1788
|
-
const
|
|
1789
|
-
return String(
|
|
1794
|
+
const F = typeof J.accessor == "function" ? J.accessor(Z) : Z[J.accessor];
|
|
1795
|
+
return String(F || "") === V.value;
|
|
1790
1796
|
}));
|
|
1791
1797
|
}), v;
|
|
1792
1798
|
}, [t, I, r, s, l]), S = he(() => {
|
|
1793
1799
|
if (!K.column || !K.direction) return i;
|
|
1794
1800
|
const v = r.find((V) => V.id === K.column);
|
|
1795
1801
|
return v ? [...i].sort((V, Z) => {
|
|
1796
|
-
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor],
|
|
1802
|
+
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor], F = typeof v.accessor == "function" ? v.accessor(Z) : Z[v.accessor];
|
|
1797
1803
|
let ie = 0;
|
|
1798
|
-
return J <
|
|
1804
|
+
return J < F ? ie = -1 : J > F && (ie = 1), K.direction === "desc" ? -ie : ie;
|
|
1799
1805
|
}) : i;
|
|
1800
1806
|
}, [i, K, r]), y = he(() => {
|
|
1801
1807
|
if (!o) return S;
|
|
1802
|
-
const v =
|
|
1808
|
+
const v = P.page * P.pageSize, V = v + P.pageSize;
|
|
1803
1809
|
return S.slice(v, V);
|
|
1804
|
-
}, [S,
|
|
1810
|
+
}, [S, P, o]), A = ue(
|
|
1805
1811
|
(v) => {
|
|
1806
1812
|
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
1813
|
},
|
|
@@ -1814,8 +1820,8 @@ const Kt = ({
|
|
|
1814
1820
|
(v, V) => {
|
|
1815
1821
|
if (!p) return;
|
|
1816
1822
|
const Z = C(v, 0);
|
|
1817
|
-
b.map((J,
|
|
1818
|
-
(J,
|
|
1823
|
+
b.map((J, F) => C(J, F)), p(V ? [...b, v] : b.filter(
|
|
1824
|
+
(J, F) => C(b[F], F) !== Z
|
|
1819
1825
|
));
|
|
1820
1826
|
},
|
|
1821
1827
|
[b, p, C]
|
|
@@ -1830,20 +1836,20 @@ const Kt = ({
|
|
|
1830
1836
|
}, [I, K]), Q(() => {
|
|
1831
1837
|
ce((v) => ({ ...v, page: 0 }));
|
|
1832
1838
|
}, [l.map((v) => v.value).join(",")]);
|
|
1833
|
-
const G = S.length,
|
|
1839
|
+
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
1840
|
const V = C(v, 0);
|
|
1835
1841
|
return b.some(
|
|
1836
1842
|
(Z, J) => C(Z, J) === V
|
|
1837
1843
|
);
|
|
1838
|
-
}),
|
|
1844
|
+
}), H = y.some((v) => {
|
|
1839
1845
|
const V = C(v, 0);
|
|
1840
1846
|
return b.some(
|
|
1841
1847
|
(Z, J) => C(Z, J) === V
|
|
1842
1848
|
);
|
|
1843
|
-
}),
|
|
1849
|
+
}), B = d(
|
|
1844
1850
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1845
|
-
|
|
1846
|
-
),
|
|
1851
|
+
T
|
|
1852
|
+
), O = U ? "bg-surface-sunk border-border border-t" : "bg-surface", $ = d(O, "h-control-lg"), L = d(
|
|
1847
1853
|
"text-text border-b border-border p-2"
|
|
1848
1854
|
), te = d("h-row-lg", {
|
|
1849
1855
|
"hover:bg-surface-sunk": x,
|
|
@@ -1851,28 +1857,28 @@ const Kt = ({
|
|
|
1851
1857
|
});
|
|
1852
1858
|
return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
1853
1859
|
(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(
|
|
1860
|
+
l.map((v) => /* @__PURE__ */ e(rr, { ...v }, v.id)),
|
|
1855
1861
|
/* @__PURE__ */ e("div", { className: "w-full sm:w-auto sm:ml-auto min-w-menu", children: /* @__PURE__ */ e(
|
|
1856
1862
|
be,
|
|
1857
1863
|
{
|
|
1858
1864
|
placeholder: a,
|
|
1859
1865
|
value: I,
|
|
1860
1866
|
onChange: (v) => q(v.target.value),
|
|
1861
|
-
startIcon: /* @__PURE__ */ e(
|
|
1867
|
+
startIcon: /* @__PURE__ */ e(Jt, {}),
|
|
1862
1868
|
className: "max-w-sm"
|
|
1863
1869
|
}
|
|
1864
1870
|
) })
|
|
1865
1871
|
] }) }),
|
|
1866
1872
|
/* @__PURE__ */ c("div", { className: "relative w-full overflow-x-auto min-h-100", children: [
|
|
1867
1873
|
n && /* @__PURE__ */ e("div", { className: "flex items-center justify-center z-10", children: /* @__PURE__ */ e(
|
|
1868
|
-
|
|
1874
|
+
Kt,
|
|
1869
1875
|
{
|
|
1870
1876
|
showTableSkeleton: !0,
|
|
1871
1877
|
tableRows: 10,
|
|
1872
1878
|
tableColumns: r.length
|
|
1873
1879
|
}
|
|
1874
1880
|
) }),
|
|
1875
|
-
/* @__PURE__ */ c("table", { ref: k, className: d(
|
|
1881
|
+
/* @__PURE__ */ c("table", { ref: k, className: d(B, "min-w-full"), children: [
|
|
1876
1882
|
/* @__PURE__ */ e("thead", { className: $, children: /* @__PURE__ */ c("tr", { children: [
|
|
1877
1883
|
f && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1878
1884
|
"input",
|
|
@@ -1880,7 +1886,7 @@ const Kt = ({
|
|
|
1880
1886
|
type: "checkbox",
|
|
1881
1887
|
checked: z,
|
|
1882
1888
|
ref: (v) => {
|
|
1883
|
-
v && (v.indeterminate =
|
|
1889
|
+
v && (v.indeterminate = H && !z);
|
|
1884
1890
|
},
|
|
1885
1891
|
onChange: (v) => le(v.target.checked),
|
|
1886
1892
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
@@ -1898,11 +1904,11 @@ const Kt = ({
|
|
|
1898
1904
|
"text-center": v.align === "center",
|
|
1899
1905
|
"text-right": v.align === "right",
|
|
1900
1906
|
"cursor-pointer select-none": v.sortable,
|
|
1901
|
-
[`sticky left-0 ${
|
|
1902
|
-
[`sticky right-0 ${
|
|
1907
|
+
[`sticky left-0 ${O}`]: v.sticky === "left",
|
|
1908
|
+
[`sticky right-0 ${O}`]: v.sticky === "right"
|
|
1903
1909
|
},
|
|
1904
|
-
V === 0 &&
|
|
1905
|
-
V === r.length - 1 &&
|
|
1910
|
+
V === 0 && Ie[W],
|
|
1911
|
+
V === r.length - 1 && je[W]
|
|
1906
1912
|
),
|
|
1907
1913
|
style: { width: v.width },
|
|
1908
1914
|
onClick: () => v.sortable && A(v.id),
|
|
@@ -1917,13 +1923,13 @@ const Kt = ({
|
|
|
1917
1923
|
),
|
|
1918
1924
|
children: [
|
|
1919
1925
|
/* @__PURE__ */ e(
|
|
1920
|
-
|
|
1926
|
+
Yt,
|
|
1921
1927
|
{
|
|
1922
1928
|
active: K.column === v.id && K.direction === "asc"
|
|
1923
1929
|
}
|
|
1924
1930
|
),
|
|
1925
1931
|
/* @__PURE__ */ e(
|
|
1926
|
-
|
|
1932
|
+
Xt,
|
|
1927
1933
|
{
|
|
1928
1934
|
active: K.column === v.id && K.direction === "desc"
|
|
1929
1935
|
}
|
|
@@ -1949,7 +1955,7 @@ const Kt = ({
|
|
|
1949
1955
|
}
|
|
1950
1956
|
) }) : y.map((v, V) => {
|
|
1951
1957
|
const Z = C(v, V), J = b.some(
|
|
1952
|
-
(
|
|
1958
|
+
(F, ie) => C(F, ie) === Z
|
|
1953
1959
|
);
|
|
1954
1960
|
return /* @__PURE__ */ c(
|
|
1955
1961
|
"tr",
|
|
@@ -1959,8 +1965,8 @@ const Kt = ({
|
|
|
1959
1965
|
{ "bg-accent-soft": J },
|
|
1960
1966
|
X?.(v, V)
|
|
1961
1967
|
),
|
|
1962
|
-
onClick: (
|
|
1963
|
-
|
|
1968
|
+
onClick: (F) => {
|
|
1969
|
+
F.stopPropagation(), m?.(v, V);
|
|
1964
1970
|
},
|
|
1965
1971
|
children: [
|
|
1966
1972
|
f && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
@@ -1968,50 +1974,50 @@ const Kt = ({
|
|
|
1968
1974
|
{
|
|
1969
1975
|
type: "checkbox",
|
|
1970
1976
|
checked: J,
|
|
1971
|
-
onChange: (
|
|
1972
|
-
|
|
1977
|
+
onChange: (F) => {
|
|
1978
|
+
F.stopPropagation(), ae(v, F.target.checked);
|
|
1973
1979
|
},
|
|
1974
1980
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1975
1981
|
}
|
|
1976
1982
|
) }),
|
|
1977
|
-
r.map((
|
|
1978
|
-
const
|
|
1983
|
+
r.map((F, ie) => {
|
|
1984
|
+
const ye = typeof F.accessor == "function" ? F.accessor(v) : v[F.accessor];
|
|
1979
1985
|
return /* @__PURE__ */ e(
|
|
1980
1986
|
"td",
|
|
1981
1987
|
{
|
|
1982
1988
|
className: d(
|
|
1983
1989
|
L,
|
|
1984
1990
|
{
|
|
1985
|
-
"text-left":
|
|
1986
|
-
"text-center":
|
|
1987
|
-
"text-right":
|
|
1988
|
-
"sticky left-0 bg-surface":
|
|
1989
|
-
"sticky right-0 bg-surface":
|
|
1991
|
+
"text-left": F.align === "left" || !F.align,
|
|
1992
|
+
"text-center": F.align === "center",
|
|
1993
|
+
"text-right": F.align === "right",
|
|
1994
|
+
"sticky left-0 bg-surface": F.sticky === "left",
|
|
1995
|
+
"sticky right-0 bg-surface": F.sticky === "right"
|
|
1990
1996
|
},
|
|
1991
|
-
ie === 0 &&
|
|
1992
|
-
ie === r.length - 1 &&
|
|
1997
|
+
ie === 0 && Ie[W],
|
|
1998
|
+
ie === r.length - 1 && je[W]
|
|
1993
1999
|
),
|
|
1994
|
-
children:
|
|
2000
|
+
children: F.cell ? F.cell(ye, v, ie) : String(ye || "")
|
|
1995
2001
|
},
|
|
1996
|
-
|
|
2002
|
+
F.id
|
|
1997
2003
|
);
|
|
1998
2004
|
}),
|
|
1999
2005
|
N.length > 0 && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
2000
|
-
|
|
2006
|
+
Gt,
|
|
2001
2007
|
{
|
|
2002
2008
|
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
2009
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
2004
|
-
/* @__PURE__ */ e(
|
|
2010
|
+
/* @__PURE__ */ e(Ve, {})
|
|
2005
2011
|
] }),
|
|
2006
|
-
options: N.map((
|
|
2007
|
-
value:
|
|
2008
|
-
label:
|
|
2009
|
-
icon:
|
|
2010
|
-
disabled:
|
|
2012
|
+
options: N.map((F) => ({
|
|
2013
|
+
value: F.id,
|
|
2014
|
+
label: F.label,
|
|
2015
|
+
icon: F.icon,
|
|
2016
|
+
disabled: F.disabled?.(v)
|
|
2011
2017
|
})),
|
|
2012
|
-
onSelect: (
|
|
2018
|
+
onSelect: (F) => {
|
|
2013
2019
|
const ie = N.find(
|
|
2014
|
-
(
|
|
2020
|
+
(ye) => ye.id === F
|
|
2015
2021
|
);
|
|
2016
2022
|
ie && ie.onClick(v, V);
|
|
2017
2023
|
},
|
|
@@ -2031,7 +2037,7 @@ const Kt = ({
|
|
|
2031
2037
|
"Showing ",
|
|
2032
2038
|
M,
|
|
2033
2039
|
" to ",
|
|
2034
|
-
|
|
2040
|
+
_,
|
|
2035
2041
|
" of ",
|
|
2036
2042
|
G,
|
|
2037
2043
|
" results"
|
|
@@ -2041,7 +2047,7 @@ const Kt = ({
|
|
|
2041
2047
|
/* @__PURE__ */ e(
|
|
2042
2048
|
"select",
|
|
2043
2049
|
{
|
|
2044
|
-
value:
|
|
2050
|
+
value: P.pageSize,
|
|
2045
2051
|
onChange: (v) => ee(Number(v.target.value)),
|
|
2046
2052
|
className: "h-control-sm w-16 rounded-md border border-border bg-surface-input px-2 text-sm text-text",
|
|
2047
2053
|
children: h.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
|
|
@@ -2056,9 +2062,9 @@ const Kt = ({
|
|
|
2056
2062
|
size: "sm",
|
|
2057
2063
|
variant: "ghost",
|
|
2058
2064
|
onClick: () => w(0),
|
|
2059
|
-
disabled:
|
|
2065
|
+
disabled: P.page === 0,
|
|
2060
2066
|
iconOnly: !0,
|
|
2061
|
-
children: /* @__PURE__ */ e(
|
|
2067
|
+
children: /* @__PURE__ */ e(er, {})
|
|
2062
2068
|
}
|
|
2063
2069
|
),
|
|
2064
2070
|
/* @__PURE__ */ e(
|
|
@@ -2066,27 +2072,27 @@ const Kt = ({
|
|
|
2066
2072
|
{
|
|
2067
2073
|
size: "sm",
|
|
2068
2074
|
variant: "ghost",
|
|
2069
|
-
onClick: () => w(
|
|
2070
|
-
disabled:
|
|
2075
|
+
onClick: () => w(P.page - 1),
|
|
2076
|
+
disabled: P.page === 0,
|
|
2071
2077
|
iconOnly: !0,
|
|
2072
|
-
children: /* @__PURE__ */ e(
|
|
2078
|
+
children: /* @__PURE__ */ e(Zt, {})
|
|
2073
2079
|
}
|
|
2074
2080
|
),
|
|
2075
2081
|
/* @__PURE__ */ c("span", { className: "px-3 py-1 text-sm text-text-muted", children: [
|
|
2076
2082
|
"Page ",
|
|
2077
|
-
|
|
2083
|
+
P.page + 1,
|
|
2078
2084
|
" of ",
|
|
2079
|
-
|
|
2085
|
+
j
|
|
2080
2086
|
] }),
|
|
2081
2087
|
/* @__PURE__ */ e(
|
|
2082
2088
|
ne,
|
|
2083
2089
|
{
|
|
2084
2090
|
size: "sm",
|
|
2085
2091
|
variant: "ghost",
|
|
2086
|
-
onClick: () => w(
|
|
2087
|
-
disabled:
|
|
2092
|
+
onClick: () => w(P.page + 1),
|
|
2093
|
+
disabled: P.page >= j - 1,
|
|
2088
2094
|
iconOnly: !0,
|
|
2089
|
-
children: /* @__PURE__ */ e(
|
|
2095
|
+
children: /* @__PURE__ */ e(Qt, {})
|
|
2090
2096
|
}
|
|
2091
2097
|
),
|
|
2092
2098
|
/* @__PURE__ */ e(
|
|
@@ -2094,16 +2100,16 @@ const Kt = ({
|
|
|
2094
2100
|
{
|
|
2095
2101
|
size: "sm",
|
|
2096
2102
|
variant: "ghost",
|
|
2097
|
-
onClick: () => w(
|
|
2098
|
-
disabled:
|
|
2103
|
+
onClick: () => w(j - 1),
|
|
2104
|
+
disabled: P.page >= j - 1,
|
|
2099
2105
|
iconOnly: !0,
|
|
2100
|
-
children: /* @__PURE__ */ e(
|
|
2106
|
+
children: /* @__PURE__ */ e(tr, {})
|
|
2101
2107
|
}
|
|
2102
2108
|
)
|
|
2103
2109
|
] })
|
|
2104
2110
|
] })
|
|
2105
2111
|
] });
|
|
2106
|
-
},
|
|
2112
|
+
}, nr = xt(null), xn = ({
|
|
2107
2113
|
items: t,
|
|
2108
2114
|
activeTab: r,
|
|
2109
2115
|
onTabChange: n,
|
|
@@ -2135,7 +2141,7 @@ const Kt = ({
|
|
|
2135
2141
|
},
|
|
2136
2142
|
u.id
|
|
2137
2143
|
)) }) });
|
|
2138
|
-
},
|
|
2144
|
+
}, sr = ({
|
|
2139
2145
|
items: t,
|
|
2140
2146
|
defaultTab: r,
|
|
2141
2147
|
activeTab: n,
|
|
@@ -2161,7 +2167,7 @@ const Kt = ({
|
|
|
2161
2167
|
},
|
|
2162
2168
|
o
|
|
2163
2169
|
), C = (g, x) => {
|
|
2164
|
-
const
|
|
2170
|
+
const D = "transition-colors duration-fast font-medium", E = {
|
|
2165
2171
|
"text-xs px-2 py-1": l === "sm",
|
|
2166
2172
|
"text-sm px-3 py-2": l === "md",
|
|
2167
2173
|
"text-base px-4 py-3": l === "lg"
|
|
@@ -2172,7 +2178,7 @@ const Kt = ({
|
|
|
2172
2178
|
"rounded-md": a === "pills",
|
|
2173
2179
|
// Underline variant
|
|
2174
2180
|
"border-b-2 pb-2": a === "underline"
|
|
2175
|
-
},
|
|
2181
|
+
}, T = {
|
|
2176
2182
|
"opacity-50 cursor-not-allowed": g.disabled,
|
|
2177
2183
|
"cursor-pointer": !g.disabled
|
|
2178
2184
|
}, X = x ? {
|
|
@@ -2183,9 +2189,9 @@ const Kt = ({
|
|
|
2183
2189
|
"text-text-muted hover:text-text": a === "pills",
|
|
2184
2190
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2185
2191
|
} : {};
|
|
2186
|
-
return d(
|
|
2192
|
+
return d(D, E, W, T, X, U);
|
|
2187
2193
|
};
|
|
2188
|
-
return /* @__PURE__ */ e(
|
|
2194
|
+
return /* @__PURE__ */ e(nr.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
2189
2195
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2190
2196
|
"button",
|
|
2191
2197
|
{
|
|
@@ -2214,14 +2220,14 @@ const Kt = ({
|
|
|
2214
2220
|
}
|
|
2215
2221
|
)
|
|
2216
2222
|
] }) });
|
|
2217
|
-
},
|
|
2223
|
+
}, ar = {
|
|
2218
2224
|
sm: "max-w-md",
|
|
2219
2225
|
md: "max-w-lg",
|
|
2220
2226
|
lg: "max-w-2xl",
|
|
2221
2227
|
xl: "max-w-4xl",
|
|
2222
2228
|
full: "max-w-full mx-4"
|
|
2223
2229
|
};
|
|
2224
|
-
function
|
|
2230
|
+
function qe({
|
|
2225
2231
|
open: t,
|
|
2226
2232
|
onClose: r,
|
|
2227
2233
|
title: n,
|
|
@@ -2265,7 +2271,7 @@ function Ve({
|
|
|
2265
2271
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2266
2272
|
// 'animate-scale-in',
|
|
2267
2273
|
"focus:outline-none",
|
|
2268
|
-
|
|
2274
|
+
ar[s],
|
|
2269
2275
|
o
|
|
2270
2276
|
),
|
|
2271
2277
|
role: "dialog",
|
|
@@ -2288,7 +2294,7 @@ function Ve({
|
|
|
2288
2294
|
onClick: r,
|
|
2289
2295
|
className: "p-1 text-text-muted hover:text-text transition-colors",
|
|
2290
2296
|
"aria-label": "Close modal",
|
|
2291
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
2297
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "lg", color: "current" })
|
|
2292
2298
|
}
|
|
2293
2299
|
)
|
|
2294
2300
|
] }),
|
|
@@ -2300,19 +2306,19 @@ function Ve({
|
|
|
2300
2306
|
}
|
|
2301
2307
|
) : null;
|
|
2302
2308
|
}
|
|
2303
|
-
const
|
|
2309
|
+
const lr = {
|
|
2304
2310
|
xs: "text-xs",
|
|
2305
2311
|
sm: "text-sm",
|
|
2306
2312
|
md: "text-base",
|
|
2307
2313
|
lg: "text-md",
|
|
2308
2314
|
xl: "text-lg"
|
|
2309
|
-
},
|
|
2315
|
+
}, or = {
|
|
2310
2316
|
light: "font-normal",
|
|
2311
2317
|
normal: "font-normal",
|
|
2312
2318
|
medium: "font-medium",
|
|
2313
2319
|
semibold: "font-semibold",
|
|
2314
2320
|
bold: "font-bold"
|
|
2315
|
-
},
|
|
2321
|
+
}, cr = {
|
|
2316
2322
|
primary: "text-text",
|
|
2317
2323
|
secondary: "text-text-muted",
|
|
2318
2324
|
accent: "text-accent",
|
|
@@ -2323,12 +2329,12 @@ const ar = {
|
|
|
2323
2329
|
neutral: "text-text",
|
|
2324
2330
|
current: "text-current",
|
|
2325
2331
|
muted: "text-text-subtle"
|
|
2326
|
-
},
|
|
2332
|
+
}, ir = {
|
|
2327
2333
|
left: "text-left",
|
|
2328
2334
|
center: "text-center",
|
|
2329
2335
|
right: "text-right",
|
|
2330
2336
|
justify: "text-justify"
|
|
2331
|
-
},
|
|
2337
|
+
}, dr = {
|
|
2332
2338
|
tight: "leading-tight",
|
|
2333
2339
|
normal: "leading-normal",
|
|
2334
2340
|
relaxed: "leading-relaxed"
|
|
@@ -2347,28 +2353,28 @@ const ar = {
|
|
|
2347
2353
|
children: f,
|
|
2348
2354
|
...b
|
|
2349
2355
|
}) => {
|
|
2350
|
-
const p = N ||
|
|
2356
|
+
const p = N || ur(t), C = t === "caption", g = t === "label", x = t === "code", D = d(
|
|
2351
2357
|
"font-sans",
|
|
2352
2358
|
// Variant — caption and label pin their own size/weight
|
|
2353
2359
|
C && "text-xs text-text-subtle",
|
|
2354
2360
|
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2355
2361
|
x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2356
2362
|
// Size — only where the variant does not pin it
|
|
2357
|
-
!C && !g && !x &&
|
|
2363
|
+
!C && !g && !x && lr[r],
|
|
2358
2364
|
// Weight — label owns its weight
|
|
2359
|
-
!g &&
|
|
2360
|
-
|
|
2361
|
-
|
|
2365
|
+
!g && or[n],
|
|
2366
|
+
cr[s],
|
|
2367
|
+
ir[a],
|
|
2362
2368
|
// Line height only overrides the body variant
|
|
2363
|
-
t === "body" &&
|
|
2369
|
+
t === "body" && dr[u],
|
|
2364
2370
|
o && "italic",
|
|
2365
2371
|
h && "underline",
|
|
2366
2372
|
l && "truncate",
|
|
2367
2373
|
m
|
|
2368
2374
|
);
|
|
2369
|
-
return /* @__PURE__ */ e(p, { className:
|
|
2375
|
+
return /* @__PURE__ */ e(p, { className: D, ...b, children: f });
|
|
2370
2376
|
};
|
|
2371
|
-
function
|
|
2377
|
+
function ur(t) {
|
|
2372
2378
|
return {
|
|
2373
2379
|
body: "p",
|
|
2374
2380
|
caption: "span",
|
|
@@ -2376,7 +2382,7 @@ function dr(t) {
|
|
|
2376
2382
|
code: "code"
|
|
2377
2383
|
}[t] || "p";
|
|
2378
2384
|
}
|
|
2379
|
-
const
|
|
2385
|
+
const mr = ({
|
|
2380
2386
|
value: t,
|
|
2381
2387
|
onChange: r,
|
|
2382
2388
|
label: n,
|
|
@@ -2390,7 +2396,7 @@ const ur = ({
|
|
|
2390
2396
|
onDownloadFile: m,
|
|
2391
2397
|
onRegisterFile: f
|
|
2392
2398
|
}) => {
|
|
2393
|
-
const [b, p] = R(!1), [C, g] = R([]), [x,
|
|
2399
|
+
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
2400
|
typeof t == "object" ? t : null
|
|
2395
2401
|
), [ce, k] = R(!1), [i, S] = R(""), y = se(null);
|
|
2396
2402
|
Q(() => {
|
|
@@ -2436,7 +2442,7 @@ const ur = ({
|
|
|
2436
2442
|
providerKey: L.name,
|
|
2437
2443
|
ownerId: "me"
|
|
2438
2444
|
};
|
|
2439
|
-
|
|
2445
|
+
P(V), r(V, v), p(!1);
|
|
2440
2446
|
} catch (te) {
|
|
2441
2447
|
console.error("Local file selection failed", te);
|
|
2442
2448
|
} finally {
|
|
@@ -2457,7 +2463,7 @@ const ur = ({
|
|
|
2457
2463
|
});
|
|
2458
2464
|
if (v?.data) {
|
|
2459
2465
|
const V = v.data;
|
|
2460
|
-
|
|
2466
|
+
P(V), r(V, new Uint8Array(te)), p(!1);
|
|
2461
2467
|
}
|
|
2462
2468
|
} catch (te) {
|
|
2463
2469
|
console.error("Upload failed", te);
|
|
@@ -2490,17 +2496,17 @@ const ur = ({
|
|
|
2490
2496
|
I(!0);
|
|
2491
2497
|
try {
|
|
2492
2498
|
const L = await m?.($.id);
|
|
2493
|
-
|
|
2499
|
+
P($), r($, L), p(!1);
|
|
2494
2500
|
} catch (L) {
|
|
2495
2501
|
console.error("Failed to download file", L);
|
|
2496
2502
|
} finally {
|
|
2497
2503
|
I(!1);
|
|
2498
2504
|
}
|
|
2499
|
-
},
|
|
2500
|
-
$.stopPropagation(),
|
|
2505
|
+
}, j = ($) => {
|
|
2506
|
+
$.stopPropagation(), P(null), r(null);
|
|
2501
2507
|
}, M = he(() => {
|
|
2502
2508
|
const $ = /* @__PURE__ */ new Set(), L = [];
|
|
2503
|
-
return
|
|
2509
|
+
return T.forEach((te) => {
|
|
2504
2510
|
if (te.type === "folder") {
|
|
2505
2511
|
te.path === E && $.add(te.name);
|
|
2506
2512
|
return;
|
|
@@ -2511,12 +2517,12 @@ const ur = ({
|
|
|
2511
2517
|
folders: Array.from($).sort(),
|
|
2512
2518
|
files: L.sort((te, v) => te.name.localeCompare(v.name))
|
|
2513
2519
|
};
|
|
2514
|
-
}, [
|
|
2520
|
+
}, [T, E]), _ = ($) => {
|
|
2515
2521
|
W((L) => `${L}${$}/`);
|
|
2516
2522
|
}, z = () => {
|
|
2517
2523
|
const $ = E.split("/").filter((L) => L !== "");
|
|
2518
2524
|
$.pop(), $.length === 0 ? W("/") : W(`${$.join("/")}/`);
|
|
2519
|
-
},
|
|
2525
|
+
}, H = he(() => {
|
|
2520
2526
|
const $ = M.folders.map((L) => ({
|
|
2521
2527
|
id: `folder-${L}`,
|
|
2522
2528
|
name: L,
|
|
@@ -2528,7 +2534,7 @@ const ur = ({
|
|
|
2528
2534
|
type: "file"
|
|
2529
2535
|
});
|
|
2530
2536
|
}), $;
|
|
2531
|
-
}, [M]),
|
|
2537
|
+
}, [M]), B = [
|
|
2532
2538
|
{
|
|
2533
2539
|
id: "name",
|
|
2534
2540
|
header: "Name",
|
|
@@ -2566,14 +2572,14 @@ const ur = ({
|
|
|
2566
2572
|
size: "sm",
|
|
2567
2573
|
variant: "outline",
|
|
2568
2574
|
onClick: (te) => {
|
|
2569
|
-
te.stopPropagation(), L.type === "folder" ?
|
|
2575
|
+
te.stopPropagation(), L.type === "folder" ? _(L.name) : G(L);
|
|
2570
2576
|
},
|
|
2571
2577
|
loading: U && L.type === "file" && re?.id === L.id,
|
|
2572
2578
|
children: L.type === "folder" ? "Open" : "Select"
|
|
2573
2579
|
}
|
|
2574
2580
|
)
|
|
2575
2581
|
}
|
|
2576
|
-
],
|
|
2582
|
+
], O = [
|
|
2577
2583
|
{
|
|
2578
2584
|
id: "name",
|
|
2579
2585
|
header: "Mount Name",
|
|
@@ -2588,7 +2594,7 @@ const ur = ({
|
|
|
2588
2594
|
header: "",
|
|
2589
2595
|
accessor: "id",
|
|
2590
2596
|
align: "right",
|
|
2591
|
-
cell: ($, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () =>
|
|
2597
|
+
cell: ($, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () => D(L), children: "Open" })
|
|
2592
2598
|
}
|
|
2593
2599
|
];
|
|
2594
2600
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2609,9 +2615,9 @@ const ur = ({
|
|
|
2609
2615
|
re && !l && /* @__PURE__ */ e(
|
|
2610
2616
|
"button",
|
|
2611
2617
|
{
|
|
2612
|
-
onClick:
|
|
2618
|
+
onClick: j,
|
|
2613
2619
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2614
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
2620
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "xs" })
|
|
2615
2621
|
}
|
|
2616
2622
|
)
|
|
2617
2623
|
]
|
|
@@ -2619,16 +2625,16 @@ const ur = ({
|
|
|
2619
2625
|
),
|
|
2620
2626
|
a && /* @__PURE__ */ e(de, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2621
2627
|
/* @__PURE__ */ e(
|
|
2622
|
-
|
|
2628
|
+
qe,
|
|
2623
2629
|
{
|
|
2624
2630
|
open: b,
|
|
2625
2631
|
onClose: () => {
|
|
2626
|
-
p(!1),
|
|
2632
|
+
p(!1), D(null), W("/"), k(!1);
|
|
2627
2633
|
},
|
|
2628
2634
|
title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
|
|
2629
2635
|
size: "lg",
|
|
2630
2636
|
children: /* @__PURE__ */ e(
|
|
2631
|
-
|
|
2637
|
+
sr,
|
|
2632
2638
|
{
|
|
2633
2639
|
variant: "pills",
|
|
2634
2640
|
items: [
|
|
@@ -2643,9 +2649,9 @@ const ur = ({
|
|
|
2643
2649
|
variant: "ghost",
|
|
2644
2650
|
size: "sm",
|
|
2645
2651
|
onClick: () => {
|
|
2646
|
-
E && E !== "/" ? z() :
|
|
2652
|
+
E && E !== "/" ? z() : D(null);
|
|
2647
2653
|
},
|
|
2648
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2654
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: at, size: "xs" }),
|
|
2649
2655
|
children: E ? "Back" : "Back to Mounts"
|
|
2650
2656
|
}
|
|
2651
2657
|
),
|
|
@@ -2668,7 +2674,7 @@ const ur = ({
|
|
|
2668
2674
|
variant: "outline",
|
|
2669
2675
|
size: "sm",
|
|
2670
2676
|
onClick: () => k(!0),
|
|
2671
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2677
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: lt, size: "xs" }),
|
|
2672
2678
|
children: "New Folder"
|
|
2673
2679
|
}
|
|
2674
2680
|
),
|
|
@@ -2678,7 +2684,7 @@ const ur = ({
|
|
|
2678
2684
|
variant: "primary",
|
|
2679
2685
|
size: "sm",
|
|
2680
2686
|
onClick: () => y.current?.click(),
|
|
2681
|
-
leftIcon: /* @__PURE__ */ e(Y, { icon:
|
|
2687
|
+
leftIcon: /* @__PURE__ */ e(Y, { icon: ot, size: "xs" }),
|
|
2682
2688
|
loading: U,
|
|
2683
2689
|
children: "Upload"
|
|
2684
2690
|
}
|
|
@@ -2713,21 +2719,21 @@ const ur = ({
|
|
|
2713
2719
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2714
2720
|
Pe,
|
|
2715
2721
|
{
|
|
2716
|
-
data:
|
|
2717
|
-
columns:
|
|
2722
|
+
data: H,
|
|
2723
|
+
columns: B,
|
|
2718
2724
|
loading: U,
|
|
2719
2725
|
emptyContent: "This folder is empty",
|
|
2720
|
-
onRowClick: ($) => $.type === "folder" ?
|
|
2726
|
+
onRowClick: ($) => $.type === "folder" ? _($.name) : G($)
|
|
2721
2727
|
}
|
|
2722
2728
|
) })
|
|
2723
2729
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2724
2730
|
Pe,
|
|
2725
2731
|
{
|
|
2726
2732
|
data: C,
|
|
2727
|
-
columns:
|
|
2733
|
+
columns: O,
|
|
2728
2734
|
loading: U,
|
|
2729
2735
|
emptyContent: "No storage mounts configured",
|
|
2730
|
-
onRowClick: ($) =>
|
|
2736
|
+
onRowClick: ($) => D($)
|
|
2731
2737
|
}
|
|
2732
2738
|
) }) })
|
|
2733
2739
|
},
|
|
@@ -2763,7 +2769,7 @@ const ur = ({
|
|
|
2763
2769
|
}
|
|
2764
2770
|
)
|
|
2765
2771
|
] });
|
|
2766
|
-
},
|
|
2772
|
+
}, fr = {
|
|
2767
2773
|
sm: "px-3 py-1.5 text-sm",
|
|
2768
2774
|
md: "px-3 py-2 text-base",
|
|
2769
2775
|
lg: "px-3 py-2 text-md",
|
|
@@ -2790,7 +2796,7 @@ const ur = ({
|
|
|
2790
2796
|
{
|
|
2791
2797
|
htmlFor: C,
|
|
2792
2798
|
className: d(
|
|
2793
|
-
|
|
2799
|
+
He,
|
|
2794
2800
|
g ? "text-danger-fg" : "text-text-subtle",
|
|
2795
2801
|
h
|
|
2796
2802
|
),
|
|
@@ -2812,7 +2818,7 @@ const ur = ({
|
|
|
2812
2818
|
"placeholder:text-text-subtle",
|
|
2813
2819
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
2814
2820
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
2815
|
-
|
|
2821
|
+
fr[s],
|
|
2816
2822
|
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2817
2823
|
u
|
|
2818
2824
|
),
|
|
@@ -2839,13 +2845,13 @@ const ur = ({
|
|
|
2839
2845
|
}
|
|
2840
2846
|
);
|
|
2841
2847
|
De.displayName = "TextArea";
|
|
2842
|
-
function
|
|
2848
|
+
function Oe(t, r) {
|
|
2843
2849
|
return r.split(".").reduce(
|
|
2844
2850
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2845
2851
|
t
|
|
2846
2852
|
);
|
|
2847
2853
|
}
|
|
2848
|
-
function
|
|
2854
|
+
function hr(t, r, n) {
|
|
2849
2855
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2850
2856
|
let l = a;
|
|
2851
2857
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -2854,7 +2860,7 @@ function fr(t, r, n) {
|
|
|
2854
2860
|
}
|
|
2855
2861
|
return l[s[s.length - 1]] = n, a;
|
|
2856
2862
|
}
|
|
2857
|
-
function
|
|
2863
|
+
function xr(t, r) {
|
|
2858
2864
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2859
2865
|
let a = s;
|
|
2860
2866
|
for (let l = 0; l < n.length - 1; l++) {
|
|
@@ -2864,7 +2870,7 @@ function hr(t, r) {
|
|
|
2864
2870
|
}
|
|
2865
2871
|
return delete a[n[n.length - 1]], s;
|
|
2866
2872
|
}
|
|
2867
|
-
const
|
|
2873
|
+
const bn = ({
|
|
2868
2874
|
groups: t,
|
|
2869
2875
|
data: r,
|
|
2870
2876
|
onSubmit: n,
|
|
@@ -2882,9 +2888,9 @@ const hn = ({
|
|
|
2882
2888
|
ref: C,
|
|
2883
2889
|
sdk: g
|
|
2884
2890
|
}) => {
|
|
2885
|
-
const [x,
|
|
2891
|
+
const [x, D] = R(r || {}), [E, W] = R({}), [T, X] = R({});
|
|
2886
2892
|
Q(() => {
|
|
2887
|
-
r &&
|
|
2893
|
+
r && D({ ...r });
|
|
2888
2894
|
}, [r]);
|
|
2889
2895
|
const U = ue(
|
|
2890
2896
|
(k, i, S) => {
|
|
@@ -2903,11 +2909,11 @@ const hn = ({
|
|
|
2903
2909
|
if (i.forEach((ee, ae) => {
|
|
2904
2910
|
const le = {};
|
|
2905
2911
|
for (const G of y.arrayFields) {
|
|
2906
|
-
const
|
|
2907
|
-
if (G.required && (
|
|
2912
|
+
const j = ee?.[G.name];
|
|
2913
|
+
if (G.required && (j == null || j === ""))
|
|
2908
2914
|
le[G.name] = `${G.label} is required`, w = !0;
|
|
2909
2915
|
else if (G.validator) {
|
|
2910
|
-
const M = G.validator(
|
|
2916
|
+
const M = G.validator(j, ee);
|
|
2911
2917
|
M && (le[G.name] = M, w = !0);
|
|
2912
2918
|
}
|
|
2913
2919
|
}
|
|
@@ -2921,12 +2927,12 @@ const hn = ({
|
|
|
2921
2927
|
[t]
|
|
2922
2928
|
), I = ue(
|
|
2923
2929
|
(k, i) => {
|
|
2924
|
-
let S =
|
|
2930
|
+
let S = hr(
|
|
2925
2931
|
x,
|
|
2926
2932
|
k,
|
|
2927
2933
|
i
|
|
2928
2934
|
);
|
|
2929
|
-
t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (i == null || i === "") && (S =
|
|
2935
|
+
t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (i == null || i === "") && (S = xr(S, k)), D(S), X((w) => ({ ...w, [k]: !0 }));
|
|
2930
2936
|
const A = U(k, i, S);
|
|
2931
2937
|
W((w) => ({
|
|
2932
2938
|
...w,
|
|
@@ -2943,7 +2949,7 @@ const hn = ({
|
|
|
2943
2949
|
continue;
|
|
2944
2950
|
const w = U(
|
|
2945
2951
|
A.name,
|
|
2946
|
-
|
|
2952
|
+
Oe(x, A.name),
|
|
2947
2953
|
x
|
|
2948
2954
|
);
|
|
2949
2955
|
w && (i[A.name] = w);
|
|
@@ -2960,7 +2966,7 @@ const hn = ({
|
|
|
2960
2966
|
[x, t, U, o, l, n, b]
|
|
2961
2967
|
), K = ue(
|
|
2962
2968
|
(k) => {
|
|
2963
|
-
const i =
|
|
2969
|
+
const i = Oe(x, k.name), S = T[k.name] ? E[k.name] : void 0, y = k.disabled || b, A = {
|
|
2964
2970
|
value: i || "",
|
|
2965
2971
|
disabled: y,
|
|
2966
2972
|
required: k.required,
|
|
@@ -2998,7 +3004,7 @@ const hn = ({
|
|
|
2998
3004
|
);
|
|
2999
3005
|
case "select":
|
|
3000
3006
|
return /* @__PURE__ */ e(
|
|
3001
|
-
|
|
3007
|
+
we,
|
|
3002
3008
|
{
|
|
3003
3009
|
...A,
|
|
3004
3010
|
onChange: (w) => I(k.name, w),
|
|
@@ -3059,7 +3065,7 @@ const hn = ({
|
|
|
3059
3065
|
);
|
|
3060
3066
|
case "file":
|
|
3061
3067
|
return /* @__PURE__ */ e(
|
|
3062
|
-
|
|
3068
|
+
mr,
|
|
3063
3069
|
{
|
|
3064
3070
|
...A,
|
|
3065
3071
|
value: i,
|
|
@@ -3122,40 +3128,40 @@ const hn = ({
|
|
|
3122
3128
|
}
|
|
3123
3129
|
const ae = () => {
|
|
3124
3130
|
I(k.name, [...w, {}]);
|
|
3125
|
-
}, le = (
|
|
3131
|
+
}, le = (j) => {
|
|
3126
3132
|
I(
|
|
3127
3133
|
k.name,
|
|
3128
|
-
w.filter((M,
|
|
3134
|
+
w.filter((M, _) => _ !== j)
|
|
3129
3135
|
);
|
|
3130
|
-
}, G = (
|
|
3136
|
+
}, G = (j, M, _) => {
|
|
3131
3137
|
const z = [...w];
|
|
3132
|
-
z[
|
|
3133
|
-
...z[
|
|
3134
|
-
[M]:
|
|
3138
|
+
z[j] = {
|
|
3139
|
+
...z[j],
|
|
3140
|
+
[M]: _
|
|
3135
3141
|
}, I(k.name, z);
|
|
3136
3142
|
};
|
|
3137
3143
|
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]?.[
|
|
3144
|
+
w.map((j, M) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3145
|
+
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((_) => {
|
|
3146
|
+
const z = ee?.[M]?.[_.name];
|
|
3141
3147
|
return /* @__PURE__ */ c(
|
|
3142
3148
|
"div",
|
|
3143
3149
|
{
|
|
3144
3150
|
className: "flex flex-col gap-1",
|
|
3145
3151
|
children: [
|
|
3146
3152
|
M === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3147
|
-
|
|
3148
|
-
|
|
3153
|
+
_.label,
|
|
3154
|
+
_.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3149
3155
|
] }),
|
|
3150
3156
|
(() => {
|
|
3151
|
-
const
|
|
3152
|
-
value:
|
|
3157
|
+
const H = {
|
|
3158
|
+
value: j?.[_.name] || "",
|
|
3153
3159
|
disabled: y,
|
|
3154
|
-
required:
|
|
3155
|
-
placeholder:
|
|
3156
|
-
...
|
|
3160
|
+
required: _.required,
|
|
3161
|
+
placeholder: _.placeholder,
|
|
3162
|
+
..._.fieldProps
|
|
3157
3163
|
};
|
|
3158
|
-
switch (
|
|
3164
|
+
switch (_.type) {
|
|
3159
3165
|
case "text":
|
|
3160
3166
|
case "email":
|
|
3161
3167
|
case "password":
|
|
@@ -3165,14 +3171,14 @@ const hn = ({
|
|
|
3165
3171
|
return /* @__PURE__ */ e(
|
|
3166
3172
|
be,
|
|
3167
3173
|
{
|
|
3168
|
-
...
|
|
3169
|
-
onChange: (
|
|
3174
|
+
...H,
|
|
3175
|
+
onChange: (B) => G(
|
|
3170
3176
|
M,
|
|
3171
|
-
|
|
3172
|
-
|
|
3177
|
+
_.name,
|
|
3178
|
+
B.target.value
|
|
3173
3179
|
),
|
|
3174
|
-
type:
|
|
3175
|
-
autoComplete:
|
|
3180
|
+
type: _.textType || _.type,
|
|
3181
|
+
autoComplete: _.autocomplete,
|
|
3176
3182
|
error: z,
|
|
3177
3183
|
size: f
|
|
3178
3184
|
}
|
|
@@ -3181,11 +3187,11 @@ const hn = ({
|
|
|
3181
3187
|
return /* @__PURE__ */ e(
|
|
3182
3188
|
De,
|
|
3183
3189
|
{
|
|
3184
|
-
...
|
|
3185
|
-
onChange: (
|
|
3190
|
+
...H,
|
|
3191
|
+
onChange: (B) => G(
|
|
3186
3192
|
M,
|
|
3187
|
-
|
|
3188
|
-
|
|
3193
|
+
_.name,
|
|
3194
|
+
B.target.value
|
|
3189
3195
|
),
|
|
3190
3196
|
rows: 4,
|
|
3191
3197
|
error: z,
|
|
@@ -3194,23 +3200,23 @@ const hn = ({
|
|
|
3194
3200
|
);
|
|
3195
3201
|
case "select":
|
|
3196
3202
|
return /* @__PURE__ */ e(
|
|
3197
|
-
|
|
3203
|
+
we,
|
|
3198
3204
|
{
|
|
3199
|
-
...
|
|
3200
|
-
onChange: (
|
|
3205
|
+
...H,
|
|
3206
|
+
onChange: (B) => G(
|
|
3201
3207
|
M,
|
|
3202
|
-
|
|
3203
|
-
|
|
3208
|
+
_.name,
|
|
3209
|
+
B
|
|
3204
3210
|
),
|
|
3205
|
-
options: (
|
|
3206
|
-
(
|
|
3207
|
-
...
|
|
3208
|
-
value: String(
|
|
3211
|
+
options: (_.options || []).map(
|
|
3212
|
+
(B) => ({
|
|
3213
|
+
...B,
|
|
3214
|
+
value: String(B.value)
|
|
3209
3215
|
})
|
|
3210
3216
|
),
|
|
3211
|
-
searchable:
|
|
3212
|
-
multiple:
|
|
3213
|
-
allowCreate:
|
|
3217
|
+
searchable: _.searchable,
|
|
3218
|
+
multiple: _.multiple,
|
|
3219
|
+
allowCreate: _.allowCreate,
|
|
3214
3220
|
error: z,
|
|
3215
3221
|
size: f
|
|
3216
3222
|
}
|
|
@@ -3219,18 +3225,18 @@ const hn = ({
|
|
|
3219
3225
|
return /* @__PURE__ */ e(
|
|
3220
3226
|
pe,
|
|
3221
3227
|
{
|
|
3222
|
-
...
|
|
3223
|
-
checked: !!
|
|
3224
|
-
onChange: (
|
|
3228
|
+
...H,
|
|
3229
|
+
checked: !!j?.[_.name],
|
|
3230
|
+
onChange: (B) => G(
|
|
3225
3231
|
M,
|
|
3226
|
-
|
|
3227
|
-
|
|
3232
|
+
_.name,
|
|
3233
|
+
B.target.checked
|
|
3228
3234
|
),
|
|
3229
3235
|
size: f
|
|
3230
3236
|
}
|
|
3231
3237
|
);
|
|
3232
3238
|
case "radio":
|
|
3233
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3239
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _.options?.map((B) => /* @__PURE__ */ c(
|
|
3234
3240
|
"label",
|
|
3235
3241
|
{
|
|
3236
3242
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3239,46 +3245,46 @@ const hn = ({
|
|
|
3239
3245
|
"input",
|
|
3240
3246
|
{
|
|
3241
3247
|
type: "radio",
|
|
3242
|
-
name: `${k.name}.${M}.${
|
|
3243
|
-
value:
|
|
3244
|
-
checked:
|
|
3248
|
+
name: `${k.name}.${M}.${_.name}`,
|
|
3249
|
+
value: B.value,
|
|
3250
|
+
checked: j?.[_.name] === B.value,
|
|
3245
3251
|
onChange: () => G(
|
|
3246
3252
|
M,
|
|
3247
|
-
|
|
3248
|
-
|
|
3253
|
+
_.name,
|
|
3254
|
+
B.value
|
|
3249
3255
|
),
|
|
3250
|
-
disabled: y ||
|
|
3256
|
+
disabled: y || B.disabled,
|
|
3251
3257
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3252
3258
|
}
|
|
3253
3259
|
),
|
|
3254
|
-
|
|
3260
|
+
B.label
|
|
3255
3261
|
]
|
|
3256
3262
|
},
|
|
3257
|
-
|
|
3263
|
+
B.value
|
|
3258
3264
|
)) });
|
|
3259
3265
|
case "date": {
|
|
3260
|
-
const
|
|
3266
|
+
const B = j?.[_.name];
|
|
3261
3267
|
return /* @__PURE__ */ e(
|
|
3262
3268
|
$e,
|
|
3263
3269
|
{
|
|
3264
|
-
...
|
|
3265
|
-
value:
|
|
3266
|
-
onChange: (
|
|
3270
|
+
...H,
|
|
3271
|
+
value: B ? new Date(B) : null,
|
|
3272
|
+
onChange: (O) => G(
|
|
3267
3273
|
M,
|
|
3268
|
-
|
|
3269
|
-
|
|
3274
|
+
_.name,
|
|
3275
|
+
O
|
|
3270
3276
|
),
|
|
3271
3277
|
size: f
|
|
3272
3278
|
}
|
|
3273
3279
|
);
|
|
3274
3280
|
}
|
|
3275
3281
|
case "custom":
|
|
3276
|
-
return
|
|
3277
|
-
value:
|
|
3278
|
-
onChange: (
|
|
3282
|
+
return _.customComponent?.({
|
|
3283
|
+
value: j?.[_.name],
|
|
3284
|
+
onChange: (B) => G(
|
|
3279
3285
|
M,
|
|
3280
|
-
|
|
3281
|
-
|
|
3286
|
+
_.name,
|
|
3287
|
+
B
|
|
3282
3288
|
),
|
|
3283
3289
|
error: z,
|
|
3284
3290
|
disabled: y
|
|
@@ -3288,14 +3294,14 @@ const hn = ({
|
|
|
3288
3294
|
return /* @__PURE__ */ c("p", { children: [
|
|
3289
3295
|
"Unsupported field type in array:",
|
|
3290
3296
|
" ",
|
|
3291
|
-
|
|
3297
|
+
_.type
|
|
3292
3298
|
] });
|
|
3293
3299
|
}
|
|
3294
3300
|
})(),
|
|
3295
3301
|
z && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: z })
|
|
3296
3302
|
]
|
|
3297
3303
|
},
|
|
3298
|
-
|
|
3304
|
+
_.name
|
|
3299
3305
|
);
|
|
3300
3306
|
}) }),
|
|
3301
3307
|
/* @__PURE__ */ e(
|
|
@@ -3309,7 +3315,7 @@ const hn = ({
|
|
|
3309
3315
|
onClick: () => le(M),
|
|
3310
3316
|
disabled: y,
|
|
3311
3317
|
className: d("shrink-0", M === 0 && "mt-5"),
|
|
3312
|
-
children: /* @__PURE__ */ e(
|
|
3318
|
+
children: /* @__PURE__ */ e(ct, { className: "size-icon-md" })
|
|
3313
3319
|
}
|
|
3314
3320
|
)
|
|
3315
3321
|
] }, M)),
|
|
@@ -3319,7 +3325,7 @@ const hn = ({
|
|
|
3319
3325
|
type: "button",
|
|
3320
3326
|
variant: "secondary",
|
|
3321
3327
|
size: "sm",
|
|
3322
|
-
leftIcon: /* @__PURE__ */ e(
|
|
3328
|
+
leftIcon: /* @__PURE__ */ e(it, { className: "size-icon-sm" }),
|
|
3323
3329
|
onClick: ae,
|
|
3324
3330
|
disabled: y,
|
|
3325
3331
|
children: [
|
|
@@ -3334,7 +3340,7 @@ const hn = ({
|
|
|
3334
3340
|
return null;
|
|
3335
3341
|
}
|
|
3336
3342
|
},
|
|
3337
|
-
[x,
|
|
3343
|
+
[x, T, E, b, f, I]
|
|
3338
3344
|
), re = ue(
|
|
3339
3345
|
(k) => {
|
|
3340
3346
|
if (k.conditional && !k.conditional(x))
|
|
@@ -3361,7 +3367,7 @@ const hn = ({
|
|
|
3361
3367
|
k.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: k.description })
|
|
3362
3368
|
] }),
|
|
3363
3369
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((y) => {
|
|
3364
|
-
const A =
|
|
3370
|
+
const A = T[y.name] ? E[y.name] : void 0;
|
|
3365
3371
|
return /* @__PURE__ */ c(
|
|
3366
3372
|
"div",
|
|
3367
3373
|
{
|
|
@@ -3390,8 +3396,8 @@ const hn = ({
|
|
|
3390
3396
|
k.id
|
|
3391
3397
|
);
|
|
3392
3398
|
},
|
|
3393
|
-
[x,
|
|
3394
|
-
),
|
|
3399
|
+
[x, T, E, K]
|
|
3400
|
+
), P = d(
|
|
3395
3401
|
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3396
3402
|
{
|
|
3397
3403
|
"max-w-md": f === "sm",
|
|
@@ -3401,7 +3407,7 @@ const hn = ({
|
|
|
3401
3407
|
},
|
|
3402
3408
|
p
|
|
3403
3409
|
), ce = f === "full" ? "md" : f;
|
|
3404
|
-
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className:
|
|
3410
|
+
return /* @__PURE__ */ c("form", { ref: C, onSubmit: q, className: P, children: [
|
|
3405
3411
|
!N && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3406
3412
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(re) }),
|
|
3407
3413
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: N && /* @__PURE__ */ c(xe, { children: [
|
|
@@ -3433,7 +3439,7 @@ const hn = ({
|
|
|
3433
3439
|
] }) })
|
|
3434
3440
|
] });
|
|
3435
3441
|
};
|
|
3436
|
-
function
|
|
3442
|
+
function pn({
|
|
3437
3443
|
open: t,
|
|
3438
3444
|
title: r,
|
|
3439
3445
|
description: n,
|
|
@@ -3445,7 +3451,7 @@ function xn({
|
|
|
3445
3451
|
onCancel: u
|
|
3446
3452
|
}) {
|
|
3447
3453
|
return /* @__PURE__ */ e(
|
|
3448
|
-
|
|
3454
|
+
qe,
|
|
3449
3455
|
{
|
|
3450
3456
|
open: t,
|
|
3451
3457
|
onClose: u,
|
|
@@ -3467,7 +3473,7 @@ function xn({
|
|
|
3467
3473
|
}
|
|
3468
3474
|
);
|
|
3469
3475
|
}
|
|
3470
|
-
const
|
|
3476
|
+
const br = {
|
|
3471
3477
|
default: "bg-surface-hover text-text",
|
|
3472
3478
|
primary: "bg-accent-soft text-accent",
|
|
3473
3479
|
secondary: "bg-surface-hover text-text-muted",
|
|
@@ -3477,11 +3483,11 @@ const xr = {
|
|
|
3477
3483
|
info: "bg-info-soft text-info-fg",
|
|
3478
3484
|
// Internal-note amber. Never for customer-visible content.
|
|
3479
3485
|
note: "bg-note-soft text-note"
|
|
3480
|
-
},
|
|
3486
|
+
}, pr = {
|
|
3481
3487
|
sm: "px-2 py-0.5 text-xs",
|
|
3482
3488
|
md: "px-2.5 py-1 text-sm",
|
|
3483
3489
|
lg: "px-3 py-1.5 text-base"
|
|
3484
|
-
},
|
|
3490
|
+
}, gr = {
|
|
3485
3491
|
default: "bg-surface-hover",
|
|
3486
3492
|
primary: "bg-accent",
|
|
3487
3493
|
secondary: "bg-surface-hover",
|
|
@@ -3491,7 +3497,7 @@ const xr = {
|
|
|
3491
3497
|
info: "bg-info",
|
|
3492
3498
|
note: "bg-note"
|
|
3493
3499
|
};
|
|
3494
|
-
function
|
|
3500
|
+
function gn({
|
|
3495
3501
|
variant: t = "default",
|
|
3496
3502
|
size: r = "md",
|
|
3497
3503
|
dot: n = !1,
|
|
@@ -3509,9 +3515,9 @@ function bn({
|
|
|
3509
3515
|
// Base styles
|
|
3510
3516
|
"inline-flex items-center font-medium rounded-full",
|
|
3511
3517
|
// Variant styles
|
|
3512
|
-
|
|
3518
|
+
br[t],
|
|
3513
3519
|
// Size styles
|
|
3514
|
-
|
|
3520
|
+
pr[r],
|
|
3515
3521
|
o
|
|
3516
3522
|
),
|
|
3517
3523
|
...u,
|
|
@@ -3521,7 +3527,7 @@ function bn({
|
|
|
3521
3527
|
{
|
|
3522
3528
|
className: d(
|
|
3523
3529
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3524
|
-
|
|
3530
|
+
gr[t]
|
|
3525
3531
|
)
|
|
3526
3532
|
}
|
|
3527
3533
|
),
|
|
@@ -3533,18 +3539,18 @@ function bn({
|
|
|
3533
3539
|
onClick: l,
|
|
3534
3540
|
className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
|
|
3535
3541
|
"aria-label": "Remove badge",
|
|
3536
|
-
children: /* @__PURE__ */ e(Y, { icon:
|
|
3542
|
+
children: /* @__PURE__ */ e(Y, { icon: ge, size: "xs", color: "current" })
|
|
3537
3543
|
}
|
|
3538
3544
|
)
|
|
3539
3545
|
]
|
|
3540
3546
|
}
|
|
3541
3547
|
);
|
|
3542
3548
|
}
|
|
3543
|
-
const
|
|
3549
|
+
const vr = {
|
|
3544
3550
|
neutral: "bg-surface-hover text-text-muted",
|
|
3545
3551
|
success: "bg-success-soft text-success-fg"
|
|
3546
3552
|
};
|
|
3547
|
-
function
|
|
3553
|
+
function vn({
|
|
3548
3554
|
icon: t,
|
|
3549
3555
|
tone: r = "neutral",
|
|
3550
3556
|
title: n,
|
|
@@ -3564,7 +3570,7 @@ function pn({
|
|
|
3564
3570
|
),
|
|
3565
3571
|
...h,
|
|
3566
3572
|
children: [
|
|
3567
|
-
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl",
|
|
3573
|
+
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", vr[r]), children: t }),
|
|
3568
3574
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3569
3575
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3570
3576
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3572,7 +3578,7 @@ function pn({
|
|
|
3572
3578
|
}
|
|
3573
3579
|
);
|
|
3574
3580
|
}
|
|
3575
|
-
function
|
|
3581
|
+
function yn({ children: t, className: r, ...n }) {
|
|
3576
3582
|
return /* @__PURE__ */ e(
|
|
3577
3583
|
"kbd",
|
|
3578
3584
|
{
|
|
@@ -3585,14 +3591,14 @@ function gn({ children: t, className: r, ...n }) {
|
|
|
3585
3591
|
}
|
|
3586
3592
|
);
|
|
3587
3593
|
}
|
|
3588
|
-
const
|
|
3594
|
+
const yr = {
|
|
3589
3595
|
sm: "h-1",
|
|
3590
3596
|
md: "h-1.5"
|
|
3591
|
-
},
|
|
3597
|
+
}, Nr = {
|
|
3592
3598
|
accent: "bg-accent",
|
|
3593
3599
|
success: "bg-success"
|
|
3594
3600
|
};
|
|
3595
|
-
function
|
|
3601
|
+
function Nn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3596
3602
|
const l = Math.max(0, Math.min(100, t));
|
|
3597
3603
|
return /* @__PURE__ */ e(
|
|
3598
3604
|
"div",
|
|
@@ -3601,37 +3607,37 @@ function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3601
3607
|
"aria-valuenow": Math.round(l),
|
|
3602
3608
|
"aria-valuemin": 0,
|
|
3603
3609
|
"aria-valuemax": 100,
|
|
3604
|
-
className: d("w-full overflow-hidden rounded-full bg-surface-hover",
|
|
3610
|
+
className: d("w-full overflow-hidden rounded-full bg-surface-hover", yr[n], s),
|
|
3605
3611
|
...a,
|
|
3606
3612
|
children: /* @__PURE__ */ e(
|
|
3607
3613
|
"div",
|
|
3608
3614
|
{
|
|
3609
|
-
className: d("h-full rounded-full transition-[width] duration-300 ease-out",
|
|
3615
|
+
className: d("h-full rounded-full transition-[width] duration-300 ease-out", Nr[r]),
|
|
3610
3616
|
style: { width: `${l}%` }
|
|
3611
3617
|
}
|
|
3612
3618
|
)
|
|
3613
3619
|
}
|
|
3614
3620
|
);
|
|
3615
3621
|
}
|
|
3616
|
-
const
|
|
3622
|
+
const wr = {
|
|
3617
3623
|
xs: "h-3 w-3",
|
|
3618
3624
|
sm: "h-4 w-4",
|
|
3619
3625
|
md: "h-6 w-6",
|
|
3620
3626
|
lg: "h-8 w-8",
|
|
3621
3627
|
xl: "h-12 w-12"
|
|
3622
|
-
},
|
|
3628
|
+
}, kr = {
|
|
3623
3629
|
primary: "text-accent",
|
|
3624
3630
|
secondary: "text-text-muted",
|
|
3625
3631
|
white: "text-white",
|
|
3626
3632
|
current: "text-current"
|
|
3627
|
-
},
|
|
3633
|
+
}, Cr = {
|
|
3628
3634
|
xs: "text-xs",
|
|
3629
3635
|
sm: "text-sm",
|
|
3630
3636
|
md: "text-sm",
|
|
3631
3637
|
lg: "text-base",
|
|
3632
3638
|
xl: "text-lg"
|
|
3633
3639
|
};
|
|
3634
|
-
function
|
|
3640
|
+
function wn({
|
|
3635
3641
|
size: t = "md",
|
|
3636
3642
|
variant: r = "primary",
|
|
3637
3643
|
label: n = "Loading...",
|
|
@@ -3654,8 +3660,8 @@ function yn({
|
|
|
3654
3660
|
{
|
|
3655
3661
|
className: d(
|
|
3656
3662
|
"animate-spin",
|
|
3657
|
-
|
|
3658
|
-
|
|
3663
|
+
wr[t],
|
|
3664
|
+
kr[r]
|
|
3659
3665
|
),
|
|
3660
3666
|
fill: "none",
|
|
3661
3667
|
viewBox: "0 0 24 24",
|
|
@@ -3689,7 +3695,7 @@ function yn({
|
|
|
3689
3695
|
{
|
|
3690
3696
|
className: d(
|
|
3691
3697
|
"text-text-muted",
|
|
3692
|
-
|
|
3698
|
+
Cr[t]
|
|
3693
3699
|
),
|
|
3694
3700
|
children: n
|
|
3695
3701
|
}
|
|
@@ -3699,7 +3705,7 @@ function yn({
|
|
|
3699
3705
|
}
|
|
3700
3706
|
);
|
|
3701
3707
|
}
|
|
3702
|
-
const
|
|
3708
|
+
const Sr = {
|
|
3703
3709
|
neutral: "bg-text-disabled",
|
|
3704
3710
|
accent: "bg-accent",
|
|
3705
3711
|
success: "bg-success",
|
|
@@ -3713,7 +3719,7 @@ const Cr = {
|
|
|
3713
3719
|
"cat-4": "bg-cat-4",
|
|
3714
3720
|
"cat-5": "bg-cat-5"
|
|
3715
3721
|
};
|
|
3716
|
-
function
|
|
3722
|
+
function kn({
|
|
3717
3723
|
tone: t = "neutral",
|
|
3718
3724
|
shape: r = "round",
|
|
3719
3725
|
pulse: n = !1,
|
|
@@ -3729,14 +3735,14 @@ function Nn({
|
|
|
3729
3735
|
className: d(
|
|
3730
3736
|
"inline-block size-dot shrink-0",
|
|
3731
3737
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
3732
|
-
|
|
3738
|
+
Sr[t],
|
|
3733
3739
|
n && "animate-pulse",
|
|
3734
3740
|
a
|
|
3735
3741
|
)
|
|
3736
3742
|
}
|
|
3737
3743
|
);
|
|
3738
3744
|
}
|
|
3739
|
-
function
|
|
3745
|
+
function Cn({
|
|
3740
3746
|
steps: t,
|
|
3741
3747
|
current: r,
|
|
3742
3748
|
variant: n = "numbered",
|
|
@@ -3772,7 +3778,7 @@ function wn({
|
|
|
3772
3778
|
u < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3773
3779
|
] }, h)) });
|
|
3774
3780
|
}
|
|
3775
|
-
function
|
|
3781
|
+
function Sn({ title: t, icon: r = /* @__PURE__ */ e(dt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
|
|
3776
3782
|
return /* @__PURE__ */ c(
|
|
3777
3783
|
"div",
|
|
3778
3784
|
{
|
|
@@ -3793,21 +3799,21 @@ function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-
|
|
|
3793
3799
|
}
|
|
3794
3800
|
);
|
|
3795
3801
|
}
|
|
3796
|
-
const
|
|
3802
|
+
const zr = {
|
|
3797
3803
|
xs: "w-5 h-5 text-xs",
|
|
3798
3804
|
sm: "w-6 h-6 text-xs",
|
|
3799
3805
|
md: "w-7 h-7 text-base",
|
|
3800
3806
|
lg: "w-9 h-9 text-sm"
|
|
3801
3807
|
};
|
|
3802
|
-
function
|
|
3808
|
+
function Er(t) {
|
|
3803
3809
|
if (!t) return "?";
|
|
3804
3810
|
const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
3805
3811
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3806
3812
|
}
|
|
3807
|
-
const
|
|
3813
|
+
const Mr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
3808
3814
|
const [l, o] = oe.useState(!1), h = d(
|
|
3809
3815
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover text-text",
|
|
3810
|
-
|
|
3816
|
+
zr[n],
|
|
3811
3817
|
s
|
|
3812
3818
|
);
|
|
3813
3819
|
return r && !l ? /* @__PURE__ */ e(
|
|
@@ -3819,13 +3825,13 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3819
3825
|
className: d(h, "object-cover"),
|
|
3820
3826
|
onError: () => o(!0)
|
|
3821
3827
|
}
|
|
3822
|
-
) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children:
|
|
3823
|
-
},
|
|
3828
|
+
) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children: Er(t) });
|
|
3829
|
+
}, Fe = "ring-surface", $r = "ring-surface-accent", zn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3824
3830
|
if (t.length === 0) return null;
|
|
3825
3831
|
const a = t.slice(0, r), l = t.length - a.length;
|
|
3826
3832
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
3827
3833
|
a.map((o, h) => /* @__PURE__ */ e(
|
|
3828
|
-
|
|
3834
|
+
Mr,
|
|
3829
3835
|
{
|
|
3830
3836
|
name: o.name,
|
|
3831
3837
|
src: o.src,
|
|
@@ -3833,7 +3839,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3833
3839
|
title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
|
|
3834
3840
|
className: d(
|
|
3835
3841
|
h > 0 && "-ml-2",
|
|
3836
|
-
o.owner ?
|
|
3842
|
+
o.owner ? $r : Fe,
|
|
3837
3843
|
o.seen === !1 && "opacity-40"
|
|
3838
3844
|
)
|
|
3839
3845
|
},
|
|
@@ -3845,7 +3851,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3845
3851
|
className: d(
|
|
3846
3852
|
"inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-surface-hover text-text-muted",
|
|
3847
3853
|
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
|
-
|
|
3854
|
+
Fe
|
|
3849
3855
|
),
|
|
3850
3856
|
children: [
|
|
3851
3857
|
"+",
|
|
@@ -3854,26 +3860,26 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3854
3860
|
}
|
|
3855
3861
|
)
|
|
3856
3862
|
] });
|
|
3857
|
-
},
|
|
3863
|
+
}, Be = {
|
|
3858
3864
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
3859
3865
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
3860
3866
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
3861
3867
|
tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
|
|
3862
3868
|
note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
|
|
3863
|
-
},
|
|
3869
|
+
}, Dr = {
|
|
3864
3870
|
sm: "size-avatar-xs rounded-sm text-xs",
|
|
3865
3871
|
md: "size-avatar-sm rounded-md text-xs",
|
|
3866
3872
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3867
3873
|
};
|
|
3868
|
-
function
|
|
3869
|
-
const l =
|
|
3874
|
+
function En({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3875
|
+
const l = Be[t in Be ? t : "note"];
|
|
3870
3876
|
return /* @__PURE__ */ e(
|
|
3871
3877
|
"span",
|
|
3872
3878
|
{
|
|
3873
3879
|
title: a,
|
|
3874
3880
|
className: d(
|
|
3875
3881
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
3876
|
-
|
|
3882
|
+
Dr[n],
|
|
3877
3883
|
l.fg,
|
|
3878
3884
|
l.bg,
|
|
3879
3885
|
s
|
|
@@ -3882,7 +3888,7 @@ function Sn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3882
3888
|
}
|
|
3883
3889
|
);
|
|
3884
3890
|
}
|
|
3885
|
-
const
|
|
3891
|
+
const Mn = ({
|
|
3886
3892
|
src: t,
|
|
3887
3893
|
alt: r,
|
|
3888
3894
|
size: n = "md",
|
|
@@ -3898,14 +3904,14 @@ const zn = ({
|
|
|
3898
3904
|
onError: b,
|
|
3899
3905
|
...p
|
|
3900
3906
|
}) => {
|
|
3901
|
-
const [C, g] = R(!0), [x,
|
|
3902
|
-
g(!1),
|
|
3903
|
-
}, X = (
|
|
3904
|
-
if (g(!1),
|
|
3905
|
-
W(h),
|
|
3907
|
+
const [C, g] = R(!0), [x, D] = R(!1), [E, W] = R(t), T = (P) => {
|
|
3908
|
+
g(!1), D(!1), f?.(P);
|
|
3909
|
+
}, X = (P) => {
|
|
3910
|
+
if (g(!1), D(!0), h && E !== h) {
|
|
3911
|
+
W(h), D(!1), g(!0);
|
|
3906
3912
|
return;
|
|
3907
3913
|
}
|
|
3908
|
-
b?.(
|
|
3914
|
+
b?.(P);
|
|
3909
3915
|
}, U = d(
|
|
3910
3916
|
"relative overflow-hidden bg-surface-hover",
|
|
3911
3917
|
// Size variants
|
|
@@ -3944,7 +3950,7 @@ const zn = ({
|
|
|
3944
3950
|
"absolute inset-0 flex items-center justify-center",
|
|
3945
3951
|
"text-text-muted"
|
|
3946
3952
|
), 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:
|
|
3953
|
+
/* @__PURE__ */ e(Y, { icon: ut, size: "lg", className: "mx-auto mb-1" }),
|
|
3948
3954
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
3949
3955
|
] });
|
|
3950
3956
|
return /* @__PURE__ */ c("div", { className: U, children: [
|
|
@@ -3955,7 +3961,7 @@ const zn = ({
|
|
|
3955
3961
|
src: E,
|
|
3956
3962
|
alt: r,
|
|
3957
3963
|
className: I,
|
|
3958
|
-
onLoad:
|
|
3964
|
+
onLoad: T,
|
|
3959
3965
|
onError: X
|
|
3960
3966
|
}
|
|
3961
3967
|
),
|
|
@@ -3963,7 +3969,30 @@ const zn = ({
|
|
|
3963
3969
|
x && o && /* @__PURE__ */ e("div", { className: q, children: N || re })
|
|
3964
3970
|
] });
|
|
3965
3971
|
};
|
|
3966
|
-
function
|
|
3972
|
+
function $n({
|
|
3973
|
+
icon: t,
|
|
3974
|
+
onClick: r,
|
|
3975
|
+
children: n
|
|
3976
|
+
}) {
|
|
3977
|
+
return /* @__PURE__ */ c(
|
|
3978
|
+
"button",
|
|
3979
|
+
{
|
|
3980
|
+
type: "button",
|
|
3981
|
+
onClick: r,
|
|
3982
|
+
className: d(
|
|
3983
|
+
"inline-flex h-control-sm shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2.5",
|
|
3984
|
+
"text-sm font-medium whitespace-nowrap",
|
|
3985
|
+
"transition-colors duration-fast ease-out hover:bg-white/15",
|
|
3986
|
+
"focus-visible:outline-none focus-visible:focus-ring"
|
|
3987
|
+
),
|
|
3988
|
+
children: [
|
|
3989
|
+
t,
|
|
3990
|
+
n
|
|
3991
|
+
]
|
|
3992
|
+
}
|
|
3993
|
+
);
|
|
3994
|
+
}
|
|
3995
|
+
function Dn({
|
|
3967
3996
|
items: t,
|
|
3968
3997
|
getRowKey: r,
|
|
3969
3998
|
variant: n = "divided",
|
|
@@ -3981,17 +4010,17 @@ function En({
|
|
|
3981
4010
|
stickyGroupHeaders: C = !1,
|
|
3982
4011
|
collapsibleGroups: g = !1,
|
|
3983
4012
|
hideGroupCount: x = !1,
|
|
3984
|
-
selectable:
|
|
4013
|
+
selectable: D = !1,
|
|
3985
4014
|
selectedItems: E = [],
|
|
3986
4015
|
onSelectionChange: W,
|
|
3987
|
-
bulkActions:
|
|
4016
|
+
bulkActions: T,
|
|
3988
4017
|
header: X,
|
|
3989
4018
|
stickyHeader: U = !1,
|
|
3990
4019
|
bordered: I = !1,
|
|
3991
4020
|
emptyContent: q,
|
|
3992
4021
|
loading: K = !1,
|
|
3993
4022
|
loadingRows: re = 4,
|
|
3994
|
-
className:
|
|
4023
|
+
className: P,
|
|
3995
4024
|
"aria-label": ce
|
|
3996
4025
|
}) {
|
|
3997
4026
|
const [k, i] = oe.useState(
|
|
@@ -4000,29 +4029,29 @@ function En({
|
|
|
4000
4029
|
)
|
|
4001
4030
|
), S = oe.useRef(null), y = (z) => {
|
|
4002
4031
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(z.key)) return;
|
|
4003
|
-
const
|
|
4032
|
+
const B = Array.from(
|
|
4004
4033
|
S.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
4005
4034
|
);
|
|
4006
|
-
if (
|
|
4035
|
+
if (B.length === 0) return;
|
|
4007
4036
|
z.preventDefault();
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4010
|
-
}, A = (z,
|
|
4037
|
+
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;
|
|
4038
|
+
B[$]?.focus();
|
|
4039
|
+
}, A = (z, H) => r ? r(z, H) : H, w = (z) => E.includes(z), ee = (z, H) => {
|
|
4011
4040
|
W && W(
|
|
4012
|
-
|
|
4041
|
+
H ? [...E, z] : E.filter((B) => B !== z)
|
|
4013
4042
|
);
|
|
4014
4043
|
}, ae = (z) => W?.(z ? [...t] : []), le = d(
|
|
4015
4044
|
"flex flex-col",
|
|
4016
4045
|
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4017
|
-
|
|
4046
|
+
P
|
|
4018
4047
|
);
|
|
4019
4048
|
if (K)
|
|
4020
|
-
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z,
|
|
4049
|
+
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z, H) => /* @__PURE__ */ c(
|
|
4021
4050
|
"div",
|
|
4022
4051
|
{
|
|
4023
4052
|
className: d(
|
|
4024
4053
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
4025
|
-
n === "divided" &&
|
|
4054
|
+
n === "divided" && H > 0 && "border-t border-border-subtle"
|
|
4026
4055
|
),
|
|
4027
4056
|
children: [
|
|
4028
4057
|
/* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
|
|
@@ -4031,12 +4060,12 @@ function En({
|
|
|
4031
4060
|
/* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
|
|
4032
4061
|
]
|
|
4033
4062
|
},
|
|
4034
|
-
`skeleton-${
|
|
4063
|
+
`skeleton-${H}`
|
|
4035
4064
|
)) });
|
|
4036
4065
|
if (t.length === 0 && q)
|
|
4037
4066
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4038
|
-
const G = t.length > 0 && E.length === t.length,
|
|
4039
|
-
const
|
|
4067
|
+
const G = t.length > 0 && E.length === t.length, j = E.length > 0 && !G, M = (z, H, B) => {
|
|
4068
|
+
const O = u?.(z, H) ?? !1, $ = N?.(z, H) ?? !1, L = m?.(z, H) ?? !1, te = D && w(z);
|
|
4040
4069
|
return /* @__PURE__ */ c(
|
|
4041
4070
|
"li",
|
|
4042
4071
|
{
|
|
@@ -4044,24 +4073,30 @@ function En({
|
|
|
4044
4073
|
role: "button",
|
|
4045
4074
|
tabIndex: 0,
|
|
4046
4075
|
"data-list-row": "",
|
|
4047
|
-
"aria-current":
|
|
4048
|
-
onClick: () => o(z,
|
|
4049
|
-
onFocus: () => h?.(
|
|
4076
|
+
"aria-current": O || void 0,
|
|
4077
|
+
onClick: () => o(z, H),
|
|
4078
|
+
onFocus: () => h?.(H),
|
|
4050
4079
|
onKeyDown: (v) => {
|
|
4051
|
-
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), o(z,
|
|
4080
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), o(z, H));
|
|
4052
4081
|
}
|
|
4053
4082
|
} : {},
|
|
4054
4083
|
className: d(
|
|
4055
|
-
"flex items-center gap-3
|
|
4084
|
+
"flex items-center gap-3 text-base",
|
|
4056
4085
|
"transition-colors duration-fast ease-out",
|
|
4057
|
-
n === "
|
|
4086
|
+
n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
|
|
4087
|
+
n === "divided" && !B && "border-t border-border-subtle",
|
|
4058
4088
|
o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4089
|
+
// An unread row is tinted, not bolded: at five columns a bold row
|
|
4090
|
+
// shouts across all of them, while the tint marks the row and leaves
|
|
4091
|
+
// the consumer free to weight only the sender and the subject.
|
|
4092
|
+
O || te ? "bg-accent-soft text-text" : $ ? d("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
|
|
4093
|
+
// Read rows stay at full opacity — fading them also fades the avatars
|
|
4094
|
+
// and team dots, which is exactly the identity you scan by. They read
|
|
4095
|
+
// as secondary through weight and text colour instead.
|
|
4096
|
+
L && "text-text-muted"
|
|
4062
4097
|
),
|
|
4063
4098
|
children: [
|
|
4064
|
-
|
|
4099
|
+
D && /* @__PURE__ */ e("span", { onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4065
4100
|
pe,
|
|
4066
4101
|
{
|
|
4067
4102
|
checked: w(z),
|
|
@@ -4076,98 +4111,124 @@ function En({
|
|
|
4076
4111
|
className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
|
|
4077
4112
|
}
|
|
4078
4113
|
),
|
|
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,
|
|
4114
|
+
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z, H) }),
|
|
4115
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z, H) : String(z) }),
|
|
4116
|
+
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(z, H) })
|
|
4082
4117
|
]
|
|
4083
4118
|
},
|
|
4084
|
-
A(z,
|
|
4119
|
+
A(z, H)
|
|
4085
4120
|
);
|
|
4086
|
-
},
|
|
4121
|
+
}, _ = (() => {
|
|
4087
4122
|
if (!f)
|
|
4088
|
-
return t.map((
|
|
4123
|
+
return t.map((O, $) => M(O, $, $ === 0));
|
|
4089
4124
|
const z = /* @__PURE__ */ new Map();
|
|
4090
|
-
t.forEach((
|
|
4091
|
-
const L = f(
|
|
4092
|
-
z.has(L) || z.set(L, []), z.get(L).push({ item:
|
|
4125
|
+
t.forEach((O, $) => {
|
|
4126
|
+
const L = f(O, $);
|
|
4127
|
+
z.has(L) || z.set(L, []), z.get(L).push({ item: O, index: $ });
|
|
4093
4128
|
});
|
|
4094
|
-
const
|
|
4129
|
+
const H = b ?? [];
|
|
4095
4130
|
return [
|
|
4096
|
-
...
|
|
4097
|
-
...[...z.keys()].filter((
|
|
4098
|
-
].flatMap((
|
|
4099
|
-
const L = z.get(
|
|
4131
|
+
...H.filter((O) => z.has(O.id)),
|
|
4132
|
+
...[...z.keys()].filter((O) => !H.some(($) => $.id === O)).map((O) => ({ id: O }))
|
|
4133
|
+
].flatMap((O, $) => {
|
|
4134
|
+
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
4135
|
"li",
|
|
4101
4136
|
{
|
|
4102
|
-
onClick: g ? () => i((J) => ({ ...J, [
|
|
4137
|
+
onClick: g ? () => i((J) => ({ ...J, [O.id]: !J[O.id] })) : void 0,
|
|
4103
4138
|
className: d(
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
"
|
|
4139
|
+
// A caption over its rows, not a band across the table: same
|
|
4140
|
+
// surface as the rows, no rules, and the count as a quiet pill.
|
|
4141
|
+
// The old grey uppercase strip read as a second column header.
|
|
4142
|
+
"flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
|
|
4143
|
+
$ > 0 ? "pt-5" : "pt-3",
|
|
4144
|
+
O.tone === "danger" ? "text-danger-fg" : O.tone === "muted" ? "text-text-subtle" : "text-text",
|
|
4109
4145
|
C && "sticky z-10",
|
|
4110
|
-
g && "cursor-pointer select-none
|
|
4146
|
+
g && "cursor-pointer select-none"
|
|
4111
4147
|
),
|
|
4112
4148
|
"aria-expanded": g ? !te : void 0,
|
|
4113
4149
|
style: C ? { top: U ? 28 : 0 } : void 0,
|
|
4114
|
-
children: p ? p(
|
|
4150
|
+
children: p ? p(O, L.map((J) => J.item)) : /* @__PURE__ */ c(xe, { children: [
|
|
4115
4151
|
g && /* @__PURE__ */ e(
|
|
4116
4152
|
Ce,
|
|
4117
4153
|
{
|
|
4118
4154
|
"aria-hidden": !0,
|
|
4119
4155
|
className: d(
|
|
4120
|
-
"size-icon-
|
|
4156
|
+
"size-icon-md shrink-0 text-text-subtle transition-transform duration-fast ease-out",
|
|
4121
4157
|
!te && "rotate-90"
|
|
4122
4158
|
)
|
|
4123
4159
|
}
|
|
4124
4160
|
),
|
|
4125
4161
|
/* @__PURE__ */ e("span", { children: v }),
|
|
4126
|
-
!x && /* @__PURE__ */ e(
|
|
4162
|
+
!x && /* @__PURE__ */ e(
|
|
4163
|
+
"span",
|
|
4164
|
+
{
|
|
4165
|
+
className: d(
|
|
4166
|
+
"rounded-full px-2 text-xs font-normal tabular-nums",
|
|
4167
|
+
O.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
|
|
4168
|
+
),
|
|
4169
|
+
children: V
|
|
4170
|
+
}
|
|
4171
|
+
)
|
|
4127
4172
|
] })
|
|
4128
4173
|
},
|
|
4129
|
-
`group-${
|
|
4174
|
+
`group-${O.id}`
|
|
4130
4175
|
);
|
|
4131
4176
|
return te ? [Z] : [
|
|
4132
4177
|
Z,
|
|
4133
4178
|
...L.map(
|
|
4134
|
-
({ item: J, index:
|
|
4179
|
+
({ item: J, index: F }, ie) => M(J, F, ie === 0)
|
|
4135
4180
|
)
|
|
4136
4181
|
];
|
|
4137
4182
|
});
|
|
4138
4183
|
})();
|
|
4139
4184
|
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(
|
|
4185
|
+
X && /* @__PURE__ */ c(
|
|
4157
4186
|
"div",
|
|
4158
4187
|
{
|
|
4159
4188
|
className: d(
|
|
4160
|
-
|
|
4161
|
-
|
|
4189
|
+
// h-row-sm keeps the strip exactly 28px, which is the offset the
|
|
4190
|
+
// sticky group headers park against.
|
|
4191
|
+
"flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
|
|
4192
|
+
"text-xs font-semibold uppercase tracking-wider text-text-disabled",
|
|
4162
4193
|
U && "sticky top-0 z-20"
|
|
4163
4194
|
),
|
|
4164
|
-
children:
|
|
4195
|
+
children: [
|
|
4196
|
+
D && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
4197
|
+
pe,
|
|
4198
|
+
{
|
|
4199
|
+
checked: G,
|
|
4200
|
+
indeterminate: j,
|
|
4201
|
+
onChange: (z) => ae(z.target.checked),
|
|
4202
|
+
"aria-label": "Alles selecteren"
|
|
4203
|
+
}
|
|
4204
|
+
) }),
|
|
4205
|
+
X
|
|
4206
|
+
]
|
|
4165
4207
|
}
|
|
4166
4208
|
),
|
|
4167
|
-
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children:
|
|
4209
|
+
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: _ }),
|
|
4210
|
+
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: [
|
|
4211
|
+
/* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
|
|
4212
|
+
E.length,
|
|
4213
|
+
" geselecteerd"
|
|
4214
|
+
] }),
|
|
4215
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
4216
|
+
T,
|
|
4217
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
4218
|
+
/* @__PURE__ */ e(
|
|
4219
|
+
"button",
|
|
4220
|
+
{
|
|
4221
|
+
type: "button",
|
|
4222
|
+
onClick: () => W?.([]),
|
|
4223
|
+
"aria-label": "Selectie wissen",
|
|
4224
|
+
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",
|
|
4225
|
+
children: /* @__PURE__ */ e(ge, { className: "size-icon-lg" })
|
|
4226
|
+
}
|
|
4227
|
+
)
|
|
4228
|
+
] }) })
|
|
4168
4229
|
] });
|
|
4169
4230
|
}
|
|
4170
|
-
function
|
|
4231
|
+
function Tn({
|
|
4171
4232
|
side: t,
|
|
4172
4233
|
continued: r = !1,
|
|
4173
4234
|
tone: n = "default",
|
|
@@ -4197,18 +4258,18 @@ function Mn({
|
|
|
4197
4258
|
}
|
|
4198
4259
|
);
|
|
4199
4260
|
}
|
|
4200
|
-
const
|
|
4261
|
+
const Tr = {
|
|
4201
4262
|
default: "text-text",
|
|
4202
4263
|
urgent: "text-danger-fg",
|
|
4203
4264
|
success: "text-success-fg"
|
|
4204
4265
|
};
|
|
4205
|
-
function
|
|
4206
|
-
return /* @__PURE__ */ c("div", { className: d("rounded-xl
|
|
4207
|
-
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold",
|
|
4266
|
+
function _n({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4267
|
+
return /* @__PURE__ */ c("div", { className: d("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
|
|
4268
|
+
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Tr[n]), children: t }),
|
|
4208
4269
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4209
4270
|
] });
|
|
4210
4271
|
}
|
|
4211
|
-
const
|
|
4272
|
+
const An = ({
|
|
4212
4273
|
surface: t = !1,
|
|
4213
4274
|
title: r,
|
|
4214
4275
|
subtitle: n,
|
|
@@ -4228,12 +4289,12 @@ const Dn = ({
|
|
|
4228
4289
|
}, [r]), Q(() => {
|
|
4229
4290
|
b && x.current && (x.current.focus(), x.current.select());
|
|
4230
4291
|
}, [b]);
|
|
4231
|
-
const
|
|
4292
|
+
const D = () => {
|
|
4232
4293
|
m && p(!0);
|
|
4233
4294
|
}, E = () => {
|
|
4234
4295
|
p(!1), C.trim() !== "" && C !== r && f ? f(C.trim()) : g(r);
|
|
4235
|
-
}, W = (
|
|
4236
|
-
|
|
4296
|
+
}, W = (T) => {
|
|
4297
|
+
T.key === "Enter" ? x.current?.blur() : T.key === "Escape" && (g(r), p(!1));
|
|
4237
4298
|
};
|
|
4238
4299
|
return /* @__PURE__ */ c(
|
|
4239
4300
|
"div",
|
|
@@ -4258,7 +4319,7 @@ const Dn = ({
|
|
|
4258
4319
|
ref: x,
|
|
4259
4320
|
type: "text",
|
|
4260
4321
|
value: C,
|
|
4261
|
-
onChange: (
|
|
4322
|
+
onChange: (T) => g(T.target.value),
|
|
4262
4323
|
onBlur: E,
|
|
4263
4324
|
onKeyDown: W,
|
|
4264
4325
|
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 +4328,7 @@ const Dn = ({
|
|
|
4267
4328
|
/* @__PURE__ */ e(
|
|
4268
4329
|
"h2",
|
|
4269
4330
|
{
|
|
4270
|
-
onClick:
|
|
4331
|
+
onClick: D,
|
|
4271
4332
|
className: d(
|
|
4272
4333
|
"text-lg font-semibold tracking-title truncate",
|
|
4273
4334
|
m && "cursor-pointer"
|
|
@@ -4278,10 +4339,10 @@ const Dn = ({
|
|
|
4278
4339
|
),
|
|
4279
4340
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4280
4341
|
m && /* @__PURE__ */ e(
|
|
4281
|
-
|
|
4342
|
+
mt,
|
|
4282
4343
|
{
|
|
4283
4344
|
size: 15,
|
|
4284
|
-
onClick:
|
|
4345
|
+
onClick: D,
|
|
4285
4346
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4286
4347
|
}
|
|
4287
4348
|
)
|
|
@@ -4290,29 +4351,29 @@ const Dn = ({
|
|
|
4290
4351
|
] })
|
|
4291
4352
|
] }) }),
|
|
4292
4353
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4293
|
-
(
|
|
4354
|
+
(T) => T.render ? /* @__PURE__ */ e(oe.Fragment, { children: T.render() }, T.id) : T.splitOptions && T.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4294
4355
|
Re,
|
|
4295
4356
|
{
|
|
4296
|
-
label:
|
|
4297
|
-
onClick:
|
|
4298
|
-
icon:
|
|
4299
|
-
variant:
|
|
4300
|
-
options:
|
|
4301
|
-
disabled:
|
|
4357
|
+
label: T.label,
|
|
4358
|
+
onClick: T.onClick,
|
|
4359
|
+
icon: T.icon,
|
|
4360
|
+
variant: T.variant === "primary" ? "primary" : "outline",
|
|
4361
|
+
options: T.splitOptions,
|
|
4362
|
+
disabled: T.disabled
|
|
4302
4363
|
},
|
|
4303
|
-
|
|
4364
|
+
T.id
|
|
4304
4365
|
) : /* @__PURE__ */ e(
|
|
4305
4366
|
ne,
|
|
4306
4367
|
{
|
|
4307
|
-
variant:
|
|
4368
|
+
variant: T.variant ?? "secondary",
|
|
4308
4369
|
onClick: (X) => {
|
|
4309
|
-
X.stopPropagation(), X.target.blur(),
|
|
4370
|
+
X.stopPropagation(), X.target.blur(), T.onClick();
|
|
4310
4371
|
},
|
|
4311
|
-
disabled:
|
|
4312
|
-
leftIcon:
|
|
4313
|
-
children:
|
|
4372
|
+
disabled: T.disabled,
|
|
4373
|
+
leftIcon: T.icon,
|
|
4374
|
+
children: T.label
|
|
4314
4375
|
},
|
|
4315
|
-
|
|
4376
|
+
T.id
|
|
4316
4377
|
)
|
|
4317
4378
|
) })
|
|
4318
4379
|
] }),
|
|
@@ -4320,19 +4381,19 @@ const Dn = ({
|
|
|
4320
4381
|
]
|
|
4321
4382
|
}
|
|
4322
4383
|
);
|
|
4323
|
-
},
|
|
4384
|
+
}, _r = {
|
|
4324
4385
|
none: "p-0",
|
|
4325
4386
|
sm: "p-2",
|
|
4326
4387
|
md: "p-4",
|
|
4327
4388
|
lg: "p-6"
|
|
4328
|
-
},
|
|
4389
|
+
}, Ln = ({
|
|
4329
4390
|
actions: t = [],
|
|
4330
4391
|
onBack: r,
|
|
4331
4392
|
backLabel: n = "Back",
|
|
4332
4393
|
className: s,
|
|
4333
4394
|
padding: a = "md",
|
|
4334
4395
|
children: l
|
|
4335
|
-
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3",
|
|
4396
|
+
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3", _r[a], s), children: [
|
|
4336
4397
|
r && /* @__PURE__ */ e(ne, { variant: "secondary", onClick: r, leftIcon: /* @__PURE__ */ e(Y, { icon: ke, size: "sm" }), iconOnly: !0 }),
|
|
4337
4398
|
l && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: l }),
|
|
4338
4399
|
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !l && "ml-auto"), children: t.map(
|
|
@@ -4362,7 +4423,7 @@ const Dn = ({
|
|
|
4362
4423
|
o.id
|
|
4363
4424
|
)
|
|
4364
4425
|
) })
|
|
4365
|
-
] }),
|
|
4426
|
+
] }), Ar = /<[a-z][\s\S]*>/i, Lr = [
|
|
4366
4427
|
"[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
|
|
4367
4428
|
"[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
|
|
4368
4429
|
"[&_strong]:font-semibold [&_em]:italic",
|
|
@@ -4377,7 +4438,7 @@ const Dn = ({
|
|
|
4377
4438
|
"[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
|
|
4378
4439
|
"[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
|
|
4379
4440
|
"[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
|
|
4380
|
-
].join(" "),
|
|
4441
|
+
].join(" "), Ir = {
|
|
4381
4442
|
p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
|
|
4382
4443
|
a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
|
|
4383
4444
|
strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
|
|
@@ -4400,17 +4461,17 @@ const Dn = ({
|
|
|
4400
4461
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4401
4462
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4402
4463
|
};
|
|
4403
|
-
function
|
|
4464
|
+
function In({ text: t, className: r, as: n }) {
|
|
4404
4465
|
const s = t ?? "";
|
|
4405
|
-
return (n ? n === "html" :
|
|
4466
|
+
return (n ? n === "html" : Ar.test(s)) ? /* @__PURE__ */ e(
|
|
4406
4467
|
"div",
|
|
4407
4468
|
{
|
|
4408
|
-
className: d("break-words",
|
|
4409
|
-
dangerouslySetInnerHTML: { __html:
|
|
4469
|
+
className: d("break-words", Lr, r),
|
|
4470
|
+
dangerouslySetInnerHTML: { __html: pt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
|
|
4410
4471
|
}
|
|
4411
|
-
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(
|
|
4472
|
+
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(gt, { remarkPlugins: [vt], components: Ir, children: s }) });
|
|
4412
4473
|
}
|
|
4413
|
-
function
|
|
4474
|
+
function jn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4414
4475
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4415
4476
|
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
4477
|
n === "center" && a,
|
|
@@ -4419,7 +4480,7 @@ function An({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
4419
4480
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4420
4481
|
] });
|
|
4421
4482
|
}
|
|
4422
|
-
function
|
|
4483
|
+
function Pn({
|
|
4423
4484
|
label: t,
|
|
4424
4485
|
description: r,
|
|
4425
4486
|
control: n,
|
|
@@ -4446,7 +4507,7 @@ function Ln({
|
|
|
4446
4507
|
}
|
|
4447
4508
|
);
|
|
4448
4509
|
}
|
|
4449
|
-
function
|
|
4510
|
+
function On({
|
|
4450
4511
|
icon: t,
|
|
4451
4512
|
title: r,
|
|
4452
4513
|
description: n,
|
|
@@ -4466,7 +4527,7 @@ function In({
|
|
|
4466
4527
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4467
4528
|
] });
|
|
4468
4529
|
}
|
|
4469
|
-
function
|
|
4530
|
+
function Fn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4470
4531
|
return /* @__PURE__ */ c(
|
|
4471
4532
|
"button",
|
|
4472
4533
|
{
|
|
@@ -4479,18 +4540,18 @@ function Pn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
4479
4540
|
children: [
|
|
4480
4541
|
r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
|
|
4481
4542
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
|
|
4482
|
-
/* @__PURE__ */ e(Y, { icon:
|
|
4543
|
+
/* @__PURE__ */ e(Y, { icon: ft, size: "xs", className: "opacity-70" })
|
|
4483
4544
|
]
|
|
4484
4545
|
}
|
|
4485
4546
|
);
|
|
4486
4547
|
}
|
|
4487
|
-
function
|
|
4548
|
+
function jr(t, r) {
|
|
4488
4549
|
return r.split(".").reduce(
|
|
4489
4550
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
4490
4551
|
t
|
|
4491
4552
|
);
|
|
4492
4553
|
}
|
|
4493
|
-
const
|
|
4554
|
+
const Bn = ({
|
|
4494
4555
|
groups: t,
|
|
4495
4556
|
data: r,
|
|
4496
4557
|
size: n = "md",
|
|
@@ -4513,7 +4574,7 @@ const jn = ({
|
|
|
4513
4574
|
return b ? b.label : String(m || "-");
|
|
4514
4575
|
}, h = ue(
|
|
4515
4576
|
(m) => {
|
|
4516
|
-
const f =
|
|
4577
|
+
const f = jr(r, m.name);
|
|
4517
4578
|
if (m.type === "array") {
|
|
4518
4579
|
const p = f;
|
|
4519
4580
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -4544,7 +4605,7 @@ const jn = ({
|
|
|
4544
4605
|
}
|
|
4545
4606
|
) }),
|
|
4546
4607
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: m.arrayFields?.map((x) => {
|
|
4547
|
-
const
|
|
4608
|
+
const D = C?.[x.name];
|
|
4548
4609
|
let E = "-";
|
|
4549
4610
|
switch (x.type) {
|
|
4550
4611
|
case "text":
|
|
@@ -4553,30 +4614,30 @@ const jn = ({
|
|
|
4553
4614
|
case "tel":
|
|
4554
4615
|
case "url":
|
|
4555
4616
|
case "textarea":
|
|
4556
|
-
E =
|
|
4617
|
+
E = D || "-";
|
|
4557
4618
|
break;
|
|
4558
4619
|
case "select":
|
|
4559
4620
|
case "radio":
|
|
4560
4621
|
E = o(
|
|
4561
|
-
|
|
4622
|
+
D,
|
|
4562
4623
|
x.options
|
|
4563
4624
|
);
|
|
4564
4625
|
break;
|
|
4565
4626
|
case "checkbox":
|
|
4566
|
-
E = l(
|
|
4627
|
+
E = l(D);
|
|
4567
4628
|
break;
|
|
4568
4629
|
case "date":
|
|
4569
|
-
E = a(
|
|
4630
|
+
E = a(D);
|
|
4570
4631
|
break;
|
|
4571
4632
|
case "custom":
|
|
4572
4633
|
E = x.customComponent?.({
|
|
4573
|
-
value:
|
|
4634
|
+
value: D
|
|
4574
4635
|
});
|
|
4575
4636
|
break;
|
|
4576
4637
|
default:
|
|
4577
|
-
E = String(
|
|
4638
|
+
E = String(D || "-");
|
|
4578
4639
|
}
|
|
4579
|
-
return x.format && (E = x.format(
|
|
4640
|
+
return x.format && (E = x.format(D, C)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4580
4641
|
/* @__PURE__ */ e(
|
|
4581
4642
|
de,
|
|
4582
4643
|
{
|
|
@@ -4739,7 +4800,7 @@ const jn = ({
|
|
|
4739
4800
|
s
|
|
4740
4801
|
);
|
|
4741
4802
|
return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(u) }) });
|
|
4742
|
-
},
|
|
4803
|
+
}, Ue = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
4743
4804
|
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
4744
4805
|
if (a)
|
|
4745
4806
|
return /* @__PURE__ */ c("li", { children: [
|
|
@@ -4756,7 +4817,7 @@ const jn = ({
|
|
|
4756
4817
|
}
|
|
4757
4818
|
),
|
|
4758
4819
|
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((u, N) => /* @__PURE__ */ e(
|
|
4759
|
-
|
|
4820
|
+
Ue,
|
|
4760
4821
|
{
|
|
4761
4822
|
item: u,
|
|
4762
4823
|
isSelectedHandler: r,
|
|
@@ -4831,7 +4892,7 @@ const jn = ({
|
|
|
4831
4892
|
]
|
|
4832
4893
|
}
|
|
4833
4894
|
) });
|
|
4834
|
-
},
|
|
4895
|
+
}, Rn = ({
|
|
4835
4896
|
items: t,
|
|
4836
4897
|
isSelectedHandler: r,
|
|
4837
4898
|
onClick: n,
|
|
@@ -4840,7 +4901,7 @@ const jn = ({
|
|
|
4840
4901
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
4841
4902
|
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
4842
4903
|
(a, l) => !a.path && !a.label && !a.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, l) : /* @__PURE__ */ e(
|
|
4843
|
-
|
|
4904
|
+
Ue,
|
|
4844
4905
|
{
|
|
4845
4906
|
item: a,
|
|
4846
4907
|
isSelectedHandler: r,
|
|
@@ -4858,13 +4919,13 @@ const jn = ({
|
|
|
4858
4919
|
"2xl": "text-2xl",
|
|
4859
4920
|
"3xl": "text-3xl",
|
|
4860
4921
|
"4xl": "text-3xl"
|
|
4861
|
-
},
|
|
4922
|
+
}, Or = {
|
|
4862
4923
|
light: "font-normal",
|
|
4863
4924
|
normal: "font-normal",
|
|
4864
4925
|
medium: "font-medium",
|
|
4865
4926
|
semibold: "font-semibold",
|
|
4866
4927
|
bold: "font-bold"
|
|
4867
|
-
},
|
|
4928
|
+
}, Fr = {
|
|
4868
4929
|
primary: "text-text",
|
|
4869
4930
|
secondary: "text-text-muted",
|
|
4870
4931
|
accent: "text-accent",
|
|
@@ -4874,11 +4935,11 @@ const jn = ({
|
|
|
4874
4935
|
info: "text-info-fg",
|
|
4875
4936
|
neutral: "text-text",
|
|
4876
4937
|
current: "text-current"
|
|
4877
|
-
},
|
|
4938
|
+
}, Br = {
|
|
4878
4939
|
left: "text-left",
|
|
4879
4940
|
center: "text-center",
|
|
4880
4941
|
right: "text-right"
|
|
4881
|
-
},
|
|
4942
|
+
}, Hn = ({
|
|
4882
4943
|
level: t = 1,
|
|
4883
4944
|
size: r,
|
|
4884
4945
|
weight: n = "semibold",
|
|
@@ -4892,9 +4953,9 @@ const jn = ({
|
|
|
4892
4953
|
const N = `h${t}`, m = d(
|
|
4893
4954
|
"font-sans text-pretty",
|
|
4894
4955
|
Pr[r || Rr(t)],
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4956
|
+
Or[n],
|
|
4957
|
+
Fr[s],
|
|
4958
|
+
Br[a],
|
|
4898
4959
|
l && "truncate",
|
|
4899
4960
|
o
|
|
4900
4961
|
);
|
|
@@ -4910,7 +4971,7 @@ function Rr(t) {
|
|
|
4910
4971
|
6: "md"
|
|
4911
4972
|
}[t] || "md";
|
|
4912
4973
|
}
|
|
4913
|
-
const
|
|
4974
|
+
const Vn = ({
|
|
4914
4975
|
commands: t,
|
|
4915
4976
|
isOpen: r,
|
|
4916
4977
|
onClose: n,
|
|
@@ -4924,19 +4985,19 @@ const Rn = ({
|
|
|
4924
4985
|
return Q(() => {
|
|
4925
4986
|
r || (h(""), N(a || []), f(l || 0));
|
|
4926
4987
|
}, [r]), Q(() => {
|
|
4927
|
-
const x = (
|
|
4988
|
+
const x = (D) => {
|
|
4928
4989
|
if (r) {
|
|
4929
|
-
if (
|
|
4990
|
+
if (D.key === "Escape")
|
|
4930
4991
|
n();
|
|
4931
|
-
else if (
|
|
4992
|
+
else if (D.key === "ArrowUp")
|
|
4932
4993
|
f(
|
|
4933
4994
|
(E) => E > 0 ? E - 1 : g.length - 1
|
|
4934
4995
|
);
|
|
4935
|
-
else if (
|
|
4996
|
+
else if (D.key === "ArrowDown")
|
|
4936
4997
|
f(
|
|
4937
4998
|
(E) => E < g.length - 1 ? E + 1 : 0
|
|
4938
4999
|
);
|
|
4939
|
-
else if (
|
|
5000
|
+
else if (D.key === "Enter") {
|
|
4940
5001
|
const E = g[m];
|
|
4941
5002
|
E && (E.subCommands ? (N([...u, E.id]), f(0)) : E.action && (E.action(), n()));
|
|
4942
5003
|
}
|
|
@@ -4944,8 +5005,8 @@ const Rn = ({
|
|
|
4944
5005
|
};
|
|
4945
5006
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
4946
5007
|
}, [r, n, g, m, u]), Q(() => {
|
|
4947
|
-
const x = (
|
|
4948
|
-
b.current && !b.current.contains(
|
|
5008
|
+
const x = (D) => {
|
|
5009
|
+
b.current && !b.current.contains(D.target) && n();
|
|
4949
5010
|
};
|
|
4950
5011
|
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
4951
5012
|
}, [r, n]), Q(() => {
|
|
@@ -4978,15 +5039,15 @@ const Rn = ({
|
|
|
4978
5039
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
4979
5040
|
children: [
|
|
4980
5041
|
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
4981
|
-
g.map((x,
|
|
5042
|
+
g.map((x, D) => /* @__PURE__ */ c(
|
|
4982
5043
|
"div",
|
|
4983
5044
|
{
|
|
4984
|
-
"data-index":
|
|
4985
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
5045
|
+
"data-index": D,
|
|
5046
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${D === m ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4986
5047
|
onClick: () => {
|
|
4987
5048
|
x.subCommands ? (N([...u, x.id]), f(0)) : x.action && (x.action(), n());
|
|
4988
5049
|
},
|
|
4989
|
-
onMouseEnter: () => f(
|
|
5050
|
+
onMouseEnter: () => f(D),
|
|
4990
5051
|
children: [
|
|
4991
5052
|
x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
|
|
4992
5053
|
/* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
|
|
@@ -5015,7 +5076,7 @@ const Rn = ({
|
|
|
5015
5076
|
]
|
|
5016
5077
|
}
|
|
5017
5078
|
) }) : null;
|
|
5018
|
-
},
|
|
5079
|
+
}, Hr = {
|
|
5019
5080
|
none: "p-0",
|
|
5020
5081
|
xs: "p-1",
|
|
5021
5082
|
sm: "p-2",
|
|
@@ -5023,7 +5084,7 @@ const Rn = ({
|
|
|
5023
5084
|
lg: "p-6",
|
|
5024
5085
|
xl: "p-8",
|
|
5025
5086
|
"2xl": "p-12"
|
|
5026
|
-
},
|
|
5087
|
+
}, Vr = {
|
|
5027
5088
|
none: "m-0",
|
|
5028
5089
|
xs: "m-1",
|
|
5029
5090
|
sm: "m-2",
|
|
@@ -5031,7 +5092,7 @@ const Rn = ({
|
|
|
5031
5092
|
lg: "m-6",
|
|
5032
5093
|
xl: "m-8",
|
|
5033
5094
|
"2xl": "m-12"
|
|
5034
|
-
},
|
|
5095
|
+
}, qr = {
|
|
5035
5096
|
none: "",
|
|
5036
5097
|
primary: "bg-accent text-accent-fg",
|
|
5037
5098
|
secondary: "bg-surface-hover",
|
|
@@ -5047,26 +5108,26 @@ const Rn = ({
|
|
|
5047
5108
|
backdrop: "bg-page",
|
|
5048
5109
|
editor: "bg-surface",
|
|
5049
5110
|
input: "bg-surface-input"
|
|
5050
|
-
},
|
|
5111
|
+
}, Ur = {
|
|
5051
5112
|
none: "rounded-none",
|
|
5052
5113
|
sm: "rounded-sm",
|
|
5053
5114
|
md: "rounded-md",
|
|
5054
5115
|
lg: "rounded-lg",
|
|
5055
5116
|
xl: "rounded-xl",
|
|
5056
5117
|
full: "rounded-full"
|
|
5057
|
-
},
|
|
5118
|
+
}, Wr = {
|
|
5058
5119
|
none: "shadow-none",
|
|
5059
5120
|
sm: "shadow-none",
|
|
5060
5121
|
md: "shadow-overlay",
|
|
5061
5122
|
lg: "shadow-overlay",
|
|
5062
5123
|
xl: "shadow-modal",
|
|
5063
5124
|
"2xl": "shadow-modal"
|
|
5064
|
-
},
|
|
5125
|
+
}, Kr = {
|
|
5065
5126
|
none: "border-0",
|
|
5066
5127
|
sm: "border",
|
|
5067
5128
|
md: "border-2",
|
|
5068
5129
|
lg: "border-4"
|
|
5069
|
-
},
|
|
5130
|
+
}, Gr = {
|
|
5070
5131
|
primary: "border-accent-border",
|
|
5071
5132
|
secondary: "border-border",
|
|
5072
5133
|
accent: "border-accent-border",
|
|
@@ -5076,7 +5137,7 @@ const Rn = ({
|
|
|
5076
5137
|
info: "border-info-border",
|
|
5077
5138
|
neutral: "border-border-subtle",
|
|
5078
5139
|
white: "border-border-subtle"
|
|
5079
|
-
},
|
|
5140
|
+
}, We = me(
|
|
5080
5141
|
({
|
|
5081
5142
|
padding: t,
|
|
5082
5143
|
margin: r,
|
|
@@ -5093,13 +5154,13 @@ const Rn = ({
|
|
|
5093
5154
|
{
|
|
5094
5155
|
ref: m,
|
|
5095
5156
|
className: d(
|
|
5096
|
-
t &&
|
|
5097
|
-
r &&
|
|
5098
|
-
n &&
|
|
5099
|
-
s &&
|
|
5100
|
-
a &&
|
|
5101
|
-
l &&
|
|
5102
|
-
o &&
|
|
5157
|
+
t && Hr[t],
|
|
5158
|
+
r && Vr[r],
|
|
5159
|
+
n && qr[n],
|
|
5160
|
+
s && Ur[s],
|
|
5161
|
+
a && Wr[a],
|
|
5162
|
+
l && Kr[l],
|
|
5163
|
+
o && Gr[o],
|
|
5103
5164
|
h
|
|
5104
5165
|
),
|
|
5105
5166
|
...N,
|
|
@@ -5107,9 +5168,9 @@ const Rn = ({
|
|
|
5107
5168
|
}
|
|
5108
5169
|
)
|
|
5109
5170
|
);
|
|
5110
|
-
|
|
5111
|
-
const
|
|
5112
|
-
|
|
5171
|
+
We.displayName = "Box";
|
|
5172
|
+
const qn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
5173
|
+
We,
|
|
5113
5174
|
{
|
|
5114
5175
|
background: "module",
|
|
5115
5176
|
radius: "lg",
|
|
@@ -5123,7 +5184,7 @@ const Bn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5123
5184
|
]
|
|
5124
5185
|
}
|
|
5125
5186
|
);
|
|
5126
|
-
function
|
|
5187
|
+
function Un({
|
|
5127
5188
|
identifier: t,
|
|
5128
5189
|
resourceLoader: r,
|
|
5129
5190
|
framework: n = "react",
|
|
@@ -5157,13 +5218,13 @@ function Hn({
|
|
|
5157
5218
|
const x = h.current;
|
|
5158
5219
|
if (x) {
|
|
5159
5220
|
if (n === "svelte") {
|
|
5160
|
-
const
|
|
5221
|
+
const D = b.default || b, E = new D({ target: x, props: l || {} });
|
|
5161
5222
|
return C.current = E, () => E.$destroy();
|
|
5162
5223
|
}
|
|
5163
5224
|
if (b.mount) {
|
|
5164
|
-
const
|
|
5225
|
+
const D = b.mount({ container: x, props: l || {} });
|
|
5165
5226
|
return () => {
|
|
5166
|
-
typeof
|
|
5227
|
+
typeof D == "function" ? D() : b.unmount?.(x);
|
|
5167
5228
|
};
|
|
5168
5229
|
}
|
|
5169
5230
|
}
|
|
@@ -5175,7 +5236,7 @@ function Hn({
|
|
|
5175
5236
|
n === "react" && !m && b && /* @__PURE__ */ e(b, { ...l })
|
|
5176
5237
|
] });
|
|
5177
5238
|
}
|
|
5178
|
-
class
|
|
5239
|
+
class Wn extends bt {
|
|
5179
5240
|
constructor() {
|
|
5180
5241
|
super(...arguments), this.state = {
|
|
5181
5242
|
hasError: !1,
|
|
@@ -5204,69 +5265,71 @@ class Vn extends xt {
|
|
|
5204
5265
|
}
|
|
5205
5266
|
}
|
|
5206
5267
|
export {
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5268
|
+
Sn as AssistantCard,
|
|
5269
|
+
Mr as Avatar,
|
|
5270
|
+
zn as AvatarStack,
|
|
5271
|
+
gn as Badge,
|
|
5272
|
+
We as Box,
|
|
5212
5273
|
ne as Button,
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5274
|
+
cn as ButtonGroup,
|
|
5275
|
+
qn as Card,
|
|
5276
|
+
En as ChannelBadge,
|
|
5216
5277
|
pe as Checkbox,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5278
|
+
Vn as CommandPalette,
|
|
5279
|
+
pn as ConfirmDialog,
|
|
5280
|
+
Kt as ContentLoading,
|
|
5220
5281
|
$e as DatePicker,
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5282
|
+
Gt as Dropdown,
|
|
5283
|
+
vn as EmptyState,
|
|
5284
|
+
Wn as ErrorBoundary,
|
|
5285
|
+
Un as FederatedResource,
|
|
5286
|
+
dn as FilterChip,
|
|
5226
5287
|
Rt as FolderSelect,
|
|
5227
|
-
|
|
5228
|
-
|
|
5288
|
+
bn as Form,
|
|
5289
|
+
Hn as Heading,
|
|
5229
5290
|
Y as Icon,
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
On as
|
|
5251
|
-
|
|
5252
|
-
|
|
5291
|
+
Mn as Image,
|
|
5292
|
+
yn as Kbd,
|
|
5293
|
+
_n as KpiCard,
|
|
5294
|
+
un as Link,
|
|
5295
|
+
Dn as List,
|
|
5296
|
+
$n as ListBulkAction,
|
|
5297
|
+
an as MeetingGrid,
|
|
5298
|
+
Tn as MessageBubble,
|
|
5299
|
+
qe as Modal,
|
|
5300
|
+
An as PageHeader,
|
|
5301
|
+
Ln as PageToolbar,
|
|
5302
|
+
ln as ParticipantTile,
|
|
5303
|
+
Dt as Popover,
|
|
5304
|
+
Nn as ProgressBar,
|
|
5305
|
+
In as RichText,
|
|
5306
|
+
Ut as SearchableTextField,
|
|
5307
|
+
jn as SectionDivider,
|
|
5308
|
+
mn as SegmentedToggle,
|
|
5309
|
+
we as Select,
|
|
5310
|
+
Pn as SettingsRow,
|
|
5311
|
+
On as SettingsSection,
|
|
5312
|
+
Rn as SidebarMenu,
|
|
5313
|
+
Fn as SourceChip,
|
|
5314
|
+
wn as Spinner,
|
|
5253
5315
|
Re as SplitButton,
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5316
|
+
kn as StatusDot,
|
|
5317
|
+
Cn as StepIndicator,
|
|
5318
|
+
mr as StorageInput,
|
|
5319
|
+
Wt as Switch,
|
|
5320
|
+
xn as TabBar,
|
|
5259
5321
|
Pe as Table,
|
|
5260
|
-
|
|
5322
|
+
sr as Tabs,
|
|
5261
5323
|
de as Text,
|
|
5262
5324
|
De as TextArea,
|
|
5263
5325
|
be as TextField,
|
|
5264
|
-
|
|
5265
|
-
|
|
5326
|
+
on as VideoSurface,
|
|
5327
|
+
Bn as View,
|
|
5328
|
+
sn as catTone,
|
|
5266
5329
|
d as cn,
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5330
|
+
nn as createSizes,
|
|
5331
|
+
rn as createVariants,
|
|
5332
|
+
fn as dateFilterHandler,
|
|
5333
|
+
hn as selectFilterHandler
|
|
5271
5334
|
};
|
|
5272
5335
|
//# sourceMappingURL=index.js.map
|