@metaphor-cloud/ui 0.16.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4107,33 +4107,36 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
4107
4107
  function Ko({ className: e, ref: t, ...n }) {
4108
4108
  return /* @__PURE__ */ l(Lo, {
4109
4109
  ref: t,
4110
- className: W("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm", "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out", e),
4110
+ className: W("fixed inset-0 z-[150] bg-black/60 backdrop-blur-sm", "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out", e),
4111
4111
  ...n
4112
4112
  });
4113
4113
  }
4114
4114
  function qo({ className: e, children: t, hideCloseButton: n, ref: r, ...i }) {
4115
- return /* @__PURE__ */ u(Go, { children: [/* @__PURE__ */ l(Ko, {}), /* @__PURE__ */ u(Ro, {
4116
- ref: r,
4117
- className: W("fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2", "max-h-[calc(100vh-2rem)] overflow-y-auto overscroll-contain", "rounded-lg border border-border bg-bg-elevated p-6 shadow-xl", "data-[state=open]:animate-fade-up", "duration-200", e),
4118
- ...i,
4119
- children: [t, !n && /* @__PURE__ */ l(Vo, {
4120
- "aria-label": "Close",
4121
- className: "absolute right-4 top-4 rounded-sm text-text-tertiary opacity-70 hover:opacity-100 transition-opacity focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-bg-elevated",
4122
- children: /* @__PURE__ */ u("svg", {
4123
- xmlns: "http://www.w3.org/2000/svg",
4124
- width: "16",
4125
- height: "16",
4126
- viewBox: "0 0 24 24",
4127
- fill: "none",
4128
- stroke: "currentColor",
4129
- strokeWidth: "2",
4130
- strokeLinecap: "round",
4131
- strokeLinejoin: "round",
4132
- "aria-hidden": "true",
4133
- children: [/* @__PURE__ */ l("path", { d: "M18 6 6 18" }), /* @__PURE__ */ l("path", { d: "m6 6 12 12" })]
4134
- })
4135
- })]
4136
- })] });
4115
+ return /* @__PURE__ */ l(Go, { children: /* @__PURE__ */ l(Lo, {
4116
+ className: W("fixed inset-0 z-[150] flex items-center justify-center p-4", "bg-black/60 backdrop-blur-sm", "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out"),
4117
+ children: /* @__PURE__ */ u(Ro, {
4118
+ ref: r,
4119
+ className: W("relative w-full max-w-lg", "max-h-[calc(100vh-2rem)] overflow-y-auto overscroll-contain", "rounded-lg border border-border bg-bg-elevated p-6 shadow-xl", "data-[state=open]:animate-fade-up", "duration-200", e),
4120
+ ...i,
4121
+ children: [t, !n && /* @__PURE__ */ l(Vo, {
4122
+ "aria-label": "Close",
4123
+ className: "absolute right-4 top-4 rounded-sm text-text-tertiary opacity-70 hover:opacity-100 transition-opacity focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-bg-elevated",
4124
+ children: /* @__PURE__ */ u("svg", {
4125
+ xmlns: "http://www.w3.org/2000/svg",
4126
+ width: "16",
4127
+ height: "16",
4128
+ viewBox: "0 0 24 24",
4129
+ fill: "none",
4130
+ stroke: "currentColor",
4131
+ strokeWidth: "2",
4132
+ strokeLinecap: "round",
4133
+ strokeLinejoin: "round",
4134
+ "aria-hidden": "true",
4135
+ children: [/* @__PURE__ */ l("path", { d: "M18 6 6 18" }), /* @__PURE__ */ l("path", { d: "m6 6 12 12" })]
4136
+ })
4137
+ })]
4138
+ })
4139
+ }) });
4137
4140
  }
