@dinofront/design_system 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Children as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
2
- import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as ee, Download as A, EyeOff as j, File as M, GripVertical as N, Info as P, Loader2 as te, Menu as F, Minus as I, Moon as L, MoreHorizontal as R, MoreVertical as z, Paperclip as B, Pencil as V, Pin as H, PinOff as U, Plus as ne, RefreshCw as W, Search as re, SearchX as G, Sparkles as K, Sun as ie, Trash2 as q, UploadCloud as ae, User as oe, Users as J, X as se, XCircle as ce } from "lucide-react";
2
+ import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as A, Download as j, EyeOff as M, File as N, GripVertical as P, Info as F, Loader2 as ee, Menu as I, Minus as L, Moon as R, MoreHorizontal as z, MoreVertical as B, Paperclip as V, Pencil as H, Pin as U, PinOff as W, Plus as te, RefreshCw as G, Search as ne, SearchX as re, Sparkles as K, Sun as ie, Trash2 as q, UploadCloud as ae, User as oe, Users as se, X as J, XCircle as ce } from "lucide-react";
3
3
  import { clsx as le } from "clsx";
4
4
  import { extendTailwindMerge as ue } from "tailwind-merge";
5
5
  import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
@@ -190,7 +190,7 @@ var Xe = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
190
190
  },
191
191
  className: Q("inline-flex items-center justify-center font-medium transition-colors outline-none", a ? $e[t] : Qe[t], et[e], s && tt[e], o && "w-full", l),
192
192
  ...p,
193
- children: i ? /* @__PURE__ */ X(te, {
193
+ children: i ? /* @__PURE__ */ X(ee, {
194
194
  className: "h-4 w-4 animate-spin",
195
195
  "aria-hidden": !0
196
196
  }) : /* @__PURE__ */ Z(Y, { children: [
@@ -229,7 +229,7 @@ function ot(e, { accept: t, maxSizeMB: n }) {
229
229
  return t && !rt(e, t) ? "type" : n !== void 0 && e.size > n * 1024 * 1024 ? "size" : null;
230
230
  }
231
231
  var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFiles: i, disabled: a, validateFiles: o = !1, maxFiles: s, dedupe: c = o, currentFiles: l = [], onReject: d, showFileList: f = !1, onRemoveFile: h, mode: g = "dropzone", triggerLabel: _, triggerIcon: v, label: y, required: b, error: x = !1, errorText: S, labelAddons: C, className: w, dataTestId: T, ...E }, D) {
232
- let O = p(null), [k, ee] = m(!1), A = p(0), j = x || !!S, M = u(), N = S ? `${M}-error` : void 0, P = (t) => {
232
+ let O = p(null), [k, A] = m(!1), j = p(0), M = x || !!S, N = u(), P = S ? `${N}-error` : void 0, F = (t) => {
233
233
  if (!t.length) return;
234
234
  if (!o) {
235
235
  i?.(t);
@@ -265,19 +265,19 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
265
265
  r.push(i), u.push(i), --f;
266
266
  }
267
267
  r.length && i?.(r), a.length && d?.(a);
268
- }, te = (e) => {
269
- e.preventDefault(), A.current = 0, ee(!1), !a && P(Array.from(e.dataTransfer.files ?? []));
270
- }, F = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, I = /* @__PURE__ */ X("input", {
268
+ }, ee = (e) => {
269
+ e.preventDefault(), j.current = 0, A(!1), !a && F(Array.from(e.dataTransfer.files ?? []));
270
+ }, I = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, L = /* @__PURE__ */ X("input", {
271
271
  ref: O,
272
272
  type: "file",
273
273
  accept: e,
274
274
  multiple: t,
275
275
  disabled: a,
276
276
  onChange: (e) => {
277
- P(Array.from(e.target.files ?? [])), e.target.value = "";
277
+ F(Array.from(e.target.files ?? [])), e.target.value = "";
278
278
  },
279
279
  className: "sr-only"
280
- }), L = (y || C) && /* @__PURE__ */ Z("div", {
280
+ }), R = (y || C) && /* @__PURE__ */ Z("div", {
281
281
  className: "flex items-center gap-1.5",
282
282
  children: [y && /* @__PURE__ */ Z("span", {
283
283
  className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
@@ -290,11 +290,11 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
290
290
  className: "inline-flex items-center gap-1",
291
291
  children: C
292
292
  })]
293
- }), R = S ? /* @__PURE__ */ X("p", {
294
- id: `${M}-error`,
293
+ }), z = S ? /* @__PURE__ */ X("p", {
294
+ id: `${N}-error`,
295
295
  className: "text-p-sm text-red-700",
296
296
  children: S
297
- }) : null, z = f && l.length > 0 && /* @__PURE__ */ X("div", {
297
+ }) : null, B = f && l.length > 0 && /* @__PURE__ */ X("div", {
298
298
  className: "flex flex-col gap-2",
299
299
  children: l.map((e, t) => /* @__PURE__ */ X(lt, {
300
300
  name: e.name,
@@ -309,9 +309,9 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
309
309
  className: Q("flex flex-col gap-1.5", w),
310
310
  ...E,
311
311
  children: [
312
- L,
313
- z,
314
- R
312
+ R,
313
+ B,
314
+ z
315
315
  ]
316
316
  });
317
317
  if (g !== "dropzone") {
@@ -322,33 +322,33 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
322
322
  className: Q("flex flex-col gap-1.5", w),
323
323
  ...E,
324
324
  children: [
325
- L,
325
+ R,
326
326
  /* @__PURE__ */ X(nt, {
327
327
  type: "button",
328
328
  variant: "secondary",
329
329
  iconOnly: e,
330
330
  disabled: a,
331
331
  onClick: () => O.current?.click(),
332
- leftIcon: e ? void 0 : v ?? /* @__PURE__ */ X(B, { className: "h-4 w-4" }),
332
+ leftIcon: e ? void 0 : v ?? /* @__PURE__ */ X(V, { className: "h-4 w-4" }),
333
333
  "aria-label": e ? "Upload file" : void 0,
334
- children: e ? v ?? /* @__PURE__ */ X(V, { className: "h-4 w-4" }) : _ ?? "Choose a file"
334
+ children: e ? v ?? /* @__PURE__ */ X(H, { className: "h-4 w-4" }) : _ ?? "Choose a file"
335
335
  }),
336
- I,
337
- z,
338
- R
336
+ L,
337
+ B,
338
+ z
339
339
  ]
340
340
  });
341
341
  }
342
- let H = /* @__PURE__ */ Z("div", {
342
+ let U = /* @__PURE__ */ Z("div", {
343
343
  ref: D,
344
344
  onDragEnter: () => {
345
- A.current += 1, a || ee(!0);
345
+ j.current += 1, a || A(!0);
346
346
  },
347
347
  onDragOver: (e) => e.preventDefault(),
348
348
  onDragLeave: () => {
349
- A.current = Math.max(0, A.current - 1), A.current === 0 && ee(!1);
349
+ j.current = Math.max(0, j.current - 1), j.current === 0 && A(!1);
350
350
  },
351
- onDrop: te,
351
+ onDrop: ee,
352
352
  onClick: () => !a && O.current?.click(),
353
353
  role: "button",
354
354
  tabIndex: 0,
@@ -356,10 +356,10 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
356
356
  (e.key === "Enter" || e.key === " ") && !a && (e.preventDefault(), O.current?.click());
357
357
  },
358
358
  "aria-disabled": a || void 0,
359
- "aria-invalid": j || void 0,
360
- "aria-describedby": N,
359
+ "aria-invalid": M || void 0,
360
+ "aria-describedby": P,
361
361
  "data-test-id": T,
362
- className: Q("flex flex-col items-center justify-center text-center gap-2 px-6 py-8 rounded-lg border-2 border-dashed cursor-pointer transition-colors outline-none", j ? "border-red-300 bg-bg-danger-lighter" : k ? "border-brand-500 bg-brand-20" : "border-border-default bg-bg-container hover:bg-bg-subtle", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", a && "opacity-50 cursor-not-allowed", w),
362
+ className: Q("flex flex-col items-center justify-center text-center gap-2 px-6 py-8 rounded-lg border-2 border-dashed cursor-pointer transition-colors outline-none", M ? "border-red-300 bg-bg-danger-lighter" : k ? "border-brand-500 bg-brand-20" : "border-border-default bg-bg-container hover:bg-bg-subtle", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", a && "opacity-50 cursor-not-allowed", w),
363
363
  ...E,
364
364
  children: [
365
365
  /* @__PURE__ */ X("div", {
@@ -376,19 +376,19 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
376
376
  }), " or drag & drop it here."]
377
377
  }), /* @__PURE__ */ X("p", {
378
378
  className: "text-p-sm text-fg-tertiary",
379
- children: F
379
+ children: I
380
380
  })]
381
381
  }),
382
- I
382
+ L
383
383
  ]
384
384
  });
385
- return !L && !R && !z ? H : /* @__PURE__ */ Z("div", {
385
+ return !R && !z && !B ? U : /* @__PURE__ */ Z("div", {
386
386
  className: "flex flex-col gap-1.5",
387
387
  children: [
388
- L,
389
- H,
390
- z,
391
- R
388
+ R,
389
+ U,
390
+ B,
391
+ z
392
392
  ]
393
393
  });
394
394
  }), ct = {
@@ -410,7 +410,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
410
410
  alt: "",
411
411
  className: "h-full w-full object-cover",
412
412
  onError: () => g(!0)
413
- }) : /* @__PURE__ */ X(M, { className: "h-4 w-4" })
413
+ }) : /* @__PURE__ */ X(N, { className: "h-4 w-4" })
414
414
  }),
415
415
  /* @__PURE__ */ Z("div", {
416
416
  className: "flex-1 min-w-0",
@@ -463,7 +463,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
463
463
  onClick: o,
464
464
  "aria-label": "Remove",
465
465
  className: "shrink-0 p-1 rounded-md text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
466
- children: X(n === "completed" ? q : se, { className: "h-4 w-4" })
466
+ children: X(n === "completed" ? q : J, { className: "h-4 w-4" })
467
467
  })
468
468
  ]
469
469
  });
@@ -546,7 +546,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
546
546
  }
547
547
  let r = URL.createObjectURL(t);
548
548
  T.current = r, S(r), b(!1), c?.(t);
