@jinaan/uikit 0.1.31 → 0.1.34

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,6 +1,6 @@
1
1
  import { jsx as t, jsxs as s, Fragment as Oe } from "react/jsx-runtime";
2
2
  import { CircleNotch as Lt, Robot as Rt, Terminal as At, Check as X, Copy as Xe, XCircle as Bt, Warning as Ft, CheckCircle as $t, Info as qt, Minus as Gt, X as ie, CaretDown as oe, CaretRight as Ht, MagnifyingGlass as Vt, Columns as Ut, Lock as Wt, DotsSixVertical as Ot, FunnelSimple as $e, WarningCircle as Xt, CaretUp as Jt, CaretUpDown as Qt } from "@phosphor-icons/react";
3
- import { forwardRef as f, useState as T, Children as Je, isValidElement as Qe, useRef as ae, useEffect as U, useContext as B, useCallback as Yt, createContext as J, useId as de, useMemo as qe } from "react";
3
+ import { forwardRef as f, useState as D, Children as Je, isValidElement as Qe, useRef as ae, useEffect as U, useContext as B, useCallback as Yt, createContext as J, useId as de, useMemo as qe } from "react";
4
4
  import { Slot as Zt } from "@radix-ui/react-slot";
5
5
  import { cva as we } from "class-variance-authority";
6
6
  import { clsx as Kt } from "clsx";
@@ -8,8 +8,8 @@ import { twMerge as ea } from "tailwind-merge";
8
8
  import * as Ce from "@radix-ui/react-avatar";
9
9
  import * as Ge from "@radix-ui/react-checkbox";
10
10
  import * as I from "@radix-ui/react-dialog";
11
- import * as z from "@radix-ui/react-dropdown-menu";
12
- import * as P from "@radix-ui/react-select";
11
+ import * as k from "@radix-ui/react-dropdown-menu";
12
+ import * as M from "@radix-ui/react-select";
13
13
  import * as ta from "@radix-ui/react-label";
14
14
  import * as aa from "@radix-ui/react-separator";
15
15
  import * as O from "@radix-ui/react-tooltip";
