@metaphor-cloud/ui 0.18.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.
- package/dist/components/DataTable.d.ts +7 -0
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/hooks/use-responsive-columns.d.ts +30 -0
- package/dist/hooks/use-responsive-columns.d.ts.map +1 -0
- package/dist/metaphor-ui.css +1 -1
- package/dist/metaphor-ui.js +146 -87
- package/dist/themes/adapter-all.css +1 -1
- package/dist/themes/metaphor-all.css +1 -1
- package/dist/themes/um-all.css +1 -1
- package/package.json +2 -2
package/dist/metaphor-ui.js
CHANGED
|
@@ -9438,9 +9438,9 @@ function Pb({ className: e, ref: t, ...n }) {
|
|
|
9438
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", {
|
|
9439
9439
|
variants: { variant: {
|
|
9440
9440
|
default: "border-border bg-bg-elevated text-text-primary",
|
|
9441
|
-
success: "border-success-border bg-
|
|
9442
|
-
danger: "border-danger-border bg-
|
|
9443
|
-
warning: "border-warning-border bg-
|
|
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"
|
|
9444
9444
|
} },
|
|
9445
9445
|
defaultVariants: { variant: "default" }
|
|
9446
9446
|
});
|
|
@@ -10638,8 +10638,61 @@ function Ux({ columns: t, hasSelectionColumn: n, onColumnResize: r, tableRef: i
|
|
|
10638
10638
|
};
|
|
10639
10639
|
}
|
|
10640
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
|
|
10641
10694
|
//#region src/components/DataTable.tsx
|
|
10642
|
-
function
|
|
10695
|
+
function Yx({ filled: e, className: t }) {
|
|
10643
10696
|
return /* @__PURE__ */ l("svg", {
|
|
10644
10697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10645
10698
|
viewBox: "0 0 16 16",
|
|
@@ -10660,7 +10713,7 @@ function Wx({ filled: e, className: t }) {
|
|
|
10660
10713
|
})
|
|
10661
10714
|
});
|
|
10662
10715
|
}
|
|
10663
|
-
function
|
|
10716
|
+
function Xx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o }) {
|
|
10664
10717
|
let [s, c] = e.useState(!1), d = e.useMemo(() => {
|
|
10665
10718
|
if (t.filterOptions) return t.filterOptions;
|
|
10666
10719
|
if (!t.accessorKey) return null;
|
|
@@ -10689,7 +10742,7 @@ function Gx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
|
|
|
10689
10742
|
},
|
|
10690
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"),
|
|
10691
10744
|
"aria-label": `Filter ${typeof t.header == "string" ? t.header : t.id}`,
|
|
10692
|
-
children: /* @__PURE__ */ l(
|
|
10745
|
+
children: /* @__PURE__ */ l(Yx, { filled: p })
|
|
10693
10746
|
})
|
|
10694
10747
|
}), /* @__PURE__ */ u(cg, {
|
|
10695
10748
|
align: "start",
|
|
@@ -10726,39 +10779,45 @@ function Gx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
|
|
|
10726
10779
|
})]
|
|
10727
10780
|
});
|
|
10728
10781
|
}
|
|
10729
|
-
function
|
|
10782
|
+
function Zx({ children: e, className: t, ...n }) {
|
|
10730
10783
|
return /* @__PURE__ */ l("div", {
|
|
10731
10784
|
className: W("flex items-center gap-2", t),
|
|
10732
10785
|
...n,
|
|
10733
10786
|
children: e
|
|
10734
10787
|
});
|
|
10735
10788
|
}
|
|
10736
|
-
|
|
10737
|
-
function
|
|
10789
|
+
Zx.displayName = "DataTableToolbar";
|
|
10790
|
+
function Qx({ children: e, className: t, ...n }) {
|
|
10738
10791
|
return /* @__PURE__ */ l("div", {
|
|
10739
10792
|
className: t,
|
|
10740
10793
|
...n,
|
|
10741
10794
|
children: e
|
|
10742
10795
|
});
|
|
10743
10796
|
}
|
|
10744
|
-
|
|
10745
|
-
function
|
|
10746
|
-
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 =
|
|
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({
|
|
10747
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,
|
|
10748
10807
|
hasSelectionColumn: y,
|
|
10749
10808
|
onColumnResize: x,
|
|
10750
|
-
tableRef:
|
|
10751
|
-
}),
|
|
10809
|
+
tableRef: ne
|
|
10810
|
+
}), ae = e.useRef(o);
|
|
10752
10811
|
e.useLayoutEffect(() => {
|
|
10753
|
-
|
|
10812
|
+
ae.current = o;
|
|
10754
10813
|
});
|
|
10755
|
-
let
|
|
10814
|
+
let z = e.useRef(!1);
|
|
10756
10815
|
e.useEffect(() => {
|
|
10757
|
-
if (!
|
|
10758
|
-
|
|
10816
|
+
if (!z.current) {
|
|
10817
|
+
z.current = !0;
|
|
10759
10818
|
return;
|
|
10760
10819
|
}
|
|
10761
|
-
|
|
10820
|
+
ae.current?.({
|
|
10762
10821
|
sort: w,
|
|
10763
10822
|
globalFilter: E,
|
|
10764
10823
|
columnFilters: O,
|
|
@@ -10772,7 +10831,7 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10772
10831
|
A,
|
|
10773
10832
|
p
|
|
10774
10833
|
]);
|
|
10775
|
-
let
|
|
10834
|
+
let oe = e.useCallback((e) => {
|
|
10776
10835
|
T((t) => !t || t.id !== e ? {
|
|
10777
10836
|
id: e,
|
|
10778
10837
|
desc: !1
|
|
@@ -10780,19 +10839,19 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10780
10839
|
id: e,
|
|
10781
10840
|
desc: !t.desc
|
|
10782
10841
|
}), j(1);
|
|
10783
|
-
}, []),
|
|
10842
|
+
}, []), B = e.useCallback((e) => {
|
|
10784
10843
|
D(e), j(1);
|
|
10785
|
-
}, []),
|
|
10844
|
+
}, []), se = e.useCallback((e, t) => {
|
|
10786
10845
|
k((n) => ({
|
|
10787
10846
|
...n,
|
|
10788
10847
|
[e]: t
|
|
10789
10848
|
})), j(1);
|
|
10790
|
-
}, []),
|
|
10849
|
+
}, []), ce = e.useCallback((e) => {
|
|
10791
10850
|
k((t) => {
|
|
10792
10851
|
let n = { ...t };
|
|
10793
10852
|
return delete n[e], n;
|
|
10794
10853
|
}), j(1);
|
|
10795
|
-
}, []),
|
|
10854
|
+
}, []), le = e.useCallback((e, t) => {
|
|
10796
10855
|
k((n) => {
|
|
10797
10856
|
let r = Array.isArray(n[e]) ? n[e] : [], i = r.includes(t) ? r.filter((e) => e !== t) : [...r, t];
|
|
10798
10857
|
if (i.length === 0) {
|
|
@@ -10804,7 +10863,7 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10804
10863
|
[e]: i
|
|
10805
10864
|
};
|
|
10806
10865
|
}), j(1);
|
|
10807
|
-
}, []),
|
|
10866
|
+
}, []), ue = e.useMemo(() => {
|
|
10808
10867
|
let e = [...n];
|
|
10809
10868
|
if (!f && E) {
|
|
10810
10869
|
let n = E.toLowerCase();
|
|
@@ -10842,79 +10901,79 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10842
10901
|
O,
|
|
10843
10902
|
c,
|
|
10844
10903
|
f
|
|
10845
|
-
]),
|
|
10846
|
-
if (p <= 0 || m) return
|
|
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;
|
|
10847
10906
|
let e = (A - 1) * p;
|
|
10848
|
-
return
|
|
10907
|
+
return ue.slice(e, e + p);
|
|
10849
10908
|
}, [
|
|
10850
|
-
|
|
10909
|
+
ue,
|
|
10851
10910
|
A,
|
|
10852
10911
|
p,
|
|
10853
10912
|
m
|
|
10854
|
-
]),
|
|
10913
|
+
]), me = e.useCallback((e) => {
|
|
10855
10914
|
j(e);
|
|
10856
|
-
}, []),
|
|
10857
|
-
let t =
|
|
10915
|
+
}, []), he = e.useCallback((e) => v ? v(e) : String(e.id ?? ""), [v]), V = e.useCallback((e) => {
|
|
10916
|
+
let t = he(e);
|
|
10858
10917
|
N((e) => {
|
|
10859
10918
|
let r = new Set(e);
|
|
10860
10919
|
r.has(t) ? r.delete(t) : r.add(t);
|
|
10861
|
-
let i = n.filter((e) => r.has(
|
|
10920
|
+
let i = n.filter((e) => r.has(he(e)));
|
|
10862
10921
|
return b?.(i), r;
|
|
10863
10922
|
});
|
|
10864
10923
|
}, [
|
|
10865
10924
|
n,
|
|
10866
|
-
|
|
10925
|
+
he,
|
|
10867
10926
|
b
|
|
10868
|
-
]),
|
|
10927
|
+
]), ge = e.useCallback(() => {
|
|
10869
10928
|
N((e) => {
|
|
10870
|
-
if (e.size ===
|
|
10871
|
-
let t = new Set(
|
|
10872
|
-
return b?.(
|
|
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;
|
|
10873
10932
|
});
|
|
10874
10933
|
}, [
|
|
10875
|
-
|
|
10876
|
-
|
|
10934
|
+
pe,
|
|
10935
|
+
he,
|
|
10877
10936
|
b
|
|
10878
|
-
]),
|
|
10937
|
+
]), _e = e.useCallback((e) => M.has(he(e)), [M, he]), ve = null, ye = null;
|
|
10879
10938
|
e.Children.forEach(r, (t) => {
|
|
10880
|
-
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ?
|
|
10939
|
+
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ? ve = t : t.type?.displayName === "DataTableEmpty" && (ye = t));
|
|
10881
10940
|
});
|
|
10882
|
-
let
|
|
10941
|
+
let be = (e) => !w || w.id !== e ? "↕" : w.desc ? "↓" : "↑", xe = pe.length === 0 && !i;
|
|
10883
10942
|
return /* @__PURE__ */ u("div", {
|
|
10884
|
-
ref:
|
|
10943
|
+
ref: I,
|
|
10885
10944
|
className: W("space-y-4", S),
|
|
10886
10945
|
children: [
|
|
10887
|
-
(d ||
|
|
10946
|
+
(d || ve) && /* @__PURE__ */ u("div", {
|
|
10888
10947
|
className: "flex items-center gap-4",
|
|
10889
10948
|
children: [d && /* @__PURE__ */ l(Zt, {
|
|
10890
10949
|
placeholder: "Search...",
|
|
10891
10950
|
value: E,
|
|
10892
|
-
onChange: (e) =>
|
|
10951
|
+
onChange: (e) => B(e.target.value),
|
|
10893
10952
|
className: "max-w-sm"
|
|
10894
10953
|
}), /* @__PURE__ */ l("div", {
|
|
10895
10954
|
className: "ml-auto flex items-center gap-2",
|
|
10896
|
-
children:
|
|
10955
|
+
children: ve
|
|
10897
10956
|
})]
|
|
10898
10957
|
}),
|
|
10899
10958
|
/* @__PURE__ */ u(Ay, {
|
|
10900
|
-
tableLayout:
|
|
10901
|
-
ref:
|
|
10959
|
+
tableLayout: re ? "fixed" : void 0,
|
|
10960
|
+
ref: ne,
|
|
10902
10961
|
children: [
|
|
10903
|
-
|
|
10904
|
-
let t =
|
|
10962
|
+
re && /* @__PURE__ */ u("colgroup", { children: [y && /* @__PURE__ */ l("col", { style: { width: 40 } }), te.map((e) => {
|
|
10963
|
+
let t = L.get(e.id);
|
|
10905
10964
|
return /* @__PURE__ */ l("col", { style: t == null ? void 0 : { width: t } }, e.id);
|
|
10906
10965
|
})] }),
|
|
10907
10966
|
/* @__PURE__ */ l(jy, { children: /* @__PURE__ */ u(Py, { children: [y && /* @__PURE__ */ l(Fy, {
|
|
10908
10967
|
className: "w-10",
|
|
10909
10968
|
children: /* @__PURE__ */ l(Op, {
|
|
10910
|
-
checked:
|
|
10911
|
-
onCheckedChange:
|
|
10969
|
+
checked: pe.length > 0 && M.size === pe.length,
|
|
10970
|
+
onCheckedChange: ge,
|
|
10912
10971
|
"aria-label": "Select all"
|
|
10913
10972
|
})
|
|
10914
|
-
}),
|
|
10915
|
-
className: W(e.sortable && "cursor-pointer select-none",
|
|
10916
|
-
style: !
|
|
10917
|
-
onClick: e.sortable ? () =>
|
|
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,
|
|
10918
10977
|
children: [/* @__PURE__ */ u("span", {
|
|
10919
10978
|
className: "inline-flex items-center",
|
|
10920
10979
|
children: [
|
|
@@ -10922,41 +10981,41 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10922
10981
|
e.sortable && typeof e.header != "function" && /* @__PURE__ */ l("span", {
|
|
10923
10982
|
"aria-hidden": !0,
|
|
10924
10983
|
className: "ml-1",
|
|
10925
|
-
children:
|
|
10984
|
+
children: be(e.id)
|
|
10926
10985
|
}),
|
|
10927
|
-
e.filterable && /* @__PURE__ */ l(
|
|
10986
|
+
e.filterable && /* @__PURE__ */ l(Xx, {
|
|
10928
10987
|
column: e,
|
|
10929
10988
|
data: n,
|
|
10930
10989
|
value: O[e.id],
|
|
10931
|
-
onChange:
|
|
10932
|
-
onClear:
|
|
10933
|
-
onToggle:
|
|
10990
|
+
onChange: se,
|
|
10991
|
+
onClear: ce,
|
|
10992
|
+
onToggle: le
|
|
10934
10993
|
})
|
|
10935
10994
|
]
|
|
10936
10995
|
}), e.resizable && /* @__PURE__ */ l("div", {
|
|
10937
10996
|
role: "separator",
|
|
10938
10997
|
"aria-orientation": "vertical",
|
|
10939
10998
|
onMouseDown: (t) => {
|
|
10940
|
-
t.preventDefault(), t.stopPropagation(),
|
|
10999
|
+
t.preventDefault(), t.stopPropagation(), ie(e.id, t);
|
|
10941
11000
|
},
|
|
10942
|
-
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",
|
|
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")
|
|
10943
11002
|
})]
|
|
10944
11003
|
}, e.id))] }) }),
|
|
10945
|
-
/* @__PURE__ */ l(My, { children:
|
|
10946
|
-
colSpan:
|
|
11004
|
+
/* @__PURE__ */ l(My, { children: xe ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
|
|
11005
|
+
colSpan: te.length + +!!y,
|
|
10947
11006
|
className: "h-24",
|
|
10948
|
-
children:
|
|
10949
|
-
}) }) :
|
|
11007
|
+
children: ye ?? /* @__PURE__ */ l(Ax, { title: "No results" })
|
|
11008
|
+
}) }) : pe.map((e, t) => {
|
|
10950
11009
|
let n = m ? t : (A - 1) * p + t, r = g?.(e), i = y && /* @__PURE__ */ l(Iy, {
|
|
10951
11010
|
className: "w-10",
|
|
10952
11011
|
onClick: (e) => e.stopPropagation(),
|
|
10953
11012
|
children: /* @__PURE__ */ l(Op, {
|
|
10954
|
-
checked:
|
|
10955
|
-
onCheckedChange: () =>
|
|
11013
|
+
checked: _e(e),
|
|
11014
|
+
onCheckedChange: () => V(e),
|
|
10956
11015
|
"aria-label": "Select row"
|
|
10957
11016
|
})
|
|
10958
|
-
}), a =
|
|
10959
|
-
className: W(t.className,
|
|
11017
|
+
}), a = te.map((t) => /* @__PURE__ */ l(Iy, {
|
|
11018
|
+
className: W(t.className, re && "overflow-hidden text-ellipsis"),
|
|
10960
11019
|
children: r ? /* @__PURE__ */ l("a", {
|
|
10961
11020
|
href: r.href,
|
|
10962
11021
|
className: "contents",
|
|
@@ -10966,25 +11025,25 @@ function Jx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10966
11025
|
return /* @__PURE__ */ u(Py, {
|
|
10967
11026
|
className: W((h || r) && "cursor-pointer", _?.(e, n)),
|
|
10968
11027
|
onClick: h ? () => h(e, n) : void 0,
|
|
10969
|
-
"data-state":
|
|
11028
|
+
"data-state": _e(e) ? "selected" : void 0,
|
|
10970
11029
|
children: [i, a]
|
|
10971
11030
|
}, v ? v(e) : t);
|
|
10972
11031
|
}) })
|
|
10973
11032
|
]
|
|
10974
11033
|
}),
|
|
10975
|
-
p > 0 &&
|
|
11034
|
+
p > 0 && fe > 1 && /* @__PURE__ */ l(jx, {
|
|
10976
11035
|
page: A,
|
|
10977
11036
|
pageSize: p,
|
|
10978
|
-
totalItems:
|
|
10979
|
-
totalPages:
|
|
10980
|
-
onPageChange:
|
|
11037
|
+
totalItems: de,
|
|
11038
|
+
totalPages: fe,
|
|
11039
|
+
onPageChange: me
|
|
10981
11040
|
})
|
|
10982
11041
|
]
|
|
10983
11042
|
});
|
|
10984
11043
|
}
|
|
10985
11044
|
//#endregion
|
|
10986
11045
|
//#region src/components/Timeline.tsx
|
|
10987
|
-
function
|
|
11046
|
+
function eS({ className: e, children: t, ref: n, ...r }) {
|
|
10988
11047
|
return /* @__PURE__ */ l("div", {
|
|
10989
11048
|
ref: n,
|
|
10990
11049
|
className: W("relative space-y-0", e),
|
|
@@ -10992,20 +11051,20 @@ function Yx({ className: e, children: t, ref: n, ...r }) {
|
|
|
10992
11051
|
children: t
|
|
10993
11052
|
});
|
|
10994
11053
|
}
|
|
10995
|
-
var
|
|
11054
|
+
var tS = e.createContext({
|
|
10996
11055
|
expanded: !1,
|
|
10997
11056
|
setExpanded: () => {},
|
|
10998
11057
|
expandable: !1
|
|
10999
|
-
}),
|
|
11058
|
+
}), nS = {
|
|
11000
11059
|
default: "border-border bg-bg-elevated",
|
|
11001
11060
|
success: "border-green bg-green text-white",
|
|
11002
11061
|
danger: "border-red bg-red text-white",
|
|
11003
11062
|
warning: "border-orange bg-orange text-white",
|
|
11004
11063
|
info: "border-accent bg-accent text-white"
|
|
11005
11064
|
};
|
|
11006
|
-
function
|
|
11065
|
+
function rS({ className: t, children: n, icon: r, variant: i = "default", timestamp: a, expandable: o = !1, defaultExpanded: s = !1, ref: c, ...d }) {
|
|
11007
11066
|
let [f, p] = e.useState(s);
|
|
11008
|
-
return /* @__PURE__ */ l(
|
|
11067
|
+
return /* @__PURE__ */ l(tS.Provider, {
|
|
11009
11068
|
value: {
|
|
11010
11069
|
expanded: f,
|
|
11011
11070
|
setExpanded: p,
|
|
@@ -11019,7 +11078,7 @@ function Qx({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
11019
11078
|
/* @__PURE__ */ l("div", { className: "absolute left-[0.6875rem] top-6 bottom-0 w-px bg-border last-of-type:hidden" }),
|
|
11020
11079
|
/* @__PURE__ */ l("div", {
|
|
11021
11080
|
"data-timeline-marker": "",
|
|
11022
|
-
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2",
|
|
11081
|
+
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2", nS[i]),
|
|
11023
11082
|
children: r && /* @__PURE__ */ l("span", {
|
|
11024
11083
|
className: "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
|
|
11025
11084
|
children: r
|
|
@@ -11036,8 +11095,8 @@ function Qx({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
11036
11095
|
})
|
|
11037
11096
|
});
|
|
11038
11097
|
}
|
|
11039
|
-
function
|
|
11040
|
-
let { expanded: p, setExpanded: m, expandable: h } = e.useContext(
|
|
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", {
|
|
11041
11100
|
className: W("text-sm font-medium text-text-primary", o && "cursor-pointer hover:underline"),
|
|
11042
11101
|
onClick: o,
|
|
11043
11102
|
children: n
|
|
@@ -11070,7 +11129,7 @@ function $x({ className: t, title: n, description: r, detail: i, actions: a, onC
|
|
|
11070
11129
|
})] })]
|
|
11071
11130
|
});
|
|
11072
11131
|
}
|
|
11073
|
-
function
|
|
11132
|
+
function aS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
11074
11133
|
let o = (e) => {
|
|
11075
11134
|
n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
|
|
11076
11135
|
};
|
|
@@ -11087,4 +11146,4 @@ function eS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
|
11087
11146
|
});
|
|
11088
11147
|
}
|
|
11089
11148
|
//#endregion
|
|
11090
|
-
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,
|
|
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 };
|