@metaphor-cloud/ui 0.19.0 → 0.21.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 +25 -2
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/Table.d.ts +3 -1
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/metaphor-ui.css +1 -1
- package/dist/metaphor-ui.js +208 -141
- 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 +1 -1
package/dist/metaphor-ui.js
CHANGED
|
@@ -9002,15 +9002,15 @@ function ky({ className: e, ref: t, ...n }) {
|
|
|
9002
9002
|
}
|
|
9003
9003
|
//#endregion
|
|
9004
9004
|
//#region src/components/Table.tsx
|
|
9005
|
-
function Ay({ className: e,
|
|
9006
|
-
return /* @__PURE__ */
|
|
9007
|
-
className: "relative w-full overflow-auto",
|
|
9008
|
-
children: /* @__PURE__ */ l("table", {
|
|
9009
|
-
ref:
|
|
9005
|
+
function Ay({ className: e, containerClassName: t, overlay: n, ref: r, tableLayout: i, ...a }) {
|
|
9006
|
+
return /* @__PURE__ */ u("div", {
|
|
9007
|
+
className: W("relative w-full overflow-auto", t),
|
|
9008
|
+
children: [/* @__PURE__ */ l("table", {
|
|
9009
|
+
ref: r,
|
|
9010
9010
|
className: W("w-full caption-bottom text-sm", e),
|
|
9011
|
-
style:
|
|
9012
|
-
...
|
|
9013
|
-
})
|
|
9011
|
+
style: i ? { tableLayout: i } : void 0,
|
|
9012
|
+
...a
|
|
9013
|
+
}), n]
|
|
9014
9014
|
});
|
|
9015
9015
|
}
|
|
9016
9016
|
function jy({ className: e, ref: t, ...n }) {
|
|
@@ -10692,7 +10692,32 @@ function qx({ columns: t, containerRef: n, hasSelectionColumn: r = !1, selection
|
|
|
10692
10692
|
var Jx = /* @__PURE__ */ new Set();
|
|
10693
10693
|
//#endregion
|
|
10694
10694
|
//#region src/components/DataTable.tsx
|
|
10695
|
-
function Yx({
|
|
10695
|
+
function Yx({ className: e }) {
|
|
10696
|
+
return /* @__PURE__ */ u("svg", {
|
|
10697
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10698
|
+
viewBox: "0 0 24 24",
|
|
10699
|
+
width: 20,
|
|
10700
|
+
height: 20,
|
|
10701
|
+
className: W("animate-spin text-accent", e),
|
|
10702
|
+
"aria-hidden": !0,
|
|
10703
|
+
children: [/* @__PURE__ */ l("circle", {
|
|
10704
|
+
cx: "12",
|
|
10705
|
+
cy: "12",
|
|
10706
|
+
r: "9",
|
|
10707
|
+
fill: "none",
|
|
10708
|
+
stroke: "currentColor",
|
|
10709
|
+
strokeWidth: "3",
|
|
10710
|
+
strokeOpacity: "0.25"
|
|
10711
|
+
}), /* @__PURE__ */ l("path", {
|
|
10712
|
+
d: "M21 12a9 9 0 0 0-9-9",
|
|
10713
|
+
fill: "none",
|
|
10714
|
+
stroke: "currentColor",
|
|
10715
|
+
strokeWidth: "3",
|
|
10716
|
+
strokeLinecap: "round"
|
|
10717
|
+
})]
|
|
10718
|
+
});
|
|
10719
|
+
}
|
|
10720
|
+
function Xx({ filled: e, className: t }) {
|
|
10696
10721
|
return /* @__PURE__ */ l("svg", {
|
|
10697
10722
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10698
10723
|
viewBox: "0 0 16 16",
|
|
@@ -10713,7 +10738,7 @@ function Yx({ filled: e, className: t }) {
|
|
|
10713
10738
|
})
|
|
10714
10739
|
});
|
|
10715
10740
|
}
|
|
10716
|
-
function
|
|
10741
|
+
function Zx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o }) {
|
|
10717
10742
|
let [s, c] = e.useState(!1), d = e.useMemo(() => {
|
|
10718
10743
|
if (t.filterOptions) return t.filterOptions;
|
|
10719
10744
|
if (!t.accessorKey) return null;
|
|
@@ -10742,7 +10767,7 @@ function Xx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
|
|
|
10742
10767
|
},
|
|
10743
10768
|
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"),
|
|
10744
10769
|
"aria-label": `Filter ${typeof t.header == "string" ? t.header : t.id}`,
|
|
10745
|
-
children: /* @__PURE__ */ l(
|
|
10770
|
+
children: /* @__PURE__ */ l(Xx, { filled: p })
|
|
10746
10771
|
})
|
|
10747
10772
|
}), /* @__PURE__ */ u(cg, {
|
|
10748
10773
|
align: "start",
|
|
@@ -10779,80 +10804,91 @@ function Xx({ column: t, data: n, value: r, onChange: i, onClear: a, onToggle: o
|
|
|
10779
10804
|
})]
|
|
10780
10805
|
});
|
|
10781
10806
|
}
|
|
10782
|
-
function
|
|
10807
|
+
function Qx({ children: e, className: t, ...n }) {
|
|
10783
10808
|
return /* @__PURE__ */ l("div", {
|
|
10784
10809
|
className: W("flex items-center gap-2", t),
|
|
10785
10810
|
...n,
|
|
10786
10811
|
children: e
|
|
10787
10812
|
});
|
|
10788
10813
|
}
|
|
10789
|
-
|
|
10790
|
-
function
|
|
10791
|
-
return /* @__PURE__ */ l("div", {
|
|
10792
|
-
className:
|
|
10793
|
-
...
|
|
10794
|
-
children:
|
|
10814
|
+
Qx.displayName = "DataTableToolbar";
|
|
10815
|
+
function $x({ image: e, title: t, description: n, action: r, children: i, className: a, ...o }) {
|
|
10816
|
+
return i ? /* @__PURE__ */ l("div", {
|
|
10817
|
+
className: a,
|
|
10818
|
+
...o,
|
|
10819
|
+
children: i
|
|
10820
|
+
}) : /* @__PURE__ */ l(Ax, {
|
|
10821
|
+
icon: typeof e == "string" ? /* @__PURE__ */ l("img", {
|
|
10822
|
+
src: e,
|
|
10823
|
+
alt: "",
|
|
10824
|
+
className: "h-12 w-12 object-contain"
|
|
10825
|
+
}) : e,
|
|
10826
|
+
title: t ?? "No results",
|
|
10827
|
+
description: n,
|
|
10828
|
+
action: r,
|
|
10829
|
+
className: a,
|
|
10830
|
+
...o
|
|
10795
10831
|
});
|
|
10796
10832
|
}
|
|
10797
|
-
|
|
10798
|
-
function
|
|
10799
|
-
let [
|
|
10800
|
-
|
|
10801
|
-
}, [
|
|
10802
|
-
columns:
|
|
10803
|
-
containerRef:
|
|
10833
|
+
$x.displayName = "DataTableEmpty";
|
|
10834
|
+
function eS({ 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, fullHeight: S = !1, className: C, ref: w }) {
|
|
10835
|
+
let [T, E] = e.useState(s ?? null), [D, O] = e.useState(""), [k, A] = e.useState({}), [j, M] = e.useState(1), [N, P] = e.useState(/* @__PURE__ */ new Set()), F = e.useMemo(() => t.filter((e) => !e.hidden), [t]), I = e.useRef(null), ee = e.useCallback((e) => {
|
|
10836
|
+
I.current = e, typeof w == "function" ? w(e) : w && typeof w == "object" && (w.current = e);
|
|
10837
|
+
}, [w]), { hiddenColumnIds: te } = qx({
|
|
10838
|
+
columns: F,
|
|
10839
|
+
containerRef: I,
|
|
10804
10840
|
hasSelectionColumn: y
|
|
10805
|
-
}),
|
|
10806
|
-
columns:
|
|
10841
|
+
}), ne = e.useMemo(() => te.size === 0 ? F : F.filter((e) => !te.has(e.id)), [F, te]), re = e.useRef(null), L = ne.some((e) => e.resizable), { columnWidths: R, resizingColumnId: ie, startResize: ae } = Ux({
|
|
10842
|
+
columns: ne,
|
|
10807
10843
|
hasSelectionColumn: y,
|
|
10808
10844
|
onColumnResize: x,
|
|
10809
|
-
tableRef:
|
|
10810
|
-
}),
|
|
10845
|
+
tableRef: re
|
|
10846
|
+
}), z = e.useRef(o);
|
|
10811
10847
|
e.useLayoutEffect(() => {
|
|
10812
|
-
|
|
10848
|
+
z.current = o;
|
|
10813
10849
|
});
|
|
10814
|
-
let
|
|
10850
|
+
let oe = e.useRef(!1);
|
|
10815
10851
|
e.useEffect(() => {
|
|
10816
|
-
if (!
|
|
10817
|
-
|
|
10852
|
+
if (!oe.current) {
|
|
10853
|
+
oe.current = !0;
|
|
10818
10854
|
return;
|
|
10819
10855
|
}
|
|
10820
|
-
|
|
10821
|
-
sort:
|
|
10822
|
-
globalFilter:
|
|
10823
|
-
columnFilters:
|
|
10824
|
-
page:
|
|
10856
|
+
z.current?.({
|
|
10857
|
+
sort: T,
|
|
10858
|
+
globalFilter: D,
|
|
10859
|
+
columnFilters: k,
|
|
10860
|
+
page: j,
|
|
10825
10861
|
pageSize: p
|
|
10826
10862
|
});
|
|
10827
10863
|
}, [
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10864
|
+
T,
|
|
10865
|
+
D,
|
|
10866
|
+
k,
|
|
10867
|
+
j,
|
|
10832
10868
|
p
|
|
10833
10869
|
]);
|
|
10834
|
-
let
|
|
10835
|
-
|
|
10870
|
+
let B = e.useCallback((e) => {
|
|
10871
|
+
E((t) => !t || t.id !== e ? {
|
|
10836
10872
|
id: e,
|
|
10837
10873
|
desc: !1
|
|
10838
10874
|
} : {
|
|
10839
10875
|
id: e,
|
|
10840
10876
|
desc: !t.desc
|
|
10841
|
-
}),
|
|
10842
|
-
}, []),
|
|
10843
|
-
|
|
10844
|
-
}, []),
|
|
10845
|
-
|
|
10877
|
+
}), M(1);
|
|
10878
|
+
}, []), se = e.useCallback((e) => {
|
|
10879
|
+
O(e), M(1);
|
|
10880
|
+
}, []), ce = e.useCallback((e, t) => {
|
|
10881
|
+
A((n) => ({
|
|
10846
10882
|
...n,
|
|
10847
10883
|
[e]: t
|
|
10848
|
-
})),
|
|
10849
|
-
}, []),
|
|
10850
|
-
|
|
10884
|
+
})), M(1);
|
|
10885
|
+
}, []), le = e.useCallback((e) => {
|
|
10886
|
+
A((t) => {
|
|
10851
10887
|
let n = { ...t };
|
|
10852
10888
|
return delete n[e], n;
|
|
10853
|
-
}),
|
|
10854
|
-
}, []),
|
|
10855
|
-
|
|
10889
|
+
}), M(1);
|
|
10890
|
+
}, []), ue = e.useCallback((e, t) => {
|
|
10891
|
+
A((n) => {
|
|
10856
10892
|
let r = Array.isArray(n[e]) ? n[e] : [], i = r.includes(t) ? r.filter((e) => e !== t) : [...r, t];
|
|
10857
10893
|
if (i.length === 0) {
|
|
10858
10894
|
let { [e]: t, ...r } = n;
|
|
@@ -10862,11 +10898,11 @@ function $x({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10862
10898
|
...n,
|
|
10863
10899
|
[e]: i
|
|
10864
10900
|
};
|
|
10865
|
-
}),
|
|
10866
|
-
}, []),
|
|
10901
|
+
}), M(1);
|
|
10902
|
+
}, []), de = e.useMemo(() => {
|
|
10867
10903
|
let e = [...n];
|
|
10868
|
-
if (!f &&
|
|
10869
|
-
let n =
|
|
10904
|
+
if (!f && D) {
|
|
10905
|
+
let n = D.toLowerCase();
|
|
10870
10906
|
e = e.filter((e) => t.some((t) => {
|
|
10871
10907
|
if (!t.accessorKey) return !1;
|
|
10872
10908
|
let r = e[t.accessorKey];
|
|
@@ -10874,7 +10910,7 @@ function $x({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10874
10910
|
}));
|
|
10875
10911
|
}
|
|
10876
10912
|
if (!f) {
|
|
10877
|
-
let n = Object.entries(
|
|
10913
|
+
let n = Object.entries(k);
|
|
10878
10914
|
for (let [r, i] of n) {
|
|
10879
10915
|
let n = t.find((e) => e.id === r);
|
|
10880
10916
|
n && (e = e.filter((e) => {
|
|
@@ -10885,137 +10921,165 @@ function $x({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10885
10921
|
}));
|
|
10886
10922
|
}
|
|
10887
10923
|
}
|
|
10888
|
-
if (!c &&
|
|
10889
|
-
let n = t.find((e) => e.id ===
|
|
10924
|
+
if (!c && T) {
|
|
10925
|
+
let n = t.find((e) => e.id === T.id);
|
|
10890
10926
|
n && e.sort((e, t) => {
|
|
10891
10927
|
let r;
|
|
10892
|
-
return r = n.sortFn ? n.sortFn(e, t) : n.accessorKey ? String(e[n.accessorKey] ?? "").localeCompare(String(t[n.accessorKey] ?? "")) : 0,
|
|
10928
|
+
return r = n.sortFn ? n.sortFn(e, t) : n.accessorKey ? String(e[n.accessorKey] ?? "").localeCompare(String(t[n.accessorKey] ?? "")) : 0, T.desc ? -r : r;
|
|
10893
10929
|
});
|
|
10894
10930
|
}
|
|
10895
10931
|
return e;
|
|
10896
10932
|
}, [
|
|
10897
10933
|
n,
|
|
10898
10934
|
t,
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10935
|
+
T,
|
|
10936
|
+
D,
|
|
10937
|
+
k,
|
|
10902
10938
|
c,
|
|
10903
10939
|
f
|
|
10904
|
-
]),
|
|
10905
|
-
if (p <= 0 || m) return
|
|
10906
|
-
let e = (
|
|
10907
|
-
return
|
|
10940
|
+
]), fe = m ? a ?? n.length : de.length, pe = p > 0 ? Math.max(1, Math.ceil(fe / p)) : 1, me = e.useMemo(() => {
|
|
10941
|
+
if (p <= 0 || m) return de;
|
|
10942
|
+
let e = (j - 1) * p;
|
|
10943
|
+
return de.slice(e, e + p);
|
|
10908
10944
|
}, [
|
|
10909
|
-
|
|
10910
|
-
|
|
10945
|
+
de,
|
|
10946
|
+
j,
|
|
10911
10947
|
p,
|
|
10912
10948
|
m
|
|
10913
|
-
]),
|
|
10914
|
-
|
|
10915
|
-
}, []),
|
|
10916
|
-
let t =
|
|
10917
|
-
|
|
10949
|
+
]), he = e.useCallback((e) => {
|
|
10950
|
+
M(e);
|
|
10951
|
+
}, []), V = e.useCallback((e) => v ? v(e) : String(e.id ?? ""), [v]), ge = e.useCallback((e) => {
|
|
10952
|
+
let t = V(e);
|
|
10953
|
+
P((e) => {
|
|
10918
10954
|
let r = new Set(e);
|
|
10919
10955
|
r.has(t) ? r.delete(t) : r.add(t);
|
|
10920
|
-
let i = n.filter((e) => r.has(
|
|
10956
|
+
let i = n.filter((e) => r.has(V(e)));
|
|
10921
10957
|
return b?.(i), r;
|
|
10922
10958
|
});
|
|
10923
10959
|
}, [
|
|
10924
10960
|
n,
|
|
10925
|
-
|
|
10961
|
+
V,
|
|
10926
10962
|
b
|
|
10927
|
-
]),
|
|
10928
|
-
|
|
10929
|
-
if (e.size ===
|
|
10930
|
-
let t = new Set(
|
|
10931
|
-
return b?.(
|
|
10963
|
+
]), _e = e.useCallback(() => {
|
|
10964
|
+
P((e) => {
|
|
10965
|
+
if (e.size === me.length) return b?.([]), /* @__PURE__ */ new Set();
|
|
10966
|
+
let t = new Set(me.map((e) => V(e)));
|
|
10967
|
+
return b?.(me), t;
|
|
10932
10968
|
});
|
|
10933
10969
|
}, [
|
|
10934
|
-
|
|
10935
|
-
|
|
10970
|
+
me,
|
|
10971
|
+
V,
|
|
10936
10972
|
b
|
|
10937
|
-
]),
|
|
10973
|
+
]), ve = e.useCallback((e) => N.has(V(e)), [N, V]), ye = null, be = null;
|
|
10938
10974
|
e.Children.forEach(r, (t) => {
|
|
10939
|
-
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ?
|
|
10975
|
+
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ? ye = t : t.type?.displayName === "DataTableEmpty" && (be = t));
|
|
10940
10976
|
});
|
|
10941
|
-
let
|
|
10977
|
+
let xe = (e) => !T || T.id !== e ? "↕" : T.desc ? "↓" : "↑", Se = me.length === 0 && !i, Ce = me.length === 0 && i, we = me.length > 0 && i;
|
|
10942
10978
|
return /* @__PURE__ */ u("div", {
|
|
10943
|
-
ref:
|
|
10944
|
-
className: W("space-y-4",
|
|
10979
|
+
ref: ee,
|
|
10980
|
+
className: W(S ? "flex h-full min-h-0 flex-col gap-4" : "space-y-4", C),
|
|
10945
10981
|
children: [
|
|
10946
|
-
(d ||
|
|
10947
|
-
className: "flex items-center gap-4",
|
|
10982
|
+
(d || ye) && /* @__PURE__ */ u("div", {
|
|
10983
|
+
className: "flex shrink-0 items-center gap-4",
|
|
10948
10984
|
children: [d && /* @__PURE__ */ l(Zt, {
|
|
10949
10985
|
placeholder: "Search...",
|
|
10950
|
-
value:
|
|
10951
|
-
onChange: (e) =>
|
|
10986
|
+
value: D,
|
|
10987
|
+
onChange: (e) => se(e.target.value),
|
|
10952
10988
|
className: "max-w-sm"
|
|
10953
10989
|
}), /* @__PURE__ */ l("div", {
|
|
10954
10990
|
className: "ml-auto flex items-center gap-2",
|
|
10955
|
-
children:
|
|
10991
|
+
children: ye
|
|
10956
10992
|
})]
|
|
10957
10993
|
}),
|
|
10958
10994
|
/* @__PURE__ */ u(Ay, {
|
|
10959
|
-
tableLayout:
|
|
10960
|
-
ref:
|
|
10995
|
+
tableLayout: L ? "fixed" : void 0,
|
|
10996
|
+
ref: re,
|
|
10997
|
+
className: S ? "h-full" : void 0,
|
|
10998
|
+
containerClassName: S ? "flex-1 min-h-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [&_thead_th]:bg-bg-card" : void 0,
|
|
10999
|
+
overlay: we ? /* @__PURE__ */ l("div", {
|
|
11000
|
+
className: "pointer-events-none absolute inset-0 z-20 flex items-start justify-center pt-12",
|
|
11001
|
+
role: "status",
|
|
11002
|
+
"aria-live": "polite",
|
|
11003
|
+
"aria-busy": "true",
|
|
11004
|
+
children: /* @__PURE__ */ u("div", {
|
|
11005
|
+
className: "flex items-center gap-2 rounded-md border border-border bg-bg-card/95 px-3 py-2 shadow-md backdrop-blur-sm",
|
|
11006
|
+
children: [/* @__PURE__ */ l(Yx, {}), /* @__PURE__ */ l("span", {
|
|
11007
|
+
className: "text-sm text-text-secondary",
|
|
11008
|
+
children: "Loading..."
|
|
11009
|
+
})]
|
|
11010
|
+
})
|
|
11011
|
+
}) : void 0,
|
|
10961
11012
|
children: [
|
|
10962
|
-
|
|
10963
|
-
let t =
|
|
11013
|
+
L && /* @__PURE__ */ u("colgroup", { children: [y && /* @__PURE__ */ l("col", { style: { width: 40 } }), ne.map((e) => {
|
|
11014
|
+
let t = R.get(e.id);
|
|
10964
11015
|
return /* @__PURE__ */ l("col", { style: t == null ? void 0 : { width: t } }, e.id);
|
|
10965
11016
|
})] }),
|
|
10966
11017
|
/* @__PURE__ */ l(jy, { children: /* @__PURE__ */ u(Py, { children: [y && /* @__PURE__ */ l(Fy, {
|
|
10967
11018
|
className: "w-10",
|
|
10968
11019
|
children: /* @__PURE__ */ l(Op, {
|
|
10969
|
-
checked:
|
|
10970
|
-
onCheckedChange:
|
|
11020
|
+
checked: me.length > 0 && N.size === me.length,
|
|
11021
|
+
onCheckedChange: _e,
|
|
10971
11022
|
"aria-label": "Select all"
|
|
10972
11023
|
})
|
|
10973
|
-
}),
|
|
10974
|
-
className: W(e.sortable && "cursor-pointer select-none",
|
|
10975
|
-
style: !
|
|
10976
|
-
onClick: e.sortable ? () =>
|
|
11024
|
+
}), ne.map((e) => /* @__PURE__ */ u(Fy, {
|
|
11025
|
+
className: W(e.sortable && "cursor-pointer select-none", L && "relative", e.className),
|
|
11026
|
+
style: !L && e.width ? { width: e.width } : void 0,
|
|
11027
|
+
onClick: e.sortable ? () => B(e.id) : void 0,
|
|
10977
11028
|
children: [/* @__PURE__ */ u("span", {
|
|
10978
11029
|
className: "inline-flex items-center",
|
|
10979
11030
|
children: [
|
|
10980
|
-
typeof e.header == "function" ? e.header(
|
|
11031
|
+
typeof e.header == "function" ? e.header(T?.id === e.id ? T : null) : /* @__PURE__ */ l("span", { children: e.header }),
|
|
10981
11032
|
e.sortable && typeof e.header != "function" && /* @__PURE__ */ l("span", {
|
|
10982
11033
|
"aria-hidden": !0,
|
|
10983
11034
|
className: "ml-1",
|
|
10984
|
-
children:
|
|
11035
|
+
children: xe(e.id)
|
|
10985
11036
|
}),
|
|
10986
|
-
e.filterable && /* @__PURE__ */ l(
|
|
11037
|
+
e.filterable && /* @__PURE__ */ l(Zx, {
|
|
10987
11038
|
column: e,
|
|
10988
11039
|
data: n,
|
|
10989
|
-
value:
|
|
10990
|
-
onChange:
|
|
10991
|
-
onClear:
|
|
10992
|
-
onToggle:
|
|
11040
|
+
value: k[e.id],
|
|
11041
|
+
onChange: ce,
|
|
11042
|
+
onClear: le,
|
|
11043
|
+
onToggle: ue
|
|
10993
11044
|
})
|
|
10994
11045
|
]
|
|
10995
11046
|
}), e.resizable && /* @__PURE__ */ l("div", {
|
|
10996
11047
|
role: "separator",
|
|
10997
11048
|
"aria-orientation": "vertical",
|
|
10998
11049
|
onMouseDown: (t) => {
|
|
10999
|
-
t.preventDefault(), t.stopPropagation(),
|
|
11050
|
+
t.preventDefault(), t.stopPropagation(), ae(e.id, t);
|
|
11000
11051
|
},
|
|
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",
|
|
11052
|
+
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", ie === e.id ? "after:bg-accent" : "after:bg-transparent hover:after:bg-accent/20", "after:transition-colors")
|
|
11002
11053
|
})]
|
|
11003
11054
|
}, e.id))] }) }),
|
|
11004
|
-
/* @__PURE__ */ l(My, { children:
|
|
11005
|
-
colSpan:
|
|
11055
|
+
/* @__PURE__ */ l(My, { children: Ce ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
|
|
11056
|
+
colSpan: ne.length + +!!y,
|
|
11006
11057
|
className: "h-24",
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11058
|
+
role: "status",
|
|
11059
|
+
"aria-live": "polite",
|
|
11060
|
+
"aria-busy": "true",
|
|
11061
|
+
children: /* @__PURE__ */ u("div", {
|
|
11062
|
+
className: "flex items-center justify-center gap-2 text-text-secondary",
|
|
11063
|
+
children: [/* @__PURE__ */ l(Yx, {}), /* @__PURE__ */ l("span", {
|
|
11064
|
+
className: "text-sm",
|
|
11065
|
+
children: "Loading..."
|
|
11066
|
+
})]
|
|
11067
|
+
})
|
|
11068
|
+
}) }) : Se ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
|
|
11069
|
+
colSpan: ne.length + +!!y,
|
|
11070
|
+
className: "h-24",
|
|
11071
|
+
children: be ?? /* @__PURE__ */ l(Ax, { title: "No results" })
|
|
11072
|
+
}) }) : me.map((e, t) => {
|
|
11073
|
+
let n = m ? t : (j - 1) * p + t, r = g?.(e), i = y && /* @__PURE__ */ l(Iy, {
|
|
11010
11074
|
className: "w-10",
|
|
11011
11075
|
onClick: (e) => e.stopPropagation(),
|
|
11012
11076
|
children: /* @__PURE__ */ l(Op, {
|
|
11013
|
-
checked:
|
|
11014
|
-
onCheckedChange: () =>
|
|
11077
|
+
checked: ve(e),
|
|
11078
|
+
onCheckedChange: () => ge(e),
|
|
11015
11079
|
"aria-label": "Select row"
|
|
11016
11080
|
})
|
|
11017
|
-
}), a =
|
|
11018
|
-
className: W(t.className,
|
|
11081
|
+
}), a = ne.map((t) => /* @__PURE__ */ l(Iy, {
|
|
11082
|
+
className: W(t.className, L && "overflow-hidden text-ellipsis"),
|
|
11019
11083
|
children: r ? /* @__PURE__ */ l("a", {
|
|
11020
11084
|
href: r.href,
|
|
11021
11085
|
className: "contents",
|
|
@@ -11025,25 +11089,28 @@ function $x({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
11025
11089
|
return /* @__PURE__ */ u(Py, {
|
|
11026
11090
|
className: W((h || r) && "cursor-pointer", _?.(e, n)),
|
|
11027
11091
|
onClick: h ? () => h(e, n) : void 0,
|
|
11028
|
-
"data-state":
|
|
11092
|
+
"data-state": ve(e) ? "selected" : void 0,
|
|
11029
11093
|
children: [i, a]
|
|
11030
11094
|
}, v ? v(e) : t);
|
|
11031
11095
|
}) })
|
|
11032
11096
|
]
|
|
11033
11097
|
}),
|
|
11034
|
-
p > 0 &&
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11098
|
+
p > 0 && pe > 1 && /* @__PURE__ */ l("div", {
|
|
11099
|
+
className: S ? "shrink-0" : void 0,
|
|
11100
|
+
children: /* @__PURE__ */ l(jx, {
|
|
11101
|
+
page: j,
|
|
11102
|
+
pageSize: p,
|
|
11103
|
+
totalItems: fe,
|
|
11104
|
+
totalPages: pe,
|
|
11105
|
+
onPageChange: he
|
|
11106
|
+
})
|
|
11040
11107
|
})
|
|
11041
11108
|
]
|
|
11042
11109
|
});
|
|
11043
11110
|
}
|
|
11044
11111
|
//#endregion
|
|
11045
11112
|
//#region src/components/Timeline.tsx
|
|
11046
|
-
function
|
|
11113
|
+
function tS({ className: e, children: t, ref: n, ...r }) {
|
|
11047
11114
|
return /* @__PURE__ */ l("div", {
|
|
11048
11115
|
ref: n,
|
|
11049
11116
|
className: W("relative space-y-0", e),
|
|
@@ -11051,20 +11118,20 @@ function eS({ className: e, children: t, ref: n, ...r }) {
|
|
|
11051
11118
|
children: t
|
|
11052
11119
|
});
|
|
11053
11120
|
}
|
|
11054
|
-
var
|
|
11121
|
+
var nS = e.createContext({
|
|
11055
11122
|
expanded: !1,
|
|
11056
11123
|
setExpanded: () => {},
|
|
11057
11124
|
expandable: !1
|
|
11058
|
-
}),
|
|
11125
|
+
}), rS = {
|
|
11059
11126
|
default: "border-border bg-bg-elevated",
|
|
11060
11127
|
success: "border-green bg-green text-white",
|
|
11061
11128
|
danger: "border-red bg-red text-white",
|
|
11062
11129
|
warning: "border-orange bg-orange text-white",
|
|
11063
11130
|
info: "border-accent bg-accent text-white"
|
|
11064
11131
|
};
|
|
11065
|
-
function
|
|
11132
|
+
function iS({ className: t, children: n, icon: r, variant: i = "default", timestamp: a, expandable: o = !1, defaultExpanded: s = !1, ref: c, ...d }) {
|
|
11066
11133
|
let [f, p] = e.useState(s);
|
|
11067
|
-
return /* @__PURE__ */ l(
|
|
11134
|
+
return /* @__PURE__ */ l(nS.Provider, {
|
|
11068
11135
|
value: {
|
|
11069
11136
|
expanded: f,
|
|
11070
11137
|
setExpanded: p,
|
|
@@ -11078,7 +11145,7 @@ function rS({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
11078
11145
|
/* @__PURE__ */ l("div", { className: "absolute left-[0.6875rem] top-6 bottom-0 w-px bg-border last-of-type:hidden" }),
|
|
11079
11146
|
/* @__PURE__ */ l("div", {
|
|
11080
11147
|
"data-timeline-marker": "",
|
|
11081
|
-
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2",
|
|
11148
|
+
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2", rS[i]),
|
|
11082
11149
|
children: r && /* @__PURE__ */ l("span", {
|
|
11083
11150
|
className: "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
|
|
11084
11151
|
children: r
|
|
@@ -11095,8 +11162,8 @@ function rS({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
11095
11162
|
})
|
|
11096
11163
|
});
|
|
11097
11164
|
}
|
|
11098
|
-
function
|
|
11099
|
-
let { expanded: p, setExpanded: m, expandable: h } = e.useContext(
|
|
11165
|
+
function aS({ className: t, title: n, description: r, detail: i, actions: a, onClick: o, renderLink: s, ref: d, ...f }) {
|
|
11166
|
+
let { expanded: p, setExpanded: m, expandable: h } = e.useContext(nS), g = /* @__PURE__ */ l("span", {
|
|
11100
11167
|
className: W("text-sm font-medium text-text-primary", o && "cursor-pointer hover:underline"),
|
|
11101
11168
|
onClick: o,
|
|
11102
11169
|
children: n
|
|
@@ -11129,7 +11196,7 @@ function iS({ className: t, title: n, description: r, detail: i, actions: a, onC
|
|
|
11129
11196
|
})] })]
|
|
11130
11197
|
});
|
|
11131
11198
|
}
|
|
11132
|
-
function
|
|
11199
|
+
function oS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
11133
11200
|
let o = (e) => {
|
|
11134
11201
|
n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
|
|
11135
11202
|
};
|
|
@@ -11146,4 +11213,4 @@ function aS({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
|
11146
11213
|
});
|
|
11147
11214
|
}
|
|
11148
11215
|
//#endregion
|
|
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,
|
|
11216
|
+
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, eS as DataTable, $x as DataTableEmpty, Qx 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, tS as Timeline, aS as TimelineContent, oS as TimelineFilter, iS 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 };
|