@@ -65,49 +65,49 @@ const la = we(
65
65
  lg: "[&_svg]:size-[var(--control-icon-lg)]",
66
66
  xl: "[&_svg]:size-[var(--control-icon-xl)]",
67
67
  icon: "[&_svg]:size-[var(--control-icon-md)]"
68
- }, M = f(
68
+ }, T = f(
69
69
  ({
70
70
  className: e,
71
71
  variant: a,
72
72
  size: n = "md",
73
73
  asChild: l = !1,
74
74
  leadingIcon: i,
75
- trailingIcon: c,
76
- iconOnly: u = !1,
77
- loading: m = !1,
78
- fullWidth: b = !1,
79
- disabled: g,
75
+ trailingIcon: u,
76
+ iconOnly: m = !1,
77
+ loading: c = !1,
78
+ fullWidth: x = !1,
79
+ disabled: b,
80
80
  children: h,
81
- ...y
81
+ ...N
82
82
  }, S) => {
83
- const k = l ? Zt : "button", w = ia[n ?? "md"];
83
+ const C = l ? Zt : "button", w = ia[n ?? "md"];
84
84
  return /* @__PURE__ */ t(
85
- k,
85
+ C,
86
86
  {
87
87
  ref: S,
88
- "aria-busy": m || void 0,
89
- disabled: l ? void 0 : g || m,
88
+ "aria-busy": c || void 0,
89
+ disabled: l ? void 0 : b || c,
90
90
  className: o(
91
91
  la({ variant: a, size: n }),
92
- u && "aspect-square px-0",
93
- b && "w-full",
94
- m && "disabled:opacity-100",
92
+ m && "aspect-square px-0",
93
+ x && "w-full",
94
+ c && "disabled:opacity-100",
95
95
  e
96
96
  ),
97
- ...y,
97
+ ...N,
98
98
  children: l ? h : /* @__PURE__ */ s("span", { className: "relative inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap)", children: [
99
99
  /* @__PURE__ */ s(
100
100
  "span",
101
101
  {
102
102
  className: o(
103
103
  "inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap) transition-[opacity,translate] duration-150 ease-out motion-reduce:transition-none",
104
- m && "translate-y-2 opacity-0"
104
+ c && "translate-y-2 opacity-0"
105
105
  ),
106
- "aria-hidden": m || void 0,
106
+ "aria-hidden": c || void 0,
107
107
  children: [
108
- !m && i ? /* @__PURE__ */ t("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: i }) : null,
108
+ !c && i ? /* @__PURE__ */ t("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: i }) : null,
109
109
  h,
110
- !m && c ? /* @__PURE__ */ t("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: c }) : null
110
+ !c && u ? /* @__PURE__ */ t("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: u }) : null
111
111
  ]
112
112
  }
113
113
  ),
@@ -117,7 +117,7 @@ const la = we(
117
117
  "data-button-spinner": !0,
118
118
  className: o(
119
119
  "pointer-events-none absolute inset-0 flex items-center justify-center transition-[opacity,translate] duration-150 ease-out motion-reduce:transition-none",
120
- m ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
120
+ c ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
121
121
  ),
122
122
  "aria-hidden": !0,
123
123
  children: /* @__PURE__ */ t(na, { className: o("text-current", w) })
@@ -128,16 +128,16 @@ const la = we(
128
128
  );
129
129
  }
130
130
  );
131
- M.displayName = "Button";
131
+ T.displayName = "Button";
132
132
  function rr({
133
133
  command: e,
134
134
  tag: a = "Build with agents",
135
135
  icon: n,
136
136
  className: l
137
137
  }) {
138
- const [i, c] = T(!1), u = async () => {
138
+ const [i, u] = D(!1), m = async () => {
139
139
  try {
140
- await navigator.clipboard.writeText(e), c(!0), window.setTimeout(() => c(!1), 1500);
140
+ await navigator.clipboard.writeText(e), u(!0), window.setTimeout(() => u(!1), 1500);
141
141
  } catch {
142
142
  }
143
143
  };
@@ -150,14 +150,14 @@ function rr({
150
150
  /* @__PURE__ */ t(At, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
151
151
  /* @__PURE__ */ t("span", { className: "truncate font-mono text-sm text-fg", children: e }),
152
152
  /* @__PURE__ */ t(
153
- M,
153
+ T,
154
154
  {
155
155
  variant: "ghost",
156
156
  size: "sm",
157
157
  iconOnly: !0,
158
158
  "aria-label": "Copy prompt",
159
159
  className: "ml-auto",
160
- onClick: u,
160
+ onClick: m,
161
161
  children: i ? /* @__PURE__ */ t(X, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ t(Xe, {})
162
162
  }
163
163
  )
@@ -262,7 +262,7 @@ function nr({
262
262
  icon: l,
263
263
  className: i
264
264
  }) {
265
- const { Icon: c, className: u, iconClassName: m } = ca[e];
265
+ const { Icon: u, className: m, iconClassName: c } = ca[e];
266
266
  return /* @__PURE__ */ s(
267
267
  "div",
268
268
  {
@@ -270,11 +270,11 @@ function nr({
270
270
  className: o(
271
271
  "flex items-start gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
272
272
  "animate-in fade-in-0 slide-in-from-top-1 duration-200 motion-reduce:animate-none",
273
- u,
273
+ m,
274
274
  i
275
275
  ),
276
276
  children: [
277
- /* @__PURE__ */ t("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", m), children: l ?? /* @__PURE__ */ t(c, { weight: "fill" }) }),
277
+ /* @__PURE__ */ t("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", c), children: l ?? /* @__PURE__ */ t(u, { weight: "fill" }) }),
278
278
  /* @__PURE__ */ s("div", { className: "min-w-0 space-y-0.5", children: [
279
279
  a ? /* @__PURE__ */ t("p", { className: "font-medium text-fg", children: a }) : null,
280
280
  n ? /* @__PURE__ */ t("div", { className: "text-muted", children: n }) : null
@@ -382,14 +382,14 @@ function ce({
382
382
  header: n,
383
383
  children: l,
384
384
  action: i,
385
- tone: c = "default",
386
- className: u,
387
- headerClassName: m,
388
- panelClassName: b,
389
- minHeight: g
385
+ tone: u = "default",
386
+ className: m,
387
+ headerClassName: c,
388
+ panelClassName: x,
389
+ minHeight: b
390
390
  }) {
391
- const h = !!(e || a), y = ga(i) ? /* @__PURE__ */ t(
392
- M,
391
+ const h = !!(e || a), N = ga(i) ? /* @__PURE__ */ t(
392
+ T,
393
393
  {
394
394
  variant: i.variant ?? "primary",
395
395
  size: "xs",
@@ -403,17 +403,17 @@ function ce({
403
403
  ] }) : i.label
404
404
  }
405
405
  ) : i;
406
- return /* @__PURE__ */ s(ua, { className: o("relative", ba[c], u), children: [
406
+ return /* @__PURE__ */ s(ua, { className: o("relative", ba[u], m), children: [
407
407
  /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
408
408
  n || h ? (
409
409
  // Header rows must not inherit the body row hover surface.
410
- /* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent] text-table-header", m), children: [
410
+ /* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent] text-table-header", c), children: [
411
411
  h ? /* @__PURE__ */ s(
412
412
  "div",
413
413
  {
414
414
  className: o(
415
415
  "px-(--table-pad-x) pb-3 pt-4",
416
- y && "pr-28"
416
+ N && "pr-28"
417
417
  ),
418
418
  children: [
419
419
  e ? /* @__PURE__ */ t("div", { className: "text-sm font-semibold text-fg", children: e }) : null,
@@ -427,13 +427,13 @@ function ce({
427
427
  /* @__PURE__ */ t(
428
428
  ma,
429
429
  {
430
- className: o(ha[c], b),
431
- style: g ? { minHeight: g } : void 0,
430
+ className: o(ha[u], x),
431
+ style: b ? { minHeight: b } : void 0,
432
432
  children: l
433
433
  }
434
434
  )
435
435
  ] }),
436
- y ? /* @__PURE__ */ t("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ t("div", { className: "pointer-events-auto", children: y }) }) : null
436
+ N ? /* @__PURE__ */ t("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ t("div", { className: "pointer-events-auto", children: N }) }) : null
437
437
  ] });
438
438
  }
439
439
  function xa(e) {
@@ -447,8 +447,8 @@ function xa(e) {
447
447
  }
448
448
  const va = f(
449
449
  ({ className: e, children: a, ...n }, l) => {
450
- const { header: i, body: c } = xa(a);
451
- return /* @__PURE__ */ t("div", { ref: l, ...n, children: /* @__PURE__ */ t(ce, { className: o("shadow-xs", e), header: i, children: c }) });
450
+ const { header: i, body: u } = xa(a);
451
+ return /* @__PURE__ */ t("div", { ref: l, ...n, children: /* @__PURE__ */ t(ce, { className: o("shadow-xs", e), header: i, children: u }) });
452
452
  }
453
453
  );
454
454
  va.displayName = "Card";
@@ -580,39 +580,39 @@ function Ta({
580
580
  children: l,
581
581
  ...i
582
582
  }) {
583
- const [c, u] = T(
583
+ const [u, m] = D(
584
584
  a ?? !1
585
- ), [m, b] = T(!1), g = ae(!1), h = ae(null), y = e ?? c, S = ae(y);
586
- S.current = y;
587
- const k = e !== void 0;
585
+ ), [c, x] = D(!1), b = ae(!1), h = ae(null), N = e ?? u, S = ae(N);
586
+ S.current = N;
587
+ const C = e !== void 0;
588
588
  U(() => ka(), []), U(() => {
589
- e && (h.current && clearTimeout(h.current), g.current = !1, b(!1));
589
+ e && (h.current && clearTimeout(h.current), b.current = !1, x(!1));
590
590
  }, [e]), U(
591
591
  () => () => {
592
592
  h.current && clearTimeout(h.current);
593
593
  },
594
594
  []
595
595
  );
596
- const w = (x) => {
597
- if (x) {
598
- h.current && clearTimeout(h.current), g.current = !1, b(!1), k || u(!0), n == null || n(!0);
596
+ const w = (P) => {
597
+ if (P) {
598
+ h.current && clearTimeout(h.current), b.current = !1, x(!1), C || m(!0), n == null || n(!0);
599
599
  return;
600
600
  }
601
- if (!y || g.current) return;
601
+ if (!N || b.current) return;
602
602
  if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
603
- k || u(!1), n == null || n(!1);
603
+ C || m(!1), n == null || n(!1);
604
604
  return;
605
605
  }
606
- g.current = !0, b(!0), h.current = setTimeout(() => {
607
- k || u(!1), n == null || n(!1), requestAnimationFrame(() => {
608
- S.current && (g.current = !1, b(!1));
606
+ b.current = !0, x(!0), h.current = setTimeout(() => {
607
+ C || m(!1), n == null || n(!1), requestAnimationFrame(() => {
608
+ S.current && (b.current = !1, x(!1));
609
609
  });
610
610
  }, Da);
611
611
  };
612
- return /* @__PURE__ */ t(rt.Provider, { value: () => w(!1), children: /* @__PURE__ */ t(at.Provider, { value: m, children: /* @__PURE__ */ t(ke.Provider, { value: !0, children: /* @__PURE__ */ t(
612
+ return /* @__PURE__ */ t(rt.Provider, { value: () => w(!1), children: /* @__PURE__ */ t(at.Provider, { value: c, children: /* @__PURE__ */ t(ke.Provider, { value: !0, children: /* @__PURE__ */ t(
613
613
  I.Root,
614
614
  {
615
- open: y,
615
+ open: N,
616
616
  onOpenChange: w,
617
617
  ...i,
618
618
  children: l
@@ -631,7 +631,7 @@ const nt = f(({ onClick: e, ...a }, n) => /* @__PURE__ */ t(
631
631
  ));
632
632
  nt.displayName = "DialogTrigger";
633
633
  const sr = I.Close, lt = f(
634
- ({ variant: e = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ t(I.Close, { asChild: !0, children: /* @__PURE__ */ t(M, { ref: l, type: "button", variant: e, ...n, children: a }) })
634
+ ({ variant: e = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ t(I.Close, { asChild: !0, children: /* @__PURE__ */ t(T, { ref: l, type: "button", variant: e, ...n, children: a }) })
635
635
  );
636
636
  lt.displayName = "DialogCancel";
637
637
  function it(e, a = !0) {
@@ -645,12 +645,12 @@ function it(e, a = !0) {
645
645
  e.dataset.dialogMotionStarted = "true";
646
646
  const l = za(e), i = l ? Sa(l, n) : null;
647
647
  i ? (e.style.setProperty("--dialog-dx", `${i.dx}px`), e.style.setProperty("--dialog-dy", `${i.dy}px`), e.style.setProperty("--dialog-sx", String(i.sx)), e.style.setProperty("--dialog-sy", String(i.sy)), e.classList.add("dialog-fly-in")) : (e.style.removeProperty("--dialog-dx"), e.style.removeProperty("--dialog-dy"), e.style.removeProperty("--dialog-sx"), e.style.removeProperty("--dialog-sy"), e.classList.add("dialog-pop-in"));
648
- const c = () => {
648
+ const u = () => {
649
649
  e.classList.remove("dialog-fly-in", "dialog-pop-in");
650
- }, u = (m) => {
651
- m.target === e && (m.animationName !== "dialog-fly-in" && m.animationName !== "dialog-pop-in" || (e.removeEventListener("animationend", u), c()));
650
+ }, m = (c) => {
651
+ c.target === e && (c.animationName !== "dialog-fly-in" && c.animationName !== "dialog-pop-in" || (e.removeEventListener("animationend", m), u()));
652
652
  };
653
- e.addEventListener("animationend", u);
653
+ e.addEventListener("animationend", m);
654
654
  }
655
655
  function Ma(e) {
656
656
  return e.replace(/dvh\b/g, "vh");
@@ -661,23 +661,24 @@ const ot = f(
661
661
  children: a,
662
662
  placement: n = "center",
663
663
  topOffset: l = "11dvh",
664
- style: i,
665
- onEscapeKeyDown: c,
666
- onPointerDownOutside: u,
667
- ...m
664
+ motion: i = "auto",
665
+ style: u,
666
+ onEscapeKeyDown: m,
667
+ onPointerDownOutside: c,
668
+ ...x
668
669
  }, b) => {
669
- const g = B(at), h = n === "top", y = h ? {
670
+ const h = B(at), N = n === "top", S = N ? {
670
671
  "--dialog-top-offset": l,
671
672
  "--dialog-top-offset-fallback": Ma(l)
672
- } : void 0, S = B(rt), k = ae(null), w = Yt(
673
- (x) => {
674
- if (k.current = x, x && it(x), typeof b == "function") {
675
- b(x);
673
+ } : void 0, C = B(rt), w = ae(null), P = Yt(
674
+ (g) => {
675
+ if (w.current = g, g && i === "auto" && it(g), typeof b == "function") {
676
+ b(g);
676
677
  return;
677
678
  }
678
- b && (b.current = x);
679
+ b && (b.current = g);
679
680
  },
680
- [b]
681
+ [i, b]
681
682
  );
682
683
  return /* @__PURE__ */ s(I.Portal, { children: [
683
684
  /* @__PURE__ */ t(
@@ -685,8 +686,8 @@ const ot = f(
685
686
  {
686
687
  className: o(
687
688
  "fixed inset-0 z-50 overflow-hidden bg-overlay backdrop-blur-[3px] data-[state=open]:animate-in data-[state=open]:fade-in-0",
688
- !g && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
689
- g && "opacity-0 transition-opacity duration-200"
689
+ !h && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
690
+ h && "opacity-0 transition-opacity duration-200"
690
691
  ),
691
692
  children: /* @__PURE__ */ t(
692
693
  "span",
@@ -702,28 +703,29 @@ const ot = f(
702
703
  {
703
704
  className: o(
704
705
  "pointer-events-none fixed inset-0 z-50 flex justify-center overflow-y-auto p-4",
705
- h ? "items-start" : "items-center"
706
+ N ? "items-start" : "items-center"
706
707
  ),
707
708
  children: /* @__PURE__ */ s(
708
709
  I.Content,
709
710
  {
710
- ref: w,
711
- style: y ? { ...y, ...i } : i,
711
+ ref: P,
712
+ style: S ? { ...S, ...u } : u,
712
713
  className: o(
713
714
  "dialog-content pointer-events-auto relative flex max-h-[min(85vh,44rem)] w-full max-w-[22.4rem] flex-col gap-0 overflow-hidden will-change-[transform,opacity]",
714
715
  "rounded-2xl border border-(--dialog-shell-border) bg-(--dialog-shell-bg) pb-3 shadow-(--dialog-shell-shadow) sm:pb-4",
715
- h && "dialog-anchor-top",
716
- g && "dialog-closing",
716
+ N && "dialog-anchor-top",
717
+ i === "command" && "dialog-command-motion",
718
+ h && "dialog-closing",
717
719
  "focus:outline-none",
718
720
  e
719
721
  ),
720
- onEscapeKeyDown: (x) => {
721
- c == null || c(x), !x.defaultPrevented && (x.preventDefault(), S());
722
+ onEscapeKeyDown: (g) => {
723
+ m == null || m(g), !g.defaultPrevented && (g.preventDefault(), C());
722
724
  },
723
- onPointerDownOutside: (x) => {
724
- u == null || u(x), !x.defaultPrevented && (x.preventDefault(), S());
725
+ onPointerDownOutside: (g) => {
726
+ c == null || c(g), !g.defaultPrevented && (g.preventDefault(), C());
725
727
  },
726
- ...m,
728
+ ...x,
727
729
  children: [
728
730
  a,
729
731
  /* @__PURE__ */ s(I.Close, { className: "absolute right-3.5 top-3.5 z-10 rounded-sm text-subtle transition-colors hover:text-fg focus-visible:outline-none", children: [
@@ -831,14 +833,14 @@ function La({
831
833
  onChange: n,
832
834
  disabled: l = !1,
833
835
  name: i,
834
- className: c,
835
- children: u,
836
- ...m
836
+ className: u,
837
+ children: m,
838
+ ...c
837
839
  }) {
838
- const b = de(), g = i ?? b;
839
- return /* @__PURE__ */ t(dt.Provider, { value: { name: g, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", c), ...m, children: [
840
+ const x = de(), b = i ?? x;
841
+ return /* @__PURE__ */ t(dt.Provider, { value: { name: b, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", u), ...c, children: [
840
842
  /* @__PURE__ */ t("legend", { className: "sr-only", children: e }),
841
- u
843
+ m
842
844
  ] }) });
843
845
  }
844
846
  function Ra({
@@ -847,34 +849,34 @@ function Ra({
847
849
  description: n,
848
850
  badge: l,
849
851
  disabled: i = !1,
850
- className: c
852
+ className: u
851
853
  }) {
852
- const u = B(dt), m = de();
853
- if (!u)
854
+ const m = B(dt), c = de();
855
+ if (!m)
854
856
  throw new Error("RadioCard must be rendered inside a RadioGroup");
855
- const b = i || u.disabled, g = u.value === e;
857
+ const x = i || m.disabled, b = m.value === e;
856
858
  return /* @__PURE__ */ s(
857
859
  "label",
858
860
  {
859
861
  className: o(
860
862
  "group relative flex items-start gap-3",
861
- b ? "cursor-not-allowed opacity-50" : "cursor-pointer",
862
- c
863
+ x ? "cursor-not-allowed opacity-50" : "cursor-pointer",
864
+ u
863
865
  ),
864
866
  children: [
865
867
  /* @__PURE__ */ t(
866
868
  "input",
867
869
  {
868
870
  type: "radio",
869
- name: u.name,
871
+ name: m.name,
870
872
  value: e,
871
- checked: g,
872
- disabled: b,
873
+ checked: b,
874
+ disabled: x,
873
875
  onChange: () => {
874
876
  var h;
875
- return (h = u.onChange) == null ? void 0 : h.call(u, e);
877
+ return (h = m.onChange) == null ? void 0 : h.call(m, e);
876
878
  },
877
- "aria-describedby": n ? m : void 0,
879
+ "aria-describedby": n ? c : void 0,
878
880
  className: "peer sr-only"
879
881
  }
880
882
  ),
@@ -894,7 +896,7 @@ function Ra({
894
896
  /* @__PURE__ */ t("span", { className: "text-base font-semibold text-fg", children: a }),
895
897
  l ? /* @__PURE__ */ t(da, { variant: "primary", children: l }) : null
896
898
  ] }),
897
- n ? /* @__PURE__ */ t("span", { id: m, className: "mt-1 block text-sm text-muted", children: n }) : null
899
+ n ? /* @__PURE__ */ t("span", { id: c, className: "mt-1 block text-sm text-muted", children: n }) : null
898
900
  ] })
899
901
  ]
900
902
  }
@@ -906,15 +908,15 @@ function dr({
906
908
  trigger: n,
907
909
  title: l,
908
910
  options: i,
909
- defaultValue: c,
910
- value: u,
911
- onValueChange: m,
912
- cancelLabel: b = "Cancel",
913
- confirmLabel: g = "Continue",
911
+ defaultValue: u,
912
+ value: m,
913
+ onValueChange: c,
914
+ cancelLabel: x = "Cancel",
915
+ confirmLabel: b = "Continue",
914
916
  onConfirm: h
915
917
  }) {
916
- var x;
917
- const [y, S] = T(c ?? ((x = i[0]) == null ? void 0 : x.value) ?? ""), k = u ?? y;
918
+ var P;
919
+ const [N, S] = D(u ?? ((P = i[0]) == null ? void 0 : P.value) ?? ""), C = m ?? N;
918
920
  return /* @__PURE__ */ s(Ta, { open: e, onOpenChange: a, children: [
919
921
  n ? /* @__PURE__ */ t(nt, { asChild: !0, children: n }) : null,
920
922
  /* @__PURE__ */ s(
@@ -925,22 +927,22 @@ function dr({
925
927
  children: [
926
928
  /* @__PURE__ */ s(Pa, { children: [
927
929
  /* @__PURE__ */ t(Ea, { children: /* @__PURE__ */ t(st, { className: "text-xl", children: l }) }),
928
- /* @__PURE__ */ t(Ia, { children: /* @__PURE__ */ t(La, { label: l, value: k, onChange: (C) => {
929
- u === void 0 && S(C), m == null || m(C);
930
- }, children: i.map((C) => /* @__PURE__ */ t(
930
+ /* @__PURE__ */ t(Ia, { children: /* @__PURE__ */ t(La, { label: l, value: C, onChange: (g) => {
931
+ m === void 0 && S(g), c == null || c(g);
932
+ }, children: i.map((g) => /* @__PURE__ */ t(
931
933
  Ra,
932
934
  {
933
- value: C.value,
934
- title: C.title,
935
- description: C.description,
936
- badge: C.badge
935
+ value: g.value,
936
+ title: g.title,
937
+ description: g.description,
938
+ badge: g.badge
937
939
  },
938
- C.value
940
+ g.value
939
941
  )) }) })
940
942
  ] }),
941
943
  /* @__PURE__ */ s(ja, { className: "gap-3 pt-2.5", children: [
942
- /* @__PURE__ */ t(lt, { className: "flex-1", children: b }),
943
- /* @__PURE__ */ t(M, { className: "flex-1", onClick: () => h == null ? void 0 : h(k), children: g })
944
+ /* @__PURE__ */ t(lt, { className: "flex-1", children: x }),
945
+ /* @__PURE__ */ t(T, { className: "flex-1", onClick: () => h == null ? void 0 : h(C), children: b })
944
946
  ] })
945
947
  ]
946
948
  }
@@ -948,7 +950,7 @@ function dr({
948
950
  ] });
949
951
  }
950
952
  function cr({ code: e, label: a, className: n }) {
951
- const [l, i] = T(!1);
953
+ const [l, i] = D(!1);
952
954
  return /* @__PURE__ */ t(
953
955
  ce,
954
956
  {
@@ -1002,31 +1004,31 @@ const Aa = {
1002
1004
  type: n = "text",
1003
1005
  size: l = "md",
1004
1006
  leadingIcon: i,
1005
- trailingIcon: c,
1006
- onClear: u,
1007
- value: m,
1008
- defaultValue: b,
1009
- error: g = !1,
1007
+ trailingIcon: u,
1008
+ onClear: m,
1009
+ value: c,
1010
+ defaultValue: x,
1011
+ error: b = !1,
1010
1012
  helperText: h,
1011
- id: y,
1013
+ id: N,
1012
1014
  "aria-describedby": S,
1013
- disabled: k,
1015
+ disabled: C,
1014
1016
  readOnly: w,
1015
- ...x
1016
- }, C) => {
1017
- const F = de(), Q = y ?? F, $ = !!h, _ = !!(u && (m !== void 0 ? String(m).length > 0 : b !== void 0 && String(b).length > 0)), Y = $ ? `${Q}-description` : void 0, ue = [S, Y].filter(Boolean).join(" ") || void 0, Z = /* @__PURE__ */ t(
1017
+ ...P
1018
+ }, g) => {
1019
+ const F = de(), Q = N ?? F, $ = !!h, _ = !!(m && (c !== void 0 ? String(c).length > 0 : x !== void 0 && String(x).length > 0)), Y = $ ? `${Q}-description` : void 0, ue = [S, Y].filter(Boolean).join(" ") || void 0, Z = /* @__PURE__ */ t(
1018
1020
  "input",
1019
1021
  {
1020
- ref: C,
1022
+ ref: g,
1021
1023
  id: Q,
1022
1024
  type: n,
1023
- disabled: k,
1025
+ disabled: C,
1024
1026
  readOnly: w,
1025
- "aria-invalid": g || void 0,
1027
+ "aria-invalid": b || void 0,
1026
1028
  "aria-describedby": ue,
1027
- style: i || c || _ ? {
1029
+ style: i || u || _ ? {
1028
1030
  paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
1029
- paddingInlineEnd: c || _ ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
1031
+ paddingInlineEnd: u || _ ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
1030
1032
  } : void 0,
1031
1033
  className: o(
1032
1034
  "flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
@@ -1035,19 +1037,19 @@ const Aa = {
1035
1037
  "placeholder:text-(--input-placeholder)",
1036
1038
  "hover:border-(--input-border-hover)",
1037
1039
  "focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
1038
- g && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
1039
- !g && "border-(--input-border)",
1040
+ b && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
1041
+ !b && "border-(--input-border)",
1040
1042
  n === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
1041
- k && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
1043
+ C && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
1042
1044
  w && "cursor-default focus-visible:ring-0",
1043
1045
  e
1044
1046
  ),
1045
- value: m,
1046
- defaultValue: b,
1047
- ...x
1047
+ value: c,
1048
+ defaultValue: x,
1049
+ ...P
1048
1050
  }
1049
1051
  );
1050
- return !i && !c && !_ && !$ ? Z : /* @__PURE__ */ s("div", { className: o("w-full", a), children: [
1052
+ return !i && !u && !_ && !$ ? Z : /* @__PURE__ */ s("div", { className: o("w-full", a), children: [
1051
1053
  /* @__PURE__ */ s("div", { className: "relative", children: [
1052
1054
  i ? /* @__PURE__ */ t(
1053
1055
  "span",
@@ -1066,14 +1068,14 @@ const Aa = {
1066
1068
  {
1067
1069
  type: "button",
1068
1070
  "aria-label": "Clear search",
1069
- onClick: u,
1071
+ onClick: m,
1070
1072
  className: o(
1071
1073
  "absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
1072
1074
  We[l]
1073
1075
  ),
1074
1076
  children: /* @__PURE__ */ t("span", { className: o("inline-flex items-center justify-center", ge[l]), children: /* @__PURE__ */ t(ie, {}) })
1075
1077
  }
1076
- ) : c ? /* @__PURE__ */ t(
1078
+ ) : u ? /* @__PURE__ */ t(
1077
1079
  "span",
1078
1080
  {
1079
1081
  className: o(
@@ -1081,7 +1083,7 @@ const Aa = {
1081
1083
  We[l]
1082
1084
  ),
1083
1085
  "aria-hidden": !0,
1084
- children: /* @__PURE__ */ t("span", { className: o("inline-flex items-center justify-center", ge[l]), children: c })
1086
+ children: /* @__PURE__ */ t("span", { className: o("inline-flex items-center justify-center", ge[l]), children: u })
1085
1087
  }
1086
1088
  ) : null
1087
1089
  ] }),
@@ -1089,7 +1091,7 @@ const Aa = {
1089
1091
  "p",
1090
1092
  {
1091
1093
  id: Y,
1092
- className: o("mt-1.5 text-xs", g ? "text-error" : "text-muted"),
1094
+ className: o("mt-1.5 text-xs", b ? "text-error" : "text-muted"),
1093
1095
  children: h
1094
1096
  }
1095
1097
  ) : null
@@ -1101,7 +1103,7 @@ function ze(e, a) {
1101
1103
  let n = 0;
1102
1104
  return Je.forEach(e, (l) => {
1103
1105
  if (!Qe(l)) return;
1104
- if (a.some((c) => c === l.type)) {
1106
+ if (a.some((u) => u === l.type)) {
1105
1107
  n += 1;
1106
1108
  return;
1107
1109
  }
@@ -1119,12 +1121,12 @@ function xe({
1119
1121
  W,
1120
1122
  pt
1121
1123
  ]) === 0;
1122
- return /* @__PURE__ */ t(ut.Provider, { value: n, children: /* @__PURE__ */ t(z.Root, { ...a, children: e }) });
1124
+ return /* @__PURE__ */ t(ut.Provider, { value: n, children: /* @__PURE__ */ t(k.Root, { ...a, children: e }) });
1123
1125
  }
1124
1126
  const re = f(({ className: e, disabled: a, ...n }, l) => {
1125
1127
  const i = B(ut);
1126
1128
  return /* @__PURE__ */ t(
1127
- z.Trigger,
1129
+ k.Trigger,
1128
1130
  {
1129
1131
  ref: l,
1130
1132
  className: o("group", e),
@@ -1147,8 +1149,8 @@ const mt = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1147
1149
  }
1148
1150
  ));
1149
1151
  mt.displayName = "DropdownMenuChevron";
1150
- const ur = z.Group, mr = z.Portal, ne = f(({ className: e, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ t(z.Portal, { children: /* @__PURE__ */ t(
1151
- z.Content,
1152
+ const ur = k.Group, mr = k.Portal, ne = f(({ className: e, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ t(k.Portal, { children: /* @__PURE__ */ t(
1153
+ k.Content,
1152
1154
  {
1153
1155
  ref: l,
1154
1156
  sideOffset: a,
@@ -1167,7 +1169,7 @@ const ur = z.Group, mr = z.Portal, ne = f(({ className: e, sideOffset: a = 8, ..
1167
1169
  ) }));
1168
1170
  ne.displayName = "DropdownMenuContent";
1169
1171
  const se = f(({ className: e, inset: a, ...n }, l) => /* @__PURE__ */ t(
1170
- z.Item,
1172
+ k.Item,
1171
1173
  {
1172
1174
  ref: l,
1173
1175
  className: o(
@@ -1182,7 +1184,7 @@ const se = f(({ className: e, inset: a, ...n }, l) => /* @__PURE__ */ t(
1182
1184
  ));
1183
1185
  se.displayName = "DropdownMenuItem";
1184
1186
  const W = f(({ className: e, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
1185
- z.CheckboxItem,
1187
+ k.CheckboxItem,
1186
1188
  {
1187
1189
  ref: i,
1188
1190
  className: o(
@@ -1192,14 +1194,14 @@ const W = f(({ className: e, children: a, checked: n, ...l }, i) => /* @__PURE__
1192
1194
  checked: n,
1193
1195
  ...l,
1194
1196
  children: [
1195
- /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ t(z.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ t(X, { className: "size-3", weight: "bold" }) }) }),
1197
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ t(k.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ t(X, { className: "size-3", weight: "bold" }) }) }),
1196
1198
  a
1197
1199
  ]
1198
1200
  }
1199
1201
  ));
1200
1202
  W.displayName = "DropdownMenuCheckboxItem";
1201
1203
  const le = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1202
- z.Label,
1204
+ k.Label,
1203
1205
  {
1204
1206
  ref: n,
1205
1207
  className: o("px-2 py-1.5 text-xs font-medium text-subtle", e),
@@ -1207,8 +1209,8 @@ const le = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1207
1209
  }
1208
1210
  ));
1209
1211
  le.displayName = "DropdownMenuLabel";
1210
- const pr = z.Sub, pt = f(({ className: e, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
1211
- z.SubTrigger,
1212
+ const pr = k.Sub, pt = f(({ className: e, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
1213
+ k.SubTrigger,
1212
1214
  {
1213
1215
  ref: i,
1214
1216
  className: o(
@@ -1227,7 +1229,7 @@ const pr = z.Sub, pt = f(({ className: e, inset: a, children: n, ...l }, i) => /
1227
1229
  ));
1228
1230
  pt.displayName = "DropdownMenuSubTrigger";
1229
1231
  const $a = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1230
- z.SubContent,
1232
+ k.SubContent,
1231
1233
  {
1232
1234
  ref: n,
1233
1235
  sideOffset: 8,
@@ -1246,7 +1248,7 @@ const $a = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1246
1248
  ));
1247
1249
  $a.displayName = "DropdownMenuSubContent";
1248
1250
  const ye = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1249
- z.Separator,
1251
+ k.Separator,
1250
1252
  {
1251
1253
  ref: n,
1252
1254
  className: o("-mx-1 my-1 h-px bg-line-strong", e),
@@ -1254,17 +1256,17 @@ const ye = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1254
1256
  }
1255
1257
  ));
1256
1258
  ye.displayName = "DropdownMenuSeparator";
1257
- const fr = P.Group, qa = P.Value;
1259
+ const fr = M.Group, qa = M.Value;
1258
1260
  function Ga({
1259
1261
  children: e,
1260
1262
  disabled: a,
1261
1263
  ...n
1262
1264
  }) {
1263
1265
  const l = ze(e, [De]) === 0;
1264
- return /* @__PURE__ */ t(P.Root, { disabled: a || l, ...n, children: e });
1266
+ return /* @__PURE__ */ t(M.Root, { disabled: a || l, ...n, children: e });
1265
1267
  }
1266
1268
  const ft = f(({ className: e, children: a, variant: n = "field", ...l }, i) => /* @__PURE__ */ s(
1267
- P.Trigger,
1269
+ M.Trigger,
1268
1270
  {
1269
1271
  ref: i,
1270
1272
  className: o(
@@ -1278,16 +1280,16 @@ const ft = f(({ className: e, children: a, variant: n = "field", ...l }, i) => /
1278
1280
  ...l,
1279
1281
  children: [
1280
1282
  /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-left", children: a }),
1281
- /* @__PURE__ */ t(P.Icon, { asChild: !0, children: /* @__PURE__ */ t(oe, { className: "ml-auto size-3.5 shrink-0 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) })
1283
+ /* @__PURE__ */ t(M.Icon, { asChild: !0, children: /* @__PURE__ */ t(oe, { className: "ml-auto size-3.5 shrink-0 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) })
1282
1284
  ]
1283
1285
  }
1284
1286
  ));
1285
1287
  ft.displayName = "SelectTrigger";
1286
1288
  const bt = f(
1287
- ({ className: e, children: a, position: n = "popper", sideOffset: l = 8, ...i }, c) => /* @__PURE__ */ t(P.Portal, { children: /* @__PURE__ */ t(
1288
- P.Content,
1289
+ ({ className: e, children: a, position: n = "popper", sideOffset: l = 8, ...i }, u) => /* @__PURE__ */ t(M.Portal, { children: /* @__PURE__ */ t(
1290
+ M.Content,
1289
1291
  {
1290
- ref: c,
1292
+ ref: u,
1291
1293
  position: n,
1292
1294
  sideOffset: l,
1293
1295
  className: o(
@@ -1301,13 +1303,13 @@ const bt = f(
1301
1303
  e
1302
1304
  ),
1303
1305
  ...i,
1304
- children: /* @__PURE__ */ t(P.Viewport, { className: "p-0", children: a })
1306
+ children: /* @__PURE__ */ t(M.Viewport, { className: "p-0", children: a })
1305
1307
  }
1306
1308
  ) })
1307
1309
  );
1308
1310
  bt.displayName = "SelectContent";
1309
1311
  const De = f(({ className: e, children: a, ...n }, l) => /* @__PURE__ */ s(
1310
- P.Item,
1312
+ M.Item,
1311
1313
  {
1312
1314
  ref: l,
1313
1315
  className: o(
@@ -1316,14 +1318,14 @@ const De = f(({ className: e, children: a, ...n }, l) => /* @__PURE__ */ s(
1316
1318
  ),
1317
1319
  ...n,
1318
1320
  children: [
1319
- /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(P.ItemIndicator, { children: /* @__PURE__ */ t(X, { className: "size-3.5" }) }) }),
1320
- /* @__PURE__ */ t(P.ItemText, { children: a })
1321
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(M.ItemIndicator, { children: /* @__PURE__ */ t(X, { className: "size-3.5" }) }) }),
1322
+ /* @__PURE__ */ t(M.ItemText, { children: a })
1321
1323
  ]
1322
1324
  }
1323
1325
  ));
1324
1326
  De.displayName = "SelectItem";
1325
1327
  const Ha = f(({ className: e, ...a }, n) => /* @__PURE__ */ t(
1326
- P.Label,
1328
+ M.Label,
1327
1329
  {
1328
1330
  ref: n,
1329
1331
  className: o("px-2 py-1.5 text-xs font-medium text-subtle", e),
@@ -1385,18 +1387,18 @@ function hr({
1385
1387
  getRowId: n,
1386
1388
  loading: l = !1,
1387
1389
  error: i,
1388
- empty: c,
1389
- search: u,
1390
- filters: m,
1391
- toolbarStart: b,
1392
- toolbarEnd: g,
1390
+ empty: u,
1391
+ search: m,
1392
+ filters: c,
1393
+ toolbarStart: x,
1394
+ toolbarEnd: b,
1393
1395
  tabs: h,
1394
- activeTab: y,
1396
+ activeTab: N,
1395
1397
  onTabChange: S,
1396
- infoBanner: k,
1398
+ infoBanner: C,
1397
1399
  selectable: w = !1,
1398
- bulkActions: x,
1399
- rowActions: C,
1400
+ bulkActions: P,
1401
+ rowActions: g,
1400
1402
  onRowClick: F,
1401
1403
  defaultSort: Q,
1402
1404
  pageSize: $ = 25,
@@ -1407,40 +1409,40 @@ function hr({
1407
1409
  panelClassName: ht,
1408
1410
  className: gt
1409
1411
  }) {
1410
- const [Te, Me] = T(
1412
+ const [Te, Me] = D(
1411
1413
  () => Object.fromEntries(
1412
1414
  a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
1413
1415
  )
1414
- ), [Pe, Ie] = T(null), [me, Ee] = T(null), [N, xt] = T(
1416
+ ), [Pe, Ie] = D(null), [me, Ee] = D(null), [y, xt] = D(
1415
1417
  Q ?? null
1416
- ), [q, K] = T(0), [L, vt] = T($), [R, pe] = T(/* @__PURE__ */ new Set()), [Nt, fe] = T([]), je = a.map((r) => r.id), _e = new Map(a.map((r) => [r.id, r])), Le = Pe ? Pe.map((r) => _e.get(r)).filter((r) => !!r) : a, E = Le.filter((r) => !Te[r.id]), Re = Le.filter((r) => Te[r.id] && !r.required), Ae = (r) => !!r.required, yt = (r) => _e.get(r), wt = (r, d) => {
1418
+ ), [q, K] = D(0), [L, vt] = D($), [R, pe] = D(/* @__PURE__ */ new Set()), [Nt, fe] = D([]), je = a.map((r) => r.id), _e = new Map(a.map((r) => [r.id, r])), Le = Pe ? Pe.map((r) => _e.get(r)).filter((r) => !!r) : a, E = Le.filter((r) => !Te[r.id]), Re = Le.filter((r) => Te[r.id] && !r.required), Ae = (r) => !!r.required, yt = (r) => _e.get(r), wt = (r, d) => {
1417
1419
  const p = d ? yt(d) : void 0;
1418
1420
  !p || Ae(p) || r === d || Ie((v) => {
1419
- const D = v ?? je;
1420
- return ra(D, D.indexOf(r), D.indexOf(d));
1421
+ const z = v ?? je;
1422
+ return ra(z, z.indexOf(r), z.indexOf(d));
1421
1423
  });
1422
1424
  }, Ct = (r) => {
1423
1425
  Me((d) => ({ ...d, [r]: !1 })), Ie((d) => d && d.includes(r) ? d : [...d ?? je, r]);
1424
- }, be = (m ?? []).filter((r) => Nt.includes(r.id)), St = (m ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ee = qe(() => {
1426
+ }, be = (c ?? []).filter((r) => Nt.includes(r.id)), St = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ee = qe(() => {
1425
1427
  let r = e;
1426
- for (const p of m ?? [])
1428
+ for (const p of c ?? [])
1427
1429
  p.value.length > 0 && (r = r.filter((v) => p.match(v, p.value)));
1428
- if (!u || !u.value.trim()) return r;
1429
- const d = u.value.trim().toLowerCase();
1430
- return r.filter((p) => u.keys(p).toLowerCase().includes(d));
1431
- }, [e, u, m]), G = qe(() => {
1432
- if (!N) return ee;
1433
- const r = a.find((p) => p.id === N.id);
1430
+ if (!m || !m.value.trim()) return r;
1431
+ const d = m.value.trim().toLowerCase();
1432
+ return r.filter((p) => m.keys(p).toLowerCase().includes(d));
1433
+ }, [e, m, c]), G = qe(() => {
1434
+ if (!y) return ee;
1435
+ const r = a.find((p) => p.id === y.id);
1434
1436
  if (!(r != null && r.sortValue)) return ee;
1435
- const d = N.dir === "asc" ? 1 : -1;
1437
+ const d = y.dir === "asc" ? 1 : -1;
1436
1438
  return [...ee].sort((p, v) => {
1437
- const D = r.sortValue(p), V = r.sortValue(v);
1438
- return D == null && V == null ? 0 : D == null ? 1 : V == null ? -1 : typeof D == "number" && typeof V == "number" ? (D - V) * d : String(D).localeCompare(String(V)) * d;
1439
+ const z = r.sortValue(p), V = r.sortValue(v);
1440
+ return z == null && V == null ? 0 : z == null ? 1 : V == null ? -1 : typeof z == "number" && typeof V == "number" ? (z - V) * d : String(z).localeCompare(String(V)) * d;
1439
1441
  });
1440
- }, [ee, N, a]), H = Math.max(1, Math.ceil(G.length / L));
1442
+ }, [ee, y, a]), H = Math.max(1, Math.ceil(G.length / L));
1441
1443
  U(() => {
1442
1444
  K(0);
1443
- }, [u == null ? void 0 : u.value, L, N == null ? void 0 : N.id, N == null ? void 0 : N.dir, y, St]), U(() => {
1445
+ }, [m == null ? void 0 : m.value, L, y == null ? void 0 : y.id, y == null ? void 0 : y.dir, N, St]), U(() => {
1444
1446
  q > H - 1 && K(H - 1);
1445
1447
  }, [q, H]);
1446
1448
  const te = q * L, j = G.slice(te, te + L), kt = (r) => {
@@ -1457,14 +1459,14 @@ function hr({
1457
1459
  const p = new Set(d);
1458
1460
  return p.has(r) ? p.delete(r) : p.add(r), p;
1459
1461
  });
1460
- }, Pt = !!(u || m != null && m.length || b || g), It = E.some((r) => r.width), Et = E.length > 1 ? 70 / (E.length - 1) : 100, jt = E.map((r, d) => r.width ? r.width : It ? "auto" : `${d === 0 ? 30 : Et}%`), Fe = [
1462
+ }, Pt = !!(m || c != null && c.length || x || b), It = E.some((r) => r.width), Et = E.length > 1 ? 70 / (E.length - 1) : 100, jt = E.map((r, d) => r.width ? r.width : It ? "auto" : `${d === 0 ? 30 : Et}%`), Fe = [
1461
1463
  ...w ? ["2.75rem"] : [],
1462
1464
  ...jt,
1463
- ...C ? ["11rem"] : []
1464
- ], _t = (r) => (N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? "ascending" : "descending" : void 0;
1465
+ ...g ? ["11rem"] : []
1466
+ ], _t = (r) => (y == null ? void 0 : y.id) === r.id ? y.dir === "asc" ? "ascending" : "descending" : void 0;
1465
1467
  return /* @__PURE__ */ s("div", { className: o("space-y-4", gt), children: [
1466
1468
  h && h.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: h.map((r) => {
1467
- const d = r.id === y;
1469
+ const d = r.id === N;
1468
1470
  return /* @__PURE__ */ t(
1469
1471
  "button",
1470
1472
  {
@@ -1482,24 +1484,24 @@ function hr({
1482
1484
  );
1483
1485
  }) }),
1484
1486
  Pt && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1485
- u && /* @__PURE__ */ t(
1487
+ m && /* @__PURE__ */ t(
1486
1488
  ct,
1487
1489
  {
1488
1490
  type: "search",
1489
- "aria-label": u.placeholder ?? "Search",
1490
- placeholder: u.placeholder ?? "Search...",
1491
- value: u.value,
1492
- onChange: (r) => u.onChange(r.target.value),
1493
- onClear: () => u.onChange(""),
1491
+ "aria-label": m.placeholder ?? "Search",
1492
+ placeholder: m.placeholder ?? "Search...",
1493
+ value: m.value,
1494
+ onChange: (r) => m.onChange(r.target.value),
1495
+ onClear: () => m.onChange(""),
1494
1496
  leadingIcon: /* @__PURE__ */ t(Vt, {}),
1495
1497
  containerClassName: "w-full sm:w-[280px]",
1496
1498
  className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
1497
1499
  }
1498
1500
  ),
1499
- b,
1501
+ x,
1500
1502
  /* @__PURE__ */ s(xe, { children: [
1501
1503
  /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ t(
1502
- M,
1504
+ T,
1503
1505
  {
1504
1506
  variant: "secondary",
1505
1507
  size: "md",
@@ -1567,9 +1569,9 @@ function hr({
1567
1569
  ] }) : null
1568
1570
  ] })
1569
1571
  ] }),
1570
- m && m.length > 0 ? /* @__PURE__ */ s(xe, { children: [
1572
+ c && c.length > 0 ? /* @__PURE__ */ s(xe, { children: [
1571
1573
  /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ t(
1572
- M,
1574
+ T,
1573
1575
  {
1574
1576
  variant: "secondary",
1575
1577
  size: "md",
@@ -1578,7 +1580,7 @@ function hr({
1578
1580
  children: /* @__PURE__ */ t($e, {})
1579
1581
  }
1580
1582
  ) }),
1581
- /* @__PURE__ */ t(ne, { align: "start", className: "w-54", children: m.map((r) => /* @__PURE__ */ t(
1583
+ /* @__PURE__ */ t(ne, { align: "start", className: "w-54", children: c.map((r) => /* @__PURE__ */ t(
1582
1584
  se,
1583
1585
  {
1584
1586
  onSelect: () => fe(
@@ -1589,7 +1591,7 @@ function hr({
1589
1591
  r.id
1590
1592
  )) })
1591
1593
  ] }) : null,
1592
- g ? /* @__PURE__ */ t("div", { className: "flex-0 sm:ml-auto", children: g }) : null
1594
+ b ? /* @__PURE__ */ t("div", { className: "flex-0 sm:ml-auto", children: b }) : null
1593
1595
  ] }),
1594
1596
  be.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1595
1597
  be.map((r) => {
@@ -1598,7 +1600,7 @@ function hr({
1598
1600
  };
1599
1601
  return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
1600
1602
  /* @__PURE__ */ t(
1601
- M,
1603
+ T,
1602
1604
  {
1603
1605
  variant: "secondary",
1604
1606
  size: "md",
@@ -1610,7 +1612,7 @@ function hr({
1610
1612
  }
1611
1613
  ),
1612
1614
  /* @__PURE__ */ s(xe, { children: [
1613
- /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ s(M, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1615
+ /* @__PURE__ */ t(re, { asChild: !0, children: /* @__PURE__ */ s(T, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1614
1616
  /* @__PURE__ */ t($e, {}),
1615
1617
  /* @__PURE__ */ t("span", { className: "font-medium", children: r.label }),
1616
1618
  /* @__PURE__ */ t("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
@@ -1629,9 +1631,9 @@ function hr({
1629
1631
  {
1630
1632
  checked: v,
1631
1633
  onCheckedChange: () => r.onChange(
1632
- v ? r.value.filter((D) => D !== p.value) : [...r.value, p.value]
1634
+ v ? r.value.filter((z) => z !== p.value) : [...r.value, p.value]
1633
1635
  ),
1634
- onSelect: (D) => D.preventDefault(),
1636
+ onSelect: (z) => z.preventDefault(),
1635
1637
  children: p.label
1636
1638
  },
1637
1639
  p.value
@@ -1656,14 +1658,14 @@ function hr({
1656
1658
  }
1657
1659
  )
1658
1660
  ] }) : null,
1659
- k,
1661
+ C,
1660
1662
  w && R.size > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
1661
1663
  /* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
1662
1664
  R.size,
1663
1665
  " selected"
1664
1666
  ] }),
1665
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: (x ?? []).map((r) => /* @__PURE__ */ s(
1666
- M,
1667
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: (P ?? []).map((r) => /* @__PURE__ */ s(
1668
+ T,
1667
1669
  {
1668
1670
  size: "md",
1669
1671
  variant: r.variant ?? "outline",
@@ -1715,7 +1717,7 @@ function hr({
1715
1717
  {
1716
1718
  className: o(Ua, r.align === "right" && "text-right", r.className),
1717
1719
  children: r.sortable ? /* @__PURE__ */ s(
1718
- M,
1720
+ T,
1719
1721
  {
1720
1722
  type: "button",
1721
1723
  variant: "ghost",
@@ -1726,18 +1728,18 @@ function hr({
1726
1728
  "h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
1727
1729
  "hover:bg-transparent hover:text-table-header-active hover:shadow-none",
1728
1730
  "active:scale-100 active:bg-transparent active:shadow-none",
1729
- (N == null ? void 0 : N.id) === r.id && "text-table-header-active"
1731
+ (y == null ? void 0 : y.id) === r.id && "text-table-header-active"
1730
1732
  ),
1731
1733
  children: [
1732
1734
  r.header,
1733
- (N == null ? void 0 : N.id) === r.id ? N.dir === "asc" ? /* @__PURE__ */ t(Jt, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ t(oe, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ t(Qt, { className: "size-3.5 opacity-50" })
1735
+ (y == null ? void 0 : y.id) === r.id ? y.dir === "asc" ? /* @__PURE__ */ t(Jt, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ t(oe, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ t(Qt, { className: "size-3.5 opacity-50" })
1734
1736
  ]
1735
1737
  }
1736
1738
  ) : r.header
1737
1739
  },
1738
1740
  r.id
1739
1741
  )),
1740
- C && /* @__PURE__ */ t("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Actions" }) })
1742
+ g && /* @__PURE__ */ t("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Actions" }) })
1741
1743
  ] }) })
1742
1744
  ] })
1743
1745
  ),
@@ -1751,17 +1753,17 @@ function hr({
1751
1753
  ] }) : j.length === 0 ? /* @__PURE__ */ t(
1752
1754
  Va,
1753
1755
  {
1754
- icon: c == null ? void 0 : c.icon,
1755
- title: (c == null ? void 0 : c.title) ?? "No results",
1756
- description: typeof (c == null ? void 0 : c.description) == "string" ? c.description : void 0,
1757
- action: c == null ? void 0 : c.action
1756
+ icon: u == null ? void 0 : u.icon,
1757
+ title: (u == null ? void 0 : u.title) ?? "No results",
1758
+ description: typeof (u == null ? void 0 : u.description) == "string" ? u.description : void 0,
1759
+ action: u == null ? void 0 : u.action
1758
1760
  }
1759
1761
  ) : /* @__PURE__ */ s("table", { className: "w-full table-fixed border-collapse", children: [
1760
1762
  /* @__PURE__ */ t("colgroup", { children: Fe.map((r, d) => /* @__PURE__ */ t("col", { style: { width: r } }, d)) }),
1761
1763
  /* @__PURE__ */ t("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
1762
1764
  w && /* @__PURE__ */ t("th", { scope: "col", children: "Select" }),
1763
1765
  E.map((r) => /* @__PURE__ */ t("th", { scope: "col", "aria-sort": _t(r), children: r.header }, r.id)),
1764
- C && /* @__PURE__ */ t("th", { scope: "col", children: "Actions" })
1766
+ g && /* @__PURE__ */ t("th", { scope: "col", children: "Actions" })
1765
1767
  ] }) }),
1766
1768
  /* @__PURE__ */ t(pa, { children: j.map((r) => {
1767
1769
  const d = n(r), p = R.has(d);
@@ -1789,7 +1791,7 @@ function hr({
1789
1791
  },
1790
1792
  v.id
1791
1793
  )),
1792
- C && /* @__PURE__ */ t(he, { className: "w-44 px-4 text-right", onClick: (v) => v.stopPropagation(), children: C(r) })
1794
+ g && /* @__PURE__ */ t(he, { className: "w-44 px-4 text-right", onClick: (v) => v.stopPropagation(), children: g(r) })
1793
1795
  ]
1794
1796
  },
1795
1797
  d
@@ -1808,14 +1810,14 @@ function hr({
1808
1810
  ] }),
1809
1811
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1810
1812
  /* @__PURE__ */ s(Ga, { value: String(L), onValueChange: (r) => vt(Number(r)), children: [
1811
- /* @__PURE__ */ t(ft, { "aria-label": "Rows per page", className: "w-27.5", children: /* @__PURE__ */ t(qa, {}) }),
1813
+ /* @__PURE__ */ t(ft, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ t(qa, {}) }),
1812
1814
  /* @__PURE__ */ t(bt, { children: _.map((r) => /* @__PURE__ */ s(De, { value: String(r), children: [
1813
1815
  r,
1814
1816
  " / page"
1815
1817
  ] }, r)) })
1816
1818
  ] }),
1817
1819
  /* @__PURE__ */ t(
1818
- M,
1820
+ T,
1819
1821
  {
1820
1822
  variant: "outline",
1821
1823
  size: "md",
@@ -1825,7 +1827,7 @@ function hr({
1825
1827
  }
1826
1828
  ),
1827
1829
  /* @__PURE__ */ t(
1828
- M,
1830
+ T,
1829
1831
  {
1830
1832
  variant: "outline",
1831
1833
  size: "md",
@@ -1878,21 +1880,21 @@ function vr({
1878
1880
  options: n,
1879
1881
  size: l = "sm",
1880
1882
  className: i,
1881
- ...c
1883
+ ...u
1882
1884
  }) {
1883
- const u = de();
1885
+ const m = de();
1884
1886
  return /* @__PURE__ */ t(
1885
1887
  "div",
1886
1888
  {
1887
1889
  role: "radiogroup",
1888
- "aria-label": c["aria-label"],
1890
+ "aria-label": u["aria-label"],
1889
1891
  className: o(
1890
1892
  "inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
1891
1893
  l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
1892
1894
  i
1893
1895
  ),
1894
- children: n.map((m) => {
1895
- const b = m.value === e;
1896
+ children: n.map((c) => {
1897
+ const x = c.value === e;
1896
1898
  return /* @__PURE__ */ s(
1897
1899
  "label",
1898
1900
  {
@@ -1900,25 +1902,25 @@ function vr({
1900
1902
  "inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
1901
1903
  "has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
1902
1904
  l === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
1903
- b ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
1905
+ x ? "btn-fill bg-(--button-secondary-bg) text-fg" : "text-muted hover:text-fg"
1904
1906
  ),
1905
1907
  children: [
1906
1908
  /* @__PURE__ */ t(
1907
1909
  "input",
1908
1910
  {
1909
1911
  type: "radio",
1910
- name: u,
1911
- value: m.value,
1912
- checked: b,
1913
- onChange: () => a(m.value),
1912
+ name: m,
1913
+ value: c.value,
1914
+ checked: x,
1915
+ onChange: () => a(c.value),
1914
1916
  className: "sr-only"
1915
1917
  }
1916
1918
  ),
1917
- m.icon,
1918
- m.label
1919
+ c.icon,
1920
+ c.label
1919
1921
  ]
1920
1922
  },
1921
- m.value
1923
+ c.value
1922
1924
  );
1923
1925
  })
1924
1926
  }
@@ -1973,7 +1975,7 @@ export {
1973
1975
  Ke as AvatarFallback,
1974
1976
  Ze as AvatarImage,
1975
1977
  da as Badge,
1976
- M as Button,
1978
+ T as Button,
1977
1979
  nr as Callout,
1978
1980
  va as Card,
1979
1981
  wa as CardContent,