549
- }, D = x ?? e, O = !!D && !y, k = n ? ht(n) : "", ee = n ? gt(n) : "bg-gray-300 dark:bg-gray-600";
549
+ }, D = x ?? e, O = !!D && !y, k = n ? ht(n) : "", A = n ? gt(n) : "bg-gray-300 dark:bg-gray-600";
550
550
  return /* @__PURE__ */ Z("span", {
551
551
  ref: v,
552
552
  "data-test-id": g,
@@ -554,7 +554,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
554
554
  ..._,
555
555
  children: [
556
556
  /* @__PURE__ */ X("span", {
557
- className: Q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", ut[r], a === "circle" ? "rounded-full" : "rounded-md", !O && ee),
557
+ className: Q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", ut[r], a === "circle" ? "rounded-full" : "rounded-md", !O && A),
558
558
  children: O ? /* @__PURE__ */ X("img", {
559
559
  src: D,
560
560
  alt: t ?? n ?? "",
@@ -573,7 +573,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
573
573
  },
574
574
  "aria-label": "Change avatar image",
575
575
  className: Q("absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full ring-2 ring-white bg-brand-500 text-white hover:bg-brand-600 transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", mt[r]),
576
- children: /* @__PURE__ */ X(V, { className: "h-1/2 w-1/2" })
576
+ children: /* @__PURE__ */ X(H, { className: "h-1/2 w-1/2" })
577
577
  }), /* @__PURE__ */ X("input", {
578
578
  ref: C,
579
579
  type: "file",
@@ -694,7 +694,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
694
694
  disabled: l,
695
695
  "aria-label": "Dismiss",
696
696
  className: "inline-flex shrink-0 -mr-0.5 rounded-full p-0.5 hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
697
- children: /* @__PURE__ */ X(se, { className: "h-3 w-3" })
697
+ children: /* @__PURE__ */ X(J, { className: "h-3 w-3" })
698
698
  })
699
699
  ]
700
700
  });
@@ -841,7 +841,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
841
841
  ...m
842
842
  }), /* @__PURE__ */ X("span", {
843
843
  className: Q("flex items-center justify-center border transition-colors", Rt[e], !a && "bg-bg-default", v ? "border-red-600" : a ? "border-brand-500" : "border-border-strong", !c && !a && (v ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !a && "peer-checked:bg-brand-500 peer-checked:border-brand-500", a && "bg-brand-500", c && !a && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !a && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
844
- children: X(a ? I : b, {
844
+ children: X(a ? L : b, {
845
845
  className: Q(zt[e], "text-white"),
846
846
  strokeWidth: 3,
847
847
  "aria-hidden": !0
@@ -955,7 +955,7 @@ var Gt = {
955
955
  function Kt({ content: e, children: t, side: r = "top", align: i = "center", offset: a = 8, open: s, defaultOpen: c = !1, onOpenChange: d, flip: f = !0, showArrow: h = !0, closeOnScroll: g = !0, autoFocus: _ = !1, container: v, className: y, dataTestId: b }) {
956
956
  let [x, S] = m(c), C = s !== void 0, w = C ? s : x, T = p(null), [E, D] = m(null), O = u(), k = (e) => {
957
957
  C || S(e), d?.(e);
958
- }, { style: ee, arrowStyle: A, resolvedSide: j } = Wt({
958
+ }, { style: A, arrowStyle: j, resolvedSide: M } = Wt({
959
959
  anchor: T,
960
960
  panel: E,
961
961
  open: w,
@@ -991,30 +991,30 @@ function Kt({ content: e, children: t, side: r = "top", align: i = "center", off
991
991
  _,
992
992
  E
993
993
  ]), !o(t)) return t;
994
- let M = t.props ?? {}, N = t.ref, P = n(t, {
995
- ref: Vt(T, N),
994
+ let N = t.props ?? {}, P = t.ref, F = n(t, {
995
+ ref: Vt(T, P),
996
996
  onClick: (e) => {
997
- M.onClick?.(e), e.defaultPrevented || k(!w);
997
+ N.onClick?.(e), e.defaultPrevented || k(!w);
998
998
  },
999
999
  "aria-haspopup": "dialog",
1000
1000
  "aria-expanded": w
1001
- }), te = v ?? (typeof document < "u" ? document.body : null);
1002
- return /* @__PURE__ */ Z(Y, { children: [P, w && te && de(/* @__PURE__ */ Z("div", {
1001
+ }), ee = v ?? (typeof document < "u" ? document.body : null);
1002
+ return /* @__PURE__ */ Z(Y, { children: [F, w && ee && de(/* @__PURE__ */ Z("div", {
1003
1003
  ref: Vt(D),
1004
1004
  id: O,
1005
1005
  role: "dialog",
1006
1006
  "aria-label": typeof e == "string" ? e : void 0,
1007
1007
  tabIndex: -1,
1008
- "data-side": j,
1008
+ "data-side": M,
1009
1009
  "data-test-id": b,
1010
- style: ee,
1010
+ style: A,
1011
1011
  className: Q("fixed z-50 max-w-60 max-h-54 overflow-auto rounded-lg border border-border-default bg-bg-default p-3 text-fg-default shadow-z4", y),
1012
1012
  children: [e, h && /* @__PURE__ */ X("span", {
1013
1013
  "aria-hidden": !0,
1014
- style: A,
1015
- className: Q("absolute size-2 rotate-45 bg-bg-default", Gt[j])
1014
+ style: j,
1015
+ className: Q("absolute size-2 rotate-45 bg-bg-default", Gt[M])
1016
1016
  })]
1017
- }), te)] });
1017
+ }), ee)] });
1018
1018
  }
1019
1019
  //#endregion
1020
1020
  //#region src/components/Copy/Copy.tsx
@@ -1042,7 +1042,7 @@ var qt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
1042
1042
  "aria-label": n,
1043
1043
  dataTestId: c,
1044
1044
  ...u,
1045
- children: f ? /* @__PURE__ */ X(b, { className: "size-4" }) : i ?? /* @__PURE__ */ X(ee, { className: "size-4" })
1045
+ children: f ? /* @__PURE__ */ X(b, { className: "size-4" }) : i ?? /* @__PURE__ */ X(A, { className: "size-4" })
1046
1046
  })
1047
1047
  }), /* @__PURE__ */ X("span", {
1048
1048
  role: "status",
@@ -1177,7 +1177,7 @@ var qt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
1177
1177
  onClick: () => T(S - a),
1178
1178
  "aria-label": "Decrease",
1179
1179
  className: $t,
1180
- children: /* @__PURE__ */ X(I, { className: "size-4" })
1180
+ children: /* @__PURE__ */ X(L, { className: "size-4" })
1181
1181
  }),
1182
1182
  rightAddon: /* @__PURE__ */ X("button", {
1183
1183
  type: "button",
@@ -1185,7 +1185,7 @@ var qt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
1185
1185
  onClick: () => T(S + a),
1186
1186
  "aria-label": "Increase",
1187
1187
  className: $t,
1188
- children: /* @__PURE__ */ X(ne, { className: "size-4" })
1188
+ children: /* @__PURE__ */ X(te, { className: "size-4" })
1189
1189
  }),
1190
1190
  className: Q("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
1191
1191
  ..._
@@ -1264,21 +1264,21 @@ function mn(e, t) {
1264
1264
  for (; i.length % 7 != 0;) i.push(null);
1265
1265
  return i;
1266
1266
  }
1267
- var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, error: D = !1, errorText: O, id: k, className: ee, wrapperClassName: A, dataTestId: j }, M) {
1268
- let N = u(), P = k ?? N, [te, F] = m(!1), [I, L] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [R, z] = m(null), B = p(null), V = D || !!O, H = O ? `${P}-error` : g ? `${P}-help` : void 0;
1267
+ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, error: D = !1, errorText: O, id: k, className: A, wrapperClassName: j, dataTestId: M }, N) {
1268
+ let P = u(), F = k ?? P, [ee, I] = m(!1), [L, R] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [z, B] = m(null), V = p(null), H = D || !!O, U = O ? `${F}-error` : g ? `${F}-help` : void 0;
1269
1269
  l(() => {
1270
- b && F(!1);
1270
+ b && I(!1);
1271
1271
  }, [b]), l(() => {
1272
- if (!te) return;
1272
+ if (!ee) return;
1273
1273
  let e = (e) => {
1274
- B.current && !B.current.contains(e.target) && F(!1);
1274
+ V.current && !V.current.contains(e.target) && I(!1);
1275
1275
  };
1276
1276
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1277
- }, [te]);
1278
- let U = r ? i?.start ? `${pn(i.start, c)}${i.end ? ` – ${pn(i.end, c)}` : ""}` : "" : e ? pn(e, c) : "";
1279
- function ne(e) {
1277
+ }, [ee]);
1278
+ let W = r ? i?.start ? `${pn(i.start, c)}${i.end ? ` – ${pn(i.end, c)}` : ""}` : "" : e ? pn(e, c) : "";
1279
+ function te(e) {
1280
1280
  if (!r) {
1281
- t?.(e), F(!1);
1281
+ t?.(e), I(!1);
1282
1282
  return;
1283
1283
  }
1284
1284
  let n = i ?? {
@@ -1302,32 +1302,32 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
1302
1302
  a?.({
1303
1303
  start: n.start,
1304
1304
  end: e
1305
- }), F(!1);
1305
+ }), I(!1);
1306
1306
  }
1307
- function W(e) {
1307
+ function G(e) {
1308
1308
  e.stopPropagation(), r ? (a?.({
1309
1309
  start: null,
1310
1310
  end: null
1311
- }), z(null)) : t?.(null);
1311
+ }), B(null)) : t?.(null);
1312
1312
  }
1313
- let { firstDayOfWeek: re, monthNames: G, weekdayNames: K } = f(() => {
1313
+ let { firstDayOfWeek: ne, monthNames: re, weekdayNames: K } = f(() => {
1314
1314
  let e = rn(s), t = an(e);
1315
1315
  return {
1316
1316
  firstDayOfWeek: t,
1317
1317
  monthNames: on(e),
1318
1318
  weekdayNames: cn(e, t)
1319
1319
  };
1320
- }, [s]), ie = mn(I, re), q = i ?? {
1320
+ }, [s]), ie = mn(L, ne), q = i ?? {
1321
1321
  start: null,
1322
1322
  end: null
1323
- }, ae = q.end ?? R;
1323
+ }, ae = q.end ?? z;
1324
1324
  return /* @__PURE__ */ Z("div", {
1325
- ref: B,
1326
- "data-test-id": j,
1327
- className: Q("flex flex-col gap-1.5", v && "w-full", A),
1325
+ ref: V,
1326
+ "data-test-id": M,
1327
+ className: Q("flex flex-col gap-1.5", v && "w-full", j),
1328
1328
  children: [
1329
1329
  d && /* @__PURE__ */ Z("label", {
1330
- htmlFor: P,
1330
+ htmlFor: F,
1331
1331
  className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
1332
1332
  children: [d, h && /* @__PURE__ */ X("span", {
1333
1333
  className: "text-red-600",
@@ -1338,30 +1338,30 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
1338
1338
  /* @__PURE__ */ Z("div", {
1339
1339
  className: "relative",
1340
1340
  children: [/* @__PURE__ */ Z("button", {
1341
- ref: M,
1342
- id: P,
1341
+ ref: N,
1342
+ id: F,
1343
1343
  type: "button",
1344
1344
  disabled: b,
1345
- "aria-invalid": V || void 0,
1345
+ "aria-invalid": H || void 0,
1346
1346
  "aria-required": h || void 0,
1347
- "aria-describedby": H,
1348
- onClick: () => F((e) => !e),
1349
- className: Q("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", V ? "border-red-600" : "border-border-default", !b && !V && "hover:border-border-strong", V ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", b && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", v ? "w-full min-w-0" : "min-w-[260px]", tn[o], ee),
1347
+ "aria-describedby": U,
1348
+ onClick: () => I((e) => !e),
1349
+ className: Q("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", H ? "border-red-600" : "border-border-default", !b && !H && "hover:border-border-strong", H ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", b && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", v ? "w-full min-w-0" : "min-w-[260px]", tn[o], A),
1350
1350
  children: [/* @__PURE__ */ X("span", {
1351
- className: Q("flex-1 text-left truncate", b ? "text-fg-disabled" : U ? "text-fg-default" : "text-fg-tertiary"),
1352
- children: U || _
1353
- }), n && U && !b ? /* @__PURE__ */ X("span", {
1351
+ className: Q("flex-1 text-left truncate", b ? "text-fg-disabled" : W ? "text-fg-default" : "text-fg-tertiary"),
1352
+ children: W || _
1353
+ }), n && W && !b ? /* @__PURE__ */ X("span", {
1354
1354
  role: "button",
1355
1355
  tabIndex: 0,
1356
1356
  "aria-label": "Clear date",
1357
- onClick: W,
1357
+ onClick: G,
1358
1358
  onKeyDown: (e) => {
1359
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), W(e));
1359
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), G(e));
1360
1360
  },
1361
1361
  className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
1362
- children: /* @__PURE__ */ X(se, { className: "w-4 h-4 text-fg-secondary" })
1362
+ children: /* @__PURE__ */ X(J, { className: "w-4 h-4 text-fg-secondary" })
1363
1363
  }) : /* @__PURE__ */ X(y, { className: Q("w-4 h-4", b ? "text-fg-disabled" : "text-fg-secondary") })]
1364
- }), te && /* @__PURE__ */ Z("div", {
1364
+ }), ee && /* @__PURE__ */ Z("div", {
1365
1365
  className: "absolute z-50 mt-1 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
1366
1366
  children: [/* @__PURE__ */ Z("div", {
1367
1367
  className: "flex items-center justify-between mb-2",
@@ -1369,22 +1369,22 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
1369
1369
  /* @__PURE__ */ X("button", {
1370
1370
  type: "button",
1371
1371
  className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
1372
- onClick: () => L(new Date(I.getFullYear(), I.getMonth() - 1, 1)),
1372
+ onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
1373
1373
  "aria-label": "Previous month",
1374
1374
  children: /* @__PURE__ */ X(C, { className: "w-4 h-4" })
1375
1375
  }),
1376
1376
  /* @__PURE__ */ Z("div", {
1377
1377
  className: "text-p-md font-semibold text-fg-default",
1378
1378
  children: [
1379
- G[I.getMonth()],
1379
+ re[L.getMonth()],
1380
1380
  " ",
1381
- I.getFullYear()
1381
+ L.getFullYear()
1382
1382
  ]
1383
1383
  }),
1384
1384
  /* @__PURE__ */ X("button", {
1385
1385
  type: "button",
1386
1386
  className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
1387
- onClick: () => L(new Date(I.getFullYear(), I.getMonth() + 1, 1)),
1387
+ onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
1388
1388
  "aria-label": "Next month",
1389
1389
  children: /* @__PURE__ */ X(w, { className: "w-4 h-4" })
1390
1390
  })
@@ -1401,8 +1401,8 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
1401
1401
  type: "button",
1402
1402
  disabled: i,
1403
1403
  "aria-disabled": i || void 0,
1404
- onMouseEnter: () => !i && r && q.start && !q.end && z(t),
1405
- onClick: () => !i && ne(t),
1404
+ onMouseEnter: () => !i && r && q.start && !q.end && B(t),
1405
+ onClick: () => !i && te(t),
1406
1406
  className: Q("h-8 rounded-md text-p-sm font-medium", i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
1407
1407
  children: t.getDate()
1408
1408
  }, n);
@@ -1411,11 +1411,11 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
1411
1411
  })]
1412
1412
  }),
1413
1413
  O ? /* @__PURE__ */ X("p", {
1414
- id: `${P}-error`,
1414
+ id: `${F}-error`,
1415
1415
  className: "text-p-sm text-red-700",
1416
1416
  children: O
1417
1417
  }) : g ? /* @__PURE__ */ X("p", {
1418
- id: `${P}-help`,
1418
+ id: `${F}-help`,
1419
1419
  className: "text-p-sm text-fg-secondary",
1420
1420
  children: g
1421
1421
  }) : null
@@ -1568,7 +1568,7 @@ var Cn = {
1568
1568
  onClick: t,
1569
1569
  "aria-label": "Close",
1570
1570
  className: "p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
1571
- children: /* @__PURE__ */ X(se, { className: "h-5 w-5" })
1571
+ children: /* @__PURE__ */ X(J, { className: "h-5 w-5" })
1572
1572
  })]
1573
1573
  })]
1574
1574
  }),
@@ -1945,7 +1945,7 @@ var Fn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
1945
1945
  ...s,
1946
1946
  children: [
1947
1947
  r ?? /* @__PURE__ */ X(Hn, {
1948
- icon: G,
1948
+ icon: re,
1949
1949
  tone: "gray",
1950
1950
  shape: "circle",
1951
1951
  size: Yn[e]
@@ -2025,7 +2025,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2025
2025
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
2026
2026
  },
2027
2027
  className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
2028
- children: /* @__PURE__ */ X(se, { className: "h-3 w-3" })
2028
+ children: /* @__PURE__ */ X(J, { className: "h-3 w-3" })
2029
2029
  }) : /* @__PURE__ */ X(S, {
2030
2030
  className: Q("h-4 w-4 text-fg-secondary transition-transform", f && "rotate-180"),
2031
2031
  "aria-hidden": !0
@@ -2043,14 +2043,14 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2043
2043
  defaultValues: r,
2044
2044
  shouldFocusError: s,
2045
2045
  shouldUnregister: o
2046
- }), { errors: O, isDirty: k, isSubmitted: ee, isSubmitting: A, dirtyFields: j, isValid: M } = y;
2046
+ }), { errors: O, isDirty: k, isSubmitted: A, isSubmitting: j, dirtyFields: M, isValid: N } = y;
2047
2047
  l(() => {
2048
2048
  let e = Object.keys(O).filter((e) => e !== "root" && e !== "form");
2049
2049
  e.length > 0 && T(e);
2050
2050
  }, [d]);
