@opencxh/ui-kit 3.132.0 → 3.134.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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +201 -199
- package/dist/index.js.map +1 -1
- package/dist/src/content/Table.d.ts +12 -0
- package/dist/src/forms/Form.d.ts +24 -5
- package/dist/src/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx as We } from "clsx";
|
|
2
2
|
import { jsxs as c, jsx as e, Fragment as xe } from "react/jsx-runtime";
|
|
3
3
|
import { VideoOff as Ke, User as Ge, MicOff as Je, Mic as Ye, X as we, ChevronDown as ge, ExternalLink as Xe, Calendar as Ze, ChevronLeft as ke, ChevronRight as Ce, ChevronDownIcon as Qe, Loader2 as et, Search as Se, Check as Te, ChevronUp as tt, ChevronsLeft as rt, ChevronsRight as nt, FileText as Ee, HardDrive as _e, ArrowLeft as st, FolderPlus as at, Upload as lt, Folder as Ae, Trash2 as ot, Plus as ct, Sparkles as it, ImageOff as dt, Pencil as ut, ArrowUpRight as mt } from "lucide-react";
|
|
4
|
-
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as
|
|
4
|
+
import oe, { useRef as se, useEffect as Q, forwardRef as me, useState as B, useLayoutEffect as ft, useMemo as he, useCallback as ue, createContext as ht, Component as xt } from "react";
|
|
5
5
|
import bt from "dompurify";
|
|
6
6
|
import pt from "react-markdown";
|
|
7
7
|
import gt from "remark-gfm";
|
|
@@ -398,7 +398,7 @@ function dn({
|
|
|
398
398
|
);
|
|
399
399
|
}
|
|
400
400
|
function ze(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
401
|
-
const [o, l] =
|
|
401
|
+
const [o, l] = B({});
|
|
402
402
|
return ft(() => {
|
|
403
403
|
if (!t) return;
|
|
404
404
|
const u = () => {
|
|
@@ -422,7 +422,7 @@ const $t = ({
|
|
|
422
422
|
disabled: l = !1,
|
|
423
423
|
triggerLabel: u
|
|
424
424
|
}) => {
|
|
425
|
-
const [m, y] =
|
|
425
|
+
const [m, y] = B(!1), h = se(null), f = se(null), x = ze(m, f, { placement: n });
|
|
426
426
|
Q(() => {
|
|
427
427
|
if (!m) return;
|
|
428
428
|
const g = (A) => {
|
|
@@ -477,7 +477,7 @@ const $t = ({
|
|
|
477
477
|
sm: "h-control-sm w-7",
|
|
478
478
|
md: "h-control-md w-8"
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function Be({
|
|
481
481
|
label: t,
|
|
482
482
|
onClick: r,
|
|
483
483
|
variant: n = "primary",
|
|
@@ -643,7 +643,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
643
643
|
format: y = "MM/dd/yyyy",
|
|
644
644
|
withTime: h = !1
|
|
645
645
|
}, f) => {
|
|
646
|
-
const [x, p] =
|
|
646
|
+
const [x, p] = B(!1), [w, g] = B(() => t || /* @__PURE__ */ new Date()), b = se(null), A = se(null), _ = ze(x, A);
|
|
647
647
|
Q(() => {
|
|
648
648
|
const i = (S) => {
|
|
649
649
|
b.current && !b.current.contains(S.target) && p(!1);
|
|
@@ -857,9 +857,9 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
857
857
|
[]
|
|
858
858
|
), N = oe.useCallback(
|
|
859
859
|
(E, D) => {
|
|
860
|
-
const z = [...E], R = (
|
|
861
|
-
const
|
|
862
|
-
|
|
860
|
+
const z = [...E], R = (F) => {
|
|
861
|
+
const H = (F ?? "").trim();
|
|
862
|
+
H && (S(z, H) || z.push({ value: H, label: H }));
|
|
863
863
|
};
|
|
864
864
|
return Array.isArray(D) ? D.forEach(R) : R(D), z;
|
|
865
865
|
},
|
|
@@ -1043,7 +1043,7 @@ const It = () => /* @__PURE__ */ e(Y, { icon: Ze, size: "md", color: "current" }
|
|
|
1043
1043
|
}
|
|
1044
1044
|
);
|
|
1045
1045
|
Ne.displayName = "Select";
|
|
1046
|
-
const
|
|
1046
|
+
const Ft = {
|
|
1047
1047
|
sm: "h-control-sm px-3 text-sm",
|
|
1048
1048
|
md: "h-control-md px-3 text-base",
|
|
1049
1049
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1093,7 +1093,7 @@ const Bt = {
|
|
|
1093
1093
|
"placeholder:text-text-subtle",
|
|
1094
1094
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
1095
1095
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1096
|
-
|
|
1096
|
+
Ft[s],
|
|
1097
1097
|
o && "pl-9",
|
|
1098
1098
|
(l || u) && "pr-9",
|
|
1099
1099
|
b ? "border-danger-border bg-danger-soft" : "border-border hover:border-border-strong",
|
|
@@ -1122,7 +1122,7 @@ const Bt = {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
);
|
|
1124
1124
|
be.displayName = "TextField";
|
|
1125
|
-
function
|
|
1125
|
+
function Bt({
|
|
1126
1126
|
value: t,
|
|
1127
1127
|
onChange: r,
|
|
1128
1128
|
onListFolders: n,
|
|
@@ -1132,7 +1132,7 @@ function Ft({
|
|
|
1132
1132
|
templatePlaceholder: l,
|
|
1133
1133
|
showTemplate: u = !0
|
|
1134
1134
|
}) {
|
|
1135
|
-
const [m, y] =
|
|
1135
|
+
const [m, y] = B([]);
|
|
1136
1136
|
Q(() => {
|
|
1137
1137
|
let f = !0;
|
|
1138
1138
|
return Promise.resolve(n?.()).then((x) => {
|
|
@@ -1167,7 +1167,7 @@ function Ft({
|
|
|
1167
1167
|
)
|
|
1168
1168
|
] });
|
|
1169
1169
|
}
|
|
1170
|
-
const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }),
|
|
1170
|
+
const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Ht = (t) => /* @__PURE__ */ e(ge, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Vt = {
|
|
1171
1171
|
sm: "h-control-sm px-3 text-sm",
|
|
1172
1172
|
md: "h-control-md px-3 text-base",
|
|
1173
1173
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -1199,7 +1199,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1199
1199
|
onChange: A,
|
|
1200
1200
|
..._
|
|
1201
1201
|
}, K) => {
|
|
1202
|
-
const $ = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, W] =
|
|
1202
|
+
const $ = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, X = !!n, U = se(null), I = se(null), [q, W] = B(b || ""), [re, P] = B(!1), [ce, C] = B(!1), [i, S] = B(!1);
|
|
1203
1203
|
Q(() => {
|
|
1204
1204
|
b !== void 0 && W(b);
|
|
1205
1205
|
}, [b]);
|
|
@@ -1281,7 +1281,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1281
1281
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
1282
1282
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
1283
1283
|
// Size styles
|
|
1284
|
-
|
|
1284
|
+
Vt[s],
|
|
1285
1285
|
// Icon padding
|
|
1286
1286
|
o ? "pl-10" : "",
|
|
1287
1287
|
"pr-10",
|
|
@@ -1305,7 +1305,7 @@ const fe = (...t) => t.filter(Boolean).join(" "), Rt = (t) => /* @__PURE__ */ e(
|
|
|
1305
1305
|
) : (
|
|
1306
1306
|
// Dropdown Chevron
|
|
1307
1307
|
/* @__PURE__ */ e(
|
|
1308
|
-
|
|
1308
|
+
Ht,
|
|
1309
1309
|
{
|
|
1310
1310
|
className: fe(
|
|
1311
1311
|
"text-text-muted cursor-pointer transition-transform",
|
|
@@ -1471,7 +1471,7 @@ const Kt = ({
|
|
|
1471
1471
|
showCheck: u = !0,
|
|
1472
1472
|
header: m
|
|
1473
1473
|
}) => {
|
|
1474
|
-
const [y, h] =
|
|
1474
|
+
const [y, h] = B(!1), [f, x] = B(null), [p, w] = B({ top: 0, left: 0 }), g = se(null), b = se(null), A = se(null), _ = se(null), K = ze(y, b, { placement: a }), $ = se(null), X = () => Array.from(
|
|
1475
1475
|
_.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
|
|
1476
1476
|
);
|
|
1477
1477
|
Q(() => {
|
|
@@ -1679,7 +1679,7 @@ const Kt = ({
|
|
|
1679
1679
|
]
|
|
1680
1680
|
}
|
|
1681
1681
|
);
|
|
1682
|
-
}, Le = {
|
|
1682
|
+
}, un = (t) => (r) => t(r instanceof Date ? r : null), mn = (t) => (r) => t(typeof r == "string" ? r : ""), Le = {
|
|
1683
1683
|
none: "pl-0",
|
|
1684
1684
|
sm: "pl-2",
|
|
1685
1685
|
md: "pl-4",
|
|
@@ -1689,7 +1689,7 @@ const Kt = ({
|
|
|
1689
1689
|
sm: "pr-2",
|
|
1690
1690
|
md: "pr-4",
|
|
1691
1691
|
lg: "pr-6"
|
|
1692
|
-
}, Gt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Jt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: tt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ge, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Zt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: rt, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }),
|
|
1692
|
+
}, Gt = () => /* @__PURE__ */ e(Y, { icon: Se, size: "md", color: "current" }), Jt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: tt, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Yt = ({ active: t }) => /* @__PURE__ */ e(Y, { icon: ge, size: "sm", className: t ? "text-text" : "text-text-subtle" }), Xt = () => /* @__PURE__ */ e(Y, { icon: ke, size: "md", color: "current" }), Zt = () => /* @__PURE__ */ e(Y, { icon: Ce, size: "md", color: "current" }), Qt = () => /* @__PURE__ */ e(Y, { icon: rt, size: "md", color: "current" }), er = () => /* @__PURE__ */ e(Y, { icon: nt, size: "md", color: "current" }), He = () => /* @__PURE__ */ e(Y, { icon: ge, size: "md", color: "current" }), tr = (t) => {
|
|
1693
1693
|
const r = (s) => t.multiSelect && Array.isArray(t.value) ? t.value?.includes(s) : t.value === s, n = (s) => {
|
|
1694
1694
|
t.multiSelect && Array.isArray(t.value) ? t.onChange(t.value.filter((a) => a !== s)) : t.onChange(s);
|
|
1695
1695
|
};
|
|
@@ -1708,7 +1708,7 @@ const Kt = ({
|
|
|
1708
1708
|
/* @__PURE__ */ e("span", { className: "text-text", children: t.multiSelect && Array.isArray(t.value) ? t.value?.map(
|
|
1709
1709
|
(s) => t.options?.find((a) => a.value === s)?.label
|
|
1710
1710
|
).join(", ") : t.options?.find((s) => s.value === t.value)?.label }),
|
|
1711
|
-
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(
|
|
1711
|
+
/* @__PURE__ */ e("span", { className: "text-text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(He, {}) })
|
|
1712
1712
|
] }),
|
|
1713
1713
|
/* @__PURE__ */ c("div", { className: "absolute z-10 left-0 mt-1 bg-surface border border-border rounded-lg shadow-overlay p-2 w-48", children: [
|
|
1714
1714
|
t.options?.map((s) => /* @__PURE__ */ e(
|
|
@@ -1761,57 +1761,57 @@ const Kt = ({
|
|
|
1761
1761
|
rowClassName: X,
|
|
1762
1762
|
headerBackground: U = !0
|
|
1763
1763
|
}) => {
|
|
1764
|
-
const [I, q] =
|
|
1764
|
+
const [I, q] = B(""), [W, re] = B({
|
|
1765
1765
|
column: null,
|
|
1766
1766
|
direction: null
|
|
1767
|
-
}), [P, ce] =
|
|
1767
|
+
}), [P, ce] = B({
|
|
1768
1768
|
page: 0,
|
|
1769
1769
|
pageSize: m
|
|
1770
1770
|
}), C = se(null), i = he(() => {
|
|
1771
1771
|
let v = t;
|
|
1772
1772
|
if (s && I.trim()) {
|
|
1773
|
-
const
|
|
1773
|
+
const V = r.filter(
|
|
1774
1774
|
(J) => J.searchable !== !1
|
|
1775
1775
|
), Z = I.toLowerCase();
|
|
1776
|
-
v = v.filter((J) =>
|
|
1776
|
+
v = v.filter((J) => V.some((O) => {
|
|
1777
1777
|
const ie = typeof O.accessor == "function" ? O.accessor(J) : J[O.accessor];
|
|
1778
1778
|
return String(ie || "").toLowerCase().includes(Z);
|
|
1779
1779
|
}));
|
|
1780
1780
|
}
|
|
1781
|
-
return o.forEach((
|
|
1782
|
-
|
|
1783
|
-
const J = r.find((ie) => ie.id ===
|
|
1781
|
+
return o.forEach((V) => {
|
|
1782
|
+
V.value && V.value !== "all" && (v = v.filter((Z) => {
|
|
1783
|
+
const J = r.find((ie) => ie.id === V.id);
|
|
1784
1784
|
if (!J) return !0;
|
|
1785
1785
|
const O = typeof J.accessor == "function" ? J.accessor(Z) : Z[J.accessor];
|
|
1786
|
-
return String(O || "") ===
|
|
1786
|
+
return String(O || "") === V.value;
|
|
1787
1787
|
}));
|
|
1788
1788
|
}), v;
|
|
1789
1789
|
}, [t, I, r, s, o]), S = he(() => {
|
|
1790
1790
|
if (!W.column || !W.direction) return i;
|
|
1791
|
-
const v = r.find((
|
|
1792
|
-
return v ? [...i].sort((
|
|
1793
|
-
const J = typeof v.accessor == "function" ? v.accessor(
|
|
1791
|
+
const v = r.find((V) => V.id === W.column);
|
|
1792
|
+
return v ? [...i].sort((V, Z) => {
|
|
1793
|
+
const J = typeof v.accessor == "function" ? v.accessor(V) : V[v.accessor], O = typeof v.accessor == "function" ? v.accessor(Z) : Z[v.accessor];
|
|
1794
1794
|
let ie = 0;
|
|
1795
1795
|
return J < O ? ie = -1 : J > O && (ie = 1), W.direction === "desc" ? -ie : ie;
|
|
1796
1796
|
}) : i;
|
|
1797
1797
|
}, [i, W, r]), N = he(() => {
|
|
1798
1798
|
if (!l) return S;
|
|
1799
|
-
const v = P.page * P.pageSize,
|
|
1800
|
-
return S.slice(v,
|
|
1799
|
+
const v = P.page * P.pageSize, V = v + P.pageSize;
|
|
1800
|
+
return S.slice(v, V);
|
|
1801
1801
|
}, [S, P, l]), T = ue(
|
|
1802
1802
|
(v) => {
|
|
1803
1803
|
r.find((Z) => Z.id === v)?.sortable && re((Z) => Z.column !== v ? { column: v, direction: "asc" } : Z.direction === "asc" ? { column: v, direction: "desc" } : { column: null, direction: null });
|
|
1804
1804
|
},
|
|
1805
1805
|
[r]
|
|
1806
1806
|
), k = ue((v) => {
|
|
1807
|
-
ce((
|
|
1807
|
+
ce((V) => ({ ...V, page: v }));
|
|
1808
1808
|
}, []), ee = ue((v) => {
|
|
1809
1809
|
ce({ page: 0, pageSize: v });
|
|
1810
1810
|
}, []), ae = ue(
|
|
1811
|
-
(v,
|
|
1811
|
+
(v, V) => {
|
|
1812
1812
|
if (!p) return;
|
|
1813
1813
|
const Z = w(v, 0);
|
|
1814
|
-
x.map((J, O) => w(J, O)), p(
|
|
1814
|
+
x.map((J, O) => w(J, O)), p(V ? [...x, v] : x.filter(
|
|
1815
1815
|
(J, O) => w(x[O], O) !== Z
|
|
1816
1816
|
));
|
|
1817
1817
|
},
|
|
@@ -1828,19 +1828,19 @@ const Kt = ({
|
|
|
1828
1828
|
ce((v) => ({ ...v, page: 0 }));
|
|
1829
1829
|
}, [o.map((v) => v.value).join(",")]);
|
|
1830
1830
|
const G = S.length, j = Math.ceil(G / P.pageSize), E = P.page * P.pageSize + 1, D = Math.min(E + P.pageSize - 1, G), z = N.length > 0 && N.every((v) => {
|
|
1831
|
-
const
|
|
1831
|
+
const V = w(v, 0);
|
|
1832
1832
|
return x.some(
|
|
1833
|
-
(Z, J) => w(Z, J) ===
|
|
1833
|
+
(Z, J) => w(Z, J) === V
|
|
1834
1834
|
);
|
|
1835
1835
|
}), R = N.some((v) => {
|
|
1836
|
-
const
|
|
1836
|
+
const V = w(v, 0);
|
|
1837
1837
|
return x.some(
|
|
1838
|
-
(Z, J) => w(Z, J) ===
|
|
1838
|
+
(Z, J) => w(Z, J) === V
|
|
1839
1839
|
);
|
|
1840
|
-
}),
|
|
1840
|
+
}), F = d(
|
|
1841
1841
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1842
1842
|
$
|
|
1843
|
-
),
|
|
1843
|
+
), H = U ? "bg-surface-sunk border-border border-t" : "bg-surface", M = d(H, "h-control-lg"), L = d(
|
|
1844
1844
|
"text-text border-b border-border p-2"
|
|
1845
1845
|
), te = d("h-row-lg", {
|
|
1846
1846
|
"hover:bg-surface-sunk": b,
|
|
@@ -1869,7 +1869,7 @@ const Kt = ({
|
|
|
1869
1869
|
tableColumns: r.length
|
|
1870
1870
|
}
|
|
1871
1871
|
) }),
|
|
1872
|
-
/* @__PURE__ */ c("table", { ref: C, className: d(
|
|
1872
|
+
/* @__PURE__ */ c("table", { ref: C, className: d(F, "min-w-full"), children: [
|
|
1873
1873
|
/* @__PURE__ */ e("thead", { className: M, children: /* @__PURE__ */ c("tr", { children: [
|
|
1874
1874
|
f && /* @__PURE__ */ e("th", { className: d(L, "w-12"), children: /* @__PURE__ */ e(
|
|
1875
1875
|
"input",
|
|
@@ -1883,7 +1883,7 @@ const Kt = ({
|
|
|
1883
1883
|
className: "rounded border-border [&:not(:checked)]:bg-surface-input text-accent"
|
|
1884
1884
|
}
|
|
1885
1885
|
) }),
|
|
1886
|
-
!n && r.map((v,
|
|
1886
|
+
!n && r.map((v, V) => /* @__PURE__ */ e(
|
|
1887
1887
|
"th",
|
|
1888
1888
|
{
|
|
1889
1889
|
className: d(
|
|
@@ -1895,11 +1895,11 @@ const Kt = ({
|
|
|
1895
1895
|
"text-center": v.align === "center",
|
|
1896
1896
|
"text-right": v.align === "right",
|
|
1897
1897
|
"cursor-pointer select-none": v.sortable,
|
|
1898
|
-
[`sticky left-0 ${
|
|
1899
|
-
[`sticky right-0 ${
|
|
1898
|
+
[`sticky left-0 ${H}`]: v.sticky === "left",
|
|
1899
|
+
[`sticky right-0 ${H}`]: v.sticky === "right"
|
|
1900
1900
|
},
|
|
1901
|
-
|
|
1902
|
-
|
|
1901
|
+
V === 0 && Le[K],
|
|
1902
|
+
V === r.length - 1 && Ie[K]
|
|
1903
1903
|
),
|
|
1904
1904
|
style: { width: v.width },
|
|
1905
1905
|
onClick: () => v.sortable && T(v.id),
|
|
@@ -1944,8 +1944,8 @@ const Kt = ({
|
|
|
1944
1944
|
),
|
|
1945
1945
|
children: g || "No data available"
|
|
1946
1946
|
}
|
|
1947
|
-
) }) : N.map((v,
|
|
1948
|
-
const Z = w(v,
|
|
1947
|
+
) }) : N.map((v, V) => {
|
|
1948
|
+
const Z = w(v, V), J = x.some(
|
|
1949
1949
|
(O, ie) => w(O, ie) === Z
|
|
1950
1950
|
);
|
|
1951
1951
|
return /* @__PURE__ */ c(
|
|
@@ -1954,10 +1954,10 @@ const Kt = ({
|
|
|
1954
1954
|
className: d(
|
|
1955
1955
|
te,
|
|
1956
1956
|
{ "bg-accent-soft": J },
|
|
1957
|
-
X?.(v,
|
|
1957
|
+
X?.(v, V)
|
|
1958
1958
|
),
|
|
1959
1959
|
onClick: (O) => {
|
|
1960
|
-
O.stopPropagation(), h?.(v,
|
|
1960
|
+
O.stopPropagation(), h?.(v, V);
|
|
1961
1961
|
},
|
|
1962
1962
|
children: [
|
|
1963
1963
|
f && /* @__PURE__ */ e("td", { className: L, children: /* @__PURE__ */ e(
|
|
@@ -1998,7 +1998,7 @@ const Kt = ({
|
|
|
1998
1998
|
{
|
|
1999
1999
|
trigger: /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
|
|
2000
2000
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
2001
|
-
/* @__PURE__ */ e(
|
|
2001
|
+
/* @__PURE__ */ e(He, {})
|
|
2002
2002
|
] }),
|
|
2003
2003
|
options: y.map((O) => ({
|
|
2004
2004
|
value: O.id,
|
|
@@ -2010,7 +2010,7 @@ const Kt = ({
|
|
|
2010
2010
|
const ie = y.find(
|
|
2011
2011
|
(ve) => ve.id === O
|
|
2012
2012
|
);
|
|
2013
|
-
ie && ie.onClick(v,
|
|
2013
|
+
ie && ie.onClick(v, V);
|
|
2014
2014
|
},
|
|
2015
2015
|
placement: "bottom-end"
|
|
2016
2016
|
}
|
|
@@ -2100,13 +2100,13 @@ const Kt = ({
|
|
|
2100
2100
|
] })
|
|
2101
2101
|
] })
|
|
2102
2102
|
] });
|
|
2103
|
-
}, rr = ht(null),
|
|
2103
|
+
}, rr = ht(null), fn = ({
|
|
2104
2104
|
items: t,
|
|
2105
2105
|
activeTab: r,
|
|
2106
2106
|
onTabChange: n,
|
|
2107
2107
|
className: s
|
|
2108
2108
|
}) => {
|
|
2109
|
-
const [a, o] =
|
|
2109
|
+
const [a, o] = B(t[0]?.id || ""), l = r || a, u = (m) => {
|
|
2110
2110
|
n ? n(m) : o(m);
|
|
2111
2111
|
};
|
|
2112
2112
|
return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((m) => /* @__PURE__ */ e(
|
|
@@ -2141,7 +2141,7 @@ const Kt = ({
|
|
|
2141
2141
|
size: o = "md",
|
|
2142
2142
|
className: l
|
|
2143
2143
|
}) => {
|
|
2144
|
-
const [u, m] =
|
|
2144
|
+
const [u, m] = B(
|
|
2145
2145
|
r || n || t[0]?.id || ""
|
|
2146
2146
|
), y = n || u, h = (g) => {
|
|
2147
2147
|
s ? s(g) : m(g);
|
|
@@ -2218,7 +2218,7 @@ const Kt = ({
|
|
|
2218
2218
|
xl: "max-w-4xl",
|
|
2219
2219
|
full: "max-w-full mx-4"
|
|
2220
2220
|
};
|
|
2221
|
-
function
|
|
2221
|
+
function Ve({
|
|
2222
2222
|
open: t,
|
|
2223
2223
|
onClose: r,
|
|
2224
2224
|
title: n,
|
|
@@ -2387,9 +2387,9 @@ const ur = ({
|
|
|
2387
2387
|
onDownloadFile: h,
|
|
2388
2388
|
onRegisterFile: f
|
|
2389
2389
|
}) => {
|
|
2390
|
-
const [x, p] =
|
|
2390
|
+
const [x, p] = B(!1), [w, g] = B([]), [b, A] = B(null), [_, K] = B("/"), [$, X] = B([]), [U, I] = B(!1), [q, W] = B(""), [re, P] = B(
|
|
2391
2391
|
typeof t == "object" ? t : null
|
|
2392
|
-
), [ce, C] =
|
|
2392
|
+
), [ce, C] = B(!1), [i, S] = B(""), N = se(null);
|
|
2393
2393
|
Q(() => {
|
|
2394
2394
|
x && T();
|
|
2395
2395
|
}, [x]), Q(() => {
|
|
@@ -2422,7 +2422,7 @@ const ur = ({
|
|
|
2422
2422
|
if (L) {
|
|
2423
2423
|
I(!0);
|
|
2424
2424
|
try {
|
|
2425
|
-
const te = await L.arrayBuffer(), v = new Uint8Array(te),
|
|
2425
|
+
const te = await L.arrayBuffer(), v = new Uint8Array(te), V = {
|
|
2426
2426
|
id: `local-${Date.now()}`,
|
|
2427
2427
|
name: L.name,
|
|
2428
2428
|
type: "file",
|
|
@@ -2433,7 +2433,7 @@ const ur = ({
|
|
|
2433
2433
|
providerKey: L.name,
|
|
2434
2434
|
ownerId: "me"
|
|
2435
2435
|
};
|
|
2436
|
-
P(
|
|
2436
|
+
P(V), r(V, v), p(!1);
|
|
2437
2437
|
} catch (te) {
|
|
2438
2438
|
console.error("Local file selection failed", te);
|
|
2439
2439
|
} finally {
|
|
@@ -2453,8 +2453,8 @@ const ur = ({
|
|
|
2453
2453
|
path: _
|
|
2454
2454
|
});
|
|
2455
2455
|
if (v?.data) {
|
|
2456
|
-
const
|
|
2457
|
-
P(
|
|
2456
|
+
const V = v.data;
|
|
2457
|
+
P(V), r(V, new Uint8Array(te)), p(!1);
|
|
2458
2458
|
}
|
|
2459
2459
|
} catch (te) {
|
|
2460
2460
|
console.error("Upload failed", te);
|
|
@@ -2525,7 +2525,7 @@ const ur = ({
|
|
|
2525
2525
|
type: "file"
|
|
2526
2526
|
});
|
|
2527
2527
|
}), M;
|
|
2528
|
-
}, [E]),
|
|
2528
|
+
}, [E]), F = [
|
|
2529
2529
|
{
|
|
2530
2530
|
id: "name",
|
|
2531
2531
|
header: "Name",
|
|
@@ -2570,7 +2570,7 @@ const ur = ({
|
|
|
2570
2570
|
}
|
|
2571
2571
|
)
|
|
2572
2572
|
}
|
|
2573
|
-
],
|
|
2573
|
+
], H = [
|
|
2574
2574
|
{
|
|
2575
2575
|
id: "name",
|
|
2576
2576
|
header: "Mount Name",
|
|
@@ -2616,7 +2616,7 @@ const ur = ({
|
|
|
2616
2616
|
),
|
|
2617
2617
|
a && /* @__PURE__ */ e(de, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
|
|
2618
2618
|
/* @__PURE__ */ e(
|
|
2619
|
-
|
|
2619
|
+
Ve,
|
|
2620
2620
|
{
|
|
2621
2621
|
open: x,
|
|
2622
2622
|
onClose: () => {
|
|
@@ -2711,7 +2711,7 @@ const ur = ({
|
|
|
2711
2711
|
je,
|
|
2712
2712
|
{
|
|
2713
2713
|
data: R,
|
|
2714
|
-
columns:
|
|
2714
|
+
columns: F,
|
|
2715
2715
|
loading: U,
|
|
2716
2716
|
emptyContent: "This folder is empty",
|
|
2717
2717
|
onRowClick: (M) => M.type === "folder" ? D(M.name) : G(M)
|
|
@@ -2721,7 +2721,7 @@ const ur = ({
|
|
|
2721
2721
|
je,
|
|
2722
2722
|
{
|
|
2723
2723
|
data: w,
|
|
2724
|
-
columns:
|
|
2724
|
+
columns: H,
|
|
2725
2725
|
loading: U,
|
|
2726
2726
|
emptyContent: "No storage mounts configured",
|
|
2727
2727
|
onRowClick: (M) => A(M)
|
|
@@ -2861,7 +2861,7 @@ function hr(t, r) {
|
|
|
2861
2861
|
}
|
|
2862
2862
|
return delete a[n[n.length - 1]], s;
|
|
2863
2863
|
}
|
|
2864
|
-
const
|
|
2864
|
+
const hn = ({
|
|
2865
2865
|
groups: t,
|
|
2866
2866
|
data: r,
|
|
2867
2867
|
onSubmit: n,
|
|
@@ -2879,7 +2879,7 @@ const mn = ({
|
|
|
2879
2879
|
ref: w,
|
|
2880
2880
|
sdk: g
|
|
2881
2881
|
}) => {
|
|
2882
|
-
const [b, A] =
|
|
2882
|
+
const [b, A] = B(r || {}), [_, K] = B({}), [$, X] = B({});
|
|
2883
2883
|
Q(() => {
|
|
2884
2884
|
r && A({ ...r });
|
|
2885
2885
|
}, [r]);
|
|
@@ -3089,7 +3089,7 @@ const mn = ({
|
|
|
3089
3089
|
);
|
|
3090
3090
|
case "folder":
|
|
3091
3091
|
return /* @__PURE__ */ e(
|
|
3092
|
-
|
|
3092
|
+
Bt,
|
|
3093
3093
|
{
|
|
3094
3094
|
value: i || {},
|
|
3095
3095
|
onChange: (k) => I(C.name, k),
|
|
@@ -3163,10 +3163,10 @@ const mn = ({
|
|
|
3163
3163
|
be,
|
|
3164
3164
|
{
|
|
3165
3165
|
...R,
|
|
3166
|
-
onChange: (
|
|
3166
|
+
onChange: (F) => G(
|
|
3167
3167
|
E,
|
|
3168
3168
|
D.name,
|
|
3169
|
-
|
|
3169
|
+
F.target.value
|
|
3170
3170
|
),
|
|
3171
3171
|
type: D.textType || D.type,
|
|
3172
3172
|
autoComplete: D.autocomplete,
|
|
@@ -3179,10 +3179,10 @@ const mn = ({
|
|
|
3179
3179
|
De,
|
|
3180
3180
|
{
|
|
3181
3181
|
...R,
|
|
3182
|
-
onChange: (
|
|
3182
|
+
onChange: (F) => G(
|
|
3183
3183
|
E,
|
|
3184
3184
|
D.name,
|
|
3185
|
-
|
|
3185
|
+
F.target.value
|
|
3186
3186
|
),
|
|
3187
3187
|
rows: 4,
|
|
3188
3188
|
error: z,
|
|
@@ -3194,15 +3194,15 @@ const mn = ({
|
|
|
3194
3194
|
Ne,
|
|
3195
3195
|
{
|
|
3196
3196
|
...R,
|
|
3197
|
-
onChange: (
|
|
3197
|
+
onChange: (F) => G(
|
|
3198
3198
|
E,
|
|
3199
3199
|
D.name,
|
|
3200
|
-
|
|
3200
|
+
F
|
|
3201
3201
|
),
|
|
3202
3202
|
options: (D.options || []).map(
|
|
3203
|
-
(
|
|
3204
|
-
...
|
|
3205
|
-
value: String(
|
|
3203
|
+
(F) => ({
|
|
3204
|
+
...F,
|
|
3205
|
+
value: String(F.value)
|
|
3206
3206
|
})
|
|
3207
3207
|
),
|
|
3208
3208
|
searchable: D.searchable,
|
|
@@ -3218,16 +3218,16 @@ const mn = ({
|
|
|
3218
3218
|
{
|
|
3219
3219
|
...R,
|
|
3220
3220
|
checked: !!j?.[D.name],
|
|
3221
|
-
onChange: (
|
|
3221
|
+
onChange: (F) => G(
|
|
3222
3222
|
E,
|
|
3223
3223
|
D.name,
|
|
3224
|
-
|
|
3224
|
+
F.target.checked
|
|
3225
3225
|
),
|
|
3226
3226
|
size: f
|
|
3227
3227
|
}
|
|
3228
3228
|
);
|
|
3229
3229
|
case "radio":
|
|
3230
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: D.options?.map((
|
|
3230
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: D.options?.map((F) => /* @__PURE__ */ c(
|
|
3231
3231
|
"label",
|
|
3232
3232
|
{
|
|
3233
3233
|
className: "flex cursor-pointer items-center gap-2 text-base text-text",
|
|
@@ -3237,33 +3237,33 @@ const mn = ({
|
|
|
3237
3237
|
{
|
|
3238
3238
|
type: "radio",
|
|
3239
3239
|
name: `${C.name}.${E}.${D.name}`,
|
|
3240
|
-
value:
|
|
3241
|
-
checked: j?.[D.name] ===
|
|
3240
|
+
value: F.value,
|
|
3241
|
+
checked: j?.[D.name] === F.value,
|
|
3242
3242
|
onChange: () => G(
|
|
3243
3243
|
E,
|
|
3244
3244
|
D.name,
|
|
3245
|
-
|
|
3245
|
+
F.value
|
|
3246
3246
|
),
|
|
3247
|
-
disabled: N ||
|
|
3247
|
+
disabled: N || F.disabled,
|
|
3248
3248
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3249
3249
|
}
|
|
3250
3250
|
),
|
|
3251
|
-
|
|
3251
|
+
F.label
|
|
3252
3252
|
]
|
|
3253
3253
|
},
|
|
3254
|
-
|
|
3254
|
+
F.value
|
|
3255
3255
|
)) });
|
|
3256
3256
|
case "date": {
|
|
3257
|
-
const
|
|
3257
|
+
const F = j?.[D.name];
|
|
3258
3258
|
return /* @__PURE__ */ e(
|
|
3259
3259
|
$e,
|
|
3260
3260
|
{
|
|
3261
3261
|
...R,
|
|
3262
|
-
value:
|
|
3263
|
-
onChange: (
|
|
3262
|
+
value: F ? new Date(F) : null,
|
|
3263
|
+
onChange: (H) => G(
|
|
3264
3264
|
E,
|
|
3265
3265
|
D.name,
|
|
3266
|
-
|
|
3266
|
+
H
|
|
3267
3267
|
),
|
|
3268
3268
|
size: f
|
|
3269
3269
|
}
|
|
@@ -3272,10 +3272,10 @@ const mn = ({
|
|
|
3272
3272
|
case "custom":
|
|
3273
3273
|
return D.customComponent?.({
|
|
3274
3274
|
value: j?.[D.name],
|
|
3275
|
-
onChange: (
|
|
3275
|
+
onChange: (F) => G(
|
|
3276
3276
|
E,
|
|
3277
3277
|
D.name,
|
|
3278
|
-
|
|
3278
|
+
F
|
|
3279
3279
|
),
|
|
3280
3280
|
error: z,
|
|
3281
3281
|
disabled: N
|
|
@@ -3430,7 +3430,7 @@ const mn = ({
|
|
|
3430
3430
|
] }) })
|
|
3431
3431
|
] });
|
|
3432
3432
|
};
|
|
3433
|
-
function
|
|
3433
|
+
function xn({
|
|
3434
3434
|
open: t,
|
|
3435
3435
|
title: r,
|
|
3436
3436
|
description: n,
|
|
@@ -3442,7 +3442,7 @@ function fn({
|
|
|
3442
3442
|
onCancel: m
|
|
3443
3443
|
}) {
|
|
3444
3444
|
return /* @__PURE__ */ e(
|
|
3445
|
-
|
|
3445
|
+
Ve,
|
|
3446
3446
|
{
|
|
3447
3447
|
open: t,
|
|
3448
3448
|
onClose: m,
|
|
@@ -3488,7 +3488,7 @@ const xr = {
|
|
|
3488
3488
|
info: "bg-info",
|
|
3489
3489
|
note: "bg-note"
|
|
3490
3490
|
};
|
|
3491
|
-
function
|
|
3491
|
+
function bn({
|
|
3492
3492
|
variant: t = "default",
|
|
3493
3493
|
size: r = "md",
|
|
3494
3494
|
dot: n = !1,
|
|
@@ -3541,7 +3541,7 @@ const gr = {
|
|
|
3541
3541
|
neutral: "bg-surface-hover text-text-muted",
|
|
3542
3542
|
success: "bg-success-soft text-success-fg"
|
|
3543
3543
|
};
|
|
3544
|
-
function
|
|
3544
|
+
function pn({
|
|
3545
3545
|
icon: t,
|
|
3546
3546
|
tone: r = "neutral",
|
|
3547
3547
|
title: n,
|
|
@@ -3569,7 +3569,7 @@ function xn({
|
|
|
3569
3569
|
}
|
|
3570
3570
|
);
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function gn({ children: t, className: r, ...n }) {
|
|
3573
3573
|
return /* @__PURE__ */ e(
|
|
3574
3574
|
"kbd",
|
|
3575
3575
|
{
|
|
@@ -3589,7 +3589,7 @@ const vr = {
|
|
|
3589
3589
|
accent: "bg-accent",
|
|
3590
3590
|
success: "bg-success"
|
|
3591
3591
|
};
|
|
3592
|
-
function
|
|
3592
|
+
function vn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
|
|
3593
3593
|
const o = Math.max(0, Math.min(100, t));
|
|
3594
3594
|
return /* @__PURE__ */ e(
|
|
3595
3595
|
"div",
|
|
@@ -3628,7 +3628,7 @@ const Nr = {
|
|
|
3628
3628
|
lg: "text-base",
|
|
3629
3629
|
xl: "text-lg"
|
|
3630
3630
|
};
|
|
3631
|
-
function
|
|
3631
|
+
function yn({
|
|
3632
3632
|
size: t = "md",
|
|
3633
3633
|
variant: r = "primary",
|
|
3634
3634
|
label: n = "Loading...",
|
|
@@ -3710,7 +3710,7 @@ const Cr = {
|
|
|
3710
3710
|
"cat-4": "bg-cat-4",
|
|
3711
3711
|
"cat-5": "bg-cat-5"
|
|
3712
3712
|
};
|
|
3713
|
-
function
|
|
3713
|
+
function Nn({
|
|
3714
3714
|
tone: t = "neutral",
|
|
3715
3715
|
shape: r = "round",
|
|
3716
3716
|
pulse: n = !1,
|
|
@@ -3733,7 +3733,7 @@ function vn({
|
|
|
3733
3733
|
}
|
|
3734
3734
|
);
|
|
3735
3735
|
}
|
|
3736
|
-
function
|
|
3736
|
+
function wn({
|
|
3737
3737
|
steps: t,
|
|
3738
3738
|
current: r,
|
|
3739
3739
|
variant: n = "numbered",
|
|
@@ -3769,7 +3769,7 @@ function yn({
|
|
|
3769
3769
|
m < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
|
|
3770
3770
|
] }, u)) });
|
|
3771
3771
|
}
|
|
3772
|
-
function
|
|
3772
|
+
function kn({ title: t, icon: r = /* @__PURE__ */ e(it, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...o }) {
|
|
3773
3773
|
return /* @__PURE__ */ c(
|
|
3774
3774
|
"div",
|
|
3775
3775
|
{
|
|
@@ -3817,7 +3817,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3817
3817
|
onError: () => l(!0)
|
|
3818
3818
|
}
|
|
3819
3819
|
) : /* @__PURE__ */ e("span", { className: u, title: a ?? t, "aria-label": t, children: zr(t) });
|
|
3820
|
-
}, Oe = "ring-surface", Mr = "ring-surface-accent",
|
|
3820
|
+
}, Oe = "ring-surface", Mr = "ring-surface-accent", Cn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
|
|
3821
3821
|
if (t.length === 0) return null;
|
|
3822
3822
|
const a = t.slice(0, r), o = t.length - a.length;
|
|
3823
3823
|
return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
|
|
@@ -3851,7 +3851,7 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3851
3851
|
}
|
|
3852
3852
|
)
|
|
3853
3853
|
] });
|
|
3854
|
-
},
|
|
3854
|
+
}, Fe = {
|
|
3855
3855
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
3856
3856
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
3857
3857
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
@@ -3862,8 +3862,8 @@ const Er = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
|
|
|
3862
3862
|
md: "size-avatar-sm rounded-md text-xs",
|
|
3863
3863
|
lg: "size-avatar-lg rounded-md text-base"
|
|
3864
3864
|
};
|
|
3865
|
-
function
|
|
3866
|
-
const o =
|
|
3865
|
+
function Sn({ channel: t, children: r, size: n = "md", className: s, title: a }) {
|
|
3866
|
+
const o = Fe[t in Fe ? t : "note"];
|
|
3867
3867
|
return /* @__PURE__ */ e(
|
|
3868
3868
|
"span",
|
|
3869
3869
|
{
|
|
@@ -3879,7 +3879,7 @@ function kn({ channel: t, children: r, size: n = "md", className: s, title: a })
|
|
|
3879
3879
|
}
|
|
3880
3880
|
);
|
|
3881
3881
|
}
|
|
3882
|
-
const
|
|
3882
|
+
const zn = ({
|
|
3883
3883
|
src: t,
|
|
3884
3884
|
alt: r,
|
|
3885
3885
|
size: n = "md",
|
|
@@ -3895,7 +3895,7 @@ const Cn = ({
|
|
|
3895
3895
|
onError: x,
|
|
3896
3896
|
...p
|
|
3897
3897
|
}) => {
|
|
3898
|
-
const [w, g] =
|
|
3898
|
+
const [w, g] = B(!0), [b, A] = B(!1), [_, K] = B(t), $ = (P) => {
|
|
3899
3899
|
g(!1), A(!1), f?.(P);
|
|
3900
3900
|
}, X = (P) => {
|
|
3901
3901
|
if (g(!1), A(!0), u && _ !== u) {
|
|
@@ -3960,7 +3960,7 @@ const Cn = ({
|
|
|
3960
3960
|
b && l && /* @__PURE__ */ e("div", { className: q, children: y || re })
|
|
3961
3961
|
] });
|
|
3962
3962
|
};
|
|
3963
|
-
function
|
|
3963
|
+
function En({
|
|
3964
3964
|
items: t,
|
|
3965
3965
|
getRowKey: r,
|
|
3966
3966
|
variant: n = "divided",
|
|
@@ -3997,16 +3997,16 @@ function Sn({
|
|
|
3997
3997
|
)
|
|
3998
3998
|
), S = oe.useRef(null), N = (z) => {
|
|
3999
3999
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(z.key)) return;
|
|
4000
|
-
const
|
|
4000
|
+
const F = Array.from(
|
|
4001
4001
|
S.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
4002
4002
|
);
|
|
4003
|
-
if (
|
|
4003
|
+
if (F.length === 0) return;
|
|
4004
4004
|
z.preventDefault();
|
|
4005
|
-
const
|
|
4006
|
-
|
|
4005
|
+
const H = F.indexOf(document.activeElement), M = z.key === "Home" ? 0 : z.key === "End" ? F.length - 1 : z.key === "ArrowDown" ? (H + 1) % F.length : (H - 1 + F.length) % F.length;
|
|
4006
|
+
F[M]?.focus();
|
|
4007
4007
|
}, T = (z, R) => r ? r(z, R) : R, k = (z) => _.includes(z), ee = (z, R) => {
|
|
4008
4008
|
K && K(
|
|
4009
|
-
R ? [..._, z] : _.filter((
|
|
4009
|
+
R ? [..._, z] : _.filter((F) => F !== z)
|
|
4010
4010
|
);
|
|
4011
4011
|
}, ae = (z) => K?.(z ? [...t] : []), le = d(
|
|
4012
4012
|
"flex flex-col",
|
|
@@ -4032,8 +4032,8 @@ function Sn({
|
|
|
4032
4032
|
)) });
|
|
4033
4033
|
if (t.length === 0 && q)
|
|
4034
4034
|
return /* @__PURE__ */ e("div", { className: le, children: q });
|
|
4035
|
-
const G = t.length > 0 && _.length === t.length, j = _.length > 0 && !G, E = (z, R,
|
|
4036
|
-
const
|
|
4035
|
+
const G = t.length > 0 && _.length === t.length, j = _.length > 0 && !G, E = (z, R, F) => {
|
|
4036
|
+
const H = m?.(z, R) ?? !1, M = y?.(z, R) ?? !1, L = h?.(z, R) ?? !1, te = A && k(z);
|
|
4037
4037
|
return /* @__PURE__ */ c(
|
|
4038
4038
|
"li",
|
|
4039
4039
|
{
|
|
@@ -4041,7 +4041,7 @@ function Sn({
|
|
|
4041
4041
|
role: "button",
|
|
4042
4042
|
tabIndex: 0,
|
|
4043
4043
|
"data-list-row": "",
|
|
4044
|
-
"aria-current":
|
|
4044
|
+
"aria-current": H || void 0,
|
|
4045
4045
|
onClick: () => l(z, R),
|
|
4046
4046
|
onFocus: () => u?.(R),
|
|
4047
4047
|
onKeyDown: (v) => {
|
|
@@ -4051,9 +4051,9 @@ function Sn({
|
|
|
4051
4051
|
className: d(
|
|
4052
4052
|
"flex items-center gap-3 px-4 py-2 text-base",
|
|
4053
4053
|
"transition-colors duration-fast ease-out",
|
|
4054
|
-
n === "divided" && !
|
|
4054
|
+
n === "divided" && !F && "border-t border-border-subtle",
|
|
4055
4055
|
l && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
4056
|
-
|
|
4056
|
+
H || te ? "bg-accent-soft text-text" : l && "hover:bg-surface-hover",
|
|
4057
4057
|
M && "font-bold",
|
|
4058
4058
|
L && "opacity-55"
|
|
4059
4059
|
),
|
|
@@ -4082,21 +4082,21 @@ function Sn({
|
|
|
4082
4082
|
);
|
|
4083
4083
|
}, D = (() => {
|
|
4084
4084
|
if (!f)
|
|
4085
|
-
return t.map((
|
|
4085
|
+
return t.map((H, M) => E(H, M, M === 0));
|
|
4086
4086
|
const z = /* @__PURE__ */ new Map();
|
|
4087
|
-
t.forEach((
|
|
4088
|
-
const L = f(
|
|
4089
|
-
z.has(L) || z.set(L, []), z.get(L).push({ item:
|
|
4087
|
+
t.forEach((H, M) => {
|
|
4088
|
+
const L = f(H, M);
|
|
4089
|
+
z.has(L) || z.set(L, []), z.get(L).push({ item: H, index: M });
|
|
4090
4090
|
});
|
|
4091
4091
|
const R = x ?? [];
|
|
4092
4092
|
return [
|
|
4093
|
-
...R.filter((
|
|
4094
|
-
...[...z.keys()].filter((
|
|
4095
|
-
].flatMap((
|
|
4096
|
-
const L = z.get(
|
|
4093
|
+
...R.filter((H) => z.has(H.id)),
|
|
4094
|
+
...[...z.keys()].filter((H) => !R.some((M) => M.id === H)).map((H) => ({ id: H }))
|
|
4095
|
+
].flatMap((H, M) => {
|
|
4096
|
+
const L = z.get(H.id) ?? [], te = g && C[H.id], v = H.title ?? H.id, V = H.count ?? L.length, Z = /* @__PURE__ */ e(
|
|
4097
4097
|
"li",
|
|
4098
4098
|
{
|
|
4099
|
-
onClick: g ? () => i((J) => ({ ...J, [
|
|
4099
|
+
onClick: g ? () => i((J) => ({ ...J, [H.id]: !J[H.id] })) : void 0,
|
|
4100
4100
|
className: d(
|
|
4101
4101
|
"flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
|
|
4102
4102
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
@@ -4108,7 +4108,7 @@ function Sn({
|
|
|
4108
4108
|
),
|
|
4109
4109
|
"aria-expanded": g ? !te : void 0,
|
|
4110
4110
|
style: w ? { top: U ? 28 : 0 } : void 0,
|
|
4111
|
-
children: p ? p(
|
|
4111
|
+
children: p ? p(H, L.map((J) => J.item)) : /* @__PURE__ */ c(xe, { children: [
|
|
4112
4112
|
g && /* @__PURE__ */ e(
|
|
4113
4113
|
Ce,
|
|
4114
4114
|
{
|
|
@@ -4120,10 +4120,10 @@ function Sn({
|
|
|
4120
4120
|
}
|
|
4121
4121
|
),
|
|
4122
4122
|
/* @__PURE__ */ e("span", { children: v }),
|
|
4123
|
-
!b && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children:
|
|
4123
|
+
!b && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: V })
|
|
4124
4124
|
] })
|
|
4125
4125
|
},
|
|
4126
|
-
`group-${
|
|
4126
|
+
`group-${H.id}`
|
|
4127
4127
|
);
|
|
4128
4128
|
return te ? [Z] : [
|
|
4129
4129
|
Z,
|
|
@@ -4164,7 +4164,7 @@ function Sn({
|
|
|
4164
4164
|
/* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: D })
|
|
4165
4165
|
] });
|
|
4166
4166
|
}
|
|
4167
|
-
function
|
|
4167
|
+
function Mn({
|
|
4168
4168
|
side: t,
|
|
4169
4169
|
continued: r = !1,
|
|
4170
4170
|
tone: n = "default",
|
|
@@ -4199,13 +4199,13 @@ const Dr = {
|
|
|
4199
4199
|
urgent: "text-danger-fg",
|
|
4200
4200
|
success: "text-success-fg"
|
|
4201
4201
|
};
|
|
4202
|
-
function
|
|
4202
|
+
function $n({ value: t, label: r, tone: n = "default", className: s, ...a }) {
|
|
4203
4203
|
return /* @__PURE__ */ c("div", { className: d("rounded-xl shadow-sm bg-surface px-4 py-3.5", s), ...a, children: [
|
|
4204
4204
|
/* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Dr[n]), children: t }),
|
|
4205
4205
|
/* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
|
|
4206
4206
|
] });
|
|
4207
4207
|
}
|
|
4208
|
-
const
|
|
4208
|
+
const Dn = ({
|
|
4209
4209
|
surface: t = !1,
|
|
4210
4210
|
title: r,
|
|
4211
4211
|
subtitle: n,
|
|
@@ -4219,7 +4219,7 @@ const Mn = ({
|
|
|
4219
4219
|
editable: h = !1,
|
|
4220
4220
|
onTitleChange: f
|
|
4221
4221
|
}) => {
|
|
4222
|
-
const [x, p] =
|
|
4222
|
+
const [x, p] = B(!1), [w, g] = B(r), b = se(null);
|
|
4223
4223
|
Q(() => {
|
|
4224
4224
|
g(r);
|
|
4225
4225
|
}, [r]), Q(() => {
|
|
@@ -4285,7 +4285,7 @@ const Mn = ({
|
|
|
4285
4285
|
] }) }),
|
|
4286
4286
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
4287
4287
|
($) => $.render ? /* @__PURE__ */ e(oe.Fragment, { children: $.render() }, $.id) : $.splitOptions && $.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4288
|
-
|
|
4288
|
+
Be,
|
|
4289
4289
|
{
|
|
4290
4290
|
label: $.label,
|
|
4291
4291
|
onClick: $.onClick,
|
|
@@ -4319,7 +4319,7 @@ const Mn = ({
|
|
|
4319
4319
|
sm: "p-2",
|
|
4320
4320
|
md: "p-4",
|
|
4321
4321
|
lg: "p-6"
|
|
4322
|
-
},
|
|
4322
|
+
}, Tn = ({
|
|
4323
4323
|
actions: t = [],
|
|
4324
4324
|
onBack: r,
|
|
4325
4325
|
backLabel: n = "Back",
|
|
@@ -4331,7 +4331,7 @@ const Mn = ({
|
|
|
4331
4331
|
o && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: o }),
|
|
4332
4332
|
t.length > 0 && /* @__PURE__ */ e("div", { className: d("flex flex-wrap gap-4", !o && "ml-auto"), children: t.map(
|
|
4333
4333
|
(l) => l.splitOptions && l.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
4334
|
-
|
|
4334
|
+
Be,
|
|
4335
4335
|
{
|
|
4336
4336
|
label: l.label,
|
|
4337
4337
|
onClick: l.onClick,
|
|
@@ -4394,7 +4394,7 @@ const Mn = ({
|
|
|
4394
4394
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
4395
4395
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
4396
4396
|
};
|
|
4397
|
-
function
|
|
4397
|
+
function _n({ text: t, className: r, as: n }) {
|
|
4398
4398
|
const s = t ?? "";
|
|
4399
4399
|
return (n ? n === "html" : _r.test(s)) ? /* @__PURE__ */ e(
|
|
4400
4400
|
"div",
|
|
@@ -4404,7 +4404,7 @@ function Dn({ text: t, className: r, as: n }) {
|
|
|
4404
4404
|
}
|
|
4405
4405
|
) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(pt, { remarkPlugins: [gt], components: Lr, children: s }) });
|
|
4406
4406
|
}
|
|
4407
|
-
function
|
|
4407
|
+
function An({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
4408
4408
|
const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
|
|
4409
4409
|
return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: d("flex items-center gap-3 py-2", s), children: [
|
|
4410
4410
|
n === "center" && a,
|
|
@@ -4413,7 +4413,7 @@ function Tn({ label: t, trailing: r, align: n = "center", className: s }) {
|
|
|
4413
4413
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
4414
4414
|
] });
|
|
4415
4415
|
}
|
|
4416
|
-
function
|
|
4416
|
+
function Ln({
|
|
4417
4417
|
label: t,
|
|
4418
4418
|
description: r,
|
|
4419
4419
|
control: n,
|
|
@@ -4440,7 +4440,7 @@ function _n({
|
|
|
4440
4440
|
}
|
|
4441
4441
|
);
|
|
4442
4442
|
}
|
|
4443
|
-
function
|
|
4443
|
+
function In({
|
|
4444
4444
|
icon: t,
|
|
4445
4445
|
title: r,
|
|
4446
4446
|
description: n,
|
|
@@ -4460,7 +4460,7 @@ function An({
|
|
|
4460
4460
|
/* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
|
|
4461
4461
|
] });
|
|
4462
4462
|
}
|
|
4463
|
-
function
|
|
4463
|
+
function jn({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
4464
4464
|
return /* @__PURE__ */ c(
|
|
4465
4465
|
"button",
|
|
4466
4466
|
{
|
|
@@ -4484,7 +4484,7 @@ function Ir(t, r) {
|
|
|
4484
4484
|
t
|
|
4485
4485
|
);
|
|
4486
4486
|
}
|
|
4487
|
-
const
|
|
4487
|
+
const Pn = ({
|
|
4488
4488
|
groups: t,
|
|
4489
4489
|
data: r,
|
|
4490
4490
|
size: n = "md",
|
|
@@ -4813,7 +4813,7 @@ const In = ({
|
|
|
4813
4813
|
]
|
|
4814
4814
|
}
|
|
4815
4815
|
) });
|
|
4816
|
-
},
|
|
4816
|
+
}, On = ({
|
|
4817
4817
|
title: t,
|
|
4818
4818
|
actionIcons: r,
|
|
4819
4819
|
items: n,
|
|
@@ -4873,11 +4873,11 @@ const In = ({
|
|
|
4873
4873
|
info: "text-info-fg",
|
|
4874
4874
|
neutral: "text-text",
|
|
4875
4875
|
current: "text-current"
|
|
4876
|
-
},
|
|
4876
|
+
}, Fr = {
|
|
4877
4877
|
left: "text-left",
|
|
4878
4878
|
center: "text-center",
|
|
4879
4879
|
right: "text-right"
|
|
4880
|
-
},
|
|
4880
|
+
}, Fn = ({
|
|
4881
4881
|
level: t = 1,
|
|
4882
4882
|
size: r,
|
|
4883
4883
|
weight: n = "semibold",
|
|
@@ -4890,16 +4890,16 @@ const In = ({
|
|
|
4890
4890
|
}) => {
|
|
4891
4891
|
const y = `h${t}`, h = d(
|
|
4892
4892
|
"font-sans text-pretty",
|
|
4893
|
-
jr[r ||
|
|
4893
|
+
jr[r || Br(t)],
|
|
4894
4894
|
Pr[n],
|
|
4895
4895
|
Or[s],
|
|
4896
|
-
|
|
4896
|
+
Fr[a],
|
|
4897
4897
|
o && "truncate",
|
|
4898
4898
|
l
|
|
4899
4899
|
);
|
|
4900
4900
|
return /* @__PURE__ */ e(y, { className: h, ...m, children: u });
|
|
4901
4901
|
};
|
|
4902
|
-
function
|
|
4902
|
+
function Br(t) {
|
|
4903
4903
|
return {
|
|
4904
4904
|
1: "2xl",
|
|
4905
4905
|
2: "xl",
|
|
@@ -4909,7 +4909,7 @@ function Fr(t) {
|
|
|
4909
4909
|
6: "md"
|
|
4910
4910
|
}[t] || "md";
|
|
4911
4911
|
}
|
|
4912
|
-
const
|
|
4912
|
+
const Bn = ({
|
|
4913
4913
|
commands: t,
|
|
4914
4914
|
isOpen: r,
|
|
4915
4915
|
onClose: n,
|
|
@@ -4917,7 +4917,7 @@ const On = ({
|
|
|
4917
4917
|
initialCommandPath: a,
|
|
4918
4918
|
initialActiveIndex: o
|
|
4919
4919
|
}) => {
|
|
4920
|
-
const [l, u] =
|
|
4920
|
+
const [l, u] = B(""), [m, y] = B(a || []), [h, f] = B(o || 0), x = se(null), p = se(null), g = (m.length ? t.find((b) => b.id === m[0])?.subCommands || [] : t).filter(
|
|
4921
4921
|
(b) => b.label.toLowerCase().includes(l.toLowerCase())
|
|
4922
4922
|
);
|
|
4923
4923
|
return Q(() => {
|
|
@@ -5022,7 +5022,7 @@ const On = ({
|
|
|
5022
5022
|
lg: "p-6",
|
|
5023
5023
|
xl: "p-8",
|
|
5024
5024
|
"2xl": "p-12"
|
|
5025
|
-
},
|
|
5025
|
+
}, Hr = {
|
|
5026
5026
|
none: "m-0",
|
|
5027
5027
|
xs: "m-1",
|
|
5028
5028
|
sm: "m-2",
|
|
@@ -5030,7 +5030,7 @@ const On = ({
|
|
|
5030
5030
|
lg: "m-6",
|
|
5031
5031
|
xl: "m-8",
|
|
5032
5032
|
"2xl": "m-12"
|
|
5033
|
-
},
|
|
5033
|
+
}, Vr = {
|
|
5034
5034
|
none: "",
|
|
5035
5035
|
primary: "bg-accent text-accent-fg",
|
|
5036
5036
|
secondary: "bg-surface-hover",
|
|
@@ -5093,8 +5093,8 @@ const On = ({
|
|
|
5093
5093
|
ref: h,
|
|
5094
5094
|
className: d(
|
|
5095
5095
|
t && Rr[t],
|
|
5096
|
-
r &&
|
|
5097
|
-
n &&
|
|
5096
|
+
r && Hr[r],
|
|
5097
|
+
n && Vr[n],
|
|
5098
5098
|
s && qr[s],
|
|
5099
5099
|
a && Ur[a],
|
|
5100
5100
|
o && Wr[o],
|
|
@@ -5107,7 +5107,7 @@ const On = ({
|
|
|
5107
5107
|
)
|
|
5108
5108
|
);
|
|
5109
5109
|
Ue.displayName = "Box";
|
|
5110
|
-
const
|
|
5110
|
+
const Rn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
5111
5111
|
Ue,
|
|
5112
5112
|
{
|
|
5113
5113
|
background: "module",
|
|
@@ -5122,7 +5122,7 @@ const Bn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
|
|
|
5122
5122
|
]
|
|
5123
5123
|
}
|
|
5124
5124
|
);
|
|
5125
|
-
function
|
|
5125
|
+
function Hn({
|
|
5126
5126
|
identifier: t,
|
|
5127
5127
|
resourceLoader: r,
|
|
5128
5128
|
framework: n = "react",
|
|
@@ -5130,7 +5130,7 @@ function Fn({
|
|
|
5130
5130
|
componentProps: a,
|
|
5131
5131
|
className: o
|
|
5132
5132
|
}) {
|
|
5133
|
-
const l = se(null), [u, m] =
|
|
5133
|
+
const l = se(null), [u, m] = B(!0), [y, h] = B(null), f = se(null);
|
|
5134
5134
|
return se(null), Q(() => {
|
|
5135
5135
|
let x = !0;
|
|
5136
5136
|
return (async () => {
|
|
@@ -5170,7 +5170,7 @@ function Fn({
|
|
|
5170
5170
|
n === "react" && y && /* @__PURE__ */ e(y, { ...a })
|
|
5171
5171
|
] });
|
|
5172
5172
|
}
|
|
5173
|
-
class
|
|
5173
|
+
class Vn extends xt {
|
|
5174
5174
|
constructor() {
|
|
5175
5175
|
super(...arguments), this.state = {
|
|
5176
5176
|
hasError: !1,
|
|
@@ -5199,67 +5199,69 @@ class Rn extends xt {
|
|
|
5199
5199
|
}
|
|
5200
5200
|
}
|
|
5201
5201
|
export {
|
|
5202
|
-
|
|
5202
|
+
kn as AssistantCard,
|
|
5203
5203
|
Er as Avatar,
|
|
5204
|
-
|
|
5205
|
-
|
|
5204
|
+
Cn as AvatarStack,
|
|
5205
|
+
bn as Badge,
|
|
5206
5206
|
Ue as Box,
|
|
5207
5207
|
ne as Button,
|
|
5208
5208
|
ln as ButtonGroup,
|
|
5209
|
-
|
|
5210
|
-
|
|
5209
|
+
Rn as Card,
|
|
5210
|
+
Sn as ChannelBadge,
|
|
5211
5211
|
pe as Checkbox,
|
|
5212
|
-
|
|
5213
|
-
|
|
5212
|
+
Bn as CommandPalette,
|
|
5213
|
+
xn as ConfirmDialog,
|
|
5214
5214
|
Wt as ContentLoading,
|
|
5215
5215
|
$e as DatePicker,
|
|
5216
5216
|
Kt as Dropdown,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5217
|
+
pn as EmptyState,
|
|
5218
|
+
Vn as ErrorBoundary,
|
|
5219
|
+
Hn as FederatedResource,
|
|
5220
5220
|
on as FilterChip,
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5221
|
+
Bt as FolderSelect,
|
|
5222
|
+
hn as Form,
|
|
5223
|
+
Fn as Heading,
|
|
5224
5224
|
Y as Icon,
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5225
|
+
zn as Image,
|
|
5226
|
+
gn as Kbd,
|
|
5227
|
+
$n as KpiCard,
|
|
5228
5228
|
cn as Link,
|
|
5229
|
-
|
|
5229
|
+
En as List,
|
|
5230
5230
|
nn as MeetingGrid,
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5231
|
+
Mn as MessageBubble,
|
|
5232
|
+
Ve as Modal,
|
|
5233
|
+
Dn as PageHeader,
|
|
5234
|
+
Tn as PageToolbar,
|
|
5235
5235
|
sn as ParticipantTile,
|
|
5236
5236
|
$t as Popover,
|
|
5237
|
-
|
|
5238
|
-
|
|
5237
|
+
vn as ProgressBar,
|
|
5238
|
+
_n as RichText,
|
|
5239
5239
|
qt as SearchableTextField,
|
|
5240
|
-
|
|
5240
|
+
An as SectionDivider,
|
|
5241
5241
|
dn as SegmentedToggle,
|
|
5242
5242
|
Ne as Select,
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5243
|
+
Ln as SettingsRow,
|
|
5244
|
+
In as SettingsSection,
|
|
5245
|
+
On as SidebarMenu,
|
|
5246
|
+
jn as SourceChip,
|
|
5247
|
+
yn as Spinner,
|
|
5248
|
+
Be as SplitButton,
|
|
5249
|
+
Nn as StatusDot,
|
|
5250
|
+
wn as StepIndicator,
|
|
5251
5251
|
ur as StorageInput,
|
|
5252
5252
|
Ut as Switch,
|
|
5253
|
-
|
|
5253
|
+
fn as TabBar,
|
|
5254
5254
|
je as Table,
|
|
5255
5255
|
nr as Tabs,
|
|
5256
5256
|
de as Text,
|
|
5257
5257
|
De as TextArea,
|
|
5258
5258
|
be as TextField,
|
|
5259
5259
|
an as VideoSurface,
|
|
5260
|
-
|
|
5260
|
+
Pn as View,
|
|
5261
5261
|
d as cn,
|
|
5262
5262
|
rn as createSizes,
|
|
5263
|
-
tn as createVariants
|
|
5263
|
+
tn as createVariants,
|
|
5264
|
+
un as dateFilterHandler,
|
|
5265
|
+
mn as selectFilterHandler
|
|
5264
5266
|
};
|
|
5265
5267
|
//# sourceMappingURL=index.js.map
|