@opencxh/ui-kit 3.112.1 → 3.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { clsx as qe } from "clsx";
1
+ import { clsx as Ue } from "clsx";
2
2
  import { jsxs as i, jsx as e, Fragment as fe } from "react/jsx-runtime";
3
- import { VideoOff as We, User as Ke, MicOff as _e, Mic as Ge, X as ve, ChevronDown as be, ExternalLink as Je, Calendar as Ye, ChevronLeft as Pe, ChevronRight as ye, ChevronDownIcon as Xe, Loader2 as Ze, Search as Ne, Check as Me, ChevronUp as Qe, ChevronsLeft as et, ChevronsRight as tt, FileText as we, HardDrive as $e, ArrowLeft as ze, FolderPlus as rt, Upload as nt, Folder as De, Trash2 as st, Plus as at, Sparkles as lt, ImageOff as ot, Pencil as ct, ArrowUpRight as it } from "lucide-react";
3
+ import { VideoOff as We, User as Ke, MicOff as _e, Mic as Ge, X as ve, ChevronDown as be, ExternalLink as Je, Calendar as Ye, ChevronLeft as je, ChevronRight as ye, ChevronDownIcon as Xe, Loader2 as Ze, Search as Ne, Check as Me, ChevronUp as Qe, ChevronsLeft as et, ChevronsRight as tt, FileText as ke, HardDrive as $e, ArrowLeft as Ee, FolderPlus as rt, Upload as nt, Folder as De, Trash2 as st, Plus as at, Sparkles as lt, ImageOff as ot, Pencil as ct, ArrowUpRight as it } from "lucide-react";
4
4
  import le, { useRef as se, useEffect as Y, forwardRef as de, useState as R, useLayoutEffect as dt, useMemo as me, useCallback as ce, createContext as ut, Component as mt } from "react";