4138
4141
  var Jo = ({ className: e, ...t }) => /* @__PURE__ */ l("div", {
4139
4142
  className: W("flex flex-col gap-1.5 text-center sm:text-left", e),
@@ -9435,9 +9438,9 @@ function Pb({ className: e, ref: t, ...n }) {
9435
9438
  var Fb = Ht("group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-lg border p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-slide-in-right data-[state=closed]:animate-fade-out", {
9436
9439
  variants: { variant: {
9437
9440
  default: "border-border bg-bg-elevated text-text-primary",
9438
- success: "border-success-border bg-success-glow text-success",
9439
- danger: "border-danger-border bg-danger-glow text-danger",
9440
- warning: "border-warning-border bg-warning-glow text-warning"
9441
+ success: "border-success-border bg-bg-elevated bg-[linear-gradient(var(--green-glow),var(--green-glow))] text-success",
9442
+ danger: "border-danger-border bg-bg-elevated bg-[linear-gradient(var(--red-glow),var(--red-glow))] text-danger",
9443
+ warning: "border-warning-border bg-bg-elevated bg-[linear-gradient(var(--orange-glow),var(--orange-glow))] text-warning"
9441
9444
  } },
9442
9445
  defaultVariants: { variant: "default" }
9443
9446
  });
@@ -10635,8 +10638,61 @@ function Ux({ columns: t, hasSelectionColumn: n, onColumnResize: r, tableRef: i
10635
10638
  };
10636
10639
  }
10637
10640
  //#endregion
10641
+ //#region src/hooks/use-responsive-columns.ts
10642
+ var Wx = 80;
10643
+ function Gx(e) {
10644
+ if (e == null) return null;
10645
+ let t = e.match(/^(\d+(?:\.\d+)?)px$/);
10646
+ return t?.[1] == null ? null : parseFloat(t[1]);
10647
+ }
10648
+ function Kx(e) {
10649
+ return e.minWidth == null ? Gx(e.width) ?? Wx : e.minWidth;
10650
+ }
10651
+ function qx({ columns: t, containerRef: n, hasSelectionColumn: r = !1, selectionColumnWidth: i = 40 }) {
10652
+ let [a, o] = e.useState(null), s = e.useMemo(() => t.some((e) => e.priority != null && !e.hidden), [t]);
10653
+ return e.useLayoutEffect(() => {
10654
+ if (!s) {
10655
+ o(null);
10656
+ return;
10657
+ }
10658
+ let e = n.current;
10659
+ if (!e) return;
10660
+ if (typeof ResizeObserver > "u") {
10661
+ o(e.getBoundingClientRect().width);
10662
+ return;
10663
+ }
10664
+ let t = new ResizeObserver((e) => {
10665
+ let t = e[0];
10666
+ if (!t) return;
10667
+ let n = t.contentRect.width;
10668
+ o((e) => e === n ? e : n);
10669
+ });
10670
+ return t.observe(e), o(e.getBoundingClientRect().width), () => t.disconnect();
10671
+ }, [n, s]), {
10672
+ hiddenColumnIds: e.useMemo(() => {
10673
+ if (!s || a == null) return Jx;
10674
+ let e = t.filter((e) => !e.hidden), n = (r ? i : 0) + e.reduce((e, t) => e + Kx(t), 0);
10675
+ if (n <= a) return Jx;
10676
+ let o = e.filter((e) => e.priority != null).sort((e, t) => e.priority - t.priority), c = /* @__PURE__ */ new Set();
10677
+ for (let e of o) {
10678
+ if (n <= a) break;
10679
+ c.add(e.id), n -= Kx(e);
10680
+ }
10681
+ return c;
10682
+ }, [
10683
+ t,
10684
+ a,
10685
+ r,
10686
+ i,
10687
+ s
10688
+ ]),
10689
+ containerWidth: a
10690
+ };
10691
+ }
10692
+ var Jx = /* @__PURE__ */ new Set();
10693
+ //#endregion
10638
10694
  //#region src/components/DataTable.tsx
10639
- function Wx({ filled: e, className: t }) {
10695
+ function Yx({ filled: e, className: t }) {
10640
10696
  return /* @__PURE__ */ l("svg", {
10641
10697
  xmlns: "http://www.w3.org/2000/svg",
10642
10698
  viewBox: "0 0 16 16",
@@ -10657,7 +10713,7 @@ function Wx({ filled: e, className: t }) {
10657
10713
  })
10658
10714
  });
10659
10715
  }
10660
- function Gx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o }) {
10716
+ function Xx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o }) {
10661
10717
  let [s, c] = e.useState(!1), d = e.useMemo(() => {
10662
10718
  if (t.filterOptions) return t.filterOptions;
10663
10719
  if (!t.accessorKey) return null;
@@ -10686,7 +10742,7 @@ function Gx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
10686
10742
  },
10687
10743
  className: W("ml-1 inline-flex items-center justify-center rounded p-0.5", "hover:bg-accent/20 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent", p ? "text-accent" : "text-text-secondary"),
10688
10744
  "aria-label": `Filter ${typeof t.header == "string" ? t.header : t.id}`,
10689
- children: /* @__PURE__ */ l(Wx, { filled: p })
10745
+ children: /* @__PURE__ */ l(Yx, { filled: p })
10690
10746
  })
10691
10747
  }), /* @__PURE__ */ u(cg, {
10692
10748
  align: "start",
@@ -10723,39 +10779,45 @@ function Gx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
10723
10779
  })]
10724
10780
  });
10725
10781
  }
