@opencxh/ui-kit 3.176.0 → 3.176.1
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.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e, Fragment as
|
|
2
|
-
import ae, { forwardRef as ve, useState as R, useLayoutEffect as vt, useRef as ne, useEffect as
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
+
import ae, { forwardRef as ve, useState as R, useLayoutEffect as vt, useRef as ne, useEffect as X, createContext as et, useId as yt, useMemo as pe, useContext as Nt, useCallback as fe, Component as wt } from "react";
|
|
3
3
|
import { clsx as kt } from "clsx";
|
|
4
4
|
import * as Ct from "lucide-react";
|
|
5
|
-
import { X as Se, ChevronDown as De, ExternalLink as St, Search as Le, ChevronRight as Ie, Sparkles as Et, ArrowUpRight as tt, ImageOff as zt, ChevronLeft as
|
|
5
|
+
import { X as Se, ChevronDown as De, ExternalLink as St, Search as Le, ChevronRight as Ie, Sparkles as Et, ArrowUpRight as tt, ImageOff as zt, ChevronLeft as Ee, Pencil as Mt, Calendar as Tt, Check as Ue, ChevronUp as _t, Ellipsis as $t, ChevronDownIcon as At, FileText as je, HardDrive as We, ArrowLeft as Dt, FolderPlus as Lt, Upload as It, Folder as Ke, Trash2 as Ot, Plus as Pt, Loader2 as jt, VideoOff as Ft, User as Rt, MicOff as Bt, Mic as Ht } from "lucide-react";
|
|
6
6
|
import qt from "dompurify";
|
|
7
7
|
import Vt from "react-markdown";
|
|
8
8
|
import Ut from "remark-gfm";
|
|
@@ -191,7 +191,7 @@ function Xt(t) {
|
|
|
191
191
|
xl: 24
|
|
192
192
|
}[t];
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Oe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
|
|
195
195
|
const [l, o] = R({});
|
|
196
196
|
return vt(() => {
|
|
197
197
|
if (!t) return;
|
|
@@ -216,8 +216,8 @@ const rt = ({
|
|
|
216
216
|
disabled: o = !1,
|
|
217
217
|
triggerLabel: u
|
|
218
218
|
}) => {
|
|
219
|
-
const [d, v] = R(!1), m = ne(null), f = ne(null), b =
|
|
220
|
-
|
|
219
|
+
const [d, v] = R(!1), m = ne(null), f = ne(null), b = Oe(d, f, { placement: n });
|
|
220
|
+
X(() => {
|
|
221
221
|
if (!d) return;
|
|
222
222
|
const p = (C) => {
|
|
223
223
|
m.current && !m.current.contains(C.target) && v(!1);
|
|
@@ -301,11 +301,11 @@ function tr({
|
|
|
301
301
|
title: b,
|
|
302
302
|
className: g
|
|
303
303
|
}) {
|
|
304
|
-
const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", h = Qt({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(
|
|
304
|
+
const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", h = Qt({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ae, { children: [
|
|
305
305
|
r,
|
|
306
306
|
t,
|
|
307
307
|
o && /* @__PURE__ */ e(J, { icon: De, size: "xs" })
|
|
308
|
-
] }), z = er({ shape: s, withClear: w }),
|
|
308
|
+
] }), z = er({ shape: s, withClear: w }), O = w && /* @__PURE__ */ e(
|
|
309
309
|
"button",
|
|
310
310
|
{
|
|
311
311
|
type: "button",
|
|
@@ -329,10 +329,10 @@ function tr({
|
|
|
329
329
|
children: u
|
|
330
330
|
}
|
|
331
331
|
),
|
|
332
|
-
|
|
332
|
+
O
|
|
333
333
|
] }) : w ? /* @__PURE__ */ c("span", { className: h, title: b, children: [
|
|
334
334
|
/* @__PURE__ */ e("button", { type: "button", onClick: f, className: z, children: C }),
|
|
335
|
-
|
|
335
|
+
O
|
|
336
336
|
] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: f, className: i(h, z), children: C });
|
|
337
337
|
}
|
|
338
338
|
const rr = {
|
|
@@ -509,7 +509,7 @@ function nt({
|
|
|
509
509
|
children: /* @__PURE__ */ e(De, { className: "size-icon-md" })
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
children: (b) => /* @__PURE__ */ e(
|
|
512
|
+
children: (b) => /* @__PURE__ */ e(Ae, { children: l.map((g) => /* @__PURE__ */ c(
|
|
513
513
|
"button",
|
|
514
514
|
{
|
|
515
515
|
type: "button",
|
|
@@ -545,9 +545,9 @@ const os = ({
|
|
|
545
545
|
const [o, u] = R(""), [d, v] = R(a || []), [m, f] = R(l || 0), b = ne(null), g = ne(null), p = (d.length ? t.find((h) => h.id === d[0])?.subCommands || [] : t).filter(
|
|
546
546
|
(h) => h.label.toLowerCase().includes(o.toLowerCase())
|
|
547
547
|
);
|
|
548
|
-
return
|
|
548
|
+
return X(() => {
|
|
549
549
|
r || (u(""), v(a || []), f(l || 0));
|
|
550
|
-
}, [r]),
|
|
550
|
+
}, [r, a, l]), X(() => {
|
|
551
551
|
const h = (C) => {
|
|
552
552
|
if (r) {
|
|
553
553
|
if (C.key === "Escape")
|
|
@@ -567,12 +567,12 @@ const os = ({
|
|
|
567
567
|
}
|
|
568
568
|
};
|
|
569
569
|
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
570
|
-
}, [r, n, p, m, d]),
|
|
570
|
+
}, [r, n, p, m, d]), X(() => {
|
|
571
571
|
const h = (C) => {
|
|
572
572
|
b.current && !b.current.contains(C.target) && n();
|
|
573
573
|
};
|
|
574
574
|
return r && document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
575
|
-
}, [r, n]),
|
|
575
|
+
}, [r, n]), X(() => {
|
|
576
576
|
if (!r) return;
|
|
577
577
|
g.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({ block: "nearest" });
|
|
578
578
|
}, [m, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
|
|
@@ -587,7 +587,6 @@ const os = ({
|
|
|
587
587
|
"input",
|
|
588
588
|
{
|
|
589
589
|
type: "text",
|
|
590
|
-
autoFocus: !0,
|
|
591
590
|
placeholder: s?.searchPlaceholder || "Search commands...",
|
|
592
591
|
value: o,
|
|
593
592
|
onChange: (h) => u(h.target.value),
|
|
@@ -685,7 +684,7 @@ const os = ({
|
|
|
685
684
|
th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
|
|
686
685
|
td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
|
|
687
686
|
};
|
|
688
|
-
function
|
|
687
|
+
function ze({ text: t, className: r, as: n }) {
|
|
689
688
|
const s = t ?? "";
|
|
690
689
|
return (n ? n === "html" : ir.test(s)) ? /* @__PURE__ */ e(
|
|
691
690
|
"div",
|
|
@@ -718,9 +717,9 @@ function xr({ block: t }) {
|
|
|
718
717
|
case "heading":
|
|
719
718
|
return t.level === 1 ? /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold tracking-tight text-text", children: t.text }) : t.level === 2 ? /* @__PURE__ */ e("h2", { className: "pt-2 text-base font-semibold tracking-tight text-text", children: t.text }) : /* @__PURE__ */ e("h3", { className: "pt-1 text-sm font-semibold text-text", children: t.text });
|
|
720
719
|
case "paragraph":
|
|
721
|
-
return /* @__PURE__ */ e(
|
|
720
|
+
return /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" });
|
|
722
721
|
case "quote":
|
|
723
|
-
return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(
|
|
722
|
+
return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
|
|
724
723
|
case "code":
|
|
725
724
|
return /* @__PURE__ */ e("pre", { className: "overflow-x-auto rounded-lg bg-surface-sunk p-3 text-xs", children: /* @__PURE__ */ e("code", { className: "font-mono", children: t.text }) });
|
|
726
725
|
case "divider":
|
|
@@ -739,7 +738,7 @@ function xr({ block: t }) {
|
|
|
739
738
|
n.lead,
|
|
740
739
|
" "
|
|
741
740
|
] }),
|
|
742
|
-
/* @__PURE__ */ e(
|
|
741
|
+
/* @__PURE__ */ e(ze, { as: "markdown", text: n.text, className: "inline" })
|
|
743
742
|
] }, s))
|
|
744
743
|
}
|
|
745
744
|
);
|
|
@@ -789,7 +788,7 @@ function xr({ block: t }) {
|
|
|
789
788
|
case "callout":
|
|
790
789
|
return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3", fr[t.tone]), children: [
|
|
791
790
|
t.title && /* @__PURE__ */ e("div", { className: "pb-0.5 text-sm font-semibold text-text", children: t.title }),
|
|
792
|
-
/* @__PURE__ */ e(
|
|
791
|
+
/* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" })
|
|
793
792
|
] });
|
|
794
793
|
default:
|
|
795
794
|
return null;
|
|
@@ -1066,7 +1065,7 @@ function gs({ icon: t, text: r, time: n, joinUrl: s, joinLabel: a }) {
|
|
|
1066
1065
|
)
|
|
1067
1066
|
] });
|
|
1068
1067
|
}
|
|
1069
|
-
const
|
|
1068
|
+
const Me = {
|
|
1070
1069
|
mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
|
|
1071
1070
|
wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
|
|
1072
1071
|
chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
|
|
@@ -1084,7 +1083,7 @@ function ps({
|
|
|
1084
1083
|
className: s,
|
|
1085
1084
|
title: a
|
|
1086
1085
|
}) {
|
|
1087
|
-
const l = t in
|
|
1086
|
+
const l = t in Me ? Me[t] : void 0;
|
|
1088
1087
|
return /* @__PURE__ */ e(
|
|
1089
1088
|
"span",
|
|
1090
1089
|
{
|
|
@@ -1095,7 +1094,7 @@ function ps({
|
|
|
1095
1094
|
// An undeclared channel used to collapse onto the neutral "note" tone,
|
|
1096
1095
|
// which is also what a real internal note looks like. Deriving from the
|
|
1097
1096
|
// key keeps it distinguishable and keeps `note` meaning `note`.
|
|
1098
|
-
l ? i(l.fg, l.bg) : t ? at(t) : i(
|
|
1097
|
+
l ? i(l.fg, l.bg) : t ? at(t) : i(Me.note.fg, Me.note.bg),
|
|
1099
1098
|
s
|
|
1100
1099
|
),
|
|
1101
1100
|
children: r
|
|
@@ -1118,15 +1117,15 @@ const vs = ({
|
|
|
1118
1117
|
onError: b,
|
|
1119
1118
|
...g
|
|
1120
1119
|
}) => {
|
|
1121
|
-
const [w, p] = R(!0), [h, C] = R(!1), [z,
|
|
1122
|
-
p(!1), C(!1), f?.(
|
|
1123
|
-
},
|
|
1120
|
+
const [w, p] = R(!0), [h, C] = R(!1), [z, O] = R(t), $ = (Z) => {
|
|
1121
|
+
p(!1), C(!1), f?.(Z);
|
|
1122
|
+
}, G = (Z) => {
|
|
1124
1123
|
if (p(!1), C(!0), u && z !== u) {
|
|
1125
|
-
|
|
1124
|
+
O(u), C(!1), p(!0);
|
|
1126
1125
|
return;
|
|
1127
1126
|
}
|
|
1128
|
-
b?.(
|
|
1129
|
-
},
|
|
1127
|
+
b?.(Z);
|
|
1128
|
+
}, j = i(
|
|
1130
1129
|
"relative overflow-hidden bg-surface-hover",
|
|
1131
1130
|
// Size variants
|
|
1132
1131
|
{
|
|
@@ -1154,30 +1153,30 @@ const vs = ({
|
|
|
1154
1153
|
"rounded-full": a === "full"
|
|
1155
1154
|
},
|
|
1156
1155
|
m
|
|
1157
|
-
),
|
|
1156
|
+
), W = i("w-full h-full object-cover transition-opacity duration-fast", {
|
|
1158
1157
|
"opacity-0": w || h,
|
|
1159
1158
|
"opacity-100": !w && !h
|
|
1160
1159
|
}), B = i(
|
|
1161
1160
|
"absolute inset-0 flex items-center justify-center",
|
|
1162
1161
|
"text-text-muted"
|
|
1163
|
-
),
|
|
1162
|
+
), U = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), ee = /* @__PURE__ */ c("div", { className: "text-center", children: [
|
|
1164
1163
|
/* @__PURE__ */ e(J, { icon: zt, size: "lg", className: "mx-auto mb-1" }),
|
|
1165
1164
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
|
|
1166
1165
|
] });
|
|
1167
|
-
return /* @__PURE__ */ c("div", { className:
|
|
1166
|
+
return /* @__PURE__ */ c("div", { className: j, children: [
|
|
1168
1167
|
/* @__PURE__ */ e(
|
|
1169
1168
|
"img",
|
|
1170
1169
|
{
|
|
1171
1170
|
...g,
|
|
1172
1171
|
src: z,
|
|
1173
1172
|
alt: r,
|
|
1174
|
-
className:
|
|
1175
|
-
onLoad:
|
|
1176
|
-
onError:
|
|
1173
|
+
className: W,
|
|
1174
|
+
onLoad: $,
|
|
1175
|
+
onError: G
|
|
1177
1176
|
}
|
|
1178
1177
|
),
|
|
1179
|
-
w && l && /* @__PURE__ */ e("div", { className: B, children: d ||
|
|
1180
|
-
h && o && /* @__PURE__ */ e("div", { className: B, children: v ||
|
|
1178
|
+
w && l && /* @__PURE__ */ e("div", { className: B, children: d || U }),
|
|
1179
|
+
h && o && /* @__PURE__ */ e("div", { className: B, children: v || ee })
|
|
1181
1180
|
] });
|
|
1182
1181
|
}, zr = {
|
|
1183
1182
|
default: "text-text",
|
|
@@ -1200,7 +1199,7 @@ const Mr = {
|
|
|
1200
1199
|
md: "min-h-control-md",
|
|
1201
1200
|
lg: "min-h-control-lg",
|
|
1202
1201
|
full: "min-h-control-md"
|
|
1203
|
-
},
|
|
1202
|
+
}, _r = {
|
|
1204
1203
|
sm: "text-sm",
|
|
1205
1204
|
md: "text-base",
|
|
1206
1205
|
lg: "text-md",
|
|
@@ -1259,7 +1258,7 @@ const Mr = {
|
|
|
1259
1258
|
className: i(
|
|
1260
1259
|
"cursor-pointer",
|
|
1261
1260
|
g ? "text-danger-fg" : "text-text",
|
|
1262
|
-
|
|
1261
|
+
_r[s],
|
|
1263
1262
|
o
|
|
1264
1263
|
),
|
|
1265
1264
|
children: t
|
|
@@ -1316,31 +1315,31 @@ function ws({
|
|
|
1316
1315
|
hideGroupCount: h = !1,
|
|
1317
1316
|
selectable: C = !1,
|
|
1318
1317
|
selectedItems: z = [],
|
|
1319
|
-
onSelectionChange:
|
|
1320
|
-
bulkActions:
|
|
1321
|
-
header:
|
|
1322
|
-
stickyHeader:
|
|
1323
|
-
bordered:
|
|
1318
|
+
onSelectionChange: O,
|
|
1319
|
+
bulkActions: $,
|
|
1320
|
+
header: G,
|
|
1321
|
+
stickyHeader: j = !1,
|
|
1322
|
+
bordered: W = !1,
|
|
1324
1323
|
emptyContent: B,
|
|
1325
|
-
loading:
|
|
1326
|
-
loadingRows:
|
|
1327
|
-
className:
|
|
1324
|
+
loading: U = !1,
|
|
1325
|
+
loadingRows: ee = 4,
|
|
1326
|
+
className: Z,
|
|
1328
1327
|
"aria-label": de
|
|
1329
1328
|
}) {
|
|
1330
|
-
const [
|
|
1329
|
+
const [Y, y] = ae.useState(
|
|
1331
1330
|
() => Object.fromEntries((b ?? []).filter((k) => k.defaultCollapsed).map((k) => [k.id, !0]))
|
|
1332
1331
|
), x = ae.useRef(null), S = (k) => {
|
|
1333
1332
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(k.key)) return;
|
|
1334
|
-
const
|
|
1333
|
+
const K = Array.from(
|
|
1335
1334
|
x.current?.querySelectorAll("li[data-list-row]") ?? []
|
|
1336
1335
|
);
|
|
1337
|
-
if (
|
|
1336
|
+
if (K.length === 0) return;
|
|
1338
1337
|
k.preventDefault();
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
},
|
|
1342
|
-
|
|
1343
|
-
},
|
|
1338
|
+
const P = K.indexOf(document.activeElement), N = k.key === "Home" ? 0 : k.key === "End" ? K.length - 1 : k.key === "ArrowDown" ? (P + 1) % K.length : (P - 1 + K.length) % K.length;
|
|
1339
|
+
K[N]?.focus();
|
|
1340
|
+
}, A = (k, M) => r ? r(k, M) : M, E = (k) => z.includes(k), D = (k, M) => {
|
|
1341
|
+
O && O(M ? [...z, k] : z.filter((K) => K !== k));
|
|
1342
|
+
}, T = (k) => O?.(k ? [...t] : []), oe = i(
|
|
1344
1343
|
"flex flex-col",
|
|
1345
1344
|
// With a selection open the list has a dock at its foot. Sticky can only
|
|
1346
1345
|
// park at the bottom of its own box, so on a list shorter than the window
|
|
@@ -1349,11 +1348,11 @@ function ws({
|
|
|
1349
1348
|
// belongs — and only while a selection exists, so an ordinary short list
|
|
1350
1349
|
// keeps its natural height.
|
|
1351
1350
|
C && z.length > 0 && "min-h-full",
|
|
1352
|
-
|
|
1353
|
-
|
|
1351
|
+
W && "overflow-hidden rounded-lg border border-border-subtle",
|
|
1352
|
+
Z
|
|
1354
1353
|
);
|
|
1355
|
-
if (
|
|
1356
|
-
return /* @__PURE__ */ e("div", { className: oe, children: Array.from({ length:
|
|
1354
|
+
if (U)
|
|
1355
|
+
return /* @__PURE__ */ e("div", { className: oe, children: Array.from({ length: ee }).map((k, M) => /* @__PURE__ */ c(
|
|
1357
1356
|
"div",
|
|
1358
1357
|
{
|
|
1359
1358
|
className: i(
|
|
@@ -1371,8 +1370,8 @@ function ws({
|
|
|
1371
1370
|
)) });
|
|
1372
1371
|
if (t.length === 0 && B)
|
|
1373
1372
|
return /* @__PURE__ */ e("div", { className: oe, children: B });
|
|
1374
|
-
const ce = t.length > 0 && z.length === t.length, q = z.length > 0 && !ce, H = (k, M,
|
|
1375
|
-
const
|
|
1373
|
+
const ce = t.length > 0 && z.length === t.length, q = z.length > 0 && !ce, H = (k, M, K) => {
|
|
1374
|
+
const P = d?.(k, M) ?? !1, N = v?.(k, M) ?? !1, I = m?.(k, M) ?? !1, te = C && E(k);
|
|
1376
1375
|
return /* @__PURE__ */ c(
|
|
1377
1376
|
"li",
|
|
1378
1377
|
{
|
|
@@ -1380,7 +1379,7 @@ function ws({
|
|
|
1380
1379
|
role: "button",
|
|
1381
1380
|
tabIndex: 0,
|
|
1382
1381
|
"data-list-row": "",
|
|
1383
|
-
"aria-current":
|
|
1382
|
+
"aria-current": P || void 0,
|
|
1384
1383
|
onClick: () => o(k, M),
|
|
1385
1384
|
onFocus: () => u?.(M),
|
|
1386
1385
|
onKeyDown: (le) => {
|
|
@@ -1391,12 +1390,12 @@ function ws({
|
|
|
1391
1390
|
"flex items-center gap-3 text-base",
|
|
1392
1391
|
"transition-colors duration-fast ease-out",
|
|
1393
1392
|
n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
|
|
1394
|
-
n === "divided" && !
|
|
1393
|
+
n === "divided" && !K && "border-t border-border-subtle",
|
|
1395
1394
|
o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
|
|
1396
1395
|
// An unread row is tinted, not bolded: at five columns a bold row
|
|
1397
1396
|
// shouts across all of them, while the tint marks the row and leaves
|
|
1398
1397
|
// the consumer free to weight only the sender and the subject.
|
|
1399
|
-
|
|
1398
|
+
P || te ? "bg-accent-soft text-text" : N ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
|
|
1400
1399
|
// Read rows stay at full opacity — fading them also fades the avatars
|
|
1401
1400
|
// and team dots, which is exactly the identity you scan by. They read
|
|
1402
1401
|
// as secondary through weight and text colour instead.
|
|
@@ -1423,41 +1422,41 @@ function ws({
|
|
|
1423
1422
|
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(k, M) })
|
|
1424
1423
|
]
|
|
1425
1424
|
},
|
|
1426
|
-
|
|
1425
|
+
A(k, M)
|
|
1427
1426
|
);
|
|
1428
1427
|
}, L = (() => {
|
|
1429
1428
|
if (!f)
|
|
1430
|
-
return t.map((
|
|
1429
|
+
return t.map((P, N) => H(P, N, N === 0));
|
|
1431
1430
|
const k = /* @__PURE__ */ new Map();
|
|
1432
|
-
t.forEach((
|
|
1433
|
-
const I = f(
|
|
1434
|
-
k.has(I) || k.set(I, []), k.get(I)
|
|
1431
|
+
t.forEach((P, N) => {
|
|
1432
|
+
const I = f(P, N);
|
|
1433
|
+
k.has(I) || k.set(I, []), k.get(I)?.push({ item: P, index: N });
|
|
1435
1434
|
});
|
|
1436
1435
|
const M = b ?? [];
|
|
1437
1436
|
return [
|
|
1438
|
-
...M.filter((
|
|
1439
|
-
...[...k.keys()].filter((
|
|
1440
|
-
].flatMap((
|
|
1441
|
-
const I = k.get(
|
|
1437
|
+
...M.filter((P) => k.has(P.id)),
|
|
1438
|
+
...[...k.keys()].filter((P) => !M.some((N) => N.id === P)).map((P) => ({ id: P }))
|
|
1439
|
+
].flatMap((P, N) => {
|
|
1440
|
+
const I = k.get(P.id) ?? [], te = p && Y[P.id], le = P.title ?? P.id, be = P.count ?? I.length, ye = /* @__PURE__ */ e(
|
|
1442
1441
|
"li",
|
|
1443
1442
|
{
|
|
1444
|
-
onClick: p ? () => y((
|
|
1443
|
+
onClick: p ? () => y((he) => ({ ...he, [P.id]: !he[P.id] })) : void 0,
|
|
1445
1444
|
className: i(
|
|
1446
1445
|
// A caption over its rows, not a band across the table: same
|
|
1447
1446
|
// surface as the rows, no rules, and the count as a quiet pill.
|
|
1448
1447
|
// The old grey uppercase strip read as a second column header.
|
|
1449
1448
|
"flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
|
|
1450
1449
|
N > 0 ? "pt-5" : "pt-3",
|
|
1451
|
-
|
|
1450
|
+
P.tone === "danger" ? "text-danger-fg" : P.tone === "muted" ? "text-text-subtle" : "text-text",
|
|
1452
1451
|
w && "sticky z-10",
|
|
1453
1452
|
p && "cursor-pointer select-none"
|
|
1454
1453
|
),
|
|
1455
1454
|
"aria-expanded": p ? !te : void 0,
|
|
1456
|
-
style: w ? { top:
|
|
1455
|
+
style: w ? { top: j ? 28 : 0 } : void 0,
|
|
1457
1456
|
children: g ? g(
|
|
1458
|
-
|
|
1459
|
-
I.map((
|
|
1460
|
-
) : /* @__PURE__ */ c(
|
|
1457
|
+
P,
|
|
1458
|
+
I.map((he) => he.item)
|
|
1459
|
+
) : /* @__PURE__ */ c(Ae, { children: [
|
|
1461
1460
|
p && /* @__PURE__ */ e(
|
|
1462
1461
|
Ie,
|
|
1463
1462
|
{
|
|
@@ -1474,23 +1473,23 @@ function ws({
|
|
|
1474
1473
|
{
|
|
1475
1474
|
className: i(
|
|
1476
1475
|
"rounded-full px-2 text-xs font-normal tabular-nums",
|
|
1477
|
-
|
|
1476
|
+
P.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
|
|
1478
1477
|
),
|
|
1479
1478
|
children: be
|
|
1480
1479
|
}
|
|
1481
1480
|
)
|
|
1482
1481
|
] })
|
|
1483
1482
|
},
|
|
1484
|
-
`group-${
|
|
1483
|
+
`group-${P.id}`
|
|
1485
1484
|
);
|
|
1486
1485
|
return te ? [ye] : [
|
|
1487
1486
|
ye,
|
|
1488
|
-
...I.map(({ item:
|
|
1487
|
+
...I.map(({ item: he, index: xe }, Pe) => H(he, xe, Pe === 0))
|
|
1489
1488
|
];
|
|
1490
1489
|
});
|
|
1491
1490
|
})();
|
|
1492
1491
|
return /* @__PURE__ */ c("div", { ref: x, className: oe, onKeyDown: o ? S : void 0, children: [
|
|
1493
|
-
|
|
1492
|
+
G && /* @__PURE__ */ c(
|
|
1494
1493
|
"div",
|
|
1495
1494
|
{
|
|
1496
1495
|
className: i(
|
|
@@ -1498,7 +1497,7 @@ function ws({
|
|
|
1498
1497
|
// sticky group headers park against.
|
|
1499
1498
|
"flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
|
|
1500
1499
|
"text-xs font-semibold uppercase tracking-wider text-text-disabled",
|
|
1501
|
-
|
|
1500
|
+
j && "sticky top-0 z-20"
|
|
1502
1501
|
),
|
|
1503
1502
|
children: [
|
|
1504
1503
|
C && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
|
|
@@ -1506,11 +1505,11 @@ function ws({
|
|
|
1506
1505
|
{
|
|
1507
1506
|
checked: ce,
|
|
1508
1507
|
indeterminate: q,
|
|
1509
|
-
onChange: (k) =>
|
|
1508
|
+
onChange: (k) => T(k.target.checked),
|
|
1510
1509
|
"aria-label": "Alles selecteren"
|
|
1511
1510
|
}
|
|
1512
1511
|
) }),
|
|
1513
|
-
|
|
1512
|
+
G
|
|
1514
1513
|
]
|
|
1515
1514
|
}
|
|
1516
1515
|
),
|
|
@@ -1521,13 +1520,13 @@ function ws({
|
|
|
1521
1520
|
" geselecteerd"
|
|
1522
1521
|
] }),
|
|
1523
1522
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
1524
|
-
|
|
1523
|
+
$,
|
|
1525
1524
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
|
|
1526
1525
|
/* @__PURE__ */ e(
|
|
1527
1526
|
"button",
|
|
1528
1527
|
{
|
|
1529
1528
|
type: "button",
|
|
1530
|
-
onClick: () =>
|
|
1529
|
+
onClick: () => O?.([]),
|
|
1531
1530
|
"aria-label": "Selectie wissen",
|
|
1532
1531
|
className: "grid size-tile-md shrink-0 cursor-pointer place-items-center rounded-md transition-colors duration-fast ease-out hover:bg-white/15 focus-visible:outline-none focus-visible:focus-ring",
|
|
1533
1532
|
children: /* @__PURE__ */ e(Se, { className: "size-icon-lg" })
|
|
@@ -1589,7 +1588,7 @@ function Ss() {
|
|
|
1589
1588
|
return /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 text-text-disabled", children: "·" });
|
|
1590
1589
|
}
|
|
1591
1590
|
const me = ({ className: t }) => /* @__PURE__ */ e("span", { className: i("block rounded-xs bg-surface-hover", t) });
|
|
1592
|
-
function
|
|
1591
|
+
function $r({
|
|
1593
1592
|
shape: t,
|
|
1594
1593
|
rows: r,
|
|
1595
1594
|
columns: n
|
|
@@ -1649,7 +1648,6 @@ function _r({
|
|
|
1649
1648
|
] }, a))
|
|
1650
1649
|
}
|
|
1651
1650
|
);
|
|
1652
|
-
case "text":
|
|
1653
1651
|
default:
|
|
1654
1652
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-6", children: [
|
|
1655
1653
|
/* @__PURE__ */ e(me, { className: "h-6 w-1/4" }),
|
|
@@ -1657,7 +1655,7 @@ function _r({
|
|
|
1657
1655
|
] });
|
|
1658
1656
|
}
|
|
1659
1657
|
}
|
|
1660
|
-
const
|
|
1658
|
+
const Ar = {
|
|
1661
1659
|
text: 2,
|
|
1662
1660
|
table: 8,
|
|
1663
1661
|
list: 6,
|
|
@@ -1676,7 +1674,7 @@ function qe({
|
|
|
1676
1674
|
tableColumns: u,
|
|
1677
1675
|
tableRows: d
|
|
1678
1676
|
}) {
|
|
1679
|
-
const v = r ?? (o ? "table" : "text"), m = n ?? d ??
|
|
1677
|
+
const v = r ?? (o ? "table" : "text"), m = n ?? d ?? Ar[v], f = s ?? u ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e($r, { shape: v, rows: m, columns: f }) });
|
|
1680
1678
|
return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
|
|
1681
1679
|
}
|
|
1682
1680
|
const Dr = ({
|
|
@@ -1694,17 +1692,17 @@ const Dr = ({
|
|
|
1694
1692
|
onTitleChange: f
|
|
1695
1693
|
}) => {
|
|
1696
1694
|
const [b, g] = R(!1), [w, p] = R(r), h = ne(null);
|
|
1697
|
-
|
|
1695
|
+
X(() => {
|
|
1698
1696
|
p(r);
|
|
1699
|
-
}, [r]),
|
|
1697
|
+
}, [r]), X(() => {
|
|
1700
1698
|
b && h.current && (h.current.focus(), h.current.select());
|
|
1701
1699
|
}, [b]);
|
|
1702
1700
|
const C = () => {
|
|
1703
1701
|
m && g(!0);
|
|
1704
1702
|
}, z = () => {
|
|
1705
1703
|
g(!1), w.trim() !== "" && w !== r && f ? f(w.trim()) : p(r);
|
|
1706
|
-
},
|
|
1707
|
-
|
|
1704
|
+
}, O = ($) => {
|
|
1705
|
+
$.key === "Enter" ? h.current?.blur() : $.key === "Escape" && (p(r), g(!1));
|
|
1708
1706
|
};
|
|
1709
1707
|
return /* @__PURE__ */ c(
|
|
1710
1708
|
"div",
|
|
@@ -1728,7 +1726,7 @@ const Dr = ({
|
|
|
1728
1726
|
{
|
|
1729
1727
|
variant: "ghost",
|
|
1730
1728
|
onClick: v,
|
|
1731
|
-
leftIcon: /* @__PURE__ */ e(J, { icon:
|
|
1729
|
+
leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "md" }),
|
|
1732
1730
|
iconOnly: !0
|
|
1733
1731
|
}
|
|
1734
1732
|
),
|
|
@@ -1739,9 +1737,9 @@ const Dr = ({
|
|
|
1739
1737
|
ref: h,
|
|
1740
1738
|
type: "text",
|
|
1741
1739
|
value: w,
|
|
1742
|
-
onChange: (
|
|
1740
|
+
onChange: ($) => p($.target.value),
|
|
1743
1741
|
onBlur: z,
|
|
1744
|
-
onKeyDown:
|
|
1742
|
+
onKeyDown: O,
|
|
1745
1743
|
className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
|
|
1746
1744
|
}
|
|
1747
1745
|
) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
|
|
@@ -1784,29 +1782,29 @@ const Dr = ({
|
|
|
1784
1782
|
] })
|
|
1785
1783
|
] }) }),
|
|
1786
1784
|
a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
|
|
1787
|
-
(
|
|
1785
|
+
($) => $.render ? /* @__PURE__ */ e(ae.Fragment, { children: $.render() }, $.id) : $.splitOptions && $.splitOptions.length > 0 ? /* @__PURE__ */ e(
|
|
1788
1786
|
nt,
|
|
1789
1787
|
{
|
|
1790
|
-
label:
|
|
1791
|
-
onClick:
|
|
1792
|
-
icon:
|
|
1793
|
-
variant:
|
|
1794
|
-
options:
|
|
1795
|
-
disabled:
|
|
1788
|
+
label: $.label,
|
|
1789
|
+
onClick: $.onClick,
|
|
1790
|
+
icon: $.icon,
|
|
1791
|
+
variant: $.variant === "primary" ? "primary" : "outline",
|
|
1792
|
+
options: $.splitOptions,
|
|
1793
|
+
disabled: $.disabled
|
|
1796
1794
|
},
|
|
1797
|
-
|
|
1795
|
+
$.id
|
|
1798
1796
|
) : /* @__PURE__ */ e(
|
|
1799
1797
|
se,
|
|
1800
1798
|
{
|
|
1801
|
-
variant:
|
|
1802
|
-
onClick: (
|
|
1803
|
-
|
|
1799
|
+
variant: $.variant ?? "secondary",
|
|
1800
|
+
onClick: (G) => {
|
|
1801
|
+
G.stopPropagation(), G.target.blur(), $.onClick();
|
|
1804
1802
|
},
|
|
1805
|
-
disabled:
|
|
1806
|
-
leftIcon:
|
|
1807
|
-
children:
|
|
1803
|
+
disabled: $.disabled,
|
|
1804
|
+
leftIcon: $.icon,
|
|
1805
|
+
children: $.label
|
|
1808
1806
|
},
|
|
1809
|
-
|
|
1807
|
+
$.id
|
|
1810
1808
|
)
|
|
1811
1809
|
) })
|
|
1812
1810
|
] }),
|
|
@@ -1927,7 +1925,7 @@ const Dr = ({
|
|
|
1927
1925
|
variant: "secondary",
|
|
1928
1926
|
onClick: r,
|
|
1929
1927
|
"aria-label": n,
|
|
1930
|
-
leftIcon: /* @__PURE__ */ e(J, { icon:
|
|
1928
|
+
leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "sm" }),
|
|
1931
1929
|
iconOnly: !0
|
|
1932
1930
|
}
|
|
1933
1931
|
),
|
|
@@ -1957,11 +1955,11 @@ function Ts({
|
|
|
1957
1955
|
r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
|
|
1958
1956
|
] });
|
|
1959
1957
|
}
|
|
1960
|
-
const ot = et(null),
|
|
1961
|
-
function
|
|
1958
|
+
const ot = et(null), _s = ot.Provider;
|
|
1959
|
+
function Or() {
|
|
1962
1960
|
return Nt(ot);
|
|
1963
1961
|
}
|
|
1964
|
-
function
|
|
1962
|
+
function $s() {
|
|
1965
1963
|
const [t, r] = R(null), n = pe(
|
|
1966
1964
|
() => ({
|
|
1967
1965
|
setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
|
|
@@ -1970,13 +1968,13 @@ function _s() {
|
|
|
1970
1968
|
);
|
|
1971
1969
|
return { trail: t?.entry ?? null, api: n };
|
|
1972
1970
|
}
|
|
1973
|
-
const
|
|
1971
|
+
const Pr = {
|
|
1974
1972
|
none: "",
|
|
1975
1973
|
sm: "px-3 py-3",
|
|
1976
1974
|
// Matches the frame header's own horizontal padding, so content lines up
|
|
1977
1975
|
// with the title above it.
|
|
1978
1976
|
md: "px-5 py-4"
|
|
1979
|
-
},
|
|
1977
|
+
}, As = ({
|
|
1980
1978
|
children: t,
|
|
1981
1979
|
actions: r = [],
|
|
1982
1980
|
secondaryActions: n = [],
|
|
@@ -1990,37 +1988,39 @@ const Or = {
|
|
|
1990
1988
|
className: m,
|
|
1991
1989
|
contentClassName: f
|
|
1992
1990
|
}) => {
|
|
1993
|
-
const b =
|
|
1991
|
+
const b = Or(), g = yt(), w = ne(a);
|
|
1994
1992
|
w.current = a;
|
|
1995
1993
|
const p = !!a, h = ne(r);
|
|
1996
1994
|
h.current = r;
|
|
1997
1995
|
const C = ne(n);
|
|
1998
1996
|
C.current = n;
|
|
1999
|
-
const z = s === "header",
|
|
1997
|
+
const z = s === "header", O = z && (r.length > 0 || n.length > 0);
|
|
1998
|
+
O && JSON.stringify(
|
|
2000
1999
|
[...n, ...r].map((j) => [j.id, j.label, j.variant, j.disabled])
|
|
2001
|
-
)
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2000
|
+
);
|
|
2001
|
+
const $ = pe(() => {
|
|
2002
|
+
if (!O) return;
|
|
2003
|
+
const j = (W) => (B, U) => ({
|
|
2004
|
+
...B,
|
|
2005
2005
|
onClick: () => {
|
|
2006
|
-
(
|
|
2006
|
+
(W === "primary" ? h.current : C.current)[U]?.onClick();
|
|
2007
2007
|
}
|
|
2008
2008
|
});
|
|
2009
2009
|
return {
|
|
2010
2010
|
actions: h.current.map(j("primary")),
|
|
2011
2011
|
secondaryActions: C.current.map(j("secondary"))
|
|
2012
2012
|
};
|
|
2013
|
-
}, [
|
|
2014
|
-
|
|
2015
|
-
if (b && !(!p && !o &&
|
|
2013
|
+
}, [O]);
|
|
2014
|
+
X(() => {
|
|
2015
|
+
if (b && !(!p && !o && !$))
|
|
2016
2016
|
return b.setTrail(g, {
|
|
2017
2017
|
title: o,
|
|
2018
2018
|
onBack: p ? () => w.current?.() : void 0,
|
|
2019
|
-
actions:
|
|
2020
|
-
secondaryActions:
|
|
2019
|
+
actions: $?.actions,
|
|
2020
|
+
secondaryActions: $?.secondaryActions
|
|
2021
2021
|
}), () => b.setTrail(g, null);
|
|
2022
|
-
}, [b, g, o, p,
|
|
2023
|
-
const
|
|
2022
|
+
}, [b, g, o, p, $]);
|
|
2023
|
+
const G = !z && (r.length > 0 || n.length > 0);
|
|
2024
2024
|
return (
|
|
2025
2025
|
/**
|
|
2026
2026
|
* `min-h-full` + a sticky footer, rather than a nested scroll container.
|
|
@@ -2029,14 +2029,14 @@ const Or = {
|
|
|
2029
2029
|
* its footer to the bottom, and a long one keeps it pinned while scrolling.
|
|
2030
2030
|
*/
|
|
2031
2031
|
/* @__PURE__ */ c("div", { className: i("flex min-h-full flex-col", m), children: [
|
|
2032
|
-
!b && (p || o ||
|
|
2032
|
+
!b && (p || o || O) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
|
|
2033
2033
|
p && /* @__PURE__ */ e(
|
|
2034
2034
|
se,
|
|
2035
2035
|
{
|
|
2036
2036
|
variant: "ghost",
|
|
2037
2037
|
onClick: () => w.current?.(),
|
|
2038
2038
|
"aria-label": l,
|
|
2039
|
-
leftIcon: /* @__PURE__ */ e(J, { icon:
|
|
2039
|
+
leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "sm" }),
|
|
2040
2040
|
iconOnly: !0
|
|
2041
2041
|
}
|
|
2042
2042
|
),
|
|
@@ -2046,8 +2046,8 @@ const Or = {
|
|
|
2046
2046
|
r.length > 0 && /* @__PURE__ */ e(ke, { actions: r })
|
|
2047
2047
|
] })
|
|
2048
2048
|
] }),
|
|
2049
|
-
/* @__PURE__ */ e("div", { className: i("flex-1",
|
|
2050
|
-
|
|
2049
|
+
/* @__PURE__ */ e("div", { className: i("flex-1", Pr[v], f), children: u ? /* @__PURE__ */ e(qe, { variant: "inline", shape: d }) : t }),
|
|
2050
|
+
G && /* @__PURE__ */ c("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
|
|
2051
2051
|
n.length > 0 && /* @__PURE__ */ e(ke, { actions: n, defaultVariant: "ghost" }),
|
|
2052
2052
|
r.length > 0 && /* @__PURE__ */ e(ke, { actions: r, className: "ml-auto" })
|
|
2053
2053
|
] })
|
|
@@ -2126,7 +2126,7 @@ function Is({ label: t, dotColor: r, onClick: n, className: s }) {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
);
|
|
2128
2128
|
}
|
|
2129
|
-
const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }), Fr = () => /* @__PURE__ */ e(J, { icon:
|
|
2129
|
+
const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }), Fr = () => /* @__PURE__ */ e(J, { icon: Ee, size: "md", color: "current" }), Rr = () => /* @__PURE__ */ e(J, { icon: Ie, size: "md", color: "current" }), Be = ve(
|
|
2130
2130
|
({
|
|
2131
2131
|
value: t,
|
|
2132
2132
|
onChange: r,
|
|
@@ -2140,8 +2140,8 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2140
2140
|
format: v = "MM/dd/yyyy",
|
|
2141
2141
|
withTime: m = !1
|
|
2142
2142
|
}, f) => {
|
|
2143
|
-
const [b, g] = R(!1), [w, p] = R(() => t || /* @__PURE__ */ new Date()), h = ne(null), C = ne(null), z =
|
|
2144
|
-
|
|
2143
|
+
const [b, g] = R(!1), [w, p] = R(() => t || /* @__PURE__ */ new Date()), h = ne(null), C = ne(null), z = Oe(b, C);
|
|
2144
|
+
X(() => {
|
|
2145
2145
|
const y = (x) => {
|
|
2146
2146
|
h.current && !h.current.contains(x.target) && g(!1);
|
|
2147
2147
|
};
|
|
@@ -2149,23 +2149,23 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2149
2149
|
document.removeEventListener("mousedown", y);
|
|
2150
2150
|
};
|
|
2151
2151
|
}, [b]);
|
|
2152
|
-
const
|
|
2152
|
+
const O = (y) => {
|
|
2153
2153
|
if (!y) return "";
|
|
2154
|
-
const x = y.getDate().toString().padStart(2, "0"), S = (y.getMonth() + 1).toString().padStart(2, "0"),
|
|
2155
|
-
return m ? `${E} ${
|
|
2156
|
-
},
|
|
2154
|
+
const x = y.getDate().toString().padStart(2, "0"), S = (y.getMonth() + 1).toString().padStart(2, "0"), A = y.getFullYear(), E = v === "dd/MM/yyyy" ? `${x}/${S}/${A}` : v === "yyyy-MM-dd" ? `${A}-${S}-${x}` : `${S}/${x}/${A}`;
|
|
2155
|
+
return m ? `${E} ${$(y)}` : E;
|
|
2156
|
+
}, $ = (y) => `${y.getHours().toString().padStart(2, "0")}:${y.getMinutes().toString().padStart(2, "0")}`, G = (y) => {
|
|
2157
2157
|
const [x, S] = y.split(":").map(Number);
|
|
2158
2158
|
if (Number.isNaN(x) || Number.isNaN(S)) return;
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2161
|
-
},
|
|
2162
|
-
const y = w.getFullYear(), x = w.getMonth(), S = new Date(y, x, 1),
|
|
2163
|
-
|
|
2164
|
-
const E = [], D = new Date(
|
|
2165
|
-
for (let
|
|
2159
|
+
const A = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
2160
|
+
A.setHours(x, S, 0, 0), r?.(A);
|
|
2161
|
+
}, j = () => {
|
|
2162
|
+
const y = w.getFullYear(), x = w.getMonth(), S = new Date(y, x, 1), A = new Date(S);
|
|
2163
|
+
A.setDate(A.getDate() - S.getDay());
|
|
2164
|
+
const E = [], D = new Date(A);
|
|
2165
|
+
for (let T = 0; T < 42; T++)
|
|
2166
2166
|
E.push(new Date(D)), D.setDate(D.getDate() + 1);
|
|
2167
2167
|
return E;
|
|
2168
|
-
},
|
|
2168
|
+
}, W = (y) => {
|
|
2169
2169
|
if (y.getMonth() === w.getMonth() && !(u && y < u) && !(d && y > d)) {
|
|
2170
2170
|
if (m) {
|
|
2171
2171
|
const S = new Date(y);
|
|
@@ -2176,11 +2176,11 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2176
2176
|
}
|
|
2177
2177
|
}, B = () => {
|
|
2178
2178
|
p(new Date(w.getFullYear(), w.getMonth() - 1, 1));
|
|
2179
|
-
},
|
|
2179
|
+
}, U = () => {
|
|
2180
2180
|
p(new Date(w.getFullYear(), w.getMonth() + 1, 1));
|
|
2181
|
-
},
|
|
2181
|
+
}, ee = () => {
|
|
2182
2182
|
r?.(null), g(!1);
|
|
2183
|
-
},
|
|
2183
|
+
}, Z = i(
|
|
2184
2184
|
"w-full border border-border-strong rounded-tile transition-colors duration-fast",
|
|
2185
2185
|
"bg-surface text-text",
|
|
2186
2186
|
"placeholder:text-text-muted",
|
|
@@ -2193,7 +2193,7 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2193
2193
|
"h-control-md w-full px-3 text-base": l === "full"
|
|
2194
2194
|
},
|
|
2195
2195
|
o
|
|
2196
|
-
), de =
|
|
2196
|
+
), de = j(), Y = [
|
|
2197
2197
|
"January",
|
|
2198
2198
|
"February",
|
|
2199
2199
|
"March",
|
|
@@ -2214,13 +2214,13 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2214
2214
|
{
|
|
2215
2215
|
ref: f,
|
|
2216
2216
|
type: "text",
|
|
2217
|
-
value:
|
|
2217
|
+
value: O(t ?? null),
|
|
2218
2218
|
placeholder: n,
|
|
2219
2219
|
disabled: s,
|
|
2220
2220
|
required: a,
|
|
2221
2221
|
readOnly: !0,
|
|
2222
2222
|
onClick: () => !s && g(!b),
|
|
2223
|
-
className: i(
|
|
2223
|
+
className: i(Z, "pr-10 cursor-pointer")
|
|
2224
2224
|
}
|
|
2225
2225
|
),
|
|
2226
2226
|
/* @__PURE__ */ e(
|
|
@@ -2243,24 +2243,24 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2243
2243
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
|
|
2244
2244
|
/* @__PURE__ */ e("button", { onClick: B, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Fr, {}) }),
|
|
2245
2245
|
/* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
|
|
2246
|
-
|
|
2246
|
+
Y[w.getMonth()],
|
|
2247
2247
|
" ",
|
|
2248
2248
|
w.getFullYear()
|
|
2249
2249
|
] }),
|
|
2250
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
2250
|
+
/* @__PURE__ */ e("button", { onClick: U, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Rr, {}) })
|
|
2251
2251
|
] }),
|
|
2252
2252
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((y) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: y }, y)) }),
|
|
2253
2253
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: de.map((y, x) => {
|
|
2254
|
-
const S = y.getMonth() === w.getMonth(),
|
|
2254
|
+
const S = y.getMonth() === w.getMonth(), A = t && y.toDateString() === t.toDateString(), E = y.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), D = !S || u && y < u || d && y > d;
|
|
2255
2255
|
return /* @__PURE__ */ e(
|
|
2256
2256
|
"button",
|
|
2257
2257
|
{
|
|
2258
|
-
onClick: () => !D &&
|
|
2258
|
+
onClick: () => !D && W(y),
|
|
2259
2259
|
disabled: D,
|
|
2260
2260
|
className: i("w-8 h-8 text-sm rounded transition-colors duration-fast", {
|
|
2261
|
-
"text-text hover:bg-surface-hover": S &&
|
|
2262
|
-
"bg-accent text-accent-fg":
|
|
2263
|
-
"bg-surface-hover text-text": E &&
|
|
2261
|
+
"text-text hover:bg-surface-hover": S && !A && !D,
|
|
2262
|
+
"bg-accent text-accent-fg": A,
|
|
2263
|
+
"bg-surface-hover text-text": E && !A,
|
|
2264
2264
|
"text-text-muted cursor-not-allowed": D
|
|
2265
2265
|
}),
|
|
2266
2266
|
children: y.getDate()
|
|
@@ -2275,14 +2275,14 @@ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }
|
|
|
2275
2275
|
{
|
|
2276
2276
|
id: "datepicker-time",
|
|
2277
2277
|
type: "time",
|
|
2278
|
-
value: t ?
|
|
2279
|
-
onChange: (y) =>
|
|
2278
|
+
value: t ? $(t) : "",
|
|
2279
|
+
onChange: (y) => G(y.target.value),
|
|
2280
2280
|
className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
|
|
2281
2281
|
}
|
|
2282
2282
|
)
|
|
2283
2283
|
] }),
|
|
2284
2284
|
/* @__PURE__ */ c("div", { className: "flex justify-between items-center mt-4 pt-3 border-t border-border", children: [
|
|
2285
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
2285
|
+
/* @__PURE__ */ e("button", { onClick: ee, className: "text-sm text-text-muted hover:text-text", children: "Clear" }),
|
|
2286
2286
|
/* @__PURE__ */ e(
|
|
2287
2287
|
"button",
|
|
2288
2288
|
{
|
|
@@ -2373,37 +2373,37 @@ const Br = ({
|
|
|
2373
2373
|
showCheck: u = !0,
|
|
2374
2374
|
header: d
|
|
2375
2375
|
}) => {
|
|
2376
|
-
const [v, m] = R(!1), [f, b] = R(null), [g, w] = R({ top: 0, left: 0 }), p = ne(null), h = ne(null), C = ne(null), z = ne(null),
|
|
2376
|
+
const [v, m] = R(!1), [f, b] = R(null), [g, w] = R({ top: 0, left: 0 }), p = ne(null), h = ne(null), C = ne(null), z = ne(null), O = Oe(v, h, { placement: a }), $ = ne(null), G = () => Array.from(
|
|
2377
2377
|
z.current?.querySelectorAll(
|
|
2378
2378
|
"button[data-option-value]:not(:disabled)"
|
|
2379
2379
|
) ?? []
|
|
2380
2380
|
);
|
|
2381
|
-
|
|
2382
|
-
v &&
|
|
2383
|
-
}, [v]);
|
|
2384
|
-
const
|
|
2381
|
+
X(() => {
|
|
2382
|
+
v && G()[0]?.focus();
|
|
2383
|
+
}, [v, G]);
|
|
2384
|
+
const j = (y) => {
|
|
2385
2385
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(y.key)) return;
|
|
2386
|
-
const S =
|
|
2386
|
+
const S = G();
|
|
2387
2387
|
if (S.length === 0) return;
|
|
2388
2388
|
y.preventDefault();
|
|
2389
|
-
const
|
|
2389
|
+
const A = S.indexOf(document.activeElement), E = y.key === "Home" ? 0 : y.key === "End" ? S.length - 1 : y.key === "ArrowDown" ? (A + 1) % S.length : (A - 1 + S.length) % S.length;
|
|
2390
2390
|
S[E]?.focus();
|
|
2391
2391
|
};
|
|
2392
|
-
|
|
2392
|
+
X(() => {
|
|
2393
2393
|
const y = (x) => {
|
|
2394
|
-
p.current && (!p.current.contains(x.target) || C.current && !C.current.contains(x.target)) && (m(!1), b(null),
|
|
2394
|
+
p.current && (!p.current.contains(x.target) || C.current && !C.current.contains(x.target)) && (m(!1), b(null), $.current && (clearTimeout($.current), $.current = null));
|
|
2395
2395
|
};
|
|
2396
2396
|
return v && document.addEventListener("mousedown", y), () => {
|
|
2397
2397
|
document.removeEventListener("mousedown", y);
|
|
2398
2398
|
};
|
|
2399
|
-
}, [v]),
|
|
2399
|
+
}, [v]), X(() => {
|
|
2400
2400
|
const y = (x) => {
|
|
2401
|
-
x.key === "Escape" && (m(!1), b(null), h.current?.focus(),
|
|
2401
|
+
x.key === "Escape" && (m(!1), b(null), h.current?.focus(), $.current && (clearTimeout($.current), $.current = null));
|
|
2402
2402
|
};
|
|
2403
2403
|
return v && document.addEventListener("keydown", y), () => {
|
|
2404
2404
|
document.removeEventListener("keydown", y);
|
|
2405
2405
|
};
|
|
2406
|
-
}, [v]),
|
|
2406
|
+
}, [v]), X(() => {
|
|
2407
2407
|
if (f && p.current) {
|
|
2408
2408
|
const y = p.current.querySelector(
|
|
2409
2409
|
`[data-option-value="${f}"]`
|
|
@@ -2416,25 +2416,25 @@ const Br = ({
|
|
|
2416
2416
|
});
|
|
2417
2417
|
}
|
|
2418
2418
|
}
|
|
2419
|
-
}, [f]),
|
|
2420
|
-
|
|
2419
|
+
}, [f]), X(() => () => {
|
|
2420
|
+
$.current && clearTimeout($.current);
|
|
2421
2421
|
}, []);
|
|
2422
|
-
const
|
|
2423
|
-
y.stopPropagation(), !l && (m(!v), b(null),
|
|
2422
|
+
const W = (y) => {
|
|
2423
|
+
y.stopPropagation(), !l && (m(!v), b(null), $.current && (clearTimeout($.current), $.current = null));
|
|
2424
2424
|
}, B = (y, x, S) => {
|
|
2425
2425
|
y.stopPropagation(), !x.disabled && !x.divider && (!x.children || x.children.length === 0) && (s?.(x.value, S), m(!1), b(null));
|
|
2426
|
-
},
|
|
2427
|
-
|
|
2428
|
-
},
|
|
2429
|
-
y.children && y.children.length > 0 ?
|
|
2426
|
+
}, U = (y) => {
|
|
2427
|
+
$.current && (clearTimeout($.current), $.current = null), y.children && y.children.length > 0 ? b(y.value) : b(null);
|
|
2428
|
+
}, ee = (y) => {
|
|
2429
|
+
y.children && y.children.length > 0 ? $.current = setTimeout(() => {
|
|
2430
2430
|
b(null);
|
|
2431
2431
|
}, 150) : b(null);
|
|
2432
|
-
},
|
|
2432
|
+
}, Z = (y, x, S) => {
|
|
2433
2433
|
y.stopPropagation(), !x.disabled && !x.divider && (s?.(x.value, S), m(!1), b(null));
|
|
2434
2434
|
}, de = i(
|
|
2435
2435
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
2436
2436
|
"max-h-60 overflow-auto"
|
|
2437
|
-
),
|
|
2437
|
+
), Y = i(
|
|
2438
2438
|
"fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
|
|
2439
2439
|
"max-h-60 overflow-auto"
|
|
2440
2440
|
);
|
|
@@ -2451,7 +2451,7 @@ const Br = ({
|
|
|
2451
2451
|
"button",
|
|
2452
2452
|
{
|
|
2453
2453
|
ref: h,
|
|
2454
|
-
onClick:
|
|
2454
|
+
onClick: W,
|
|
2455
2455
|
disabled: l,
|
|
2456
2456
|
"aria-haspopup": "menu",
|
|
2457
2457
|
"aria-expanded": v,
|
|
@@ -2466,14 +2466,14 @@ const Br = ({
|
|
|
2466
2466
|
{
|
|
2467
2467
|
ref: z,
|
|
2468
2468
|
className: de,
|
|
2469
|
-
style:
|
|
2470
|
-
onKeyDown:
|
|
2469
|
+
style: O,
|
|
2470
|
+
onKeyDown: j,
|
|
2471
2471
|
children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
|
|
2472
2472
|
d && (typeof d == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: d }) : d),
|
|
2473
2473
|
r.map((y, x) => {
|
|
2474
2474
|
if (y.divider)
|
|
2475
2475
|
return /* @__PURE__ */ e("div", { className: "border-t border-border my-2" }, `divider-${x}`);
|
|
2476
|
-
const S = y.children && y.children.length > 0,
|
|
2476
|
+
const S = y.children && y.children.length > 0, A = f === y.value;
|
|
2477
2477
|
return /* @__PURE__ */ c("div", { className: "relative group", children: [
|
|
2478
2478
|
/* @__PURE__ */ c(
|
|
2479
2479
|
"button",
|
|
@@ -2482,14 +2482,14 @@ const Br = ({
|
|
|
2482
2482
|
role: "menuitem",
|
|
2483
2483
|
"aria-haspopup": S ? "menu" : void 0,
|
|
2484
2484
|
onClick: (E) => B(E, y),
|
|
2485
|
-
onMouseEnter: () =>
|
|
2486
|
-
onMouseLeave: () =>
|
|
2485
|
+
onMouseEnter: () => U(y),
|
|
2486
|
+
onMouseLeave: () => ee(y),
|
|
2487
2487
|
disabled: y.disabled,
|
|
2488
2488
|
className: i(
|
|
2489
2489
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
|
|
2490
2490
|
{
|
|
2491
2491
|
"opacity-50 cursor-not-allowed": y.disabled,
|
|
2492
|
-
"bg-surface-hover":
|
|
2492
|
+
"bg-surface-hover": A && S
|
|
2493
2493
|
}
|
|
2494
2494
|
),
|
|
2495
2495
|
children: [
|
|
@@ -2507,24 +2507,24 @@ const Br = ({
|
|
|
2507
2507
|
]
|
|
2508
2508
|
}
|
|
2509
2509
|
),
|
|
2510
|
-
S &&
|
|
2510
|
+
S && A && /* @__PURE__ */ e(
|
|
2511
2511
|
"div",
|
|
2512
2512
|
{
|
|
2513
2513
|
ref: C,
|
|
2514
|
-
className:
|
|
2514
|
+
className: Y,
|
|
2515
2515
|
style: {
|
|
2516
2516
|
top: `${g.top}px`,
|
|
2517
2517
|
left: `${g.left}px`
|
|
2518
2518
|
},
|
|
2519
2519
|
onMouseEnter: () => {
|
|
2520
|
-
|
|
2520
|
+
$.current && (clearTimeout($.current), $.current = null), b(y.value);
|
|
2521
2521
|
},
|
|
2522
2522
|
onMouseLeave: () => {
|
|
2523
|
-
|
|
2523
|
+
$.current = setTimeout(() => {
|
|
2524
2524
|
b(null);
|
|
2525
2525
|
}, 150);
|
|
2526
2526
|
},
|
|
2527
|
-
children: /* @__PURE__ */ e("div", { className: "p-2", children: y.children
|
|
2527
|
+
children: /* @__PURE__ */ e("div", { className: "p-2", children: y.children?.map((E, D) => {
|
|
2528
2528
|
if (E.divider)
|
|
2529
2529
|
return /* @__PURE__ */ e(
|
|
2530
2530
|
"div",
|
|
@@ -2533,11 +2533,11 @@ const Br = ({
|
|
|
2533
2533
|
},
|
|
2534
2534
|
`divider-${D}`
|
|
2535
2535
|
);
|
|
2536
|
-
const
|
|
2536
|
+
const T = typeof n == "object" && n[y.value] && n[y.value].includes(E.value) || n === E.value;
|
|
2537
2537
|
return /* @__PURE__ */ c(
|
|
2538
2538
|
"button",
|
|
2539
2539
|
{
|
|
2540
|
-
onClick: (oe) =>
|
|
2540
|
+
onClick: (oe) => Z(oe, E, y.value),
|
|
2541
2541
|
disabled: E.disabled,
|
|
2542
2542
|
className: i(
|
|
2543
2543
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
@@ -2553,7 +2553,7 @@ const Br = ({
|
|
|
2553
2553
|
E.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: E.description })
|
|
2554
2554
|
] })
|
|
2555
2555
|
] }),
|
|
2556
|
-
u &&
|
|
2556
|
+
u && T && /* @__PURE__ */ e(
|
|
2557
2557
|
Ue,
|
|
2558
2558
|
{
|
|
2559
2559
|
className: "size-icon-md shrink-0 text-success-fg",
|
|
@@ -2572,8 +2572,8 @@ const Br = ({
|
|
|
2572
2572
|
(() => {
|
|
2573
2573
|
const y = r.reduce((x, S) => {
|
|
2574
2574
|
if (S.divider) return x;
|
|
2575
|
-
const
|
|
2576
|
-
return x + 1 +
|
|
2575
|
+
const A = S.children ? S.children.filter((E) => !E.divider).length : 0;
|
|
2576
|
+
return x + 1 + A;
|
|
2577
2577
|
}, 0);
|
|
2578
2578
|
return y > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
2579
2579
|
y,
|
|
@@ -2586,7 +2586,7 @@ const Br = ({
|
|
|
2586
2586
|
]
|
|
2587
2587
|
}
|
|
2588
2588
|
);
|
|
2589
|
-
},
|
|
2589
|
+
}, Os = (t) => (r) => t(r instanceof Date ? r : null), Ps = (t) => (r) => t(typeof r == "string" ? r : ""), js = (t) => (r) => t(Array.isArray(r) ? r : typeof r == "string" && r ? [r] : []), Hr = {
|
|
2590
2590
|
none: "px-0",
|
|
2591
2591
|
sm: "px-2",
|
|
2592
2592
|
md: "px-3.5",
|
|
@@ -2675,91 +2675,91 @@ const Wr = (t) => {
|
|
|
2675
2675
|
selectable: h = !1,
|
|
2676
2676
|
selectedRows: C = [],
|
|
2677
2677
|
onSelectionChange: z,
|
|
2678
|
-
getRowKey:
|
|
2679
|
-
emptyContent:
|
|
2680
|
-
footerSummary:
|
|
2681
|
-
size:
|
|
2682
|
-
hoverable:
|
|
2678
|
+
getRowKey: O = (de, Y) => Y,
|
|
2679
|
+
emptyContent: $,
|
|
2680
|
+
footerSummary: G,
|
|
2681
|
+
size: j = "md",
|
|
2682
|
+
hoverable: W = !0,
|
|
2683
2683
|
padding: B = "md",
|
|
2684
|
-
className:
|
|
2685
|
-
rowClassName:
|
|
2686
|
-
headerBackground:
|
|
2684
|
+
className: U,
|
|
2685
|
+
rowClassName: ee,
|
|
2686
|
+
headerBackground: Z = !0
|
|
2687
2687
|
}) => {
|
|
2688
|
-
const [de,
|
|
2688
|
+
const [de, Y] = R(""), y = l !== void 0, x = y ? l : de, S = o ?? Y, [A, E] = R({
|
|
2689
2689
|
column: null,
|
|
2690
2690
|
direction: null
|
|
2691
|
-
}), [D,
|
|
2691
|
+
}), [D, T] = R({
|
|
2692
2692
|
page: 0,
|
|
2693
2693
|
pageSize: g
|
|
2694
2694
|
}), oe = ne(null), ce = pe(() => {
|
|
2695
|
-
let
|
|
2695
|
+
let _ = t;
|
|
2696
2696
|
if (s && !y && x.trim()) {
|
|
2697
2697
|
const V = r.filter((ie) => ie.searchable !== !1), re = x.toLowerCase();
|
|
2698
|
-
|
|
2699
|
-
const F = typeof
|
|
2698
|
+
_ = _.filter((ie) => V.some((Q) => {
|
|
2699
|
+
const F = typeof Q.accessor == "function" ? Q.accessor(ie) : ie[Q.accessor];
|
|
2700
2700
|
return String(F || "").toLowerCase().includes(re);
|
|
2701
2701
|
}));
|
|
2702
2702
|
}
|
|
2703
|
-
return
|
|
2703
|
+
return _;
|
|
2704
2704
|
}, [t, x, y, r, s]), q = pe(() => {
|
|
2705
|
-
if (
|
|
2706
|
-
const
|
|
2707
|
-
return
|
|
2708
|
-
const ie = typeof
|
|
2705
|
+
if (!A.column || !A.direction) return ce;
|
|
2706
|
+
const _ = r.find((V) => V.id === A.column);
|
|
2707
|
+
return _ ? [...ce].sort((V, re) => {
|
|
2708
|
+
const ie = typeof _.accessor == "function" ? _.accessor(V) : V[_.accessor], Q = typeof _.accessor == "function" ? _.accessor(re) : re[_.accessor];
|
|
2709
2709
|
let F = 0;
|
|
2710
|
-
return ie <
|
|
2710
|
+
return ie < Q ? F = -1 : ie > Q && (F = 1), A.direction === "desc" ? -F : F;
|
|
2711
2711
|
}) : ce;
|
|
2712
|
-
}, [ce,
|
|
2712
|
+
}, [ce, A, r]), H = pe(() => {
|
|
2713
2713
|
if (!b || m) return q;
|
|
2714
|
-
const
|
|
2715
|
-
return q.slice(
|
|
2716
|
-
}, [q, D, b, m]), L =
|
|
2717
|
-
(
|
|
2718
|
-
r.find((re) => re.id ===
|
|
2714
|
+
const _ = D.page * D.pageSize, V = _ + D.pageSize;
|
|
2715
|
+
return q.slice(_, V);
|
|
2716
|
+
}, [q, D, b, m]), L = fe(
|
|
2717
|
+
(_) => {
|
|
2718
|
+
r.find((re) => re.id === _)?.sortable && E((re) => re.column !== _ ? { column: _, direction: "asc" } : re.direction === "asc" ? { column: _, direction: "desc" } : { column: null, direction: null });
|
|
2719
2719
|
},
|
|
2720
2720
|
[r]
|
|
2721
|
-
), k =
|
|
2722
|
-
|
|
2723
|
-
}, []), M =
|
|
2724
|
-
(
|
|
2721
|
+
), k = fe((_) => {
|
|
2722
|
+
T((V) => ({ ...V, page: _ }));
|
|
2723
|
+
}, []), M = fe(
|
|
2724
|
+
(_, V) => {
|
|
2725
2725
|
if (!z) return;
|
|
2726
|
-
const re =
|
|
2727
|
-
z(V ? [...C,
|
|
2726
|
+
const re = O(_, 0);
|
|
2727
|
+
z(V ? [...C, _] : C.filter((ie, Q) => O(C[Q], Q) !== re));
|
|
2728
2728
|
},
|
|
2729
|
-
[C, z,
|
|
2730
|
-
),
|
|
2731
|
-
(
|
|
2732
|
-
z && z(
|
|
2729
|
+
[C, z, O]
|
|
2730
|
+
), K = fe(
|
|
2731
|
+
(_) => {
|
|
2732
|
+
z && z(_ ? [...H] : []);
|
|
2733
2733
|
},
|
|
2734
2734
|
[H, z]
|
|
2735
2735
|
);
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
}, [
|
|
2739
|
-
|
|
2740
|
-
}, [
|
|
2741
|
-
const
|
|
2742
|
-
const V =
|
|
2743
|
-
return C.some((re, ie) =>
|
|
2744
|
-
}), be = H.some((
|
|
2745
|
-
const V =
|
|
2746
|
-
return C.some((re, ie) =>
|
|
2747
|
-
}), ye = Hr[B],
|
|
2748
|
-
const
|
|
2749
|
-
if (!m) return [{ group: null, rows:
|
|
2736
|
+
X(() => {
|
|
2737
|
+
T((_) => ({ ..._, page: 0 }));
|
|
2738
|
+
}, []), X(() => {
|
|
2739
|
+
T((_) => ({ ..._, page: 0 }));
|
|
2740
|
+
}, []);
|
|
2741
|
+
const P = q.length, N = Math.ceil(P / D.pageSize), I = D.page * D.pageSize + 1, te = Math.min(I + D.pageSize - 1, P), le = H.length > 0 && H.every((_) => {
|
|
2742
|
+
const V = O(_, 0);
|
|
2743
|
+
return C.some((re, ie) => O(re, ie) === V);
|
|
2744
|
+
}), be = H.some((_) => {
|
|
2745
|
+
const V = O(_, 0);
|
|
2746
|
+
return C.some((re, ie) => O(re, ie) === V);
|
|
2747
|
+
}), ye = Hr[B], he = Z ? "bg-surface-sunk" : "bg-surface", xe = i("text-text", ye), Pe = s || u.length > 0 || d.length > 0 || !!v, xt = pe(() => {
|
|
2748
|
+
const _ = H.map((Q, F) => ({ row: Q, index: F }));
|
|
2749
|
+
if (!m) return [{ group: null, rows: _ }];
|
|
2750
2750
|
const V = /* @__PURE__ */ new Map();
|
|
2751
|
-
for (const
|
|
2752
|
-
const F = m(
|
|
2753
|
-
ge ? ge.push(
|
|
2751
|
+
for (const Q of _) {
|
|
2752
|
+
const F = m(Q.row, Q.index), ge = V.get(F);
|
|
2753
|
+
ge ? ge.push(Q) : V.set(F, [Q]);
|
|
2754
2754
|
}
|
|
2755
2755
|
const re = f ?? [];
|
|
2756
2756
|
return [
|
|
2757
|
-
...re.filter((
|
|
2758
|
-
...[...V.keys()].filter((
|
|
2759
|
-
].map((
|
|
2760
|
-
}, [H, m, f]), bt = r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0), Ve = b &&
|
|
2761
|
-
return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col",
|
|
2762
|
-
|
|
2757
|
+
...re.filter((Q) => V.has(Q.id)),
|
|
2758
|
+
...[...V.keys()].filter((Q) => !re.some((F) => F.id === Q)).map((Q) => ({ id: Q }))
|
|
2759
|
+
].map((Q) => ({ group: Q, rows: V.get(Q.id) ?? [] }));
|
|
2760
|
+
}, [H, m, f]), bt = r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0), Ve = b && P > 0, gt = Ve || G !== void 0;
|
|
2761
|
+
return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", U), children: [
|
|
2762
|
+
Pe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
|
|
2763
2763
|
s && /* @__PURE__ */ e(
|
|
2764
2764
|
ct,
|
|
2765
2765
|
{
|
|
@@ -2769,70 +2769,70 @@ const Wr = (t) => {
|
|
|
2769
2769
|
containerClassName: "w-full sm:w-66"
|
|
2770
2770
|
}
|
|
2771
2771
|
),
|
|
2772
|
-
u.map((
|
|
2772
|
+
u.map((_) => /* @__PURE__ */ e(Wr, { ..._ }, _.id)),
|
|
2773
2773
|
v,
|
|
2774
2774
|
d.length > 0 && /* @__PURE__ */ e(ke, { actions: d, className: "ml-auto" })
|
|
2775
2775
|
] }),
|
|
2776
2776
|
/* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: oe, className: "min-w-full border-collapse text-base text-text", children: [
|
|
2777
|
-
/* @__PURE__ */ e("thead", { className: i(
|
|
2778
|
-
h && /* @__PURE__ */ e("th", { className: i(
|
|
2777
|
+
/* @__PURE__ */ e("thead", { className: i(he, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
|
|
2778
|
+
h && /* @__PURE__ */ e("th", { className: i(xe, "w-10"), children: /* @__PURE__ */ e(
|
|
2779
2779
|
we,
|
|
2780
2780
|
{
|
|
2781
2781
|
size: "sm",
|
|
2782
2782
|
checked: le,
|
|
2783
2783
|
indeterminate: be && !le,
|
|
2784
|
-
onChange: (
|
|
2784
|
+
onChange: (_) => K(_.target.checked),
|
|
2785
2785
|
"aria-label": "Select all rows"
|
|
2786
2786
|
}
|
|
2787
2787
|
) }),
|
|
2788
|
-
r.map((
|
|
2788
|
+
r.map((_) => /* @__PURE__ */ e(
|
|
2789
2789
|
"th",
|
|
2790
2790
|
{
|
|
2791
2791
|
className: i(
|
|
2792
|
-
|
|
2792
|
+
xe,
|
|
2793
2793
|
"text-xs font-semibold uppercase tracking-label text-text-muted",
|
|
2794
2794
|
"group",
|
|
2795
2795
|
{
|
|
2796
|
-
"text-left":
|
|
2797
|
-
"text-center":
|
|
2798
|
-
"text-right":
|
|
2799
|
-
"cursor-pointer select-none":
|
|
2800
|
-
[`sticky left-0 ${
|
|
2801
|
-
[`sticky right-0 ${
|
|
2796
|
+
"text-left": _.align === "left" || !_.align,
|
|
2797
|
+
"text-center": _.align === "center",
|
|
2798
|
+
"text-right": _.align === "right",
|
|
2799
|
+
"cursor-pointer select-none": _.sortable,
|
|
2800
|
+
[`sticky left-0 ${he}`]: _.sticky === "left",
|
|
2801
|
+
[`sticky right-0 ${he}`]: _.sticky === "right"
|
|
2802
2802
|
}
|
|
2803
2803
|
),
|
|
2804
|
-
style: { width:
|
|
2805
|
-
onClick: () =>
|
|
2804
|
+
style: { width: _.width },
|
|
2805
|
+
onClick: () => _.sortable && L(_.id),
|
|
2806
2806
|
children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
|
|
2807
|
-
|
|
2808
|
-
|
|
2807
|
+
_.headerCell ? _.headerCell() : _.header,
|
|
2808
|
+
_.sortable && /* @__PURE__ */ e(
|
|
2809
2809
|
J,
|
|
2810
2810
|
{
|
|
2811
|
-
icon:
|
|
2811
|
+
icon: A.column === _.id && A.direction === "desc" ? De : _t,
|
|
2812
2812
|
size: "xs",
|
|
2813
2813
|
className: i(
|
|
2814
2814
|
"transition-opacity duration-fast ease-out",
|
|
2815
|
-
|
|
2815
|
+
A.column === _.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
|
|
2816
2816
|
)
|
|
2817
2817
|
}
|
|
2818
2818
|
)
|
|
2819
2819
|
] })
|
|
2820
2820
|
},
|
|
2821
|
-
|
|
2821
|
+
_.id
|
|
2822
2822
|
)),
|
|
2823
|
-
w.length > 0 && /* @__PURE__ */ e("th", { className: i(
|
|
2823
|
+
w.length > 0 && /* @__PURE__ */ e("th", { className: i(xe, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
|
|
2824
2824
|
] }) }),
|
|
2825
|
-
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Vr }).map((
|
|
2825
|
+
/* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Vr }).map((_, V) => /* @__PURE__ */ c(
|
|
2826
2826
|
"tr",
|
|
2827
2827
|
{
|
|
2828
2828
|
className: "animate-pulse border-t border-border-subtle",
|
|
2829
2829
|
"aria-hidden": !0,
|
|
2830
2830
|
children: [
|
|
2831
|
-
h && /* @__PURE__ */ e("td", { className: i(
|
|
2831
|
+
h && /* @__PURE__ */ e("td", { className: i(xe, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
|
|
2832
2832
|
r.map((re, ie) => /* @__PURE__ */ e(
|
|
2833
2833
|
"td",
|
|
2834
2834
|
{
|
|
2835
|
-
className: i(
|
|
2835
|
+
className: i(xe, "h-row-lg"),
|
|
2836
2836
|
style: { width: re.width },
|
|
2837
2837
|
children: /* @__PURE__ */ e(
|
|
2838
2838
|
"span",
|
|
@@ -2846,7 +2846,7 @@ const Wr = (t) => {
|
|
|
2846
2846
|
},
|
|
2847
2847
|
re.id
|
|
2848
2848
|
)),
|
|
2849
|
-
w.length > 0 && /* @__PURE__ */ e("td", { className: i(
|
|
2849
|
+
w.length > 0 && /* @__PURE__ */ e("td", { className: i(xe, "h-row-lg") })
|
|
2850
2850
|
]
|
|
2851
2851
|
},
|
|
2852
2852
|
`skeleton-${V}`
|
|
@@ -2855,13 +2855,13 @@ const Wr = (t) => {
|
|
|
2855
2855
|
{
|
|
2856
2856
|
colSpan: r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0),
|
|
2857
2857
|
className: i(
|
|
2858
|
-
|
|
2858
|
+
xe,
|
|
2859
2859
|
"border-t border-border-subtle py-10 text-center text-text-muted"
|
|
2860
2860
|
),
|
|
2861
|
-
children:
|
|
2861
|
+
children: $ || "No data available"
|
|
2862
2862
|
}
|
|
2863
|
-
) }) : xt.flatMap((
|
|
2864
|
-
...
|
|
2863
|
+
) }) : xt.flatMap((_) => [
|
|
2864
|
+
..._.group ? [
|
|
2865
2865
|
/* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
2866
2866
|
"td",
|
|
2867
2867
|
{
|
|
@@ -2870,41 +2870,41 @@ const Wr = (t) => {
|
|
|
2870
2870
|
// A caption over its rows, not a second column strip:
|
|
2871
2871
|
// same surface as the rows, no rules, count on the right.
|
|
2872
2872
|
"border-t border-border-subtle bg-surface px-4 pb-1.5 pt-4 text-sm font-semibold",
|
|
2873
|
-
|
|
2873
|
+
_.group.tone === "danger" ? "text-danger-fg" : _.group.tone === "muted" ? "text-text-subtle" : "text-text"
|
|
2874
2874
|
),
|
|
2875
2875
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2.5", children: [
|
|
2876
|
-
|
|
2877
|
-
/* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children:
|
|
2876
|
+
_.group.title ?? _.group.id,
|
|
2877
|
+
/* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: _.group.count ?? _.rows.length })
|
|
2878
2878
|
] })
|
|
2879
2879
|
}
|
|
2880
|
-
) }, `group-${
|
|
2880
|
+
) }, `group-${_.group.id}`)
|
|
2881
2881
|
] : [],
|
|
2882
|
-
...
|
|
2883
|
-
const ie =
|
|
2884
|
-
(F, ge) =>
|
|
2882
|
+
..._.rows.map(({ row: V, index: re }) => {
|
|
2883
|
+
const ie = O(V, re), Q = C.some(
|
|
2884
|
+
(F, ge) => O(F, ge) === ie
|
|
2885
2885
|
);
|
|
2886
2886
|
return /* @__PURE__ */ c(
|
|
2887
2887
|
"tr",
|
|
2888
2888
|
{
|
|
2889
2889
|
className: i(
|
|
2890
|
-
qr[
|
|
2890
|
+
qr[j],
|
|
2891
2891
|
// Hairline above every row, including the first: it is
|
|
2892
2892
|
// what separates the body from the column strip.
|
|
2893
2893
|
"border-t border-border-subtle",
|
|
2894
|
-
|
|
2894
|
+
W && "transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
2895
2895
|
p && "cursor-pointer",
|
|
2896
|
-
|
|
2897
|
-
|
|
2896
|
+
Q && "bg-accent-soft",
|
|
2897
|
+
ee?.(V, re)
|
|
2898
2898
|
),
|
|
2899
2899
|
onClick: (F) => {
|
|
2900
2900
|
F.stopPropagation(), p?.(V, re);
|
|
2901
2901
|
},
|
|
2902
2902
|
children: [
|
|
2903
|
-
h && /* @__PURE__ */ e("td", { className:
|
|
2903
|
+
h && /* @__PURE__ */ e("td", { className: xe, children: /* @__PURE__ */ e(
|
|
2904
2904
|
we,
|
|
2905
2905
|
{
|
|
2906
2906
|
size: "sm",
|
|
2907
|
-
checked:
|
|
2907
|
+
checked: Q,
|
|
2908
2908
|
onClick: (F) => F.stopPropagation(),
|
|
2909
2909
|
onChange: (F) => {
|
|
2910
2910
|
F.stopPropagation(), M(V, F.target.checked);
|
|
@@ -2917,7 +2917,7 @@ const Wr = (t) => {
|
|
|
2917
2917
|
return /* @__PURE__ */ e(
|
|
2918
2918
|
"td",
|
|
2919
2919
|
{
|
|
2920
|
-
className: i(
|
|
2920
|
+
className: i(xe, {
|
|
2921
2921
|
"text-left": F.align === "left" || !F.align,
|
|
2922
2922
|
"text-center": F.align === "center",
|
|
2923
2923
|
"text-right": F.align === "right",
|
|
@@ -2929,11 +2929,11 @@ const Wr = (t) => {
|
|
|
2929
2929
|
F.id
|
|
2930
2930
|
);
|
|
2931
2931
|
}),
|
|
2932
|
-
w.length > 0 && /* @__PURE__ */ e("td", { className:
|
|
2932
|
+
w.length > 0 && /* @__PURE__ */ e("td", { className: xe, children: /* @__PURE__ */ e(
|
|
2933
2933
|
Br,
|
|
2934
2934
|
{
|
|
2935
2935
|
className: "rounded-md",
|
|
2936
|
-
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(J, { icon:
|
|
2936
|
+
trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(J, { icon: $t, size: "md", color: "current" }) }),
|
|
2937
2937
|
options: w.map((F) => ({
|
|
2938
2938
|
value: F.id,
|
|
2939
2939
|
label: F.label,
|
|
@@ -2955,7 +2955,7 @@ const Wr = (t) => {
|
|
|
2955
2955
|
]) })
|
|
2956
2956
|
] }) }),
|
|
2957
2957
|
gt && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
|
|
2958
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children:
|
|
2958
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: G ?? `Showing ${I}–${te} of ${P}` }),
|
|
2959
2959
|
Ve && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
|
|
2960
2960
|
/* @__PURE__ */ e(
|
|
2961
2961
|
se,
|
|
@@ -2966,25 +2966,25 @@ const Wr = (t) => {
|
|
|
2966
2966
|
"aria-label": "Previous page",
|
|
2967
2967
|
onClick: () => k(D.page - 1),
|
|
2968
2968
|
disabled: D.page === 0,
|
|
2969
|
-
children: /* @__PURE__ */ e(J, { icon:
|
|
2969
|
+
children: /* @__PURE__ */ e(J, { icon: Ee, size: "md", color: "current" })
|
|
2970
2970
|
}
|
|
2971
2971
|
),
|
|
2972
2972
|
Ur(D.page, N).map(
|
|
2973
|
-
(
|
|
2973
|
+
(_, V) => _ === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${V}`) : /* @__PURE__ */ e(
|
|
2974
2974
|
"button",
|
|
2975
2975
|
{
|
|
2976
2976
|
type: "button",
|
|
2977
|
-
"aria-current":
|
|
2978
|
-
onClick: () => k(
|
|
2977
|
+
"aria-current": _ === D.page ? "page" : void 0,
|
|
2978
|
+
onClick: () => k(_),
|
|
2979
2979
|
className: i(
|
|
2980
2980
|
"h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
|
|
2981
2981
|
"transition-colors duration-fast ease-out",
|
|
2982
2982
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
2983
|
-
|
|
2983
|
+
_ === D.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
|
|
2984
2984
|
),
|
|
2985
|
-
children:
|
|
2985
|
+
children: _ + 1
|
|
2986
2986
|
},
|
|
2987
|
-
|
|
2987
|
+
_
|
|
2988
2988
|
)
|
|
2989
2989
|
),
|
|
2990
2990
|
/* @__PURE__ */ e(
|
|
@@ -3228,7 +3228,7 @@ const Bs = ({
|
|
|
3228
3228
|
if (!f) return String(m || "-");
|
|
3229
3229
|
const b = f.find((g) => g.value === m);
|
|
3230
3230
|
return b ? b.label : String(m || "-");
|
|
3231
|
-
}, u =
|
|
3231
|
+
}, u = fe(
|
|
3232
3232
|
(m) => {
|
|
3233
3233
|
const f = sn(r, m.name);
|
|
3234
3234
|
if (m.type === "array") {
|
|
@@ -3310,8 +3310,8 @@ const Bs = ({
|
|
|
3310
3310
|
}
|
|
3311
3311
|
return /* @__PURE__ */ e(ue, { variant: "body", size: "sm", className: "text-text", children: b });
|
|
3312
3312
|
},
|
|
3313
|
-
[r]
|
|
3314
|
-
), d =
|
|
3313
|
+
[r, o, a, l]
|
|
3314
|
+
), d = fe(
|
|
3315
3315
|
(m) => {
|
|
3316
3316
|
if (m.conditional && !m.conditional(r))
|
|
3317
3317
|
return null;
|
|
@@ -3412,29 +3412,29 @@ function qs({
|
|
|
3412
3412
|
className: o
|
|
3413
3413
|
}) {
|
|
3414
3414
|
const u = ne(null), [d, v] = R(null), [, m] = R(0), f = ne(null), b = ne(r);
|
|
3415
|
-
b.current = r,
|
|
3415
|
+
b.current = r, X(() => {
|
|
3416
3416
|
if (Fe.has(t)) return;
|
|
3417
3417
|
let C = !0;
|
|
3418
3418
|
return (async () => {
|
|
3419
3419
|
try {
|
|
3420
|
-
const
|
|
3420
|
+
const O = await b.current();
|
|
3421
3421
|
if (!C) return;
|
|
3422
|
-
Fe.set(t,
|
|
3423
|
-
} catch (
|
|
3424
|
-
console.error(`[FederatedResource] Load failed: ${t}`,
|
|
3422
|
+
Fe.set(t, O), m(($) => $ + 1);
|
|
3423
|
+
} catch (O) {
|
|
3424
|
+
console.error(`[FederatedResource] Load failed: ${t}`, O), C && v(t);
|
|
3425
3425
|
}
|
|
3426
3426
|
})(), () => {
|
|
3427
3427
|
C = !1;
|
|
3428
3428
|
};
|
|
3429
3429
|
}, [t]);
|
|
3430
3430
|
const g = Fe.get(t) ?? null, w = !g && d === t, p = !g && !w, h = g ? n === "react" && (g.component || g.default) || g : null;
|
|
3431
|
-
return
|
|
3431
|
+
return X(() => {
|
|
3432
3432
|
if (!h || n === "react") return;
|
|
3433
3433
|
const C = u.current;
|
|
3434
3434
|
if (C) {
|
|
3435
3435
|
if (n === "svelte") {
|
|
3436
|
-
const z = h.default || h,
|
|
3437
|
-
return f.current =
|
|
3436
|
+
const z = h.default || h, O = new z({ target: C, props: l || {} });
|
|
3437
|
+
return f.current = O, () => O.$destroy();
|
|
3438
3438
|
}
|
|
3439
3439
|
if (h.mount) {
|
|
3440
3440
|
const z = h.mount({ container: C, props: l || {} });
|
|
@@ -3443,7 +3443,7 @@ function qs({
|
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
|
-
}, [h, n]),
|
|
3446
|
+
}, [h, n, l]), X(() => {
|
|
3447
3447
|
n === "svelte" && f.current && f.current.$set?.(l);
|
|
3448
3448
|
}, [l, n]), /* @__PURE__ */ c("div", { ref: u, className: o, style: { display: "contents" }, children: [
|
|
3449
3449
|
p && s,
|
|
@@ -3744,7 +3744,7 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3744
3744
|
md: "h-control-md px-3 text-sm",
|
|
3745
3745
|
lg: "h-control-lg px-3 text-base",
|
|
3746
3746
|
full: "h-control-md w-full px-3 text-sm"
|
|
3747
|
-
},
|
|
3747
|
+
}, Te = hn, $e = ve(
|
|
3748
3748
|
({
|
|
3749
3749
|
label: t,
|
|
3750
3750
|
helperText: r,
|
|
@@ -3765,24 +3765,24 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3765
3765
|
allowCreate: h,
|
|
3766
3766
|
onCreateOption: C,
|
|
3767
3767
|
...z
|
|
3768
|
-
},
|
|
3769
|
-
const
|
|
3770
|
-
ae.useImperativeHandle(
|
|
3768
|
+
}, O) => {
|
|
3769
|
+
const $ = f || `select-${Math.random().toString(36).substr(2, 9)}`, G = !!n, [j, W] = ae.useState(!1), [B, U] = ae.useState(""), ee = ae.useRef(null), Z = ae.useRef(null), de = Oe(j, Z, { matchWidth: !0 }), [Y, y] = ae.useState(o);
|
|
3770
|
+
ae.useImperativeHandle(O, () => ee.current), ae.useEffect(() => {
|
|
3771
3771
|
const L = (k) => {
|
|
3772
|
-
|
|
3772
|
+
ee.current && !ee.current.contains(k.target) && W(!1);
|
|
3773
3773
|
};
|
|
3774
3774
|
return document.addEventListener("mousedown", L), () => document.removeEventListener("mousedown", L);
|
|
3775
3775
|
}, []);
|
|
3776
3776
|
const x = ae.useCallback(
|
|
3777
|
-
(L, k) => L.some((M) =>
|
|
3777
|
+
(L, k) => L.some((M) => Te(M.value) === Te(k) || Te(M.label) === Te(k)),
|
|
3778
3778
|
[]
|
|
3779
3779
|
), S = ae.useCallback(
|
|
3780
3780
|
(L, k) => {
|
|
3781
|
-
const M = [...L],
|
|
3782
|
-
const N = _e(
|
|
3781
|
+
const M = [...L], K = (P) => {
|
|
3782
|
+
const N = _e(P).trim();
|
|
3783
3783
|
N && (x(M, N) || M.push({ value: N, label: N }));
|
|
3784
3784
|
};
|
|
3785
|
-
return Array.isArray(k) ? k.forEach(
|
|
3785
|
+
return Array.isArray(k) ? k.forEach(K) : K(k), M;
|
|
3786
3786
|
},
|
|
3787
3787
|
[x]
|
|
3788
3788
|
);
|
|
@@ -3794,45 +3794,45 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3794
3794
|
}), S(k, w);
|
|
3795
3795
|
});
|
|
3796
3796
|
}, [o, w, S, x]);
|
|
3797
|
-
const
|
|
3797
|
+
const A = ae.useMemo(
|
|
3798
3798
|
() => Array.isArray(w) ? w.map(_e) : w == null ? void 0 : _e(w),
|
|
3799
3799
|
[w]
|
|
3800
3800
|
), E = (L) => {
|
|
3801
3801
|
if (g) {
|
|
3802
|
-
const k = Array.isArray(
|
|
3802
|
+
const k = Array.isArray(A) ? A : [], M = k.includes(L) ? k.filter((K) => K !== L) : [...k, L];
|
|
3803
3803
|
p?.(M);
|
|
3804
3804
|
} else
|
|
3805
|
-
p?.(L),
|
|
3806
|
-
}, D = g ? null :
|
|
3805
|
+
p?.(L), W(!1), U("");
|
|
3806
|
+
}, D = g ? null : Y.find((L) => L.value === A), T = g ? Y.filter((L) => Array.isArray(A) && A.includes(L.value)) : [], oe = b && B ? Y.filter(
|
|
3807
3807
|
(L) => L.label.toLowerCase().includes(B.toLowerCase())
|
|
3808
|
-
) :
|
|
3808
|
+
) : Y, ce = !!h && !!b && !!B.trim() && !x(Y, B), q = (L) => {
|
|
3809
3809
|
const k = L.trim();
|
|
3810
3810
|
if (!k) return;
|
|
3811
3811
|
const M = C?.(k) ?? {
|
|
3812
3812
|
value: k,
|
|
3813
3813
|
label: k
|
|
3814
3814
|
};
|
|
3815
|
-
if (x(
|
|
3816
|
-
E(M.value),
|
|
3815
|
+
if (x(Y, M.value) || x(Y, M.label)) {
|
|
3816
|
+
E(M.value), U(""), g || W(!1);
|
|
3817
3817
|
return;
|
|
3818
3818
|
}
|
|
3819
|
-
y((
|
|
3820
|
-
}, H = () => g ?
|
|
3819
|
+
y((K) => [...K, M]), E(M.value), U(""), g || W(!1);
|
|
3820
|
+
}, H = () => g ? T.length > 0 ? T.map((L) => L.label).join(", ") : u || "Select options" : D?.label || u || "Select an option";
|
|
3821
3821
|
return /* @__PURE__ */ c(
|
|
3822
3822
|
"div",
|
|
3823
3823
|
{
|
|
3824
|
-
ref:
|
|
3824
|
+
ref: ee,
|
|
3825
3825
|
className: i("relative flex flex-col", a && "w-full", d),
|
|
3826
3826
|
...z,
|
|
3827
3827
|
children: [
|
|
3828
3828
|
t && /* @__PURE__ */ e(
|
|
3829
3829
|
"label",
|
|
3830
3830
|
{
|
|
3831
|
-
htmlFor:
|
|
3832
|
-
onClick: () =>
|
|
3831
|
+
htmlFor: $,
|
|
3832
|
+
onClick: () => W(!j),
|
|
3833
3833
|
className: i(
|
|
3834
3834
|
"block text-xs font-semibold uppercase tracking-label mb-1.5",
|
|
3835
|
-
|
|
3835
|
+
G ? "text-danger-fg" : "text-text-muted",
|
|
3836
3836
|
v
|
|
3837
3837
|
),
|
|
3838
3838
|
children: t
|
|
@@ -3842,36 +3842,36 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3842
3842
|
/* @__PURE__ */ c(
|
|
3843
3843
|
"button",
|
|
3844
3844
|
{
|
|
3845
|
-
ref:
|
|
3845
|
+
ref: Z,
|
|
3846
3846
|
type: "button",
|
|
3847
|
-
id:
|
|
3847
|
+
id: $,
|
|
3848
3848
|
disabled: l,
|
|
3849
|
-
onClick: () =>
|
|
3849
|
+
onClick: () => W(!j),
|
|
3850
3850
|
className: i(
|
|
3851
3851
|
"flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
|
|
3852
3852
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
3853
3853
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
3854
3854
|
"bg-surface",
|
|
3855
3855
|
xn[s],
|
|
3856
|
-
|
|
3856
|
+
G ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
3857
3857
|
m
|
|
3858
3858
|
),
|
|
3859
3859
|
children: [
|
|
3860
3860
|
/* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: H() }),
|
|
3861
3861
|
/* @__PURE__ */ e(
|
|
3862
|
-
|
|
3862
|
+
At,
|
|
3863
3863
|
{
|
|
3864
3864
|
size: 16,
|
|
3865
3865
|
className: i(
|
|
3866
3866
|
"shrink-0 opacity-60 transition-transform duration-fast",
|
|
3867
|
-
|
|
3867
|
+
j && "rotate-180"
|
|
3868
3868
|
)
|
|
3869
3869
|
}
|
|
3870
3870
|
)
|
|
3871
3871
|
]
|
|
3872
3872
|
}
|
|
3873
3873
|
),
|
|
3874
|
-
|
|
3874
|
+
j && /* @__PURE__ */ c(
|
|
3875
3875
|
"div",
|
|
3876
3876
|
{
|
|
3877
3877
|
style: de,
|
|
@@ -3883,7 +3883,7 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3883
3883
|
type: "text",
|
|
3884
3884
|
placeholder: "Search...",
|
|
3885
3885
|
value: B,
|
|
3886
|
-
onChange: (L) =>
|
|
3886
|
+
onChange: (L) => U(L.target.value),
|
|
3887
3887
|
onKeyDown: (L) => {
|
|
3888
3888
|
L.key === "Enter" && ce && (L.preventDefault(), q(B));
|
|
3889
3889
|
},
|
|
@@ -3914,13 +3914,13 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3914
3914
|
{
|
|
3915
3915
|
className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
|
|
3916
3916
|
onClick: () => {
|
|
3917
|
-
p?.(""),
|
|
3917
|
+
p?.(""), W(!1);
|
|
3918
3918
|
},
|
|
3919
3919
|
children: u
|
|
3920
3920
|
}
|
|
3921
3921
|
),
|
|
3922
3922
|
oe.map((L) => {
|
|
3923
|
-
const k = g ? Array.isArray(
|
|
3923
|
+
const k = g ? Array.isArray(A) && A.includes(L.value) : A === L.value;
|
|
3924
3924
|
return /* @__PURE__ */ e(
|
|
3925
3925
|
"li",
|
|
3926
3926
|
{
|
|
@@ -3952,7 +3952,7 @@ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCa
|
|
|
3952
3952
|
}
|
|
3953
3953
|
)
|
|
3954
3954
|
] }),
|
|
3955
|
-
(n || r) && /* @__PURE__ */ e("p", { className: i("mt-1 text-xs",
|
|
3955
|
+
(n || r) && /* @__PURE__ */ e("p", { className: i("mt-1 text-xs", G ? "text-danger-fg" : "text-text-muted"), children: n || r })
|
|
3956
3956
|
]
|
|
3957
3957
|
}
|
|
3958
3958
|
);
|
|
@@ -4045,7 +4045,7 @@ function gn({
|
|
|
4045
4045
|
showTemplate: u = !0
|
|
4046
4046
|
}) {
|
|
4047
4047
|
const [d, v] = R([]);
|
|
4048
|
-
|
|
4048
|
+
X(() => {
|
|
4049
4049
|
let f = !0;
|
|
4050
4050
|
return Promise.resolve(n?.()).then((b) => {
|
|
4051
4051
|
f && b && v(b.data ?? []);
|
|
@@ -4053,7 +4053,7 @@ function gn({
|
|
|
4053
4053
|
}), () => {
|
|
4054
4054
|
f = !1;
|
|
4055
4055
|
};
|
|
4056
|
-
}, []);
|
|
4056
|
+
}, [n]);
|
|
4057
4057
|
const m = t ?? {};
|
|
4058
4058
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
4059
4059
|
/* @__PURE__ */ e(
|
|
@@ -4142,20 +4142,20 @@ const pn = et(null), Ys = ({ items: t, activeTab: r, onTabChange: n, className:
|
|
|
4142
4142
|
"text-xs px-2 py-1": l === "sm",
|
|
4143
4143
|
"text-sm px-3 py-2": l === "md",
|
|
4144
4144
|
"text-base px-4 py-3": l === "lg"
|
|
4145
|
-
},
|
|
4145
|
+
}, O = {
|
|
4146
4146
|
// Default variant
|
|
4147
4147
|
"border-b-2 -mb-px": a === "default",
|
|
4148
4148
|
// Pills variant
|
|
4149
4149
|
"rounded-md": a === "pills",
|
|
4150
4150
|
// Underline variant
|
|
4151
4151
|
"border-b-2 pb-2": a === "underline"
|
|
4152
|
-
},
|
|
4152
|
+
}, $ = {
|
|
4153
4153
|
"opacity-50 cursor-not-allowed": p.disabled,
|
|
4154
4154
|
"cursor-pointer": !p.disabled
|
|
4155
|
-
},
|
|
4155
|
+
}, G = h ? {
|
|
4156
4156
|
"border-accent-border text-text": a === "default" || a === "underline",
|
|
4157
4157
|
"bg-surface text-text shadow-none": a === "pills"
|
|
4158
|
-
} : {},
|
|
4158
|
+
} : {}, j = !h && !p.disabled ? {
|
|
4159
4159
|
"border-transparent text-text-muted hover:text-text": a === "default",
|
|
4160
4160
|
"text-text-muted hover:text-text": a === "pills",
|
|
4161
4161
|
"border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
|
|
@@ -4163,10 +4163,10 @@ const pn = et(null), Ys = ({ items: t, activeTab: r, onTabChange: n, className:
|
|
|
4163
4163
|
return i(
|
|
4164
4164
|
C,
|
|
4165
4165
|
z,
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4166
|
+
O,
|
|
4167
|
+
$,
|
|
4168
|
+
G,
|
|
4169
|
+
j
|
|
4170
4170
|
);
|
|
4171
4171
|
};
|
|
4172
4172
|
return /* @__PURE__ */ e(pn.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
|
|
@@ -4219,13 +4219,13 @@ function mt({
|
|
|
4219
4219
|
showCloseButton: m = !0
|
|
4220
4220
|
}) {
|
|
4221
4221
|
const f = ne(null), b = ne(null);
|
|
4222
|
-
|
|
4222
|
+
X(() => {
|
|
4223
4223
|
if (!t || !l) return;
|
|
4224
4224
|
const w = (p) => {
|
|
4225
4225
|
p.key === "Escape" && r();
|
|
4226
4226
|
};
|
|
4227
4227
|
return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
4228
|
-
}, [t, l, r]),
|
|
4228
|
+
}, [t, l, r]), X(() => (t ? (b.current = document.activeElement, f.current && f.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
|
|
4229
4229
|
document.body.style.overflow = "";
|
|
4230
4230
|
}), [t]);
|
|
4231
4231
|
const g = (w) => {
|
|
@@ -4289,44 +4289,44 @@ const Nn = ({
|
|
|
4289
4289
|
onDownloadFile: m,
|
|
4290
4290
|
onRegisterFile: f
|
|
4291
4291
|
}) => {
|
|
4292
|
-
const [b, g] = R(!1), [w, p] = R([]), [h, C] = R(null), [z,
|
|
4292
|
+
const [b, g] = R(!1), [w, p] = R([]), [h, C] = R(null), [z, O] = R("/"), [$, G] = R([]), [j, W] = R(!1), [B, U] = R(""), [ee, Z] = R(
|
|
4293
4293
|
typeof t == "object" ? t : null
|
|
4294
|
-
), [de,
|
|
4295
|
-
|
|
4296
|
-
b && $();
|
|
4297
|
-
}, [b]), Z(() => {
|
|
4298
|
-
b && h && E();
|
|
4299
|
-
}, [b, h, z, B]);
|
|
4300
|
-
const $ = async () => {
|
|
4301
|
-
j(!0);
|
|
4294
|
+
), [de, Y] = R(!1), [y, x] = R(""), S = ne(null), A = fe(async () => {
|
|
4295
|
+
W(!0);
|
|
4302
4296
|
try {
|
|
4303
4297
|
const N = await d?.();
|
|
4304
4298
|
N?.data && p(N.data);
|
|
4305
4299
|
} catch (N) {
|
|
4306
4300
|
console.error("Failed to load mounts", N);
|
|
4307
4301
|
} finally {
|
|
4308
|
-
|
|
4302
|
+
W(!1);
|
|
4309
4303
|
}
|
|
4310
|
-
}, E = async () => {
|
|
4304
|
+
}, [d]), E = fe(async () => {
|
|
4311
4305
|
if (h) {
|
|
4312
|
-
|
|
4306
|
+
W(!0);
|
|
4313
4307
|
try {
|
|
4314
4308
|
const N = await u?.({
|
|
4315
4309
|
mountId: h.id,
|
|
4316
4310
|
name: B,
|
|
4317
4311
|
path: z
|
|
4318
4312
|
});
|
|
4319
|
-
N?.data &&
|
|
4313
|
+
N?.data && G(N.data);
|
|
4320
4314
|
} catch (N) {
|
|
4321
4315
|
console.error("Failed to load files", N);
|
|
4322
4316
|
} finally {
|
|
4323
|
-
|
|
4317
|
+
W(!1);
|
|
4324
4318
|
}
|
|
4325
4319
|
}
|
|
4326
|
-
},
|
|
4320
|
+
}, [z, u, B, h]);
|
|
4321
|
+
X(() => {
|
|
4322
|
+
b && A();
|
|
4323
|
+
}, [b, A]), X(() => {
|
|
4324
|
+
b && h && E();
|
|
4325
|
+
}, [b, h, E]);
|
|
4326
|
+
const D = async (N) => {
|
|
4327
4327
|
const I = N.target.files?.[0];
|
|
4328
4328
|
if (I) {
|
|
4329
|
-
|
|
4329
|
+
W(!0);
|
|
4330
4330
|
try {
|
|
4331
4331
|
const te = await I.arrayBuffer(), le = new Uint8Array(te), be = {
|
|
4332
4332
|
id: `local-${Date.now()}`,
|
|
@@ -4339,17 +4339,17 @@ const Nn = ({
|
|
|
4339
4339
|
providerKey: I.name,
|
|
4340
4340
|
ownerId: "me"
|
|
4341
4341
|
};
|
|
4342
|
-
|
|
4342
|
+
Z(be), r(be, le), g(!1);
|
|
4343
4343
|
} catch (te) {
|
|
4344
4344
|
console.error("Local file selection failed", te);
|
|
4345
4345
|
} finally {
|
|
4346
|
-
|
|
4346
|
+
W(!1);
|
|
4347
4347
|
}
|
|
4348
4348
|
}
|
|
4349
|
-
},
|
|
4349
|
+
}, T = async (N) => {
|
|
4350
4350
|
const I = N.target.files?.[0];
|
|
4351
4351
|
if (!(!I || !h)) {
|
|
4352
|
-
|
|
4352
|
+
W(!0);
|
|
4353
4353
|
try {
|
|
4354
4354
|
const te = await I.arrayBuffer(), le = await v?.({
|
|
4355
4355
|
file: new Uint8Array(te),
|
|
@@ -4360,17 +4360,17 @@ const Nn = ({
|
|
|
4360
4360
|
});
|
|
4361
4361
|
if (le?.data) {
|
|
4362
4362
|
const be = le.data;
|
|
4363
|
-
|
|
4363
|
+
Z(be), r(be, new Uint8Array(te)), g(!1);
|
|
4364
4364
|
}
|
|
4365
4365
|
} catch (te) {
|
|
4366
4366
|
console.error("Upload failed", te);
|
|
4367
4367
|
} finally {
|
|
4368
|
-
|
|
4368
|
+
W(!1);
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
4371
4371
|
}, oe = async () => {
|
|
4372
4372
|
if (!(!y || !h)) {
|
|
4373
|
-
|
|
4373
|
+
W(!0);
|
|
4374
4374
|
try {
|
|
4375
4375
|
const N = `${z}${y}/`;
|
|
4376
4376
|
f && (await f({
|
|
@@ -4382,43 +4382,43 @@ const Nn = ({
|
|
|
4382
4382
|
mountId: h.id,
|
|
4383
4383
|
providerKey: N,
|
|
4384
4384
|
ownerId: "me"
|
|
4385
|
-
}), await E()),
|
|
4385
|
+
}), await E()), Y(!1), x("");
|
|
4386
4386
|
} catch (N) {
|
|
4387
4387
|
console.error("Failed to create folder", N);
|
|
4388
4388
|
} finally {
|
|
4389
|
-
|
|
4389
|
+
W(!1);
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
4392
|
}, ce = async (N) => {
|
|
4393
|
-
|
|
4393
|
+
W(!0);
|
|
4394
4394
|
try {
|
|
4395
4395
|
const I = await m?.(N.id);
|
|
4396
|
-
|
|
4396
|
+
Z(N), r(N, I), g(!1);
|
|
4397
4397
|
} catch (I) {
|
|
4398
4398
|
console.error("Failed to download file", I);
|
|
4399
4399
|
} finally {
|
|
4400
|
-
|
|
4400
|
+
W(!1);
|
|
4401
4401
|
}
|
|
4402
4402
|
}, q = (N) => {
|
|
4403
|
-
N.stopPropagation(),
|
|
4403
|
+
N.stopPropagation(), Z(null), r(null);
|
|
4404
4404
|
}, H = pe(() => {
|
|
4405
4405
|
const N = /* @__PURE__ */ new Set(), I = [];
|
|
4406
|
-
return
|
|
4406
|
+
return $.forEach((te) => {
|
|
4407
4407
|
if (te.type === "folder") {
|
|
4408
4408
|
te.path === z && N.add(te.name);
|
|
4409
4409
|
return;
|
|
4410
4410
|
}
|
|
4411
|
-
const le = te.providerKey || te.name, ye = (z ? le.substring(z.length) : le).split("/").filter((
|
|
4411
|
+
const le = te.providerKey || te.name, ye = (z ? le.substring(z.length) : le).split("/").filter((he) => he !== "");
|
|
4412
4412
|
ye.length > 1 ? N.add(ye[0]) : ye.length === 1 && I.push(te);
|
|
4413
4413
|
}), {
|
|
4414
4414
|
folders: Array.from(N).sort(),
|
|
4415
4415
|
files: I.sort((te, le) => te.name.localeCompare(le.name))
|
|
4416
4416
|
};
|
|
4417
|
-
}, [
|
|
4418
|
-
|
|
4417
|
+
}, [$, z]), L = (N) => {
|
|
4418
|
+
O((I) => `${I}${N}/`);
|
|
4419
4419
|
}, k = () => {
|
|
4420
4420
|
const N = z.split("/").filter((I) => I !== "");
|
|
4421
|
-
N.pop(), N.length === 0 ?
|
|
4421
|
+
N.pop(), N.length === 0 ? O("/") : O(`${N.join("/")}/`);
|
|
4422
4422
|
}, M = pe(() => {
|
|
4423
4423
|
const N = H.folders.map((I) => ({
|
|
4424
4424
|
id: `folder-${I}`,
|
|
@@ -4431,7 +4431,7 @@ const Nn = ({
|
|
|
4431
4431
|
type: "file"
|
|
4432
4432
|
});
|
|
4433
4433
|
}), N;
|
|
4434
|
-
}, [H]),
|
|
4434
|
+
}, [H]), K = [
|
|
4435
4435
|
{
|
|
4436
4436
|
id: "name",
|
|
4437
4437
|
header: "Name",
|
|
@@ -4470,12 +4470,12 @@ const Nn = ({
|
|
|
4470
4470
|
onClick: (te) => {
|
|
4471
4471
|
te.stopPropagation(), I.type === "folder" ? L(I.name) : ce(I);
|
|
4472
4472
|
},
|
|
4473
|
-
loading:
|
|
4473
|
+
loading: j && I.type === "file" && ee?.id === I.id,
|
|
4474
4474
|
children: I.type === "folder" ? "Open" : "Select"
|
|
4475
4475
|
}
|
|
4476
4476
|
)
|
|
4477
4477
|
}
|
|
4478
|
-
],
|
|
4478
|
+
], P = [
|
|
4479
4479
|
{
|
|
4480
4480
|
id: "name",
|
|
4481
4481
|
header: "Mount Name",
|
|
@@ -4509,12 +4509,12 @@ const Nn = ({
|
|
|
4509
4509
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(
|
|
4510
4510
|
J,
|
|
4511
4511
|
{
|
|
4512
|
-
icon:
|
|
4513
|
-
color:
|
|
4512
|
+
icon: ee ? je : We,
|
|
4513
|
+
color: ee ? "primary" : "secondary"
|
|
4514
4514
|
}
|
|
4515
4515
|
) }),
|
|
4516
|
-
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children:
|
|
4517
|
-
|
|
4516
|
+
/* @__PURE__ */ e("div", { className: "flex-grow truncate", children: ee ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: ee.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
|
|
4517
|
+
ee && !l && /* @__PURE__ */ e("button", { onClick: q, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(J, { icon: Se, size: "xs" }) })
|
|
4518
4518
|
]
|
|
4519
4519
|
}
|
|
4520
4520
|
),
|
|
@@ -4524,7 +4524,7 @@ const Nn = ({
|
|
|
4524
4524
|
{
|
|
4525
4525
|
open: b,
|
|
4526
4526
|
onClose: () => {
|
|
4527
|
-
g(!1), C(null),
|
|
4527
|
+
g(!1), C(null), O("/"), Y(!1);
|
|
4528
4528
|
},
|
|
4529
4529
|
title: h ? `Explorer: ${h.name}` : "Select Storage Mount",
|
|
4530
4530
|
size: "lg",
|
|
@@ -4536,7 +4536,7 @@ const Nn = ({
|
|
|
4536
4536
|
{
|
|
4537
4537
|
id: "remote",
|
|
4538
4538
|
label: "Platform Storage",
|
|
4539
|
-
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: h ? /* @__PURE__ */ c(
|
|
4539
|
+
content: /* @__PURE__ */ e("div", { className: "space-y-4", children: h ? /* @__PURE__ */ c(Ae, { children: [
|
|
4540
4540
|
/* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
4541
4541
|
/* @__PURE__ */ e(
|
|
4542
4542
|
se,
|
|
@@ -4555,7 +4555,7 @@ const Nn = ({
|
|
|
4555
4555
|
{
|
|
4556
4556
|
placeholder: "Search...",
|
|
4557
4557
|
value: B,
|
|
4558
|
-
onChange: (N) =>
|
|
4558
|
+
onChange: (N) => U(N.target.value),
|
|
4559
4559
|
startIcon: /* @__PURE__ */ e(Le, { size: 14 }),
|
|
4560
4560
|
fullWidth: !0
|
|
4561
4561
|
}
|
|
@@ -4565,7 +4565,7 @@ const Nn = ({
|
|
|
4565
4565
|
se,
|
|
4566
4566
|
{
|
|
4567
4567
|
variant: "outline",
|
|
4568
|
-
onClick: () =>
|
|
4568
|
+
onClick: () => Y(!0),
|
|
4569
4569
|
leftIcon: /* @__PURE__ */ e(J, { icon: Lt, size: "xs" }),
|
|
4570
4570
|
children: "New Folder"
|
|
4571
4571
|
}
|
|
@@ -4576,7 +4576,7 @@ const Nn = ({
|
|
|
4576
4576
|
variant: "primary",
|
|
4577
4577
|
onClick: () => S.current?.click(),
|
|
4578
4578
|
leftIcon: /* @__PURE__ */ e(J, { icon: It, size: "xs" }),
|
|
4579
|
-
loading:
|
|
4579
|
+
loading: j,
|
|
4580
4580
|
children: "Upload"
|
|
4581
4581
|
}
|
|
4582
4582
|
),
|
|
@@ -4586,7 +4586,7 @@ const Nn = ({
|
|
|
4586
4586
|
type: "file",
|
|
4587
4587
|
className: "hidden",
|
|
4588
4588
|
ref: S,
|
|
4589
|
-
onChange:
|
|
4589
|
+
onChange: T,
|
|
4590
4590
|
accept: o
|
|
4591
4591
|
}
|
|
4592
4592
|
)
|
|
@@ -4603,15 +4603,15 @@ const Nn = ({
|
|
|
4603
4603
|
autoFocus: !0
|
|
4604
4604
|
}
|
|
4605
4605
|
),
|
|
4606
|
-
/* @__PURE__ */ e(se, { onClick: oe, loading:
|
|
4607
|
-
/* @__PURE__ */ e(se, { variant: "ghost", onClick: () =>
|
|
4606
|
+
/* @__PURE__ */ e(se, { onClick: oe, loading: j, children: "Create" }),
|
|
4607
|
+
/* @__PURE__ */ e(se, { variant: "ghost", onClick: () => Y(!1), children: "Cancel" })
|
|
4608
4608
|
] }),
|
|
4609
4609
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
4610
4610
|
Ye,
|
|
4611
4611
|
{
|
|
4612
4612
|
data: M,
|
|
4613
|
-
columns:
|
|
4614
|
-
loading:
|
|
4613
|
+
columns: K,
|
|
4614
|
+
loading: j,
|
|
4615
4615
|
emptyContent: "This folder is empty",
|
|
4616
4616
|
onRowClick: (N) => N.type === "folder" ? L(N.name) : ce(N)
|
|
4617
4617
|
}
|
|
@@ -4620,8 +4620,8 @@ const Nn = ({
|
|
|
4620
4620
|
Ye,
|
|
4621
4621
|
{
|
|
4622
4622
|
data: w,
|
|
4623
|
-
columns:
|
|
4624
|
-
loading:
|
|
4623
|
+
columns: P,
|
|
4624
|
+
loading: j,
|
|
4625
4625
|
emptyContent: "No storage mounts configured",
|
|
4626
4626
|
onRowClick: (N) => C(N)
|
|
4627
4627
|
}
|
|
@@ -4652,7 +4652,7 @@ const Nn = ({
|
|
|
4652
4652
|
{
|
|
4653
4653
|
variant: "primary",
|
|
4654
4654
|
size: "lg",
|
|
4655
|
-
loading:
|
|
4655
|
+
loading: j,
|
|
4656
4656
|
className: "pointer-events-none",
|
|
4657
4657
|
children: "Browse Local File"
|
|
4658
4658
|
}
|
|
@@ -4664,7 +4664,7 @@ const Nn = ({
|
|
|
4664
4664
|
className: "hidden",
|
|
4665
4665
|
onChange: D,
|
|
4666
4666
|
accept: o,
|
|
4667
|
-
disabled:
|
|
4667
|
+
disabled: j
|
|
4668
4668
|
}
|
|
4669
4669
|
)
|
|
4670
4670
|
] })
|
|
@@ -4806,15 +4806,15 @@ const Xs = ({
|
|
|
4806
4806
|
ref: w,
|
|
4807
4807
|
sdk: p
|
|
4808
4808
|
}) => {
|
|
4809
|
-
const [h, C] = R(r || {}), z = ae.useId(),
|
|
4809
|
+
const [h, C] = R(r || {}), z = ae.useId(), O = fe(
|
|
4810
4810
|
(x) => `${z}-${String(x).replace(/\./g, "-")}`,
|
|
4811
4811
|
[z]
|
|
4812
|
-
), [
|
|
4813
|
-
|
|
4812
|
+
), [$, G] = R({}), [j, W] = R({});
|
|
4813
|
+
X(() => {
|
|
4814
4814
|
r && C({ ...r });
|
|
4815
4815
|
}, [r]);
|
|
4816
|
-
const B =
|
|
4817
|
-
(x, S,
|
|
4816
|
+
const B = fe(
|
|
4817
|
+
(x, S, A) => {
|
|
4818
4818
|
const E = t.flatMap((D) => D.items).find((D) => D.name === x);
|
|
4819
4819
|
if (!E) return null;
|
|
4820
4820
|
if (E.required && (S == null || S === ""))
|
|
@@ -4826,68 +4826,68 @@ const Xs = ({
|
|
|
4826
4826
|
return `${E.label} must be an array.`;
|
|
4827
4827
|
if (Array.isArray(S) && E.arrayFields) {
|
|
4828
4828
|
const D = [];
|
|
4829
|
-
let
|
|
4829
|
+
let T = !1;
|
|
4830
4830
|
if (S.forEach((oe, ce) => {
|
|
4831
4831
|
const q = {};
|
|
4832
4832
|
for (const H of E.arrayFields) {
|
|
4833
4833
|
const L = oe?.[H.name];
|
|
4834
4834
|
if (H.required && (L == null || L === ""))
|
|
4835
|
-
q[H.name] = `${H.label} is required`,
|
|
4835
|
+
q[H.name] = `${H.label} is required`, T = !0;
|
|
4836
4836
|
else if (H.validator) {
|
|
4837
4837
|
const k = H.validator(L, oe);
|
|
4838
|
-
k && (q[H.name] = k,
|
|
4838
|
+
k && (q[H.name] = k, T = !0);
|
|
4839
4839
|
}
|
|
4840
4840
|
}
|
|
4841
4841
|
D[ce] = q;
|
|
4842
|
-
}),
|
|
4842
|
+
}), T)
|
|
4843
4843
|
return JSON.stringify(D);
|
|
4844
4844
|
}
|
|
4845
4845
|
}
|
|
4846
|
-
return E.validator ? E.validator(S,
|
|
4846
|
+
return E.validator ? E.validator(S, A) : null;
|
|
4847
4847
|
},
|
|
4848
4848
|
[t]
|
|
4849
|
-
),
|
|
4849
|
+
), U = fe(
|
|
4850
4850
|
(x, S) => {
|
|
4851
|
-
let
|
|
4852
|
-
t.flatMap((
|
|
4853
|
-
const D = B(x, S,
|
|
4854
|
-
|
|
4855
|
-
...
|
|
4851
|
+
let A = kn(h, x, S);
|
|
4852
|
+
t.flatMap((T) => T.items).find((T) => T.name === x)?.removeIfEmpty && (S == null || S === "") && (A = Cn(A, x)), C(A), W((T) => ({ ...T, [x]: !0 }));
|
|
4853
|
+
const D = B(x, S, A);
|
|
4854
|
+
G((T) => ({
|
|
4855
|
+
...T,
|
|
4856
4856
|
[x]: D || ""
|
|
4857
|
-
})), a?.(
|
|
4857
|
+
})), a?.(A, x);
|
|
4858
4858
|
},
|
|
4859
4859
|
[h, t, B, a]
|
|
4860
|
-
),
|
|
4860
|
+
), ee = fe(
|
|
4861
4861
|
async (x) => {
|
|
4862
4862
|
if (x.preventDefault(), b) return;
|
|
4863
|
-
const S = {},
|
|
4864
|
-
for (const D of
|
|
4863
|
+
const S = {}, A = t.flatMap((D) => D.items);
|
|
4864
|
+
for (const D of A) {
|
|
4865
4865
|
if (D.hidden || D.conditional && !D.conditional(h))
|
|
4866
4866
|
continue;
|
|
4867
|
-
const
|
|
4867
|
+
const T = B(
|
|
4868
4868
|
D.name,
|
|
4869
4869
|
Ze(h, D.name),
|
|
4870
4870
|
h
|
|
4871
4871
|
);
|
|
4872
|
-
|
|
4872
|
+
T && (S[D.name] = T);
|
|
4873
4873
|
}
|
|
4874
4874
|
if (o) {
|
|
4875
4875
|
const D = o(h);
|
|
4876
4876
|
D && Object.assign(S, D);
|
|
4877
4877
|
}
|
|
4878
|
-
if (
|
|
4878
|
+
if (G(S), Object.keys(S).some((D) => S[D]))
|
|
4879
4879
|
return;
|
|
4880
4880
|
const E = l ? l(h) : h;
|
|
4881
4881
|
await n?.(h, E);
|
|
4882
4882
|
},
|
|
4883
4883
|
[h, t, B, o, l, n, b]
|
|
4884
|
-
),
|
|
4884
|
+
), Z = fe(
|
|
4885
4885
|
(x) => {
|
|
4886
|
-
const S = Ze(h, x.name),
|
|
4886
|
+
const S = Ze(h, x.name), A = j[x.name] ? $[x.name] : void 0, E = x.disabled || b, D = {
|
|
4887
4887
|
// Ties the field to the `<label>` the group wrapper renders; without it
|
|
4888
4888
|
// labels are unassociated — screen readers announce nothing, clicking a
|
|
4889
4889
|
// label focuses nothing, and tests cannot find a field by its label.
|
|
4890
|
-
id:
|
|
4890
|
+
id: O(x.name),
|
|
4891
4891
|
value: S || "",
|
|
4892
4892
|
disabled: E,
|
|
4893
4893
|
required: x.required,
|
|
@@ -4906,10 +4906,10 @@ const Xs = ({
|
|
|
4906
4906
|
Ce,
|
|
4907
4907
|
{
|
|
4908
4908
|
...D,
|
|
4909
|
-
onChange: (
|
|
4909
|
+
onChange: (T) => U(x.name, T.target.value),
|
|
4910
4910
|
type: x.textType || x.type,
|
|
4911
4911
|
...Xe(x.autocomplete),
|
|
4912
|
-
error:
|
|
4912
|
+
error: A,
|
|
4913
4913
|
size: f
|
|
4914
4914
|
}
|
|
4915
4915
|
);
|
|
@@ -4918,9 +4918,9 @@ const Xs = ({
|
|
|
4918
4918
|
He,
|
|
4919
4919
|
{
|
|
4920
4920
|
...D,
|
|
4921
|
-
onChange: (
|
|
4921
|
+
onChange: (T) => U(x.name, T.target.value),
|
|
4922
4922
|
rows: x.rows ?? 4,
|
|
4923
|
-
error:
|
|
4923
|
+
error: A,
|
|
4924
4924
|
size: f
|
|
4925
4925
|
}
|
|
4926
4926
|
);
|
|
@@ -4929,15 +4929,15 @@ const Xs = ({
|
|
|
4929
4929
|
$e,
|
|
4930
4930
|
{
|
|
4931
4931
|
...D,
|
|
4932
|
-
onChange: (
|
|
4933
|
-
options: (x.options || []).map((
|
|
4934
|
-
...
|
|
4935
|
-
value: String(
|
|
4932
|
+
onChange: (T) => U(x.name, T),
|
|
4933
|
+
options: (x.options || []).map((T) => ({
|
|
4934
|
+
...T,
|
|
4935
|
+
value: String(T.value)
|
|
4936
4936
|
})),
|
|
4937
4937
|
searchable: x.searchable,
|
|
4938
4938
|
multiple: x.multiple,
|
|
4939
4939
|
allowCreate: x.allowCreate,
|
|
4940
|
-
error:
|
|
4940
|
+
error: A,
|
|
4941
4941
|
size: f
|
|
4942
4942
|
}
|
|
4943
4943
|
);
|
|
@@ -4950,10 +4950,10 @@ const Xs = ({
|
|
|
4950
4950
|
{
|
|
4951
4951
|
"aria-label": x.label,
|
|
4952
4952
|
value: S == null ? "" : String(S),
|
|
4953
|
-
onChange: (
|
|
4954
|
-
options: (x.options || []).map((
|
|
4955
|
-
value: String(
|
|
4956
|
-
label:
|
|
4953
|
+
onChange: (T) => U(x.name, T),
|
|
4954
|
+
options: (x.options || []).map((T) => ({
|
|
4955
|
+
value: String(T.value),
|
|
4956
|
+
label: T.label
|
|
4957
4957
|
})),
|
|
4958
4958
|
size: f === "sm" ? "sm" : "md",
|
|
4959
4959
|
className: x.disabled ? "pointer-events-none opacity-50" : void 0
|
|
@@ -4966,12 +4966,12 @@ const Xs = ({
|
|
|
4966
4966
|
...D,
|
|
4967
4967
|
label: x.label,
|
|
4968
4968
|
checked: !!S,
|
|
4969
|
-
onChange: (
|
|
4969
|
+
onChange: (T) => U(x.name, T.target.checked),
|
|
4970
4970
|
size: f
|
|
4971
4971
|
}
|
|
4972
4972
|
);
|
|
4973
4973
|
case "radio":
|
|
4974
|
-
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: x.options?.map((
|
|
4974
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: x.options?.map((T) => /* @__PURE__ */ c(
|
|
4975
4975
|
"label",
|
|
4976
4976
|
{
|
|
4977
4977
|
className: "flex cursor-pointer items-center gap-3 text-base text-text",
|
|
@@ -4981,17 +4981,17 @@ const Xs = ({
|
|
|
4981
4981
|
{
|
|
4982
4982
|
type: "radio",
|
|
4983
4983
|
name: x.name,
|
|
4984
|
-
value:
|
|
4985
|
-
checked: S ===
|
|
4986
|
-
onChange: () =>
|
|
4987
|
-
disabled: E ||
|
|
4984
|
+
value: T.value,
|
|
4985
|
+
checked: S === T.value,
|
|
4986
|
+
onChange: () => U(x.name, T.value),
|
|
4987
|
+
disabled: E || T.disabled,
|
|
4988
4988
|
className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
4989
4989
|
}
|
|
4990
4990
|
),
|
|
4991
|
-
|
|
4991
|
+
T.label
|
|
4992
4992
|
]
|
|
4993
4993
|
},
|
|
4994
|
-
|
|
4994
|
+
T.value
|
|
4995
4995
|
)) });
|
|
4996
4996
|
case "date":
|
|
4997
4997
|
return /* @__PURE__ */ e(
|
|
@@ -4999,7 +4999,7 @@ const Xs = ({
|
|
|
4999
4999
|
{
|
|
5000
5000
|
...D,
|
|
5001
5001
|
value: S ? new Date(S) : null,
|
|
5002
|
-
onChange: (
|
|
5002
|
+
onChange: (T) => U(x.name, T),
|
|
5003
5003
|
size: f
|
|
5004
5004
|
}
|
|
5005
5005
|
);
|
|
@@ -5009,30 +5009,30 @@ const Xs = ({
|
|
|
5009
5009
|
{
|
|
5010
5010
|
...D,
|
|
5011
5011
|
value: S,
|
|
5012
|
-
onChange: (
|
|
5013
|
-
error:
|
|
5014
|
-
onListFiles: (
|
|
5012
|
+
onChange: (T) => U(x.name, T),
|
|
5013
|
+
error: A,
|
|
5014
|
+
onListFiles: (T) => p?.http.invoke({
|
|
5015
5015
|
method: "POST",
|
|
5016
5016
|
action: "storage.file.list",
|
|
5017
|
-
body:
|
|
5017
|
+
body: T
|
|
5018
5018
|
}),
|
|
5019
5019
|
onListMounts: () => p?.http.invoke({
|
|
5020
5020
|
method: "GET",
|
|
5021
5021
|
action: "storage.mount"
|
|
5022
5022
|
}),
|
|
5023
|
-
onUploadFile: (
|
|
5023
|
+
onUploadFile: (T) => p?.http.invoke({
|
|
5024
5024
|
method: "POST",
|
|
5025
5025
|
action: "storage.file.upload",
|
|
5026
|
-
body:
|
|
5026
|
+
body: T
|
|
5027
5027
|
}),
|
|
5028
|
-
onDownloadFile: (
|
|
5028
|
+
onDownloadFile: (T) => p?.http.invoke({
|
|
5029
5029
|
method: "GET",
|
|
5030
|
-
action: `storage.file.${
|
|
5030
|
+
action: `storage.file.${T}.download`
|
|
5031
5031
|
}),
|
|
5032
|
-
onRegisterFile: (
|
|
5032
|
+
onRegisterFile: (T) => p?.http.invoke({
|
|
5033
5033
|
method: "POST",
|
|
5034
5034
|
action: "storage.file.folder",
|
|
5035
|
-
body:
|
|
5035
|
+
body: T
|
|
5036
5036
|
})
|
|
5037
5037
|
}
|
|
5038
5038
|
);
|
|
@@ -5041,7 +5041,7 @@ const Xs = ({
|
|
|
5041
5041
|
gn,
|
|
5042
5042
|
{
|
|
5043
5043
|
value: S || {},
|
|
5044
|
-
onChange: (
|
|
5044
|
+
onChange: (T) => U(x.name, T),
|
|
5045
5045
|
onListFolders: () => p?.http.invoke({
|
|
5046
5046
|
method: "GET",
|
|
5047
5047
|
action: "storage.mount"
|
|
@@ -5054,43 +5054,43 @@ const Xs = ({
|
|
|
5054
5054
|
case "custom":
|
|
5055
5055
|
return x.customComponent?.({
|
|
5056
5056
|
value: S,
|
|
5057
|
-
onChange: (
|
|
5058
|
-
error:
|
|
5057
|
+
onChange: (T) => U(x.name, T),
|
|
5058
|
+
error: A,
|
|
5059
5059
|
disabled: E
|
|
5060
5060
|
});
|
|
5061
5061
|
case "array": {
|
|
5062
|
-
const
|
|
5062
|
+
const T = S || [];
|
|
5063
5063
|
let oe = [];
|
|
5064
|
-
if (typeof
|
|
5064
|
+
if (typeof A == "string" && A.startsWith("["))
|
|
5065
5065
|
try {
|
|
5066
|
-
oe = JSON.parse(
|
|
5066
|
+
oe = JSON.parse(A);
|
|
5067
5067
|
} catch {
|
|
5068
5068
|
}
|
|
5069
5069
|
const ce = () => {
|
|
5070
|
-
|
|
5070
|
+
U(x.name, [...T, {}]);
|
|
5071
5071
|
}, q = (L) => {
|
|
5072
|
-
|
|
5072
|
+
U(
|
|
5073
5073
|
x.name,
|
|
5074
|
-
|
|
5074
|
+
T.filter((k, M) => M !== L)
|
|
5075
5075
|
);
|
|
5076
5076
|
}, H = (L, k, M) => {
|
|
5077
|
-
const
|
|
5078
|
-
|
|
5079
|
-
...
|
|
5077
|
+
const K = [...T];
|
|
5078
|
+
K[L] = {
|
|
5079
|
+
...K[L],
|
|
5080
5080
|
[k]: M
|
|
5081
|
-
},
|
|
5081
|
+
}, U(x.name, K);
|
|
5082
5082
|
};
|
|
5083
5083
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
5084
|
-
|
|
5084
|
+
T.map((L, k) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
|
|
5085
5085
|
/* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: x.arrayFields?.map((M) => {
|
|
5086
|
-
const
|
|
5086
|
+
const K = oe?.[k]?.[M.name];
|
|
5087
5087
|
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
5088
5088
|
k === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
5089
5089
|
M.label,
|
|
5090
5090
|
M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
5091
5091
|
] }),
|
|
5092
5092
|
(() => {
|
|
5093
|
-
const
|
|
5093
|
+
const P = {
|
|
5094
5094
|
value: L?.[M.name] || "",
|
|
5095
5095
|
disabled: E,
|
|
5096
5096
|
required: M.required,
|
|
@@ -5107,7 +5107,7 @@ const Xs = ({
|
|
|
5107
5107
|
return /* @__PURE__ */ e(
|
|
5108
5108
|
Ce,
|
|
5109
5109
|
{
|
|
5110
|
-
...
|
|
5110
|
+
...P,
|
|
5111
5111
|
onChange: (N) => H(
|
|
5112
5112
|
k,
|
|
5113
5113
|
M.name,
|
|
@@ -5115,7 +5115,7 @@ const Xs = ({
|
|
|
5115
5115
|
),
|
|
5116
5116
|
type: M.textType || M.type,
|
|
5117
5117
|
...Xe(M.autocomplete),
|
|
5118
|
-
error:
|
|
5118
|
+
error: K,
|
|
5119
5119
|
size: f
|
|
5120
5120
|
}
|
|
5121
5121
|
);
|
|
@@ -5123,14 +5123,14 @@ const Xs = ({
|
|
|
5123
5123
|
return /* @__PURE__ */ e(
|
|
5124
5124
|
He,
|
|
5125
5125
|
{
|
|
5126
|
-
...
|
|
5126
|
+
...P,
|
|
5127
5127
|
onChange: (N) => H(
|
|
5128
5128
|
k,
|
|
5129
5129
|
M.name,
|
|
5130
5130
|
N.target.value
|
|
5131
5131
|
),
|
|
5132
5132
|
rows: M.rows ?? 4,
|
|
5133
|
-
error:
|
|
5133
|
+
error: K,
|
|
5134
5134
|
size: f
|
|
5135
5135
|
}
|
|
5136
5136
|
);
|
|
@@ -5138,7 +5138,7 @@ const Xs = ({
|
|
|
5138
5138
|
return /* @__PURE__ */ e(
|
|
5139
5139
|
$e,
|
|
5140
5140
|
{
|
|
5141
|
-
...
|
|
5141
|
+
...P,
|
|
5142
5142
|
onChange: (N) => H(k, M.name, N),
|
|
5143
5143
|
options: (M.options || []).map((N) => ({
|
|
5144
5144
|
...N,
|
|
@@ -5147,7 +5147,7 @@ const Xs = ({
|
|
|
5147
5147
|
searchable: M.searchable,
|
|
5148
5148
|
multiple: M.multiple,
|
|
5149
5149
|
allowCreate: M.allowCreate,
|
|
5150
|
-
error:
|
|
5150
|
+
error: K,
|
|
5151
5151
|
size: f
|
|
5152
5152
|
}
|
|
5153
5153
|
);
|
|
@@ -5155,7 +5155,7 @@ const Xs = ({
|
|
|
5155
5155
|
return /* @__PURE__ */ e(
|
|
5156
5156
|
we,
|
|
5157
5157
|
{
|
|
5158
|
-
...
|
|
5158
|
+
...P,
|
|
5159
5159
|
checked: !!L?.[M.name],
|
|
5160
5160
|
onChange: (N) => H(
|
|
5161
5161
|
k,
|
|
@@ -5197,7 +5197,7 @@ const Xs = ({
|
|
|
5197
5197
|
return /* @__PURE__ */ e(
|
|
5198
5198
|
Be,
|
|
5199
5199
|
{
|
|
5200
|
-
...
|
|
5200
|
+
...P,
|
|
5201
5201
|
value: N ? new Date(N) : null,
|
|
5202
5202
|
onChange: (I) => H(k, M.name, I),
|
|
5203
5203
|
size: f
|
|
@@ -5208,7 +5208,7 @@ const Xs = ({
|
|
|
5208
5208
|
return M.customComponent?.({
|
|
5209
5209
|
value: L?.[M.name],
|
|
5210
5210
|
onChange: (N) => H(k, M.name, N),
|
|
5211
|
-
error:
|
|
5211
|
+
error: K,
|
|
5212
5212
|
disabled: E
|
|
5213
5213
|
});
|
|
5214
5214
|
default:
|
|
@@ -5218,7 +5218,7 @@ const Xs = ({
|
|
|
5218
5218
|
] });
|
|
5219
5219
|
}
|
|
5220
5220
|
})(),
|
|
5221
|
-
|
|
5221
|
+
K && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: K })
|
|
5222
5222
|
] }, M.name);
|
|
5223
5223
|
}) }),
|
|
5224
5224
|
/* @__PURE__ */ e(
|
|
@@ -5232,7 +5232,7 @@ const Xs = ({
|
|
|
5232
5232
|
onClick: () => q(k),
|
|
5233
5233
|
disabled: E,
|
|
5234
5234
|
className: i("shrink-0", k === 0 && "mt-5"),
|
|
5235
|
-
children: /* @__PURE__ */ e(
|
|
5235
|
+
children: /* @__PURE__ */ e(Ot, { className: "size-icon-md" })
|
|
5236
5236
|
}
|
|
5237
5237
|
)
|
|
5238
5238
|
] }, k)),
|
|
@@ -5241,7 +5241,7 @@ const Xs = ({
|
|
|
5241
5241
|
{
|
|
5242
5242
|
type: "button",
|
|
5243
5243
|
variant: "secondary",
|
|
5244
|
-
leftIcon: /* @__PURE__ */ e(
|
|
5244
|
+
leftIcon: /* @__PURE__ */ e(Pt, { className: "size-icon-sm" }),
|
|
5245
5245
|
onClick: ce,
|
|
5246
5246
|
disabled: E,
|
|
5247
5247
|
children: [
|
|
@@ -5256,14 +5256,14 @@ const Xs = ({
|
|
|
5256
5256
|
return null;
|
|
5257
5257
|
}
|
|
5258
5258
|
},
|
|
5259
|
-
[h,
|
|
5260
|
-
), de =
|
|
5259
|
+
[h, j, $, b, f, U, O, p?.http.invoke]
|
|
5260
|
+
), de = fe(
|
|
5261
5261
|
(x) => {
|
|
5262
5262
|
if (x.conditional && !x.conditional(h))
|
|
5263
5263
|
return null;
|
|
5264
5264
|
const S = x.items.filter((E) => !(E.hidden || E.conditional && !E.conditional(h)));
|
|
5265
5265
|
if (S.length === 0) return null;
|
|
5266
|
-
const
|
|
5266
|
+
const A = i(
|
|
5267
5267
|
x.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
|
|
5268
5268
|
x.layout !== "flex" && {
|
|
5269
5269
|
"grid-cols-1": !x.columns || x.columns === 1,
|
|
@@ -5283,8 +5283,8 @@ const Xs = ({
|
|
|
5283
5283
|
title: x.title,
|
|
5284
5284
|
description: x.description,
|
|
5285
5285
|
className: "not-last:border-b not-last:border-border-subtle",
|
|
5286
|
-
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className:
|
|
5287
|
-
const D =
|
|
5286
|
+
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: A, children: S.map((E) => {
|
|
5287
|
+
const D = j[E.name] ? $[E.name] : void 0;
|
|
5288
5288
|
return /* @__PURE__ */ c(
|
|
5289
5289
|
"div",
|
|
5290
5290
|
{
|
|
@@ -5300,7 +5300,7 @@ const Xs = ({
|
|
|
5300
5300
|
E.type !== "custom" && E.type !== "checkbox" && /* @__PURE__ */ c(
|
|
5301
5301
|
"label",
|
|
5302
5302
|
{
|
|
5303
|
-
htmlFor:
|
|
5303
|
+
htmlFor: O(E.name),
|
|
5304
5304
|
className: "block text-sm font-medium text-text-muted",
|
|
5305
5305
|
children: [
|
|
5306
5306
|
E.label,
|
|
@@ -5308,7 +5308,7 @@ const Xs = ({
|
|
|
5308
5308
|
]
|
|
5309
5309
|
}
|
|
5310
5310
|
),
|
|
5311
|
-
|
|
5311
|
+
Z(E),
|
|
5312
5312
|
E.help && !D && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: E.help })
|
|
5313
5313
|
]
|
|
5314
5314
|
},
|
|
@@ -5320,8 +5320,8 @@ const Xs = ({
|
|
|
5320
5320
|
)
|
|
5321
5321
|
);
|
|
5322
5322
|
},
|
|
5323
|
-
[h,
|
|
5324
|
-
),
|
|
5323
|
+
[h, j, $, Z, O]
|
|
5324
|
+
), Y = i(
|
|
5325
5325
|
{
|
|
5326
5326
|
"max-w-settings": f === "sm",
|
|
5327
5327
|
"max-w-form": f === "md",
|
|
@@ -5330,10 +5330,10 @@ const Xs = ({
|
|
|
5330
5330
|
},
|
|
5331
5331
|
g
|
|
5332
5332
|
), y = f === "full" ? "md" : f;
|
|
5333
|
-
return /* @__PURE__ */ c("form", { ref: w, onSubmit:
|
|
5333
|
+
return /* @__PURE__ */ c("form", { ref: w, onSubmit: ee, className: Y, children: [
|
|
5334
5334
|
!v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
|
|
5335
5335
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(de) }),
|
|
5336
|
-
v && /* @__PURE__ */
|
|
5336
|
+
v && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: [
|
|
5337
5337
|
/* @__PURE__ */ e("div", { className: "ml-auto" }),
|
|
5338
5338
|
s && /* @__PURE__ */ e(
|
|
5339
5339
|
se,
|
|
@@ -5359,7 +5359,7 @@ const Xs = ({
|
|
|
5359
5359
|
children: u.label
|
|
5360
5360
|
}
|
|
5361
5361
|
)
|
|
5362
|
-
] })
|
|
5362
|
+
] })
|
|
5363
5363
|
] });
|
|
5364
5364
|
};
|
|
5365
5365
|
function Zs({
|
|
@@ -5461,7 +5461,7 @@ function zn(t, r) {
|
|
|
5461
5461
|
}, a.onerror = s, a.readAsDataURL(t);
|
|
5462
5462
|
});
|
|
5463
5463
|
}
|
|
5464
|
-
const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(Le, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Tn = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }),
|
|
5464
|
+
const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(Le, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Tn = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), _n = {
|
|
5465
5465
|
sm: "h-control-sm px-3 text-sm",
|
|
5466
5466
|
md: "h-control-md px-3 text-base",
|
|
5467
5467
|
lg: "h-control-lg px-3 text-base",
|
|
@@ -5471,7 +5471,7 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5471
5471
|
md: "h-5 w-5",
|
|
5472
5472
|
lg: "h-6 w-6",
|
|
5473
5473
|
full: "h-6 w-6"
|
|
5474
|
-
},
|
|
5474
|
+
}, $n = ve(
|
|
5475
5475
|
({
|
|
5476
5476
|
label: t,
|
|
5477
5477
|
helperText: r,
|
|
@@ -5492,10 +5492,10 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5492
5492
|
value: h,
|
|
5493
5493
|
onChange: C,
|
|
5494
5494
|
...z
|
|
5495
|
-
},
|
|
5496
|
-
const
|
|
5497
|
-
|
|
5498
|
-
h !== void 0 &&
|
|
5495
|
+
}, O) => {
|
|
5496
|
+
const $ = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, G = !!n, j = ne(null), W = ne(null), [B, U] = R(h || ""), [ee, Z] = R(!1), [de, Y] = R(!1), [y, x] = R(!1);
|
|
5497
|
+
X(() => {
|
|
5498
|
+
h !== void 0 && U(h);
|
|
5499
5499
|
}, [h]);
|
|
5500
5500
|
const S = pe(() => {
|
|
5501
5501
|
if (p && !y || !B) return f;
|
|
@@ -5504,38 +5504,38 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5504
5504
|
(H) => String(H.label).toLowerCase().includes(q)
|
|
5505
5505
|
);
|
|
5506
5506
|
}, [B, f, p, y]);
|
|
5507
|
-
|
|
5507
|
+
X(() => {
|
|
5508
5508
|
if (!b || !B) {
|
|
5509
|
-
|
|
5509
|
+
Y(!1);
|
|
5510
5510
|
return;
|
|
5511
5511
|
}
|
|
5512
5512
|
const q = setTimeout(async () => {
|
|
5513
|
-
|
|
5513
|
+
Y(!0);
|
|
5514
5514
|
try {
|
|
5515
5515
|
await b(String(B));
|
|
5516
5516
|
} catch (H) {
|
|
5517
5517
|
console.error("Remote search failed:", H);
|
|
5518
5518
|
} finally {
|
|
5519
|
-
|
|
5519
|
+
Y(!1);
|
|
5520
5520
|
}
|
|
5521
5521
|
}, w);
|
|
5522
5522
|
return () => {
|
|
5523
|
-
clearTimeout(q),
|
|
5523
|
+
clearTimeout(q), Y(!1);
|
|
5524
5524
|
};
|
|
5525
|
-
}, [B, w, b]),
|
|
5525
|
+
}, [B, w, b]), X(() => {
|
|
5526
5526
|
const q = (H) => {
|
|
5527
|
-
|
|
5527
|
+
j.current && !j.current.contains(H.target) && Z(!1);
|
|
5528
5528
|
};
|
|
5529
5529
|
return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
|
|
5530
5530
|
}, []);
|
|
5531
|
-
const
|
|
5531
|
+
const A = (q) => {
|
|
5532
5532
|
const H = q.target.value;
|
|
5533
|
-
|
|
5533
|
+
U(H), Z(!0), x(!0), C && C(q);
|
|
5534
5534
|
}, E = (q) => {
|
|
5535
|
-
|
|
5535
|
+
U(q.label), Z(!1), x(!1), g && g(q.value);
|
|
5536
5536
|
}, D = () => {
|
|
5537
|
-
(f.length > 0 || b) && (
|
|
5538
|
-
},
|
|
5537
|
+
(f.length > 0 || b) && (Z(!0), x(!1));
|
|
5538
|
+
}, T = o || de, oe = ee && (S.length > 0 || T), ce = pe(() => O || W, [O]);
|
|
5539
5539
|
return /* @__PURE__ */ c(
|
|
5540
5540
|
"div",
|
|
5541
5541
|
{
|
|
@@ -5545,15 +5545,15 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5545
5545
|
u || "",
|
|
5546
5546
|
"relative"
|
|
5547
5547
|
),
|
|
5548
|
-
ref:
|
|
5548
|
+
ref: j,
|
|
5549
5549
|
children: [
|
|
5550
5550
|
t && /* @__PURE__ */ e(
|
|
5551
5551
|
"label",
|
|
5552
5552
|
{
|
|
5553
|
-
htmlFor:
|
|
5553
|
+
htmlFor: $,
|
|
5554
5554
|
className: Ne(
|
|
5555
5555
|
"block text-sm font-medium mb-1",
|
|
5556
|
-
|
|
5556
|
+
G ? "text-danger-fg" : "text-text",
|
|
5557
5557
|
d || ""
|
|
5558
5558
|
),
|
|
5559
5559
|
children: t
|
|
@@ -5565,9 +5565,9 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5565
5565
|
"input",
|
|
5566
5566
|
{
|
|
5567
5567
|
ref: ce,
|
|
5568
|
-
id:
|
|
5568
|
+
id: $,
|
|
5569
5569
|
value: B,
|
|
5570
|
-
onChange:
|
|
5570
|
+
onChange: A,
|
|
5571
5571
|
onFocus: D,
|
|
5572
5572
|
className: Ne(
|
|
5573
5573
|
// Base styles
|
|
@@ -5575,19 +5575,19 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5575
5575
|
"placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
|
|
5576
5576
|
"disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
|
|
5577
5577
|
// Size styles
|
|
5578
|
-
|
|
5578
|
+
_n[s],
|
|
5579
5579
|
// Icon padding
|
|
5580
5580
|
l ? "pl-10" : "",
|
|
5581
5581
|
"pr-10",
|
|
5582
5582
|
// room for the dropdown/loading icon
|
|
5583
5583
|
// State styles
|
|
5584
|
-
|
|
5584
|
+
G ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
|
|
5585
5585
|
v || ""
|
|
5586
5586
|
),
|
|
5587
5587
|
...z
|
|
5588
5588
|
}
|
|
5589
5589
|
),
|
|
5590
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children:
|
|
5590
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: T || o ? (
|
|
5591
5591
|
// Loading Spinner
|
|
5592
5592
|
/* @__PURE__ */ e(jt, { className: Ne("animate-spin text-info-fg", Re[s]), "aria-hidden": !0 })
|
|
5593
5593
|
) : (
|
|
@@ -5598,34 +5598,26 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5598
5598
|
className: Ne(
|
|
5599
5599
|
"text-text-muted cursor-pointer transition-transform",
|
|
5600
5600
|
Re[s],
|
|
5601
|
-
|
|
5601
|
+
ee ? "rotate-180" : "rotate-0"
|
|
5602
5602
|
),
|
|
5603
5603
|
onClick: () => {
|
|
5604
|
-
|
|
5604
|
+
Z((q) => (q || x(!1), !q));
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
5607
|
)
|
|
5608
5608
|
) })
|
|
5609
5609
|
] }),
|
|
5610
|
-
oe && /* @__PURE__ */ e(
|
|
5611
|
-
"
|
|
5610
|
+
oe && /* @__PURE__ */ e("ul", { className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full", children: S.length > 0 ? S.map((q) => /* @__PURE__ */ e(
|
|
5611
|
+
"li",
|
|
5612
5612
|
{
|
|
5613
|
-
className: "
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
"aria-selected": B === q.label,
|
|
5622
|
-
children: q.label
|
|
5623
|
-
},
|
|
5624
|
-
q.value
|
|
5625
|
-
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: A || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
|
|
5626
|
-
}
|
|
5627
|
-
),
|
|
5628
|
-
(n || r) && /* @__PURE__ */ e("p", { className: Ne("mt-1 text-xs", K ? "text-danger-fg" : "text-text-muted"), children: n || r }),
|
|
5613
|
+
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
5614
|
+
onClick: () => E(q),
|
|
5615
|
+
"aria-selected": B === q.label,
|
|
5616
|
+
children: q.label
|
|
5617
|
+
},
|
|
5618
|
+
q.value
|
|
5619
|
+
)) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: T || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." }) }),
|
|
5620
|
+
(n || r) && /* @__PURE__ */ e("p", { className: Ne("mt-1 text-xs", G ? "text-danger-fg" : "text-text-muted"), children: n || r }),
|
|
5629
5621
|
b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
|
|
5630
5622
|
"Huidige zoekterm (niet-gedebounced): ",
|
|
5631
5623
|
String(B)
|
|
@@ -5635,8 +5627,8 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(
|
|
|
5635
5627
|
);
|
|
5636
5628
|
}
|
|
5637
5629
|
);
|
|
5638
|
-
|
|
5639
|
-
const
|
|
5630
|
+
$n.displayName = "SearchableTextField";
|
|
5631
|
+
const An = ve(
|
|
5640
5632
|
({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
|
|
5641
5633
|
const u = /* @__PURE__ */ e(
|
|
5642
5634
|
"span",
|
|
@@ -5689,7 +5681,7 @@ const $n = ve(
|
|
|
5689
5681
|
);
|
|
5690
5682
|
}
|
|
5691
5683
|
);
|
|
5692
|
-
|
|
5684
|
+
An.displayName = "Switch";
|
|
5693
5685
|
const Dn = [
|
|
5694
5686
|
{ upTo: 1, cols: "grid-cols-1" },
|
|
5695
5687
|
{ upTo: 2, cols: "grid-cols-1 @[22rem]:grid-cols-2" },
|
|
@@ -5699,7 +5691,7 @@ const Dn = [
|
|
|
5699
5691
|
function In(t) {
|
|
5700
5692
|
return Dn.find((r) => t <= r.upTo)?.cols ?? Ln;
|
|
5701
5693
|
}
|
|
5702
|
-
function
|
|
5694
|
+
function On(t, r) {
|
|
5703
5695
|
const n = r ?? t;
|
|
5704
5696
|
if (t <= n) return { shown: t, hidden: 0 };
|
|
5705
5697
|
const s = Math.max(0, n - 1);
|
|
@@ -5707,7 +5699,7 @@ function Pn(t, r) {
|
|
|
5707
5699
|
}
|
|
5708
5700
|
function Qs({ tiles: t, pinned: r, maxStrip: n, className: s }) {
|
|
5709
5701
|
if (r) {
|
|
5710
|
-
const { shown: a, hidden: l } =
|
|
5702
|
+
const { shown: a, hidden: l } = On(t.length, n), o = t.slice(0, a);
|
|
5711
5703
|
return /* @__PURE__ */ c("div", { className: i("@container flex h-full min-h-0 flex-col gap-2", s), children: [
|
|
5712
5704
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: r }),
|
|
5713
5705
|
t.length > 0 && // Fixed height as a share of the pane, with a floor so the strip
|
|
@@ -5776,7 +5768,7 @@ function ta({
|
|
|
5776
5768
|
className: s
|
|
5777
5769
|
}) {
|
|
5778
5770
|
const a = ne(null);
|
|
5779
|
-
return
|
|
5771
|
+
return X(() => {
|
|
5780
5772
|
if (!r || !a.current) return;
|
|
5781
5773
|
const l = t(a.current);
|
|
5782
5774
|
return () => {
|
|
@@ -5794,7 +5786,7 @@ function ta({
|
|
|
5794
5786
|
}
|
|
5795
5787
|
);
|
|
5796
5788
|
}
|
|
5797
|
-
const
|
|
5789
|
+
const Pn = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ft = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
|
|
5798
5790
|
const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
|
|
5799
5791
|
if (a)
|
|
5800
5792
|
return /* @__PURE__ */ c("li", { children: [
|
|
@@ -5909,7 +5901,7 @@ const On = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ft
|
|
|
5909
5901
|
loading: a = !1
|
|
5910
5902
|
}) => a ? /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5911
5903
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5912
|
-
/* @__PURE__ */ e(
|
|
5904
|
+
/* @__PURE__ */ e(Pn, {})
|
|
5913
5905
|
] }) : /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
|
|
5914
5906
|
s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
|
|
5915
5907
|
/* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
|
|
@@ -6170,16 +6162,16 @@ export {
|
|
|
6170
6162
|
ea as ParticipantTile,
|
|
6171
6163
|
rt as Popover,
|
|
6172
6164
|
Ws as ProgressBar,
|
|
6173
|
-
|
|
6165
|
+
ze as RichText,
|
|
6174
6166
|
bs as RowCard,
|
|
6175
6167
|
ct as SearchField,
|
|
6176
|
-
|
|
6168
|
+
$n as SearchableTextField,
|
|
6177
6169
|
Ms as SectionCaption,
|
|
6178
6170
|
Ts as SectionDivider,
|
|
6179
6171
|
lr as SegmentedToggle,
|
|
6180
6172
|
$e as Select,
|
|
6181
|
-
|
|
6182
|
-
|
|
6173
|
+
_s as SettingsFrameProvider,
|
|
6174
|
+
As as SettingsPage,
|
|
6183
6175
|
Ds as SettingsRow,
|
|
6184
6176
|
Ls as SettingsSection,
|
|
6185
6177
|
ra as SidebarMenu,
|
|
@@ -6189,7 +6181,7 @@ export {
|
|
|
6189
6181
|
Gs as StatusDot,
|
|
6190
6182
|
Js as StepIndicator,
|
|
6191
6183
|
Nn as StorageInput,
|
|
6192
|
-
|
|
6184
|
+
An as Switch,
|
|
6193
6185
|
Ys as TabBar,
|
|
6194
6186
|
Ye as Table,
|
|
6195
6187
|
vn as Tabs,
|
|
@@ -6207,7 +6199,7 @@ export {
|
|
|
6207
6199
|
i as cn,
|
|
6208
6200
|
ss as createSizes,
|
|
6209
6201
|
ns as createVariants,
|
|
6210
|
-
|
|
6202
|
+
Os as dateFilterHandler,
|
|
6211
6203
|
ds as identityDotClass,
|
|
6212
6204
|
at as identityPlateClass,
|
|
6213
6205
|
st as identityTone,
|
|
@@ -6215,10 +6207,10 @@ export {
|
|
|
6215
6207
|
js as multiSelectFilterHandler,
|
|
6216
6208
|
hn as normalizeText,
|
|
6217
6209
|
Jt as resolveLucideIcon,
|
|
6218
|
-
|
|
6210
|
+
Ps as selectFilterHandler,
|
|
6219
6211
|
_e as text,
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6212
|
+
Oe as useAnchoredPosition,
|
|
6213
|
+
Or as useSettingsFrame,
|
|
6214
|
+
$s as useSettingsFrameHost
|
|
6223
6215
|
};
|
|
6224
6216
|
//# sourceMappingURL=index.js.map
|