@opencxh/ui-kit 3.137.10 → 3.137.11
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 +959 -864
- package/dist/index.js.map +1 -1
- package/dist/src/content/Avatar.d.ts +6 -1
- package/dist/src/content/ChannelBadge.d.ts +6 -1
- package/dist/src/content/Icon.d.ts +9 -0
- package/dist/src/forms/Form.d.ts +5 -1
- package/dist/src/forms/autofill.d.ts +30 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/utils/identity.d.ts +25 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,35 +1,81 @@
|
|
|
1
|
-
import { clsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import $t from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { clsx as ct } from "clsx";
|
|
2
|
+
import ce, { useState as O, useLayoutEffect as it, useRef as ne, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Ke, useId as dt, useContext as ut, Component as mt } from "react";
|
|
3
|
+
import { jsxs as i, jsx as e, Fragment as ke } from "react/jsx-runtime";
|
|
4
|
+
import * as ft from "lucide-react";
|
|
5
|
+
import { VideoOff as ht, User as xt, MicOff as bt, Mic as gt, X as we, ChevronDown as Te, ExternalLink as pt, Calendar as vt, ChevronLeft as Ce, ChevronRight as $e, ChevronDownIcon as yt, Loader2 as Nt, Search as _e, Check as Oe, ChevronUp as wt, Ellipsis as kt, FileText as Le, HardDrive as Fe, ArrowLeft as Ct, FolderPlus as St, Upload as Et, Folder as Be, Trash2 as zt, Plus as Mt, Sparkles as Tt, ImageOff as $t, Pencil as _t, ArrowUpRight as Dt } from "lucide-react";
|
|
6
|
+
import At from "dompurify";
|
|
7
|
+
import Lt from "react-markdown";
|
|
8
|
+
import It from "remark-gfm";
|
|
9
|
+
function c(...t) {
|
|
10
|
+
return ct(t);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function Dn(t) {
|
|
12
13
|
return (r, n) => t[r]?.[n] || "";
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function An(t) {
|
|
15
16
|
return (r) => t[r] || "";
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
function De(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
19
|
+
const [l, o] = O({});
|
|
20
|
+
return it(() => {
|
|
21
|
+
if (!t) return;
|
|
22
|
+
const f = () => {
|
|
23
|
+
const d = r.current;
|
|
24
|
+
if (!d) return;
|
|
25
|
+
const v = d.getBoundingClientRect(), h = window.innerHeight - v.bottom, m = v.top, b = a.startsWith("top"), p = b ? m < 200 && h > m : h < 200 && m > h, w = b !== p, g = { position: "fixed" };
|
|
26
|
+
w ? (g.bottom = window.innerHeight - v.top + n, g.maxHeight = Math.max(120, m - n * 2)) : (g.top = v.bottom + n, g.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - v.right : g.left = v.left, s && (g.width = v.width), o(g);
|
|
27
|
+
};
|
|
28
|
+
return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
29
|
+
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
30
|
+
};
|
|
31
|
+
}, [t, r, n, s, a]), l;
|
|
32
|
+
}
|
|
33
|
+
const Pt = 5;
|
|
34
|
+
function jt(t) {
|
|
35
|
+
let r = 2166136261;
|
|
36
|
+
for (let n = 0; n < t.length; n++)
|
|
37
|
+
r ^= t.charCodeAt(n), r = Math.imul(r, 16777619);
|
|
38
|
+
return r >>> 0;
|
|
39
|
+
}
|
|
40
|
+
function Ge(t) {
|
|
41
|
+
const r = (t ?? "").trim().toLowerCase();
|
|
42
|
+
return r ? jt(r) % Pt + 1 : 1;
|
|
43
|
+
}
|
|
44
|
+
const Ot = {
|
|
45
|
+
1: "bg-cat-1-soft text-cat-1-fg",
|
|
46
|
+
2: "bg-cat-2-soft text-cat-2-fg",
|
|
47
|
+
3: "bg-cat-3-soft text-cat-3-fg",
|
|
48
|
+
4: "bg-cat-4-soft text-cat-4-fg",
|
|
49
|
+
5: "bg-cat-5-soft text-cat-5-fg"
|
|
50
|
+
}, Ft = {
|
|
51
|
+
1: "bg-cat-1",
|
|
52
|
+
2: "bg-cat-2",
|
|
53
|
+
3: "bg-cat-3",
|
|
54
|
+
4: "bg-cat-4",
|
|
55
|
+
5: "bg-cat-5"
|
|
56
|
+
};
|
|
57
|
+
function Je(t) {
|
|
58
|
+
return Ot[Ge(t)];
|
|
59
|
+
}
|
|
60
|
+
function Ln(t) {
|
|
61
|
+
return Ft[Ge(t)];
|
|
62
|
+
}
|
|
63
|
+
const Re = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
|
|
64
|
+
function In(t) {
|
|
19
65
|
let r = 0;
|
|
20
66
|
for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
|
|
21
|
-
return
|
|
67
|
+
return Re[r % Re.length];
|
|
22
68
|
}
|
|
23
|
-
function
|
|
69
|
+
function Pn({ tiles: t, pinned: r, className: n }) {
|
|
24
70
|
if (r)
|
|
25
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ i("div", { className: c("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
|
|
26
72
|
/* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
|
|
27
73
|
t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-w-40 md:min-w-0", children: a }, l)) })
|
|
28
74
|
] });
|
|
29
75
|
const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
|
|
30
|
-
return /* @__PURE__ */ e("div", { className:
|
|
76
|
+
return /* @__PURE__ */ e("div", { className: c("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
|
|
31
77
|
}
|
|
32
|
-
function
|
|
78
|
+
function jn({
|
|
33
79
|
name: t,
|
|
34
80
|
avatarUrl: r,
|
|
35
81
|
muted: n,
|
|
@@ -39,26 +85,26 @@ function zn({
|
|
|
39
85
|
className: o,
|
|
40
86
|
fill: f
|
|
41
87
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ i(
|
|
43
89
|
"div",
|
|
44
90
|
{
|
|
45
|
-
className:
|
|
91
|
+
className: c(
|
|
46
92
|
"relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
|
|
47
93
|
f ? "h-full w-full" : "aspect-video",
|
|
48
94
|
s && "ring-2 ring-speaking",
|
|
49
95
|
o
|
|
50
96
|
),
|
|
51
97
|
children: [
|
|
52
|
-
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
n ? /* @__PURE__ */ e(
|
|
98
|
+
a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(ht, { className: "w-8 h-8" }) : /* @__PURE__ */ e(xt, { className: "w-8 h-8" }) }) }),
|
|
99
|
+
/* @__PURE__ */ i("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
|
|
100
|
+
n ? /* @__PURE__ */ e(bt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(gt, { className: "w-3 h-3" }),
|
|
55
101
|
/* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
|
|
56
102
|
] })
|
|
57
103
|
]
|
|
58
104
|
}
|
|
59
105
|
);
|
|
60
106
|
}
|
|
61
|
-
function
|
|
107
|
+
function On({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
62
108
|
const a = ne(null);
|
|
63
109
|
return G(() => {
|
|
64
110
|
if (!r || !a.current) return;
|
|
@@ -70,7 +116,7 @@ function Mn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
70
116
|
"div",
|
|
71
117
|
{
|
|
72
118
|
ref: a,
|
|
73
|
-
className:
|
|
119
|
+
className: c(
|
|
74
120
|
"w-full h-full bg-video-surface-strong overflow-hidden",
|
|
75
121
|
n && "[&>*]:scale-x-[-1]",
|
|
76
122
|
s
|
|
@@ -78,7 +124,7 @@ function Mn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
|
|
|
78
124
|
}
|
|
79
125
|
);
|
|
80
126
|
}
|
|
81
|
-
const
|
|
127
|
+
const Bt = {
|
|
82
128
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
|
|
83
129
|
secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
|
|
84
130
|
// No resting fill, so no disabled fill either — a greyed-out plate where
|
|
@@ -91,7 +137,7 @@ const Dt = {
|
|
|
91
137
|
success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
92
138
|
warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
|
|
93
139
|
"danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
|
|
94
|
-
},
|
|
140
|
+
}, Rt = {
|
|
95
141
|
xs: "h-control-xs px-2 text-xs",
|
|
96
142
|
sm: "h-control-sm px-3 text-sm",
|
|
97
143
|
md: "h-control-md px-4 text-sm",
|
|
@@ -99,7 +145,7 @@ const Dt = {
|
|
|
99
145
|
xl: "h-control-xl px-6 text-base",
|
|
100
146
|
"2xl": "h-control-2xl px-6 text-base",
|
|
101
147
|
full: "h-control-md px-4 text-sm"
|
|
102
|
-
},
|
|
148
|
+
}, Ht = {
|
|
103
149
|
xs: "h-control-xs w-6",
|
|
104
150
|
sm: "h-control-sm w-7",
|
|
105
151
|
md: "h-control-md w-8",
|
|
@@ -123,12 +169,12 @@ const Dt = {
|
|
|
123
169
|
...m
|
|
124
170
|
}, b) => {
|
|
125
171
|
const p = h || s;
|
|
126
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ i(
|
|
127
173
|
"button",
|
|
128
174
|
{
|
|
129
175
|
ref: b,
|
|
130
176
|
type: "button",
|
|
131
|
-
className:
|
|
177
|
+
className: c(
|
|
132
178
|
// font-medium, not semibold: in the design a button's label carries
|
|
133
179
|
// the same weight as an emphasised nav item, and 600 at 12–13px
|
|
134
180
|
// reads as a heavier control than the surrounding chrome.
|
|
@@ -138,8 +184,8 @@ const Dt = {
|
|
|
138
184
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
139
185
|
"disabled:cursor-not-allowed disabled:border-border-subtle",
|
|
140
186
|
"disabled:text-text-disabled",
|
|
141
|
-
|
|
142
|
-
o ?
|
|
187
|
+
Bt[t],
|
|
188
|
+
o ? Ht[r] : Rt[r],
|
|
143
189
|
(n || r === "full") && "w-full",
|
|
144
190
|
s && "cursor-wait",
|
|
145
191
|
d
|
|
@@ -165,14 +211,14 @@ const Dt = {
|
|
|
165
211
|
}
|
|
166
212
|
);
|
|
167
213
|
le.displayName = "Button";
|
|
168
|
-
const
|
|
214
|
+
const Fn = ({
|
|
169
215
|
children: t,
|
|
170
216
|
size: r = "md",
|
|
171
217
|
orientation: n = "horizontal",
|
|
172
218
|
attached: s = !0,
|
|
173
219
|
className: a
|
|
174
220
|
}) => {
|
|
175
|
-
const l =
|
|
221
|
+
const l = c(
|
|
176
222
|
"inline-flex",
|
|
177
223
|
{
|
|
178
224
|
// Orientation
|
|
@@ -195,7 +241,13 @@ const $n = ({
|
|
|
195
241
|
a
|
|
196
242
|
);
|
|
197
243
|
return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
|
|
198
|
-
}
|
|
244
|
+
};
|
|
245
|
+
function Bn(t) {
|
|
246
|
+
if (!t) return;
|
|
247
|
+
const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = ft[r];
|
|
248
|
+
return typeof n == "function" || typeof n == "object" && n !== null ? n : void 0;
|
|
249
|
+
}
|
|
250
|
+
const Vt = {
|
|
199
251
|
primary: "text-text",
|
|
200
252
|
secondary: "text-text-muted",
|
|
201
253
|
accent: "text-accent",
|
|
@@ -215,9 +267,9 @@ const $n = ({
|
|
|
215
267
|
"aria-label": o,
|
|
216
268
|
...f
|
|
217
269
|
}) => {
|
|
218
|
-
const d = typeof r == "number" ? r :
|
|
270
|
+
const d = typeof r == "number" ? r : qt(r), v = c(
|
|
219
271
|
"inline-block shrink-0",
|
|
220
|
-
|
|
272
|
+
Vt[n],
|
|
221
273
|
s && [
|
|
222
274
|
"cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
|
|
223
275
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
@@ -239,7 +291,7 @@ const $n = ({
|
|
|
239
291
|
};
|
|
240
292
|
return /* @__PURE__ */ e(t, { ...h });
|
|
241
293
|
};
|
|
242
|
-
function
|
|
294
|
+
function qt(t) {
|
|
243
295
|
return {
|
|
244
296
|
xs: 12,
|
|
245
297
|
sm: 14,
|
|
@@ -248,22 +300,7 @@ function It(t) {
|
|
|
248
300
|
xl: 24
|
|
249
301
|
}[t];
|
|
250
302
|
}
|
|
251
|
-
|
|
252
|
-
const [l, o] = O({});
|
|
253
|
-
return St(() => {
|
|
254
|
-
if (!t) return;
|
|
255
|
-
const f = () => {
|
|
256
|
-
const d = r.current;
|
|
257
|
-
if (!d) return;
|
|
258
|
-
const v = d.getBoundingClientRect(), h = window.innerHeight - v.bottom, m = v.top, b = a.startsWith("top"), p = b ? m < 200 && h > m : h < 200 && m > h, w = b !== p, g = { position: "fixed" };
|
|
259
|
-
w ? (g.bottom = window.innerHeight - v.top + n, g.maxHeight = Math.max(120, m - n * 2)) : (g.top = v.bottom + n, g.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - v.right : g.left = v.left, s && (g.width = v.width), o(g);
|
|
260
|
-
};
|
|
261
|
-
return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
262
|
-
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
263
|
-
};
|
|
264
|
-
}, [t, r, n, s, a]), l;
|
|
265
|
-
}
|
|
266
|
-
const Ke = ({
|
|
303
|
+
const Ye = ({
|
|
267
304
|
trigger: t,
|
|
268
305
|
children: r,
|
|
269
306
|
placement: n = "bottom-start",
|
|
@@ -273,13 +310,13 @@ const Ke = ({
|
|
|
273
310
|
disabled: o = !1,
|
|
274
311
|
triggerLabel: f
|
|
275
312
|
}) => {
|
|
276
|
-
const [d, v] = O(!1), h = ne(null), m = ne(null), b =
|
|
313
|
+
const [d, v] = O(!1), h = ne(null), m = ne(null), b = De(d, m, { placement: n });
|
|
277
314
|
G(() => {
|
|
278
315
|
if (!d) return;
|
|
279
|
-
const g = (
|
|
280
|
-
h.current && !h.current.contains(
|
|
281
|
-
}, x = (
|
|
282
|
-
|
|
316
|
+
const g = (T) => {
|
|
317
|
+
h.current && !h.current.contains(T.target) && v(!1);
|
|
318
|
+
}, x = (T) => {
|
|
319
|
+
T.key === "Escape" && v(!1);
|
|
283
320
|
};
|
|
284
321
|
return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
|
|
285
322
|
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
|
|
@@ -288,7 +325,7 @@ const Ke = ({
|
|
|
288
325
|
const p = (g) => {
|
|
289
326
|
g.stopPropagation(), !o && v((x) => !x);
|
|
290
327
|
}, w = () => v(!1);
|
|
291
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ i("div", { ref: h, className: c("relative inline-flex", a), children: [
|
|
292
329
|
/* @__PURE__ */ e(
|
|
293
330
|
"button",
|
|
294
331
|
{
|
|
@@ -298,7 +335,7 @@ const Ke = ({
|
|
|
298
335
|
disabled: o,
|
|
299
336
|
"aria-label": f,
|
|
300
337
|
"aria-expanded": d,
|
|
301
|
-
className:
|
|
338
|
+
className: c(
|
|
302
339
|
"inline-flex items-center",
|
|
303
340
|
o && "cursor-not-allowed opacity-50",
|
|
304
341
|
l
|
|
@@ -309,7 +346,7 @@ const Ke = ({
|
|
|
309
346
|
d && /* @__PURE__ */ e(
|
|
310
347
|
"div",
|
|
311
348
|
{
|
|
312
|
-
className:
|
|
349
|
+
className: c(
|
|
313
350
|
// overflow-y-auto pairs with the hook's max-height: without it a
|
|
314
351
|
// panel taller than the space available is simply cut off.
|
|
315
352
|
"fixed z-overlay overflow-y-auto rounded-lg border border-border bg-surface shadow-overlay",
|
|
@@ -320,29 +357,29 @@ const Ke = ({
|
|
|
320
357
|
}
|
|
321
358
|
)
|
|
322
359
|
] });
|
|
323
|
-
},
|
|
360
|
+
}, Ut = {
|
|
324
361
|
none: "hover:bg-surface-sunk hover:text-text",
|
|
325
362
|
default: "bg-surface-sunk text-text-muted hover:text-text",
|
|
326
363
|
muted: "bg-surface-sunk text-text-subtle hover:text-text",
|
|
327
364
|
outline: "text-text-muted ring-1 ring-inset ring-border-strong hover:bg-surface-hover hover:text-text",
|
|
328
365
|
warning: "bg-warning-soft text-warning-fg",
|
|
329
366
|
danger: "bg-danger-soft text-danger-fg"
|
|
330
|
-
},
|
|
367
|
+
}, Wt = (t) => c(
|
|
331
368
|
// A button's default cursor is an arrow, so it has to be asked for.
|
|
332
369
|
"inline-flex cursor-pointer select-none items-center text-sm font-medium",
|
|
333
370
|
t.size === "sm" ? "h-control-sm" : "h-control-md",
|
|
334
371
|
"transition-colors duration-fast ease-out",
|
|
335
372
|
t.shape === "pill" ? "rounded-full" : "rounded-md",
|
|
336
373
|
// Picking a value outranks whatever the value happens to mean.
|
|
337
|
-
t.active ? "bg-info-soft text-info-fg" :
|
|
374
|
+
t.active ? "bg-info-soft text-info-fg" : Ut[t.tone ?? "default"],
|
|
338
375
|
t.className
|
|
339
|
-
),
|
|
376
|
+
), Kt = (t) => c(
|
|
340
377
|
"inline-flex items-center gap-1.5 pl-3",
|
|
341
378
|
t.shape === "pill" ? "rounded-full" : "rounded-md",
|
|
342
379
|
t.withClear ? "pr-1.5" : "pr-3",
|
|
343
380
|
"focus-visible:outline-none focus-visible:focus-ring"
|
|
344
381
|
);
|
|
345
|
-
function
|
|
382
|
+
function Gt({
|
|
346
383
|
label: t,
|
|
347
384
|
icon: r,
|
|
348
385
|
tone: n = "default",
|
|
@@ -358,44 +395,44 @@ function Bt({
|
|
|
358
395
|
title: b,
|
|
359
396
|
className: p
|
|
360
397
|
}) {
|
|
361
|
-
const w = l && !!v, g = s === "pill" ? "rounded-full" : "rounded-md", x =
|
|
398
|
+
const w = l && !!v, g = s === "pill" ? "rounded-full" : "rounded-md", x = Wt({ active: l, tone: n, shape: s, size: a, className: p }), T = /* @__PURE__ */ i(ke, { children: [
|
|
362
399
|
r,
|
|
363
400
|
t,
|
|
364
|
-
o && /* @__PURE__ */ e(Z, { icon:
|
|
365
|
-
] }), C =
|
|
401
|
+
o && /* @__PURE__ */ e(Z, { icon: Te, size: "xs" })
|
|
402
|
+
] }), C = Kt({ shape: s, withClear: w }), q = w && /* @__PURE__ */ e(
|
|
366
403
|
"button",
|
|
367
404
|
{
|
|
368
405
|
type: "button",
|
|
369
406
|
"aria-label": h,
|
|
370
407
|
onClick: v,
|
|
371
|
-
className:
|
|
408
|
+
className: c("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", g),
|
|
372
409
|
children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
|
|
373
410
|
}
|
|
374
411
|
);
|
|
375
|
-
return f ? /* @__PURE__ */
|
|
412
|
+
return f ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
|
|
376
413
|
/* @__PURE__ */ e(
|
|
377
|
-
|
|
414
|
+
Ye,
|
|
378
415
|
{
|
|
379
|
-
trigger:
|
|
416
|
+
trigger: T,
|
|
380
417
|
rootClassName: "h-full",
|
|
381
|
-
triggerClassName:
|
|
382
|
-
className:
|
|
418
|
+
triggerClassName: c(C, "h-full"),
|
|
419
|
+
className: c("min-w-menu p-1.5", d),
|
|
383
420
|
children: f
|
|
384
421
|
}
|
|
385
422
|
),
|
|
386
423
|
q
|
|
387
|
-
] }) : w ? /* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: m, className: C, children:
|
|
424
|
+
] }) : w ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
|
|
425
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: m, className: C, children: T }),
|
|
389
426
|
q
|
|
390
|
-
] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: m, className:
|
|
427
|
+
] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: m, className: c(x, C), children: T });
|
|
391
428
|
}
|
|
392
|
-
const
|
|
429
|
+
const Jt = {
|
|
393
430
|
xs: "text-xs",
|
|
394
431
|
sm: "text-sm",
|
|
395
432
|
md: "text-base",
|
|
396
433
|
lg: "text-md",
|
|
397
434
|
xl: "text-lg"
|
|
398
|
-
},
|
|
435
|
+
}, Yt = {
|
|
399
436
|
primary: "text-text hover:text-info-fg hover:underline",
|
|
400
437
|
info: "text-info-fg hover:underline",
|
|
401
438
|
secondary: "text-text-muted hover:text-text",
|
|
@@ -404,7 +441,7 @@ const Rt = {
|
|
|
404
441
|
success: "text-success-fg hover:underline",
|
|
405
442
|
warning: "text-warning-fg hover:underline",
|
|
406
443
|
error: "text-danger-fg hover:underline"
|
|
407
|
-
},
|
|
444
|
+
}, Xt = {
|
|
408
445
|
primary: "bg-accent-soft",
|
|
409
446
|
accent: "bg-accent-soft",
|
|
410
447
|
secondary: "bg-surface-hover",
|
|
@@ -413,7 +450,7 @@ const Rt = {
|
|
|
413
450
|
warning: "bg-warning-soft",
|
|
414
451
|
error: "bg-danger-soft",
|
|
415
452
|
info: "bg-info-soft"
|
|
416
|
-
},
|
|
453
|
+
}, Rn = ({
|
|
417
454
|
variant: t = "default",
|
|
418
455
|
size: r = "md",
|
|
419
456
|
color: n = "primary",
|
|
@@ -426,17 +463,17 @@ const Rt = {
|
|
|
426
463
|
rel: v,
|
|
427
464
|
...h
|
|
428
465
|
}) => {
|
|
429
|
-
const m = a || f && (f.startsWith("http") || f.startsWith("mailto:")), b =
|
|
466
|
+
const m = a || f && (f.startsWith("http") || f.startsWith("mailto:")), b = c(
|
|
430
467
|
"inline-flex items-center gap-1 underline-offset-2",
|
|
431
468
|
"transition-colors duration-fast ease-out",
|
|
432
469
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
433
|
-
|
|
434
|
-
!s &&
|
|
470
|
+
Jt[r],
|
|
471
|
+
!s && Yt[n],
|
|
435
472
|
t === "subtle" && "no-underline opacity-70 hover:opacity-100",
|
|
436
473
|
t === "underline" && "underline decoration-1 hover:decoration-2",
|
|
437
474
|
t === "button" && [
|
|
438
475
|
"h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
|
|
439
|
-
|
|
476
|
+
Xt[n]
|
|
440
477
|
],
|
|
441
478
|
s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
|
|
442
479
|
l
|
|
@@ -447,15 +484,15 @@ const Rt = {
|
|
|
447
484
|
rel: m ? "noopener noreferrer" : v,
|
|
448
485
|
"aria-disabled": s || void 0
|
|
449
486
|
};
|
|
450
|
-
return /* @__PURE__ */
|
|
487
|
+
return /* @__PURE__ */ i("a", { className: b, ...p, children: [
|
|
451
488
|
o,
|
|
452
|
-
m && /* @__PURE__ */ e(
|
|
489
|
+
m && /* @__PURE__ */ e(pt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
|
|
453
490
|
] });
|
|
454
|
-
},
|
|
491
|
+
}, Zt = {
|
|
455
492
|
sm: "h-control-sm px-3 text-sm",
|
|
456
493
|
md: "h-control-md px-3 text-sm"
|
|
457
494
|
};
|
|
458
|
-
function
|
|
495
|
+
function Qt({
|
|
459
496
|
options: t,
|
|
460
497
|
value: r,
|
|
461
498
|
onChange: n,
|
|
@@ -470,7 +507,7 @@ function Ut({
|
|
|
470
507
|
{
|
|
471
508
|
role: "tablist",
|
|
472
509
|
"aria-label": f,
|
|
473
|
-
className:
|
|
510
|
+
className: c(
|
|
474
511
|
"gap-0.5 rounded-md p-0.5",
|
|
475
512
|
a === "track" ? "bg-surface-track" : "bg-surface-sunk",
|
|
476
513
|
l ? "flex w-full" : "inline-flex",
|
|
@@ -485,12 +522,12 @@ function Ut({
|
|
|
485
522
|
"aria-selected": v,
|
|
486
523
|
type: "button",
|
|
487
524
|
onClick: () => n(d.value),
|
|
488
|
-
className:
|
|
525
|
+
className: c(
|
|
489
526
|
"inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-sm",
|
|
490
527
|
"transition-colors duration-fast ease-out",
|
|
491
528
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
492
529
|
l && "min-w-0 flex-1",
|
|
493
|
-
|
|
530
|
+
Zt[s],
|
|
494
531
|
v ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
|
|
495
532
|
),
|
|
496
533
|
children: d.label
|
|
@@ -501,15 +538,15 @@ function Ut({
|
|
|
501
538
|
}
|
|
502
539
|
);
|
|
503
540
|
}
|
|
504
|
-
const
|
|
541
|
+
const er = {
|
|
505
542
|
primary: "bg-accent text-accent-fg hover:bg-accent-hover",
|
|
506
543
|
secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
|
|
507
544
|
outline: "border border-accent-border text-accent hover:bg-accent-soft"
|
|
508
|
-
},
|
|
545
|
+
}, tr = {
|
|
509
546
|
sm: "h-control-sm w-7",
|
|
510
547
|
md: "h-control-md w-8"
|
|
511
548
|
};
|
|
512
|
-
function
|
|
549
|
+
function Xe({
|
|
513
550
|
label: t,
|
|
514
551
|
onClick: r,
|
|
515
552
|
variant: n = "primary",
|
|
@@ -527,7 +564,7 @@ function Ge({
|
|
|
527
564
|
// lijn: bij een ink-gevulde knop leest 2px als een spleet. 1px is genoeg
|
|
528
565
|
// om te zien dat het twee doelen zijn. De omrande varianten hebben hun
|
|
529
566
|
// eigen randen al en houden de helften tegen elkaar.
|
|
530
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ i("div", { className: c("inline-flex items-center", n === "primary" && "gap-px"), children: [
|
|
531
568
|
/* @__PURE__ */ e(
|
|
532
569
|
le,
|
|
533
570
|
{
|
|
@@ -537,12 +574,12 @@ function Ge({
|
|
|
537
574
|
disabled: o,
|
|
538
575
|
loading: f,
|
|
539
576
|
leftIcon: a,
|
|
540
|
-
className:
|
|
577
|
+
className: c(m && "rounded-r-none"),
|
|
541
578
|
children: t
|
|
542
579
|
}
|
|
543
580
|
),
|
|
544
581
|
m && /* @__PURE__ */ e(
|
|
545
|
-
|
|
582
|
+
Ye,
|
|
546
583
|
{
|
|
547
584
|
placement: d,
|
|
548
585
|
disabled: h,
|
|
@@ -552,24 +589,24 @@ function Ge({
|
|
|
552
589
|
"span",
|
|
553
590
|
{
|
|
554
591
|
"aria-hidden": "true",
|
|
555
|
-
className:
|
|
592
|
+
className: c(
|
|
556
593
|
"inline-flex items-center justify-center rounded-md rounded-l-none",
|
|
557
594
|
"transition-colors duration-fast ease-out",
|
|
558
|
-
|
|
559
|
-
|
|
595
|
+
er[n],
|
|
596
|
+
tr[s],
|
|
560
597
|
h && "cursor-not-allowed opacity-50"
|
|
561
598
|
),
|
|
562
|
-
children: /* @__PURE__ */ e(
|
|
599
|
+
children: /* @__PURE__ */ e(Te, { className: "size-icon-md" })
|
|
563
600
|
}
|
|
564
601
|
),
|
|
565
|
-
children: (b) => /* @__PURE__ */ e(ke, { children: l.map((p) => /* @__PURE__ */
|
|
602
|
+
children: (b) => /* @__PURE__ */ e(ke, { children: l.map((p) => /* @__PURE__ */ i(
|
|
566
603
|
"button",
|
|
567
604
|
{
|
|
568
605
|
type: "button",
|
|
569
606
|
onClick: () => {
|
|
570
607
|
p.onClick(), b();
|
|
571
608
|
},
|
|
572
|
-
className:
|
|
609
|
+
className: c(
|
|
573
610
|
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
|
|
574
611
|
"transition-colors duration-fast ease-out",
|
|
575
612
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -587,17 +624,17 @@ function Ge({
|
|
|
587
624
|
] })
|
|
588
625
|
);
|
|
589
626
|
}
|
|
590
|
-
const
|
|
627
|
+
const rr = {
|
|
591
628
|
sm: "size-checkbox-sm",
|
|
592
629
|
md: "size-checkbox",
|
|
593
630
|
lg: "size-checkbox-lg",
|
|
594
631
|
full: "size-checkbox"
|
|
595
|
-
},
|
|
632
|
+
}, nr = {
|
|
596
633
|
sm: "min-h-control-sm",
|
|
597
634
|
md: "min-h-control-md",
|
|
598
635
|
lg: "min-h-control-lg",
|
|
599
636
|
full: "min-h-control-md"
|
|
600
|
-
},
|
|
637
|
+
}, sr = {
|
|
601
638
|
sm: "text-sm",
|
|
602
639
|
md: "text-base",
|
|
603
640
|
lg: "text-md",
|
|
@@ -623,8 +660,8 @@ const Gt = {
|
|
|
623
660
|
);
|
|
624
661
|
return ce.useEffect(() => {
|
|
625
662
|
w.current && (w.current.indeterminate = a);
|
|
626
|
-
}, [a]), /* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
663
|
+
}, [a]), /* @__PURE__ */ i("div", { className: c("flex flex-col", l), children: [
|
|
664
|
+
/* @__PURE__ */ i("div", { className: c("flex items-center gap-3", nr[s]), children: [
|
|
628
665
|
/* @__PURE__ */ e(
|
|
629
666
|
"input",
|
|
630
667
|
{
|
|
@@ -632,7 +669,7 @@ const Gt = {
|
|
|
632
669
|
id: b,
|
|
633
670
|
type: "checkbox",
|
|
634
671
|
"aria-invalid": p || void 0,
|
|
635
|
-
className:
|
|
672
|
+
className: c(
|
|
636
673
|
// radius-xs (5px): its own step on the scale. At 16px the 9px
|
|
637
674
|
// button radius reads as a circle and the 7px chip radius still
|
|
638
675
|
// rounds the corners away — a checkbox has to stay a square you
|
|
@@ -641,22 +678,22 @@ const Gt = {
|
|
|
641
678
|
"transition-colors duration-fast ease-out",
|
|
642
679
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
643
680
|
"disabled:cursor-not-allowed disabled:bg-surface-hover",
|
|
644
|
-
|
|
681
|
+
rr[s],
|
|
645
682
|
p ? "border-danger-border" : "border-border-strong",
|
|
646
683
|
f
|
|
647
684
|
),
|
|
648
685
|
...v
|
|
649
686
|
}
|
|
650
687
|
),
|
|
651
|
-
t && /* @__PURE__ */
|
|
688
|
+
t && /* @__PURE__ */ i("div", { className: "flex-1", children: [
|
|
652
689
|
/* @__PURE__ */ e(
|
|
653
690
|
"label",
|
|
654
691
|
{
|
|
655
692
|
htmlFor: b,
|
|
656
|
-
className:
|
|
693
|
+
className: c(
|
|
657
694
|
"cursor-pointer",
|
|
658
695
|
p ? "text-danger-fg" : "text-text",
|
|
659
|
-
|
|
696
|
+
sr[s],
|
|
660
697
|
o
|
|
661
698
|
),
|
|
662
699
|
children: t
|
|
@@ -670,7 +707,7 @@ const Gt = {
|
|
|
670
707
|
}
|
|
671
708
|
);
|
|
672
709
|
ye.displayName = "Checkbox";
|
|
673
|
-
const
|
|
710
|
+
const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }), lr = () => /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" }), or = () => /* @__PURE__ */ e(Z, { icon: $e, size: "md", color: "current" }), Pe = be(({
|
|
674
711
|
value: t,
|
|
675
712
|
onChange: r,
|
|
676
713
|
placeholder: n = "Select date",
|
|
@@ -683,7 +720,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
683
720
|
format: v = "MM/dd/yyyy",
|
|
684
721
|
withTime: h = !1
|
|
685
722
|
}, m) => {
|
|
686
|
-
const [b, p] = O(!1), [w, g] = O(() => t || /* @__PURE__ */ new Date()), x = ne(null),
|
|
723
|
+
const [b, p] = O(!1), [w, g] = O(() => t || /* @__PURE__ */ new Date()), x = ne(null), T = ne(null), C = De(b, T);
|
|
687
724
|
G(() => {
|
|
688
725
|
const u = (E) => {
|
|
689
726
|
x.current && !x.current.contains(E.target) && p(!1);
|
|
@@ -708,7 +745,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
708
745
|
for (let se = 0; se < 42; se++)
|
|
709
746
|
N.push(new Date(W)), W.setDate(W.getDate() + 1);
|
|
710
747
|
return N;
|
|
711
|
-
},
|
|
748
|
+
}, I = (u) => {
|
|
712
749
|
if (u.getMonth() === w.getMonth() && !(f && u < f) && !(d && u > d)) {
|
|
713
750
|
if (h) {
|
|
714
751
|
const y = new Date(u);
|
|
@@ -723,7 +760,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
723
760
|
g(new Date(w.getFullYear(), w.getMonth() + 1, 1));
|
|
724
761
|
}, Y = () => {
|
|
725
762
|
r?.(null), p(!1);
|
|
726
|
-
}, K =
|
|
763
|
+
}, K = c(
|
|
727
764
|
"w-full border border-border-strong rounded-tile transition-colors duration-fast",
|
|
728
765
|
"bg-surface text-text",
|
|
729
766
|
"placeholder:text-text-muted",
|
|
@@ -750,8 +787,8 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
750
787
|
"November",
|
|
751
788
|
"December"
|
|
752
789
|
];
|
|
753
|
-
return /* @__PURE__ */
|
|
754
|
-
/* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ i("div", { ref: x, className: "relative", children: [
|
|
791
|
+
/* @__PURE__ */ i("div", { ref: T, className: "relative", children: [
|
|
755
792
|
/* @__PURE__ */ e(
|
|
756
793
|
"input",
|
|
757
794
|
{
|
|
@@ -763,7 +800,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
763
800
|
required: a,
|
|
764
801
|
readOnly: !0,
|
|
765
802
|
onClick: () => !s && p(!b),
|
|
766
|
-
className:
|
|
803
|
+
className: c(K, "pr-10 cursor-pointer")
|
|
767
804
|
}
|
|
768
805
|
),
|
|
769
806
|
/* @__PURE__ */ e(
|
|
@@ -773,21 +810,21 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
773
810
|
onClick: () => !s && p(!b),
|
|
774
811
|
disabled: s,
|
|
775
812
|
className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
|
|
776
|
-
children: /* @__PURE__ */ e(
|
|
813
|
+
children: /* @__PURE__ */ e(ar, {})
|
|
777
814
|
}
|
|
778
815
|
)
|
|
779
816
|
] }),
|
|
780
|
-
b && /* @__PURE__ */
|
|
781
|
-
/* @__PURE__ */
|
|
817
|
+
b && /* @__PURE__ */ i("div", { style: C, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
|
|
818
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
|
|
782
819
|
/* @__PURE__ */ e(
|
|
783
820
|
"button",
|
|
784
821
|
{
|
|
785
822
|
onClick: H,
|
|
786
823
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
787
|
-
children: /* @__PURE__ */ e(
|
|
824
|
+
children: /* @__PURE__ */ e(lr, {})
|
|
788
825
|
}
|
|
789
826
|
),
|
|
790
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ i("h3", { className: "text-sm font-medium text-text", children: [
|
|
791
828
|
k[w.getMonth()],
|
|
792
829
|
" ",
|
|
793
830
|
w.getFullYear()
|
|
@@ -797,7 +834,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
797
834
|
{
|
|
798
835
|
onClick: te,
|
|
799
836
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
800
|
-
children: /* @__PURE__ */ e(
|
|
837
|
+
children: /* @__PURE__ */ e(or, {})
|
|
801
838
|
}
|
|
802
839
|
)
|
|
803
840
|
] }),
|
|
@@ -807,9 +844,9 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
807
844
|
return /* @__PURE__ */ e(
|
|
808
845
|
"button",
|
|
809
846
|
{
|
|
810
|
-
onClick: () => !W &&
|
|
847
|
+
onClick: () => !W && I(u),
|
|
811
848
|
disabled: W,
|
|
812
|
-
className:
|
|
849
|
+
className: c(
|
|
813
850
|
"w-8 h-8 text-sm rounded transition-colors duration-fast",
|
|
814
851
|
{
|
|
815
852
|
"text-text hover:bg-surface-hover": y && !A && !W,
|
|
@@ -823,7 +860,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
823
860
|
E
|
|
824
861
|
);
|
|
825
862
|
}) }),
|
|
826
|
-
h && /* @__PURE__ */
|
|
863
|
+
h && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
|
|
827
864
|
/* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
|
|
828
865
|
/* @__PURE__ */ e(
|
|
829
866
|
"input",
|
|
@@ -836,7 +873,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
836
873
|
}
|
|
837
874
|
)
|
|
838
875
|
] }),
|
|
839
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ i("div", { className: "flex justify-between items-center mt-4 pt-3 border-t border-border", children: [
|
|
840
877
|
/* @__PURE__ */ e(
|
|
841
878
|
"button",
|
|
842
879
|
{
|
|
@@ -856,12 +893,12 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
856
893
|
] })
|
|
857
894
|
] })
|
|
858
895
|
] });
|
|
859
|
-
}),
|
|
896
|
+
}), cr = {
|
|
860
897
|
sm: "h-control-sm px-3 text-sm",
|
|
861
898
|
md: "h-control-md px-3 text-sm",
|
|
862
899
|
lg: "h-control-lg px-3 text-base",
|
|
863
900
|
full: "h-control-md w-full px-3 text-sm"
|
|
864
|
-
}, Se = (t) => t.trim().toLowerCase(),
|
|
901
|
+
}, Se = (t) => t.trim().toLowerCase(), ze = be(
|
|
865
902
|
({
|
|
866
903
|
label: t,
|
|
867
904
|
helperText: r,
|
|
@@ -880,24 +917,24 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
880
917
|
value: w,
|
|
881
918
|
onChange: g,
|
|
882
919
|
allowCreate: x,
|
|
883
|
-
onCreateOption:
|
|
920
|
+
onCreateOption: T,
|
|
884
921
|
...C
|
|
885
922
|
}, q) => {
|
|
886
|
-
const D = m || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V,
|
|
923
|
+
const D = m || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, I] = ce.useState(!1), [H, te] = ce.useState(""), Y = ce.useRef(null), K = ce.useRef(null), ie = De(V, K, { matchWidth: !0 }), [k, u] = ce.useState(o);
|
|
887
924
|
ce.useImperativeHandle(q, () => Y.current), ce.useEffect(() => {
|
|
888
|
-
const
|
|
889
|
-
Y.current && !Y.current.contains(_.target) &&
|
|
925
|
+
const $ = (_) => {
|
|
926
|
+
Y.current && !Y.current.contains(_.target) && I(!1);
|
|
890
927
|
};
|
|
891
|
-
return document.addEventListener("mousedown",
|
|
928
|
+
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
892
929
|
}, []);
|
|
893
930
|
const E = ce.useCallback(
|
|
894
|
-
(
|
|
931
|
+
($, _) => $.some(
|
|
895
932
|
(z) => Se(z.value) === Se(_) || Se(z.label) === Se(_)
|
|
896
933
|
),
|
|
897
934
|
[]
|
|
898
935
|
), y = ce.useCallback(
|
|
899
|
-
(
|
|
900
|
-
const z = [
|
|
936
|
+
($, _) => {
|
|
937
|
+
const z = [...$], F = (j) => {
|
|
901
938
|
const B = (j ?? "").trim();
|
|
902
939
|
B && (E(z, B) || z.push({ value: B, label: B }));
|
|
903
940
|
};
|
|
@@ -906,41 +943,41 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
906
943
|
[E]
|
|
907
944
|
);
|
|
908
945
|
ce.useEffect(() => {
|
|
909
|
-
u((
|
|
946
|
+
u(($) => {
|
|
910
947
|
const _ = [...o];
|
|
911
|
-
return
|
|
948
|
+
return $.forEach((z) => {
|
|
912
949
|
!E(_, z.value) && !E(_, z.label) && _.push(z);
|
|
913
950
|
}), y(_, w);
|
|
914
951
|
});
|
|
915
952
|
}, [o, w, y, E]);
|
|
916
|
-
const A = (
|
|
953
|
+
const A = ($) => {
|
|
917
954
|
if (p) {
|
|
918
|
-
const _ = Array.isArray(w) ? w : [], z = _.includes(
|
|
955
|
+
const _ = Array.isArray(w) ? w : [], z = _.includes($) ? _.filter((F) => F !== $) : [..._, $];
|
|
919
956
|
g?.(z);
|
|
920
957
|
} else
|
|
921
|
-
g?.(
|
|
922
|
-
}, N = p ? null : k.find((
|
|
923
|
-
(
|
|
958
|
+
g?.($), I(!1), te("");
|
|
959
|
+
}, N = p ? null : k.find(($) => $.value === w), W = p ? k.filter(
|
|
960
|
+
($) => Array.isArray(w) && w.includes($.value)
|
|
924
961
|
) : [], se = b && H ? k.filter(
|
|
925
|
-
(
|
|
926
|
-
) : k, ee = !!x && !!b && !!H.trim() && !E(k, H), X = (
|
|
927
|
-
const _ =
|
|
962
|
+
($) => $.label.toLowerCase().includes(H.toLowerCase())
|
|
963
|
+
) : k, ee = !!x && !!b && !!H.trim() && !E(k, H), X = ($) => {
|
|
964
|
+
const _ = $.trim();
|
|
928
965
|
if (!_) return;
|
|
929
|
-
const z =
|
|
966
|
+
const z = T?.(_) ?? {
|
|
930
967
|
value: _,
|
|
931
968
|
label: _
|
|
932
969
|
};
|
|
933
970
|
if (E(k, z.value) || E(k, z.label)) {
|
|
934
|
-
A(z.value), te(""), p ||
|
|
971
|
+
A(z.value), te(""), p || I(!1);
|
|
935
972
|
return;
|
|
936
973
|
}
|
|
937
|
-
u((F) => [...F, z]), A(z.value), te(""), p ||
|
|
938
|
-
},
|
|
939
|
-
return /* @__PURE__ */
|
|
974
|
+
u((F) => [...F, z]), A(z.value), te(""), p || I(!1);
|
|
975
|
+
}, P = () => p ? W.length > 0 ? W.map(($) => $.label).join(", ") : f || "Select options" : N?.label || f || "Select an option";
|
|
976
|
+
return /* @__PURE__ */ i(
|
|
940
977
|
"div",
|
|
941
978
|
{
|
|
942
979
|
ref: Y,
|
|
943
|
-
className:
|
|
980
|
+
className: c(
|
|
944
981
|
"relative flex flex-col",
|
|
945
982
|
a && "w-full",
|
|
946
983
|
d
|
|
@@ -951,8 +988,8 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
951
988
|
"label",
|
|
952
989
|
{
|
|
953
990
|
htmlFor: D,
|
|
954
|
-
onClick: () =>
|
|
955
|
-
className:
|
|
991
|
+
onClick: () => I(!V),
|
|
992
|
+
className: c(
|
|
956
993
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
957
994
|
J ? "text-danger-fg" : "text-text-muted",
|
|
958
995
|
v
|
|
@@ -960,31 +997,31 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
960
997
|
children: t
|
|
961
998
|
}
|
|
962
999
|
),
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1001
|
+
/* @__PURE__ */ i(
|
|
965
1002
|
"button",
|
|
966
1003
|
{
|
|
967
1004
|
ref: K,
|
|
968
1005
|
type: "button",
|
|
969
1006
|
id: D,
|
|
970
1007
|
disabled: l,
|
|
971
|
-
onClick: () =>
|
|
972
|
-
className:
|
|
1008
|
+
onClick: () => I(!V),
|
|
1009
|
+
className: c(
|
|
973
1010
|
"flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
|
|
974
1011
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
975
1012
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
976
1013
|
"bg-surface",
|
|
977
|
-
|
|
1014
|
+
cr[s],
|
|
978
1015
|
J ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
979
1016
|
h
|
|
980
1017
|
),
|
|
981
1018
|
children: [
|
|
982
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children:
|
|
1019
|
+
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: P() }),
|
|
983
1020
|
/* @__PURE__ */ e(
|
|
984
|
-
|
|
1021
|
+
yt,
|
|
985
1022
|
{
|
|
986
1023
|
size: 16,
|
|
987
|
-
className:
|
|
1024
|
+
className: c(
|
|
988
1025
|
"shrink-0 opacity-60 transition-transform duration-fast",
|
|
989
1026
|
V && "rotate-180"
|
|
990
1027
|
)
|
|
@@ -993,27 +1030,27 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
993
1030
|
]
|
|
994
1031
|
}
|
|
995
1032
|
),
|
|
996
|
-
V && /* @__PURE__ */
|
|
1033
|
+
V && /* @__PURE__ */ i("div", { style: ie, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
|
|
997
1034
|
b && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
|
|
998
1035
|
"input",
|
|
999
1036
|
{
|
|
1000
1037
|
type: "text",
|
|
1001
1038
|
placeholder: "Search...",
|
|
1002
1039
|
value: H,
|
|
1003
|
-
onChange: (
|
|
1004
|
-
onKeyDown: (
|
|
1005
|
-
|
|
1040
|
+
onChange: ($) => te($.target.value),
|
|
1041
|
+
onKeyDown: ($) => {
|
|
1042
|
+
$.key === "Enter" && ee && ($.preventDefault(), X(H));
|
|
1006
1043
|
},
|
|
1007
|
-
className:
|
|
1044
|
+
className: c(
|
|
1008
1045
|
"w-full px-3 py-2 text-sm rounded-md border",
|
|
1009
1046
|
"text-text border-border focus-visible:outline-none focus-visible:focus-ring"
|
|
1010
1047
|
)
|
|
1011
1048
|
}
|
|
1012
1049
|
) }),
|
|
1013
|
-
ee && /* @__PURE__ */
|
|
1050
|
+
ee && /* @__PURE__ */ i(
|
|
1014
1051
|
"div",
|
|
1015
1052
|
{
|
|
1016
|
-
className:
|
|
1053
|
+
className: c(
|
|
1017
1054
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1018
1055
|
"text-info-fg hover:bg-surface-hover"
|
|
1019
1056
|
),
|
|
@@ -1025,30 +1062,30 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
1025
1062
|
]
|
|
1026
1063
|
}
|
|
1027
1064
|
),
|
|
1028
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ i("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
|
|
1029
1066
|
f && !p && /* @__PURE__ */ e(
|
|
1030
1067
|
"li",
|
|
1031
1068
|
{
|
|
1032
1069
|
className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
|
|
1033
1070
|
onClick: () => {
|
|
1034
|
-
g?.(""),
|
|
1071
|
+
g?.(""), I(!1);
|
|
1035
1072
|
},
|
|
1036
1073
|
children: f
|
|
1037
1074
|
}
|
|
1038
1075
|
),
|
|
1039
|
-
se.map((
|
|
1040
|
-
const _ = p ? Array.isArray(w) && w.includes(
|
|
1076
|
+
se.map(($) => {
|
|
1077
|
+
const _ = p ? Array.isArray(w) && w.includes($.value) : w === $.value;
|
|
1041
1078
|
return /* @__PURE__ */ e(
|
|
1042
1079
|
"li",
|
|
1043
1080
|
{
|
|
1044
|
-
onClick: () =>
|
|
1045
|
-
className:
|
|
1081
|
+
onClick: () => !$.disabled && A($.value),
|
|
1082
|
+
className: c(
|
|
1046
1083
|
"cursor-pointer px-3 py-1.5 text-sm",
|
|
1047
1084
|
"text-text",
|
|
1048
|
-
|
|
1085
|
+
$.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
|
|
1049
1086
|
_ && "bg-accent-soft text-accent font-semibold"
|
|
1050
1087
|
),
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1088
|
+
children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
1052
1089
|
p && /* @__PURE__ */ e(
|
|
1053
1090
|
"input",
|
|
1054
1091
|
{
|
|
@@ -1058,10 +1095,10 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
1058
1095
|
className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
|
|
1059
1096
|
}
|
|
1060
1097
|
),
|
|
1061
|
-
/* @__PURE__ */ e("span", { children:
|
|
1098
|
+
/* @__PURE__ */ e("span", { children: $.label })
|
|
1062
1099
|
] })
|
|
1063
1100
|
},
|
|
1064
|
-
|
|
1101
|
+
$.value
|
|
1065
1102
|
);
|
|
1066
1103
|
})
|
|
1067
1104
|
] })
|
|
@@ -1070,7 +1107,7 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
1070
1107
|
(n || r) && /* @__PURE__ */ e(
|
|
1071
1108
|
"p",
|
|
1072
1109
|
{
|
|
1073
|
-
className:
|
|
1110
|
+
className: c(
|
|
1074
1111
|
"mt-1 text-xs",
|
|
1075
1112
|
J ? "text-danger-fg" : "text-text-muted"
|
|
1076
1113
|
),
|
|
@@ -1082,13 +1119,13 @@ const Xt = () => /* @__PURE__ */ e(Z, { icon: ut, size: "md", color: "current" }
|
|
|
1082
1119
|
);
|
|
1083
1120
|
}
|
|
1084
1121
|
);
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1122
|
+
ze.displayName = "Select";
|
|
1123
|
+
const ir = {
|
|
1087
1124
|
sm: "h-control-sm px-3 text-sm",
|
|
1088
1125
|
md: "h-control-md px-3 text-base",
|
|
1089
1126
|
lg: "h-control-lg px-3 text-base",
|
|
1090
1127
|
full: "h-control-md px-3 text-base"
|
|
1091
|
-
},
|
|
1128
|
+
}, Ze = "mb-1.5 block text-sm font-medium", Qe = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", et = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
|
|
1092
1129
|
({
|
|
1093
1130
|
label: t,
|
|
1094
1131
|
helperText: r,
|
|
@@ -1104,21 +1141,21 @@ const tr = {
|
|
|
1104
1141
|
id: m,
|
|
1105
1142
|
...b
|
|
1106
1143
|
}, p) => {
|
|
1107
|
-
const w = ce.useId(), g = m || `textfield-${w}`, x = !!n,
|
|
1108
|
-
return /* @__PURE__ */
|
|
1144
|
+
const w = ce.useId(), g = m || `textfield-${w}`, x = !!n, T = n || r ? `${g}-description` : void 0;
|
|
1145
|
+
return /* @__PURE__ */ i("div", { className: c("flex flex-col", a && "w-full", d), children: [
|
|
1109
1146
|
t && /* @__PURE__ */ e(
|
|
1110
1147
|
"label",
|
|
1111
1148
|
{
|
|
1112
1149
|
htmlFor: g,
|
|
1113
|
-
className:
|
|
1114
|
-
|
|
1150
|
+
className: c(
|
|
1151
|
+
Ze,
|
|
1115
1152
|
x ? "text-danger-fg" : "text-text-muted",
|
|
1116
1153
|
v
|
|
1117
1154
|
),
|
|
1118
1155
|
children: t
|
|
1119
1156
|
}
|
|
1120
1157
|
),
|
|
1121
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1122
1159
|
l && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-muted", children: l }),
|
|
1123
1160
|
/* @__PURE__ */ e(
|
|
1124
1161
|
"input",
|
|
@@ -1126,13 +1163,13 @@ const tr = {
|
|
|
1126
1163
|
ref: p,
|
|
1127
1164
|
id: g,
|
|
1128
1165
|
"aria-invalid": x || void 0,
|
|
1129
|
-
"aria-describedby":
|
|
1130
|
-
className:
|
|
1131
|
-
|
|
1132
|
-
|
|
1166
|
+
"aria-describedby": T,
|
|
1167
|
+
className: c(
|
|
1168
|
+
Qe,
|
|
1169
|
+
ir[s],
|
|
1133
1170
|
l && "pl-9",
|
|
1134
1171
|
(o || f) && "pr-9",
|
|
1135
|
-
|
|
1172
|
+
et(x),
|
|
1136
1173
|
h
|
|
1137
1174
|
),
|
|
1138
1175
|
...b
|
|
@@ -1149,8 +1186,8 @@ const tr = {
|
|
|
1149
1186
|
(n || r) && /* @__PURE__ */ e(
|
|
1150
1187
|
"p",
|
|
1151
1188
|
{
|
|
1152
|
-
id:
|
|
1153
|
-
className:
|
|
1189
|
+
id: T,
|
|
1190
|
+
className: c("mt-1 text-xs", x ? "text-danger-fg" : "text-text-subtle"),
|
|
1154
1191
|
children: n || r
|
|
1155
1192
|
}
|
|
1156
1193
|
)
|
|
@@ -1158,7 +1195,7 @@ const tr = {
|
|
|
1158
1195
|
}
|
|
1159
1196
|
);
|
|
1160
1197
|
Ne.displayName = "TextField";
|
|
1161
|
-
function
|
|
1198
|
+
function dr({
|
|
1162
1199
|
value: t,
|
|
1163
1200
|
onChange: r,
|
|
1164
1201
|
onListFolders: n,
|
|
@@ -1179,9 +1216,9 @@ function rr({
|
|
|
1179
1216
|
};
|
|
1180
1217
|
}, []);
|
|
1181
1218
|
const h = t ?? {};
|
|
1182
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
1183
1220
|
/* @__PURE__ */ e(
|
|
1184
|
-
|
|
1221
|
+
ze,
|
|
1185
1222
|
{
|
|
1186
1223
|
size: a,
|
|
1187
1224
|
fullWidth: !0,
|
|
@@ -1203,24 +1240,24 @@ function rr({
|
|
|
1203
1240
|
)
|
|
1204
1241
|
] });
|
|
1205
1242
|
}
|
|
1206
|
-
const ve = (...t) => t.filter(Boolean).join(" "),
|
|
1243
|
+
const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(_e, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), mr = (t) => /* @__PURE__ */ e(Te, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), fr = {
|
|
1207
1244
|
sm: "h-control-sm px-3 text-sm",
|
|
1208
1245
|
md: "h-control-md px-3 text-base",
|
|
1209
1246
|
lg: "h-control-lg px-3 text-base",
|
|
1210
1247
|
full: "h-control-md w-full px-3 text-base"
|
|
1211
|
-
},
|
|
1248
|
+
}, Ie = {
|
|
1212
1249
|
sm: "h-4 w-4",
|
|
1213
1250
|
md: "h-5 w-5",
|
|
1214
1251
|
lg: "h-6 w-6",
|
|
1215
1252
|
full: "h-6 w-6"
|
|
1216
|
-
},
|
|
1253
|
+
}, hr = be(
|
|
1217
1254
|
({
|
|
1218
1255
|
label: t,
|
|
1219
1256
|
helperText: r,
|
|
1220
1257
|
error: n,
|
|
1221
1258
|
size: s = "md",
|
|
1222
1259
|
fullWidth: a = !1,
|
|
1223
|
-
startIcon: l = /* @__PURE__ */ e(
|
|
1260
|
+
startIcon: l = /* @__PURE__ */ e(ur, {}),
|
|
1224
1261
|
loading: o = !1,
|
|
1225
1262
|
containerClassName: f,
|
|
1226
1263
|
labelClassName: d,
|
|
@@ -1232,18 +1269,18 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1232
1269
|
debounceTime: w = 500,
|
|
1233
1270
|
showAllOnOpen: g = !1,
|
|
1234
1271
|
value: x,
|
|
1235
|
-
onChange:
|
|
1272
|
+
onChange: T,
|
|
1236
1273
|
...C
|
|
1237
1274
|
}, q) => {
|
|
1238
|
-
const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = ne(null),
|
|
1275
|
+
const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = ne(null), I = ne(null), [H, te] = O(x || ""), [Y, K] = O(!1), [ie, k] = O(!1), [u, E] = O(!1);
|
|
1239
1276
|
G(() => {
|
|
1240
1277
|
x !== void 0 && te(x);
|
|
1241
1278
|
}, [x]);
|
|
1242
1279
|
const y = pe(() => {
|
|
1243
1280
|
if (g && !u || !H) return m;
|
|
1244
|
-
const
|
|
1281
|
+
const P = String(H).toLowerCase();
|
|
1245
1282
|
return m.filter(
|
|
1246
|
-
(
|
|
1283
|
+
($) => String($.label).toLowerCase().includes(P)
|
|
1247
1284
|
);
|
|
1248
1285
|
}, [H, m, g, u]);
|
|
1249
1286
|
G(() => {
|
|
@@ -1251,34 +1288,34 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1251
1288
|
k(!1);
|
|
1252
1289
|
return;
|
|
1253
1290
|
}
|
|
1254
|
-
const
|
|
1291
|
+
const P = setTimeout(async () => {
|
|
1255
1292
|
k(!0);
|
|
1256
1293
|
try {
|
|
1257
1294
|
await b(String(H));
|
|
1258
|
-
} catch (
|
|
1259
|
-
console.error("Remote search failed:",
|
|
1295
|
+
} catch ($) {
|
|
1296
|
+
console.error("Remote search failed:", $);
|
|
1260
1297
|
} finally {
|
|
1261
1298
|
k(!1);
|
|
1262
1299
|
}
|
|
1263
1300
|
}, w);
|
|
1264
1301
|
return () => {
|
|
1265
|
-
clearTimeout(
|
|
1302
|
+
clearTimeout(P), k(!1);
|
|
1266
1303
|
};
|
|
1267
1304
|
}, [H, w, b]), G(() => {
|
|
1268
|
-
const
|
|
1269
|
-
V.current && !V.current.contains(
|
|
1305
|
+
const P = ($) => {
|
|
1306
|
+
V.current && !V.current.contains($.target) && K(!1);
|
|
1270
1307
|
};
|
|
1271
|
-
return document.addEventListener("mousedown",
|
|
1308
|
+
return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
|
|
1272
1309
|
}, []);
|
|
1273
|
-
const A = (
|
|
1274
|
-
const
|
|
1275
|
-
te(
|
|
1276
|
-
}, N = (
|
|
1277
|
-
te(
|
|
1310
|
+
const A = (P) => {
|
|
1311
|
+
const $ = P.target.value;
|
|
1312
|
+
te($), K(!0), E(!0), T && T(P);
|
|
1313
|
+
}, N = (P) => {
|
|
1314
|
+
te(P.label), K(!1), E(!1), p && p(P.value);
|
|
1278
1315
|
}, W = () => {
|
|
1279
1316
|
(m.length > 0 || b) && (K(!0), E(!1));
|
|
1280
|
-
}, se = o || ie, ee = Y && (y.length > 0 || se), X = pe(() => q ||
|
|
1281
|
-
return /* @__PURE__ */
|
|
1317
|
+
}, se = o || ie, ee = Y && (y.length > 0 || se), X = pe(() => q || I, [q]);
|
|
1318
|
+
return /* @__PURE__ */ i(
|
|
1282
1319
|
"div",
|
|
1283
1320
|
{
|
|
1284
1321
|
className: ve(
|
|
@@ -1301,8 +1338,8 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1301
1338
|
children: t
|
|
1302
1339
|
}
|
|
1303
1340
|
),
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ve("text-text-muted",
|
|
1341
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1342
|
+
l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ve("text-text-muted", Ie[s]), children: l }) }),
|
|
1306
1343
|
/* @__PURE__ */ e(
|
|
1307
1344
|
"input",
|
|
1308
1345
|
{
|
|
@@ -1317,7 +1354,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1317
1354
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1318
1355
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1319
1356
|
// Size styles
|
|
1320
|
-
|
|
1357
|
+
fr[s],
|
|
1321
1358
|
// Icon padding
|
|
1322
1359
|
l ? "pl-10" : "",
|
|
1323
1360
|
"pr-10",
|
|
@@ -1332,24 +1369,24 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1332
1369
|
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: se || o ? (
|
|
1333
1370
|
// Loading Spinner
|
|
1334
1371
|
/* @__PURE__ */ e(
|
|
1335
|
-
|
|
1372
|
+
Nt,
|
|
1336
1373
|
{
|
|
1337
|
-
className: ve("animate-spin text-info-fg",
|
|
1374
|
+
className: ve("animate-spin text-info-fg", Ie[s]),
|
|
1338
1375
|
"aria-hidden": !0
|
|
1339
1376
|
}
|
|
1340
1377
|
)
|
|
1341
1378
|
) : (
|
|
1342
1379
|
// Dropdown Chevron
|
|
1343
1380
|
/* @__PURE__ */ e(
|
|
1344
|
-
|
|
1381
|
+
mr,
|
|
1345
1382
|
{
|
|
1346
1383
|
className: ve(
|
|
1347
1384
|
"text-text-muted cursor-pointer transition-transform",
|
|
1348
|
-
|
|
1385
|
+
Ie[s],
|
|
1349
1386
|
Y ? "rotate-180" : "rotate-0"
|
|
1350
1387
|
),
|
|
1351
1388
|
onClick: () => {
|
|
1352
|
-
K((
|
|
1389
|
+
K((P) => (P || E(!1), !P));
|
|
1353
1390
|
}
|
|
1354
1391
|
}
|
|
1355
1392
|
)
|
|
@@ -1360,16 +1397,16 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1360
1397
|
{
|
|
1361
1398
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1362
1399
|
role: "listbox",
|
|
1363
|
-
children: y.length > 0 ? y.map((
|
|
1400
|
+
children: y.length > 0 ? y.map((P) => /* @__PURE__ */ e(
|
|
1364
1401
|
"li",
|
|
1365
1402
|
{
|
|
1366
1403
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
1367
|
-
onClick: () => N(
|
|
1404
|
+
onClick: () => N(P),
|
|
1368
1405
|
role: "option",
|
|
1369
|
-
"aria-selected": H ===
|
|
1370
|
-
children:
|
|
1406
|
+
"aria-selected": H === P.label,
|
|
1407
|
+
children: P.label
|
|
1371
1408
|
},
|
|
1372
|
-
|
|
1409
|
+
P.value
|
|
1373
1410
|
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: se || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
1374
1411
|
}
|
|
1375
1412
|
),
|
|
@@ -1383,7 +1420,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1383
1420
|
children: n || r
|
|
1384
1421
|
}
|
|
1385
1422
|
),
|
|
1386
|
-
b && /* @__PURE__ */
|
|
1423
|
+
b && /* @__PURE__ */ i("p", { className: "mt-2 text-xs text-success-fg", children: [
|
|
1387
1424
|
"Huidige zoekterm (niet-gedebounced): ",
|
|
1388
1425
|
String(H)
|
|
1389
1426
|
] })
|
|
@@ -1392,8 +1429,8 @@ const ve = (...t) => t.filter(Boolean).join(" "), nr = (t) => /* @__PURE__ */ e(
|
|
|
1392
1429
|
);
|
|
1393
1430
|
}
|
|
1394
1431
|
);
|
|
1395
|
-
|
|
1396
|
-
const
|
|
1432
|
+
hr.displayName = "SearchableTextField";
|
|
1433
|
+
const tt = be(
|
|
1397
1434
|
({
|
|
1398
1435
|
value: t,
|
|
1399
1436
|
onValueChange: r,
|
|
@@ -1404,10 +1441,10 @@ const Ze = be(
|
|
|
1404
1441
|
className: o,
|
|
1405
1442
|
disabled: f,
|
|
1406
1443
|
...d
|
|
1407
|
-
}, v) => /* @__PURE__ */
|
|
1444
|
+
}, v) => /* @__PURE__ */ i(
|
|
1408
1445
|
"div",
|
|
1409
1446
|
{
|
|
1410
|
-
className:
|
|
1447
|
+
className: c(
|
|
1411
1448
|
// No focus ring: the plate is a container, not the control, and a ring
|
|
1412
1449
|
// around a frameless search box reads as the border it deliberately
|
|
1413
1450
|
// does not have.
|
|
@@ -1418,7 +1455,7 @@ const Ze = be(
|
|
|
1418
1455
|
l
|
|
1419
1456
|
),
|
|
1420
1457
|
children: [
|
|
1421
|
-
/* @__PURE__ */ e(Z, { icon:
|
|
1458
|
+
/* @__PURE__ */ e(Z, { icon: _e, size: "md", color: "current", className: "shrink-0" }),
|
|
1422
1459
|
/* @__PURE__ */ e(
|
|
1423
1460
|
"input",
|
|
1424
1461
|
{
|
|
@@ -1427,7 +1464,7 @@ const Ze = be(
|
|
|
1427
1464
|
value: t,
|
|
1428
1465
|
disabled: f,
|
|
1429
1466
|
onChange: (h) => r(h.target.value),
|
|
1430
|
-
className:
|
|
1467
|
+
className: c(
|
|
1431
1468
|
// The forms base layer hands every input a white fill, a 1px border
|
|
1432
1469
|
// and a blue focus ring; a field that is only a caret inside a plate
|
|
1433
1470
|
// has to switch all three off explicitly. Padding too — the base rule
|
|
@@ -1457,14 +1494,14 @@ const Ze = be(
|
|
|
1457
1494
|
}
|
|
1458
1495
|
)
|
|
1459
1496
|
);
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1497
|
+
tt.displayName = "SearchField";
|
|
1498
|
+
const xr = be(
|
|
1462
1499
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
1463
1500
|
const f = /* @__PURE__ */ e(
|
|
1464
1501
|
"span",
|
|
1465
1502
|
{
|
|
1466
1503
|
"aria-hidden": !0,
|
|
1467
|
-
className:
|
|
1504
|
+
className: c(
|
|
1468
1505
|
"relative inline-flex size-switch-track shrink-0 items-center rounded-full",
|
|
1469
1506
|
"transition-colors duration-fast ease-out",
|
|
1470
1507
|
t ? "bg-accent" : "bg-surface-hover",
|
|
@@ -1473,7 +1510,7 @@ const or = be(
|
|
|
1473
1510
|
children: /* @__PURE__ */ e(
|
|
1474
1511
|
"span",
|
|
1475
1512
|
{
|
|
1476
|
-
className:
|
|
1513
|
+
className: c(
|
|
1477
1514
|
"absolute left-0.5 size-switch-knob rounded-full bg-surface shadow-overlay",
|
|
1478
1515
|
"transition-transform duration-fast ease-out",
|
|
1479
1516
|
t && "translate-switch"
|
|
@@ -1482,10 +1519,10 @@ const or = be(
|
|
|
1482
1519
|
)
|
|
1483
1520
|
}
|
|
1484
1521
|
);
|
|
1485
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ i(
|
|
1486
1523
|
"label",
|
|
1487
1524
|
{
|
|
1488
|
-
className:
|
|
1525
|
+
className: c(
|
|
1489
1526
|
"inline-flex items-center gap-2",
|
|
1490
1527
|
s ? "cursor-not-allowed" : "cursor-pointer",
|
|
1491
1528
|
a
|
|
@@ -1511,8 +1548,8 @@ const or = be(
|
|
|
1511
1548
|
);
|
|
1512
1549
|
}
|
|
1513
1550
|
);
|
|
1514
|
-
|
|
1515
|
-
const
|
|
1551
|
+
xr.displayName = "Switch";
|
|
1552
|
+
const br = ({
|
|
1516
1553
|
trigger: t,
|
|
1517
1554
|
options: r,
|
|
1518
1555
|
value: n,
|
|
@@ -1523,7 +1560,7 @@ const cr = ({
|
|
|
1523
1560
|
showCheck: f = !0,
|
|
1524
1561
|
header: d
|
|
1525
1562
|
}) => {
|
|
1526
|
-
const [v, h] = O(!1), [m, b] = O(null), [p, w] = O({ top: 0, left: 0 }), g = ne(null), x = ne(null),
|
|
1563
|
+
const [v, h] = O(!1), [m, b] = O(null), [p, w] = O({ top: 0, left: 0 }), g = ne(null), x = ne(null), T = ne(null), C = ne(null), q = De(v, x, { placement: a }), D = ne(null), J = () => Array.from(
|
|
1527
1564
|
C.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1528
1565
|
);
|
|
1529
1566
|
G(() => {
|
|
@@ -1539,7 +1576,7 @@ const cr = ({
|
|
|
1539
1576
|
};
|
|
1540
1577
|
G(() => {
|
|
1541
1578
|
const u = (E) => {
|
|
1542
|
-
g.current && (!g.current.contains(E.target) ||
|
|
1579
|
+
g.current && (!g.current.contains(E.target) || T.current && !T.current.contains(E.target)) && (h(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1543
1580
|
};
|
|
1544
1581
|
return v && document.addEventListener("mousedown", u), () => {
|
|
1545
1582
|
document.removeEventListener("mousedown", u);
|
|
@@ -1567,7 +1604,7 @@ const cr = ({
|
|
|
1567
1604
|
}, [m]), G(() => () => {
|
|
1568
1605
|
D.current && clearTimeout(D.current);
|
|
1569
1606
|
}, []);
|
|
1570
|
-
const
|
|
1607
|
+
const I = (u) => {
|
|
1571
1608
|
u.stopPropagation(), !l && (h(!v), b(null), D.current && (clearTimeout(D.current), D.current = null));
|
|
1572
1609
|
}, H = (u, E, y) => {
|
|
1573
1610
|
u.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, y), h(!1), b(null));
|
|
@@ -1579,18 +1616,18 @@ const cr = ({
|
|
|
1579
1616
|
}, 150) : b(null);
|
|
1580
1617
|
}, K = (u, E, y) => {
|
|
1581
1618
|
u.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, y), h(!1), b(null));
|
|
1582
|
-
}, ie =
|
|
1619
|
+
}, ie = c(
|
|
1583
1620
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1584
1621
|
"max-h-60 overflow-auto"
|
|
1585
|
-
), k =
|
|
1622
|
+
), k = c(
|
|
1586
1623
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
1587
1624
|
"max-h-60 overflow-auto"
|
|
1588
1625
|
);
|
|
1589
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ i(
|
|
1590
1627
|
"div",
|
|
1591
1628
|
{
|
|
1592
1629
|
ref: g,
|
|
1593
|
-
className:
|
|
1630
|
+
className: c(
|
|
1594
1631
|
"relative flex flex-row items-center justify-center rounded-lg hover:bg-surface-hover",
|
|
1595
1632
|
o
|
|
1596
1633
|
),
|
|
@@ -1599,17 +1636,17 @@ const cr = ({
|
|
|
1599
1636
|
"button",
|
|
1600
1637
|
{
|
|
1601
1638
|
ref: x,
|
|
1602
|
-
onClick:
|
|
1639
|
+
onClick: I,
|
|
1603
1640
|
disabled: l,
|
|
1604
1641
|
"aria-haspopup": "menu",
|
|
1605
1642
|
"aria-expanded": v,
|
|
1606
|
-
className:
|
|
1643
|
+
className: c("inline-flex items-center justify-center", {
|
|
1607
1644
|
"opacity-50 cursor-not-allowed": l
|
|
1608
1645
|
}),
|
|
1609
1646
|
children: t
|
|
1610
1647
|
}
|
|
1611
1648
|
),
|
|
1612
|
-
v && /* @__PURE__ */ e("div", { ref: C, className: ie, style: q, onKeyDown: V, children: /* @__PURE__ */
|
|
1649
|
+
v && /* @__PURE__ */ e("div", { ref: C, className: ie, style: q, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
|
|
1613
1650
|
d && (typeof d == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: d }) : d),
|
|
1614
1651
|
r.map((u, E) => {
|
|
1615
1652
|
if (u.divider)
|
|
@@ -1621,8 +1658,8 @@ const cr = ({
|
|
|
1621
1658
|
`divider-${E}`
|
|
1622
1659
|
);
|
|
1623
1660
|
const y = u.children && u.children.length > 0, A = m === u.value;
|
|
1624
|
-
return /* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ i("div", { className: "relative group", children: [
|
|
1662
|
+
/* @__PURE__ */ i(
|
|
1626
1663
|
"button",
|
|
1627
1664
|
{
|
|
1628
1665
|
"data-option-value": u.value,
|
|
@@ -1632,7 +1669,7 @@ const cr = ({
|
|
|
1632
1669
|
onMouseEnter: () => te(u),
|
|
1633
1670
|
onMouseLeave: () => Y(u),
|
|
1634
1671
|
disabled: u.disabled,
|
|
1635
|
-
className:
|
|
1672
|
+
className: c(
|
|
1636
1673
|
"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",
|
|
1637
1674
|
{
|
|
1638
1675
|
"opacity-50 cursor-not-allowed": u.disabled,
|
|
@@ -1640,15 +1677,15 @@ const cr = ({
|
|
|
1640
1677
|
}
|
|
1641
1678
|
),
|
|
1642
1679
|
children: [
|
|
1643
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
1644
1681
|
u.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: u.icon }),
|
|
1645
|
-
/* @__PURE__ */
|
|
1682
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
1646
1683
|
/* @__PURE__ */ e("span", { className: "font-base truncate", children: u.label }),
|
|
1647
1684
|
u.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: u.description })
|
|
1648
1685
|
] })
|
|
1649
1686
|
] }),
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
f && n === u.value && /* @__PURE__ */ e(
|
|
1687
|
+
/* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
1688
|
+
f && n === u.value && /* @__PURE__ */ e(Oe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
|
|
1652
1689
|
y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
|
|
1653
1690
|
] })
|
|
1654
1691
|
]
|
|
@@ -1657,7 +1694,7 @@ const cr = ({
|
|
|
1657
1694
|
y && A && /* @__PURE__ */ e(
|
|
1658
1695
|
"div",
|
|
1659
1696
|
{
|
|
1660
|
-
ref:
|
|
1697
|
+
ref: T,
|
|
1661
1698
|
className: k,
|
|
1662
1699
|
style: {
|
|
1663
1700
|
top: `${p.top}px`,
|
|
@@ -1683,7 +1720,7 @@ const cr = ({
|
|
|
1683
1720
|
const se = typeof n == "object" && n[u.value] && n[u.value].includes(
|
|
1684
1721
|
N.value
|
|
1685
1722
|
) || n === N.value;
|
|
1686
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ i(
|
|
1687
1724
|
"button",
|
|
1688
1725
|
{
|
|
1689
1726
|
onClick: (ee) => K(
|
|
@@ -1692,21 +1729,21 @@ const cr = ({
|
|
|
1692
1729
|
u.value
|
|
1693
1730
|
),
|
|
1694
1731
|
disabled: N.disabled,
|
|
1695
|
-
className:
|
|
1732
|
+
className: c(
|
|
1696
1733
|
"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",
|
|
1697
1734
|
{
|
|
1698
1735
|
"opacity-50 cursor-not-allowed": N.disabled
|
|
1699
1736
|
}
|
|
1700
1737
|
),
|
|
1701
1738
|
children: [
|
|
1702
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
1703
1740
|
N.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: N.icon }),
|
|
1704
|
-
/* @__PURE__ */
|
|
1741
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
1705
1742
|
/* @__PURE__ */ e("span", { className: "font-base truncate", children: N.label }),
|
|
1706
1743
|
N.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: N.description })
|
|
1707
1744
|
] })
|
|
1708
1745
|
] }),
|
|
1709
|
-
f && se && /* @__PURE__ */ e(
|
|
1746
|
+
f && se && /* @__PURE__ */ e(Oe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
|
|
1710
1747
|
]
|
|
1711
1748
|
},
|
|
1712
1749
|
N.value
|
|
@@ -1722,7 +1759,7 @@ const cr = ({
|
|
|
1722
1759
|
const A = y.children ? y.children.filter((N) => !N.divider).length : 0;
|
|
1723
1760
|
return E + 1 + A;
|
|
1724
1761
|
}, 0);
|
|
1725
|
-
return u > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */
|
|
1762
|
+
return u > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
1726
1763
|
u,
|
|
1727
1764
|
" options available"
|
|
1728
1765
|
] }) });
|
|
@@ -1731,13 +1768,13 @@ const cr = ({
|
|
|
1731
1768
|
]
|
|
1732
1769
|
}
|
|
1733
1770
|
);
|
|
1734
|
-
},
|
|
1771
|
+
}, Me = ({
|
|
1735
1772
|
actions: t,
|
|
1736
1773
|
defaultVariant: r = "secondary",
|
|
1737
1774
|
className: n
|
|
1738
|
-
}) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className:
|
|
1775
|
+
}) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: c("flex flex-wrap items-center gap-2", n), children: t.map(
|
|
1739
1776
|
(s) => s.render ? /* @__PURE__ */ e(ce.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
1740
|
-
|
|
1777
|
+
Xe,
|
|
1741
1778
|
{
|
|
1742
1779
|
label: s.label,
|
|
1743
1780
|
onClick: s.onClick,
|
|
@@ -1760,19 +1797,19 @@ const cr = ({
|
|
|
1760
1797
|
},
|
|
1761
1798
|
s.id
|
|
1762
1799
|
)
|
|
1763
|
-
) }),
|
|
1800
|
+
) }), gr = {
|
|
1764
1801
|
none: "p-0",
|
|
1765
1802
|
sm: "p-2",
|
|
1766
1803
|
md: "px-5 py-4",
|
|
1767
1804
|
lg: "p-6"
|
|
1768
|
-
},
|
|
1805
|
+
}, Hn = ({
|
|
1769
1806
|
actions: t = [],
|
|
1770
1807
|
onBack: r,
|
|
1771
1808
|
backLabel: n = "Back",
|
|
1772
1809
|
className: s,
|
|
1773
1810
|
padding: a = "md",
|
|
1774
1811
|
children: l
|
|
1775
|
-
}) => /* @__PURE__ */
|
|
1812
|
+
}) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2", gr[a], s), children: [
|
|
1776
1813
|
r && /* @__PURE__ */ e(
|
|
1777
1814
|
le,
|
|
1778
1815
|
{
|
|
@@ -1784,25 +1821,25 @@ const cr = ({
|
|
|
1784
1821
|
}
|
|
1785
1822
|
),
|
|
1786
1823
|
l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
|
|
1787
|
-
/* @__PURE__ */ e(
|
|
1788
|
-
] }),
|
|
1824
|
+
/* @__PURE__ */ e(Me, { actions: t, className: c(!l && "ml-auto") })
|
|
1825
|
+
] }), Vn = (t) => (r) => t(r instanceof Date ? r : null), qn = (t) => (r) => t(typeof r == "string" ? r : ""), pr = {
|
|
1789
1826
|
none: "px-0",
|
|
1790
1827
|
sm: "px-2",
|
|
1791
1828
|
md: "px-3.5",
|
|
1792
1829
|
lg: "px-5"
|
|
1793
|
-
},
|
|
1830
|
+
}, vr = {
|
|
1794
1831
|
sm: "h-row-lg",
|
|
1795
1832
|
md: "h-row-xl",
|
|
1796
1833
|
lg: "h-14"
|
|
1797
|
-
},
|
|
1798
|
-
function
|
|
1834
|
+
}, yr = 8, He = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
|
|
1835
|
+
function Nr(t, r) {
|
|
1799
1836
|
if (r <= 7) return Array.from({ length: r }, (l, o) => o);
|
|
1800
1837
|
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 = [];
|
|
1801
1838
|
return s.forEach((l, o) => {
|
|
1802
1839
|
o > 0 && l - s[o - 1] > 1 && a.push("gap"), a.push(l);
|
|
1803
1840
|
}), a;
|
|
1804
1841
|
}
|
|
1805
|
-
const
|
|
1842
|
+
const wr = (t) => {
|
|
1806
1843
|
const r = Array.isArray(t.value) ? t.value : t.value != null && t.value !== "" && t.value !== "all" ? [t.value] : [];
|
|
1807
1844
|
if (t.type === "date") {
|
|
1808
1845
|
const o = t.value instanceof Date;
|
|
@@ -1812,7 +1849,7 @@ const hr = (t) => {
|
|
|
1812
1849
|
value: t.value,
|
|
1813
1850
|
onChange: (f) => t.onChange(f),
|
|
1814
1851
|
placeholder: t.placeholder || t.label,
|
|
1815
|
-
className:
|
|
1852
|
+
className: c("min-w-40", o && "bg-info-soft text-info-fg")
|
|
1816
1853
|
}
|
|
1817
1854
|
);
|
|
1818
1855
|
}
|
|
@@ -1824,7 +1861,7 @@ const hr = (t) => {
|
|
|
1824
1861
|
);
|
|
1825
1862
|
}, l = r.length > 0;
|
|
1826
1863
|
return /* @__PURE__ */ e(
|
|
1827
|
-
|
|
1864
|
+
Gt,
|
|
1828
1865
|
{
|
|
1829
1866
|
tone: "outline",
|
|
1830
1867
|
caret: !0,
|
|
@@ -1842,7 +1879,7 @@ const hr = (t) => {
|
|
|
1842
1879
|
onClick: () => {
|
|
1843
1880
|
a(f.value), t.multiSelect || o();
|
|
1844
1881
|
},
|
|
1845
|
-
className:
|
|
1882
|
+
className: c(
|
|
1846
1883
|
"flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm",
|
|
1847
1884
|
"transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
1848
1885
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -1854,7 +1891,7 @@ const hr = (t) => {
|
|
|
1854
1891
|
)) })
|
|
1855
1892
|
}
|
|
1856
1893
|
);
|
|
1857
|
-
},
|
|
1894
|
+
}, Ve = ({
|
|
1858
1895
|
data: t,
|
|
1859
1896
|
columns: r,
|
|
1860
1897
|
loading: n = !1,
|
|
@@ -1872,13 +1909,13 @@ const hr = (t) => {
|
|
|
1872
1909
|
selectedRows: w = [],
|
|
1873
1910
|
onSelectionChange: g,
|
|
1874
1911
|
getRowKey: x = (te, Y) => Y,
|
|
1875
|
-
emptyContent:
|
|
1912
|
+
emptyContent: T,
|
|
1876
1913
|
footerSummary: C,
|
|
1877
1914
|
size: q = "md",
|
|
1878
1915
|
hoverable: D = !0,
|
|
1879
1916
|
padding: J = "md",
|
|
1880
1917
|
className: V,
|
|
1881
|
-
rowClassName:
|
|
1918
|
+
rowClassName: I,
|
|
1882
1919
|
headerBackground: H = !0
|
|
1883
1920
|
}) => {
|
|
1884
1921
|
const [te, Y] = O(""), K = l !== void 0, ie = K ? l : te, k = o ?? Y, [u, E] = O({
|
|
@@ -1923,9 +1960,9 @@ const hr = (t) => {
|
|
|
1923
1960
|
r.find((re) => re.id === S)?.sortable && E((re) => re.column !== S ? { column: S, direction: "asc" } : re.direction === "asc" ? { column: S, direction: "desc" } : { column: null, direction: null });
|
|
1924
1961
|
},
|
|
1925
1962
|
[r]
|
|
1926
|
-
),
|
|
1963
|
+
), P = xe((S) => {
|
|
1927
1964
|
A((U) => ({ ...U, page: S }));
|
|
1928
|
-
}, []),
|
|
1965
|
+
}, []), $ = xe(
|
|
1929
1966
|
(S, U) => {
|
|
1930
1967
|
if (!g) return;
|
|
1931
1968
|
const re = x(S, 0);
|
|
@@ -1955,11 +1992,11 @@ const hr = (t) => {
|
|
|
1955
1992
|
return w.some(
|
|
1956
1993
|
(re, oe) => x(re, oe) === U
|
|
1957
1994
|
);
|
|
1958
|
-
}), Q =
|
|
1959
|
-
return /* @__PURE__ */
|
|
1960
|
-
ge && /* @__PURE__ */
|
|
1995
|
+
}), Q = pr[J], ae = H ? "bg-surface-sunk" : "bg-surface", de = c("text-text", Q), ge = s || f.length > 0 || d.length > 0, he = v && z > 0, Ae = he || C !== void 0;
|
|
1996
|
+
return /* @__PURE__ */ i("div", { className: c("flex min-w-0 flex-col", V), children: [
|
|
1997
|
+
ge && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
|
|
1961
1998
|
s && /* @__PURE__ */ e(
|
|
1962
|
-
|
|
1999
|
+
tt,
|
|
1963
2000
|
{
|
|
1964
2001
|
value: ie,
|
|
1965
2002
|
onValueChange: k,
|
|
@@ -1967,12 +2004,12 @@ const hr = (t) => {
|
|
|
1967
2004
|
containerClassName: "w-full sm:w-66"
|
|
1968
2005
|
}
|
|
1969
2006
|
),
|
|
1970
|
-
f.map((S) => /* @__PURE__ */ e(
|
|
1971
|
-
d.length > 0 && /* @__PURE__ */ e(
|
|
2007
|
+
f.map((S) => /* @__PURE__ */ e(wr, { ...S }, S.id)),
|
|
2008
|
+
d.length > 0 && /* @__PURE__ */ e(Me, { actions: d, className: "ml-auto" })
|
|
1972
2009
|
] }),
|
|
1973
|
-
/* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */
|
|
1974
|
-
/* @__PURE__ */ e("thead", { className:
|
|
1975
|
-
p && /* @__PURE__ */ e("th", { className:
|
|
2010
|
+
/* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ i("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
|
|
2011
|
+
/* @__PURE__ */ e("thead", { className: c(ae, "h-control-lg"), children: /* @__PURE__ */ i("tr", { children: [
|
|
2012
|
+
p && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e(
|
|
1976
2013
|
ye,
|
|
1977
2014
|
{
|
|
1978
2015
|
size: "sm",
|
|
@@ -1985,7 +2022,7 @@ const hr = (t) => {
|
|
|
1985
2022
|
r.map((S) => /* @__PURE__ */ e(
|
|
1986
2023
|
"th",
|
|
1987
2024
|
{
|
|
1988
|
-
className:
|
|
2025
|
+
className: c(
|
|
1989
2026
|
de,
|
|
1990
2027
|
"text-xs font-semibold uppercase tracking-label text-text-muted",
|
|
1991
2028
|
"group",
|
|
@@ -2000,14 +2037,14 @@ const hr = (t) => {
|
|
|
2000
2037
|
),
|
|
2001
2038
|
style: { width: S.width },
|
|
2002
2039
|
onClick: () => S.sortable && X(S.id),
|
|
2003
|
-
children: /* @__PURE__ */
|
|
2040
|
+
children: /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
|
|
2004
2041
|
S.headerCell ? S.headerCell() : S.header,
|
|
2005
2042
|
S.sortable && /* @__PURE__ */ e(
|
|
2006
2043
|
Z,
|
|
2007
2044
|
{
|
|
2008
|
-
icon: u.column === S.id && u.direction === "desc" ?
|
|
2045
|
+
icon: u.column === S.id && u.direction === "desc" ? Te : wt,
|
|
2009
2046
|
size: "xs",
|
|
2010
|
-
className:
|
|
2047
|
+
className: c(
|
|
2011
2048
|
"transition-opacity duration-fast ease-out",
|
|
2012
2049
|
u.column === S.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
|
|
2013
2050
|
)
|
|
@@ -2017,44 +2054,44 @@ const hr = (t) => {
|
|
|
2017
2054
|
},
|
|
2018
2055
|
S.id
|
|
2019
2056
|
)),
|
|
2020
|
-
m.length > 0 && /* @__PURE__ */ e("th", { className:
|
|
2057
|
+
m.length > 0 && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
2021
2058
|
] }) }),
|
|
2022
|
-
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length:
|
|
2023
|
-
p && /* @__PURE__ */ e("td", { className:
|
|
2024
|
-
r.map((re, oe) => /* @__PURE__ */ e("td", { className:
|
|
2059
|
+
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: yr }).map((S, U) => /* @__PURE__ */ i("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
|
|
2060
|
+
p && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
|
|
2061
|
+
r.map((re, oe) => /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), style: { width: re.width }, children: /* @__PURE__ */ e(
|
|
2025
2062
|
"span",
|
|
2026
2063
|
{
|
|
2027
2064
|
className: "block h-3 rounded-xs bg-surface-hover",
|
|
2028
|
-
style: { width:
|
|
2065
|
+
style: { width: He[(U + oe) % He.length] }
|
|
2029
2066
|
}
|
|
2030
2067
|
) }, re.id)),
|
|
2031
|
-
m.length > 0 && /* @__PURE__ */ e("td", { className:
|
|
2068
|
+
m.length > 0 && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg") })
|
|
2032
2069
|
] }, `skeleton-${U}`)) : ee.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
2033
2070
|
"td",
|
|
2034
2071
|
{
|
|
2035
2072
|
colSpan: r.length + (p ? 1 : 0) + (m.length > 0 ? 1 : 0),
|
|
2036
|
-
className:
|
|
2073
|
+
className: c(
|
|
2037
2074
|
de,
|
|
2038
2075
|
"border-t border-border-subtle py-10 text-center text-text-muted"
|
|
2039
2076
|
),
|
|
2040
|
-
children:
|
|
2077
|
+
children: T || "No data available"
|
|
2041
2078
|
}
|
|
2042
2079
|
) }) : ee.map((S, U) => {
|
|
2043
2080
|
const re = x(S, U), oe = w.some(
|
|
2044
2081
|
(R, ue) => x(R, ue) === re
|
|
2045
2082
|
);
|
|
2046
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ i(
|
|
2047
2084
|
"tr",
|
|
2048
2085
|
{
|
|
2049
|
-
className:
|
|
2050
|
-
|
|
2086
|
+
className: c(
|
|
2087
|
+
vr[q],
|
|
2051
2088
|
// Hairline above every row, including the first: it is
|
|
2052
2089
|
// what separates the body from the column strip.
|
|
2053
2090
|
"border-t border-border-subtle",
|
|
2054
2091
|
D && "transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
2055
2092
|
b && "cursor-pointer",
|
|
2056
2093
|
oe && "bg-accent-soft",
|
|
2057
|
-
|
|
2094
|
+
I?.(S, U)
|
|
2058
2095
|
),
|
|
2059
2096
|
onClick: (R) => {
|
|
2060
2097
|
R.stopPropagation(), b?.(S, U);
|
|
@@ -2067,7 +2104,7 @@ const hr = (t) => {
|
|
|
2067
2104
|
checked: oe,
|
|
2068
2105
|
onClick: (R) => R.stopPropagation(),
|
|
2069
2106
|
onChange: (R) => {
|
|
2070
|
-
R.stopPropagation(),
|
|
2107
|
+
R.stopPropagation(), $(S, R.target.checked);
|
|
2071
2108
|
},
|
|
2072
2109
|
"aria-label": "Select row"
|
|
2073
2110
|
}
|
|
@@ -2077,7 +2114,7 @@ const hr = (t) => {
|
|
|
2077
2114
|
return /* @__PURE__ */ e(
|
|
2078
2115
|
"td",
|
|
2079
2116
|
{
|
|
2080
|
-
className:
|
|
2117
|
+
className: c(de, {
|
|
2081
2118
|
"text-left": R.align === "left" || !R.align,
|
|
2082
2119
|
"text-center": R.align === "center",
|
|
2083
2120
|
"text-right": R.align === "right",
|
|
@@ -2090,10 +2127,10 @@ const hr = (t) => {
|
|
|
2090
2127
|
);
|
|
2091
2128
|
}),
|
|
2092
2129
|
m.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
|
|
2093
|
-
|
|
2130
|
+
br,
|
|
2094
2131
|
{
|
|
2095
2132
|
className: "rounded-md",
|
|
2096
|
-
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon:
|
|
2133
|
+
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon: kt, size: "md", color: "current" }) }),
|
|
2097
2134
|
options: m.map((R) => ({
|
|
2098
2135
|
value: R.id,
|
|
2099
2136
|
label: R.label,
|
|
@@ -2102,7 +2139,7 @@ const hr = (t) => {
|
|
|
2102
2139
|
})),
|
|
2103
2140
|
onSelect: (R) => {
|
|
2104
2141
|
const ue = m.find(
|
|
2105
|
-
(
|
|
2142
|
+
(ot) => ot.id === R
|
|
2106
2143
|
);
|
|
2107
2144
|
ue && ue.onClick(S, U);
|
|
2108
2145
|
},
|
|
@@ -2115,9 +2152,9 @@ const hr = (t) => {
|
|
|
2115
2152
|
);
|
|
2116
2153
|
}) })
|
|
2117
2154
|
] }) }),
|
|
2118
|
-
|
|
2155
|
+
Ae && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
|
|
2119
2156
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: C ?? `Showing ${j}–${B} of ${z}` }),
|
|
2120
|
-
he && /* @__PURE__ */
|
|
2157
|
+
he && /* @__PURE__ */ i("div", { className: "flex items-center gap-0.5", children: [
|
|
2121
2158
|
/* @__PURE__ */ e(
|
|
2122
2159
|
le,
|
|
2123
2160
|
{
|
|
@@ -2125,19 +2162,19 @@ const hr = (t) => {
|
|
|
2125
2162
|
variant: "ghost",
|
|
2126
2163
|
iconOnly: !0,
|
|
2127
2164
|
"aria-label": "Previous page",
|
|
2128
|
-
onClick: () =>
|
|
2165
|
+
onClick: () => P(y.page - 1),
|
|
2129
2166
|
disabled: y.page === 0,
|
|
2130
2167
|
children: /* @__PURE__ */ e(Z, { icon: Ce, size: "md", color: "current" })
|
|
2131
2168
|
}
|
|
2132
2169
|
),
|
|
2133
|
-
|
|
2170
|
+
Nr(y.page, F).map(
|
|
2134
2171
|
(S, U) => S === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${U}`) : /* @__PURE__ */ e(
|
|
2135
2172
|
"button",
|
|
2136
2173
|
{
|
|
2137
2174
|
type: "button",
|
|
2138
2175
|
"aria-current": S === y.page ? "page" : void 0,
|
|
2139
|
-
onClick: () =>
|
|
2140
|
-
className:
|
|
2176
|
+
onClick: () => P(S),
|
|
2177
|
+
className: c(
|
|
2141
2178
|
"h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
|
|
2142
2179
|
"transition-colors duration-fast ease-out",
|
|
2143
2180
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
@@ -2155,7 +2192,7 @@ const hr = (t) => {
|
|
|
2155
2192
|
variant: "ghost",
|
|
2156
2193
|
iconOnly: !0,
|
|
2157
2194
|
"aria-label": "Next page",
|
|
2158
|
-
onClick: () =>
|
|
2195
|
+
onClick: () => P(y.page + 1),
|
|
2159
2196
|
disabled: y.page >= F - 1,
|
|
2160
2197
|
children: /* @__PURE__ */ e(Z, { icon: $e, size: "md", color: "current" })
|
|
2161
2198
|
}
|
|
@@ -2163,7 +2200,7 @@ const hr = (t) => {
|
|
|
2163
2200
|
] })
|
|
2164
2201
|
] })
|
|
2165
2202
|
] });
|
|
2166
|
-
},
|
|
2203
|
+
}, kr = Ke(null), Un = ({
|
|
2167
2204
|
items: t,
|
|
2168
2205
|
activeTab: r,
|
|
2169
2206
|
onTabChange: n,
|
|
@@ -2172,12 +2209,12 @@ const hr = (t) => {
|
|
|
2172
2209
|
const [a, l] = O(t[0]?.id || ""), o = r || a, f = (d) => {
|
|
2173
2210
|
n ? n(d) : l(d);
|
|
2174
2211
|
};
|
|
2175
|
-
return /* @__PURE__ */ e("div", { className:
|
|
2212
|
+
return /* @__PURE__ */ e("div", { className: c("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((d) => /* @__PURE__ */ e(
|
|
2176
2213
|
"button",
|
|
2177
2214
|
{
|
|
2178
2215
|
onClick: () => !d.disabled && f(d.id),
|
|
2179
2216
|
disabled: d.disabled,
|
|
2180
|
-
className:
|
|
2217
|
+
className: c(
|
|
2181
2218
|
"border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
|
|
2182
2219
|
{
|
|
2183
2220
|
"border-accent-border text-text": o === d.id,
|
|
@@ -2185,9 +2222,9 @@ const hr = (t) => {
|
|
|
2185
2222
|
"border-transparent text-disabled cursor-not-allowed": d.disabled
|
|
2186
2223
|
}
|
|
2187
2224
|
),
|
|
2188
|
-
children: /* @__PURE__ */
|
|
2225
|
+
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
2189
2226
|
d.label,
|
|
2190
|
-
d.badge && /* @__PURE__ */ e("span", { className:
|
|
2227
|
+
d.badge && /* @__PURE__ */ e("span", { className: c(
|
|
2191
2228
|
"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
|
|
2192
2229
|
o === d.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
|
|
2193
2230
|
), children: d.badge })
|
|
@@ -2195,7 +2232,7 @@ const hr = (t) => {
|
|
|
2195
2232
|
},
|
|
2196
2233
|
d.id
|
|
2197
2234
|
)) }) });
|
|
2198
|
-
},
|
|
2235
|
+
}, Cr = ({
|
|
2199
2236
|
items: t,
|
|
2200
2237
|
defaultTab: r,
|
|
2201
2238
|
activeTab: n,
|
|
@@ -2211,7 +2248,7 @@ const hr = (t) => {
|
|
|
2211
2248
|
}, m = {
|
|
2212
2249
|
activeTab: v,
|
|
2213
2250
|
setActiveTab: h
|
|
2214
|
-
}, b = t.find((g) => g.id === v), p =
|
|
2251
|
+
}, b = t.find((g) => g.id === v), p = c(
|
|
2215
2252
|
"flex",
|
|
2216
2253
|
{
|
|
2217
2254
|
"border-b border-border px-2": a === "default" || a === "underline",
|
|
@@ -2221,7 +2258,7 @@ const hr = (t) => {
|
|
|
2221
2258
|
},
|
|
2222
2259
|
o
|
|
2223
2260
|
), w = (g, x) => {
|
|
2224
|
-
const
|
|
2261
|
+
const T = "transition-colors duration-fast font-medium", C = {
|
|
2225
2262
|
"text-xs px-2 py-1": l === "sm",
|
|
2226
2263
|
"text-sm px-3 py-2": l === "md",
|
|
2227
2264
|
"text-base px-4 py-3": l === "lg"
|
|
@@ -2243,9 +2280,9 @@ const hr = (t) => {
|
|
|
2243
2280
|
"text-text-muted hover:text-text": a === "pills",
|
|
2244
2281
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
2245
2282
|
} : {};
|
|
2246
|
-
return
|
|
2283
|
+
return c(T, C, q, D, J, V);
|
|
2247
2284
|
};
|
|
2248
|
-
return /* @__PURE__ */ e(
|
|
2285
|
+
return /* @__PURE__ */ e(kr.Provider, { value: m, children: /* @__PURE__ */ i("div", { children: [
|
|
2249
2286
|
/* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
|
|
2250
2287
|
"button",
|
|
2251
2288
|
{
|
|
@@ -2256,7 +2293,7 @@ const hr = (t) => {
|
|
|
2256
2293
|
disabled: g.disabled,
|
|
2257
2294
|
onClick: () => !g.disabled && h(g.id),
|
|
2258
2295
|
className: w(g, v === g.id),
|
|
2259
|
-
children: /* @__PURE__ */
|
|
2296
|
+
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
2260
2297
|
g.label,
|
|
2261
2298
|
g.badge && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-surface-hover text-text-muted", children: g.badge })
|
|
2262
2299
|
] })
|
|
@@ -2274,14 +2311,14 @@ const hr = (t) => {
|
|
|
2274
2311
|
}
|
|
2275
2312
|
)
|
|
2276
2313
|
] }) });
|
|
2277
|
-
},
|
|
2314
|
+
}, Sr = {
|
|
2278
2315
|
sm: "max-w-md",
|
|
2279
2316
|
md: "max-w-lg",
|
|
2280
2317
|
lg: "max-w-2xl",
|
|
2281
2318
|
xl: "max-w-4xl",
|
|
2282
2319
|
full: "max-w-full mx-4"
|
|
2283
2320
|
};
|
|
2284
|
-
function
|
|
2321
|
+
function rt({
|
|
2285
2322
|
open: t,
|
|
2286
2323
|
onClose: r,
|
|
2287
2324
|
title: n,
|
|
@@ -2310,22 +2347,22 @@ function Qe({
|
|
|
2310
2347
|
return t ? /* @__PURE__ */ e(
|
|
2311
2348
|
"div",
|
|
2312
2349
|
{
|
|
2313
|
-
className:
|
|
2350
|
+
className: c(
|
|
2314
2351
|
"fixed inset-0 z-modal flex items-center justify-center p-4",
|
|
2315
2352
|
"bg-scrim",
|
|
2316
2353
|
// 'animate-fade-in',
|
|
2317
2354
|
f
|
|
2318
2355
|
),
|
|
2319
2356
|
onClick: p,
|
|
2320
|
-
children: /* @__PURE__ */
|
|
2357
|
+
children: /* @__PURE__ */ i(
|
|
2321
2358
|
"div",
|
|
2322
2359
|
{
|
|
2323
2360
|
ref: m,
|
|
2324
|
-
className:
|
|
2361
|
+
className: c(
|
|
2325
2362
|
"relative w-full bg-surface rounded-lg shadow-modal",
|
|
2326
2363
|
// 'animate-scale-in',
|
|
2327
2364
|
"focus:outline-none",
|
|
2328
|
-
|
|
2365
|
+
Sr[s],
|
|
2329
2366
|
o
|
|
2330
2367
|
),
|
|
2331
2368
|
role: "dialog",
|
|
@@ -2333,7 +2370,7 @@ function Qe({
|
|
|
2333
2370
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
2334
2371
|
tabIndex: -1,
|
|
2335
2372
|
children: [
|
|
2336
|
-
(n || h) && /* @__PURE__ */
|
|
2373
|
+
(n || h) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-6 pb-0", children: [
|
|
2337
2374
|
n && /* @__PURE__ */ e(
|
|
2338
2375
|
"span",
|
|
2339
2376
|
{
|
|
@@ -2360,19 +2397,19 @@ function Qe({
|
|
|
2360
2397
|
}
|
|
2361
2398
|
) : null;
|
|
2362
2399
|
}
|
|
2363
|
-
const
|
|
2400
|
+
const Er = {
|
|
2364
2401
|
xs: "text-xs",
|
|
2365
2402
|
sm: "text-sm",
|
|
2366
2403
|
md: "text-base",
|
|
2367
2404
|
lg: "text-md",
|
|
2368
2405
|
xl: "text-lg"
|
|
2369
|
-
},
|
|
2406
|
+
}, zr = {
|
|
2370
2407
|
light: "font-normal",
|
|
2371
2408
|
normal: "font-normal",
|
|
2372
2409
|
medium: "font-medium",
|
|
2373
2410
|
semibold: "font-semibold",
|
|
2374
2411
|
bold: "font-bold"
|
|
2375
|
-
},
|
|
2412
|
+
}, Mr = {
|
|
2376
2413
|
primary: "text-text",
|
|
2377
2414
|
secondary: "text-text-muted",
|
|
2378
2415
|
accent: "text-accent",
|
|
@@ -2383,12 +2420,12 @@ const pr = {
|
|
|
2383
2420
|
neutral: "text-text",
|
|
2384
2421
|
current: "text-current",
|
|
2385
2422
|
muted: "text-text-subtle"
|
|
2386
|
-
},
|
|
2423
|
+
}, Tr = {
|
|
2387
2424
|
left: "text-left",
|
|
2388
2425
|
center: "text-center",
|
|
2389
2426
|
right: "text-right",
|
|
2390
2427
|
justify: "text-justify"
|
|
2391
|
-
},
|
|
2428
|
+
}, $r = {
|
|
2392
2429
|
tight: "leading-tight",
|
|
2393
2430
|
normal: "leading-normal",
|
|
2394
2431
|
relaxed: "leading-relaxed"
|
|
@@ -2407,28 +2444,28 @@ const pr = {
|
|
|
2407
2444
|
children: m,
|
|
2408
2445
|
...b
|
|
2409
2446
|
}) => {
|
|
2410
|
-
const p = v ||
|
|
2447
|
+
const p = v || _r(t), w = t === "caption", g = t === "label", x = t === "code", T = c(
|
|
2411
2448
|
"font-sans",
|
|
2412
2449
|
// Variant — caption and label pin their own size/weight
|
|
2413
2450
|
w && "text-xs text-text-subtle",
|
|
2414
2451
|
g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
2415
2452
|
x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
|
|
2416
2453
|
// Size — only where the variant does not pin it
|
|
2417
|
-
!w && !g && !x &&
|
|
2454
|
+
!w && !g && !x && Er[r],
|
|
2418
2455
|
// Weight — label owns its weight
|
|
2419
|
-
!g &&
|
|
2420
|
-
|
|
2421
|
-
|
|
2456
|
+
!g && zr[n],
|
|
2457
|
+
Mr[s],
|
|
2458
|
+
Tr[a],
|
|
2422
2459
|
// Line height only overrides the body variant
|
|
2423
|
-
t === "body" &&
|
|
2460
|
+
t === "body" && $r[d],
|
|
2424
2461
|
o && "italic",
|
|
2425
2462
|
f && "underline",
|
|
2426
2463
|
l && "truncate",
|
|
2427
2464
|
h
|
|
2428
2465
|
);
|
|
2429
|
-
return /* @__PURE__ */ e(p, { className:
|
|
2466
|
+
return /* @__PURE__ */ e(p, { className: T, ...b, children: m });
|
|
2430
2467
|
};
|
|
2431
|
-
function
|
|
2468
|
+
function _r(t) {
|
|
2432
2469
|
return {
|
|
2433
2470
|
body: "p",
|
|
2434
2471
|
caption: "span",
|
|
@@ -2436,7 +2473,7 @@ function kr(t) {
|
|
|
2436
2473
|
code: "code"
|
|
2437
2474
|
}[t] || "p";
|
|
2438
2475
|
}
|
|
2439
|
-
const
|
|
2476
|
+
const Dr = ({
|
|
2440
2477
|
value: t,
|
|
2441
2478
|
onChange: r,
|
|
2442
2479
|
label: n,
|
|
@@ -2450,7 +2487,7 @@ const Cr = ({
|
|
|
2450
2487
|
onDownloadFile: h,
|
|
2451
2488
|
onRegisterFile: m
|
|
2452
2489
|
}) => {
|
|
2453
|
-
const [b, p] = O(!1), [w, g] = O([]), [x,
|
|
2490
|
+
const [b, p] = O(!1), [w, g] = O([]), [x, T] = O(null), [C, q] = O("/"), [D, J] = O([]), [V, I] = O(!1), [H, te] = O(""), [Y, K] = O(
|
|
2454
2491
|
typeof t == "object" ? t : null
|
|
2455
2492
|
), [ie, k] = O(!1), [u, E] = O(""), y = ne(null);
|
|
2456
2493
|
G(() => {
|
|
@@ -2459,31 +2496,31 @@ const Cr = ({
|
|
|
2459
2496
|
b && x && N();
|
|
2460
2497
|
}, [b, x, C, H]);
|
|
2461
2498
|
const A = async () => {
|
|
2462
|
-
|
|
2499
|
+
I(!0);
|
|
2463
2500
|
try {
|
|
2464
2501
|
const M = await d?.();
|
|
2465
2502
|
M?.data && g(M.data);
|
|
2466
2503
|
} catch (M) {
|
|
2467
2504
|
console.error("Failed to load mounts", M);
|
|
2468
2505
|
} finally {
|
|
2469
|
-
|
|
2506
|
+
I(!1);
|
|
2470
2507
|
}
|
|
2471
2508
|
}, N = async () => {
|
|
2472
2509
|
if (x) {
|
|
2473
|
-
|
|
2510
|
+
I(!0);
|
|
2474
2511
|
try {
|
|
2475
2512
|
const M = await f?.({ mountId: x.id, name: H, path: C });
|
|
2476
2513
|
M?.data && J(M.data);
|
|
2477
2514
|
} catch (M) {
|
|
2478
2515
|
console.error("Failed to load files", M);
|
|
2479
2516
|
} finally {
|
|
2480
|
-
|
|
2517
|
+
I(!1);
|
|
2481
2518
|
}
|
|
2482
2519
|
}
|
|
2483
2520
|
}, W = async (M) => {
|
|
2484
2521
|
const L = M.target.files?.[0];
|
|
2485
2522
|
if (L) {
|
|
2486
|
-
|
|
2523
|
+
I(!0);
|
|
2487
2524
|
try {
|
|
2488
2525
|
const Q = await L.arrayBuffer(), ae = new Uint8Array(Q), de = {
|
|
2489
2526
|
id: `local-${Date.now()}`,
|
|
@@ -2500,13 +2537,13 @@ const Cr = ({
|
|
|
2500
2537
|
} catch (Q) {
|
|
2501
2538
|
console.error("Local file selection failed", Q);
|
|
2502
2539
|
} finally {
|
|
2503
|
-
|
|
2540
|
+
I(!1);
|
|
2504
2541
|
}
|
|
2505
2542
|
}
|
|
2506
2543
|
}, se = async (M) => {
|
|
2507
2544
|
const L = M.target.files?.[0];
|
|
2508
2545
|
if (!(!L || !x)) {
|
|
2509
|
-
|
|
2546
|
+
I(!0);
|
|
2510
2547
|
try {
|
|
2511
2548
|
const Q = await L.arrayBuffer(), ae = await v?.({
|
|
2512
2549
|
file: new Uint8Array(Q),
|
|
@@ -2522,12 +2559,12 @@ const Cr = ({
|
|
|
2522
2559
|
} catch (Q) {
|
|
2523
2560
|
console.error("Upload failed", Q);
|
|
2524
2561
|
} finally {
|
|
2525
|
-
|
|
2562
|
+
I(!1);
|
|
2526
2563
|
}
|
|
2527
2564
|
}
|
|
2528
2565
|
}, ee = async () => {
|
|
2529
2566
|
if (!(!u || !x)) {
|
|
2530
|
-
|
|
2567
|
+
I(!0);
|
|
2531
2568
|
try {
|
|
2532
2569
|
const M = `${C}${u}/`;
|
|
2533
2570
|
m && (await m({
|
|
@@ -2543,22 +2580,22 @@ const Cr = ({
|
|
|
2543
2580
|
} catch (M) {
|
|
2544
2581
|
console.error("Failed to create folder", M);
|
|
2545
2582
|
} finally {
|
|
2546
|
-
|
|
2583
|
+
I(!1);
|
|
2547
2584
|
}
|
|
2548
2585
|
}
|
|
2549
2586
|
}, X = async (M) => {
|
|
2550
|
-
|
|
2587
|
+
I(!0);
|
|
2551
2588
|
try {
|
|
2552
2589
|
const L = await h?.(M.id);
|
|
2553
2590
|
K(M), r(M, L), p(!1);
|
|
2554
2591
|
} catch (L) {
|
|
2555
2592
|
console.error("Failed to download file", L);
|
|
2556
2593
|
} finally {
|
|
2557
|
-
|
|
2594
|
+
I(!1);
|
|
2558
2595
|
}
|
|
2559
|
-
},
|
|
2596
|
+
}, P = (M) => {
|
|
2560
2597
|
M.stopPropagation(), K(null), r(null);
|
|
2561
|
-
},
|
|
2598
|
+
}, $ = pe(() => {
|
|
2562
2599
|
const M = /* @__PURE__ */ new Set(), L = [];
|
|
2563
2600
|
return D.forEach((Q) => {
|
|
2564
2601
|
if (Q.type === "folder") {
|
|
@@ -2577,32 +2614,32 @@ const Cr = ({
|
|
|
2577
2614
|
const M = C.split("/").filter((L) => L !== "");
|
|
2578
2615
|
M.pop(), M.length === 0 ? q("/") : q(`${M.join("/")}/`);
|
|
2579
2616
|
}, F = pe(() => {
|
|
2580
|
-
const M =
|
|
2617
|
+
const M = $.folders.map((L) => ({
|
|
2581
2618
|
id: `folder-${L}`,
|
|
2582
2619
|
name: L,
|
|
2583
2620
|
type: "folder"
|
|
2584
2621
|
}));
|
|
2585
|
-
return
|
|
2622
|
+
return $.files.forEach((L) => {
|
|
2586
2623
|
M.push({
|
|
2587
2624
|
...L,
|
|
2588
2625
|
type: "file"
|
|
2589
2626
|
});
|
|
2590
2627
|
}), M;
|
|
2591
|
-
}, [
|
|
2628
|
+
}, [$]), j = [
|
|
2592
2629
|
{
|
|
2593
2630
|
id: "name",
|
|
2594
2631
|
header: "Name",
|
|
2595
2632
|
accessor: "name",
|
|
2596
|
-
cell: (M, L) => /* @__PURE__ */
|
|
2633
|
+
cell: (M, L) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
2597
2634
|
/* @__PURE__ */ e(
|
|
2598
2635
|
Z,
|
|
2599
2636
|
{
|
|
2600
|
-
icon: L.type === "folder" ?
|
|
2637
|
+
icon: L.type === "folder" ? Be : Le,
|
|
2601
2638
|
size: "sm",
|
|
2602
2639
|
color: L.type === "folder" ? "warning" : "secondary"
|
|
2603
2640
|
}
|
|
2604
2641
|
),
|
|
2605
|
-
/* @__PURE__ */ e("span", { className:
|
|
2642
|
+
/* @__PURE__ */ e("span", { className: c(L.type === "folder" && "font-medium"), children: M })
|
|
2606
2643
|
] })
|
|
2607
2644
|
},
|
|
2608
2645
|
{
|
|
@@ -2637,8 +2674,8 @@ const Cr = ({
|
|
|
2637
2674
|
id: "name",
|
|
2638
2675
|
header: "Mount Name",
|
|
2639
2676
|
accessor: "name",
|
|
2640
|
-
cell: (M) => /* @__PURE__ */
|
|
2641
|
-
/* @__PURE__ */ e(Z, { icon:
|
|
2677
|
+
cell: (M) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
2678
|
+
/* @__PURE__ */ e(Z, { icon: Fe, size: "sm", color: "primary" }),
|
|
2642
2679
|
/* @__PURE__ */ e("span", { children: M })
|
|
2643
2680
|
] })
|
|
2644
2681
|
},
|
|
@@ -2647,28 +2684,28 @@ const Cr = ({
|
|
|
2647
2684
|
header: "",
|
|
2648
2685
|
accessor: "id",
|
|
2649
2686
|
align: "right",
|
|
2650
|
-
cell: (M, L) => /* @__PURE__ */ e(le, { variant: "outline", onClick: () =>
|
|
2687
|
+
cell: (M, L) => /* @__PURE__ */ e(le, { variant: "outline", onClick: () => T(L), children: "Open" })
|
|
2651
2688
|
}
|
|
2652
2689
|
];
|
|
2653
|
-
return /* @__PURE__ */
|
|
2690
|
+
return /* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
2654
2691
|
n && /* @__PURE__ */ e(fe, { variant: "label", size: "sm", weight: "medium", children: n }),
|
|
2655
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ i(
|
|
2656
2693
|
"div",
|
|
2657
2694
|
{
|
|
2658
2695
|
onClick: () => !l && p(!0),
|
|
2659
|
-
className:
|
|
2696
|
+
className: c(
|
|
2660
2697
|
"flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
|
|
2661
2698
|
"hover:border-border-strong bg-surface",
|
|
2662
2699
|
a ? "border-danger-border" : "border-border",
|
|
2663
2700
|
l && "opacity-50 cursor-not-allowed bg-surface-sunk"
|
|
2664
2701
|
),
|
|
2665
2702
|
children: [
|
|
2666
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ?
|
|
2703
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Le : Fe, color: Y ? "primary" : "secondary" }) }),
|
|
2667
2704
|
/* @__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 }) }),
|
|
2668
2705
|
Y && !l && /* @__PURE__ */ e(
|
|
2669
2706
|
"button",
|
|
2670
2707
|
{
|
|
2671
|
-
onClick:
|
|
2708
|
+
onClick: P,
|
|
2672
2709
|
className: "p-1 hover:bg-surface-hover rounded",
|
|
2673
2710
|
children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
|
|
2674
2711
|
}
|
|
@@ -2678,32 +2715,32 @@ const Cr = ({
|
|
|
2678
2715
|
),
|
|
2679
2716
|
a && /* @__PURE__ */ e(fe, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2680
2717
|
/* @__PURE__ */ e(
|
|
2681
|
-
|
|
2718
|
+
rt,
|
|
2682
2719
|
{
|
|
2683
2720
|
open: b,
|
|
2684
2721
|
onClose: () => {
|
|
2685
|
-
p(!1),
|
|
2722
|
+
p(!1), T(null), q("/"), k(!1);
|
|
2686
2723
|
},
|
|
2687
2724
|
title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
|
|
2688
2725
|
size: "lg",
|
|
2689
2726
|
children: /* @__PURE__ */ e(
|
|
2690
|
-
|
|
2727
|
+
Cr,
|
|
2691
2728
|
{
|
|
2692
2729
|
variant: "pills",
|
|
2693
2730
|
items: [
|
|
2694
2731
|
{
|
|
2695
2732
|
id: "remote",
|
|
2696
2733
|
label: "Platform Storage",
|
|
2697
|
-
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: x ? /* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2734
|
+
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: x ? /* @__PURE__ */ i(ke, { children: [
|
|
2735
|
+
/* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2699
2736
|
/* @__PURE__ */ e(
|
|
2700
2737
|
le,
|
|
2701
2738
|
{
|
|
2702
2739
|
variant: "ghost",
|
|
2703
2740
|
onClick: () => {
|
|
2704
|
-
C && C !== "/" ? z() :
|
|
2741
|
+
C && C !== "/" ? z() : T(null);
|
|
2705
2742
|
},
|
|
2706
|
-
leftIcon: /* @__PURE__ */ e(Z, { icon:
|
|
2743
|
+
leftIcon: /* @__PURE__ */ e(Z, { icon: Ct, size: "xs" }),
|
|
2707
2744
|
children: C ? "Back" : "Back to Mounts"
|
|
2708
2745
|
}
|
|
2709
2746
|
),
|
|
@@ -2714,17 +2751,17 @@ const Cr = ({
|
|
|
2714
2751
|
placeholder: "Search...",
|
|
2715
2752
|
value: H,
|
|
2716
2753
|
onChange: (M) => te(M.target.value),
|
|
2717
|
-
startIcon: /* @__PURE__ */ e(
|
|
2754
|
+
startIcon: /* @__PURE__ */ e(_e, { size: 14 }),
|
|
2718
2755
|
fullWidth: !0
|
|
2719
2756
|
}
|
|
2720
2757
|
) }),
|
|
2721
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
2722
2759
|
/* @__PURE__ */ e(
|
|
2723
2760
|
le,
|
|
2724
2761
|
{
|
|
2725
2762
|
variant: "outline",
|
|
2726
2763
|
onClick: () => k(!0),
|
|
2727
|
-
leftIcon: /* @__PURE__ */ e(Z, { icon:
|
|
2764
|
+
leftIcon: /* @__PURE__ */ e(Z, { icon: St, size: "xs" }),
|
|
2728
2765
|
children: "New Folder"
|
|
2729
2766
|
}
|
|
2730
2767
|
),
|
|
@@ -2733,7 +2770,7 @@ const Cr = ({
|
|
|
2733
2770
|
{
|
|
2734
2771
|
variant: "primary",
|
|
2735
2772
|
onClick: () => y.current?.click(),
|
|
2736
|
-
leftIcon: /* @__PURE__ */ e(Z, { icon:
|
|
2773
|
+
leftIcon: /* @__PURE__ */ e(Z, { icon: Et, size: "xs" }),
|
|
2737
2774
|
loading: V,
|
|
2738
2775
|
children: "Upload"
|
|
2739
2776
|
}
|
|
@@ -2750,8 +2787,8 @@ const Cr = ({
|
|
|
2750
2787
|
)
|
|
2751
2788
|
] })
|
|
2752
2789
|
] }),
|
|
2753
|
-
ie && /* @__PURE__ */
|
|
2754
|
-
/* @__PURE__ */ e(Z, { icon:
|
|
2790
|
+
ie && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
|
|
2791
|
+
/* @__PURE__ */ e(Z, { icon: Be, size: "sm", color: "warning" }),
|
|
2755
2792
|
/* @__PURE__ */ e(
|
|
2756
2793
|
Ne,
|
|
2757
2794
|
{
|
|
@@ -2765,7 +2802,7 @@ const Cr = ({
|
|
|
2765
2802
|
/* @__PURE__ */ e(le, { variant: "ghost", onClick: () => k(!1), children: "Cancel" })
|
|
2766
2803
|
] }),
|
|
2767
2804
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2768
|
-
|
|
2805
|
+
Ve,
|
|
2769
2806
|
{
|
|
2770
2807
|
data: F,
|
|
2771
2808
|
columns: j,
|
|
@@ -2775,28 +2812,28 @@ const Cr = ({
|
|
|
2775
2812
|
}
|
|
2776
2813
|
) })
|
|
2777
2814
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2778
|
-
|
|
2815
|
+
Ve,
|
|
2779
2816
|
{
|
|
2780
2817
|
data: w,
|
|
2781
2818
|
columns: B,
|
|
2782
2819
|
loading: V,
|
|
2783
2820
|
emptyContent: "No storage mounts configured",
|
|
2784
|
-
onRowClick: (M) =>
|
|
2821
|
+
onRowClick: (M) => T(M)
|
|
2785
2822
|
}
|
|
2786
2823
|
) }) })
|
|
2787
2824
|
},
|
|
2788
2825
|
{
|
|
2789
2826
|
id: "local",
|
|
2790
2827
|
label: "Local File",
|
|
2791
|
-
content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(Z, { icon:
|
|
2828
|
+
content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center py-12 border-2 border-dashed border-border rounded-xl bg-surface-sunk/50", children: [
|
|
2829
|
+
/* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(Z, { icon: Le, size: "xl", color: "primary" }) }),
|
|
2793
2830
|
/* @__PURE__ */ e(fe, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
|
|
2794
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ i(fe, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
|
|
2795
2832
|
"This file will be used directly in the form and will ",
|
|
2796
2833
|
/* @__PURE__ */ e("strong", { children: "not" }),
|
|
2797
2834
|
" be uploaded to platform storage."
|
|
2798
2835
|
] }),
|
|
2799
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ i("label", { className: "cursor-pointer", children: [
|
|
2800
2837
|
/* @__PURE__ */ e(le, { variant: "primary", size: "lg", loading: V, className: "pointer-events-none", children: "Browse Local File" }),
|
|
2801
2838
|
/* @__PURE__ */ e(
|
|
2802
2839
|
"input",
|
|
@@ -2817,12 +2854,12 @@ const Cr = ({
|
|
|
2817
2854
|
}
|
|
2818
2855
|
)
|
|
2819
2856
|
] });
|
|
2820
|
-
},
|
|
2857
|
+
}, Ar = {
|
|
2821
2858
|
sm: "px-3 py-1.5 text-sm",
|
|
2822
2859
|
md: "px-3 py-2 text-base",
|
|
2823
2860
|
lg: "px-3 py-2 text-md",
|
|
2824
2861
|
full: "px-3 py-2 text-md"
|
|
2825
|
-
},
|
|
2862
|
+
}, je = be(
|
|
2826
2863
|
({
|
|
2827
2864
|
label: t,
|
|
2828
2865
|
helperText: r,
|
|
@@ -2838,20 +2875,20 @@ const Cr = ({
|
|
|
2838
2875
|
...m
|
|
2839
2876
|
}, b) => {
|
|
2840
2877
|
const p = ce.useId(), w = v || `textarea-${p}`, g = !!n, x = n || r ? `${w}-description` : void 0;
|
|
2841
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ i("div", { className: c("flex flex-col", a && "w-full", o), children: [
|
|
2842
2879
|
t && /* @__PURE__ */ e(
|
|
2843
2880
|
"label",
|
|
2844
2881
|
{
|
|
2845
2882
|
htmlFor: w,
|
|
2846
|
-
className:
|
|
2847
|
-
|
|
2883
|
+
className: c(
|
|
2884
|
+
Ze,
|
|
2848
2885
|
g ? "text-danger-fg" : "text-text-muted",
|
|
2849
2886
|
f
|
|
2850
2887
|
),
|
|
2851
2888
|
children: t
|
|
2852
2889
|
}
|
|
2853
2890
|
),
|
|
2854
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
2855
2892
|
/* @__PURE__ */ e(
|
|
2856
2893
|
"textarea",
|
|
2857
2894
|
{
|
|
@@ -2860,11 +2897,11 @@ const Cr = ({
|
|
|
2860
2897
|
rows: h,
|
|
2861
2898
|
"aria-invalid": g || void 0,
|
|
2862
2899
|
"aria-describedby": x,
|
|
2863
|
-
className:
|
|
2864
|
-
|
|
2900
|
+
className: c(
|
|
2901
|
+
Qe,
|
|
2865
2902
|
"resize-y leading-relaxed",
|
|
2866
|
-
|
|
2867
|
-
|
|
2903
|
+
Ar[s],
|
|
2904
|
+
et(g),
|
|
2868
2905
|
d
|
|
2869
2906
|
),
|
|
2870
2907
|
...m
|
|
@@ -2882,21 +2919,68 @@ const Cr = ({
|
|
|
2882
2919
|
"p",
|
|
2883
2920
|
{
|
|
2884
2921
|
id: x,
|
|
2885
|
-
className:
|
|
2922
|
+
className: c("mt-1 text-xs", g ? "text-danger-fg" : "text-text-subtle"),
|
|
2886
2923
|
children: n || r
|
|
2887
2924
|
}
|
|
2888
2925
|
)
|
|
2889
2926
|
] });
|
|
2890
2927
|
}
|
|
2891
2928
|
);
|
|
2892
|
-
|
|
2893
|
-
|
|
2929
|
+
je.displayName = "TextArea";
|
|
2930
|
+
const Lr = /* @__PURE__ */ new Set([
|
|
2931
|
+
"name",
|
|
2932
|
+
"given-name",
|
|
2933
|
+
"family-name",
|
|
2934
|
+
"additional-name",
|
|
2935
|
+
"nickname",
|
|
2936
|
+
"honorific-prefix",
|
|
2937
|
+
"honorific-suffix",
|
|
2938
|
+
"email",
|
|
2939
|
+
"username",
|
|
2940
|
+
"organization",
|
|
2941
|
+
"organization-title",
|
|
2942
|
+
"tel",
|
|
2943
|
+
"tel-country-code",
|
|
2944
|
+
"tel-national",
|
|
2945
|
+
"tel-extension",
|
|
2946
|
+
"url",
|
|
2947
|
+
"photo",
|
|
2948
|
+
"language",
|
|
2949
|
+
"bday",
|
|
2950
|
+
"sex",
|
|
2951
|
+
"street-address",
|
|
2952
|
+
"address-line1",
|
|
2953
|
+
"address-line2",
|
|
2954
|
+
"address-line3",
|
|
2955
|
+
"address-level1",
|
|
2956
|
+
"address-level2",
|
|
2957
|
+
"country",
|
|
2958
|
+
"country-name",
|
|
2959
|
+
"postal-code",
|
|
2960
|
+
"current-password",
|
|
2961
|
+
"new-password",
|
|
2962
|
+
"one-time-code"
|
|
2963
|
+
]);
|
|
2964
|
+
function qe(t) {
|
|
2965
|
+
return t && Lr.has(t) ? { autoComplete: t } : {
|
|
2966
|
+
autoComplete: "off",
|
|
2967
|
+
// 1Password
|
|
2968
|
+
"data-1p-ignore": "true",
|
|
2969
|
+
// LastPass
|
|
2970
|
+
"data-lpignore": "true",
|
|
2971
|
+
// Bitwarden
|
|
2972
|
+
"data-bwignore": "true",
|
|
2973
|
+
// Dashlane — "other" means "not a login field".
|
|
2974
|
+
"data-form-type": "other"
|
|
2975
|
+
};
|
|
2976
|
+
}
|
|
2977
|
+
function Ue(t, r) {
|
|
2894
2978
|
return r.split(".").reduce(
|
|
2895
2979
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2896
2980
|
t
|
|
2897
2981
|
);
|
|
2898
2982
|
}
|
|
2899
|
-
function
|
|
2983
|
+
function Ir(t, r, n) {
|
|
2900
2984
|
const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
|
|
2901
2985
|
let l = a;
|
|
2902
2986
|
for (let o = 0; o < s.length - 1; o++) {
|
|
@@ -2905,7 +2989,7 @@ function Er(t, r, n) {
|
|
|
2905
2989
|
}
|
|
2906
2990
|
return l[s[s.length - 1]] = n, a;
|
|
2907
2991
|
}
|
|
2908
|
-
function
|
|
2992
|
+
function Pr(t, r) {
|
|
2909
2993
|
const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
|
|
2910
2994
|
let a = s;
|
|
2911
2995
|
for (let l = 0; l < n.length - 1; l++) {
|
|
@@ -2915,21 +2999,21 @@ function zr(t, r) {
|
|
|
2915
2999
|
}
|
|
2916
3000
|
return delete a[n[n.length - 1]], s;
|
|
2917
3001
|
}
|
|
2918
|
-
function
|
|
3002
|
+
function jr({
|
|
2919
3003
|
title: t,
|
|
2920
3004
|
description: r,
|
|
2921
3005
|
className: n,
|
|
2922
3006
|
children: s
|
|
2923
3007
|
}) {
|
|
2924
|
-
return /* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ i("div", { className: c("flex flex-col gap-4 py-6 sm:flex-row sm:gap-8", n), children: [
|
|
3009
|
+
/* @__PURE__ */ i("div", { className: "w-full shrink-0 sm:w-form-label", children: [
|
|
2926
3010
|
t && /* @__PURE__ */ e("span", { className: "text-base font-semibold text-text", children: t }),
|
|
2927
3011
|
r && /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-relaxed text-pretty text-text-subtle", children: r })
|
|
2928
3012
|
] }),
|
|
2929
3013
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
|
|
2930
3014
|
] });
|
|
2931
3015
|
}
|
|
2932
|
-
const
|
|
3016
|
+
const Wn = ({
|
|
2933
3017
|
groups: t,
|
|
2934
3018
|
data: r,
|
|
2935
3019
|
onSubmit: n,
|
|
@@ -2947,9 +3031,9 @@ const Pn = ({
|
|
|
2947
3031
|
ref: w,
|
|
2948
3032
|
sdk: g
|
|
2949
3033
|
}) => {
|
|
2950
|
-
const [x,
|
|
3034
|
+
const [x, T] = O(r || {}), [C, q] = O({}), [D, J] = O({});
|
|
2951
3035
|
G(() => {
|
|
2952
|
-
r &&
|
|
3036
|
+
r && T({ ...r });
|
|
2953
3037
|
}, [r]);
|
|
2954
3038
|
const V = xe(
|
|
2955
3039
|
(k, u, E) => {
|
|
@@ -2968,12 +3052,12 @@ const Pn = ({
|
|
|
2968
3052
|
if (u.forEach((W, se) => {
|
|
2969
3053
|
const ee = {};
|
|
2970
3054
|
for (const X of y.arrayFields) {
|
|
2971
|
-
const
|
|
2972
|
-
if (X.required && (
|
|
3055
|
+
const P = W?.[X.name];
|
|
3056
|
+
if (X.required && (P == null || P === ""))
|
|
2973
3057
|
ee[X.name] = `${X.label} is required`, N = !0;
|
|
2974
3058
|
else if (X.validator) {
|
|
2975
|
-
const
|
|
2976
|
-
|
|
3059
|
+
const $ = X.validator(P, W);
|
|
3060
|
+
$ && (ee[X.name] = $, N = !0);
|
|
2977
3061
|
}
|
|
2978
3062
|
}
|
|
2979
3063
|
A[se] = ee;
|
|
@@ -2984,14 +3068,14 @@ const Pn = ({
|
|
|
2984
3068
|
return y.validator ? y.validator(u, E) : null;
|
|
2985
3069
|
},
|
|
2986
3070
|
[t]
|
|
2987
|
-
),
|
|
3071
|
+
), I = xe(
|
|
2988
3072
|
(k, u) => {
|
|
2989
|
-
let E =
|
|
3073
|
+
let E = Ir(
|
|
2990
3074
|
x,
|
|
2991
3075
|
k,
|
|
2992
3076
|
u
|
|
2993
3077
|
);
|
|
2994
|
-
t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (u == null || u === "") && (E =
|
|
3078
|
+
t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (u == null || u === "") && (E = Pr(E, k)), T(E), J((N) => ({ ...N, [k]: !0 }));
|
|
2995
3079
|
const A = V(k, u, E);
|
|
2996
3080
|
q((N) => ({
|
|
2997
3081
|
...N,
|
|
@@ -3008,7 +3092,7 @@ const Pn = ({
|
|
|
3008
3092
|
continue;
|
|
3009
3093
|
const N = V(
|
|
3010
3094
|
A.name,
|
|
3011
|
-
|
|
3095
|
+
Ue(x, A.name),
|
|
3012
3096
|
x
|
|
3013
3097
|
);
|
|
3014
3098
|
N && (u[A.name] = N);
|
|
@@ -3025,7 +3109,7 @@ const Pn = ({
|
|
|
3025
3109
|
[x, t, V, o, l, n, b]
|
|
3026
3110
|
), te = xe(
|
|
3027
3111
|
(k) => {
|
|
3028
|
-
const u =
|
|
3112
|
+
const u = Ue(x, k.name), E = D[k.name] ? C[k.name] : void 0, y = k.disabled || b, A = {
|
|
3029
3113
|
value: u || "",
|
|
3030
3114
|
disabled: y,
|
|
3031
3115
|
required: k.required,
|
|
@@ -3043,19 +3127,19 @@ const Pn = ({
|
|
|
3043
3127
|
Ne,
|
|
3044
3128
|
{
|
|
3045
3129
|
...A,
|
|
3046
|
-
onChange: (N) =>
|
|
3130
|
+
onChange: (N) => I(k.name, N.target.value),
|
|
3047
3131
|
type: k.textType || k.type,
|
|
3048
|
-
|
|
3132
|
+
...qe(k.autocomplete),
|
|
3049
3133
|
error: E,
|
|
3050
3134
|
size: m
|
|
3051
3135
|
}
|
|
3052
3136
|
);
|
|
3053
3137
|
case "textarea":
|
|
3054
3138
|
return /* @__PURE__ */ e(
|
|
3055
|
-
|
|
3139
|
+
je,
|
|
3056
3140
|
{
|
|
3057
3141
|
...A,
|
|
3058
|
-
onChange: (N) =>
|
|
3142
|
+
onChange: (N) => I(k.name, N.target.value),
|
|
3059
3143
|
rows: k.rows ?? 4,
|
|
3060
3144
|
error: E,
|
|
3061
3145
|
size: m
|
|
@@ -3063,10 +3147,10 @@ const Pn = ({
|
|
|
3063
3147
|
);
|
|
3064
3148
|
case "select":
|
|
3065
3149
|
return /* @__PURE__ */ e(
|
|
3066
|
-
|
|
3150
|
+
ze,
|
|
3067
3151
|
{
|
|
3068
3152
|
...A,
|
|
3069
|
-
onChange: (N) =>
|
|
3153
|
+
onChange: (N) => I(k.name, N),
|
|
3070
3154
|
options: (k.options || []).map((N) => ({
|
|
3071
3155
|
...N,
|
|
3072
3156
|
value: String(N.value)
|
|
@@ -3083,11 +3167,11 @@ const Pn = ({
|
|
|
3083
3167
|
// open to learn what the choices even are.
|
|
3084
3168
|
case "segmented":
|
|
3085
3169
|
return /* @__PURE__ */ e(
|
|
3086
|
-
|
|
3170
|
+
Qt,
|
|
3087
3171
|
{
|
|
3088
3172
|
"aria-label": k.label,
|
|
3089
3173
|
value: u == null ? "" : String(u),
|
|
3090
|
-
onChange: (N) =>
|
|
3174
|
+
onChange: (N) => I(k.name, N),
|
|
3091
3175
|
options: (k.options || []).map((N) => ({
|
|
3092
3176
|
value: String(N.value),
|
|
3093
3177
|
label: N.label
|
|
@@ -3103,12 +3187,12 @@ const Pn = ({
|
|
|
3103
3187
|
...A,
|
|
3104
3188
|
label: k.label,
|
|
3105
3189
|
checked: !!u,
|
|
3106
|
-
onChange: (N) =>
|
|
3190
|
+
onChange: (N) => I(k.name, N.target.checked),
|
|
3107
3191
|
size: m
|
|
3108
3192
|
}
|
|
3109
3193
|
);
|
|
3110
3194
|
case "radio":
|
|
3111
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: k.options?.map((N) => /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: k.options?.map((N) => /* @__PURE__ */ i(
|
|
3112
3196
|
"label",
|
|
3113
3197
|
{
|
|
3114
3198
|
className: "flex cursor-pointer items-center gap-3 text-base text-text",
|
|
@@ -3120,7 +3204,7 @@ const Pn = ({
|
|
|
3120
3204
|
name: k.name,
|
|
3121
3205
|
value: N.value,
|
|
3122
3206
|
checked: u === N.value,
|
|
3123
|
-
onChange: () =>
|
|
3207
|
+
onChange: () => I(k.name, N.value),
|
|
3124
3208
|
disabled: y || N.disabled,
|
|
3125
3209
|
className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3126
3210
|
}
|
|
@@ -3136,17 +3220,17 @@ const Pn = ({
|
|
|
3136
3220
|
{
|
|
3137
3221
|
...A,
|
|
3138
3222
|
value: u ? new Date(u) : null,
|
|
3139
|
-
onChange: (N) =>
|
|
3223
|
+
onChange: (N) => I(k.name, N),
|
|
3140
3224
|
size: m
|
|
3141
3225
|
}
|
|
3142
3226
|
);
|
|
3143
3227
|
case "file":
|
|
3144
3228
|
return /* @__PURE__ */ e(
|
|
3145
|
-
|
|
3229
|
+
Dr,
|
|
3146
3230
|
{
|
|
3147
3231
|
...A,
|
|
3148
3232
|
value: u,
|
|
3149
|
-
onChange: (N) =>
|
|
3233
|
+
onChange: (N) => I(k.name, N),
|
|
3150
3234
|
error: E,
|
|
3151
3235
|
onListFiles: (N) => g?.http.invoke({
|
|
3152
3236
|
method: "POST",
|
|
@@ -3175,10 +3259,10 @@ const Pn = ({
|
|
|
3175
3259
|
);
|
|
3176
3260
|
case "folder":
|
|
3177
3261
|
return /* @__PURE__ */ e(
|
|
3178
|
-
|
|
3262
|
+
dr,
|
|
3179
3263
|
{
|
|
3180
3264
|
value: u || {},
|
|
3181
|
-
onChange: (N) =>
|
|
3265
|
+
onChange: (N) => I(k.name, N),
|
|
3182
3266
|
onListFolders: () => g?.http.invoke({
|
|
3183
3267
|
method: "GET",
|
|
3184
3268
|
action: "storage.mount"
|
|
@@ -3191,7 +3275,7 @@ const Pn = ({
|
|
|
3191
3275
|
case "custom":
|
|
3192
3276
|
return k.customComponent?.({
|
|
3193
3277
|
value: u,
|
|
3194
|
-
onChange: (N) =>
|
|
3278
|
+
onChange: (N) => I(k.name, N),
|
|
3195
3279
|
error: E,
|
|
3196
3280
|
disabled: y
|
|
3197
3281
|
});
|
|
@@ -3204,35 +3288,35 @@ const Pn = ({
|
|
|
3204
3288
|
} catch {
|
|
3205
3289
|
}
|
|
3206
3290
|
const se = () => {
|
|
3207
|
-
|
|
3208
|
-
}, ee = (
|
|
3209
|
-
|
|
3291
|
+
I(k.name, [...N, {}]);
|
|
3292
|
+
}, ee = (P) => {
|
|
3293
|
+
I(
|
|
3210
3294
|
k.name,
|
|
3211
|
-
N.filter((
|
|
3295
|
+
N.filter(($, _) => _ !== P)
|
|
3212
3296
|
);
|
|
3213
|
-
}, X = (
|
|
3297
|
+
}, X = (P, $, _) => {
|
|
3214
3298
|
const z = [...N];
|
|
3215
|
-
z[
|
|
3216
|
-
...z[
|
|
3217
|
-
[
|
|
3218
|
-
},
|
|
3299
|
+
z[P] = {
|
|
3300
|
+
...z[P],
|
|
3301
|
+
[$]: _
|
|
3302
|
+
}, I(k.name, z);
|
|
3219
3303
|
};
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
N.map((
|
|
3304
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
3305
|
+
N.map((P, $) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
|
|
3222
3306
|
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((_) => {
|
|
3223
|
-
const z = W?.[
|
|
3224
|
-
return /* @__PURE__ */
|
|
3307
|
+
const z = W?.[$]?.[_.name];
|
|
3308
|
+
return /* @__PURE__ */ i(
|
|
3225
3309
|
"div",
|
|
3226
3310
|
{
|
|
3227
3311
|
className: "flex flex-col gap-1",
|
|
3228
3312
|
children: [
|
|
3229
|
-
|
|
3313
|
+
$ === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3230
3314
|
_.label,
|
|
3231
3315
|
_.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3232
3316
|
] }),
|
|
3233
3317
|
(() => {
|
|
3234
3318
|
const F = {
|
|
3235
|
-
value:
|
|
3319
|
+
value: P?.[_.name] || "",
|
|
3236
3320
|
disabled: y,
|
|
3237
3321
|
required: _.required,
|
|
3238
3322
|
placeholder: _.placeholder,
|
|
@@ -3250,23 +3334,23 @@ const Pn = ({
|
|
|
3250
3334
|
{
|
|
3251
3335
|
...F,
|
|
3252
3336
|
onChange: (j) => X(
|
|
3253
|
-
|
|
3337
|
+
$,
|
|
3254
3338
|
_.name,
|
|
3255
3339
|
j.target.value
|
|
3256
3340
|
),
|
|
3257
3341
|
type: _.textType || _.type,
|
|
3258
|
-
|
|
3342
|
+
...qe(_.autocomplete),
|
|
3259
3343
|
error: z,
|
|
3260
3344
|
size: m
|
|
3261
3345
|
}
|
|
3262
3346
|
);
|
|
3263
3347
|
case "textarea":
|
|
3264
3348
|
return /* @__PURE__ */ e(
|
|
3265
|
-
|
|
3349
|
+
je,
|
|
3266
3350
|
{
|
|
3267
3351
|
...F,
|
|
3268
3352
|
onChange: (j) => X(
|
|
3269
|
-
|
|
3353
|
+
$,
|
|
3270
3354
|
_.name,
|
|
3271
3355
|
j.target.value
|
|
3272
3356
|
),
|
|
@@ -3277,11 +3361,11 @@ const Pn = ({
|
|
|
3277
3361
|
);
|
|
3278
3362
|
case "select":
|
|
3279
3363
|
return /* @__PURE__ */ e(
|
|
3280
|
-
|
|
3364
|
+
ze,
|
|
3281
3365
|
{
|
|
3282
3366
|
...F,
|
|
3283
3367
|
onChange: (j) => X(
|
|
3284
|
-
|
|
3368
|
+
$,
|
|
3285
3369
|
_.name,
|
|
3286
3370
|
j
|
|
3287
3371
|
),
|
|
@@ -3303,9 +3387,9 @@ const Pn = ({
|
|
|
3303
3387
|
ye,
|
|
3304
3388
|
{
|
|
3305
3389
|
...F,
|
|
3306
|
-
checked: !!
|
|
3390
|
+
checked: !!P?.[_.name],
|
|
3307
3391
|
onChange: (j) => X(
|
|
3308
|
-
|
|
3392
|
+
$,
|
|
3309
3393
|
_.name,
|
|
3310
3394
|
j.target.checked
|
|
3311
3395
|
),
|
|
@@ -3313,7 +3397,7 @@ const Pn = ({
|
|
|
3313
3397
|
}
|
|
3314
3398
|
);
|
|
3315
3399
|
case "radio":
|
|
3316
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _.options?.map((j) => /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _.options?.map((j) => /* @__PURE__ */ i(
|
|
3317
3401
|
"label",
|
|
3318
3402
|
{
|
|
3319
3403
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3322,11 +3406,11 @@ const Pn = ({
|
|
|
3322
3406
|
"input",
|
|
3323
3407
|
{
|
|
3324
3408
|
type: "radio",
|
|
3325
|
-
name: `${k.name}.${
|
|
3409
|
+
name: `${k.name}.${$}.${_.name}`,
|
|
3326
3410
|
value: j.value,
|
|
3327
|
-
checked:
|
|
3411
|
+
checked: P?.[_.name] === j.value,
|
|
3328
3412
|
onChange: () => X(
|
|
3329
|
-
|
|
3413
|
+
$,
|
|
3330
3414
|
_.name,
|
|
3331
3415
|
j.value
|
|
3332
3416
|
),
|
|
@@ -3340,14 +3424,14 @@ const Pn = ({
|
|
|
3340
3424
|
j.value
|
|
3341
3425
|
)) });
|
|
3342
3426
|
case "date": {
|
|
3343
|
-
const j =
|
|
3427
|
+
const j = P?.[_.name];
|
|
3344
3428
|
return /* @__PURE__ */ e(
|
|
3345
3429
|
Pe,
|
|
3346
3430
|
{
|
|
3347
3431
|
...F,
|
|
3348
3432
|
value: j ? new Date(j) : null,
|
|
3349
3433
|
onChange: (B) => X(
|
|
3350
|
-
|
|
3434
|
+
$,
|
|
3351
3435
|
_.name,
|
|
3352
3436
|
B
|
|
3353
3437
|
),
|
|
@@ -3357,9 +3441,9 @@ const Pn = ({
|
|
|
3357
3441
|
}
|
|
3358
3442
|
case "custom":
|
|
3359
3443
|
return _.customComponent?.({
|
|
3360
|
-
value:
|
|
3444
|
+
value: P?.[_.name],
|
|
3361
3445
|
onChange: (j) => X(
|
|
3362
|
-
|
|
3446
|
+
$,
|
|
3363
3447
|
_.name,
|
|
3364
3448
|
j
|
|
3365
3449
|
),
|
|
@@ -3368,7 +3452,7 @@ const Pn = ({
|
|
|
3368
3452
|
});
|
|
3369
3453
|
// Add other field types here as needed
|
|
3370
3454
|
default:
|
|
3371
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ i("p", { children: [
|
|
3372
3456
|
"Unsupported field type in array:",
|
|
3373
3457
|
" ",
|
|
3374
3458
|
_.type
|
|
@@ -3389,19 +3473,19 @@ const Pn = ({
|
|
|
3389
3473
|
variant: "ghost",
|
|
3390
3474
|
size: "md",
|
|
3391
3475
|
"aria-label": `${k.label} verwijderen`,
|
|
3392
|
-
onClick: () => ee(
|
|
3476
|
+
onClick: () => ee($),
|
|
3393
3477
|
disabled: y,
|
|
3394
|
-
className:
|
|
3395
|
-
children: /* @__PURE__ */ e(
|
|
3478
|
+
className: c("shrink-0", $ === 0 && "mt-5"),
|
|
3479
|
+
children: /* @__PURE__ */ e(zt, { className: "size-icon-md" })
|
|
3396
3480
|
}
|
|
3397
3481
|
)
|
|
3398
|
-
] },
|
|
3399
|
-
/* @__PURE__ */
|
|
3482
|
+
] }, $)),
|
|
3483
|
+
/* @__PURE__ */ i(
|
|
3400
3484
|
le,
|
|
3401
3485
|
{
|
|
3402
3486
|
type: "button",
|
|
3403
3487
|
variant: "secondary",
|
|
3404
|
-
leftIcon: /* @__PURE__ */ e(
|
|
3488
|
+
leftIcon: /* @__PURE__ */ e(Mt, { className: "size-icon-sm" }),
|
|
3405
3489
|
onClick: se,
|
|
3406
3490
|
disabled: y,
|
|
3407
3491
|
children: [
|
|
@@ -3416,14 +3500,14 @@ const Pn = ({
|
|
|
3416
3500
|
return null;
|
|
3417
3501
|
}
|
|
3418
3502
|
},
|
|
3419
|
-
[x, D, C, b, m,
|
|
3503
|
+
[x, D, C, b, m, I]
|
|
3420
3504
|
), Y = xe(
|
|
3421
3505
|
(k) => {
|
|
3422
3506
|
if (k.conditional && !k.conditional(x))
|
|
3423
3507
|
return null;
|
|
3424
3508
|
const u = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
|
|
3425
3509
|
if (u.length === 0) return null;
|
|
3426
|
-
const E =
|
|
3510
|
+
const E = c(
|
|
3427
3511
|
k.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
|
|
3428
3512
|
k.layout !== "flex" && {
|
|
3429
3513
|
"grid-cols-1": !k.columns || k.columns === 1,
|
|
@@ -3438,17 +3522,17 @@ const Pn = ({
|
|
|
3438
3522
|
// form *is* the page now, so a panel around each section would be a
|
|
3439
3523
|
// second surface on top of the one it already sits on.
|
|
3440
3524
|
/* @__PURE__ */ e(
|
|
3441
|
-
|
|
3525
|
+
jr,
|
|
3442
3526
|
{
|
|
3443
3527
|
title: k.title,
|
|
3444
3528
|
description: k.description,
|
|
3445
3529
|
className: "not-last:border-b not-last:border-border-subtle",
|
|
3446
3530
|
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: E, children: u.map((y) => {
|
|
3447
3531
|
const A = D[y.name] ? C[y.name] : void 0;
|
|
3448
|
-
return /* @__PURE__ */
|
|
3532
|
+
return /* @__PURE__ */ i(
|
|
3449
3533
|
"div",
|
|
3450
3534
|
{
|
|
3451
|
-
className:
|
|
3535
|
+
className: c(
|
|
3452
3536
|
"flex min-w-0 flex-col gap-1.5",
|
|
3453
3537
|
y.type === "checkbox" && "justify-center"
|
|
3454
3538
|
),
|
|
@@ -3457,7 +3541,7 @@ const Pn = ({
|
|
|
3457
3541
|
gridColumn: typeof y.width == "number" ? `span ${y.width} / span ${y.width}` : void 0
|
|
3458
3542
|
},
|
|
3459
3543
|
children: [
|
|
3460
|
-
y.type !== "custom" && y.type !== "checkbox" && /* @__PURE__ */
|
|
3544
|
+
y.type !== "custom" && y.type !== "checkbox" && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-text-muted", children: [
|
|
3461
3545
|
y.label,
|
|
3462
3546
|
y.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3463
3547
|
] }),
|
|
@@ -3474,7 +3558,7 @@ const Pn = ({
|
|
|
3474
3558
|
);
|
|
3475
3559
|
},
|
|
3476
3560
|
[x, D, C, te]
|
|
3477
|
-
), K =
|
|
3561
|
+
), K = c(
|
|
3478
3562
|
{
|
|
3479
3563
|
"max-w-settings": m === "sm",
|
|
3480
3564
|
"max-w-form": m === "md",
|
|
@@ -3483,10 +3567,10 @@ const Pn = ({
|
|
|
3483
3567
|
},
|
|
3484
3568
|
p
|
|
3485
3569
|
), ie = m === "full" ? "md" : m;
|
|
3486
|
-
return /* @__PURE__ */
|
|
3570
|
+
return /* @__PURE__ */ i("form", { ref: w, onSubmit: H, className: K, children: [
|
|
3487
3571
|
!v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
3488
3572
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
|
|
3489
|
-
v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */
|
|
3573
|
+
v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ i(ke, { children: [
|
|
3490
3574
|
/* @__PURE__ */ e("div", { className: "ml-auto" }),
|
|
3491
3575
|
s && /* @__PURE__ */ e(
|
|
3492
3576
|
le,
|
|
@@ -3515,7 +3599,7 @@ const Pn = ({
|
|
|
3515
3599
|
] }) })
|
|
3516
3600
|
] });
|
|
3517
3601
|
};
|
|
3518
|
-
function
|
|
3602
|
+
function Kn({
|
|
3519
3603
|
open: t,
|
|
3520
3604
|
title: r,
|
|
3521
3605
|
description: n,
|
|
@@ -3527,13 +3611,13 @@ function In({
|
|
|
3527
3611
|
onCancel: d
|
|
3528
3612
|
}) {
|
|
3529
3613
|
return /* @__PURE__ */ e(
|
|
3530
|
-
|
|
3614
|
+
rt,
|
|
3531
3615
|
{
|
|
3532
3616
|
open: t,
|
|
3533
3617
|
onClose: d,
|
|
3534
3618
|
title: r,
|
|
3535
3619
|
size: "sm",
|
|
3536
|
-
footer: /* @__PURE__ */
|
|
3620
|
+
footer: /* @__PURE__ */ i("div", { className: "flex w-full items-center justify-end gap-2", children: [
|
|
3537
3621
|
/* @__PURE__ */ e(le, { variant: "ghost", onClick: d, disabled: o, children: a }),
|
|
3538
3622
|
/* @__PURE__ */ e(
|
|
3539
3623
|
le,
|
|
@@ -3549,7 +3633,7 @@ function In({
|
|
|
3549
3633
|
}
|
|
3550
3634
|
);
|
|
3551
3635
|
}
|
|
3552
|
-
const
|
|
3636
|
+
const Or = {
|
|
3553
3637
|
default: "bg-surface-hover text-text",
|
|
3554
3638
|
primary: "bg-accent-soft text-accent",
|
|
3555
3639
|
secondary: "bg-surface-hover text-text-muted",
|
|
@@ -3559,11 +3643,11 @@ const $r = {
|
|
|
3559
3643
|
info: "bg-info-soft text-info-fg",
|
|
3560
3644
|
// Internal-note amber. Never for customer-visible content.
|
|
3561
3645
|
note: "bg-note-soft text-note"
|
|
3562
|
-
},
|
|
3646
|
+
}, Fr = {
|
|
3563
3647
|
sm: "px-2 py-0.5 text-xs",
|
|
3564
3648
|
md: "px-2.5 py-1 text-sm",
|
|
3565
3649
|
lg: "px-3 py-1.5 text-base"
|
|
3566
|
-
},
|
|
3650
|
+
}, Br = {
|
|
3567
3651
|
default: "bg-surface-hover",
|
|
3568
3652
|
primary: "bg-accent",
|
|
3569
3653
|
secondary: "bg-surface-hover",
|
|
@@ -3573,7 +3657,7 @@ const $r = {
|
|
|
3573
3657
|
info: "bg-info",
|
|
3574
3658
|
note: "bg-note"
|
|
3575
3659
|
};
|
|
3576
|
-
function
|
|
3660
|
+
function Rr({
|
|
3577
3661
|
variant: t = "default",
|
|
3578
3662
|
size: r = "md",
|
|
3579
3663
|
dot: n = !1,
|
|
@@ -3584,16 +3668,16 @@ function Dr({
|
|
|
3584
3668
|
children: f,
|
|
3585
3669
|
...d
|
|
3586
3670
|
}) {
|
|
3587
|
-
return /* @__PURE__ */
|
|
3671
|
+
return /* @__PURE__ */ i(
|
|
3588
3672
|
"span",
|
|
3589
3673
|
{
|
|
3590
|
-
className:
|
|
3674
|
+
className: c(
|
|
3591
3675
|
// Base styles
|
|
3592
3676
|
"inline-flex items-center font-medium rounded-full",
|
|
3593
3677
|
// Variant styles
|
|
3594
|
-
|
|
3678
|
+
Or[t],
|
|
3595
3679
|
// Size styles
|
|
3596
|
-
|
|
3680
|
+
Fr[r],
|
|
3597
3681
|
o
|
|
3598
3682
|
),
|
|
3599
3683
|
...d,
|
|
@@ -3601,13 +3685,13 @@ function Dr({
|
|
|
3601
3685
|
n && /* @__PURE__ */ e(
|
|
3602
3686
|
"span",
|
|
3603
3687
|
{
|
|
3604
|
-
className:
|
|
3688
|
+
className: c(
|
|
3605
3689
|
"w-2 h-2 rounded-full mr-1.5",
|
|
3606
|
-
|
|
3690
|
+
Br[t]
|
|
3607
3691
|
)
|
|
3608
3692
|
}
|
|
3609
3693
|
),
|
|
3610
|
-
s && /* @__PURE__ */ e("span", { className:
|
|
3694
|
+
s && /* @__PURE__ */ e("span", { className: c("flex-shrink-0", f && "mr-1"), children: s }),
|
|
3611
3695
|
f,
|
|
3612
3696
|
a && l && /* @__PURE__ */ e(
|
|
3613
3697
|
"button",
|
|
@@ -3622,11 +3706,11 @@ function Dr({
|
|
|
3622
3706
|
}
|
|
3623
3707
|
);
|
|
3624
3708
|
}
|
|
3625
|
-
const me = ({ className: t }) => /* @__PURE__ */ e("span", { className:
|
|
3626
|
-
function
|
|
3709
|
+
const me = ({ className: t }) => /* @__PURE__ */ e("span", { className: c("block rounded-xs bg-surface-hover", t) });
|
|
3710
|
+
function Hr({ shape: t, rows: r, columns: n }) {
|
|
3627
3711
|
switch (t) {
|
|
3628
3712
|
case "table":
|
|
3629
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ i("div", { className: "overflow-hidden rounded-lg ring-1 ring-border", children: [
|
|
3630
3714
|
/* @__PURE__ */ e(
|
|
3631
3715
|
"div",
|
|
3632
3716
|
{
|
|
@@ -3646,22 +3730,22 @@ function Ar({ shape: t, rows: r, columns: n }) {
|
|
|
3646
3730
|
))
|
|
3647
3731
|
] });
|
|
3648
3732
|
case "list":
|
|
3649
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col divide-y divide-border-subtle rounded-lg ring-1 ring-border", children: Array.from({ length: r }).map((s, a) => /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col divide-y divide-border-subtle rounded-lg ring-1 ring-border", children: Array.from({ length: r }).map((s, a) => /* @__PURE__ */ i("div", { className: "flex items-center gap-3 p-3", children: [
|
|
3650
3734
|
/* @__PURE__ */ e(me, { className: "size-avatar-sm shrink-0 rounded-full" }),
|
|
3651
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
3652
3736
|
/* @__PURE__ */ e(me, { className: "h-3" }),
|
|
3653
3737
|
/* @__PURE__ */ e(me, { className: "h-2.5 opacity-70" })
|
|
3654
3738
|
] })
|
|
3655
3739
|
] }, a)) });
|
|
3656
3740
|
case "form":
|
|
3657
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-5", children: Array.from({ length: r }).map((s, a) => /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-5", children: Array.from({ length: r }).map((s, a) => /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
|
|
3658
3742
|
/* @__PURE__ */ e(me, { className: "h-2.5 w-28" }),
|
|
3659
3743
|
/* @__PURE__ */ e(me, { className: "h-control-md w-full rounded-md" })
|
|
3660
3744
|
] }, a)) });
|
|
3661
3745
|
case "menu":
|
|
3662
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-px", children: [
|
|
3663
3747
|
/* @__PURE__ */ e("div", { className: "px-2.5 pb-2 pt-5", children: /* @__PURE__ */ e(me, { className: "h-2 w-16" }) }),
|
|
3664
|
-
Array.from({ length: r }).map((s, a) => /* @__PURE__ */
|
|
3748
|
+
Array.from({ length: r }).map((s, a) => /* @__PURE__ */ i("div", { className: "flex h-row-md items-center gap-2.5 px-2.5", children: [
|
|
3665
3749
|
/* @__PURE__ */ e(me, { className: "size-4 shrink-0" }),
|
|
3666
3750
|
/* @__PURE__ */ e(me, { className: "h-2" })
|
|
3667
3751
|
] }, a))
|
|
@@ -3672,7 +3756,7 @@ function Ar({ shape: t, rows: r, columns: n }) {
|
|
|
3672
3756
|
{
|
|
3673
3757
|
className: "grid gap-4",
|
|
3674
3758
|
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
3675
|
-
children: Array.from({ length: r * n }).map((s, a) => /* @__PURE__ */
|
|
3759
|
+
children: Array.from({ length: r * n }).map((s, a) => /* @__PURE__ */ i("div", { className: "flex flex-col gap-2 rounded-lg p-4 ring-1 ring-border", children: [
|
|
3676
3760
|
/* @__PURE__ */ e(me, { className: "h-3 w-1/2" }),
|
|
3677
3761
|
/* @__PURE__ */ e(me, { className: "h-2.5" }),
|
|
3678
3762
|
/* @__PURE__ */ e(me, { className: "h-2.5 w-3/4 opacity-70" })
|
|
@@ -3681,13 +3765,13 @@ function Ar({ shape: t, rows: r, columns: n }) {
|
|
|
3681
3765
|
);
|
|
3682
3766
|
case "text":
|
|
3683
3767
|
default:
|
|
3684
|
-
return /* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-6", children: [
|
|
3685
3769
|
/* @__PURE__ */ e(me, { className: "h-6 w-1/4" }),
|
|
3686
3770
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: Array.from({ length: r }).map((s, a) => /* @__PURE__ */ e(me, { className: "h-4" }, a)) })
|
|
3687
3771
|
] });
|
|
3688
3772
|
}
|
|
3689
3773
|
}
|
|
3690
|
-
const
|
|
3774
|
+
const Vr = {
|
|
3691
3775
|
text: 2,
|
|
3692
3776
|
table: 8,
|
|
3693
3777
|
list: 6,
|
|
@@ -3695,7 +3779,7 @@ const Lr = {
|
|
|
3695
3779
|
menu: 4,
|
|
3696
3780
|
cards: 2
|
|
3697
3781
|
};
|
|
3698
|
-
function
|
|
3782
|
+
function nt({
|
|
3699
3783
|
variant: t = "page",
|
|
3700
3784
|
shape: r,
|
|
3701
3785
|
rows: n,
|
|
@@ -3706,14 +3790,14 @@ function et({
|
|
|
3706
3790
|
tableColumns: f,
|
|
3707
3791
|
tableRows: d
|
|
3708
3792
|
}) {
|
|
3709
|
-
const v = r ?? (o ? "table" : "text"), h = n ?? d ??
|
|
3793
|
+
const v = r ?? (o ? "table" : "text"), h = n ?? d ?? Vr[v], m = s ?? f ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: c("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Hr, { shape: v, rows: h, columns: m }) });
|
|
3710
3794
|
return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
|
|
3711
3795
|
}
|
|
3712
|
-
const
|
|
3796
|
+
const qr = {
|
|
3713
3797
|
neutral: "bg-surface-hover text-text-muted",
|
|
3714
3798
|
success: "bg-success-soft text-success-fg"
|
|
3715
3799
|
};
|
|
3716
|
-
function
|
|
3800
|
+
function Gn({
|
|
3717
3801
|
icon: t,
|
|
3718
3802
|
tone: r = "neutral",
|
|
3719
3803
|
title: n,
|
|
@@ -3723,17 +3807,17 @@ function jn({
|
|
|
3723
3807
|
className: o,
|
|
3724
3808
|
...f
|
|
3725
3809
|
}) {
|
|
3726
|
-
return /* @__PURE__ */
|
|
3810
|
+
return /* @__PURE__ */ i(
|
|
3727
3811
|
"div",
|
|
3728
3812
|
{
|
|
3729
|
-
className:
|
|
3813
|
+
className: c(
|
|
3730
3814
|
"flex flex-col items-center gap-2.5 text-center",
|
|
3731
3815
|
l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
|
|
3732
3816
|
o
|
|
3733
3817
|
),
|
|
3734
3818
|
...f,
|
|
3735
3819
|
children: [
|
|
3736
|
-
t != null && /* @__PURE__ */ e("span", { className:
|
|
3820
|
+
t != null && /* @__PURE__ */ e("span", { className: c("flex size-disc items-center justify-center rounded-full text-2xl", qr[r]), children: t }),
|
|
3737
3821
|
/* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
|
|
3738
3822
|
s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
|
|
3739
3823
|
a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
|
|
@@ -3741,11 +3825,11 @@ function jn({
|
|
|
3741
3825
|
}
|
|
3742
3826
|
);
|
|
3743
3827
|
}
|
|
3744
|
-
function
|
|
3828
|
+
function Jn({ children: t, className: r, ...n }) {
|
|
3745
3829
|
return /* @__PURE__ */ e(
|
|
3746
3830
|
"kbd",
|
|
3747
3831
|
{
|
|
3748
|
-
className:
|
|
3832
|
+
className: c(
|
|
3749
3833
|
"inline-flex items-center rounded border border-border px-1.5 py-px text-xs font-medium leading-none text-text-muted",
|
|
3750
3834
|
r
|
|
3751
3835
|
),
|
|
@@ -3754,14 +3838,14 @@ function On({ children: t, className: r, ...n }) {
|
|
|
3754
3838
|
}
|
|
3755
3839
|
);
|
|
3756
3840
|
}
|
|
3757
|
-
const
|
|
3841
|
+
const Ur = {
|
|
3758
3842
|
sm: "h-1",
|
|
3759
3843
|
md: "h-1.5"
|
|
3760
|
-
},
|
|
3844
|
+
}, Wr = {
|
|
3761
3845
|
accent: "bg-accent",
|
|
3762
3846
|
success: "bg-success"
|
|
3763
3847
|
};
|
|
3764
|
-
function
|
|
3848
|
+
function Yn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3765
3849
|
const l = Math.max(0, Math.min(100, t));
|
|
3766
3850
|
return /* @__PURE__ */ e(
|
|
3767
3851
|
"div",
|
|
@@ -3770,37 +3854,37 @@ function Fn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
|
|
|
3770
3854
|
"aria-valuenow": Math.round(l),
|
|
3771
3855
|
"aria-valuemin": 0,
|
|
3772
3856
|
"aria-valuemax": 100,
|
|
3773
|
-
className:
|
|
3857
|
+
className: c("w-full overflow-hidden rounded-full bg-surface-hover", Ur[n], s),
|
|
3774
3858
|
...a,
|
|
3775
3859
|
children: /* @__PURE__ */ e(
|
|
3776
3860
|
"div",
|
|
3777
3861
|
{
|
|
3778
|
-
className:
|
|
3862
|
+
className: c("h-full rounded-full transition-[width] duration-300 ease-out", Wr[r]),
|
|
3779
3863
|
style: { width: `${l}%` }
|
|
3780
3864
|
}
|
|
3781
3865
|
)
|
|
3782
3866
|
}
|
|
3783
3867
|
);
|
|
3784
3868
|
}
|
|
3785
|
-
const
|
|
3869
|
+
const Kr = {
|
|
3786
3870
|
xs: "h-3 w-3",
|
|
3787
3871
|
sm: "h-4 w-4",
|
|
3788
3872
|
md: "h-6 w-6",
|
|
3789
3873
|
lg: "h-8 w-8",
|
|
3790
3874
|
xl: "h-12 w-12"
|
|
3791
|
-
},
|
|
3875
|
+
}, Gr = {
|
|
3792
3876
|
primary: "text-accent",
|
|
3793
3877
|
secondary: "text-text-muted",
|
|
3794
3878
|
white: "text-white",
|
|
3795
3879
|
current: "text-current"
|
|
3796
|
-
},
|
|
3880
|
+
}, Jr = {
|
|
3797
3881
|
xs: "text-xs",
|
|
3798
3882
|
sm: "text-sm",
|
|
3799
3883
|
md: "text-sm",
|
|
3800
3884
|
lg: "text-base",
|
|
3801
3885
|
xl: "text-lg"
|
|
3802
3886
|
};
|
|
3803
|
-
function
|
|
3887
|
+
function Xn({
|
|
3804
3888
|
size: t = "md",
|
|
3805
3889
|
variant: r = "primary",
|
|
3806
3890
|
label: n = "Loading...",
|
|
@@ -3808,23 +3892,23 @@ function Bn({
|
|
|
3808
3892
|
className: a,
|
|
3809
3893
|
...l
|
|
3810
3894
|
}) {
|
|
3811
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ i(
|
|
3812
3896
|
"div",
|
|
3813
3897
|
{
|
|
3814
|
-
className:
|
|
3898
|
+
className: c(
|
|
3815
3899
|
"inline-flex items-center",
|
|
3816
3900
|
s ? "flex-col space-y-2" : "",
|
|
3817
3901
|
a
|
|
3818
3902
|
),
|
|
3819
3903
|
...l,
|
|
3820
3904
|
children: [
|
|
3821
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ i(
|
|
3822
3906
|
"svg",
|
|
3823
3907
|
{
|
|
3824
|
-
className:
|
|
3908
|
+
className: c(
|
|
3825
3909
|
"animate-spin",
|
|
3826
|
-
|
|
3827
|
-
|
|
3910
|
+
Kr[t],
|
|
3911
|
+
Gr[r]
|
|
3828
3912
|
),
|
|
3829
3913
|
fill: "none",
|
|
3830
3914
|
viewBox: "0 0 24 24",
|
|
@@ -3856,9 +3940,9 @@ function Bn({
|
|
|
3856
3940
|
s && /* @__PURE__ */ e(
|
|
3857
3941
|
"span",
|
|
3858
3942
|
{
|
|
3859
|
-
className:
|
|
3943
|
+
className: c(
|
|
3860
3944
|
"text-text-muted",
|
|
3861
|
-
|
|
3945
|
+
Jr[t]
|
|
3862
3946
|
),
|
|
3863
3947
|
children: n
|
|
3864
3948
|
}
|
|
@@ -3868,7 +3952,7 @@ function Bn({
|
|
|
3868
3952
|
}
|
|
3869
3953
|
);
|
|
3870
3954
|
}
|
|
3871
|
-
const
|
|
3955
|
+
const Yr = {
|
|
3872
3956
|
neutral: "bg-text-disabled",
|
|
3873
3957
|
accent: "bg-accent",
|
|
3874
3958
|
success: "bg-success",
|
|
@@ -3882,7 +3966,7 @@ const Rr = {
|
|
|
3882
3966
|
"cat-4": "bg-cat-4",
|
|
3883
3967
|
"cat-5": "bg-cat-5"
|
|
3884
3968
|
};
|
|
3885
|
-
function
|
|
3969
|
+
function Zn({
|
|
3886
3970
|
tone: t = "neutral",
|
|
3887
3971
|
shape: r = "round",
|
|
3888
3972
|
pulse: n = !1,
|
|
@@ -3895,17 +3979,17 @@ function Rn({
|
|
|
3895
3979
|
role: s ? "img" : void 0,
|
|
3896
3980
|
"aria-label": s,
|
|
3897
3981
|
"aria-hidden": s ? void 0 : !0,
|
|
3898
|
-
className:
|
|
3982
|
+
className: c(
|
|
3899
3983
|
"inline-block size-dot shrink-0",
|
|
3900
3984
|
r === "round" ? "rounded-full" : "rounded-sm",
|
|
3901
|
-
|
|
3985
|
+
Yr[t],
|
|
3902
3986
|
n && "animate-pulse",
|
|
3903
3987
|
a
|
|
3904
3988
|
)
|
|
3905
3989
|
}
|
|
3906
3990
|
);
|
|
3907
3991
|
}
|
|
3908
|
-
function
|
|
3992
|
+
function Qn({
|
|
3909
3993
|
steps: t,
|
|
3910
3994
|
current: r,
|
|
3911
3995
|
variant: n = "numbered",
|
|
@@ -3913,10 +3997,10 @@ function Hn({
|
|
|
3913
3997
|
className: a
|
|
3914
3998
|
}) {
|
|
3915
3999
|
const l = t.indexOf(r), o = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
|
|
3916
|
-
return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className:
|
|
4000
|
+
return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: c("flex items-center gap-1.5", a), children: t.map((f, d) => /* @__PURE__ */ e(
|
|
3917
4001
|
"span",
|
|
3918
4002
|
{
|
|
3919
|
-
className:
|
|
4003
|
+
className: c(
|
|
3920
4004
|
"h-step-bar rounded-full transition-all duration-fast ease-out",
|
|
3921
4005
|
d === l ? "w-5 bg-accent" : "w-3.5",
|
|
3922
4006
|
d < l && "bg-border-strong",
|
|
@@ -3924,12 +4008,12 @@ function Hn({
|
|
|
3924
4008
|
)
|
|
3925
4009
|
},
|
|
3926
4010
|
f
|
|
3927
|
-
)) }) : /* @__PURE__ */ e("div", { ...o, className:
|
|
4011
|
+
)) }) : /* @__PURE__ */ e("div", { ...o, className: c("flex items-center gap-2", a), children: t.map((f, d) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
3928
4012
|
/* @__PURE__ */ e(
|
|
3929
4013
|
"span",
|
|
3930
4014
|
{
|
|
3931
4015
|
"aria-current": d === l ? "step" : void 0,
|
|
3932
|
-
className:
|
|
4016
|
+
className: c(
|
|
3933
4017
|
"flex size-tile-sm items-center justify-center rounded-full text-xs font-medium",
|
|
3934
4018
|
d === l && "bg-accent text-accent-fg",
|
|
3935
4019
|
d < l && "bg-accent-soft text-accent",
|
|
@@ -3941,18 +4025,18 @@ function Hn({
|
|
|
3941
4025
|
d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3942
4026
|
] }, f)) });
|
|
3943
4027
|
}
|
|
3944
|
-
function
|
|
3945
|
-
return /* @__PURE__ */
|
|
4028
|
+
function es({ title: t, icon: r = /* @__PURE__ */ e(Tt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
|
|
4029
|
+
return /* @__PURE__ */ i(
|
|
3946
4030
|
"div",
|
|
3947
4031
|
{
|
|
3948
|
-
className:
|
|
4032
|
+
className: c(
|
|
3949
4033
|
"flex flex-col gap-2 rounded-xl border p-4",
|
|
3950
4034
|
"border-assistant-border bg-assistant-soft",
|
|
3951
4035
|
a
|
|
3952
4036
|
),
|
|
3953
4037
|
...l,
|
|
3954
4038
|
children: [
|
|
3955
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-assistant", children: [
|
|
3956
4040
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, children: r }),
|
|
3957
4041
|
/* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: t }),
|
|
3958
4042
|
n && /* @__PURE__ */ e("span", { className: "ml-auto", children: n })
|
|
@@ -3962,30 +4046,32 @@ function Vn({ title: t, icon: r = /* @__PURE__ */ e(Nt, { className: "size-icon-
|
|
|
3962
4046
|
}
|
|
3963
4047
|
);
|
|
3964
4048
|
}
|
|
3965
|
-
const
|
|
4049
|
+
const Xr = {
|
|
3966
4050
|
default: "bg-avatar text-avatar-fg",
|
|
3967
4051
|
in: "bg-avatar-in text-avatar-in-fg",
|
|
3968
4052
|
out: "bg-accent text-accent-fg",
|
|
3969
4053
|
note: "bg-avatar-note text-avatar-note-fg"
|
|
3970
|
-
},
|
|
4054
|
+
}, Zr = {
|
|
3971
4055
|
xs: "w-5 h-5 text-xs",
|
|
3972
4056
|
sm: "w-6 h-6 text-xs",
|
|
3973
4057
|
md: "w-7 h-7 text-base",
|
|
3974
4058
|
lg: "w-9 h-9 text-sm"
|
|
3975
4059
|
};
|
|
3976
|
-
function
|
|
4060
|
+
function Qr(t) {
|
|
3977
4061
|
if (!t) return "?";
|
|
3978
4062
|
const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
3979
4063
|
return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
|
|
3980
4064
|
}
|
|
3981
|
-
const
|
|
3982
|
-
const [o, f] = ce.useState(!1), d =
|
|
4065
|
+
const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
|
|
4066
|
+
const [o, f] = ce.useState(!1), d = c(
|
|
3983
4067
|
// Its own token and not `surface-hover`: at 0.972 the plate was within a few
|
|
3984
4068
|
// percent of every surface it sits on, so the monogram floated instead of
|
|
3985
4069
|
// sitting in a disc.
|
|
3986
4070
|
"inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
|
|
3987
|
-
|
|
3988
|
-
|
|
4071
|
+
// `identity` is seeded on the name, so the same person keeps their colour
|
|
4072
|
+
// wherever they appear; the fixed tones stay as they were.
|
|
4073
|
+
n === "identity" ? Je(t) : Xr[n],
|
|
4074
|
+
Zr[s],
|
|
3989
4075
|
a
|
|
3990
4076
|
);
|
|
3991
4077
|
return r && !o ? /* @__PURE__ */ e(
|
|
@@ -3994,38 +4080,38 @@ const Ur = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
|
|
|
3994
4080
|
src: r,
|
|
3995
4081
|
alt: t ?? "",
|
|
3996
4082
|
title: l ?? t,
|
|
3997
|
-
className:
|
|
4083
|
+
className: c(d, "object-cover"),
|
|
3998
4084
|
onError: () => f(!0)
|
|
3999
4085
|
}
|
|
4000
|
-
) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children:
|
|
4001
|
-
},
|
|
4086
|
+
) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: Qr(t) });
|
|
4087
|
+
}, We = "ring-surface", tn = "ring-surface-accent", ts = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
4002
4088
|
if (t.length === 0) return null;
|
|
4003
4089
|
const a = t.slice(0, r), l = t.length - a.length;
|
|
4004
|
-
return /* @__PURE__ */
|
|
4090
|
+
return /* @__PURE__ */ i("span", { className: c("inline-flex items-center", s), children: [
|
|
4005
4091
|
a.map((o, f) => /* @__PURE__ */ e(
|
|
4006
|
-
|
|
4092
|
+
en,
|
|
4007
4093
|
{
|
|
4008
4094
|
name: o.name,
|
|
4009
4095
|
src: o.src,
|
|
4010
4096
|
size: n,
|
|
4011
4097
|
title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
|
|
4012
|
-
className:
|
|
4098
|
+
className: c(
|
|
4013
4099
|
f > 0 && "-ml-2",
|
|
4014
|
-
o.owner ?
|
|
4100
|
+
o.owner ? tn : We,
|
|
4015
4101
|
o.seen === !1 && "opacity-40"
|
|
4016
4102
|
)
|
|
4017
4103
|
},
|
|
4018
4104
|
o.id ?? `${o.name}-${f}`
|
|
4019
4105
|
)),
|
|
4020
|
-
l > 0 && /* @__PURE__ */
|
|
4106
|
+
l > 0 && /* @__PURE__ */ i(
|
|
4021
4107
|
"span",
|
|
4022
4108
|
{
|
|
4023
|
-
className:
|
|
4109
|
+
className: c(
|
|
4024
4110
|
// Same fill as an Avatar plate, so the "+3" reads as one more disc
|
|
4025
4111
|
// in the row rather than a gap at the end of it.
|
|
4026
4112
|
"inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-avatar text-avatar-fg",
|
|
4027
4113
|
n === "xs" ? "w-5 h-5 text-xs" : n === "md" ? "w-7 h-7 text-xs" : n === "lg" ? "w-9 h-9 text-xs" : "w-6 h-6 text-xs",
|
|
4028
|
-
|
|
4114
|
+
We
|
|
4029
4115
|
),
|
|
4030
4116
|
children: [
|
|
4031
4117
|
"+",
|
|
@@ -4034,35 +4120,37 @@ const Ur = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
|
|
|
4034
4120
|
}
|
|
4035
4121
|
)
|
|
4036
4122
|
] });
|
|
4037
|
-
},
|
|
4123
|
+
}, Ee = {
|
|
4038
4124
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
4039
4125
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
4040
4126
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
4041
4127
|
tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
|
|
4042
4128
|
note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
|
|
4043
|
-
},
|
|
4129
|
+
}, rn = {
|
|
4044
4130
|
sm: "size-avatar-xs rounded-sm text-xs",
|
|
4045
4131
|
md: "size-avatar-sm rounded-md text-xs",
|
|
4046
4132
|
lg: "size-avatar-lg rounded-md text-base"
|
|
4047
4133
|
};
|
|
4048
|
-
function
|
|
4049
|
-
const l =
|
|
4134
|
+
function rs({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
4135
|
+
const l = t in Ee ? Ee[t] : void 0;
|
|
4050
4136
|
return /* @__PURE__ */ e(
|
|
4051
4137
|
"span",
|
|
4052
4138
|
{
|
|
4053
4139
|
title: a,
|
|
4054
|
-
className:
|
|
4140
|
+
className: c(
|
|
4055
4141
|
"inline-flex shrink-0 items-center justify-center font-bold",
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4142
|
+
rn[n],
|
|
4143
|
+
// An undeclared channel used to collapse onto the neutral "note" tone,
|
|
4144
|
+
// which is also what a real internal note looks like. Deriving from the
|
|
4145
|
+
// key keeps it distinguishable and keeps `note` meaning `note`.
|
|
4146
|
+
l ? c(l.fg, l.bg) : t ? Je(t) : c(Ee.note.fg, Ee.note.bg),
|
|
4059
4147
|
s
|
|
4060
4148
|
),
|
|
4061
4149
|
children: r
|
|
4062
4150
|
}
|
|
4063
4151
|
);
|
|
4064
4152
|
}
|
|
4065
|
-
const
|
|
4153
|
+
const ns = ({
|
|
4066
4154
|
src: t,
|
|
4067
4155
|
alt: r,
|
|
4068
4156
|
size: n = "md",
|
|
@@ -4078,15 +4166,15 @@ const Wn = ({
|
|
|
4078
4166
|
onError: b,
|
|
4079
4167
|
...p
|
|
4080
4168
|
}) => {
|
|
4081
|
-
const [w, g] = O(!0), [x,
|
|
4082
|
-
g(!1),
|
|
4169
|
+
const [w, g] = O(!0), [x, T] = O(!1), [C, q] = O(t), D = (K) => {
|
|
4170
|
+
g(!1), T(!1), m?.(K);
|
|
4083
4171
|
}, J = (K) => {
|
|
4084
|
-
if (g(!1),
|
|
4085
|
-
q(f),
|
|
4172
|
+
if (g(!1), T(!0), f && C !== f) {
|
|
4173
|
+
q(f), T(!1), g(!0);
|
|
4086
4174
|
return;
|
|
4087
4175
|
}
|
|
4088
4176
|
b?.(K);
|
|
4089
|
-
}, V =
|
|
4177
|
+
}, V = c(
|
|
4090
4178
|
"relative overflow-hidden bg-surface-hover",
|
|
4091
4179
|
// Size variants
|
|
4092
4180
|
{
|
|
@@ -4114,27 +4202,27 @@ const Wn = ({
|
|
|
4114
4202
|
"rounded-full": a === "full"
|
|
4115
4203
|
},
|
|
4116
4204
|
h
|
|
4117
|
-
),
|
|
4205
|
+
), I = c(
|
|
4118
4206
|
"w-full h-full object-cover transition-opacity duration-fast",
|
|
4119
4207
|
{
|
|
4120
4208
|
"opacity-0": w || x,
|
|
4121
4209
|
"opacity-100": !w && !x
|
|
4122
4210
|
}
|
|
4123
|
-
), H =
|
|
4211
|
+
), H = c(
|
|
4124
4212
|
"absolute inset-0 flex items-center justify-center",
|
|
4125
4213
|
"text-text-muted"
|
|
4126
|
-
), te = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */
|
|
4127
|
-
/* @__PURE__ */ e(Z, { icon:
|
|
4214
|
+
), te = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Y = /* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
4215
|
+
/* @__PURE__ */ e(Z, { icon: $t, size: "lg", className: "mx-auto mb-1" }),
|
|
4128
4216
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
4129
4217
|
] });
|
|
4130
|
-
return /* @__PURE__ */
|
|
4218
|
+
return /* @__PURE__ */ i("div", { className: V, children: [
|
|
4131
4219
|
/* @__PURE__ */ e(
|
|
4132
4220
|
"img",
|
|
4133
4221
|
{
|
|
4134
4222
|
...p,
|
|
4135
4223
|
src: C,
|
|
4136
4224
|
alt: r,
|
|
4137
|
-
className:
|
|
4225
|
+
className: I,
|
|
4138
4226
|
onLoad: D,
|
|
4139
4227
|
onError: J
|
|
4140
4228
|
}
|
|
@@ -4143,17 +4231,17 @@ const Wn = ({
|
|
|
4143
4231
|
x && o && /* @__PURE__ */ e("div", { className: H, children: v || Y })
|
|
4144
4232
|
] });
|
|
4145
4233
|
};
|
|
4146
|
-
function
|
|
4234
|
+
function ss({
|
|
4147
4235
|
icon: t,
|
|
4148
4236
|
onClick: r,
|
|
4149
4237
|
children: n
|
|
4150
4238
|
}) {
|
|
4151
|
-
return /* @__PURE__ */
|
|
4239
|
+
return /* @__PURE__ */ i(
|
|
4152
4240
|
"button",
|
|
4153
4241
|
{
|
|
4154
4242
|
type: "button",
|
|
4155
4243
|
onClick: r,
|
|
4156
|
-
className:
|
|
4244
|
+
className: c(
|
|
4157
4245
|
"inline-flex h-control-sm shrink-0 cursor-pointer items-center gap-1.5 rounded-md px-2.5",
|
|
4158
4246
|
"text-sm font-medium whitespace-nowrap",
|
|
4159
4247
|
"transition-colors duration-fast ease-out hover:bg-white/15",
|
|
@@ -4166,7 +4254,7 @@ function Kn({
|
|
|
4166
4254
|
}
|
|
4167
4255
|
);
|
|
4168
4256
|
}
|
|
4169
|
-
function
|
|
4257
|
+
function as({
|
|
4170
4258
|
items: t,
|
|
4171
4259
|
getRowKey: r,
|
|
4172
4260
|
variant: n = "divided",
|
|
@@ -4184,13 +4272,13 @@ function Gn({
|
|
|
4184
4272
|
stickyGroupHeaders: w = !1,
|
|
4185
4273
|
collapsibleGroups: g = !1,
|
|
4186
4274
|
hideGroupCount: x = !1,
|
|
4187
|
-
selectable:
|
|
4275
|
+
selectable: T = !1,
|
|
4188
4276
|
selectedItems: C = [],
|
|
4189
4277
|
onSelectionChange: q,
|
|
4190
4278
|
bulkActions: D,
|
|
4191
4279
|
header: J,
|
|
4192
4280
|
stickyHeader: V = !1,
|
|
4193
|
-
bordered:
|
|
4281
|
+
bordered: I = !1,
|
|
4194
4282
|
emptyContent: H,
|
|
4195
4283
|
loading: te = !1,
|
|
4196
4284
|
loadingRows: Y = 4,
|
|
@@ -4214,7 +4302,7 @@ function Gn({
|
|
|
4214
4302
|
q && q(
|
|
4215
4303
|
F ? [...C, z] : C.filter((j) => j !== z)
|
|
4216
4304
|
);
|
|
4217
|
-
}, se = (z) => q?.(z ? [...t] : []), ee =
|
|
4305
|
+
}, se = (z) => q?.(z ? [...t] : []), ee = c(
|
|
4218
4306
|
"flex flex-col",
|
|
4219
4307
|
// With a selection open the list has a dock at its foot. Sticky can only
|
|
4220
4308
|
// park at the bottom of its own box, so on a list shorter than the window
|
|
@@ -4222,15 +4310,15 @@ function Gn({
|
|
|
4222
4310
|
// screen. Growing the box to the height of its parent puts it where it
|
|
4223
4311
|
// belongs — and only while a selection exists, so an ordinary short list
|
|
4224
4312
|
// keeps its natural height.
|
|
4225
|
-
|
|
4226
|
-
|
|
4313
|
+
T && C.length > 0 && "min-h-full",
|
|
4314
|
+
I && "overflow-hidden rounded-lg border border-border-subtle",
|
|
4227
4315
|
K
|
|
4228
4316
|
);
|
|
4229
4317
|
if (te)
|
|
4230
|
-
return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: Y }).map((z, F) => /* @__PURE__ */
|
|
4318
|
+
return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: Y }).map((z, F) => /* @__PURE__ */ i(
|
|
4231
4319
|
"div",
|
|
4232
4320
|
{
|
|
4233
|
-
className:
|
|
4321
|
+
className: c(
|
|
4234
4322
|
"flex animate-pulse items-center gap-3 px-4 py-2",
|
|
4235
4323
|
n === "divided" && F > 0 && "border-t border-border-subtle"
|
|
4236
4324
|
),
|
|
@@ -4245,9 +4333,9 @@ function Gn({
|
|
|
4245
4333
|
)) });
|
|
4246
4334
|
if (t.length === 0 && H)
|
|
4247
4335
|
return /* @__PURE__ */ e("div", { className: ee, children: H });
|
|
4248
|
-
const X = t.length > 0 && C.length === t.length,
|
|
4249
|
-
const B = d?.(z, F) ?? !1, M = v?.(z, F) ?? !1, L = h?.(z, F) ?? !1, Q =
|
|
4250
|
-
return /* @__PURE__ */
|
|
4336
|
+
const X = t.length > 0 && C.length === t.length, P = C.length > 0 && !X, $ = (z, F, j) => {
|
|
4337
|
+
const B = d?.(z, F) ?? !1, M = v?.(z, F) ?? !1, L = h?.(z, F) ?? !1, Q = T && N(z);
|
|
4338
|
+
return /* @__PURE__ */ i(
|
|
4251
4339
|
"li",
|
|
4252
4340
|
{
|
|
4253
4341
|
...o ? {
|
|
@@ -4261,7 +4349,7 @@ function Gn({
|
|
|
4261
4349
|
ae.key !== "Enter" && ae.key !== " " || (ae.preventDefault(), o(z, F));
|
|
4262
4350
|
}
|
|
4263
4351
|
} : {},
|
|
4264
|
-
className:
|
|
4352
|
+
className: c(
|
|
4265
4353
|
"flex items-center gap-3 text-base",
|
|
4266
4354
|
"transition-colors duration-fast ease-out",
|
|
4267
4355
|
n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
|
|
@@ -4270,14 +4358,14 @@ function Gn({
|
|
|
4270
4358
|
// An unread row is tinted, not bolded: at five columns a bold row
|
|
4271
4359
|
// shouts across all of them, while the tint marks the row and leaves
|
|
4272
4360
|
// the consumer free to weight only the sender and the subject.
|
|
4273
|
-
B || Q ? "bg-accent-soft text-text" : M ?
|
|
4361
|
+
B || Q ? "bg-accent-soft text-text" : M ? c("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
|
|
4274
4362
|
// Read rows stay at full opacity — fading them also fades the avatars
|
|
4275
4363
|
// and team dots, which is exactly the identity you scan by. They read
|
|
4276
4364
|
// as secondary through weight and text colour instead.
|
|
4277
4365
|
L && "text-text-muted"
|
|
4278
4366
|
),
|
|
4279
4367
|
children: [
|
|
4280
|
-
|
|
4368
|
+
T && /* @__PURE__ */ e("span", { onClick: (ae) => ae.stopPropagation(), children: /* @__PURE__ */ e(
|
|
4281
4369
|
ye,
|
|
4282
4370
|
{
|
|
4283
4371
|
checked: N(z),
|
|
@@ -4301,7 +4389,7 @@ function Gn({
|
|
|
4301
4389
|
);
|
|
4302
4390
|
}, _ = (() => {
|
|
4303
4391
|
if (!m)
|
|
4304
|
-
return t.map((B, M) =>
|
|
4392
|
+
return t.map((B, M) => $(B, M, M === 0));
|
|
4305
4393
|
const z = /* @__PURE__ */ new Map();
|
|
4306
4394
|
t.forEach((B, M) => {
|
|
4307
4395
|
const L = m(B, M);
|
|
@@ -4316,7 +4404,7 @@ function Gn({
|
|
|
4316
4404
|
"li",
|
|
4317
4405
|
{
|
|
4318
4406
|
onClick: g ? () => u((he) => ({ ...he, [B.id]: !he[B.id] })) : void 0,
|
|
4319
|
-
className:
|
|
4407
|
+
className: c(
|
|
4320
4408
|
// A caption over its rows, not a band across the table: same
|
|
4321
4409
|
// surface as the rows, no rules, and the count as a quiet pill.
|
|
4322
4410
|
// The old grey uppercase strip read as a second column header.
|
|
@@ -4328,12 +4416,12 @@ function Gn({
|
|
|
4328
4416
|
),
|
|
4329
4417
|
"aria-expanded": g ? !Q : void 0,
|
|
4330
4418
|
style: w ? { top: V ? 28 : 0 } : void 0,
|
|
4331
|
-
children: p ? p(B, L.map((he) => he.item)) : /* @__PURE__ */
|
|
4419
|
+
children: p ? p(B, L.map((he) => he.item)) : /* @__PURE__ */ i(ke, { children: [
|
|
4332
4420
|
g && /* @__PURE__ */ e(
|
|
4333
4421
|
$e,
|
|
4334
4422
|
{
|
|
4335
4423
|
"aria-hidden": !0,
|
|
4336
|
-
className:
|
|
4424
|
+
className: c(
|
|
4337
4425
|
"size-icon-md shrink-0 text-text-subtle transition-transform duration-fast ease-out",
|
|
4338
4426
|
!Q && "rotate-90"
|
|
4339
4427
|
)
|
|
@@ -4343,7 +4431,7 @@ function Gn({
|
|
|
4343
4431
|
!x && /* @__PURE__ */ e(
|
|
4344
4432
|
"span",
|
|
4345
4433
|
{
|
|
4346
|
-
className:
|
|
4434
|
+
className: c(
|
|
4347
4435
|
"rounded-full px-2 text-xs font-normal tabular-nums",
|
|
4348
4436
|
B.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
|
|
4349
4437
|
),
|
|
@@ -4357,16 +4445,16 @@ function Gn({
|
|
|
4357
4445
|
return Q ? [ge] : [
|
|
4358
4446
|
ge,
|
|
4359
4447
|
...L.map(
|
|
4360
|
-
({ item: he, index:
|
|
4448
|
+
({ item: he, index: Ae }, S) => $(he, Ae, S === 0)
|
|
4361
4449
|
)
|
|
4362
4450
|
];
|
|
4363
4451
|
});
|
|
4364
4452
|
})();
|
|
4365
|
-
return /* @__PURE__ */
|
|
4366
|
-
J && /* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ i("div", { ref: E, className: ee, onKeyDown: o ? y : void 0, children: [
|
|
4454
|
+
J && /* @__PURE__ */ i(
|
|
4367
4455
|
"div",
|
|
4368
4456
|
{
|
|
4369
|
-
className:
|
|
4457
|
+
className: c(
|
|
4370
4458
|
// h-row-sm keeps the strip exactly 28px, which is the offset the
|
|
4371
4459
|
// sticky group headers park against.
|
|
4372
4460
|
"flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
|
|
@@ -4374,11 +4462,11 @@ function Gn({
|
|
|
4374
4462
|
V && "sticky top-0 z-20"
|
|
4375
4463
|
),
|
|
4376
4464
|
children: [
|
|
4377
|
-
|
|
4465
|
+
T && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
4378
4466
|
ye,
|
|
4379
4467
|
{
|
|
4380
4468
|
checked: X,
|
|
4381
|
-
indeterminate:
|
|
4469
|
+
indeterminate: P,
|
|
4382
4470
|
onChange: (z) => se(z.target.checked),
|
|
4383
4471
|
"aria-label": "Alles selecteren"
|
|
4384
4472
|
}
|
|
@@ -4388,8 +4476,8 @@ function Gn({
|
|
|
4388
4476
|
}
|
|
4389
4477
|
),
|
|
4390
4478
|
/* @__PURE__ */ e("ul", { "aria-label": ie, className: "flex flex-col", children: _ }),
|
|
4391
|
-
|
|
4392
|
-
/* @__PURE__ */
|
|
4479
|
+
T && C.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ i("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: [
|
|
4480
|
+
/* @__PURE__ */ i("span", { className: "text-sm font-medium", children: [
|
|
4393
4481
|
C.length,
|
|
4394
4482
|
" geselecteerd"
|
|
4395
4483
|
] }),
|
|
@@ -4409,7 +4497,7 @@ function Gn({
|
|
|
4409
4497
|
] }) })
|
|
4410
4498
|
] });
|
|
4411
4499
|
}
|
|
4412
|
-
function
|
|
4500
|
+
function ls({
|
|
4413
4501
|
side: t,
|
|
4414
4502
|
continued: r = !1,
|
|
4415
4503
|
tone: n = "default",
|
|
@@ -4419,7 +4507,7 @@ function Jn({
|
|
|
4419
4507
|
return /* @__PURE__ */ e(
|
|
4420
4508
|
"div",
|
|
4421
4509
|
{
|
|
4422
|
-
className:
|
|
4510
|
+
className: c(
|
|
4423
4511
|
// A bubble never spans the whole column; it narrows further from md,
|
|
4424
4512
|
// where the thread itself is wide enough for the difference to matter.
|
|
4425
4513
|
// No shadow: a bubble is an inner card, and inner cards separate
|
|
@@ -4446,18 +4534,18 @@ function Jn({
|
|
|
4446
4534
|
}
|
|
4447
4535
|
);
|
|
4448
4536
|
}
|
|
4449
|
-
const
|
|
4537
|
+
const nn = {
|
|
4450
4538
|
default: "text-text",
|
|
4451
4539
|
urgent: "text-danger-fg",
|
|
4452
4540
|
success: "text-success-fg"
|
|
4453
4541
|
};
|
|
4454
|
-
function
|
|
4455
|
-
return /* @__PURE__ */
|
|
4456
|
-
/* @__PURE__ */ e("div", { className:
|
|
4542
|
+
function os({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4543
|
+
return /* @__PURE__ */ i("div", { className: c("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
|
|
4544
|
+
/* @__PURE__ */ e("div", { className: c("text-2xl font-semibold", nn[n]), children: t }),
|
|
4457
4545
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4458
4546
|
] });
|
|
4459
4547
|
}
|
|
4460
|
-
const
|
|
4548
|
+
const cs = ({
|
|
4461
4549
|
surface: t = !1,
|
|
4462
4550
|
title: r,
|
|
4463
4551
|
subtitle: n,
|
|
@@ -4477,17 +4565,17 @@ const Xn = ({
|
|
|
4477
4565
|
}, [r]), G(() => {
|
|
4478
4566
|
b && x.current && (x.current.focus(), x.current.select());
|
|
4479
4567
|
}, [b]);
|
|
4480
|
-
const
|
|
4568
|
+
const T = () => {
|
|
4481
4569
|
h && p(!0);
|
|
4482
4570
|
}, C = () => {
|
|
4483
4571
|
p(!1), w.trim() !== "" && w !== r && m ? m(w.trim()) : g(r);
|
|
4484
4572
|
}, q = (D) => {
|
|
4485
4573
|
D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), p(!1));
|
|
4486
4574
|
};
|
|
4487
|
-
return /* @__PURE__ */
|
|
4575
|
+
return /* @__PURE__ */ i(
|
|
4488
4576
|
"div",
|
|
4489
4577
|
{
|
|
4490
|
-
className:
|
|
4578
|
+
className: c(
|
|
4491
4579
|
"px-5 pt-4 pb-2.5",
|
|
4492
4580
|
// Inside the content card the header shares the card's surface; the
|
|
4493
4581
|
// rule is the only thing that still closes it off. `surface` therefore
|
|
@@ -4497,12 +4585,12 @@ const Xn = ({
|
|
|
4497
4585
|
o
|
|
4498
4586
|
),
|
|
4499
4587
|
children: [
|
|
4500
|
-
/* @__PURE__ */
|
|
4501
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */
|
|
4588
|
+
/* @__PURE__ */ i("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
|
|
4589
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4 text-text", children: [
|
|
4502
4590
|
v && // Ghost: a framed box around a back chevron makes the way out of a
|
|
4503
4591
|
// page look like the page's primary control.
|
|
4504
4592
|
/* @__PURE__ */ e(le, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "md" }), iconOnly: !0 }),
|
|
4505
|
-
/* @__PURE__ */
|
|
4593
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
4506
4594
|
b ? /* @__PURE__ */ e(
|
|
4507
4595
|
"input",
|
|
4508
4596
|
{
|
|
@@ -4514,12 +4602,12 @@ const Xn = ({
|
|
|
4514
4602
|
onKeyDown: q,
|
|
4515
4603
|
className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
|
|
4516
4604
|
}
|
|
4517
|
-
) : /* @__PURE__ */
|
|
4605
|
+
) : /* @__PURE__ */ i("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
|
|
4518
4606
|
/* @__PURE__ */ e(
|
|
4519
4607
|
"h2",
|
|
4520
4608
|
{
|
|
4521
|
-
onClick:
|
|
4522
|
-
className:
|
|
4609
|
+
onClick: T,
|
|
4610
|
+
className: c(
|
|
4523
4611
|
"text-lg font-semibold tracking-title truncate",
|
|
4524
4612
|
h && "cursor-pointer"
|
|
4525
4613
|
),
|
|
@@ -4529,10 +4617,10 @@ const Xn = ({
|
|
|
4529
4617
|
),
|
|
4530
4618
|
n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
|
|
4531
4619
|
h && /* @__PURE__ */ e(
|
|
4532
|
-
|
|
4620
|
+
_t,
|
|
4533
4621
|
{
|
|
4534
4622
|
size: 15,
|
|
4535
|
-
onClick:
|
|
4623
|
+
onClick: T,
|
|
4536
4624
|
className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
|
|
4537
4625
|
}
|
|
4538
4626
|
)
|
|
@@ -4544,7 +4632,7 @@ const Xn = ({
|
|
|
4544
4632
|
/* @__PURE__ */ e(
|
|
4545
4633
|
"div",
|
|
4546
4634
|
{
|
|
4547
|
-
className:
|
|
4635
|
+
className: c(
|
|
4548
4636
|
"mt-1 min-w-0 text-sm text-text-subtle",
|
|
4549
4637
|
typeof s == "string" && "truncate"
|
|
4550
4638
|
),
|
|
@@ -4555,7 +4643,7 @@ const Xn = ({
|
|
|
4555
4643
|
] }) }),
|
|
4556
4644
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4557
4645
|
(D) => D.render ? /* @__PURE__ */ e(ce.Fragment, { children: D.render() }, D.id) : D.splitOptions && D.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4558
|
-
|
|
4646
|
+
Xe,
|
|
4559
4647
|
{
|
|
4560
4648
|
label: D.label,
|
|
4561
4649
|
onClick: D.onClick,
|
|
@@ -4584,7 +4672,7 @@ const Xn = ({
|
|
|
4584
4672
|
]
|
|
4585
4673
|
}
|
|
4586
4674
|
);
|
|
4587
|
-
},
|
|
4675
|
+
}, sn = /<[a-z][\s\S]*>/i, an = [
|
|
4588
4676
|
"[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
|
|
4589
4677
|
"[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
|
|
4590
4678
|
"[&_strong]:font-semibold [&_em]:italic",
|
|
@@ -4599,7 +4687,7 @@ const Xn = ({
|
|
|
4599
4687
|
"[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
|
|
4600
4688
|
"[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
|
|
4601
4689
|
"[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
|
|
4602
|
-
].join(" "),
|
|
4690
|
+
].join(" "), ln = {
|
|
4603
4691
|
p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
|
|
4604
4692
|
a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
|
|
4605
4693
|
strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
|
|
@@ -4622,35 +4710,35 @@ const Xn = ({
|
|
|
4622
4710
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4623
4711
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4624
4712
|
};
|
|
4625
|
-
function
|
|
4713
|
+
function is({ text: t, className: r, as: n }) {
|
|
4626
4714
|
const s = t ?? "";
|
|
4627
|
-
return (n ? n === "html" :
|
|
4715
|
+
return (n ? n === "html" : sn.test(s)) ? /* @__PURE__ */ e(
|
|
4628
4716
|
"div",
|
|
4629
4717
|
{
|
|
4630
|
-
className:
|
|
4631
|
-
dangerouslySetInnerHTML: { __html:
|
|
4718
|
+
className: c("break-words", an, r),
|
|
4719
|
+
dangerouslySetInnerHTML: { __html: At.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
|
|
4632
4720
|
}
|
|
4633
|
-
) : /* @__PURE__ */ e("div", { className:
|
|
4721
|
+
) : /* @__PURE__ */ e("div", { className: c("break-words", r), children: /* @__PURE__ */ e(Lt, { remarkPlugins: [It], components: ln, children: s }) });
|
|
4634
4722
|
}
|
|
4635
|
-
const
|
|
4723
|
+
const ds = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
|
|
4636
4724
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-2xs font-semibold uppercase tracking-label text-text-subtle", children: t }),
|
|
4637
4725
|
r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
|
|
4638
4726
|
n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
|
|
4639
4727
|
] });
|
|
4640
|
-
function
|
|
4728
|
+
function us({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4641
4729
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4642
|
-
return !t && !r ? /* @__PURE__ */ e("div", { className:
|
|
4730
|
+
return !t && !r ? /* @__PURE__ */ e("div", { className: c("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: c("flex items-center gap-3 py-2", s), children: [
|
|
4643
4731
|
n === "center" && a,
|
|
4644
4732
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-xs font-medium text-text-muted", children: t }),
|
|
4645
4733
|
a,
|
|
4646
4734
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4647
4735
|
] });
|
|
4648
4736
|
}
|
|
4649
|
-
const
|
|
4650
|
-
function
|
|
4651
|
-
return
|
|
4737
|
+
const st = Ke(null), ms = st.Provider;
|
|
4738
|
+
function on() {
|
|
4739
|
+
return ut(st);
|
|
4652
4740
|
}
|
|
4653
|
-
function
|
|
4741
|
+
function fs() {
|
|
4654
4742
|
const [t, r] = O(null), n = pe(
|
|
4655
4743
|
() => ({
|
|
4656
4744
|
setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
|
|
@@ -4659,13 +4747,13 @@ function rs() {
|
|
|
4659
4747
|
);
|
|
4660
4748
|
return { trail: t?.entry ?? null, api: n };
|
|
4661
4749
|
}
|
|
4662
|
-
const
|
|
4750
|
+
const cn = {
|
|
4663
4751
|
none: "",
|
|
4664
4752
|
sm: "px-3 py-3",
|
|
4665
4753
|
// Matches the frame header's own horizontal padding, so content lines up
|
|
4666
4754
|
// with the title above it.
|
|
4667
4755
|
md: "px-5 py-4"
|
|
4668
|
-
},
|
|
4756
|
+
}, hs = ({
|
|
4669
4757
|
children: t,
|
|
4670
4758
|
actions: r = [],
|
|
4671
4759
|
secondaryActions: n = [],
|
|
@@ -4678,7 +4766,7 @@ const Qr = {
|
|
|
4678
4766
|
className: v,
|
|
4679
4767
|
contentClassName: h
|
|
4680
4768
|
}) => {
|
|
4681
|
-
const m =
|
|
4769
|
+
const m = on(), b = dt(), p = ne(s);
|
|
4682
4770
|
p.current = s;
|
|
4683
4771
|
const w = !!s;
|
|
4684
4772
|
G(() => {
|
|
@@ -4696,8 +4784,8 @@ const Qr = {
|
|
|
4696
4784
|
* panel that has not been migrated yet. This way a short page still drops
|
|
4697
4785
|
* its footer to the bottom, and a long one keeps it pinned while scrolling.
|
|
4698
4786
|
*/
|
|
4699
|
-
/* @__PURE__ */
|
|
4700
|
-
!m && (w || l) && /* @__PURE__ */
|
|
4787
|
+
/* @__PURE__ */ i("div", { className: c("flex min-h-full flex-col", v), children: [
|
|
4788
|
+
!m && (w || l) && /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
|
|
4701
4789
|
w && /* @__PURE__ */ e(
|
|
4702
4790
|
le,
|
|
4703
4791
|
{
|
|
@@ -4710,15 +4798,15 @@ const Qr = {
|
|
|
4710
4798
|
),
|
|
4711
4799
|
l && /* @__PURE__ */ e("h2", { className: "min-w-0 truncate text-md font-semibold tracking-title text-text", children: l })
|
|
4712
4800
|
] }),
|
|
4713
|
-
/* @__PURE__ */ e("div", { className:
|
|
4714
|
-
g && /* @__PURE__ */
|
|
4715
|
-
n.length > 0 && /* @__PURE__ */ e(
|
|
4716
|
-
r.length > 0 && /* @__PURE__ */ e(
|
|
4801
|
+
/* @__PURE__ */ e("div", { className: c("flex-1", cn[d], h), children: o ? /* @__PURE__ */ e(nt, { variant: "inline", shape: f }) : t }),
|
|
4802
|
+
g && /* @__PURE__ */ i("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: [
|
|
4803
|
+
n.length > 0 && /* @__PURE__ */ e(Me, { actions: n, defaultVariant: "ghost" }),
|
|
4804
|
+
r.length > 0 && /* @__PURE__ */ e(Me, { actions: r, className: "ml-auto" })
|
|
4717
4805
|
] })
|
|
4718
4806
|
] })
|
|
4719
4807
|
);
|
|
4720
4808
|
};
|
|
4721
|
-
function
|
|
4809
|
+
function xs({
|
|
4722
4810
|
label: t,
|
|
4723
4811
|
description: r,
|
|
4724
4812
|
control: n,
|
|
@@ -4726,17 +4814,17 @@ function ss({
|
|
|
4726
4814
|
disabled: a = !1,
|
|
4727
4815
|
className: l
|
|
4728
4816
|
}) {
|
|
4729
|
-
return /* @__PURE__ */
|
|
4817
|
+
return /* @__PURE__ */ i(
|
|
4730
4818
|
"div",
|
|
4731
4819
|
{
|
|
4732
|
-
className:
|
|
4820
|
+
className: c(
|
|
4733
4821
|
"flex items-center justify-between gap-4 py-2",
|
|
4734
4822
|
s && "rounded-lg border border-border px-3",
|
|
4735
4823
|
a && "opacity-50",
|
|
4736
4824
|
l
|
|
4737
4825
|
),
|
|
4738
4826
|
children: [
|
|
4739
|
-
/* @__PURE__ */
|
|
4827
|
+
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
4740
4828
|
/* @__PURE__ */ e("div", { className: "text-sm text-text", children: t }),
|
|
4741
4829
|
r && /* @__PURE__ */ e("div", { className: "text-xs text-text-muted", children: r })
|
|
4742
4830
|
] }),
|
|
@@ -4745,7 +4833,7 @@ function ss({
|
|
|
4745
4833
|
}
|
|
4746
4834
|
);
|
|
4747
4835
|
}
|
|
4748
|
-
function
|
|
4836
|
+
function bs({
|
|
4749
4837
|
icon: t,
|
|
4750
4838
|
title: r,
|
|
4751
4839
|
description: n,
|
|
@@ -4753,37 +4841,37 @@ function as({
|
|
|
4753
4841
|
children: a,
|
|
4754
4842
|
className: l
|
|
4755
4843
|
}) {
|
|
4756
|
-
return /* @__PURE__ */
|
|
4757
|
-
/* @__PURE__ */
|
|
4844
|
+
return /* @__PURE__ */ i("section", { className: c("flex flex-col gap-2", l), children: [
|
|
4845
|
+
/* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
|
|
4758
4846
|
t && /* @__PURE__ */ e(Z, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
|
|
4759
|
-
/* @__PURE__ */
|
|
4847
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
4760
4848
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-text", children: r }),
|
|
4761
4849
|
n && /* @__PURE__ */ e("p", { className: "text-xs text-text-muted", children: n })
|
|
4762
4850
|
] }),
|
|
4763
4851
|
s && /* @__PURE__ */ e("div", { className: "shrink-0", children: s })
|
|
4764
4852
|
] }),
|
|
4765
|
-
/* @__PURE__ */ e("div", { className:
|
|
4853
|
+
/* @__PURE__ */ e("div", { className: c("flex flex-col", t && "pl-6"), children: a })
|
|
4766
4854
|
] });
|
|
4767
4855
|
}
|
|
4768
|
-
function
|
|
4769
|
-
return /* @__PURE__ */
|
|
4856
|
+
function gs({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4857
|
+
return /* @__PURE__ */ i(
|
|
4770
4858
|
"button",
|
|
4771
4859
|
{
|
|
4772
4860
|
type: "button",
|
|
4773
4861
|
onClick: n,
|
|
4774
|
-
className:
|
|
4862
|
+
className: c(
|
|
4775
4863
|
"inline-flex max-w-full items-center gap-1.5 rounded-full bg-surface-sunk px-2.5 py-1 text-xs text-text-muted transition-colors duration-fast ease-out hover:bg-surface-hover hover:text-text",
|
|
4776
4864
|
s
|
|
4777
4865
|
),
|
|
4778
4866
|
children: [
|
|
4779
4867
|
r && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full", style: { backgroundColor: r }, "aria-hidden": !0 }),
|
|
4780
4868
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
|
|
4781
|
-
/* @__PURE__ */ e(Z, { icon:
|
|
4869
|
+
/* @__PURE__ */ e(Z, { icon: Dt, size: "xs", className: "opacity-70" })
|
|
4782
4870
|
]
|
|
4783
4871
|
}
|
|
4784
4872
|
);
|
|
4785
4873
|
}
|
|
4786
|
-
function
|
|
4874
|
+
function dn(t) {
|
|
4787
4875
|
const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: f, sortable: d, align: v } = t;
|
|
4788
4876
|
return {
|
|
4789
4877
|
id: r,
|
|
@@ -4791,14 +4879,14 @@ function en(t) {
|
|
|
4791
4879
|
accessor: (h) => a(s(h), h),
|
|
4792
4880
|
cell: (h, m) => {
|
|
4793
4881
|
const b = s(m);
|
|
4794
|
-
return o && !o(b, m) ? null : /* @__PURE__ */ e(
|
|
4882
|
+
return o && !o(b, m) ? null : /* @__PURE__ */ e(Rr, { variant: l ? l(b, m) : "default", size: "sm", children: a(b, m) });
|
|
4795
4883
|
},
|
|
4796
4884
|
width: f,
|
|
4797
4885
|
sortable: d,
|
|
4798
4886
|
align: v
|
|
4799
4887
|
};
|
|
4800
4888
|
}
|
|
4801
|
-
function
|
|
4889
|
+
function ps(t) {
|
|
4802
4890
|
const {
|
|
4803
4891
|
id: r,
|
|
4804
4892
|
header: n,
|
|
@@ -4810,7 +4898,7 @@ function os(t) {
|
|
|
4810
4898
|
width: d,
|
|
4811
4899
|
sortable: v
|
|
4812
4900
|
} = t;
|
|
4813
|
-
return
|
|
4901
|
+
return dn({
|
|
4814
4902
|
id: r,
|
|
4815
4903
|
header: n,
|
|
4816
4904
|
accessor: (h) => !!s(h),
|
|
@@ -4820,7 +4908,7 @@ function os(t) {
|
|
|
4820
4908
|
sortable: v
|
|
4821
4909
|
});
|
|
4822
4910
|
}
|
|
4823
|
-
function
|
|
4911
|
+
function vs(t) {
|
|
4824
4912
|
const {
|
|
4825
4913
|
id: r,
|
|
4826
4914
|
header: n,
|
|
@@ -4844,13 +4932,13 @@ function cs(t) {
|
|
|
4844
4932
|
sortable: v
|
|
4845
4933
|
};
|
|
4846
4934
|
}
|
|
4847
|
-
function
|
|
4935
|
+
function un(t, r) {
|
|
4848
4936
|
return r.split(".").reduce(
|
|
4849
4937
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
4850
4938
|
t
|
|
4851
4939
|
);
|
|
4852
4940
|
}
|
|
4853
|
-
const
|
|
4941
|
+
const ys = ({
|
|
4854
4942
|
groups: t,
|
|
4855
4943
|
data: r,
|
|
4856
4944
|
size: n = "md",
|
|
@@ -4873,7 +4961,7 @@ const is = ({
|
|
|
4873
4961
|
return b ? b.label : String(h || "-");
|
|
4874
4962
|
}, f = xe(
|
|
4875
4963
|
(h) => {
|
|
4876
|
-
const m =
|
|
4964
|
+
const m = un(r, h.name);
|
|
4877
4965
|
if (h.type === "array") {
|
|
4878
4966
|
const p = m;
|
|
4879
4967
|
return !p || p.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -4884,12 +4972,12 @@ const is = ({
|
|
|
4884
4972
|
className: "text-text-muted",
|
|
4885
4973
|
children: "Geen items"
|
|
4886
4974
|
}
|
|
4887
|
-
) : /* @__PURE__ */ e("div", { className: "space-y-3", children: p.map((w, g) => /* @__PURE__ */
|
|
4975
|
+
) : /* @__PURE__ */ e("div", { className: "space-y-3", children: p.map((w, g) => /* @__PURE__ */ i(
|
|
4888
4976
|
"div",
|
|
4889
4977
|
{
|
|
4890
4978
|
className: "p-4 border border-border rounded-xl space-y-3",
|
|
4891
4979
|
children: [
|
|
4892
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */
|
|
4980
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i(
|
|
4893
4981
|
fe,
|
|
4894
4982
|
{
|
|
4895
4983
|
variant: "label",
|
|
@@ -4904,7 +4992,7 @@ const is = ({
|
|
|
4904
4992
|
}
|
|
4905
4993
|
) }),
|
|
4906
4994
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((x) => {
|
|
4907
|
-
const
|
|
4995
|
+
const T = w?.[x.name];
|
|
4908
4996
|
let C = "-";
|
|
4909
4997
|
switch (x.type) {
|
|
4910
4998
|
case "text":
|
|
@@ -4913,30 +5001,30 @@ const is = ({
|
|
|
4913
5001
|
case "tel":
|
|
4914
5002
|
case "url":
|
|
4915
5003
|
case "textarea":
|
|
4916
|
-
C =
|
|
5004
|
+
C = T || "-";
|
|
4917
5005
|
break;
|
|
4918
5006
|
case "select":
|
|
4919
5007
|
case "radio":
|
|
4920
5008
|
C = o(
|
|
4921
|
-
|
|
5009
|
+
T,
|
|
4922
5010
|
x.options
|
|
4923
5011
|
);
|
|
4924
5012
|
break;
|
|
4925
5013
|
case "checkbox":
|
|
4926
|
-
C = l(
|
|
5014
|
+
C = l(T);
|
|
4927
5015
|
break;
|
|
4928
5016
|
case "date":
|
|
4929
|
-
C = a(
|
|
5017
|
+
C = a(T);
|
|
4930
5018
|
break;
|
|
4931
5019
|
case "custom":
|
|
4932
5020
|
C = x.customComponent?.({
|
|
4933
|
-
value:
|
|
5021
|
+
value: T
|
|
4934
5022
|
});
|
|
4935
5023
|
break;
|
|
4936
5024
|
default:
|
|
4937
|
-
C = String(
|
|
5025
|
+
C = String(T || "-");
|
|
4938
5026
|
}
|
|
4939
|
-
return x.format && (C = x.format(
|
|
5027
|
+
return x.format && (C = x.format(T, w)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
|
|
4940
5028
|
/* @__PURE__ */ e(
|
|
4941
5029
|
fe,
|
|
4942
5030
|
{
|
|
@@ -5019,7 +5107,7 @@ const is = ({
|
|
|
5019
5107
|
return null;
|
|
5020
5108
|
const m = h.items.filter((p) => !(p.hidden || p.conditional && !p.conditional(r)));
|
|
5021
5109
|
if (m.length === 0) return null;
|
|
5022
|
-
const b =
|
|
5110
|
+
const b = c(
|
|
5023
5111
|
"space-y-4",
|
|
5024
5112
|
{
|
|
5025
5113
|
"grid gap-4": h.layout === "grid",
|
|
@@ -5033,12 +5121,12 @@ const is = ({
|
|
|
5033
5121
|
},
|
|
5034
5122
|
h.className
|
|
5035
5123
|
);
|
|
5036
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ i(
|
|
5037
5125
|
"div",
|
|
5038
5126
|
{
|
|
5039
5127
|
className: "grid grid-cols-1 md:grid-cols-3 gap-8 p-6 border border-border rounded-xl",
|
|
5040
5128
|
children: [
|
|
5041
|
-
/* @__PURE__ */
|
|
5129
|
+
/* @__PURE__ */ i("div", { className: "md:col-span-1", children: [
|
|
5042
5130
|
/* @__PURE__ */ e(
|
|
5043
5131
|
fe,
|
|
5044
5132
|
{
|
|
@@ -5059,7 +5147,7 @@ const is = ({
|
|
|
5059
5147
|
}
|
|
5060
5148
|
)
|
|
5061
5149
|
] }),
|
|
5062
|
-
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: m.map((p) => /* @__PURE__ */
|
|
5150
|
+
/* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: m.map((p) => /* @__PURE__ */ i(
|
|
5063
5151
|
"div",
|
|
5064
5152
|
{
|
|
5065
5153
|
className: "space-y-1",
|
|
@@ -5088,7 +5176,7 @@ const is = ({
|
|
|
5088
5176
|
);
|
|
5089
5177
|
},
|
|
5090
5178
|
[r, f]
|
|
5091
|
-
), v =
|
|
5179
|
+
), v = c(
|
|
5092
5180
|
"space-y-6",
|
|
5093
5181
|
{
|
|
5094
5182
|
"max-w-md": n === "sm",
|
|
@@ -5099,14 +5187,14 @@ const is = ({
|
|
|
5099
5187
|
s
|
|
5100
5188
|
);
|
|
5101
5189
|
return /* @__PURE__ */ e("div", { className: v, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
|
|
5102
|
-
},
|
|
5190
|
+
}, mn = () => /* @__PURE__ */ e(nt, { variant: "inline", shape: "menu" }), at = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
5103
5191
|
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
5104
5192
|
if (a)
|
|
5105
|
-
return /* @__PURE__ */
|
|
5106
|
-
/* @__PURE__ */
|
|
5193
|
+
return /* @__PURE__ */ i("li", { children: [
|
|
5194
|
+
/* @__PURE__ */ i(
|
|
5107
5195
|
"div",
|
|
5108
5196
|
{
|
|
5109
|
-
className:
|
|
5197
|
+
className: c(
|
|
5110
5198
|
"flex items-center gap-2 px-2.5 pt-5 pb-2 text-2xs font-semibold uppercase tracking-label text-text-disabled"
|
|
5111
5199
|
),
|
|
5112
5200
|
children: [
|
|
@@ -5116,7 +5204,7 @@ const is = ({
|
|
|
5116
5204
|
}
|
|
5117
5205
|
),
|
|
5118
5206
|
/* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((d, v) => /* @__PURE__ */ e(
|
|
5119
|
-
|
|
5207
|
+
at,
|
|
5120
5208
|
{
|
|
5121
5209
|
item: d,
|
|
5122
5210
|
isSelectedHandler: r,
|
|
@@ -5127,7 +5215,7 @@ const is = ({
|
|
|
5127
5215
|
)) })
|
|
5128
5216
|
] });
|
|
5129
5217
|
const o = t.action, f = o?.visibility !== "always";
|
|
5130
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
5218
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
5131
5219
|
"div",
|
|
5132
5220
|
{
|
|
5133
5221
|
role: "button",
|
|
@@ -5136,7 +5224,7 @@ const is = ({
|
|
|
5136
5224
|
onKeyDown: (d) => {
|
|
5137
5225
|
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), t.path && n?.(t.path));
|
|
5138
5226
|
},
|
|
5139
|
-
className:
|
|
5227
|
+
className: c(
|
|
5140
5228
|
// De kolom ligt op de backdrop, niet op een paneel: het actieve item
|
|
5141
5229
|
// is daarom een opliggende witte plaat, en de hover is de backdrop-
|
|
5142
5230
|
// hover (donkerder) in plaats van de surface-hover (lichter).
|
|
@@ -5149,7 +5237,7 @@ const is = ({
|
|
|
5149
5237
|
t.icon && /* @__PURE__ */ e(
|
|
5150
5238
|
"span",
|
|
5151
5239
|
{
|
|
5152
|
-
className:
|
|
5240
|
+
className: c(
|
|
5153
5241
|
"flex w-5 shrink-0 items-center justify-center",
|
|
5154
5242
|
l ? "text-text-muted" : "text-text-subtle"
|
|
5155
5243
|
),
|
|
@@ -5160,7 +5248,7 @@ const is = ({
|
|
|
5160
5248
|
t.count !== void 0 && t.count > 0 && /* @__PURE__ */ e(
|
|
5161
5249
|
"span",
|
|
5162
5250
|
{
|
|
5163
|
-
className:
|
|
5251
|
+
className: c(
|
|
5164
5252
|
"shrink-0 text-xs tabular-nums",
|
|
5165
5253
|
l ? "rounded-full bg-accent px-1.5 font-semibold text-accent-fg" : "text-text-subtle",
|
|
5166
5254
|
o && f && "group-hover/item:hidden group-focus-within/item:hidden"
|
|
@@ -5178,7 +5266,7 @@ const is = ({
|
|
|
5178
5266
|
d.stopPropagation(), o.onClick();
|
|
5179
5267
|
},
|
|
5180
5268
|
onKeyDown: (d) => d.stopPropagation(),
|
|
5181
|
-
className:
|
|
5269
|
+
className: c(
|
|
5182
5270
|
"flex size-5 shrink-0 items-center justify-center rounded-sm",
|
|
5183
5271
|
"text-text-subtle transition-colors duration-fast ease-out",
|
|
5184
5272
|
"hover:bg-page-hover hover:text-text",
|
|
@@ -5191,20 +5279,20 @@ const is = ({
|
|
|
5191
5279
|
]
|
|
5192
5280
|
}
|
|
5193
5281
|
) });
|
|
5194
|
-
},
|
|
5282
|
+
}, Ns = ({
|
|
5195
5283
|
items: t,
|
|
5196
5284
|
isSelectedHandler: r,
|
|
5197
5285
|
onClick: n,
|
|
5198
5286
|
preMenuItemsComponent: s,
|
|
5199
5287
|
loading: a = !1
|
|
5200
|
-
}) => a ? /* @__PURE__ */
|
|
5288
|
+
}) => a ? /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5201
5289
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5202
|
-
/* @__PURE__ */ e(
|
|
5203
|
-
] }) : /* @__PURE__ */
|
|
5290
|
+
/* @__PURE__ */ e(mn, {})
|
|
5291
|
+
] }) : /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5204
5292
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5205
5293
|
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
5206
5294
|
(l, o) => !l.path && !l.label && !l.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, o) : /* @__PURE__ */ e(
|
|
5207
|
-
|
|
5295
|
+
at,
|
|
5208
5296
|
{
|
|
5209
5297
|
item: l,
|
|
5210
5298
|
isSelectedHandler: r,
|
|
@@ -5213,7 +5301,7 @@ const is = ({
|
|
|
5213
5301
|
o
|
|
5214
5302
|
)
|
|
5215
5303
|
) })
|
|
5216
|
-
] }),
|
|
5304
|
+
] }), fn = {
|
|
5217
5305
|
xs: "text-xs",
|
|
5218
5306
|
sm: "text-sm",
|
|
5219
5307
|
md: "text-base",
|
|
@@ -5222,13 +5310,13 @@ const is = ({
|
|
|
5222
5310
|
"2xl": "text-2xl",
|
|
5223
5311
|
"3xl": "text-3xl",
|
|
5224
5312
|
"4xl": "text-3xl"
|
|
5225
|
-
},
|
|
5313
|
+
}, hn = {
|
|
5226
5314
|
light: "font-normal",
|
|
5227
5315
|
normal: "font-normal",
|
|
5228
5316
|
medium: "font-medium",
|
|
5229
5317
|
semibold: "font-semibold",
|
|
5230
5318
|
bold: "font-bold"
|
|
5231
|
-
},
|
|
5319
|
+
}, xn = {
|
|
5232
5320
|
primary: "text-text",
|
|
5233
5321
|
secondary: "text-text-muted",
|
|
5234
5322
|
accent: "text-accent",
|
|
@@ -5238,11 +5326,11 @@ const is = ({
|
|
|
5238
5326
|
info: "text-info-fg",
|
|
5239
5327
|
neutral: "text-text",
|
|
5240
5328
|
current: "text-current"
|
|
5241
|
-
},
|
|
5329
|
+
}, bn = {
|
|
5242
5330
|
left: "text-left",
|
|
5243
5331
|
center: "text-center",
|
|
5244
5332
|
right: "text-right"
|
|
5245
|
-
},
|
|
5333
|
+
}, ws = ({
|
|
5246
5334
|
level: t = 1,
|
|
5247
5335
|
size: r,
|
|
5248
5336
|
weight: n = "semibold",
|
|
@@ -5253,18 +5341,18 @@ const is = ({
|
|
|
5253
5341
|
children: f,
|
|
5254
5342
|
...d
|
|
5255
5343
|
}) => {
|
|
5256
|
-
const v = `h${t}`, h =
|
|
5344
|
+
const v = `h${t}`, h = c(
|
|
5257
5345
|
"font-sans text-pretty",
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5346
|
+
fn[r || gn(t)],
|
|
5347
|
+
hn[n],
|
|
5348
|
+
xn[s],
|
|
5349
|
+
bn[a],
|
|
5262
5350
|
l && "truncate",
|
|
5263
5351
|
o
|
|
5264
5352
|
);
|
|
5265
5353
|
return /* @__PURE__ */ e(v, { className: h, ...d, children: f });
|
|
5266
5354
|
};
|
|
5267
|
-
function
|
|
5355
|
+
function gn(t) {
|
|
5268
5356
|
return {
|
|
5269
5357
|
1: "2xl",
|
|
5270
5358
|
2: "xl",
|
|
@@ -5274,7 +5362,7 @@ function on(t) {
|
|
|
5274
5362
|
6: "md"
|
|
5275
5363
|
}[t] || "md";
|
|
5276
5364
|
}
|
|
5277
|
-
const
|
|
5365
|
+
const ks = ({
|
|
5278
5366
|
commands: t,
|
|
5279
5367
|
isOpen: r,
|
|
5280
5368
|
onClose: n,
|
|
@@ -5288,19 +5376,19 @@ const ms = ({
|
|
|
5288
5376
|
return G(() => {
|
|
5289
5377
|
r || (f(""), v(a || []), m(l || 0));
|
|
5290
5378
|
}, [r]), G(() => {
|
|
5291
|
-
const x = (
|
|
5379
|
+
const x = (T) => {
|
|
5292
5380
|
if (r) {
|
|
5293
|
-
if (
|
|
5381
|
+
if (T.key === "Escape")
|
|
5294
5382
|
n();
|
|
5295
|
-
else if (
|
|
5383
|
+
else if (T.key === "ArrowUp")
|
|
5296
5384
|
m(
|
|
5297
5385
|
(C) => C > 0 ? C - 1 : g.length - 1
|
|
5298
5386
|
);
|
|
5299
|
-
else if (
|
|
5387
|
+
else if (T.key === "ArrowDown")
|
|
5300
5388
|
m(
|
|
5301
5389
|
(C) => C < g.length - 1 ? C + 1 : 0
|
|
5302
5390
|
);
|
|
5303
|
-
else if (
|
|
5391
|
+
else if (T.key === "Enter") {
|
|
5304
5392
|
const C = g[h];
|
|
5305
5393
|
C && (C.subCommands ? (v([...d, C.id]), m(0)) : C.action && (C.action(), n()));
|
|
5306
5394
|
}
|
|
@@ -5308,21 +5396,21 @@ const ms = ({
|
|
|
5308
5396
|
};
|
|
5309
5397
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
5310
5398
|
}, [r, n, g, h, d]), G(() => {
|
|
5311
|
-
const x = (
|
|
5312
|
-
b.current && !b.current.contains(
|
|
5399
|
+
const x = (T) => {
|
|
5400
|
+
b.current && !b.current.contains(T.target) && n();
|
|
5313
5401
|
};
|
|
5314
5402
|
return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
5315
5403
|
}, [r, n]), G(() => {
|
|
5316
5404
|
if (!r) return;
|
|
5317
5405
|
p.current?.querySelector(`[data-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
|
|
5318
|
-
}, [h, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */
|
|
5406
|
+
}, [h, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
|
|
5319
5407
|
"div",
|
|
5320
5408
|
{
|
|
5321
5409
|
className: "flex flex-col w-full max-w-lg max-h-dialog p-2 mx-auto rounded-lg border border-border shadow-modal bg-surface",
|
|
5322
5410
|
ref: b,
|
|
5323
5411
|
children: [
|
|
5324
|
-
/* @__PURE__ */
|
|
5325
|
-
/* @__PURE__ */ e(
|
|
5412
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
|
|
5413
|
+
/* @__PURE__ */ e(_e, { className: "w-4 h-4 text-text-muted shrink-0" }),
|
|
5326
5414
|
/* @__PURE__ */ e(
|
|
5327
5415
|
"input",
|
|
5328
5416
|
{
|
|
@@ -5335,22 +5423,22 @@ const ms = ({
|
|
|
5335
5423
|
}
|
|
5336
5424
|
)
|
|
5337
5425
|
] }),
|
|
5338
|
-
/* @__PURE__ */
|
|
5426
|
+
/* @__PURE__ */ i(
|
|
5339
5427
|
"div",
|
|
5340
5428
|
{
|
|
5341
5429
|
ref: p,
|
|
5342
5430
|
className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
|
|
5343
5431
|
children: [
|
|
5344
5432
|
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
|
|
5345
|
-
g.map((x,
|
|
5433
|
+
g.map((x, T) => /* @__PURE__ */ i(
|
|
5346
5434
|
"div",
|
|
5347
5435
|
{
|
|
5348
|
-
"data-index":
|
|
5349
|
-
className: `flex items-center p-2 cursor-pointer rounded-md ${
|
|
5436
|
+
"data-index": T,
|
|
5437
|
+
className: `flex items-center p-2 cursor-pointer rounded-md ${T === h ? "bg-accent-soft text-accent" : "text-text"}`,
|
|
5350
5438
|
onClick: () => {
|
|
5351
5439
|
x.subCommands ? (v([...d, x.id]), m(0)) : x.action && (x.action(), n());
|
|
5352
5440
|
},
|
|
5353
|
-
onMouseEnter: () => m(
|
|
5441
|
+
onMouseEnter: () => m(T),
|
|
5354
5442
|
children: [
|
|
5355
5443
|
x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
|
|
5356
5444
|
/* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
|
|
@@ -5362,16 +5450,16 @@ const ms = ({
|
|
|
5362
5450
|
]
|
|
5363
5451
|
}
|
|
5364
5452
|
),
|
|
5365
|
-
/* @__PURE__ */
|
|
5366
|
-
/* @__PURE__ */
|
|
5453
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-4 px-3 pt-2 mt-2 text-xs text-text-muted border-t border-border", children: [
|
|
5454
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
|
|
5367
5455
|
/* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "↑↓" }),
|
|
5368
5456
|
s?.navigate || "to navigate"
|
|
5369
5457
|
] }),
|
|
5370
|
-
/* @__PURE__ */
|
|
5458
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
|
|
5371
5459
|
/* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "↵" }),
|
|
5372
5460
|
s?.select || "to select"
|
|
5373
5461
|
] }),
|
|
5374
|
-
/* @__PURE__ */
|
|
5462
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
|
|
5375
5463
|
/* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "Esc" }),
|
|
5376
5464
|
s?.close || "to close"
|
|
5377
5465
|
] })
|
|
@@ -5379,7 +5467,7 @@ const ms = ({
|
|
|
5379
5467
|
]
|
|
5380
5468
|
}
|
|
5381
5469
|
) }) : null;
|
|
5382
|
-
},
|
|
5470
|
+
}, pn = {
|
|
5383
5471
|
none: "p-0",
|
|
5384
5472
|
xs: "p-1",
|
|
5385
5473
|
sm: "p-2",
|
|
@@ -5387,7 +5475,7 @@ const ms = ({
|
|
|
5387
5475
|
lg: "p-6",
|
|
5388
5476
|
xl: "p-8",
|
|
5389
5477
|
"2xl": "p-12"
|
|
5390
|
-
},
|
|
5478
|
+
}, vn = {
|
|
5391
5479
|
none: "m-0",
|
|
5392
5480
|
xs: "m-1",
|
|
5393
5481
|
sm: "m-2",
|
|
@@ -5395,7 +5483,7 @@ const ms = ({
|
|
|
5395
5483
|
lg: "m-6",
|
|
5396
5484
|
xl: "m-8",
|
|
5397
5485
|
"2xl": "m-12"
|
|
5398
|
-
},
|
|
5486
|
+
}, yn = {
|
|
5399
5487
|
none: "",
|
|
5400
5488
|
primary: "bg-accent text-accent-fg",
|
|
5401
5489
|
secondary: "bg-surface-hover",
|
|
@@ -5411,26 +5499,26 @@ const ms = ({
|
|
|
5411
5499
|
backdrop: "bg-page",
|
|
5412
5500
|
editor: "bg-surface",
|
|
5413
5501
|
input: "bg-surface-input"
|
|
5414
|
-
},
|
|
5502
|
+
}, Nn = {
|
|
5415
5503
|
none: "rounded-none",
|
|
5416
5504
|
sm: "rounded-sm",
|
|
5417
5505
|
md: "rounded-md",
|
|
5418
5506
|
lg: "rounded-lg",
|
|
5419
5507
|
xl: "rounded-xl",
|
|
5420
5508
|
full: "rounded-full"
|
|
5421
|
-
},
|
|
5509
|
+
}, wn = {
|
|
5422
5510
|
none: "shadow-none",
|
|
5423
5511
|
sm: "shadow-none",
|
|
5424
5512
|
md: "shadow-overlay",
|
|
5425
5513
|
lg: "shadow-overlay",
|
|
5426
5514
|
xl: "shadow-modal",
|
|
5427
5515
|
"2xl": "shadow-modal"
|
|
5428
|
-
},
|
|
5516
|
+
}, kn = {
|
|
5429
5517
|
none: "border-0",
|
|
5430
5518
|
sm: "border",
|
|
5431
5519
|
md: "border-2",
|
|
5432
5520
|
lg: "border-4"
|
|
5433
|
-
},
|
|
5521
|
+
}, Cn = {
|
|
5434
5522
|
primary: "border-accent-border",
|
|
5435
5523
|
secondary: "border-border",
|
|
5436
5524
|
accent: "border-accent-border",
|
|
@@ -5440,7 +5528,7 @@ const ms = ({
|
|
|
5440
5528
|
info: "border-info-border",
|
|
5441
5529
|
neutral: "border-border-subtle",
|
|
5442
5530
|
white: "border-border-subtle"
|
|
5443
|
-
},
|
|
5531
|
+
}, lt = be(
|
|
5444
5532
|
({
|
|
5445
5533
|
padding: t,
|
|
5446
5534
|
margin: r,
|
|
@@ -5456,14 +5544,14 @@ const ms = ({
|
|
|
5456
5544
|
"div",
|
|
5457
5545
|
{
|
|
5458
5546
|
ref: h,
|
|
5459
|
-
className:
|
|
5460
|
-
t &&
|
|
5461
|
-
r &&
|
|
5462
|
-
n &&
|
|
5463
|
-
s &&
|
|
5464
|
-
a &&
|
|
5465
|
-
l &&
|
|
5466
|
-
o &&
|
|
5547
|
+
className: c(
|
|
5548
|
+
t && pn[t],
|
|
5549
|
+
r && vn[r],
|
|
5550
|
+
n && yn[n],
|
|
5551
|
+
s && Nn[s],
|
|
5552
|
+
a && wn[a],
|
|
5553
|
+
l && kn[l],
|
|
5554
|
+
o && Cn[o],
|
|
5467
5555
|
f
|
|
5468
5556
|
),
|
|
5469
5557
|
...v,
|
|
@@ -5471,9 +5559,9 @@ const ms = ({
|
|
|
5471
5559
|
}
|
|
5472
5560
|
)
|
|
5473
5561
|
);
|
|
5474
|
-
|
|
5475
|
-
const
|
|
5476
|
-
|
|
5562
|
+
lt.displayName = "Box";
|
|
5563
|
+
const Cs = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
|
|
5564
|
+
lt,
|
|
5477
5565
|
{
|
|
5478
5566
|
background: "module",
|
|
5479
5567
|
radius: "lg",
|
|
@@ -5487,7 +5575,7 @@ const fs = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5487
5575
|
]
|
|
5488
5576
|
}
|
|
5489
5577
|
);
|
|
5490
|
-
function
|
|
5578
|
+
function Ss({
|
|
5491
5579
|
identifier: t,
|
|
5492
5580
|
resourceLoader: r,
|
|
5493
5581
|
framework: n = "react",
|
|
@@ -5521,25 +5609,25 @@ function hs({
|
|
|
5521
5609
|
const x = f.current;
|
|
5522
5610
|
if (x) {
|
|
5523
5611
|
if (n === "svelte") {
|
|
5524
|
-
const
|
|
5612
|
+
const T = b.default || b, C = new T({ target: x, props: l || {} });
|
|
5525
5613
|
return w.current = C, () => C.$destroy();
|
|
5526
5614
|
}
|
|
5527
5615
|
if (b.mount) {
|
|
5528
|
-
const
|
|
5616
|
+
const T = b.mount({ container: x, props: l || {} });
|
|
5529
5617
|
return () => {
|
|
5530
|
-
typeof
|
|
5618
|
+
typeof T == "function" ? T() : b.unmount?.(x);
|
|
5531
5619
|
};
|
|
5532
5620
|
}
|
|
5533
5621
|
}
|
|
5534
5622
|
}, [b, n, d]), G(() => {
|
|
5535
5623
|
n === "svelte" && w.current && w.current.$set?.(l);
|
|
5536
|
-
}, [l, n]), /* @__PURE__ */
|
|
5624
|
+
}, [l, n]), /* @__PURE__ */ i("div", { ref: f, className: o, style: { display: "contents" }, children: [
|
|
5537
5625
|
d && s,
|
|
5538
5626
|
!d && h && a,
|
|
5539
5627
|
n === "react" && !h && b && /* @__PURE__ */ e(b, { ...l })
|
|
5540
5628
|
] });
|
|
5541
5629
|
}
|
|
5542
|
-
class
|
|
5630
|
+
class Es extends mt {
|
|
5543
5631
|
constructor() {
|
|
5544
5632
|
super(...arguments), this.state = {
|
|
5545
5633
|
hasError: !1,
|
|
@@ -5553,7 +5641,7 @@ class xs extends Mt {
|
|
|
5553
5641
|
console.error(`[ErrorBoundary] Error in ${this.props.name || "Component"}:`, r, n);
|
|
5554
5642
|
}
|
|
5555
5643
|
render() {
|
|
5556
|
-
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */
|
|
5644
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ i("div", { className: "p-4 m-4 border border-danger-border bg-danger-soft rounded-lg", children: [
|
|
5557
5645
|
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-danger-fg", children: "Something went wrong" }),
|
|
5558
5646
|
/* @__PURE__ */ e("p", { className: "text-sm text-danger-fg mt-1", children: this.props.name ? `Error in ${this.props.name}` : "The component failed to render." }),
|
|
5559
5647
|
/* @__PURE__ */ e(
|
|
@@ -5568,82 +5656,89 @@ class xs extends Mt {
|
|
|
5568
5656
|
}
|
|
5569
5657
|
}
|
|
5570
5658
|
export {
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5659
|
+
es as AssistantCard,
|
|
5660
|
+
en as Avatar,
|
|
5661
|
+
ts as AvatarStack,
|
|
5662
|
+
Rr as Badge,
|
|
5663
|
+
lt as Box,
|
|
5576
5664
|
le as Button,
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5665
|
+
Fn as ButtonGroup,
|
|
5666
|
+
Cs as Card,
|
|
5667
|
+
rs as ChannelBadge,
|
|
5580
5668
|
ye as Checkbox,
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5669
|
+
ks as CommandPalette,
|
|
5670
|
+
Kn as ConfirmDialog,
|
|
5671
|
+
nt as ContentLoading,
|
|
5584
5672
|
Pe as DatePicker,
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5673
|
+
br as Dropdown,
|
|
5674
|
+
Gn as EmptyState,
|
|
5675
|
+
Es as ErrorBoundary,
|
|
5676
|
+
Ss as FederatedResource,
|
|
5677
|
+
Gt as FilterChip,
|
|
5678
|
+
dr as FolderSelect,
|
|
5679
|
+
Wn as Form,
|
|
5680
|
+
jr as FormSection,
|
|
5681
|
+
ws as Heading,
|
|
5682
|
+
Pt as IDENTITY_TONE_COUNT,
|
|
5594
5683
|
Z as Icon,
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5684
|
+
ns as Image,
|
|
5685
|
+
Jn as Kbd,
|
|
5686
|
+
os as KpiCard,
|
|
5687
|
+
Rn as Link,
|
|
5688
|
+
as as List,
|
|
5689
|
+
ss as ListBulkAction,
|
|
5690
|
+
Pn as MeetingGrid,
|
|
5691
|
+
ls as MessageBubble,
|
|
5692
|
+
rt as Modal,
|
|
5693
|
+
cs as PageHeader,
|
|
5694
|
+
Hn as PageToolbar,
|
|
5695
|
+
Me as PageToolbarActions,
|
|
5696
|
+
jn as ParticipantTile,
|
|
5697
|
+
Ye as Popover,
|
|
5698
|
+
Yn as ProgressBar,
|
|
5699
|
+
is as RichText,
|
|
5700
|
+
tt as SearchField,
|
|
5701
|
+
hr as SearchableTextField,
|
|
5702
|
+
ds as SectionCaption,
|
|
5703
|
+
us as SectionDivider,
|
|
5704
|
+
Qt as SegmentedToggle,
|
|
5705
|
+
ze as Select,
|
|
5706
|
+
ms as SettingsFrameProvider,
|
|
5707
|
+
hs as SettingsPage,
|
|
5708
|
+
xs as SettingsRow,
|
|
5709
|
+
bs as SettingsSection,
|
|
5710
|
+
Ns as SidebarMenu,
|
|
5711
|
+
gs as SourceChip,
|
|
5712
|
+
Xn as Spinner,
|
|
5713
|
+
Xe as SplitButton,
|
|
5714
|
+
Zn as StatusDot,
|
|
5715
|
+
Qn as StepIndicator,
|
|
5716
|
+
Dr as StorageInput,
|
|
5717
|
+
xr as Switch,
|
|
5718
|
+
Un as TabBar,
|
|
5719
|
+
Ve as Table,
|
|
5720
|
+
Cr as Tabs,
|
|
5632
5721
|
fe as Text,
|
|
5633
|
-
|
|
5722
|
+
je as TextArea,
|
|
5634
5723
|
Ne as TextField,
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
Dn as
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5724
|
+
On as VideoSurface,
|
|
5725
|
+
ys as View,
|
|
5726
|
+
qe as autofillProps,
|
|
5727
|
+
dn as badgeColumn,
|
|
5728
|
+
ps as booleanBadgeColumn,
|
|
5729
|
+
In as catTone,
|
|
5730
|
+
c as cn,
|
|
5731
|
+
An as createSizes,
|
|
5732
|
+
Dn as createVariants,
|
|
5733
|
+
Vn as dateFilterHandler,
|
|
5734
|
+
Ln as identityDotClass,
|
|
5735
|
+
Je as identityPlateClass,
|
|
5736
|
+
Ge as identityTone,
|
|
5737
|
+
vs as labelsColumn,
|
|
5738
|
+
Bn as resolveLucideIcon,
|
|
5739
|
+
qn as selectFilterHandler,
|
|
5740
|
+
De as useAnchoredPosition,
|
|
5741
|
+
on as useSettingsFrame,
|
|
5742
|
+
fs as useSettingsFrameHost
|
|
5648
5743
|
};
|
|
5649
5744
|
//# sourceMappingURL=index.js.map
|