2051
- let N = h((e) => {
2052
- u?.(e, y, j);
2053
- }), P = {
2051
+ let P = h((e) => {
2052
+ u?.(e, y, M);
2053
+ }), F = {
2054
2054
  control: v,
2055
2055
  register: g,
2056
2056
  errors: O,
@@ -2064,21 +2064,21 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2064
2064
  getFieldState: E,
2065
2065
  unregister: D,
2066
2066
  isDirty: k,
2067
- isSubmitted: ee,
2068
- isSubmitting: A,
2069
- isValid: M,
2070
- dirtyFields: j,
2071
- submit: N
2067
+ isSubmitted: A,
2068
+ isSubmitting: j,
2069
+ isValid: N,
2070
+ dirtyFields: M,
2071
+ submit: P
2072
2072
  };
2073
2073
  return /* @__PURE__ */ X("form", {
2074
2074
  ref: m,
2075
2075
  id: c,
2076
- onSubmit: N,
2076
+ onSubmit: P,
2077
2077
  "data-test-id": f,
2078
2078
  className: Q("flex flex-col gap-4", t),
2079
2079
  ...p,
2080
2080
  children: /* @__PURE__ */ Z(er.Provider, {
2081
- value: P,
2081
+ value: F,
2082
2082
  children: [e, i && i.length > 0 && /* @__PURE__ */ X("div", {
2083
2083
  className: "flex items-center gap-3",
2084
2084
  "data-test-id": f ? `${f}-buttons` : void 0,
@@ -2160,7 +2160,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2160
2160
  info: {
2161
2161
  container: "bg-blue-50 border-blue-200",
2162
2162
  iconColor: "text-blue-700",
2163
- DefaultIcon: P
2163
+ DefaultIcon: F
2164
2164
  },
2165
2165
  discovery: {
2166
2166
  container: "bg-purple-50 border-purple-200",
@@ -2205,7 +2205,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2205
2205
  onClick: r,
2206
2206
  "aria-label": "Dismiss",
2207
2207
  className: "flex-shrink-0 -mr-1 -mt-1 p-1 rounded-md text-fg-secondary hover:text-fg-default hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
2208
- children: /* @__PURE__ */ X(se, { className: "h-4 w-4" })
2208
+ children: /* @__PURE__ */ X(J, { className: "h-4 w-4" })
2209
2209
  })
2210
2210
  ]
2211
2211
  });
@@ -2293,7 +2293,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
2293
2293
  onClick: t,
2294
2294
  "aria-label": "Close",
2295
2295
  className: "-mr-2 -mt-2 p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
2296
- children: /* @__PURE__ */ X(se, { className: "h-5 w-5" })
2296
+ children: /* @__PURE__ */ X(J, { className: "h-5 w-5" })
2297
2297
  })]
2298
2298
  }),
