@metaphor-cloud/ui 0.8.0 → 0.9.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 +5 -1
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/Table.d.ts +2 -1
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/hooks/use-column-resize.d.ts +23 -0
- package/dist/hooks/use-column-resize.d.ts.map +1 -0
- package/dist/metaphor-ui.css +1 -1
- package/dist/metaphor-ui.js +231 -122
- 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
|
@@ -8999,13 +8999,14 @@ function ky({ className: e, ref: t, ...n }) {
|
|
|
8999
8999
|
}
|
|
9000
9000
|
//#endregion
|
|
9001
9001
|
//#region src/components/Table.tsx
|
|
9002
|
-
function Ay({ className: e, ref: t,
|
|
9002
|
+
function Ay({ className: e, ref: t, tableLayout: n, ...r }) {
|
|
9003
9003
|
return /* @__PURE__ */ l("div", {
|
|
9004
9004
|
className: "relative w-full overflow-auto",
|
|
9005
9005
|
children: /* @__PURE__ */ l("table", {
|
|
9006
9006
|
ref: t,
|
|
9007
9007
|
className: W("w-full caption-bottom text-sm", e),
|
|
9008
|
-
|
|
9008
|
+
style: n ? { tableLayout: n } : void 0,
|
|
9009
|
+
...r
|
|
9009
9010
|
})
|
|
9010
9011
|
});
|
|
9011
9012
|
}
|
|
@@ -10496,39 +10497,125 @@ function Px({ className: e, children: t, ref: n, ...r }) {
|
|
|
10496
10497
|
});
|
|
10497
10498
|
}
|
|
10498
10499
|
//#endregion
|
|
10500
|
+
//#region src/hooks/use-column-resize.ts
|
|
10501
|
+
var Fx = 60;
|
|
10502
|
+
function Ix(e) {
|
|
10503
|
+
if (e == null) return null;
|
|
10504
|
+
let t = e.match(/^(\d+(?:\.\d+)?)px$/);
|
|
10505
|
+
return t?.[1] == null ? null : parseFloat(t[1]);
|
|
10506
|
+
}
|
|
10507
|
+
function Lx({ columns: t, hasSelectionColumn: n, onColumnResize: r, tableRef: i }) {
|
|
10508
|
+
let [a, o] = e.useState(() => {
|
|
10509
|
+
let e = /* @__PURE__ */ new Map();
|
|
10510
|
+
for (let n of t) {
|
|
10511
|
+
let t = Ix(n.width);
|
|
10512
|
+
t != null && e.set(n.id, t);
|
|
10513
|
+
}
|
|
10514
|
+
return e;
|
|
10515
|
+
}), [s, c] = e.useState(!1), [l, u] = e.useState(null), d = e.useRef(null), f = e.useRef(!1);
|
|
10516
|
+
e.useLayoutEffect(() => {
|
|
10517
|
+
if (f.current) return;
|
|
10518
|
+
let e = i.current;
|
|
10519
|
+
if (!e) return;
|
|
10520
|
+
let r = e.querySelectorAll("thead th");
|
|
10521
|
+
if (r.length === 0) return;
|
|
10522
|
+
f.current = !0;
|
|
10523
|
+
let a = +!!n;
|
|
10524
|
+
o((e) => {
|
|
10525
|
+
let n = new Map(e);
|
|
10526
|
+
return t.forEach((e, t) => {
|
|
10527
|
+
if (!e.resizable || n.has(e.id)) return;
|
|
10528
|
+
let i = r[t + a];
|
|
10529
|
+
i && n.set(e.id, i.getBoundingClientRect().width);
|
|
10530
|
+
}), n;
|
|
10531
|
+
});
|
|
10532
|
+
}), e.useEffect(() => {
|
|
10533
|
+
f.current = !1;
|
|
10534
|
+
}, [t]);
|
|
10535
|
+
let p = e.useCallback((e, n) => {
|
|
10536
|
+
let r = t.find((t) => t.id === e);
|
|
10537
|
+
if (!r) return;
|
|
10538
|
+
let i = a.get(e);
|
|
10539
|
+
i != null && (d.current = {
|
|
10540
|
+
columnId: e,
|
|
10541
|
+
startX: n.clientX,
|
|
10542
|
+
startWidth: i,
|
|
10543
|
+
minWidth: r.minWidth ?? Fx,
|
|
10544
|
+
maxWidth: r.maxWidth ?? Infinity
|
|
10545
|
+
}, u(e), c(!0));
|
|
10546
|
+
}, [t, a]);
|
|
10547
|
+
return e.useEffect(() => {
|
|
10548
|
+
if (!s) return;
|
|
10549
|
+
function e(e) {
|
|
10550
|
+
let t = d.current;
|
|
10551
|
+
if (!t) return;
|
|
10552
|
+
let n = e.clientX - t.startX, r = Math.min(t.maxWidth, Math.max(t.minWidth, t.startWidth + n));
|
|
10553
|
+
o((e) => {
|
|
10554
|
+
let n = new Map(e);
|
|
10555
|
+
return n.set(t.columnId, r), n;
|
|
10556
|
+
});
|
|
10557
|
+
}
|
|
10558
|
+
function t() {
|
|
10559
|
+
let e = d.current;
|
|
10560
|
+
if (e) {
|
|
10561
|
+
let t = a.get(e.columnId) ?? e.startWidth;
|
|
10562
|
+
r?.(e.columnId, t);
|
|
10563
|
+
}
|
|
10564
|
+
d.current = null, u(null), c(!1);
|
|
10565
|
+
}
|
|
10566
|
+
return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize", () => {
|
|
10567
|
+
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t), document.body.style.userSelect = "", document.body.style.cursor = "";
|
|
10568
|
+
};
|
|
10569
|
+
}, [
|
|
10570
|
+
s,
|
|
10571
|
+
r,
|
|
10572
|
+
a
|
|
10573
|
+
]), {
|
|
10574
|
+
columnWidths: a,
|
|
10575
|
+
isResizing: s,
|
|
10576
|
+
resizingColumnId: l,
|
|
10577
|
+
startResize: p
|
|
10578
|
+
};
|
|
10579
|
+
}
|
|
10580
|
+
//#endregion
|
|
10499
10581
|
//#region src/components/DataTable.tsx
|
|
10500
|
-
function
|
|
10582
|
+
function Rx({ children: e, className: t, ...n }) {
|
|
10501
10583
|
return /* @__PURE__ */ l("div", {
|
|
10502
10584
|
className: W("flex items-center gap-2", t),
|
|
10503
10585
|
...n,
|
|
10504
10586
|
children: e
|
|
10505
10587
|
});
|
|
10506
10588
|
}
|
|
10507
|
-
|
|
10508
|
-
function
|
|
10589
|
+
Rx.displayName = "DataTableToolbar";
|
|
10590
|
+
function zx({ children: e, className: t, ...n }) {
|
|
10509
10591
|
return /* @__PURE__ */ l("div", {
|
|
10510
10592
|
className: t,
|
|
10511
10593
|
...n,
|
|
10512
10594
|
children: e
|
|
10513
10595
|
});
|
|
10514
10596
|
}
|
|
10515
|
-
|
|
10516
|
-
function
|
|
10517
|
-
let [
|
|
10518
|
-
|
|
10519
|
-
|
|
10597
|
+
zx.displayName = "DataTableEmpty";
|
|
10598
|
+
function Bx({ 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 }) {
|
|
10599
|
+
let [w, T] = e.useState(s ?? null), [E, D] = e.useState(""), [O, k] = e.useState(1), [A, j] = e.useState(/* @__PURE__ */ new Set()), M = e.useMemo(() => t.filter((e) => !e.hidden), [t]), N = e.useRef(null), P = M.some((e) => e.resizable), { columnWidths: F, resizingColumnId: I, startResize: ee } = Lx({
|
|
10600
|
+
columns: M,
|
|
10601
|
+
hasSelectionColumn: y,
|
|
10602
|
+
onColumnResize: x,
|
|
10603
|
+
tableRef: N
|
|
10604
|
+
}), te = e.useMemo(() => ({
|
|
10605
|
+
sort: w,
|
|
10606
|
+
globalFilter: E,
|
|
10520
10607
|
columnFilters: {},
|
|
10521
|
-
page:
|
|
10608
|
+
page: O,
|
|
10522
10609
|
pageSize: p
|
|
10523
10610
|
}), [
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10611
|
+
w,
|
|
10612
|
+
E,
|
|
10613
|
+
O,
|
|
10527
10614
|
p
|
|
10528
|
-
]),
|
|
10615
|
+
]), ne = e.useCallback((e) => {
|
|
10529
10616
|
o?.(e);
|
|
10530
|
-
}, [o]),
|
|
10531
|
-
|
|
10617
|
+
}, [o]), re = e.useCallback((e) => {
|
|
10618
|
+
T((t) => {
|
|
10532
10619
|
let n;
|
|
10533
10620
|
return n = !t || t.id !== e ? {
|
|
10534
10621
|
id: e,
|
|
@@ -10536,161 +10623,183 @@ function Lx({ columns: t, data: n, children: r, loading: i, totalRows: a, onStat
|
|
|
10536
10623
|
} : t.desc ? null : {
|
|
10537
10624
|
id: e,
|
|
10538
10625
|
desc: !0
|
|
10539
|
-
},
|
|
10540
|
-
...
|
|
10626
|
+
}, ne({
|
|
10627
|
+
...te,
|
|
10541
10628
|
sort: n,
|
|
10542
10629
|
page: 1
|
|
10543
10630
|
}), n;
|
|
10544
|
-
}), c ||
|
|
10631
|
+
}), c || k(1);
|
|
10545
10632
|
}, [
|
|
10546
|
-
|
|
10547
|
-
|
|
10633
|
+
te,
|
|
10634
|
+
ne,
|
|
10548
10635
|
c
|
|
10549
|
-
]),
|
|
10550
|
-
|
|
10551
|
-
...
|
|
10636
|
+
]), L = e.useCallback((e) => {
|
|
10637
|
+
D(e), k(1), ne({
|
|
10638
|
+
...te,
|
|
10552
10639
|
globalFilter: e,
|
|
10553
10640
|
page: 1
|
|
10554
10641
|
});
|
|
10555
|
-
}, [
|
|
10642
|
+
}, [te, ne]), R = e.useMemo(() => {
|
|
10556
10643
|
let e = [...n];
|
|
10557
|
-
if (!f &&
|
|
10558
|
-
let n =
|
|
10644
|
+
if (!f && E) {
|
|
10645
|
+
let n = E.toLowerCase();
|
|
10559
10646
|
e = e.filter((e) => t.some((t) => {
|
|
10560
10647
|
if (!t.accessorKey) return !1;
|
|
10561
10648
|
let r = e[t.accessorKey];
|
|
10562
10649
|
return r != null && String(r).toLowerCase().includes(n);
|
|
10563
10650
|
}));
|
|
10564
10651
|
}
|
|
10565
|
-
if (!c &&
|
|
10566
|
-
let n = t.find((e) => e.id ===
|
|
10652
|
+
if (!c && w) {
|
|
10653
|
+
let n = t.find((e) => e.id === w.id);
|
|
10567
10654
|
n && e.sort((e, t) => {
|
|
10568
10655
|
let r;
|
|
10569
|
-
return r = n.sortFn ? n.sortFn(e, t) : n.accessorKey ? String(e[n.accessorKey] ?? "").localeCompare(String(t[n.accessorKey] ?? "")) : 0,
|
|
10656
|
+
return r = n.sortFn ? n.sortFn(e, t) : n.accessorKey ? String(e[n.accessorKey] ?? "").localeCompare(String(t[n.accessorKey] ?? "")) : 0, w.desc ? -r : r;
|
|
10570
10657
|
});
|
|
10571
10658
|
}
|
|
10572
10659
|
return e;
|
|
10573
10660
|
}, [
|
|
10574
10661
|
n,
|
|
10575
10662
|
t,
|
|
10576
|
-
|
|
10577
|
-
|
|
10663
|
+
w,
|
|
10664
|
+
E,
|
|
10578
10665
|
c,
|
|
10579
10666
|
f
|
|
10580
|
-
]),
|
|
10581
|
-
if (p <= 0 || m) return
|
|
10582
|
-
let e = (
|
|
10583
|
-
return
|
|
10667
|
+
]), ie = m ? a ?? n.length : R.length, ae = p > 0 ? Math.max(1, Math.ceil(ie / p)) : 1, z = e.useMemo(() => {
|
|
10668
|
+
if (p <= 0 || m) return R;
|
|
10669
|
+
let e = (O - 1) * p;
|
|
10670
|
+
return R.slice(e, e + p);
|
|
10584
10671
|
}, [
|
|
10585
|
-
|
|
10586
|
-
|
|
10672
|
+
R,
|
|
10673
|
+
O,
|
|
10587
10674
|
p,
|
|
10588
10675
|
m
|
|
10589
|
-
]),
|
|
10590
|
-
|
|
10591
|
-
...
|
|
10676
|
+
]), oe = e.useCallback((e) => {
|
|
10677
|
+
k(e), ne({
|
|
10678
|
+
...te,
|
|
10592
10679
|
page: e
|
|
10593
10680
|
});
|
|
10594
|
-
}, [
|
|
10595
|
-
let t =
|
|
10596
|
-
|
|
10681
|
+
}, [te, ne]), B = e.useCallback((e) => v ? v(e) : String(e.id ?? ""), [v]), se = e.useCallback((e) => {
|
|
10682
|
+
let t = B(e);
|
|
10683
|
+
j((e) => {
|
|
10597
10684
|
let r = new Set(e);
|
|
10598
10685
|
r.has(t) ? r.delete(t) : r.add(t);
|
|
10599
|
-
let i = n.filter((e) => r.has(
|
|
10686
|
+
let i = n.filter((e) => r.has(B(e)));
|
|
10600
10687
|
return b?.(i), r;
|
|
10601
10688
|
});
|
|
10602
10689
|
}, [
|
|
10603
10690
|
n,
|
|
10604
|
-
|
|
10691
|
+
B,
|
|
10605
10692
|
b
|
|
10606
|
-
]),
|
|
10607
|
-
|
|
10608
|
-
if (e.size ===
|
|
10609
|
-
let t = new Set(
|
|
10610
|
-
return b?.(
|
|
10693
|
+
]), ce = e.useCallback(() => {
|
|
10694
|
+
j((e) => {
|
|
10695
|
+
if (e.size === z.length) return b?.([]), /* @__PURE__ */ new Set();
|
|
10696
|
+
let t = new Set(z.map((e) => B(e)));
|
|
10697
|
+
return b?.(z), t;
|
|
10611
10698
|
});
|
|
10612
10699
|
}, [
|
|
10613
|
-
|
|
10614
|
-
|
|
10700
|
+
z,
|
|
10701
|
+
B,
|
|
10615
10702
|
b
|
|
10616
|
-
]),
|
|
10703
|
+
]), le = e.useCallback((e) => A.has(B(e)), [A, B]), ue = null, de = null;
|
|
10617
10704
|
e.Children.forEach(r, (t) => {
|
|
10618
|
-
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ?
|
|
10705
|
+
e.isValidElement(t) && (t.type?.displayName === "DataTableToolbar" ? ue = t : t.type?.displayName === "DataTableEmpty" && (de = t));
|
|
10619
10706
|
});
|
|
10620
|
-
let
|
|
10707
|
+
let fe = (e) => !w || w.id !== e ? "↕" : w.desc ? "↓" : "↑", pe = z.length === 0 && !i;
|
|
10621
10708
|
return /* @__PURE__ */ u("div", {
|
|
10622
|
-
ref:
|
|
10623
|
-
className: W("space-y-4",
|
|
10709
|
+
ref: C,
|
|
10710
|
+
className: W("space-y-4", S),
|
|
10624
10711
|
children: [
|
|
10625
|
-
(d ||
|
|
10712
|
+
(d || ue) && /* @__PURE__ */ u("div", {
|
|
10626
10713
|
className: "flex items-center gap-4",
|
|
10627
10714
|
children: [d && /* @__PURE__ */ l(Zt, {
|
|
10628
10715
|
placeholder: "Search...",
|
|
10629
|
-
value:
|
|
10630
|
-
onChange: (e) =>
|
|
10716
|
+
value: E,
|
|
10717
|
+
onChange: (e) => L(e.target.value),
|
|
10631
10718
|
className: "max-w-sm"
|
|
10632
10719
|
}), /* @__PURE__ */ l("div", {
|
|
10633
10720
|
className: "ml-auto flex items-center gap-2",
|
|
10634
|
-
children:
|
|
10721
|
+
children: ue
|
|
10635
10722
|
})]
|
|
10636
10723
|
}),
|
|
10637
|
-
/* @__PURE__ */ u(Ay, {
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
})
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10724
|
+
/* @__PURE__ */ u(Ay, {
|
|
10725
|
+
tableLayout: P ? "fixed" : void 0,
|
|
10726
|
+
ref: N,
|
|
10727
|
+
children: [
|
|
10728
|
+
P && /* @__PURE__ */ u("colgroup", { children: [y && /* @__PURE__ */ l("col", { style: { width: 40 } }), M.map((e) => {
|
|
10729
|
+
let t = F.get(e.id);
|
|
10730
|
+
return /* @__PURE__ */ l("col", { style: t == null ? void 0 : { width: t } }, e.id);
|
|
10731
|
+
})] }),
|
|
10732
|
+
/* @__PURE__ */ l(jy, { children: /* @__PURE__ */ u(Py, { children: [y && /* @__PURE__ */ l(Fy, {
|
|
10733
|
+
className: "w-10",
|
|
10734
|
+
children: /* @__PURE__ */ l(Op, {
|
|
10735
|
+
checked: z.length > 0 && A.size === z.length,
|
|
10736
|
+
onCheckedChange: ce,
|
|
10737
|
+
"aria-label": "Select all"
|
|
10738
|
+
})
|
|
10739
|
+
}), M.map((e) => /* @__PURE__ */ u(Fy, {
|
|
10740
|
+
className: W(e.sortable && "cursor-pointer select-none", P && "relative", e.className),
|
|
10741
|
+
style: !P && e.width ? { width: e.width } : void 0,
|
|
10742
|
+
onClick: e.sortable ? () => re(e.id) : void 0,
|
|
10743
|
+
children: [
|
|
10744
|
+
typeof e.header == "function" ? e.header(w?.id === e.id ? w : null) : /* @__PURE__ */ l("span", { children: e.header }),
|
|
10745
|
+
e.sortable && typeof e.header != "function" && /* @__PURE__ */ l("span", {
|
|
10746
|
+
"aria-hidden": !0,
|
|
10747
|
+
className: "ml-1",
|
|
10748
|
+
children: fe(e.id)
|
|
10749
|
+
}),
|
|
10750
|
+
e.resizable && /* @__PURE__ */ l("div", {
|
|
10751
|
+
role: "separator",
|
|
10752
|
+
"aria-orientation": "vertical",
|
|
10753
|
+
onMouseDown: (t) => {
|
|
10754
|
+
t.preventDefault(), t.stopPropagation(), ee(e.id, t);
|
|
10755
|
+
},
|
|
10756
|
+
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", I === e.id ? "after:bg-accent" : "after:bg-transparent hover:after:bg-accent/20", "after:transition-colors")
|
|
10757
|
+
})
|
|
10758
|
+
]
|
|
10759
|
+
}, e.id))] }) }),
|
|
10760
|
+
/* @__PURE__ */ l(My, { children: pe ? /* @__PURE__ */ l(Py, { children: /* @__PURE__ */ l(Iy, {
|
|
10761
|
+
colSpan: M.length + +!!y,
|
|
10762
|
+
className: "h-24",
|
|
10763
|
+
children: de ?? /* @__PURE__ */ l(wx, { title: "No results" })
|
|
10764
|
+
}) }) : z.map((e, t) => {
|
|
10765
|
+
let n = m ? t : (O - 1) * p + t, r = g?.(e), i = y && /* @__PURE__ */ l(Iy, {
|
|
10766
|
+
className: "w-10",
|
|
10767
|
+
onClick: (e) => e.stopPropagation(),
|
|
10768
|
+
children: /* @__PURE__ */ l(Op, {
|
|
10769
|
+
checked: le(e),
|
|
10770
|
+
onCheckedChange: () => se(e),
|
|
10771
|
+
"aria-label": "Select row"
|
|
10772
|
+
})
|
|
10773
|
+
}), a = M.map((t) => /* @__PURE__ */ l(Iy, {
|
|
10774
|
+
className: W(t.className, P && "overflow-hidden text-ellipsis"),
|
|
10775
|
+
children: r ? /* @__PURE__ */ l("a", {
|
|
10776
|
+
href: r.href,
|
|
10777
|
+
className: "contents",
|
|
10778
|
+
children: t.cell(e, n)
|
|
10779
|
+
}) : t.cell(e, n)
|
|
10780
|
+
}, t.id));
|
|
10781
|
+
return /* @__PURE__ */ u(Py, {
|
|
10782
|
+
className: W((h || r) && "cursor-pointer", _?.(e, n)),
|
|
10783
|
+
onClick: h ? () => h(e, n) : void 0,
|
|
10784
|
+
"data-state": le(e) ? "selected" : void 0,
|
|
10785
|
+
children: [i, a]
|
|
10786
|
+
}, v ? v(e) : t);
|
|
10787
|
+
}) })
|
|
10788
|
+
]
|
|
10789
|
+
}),
|
|
10790
|
+
p > 0 && ae > 1 && /* @__PURE__ */ l(Tx, {
|
|
10791
|
+
page: O,
|
|
10683
10792
|
pageSize: p,
|
|
10684
|
-
totalItems:
|
|
10685
|
-
totalPages:
|
|
10686
|
-
onPageChange:
|
|
10793
|
+
totalItems: ie,
|
|
10794
|
+
totalPages: ae,
|
|
10795
|
+
onPageChange: oe
|
|
10687
10796
|
})
|
|
10688
10797
|
]
|
|
10689
10798
|
});
|
|
10690
10799
|
}
|
|
10691
10800
|
//#endregion
|
|
10692
10801
|
//#region src/components/Timeline.tsx
|
|
10693
|
-
function
|
|
10802
|
+
function Vx({ className: e, children: t, ref: n, ...r }) {
|
|
10694
10803
|
return /* @__PURE__ */ l("div", {
|
|
10695
10804
|
ref: n,
|
|
10696
10805
|
className: W("relative space-y-0", e),
|
|
@@ -10698,20 +10807,20 @@ function Rx({ className: e, children: t, ref: n, ...r }) {
|
|
|
10698
10807
|
children: t
|
|
10699
10808
|
});
|
|
10700
10809
|
}
|
|
10701
|
-
var
|
|
10810
|
+
var Hx = e.createContext({
|
|
10702
10811
|
expanded: !1,
|
|
10703
10812
|
setExpanded: () => {},
|
|
10704
10813
|
expandable: !1
|
|
10705
|
-
}),
|
|
10814
|
+
}), Ux = {
|
|
10706
10815
|
default: "border-border bg-bg-elevated",
|
|
10707
10816
|
success: "border-green bg-green text-white",
|
|
10708
10817
|
danger: "border-red bg-red text-white",
|
|
10709
10818
|
warning: "border-orange bg-orange text-white",
|
|
10710
10819
|
info: "border-accent bg-accent text-white"
|
|
10711
10820
|
};
|
|
10712
|
-
function
|
|
10821
|
+
function Wx({ className: t, children: n, icon: r, variant: i = "default", timestamp: a, expandable: o = !1, defaultExpanded: s = !1, ref: c, ...d }) {
|
|
10713
10822
|
let [f, p] = e.useState(s);
|
|
10714
|
-
return /* @__PURE__ */ l(
|
|
10823
|
+
return /* @__PURE__ */ l(Hx.Provider, {
|
|
10715
10824
|
value: {
|
|
10716
10825
|
expanded: f,
|
|
10717
10826
|
setExpanded: p,
|
|
@@ -10725,7 +10834,7 @@ function Vx({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
10725
10834
|
/* @__PURE__ */ l("div", { className: "absolute left-[0.6875rem] top-6 bottom-0 w-px bg-border last-of-type:hidden" }),
|
|
10726
10835
|
/* @__PURE__ */ l("div", {
|
|
10727
10836
|
"data-timeline-marker": "",
|
|
10728
|
-
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2",
|
|
10837
|
+
className: W("relative z-10 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2", Ux[i]),
|
|
10729
10838
|
children: r && /* @__PURE__ */ l("span", {
|
|
10730
10839
|
className: "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
|
|
10731
10840
|
children: r
|
|
@@ -10742,8 +10851,8 @@ function Vx({ className: t, children: n, icon: r, variant: i = "default", timest
|
|
|
10742
10851
|
})
|
|
10743
10852
|
});
|
|
10744
10853
|
}
|
|
10745
|
-
function
|
|
10746
|
-
let { expanded: p, setExpanded: m, expandable: h } = e.useContext(
|
|
10854
|
+
function Gx({ className: t, title: n, description: r, detail: i, actions: a, onClick: o, renderLink: s, ref: d, ...f }) {
|
|
10855
|
+
let { expanded: p, setExpanded: m, expandable: h } = e.useContext(Hx), g = /* @__PURE__ */ l("span", {
|
|
10747
10856
|
className: W("text-sm font-medium text-text-primary", o && "cursor-pointer hover:underline"),
|
|
10748
10857
|
onClick: o,
|
|
10749
10858
|
children: n
|
|
@@ -10776,7 +10885,7 @@ function Hx({ className: t, title: n, description: r, detail: i, actions: a, onC
|
|
|
10776
10885
|
})] })]
|
|
10777
10886
|
});
|
|
10778
10887
|
}
|
|
10779
|
-
function
|
|
10888
|
+
function Kx({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
10780
10889
|
let o = (e) => {
|
|
10781
10890
|
n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
|
|
10782
10891
|
};
|
|
@@ -10793,4 +10902,4 @@ function Ux({ className: e, filters: t, value: n, onChange: r, ref: i, ...a }) {
|
|
|
10793
10902
|
});
|
|
10794
10903
|
}
|
|
10795
10904
|
//#endregion
|
|
10796
|
-
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, Zb as AnimatedCounter, Ax as AppShell, Px as AppShellFooter, Nx as AppShellMain, Mx as AppShellNav, jx as AppShellSidebar, on as Badge, px 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, Gb as Combobox, Jb as ComboboxContent, Xb as ComboboxEmpty, qb as ComboboxInput, Yb as ComboboxItem, Kb as ComboboxTrigger,
|
|
10905
|
+
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, Zb as AnimatedCounter, Ax as AppShell, Px as AppShellFooter, Nx as AppShellMain, Mx as AppShellNav, jx as AppShellSidebar, on as Badge, px 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, Gb as Combobox, Jb as ComboboxContent, Xb as ComboboxEmpty, qb as ComboboxInput, Yb as ComboboxItem, Kb as ComboboxTrigger, Bx as DataTable, zx as DataTableEmpty, Rx 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, wx as EmptyState, Zt as Input, rn as Label, cx as MetaHead, ax as Nav, Cx as PageHeader, Tx 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, _x as Sidebar, yx as SidebarContent, bx as SidebarFooter, xx as SidebarGroup, vx as SidebarHeader, Sx as SidebarItem, ky as Skeleton, Dx as StatCard, ux 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, Vx as Timeline, Gx as TimelineContent, Kx as TimelineFilter, Wx 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, sn as alertVariants, an as badgeVariants, Ut as buttonVariants, W as cn, Ze as createOgImageUrl, vt as dismissAll, _t as toast, xm as toggleVariants, Ct as useAlternateLinks, kx as useAppShell, xt as useCanonical, Wb as useComboboxContext, ot as useMobile, st as useScrollNav, it as useTheme, Et as useThemeContext, yt as useToast };
|