5
- function d(...t) {
6
- return qe(t);
5
+ function u(...t) {
6
+ return Ue(t);
7
7
  }
8
- function Ur(t) {
8
+ function qr(t) {
9
9
  return (r, n) => t[r]?.[n] || "";
10
10
  }
11
- function qr(t) {
11
+ function Ur(t) {
12
12
  return (r) => t[r] || "";
13
13
  }
14
14
  function Wr({ tiles: t, pinned: r, className: n }) {
15
15
  if (r)
16
- return /* @__PURE__ */ i("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
16
+ return /* @__PURE__ */ i("div", { className: u("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
17
17
  /* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
18
18
  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)) })
19
19
  ] });
20
20
  const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
21
- return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
21
+ return /* @__PURE__ */ e("div", { className: u("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
22
22
  }
23
23
  function Kr({
24
24
  name: t,
@@ -28,14 +28,14 @@ function Kr({
28
28
  hasVideo: a,
29
29
  videoSlot: l,
30
30
  className: c,
31
- fill: f
31
+ fill: h
32
32
  }) {
33
33
  return /* @__PURE__ */ i(
34
34
  "div",
35
35
  {
36
- className: d(
36
+ className: u(
37
37
  "relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
38
- f ? "h-full w-full" : "aspect-video",
38
+ h ? "h-full w-full" : "aspect-video",
39
39
  s && "ring-2 ring-speaking",
40
40
  c
41
41
  ),
@@ -61,7 +61,7 @@ function _r({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
61
61
  "div",
62
62
  {
63
63
  ref: a,
64
- className: d(
64
+ className: u(
65
65
  "w-full h-full bg-video-surface-strong overflow-hidden",
66
66
  n && "[&>*]:scale-x-[-1]",
67
67
  s
@@ -105,21 +105,21 @@ const ft = {
105
105
  leftIcon: a,
106
106
  rightIcon: l,
107
107
  iconOnly: c = !1,
108
- shape: f = "default",
109
- className: p,
108
+ shape: h = "default",
109
+ className: g,
110
110
  children: N,
111
- disabled: h,
112
- ...m
113
- }, x) => {
114
- const v = h || s;
111
+ disabled: x,
112
+ ...d
113
+ }, f) => {
114
+ const v = x || s;
115
115
  return /* @__PURE__ */ i(
116
116
  "button",
117
117
  {
118
- ref: x,
118
+ ref: f,
119
119
  type: "button",
120
- className: d(
120
+ className: u(
121
121
  "inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-semibold",
122
- f === "circle" ? "rounded-full" : "rounded-md",
122
+ h === "circle" ? "rounded-full" : "rounded-md",
123
123
  "transition-colors duration-fast ease-out",
124
124
  "focus-visible:outline-none focus-visible:focus-ring",
125
125
  "disabled:cursor-not-allowed disabled:border-border-subtle",
@@ -128,11 +128,11 @@ const ft = {
128
128
  c ? xt[r] : ht[r],
129
129
  (n || r === "full") && "w-full",
130
130
  s && "cursor-wait",
131
- p
131
+ g
132
132
  ),
133
133
  disabled: v,
134
134
  "aria-busy": s || void 0,
135
- ...m,
135
+ ...d,
136
136
  children: [
137
137
  s && /* @__PURE__ */ e(
138
138
  "span",
@@ -158,7 +158,7 @@ const Gr = ({
158
158
  attached: s = !0,
159
159
  className: a
160
160
  }) => {
161
- const l = d(
161
+ const l = u(
162
162
  "inline-flex",
163
163
  {
164
164
  // Orientation
@@ -199,9 +199,9 @@ const Gr = ({
199
199
  onClick: a,
200
200
  className: l,
201
201
  "aria-label": c,
202
- ...f
202
+ ...h
203
203
  }) => {
204
- const p = typeof r == "number" ? r : gt(r), N = d(
204
+ const g = typeof r == "number" ? r : gt(r), N = u(
205
205
  "inline-block shrink-0",
206
206
  bt[n],
207
207
  s && [
@@ -209,8 +209,8 @@ const Gr = ({
209
209
  "focus-visible:outline-none focus-visible:focus-ring"
210
210
  ],
211
211
  l
212
- ), h = {
213
- size: p,
212
+ ), x = {
213
+ size: g,
214
214
  strokeWidth: 2,
215
215
  className: N,
216
216
  onClick: s ? a : void 0,
@@ -218,12 +218,12 @@ const Gr = ({
218
218
  "aria-hidden": c ? void 0 : !0,
219
219
  role: s ? "button" : void 0,
220
220
  tabIndex: s ? 0 : void 0,
221
- onKeyDown: s ? (m) => {
222
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), a?.());
221
+ onKeyDown: s ? (d) => {
222
+ (d.key === "Enter" || d.key === " ") && (d.preventDefault(), a?.());
223
223
  } : void 0,
224
- ...f
224
+ ...h
225
225
  };
226
- return /* @__PURE__ */ e(t, { ...h });
226
+ return /* @__PURE__ */ e(t, { ...x });
227
227
  };
228
228
  function gt(t) {
229
229
  return {
@@ -248,44 +248,44 @@ function Jr({
248
248
  size: a = "md",
249
249
  active: l = !1,
250
250
  caret: c = !1,
251
- onClear: f,
252
- clearLabel: p = "Filter wissen",
251
+ onClear: h,
252
+ clearLabel: g = "Filter wissen",
253
253
  onClick: N,
254
- title: h,
255
- className: m
254
+ title: x,
255
+ className: d
256
256
  }) {
257
- const x = l && !!f, v = s === "pill" ? "rounded-full" : "rounded-md", C = d(
257
+ const f = l && !!h, v = s === "pill" ? "rounded-full" : "rounded-md", C = u(
258
258
  // A button's default cursor is an arrow, so it has to be asked for.
259
259
  "inline-flex cursor-pointer select-none items-center text-sm font-semibold",
260
260
  a === "sm" ? "h-control-sm" : "h-control-md",
261
261
  "transition-colors duration-fast ease-out",
262
262
  v,
263
263
  // Picking a value outranks whatever the value happens to mean.
264
- l ? "bg-accent text-accent-fg" : d("border", pt[n]),
265
- m
264
+ l ? "bg-accent text-accent-fg" : u("border", pt[n]),
265
+ d
266
266
  ), y = /* @__PURE__ */ i(fe, { children: [
267
267
  r,
268
268
  t,
269
269
  c && /* @__PURE__ */ e(J, { icon: be, size: "xs" })
270
- ] }), g = d(
270
+ ] }), p = u(
271
271
  "inline-flex items-center gap-1.5 pl-3",
272
272
  v,
273
- x ? "pr-1.5" : "pr-3",
273
+ f ? "pr-1.5" : "pr-3",
274
274
  "focus-visible:outline-none focus-visible:focus-ring"
275
275
  );
276
- return x ? /* @__PURE__ */ i("span", { className: C, title: h, children: [
277
- /* @__PURE__ */ e("button", { type: "button", onClick: N, className: g, children: y }),
276
+ return f ? /* @__PURE__ */ i("span", { className: C, title: x, children: [
277
+ /* @__PURE__ */ e("button", { type: "button", onClick: N, className: p, children: y }),
278
278
  /* @__PURE__ */ e(
279
279
  "button",
280
280
  {
281
281
  type: "button",
282
- "aria-label": p,
283
- onClick: f,
284
- className: d("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", v),
282
+ "aria-label": g,
283
+ onClick: h,
284
+ className: u("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", v),
285
285
  children: /* @__PURE__ */ e(J, { icon: ve, size: "xs" })
286
286
  }
287
287
  )
288
- ] }) : /* @__PURE__ */ e("button", { type: "button", title: h, onClick: N, className: d(C, g), children: y });
288
+ ] }) : /* @__PURE__ */ e("button", { type: "button", title: x, onClick: N, className: u(C, p), children: y });
289
289
  }
290
290
  const vt = {
291
291
  xs: "text-xs",
@@ -319,12 +319,12 @@ const vt = {
319
319
  external: a = !1,
320
320
  className: l,
321
321
  children: c,
322
- href: f,
323
- target: p,
322
+ href: h,
323
+ target: g,
324
324
  rel: N,
325
- ...h
325
+ ...x
326
326
  }) => {
327
- const m = a || f && (f.startsWith("http") || f.startsWith("mailto:")), x = d(
327
+ const d = a || h && (h.startsWith("http") || h.startsWith("mailto:")), f = u(
328
328
  "inline-flex items-center gap-1 underline-offset-2",
329
329
  "transition-colors duration-fast ease-out",
330
330
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -339,15 +339,15 @@ const vt = {
339
339
  s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
340
340
  l
341
341
  ), v = {
342
- ...h,
343
- href: s ? void 0 : f,
344
- target: m ? "_blank" : p,
345
- rel: m ? "noopener noreferrer" : N,
342
+ ...x,
343
+ href: s ? void 0 : h,
344
+ target: d ? "_blank" : g,
345
+ rel: d ? "noopener noreferrer" : N,
346
346
  "aria-disabled": s || void 0
347
347
  };
348
- return /* @__PURE__ */ i("a", { className: x, ...v, children: [
348
+ return /* @__PURE__ */ i("a", { className: f, ...v, children: [
349
349
  c,
350
- m && /* @__PURE__ */ e(Je, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
350
+ d && /* @__PURE__ */ e(Je, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
351
351
  ] });
352
352
  }, wt = {
353
353
  sm: "h-control-sm px-3 text-sm",
@@ -366,22 +366,22 @@ function Xr({
366
366
  {
367
367
  role: "tablist",
368
368
  "aria-label": l,
369
- className: d("inline-flex gap-0.5 rounded-md bg-surface-hover p-0.5", a),
369
+ className: u("inline-flex gap-0.5 rounded-md bg-surface-hover p-0.5", a),
370
370
  children: t.map((c) => {
371
- const f = c.value === r;
371
+ const h = c.value === r;
372
372
  return /* @__PURE__ */ e(
373
373
  "button",
374
374
  {
375
375
  role: "tab",
376
- "aria-selected": f,
376
+ "aria-selected": h,
377
377
  type: "button",
378
378
  onClick: () => n(c.value),
379
- className: d(
379
+ className: u(
380
380
  "inline-flex items-center justify-center rounded-sm",
381
381
  "transition-colors duration-fast ease-out",
382
382
  "focus-visible:outline-none focus-visible:focus-ring",
383
383
  wt[s],
384
- f ? "bg-surface text-text font-semibold" : "text-text-muted hover:text-text"
384
+ h ? "bg-surface text-text font-semibold" : "text-text-muted hover:text-text"
385
385
  ),
386
386
  children: c.label
387
387
  },
@@ -391,61 +391,75 @@ function Xr({
391
391
  }
392
392
  );
393
393
  }
394
+ function we(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
395
+ const [l, c] = R({});
396
+ return dt(() => {
397
+ if (!t) return;
398
+ const h = () => {
399
+ const g = r.current;
400
+ if (!g) return;
401
+ const N = g.getBoundingClientRect(), x = window.innerHeight - N.bottom, d = N.top, f = a.startsWith("top"), v = f ? d < 200 && x > d : x < 200 && d > x, C = f !== v, y = { position: "fixed" };
402
+ C ? (y.bottom = window.innerHeight - N.top + n, y.maxHeight = Math.max(120, d - n * 2)) : (y.top = N.bottom + n, y.maxHeight = Math.max(120, x - n * 2)), a.endsWith("end") ? y.right = window.innerWidth - N.right : y.left = N.left, s && (y.width = N.width), c(y);
403
+ };
404
+ return h(), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
405
+ window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
406
+ };
407
+ }, [t, r, n, s, a]), l;
408
+ }
394
409
  const kt = ({
395
410
  trigger: t,
396
411
  children: r,
397
412
  placement: n = "bottom-start",
398
413
  className: s,
399
- disabled: a = !1,
400
- triggerLabel: l
414
+ rootClassName: a,
415
+ triggerClassName: l,
416
+ disabled: c = !1,
417
+ triggerLabel: h
401
418
  }) => {
402
- const [c, f] = R(!1), [p, N] = R({}), h = se(null), m = se(null);
419
+ const [g, N] = R(!1), x = se(null), d = se(null), f = we(g, d, { placement: n });
403
420
  Y(() => {
404
- if (!c) return;
405
- const C = (g) => {
406
- h.current && !h.current.contains(g.target) && f(!1);
407
- }, y = (g) => {
408
- g.key === "Escape" && f(!1);
421
+ if (!g) return;
422
+ const y = (D) => {
423
+ x.current && !x.current.contains(D.target) && N(!1);
424
+ }, p = (D) => {
425
+ D.key === "Escape" && N(!1);
409
426
  };
410
- return document.addEventListener("mousedown", C), document.addEventListener("keydown", y), () => {
411
- document.removeEventListener("mousedown", C), document.removeEventListener("keydown", y);
427
+ return document.addEventListener("mousedown", y), document.addEventListener("keydown", p), () => {
428
+ document.removeEventListener("mousedown", y), document.removeEventListener("keydown", p);
412
429
  };
413
- }, [c]);
414
- const x = (C) => {
415
- if (C.stopPropagation(), !a) {
416
- if (!c) {
417
- const y = m.current?.getBoundingClientRect();
418
- if (y) {
419
- const A = {};
420
- n.startsWith("bottom") ? A.top = y.bottom + 6 : A.bottom = window.innerHeight - y.top + 6, n.endsWith("start") ? A.left = y.left : A.right = window.innerWidth - y.right, N(A);
421
- }
422
- }
423
- f((y) => !y);
424
- }
425
- }, v = () => f(!1);
426
- return /* @__PURE__ */ i("div", { ref: h, className: "relative inline-flex", children: [
430
+ }, [g]);
431
+ const v = (y) => {
432
+ y.stopPropagation(), !c && N((p) => !p);
433
+ }, C = () => N(!1);
434
+ return /* @__PURE__ */ i("div", { ref: x, className: u("relative inline-flex", a), children: [
427
435
  /* @__PURE__ */ e(
428
436
  "button",
429
437
  {
430
- ref: m,
438
+ ref: d,
431
439
  type: "button",
432
- onClick: x,
433
- disabled: a,
434
- "aria-label": l,
435
- "aria-expanded": c,
436
- className: d("inline-flex items-center", a && "cursor-not-allowed opacity-50"),
440
+ onClick: v,
441
+ disabled: c,
442
+ "aria-label": h,
443
+ "aria-expanded": g,
444
+ className: u(
445
+ "inline-flex items-center",
446
+ c && "cursor-not-allowed opacity-50",
447
+ l
448
+ ),
437
449
  children: t
438
450
  }
439
451
  ),
440
- c && /* @__PURE__ */ e(
452
+ g && /* @__PURE__ */ e(
441
453
  "div",
442
454
  {
443
- className: d(
444
- "fixed z-overlay bg-surface rounded-lg shadow-overlay border border-border",
455
+ className: u(
456
+ // overflow-y-auto pairs with the hook's max-height: without it a
457
+ // panel taller than the space available is simply cut off.
458
+ "fixed z-overlay overflow-y-auto rounded-lg border border-border bg-surface shadow-overlay",
445
459
  s
446
460
  ),
447
- style: p,
448
- children: typeof r == "function" ? r(v) : r
461
+ style: f,
462
+ children: typeof r == "function" ? r(C) : r
449
463
  }
450
464
  )
451
465
  ] });
@@ -457,7 +471,7 @@ const kt = ({
457
471
  sm: "h-control-sm w-7",
458
472
  md: "h-control-md w-8"
459
473
  };
460
- function je({
474
+ function Pe({
461
475
  label: t,
462
476
  onClick: r,
463
477
  variant: n = "primary",
@@ -465,11 +479,11 @@ function je({
465
479
  icon: a,
466
480
  options: l,
467
481
  disabled: c = !1,
468
- loading: f = !1,
469
- menuPlacement: p = "bottom-end",
482
+ loading: h = !1,
483
+ menuPlacement: g = "bottom-end",
470
484
  menuLabel: N = "More options"
471
485
  }) {
472
- const h = c || f, m = l.length > 0;
486
+ const x = c || h, d = l.length > 0;
473
487
  return /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-px", children: [
474
488
  /* @__PURE__ */ e(
475
489
  ee,
@@ -478,41 +492,41 @@ function je({
478
492
  size: s,
479
493
  onClick: r,
480
494
  disabled: c,
481
- loading: f,
495
+ loading: h,
482
496
  leftIcon: a,
483
- className: d(m && "rounded-r-none"),
497
+ className: u(d && "rounded-r-none"),
484
498
  children: t
485
499
  }
486
500
  ),
487
- m && /* @__PURE__ */ e(
501
+ d && /* @__PURE__ */ e(
488
502
  kt,
489
503
  {
490
- placement: p,
491
- disabled: h,
504
+ placement: g,
505
+ disabled: x,
492
506
  triggerLabel: N,
493
507
  className: "min-w-menu py-1",
494
508
  trigger: /* @__PURE__ */ e(
495
509
  "span",
496
510
  {
497
511
  "aria-hidden": "true",
498
- className: d(
512
+ className: u(
499
513
  "inline-flex items-center justify-center rounded-md rounded-l-none",
500
514
  "transition-colors duration-fast ease-out",
501
515
  Ct[n],
502
516
  St[s],
503
- h && "cursor-not-allowed opacity-50"
517
+ x && "cursor-not-allowed opacity-50"
504
518
  ),
505
519
  children: /* @__PURE__ */ e(be, { className: "size-icon-md" })
506
520
  }
507
521
  ),
508
- children: (x) => /* @__PURE__ */ e(fe, { children: l.map((v) => /* @__PURE__ */ i(
522
+ children: (f) => /* @__PURE__ */ e(fe, { children: l.map((v) => /* @__PURE__ */ i(
509
523
  "button",
510
524
  {
511
525
  type: "button",
512
526
  onClick: () => {
513
- v.onClick(), x();
527
+ v.onClick(), f();
514
528
  },
515
- className: d(
529
+ className: u(
516
530
  "flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
517
531
  "transition-colors duration-fast ease-out",
518
532
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -551,51 +565,53 @@ const zt = {
551
565
  error: n,
552
566
  size: s = "md",
553
567
  indeterminate: a = !1,
554
- containerClassName: l,
555
- labelClassName: c,
556
- className: f,
557
- id: p,
558
- ...N
559
- }, h) => {
560
- const m = le.useId(), x = p || `checkbox-${m}`, v = !!n, C = le.useRef(null), y = le.useCallback(
561
- (g) => {
562
- C.current = g, typeof h == "function" ? h(g) : h && typeof h == "object" && (h.current = g);
568
+ shape: l = "square",
569
+ containerClassName: c,
570
+ labelClassName: h,
571
+ className: g,
572
+ id: N,
573
+ ...x
574
+ }, d) => {
575
+ const f = le.useId(), v = N || `checkbox-${f}`, C = !!n, y = le.useRef(null), p = le.useCallback(
576
+ (D) => {
577
+ y.current = D, typeof d == "function" ? d(D) : d && typeof d == "object" && (d.current = D);
563
578
  },
564
- [h]
579
+ [d]
565
580
  );
566
581
  return le.useEffect(() => {
567
- C.current && (C.current.indeterminate = a);
568
- }, [a]), /* @__PURE__ */ i("div", { className: d("flex flex-col", l), children: [
569
- /* @__PURE__ */ i("div", { className: d("flex items-center gap-3", Et[s]), children: [
582
+ y.current && (y.current.indeterminate = a);
583
+ }, [a]), /* @__PURE__ */ i("div", { className: u("flex flex-col", c), children: [
584
+ /* @__PURE__ */ i("div", { className: u("flex items-center gap-3", Et[s]), children: [
570
585
  /* @__PURE__ */ e(
571
586
  "input",
572
587
  {
573
- ref: y,
574
- id: x,
588
+ ref: p,
589
+ id: v,
575
590
  type: "checkbox",
576
- "aria-invalid": v || void 0,
577
- className: d(
578
- "shrink-0 rounded-sm border bg-surface-input accent-accent",
591
+ "aria-invalid": C || void 0,
592
+ className: u(
593
+ "shrink-0 border bg-surface-input accent-accent",
594
+ l === "circle" ? "rounded-full" : "rounded-sm",
579
595
  "transition-colors duration-fast ease-out",
580
596
  "focus-visible:outline-none focus-visible:focus-ring",
581
597
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
582
598
  zt[s],
583
- v ? "border-danger-border" : "border-border-strong",
584
- f
599
+ C ? "border-danger-border" : "border-border-strong",
600
+ g
585
601
  ),
586
- ...N
602
+ ...x
587
603
  }
588
604
  ),
589
605
  t && /* @__PURE__ */ i("div", { className: "flex-1", children: [
590
606
  /* @__PURE__ */ e(
591
607
  "label",
592
608
  {
593
- htmlFor: x,
594
- className: d(
609
+ htmlFor: v,
610
+ className: u(
595
611
  "cursor-pointer",
596
- v ? "text-danger-fg" : "text-text",
612
+ C ? "text-danger-fg" : "text-text",
597
613
  Mt[s],
598
- c
614
+ h
599
615
  ),
600
616
  children: t
601
617
  }
@@ -608,22 +624,7 @@ const zt = {
608
624
  }
609
625
  );
610
626
  xe.displayName = "Checkbox";
611
- function Ee(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
612
- const [l, c] = R({});
613
- return dt(() => {
614
- if (!t) return;
615
- const f = () => {
616
- const p = r.current;
617
- if (!p) return;
618
- const N = p.getBoundingClientRect(), h = window.innerHeight - N.bottom, m = N.top, x = a.startsWith("top"), v = x ? m < 200 && h > m : h < 200 && m > h, C = x !== v, y = { position: "fixed" };
619
- C ? (y.bottom = window.innerHeight - N.top + n, y.maxHeight = Math.max(120, m - n * 2)) : (y.top = N.bottom + n, y.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? y.right = window.innerWidth - N.right : y.left = N.left, s && (y.width = N.width), c(y);
620
- };
621
- return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
622
- window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
623
- };
624
- }, [t, r, n, s, a]), l;
625
- }
626
- const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }), Dt = () => /* @__PURE__ */ e(J, { icon: Pe, size: "md", color: "current" }), Tt = () => /* @__PURE__ */ e(J, { icon: ye, size: "md", color: "current" }), Ce = de(({
627
+ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }), Dt = () => /* @__PURE__ */ e(J, { icon: je, size: "md", color: "current" }), Tt = () => /* @__PURE__ */ e(J, { icon: ye, size: "md", color: "current" }), Se = de(({
627
628
  value: t,
628
629
  onChange: r,
629
630
  placeholder: n = "Select date",
@@ -631,39 +632,39 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
631
632
  required: a = !1,
632
633
  size: l = "md",
633
634
  className: c,
634
- minDate: f,
635
- maxDate: p,
635
+ minDate: h,
636
+ maxDate: g,
636
637
  format: N = "MM/dd/yyyy",
637
- withTime: h = !1
638
- }, m) => {
639
- const [x, v] = R(!1), [C, y] = R(() => t || /* @__PURE__ */ new Date()), g = se(null), A = Ee(x, g);
638
+ withTime: x = !1
639
+ }, d) => {
640
+ const [f, v] = R(!1), [C, y] = R(() => t || /* @__PURE__ */ new Date()), p = se(null), D = we(f, p);
640
641
  Y(() => {
641
- const b = (u) => {
642
- g.current && !g.current.contains(u.target) && v(!1);
642
+ const b = (m) => {
643
+ p.current && !p.current.contains(m.target) && v(!1);
643
644
  };
644
- return x && document.addEventListener("mousedown", b), () => {
645
+ return f && document.addEventListener("mousedown", b), () => {
645
646
  document.removeEventListener("mousedown", b);
646
647
  };
647
- }, [x]);
648
+ }, [f]);
648
649
  const $ = (b) => {
649
650
  if (!b) return "";
650
- const u = b.getDate().toString().padStart(2, "0"), E = (b.getMonth() + 1).toString().padStart(2, "0"), w = b.getFullYear(), P = N === "dd/MM/yyyy" ? `${u}/${E}/${w}` : N === "yyyy-MM-dd" ? `${w}-${E}-${u}` : `${E}/${u}/${w}`;
651
- return h ? `${P} ${_(b)}` : P;
651
+ const m = b.getDate().toString().padStart(2, "0"), E = (b.getMonth() + 1).toString().padStart(2, "0"), w = b.getFullYear(), j = N === "dd/MM/yyyy" ? `${m}/${E}/${w}` : N === "yyyy-MM-dd" ? `${w}-${E}-${m}` : `${E}/${m}/${w}`;
652
+ return x ? `${j} ${_(b)}` : j;
652
653
  }, _ = (b) => `${b.getHours().toString().padStart(2, "0")}:${b.getMinutes().toString().padStart(2, "0")}`, M = (b) => {
653
- const [u, E] = b.split(":").map(Number);
654
- if (Number.isNaN(u) || Number.isNaN(E)) return;
654
+ const [m, E] = b.split(":").map(Number);
655
+ if (Number.isNaN(m) || Number.isNaN(E)) return;
655
656
  const w = t ? new Date(t) : /* @__PURE__ */ new Date();
656
- w.setHours(u, E, 0, 0), r?.(w);
657
- }, U = () => {
658
- const b = C.getFullYear(), u = C.getMonth(), E = new Date(b, u, 1), w = new Date(E);
657
+ w.setHours(m, E, 0, 0), r?.(w);
658
+ }, q = () => {
659
+ const b = C.getFullYear(), m = C.getMonth(), E = new Date(b, m, 1), w = new Date(E);
659
660
  w.setDate(w.getDate() - E.getDay());
660
- const P = [], k = new Date(w);
661
+ const j = [], k = new Date(w);
661
662
  for (let ae = 0; ae < 42; ae++)
662
- P.push(new Date(k)), k.setDate(k.getDate() + 1);
663
- return P;
663
+ j.push(new Date(k)), k.setDate(k.getDate() + 1);
664
+ return j;
664
665
  }, V = (b) => {
665
- if (b.getMonth() === C.getMonth() && !(f && b < f) && !(p && b > p)) {
666
- if (h) {
666
+ if (b.getMonth() === C.getMonth() && !(h && b < h) && !(g && b > g)) {
667
+ if (x) {
667
668
  const E = new Date(b);
668
669
  E.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(E);
669
670
  return;
@@ -676,7 +677,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
676
677
  y(new Date(C.getFullYear(), C.getMonth() + 1, 1));
677
678
  }, H = () => {
678
679
  r?.(null), v(!1);
679
- }, X = d(
680
+ }, X = u(
680
681
  "w-full border border-border rounded-md transition-colors duration-fast",
681
682
  "bg-surface text-text",
682
683
  "placeholder:text-text-muted",
@@ -689,7 +690,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
689
690
  "h-control-md w-full px-3 text-base": l === "full"
690
691
  },
691
692
  c
692
- ), Z = U(), Q = [
693
+ ), Z = q(), Q = [
693
694
  "January",
694
695
  "February",
695
696
  "March",
@@ -703,34 +704,34 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
703
704
  "November",
704
705
  "December"
705
706
  ];
706
- return /* @__PURE__ */ i("div", { ref: g, className: "relative", children: [
707
+ return /* @__PURE__ */ i("div", { ref: p, className: "relative", children: [
707
708
  /* @__PURE__ */ i("div", { className: "relative", children: [
708
709
  /* @__PURE__ */ e(
709
710
  "input",
710
711
  {
711
- ref: m,
712
+ ref: d,
712
713
  type: "text",
713
714
  value: $(t ?? null),
714
715
  placeholder: n,
715
716
  disabled: s,
716
717
  required: a,
717
718
  readOnly: !0,
718
- onClick: () => !s && v(!x),
719
- className: d(X, "pr-10 cursor-pointer")
719
+ onClick: () => !s && v(!f),
720
+ className: u(X, "pr-10 cursor-pointer")
720
721
  }
721
722
  ),
722
723
  /* @__PURE__ */ e(
723
724
  "button",
724
725
  {
725
726
  type: "button",
726
- onClick: () => !s && v(!x),
727
+ onClick: () => !s && v(!f),
727
728
  disabled: s,
728
729
  className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
729
730
  children: /* @__PURE__ */ e($t, {})
730
731
  }
731
732
  )
732
733
  ] }),
733
- x && /* @__PURE__ */ i("div", { style: A, className: "z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
734
+ f && /* @__PURE__ */ i("div", { style: D, className: "z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
734
735
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
735
736
  /* @__PURE__ */ e(
736
737
  "button",
@@ -755,28 +756,28 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
755
756
  )
756
757
  ] }),
757
758
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((b) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: b }, b)) }),
758
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: Z.map((b, u) => {
759
- const E = b.getMonth() === C.getMonth(), w = t && b.toDateString() === t.toDateString(), P = b.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), k = !E || f && b < f || p && b > p;
759
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: Z.map((b, m) => {
760
+ const E = b.getMonth() === C.getMonth(), w = t && b.toDateString() === t.toDateString(), j = b.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), k = !E || h && b < h || g && b > g;
760
761
  return /* @__PURE__ */ e(
761
762
  "button",
762
763
  {
763
764
  onClick: () => !k && V(b),
764
765
  disabled: k,
765
- className: d(
766
+ className: u(
766
767
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
767
768
  {
768
769
  "text-text hover:bg-surface-hover": E && !w && !k,
769
770
  "bg-accent text-accent-fg": w,
770
- "bg-surface-hover text-text": P && !w,
771
+ "bg-surface-hover text-text": j && !w,
771
772
  "text-text-muted cursor-not-allowed": k
772
773
  }
773
774
  ),
774
775
  children: b.getDate()
775
776
  },
776
- u
777
+ m
777
778
  );
778
779
  }) }),
779
- h && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
780
+ x && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
780
781
  /* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
781
782
  /* @__PURE__ */ e(
782
783
  "input",
@@ -823,91 +824,91 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
823
824
  fullWidth: a = !1,
824
825
  options: l,
825
826
  placeholder: c,
826
- containerClassName: f,
827
- labelClassName: p,
827
+ containerClassName: h,
828
+ labelClassName: g,
828
829
  className: N,
829
- id: h,
830
- searchable: m,
831
- multiple: x,
830
+ id: x,
831
+ searchable: d,
832
+ multiple: f,
832
833
  value: v,
833
834
  onChange: C,
834
835
  allowCreate: y,
835
- onCreateOption: g,
836
- ...A
836
+ onCreateOption: p,
837
+ ...D
837
838
  }, $) => {
838
- const _ = h || `select-${Math.random().toString(36).substr(2, 9)}`, M = !!n, [U, V] = le.useState(!1), [I, W] = le.useState(""), H = le.useRef(null), X = le.useRef(null), Z = Ee(U, X, { matchWidth: !0 }), [Q, b] = le.useState(l);
839
+ const _ = x || `select-${Math.random().toString(36).substr(2, 9)}`, M = !!n, [q, V] = le.useState(!1), [I, W] = le.useState(""), H = le.useRef(null), X = le.useRef(null), Z = we(q, X, { matchWidth: !0 }), [Q, b] = le.useState(l);
839
840
  le.useImperativeHandle($, () => H.current), le.useEffect(() => {
840
- const S = (T) => {
841
- H.current && !H.current.contains(T.target) && V(!1);
841
+ const S = (A) => {
842
+ H.current && !H.current.contains(A.target) && V(!1);
842
843
  };
843
844
  return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
844
845
  }, []);
845
- const u = le.useCallback(
846
- (S, T) => S.some(
847
- (L) => ge(L.value) === ge(T) || ge(L.label) === ge(T)
846
+ const m = le.useCallback(
847
+ (S, A) => S.some(
848
+ (L) => ge(L.value) === ge(A) || ge(L.label) === ge(A)
848
849
  ),
849
850
  []
850
851
  ), E = le.useCallback(
851
- (S, T) => {
852
- const L = [...S], D = (q) => {
853
- const j = (q ?? "").trim();
854
- j && (u(L, j) || L.push({ value: j, label: j }));
852
+ (S, A) => {
853
+ const L = [...S], T = (U) => {
854
+ const P = (U ?? "").trim();
855
+ P && (m(L, P) || L.push({ value: P, label: P }));
855
856
  };
856
- return Array.isArray(T) ? T.forEach(D) : D(T), L;
857
+ return Array.isArray(A) ? A.forEach(T) : T(A), L;
857
858
  },
858
- [u]
859
+ [m]
859
860
  );
860
861
  le.useEffect(() => {
861
862
  b((S) => {
862
- const T = [...l];
863
+ const A = [...l];
863
864
  return S.forEach((L) => {
864
- !u(T, L.value) && !u(T, L.label) && T.push(L);
865
- }), E(T, v);
865
+ !m(A, L.value) && !m(A, L.label) && A.push(L);
866
+ }), E(A, v);
866
867
  });
867
- }, [l, v, E, u]);
868
+ }, [l, v, E, m]);
868
869
  const w = (S) => {
869
- if (x) {
870
- const T = Array.isArray(v) ? v : [], L = T.includes(S) ? T.filter((D) => D !== S) : [...T, S];
870
+ if (f) {
871
+ const A = Array.isArray(v) ? v : [], L = A.includes(S) ? A.filter((T) => T !== S) : [...A, S];
871
872
  C?.(L);
872
873
  } else
873
874
  C?.(S), V(!1), W("");
874
- }, P = x ? null : Q.find((S) => S.value === v), k = x ? Q.filter(
875
+ }, j = f ? null : Q.find((S) => S.value === v), k = f ? Q.filter(
875
876
  (S) => Array.isArray(v) && v.includes(S.value)
876
- ) : [], ae = m && I ? Q.filter(
877
+ ) : [], ae = d && I ? Q.filter(
877
878
  (S) => S.label.toLowerCase().includes(I.toLowerCase())
878
- ) : Q, ne = !!y && !!m && !!I.trim() && !u(Q, I), te = (S) => {
879
- const T = S.trim();
880
- if (!T) return;
881
- const L = g?.(T) ?? {
882
- value: T,
883
- label: T
879
+ ) : Q, ne = !!y && !!d && !!I.trim() && !m(Q, I), te = (S) => {
880
+ const A = S.trim();
881
+ if (!A) return;
882
+ const L = p?.(A) ?? {
883
+ value: A,
884
+ label: A
884
885
  };
885
- if (u(Q, L.value) || u(Q, L.label)) {
886
- w(L.value), W(""), x || V(!1);
886
+ if (m(Q, L.value) || m(Q, L.label)) {
887
+ w(L.value), W(""), f || V(!1);
887
888
  return;
888
889
  }
889
- b((D) => [...D, L]), w(L.value), W(""), x || V(!1);
890
- }, G = () => x ? k.length > 0 ? k.map((S) => S.label).join(", ") : c || "Select options" : P?.label || c || "Select an option";
890
+ b((T) => [...T, L]), w(L.value), W(""), f || V(!1);
891
+ }, G = () => f ? k.length > 0 ? k.map((S) => S.label).join(", ") : c || "Select options" : j?.label || c || "Select an option";
891
892
  return /* @__PURE__ */ i(
892
893
  "div",
893
894
  {
894
895
  ref: H,
895
- className: d(
896
+ className: u(
896
897
  "relative flex flex-col",
897
898
  a && "w-full",
898
- f
899
+ h
899
900
  ),
900
- ...A,
901
+ ...D,
901
902
  children: [
902
903
  t && /* @__PURE__ */ e(
903
904
  "label",
904
905
  {
905
906
  htmlFor: _,
906
- onClick: () => V(!U),
907
- className: d(
907
+ onClick: () => V(!q),
908
+ className: u(
908
909
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
909
910
  M ? "text-danger-fg" : "text-text-muted",
910
- p
911
+ g
911
912
  ),
912
913
  children: t
913
914
  }
@@ -919,8 +920,8 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
919
920
  ref: X,
920
921
  type: "button",
921
922
  id: _,
922
- onClick: () => V(!U),
923
- className: d(
923
+ onClick: () => V(!q),
924
+ className: u(
924
925
  "flex w-full items-center justify-between gap-2 rounded-md border transition-colors duration-fast text-left",
925
926
  "focus-visible:outline-none focus-visible:focus-ring",
926
927
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
@@ -935,17 +936,17 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
935
936
  Xe,
936
937
  {
937
938
  size: 16,
938
- className: d(
939
+ className: u(
939
940
  "shrink-0 opacity-60 transition-transform duration-fast",
940
- U && "rotate-180"
941
+ q && "rotate-180"
941
942
  )
942
943
  }
943
944
  )
944
945
  ]
945
946
  }
946
947
  ),
947
- U && /* @__PURE__ */ i("div", { style: Z, className: "z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
948
- m && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
948
+ q && /* @__PURE__ */ i("div", { style: Z, className: "z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
949
+ d && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
949
950
  "input",
950
951
  {
951
952
  type: "text",
@@ -955,7 +956,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
955
956
  onKeyDown: (S) => {
956
957
  S.key === "Enter" && ne && (S.preventDefault(), te(I));
957
958
  },
958
- className: d(
959
+ className: u(
959
960
  "w-full px-3 py-2 text-sm rounded-md border",
960
961
  "text-text border-border focus-visible:outline-none focus-visible:focus-ring"
961
962
  )
@@ -964,7 +965,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
964
965
  ne && /* @__PURE__ */ i(
965
966
  "div",
966
967
  {
967
- className: d(
968
+ className: u(
968
969
  "cursor-pointer px-3 py-1.5 text-sm",
969
970
  "text-info-fg hover:bg-surface-hover"
970
971
  ),
@@ -977,7 +978,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
977
978
  }
978
979
  ),
979
980
  /* @__PURE__ */ i("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
980
- c && !x && /* @__PURE__ */ e(
981
+ c && !f && /* @__PURE__ */ e(
981
982
  "li",
982
983
  {
983
984
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
@@ -988,23 +989,23 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
988
989
  }
989
990
  ),
990
991
  ae.map((S) => {
991
- const T = x ? Array.isArray(v) && v.includes(S.value) : v === S.value;
992
+ const A = f ? Array.isArray(v) && v.includes(S.value) : v === S.value;
992
993
  return /* @__PURE__ */ e(
993
994
  "li",
994
995
  {
995
996
  onClick: () => !S.disabled && w(S.value),
996
- className: d(
997
+ className: u(
997
998
  "cursor-pointer px-3 py-1.5 text-sm",
998
999
  "text-text",
999
1000
  S.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1000
- T && "bg-accent-soft text-accent font-semibold"
1001
+ A && "bg-accent-soft text-accent font-semibold"
1001
1002
  ),
1002
1003
  children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
1003
- x && /* @__PURE__ */ e(
1004
+ f && /* @__PURE__ */ e(
1004
1005
  "input",
1005
1006
  {
1006
1007
  type: "checkbox",
1007
- checked: T,
1008
+ checked: A,
1008
1009
  readOnly: !0,
1009
1010
  className: "mr-3 h-4 w-4 rounded border-border [&:not(:checked)]:bg-surface-input text-accent "
1010
1011
  }
@@ -1021,7 +1022,7 @@ const $t = () => /* @__PURE__ */ e(J, { icon: Ye, size: "md", color: "current" }
1021
1022
  (n || r) && /* @__PURE__ */ e(
1022
1023
  "p",
1023
1024
  {
1024
- className: d(
1025
+ className: u(
1025
1026
  "mt-1 text-xs",
1026
1027
  M ? "text-danger-fg" : "text-text-muted"
1027
1028
  ),
@@ -1048,22 +1049,22 @@ const Lt = {
1048
1049
  fullWidth: a = !1,
1049
1050
  startIcon: l,
1050
1051
  endIcon: c,
1051
- loading: f = !1,
1052
- containerClassName: p,
1052
+ loading: h = !1,
1053
+ containerClassName: g,
1053
1054
  labelClassName: N,
1054
- className: h,
1055
- id: m,
1056
- ...x
1055
+ className: x,
1056
+ id: d,
1057
+ ...f
1057
1058
  }, v) => {
1058
- const C = le.useId(), y = m || `textfield-${C}`, g = !!n, A = n || r ? `${y}-description` : void 0;
1059
- return /* @__PURE__ */ i("div", { className: d("flex flex-col", a && "w-full", p), children: [
1059
+ const C = le.useId(), y = d || `textfield-${C}`, p = !!n, D = n || r ? `${y}-description` : void 0;
1060
+ return /* @__PURE__ */ i("div", { className: u("flex flex-col", a && "w-full", g), children: [
1060
1061
  t && /* @__PURE__ */ e(
1061
1062
  "label",
1062
1063
  {
1063
1064
  htmlFor: y,
1064
- className: d(
1065
+ className: u(
1065
1066
  Oe,
1066
- g ? "text-danger-fg" : "text-text-subtle",
1067
+ p ? "text-danger-fg" : "text-text-subtle",
1067
1068
  N
1068
1069
  ),
1069
1070
  children: t
@@ -1076,9 +1077,9 @@ const Lt = {
1076
1077
  {
1077
1078
  ref: v,
1078
1079
  id: y,
1079
- "aria-invalid": g || void 0,
1080
- "aria-describedby": A,
1081
- className: d(
1080
+ "aria-invalid": p || void 0,
1081
+ "aria-describedby": D,
1082
+ className: u(
1082
1083
  "block w-full rounded-md border bg-surface-input text-text",
1083
1084
  "transition-colors duration-fast ease-out",
1084
1085
  "placeholder:text-text-subtle",
@@ -1086,14 +1087,14 @@ const Lt = {
1086
1087
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
1087
1088
  Lt[s],
1088
1089
  l && "pl-9",
1089
- (c || f) && "pr-9",
1090
- g ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
1091
- h
1090
+ (c || h) && "pr-9",
1091
+ p ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
1092
+ x
1092
1093
  ),
1093
- ...x
1094
+ ...f
1094
1095
  }
1095
1096
  ),
1096
- (c || f) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: f ? /* @__PURE__ */ e(
1097
+ (c || h) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: h ? /* @__PURE__ */ e(
1097
1098
  "span",
1098
1099
  {
1099
1100
  "aria-hidden": !0,
@@ -1104,8 +1105,8 @@ const Lt = {
1104
1105
  (n || r) && /* @__PURE__ */ e(
1105
1106
  "p",
1106
1107
  {
1107
- id: A,
1108
- className: d("mt-1 text-xs", g ? "text-danger-fg" : "text-text-subtle"),
1108
+ id: D,
1109
+ className: u("mt-1 text-xs", p ? "text-danger-fg" : "text-text-subtle"),
1109
1110
  children: n || r
1110
1111
  }
1111
1112
  )
@@ -1121,49 +1122,49 @@ function It({
1121
1122
  size: a = "md",
1122
1123
  placeholder: l,
1123
1124
  templatePlaceholder: c,
1124
- showTemplate: f = !0
1125
+ showTemplate: h = !0
1125
1126
  }) {
1126
- const [p, N] = R([]);
1127
+ const [g, N] = R([]);
1127
1128
  Y(() => {
1128
- let m = !0;
1129
- return Promise.resolve(n?.()).then((x) => {
1130
- m && x && N(x.data ?? []);
1129
+ let d = !0;
1130
+ return Promise.resolve(n?.()).then((f) => {
1131
+ d && f && N(f.data ?? []);
1131
1132
  }).catch(() => {
1132
1133
  }), () => {
1133
- m = !1;
1134
+ d = !1;
1134
1135
  };
1135
1136
  }, []);
1136
- const h = t ?? {};
1137
+ const x = t ?? {};
1137
1138
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
1138
1139
  /* @__PURE__ */ e(
1139
1140
  pe,
1140
1141
  {
1141
1142
  size: a,
1142
1143
  fullWidth: !0,
1143
- value: h.folderId ?? "",
1144
- options: p.map((m) => ({ value: m.id, label: m.name })),
1144
+ value: x.folderId ?? "",
1145
+ options: g.map((d) => ({ value: d.id, label: d.name })),
1145
1146
  placeholder: l ?? "Select a folder",
1146
- onChange: (m) => r?.({ ...h, folderId: m })
1147
+ onChange: (d) => r?.({ ...x, folderId: d })
1147
1148
  }
1148
1149
  ),
1149
- f && /* @__PURE__ */ e(
1150
+ h && /* @__PURE__ */ e(
1150
1151
  he,
1151
1152
  {
1152
1153
  size: a,
1153
1154
  disabled: s ?? !1,
1154
- value: h.pathTemplate ?? "",
1155
+ value: x.pathTemplate ?? "",
1155
1156
  placeholder: c ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
1156
- onChange: (m) => r?.({ ...h, pathTemplate: m.target.value })
1157
+ onChange: (d) => r?.({ ...x, pathTemplate: d.target.value })
1157
1158
  }
1158
1159
  )
1159
1160
  ] });
1160
1161
  }
1161
- const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(Ne, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), jt = (t) => /* @__PURE__ */ e(be, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ot = {
1162
+ const ue = (...t) => t.filter(Boolean).join(" "), jt = (t) => /* @__PURE__ */ e(Ne, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Pt = (t) => /* @__PURE__ */ e(be, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ot = {
1162
1163
  sm: "h-control-sm px-3 text-sm",
1163
1164
  md: "h-control-md px-3 text-base",
1164
1165
  lg: "h-control-lg px-3 text-base",
1165
1166
  full: "h-control-md w-full px-3 text-base"
1166
- }, ke = {
1167
+ }, Ce = {
1167
1168
  sm: "h-4 w-4",
1168
1169
  md: "h-5 w-5",
1169
1170
  lg: "h-6 w-6",
@@ -1175,43 +1176,43 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1175
1176
  error: n,
1176
1177
  size: s = "md",
1177
1178
  fullWidth: a = !1,
1178
- startIcon: l = /* @__PURE__ */ e(Pt, {}),
1179
+ startIcon: l = /* @__PURE__ */ e(jt, {}),
1179
1180
  loading: c = !1,
1180
- containerClassName: f,
1181
- labelClassName: p,
1181
+ containerClassName: h,
1182
+ labelClassName: g,
1182
1183
  className: N,
1183
- id: h,
1184
- options: m,
1185
- onRemoteSearch: x,
1184
+ id: x,
1185
+ options: d,
1186
+ onRemoteSearch: f,
1186
1187
  onSelect: v,
1187
1188
  debounceTime: C = 500,
1188
1189
  showAllOnOpen: y = !1,
1189
- value: g,
1190
- onChange: A,
1190
+ value: p,
1191
+ onChange: D,
1191
1192
  ...$
1192
1193
  }, _) => {
1193
- const M = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, U = !!n, V = se(null), I = se(null), [W, H] = R(g || ""), [X, Z] = R(!1), [Q, b] = R(!1), [u, E] = R(!1);
1194
+ const M = x || `searchfield-${Math.random().toString(36).substr(2, 9)}`, q = !!n, V = se(null), I = se(null), [W, H] = R(p || ""), [X, Z] = R(!1), [Q, b] = R(!1), [m, E] = R(!1);
1194
1195
  Y(() => {
1195
- g !== void 0 && H(g);
1196
- }, [g]);
1196
+ p !== void 0 && H(p);
1197
+ }, [p]);
1197
1198
  const w = me(() => {
1198
- if (y && !u || !W) return m;
1199
+ if (y && !m || !W) return d;
1199
1200
  const S = String(W).toLowerCase();
1200
- return m.filter(
1201
- (T) => String(T.label).toLowerCase().includes(S)
1201
+ return d.filter(
1202
+ (A) => String(A.label).toLowerCase().includes(S)
1202
1203
  );
1203
- }, [W, m, y, u]);
1204
+ }, [W, d, y, m]);
1204
1205
  Y(() => {
1205
- if (!x || !W) {
1206
+ if (!f || !W) {
1206
1207
  b(!1);
1207
1208
  return;
1208
1209
  }
1209
1210
  const S = setTimeout(async () => {
1210
1211
  b(!0);
1211
1212
  try {
1212
- await x(String(W));
1213
- } catch (T) {
1214
- console.error("Remote search failed:", T);
1213
+ await f(String(W));
1214
+ } catch (A) {
1215
+ console.error("Remote search failed:", A);
1215
1216
  } finally {
1216
1217
  b(!1);
1217
1218
  }
@@ -1219,19 +1220,19 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1219
1220
  return () => {
1220
1221
  clearTimeout(S), b(!1);
1221
1222
  };
1222
- }, [W, C, x]), Y(() => {
1223
- const S = (T) => {
1224
- V.current && !V.current.contains(T.target) && Z(!1);
1223
+ }, [W, C, f]), Y(() => {
1224
+ const S = (A) => {
1225
+ V.current && !V.current.contains(A.target) && Z(!1);
1225
1226
  };
1226
1227
  return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
1227
1228
  }, []);
1228
- const P = (S) => {
1229
- const T = S.target.value;
1230
- H(T), Z(!0), E(!0), A && A(S);
1229
+ const j = (S) => {
1230
+ const A = S.target.value;
1231
+ H(A), Z(!0), E(!0), D && D(S);
1231
1232
  }, k = (S) => {
1232
1233
  H(S.label), Z(!1), E(!1), v && v(S.value);
1233
1234
  }, ae = () => {
1234
- (m.length > 0 || x) && (Z(!0), E(!1));
1235
+ (d.length > 0 || f) && (Z(!0), E(!1));
1235
1236
  }, ne = c || Q, te = X && (w.length > 0 || ne), G = me(() => _ || I, [_]);
1236
1237
  return /* @__PURE__ */ i(
1237
1238
  "div",
@@ -1239,7 +1240,7 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1239
1240
  className: ue(
1240
1241
  "flex flex-col",
1241
1242
  a ? "w-full" : "",
1242
- f || "",
1243
+ h || "",
1243
1244
  "relative"
1244
1245
  ),
1245
1246
  ref: V,
@@ -1250,21 +1251,21 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1250
1251
  htmlFor: M,
1251
1252
  className: ue(
1252
1253
  "block text-sm font-medium mb-1",
1253
- U ? "text-danger-fg" : "text-text",
1254
- p || ""
1254
+ q ? "text-danger-fg" : "text-text",
1255
+ g || ""
1255
1256
  ),
1256
1257
  children: t
1257
1258
  }
1258
1259
  ),
1259
1260
  /* @__PURE__ */ i("div", { className: "relative", children: [
1260
- l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ue("text-text-muted", ke[s]), children: l }) }),
1261
+ l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ue("text-text-muted", Ce[s]), children: l }) }),
1261
1262
  /* @__PURE__ */ e(
1262
1263
  "input",
1263
1264
  {
1264
1265
  ref: G,
1265
1266
  id: M,
1266
1267
  value: W,
1267
- onChange: P,
1268
+ onChange: j,
1268
1269
  onFocus: ae,
1269
1270
  className: ue(
1270
1271
  // Base styles
@@ -1278,7 +1279,7 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1278
1279
  "pr-10",
1279
1280
  // Altijd padding rechts voor de dropdown/loading icon
1280
1281
  // State styles
1281
- U ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
1282
+ q ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border text-text",
1282
1283
  N || ""
1283
1284
  ),
1284
1285
  ...$
@@ -1289,18 +1290,18 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1289
1290
  /* @__PURE__ */ e(
1290
1291
  Ze,
1291
1292
  {
1292
- className: ue("animate-spin text-info-fg", ke[s]),
1293
+ className: ue("animate-spin text-info-fg", Ce[s]),
1293
1294
  "aria-hidden": !0
1294
1295
  }
1295
1296
  )
1296
1297
  ) : (
1297
1298
  // Dropdown Chevron
1298
1299
  /* @__PURE__ */ e(
1299
- jt,
1300
+ Pt,
1300
1301
  {
1301
1302
  className: ue(
1302
1303
  "text-text-muted cursor-pointer transition-transform",
1303
- ke[s],
1304
+ Ce[s],
1304
1305
  X ? "rotate-180" : "rotate-0"
1305
1306
  ),
1306
1307
  onClick: () => {
@@ -1333,12 +1334,12 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1333
1334
  {
1334
1335
  className: ue(
1335
1336
  "mt-1 text-xs",
1336
- U ? "text-danger-fg" : "text-text-muted"
1337
+ q ? "text-danger-fg" : "text-text-muted"
1337
1338
  ),
1338
1339
  children: n || r
1339
1340
  }
1340
1341
  ),
1341
- x && /* @__PURE__ */ i("p", { className: "mt-2 text-xs text-success-fg", children: [
1342
+ f && /* @__PURE__ */ i("p", { className: "mt-2 text-xs text-success-fg", children: [
1342
1343
  "Huidige zoekterm (niet-gedebounced): ",
1343
1344
  String(W)
1344
1345
  ] })
@@ -1350,11 +1351,11 @@ const ue = (...t) => t.filter(Boolean).join(" "), Pt = (t) => /* @__PURE__ */ e(
1350
1351
  Bt.displayName = "SearchableTextField";
1351
1352
  const Ft = de(
1352
1353
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, c) => {
1353
- const f = /* @__PURE__ */ e(
1354
+ const h = /* @__PURE__ */ e(
1354
1355
  "span",
1355
1356
  {
1356
1357
  "aria-hidden": !0,
1357
- className: d(
1358
+ className: u(
1358
1359
  "relative inline-flex size-switch-track shrink-0 items-center rounded-full",
1359
1360
  "transition-colors duration-fast ease-out",
1360
1361
  t ? "bg-accent" : "bg-surface-hover",
@@ -1363,7 +1364,7 @@ const Ft = de(
1363
1364
  children: /* @__PURE__ */ e(
1364
1365
  "span",
1365
1366
  {
1366
- className: d(
1367
+ className: u(
1367
1368
  "absolute left-0.5 size-switch-knob rounded-full bg-surface shadow-overlay",
1368
1369
  "transition-transform duration-fast ease-out",
1369
1370
  t && "translate-switch"
@@ -1375,7 +1376,7 @@ const Ft = de(
1375
1376
  return /* @__PURE__ */ i(
1376
1377
  "label",
1377
1378
  {
1378
- className: d(
1379
+ className: u(
1379
1380
  "inline-flex items-center gap-2",
1380
1381
  s ? "cursor-not-allowed" : "cursor-pointer",
1381
1382
  a
@@ -1389,12 +1390,12 @@ const Ft = de(
1389
1390
  role: "switch",
1390
1391
  checked: t,
1391
1392
  disabled: s,
1392
- onChange: (p) => r(p.target.checked),
1393
+ onChange: (g) => r(g.target.checked),
1393
1394
  className: "peer sr-only",
1394
1395
  ...l
1395
1396
  }
1396
1397
  ),
1397
- /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: f }),
1398
+ /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: h }),
1398
1399
  n && /* @__PURE__ */ e("span", { className: "text-sm text-text", children: n })
1399
1400
  ]
1400
1401
  }
@@ -1424,29 +1425,29 @@ function Rt({
1424
1425
  {
1425
1426
  className: "grid gap-2 bg-surface-hover p-3",
1426
1427
  style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
1427
- children: Array.from({ length: s }).map((c, f) => /* @__PURE__ */ e(
1428
+ children: Array.from({ length: s }).map((c, h) => /* @__PURE__ */ e(
1428
1429
  "div",
1429
1430
  {
1430
1431
  className: "h-4 w-2/3 rounded-sm bg-border-strong"
1431
1432
  },
1432
- `header-${f}`
1433
+ `header-${h}`
1433
1434
  ))
1434
1435
  }
1435
1436
  ),
1436
- Array.from({ length: a }).map((c, f) => /* @__PURE__ */ e(
1437
+ Array.from({ length: a }).map((c, h) => /* @__PURE__ */ e(
1437
1438
  "div",
1438
1439
  {
1439
1440
  className: "grid gap-2 border-t border-border-subtle p-3",
1440
1441
  style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
1441
- children: Array.from({ length: s }).map((p, N) => /* @__PURE__ */ e(
1442
+ children: Array.from({ length: s }).map((g, N) => /* @__PURE__ */ e(
1442
1443
  "div",
1443
1444
  {
1444
1445
  className: "h-4 w-full rounded-sm bg-surface-hover"
1445
1446
  },
1446
- `cell-${f}-${N}`
1447
+ `cell-${h}-${N}`
1447
1448
  ))
1448
1449
  },
1449
- `row-${f}`
1450
+ `row-${h}`
1450
1451
  ))
1451
1452
  ] })
1452
1453
  ] }) });
@@ -1459,69 +1460,69 @@ const Vt = ({
1459
1460
  placement: a = "bottom-start",
1460
1461
  disabled: l = !1,
1461
1462
  className: c,
1462
- showCheck: f = !0,
1463
- header: p
1463
+ showCheck: h = !0,
1464
+ header: g
1464
1465
  }) => {
1465
- const [N, h] = R(!1), [m, x] = R(null), [v, C] = R({ top: 0, left: 0 }), y = se(null), g = se(null), A = se(null), $ = se(null), _ = Ee(N, g, { placement: a }), M = se(null), U = () => Array.from(
1466
+ const [N, x] = R(!1), [d, f] = R(null), [v, C] = R({ top: 0, left: 0 }), y = se(null), p = se(null), D = se(null), $ = se(null), _ = we(N, p, { placement: a }), M = se(null), q = () => Array.from(
1466
1467
  $.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1467
1468
  );
1468
1469
  Y(() => {
1469
- N && U()[0]?.focus();
1470
+ N && q()[0]?.focus();
1470
1471
  }, [N]);
1471
- const V = (u) => {
1472
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(u.key)) return;
1473
- const w = U();
1472
+ const V = (m) => {
1473
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(m.key)) return;
1474
+ const w = q();
1474
1475
  if (w.length === 0) return;
1475
- u.preventDefault();
1476
- const P = w.indexOf(document.activeElement), k = u.key === "Home" ? 0 : u.key === "End" ? w.length - 1 : u.key === "ArrowDown" ? (P + 1) % w.length : (P - 1 + w.length) % w.length;
1476
+ m.preventDefault();
1477
+ const j = w.indexOf(document.activeElement), k = m.key === "Home" ? 0 : m.key === "End" ? w.length - 1 : m.key === "ArrowDown" ? (j + 1) % w.length : (j - 1 + w.length) % w.length;
1477
1478
  w[k]?.focus();
1478
1479
  };
1479
1480
  Y(() => {
1480
- const u = (E) => {
1481
- y.current && (!y.current.contains(E.target) || A.current && !A.current.contains(E.target)) && (h(!1), x(null), M.current && (clearTimeout(M.current), M.current = null));
1481
+ const m = (E) => {
1482
+ y.current && (!y.current.contains(E.target) || D.current && !D.current.contains(E.target)) && (x(!1), f(null), M.current && (clearTimeout(M.current), M.current = null));
1482
1483
  };
1483
- return N && document.addEventListener("mousedown", u), () => {
1484
- document.removeEventListener("mousedown", u);
1484
+ return N && document.addEventListener("mousedown", m), () => {
1485
+ document.removeEventListener("mousedown", m);
1485
1486
  };
1486
1487
  }, [N]), Y(() => {
1487
- const u = (E) => {
1488
- E.key === "Escape" && (h(!1), x(null), g.current?.focus(), M.current && (clearTimeout(M.current), M.current = null));
1488
+ const m = (E) => {
1489
+ E.key === "Escape" && (x(!1), f(null), p.current?.focus(), M.current && (clearTimeout(M.current), M.current = null));
1489
1490
  };
1490
- return N && document.addEventListener("keydown", u), () => {
1491
- document.removeEventListener("keydown", u);
1491
+ return N && document.addEventListener("keydown", m), () => {
1492
+ document.removeEventListener("keydown", m);
1492
1493
  };
1493
1494
  }, [N]), Y(() => {
1494
- if (m && y.current) {
1495
- const u = y.current.querySelector(
1496
- `[data-option-value="${m}"]`
1495
+ if (d && y.current) {
1496
+ const m = y.current.querySelector(
1497
+ `[data-option-value="${d}"]`
1497
1498
  );
1498
- if (u) {
1499
- const E = u.getBoundingClientRect();
1499
+ if (m) {
1500
+ const E = m.getBoundingClientRect();
1500
1501
  C({
1501
1502
  top: E.top,
1502
1503
  left: E.right + 8
1503
1504
  });
1504
1505
  }
1505
1506
  }
1506
- }, [m]), Y(() => () => {
1507
+ }, [d]), Y(() => () => {
1507
1508
  M.current && clearTimeout(M.current);
1508
1509
  }, []);
1509
- const I = (u) => {
1510
- u.stopPropagation(), !l && (h(!N), x(null), M.current && (clearTimeout(M.current), M.current = null));
1511
- }, W = (u, E, w) => {
1512
- u.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, w), h(!1), x(null));
1513
- }, H = (u) => {
1514
- M.current && (clearTimeout(M.current), M.current = null), u.children && u.children.length > 0 ? x(u.value) : x(null);
1515
- }, X = (u) => {
1516
- u.children && u.children.length > 0 ? M.current = setTimeout(() => {
1517
- x(null);
1518
- }, 150) : x(null);
1519
- }, Z = (u, E, w) => {
1520
- u.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, w), h(!1), x(null));
1521
- }, Q = d(
1510
+ const I = (m) => {
1511
+ m.stopPropagation(), !l && (x(!N), f(null), M.current && (clearTimeout(M.current), M.current = null));
1512
+ }, W = (m, E, w) => {
1513
+ m.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, w), x(!1), f(null));
1514
+ }, H = (m) => {
1515
+ M.current && (clearTimeout(M.current), M.current = null), m.children && m.children.length > 0 ? f(m.value) : f(null);
1516
+ }, X = (m) => {
1517
+ m.children && m.children.length > 0 ? M.current = setTimeout(() => {
1518
+ f(null);
1519
+ }, 150) : f(null);
1520
+ }, Z = (m, E, w) => {
1521
+ m.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, w), x(!1), f(null));
1522
+ }, Q = u(
1522
1523
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1523
1524
  "max-h-60 overflow-auto"
1524
- ), b = d(
1525
+ ), b = u(
1525
1526
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1526
1527
  "max-h-60 overflow-auto"
1527
1528
  );
@@ -1529,7 +1530,7 @@ const Vt = ({
1529
1530
  "div",
1530
1531
  {
1531
1532
  ref: y,
1532
- className: d(
1533
+ className: u(
1533
1534
  "relative flex flex-row items-center justify-center rounded-lg hover:bg-surface-hover",
1534
1535
  c
1535
1536
  ),
@@ -1537,21 +1538,21 @@ const Vt = ({
1537
1538
  /* @__PURE__ */ e(
1538
1539
  "button",
1539
1540
  {
1540
- ref: g,
1541
+ ref: p,
1541
1542
  onClick: I,
1542
1543
  disabled: l,
1543
1544
  "aria-haspopup": "menu",
1544
1545
  "aria-expanded": N,
1545
- className: d("inline-flex items-center justify-center", {
1546
+ className: u("inline-flex items-center justify-center", {
1546
1547
  "opacity-50 cursor-not-allowed": l
1547
1548
  }),
1548
1549
  children: t
1549
1550
  }
1550
1551
  ),
1551
1552
  N && /* @__PURE__ */ e("div", { ref: $, className: Q, style: _, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
1552
- p && (typeof p == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: p }) : p),
1553
- r.map((u, E) => {
1554
- if (u.divider)
1553
+ g && (typeof g == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: g }) : g),
1554
+ r.map((m, E) => {
1555
+ if (m.divider)
1555
1556
  return /* @__PURE__ */ e(
1556
1557
  "div",
1557
1558
  {
@@ -1559,58 +1560,58 @@ const Vt = ({
1559
1560
  },
1560
1561
  `divider-${E}`
1561
1562
  );
1562
- const w = u.children && u.children.length > 0, P = m === u.value;
1563
+ const w = m.children && m.children.length > 0, j = d === m.value;
1563
1564
  return /* @__PURE__ */ i("div", { className: "relative group", children: [
1564
1565
  /* @__PURE__ */ i(
1565
1566
  "button",
1566
1567
  {
1567
- "data-option-value": u.value,
1568
+ "data-option-value": m.value,
1568
1569
  role: "menuitem",
1569
1570
  "aria-haspopup": w ? "menu" : void 0,
1570
- onClick: (k) => W(k, u),
1571
- onMouseEnter: () => H(u),
1572
- onMouseLeave: () => X(u),
1573
- disabled: u.disabled,
1574
- className: d(
1571
+ onClick: (k) => W(k, m),
1572
+ onMouseEnter: () => H(m),
1573
+ onMouseLeave: () => X(m),
1574
+ disabled: m.disabled,
1575
+ className: u(
1575
1576
  "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",
1576
1577
  {
1577
- "opacity-50 cursor-not-allowed": u.disabled,
1578
- "bg-surface-hover": P && w
1578
+ "opacity-50 cursor-not-allowed": m.disabled,
1579
+ "bg-surface-hover": j && w
1579
1580
  }
1580
1581
  ),
1581
1582
  children: [
1582
1583
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
1583
- u.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: u.icon }),
1584
+ m.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: m.icon }),
1584
1585
  /* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
1585
- /* @__PURE__ */ e("span", { className: "font-base truncate", children: u.label }),
1586
- u.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: u.description })
1586
+ /* @__PURE__ */ e("span", { className: "font-base truncate", children: m.label }),
1587
+ m.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: m.description })
1587
1588
  ] })
1588
1589
  ] }),
1589
1590
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1590
- f && n === u.value && /* @__PURE__ */ e(Me, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1591
+ h && n === m.value && /* @__PURE__ */ e(Me, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1591
1592
  w && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1592
1593
  ] })
1593
1594
  ]
1594
1595
  }
1595
1596
  ),
1596
- w && P && /* @__PURE__ */ e(
1597
+ w && j && /* @__PURE__ */ e(
1597
1598
  "div",
1598
1599
  {
1599
- ref: A,
1600
+ ref: D,
1600
1601
  className: b,
1601
1602
  style: {
1602
1603
  top: `${v.top}px`,
1603
1604
  left: `${v.left}px`
1604
1605
  },
1605
1606
  onMouseEnter: () => {
1606
- M.current && (clearTimeout(M.current), M.current = null), x(u.value);
1607
+ M.current && (clearTimeout(M.current), M.current = null), f(m.value);
1607
1608
  },
1608
1609
  onMouseLeave: () => {
1609
1610
  M.current = setTimeout(() => {
1610
- x(null);
1611
+ f(null);
1611
1612
  }, 150);
1612
1613
  },
1613
- children: /* @__PURE__ */ e("div", { className: "p-2", children: u.children.map((k, ae) => {
1614
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: m.children.map((k, ae) => {
1614
1615
  if (k.divider)
1615
1616
  return /* @__PURE__ */ e(
1616
1617
  "div",
@@ -1619,7 +1620,7 @@ const Vt = ({
1619
1620
  },
1620
1621
  `divider-${ae}`
1621
1622
  );
1622
- const ne = typeof n == "object" && n[u.value] && n[u.value].includes(
1623
+ const ne = typeof n == "object" && n[m.value] && n[m.value].includes(
1623
1624
  k.value
1624
1625
  ) || n === k.value;
1625
1626
  return /* @__PURE__ */ i(
@@ -1628,10 +1629,10 @@ const Vt = ({
1628
1629
  onClick: (te) => Z(
1629
1630
  te,
1630
1631
  k,
1631
- u.value
1632
+ m.value
1632
1633
  ),
1633
1634
  disabled: k.disabled,
1634
- className: d(
1635
+ className: u(
1635
1636
  "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",
1636
1637
  {
1637
1638
  "opacity-50 cursor-not-allowed": k.disabled
@@ -1645,7 +1646,7 @@ const Vt = ({
1645
1646
  k.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: k.description })
1646
1647
  ] })
1647
1648
  ] }),
1648
- f && ne && /* @__PURE__ */ e(Me, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1649
+ h && ne && /* @__PURE__ */ e(Me, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1649
1650
  ]
1650
1651
  },
1651
1652
  k.value
@@ -1653,16 +1654,16 @@ const Vt = ({
1653
1654
  }) })
1654
1655
  }
1655
1656
  )
1656
- ] }, u.value);
1657
+ ] }, m.value);
1657
1658
  }),
1658
1659
  (() => {
1659
- const u = r.reduce((E, w) => {
1660
+ const m = r.reduce((E, w) => {
1660
1661
  if (w.divider) return E;
1661
- const P = w.children ? w.children.filter((k) => !k.divider).length : 0;
1662
- return E + 1 + P;
1662
+ const j = w.children ? w.children.filter((k) => !k.divider).length : 0;
1663
+ return E + 1 + j;
1663
1664
  }, 0);
1664
- 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: [
1665
- u,
1665
+ return m > 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: [
1666
+ m,
1666
1667
  " options available"
1667
1668
  ] }) });
1668
1669
  })()
@@ -1670,12 +1671,12 @@ const Vt = ({
1670
1671
  ]
1671
1672
  }
1672
1673
  );
1673
- }, Ht = () => /* @__PURE__ */ e(J, { icon: Ne, size: "md", color: "current" }), Ut = ({ active: t }) => /* @__PURE__ */ e(J, { icon: Qe, size: "sm", className: t ? "text-text" : "text-text-subtle" }), qt = ({ active: t }) => /* @__PURE__ */ e(J, { icon: be, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Wt = () => /* @__PURE__ */ e(J, { icon: Pe, size: "md", color: "current" }), Kt = () => /* @__PURE__ */ e(J, { icon: ye, size: "md", color: "current" }), _t = () => /* @__PURE__ */ e(J, { icon: et, size: "md", color: "current" }), Gt = () => /* @__PURE__ */ e(J, { icon: tt, size: "md", color: "current" }), Be = () => /* @__PURE__ */ e(J, { icon: be, size: "md", color: "current" }), Jt = (t) => {
1674
+ }, Ht = () => /* @__PURE__ */ e(J, { icon: Ne, size: "md", color: "current" }), qt = ({ active: t }) => /* @__PURE__ */ e(J, { icon: Qe, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Ut = ({ active: t }) => /* @__PURE__ */ e(J, { icon: be, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Wt = () => /* @__PURE__ */ e(J, { icon: je, size: "md", color: "current" }), Kt = () => /* @__PURE__ */ e(J, { icon: ye, size: "md", color: "current" }), _t = () => /* @__PURE__ */ e(J, { icon: et, size: "md", color: "current" }), Gt = () => /* @__PURE__ */ e(J, { icon: tt, size: "md", color: "current" }), Be = () => /* @__PURE__ */ e(J, { icon: be, size: "md", color: "current" }), Jt = (t) => {
1674
1675
  const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
1675
1676
  t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
1676
1677
  };
1677
1678
  return t.type === "date" ? /* @__PURE__ */ e("div", { className: "flex items-center space-x-1 max-w-40", children: /* @__PURE__ */ e(
1678
- Ce,
1679
+ Se,
1679
1680
  {
1680
1681
  size: "sm",
1681
1682
  value: t.value,
@@ -1700,7 +1701,7 @@ const Vt = ({
1700
1701
  children: /* @__PURE__ */ e(
1701
1702
  "span",
1702
1703
  {
1703
- className: d(r(s.value) && "text-accent"),
1704
+ className: u(r(s.value) && "text-accent"),
1704
1705
  children: s.label
1705
1706
  }
1706
1707
  )
@@ -1725,33 +1726,33 @@ const Vt = ({
1725
1726
  searchPlaceholder: a = "Search...",
1726
1727
  filters: l = [],
1727
1728
  paginated: c = !1,
1728
- pageSizeOptions: f = [10, 25, 50, 100],
1729
- defaultPageSize: p = 10,
1729
+ pageSizeOptions: h = [10, 25, 50, 100],
1730
+ defaultPageSize: g = 10,
1730
1731
  actions: N = [],
1731
- onRowClick: h,
1732
- selectable: m = !1,
1733
- selectedRows: x = [],
1732
+ onRowClick: x,
1733
+ selectable: d = !1,
1734
+ selectedRows: f = [],
1734
1735
  onSelectionChange: v,
1735
- getRowKey: C = (U, V) => V,
1736
+ getRowKey: C = (q, V) => V,
1736
1737
  emptyContent: y,
1737
- hoverable: g = !0,
1738
- bordered: A = !1,
1738
+ hoverable: p = !0,
1739
+ bordered: D = !1,
1739
1740
  striped: $ = !1,
1740
1741
  className: _,
1741
1742
  rowClassName: M
1742
1743
  }) => {
1743
- const [U, V] = R(""), [I, W] = R({
1744
+ const [q, V] = R(""), [I, W] = R({
1744
1745
  column: null,
1745
1746
  direction: null
1746
1747
  }), [H, X] = R({
1747
1748
  page: 0,
1748
- pageSize: p
1749
+ pageSize: g
1749
1750
  }), Z = se(null), Q = me(() => {
1750
1751
  let o = t;
1751
- if (s && U.trim()) {
1752
+ if (s && q.trim()) {
1752
1753
  const z = r.filter(
1753
1754
  (F) => F.searchable !== !1
1754
- ), B = U.toLowerCase();
1755
+ ), B = q.toLowerCase();
1755
1756
  o = o.filter((F) => z.some((O) => {
1756
1757
  const re = typeof O.accessor == "function" ? O.accessor(F) : F[O.accessor];
1757
1758
  return String(re || "").toLowerCase().includes(B);
@@ -1765,7 +1766,7 @@ const Vt = ({
1765
1766
  return String(O || "") === z.value;
1766
1767
  }));
1767
1768
  }), o;
1768
- }, [t, U, r, s, l]), b = me(() => {
1769
+ }, [t, q, r, s, l]), b = me(() => {
1769
1770
  if (!I.column || !I.direction) return Q;
1770
1771
  const o = r.find((z) => z.id === I.column);
1771
1772
  return o ? [...Q].sort((z, B) => {
@@ -1773,7 +1774,7 @@ const Vt = ({
1773
1774
  let re = 0;
1774
1775
  return F < O ? re = -1 : F > O && (re = 1), I.direction === "desc" ? -re : re;
1775
1776
  }) : Q;
1776
- }, [Q, I, r]), u = me(() => {
1777
+ }, [Q, I, r]), m = me(() => {
1777
1778
  if (!c) return b;
1778
1779
  const o = H.page * H.pageSize, z = o + H.pageSize;
1779
1780
  return b.slice(o, z);
@@ -1784,46 +1785,46 @@ const Vt = ({
1784
1785
  [r]
1785
1786
  ), w = ce((o) => {
1786
1787
  X((z) => ({ ...z, page: o }));
1787
- }, []), P = ce((o) => {
1788
+ }, []), j = ce((o) => {
1788
1789
  X({ page: 0, pageSize: o });
1789
1790
  }, []), k = ce(
1790
1791
  (o, z) => {
1791
1792
  if (!v) return;
1792
1793
  const B = C(o, 0);
1793
- x.map((F, O) => C(F, O)), v(z ? [...x, o] : x.filter(
1794
- (F, O) => C(x[O], O) !== B
1794
+ f.map((F, O) => C(F, O)), v(z ? [...f, o] : f.filter(
1795
+ (F, O) => C(f[O], O) !== B
1795
1796
  ));
1796
1797
  },
1797
- [x, v, C]
1798
+ [f, v, C]
1798
1799
  ), ae = ce(
1799
1800
  (o) => {
1800
- v && v(o ? [...u] : []);
1801
+ v && v(o ? [...m] : []);
1801
1802
  },
1802
- [u, v]
1803
+ [m, v]
1803
1804
  );
1804
1805
  Y(() => {
1805
1806
  X((o) => ({ ...o, page: 0 }));
1806
- }, [U, I]), Y(() => {
1807
+ }, [q, I]), Y(() => {
1807
1808
  X((o) => ({ ...o, page: 0 }));
1808
1809
  }, [l.map((o) => o.value).join(",")]);
1809
- const ne = b.length, te = Math.ceil(ne / H.pageSize), G = H.page * H.pageSize + 1, S = Math.min(G + H.pageSize - 1, ne), T = u.length > 0 && u.every((o) => {
1810
+ const ne = b.length, te = Math.ceil(ne / H.pageSize), G = H.page * H.pageSize + 1, S = Math.min(G + H.pageSize - 1, ne), A = m.length > 0 && m.every((o) => {
1810
1811
  const z = C(o, 0);
1811
- return x.some(
1812
+ return f.some(
1812
1813
  (B, F) => C(B, F) === z
1813
1814
  );
1814
- }), L = u.some((o) => {
1815
+ }), L = m.some((o) => {
1815
1816
  const z = C(o, 0);
1816
- return x.some(
1817
+ return f.some(
1817
1818
  (B, F) => C(B, F) === z
1818
1819
  );
1819
- }), D = d(
1820
+ }), T = u(
1820
1821
  "w-full text-sm leading-5 text-text border-collapse",
1821
1822
  _
1822
- ), q = d("bg-surface"), j = d(
1823
+ ), U = u("bg-surface"), P = u(
1823
1824
  "text-text p-3 border-b border-border"
1824
- ), K = d("h-row-lg", {
1825
- "hover:bg-surface-sunk": g,
1826
- "cursor-pointer": h
1825
+ ), K = u("h-row-lg", {
1826
+ "hover:bg-surface-sunk": p,
1827
+ "cursor-pointer": x
1827
1828
  });
1828
1829
  return /* @__PURE__ */ i("div", { className: "space-y-4", children: [
1829
1830
  (s || l.length > 0) && /* @__PURE__ */ e("div", { className: "pt-4 pb-2", children: /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-4 items-start", children: [
@@ -1832,7 +1833,7 @@ const Vt = ({
1832
1833
  he,
1833
1834
  {
1834
1835
  placeholder: a,
1835
- value: U,
1836
+ value: q,
1836
1837
  onChange: (o) => V(o.target.value),
1837
1838
  startIcon: /* @__PURE__ */ e(Ht, {}),
1838
1839
  className: "max-w-sm"
@@ -1848,15 +1849,15 @@ const Vt = ({
1848
1849
  tableColumns: r.length
1849
1850
  }
1850
1851
  ) }),
1851
- /* @__PURE__ */ i("table", { ref: Z, className: d(D, "min-w-full"), children: [
1852
- /* @__PURE__ */ e("thead", { className: q, children: /* @__PURE__ */ i("tr", { children: [
1853
- m && /* @__PURE__ */ e("th", { className: d(j, "w-12"), children: /* @__PURE__ */ e(
1852
+ /* @__PURE__ */ i("table", { ref: Z, className: u(T, "min-w-full"), children: [
1853
+ /* @__PURE__ */ e("thead", { className: U, children: /* @__PURE__ */ i("tr", { children: [
1854
+ d && /* @__PURE__ */ e("th", { className: u(P, "w-12"), children: /* @__PURE__ */ e(
1854
1855
  "input",
1855
1856
  {
1856
1857
  type: "checkbox",
1857
- checked: T,
1858
+ checked: A,
1858
1859
  ref: (o) => {
1859
- o && (o.indeterminate = L && !T);
1860
+ o && (o.indeterminate = L && !A);
1860
1861
  },
1861
1862
  onChange: (o) => ae(o.target.checked),
1862
1863
  className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
@@ -1865,8 +1866,8 @@ const Vt = ({
1865
1866
  !n && r.map((o) => /* @__PURE__ */ e(
1866
1867
  "th",
1867
1868
  {
1868
- className: d(
1869
- j,
1869
+ className: u(
1870
+ P,
1870
1871
  "font-semibold text-xs text-text-muted uppercase tracking-label",
1871
1872
  "group",
1872
1873
  {
@@ -1885,19 +1886,19 @@ const Vt = ({
1885
1886
  o.sortable && /* @__PURE__ */ i(
1886
1887
  "div",
1887
1888
  {
1888
- className: d(
1889
+ className: u(
1889
1890
  "flex flex-col opacity-0 group-hover:opacity-100 transition-opacity",
1890
1891
  I.column === o.id && "opacity-100"
1891
1892
  ),
1892
1893
  children: [
1893
1894
  /* @__PURE__ */ e(
1894
- Ut,
1895
+ qt,
1895
1896
  {
1896
1897
  active: I.column === o.id && I.direction === "asc"
1897
1898
  }
1898
1899
  ),
1899
1900
  /* @__PURE__ */ e(
1900
- qt,
1901
+ Ut,
1901
1902
  {
1902
1903
  active: I.column === o.id && I.direction === "desc"
1903
1904
  }
@@ -1909,35 +1910,35 @@ const Vt = ({
1909
1910
  },
1910
1911
  o.id
1911
1912
  )),
1912
- N.length > 0 && /* @__PURE__ */ e("th", { className: d(j, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
1913
+ N.length > 0 && /* @__PURE__ */ e("th", { className: u(P, "w-20"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
1913
1914
  ] }) }),
1914
- /* @__PURE__ */ e("tbody", { children: u.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
1915
+ /* @__PURE__ */ e("tbody", { children: m.length === 0 || n ? !n && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
1915
1916
  "td",
1916
1917
  {
1917
- colSpan: r.length + (m ? 1 : 0) + (N.length > 0 ? 1 : 0),
1918
- className: d(
1919
- j,
1918
+ colSpan: r.length + (d ? 1 : 0) + (N.length > 0 ? 1 : 0),
1919
+ className: u(
1920
+ P,
1920
1921
  "text-center py-8 text-text-muted"
1921
1922
  ),
1922
1923
  children: y || "No data available"
1923
1924
  }
1924
- ) }) : u.map((o, z) => {
1925
- const B = C(o, z), F = x.some(
1925
+ ) }) : m.map((o, z) => {
1926
+ const B = C(o, z), F = f.some(
1926
1927
  (O, re) => C(O, re) === B
1927
1928
  );
1928
1929
  return /* @__PURE__ */ i(
1929
1930
  "tr",
1930
1931
  {
1931
- className: d(
1932
+ className: u(
1932
1933
  K,
1933
1934
  { "bg-accent-soft": F },
1934
1935
  M?.(o, z)
1935
1936
  ),
1936
1937
  onClick: (O) => {
1937
- O.stopPropagation(), h?.(o, z);
1938
+ O.stopPropagation(), x?.(o, z);
1938
1939
  },
1939
1940
  children: [
1940
- m && /* @__PURE__ */ e("td", { className: j, children: /* @__PURE__ */ e(
1941
+ d && /* @__PURE__ */ e("td", { className: P, children: /* @__PURE__ */ e(
1941
1942
  "input",
1942
1943
  {
1943
1944
  type: "checkbox",
@@ -1953,7 +1954,7 @@ const Vt = ({
1953
1954
  return /* @__PURE__ */ e(
1954
1955
  "td",
1955
1956
  {
1956
- className: d(j, {
1957
+ className: u(P, {
1957
1958
  "text-left": O.align === "left" || !O.align,
1958
1959
  "text-center": O.align === "center",
1959
1960
  "text-right": O.align === "right",
@@ -1965,7 +1966,7 @@ const Vt = ({
1965
1966
  O.id
1966
1967
  );
1967
1968
  }),
1968
- N.length > 0 && /* @__PURE__ */ e("td", { className: j, children: /* @__PURE__ */ e(
1969
+ N.length > 0 && /* @__PURE__ */ e("td", { className: P, children: /* @__PURE__ */ e(
1969
1970
  Vt,
1970
1971
  {
1971
1972
  trigger: /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
@@ -2011,9 +2012,9 @@ const Vt = ({
2011
2012
  "select",
2012
2013
  {
2013
2014
  value: H.pageSize,
2014
- onChange: (o) => P(Number(o.target.value)),
2015
+ onChange: (o) => j(Number(o.target.value)),
2015
2016
  className: "h-control-sm w-16 rounded-md border border-border bg-surface-input px-2 text-sm text-text",
2016
- children: f.map((o) => /* @__PURE__ */ e("option", { value: o, children: o }, o))
2017
+ children: h.map((o) => /* @__PURE__ */ e("option", { value: o, children: o }, o))
2017
2018
  }
2018
2019
  )
2019
2020
  ] })
@@ -2078,31 +2079,31 @@ const Vt = ({
2078
2079
  onTabChange: n,
2079
2080
  className: s
2080
2081
  }) => {
2081
- const [a, l] = R(t[0]?.id || ""), c = r || a, f = (p) => {
2082
- n ? n(p) : l(p);
2082
+ const [a, l] = R(t[0]?.id || ""), c = r || a, h = (g) => {
2083
+ n ? n(g) : l(g);
2083
2084
  };
2084
- return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((p) => /* @__PURE__ */ e(
2085
+ return /* @__PURE__ */ e("div", { className: u("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((g) => /* @__PURE__ */ e(
2085
2086
  "button",
2086
2087
  {
2087
- onClick: () => !p.disabled && f(p.id),
2088
- disabled: p.disabled,
2089
- className: d(
2088
+ onClick: () => !g.disabled && h(g.id),
2089
+ disabled: g.disabled,
2090
+ className: u(
2090
2091
  "border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
2091
2092
  {
2092
- "border-accent-border text-text": c === p.id,
2093
- "border-transparent text-text-muted hover:text-text": c !== p.id && !p.disabled,
2094
- "border-transparent text-disabled cursor-not-allowed": p.disabled
2093
+ "border-accent-border text-text": c === g.id,
2094
+ "border-transparent text-text-muted hover:text-text": c !== g.id && !g.disabled,
2095
+ "border-transparent text-disabled cursor-not-allowed": g.disabled
2095
2096
  }
2096
2097
  ),
2097
2098
  children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2098
- p.label,
2099
- p.badge && /* @__PURE__ */ e("span", { className: d(
2099
+ g.label,
2100
+ g.badge && /* @__PURE__ */ e("span", { className: u(
2100
2101
  "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
2101
- c === p.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
2102
- ), children: p.badge })
2102
+ c === g.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
2103
+ ), children: g.badge })
2103
2104
  ] })
2104
2105
  },
2105
- p.id
2106
+ g.id
2106
2107
  )) }) });
2107
2108
  }, Xt = ({
2108
2109
  items: t,
@@ -2113,14 +2114,14 @@ const Vt = ({
2113
2114
  size: l = "md",
2114
2115
  className: c
2115
2116
  }) => {
2116
- const [f, p] = R(
2117
+ const [h, g] = R(
2117
2118
  r || n || t[0]?.id || ""
2118
- ), N = n || f, h = (y) => {
2119
- s ? s(y) : p(y);
2120
- }, m = {
2119
+ ), N = n || h, x = (y) => {
2120
+ s ? s(y) : g(y);
2121
+ }, d = {
2121
2122
  activeTab: N,
2122
- setActiveTab: h
2123
- }, x = t.find((y) => y.id === N), v = d(
2123
+ setActiveTab: x
2124
+ }, f = t.find((y) => y.id === N), v = u(
2124
2125
  "flex",
2125
2126
  {
2126
2127
  "border-b border-border px-2": a === "default" || a === "underline",
@@ -2129,8 +2130,8 @@ const Vt = ({
2129
2130
  "space-x-8": a === "default" || a === "underline"
2130
2131
  },
2131
2132
  c
2132
- ), C = (y, g) => {
2133
- const A = "transition-colors duration-fast font-medium", $ = {
2133
+ ), C = (y, p) => {
2134
+ const D = "transition-colors duration-fast font-medium", $ = {
2134
2135
  "text-xs px-2 py-1": l === "sm",
2135
2136
  "text-sm px-3 py-2": l === "md",
2136
2137
  "text-base px-4 py-3": l === "lg"
@@ -2144,17 +2145,17 @@ const Vt = ({
2144
2145
  }, M = {
2145
2146
  "opacity-50 cursor-not-allowed": y.disabled,
2146
2147
  "cursor-pointer": !y.disabled
2147
- }, U = g ? {
2148
+ }, q = p ? {
2148
2149
  "border-accent-border text-text": a === "default" || a === "underline",
2149
2150
  "bg-surface text-text shadow-none": a === "pills"
2150
- } : {}, V = !g && !y.disabled ? {
2151
+ } : {}, V = !p && !y.disabled ? {
2151
2152
  "border-transparent text-text-muted hover:text-text": a === "default",
2152
2153
  "text-text-muted hover:text-text": a === "pills",
2153
2154
  "border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
2154
2155
  } : {};
2155
- return d(A, $, _, M, U, V);
2156
+ return u(D, $, _, M, q, V);
2156
2157
  };
2157
- return /* @__PURE__ */ e(Yt.Provider, { value: m, children: /* @__PURE__ */ i("div", { children: [
2158
+ return /* @__PURE__ */ e(Yt.Provider, { value: d, children: /* @__PURE__ */ i("div", { children: [
2158
2159
  /* @__PURE__ */ e("div", { className: v, role: "tablist", children: t.map((y) => /* @__PURE__ */ e(
2159
2160
  "button",
2160
2161
  {
@@ -2163,7 +2164,7 @@ const Vt = ({
2163
2164
  "aria-selected": N === y.id,
2164
2165
  "aria-controls": `tabpanel-${y.id}`,
2165
2166
  disabled: y.disabled,
2166
- onClick: () => !y.disabled && h(y.id),
2167
+ onClick: () => !y.disabled && x(y.id),
2167
2168
  className: C(y, N === y.id),
2168
2169
  children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2169
2170
  y.label,
@@ -2172,14 +2173,14 @@ const Vt = ({
2172
2173
  },
2173
2174
  y.id
2174
2175
  )) }),
2175
- x?.content && /* @__PURE__ */ e(
2176
+ f?.content && /* @__PURE__ */ e(
2176
2177
  "div",
2177
2178
  {
2178
2179
  role: "tabpanel",
2179
2180
  id: `tabpanel-${N}`,
2180
2181
  "aria-labelledby": `tab-${N}`,
2181
2182
  className: "mt-4",
2182
- children: x.content
2183
+ children: f.content
2183
2184
  }
2184
2185
  )
2185
2186
  ] }) });
@@ -2198,19 +2199,19 @@ function Fe({
2198
2199
  closeOnBackdropClick: a = !0,
2199
2200
  closeOnEscape: l = !0,
2200
2201
  className: c,
2201
- backdropClassName: f,
2202
- children: p,
2202
+ backdropClassName: h,
2203
+ children: g,
2203
2204
  footer: N,
2204
- showCloseButton: h = !0
2205
+ showCloseButton: x = !0
2205
2206
  }) {
2206
- const m = se(null), x = se(null);
2207
+ const d = se(null), f = se(null);
2207
2208
  Y(() => {
2208
2209
  if (!t || !l) return;
2209
2210
  const C = (y) => {
2210
2211
  y.key === "Escape" && r();
2211
2212
  };
2212
2213
  return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
2213
- }, [t, l, r]), Y(() => (t ? (x.current = document.activeElement, m.current && m.current.focus(), document.body.style.overflow = "hidden") : (x.current && x.current.focus(), document.body.style.overflow = ""), () => {
2214
+ }, [t, l, r]), Y(() => (t ? (f.current = document.activeElement, d.current && d.current.focus(), document.body.style.overflow = "hidden") : (f.current && f.current.focus(), document.body.style.overflow = ""), () => {
2214
2215
  document.body.style.overflow = "";
2215
2216
  }), [t]);
2216
2217
  const v = (C) => {
@@ -2219,18 +2220,18 @@ function Fe({
2219
2220
  return t ? /* @__PURE__ */ e(
2220
2221
  "div",
2221
2222
  {
2222
- className: d(
2223
+ className: u(
2223
2224
  "fixed inset-0 z-modal flex items-center justify-center p-4",
2224
2225
  "bg-scrim",
2225
2226
  // 'animate-fade-in',
2226
- f
2227
+ h
2227
2228
  ),
2228
2229
  onClick: v,
2229
2230
  children: /* @__PURE__ */ i(
2230
2231
  "div",
2231
2232
  {
2232
- ref: m,
2233
- className: d(
2233
+ ref: d,
2234
+ className: u(
2234
2235
  "relative w-full bg-surface rounded-lg shadow-modal",
2235
2236
  // 'animate-scale-in',
2236
2237
  "focus:outline-none",
@@ -2242,7 +2243,7 @@ function Fe({
2242
2243
  "aria-labelledby": n ? "modal-title" : void 0,
2243
2244
  tabIndex: -1,
2244
2245
  children: [
2245
- (n || h) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-6 pb-0", children: [
2246
+ (n || x) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-6 pb-0", children: [
2246
2247
  n && /* @__PURE__ */ e(
2247
2248
  "span",
2248
2249
  {
@@ -2251,7 +2252,7 @@ function Fe({
2251
2252
  children: n
2252
2253
  }
2253
2254
  ),
2254
- h && /* @__PURE__ */ e(
2255
+ x && /* @__PURE__ */ e(
2255
2256
  "button",
2256
2257
  {
2257
2258
  onClick: r,
@@ -2261,7 +2262,7 @@ function Fe({
2261
2262
  }
2262
2263
  )
2263
2264
  ] }),
2264
- /* @__PURE__ */ e("div", { className: "p-6", children: p }),
2265
+ /* @__PURE__ */ e("div", { className: "p-6", children: g }),
2265
2266
  N && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: N })
2266
2267
  ]
2267
2268
  }
@@ -2309,33 +2310,33 @@ const Qt = {
2309
2310
  align: a = "left",
2310
2311
  truncate: l = !1,
2311
2312
  italic: c = !1,
2312
- underline: f = !1,
2313
- lineHeight: p = "normal",
2313
+ underline: h = !1,
2314
+ lineHeight: g = "normal",
2314
2315
  as: N,
2315
- className: h,
2316
- children: m,
2317
- ...x
2316
+ className: x,
2317
+ children: d,
2318
+ ...f
2318
2319
  }) => {
2319
- const v = N || sr(t), C = t === "caption", y = t === "label", g = t === "code", A = d(
2320
+ const v = N || sr(t), C = t === "caption", y = t === "label", p = t === "code", D = u(
2320
2321
  "font-sans",
2321
2322
  // Variant — caption and label pin their own size/weight
2322
2323
  C && "text-xs text-text-subtle",
2323
2324
  y && "text-xs font-semibold uppercase tracking-label text-text-subtle",
2324
- g && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
2325
+ p && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
2325
2326
  // Size — only where the variant does not pin it
2326
- !C && !y && !g && Qt[r],
2327
+ !C && !y && !p && Qt[r],
2327
2328
  // Weight — label owns its weight
2328
2329
  !y && er[n],
2329
2330
  tr[s],
2330
2331
  rr[a],
2331
2332
  // Line height only overrides the body variant
2332
- t === "body" && nr[p],
2333
+ t === "body" && nr[g],
2333
2334
  c && "italic",
2334
- f && "underline",
2335
+ h && "underline",
2335
2336
  l && "truncate",
2336
- h
2337
+ x
2337
2338
  );
2338
- return /* @__PURE__ */ e(v, { className: A, ...x, children: m });
2339
+ return /* @__PURE__ */ e(v, { className: D, ...f, children: d });
2339
2340
  };
2340
2341
  function sr(t) {
2341
2342
  return {
@@ -2353,24 +2354,24 @@ const ar = ({
2353
2354
  error: a,
2354
2355
  disabled: l,
2355
2356
  accept: c,
2356
- onListFiles: f,
2357
- onListMounts: p,
2357
+ onListFiles: h,
2358
+ onListMounts: g,
2358
2359
  onUploadFile: N,
2359
- onDownloadFile: h,
2360
- onRegisterFile: m
2360
+ onDownloadFile: x,
2361
+ onRegisterFile: d
2361
2362
  }) => {
2362
- const [x, v] = R(!1), [C, y] = R([]), [g, A] = R(null), [$, _] = R("/"), [M, U] = R([]), [V, I] = R(!1), [W, H] = R(""), [X, Z] = R(
2363
+ const [f, v] = R(!1), [C, y] = R([]), [p, D] = R(null), [$, _] = R("/"), [M, q] = R([]), [V, I] = R(!1), [W, H] = R(""), [X, Z] = R(
2363
2364
  typeof t == "object" ? t : null
2364
- ), [Q, b] = R(!1), [u, E] = R(""), w = se(null);
2365
+ ), [Q, b] = R(!1), [m, E] = R(""), w = se(null);
2365
2366
  Y(() => {
2366
- x && P();
2367
- }, [x]), Y(() => {
2368
- x && g && k();
2369
- }, [x, g, $, W]);
2370
- const P = async () => {
2367
+ f && j();
2368
+ }, [f]), Y(() => {
2369
+ f && p && k();
2370
+ }, [f, p, $, W]);
2371
+ const j = async () => {
2371
2372
  I(!0);
2372
2373
  try {
2373
- const o = await p?.();
2374
+ const o = await g?.();
2374
2375
  o?.data && y(o.data);
2375
2376
  } catch (o) {
2376
2377
  console.error("Failed to load mounts", o);
@@ -2378,11 +2379,11 @@ const ar = ({
2378
2379
  I(!1);
2379
2380
  }
2380
2381
  }, k = async () => {
2381
- if (g) {
2382
+ if (p) {
2382
2383
  I(!0);
2383
2384
  try {
2384
- const o = await f?.({ mountId: g.id, name: W, path: $ });
2385
- o?.data && U(o.data);
2385
+ const o = await h?.({ mountId: p.id, name: W, path: $ });
2386
+ o?.data && q(o.data);
2386
2387
  } catch (o) {
2387
2388
  console.error("Failed to load files", o);
2388
2389
  } finally {
@@ -2414,14 +2415,14 @@ const ar = ({
2414
2415
  }
2415
2416
  }, ne = async (o) => {
2416
2417
  const z = o.target.files?.[0];
2417
- if (!(!z || !g)) {
2418
+ if (!(!z || !p)) {
2418
2419
  I(!0);
2419
2420
  try {
2420
2421
  const B = await z.arrayBuffer(), F = await N?.({
2421
2422
  file: new Uint8Array(B),
2422
2423
  filename: z.name,
2423
2424
  mimeType: z.type || "application/octet-stream",
2424
- mountId: g.id,
2425
+ mountId: p.id,
2425
2426
  path: $
2426
2427
  });
2427
2428
  if (F?.data) {
@@ -2435,17 +2436,17 @@ const ar = ({
2435
2436
  }
2436
2437
  }
2437
2438
  }, te = async () => {
2438
- if (!(!u || !g)) {
2439
+ if (!(!m || !p)) {
2439
2440
  I(!0);
2440
2441
  try {
2441
- const o = `${$}${u}/`;
2442
- m && (await m({
2443
- name: u,
2442
+ const o = `${$}${m}/`;
2443
+ d && (await d({
2444
+ name: m,
2444
2445
  type: "folder",
2445
2446
  path: $,
2446
2447
  mimeType: "application/x-directory",
2447
2448
  size: 0,
2448
- mountId: g.id,
2449
+ mountId: p.id,
2449
2450
  providerKey: o,
2450
2451
  ownerId: "me"
2451
2452
  }), await k()), b(!1), E("");
@@ -2458,7 +2459,7 @@ const ar = ({
2458
2459
  }, G = async (o) => {
2459
2460
  I(!0);
2460
2461
  try {
2461
- const z = await h?.(o.id);
2462
+ const z = await x?.(o.id);
2462
2463
  Z(o), r(o, z), v(!1);
2463
2464
  } catch (z) {
2464
2465
  console.error("Failed to download file", z);
@@ -2467,7 +2468,7 @@ const ar = ({
2467
2468
  }
2468
2469
  }, S = (o) => {
2469
2470
  o.stopPropagation(), Z(null), r(null);
2470
- }, T = me(() => {
2471
+ }, A = me(() => {
2471
2472
  const o = /* @__PURE__ */ new Set(), z = [];
2472
2473
  return M.forEach((B) => {
2473
2474
  if (B.type === "folder") {
@@ -2482,22 +2483,22 @@ const ar = ({
2482
2483
  };
2483
2484
  }, [M, $]), L = (o) => {
2484
2485
  _((z) => `${z}${o}/`);
2485
- }, D = () => {
2486
+ }, T = () => {
2486
2487
  const o = $.split("/").filter((z) => z !== "");
2487
2488
  o.pop(), o.length === 0 ? _("/") : _(`${o.join("/")}/`);
2488
- }, q = me(() => {
2489
- const o = T.folders.map((z) => ({
2489
+ }, U = me(() => {
2490
+ const o = A.folders.map((z) => ({
2490
2491
  id: `folder-${z}`,
2491
2492
  name: z,
2492
2493
  type: "folder"
2493
2494
  }));
2494
- return T.files.forEach((z) => {
2495
+ return A.files.forEach((z) => {
2495
2496
  o.push({
2496
2497
  ...z,
2497
2498
  type: "file"
2498
2499
  });
2499
2500
  }), o;
2500
- }, [T]), j = [
2501
+ }, [A]), P = [
2501
2502
  {
2502
2503
  id: "name",
2503
2504
  header: "Name",
@@ -2506,12 +2507,12 @@ const ar = ({
2506
2507
  /* @__PURE__ */ e(
2507
2508
  J,
2508
2509
  {
2509
- icon: z.type === "folder" ? De : we,
2510
+ icon: z.type === "folder" ? De : ke,
2510
2511
  size: "sm",
2511
2512
  color: z.type === "folder" ? "warning" : "secondary"
2512
2513
  }
2513
2514
  ),
2514
- /* @__PURE__ */ e("span", { className: d(z.type === "folder" && "font-medium"), children: o })
2515
+ /* @__PURE__ */ e("span", { className: u(z.type === "folder" && "font-medium"), children: o })
2515
2516
  ] })
2516
2517
  },
2517
2518
  {
@@ -2557,7 +2558,7 @@ const ar = ({
2557
2558
  header: "",
2558
2559
  accessor: "id",
2559
2560
  align: "right",
2560
- cell: (o, z) => /* @__PURE__ */ e(ee, { size: "sm", variant: "outline", onClick: () => A(z), children: "Open" })
2561
+ cell: (o, z) => /* @__PURE__ */ e(ee, { size: "sm", variant: "outline", onClick: () => D(z), children: "Open" })
2561
2562
  }
2562
2563
  ];
2563
2564
  return /* @__PURE__ */ i("div", { className: "space-y-1", children: [
@@ -2566,14 +2567,14 @@ const ar = ({
2566
2567
  "div",
2567
2568
  {
2568
2569
  onClick: () => !l && v(!0),
2569
- className: d(
2570
+ className: u(
2570
2571
  "flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
2571
2572
  "hover:border-border-strong bg-surface",
2572
2573
  a ? "border-danger-border" : "border-border",
2573
2574
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2574
2575
  ),
2575
2576
  children: [
2576
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(J, { icon: X ? we : $e, color: X ? "primary" : "secondary" }) }),
2577
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(J, { icon: X ? ke : $e, color: X ? "primary" : "secondary" }) }),
2577
2578
  /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: X ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: X.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2578
2579
  X && !l && /* @__PURE__ */ e(
2579
2580
  "button",
@@ -2590,11 +2591,11 @@ const ar = ({
2590
2591
  /* @__PURE__ */ e(
2591
2592
  Fe,
2592
2593
  {
2593
- open: x,
2594
+ open: f,
2594
2595
  onClose: () => {
2595
- v(!1), A(null), _("/"), b(!1);
2596
+ v(!1), D(null), _("/"), b(!1);
2596
2597
  },
2597
- title: g ? `Explorer: ${g.name}` : "Select Storage Mount",
2598
+ title: p ? `Explorer: ${p.name}` : "Select Storage Mount",
2598
2599
  size: "lg",
2599
2600
  children: /* @__PURE__ */ e(
2600
2601
  Xt,
@@ -2604,7 +2605,7 @@ const ar = ({
2604
2605
  {
2605
2606
  id: "remote",
2606
2607
  label: "Platform Storage",
2607
- content: /* @__PURE__ */ e("div", { className: "space-y-4", children: g ? /* @__PURE__ */ i(fe, { children: [
2608
+ content: /* @__PURE__ */ e("div", { className: "space-y-4", children: p ? /* @__PURE__ */ i(fe, { children: [
2608
2609
  /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
2609
2610
  /* @__PURE__ */ e(
2610
2611
  ee,
@@ -2612,9 +2613,9 @@ const ar = ({
2612
2613
  variant: "ghost",
2613
2614
  size: "sm",
2614
2615
  onClick: () => {
2615
- $ && $ !== "/" ? D() : A(null);
2616
+ $ && $ !== "/" ? T() : D(null);
2616
2617
  },
2617
- leftIcon: /* @__PURE__ */ e(J, { icon: ze, size: "xs" }),
2618
+ leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "xs" }),
2618
2619
  children: $ ? "Back" : "Back to Mounts"
2619
2620
  }
2620
2621
  ),
@@ -2671,7 +2672,7 @@ const ar = ({
2671
2672
  {
2672
2673
  size: "sm",
2673
2674
  placeholder: "Folder name",
2674
- value: u,
2675
+ value: m,
2675
2676
  onChange: (o) => E(o.target.value),
2676
2677
  autoFocus: !0
2677
2678
  }
@@ -2682,8 +2683,8 @@ const ar = ({
2682
2683
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2683
2684
  Te,
2684
2685
  {
2685
- data: q,
2686
- columns: j,
2686
+ data: U,
2687
+ columns: P,
2687
2688
  loading: V,
2688
2689
  emptyContent: "This folder is empty",
2689
2690
  onRowClick: (o) => o.type === "folder" ? L(o.name) : G(o)
@@ -2696,7 +2697,7 @@ const ar = ({
2696
2697
  columns: K,
2697
2698
  loading: V,
2698
2699
  emptyContent: "No storage mounts configured",
2699
- onRowClick: (o) => A(o)
2700
+ onRowClick: (o) => D(o)
2700
2701
  }
2701
2702
  ) }) })
2702
2703
  },
@@ -2704,7 +2705,7 @@ const ar = ({
2704
2705
  id: "local",
2705
2706
  label: "Local File",
2706
2707
  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: [
2707
- /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(J, { icon: we, size: "xl", color: "primary" }) }),
2708
+ /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(J, { icon: ke, size: "xl", color: "primary" }) }),
2708
2709
  /* @__PURE__ */ e(oe, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
2709
2710
  /* @__PURE__ */ i(oe, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
2710
2711
  "This file will be used directly in the form and will ",
@@ -2737,7 +2738,7 @@ const ar = ({
2737
2738
  md: "px-3 py-2 text-base",
2738
2739
  lg: "px-3 py-2 text-md",
2739
2740
  full: "px-3 py-2 text-md"
2740
- }, Se = de(
2741
+ }, ze = de(
2741
2742
  ({
2742
2743
  label: t,
2743
2744
  helperText: r,
@@ -2746,22 +2747,22 @@ const ar = ({
2746
2747
  fullWidth: a = !1,
2747
2748
  loading: l = !1,
2748
2749
  containerClassName: c,
2749
- labelClassName: f,
2750
- className: p,
2750
+ labelClassName: h,
2751
+ className: g,
2751
2752
  id: N,
2752
- rows: h = 4,
2753
- ...m
2754
- }, x) => {
2755
- const v = le.useId(), C = N || `textarea-${v}`, y = !!n, g = n || r ? `${C}-description` : void 0;
2756
- return /* @__PURE__ */ i("div", { className: d("flex flex-col", a && "w-full", c), children: [
2753
+ rows: x = 4,
2754
+ ...d
2755
+ }, f) => {
2756
+ const v = le.useId(), C = N || `textarea-${v}`, y = !!n, p = n || r ? `${C}-description` : void 0;
2757
+ return /* @__PURE__ */ i("div", { className: u("flex flex-col", a && "w-full", c), children: [
2757
2758
  t && /* @__PURE__ */ e(
2758
2759
  "label",
2759
2760
  {
2760
2761
  htmlFor: C,
2761
- className: d(
2762
+ className: u(
2762
2763
  Oe,
2763
2764
  y ? "text-danger-fg" : "text-text-subtle",
2764
- f
2765
+ h
2765
2766
  ),
2766
2767
  children: t
2767
2768
  }
@@ -2770,12 +2771,12 @@ const ar = ({
2770
2771
  /* @__PURE__ */ e(
2771
2772
  "textarea",
2772
2773
  {
2773
- ref: x,
2774
+ ref: f,
2774
2775
  id: C,
2775
- rows: h,
2776
+ rows: x,
2776
2777
  "aria-invalid": y || void 0,
2777
- "aria-describedby": g,
2778
- className: d(
2778
+ "aria-describedby": p,
2779
+ className: u(
2779
2780
  "block w-full resize-y rounded-md border bg-surface-input text-text",
2780
2781
  "transition-colors duration-fast ease-out",
2781
2782
  "placeholder:text-text-subtle",
@@ -2783,9 +2784,9 @@ const ar = ({
2783
2784
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
2784
2785
  lr[s],
2785
2786
  y ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
2786
- p
2787
+ g
2787
2788
  ),
2788
- ...m
2789
+ ...d
2789
2790
  }
2790
2791
  ),
2791
2792
  l && /* @__PURE__ */ e(
@@ -2799,15 +2800,15 @@ const ar = ({
2799
2800
  (n || r) && /* @__PURE__ */ e(
2800
2801
  "p",
2801
2802
  {
2802
- id: g,
2803
- className: d("mt-1 text-xs", y ? "text-danger-fg" : "text-text-subtle"),
2803
+ id: p,
2804
+ className: u("mt-1 text-xs", y ? "text-danger-fg" : "text-text-subtle"),
2804
2805
  children: n || r
2805
2806
  }
2806
2807
  )
2807
2808
  ] });
2808
2809
  }
2809
2810
  );
2810
- Se.displayName = "TextArea";
2811
+ ze.displayName = "TextArea";
2811
2812
  function Ae(t, r) {
2812
2813
  return r.split(".").reduce(
2813
2814
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
@@ -2818,8 +2819,8 @@ function or(t, r, n) {
2818
2819
  const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
2819
2820
  let l = a;
2820
2821
  for (let c = 0; c < s.length - 1; c++) {
2821
- const f = s[c], p = l[f];
2822
- l[f] = p && typeof p == "object" ? Array.isArray(p) ? [...p] : { ...p } : {}, l = l[f];
2822
+ const h = s[c], g = l[h];
2823
+ l[h] = g && typeof g == "object" ? Array.isArray(g) ? [...g] : { ...g } : {}, l = l[h];
2823
2824
  }
2824
2825
  return l[s[s.length - 1]] = n, a;
2825
2826
  }
@@ -2841,96 +2842,96 @@ const Qr = ({
2841
2842
  onChange: a,
2842
2843
  transform: l,
2843
2844
  validate: c,
2844
- submitButton: f = { label: "Submit", variant: "primary" },
2845
- cancelButton: p = { label: "Cancel", variant: "outline" },
2845
+ submitButton: h = { label: "Submit", variant: "primary" },
2846
+ cancelButton: g = { label: "Cancel", variant: "outline" },
2846
2847
  showButtons: N = !0,
2847
- layout: h = "vertical",
2848
- size: m = "md",
2849
- loading: x = !1,
2848
+ layout: x = "vertical",
2849
+ size: d = "md",
2850
+ loading: f = !1,
2850
2851
  className: v,
2851
2852
  ref: C,
2852
2853
  sdk: y
2853
2854
  }) => {
2854
- const [g, A] = R(r || {}), [$, _] = R({}), [M, U] = R({});
2855
+ const [p, D] = R(r || {}), [$, _] = R({}), [M, q] = R({});
2855
2856
  Y(() => {
2856
- r && A({ ...r });
2857
+ r && D({ ...r });
2857
2858
  }, [r]);
2858
2859
  const V = ce(
2859
- (b, u, E) => {
2860
- const w = t.flatMap((P) => P.items).find((P) => P.name === b);
2860
+ (b, m, E) => {
2861
+ const w = t.flatMap((j) => j.items).find((j) => j.name === b);
2861
2862
  if (!w) return null;
2862
- if (w.required && (u == null || u === ""))
2863
+ if (w.required && (m == null || m === ""))
2863
2864
  return `${w.label} is required`;
2864
2865
  if (w.type === "array") {
2865
- if (w.required && (!u || u.length === 0))
2866
+ if (w.required && (!m || m.length === 0))
2866
2867
  return `${w.label} cannot be empty.`;
2867
- if (u && !Array.isArray(u))
2868
+ if (m && !Array.isArray(m))
2868
2869
  return `${w.label} must be an array.`;
2869
- if (Array.isArray(u) && w.arrayFields) {
2870
- const P = [];
2870
+ if (Array.isArray(m) && w.arrayFields) {
2871
+ const j = [];
2871
2872
  let k = !1;
2872
- if (u.forEach((ae, ne) => {
2873
+ if (m.forEach((ae, ne) => {
2873
2874
  const te = {};
2874
2875
  for (const G of w.arrayFields) {
2875
2876
  const S = ae?.[G.name];
2876
2877
  if (G.required && (S == null || S === ""))
2877
2878
  te[G.name] = `${G.label} is required`, k = !0;
2878
2879
  else if (G.validator) {
2879
- const T = G.validator(S, ae);
2880
- T && (te[G.name] = T, k = !0);
2880
+ const A = G.validator(S, ae);
2881
+ A && (te[G.name] = A, k = !0);
2881
2882
  }
2882
2883
  }
2883
- P[ne] = te;
2884
+ j[ne] = te;
2884
2885
  }), k)
2885
- return JSON.stringify(P);
2886
+ return JSON.stringify(j);
2886
2887
  }
2887
2888
  }
2888
- return w.validator ? w.validator(u, E) : null;
2889
+ return w.validator ? w.validator(m, E) : null;
2889
2890
  },
2890
2891
  [t]
2891
2892
  ), I = ce(
2892
- (b, u) => {
2893
+ (b, m) => {
2893
2894
  let E = or(
2894
- g,
2895
+ p,
2895
2896
  b,
2896
- u
2897
+ m
2897
2898
  );
2898
- t.flatMap((k) => k.items).find((k) => k.name === b)?.removeIfEmpty && (u == null || u === "") && (E = cr(E, b)), A(E), U((k) => ({ ...k, [b]: !0 }));
2899
- const P = V(b, u, E);
2899
+ t.flatMap((k) => k.items).find((k) => k.name === b)?.removeIfEmpty && (m == null || m === "") && (E = cr(E, b)), D(E), q((k) => ({ ...k, [b]: !0 }));
2900
+ const j = V(b, m, E);
2900
2901
  _((k) => ({
2901
2902
  ...k,
2902
- [b]: P || ""
2903
+ [b]: j || ""
2903
2904
  })), a?.(E, b);
2904
2905
  },
2905
- [g, t, V, a]
2906
+ [p, t, V, a]
2906
2907
  ), W = ce(
2907
2908
  async (b) => {
2908
- if (b.preventDefault(), x) return;
2909
- const u = {}, E = t.flatMap((P) => P.items);
2910
- for (const P of E) {
2911
- if (P.hidden || P.conditional && !P.conditional(g))
2909
+ if (b.preventDefault(), f) return;
2910
+ const m = {}, E = t.flatMap((j) => j.items);
2911
+ for (const j of E) {
2912
+ if (j.hidden || j.conditional && !j.conditional(p))
2912
2913
  continue;
2913
2914
  const k = V(
2914
- P.name,
2915
- Ae(g, P.name),
2916
- g
2915
+ j.name,
2916
+ Ae(p, j.name),
2917
+ p
2917
2918
  );
2918
- k && (u[P.name] = k);
2919
+ k && (m[j.name] = k);
2919
2920
  }
2920
2921
  if (c) {
2921
- const P = c(g);
2922
- P && Object.assign(u, P);
2922
+ const j = c(p);
2923
+ j && Object.assign(m, j);
2923
2924
  }
2924
- if (_(u), Object.keys(u).some((P) => u[P]))
2925
+ if (_(m), Object.keys(m).some((j) => m[j]))
2925
2926
  return;
2926
- const w = l ? l(g) : g;
2927
- await n?.(g, w);
2927
+ const w = l ? l(p) : p;
2928
+ await n?.(p, w);
2928
2929
  },
2929
- [g, t, V, c, l, n, x]
2930
+ [p, t, V, c, l, n, f]
2930
2931
  ), H = ce(
2931
2932
  (b) => {
2932
- const u = Ae(g, b.name), E = M[b.name] ? $[b.name] : void 0, w = b.disabled || x, P = {
2933
- value: u || "",
2933
+ const m = Ae(p, b.name), E = M[b.name] ? $[b.name] : void 0, w = b.disabled || f, j = {
2934
+ value: m || "",
2934
2935
  disabled: w,
2935
2936
  required: b.required,
2936
2937
  placeholder: b.placeholder,
@@ -2946,30 +2947,30 @@ const Qr = ({
2946
2947
  return /* @__PURE__ */ e(
2947
2948
  he,
2948
2949
  {
2949
- ...P,
2950
+ ...j,
2950
2951
  onChange: (k) => I(b.name, k.target.value),
2951
2952
  type: b.textType || b.type,
2952
2953
  autoComplete: b.autocomplete,
2953
2954
  error: E,
2954
- size: m
2955
+ size: d
2955
2956
  }
2956
2957
  );
2957
2958
  case "textarea":
2958
2959
  return /* @__PURE__ */ e(
2959
- Se,
2960
+ ze,
2960
2961
  {
2961
- ...P,
2962
+ ...j,
2962
2963
  onChange: (k) => I(b.name, k.target.value),
2963
2964
  rows: 4,
2964
2965
  error: E,
2965
- size: m
2966
+ size: d
2966
2967
  }
2967
2968
  );
2968
2969
  case "select":
2969
2970
  return /* @__PURE__ */ e(
2970
2971
  pe,
2971
2972
  {
2972
- ...P,
2973
+ ...j,
2973
2974
  onChange: (k) => I(b.name, k),
2974
2975
  options: (b.options || []).map((k) => ({
2975
2976
  ...k,
@@ -2979,17 +2980,17 @@ const Qr = ({
2979
2980
  multiple: b.multiple,
2980
2981
  allowCreate: b.allowCreate,
2981
2982
  error: E,
2982
- size: m
2983
+ size: d
2983
2984
  }
2984
2985
  );
2985
2986
  case "checkbox":
2986
2987
  return /* @__PURE__ */ e(
2987
2988
  xe,
2988
2989
  {
2989
- ...P,
2990
- checked: !!u,
2990
+ ...j,
2991
+ checked: !!m,
2991
2992
  onChange: (k) => I(b.name, k.target.checked),
2992
- size: m
2993
+ size: d
2993
2994
  }
2994
2995
  );
2995
2996
  case "radio":
@@ -3004,7 +3005,7 @@ const Qr = ({
3004
3005
  type: "radio",
3005
3006
  name: b.name,
3006
3007
  value: k.value,
3007
- checked: u === k.value,
3008
+ checked: m === k.value,
3008
3009
  onChange: () => I(b.name, k.value),
3009
3010
  disabled: w || k.disabled,
3010
3011
  className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
@@ -3017,20 +3018,20 @@ const Qr = ({
3017
3018
  )) });
3018
3019
  case "date":
3019
3020
  return /* @__PURE__ */ e(
3020
- Ce,
3021
+ Se,
3021
3022
  {
3022
- ...P,
3023
- value: u ? new Date(u) : null,
3023
+ ...j,
3024
+ value: m ? new Date(m) : null,
3024
3025
  onChange: (k) => I(b.name, k),
3025
- size: m
3026
+ size: d
3026
3027
  }
3027
3028
  );
3028
3029
  case "file":
3029
3030
  return /* @__PURE__ */ e(
3030
3031
  ar,
3031
3032
  {
3032
- ...P,
3033
- value: u,
3033
+ ...j,
3034
+ value: m,
3034
3035
  onChange: (k) => I(b.name, k),
3035
3036
  error: E,
3036
3037
  onListFiles: (k) => y?.http.invoke({
@@ -3062,26 +3063,26 @@ const Qr = ({
3062
3063
  return /* @__PURE__ */ e(
3063
3064
  It,
3064
3065
  {
3065
- value: u || {},
3066
+ value: m || {},
3066
3067
  onChange: (k) => I(b.name, k),
3067
3068
  onListFolders: () => y?.http.invoke({
3068
3069
  method: "GET",
3069
3070
  action: "storage.mount"
3070
3071
  }),
3071
3072
  disabled: w,
3072
- size: m,
3073
+ size: d,
3073
3074
  placeholder: b.placeholder
3074
3075
  }
3075
3076
  );
3076
3077
  case "custom":
3077
3078
  return b.customComponent?.({
3078
- value: u,
3079
+ value: m,
3079
3080
  onChange: (k) => I(b.name, k),
3080
3081
  error: E,
3081
3082
  disabled: w
3082
3083
  });
3083
3084
  case "array": {
3084
- const k = u || [];
3085
+ const k = m || [];
3085
3086
  let ae = [];
3086
3087
  if (typeof E == "string" && E.startsWith("["))
3087
3088
  try {
@@ -3093,30 +3094,30 @@ const Qr = ({
3093
3094
  }, te = (S) => {
3094
3095
  I(
3095
3096
  b.name,
3096
- k.filter((T, L) => L !== S)
3097
+ k.filter((A, L) => L !== S)
3097
3098
  );
3098
- }, G = (S, T, L) => {
3099
- const D = [...k];
3100
- D[S] = {
3101
- ...D[S],
3102
- [T]: L
3103
- }, I(b.name, D);
3099
+ }, G = (S, A, L) => {
3100
+ const T = [...k];
3101
+ T[S] = {
3102
+ ...T[S],
3103
+ [A]: L
3104
+ }, I(b.name, T);
3104
3105
  };
3105
3106
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
3106
- k.map((S, T) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3107
+ k.map((S, A) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3107
3108
  /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: b.arrayFields?.map((L) => {
3108
- const D = ae?.[T]?.[L.name];
3109
+ const T = ae?.[A]?.[L.name];
3109
3110
  return /* @__PURE__ */ i(
3110
3111
  "div",
3111
3112
  {
3112
3113
  className: "flex flex-col gap-1",
3113
3114
  children: [
3114
- T === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3115
+ A === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3115
3116
  L.label,
3116
3117
  L.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3117
3118
  ] }),
3118
3119
  (() => {
3119
- const q = {
3120
+ const U = {
3120
3121
  value: S?.[L.name] || "",
3121
3122
  disabled: w,
3122
3123
  required: L.required,
@@ -3133,72 +3134,72 @@ const Qr = ({
3133
3134
  return /* @__PURE__ */ e(
3134
3135
  he,
3135
3136
  {
3136
- ...q,
3137
- onChange: (j) => G(
3138
- T,
3137
+ ...U,
3138
+ onChange: (P) => G(
3139
+ A,
3139
3140
  L.name,
3140
- j.target.value
3141
+ P.target.value
3141
3142
  ),
3142
3143
  type: L.textType || L.type,
3143
3144
  autoComplete: L.autocomplete,
3144
- error: D,
3145
- size: m
3145
+ error: T,
3146
+ size: d
3146
3147
  }
3147
3148
  );
3148
3149
  case "textarea":
3149
3150
  return /* @__PURE__ */ e(
3150
- Se,
3151
+ ze,
3151
3152
  {
3152
- ...q,
3153
- onChange: (j) => G(
3154
- T,
3153
+ ...U,
3154
+ onChange: (P) => G(
3155
+ A,
3155
3156
  L.name,
3156
- j.target.value
3157
+ P.target.value
3157
3158
  ),
3158
3159
  rows: 4,
3159
- error: D,
3160
- size: m
3160
+ error: T,
3161
+ size: d
3161
3162
  }
3162
3163
  );
3163
3164
  case "select":
3164
3165
  return /* @__PURE__ */ e(
3165
3166
  pe,
3166
3167
  {
3167
- ...q,
3168
- onChange: (j) => G(
3169
- T,
3168
+ ...U,
3169
+ onChange: (P) => G(
3170
+ A,
3170
3171
  L.name,
3171
- j
3172
+ P
3172
3173
  ),
3173
3174
  options: (L.options || []).map(
3174
- (j) => ({
3175
- ...j,
3176
- value: String(j.value)
3175
+ (P) => ({
3176
+ ...P,
3177
+ value: String(P.value)
3177
3178
  })
3178
3179
  ),
3179
3180
  searchable: L.searchable,
3180
3181
  multiple: L.multiple,
3181
3182
  allowCreate: L.allowCreate,
3182
- error: D,
3183
- size: m
3183
+ error: T,
3184
+ size: d
3184
3185
  }
3185
3186
  );
3186
3187
  case "checkbox":
3187
3188
  return /* @__PURE__ */ e(
3188
3189
  xe,
3189
3190
  {
3190
- ...q,
3191
+ ...U,
3191
3192
  checked: !!S?.[L.name],
3192
- onChange: (j) => G(
3193
- T,
3193
+ onChange: (P) => G(
3194
+ A,
3194
3195
  L.name,
3195
- j.target.checked
3196
+ P.target.checked
3196
3197
  ),
3197
- size: m
3198
+ size: d
3198
3199
  }
3199
3200
  );
3200
3201
  case "radio":
3201
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: L.options?.map((j) => /* @__PURE__ */ i(
3202
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: L.options?.map((P) => /* @__PURE__ */ i(
3202
3203
  "label",
3203
3204
  {
3204
3205
  className: "flex cursor-pointer items-center gap-2 text-base text-text",
@@ -3207,48 +3208,48 @@ const Qr = ({
3207
3208
  "input",
3208
3209
  {
3209
3210
  type: "radio",
3210
- name: `${b.name}.${T}.${L.name}`,
3211
- value: j.value,
3212
- checked: S?.[L.name] === j.value,
3211
+ name: `${b.name}.${A}.${L.name}`,
3212
+ value: P.value,
3213
+ checked: S?.[L.name] === P.value,
3213
3214
  onChange: () => G(
3214
- T,
3215
+ A,
3215
3216
  L.name,
3216
- j.value
3217
+ P.value
3217
3218
  ),
3218
- disabled: w || j.disabled,
3219
+ disabled: w || P.disabled,
3219
3220
  className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3220
3221
  }
3221
3222
  ),
3222
- j.label
3223
+ P.label
3223
3224
  ]
3224
3225
  },
3225
- j.value
3226
+ P.value
3226
3227
  )) });
3227
3228
  case "date": {
3228
- const j = S?.[L.name];
3229
+ const P = S?.[L.name];
3229
3230
  return /* @__PURE__ */ e(
3230
- Ce,
3231
+ Se,
3231
3232
  {
3232
- ...q,
3233
- value: j ? new Date(j) : null,
3233
+ ...U,
3234
+ value: P ? new Date(P) : null,
3234
3235
  onChange: (K) => G(
3235
- T,
3236
+ A,
3236
3237
  L.name,
3237
3238
  K
3238
3239
  ),
3239
- size: m
3240
+ size: d
3240
3241
  }
3241
3242
  );
3242
3243
  }
3243
3244
  case "custom":
3244
3245
  return L.customComponent?.({
3245
3246
  value: S?.[L.name],
3246
- onChange: (j) => G(
3247
- T,
3247
+ onChange: (P) => G(
3248
+ A,
3248
3249
  L.name,
3249
- j
3250
+ P
3250
3251
  ),
3251
- error: D,
3252
+ error: T,
3252
3253
  disabled: w
3253
3254
  });
3254
3255
  // Add other field types here as needed
@@ -3260,7 +3261,7 @@ const Qr = ({
3260
3261
  ] });
3261
3262
  }
3262
3263
  })(),
3263
- D && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: D })
3264
+ T && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: T })
3264
3265
  ]
3265
3266
  },
3266
3267
  L.name
@@ -3274,13 +3275,13 @@ const Qr = ({
3274
3275
  variant: "ghost",
3275
3276
  size: "md",
3276
3277
  "aria-label": `${b.label} verwijderen`,
3277
- onClick: () => te(T),
3278
+ onClick: () => te(A),
3278
3279
  disabled: w,
3279
- className: d("shrink-0", T === 0 && "mt-5"),
3280
+ className: u("shrink-0", A === 0 && "mt-5"),
3280
3281
  children: /* @__PURE__ */ e(st, { className: "size-icon-md" })
3281
3282
  }
3282
3283
  )
3283
- ] }, T)),
3284
+ ] }, A)),
3284
3285
  /* @__PURE__ */ i(
3285
3286
  ee,
3286
3287
  {
@@ -3302,14 +3303,14 @@ const Qr = ({
3302
3303
  return null;
3303
3304
  }
3304
3305
  },
3305
- [g, M, $, x, m, I]
3306
+ [p, M, $, f, d, I]
3306
3307
  ), X = ce(
3307
3308
  (b) => {
3308
- if (b.conditional && !b.conditional(g))
3309
+ if (b.conditional && !b.conditional(p))
3309
3310
  return null;
3310
- const u = b.items.filter((w) => !(w.hidden || w.conditional && !w.conditional(g)));
3311
- if (u.length === 0) return null;
3312
- const E = d(
3311
+ const m = b.items.filter((w) => !(w.hidden || w.conditional && !w.conditional(p)));
3312
+ if (m.length === 0) return null;
3313
+ const E = u(
3313
3314
  b.layout === "flex" ? "flex flex-wrap gap-3" : "grid gap-3",
3314
3315
  b.layout !== "flex" && {
3315
3316
  "grid-cols-1": !b.columns || b.columns === 1,
@@ -3328,10 +3329,10 @@ const Qr = ({
3328
3329
  /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children: b.title }),
3329
3330
  b.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: b.description })
3330
3331
  ] }),
3331
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: E, children: u.map((w) => (M[w.name] && $[w.name], /* @__PURE__ */ i(
3332
+ /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: E, children: m.map((w) => (M[w.name] && $[w.name], /* @__PURE__ */ i(
3332
3333
  "div",
3333
3334
  {
3334
- className: d(
3335
+ className: u(
3335
3336
  "flex min-w-0 flex-col gap-1.5",
3336
3337
  w.type === "checkbox" && "justify-center"
3337
3338
  ),
@@ -3354,17 +3355,17 @@ const Qr = ({
3354
3355
  b.id
3355
3356
  );
3356
3357
  },
3357
- [g, M, $, H]
3358
- ), Z = d(
3358
+ [p, M, $, H]
3359
+ ), Z = u(
3359
3360
  "overflow-hidden rounded-lg border border-border bg-surface",
3360
3361
  {
3361
- "max-w-md": m === "sm",
3362
- "max-w-2xl": m === "md",
3363
- "max-w-4xl": m === "lg",
3364
- "max-w-full": m === "full"
3362
+ "max-w-md": d === "sm",
3363
+ "max-w-2xl": d === "md",
3364
+ "max-w-4xl": d === "lg",
3365
+ "max-w-full": d === "full"
3365
3366
  },
3366
3367
  v
3367
- ), Q = m === "full" ? "md" : m;
3368
+ ), Q = d === "full" ? "md" : d;
3368
3369
  return /* @__PURE__ */ i("form", { ref: C, onSubmit: W, className: Z, children: [
3369
3370
  /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(X) }),
3370
3371
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle bg-surface-sunk px-5 py-3", children: N && /* @__PURE__ */ i(fe, { children: [
@@ -3373,24 +3374,24 @@ const Qr = ({
3373
3374
  ee,
3374
3375
  {
3375
3376
  type: "button",
3376
- variant: p.variant ?? "ghost",
3377
- size: p.size || Q,
3378
- disabled: p.disabled || x,
3377
+ variant: g.variant ?? "ghost",
3378
+ size: g.size || Q,
3379
+ disabled: g.disabled || f,
3379
3380
  onClick: s,
3380
- className: p.className,
3381
- children: p.label
3381
+ className: g.className,
3382
+ children: g.label
3382
3383
  }
3383
3384
  ),
3384
3385
  /* @__PURE__ */ e(
3385
3386
  ee,
3386
3387
  {
3387
3388
  type: "submit",
3388
- variant: f.variant,
3389
- size: f.size || Q,
3390
- disabled: f.disabled || x,
3391
- loading: x,
3392
- className: f.className,
3393
- children: f.label
3389
+ variant: h.variant,
3390
+ size: h.size || Q,
3391
+ disabled: h.disabled || f,
3392
+ loading: f,
3393
+ className: h.className,
3394
+ children: h.label
3394
3395
  }
3395
3396
  )
3396
3397
  ] }) })
@@ -3404,23 +3405,23 @@ function en({
3404
3405
  cancelLabel: a = "Annuleren",
3405
3406
  tone: l = "default",
3406
3407
  loading: c = !1,
3407
- onConfirm: f,
3408
- onCancel: p
3408
+ onConfirm: h,
3409
+ onCancel: g
3409
3410
  }) {
3410
3411
  return /* @__PURE__ */ e(
3411
3412
  Fe,
3412
3413
  {
3413
3414
  open: t,
3414
- onClose: p,
3415
+ onClose: g,
3415
3416
  title: r,
3416
3417
  size: "sm",
3417
3418
  footer: /* @__PURE__ */ i("div", { className: "flex w-full items-center justify-end gap-2", children: [
3418
- /* @__PURE__ */ e(ee, { variant: "ghost", onClick: p, disabled: c, children: a }),
3419
+ /* @__PURE__ */ e(ee, { variant: "ghost", onClick: g, disabled: c, children: a }),
3419
3420
  /* @__PURE__ */ e(
3420
3421
  ee,
3421
3422
  {
3422
3423
  variant: l === "danger" ? "destructive" : "primary",
3423
- onClick: f,
3424
+ onClick: h,
3424
3425
  loading: c,
3425
3426
  children: s
3426
3427
  }
@@ -3462,13 +3463,13 @@ function tn({
3462
3463
  dismissible: a = !1,
3463
3464
  onDismiss: l,
3464
3465
  className: c,
3465
- children: f,
3466
- ...p
3466
+ children: h,
3467
+ ...g
3467
3468
  }) {
3468
3469
  return /* @__PURE__ */ i(
3469
3470
  "span",
3470
3471
  {
3471
- className: d(
3472
+ className: u(
3472
3473
  // Base styles
3473
3474
  "inline-flex items-center font-medium rounded-full",
3474
3475
  // Variant styles
@@ -3477,19 +3478,19 @@ function tn({
3477
3478
  dr[r],
3478
3479
  c
3479
3480
  ),
3480
- ...p,
3481
+ ...g,
3481
3482
  children: [
3482
3483
  n && /* @__PURE__ */ e(
3483
3484
  "span",
3484
3485
  {
3485
- className: d(
3486
+ className: u(
3486
3487
  "w-2 h-2 rounded-full mr-1.5",
3487
3488
  ur[t]
3488
3489
  )
3489
3490
  }
3490
3491
  ),
3491
- s && /* @__PURE__ */ e("span", { className: d("flex-shrink-0", f && "mr-1"), children: s }),
3492
- f,
3492
+ s && /* @__PURE__ */ e("span", { className: u("flex-shrink-0", h && "mr-1"), children: s }),
3493
+ h,
3493
3494
  a && l && /* @__PURE__ */ e(
3494
3495
  "button",
3495
3496
  {
@@ -3515,19 +3516,19 @@ function rn({
3515
3516
  actions: a,
3516
3517
  card: l = !1,
3517
3518
  className: c,
3518
- ...f
3519
+ ...h
3519
3520
  }) {
3520
3521
  return /* @__PURE__ */ i(
3521
3522
  "div",
3522
3523
  {
3523
- className: d(
3524
+ className: u(
3524
3525
  "flex flex-col items-center gap-2.5 text-center",
3525
3526
  l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
3526
3527
  c
3527
3528
  ),
3528
- ...f,
3529
+ ...h,
3529
3530
  children: [
3530
- t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", mr[r]), children: t }),
3531
+ t != null && /* @__PURE__ */ e("span", { className: u("flex size-disc items-center justify-center rounded-full text-2xl", mr[r]), children: t }),
3531
3532
  /* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
3532
3533
  s && /* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-text-muted", children: s }),
3533
3534
  a && /* @__PURE__ */ e("div", { className: "flex gap-2 pt-1.5", children: a })
@@ -3539,7 +3540,7 @@ function nn({ children: t, className: r, ...n }) {
3539
3540
  return /* @__PURE__ */ e(
3540
3541
  "kbd",
3541
3542
  {
3542
- className: d(
3543
+ className: u(
3543
3544
  "inline-flex items-center rounded border border-border px-1.5 py-px text-xs font-medium leading-none text-text-muted",
3544
3545
  r
3545
3546
  ),
@@ -3564,12 +3565,12 @@ function sn({ value: t, variant: r = "accent", size: n = "md", className: s, ...
3564
3565
  "aria-valuenow": Math.round(l),
3565
3566
  "aria-valuemin": 0,
3566
3567
  "aria-valuemax": 100,
3567
- className: d("w-full overflow-hidden rounded-full bg-surface-hover", fr[n], s),
3568
+ className: u("w-full overflow-hidden rounded-full bg-surface-hover", fr[n], s),
3568
3569
  ...a,
3569
3570
  children: /* @__PURE__ */ e(
3570
3571
  "div",
3571
3572
  {
3572
- className: d("h-full rounded-full transition-[width] duration-300 ease-out", hr[r]),
3573
+ className: u("h-full rounded-full transition-[width] duration-300 ease-out", hr[r]),
3573
3574
  style: { width: `${l}%` }
3574
3575
  }
3575
3576
  )
@@ -3605,7 +3606,7 @@ function an({
3605
3606
  return /* @__PURE__ */ i(
3606
3607
  "div",
3607
3608
  {
3608
- className: d(
3609
+ className: u(
3609
3610
  "inline-flex items-center",
3610
3611
  s ? "flex-col space-y-2" : "",
3611
3612
  a
@@ -3615,7 +3616,7 @@ function an({
3615
3616
  /* @__PURE__ */ i(
3616
3617
  "svg",
3617
3618
  {
3618
- className: d(
3619
+ className: u(
3619
3620
  "animate-spin",
3620
3621
  xr[t],
3621
3622
  br[r]
@@ -3650,7 +3651,7 @@ function an({
3650
3651
  s && /* @__PURE__ */ e(
3651
3652
  "span",
3652
3653
  {
3653
- className: d(
3654
+ className: u(
3654
3655
  "text-text-muted",
3655
3656
  gr[t]
3656
3657
  ),
@@ -3689,7 +3690,7 @@ function ln({
3689
3690
  role: s ? "img" : void 0,
3690
3691
  "aria-label": s,
3691
3692
  "aria-hidden": s ? void 0 : !0,
3692
- className: d(
3693
+ className: u(
3693
3694
  "inline-block size-dot shrink-0",
3694
3695
  r === "round" ? "rounded-full" : "rounded-sm",
3695
3696
  pr[t],
@@ -3707,39 +3708,39 @@ function on({
3707
3708
  className: a
3708
3709
  }) {
3709
3710
  const l = t.indexOf(r), c = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
3710
- return n === "dots" ? /* @__PURE__ */ e("div", { ...c, className: d("flex items-center gap-1.5", a), children: t.map((f, p) => /* @__PURE__ */ e(
3711
+ return n === "dots" ? /* @__PURE__ */ e("div", { ...c, className: u("flex items-center gap-1.5", a), children: t.map((h, g) => /* @__PURE__ */ e(
3711
3712
  "span",
3712
3713
  {
3713
- className: d(
3714
+ className: u(
3714
3715
  "h-step-bar rounded-full transition-all duration-fast ease-out",
3715
- p === l ? "w-5 bg-accent" : "w-3.5",
3716
- p < l && "bg-border-strong",
3717
- p > l && "bg-border"
3716
+ g === l ? "w-5 bg-accent" : "w-3.5",
3717
+ g < l && "bg-border-strong",
3718
+ g > l && "bg-border"
3718
3719
  )
3719
3720
  },
3720
- f
3721
- )) }) : /* @__PURE__ */ e("div", { ...c, className: d("flex items-center gap-2", a), children: t.map((f, p) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
3721
+ h
3722
+ )) }) : /* @__PURE__ */ e("div", { ...c, className: u("flex items-center gap-2", a), children: t.map((h, g) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
3722
3723
  /* @__PURE__ */ e(
3723
3724
  "span",
3724
3725
  {
3725
- "aria-current": p === l ? "step" : void 0,
3726
- className: d(
3726
+ "aria-current": g === l ? "step" : void 0,
3727
+ className: u(
3727
3728
  "flex size-tile-sm items-center justify-center rounded-full text-xs font-medium",
3728
- p === l && "bg-accent text-accent-fg",
3729
- p < l && "bg-accent-soft text-accent",
3730
- p > l && "bg-surface-hover text-text-muted"
3729
+ g === l && "bg-accent text-accent-fg",
3730
+ g < l && "bg-accent-soft text-accent",
3731
+ g > l && "bg-surface-hover text-text-muted"
3731
3732
  ),
3732
- children: p + 1
3733
+ children: g + 1
3733
3734
  }
3734
3735
  ),
3735
- p < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
3736
- ] }, f)) });
3736
+ g < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
3737
+ ] }, h)) });
3737
3738
  }
3738
3739
  function cn({ title: t, icon: r = /* @__PURE__ */ e(lt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
3739
3740
  return /* @__PURE__ */ i(
3740
3741
  "div",
3741
3742
  {
3742
- className: d(
3743
+ className: u(
3743
3744
  "flex flex-col gap-2 rounded-xl border p-4",
3744
3745
  "border-assistant-border bg-assistant-soft",
3745
3746
  a
@@ -3768,7 +3769,7 @@ function yr(t) {
3768
3769
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
3769
3770
  }
3770
3771
  const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
3771
- const [l, c] = le.useState(!1), f = d(
3772
+ const [l, c] = le.useState(!1), h = u(
3772
3773
  "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-surface-hover-border-emphasis text-text",
3773
3774
  vr[n],
3774
3775
  s
@@ -3779,33 +3780,33 @@ const Nr = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
3779
3780
  src: r,
3780
3781
  alt: t ?? "",
3781
3782
  title: a ?? t,
3782
- className: d(f, "object-cover"),
3783
+ className: u(h, "object-cover"),
3783
3784
  onError: () => c(!0)
3784
3785
  }
3785
- ) : /* @__PURE__ */ e("span", { className: f, title: a ?? t, "aria-label": t, children: yr(t) });
3786
+ ) : /* @__PURE__ */ e("span", { className: h, title: a ?? t, "aria-label": t, children: yr(t) });
3786
3787
  }, Le = "ring-surface", wr = "ring-surface-accent", dn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
3787
3788
  if (t.length === 0) return null;
3788
3789
  const a = t.slice(0, r), l = t.length - a.length;
3789
- return /* @__PURE__ */ i("span", { className: d("inline-flex items-center", s), children: [
3790
- a.map((c, f) => /* @__PURE__ */ e(
3790
+ return /* @__PURE__ */ i("span", { className: u("inline-flex items-center", s), children: [
3791
+ a.map((c, h) => /* @__PURE__ */ e(
3791
3792
  Nr,
3792
3793
  {
3793
3794
  name: c.name,
3794
3795
  src: c.src,
3795
3796
  size: n,
3796
3797
  title: c.name ? c.seen === !1 ? `${c.name} — nog niet gelezen` : c.name : void 0,
3797
- className: d(
3798
- f > 0 && "-ml-2",
3798
+ className: u(
3799
+ h > 0 && "-ml-2",
3799
3800
  c.owner ? wr : Le,
3800
3801
  c.seen === !1 && "opacity-40"
3801
3802
  )
3802
3803
  },
3803
- c.id ?? `${c.name}-${f}`
3804
+ c.id ?? `${c.name}-${h}`
3804
3805
  )),
3805
3806
  l > 0 && /* @__PURE__ */ i(
3806
3807
  "span",
3807
3808
  {
3808
- className: d(
3809
+ className: u(
3809
3810
  "inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-surface-hover text-text-muted",
3810
3811
  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",
3811
3812
  Le
@@ -3834,7 +3835,7 @@ function un({ channel: t, children: r, size: n = "md", className: s, title: a })
3834
3835
  "span",
3835
3836
  {
3836
3837
  title: a,
3837
- className: d(
3838
+ className: u(
3838
3839
  "inline-flex shrink-0 items-center justify-center font-bold",
3839
3840
  kr[n],
3840
3841
  l.fg,
@@ -3853,23 +3854,23 @@ const mn = ({
3853
3854
  radius: a = "md",
3854
3855
  showLoading: l = !0,
3855
3856
  showError: c = !0,
3856
- fallback: f,
3857
- loadingContent: p,
3857
+ fallback: h,
3858
+ loadingContent: g,
3858
3859
  errorContent: N,
3859
- className: h,
3860
- onLoad: m,
3861
- onError: x,
3860
+ className: x,
3861
+ onLoad: d,
3862
+ onError: f,
3862
3863
  ...v
3863
3864
  }) => {
3864
- const [C, y] = R(!0), [g, A] = R(!1), [$, _] = R(t), M = (Z) => {
3865
- y(!1), A(!1), m?.(Z);
3866
- }, U = (Z) => {
3867
- if (y(!1), A(!0), f && $ !== f) {
3868
- _(f), A(!1), y(!0);
3865
+ const [C, y] = R(!0), [p, D] = R(!1), [$, _] = R(t), M = (Z) => {
3866
+ y(!1), D(!1), d?.(Z);
3867
+ }, q = (Z) => {
3868
+ if (y(!1), D(!0), h && $ !== h) {
3869
+ _(h), D(!1), y(!0);
3869
3870
  return;
3870
3871
  }
3871
- x?.(Z);
3872
- }, V = d(
3872
+ f?.(Z);
3873
+ }, V = u(
3873
3874
  "relative overflow-hidden bg-surface-hover",
3874
3875
  // Size variants
3875
3876
  {
@@ -3896,14 +3897,14 @@ const mn = ({
3896
3897
  "rounded-xl": a === "xl",
3897
3898
  "rounded-full": a === "full"
3898
3899
  },
3899
- h
3900
- ), I = d(
3900
+ x
3901
+ ), I = u(
3901
3902
  "w-full h-full object-cover transition-opacity duration-fast",
3902
3903
  {
3903
- "opacity-0": C || g,
3904
- "opacity-100": !C && !g
3904
+ "opacity-0": C || p,
3905
+ "opacity-100": !C && !p
3905
3906
  }
3906
- ), W = d(
3907
+ ), W = u(
3907
3908
  "absolute inset-0 flex items-center justify-center",
3908
3909
  "text-text-muted"
3909
3910
  ), H = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), X = /* @__PURE__ */ i("div", { className: "text-center", children: [
@@ -3919,11 +3920,11 @@ const mn = ({
3919
3920
  alt: r,
3920
3921
  className: I,
3921
3922
  onLoad: M,
3922
- onError: U
3923
+ onError: q
3923
3924
  }
3924
3925
  ),
3925
- C && l && /* @__PURE__ */ e("div", { className: W, children: p || H }),
3926
- g && c && /* @__PURE__ */ e("div", { className: W, children: N || X })
3926
+ C && l && /* @__PURE__ */ e("div", { className: W, children: g || H }),
3927
+ p && c && /* @__PURE__ */ e("div", { className: W, children: N || X })
3927
3928
  ] });
3928
3929
  };
3929
3930
  function fn({
@@ -3934,21 +3935,21 @@ function fn({
3934
3935
  renderItem: a,
3935
3936
  trailing: l,
3936
3937
  onSelect: c,
3937
- onActiveIndexChange: f,
3938
- isActive: p,
3938
+ onActiveIndexChange: h,
3939
+ isActive: g,
3939
3940
  unread: N,
3940
- dimmed: h,
3941
- groupBy: m,
3942
- groups: x,
3941
+ dimmed: x,
3942
+ groupBy: d,
3943
+ groups: f,
3943
3944
  renderGroupHeader: v,
3944
3945
  stickyGroupHeaders: C = !1,
3945
3946
  collapsibleGroups: y = !1,
3946
- hideGroupCount: g = !1,
3947
- selectable: A = !1,
3947
+ hideGroupCount: p = !1,
3948
+ selectable: D = !1,
3948
3949
  selectedItems: $ = [],
3949
3950
  onSelectionChange: _,
3950
3951
  bulkActions: M,
3951
- header: U,
3952
+ header: q,
3952
3953
  stickyHeader: V = !1,
3953
3954
  bordered: I = !1,
3954
3955
  emptyContent: W,
@@ -3957,35 +3958,35 @@ function fn({
3957
3958
  className: Z,
3958
3959
  "aria-label": Q
3959
3960
  }) {
3960
- const [b, u] = le.useState(
3961
+ const [b, m] = le.useState(
3961
3962
  () => Object.fromEntries(
3962
- (x ?? []).filter((D) => D.defaultCollapsed).map((D) => [D.id, !0])
3963
+ (f ?? []).filter((T) => T.defaultCollapsed).map((T) => [T.id, !0])
3963
3964
  )
3964
- ), E = le.useRef(null), w = (D) => {
3965
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(D.key)) return;
3966
- const j = Array.from(
3965
+ ), E = le.useRef(null), w = (T) => {
3966
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(T.key)) return;
3967
+ const P = Array.from(
3967
3968
  E.current?.querySelectorAll("li[data-list-row]") ?? []
3968
3969
  );
3969
- if (j.length === 0) return;
3970
- D.preventDefault();
3971
- const K = j.indexOf(document.activeElement), o = D.key === "Home" ? 0 : D.key === "End" ? j.length - 1 : D.key === "ArrowDown" ? (K + 1) % j.length : (K - 1 + j.length) % j.length;
3972
- j[o]?.focus();
3973
- }, P = (D, q) => r ? r(D, q) : q, k = (D) => $.includes(D), ae = (D, q) => {
3970
+ if (P.length === 0) return;
3971
+ T.preventDefault();
3972
+ const K = P.indexOf(document.activeElement), o = T.key === "Home" ? 0 : T.key === "End" ? P.length - 1 : T.key === "ArrowDown" ? (K + 1) % P.length : (K - 1 + P.length) % P.length;
3973
+ P[o]?.focus();
3974
+ }, j = (T, U) => r ? r(T, U) : U, k = (T) => $.includes(T), ae = (T, U) => {
3974
3975
  _ && _(
3975
- q ? [...$, D] : $.filter((j) => j !== D)
3976
+ U ? [...$, T] : $.filter((P) => P !== T)
3976
3977
  );
3977
- }, ne = (D) => _?.(D ? [...t] : []), te = d(
3978
+ }, ne = (T) => _?.(T ? [...t] : []), te = u(
3978
3979
  "flex flex-col",
3979
3980
  I && "overflow-hidden rounded-lg border border-border-subtle",
3980
3981
  Z
3981
3982
  );
3982
3983
  if (H)
3983
- return /* @__PURE__ */ e("div", { className: te, children: Array.from({ length: X }).map((D, q) => /* @__PURE__ */ i(
3984
+ return /* @__PURE__ */ e("div", { className: te, children: Array.from({ length: X }).map((T, U) => /* @__PURE__ */ i(
3984
3985
  "div",
3985
3986
  {
3986
- className: d(
3987
+ className: u(
3987
3988
  "flex animate-pulse items-center gap-3 px-4 py-2",
3988
- n === "divided" && q > 0 && "border-t border-border-subtle"
3989
+ n === "divided" && U > 0 && "border-t border-border-subtle"
3989
3990
  ),
3990
3991
  children: [
3991
3992
  /* @__PURE__ */ e("span", { className: "size-tile-sm shrink-0 rounded-md bg-surface-hover" }),
@@ -3994,12 +3995,12 @@ function fn({
3994
3995
  /* @__PURE__ */ e("span", { className: "h-3 w-8 shrink-0 rounded-sm bg-surface-hover" })
3995
3996
  ]
3996
3997
  },
3997
- `skeleton-${q}`
3998
+ `skeleton-${U}`
3998
3999
  )) });
3999
4000
  if (t.length === 0 && W)
4000
4001
  return /* @__PURE__ */ e("div", { className: te, children: W });
4001
- const G = t.length > 0 && $.length === t.length, S = $.length > 0 && !G, T = (D, q, j) => {
4002
- const K = p?.(D, q) ?? !1, o = N?.(D, q) ?? !1, z = h?.(D, q) ?? !1, B = A && k(D);
4002
+ const G = t.length > 0 && $.length === t.length, S = $.length > 0 && !G, A = (T, U, P) => {
4003
+ const K = g?.(T, U) ?? !1, o = N?.(T, U) ?? !1, z = x?.(T, U) ?? !1, B = D && k(T);
4003
4004
  return /* @__PURE__ */ i(
4004
4005
  "li",
4005
4006
  {
@@ -4008,27 +4009,27 @@ function fn({
4008
4009
  tabIndex: 0,
4009
4010
  "data-list-row": "",
4010
4011
  "aria-current": K || void 0,
4011
- onClick: () => c(D, q),
4012
- onFocus: () => f?.(q),
4012
+ onClick: () => c(T, U),
4013
+ onFocus: () => h?.(U),
4013
4014
  onKeyDown: (F) => {
4014
- F.key !== "Enter" && F.key !== " " || (F.preventDefault(), c(D, q));
4015
+ F.key !== "Enter" && F.key !== " " || (F.preventDefault(), c(T, U));
4015
4016
  }
4016
4017
  } : {},
4017
- className: d(
4018
+ className: u(
4018
4019
  "flex items-center gap-3 px-4 py-2 text-base",
4019
4020
  "transition-colors duration-fast ease-out",
4020
- n === "divided" && !j && "border-t border-border-subtle",
4021
+ n === "divided" && !P && "border-t border-border-subtle",
4021
4022
  c && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
4022
4023
  K || B ? "bg-accent-soft text-text" : c && "hover:bg-surface-hover",
4023
4024
  o && "font-bold",
4024
4025
  z && "opacity-55"
4025
4026
  ),
4026
4027
  children: [
4027
- A && /* @__PURE__ */ e("span", { onClick: (F) => F.stopPropagation(), children: /* @__PURE__ */ e(
4028
+ D && /* @__PURE__ */ e("span", { onClick: (F) => F.stopPropagation(), children: /* @__PURE__ */ e(
4028
4029
  xe,
4029
4030
  {
4030
- checked: k(D),
4031
- onChange: (F) => ae(D, F.target.checked),
4031
+ checked: k(T),
4032
+ onChange: (F) => ae(T, F.target.checked),
4032
4033
  "aria-label": "Rij selecteren"
4033
4034
  }
4034
4035
  ) }),
@@ -4039,31 +4040,31 @@ function fn({
4039
4040
  className: "mt-2 size-1.5 shrink-0 self-start rounded-full bg-border-strong"
4040
4041
  }
4041
4042
  ),
4042
- s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(D, q) }),
4043
- /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(D, q) : String(D) }),
4044
- l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(D, q) })
4043
+ s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(T, U) }),
4044
+ /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(T, U) : String(T) }),
4045
+ l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(T, U) })
4045
4046
  ]
4046
4047
  },
4047
- P(D, q)
4048
+ j(T, U)
4048
4049
  );
4049
4050
  }, L = (() => {
4050
- if (!m)
4051
- return t.map((K, o) => T(K, o, o === 0));
4052
- const D = /* @__PURE__ */ new Map();
4051
+ if (!d)
4052
+ return t.map((K, o) => A(K, o, o === 0));
4053
+ const T = /* @__PURE__ */ new Map();
4053
4054
  t.forEach((K, o) => {
4054
- const z = m(K, o);
4055
- D.has(z) || D.set(z, []), D.get(z).push({ item: K, index: o });
4055
+ const z = d(K, o);
4056
+ T.has(z) || T.set(z, []), T.get(z).push({ item: K, index: o });
4056
4057
  });
4057
- const q = x ?? [];
4058
+ const U = f ?? [];
4058
4059
  return [
4059
- ...q.filter((K) => D.has(K.id)),
4060
- ...[...D.keys()].filter((K) => !q.some((o) => o.id === K)).map((K) => ({ id: K }))
4060
+ ...U.filter((K) => T.has(K.id)),
4061
+ ...[...T.keys()].filter((K) => !U.some((o) => o.id === K)).map((K) => ({ id: K }))
4061
4062
  ].flatMap((K, o) => {
4062
- const z = D.get(K.id) ?? [], B = y && b[K.id], F = K.title ?? K.id, O = K.count ?? z.length, re = /* @__PURE__ */ e(
4063
+ const z = T.get(K.id) ?? [], B = y && b[K.id], F = K.title ?? K.id, O = K.count ?? z.length, re = /* @__PURE__ */ e(
4063
4064
  "li",
4064
4065
  {
4065
- onClick: y ? () => u((ie) => ({ ...ie, [K.id]: !ie[K.id] })) : void 0,
4066
- className: d(
4066
+ onClick: y ? () => m((ie) => ({ ...ie, [K.id]: !ie[K.id] })) : void 0,
4067
+ className: u(
4067
4068
  "flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
4068
4069
  "text-xs font-semibold uppercase tracking-label text-text-subtle",
4069
4070
  "border-border-subtle",
@@ -4079,14 +4080,14 @@ function fn({
4079
4080
  ye,
4080
4081
  {
4081
4082
  "aria-hidden": !0,
4082
- className: d(
4083
+ className: u(
4083
4084
  "size-icon-sm shrink-0 transition-transform duration-fast ease-out",
4084
4085
  !B && "rotate-90"
4085
4086
  )
4086
4087
  }
4087
4088
  ),
4088
4089
  /* @__PURE__ */ e("span", { children: F }),
4089
- !g && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: O })
4090
+ !p && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: O })
4090
4091
  ] })
4091
4092
  },
4092
4093
  `group-${K.id}`
@@ -4094,19 +4095,19 @@ function fn({
4094
4095
  return B ? [re] : [
4095
4096
  re,
4096
4097
  ...z.map(
4097
- ({ item: ie, index: He }, Ue) => T(ie, He, Ue === 0)
4098
+ ({ item: ie, index: He }, qe) => A(ie, He, qe === 0)
4098
4099
  )
4099
4100
  ];
4100
4101
  });
4101
4102
  })();
4102
4103
  return /* @__PURE__ */ i("div", { ref: E, className: te, onKeyDown: c ? w : void 0, children: [
4103
- A && $.length > 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
4104
+ D && $.length > 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-3 border-b border-border-subtle bg-surface-sunk px-4 py-2", children: [
4104
4105
  /* @__PURE__ */ e(
4105
4106
  xe,
4106
4107
  {
4107
4108
  checked: G,
4108
4109
  indeterminate: S,
4109
- onChange: (D) => ne(D.target.checked),
4110
+ onChange: (T) => ne(T.target.checked),
4110
4111
  "aria-label": "Alles selecteren"
4111
4112
  }
4112
4113
  ),
@@ -4116,15 +4117,15 @@ function fn({
4116
4117
  ] }),
4117
4118
  M && /* @__PURE__ */ e("div", { className: "ml-auto flex gap-2", children: M })
4118
4119
  ] }),
4119
- U && /* @__PURE__ */ e(
4120
+ q && /* @__PURE__ */ e(
4120
4121
  "div",
4121
4122
  {
4122
- className: d(
4123
+ className: u(
4123
4124
  "flex items-center gap-3 border-b border-border-subtle px-4 py-1.5",
4124
4125
  "text-xs font-semibold uppercase tracking-label text-text-subtle",
4125
4126
  V && "sticky top-0 z-20"
4126
4127
  ),
4127
- children: U
4128
+ children: q
4128
4129
  }
4129
4130
  ),
4130
4131
  /* @__PURE__ */ e("ul", { "aria-label": Q, className: "flex flex-col", children: L })
@@ -4140,7 +4141,7 @@ function hn({
4140
4141
  return /* @__PURE__ */ e(
4141
4142
  "div",
4142
4143
  {
4143
- className: d(
4144
+ className: u(
4144
4145
  // A bubble never spans the whole column; it narrows further from md,
4145
4146
  // where the thread itself is wide enough for the difference to matter.
4146
4147
  "min-w-0 max-w-bubble border md:max-w-bubble-md",
@@ -4167,8 +4168,8 @@ const Cr = {
4167
4168
  success: "border-border"
4168
4169
  };
4169
4170
  function xn({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4170
- return /* @__PURE__ */ i("div", { className: d("rounded-xl border bg-surface px-4 py-3.5", Sr[n], s), ...a, children: [
4171
- /* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Cr[n]), children: t }),
4171
+ return /* @__PURE__ */ i("div", { className: u("rounded-xl border bg-surface px-4 py-3.5", Sr[n], s), ...a, children: [
4172
+ /* @__PURE__ */ e("div", { className: u("text-2xl font-semibold", Cr[n]), children: t }),
4172
4173
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
4173
4174
  ] });
4174
4175
  }
@@ -4180,29 +4181,29 @@ const bn = ({
4180
4181
  actions: a = [],
4181
4182
  children: l,
4182
4183
  className: c,
4183
- backLabel: f = "Back",
4184
- backClassName: p,
4184
+ backLabel: h = "Back",
4185
+ backClassName: g,
4185
4186
  onBack: N,
4186
- editable: h = !1,
4187
- onTitleChange: m
4187
+ editable: x = !1,
4188
+ onTitleChange: d
4188
4189
  }) => {
4189
- const [x, v] = R(!1), [C, y] = R(r), g = se(null);
4190
+ const [f, v] = R(!1), [C, y] = R(r), p = se(null);
4190
4191
  Y(() => {
4191
4192
  y(r);
4192
4193
  }, [r]), Y(() => {
4193
- x && g.current && (g.current.focus(), g.current.select());
4194
- }, [x]);
4195
- const A = () => {
4196
- h && v(!0);
4194
+ f && p.current && (p.current.focus(), p.current.select());
4195
+ }, [f]);
4196
+ const D = () => {
4197
+ x && v(!0);
4197
4198
  }, $ = () => {
4198
- v(!1), C.trim() !== "" && C !== r && m ? m(C.trim()) : y(r);
4199
+ v(!1), C.trim() !== "" && C !== r && d ? d(C.trim()) : y(r);
4199
4200
  }, _ = (M) => {
4200
- M.key === "Enter" ? g.current?.blur() : M.key === "Escape" && (y(r), v(!1));
4201
+ M.key === "Enter" ? p.current?.blur() : M.key === "Escape" && (y(r), v(!1));
4201
4202
  };
4202
4203
  return /* @__PURE__ */ i(
4203
4204
  "div",
4204
4205
  {
4205
- className: d(
4206
+ className: u(
4206
4207
  "p-5 pb-3",
4207
4208
  // App-bar treatment: own background, full-bleed, closed with a rule.
4208
4209
  t && "bg-surface border-b border-border",
@@ -4211,12 +4212,12 @@ const bn = ({
4211
4212
  children: [
4212
4213
  /* @__PURE__ */ i("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
4213
4214
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-2 text-text", children: [
4214
- N && /* @__PURE__ */ e(ee, { variant: "secondary", onClick: N, leftIcon: /* @__PURE__ */ e(J, { icon: ze, size: "sm" }), iconOnly: !0 }),
4215
+ N && /* @__PURE__ */ e(ee, { variant: "secondary", onClick: N, leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "sm" }), iconOnly: !0 }),
4215
4216
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
4216
- x ? /* @__PURE__ */ e(
4217
+ f ? /* @__PURE__ */ e(
4217
4218
  "input",
4218
4219
  {
4219
- ref: g,
4220
+ ref: p,
4220
4221
  type: "text",
4221
4222
  value: C,
4222
4223
  onChange: (M) => y(M.target.value),
@@ -4228,21 +4229,21 @@ const bn = ({
4228
4229
  /* @__PURE__ */ e(
4229
4230
  "h2",
4230
4231
  {
4231
- onClick: A,
4232
- className: d(
4232
+ onClick: D,
4233
+ className: u(
4233
4234
  "text-2xl font-semibold truncate",
4234
- h && "cursor-pointer"
4235
+ x && "cursor-pointer"
4235
4236
  ),
4236
- title: h ? "Klik om te bewerken" : void 0,
4237
+ title: x ? "Klik om te bewerken" : void 0,
4237
4238
  children: r
4238
4239
  }
4239
4240
  ),
4240
4241
  n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
4241
- h && /* @__PURE__ */ e(
4242
+ x && /* @__PURE__ */ e(
4242
4243
  ct,
4243
4244
  {
4244
4245
  size: 15,
4245
- onClick: A,
4246
+ onClick: D,
4246
4247
  className: "shrink-0 cursor-pointer text-text-muted opacity-0 group-hover:opacity-100 transition-opacity"
4247
4248
  }
4248
4249
  )
@@ -4252,7 +4253,7 @@ const bn = ({
4252
4253
  ] }) }),
4253
4254
  a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
4254
4255
  (M) => M.render ? /* @__PURE__ */ e(le.Fragment, { children: M.render() }, M.id) : M.splitOptions && M.splitOptions.length > 0 ? /* @__PURE__ */ e(
4255
- je,
4256
+ Pe,
4256
4257
  {
4257
4258
  label: M.label,
4258
4259
  onClick: M.onClick,
@@ -4266,8 +4267,8 @@ const bn = ({
4266
4267
  ee,
4267
4268
  {
4268
4269
  variant: M.variant ?? "secondary",
4269
- onClick: (U) => {
4270
- U.stopPropagation(), U.target.blur(), M.onClick();
4270
+ onClick: (q) => {
4271
+ q.stopPropagation(), q.target.blur(), M.onClick();
4271
4272
  },
4272
4273
  disabled: M.disabled,
4273
4274
  leftIcon: M.icon,
@@ -4287,12 +4288,12 @@ const bn = ({
4287
4288
  backLabel: n = "Back",
4288
4289
  className: s,
4289
4290
  children: a
4290
- }) => /* @__PURE__ */ i("div", { className: d("flex items-center gap-2 mb-3", s), children: [
4291
- r && /* @__PURE__ */ e(ee, { variant: "ghost", size: "sm", onClick: r, leftIcon: /* @__PURE__ */ e(ze, { size: 14 }), children: n }),
4291
+ }) => /* @__PURE__ */ i("div", { className: u("flex items-center gap-2 mb-3", s), children: [
4292
+ r && /* @__PURE__ */ e(ee, { variant: "ghost", size: "sm", onClick: r, leftIcon: /* @__PURE__ */ e(Ee, { size: 14 }), children: n }),
4292
4293
  a && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: a }),
4293
- t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-2", !a && "ml-auto"), children: t.map(
4294
+ t.length > 0 && /* @__PURE__ */ e("div", { className: u("flex flex-wrap gap-2", !a && "ml-auto"), children: t.map(
4294
4295
  (l) => l.splitOptions && l.splitOptions.length > 0 ? /* @__PURE__ */ e(
4295
- je,
4296
+ Pe,
4296
4297
  {
4297
4298
  label: l.label,
4298
4299
  onClick: l.onClick,
@@ -4320,7 +4321,7 @@ const bn = ({
4320
4321
  ] });
4321
4322
  function pn({ label: t, trailing: r, align: n = "center", className: s }) {
4322
4323
  const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
4323
- return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: d("flex items-center gap-3 py-2", s), children: [
4324
+ return !t && !r ? /* @__PURE__ */ e("div", { className: u("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: u("flex items-center gap-3 py-2", s), children: [
4324
4325
  n === "center" && a,
4325
4326
  /* @__PURE__ */ e("span", { className: "shrink-0 text-xs font-medium text-text-muted", children: t }),
4326
4327
  a,
@@ -4338,7 +4339,7 @@ function vn({
4338
4339
  return /* @__PURE__ */ i(
4339
4340
  "div",
4340
4341
  {
4341
- className: d(
4342
+ className: u(
4342
4343
  "flex items-center justify-between gap-4 py-2",
4343
4344
  s && "rounded-lg border border-border px-3",
4344
4345
  a && "opacity-50",
@@ -4362,7 +4363,7 @@ function yn({
4362
4363
  children: a,
4363
4364
  className: l
4364
4365
  }) {
4365
- return /* @__PURE__ */ i("section", { className: d("flex flex-col gap-2", l), children: [
4366
+ return /* @__PURE__ */ i("section", { className: u("flex flex-col gap-2", l), children: [
4366
4367
  /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
4367
4368
  t && /* @__PURE__ */ e(J, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
4368
4369
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
@@ -4371,7 +4372,7 @@ function yn({
4371
4372
  ] }),
4372
4373
  s && /* @__PURE__ */ e("div", { className: "shrink-0", children: s })
4373
4374
  ] }),
4374
- /* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
4375
+ /* @__PURE__ */ e("div", { className: u("flex flex-col", t && "pl-6"), children: a })
4375
4376
  ] });
4376
4377
  }
4377
4378
  function Nn({ label: t, dotColor: r, onClick: n, className: s }) {
@@ -4380,7 +4381,7 @@ function Nn({ label: t, dotColor: r, onClick: n, className: s }) {
4380
4381
  {
4381
4382
  type: "button",
4382
4383
  onClick: n,
4383
- className: d(
4384
+ className: u(
4384
4385
  "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",
4385
4386
  s
4386
4387
  ),
@@ -4404,26 +4405,26 @@ const wn = ({
4404
4405
  size: n = "md",
4405
4406
  className: s
4406
4407
  }) => {
4407
- const a = (h) => {
4408
- if (!h) return "-";
4408
+ const a = (x) => {
4409
+ if (!x) return "-";
4409
4410
  try {
4410
- return new Date(h).toLocaleDateString("nl-NL", {
4411
+ return new Date(x).toLocaleDateString("nl-NL", {
4411
4412
  year: "numeric",
4412
4413
  month: "long",
4413
4414
  day: "numeric"
4414
4415
  });
4415
4416
  } catch {
4416
- return String(h);
4417
+ return String(x);
4417
4418
  }
4418
- }, l = (h) => h ? "Ja" : "Nee", c = (h, m) => {
4419
- if (!m) return String(h || "-");
4420
- const x = m.find((v) => v.value === h);
4421
- return x ? x.label : String(h || "-");
4422
- }, f = ce(
4423
- (h) => {
4424
- const m = zr(r, h.name);
4425
- if (h.type === "array") {
4426
- const v = m;
4419
+ }, l = (x) => x ? "Ja" : "Nee", c = (x, d) => {
4420
+ if (!d) return String(x || "-");
4421
+ const f = d.find((v) => v.value === x);
4422
+ return f ? f.label : String(x || "-");
4423
+ }, h = ce(
4424
+ (x) => {
4425
+ const d = zr(r, x.name);
4426
+ if (x.type === "array") {
4427
+ const v = d;
4427
4428
  return !v || v.length === 0 ? /* @__PURE__ */ e(
4428
4429
  oe,
4429
4430
  {
@@ -4445,53 +4446,53 @@ const wn = ({
4445
4446
  weight: "medium",
4446
4447
  className: "text-text-muted",
4447
4448
  children: [
4448
- h.label,
4449
+ x.label,
4449
4450
  " ",
4450
4451
  y + 1
4451
4452
  ]
4452
4453
  }
4453
4454
  ) }),
4454
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((g) => {
4455
- const A = C?.[g.name];
4455
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: x.arrayFields?.map((p) => {
4456
+ const D = C?.[p.name];
4456
4457
  let $ = "-";
4457
- switch (g.type) {
4458
+ switch (p.type) {
4458
4459
  case "text":
4459
4460
  case "email":
4460
4461
  case "number":
4461
4462
  case "tel":
4462
4463
  case "url":
4463
4464
  case "textarea":
4464
- $ = A || "-";
4465
+ $ = D || "-";
4465
4466
  break;
4466
4467
  case "select":
4467
4468
  case "radio":
4468
4469
  $ = c(
4469
- A,
4470
- g.options
4470
+ D,
4471
+ p.options
4471
4472
  );
4472
4473
  break;
4473
4474
  case "checkbox":
4474
- $ = l(A);
4475
+ $ = l(D);
4475
4476
  break;
4476
4477
  case "date":
4477
- $ = a(A);
4478
+ $ = a(D);
4478
4479
  break;
4479
4480
  case "custom":
4480
- $ = g.customComponent?.({
4481
- value: A
4481
+ $ = p.customComponent?.({
4482
+ value: D
4482
4483
  });
4483
4484
  break;
4484
4485
  default:
4485
- $ = String(A || "-");
4486
+ $ = String(D || "-");
4486
4487
  }
4487
- return g.format && ($ = g.format(A, C)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
4488
+ return p.format && ($ = p.format(D, C)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
4488
4489
  /* @__PURE__ */ e(
4489
4490
  oe,
4490
4491
  {
4491
4492
  variant: "label",
4492
4493
  size: "xs",
4493
4494
  className: "text-text-muted",
4494
- children: g.label
4495
+ children: p.label
4495
4496
  }
4496
4497
  ),
4497
4498
  /* @__PURE__ */ e(
@@ -4503,17 +4504,17 @@ const wn = ({
4503
4504
  children: $
4504
4505
  }
4505
4506
  )
4506
- ] }, g.name);
4507
+ ] }, p.name);
4507
4508
  }) })
4508
4509
  ]
4509
4510
  },
4510
4511
  y
4511
4512
  )) });
4512
4513
  }
4513
- if (h.type === "custom" && h.customComponent)
4514
- return h.customComponent({ value: m });
4515
- if (h.format) {
4516
- const v = h.format(m, r);
4514
+ if (x.type === "custom" && x.customComponent)
4515
+ return x.customComponent({ value: d });
4516
+ if (x.format) {
4517
+ const v = x.format(d, r);
4517
4518
  return /* @__PURE__ */ e(
4518
4519
  oe,
4519
4520
  {
@@ -4524,31 +4525,31 @@ const wn = ({
4524
4525
  }
4525
4526
  );
4526
4527
  }
4527
- let x = "-";
4528
- switch (h.type) {
4528
+ let f = "-";
4529
+ switch (x.type) {
4529
4530
  case "text":
4530
4531
  case "email":
4531
4532
  case "password":
4532
4533
  case "number":
4533
4534
  case "tel":
4534
4535
  case "url":
4535
- x = m ? String(m) : "-";
4536
+ f = d ? String(d) : "-";
4536
4537
  break;
4537
4538
  case "textarea":
4538
- x = m ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(m || "-") }) : "-";
4539
+ f = d ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(d || "-") }) : "-";
4539
4540
  break;
4540
4541
  case "select":
4541
4542
  case "radio":
4542
- x = c(m, h.options);
4543
+ f = c(d, x.options);
4543
4544
  break;
4544
4545
  case "checkbox":
4545
- x = l(m);
4546
+ f = l(d);
4546
4547
  break;
4547
4548
  case "date":
4548
- x = a(m);
4549
+ f = a(d);
4549
4550
  break;
4550
4551
  default:
4551
- x = m ? String(m) : "-";
4552
+ f = d ? String(d) : "-";
4552
4553
  }
4553
4554
  return /* @__PURE__ */ e(
4554
4555
  oe,
@@ -4556,30 +4557,30 @@ const wn = ({
4556
4557
  variant: "body",
4557
4558
  size: "sm",
4558
4559
  className: "text-text",
4559
- children: x
4560
+ children: f
4560
4561
  }
4561
4562
  );
4562
4563
  },
4563
4564
  [r]
4564
- ), p = ce(
4565
- (h) => {
4566
- if (h.conditional && !h.conditional(r))
4565
+ ), g = ce(
4566
+ (x) => {
4567
+ if (x.conditional && !x.conditional(r))
4567
4568
  return null;
4568
- const m = h.items.filter((v) => !(v.hidden || v.conditional && !v.conditional(r)));
4569
- if (m.length === 0) return null;
4570
- const x = d(
4569
+ const d = x.items.filter((v) => !(v.hidden || v.conditional && !v.conditional(r)));
4570
+ if (d.length === 0) return null;
4571
+ const f = u(
4571
4572
  "space-y-4",
4572
4573
  {
4573
- "grid gap-4": h.layout === "grid",
4574
- "flex flex-wrap gap-4": h.layout === "flex"
4574
+ "grid gap-4": x.layout === "grid",
4575
+ "flex flex-wrap gap-4": x.layout === "flex"
4575
4576
  },
4576
- h.layout === "grid" && {
4577
- "grid-cols-1": !h.columns || h.columns === 1,
4578
- "grid-cols-2": h.columns === 2,
4579
- "grid-cols-3": h.columns === 3,
4580
- "grid-cols-4": h.columns === 4
4577
+ x.layout === "grid" && {
4578
+ "grid-cols-1": !x.columns || x.columns === 1,
4579
+ "grid-cols-2": x.columns === 2,
4580
+ "grid-cols-3": x.columns === 3,
4581
+ "grid-cols-4": x.columns === 4
4581
4582
  },
4582
- h.className
4583
+ x.className
4583
4584
  );
4584
4585
  return /* @__PURE__ */ i(
4585
4586
  "div",
@@ -4594,20 +4595,20 @@ const wn = ({
4594
4595
  size: "lg",
4595
4596
  weight: "semibold",
4596
4597
  className: "text-text",
4597
- children: h.title
4598
+ children: x.title
4598
4599
  }
4599
4600
  ),
4600
- h.description && /* @__PURE__ */ e(
4601
+ x.description && /* @__PURE__ */ e(
4601
4602
  oe,
4602
4603
  {
4603
4604
  variant: "body",
4604
4605
  size: "sm",
4605
4606
  className: "text-text-muted mt-1",
4606
- children: h.description
4607
+ children: x.description
4607
4608
  }
4608
4609
  )
4609
4610
  ] }),
4610
- /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: x, children: m.map((v) => /* @__PURE__ */ i(
4611
+ /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: f, children: d.map((v) => /* @__PURE__ */ i(
4611
4612
  "div",
4612
4613
  {
4613
4614
  className: "space-y-1",
@@ -4625,18 +4626,18 @@ const wn = ({
4625
4626
  children: v.label
4626
4627
  }
4627
4628
  ),
4628
- f(v)
4629
+ h(v)
4629
4630
  ]
4630
4631
  },
4631
4632
  v.name
4632
4633
  )) }) })
4633
4634
  ]
4634
4635
  },
4635
- h.id
4636
+ x.id
4636
4637
  );
4637
4638
  },
4638
- [r, f]
4639
- ), N = d(
4639
+ [r, h]
4640
+ ), N = u(
4640
4641
  "space-y-6",
4641
4642
  {
4642
4643
  "max-w-md": n === "sm",
@@ -4646,14 +4647,14 @@ const wn = ({
4646
4647
  },
4647
4648
  s
4648
4649
  );
4649
- return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(p) }) });
4650
+ return /* @__PURE__ */ e("div", { className: N, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(g) }) });
4650
4651
  }, Re = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
4651
4652
  const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
4652
4653
  return a ? /* @__PURE__ */ i("li", { children: [
4653
4654
  /* @__PURE__ */ i(
4654
4655
  "div",
4655
4656
  {
4656
- className: d(
4657
+ className: u(
4657
4658
  "flex items-center gap-2 px-2 pt-4 pb-1 text-xs font-semibold uppercase tracking-label text-text-subtle"
4658
4659
  ),
4659
4660
  children: [
@@ -4662,7 +4663,7 @@ const wn = ({
4662
4663
  ]
4663
4664
  }
4664
4665
  ),
4665
- /* @__PURE__ */ e("ul", { className: "flex flex-col gap-0.5", children: t.children?.map((c, f) => /* @__PURE__ */ e(
4666
+ /* @__PURE__ */ e("ul", { className: "flex flex-col gap-0.5", children: t.children?.map((c, h) => /* @__PURE__ */ e(
4666
4667
  Re,
4667
4668
  {
4668
4669
  item: c,
@@ -4670,7 +4671,7 @@ const wn = ({
4670
4671
  onClick: n,
4671
4672
  depth: s + 1
4672
4673
  },
4673
- f
4674
+ h
4674
4675
  )) })
4675
4676
  ] }) : /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
4676
4677
  "div",
@@ -4681,7 +4682,7 @@ const wn = ({
4681
4682
  onKeyDown: (c) => {
4682
4683
  (c.key === "Enter" || c.key === " ") && (c.preventDefault(), t.path && n?.(t.path));
4683
4684
  },
4684
- className: d(
4685
+ className: u(
4685
4686
  "flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-base no-underline",
4686
4687
  "transition-colors duration-fast ease-out",
4687
4688
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -4693,7 +4694,7 @@ const wn = ({
4693
4694
  t.count !== void 0 && t.count > 0 && /* @__PURE__ */ e(
4694
4695
  "span",
4695
4696
  {
4696
- className: d(
4697
+ className: u(
4697
4698
  "shrink-0 text-xs tabular-nums",
4698
4699
  l ? "rounded-full bg-accent px-2 font-semibold text-accent-fg" : "text-text-subtle"
4699
4700
  ),
@@ -4713,29 +4714,29 @@ const wn = ({
4713
4714
  }) => /* @__PURE__ */ i("nav", { className: "flex h-full shrink-0 flex-col p-3 pt-4", children: [
4714
4715
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-2 pb-3", children: [
4715
4716
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-lg font-semibold text-text", children: t }),
4716
- r && r.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: r.map((c, f) => /* @__PURE__ */ e(
4717
+ r && r.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: r.map((c, h) => /* @__PURE__ */ e(
4717
4718
  "span",
4718
4719
  {
4719
- className: d(
4720
+ className: u(
4720
4721
  "flex h-control-sm w-7 cursor-pointer items-center justify-center rounded-md text-text-strong",
4721
4722
  "transition-colors duration-fast ease-out hover:bg-surface-hover hover:text-text-strong",
4722
4723
  "focus-visible:outline-none focus-visible:focus-ring"
4723
4724
  ),
4724
4725
  children: c
4725
4726
  },
4726
- f
4727
+ h
4727
4728
  )) })
4728
4729
  ] }),
4729
4730
  l && /* @__PURE__ */ e("div", { className: "px-1 pb-3", children: l }),
4730
4731
  /* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto", children: n.map(
4731
- (c, f) => !c.path && !c.label && !c.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, f) : /* @__PURE__ */ e(
4732
+ (c, h) => !c.path && !c.label && !c.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, h) : /* @__PURE__ */ e(
4732
4733
  Re,
4733
4734
  {
4734
4735
  item: c,
4735
4736
  isSelectedHandler: s,
4736
4737
  onClick: a
4737
4738
  },
4738
- f
4739
+ h
4739
4740
  )
4740
4741
  ) })
4741
4742
  ] }), Er = {
@@ -4775,10 +4776,10 @@ const wn = ({
4775
4776
  align: a = "left",
4776
4777
  truncate: l = !1,
4777
4778
  className: c,
4778
- children: f,
4779
- ...p
4779
+ children: h,
4780
+ ...g
4780
4781
  }) => {
4781
- const N = `h${t}`, h = d(
4782
+ const N = `h${t}`, x = u(
4782
4783
  "font-sans text-pretty",
4783
4784
  Er[r || Tr(t)],
4784
4785
  Mr[n],
@@ -4787,7 +4788,7 @@ const wn = ({
4787
4788
  l && "truncate",
4788
4789
  c
4789
4790
  );
4790
- return /* @__PURE__ */ e(N, { className: h, ...p, children: f });
4791
+ return /* @__PURE__ */ e(N, { className: x, ...g, children: h });
4791
4792
  };
4792
4793
  function Tr(t) {
4793
4794
  return {
@@ -4807,44 +4808,44 @@ const Sn = ({
4807
4808
  initialCommandPath: a,
4808
4809
  initialActiveIndex: l
4809
4810
  }) => {
4810
- const [c, f] = R(""), [p, N] = R(a || []), [h, m] = R(l || 0), x = se(null), v = se(null), y = (p.length ? t.find((g) => g.id === p[0])?.subCommands || [] : t).filter(
4811
- (g) => g.label.toLowerCase().includes(c.toLowerCase())
4811
+ const [c, h] = R(""), [g, N] = R(a || []), [x, d] = R(l || 0), f = se(null), v = se(null), y = (g.length ? t.find((p) => p.id === g[0])?.subCommands || [] : t).filter(
4812
+ (p) => p.label.toLowerCase().includes(c.toLowerCase())
4812
4813
  );
4813
4814
  return Y(() => {
4814
- r || (f(""), N(a || []), m(l || 0));
4815
+ r || (h(""), N(a || []), d(l || 0));
4815
4816
  }, [r]), Y(() => {
4816
- const g = (A) => {
4817
+ const p = (D) => {
4817
4818
  if (r) {
4818
- if (A.key === "Escape")
4819
+ if (D.key === "Escape")
4819
4820
  n();
4820
- else if (A.key === "ArrowUp")
4821
- m(
4821
+ else if (D.key === "ArrowUp")
4822
+ d(
4822
4823
  ($) => $ > 0 ? $ - 1 : y.length - 1
4823
4824
  );
4824
- else if (A.key === "ArrowDown")
4825
- m(
4825
+ else if (D.key === "ArrowDown")
4826
+ d(
4826
4827
  ($) => $ < y.length - 1 ? $ + 1 : 0
4827
4828
  );
4828
- else if (A.key === "Enter") {
4829
- const $ = y[h];
4830
- $ && ($.subCommands ? (N([...p, $.id]), m(0)) : $.action && ($.action(), n()));
4829
+ else if (D.key === "Enter") {
4830
+ const $ = y[x];
4831
+ $ && ($.subCommands ? (N([...g, $.id]), d(0)) : $.action && ($.action(), n()));
4831
4832
  }
4832
4833
  }
4833
4834
  };
4834
- return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
4835
- }, [r, n, y, h, p]), Y(() => {
4836
- const g = (A) => {
4837
- x.current && !x.current.contains(A.target) && n();
4835
+ return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
4836
+ }, [r, n, y, x, g]), Y(() => {
4837
+ const p = (D) => {
4838
+ f.current && !f.current.contains(D.target) && n();
4838
4839
  };
4839
- return r && document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
4840
+ return r && document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
4840
4841
  }, [r, n]), Y(() => {
4841
4842
  if (!r) return;
4842
- v.current?.querySelector(`[data-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
4843
- }, [h, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
4843
+ v.current?.querySelector(`[data-index="${x}"]`)?.scrollIntoView({ block: "nearest" });
4844
+ }, [x, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
4844
4845
  "div",
4845
4846
  {
4846
4847
  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",
4847
- ref: x,
4848
+ ref: f,
4848
4849
  children: [
4849
4850
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
4850
4851
  /* @__PURE__ */ e(Ne, { className: "w-4 h-4 text-text-muted shrink-0" }),
@@ -4855,7 +4856,7 @@ const Sn = ({
4855
4856
  autoFocus: !0,
4856
4857
  placeholder: s?.searchPlaceholder || "Search commands...",
4857
4858
  value: c,
4858
- onChange: (g) => f(g.target.value),
4859
+ onChange: (p) => h(p.target.value),
4859
4860
  className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
4860
4861
  }
4861
4862
  )
@@ -4867,22 +4868,22 @@ const Sn = ({
4867
4868
  className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
4868
4869
  children: [
4869
4870
  y.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
4870
- y.map((g, A) => /* @__PURE__ */ i(
4871
+ y.map((p, D) => /* @__PURE__ */ i(
4871
4872
  "div",
4872
4873
  {
4873
- "data-index": A,
4874
- className: `flex items-center p-2 cursor-pointer rounded-md ${A === h ? "bg-accent-soft text-accent" : "text-text"}`,
4874
+ "data-index": D,
4875
+ className: `flex items-center p-2 cursor-pointer rounded-md ${D === x ? "bg-accent-soft text-accent" : "text-text"}`,
4875
4876
  onClick: () => {
4876
- g.subCommands ? (N([...p, g.id]), m(0)) : g.action && (g.action(), n());
4877
+ p.subCommands ? (N([...g, p.id]), d(0)) : p.action && (p.action(), n());
4877
4878
  },
4878
- onMouseEnter: () => m(A),
4879
+ onMouseEnter: () => d(D),
4879
4880
  children: [
4880
- g.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: g.icon }),
4881
- /* @__PURE__ */ e("span", { className: "flex-grow", children: g.label }),
4882
- g.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(ye, { className: "w-4 h-4" }) })
4881
+ p.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: p.icon }),
4882
+ /* @__PURE__ */ e("span", { className: "flex-grow", children: p.label }),
4883
+ p.subCommands && /* @__PURE__ */ e("span", { className: "text-text-muted", children: /* @__PURE__ */ e(ye, { className: "w-4 h-4" }) })
4883
4884
  ]
4884
4885
  },
4885
- g.id
4886
+ p.id
4886
4887
  ))
4887
4888
  ]
4888
4889
  }
@@ -4936,14 +4937,14 @@ const Sn = ({
4936
4937
  backdrop: "bg-page",
4937
4938
  editor: "bg-surface",
4938
4939
  input: "bg-surface-input"
4939
- }, Pr = {
4940
+ }, jr = {
4940
4941
  none: "rounded-none",
4941
4942
  sm: "rounded-sm",
4942
4943
  md: "rounded-md",
4943
4944
  lg: "rounded-lg",
4944
4945
  xl: "rounded-xl",
4945
4946
  full: "rounded-full"
4946
- }, jr = {
4947
+ }, Pr = {
4947
4948
  none: "shadow-none",
4948
4949
  sm: "shadow-none",
4949
4950
  md: "shadow-overlay",
@@ -4974,25 +4975,25 @@ const Sn = ({
4974
4975
  shadow: a,
4975
4976
  border: l,
4976
4977
  borderColor: c,
4977
- className: f,
4978
- children: p,
4978
+ className: h,
4979
+ children: g,
4979
4980
  ...N
4980
- }, h) => /* @__PURE__ */ e(
4981
+ }, x) => /* @__PURE__ */ e(
4981
4982
  "div",
4982
4983
  {
4983
- ref: h,
4984
- className: d(
4984
+ ref: x,
4985
+ className: u(
4985
4986
  t && Ar[t],
4986
4987
  r && Lr[r],
4987
4988
  n && Ir[n],
4988
- s && Pr[s],
4989
- a && jr[a],
4989
+ s && jr[s],
4990
+ a && Pr[a],
4990
4991
  l && Or[l],
4991
4992
  c && Br[c],
4992
- f
4993
+ h
4993
4994
  ),
4994
4995
  ...N,
4995
- children: p
4996
+ children: g
4996
4997
  }
4997
4998
  )
4998
4999
  );
@@ -5020,43 +5021,43 @@ function En({
5020
5021
  componentProps: a,
5021
5022
  className: l
5022
5023
  }) {
5023
- const c = se(null), [f, p] = R(!0), [N, h] = R(null), m = se(null);
5024
+ const c = se(null), [h, g] = R(!0), [N, x] = R(null), d = se(null);
5024
5025
  return se(null), Y(() => {
5025
- let x = !0;
5026
+ let f = !0;
5026
5027
  return (async () => {
5027
- p(!0);
5028
+ g(!0);
5028
5029
  try {
5029
5030
  const C = await r();
5030
- if (!x) return;
5031
+ if (!f) return;
5031
5032
  const y = C.component || C.default || C;
5032
- h(n === "react" ? () => y : () => C);
5033
+ x(n === "react" ? () => y : () => C);
5033
5034
  } catch (C) {
5034
5035
  console.error(`[FederatedResource] Load failed: ${t}`, C);
5035
5036
  } finally {
5036
- x && p(!1);
5037
+ f && g(!1);
5037
5038
  }
5038
5039
  })(), () => {
5039
- x = !1;
5040
+ f = !1;
5040
5041
  };
5041
5042
  }, [t, r]), Y(() => {
5042
- if (f || !N || n === "react") return;
5043
- const x = c.current;
5044
- if (x) {
5043
+ if (h || !N || n === "react") return;
5044
+ const f = c.current;
5045
+ if (f) {
5045
5046
  if (n === "svelte") {
5046
- const v = N.default || N, C = new v({ target: x, props: a || {} });
5047
- return m.current = C, () => C.$destroy();
5047
+ const v = N.default || N, C = new v({ target: f, props: a || {} });
5048
+ return d.current = C, () => C.$destroy();
5048
5049
  }
5049
5050
  if (N.mount) {
5050
- const v = N.mount({ container: x, props: a || {} });
5051
+ const v = N.mount({ container: f, props: a || {} });
5051
5052
  return () => {
5052
- typeof v == "function" ? v() : N.unmount?.(x);
5053
+ typeof v == "function" ? v() : N.unmount?.(f);
5053
5054
  };
5054
5055
  }
5055
5056
  }
5056
- }, [N, n, f]), Y(() => {
5057
- n === "svelte" && m.current && m.current.$set?.(a);
5057
+ }, [N, n, h]), Y(() => {
5058
+ n === "svelte" && d.current && d.current.$set?.(a);
5058
5059
  }, [a, n]), /* @__PURE__ */ i("div", { ref: c, className: l, style: { display: "contents" }, children: [
5059
- f && s,
5060
+ h && s,
5060
5061
  n === "react" && N && /* @__PURE__ */ e(N, { ...a })
5061
5062
  ] });
5062
5063
  }
@@ -5102,7 +5103,7 @@ export {
5102
5103
  Sn as CommandPalette,
5103
5104
  en as ConfirmDialog,
5104
5105
  Rt as ContentLoading,
5105
- Ce as DatePicker,
5106
+ Se as DatePicker,
5106
5107
  Vt as Dropdown,
5107
5108
  rn as EmptyState,
5108
5109
  Mn as ErrorBoundary,
@@ -5134,7 +5135,7 @@ export {
5134
5135
  kn as SidebarMenu,
5135
5136
  Nn as SourceChip,
5136
5137
  an as Spinner,
5137
- je as SplitButton,
5138
+ Pe as SplitButton,
5138
5139
  ln as StatusDot,
5139
5140
  on as StepIndicator,
5140
5141
  ar as StorageInput,
@@ -5143,12 +5144,12 @@ export {
5143
5144
  Te as Table,
5144
5145
  Xt as Tabs,
5145
5146
  oe as Text,
5146
- Se as TextArea,
5147
+ ze as TextArea,
5147
5148
  he as TextField,
5148
5149
  _r as VideoSurface,
5149
5150
  wn as View,
5150
- d as cn,
5151
- qr as createSizes,
5152
- Ur as createVariants
5151
+ u as cn,
5152
+ Ur as createSizes,
5153
+ qr as createVariants
5153
5154
  };
5154
5155
  //# sourceMappingURL=index.js.map