2299
2299
  i && /* @__PURE__ */ X("div", {
@@ -2335,11 +2335,11 @@ var ur = {
2335
2335
  input: "h-8 text-p-md min-w-[140px]",
2336
2336
  avatar: "sm"
2337
2337
  }
2338
- }, dr = a(function({ options: e, value: n, onChange: r, onAdd: i, onRemove: a, size: o = "md", placeholder: s = "Select…", addMorePlaceholder: c = "Add another…", disabled: d = !1, loading: h = !1, error: g = !1, label: _, labelAddons: v, helperText: y, errorText: b, required: x = !1, lockedValues: S = [], max: C, searchable: w = !0, suggestionsLabel: T = "Suggestions", emptyText: E = "No matches. Try a different search.", showAvatars: D = !1, id: O, className: k, wrapperClassName: ee, dataTestId: A }, j) {
2339
- let M = u(), N = O ?? M, P = `${N}-listbox`, F = g || !!b, [I, L] = m(""), [R, z] = m(!1), [B, V] = m(0), H = p(null), U = p(null), ne = (e) => {
2340
- U.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
2341
- }, W = f(() => new Map(e.map((e) => [String(e.value), e])), [e]), G = f(() => n.map((e) => W.get(String(e))).filter((e) => !!e), [n, W]), K = f(() => {
2342
- let t = I.trim().toLowerCase();
2338
+ }, dr = a(function({ options: e, value: n, onChange: r, onAdd: i, onRemove: a, size: o = "md", placeholder: s = "Select…", addMorePlaceholder: c = "Add another…", disabled: d = !1, loading: h = !1, error: g = !1, label: _, labelAddons: v, helperText: y, errorText: b, required: x = !1, lockedValues: S = [], max: C, searchable: w = !0, suggestionsLabel: T = "Suggestions", emptyText: E = "No matches. Try a different search.", showAvatars: D = !1, id: O, className: k, wrapperClassName: A, dataTestId: j }, M) {
2339
+ let N = u(), P = O ?? N, F = `${P}-listbox`, I = g || !!b, [L, R] = m(""), [z, B] = m(!1), [V, H] = m(0), U = p(null), W = p(null), te = (e) => {
2340
+ W.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
2341
+ }, G = f(() => new Map(e.map((e) => [String(e.value), e])), [e]), re = f(() => n.map((e) => G.get(String(e))).filter((e) => !!e), [n, G]), K = f(() => {
2342
+ let t = L.trim().toLowerCase();
2343
2343
  return e.filter((e) => {
2344
2344
  if (Ke(n, e.value)) return !1;
2345
2345
  if (t === "") return !0;
@@ -2349,47 +2349,47 @@ var ur = {
2349
2349
  }, [
2350
2350
  e,
2351
2351
  n,
2352
- I
2352
+ L
2353
2353
  ]), ie = C !== void 0 && n.length >= C;
2354
2354
  l(() => {
2355
- if (!R) return;
2355
+ if (!z) return;
2356
2356
  let e = (e) => {
2357
- H.current && !H.current.contains(e.target) && z(!1);
2357
+ U.current && !U.current.contains(e.target) && B(!1);
2358
2358
  };
2359
2359
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2360
- }, [R]), l(() => {
2361
- V((e) => Math.min(e, Math.max(0, K.length - 1)));
2360
+ }, [z]), l(() => {
2361
+ H((e) => Math.min(e, Math.max(0, K.length - 1)));
2362
2362
  }, [K.length]), l(() => {
2363
- h && z(!1);
2363
+ h && B(!1);
2364
2364
  }, [h]);
2365
2365
  let q = (e) => {
2366
- let t = W.get(String(e));
2367
- d || ie || !t || t.disabled || (r([...n, e]), i?.(t), L(""), V(0), U.current?.focus());
2366
+ let t = G.get(String(e));
2367
+ d || ie || !t || t.disabled || (r([...n, e]), i?.(t), R(""), H(0), W.current?.focus());
2368
2368
  }, ae = (e) => {
2369
2369
  d || Ke(S, e) || (r(n.filter((t) => !Ge(t, e))), a?.(e));
2370
2370
  }, oe = (e) => {
2371
2371
  if (!K.length) return;
2372
- let t = B;
2372
+ let t = V;
2373
2373
  for (let n = 0; n < K.length && (t = (t + e + K.length) % K.length, K[t]?.disabled); n++);
2374
- V(t);
2374
+ H(t);
2375
2375
  }, ce = (e) => {
2376
- if (e.key === "ArrowDown") e.preventDefault(), R ? oe(1) : h || z(!0);
2376
+ if (e.key === "ArrowDown") e.preventDefault(), z ? oe(1) : h || B(!0);
2377
2377
  else if (e.key === "ArrowUp") e.preventDefault(), oe(-1);
2378
- else if (e.key === "Enter") R && K[B] && !K[B].disabled && (e.preventDefault(), q(K[B].value));
2379
- else if (e.key === "Escape") z(!1);
2380
- else if (e.key === "Backspace" && I === "" && G.length > 0) {
2381
- let e = [...G].reverse().find((e) => !Ke(S, e.value));
2378
+ else if (e.key === "Enter") z && K[V] && !K[V].disabled && (e.preventDefault(), q(K[V].value));
2379
+ else if (e.key === "Escape") B(!1);
2380
+ else if (e.key === "Backspace" && L === "" && re.length > 0) {
2381
+ let e = [...re].reverse().find((e) => !Ke(S, e.value));
2382
2382
  e && ae(e.value);
2383
2383
  }
2384
- }, le = b ? `${N}-error` : y ? `${N}-help` : void 0;
2384
+ }, le = b ? `${P}-error` : y ? `${P}-help` : void 0;
2385
2385
  return /* @__PURE__ */ Z("div", {
2386
- "data-test-id": A,
2387
- className: Q("flex flex-col gap-1.5 w-full", ee),
2386
+ "data-test-id": j,
2387
+ className: Q("flex flex-col gap-1.5 w-full", A),
2388
2388
  children: [
2389
2389
  (_ || v) && /* @__PURE__ */ Z("div", {
2390
2390
  className: "flex items-center gap-1.5",
2391
2391
  children: [_ && /* @__PURE__ */ Z("label", {
2392
- htmlFor: N,
2392
+ htmlFor: P,
2393
2393
  className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
2394
2394
  children: [_, x && /* @__PURE__ */ X("span", {
2395
2395
  className: "text-red-600",
@@ -2402,13 +2402,13 @@ var ur = {
2402
2402
  })]
2403
2403
  }),
2404
2404
  /* @__PURE__ */ Z("div", {
2405
- ref: H,
2405
+ ref: U,
2406
2406
  className: "relative",
2407
2407
  children: [/* @__PURE__ */ Z("div", {
2408
- className: Q("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", ur[o].box, d ? "opacity-60 cursor-not-allowed border-border-default" : F ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", h && "cursor-wait", k),
2409
- onClick: () => !d && !h && U.current?.focus(),
2408
+ className: Q("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", ur[o].box, d ? "opacity-60 cursor-not-allowed border-border-default" : I ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", h && "cursor-wait", k),
2409
+ onClick: () => !d && !h && W.current?.focus(),
2410
2410
  children: [
2411
- G.map((e) => {
2411
+ re.map((e) => {
2412
2412
  let t = Ke(S, e.value);
2413
2413
  return /* @__PURE__ */ Z("span", {
2414
2414
  className: Q("inline-flex items-center gap-1.5 rounded-full text-fg-default bg-bg-subtle", ur[o].chip, ur[o].chipText),
@@ -2434,56 +2434,56 @@ var ur = {
2434
2434
  },
2435
2435
  "aria-label": `Remove ${lr(e) ?? String(e.value)}`,
2436
2436
  className: "-mr-0.5 ml-0.5 text-fg-tertiary hover:text-fg-default p-0.5 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
2437
- children: /* @__PURE__ */ X(se, { className: "w-3 h-3" })
2437
+ children: /* @__PURE__ */ X(J, { className: "w-3 h-3" })
2438
2438
  })
2439
2439
  ]
2440
2440
  }, String(e.value));
2441
2441
  }),
2442
2442
  /* @__PURE__ */ X("input", {
2443
- ref: ne,
2444
- id: N,
2443
+ ref: te,
2444
+ id: P,
2445
2445
  type: "text",
2446
2446
  role: "combobox",
2447
- "aria-expanded": R,
2448
- "aria-controls": P,
2447
+ "aria-expanded": z,
2448
+ "aria-controls": F,
2449
2449
  "aria-autocomplete": "list",
2450
- "aria-activedescendant": R && K[B] ? `${P}-opt-${B}` : void 0,
2451
- "aria-invalid": F || void 0,
2450
+ "aria-activedescendant": z && K[V] ? `${F}-opt-${V}` : void 0,
2451
+ "aria-invalid": I || void 0,
2452
2452
  "aria-describedby": le,
2453
2453
  "aria-busy": h || void 0,
2454
- value: I,
2454
+ value: L,
2455
2455
  readOnly: !w,
2456
2456
  disabled: d || ie,
2457
2457
  onChange: (e) => {
2458
- L(e.target.value), h || z(!0);
2458
+ R(e.target.value), h || B(!0);
2459
2459
  },
2460
- onFocus: () => !h && z(!0),
2460
+ onFocus: () => !h && B(!0),
2461
2461
  onKeyDown: ce,
2462
- placeholder: G.length === 0 ? s : ie ? `Limit ${C} reached` : c,
2462
+ placeholder: re.length === 0 ? s : ie ? `Limit ${C} reached` : c,
2463
2463
  className: Q("flex-1 bg-transparent outline-none text-fg-default placeholder:text-fg-tertiary disabled:cursor-not-allowed", !w && "cursor-pointer", ur[o].input)
2464
2464
  }),
2465
- h && /* @__PURE__ */ X(te, {
2465
+ h && /* @__PURE__ */ X(ee, {
2466
2466
  className: "h-4 w-4 shrink-0 text-fg-secondary animate-spin",
2467
2467
  "aria-hidden": !0
2468
2468
  })
2469
2469
  ]
2470
- }), R && !d && !h && !ie && /* @__PURE__ */ Z("div", {
2470
+ }), z && !d && !h && !ie && /* @__PURE__ */ Z("div", {
2471
2471
  className: "absolute top-full left-0 right-0 mt-1 z-20 max-h-80 overflow-y-auto rounded-lg border border-border-default bg-bg-default shadow-z4",
2472
2472
  children: [/* @__PURE__ */ Z("div", {
2473
2473
  className: "px-3 py-2 border-b border-border-subtle flex items-center gap-2 text-p-sm text-fg-tertiary",
2474
- children: [/* @__PURE__ */ X(re, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ X("span", {
2474
+ children: [/* @__PURE__ */ X(ne, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ X("span", {
2475
2475
  className: "truncate",
2476
- children: I ? `Matches for "${I}"` : T
2476
+ children: L ? `Matches for "${L}"` : T
2477
2477
  })]
2478
2478
  }), K.length === 0 ? /* @__PURE__ */ Z("div", {
2479
2479
  className: "px-3 py-6 text-center",
2480
- children: [/* @__PURE__ */ X(J, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ X("span", {
2480
+ children: [/* @__PURE__ */ X(se, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ X("span", {
2481
2481
  className: "text-p-sm text-fg-secondary",
2482
2482
  children: E
2483
2483
  })]
2484
2484
  }) : /* @__PURE__ */ X("ul", {
2485
2485
  role: "listbox",
2486
- id: P,
2486
+ id: F,
2487
2487
  className: "py-1",
2488
2488
  children: K.map((e, n) => /* @__PURE__ */ Z(t, { children: [!!e.group && e.group !== K[n - 1]?.group && /* @__PURE__ */ X("li", {
2489
2489
  role: "presentation",
@@ -2491,17 +2491,17 @@ var ur = {
2491
2491
  children: e.group
2492
2492
  }), /* @__PURE__ */ X("li", {
2493
2493
  role: "option",
2494
- id: `${P}-opt-${n}`,
2495
- "aria-selected": n === B,
2494
+ id: `${F}-opt-${n}`,
2495
+ "aria-selected": n === V,
2496
2496
  "aria-disabled": e.disabled || void 0,
2497
2497
  children: /* @__PURE__ */ Z("button", {
2498
2498
  type: "button",
2499
2499
  disabled: e.disabled,
2500
- onMouseEnter: () => V(n),
2500
+ onMouseEnter: () => H(n),
2501
2501
  onMouseDown: (t) => {
2502
2502
  t.preventDefault(), q(e.value);
2503
2503
  },
2504
- className: Q("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : n === B ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
2504
+ className: Q("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : n === V ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
2505
2505
  children: [(D || e.avatarSrc) && /* @__PURE__ */ X(_t, {
2506
2506
  src: e.avatarSrc,
2507
2507
  name: lr(e),
@@ -2522,11 +2522,11 @@ var ur = {
2522
2522
  })]
2523
2523
  }),
2524
2524
  b ? /* @__PURE__ */ X("p", {
2525
- id: `${N}-error`,
2525
+ id: `${P}-error`,
2526
2526
  className: "text-p-sm text-red-700",
2527
2527
  children: b
2528
2528
  }) : y ? /* @__PURE__ */ X("p", {
2529
- id: `${N}-help`,
2529
+ id: `${P}-help`,
2530
2530
  className: "text-p-sm text-fg-secondary",
2531
2531
  children: y
2532
2532
  }) : null
@@ -2599,7 +2599,7 @@ var vr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
2599
2599
  if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ X("span", {
2600
2600
  "aria-hidden": !0,
2601
2601
  className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
2602
- children: /* @__PURE__ */ X(R, { className: "h-4 w-4" })
2602
+ children: /* @__PURE__ */ X(z, { className: "h-4 w-4" })
2603
2603
  }, `${t}-${r}`);
2604
2604
  let i = t === e;
2605
2605
  return /* @__PURE__ */ X("button", {
@@ -2880,57 +2880,57 @@ function Rr(e) {
2880
2880
  return e.findIndex((e) => !e.disabled);
2881
2881
  }
2882
2882
  var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeholder: a = "Select…", label: o, labelAddons: s, helperText: c, errorText: d, error: h = !1, required: g = !1, loading: _ = !1, searchable: v = !1, searchPlaceholder: y = "Search…", emptyText: x = "No results", size: C = "md", disabled: w, id: T, className: E, wrapperClassName: D, dataTestId: O }, k) {
2883
- let ee = u(), A = T ?? ee, j = `${A}-listbox`, [M, N] = m(!1), [P, F] = m(r), I = n !== void 0, L = I ? n : P, R = p(null), z = p(null), B = p(null), [V, H] = m(-1), [U, ne] = m(""), W = h || !!d, G = d ? `${A}-error` : c ? `${A}-help` : void 0, K = e.find((e) => Ge(e.value, L)), ie = f(() => e.some((e) => e.icon != null), [e]), q = f(() => {
2884
- let t = v ? U.trim().toLowerCase() : "";
2883
+ let A = u(), j = T ?? A, M = `${j}-listbox`, [N, P] = m(!1), [F, I] = m(r), L = n !== void 0, R = L ? n : F, z = p(null), B = p(null), V = p(null), [H, U] = m(-1), [W, te] = m(""), G = h || !!d, re = d ? `${j}-error` : c ? `${j}-help` : void 0, K = e.find((e) => Ge(e.value, R)), ie = f(() => e.some((e) => e.icon != null), [e]), q = f(() => {
2884
+ let t = v ? W.trim().toLowerCase() : "";
2885
2885
  return t ? e.filter((e) => (e.searchText ?? (typeof e.label == "string" ? e.label : void 0) ?? String(e.value)).toLowerCase().includes(t)) : e;
2886
2886
  }, [
2887
2887
  e,
2888
- U,
2888
+ W,
2889
2889
  v
2890
2890
  ]), ae = (e) => {
2891
- I || F(e), i?.(e), N(!1), v && z.current?.focus();
2891
+ L || I(e), i?.(e), P(!1), v && B.current?.focus();
2892
2892
  };
2893
2893
  l(() => {
2894
- if (!M) return;
2894
+ if (!N) return;
2895
2895
  let e = (e) => {
2896
- R.current?.contains(e.target) || N(!1);
2896
+ z.current?.contains(e.target) || P(!1);
2897
2897
  };
2898
2898
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2899
- }, [M]), l(() => {
2900
- if (!M) {
2901
- H(-1), ne("");
2899
+ }, [N]), l(() => {
2900
+ if (!N) {
2901
+ U(-1), te("");
2902
2902
  return;
2903
2903
  }
2904
- let e = q.findIndex((e) => Ge(e.value, L));
2905
- H(e >= 0 && !q[e]?.disabled ? e : Rr(q));
2904
+ let e = q.findIndex((e) => Ge(e.value, R));
2905
+ U(e >= 0 && !q[e]?.disabled ? e : Rr(q));
2906
2906
  }, [
2907
- M,
2908
- L,
2907
+ N,
2908
+ R,
2909
2909
  q
2910
2910
  ]), l(() => {
2911
- M && v && B.current?.focus();
2912
- }, [M, v]), l(() => {
2913
- _ && N(!1);
2911
+ N && v && V.current?.focus();
2912
+ }, [N, v]), l(() => {
2913
+ _ && P(!1);
2914
2914
  }, [_]);
2915
2915
  let oe = (e) => {
2916
2916
  let t = q.length;
2917
2917
  if (t === 0) return;
2918
- let n = V < 0 ? e === 1 ? -1 : 0 : V;
2918
+ let n = H < 0 ? e === 1 ? -1 : 0 : H;
2919
2919
  for (let r = 0; r < t && (n = (n + e + t) % t, q[n]?.disabled); r++);
2920
- H(n);
2921
- }, J = () => {
2922
- let e = q[V];
2920
+ U(n);
2921
+ }, se = () => {
2922
+ let e = q[H];
2923
2923
  e && !e.disabled && ae(e.value);
2924
2924
  };
2925
2925
  return /* @__PURE__ */ Z("div", {
2926
- ref: R,
2926
+ ref: z,
2927
2927
  "data-test-id": O,
2928
2928
  className: Q("flex flex-col gap-1.5 w-full relative", D),
2929
2929
  children: [
2930
2930
  (o || s) && /* @__PURE__ */ Z("div", {
2931
2931
  className: "flex items-center gap-1.5",
2932
2932
  children: [o && /* @__PURE__ */ Z("label", {
2933
- htmlFor: A,
2933
+ htmlFor: j,
2934
2934
  className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
2935
2935
  children: [o, g && /* @__PURE__ */ X("span", {
2936
2936
  className: "text-red-600",
@@ -2943,35 +2943,35 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
2943
2943
  })]
2944
2944
  }),
2945
2945
  /* @__PURE__ */ Z("button", {
2946
- ref: Vt(k, z),
2947
- id: A,
2946
+ ref: Vt(k, B),
2947
+ id: j,
2948
2948
  type: "button",
2949
2949
  disabled: w,
2950
2950
  onClick: () => {
2951
- w || _ || N((e) => !e);
2951
+ w || _ || P((e) => !e);
2952
2952
  },
2953
2953
  onKeyDown: (e) => {
2954
2954
  if (!(w || _)) if (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === " ") {
2955
- if (e.preventDefault(), !M) {
2956
- N(!0);
2955
+ if (e.preventDefault(), !N) {
2956
+ P(!0);
2957
2957
  return;
2958
2958
  }
2959
2959
  if (e.key === "Enter" || e.key === " ") {
2960
- J();
2960
+ se();
2961
2961
  return;
2962
2962
  }
2963
2963
  oe(e.key === "ArrowDown" ? 1 : -1);
2964
- } else e.key === "Escape" && N(!1);
2964
+ } else e.key === "Escape" && P(!1);
2965
2965
  },
2966
2966
  "aria-haspopup": "listbox",
2967
- "aria-expanded": M,
2968
- "aria-invalid": W || void 0,
2967
+ "aria-expanded": N,
2968
+ "aria-invalid": G || void 0,
2969
2969
  "aria-required": g || void 0,
2970
2970
  "aria-busy": _ || void 0,
2971
2971
  "aria-disabled": _ || void 0,
2972
- "aria-describedby": G,
2973
- "aria-controls": M && q.length > 0 ? j : void 0,
2974
- className: Q("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", W ? "border-red-600" : "border-border-default", !w && !W && "hover:border-border-strong", "focus-visible:ring-2", W ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", _ && "cursor-wait", Fr[C], E),
2972
+ "aria-describedby": re,
2973
+ "aria-controls": N && q.length > 0 ? M : void 0,
2974
+ className: Q("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", G ? "border-red-600" : "border-border-default", !w && !G && "hover:border-border-strong", "focus-visible:ring-2", G ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", _ && "cursor-wait", Fr[C], E),
2975
2975
  children: [/* @__PURE__ */ Z("span", {
2976
2976
  className: "flex items-center gap-1.5 min-w-0",
2977
2977
  children: [ie && K?.icon && /* @__PURE__ */ X("span", {
@@ -2981,33 +2981,33 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
2981
2981
  className: Q("truncate", !K && "text-fg-tertiary"),
2982
2982
  children: K ? K.label : a
2983
2983
  })]
2984
- }), _ ? /* @__PURE__ */ X(te, {
2984
+ }), _ ? /* @__PURE__ */ X(ee, {
2985
2985
  className: "h-4 w-4 ml-2 shrink-0 text-fg-secondary animate-spin",
2986
2986
  "aria-hidden": !0
2987
2987
  }) : /* @__PURE__ */ X(S, {
2988
- className: Q("h-4 w-4 ml-2 shrink-0 text-fg-secondary transition-transform", M && "rotate-180"),
2988
+ className: Q("h-4 w-4 ml-2 shrink-0 text-fg-secondary transition-transform", N && "rotate-180"),
2989
2989
  "aria-hidden": !0
2990
2990
  })]
2991
2991
  }),
2992
- M && /* @__PURE__ */ Z("div", {
2992
+ N && /* @__PURE__ */ Z("div", {
2993
2993
  className: "absolute left-0 right-0 top-full mt-1 rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 overflow-hidden",
2994
2994
  children: [v && /* @__PURE__ */ Z("div", {
2995
2995
  className: "flex items-center gap-2 px-3 py-2 border-b border-border-default",
2996
- children: [/* @__PURE__ */ X(re, {
2996
+ children: [/* @__PURE__ */ X(ne, {
2997
2997
  className: "h-3.5 w-3.5 shrink-0 text-fg-tertiary",
2998
2998
  "aria-hidden": !0
2999
2999
  }), /* @__PURE__ */ X("input", {
3000
- ref: B,
3000
+ ref: V,
3001
3001
  type: "text",
3002
3002
  role: "combobox",
3003
3003
  "aria-expanded": !0,
3004
- "aria-controls": q.length > 0 ? j : void 0,
3004
+ "aria-controls": q.length > 0 ? M : void 0,
3005
3005
  "aria-autocomplete": "list",
3006
- "aria-activedescendant": V >= 0 ? `${j}-opt-${V}` : void 0,
3007
- value: U,
3008
- onChange: (e) => ne(e.target.value),
3006
+ "aria-activedescendant": H >= 0 ? `${M}-opt-${H}` : void 0,
3007
+ value: W,
3008
+ onChange: (e) => te(e.target.value),
3009
3009
  onKeyDown: (e) => {
3010
- e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), oe(e.key === "ArrowDown" ? 1 : -1)) : e.key === "Enter" ? (e.preventDefault(), J()) : e.key === "Escape" ? (e.preventDefault(), N(!1), z.current?.focus()) : e.key === "Tab" && (z.current?.focus(), N(!1));
3010
+ e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), oe(e.key === "ArrowDown" ? 1 : -1)) : e.key === "Enter" ? (e.preventDefault(), se()) : e.key === "Escape" ? (e.preventDefault(), P(!1), B.current?.focus()) : e.key === "Tab" && (B.current?.focus(), P(!1));
3011
3011
  },
3012
3012
  placeholder: y,
3013
3013
  className: "w-full bg-transparent outline-none text-p-std text-fg-default placeholder:text-fg-tertiary"
@@ -3016,21 +3016,21 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
3016
3016
  className: "px-3 py-6 text-center text-p-sm text-fg-secondary",
3017
3017
  children: x
3018
3018
  }) : /* @__PURE__ */ X("ul", {
3019
- id: j,
3019
+ id: M,
3020
3020
  role: "listbox",
3021
3021
  className: "max-h-60 overflow-y-auto py-1",
3022
3022
  children: q.map((e, n) => {
3023
- let r = Ge(e.value, L), i = n === V;
3023
+ let r = Ge(e.value, R), i = n === H;
3024
3024
  return /* @__PURE__ */ Z(t, { children: [!!e.group && e.group !== q[n - 1]?.group && /* @__PURE__ */ X("li", {
3025
3025
  role: "presentation",
3026
3026
  className: "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
3027
3027
  children: e.group
3028
3028
  }), /* @__PURE__ */ Z("li", {
3029
- id: `${j}-opt-${n}`,
3029
+ id: `${M}-opt-${n}`,
3030
3030
  role: "option",
3031
3031
  "aria-selected": r,
3032
3032
  "aria-disabled": e.disabled || void 0,
3033
- onMouseEnter: () => !e.disabled && H(n),
3033
+ onMouseEnter: () => !e.disabled && U(n),
3034
3034
  onClick: () => !e.disabled && ae(e.value),
3035
3035
  className: Q("flex items-center justify-between gap-2 px-3 py-2 text-p-std cursor-pointer select-none", e.disabled && "opacity-50 cursor-not-allowed", i && !e.disabled && "bg-bg-subtle", r && "font-medium"),
3036
3036
  children: [/* @__PURE__ */ Z("span", {
@@ -3051,11 +3051,11 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
3051
3051
  })]
3052
3052
  }),
3053
3053
  d ? /* @__PURE__ */ X("p", {
3054
- id: `${A}-error`,
3054
+ id: `${j}-error`,
3055
3055
  className: "text-p-sm text-red-700",
3056
3056
  children: d
3057
3057
  }) : c ? /* @__PURE__ */ X("p", {
3058
- id: `${A}-help`,
3058
+ id: `${j}-help`,
3059
3059
  className: "text-p-sm text-fg-secondary",
3060
3060
  children: c
3061
3061
  }) : null
@@ -3183,7 +3183,7 @@ function Qr(e) {
3183
3183
  function $r(e) {
3184
3184
  return /* @__PURE__ */ X(_e.ClearIndicator, {
3185
3185
  ...e,
3186
- children: /* @__PURE__ */ X(se, {
3186
+ children: /* @__PURE__ */ X(J, {
3187
3187
  className: "h-3.5 w-3.5",
3188
3188
  "aria-hidden": !0
3189
3189
  })
@@ -3192,7 +3192,7 @@ function $r(e) {
3192
3192
  function ei(e) {
3193
3193
  return /* @__PURE__ */ X(_e.MultiValueRemove, {
3194
3194
  ...e,
3195
- children: /* @__PURE__ */ X(se, {
3195
+ children: /* @__PURE__ */ X(J, {
3196
3196
  className: "h-3 w-3",
3197
3197
  "aria-hidden": !0
3198
3198
  })
@@ -3206,7 +3206,7 @@ function ti(e) {
3206
3206
  }) : null;
3207
3207
  }
3208
3208
  function ni() {
3209
- return /* @__PURE__ */ X(te, {
3209
+ return /* @__PURE__ */ X(ee, {
3210
3210
  className: "h-4 w-4 animate-spin text-fg-secondary",
3211
3211
  "aria-hidden": !0
3212
3212
  });
@@ -3263,7 +3263,7 @@ function ii(t) {
3263
3263
  });
3264
3264
  }
3265
3265
  var ai = a(function(e, t) {
3266
- let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: l, value: d, defaultValue: h, onChange: g, placeholder: _, label: v, labelAddons: y, helperText: b, errorText: x, error: S = !1, required: C = !0, loading: w = !1, clearable: T = !1, searchable: E = !0, virtualized: D = !1, emptyText: O, locale: k = "en-US", size: ee = "md", disabled: A = !1, id: j, className: M, wrapperClassName: N, dataTestId: P, ...te } = e, F = e.isMulti ? !!e.singleLine : !1, I = Vr[k], L = _ ?? I.placeholder, R = O ?? I.noResults, z = c ?? ((e) => I.createLabel(e)), B = u(), V = j ?? B, H = S || !!x, U = d !== void 0, [ne, W] = m(l ? void 0 : h), [re, G] = m(l ? h ?? [] : []), [K, ie] = m(() => {
3266
+ let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: l, value: d, defaultValue: h, onChange: g, placeholder: _, label: v, labelAddons: y, helperText: b, errorText: x, error: S = !1, required: C = !0, loading: w = !1, clearable: T = !1, searchable: E = !0, virtualized: D = !1, emptyText: O, locale: k = "en-US", size: A = "md", disabled: j = !1, id: M, className: N, wrapperClassName: P, dataTestId: F, ...ee } = e, I = e.isMulti ? !!e.singleLine : !1, L = Vr[k], R = _ ?? L.placeholder, z = O ?? L.noResults, B = c ?? ((e) => L.createLabel(e)), V = u(), H = M ?? V, U = S || !!x, W = d !== void 0, [te, G] = m(l ? void 0 : h), [ne, re] = m(l ? h ?? [] : []), [K, ie] = m(() => {
3267
3267
  let e = /* @__PURE__ */ new Map();
3268
3268
  for (let t of n) e.set(String(t.value), t);
3269
3269
  if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
@@ -3284,21 +3284,21 @@ var ai = a(function(e, t) {
3284
3284
  let ae = s((e) => K.get(String(e)) ?? {
3285
3285
  value: e,
3286
3286
  label: String(e)
3287
- }, [K]), oe = U ? d : ne, J = f(() => (U ? d : re) ?? [], [
3288
- U,
3287
+ }, [K]), oe = W ? d : te, se = f(() => (W ? d : ne) ?? [], [
3288
+ W,
3289
3289
  d,
3290
- re
3291
- ]), ce = !l && oe !== void 0 ? ae(oe) : null, le = l ? J.map(ae) : [], ue = f(() => {
3290
+ ne
3291
+ ]), ce = !l && oe !== void 0 ? ae(oe) : null, le = l ? se.map(ae) : [], ue = f(() => {
3292
3292
  if (r) return (e) => Promise.resolve(r(e)).then((e) => (q(e), e));
3293
3293
  }, [r, q]), Y = s((e) => {
3294
3294
  if (l) {
3295
3295
  let t = [...e ?? []];
3296
3296
  q(t);
3297
3297
  let n = t.map((e) => e.value);
3298
- G(n), g?.(n);
3298
+ re(n), g?.(n);
3299
3299
  } else {
3300
3300
  let t = e;
3301
- t && q([t]), W(t?.value), g?.(t?.value ?? void 0);
3301
+ t && q([t]), G(t?.value), g?.(t?.value ?? void 0);
3302
3302
  }
3303
3303
  }, [
3304
3304
  l,
@@ -3310,20 +3310,20 @@ var ai = a(function(e, t) {
3310
3310
  label: e
3311
3311
  };
3312
3312
  if (q([t]), o?.(e), l) {
3313
- let e = [...J, t.value];
3314
- G(e), g?.(e);
3315
- } else W(t.value), g?.(t.value);
3313
+ let e = [...se, t.value];
3314
+ re(e), g?.(e);
3315
+ } else G(t.value), g?.(t.value);
3316
3316
  }, [
3317
3317
  l,
3318
- J,
3318
+ se,
3319
3319
  q,
3320
3320
  g,
3321
3321
  o
3322
- ]), fe = !!r, pe = fe ? a ? be : ve : a ? ye : ge, me = f(() => Zr(ee, H, F), [
3323
- ee,
3324
- H,
3325
- F
3326
- ]), he = p(null), _e = p(null), xe = !!l && F, Se = Br({
3322
+ ]), fe = !!r, pe = fe ? a ? be : ve : a ? ye : ge, me = f(() => Zr(A, U, I), [
3323
+ A,
3324
+ U,
3325
+ I
3326
+ ]), he = p(null), _e = p(null), xe = !!l && I, Se = Br({
3327
3327
  wrapperRef: he,
3328
3328
  measureRef: _e,
3329
3329
  total: le.length,
@@ -3337,40 +3337,40 @@ var ai = a(function(e, t) {
3337
3337
  Te
3338
3338
  ]), ke = f(() => {
3339
3339
  if (!we || Oe.length === 0) return null;
3340
- let e = new Set(J.map(String)), t = Oe.filter((t) => e.has(String(t.value))).length;
3340
+ let e = new Set(se.map(String)), t = Oe.filter((t) => e.has(String(t.value))).length;
3341
3341
  return {
3342
3342
  count: Oe.length,
3343
3343
  checked: t === Oe.length,
3344
3344
  indeterminate: t > 0 && t < Oe.length,
3345
- label: I.selectAllLabel(Oe.length)
3345
+ label: L.selectAllLabel(Oe.length)
3346
3346
  };
3347
3347
  }, [
3348
3348
  we,
3349
3349
  Oe,
3350
- J,
3351
- I
3350
+ se,
3351
+ L
3352
3352
  ]), Ae = s(() => {
3353
3353
  if (!ke) return;
3354
3354
  let e = new Set(Oe.map((e) => String(e.value))), t;
3355
- if (ke.checked) t = J.filter((t) => !e.has(String(t)));
3355
+ if (ke.checked) t = se.filter((t) => !e.has(String(t)));
3356
3356
  else {
3357
3357
  q(Oe);
3358
- let e = new Set(J.map(String));
3359
- t = [...J, ...Oe.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
3358
+ let e = new Set(se.map(String));
3359
+ t = [...se, ...Oe.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
3360
3360
  }
3361
- G(t), g?.(t);
3361
+ re(t), g?.(t);
3362
3362
  }, [
3363
3363
  ke,
3364
3364
  Oe,
3365
- J,
3365
+ se,
3366
3366
  q,
3367
3367
  g
3368
3368
  ]), je = {
3369
- ...te,
3370
- inputId: V,
3369
+ ...ee,
3370
+ inputId: H,
3371
3371
  unstyled: !0,
3372
3372
  classNames: me,
3373
- className: M,
3373
+ className: N,
3374
3374
  isMulti: l,
3375
3375
  options: n,
3376
3376
  loadOptions: ue,
@@ -3378,7 +3378,7 @@ var ai = a(function(e, t) {
3378
3378
  value: l ? le : ce,
3379
3379
  onChange: Y,
3380
3380
  onCreateOption: a ? de : void 0,
3381
- formatCreateLabel: a ? z : void 0,
3381
+ formatCreateLabel: a ? B : void 0,
3382
3382
  getOptionValue: (e) => String(e.value),
3383
3383
  getOptionLabel: Yr,
3384
3384
  formatOptionLabel: (e, t) => t.context === "value" ? e.label : Ce && e.description ? /* @__PURE__ */ Z("span", {
@@ -3392,14 +3392,14 @@ var ai = a(function(e, t) {
3392
3392
  })]
3393
3393
  }) : e.label,
3394
3394
  isOptionDisabled: (e) => !!e.disabled,
3395
- placeholder: L,
3396
- isDisabled: A || w,
3395
+ placeholder: R,
3396
+ isDisabled: j || w,
3397
3397
  isClearable: T,
3398
3398
  isSearchable: E,
3399
3399
  isLoading: w || void 0,
3400
- noOptionsMessage: () => R,
3401
- loadingMessage: () => I.loadingMessage,
3402
- "aria-invalid": H || void 0,
3400
+ noOptionsMessage: () => z,
3401
+ loadingMessage: () => L.loadingMessage,
3402
+ "aria-invalid": U || void 0,
3403
3403
  "aria-required": C || void 0,
3404
3404
  ...we ? {
3405
3405
  inputValue: Te,
@@ -3421,13 +3421,13 @@ var ai = a(function(e, t) {
3421
3421
  };
3422
3422
  return /* @__PURE__ */ Z("div", {
3423
3423
  ref: he,
3424
- "data-test-id": P,
3425
- className: Q("flex flex-col gap-1.5 w-full", N),
3424
+ "data-test-id": F,
3425
+ className: Q("flex flex-col gap-1.5 w-full", P),
3426
3426
  children: [
3427
3427
  (v || y) && /* @__PURE__ */ Z("div", {
3428
3428
  className: "flex items-center gap-1.5",
3429
3429
  children: [v && /* @__PURE__ */ Z("label", {
3430
- htmlFor: V,
3430
+ htmlFor: H,
3431
3431
  className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
3432
3432
  children: [v, C && /* @__PURE__ */ X("span", {
3433
3433
  className: "text-fg-danger",
@@ -3461,7 +3461,7 @@ var ai = a(function(e, t) {
3461
3461
  children: Yr(e)
3462
3462
  }), /* @__PURE__ */ X("span", {
3463
3463
  className: Kr,
3464
- children: /* @__PURE__ */ X(se, {
3464
+ children: /* @__PURE__ */ X(J, {
3465
3465
  className: "h-3 w-3",
3466
3466
  "aria-hidden": !0
3467
3467
  })
@@ -3472,11 +3472,11 @@ var ai = a(function(e, t) {
3472
3472
  })]
3473
3473
  }),
3474
3474
  x ? /* @__PURE__ */ X("p", {
3475
- id: `${V}-error`,
3475
+ id: `${H}-error`,
3476
3476
  className: "text-p-sm text-fg-danger",
3477
3477
  children: x
3478
3478
  }) : b ? /* @__PURE__ */ X("p", {
3479
- id: `${V}-help`,
3479
+ id: `${H}-help`,
3480
3480
  className: "text-p-sm text-fg-secondary",
3481
3481
  children: b
3482
3482
  }) : null
@@ -3526,7 +3526,7 @@ var ci = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
3526
3526
  onClick: g,
3527
3527
  "aria-label": h ? "Expand sidebar" : "Collapse sidebar",
3528
3528
  className: Q("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
3529
- children: /* @__PURE__ */ X(F, { className: "h-4 w-4" })
3529
+ children: /* @__PURE__ */ X(I, { className: "h-4 w-4" })
3530
3530
  })
3531
3531
  ]
3532
3532
  }), /* @__PURE__ */ X("nav", {
@@ -3646,11 +3646,11 @@ var pi = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
3646
3646
  },
3647
3647
  info: {
3648
3648
  container: "bg-gray-900 dark:bg-gray-700 text-white",
3649
- icon: P
3649
+ icon: F
3650
3650
  },
3651
3651
  neutral: {
3652
3652
  container: "bg-gray-900 dark:bg-gray-700 text-white",
3653
- icon: P
3653
+ icon: F
3654
3654
  }
3655
3655
  }, hi = {
3656
3656
  success: "text-green-400",
@@ -3723,7 +3723,7 @@ function vi({ children: e, dataTestId: t }) {
3723
3723
  onClick: () => a(e.id),
3724
3724
  "aria-label": "Close",
3725
3725
  className: "shrink-0 p-1 rounded-md text-white/70 hover:text-white hover:bg-white/10",
3726
- children: /* @__PURE__ */ X(se, { className: "h-4 w-4" })
3726
+ children: /* @__PURE__ */ X(J, { className: "h-4 w-4" })
3727
3727
  })
3728
3728
  ]
3729
3729
  }, e.id);
@@ -4136,7 +4136,7 @@ function Qi({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
4136
4136
  className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
4137
4137
  children: [t && /* @__PURE__ */ X(Qt, {
4138
4138
  size: "sm",
4139
- leftIcon: /* @__PURE__ */ X(re, { className: "h-4 w-4" }),
4139
+ leftIcon: /* @__PURE__ */ X(ne, { className: "h-4 w-4" }),
4140
4140
  placeholder: r ?? "Search...",
4141
4141
  "aria-label": "Search",
4142
4142
  value: String(e.getState().globalFilter ?? ""),
@@ -4150,13 +4150,13 @@ function Qi({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
4150
4150
  size: "sm",
4151
4151
  iconOnly: !0,
4152
4152
  "aria-label": "Refresh",
4153
- leftIcon: /* @__PURE__ */ X(W, { className: "h-4 w-4" }),
4153
+ leftIcon: /* @__PURE__ */ X(G, { className: "h-4 w-4" }),
4154
4154
  onClick: i
4155
4155
  }),
4156
4156
  a && /* @__PURE__ */ X(nt, {
4157
4157
  variant: "secondary",
4158
4158
  size: "sm",
4159
- leftIcon: /* @__PURE__ */ X(A, { className: "h-4 w-4" }),
4159
+ leftIcon: /* @__PURE__ */ X(j, { className: "h-4 w-4" }),
4160
4160
  onClick: a,
4161
4161
  children: "Export"
4162
4162
  }),
@@ -4209,7 +4209,7 @@ function na({ row: e, actions: t }) {
4209
4209
  size: "sm",
4210
4210
  iconOnly: !0,
4211
4211
  "aria-label": "Row actions",
4212
- leftIcon: /* @__PURE__ */ X(z, { className: "h-4 w-4" })
4212
+ leftIcon: /* @__PURE__ */ X(B, { className: "h-4 w-4" })
4213
4213
  }) }), /* @__PURE__ */ X(In, {
4214
4214
  align: "end",
4215
4215
  children: t.map((t, n) => /* @__PURE__ */ X(Ln, {
@@ -4311,7 +4311,7 @@ function ua({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
4311
4311
  "aria-label": `Reorder ${typeof h == "string" ? h : c.id} column`,
4312
4312
  ...d.attributes,
4313
4313
  ...d.listeners,
4314
- children: /* @__PURE__ */ X(N, { className: "h-3.5 w-3.5" })
4314
+ children: /* @__PURE__ */ X(P, { className: "h-3.5 w-3.5" })
4315
4315
  }),
4316
4316
  n && c.getCanSort() ? /* @__PURE__ */ Z("button", {
4317
4317
  type: "button",
@@ -4332,30 +4332,30 @@ function ua({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
4332
4332
  type: "button",
4333
4333
  "aria-label": `${typeof h == "string" ? h : c.id} column options`,
4334
4334
  className: "ml-auto shrink-0 text-fg-tertiary hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 rounded-sm",
4335
- children: /* @__PURE__ */ X(R, { className: "h-3.5 w-3.5" })
4335
+ children: /* @__PURE__ */ X(z, { className: "h-3.5 w-3.5" })
4336
4336
  }) }), /* @__PURE__ */ Z(In, {
4337
4337
  align: "start",
4338
4338
  children: [
4339
4339
  o && c.getCanPin() && /* @__PURE__ */ Z(Y, { children: [
4340
4340
  c.getIsPinned() !== "left" && /* @__PURE__ */ X(Ln, {
4341
- icon: /* @__PURE__ */ X(H, { className: "h-4 w-4" }),
4341
+ icon: /* @__PURE__ */ X(U, { className: "h-4 w-4" }),
4342
4342
  onSelect: () => c.pin("left"),
4343
4343
  children: "Pin left"
4344
4344
  }),
4345
4345
  c.getIsPinned() !== "right" && /* @__PURE__ */ X(Ln, {
4346
- icon: /* @__PURE__ */ X(H, { className: "h-4 w-4" }),
4346
+ icon: /* @__PURE__ */ X(U, { className: "h-4 w-4" }),
4347
4347
  onSelect: () => c.pin("right"),
4348
4348
  children: "Pin right"
4349
4349
  }),
4350
4350
  c.getIsPinned() && /* @__PURE__ */ X(Ln, {
4351
- icon: /* @__PURE__ */ X(U, { className: "h-4 w-4" }),
4351
+ icon: /* @__PURE__ */ X(W, { className: "h-4 w-4" }),
4352
4352
  onSelect: () => c.pin(!1),
4353
4353
  children: "Unpin"
4354
4354
  })
4355
4355
  ] }),
4356
4356
  o && c.getCanPin() && s && c.getCanHide() && /* @__PURE__ */ X(Rn, {}),
4357
4357
  s && c.getCanHide() && /* @__PURE__ */ X(Ln, {
4358
- icon: /* @__PURE__ */ X(j, { className: "h-4 w-4" }),
4358
+ icon: /* @__PURE__ */ X(M, { className: "h-4 w-4" }),
4359
4359
  onSelect: () => c.toggleVisibility(!1),
4360
4360
  children: "Hide column"
4361
4361
  })
@@ -4427,125 +4427,145 @@ function fa({ rowCount: e }) {
4427
4427
  }, t)) });
4428
4428
  }
4429
4429
  function pa(e, t) {
4430
- let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: d, manualSorting: m = !1, enableFiltering: h = !1, columnFilters: g, onColumnFiltersChange: _, manualFiltering: v = !1, enableGlobalFilter: y = !1, globalFilter: b, onGlobalFilterChange: x, enableRowSelection: S = !1, enableMultiRowSelection: C = !0, rowSelection: w, onRowSelectionChange: T, enableColumnVisibility: E = !1, columnVisibility: D, onColumnVisibilityChange: O, enableColumnOrdering: k = !1, columnOrder: ee, onColumnOrderChange: A, enablePinning: j = !1, columnPinning: M, onColumnPinningChange: N, enableColumnResizing: P = !1, columnResizeMode: te = "onChange", enablePagination: F = !1, pageSize: I = 10, pageSizeOptions: L, pagination: R, onPaginationChange: z, manualPagination: B = !1, pageCount: V, rowCount: H, enableVirtualization: U = !1, estimatedRowHeight: ne = 44, maxBodyHeight: W = 480, onRowClick: re, toolbar: G = !1, toolbarActions: K, searchPlaceholder: ie, onRefresh: q, onExport: ae, density: oe = "comfortable", stickyHeader: J = !1, wrapperClassName: se, className: ce, dataTestId: le } = e, [ue, de] = ca(u, d, []), [fe, pe] = ca(g, _, []), [me, he] = ca(b, x, ""), [ge, _e] = ca(w, T, {}), [ve, ye] = ca(D, O, {}), [be, ke] = ca(ee, A, []), [Ae, je] = ca(M, N, {}), [Me, Ne] = ca(R, z, {
4430
+ let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: h, manualSorting: g = !1, enableFiltering: _ = !1, columnFilters: v, onColumnFiltersChange: y, manualFiltering: b = !1, enableGlobalFilter: x = !1, globalFilter: S, onGlobalFilterChange: C, enableRowSelection: w = !1, enableMultiRowSelection: T = !0, rowSelection: E, onRowSelectionChange: D, enableColumnVisibility: O = !1, columnVisibility: k, onColumnVisibilityChange: A, enableColumnOrdering: j = !1, columnOrder: M, onColumnOrderChange: N, enablePinning: P = !1, columnPinning: F, onColumnPinningChange: ee, enableColumnResizing: I = !1, columnResizeMode: L = "onChange", enablePagination: R = !1, pageSize: z = 10, pageSizeOptions: B, pagination: V, onPaginationChange: H, manualPagination: U = !1, pageCount: W, rowCount: te, enableVirtualization: G = !1, estimatedRowHeight: ne = 44, maxBodyHeight: re = 480, onRowClick: K, toolbar: ie = !1, toolbarActions: q, searchPlaceholder: ae, onRefresh: oe, onExport: se, density: J = "comfortable", stickyHeader: ce = !1, wrapperClassName: le, className: ue, dataTestId: de } = e, [fe, pe] = ca(u, h, []), [me, he] = ca(v, y, []), [ge, _e] = ca(S, C, ""), [ve, ye] = ca(E, D, {}), [be, ke] = ca(k, A, {}), [Ae, je] = ca(M, N, []), [Me, Ne] = ca(F, ee, {}), [Fe, Le] = ca(V, H, {
4431
4431
  pageIndex: 0,
4432
- pageSize: I
4433
- }), Fe = De({
4432
+ pageSize: z
4433
+ }), Re = De({
4434
4434
  data: n,
4435
- columns: f(() => !S || r.some((e) => e.id === "select") ? r : [aa(), ...r], [r, S]),
4435
+ columns: f(() => !w || r.some((e) => e.id === "select") ? r : [aa(), ...r], [r, w]),
4436
4436
  getRowId: s,
4437
4437
  state: {
4438
- sorting: ue,
4439
- columnFilters: fe,
4440
- globalFilter: me,
4441
- rowSelection: ge,
4442
- columnVisibility: ve,
4443
- columnOrder: be,
4444
- columnPinning: Ae,
4445
- pagination: Me
4438
+ sorting: fe,
4439
+ columnFilters: me,
4440
+ globalFilter: ge,
4441
+ rowSelection: ve,
4442
+ columnVisibility: be,
4443
+ columnOrder: Ae,
4444
+ columnPinning: Me,
4445
+ pagination: Fe
4446
4446
  },
4447
- onSortingChange: de,
4448
- onColumnFiltersChange: pe,
4449
- onGlobalFilterChange: he,
4450
- onRowSelectionChange: _e,
4451
- onColumnVisibilityChange: ye,
4452
- onColumnOrderChange: ke,
4453
- onColumnPinningChange: je,
4454
- onPaginationChange: Ne,
4447
+ onSortingChange: pe,
4448
+ onColumnFiltersChange: he,
4449
+ onGlobalFilterChange: _e,
4450
+ onRowSelectionChange: ye,
4451
+ onColumnVisibilityChange: ke,
4452
+ onColumnOrderChange: je,
4453
+ onColumnPinningChange: Ne,
4454
+ onPaginationChange: Le,
4455
4455
  enableSorting: c,
4456
4456
  enableMultiSort: l,
4457
- manualSorting: m,
4458
- enableFilters: h || y,
4459
- enableGlobalFilter: y,
4460
- manualFiltering: v,
4461
- enableRowSelection: S,
4462
- enableMultiRowSelection: C,
4463
- enableColumnResizing: P,
4464
- columnResizeMode: te,
4465
- manualPagination: B,
4466
- pageCount: V,
4467
- rowCount: H,
4457
+ manualSorting: g,
4458
+ enableFilters: _ || x,
4459
+ enableGlobalFilter: x,
4460
+ manualFiltering: b,
4461
+ enableRowSelection: w,
4462
+ enableMultiRowSelection: T,
4463
+ enableColumnResizing: I,
4464
+ columnResizeMode: L,
4465
+ manualPagination: U,
4466
+ pageCount: W,
4467
+ rowCount: te,
4468
4468
  getCoreRowModel: Ce(),
4469
4469
  getSortedRowModel: c ? Ee() : void 0,
4470
- getFilteredRowModel: h || y ? we() : void 0,
4471
- getPaginationRowModel: F ? Te() : void 0
4472
- }), Le = Fe.getRowModel().rows, Re = Fe.getVisibleLeafColumns().length, ze = f(() => be.length > 0 ? be : Fe.getAllLeafColumns().map((e) => e.id), [be, Fe]), Be = ea({
4473
- columnOrder: ze,
4474
- onColumnOrderChange: ke
4475
- }), Ve = (e) => Be.handleDragEnd(e), He = p(null), Ue = xe({
4476
- count: Le.length,
4477
- getScrollElement: () => He.current,
4470
+ getFilteredRowModel: _ || x ? we() : void 0,
4471
+ getPaginationRowModel: R ? Te() : void 0
4472
+ }), ze = Re.getRowModel().rows, Be = Re.getVisibleLeafColumns().length, Ve = p(null), [He, Ue] = m(null);
4473
+ d(() => {
4474
+ if (!R || G) return;
4475
+ let e = Ve.current?.getBoundingClientRect().height;
4476
+ e && e !== He && Ue(e);
4477
+ }, [
4478
+ R,
4479
+ G,
4480
+ J,
4481
+ ze,
4482
+ He
4483
+ ]);
4484
+ let We = He ?? ne, Ge = R && !G ? Math.max(0, Fe.pageSize - ze.length) * We : 0, Ke = f(() => Ae.length > 0 ? Ae : Re.getAllLeafColumns().map((e) => e.id), [Ae, Re]), qe = ea({
4485
+ columnOrder: Ke,
4486
+ onColumnOrderChange: je
4487
+ }), Je = (e) => qe.handleDragEnd(e), Ye = p(null), Xe = xe({
4488
+ count: ze.length,
4489
+ getScrollElement: () => Ye.current,
4478
4490
  estimateSize: () => ne,
4479
4491
  overscan: 10,
4480
- enabled: U
4481
- }), We = U ? Ue.getVirtualItems() : null, Ge = We && We.length > 0 ? We[0]?.start ?? 0 : 0, Ke = We && We.length > 0 ? Ue.getTotalSize() - (We[We.length - 1]?.end ?? 0) : 0, qe = (e) => /* @__PURE__ */ X("tr", {
4492
+ enabled: G
4493
+ }), Ze = G ? Xe.getVirtualItems() : null, Qe = Ze && Ze.length > 0 ? Ze[0]?.start ?? 0 : 0, $e = Ze && Ze.length > 0 ? Xe.getTotalSize() - (Ze[Ze.length - 1]?.end ?? 0) : 0, et = (e, t) => /* @__PURE__ */ X("tr", {
4494
+ ref: t,
4482
4495
  "data-selected": e.getIsSelected() || void 0,
4483
- onClick: re ? () => re(e.original) : void 0,
4484
- className: Q("border-t border-border-default", re && "cursor-pointer hover:bg-bg-container", e.getIsSelected() && "bg-brand-50"),
4496
+ onClick: K ? () => K(e.original) : void 0,
4497
+ className: Q("group border-t border-border-default", K && "cursor-pointer"),
4485
4498
  children: e.getVisibleCells().map((e) => /* @__PURE__ */ X("td", {
4486
4499
  style: sa(e.column),
4487
- className: Q("bg-bg-default px-4", ra[oe], ia[e.column.columnDef.meta?.align ?? "left"]),
4500
+ className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", ra[J], ia[e.column.columnDef.meta?.align ?? "left"]),
4488
4501
  children: Se(e.column.columnDef.cell, e.getContext())
4489
4502
  }, e.id))
4490
- }, e.id), Je = (e, t) => /* @__PURE__ */ X("tr", { children: t.map((e) => /* @__PURE__ */ X(ua, {
4503
+ }, e.id), tt = (e, t) => /* @__PURE__ */ X("tr", { children: t.map((e) => /* @__PURE__ */ X(ua, {
4491
4504
  header: e,
4492
- density: oe,
4505
+ density: J,
4493
4506
  enableSorting: c,
4494
- enableFiltering: h,
4495
- enableColumnOrdering: k,
4496
- enableColumnResizing: P,
4497
- enablePinning: j,
4498
- enableColumnVisibility: E
4499
- }, e.id)) }, e), Ye = /* @__PURE__ */ Z("table", {
4507
+ enableFiltering: _,
4508
+ enableColumnOrdering: j,
4509
+ enableColumnResizing: I,
4510
+ enablePinning: P,
4511
+ enableColumnVisibility: O
4512
+ }, e.id)) }, e), nt = /* @__PURE__ */ Z("table", {
4500
4513
  className: "w-full border-collapse text-p-std text-fg-default",
4501
- style: { width: P ? Fe.getTotalSize() : "100%" },
4514
+ style: { width: I ? Re.getTotalSize() : "100%" },
4502
4515
  children: [/* @__PURE__ */ X("thead", {
4503
- className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", J && "sticky top-0 z-2"),
4504
- children: Fe.getHeaderGroups().map((e) => Je(e.id, e.headers))
4516
+ className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", ce && "sticky top-0 z-10"),
4517
+ children: Re.getHeaderGroups().map((e) => tt(e.id, e.headers))
4505
4518
  }), /* @__PURE__ */ X("tbody", { children: i ? /* @__PURE__ */ X(Yi, {
4506
- columnCount: Re,
4507
- rowCount: Me.pageSize
4508
- }) : Le.length === 0 ? /* @__PURE__ */ X("tr", { children: /* @__PURE__ */ X("td", {
4509
- colSpan: Re,
4519
+ columnCount: Be,
4520
+ rowCount: Fe.pageSize
4521
+ }) : ze.length === 0 ? /* @__PURE__ */ X("tr", { children: /* @__PURE__ */ X("td", {
4522
+ colSpan: Be,
4510
4523
  className: "p-0",
4511
4524
  children: /* @__PURE__ */ X(Xn, {
4512
4525
  size: "sm",
4513
4526
  title: o
4514
4527
  })
4515
- }) }) : U && We ? /* @__PURE__ */ Z(Y, { children: [
4516
- Ge > 0 && /* @__PURE__ */ X("tr", {
4528
+ }) }) : G && Ze ? /* @__PURE__ */ Z(Y, { children: [
4529
+ Qe > 0 && /* @__PURE__ */ X("tr", {
4517
4530
  "aria-hidden": !0,
4518
4531
  children: /* @__PURE__ */ X("td", {
4519
- style: { height: Ge },
4520
- colSpan: Re
4532
+ style: { height: Qe },
4533
+ colSpan: Be
4521
4534
  })
4522
4535
  }),
4523
- We.map((e) => {
4524
- let t = Le[e.index];
4525
- return t ? qe(t) : null;
4536
+ Ze.map((e) => {
4537
+ let t = ze[e.index];
4538
+ return t ? et(t) : null;
4526
4539
  }),
4527
- Ke > 0 && /* @__PURE__ */ X("tr", {
4540
+ $e > 0 && /* @__PURE__ */ X("tr", {
4528
4541
  "aria-hidden": !0,
4529
4542
  children: /* @__PURE__ */ X("td", {
4530
- style: { height: Ke },
4531
- colSpan: Re
4543
+ style: { height: $e },
4544
+ colSpan: Be
4532
4545
  })
4533
4546
  })
4534
- ] }) : Le.map(qe) })]
4547
+ ] }) : /* @__PURE__ */ Z(Y, { children: [ze.map((e, t) => et(e, t === 0 ? Ve : void 0)), Ge > 0 && /* @__PURE__ */ X("tr", {
4548
+ "aria-hidden": !0,
4549
+ children: /* @__PURE__ */ X("td", {
4550
+ style: { height: Ge },
4551
+ colSpan: Be,
4552
+ className: "p-0"
4553
+ })
4554
+ })] }) })]
4535
4555
  });
4536
4556
  return /* @__PURE__ */ Z("div", {
4537
4557
  ref: t,
4538
- "data-test-id": le,
4539
- className: Q("w-full rounded-lg border border-border-default bg-bg-default", se, ce),
4558
+ "data-test-id": de,
4559
+ className: Q("w-full rounded-lg border border-border-default bg-bg-default", le, ue),
4540
4560
  children: [
4541
- G === !1 ? null : G ?? /* @__PURE__ */ X(Qi, {
4542
- table: Fe,
4543
- enableGlobalFilter: y,
4544
- enableColumnVisibility: E,
4545
- searchPlaceholder: ie,
4546
- onRefresh: q,
4547
- onExport: ae,
4548
- actions: K
4561
+ ie === !1 ? null : ie ?? /* @__PURE__ */ X(Qi, {
4562
+ table: Re,
4563
+ enableGlobalFilter: x,
4564
+ enableColumnVisibility: O,
4565
+ searchPlaceholder: ae,
4566
+ onRefresh: oe,
4567
+ onExport: se,
4568
+ actions: q
4549
4569
  }),
4550
4570
  a ? /* @__PURE__ */ X("div", {
4551
4571
  className: "p-4",
@@ -4557,34 +4577,34 @@ function pa(e, t) {
4557
4577
  }) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", {
4558
4578
  className: "hidden md:block",
4559
4579
  children: /* @__PURE__ */ X("div", {
4560
- ref: He,
4561
- className: Q("w-full overflow-auto", G === !1 ? "rounded-lg" : "rounded-b-lg"),
4562
- style: U || J ? { maxHeight: W } : void 0,
4563
- children: k ? /* @__PURE__ */ X(Oe, {
4564
- sensors: Be.sensors,
4565
- collisionDetection: Be.collisionDetection,
4566
- modifiers: Be.modifiers,
4567
- onDragEnd: Ve,
4580
+ ref: Ye,
4581
+ className: Q("w-full overflow-auto", ie === !1 ? "rounded-lg" : "rounded-b-lg"),
4582
+ style: G || ce ? { maxHeight: re } : void 0,
4583
+ children: j ? /* @__PURE__ */ X(Oe, {
4584
+ sensors: qe.sensors,
4585
+ collisionDetection: qe.collisionDetection,
4586
+ modifiers: qe.modifiers,
4587
+ onDragEnd: Je,
4568
4588
  children: /* @__PURE__ */ X(Pe, {
4569
- items: ze,
4589
+ items: Ke,
4570
4590
  strategy: Ie,
4571
- children: Ye
4591
+ children: nt
4572
4592
  })
4573
- }) : Ye
4593
+ }) : nt
4574
4594
  })
4575
4595
  }), /* @__PURE__ */ X("div", {
4576
4596
  className: "md:hidden",
4577
- children: i ? /* @__PURE__ */ X(fa, { rowCount: Me.pageSize }) : Le.length === 0 ? /* @__PURE__ */ X(Xn, {
4597
+ children: i ? /* @__PURE__ */ X(fa, { rowCount: Fe.pageSize }) : ze.length === 0 ? /* @__PURE__ */ X(Xn, {
4578
4598
  size: "sm",
4579
4599
  title: o
4580
- }) : Le.map((e) => /* @__PURE__ */ X(da, {
4600
+ }) : ze.map((e) => /* @__PURE__ */ X(da, {
4581
4601
  row: e,
4582
- onRowClick: re
4602
+ onRowClick: K
4583
4603
  }, e.id))
4584
4604
  })] }),
4585
- F && !a && /* @__PURE__ */ X(Ji, {
4586
- table: Fe,
4587
- pageSizeOptions: L
4605
+ R && !a && /* @__PURE__ */ X(Ji, {
4606
+ table: Re,
4607
+ pageSizeOptions: B
4588
4608
  })
4589
4609
  ]
4590
4610
  });
@@ -4827,7 +4847,7 @@ var ba = {
4827
4847
  children: [/* @__PURE__ */ X(ie, {
4828
4848
  className: "size-4 text-yellow-500 z-1",
4829
4849
  "aria-hidden": !0
4830
- }), /* @__PURE__ */ X(L, {
4850
+ }), /* @__PURE__ */ X(R, {
4831
4851
  className: "size-4 text-gray-400 z-1",
4832
4852
  "aria-hidden": !0
4833
4853
  })]