@opencxh/ui-kit 3.125.0 → 3.132.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +800 -745
- package/dist/index.js.map +1 -1
- package/dist/src/content/RichText.d.ts +14 -0
- package/dist/src/forms/Form.d.ts +6 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { clsx as
|
|
1
|
+
import { clsx as We } 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
|
|
3
|
+
import { VideoOff as Ke, User as Ge, MicOff as Je, Mic as Ye, X as we, ChevronDown as ge, ExternalLink as Xe, Calendar as Ze, ChevronLeft as ke, ChevronRight as Ce, ChevronDownIcon as Qe, Loader2 as et, Search as Se, Check as Te, ChevronUp as tt, ChevronsLeft as rt, ChevronsRight as nt, FileText as Ee, HardDrive as _e, ArrowLeft as st, FolderPlus as at, Upload as lt, Folder as Ae, Trash2 as ot, Plus as ct, Sparkles as it, ImageOff as dt, Pencil as ut, ArrowUpRight as mt } from "lucide-react";
|
|
4
|
+
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as F, useLayoutEffect as ft, useMemo as he, useCallback as ue, createContext as ht, Component as xt } from "react";
|
|
5
|
+
import bt from "dompurify";
|
|
6
|
+
import pt from "react-markdown";
|
|
7
|
+
import gt from "remark-gfm";
|
|
5
8
|
function d(...t) {
|
|
6
|
-
return
|
|
9
|
+
return We(t);
|
|
7
10
|
}
|
|
8
|
-
function
|
|
11
|
+
function tn(t) {
|
|
9
12
|
return (r, n) => t[r]?.[n] || "";
|
|
10
13
|
}
|
|
11
|
-
function
|
|
14
|
+
function rn(t) {
|
|
12
15
|
return (r) => t[r] || "";
|
|
13
16
|
}
|
|
14
|
-
function
|
|
17
|
+
function nn({ tiles: t, pinned: r, className: n }) {
|
|
15
18
|
if (r)
|
|
16
19
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
|
|
17
20
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
|
|
@@ -20,7 +23,7 @@ function Gr({ tiles: t, pinned: r, className: n }) {
|
|
|
20
23
|
const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
21
24
|
return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a, o) => /* @__PURE__ */ e("div", { children: a }, o)) });
|
|
22
25
|
}
|
|
23
|
-
function
|
|
26
|
+
function sn({
|
|
24
27
|
name: t,
|
|
25
28
|
avatarUrl: r,
|
|
26
29
|
muted: n,
|
|
@@ -40,7 +43,7 @@ function Jr({
|
|
|
40
43
|
l
|
|
41
44
|
),
|
|
42
45
|
children: [
|
|
43
|
-
a && o ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: o }) : /* @__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(
|
|
46
|
+
a && o ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: o }) : /* @__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(Ke, { className: "w-8 h-8" }) : /* @__PURE__ */ e(Ge, { className: "w-8 h-8" }) }) }),
|
|
44
47
|
/* @__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: [
|
|
45
48
|
n ? /* @__PURE__ */ e(Je, { className: "w-3 h-3" }) : /* @__PURE__ */ e(Ye, { className: "w-3 h-3" }),
|
|
46
49
|
/* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
|
|
@@ -49,7 +52,7 @@ function Jr({
|
|
|
49
52
|
}
|
|
50
53
|
);
|
|
51
54
|
}
|
|
52
|
-
function
|
|
55
|
+
function an({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
53
56
|
const a = se(null);
|
|
54
57
|
return Q(() => {
|
|
55
58
|
if (!r || !a.current) return;
|
|
@@ -69,7 +72,7 @@ function Yr({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
69
72
|
}
|
|
70
73
|
);
|
|
71
74
|
}
|
|
72
|
-
const
|
|
75
|
+
const vt = {
|
|
73
76
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
|
|
74
77
|
secondary: "bg-gray-100 text-text hover:bg-surface-hover disabled:bg-surface-hover",
|
|
75
78
|
// No resting fill, so no disabled fill either — a greyed-out plate where
|
|
@@ -82,7 +85,7 @@ const bt = {
|
|
|
82
85
|
success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
83
86
|
warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
84
87
|
"danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
|
|
85
|
-
},
|
|
88
|
+
}, yt = {
|
|
86
89
|
xs: "h-control-xs px-2 text-xs",
|
|
87
90
|
sm: "h-control-sm px-3 text-sm",
|
|
88
91
|
md: "h-control-md px-4 text-sm",
|
|
@@ -90,7 +93,7 @@ const bt = {
|
|
|
90
93
|
xl: "h-control-xl px-6 text-base",
|
|
91
94
|
"2xl": "h-control-2xl px-6 text-base",
|
|
92
95
|
full: "h-control-md px-4 text-sm"
|
|
93
|
-
},
|
|
96
|
+
}, Nt = {
|
|
94
97
|
xs: "h-control-xs w-6",
|
|
95
98
|
sm: "h-control-sm w-7",
|
|
96
99
|
md: "h-control-md w-8",
|
|
@@ -126,8 +129,8 @@ const bt = {
|
|
|
126
129
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
127
130
|
"disabled:cursor-not-allowed disabled:border-border-subtle",
|
|
128
131
|
"disabled:text-text-disabled",
|
|
129
|
-
|
|
130
|
-
l ?
|
|
132
|
+
vt[t],
|
|
133
|
+
l ? Nt[r] : yt[r],
|
|
131
134
|
(n || r === "full") && "w-full",
|
|
132
135
|
s && "cursor-wait",
|
|
133
136
|
m
|
|
@@ -153,7 +156,7 @@ const bt = {
|
|
|
153
156
|
}
|
|
154
157
|
);
|
|
155
158
|
ne.displayName = "Button";
|
|
156
|
-
const
|
|
159
|
+
const ln = ({
|
|
157
160
|
children: t,
|
|
158
161
|
size: r = "md",
|
|
159
162
|
orientation: n = "horizontal",
|
|
@@ -183,7 +186,7 @@ const Xr = ({
|
|
|
183
186
|
a
|
|
184
187
|
);
|
|
185
188
|
return /* @__PURE__ */ e("div", { className: o, role: "group", children: t });
|
|
186
|
-
},
|
|
189
|
+
}, wt = {
|
|
187
190
|
primary: "text-text",
|
|
188
191
|
secondary: "text-text-muted",
|
|
189
192
|
accent: "text-accent",
|
|
@@ -203,9 +206,9 @@ const Xr = ({
|
|
|
203
206
|
"aria-label": l,
|
|
204
207
|
...u
|
|
205
208
|
}) => {
|
|
206
|
-
const m = typeof r == "number" ? r :
|
|
209
|
+
const m = typeof r == "number" ? r : kt(r), y = d(
|
|
207
210
|
"inline-block shrink-0",
|
|
208
|
-
|
|
211
|
+
wt[n],
|
|
209
212
|
s && [
|
|
210
213
|
"cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
|
|
211
214
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -227,7 +230,7 @@ const Xr = ({
|
|
|
227
230
|
};
|
|
228
231
|
return /* @__PURE__ */ e(t, { ...h });
|
|
229
232
|
};
|
|
230
|
-
function
|
|
233
|
+
function kt(t) {
|
|
231
234
|
return {
|
|
232
235
|
xs: 12,
|
|
233
236
|
sm: 14,
|
|
@@ -236,14 +239,14 @@ function yt(t) {
|
|
|
236
239
|
xl: 24
|
|
237
240
|
}[t];
|
|
238
241
|
}
|
|
239
|
-
const
|
|
242
|
+
const Ct = {
|
|
240
243
|
none: "border-none hover:bg-surface-hover hover:text-text",
|
|
241
244
|
default: "border-border text-text-muted hover:bg-surface-hover hover:text-text",
|
|
242
245
|
muted: "border-border text-text-subtle hover:bg-surface-hover hover:text-text",
|
|
243
246
|
warning: "border-warning-border bg-warning-soft text-warning-fg hover:bg-surface-hover",
|
|
244
247
|
danger: "border-danger-border bg-danger-soft text-danger-fg hover:bg-surface-hover"
|
|
245
248
|
};
|
|
246
|
-
function
|
|
249
|
+
function on({
|
|
247
250
|
label: t,
|
|
248
251
|
icon: r,
|
|
249
252
|
tone: n = "default",
|
|
@@ -264,7 +267,7 @@ function Zr({
|
|
|
264
267
|
"transition-colors duration-fast ease-out",
|
|
265
268
|
p,
|
|
266
269
|
// Picking a value outranks whatever the value happens to mean.
|
|
267
|
-
o ? "bg-accent text-accent-fg" : d("border",
|
|
270
|
+
o ? "bg-accent text-accent-fg" : d("border", Ct[n]),
|
|
268
271
|
f
|
|
269
272
|
), g = /* @__PURE__ */ c(xe, { children: [
|
|
270
273
|
r,
|
|
@@ -290,13 +293,13 @@ function Zr({
|
|
|
290
293
|
)
|
|
291
294
|
] }) : /* @__PURE__ */ e("button", { type: "button", title: h, onClick: y, className: d(w, b), children: g });
|
|
292
295
|
}
|
|
293
|
-
const
|
|
296
|
+
const St = {
|
|
294
297
|
xs: "text-xs",
|
|
295
298
|
sm: "text-sm",
|
|
296
299
|
md: "text-base",
|
|
297
300
|
lg: "text-md",
|
|
298
301
|
xl: "text-lg"
|
|
299
|
-
},
|
|
302
|
+
}, zt = {
|
|
300
303
|
primary: "text-text hover:text-info-fg hover:underline",
|
|
301
304
|
info: "text-info-fg hover:underline",
|
|
302
305
|
secondary: "text-text-muted hover:text-text",
|
|
@@ -305,7 +308,7 @@ const wt = {
|
|
|
305
308
|
success: "text-success-fg hover:underline",
|
|
306
309
|
warning: "text-warning-fg hover:underline",
|
|
307
310
|
error: "text-danger-fg hover:underline"
|
|
308
|
-
},
|
|
311
|
+
}, Et = {
|
|
309
312
|
primary: "bg-accent-soft",
|
|
310
313
|
accent: "bg-accent-soft",
|
|
311
314
|
secondary: "bg-surface-hover",
|
|
@@ -314,7 +317,7 @@ const wt = {
|
|
|
314
317
|
warning: "bg-warning-soft",
|
|
315
318
|
error: "bg-danger-soft",
|
|
316
319
|
info: "bg-info-soft"
|
|
317
|
-
},
|
|
320
|
+
}, cn = ({
|
|
318
321
|
variant: t = "default",
|
|
319
322
|
size: r = "md",
|
|
320
323
|
color: n = "primary",
|
|
@@ -331,13 +334,13 @@ const wt = {
|
|
|
331
334
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
332
335
|
"transition-colors duration-fast ease-out",
|
|
333
336
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
334
|
-
|
|
335
|
-
!s &&
|
|
337
|
+
St[r],
|
|
338
|
+
!s && zt[n],
|
|
336
339
|
t === "subtle" && "no-underline opacity-70 hover:opacity-100",
|
|
337
340
|
t === "underline" && "underline decoration-1 hover:decoration-2",
|
|
338
341
|
t === "button" && [
|
|
339
342
|
"h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
|
|
340
|
-
|
|
343
|
+
Et[n]
|
|
341
344
|
],
|
|
342
345
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
343
346
|
o
|
|
@@ -352,11 +355,11 @@ const wt = {
|
|
|
352
355
|
l,
|
|
353
356
|
f && /* @__PURE__ */ e(Xe, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
354
357
|
] });
|
|
355
|
-
},
|
|
358
|
+
}, Mt = {
|
|
356
359
|
sm: "h-control-sm px-3 text-sm",
|
|
357
360
|
md: "h-control-md px-3 text-sm"
|
|
358
361
|
};
|
|
359
|
-
function
|
|
362
|
+
function dn({
|
|
360
363
|
options: t,
|
|
361
364
|
value: r,
|
|
362
365
|
onChange: n,
|
|
@@ -383,7 +386,7 @@ function en({
|
|
|
383
386
|
"inline-flex items-center justify-center rounded-sm",
|
|
384
387
|
"transition-colors duration-fast ease-out",
|
|
385
388
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
386
|
-
|
|
389
|
+
Mt[s],
|
|
387
390
|
u ? "bg-surface text-text font-semibold" : "text-text-muted hover:text-text"
|
|
388
391
|
),
|
|
389
392
|
children: l.label
|
|
@@ -395,7 +398,7 @@ function en({
|
|
|
395
398
|
);
|
|
396
399
|
}
|
|
397
400
|
function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
398
|
-
const [o, l] =
|
|
401
|
+
const [o, l] = F({});
|
|
399
402
|
return ft(() => {
|
|
400
403
|
if (!t) return;
|
|
401
404
|
const u = () => {
|
|
@@ -409,7 +412,7 @@ function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
|
|
|
409
412
|
};
|
|
410
413
|
}, [t, r, n, s, a]), o;
|
|
411
414
|
}
|
|
412
|
-
const
|
|
415
|
+
const $t = ({
|
|
413
416
|
trigger: t,
|
|
414
417
|
children: r,
|
|
415
418
|
placement: n = "bottom-start",
|
|
@@ -419,13 +422,13 @@ const zt = ({
|
|
|
419
422
|
disabled: l = !1,
|
|
420
423
|
triggerLabel: u
|
|
421
424
|
}) => {
|
|
422
|
-
const [m, y] =
|
|
425
|
+
const [m, y] = F(!1), h = se(null), f = se(null), x = ze(m, f, { placement: n });
|
|
423
426
|
Q(() => {
|
|
424
427
|
if (!m) return;
|
|
425
|
-
const g = (
|
|
426
|
-
h.current && !h.current.contains(
|
|
427
|
-
}, b = (
|
|
428
|
-
|
|
428
|
+
const g = (A) => {
|
|
429
|
+
h.current && !h.current.contains(A.target) && y(!1);
|
|
430
|
+
}, b = (A) => {
|
|
431
|
+
A.key === "Escape" && y(!1);
|
|
429
432
|
};
|
|
430
433
|
return document.addEventListener("mousedown", g), document.addEventListener("keydown", b), () => {
|
|
431
434
|
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", b);
|
|
@@ -466,15 +469,15 @@ const zt = ({
|
|
|
466
469
|
}
|
|
467
470
|
)
|
|
468
471
|
] });
|
|
469
|
-
},
|
|
472
|
+
}, Dt = {
|
|
470
473
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover",
|
|
471
474
|
secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
|
|
472
475
|
outline: "border border-accent-border text-accent hover:bg-accent-soft"
|
|
473
|
-
},
|
|
476
|
+
}, Tt = {
|
|
474
477
|
sm: "h-control-sm w-7",
|
|
475
478
|
md: "h-control-md w-8"
|
|
476
479
|
};
|
|
477
|
-
function
|
|
480
|
+
function Fe({
|
|
478
481
|
label: t,
|
|
479
482
|
onClick: r,
|
|
480
483
|
variant: n = "primary",
|
|
@@ -502,7 +505,7 @@ function Re({
|
|
|
502
505
|
}
|
|
503
506
|
),
|
|
504
507
|
f && /* @__PURE__ */ e(
|
|
505
|
-
|
|
508
|
+
$t,
|
|
506
509
|
{
|
|
507
510
|
placement: m,
|
|
508
511
|
disabled: h,
|
|
@@ -515,8 +518,8 @@ function Re({
|
|
|
515
518
|
className: d(
|
|
516
519
|
"inline-flex items-center justify-center rounded-md rounded-l-none",
|
|
517
520
|
"transition-colors duration-fast ease-out",
|
|
518
|
-
|
|
519
|
-
|
|
521
|
+
Dt[n],
|
|
522
|
+
Tt[s],
|
|
520
523
|
h && "cursor-not-allowed opacity-50"
|
|
521
524
|
),
|
|
522
525
|
children: /* @__PURE__ */ e(ge, { className: "size-icon-md" })
|
|
@@ -546,17 +549,17 @@ function Re({
|
|
|
546
549
|
)
|
|
547
550
|
] });
|
|
548
551
|
}
|
|
549
|
-
const
|
|
552
|
+
const _t = {
|
|
550
553
|
sm: "size-checkbox-sm",
|
|
551
554
|
md: "size-checkbox",
|
|
552
555
|
lg: "size-checkbox-lg",
|
|
553
556
|
full: "size-checkbox"
|
|
554
|
-
},
|
|
557
|
+
}, At = {
|
|
555
558
|
sm: "min-h-control-sm",
|
|
556
559
|
md: "min-h-control-md",
|
|
557
560
|
lg: "min-h-control-lg",
|
|
558
561
|
full: "min-h-control-md"
|
|
559
|
-
},
|
|
562
|
+
}, Lt = {
|
|
560
563
|
sm: "text-sm",
|
|
561
564
|
md: "text-base",
|
|
562
565
|
lg: "text-md",
|
|
@@ -583,7 +586,7 @@ const $t = {
|
|
|
583
586
|
return oe.useEffect(() => {
|
|
584
587
|
w.current && (w.current.indeterminate = a);
|
|
585
588
|
}, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col", o), children: [
|
|
586
|
-
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3",
|
|
589
|
+
/* @__PURE__ */ c("div", { className: d("flex items-center gap-3", At[s]), children: [
|
|
587
590
|
/* @__PURE__ */ e(
|
|
588
591
|
"input",
|
|
589
592
|
{
|
|
@@ -598,7 +601,7 @@ const $t = {
|
|
|
598
601
|
"transition-colors duration-fast ease-out",
|
|
599
602
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
600
603
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
601
|
-
|
|
604
|
+
_t[s],
|
|
602
605
|
p ? "border-danger-border" : "border-border-strong",
|
|
603
606
|
u
|
|
604
607
|
),
|
|
@@ -613,7 +616,7 @@ const $t = {
|
|
|
613
616
|
className: d(
|
|
614
617
|
"cursor-pointer",
|
|
615
618
|
p ? "text-danger-fg" : "text-text",
|
|
616
|
-
|
|
619
|
+
Lt[s],
|
|
617
620
|
l
|
|
618
621
|
),
|
|
619
622
|
children: t
|
|
@@ -627,7 +630,7 @@ const $t = {
|
|
|
627
630
|
}
|
|
628
631
|
);
|
|
629
632
|
pe.displayName = "Checkbox";
|
|
630
|
-
const
|
|
633
|
+
const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }), jt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Pt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), $e = me(({
|
|
631
634
|
value: t,
|
|
632
635
|
onChange: r,
|
|
633
636
|
placeholder: n = "Select date",
|
|
@@ -640,7 +643,7 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
640
643
|
format: y = "MM/dd/yyyy",
|
|
641
644
|
withTime: h = !1
|
|
642
645
|
}, f) => {
|
|
643
|
-
const [x, p] =
|
|
646
|
+
const [x, p] = F(!1), [w, g] = F(() => t || /* @__PURE__ */ new Date()), b = se(null), A = se(null), _ = ze(x, A);
|
|
644
647
|
Q(() => {
|
|
645
648
|
const i = (S) => {
|
|
646
649
|
b.current && !b.current.contains(S.target) && p(!1);
|
|
@@ -649,23 +652,23 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
649
652
|
document.removeEventListener("mousedown", i);
|
|
650
653
|
};
|
|
651
654
|
}, [x]);
|
|
652
|
-
const
|
|
655
|
+
const K = (i) => {
|
|
653
656
|
if (!i) return "";
|
|
654
|
-
const S = i.getDate().toString().padStart(2, "0"), N = (i.getMonth() + 1).toString().padStart(2, "0"),
|
|
657
|
+
const S = i.getDate().toString().padStart(2, "0"), N = (i.getMonth() + 1).toString().padStart(2, "0"), T = i.getFullYear(), k = y === "dd/MM/yyyy" ? `${S}/${N}/${T}` : y === "yyyy-MM-dd" ? `${T}-${N}-${S}` : `${N}/${S}/${T}`;
|
|
655
658
|
return h ? `${k} ${$(i)}` : k;
|
|
656
659
|
}, $ = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, X = (i) => {
|
|
657
660
|
const [S, N] = i.split(":").map(Number);
|
|
658
661
|
if (Number.isNaN(S) || Number.isNaN(N)) return;
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
const i = w.getFullYear(), S = w.getMonth(), N = new Date(i, S, 1),
|
|
663
|
-
|
|
664
|
-
const k = [], ee = new Date(
|
|
662
|
+
const T = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
663
|
+
T.setHours(S, N, 0, 0), r?.(T);
|
|
664
|
+
}, U = () => {
|
|
665
|
+
const i = w.getFullYear(), S = w.getMonth(), N = new Date(i, S, 1), T = new Date(N);
|
|
666
|
+
T.setDate(T.getDate() - N.getDay());
|
|
667
|
+
const k = [], ee = new Date(T);
|
|
665
668
|
for (let ae = 0; ae < 42; ae++)
|
|
666
669
|
k.push(new Date(ee)), ee.setDate(ee.getDate() + 1);
|
|
667
670
|
return k;
|
|
668
|
-
},
|
|
671
|
+
}, I = (i) => {
|
|
669
672
|
if (i.getMonth() === w.getMonth() && !(u && i < u) && !(m && i > m)) {
|
|
670
673
|
if (h) {
|
|
671
674
|
const N = new Date(i);
|
|
@@ -676,11 +679,11 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
676
679
|
}
|
|
677
680
|
}, q = () => {
|
|
678
681
|
g(new Date(w.getFullYear(), w.getMonth() - 1, 1));
|
|
679
|
-
},
|
|
682
|
+
}, W = () => {
|
|
680
683
|
g(new Date(w.getFullYear(), w.getMonth() + 1, 1));
|
|
681
684
|
}, re = () => {
|
|
682
685
|
r?.(null), p(!1);
|
|
683
|
-
},
|
|
686
|
+
}, P = d(
|
|
684
687
|
"w-full border border-border rounded-md transition-colors duration-fast",
|
|
685
688
|
"bg-surface text-text",
|
|
686
689
|
"placeholder:text-text-muted",
|
|
@@ -693,7 +696,7 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
693
696
|
"h-control-md w-full px-3 text-base": o === "full"
|
|
694
697
|
},
|
|
695
698
|
l
|
|
696
|
-
), ce =
|
|
699
|
+
), ce = U(), C = [
|
|
697
700
|
"January",
|
|
698
701
|
"February",
|
|
699
702
|
"March",
|
|
@@ -708,19 +711,19 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
708
711
|
"December"
|
|
709
712
|
];
|
|
710
713
|
return /* @__PURE__ */ c("div", { ref: b, className: "relative", children: [
|
|
711
|
-
/* @__PURE__ */ c("div", { ref:
|
|
714
|
+
/* @__PURE__ */ c("div", { ref: A, className: "relative", children: [
|
|
712
715
|
/* @__PURE__ */ e(
|
|
713
716
|
"input",
|
|
714
717
|
{
|
|
715
718
|
ref: f,
|
|
716
719
|
type: "text",
|
|
717
|
-
value:
|
|
720
|
+
value: K(t ?? null),
|
|
718
721
|
placeholder: n,
|
|
719
722
|
disabled: s,
|
|
720
723
|
required: a,
|
|
721
724
|
readOnly: !0,
|
|
722
725
|
onClick: () => !s && p(!x),
|
|
723
|
-
className: d(
|
|
726
|
+
className: d(P, "pr-10 cursor-pointer")
|
|
724
727
|
}
|
|
725
728
|
),
|
|
726
729
|
/* @__PURE__ */ e(
|
|
@@ -730,18 +733,18 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
730
733
|
onClick: () => !s && p(!x),
|
|
731
734
|
disabled: s,
|
|
732
735
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
733
|
-
children: /* @__PURE__ */ e(
|
|
736
|
+
children: /* @__PURE__ */ e(It, {})
|
|
734
737
|
}
|
|
735
738
|
)
|
|
736
739
|
] }),
|
|
737
|
-
x && /* @__PURE__ */ c("div", { style:
|
|
740
|
+
x && /* @__PURE__ */ c("div", { style: _, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
|
|
738
741
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
|
|
739
742
|
/* @__PURE__ */ e(
|
|
740
743
|
"button",
|
|
741
744
|
{
|
|
742
745
|
onClick: q,
|
|
743
746
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
744
|
-
children: /* @__PURE__ */ e(
|
|
747
|
+
children: /* @__PURE__ */ e(jt, {})
|
|
745
748
|
}
|
|
746
749
|
),
|
|
747
750
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
@@ -752,26 +755,26 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
752
755
|
/* @__PURE__ */ e(
|
|
753
756
|
"button",
|
|
754
757
|
{
|
|
755
|
-
onClick:
|
|
758
|
+
onClick: W,
|
|
756
759
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
757
|
-
children: /* @__PURE__ */ e(
|
|
760
|
+
children: /* @__PURE__ */ e(Pt, {})
|
|
758
761
|
}
|
|
759
762
|
)
|
|
760
763
|
] }),
|
|
761
764
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((i) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: i }, i)) }),
|
|
762
765
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ce.map((i, S) => {
|
|
763
|
-
const N = i.getMonth() === w.getMonth(),
|
|
766
|
+
const N = i.getMonth() === w.getMonth(), T = t && i.toDateString() === t.toDateString(), k = i.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), ee = !N || u && i < u || m && i > m;
|
|
764
767
|
return /* @__PURE__ */ e(
|
|
765
768
|
"button",
|
|
766
769
|
{
|
|
767
|
-
onClick: () => !ee &&
|
|
770
|
+
onClick: () => !ee && I(i),
|
|
768
771
|
disabled: ee,
|
|
769
772
|
className: d(
|
|
770
773
|
"w-8 h-8 text-sm rounded transition-colors duration-fast",
|
|
771
774
|
{
|
|
772
|
-
"text-text hover:bg-surface-hover": N && !
|
|
773
|
-
"bg-accent text-accent-fg":
|
|
774
|
-
"bg-surface-hover text-text": k && !
|
|
775
|
+
"text-text hover:bg-surface-hover": N && !T && !ee,
|
|
776
|
+
"bg-accent text-accent-fg": T,
|
|
777
|
+
"bg-surface-hover text-text": k && !T,
|
|
775
778
|
"text-text-muted cursor-not-allowed": ee
|
|
776
779
|
}
|
|
777
780
|
),
|
|
@@ -813,7 +816,7 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
813
816
|
] })
|
|
814
817
|
] })
|
|
815
818
|
] });
|
|
816
|
-
}),
|
|
819
|
+
}), Ot = {
|
|
817
820
|
sm: "h-control-sm px-3 text-sm",
|
|
818
821
|
md: "h-control-md px-3 text-sm",
|
|
819
822
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -837,13 +840,13 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
837
840
|
value: w,
|
|
838
841
|
onChange: g,
|
|
839
842
|
allowCreate: b,
|
|
840
|
-
onCreateOption:
|
|
841
|
-
...
|
|
842
|
-
},
|
|
843
|
-
const $ = f || `select-${Math.random().toString(36).substr(2, 9)}`, X = !!n, [
|
|
844
|
-
oe.useImperativeHandle(
|
|
843
|
+
onCreateOption: A,
|
|
844
|
+
..._
|
|
845
|
+
}, K) => {
|
|
846
|
+
const $ = f || `select-${Math.random().toString(36).substr(2, 9)}`, X = !!n, [U, I] = oe.useState(!1), [q, W] = oe.useState(""), re = oe.useRef(null), P = oe.useRef(null), ce = ze(U, P, { matchWidth: !0 }), [C, i] = oe.useState(l);
|
|
847
|
+
oe.useImperativeHandle(K, () => re.current), oe.useEffect(() => {
|
|
845
848
|
const E = (D) => {
|
|
846
|
-
re.current && !re.current.contains(D.target) &&
|
|
849
|
+
re.current && !re.current.contains(D.target) && I(!1);
|
|
847
850
|
};
|
|
848
851
|
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
849
852
|
}, []);
|
|
@@ -854,11 +857,11 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
854
857
|
[]
|
|
855
858
|
), N = oe.useCallback(
|
|
856
859
|
(E, D) => {
|
|
857
|
-
const z = [...E],
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
+
const z = [...E], R = (B) => {
|
|
861
|
+
const V = (B ?? "").trim();
|
|
862
|
+
V && (S(z, V) || z.push({ value: V, label: V }));
|
|
860
863
|
};
|
|
861
|
-
return Array.isArray(D) ? D.forEach(
|
|
864
|
+
return Array.isArray(D) ? D.forEach(R) : R(D), z;
|
|
862
865
|
},
|
|
863
866
|
[S]
|
|
864
867
|
);
|
|
@@ -870,12 +873,12 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
870
873
|
}), N(D, w);
|
|
871
874
|
});
|
|
872
875
|
}, [l, w, N, S]);
|
|
873
|
-
const
|
|
876
|
+
const T = (E) => {
|
|
874
877
|
if (p) {
|
|
875
|
-
const D = Array.isArray(w) ? w : [], z = D.includes(E) ? D.filter((
|
|
878
|
+
const D = Array.isArray(w) ? w : [], z = D.includes(E) ? D.filter((R) => R !== E) : [...D, E];
|
|
876
879
|
g?.(z);
|
|
877
880
|
} else
|
|
878
|
-
g?.(E),
|
|
881
|
+
g?.(E), I(!1), W("");
|
|
879
882
|
}, k = p ? null : C.find((E) => E.value === w), ee = p ? C.filter(
|
|
880
883
|
(E) => Array.isArray(w) && w.includes(E.value)
|
|
881
884
|
) : [], ae = x && q ? C.filter(
|
|
@@ -883,16 +886,16 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
883
886
|
) : C, le = !!b && !!x && !!q.trim() && !S(C, q), G = (E) => {
|
|
884
887
|
const D = E.trim();
|
|
885
888
|
if (!D) return;
|
|
886
|
-
const z =
|
|
889
|
+
const z = A?.(D) ?? {
|
|
887
890
|
value: D,
|
|
888
891
|
label: D
|
|
889
892
|
};
|
|
890
893
|
if (S(C, z.value) || S(C, z.label)) {
|
|
891
|
-
|
|
894
|
+
T(z.value), W(""), p || I(!1);
|
|
892
895
|
return;
|
|
893
896
|
}
|
|
894
|
-
i((
|
|
895
|
-
},
|
|
897
|
+
i((R) => [...R, z]), T(z.value), W(""), p || I(!1);
|
|
898
|
+
}, j = () => p ? ee.length > 0 ? ee.map((E) => E.label).join(", ") : u || "Select options" : k?.label || u || "Select an option";
|
|
896
899
|
return /* @__PURE__ */ c(
|
|
897
900
|
"div",
|
|
898
901
|
{
|
|
@@ -902,13 +905,13 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
902
905
|
a && "w-full",
|
|
903
906
|
m
|
|
904
907
|
),
|
|
905
|
-
...
|
|
908
|
+
..._,
|
|
906
909
|
children: [
|
|
907
910
|
t && /* @__PURE__ */ e(
|
|
908
911
|
"label",
|
|
909
912
|
{
|
|
910
913
|
htmlFor: $,
|
|
911
|
-
onClick: () =>
|
|
914
|
+
onClick: () => I(!U),
|
|
912
915
|
className: d(
|
|
913
916
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
914
917
|
X ? "text-danger-fg" : "text-text-muted",
|
|
@@ -921,43 +924,43 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
921
924
|
/* @__PURE__ */ c(
|
|
922
925
|
"button",
|
|
923
926
|
{
|
|
924
|
-
ref:
|
|
927
|
+
ref: P,
|
|
925
928
|
type: "button",
|
|
926
929
|
id: $,
|
|
927
930
|
disabled: o,
|
|
928
|
-
onClick: () =>
|
|
931
|
+
onClick: () => I(!U),
|
|
929
932
|
className: d(
|
|
930
933
|
"flex w-full items-center justify-between gap-2 rounded-md border transition-colors duration-fast text-left",
|
|
931
934
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
932
935
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
933
936
|
"bg-surface",
|
|
934
|
-
|
|
937
|
+
Ot[s],
|
|
935
938
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
936
939
|
h
|
|
937
940
|
),
|
|
938
941
|
children: [
|
|
939
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children:
|
|
942
|
+
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: j() }),
|
|
940
943
|
/* @__PURE__ */ e(
|
|
941
944
|
Qe,
|
|
942
945
|
{
|
|
943
946
|
size: 16,
|
|
944
947
|
className: d(
|
|
945
948
|
"shrink-0 opacity-60 transition-transform duration-fast",
|
|
946
|
-
|
|
949
|
+
U && "rotate-180"
|
|
947
950
|
)
|
|
948
951
|
}
|
|
949
952
|
)
|
|
950
953
|
]
|
|
951
954
|
}
|
|
952
955
|
),
|
|
953
|
-
|
|
956
|
+
U && /* @__PURE__ */ c("div", { style: ce, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
|
|
954
957
|
x && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
|
|
955
958
|
"input",
|
|
956
959
|
{
|
|
957
960
|
type: "text",
|
|
958
961
|
placeholder: "Search...",
|
|
959
962
|
value: q,
|
|
960
|
-
onChange: (E) =>
|
|
963
|
+
onChange: (E) => W(E.target.value),
|
|
961
964
|
onKeyDown: (E) => {
|
|
962
965
|
E.key === "Enter" && le && (E.preventDefault(), G(q));
|
|
963
966
|
},
|
|
@@ -988,7 +991,7 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
988
991
|
{
|
|
989
992
|
className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
|
|
990
993
|
onClick: () => {
|
|
991
|
-
g?.(""),
|
|
994
|
+
g?.(""), I(!1);
|
|
992
995
|
},
|
|
993
996
|
children: u
|
|
994
997
|
}
|
|
@@ -998,7 +1001,7 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
998
1001
|
return /* @__PURE__ */ e(
|
|
999
1002
|
"li",
|
|
1000
1003
|
{
|
|
1001
|
-
onClick: () => !E.disabled &&
|
|
1004
|
+
onClick: () => !E.disabled && T(E.value),
|
|
1002
1005
|
className: d(
|
|
1003
1006
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1004
1007
|
"text-text",
|
|
@@ -1040,12 +1043,12 @@ const At = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1040
1043
|
}
|
|
1041
1044
|
);
|
|
1042
1045
|
Ne.displayName = "Select";
|
|
1043
|
-
const
|
|
1046
|
+
const Bt = {
|
|
1044
1047
|
sm: "h-control-sm px-3 text-sm",
|
|
1045
1048
|
md: "h-control-md px-3 text-base",
|
|
1046
1049
|
lg: "h-control-lg px-3 text-base",
|
|
1047
1050
|
full: "h-control-md px-3 text-base"
|
|
1048
|
-
},
|
|
1051
|
+
}, Re = "mb-1.5 block text-xs font-semibold uppercase tracking-label", be = me(
|
|
1049
1052
|
({
|
|
1050
1053
|
label: t,
|
|
1051
1054
|
helperText: r,
|
|
@@ -1061,14 +1064,14 @@ const Pt = {
|
|
|
1061
1064
|
id: f,
|
|
1062
1065
|
...x
|
|
1063
1066
|
}, p) => {
|
|
1064
|
-
const w = oe.useId(), g = f || `textfield-${w}`, b = !!n,
|
|
1067
|
+
const w = oe.useId(), g = f || `textfield-${w}`, b = !!n, A = n || r ? `${g}-description` : void 0;
|
|
1065
1068
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", m), children: [
|
|
1066
1069
|
t && /* @__PURE__ */ e(
|
|
1067
1070
|
"label",
|
|
1068
1071
|
{
|
|
1069
1072
|
htmlFor: g,
|
|
1070
1073
|
className: d(
|
|
1071
|
-
|
|
1074
|
+
Re,
|
|
1072
1075
|
b ? "text-danger-fg" : "text-text-subtle",
|
|
1073
1076
|
y
|
|
1074
1077
|
),
|
|
@@ -1083,14 +1086,14 @@ const Pt = {
|
|
|
1083
1086
|
ref: p,
|
|
1084
1087
|
id: g,
|
|
1085
1088
|
"aria-invalid": b || void 0,
|
|
1086
|
-
"aria-describedby":
|
|
1089
|
+
"aria-describedby": A,
|
|
1087
1090
|
className: d(
|
|
1088
1091
|
"block w-full rounded-md border bg-surface-input text-text",
|
|
1089
1092
|
"transition-colors duration-fast ease-out",
|
|
1090
1093
|
"placeholder:text-text-subtle",
|
|
1091
1094
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1092
1095
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1093
|
-
|
|
1096
|
+
Bt[s],
|
|
1094
1097
|
o && "pl-9",
|
|
1095
1098
|
(l || u) && "pr-9",
|
|
1096
1099
|
b ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
@@ -1110,7 +1113,7 @@ const Pt = {
|
|
|
1110
1113
|
(n || r) && /* @__PURE__ */ e(
|
|
1111
1114
|
"p",
|
|
1112
1115
|
{
|
|
1113
|
-
id:
|
|
1116
|
+
id: A,
|
|
1114
1117
|
className: d("mt-1 text-xs", b ? "text-danger-fg" : "text-text-subtle"),
|
|
1115
1118
|
children: n || r
|
|
1116
1119
|
}
|
|
@@ -1119,7 +1122,7 @@ const Pt = {
|
|
|
1119
1122
|
}
|
|
1120
1123
|
);
|
|
1121
1124
|
be.displayName = "TextField";
|
|
1122
|
-
function
|
|
1125
|
+
function Ft({
|
|
1123
1126
|
value: t,
|
|
1124
1127
|
onChange: r,
|
|
1125
1128
|
onListFolders: n,
|
|
@@ -1129,7 +1132,7 @@ function Ot({
|
|
|
1129
1132
|
templatePlaceholder: l,
|
|
1130
1133
|
showTemplate: u = !0
|
|
1131
1134
|
}) {
|
|
1132
|
-
const [m, y] =
|
|
1135
|
+
const [m, y] = F([]);
|
|
1133
1136
|
Q(() => {
|
|
1134
1137
|
let f = !0;
|
|
1135
1138
|
return Promise.resolve(n?.()).then((x) => {
|
|
@@ -1164,7 +1167,7 @@ function Ot({
|
|
|
1164
1167
|
)
|
|
1165
1168
|
] });
|
|
1166
1169
|
}
|
|
1167
|
-
const fe = (...t) => t.filter(Boolean).join(" "),
|
|
1170
|
+
const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Vt = (t) => /* @__PURE__ */ e(ge, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ht = {
|
|
1168
1171
|
sm: "h-control-sm px-3 text-sm",
|
|
1169
1172
|
md: "h-control-md px-3 text-base",
|
|
1170
1173
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1174,14 +1177,14 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1174
1177
|
md: "h-5 w-5",
|
|
1175
1178
|
lg: "h-6 w-6",
|
|
1176
1179
|
full: "h-6 w-6"
|
|
1177
|
-
},
|
|
1180
|
+
}, qt = me(
|
|
1178
1181
|
({
|
|
1179
1182
|
label: t,
|
|
1180
1183
|
helperText: r,
|
|
1181
1184
|
error: n,
|
|
1182
1185
|
size: s = "md",
|
|
1183
1186
|
fullWidth: a = !1,
|
|
1184
|
-
startIcon: o = /* @__PURE__ */ e(
|
|
1187
|
+
startIcon: o = /* @__PURE__ */ e(Rt, {}),
|
|
1185
1188
|
loading: l = !1,
|
|
1186
1189
|
containerClassName: u,
|
|
1187
1190
|
labelClassName: m,
|
|
@@ -1193,18 +1196,18 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1193
1196
|
debounceTime: w = 500,
|
|
1194
1197
|
showAllOnOpen: g = !1,
|
|
1195
1198
|
value: b,
|
|
1196
|
-
onChange:
|
|
1197
|
-
...
|
|
1198
|
-
},
|
|
1199
|
-
const $ = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n,
|
|
1199
|
+
onChange: A,
|
|
1200
|
+
..._
|
|
1201
|
+
}, K) => {
|
|
1202
|
+
const $ = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, W] = F(b || ""), [re, P] = F(!1), [ce, C] = F(!1), [i, S] = F(!1);
|
|
1200
1203
|
Q(() => {
|
|
1201
|
-
b !== void 0 &&
|
|
1204
|
+
b !== void 0 && W(b);
|
|
1202
1205
|
}, [b]);
|
|
1203
1206
|
const N = he(() => {
|
|
1204
1207
|
if (g && !i || !q) return f;
|
|
1205
|
-
const
|
|
1208
|
+
const j = String(q).toLowerCase();
|
|
1206
1209
|
return f.filter(
|
|
1207
|
-
(E) => String(E.label).toLowerCase().includes(
|
|
1210
|
+
(E) => String(E.label).toLowerCase().includes(j)
|
|
1208
1211
|
);
|
|
1209
1212
|
}, [q, f, g, i]);
|
|
1210
1213
|
Q(() => {
|
|
@@ -1212,7 +1215,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1212
1215
|
C(!1);
|
|
1213
1216
|
return;
|
|
1214
1217
|
}
|
|
1215
|
-
const
|
|
1218
|
+
const j = setTimeout(async () => {
|
|
1216
1219
|
C(!0);
|
|
1217
1220
|
try {
|
|
1218
1221
|
await x(String(q));
|
|
@@ -1223,22 +1226,22 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1223
1226
|
}
|
|
1224
1227
|
}, w);
|
|
1225
1228
|
return () => {
|
|
1226
|
-
clearTimeout(
|
|
1229
|
+
clearTimeout(j), C(!1);
|
|
1227
1230
|
};
|
|
1228
1231
|
}, [q, w, x]), Q(() => {
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1232
|
+
const j = (E) => {
|
|
1233
|
+
U.current && !U.current.contains(E.target) && P(!1);
|
|
1231
1234
|
};
|
|
1232
|
-
return document.addEventListener("mousedown",
|
|
1235
|
+
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
1233
1236
|
}, []);
|
|
1234
|
-
const
|
|
1235
|
-
const E =
|
|
1236
|
-
|
|
1237
|
-
}, k = (
|
|
1238
|
-
|
|
1237
|
+
const T = (j) => {
|
|
1238
|
+
const E = j.target.value;
|
|
1239
|
+
W(E), P(!0), S(!0), A && A(j);
|
|
1240
|
+
}, k = (j) => {
|
|
1241
|
+
W(j.label), P(!1), S(!1), p && p(j.value);
|
|
1239
1242
|
}, ee = () => {
|
|
1240
|
-
(f.length > 0 || x) && (
|
|
1241
|
-
}, ae = l || ce, le = re && (N.length > 0 || ae), G = he(() =>
|
|
1243
|
+
(f.length > 0 || x) && (P(!0), S(!1));
|
|
1244
|
+
}, ae = l || ce, le = re && (N.length > 0 || ae), G = he(() => K || I, [K]);
|
|
1242
1245
|
return /* @__PURE__ */ c(
|
|
1243
1246
|
"div",
|
|
1244
1247
|
{
|
|
@@ -1248,7 +1251,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1248
1251
|
u || "",
|
|
1249
1252
|
"relative"
|
|
1250
1253
|
),
|
|
1251
|
-
ref:
|
|
1254
|
+
ref: U,
|
|
1252
1255
|
children: [
|
|
1253
1256
|
t && /* @__PURE__ */ e(
|
|
1254
1257
|
"label",
|
|
@@ -1270,7 +1273,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1270
1273
|
ref: G,
|
|
1271
1274
|
id: $,
|
|
1272
1275
|
value: q,
|
|
1273
|
-
onChange:
|
|
1276
|
+
onChange: T,
|
|
1274
1277
|
onFocus: ee,
|
|
1275
1278
|
className: fe(
|
|
1276
1279
|
// Base styles
|
|
@@ -1278,7 +1281,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1278
1281
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1279
1282
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1280
1283
|
// Size styles
|
|
1281
|
-
|
|
1284
|
+
Ht[s],
|
|
1282
1285
|
// Icon padding
|
|
1283
1286
|
o ? "pl-10" : "",
|
|
1284
1287
|
"pr-10",
|
|
@@ -1287,7 +1290,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1287
1290
|
X ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
|
|
1288
1291
|
y || ""
|
|
1289
1292
|
),
|
|
1290
|
-
...
|
|
1293
|
+
..._
|
|
1291
1294
|
}
|
|
1292
1295
|
),
|
|
1293
1296
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || l ? (
|
|
@@ -1302,7 +1305,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1302
1305
|
) : (
|
|
1303
1306
|
// Dropdown Chevron
|
|
1304
1307
|
/* @__PURE__ */ e(
|
|
1305
|
-
|
|
1308
|
+
Vt,
|
|
1306
1309
|
{
|
|
1307
1310
|
className: fe(
|
|
1308
1311
|
"text-text-muted cursor-pointer transition-transform",
|
|
@@ -1310,7 +1313,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1310
1313
|
re ? "rotate-180" : "rotate-0"
|
|
1311
1314
|
),
|
|
1312
1315
|
onClick: () => {
|
|
1313
|
-
|
|
1316
|
+
P((j) => (j || S(!1), !j));
|
|
1314
1317
|
}
|
|
1315
1318
|
}
|
|
1316
1319
|
)
|
|
@@ -1321,16 +1324,16 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1321
1324
|
{
|
|
1322
1325
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1323
1326
|
role: "listbox",
|
|
1324
|
-
children: N.length > 0 ? N.map((
|
|
1327
|
+
children: N.length > 0 ? N.map((j) => /* @__PURE__ */ e(
|
|
1325
1328
|
"li",
|
|
1326
1329
|
{
|
|
1327
1330
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1328
|
-
onClick: () => k(
|
|
1331
|
+
onClick: () => k(j),
|
|
1329
1332
|
role: "option",
|
|
1330
|
-
"aria-selected": q ===
|
|
1331
|
-
children:
|
|
1333
|
+
"aria-selected": q === j.label,
|
|
1334
|
+
children: j.label
|
|
1332
1335
|
},
|
|
1333
|
-
|
|
1336
|
+
j.value
|
|
1334
1337
|
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: ae || l ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
1335
1338
|
}
|
|
1336
1339
|
),
|
|
@@ -1353,8 +1356,8 @@ const fe = (...t) => t.filter(Boolean).join(" "), Ft = (t) => /* @__PURE__ */ e(
|
|
|
1353
1356
|
);
|
|
1354
1357
|
}
|
|
1355
1358
|
);
|
|
1356
|
-
|
|
1357
|
-
const
|
|
1359
|
+
qt.displayName = "SearchableTextField";
|
|
1360
|
+
const Ut = me(
|
|
1358
1361
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...o }, l) => {
|
|
1359
1362
|
const u = /* @__PURE__ */ e(
|
|
1360
1363
|
"span",
|
|
@@ -1407,8 +1410,8 @@ const Ht = me(
|
|
|
1407
1410
|
);
|
|
1408
1411
|
}
|
|
1409
1412
|
);
|
|
1410
|
-
|
|
1411
|
-
function
|
|
1413
|
+
Ut.displayName = "Switch";
|
|
1414
|
+
function Wt({
|
|
1412
1415
|
variant: t = "page",
|
|
1413
1416
|
children: r,
|
|
1414
1417
|
showTableSkeleton: n = !1,
|
|
@@ -1457,7 +1460,7 @@ function Ut({
|
|
|
1457
1460
|
] })
|
|
1458
1461
|
] }) });
|
|
1459
1462
|
}
|
|
1460
|
-
const
|
|
1463
|
+
const Kt = ({
|
|
1461
1464
|
trigger: t,
|
|
1462
1465
|
options: r,
|
|
1463
1466
|
value: n,
|
|
@@ -1468,23 +1471,23 @@ const qt = ({
|
|
|
1468
1471
|
showCheck: u = !0,
|
|
1469
1472
|
header: m
|
|
1470
1473
|
}) => {
|
|
1471
|
-
const [y, h] =
|
|
1472
|
-
|
|
1474
|
+
const [y, h] = F(!1), [f, x] = F(null), [p, w] = F({ top: 0, left: 0 }), g = se(null), b = se(null), A = se(null), _ = se(null), K = ze(y, b, { placement: a }), $ = se(null), X = () => Array.from(
|
|
1475
|
+
_.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1473
1476
|
);
|
|
1474
1477
|
Q(() => {
|
|
1475
1478
|
y && X()[0]?.focus();
|
|
1476
1479
|
}, [y]);
|
|
1477
|
-
const
|
|
1480
|
+
const U = (i) => {
|
|
1478
1481
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key)) return;
|
|
1479
1482
|
const N = X();
|
|
1480
1483
|
if (N.length === 0) return;
|
|
1481
1484
|
i.preventDefault();
|
|
1482
|
-
const
|
|
1485
|
+
const T = N.indexOf(document.activeElement), k = i.key === "Home" ? 0 : i.key === "End" ? N.length - 1 : i.key === "ArrowDown" ? (T + 1) % N.length : (T - 1 + N.length) % N.length;
|
|
1483
1486
|
N[k]?.focus();
|
|
1484
1487
|
};
|
|
1485
1488
|
Q(() => {
|
|
1486
1489
|
const i = (S) => {
|
|
1487
|
-
g.current && (!g.current.contains(S.target) ||
|
|
1490
|
+
g.current && (!g.current.contains(S.target) || A.current && !A.current.contains(S.target)) && (h(!1), x(null), $.current && (clearTimeout($.current), $.current = null));
|
|
1488
1491
|
};
|
|
1489
1492
|
return y && document.addEventListener("mousedown", i), () => {
|
|
1490
1493
|
document.removeEventListener("mousedown", i);
|
|
@@ -1512,17 +1515,17 @@ const qt = ({
|
|
|
1512
1515
|
}, [f]), Q(() => () => {
|
|
1513
1516
|
$.current && clearTimeout($.current);
|
|
1514
1517
|
}, []);
|
|
1515
|
-
const
|
|
1518
|
+
const I = (i) => {
|
|
1516
1519
|
i.stopPropagation(), !o && (h(!y), x(null), $.current && (clearTimeout($.current), $.current = null));
|
|
1517
1520
|
}, q = (i, S, N) => {
|
|
1518
1521
|
i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, N), h(!1), x(null));
|
|
1519
|
-
},
|
|
1522
|
+
}, W = (i) => {
|
|
1520
1523
|
$.current && (clearTimeout($.current), $.current = null), i.children && i.children.length > 0 ? x(i.value) : x(null);
|
|
1521
1524
|
}, re = (i) => {
|
|
1522
1525
|
i.children && i.children.length > 0 ? $.current = setTimeout(() => {
|
|
1523
1526
|
x(null);
|
|
1524
1527
|
}, 150) : x(null);
|
|
1525
|
-
},
|
|
1528
|
+
}, P = (i, S, N) => {
|
|
1526
1529
|
i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, N), h(!1), x(null));
|
|
1527
1530
|
}, ce = d(
|
|
1528
1531
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
@@ -1544,7 +1547,7 @@ const qt = ({
|
|
|
1544
1547
|
"button",
|
|
1545
1548
|
{
|
|
1546
1549
|
ref: b,
|
|
1547
|
-
onClick:
|
|
1550
|
+
onClick: I,
|
|
1548
1551
|
disabled: o,
|
|
1549
1552
|
"aria-haspopup": "menu",
|
|
1550
1553
|
"aria-expanded": y,
|
|
@@ -1554,7 +1557,7 @@ const qt = ({
|
|
|
1554
1557
|
children: t
|
|
1555
1558
|
}
|
|
1556
1559
|
),
|
|
1557
|
-
y && /* @__PURE__ */ e("div", { ref:
|
|
1560
|
+
y && /* @__PURE__ */ e("div", { ref: _, className: ce, style: K, onKeyDown: U, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
|
|
1558
1561
|
m && (typeof m == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: m }) : m),
|
|
1559
1562
|
r.map((i, S) => {
|
|
1560
1563
|
if (i.divider)
|
|
@@ -1565,7 +1568,7 @@ const qt = ({
|
|
|
1565
1568
|
},
|
|
1566
1569
|
`divider-${S}`
|
|
1567
1570
|
);
|
|
1568
|
-
const N = i.children && i.children.length > 0,
|
|
1571
|
+
const N = i.children && i.children.length > 0, T = f === i.value;
|
|
1569
1572
|
return /* @__PURE__ */ c("div", { className: "relative group", children: [
|
|
1570
1573
|
/* @__PURE__ */ c(
|
|
1571
1574
|
"button",
|
|
@@ -1574,14 +1577,14 @@ const qt = ({
|
|
|
1574
1577
|
role: "menuitem",
|
|
1575
1578
|
"aria-haspopup": N ? "menu" : void 0,
|
|
1576
1579
|
onClick: (k) => q(k, i),
|
|
1577
|
-
onMouseEnter: () =>
|
|
1580
|
+
onMouseEnter: () => W(i),
|
|
1578
1581
|
onMouseLeave: () => re(i),
|
|
1579
1582
|
disabled: i.disabled,
|
|
1580
1583
|
className: d(
|
|
1581
1584
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
|
|
1582
1585
|
{
|
|
1583
1586
|
"opacity-50 cursor-not-allowed": i.disabled,
|
|
1584
|
-
"bg-surface-hover":
|
|
1587
|
+
"bg-surface-hover": T && N
|
|
1585
1588
|
}
|
|
1586
1589
|
),
|
|
1587
1590
|
children: [
|
|
@@ -1599,10 +1602,10 @@ const qt = ({
|
|
|
1599
1602
|
]
|
|
1600
1603
|
}
|
|
1601
1604
|
),
|
|
1602
|
-
N &&
|
|
1605
|
+
N && T && /* @__PURE__ */ e(
|
|
1603
1606
|
"div",
|
|
1604
1607
|
{
|
|
1605
|
-
ref:
|
|
1608
|
+
ref: A,
|
|
1606
1609
|
className: C,
|
|
1607
1610
|
style: {
|
|
1608
1611
|
top: `${p.top}px`,
|
|
@@ -1631,7 +1634,7 @@ const qt = ({
|
|
|
1631
1634
|
return /* @__PURE__ */ c(
|
|
1632
1635
|
"button",
|
|
1633
1636
|
{
|
|
1634
|
-
onClick: (le) =>
|
|
1637
|
+
onClick: (le) => P(
|
|
1635
1638
|
le,
|
|
1636
1639
|
k,
|
|
1637
1640
|
i.value
|
|
@@ -1664,8 +1667,8 @@ const qt = ({
|
|
|
1664
1667
|
(() => {
|
|
1665
1668
|
const i = r.reduce((S, N) => {
|
|
1666
1669
|
if (N.divider) return S;
|
|
1667
|
-
const
|
|
1668
|
-
return S + 1 +
|
|
1670
|
+
const T = N.children ? N.children.filter((k) => !k.divider).length : 0;
|
|
1671
|
+
return S + 1 + T;
|
|
1669
1672
|
}, 0);
|
|
1670
1673
|
return i > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
1671
1674
|
i,
|
|
@@ -1676,17 +1679,17 @@ const qt = ({
|
|
|
1676
1679
|
]
|
|
1677
1680
|
}
|
|
1678
1681
|
);
|
|
1679
|
-
},
|
|
1682
|
+
}, Le = {
|
|
1680
1683
|
none: "pl-0",
|
|
1681
1684
|
sm: "pl-2",
|
|
1682
1685
|
md: "pl-4",
|
|
1683
1686
|
lg: "pl-6"
|
|
1684
|
-
},
|
|
1687
|
+
}, Ie = {
|
|
1685
1688
|
none: "pr-0",
|
|
1686
1689
|
sm: "pr-2",
|
|
1687
1690
|
md: "pr-4",
|
|
1688
1691
|
lg: "pr-6"
|
|
1689
|
-
},
|
|
1692
|
+
}, Gt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Jt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: tt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ge, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Zt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: rt, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }), Ve = () => /* @__PURE__ */ e(Y, { icon: ge, size: "md", color: "current" }), tr = (t) => {
|
|
1690
1693
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1691
1694
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1692
1695
|
};
|
|
@@ -1705,7 +1708,7 @@ const qt = ({
|
|
|
1705
1708
|
/* @__PURE__ */ e("span", { className: "text-text", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1706
1709
|
(s) => t.options?.find((a) => a.value === s)?.label
|
|
1707
1710
|
).join(", ") : t.options?.find((s) => s.value === t.value)?.label }),
|
|
1708
|
-
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(
|
|
1711
|
+
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(Ve, {}) })
|
|
1709
1712
|
] }),
|
|
1710
1713
|
/* @__PURE__ */ c("div", { className: "absolute z-10 left-0 mt-1 bg-surface border border-border rounded-lg shadow-overlay p-2 w-48", children: [
|
|
1711
1714
|
t.options?.map((s) => /* @__PURE__ */ e(
|
|
@@ -1733,7 +1736,7 @@ const qt = ({
|
|
|
1733
1736
|
)
|
|
1734
1737
|
] })
|
|
1735
1738
|
] }) }) });
|
|
1736
|
-
},
|
|
1739
|
+
}, je = ({
|
|
1737
1740
|
data: t,
|
|
1738
1741
|
columns: r,
|
|
1739
1742
|
loading: n = !1,
|
|
@@ -1748,68 +1751,68 @@ const qt = ({
|
|
|
1748
1751
|
selectable: f = !1,
|
|
1749
1752
|
selectedRows: x = [],
|
|
1750
1753
|
onSelectionChange: p,
|
|
1751
|
-
getRowKey: w = (
|
|
1754
|
+
getRowKey: w = (I, q) => q,
|
|
1752
1755
|
emptyContent: g,
|
|
1753
1756
|
hoverable: b = !0,
|
|
1754
|
-
bordered:
|
|
1755
|
-
striped:
|
|
1756
|
-
padding:
|
|
1757
|
+
bordered: A = !1,
|
|
1758
|
+
striped: _ = !1,
|
|
1759
|
+
padding: K = "md",
|
|
1757
1760
|
className: $,
|
|
1758
1761
|
rowClassName: X,
|
|
1759
|
-
headerBackground:
|
|
1762
|
+
headerBackground: U = !0
|
|
1760
1763
|
}) => {
|
|
1761
|
-
const [
|
|
1764
|
+
const [I, q] = F(""), [W, re] = F({
|
|
1762
1765
|
column: null,
|
|
1763
1766
|
direction: null
|
|
1764
|
-
}), [
|
|
1767
|
+
}), [P, ce] = F({
|
|
1765
1768
|
page: 0,
|
|
1766
1769
|
pageSize: m
|
|
1767
1770
|
}), C = se(null), i = he(() => {
|
|
1768
1771
|
let v = t;
|
|
1769
|
-
if (s &&
|
|
1770
|
-
const
|
|
1772
|
+
if (s && I.trim()) {
|
|
1773
|
+
const H = r.filter(
|
|
1771
1774
|
(J) => J.searchable !== !1
|
|
1772
|
-
), Z =
|
|
1773
|
-
v = v.filter((J) =>
|
|
1774
|
-
const ie = typeof
|
|
1775
|
+
), Z = I.toLowerCase();
|
|
1776
|
+
v = v.filter((J) => H.some((O) => {
|
|
1777
|
+
const ie = typeof O.accessor == "function" ? O.accessor(J) : J[O.accessor];
|
|
1775
1778
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1776
1779
|
}));
|
|
1777
1780
|
}
|
|
1778
|
-
return o.forEach((
|
|
1779
|
-
|
|
1780
|
-
const J = r.find((ie) => ie.id ===
|
|
1781
|
+
return o.forEach((H) => {
|
|
1782
|
+
H.value && H.value !== "all" && (v = v.filter((Z) => {
|
|
1783
|
+
const J = r.find((ie) => ie.id === H.id);
|
|
1781
1784
|
if (!J) return !0;
|
|
1782
|
-
const
|
|
1783
|
-
return String(
|
|
1785
|
+
const O = typeof J.accessor == "function" ? J.accessor(Z) : Z[J.accessor];
|
|
1786
|
+
return String(O || "") === H.value;
|
|
1784
1787
|
}));
|
|
1785
1788
|
}), v;
|
|
1786
|
-
}, [t,
|
|
1787
|
-
if (!
|
|
1788
|
-
const v = r.find((
|
|
1789
|
-
return v ? [...i].sort((
|
|
1790
|
-
const J = typeof v.accessor == "function" ? v.accessor(
|
|
1789
|
+
}, [t, I, r, s, o]), S = he(() => {
|
|
1790
|
+
if (!W.column || !W.direction) return i;
|
|
1791
|
+
const v = r.find((H) => H.id === W.column);
|
|
1792
|
+
return v ? [...i].sort((H, Z) => {
|
|
1793
|
+
const J = typeof v.accessor == "function" ? v.accessor(H) : H[v.accessor], O = typeof v.accessor == "function" ? v.accessor(Z) : Z[v.accessor];
|
|
1791
1794
|
let ie = 0;
|
|
1792
|
-
return J <
|
|
1795
|
+
return J < O ? ie = -1 : J > O && (ie = 1), W.direction === "desc" ? -ie : ie;
|
|
1793
1796
|
}) : i;
|
|
1794
|
-
}, [i,
|
|
1797
|
+
}, [i, W, r]), N = he(() => {
|
|
1795
1798
|
if (!l) return S;
|
|
1796
|
-
const v =
|
|
1797
|
-
return S.slice(v,
|
|
1798
|
-
}, [S,
|
|
1799
|
+
const v = P.page * P.pageSize, H = v + P.pageSize;
|
|
1800
|
+
return S.slice(v, H);
|
|
1801
|
+
}, [S, P, l]), T = ue(
|
|
1799
1802
|
(v) => {
|
|
1800
1803
|
r.find((Z) => Z.id === v)?.sortable && re((Z) => Z.column !== v ? { column: v, direction: "asc" } : Z.direction === "asc" ? { column: v, direction: "desc" } : { column: null, direction: null });
|
|
1801
1804
|
},
|
|
1802
1805
|
[r]
|
|
1803
1806
|
), k = ue((v) => {
|
|
1804
|
-
ce((
|
|
1807
|
+
ce((H) => ({ ...H, page: v }));
|
|
1805
1808
|
}, []), ee = ue((v) => {
|
|
1806
1809
|
ce({ page: 0, pageSize: v });
|
|
1807
1810
|
}, []), ae = ue(
|
|
1808
|
-
(v,
|
|
1811
|
+
(v, H) => {
|
|
1809
1812
|
if (!p) return;
|
|
1810
1813
|
const Z = w(v, 0);
|
|
1811
|
-
x.map((J,
|
|
1812
|
-
(J,
|
|
1814
|
+
x.map((J, O) => w(J, O)), p(H ? [...x, v] : x.filter(
|
|
1815
|
+
(J, O) => w(x[O], O) !== Z
|
|
1813
1816
|
));
|
|
1814
1817
|
},
|
|
1815
1818
|
[x, p, w]
|
|
@@ -1821,23 +1824,23 @@ const qt = ({
|
|
|
1821
1824
|
);
|
|
1822
1825
|
Q(() => {
|
|
1823
1826
|
ce((v) => ({ ...v, page: 0 }));
|
|
1824
|
-
}, [
|
|
1827
|
+
}, [I, W]), Q(() => {
|
|
1825
1828
|
ce((v) => ({ ...v, page: 0 }));
|
|
1826
1829
|
}, [o.map((v) => v.value).join(",")]);
|
|
1827
|
-
const G = S.length,
|
|
1828
|
-
const
|
|
1830
|
+
const G = S.length, j = Math.ceil(G / P.pageSize), E = P.page * P.pageSize + 1, D = Math.min(E + P.pageSize - 1, G), z = N.length > 0 && N.every((v) => {
|
|
1831
|
+
const H = w(v, 0);
|
|
1829
1832
|
return x.some(
|
|
1830
|
-
(Z, J) => w(Z, J) ===
|
|
1833
|
+
(Z, J) => w(Z, J) === H
|
|
1831
1834
|
);
|
|
1832
|
-
}),
|
|
1833
|
-
const
|
|
1835
|
+
}), R = N.some((v) => {
|
|
1836
|
+
const H = w(v, 0);
|
|
1834
1837
|
return x.some(
|
|
1835
|
-
(Z, J) => w(Z, J) ===
|
|
1838
|
+
(Z, J) => w(Z, J) === H
|
|
1836
1839
|
);
|
|
1837
1840
|
}), B = d(
|
|
1838
1841
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1839
1842
|
$
|
|
1840
|
-
),
|
|
1843
|
+
), V = U ? "bg-surface-sunk border-border border-t" : "bg-surface", M = d(V, "h-control-lg"), L = d(
|
|
1841
1844
|
"text-text border-b border-border p-2"
|
|
1842
1845
|
), te = d("h-row-lg", {
|
|
1843
1846
|
"hover:bg-surface-sunk": b,
|
|
@@ -1845,21 +1848,21 @@ const qt = ({
|
|
|
1845
1848
|
});
|
|
1846
1849
|
return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
1847
1850
|
(s || o.length > 0) && /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-4 items-start", children: [
|
|
1848
|
-
o.map((v) => /* @__PURE__ */ e(
|
|
1851
|
+
o.map((v) => /* @__PURE__ */ e(tr, { ...v }, v.id)),
|
|
1849
1852
|
/* @__PURE__ */ e("div", { className: "w-full sm:w-auto sm:ml-auto min-w-menu", children: /* @__PURE__ */ e(
|
|
1850
1853
|
be,
|
|
1851
1854
|
{
|
|
1852
1855
|
placeholder: a,
|
|
1853
|
-
value:
|
|
1856
|
+
value: I,
|
|
1854
1857
|
onChange: (v) => q(v.target.value),
|
|
1855
|
-
startIcon: /* @__PURE__ */ e(
|
|
1858
|
+
startIcon: /* @__PURE__ */ e(Gt, {}),
|
|
1856
1859
|
className: "max-w-sm"
|
|
1857
1860
|
}
|
|
1858
1861
|
) })
|
|
1859
1862
|
] }) }),
|
|
1860
1863
|
/* @__PURE__ */ c("div", { className: "relative w-full overflow-x-auto min-h-100", children: [
|
|
1861
1864
|
n && /* @__PURE__ */ e("div", { className: "flex items-center justify-center z-10", children: /* @__PURE__ */ e(
|
|
1862
|
-
|
|
1865
|
+
Wt,
|
|
1863
1866
|
{
|
|
1864
1867
|
showTableSkeleton: !0,
|
|
1865
1868
|
tableRows: 10,
|
|
@@ -1868,23 +1871,23 @@ const qt = ({
|
|
|
1868
1871
|
) }),
|
|
1869
1872
|
/* @__PURE__ */ c("table", { ref: C, className: d(B, "min-w-full"), children: [
|
|
1870
1873
|
/* @__PURE__ */ e("thead", { className: M, children: /* @__PURE__ */ c("tr", { children: [
|
|
1871
|
-
f && /* @__PURE__ */ e("th", { className: d(
|
|
1874
|
+
f && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1872
1875
|
"input",
|
|
1873
1876
|
{
|
|
1874
1877
|
type: "checkbox",
|
|
1875
1878
|
checked: z,
|
|
1876
1879
|
ref: (v) => {
|
|
1877
|
-
v && (v.indeterminate =
|
|
1880
|
+
v && (v.indeterminate = R && !z);
|
|
1878
1881
|
},
|
|
1879
1882
|
onChange: (v) => le(v.target.checked),
|
|
1880
1883
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1881
1884
|
}
|
|
1882
1885
|
) }),
|
|
1883
|
-
!n && r.map((v,
|
|
1886
|
+
!n && r.map((v, H) => /* @__PURE__ */ e(
|
|
1884
1887
|
"th",
|
|
1885
1888
|
{
|
|
1886
1889
|
className: d(
|
|
1887
|
-
|
|
1890
|
+
L,
|
|
1888
1891
|
"font-semibold text-xs text-text-muted uppercase tracking-label",
|
|
1889
1892
|
"group",
|
|
1890
1893
|
{
|
|
@@ -1892,14 +1895,14 @@ const qt = ({
|
|
|
1892
1895
|
"text-center": v.align === "center",
|
|
1893
1896
|
"text-right": v.align === "right",
|
|
1894
1897
|
"cursor-pointer select-none": v.sortable,
|
|
1895
|
-
[`sticky left-0 ${
|
|
1896
|
-
[`sticky right-0 ${
|
|
1898
|
+
[`sticky left-0 ${V}`]: v.sticky === "left",
|
|
1899
|
+
[`sticky right-0 ${V}`]: v.sticky === "right"
|
|
1897
1900
|
},
|
|
1898
|
-
|
|
1899
|
-
|
|
1901
|
+
H === 0 && Le[K],
|
|
1902
|
+
H === r.length - 1 && Ie[K]
|
|
1900
1903
|
),
|
|
1901
1904
|
style: { width: v.width },
|
|
1902
|
-
onClick: () => v.sortable &&
|
|
1905
|
+
onClick: () => v.sortable && T(v.id),
|
|
1903
1906
|
children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1904
1907
|
v.headerCell ? v.headerCell() : v.header,
|
|
1905
1908
|
v.sortable && /* @__PURE__ */ c(
|
|
@@ -1907,19 +1910,19 @@ const qt = ({
|
|
|
1907
1910
|
{
|
|
1908
1911
|
className: d(
|
|
1909
1912
|
"flex flex-col opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1910
|
-
|
|
1913
|
+
W.column === v.id && "opacity-100"
|
|
1911
1914
|
),
|
|
1912
1915
|
children: [
|
|
1913
1916
|
/* @__PURE__ */ e(
|
|
1914
|
-
|
|
1917
|
+
Jt,
|
|
1915
1918
|
{
|
|
1916
|
-
active:
|
|
1919
|
+
active: W.column === v.id && W.direction === "asc"
|
|
1917
1920
|
}
|
|
1918
1921
|
),
|
|
1919
1922
|
/* @__PURE__ */ e(
|
|
1920
|
-
|
|
1923
|
+
Yt,
|
|
1921
1924
|
{
|
|
1922
|
-
active:
|
|
1925
|
+
active: W.column === v.id && W.direction === "desc"
|
|
1923
1926
|
}
|
|
1924
1927
|
)
|
|
1925
1928
|
]
|
|
@@ -1929,21 +1932,21 @@ const qt = ({
|
|
|
1929
1932
|
},
|
|
1930
1933
|
v.id
|
|
1931
1934
|
)),
|
|
1932
|
-
y.length > 0 && /* @__PURE__ */ e("th", { className: d(
|
|
1935
|
+
y.length > 0 && /* @__PURE__ */ e("th", { className: d(L, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
1933
1936
|
] }) }),
|
|
1934
1937
|
/* @__PURE__ */ e("tbody", { children: N.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1935
1938
|
"td",
|
|
1936
1939
|
{
|
|
1937
1940
|
colSpan: r.length + (f ? 1 : 0) + (y.length > 0 ? 1 : 0),
|
|
1938
1941
|
className: d(
|
|
1939
|
-
|
|
1942
|
+
L,
|
|
1940
1943
|
"text-center py-8 text-text-muted"
|
|
1941
1944
|
),
|
|
1942
1945
|
children: g || "No data available"
|
|
1943
1946
|
}
|
|
1944
|
-
) }) : N.map((v,
|
|
1945
|
-
const Z = w(v,
|
|
1946
|
-
(
|
|
1947
|
+
) }) : N.map((v, H) => {
|
|
1948
|
+
const Z = w(v, H), J = x.some(
|
|
1949
|
+
(O, ie) => w(O, ie) === Z
|
|
1947
1950
|
);
|
|
1948
1951
|
return /* @__PURE__ */ c(
|
|
1949
1952
|
"tr",
|
|
@@ -1951,63 +1954,63 @@ const qt = ({
|
|
|
1951
1954
|
className: d(
|
|
1952
1955
|
te,
|
|
1953
1956
|
{ "bg-accent-soft": J },
|
|
1954
|
-
X?.(v,
|
|
1957
|
+
X?.(v, H)
|
|
1955
1958
|
),
|
|
1956
|
-
onClick: (
|
|
1957
|
-
|
|
1959
|
+
onClick: (O) => {
|
|
1960
|
+
O.stopPropagation(), h?.(v, H);
|
|
1958
1961
|
},
|
|
1959
1962
|
children: [
|
|
1960
|
-
f && /* @__PURE__ */ e("td", { className:
|
|
1963
|
+
f && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
1961
1964
|
"input",
|
|
1962
1965
|
{
|
|
1963
1966
|
type: "checkbox",
|
|
1964
1967
|
checked: J,
|
|
1965
|
-
onChange: (
|
|
1966
|
-
|
|
1968
|
+
onChange: (O) => {
|
|
1969
|
+
O.stopPropagation(), ae(v, O.target.checked);
|
|
1967
1970
|
},
|
|
1968
1971
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1969
1972
|
}
|
|
1970
1973
|
) }),
|
|
1971
|
-
r.map((
|
|
1972
|
-
const ve = typeof
|
|
1974
|
+
r.map((O, ie) => {
|
|
1975
|
+
const ve = typeof O.accessor == "function" ? O.accessor(v) : v[O.accessor];
|
|
1973
1976
|
return /* @__PURE__ */ e(
|
|
1974
1977
|
"td",
|
|
1975
1978
|
{
|
|
1976
1979
|
className: d(
|
|
1977
|
-
|
|
1980
|
+
L,
|
|
1978
1981
|
{
|
|
1979
|
-
"text-left":
|
|
1980
|
-
"text-center":
|
|
1981
|
-
"text-right":
|
|
1982
|
-
"sticky left-0 bg-surface":
|
|
1983
|
-
"sticky right-0 bg-surface":
|
|
1982
|
+
"text-left": O.align === "left" || !O.align,
|
|
1983
|
+
"text-center": O.align === "center",
|
|
1984
|
+
"text-right": O.align === "right",
|
|
1985
|
+
"sticky left-0 bg-surface": O.sticky === "left",
|
|
1986
|
+
"sticky right-0 bg-surface": O.sticky === "right"
|
|
1984
1987
|
},
|
|
1985
|
-
ie === 0 &&
|
|
1986
|
-
ie === r.length - 1 &&
|
|
1988
|
+
ie === 0 && Le[K],
|
|
1989
|
+
ie === r.length - 1 && Ie[K]
|
|
1987
1990
|
),
|
|
1988
|
-
children:
|
|
1991
|
+
children: O.cell ? O.cell(ve, v, ie) : String(ve || "")
|
|
1989
1992
|
},
|
|
1990
|
-
|
|
1993
|
+
O.id
|
|
1991
1994
|
);
|
|
1992
1995
|
}),
|
|
1993
|
-
y.length > 0 && /* @__PURE__ */ e("td", { className:
|
|
1994
|
-
|
|
1996
|
+
y.length > 0 && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
1997
|
+
Kt,
|
|
1995
1998
|
{
|
|
1996
1999
|
trigger: /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
|
|
1997
2000
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
1998
|
-
/* @__PURE__ */ e(
|
|
2001
|
+
/* @__PURE__ */ e(Ve, {})
|
|
1999
2002
|
] }),
|
|
2000
|
-
options: y.map((
|
|
2001
|
-
value:
|
|
2002
|
-
label:
|
|
2003
|
-
icon:
|
|
2004
|
-
disabled:
|
|
2003
|
+
options: y.map((O) => ({
|
|
2004
|
+
value: O.id,
|
|
2005
|
+
label: O.label,
|
|
2006
|
+
icon: O.icon,
|
|
2007
|
+
disabled: O.disabled?.(v)
|
|
2005
2008
|
})),
|
|
2006
|
-
onSelect: (
|
|
2009
|
+
onSelect: (O) => {
|
|
2007
2010
|
const ie = y.find(
|
|
2008
|
-
(ve) => ve.id ===
|
|
2011
|
+
(ve) => ve.id === O
|
|
2009
2012
|
);
|
|
2010
|
-
ie && ie.onClick(v,
|
|
2013
|
+
ie && ie.onClick(v, H);
|
|
2011
2014
|
},
|
|
2012
2015
|
placement: "bottom-end"
|
|
2013
2016
|
}
|
|
@@ -2035,7 +2038,7 @@ const qt = ({
|
|
|
2035
2038
|
/* @__PURE__ */ e(
|
|
2036
2039
|
"select",
|
|
2037
2040
|
{
|
|
2038
|
-
value:
|
|
2041
|
+
value: P.pageSize,
|
|
2039
2042
|
onChange: (v) => ee(Number(v.target.value)),
|
|
2040
2043
|
className: "h-control-sm w-16 rounded-md border border-border bg-surface-input px-2 text-sm text-text",
|
|
2041
2044
|
children: u.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
|
|
@@ -2050,9 +2053,9 @@ const qt = ({
|
|
|
2050
2053
|
size: "sm",
|
|
2051
2054
|
variant: "ghost",
|
|
2052
2055
|
onClick: () => k(0),
|
|
2053
|
-
disabled:
|
|
2056
|
+
disabled: P.page === 0,
|
|
2054
2057
|
iconOnly: !0,
|
|
2055
|
-
children: /* @__PURE__ */ e(
|
|
2058
|
+
children: /* @__PURE__ */ e(Qt, {})
|
|
2056
2059
|
}
|
|
2057
2060
|
),
|
|
2058
2061
|
/* @__PURE__ */ e(
|
|
@@ -2060,27 +2063,27 @@ const qt = ({
|
|
|
2060
2063
|
{
|
|
2061
2064
|
size: "sm",
|
|
2062
2065
|
variant: "ghost",
|
|
2063
|
-
onClick: () => k(
|
|
2064
|
-
disabled:
|
|
2066
|
+
onClick: () => k(P.page - 1),
|
|
2067
|
+
disabled: P.page === 0,
|
|
2065
2068
|
iconOnly: !0,
|
|
2066
|
-
children: /* @__PURE__ */ e(
|
|
2069
|
+
children: /* @__PURE__ */ e(Xt, {})
|
|
2067
2070
|
}
|
|
2068
2071
|
),
|
|
2069
2072
|
/* @__PURE__ */ c("span", { className: "px-3 py-1 text-sm text-text-muted", children: [
|
|
2070
2073
|
"Page ",
|
|
2071
|
-
|
|
2074
|
+
P.page + 1,
|
|
2072
2075
|
" of ",
|
|
2073
|
-
|
|
2076
|
+
j
|
|
2074
2077
|
] }),
|
|
2075
2078
|
/* @__PURE__ */ e(
|
|
2076
2079
|
ne,
|
|
2077
2080
|
{
|
|
2078
2081
|
size: "sm",
|
|
2079
2082
|
variant: "ghost",
|
|
2080
|
-
onClick: () => k(
|
|
2081
|
-
disabled:
|
|
2083
|
+
onClick: () => k(P.page + 1),
|
|
2084
|
+
disabled: P.page >= j - 1,
|
|
2082
2085
|
iconOnly: !0,
|
|
2083
|
-
children: /* @__PURE__ */ e(
|
|
2086
|
+
children: /* @__PURE__ */ e(Zt, {})
|
|
2084
2087
|
}
|
|
2085
2088
|
),
|
|
2086
2089
|
/* @__PURE__ */ e(
|
|
@@ -2088,22 +2091,22 @@ const qt = ({
|
|
|
2088
2091
|
{
|
|
2089
2092
|
size: "sm",
|
|
2090
2093
|
variant: "ghost",
|
|
2091
|
-
onClick: () => k(
|
|
2092
|
-
disabled:
|
|
2094
|
+
onClick: () => k(j - 1),
|
|
2095
|
+
disabled: P.page >= j - 1,
|
|
2093
2096
|
iconOnly: !0,
|
|
2094
|
-
children: /* @__PURE__ */ e(
|
|
2097
|
+
children: /* @__PURE__ */ e(er, {})
|
|
2095
2098
|
}
|
|
2096
2099
|
)
|
|
2097
2100
|
] })
|
|
2098
2101
|
] })
|
|
2099
2102
|
] });
|
|
2100
|
-
},
|
|
2103
|
+
}, rr = ht(null), un = ({
|
|
2101
2104
|
items: t,
|
|
2102
2105
|
activeTab: r,
|
|
2103
2106
|
onTabChange: n,
|
|
2104
2107
|
className: s
|
|
2105
2108
|
}) => {
|
|
2106
|
-
const [a, o] =
|
|
2109
|
+
const [a, o] = F(t[0]?.id || ""), l = r || a, u = (m) => {
|
|
2107
2110
|
n ? n(m) : o(m);
|
|
2108
2111
|
};
|
|
2109
2112
|
return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((m) => /* @__PURE__ */ e(
|
|
@@ -2129,7 +2132,7 @@ const qt = ({
|
|
|
2129
2132
|
},
|
|
2130
2133
|
m.id
|
|
2131
2134
|
)) }) });
|
|
2132
|
-
},
|
|
2135
|
+
}, nr = ({
|
|
2133
2136
|
items: t,
|
|
2134
2137
|
defaultTab: r,
|
|
2135
2138
|
activeTab: n,
|
|
@@ -2138,7 +2141,7 @@ const qt = ({
|
|
|
2138
2141
|
size: o = "md",
|
|
2139
2142
|
className: l
|
|
2140
2143
|
}) => {
|
|
2141
|
-
const [u, m] =
|
|
2144
|
+
const [u, m] = F(
|
|
2142
2145
|
r || n || t[0]?.id || ""
|
|
2143
2146
|
), y = n || u, h = (g) => {
|
|
2144
2147
|
s ? s(g) : m(g);
|
|
@@ -2155,11 +2158,11 @@ const qt = ({
|
|
|
2155
2158
|
},
|
|
2156
2159
|
l
|
|
2157
2160
|
), w = (g, b) => {
|
|
2158
|
-
const
|
|
2161
|
+
const A = "transition-colors duration-fast font-medium", _ = {
|
|
2159
2162
|
"text-xs px-2 py-1": o === "sm",
|
|
2160
2163
|
"text-sm px-3 py-2": o === "md",
|
|
2161
2164
|
"text-base px-4 py-3": o === "lg"
|
|
2162
|
-
},
|
|
2165
|
+
}, K = {
|
|
2163
2166
|
// Default variant
|
|
2164
2167
|
"border-b-2 -mb-px": a === "default",
|
|
2165
2168
|
// Pills variant
|
|
@@ -2172,14 +2175,14 @@ const qt = ({
|
|
|
2172
2175
|
}, X = b ? {
|
|
2173
2176
|
"border-accent-border text-text": a === "default" || a === "underline",
|
|
2174
2177
|
"bg-surface text-text shadow-none": a === "pills"
|
|
2175
|
-
} : {},
|
|
2178
|
+
} : {}, U = !b && !g.disabled ? {
|
|
2176
2179
|
"border-transparent text-text-muted hover:text-text": a === "default",
|
|
2177
2180
|
"text-text-muted hover:text-text": a === "pills",
|
|
2178
2181
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2179
2182
|
} : {};
|
|
2180
|
-
return d(
|
|
2183
|
+
return d(A, _, K, $, X, U);
|
|
2181
2184
|
};
|
|
2182
|
-
return /* @__PURE__ */ e(
|
|
2185
|
+
return /* @__PURE__ */ e(rr.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
2183
2186
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2184
2187
|
"button",
|
|
2185
2188
|
{
|
|
@@ -2208,14 +2211,14 @@ const qt = ({
|
|
|
2208
2211
|
}
|
|
2209
2212
|
)
|
|
2210
2213
|
] }) });
|
|
2211
|
-
},
|
|
2214
|
+
}, sr = {
|
|
2212
2215
|
sm: "max-w-md",
|
|
2213
2216
|
md: "max-w-lg",
|
|
2214
2217
|
lg: "max-w-2xl",
|
|
2215
2218
|
xl: "max-w-4xl",
|
|
2216
2219
|
full: "max-w-full mx-4"
|
|
2217
2220
|
};
|
|
2218
|
-
function
|
|
2221
|
+
function He({
|
|
2219
2222
|
open: t,
|
|
2220
2223
|
onClose: r,
|
|
2221
2224
|
title: n,
|
|
@@ -2259,7 +2262,7 @@ function Ue({
|
|
|
2259
2262
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2260
2263
|
// 'animate-scale-in',
|
|
2261
2264
|
"focus:outline-none",
|
|
2262
|
-
|
|
2265
|
+
sr[s],
|
|
2263
2266
|
l
|
|
2264
2267
|
),
|
|
2265
2268
|
role: "dialog",
|
|
@@ -2294,19 +2297,19 @@ function Ue({
|
|
|
2294
2297
|
}
|
|
2295
2298
|
) : null;
|
|
2296
2299
|
}
|
|
2297
|
-
const
|
|
2300
|
+
const ar = {
|
|
2298
2301
|
xs: "text-xs",
|
|
2299
2302
|
sm: "text-sm",
|
|
2300
2303
|
md: "text-base",
|
|
2301
2304
|
lg: "text-md",
|
|
2302
2305
|
xl: "text-lg"
|
|
2303
|
-
},
|
|
2306
|
+
}, lr = {
|
|
2304
2307
|
light: "font-normal",
|
|
2305
2308
|
normal: "font-normal",
|
|
2306
2309
|
medium: "font-medium",
|
|
2307
2310
|
semibold: "font-semibold",
|
|
2308
2311
|
bold: "font-bold"
|
|
2309
|
-
},
|
|
2312
|
+
}, or = {
|
|
2310
2313
|
primary: "text-text",
|
|
2311
2314
|
secondary: "text-text-muted",
|
|
2312
2315
|
accent: "text-accent",
|
|
@@ -2317,12 +2320,12 @@ const rr = {
|
|
|
2317
2320
|
neutral: "text-text",
|
|
2318
2321
|
current: "text-current",
|
|
2319
2322
|
muted: "text-text-subtle"
|
|
2320
|
-
},
|
|
2323
|
+
}, cr = {
|
|
2321
2324
|
left: "text-left",
|
|
2322
2325
|
center: "text-center",
|
|
2323
2326
|
right: "text-right",
|
|
2324
2327
|
justify: "text-justify"
|
|
2325
|
-
},
|
|
2328
|
+
}, ir = {
|
|
2326
2329
|
tight: "leading-tight",
|
|
2327
2330
|
normal: "leading-normal",
|
|
2328
2331
|
relaxed: "leading-relaxed"
|
|
@@ -2341,28 +2344,28 @@ const rr = {
|
|
|
2341
2344
|
children: f,
|
|
2342
2345
|
...x
|
|
2343
2346
|
}) => {
|
|
2344
|
-
const p = y ||
|
|
2347
|
+
const p = y || dr(t), w = t === "caption", g = t === "label", b = t === "code", A = d(
|
|
2345
2348
|
"font-sans",
|
|
2346
2349
|
// Variant — caption and label pin their own size/weight
|
|
2347
2350
|
w && "text-xs text-text-subtle",
|
|
2348
2351
|
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2349
2352
|
b && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2350
2353
|
// Size — only where the variant does not pin it
|
|
2351
|
-
!w && !g && !b &&
|
|
2354
|
+
!w && !g && !b && ar[r],
|
|
2352
2355
|
// Weight — label owns its weight
|
|
2353
|
-
!g &&
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
+
!g && lr[n],
|
|
2357
|
+
or[s],
|
|
2358
|
+
cr[a],
|
|
2356
2359
|
// Line height only overrides the body variant
|
|
2357
|
-
t === "body" &&
|
|
2360
|
+
t === "body" && ir[m],
|
|
2358
2361
|
l && "italic",
|
|
2359
2362
|
u && "underline",
|
|
2360
2363
|
o && "truncate",
|
|
2361
2364
|
h
|
|
2362
2365
|
);
|
|
2363
|
-
return /* @__PURE__ */ e(p, { className:
|
|
2366
|
+
return /* @__PURE__ */ e(p, { className: A, ...x, children: f });
|
|
2364
2367
|
};
|
|
2365
|
-
function
|
|
2368
|
+
function dr(t) {
|
|
2366
2369
|
return {
|
|
2367
2370
|
body: "p",
|
|
2368
2371
|
caption: "span",
|
|
@@ -2370,7 +2373,7 @@ function or(t) {
|
|
|
2370
2373
|
code: "code"
|
|
2371
2374
|
}[t] || "p";
|
|
2372
2375
|
}
|
|
2373
|
-
const
|
|
2376
|
+
const ur = ({
|
|
2374
2377
|
value: t,
|
|
2375
2378
|
onChange: r,
|
|
2376
2379
|
label: n,
|
|
@@ -2384,90 +2387,90 @@ const cr = ({
|
|
|
2384
2387
|
onDownloadFile: h,
|
|
2385
2388
|
onRegisterFile: f
|
|
2386
2389
|
}) => {
|
|
2387
|
-
const [x, p] =
|
|
2390
|
+
const [x, p] = F(!1), [w, g] = F([]), [b, A] = F(null), [_, K] = F("/"), [$, X] = F([]), [U, I] = F(!1), [q, W] = F(""), [re, P] = F(
|
|
2388
2391
|
typeof t == "object" ? t : null
|
|
2389
|
-
), [ce, C] =
|
|
2392
|
+
), [ce, C] = F(!1), [i, S] = F(""), N = se(null);
|
|
2390
2393
|
Q(() => {
|
|
2391
|
-
x &&
|
|
2394
|
+
x && T();
|
|
2392
2395
|
}, [x]), Q(() => {
|
|
2393
2396
|
x && b && k();
|
|
2394
|
-
}, [x, b,
|
|
2395
|
-
const
|
|
2396
|
-
|
|
2397
|
+
}, [x, b, _, q]);
|
|
2398
|
+
const T = async () => {
|
|
2399
|
+
I(!0);
|
|
2397
2400
|
try {
|
|
2398
2401
|
const M = await m?.();
|
|
2399
2402
|
M?.data && g(M.data);
|
|
2400
2403
|
} catch (M) {
|
|
2401
2404
|
console.error("Failed to load mounts", M);
|
|
2402
2405
|
} finally {
|
|
2403
|
-
|
|
2406
|
+
I(!1);
|
|
2404
2407
|
}
|
|
2405
2408
|
}, k = async () => {
|
|
2406
2409
|
if (b) {
|
|
2407
|
-
|
|
2410
|
+
I(!0);
|
|
2408
2411
|
try {
|
|
2409
|
-
const M = await u?.({ mountId: b.id, name: q, path:
|
|
2412
|
+
const M = await u?.({ mountId: b.id, name: q, path: _ });
|
|
2410
2413
|
M?.data && X(M.data);
|
|
2411
2414
|
} catch (M) {
|
|
2412
2415
|
console.error("Failed to load files", M);
|
|
2413
2416
|
} finally {
|
|
2414
|
-
|
|
2417
|
+
I(!1);
|
|
2415
2418
|
}
|
|
2416
2419
|
}
|
|
2417
2420
|
}, ee = async (M) => {
|
|
2418
|
-
const
|
|
2419
|
-
if (
|
|
2420
|
-
|
|
2421
|
+
const L = M.target.files?.[0];
|
|
2422
|
+
if (L) {
|
|
2423
|
+
I(!0);
|
|
2421
2424
|
try {
|
|
2422
|
-
const te = await
|
|
2425
|
+
const te = await L.arrayBuffer(), v = new Uint8Array(te), H = {
|
|
2423
2426
|
id: `local-${Date.now()}`,
|
|
2424
|
-
name:
|
|
2427
|
+
name: L.name,
|
|
2425
2428
|
type: "file",
|
|
2426
2429
|
path: "/",
|
|
2427
|
-
mimeType:
|
|
2428
|
-
size:
|
|
2430
|
+
mimeType: L.type || "application/octet-stream",
|
|
2431
|
+
size: L.size,
|
|
2429
2432
|
mountId: "local",
|
|
2430
|
-
providerKey:
|
|
2433
|
+
providerKey: L.name,
|
|
2431
2434
|
ownerId: "me"
|
|
2432
2435
|
};
|
|
2433
|
-
|
|
2436
|
+
P(H), r(H, v), p(!1);
|
|
2434
2437
|
} catch (te) {
|
|
2435
2438
|
console.error("Local file selection failed", te);
|
|
2436
2439
|
} finally {
|
|
2437
|
-
|
|
2440
|
+
I(!1);
|
|
2438
2441
|
}
|
|
2439
2442
|
}
|
|
2440
2443
|
}, ae = async (M) => {
|
|
2441
|
-
const
|
|
2442
|
-
if (!(!
|
|
2443
|
-
|
|
2444
|
+
const L = M.target.files?.[0];
|
|
2445
|
+
if (!(!L || !b)) {
|
|
2446
|
+
I(!0);
|
|
2444
2447
|
try {
|
|
2445
|
-
const te = await
|
|
2448
|
+
const te = await L.arrayBuffer(), v = await y?.({
|
|
2446
2449
|
file: new Uint8Array(te),
|
|
2447
|
-
filename:
|
|
2448
|
-
mimeType:
|
|
2450
|
+
filename: L.name,
|
|
2451
|
+
mimeType: L.type || "application/octet-stream",
|
|
2449
2452
|
mountId: b.id,
|
|
2450
|
-
path:
|
|
2453
|
+
path: _
|
|
2451
2454
|
});
|
|
2452
2455
|
if (v?.data) {
|
|
2453
|
-
const
|
|
2454
|
-
|
|
2456
|
+
const H = v.data;
|
|
2457
|
+
P(H), r(H, new Uint8Array(te)), p(!1);
|
|
2455
2458
|
}
|
|
2456
2459
|
} catch (te) {
|
|
2457
2460
|
console.error("Upload failed", te);
|
|
2458
2461
|
} finally {
|
|
2459
|
-
|
|
2462
|
+
I(!1);
|
|
2460
2463
|
}
|
|
2461
2464
|
}
|
|
2462
2465
|
}, le = async () => {
|
|
2463
2466
|
if (!(!i || !b)) {
|
|
2464
|
-
|
|
2467
|
+
I(!0);
|
|
2465
2468
|
try {
|
|
2466
|
-
const M = `${
|
|
2469
|
+
const M = `${_}${i}/`;
|
|
2467
2470
|
f && (await f({
|
|
2468
2471
|
name: i,
|
|
2469
2472
|
type: "folder",
|
|
2470
|
-
path:
|
|
2473
|
+
path: _,
|
|
2471
2474
|
mimeType: "application/x-directory",
|
|
2472
2475
|
size: 0,
|
|
2473
2476
|
mountId: b.id,
|
|
@@ -2477,48 +2480,48 @@ const cr = ({
|
|
|
2477
2480
|
} catch (M) {
|
|
2478
2481
|
console.error("Failed to create folder", M);
|
|
2479
2482
|
} finally {
|
|
2480
|
-
|
|
2483
|
+
I(!1);
|
|
2481
2484
|
}
|
|
2482
2485
|
}
|
|
2483
2486
|
}, G = async (M) => {
|
|
2484
|
-
|
|
2487
|
+
I(!0);
|
|
2485
2488
|
try {
|
|
2486
|
-
const
|
|
2487
|
-
|
|
2488
|
-
} catch (
|
|
2489
|
-
console.error("Failed to download file",
|
|
2489
|
+
const L = await h?.(M.id);
|
|
2490
|
+
P(M), r(M, L), p(!1);
|
|
2491
|
+
} catch (L) {
|
|
2492
|
+
console.error("Failed to download file", L);
|
|
2490
2493
|
} finally {
|
|
2491
|
-
|
|
2494
|
+
I(!1);
|
|
2492
2495
|
}
|
|
2493
|
-
},
|
|
2494
|
-
M.stopPropagation(),
|
|
2496
|
+
}, j = (M) => {
|
|
2497
|
+
M.stopPropagation(), P(null), r(null);
|
|
2495
2498
|
}, E = he(() => {
|
|
2496
|
-
const M = /* @__PURE__ */ new Set(),
|
|
2499
|
+
const M = /* @__PURE__ */ new Set(), L = [];
|
|
2497
2500
|
return $.forEach((te) => {
|
|
2498
2501
|
if (te.type === "folder") {
|
|
2499
|
-
te.path ===
|
|
2502
|
+
te.path === _ && M.add(te.name);
|
|
2500
2503
|
return;
|
|
2501
2504
|
}
|
|
2502
|
-
const v = te.providerKey || te.name, Z = (
|
|
2503
|
-
Z.length > 1 ? M.add(Z[0]) : Z.length === 1 &&
|
|
2505
|
+
const v = te.providerKey || te.name, Z = (_ ? v.substring(_.length) : v).split("/").filter((J) => J !== "");
|
|
2506
|
+
Z.length > 1 ? M.add(Z[0]) : Z.length === 1 && L.push(te);
|
|
2504
2507
|
}), {
|
|
2505
2508
|
folders: Array.from(M).sort(),
|
|
2506
|
-
files:
|
|
2509
|
+
files: L.sort((te, v) => te.name.localeCompare(v.name))
|
|
2507
2510
|
};
|
|
2508
|
-
}, [$,
|
|
2509
|
-
|
|
2511
|
+
}, [$, _]), D = (M) => {
|
|
2512
|
+
K((L) => `${L}${M}/`);
|
|
2510
2513
|
}, z = () => {
|
|
2511
|
-
const M =
|
|
2512
|
-
M.pop(), M.length === 0 ?
|
|
2513
|
-
},
|
|
2514
|
-
const M = E.folders.map((
|
|
2515
|
-
id: `folder-${
|
|
2516
|
-
name:
|
|
2514
|
+
const M = _.split("/").filter((L) => L !== "");
|
|
2515
|
+
M.pop(), M.length === 0 ? K("/") : K(`${M.join("/")}/`);
|
|
2516
|
+
}, R = he(() => {
|
|
2517
|
+
const M = E.folders.map((L) => ({
|
|
2518
|
+
id: `folder-${L}`,
|
|
2519
|
+
name: L,
|
|
2517
2520
|
type: "folder"
|
|
2518
2521
|
}));
|
|
2519
|
-
return E.files.forEach((
|
|
2522
|
+
return E.files.forEach((L) => {
|
|
2520
2523
|
M.push({
|
|
2521
|
-
...
|
|
2524
|
+
...L,
|
|
2522
2525
|
type: "file"
|
|
2523
2526
|
});
|
|
2524
2527
|
}), M;
|
|
@@ -2527,16 +2530,16 @@ const cr = ({
|
|
|
2527
2530
|
id: "name",
|
|
2528
2531
|
header: "Name",
|
|
2529
2532
|
accessor: "name",
|
|
2530
|
-
cell: (M,
|
|
2533
|
+
cell: (M, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
2531
2534
|
/* @__PURE__ */ e(
|
|
2532
2535
|
Y,
|
|
2533
2536
|
{
|
|
2534
|
-
icon:
|
|
2537
|
+
icon: L.type === "folder" ? Ae : Ee,
|
|
2535
2538
|
size: "sm",
|
|
2536
|
-
color:
|
|
2539
|
+
color: L.type === "folder" ? "warning" : "secondary"
|
|
2537
2540
|
}
|
|
2538
2541
|
),
|
|
2539
|
-
/* @__PURE__ */ e("span", { className: d(
|
|
2542
|
+
/* @__PURE__ */ e("span", { className: d(L.type === "folder" && "font-medium"), children: M })
|
|
2540
2543
|
] })
|
|
2541
2544
|
},
|
|
2542
2545
|
{
|
|
@@ -2554,26 +2557,26 @@ const cr = ({
|
|
|
2554
2557
|
header: "",
|
|
2555
2558
|
accessor: "id",
|
|
2556
2559
|
align: "right",
|
|
2557
|
-
cell: (M,
|
|
2560
|
+
cell: (M, L) => /* @__PURE__ */ e(
|
|
2558
2561
|
ne,
|
|
2559
2562
|
{
|
|
2560
2563
|
size: "sm",
|
|
2561
2564
|
variant: "outline",
|
|
2562
2565
|
onClick: (te) => {
|
|
2563
|
-
te.stopPropagation(),
|
|
2566
|
+
te.stopPropagation(), L.type === "folder" ? D(L.name) : G(L);
|
|
2564
2567
|
},
|
|
2565
|
-
loading:
|
|
2566
|
-
children:
|
|
2568
|
+
loading: U && L.type === "file" && re?.id === L.id,
|
|
2569
|
+
children: L.type === "folder" ? "Open" : "Select"
|
|
2567
2570
|
}
|
|
2568
2571
|
)
|
|
2569
2572
|
}
|
|
2570
|
-
],
|
|
2573
|
+
], V = [
|
|
2571
2574
|
{
|
|
2572
2575
|
id: "name",
|
|
2573
2576
|
header: "Mount Name",
|
|
2574
2577
|
accessor: "name",
|
|
2575
2578
|
cell: (M) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
2576
|
-
/* @__PURE__ */ e(Y, { icon:
|
|
2579
|
+
/* @__PURE__ */ e(Y, { icon: _e, size: "sm", color: "primary" }),
|
|
2577
2580
|
/* @__PURE__ */ e("span", { children: M })
|
|
2578
2581
|
] })
|
|
2579
2582
|
},
|
|
@@ -2582,7 +2585,7 @@ const cr = ({
|
|
|
2582
2585
|
header: "",
|
|
2583
2586
|
accessor: "id",
|
|
2584
2587
|
align: "right",
|
|
2585
|
-
cell: (M,
|
|
2588
|
+
cell: (M, L) => /* @__PURE__ */ e(ne, { size: "sm", variant: "outline", onClick: () => A(L), children: "Open" })
|
|
2586
2589
|
}
|
|
2587
2590
|
];
|
|
2588
2591
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2598,12 +2601,12 @@ const cr = ({
|
|
|
2598
2601
|
o && "opacity-50 cursor-not-allowed bg-surface-sunk"
|
|
2599
2602
|
),
|
|
2600
2603
|
children: [
|
|
2601
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Y, { icon: re ? Ee :
|
|
2604
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Y, { icon: re ? Ee : _e, color: re ? "primary" : "secondary" }) }),
|
|
2602
2605
|
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children: re ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: re.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
|
|
2603
2606
|
re && !o && /* @__PURE__ */ e(
|
|
2604
2607
|
"button",
|
|
2605
2608
|
{
|
|
2606
|
-
onClick:
|
|
2609
|
+
onClick: j,
|
|
2607
2610
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2608
2611
|
children: /* @__PURE__ */ e(Y, { icon: we, size: "xs" })
|
|
2609
2612
|
}
|
|
@@ -2613,16 +2616,16 @@ const cr = ({
|
|
|
2613
2616
|
),
|
|
2614
2617
|
a && /* @__PURE__ */ e(de, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2615
2618
|
/* @__PURE__ */ e(
|
|
2616
|
-
|
|
2619
|
+
He,
|
|
2617
2620
|
{
|
|
2618
2621
|
open: x,
|
|
2619
2622
|
onClose: () => {
|
|
2620
|
-
p(!1),
|
|
2623
|
+
p(!1), A(null), K("/"), C(!1);
|
|
2621
2624
|
},
|
|
2622
2625
|
title: b ? `Explorer: ${b.name}` : "Select Storage Mount",
|
|
2623
2626
|
size: "lg",
|
|
2624
2627
|
children: /* @__PURE__ */ e(
|
|
2625
|
-
|
|
2628
|
+
nr,
|
|
2626
2629
|
{
|
|
2627
2630
|
variant: "pills",
|
|
2628
2631
|
items: [
|
|
@@ -2637,19 +2640,19 @@ const cr = ({
|
|
|
2637
2640
|
variant: "ghost",
|
|
2638
2641
|
size: "sm",
|
|
2639
2642
|
onClick: () => {
|
|
2640
|
-
|
|
2643
|
+
_ && _ !== "/" ? z() : A(null);
|
|
2641
2644
|
},
|
|
2642
2645
|
leftIcon: /* @__PURE__ */ e(Y, { icon: st, size: "xs" }),
|
|
2643
|
-
children:
|
|
2646
|
+
children: _ ? "Back" : "Back to Mounts"
|
|
2644
2647
|
}
|
|
2645
2648
|
),
|
|
2646
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children:
|
|
2649
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-xs text-text-muted overflow-hidden bg-surface-hover px-2 py-1 rounded", children: /* @__PURE__ */ e("span", { className: "truncate", children: _ }) }),
|
|
2647
2650
|
/* @__PURE__ */ e("div", { className: "flex-grow min-w-40", children: /* @__PURE__ */ e(
|
|
2648
2651
|
be,
|
|
2649
2652
|
{
|
|
2650
2653
|
placeholder: "Search...",
|
|
2651
2654
|
value: q,
|
|
2652
|
-
onChange: (M) =>
|
|
2655
|
+
onChange: (M) => W(M.target.value),
|
|
2653
2656
|
startIcon: /* @__PURE__ */ e(Se, { size: 14 }),
|
|
2654
2657
|
fullWidth: !0,
|
|
2655
2658
|
size: "sm"
|
|
@@ -2673,7 +2676,7 @@ const cr = ({
|
|
|
2673
2676
|
size: "sm",
|
|
2674
2677
|
onClick: () => N.current?.click(),
|
|
2675
2678
|
leftIcon: /* @__PURE__ */ e(Y, { icon: lt, size: "xs" }),
|
|
2676
|
-
loading:
|
|
2679
|
+
loading: U,
|
|
2677
2680
|
children: "Upload"
|
|
2678
2681
|
}
|
|
2679
2682
|
),
|
|
@@ -2690,7 +2693,7 @@ const cr = ({
|
|
|
2690
2693
|
] })
|
|
2691
2694
|
] }),
|
|
2692
2695
|
ce && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
|
|
2693
|
-
/* @__PURE__ */ e(Y, { icon:
|
|
2696
|
+
/* @__PURE__ */ e(Y, { icon: Ae, size: "sm", color: "warning" }),
|
|
2694
2697
|
/* @__PURE__ */ e(
|
|
2695
2698
|
be,
|
|
2696
2699
|
{
|
|
@@ -2701,27 +2704,27 @@ const cr = ({
|
|
|
2701
2704
|
autoFocus: !0
|
|
2702
2705
|
}
|
|
2703
2706
|
),
|
|
2704
|
-
/* @__PURE__ */ e(ne, { size: "sm", onClick: le, loading:
|
|
2707
|
+
/* @__PURE__ */ e(ne, { size: "sm", onClick: le, loading: U, children: "Create" }),
|
|
2705
2708
|
/* @__PURE__ */ e(ne, { size: "sm", variant: "ghost", onClick: () => C(!1), children: "Cancel" })
|
|
2706
2709
|
] }),
|
|
2707
2710
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2708
|
-
|
|
2711
|
+
je,
|
|
2709
2712
|
{
|
|
2710
|
-
data:
|
|
2713
|
+
data: R,
|
|
2711
2714
|
columns: B,
|
|
2712
|
-
loading:
|
|
2715
|
+
loading: U,
|
|
2713
2716
|
emptyContent: "This folder is empty",
|
|
2714
2717
|
onRowClick: (M) => M.type === "folder" ? D(M.name) : G(M)
|
|
2715
2718
|
}
|
|
2716
2719
|
) })
|
|
2717
2720
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2718
|
-
|
|
2721
|
+
je,
|
|
2719
2722
|
{
|
|
2720
2723
|
data: w,
|
|
2721
|
-
columns:
|
|
2722
|
-
loading:
|
|
2724
|
+
columns: V,
|
|
2725
|
+
loading: U,
|
|
2723
2726
|
emptyContent: "No storage mounts configured",
|
|
2724
|
-
onRowClick: (M) =>
|
|
2727
|
+
onRowClick: (M) => A(M)
|
|
2725
2728
|
}
|
|
2726
2729
|
) }) })
|
|
2727
2730
|
},
|
|
@@ -2737,7 +2740,7 @@ const cr = ({
|
|
|
2737
2740
|
" be uploaded to platform storage."
|
|
2738
2741
|
] }),
|
|
2739
2742
|
/* @__PURE__ */ c("label", { className: "cursor-pointer", children: [
|
|
2740
|
-
/* @__PURE__ */ e(ne, { variant: "primary", size: "lg", loading:
|
|
2743
|
+
/* @__PURE__ */ e(ne, { variant: "primary", size: "lg", loading: U, className: "pointer-events-none", children: "Browse Local File" }),
|
|
2741
2744
|
/* @__PURE__ */ e(
|
|
2742
2745
|
"input",
|
|
2743
2746
|
{
|
|
@@ -2745,7 +2748,7 @@ const cr = ({
|
|
|
2745
2748
|
className: "hidden",
|
|
2746
2749
|
onChange: ee,
|
|
2747
2750
|
accept: l,
|
|
2748
|
-
disabled:
|
|
2751
|
+
disabled: U
|
|
2749
2752
|
}
|
|
2750
2753
|
)
|
|
2751
2754
|
] })
|
|
@@ -2757,7 +2760,7 @@ const cr = ({
|
|
|
2757
2760
|
}
|
|
2758
2761
|
)
|
|
2759
2762
|
] });
|
|
2760
|
-
},
|
|
2763
|
+
}, mr = {
|
|
2761
2764
|
sm: "px-3 py-1.5 text-sm",
|
|
2762
2765
|
md: "px-3 py-2 text-base",
|
|
2763
2766
|
lg: "px-3 py-2 text-md",
|
|
@@ -2784,7 +2787,7 @@ const cr = ({
|
|
|
2784
2787
|
{
|
|
2785
2788
|
htmlFor: w,
|
|
2786
2789
|
className: d(
|
|
2787
|
-
|
|
2790
|
+
Re,
|
|
2788
2791
|
g ? "text-danger-fg" : "text-text-subtle",
|
|
2789
2792
|
u
|
|
2790
2793
|
),
|
|
@@ -2806,7 +2809,7 @@ const cr = ({
|
|
|
2806
2809
|
"placeholder:text-text-subtle",
|
|
2807
2810
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
2808
2811
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
2809
|
-
|
|
2812
|
+
mr[s],
|
|
2810
2813
|
g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
2811
2814
|
m
|
|
2812
2815
|
),
|
|
@@ -2833,13 +2836,13 @@ const cr = ({
|
|
|
2833
2836
|
}
|
|
2834
2837
|
);
|
|
2835
2838
|
De.displayName = "TextArea";
|
|
2836
|
-
function
|
|
2839
|
+
function Pe(t, r) {
|
|
2837
2840
|
return r.split(".").reduce(
|
|
2838
2841
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2839
2842
|
t
|
|
2840
2843
|
);
|
|
2841
2844
|
}
|
|
2842
|
-
function
|
|
2845
|
+
function fr(t, r, n) {
|
|
2843
2846
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2844
2847
|
let o = a;
|
|
2845
2848
|
for (let l = 0; l < s.length - 1; l++) {
|
|
@@ -2848,7 +2851,7 @@ function dr(t, r, n) {
|
|
|
2848
2851
|
}
|
|
2849
2852
|
return o[s[s.length - 1]] = n, a;
|
|
2850
2853
|
}
|
|
2851
|
-
function
|
|
2854
|
+
function hr(t, r) {
|
|
2852
2855
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2853
2856
|
let a = s;
|
|
2854
2857
|
for (let o = 0; o < n.length - 1; o++) {
|
|
@@ -2858,7 +2861,7 @@ function ur(t, r) {
|
|
|
2858
2861
|
}
|
|
2859
2862
|
return delete a[n[n.length - 1]], s;
|
|
2860
2863
|
}
|
|
2861
|
-
const
|
|
2864
|
+
const mn = ({
|
|
2862
2865
|
groups: t,
|
|
2863
2866
|
data: r,
|
|
2864
2867
|
onSubmit: n,
|
|
@@ -2876,13 +2879,13 @@ const rn = ({
|
|
|
2876
2879
|
ref: w,
|
|
2877
2880
|
sdk: g
|
|
2878
2881
|
}) => {
|
|
2879
|
-
const [b,
|
|
2882
|
+
const [b, A] = F(r || {}), [_, K] = F({}), [$, X] = F({});
|
|
2880
2883
|
Q(() => {
|
|
2881
|
-
r &&
|
|
2884
|
+
r && A({ ...r });
|
|
2882
2885
|
}, [r]);
|
|
2883
|
-
const
|
|
2886
|
+
const U = ue(
|
|
2884
2887
|
(C, i, S) => {
|
|
2885
|
-
const N = t.flatMap((
|
|
2888
|
+
const N = t.flatMap((T) => T.items).find((T) => T.name === C);
|
|
2886
2889
|
if (!N) return null;
|
|
2887
2890
|
if (N.required && (i == null || i === ""))
|
|
2888
2891
|
return `${N.label} is required`;
|
|
@@ -2892,69 +2895,69 @@ const rn = ({
|
|
|
2892
2895
|
if (i && !Array.isArray(i))
|
|
2893
2896
|
return `${N.label} must be an array.`;
|
|
2894
2897
|
if (Array.isArray(i) && N.arrayFields) {
|
|
2895
|
-
const
|
|
2898
|
+
const T = [];
|
|
2896
2899
|
let k = !1;
|
|
2897
2900
|
if (i.forEach((ee, ae) => {
|
|
2898
2901
|
const le = {};
|
|
2899
2902
|
for (const G of N.arrayFields) {
|
|
2900
|
-
const
|
|
2901
|
-
if (G.required && (
|
|
2903
|
+
const j = ee?.[G.name];
|
|
2904
|
+
if (G.required && (j == null || j === ""))
|
|
2902
2905
|
le[G.name] = `${G.label} is required`, k = !0;
|
|
2903
2906
|
else if (G.validator) {
|
|
2904
|
-
const E = G.validator(
|
|
2907
|
+
const E = G.validator(j, ee);
|
|
2905
2908
|
E && (le[G.name] = E, k = !0);
|
|
2906
2909
|
}
|
|
2907
2910
|
}
|
|
2908
|
-
|
|
2911
|
+
T[ae] = le;
|
|
2909
2912
|
}), k)
|
|
2910
|
-
return JSON.stringify(
|
|
2913
|
+
return JSON.stringify(T);
|
|
2911
2914
|
}
|
|
2912
2915
|
}
|
|
2913
2916
|
return N.validator ? N.validator(i, S) : null;
|
|
2914
2917
|
},
|
|
2915
2918
|
[t]
|
|
2916
|
-
),
|
|
2919
|
+
), I = ue(
|
|
2917
2920
|
(C, i) => {
|
|
2918
|
-
let S =
|
|
2921
|
+
let S = fr(
|
|
2919
2922
|
b,
|
|
2920
2923
|
C,
|
|
2921
2924
|
i
|
|
2922
2925
|
);
|
|
2923
|
-
t.flatMap((k) => k.items).find((k) => k.name === C)?.removeIfEmpty && (i == null || i === "") && (S =
|
|
2924
|
-
const
|
|
2925
|
-
|
|
2926
|
+
t.flatMap((k) => k.items).find((k) => k.name === C)?.removeIfEmpty && (i == null || i === "") && (S = hr(S, C)), A(S), X((k) => ({ ...k, [C]: !0 }));
|
|
2927
|
+
const T = U(C, i, S);
|
|
2928
|
+
K((k) => ({
|
|
2926
2929
|
...k,
|
|
2927
|
-
[C]:
|
|
2930
|
+
[C]: T || ""
|
|
2928
2931
|
})), a?.(S, C);
|
|
2929
2932
|
},
|
|
2930
|
-
[b, t,
|
|
2933
|
+
[b, t, U, a]
|
|
2931
2934
|
), q = ue(
|
|
2932
2935
|
async (C) => {
|
|
2933
2936
|
if (C.preventDefault(), x) return;
|
|
2934
|
-
const i = {}, S = t.flatMap((
|
|
2935
|
-
for (const
|
|
2936
|
-
if (
|
|
2937
|
+
const i = {}, S = t.flatMap((T) => T.items);
|
|
2938
|
+
for (const T of S) {
|
|
2939
|
+
if (T.hidden || T.conditional && !T.conditional(b))
|
|
2937
2940
|
continue;
|
|
2938
|
-
const k =
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
+
const k = U(
|
|
2942
|
+
T.name,
|
|
2943
|
+
Pe(b, T.name),
|
|
2941
2944
|
b
|
|
2942
2945
|
);
|
|
2943
|
-
k && (i[
|
|
2946
|
+
k && (i[T.name] = k);
|
|
2944
2947
|
}
|
|
2945
2948
|
if (l) {
|
|
2946
|
-
const
|
|
2947
|
-
|
|
2949
|
+
const T = l(b);
|
|
2950
|
+
T && Object.assign(i, T);
|
|
2948
2951
|
}
|
|
2949
|
-
if (
|
|
2952
|
+
if (K(i), Object.keys(i).some((T) => i[T]))
|
|
2950
2953
|
return;
|
|
2951
2954
|
const N = o ? o(b) : b;
|
|
2952
2955
|
await n?.(b, N);
|
|
2953
2956
|
},
|
|
2954
|
-
[b, t,
|
|
2955
|
-
),
|
|
2957
|
+
[b, t, U, l, o, n, x]
|
|
2958
|
+
), W = ue(
|
|
2956
2959
|
(C) => {
|
|
2957
|
-
const i =
|
|
2960
|
+
const i = Pe(b, C.name), S = $[C.name] ? _[C.name] : void 0, N = C.disabled || x, T = {
|
|
2958
2961
|
value: i || "",
|
|
2959
2962
|
disabled: N,
|
|
2960
2963
|
required: C.required,
|
|
@@ -2971,8 +2974,8 @@ const rn = ({
|
|
|
2971
2974
|
return /* @__PURE__ */ e(
|
|
2972
2975
|
be,
|
|
2973
2976
|
{
|
|
2974
|
-
...
|
|
2975
|
-
onChange: (k) =>
|
|
2977
|
+
...T,
|
|
2978
|
+
onChange: (k) => I(C.name, k.target.value),
|
|
2976
2979
|
type: C.textType || C.type,
|
|
2977
2980
|
autoComplete: C.autocomplete,
|
|
2978
2981
|
error: S,
|
|
@@ -2983,8 +2986,8 @@ const rn = ({
|
|
|
2983
2986
|
return /* @__PURE__ */ e(
|
|
2984
2987
|
De,
|
|
2985
2988
|
{
|
|
2986
|
-
...
|
|
2987
|
-
onChange: (k) =>
|
|
2989
|
+
...T,
|
|
2990
|
+
onChange: (k) => I(C.name, k.target.value),
|
|
2988
2991
|
rows: 4,
|
|
2989
2992
|
error: S,
|
|
2990
2993
|
size: f
|
|
@@ -2994,8 +2997,8 @@ const rn = ({
|
|
|
2994
2997
|
return /* @__PURE__ */ e(
|
|
2995
2998
|
Ne,
|
|
2996
2999
|
{
|
|
2997
|
-
...
|
|
2998
|
-
onChange: (k) =>
|
|
3000
|
+
...T,
|
|
3001
|
+
onChange: (k) => I(C.name, k),
|
|
2999
3002
|
options: (C.options || []).map((k) => ({
|
|
3000
3003
|
...k,
|
|
3001
3004
|
value: String(k.value)
|
|
@@ -3011,10 +3014,10 @@ const rn = ({
|
|
|
3011
3014
|
return /* @__PURE__ */ e(
|
|
3012
3015
|
pe,
|
|
3013
3016
|
{
|
|
3014
|
-
...
|
|
3017
|
+
...T,
|
|
3015
3018
|
label: C.label,
|
|
3016
3019
|
checked: !!i,
|
|
3017
|
-
onChange: (k) =>
|
|
3020
|
+
onChange: (k) => I(C.name, k.target.checked),
|
|
3018
3021
|
size: f
|
|
3019
3022
|
}
|
|
3020
3023
|
);
|
|
@@ -3031,7 +3034,7 @@ const rn = ({
|
|
|
3031
3034
|
name: C.name,
|
|
3032
3035
|
value: k.value,
|
|
3033
3036
|
checked: i === k.value,
|
|
3034
|
-
onChange: () =>
|
|
3037
|
+
onChange: () => I(C.name, k.value),
|
|
3035
3038
|
disabled: N || k.disabled,
|
|
3036
3039
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3037
3040
|
}
|
|
@@ -3045,19 +3048,19 @@ const rn = ({
|
|
|
3045
3048
|
return /* @__PURE__ */ e(
|
|
3046
3049
|
$e,
|
|
3047
3050
|
{
|
|
3048
|
-
...
|
|
3051
|
+
...T,
|
|
3049
3052
|
value: i ? new Date(i) : null,
|
|
3050
|
-
onChange: (k) =>
|
|
3053
|
+
onChange: (k) => I(C.name, k),
|
|
3051
3054
|
size: f
|
|
3052
3055
|
}
|
|
3053
3056
|
);
|
|
3054
3057
|
case "file":
|
|
3055
3058
|
return /* @__PURE__ */ e(
|
|
3056
|
-
|
|
3059
|
+
ur,
|
|
3057
3060
|
{
|
|
3058
|
-
...
|
|
3061
|
+
...T,
|
|
3059
3062
|
value: i,
|
|
3060
|
-
onChange: (k) =>
|
|
3063
|
+
onChange: (k) => I(C.name, k),
|
|
3061
3064
|
error: S,
|
|
3062
3065
|
onListFiles: (k) => g?.http.invoke({
|
|
3063
3066
|
method: "POST",
|
|
@@ -3086,10 +3089,10 @@ const rn = ({
|
|
|
3086
3089
|
);
|
|
3087
3090
|
case "folder":
|
|
3088
3091
|
return /* @__PURE__ */ e(
|
|
3089
|
-
|
|
3092
|
+
Ft,
|
|
3090
3093
|
{
|
|
3091
3094
|
value: i || {},
|
|
3092
|
-
onChange: (k) =>
|
|
3095
|
+
onChange: (k) => I(C.name, k),
|
|
3093
3096
|
onListFolders: () => g?.http.invoke({
|
|
3094
3097
|
method: "GET",
|
|
3095
3098
|
action: "storage.mount"
|
|
@@ -3102,7 +3105,7 @@ const rn = ({
|
|
|
3102
3105
|
case "custom":
|
|
3103
3106
|
return C.customComponent?.({
|
|
3104
3107
|
value: i,
|
|
3105
|
-
onChange: (k) =>
|
|
3108
|
+
onChange: (k) => I(C.name, k),
|
|
3106
3109
|
error: S,
|
|
3107
3110
|
disabled: N
|
|
3108
3111
|
});
|
|
@@ -3115,21 +3118,21 @@ const rn = ({
|
|
|
3115
3118
|
} catch {
|
|
3116
3119
|
}
|
|
3117
3120
|
const ae = () => {
|
|
3118
|
-
|
|
3119
|
-
}, le = (
|
|
3120
|
-
|
|
3121
|
+
I(C.name, [...k, {}]);
|
|
3122
|
+
}, le = (j) => {
|
|
3123
|
+
I(
|
|
3121
3124
|
C.name,
|
|
3122
|
-
k.filter((E, D) => D !==
|
|
3125
|
+
k.filter((E, D) => D !== j)
|
|
3123
3126
|
);
|
|
3124
|
-
}, G = (
|
|
3127
|
+
}, G = (j, E, D) => {
|
|
3125
3128
|
const z = [...k];
|
|
3126
|
-
z[
|
|
3127
|
-
...z[
|
|
3129
|
+
z[j] = {
|
|
3130
|
+
...z[j],
|
|
3128
3131
|
[E]: D
|
|
3129
|
-
},
|
|
3132
|
+
}, I(C.name, z);
|
|
3130
3133
|
};
|
|
3131
3134
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
3132
|
-
k.map((
|
|
3135
|
+
k.map((j, E) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3133
3136
|
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: C.arrayFields?.map((D) => {
|
|
3134
3137
|
const z = ee?.[E]?.[D.name];
|
|
3135
3138
|
return /* @__PURE__ */ c(
|
|
@@ -3142,8 +3145,8 @@ const rn = ({
|
|
|
3142
3145
|
D.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3143
3146
|
] }),
|
|
3144
3147
|
(() => {
|
|
3145
|
-
const
|
|
3146
|
-
value:
|
|
3148
|
+
const R = {
|
|
3149
|
+
value: j?.[D.name] || "",
|
|
3147
3150
|
disabled: N,
|
|
3148
3151
|
required: D.required,
|
|
3149
3152
|
placeholder: D.placeholder,
|
|
@@ -3159,7 +3162,7 @@ const rn = ({
|
|
|
3159
3162
|
return /* @__PURE__ */ e(
|
|
3160
3163
|
be,
|
|
3161
3164
|
{
|
|
3162
|
-
...
|
|
3165
|
+
...R,
|
|
3163
3166
|
onChange: (B) => G(
|
|
3164
3167
|
E,
|
|
3165
3168
|
D.name,
|
|
@@ -3175,7 +3178,7 @@ const rn = ({
|
|
|
3175
3178
|
return /* @__PURE__ */ e(
|
|
3176
3179
|
De,
|
|
3177
3180
|
{
|
|
3178
|
-
...
|
|
3181
|
+
...R,
|
|
3179
3182
|
onChange: (B) => G(
|
|
3180
3183
|
E,
|
|
3181
3184
|
D.name,
|
|
@@ -3190,7 +3193,7 @@ const rn = ({
|
|
|
3190
3193
|
return /* @__PURE__ */ e(
|
|
3191
3194
|
Ne,
|
|
3192
3195
|
{
|
|
3193
|
-
...
|
|
3196
|
+
...R,
|
|
3194
3197
|
onChange: (B) => G(
|
|
3195
3198
|
E,
|
|
3196
3199
|
D.name,
|
|
@@ -3213,8 +3216,8 @@ const rn = ({
|
|
|
3213
3216
|
return /* @__PURE__ */ e(
|
|
3214
3217
|
pe,
|
|
3215
3218
|
{
|
|
3216
|
-
...
|
|
3217
|
-
checked: !!
|
|
3219
|
+
...R,
|
|
3220
|
+
checked: !!j?.[D.name],
|
|
3218
3221
|
onChange: (B) => G(
|
|
3219
3222
|
E,
|
|
3220
3223
|
D.name,
|
|
@@ -3235,7 +3238,7 @@ const rn = ({
|
|
|
3235
3238
|
type: "radio",
|
|
3236
3239
|
name: `${C.name}.${E}.${D.name}`,
|
|
3237
3240
|
value: B.value,
|
|
3238
|
-
checked:
|
|
3241
|
+
checked: j?.[D.name] === B.value,
|
|
3239
3242
|
onChange: () => G(
|
|
3240
3243
|
E,
|
|
3241
3244
|
D.name,
|
|
@@ -3251,16 +3254,16 @@ const rn = ({
|
|
|
3251
3254
|
B.value
|
|
3252
3255
|
)) });
|
|
3253
3256
|
case "date": {
|
|
3254
|
-
const B =
|
|
3257
|
+
const B = j?.[D.name];
|
|
3255
3258
|
return /* @__PURE__ */ e(
|
|
3256
3259
|
$e,
|
|
3257
3260
|
{
|
|
3258
|
-
...
|
|
3261
|
+
...R,
|
|
3259
3262
|
value: B ? new Date(B) : null,
|
|
3260
|
-
onChange: (
|
|
3263
|
+
onChange: (V) => G(
|
|
3261
3264
|
E,
|
|
3262
3265
|
D.name,
|
|
3263
|
-
|
|
3266
|
+
V
|
|
3264
3267
|
),
|
|
3265
3268
|
size: f
|
|
3266
3269
|
}
|
|
@@ -3268,7 +3271,7 @@ const rn = ({
|
|
|
3268
3271
|
}
|
|
3269
3272
|
case "custom":
|
|
3270
3273
|
return D.customComponent?.({
|
|
3271
|
-
value:
|
|
3274
|
+
value: j?.[D.name],
|
|
3272
3275
|
onChange: (B) => G(
|
|
3273
3276
|
E,
|
|
3274
3277
|
D.name,
|
|
@@ -3328,7 +3331,7 @@ const rn = ({
|
|
|
3328
3331
|
return null;
|
|
3329
3332
|
}
|
|
3330
3333
|
},
|
|
3331
|
-
[b, $,
|
|
3334
|
+
[b, $, _, x, f, I]
|
|
3332
3335
|
), re = ue(
|
|
3333
3336
|
(C) => {
|
|
3334
3337
|
if (C.conditional && !C.conditional(b))
|
|
@@ -3354,34 +3357,38 @@ const rn = ({
|
|
|
3354
3357
|
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children: C.title }),
|
|
3355
3358
|
C.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: C.description })
|
|
3356
3359
|
] }),
|
|
3357
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((N) =>
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3360
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: S, children: i.map((N) => {
|
|
3361
|
+
const T = $[N.name] ? _[N.name] : void 0;
|
|
3362
|
+
return /* @__PURE__ */ c(
|
|
3363
|
+
"div",
|
|
3364
|
+
{
|
|
3365
|
+
className: d(
|
|
3366
|
+
"flex min-w-0 flex-col gap-1.5",
|
|
3367
|
+
N.type === "checkbox" && "justify-center"
|
|
3368
|
+
),
|
|
3369
|
+
style: {
|
|
3370
|
+
width: typeof N.width == "string" ? N.width : void 0,
|
|
3371
|
+
gridColumn: typeof N.width == "number" ? `span ${N.width} / span ${N.width}` : void 0
|
|
3372
|
+
},
|
|
3373
|
+
children: [
|
|
3374
|
+
N.type !== "custom" && N.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3375
|
+
N.label,
|
|
3376
|
+
N.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3377
|
+
] }),
|
|
3378
|
+
W(N),
|
|
3379
|
+
N.help && !T && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: N.help })
|
|
3380
|
+
]
|
|
3367
3381
|
},
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
N.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3372
|
-
] }),
|
|
3373
|
-
K(N)
|
|
3374
|
-
]
|
|
3375
|
-
},
|
|
3376
|
-
N.name
|
|
3377
|
-
))) }) })
|
|
3382
|
+
N.name
|
|
3383
|
+
);
|
|
3384
|
+
}) }) })
|
|
3378
3385
|
]
|
|
3379
3386
|
},
|
|
3380
3387
|
C.id
|
|
3381
3388
|
);
|
|
3382
3389
|
},
|
|
3383
|
-
[b, $,
|
|
3384
|
-
),
|
|
3390
|
+
[b, $, _, W]
|
|
3391
|
+
), P = d(
|
|
3385
3392
|
"overflow-hidden rounded-lg border border-border bg-surface",
|
|
3386
3393
|
{
|
|
3387
3394
|
"max-w-md": f === "sm",
|
|
@@ -3391,7 +3398,7 @@ const rn = ({
|
|
|
3391
3398
|
},
|
|
3392
3399
|
p
|
|
3393
3400
|
), ce = f === "full" ? "md" : f;
|
|
3394
|
-
return /* @__PURE__ */ c("form", { ref: w, onSubmit: q, className:
|
|
3401
|
+
return /* @__PURE__ */ c("form", { ref: w, onSubmit: q, className: P, children: [
|
|
3395
3402
|
!y && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3396
3403
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(re) }),
|
|
3397
3404
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: y && /* @__PURE__ */ c(xe, { children: [
|
|
@@ -3423,7 +3430,7 @@ const rn = ({
|
|
|
3423
3430
|
] }) })
|
|
3424
3431
|
] });
|
|
3425
3432
|
};
|
|
3426
|
-
function
|
|
3433
|
+
function fn({
|
|
3427
3434
|
open: t,
|
|
3428
3435
|
title: r,
|
|
3429
3436
|
description: n,
|
|
@@ -3435,7 +3442,7 @@ function nn({
|
|
|
3435
3442
|
onCancel: m
|
|
3436
3443
|
}) {
|
|
3437
3444
|
return /* @__PURE__ */ e(
|
|
3438
|
-
|
|
3445
|
+
He,
|
|
3439
3446
|
{
|
|
3440
3447
|
open: t,
|
|
3441
3448
|
onClose: m,
|
|
@@ -3457,7 +3464,7 @@ function nn({
|
|
|
3457
3464
|
}
|
|
3458
3465
|
);
|
|
3459
3466
|
}
|
|
3460
|
-
const
|
|
3467
|
+
const xr = {
|
|
3461
3468
|
default: "bg-surface-hover text-text",
|
|
3462
3469
|
primary: "bg-accent-soft text-accent",
|
|
3463
3470
|
secondary: "bg-surface-hover text-text-muted",
|
|
@@ -3467,11 +3474,11 @@ const mr = {
|
|
|
3467
3474
|
info: "bg-info-soft text-info-fg",
|
|
3468
3475
|
// Internal-note amber. Never for customer-visible content.
|
|
3469
3476
|
note: "bg-note-soft text-note"
|
|
3470
|
-
},
|
|
3477
|
+
}, br = {
|
|
3471
3478
|
sm: "px-2 py-0.5 text-xs",
|
|
3472
3479
|
md: "px-2.5 py-1 text-sm",
|
|
3473
3480
|
lg: "px-3 py-1.5 text-base"
|
|
3474
|
-
},
|
|
3481
|
+
}, pr = {
|
|
3475
3482
|
default: "bg-surface-hover",
|
|
3476
3483
|
primary: "bg-accent",
|
|
3477
3484
|
secondary: "bg-surface-hover",
|
|
@@ -3481,7 +3488,7 @@ const mr = {
|
|
|
3481
3488
|
info: "bg-info",
|
|
3482
3489
|
note: "bg-note"
|
|
3483
3490
|
};
|
|
3484
|
-
function
|
|
3491
|
+
function hn({
|
|
3485
3492
|
variant: t = "default",
|
|
3486
3493
|
size: r = "md",
|
|
3487
3494
|
dot: n = !1,
|
|
@@ -3499,9 +3506,9 @@ function sn({
|
|
|
3499
3506
|
// Base styles
|
|
3500
3507
|
"inline-flex items-center font-medium rounded-full",
|
|
3501
3508
|
// Variant styles
|
|
3502
|
-
|
|
3509
|
+
xr[t],
|
|
3503
3510
|
// Size styles
|
|
3504
|
-
|
|
3511
|
+
br[r],
|
|
3505
3512
|
l
|
|
3506
3513
|
),
|
|
3507
3514
|
...m,
|
|
@@ -3511,7 +3518,7 @@ function sn({
|
|
|
3511
3518
|
{
|
|
3512
3519
|
className: d(
|
|
3513
3520
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3514
|
-
|
|
3521
|
+
pr[t]
|
|
3515
3522
|
)
|
|
3516
3523
|
}
|
|
3517
3524
|
),
|
|
@@ -3530,11 +3537,11 @@ function sn({
|
|
|
3530
3537
|
}
|
|
3531
3538
|
);
|
|
3532
3539
|
}
|
|
3533
|
-
const
|
|
3540
|
+
const gr = {
|
|
3534
3541
|
neutral: "bg-surface-hover text-text-muted",
|
|
3535
3542
|
success: "bg-success-soft text-success-fg"
|
|
3536
3543
|
};
|
|
3537
|
-
function
|
|
3544
|
+
function xn({
|
|
3538
3545
|
icon: t,
|
|
3539
3546
|
tone: r = "neutral",
|
|
3540
3547
|
title: n,
|
|
@@ -3554,7 +3561,7 @@ function an({
|
|
|
3554
3561
|
),
|
|
3555
3562
|
...u,
|
|
3556
3563
|
children: [
|
|
3557
|
-
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl",
|
|
3564
|
+
t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", gr[r]), children: t }),
|
|
3558
3565
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3559
3566
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3560
3567
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3562,7 +3569,7 @@ function an({
|
|
|
3562
3569
|
}
|
|
3563
3570
|
);
|
|
3564
3571
|
}
|
|
3565
|
-
function
|
|
3572
|
+
function bn({ children: t, className: r, ...n }) {
|
|
3566
3573
|
return /* @__PURE__ */ e(
|
|
3567
3574
|
"kbd",
|
|
3568
3575
|
{
|
|
@@ -3575,14 +3582,14 @@ function ln({ children: t, className: r, ...n }) {
|
|
|
3575
3582
|
}
|
|
3576
3583
|
);
|
|
3577
3584
|
}
|
|
3578
|
-
const
|
|
3585
|
+
const vr = {
|
|
3579
3586
|
sm: "h-1",
|
|
3580
3587
|
md: "h-1.5"
|
|
3581
|
-
},
|
|
3588
|
+
}, yr = {
|
|
3582
3589
|
accent: "bg-accent",
|
|
3583
3590
|
success: "bg-success"
|
|
3584
3591
|
};
|
|
3585
|
-
function
|
|
3592
|
+
function pn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3586
3593
|
const o = Math.max(0, Math.min(100, t));
|
|
3587
3594
|
return /* @__PURE__ */ e(
|
|
3588
3595
|
"div",
|
|
@@ -3591,37 +3598,37 @@ function on({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3591
3598
|
"aria-valuenow": Math.round(o),
|
|
3592
3599
|
"aria-valuemin": 0,
|
|
3593
3600
|
"aria-valuemax": 100,
|
|
3594
|
-
className: d("w-full overflow-hidden rounded-full bg-surface-hover",
|
|
3601
|
+
className: d("w-full overflow-hidden rounded-full bg-surface-hover", vr[n], s),
|
|
3595
3602
|
...a,
|
|
3596
3603
|
children: /* @__PURE__ */ e(
|
|
3597
3604
|
"div",
|
|
3598
3605
|
{
|
|
3599
|
-
className: d("h-full rounded-full transition-[width] duration-300 ease-out",
|
|
3606
|
+
className: d("h-full rounded-full transition-[width] duration-300 ease-out", yr[r]),
|
|
3600
3607
|
style: { width: `${o}%` }
|
|
3601
3608
|
}
|
|
3602
3609
|
)
|
|
3603
3610
|
}
|
|
3604
3611
|
);
|
|
3605
3612
|
}
|
|
3606
|
-
const
|
|
3613
|
+
const Nr = {
|
|
3607
3614
|
xs: "h-3 w-3",
|
|
3608
3615
|
sm: "h-4 w-4",
|
|
3609
3616
|
md: "h-6 w-6",
|
|
3610
3617
|
lg: "h-8 w-8",
|
|
3611
3618
|
xl: "h-12 w-12"
|
|
3612
|
-
},
|
|
3619
|
+
}, wr = {
|
|
3613
3620
|
primary: "text-accent",
|
|
3614
3621
|
secondary: "text-text-muted",
|
|
3615
3622
|
white: "text-white",
|
|
3616
3623
|
current: "text-current"
|
|
3617
|
-
},
|
|
3624
|
+
}, kr = {
|
|
3618
3625
|
xs: "text-xs",
|
|
3619
3626
|
sm: "text-sm",
|
|
3620
3627
|
md: "text-sm",
|
|
3621
3628
|
lg: "text-base",
|
|
3622
3629
|
xl: "text-lg"
|
|
3623
3630
|
};
|
|
3624
|
-
function
|
|
3631
|
+
function gn({
|
|
3625
3632
|
size: t = "md",
|
|
3626
3633
|
variant: r = "primary",
|
|
3627
3634
|
label: n = "Loading...",
|
|
@@ -3644,8 +3651,8 @@ function cn({
|
|
|
3644
3651
|
{
|
|
3645
3652
|
className: d(
|
|
3646
3653
|
"animate-spin",
|
|
3647
|
-
|
|
3648
|
-
|
|
3654
|
+
Nr[t],
|
|
3655
|
+
wr[r]
|
|
3649
3656
|
),
|
|
3650
3657
|
fill: "none",
|
|
3651
3658
|
viewBox: "0 0 24 24",
|
|
@@ -3679,7 +3686,7 @@ function cn({
|
|
|
3679
3686
|
{
|
|
3680
3687
|
className: d(
|
|
3681
3688
|
"text-text-muted",
|
|
3682
|
-
|
|
3689
|
+
kr[t]
|
|
3683
3690
|
),
|
|
3684
3691
|
children: n
|
|
3685
3692
|
}
|
|
@@ -3689,7 +3696,7 @@ function cn({
|
|
|
3689
3696
|
}
|
|
3690
3697
|
);
|
|
3691
3698
|
}
|
|
3692
|
-
const
|
|
3699
|
+
const Cr = {
|
|
3693
3700
|
neutral: "bg-text-disabled",
|
|
3694
3701
|
accent: "bg-accent",
|
|
3695
3702
|
success: "bg-success",
|
|
@@ -3703,7 +3710,7 @@ const Nr = {
|
|
|
3703
3710
|
"cat-4": "bg-cat-4",
|
|
3704
3711
|
"cat-5": "bg-cat-5"
|
|
3705
3712
|
};
|
|
3706
|
-
function
|
|
3713
|
+
function vn({
|
|
3707
3714
|
tone: t = "neutral",
|
|
3708
3715
|
shape: r = "round",
|
|
3709
3716
|
pulse: n = !1,
|
|
@@ -3719,14 +3726,14 @@ function dn({
|
|
|
3719
3726
|
className: d(
|
|
3720
3727
|
"inline-block size-dot shrink-0",
|
|
3721
3728
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
3722
|
-
|
|
3729
|
+
Cr[t],
|
|
3723
3730
|
n && "animate-pulse",
|
|
3724
3731
|
a
|
|
3725
3732
|
)
|
|
3726
3733
|
}
|
|
3727
3734
|
);
|
|
3728
3735
|
}
|
|
3729
|
-
function
|
|
3736
|
+
function yn({
|
|
3730
3737
|
steps: t,
|
|
3731
3738
|
current: r,
|
|
3732
3739
|
variant: n = "numbered",
|
|
@@ -3762,7 +3769,7 @@ function un({
|
|
|
3762
3769
|
m < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3763
3770
|
] }, u)) });
|
|
3764
3771
|
}
|
|
3765
|
-
function
|
|
3772
|
+
function Nn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...o }) {
|
|
3766
3773
|
return /* @__PURE__ */ c(
|
|
3767
3774
|
"div",
|
|
3768
3775
|
{
|
|
@@ -3783,21 +3790,21 @@ function mn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-
|
|
|
3783
3790
|
}
|
|
3784
3791
|
);
|
|
3785
3792
|
}
|
|
3786
|
-
const
|
|
3793
|
+
const Sr = {
|
|
3787
3794
|
xs: "w-5 h-5 text-xs",
|
|
3788
3795
|
sm: "w-6 h-6 text-xs",
|
|
3789
3796
|
md: "w-7 h-7 text-base",
|
|
3790
3797
|
lg: "w-9 h-9 text-sm"
|
|
3791
3798
|
};
|
|
3792
|
-
function
|
|
3799
|
+
function zr(t) {
|
|
3793
3800
|
if (!t) return "?";
|
|
3794
3801
|
const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
3795
3802
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3796
3803
|
}
|
|
3797
|
-
const
|
|
3804
|
+
const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
3798
3805
|
const [o, l] = oe.useState(!1), u = d(
|
|
3799
3806
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover text-text",
|
|
3800
|
-
|
|
3807
|
+
Sr[n],
|
|
3801
3808
|
s
|
|
3802
3809
|
);
|
|
3803
3810
|
return r && !o ? /* @__PURE__ */ e(
|
|
@@ -3809,13 +3816,13 @@ const Cr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3809
3816
|
className: d(u, "object-cover"),
|
|
3810
3817
|
onError: () => l(!0)
|
|
3811
3818
|
}
|
|
3812
|
-
) : /* @__PURE__ */ e("span", { className: u, title: a ?? t, "aria-label": t, children:
|
|
3813
|
-
},
|
|
3819
|
+
) : /* @__PURE__ */ e("span", { className: u, title: a ?? t, "aria-label": t, children: zr(t) });
|
|
3820
|
+
}, Oe = "ring-surface", Mr = "ring-surface-accent", wn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3814
3821
|
if (t.length === 0) return null;
|
|
3815
3822
|
const a = t.slice(0, r), o = t.length - a.length;
|
|
3816
3823
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
3817
3824
|
a.map((l, u) => /* @__PURE__ */ e(
|
|
3818
|
-
|
|
3825
|
+
Er,
|
|
3819
3826
|
{
|
|
3820
3827
|
name: l.name,
|
|
3821
3828
|
src: l.src,
|
|
@@ -3823,7 +3830,7 @@ const Cr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3823
3830
|
title: l.name ? l.seen === !1 ? `${l.name} — nog niet gelezen` : l.name : void 0,
|
|
3824
3831
|
className: d(
|
|
3825
3832
|
u > 0 && "-ml-2",
|
|
3826
|
-
l.owner ?
|
|
3833
|
+
l.owner ? Mr : Oe,
|
|
3827
3834
|
l.seen === !1 && "opacity-40"
|
|
3828
3835
|
)
|
|
3829
3836
|
},
|
|
@@ -3835,7 +3842,7 @@ const Cr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3835
3842
|
className: d(
|
|
3836
3843
|
"inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-surface-hover text-text-muted",
|
|
3837
3844
|
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",
|
|
3838
|
-
|
|
3845
|
+
Oe
|
|
3839
3846
|
),
|
|
3840
3847
|
children: [
|
|
3841
3848
|
"+",
|
|
@@ -3850,12 +3857,12 @@ const Cr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3850
3857
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
3851
3858
|
tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
|
|
3852
3859
|
note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
|
|
3853
|
-
},
|
|
3860
|
+
}, $r = {
|
|
3854
3861
|
sm: "size-avatar-xs rounded-sm text-xs",
|
|
3855
3862
|
md: "size-avatar-sm rounded-md text-xs",
|
|
3856
3863
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3857
3864
|
};
|
|
3858
|
-
function
|
|
3865
|
+
function kn({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3859
3866
|
const o = Be[t in Be ? t : "note"];
|
|
3860
3867
|
return /* @__PURE__ */ e(
|
|
3861
3868
|
"span",
|
|
@@ -3863,7 +3870,7 @@ function hn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3863
3870
|
title: a,
|
|
3864
3871
|
className: d(
|
|
3865
3872
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
3866
|
-
|
|
3873
|
+
$r[n],
|
|
3867
3874
|
o.fg,
|
|
3868
3875
|
o.bg,
|
|
3869
3876
|
s
|
|
@@ -3872,7 +3879,7 @@ function hn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3872
3879
|
}
|
|
3873
3880
|
);
|
|
3874
3881
|
}
|
|
3875
|
-
const
|
|
3882
|
+
const Cn = ({
|
|
3876
3883
|
src: t,
|
|
3877
3884
|
alt: r,
|
|
3878
3885
|
size: n = "md",
|
|
@@ -3888,15 +3895,15 @@ const xn = ({
|
|
|
3888
3895
|
onError: x,
|
|
3889
3896
|
...p
|
|
3890
3897
|
}) => {
|
|
3891
|
-
const [w, g] =
|
|
3892
|
-
g(!1),
|
|
3893
|
-
}, X = (
|
|
3894
|
-
if (g(!1),
|
|
3895
|
-
|
|
3898
|
+
const [w, g] = F(!0), [b, A] = F(!1), [_, K] = F(t), $ = (P) => {
|
|
3899
|
+
g(!1), A(!1), f?.(P);
|
|
3900
|
+
}, X = (P) => {
|
|
3901
|
+
if (g(!1), A(!0), u && _ !== u) {
|
|
3902
|
+
K(u), A(!1), g(!0);
|
|
3896
3903
|
return;
|
|
3897
3904
|
}
|
|
3898
|
-
x?.(
|
|
3899
|
-
},
|
|
3905
|
+
x?.(P);
|
|
3906
|
+
}, U = d(
|
|
3900
3907
|
"relative overflow-hidden bg-surface-hover",
|
|
3901
3908
|
// Size variants
|
|
3902
3909
|
{
|
|
@@ -3924,7 +3931,7 @@ const xn = ({
|
|
|
3924
3931
|
"rounded-full": a === "full"
|
|
3925
3932
|
},
|
|
3926
3933
|
h
|
|
3927
|
-
),
|
|
3934
|
+
), I = d(
|
|
3928
3935
|
"w-full h-full object-cover transition-opacity duration-fast",
|
|
3929
3936
|
{
|
|
3930
3937
|
"opacity-0": w || b,
|
|
@@ -3933,27 +3940,27 @@ const xn = ({
|
|
|
3933
3940
|
), q = d(
|
|
3934
3941
|
"absolute inset-0 flex items-center justify-center",
|
|
3935
3942
|
"text-text-muted"
|
|
3936
|
-
),
|
|
3943
|
+
), W = /* @__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: [
|
|
3937
3944
|
/* @__PURE__ */ e(Y, { icon: dt, size: "lg", className: "mx-auto mb-1" }),
|
|
3938
3945
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
3939
3946
|
] });
|
|
3940
|
-
return /* @__PURE__ */ c("div", { className:
|
|
3947
|
+
return /* @__PURE__ */ c("div", { className: U, children: [
|
|
3941
3948
|
/* @__PURE__ */ e(
|
|
3942
3949
|
"img",
|
|
3943
3950
|
{
|
|
3944
3951
|
...p,
|
|
3945
|
-
src:
|
|
3952
|
+
src: _,
|
|
3946
3953
|
alt: r,
|
|
3947
|
-
className:
|
|
3954
|
+
className: I,
|
|
3948
3955
|
onLoad: $,
|
|
3949
3956
|
onError: X
|
|
3950
3957
|
}
|
|
3951
3958
|
),
|
|
3952
|
-
w && o && /* @__PURE__ */ e("div", { className: q, children: m ||
|
|
3959
|
+
w && o && /* @__PURE__ */ e("div", { className: q, children: m || W }),
|
|
3953
3960
|
b && l && /* @__PURE__ */ e("div", { className: q, children: y || re })
|
|
3954
3961
|
] });
|
|
3955
3962
|
};
|
|
3956
|
-
function
|
|
3963
|
+
function Sn({
|
|
3957
3964
|
items: t,
|
|
3958
3965
|
getRowKey: r,
|
|
3959
3966
|
variant: n = "divided",
|
|
@@ -3971,17 +3978,17 @@ function bn({
|
|
|
3971
3978
|
stickyGroupHeaders: w = !1,
|
|
3972
3979
|
collapsibleGroups: g = !1,
|
|
3973
3980
|
hideGroupCount: b = !1,
|
|
3974
|
-
selectable:
|
|
3975
|
-
selectedItems:
|
|
3976
|
-
onSelectionChange:
|
|
3981
|
+
selectable: A = !1,
|
|
3982
|
+
selectedItems: _ = [],
|
|
3983
|
+
onSelectionChange: K,
|
|
3977
3984
|
bulkActions: $,
|
|
3978
3985
|
header: X,
|
|
3979
|
-
stickyHeader:
|
|
3980
|
-
bordered:
|
|
3986
|
+
stickyHeader: U = !1,
|
|
3987
|
+
bordered: I = !1,
|
|
3981
3988
|
emptyContent: q,
|
|
3982
|
-
loading:
|
|
3989
|
+
loading: W = !1,
|
|
3983
3990
|
loadingRows: re = 4,
|
|
3984
|
-
className:
|
|
3991
|
+
className: P,
|
|
3985
3992
|
"aria-label": ce
|
|
3986
3993
|
}) {
|
|
3987
3994
|
const [C, i] = oe.useState(
|
|
@@ -3995,24 +4002,24 @@ function bn({
|
|
|
3995
4002
|
);
|
|
3996
4003
|
if (B.length === 0) return;
|
|
3997
4004
|
z.preventDefault();
|
|
3998
|
-
const
|
|
4005
|
+
const V = B.indexOf(document.activeElement), M = z.key === "Home" ? 0 : z.key === "End" ? B.length - 1 : z.key === "ArrowDown" ? (V + 1) % B.length : (V - 1 + B.length) % B.length;
|
|
3999
4006
|
B[M]?.focus();
|
|
4000
|
-
},
|
|
4001
|
-
|
|
4002
|
-
|
|
4007
|
+
}, T = (z, R) => r ? r(z, R) : R, k = (z) => _.includes(z), ee = (z, R) => {
|
|
4008
|
+
K && K(
|
|
4009
|
+
R ? [..._, z] : _.filter((B) => B !== z)
|
|
4003
4010
|
);
|
|
4004
|
-
}, ae = (z) =>
|
|
4011
|
+
}, ae = (z) => K?.(z ? [...t] : []), le = d(
|
|
4005
4012
|
"flex flex-col",
|
|
4006
|
-
|
|
4007
|
-
|
|
4013
|
+
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4014
|
+
P
|
|
4008
4015
|
);
|
|
4009
|
-
if (
|
|
4010
|
-
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z,
|
|
4016
|
+
if (W)
|
|
4017
|
+
return /* @__PURE__ */ e("div", { className: le, children: Array.from({ length: re }).map((z, R) => /* @__PURE__ */ c(
|
|
4011
4018
|
"div",
|
|
4012
4019
|
{
|
|
4013
4020
|
className: d(
|
|
4014
4021
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
4015
|
-
n === "divided" &&
|
|
4022
|
+
n === "divided" && R > 0 && "border-t border-border-subtle"
|
|
4016
4023
|
),
|
|
4017
4024
|
children: [
|
|
4018
4025
|
/* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
|
|
@@ -4021,12 +4028,12 @@ function bn({
|
|
|
4021
4028
|
/* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
|
|
4022
4029
|
]
|
|
4023
4030
|
},
|
|
4024
|
-
`skeleton-${
|
|
4031
|
+
`skeleton-${R}`
|
|
4025
4032
|
)) });
|
|
4026
4033
|
if (t.length === 0 && q)
|
|
4027
4034
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4028
|
-
const G = t.length > 0 &&
|
|
4029
|
-
const
|
|
4035
|
+
const G = t.length > 0 && _.length === t.length, j = _.length > 0 && !G, E = (z, R, B) => {
|
|
4036
|
+
const V = m?.(z, R) ?? !1, M = y?.(z, R) ?? !1, L = h?.(z, R) ?? !1, te = A && k(z);
|
|
4030
4037
|
return /* @__PURE__ */ c(
|
|
4031
4038
|
"li",
|
|
4032
4039
|
{
|
|
@@ -4034,11 +4041,11 @@ function bn({
|
|
|
4034
4041
|
role: "button",
|
|
4035
4042
|
tabIndex: 0,
|
|
4036
4043
|
"data-list-row": "",
|
|
4037
|
-
"aria-current":
|
|
4038
|
-
onClick: () => l(z,
|
|
4039
|
-
onFocus: () => u?.(
|
|
4044
|
+
"aria-current": V || void 0,
|
|
4045
|
+
onClick: () => l(z, R),
|
|
4046
|
+
onFocus: () => u?.(R),
|
|
4040
4047
|
onKeyDown: (v) => {
|
|
4041
|
-
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), l(z,
|
|
4048
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), l(z, R));
|
|
4042
4049
|
}
|
|
4043
4050
|
} : {},
|
|
4044
4051
|
className: d(
|
|
@@ -4046,12 +4053,12 @@ function bn({
|
|
|
4046
4053
|
"transition-colors duration-fast ease-out",
|
|
4047
4054
|
n === "divided" && !B && "border-t border-border-subtle",
|
|
4048
4055
|
l && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4049
|
-
|
|
4056
|
+
V || te ? "bg-accent-soft text-text" : l && "hover:bg-surface-hover",
|
|
4050
4057
|
M && "font-bold",
|
|
4051
|
-
|
|
4058
|
+
L && "opacity-55"
|
|
4052
4059
|
),
|
|
4053
4060
|
children: [
|
|
4054
|
-
|
|
4061
|
+
A && /* @__PURE__ */ e("span", { onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4055
4062
|
pe,
|
|
4056
4063
|
{
|
|
4057
4064
|
checked: k(z),
|
|
@@ -4066,30 +4073,30 @@ function bn({
|
|
|
4066
4073
|
className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
|
|
4067
4074
|
}
|
|
4068
4075
|
),
|
|
4069
|
-
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z,
|
|
4070
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z,
|
|
4071
|
-
o && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: o(z,
|
|
4076
|
+
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(z, R) }),
|
|
4077
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(z, R) : String(z) }),
|
|
4078
|
+
o && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: o(z, R) })
|
|
4072
4079
|
]
|
|
4073
4080
|
},
|
|
4074
|
-
|
|
4081
|
+
T(z, R)
|
|
4075
4082
|
);
|
|
4076
4083
|
}, D = (() => {
|
|
4077
4084
|
if (!f)
|
|
4078
|
-
return t.map((
|
|
4085
|
+
return t.map((V, M) => E(V, M, M === 0));
|
|
4079
4086
|
const z = /* @__PURE__ */ new Map();
|
|
4080
|
-
t.forEach((
|
|
4081
|
-
const
|
|
4082
|
-
z.has(
|
|
4087
|
+
t.forEach((V, M) => {
|
|
4088
|
+
const L = f(V, M);
|
|
4089
|
+
z.has(L) || z.set(L, []), z.get(L).push({ item: V, index: M });
|
|
4083
4090
|
});
|
|
4084
|
-
const
|
|
4091
|
+
const R = x ?? [];
|
|
4085
4092
|
return [
|
|
4086
|
-
...
|
|
4087
|
-
...[...z.keys()].filter((
|
|
4088
|
-
].flatMap((
|
|
4089
|
-
const
|
|
4093
|
+
...R.filter((V) => z.has(V.id)),
|
|
4094
|
+
...[...z.keys()].filter((V) => !R.some((M) => M.id === V)).map((V) => ({ id: V }))
|
|
4095
|
+
].flatMap((V, M) => {
|
|
4096
|
+
const L = z.get(V.id) ?? [], te = g && C[V.id], v = V.title ?? V.id, H = V.count ?? L.length, Z = /* @__PURE__ */ e(
|
|
4090
4097
|
"li",
|
|
4091
4098
|
{
|
|
4092
|
-
onClick: g ? () => i((J) => ({ ...J, [
|
|
4099
|
+
onClick: g ? () => i((J) => ({ ...J, [V.id]: !J[V.id] })) : void 0,
|
|
4093
4100
|
className: d(
|
|
4094
4101
|
"flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
|
|
4095
4102
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
@@ -4100,8 +4107,8 @@ function bn({
|
|
|
4100
4107
|
g && "cursor-pointer select-none hover:text-text"
|
|
4101
4108
|
),
|
|
4102
4109
|
"aria-expanded": g ? !te : void 0,
|
|
4103
|
-
style: w ? { top:
|
|
4104
|
-
children: p ? p(
|
|
4110
|
+
style: w ? { top: U ? 28 : 0 } : void 0,
|
|
4111
|
+
children: p ? p(V, L.map((J) => J.item)) : /* @__PURE__ */ c(xe, { children: [
|
|
4105
4112
|
g && /* @__PURE__ */ e(
|
|
4106
4113
|
Ce,
|
|
4107
4114
|
{
|
|
@@ -4113,32 +4120,32 @@ function bn({
|
|
|
4113
4120
|
}
|
|
4114
4121
|
),
|
|
4115
4122
|
/* @__PURE__ */ e("span", { children: v }),
|
|
4116
|
-
!b && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children:
|
|
4123
|
+
!b && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: H })
|
|
4117
4124
|
] })
|
|
4118
4125
|
},
|
|
4119
|
-
`group-${
|
|
4126
|
+
`group-${V.id}`
|
|
4120
4127
|
);
|
|
4121
4128
|
return te ? [Z] : [
|
|
4122
4129
|
Z,
|
|
4123
|
-
...
|
|
4124
|
-
({ item: J, index:
|
|
4130
|
+
...L.map(
|
|
4131
|
+
({ item: J, index: O }, ie) => E(J, O, ie === 0)
|
|
4125
4132
|
)
|
|
4126
4133
|
];
|
|
4127
4134
|
});
|
|
4128
4135
|
})();
|
|
4129
4136
|
return /* @__PURE__ */ c("div", { ref: S, className: le, onKeyDown: l ? N : void 0, children: [
|
|
4130
|
-
|
|
4137
|
+
A && _.length > 0 && /* @__PURE__ */ c("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
|
|
4131
4138
|
/* @__PURE__ */ e(
|
|
4132
4139
|
pe,
|
|
4133
4140
|
{
|
|
4134
4141
|
checked: G,
|
|
4135
|
-
indeterminate:
|
|
4142
|
+
indeterminate: j,
|
|
4136
4143
|
onChange: (z) => ae(z.target.checked),
|
|
4137
4144
|
"aria-label": "Alles selecteren"
|
|
4138
4145
|
}
|
|
4139
4146
|
),
|
|
4140
4147
|
/* @__PURE__ */ c("span", { className: "text-xs text-text-subtle", children: [
|
|
4141
|
-
|
|
4148
|
+
_.length,
|
|
4142
4149
|
" geselecteerd"
|
|
4143
4150
|
] }),
|
|
4144
4151
|
$ && /* @__PURE__ */ e("div", { className: "ml-auto flex gap-2", children: $ })
|
|
@@ -4149,7 +4156,7 @@ function bn({
|
|
|
4149
4156
|
className: d(
|
|
4150
4157
|
"flex items-center gap-3 border-b border-border-subtle px-4 py-1.5",
|
|
4151
4158
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4152
|
-
|
|
4159
|
+
U && "sticky top-0 z-20"
|
|
4153
4160
|
),
|
|
4154
4161
|
children: X
|
|
4155
4162
|
}
|
|
@@ -4157,7 +4164,7 @@ function bn({
|
|
|
4157
4164
|
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: D })
|
|
4158
4165
|
] });
|
|
4159
4166
|
}
|
|
4160
|
-
function
|
|
4167
|
+
function zn({
|
|
4161
4168
|
side: t,
|
|
4162
4169
|
continued: r = !1,
|
|
4163
4170
|
tone: n = "default",
|
|
@@ -4187,18 +4194,18 @@ function pn({
|
|
|
4187
4194
|
}
|
|
4188
4195
|
);
|
|
4189
4196
|
}
|
|
4190
|
-
const
|
|
4197
|
+
const Dr = {
|
|
4191
4198
|
default: "text-text",
|
|
4192
4199
|
urgent: "text-danger-fg",
|
|
4193
4200
|
success: "text-success-fg"
|
|
4194
4201
|
};
|
|
4195
|
-
function
|
|
4202
|
+
function En({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4196
4203
|
return /* @__PURE__ */ c("div", { className: d("rounded-xl shadow-sm bg-surface px-4 py-3.5", s), ...a, children: [
|
|
4197
|
-
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold",
|
|
4204
|
+
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Dr[n]), children: t }),
|
|
4198
4205
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4199
4206
|
] });
|
|
4200
4207
|
}
|
|
4201
|
-
const
|
|
4208
|
+
const Mn = ({
|
|
4202
4209
|
surface: t = !1,
|
|
4203
4210
|
title: r,
|
|
4204
4211
|
subtitle: n,
|
|
@@ -4212,17 +4219,17 @@ const vn = ({
|
|
|
4212
4219
|
editable: h = !1,
|
|
4213
4220
|
onTitleChange: f
|
|
4214
4221
|
}) => {
|
|
4215
|
-
const [x, p] =
|
|
4222
|
+
const [x, p] = F(!1), [w, g] = F(r), b = se(null);
|
|
4216
4223
|
Q(() => {
|
|
4217
4224
|
g(r);
|
|
4218
4225
|
}, [r]), Q(() => {
|
|
4219
4226
|
x && b.current && (b.current.focus(), b.current.select());
|
|
4220
4227
|
}, [x]);
|
|
4221
|
-
const
|
|
4228
|
+
const A = () => {
|
|
4222
4229
|
h && p(!0);
|
|
4223
|
-
},
|
|
4230
|
+
}, _ = () => {
|
|
4224
4231
|
p(!1), w.trim() !== "" && w !== r && f ? f(w.trim()) : g(r);
|
|
4225
|
-
},
|
|
4232
|
+
}, K = ($) => {
|
|
4226
4233
|
$.key === "Enter" ? b.current?.blur() : $.key === "Escape" && (g(r), p(!1));
|
|
4227
4234
|
};
|
|
4228
4235
|
return /* @__PURE__ */ c(
|
|
@@ -4246,15 +4253,15 @@ const vn = ({
|
|
|
4246
4253
|
type: "text",
|
|
4247
4254
|
value: w,
|
|
4248
4255
|
onChange: ($) => g($.target.value),
|
|
4249
|
-
onBlur:
|
|
4250
|
-
onKeyDown:
|
|
4256
|
+
onBlur: _,
|
|
4257
|
+
onKeyDown: K,
|
|
4251
4258
|
className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
|
|
4252
4259
|
}
|
|
4253
4260
|
) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
|
|
4254
4261
|
/* @__PURE__ */ e(
|
|
4255
4262
|
"h2",
|
|
4256
4263
|
{
|
|
4257
|
-
onClick:
|
|
4264
|
+
onClick: A,
|
|
4258
4265
|
className: d(
|
|
4259
4266
|
"text-xl font-semibold truncate",
|
|
4260
4267
|
h && "cursor-pointer"
|
|
@@ -4268,7 +4275,7 @@ const vn = ({
|
|
|
4268
4275
|
ut,
|
|
4269
4276
|
{
|
|
4270
4277
|
size: 15,
|
|
4271
|
-
onClick:
|
|
4278
|
+
onClick: A,
|
|
4272
4279
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4273
4280
|
}
|
|
4274
4281
|
)
|
|
@@ -4278,7 +4285,7 @@ const vn = ({
|
|
|
4278
4285
|
] }) }),
|
|
4279
4286
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4280
4287
|
($) => $.render ? /* @__PURE__ */ e(oe.Fragment, { children: $.render() }, $.id) : $.splitOptions && $.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4281
|
-
|
|
4288
|
+
Fe,
|
|
4282
4289
|
{
|
|
4283
4290
|
label: $.label,
|
|
4284
4291
|
onClick: $.onClick,
|
|
@@ -4307,24 +4314,24 @@ const vn = ({
|
|
|
4307
4314
|
]
|
|
4308
4315
|
}
|
|
4309
4316
|
);
|
|
4310
|
-
},
|
|
4317
|
+
}, Tr = {
|
|
4311
4318
|
none: "p-0",
|
|
4312
4319
|
sm: "p-2",
|
|
4313
4320
|
md: "p-4",
|
|
4314
4321
|
lg: "p-6"
|
|
4315
|
-
},
|
|
4322
|
+
}, $n = ({
|
|
4316
4323
|
actions: t = [],
|
|
4317
4324
|
onBack: r,
|
|
4318
4325
|
backLabel: n = "Back",
|
|
4319
4326
|
className: s,
|
|
4320
4327
|
padding: a = "md",
|
|
4321
4328
|
children: o
|
|
4322
|
-
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3",
|
|
4329
|
+
}) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 mb-3", Tr[a], s), children: [
|
|
4323
4330
|
r && /* @__PURE__ */ e(ne, { variant: "secondary", onClick: r, leftIcon: /* @__PURE__ */ e(Y, { icon: ke, size: "sm" }), iconOnly: !0 }),
|
|
4324
4331
|
o && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: o }),
|
|
4325
4332
|
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !o && "ml-auto"), children: t.map(
|
|
4326
4333
|
(l) => l.splitOptions && l.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4327
|
-
|
|
4334
|
+
Fe,
|
|
4328
4335
|
{
|
|
4329
4336
|
label: l.label,
|
|
4330
4337
|
onClick: l.onClick,
|
|
@@ -4349,8 +4356,55 @@ const vn = ({
|
|
|
4349
4356
|
l.id
|
|
4350
4357
|
)
|
|
4351
4358
|
) })
|
|
4352
|
-
] })
|
|
4353
|
-
|
|
4359
|
+
] }), _r = /<[a-z][\s\S]*>/i, Ar = [
|
|
4360
|
+
"[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
|
|
4361
|
+
"[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
|
|
4362
|
+
"[&_strong]:font-semibold [&_em]:italic",
|
|
4363
|
+
"[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:pl-5",
|
|
4364
|
+
"[&_li]:leading-relaxed",
|
|
4365
|
+
"[&_h1]:mb-1 [&_h1]:mt-2 [&_h1]:font-semibold [&_h2]:mb-1 [&_h2]:mt-2 [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:mt-2 [&_h3]:font-semibold",
|
|
4366
|
+
"[&_blockquote]:my-1.5 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-text-muted",
|
|
4367
|
+
"[&_hr]:my-2 [&_hr]:border-border",
|
|
4368
|
+
"[&_pre]:my-1.5 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-surface-sunk [&_pre]:p-2 [&_pre]:text-xs",
|
|
4369
|
+
"[&_code]:rounded-sm [&_code]:bg-surface-sunk [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs",
|
|
4370
|
+
"[&_pre_code]:bg-transparent [&_pre_code]:p-0",
|
|
4371
|
+
"[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
|
|
4372
|
+
"[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
|
|
4373
|
+
"[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
|
|
4374
|
+
].join(" "), Lr = {
|
|
4375
|
+
p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
|
|
4376
|
+
a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
|
|
4377
|
+
strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
|
|
4378
|
+
em: (t) => /* @__PURE__ */ e("em", { className: "italic", ...t }),
|
|
4379
|
+
ul: (t) => /* @__PURE__ */ e("ul", { className: "my-1.5 list-disc space-y-0.5 pl-5", ...t }),
|
|
4380
|
+
ol: (t) => /* @__PURE__ */ e("ol", { className: "my-1.5 list-decimal space-y-0.5 pl-5", ...t }),
|
|
4381
|
+
li: (t) => /* @__PURE__ */ e("li", { className: "leading-relaxed", ...t }),
|
|
4382
|
+
h1: (t) => /* @__PURE__ */ e("h1", { className: "mb-1 mt-2 text-md font-semibold first:mt-0", ...t }),
|
|
4383
|
+
h2: (t) => /* @__PURE__ */ e("h2", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
|
|
4384
|
+
h3: (t) => /* @__PURE__ */ e("h3", { className: "mb-1 mt-2 text-base font-semibold first:mt-0", ...t }),
|
|
4385
|
+
blockquote: (t) => /* @__PURE__ */ e("blockquote", { className: "my-1.5 border-l-2 border-border pl-3 text-text-muted", ...t }),
|
|
4386
|
+
hr: (t) => /* @__PURE__ */ e("hr", { className: "my-2 border-border", ...t }),
|
|
4387
|
+
pre: (t) => /* @__PURE__ */ e("pre", { className: "my-1.5 overflow-x-auto rounded-md bg-surface-sunk p-2 text-xs", ...t }),
|
|
4388
|
+
code: ({ className: t, children: r, ...n }) => {
|
|
4389
|
+
const s = String(r ?? "");
|
|
4390
|
+
return /language-/.test(t ?? "") || s.includes(`
|
|
4391
|
+
`) ? /* @__PURE__ */ e("code", { className: "font-mono text-xs", ...n, children: r }) : /* @__PURE__ */ e("code", { className: "rounded-sm bg-surface-sunk px-1 py-0.5 font-mono text-xs", ...n, children: r });
|
|
4392
|
+
},
|
|
4393
|
+
table: (t) => /* @__PURE__ */ e("div", { className: "my-1.5 overflow-x-auto", children: /* @__PURE__ */ e("table", { className: "w-full border-collapse text-xs", ...t }) }),
|
|
4394
|
+
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4395
|
+
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4396
|
+
};
|
|
4397
|
+
function Dn({ text: t, className: r, as: n }) {
|
|
4398
|
+
const s = t ?? "";
|
|
4399
|
+
return (n ? n === "html" : _r.test(s)) ? /* @__PURE__ */ e(
|
|
4400
|
+
"div",
|
|
4401
|
+
{
|
|
4402
|
+
className: d("break-words", Ar, r),
|
|
4403
|
+
dangerouslySetInnerHTML: { __html: bt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
|
|
4404
|
+
}
|
|
4405
|
+
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(pt, { remarkPlugins: [gt], components: Lr, children: s }) });
|
|
4406
|
+
}
|
|
4407
|
+
function Tn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4354
4408
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4355
4409
|
return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: d("flex items-center gap-3 py-2", s), children: [
|
|
4356
4410
|
n === "center" && a,
|
|
@@ -4359,7 +4413,7 @@ function Nn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
4359
4413
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4360
4414
|
] });
|
|
4361
4415
|
}
|
|
4362
|
-
function
|
|
4416
|
+
function _n({
|
|
4363
4417
|
label: t,
|
|
4364
4418
|
description: r,
|
|
4365
4419
|
control: n,
|
|
@@ -4386,7 +4440,7 @@ function wn({
|
|
|
4386
4440
|
}
|
|
4387
4441
|
);
|
|
4388
4442
|
}
|
|
4389
|
-
function
|
|
4443
|
+
function An({
|
|
4390
4444
|
icon: t,
|
|
4391
4445
|
title: r,
|
|
4392
4446
|
description: n,
|
|
@@ -4406,7 +4460,7 @@ function kn({
|
|
|
4406
4460
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4407
4461
|
] });
|
|
4408
4462
|
}
|
|
4409
|
-
function
|
|
4463
|
+
function Ln({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4410
4464
|
return /* @__PURE__ */ c(
|
|
4411
4465
|
"button",
|
|
4412
4466
|
{
|
|
@@ -4424,13 +4478,13 @@ function Cn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
4424
4478
|
}
|
|
4425
4479
|
);
|
|
4426
4480
|
}
|
|
4427
|
-
function
|
|
4481
|
+
function Ir(t, r) {
|
|
4428
4482
|
return r.split(".").reduce(
|
|
4429
4483
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
4430
4484
|
t
|
|
4431
4485
|
);
|
|
4432
4486
|
}
|
|
4433
|
-
const
|
|
4487
|
+
const In = ({
|
|
4434
4488
|
groups: t,
|
|
4435
4489
|
data: r,
|
|
4436
4490
|
size: n = "md",
|
|
@@ -4453,7 +4507,7 @@ const Sn = ({
|
|
|
4453
4507
|
return x ? x.label : String(h || "-");
|
|
4454
4508
|
}, u = ue(
|
|
4455
4509
|
(h) => {
|
|
4456
|
-
const f =
|
|
4510
|
+
const f = Ir(r, h.name);
|
|
4457
4511
|
if (h.type === "array") {
|
|
4458
4512
|
const p = f;
|
|
4459
4513
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -4484,8 +4538,8 @@ const Sn = ({
|
|
|
4484
4538
|
}
|
|
4485
4539
|
) }),
|
|
4486
4540
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((b) => {
|
|
4487
|
-
const
|
|
4488
|
-
let
|
|
4541
|
+
const A = w?.[b.name];
|
|
4542
|
+
let _ = "-";
|
|
4489
4543
|
switch (b.type) {
|
|
4490
4544
|
case "text":
|
|
4491
4545
|
case "email":
|
|
@@ -4493,30 +4547,30 @@ const Sn = ({
|
|
|
4493
4547
|
case "tel":
|
|
4494
4548
|
case "url":
|
|
4495
4549
|
case "textarea":
|
|
4496
|
-
|
|
4550
|
+
_ = A || "-";
|
|
4497
4551
|
break;
|
|
4498
4552
|
case "select":
|
|
4499
4553
|
case "radio":
|
|
4500
|
-
|
|
4501
|
-
|
|
4554
|
+
_ = l(
|
|
4555
|
+
A,
|
|
4502
4556
|
b.options
|
|
4503
4557
|
);
|
|
4504
4558
|
break;
|
|
4505
4559
|
case "checkbox":
|
|
4506
|
-
|
|
4560
|
+
_ = o(A);
|
|
4507
4561
|
break;
|
|
4508
4562
|
case "date":
|
|
4509
|
-
|
|
4563
|
+
_ = a(A);
|
|
4510
4564
|
break;
|
|
4511
4565
|
case "custom":
|
|
4512
|
-
|
|
4513
|
-
value:
|
|
4566
|
+
_ = b.customComponent?.({
|
|
4567
|
+
value: A
|
|
4514
4568
|
});
|
|
4515
4569
|
break;
|
|
4516
4570
|
default:
|
|
4517
|
-
|
|
4571
|
+
_ = String(A || "-");
|
|
4518
4572
|
}
|
|
4519
|
-
return b.format && (
|
|
4573
|
+
return b.format && (_ = b.format(A, w)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
4520
4574
|
/* @__PURE__ */ e(
|
|
4521
4575
|
de,
|
|
4522
4576
|
{
|
|
@@ -4532,7 +4586,7 @@ const Sn = ({
|
|
|
4532
4586
|
variant: "body",
|
|
4533
4587
|
size: "sm",
|
|
4534
4588
|
className: "text-text",
|
|
4535
|
-
children:
|
|
4589
|
+
children: _
|
|
4536
4590
|
}
|
|
4537
4591
|
)
|
|
4538
4592
|
] }, b.name);
|
|
@@ -4759,7 +4813,7 @@ const Sn = ({
|
|
|
4759
4813
|
]
|
|
4760
4814
|
}
|
|
4761
4815
|
) });
|
|
4762
|
-
},
|
|
4816
|
+
}, jn = ({
|
|
4763
4817
|
title: t,
|
|
4764
4818
|
actionIcons: r,
|
|
4765
4819
|
items: n,
|
|
@@ -4794,7 +4848,7 @@ const Sn = ({
|
|
|
4794
4848
|
u
|
|
4795
4849
|
)
|
|
4796
4850
|
) })
|
|
4797
|
-
] }),
|
|
4851
|
+
] }), jr = {
|
|
4798
4852
|
xs: "text-xs",
|
|
4799
4853
|
sm: "text-sm",
|
|
4800
4854
|
md: "text-base",
|
|
@@ -4803,13 +4857,13 @@ const Sn = ({
|
|
|
4803
4857
|
"2xl": "text-2xl",
|
|
4804
4858
|
"3xl": "text-3xl",
|
|
4805
4859
|
"4xl": "text-3xl"
|
|
4806
|
-
},
|
|
4860
|
+
}, Pr = {
|
|
4807
4861
|
light: "font-normal",
|
|
4808
4862
|
normal: "font-normal",
|
|
4809
4863
|
medium: "font-medium",
|
|
4810
4864
|
semibold: "font-semibold",
|
|
4811
4865
|
bold: "font-bold"
|
|
4812
|
-
},
|
|
4866
|
+
}, Or = {
|
|
4813
4867
|
primary: "text-text",
|
|
4814
4868
|
secondary: "text-text-muted",
|
|
4815
4869
|
accent: "text-accent",
|
|
@@ -4819,11 +4873,11 @@ const Sn = ({
|
|
|
4819
4873
|
info: "text-info-fg",
|
|
4820
4874
|
neutral: "text-text",
|
|
4821
4875
|
current: "text-current"
|
|
4822
|
-
},
|
|
4876
|
+
}, Br = {
|
|
4823
4877
|
left: "text-left",
|
|
4824
4878
|
center: "text-center",
|
|
4825
4879
|
right: "text-right"
|
|
4826
|
-
},
|
|
4880
|
+
}, Pn = ({
|
|
4827
4881
|
level: t = 1,
|
|
4828
4882
|
size: r,
|
|
4829
4883
|
weight: n = "semibold",
|
|
@@ -4836,16 +4890,16 @@ const Sn = ({
|
|
|
4836
4890
|
}) => {
|
|
4837
4891
|
const y = `h${t}`, h = d(
|
|
4838
4892
|
"font-sans text-pretty",
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4893
|
+
jr[r || Fr(t)],
|
|
4894
|
+
Pr[n],
|
|
4895
|
+
Or[s],
|
|
4896
|
+
Br[a],
|
|
4843
4897
|
o && "truncate",
|
|
4844
4898
|
l
|
|
4845
4899
|
);
|
|
4846
4900
|
return /* @__PURE__ */ e(y, { className: h, ...m, children: u });
|
|
4847
4901
|
};
|
|
4848
|
-
function
|
|
4902
|
+
function Fr(t) {
|
|
4849
4903
|
return {
|
|
4850
4904
|
1: "2xl",
|
|
4851
4905
|
2: "xl",
|
|
@@ -4855,7 +4909,7 @@ function Ir(t) {
|
|
|
4855
4909
|
6: "md"
|
|
4856
4910
|
}[t] || "md";
|
|
4857
4911
|
}
|
|
4858
|
-
const
|
|
4912
|
+
const On = ({
|
|
4859
4913
|
commands: t,
|
|
4860
4914
|
isOpen: r,
|
|
4861
4915
|
onClose: n,
|
|
@@ -4863,34 +4917,34 @@ const Mn = ({
|
|
|
4863
4917
|
initialCommandPath: a,
|
|
4864
4918
|
initialActiveIndex: o
|
|
4865
4919
|
}) => {
|
|
4866
|
-
const [l, u] =
|
|
4920
|
+
const [l, u] = F(""), [m, y] = F(a || []), [h, f] = F(o || 0), x = se(null), p = se(null), g = (m.length ? t.find((b) => b.id === m[0])?.subCommands || [] : t).filter(
|
|
4867
4921
|
(b) => b.label.toLowerCase().includes(l.toLowerCase())
|
|
4868
4922
|
);
|
|
4869
4923
|
return Q(() => {
|
|
4870
4924
|
r || (u(""), y(a || []), f(o || 0));
|
|
4871
4925
|
}, [r]), Q(() => {
|
|
4872
|
-
const b = (
|
|
4926
|
+
const b = (A) => {
|
|
4873
4927
|
if (r) {
|
|
4874
|
-
if (
|
|
4928
|
+
if (A.key === "Escape")
|
|
4875
4929
|
n();
|
|
4876
|
-
else if (
|
|
4930
|
+
else if (A.key === "ArrowUp")
|
|
4877
4931
|
f(
|
|
4878
|
-
(
|
|
4932
|
+
(_) => _ > 0 ? _ - 1 : g.length - 1
|
|
4879
4933
|
);
|
|
4880
|
-
else if (
|
|
4934
|
+
else if (A.key === "ArrowDown")
|
|
4881
4935
|
f(
|
|
4882
|
-
(
|
|
4936
|
+
(_) => _ < g.length - 1 ? _ + 1 : 0
|
|
4883
4937
|
);
|
|
4884
|
-
else if (
|
|
4885
|
-
const
|
|
4886
|
-
|
|
4938
|
+
else if (A.key === "Enter") {
|
|
4939
|
+
const _ = g[h];
|
|
4940
|
+
_ && (_.subCommands ? (y([...m, _.id]), f(0)) : _.action && (_.action(), n()));
|
|
4887
4941
|
}
|
|
4888
4942
|
}
|
|
4889
4943
|
};
|
|
4890
4944
|
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
4891
4945
|
}, [r, n, g, h, m]), Q(() => {
|
|
4892
|
-
const b = (
|
|
4893
|
-
x.current && !x.current.contains(
|
|
4946
|
+
const b = (A) => {
|
|
4947
|
+
x.current && !x.current.contains(A.target) && n();
|
|
4894
4948
|
};
|
|
4895
4949
|
return r && document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
4896
4950
|
}, [r, n]), Q(() => {
|
|
@@ -4923,15 +4977,15 @@ const Mn = ({
|
|
|
4923
4977
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
4924
4978
|
children: [
|
|
4925
4979
|
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
4926
|
-
g.map((b,
|
|
4980
|
+
g.map((b, A) => /* @__PURE__ */ c(
|
|
4927
4981
|
"div",
|
|
4928
4982
|
{
|
|
4929
|
-
"data-index":
|
|
4930
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
4983
|
+
"data-index": A,
|
|
4984
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${A === h ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
4931
4985
|
onClick: () => {
|
|
4932
4986
|
b.subCommands ? (y([...m, b.id]), f(0)) : b.action && (b.action(), n());
|
|
4933
4987
|
},
|
|
4934
|
-
onMouseEnter: () => f(
|
|
4988
|
+
onMouseEnter: () => f(A),
|
|
4935
4989
|
children: [
|
|
4936
4990
|
b.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: b.icon }),
|
|
4937
4991
|
/* @__PURE__ */ e("span", { className: "flex-grow", children: b.label }),
|
|
@@ -4960,7 +5014,7 @@ const Mn = ({
|
|
|
4960
5014
|
]
|
|
4961
5015
|
}
|
|
4962
5016
|
) }) : null;
|
|
4963
|
-
},
|
|
5017
|
+
}, Rr = {
|
|
4964
5018
|
none: "p-0",
|
|
4965
5019
|
xs: "p-1",
|
|
4966
5020
|
sm: "p-2",
|
|
@@ -4968,7 +5022,7 @@ const Mn = ({
|
|
|
4968
5022
|
lg: "p-6",
|
|
4969
5023
|
xl: "p-8",
|
|
4970
5024
|
"2xl": "p-12"
|
|
4971
|
-
},
|
|
5025
|
+
}, Vr = {
|
|
4972
5026
|
none: "m-0",
|
|
4973
5027
|
xs: "m-1",
|
|
4974
5028
|
sm: "m-2",
|
|
@@ -4976,7 +5030,7 @@ const Mn = ({
|
|
|
4976
5030
|
lg: "m-6",
|
|
4977
5031
|
xl: "m-8",
|
|
4978
5032
|
"2xl": "m-12"
|
|
4979
|
-
},
|
|
5033
|
+
}, Hr = {
|
|
4980
5034
|
none: "",
|
|
4981
5035
|
primary: "bg-accent text-accent-fg",
|
|
4982
5036
|
secondary: "bg-surface-hover",
|
|
@@ -4992,26 +5046,26 @@ const Mn = ({
|
|
|
4992
5046
|
backdrop: "bg-page",
|
|
4993
5047
|
editor: "bg-surface",
|
|
4994
5048
|
input: "bg-surface-input"
|
|
4995
|
-
},
|
|
5049
|
+
}, qr = {
|
|
4996
5050
|
none: "rounded-none",
|
|
4997
5051
|
sm: "rounded-sm",
|
|
4998
5052
|
md: "rounded-md",
|
|
4999
5053
|
lg: "rounded-lg",
|
|
5000
5054
|
xl: "rounded-xl",
|
|
5001
5055
|
full: "rounded-full"
|
|
5002
|
-
},
|
|
5056
|
+
}, Ur = {
|
|
5003
5057
|
none: "shadow-none",
|
|
5004
5058
|
sm: "shadow-none",
|
|
5005
5059
|
md: "shadow-overlay",
|
|
5006
5060
|
lg: "shadow-overlay",
|
|
5007
5061
|
xl: "shadow-modal",
|
|
5008
5062
|
"2xl": "shadow-modal"
|
|
5009
|
-
},
|
|
5063
|
+
}, Wr = {
|
|
5010
5064
|
none: "border-0",
|
|
5011
5065
|
sm: "border",
|
|
5012
5066
|
md: "border-2",
|
|
5013
5067
|
lg: "border-4"
|
|
5014
|
-
},
|
|
5068
|
+
}, Kr = {
|
|
5015
5069
|
primary: "border-accent-border",
|
|
5016
5070
|
secondary: "border-border",
|
|
5017
5071
|
accent: "border-accent-border",
|
|
@@ -5021,7 +5075,7 @@ const Mn = ({
|
|
|
5021
5075
|
info: "border-info-border",
|
|
5022
5076
|
neutral: "border-border-subtle",
|
|
5023
5077
|
white: "border-border-subtle"
|
|
5024
|
-
},
|
|
5078
|
+
}, Ue = me(
|
|
5025
5079
|
({
|
|
5026
5080
|
padding: t,
|
|
5027
5081
|
margin: r,
|
|
@@ -5038,13 +5092,13 @@ const Mn = ({
|
|
|
5038
5092
|
{
|
|
5039
5093
|
ref: h,
|
|
5040
5094
|
className: d(
|
|
5041
|
-
t &&
|
|
5042
|
-
r &&
|
|
5043
|
-
n &&
|
|
5044
|
-
s &&
|
|
5045
|
-
a &&
|
|
5046
|
-
o &&
|
|
5047
|
-
l &&
|
|
5095
|
+
t && Rr[t],
|
|
5096
|
+
r && Vr[r],
|
|
5097
|
+
n && Hr[n],
|
|
5098
|
+
s && qr[s],
|
|
5099
|
+
a && Ur[a],
|
|
5100
|
+
o && Wr[o],
|
|
5101
|
+
l && Kr[l],
|
|
5048
5102
|
u
|
|
5049
5103
|
),
|
|
5050
5104
|
...y,
|
|
@@ -5052,9 +5106,9 @@ const Mn = ({
|
|
|
5052
5106
|
}
|
|
5053
5107
|
)
|
|
5054
5108
|
);
|
|
5055
|
-
|
|
5056
|
-
const
|
|
5057
|
-
|
|
5109
|
+
Ue.displayName = "Box";
|
|
5110
|
+
const Bn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
5111
|
+
Ue,
|
|
5058
5112
|
{
|
|
5059
5113
|
background: "module",
|
|
5060
5114
|
radius: "lg",
|
|
@@ -5068,7 +5122,7 @@ const $n = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5068
5122
|
]
|
|
5069
5123
|
}
|
|
5070
5124
|
);
|
|
5071
|
-
function
|
|
5125
|
+
function Fn({
|
|
5072
5126
|
identifier: t,
|
|
5073
5127
|
resourceLoader: r,
|
|
5074
5128
|
framework: n = "react",
|
|
@@ -5076,7 +5130,7 @@ function Dn({
|
|
|
5076
5130
|
componentProps: a,
|
|
5077
5131
|
className: o
|
|
5078
5132
|
}) {
|
|
5079
|
-
const l = se(null), [u, m] =
|
|
5133
|
+
const l = se(null), [u, m] = F(!0), [y, h] = F(null), f = se(null);
|
|
5080
5134
|
return se(null), Q(() => {
|
|
5081
5135
|
let x = !0;
|
|
5082
5136
|
return (async () => {
|
|
@@ -5116,7 +5170,7 @@ function Dn({
|
|
|
5116
5170
|
n === "react" && y && /* @__PURE__ */ e(y, { ...a })
|
|
5117
5171
|
] });
|
|
5118
5172
|
}
|
|
5119
|
-
class
|
|
5173
|
+
class Rn extends xt {
|
|
5120
5174
|
constructor() {
|
|
5121
5175
|
super(...arguments), this.state = {
|
|
5122
5176
|
hasError: !1,
|
|
@@ -5145,66 +5199,67 @@ class Tn extends xt {
|
|
|
5145
5199
|
}
|
|
5146
5200
|
}
|
|
5147
5201
|
export {
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5202
|
+
Nn as AssistantCard,
|
|
5203
|
+
Er as Avatar,
|
|
5204
|
+
wn as AvatarStack,
|
|
5205
|
+
hn as Badge,
|
|
5206
|
+
Ue as Box,
|
|
5153
5207
|
ne as Button,
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5208
|
+
ln as ButtonGroup,
|
|
5209
|
+
Bn as Card,
|
|
5210
|
+
kn as ChannelBadge,
|
|
5157
5211
|
pe as Checkbox,
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5212
|
+
On as CommandPalette,
|
|
5213
|
+
fn as ConfirmDialog,
|
|
5214
|
+
Wt as ContentLoading,
|
|
5161
5215
|
$e as DatePicker,
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5216
|
+
Kt as Dropdown,
|
|
5217
|
+
xn as EmptyState,
|
|
5218
|
+
Rn as ErrorBoundary,
|
|
5219
|
+
Fn as FederatedResource,
|
|
5220
|
+
on as FilterChip,
|
|
5221
|
+
Ft as FolderSelect,
|
|
5222
|
+
mn as Form,
|
|
5223
|
+
Pn as Heading,
|
|
5170
5224
|
Y as Icon,
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5225
|
+
Cn as Image,
|
|
5226
|
+
bn as Kbd,
|
|
5227
|
+
En as KpiCard,
|
|
5228
|
+
cn as Link,
|
|
5229
|
+
Sn as List,
|
|
5230
|
+
nn as MeetingGrid,
|
|
5231
|
+
zn as MessageBubble,
|
|
5232
|
+
He as Modal,
|
|
5233
|
+
Mn as PageHeader,
|
|
5234
|
+
$n as PageToolbar,
|
|
5235
|
+
sn as ParticipantTile,
|
|
5236
|
+
$t as Popover,
|
|
5237
|
+
pn as ProgressBar,
|
|
5238
|
+
Dn as RichText,
|
|
5239
|
+
qt as SearchableTextField,
|
|
5240
|
+
Tn as SectionDivider,
|
|
5241
|
+
dn as SegmentedToggle,
|
|
5187
5242
|
Ne as Select,
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5243
|
+
_n as SettingsRow,
|
|
5244
|
+
An as SettingsSection,
|
|
5245
|
+
jn as SidebarMenu,
|
|
5246
|
+
Ln as SourceChip,
|
|
5247
|
+
gn as Spinner,
|
|
5248
|
+
Fe as SplitButton,
|
|
5249
|
+
vn as StatusDot,
|
|
5250
|
+
yn as StepIndicator,
|
|
5251
|
+
ur as StorageInput,
|
|
5252
|
+
Ut as Switch,
|
|
5253
|
+
un as TabBar,
|
|
5254
|
+
je as Table,
|
|
5255
|
+
nr as Tabs,
|
|
5201
5256
|
de as Text,
|
|
5202
5257
|
De as TextArea,
|
|
5203
5258
|
be as TextField,
|
|
5204
|
-
|
|
5205
|
-
|
|
5259
|
+
an as VideoSurface,
|
|
5260
|
+
In as View,
|
|
5206
5261
|
d as cn,
|
|
5207
|
-
|
|
5208
|
-
|
|
5262
|
+
rn as createSizes,
|
|
5263
|
+
tn as createVariants
|
|
5209
5264
|
};
|
|
5210
5265
|
//# sourceMappingURL=index.js.map
|