@opencxh/ui-kit 3.165.0 → 3.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +833 -810
- package/dist/index.js.map +1 -1
- package/dist/src/meeting/MeetingGrid.d.ts +29 -2
- package/dist/src/meeting/ParticipantTile.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { clsx as gt } from "clsx";
|
|
2
|
-
import
|
|
2
|
+
import oe, { useState as B, useLayoutEffect as pt, useRef as re, useEffect as J, forwardRef as ve, useMemo as pe, useCallback as xe, createContext as et, useId as vt, useContext as yt, Component as Nt } from "react";
|
|
3
3
|
import { jsxs as c, jsx as e, Fragment as Ee } from "react/jsx-runtime";
|
|
4
4
|
import * as wt from "lucide-react";
|
|
5
|
-
import { VideoOff as kt, User as Ct, MicOff as St, Mic as Et, X as Se, ChevronDown as De, ExternalLink as zt, Calendar as Mt, ChevronLeft as ze, ChevronRight as Le, ChevronDownIcon as Tt, Loader2 as
|
|
5
|
+
import { VideoOff as kt, User as Ct, MicOff as St, Mic as Et, X as Se, ChevronDown as De, ExternalLink as zt, Calendar as Mt, ChevronLeft as ze, ChevronRight as Le, ChevronDownIcon as Tt, Loader2 as _t, Search as Ie, Check as Ue, ChevronUp as $t, Ellipsis as At, FileText as je, HardDrive as We, ArrowLeft as Dt, FolderPlus as Lt, Upload as It, Folder as Ke, Trash2 as Pt, Plus as Ot, Sparkles as jt, ImageOff as Ft, Pencil as Rt, ArrowUpRight as Bt } from "lucide-react";
|
|
6
6
|
import Ht from "dompurify";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import qt from "react-markdown";
|
|
8
|
+
import Vt from "remark-gfm";
|
|
9
9
|
function i(...t) {
|
|
10
10
|
return gt(t);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function es(t) {
|
|
13
13
|
return (r, n) => t[r]?.[n] || "";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ts(t) {
|
|
16
16
|
return (r) => t[r] || "";
|
|
17
17
|
}
|
|
18
18
|
function Pe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
19
|
-
const [l, o] =
|
|
19
|
+
const [l, o] = B({});
|
|
20
20
|
return pt(() => {
|
|
21
21
|
if (!t) return;
|
|
22
22
|
const u = () => {
|
|
@@ -57,26 +57,49 @@ const Kt = {
|
|
|
57
57
|
function rt(t) {
|
|
58
58
|
return Kt[tt(t)];
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function rs(t) {
|
|
61
61
|
return Gt[tt(t)];
|
|
62
62
|
}
|
|
63
63
|
const Ge = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
|
|
64
|
-
function
|
|
64
|
+
function ns(t) {
|
|
65
65
|
let r = 0;
|
|
66
66
|
for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
|
|
67
67
|
return Ge[r % Ge.length];
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const $e = (t) => t == null ? "" : String(t), Jt = (t) => $e(t).trim().toLowerCase(), Yt = [
|
|
70
|
+
{ upTo: 1, cols: "grid-cols-1" },
|
|
71
|
+
{ upTo: 2, cols: "grid-cols-1 @[22rem]:grid-cols-2" },
|
|
72
|
+
{ upTo: 4, cols: "grid-cols-1 @[18rem]:grid-cols-2" },
|
|
73
|
+
{ upTo: 9, cols: "grid-cols-2 @[26rem]:grid-cols-3" }
|
|
74
|
+
], Xt = "grid-cols-2 @[26rem]:grid-cols-3 @[40rem]:grid-cols-4";
|
|
75
|
+
function Zt(t) {
|
|
76
|
+
return Yt.find((r) => t <= r.upTo)?.cols ?? Xt;
|
|
77
|
+
}
|
|
78
|
+
function Qt(t, r) {
|
|
79
|
+
const n = r ?? t;
|
|
80
|
+
if (t <= n) return { shown: t, hidden: 0 };
|
|
81
|
+
const s = Math.max(0, n - 1);
|
|
82
|
+
return { shown: s, hidden: t - s };
|
|
83
|
+
}
|
|
84
|
+
function ss({ tiles: t, pinned: r, maxStrip: n, className: s }) {
|
|
85
|
+
if (r) {
|
|
86
|
+
const { shown: a, hidden: l } = Qt(t.length, n), o = t.slice(0, a);
|
|
87
|
+
return /* @__PURE__ */ c("div", { className: i("@container flex h-full min-h-0 flex-col gap-2", s), children: [
|
|
88
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: r }),
|
|
89
|
+
t.length > 0 && // Een vaste hoogte in procenten van het vlak, met een bodem zodat de strip
|
|
90
|
+
// in een lage dock niet tot een lijn samenknijpt.
|
|
91
|
+
/* @__PURE__ */ c("div", { className: "flex h-[22%] min-h-14 shrink-0 gap-2 overflow-x-auto", children: [
|
|
92
|
+
o.map((u, d) => /* @__PURE__ */ e("div", { className: "h-full min-w-0 shrink-0 aspect-video", children: u }, d)),
|
|
93
|
+
l > 0 && /* @__PURE__ */ c("div", { className: "flex h-full aspect-video shrink-0 items-center justify-center rounded-lg bg-video-surface text-sm font-semibold tabular-nums text-white/80", children: [
|
|
94
|
+
"+",
|
|
95
|
+
l
|
|
96
|
+
] })
|
|
97
|
+
] })
|
|
75
98
|
] });
|
|
76
|
-
|
|
77
|
-
return /* @__PURE__ */ e("div", { className: i("grid
|
|
99
|
+
}
|
|
100
|
+
return /* @__PURE__ */ e("div", { className: i("@container grid h-full min-h-0 auto-rows-fr gap-2", Zt(t.length), s), children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-h-0 min-w-0", children: a }, l)) });
|
|
78
101
|
}
|
|
79
|
-
function
|
|
102
|
+
function as({
|
|
80
103
|
name: t,
|
|
81
104
|
avatarUrl: r,
|
|
82
105
|
muted: n,
|
|
@@ -90,24 +113,31 @@ function ts({
|
|
|
90
113
|
"div",
|
|
91
114
|
{
|
|
92
115
|
className: i(
|
|
93
|
-
"relative
|
|
116
|
+
"@container relative flex min-h-0 min-w-0 items-center justify-center overflow-hidden rounded-lg bg-video-surface",
|
|
94
117
|
u ? "h-full w-full" : "aspect-video",
|
|
95
118
|
s && "ring-2 ring-speaking",
|
|
96
119
|
o
|
|
97
120
|
),
|
|
98
121
|
children: [
|
|
99
|
-
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
122
|
+
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex min-h-0 min-w-0 items-center justify-center text-gray-300", children: r ? /* @__PURE__ */ e(
|
|
123
|
+
"img",
|
|
124
|
+
{
|
|
125
|
+
src: r,
|
|
126
|
+
alt: t,
|
|
127
|
+
className: "aspect-square w-[38%] max-w-16 min-w-6 rounded-full object-cover"
|
|
128
|
+
}
|
|
129
|
+
) : /* @__PURE__ */ e("div", { className: "flex aspect-square w-[38%] max-w-16 min-w-6 items-center justify-center rounded-full bg-video-surface-strong", children: a ? /* @__PURE__ */ e(kt, { className: "w-1/2 h-1/2" }) : /* @__PURE__ */ e(Ct, { className: "w-1/2 h-1/2" }) }) }),
|
|
130
|
+
/* @__PURE__ */ c("div", { className: "absolute inset-x-2 bottom-2 flex w-fit max-w-[calc(100%-1rem)] items-center gap-1.5 rounded bg-video-overlay px-1.5 py-1 text-xs text-white", children: [
|
|
131
|
+
n ? /* @__PURE__ */ e(St, { className: "size-3 shrink-0" }) : /* @__PURE__ */ e(Et, { className: "size-3 shrink-0" }),
|
|
132
|
+
/* @__PURE__ */ e("span", { className: "hidden truncate @[9rem]:inline", children: t })
|
|
103
133
|
] })
|
|
104
134
|
]
|
|
105
135
|
}
|
|
106
136
|
);
|
|
107
137
|
}
|
|
108
|
-
function
|
|
138
|
+
function ls({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
109
139
|
const a = re(null);
|
|
110
|
-
return
|
|
140
|
+
return J(() => {
|
|
111
141
|
if (!r || !a.current) return;
|
|
112
142
|
const l = t(a.current);
|
|
113
143
|
return () => {
|
|
@@ -125,7 +155,7 @@ function rs({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
125
155
|
}
|
|
126
156
|
);
|
|
127
157
|
}
|
|
128
|
-
const
|
|
158
|
+
const er = {
|
|
129
159
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
|
|
130
160
|
secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
|
|
131
161
|
// No resting fill, so no disabled fill either — a greyed-out plate where
|
|
@@ -138,7 +168,7 @@ const Yt = {
|
|
|
138
168
|
success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
139
169
|
warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
140
170
|
"danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
|
|
141
|
-
},
|
|
171
|
+
}, tr = {
|
|
142
172
|
xs: "h-control-xs px-2 text-xs",
|
|
143
173
|
sm: "h-control-sm px-3 text-sm",
|
|
144
174
|
md: "h-control-md px-4 text-sm",
|
|
@@ -146,7 +176,7 @@ const Yt = {
|
|
|
146
176
|
xl: "h-control-xl px-6 text-base",
|
|
147
177
|
"2xl": "h-control-2xl px-6 text-base",
|
|
148
178
|
full: "h-control-md px-4 text-sm"
|
|
149
|
-
},
|
|
179
|
+
}, rr = {
|
|
150
180
|
xs: "h-control-xs w-6",
|
|
151
181
|
sm: "h-control-sm w-7",
|
|
152
182
|
md: "h-control-md w-8",
|
|
@@ -185,8 +215,8 @@ const Yt = {
|
|
|
185
215
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
186
216
|
"disabled:cursor-not-allowed disabled:border-border-subtle",
|
|
187
217
|
"disabled:text-text-disabled",
|
|
188
|
-
|
|
189
|
-
o ?
|
|
218
|
+
er[t],
|
|
219
|
+
o ? rr[r] : tr[r],
|
|
190
220
|
(n || r === "full") && "w-full",
|
|
191
221
|
s && "cursor-wait",
|
|
192
222
|
d
|
|
@@ -212,7 +242,7 @@ const Yt = {
|
|
|
212
242
|
}
|
|
213
243
|
);
|
|
214
244
|
se.displayName = "Button";
|
|
215
|
-
const
|
|
245
|
+
const os = ({
|
|
216
246
|
children: t,
|
|
217
247
|
size: r = "md",
|
|
218
248
|
orientation: n = "horizontal",
|
|
@@ -243,12 +273,12 @@ const ns = ({
|
|
|
243
273
|
);
|
|
244
274
|
return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
|
|
245
275
|
};
|
|
246
|
-
function
|
|
276
|
+
function cs(t) {
|
|
247
277
|
if (!t) return;
|
|
248
278
|
const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = wt[r];
|
|
249
279
|
return typeof n == "function" || typeof n == "object" && n !== null ? n : void 0;
|
|
250
280
|
}
|
|
251
|
-
const
|
|
281
|
+
const nr = {
|
|
252
282
|
primary: "text-text",
|
|
253
283
|
secondary: "text-text-muted",
|
|
254
284
|
accent: "text-accent",
|
|
@@ -258,7 +288,7 @@ const Qt = {
|
|
|
258
288
|
info: "text-info-fg",
|
|
259
289
|
neutral: "text-text-subtle",
|
|
260
290
|
current: "text-current"
|
|
261
|
-
},
|
|
291
|
+
}, Q = ({
|
|
262
292
|
icon: t,
|
|
263
293
|
size: r = "md",
|
|
264
294
|
color: n = "current",
|
|
@@ -268,9 +298,9 @@ const Qt = {
|
|
|
268
298
|
"aria-label": o,
|
|
269
299
|
...u
|
|
270
300
|
}) => {
|
|
271
|
-
const d = typeof r == "number" ? r :
|
|
301
|
+
const d = typeof r == "number" ? r : sr(r), v = i(
|
|
272
302
|
"inline-block shrink-0",
|
|
273
|
-
|
|
303
|
+
nr[n],
|
|
274
304
|
s && [
|
|
275
305
|
"cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
|
|
276
306
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -292,7 +322,7 @@ const Qt = {
|
|
|
292
322
|
};
|
|
293
323
|
return /* @__PURE__ */ e(t, { ...m });
|
|
294
324
|
};
|
|
295
|
-
function
|
|
325
|
+
function sr(t) {
|
|
296
326
|
return {
|
|
297
327
|
xs: 12,
|
|
298
328
|
sm: 14,
|
|
@@ -311,8 +341,8 @@ const nt = ({
|
|
|
311
341
|
disabled: o = !1,
|
|
312
342
|
triggerLabel: u
|
|
313
343
|
}) => {
|
|
314
|
-
const [d, v] =
|
|
315
|
-
|
|
344
|
+
const [d, v] = B(!1), m = re(null), f = re(null), b = Pe(d, f, { placement: n });
|
|
345
|
+
J(() => {
|
|
316
346
|
if (!d) return;
|
|
317
347
|
const p = (C) => {
|
|
318
348
|
m.current && !m.current.contains(C.target) && v(!1);
|
|
@@ -358,29 +388,29 @@ const nt = ({
|
|
|
358
388
|
}
|
|
359
389
|
)
|
|
360
390
|
] });
|
|
361
|
-
},
|
|
391
|
+
}, ar = {
|
|
362
392
|
none: "hover:bg-surface-sunk hover:text-text",
|
|
363
393
|
default: "bg-surface-sunk text-text-muted hover:text-text",
|
|
364
394
|
muted: "bg-surface-sunk text-text-subtle hover:text-text",
|
|
365
395
|
outline: "text-text-muted ring-1 ring-inset ring-border-strong hover:bg-surface-hover hover:text-text",
|
|
366
396
|
warning: "bg-warning-soft text-warning-fg",
|
|
367
397
|
danger: "bg-danger-soft text-danger-fg"
|
|
368
|
-
},
|
|
398
|
+
}, lr = (t) => i(
|
|
369
399
|
// A button's default cursor is an arrow, so it has to be asked for.
|
|
370
400
|
"inline-flex cursor-pointer select-none items-center text-sm font-medium",
|
|
371
401
|
t.size === "sm" ? "h-control-sm" : "h-control-md",
|
|
372
402
|
"transition-colors duration-fast ease-out",
|
|
373
403
|
t.shape === "pill" ? "rounded-full" : "rounded-md",
|
|
374
404
|
// Picking a value outranks whatever the value happens to mean.
|
|
375
|
-
t.active ? "bg-info-soft text-info-fg" :
|
|
405
|
+
t.active ? "bg-info-soft text-info-fg" : ar[t.tone ?? "default"],
|
|
376
406
|
t.className
|
|
377
|
-
),
|
|
407
|
+
), or = (t) => i(
|
|
378
408
|
"inline-flex items-center gap-1.5 pl-3",
|
|
379
409
|
t.shape === "pill" ? "rounded-full" : "rounded-md",
|
|
380
410
|
t.withClear ? "pr-1.5" : "pr-3",
|
|
381
411
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
382
412
|
);
|
|
383
|
-
function
|
|
413
|
+
function cr({
|
|
384
414
|
label: t,
|
|
385
415
|
icon: r,
|
|
386
416
|
tone: n = "default",
|
|
@@ -396,18 +426,18 @@ function sr({
|
|
|
396
426
|
title: b,
|
|
397
427
|
className: g
|
|
398
428
|
}) {
|
|
399
|
-
const N = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", x =
|
|
429
|
+
const N = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", x = lr({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ee, { children: [
|
|
400
430
|
r,
|
|
401
431
|
t,
|
|
402
|
-
o && /* @__PURE__ */ e(
|
|
403
|
-
] }), S =
|
|
432
|
+
o && /* @__PURE__ */ e(Q, { icon: De, size: "xs" })
|
|
433
|
+
] }), S = or({ shape: s, withClear: N }), I = N && /* @__PURE__ */ e(
|
|
404
434
|
"button",
|
|
405
435
|
{
|
|
406
436
|
type: "button",
|
|
407
437
|
"aria-label": m,
|
|
408
438
|
onClick: v,
|
|
409
439
|
className: i("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
|
|
410
|
-
children: /* @__PURE__ */ e(
|
|
440
|
+
children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs" })
|
|
411
441
|
}
|
|
412
442
|
);
|
|
413
443
|
return u ? /* @__PURE__ */ c("span", { className: x, title: b, children: [
|
|
@@ -427,13 +457,13 @@ function sr({
|
|
|
427
457
|
I
|
|
428
458
|
] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: f, className: i(x, S), children: C });
|
|
429
459
|
}
|
|
430
|
-
const
|
|
460
|
+
const ir = {
|
|
431
461
|
xs: "text-xs",
|
|
432
462
|
sm: "text-sm",
|
|
433
463
|
md: "text-base",
|
|
434
464
|
lg: "text-md",
|
|
435
465
|
xl: "text-lg"
|
|
436
|
-
},
|
|
466
|
+
}, dr = {
|
|
437
467
|
primary: "text-text hover:text-info-fg hover:underline",
|
|
438
468
|
info: "text-info-fg hover:underline",
|
|
439
469
|
secondary: "text-text-muted hover:text-text",
|
|
@@ -442,7 +472,7 @@ const ar = {
|
|
|
442
472
|
success: "text-success-fg hover:underline",
|
|
443
473
|
warning: "text-warning-fg hover:underline",
|
|
444
474
|
error: "text-danger-fg hover:underline"
|
|
445
|
-
},
|
|
475
|
+
}, ur = {
|
|
446
476
|
primary: "bg-accent-soft",
|
|
447
477
|
accent: "bg-accent-soft",
|
|
448
478
|
secondary: "bg-surface-hover",
|
|
@@ -451,7 +481,7 @@ const ar = {
|
|
|
451
481
|
warning: "bg-warning-soft",
|
|
452
482
|
error: "bg-danger-soft",
|
|
453
483
|
info: "bg-info-soft"
|
|
454
|
-
},
|
|
484
|
+
}, is = ({
|
|
455
485
|
variant: t = "default",
|
|
456
486
|
size: r = "md",
|
|
457
487
|
color: n = "primary",
|
|
@@ -468,13 +498,13 @@ const ar = {
|
|
|
468
498
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
469
499
|
"transition-colors duration-fast ease-out",
|
|
470
500
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
471
|
-
|
|
472
|
-
!s &&
|
|
501
|
+
ir[r],
|
|
502
|
+
!s && dr[n],
|
|
473
503
|
t === "subtle" && "no-underline opacity-70 hover:opacity-100",
|
|
474
504
|
t === "underline" && "underline decoration-1 hover:decoration-2",
|
|
475
505
|
t === "button" && [
|
|
476
506
|
"h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
|
|
477
|
-
|
|
507
|
+
ur[n]
|
|
478
508
|
],
|
|
479
509
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
480
510
|
l
|
|
@@ -489,11 +519,11 @@ const ar = {
|
|
|
489
519
|
o,
|
|
490
520
|
f && /* @__PURE__ */ e(zt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
491
521
|
] });
|
|
492
|
-
},
|
|
522
|
+
}, mr = {
|
|
493
523
|
sm: "h-control-sm px-3 text-sm",
|
|
494
524
|
md: "h-control-md px-3 text-sm"
|
|
495
525
|
};
|
|
496
|
-
function
|
|
526
|
+
function fr({
|
|
497
527
|
options: t,
|
|
498
528
|
value: r,
|
|
499
529
|
onChange: n,
|
|
@@ -530,7 +560,7 @@ function ir({
|
|
|
530
560
|
"transition-colors duration-fast ease-out",
|
|
531
561
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
532
562
|
l && "min-w-0 flex-1",
|
|
533
|
-
|
|
563
|
+
mr[s],
|
|
534
564
|
v ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
|
|
535
565
|
),
|
|
536
566
|
children: d.label
|
|
@@ -541,11 +571,11 @@ function ir({
|
|
|
541
571
|
}
|
|
542
572
|
);
|
|
543
573
|
}
|
|
544
|
-
const
|
|
574
|
+
const hr = {
|
|
545
575
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover",
|
|
546
576
|
secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
|
|
547
577
|
outline: "border border-accent-border text-accent hover:bg-accent-soft"
|
|
548
|
-
},
|
|
578
|
+
}, xr = {
|
|
549
579
|
sm: "h-control-sm w-7",
|
|
550
580
|
md: "h-control-md w-8"
|
|
551
581
|
};
|
|
@@ -595,8 +625,8 @@ function st({
|
|
|
595
625
|
className: i(
|
|
596
626
|
"inline-flex items-center justify-center rounded-md rounded-l-none",
|
|
597
627
|
"transition-colors duration-fast ease-out",
|
|
598
|
-
|
|
599
|
-
|
|
628
|
+
hr[n],
|
|
629
|
+
xr[s],
|
|
600
630
|
m && "cursor-not-allowed opacity-50"
|
|
601
631
|
),
|
|
602
632
|
children: /* @__PURE__ */ e(De, { className: "size-icon-md" })
|
|
@@ -627,17 +657,17 @@ function st({
|
|
|
627
657
|
] })
|
|
628
658
|
);
|
|
629
659
|
}
|
|
630
|
-
const
|
|
660
|
+
const br = {
|
|
631
661
|
sm: "size-checkbox-sm",
|
|
632
662
|
md: "size-checkbox",
|
|
633
663
|
lg: "size-checkbox-lg",
|
|
634
664
|
full: "size-checkbox"
|
|
635
|
-
},
|
|
665
|
+
}, gr = {
|
|
636
666
|
sm: "min-h-control-sm",
|
|
637
667
|
md: "min-h-control-md",
|
|
638
668
|
lg: "min-h-control-lg",
|
|
639
669
|
full: "min-h-control-md"
|
|
640
|
-
},
|
|
670
|
+
}, pr = {
|
|
641
671
|
sm: "text-sm",
|
|
642
672
|
md: "text-base",
|
|
643
673
|
lg: "text-md",
|
|
@@ -655,16 +685,16 @@ const mr = {
|
|
|
655
685
|
id: d,
|
|
656
686
|
...v
|
|
657
687
|
}, m) => {
|
|
658
|
-
const f =
|
|
688
|
+
const f = oe.useId(), b = d || `checkbox-${f}`, g = !!n, N = oe.useRef(null), p = oe.useCallback(
|
|
659
689
|
(x) => {
|
|
660
690
|
N.current = x, typeof m == "function" ? m(x) : m && typeof m == "object" && (m.current = x);
|
|
661
691
|
},
|
|
662
692
|
[m]
|
|
663
693
|
);
|
|
664
|
-
return
|
|
694
|
+
return oe.useEffect(() => {
|
|
665
695
|
N.current && (N.current.indeterminate = a);
|
|
666
696
|
}, [a]), /* @__PURE__ */ c("div", { className: i("flex flex-col", l), children: [
|
|
667
|
-
/* @__PURE__ */ c("div", { className: i("flex items-center gap-3",
|
|
697
|
+
/* @__PURE__ */ c("div", { className: i("flex items-center gap-3", gr[s]), children: [
|
|
668
698
|
/* @__PURE__ */ e(
|
|
669
699
|
"input",
|
|
670
700
|
{
|
|
@@ -681,7 +711,7 @@ const mr = {
|
|
|
681
711
|
"transition-colors duration-fast ease-out",
|
|
682
712
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
683
713
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
684
|
-
|
|
714
|
+
br[s],
|
|
685
715
|
g ? "border-danger-border" : "border-border-strong",
|
|
686
716
|
u
|
|
687
717
|
),
|
|
@@ -696,7 +726,7 @@ const mr = {
|
|
|
696
726
|
className: i(
|
|
697
727
|
"cursor-pointer",
|
|
698
728
|
g ? "text-danger-fg" : "text-text",
|
|
699
|
-
|
|
729
|
+
pr[s],
|
|
700
730
|
o
|
|
701
731
|
),
|
|
702
732
|
children: t
|
|
@@ -710,19 +740,19 @@ const mr = {
|
|
|
710
740
|
}
|
|
711
741
|
);
|
|
712
742
|
we.displayName = "Checkbox";
|
|
713
|
-
const
|
|
743
|
+
const vr = {
|
|
714
744
|
xs: "text-xs",
|
|
715
745
|
sm: "text-sm",
|
|
716
746
|
md: "text-base",
|
|
717
747
|
lg: "text-md",
|
|
718
748
|
xl: "text-lg"
|
|
719
|
-
},
|
|
749
|
+
}, yr = {
|
|
720
750
|
light: "font-normal",
|
|
721
751
|
normal: "font-normal",
|
|
722
752
|
medium: "font-medium",
|
|
723
753
|
semibold: "font-semibold",
|
|
724
754
|
bold: "font-bold"
|
|
725
|
-
},
|
|
755
|
+
}, Nr = {
|
|
726
756
|
primary: "text-text",
|
|
727
757
|
secondary: "text-text-muted",
|
|
728
758
|
accent: "text-accent",
|
|
@@ -733,12 +763,12 @@ const xr = {
|
|
|
733
763
|
neutral: "text-text",
|
|
734
764
|
current: "text-current",
|
|
735
765
|
muted: "text-text-subtle"
|
|
736
|
-
},
|
|
766
|
+
}, wr = {
|
|
737
767
|
left: "text-left",
|
|
738
768
|
center: "text-center",
|
|
739
769
|
right: "text-right",
|
|
740
770
|
justify: "text-justify"
|
|
741
|
-
},
|
|
771
|
+
}, kr = {
|
|
742
772
|
tight: "leading-tight",
|
|
743
773
|
normal: "leading-normal",
|
|
744
774
|
relaxed: "leading-relaxed"
|
|
@@ -757,20 +787,20 @@ const xr = {
|
|
|
757
787
|
children: f,
|
|
758
788
|
...b
|
|
759
789
|
}) => {
|
|
760
|
-
const g = v ||
|
|
790
|
+
const g = v || Cr(t), N = t === "caption", p = t === "label", x = t === "code", C = i(
|
|
761
791
|
"font-sans",
|
|
762
792
|
// Variant — caption and label pin their own size/weight
|
|
763
793
|
N && "text-xs text-text-subtle",
|
|
764
794
|
p && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
765
795
|
x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
766
796
|
// Size — only where the variant does not pin it
|
|
767
|
-
!N && !p && !x &&
|
|
797
|
+
!N && !p && !x && vr[r],
|
|
768
798
|
// Weight — label owns its weight
|
|
769
|
-
!p &&
|
|
770
|
-
|
|
771
|
-
|
|
799
|
+
!p && yr[n],
|
|
800
|
+
Nr[s],
|
|
801
|
+
wr[a],
|
|
772
802
|
// Line height only overrides the body variant
|
|
773
|
-
t === "body" &&
|
|
803
|
+
t === "body" && kr[d],
|
|
774
804
|
o && "italic",
|
|
775
805
|
u && "underline",
|
|
776
806
|
l && "truncate",
|
|
@@ -778,7 +808,7 @@ const xr = {
|
|
|
778
808
|
);
|
|
779
809
|
return /* @__PURE__ */ e(g, { className: C, ...b, children: f });
|
|
780
810
|
};
|
|
781
|
-
function
|
|
811
|
+
function Cr(t) {
|
|
782
812
|
return {
|
|
783
813
|
body: "p",
|
|
784
814
|
caption: "span",
|
|
@@ -786,7 +816,7 @@ function yr(t) {
|
|
|
786
816
|
code: "code"
|
|
787
817
|
}[t] || "p";
|
|
788
818
|
}
|
|
789
|
-
function
|
|
819
|
+
function ds({
|
|
790
820
|
label: t,
|
|
791
821
|
value: r,
|
|
792
822
|
onChange: n,
|
|
@@ -800,11 +830,11 @@ function ls({
|
|
|
800
830
|
removeLabel: m = "Remove",
|
|
801
831
|
tooLargeLabel: f = "That image is too large."
|
|
802
832
|
}) {
|
|
803
|
-
const b = re(null), [g, N] =
|
|
833
|
+
const b = re(null), [g, N] = B(null), p = async (x) => {
|
|
804
834
|
if (!x) return;
|
|
805
835
|
N(null);
|
|
806
|
-
const C = await
|
|
807
|
-
if (a &&
|
|
836
|
+
const C = await Er(x, s);
|
|
837
|
+
if (a && Sr(C) > a) {
|
|
808
838
|
N(f);
|
|
809
839
|
return;
|
|
810
840
|
}
|
|
@@ -863,11 +893,11 @@ function ls({
|
|
|
863
893
|
)
|
|
864
894
|
] });
|
|
865
895
|
}
|
|
866
|
-
function
|
|
896
|
+
function Sr(t) {
|
|
867
897
|
const r = t.slice(t.indexOf(",") + 1), n = r.endsWith("==") ? 2 : r.endsWith("=") ? 1 : 0;
|
|
868
898
|
return Math.floor(r.length * 3 / 4) - n;
|
|
869
899
|
}
|
|
870
|
-
function
|
|
900
|
+
function Er(t, r) {
|
|
871
901
|
return new Promise((n, s) => {
|
|
872
902
|
const a = new FileReader();
|
|
873
903
|
a.onload = () => {
|
|
@@ -885,7 +915,7 @@ function wr(t, r) {
|
|
|
885
915
|
}, a.onerror = s, a.readAsDataURL(t);
|
|
886
916
|
});
|
|
887
917
|
}
|
|
888
|
-
const
|
|
918
|
+
const zr = () => /* @__PURE__ */ e(Q, { icon: Mt, size: "md", color: "current" }), Mr = () => /* @__PURE__ */ e(Q, { icon: ze, size: "md", color: "current" }), Tr = () => /* @__PURE__ */ e(Q, { icon: Le, size: "md", color: "current" }), Be = ve(({
|
|
889
919
|
value: t,
|
|
890
920
|
onChange: r,
|
|
891
921
|
placeholder: n = "Select date",
|
|
@@ -898,8 +928,8 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
898
928
|
format: v = "MM/dd/yyyy",
|
|
899
929
|
withTime: m = !1
|
|
900
930
|
}, f) => {
|
|
901
|
-
const [b, g] =
|
|
902
|
-
|
|
931
|
+
const [b, g] = B(!1), [N, p] = B(() => t || /* @__PURE__ */ new Date()), x = re(null), C = re(null), S = Pe(b, C);
|
|
932
|
+
J(() => {
|
|
903
933
|
const h = (z) => {
|
|
904
934
|
x.current && !x.current.contains(z.target) && g(!1);
|
|
905
935
|
};
|
|
@@ -909,19 +939,19 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
909
939
|
}, [b]);
|
|
910
940
|
const I = (h) => {
|
|
911
941
|
if (!h) return "";
|
|
912
|
-
const z = h.getDate().toString().padStart(2, "0"), k = (h.getMonth() + 1).toString().padStart(2, "0"),
|
|
942
|
+
const z = h.getDate().toString().padStart(2, "0"), k = (h.getMonth() + 1).toString().padStart(2, "0"), $ = h.getFullYear(), y = v === "dd/MM/yyyy" ? `${z}/${k}/${$}` : v === "yyyy-MM-dd" ? `${$}-${k}-${z}` : `${k}/${z}/${$}`;
|
|
913
943
|
return m ? `${y} ${A(h)}` : y;
|
|
914
944
|
}, A = (h) => `${h.getHours().toString().padStart(2, "0")}:${h.getMinutes().toString().padStart(2, "0")}`, K = (h) => {
|
|
915
945
|
const [z, k] = h.split(":").map(Number);
|
|
916
946
|
if (Number.isNaN(z) || Number.isNaN(k)) return;
|
|
917
|
-
const
|
|
918
|
-
|
|
947
|
+
const $ = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
948
|
+
$.setHours(z, k, 0, 0), r?.($);
|
|
919
949
|
}, W = () => {
|
|
920
|
-
const h = N.getFullYear(), z = N.getMonth(), k = new Date(h, z, 1),
|
|
921
|
-
|
|
922
|
-
const y = [],
|
|
950
|
+
const h = N.getFullYear(), z = N.getMonth(), k = new Date(h, z, 1), $ = new Date(k);
|
|
951
|
+
$.setDate($.getDate() - k.getDay());
|
|
952
|
+
const y = [], H = new Date($);
|
|
923
953
|
for (let ae = 0; ae < 42; ae++)
|
|
924
|
-
y.push(new Date(
|
|
954
|
+
y.push(new Date(H)), H.setDate(H.getDate() + 1);
|
|
925
955
|
return y;
|
|
926
956
|
}, D = (h) => {
|
|
927
957
|
if (h.getMonth() === N.getMonth() && !(u && h < u) && !(d && h > d)) {
|
|
@@ -932,13 +962,13 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
932
962
|
}
|
|
933
963
|
r?.(h), g(!1);
|
|
934
964
|
}
|
|
935
|
-
},
|
|
965
|
+
}, V = () => {
|
|
936
966
|
p(new Date(N.getFullYear(), N.getMonth() - 1, 1));
|
|
937
967
|
}, ne = () => {
|
|
938
968
|
p(new Date(N.getFullYear(), N.getMonth() + 1, 1));
|
|
939
|
-
},
|
|
969
|
+
}, Y = () => {
|
|
940
970
|
r?.(null), g(!1);
|
|
941
|
-
},
|
|
971
|
+
}, X = i(
|
|
942
972
|
"w-full border border-border-strong rounded-tile transition-colors duration-fast",
|
|
943
973
|
"bg-surface text-text",
|
|
944
974
|
"placeholder:text-text-muted",
|
|
@@ -978,7 +1008,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
978
1008
|
required: a,
|
|
979
1009
|
readOnly: !0,
|
|
980
1010
|
onClick: () => !s && g(!b),
|
|
981
|
-
className: i(
|
|
1011
|
+
className: i(X, "pr-10 cursor-pointer")
|
|
982
1012
|
}
|
|
983
1013
|
),
|
|
984
1014
|
/* @__PURE__ */ e(
|
|
@@ -988,7 +1018,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
988
1018
|
onClick: () => !s && g(!b),
|
|
989
1019
|
disabled: s,
|
|
990
1020
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
991
|
-
children: /* @__PURE__ */ e(
|
|
1021
|
+
children: /* @__PURE__ */ e(zr, {})
|
|
992
1022
|
}
|
|
993
1023
|
)
|
|
994
1024
|
] }),
|
|
@@ -997,9 +1027,9 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
997
1027
|
/* @__PURE__ */ e(
|
|
998
1028
|
"button",
|
|
999
1029
|
{
|
|
1000
|
-
onClick:
|
|
1030
|
+
onClick: V,
|
|
1001
1031
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
1002
|
-
children: /* @__PURE__ */ e(
|
|
1032
|
+
children: /* @__PURE__ */ e(Mr, {})
|
|
1003
1033
|
}
|
|
1004
1034
|
),
|
|
1005
1035
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
@@ -1012,25 +1042,25 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1012
1042
|
{
|
|
1013
1043
|
onClick: ne,
|
|
1014
1044
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
1015
|
-
children: /* @__PURE__ */ e(
|
|
1045
|
+
children: /* @__PURE__ */ e(Tr, {})
|
|
1016
1046
|
}
|
|
1017
1047
|
)
|
|
1018
1048
|
] }),
|
|
1019
1049
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((h) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: h }, h)) }),
|
|
1020
1050
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: de.map((h, z) => {
|
|
1021
|
-
const k = h.getMonth() === N.getMonth(),
|
|
1051
|
+
const k = h.getMonth() === N.getMonth(), $ = t && h.toDateString() === t.toDateString(), y = h.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), H = !k || u && h < u || d && h > d;
|
|
1022
1052
|
return /* @__PURE__ */ e(
|
|
1023
1053
|
"button",
|
|
1024
1054
|
{
|
|
1025
|
-
onClick: () => !
|
|
1026
|
-
disabled:
|
|
1055
|
+
onClick: () => !H && D(h),
|
|
1056
|
+
disabled: H,
|
|
1027
1057
|
className: i(
|
|
1028
1058
|
"w-8 h-8 text-sm rounded transition-colors duration-fast",
|
|
1029
1059
|
{
|
|
1030
|
-
"text-text hover:bg-surface-hover": k &&
|
|
1031
|
-
"bg-accent text-accent-fg":
|
|
1032
|
-
"bg-surface-hover text-text": y &&
|
|
1033
|
-
"text-text-muted cursor-not-allowed":
|
|
1060
|
+
"text-text hover:bg-surface-hover": k && !$ && !H,
|
|
1061
|
+
"bg-accent text-accent-fg": $,
|
|
1062
|
+
"bg-surface-hover text-text": y && !$,
|
|
1063
|
+
"text-text-muted cursor-not-allowed": H
|
|
1034
1064
|
}
|
|
1035
1065
|
),
|
|
1036
1066
|
children: h.getDate()
|
|
@@ -1055,7 +1085,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1055
1085
|
/* @__PURE__ */ e(
|
|
1056
1086
|
"button",
|
|
1057
1087
|
{
|
|
1058
|
-
onClick:
|
|
1088
|
+
onClick: Y,
|
|
1059
1089
|
className: "text-sm text-text-muted hover:text-text",
|
|
1060
1090
|
children: "Clear"
|
|
1061
1091
|
}
|
|
@@ -1071,7 +1101,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1071
1101
|
] })
|
|
1072
1102
|
] })
|
|
1073
1103
|
] });
|
|
1074
|
-
}),
|
|
1104
|
+
}), _r = {
|
|
1075
1105
|
sm: "h-control-sm px-3 text-sm",
|
|
1076
1106
|
md: "h-control-md px-3 text-sm",
|
|
1077
1107
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1098,51 +1128,51 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1098
1128
|
onCreateOption: C,
|
|
1099
1129
|
...S
|
|
1100
1130
|
}, I) => {
|
|
1101
|
-
const A = f || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!n, [W, D] =
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1131
|
+
const A = f || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!n, [W, D] = oe.useState(!1), [V, ne] = oe.useState(""), Y = oe.useRef(null), X = oe.useRef(null), de = Pe(W, X, { matchWidth: !0 }), [w, h] = oe.useState(o);
|
|
1132
|
+
oe.useImperativeHandle(I, () => Y.current), oe.useEffect(() => {
|
|
1133
|
+
const M = (E) => {
|
|
1134
|
+
Y.current && !Y.current.contains(E.target) && D(!1);
|
|
1105
1135
|
};
|
|
1106
|
-
return document.addEventListener("mousedown",
|
|
1136
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
1107
1137
|
}, []);
|
|
1108
|
-
const z =
|
|
1109
|
-
(
|
|
1138
|
+
const z = oe.useCallback(
|
|
1139
|
+
(M, E) => M.some(
|
|
1110
1140
|
(P) => Me(P.value) === Me(E) || Me(P.label) === Me(E)
|
|
1111
1141
|
),
|
|
1112
1142
|
[]
|
|
1113
|
-
), k =
|
|
1114
|
-
(
|
|
1115
|
-
const P = [...
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1143
|
+
), k = oe.useCallback(
|
|
1144
|
+
(M, E) => {
|
|
1145
|
+
const P = [...M], j = (q) => {
|
|
1146
|
+
const T = $e(q).trim();
|
|
1147
|
+
T && (z(P, T) || P.push({ value: T, label: T }));
|
|
1118
1148
|
};
|
|
1119
1149
|
return Array.isArray(E) ? E.forEach(j) : j(E), P;
|
|
1120
1150
|
},
|
|
1121
1151
|
[z]
|
|
1122
1152
|
);
|
|
1123
|
-
|
|
1124
|
-
h((
|
|
1153
|
+
oe.useEffect(() => {
|
|
1154
|
+
h((M) => {
|
|
1125
1155
|
const E = [...o];
|
|
1126
|
-
return
|
|
1156
|
+
return M.forEach((P) => {
|
|
1127
1157
|
!z(E, P.value) && !z(E, P.label) && E.push(P);
|
|
1128
1158
|
}), k(E, N);
|
|
1129
1159
|
});
|
|
1130
1160
|
}, [o, N, k, z]);
|
|
1131
|
-
const
|
|
1132
|
-
() => Array.isArray(N) ? N.map(
|
|
1161
|
+
const $ = oe.useMemo(
|
|
1162
|
+
() => Array.isArray(N) ? N.map($e) : N == null ? void 0 : $e(N),
|
|
1133
1163
|
[N]
|
|
1134
|
-
), y = (
|
|
1164
|
+
), y = (M) => {
|
|
1135
1165
|
if (g) {
|
|
1136
|
-
const E = Array.isArray(
|
|
1166
|
+
const E = Array.isArray($) ? $ : [], P = E.includes(M) ? E.filter((j) => j !== M) : [...E, M];
|
|
1137
1167
|
p?.(P);
|
|
1138
1168
|
} else
|
|
1139
|
-
p?.(
|
|
1140
|
-
},
|
|
1141
|
-
(
|
|
1142
|
-
) : [],
|
|
1143
|
-
(
|
|
1144
|
-
) : w, G = !!x && !!b && !!
|
|
1145
|
-
const E =
|
|
1169
|
+
p?.(M), D(!1), ne("");
|
|
1170
|
+
}, H = g ? null : w.find((M) => M.value === $), ae = g ? w.filter(
|
|
1171
|
+
(M) => Array.isArray($) && $.includes(M.value)
|
|
1172
|
+
) : [], ce = b && V ? w.filter(
|
|
1173
|
+
(M) => M.label.toLowerCase().includes(V.toLowerCase())
|
|
1174
|
+
) : w, G = !!x && !!b && !!V.trim() && !z(w, V), O = (M) => {
|
|
1175
|
+
const E = M.trim();
|
|
1146
1176
|
if (!E) return;
|
|
1147
1177
|
const P = C?.(E) ?? {
|
|
1148
1178
|
value: E,
|
|
@@ -1153,11 +1183,11 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1153
1183
|
return;
|
|
1154
1184
|
}
|
|
1155
1185
|
h((j) => [...j, P]), y(P.value), ne(""), g || D(!1);
|
|
1156
|
-
}, F = () => g ? ae.length > 0 ? ae.map((
|
|
1186
|
+
}, F = () => g ? ae.length > 0 ? ae.map((M) => M.label).join(", ") : u || "Select options" : H?.label || u || "Select an option";
|
|
1157
1187
|
return /* @__PURE__ */ c(
|
|
1158
1188
|
"div",
|
|
1159
1189
|
{
|
|
1160
|
-
ref:
|
|
1190
|
+
ref: Y,
|
|
1161
1191
|
className: i(
|
|
1162
1192
|
"relative flex flex-col",
|
|
1163
1193
|
a && "w-full",
|
|
@@ -1182,7 +1212,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1182
1212
|
/* @__PURE__ */ c(
|
|
1183
1213
|
"button",
|
|
1184
1214
|
{
|
|
1185
|
-
ref:
|
|
1215
|
+
ref: X,
|
|
1186
1216
|
type: "button",
|
|
1187
1217
|
id: A,
|
|
1188
1218
|
disabled: l,
|
|
@@ -1192,7 +1222,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1192
1222
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1193
1223
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1194
1224
|
"bg-surface",
|
|
1195
|
-
|
|
1225
|
+
_r[s],
|
|
1196
1226
|
K ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
1197
1227
|
m
|
|
1198
1228
|
),
|
|
@@ -1217,10 +1247,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1217
1247
|
{
|
|
1218
1248
|
type: "text",
|
|
1219
1249
|
placeholder: "Search...",
|
|
1220
|
-
value:
|
|
1221
|
-
onChange: (
|
|
1222
|
-
onKeyDown: (
|
|
1223
|
-
|
|
1250
|
+
value: V,
|
|
1251
|
+
onChange: (M) => ne(M.target.value),
|
|
1252
|
+
onKeyDown: (M) => {
|
|
1253
|
+
M.key === "Enter" && G && (M.preventDefault(), O(V));
|
|
1224
1254
|
},
|
|
1225
1255
|
className: i(
|
|
1226
1256
|
"w-full px-3 py-2 text-sm rounded-md border",
|
|
@@ -1235,10 +1265,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1235
1265
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1236
1266
|
"text-info-fg hover:bg-surface-hover"
|
|
1237
1267
|
),
|
|
1238
|
-
onClick: () => O(
|
|
1268
|
+
onClick: () => O(V),
|
|
1239
1269
|
children: [
|
|
1240
1270
|
"+: “",
|
|
1241
|
-
|
|
1271
|
+
V.trim(),
|
|
1242
1272
|
"”"
|
|
1243
1273
|
]
|
|
1244
1274
|
}
|
|
@@ -1254,16 +1284,16 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1254
1284
|
children: u
|
|
1255
1285
|
}
|
|
1256
1286
|
),
|
|
1257
|
-
|
|
1258
|
-
const E = g ? Array.isArray(
|
|
1287
|
+
ce.map((M) => {
|
|
1288
|
+
const E = g ? Array.isArray($) && $.includes(M.value) : $ === M.value;
|
|
1259
1289
|
return /* @__PURE__ */ e(
|
|
1260
1290
|
"li",
|
|
1261
1291
|
{
|
|
1262
|
-
onClick: () => !
|
|
1292
|
+
onClick: () => !M.disabled && y(M.value),
|
|
1263
1293
|
className: i(
|
|
1264
1294
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1265
1295
|
"text-text",
|
|
1266
|
-
|
|
1296
|
+
M.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1267
1297
|
E && "bg-accent-soft text-accent font-semibold"
|
|
1268
1298
|
),
|
|
1269
1299
|
children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
|
|
@@ -1276,10 +1306,10 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1276
1306
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1277
1307
|
}
|
|
1278
1308
|
),
|
|
1279
|
-
/* @__PURE__ */ e("span", { children:
|
|
1309
|
+
/* @__PURE__ */ e("span", { children: M.label })
|
|
1280
1310
|
] })
|
|
1281
1311
|
},
|
|
1282
|
-
|
|
1312
|
+
M.value
|
|
1283
1313
|
);
|
|
1284
1314
|
})
|
|
1285
1315
|
] })
|
|
@@ -1301,7 +1331,7 @@ const kr = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
|
|
|
1301
1331
|
}
|
|
1302
1332
|
);
|
|
1303
1333
|
Ae.displayName = "Select";
|
|
1304
|
-
const
|
|
1334
|
+
const $r = {
|
|
1305
1335
|
sm: "h-control-sm px-3 text-sm",
|
|
1306
1336
|
md: "h-control-md px-3 text-base",
|
|
1307
1337
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1322,7 +1352,7 @@ const zr = {
|
|
|
1322
1352
|
id: f,
|
|
1323
1353
|
...b
|
|
1324
1354
|
}, g) => {
|
|
1325
|
-
const N =
|
|
1355
|
+
const N = oe.useId(), p = f || `textfield-${N}`, x = !!n, C = n || r ? `${p}-description` : void 0;
|
|
1326
1356
|
return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", d), children: [
|
|
1327
1357
|
t && /* @__PURE__ */ e(
|
|
1328
1358
|
"label",
|
|
@@ -1347,7 +1377,7 @@ const zr = {
|
|
|
1347
1377
|
"aria-describedby": C,
|
|
1348
1378
|
className: i(
|
|
1349
1379
|
lt,
|
|
1350
|
-
|
|
1380
|
+
$r[s],
|
|
1351
1381
|
l && "pl-9",
|
|
1352
1382
|
(o || u) && "pr-9",
|
|
1353
1383
|
ot(x),
|
|
@@ -1376,7 +1406,7 @@ const zr = {
|
|
|
1376
1406
|
}
|
|
1377
1407
|
);
|
|
1378
1408
|
Ce.displayName = "TextField";
|
|
1379
|
-
function
|
|
1409
|
+
function Ar({
|
|
1380
1410
|
value: t,
|
|
1381
1411
|
onChange: r,
|
|
1382
1412
|
onListFolders: n,
|
|
@@ -1386,8 +1416,8 @@ function Mr({
|
|
|
1386
1416
|
templatePlaceholder: o,
|
|
1387
1417
|
showTemplate: u = !0
|
|
1388
1418
|
}) {
|
|
1389
|
-
const [d, v] =
|
|
1390
|
-
|
|
1419
|
+
const [d, v] = B([]);
|
|
1420
|
+
J(() => {
|
|
1391
1421
|
let f = !0;
|
|
1392
1422
|
return Promise.resolve(n?.()).then((b) => {
|
|
1393
1423
|
f && b && v(b.data ?? []);
|
|
@@ -1421,7 +1451,7 @@ function Mr({
|
|
|
1421
1451
|
)
|
|
1422
1452
|
] });
|
|
1423
1453
|
}
|
|
1424
|
-
const Ne = (...t) => t.filter(Boolean).join(" "),
|
|
1454
|
+
const Ne = (...t) => t.filter(Boolean).join(" "), Dr = (t) => /* @__PURE__ */ e(Ie, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Lr = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ir = {
|
|
1425
1455
|
sm: "h-control-sm px-3 text-sm",
|
|
1426
1456
|
md: "h-control-md px-3 text-base",
|
|
1427
1457
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1431,14 +1461,14 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1431
1461
|
md: "h-5 w-5",
|
|
1432
1462
|
lg: "h-6 w-6",
|
|
1433
1463
|
full: "h-6 w-6"
|
|
1434
|
-
},
|
|
1464
|
+
}, Pr = ve(
|
|
1435
1465
|
({
|
|
1436
1466
|
label: t,
|
|
1437
1467
|
helperText: r,
|
|
1438
1468
|
error: n,
|
|
1439
1469
|
size: s = "md",
|
|
1440
1470
|
fullWidth: a = !1,
|
|
1441
|
-
startIcon: l = /* @__PURE__ */ e(
|
|
1471
|
+
startIcon: l = /* @__PURE__ */ e(Dr, {}),
|
|
1442
1472
|
loading: o = !1,
|
|
1443
1473
|
containerClassName: u,
|
|
1444
1474
|
labelClassName: d,
|
|
@@ -1453,26 +1483,26 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1453
1483
|
onChange: C,
|
|
1454
1484
|
...S
|
|
1455
1485
|
}, I) => {
|
|
1456
|
-
const A = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!n, W = re(null), D = re(null), [
|
|
1457
|
-
|
|
1486
|
+
const A = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!n, W = re(null), D = re(null), [V, ne] = B(x || ""), [Y, X] = B(!1), [de, w] = B(!1), [h, z] = B(!1);
|
|
1487
|
+
J(() => {
|
|
1458
1488
|
x !== void 0 && ne(x);
|
|
1459
1489
|
}, [x]);
|
|
1460
1490
|
const k = pe(() => {
|
|
1461
|
-
if (p && !h || !
|
|
1462
|
-
const O = String(
|
|
1491
|
+
if (p && !h || !V) return f;
|
|
1492
|
+
const O = String(V).toLowerCase();
|
|
1463
1493
|
return f.filter(
|
|
1464
1494
|
(F) => String(F.label).toLowerCase().includes(O)
|
|
1465
1495
|
);
|
|
1466
|
-
}, [
|
|
1467
|
-
|
|
1468
|
-
if (!b || !
|
|
1496
|
+
}, [V, f, p, h]);
|
|
1497
|
+
J(() => {
|
|
1498
|
+
if (!b || !V) {
|
|
1469
1499
|
w(!1);
|
|
1470
1500
|
return;
|
|
1471
1501
|
}
|
|
1472
1502
|
const O = setTimeout(async () => {
|
|
1473
1503
|
w(!0);
|
|
1474
1504
|
try {
|
|
1475
|
-
await b(String(
|
|
1505
|
+
await b(String(V));
|
|
1476
1506
|
} catch (F) {
|
|
1477
1507
|
console.error("Remote search failed:", F);
|
|
1478
1508
|
} finally {
|
|
@@ -1482,20 +1512,20 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1482
1512
|
return () => {
|
|
1483
1513
|
clearTimeout(O), w(!1);
|
|
1484
1514
|
};
|
|
1485
|
-
}, [
|
|
1515
|
+
}, [V, N, b]), J(() => {
|
|
1486
1516
|
const O = (F) => {
|
|
1487
|
-
W.current && !W.current.contains(F.target) &&
|
|
1517
|
+
W.current && !W.current.contains(F.target) && X(!1);
|
|
1488
1518
|
};
|
|
1489
1519
|
return document.addEventListener("mousedown", O), () => document.removeEventListener("mousedown", O);
|
|
1490
1520
|
}, []);
|
|
1491
|
-
const
|
|
1521
|
+
const $ = (O) => {
|
|
1492
1522
|
const F = O.target.value;
|
|
1493
|
-
ne(F),
|
|
1523
|
+
ne(F), X(!0), z(!0), C && C(O);
|
|
1494
1524
|
}, y = (O) => {
|
|
1495
|
-
ne(O.label),
|
|
1496
|
-
},
|
|
1497
|
-
(f.length > 0 || b) && (
|
|
1498
|
-
}, ae = o || de,
|
|
1525
|
+
ne(O.label), X(!1), z(!1), g && g(O.value);
|
|
1526
|
+
}, H = () => {
|
|
1527
|
+
(f.length > 0 || b) && (X(!0), z(!1));
|
|
1528
|
+
}, ae = o || de, ce = Y && (k.length > 0 || ae), G = pe(() => I || D, [I]);
|
|
1499
1529
|
return /* @__PURE__ */ c(
|
|
1500
1530
|
"div",
|
|
1501
1531
|
{
|
|
@@ -1526,16 +1556,16 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1526
1556
|
{
|
|
1527
1557
|
ref: G,
|
|
1528
1558
|
id: A,
|
|
1529
|
-
value:
|
|
1530
|
-
onChange:
|
|
1531
|
-
onFocus:
|
|
1559
|
+
value: V,
|
|
1560
|
+
onChange: $,
|
|
1561
|
+
onFocus: H,
|
|
1532
1562
|
className: Ne(
|
|
1533
1563
|
// Base styles
|
|
1534
1564
|
"block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
|
|
1535
1565
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1536
1566
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1537
1567
|
// Size styles
|
|
1538
|
-
|
|
1568
|
+
Ir[s],
|
|
1539
1569
|
// Icon padding
|
|
1540
1570
|
l ? "pl-10" : "",
|
|
1541
1571
|
"pr-10",
|
|
@@ -1550,7 +1580,7 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1550
1580
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: ae || o ? (
|
|
1551
1581
|
// Loading Spinner
|
|
1552
1582
|
/* @__PURE__ */ e(
|
|
1553
|
-
|
|
1583
|
+
_t,
|
|
1554
1584
|
{
|
|
1555
1585
|
className: Ne("animate-spin text-info-fg", Fe[s]),
|
|
1556
1586
|
"aria-hidden": !0
|
|
@@ -1559,21 +1589,21 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1559
1589
|
) : (
|
|
1560
1590
|
// Dropdown Chevron
|
|
1561
1591
|
/* @__PURE__ */ e(
|
|
1562
|
-
|
|
1592
|
+
Lr,
|
|
1563
1593
|
{
|
|
1564
1594
|
className: Ne(
|
|
1565
1595
|
"text-text-muted cursor-pointer transition-transform",
|
|
1566
1596
|
Fe[s],
|
|
1567
|
-
|
|
1597
|
+
Y ? "rotate-180" : "rotate-0"
|
|
1568
1598
|
),
|
|
1569
1599
|
onClick: () => {
|
|
1570
|
-
|
|
1600
|
+
X((O) => (O || z(!1), !O));
|
|
1571
1601
|
}
|
|
1572
1602
|
}
|
|
1573
1603
|
)
|
|
1574
1604
|
) })
|
|
1575
1605
|
] }),
|
|
1576
|
-
|
|
1606
|
+
ce && /* @__PURE__ */ e(
|
|
1577
1607
|
"ul",
|
|
1578
1608
|
{
|
|
1579
1609
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
@@ -1584,7 +1614,7 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1584
1614
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1585
1615
|
onClick: () => y(O),
|
|
1586
1616
|
role: "option",
|
|
1587
|
-
"aria-selected":
|
|
1617
|
+
"aria-selected": V === O.label,
|
|
1588
1618
|
children: O.label
|
|
1589
1619
|
},
|
|
1590
1620
|
O.value
|
|
@@ -1603,14 +1633,14 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Tr = (t) => /* @__PURE__ */ e(
|
|
|
1603
1633
|
),
|
|
1604
1634
|
b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
|
|
1605
1635
|
"Huidige zoekterm (niet-gedebounced): ",
|
|
1606
|
-
String(
|
|
1636
|
+
String(V)
|
|
1607
1637
|
] })
|
|
1608
1638
|
]
|
|
1609
1639
|
}
|
|
1610
1640
|
);
|
|
1611
1641
|
}
|
|
1612
1642
|
);
|
|
1613
|
-
|
|
1643
|
+
Pr.displayName = "SearchableTextField";
|
|
1614
1644
|
const ct = ve(
|
|
1615
1645
|
({
|
|
1616
1646
|
value: t,
|
|
@@ -1636,7 +1666,7 @@ const ct = ve(
|
|
|
1636
1666
|
l
|
|
1637
1667
|
),
|
|
1638
1668
|
children: [
|
|
1639
|
-
/* @__PURE__ */ e(
|
|
1669
|
+
/* @__PURE__ */ e(Q, { icon: Ie, size: "md", color: "current", className: "shrink-0" }),
|
|
1640
1670
|
/* @__PURE__ */ e(
|
|
1641
1671
|
"input",
|
|
1642
1672
|
{
|
|
@@ -1668,7 +1698,7 @@ const ct = ve(
|
|
|
1668
1698
|
"aria-label": a,
|
|
1669
1699
|
onClick: () => r(""),
|
|
1670
1700
|
className: "grid size-4 shrink-0 cursor-pointer place-items-center rounded-xs text-text-subtle transition-colors duration-fast ease-out hover:text-text focus-visible:outline-none focus-visible:focus-ring",
|
|
1671
|
-
children: /* @__PURE__ */ e(
|
|
1701
|
+
children: /* @__PURE__ */ e(Q, { icon: Se, size: "sm", color: "current" })
|
|
1672
1702
|
}
|
|
1673
1703
|
) : n && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: n })
|
|
1674
1704
|
]
|
|
@@ -1676,7 +1706,7 @@ const ct = ve(
|
|
|
1676
1706
|
)
|
|
1677
1707
|
);
|
|
1678
1708
|
ct.displayName = "SearchField";
|
|
1679
|
-
const
|
|
1709
|
+
const Or = ve(
|
|
1680
1710
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
1681
1711
|
const u = /* @__PURE__ */ e(
|
|
1682
1712
|
"span",
|
|
@@ -1729,8 +1759,8 @@ const Dr = ve(
|
|
|
1729
1759
|
);
|
|
1730
1760
|
}
|
|
1731
1761
|
);
|
|
1732
|
-
|
|
1733
|
-
const
|
|
1762
|
+
Or.displayName = "Switch";
|
|
1763
|
+
const jr = ({
|
|
1734
1764
|
trigger: t,
|
|
1735
1765
|
options: r,
|
|
1736
1766
|
value: n,
|
|
@@ -1741,10 +1771,10 @@ const Lr = ({
|
|
|
1741
1771
|
showCheck: u = !0,
|
|
1742
1772
|
header: d
|
|
1743
1773
|
}) => {
|
|
1744
|
-
const [v, m] =
|
|
1774
|
+
const [v, m] = B(!1), [f, b] = B(null), [g, N] = B({ top: 0, left: 0 }), p = re(null), x = re(null), C = re(null), S = re(null), I = Pe(v, x, { placement: a }), A = re(null), K = () => Array.from(
|
|
1745
1775
|
S.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1746
1776
|
);
|
|
1747
|
-
|
|
1777
|
+
J(() => {
|
|
1748
1778
|
v && K()[0]?.focus();
|
|
1749
1779
|
}, [v]);
|
|
1750
1780
|
const W = (h) => {
|
|
@@ -1752,24 +1782,24 @@ const Lr = ({
|
|
|
1752
1782
|
const k = K();
|
|
1753
1783
|
if (k.length === 0) return;
|
|
1754
1784
|
h.preventDefault();
|
|
1755
|
-
const
|
|
1785
|
+
const $ = k.indexOf(document.activeElement), y = h.key === "Home" ? 0 : h.key === "End" ? k.length - 1 : h.key === "ArrowDown" ? ($ + 1) % k.length : ($ - 1 + k.length) % k.length;
|
|
1756
1786
|
k[y]?.focus();
|
|
1757
1787
|
};
|
|
1758
|
-
|
|
1788
|
+
J(() => {
|
|
1759
1789
|
const h = (z) => {
|
|
1760
1790
|
p.current && (!p.current.contains(z.target) || C.current && !C.current.contains(z.target)) && (m(!1), b(null), A.current && (clearTimeout(A.current), A.current = null));
|
|
1761
1791
|
};
|
|
1762
1792
|
return v && document.addEventListener("mousedown", h), () => {
|
|
1763
1793
|
document.removeEventListener("mousedown", h);
|
|
1764
1794
|
};
|
|
1765
|
-
}, [v]),
|
|
1795
|
+
}, [v]), J(() => {
|
|
1766
1796
|
const h = (z) => {
|
|
1767
1797
|
z.key === "Escape" && (m(!1), b(null), x.current?.focus(), A.current && (clearTimeout(A.current), A.current = null));
|
|
1768
1798
|
};
|
|
1769
1799
|
return v && document.addEventListener("keydown", h), () => {
|
|
1770
1800
|
document.removeEventListener("keydown", h);
|
|
1771
1801
|
};
|
|
1772
|
-
}, [v]),
|
|
1802
|
+
}, [v]), J(() => {
|
|
1773
1803
|
if (f && p.current) {
|
|
1774
1804
|
const h = p.current.querySelector(
|
|
1775
1805
|
`[data-option-value="${f}"]`
|
|
@@ -1782,20 +1812,20 @@ const Lr = ({
|
|
|
1782
1812
|
});
|
|
1783
1813
|
}
|
|
1784
1814
|
}
|
|
1785
|
-
}, [f]),
|
|
1815
|
+
}, [f]), J(() => () => {
|
|
1786
1816
|
A.current && clearTimeout(A.current);
|
|
1787
1817
|
}, []);
|
|
1788
1818
|
const D = (h) => {
|
|
1789
1819
|
h.stopPropagation(), !l && (m(!v), b(null), A.current && (clearTimeout(A.current), A.current = null));
|
|
1790
|
-
},
|
|
1820
|
+
}, V = (h, z, k) => {
|
|
1791
1821
|
h.stopPropagation(), !z.disabled && !z.divider && (!z.children || z.children.length === 0) && (s?.(z.value, k), m(!1), b(null));
|
|
1792
1822
|
}, ne = (h) => {
|
|
1793
1823
|
A.current && (clearTimeout(A.current), A.current = null), h.children && h.children.length > 0 ? b(h.value) : b(null);
|
|
1794
|
-
},
|
|
1824
|
+
}, Y = (h) => {
|
|
1795
1825
|
h.children && h.children.length > 0 ? A.current = setTimeout(() => {
|
|
1796
1826
|
b(null);
|
|
1797
1827
|
}, 150) : b(null);
|
|
1798
|
-
},
|
|
1828
|
+
}, X = (h, z, k) => {
|
|
1799
1829
|
h.stopPropagation(), !z.disabled && !z.divider && (s?.(z.value, k), m(!1), b(null));
|
|
1800
1830
|
}, de = i(
|
|
1801
1831
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
@@ -1838,7 +1868,7 @@ const Lr = ({
|
|
|
1838
1868
|
},
|
|
1839
1869
|
`divider-${z}`
|
|
1840
1870
|
);
|
|
1841
|
-
const k = h.children && h.children.length > 0,
|
|
1871
|
+
const k = h.children && h.children.length > 0, $ = f === h.value;
|
|
1842
1872
|
return /* @__PURE__ */ c("div", { className: "relative group", children: [
|
|
1843
1873
|
/* @__PURE__ */ c(
|
|
1844
1874
|
"button",
|
|
@@ -1846,15 +1876,15 @@ const Lr = ({
|
|
|
1846
1876
|
"data-option-value": h.value,
|
|
1847
1877
|
role: "menuitem",
|
|
1848
1878
|
"aria-haspopup": k ? "menu" : void 0,
|
|
1849
|
-
onClick: (y) =>
|
|
1879
|
+
onClick: (y) => V(y, h),
|
|
1850
1880
|
onMouseEnter: () => ne(h),
|
|
1851
|
-
onMouseLeave: () =>
|
|
1881
|
+
onMouseLeave: () => Y(h),
|
|
1852
1882
|
disabled: h.disabled,
|
|
1853
1883
|
className: i(
|
|
1854
1884
|
"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",
|
|
1855
1885
|
{
|
|
1856
1886
|
"opacity-50 cursor-not-allowed": h.disabled,
|
|
1857
|
-
"bg-surface-hover":
|
|
1887
|
+
"bg-surface-hover": $ && k
|
|
1858
1888
|
}
|
|
1859
1889
|
),
|
|
1860
1890
|
children: [
|
|
@@ -1872,7 +1902,7 @@ const Lr = ({
|
|
|
1872
1902
|
]
|
|
1873
1903
|
}
|
|
1874
1904
|
),
|
|
1875
|
-
k &&
|
|
1905
|
+
k && $ && /* @__PURE__ */ e(
|
|
1876
1906
|
"div",
|
|
1877
1907
|
{
|
|
1878
1908
|
ref: C,
|
|
@@ -1889,14 +1919,14 @@ const Lr = ({
|
|
|
1889
1919
|
b(null);
|
|
1890
1920
|
}, 150);
|
|
1891
1921
|
},
|
|
1892
|
-
children: /* @__PURE__ */ e("div", { className: "p-2", children: h.children.map((y,
|
|
1922
|
+
children: /* @__PURE__ */ e("div", { className: "p-2", children: h.children.map((y, H) => {
|
|
1893
1923
|
if (y.divider)
|
|
1894
1924
|
return /* @__PURE__ */ e(
|
|
1895
1925
|
"div",
|
|
1896
1926
|
{
|
|
1897
1927
|
className: "border-t border-border my-2"
|
|
1898
1928
|
},
|
|
1899
|
-
`divider-${
|
|
1929
|
+
`divider-${H}`
|
|
1900
1930
|
);
|
|
1901
1931
|
const ae = typeof n == "object" && n[h.value] && n[h.value].includes(
|
|
1902
1932
|
y.value
|
|
@@ -1904,8 +1934,8 @@ const Lr = ({
|
|
|
1904
1934
|
return /* @__PURE__ */ c(
|
|
1905
1935
|
"button",
|
|
1906
1936
|
{
|
|
1907
|
-
onClick: (
|
|
1908
|
-
|
|
1937
|
+
onClick: (ce) => X(
|
|
1938
|
+
ce,
|
|
1909
1939
|
y,
|
|
1910
1940
|
h.value
|
|
1911
1941
|
),
|
|
@@ -1937,8 +1967,8 @@ const Lr = ({
|
|
|
1937
1967
|
(() => {
|
|
1938
1968
|
const h = r.reduce((z, k) => {
|
|
1939
1969
|
if (k.divider) return z;
|
|
1940
|
-
const
|
|
1941
|
-
return z + 1 +
|
|
1970
|
+
const $ = k.children ? k.children.filter((y) => !y.divider).length : 0;
|
|
1971
|
+
return z + 1 + $;
|
|
1942
1972
|
}, 0);
|
|
1943
1973
|
return h > 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: [
|
|
1944
1974
|
h,
|
|
@@ -1954,7 +1984,7 @@ const Lr = ({
|
|
|
1954
1984
|
defaultVariant: r = "secondary",
|
|
1955
1985
|
className: n
|
|
1956
1986
|
}) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: i("flex flex-wrap items-center gap-2", n), children: t.map(
|
|
1957
|
-
(s) => s.render ? /* @__PURE__ */ e(
|
|
1987
|
+
(s) => s.render ? /* @__PURE__ */ e(oe.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
1958
1988
|
st,
|
|
1959
1989
|
{
|
|
1960
1990
|
label: s.label,
|
|
@@ -1978,49 +2008,49 @@ const Lr = ({
|
|
|
1978
2008
|
},
|
|
1979
2009
|
s.id
|
|
1980
2010
|
)
|
|
1981
|
-
) }),
|
|
2011
|
+
) }), Fr = {
|
|
1982
2012
|
none: "p-0",
|
|
1983
2013
|
sm: "p-2",
|
|
1984
2014
|
md: "px-5 py-4",
|
|
1985
2015
|
lg: "p-6"
|
|
1986
|
-
},
|
|
2016
|
+
}, us = ({
|
|
1987
2017
|
actions: t = [],
|
|
1988
2018
|
onBack: r,
|
|
1989
2019
|
backLabel: n = "Back",
|
|
1990
2020
|
className: s,
|
|
1991
2021
|
padding: a = "md",
|
|
1992
2022
|
children: l
|
|
1993
|
-
}) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2",
|
|
2023
|
+
}) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2", Fr[a], s), children: [
|
|
1994
2024
|
r && /* @__PURE__ */ e(
|
|
1995
2025
|
se,
|
|
1996
2026
|
{
|
|
1997
2027
|
variant: "secondary",
|
|
1998
2028
|
onClick: r,
|
|
1999
2029
|
"aria-label": n,
|
|
2000
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2030
|
+
leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "sm" }),
|
|
2001
2031
|
iconOnly: !0
|
|
2002
2032
|
}
|
|
2003
2033
|
),
|
|
2004
2034
|
l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
|
|
2005
2035
|
/* @__PURE__ */ e(ke, { actions: t, className: i(!l && "ml-auto") })
|
|
2006
|
-
] }),
|
|
2036
|
+
] }), ms = (t) => (r) => t(r instanceof Date ? r : null), fs = (t) => (r) => t(typeof r == "string" ? r : ""), hs = (t) => (r) => t(Array.isArray(r) ? r : typeof r == "string" && r ? [r] : []), Rr = {
|
|
2007
2037
|
none: "px-0",
|
|
2008
2038
|
sm: "px-2",
|
|
2009
2039
|
md: "px-3.5",
|
|
2010
2040
|
lg: "px-5"
|
|
2011
|
-
},
|
|
2041
|
+
}, Br = {
|
|
2012
2042
|
sm: "h-row-lg",
|
|
2013
2043
|
md: "h-row-xl",
|
|
2014
2044
|
lg: "h-14"
|
|
2015
|
-
},
|
|
2016
|
-
function
|
|
2045
|
+
}, Hr = 8, Je = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
|
|
2046
|
+
function qr(t, r) {
|
|
2017
2047
|
if (r <= 7) return Array.from({ length: r }, (l, o) => o);
|
|
2018
2048
|
const s = [.../* @__PURE__ */ new Set([0, r - 1, t - 1, t, t + 1])].filter((l) => l >= 0 && l < r).sort((l, o) => l - o), a = [];
|
|
2019
2049
|
return s.forEach((l, o) => {
|
|
2020
2050
|
o > 0 && l - s[o - 1] > 1 && a.push("gap"), a.push(l);
|
|
2021
2051
|
}), a;
|
|
2022
2052
|
}
|
|
2023
|
-
const
|
|
2053
|
+
const Vr = (t) => {
|
|
2024
2054
|
const r = Array.isArray(t.value) ? t.value : t.value != null && t.value !== "" && t.value !== "all" ? [t.value] : [];
|
|
2025
2055
|
if (t.type === "date") {
|
|
2026
2056
|
const o = t.value instanceof Date;
|
|
@@ -2042,7 +2072,7 @@ const Rr = (t) => {
|
|
|
2042
2072
|
);
|
|
2043
2073
|
}, l = r.length > 0;
|
|
2044
2074
|
return /* @__PURE__ */ e(
|
|
2045
|
-
|
|
2075
|
+
cr,
|
|
2046
2076
|
{
|
|
2047
2077
|
tone: "outline",
|
|
2048
2078
|
caret: !0,
|
|
@@ -2097,99 +2127,92 @@ const Rr = (t) => {
|
|
|
2097
2127
|
footerSummary: K,
|
|
2098
2128
|
size: W = "md",
|
|
2099
2129
|
hoverable: D = !0,
|
|
2100
|
-
padding:
|
|
2130
|
+
padding: V = "md",
|
|
2101
2131
|
className: ne,
|
|
2102
|
-
rowClassName:
|
|
2103
|
-
headerBackground:
|
|
2132
|
+
rowClassName: Y,
|
|
2133
|
+
headerBackground: X = !0
|
|
2104
2134
|
}) => {
|
|
2105
|
-
const [de, w] =
|
|
2135
|
+
const [de, w] = B(""), h = l !== void 0, z = h ? l : de, k = o ?? w, [$, y] = B({
|
|
2106
2136
|
column: null,
|
|
2107
2137
|
direction: null
|
|
2108
|
-
}), [
|
|
2138
|
+
}), [H, ae] = B({
|
|
2109
2139
|
page: 0,
|
|
2110
2140
|
pageSize: g
|
|
2111
|
-
}),
|
|
2112
|
-
let
|
|
2141
|
+
}), ce = re(null), G = pe(() => {
|
|
2142
|
+
let _ = t;
|
|
2113
2143
|
if (s && !h && z.trim()) {
|
|
2114
|
-
const
|
|
2115
|
-
(
|
|
2116
|
-
),
|
|
2117
|
-
|
|
2118
|
-
const R = typeof
|
|
2119
|
-
return String(R || "").toLowerCase().includes(
|
|
2144
|
+
const U = r.filter(
|
|
2145
|
+
(ie) => ie.searchable !== !1
|
|
2146
|
+
), te = z.toLowerCase();
|
|
2147
|
+
_ = _.filter((ie) => U.some((Z) => {
|
|
2148
|
+
const R = typeof Z.accessor == "function" ? Z.accessor(ie) : ie[Z.accessor];
|
|
2149
|
+
return String(R || "").toLowerCase().includes(te);
|
|
2120
2150
|
}));
|
|
2121
2151
|
}
|
|
2122
|
-
return
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
}));
|
|
2129
|
-
}), M;
|
|
2130
|
-
}, [t, z, h, r, s, u]), O = pe(() => {
|
|
2131
|
-
if (!_.column || !_.direction) return G;
|
|
2132
|
-
const M = r.find((B) => B.id === _.column);
|
|
2133
|
-
return M ? [...G].sort((B, J) => {
|
|
2134
|
-
const le = typeof M.accessor == "function" ? M.accessor(B) : B[M.accessor], Y = typeof M.accessor == "function" ? M.accessor(J) : J[M.accessor];
|
|
2152
|
+
return _;
|
|
2153
|
+
}, [t, z, h, r, s]), O = pe(() => {
|
|
2154
|
+
if (!$.column || !$.direction) return G;
|
|
2155
|
+
const _ = r.find((U) => U.id === $.column);
|
|
2156
|
+
return _ ? [...G].sort((U, te) => {
|
|
2157
|
+
const ie = typeof _.accessor == "function" ? _.accessor(U) : U[_.accessor], Z = typeof _.accessor == "function" ? _.accessor(te) : te[_.accessor];
|
|
2135
2158
|
let R = 0;
|
|
2136
|
-
return
|
|
2159
|
+
return ie < Z ? R = -1 : ie > Z && (R = 1), $.direction === "desc" ? -R : R;
|
|
2137
2160
|
}) : G;
|
|
2138
|
-
}, [G,
|
|
2161
|
+
}, [G, $, r]), F = pe(() => {
|
|
2139
2162
|
if (!b || m) return O;
|
|
2140
|
-
const
|
|
2141
|
-
return O.slice(
|
|
2142
|
-
}, [O,
|
|
2143
|
-
(
|
|
2144
|
-
r.find((
|
|
2163
|
+
const _ = H.page * H.pageSize, U = _ + H.pageSize;
|
|
2164
|
+
return O.slice(_, U);
|
|
2165
|
+
}, [O, H, b, m]), M = xe(
|
|
2166
|
+
(_) => {
|
|
2167
|
+
r.find((te) => te.id === _)?.sortable && y((te) => te.column !== _ ? { column: _, direction: "asc" } : te.direction === "asc" ? { column: _, direction: "desc" } : { column: null, direction: null });
|
|
2145
2168
|
},
|
|
2146
2169
|
[r]
|
|
2147
|
-
), E = xe((
|
|
2148
|
-
ae((
|
|
2170
|
+
), E = xe((_) => {
|
|
2171
|
+
ae((U) => ({ ...U, page: _ }));
|
|
2149
2172
|
}, []), P = xe(
|
|
2150
|
-
(
|
|
2173
|
+
(_, U) => {
|
|
2151
2174
|
if (!S) return;
|
|
2152
|
-
const
|
|
2153
|
-
S(
|
|
2154
|
-
(
|
|
2175
|
+
const te = I(_, 0);
|
|
2176
|
+
S(U ? [...C, _] : C.filter(
|
|
2177
|
+
(ie, Z) => I(C[Z], Z) !== te
|
|
2155
2178
|
));
|
|
2156
2179
|
},
|
|
2157
2180
|
[C, S, I]
|
|
2158
2181
|
), j = xe(
|
|
2159
|
-
(
|
|
2160
|
-
S && S(
|
|
2182
|
+
(_) => {
|
|
2183
|
+
S && S(_ ? [...F] : []);
|
|
2161
2184
|
},
|
|
2162
2185
|
[F, S]
|
|
2163
2186
|
);
|
|
2164
|
-
|
|
2165
|
-
ae((
|
|
2166
|
-
}, [z,
|
|
2167
|
-
ae((
|
|
2168
|
-
}, [u.map((
|
|
2169
|
-
const q = O.length,
|
|
2170
|
-
const
|
|
2187
|
+
J(() => {
|
|
2188
|
+
ae((_) => ({ ..._, page: 0 }));
|
|
2189
|
+
}, [z, $]), J(() => {
|
|
2190
|
+
ae((_) => ({ ..._, page: 0 }));
|
|
2191
|
+
}, [u.map((_) => _.value).join(",")]);
|
|
2192
|
+
const q = O.length, T = Math.ceil(q / H.pageSize), L = H.page * H.pageSize + 1, ee = Math.min(L + H.pageSize - 1, q), le = F.length > 0 && F.every((_) => {
|
|
2193
|
+
const U = I(_, 0);
|
|
2171
2194
|
return C.some(
|
|
2172
|
-
(
|
|
2195
|
+
(te, ie) => I(te, ie) === U
|
|
2173
2196
|
);
|
|
2174
|
-
}), be = F.some((
|
|
2175
|
-
const
|
|
2197
|
+
}), be = F.some((_) => {
|
|
2198
|
+
const U = I(_, 0);
|
|
2176
2199
|
return C.some(
|
|
2177
|
-
(
|
|
2200
|
+
(te, ie) => I(te, ie) === U
|
|
2178
2201
|
);
|
|
2179
|
-
}), ye =
|
|
2180
|
-
const
|
|
2181
|
-
if (!m) return [{ group: null, rows:
|
|
2182
|
-
const
|
|
2183
|
-
for (const
|
|
2184
|
-
const R = m(
|
|
2185
|
-
ge ? ge.push(
|
|
2202
|
+
}), ye = Rr[V], fe = X ? "bg-surface-sunk" : "bg-surface", he = i("text-text", ye), Oe = s || u.length > 0 || d.length > 0 || !!v, ft = pe(() => {
|
|
2203
|
+
const _ = F.map((Z, R) => ({ row: Z, index: R }));
|
|
2204
|
+
if (!m) return [{ group: null, rows: _ }];
|
|
2205
|
+
const U = /* @__PURE__ */ new Map();
|
|
2206
|
+
for (const Z of _) {
|
|
2207
|
+
const R = m(Z.row, Z.index), ge = U.get(R);
|
|
2208
|
+
ge ? ge.push(Z) : U.set(R, [Z]);
|
|
2186
2209
|
}
|
|
2187
|
-
const
|
|
2210
|
+
const te = f ?? [];
|
|
2188
2211
|
return [
|
|
2189
|
-
...
|
|
2190
|
-
...[...
|
|
2191
|
-
].map((
|
|
2192
|
-
}, [F, m, f]), ht = r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0),
|
|
2212
|
+
...te.filter((Z) => U.has(Z.id)),
|
|
2213
|
+
...[...U.keys()].filter((Z) => !te.some((R) => R.id === Z)).map((Z) => ({ id: Z }))
|
|
2214
|
+
].map((Z) => ({ group: Z, rows: U.get(Z.id) ?? [] }));
|
|
2215
|
+
}, [F, m, f]), ht = r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0), Ve = b && q > 0, xt = Ve || K !== void 0;
|
|
2193
2216
|
return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", ne), children: [
|
|
2194
2217
|
Oe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
|
|
2195
2218
|
s && /* @__PURE__ */ e(
|
|
@@ -2201,23 +2224,23 @@ const Rr = (t) => {
|
|
|
2201
2224
|
containerClassName: "w-full sm:w-66"
|
|
2202
2225
|
}
|
|
2203
2226
|
),
|
|
2204
|
-
u.map((
|
|
2227
|
+
u.map((_) => /* @__PURE__ */ e(Vr, { ..._ }, _.id)),
|
|
2205
2228
|
v,
|
|
2206
2229
|
d.length > 0 && /* @__PURE__ */ e(ke, { actions: d, className: "ml-auto" })
|
|
2207
2230
|
] }),
|
|
2208
|
-
/* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref:
|
|
2231
|
+
/* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: ce, className: "min-w-full border-collapse text-base text-text", children: [
|
|
2209
2232
|
/* @__PURE__ */ e("thead", { className: i(fe, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
|
|
2210
2233
|
x && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e(
|
|
2211
2234
|
we,
|
|
2212
2235
|
{
|
|
2213
2236
|
size: "sm",
|
|
2214
|
-
checked:
|
|
2215
|
-
indeterminate: be && !
|
|
2216
|
-
onChange: (
|
|
2237
|
+
checked: le,
|
|
2238
|
+
indeterminate: be && !le,
|
|
2239
|
+
onChange: (_) => j(_.target.checked),
|
|
2217
2240
|
"aria-label": "Select all rows"
|
|
2218
2241
|
}
|
|
2219
2242
|
) }),
|
|
2220
|
-
r.map((
|
|
2243
|
+
r.map((_) => /* @__PURE__ */ e(
|
|
2221
2244
|
"th",
|
|
2222
2245
|
{
|
|
2223
2246
|
className: i(
|
|
@@ -2225,46 +2248,46 @@ const Rr = (t) => {
|
|
|
2225
2248
|
"text-xs font-semibold uppercase tracking-label text-text-muted",
|
|
2226
2249
|
"group",
|
|
2227
2250
|
{
|
|
2228
|
-
"text-left":
|
|
2229
|
-
"text-center":
|
|
2230
|
-
"text-right":
|
|
2231
|
-
"cursor-pointer select-none":
|
|
2232
|
-
[`sticky left-0 ${fe}`]:
|
|
2233
|
-
[`sticky right-0 ${fe}`]:
|
|
2251
|
+
"text-left": _.align === "left" || !_.align,
|
|
2252
|
+
"text-center": _.align === "center",
|
|
2253
|
+
"text-right": _.align === "right",
|
|
2254
|
+
"cursor-pointer select-none": _.sortable,
|
|
2255
|
+
[`sticky left-0 ${fe}`]: _.sticky === "left",
|
|
2256
|
+
[`sticky right-0 ${fe}`]: _.sticky === "right"
|
|
2234
2257
|
}
|
|
2235
2258
|
),
|
|
2236
|
-
style: { width:
|
|
2237
|
-
onClick: () =>
|
|
2259
|
+
style: { width: _.width },
|
|
2260
|
+
onClick: () => _.sortable && M(_.id),
|
|
2238
2261
|
children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2262
|
+
_.headerCell ? _.headerCell() : _.header,
|
|
2263
|
+
_.sortable && /* @__PURE__ */ e(
|
|
2264
|
+
Q,
|
|
2242
2265
|
{
|
|
2243
|
-
icon:
|
|
2266
|
+
icon: $.column === _.id && $.direction === "desc" ? De : $t,
|
|
2244
2267
|
size: "xs",
|
|
2245
2268
|
className: i(
|
|
2246
2269
|
"transition-opacity duration-fast ease-out",
|
|
2247
|
-
|
|
2270
|
+
$.column === _.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
|
|
2248
2271
|
)
|
|
2249
2272
|
}
|
|
2250
2273
|
)
|
|
2251
2274
|
] })
|
|
2252
2275
|
},
|
|
2253
|
-
|
|
2276
|
+
_.id
|
|
2254
2277
|
)),
|
|
2255
2278
|
N.length > 0 && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
2256
2279
|
] }) }),
|
|
2257
|
-
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length:
|
|
2280
|
+
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Hr }).map((_, U) => /* @__PURE__ */ c("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
|
|
2258
2281
|
x && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
|
|
2259
|
-
r.map((
|
|
2282
|
+
r.map((te, ie) => /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), style: { width: te.width }, children: /* @__PURE__ */ e(
|
|
2260
2283
|
"span",
|
|
2261
2284
|
{
|
|
2262
2285
|
className: "block h-3 rounded-xs bg-surface-hover",
|
|
2263
|
-
style: { width: Je[(
|
|
2286
|
+
style: { width: Je[(U + ie) % Je.length] }
|
|
2264
2287
|
}
|
|
2265
|
-
) },
|
|
2288
|
+
) }, te.id)),
|
|
2266
2289
|
N.length > 0 && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg") })
|
|
2267
|
-
] }, `skeleton-${
|
|
2290
|
+
] }, `skeleton-${U}`)) : F.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
2268
2291
|
"td",
|
|
2269
2292
|
{
|
|
2270
2293
|
colSpan: r.length + (x ? 1 : 0) + (N.length > 0 ? 1 : 0),
|
|
@@ -2274,8 +2297,8 @@ const Rr = (t) => {
|
|
|
2274
2297
|
),
|
|
2275
2298
|
children: A || "No data available"
|
|
2276
2299
|
}
|
|
2277
|
-
) }) : ft.flatMap((
|
|
2278
|
-
...
|
|
2300
|
+
) }) : ft.flatMap((_) => [
|
|
2301
|
+
..._.group ? [
|
|
2279
2302
|
/* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
2280
2303
|
"td",
|
|
2281
2304
|
{
|
|
@@ -2284,50 +2307,50 @@ const Rr = (t) => {
|
|
|
2284
2307
|
// A caption over its rows, not a second column strip:
|
|
2285
2308
|
// same surface as the rows, no rules, count on the right.
|
|
2286
2309
|
"border-t border-border-subtle bg-surface px-4 pb-1.5 pt-4 text-sm font-semibold",
|
|
2287
|
-
|
|
2310
|
+
_.group.tone === "danger" ? "text-danger-fg" : _.group.tone === "muted" ? "text-text-subtle" : "text-text"
|
|
2288
2311
|
),
|
|
2289
2312
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2.5", children: [
|
|
2290
|
-
|
|
2291
|
-
/* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children:
|
|
2313
|
+
_.group.title ?? _.group.id,
|
|
2314
|
+
/* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: _.group.count ?? _.rows.length })
|
|
2292
2315
|
] })
|
|
2293
2316
|
}
|
|
2294
|
-
) }, `group-${
|
|
2317
|
+
) }, `group-${_.group.id}`)
|
|
2295
2318
|
] : [],
|
|
2296
|
-
...
|
|
2297
|
-
const
|
|
2298
|
-
(R, ge) => I(R, ge) ===
|
|
2319
|
+
..._.rows.map(({ row: U, index: te }) => {
|
|
2320
|
+
const ie = I(U, te), Z = C.some(
|
|
2321
|
+
(R, ge) => I(R, ge) === ie
|
|
2299
2322
|
);
|
|
2300
2323
|
return /* @__PURE__ */ c(
|
|
2301
2324
|
"tr",
|
|
2302
2325
|
{
|
|
2303
2326
|
className: i(
|
|
2304
|
-
|
|
2327
|
+
Br[W],
|
|
2305
2328
|
// Hairline above every row, including the first: it is
|
|
2306
2329
|
// what separates the body from the column strip.
|
|
2307
2330
|
"border-t border-border-subtle",
|
|
2308
2331
|
D && "transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
2309
2332
|
p && "cursor-pointer",
|
|
2310
|
-
|
|
2311
|
-
|
|
2333
|
+
Z && "bg-accent-soft",
|
|
2334
|
+
Y?.(U, te)
|
|
2312
2335
|
),
|
|
2313
2336
|
onClick: (R) => {
|
|
2314
|
-
R.stopPropagation(), p?.(
|
|
2337
|
+
R.stopPropagation(), p?.(U, te);
|
|
2315
2338
|
},
|
|
2316
2339
|
children: [
|
|
2317
2340
|
x && /* @__PURE__ */ e("td", { className: he, children: /* @__PURE__ */ e(
|
|
2318
2341
|
we,
|
|
2319
2342
|
{
|
|
2320
2343
|
size: "sm",
|
|
2321
|
-
checked:
|
|
2344
|
+
checked: Z,
|
|
2322
2345
|
onClick: (R) => R.stopPropagation(),
|
|
2323
2346
|
onChange: (R) => {
|
|
2324
|
-
R.stopPropagation(), P(
|
|
2347
|
+
R.stopPropagation(), P(U, R.target.checked);
|
|
2325
2348
|
},
|
|
2326
2349
|
"aria-label": "Select row"
|
|
2327
2350
|
}
|
|
2328
2351
|
) }),
|
|
2329
2352
|
r.map((R) => {
|
|
2330
|
-
const ge = typeof R.accessor == "function" ? R.accessor(
|
|
2353
|
+
const ge = typeof R.accessor == "function" ? R.accessor(U) : U[R.accessor];
|
|
2331
2354
|
return /* @__PURE__ */ e(
|
|
2332
2355
|
"td",
|
|
2333
2356
|
{
|
|
@@ -2338,41 +2361,41 @@ const Rr = (t) => {
|
|
|
2338
2361
|
"sticky left-0 bg-surface": R.sticky === "left",
|
|
2339
2362
|
"sticky right-0 bg-surface": R.sticky === "right"
|
|
2340
2363
|
}),
|
|
2341
|
-
children: R.cell ? R.cell(ge,
|
|
2364
|
+
children: R.cell ? R.cell(ge, U, te) : String(ge || "")
|
|
2342
2365
|
},
|
|
2343
2366
|
R.id
|
|
2344
2367
|
);
|
|
2345
2368
|
}),
|
|
2346
2369
|
N.length > 0 && /* @__PURE__ */ e("td", { className: he, children: /* @__PURE__ */ e(
|
|
2347
|
-
|
|
2370
|
+
jr,
|
|
2348
2371
|
{
|
|
2349
2372
|
className: "rounded-md",
|
|
2350
|
-
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(
|
|
2373
|
+
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Q, { icon: At, size: "md", color: "current" }) }),
|
|
2351
2374
|
options: N.map((R) => ({
|
|
2352
2375
|
value: R.id,
|
|
2353
2376
|
label: R.label,
|
|
2354
2377
|
icon: R.icon,
|
|
2355
|
-
disabled: R.disabled?.(
|
|
2378
|
+
disabled: R.disabled?.(U)
|
|
2356
2379
|
})),
|
|
2357
2380
|
onSelect: (R) => {
|
|
2358
2381
|
const ge = N.find(
|
|
2359
2382
|
(bt) => bt.id === R
|
|
2360
2383
|
);
|
|
2361
|
-
ge && ge.onClick(
|
|
2384
|
+
ge && ge.onClick(U, te);
|
|
2362
2385
|
},
|
|
2363
2386
|
placement: "bottom-end"
|
|
2364
2387
|
}
|
|
2365
2388
|
) })
|
|
2366
2389
|
]
|
|
2367
2390
|
},
|
|
2368
|
-
|
|
2391
|
+
ie
|
|
2369
2392
|
);
|
|
2370
2393
|
})
|
|
2371
2394
|
]) })
|
|
2372
2395
|
] }) }),
|
|
2373
2396
|
xt && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
|
|
2374
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: K ?? `Showing ${L}–${
|
|
2375
|
-
|
|
2397
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: K ?? `Showing ${L}–${ee} of ${q}` }),
|
|
2398
|
+
Ve && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
|
|
2376
2399
|
/* @__PURE__ */ e(
|
|
2377
2400
|
se,
|
|
2378
2401
|
{
|
|
@@ -2380,27 +2403,27 @@ const Rr = (t) => {
|
|
|
2380
2403
|
variant: "ghost",
|
|
2381
2404
|
iconOnly: !0,
|
|
2382
2405
|
"aria-label": "Previous page",
|
|
2383
|
-
onClick: () => E(
|
|
2384
|
-
disabled:
|
|
2385
|
-
children: /* @__PURE__ */ e(
|
|
2406
|
+
onClick: () => E(H.page - 1),
|
|
2407
|
+
disabled: H.page === 0,
|
|
2408
|
+
children: /* @__PURE__ */ e(Q, { icon: ze, size: "md", color: "current" })
|
|
2386
2409
|
}
|
|
2387
2410
|
),
|
|
2388
|
-
|
|
2389
|
-
(
|
|
2411
|
+
qr(H.page, T).map(
|
|
2412
|
+
(_, U) => _ === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${U}`) : /* @__PURE__ */ e(
|
|
2390
2413
|
"button",
|
|
2391
2414
|
{
|
|
2392
2415
|
type: "button",
|
|
2393
|
-
"aria-current":
|
|
2394
|
-
onClick: () => E(
|
|
2416
|
+
"aria-current": _ === H.page ? "page" : void 0,
|
|
2417
|
+
onClick: () => E(_),
|
|
2395
2418
|
className: i(
|
|
2396
2419
|
"h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
|
|
2397
2420
|
"transition-colors duration-fast ease-out",
|
|
2398
2421
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
2399
|
-
|
|
2422
|
+
_ === H.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
|
|
2400
2423
|
),
|
|
2401
|
-
children:
|
|
2424
|
+
children: _ + 1
|
|
2402
2425
|
},
|
|
2403
|
-
|
|
2426
|
+
_
|
|
2404
2427
|
)
|
|
2405
2428
|
),
|
|
2406
2429
|
/* @__PURE__ */ e(
|
|
@@ -2410,21 +2433,21 @@ const Rr = (t) => {
|
|
|
2410
2433
|
variant: "ghost",
|
|
2411
2434
|
iconOnly: !0,
|
|
2412
2435
|
"aria-label": "Next page",
|
|
2413
|
-
onClick: () => E(
|
|
2414
|
-
disabled:
|
|
2415
|
-
children: /* @__PURE__ */ e(
|
|
2436
|
+
onClick: () => E(H.page + 1),
|
|
2437
|
+
disabled: H.page >= T - 1,
|
|
2438
|
+
children: /* @__PURE__ */ e(Q, { icon: Le, size: "md", color: "current" })
|
|
2416
2439
|
}
|
|
2417
2440
|
)
|
|
2418
2441
|
] })
|
|
2419
2442
|
] })
|
|
2420
2443
|
] });
|
|
2421
|
-
},
|
|
2444
|
+
}, Ur = et(null), xs = ({
|
|
2422
2445
|
items: t,
|
|
2423
2446
|
activeTab: r,
|
|
2424
2447
|
onTabChange: n,
|
|
2425
2448
|
className: s
|
|
2426
2449
|
}) => {
|
|
2427
|
-
const [a, l] =
|
|
2450
|
+
const [a, l] = B(t[0]?.id || ""), o = r || a, u = (d) => {
|
|
2428
2451
|
n ? n(d) : l(d);
|
|
2429
2452
|
};
|
|
2430
2453
|
return /* @__PURE__ */ e("div", { className: i("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((d) => /* @__PURE__ */ e(
|
|
@@ -2450,7 +2473,7 @@ const Rr = (t) => {
|
|
|
2450
2473
|
},
|
|
2451
2474
|
d.id
|
|
2452
2475
|
)) }) });
|
|
2453
|
-
},
|
|
2476
|
+
}, Wr = ({
|
|
2454
2477
|
items: t,
|
|
2455
2478
|
defaultTab: r,
|
|
2456
2479
|
activeTab: n,
|
|
@@ -2459,7 +2482,7 @@ const Rr = (t) => {
|
|
|
2459
2482
|
size: l = "md",
|
|
2460
2483
|
className: o
|
|
2461
2484
|
}) => {
|
|
2462
|
-
const [u, d] =
|
|
2485
|
+
const [u, d] = B(
|
|
2463
2486
|
r || n || t[0]?.id || ""
|
|
2464
2487
|
), v = n || u, m = (p) => {
|
|
2465
2488
|
s ? s(p) : d(p);
|
|
@@ -2500,7 +2523,7 @@ const Rr = (t) => {
|
|
|
2500
2523
|
} : {};
|
|
2501
2524
|
return i(C, S, I, A, K, W);
|
|
2502
2525
|
};
|
|
2503
|
-
return /* @__PURE__ */ e(
|
|
2526
|
+
return /* @__PURE__ */ e(Ur.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
2504
2527
|
/* @__PURE__ */ e("div", { className: g, role: "tablist", children: t.map((p) => /* @__PURE__ */ e(
|
|
2505
2528
|
"button",
|
|
2506
2529
|
{
|
|
@@ -2529,7 +2552,7 @@ const Rr = (t) => {
|
|
|
2529
2552
|
}
|
|
2530
2553
|
)
|
|
2531
2554
|
] }) });
|
|
2532
|
-
},
|
|
2555
|
+
}, Kr = {
|
|
2533
2556
|
sm: "max-w-md",
|
|
2534
2557
|
md: "max-w-lg",
|
|
2535
2558
|
lg: "max-w-2xl",
|
|
@@ -2550,13 +2573,13 @@ function it({
|
|
|
2550
2573
|
showCloseButton: m = !0
|
|
2551
2574
|
}) {
|
|
2552
2575
|
const f = re(null), b = re(null);
|
|
2553
|
-
|
|
2576
|
+
J(() => {
|
|
2554
2577
|
if (!t || !l) return;
|
|
2555
2578
|
const N = (p) => {
|
|
2556
2579
|
p.key === "Escape" && r();
|
|
2557
2580
|
};
|
|
2558
2581
|
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
2559
|
-
}, [t, l, r]),
|
|
2582
|
+
}, [t, l, r]), J(() => (t ? (b.current = document.activeElement, f.current && f.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
|
|
2560
2583
|
document.body.style.overflow = "";
|
|
2561
2584
|
}), [t]);
|
|
2562
2585
|
const g = (N) => {
|
|
@@ -2580,7 +2603,7 @@ function it({
|
|
|
2580
2603
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2581
2604
|
// 'animate-scale-in',
|
|
2582
2605
|
"focus:outline-none",
|
|
2583
|
-
|
|
2606
|
+
Kr[s],
|
|
2584
2607
|
o
|
|
2585
2608
|
),
|
|
2586
2609
|
role: "dialog",
|
|
@@ -2603,7 +2626,7 @@ function it({
|
|
|
2603
2626
|
onClick: r,
|
|
2604
2627
|
className: "p-1 text-text-muted hover:text-text transition-colors",
|
|
2605
2628
|
"aria-label": "Close modal",
|
|
2606
|
-
children: /* @__PURE__ */ e(
|
|
2629
|
+
children: /* @__PURE__ */ e(Q, { icon: Se, size: "lg", color: "current" })
|
|
2607
2630
|
}
|
|
2608
2631
|
)
|
|
2609
2632
|
] }),
|
|
@@ -2615,7 +2638,7 @@ function it({
|
|
|
2615
2638
|
}
|
|
2616
2639
|
) : null;
|
|
2617
2640
|
}
|
|
2618
|
-
const
|
|
2641
|
+
const Gr = ({
|
|
2619
2642
|
value: t,
|
|
2620
2643
|
onChange: r,
|
|
2621
2644
|
label: n,
|
|
@@ -2629,21 +2652,21 @@ const qr = ({
|
|
|
2629
2652
|
onDownloadFile: m,
|
|
2630
2653
|
onRegisterFile: f
|
|
2631
2654
|
}) => {
|
|
2632
|
-
const [b, g] =
|
|
2655
|
+
const [b, g] = B(!1), [N, p] = B([]), [x, C] = B(null), [S, I] = B("/"), [A, K] = B([]), [W, D] = B(!1), [V, ne] = B(""), [Y, X] = B(
|
|
2633
2656
|
typeof t == "object" ? t : null
|
|
2634
|
-
), [de, w] =
|
|
2635
|
-
|
|
2636
|
-
b &&
|
|
2637
|
-
}, [b]),
|
|
2657
|
+
), [de, w] = B(!1), [h, z] = B(""), k = re(null);
|
|
2658
|
+
J(() => {
|
|
2659
|
+
b && $();
|
|
2660
|
+
}, [b]), J(() => {
|
|
2638
2661
|
b && x && y();
|
|
2639
|
-
}, [b, x, S,
|
|
2640
|
-
const
|
|
2662
|
+
}, [b, x, S, V]);
|
|
2663
|
+
const $ = async () => {
|
|
2641
2664
|
D(!0);
|
|
2642
2665
|
try {
|
|
2643
|
-
const
|
|
2644
|
-
|
|
2645
|
-
} catch (
|
|
2646
|
-
console.error("Failed to load mounts",
|
|
2666
|
+
const T = await d?.();
|
|
2667
|
+
T?.data && p(T.data);
|
|
2668
|
+
} catch (T) {
|
|
2669
|
+
console.error("Failed to load mounts", T);
|
|
2647
2670
|
} finally {
|
|
2648
2671
|
D(!1);
|
|
2649
2672
|
}
|
|
@@ -2651,20 +2674,20 @@ const qr = ({
|
|
|
2651
2674
|
if (x) {
|
|
2652
2675
|
D(!0);
|
|
2653
2676
|
try {
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2656
|
-
} catch (
|
|
2657
|
-
console.error("Failed to load files",
|
|
2677
|
+
const T = await u?.({ mountId: x.id, name: V, path: S });
|
|
2678
|
+
T?.data && K(T.data);
|
|
2679
|
+
} catch (T) {
|
|
2680
|
+
console.error("Failed to load files", T);
|
|
2658
2681
|
} finally {
|
|
2659
2682
|
D(!1);
|
|
2660
2683
|
}
|
|
2661
2684
|
}
|
|
2662
|
-
},
|
|
2663
|
-
const L =
|
|
2685
|
+
}, H = async (T) => {
|
|
2686
|
+
const L = T.target.files?.[0];
|
|
2664
2687
|
if (L) {
|
|
2665
2688
|
D(!0);
|
|
2666
2689
|
try {
|
|
2667
|
-
const
|
|
2690
|
+
const ee = await L.arrayBuffer(), le = new Uint8Array(ee), be = {
|
|
2668
2691
|
id: `local-${Date.now()}`,
|
|
2669
2692
|
name: L.name,
|
|
2670
2693
|
type: "file",
|
|
@@ -2675,40 +2698,40 @@ const qr = ({
|
|
|
2675
2698
|
providerKey: L.name,
|
|
2676
2699
|
ownerId: "me"
|
|
2677
2700
|
};
|
|
2678
|
-
|
|
2679
|
-
} catch (
|
|
2680
|
-
console.error("Local file selection failed",
|
|
2701
|
+
X(be), r(be, le), g(!1);
|
|
2702
|
+
} catch (ee) {
|
|
2703
|
+
console.error("Local file selection failed", ee);
|
|
2681
2704
|
} finally {
|
|
2682
2705
|
D(!1);
|
|
2683
2706
|
}
|
|
2684
2707
|
}
|
|
2685
|
-
}, ae = async (
|
|
2686
|
-
const L =
|
|
2708
|
+
}, ae = async (T) => {
|
|
2709
|
+
const L = T.target.files?.[0];
|
|
2687
2710
|
if (!(!L || !x)) {
|
|
2688
2711
|
D(!0);
|
|
2689
2712
|
try {
|
|
2690
|
-
const
|
|
2691
|
-
file: new Uint8Array(
|
|
2713
|
+
const ee = await L.arrayBuffer(), le = await v?.({
|
|
2714
|
+
file: new Uint8Array(ee),
|
|
2692
2715
|
filename: L.name,
|
|
2693
2716
|
mimeType: L.type || "application/octet-stream",
|
|
2694
2717
|
mountId: x.id,
|
|
2695
2718
|
path: S
|
|
2696
2719
|
});
|
|
2697
|
-
if (
|
|
2698
|
-
const be =
|
|
2699
|
-
|
|
2720
|
+
if (le?.data) {
|
|
2721
|
+
const be = le.data;
|
|
2722
|
+
X(be), r(be, new Uint8Array(ee)), g(!1);
|
|
2700
2723
|
}
|
|
2701
|
-
} catch (
|
|
2702
|
-
console.error("Upload failed",
|
|
2724
|
+
} catch (ee) {
|
|
2725
|
+
console.error("Upload failed", ee);
|
|
2703
2726
|
} finally {
|
|
2704
2727
|
D(!1);
|
|
2705
2728
|
}
|
|
2706
2729
|
}
|
|
2707
|
-
},
|
|
2730
|
+
}, ce = async () => {
|
|
2708
2731
|
if (!(!h || !x)) {
|
|
2709
2732
|
D(!0);
|
|
2710
2733
|
try {
|
|
2711
|
-
const
|
|
2734
|
+
const T = `${S}${h}/`;
|
|
2712
2735
|
f && (await f({
|
|
2713
2736
|
name: h,
|
|
2714
2737
|
type: "folder",
|
|
@@ -2716,97 +2739,97 @@ const qr = ({
|
|
|
2716
2739
|
mimeType: "application/x-directory",
|
|
2717
2740
|
size: 0,
|
|
2718
2741
|
mountId: x.id,
|
|
2719
|
-
providerKey:
|
|
2742
|
+
providerKey: T,
|
|
2720
2743
|
ownerId: "me"
|
|
2721
2744
|
}), await y()), w(!1), z("");
|
|
2722
|
-
} catch (
|
|
2723
|
-
console.error("Failed to create folder",
|
|
2745
|
+
} catch (T) {
|
|
2746
|
+
console.error("Failed to create folder", T);
|
|
2724
2747
|
} finally {
|
|
2725
2748
|
D(!1);
|
|
2726
2749
|
}
|
|
2727
2750
|
}
|
|
2728
|
-
}, G = async (
|
|
2751
|
+
}, G = async (T) => {
|
|
2729
2752
|
D(!0);
|
|
2730
2753
|
try {
|
|
2731
|
-
const L = await m?.(
|
|
2732
|
-
|
|
2754
|
+
const L = await m?.(T.id);
|
|
2755
|
+
X(T), r(T, L), g(!1);
|
|
2733
2756
|
} catch (L) {
|
|
2734
2757
|
console.error("Failed to download file", L);
|
|
2735
2758
|
} finally {
|
|
2736
2759
|
D(!1);
|
|
2737
2760
|
}
|
|
2738
|
-
}, O = (
|
|
2739
|
-
|
|
2761
|
+
}, O = (T) => {
|
|
2762
|
+
T.stopPropagation(), X(null), r(null);
|
|
2740
2763
|
}, F = pe(() => {
|
|
2741
|
-
const
|
|
2742
|
-
return A.forEach((
|
|
2743
|
-
if (
|
|
2744
|
-
|
|
2764
|
+
const T = /* @__PURE__ */ new Set(), L = [];
|
|
2765
|
+
return A.forEach((ee) => {
|
|
2766
|
+
if (ee.type === "folder") {
|
|
2767
|
+
ee.path === S && T.add(ee.name);
|
|
2745
2768
|
return;
|
|
2746
2769
|
}
|
|
2747
|
-
const
|
|
2748
|
-
ye.length > 1 ?
|
|
2770
|
+
const le = ee.providerKey || ee.name, ye = (S ? le.substring(S.length) : le).split("/").filter((fe) => fe !== "");
|
|
2771
|
+
ye.length > 1 ? T.add(ye[0]) : ye.length === 1 && L.push(ee);
|
|
2749
2772
|
}), {
|
|
2750
|
-
folders: Array.from(
|
|
2751
|
-
files: L.sort((
|
|
2773
|
+
folders: Array.from(T).sort(),
|
|
2774
|
+
files: L.sort((ee, le) => ee.name.localeCompare(le.name))
|
|
2752
2775
|
};
|
|
2753
|
-
}, [A, S]),
|
|
2754
|
-
I((L) => `${L}${
|
|
2776
|
+
}, [A, S]), M = (T) => {
|
|
2777
|
+
I((L) => `${L}${T}/`);
|
|
2755
2778
|
}, E = () => {
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2779
|
+
const T = S.split("/").filter((L) => L !== "");
|
|
2780
|
+
T.pop(), T.length === 0 ? I("/") : I(`${T.join("/")}/`);
|
|
2758
2781
|
}, P = pe(() => {
|
|
2759
|
-
const
|
|
2782
|
+
const T = F.folders.map((L) => ({
|
|
2760
2783
|
id: `folder-${L}`,
|
|
2761
2784
|
name: L,
|
|
2762
2785
|
type: "folder"
|
|
2763
2786
|
}));
|
|
2764
2787
|
return F.files.forEach((L) => {
|
|
2765
|
-
|
|
2788
|
+
T.push({
|
|
2766
2789
|
...L,
|
|
2767
2790
|
type: "file"
|
|
2768
2791
|
});
|
|
2769
|
-
}),
|
|
2792
|
+
}), T;
|
|
2770
2793
|
}, [F]), j = [
|
|
2771
2794
|
{
|
|
2772
2795
|
id: "name",
|
|
2773
2796
|
header: "Name",
|
|
2774
2797
|
accessor: "name",
|
|
2775
|
-
cell: (
|
|
2798
|
+
cell: (T, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
2776
2799
|
/* @__PURE__ */ e(
|
|
2777
|
-
|
|
2800
|
+
Q,
|
|
2778
2801
|
{
|
|
2779
2802
|
icon: L.type === "folder" ? Ke : je,
|
|
2780
2803
|
size: "sm",
|
|
2781
2804
|
color: L.type === "folder" ? "warning" : "secondary"
|
|
2782
2805
|
}
|
|
2783
2806
|
),
|
|
2784
|
-
/* @__PURE__ */ e("span", { className: i(L.type === "folder" && "font-medium"), children:
|
|
2807
|
+
/* @__PURE__ */ e("span", { className: i(L.type === "folder" && "font-medium"), children: T })
|
|
2785
2808
|
] })
|
|
2786
2809
|
},
|
|
2787
2810
|
{
|
|
2788
2811
|
id: "type",
|
|
2789
2812
|
header: "Type",
|
|
2790
|
-
accessor: (
|
|
2813
|
+
accessor: (T) => T.type === "folder" ? "Folder" : T.mimeType
|
|
2791
2814
|
},
|
|
2792
2815
|
{
|
|
2793
2816
|
id: "size",
|
|
2794
2817
|
header: "Size",
|
|
2795
|
-
accessor: (
|
|
2818
|
+
accessor: (T) => T.type === "file" ? `${(T.size / 1024).toFixed(1)} KB` : "-"
|
|
2796
2819
|
},
|
|
2797
2820
|
{
|
|
2798
2821
|
id: "actions",
|
|
2799
2822
|
header: "",
|
|
2800
2823
|
accessor: "id",
|
|
2801
2824
|
align: "right",
|
|
2802
|
-
cell: (
|
|
2825
|
+
cell: (T, L) => /* @__PURE__ */ e(
|
|
2803
2826
|
se,
|
|
2804
2827
|
{
|
|
2805
2828
|
variant: "outline",
|
|
2806
|
-
onClick: (
|
|
2807
|
-
|
|
2829
|
+
onClick: (ee) => {
|
|
2830
|
+
ee.stopPropagation(), L.type === "folder" ? M(L.name) : G(L);
|
|
2808
2831
|
},
|
|
2809
|
-
loading: W && L.type === "file" &&
|
|
2832
|
+
loading: W && L.type === "file" && Y?.id === L.id,
|
|
2810
2833
|
children: L.type === "folder" ? "Open" : "Select"
|
|
2811
2834
|
}
|
|
2812
2835
|
)
|
|
@@ -2816,9 +2839,9 @@ const qr = ({
|
|
|
2816
2839
|
id: "name",
|
|
2817
2840
|
header: "Mount Name",
|
|
2818
2841
|
accessor: "name",
|
|
2819
|
-
cell: (
|
|
2820
|
-
/* @__PURE__ */ e(
|
|
2821
|
-
/* @__PURE__ */ e("span", { children:
|
|
2842
|
+
cell: (T) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
2843
|
+
/* @__PURE__ */ e(Q, { icon: We, size: "sm", color: "primary" }),
|
|
2844
|
+
/* @__PURE__ */ e("span", { children: T })
|
|
2822
2845
|
] })
|
|
2823
2846
|
},
|
|
2824
2847
|
{
|
|
@@ -2826,7 +2849,7 @@ const qr = ({
|
|
|
2826
2849
|
header: "",
|
|
2827
2850
|
accessor: "id",
|
|
2828
2851
|
align: "right",
|
|
2829
|
-
cell: (
|
|
2852
|
+
cell: (T, L) => /* @__PURE__ */ e(se, { variant: "outline", onClick: () => C(L), children: "Open" })
|
|
2830
2853
|
}
|
|
2831
2854
|
];
|
|
2832
2855
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2842,14 +2865,14 @@ const qr = ({
|
|
|
2842
2865
|
l && "opacity-50 cursor-not-allowed bg-surface-sunk"
|
|
2843
2866
|
),
|
|
2844
2867
|
children: [
|
|
2845
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
2846
|
-
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children:
|
|
2847
|
-
|
|
2868
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Q, { icon: Y ? je : We, color: Y ? "primary" : "secondary" }) }),
|
|
2869
|
+
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Y ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Y.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
|
|
2870
|
+
Y && !l && /* @__PURE__ */ e(
|
|
2848
2871
|
"button",
|
|
2849
2872
|
{
|
|
2850
2873
|
onClick: O,
|
|
2851
2874
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2852
|
-
children: /* @__PURE__ */ e(
|
|
2875
|
+
children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs" })
|
|
2853
2876
|
}
|
|
2854
2877
|
)
|
|
2855
2878
|
]
|
|
@@ -2866,7 +2889,7 @@ const qr = ({
|
|
|
2866
2889
|
title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
|
|
2867
2890
|
size: "lg",
|
|
2868
2891
|
children: /* @__PURE__ */ e(
|
|
2869
|
-
|
|
2892
|
+
Wr,
|
|
2870
2893
|
{
|
|
2871
2894
|
variant: "pills",
|
|
2872
2895
|
items: [
|
|
@@ -2882,7 +2905,7 @@ const qr = ({
|
|
|
2882
2905
|
onClick: () => {
|
|
2883
2906
|
S && S !== "/" ? E() : C(null);
|
|
2884
2907
|
},
|
|
2885
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2908
|
+
leftIcon: /* @__PURE__ */ e(Q, { icon: Dt, size: "xs" }),
|
|
2886
2909
|
children: S ? "Back" : "Back to Mounts"
|
|
2887
2910
|
}
|
|
2888
2911
|
),
|
|
@@ -2891,8 +2914,8 @@ const qr = ({
|
|
|
2891
2914
|
Ce,
|
|
2892
2915
|
{
|
|
2893
2916
|
placeholder: "Search...",
|
|
2894
|
-
value:
|
|
2895
|
-
onChange: (
|
|
2917
|
+
value: V,
|
|
2918
|
+
onChange: (T) => ne(T.target.value),
|
|
2896
2919
|
startIcon: /* @__PURE__ */ e(Ie, { size: 14 }),
|
|
2897
2920
|
fullWidth: !0
|
|
2898
2921
|
}
|
|
@@ -2903,7 +2926,7 @@ const qr = ({
|
|
|
2903
2926
|
{
|
|
2904
2927
|
variant: "outline",
|
|
2905
2928
|
onClick: () => w(!0),
|
|
2906
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2929
|
+
leftIcon: /* @__PURE__ */ e(Q, { icon: Lt, size: "xs" }),
|
|
2907
2930
|
children: "New Folder"
|
|
2908
2931
|
}
|
|
2909
2932
|
),
|
|
@@ -2912,7 +2935,7 @@ const qr = ({
|
|
|
2912
2935
|
{
|
|
2913
2936
|
variant: "primary",
|
|
2914
2937
|
onClick: () => k.current?.click(),
|
|
2915
|
-
leftIcon: /* @__PURE__ */ e(
|
|
2938
|
+
leftIcon: /* @__PURE__ */ e(Q, { icon: It, size: "xs" }),
|
|
2916
2939
|
loading: W,
|
|
2917
2940
|
children: "Upload"
|
|
2918
2941
|
}
|
|
@@ -2930,17 +2953,17 @@ const qr = ({
|
|
|
2930
2953
|
] })
|
|
2931
2954
|
] }),
|
|
2932
2955
|
de && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
|
|
2933
|
-
/* @__PURE__ */ e(
|
|
2956
|
+
/* @__PURE__ */ e(Q, { icon: Ke, size: "sm", color: "warning" }),
|
|
2934
2957
|
/* @__PURE__ */ e(
|
|
2935
2958
|
Ce,
|
|
2936
2959
|
{
|
|
2937
2960
|
placeholder: "Folder name",
|
|
2938
2961
|
value: h,
|
|
2939
|
-
onChange: (
|
|
2962
|
+
onChange: (T) => z(T.target.value),
|
|
2940
2963
|
autoFocus: !0
|
|
2941
2964
|
}
|
|
2942
2965
|
),
|
|
2943
|
-
/* @__PURE__ */ e(se, { onClick:
|
|
2966
|
+
/* @__PURE__ */ e(se, { onClick: ce, loading: W, children: "Create" }),
|
|
2944
2967
|
/* @__PURE__ */ e(se, { variant: "ghost", onClick: () => w(!1), children: "Cancel" })
|
|
2945
2968
|
] }),
|
|
2946
2969
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
@@ -2950,7 +2973,7 @@ const qr = ({
|
|
|
2950
2973
|
columns: j,
|
|
2951
2974
|
loading: W,
|
|
2952
2975
|
emptyContent: "This folder is empty",
|
|
2953
|
-
onRowClick: (
|
|
2976
|
+
onRowClick: (T) => T.type === "folder" ? M(T.name) : G(T)
|
|
2954
2977
|
}
|
|
2955
2978
|
) })
|
|
2956
2979
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
@@ -2960,7 +2983,7 @@ const qr = ({
|
|
|
2960
2983
|
columns: q,
|
|
2961
2984
|
loading: W,
|
|
2962
2985
|
emptyContent: "No storage mounts configured",
|
|
2963
|
-
onRowClick: (
|
|
2986
|
+
onRowClick: (T) => C(T)
|
|
2964
2987
|
}
|
|
2965
2988
|
) }) })
|
|
2966
2989
|
},
|
|
@@ -2968,7 +2991,7 @@ const qr = ({
|
|
|
2968
2991
|
id: "local",
|
|
2969
2992
|
label: "Local File",
|
|
2970
2993
|
content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 border-2 border-dashed border-border rounded-xl bg-surface-sunk/50", children: [
|
|
2971
|
-
/* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(
|
|
2994
|
+
/* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(Q, { icon: je, size: "xl", color: "primary" }) }),
|
|
2972
2995
|
/* @__PURE__ */ e(ue, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
|
|
2973
2996
|
/* @__PURE__ */ c(ue, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
|
|
2974
2997
|
"This file will be used directly in the form and will ",
|
|
@@ -2982,7 +3005,7 @@ const qr = ({
|
|
|
2982
3005
|
{
|
|
2983
3006
|
type: "file",
|
|
2984
3007
|
className: "hidden",
|
|
2985
|
-
onChange:
|
|
3008
|
+
onChange: H,
|
|
2986
3009
|
accept: o,
|
|
2987
3010
|
disabled: W
|
|
2988
3011
|
}
|
|
@@ -2996,7 +3019,7 @@ const qr = ({
|
|
|
2996
3019
|
}
|
|
2997
3020
|
)
|
|
2998
3021
|
] });
|
|
2999
|
-
},
|
|
3022
|
+
}, Jr = {
|
|
3000
3023
|
sm: "px-3 py-1.5 text-sm",
|
|
3001
3024
|
md: "px-3 py-2 text-base",
|
|
3002
3025
|
lg: "px-3 py-2 text-md",
|
|
@@ -3016,7 +3039,7 @@ const qr = ({
|
|
|
3016
3039
|
rows: m = 4,
|
|
3017
3040
|
...f
|
|
3018
3041
|
}, b) => {
|
|
3019
|
-
const g =
|
|
3042
|
+
const g = oe.useId(), N = v || `textarea-${g}`, p = !!n, x = n || r ? `${N}-description` : void 0;
|
|
3020
3043
|
return /* @__PURE__ */ c("div", { className: i("flex flex-col", a && "w-full", o), children: [
|
|
3021
3044
|
t && /* @__PURE__ */ e(
|
|
3022
3045
|
"label",
|
|
@@ -3042,7 +3065,7 @@ const qr = ({
|
|
|
3042
3065
|
className: i(
|
|
3043
3066
|
lt,
|
|
3044
3067
|
"resize-y leading-relaxed",
|
|
3045
|
-
|
|
3068
|
+
Jr[s],
|
|
3046
3069
|
ot(p),
|
|
3047
3070
|
d
|
|
3048
3071
|
),
|
|
@@ -3069,7 +3092,7 @@ const qr = ({
|
|
|
3069
3092
|
}
|
|
3070
3093
|
);
|
|
3071
3094
|
He.displayName = "TextArea";
|
|
3072
|
-
const
|
|
3095
|
+
const Yr = /* @__PURE__ */ new Set([
|
|
3073
3096
|
"name",
|
|
3074
3097
|
"given-name",
|
|
3075
3098
|
"family-name",
|
|
@@ -3104,7 +3127,7 @@ const Wr = /* @__PURE__ */ new Set([
|
|
|
3104
3127
|
"one-time-code"
|
|
3105
3128
|
]);
|
|
3106
3129
|
function Xe(t) {
|
|
3107
|
-
return t &&
|
|
3130
|
+
return t && Yr.has(t) ? { autoComplete: t } : {
|
|
3108
3131
|
autoComplete: "off",
|
|
3109
3132
|
// 1Password
|
|
3110
3133
|
"data-1p-ignore": "true",
|
|
@@ -3122,7 +3145,7 @@ function Ze(t, r) {
|
|
|
3122
3145
|
t
|
|
3123
3146
|
);
|
|
3124
3147
|
}
|
|
3125
|
-
function
|
|
3148
|
+
function Xr(t, r, n) {
|
|
3126
3149
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
3127
3150
|
let l = a;
|
|
3128
3151
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -3131,7 +3154,7 @@ function Kr(t, r, n) {
|
|
|
3131
3154
|
}
|
|
3132
3155
|
return l[s[s.length - 1]] = n, a;
|
|
3133
3156
|
}
|
|
3134
|
-
function
|
|
3157
|
+
function Zr(t, r) {
|
|
3135
3158
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
3136
3159
|
let a = s;
|
|
3137
3160
|
for (let l = 0; l < n.length - 1; l++) {
|
|
@@ -3141,7 +3164,7 @@ function Gr(t, r) {
|
|
|
3141
3164
|
}
|
|
3142
3165
|
return delete a[n[n.length - 1]], s;
|
|
3143
3166
|
}
|
|
3144
|
-
function
|
|
3167
|
+
function Qr({
|
|
3145
3168
|
title: t,
|
|
3146
3169
|
description: r,
|
|
3147
3170
|
className: n,
|
|
@@ -3155,7 +3178,7 @@ function Jr({
|
|
|
3155
3178
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
|
|
3156
3179
|
] });
|
|
3157
3180
|
}
|
|
3158
|
-
const
|
|
3181
|
+
const bs = ({
|
|
3159
3182
|
groups: t,
|
|
3160
3183
|
data: r,
|
|
3161
3184
|
onSubmit: n,
|
|
@@ -3173,13 +3196,13 @@ const ms = ({
|
|
|
3173
3196
|
ref: N,
|
|
3174
3197
|
sdk: p
|
|
3175
3198
|
}) => {
|
|
3176
|
-
const [x, C] =
|
|
3177
|
-
|
|
3199
|
+
const [x, C] = B(r || {}), [S, I] = B({}), [A, K] = B({});
|
|
3200
|
+
J(() => {
|
|
3178
3201
|
r && C({ ...r });
|
|
3179
3202
|
}, [r]);
|
|
3180
3203
|
const W = xe(
|
|
3181
3204
|
(w, h, z) => {
|
|
3182
|
-
const k = t.flatMap((
|
|
3205
|
+
const k = t.flatMap(($) => $.items).find(($) => $.name === w);
|
|
3183
3206
|
if (!k) return null;
|
|
3184
3207
|
if (k.required && (h == null || h === ""))
|
|
3185
3208
|
return `${k.label} is required`;
|
|
@@ -3189,22 +3212,22 @@ const ms = ({
|
|
|
3189
3212
|
if (h && !Array.isArray(h))
|
|
3190
3213
|
return `${k.label} must be an array.`;
|
|
3191
3214
|
if (Array.isArray(h) && k.arrayFields) {
|
|
3192
|
-
const
|
|
3215
|
+
const $ = [];
|
|
3193
3216
|
let y = !1;
|
|
3194
|
-
if (h.forEach((
|
|
3195
|
-
const
|
|
3217
|
+
if (h.forEach((H, ae) => {
|
|
3218
|
+
const ce = {};
|
|
3196
3219
|
for (const G of k.arrayFields) {
|
|
3197
|
-
const O =
|
|
3220
|
+
const O = H?.[G.name];
|
|
3198
3221
|
if (G.required && (O == null || O === ""))
|
|
3199
|
-
|
|
3222
|
+
ce[G.name] = `${G.label} is required`, y = !0;
|
|
3200
3223
|
else if (G.validator) {
|
|
3201
|
-
const F = G.validator(O,
|
|
3202
|
-
F && (
|
|
3224
|
+
const F = G.validator(O, H);
|
|
3225
|
+
F && (ce[G.name] = F, y = !0);
|
|
3203
3226
|
}
|
|
3204
3227
|
}
|
|
3205
|
-
|
|
3228
|
+
$[ae] = ce;
|
|
3206
3229
|
}), y)
|
|
3207
|
-
return JSON.stringify(
|
|
3230
|
+
return JSON.stringify($);
|
|
3208
3231
|
}
|
|
3209
3232
|
}
|
|
3210
3233
|
return k.validator ? k.validator(h, z) : null;
|
|
@@ -3212,38 +3235,38 @@ const ms = ({
|
|
|
3212
3235
|
[t]
|
|
3213
3236
|
), D = xe(
|
|
3214
3237
|
(w, h) => {
|
|
3215
|
-
let z =
|
|
3238
|
+
let z = Xr(
|
|
3216
3239
|
x,
|
|
3217
3240
|
w,
|
|
3218
3241
|
h
|
|
3219
3242
|
);
|
|
3220
|
-
t.flatMap((y) => y.items).find((y) => y.name === w)?.removeIfEmpty && (h == null || h === "") && (z =
|
|
3221
|
-
const
|
|
3243
|
+
t.flatMap((y) => y.items).find((y) => y.name === w)?.removeIfEmpty && (h == null || h === "") && (z = Zr(z, w)), C(z), K((y) => ({ ...y, [w]: !0 }));
|
|
3244
|
+
const $ = W(w, h, z);
|
|
3222
3245
|
I((y) => ({
|
|
3223
3246
|
...y,
|
|
3224
|
-
[w]:
|
|
3247
|
+
[w]: $ || ""
|
|
3225
3248
|
})), a?.(z, w);
|
|
3226
3249
|
},
|
|
3227
3250
|
[x, t, W, a]
|
|
3228
|
-
),
|
|
3251
|
+
), V = xe(
|
|
3229
3252
|
async (w) => {
|
|
3230
3253
|
if (w.preventDefault(), b) return;
|
|
3231
|
-
const h = {}, z = t.flatMap((
|
|
3232
|
-
for (const
|
|
3233
|
-
if (
|
|
3254
|
+
const h = {}, z = t.flatMap(($) => $.items);
|
|
3255
|
+
for (const $ of z) {
|
|
3256
|
+
if ($.hidden || $.conditional && !$.conditional(x))
|
|
3234
3257
|
continue;
|
|
3235
3258
|
const y = W(
|
|
3236
|
-
|
|
3237
|
-
Ze(x,
|
|
3259
|
+
$.name,
|
|
3260
|
+
Ze(x, $.name),
|
|
3238
3261
|
x
|
|
3239
3262
|
);
|
|
3240
|
-
y && (h[
|
|
3263
|
+
y && (h[$.name] = y);
|
|
3241
3264
|
}
|
|
3242
3265
|
if (o) {
|
|
3243
|
-
const
|
|
3244
|
-
|
|
3266
|
+
const $ = o(x);
|
|
3267
|
+
$ && Object.assign(h, $);
|
|
3245
3268
|
}
|
|
3246
|
-
if (I(h), Object.keys(h).some((
|
|
3269
|
+
if (I(h), Object.keys(h).some(($) => h[$]))
|
|
3247
3270
|
return;
|
|
3248
3271
|
const k = l ? l(x) : x;
|
|
3249
3272
|
await n?.(x, k);
|
|
@@ -3251,7 +3274,7 @@ const ms = ({
|
|
|
3251
3274
|
[x, t, W, o, l, n, b]
|
|
3252
3275
|
), ne = xe(
|
|
3253
3276
|
(w) => {
|
|
3254
|
-
const h = Ze(x, w.name), z = A[w.name] ? S[w.name] : void 0, k = w.disabled || b,
|
|
3277
|
+
const h = Ze(x, w.name), z = A[w.name] ? S[w.name] : void 0, k = w.disabled || b, $ = {
|
|
3255
3278
|
value: h || "",
|
|
3256
3279
|
disabled: k,
|
|
3257
3280
|
required: w.required,
|
|
@@ -3269,7 +3292,7 @@ const ms = ({
|
|
|
3269
3292
|
return /* @__PURE__ */ e(
|
|
3270
3293
|
Ce,
|
|
3271
3294
|
{
|
|
3272
|
-
|
|
3295
|
+
...$,
|
|
3273
3296
|
onChange: (y) => D(w.name, y.target.value),
|
|
3274
3297
|
type: w.textType || w.type,
|
|
3275
3298
|
...Xe(w.autocomplete),
|
|
@@ -3281,7 +3304,7 @@ const ms = ({
|
|
|
3281
3304
|
return /* @__PURE__ */ e(
|
|
3282
3305
|
He,
|
|
3283
3306
|
{
|
|
3284
|
-
|
|
3307
|
+
...$,
|
|
3285
3308
|
onChange: (y) => D(w.name, y.target.value),
|
|
3286
3309
|
rows: w.rows ?? 4,
|
|
3287
3310
|
error: z,
|
|
@@ -3292,7 +3315,7 @@ const ms = ({
|
|
|
3292
3315
|
return /* @__PURE__ */ e(
|
|
3293
3316
|
Ae,
|
|
3294
3317
|
{
|
|
3295
|
-
|
|
3318
|
+
...$,
|
|
3296
3319
|
onChange: (y) => D(w.name, y),
|
|
3297
3320
|
options: (w.options || []).map((y) => ({
|
|
3298
3321
|
...y,
|
|
@@ -3310,7 +3333,7 @@ const ms = ({
|
|
|
3310
3333
|
// open to learn what the choices even are.
|
|
3311
3334
|
case "segmented":
|
|
3312
3335
|
return /* @__PURE__ */ e(
|
|
3313
|
-
|
|
3336
|
+
fr,
|
|
3314
3337
|
{
|
|
3315
3338
|
"aria-label": w.label,
|
|
3316
3339
|
value: h == null ? "" : String(h),
|
|
@@ -3327,7 +3350,7 @@ const ms = ({
|
|
|
3327
3350
|
return /* @__PURE__ */ e(
|
|
3328
3351
|
we,
|
|
3329
3352
|
{
|
|
3330
|
-
|
|
3353
|
+
...$,
|
|
3331
3354
|
label: w.label,
|
|
3332
3355
|
checked: !!h,
|
|
3333
3356
|
onChange: (y) => D(w.name, y.target.checked),
|
|
@@ -3361,7 +3384,7 @@ const ms = ({
|
|
|
3361
3384
|
return /* @__PURE__ */ e(
|
|
3362
3385
|
Be,
|
|
3363
3386
|
{
|
|
3364
|
-
|
|
3387
|
+
...$,
|
|
3365
3388
|
value: h ? new Date(h) : null,
|
|
3366
3389
|
onChange: (y) => D(w.name, y),
|
|
3367
3390
|
size: f
|
|
@@ -3369,9 +3392,9 @@ const ms = ({
|
|
|
3369
3392
|
);
|
|
3370
3393
|
case "file":
|
|
3371
3394
|
return /* @__PURE__ */ e(
|
|
3372
|
-
|
|
3395
|
+
Gr,
|
|
3373
3396
|
{
|
|
3374
|
-
|
|
3397
|
+
...$,
|
|
3375
3398
|
value: h,
|
|
3376
3399
|
onChange: (y) => D(w.name, y),
|
|
3377
3400
|
error: z,
|
|
@@ -3402,7 +3425,7 @@ const ms = ({
|
|
|
3402
3425
|
);
|
|
3403
3426
|
case "folder":
|
|
3404
3427
|
return /* @__PURE__ */ e(
|
|
3405
|
-
|
|
3428
|
+
Ar,
|
|
3406
3429
|
{
|
|
3407
3430
|
value: h || {},
|
|
3408
3431
|
onChange: (y) => D(w.name, y),
|
|
@@ -3424,48 +3447,48 @@ const ms = ({
|
|
|
3424
3447
|
});
|
|
3425
3448
|
case "array": {
|
|
3426
3449
|
const y = h || [];
|
|
3427
|
-
let
|
|
3450
|
+
let H = [];
|
|
3428
3451
|
if (typeof z == "string" && z.startsWith("["))
|
|
3429
3452
|
try {
|
|
3430
|
-
|
|
3453
|
+
H = JSON.parse(z);
|
|
3431
3454
|
} catch {
|
|
3432
3455
|
}
|
|
3433
3456
|
const ae = () => {
|
|
3434
3457
|
D(w.name, [...y, {}]);
|
|
3435
|
-
},
|
|
3458
|
+
}, ce = (O) => {
|
|
3436
3459
|
D(
|
|
3437
3460
|
w.name,
|
|
3438
|
-
y.filter((F,
|
|
3461
|
+
y.filter((F, M) => M !== O)
|
|
3439
3462
|
);
|
|
3440
|
-
}, G = (O, F,
|
|
3463
|
+
}, G = (O, F, M) => {
|
|
3441
3464
|
const E = [...y];
|
|
3442
3465
|
E[O] = {
|
|
3443
3466
|
...E[O],
|
|
3444
|
-
[F]:
|
|
3467
|
+
[F]: M
|
|
3445
3468
|
}, D(w.name, E);
|
|
3446
3469
|
};
|
|
3447
3470
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
3448
3471
|
y.map((O, F) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
3449
|
-
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: w.arrayFields?.map((
|
|
3450
|
-
const E =
|
|
3472
|
+
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: w.arrayFields?.map((M) => {
|
|
3473
|
+
const E = H?.[F]?.[M.name];
|
|
3451
3474
|
return /* @__PURE__ */ c(
|
|
3452
3475
|
"div",
|
|
3453
3476
|
{
|
|
3454
3477
|
className: "flex flex-col gap-1",
|
|
3455
3478
|
children: [
|
|
3456
3479
|
F === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3457
|
-
|
|
3458
|
-
|
|
3480
|
+
M.label,
|
|
3481
|
+
M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3459
3482
|
] }),
|
|
3460
3483
|
(() => {
|
|
3461
3484
|
const P = {
|
|
3462
|
-
value: O?.[
|
|
3485
|
+
value: O?.[M.name] || "",
|
|
3463
3486
|
disabled: k,
|
|
3464
|
-
required:
|
|
3465
|
-
placeholder:
|
|
3466
|
-
...
|
|
3487
|
+
required: M.required,
|
|
3488
|
+
placeholder: M.placeholder,
|
|
3489
|
+
...M.fieldProps
|
|
3467
3490
|
};
|
|
3468
|
-
switch (
|
|
3491
|
+
switch (M.type) {
|
|
3469
3492
|
case "text":
|
|
3470
3493
|
case "email":
|
|
3471
3494
|
case "password":
|
|
@@ -3478,11 +3501,11 @@ const ms = ({
|
|
|
3478
3501
|
...P,
|
|
3479
3502
|
onChange: (j) => G(
|
|
3480
3503
|
F,
|
|
3481
|
-
|
|
3504
|
+
M.name,
|
|
3482
3505
|
j.target.value
|
|
3483
3506
|
),
|
|
3484
|
-
type:
|
|
3485
|
-
...Xe(
|
|
3507
|
+
type: M.textType || M.type,
|
|
3508
|
+
...Xe(M.autocomplete),
|
|
3486
3509
|
error: E,
|
|
3487
3510
|
size: f
|
|
3488
3511
|
}
|
|
@@ -3494,10 +3517,10 @@ const ms = ({
|
|
|
3494
3517
|
...P,
|
|
3495
3518
|
onChange: (j) => G(
|
|
3496
3519
|
F,
|
|
3497
|
-
|
|
3520
|
+
M.name,
|
|
3498
3521
|
j.target.value
|
|
3499
3522
|
),
|
|
3500
|
-
rows:
|
|
3523
|
+
rows: M.rows ?? 4,
|
|
3501
3524
|
error: E,
|
|
3502
3525
|
size: f
|
|
3503
3526
|
}
|
|
@@ -3509,18 +3532,18 @@ const ms = ({
|
|
|
3509
3532
|
...P,
|
|
3510
3533
|
onChange: (j) => G(
|
|
3511
3534
|
F,
|
|
3512
|
-
|
|
3535
|
+
M.name,
|
|
3513
3536
|
j
|
|
3514
3537
|
),
|
|
3515
|
-
options: (
|
|
3538
|
+
options: (M.options || []).map(
|
|
3516
3539
|
(j) => ({
|
|
3517
3540
|
...j,
|
|
3518
3541
|
value: String(j.value)
|
|
3519
3542
|
})
|
|
3520
3543
|
),
|
|
3521
|
-
searchable:
|
|
3522
|
-
multiple:
|
|
3523
|
-
allowCreate:
|
|
3544
|
+
searchable: M.searchable,
|
|
3545
|
+
multiple: M.multiple,
|
|
3546
|
+
allowCreate: M.allowCreate,
|
|
3524
3547
|
error: E,
|
|
3525
3548
|
size: f
|
|
3526
3549
|
}
|
|
@@ -3530,17 +3553,17 @@ const ms = ({
|
|
|
3530
3553
|
we,
|
|
3531
3554
|
{
|
|
3532
3555
|
...P,
|
|
3533
|
-
checked: !!O?.[
|
|
3556
|
+
checked: !!O?.[M.name],
|
|
3534
3557
|
onChange: (j) => G(
|
|
3535
3558
|
F,
|
|
3536
|
-
|
|
3559
|
+
M.name,
|
|
3537
3560
|
j.target.checked
|
|
3538
3561
|
),
|
|
3539
3562
|
size: f
|
|
3540
3563
|
}
|
|
3541
3564
|
);
|
|
3542
3565
|
case "radio":
|
|
3543
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3566
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: M.options?.map((j) => /* @__PURE__ */ c(
|
|
3544
3567
|
"label",
|
|
3545
3568
|
{
|
|
3546
3569
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3549,12 +3572,12 @@ const ms = ({
|
|
|
3549
3572
|
"input",
|
|
3550
3573
|
{
|
|
3551
3574
|
type: "radio",
|
|
3552
|
-
name: `${w.name}.${F}.${
|
|
3575
|
+
name: `${w.name}.${F}.${M.name}`,
|
|
3553
3576
|
value: j.value,
|
|
3554
|
-
checked: O?.[
|
|
3577
|
+
checked: O?.[M.name] === j.value,
|
|
3555
3578
|
onChange: () => G(
|
|
3556
3579
|
F,
|
|
3557
|
-
|
|
3580
|
+
M.name,
|
|
3558
3581
|
j.value
|
|
3559
3582
|
),
|
|
3560
3583
|
disabled: k || j.disabled,
|
|
@@ -3567,7 +3590,7 @@ const ms = ({
|
|
|
3567
3590
|
j.value
|
|
3568
3591
|
)) });
|
|
3569
3592
|
case "date": {
|
|
3570
|
-
const j = O?.[
|
|
3593
|
+
const j = O?.[M.name];
|
|
3571
3594
|
return /* @__PURE__ */ e(
|
|
3572
3595
|
Be,
|
|
3573
3596
|
{
|
|
@@ -3575,7 +3598,7 @@ const ms = ({
|
|
|
3575
3598
|
value: j ? new Date(j) : null,
|
|
3576
3599
|
onChange: (q) => G(
|
|
3577
3600
|
F,
|
|
3578
|
-
|
|
3601
|
+
M.name,
|
|
3579
3602
|
q
|
|
3580
3603
|
),
|
|
3581
3604
|
size: f
|
|
@@ -3583,11 +3606,11 @@ const ms = ({
|
|
|
3583
3606
|
);
|
|
3584
3607
|
}
|
|
3585
3608
|
case "custom":
|
|
3586
|
-
return
|
|
3587
|
-
value: O?.[
|
|
3609
|
+
return M.customComponent?.({
|
|
3610
|
+
value: O?.[M.name],
|
|
3588
3611
|
onChange: (j) => G(
|
|
3589
3612
|
F,
|
|
3590
|
-
|
|
3613
|
+
M.name,
|
|
3591
3614
|
j
|
|
3592
3615
|
),
|
|
3593
3616
|
error: E,
|
|
@@ -3598,14 +3621,14 @@ const ms = ({
|
|
|
3598
3621
|
return /* @__PURE__ */ c("p", { children: [
|
|
3599
3622
|
"Unsupported field type in array:",
|
|
3600
3623
|
" ",
|
|
3601
|
-
|
|
3624
|
+
M.type
|
|
3602
3625
|
] });
|
|
3603
3626
|
}
|
|
3604
3627
|
})(),
|
|
3605
3628
|
E && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: E })
|
|
3606
3629
|
]
|
|
3607
3630
|
},
|
|
3608
|
-
|
|
3631
|
+
M.name
|
|
3609
3632
|
);
|
|
3610
3633
|
}) }),
|
|
3611
3634
|
/* @__PURE__ */ e(
|
|
@@ -3616,7 +3639,7 @@ const ms = ({
|
|
|
3616
3639
|
variant: "ghost",
|
|
3617
3640
|
size: "md",
|
|
3618
3641
|
"aria-label": `${w.label} verwijderen`,
|
|
3619
|
-
onClick: () =>
|
|
3642
|
+
onClick: () => ce(F),
|
|
3620
3643
|
disabled: k,
|
|
3621
3644
|
className: i("shrink-0", F === 0 && "mt-5"),
|
|
3622
3645
|
children: /* @__PURE__ */ e(Pt, { className: "size-icon-md" })
|
|
@@ -3644,7 +3667,7 @@ const ms = ({
|
|
|
3644
3667
|
}
|
|
3645
3668
|
},
|
|
3646
3669
|
[x, A, S, b, f, D]
|
|
3647
|
-
),
|
|
3670
|
+
), Y = xe(
|
|
3648
3671
|
(w) => {
|
|
3649
3672
|
if (w.conditional && !w.conditional(x))
|
|
3650
3673
|
return null;
|
|
@@ -3665,13 +3688,13 @@ const ms = ({
|
|
|
3665
3688
|
// form *is* the page now, so a panel around each section would be a
|
|
3666
3689
|
// second surface on top of the one it already sits on.
|
|
3667
3690
|
/* @__PURE__ */ e(
|
|
3668
|
-
|
|
3691
|
+
Qr,
|
|
3669
3692
|
{
|
|
3670
3693
|
title: w.title,
|
|
3671
3694
|
description: w.description,
|
|
3672
3695
|
className: "not-last:border-b not-last:border-border-subtle",
|
|
3673
3696
|
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: z, children: h.map((k) => {
|
|
3674
|
-
const
|
|
3697
|
+
const $ = A[k.name] ? S[k.name] : void 0;
|
|
3675
3698
|
return /* @__PURE__ */ c(
|
|
3676
3699
|
"div",
|
|
3677
3700
|
{
|
|
@@ -3689,7 +3712,7 @@ const ms = ({
|
|
|
3689
3712
|
k.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3690
3713
|
] }),
|
|
3691
3714
|
ne(k),
|
|
3692
|
-
k.help &&
|
|
3715
|
+
k.help && !$ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: k.help })
|
|
3693
3716
|
]
|
|
3694
3717
|
},
|
|
3695
3718
|
k.name
|
|
@@ -3701,7 +3724,7 @@ const ms = ({
|
|
|
3701
3724
|
);
|
|
3702
3725
|
},
|
|
3703
3726
|
[x, A, S, ne]
|
|
3704
|
-
),
|
|
3727
|
+
), X = i(
|
|
3705
3728
|
{
|
|
3706
3729
|
"max-w-settings": f === "sm",
|
|
3707
3730
|
"max-w-form": f === "md",
|
|
@@ -3710,9 +3733,9 @@ const ms = ({
|
|
|
3710
3733
|
},
|
|
3711
3734
|
g
|
|
3712
3735
|
), de = f === "full" ? "md" : f;
|
|
3713
|
-
return /* @__PURE__ */ c("form", { ref: N, onSubmit:
|
|
3736
|
+
return /* @__PURE__ */ c("form", { ref: N, onSubmit: V, className: X, children: [
|
|
3714
3737
|
!v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3715
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(
|
|
3738
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
|
|
3716
3739
|
v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(Ee, { children: [
|
|
3717
3740
|
/* @__PURE__ */ e("div", { className: "ml-auto" }),
|
|
3718
3741
|
s && /* @__PURE__ */ e(
|
|
@@ -3742,7 +3765,7 @@ const ms = ({
|
|
|
3742
3765
|
] }) })
|
|
3743
3766
|
] });
|
|
3744
3767
|
};
|
|
3745
|
-
function
|
|
3768
|
+
function gs({
|
|
3746
3769
|
open: t,
|
|
3747
3770
|
title: r,
|
|
3748
3771
|
description: n,
|
|
@@ -3776,7 +3799,7 @@ function fs({
|
|
|
3776
3799
|
}
|
|
3777
3800
|
);
|
|
3778
3801
|
}
|
|
3779
|
-
const
|
|
3802
|
+
const en = {
|
|
3780
3803
|
default: "bg-surface-hover text-text",
|
|
3781
3804
|
primary: "bg-accent-soft text-accent",
|
|
3782
3805
|
secondary: "bg-surface-hover text-text-muted",
|
|
@@ -3786,11 +3809,11 @@ const Yr = {
|
|
|
3786
3809
|
info: "bg-info-soft text-info-fg",
|
|
3787
3810
|
// Internal-note amber. Never for customer-visible content.
|
|
3788
3811
|
note: "bg-note-soft text-note"
|
|
3789
|
-
},
|
|
3812
|
+
}, tn = {
|
|
3790
3813
|
sm: "px-2 py-0.5 text-xs",
|
|
3791
3814
|
md: "px-2.5 py-1 text-sm",
|
|
3792
3815
|
lg: "px-3 py-1.5 text-base"
|
|
3793
|
-
},
|
|
3816
|
+
}, rn = {
|
|
3794
3817
|
default: "bg-surface-hover",
|
|
3795
3818
|
primary: "bg-accent",
|
|
3796
3819
|
secondary: "bg-surface-hover",
|
|
@@ -3800,7 +3823,7 @@ const Yr = {
|
|
|
3800
3823
|
info: "bg-info",
|
|
3801
3824
|
note: "bg-note"
|
|
3802
3825
|
};
|
|
3803
|
-
function
|
|
3826
|
+
function nn({
|
|
3804
3827
|
variant: t = "default",
|
|
3805
3828
|
size: r = "md",
|
|
3806
3829
|
dot: n = !1,
|
|
@@ -3818,9 +3841,9 @@ function Qr({
|
|
|
3818
3841
|
// Base styles
|
|
3819
3842
|
"inline-flex items-center font-medium rounded-full",
|
|
3820
3843
|
// Variant styles
|
|
3821
|
-
|
|
3844
|
+
en[t],
|
|
3822
3845
|
// Size styles
|
|
3823
|
-
|
|
3846
|
+
tn[r],
|
|
3824
3847
|
o
|
|
3825
3848
|
),
|
|
3826
3849
|
...d,
|
|
@@ -3830,7 +3853,7 @@ function Qr({
|
|
|
3830
3853
|
{
|
|
3831
3854
|
className: i(
|
|
3832
3855
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3833
|
-
|
|
3856
|
+
rn[t]
|
|
3834
3857
|
)
|
|
3835
3858
|
}
|
|
3836
3859
|
),
|
|
@@ -3842,7 +3865,7 @@ function Qr({
|
|
|
3842
3865
|
onClick: l,
|
|
3843
3866
|
className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
|
|
3844
3867
|
"aria-label": "Remove badge",
|
|
3845
|
-
children: /* @__PURE__ */ e(
|
|
3868
|
+
children: /* @__PURE__ */ e(Q, { icon: Se, size: "xs", color: "current" })
|
|
3846
3869
|
}
|
|
3847
3870
|
)
|
|
3848
3871
|
]
|
|
@@ -3850,7 +3873,7 @@ function Qr({
|
|
|
3850
3873
|
);
|
|
3851
3874
|
}
|
|
3852
3875
|
const me = ({ className: t }) => /* @__PURE__ */ e("span", { className: i("block rounded-xs bg-surface-hover", t) });
|
|
3853
|
-
function
|
|
3876
|
+
function sn({ shape: t, rows: r, columns: n }) {
|
|
3854
3877
|
switch (t) {
|
|
3855
3878
|
case "table":
|
|
3856
3879
|
return /* @__PURE__ */ c("div", { className: "overflow-hidden rounded-lg ring-1 ring-border", children: [
|
|
@@ -3914,7 +3937,7 @@ function en({ shape: t, rows: r, columns: n }) {
|
|
|
3914
3937
|
] });
|
|
3915
3938
|
}
|
|
3916
3939
|
}
|
|
3917
|
-
const
|
|
3940
|
+
const an = {
|
|
3918
3941
|
text: 2,
|
|
3919
3942
|
table: 8,
|
|
3920
3943
|
list: 6,
|
|
@@ -3922,7 +3945,7 @@ const tn = {
|
|
|
3922
3945
|
menu: 4,
|
|
3923
3946
|
cards: 2
|
|
3924
3947
|
};
|
|
3925
|
-
function
|
|
3948
|
+
function qe({
|
|
3926
3949
|
variant: t = "page",
|
|
3927
3950
|
shape: r,
|
|
3928
3951
|
rows: n,
|
|
@@ -3933,14 +3956,14 @@ function Ve({
|
|
|
3933
3956
|
tableColumns: u,
|
|
3934
3957
|
tableRows: d
|
|
3935
3958
|
}) {
|
|
3936
|
-
const v = r ?? (o ? "table" : "text"), m = n ?? d ??
|
|
3959
|
+
const v = r ?? (o ? "table" : "text"), m = n ?? d ?? an[v], f = s ?? u ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(sn, { shape: v, rows: m, columns: f }) });
|
|
3937
3960
|
return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
|
|
3938
3961
|
}
|
|
3939
|
-
const
|
|
3962
|
+
const ln = {
|
|
3940
3963
|
neutral: "bg-surface-hover text-text-muted",
|
|
3941
3964
|
success: "bg-success-soft text-success-fg"
|
|
3942
3965
|
};
|
|
3943
|
-
function
|
|
3966
|
+
function ps({
|
|
3944
3967
|
icon: t,
|
|
3945
3968
|
tone: r = "neutral",
|
|
3946
3969
|
title: n,
|
|
@@ -3960,7 +3983,7 @@ function hs({
|
|
|
3960
3983
|
),
|
|
3961
3984
|
...u,
|
|
3962
3985
|
children: [
|
|
3963
|
-
t != null && /* @__PURE__ */ e("span", { className: i("flex size-disc items-center justify-center rounded-full text-2xl",
|
|
3986
|
+
t != null && /* @__PURE__ */ e("span", { className: i("flex size-disc items-center justify-center rounded-full text-2xl", ln[r]), children: t }),
|
|
3964
3987
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3965
3988
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3966
3989
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3968,7 +3991,7 @@ function hs({
|
|
|
3968
3991
|
}
|
|
3969
3992
|
);
|
|
3970
3993
|
}
|
|
3971
|
-
function
|
|
3994
|
+
function vs({ children: t, className: r, ...n }) {
|
|
3972
3995
|
return /* @__PURE__ */ e(
|
|
3973
3996
|
"kbd",
|
|
3974
3997
|
{
|
|
@@ -3981,14 +4004,14 @@ function xs({ children: t, className: r, ...n }) {
|
|
|
3981
4004
|
}
|
|
3982
4005
|
);
|
|
3983
4006
|
}
|
|
3984
|
-
const
|
|
4007
|
+
const on = {
|
|
3985
4008
|
sm: "h-1",
|
|
3986
4009
|
md: "h-1.5"
|
|
3987
|
-
},
|
|
4010
|
+
}, cn = {
|
|
3988
4011
|
accent: "bg-accent",
|
|
3989
4012
|
success: "bg-success"
|
|
3990
4013
|
};
|
|
3991
|
-
function
|
|
4014
|
+
function ys({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3992
4015
|
const l = Math.max(0, Math.min(100, t));
|
|
3993
4016
|
return /* @__PURE__ */ e(
|
|
3994
4017
|
"div",
|
|
@@ -3997,37 +4020,37 @@ function bs({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3997
4020
|
"aria-valuenow": Math.round(l),
|
|
3998
4021
|
"aria-valuemin": 0,
|
|
3999
4022
|
"aria-valuemax": 100,
|
|
4000
|
-
className: i("w-full overflow-hidden rounded-full bg-surface-hover",
|
|
4023
|
+
className: i("w-full overflow-hidden rounded-full bg-surface-hover", on[n], s),
|
|
4001
4024
|
...a,
|
|
4002
4025
|
children: /* @__PURE__ */ e(
|
|
4003
4026
|
"div",
|
|
4004
4027
|
{
|
|
4005
|
-
className: i("h-full rounded-full transition-[width] duration-300 ease-out",
|
|
4028
|
+
className: i("h-full rounded-full transition-[width] duration-300 ease-out", cn[r]),
|
|
4006
4029
|
style: { width: `${l}%` }
|
|
4007
4030
|
}
|
|
4008
4031
|
)
|
|
4009
4032
|
}
|
|
4010
4033
|
);
|
|
4011
4034
|
}
|
|
4012
|
-
const
|
|
4035
|
+
const dn = {
|
|
4013
4036
|
xs: "h-3 w-3",
|
|
4014
4037
|
sm: "h-4 w-4",
|
|
4015
4038
|
md: "h-6 w-6",
|
|
4016
4039
|
lg: "h-8 w-8",
|
|
4017
4040
|
xl: "h-12 w-12"
|
|
4018
|
-
},
|
|
4041
|
+
}, un = {
|
|
4019
4042
|
primary: "text-accent",
|
|
4020
4043
|
secondary: "text-text-muted",
|
|
4021
4044
|
white: "text-white",
|
|
4022
4045
|
current: "text-current"
|
|
4023
|
-
},
|
|
4046
|
+
}, mn = {
|
|
4024
4047
|
xs: "text-xs",
|
|
4025
4048
|
sm: "text-sm",
|
|
4026
4049
|
md: "text-sm",
|
|
4027
4050
|
lg: "text-base",
|
|
4028
4051
|
xl: "text-lg"
|
|
4029
4052
|
};
|
|
4030
|
-
function
|
|
4053
|
+
function Ns({
|
|
4031
4054
|
size: t = "md",
|
|
4032
4055
|
variant: r = "primary",
|
|
4033
4056
|
label: n = "Loading...",
|
|
@@ -4050,8 +4073,8 @@ function gs({
|
|
|
4050
4073
|
{
|
|
4051
4074
|
className: i(
|
|
4052
4075
|
"animate-spin",
|
|
4053
|
-
|
|
4054
|
-
|
|
4076
|
+
dn[t],
|
|
4077
|
+
un[r]
|
|
4055
4078
|
),
|
|
4056
4079
|
fill: "none",
|
|
4057
4080
|
viewBox: "0 0 24 24",
|
|
@@ -4085,7 +4108,7 @@ function gs({
|
|
|
4085
4108
|
{
|
|
4086
4109
|
className: i(
|
|
4087
4110
|
"text-text-muted",
|
|
4088
|
-
|
|
4111
|
+
mn[t]
|
|
4089
4112
|
),
|
|
4090
4113
|
children: n
|
|
4091
4114
|
}
|
|
@@ -4095,7 +4118,7 @@ function gs({
|
|
|
4095
4118
|
}
|
|
4096
4119
|
);
|
|
4097
4120
|
}
|
|
4098
|
-
const
|
|
4121
|
+
const fn = {
|
|
4099
4122
|
neutral: "bg-text-disabled",
|
|
4100
4123
|
accent: "bg-accent",
|
|
4101
4124
|
success: "bg-success",
|
|
@@ -4109,7 +4132,7 @@ const cn = {
|
|
|
4109
4132
|
"cat-4": "bg-cat-4",
|
|
4110
4133
|
"cat-5": "bg-cat-5"
|
|
4111
4134
|
};
|
|
4112
|
-
function
|
|
4135
|
+
function ws({
|
|
4113
4136
|
tone: t = "neutral",
|
|
4114
4137
|
shape: r = "round",
|
|
4115
4138
|
pulse: n = !1,
|
|
@@ -4125,14 +4148,14 @@ function ps({
|
|
|
4125
4148
|
className: i(
|
|
4126
4149
|
"inline-block size-dot shrink-0",
|
|
4127
4150
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
4128
|
-
|
|
4151
|
+
fn[t],
|
|
4129
4152
|
n && "animate-pulse",
|
|
4130
4153
|
a
|
|
4131
4154
|
)
|
|
4132
4155
|
}
|
|
4133
4156
|
);
|
|
4134
4157
|
}
|
|
4135
|
-
function
|
|
4158
|
+
function ks({
|
|
4136
4159
|
steps: t,
|
|
4137
4160
|
current: r,
|
|
4138
4161
|
variant: n = "numbered",
|
|
@@ -4168,7 +4191,7 @@ function vs({
|
|
|
4168
4191
|
d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
4169
4192
|
] }, u)) });
|
|
4170
4193
|
}
|
|
4171
|
-
const
|
|
4194
|
+
const hn = /<[a-z][\s\S]*>/i, xn = [
|
|
4172
4195
|
"[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
|
|
4173
4196
|
"[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
|
|
4174
4197
|
"[&_strong]:font-semibold [&_em]:italic",
|
|
@@ -4183,7 +4206,7 @@ const dn = /<[a-z][\s\S]*>/i, un = [
|
|
|
4183
4206
|
"[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
|
|
4184
4207
|
"[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
|
|
4185
4208
|
"[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
|
|
4186
|
-
].join(" "),
|
|
4209
|
+
].join(" "), bn = {
|
|
4187
4210
|
p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
|
|
4188
4211
|
a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
|
|
4189
4212
|
strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
|
|
@@ -4208,31 +4231,31 @@ const dn = /<[a-z][\s\S]*>/i, un = [
|
|
|
4208
4231
|
};
|
|
4209
4232
|
function Te({ text: t, className: r, as: n }) {
|
|
4210
4233
|
const s = t ?? "";
|
|
4211
|
-
return (n ? n === "html" :
|
|
4234
|
+
return (n ? n === "html" : hn.test(s)) ? /* @__PURE__ */ e(
|
|
4212
4235
|
"div",
|
|
4213
4236
|
{
|
|
4214
|
-
className: i("break-words",
|
|
4237
|
+
className: i("break-words", xn, r),
|
|
4215
4238
|
dangerouslySetInnerHTML: { __html: Ht.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
|
|
4216
4239
|
}
|
|
4217
|
-
) : /* @__PURE__ */ e("div", { className: i("break-words", r), children: /* @__PURE__ */ e(
|
|
4240
|
+
) : /* @__PURE__ */ e("div", { className: i("break-words", r), children: /* @__PURE__ */ e(qt, { remarkPlugins: [Vt], components: bn, children: s }) });
|
|
4218
4241
|
}
|
|
4219
|
-
const
|
|
4242
|
+
const gn = {
|
|
4220
4243
|
info: "text-info-fg",
|
|
4221
4244
|
success: "text-success-fg",
|
|
4222
4245
|
warning: "text-warning-fg",
|
|
4223
4246
|
destructive: "text-danger-fg"
|
|
4224
|
-
},
|
|
4247
|
+
}, pn = {
|
|
4225
4248
|
info: "bg-info-soft border-info-border",
|
|
4226
4249
|
success: "bg-success-soft border-success-border",
|
|
4227
4250
|
warning: "bg-warning-soft border-warning-border",
|
|
4228
4251
|
destructive: "bg-danger-soft border-danger-border"
|
|
4229
|
-
},
|
|
4252
|
+
}, vn = {
|
|
4230
4253
|
1: "grid-cols-1",
|
|
4231
4254
|
2: "grid-cols-2",
|
|
4232
4255
|
3: "grid-cols-3",
|
|
4233
4256
|
4: "grid-cols-4"
|
|
4234
4257
|
};
|
|
4235
|
-
function
|
|
4258
|
+
function yn({ block: t }) {
|
|
4236
4259
|
switch (t.type) {
|
|
4237
4260
|
case "heading":
|
|
4238
4261
|
return t.level === 1 ? /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold tracking-tight text-text", children: t.text }) : t.level === 2 ? /* @__PURE__ */ e("h2", { className: "pt-2 text-base font-semibold tracking-tight text-text", children: t.text }) : /* @__PURE__ */ e("h3", { className: "pt-1 text-sm font-semibold text-text", children: t.text });
|
|
@@ -4292,13 +4315,13 @@ function bn({ block: t }) {
|
|
|
4292
4315
|
t.caption && /* @__PURE__ */ e("figcaption", { className: "pt-2 text-xs italic text-text-subtle", children: t.caption })
|
|
4293
4316
|
] });
|
|
4294
4317
|
case "kpi":
|
|
4295
|
-
return /* @__PURE__ */ e("div", { className: i("grid gap-3",
|
|
4318
|
+
return /* @__PURE__ */ e("div", { className: i("grid gap-3", vn[t.items.length] ?? "grid-cols-4"), children: t.items.map((r, n) => /* @__PURE__ */ c("div", { className: "rounded-lg bg-surface-sunk px-4 py-3.5", children: [
|
|
4296
4319
|
/* @__PURE__ */ e(
|
|
4297
4320
|
"div",
|
|
4298
4321
|
{
|
|
4299
4322
|
className: i(
|
|
4300
4323
|
"text-2xl font-semibold tracking-tight",
|
|
4301
|
-
r.tone ?
|
|
4324
|
+
r.tone ? gn[r.tone] : "text-text"
|
|
4302
4325
|
),
|
|
4303
4326
|
children: r.value
|
|
4304
4327
|
}
|
|
@@ -4306,7 +4329,7 @@ function bn({ block: t }) {
|
|
|
4306
4329
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r.label })
|
|
4307
4330
|
] }, n)) });
|
|
4308
4331
|
case "callout":
|
|
4309
|
-
return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3",
|
|
4332
|
+
return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3", pn[t.tone]), children: [
|
|
4310
4333
|
t.title && /* @__PURE__ */ e("div", { className: "pb-0.5 text-sm font-semibold text-text", children: t.title }),
|
|
4311
4334
|
/* @__PURE__ */ e(Te, { as: "markdown", text: t.text, className: "text-sm text-text" })
|
|
4312
4335
|
] });
|
|
@@ -4314,7 +4337,7 @@ function bn({ block: t }) {
|
|
|
4314
4337
|
return null;
|
|
4315
4338
|
}
|
|
4316
4339
|
}
|
|
4317
|
-
function
|
|
4340
|
+
function Cs({ blocks: t, runtime: r = "inert", className: n }) {
|
|
4318
4341
|
return r !== "inert" ? /* @__PURE__ */ c("div", { className: i("rounded-lg border border-warning-border bg-warning-soft px-4 py-3", n), children: [
|
|
4319
4342
|
/* @__PURE__ */ e("div", { className: "text-sm font-semibold text-text", children: "Deze versie kan hier niet getoond worden" }),
|
|
4320
4343
|
/* @__PURE__ */ c("div", { className: "pt-0.5 text-xs text-text-muted", children: [
|
|
@@ -4322,9 +4345,9 @@ function ys({ blocks: t, runtime: r = "inert", className: n }) {
|
|
|
4322
4345
|
/* @__PURE__ */ e("code", { className: "font-mono", children: r }),
|
|
4323
4346
|
", en deze weergave tekent alleen inerte inhoud."
|
|
4324
4347
|
] })
|
|
4325
|
-
] }) : /* @__PURE__ */ e("article", { className: i("flex flex-col gap-4", n), children: t.map((s, a) => /* @__PURE__ */ e(
|
|
4348
|
+
] }) : /* @__PURE__ */ e("article", { className: i("flex flex-col gap-4", n), children: t.map((s, a) => /* @__PURE__ */ e(yn, { block: s }, s.block_id ?? a)) });
|
|
4326
4349
|
}
|
|
4327
|
-
function
|
|
4350
|
+
function Ss({ title: t, icon: r = /* @__PURE__ */ e(jt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
|
|
4328
4351
|
return /* @__PURE__ */ c(
|
|
4329
4352
|
"div",
|
|
4330
4353
|
{
|
|
@@ -4345,32 +4368,32 @@ function Ns({ title: t, icon: r = /* @__PURE__ */ e(jt, { className: "size-icon-
|
|
|
4345
4368
|
}
|
|
4346
4369
|
);
|
|
4347
4370
|
}
|
|
4348
|
-
const
|
|
4371
|
+
const Nn = {
|
|
4349
4372
|
default: "bg-avatar text-avatar-fg",
|
|
4350
4373
|
in: "bg-avatar-in text-avatar-in-fg",
|
|
4351
4374
|
out: "bg-accent text-accent-fg",
|
|
4352
4375
|
note: "bg-avatar-note text-avatar-note-fg"
|
|
4353
|
-
},
|
|
4376
|
+
}, wn = {
|
|
4354
4377
|
xs: "w-5 h-5 text-xs",
|
|
4355
4378
|
sm: "w-6 h-6 text-xs",
|
|
4356
4379
|
md: "w-7 h-7 text-base",
|
|
4357
4380
|
lg: "w-9 h-9 text-sm"
|
|
4358
4381
|
};
|
|
4359
|
-
function
|
|
4382
|
+
function kn(t) {
|
|
4360
4383
|
if (!t) return "?";
|
|
4361
4384
|
const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
4362
4385
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
4363
4386
|
}
|
|
4364
|
-
const
|
|
4365
|
-
const [o, u] =
|
|
4387
|
+
const Cn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
|
|
4388
|
+
const [o, u] = oe.useState(!1), d = i(
|
|
4366
4389
|
// Its own token and not `surface-hover`: at 0.972 the plate was within a few
|
|
4367
4390
|
// percent of every surface it sits on, so the monogram floated instead of
|
|
4368
4391
|
// sitting in a disc.
|
|
4369
4392
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
|
|
4370
4393
|
// `identity` is seeded on the name, so the same person keeps their colour
|
|
4371
4394
|
// wherever they appear; the fixed tones stay as they were.
|
|
4372
|
-
n === "identity" ? rt(t) :
|
|
4373
|
-
|
|
4395
|
+
n === "identity" ? rt(t) : Nn[n],
|
|
4396
|
+
wn[s],
|
|
4374
4397
|
a
|
|
4375
4398
|
);
|
|
4376
4399
|
return r && !o ? /* @__PURE__ */ e(
|
|
@@ -4382,13 +4405,13 @@ const yn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
|
|
|
4382
4405
|
className: i(d, "object-cover"),
|
|
4383
4406
|
onError: () => u(!0)
|
|
4384
4407
|
}
|
|
4385
|
-
) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children:
|
|
4386
|
-
}, Qe = "ring-surface",
|
|
4408
|
+
) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: kn(t) });
|
|
4409
|
+
}, Qe = "ring-surface", Sn = "ring-surface-accent", Es = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
4387
4410
|
if (t.length === 0) return null;
|
|
4388
4411
|
const a = t.slice(0, r), l = t.length - a.length;
|
|
4389
4412
|
return /* @__PURE__ */ c("span", { className: i("inline-flex items-center", s), children: [
|
|
4390
4413
|
a.map((o, u) => /* @__PURE__ */ e(
|
|
4391
|
-
|
|
4414
|
+
Cn,
|
|
4392
4415
|
{
|
|
4393
4416
|
name: o.name,
|
|
4394
4417
|
src: o.src,
|
|
@@ -4396,7 +4419,7 @@ const yn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
|
|
|
4396
4419
|
title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
|
|
4397
4420
|
className: i(
|
|
4398
4421
|
u > 0 && "-ml-2",
|
|
4399
|
-
o.owner ?
|
|
4422
|
+
o.owner ? Sn : Qe,
|
|
4400
4423
|
o.seen === !1 && "opacity-40"
|
|
4401
4424
|
)
|
|
4402
4425
|
},
|
|
@@ -4419,37 +4442,37 @@ const yn = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
|
|
|
4419
4442
|
}
|
|
4420
4443
|
)
|
|
4421
4444
|
] });
|
|
4422
|
-
},
|
|
4445
|
+
}, _e = {
|
|
4423
4446
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
4424
4447
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
4425
4448
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
4426
4449
|
tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
|
|
4427
4450
|
note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
|
|
4428
|
-
},
|
|
4451
|
+
}, En = {
|
|
4429
4452
|
sm: "size-avatar-xs rounded-sm text-xs",
|
|
4430
4453
|
md: "size-avatar-sm rounded-md text-xs",
|
|
4431
4454
|
lg: "size-avatar-lg rounded-md text-base"
|
|
4432
4455
|
};
|
|
4433
|
-
function
|
|
4434
|
-
const l = t in
|
|
4456
|
+
function zs({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
4457
|
+
const l = t in _e ? _e[t] : void 0;
|
|
4435
4458
|
return /* @__PURE__ */ e(
|
|
4436
4459
|
"span",
|
|
4437
4460
|
{
|
|
4438
4461
|
title: a,
|
|
4439
4462
|
className: i(
|
|
4440
4463
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
4441
|
-
|
|
4464
|
+
En[n],
|
|
4442
4465
|
// An undeclared channel used to collapse onto the neutral "note" tone,
|
|
4443
4466
|
// which is also what a real internal note looks like. Deriving from the
|
|
4444
4467
|
// key keeps it distinguishable and keeps `note` meaning `note`.
|
|
4445
|
-
l ? i(l.fg, l.bg) : t ? rt(t) : i(
|
|
4468
|
+
l ? i(l.fg, l.bg) : t ? rt(t) : i(_e.note.fg, _e.note.bg),
|
|
4446
4469
|
s
|
|
4447
4470
|
),
|
|
4448
4471
|
children: r
|
|
4449
4472
|
}
|
|
4450
4473
|
);
|
|
4451
4474
|
}
|
|
4452
|
-
const
|
|
4475
|
+
const Ms = ({
|
|
4453
4476
|
src: t,
|
|
4454
4477
|
alt: r,
|
|
4455
4478
|
size: n = "md",
|
|
@@ -4465,14 +4488,14 @@ const Cs = ({
|
|
|
4465
4488
|
onError: b,
|
|
4466
4489
|
...g
|
|
4467
4490
|
}) => {
|
|
4468
|
-
const [N, p] =
|
|
4469
|
-
p(!1), C(!1), f?.(
|
|
4470
|
-
}, K = (
|
|
4491
|
+
const [N, p] = B(!0), [x, C] = B(!1), [S, I] = B(t), A = (X) => {
|
|
4492
|
+
p(!1), C(!1), f?.(X);
|
|
4493
|
+
}, K = (X) => {
|
|
4471
4494
|
if (p(!1), C(!0), u && S !== u) {
|
|
4472
4495
|
I(u), C(!1), p(!0);
|
|
4473
4496
|
return;
|
|
4474
4497
|
}
|
|
4475
|
-
b?.(
|
|
4498
|
+
b?.(X);
|
|
4476
4499
|
}, W = i(
|
|
4477
4500
|
"relative overflow-hidden bg-surface-hover",
|
|
4478
4501
|
// Size variants
|
|
@@ -4507,11 +4530,11 @@ const Cs = ({
|
|
|
4507
4530
|
"opacity-0": N || x,
|
|
4508
4531
|
"opacity-100": !N && !x
|
|
4509
4532
|
}
|
|
4510
|
-
),
|
|
4533
|
+
), V = i(
|
|
4511
4534
|
"absolute inset-0 flex items-center justify-center",
|
|
4512
4535
|
"text-text-muted"
|
|
4513
|
-
), ne = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }),
|
|
4514
|
-
/* @__PURE__ */ e(
|
|
4536
|
+
), ne = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
4537
|
+
/* @__PURE__ */ e(Q, { icon: Ft, size: "lg", className: "mx-auto mb-1" }),
|
|
4515
4538
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
4516
4539
|
] });
|
|
4517
4540
|
return /* @__PURE__ */ c("div", { className: W, children: [
|
|
@@ -4526,11 +4549,11 @@ const Cs = ({
|
|
|
4526
4549
|
onError: K
|
|
4527
4550
|
}
|
|
4528
4551
|
),
|
|
4529
|
-
N && l && /* @__PURE__ */ e("div", { className:
|
|
4530
|
-
x && o && /* @__PURE__ */ e("div", { className:
|
|
4552
|
+
N && l && /* @__PURE__ */ e("div", { className: V, children: d || ne }),
|
|
4553
|
+
x && o && /* @__PURE__ */ e("div", { className: V, children: v || Y })
|
|
4531
4554
|
] });
|
|
4532
4555
|
};
|
|
4533
|
-
function
|
|
4556
|
+
function Ts({
|
|
4534
4557
|
icon: t,
|
|
4535
4558
|
onClick: r,
|
|
4536
4559
|
children: n
|
|
@@ -4553,7 +4576,7 @@ function Ss({
|
|
|
4553
4576
|
}
|
|
4554
4577
|
);
|
|
4555
4578
|
}
|
|
4556
|
-
function
|
|
4579
|
+
function _s({
|
|
4557
4580
|
items: t,
|
|
4558
4581
|
getRowKey: r,
|
|
4559
4582
|
variant: n = "divided",
|
|
@@ -4578,30 +4601,30 @@ function Es({
|
|
|
4578
4601
|
header: K,
|
|
4579
4602
|
stickyHeader: W = !1,
|
|
4580
4603
|
bordered: D = !1,
|
|
4581
|
-
emptyContent:
|
|
4604
|
+
emptyContent: V,
|
|
4582
4605
|
loading: ne = !1,
|
|
4583
|
-
loadingRows:
|
|
4584
|
-
className:
|
|
4606
|
+
loadingRows: Y = 4,
|
|
4607
|
+
className: X,
|
|
4585
4608
|
"aria-label": de
|
|
4586
4609
|
}) {
|
|
4587
|
-
const [w, h] =
|
|
4610
|
+
const [w, h] = oe.useState(
|
|
4588
4611
|
() => Object.fromEntries(
|
|
4589
4612
|
(b ?? []).filter((E) => E.defaultCollapsed).map((E) => [E.id, !0])
|
|
4590
4613
|
)
|
|
4591
|
-
), z =
|
|
4614
|
+
), z = oe.useRef(null), k = (E) => {
|
|
4592
4615
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(E.key)) return;
|
|
4593
4616
|
const j = Array.from(
|
|
4594
4617
|
z.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
4595
4618
|
);
|
|
4596
4619
|
if (j.length === 0) return;
|
|
4597
4620
|
E.preventDefault();
|
|
4598
|
-
const q = j.indexOf(document.activeElement),
|
|
4599
|
-
j[
|
|
4600
|
-
},
|
|
4621
|
+
const q = j.indexOf(document.activeElement), T = E.key === "Home" ? 0 : E.key === "End" ? j.length - 1 : E.key === "ArrowDown" ? (q + 1) % j.length : (q - 1 + j.length) % j.length;
|
|
4622
|
+
j[T]?.focus();
|
|
4623
|
+
}, $ = (E, P) => r ? r(E, P) : P, y = (E) => S.includes(E), H = (E, P) => {
|
|
4601
4624
|
I && I(
|
|
4602
4625
|
P ? [...S, E] : S.filter((j) => j !== E)
|
|
4603
4626
|
);
|
|
4604
|
-
}, ae = (E) => I?.(E ? [...t] : []),
|
|
4627
|
+
}, ae = (E) => I?.(E ? [...t] : []), ce = i(
|
|
4605
4628
|
"flex flex-col",
|
|
4606
4629
|
// With a selection open the list has a dock at its foot. Sticky can only
|
|
4607
4630
|
// park at the bottom of its own box, so on a list shorter than the window
|
|
@@ -4611,10 +4634,10 @@ function Es({
|
|
|
4611
4634
|
// keeps its natural height.
|
|
4612
4635
|
C && S.length > 0 && "min-h-full",
|
|
4613
4636
|
D && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4614
|
-
|
|
4637
|
+
X
|
|
4615
4638
|
);
|
|
4616
4639
|
if (ne)
|
|
4617
|
-
return /* @__PURE__ */ e("div", { className:
|
|
4640
|
+
return /* @__PURE__ */ e("div", { className: ce, children: Array.from({ length: Y }).map((E, P) => /* @__PURE__ */ c(
|
|
4618
4641
|
"div",
|
|
4619
4642
|
{
|
|
4620
4643
|
className: i(
|
|
@@ -4630,10 +4653,10 @@ function Es({
|
|
|
4630
4653
|
},
|
|
4631
4654
|
`skeleton-${P}`
|
|
4632
4655
|
)) });
|
|
4633
|
-
if (t.length === 0 &&
|
|
4634
|
-
return /* @__PURE__ */ e("div", { className:
|
|
4656
|
+
if (t.length === 0 && V)
|
|
4657
|
+
return /* @__PURE__ */ e("div", { className: ce, children: V });
|
|
4635
4658
|
const G = t.length > 0 && S.length === t.length, O = S.length > 0 && !G, F = (E, P, j) => {
|
|
4636
|
-
const q = d?.(E, P) ?? !1,
|
|
4659
|
+
const q = d?.(E, P) ?? !1, T = v?.(E, P) ?? !1, L = m?.(E, P) ?? !1, ee = C && y(E);
|
|
4637
4660
|
return /* @__PURE__ */ c(
|
|
4638
4661
|
"li",
|
|
4639
4662
|
{
|
|
@@ -4644,8 +4667,8 @@ function Es({
|
|
|
4644
4667
|
"aria-current": q || void 0,
|
|
4645
4668
|
onClick: () => o(E, P),
|
|
4646
4669
|
onFocus: () => u?.(P),
|
|
4647
|
-
onKeyDown: (
|
|
4648
|
-
|
|
4670
|
+
onKeyDown: (le) => {
|
|
4671
|
+
le.key !== "Enter" && le.key !== " " || (le.preventDefault(), o(E, P));
|
|
4649
4672
|
}
|
|
4650
4673
|
} : {},
|
|
4651
4674
|
className: i(
|
|
@@ -4657,18 +4680,18 @@ function Es({
|
|
|
4657
4680
|
// An unread row is tinted, not bolded: at five columns a bold row
|
|
4658
4681
|
// shouts across all of them, while the tint marks the row and leaves
|
|
4659
4682
|
// the consumer free to weight only the sender and the subject.
|
|
4660
|
-
q ||
|
|
4683
|
+
q || ee ? "bg-accent-soft text-text" : T ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
|
|
4661
4684
|
// Read rows stay at full opacity — fading them also fades the avatars
|
|
4662
4685
|
// and team dots, which is exactly the identity you scan by. They read
|
|
4663
4686
|
// as secondary through weight and text colour instead.
|
|
4664
4687
|
L && "text-text-muted"
|
|
4665
4688
|
),
|
|
4666
4689
|
children: [
|
|
4667
|
-
C && /* @__PURE__ */ e("span", { onClick: (
|
|
4690
|
+
C && /* @__PURE__ */ e("span", { onClick: (le) => le.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4668
4691
|
we,
|
|
4669
4692
|
{
|
|
4670
4693
|
checked: y(E),
|
|
4671
|
-
onChange: (
|
|
4694
|
+
onChange: (le) => H(E, le.target.checked),
|
|
4672
4695
|
"aria-label": "Rij selecteren"
|
|
4673
4696
|
}
|
|
4674
4697
|
) }),
|
|
@@ -4684,22 +4707,22 @@ function Es({
|
|
|
4684
4707
|
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(E, P) })
|
|
4685
4708
|
]
|
|
4686
4709
|
},
|
|
4687
|
-
|
|
4710
|
+
$(E, P)
|
|
4688
4711
|
);
|
|
4689
|
-
},
|
|
4712
|
+
}, M = (() => {
|
|
4690
4713
|
if (!f)
|
|
4691
|
-
return t.map((q,
|
|
4714
|
+
return t.map((q, T) => F(q, T, T === 0));
|
|
4692
4715
|
const E = /* @__PURE__ */ new Map();
|
|
4693
|
-
t.forEach((q,
|
|
4694
|
-
const L = f(q,
|
|
4695
|
-
E.has(L) || E.set(L, []), E.get(L).push({ item: q, index:
|
|
4716
|
+
t.forEach((q, T) => {
|
|
4717
|
+
const L = f(q, T);
|
|
4718
|
+
E.has(L) || E.set(L, []), E.get(L).push({ item: q, index: T });
|
|
4696
4719
|
});
|
|
4697
4720
|
const P = b ?? [];
|
|
4698
4721
|
return [
|
|
4699
4722
|
...P.filter((q) => E.has(q.id)),
|
|
4700
|
-
...[...E.keys()].filter((q) => !P.some((
|
|
4701
|
-
].flatMap((q,
|
|
4702
|
-
const L = E.get(q.id) ?? [],
|
|
4723
|
+
...[...E.keys()].filter((q) => !P.some((T) => T.id === q)).map((q) => ({ id: q }))
|
|
4724
|
+
].flatMap((q, T) => {
|
|
4725
|
+
const L = E.get(q.id) ?? [], ee = p && w[q.id], le = q.title ?? q.id, be = q.count ?? L.length, ye = /* @__PURE__ */ e(
|
|
4703
4726
|
"li",
|
|
4704
4727
|
{
|
|
4705
4728
|
onClick: p ? () => h((fe) => ({ ...fe, [q.id]: !fe[q.id] })) : void 0,
|
|
@@ -4708,12 +4731,12 @@ function Es({
|
|
|
4708
4731
|
// surface as the rows, no rules, and the count as a quiet pill.
|
|
4709
4732
|
// The old grey uppercase strip read as a second column header.
|
|
4710
4733
|
"flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
|
|
4711
|
-
|
|
4734
|
+
T > 0 ? "pt-5" : "pt-3",
|
|
4712
4735
|
q.tone === "danger" ? "text-danger-fg" : q.tone === "muted" ? "text-text-subtle" : "text-text",
|
|
4713
4736
|
N && "sticky z-10",
|
|
4714
4737
|
p && "cursor-pointer select-none"
|
|
4715
4738
|
),
|
|
4716
|
-
"aria-expanded": p ? !
|
|
4739
|
+
"aria-expanded": p ? !ee : void 0,
|
|
4717
4740
|
style: N ? { top: W ? 28 : 0 } : void 0,
|
|
4718
4741
|
children: g ? g(q, L.map((fe) => fe.item)) : /* @__PURE__ */ c(Ee, { children: [
|
|
4719
4742
|
p && /* @__PURE__ */ e(
|
|
@@ -4722,11 +4745,11 @@ function Es({
|
|
|
4722
4745
|
"aria-hidden": !0,
|
|
4723
4746
|
className: i(
|
|
4724
4747
|
"size-icon-md shrink-0 text-text-subtle transition-transform duration-fast ease-out",
|
|
4725
|
-
!
|
|
4748
|
+
!ee && "rotate-90"
|
|
4726
4749
|
)
|
|
4727
4750
|
}
|
|
4728
4751
|
),
|
|
4729
|
-
/* @__PURE__ */ e("span", { children:
|
|
4752
|
+
/* @__PURE__ */ e("span", { children: le }),
|
|
4730
4753
|
!x && /* @__PURE__ */ e(
|
|
4731
4754
|
"span",
|
|
4732
4755
|
{
|
|
@@ -4741,7 +4764,7 @@ function Es({
|
|
|
4741
4764
|
},
|
|
4742
4765
|
`group-${q.id}`
|
|
4743
4766
|
);
|
|
4744
|
-
return
|
|
4767
|
+
return ee ? [ye] : [
|
|
4745
4768
|
ye,
|
|
4746
4769
|
...L.map(
|
|
4747
4770
|
({ item: fe, index: he }, Oe) => F(fe, he, Oe === 0)
|
|
@@ -4749,7 +4772,7 @@ function Es({
|
|
|
4749
4772
|
];
|
|
4750
4773
|
});
|
|
4751
4774
|
})();
|
|
4752
|
-
return /* @__PURE__ */ c("div", { ref: z, className:
|
|
4775
|
+
return /* @__PURE__ */ c("div", { ref: z, className: ce, onKeyDown: o ? k : void 0, children: [
|
|
4753
4776
|
K && /* @__PURE__ */ c(
|
|
4754
4777
|
"div",
|
|
4755
4778
|
{
|
|
@@ -4774,7 +4797,7 @@ function Es({
|
|
|
4774
4797
|
]
|
|
4775
4798
|
}
|
|
4776
4799
|
),
|
|
4777
|
-
/* @__PURE__ */ e("ul", { "aria-label": de, className: "flex flex-col", children:
|
|
4800
|
+
/* @__PURE__ */ e("ul", { "aria-label": de, className: "flex flex-col", children: M }),
|
|
4778
4801
|
C && S.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
|
|
4779
4802
|
/* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
|
|
4780
4803
|
S.length,
|
|
@@ -4796,7 +4819,7 @@ function Es({
|
|
|
4796
4819
|
] }) })
|
|
4797
4820
|
] });
|
|
4798
4821
|
}
|
|
4799
|
-
function
|
|
4822
|
+
function $s({
|
|
4800
4823
|
side: t,
|
|
4801
4824
|
continued: r = !1,
|
|
4802
4825
|
tone: n = "default",
|
|
@@ -4833,18 +4856,18 @@ function zs({
|
|
|
4833
4856
|
}
|
|
4834
4857
|
);
|
|
4835
4858
|
}
|
|
4836
|
-
const
|
|
4859
|
+
const zn = {
|
|
4837
4860
|
default: "text-text",
|
|
4838
4861
|
urgent: "text-danger-fg",
|
|
4839
4862
|
success: "text-success-fg"
|
|
4840
4863
|
};
|
|
4841
|
-
function
|
|
4864
|
+
function As({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4842
4865
|
return /* @__PURE__ */ c("div", { className: i("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
|
|
4843
|
-
/* @__PURE__ */ e("div", { className: i("text-2xl font-semibold",
|
|
4866
|
+
/* @__PURE__ */ e("div", { className: i("text-2xl font-semibold", zn[n]), children: t }),
|
|
4844
4867
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4845
4868
|
] });
|
|
4846
4869
|
}
|
|
4847
|
-
function
|
|
4870
|
+
function Ds({ icon: t, label: r, unset: n, className: s }) {
|
|
4848
4871
|
return /* @__PURE__ */ c(
|
|
4849
4872
|
"span",
|
|
4850
4873
|
{
|
|
@@ -4860,10 +4883,10 @@ function Ts({ icon: t, label: r, unset: n, className: s }) {
|
|
|
4860
4883
|
}
|
|
4861
4884
|
);
|
|
4862
4885
|
}
|
|
4863
|
-
function
|
|
4886
|
+
function Ls() {
|
|
4864
4887
|
return /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 text-text-disabled", children: "·" });
|
|
4865
4888
|
}
|
|
4866
|
-
const
|
|
4889
|
+
const Mn = ({
|
|
4867
4890
|
surface: t = !1,
|
|
4868
4891
|
title: r,
|
|
4869
4892
|
subtitle: n,
|
|
@@ -4877,10 +4900,10 @@ const Cn = ({
|
|
|
4877
4900
|
editable: m = !1,
|
|
4878
4901
|
onTitleChange: f
|
|
4879
4902
|
}) => {
|
|
4880
|
-
const [b, g] =
|
|
4881
|
-
|
|
4903
|
+
const [b, g] = B(!1), [N, p] = B(r), x = re(null);
|
|
4904
|
+
J(() => {
|
|
4882
4905
|
p(r);
|
|
4883
|
-
}, [r]),
|
|
4906
|
+
}, [r]), J(() => {
|
|
4884
4907
|
b && x.current && (x.current.focus(), x.current.select());
|
|
4885
4908
|
}, [b]);
|
|
4886
4909
|
const C = () => {
|
|
@@ -4907,7 +4930,7 @@ const Cn = ({
|
|
|
4907
4930
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-4 text-text", children: [
|
|
4908
4931
|
v && // Ghost: a framed box around a back chevron makes the way out of a
|
|
4909
4932
|
// page look like the page's primary control.
|
|
4910
|
-
/* @__PURE__ */ e(se, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(
|
|
4933
|
+
/* @__PURE__ */ e(se, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "md" }), iconOnly: !0 }),
|
|
4911
4934
|
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
|
|
4912
4935
|
b ? /* @__PURE__ */ e(
|
|
4913
4936
|
"input",
|
|
@@ -4960,7 +4983,7 @@ const Cn = ({
|
|
|
4960
4983
|
] })
|
|
4961
4984
|
] }) }),
|
|
4962
4985
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4963
|
-
(A) => A.render ? /* @__PURE__ */ e(
|
|
4986
|
+
(A) => A.render ? /* @__PURE__ */ e(oe.Fragment, { children: A.render() }, A.id) : A.splitOptions && A.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4964
4987
|
st,
|
|
4965
4988
|
{
|
|
4966
4989
|
label: A.label,
|
|
@@ -4990,11 +5013,11 @@ const Cn = ({
|
|
|
4990
5013
|
]
|
|
4991
5014
|
}
|
|
4992
5015
|
);
|
|
4993
|
-
},
|
|
5016
|
+
}, Tn = {
|
|
4994
5017
|
none: "",
|
|
4995
5018
|
sm: "px-3 pb-3 pt-1",
|
|
4996
5019
|
md: "px-5 pb-5 pt-1.5"
|
|
4997
|
-
},
|
|
5020
|
+
}, Is = ({
|
|
4998
5021
|
title: t,
|
|
4999
5022
|
subtitle: r,
|
|
5000
5023
|
meta: n,
|
|
@@ -5013,7 +5036,7 @@ const Cn = ({
|
|
|
5013
5036
|
contentClassName: p,
|
|
5014
5037
|
children: x
|
|
5015
5038
|
}) => {
|
|
5016
|
-
const C = v ? /* @__PURE__ */ e(
|
|
5039
|
+
const C = v ? /* @__PURE__ */ e(qe, { variant: "inline", shape: m }) : f ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: f }) : x;
|
|
5017
5040
|
return /* @__PURE__ */ c(
|
|
5018
5041
|
"div",
|
|
5019
5042
|
{
|
|
@@ -5027,7 +5050,7 @@ const Cn = ({
|
|
|
5027
5050
|
),
|
|
5028
5051
|
children: [
|
|
5029
5052
|
/* @__PURE__ */ e(
|
|
5030
|
-
|
|
5053
|
+
Mn,
|
|
5031
5054
|
{
|
|
5032
5055
|
surface: u,
|
|
5033
5056
|
title: t,
|
|
@@ -5046,7 +5069,7 @@ const Cn = ({
|
|
|
5046
5069
|
{
|
|
5047
5070
|
className: i(
|
|
5048
5071
|
g && "min-h-0 flex-1 overflow-y-auto",
|
|
5049
|
-
|
|
5072
|
+
Tn[b],
|
|
5050
5073
|
p
|
|
5051
5074
|
),
|
|
5052
5075
|
children: C
|
|
@@ -5055,12 +5078,12 @@ const Cn = ({
|
|
|
5055
5078
|
]
|
|
5056
5079
|
}
|
|
5057
5080
|
);
|
|
5058
|
-
},
|
|
5081
|
+
}, Ps = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
|
|
5059
5082
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-2xs font-semibold uppercase tracking-label text-text-subtle", children: t }),
|
|
5060
5083
|
r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
|
|
5061
5084
|
n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
|
|
5062
5085
|
] });
|
|
5063
|
-
function
|
|
5086
|
+
function Os({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
5064
5087
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
5065
5088
|
return !t && !r ? /* @__PURE__ */ e("div", { className: i("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: i("flex items-center gap-3 py-2", s), children: [
|
|
5066
5089
|
n === "center" && a,
|
|
@@ -5069,12 +5092,12 @@ function Ds({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
5069
5092
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
5070
5093
|
] });
|
|
5071
5094
|
}
|
|
5072
|
-
const dt = et(null),
|
|
5073
|
-
function
|
|
5095
|
+
const dt = et(null), js = dt.Provider;
|
|
5096
|
+
function _n() {
|
|
5074
5097
|
return yt(dt);
|
|
5075
5098
|
}
|
|
5076
|
-
function
|
|
5077
|
-
const [t, r] =
|
|
5099
|
+
function Fs() {
|
|
5100
|
+
const [t, r] = B(null), n = pe(
|
|
5078
5101
|
() => ({
|
|
5079
5102
|
setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
|
|
5080
5103
|
}),
|
|
@@ -5082,13 +5105,13 @@ function Is() {
|
|
|
5082
5105
|
);
|
|
5083
5106
|
return { trail: t?.entry ?? null, api: n };
|
|
5084
5107
|
}
|
|
5085
|
-
const
|
|
5108
|
+
const $n = {
|
|
5086
5109
|
none: "",
|
|
5087
5110
|
sm: "px-3 py-3",
|
|
5088
5111
|
// Matches the frame header's own horizontal padding, so content lines up
|
|
5089
5112
|
// with the title above it.
|
|
5090
5113
|
md: "px-5 py-4"
|
|
5091
|
-
},
|
|
5114
|
+
}, Rs = ({
|
|
5092
5115
|
children: t,
|
|
5093
5116
|
actions: r = [],
|
|
5094
5117
|
secondaryActions: n = [],
|
|
@@ -5102,7 +5125,7 @@ const zn = {
|
|
|
5102
5125
|
className: m,
|
|
5103
5126
|
contentClassName: f
|
|
5104
5127
|
}) => {
|
|
5105
|
-
const b =
|
|
5128
|
+
const b = _n(), g = vt(), N = re(a);
|
|
5106
5129
|
N.current = a;
|
|
5107
5130
|
const p = !!a, x = re(r);
|
|
5108
5131
|
x.current = r;
|
|
@@ -5112,10 +5135,10 @@ const zn = {
|
|
|
5112
5135
|
[...n, ...r].map((D) => [D.id, D.label, D.variant, D.disabled])
|
|
5113
5136
|
) : "", K = pe(() => {
|
|
5114
5137
|
if (!I) return;
|
|
5115
|
-
const D = (
|
|
5138
|
+
const D = (V) => (ne, Y) => ({
|
|
5116
5139
|
...ne,
|
|
5117
5140
|
onClick: () => {
|
|
5118
|
-
(
|
|
5141
|
+
(V === "primary" ? x.current : C.current)[Y]?.onClick();
|
|
5119
5142
|
}
|
|
5120
5143
|
});
|
|
5121
5144
|
return {
|
|
@@ -5123,7 +5146,7 @@ const zn = {
|
|
|
5123
5146
|
secondaryActions: C.current.map(D("secondary"))
|
|
5124
5147
|
};
|
|
5125
5148
|
}, [I, A]);
|
|
5126
|
-
|
|
5149
|
+
J(() => {
|
|
5127
5150
|
if (b && !(!p && !o && !K))
|
|
5128
5151
|
return b.setTrail(g, {
|
|
5129
5152
|
title: o,
|
|
@@ -5148,7 +5171,7 @@ const zn = {
|
|
|
5148
5171
|
variant: "ghost",
|
|
5149
5172
|
onClick: () => N.current?.(),
|
|
5150
5173
|
"aria-label": l,
|
|
5151
|
-
leftIcon: /* @__PURE__ */ e(
|
|
5174
|
+
leftIcon: /* @__PURE__ */ e(Q, { icon: ze, size: "sm" }),
|
|
5152
5175
|
iconOnly: !0
|
|
5153
5176
|
}
|
|
5154
5177
|
),
|
|
@@ -5158,7 +5181,7 @@ const zn = {
|
|
|
5158
5181
|
r.length > 0 && /* @__PURE__ */ e(ke, { actions: r })
|
|
5159
5182
|
] })
|
|
5160
5183
|
] }),
|
|
5161
|
-
/* @__PURE__ */ e("div", { className: i("flex-1",
|
|
5184
|
+
/* @__PURE__ */ e("div", { className: i("flex-1", $n[v], f), children: u ? /* @__PURE__ */ e(qe, { variant: "inline", shape: d }) : t }),
|
|
5162
5185
|
W && /* @__PURE__ */ c("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
|
|
5163
5186
|
n.length > 0 && /* @__PURE__ */ e(ke, { actions: n, defaultVariant: "ghost" }),
|
|
5164
5187
|
r.length > 0 && /* @__PURE__ */ e(ke, { actions: r, className: "ml-auto" })
|
|
@@ -5166,7 +5189,7 @@ const zn = {
|
|
|
5166
5189
|
] })
|
|
5167
5190
|
);
|
|
5168
5191
|
};
|
|
5169
|
-
function
|
|
5192
|
+
function Bs({
|
|
5170
5193
|
label: t,
|
|
5171
5194
|
description: r,
|
|
5172
5195
|
control: n,
|
|
@@ -5193,7 +5216,7 @@ function Os({
|
|
|
5193
5216
|
}
|
|
5194
5217
|
);
|
|
5195
5218
|
}
|
|
5196
|
-
function
|
|
5219
|
+
function Hs({
|
|
5197
5220
|
icon: t,
|
|
5198
5221
|
title: r,
|
|
5199
5222
|
description: n,
|
|
@@ -5203,7 +5226,7 @@ function js({
|
|
|
5203
5226
|
}) {
|
|
5204
5227
|
return /* @__PURE__ */ c("section", { className: i("flex flex-col gap-2", l), children: [
|
|
5205
5228
|
/* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
5206
|
-
t && /* @__PURE__ */ e(
|
|
5229
|
+
t && /* @__PURE__ */ e(Q, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
|
|
5207
5230
|
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
|
|
5208
5231
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-text", children: r }),
|
|
5209
5232
|
n && /* @__PURE__ */ e("p", { className: "text-xs text-text-muted", children: n })
|
|
@@ -5213,7 +5236,7 @@ function js({
|
|
|
5213
5236
|
/* @__PURE__ */ e("div", { className: i("flex flex-col", t && "pl-6"), children: a })
|
|
5214
5237
|
] });
|
|
5215
5238
|
}
|
|
5216
|
-
function
|
|
5239
|
+
function qs({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
5217
5240
|
return /* @__PURE__ */ c(
|
|
5218
5241
|
"button",
|
|
5219
5242
|
{
|
|
@@ -5226,12 +5249,12 @@ function Fs({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
5226
5249
|
children: [
|
|
5227
5250
|
r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
|
|
5228
5251
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
|
|
5229
|
-
/* @__PURE__ */ e(
|
|
5252
|
+
/* @__PURE__ */ e(Q, { icon: Bt, size: "xs", className: "opacity-70" })
|
|
5230
5253
|
]
|
|
5231
5254
|
}
|
|
5232
5255
|
);
|
|
5233
5256
|
}
|
|
5234
|
-
function
|
|
5257
|
+
function An(t) {
|
|
5235
5258
|
const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: u, sortable: d, align: v } = t;
|
|
5236
5259
|
return {
|
|
5237
5260
|
id: r,
|
|
@@ -5239,14 +5262,14 @@ function Mn(t) {
|
|
|
5239
5262
|
accessor: (m) => a(s(m), m),
|
|
5240
5263
|
cell: (m, f) => {
|
|
5241
5264
|
const b = s(f);
|
|
5242
|
-
return o && !o(b, f) ? null : /* @__PURE__ */ e(
|
|
5265
|
+
return o && !o(b, f) ? null : /* @__PURE__ */ e(nn, { variant: l ? l(b, f) : "default", size: "sm", children: a(b, f) });
|
|
5243
5266
|
},
|
|
5244
5267
|
width: u,
|
|
5245
5268
|
sortable: d,
|
|
5246
5269
|
align: v
|
|
5247
5270
|
};
|
|
5248
5271
|
}
|
|
5249
|
-
function
|
|
5272
|
+
function Vs(t) {
|
|
5250
5273
|
const {
|
|
5251
5274
|
id: r,
|
|
5252
5275
|
header: n,
|
|
@@ -5258,7 +5281,7 @@ function Rs(t) {
|
|
|
5258
5281
|
width: d,
|
|
5259
5282
|
sortable: v
|
|
5260
5283
|
} = t;
|
|
5261
|
-
return
|
|
5284
|
+
return An({
|
|
5262
5285
|
id: r,
|
|
5263
5286
|
header: n,
|
|
5264
5287
|
accessor: (m) => !!s(m),
|
|
@@ -5268,7 +5291,7 @@ function Rs(t) {
|
|
|
5268
5291
|
sortable: v
|
|
5269
5292
|
});
|
|
5270
5293
|
}
|
|
5271
|
-
function
|
|
5294
|
+
function Us(t) {
|
|
5272
5295
|
const {
|
|
5273
5296
|
id: r,
|
|
5274
5297
|
header: n,
|
|
@@ -5292,13 +5315,13 @@ function Bs(t) {
|
|
|
5292
5315
|
sortable: v
|
|
5293
5316
|
};
|
|
5294
5317
|
}
|
|
5295
|
-
function
|
|
5318
|
+
function Dn(t, r) {
|
|
5296
5319
|
return r.split(".").reduce(
|
|
5297
5320
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
5298
5321
|
t
|
|
5299
5322
|
);
|
|
5300
5323
|
}
|
|
5301
|
-
const
|
|
5324
|
+
const Ws = ({
|
|
5302
5325
|
groups: t,
|
|
5303
5326
|
data: r,
|
|
5304
5327
|
size: n = "md",
|
|
@@ -5321,7 +5344,7 @@ const Hs = ({
|
|
|
5321
5344
|
return b ? b.label : String(m || "-");
|
|
5322
5345
|
}, u = xe(
|
|
5323
5346
|
(m) => {
|
|
5324
|
-
const f =
|
|
5347
|
+
const f = Dn(r, m.name);
|
|
5325
5348
|
if (m.type === "array") {
|
|
5326
5349
|
const g = f;
|
|
5327
5350
|
return !g || g.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -5547,7 +5570,7 @@ const Hs = ({
|
|
|
5547
5570
|
s
|
|
5548
5571
|
);
|
|
5549
5572
|
return /* @__PURE__ */ e("div", { className: v, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
|
|
5550
|
-
},
|
|
5573
|
+
}, Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
5551
5574
|
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
5552
5575
|
if (a)
|
|
5553
5576
|
return /* @__PURE__ */ c("li", { children: [
|
|
@@ -5649,7 +5672,7 @@ const Hs = ({
|
|
|
5649
5672
|
]
|
|
5650
5673
|
}
|
|
5651
5674
|
) });
|
|
5652
|
-
},
|
|
5675
|
+
}, Ks = ({
|
|
5653
5676
|
items: t,
|
|
5654
5677
|
isSelectedHandler: r,
|
|
5655
5678
|
onClick: n,
|
|
@@ -5657,7 +5680,7 @@ const Hs = ({
|
|
|
5657
5680
|
loading: a = !1
|
|
5658
5681
|
}) => a ? /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5659
5682
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5660
|
-
/* @__PURE__ */ e(
|
|
5683
|
+
/* @__PURE__ */ e(Ln, {})
|
|
5661
5684
|
] }) : /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5662
5685
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5663
5686
|
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
@@ -5671,7 +5694,7 @@ const Hs = ({
|
|
|
5671
5694
|
o
|
|
5672
5695
|
)
|
|
5673
5696
|
) })
|
|
5674
|
-
] }),
|
|
5697
|
+
] }), In = {
|
|
5675
5698
|
xs: "text-xs",
|
|
5676
5699
|
sm: "text-sm",
|
|
5677
5700
|
md: "text-base",
|
|
@@ -5680,13 +5703,13 @@ const Hs = ({
|
|
|
5680
5703
|
"2xl": "text-2xl",
|
|
5681
5704
|
"3xl": "text-3xl",
|
|
5682
5705
|
"4xl": "text-3xl"
|
|
5683
|
-
},
|
|
5706
|
+
}, Pn = {
|
|
5684
5707
|
light: "font-normal",
|
|
5685
5708
|
normal: "font-normal",
|
|
5686
5709
|
medium: "font-medium",
|
|
5687
5710
|
semibold: "font-semibold",
|
|
5688
5711
|
bold: "font-bold"
|
|
5689
|
-
},
|
|
5712
|
+
}, On = {
|
|
5690
5713
|
primary: "text-text",
|
|
5691
5714
|
secondary: "text-text-muted",
|
|
5692
5715
|
accent: "text-accent",
|
|
@@ -5696,11 +5719,11 @@ const Hs = ({
|
|
|
5696
5719
|
info: "text-info-fg",
|
|
5697
5720
|
neutral: "text-text",
|
|
5698
5721
|
current: "text-current"
|
|
5699
|
-
},
|
|
5722
|
+
}, jn = {
|
|
5700
5723
|
left: "text-left",
|
|
5701
5724
|
center: "text-center",
|
|
5702
5725
|
right: "text-right"
|
|
5703
|
-
},
|
|
5726
|
+
}, Gs = ({
|
|
5704
5727
|
level: t = 1,
|
|
5705
5728
|
size: r,
|
|
5706
5729
|
weight: n = "semibold",
|
|
@@ -5713,16 +5736,16 @@ const Hs = ({
|
|
|
5713
5736
|
}) => {
|
|
5714
5737
|
const v = `h${t}`, m = i(
|
|
5715
5738
|
"font-sans text-pretty",
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5739
|
+
In[r || Fn(t)],
|
|
5740
|
+
Pn[n],
|
|
5741
|
+
On[s],
|
|
5742
|
+
jn[a],
|
|
5720
5743
|
l && "truncate",
|
|
5721
5744
|
o
|
|
5722
5745
|
);
|
|
5723
5746
|
return /* @__PURE__ */ e(v, { className: m, ...d, children: u });
|
|
5724
5747
|
};
|
|
5725
|
-
function
|
|
5748
|
+
function Fn(t) {
|
|
5726
5749
|
return {
|
|
5727
5750
|
1: "2xl",
|
|
5728
5751
|
2: "xl",
|
|
@@ -5732,7 +5755,7 @@ function In(t) {
|
|
|
5732
5755
|
6: "md"
|
|
5733
5756
|
}[t] || "md";
|
|
5734
5757
|
}
|
|
5735
|
-
const
|
|
5758
|
+
const Js = ({
|
|
5736
5759
|
commands: t,
|
|
5737
5760
|
isOpen: r,
|
|
5738
5761
|
onClose: n,
|
|
@@ -5740,12 +5763,12 @@ const Us = ({
|
|
|
5740
5763
|
initialCommandPath: a,
|
|
5741
5764
|
initialActiveIndex: l
|
|
5742
5765
|
}) => {
|
|
5743
|
-
const [o, u] =
|
|
5766
|
+
const [o, u] = B(""), [d, v] = B(a || []), [m, f] = B(l || 0), b = re(null), g = re(null), p = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
|
|
5744
5767
|
(x) => x.label.toLowerCase().includes(o.toLowerCase())
|
|
5745
5768
|
);
|
|
5746
|
-
return
|
|
5769
|
+
return J(() => {
|
|
5747
5770
|
r || (u(""), v(a || []), f(l || 0));
|
|
5748
|
-
}, [r]),
|
|
5771
|
+
}, [r]), J(() => {
|
|
5749
5772
|
const x = (C) => {
|
|
5750
5773
|
if (r) {
|
|
5751
5774
|
if (C.key === "Escape")
|
|
@@ -5765,12 +5788,12 @@ const Us = ({
|
|
|
5765
5788
|
}
|
|
5766
5789
|
};
|
|
5767
5790
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
5768
|
-
}, [r, n, p, m, d]),
|
|
5791
|
+
}, [r, n, p, m, d]), J(() => {
|
|
5769
5792
|
const x = (C) => {
|
|
5770
5793
|
b.current && !b.current.contains(C.target) && n();
|
|
5771
5794
|
};
|
|
5772
5795
|
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
5773
|
-
}, [r, n]),
|
|
5796
|
+
}, [r, n]), J(() => {
|
|
5774
5797
|
if (!r) return;
|
|
5775
5798
|
g.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({ block: "nearest" });
|
|
5776
5799
|
}, [m, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
|
|
@@ -5837,7 +5860,7 @@ const Us = ({
|
|
|
5837
5860
|
]
|
|
5838
5861
|
}
|
|
5839
5862
|
) }) : null;
|
|
5840
|
-
},
|
|
5863
|
+
}, Rn = {
|
|
5841
5864
|
none: "p-0",
|
|
5842
5865
|
xs: "p-1",
|
|
5843
5866
|
sm: "p-2",
|
|
@@ -5845,7 +5868,7 @@ const Us = ({
|
|
|
5845
5868
|
lg: "p-6",
|
|
5846
5869
|
xl: "p-8",
|
|
5847
5870
|
"2xl": "p-12"
|
|
5848
|
-
},
|
|
5871
|
+
}, Bn = {
|
|
5849
5872
|
none: "m-0",
|
|
5850
5873
|
xs: "m-1",
|
|
5851
5874
|
sm: "m-2",
|
|
@@ -5853,7 +5876,7 @@ const Us = ({
|
|
|
5853
5876
|
lg: "m-6",
|
|
5854
5877
|
xl: "m-8",
|
|
5855
5878
|
"2xl": "m-12"
|
|
5856
|
-
},
|
|
5879
|
+
}, Hn = {
|
|
5857
5880
|
none: "",
|
|
5858
5881
|
primary: "bg-accent text-accent-fg",
|
|
5859
5882
|
secondary: "bg-surface-hover",
|
|
@@ -5869,26 +5892,26 @@ const Us = ({
|
|
|
5869
5892
|
backdrop: "bg-page",
|
|
5870
5893
|
editor: "bg-surface",
|
|
5871
5894
|
input: "bg-surface-input"
|
|
5872
|
-
},
|
|
5895
|
+
}, qn = {
|
|
5873
5896
|
none: "rounded-none",
|
|
5874
5897
|
sm: "rounded-sm",
|
|
5875
5898
|
md: "rounded-md",
|
|
5876
5899
|
lg: "rounded-lg",
|
|
5877
5900
|
xl: "rounded-xl",
|
|
5878
5901
|
full: "rounded-full"
|
|
5879
|
-
},
|
|
5902
|
+
}, Vn = {
|
|
5880
5903
|
none: "shadow-none",
|
|
5881
5904
|
sm: "shadow-none",
|
|
5882
5905
|
md: "shadow-overlay",
|
|
5883
5906
|
lg: "shadow-overlay",
|
|
5884
5907
|
xl: "shadow-modal",
|
|
5885
5908
|
"2xl": "shadow-modal"
|
|
5886
|
-
},
|
|
5909
|
+
}, Un = {
|
|
5887
5910
|
none: "border-0",
|
|
5888
5911
|
sm: "border",
|
|
5889
5912
|
md: "border-2",
|
|
5890
5913
|
lg: "border-4"
|
|
5891
|
-
},
|
|
5914
|
+
}, Wn = {
|
|
5892
5915
|
primary: "border-accent-border",
|
|
5893
5916
|
secondary: "border-border",
|
|
5894
5917
|
accent: "border-accent-border",
|
|
@@ -5915,13 +5938,13 @@ const Us = ({
|
|
|
5915
5938
|
{
|
|
5916
5939
|
ref: m,
|
|
5917
5940
|
className: i(
|
|
5918
|
-
t &&
|
|
5919
|
-
r &&
|
|
5920
|
-
n &&
|
|
5921
|
-
s &&
|
|
5922
|
-
a &&
|
|
5923
|
-
l &&
|
|
5924
|
-
o &&
|
|
5941
|
+
t && Rn[t],
|
|
5942
|
+
r && Bn[r],
|
|
5943
|
+
n && Hn[n],
|
|
5944
|
+
s && qn[s],
|
|
5945
|
+
a && Vn[a],
|
|
5946
|
+
l && Un[l],
|
|
5947
|
+
o && Wn[o],
|
|
5925
5948
|
u
|
|
5926
5949
|
),
|
|
5927
5950
|
...v,
|
|
@@ -5930,7 +5953,7 @@ const Us = ({
|
|
|
5930
5953
|
)
|
|
5931
5954
|
);
|
|
5932
5955
|
mt.displayName = "Box";
|
|
5933
|
-
const
|
|
5956
|
+
const Ys = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
5934
5957
|
mt,
|
|
5935
5958
|
{
|
|
5936
5959
|
background: "module",
|
|
@@ -5945,7 +5968,7 @@ const Ws = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5945
5968
|
]
|
|
5946
5969
|
}
|
|
5947
5970
|
), Re = /* @__PURE__ */ new Map();
|
|
5948
|
-
function
|
|
5971
|
+
function Xs({
|
|
5949
5972
|
identifier: t,
|
|
5950
5973
|
resourceLoader: r,
|
|
5951
5974
|
framework: n = "react",
|
|
@@ -5954,8 +5977,8 @@ function Ks({
|
|
|
5954
5977
|
componentProps: l,
|
|
5955
5978
|
className: o
|
|
5956
5979
|
}) {
|
|
5957
|
-
const u = re(null), [d, v] =
|
|
5958
|
-
b.current = r,
|
|
5980
|
+
const u = re(null), [d, v] = B(null), [, m] = B(0), f = re(null), b = re(r);
|
|
5981
|
+
b.current = r, J(() => {
|
|
5959
5982
|
if (Re.has(t)) return;
|
|
5960
5983
|
let C = !0;
|
|
5961
5984
|
return (async () => {
|
|
@@ -5971,7 +5994,7 @@ function Ks({
|
|
|
5971
5994
|
};
|
|
5972
5995
|
}, [t]);
|
|
5973
5996
|
const g = Re.get(t) ?? null, N = !g && d === t, p = !g && !N, x = g ? n === "react" && (g.component || g.default) || g : null;
|
|
5974
|
-
return
|
|
5997
|
+
return J(() => {
|
|
5975
5998
|
if (!x || n === "react") return;
|
|
5976
5999
|
const C = u.current;
|
|
5977
6000
|
if (C) {
|
|
@@ -5986,7 +6009,7 @@ function Ks({
|
|
|
5986
6009
|
};
|
|
5987
6010
|
}
|
|
5988
6011
|
}
|
|
5989
|
-
}, [x, n]),
|
|
6012
|
+
}, [x, n]), J(() => {
|
|
5990
6013
|
n === "svelte" && f.current && f.current.$set?.(l);
|
|
5991
6014
|
}, [l, n]), /* @__PURE__ */ c("div", { ref: u, className: o, style: { display: "contents" }, children: [
|
|
5992
6015
|
p && s,
|
|
@@ -5994,7 +6017,7 @@ function Ks({
|
|
|
5994
6017
|
n === "react" && x && /* @__PURE__ */ e(x, { ...l })
|
|
5995
6018
|
] });
|
|
5996
6019
|
}
|
|
5997
|
-
class
|
|
6020
|
+
class Zs extends Nt {
|
|
5998
6021
|
constructor() {
|
|
5999
6022
|
super(...arguments), this.state = {
|
|
6000
6023
|
hasError: !1,
|
|
@@ -6023,97 +6046,97 @@ class Gs extends Nt {
|
|
|
6023
6046
|
}
|
|
6024
6047
|
}
|
|
6025
6048
|
export {
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6049
|
+
Cs as ArtifactView,
|
|
6050
|
+
Ss as AssistantCard,
|
|
6051
|
+
Cn as Avatar,
|
|
6052
|
+
Es as AvatarStack,
|
|
6053
|
+
nn as Badge,
|
|
6031
6054
|
mt as Box,
|
|
6032
6055
|
se as Button,
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6056
|
+
os as ButtonGroup,
|
|
6057
|
+
Ys as Card,
|
|
6058
|
+
zs as ChannelBadge,
|
|
6036
6059
|
we as Checkbox,
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6060
|
+
Js as CommandPalette,
|
|
6061
|
+
gs as ConfirmDialog,
|
|
6062
|
+
qe as ContentLoading,
|
|
6040
6063
|
Be as DatePicker,
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6064
|
+
jr as Dropdown,
|
|
6065
|
+
ps as EmptyState,
|
|
6066
|
+
Zs as ErrorBoundary,
|
|
6067
|
+
Xs as FederatedResource,
|
|
6068
|
+
cr as FilterChip,
|
|
6069
|
+
Ar as FolderSelect,
|
|
6070
|
+
bs as Form,
|
|
6071
|
+
Qr as FormSection,
|
|
6072
|
+
Gs as Heading,
|
|
6050
6073
|
Ut as IDENTITY_TONE_COUNT,
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6074
|
+
Q as Icon,
|
|
6075
|
+
Ms as Image,
|
|
6076
|
+
ds as ImageField,
|
|
6077
|
+
vs as Kbd,
|
|
6078
|
+
As as KpiCard,
|
|
6079
|
+
is as Link,
|
|
6080
|
+
_s as List,
|
|
6081
|
+
Ts as ListBulkAction,
|
|
6082
|
+
ss as MeetingGrid,
|
|
6083
|
+
$s as MessageBubble,
|
|
6084
|
+
Ls as MetaSeparator,
|
|
6085
|
+
Ds as MetaValue,
|
|
6063
6086
|
it as Modal,
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6087
|
+
Is as Page,
|
|
6088
|
+
Mn as PageHeader,
|
|
6089
|
+
us as PageToolbar,
|
|
6067
6090
|
ke as PageToolbarActions,
|
|
6068
|
-
|
|
6091
|
+
as as ParticipantTile,
|
|
6069
6092
|
nt as Popover,
|
|
6070
|
-
|
|
6093
|
+
ys as ProgressBar,
|
|
6071
6094
|
Te as RichText,
|
|
6072
6095
|
ct as SearchField,
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6096
|
+
Pr as SearchableTextField,
|
|
6097
|
+
Ps as SectionCaption,
|
|
6098
|
+
Os as SectionDivider,
|
|
6099
|
+
fr as SegmentedToggle,
|
|
6077
6100
|
Ae as Select,
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6101
|
+
js as SettingsFrameProvider,
|
|
6102
|
+
Rs as SettingsPage,
|
|
6103
|
+
Bs as SettingsRow,
|
|
6104
|
+
Hs as SettingsSection,
|
|
6105
|
+
Ks as SidebarMenu,
|
|
6106
|
+
qs as SourceChip,
|
|
6107
|
+
Ns as Spinner,
|
|
6085
6108
|
st as SplitButton,
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6109
|
+
ws as StatusDot,
|
|
6110
|
+
ks as StepIndicator,
|
|
6111
|
+
Gr as StorageInput,
|
|
6112
|
+
Or as Switch,
|
|
6113
|
+
xs as TabBar,
|
|
6091
6114
|
Ye as Table,
|
|
6092
|
-
|
|
6115
|
+
Wr as Tabs,
|
|
6093
6116
|
ue as Text,
|
|
6094
6117
|
He as TextArea,
|
|
6095
6118
|
Ce as TextField,
|
|
6096
|
-
|
|
6097
|
-
|
|
6119
|
+
ls as VideoSurface,
|
|
6120
|
+
Ws as View,
|
|
6098
6121
|
Xe as autofillProps,
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6122
|
+
An as badgeColumn,
|
|
6123
|
+
Vs as booleanBadgeColumn,
|
|
6124
|
+
ns as catTone,
|
|
6102
6125
|
i as cn,
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6126
|
+
ts as createSizes,
|
|
6127
|
+
es as createVariants,
|
|
6128
|
+
ms as dateFilterHandler,
|
|
6129
|
+
rs as identityDotClass,
|
|
6107
6130
|
rt as identityPlateClass,
|
|
6108
6131
|
tt as identityTone,
|
|
6109
|
-
|
|
6110
|
-
|
|
6132
|
+
Us as labelsColumn,
|
|
6133
|
+
hs as multiSelectFilterHandler,
|
|
6111
6134
|
Jt as normalizeText,
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6135
|
+
cs as resolveLucideIcon,
|
|
6136
|
+
fs as selectFilterHandler,
|
|
6137
|
+
$e as text,
|
|
6115
6138
|
Pe as useAnchoredPosition,
|
|
6116
|
-
|
|
6117
|
-
|
|
6139
|
+
_n as useSettingsFrame,
|
|
6140
|
+
Fs as useSettingsFrameHost
|
|
6118
6141
|
};
|
|
6119
6142
|
//# sourceMappingURL=index.js.map
|