10726
- function Kx({ children: e, className: t, ...n }) {
10782
+ function Zx({ children: e, className: t, ...n }) {
10727
10783
  return /* @__PURE__ */ l("div", {
10728
10784
  className: W("flex items-center gap-2", t),
10729
10785
  ...n,
10730
10786
  children: e
10731
10787
  });
10732
10788
  }
10733
- Kx.displayName = "DataTableToolbar";
10734
- function qx({ children: e, className: t, ...n }) {
10789
+ Zx.displayName = "DataTableToolbar";
10790
+ function Qx({ children: e, className: t, ...n }) {
10735
10791
  return /* @__PURE__ */ l("div", {
10736
10792
  className: t,
10737
10793
  ...n,
10738
10794
  children: e
10739
10795
  });
10740
10796
  }
10741
- qx.displayName = "DataTableEmpty";
10742
- function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStateChange: o, defaultSort: s, manualSorting: c = !1, globalFilter: d = !1, manualFiltering: f = !1, pageSize: p = 20, manualPagination: m = !1, onRowClick: h, renderRowLink: g, rowClassName: _, getRowId: v, selectable: y = !1, onSelectionChange: b, onColumnResize: x, className: S, ref: C }) {
10743
- let [w, T] = e.useState(s ?? null), [E, D] = e.useState(""), [O, k] = e.useState({}), [A, j] = e.useState(1), [M, N] = e.useState(/* @__PURE__ */ new Set()), P = e.useMemo(() => t.filter((e) => !e.hidden), [t]), F = e.useRef(null), I = P.some((e) => e.resizable), { columnWidths: ee, resizingColumnId: te, startResize: ne } = Ux({
10797
+ Qx.displayName = "DataTableEmpty";
10798
+ function $x({ columns: t, data: n, children: r, loading: i, totalRows: a, onStateChange: o, defaultSort: s, manualSorting: c = !1, globalFilter: d = !1, manualFiltering: f = !1, pageSize: p = 20, manualPagination: m = !1, onRowClick: h, renderRowLink: g, rowClassName: _, getRowId: v, selectable: y = !1, onSelectionChange: b, onColumnResize: x, className: S, ref: C }) {
10799
+ let [w, T] = e.useState(s ?? null), [E, D] = e.useState(""), [O, k] = e.useState({}), [A, j] = e.useState(1), [M, N] = e.useState(/* @__PURE__ */ new Set()), P = e.useMemo(() => t.filter((e) => !e.hidden), [t]), F = e.useRef(null), I = e.useCallback((e) => {
10800
+ F.current = e, typeof C == "function" ? C(e) : C && typeof C == "object" && (C.current = e);
10801
+ }, [C]), { hiddenColumnIds: ee } = qx({
10744
10802
  columns: P,
10803
+ containerRef: F,
10804
+ hasSelectionColumn: y
10805
+ }), te = e.useMemo(() => ee.size === 0 ? P : P.filter((e) => !ee.has(e.id)), [P, ee]), ne = e.useRef(null), re = te.some((e) => e.resizable), { columnWidths: L, resizingColumnId: R, startResize: ie } = Ux({
10806
+ columns: te,
10745
10807
  hasSelectionColumn: y,
10746
10808
  onColumnResize: x,
10747
- tableRef: F
10748
- }), re = e.useRef(o);
10809
+ tableRef: ne
10810
+ }), ae = e.useRef(o);
10749
10811
  e.useLayoutEffect(() => {
10750
- re.current = o;
10812
+ ae.current = o;
10751
10813
  });
10752
- let L = e.useRef(!1);
10814
+ let z = e.useRef(!1);
10753
10815
  e.useEffect(() => {
10754
- if (!L.current) {
10755
- L.current = !0;
10816
+ if (!z.current) {
10817
+ z.current = !0;
10756
10818
  return;
10757
10819
  }
10758
- re.current?.({
10820
+ ae.current?.({
10759
10821
  sort: w,
10760
10822
  globalFilter: E,
10761
10823
  columnFilters: O,
@@ -10769,7 +10831,7 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10769
10831
  A,
10770
10832
  p
10771
10833
  ]);
10772
- let R = e.useCallback((e) => {
10834
+ let oe = e.useCallback((e) => {
10773
10835
  T((t) => !t || t.id !== e ? {
10774
10836
  id: e,
10775
10837
  desc: !1
@@ -10777,19 +10839,19 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10777
10839
  id: e,
10778
10840
  desc: !t.desc
10779
10841
  }), j(1);
10780
- }, []), ie = e.useCallback((e) => {
10842
+ }, []), B = e.useCallback((e) => {
10781
10843
  D(e), j(1);
10782
- }, []), ae = e.useCallback((e, t) => {
10844
+ }, []), se = e.useCallback((e, t) => {
10783
10845
  k((n) => ({
10784
10846
  ...n,
10785
10847
  [e]: t
10786
10848
  })), j(1);
10787
- }, []), z = e.useCallback((e) => {
10849
+ }, []), ce = e.useCallback((e) => {
10788
10850
  k((t) => {
10789
10851
  let n = { ...t };
10790
10852
  return delete n[e], n;
10791
10853
  }), j(1);
10792
- }, []), oe = e.useCallback((e, t) => {
10854
+ }, []), le = e.useCallback((e, t) => {
10793
10855
  k((n) => {
10794
10856
  let r = Array.isArray(n[e]) ? n[e] : [], i = r.includes(t) ? r.filter((e) => e !== t) : [...r, t];
10795
10857
  if (i.length === 0) {
@@ -10801,7 +10863,7 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10801
10863
  [e]: i
10802
10864
  };
10803
10865
  }), j(1);
10804
- }, []), B = e.useMemo(() => {
10866
+ }, []), ue = e.useMemo(() => {
10805
10867
  let e = [...n];
10806
10868
  if (!f && E) {
10807
10869
  let n = E.toLowerCase();
@@ -10839,79 +10901,79 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10839
10901
  O,
10840
10902
  c,
10841
10903
  f
10842
- ]), se = m ? a ?? n.length : B.length, ce = p > 0 ? Math.max(1, Math.ceil(se / p)) : 1, le = e.useMemo(() => {
10843
- if (p <= 0 || m) return B;
10904
+ ]), de = m ? a ?? n.length : ue.length, fe = p > 0 ? Math.max(1, Math.ceil(de / p)) : 1, pe = e.useMemo(() => {
10905
+ if (p <= 0 || m) return ue;
10844
10906
  let e = (A - 1) * p;
10845
- return B.slice(e, e + p);
10907
+ return ue.slice(e, e + p);
10846
10908
  }, [
10847
- B,
10909
+ ue,
10848
10910
  A,
10849
10911
  p,
10850
10912
  m
10851
- ]), ue = e.useCallback((e) => {
10913
+ ]), me = e.useCallback((e) => {
10852
10914
  j(e);
10853
- }, []), de = e.useCallback((e) => v ? v(e) : String(e.id ?? ""), [v]), fe = e.useCallback((e) => {
10854
- let t = de(e);
10915
+ }, []), he = e.useCallback((e) => v ? v(e) : String(e.id ?? ""), [v]), V = e.useCallback((e) => {
10916
+ let t = he(e);
10855
10917
  N((e) => {
10856
10918
  let r = new Set(e);
10857
10919
  r.has(t) ? r.delete(t) : r.add(t);
10858
- let i = n.filter((e) => r.has(de(e)));
10920
+ let i = n.filter((e) => r.has(he(e)));
10859
10921
  return b?.(i), r;
10860
10922
  });
10861
10923
  }, [
10862
10924
  n,
10863
- de,
10925
+ he,
10864
10926
  b
10865
- ]), pe = e.useCallback(() => {
10927
+ ]), ge = e.useCallback(() => {
10866
10928
  N((e) => {
10867
- if (e.size === le.length) return b?.([]), /* @__PURE__ */ new Set();
10868
- let t = new Set(le.map((e) => de(e)));
10869
- return b?.(le), t;
10929
+ if (e.size === pe.length) return b?.([]), /* @__PURE__ */ new Set();
10930
+ let t = new Set(pe.map((e) => he(e)));
10931
+ return b?.(pe), t;
10870
10932
  });
10871
10933
  }, [
10872
- le,
10873
- de,
10934
+ pe,
10935
+ he,
10874
10936
  b
10875
- ]), me = e.useCallback((e) => M.has(de(e)), [M, de]), he = null, V = null;
10937
+ ]), _e = e.useCallback((e) => M.has(he(e)), [M, he]), ve = null, ye = null;
10876
10938
  e.Children.forEach(r, (t) => {
10877
- e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ? he = t : t.type?.displayName === "DataTableEmpty" && (V = t));
10939
+ e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ? ve = t : t.type?.displayName === "DataTableEmpty" && (ye = t));
10878
10940
  });
10879
- let ge = (e) => !w || w.id !== e ? "↕" : w.desc ? "↓" : "↑", _e = le.length === 0 && !i;
10941
+ let be = (e) => !w || w.id !== e ? "↕" : w.desc ? "↓" : "↑", xe = pe.length === 0 && !i;
10880
10942
  return /* @__PURE__ */ u("div", {
10881
- ref: C,
10943
+ ref: I,
10882
10944
  className: W("space-y-4", S),
10883
10945
  children: [
10884
- (d || he) && /* @__PURE__ */ u("div", {
10946
+ (d || ve) && /* @__PURE__ */ u("div", {
10885
10947
  className: "flex items-center gap-4",
10886
10948
  children: [d && /* @__PURE__ */ l(Zt, {
10887
10949
  placeholder: "Search...",
10888
10950
  value: E,
10889
- onChange: (e) => ie(e.target.value),
10951
+ onChange: (e) => B(e.target.value),
10890
10952
  className: "max-w-sm"
10891
10953
  }), /* @__PURE__ */ l("div", {
10892
10954
  className: "ml-auto flex items-center gap-2",
10893
- children: he
10955
+ children: ve
10894
10956
  })]
10895
10957
  }),
10896
10958
  /* @__PURE__ */ u(Ay, {
10897
- tableLayout: I ? "fixed" : void 0,
10898
- ref: F,
10959
+ tableLayout: re ? "fixed" : void 0,
10960
+ ref: ne,
10899
10961
  children: [
10900
- I && /* @__PURE__ */ u("colgroup", { children: [y && /* @__PURE__ */ l("col", { style: { width: 40 } }), P.map((e) => {
10901
- let t = ee.get(e.id);
10962
+ re && /* @__PURE__ */ u("colgroup", { children: [y && /* @__PURE__ */ l("col", { style: { width: 40 } }), te.map((e) => {
10963
+ let t = L.get(e.id);
10902
10964
  return /* @__PURE__ */ l("col", { style: t == null ? void 0 : { width: t } }, e.id);
10903
10965
  })] }),
10904
10966
  /* @__PURE__ */ l(jy, { children: /* @__PURE__ */ u(Py, { children: [y && /* @__PURE__ */ l(Fy, {
10905
10967
  className: "w-10",
10906
10968
  children: /* @__PURE__ */ l(Op, {
10907
- checked: le.length > 0 && M.size === le.length,
10908
- onCheckedChange: pe,
10969
+ checked: pe.length > 0 && M.size === pe.length,
10970
+ onCheckedChange: ge,
10909
10971
  "aria-label": "Select all"
10910
10972
  })
10911
- }), P.map((e) => /* @__PURE__ */ u(Fy, {
10912
- className: W(e.sortable && "cursor-pointer select-none", I && "relative", e.className),
10913
- style: !I && e.width ? { width: e.width } : void 0,
10914
- onClick: e.sortable ? () => R(e.id) : void 0,
10973
+ }), te.map((e) => /* @__PURE__ */ u(Fy, {
10974
+ className: W(e.sortable && "cursor-pointer select-none", re && "relative", e.className),
10975
+ style: !re && e.width ? { width: e.width } : void 0,
10976
+ onClick: e.sortable ? () => oe(e.id) : void 0,
10915
10977
  children: [/* @__PURE__ */ u("span", {
10916
10978
  className: "inline-flex items-center",
10917
10979
  children: [
@@ -10919,41 +10981,41 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10919
10981
  e.sortable && typeof e.header != "function" && /* @__PURE__ */ l("span", {
10920
10982
  "aria-hidden": !0,
10921
10983
  className: "ml-1",
10922
- children: ge(e.id)
10984
+ children: be(e.id)
10923
10985
  }),
10924
- e.filterable && /* @__PURE__ */ l(Gx, {
10986
+ e.filterable && /* @__PURE__ */ l(Xx, {
10925
10987
  column: e,
10926
10988
  data: n,
10927
10989
  value: O[e.id],
10928
- onChange: ae,
10929
- onClear: z,
10930
- onToggle: oe
10990
+ onChange: se,
10991
+ onClear: ce,
10992
+ onToggle: le
10931
10993
  })
10932
10994
  ]
10933
10995
  }), e.resizable && /* @__PURE__ */ l("div", {
10934
10996
  role: "separator",
10935
10997
  "aria-orientation": "vertical",
10936
10998
  onMouseDown: (t) => {
10937
- t.preventDefault(), t.stopPropagation(), ne(e.id, t);
10999
+ t.preventDefault(), t.stopPropagation(), ie(e.id, t);
10938
11000
  },
10939
- className: W("absolute top-0 -right-px z-10 h-full w-2 cursor-col-resize", "after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-0.5", te === e.id ? "after:bg-accent" : "after:bg-transparent hover:after:bg-accent/20", "after:transition-colors")
11001
+ className: W("absolute top-0 -right-px z-10 h-full w-2 cursor-col-resize", "after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-0.5", R === e.id ? "after:bg-accent" : "after:bg-transparent hover:after:bg-accent/20", "after:transition-colors")
10940
11002
  })]
10941
11003
  }, e.id))] }) }),
10942
- /* @__PURE__ */ l(My, { children: _e ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
10943
- colSpan: P.length + +!!y,
11004
+ /* @__PURE__ */ l(My, { children: xe ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
11005
+ colSpan: te.length + +!!y,
10944
11006
  className: "h-24",
10945
- children: V ?? /* @__PURE__ */ l(Ax, { title: "No results" })
10946
- }) }) : le.map((e, t) => {
11007
+ children: ye ?? /* @__PURE__ */ l(Ax, { title: "No results" })
11008
+ }) }) : pe.map((e, t) => {
10947
11009
  let n = m ? t : (A - 1) * p + t, r = g?.(e), i = y && /* @__PURE__ */ l(Iy, {
10948
11010
  className: "w-10",
10949
11011
  onClick: (e) => e.stopPropagation(),
10950
11012
  children: /* @__PURE__ */ l(Op, {
10951
- checked: me(e),
10952
- onCheckedChange: () => fe(e),
11013
+ checked: _e(e),
11014
+ onCheckedChange: () => V(e),
10953
11015
  "aria-label": "Select row"
10954
11016
  })
10955
- }), a = P.map((t) => /* @__PURE__ */ l(Iy, {
10956
- className: W(t.className, I && "overflow-hidden text-ellipsis"),
11017
+ }), a = te.map((t) => /* @__PURE__ */ l(Iy, {
11018
+ className: W(t.className, re && "overflow-hidden text-ellipsis"),
10957
11019
  children: r ? /* @__PURE__ */ l("a", {
10958
11020
  href: r.href,
10959
11021
  className: "contents",
@@ -10963,25 +11025,25 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
10963
11025
  return /* @__PURE__ */ u(Py, {
10964
11026
  className: W((h || r) && "cursor-pointer", _?.(e, n)),
10965
11027
  onClick: h ? () => h(e, n) : void 0,
10966
- "data-state": me(e) ? "selected" : void 0,
11028
+ "data-state": _e(e) ? "selected" : void 0,
10967
11029
  children: [i, a]
10968
11030
  }, v ? v(e) : t);
10969
11031
  }) })
10970
11032
  ]
10971
11033
  }),
10972
- p > 0 && ce > 1 && /* @__PURE__ */ l(jx, {
11034
+ p > 0 && fe > 1 && /* @__PURE__ */ l(jx, {
10973
11035
  page: A,
10974
11036
  pageSize: p,
10975
- totalItems: se,
10976
- totalPages: ce,
10977
- onPageChange: ue
11037
+ totalItems: de,
11038
+ totalPages: fe,
11039
+ onPageChange: me
10978
11040
  })
10979
11041
  ]
10980
11042
  });
10981
11043
  }
10982
11044
  //#endregion
10983
11045
  //#region src/components/Timeline.tsx
10984
- function Yx({ className: e, children: t, ref: n, ...r }) {
11046
+ function eS({ className: e, children: t, ref: n, ...r }) {
10985
11047
  return /* @__PURE__ */ l("div", {
10986
11048
  ref: n,
10987
11049
  className: W("relative space-y-0", e),
@@ -10989,20 +11051,20 @@ function Yx({ className: e, children: t, ref: n, ...r }) {
10989
11051
  children: t
10990
11052
  });
10991
11053
  }
10992
- var Xx = e.createContext({
11054
+ var tS = e.createContext({
10993
11055
  expanded: !1,
10994
11056
  setExpanded: () => {},
10995
11057
  expandable: !1
10996
- }), Zx = {
11058
+ }), nS = {
10997
11059
  default: "border-border bg-bg-elevated",
10998
11060
  success: "border-green bg-green text-white",
10999
11061
  danger: "border-red bg-red text-white",
11000
11062
  warning: "border-orange bg-orange text-white",
11001
11063
  info: "border-accent bg-accent text-white"
11002
11064
  };
11003
- function Qx({ className: t, children: n, icon: r, variant: i = "default", timestamp: a, expandable: o = !1, defaultExpanded: s = !1, ref: c, ...d }) {
11065
+ function rS({ className: t, children: n, icon: r, variant: i = "default", timestamp: a, expandable: o = !1, defaultExpanded: s = !1, ref: c, ...d }) {
11004
11066
  let [f, p] = e.useState(s);
11005
- return /* @__PURE__ */ l(Xx.Provider, {
11067
+ return /* @__PURE__ */ l(tS.Provider, {
11006
11068
  value: {
11007
11069
  expanded: f,
11008
11070
  setExpanded: p,
@@ -11016,7 +11078,7 @@ function Qx({ className: t, children: n, icon: r, variant: i = "default", timest
11016
11078
  /* @__PURE__ */ l("div", { className: "absolute left-[0.6875rem] top-6 bottom-0 w-px bg-border last-of-type:hidden" }),
11017
11079
  /* @__PURE__ */ l("div", {
11018
11080
  "data-timeline-marker": "",
11019
- className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2", Zx[i]),
11081
+ className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2", nS[i]),
11020
11082
  children: r && /* @__PURE__ */ l("span", {
11021
11083
  className: "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
11022
11084
  children: r
@@ -11033,8 +11095,8 @@ function Qx({ className: t, children: n, icon: r, variant: i = "default", timest
11033
11095
  })
11034
11096
  });
11035
11097
  }
11036
- function $x({ className: t, title: n, description: r, detail: i, actions: a, onClick: o, renderLink: s, ref: d, ...f }) {
11037
- let { expanded: p, setExpanded: m, expandable: h } = e.useContext(Xx), g = /* @__PURE__ */ l("span", {
11098
+ function iS({ className: t, title: n, description: r, detail: i, actions: a, onClick: o, renderLink: s, ref: d, ...f }) {
11099
+ let { expanded: p, setExpanded: m, expandable: h } = e.useContext(tS), g = /* @__PURE__ */ l("span", {
11038
11100
  className: W("text-sm font-medium text-text-primary", o && "cursor-pointer hover:underline"),
11039
11101
  onClick: o,
11040
11102
  children: n
@@ -11067,7 +11129,7 @@ function $x({ className: t, title: n, description: r, detail: i, actions: a, onC
11067
11129
  })] })]
11068
11130
  });
11069
11131
  }
11070
- function eS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
11132
+ function aS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
11071
11133
  let o = (e) => {
11072
11134
  n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
11073
11135
  };
@@ -11084,4 +11146,4 @@ function eS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
11084
11146
  });
11085
11147
  }
11086
11148
  //#endregion
11087
- export { Vr as Accordion, Wr as AccordionContent, Hr as AccordionItem, Ur as AccordionTrigger, cn as Alert, un as AlertDescription, Ps as AlertDialog, Us as AlertDialogAction, Ws as AlertDialogCancel, Rs as AlertDialogContent, Hs as AlertDialogDescription, Bs as AlertDialogFooter, zs as AlertDialogHeader, Ls as AlertDialogOverlay, Is as AlertDialogPortal, Vs as AlertDialogTitle, Fs as AlertDialogTrigger, ln as AlertTitle, rx as AnimatedCounter, Ix as AppShell, Bx as AppShellFooter, zx as AppShellMain, Rx as AppShellNav, Lx as AppShellSidebar, on as Badge, yx as Breadcrumb, Wt as Button, Gt as Card, Yt as CardContent, Jt as CardDescription, Xt as CardFooter, Kt as CardHeader, qt as CardTitle, Op as Checkbox, Hb as CodeBlock, Zb as Combobox, ex as ComboboxContent, nx as ComboboxEmpty, $b as ComboboxInput, tx as ComboboxItem, Qb as ComboboxTrigger, Jx as DataTable, qx as DataTableEmpty, Kx as DataTableToolbar, Ho as Dialog, Wo as DialogClose, qo as DialogContent, Zo as DialogDescription, Yo as DialogFooter, Jo as DialogHeader, Ko as DialogOverlay, Go as DialogPortal, Xo as DialogTitle, Uo as DialogTrigger, Jv as DropdownMenu, iy as DropdownMenuCheckboxItem, Qv as DropdownMenuContent, Xv as DropdownMenuGroup, $v as DropdownMenuItem, ey as DropdownMenuLabel, ry as DropdownMenuRadioGroup, ay as DropdownMenuRadioItem, ty as DropdownMenuSeparator, Zv as DropdownMenuSub, oy as DropdownMenuSubContent, ny as DropdownMenuSubTrigger, Yv as DropdownMenuTrigger, Ax as EmptyState, Zt as Input, rn as Label, mx as MetaHead, dx as Nav, kx as PageHeader, jx as Pagination, og as Popover, cg as PopoverContent, sg as PopoverTrigger, Oy as Progress, nm as RadioGroup, rm as RadioGroupItem, ip as Select, cp as SelectContent, ap as SelectGroup, up as SelectItem, lp as SelectLabel, dp as SelectSeparator, sp as SelectTrigger, op as SelectValue, vn as Separator, Cm as Sheet, Tm as SheetClose, km as SheetContent, Nm as SheetDescription, jm as SheetFooter, Am as SheetHeader, Dm as SheetOverlay, Em as SheetPortal, Mm as SheetTitle, wm as SheetTrigger, Cx as Sidebar, Tx as SidebarContent, Ex as SidebarFooter, Dx as SidebarGroup, wx as SidebarHeader, Ox as SidebarItem, ky as Skeleton, Nx as StatCard, gx as StructuredData, _m as Switch, Ay as Table, My as TableBody, Ly as TableCaption, Iy as TableCell, Ny as TableFooter, Fy as TableHead, jy as TableHeader, Py as TableRow, jc as Tabs, Pc as TabsContent, Mc as TabsList, Nc as TabsTrigger, Qt as Textarea, Tt as ThemeProvider, Yx as Timeline, $x as TimelineContent, eS as TimelineFilter, Qx as TimelineItem, Ib as Toast, Lb as ToastAction, Rb as ToastClose, Bb as ToastDescription, Nb as ToastProvider, zb as ToastTitle, Pb as ToastViewport, Vb as Toaster, Sm as Toggle, xh as Tooltip, Ch as TooltipContent, bh as TooltipProvider, Sh as TooltipTrigger, Kb as Video, sn as alertVariants, an as badgeVariants, Ut as buttonVariants, qb as cloudflareStreamHls, Jb as cloudflareStreamMp4, W as cn, Ze as createOgImageUrl, vt as dismissAll, _t as toast, xm as toggleVariants, Ct as useAlternateLinks, Fx as useAppShell, xt as useCanonical, Xb as useComboboxContext, ot as useMobile, st as useScrollNav, it as useTheme, Et as useThemeContext, yt as useToast };
11149
+ export { Vr as Accordion, Wr as AccordionContent, Hr as AccordionItem, Ur as AccordionTrigger, cn as Alert, un as AlertDescription, Ps as AlertDialog, Us as AlertDialogAction, Ws as AlertDialogCancel, Rs as AlertDialogContent, Hs as AlertDialogDescription, Bs as AlertDialogFooter, zs as AlertDialogHeader, Ls as AlertDialogOverlay, Is as AlertDialogPortal, Vs as AlertDialogTitle, Fs as AlertDialogTrigger, ln as AlertTitle, rx as AnimatedCounter, Ix as AppShell, Bx as AppShellFooter, zx as AppShellMain, Rx as AppShellNav, Lx as AppShellSidebar, on as Badge, yx as Breadcrumb, Wt as Button, Gt as Card, Yt as CardContent, Jt as CardDescription, Xt as CardFooter, Kt as CardHeader, qt as CardTitle, Op as Checkbox, Hb as CodeBlock, Zb as Combobox, ex as ComboboxContent, nx as ComboboxEmpty, $b as ComboboxInput, tx as ComboboxItem, Qb as ComboboxTrigger, $x as DataTable, Qx as DataTableEmpty, Zx as DataTableToolbar, Ho as Dialog, Wo as DialogClose, qo as DialogContent, Zo as DialogDescription, Yo as DialogFooter, Jo as DialogHeader, Ko as DialogOverlay, Go as DialogPortal, Xo as DialogTitle, Uo as DialogTrigger, Jv as DropdownMenu, iy as DropdownMenuCheckboxItem, Qv as DropdownMenuContent, Xv as DropdownMenuGroup, $v as DropdownMenuItem, ey as DropdownMenuLabel, ry as DropdownMenuRadioGroup, ay as DropdownMenuRadioItem, ty as DropdownMenuSeparator, Zv as DropdownMenuSub, oy as DropdownMenuSubContent, ny as DropdownMenuSubTrigger, Yv as DropdownMenuTrigger, Ax as EmptyState, Zt as Input, rn as Label, mx as MetaHead, dx as Nav, kx as PageHeader, jx as Pagination, og as Popover, cg as PopoverContent, sg as PopoverTrigger, Oy as Progress, nm as RadioGroup, rm as RadioGroupItem, ip as Select, cp as SelectContent, ap as SelectGroup, up as SelectItem, lp as SelectLabel, dp as SelectSeparator, sp as SelectTrigger, op as SelectValue, vn as Separator, Cm as Sheet, Tm as SheetClose, km as SheetContent, Nm as SheetDescription, jm as SheetFooter, Am as SheetHeader, Dm as SheetOverlay, Em as SheetPortal, Mm as SheetTitle, wm as SheetTrigger, Cx as Sidebar, Tx as SidebarContent, Ex as SidebarFooter, Dx as SidebarGroup, wx as SidebarHeader, Ox as SidebarItem, ky as Skeleton, Nx as StatCard, gx as StructuredData, _m as Switch, Ay as Table, My as TableBody, Ly as TableCaption, Iy as TableCell, Ny as TableFooter, Fy as TableHead, jy as TableHeader, Py as TableRow, jc as Tabs, Pc as TabsContent, Mc as TabsList, Nc as TabsTrigger, Qt as Textarea, Tt as ThemeProvider, eS as Timeline, iS as TimelineContent, aS as TimelineFilter, rS as TimelineItem, Ib as Toast, Lb as ToastAction, Rb as ToastClose, Bb as ToastDescription, Nb as ToastProvider, zb as ToastTitle, Pb as ToastViewport, Vb as Toaster, Sm as Toggle, xh as Tooltip, Ch as TooltipContent, bh as TooltipProvider, Sh as TooltipTrigger, Kb as Video, sn as alertVariants, an as badgeVariants, Ut as buttonVariants, qb as cloudflareStreamHls, Jb as cloudflareStreamMp4, W as cn, Ze as createOgImageUrl, vt as dismissAll, _t as toast, xm as toggleVariants, Ct as useAlternateLinks, Fx as useAppShell, xt as useCanonical, Xb as useComboboxContext, ot as useMobile, st as useScrollNav, it as useTheme, Et as useThemeContext, yt as useToast };