@dinofront/design_system 1.4.0 → 1.4.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 +539 -474
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
2
|
-
import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as ee, Download as A, EyeOff as j, File as M, GripVertical as N, Info as P, Loader2 as F, Menu as
|
|
2
|
+
import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as ee, Download as A, EyeOff as j, File as M, GripVertical as N, Info as P, Loader2 as F, Menu as te, Minus as I, Moon as L, MoreHorizontal as R, MoreVertical as z, Paperclip as B, Pencil as V, Pin as H, PinOff as U, Plus as W, RefreshCw as ne, Search as re, SearchX as ie, Sparkles as G, Sun as ae, Trash2 as K, UploadCloud as oe, User as se, Users as ce, X as q, XCircle as le } from "lucide-react";
|
|
3
3
|
import { clsx as ue } from "clsx";
|
|
4
4
|
import { extendTailwindMerge as de } from "tailwind-merge";
|
|
5
5
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
@@ -267,7 +267,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
267
267
|
r.length && i?.(r), a.length && d?.(a);
|
|
268
268
|
}, F = (e) => {
|
|
269
269
|
e.preventDefault(), A.current = 0, ee(!1), !a && P(Array.from(e.dataTransfer.files ?? []));
|
|
270
|
-
},
|
|
270
|
+
}, te = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, I = /* @__PURE__ */ Y("input", {
|
|
271
271
|
ref: O,
|
|
272
272
|
type: "file",
|
|
273
273
|
accept: e,
|
|
@@ -277,7 +277,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
277
277
|
P(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
278
278
|
},
|
|
279
279
|
className: "sr-only"
|
|
280
|
-
}),
|
|
280
|
+
}), L = (y || C) && /* @__PURE__ */ X("div", {
|
|
281
281
|
className: "flex items-center gap-1.5",
|
|
282
282
|
children: [y && /* @__PURE__ */ X("span", {
|
|
283
283
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
@@ -290,11 +290,11 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
290
290
|
className: "inline-flex items-center gap-1",
|
|
291
291
|
children: C
|
|
292
292
|
})]
|
|
293
|
-
}),
|
|
293
|
+
}), R = S ? /* @__PURE__ */ Y("p", {
|
|
294
294
|
id: `${M}-error`,
|
|
295
295
|
className: "text-p-sm text-red-700",
|
|
296
296
|
children: S
|
|
297
|
-
}) : null,
|
|
297
|
+
}) : null, z = f && l.length > 0 && /* @__PURE__ */ Y("div", {
|
|
298
298
|
className: "flex flex-col gap-2",
|
|
299
299
|
children: l.map((e, t) => /* @__PURE__ */ Y(lt, {
|
|
300
300
|
name: e.name,
|
|
@@ -309,9 +309,9 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
309
309
|
className: Z("flex flex-col gap-1.5", w),
|
|
310
310
|
...E,
|
|
311
311
|
children: [
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
L,
|
|
313
|
+
z,
|
|
314
|
+
R
|
|
315
315
|
]
|
|
316
316
|
});
|
|
317
317
|
if (g !== "dropzone") {
|
|
@@ -322,24 +322,24 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
322
322
|
className: Z("flex flex-col gap-1.5", w),
|
|
323
323
|
...E,
|
|
324
324
|
children: [
|
|
325
|
-
|
|
325
|
+
L,
|
|
326
326
|
/* @__PURE__ */ Y(nt, {
|
|
327
327
|
type: "button",
|
|
328
328
|
variant: "secondary",
|
|
329
329
|
iconOnly: e,
|
|
330
330
|
disabled: a,
|
|
331
331
|
onClick: () => O.current?.click(),
|
|
332
|
-
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ Y(
|
|
332
|
+
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ Y(B, { className: "h-4 w-4" }),
|
|
333
333
|
"aria-label": e ? "Upload file" : void 0,
|
|
334
|
-
children: e ? v ?? /* @__PURE__ */ Y(
|
|
334
|
+
children: e ? v ?? /* @__PURE__ */ Y(V, { className: "h-4 w-4" }) : _ ?? "Choose a file"
|
|
335
335
|
}),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
I,
|
|
337
|
+
z,
|
|
338
|
+
R
|
|
339
339
|
]
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
|
-
let
|
|
342
|
+
let H = /* @__PURE__ */ X("div", {
|
|
343
343
|
ref: D,
|
|
344
344
|
onDragEnter: () => {
|
|
345
345
|
A.current += 1, a || ee(!0);
|
|
@@ -364,7 +364,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
364
364
|
children: [
|
|
365
365
|
/* @__PURE__ */ Y("div", {
|
|
366
366
|
className: "h-10 w-10 rounded-full bg-bg-default flex items-center justify-center text-fg-secondary shadow-z1",
|
|
367
|
-
children: /* @__PURE__ */ Y(
|
|
367
|
+
children: /* @__PURE__ */ Y(oe, { className: "h-5 w-5" })
|
|
368
368
|
}),
|
|
369
369
|
/* @__PURE__ */ X("div", {
|
|
370
370
|
className: "flex flex-col gap-0.5",
|
|
@@ -376,19 +376,19 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
376
376
|
}), " or drag & drop it here."]
|
|
377
377
|
}), /* @__PURE__ */ Y("p", {
|
|
378
378
|
className: "text-p-sm text-fg-tertiary",
|
|
379
|
-
children:
|
|
379
|
+
children: te
|
|
380
380
|
})]
|
|
381
381
|
}),
|
|
382
|
-
|
|
382
|
+
I
|
|
383
383
|
]
|
|
384
384
|
});
|
|
385
|
-
return !
|
|
385
|
+
return !L && !R && !z ? H : /* @__PURE__ */ X("div", {
|
|
386
386
|
className: "flex flex-col gap-1.5",
|
|
387
387
|
children: [
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
388
|
+
L,
|
|
389
|
+
H,
|
|
390
|
+
z,
|
|
391
|
+
R
|
|
392
392
|
]
|
|
393
393
|
});
|
|
394
394
|
}), ct = {
|
|
@@ -463,7 +463,7 @@ var st = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
463
463
|
onClick: o,
|
|
464
464
|
"aria-label": "Remove",
|
|
465
465
|
className: "shrink-0 p-1 rounded-md text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
466
|
-
children: Y(n === "completed" ?
|
|
466
|
+
children: Y(n === "completed" ? K : q, { className: "h-4 w-4" })
|
|
467
467
|
})
|
|
468
468
|
]
|
|
469
469
|
});
|
|
@@ -560,7 +560,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
560
560
|
alt: t ?? n ?? "",
|
|
561
561
|
onError: () => b(!0),
|
|
562
562
|
className: "h-full w-full object-cover"
|
|
563
|
-
}) : n ? k : o ?? /* @__PURE__ */ Y(
|
|
563
|
+
}) : n ? k : o ?? /* @__PURE__ */ Y(se, { className: "h-1/2 w-1/2 text-white/90" })
|
|
564
564
|
}),
|
|
565
565
|
i && /* @__PURE__ */ Y("span", {
|
|
566
566
|
"aria-label": i,
|
|
@@ -573,7 +573,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
573
573
|
},
|
|
574
574
|
"aria-label": "Change avatar image",
|
|
575
575
|
className: Z("absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full ring-2 ring-white bg-brand-500 text-white hover:bg-brand-600 transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", mt[r]),
|
|
576
|
-
children: /* @__PURE__ */ Y(
|
|
576
|
+
children: /* @__PURE__ */ Y(V, { className: "h-1/2 w-1/2" })
|
|
577
577
|
}), /* @__PURE__ */ Y("input", {
|
|
578
578
|
ref: C,
|
|
579
579
|
type: "file",
|
|
@@ -694,7 +694,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
694
694
|
disabled: l,
|
|
695
695
|
"aria-label": "Dismiss",
|
|
696
696
|
className: "inline-flex shrink-0 -mr-0.5 rounded-full p-0.5 hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
697
|
-
children: /* @__PURE__ */ Y(
|
|
697
|
+
children: /* @__PURE__ */ Y(q, { className: "h-3 w-3" })
|
|
698
698
|
})
|
|
699
699
|
]
|
|
700
700
|
});
|
|
@@ -841,7 +841,7 @@ var _t = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
841
841
|
...m
|
|
842
842
|
}), /* @__PURE__ */ Y("span", {
|
|
843
843
|
className: Z("flex items-center justify-center border transition-colors", Rt[e], !a && "bg-bg-default", v ? "border-red-600" : a ? "border-brand-500" : "border-border-strong", !c && !a && (v ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !a && "peer-checked:bg-brand-500 peer-checked:border-brand-500", a && "bg-brand-500", c && !a && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !a && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
|
|
844
|
-
children: Y(a ?
|
|
844
|
+
children: Y(a ? I : b, {
|
|
845
845
|
className: Z(zt[e], "text-white"),
|
|
846
846
|
strokeWidth: 3,
|
|
847
847
|
"aria-hidden": !0
|
|
@@ -1177,7 +1177,7 @@ var qt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1177
1177
|
onClick: () => T(S - a),
|
|
1178
1178
|
"aria-label": "Decrease",
|
|
1179
1179
|
className: $t,
|
|
1180
|
-
children: /* @__PURE__ */ Y(
|
|
1180
|
+
children: /* @__PURE__ */ Y(I, { className: "size-4" })
|
|
1181
1181
|
}),
|
|
1182
1182
|
rightAddon: /* @__PURE__ */ Y("button", {
|
|
1183
1183
|
type: "button",
|
|
@@ -1185,7 +1185,7 @@ var qt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1185
1185
|
onClick: () => T(S + a),
|
|
1186
1186
|
"aria-label": "Increase",
|
|
1187
1187
|
className: $t,
|
|
1188
|
-
children: /* @__PURE__ */ Y(
|
|
1188
|
+
children: /* @__PURE__ */ Y(W, { className: "size-4" })
|
|
1189
1189
|
}),
|
|
1190
1190
|
className: Z("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
1191
1191
|
..._
|
|
@@ -1265,20 +1265,20 @@ function mn(e, t) {
|
|
|
1265
1265
|
return i;
|
|
1266
1266
|
}
|
|
1267
1267
|
var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, error: D = !1, errorText: O, id: k, className: ee, wrapperClassName: A, dataTestId: j }, M) {
|
|
1268
|
-
let N = u(), P = k ?? N, [F,
|
|
1268
|
+
let N = u(), P = k ?? N, [F, te] = m(!1), [I, L] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [R, z] = m(null), B = p(null), V = D || !!O, H = O ? `${P}-error` : g ? `${P}-help` : void 0;
|
|
1269
1269
|
l(() => {
|
|
1270
|
-
b &&
|
|
1270
|
+
b && te(!1);
|
|
1271
1271
|
}, [b]), l(() => {
|
|
1272
1272
|
if (!F) return;
|
|
1273
1273
|
let e = (e) => {
|
|
1274
|
-
|
|
1274
|
+
B.current && !B.current.contains(e.target) && te(!1);
|
|
1275
1275
|
};
|
|
1276
1276
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1277
1277
|
}, [F]);
|
|
1278
|
-
let
|
|
1279
|
-
function
|
|
1278
|
+
let U = r ? i?.start ? `${pn(i.start, c)}${i.end ? ` – ${pn(i.end, c)}` : ""}` : "" : e ? pn(e, c) : "";
|
|
1279
|
+
function W(e) {
|
|
1280
1280
|
if (!r) {
|
|
1281
|
-
t?.(e),
|
|
1281
|
+
t?.(e), te(!1);
|
|
1282
1282
|
return;
|
|
1283
1283
|
}
|
|
1284
1284
|
let n = i ?? {
|
|
@@ -1302,27 +1302,27 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1302
1302
|
a?.({
|
|
1303
1303
|
start: n.start,
|
|
1304
1304
|
end: e
|
|
1305
|
-
}),
|
|
1305
|
+
}), te(!1);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function ne(e) {
|
|
1308
1308
|
e.stopPropagation(), r ? (a?.({
|
|
1309
1309
|
start: null,
|
|
1310
1310
|
end: null
|
|
1311
|
-
}),
|
|
1311
|
+
}), z(null)) : t?.(null);
|
|
1312
1312
|
}
|
|
1313
|
-
let { firstDayOfWeek:
|
|
1313
|
+
let { firstDayOfWeek: re, monthNames: ie, weekdayNames: G } = f(() => {
|
|
1314
1314
|
let e = rn(s), t = an(e);
|
|
1315
1315
|
return {
|
|
1316
1316
|
firstDayOfWeek: t,
|
|
1317
1317
|
monthNames: on(e),
|
|
1318
1318
|
weekdayNames: cn(e, t)
|
|
1319
1319
|
};
|
|
1320
|
-
}, [s]),
|
|
1320
|
+
}, [s]), ae = mn(I, re), K = i ?? {
|
|
1321
1321
|
start: null,
|
|
1322
1322
|
end: null
|
|
1323
|
-
},
|
|
1323
|
+
}, oe = K.end ?? R;
|
|
1324
1324
|
return /* @__PURE__ */ X("div", {
|
|
1325
|
-
ref:
|
|
1325
|
+
ref: B,
|
|
1326
1326
|
"data-test-id": j,
|
|
1327
1327
|
className: Z("flex flex-col gap-1.5", v && "w-full", A),
|
|
1328
1328
|
children: [
|
|
@@ -1342,24 +1342,24 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1342
1342
|
id: P,
|
|
1343
1343
|
type: "button",
|
|
1344
1344
|
disabled: b,
|
|
1345
|
-
"aria-invalid":
|
|
1345
|
+
"aria-invalid": V || void 0,
|
|
1346
1346
|
"aria-required": h || void 0,
|
|
1347
|
-
"aria-describedby":
|
|
1348
|
-
onClick: () =>
|
|
1349
|
-
className: Z("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2",
|
|
1347
|
+
"aria-describedby": H,
|
|
1348
|
+
onClick: () => te((e) => !e),
|
|
1349
|
+
className: Z("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", V ? "border-red-600" : "border-border-default", !b && !V && "hover:border-border-strong", V ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", b && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", v ? "w-full min-w-0" : "min-w-[260px]", tn[o], ee),
|
|
1350
1350
|
children: [/* @__PURE__ */ Y("span", {
|
|
1351
|
-
className: Z("flex-1 text-left truncate", b ? "text-fg-disabled" :
|
|
1352
|
-
children:
|
|
1353
|
-
}), n &&
|
|
1351
|
+
className: Z("flex-1 text-left truncate", b ? "text-fg-disabled" : U ? "text-fg-default" : "text-fg-tertiary"),
|
|
1352
|
+
children: U || _
|
|
1353
|
+
}), n && U && !b ? /* @__PURE__ */ Y("span", {
|
|
1354
1354
|
role: "button",
|
|
1355
1355
|
tabIndex: 0,
|
|
1356
1356
|
"aria-label": "Clear date",
|
|
1357
|
-
onClick:
|
|
1357
|
+
onClick: ne,
|
|
1358
1358
|
onKeyDown: (e) => {
|
|
1359
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1359
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), ne(e));
|
|
1360
1360
|
},
|
|
1361
1361
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
|
|
1362
|
-
children: /* @__PURE__ */ Y(
|
|
1362
|
+
children: /* @__PURE__ */ Y(q, { className: "w-4 h-4 text-fg-secondary" })
|
|
1363
1363
|
}) : /* @__PURE__ */ Y(y, { className: Z("w-4 h-4", b ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
1364
1364
|
}), F && /* @__PURE__ */ X("div", {
|
|
1365
1365
|
className: "absolute z-50 mt-1 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
|
|
@@ -1369,40 +1369,40 @@ var hn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1369
1369
|
/* @__PURE__ */ Y("button", {
|
|
1370
1370
|
type: "button",
|
|
1371
1371
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1372
|
-
onClick: () =>
|
|
1372
|
+
onClick: () => L(new Date(I.getFullYear(), I.getMonth() - 1, 1)),
|
|
1373
1373
|
"aria-label": "Previous month",
|
|
1374
1374
|
children: /* @__PURE__ */ Y(C, { className: "w-4 h-4" })
|
|
1375
1375
|
}),
|
|
1376
1376
|
/* @__PURE__ */ X("div", {
|
|
1377
1377
|
className: "text-p-md font-semibold text-fg-default",
|
|
1378
1378
|
children: [
|
|
1379
|
-
|
|
1379
|
+
ie[I.getMonth()],
|
|
1380
1380
|
" ",
|
|
1381
|
-
|
|
1381
|
+
I.getFullYear()
|
|
1382
1382
|
]
|
|
1383
1383
|
}),
|
|
1384
1384
|
/* @__PURE__ */ Y("button", {
|
|
1385
1385
|
type: "button",
|
|
1386
1386
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1387
|
-
onClick: () =>
|
|
1387
|
+
onClick: () => L(new Date(I.getFullYear(), I.getMonth() + 1, 1)),
|
|
1388
1388
|
"aria-label": "Next month",
|
|
1389
1389
|
children: /* @__PURE__ */ Y(w, { className: "w-4 h-4" })
|
|
1390
1390
|
})
|
|
1391
1391
|
]
|
|
1392
1392
|
}), /* @__PURE__ */ X("div", {
|
|
1393
1393
|
className: "grid grid-cols-7 gap-1 text-center",
|
|
1394
|
-
children: [
|
|
1394
|
+
children: [G.map((e, t) => /* @__PURE__ */ Y("div", {
|
|
1395
1395
|
className: "text-p-xs text-fg-tertiary py-1",
|
|
1396
1396
|
children: e
|
|
1397
|
-
}, t)),
|
|
1397
|
+
}, t)), ae.map((t, n) => {
|
|
1398
1398
|
if (!t) return /* @__PURE__ */ Y("div", {}, n);
|
|
1399
|
-
let i = fn(t, x, S, T, E), a = !r && un(t, e ?? null), o = r && un(t,
|
|
1399
|
+
let i = fn(t, x, S, T, E), a = !r && un(t, e ?? null), o = r && un(t, K.start), s = r && un(t, oe), c = r && !!K.start && !!oe && t > K.start && t < oe;
|
|
1400
1400
|
return /* @__PURE__ */ Y("button", {
|
|
1401
1401
|
type: "button",
|
|
1402
1402
|
disabled: i,
|
|
1403
1403
|
"aria-disabled": i || void 0,
|
|
1404
|
-
onMouseEnter: () => !i && r &&
|
|
1405
|
-
onClick: () => !i &&
|
|
1404
|
+
onMouseEnter: () => !i && r && K.start && !K.end && z(t),
|
|
1405
|
+
onClick: () => !i && W(t),
|
|
1406
1406
|
className: Z("h-8 rounded-md text-p-sm font-medium", i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
|
|
1407
1407
|
children: t.getDate()
|
|
1408
1408
|
}, n);
|
|
@@ -1568,7 +1568,7 @@ var Cn = {
|
|
|
1568
1568
|
onClick: t,
|
|
1569
1569
|
"aria-label": "Close",
|
|
1570
1570
|
className: "p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
1571
|
-
children: /* @__PURE__ */ Y(
|
|
1571
|
+
children: /* @__PURE__ */ Y(q, { className: "h-5 w-5" })
|
|
1572
1572
|
})]
|
|
1573
1573
|
})]
|
|
1574
1574
|
}),
|
|
@@ -1945,7 +1945,7 @@ var Fn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1945
1945
|
...s,
|
|
1946
1946
|
children: [
|
|
1947
1947
|
r ?? /* @__PURE__ */ Y(Hn, {
|
|
1948
|
-
icon:
|
|
1948
|
+
icon: ie,
|
|
1949
1949
|
tone: "gray",
|
|
1950
1950
|
shape: "circle",
|
|
1951
1951
|
size: Yn[e]
|
|
@@ -2025,7 +2025,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2025
2025
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
|
|
2026
2026
|
},
|
|
2027
2027
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
|
|
2028
|
-
children: /* @__PURE__ */ Y(
|
|
2028
|
+
children: /* @__PURE__ */ Y(q, { className: "h-3 w-3" })
|
|
2029
2029
|
}) : /* @__PURE__ */ Y(S, {
|
|
2030
2030
|
className: Z("h-4 w-4 text-fg-secondary transition-transform", f && "rotate-180"),
|
|
2031
2031
|
"aria-hidden": !0
|
|
@@ -2165,7 +2165,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2165
2165
|
discovery: {
|
|
2166
2166
|
container: "bg-purple-50 border-purple-200",
|
|
2167
2167
|
iconColor: "text-purple-700",
|
|
2168
|
-
DefaultIcon:
|
|
2168
|
+
DefaultIcon: G
|
|
2169
2169
|
}
|
|
2170
2170
|
}, ar = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
2171
2171
|
let { container: u, iconColor: d, DefaultIcon: f } = ir[e];
|
|
@@ -2205,7 +2205,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2205
2205
|
onClick: r,
|
|
2206
2206
|
"aria-label": "Dismiss",
|
|
2207
2207
|
className: "flex-shrink-0 -mr-1 -mt-1 p-1 rounded-md text-fg-secondary hover:text-fg-default hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
2208
|
-
children: /* @__PURE__ */ Y(
|
|
2208
|
+
children: /* @__PURE__ */ Y(q, { className: "h-4 w-4" })
|
|
2209
2209
|
})
|
|
2210
2210
|
]
|
|
2211
2211
|
});
|
|
@@ -2293,7 +2293,7 @@ var $n = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2293
2293
|
onClick: t,
|
|
2294
2294
|
"aria-label": "Close",
|
|
2295
2295
|
className: "-mr-2 -mt-2 p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
2296
|
-
children: /* @__PURE__ */ Y(
|
|
2296
|
+
children: /* @__PURE__ */ Y(q, { className: "h-5 w-5" })
|
|
2297
2297
|
})]
|
|
2298
2298
|
}),
|
|
2299
2299
|
i && /* @__PURE__ */ Y("div", {
|
|
@@ -2336,10 +2336,10 @@ var ur = {
|
|
|
2336
2336
|
avatar: "sm"
|
|
2337
2337
|
}
|
|
2338
2338
|
}, dr = a(function({ options: e, value: n, onChange: r, onAdd: i, onRemove: a, size: o = "md", placeholder: s = "Select…", addMorePlaceholder: c = "Add another…", disabled: d = !1, loading: h = !1, error: g = !1, label: _, labelAddons: v, helperText: y, errorText: b, required: x = !1, lockedValues: S = [], max: C, searchable: w = !0, suggestionsLabel: T = "Suggestions", emptyText: E = "No matches. Try a different search.", showAvatars: D = !1, id: O, className: k, wrapperClassName: ee, dataTestId: A }, j) {
|
|
2339
|
-
let M = u(), N = O ?? M, P = `${N}-listbox`,
|
|
2340
|
-
|
|
2341
|
-
},
|
|
2342
|
-
let t =
|
|
2339
|
+
let M = u(), N = O ?? M, P = `${N}-listbox`, te = g || !!b, [I, L] = m(""), [R, z] = m(!1), [B, V] = m(0), H = p(null), U = p(null), W = (e) => {
|
|
2340
|
+
U.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
|
|
2341
|
+
}, ne = f(() => new Map(e.map((e) => [String(e.value), e])), [e]), ie = f(() => n.map((e) => ne.get(String(e))).filter((e) => !!e), [n, ne]), G = f(() => {
|
|
2342
|
+
let t = I.trim().toLowerCase();
|
|
2343
2343
|
return e.filter((e) => {
|
|
2344
2344
|
if (Ke(n, e.value)) return !1;
|
|
2345
2345
|
if (t === "") return !0;
|
|
@@ -2349,37 +2349,37 @@ var ur = {
|
|
|
2349
2349
|
}, [
|
|
2350
2350
|
e,
|
|
2351
2351
|
n,
|
|
2352
|
-
|
|
2353
|
-
]),
|
|
2352
|
+
I
|
|
2353
|
+
]), ae = C !== void 0 && n.length >= C;
|
|
2354
2354
|
l(() => {
|
|
2355
|
-
if (!
|
|
2355
|
+
if (!R) return;
|
|
2356
2356
|
let e = (e) => {
|
|
2357
|
-
|
|
2357
|
+
H.current && !H.current.contains(e.target) && z(!1);
|
|
2358
2358
|
};
|
|
2359
2359
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2360
|
-
}, [
|
|
2361
|
-
|
|
2362
|
-
}, [
|
|
2363
|
-
h &&
|
|
2360
|
+
}, [R]), l(() => {
|
|
2361
|
+
V((e) => Math.min(e, Math.max(0, G.length - 1)));
|
|
2362
|
+
}, [G.length]), l(() => {
|
|
2363
|
+
h && z(!1);
|
|
2364
2364
|
}, [h]);
|
|
2365
|
-
let
|
|
2366
|
-
let t =
|
|
2367
|
-
d ||
|
|
2368
|
-
}, ae = (e) => {
|
|
2369
|
-
d || Ke(S, e) || (r(n.filter((t) => !Q(t, e))), a?.(e));
|
|
2365
|
+
let K = (e) => {
|
|
2366
|
+
let t = ne.get(String(e));
|
|
2367
|
+
d || ae || !t || t.disabled || (r([...n, e]), i?.(t), L(""), V(0), U.current?.focus());
|
|
2370
2368
|
}, oe = (e) => {
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2369
|
+
d || Ke(S, e) || (r(n.filter((t) => !Q(t, e))), a?.(e));
|
|
2370
|
+
}, se = (e) => {
|
|
2371
|
+
if (!G.length) return;
|
|
2372
|
+
let t = B;
|
|
2373
|
+
for (let n = 0; n < G.length && (t = (t + e + G.length) % G.length, G[t]?.disabled); n++);
|
|
2374
|
+
V(t);
|
|
2375
2375
|
}, le = (e) => {
|
|
2376
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
2377
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
2378
|
-
else if (e.key === "Enter")
|
|
2379
|
-
else if (e.key === "Escape")
|
|
2380
|
-
else if (e.key === "Backspace" &&
|
|
2381
|
-
let e = [...
|
|
2382
|
-
e &&
|
|
2376
|
+
if (e.key === "ArrowDown") e.preventDefault(), R ? se(1) : h || z(!0);
|
|
2377
|
+
else if (e.key === "ArrowUp") e.preventDefault(), se(-1);
|
|
2378
|
+
else if (e.key === "Enter") R && G[B] && !G[B].disabled && (e.preventDefault(), K(G[B].value));
|
|
2379
|
+
else if (e.key === "Escape") z(!1);
|
|
2380
|
+
else if (e.key === "Backspace" && I === "" && ie.length > 0) {
|
|
2381
|
+
let e = [...ie].reverse().find((e) => !Ke(S, e.value));
|
|
2382
|
+
e && oe(e.value);
|
|
2383
2383
|
}
|
|
2384
2384
|
}, ue = b ? `${N}-error` : y ? `${N}-help` : void 0;
|
|
2385
2385
|
return /* @__PURE__ */ X("div", {
|
|
@@ -2402,13 +2402,13 @@ var ur = {
|
|
|
2402
2402
|
})]
|
|
2403
2403
|
}),
|
|
2404
2404
|
/* @__PURE__ */ X("div", {
|
|
2405
|
-
ref:
|
|
2405
|
+
ref: H,
|
|
2406
2406
|
className: "relative",
|
|
2407
2407
|
children: [/* @__PURE__ */ X("div", {
|
|
2408
|
-
className: Z("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", ur[o].box, d ? "opacity-60 cursor-not-allowed border-border-default" :
|
|
2409
|
-
onClick: () => !d && !h &&
|
|
2408
|
+
className: Z("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", ur[o].box, d ? "opacity-60 cursor-not-allowed border-border-default" : te ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", h && "cursor-wait", k),
|
|
2409
|
+
onClick: () => !d && !h && U.current?.focus(),
|
|
2410
2410
|
children: [
|
|
2411
|
-
|
|
2411
|
+
ie.map((e) => {
|
|
2412
2412
|
let t = Ke(S, e.value);
|
|
2413
2413
|
return /* @__PURE__ */ X("span", {
|
|
2414
2414
|
className: Z("inline-flex items-center gap-1.5 rounded-full text-fg-default bg-bg-subtle", ur[o].chip, ur[o].chipText),
|
|
@@ -2430,36 +2430,36 @@ var ur = {
|
|
|
2430
2430
|
!t && !d && /* @__PURE__ */ Y("button", {
|
|
2431
2431
|
type: "button",
|
|
2432
2432
|
onClick: (t) => {
|
|
2433
|
-
t.stopPropagation(),
|
|
2433
|
+
t.stopPropagation(), oe(e.value);
|
|
2434
2434
|
},
|
|
2435
2435
|
"aria-label": `Remove ${lr(e) ?? String(e.value)}`,
|
|
2436
2436
|
className: "-mr-0.5 ml-0.5 text-fg-tertiary hover:text-fg-default p-0.5 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
2437
|
-
children: /* @__PURE__ */ Y(
|
|
2437
|
+
children: /* @__PURE__ */ Y(q, { className: "w-3 h-3" })
|
|
2438
2438
|
})
|
|
2439
2439
|
]
|
|
2440
2440
|
}, String(e.value));
|
|
2441
2441
|
}),
|
|
2442
2442
|
/* @__PURE__ */ Y("input", {
|
|
2443
|
-
ref:
|
|
2443
|
+
ref: W,
|
|
2444
2444
|
id: N,
|
|
2445
2445
|
type: "text",
|
|
2446
2446
|
role: "combobox",
|
|
2447
|
-
"aria-expanded":
|
|
2447
|
+
"aria-expanded": R,
|
|
2448
2448
|
"aria-controls": P,
|
|
2449
2449
|
"aria-autocomplete": "list",
|
|
2450
|
-
"aria-activedescendant":
|
|
2451
|
-
"aria-invalid":
|
|
2450
|
+
"aria-activedescendant": R && G[B] ? `${P}-opt-${B}` : void 0,
|
|
2451
|
+
"aria-invalid": te || void 0,
|
|
2452
2452
|
"aria-describedby": ue,
|
|
2453
2453
|
"aria-busy": h || void 0,
|
|
2454
|
-
value:
|
|
2454
|
+
value: I,
|
|
2455
2455
|
readOnly: !w,
|
|
2456
|
-
disabled: d ||
|
|
2456
|
+
disabled: d || ae,
|
|
2457
2457
|
onChange: (e) => {
|
|
2458
|
-
|
|
2458
|
+
L(e.target.value), h || z(!0);
|
|
2459
2459
|
},
|
|
2460
|
-
onFocus: () => !h &&
|
|
2460
|
+
onFocus: () => !h && z(!0),
|
|
2461
2461
|
onKeyDown: le,
|
|
2462
|
-
placeholder:
|
|
2462
|
+
placeholder: ie.length === 0 ? s : ae ? `Limit ${C} reached` : c,
|
|
2463
2463
|
className: Z("flex-1 bg-transparent outline-none text-fg-default placeholder:text-fg-tertiary disabled:cursor-not-allowed", !w && "cursor-pointer", ur[o].input)
|
|
2464
2464
|
}),
|
|
2465
2465
|
h && /* @__PURE__ */ Y(F, {
|
|
@@ -2467,17 +2467,17 @@ var ur = {
|
|
|
2467
2467
|
"aria-hidden": !0
|
|
2468
2468
|
})
|
|
2469
2469
|
]
|
|
2470
|
-
}),
|
|
2470
|
+
}), R && !d && !h && !ae && /* @__PURE__ */ X("div", {
|
|
2471
2471
|
className: "absolute top-full left-0 right-0 mt-1 z-20 max-h-80 overflow-y-auto rounded-lg border border-border-default bg-bg-default shadow-z4",
|
|
2472
2472
|
children: [/* @__PURE__ */ X("div", {
|
|
2473
2473
|
className: "px-3 py-2 border-b border-border-subtle flex items-center gap-2 text-p-sm text-fg-tertiary",
|
|
2474
|
-
children: [/* @__PURE__ */ Y(
|
|
2474
|
+
children: [/* @__PURE__ */ Y(re, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ Y("span", {
|
|
2475
2475
|
className: "truncate",
|
|
2476
|
-
children:
|
|
2476
|
+
children: I ? `Matches for "${I}"` : T
|
|
2477
2477
|
})]
|
|
2478
|
-
}),
|
|
2478
|
+
}), G.length === 0 ? /* @__PURE__ */ X("div", {
|
|
2479
2479
|
className: "px-3 py-6 text-center",
|
|
2480
|
-
children: [/* @__PURE__ */ Y(
|
|
2480
|
+
children: [/* @__PURE__ */ Y(ce, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ Y("span", {
|
|
2481
2481
|
className: "text-p-sm text-fg-secondary",
|
|
2482
2482
|
children: E
|
|
2483
2483
|
})]
|
|
@@ -2485,23 +2485,23 @@ var ur = {
|
|
|
2485
2485
|
role: "listbox",
|
|
2486
2486
|
id: P,
|
|
2487
2487
|
className: "py-1",
|
|
2488
|
-
children:
|
|
2488
|
+
children: G.map((e, n) => /* @__PURE__ */ X(t, { children: [!!e.group && e.group !== G[n - 1]?.group && /* @__PURE__ */ Y("li", {
|
|
2489
2489
|
role: "presentation",
|
|
2490
2490
|
className: "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
|
|
2491
2491
|
children: e.group
|
|
2492
2492
|
}), /* @__PURE__ */ Y("li", {
|
|
2493
2493
|
role: "option",
|
|
2494
2494
|
id: `${P}-opt-${n}`,
|
|
2495
|
-
"aria-selected": n ===
|
|
2495
|
+
"aria-selected": n === B,
|
|
2496
2496
|
"aria-disabled": e.disabled || void 0,
|
|
2497
2497
|
children: /* @__PURE__ */ X("button", {
|
|
2498
2498
|
type: "button",
|
|
2499
2499
|
disabled: e.disabled,
|
|
2500
|
-
onMouseEnter: () =>
|
|
2500
|
+
onMouseEnter: () => V(n),
|
|
2501
2501
|
onMouseDown: (t) => {
|
|
2502
|
-
t.preventDefault(),
|
|
2502
|
+
t.preventDefault(), K(e.value);
|
|
2503
2503
|
},
|
|
2504
|
-
className: Z("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : n ===
|
|
2504
|
+
className: Z("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : n === B ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
|
|
2505
2505
|
children: [(D || e.avatarSrc) && /* @__PURE__ */ Y(_t, {
|
|
2506
2506
|
src: e.avatarSrc,
|
|
2507
2507
|
name: lr(e),
|
|
@@ -2599,7 +2599,7 @@ var vr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2599
2599
|
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ Y("span", {
|
|
2600
2600
|
"aria-hidden": !0,
|
|
2601
2601
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2602
|
-
children: /* @__PURE__ */ Y(
|
|
2602
|
+
children: /* @__PURE__ */ Y(R, { className: "h-4 w-4" })
|
|
2603
2603
|
}, `${t}-${r}`);
|
|
2604
2604
|
let i = t === e;
|
|
2605
2605
|
return /* @__PURE__ */ Y("button", {
|
|
@@ -2880,50 +2880,50 @@ function Rr(e) {
|
|
|
2880
2880
|
return e.findIndex((e) => !e.disabled);
|
|
2881
2881
|
}
|
|
2882
2882
|
var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeholder: a = "Select…", label: o, labelAddons: s, helperText: c, errorText: d, error: h = !1, required: g = !1, loading: _ = !1, searchable: v = !1, searchPlaceholder: y = "Search…", emptyText: x = "No results", size: C = "md", disabled: w, id: T, className: E, wrapperClassName: D, dataTestId: O }, k) {
|
|
2883
|
-
let ee = u(), A = T ?? ee, j = `${A}-listbox`, [M, N] = m(!1), [P,
|
|
2884
|
-
let t = v ?
|
|
2883
|
+
let ee = u(), A = T ?? ee, j = `${A}-listbox`, [M, N] = m(!1), [P, te] = m(r), I = n !== void 0, L = I ? n : P, R = p(null), z = p(null), B = p(null), [V, H] = m(-1), [U, W] = m(""), ne = h || !!d, ie = d ? `${A}-error` : c ? `${A}-help` : void 0, G = e.find((e) => Q(e.value, L)), ae = f(() => e.some((e) => e.icon != null), [e]), K = f(() => {
|
|
2884
|
+
let t = v ? U.trim().toLowerCase() : "";
|
|
2885
2885
|
return t ? e.filter((e) => (e.searchText ?? (typeof e.label == "string" ? e.label : void 0) ?? String(e.value)).toLowerCase().includes(t)) : e;
|
|
2886
2886
|
}, [
|
|
2887
2887
|
e,
|
|
2888
|
-
|
|
2888
|
+
U,
|
|
2889
2889
|
v
|
|
2890
|
-
]),
|
|
2891
|
-
|
|
2890
|
+
]), oe = (e) => {
|
|
2891
|
+
I || te(e), i?.(e), N(!1), v && z.current?.focus();
|
|
2892
2892
|
};
|
|
2893
2893
|
l(() => {
|
|
2894
2894
|
if (!M) return;
|
|
2895
2895
|
let e = (e) => {
|
|
2896
|
-
|
|
2896
|
+
R.current?.contains(e.target) || N(!1);
|
|
2897
2897
|
};
|
|
2898
2898
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2899
2899
|
}, [M]), l(() => {
|
|
2900
2900
|
if (!M) {
|
|
2901
|
-
|
|
2901
|
+
H(-1), W("");
|
|
2902
2902
|
return;
|
|
2903
2903
|
}
|
|
2904
|
-
let e =
|
|
2905
|
-
|
|
2904
|
+
let e = K.findIndex((e) => Q(e.value, L));
|
|
2905
|
+
H(e >= 0 && !K[e]?.disabled ? e : Rr(K));
|
|
2906
2906
|
}, [
|
|
2907
2907
|
M,
|
|
2908
|
-
|
|
2909
|
-
|
|
2908
|
+
L,
|
|
2909
|
+
K
|
|
2910
2910
|
]), l(() => {
|
|
2911
|
-
M && v &&
|
|
2911
|
+
M && v && B.current?.focus();
|
|
2912
2912
|
}, [M, v]), l(() => {
|
|
2913
2913
|
_ && N(!1);
|
|
2914
2914
|
}, [_]);
|
|
2915
|
-
let
|
|
2916
|
-
let t =
|
|
2915
|
+
let se = (e) => {
|
|
2916
|
+
let t = K.length;
|
|
2917
2917
|
if (t === 0) return;
|
|
2918
|
-
let n =
|
|
2919
|
-
for (let r = 0; r < t && (n = (n + e + t) % t,
|
|
2920
|
-
|
|
2921
|
-
},
|
|
2922
|
-
let e =
|
|
2923
|
-
e && !e.disabled &&
|
|
2918
|
+
let n = V < 0 ? e === 1 ? -1 : 0 : V;
|
|
2919
|
+
for (let r = 0; r < t && (n = (n + e + t) % t, K[n]?.disabled); r++);
|
|
2920
|
+
H(n);
|
|
2921
|
+
}, ce = () => {
|
|
2922
|
+
let e = K[V];
|
|
2923
|
+
e && !e.disabled && oe(e.value);
|
|
2924
2924
|
};
|
|
2925
2925
|
return /* @__PURE__ */ X("div", {
|
|
2926
|
-
ref:
|
|
2926
|
+
ref: R,
|
|
2927
2927
|
"data-test-id": O,
|
|
2928
2928
|
className: Z("flex flex-col gap-1.5 w-full relative", D),
|
|
2929
2929
|
children: [
|
|
@@ -2943,7 +2943,7 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
|
|
|
2943
2943
|
})]
|
|
2944
2944
|
}),
|
|
2945
2945
|
/* @__PURE__ */ X("button", {
|
|
2946
|
-
ref: Vt(k,
|
|
2946
|
+
ref: Vt(k, z),
|
|
2947
2947
|
id: A,
|
|
2948
2948
|
type: "button",
|
|
2949
2949
|
disabled: w,
|
|
@@ -2957,29 +2957,29 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
|
|
|
2957
2957
|
return;
|
|
2958
2958
|
}
|
|
2959
2959
|
if (e.key === "Enter" || e.key === " ") {
|
|
2960
|
-
|
|
2960
|
+
ce();
|
|
2961
2961
|
return;
|
|
2962
2962
|
}
|
|
2963
|
-
|
|
2963
|
+
se(e.key === "ArrowDown" ? 1 : -1);
|
|
2964
2964
|
} else e.key === "Escape" && N(!1);
|
|
2965
2965
|
},
|
|
2966
2966
|
"aria-haspopup": "listbox",
|
|
2967
2967
|
"aria-expanded": M,
|
|
2968
|
-
"aria-invalid":
|
|
2968
|
+
"aria-invalid": ne || void 0,
|
|
2969
2969
|
"aria-required": g || void 0,
|
|
2970
2970
|
"aria-busy": _ || void 0,
|
|
2971
2971
|
"aria-disabled": _ || void 0,
|
|
2972
|
-
"aria-describedby":
|
|
2973
|
-
"aria-controls": M &&
|
|
2974
|
-
className: Z("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left",
|
|
2972
|
+
"aria-describedby": ie,
|
|
2973
|
+
"aria-controls": M && K.length > 0 ? j : void 0,
|
|
2974
|
+
className: Z("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", ne ? "border-red-600" : "border-border-default", !w && !ne && "hover:border-border-strong", "focus-visible:ring-2", ne ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", _ && "cursor-wait", Fr[C], E),
|
|
2975
2975
|
children: [/* @__PURE__ */ X("span", {
|
|
2976
2976
|
className: "flex items-center gap-1.5 min-w-0",
|
|
2977
|
-
children: [
|
|
2977
|
+
children: [ae && G?.icon && /* @__PURE__ */ Y("span", {
|
|
2978
2978
|
className: Lr,
|
|
2979
|
-
children:
|
|
2979
|
+
children: G.icon
|
|
2980
2980
|
}), /* @__PURE__ */ Y("span", {
|
|
2981
|
-
className: Z("truncate", !
|
|
2982
|
-
children:
|
|
2981
|
+
className: Z("truncate", !G && "text-fg-tertiary"),
|
|
2982
|
+
children: G ? G.label : a
|
|
2983
2983
|
})]
|
|
2984
2984
|
}), _ ? /* @__PURE__ */ Y(F, {
|
|
2985
2985
|
className: "h-4 w-4 ml-2 shrink-0 text-fg-secondary animate-spin",
|
|
@@ -2993,35 +2993,35 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
|
|
|
2993
2993
|
className: "absolute left-0 right-0 top-full mt-1 rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 overflow-hidden",
|
|
2994
2994
|
children: [v && /* @__PURE__ */ X("div", {
|
|
2995
2995
|
className: "flex items-center gap-2 px-3 py-2 border-b border-border-default",
|
|
2996
|
-
children: [/* @__PURE__ */ Y(
|
|
2996
|
+
children: [/* @__PURE__ */ Y(re, {
|
|
2997
2997
|
className: "h-3.5 w-3.5 shrink-0 text-fg-tertiary",
|
|
2998
2998
|
"aria-hidden": !0
|
|
2999
2999
|
}), /* @__PURE__ */ Y("input", {
|
|
3000
|
-
ref:
|
|
3000
|
+
ref: B,
|
|
3001
3001
|
type: "text",
|
|
3002
3002
|
role: "combobox",
|
|
3003
3003
|
"aria-expanded": !0,
|
|
3004
|
-
"aria-controls":
|
|
3004
|
+
"aria-controls": K.length > 0 ? j : void 0,
|
|
3005
3005
|
"aria-autocomplete": "list",
|
|
3006
|
-
"aria-activedescendant":
|
|
3007
|
-
value:
|
|
3008
|
-
onChange: (e) =>
|
|
3006
|
+
"aria-activedescendant": V >= 0 ? `${j}-opt-${V}` : void 0,
|
|
3007
|
+
value: U,
|
|
3008
|
+
onChange: (e) => W(e.target.value),
|
|
3009
3009
|
onKeyDown: (e) => {
|
|
3010
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
3010
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), se(e.key === "ArrowDown" ? 1 : -1)) : e.key === "Enter" ? (e.preventDefault(), ce()) : e.key === "Escape" ? (e.preventDefault(), N(!1), z.current?.focus()) : e.key === "Tab" && (z.current?.focus(), N(!1));
|
|
3011
3011
|
},
|
|
3012
3012
|
placeholder: y,
|
|
3013
3013
|
className: "w-full bg-transparent outline-none text-p-std text-fg-default placeholder:text-fg-tertiary"
|
|
3014
3014
|
})]
|
|
3015
|
-
}),
|
|
3015
|
+
}), K.length === 0 ? /* @__PURE__ */ Y("p", {
|
|
3016
3016
|
className: "px-3 py-6 text-center text-p-sm text-fg-secondary",
|
|
3017
3017
|
children: x
|
|
3018
3018
|
}) : /* @__PURE__ */ Y("ul", {
|
|
3019
3019
|
id: j,
|
|
3020
3020
|
role: "listbox",
|
|
3021
3021
|
className: "max-h-60 overflow-y-auto py-1",
|
|
3022
|
-
children:
|
|
3023
|
-
let r = Q(e.value,
|
|
3024
|
-
return /* @__PURE__ */ X(t, { children: [!!e.group && e.group !==
|
|
3022
|
+
children: K.map((e, n) => {
|
|
3023
|
+
let r = Q(e.value, L), i = n === V;
|
|
3024
|
+
return /* @__PURE__ */ X(t, { children: [!!e.group && e.group !== K[n - 1]?.group && /* @__PURE__ */ Y("li", {
|
|
3025
3025
|
role: "presentation",
|
|
3026
3026
|
className: "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
|
|
3027
3027
|
children: e.group
|
|
@@ -3030,12 +3030,12 @@ var zr = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeh
|
|
|
3030
3030
|
role: "option",
|
|
3031
3031
|
"aria-selected": r,
|
|
3032
3032
|
"aria-disabled": e.disabled || void 0,
|
|
3033
|
-
onMouseEnter: () => !e.disabled &&
|
|
3034
|
-
onClick: () => !e.disabled &&
|
|
3033
|
+
onMouseEnter: () => !e.disabled && H(n),
|
|
3034
|
+
onClick: () => !e.disabled && oe(e.value),
|
|
3035
3035
|
className: Z("flex items-center justify-between gap-2 px-3 py-2 text-p-std cursor-pointer select-none", e.disabled && "opacity-50 cursor-not-allowed", i && !e.disabled && "bg-bg-subtle", r && "font-medium"),
|
|
3036
3036
|
children: [/* @__PURE__ */ X("span", {
|
|
3037
3037
|
className: "flex items-center gap-2 min-w-0",
|
|
3038
|
-
children: [
|
|
3038
|
+
children: [ae && /* @__PURE__ */ Y("span", {
|
|
3039
3039
|
className: Z(Lr, "w-4"),
|
|
3040
3040
|
children: e.icon
|
|
3041
3041
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -3074,6 +3074,10 @@ function Ur(e) {
|
|
|
3074
3074
|
return e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value));
|
|
3075
3075
|
}
|
|
3076
3076
|
function Wr(e, t) {
|
|
3077
|
+
let n = t.trim().toLowerCase();
|
|
3078
|
+
return !n || `${Ur(e)} ${String(e.value)}`.toLowerCase().includes(n);
|
|
3079
|
+
}
|
|
3080
|
+
function Gr(e, t) {
|
|
3077
3081
|
return {
|
|
3078
3082
|
container: () => "w-full",
|
|
3079
3083
|
control: ({ isFocused: n, isDisabled: r }) => Z("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text", Br[e], t ? "border-red-600" : "border-border-default", !r && !t && "hover:border-border-strong", n && !t && "ring-2 ring-brand-300 border-brand-500", n && t && "ring-2 ring-red-300 border-red-600", r && "bg-bg-container border-border-default"),
|
|
@@ -3098,7 +3102,7 @@ function Wr(e, t) {
|
|
|
3098
3102
|
loadingMessage: () => "px-3 py-6 text-center text-p-sm text-fg-secondary"
|
|
3099
3103
|
};
|
|
3100
3104
|
}
|
|
3101
|
-
function
|
|
3105
|
+
function Kr(e) {
|
|
3102
3106
|
return /* @__PURE__ */ Y(ve.DropdownIndicator, {
|
|
3103
3107
|
...e,
|
|
3104
3108
|
children: /* @__PURE__ */ Y(S, {
|
|
@@ -3107,31 +3111,51 @@ function Gr(e) {
|
|
|
3107
3111
|
})
|
|
3108
3112
|
});
|
|
3109
3113
|
}
|
|
3110
|
-
function
|
|
3114
|
+
function qr(e) {
|
|
3111
3115
|
return /* @__PURE__ */ Y(ve.ClearIndicator, {
|
|
3112
3116
|
...e,
|
|
3113
|
-
children: /* @__PURE__ */ Y(
|
|
3117
|
+
children: /* @__PURE__ */ Y(q, {
|
|
3114
3118
|
className: "h-3.5 w-3.5",
|
|
3115
3119
|
"aria-hidden": !0
|
|
3116
3120
|
})
|
|
3117
3121
|
});
|
|
3118
3122
|
}
|
|
3119
|
-
function
|
|
3123
|
+
function Jr(e) {
|
|
3120
3124
|
return /* @__PURE__ */ Y(ve.MultiValueRemove, {
|
|
3121
3125
|
...e,
|
|
3122
|
-
children: /* @__PURE__ */ Y(
|
|
3126
|
+
children: /* @__PURE__ */ Y(q, {
|
|
3123
3127
|
className: "h-3 w-3",
|
|
3124
3128
|
"aria-hidden": !0
|
|
3125
3129
|
})
|
|
3126
3130
|
});
|
|
3127
3131
|
}
|
|
3128
|
-
function
|
|
3132
|
+
function Yr() {
|
|
3129
3133
|
return /* @__PURE__ */ Y(F, {
|
|
3130
3134
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
3131
3135
|
"aria-hidden": !0
|
|
3132
3136
|
});
|
|
3133
3137
|
}
|
|
3134
|
-
function
|
|
3138
|
+
function Xr(e) {
|
|
3139
|
+
let { selectAllState: t, onSelectAllToggle: n } = e.selectProps;
|
|
3140
|
+
return /* @__PURE__ */ X(ve.Menu, {
|
|
3141
|
+
...e,
|
|
3142
|
+
children: [t && /* @__PURE__ */ Y("div", {
|
|
3143
|
+
className: "border-b border-border-default px-3 py-2",
|
|
3144
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
3145
|
+
onClick: (e) => {
|
|
3146
|
+
e.preventDefault(), n?.();
|
|
3147
|
+
},
|
|
3148
|
+
children: /* @__PURE__ */ Y(Bt, {
|
|
3149
|
+
size: "sm",
|
|
3150
|
+
checked: t.checked,
|
|
3151
|
+
indeterminate: t.indeterminate,
|
|
3152
|
+
label: `Select all (${t.count})`,
|
|
3153
|
+
readOnly: !0
|
|
3154
|
+
})
|
|
3155
|
+
}), e.children]
|
|
3156
|
+
});
|
|
3157
|
+
}
|
|
3158
|
+
function Zr(t) {
|
|
3135
3159
|
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = Se({
|
|
3136
3160
|
count: o.length,
|
|
3137
3161
|
getScrollElement: () => s.current,
|
|
@@ -3162,14 +3186,14 @@ function Yr(t) {
|
|
|
3162
3186
|
})
|
|
3163
3187
|
});
|
|
3164
3188
|
}
|
|
3165
|
-
var
|
|
3166
|
-
let M = u(), N = O ?? M, P = y || !!v, F = c !== void 0, [
|
|
3189
|
+
var Qr = a(function({ options: e, loadOptions: t, defaultOptions: n, creatable: r = !1, onCreateOption: i, formatCreateLabel: a, isMulti: o, value: c, defaultValue: l, onChange: d, placeholder: p = "Select…", label: h, labelAddons: g, helperText: _, errorText: v, error: y = !1, required: b = !0, loading: x = !1, clearable: S = !1, searchable: C = !0, virtualized: w = !1, emptyText: T = "No results", size: E = "md", disabled: D = !1, id: O, className: k, wrapperClassName: ee, dataTestId: A }, j) {
|
|
3190
|
+
let M = u(), N = O ?? M, P = y || !!v, F = c !== void 0, [te, I] = m(o ? void 0 : l), [L, R] = m(o ? l ?? [] : []), [z, B] = m(() => {
|
|
3167
3191
|
let t = /* @__PURE__ */ new Map();
|
|
3168
3192
|
for (let n of e) t.set(String(n.value), n);
|
|
3169
3193
|
if (Array.isArray(n)) for (let e of n) t.set(String(e.value), e);
|
|
3170
3194
|
return t;
|
|
3171
|
-
}),
|
|
3172
|
-
e.length !== 0 &&
|
|
3195
|
+
}), V = s((e) => {
|
|
3196
|
+
e.length !== 0 && B((t) => {
|
|
3173
3197
|
let n = !1, r = new Map(t);
|
|
3174
3198
|
for (let t of e) {
|
|
3175
3199
|
let e = String(t.value);
|
|
@@ -3179,62 +3203,96 @@ var Xr = a(function({ options: e, loadOptions: t, defaultOptions: n, creatable:
|
|
|
3179
3203
|
});
|
|
3180
3204
|
}, []);
|
|
3181
3205
|
f(() => {
|
|
3182
|
-
|
|
3183
|
-
}, [e,
|
|
3184
|
-
let
|
|
3206
|
+
V(e);
|
|
3207
|
+
}, [e, V]);
|
|
3208
|
+
let H = s((e) => z.get(String(e)) ?? {
|
|
3185
3209
|
value: e,
|
|
3186
3210
|
label: String(e)
|
|
3187
|
-
}, [
|
|
3211
|
+
}, [z]), U = F ? c : te, W = f(() => (F ? c : L) ?? [], [
|
|
3188
3212
|
F,
|
|
3189
3213
|
c,
|
|
3190
|
-
|
|
3191
|
-
]),
|
|
3192
|
-
if (t) return (e) => Promise.resolve(t(e)).then((e) => (
|
|
3193
|
-
}, [t,
|
|
3214
|
+
L
|
|
3215
|
+
]), ne = !o && U !== void 0 ? H(U) : null, re = o ? W.map(H) : [], ie = f(() => {
|
|
3216
|
+
if (t) return (e) => Promise.resolve(t(e)).then((e) => (V(e), e));
|
|
3217
|
+
}, [t, V]), G = s((e) => {
|
|
3194
3218
|
if (o) {
|
|
3195
3219
|
let t = [...e ?? []];
|
|
3196
|
-
|
|
3220
|
+
V(t);
|
|
3197
3221
|
let n = t.map((e) => e.value);
|
|
3198
|
-
|
|
3222
|
+
R(n), d?.(n);
|
|
3199
3223
|
} else {
|
|
3200
3224
|
let t = e;
|
|
3201
|
-
t &&
|
|
3225
|
+
t && V([t]), I(t?.value), d?.(t?.value ?? void 0);
|
|
3202
3226
|
}
|
|
3203
3227
|
}, [
|
|
3204
3228
|
o,
|
|
3205
|
-
|
|
3229
|
+
V,
|
|
3206
3230
|
d
|
|
3207
|
-
]),
|
|
3231
|
+
]), ae = s((e) => {
|
|
3208
3232
|
let t = {
|
|
3209
3233
|
value: e,
|
|
3210
3234
|
label: e
|
|
3211
3235
|
};
|
|
3212
|
-
if (
|
|
3213
|
-
let e = [...
|
|
3214
|
-
|
|
3215
|
-
} else
|
|
3236
|
+
if (V([t]), i?.(e), o) {
|
|
3237
|
+
let e = [...W, t.value];
|
|
3238
|
+
R(e), d?.(e);
|
|
3239
|
+
} else I(t.value), d?.(t.value);
|
|
3216
3240
|
}, [
|
|
3217
3241
|
o,
|
|
3218
|
-
|
|
3219
|
-
|
|
3242
|
+
W,
|
|
3243
|
+
V,
|
|
3220
3244
|
d,
|
|
3221
3245
|
i
|
|
3222
|
-
]),
|
|
3246
|
+
]), K = !!t, oe = K ? r ? xe : ye : r ? be : _e, se = f(() => Gr(E, P), [E, P]), ce = f(() => e.some((e) => !!e.description), [e]), q = !!o && !K, [le, ue] = m(""), de = s((e, t) => {
|
|
3247
|
+
t.action === "input-change" && ue(e);
|
|
3248
|
+
}, []), J = f(() => q ? e.filter((e) => !e.disabled && Wr(e, le)) : [], [
|
|
3249
|
+
q,
|
|
3250
|
+
e,
|
|
3251
|
+
le
|
|
3252
|
+
]), fe = f(() => {
|
|
3253
|
+
if (!q || J.length === 0) return null;
|
|
3254
|
+
let e = new Set(W.map(String)), t = J.filter((t) => e.has(String(t.value))).length;
|
|
3255
|
+
return {
|
|
3256
|
+
count: J.length,
|
|
3257
|
+
checked: t === J.length,
|
|
3258
|
+
indeterminate: t > 0 && t < J.length
|
|
3259
|
+
};
|
|
3260
|
+
}, [
|
|
3261
|
+
q,
|
|
3262
|
+
J,
|
|
3263
|
+
W
|
|
3264
|
+
]), pe = s(() => {
|
|
3265
|
+
if (!fe) return;
|
|
3266
|
+
let e = new Set(J.map((e) => String(e.value))), t;
|
|
3267
|
+
if (fe.checked) t = W.filter((t) => !e.has(String(t)));
|
|
3268
|
+
else {
|
|
3269
|
+
V(J);
|
|
3270
|
+
let e = new Set(W.map(String));
|
|
3271
|
+
t = [...W, ...J.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
3272
|
+
}
|
|
3273
|
+
R(t), d?.(t);
|
|
3274
|
+
}, [
|
|
3275
|
+
fe,
|
|
3276
|
+
J,
|
|
3277
|
+
W,
|
|
3278
|
+
V,
|
|
3279
|
+
d
|
|
3280
|
+
]), me = {
|
|
3223
3281
|
inputId: N,
|
|
3224
3282
|
unstyled: !0,
|
|
3225
|
-
classNames:
|
|
3283
|
+
classNames: se,
|
|
3226
3284
|
className: k,
|
|
3227
3285
|
isMulti: o,
|
|
3228
3286
|
options: e,
|
|
3229
|
-
loadOptions:
|
|
3287
|
+
loadOptions: ie,
|
|
3230
3288
|
defaultOptions: n,
|
|
3231
|
-
value: o ?
|
|
3232
|
-
onChange:
|
|
3233
|
-
onCreateOption: r ?
|
|
3289
|
+
value: o ? re : ne,
|
|
3290
|
+
onChange: G,
|
|
3291
|
+
onCreateOption: r ? ae : void 0,
|
|
3234
3292
|
formatCreateLabel: a,
|
|
3235
3293
|
getOptionValue: (e) => String(e.value),
|
|
3236
3294
|
getOptionLabel: Ur,
|
|
3237
|
-
formatOptionLabel: (e, t) => t.context === "value" ? e.label :
|
|
3295
|
+
formatOptionLabel: (e, t) => t.context === "value" ? e.label : ce && e.description ? /* @__PURE__ */ X("span", {
|
|
3238
3296
|
className: "flex flex-col min-w-0",
|
|
3239
3297
|
children: [/* @__PURE__ */ Y("span", {
|
|
3240
3298
|
className: "truncate",
|
|
@@ -3253,13 +3311,20 @@ var Xr = a(function({ options: e, loadOptions: t, defaultOptions: n, creatable:
|
|
|
3253
3311
|
noOptionsMessage: () => T,
|
|
3254
3312
|
"aria-invalid": P || void 0,
|
|
3255
3313
|
"aria-required": b || void 0,
|
|
3314
|
+
...q ? {
|
|
3315
|
+
inputValue: le,
|
|
3316
|
+
onInputChange: de,
|
|
3317
|
+
selectAllState: fe,
|
|
3318
|
+
onSelectAllToggle: pe
|
|
3319
|
+
} : {},
|
|
3256
3320
|
components: {
|
|
3257
|
-
DropdownIndicator:
|
|
3258
|
-
ClearIndicator:
|
|
3259
|
-
MultiValueRemove:
|
|
3260
|
-
LoadingIndicator:
|
|
3321
|
+
DropdownIndicator: Kr,
|
|
3322
|
+
ClearIndicator: qr,
|
|
3323
|
+
MultiValueRemove: Jr,
|
|
3324
|
+
LoadingIndicator: Yr,
|
|
3261
3325
|
IndicatorSeparator: () => null,
|
|
3262
|
-
...w ? { MenuList:
|
|
3326
|
+
...w ? { MenuList: Zr } : {},
|
|
3327
|
+
...q ? { Menu: Xr } : {}
|
|
3263
3328
|
}
|
|
3264
3329
|
};
|
|
3265
3330
|
return /* @__PURE__ */ X("div", {
|
|
@@ -3281,9 +3346,9 @@ var Xr = a(function({ options: e, loadOptions: t, defaultOptions: n, creatable:
|
|
|
3281
3346
|
children: g
|
|
3282
3347
|
})]
|
|
3283
3348
|
}),
|
|
3284
|
-
/* @__PURE__ */ Y(
|
|
3349
|
+
/* @__PURE__ */ Y(oe, {
|
|
3285
3350
|
ref: j,
|
|
3286
|
-
...
|
|
3351
|
+
...me
|
|
3287
3352
|
}),
|
|
3288
3353
|
v ? /* @__PURE__ */ Y("p", {
|
|
3289
3354
|
id: `${N}-error`,
|
|
@@ -3296,19 +3361,19 @@ var Xr = a(function({ options: e, loadOptions: t, defaultOptions: n, creatable:
|
|
|
3296
3361
|
}) : null
|
|
3297
3362
|
]
|
|
3298
3363
|
});
|
|
3299
|
-
}),
|
|
3300
|
-
function
|
|
3301
|
-
return c(
|
|
3364
|
+
}), $r = r(null);
|
|
3365
|
+
function ei() {
|
|
3366
|
+
return c($r) ?? {
|
|
3302
3367
|
collapsed: !1,
|
|
3303
3368
|
toggle: () => {}
|
|
3304
3369
|
};
|
|
3305
3370
|
}
|
|
3306
|
-
var
|
|
3371
|
+
var ti = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
|
|
3307
3372
|
let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
|
|
3308
3373
|
let e = !h;
|
|
3309
3374
|
p || f(e), n?.(e);
|
|
3310
3375
|
};
|
|
3311
|
-
return /* @__PURE__ */ Y(
|
|
3376
|
+
return /* @__PURE__ */ Y($r.Provider, {
|
|
3312
3377
|
value: {
|
|
3313
3378
|
collapsed: h,
|
|
3314
3379
|
toggle: g
|
|
@@ -3340,7 +3405,7 @@ var $r = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3340
3405
|
onClick: g,
|
|
3341
3406
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
3342
3407
|
className: Z("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
|
|
3343
|
-
children: /* @__PURE__ */ Y(
|
|
3408
|
+
children: /* @__PURE__ */ Y(te, { className: "h-4 w-4" })
|
|
3344
3409
|
})
|
|
3345
3410
|
]
|
|
3346
3411
|
}), /* @__PURE__ */ Y("nav", {
|
|
@@ -3349,8 +3414,8 @@ var $r = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3349
3414
|
})]
|
|
3350
3415
|
})
|
|
3351
3416
|
});
|
|
3352
|
-
}),
|
|
3353
|
-
let { collapsed: d } =
|
|
3417
|
+
}), ni = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
3418
|
+
let { collapsed: d } = ei(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ X(J, { children: [e && /* @__PURE__ */ Y("span", {
|
|
3354
3419
|
className: "inline-flex shrink-0",
|
|
3355
3420
|
children: e
|
|
3356
3421
|
}), !d && /* @__PURE__ */ X(J, { children: [
|
|
@@ -3389,12 +3454,12 @@ var $r = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3389
3454
|
className: "flex flex-col gap-0.5 pl-8",
|
|
3390
3455
|
children: i
|
|
3391
3456
|
})] });
|
|
3392
|
-
}),
|
|
3457
|
+
}), ri = {
|
|
3393
3458
|
text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
|
|
3394
3459
|
circular: "size-10 rounded-full",
|
|
3395
3460
|
rectangular: "h-4 w-full",
|
|
3396
3461
|
rounded: "h-4 w-full rounded-md"
|
|
3397
|
-
},
|
|
3462
|
+
}, ii = {
|
|
3398
3463
|
pulse: "animate-pulse",
|
|
3399
3464
|
wave: [
|
|
3400
3465
|
"relative overflow-hidden",
|
|
@@ -3404,15 +3469,15 @@ var $r = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3404
3469
|
].join(" "),
|
|
3405
3470
|
none: ""
|
|
3406
3471
|
};
|
|
3407
|
-
function
|
|
3472
|
+
function ai(e) {
|
|
3408
3473
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3409
3474
|
}
|
|
3410
|
-
var
|
|
3475
|
+
var oi = a(function({ variant: e = "text", animation: t = "pulse", width: n, height: r, count: i = 1, children: a, style: o, className: s, dataTestId: c, ...l }, u) {
|
|
3411
3476
|
let d = a != null, f = Math.max(1, i), p = {
|
|
3412
|
-
...n === void 0 ? null : { width:
|
|
3413
|
-
...r === void 0 ? null : { height:
|
|
3477
|
+
...n === void 0 ? null : { width: ai(n) },
|
|
3478
|
+
...r === void 0 ? null : { height: ai(r) },
|
|
3414
3479
|
...o
|
|
3415
|
-
}, m = Z("block bg-bg-subtle leading-none",
|
|
3480
|
+
}, m = Z("block bg-bg-subtle leading-none", ri[e], ii[t]);
|
|
3416
3481
|
return d ? /* @__PURE__ */ Y("span", {
|
|
3417
3482
|
ref: u,
|
|
3418
3483
|
"data-test-id": c,
|
|
@@ -3445,7 +3510,7 @@ var ii = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3445
3510
|
"aria-label": t === 0 ? "Loading" : void 0
|
|
3446
3511
|
}, t))
|
|
3447
3512
|
});
|
|
3448
|
-
}),
|
|
3513
|
+
}), si = {
|
|
3449
3514
|
success: {
|
|
3450
3515
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3451
3516
|
icon: x
|
|
@@ -3466,19 +3531,19 @@ var ii = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3466
3531
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3467
3532
|
icon: P
|
|
3468
3533
|
}
|
|
3469
|
-
},
|
|
3534
|
+
}, ci = {
|
|
3470
3535
|
success: "text-green-400",
|
|
3471
3536
|
warning: "text-yellow-300",
|
|
3472
3537
|
danger: "text-red-400",
|
|
3473
3538
|
info: "text-blue-400",
|
|
3474
3539
|
neutral: "text-white/70"
|
|
3475
|
-
},
|
|
3476
|
-
function
|
|
3477
|
-
let e = c(
|
|
3540
|
+
}, li = r(null);
|
|
3541
|
+
function ui() {
|
|
3542
|
+
let e = c(li);
|
|
3478
3543
|
if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
|
|
3479
3544
|
return e;
|
|
3480
3545
|
}
|
|
3481
|
-
function
|
|
3546
|
+
function di({ children: e, dataTestId: t }) {
|
|
3482
3547
|
let [n, r] = m([]), i = p(/* @__PURE__ */ new Map()), a = s((e) => {
|
|
3483
3548
|
r((t) => t.filter((t) => t.id !== e));
|
|
3484
3549
|
let t = i.current.get(e);
|
|
@@ -3501,7 +3566,7 @@ function li({ children: e, dataTestId: t }) {
|
|
|
3501
3566
|
return () => {
|
|
3502
3567
|
e.forEach(clearTimeout), e.clear();
|
|
3503
3568
|
};
|
|
3504
|
-
}, []), /* @__PURE__ */ X(
|
|
3569
|
+
}, []), /* @__PURE__ */ X(li.Provider, {
|
|
3505
3570
|
value: {
|
|
3506
3571
|
show: o,
|
|
3507
3572
|
dismiss: a
|
|
@@ -3510,14 +3575,14 @@ function li({ children: e, dataTestId: t }) {
|
|
|
3510
3575
|
"data-test-id": t,
|
|
3511
3576
|
className: "fixed left-1/2 -translate-x-1/2 bottom-6 z-[100] flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
3512
3577
|
children: n.map((e) => {
|
|
3513
|
-
let { container: t, icon: n } =
|
|
3578
|
+
let { container: t, icon: n } = si[e.variant ?? "neutral"];
|
|
3514
3579
|
return /* @__PURE__ */ X("div", {
|
|
3515
3580
|
role: "status",
|
|
3516
3581
|
"data-test-id": e.dataTestId,
|
|
3517
3582
|
className: Z("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
3518
3583
|
children: [
|
|
3519
3584
|
/* @__PURE__ */ Y(n, {
|
|
3520
|
-
className: Z("h-5 w-5 shrink-0",
|
|
3585
|
+
className: Z("h-5 w-5 shrink-0", ci[e.variant ?? "neutral"]),
|
|
3521
3586
|
"aria-hidden": !0
|
|
3522
3587
|
}),
|
|
3523
3588
|
/* @__PURE__ */ Y("p", {
|
|
@@ -3537,7 +3602,7 @@ function li({ children: e, dataTestId: t }) {
|
|
|
3537
3602
|
onClick: () => a(e.id),
|
|
3538
3603
|
"aria-label": "Close",
|
|
3539
3604
|
className: "shrink-0 p-1 rounded-md text-white/70 hover:text-white hover:bg-white/10",
|
|
3540
|
-
children: /* @__PURE__ */ Y(
|
|
3605
|
+
children: /* @__PURE__ */ Y(q, { className: "h-4 w-4" })
|
|
3541
3606
|
})
|
|
3542
3607
|
]
|
|
3543
3608
|
}, e.id);
|
|
@@ -3547,15 +3612,15 @@ function li({ children: e, dataTestId: t }) {
|
|
|
3547
3612
|
}
|
|
3548
3613
|
//#endregion
|
|
3549
3614
|
//#region src/components/Status/Status.tsx
|
|
3550
|
-
var
|
|
3615
|
+
var fi = {
|
|
3551
3616
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
3552
3617
|
md: "h-6 px-2 text-p-sm gap-1.5",
|
|
3553
3618
|
sm: "h-5 px-1.5 text-p-sm gap-1"
|
|
3554
|
-
},
|
|
3619
|
+
}, pi = {
|
|
3555
3620
|
lg: "h-2 w-2",
|
|
3556
3621
|
md: "h-1.5 w-1.5",
|
|
3557
3622
|
sm: "h-1.5 w-1.5"
|
|
3558
|
-
},
|
|
3623
|
+
}, mi = {
|
|
3559
3624
|
general: {
|
|
3560
3625
|
container: "bg-bg-subtle text-fg-default dark:text-fg-default",
|
|
3561
3626
|
dot: "bg-gray-600 dark:bg-gray-400"
|
|
@@ -3588,19 +3653,19 @@ var ui = {
|
|
|
3588
3653
|
container: "bg-bg-subtle text-fg-disabled",
|
|
3589
3654
|
dot: "bg-border-strong"
|
|
3590
3655
|
}
|
|
3591
|
-
},
|
|
3592
|
-
let { container: u, dot: d } =
|
|
3656
|
+
}, hi = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3657
|
+
let { container: u, dot: d } = mi[e];
|
|
3593
3658
|
return /* @__PURE__ */ X("span", {
|
|
3594
3659
|
ref: l,
|
|
3595
3660
|
"data-test-id": s,
|
|
3596
|
-
className: Z("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none",
|
|
3661
|
+
className: Z("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", fi[t], u, a),
|
|
3597
3662
|
...c,
|
|
3598
3663
|
children: [
|
|
3599
3664
|
n ? /* @__PURE__ */ Y("span", {
|
|
3600
3665
|
className: "inline-flex shrink-0",
|
|
3601
3666
|
children: n
|
|
3602
3667
|
}) : i ? /* @__PURE__ */ Y("span", {
|
|
3603
|
-
className: Z("inline-block shrink-0 rounded-full",
|
|
3668
|
+
className: Z("inline-block shrink-0 rounded-full", pi[t], d),
|
|
3604
3669
|
"aria-hidden": !0
|
|
3605
3670
|
}) : null,
|
|
3606
3671
|
o,
|
|
@@ -3610,45 +3675,45 @@ var ui = {
|
|
|
3610
3675
|
})
|
|
3611
3676
|
]
|
|
3612
3677
|
});
|
|
3613
|
-
}),
|
|
3678
|
+
}), gi = {
|
|
3614
3679
|
lg: "size-9",
|
|
3615
3680
|
sm: "size-6"
|
|
3616
|
-
},
|
|
3681
|
+
}, _i = {
|
|
3617
3682
|
lg: "h-9",
|
|
3618
3683
|
sm: "h-6"
|
|
3619
|
-
},
|
|
3684
|
+
}, vi = {
|
|
3620
3685
|
lg: "border-2",
|
|
3621
3686
|
sm: "border"
|
|
3622
|
-
},
|
|
3687
|
+
}, yi = {
|
|
3623
3688
|
lg: "text-p-std",
|
|
3624
3689
|
sm: "text-p-xs"
|
|
3625
|
-
},
|
|
3690
|
+
}, bi = {
|
|
3626
3691
|
lg: "size-5",
|
|
3627
3692
|
sm: "size-3.5"
|
|
3628
|
-
},
|
|
3693
|
+
}, xi = {
|
|
3629
3694
|
lg: "size-3",
|
|
3630
3695
|
sm: "size-2"
|
|
3631
|
-
},
|
|
3696
|
+
}, Si = {
|
|
3632
3697
|
lg: "text-p-std",
|
|
3633
3698
|
sm: "text-p-sm"
|
|
3634
|
-
},
|
|
3699
|
+
}, Ci = {
|
|
3635
3700
|
lg: "text-p-sm",
|
|
3636
3701
|
sm: "text-p-xs"
|
|
3637
|
-
},
|
|
3702
|
+
}, wi = {
|
|
3638
3703
|
upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
|
|
3639
3704
|
active: "bg-bg-default border-brand-500 text-brand-700",
|
|
3640
3705
|
completed: "bg-brand-500 border-brand-500 text-fg-inverse",
|
|
3641
3706
|
rejected: "bg-red-700 border-red-800 text-fg-inverse"
|
|
3642
|
-
},
|
|
3707
|
+
}, Ti = {
|
|
3643
3708
|
upcoming: "ring-4 ring-gray-100/80",
|
|
3644
3709
|
active: "ring-4 ring-brand-40/80",
|
|
3645
3710
|
completed: "ring-4 ring-brand-40/80",
|
|
3646
3711
|
rejected: "ring-4 ring-red-100/80"
|
|
3647
3712
|
};
|
|
3648
|
-
function
|
|
3649
|
-
return t === "completed" ? /* @__PURE__ */ Y(E, { className:
|
|
3713
|
+
function Ei(e, t, n, r) {
|
|
3714
|
+
return t === "completed" ? /* @__PURE__ */ Y(E, { className: bi[r] }) : t === "rejected" ? /* @__PURE__ */ Y(D, { className: bi[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ Y("span", { className: Z("rounded-full", xi[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
3650
3715
|
}
|
|
3651
|
-
var
|
|
3716
|
+
var Di = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
3652
3717
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
3653
3718
|
return /* @__PURE__ */ Y("ol", {
|
|
3654
3719
|
ref: l,
|
|
@@ -3657,15 +3722,15 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3657
3722
|
...c,
|
|
3658
3723
|
children: e.map((i, o) => {
|
|
3659
3724
|
let s = i.status ?? "upcoming", c = o === 0, l = o === e.length - 1, f = !c && d(e[o - 1]), p = !l && d(i), m = /* @__PURE__ */ Y("span", {
|
|
3660
|
-
className: Z("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors",
|
|
3661
|
-
children:
|
|
3725
|
+
className: Z("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", gi[a], vi[a], yi[a], wi[s], i.highlighted && Ti[s]),
|
|
3726
|
+
children: Ei(r, s, o, a)
|
|
3662
3727
|
}), h = /* @__PURE__ */ X("div", {
|
|
3663
3728
|
className: Z("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
3664
3729
|
children: [/* @__PURE__ */ Y("span", {
|
|
3665
|
-
className: Z("font-medium text-fg-default",
|
|
3730
|
+
className: Z("font-medium text-fg-default", Si[a]),
|
|
3666
3731
|
children: i.label
|
|
3667
3732
|
}), i.description && /* @__PURE__ */ Y("span", {
|
|
3668
|
-
className: Z("text-fg-secondary",
|
|
3733
|
+
className: Z("text-fg-secondary", Ci[a]),
|
|
3669
3734
|
children: i.description
|
|
3670
3735
|
})]
|
|
3671
3736
|
});
|
|
@@ -3673,7 +3738,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3673
3738
|
"aria-current": Q(i.value, t) ? "step" : void 0,
|
|
3674
3739
|
className: Z("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3675
3740
|
children: [/* @__PURE__ */ X("div", {
|
|
3676
|
-
className: Z("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Z("w-full items-center justify-center",
|
|
3741
|
+
className: Z("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Z("w-full items-center justify-center", _i[a])),
|
|
3677
3742
|
children: [
|
|
3678
3743
|
!c && /* @__PURE__ */ Y("span", {
|
|
3679
3744
|
"aria-hidden": !0,
|
|
@@ -3695,13 +3760,13 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3695
3760
|
}, String(i.value));
|
|
3696
3761
|
})
|
|
3697
3762
|
});
|
|
3698
|
-
}),
|
|
3763
|
+
}), Oi = {
|
|
3699
3764
|
md: "h-6 w-11",
|
|
3700
3765
|
sm: "h-5 w-9"
|
|
3701
|
-
},
|
|
3766
|
+
}, ki = {
|
|
3702
3767
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
3703
3768
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
3704
|
-
},
|
|
3769
|
+
}, Ai = a(function({ size: e = "md", label: t, description: n, labelPosition: r = "right", id: i, disabled: a, checked: o, defaultChecked: s, className: c, dataTestId: l, ...d }, f) {
|
|
3705
3770
|
let p = u(), m = i ?? p, h = /* @__PURE__ */ X("span", {
|
|
3706
3771
|
className: "relative inline-flex shrink-0",
|
|
3707
3772
|
children: [
|
|
@@ -3716,8 +3781,8 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3716
3781
|
className: "peer sr-only",
|
|
3717
3782
|
...d
|
|
3718
3783
|
}),
|
|
3719
|
-
/* @__PURE__ */ Y("span", { className: Z("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors",
|
|
3720
|
-
/* @__PURE__ */ Y("span", { className: Z("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform",
|
|
3784
|
+
/* @__PURE__ */ Y("span", { className: Z("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", Oi[e], "peer-checked:bg-brand-500 dark:peer-checked:bg-brand-500", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2", a && "!bg-bg-subtle") }),
|
|
3785
|
+
/* @__PURE__ */ Y("span", { className: Z("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", ki[e]) })
|
|
3721
3786
|
]
|
|
3722
3787
|
});
|
|
3723
3788
|
return !t && !n ? /* @__PURE__ */ Y("label", {
|
|
@@ -3740,20 +3805,20 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3740
3805
|
})]
|
|
3741
3806
|
})]
|
|
3742
3807
|
});
|
|
3743
|
-
}),
|
|
3808
|
+
}), ji = {
|
|
3744
3809
|
comfortable: "[&_td]:py-3 [&_th]:py-3",
|
|
3745
3810
|
compact: "[&_td]:py-2 [&_th]:py-2"
|
|
3746
|
-
},
|
|
3811
|
+
}, Mi = {
|
|
3747
3812
|
left: "text-left",
|
|
3748
3813
|
center: "text-center",
|
|
3749
3814
|
right: "text-right"
|
|
3750
|
-
},
|
|
3815
|
+
}, Ni = a(function({ density: e = "comfortable", striped: t = !1, hoverable: n = !0, stickyHeader: r = !1, wrapperClassName: i, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3751
3816
|
return /* @__PURE__ */ Y("div", {
|
|
3752
3817
|
"data-test-id": s,
|
|
3753
3818
|
className: Z("w-full overflow-x-auto rounded-lg border border-border-default bg-bg-default", i),
|
|
3754
3819
|
children: /* @__PURE__ */ Y("table", {
|
|
3755
3820
|
ref: l,
|
|
3756
|
-
className: Z("w-full border-collapse text-p-std text-fg-default",
|
|
3821
|
+
className: Z("w-full border-collapse text-p-std text-fg-default", ji[e], a),
|
|
3757
3822
|
"data-striped": t || void 0,
|
|
3758
3823
|
"data-hoverable": n || void 0,
|
|
3759
3824
|
"data-sticky": r || void 0,
|
|
@@ -3761,7 +3826,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3761
3826
|
children: o
|
|
3762
3827
|
})
|
|
3763
3828
|
});
|
|
3764
|
-
}),
|
|
3829
|
+
}), Pi = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
3765
3830
|
return /* @__PURE__ */ Y("thead", {
|
|
3766
3831
|
ref: i,
|
|
3767
3832
|
"data-test-id": n,
|
|
@@ -3769,7 +3834,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3769
3834
|
...r,
|
|
3770
3835
|
children: t
|
|
3771
3836
|
});
|
|
3772
|
-
}),
|
|
3837
|
+
}), Fi = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
3773
3838
|
return /* @__PURE__ */ Y("tbody", {
|
|
3774
3839
|
ref: i,
|
|
3775
3840
|
"data-test-id": n,
|
|
@@ -3777,7 +3842,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3777
3842
|
...r,
|
|
3778
3843
|
children: t
|
|
3779
3844
|
});
|
|
3780
|
-
}),
|
|
3845
|
+
}), Ii = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
3781
3846
|
return /* @__PURE__ */ Y("tr", {
|
|
3782
3847
|
ref: i,
|
|
3783
3848
|
"data-test-id": n,
|
|
@@ -3785,7 +3850,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3785
3850
|
...r,
|
|
3786
3851
|
children: t
|
|
3787
3852
|
});
|
|
3788
|
-
}),
|
|
3853
|
+
}), Li = a(function({ sortable: e = !1, sortDir: t = null, onSortChange: n, align: r = "left", className: i, children: a, dataTestId: o, ...s }, c) {
|
|
3789
3854
|
let l = /* @__PURE__ */ X(J, { children: [a, e && /* @__PURE__ */ Y("span", {
|
|
3790
3855
|
className: "inline-flex ml-1 align-middle text-fg-tertiary",
|
|
3791
3856
|
children: Y(t === "asc" ? v : t === "desc" ? _ : T, { className: "h-3.5 w-3.5" })
|
|
@@ -3794,7 +3859,7 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3794
3859
|
ref: c,
|
|
3795
3860
|
scope: "col",
|
|
3796
3861
|
"data-test-id": o,
|
|
3797
|
-
className: Z("px-4 whitespace-nowrap",
|
|
3862
|
+
className: Z("px-4 whitespace-nowrap", Mi[r], i),
|
|
3798
3863
|
"aria-sort": t === "asc" ? "ascending" : t === "desc" ? "descending" : void 0,
|
|
3799
3864
|
...s,
|
|
3800
3865
|
children: e ? /* @__PURE__ */ Y("button", {
|
|
@@ -3806,37 +3871,37 @@ var Ti = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3806
3871
|
children: l
|
|
3807
3872
|
}) : l
|
|
3808
3873
|
});
|
|
3809
|
-
}),
|
|
3874
|
+
}), Ri = a(function({ align: e = "left", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
3810
3875
|
return /* @__PURE__ */ Y("td", {
|
|
3811
3876
|
ref: a,
|
|
3812
3877
|
"data-test-id": r,
|
|
3813
|
-
className: Z("px-4",
|
|
3878
|
+
className: Z("px-4", Mi[e], t),
|
|
3814
3879
|
...i,
|
|
3815
3880
|
children: n
|
|
3816
3881
|
});
|
|
3817
3882
|
});
|
|
3818
|
-
function
|
|
3819
|
-
return /* @__PURE__ */ X(
|
|
3883
|
+
function zi({ columns: e, rows: t, rowKey: n, empty: r = "No results", density: i, striped: a, hoverable: o, sortKey: s, sortDir: c = null, onSortChange: l, onRowClick: u, className: d, dataTestId: f }) {
|
|
3884
|
+
return /* @__PURE__ */ X(Ni, {
|
|
3820
3885
|
density: i,
|
|
3821
3886
|
striped: a,
|
|
3822
3887
|
hoverable: o,
|
|
3823
3888
|
className: d,
|
|
3824
3889
|
dataTestId: f,
|
|
3825
|
-
children: [/* @__PURE__ */ Y(
|
|
3890
|
+
children: [/* @__PURE__ */ Y(Pi, { children: /* @__PURE__ */ Y(Ii, { children: e.map((e) => /* @__PURE__ */ Y(Li, {
|
|
3826
3891
|
align: e.align,
|
|
3827
3892
|
sortable: e.sortable,
|
|
3828
3893
|
sortDir: s === e.key ? c : null,
|
|
3829
3894
|
onSortChange: (t) => l?.(e.key, t),
|
|
3830
3895
|
children: e.header
|
|
3831
|
-
}, e.key)) }) }), /* @__PURE__ */ Y(
|
|
3896
|
+
}, e.key)) }) }), /* @__PURE__ */ Y(Fi, { children: t.length === 0 ? /* @__PURE__ */ Y(Ii, { children: /* @__PURE__ */ Y(Ri, {
|
|
3832
3897
|
colSpan: e.length,
|
|
3833
3898
|
className: "text-center text-fg-tertiary py-10",
|
|
3834
3899
|
align: "center",
|
|
3835
3900
|
children: r
|
|
3836
|
-
}) }) : t.map((t, r) => /* @__PURE__ */ Y(
|
|
3901
|
+
}) }) : t.map((t, r) => /* @__PURE__ */ Y(Ii, {
|
|
3837
3902
|
onClick: u ? () => u(t) : void 0,
|
|
3838
3903
|
className: u ? "cursor-pointer" : void 0,
|
|
3839
|
-
children: e.map((e) => /* @__PURE__ */ Y(
|
|
3904
|
+
children: e.map((e) => /* @__PURE__ */ Y(Ri, {
|
|
3840
3905
|
align: e.align,
|
|
3841
3906
|
children: e.render ? e.render(t) : e.accessor ? e.accessor(t) : null
|
|
3842
3907
|
}, e.key))
|
|
@@ -3845,7 +3910,7 @@ function Li({ columns: e, rows: t, rowKey: n, empty: r = "No results", density:
|
|
|
3845
3910
|
}
|
|
3846
3911
|
//#endregion
|
|
3847
3912
|
//#region src/components/TableV2/TableV2Filter.tsx
|
|
3848
|
-
function
|
|
3913
|
+
function Bi({ column: e }) {
|
|
3849
3914
|
let t = e.columnDef.meta?.filterVariant;
|
|
3850
3915
|
if (!t) return null;
|
|
3851
3916
|
let n = e.getFilterValue();
|
|
@@ -3866,7 +3931,7 @@ function Ri({ column: e }) {
|
|
|
3866
3931
|
}
|
|
3867
3932
|
//#endregion
|
|
3868
3933
|
//#region src/components/TableV2/TableV2Pagination.tsx
|
|
3869
|
-
function
|
|
3934
|
+
function Vi({ table: e, pageSizeOptions: t = [
|
|
3870
3935
|
10,
|
|
3871
3936
|
25,
|
|
3872
3937
|
50,
|
|
@@ -3905,12 +3970,12 @@ function zi({ table: e, pageSizeOptions: t = [
|
|
|
3905
3970
|
}
|
|
3906
3971
|
//#endregion
|
|
3907
3972
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
3908
|
-
function
|
|
3973
|
+
function Hi({ columnCount: e, rowCount: t = 8 }) {
|
|
3909
3974
|
return /* @__PURE__ */ Y(J, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ Y("tr", {
|
|
3910
3975
|
"aria-hidden": n > 0 || void 0,
|
|
3911
3976
|
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ Y("td", {
|
|
3912
3977
|
className: "px-4 py-3",
|
|
3913
|
-
children: /* @__PURE__ */ Y(
|
|
3978
|
+
children: /* @__PURE__ */ Y(oi, {
|
|
3914
3979
|
variant: "text",
|
|
3915
3980
|
width: t === 0 ? "70%" : "90%"
|
|
3916
3981
|
})
|
|
@@ -3919,11 +3984,11 @@ function Bi({ columnCount: e, rowCount: t = 8 }) {
|
|
|
3919
3984
|
}
|
|
3920
3985
|
//#endregion
|
|
3921
3986
|
//#region src/components/TableV2/TableV2ColumnVisibility.tsx
|
|
3922
|
-
function
|
|
3987
|
+
function Ui(e) {
|
|
3923
3988
|
let { header: t } = e.columnDef;
|
|
3924
3989
|
return typeof t == "string" ? t : e.id;
|
|
3925
3990
|
}
|
|
3926
|
-
function
|
|
3991
|
+
function Wi({ table: e }) {
|
|
3927
3992
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
3928
3993
|
return /* @__PURE__ */ X(Nn, { children: [/* @__PURE__ */ Y(Pn, { children: /* @__PURE__ */ Y(nt, {
|
|
3929
3994
|
variant: "secondary",
|
|
@@ -3936,7 +4001,7 @@ function Hi({ table: e }) {
|
|
|
3936
4001
|
className: "px-3 py-1.5 hover:bg-bg-subtle",
|
|
3937
4002
|
children: /* @__PURE__ */ Y(Bt, {
|
|
3938
4003
|
size: "sm",
|
|
3939
|
-
label:
|
|
4004
|
+
label: Ui(e),
|
|
3940
4005
|
checked: e.getIsVisible(),
|
|
3941
4006
|
onChange: () => e.toggleVisibility()
|
|
3942
4007
|
})
|
|
@@ -3945,12 +4010,12 @@ function Hi({ table: e }) {
|
|
|
3945
4010
|
}
|
|
3946
4011
|
//#endregion
|
|
3947
4012
|
//#region src/components/TableV2/TableV2Toolbar.tsx
|
|
3948
|
-
function
|
|
4013
|
+
function Gi({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
3949
4014
|
return /* @__PURE__ */ X("div", {
|
|
3950
4015
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
3951
4016
|
children: [t && /* @__PURE__ */ Y(Qt, {
|
|
3952
4017
|
size: "sm",
|
|
3953
|
-
leftIcon: /* @__PURE__ */ Y(
|
|
4018
|
+
leftIcon: /* @__PURE__ */ Y(re, { className: "h-4 w-4" }),
|
|
3954
4019
|
placeholder: r ?? "Search...",
|
|
3955
4020
|
"aria-label": "Search",
|
|
3956
4021
|
value: String(e.getState().globalFilter ?? ""),
|
|
@@ -3964,7 +4029,7 @@ function Ui({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3964
4029
|
size: "sm",
|
|
3965
4030
|
iconOnly: !0,
|
|
3966
4031
|
"aria-label": "Refresh",
|
|
3967
|
-
leftIcon: /* @__PURE__ */ Y(
|
|
4032
|
+
leftIcon: /* @__PURE__ */ Y(ne, { className: "h-4 w-4" }),
|
|
3968
4033
|
onClick: i
|
|
3969
4034
|
}),
|
|
3970
4035
|
a && /* @__PURE__ */ Y(nt, {
|
|
@@ -3974,7 +4039,7 @@ function Ui({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3974
4039
|
onClick: a,
|
|
3975
4040
|
children: "Export"
|
|
3976
4041
|
}),
|
|
3977
|
-
n && /* @__PURE__ */ Y(
|
|
4042
|
+
n && /* @__PURE__ */ Y(Wi, { table: e }),
|
|
3978
4043
|
o
|
|
3979
4044
|
]
|
|
3980
4045
|
})]
|
|
@@ -3982,15 +4047,15 @@ function Ui({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3982
4047
|
}
|
|
3983
4048
|
//#endregion
|
|
3984
4049
|
//#region src/components/TableV2/useTableV2ColumnDnd.ts
|
|
3985
|
-
var
|
|
4050
|
+
var Ki = ({ transform: e }) => ({
|
|
3986
4051
|
...e,
|
|
3987
4052
|
y: 0
|
|
3988
4053
|
});
|
|
3989
|
-
function
|
|
4054
|
+
function qi({ columnOrder: e, onColumnOrderChange: t }) {
|
|
3990
4055
|
return {
|
|
3991
4056
|
sensors: Pe(Ne(je, { activationConstraint: { distance: 4 } }), Ne(Ae, { coordinateGetter: Re })),
|
|
3992
4057
|
collisionDetection: Me,
|
|
3993
|
-
modifiers: [
|
|
4058
|
+
modifiers: [Ki],
|
|
3994
4059
|
handleDragEnd: (n) => {
|
|
3995
4060
|
let { active: r, over: i } = n;
|
|
3996
4061
|
if (!i || r.id === i.id) return;
|
|
@@ -3999,7 +4064,7 @@ function Gi({ columnOrder: e, onColumnOrderChange: t }) {
|
|
|
3999
4064
|
}
|
|
4000
4065
|
};
|
|
4001
4066
|
}
|
|
4002
|
-
function
|
|
4067
|
+
function Ji(e) {
|
|
4003
4068
|
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = ze({ id: e });
|
|
4004
4069
|
return {
|
|
4005
4070
|
setNodeRef: r,
|
|
@@ -4017,13 +4082,13 @@ function Ki(e) {
|
|
|
4017
4082
|
}
|
|
4018
4083
|
//#endregion
|
|
4019
4084
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
4020
|
-
function
|
|
4085
|
+
function Yi({ row: e, actions: t }) {
|
|
4021
4086
|
return t.length === 0 ? null : /* @__PURE__ */ X(Nn, { children: [/* @__PURE__ */ Y(Pn, { children: /* @__PURE__ */ Y(nt, {
|
|
4022
4087
|
variant: "tertiary",
|
|
4023
4088
|
size: "sm",
|
|
4024
4089
|
iconOnly: !0,
|
|
4025
4090
|
"aria-label": "Row actions",
|
|
4026
|
-
leftIcon: /* @__PURE__ */ Y(
|
|
4091
|
+
leftIcon: /* @__PURE__ */ Y(z, { className: "h-4 w-4" })
|
|
4027
4092
|
}) }), /* @__PURE__ */ Y(In, {
|
|
4028
4093
|
align: "end",
|
|
4029
4094
|
children: t.map((t, n) => /* @__PURE__ */ Y(Ln, {
|
|
@@ -4037,15 +4102,15 @@ function qi({ row: e, actions: t }) {
|
|
|
4037
4102
|
}
|
|
4038
4103
|
//#endregion
|
|
4039
4104
|
//#region src/components/TableV2/TableV2.utils.tsx
|
|
4040
|
-
var
|
|
4105
|
+
var Xi = {
|
|
4041
4106
|
comfortable: "py-3",
|
|
4042
4107
|
compact: "py-2"
|
|
4043
|
-
},
|
|
4108
|
+
}, Zi = {
|
|
4044
4109
|
left: "text-left",
|
|
4045
4110
|
center: "text-center",
|
|
4046
4111
|
right: "text-right"
|
|
4047
4112
|
};
|
|
4048
|
-
function
|
|
4113
|
+
function Qi() {
|
|
4049
4114
|
return {
|
|
4050
4115
|
id: "select",
|
|
4051
4116
|
size: 40,
|
|
@@ -4070,7 +4135,7 @@ function Xi() {
|
|
|
4070
4135
|
})
|
|
4071
4136
|
};
|
|
4072
4137
|
}
|
|
4073
|
-
function
|
|
4138
|
+
function $i(e, t) {
|
|
4074
4139
|
return {
|
|
4075
4140
|
id: "actions",
|
|
4076
4141
|
header: t?.header ?? "",
|
|
@@ -4078,13 +4143,13 @@ function Zi(e, t) {
|
|
|
4078
4143
|
enableSorting: !1,
|
|
4079
4144
|
enableColumnFilter: !1,
|
|
4080
4145
|
enableResizing: !1,
|
|
4081
|
-
cell: ({ row: t }) => /* @__PURE__ */ Y(
|
|
4146
|
+
cell: ({ row: t }) => /* @__PURE__ */ Y(Yi, {
|
|
4082
4147
|
row: t.original,
|
|
4083
4148
|
actions: e(t.original)
|
|
4084
4149
|
})
|
|
4085
4150
|
};
|
|
4086
4151
|
}
|
|
4087
|
-
function
|
|
4152
|
+
function ea(e) {
|
|
4088
4153
|
let t = e.getIsPinned();
|
|
4089
4154
|
return t ? {
|
|
4090
4155
|
position: "sticky",
|
|
@@ -4095,26 +4160,26 @@ function Qi(e) {
|
|
|
4095
4160
|
}
|
|
4096
4161
|
//#endregion
|
|
4097
4162
|
//#region src/components/TableV2/TableV2.tsx
|
|
4098
|
-
function
|
|
4163
|
+
function ta(e, t, n) {
|
|
4099
4164
|
let [r, i] = m(n);
|
|
4100
4165
|
return [e === void 0 ? r : e, (e) => {
|
|
4101
4166
|
i((t) => typeof e == "function" ? e(t) : e), t?.(e);
|
|
4102
4167
|
}];
|
|
4103
4168
|
}
|
|
4104
|
-
var
|
|
4105
|
-
function
|
|
4106
|
-
let c = e.column, l =
|
|
4169
|
+
var na = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4170
|
+
function ra({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
4171
|
+
let c = e.column, l = na.has(c.id), u = i && !l, d = Ji(c.id), f = c.columnDef.meta?.align ?? "left", p = c.getIsSorted(), m = !l && (o && c.getCanPin() || s && c.getCanHide()), h = Ce(c.columnDef.header, e.getContext());
|
|
4107
4172
|
return /* @__PURE__ */ X("th", {
|
|
4108
4173
|
ref: u ? d.setNodeRef : void 0,
|
|
4109
4174
|
colSpan: e.colSpan,
|
|
4110
4175
|
scope: "col",
|
|
4111
4176
|
style: {
|
|
4112
4177
|
width: a ? e.getSize() : void 0,
|
|
4113
|
-
...
|
|
4178
|
+
...ea(c),
|
|
4114
4179
|
...u ? d.style : null
|
|
4115
4180
|
},
|
|
4116
4181
|
"aria-sort": p === "asc" ? "ascending" : p === "desc" ? "descending" : void 0,
|
|
4117
|
-
className: Z("relative px-4 whitespace-nowrap bg-bg-container",
|
|
4182
|
+
className: Z("relative px-4 whitespace-nowrap bg-bg-container", Xi[t], Zi[f]),
|
|
4118
4183
|
children: [
|
|
4119
4184
|
/* @__PURE__ */ X("div", {
|
|
4120
4185
|
className: "flex items-center gap-1",
|
|
@@ -4146,23 +4211,23 @@ function ta({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4146
4211
|
type: "button",
|
|
4147
4212
|
"aria-label": `${typeof h == "string" ? h : c.id} column options`,
|
|
4148
4213
|
className: "ml-auto shrink-0 text-fg-tertiary hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 rounded-sm",
|
|
4149
|
-
children: /* @__PURE__ */ Y(
|
|
4214
|
+
children: /* @__PURE__ */ Y(R, { className: "h-3.5 w-3.5" })
|
|
4150
4215
|
}) }), /* @__PURE__ */ X(In, {
|
|
4151
4216
|
align: "start",
|
|
4152
4217
|
children: [
|
|
4153
4218
|
o && c.getCanPin() && /* @__PURE__ */ X(J, { children: [
|
|
4154
4219
|
c.getIsPinned() !== "left" && /* @__PURE__ */ Y(Ln, {
|
|
4155
|
-
icon: /* @__PURE__ */ Y(
|
|
4220
|
+
icon: /* @__PURE__ */ Y(H, { className: "h-4 w-4" }),
|
|
4156
4221
|
onSelect: () => c.pin("left"),
|
|
4157
4222
|
children: "Pin left"
|
|
4158
4223
|
}),
|
|
4159
4224
|
c.getIsPinned() !== "right" && /* @__PURE__ */ Y(Ln, {
|
|
4160
|
-
icon: /* @__PURE__ */ Y(
|
|
4225
|
+
icon: /* @__PURE__ */ Y(H, { className: "h-4 w-4" }),
|
|
4161
4226
|
onSelect: () => c.pin("right"),
|
|
4162
4227
|
children: "Pin right"
|
|
4163
4228
|
}),
|
|
4164
4229
|
c.getIsPinned() && /* @__PURE__ */ Y(Ln, {
|
|
4165
|
-
icon: /* @__PURE__ */ Y(
|
|
4230
|
+
icon: /* @__PURE__ */ Y(U, { className: "h-4 w-4" }),
|
|
4166
4231
|
onSelect: () => c.pin(!1),
|
|
4167
4232
|
children: "Unpin"
|
|
4168
4233
|
})
|
|
@@ -4180,7 +4245,7 @@ function ta({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4180
4245
|
r && c.getCanFilter() && /* @__PURE__ */ Y("div", {
|
|
4181
4246
|
className: "mt-2",
|
|
4182
4247
|
onClick: (e) => e.stopPropagation(),
|
|
4183
|
-
children: /* @__PURE__ */ Y(
|
|
4248
|
+
children: /* @__PURE__ */ Y(Bi, { column: c })
|
|
4184
4249
|
}),
|
|
4185
4250
|
a && c.getCanResize() && /* @__PURE__ */ Y("div", {
|
|
4186
4251
|
onMouseDown: e.getResizeHandler(),
|
|
@@ -4191,8 +4256,8 @@ function ta({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4191
4256
|
]
|
|
4192
4257
|
});
|
|
4193
4258
|
}
|
|
4194
|
-
function
|
|
4195
|
-
let n = e.getVisibleCells(), r = n.find((e) => !
|
|
4259
|
+
function ia({ row: e, onRowClick: t }) {
|
|
4260
|
+
let n = e.getVisibleCells(), r = n.find((e) => !na.has(e.column.id)), i = n.find((e) => e.column.id === "select"), a = n.find((e) => e.column.id === "actions"), o = n.filter((e) => e !== r && !na.has(e.column.id));
|
|
4196
4261
|
return /* @__PURE__ */ X("div", {
|
|
4197
4262
|
"data-selected": e.getIsSelected() || void 0,
|
|
4198
4263
|
onClick: t ? () => t(e.original) : void 0,
|
|
@@ -4227,26 +4292,26 @@ function na({ row: e, onRowClick: t }) {
|
|
|
4227
4292
|
})]
|
|
4228
4293
|
});
|
|
4229
4294
|
}
|
|
4230
|
-
function
|
|
4295
|
+
function aa({ rowCount: e }) {
|
|
4231
4296
|
return /* @__PURE__ */ Y("div", { children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ X("div", {
|
|
4232
4297
|
"aria-hidden": t > 0 || void 0,
|
|
4233
4298
|
className: "flex flex-col gap-2 border-b border-border-default p-4",
|
|
4234
|
-
children: [/* @__PURE__ */ Y(
|
|
4299
|
+
children: [/* @__PURE__ */ Y(oi, {
|
|
4235
4300
|
variant: "text",
|
|
4236
4301
|
width: "60%"
|
|
4237
|
-
}), /* @__PURE__ */ Y(
|
|
4302
|
+
}), /* @__PURE__ */ Y(oi, {
|
|
4238
4303
|
variant: "text",
|
|
4239
4304
|
width: "90%"
|
|
4240
4305
|
})]
|
|
4241
4306
|
}, t)) });
|
|
4242
4307
|
}
|
|
4243
|
-
function
|
|
4244
|
-
let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: d, manualSorting: m = !1, enableFiltering: h = !1, columnFilters: g, onColumnFiltersChange: _, manualFiltering: v = !1, enableGlobalFilter: y = !1, globalFilter: b, onGlobalFilterChange: x, enableRowSelection: S = !1, enableMultiRowSelection: C = !0, rowSelection: w, onRowSelectionChange: T, enableColumnVisibility: E = !1, columnVisibility: D, onColumnVisibilityChange: O, enableColumnOrdering: k = !1, columnOrder: ee, onColumnOrderChange: A, enablePinning: j = !1, columnPinning: M, onColumnPinningChange: N, enableColumnResizing: P = !1, columnResizeMode: F = "onChange", enablePagination:
|
|
4308
|
+
function oa(e, t) {
|
|
4309
|
+
let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: d, manualSorting: m = !1, enableFiltering: h = !1, columnFilters: g, onColumnFiltersChange: _, manualFiltering: v = !1, enableGlobalFilter: y = !1, globalFilter: b, onGlobalFilterChange: x, enableRowSelection: S = !1, enableMultiRowSelection: C = !0, rowSelection: w, onRowSelectionChange: T, enableColumnVisibility: E = !1, columnVisibility: D, onColumnVisibilityChange: O, enableColumnOrdering: k = !1, columnOrder: ee, onColumnOrderChange: A, enablePinning: j = !1, columnPinning: M, onColumnPinningChange: N, enableColumnResizing: P = !1, columnResizeMode: F = "onChange", enablePagination: te = !1, pageSize: I = 10, pageSizeOptions: L, pagination: R, onPaginationChange: z, manualPagination: B = !1, pageCount: V, rowCount: H, enableVirtualization: U = !1, estimatedRowHeight: W = 44, maxBodyHeight: ne = 480, onRowClick: re, toolbar: ie = !1, toolbarActions: G, searchPlaceholder: ae, onRefresh: K, onExport: oe, density: se = "comfortable", stickyHeader: ce = !1, wrapperClassName: q, className: le, dataTestId: ue } = e, [de, fe] = ta(u, d, []), [pe, me] = ta(g, _, []), [he, ge] = ta(b, x, ""), [_e, ve] = ta(w, T, {}), [ye, be] = ta(D, O, {}), [xe, Ae] = ta(ee, A, []), [je, Me] = ta(M, N, {}), [Ne, Pe] = ta(R, z, {
|
|
4245
4310
|
pageIndex: 0,
|
|
4246
|
-
pageSize:
|
|
4311
|
+
pageSize: I
|
|
4247
4312
|
}), Ie = Oe({
|
|
4248
4313
|
data: n,
|
|
4249
|
-
columns: f(() => !S || r.some((e) => e.id === "select") ? r : [
|
|
4314
|
+
columns: f(() => !S || r.some((e) => e.id === "select") ? r : [Qi(), ...r], [r, S]),
|
|
4250
4315
|
getRowId: s,
|
|
4251
4316
|
state: {
|
|
4252
4317
|
sorting: de,
|
|
@@ -4276,34 +4341,34 @@ function ia(e, t) {
|
|
|
4276
4341
|
enableMultiRowSelection: C,
|
|
4277
4342
|
enableColumnResizing: P,
|
|
4278
4343
|
columnResizeMode: F,
|
|
4279
|
-
manualPagination:
|
|
4280
|
-
pageCount:
|
|
4281
|
-
rowCount:
|
|
4344
|
+
manualPagination: B,
|
|
4345
|
+
pageCount: V,
|
|
4346
|
+
rowCount: H,
|
|
4282
4347
|
getCoreRowModel: we(),
|
|
4283
4348
|
getSortedRowModel: c ? De() : void 0,
|
|
4284
4349
|
getFilteredRowModel: h || y ? Te() : void 0,
|
|
4285
|
-
getPaginationRowModel:
|
|
4286
|
-
}), Re = Ie.getRowModel().rows, ze = Ie.getVisibleLeafColumns().length, Be = f(() => xe.length > 0 ? xe : Ie.getAllLeafColumns().map((e) => e.id), [xe, Ie]), Ve =
|
|
4350
|
+
getPaginationRowModel: te ? Ee() : void 0
|
|
4351
|
+
}), Re = Ie.getRowModel().rows, ze = Ie.getVisibleLeafColumns().length, Be = f(() => xe.length > 0 ? xe : Ie.getAllLeafColumns().map((e) => e.id), [xe, Ie]), Ve = qi({
|
|
4287
4352
|
columnOrder: Be,
|
|
4288
4353
|
onColumnOrderChange: Ae
|
|
4289
4354
|
}), He = (e) => Ve.handleDragEnd(e), Ue = p(null), We = Se({
|
|
4290
4355
|
count: Re.length,
|
|
4291
4356
|
getScrollElement: () => Ue.current,
|
|
4292
|
-
estimateSize: () =>
|
|
4357
|
+
estimateSize: () => W,
|
|
4293
4358
|
overscan: 10,
|
|
4294
|
-
enabled:
|
|
4295
|
-
}), Ge =
|
|
4359
|
+
enabled: U
|
|
4360
|
+
}), Ge = U ? We.getVirtualItems() : null, Q = Ge && Ge.length > 0 ? Ge[0]?.start ?? 0 : 0, Ke = Ge && Ge.length > 0 ? We.getTotalSize() - (Ge[Ge.length - 1]?.end ?? 0) : 0, qe = (e) => /* @__PURE__ */ Y("tr", {
|
|
4296
4361
|
"data-selected": e.getIsSelected() || void 0,
|
|
4297
|
-
onClick:
|
|
4298
|
-
className: Z("border-t border-border-default",
|
|
4362
|
+
onClick: re ? () => re(e.original) : void 0,
|
|
4363
|
+
className: Z("border-t border-border-default", re && "cursor-pointer hover:bg-bg-container", e.getIsSelected() && "bg-brand-50"),
|
|
4299
4364
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ Y("td", {
|
|
4300
|
-
style:
|
|
4301
|
-
className: Z("bg-bg-default px-4",
|
|
4365
|
+
style: ea(e.column),
|
|
4366
|
+
className: Z("bg-bg-default px-4", Xi[se], Zi[e.column.columnDef.meta?.align ?? "left"]),
|
|
4302
4367
|
children: Ce(e.column.columnDef.cell, e.getContext())
|
|
4303
4368
|
}, e.id))
|
|
4304
|
-
}, e.id), Je = (e, t) => /* @__PURE__ */ Y("tr", { children: t.map((e) => /* @__PURE__ */ Y(
|
|
4369
|
+
}, e.id), Je = (e, t) => /* @__PURE__ */ Y("tr", { children: t.map((e) => /* @__PURE__ */ Y(ra, {
|
|
4305
4370
|
header: e,
|
|
4306
|
-
density:
|
|
4371
|
+
density: se,
|
|
4307
4372
|
enableSorting: c,
|
|
4308
4373
|
enableFiltering: h,
|
|
4309
4374
|
enableColumnOrdering: k,
|
|
@@ -4314,9 +4379,9 @@ function ia(e, t) {
|
|
|
4314
4379
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4315
4380
|
style: { width: P ? Ie.getTotalSize() : "100%" },
|
|
4316
4381
|
children: [/* @__PURE__ */ Y("thead", {
|
|
4317
|
-
className: Z("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider",
|
|
4382
|
+
className: Z("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", ce && "sticky top-0 z-2"),
|
|
4318
4383
|
children: Ie.getHeaderGroups().map((e) => Je(e.id, e.headers))
|
|
4319
|
-
}), /* @__PURE__ */ Y("tbody", { children: i ? /* @__PURE__ */ Y(
|
|
4384
|
+
}), /* @__PURE__ */ Y("tbody", { children: i ? /* @__PURE__ */ Y(Hi, {
|
|
4320
4385
|
columnCount: ze,
|
|
4321
4386
|
rowCount: Ne.pageSize
|
|
4322
4387
|
}) : Re.length === 0 ? /* @__PURE__ */ Y("tr", { children: /* @__PURE__ */ Y("td", {
|
|
@@ -4326,7 +4391,7 @@ function ia(e, t) {
|
|
|
4326
4391
|
size: "sm",
|
|
4327
4392
|
title: o
|
|
4328
4393
|
})
|
|
4329
|
-
}) }) :
|
|
4394
|
+
}) }) : U && Ge ? /* @__PURE__ */ X(J, { children: [
|
|
4330
4395
|
Q > 0 && /* @__PURE__ */ Y("tr", {
|
|
4331
4396
|
"aria-hidden": !0,
|
|
4332
4397
|
children: /* @__PURE__ */ Y("td", {
|
|
@@ -4350,16 +4415,16 @@ function ia(e, t) {
|
|
|
4350
4415
|
return /* @__PURE__ */ X("div", {
|
|
4351
4416
|
ref: t,
|
|
4352
4417
|
"data-test-id": ue,
|
|
4353
|
-
className: Z("w-full rounded-lg border border-border-default bg-bg-default",
|
|
4418
|
+
className: Z("w-full rounded-lg border border-border-default bg-bg-default", q, le),
|
|
4354
4419
|
children: [
|
|
4355
|
-
|
|
4420
|
+
ie === !1 ? null : ie ?? /* @__PURE__ */ Y(Gi, {
|
|
4356
4421
|
table: Ie,
|
|
4357
4422
|
enableGlobalFilter: y,
|
|
4358
4423
|
enableColumnVisibility: E,
|
|
4359
|
-
searchPlaceholder:
|
|
4360
|
-
onRefresh:
|
|
4361
|
-
onExport:
|
|
4362
|
-
actions:
|
|
4424
|
+
searchPlaceholder: ae,
|
|
4425
|
+
onRefresh: K,
|
|
4426
|
+
onExport: oe,
|
|
4427
|
+
actions: G
|
|
4363
4428
|
}),
|
|
4364
4429
|
a ? /* @__PURE__ */ Y("div", {
|
|
4365
4430
|
className: "p-4",
|
|
@@ -4372,8 +4437,8 @@ function ia(e, t) {
|
|
|
4372
4437
|
className: "hidden md:block",
|
|
4373
4438
|
children: /* @__PURE__ */ Y("div", {
|
|
4374
4439
|
ref: Ue,
|
|
4375
|
-
className: Z("w-full overflow-auto",
|
|
4376
|
-
style:
|
|
4440
|
+
className: Z("w-full overflow-auto", ie === !1 ? "rounded-lg" : "rounded-b-lg"),
|
|
4441
|
+
style: U || ce ? { maxHeight: ne } : void 0,
|
|
4377
4442
|
children: k ? /* @__PURE__ */ Y(ke, {
|
|
4378
4443
|
sensors: Ve.sensors,
|
|
4379
4444
|
collisionDetection: Ve.collisionDetection,
|
|
@@ -4388,32 +4453,32 @@ function ia(e, t) {
|
|
|
4388
4453
|
})
|
|
4389
4454
|
}), /* @__PURE__ */ Y("div", {
|
|
4390
4455
|
className: "md:hidden",
|
|
4391
|
-
children: i ? /* @__PURE__ */ Y(
|
|
4456
|
+
children: i ? /* @__PURE__ */ Y(aa, { rowCount: Ne.pageSize }) : Re.length === 0 ? /* @__PURE__ */ Y(Xn, {
|
|
4392
4457
|
size: "sm",
|
|
4393
4458
|
title: o
|
|
4394
|
-
}) : Re.map((e) => /* @__PURE__ */ Y(
|
|
4459
|
+
}) : Re.map((e) => /* @__PURE__ */ Y(ia, {
|
|
4395
4460
|
row: e,
|
|
4396
|
-
onRowClick:
|
|
4461
|
+
onRowClick: re
|
|
4397
4462
|
}, e.id))
|
|
4398
4463
|
})] }),
|
|
4399
|
-
|
|
4464
|
+
te && !a && /* @__PURE__ */ Y(Vi, {
|
|
4400
4465
|
table: Ie,
|
|
4401
|
-
pageSizeOptions:
|
|
4466
|
+
pageSizeOptions: L
|
|
4402
4467
|
})
|
|
4403
4468
|
]
|
|
4404
4469
|
});
|
|
4405
4470
|
}
|
|
4406
|
-
var
|
|
4407
|
-
|
|
4471
|
+
var sa = a(oa);
|
|
4472
|
+
sa.displayName = "TableV2";
|
|
4408
4473
|
//#endregion
|
|
4409
4474
|
//#region src/components/Tabs/Tabs.tsx
|
|
4410
|
-
var
|
|
4411
|
-
function
|
|
4412
|
-
let e = c(
|
|
4475
|
+
var ca = r(null);
|
|
4476
|
+
function la() {
|
|
4477
|
+
let e = c(ca);
|
|
4413
4478
|
if (!e) throw Error("Tab components must be used inside <Tabs>");
|
|
4414
4479
|
return e;
|
|
4415
4480
|
}
|
|
4416
|
-
function
|
|
4481
|
+
function ua(t) {
|
|
4417
4482
|
let n = [];
|
|
4418
4483
|
e.forEach(t, (e) => {
|
|
4419
4484
|
o(e) && n.push(e);
|
|
@@ -4427,9 +4492,9 @@ function ca(t) {
|
|
|
4427
4492
|
}
|
|
4428
4493
|
return "";
|
|
4429
4494
|
}
|
|
4430
|
-
var
|
|
4431
|
-
let [f, p] = m(() => e ??
|
|
4432
|
-
return /* @__PURE__ */ Y(
|
|
4495
|
+
var da = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r = "underline", size: i = "md", disabled: a = !1, className: o, children: s, dataTestId: c, ...l }, d) {
|
|
4496
|
+
let [f, p] = m(() => e ?? ua(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
4497
|
+
return /* @__PURE__ */ Y(ca.Provider, {
|
|
4433
4498
|
value: {
|
|
4434
4499
|
value: g,
|
|
4435
4500
|
setValue: (e) => {
|
|
@@ -4448,8 +4513,8 @@ var la = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4448
4513
|
children: s
|
|
4449
4514
|
})
|
|
4450
4515
|
});
|
|
4451
|
-
}),
|
|
4452
|
-
let { variant: s } =
|
|
4516
|
+
}), fa = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
4517
|
+
let { variant: s } = la(), c = p(null);
|
|
4453
4518
|
return /* @__PURE__ */ Y("div", {
|
|
4454
4519
|
ref: Vt(o, c),
|
|
4455
4520
|
role: "tablist",
|
|
@@ -4471,12 +4536,12 @@ var la = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4471
4536
|
children: e
|
|
4472
4537
|
});
|
|
4473
4538
|
});
|
|
4474
|
-
|
|
4475
|
-
var
|
|
4539
|
+
fa.displayName = "TabList";
|
|
4540
|
+
var pa = {
|
|
4476
4541
|
lg: "h-11 px-4 text-p-md",
|
|
4477
4542
|
md: "h-10 px-3 text-p-std",
|
|
4478
4543
|
sm: "h-8 px-2.5 text-p-sm"
|
|
4479
|
-
},
|
|
4544
|
+
}, ma = {
|
|
4480
4545
|
underline: {
|
|
4481
4546
|
on: "bg-brand-500 text-white",
|
|
4482
4547
|
off: "bg-bg-subtle text-fg-secondary"
|
|
@@ -4489,8 +4554,8 @@ var da = {
|
|
|
4489
4554
|
on: "bg-brand-500 text-white",
|
|
4490
4555
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4491
4556
|
}
|
|
4492
|
-
},
|
|
4493
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } =
|
|
4557
|
+
}, ha = a(function({ value: e, children: t, disabled: n, icon: r, badge: i, badgeProps: a, rightIcon: o, onRightIconClick: s, rightIconLabel: c, className: l, dataTestId: u, onClick: d, id: f, ...p }, m) {
|
|
4558
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = la(), x = Q(h, e), S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Z("group relative inline-flex items-center justify-center gap-2 font-medium outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1 focus-visible:rounded-md", pa[v], S && "opacity-50 cursor-not-allowed"), D = _ === "underline" ? Z("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? Z("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : Z("border-r border-border-default last:border-r-0", x ? "bg-bg-default text-fg-default" : "bg-transparent text-fg-secondary hover:bg-bg-subtle"), O = /* @__PURE__ */ X("button", {
|
|
4494
4559
|
ref: m,
|
|
4495
4560
|
id: w,
|
|
4496
4561
|
type: "button",
|
|
@@ -4519,7 +4584,7 @@ var da = {
|
|
|
4519
4584
|
...a,
|
|
4520
4585
|
children: i
|
|
4521
4586
|
}) : /* @__PURE__ */ Y("span", {
|
|
4522
|
-
className: Z("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ?
|
|
4587
|
+
className: Z("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ? ma[_].on : ma[_].off),
|
|
4523
4588
|
children: i
|
|
4524
4589
|
})),
|
|
4525
4590
|
_ === "underline" && /* @__PURE__ */ Y("span", {
|
|
@@ -4541,8 +4606,8 @@ var da = {
|
|
|
4541
4606
|
children: o
|
|
4542
4607
|
})]
|
|
4543
4608
|
}) : O;
|
|
4544
|
-
}),
|
|
4545
|
-
let { value: c, tabsId: l } =
|
|
4609
|
+
}), ga = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4610
|
+
let { value: c, tabsId: l } = la(), u = Q(c, e);
|
|
4546
4611
|
return !u && !a ? null : /* @__PURE__ */ Y("div", {
|
|
4547
4612
|
ref: s,
|
|
4548
4613
|
id: i ?? `${l}-panel-${e}`,
|
|
@@ -4554,7 +4619,7 @@ var da = {
|
|
|
4554
4619
|
...o,
|
|
4555
4620
|
children: t
|
|
4556
4621
|
});
|
|
4557
|
-
}),
|
|
4622
|
+
}), _a = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, error: i = !1, id: a, disabled: o, required: s, maxLength: c, showCount: l = !1, className: d, wrapperClassName: f, value: p, defaultValue: h, rows: g = 4, dataTestId: _, onChange: v, ...y }, b) {
|
|
4558
4623
|
let x = u(), S = a ?? x, C = i || !!r, w = r ? `${S}-error` : n ? `${S}-help` : void 0, T = p !== void 0, E = l && !!c, [D, O] = m(() => String(h ?? "").length), k = T ? String(p).length : D;
|
|
4559
4624
|
return /* @__PURE__ */ X("div", {
|
|
4560
4625
|
className: Z("flex flex-col gap-1.5 w-full", f),
|
|
@@ -4616,7 +4681,7 @@ var da = {
|
|
|
4616
4681
|
})
|
|
4617
4682
|
]
|
|
4618
4683
|
});
|
|
4619
|
-
}),
|
|
4684
|
+
}), va = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
4620
4685
|
let c = u(), l = n ?? c;
|
|
4621
4686
|
return /* @__PURE__ */ X("label", {
|
|
4622
4687
|
htmlFor: l,
|
|
@@ -4638,10 +4703,10 @@ var da = {
|
|
|
4638
4703
|
}),
|
|
4639
4704
|
/* @__PURE__ */ X("span", {
|
|
4640
4705
|
className: Z("inline-flex h-8 w-16 items-center justify-between rounded-full px-2 transition-colors", "bg-gray-200 peer-checked:bg-gray-700 dark:bg-gray-700 dark:peer-checked:bg-gray-900", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2"),
|
|
4641
|
-
children: [/* @__PURE__ */ Y(
|
|
4706
|
+
children: [/* @__PURE__ */ Y(ae, {
|
|
4642
4707
|
className: "size-4 text-yellow-500 z-1",
|
|
4643
4708
|
"aria-hidden": !0
|
|
4644
|
-
}), /* @__PURE__ */ Y(
|
|
4709
|
+
}), /* @__PURE__ */ Y(L, {
|
|
4645
4710
|
className: "size-4 text-gray-400 z-1",
|
|
4646
4711
|
"aria-hidden": !0
|
|
4647
4712
|
})]
|
|
@@ -4656,20 +4721,20 @@ var da = {
|
|
|
4656
4721
|
children: t
|
|
4657
4722
|
})]
|
|
4658
4723
|
});
|
|
4659
|
-
}),
|
|
4724
|
+
}), ya = {
|
|
4660
4725
|
lg: "px-3 py-2 text-p-std",
|
|
4661
4726
|
sm: "px-2 py-1 text-p-sm"
|
|
4662
|
-
},
|
|
4727
|
+
}, ba = {
|
|
4663
4728
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4664
4729
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
4665
4730
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
4666
4731
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
4667
|
-
},
|
|
4732
|
+
}, xa = {
|
|
4668
4733
|
top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
|
|
4669
4734
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
|
|
4670
4735
|
left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
|
|
4671
4736
|
right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
|
|
4672
|
-
},
|
|
4737
|
+
}, Sa = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, className: s, dataTestId: c }, l) {
|
|
4673
4738
|
let [d, f] = m(!1), h = p(null), g = u(), _ = () => {
|
|
4674
4739
|
h.current && clearTimeout(h.current), h.current = setTimeout(() => f(!0), a);
|
|
4675
4740
|
}, v = () => {
|
|
@@ -4690,39 +4755,39 @@ var da = {
|
|
|
4690
4755
|
}), d && /* @__PURE__ */ X("span", {
|
|
4691
4756
|
role: "tooltip",
|
|
4692
4757
|
id: g,
|
|
4693
|
-
className: Z("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none",
|
|
4758
|
+
className: Z("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", ya[i], ba[r], s),
|
|
4694
4759
|
children: [e, /* @__PURE__ */ Y("span", {
|
|
4695
4760
|
"aria-hidden": !0,
|
|
4696
|
-
className: Z("absolute h-0 w-0 border-4",
|
|
4761
|
+
className: Z("absolute h-0 w-0 border-4", xa[r])
|
|
4697
4762
|
})]
|
|
4698
4763
|
})]
|
|
4699
4764
|
});
|
|
4700
|
-
}),
|
|
4765
|
+
}), Ca = "We'll be back soon", wa = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", Ta = {
|
|
4701
4766
|
lg: "xl",
|
|
4702
4767
|
sm: "lg"
|
|
4703
|
-
},
|
|
4768
|
+
}, Ea = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
4704
4769
|
return /* @__PURE__ */ Y(Xn, {
|
|
4705
4770
|
ref: a,
|
|
4706
4771
|
size: e,
|
|
4707
|
-
title: t ??
|
|
4708
|
-
description: n ??
|
|
4772
|
+
title: t ?? Ca,
|
|
4773
|
+
description: n ?? wa,
|
|
4709
4774
|
illustration: r ?? /* @__PURE__ */ Y(Hn, {
|
|
4710
4775
|
icon: k,
|
|
4711
4776
|
tone: "brand",
|
|
4712
4777
|
shape: "circle",
|
|
4713
|
-
size:
|
|
4778
|
+
size: Ta[e]
|
|
4714
4779
|
}),
|
|
4715
4780
|
...i
|
|
4716
4781
|
});
|
|
4717
4782
|
});
|
|
4718
4783
|
//#endregion
|
|
4719
4784
|
//#region src/hooks/useStepper.ts
|
|
4720
|
-
function
|
|
4785
|
+
function Da(e, t) {
|
|
4721
4786
|
return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
|
|
4722
4787
|
}
|
|
4723
|
-
function
|
|
4724
|
-
let [a, o] = m(() =>
|
|
4725
|
-
let n =
|
|
4788
|
+
function Oa({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
|
|
4789
|
+
let [a, o] = m(() => Da(t, e)), s = n !== void 0, c = s ? Da(n, e) : a, l = (t) => {
|
|
4790
|
+
let n = Da(t, e);
|
|
4726
4791
|
s || o(n), r?.(n);
|
|
4727
4792
|
};
|
|
4728
4793
|
return {
|
|
@@ -4750,37 +4815,37 @@ function Ea({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i =
|
|
|
4750
4815
|
}
|
|
4751
4816
|
//#endregion
|
|
4752
4817
|
//#region src/hooks/useOnOutsideClick.ts
|
|
4753
|
-
var
|
|
4754
|
-
function
|
|
4755
|
-
let t =
|
|
4818
|
+
var ka = [];
|
|
4819
|
+
function Aa(e) {
|
|
4820
|
+
let t = ka[ka.length - 1];
|
|
4756
4821
|
if (!t) return;
|
|
4757
4822
|
let { ref: n, callback: r, shouldRemoveCallback: i } = t;
|
|
4758
|
-
n && !n.contains(e.target) && (i &&
|
|
4823
|
+
n && !n.contains(e.target) && (i && ka.splice(ka.length - 1, 1), r(e));
|
|
4759
4824
|
}
|
|
4760
|
-
var
|
|
4825
|
+
var ja = (e, t, n, r, i = !0) => {
|
|
4761
4826
|
l(() => {
|
|
4762
|
-
if (e && n && r) return
|
|
4827
|
+
if (e && n && r) return ka.push({
|
|
4763
4828
|
ref: e,
|
|
4764
4829
|
callback: t,
|
|
4765
4830
|
uid: r,
|
|
4766
4831
|
shouldRemoveCallback: i
|
|
4767
|
-
}),
|
|
4768
|
-
|
|
4832
|
+
}), ka.length === 1 && document.addEventListener("mousedown", Aa), () => {
|
|
4833
|
+
ka.length === 0 && document.removeEventListener("mousedown", Aa);
|
|
4769
4834
|
};
|
|
4770
4835
|
}, [
|
|
4771
4836
|
e,
|
|
4772
4837
|
n,
|
|
4773
4838
|
r
|
|
4774
4839
|
]), l(() => {
|
|
4775
|
-
if (!n &&
|
|
4776
|
-
let e =
|
|
4777
|
-
e >= 0 &&
|
|
4840
|
+
if (!n && ka.length > 0) {
|
|
4841
|
+
let e = ka.findIndex((e) => e.uid === r);
|
|
4842
|
+
e >= 0 && ka.splice(e, 1);
|
|
4778
4843
|
}
|
|
4779
4844
|
}, [n]);
|
|
4780
4845
|
};
|
|
4781
4846
|
//#endregion
|
|
4782
4847
|
//#region src/hooks/useEscapeKey.ts
|
|
4783
|
-
function
|
|
4848
|
+
function Ma(e, t = !0) {
|
|
4784
4849
|
l(() => {
|
|
4785
4850
|
if (!t) return;
|
|
4786
4851
|
let n = (t) => {
|
|
@@ -4791,18 +4856,18 @@ function Aa(e, t = !0) {
|
|
|
4791
4856
|
}
|
|
4792
4857
|
//#endregion
|
|
4793
4858
|
//#region src/hooks/useHideBodyScroll.ts
|
|
4794
|
-
var
|
|
4795
|
-
function
|
|
4859
|
+
var Na = 0, Pa = "";
|
|
4860
|
+
function Fa(e) {
|
|
4796
4861
|
l(() => {
|
|
4797
|
-
if (e) return
|
|
4798
|
-
--
|
|
4862
|
+
if (e) return Na === 0 && (Pa = document.body.style.overflow, document.body.style.overflow = "hidden"), Na += 1, () => {
|
|
4863
|
+
--Na, Na === 0 && (document.body.style.overflow = Pa);
|
|
4799
4864
|
};
|
|
4800
4865
|
}, [e]);
|
|
4801
4866
|
}
|
|
4802
4867
|
//#endregion
|
|
4803
4868
|
//#region src/hooks/useIsMobile.ts
|
|
4804
|
-
var
|
|
4805
|
-
function
|
|
4869
|
+
var Ia = 768;
|
|
4870
|
+
function La(e = Ia) {
|
|
4806
4871
|
let [t, n] = m(!1);
|
|
4807
4872
|
return l(() => {
|
|
4808
4873
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -4812,33 +4877,33 @@ function Fa(e = Pa) {
|
|
|
4812
4877
|
}
|
|
4813
4878
|
//#endregion
|
|
4814
4879
|
//#region src/hooks/useFormContext.ts
|
|
4815
|
-
function
|
|
4880
|
+
function Ra() {
|
|
4816
4881
|
let e = c(er);
|
|
4817
4882
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
4818
4883
|
return e;
|
|
4819
4884
|
}
|
|
4820
4885
|
//#endregion
|
|
4821
4886
|
//#region src/hooks/useFormProps.ts
|
|
4822
|
-
var
|
|
4887
|
+
var za = () => void 0, Ba = {
|
|
4823
4888
|
errors: {},
|
|
4824
|
-
setValue:
|
|
4825
|
-
reset:
|
|
4826
|
-
clearErrors:
|
|
4827
|
-
setError:
|
|
4828
|
-
unregister:
|
|
4889
|
+
setValue: za,
|
|
4890
|
+
reset: za,
|
|
4891
|
+
clearErrors: za,
|
|
4892
|
+
setError: za,
|
|
4893
|
+
unregister: za,
|
|
4829
4894
|
isDirty: !1,
|
|
4830
4895
|
isSubmitted: !1,
|
|
4831
4896
|
isSubmitting: !1,
|
|
4832
4897
|
isValid: !1,
|
|
4833
4898
|
dirtyFields: {},
|
|
4834
|
-
submit:
|
|
4899
|
+
submit: za
|
|
4835
4900
|
};
|
|
4836
|
-
function
|
|
4837
|
-
return c(er) ??
|
|
4901
|
+
function Va() {
|
|
4902
|
+
return c(er) ?? Ba;
|
|
4838
4903
|
}
|
|
4839
4904
|
//#endregion
|
|
4840
4905
|
//#region src/tokens/colors.ts
|
|
4841
|
-
var
|
|
4906
|
+
var Ha = {
|
|
4842
4907
|
900: "#31531C",
|
|
4843
4908
|
800: "#416E26",
|
|
4844
4909
|
700: "#518A2F",
|
|
@@ -4864,7 +4929,7 @@ var Ba = {
|
|
|
4864
4929
|
100: "#f2f5f8",
|
|
4865
4930
|
50: "#f5f7fa",
|
|
4866
4931
|
20: "#f7f9fc"
|
|
4867
|
-
},
|
|
4932
|
+
}, Ua = "#FEFEFE", Wa = {
|
|
4868
4933
|
900: "#0b4627",
|
|
4869
4934
|
800: "#0f5c33",
|
|
4870
4935
|
700: "#3D8B46",
|
|
@@ -4875,7 +4940,7 @@ var Ba = {
|
|
|
4875
4940
|
200: "#aeeacb",
|
|
4876
4941
|
100: "#d0f5e1",
|
|
4877
4942
|
50: "#e0faec"
|
|
4878
|
-
},
|
|
4943
|
+
}, Ga = {
|
|
4879
4944
|
900: "#2443B8",
|
|
4880
4945
|
800: "#2E63D6",
|
|
4881
4946
|
700: "#3475E8",
|
|
@@ -4886,7 +4951,7 @@ var Ba = {
|
|
|
4886
4951
|
200: "#9ACAFA",
|
|
4887
4952
|
100: "#C1DEFC",
|
|
4888
4953
|
50: "#E6F2FE"
|
|
4889
|
-
},
|
|
4954
|
+
}, Ka = {
|
|
4890
4955
|
900: "#081FA6",
|
|
4891
4956
|
800: "#0E2AB2",
|
|
4892
4957
|
700: "#2431B9",
|
|
@@ -4898,7 +4963,7 @@ var Ba = {
|
|
|
4898
4963
|
100: "#CBC4ED",
|
|
4899
4964
|
50: "#EAE7F7",
|
|
4900
4965
|
20: "#F5F3FB"
|
|
4901
|
-
},
|
|
4966
|
+
}, qa = {
|
|
4902
4967
|
900: "#4A0A20",
|
|
4903
4968
|
800: "#79012F",
|
|
4904
4969
|
700: "#A2023F",
|
|
@@ -4909,7 +4974,7 @@ var Ba = {
|
|
|
4909
4974
|
200: "#FE7DAF",
|
|
4910
4975
|
100: "#FEA8C9",
|
|
4911
4976
|
50: "#FFD4E4"
|
|
4912
|
-
},
|
|
4977
|
+
}, Ja = {
|
|
4913
4978
|
900: "#8b1822",
|
|
4914
4979
|
800: "#ad1f2b",
|
|
4915
4980
|
700: "#d02533",
|
|
@@ -4921,7 +4986,7 @@ var Ba = {
|
|
|
4921
4986
|
100: "#ffd5d8",
|
|
4922
4987
|
50: "#ffebec",
|
|
4923
4988
|
20: "#fff4f4"
|
|
4924
|
-
},
|
|
4989
|
+
}, Ya = {
|
|
4925
4990
|
900: "#EB7520",
|
|
4926
4991
|
800: "#ED912A",
|
|
4927
4992
|
700: "#EEA02F",
|
|
@@ -4932,47 +4997,47 @@ var Ba = {
|
|
|
4932
4997
|
200: "#F7DE8E",
|
|
4933
4998
|
100: "#FAEBB9",
|
|
4934
4999
|
50: "#FDF7E4"
|
|
4935
|
-
},
|
|
4936
|
-
brand:
|
|
5000
|
+
}, Xa = {
|
|
5001
|
+
brand: Ha,
|
|
4937
5002
|
gray: $,
|
|
4938
|
-
green:
|
|
4939
|
-
blue:
|
|
4940
|
-
purple:
|
|
4941
|
-
pink:
|
|
4942
|
-
red:
|
|
4943
|
-
yellow:
|
|
4944
|
-
},
|
|
4945
|
-
bgDefault:
|
|
5003
|
+
green: Wa,
|
|
5004
|
+
blue: Ga,
|
|
5005
|
+
purple: Ka,
|
|
5006
|
+
pink: qa,
|
|
5007
|
+
red: Ja,
|
|
5008
|
+
yellow: Ya
|
|
5009
|
+
}, Za = {
|
|
5010
|
+
bgDefault: Ua,
|
|
4946
5011
|
bgContainer: $[50],
|
|
4947
5012
|
bgSubtle: $[100],
|
|
4948
|
-
bgBrandLighter:
|
|
4949
|
-
bgInfoLighter:
|
|
4950
|
-
bgSuccessLighter:
|
|
4951
|
-
bgWarningLighter:
|
|
4952
|
-
bgDangerLighter:
|
|
5013
|
+
bgBrandLighter: Ha[20],
|
|
5014
|
+
bgInfoLighter: Ga[50],
|
|
5015
|
+
bgSuccessLighter: Wa[50],
|
|
5016
|
+
bgWarningLighter: Ya[50],
|
|
5017
|
+
bgDangerLighter: Ja[50],
|
|
4953
5018
|
fgDefault: $[900],
|
|
4954
5019
|
fgSecondary: $[600],
|
|
4955
5020
|
fgTertiary: $[500],
|
|
4956
5021
|
fgDisabled: $[400],
|
|
4957
|
-
fgInverse:
|
|
4958
|
-
fgBrand:
|
|
4959
|
-
fgInfo:
|
|
4960
|
-
fgSuccess:
|
|
4961
|
-
fgWarning:
|
|
4962
|
-
fgDanger:
|
|
5022
|
+
fgInverse: Ua,
|
|
5023
|
+
fgBrand: Ha[500],
|
|
5024
|
+
fgInfo: Ga[600],
|
|
5025
|
+
fgSuccess: Wa[600],
|
|
5026
|
+
fgWarning: Ya[800],
|
|
5027
|
+
fgDanger: Ja[800],
|
|
4963
5028
|
borderDefault: $[200],
|
|
4964
5029
|
borderSubtle: $[100],
|
|
4965
5030
|
borderStrong: $[300],
|
|
4966
|
-
borderBrand:
|
|
5031
|
+
borderBrand: Ha[500],
|
|
4967
5032
|
iconPrimary: $[900],
|
|
4968
5033
|
iconSecondary: $[600],
|
|
4969
|
-
iconInverse:
|
|
4970
|
-
iconBrand:
|
|
4971
|
-
iconInfo:
|
|
4972
|
-
iconDanger:
|
|
4973
|
-
iconWarning:
|
|
4974
|
-
},
|
|
4975
|
-
...
|
|
5034
|
+
iconInverse: Ua,
|
|
5035
|
+
iconBrand: Ha[500],
|
|
5036
|
+
iconInfo: Ga[600],
|
|
5037
|
+
iconDanger: Ja[800],
|
|
5038
|
+
iconWarning: Ya[800]
|
|
5039
|
+
}, Qa = {
|
|
5040
|
+
...Za,
|
|
4976
5041
|
bgDefault: "#0B1120",
|
|
4977
5042
|
bgContainer: "#0F172A",
|
|
4978
5043
|
bgSubtle: "#121C30",
|
|
@@ -4981,16 +5046,16 @@ var Ba = {
|
|
|
4981
5046
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
4982
5047
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
4983
5048
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
4984
|
-
fgDefault:
|
|
5049
|
+
fgDefault: Ua,
|
|
4985
5050
|
fgSecondary: $[400],
|
|
4986
5051
|
fgTertiary: $[500],
|
|
4987
5052
|
fgDisabled: $[600],
|
|
4988
5053
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
4989
5054
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
4990
5055
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
4991
|
-
iconPrimary:
|
|
5056
|
+
iconPrimary: Ua,
|
|
4992
5057
|
iconSecondary: $[400]
|
|
4993
|
-
},
|
|
5058
|
+
}, $a = {
|
|
4994
5059
|
ps: [
|
|
4995
5060
|
"Noto Sans Armenian",
|
|
4996
5061
|
"Noto Sans",
|
|
@@ -5005,7 +5070,7 @@ var Ba = {
|
|
|
5005
5070
|
"system-ui",
|
|
5006
5071
|
"sans-serif"
|
|
5007
5072
|
]
|
|
5008
|
-
},
|
|
5073
|
+
}, eo = {
|
|
5009
5074
|
xl: {
|
|
5010
5075
|
fontSize: "64px",
|
|
5011
5076
|
lineHeight: "72px"
|
|
@@ -5030,7 +5095,7 @@ var Ba = {
|
|
|
5030
5095
|
fontSize: "24px",
|
|
5031
5096
|
lineHeight: "32px"
|
|
5032
5097
|
}
|
|
5033
|
-
},
|
|
5098
|
+
}, to = {
|
|
5034
5099
|
lg: {
|
|
5035
5100
|
fontSize: "20px",
|
|
5036
5101
|
lineHeight: "28px"
|
|
@@ -5051,7 +5116,7 @@ var Ba = {
|
|
|
5051
5116
|
fontSize: "10px",
|
|
5052
5117
|
lineHeight: "14px"
|
|
5053
5118
|
}
|
|
5054
|
-
},
|
|
5119
|
+
}, no = {
|
|
5055
5120
|
lg: {
|
|
5056
5121
|
fontSize: "20px",
|
|
5057
5122
|
lineHeight: "28px"
|
|
@@ -5076,19 +5141,19 @@ var Ba = {
|
|
|
5076
5141
|
fontSize: "6px",
|
|
5077
5142
|
lineHeight: "6px"
|
|
5078
5143
|
}
|
|
5079
|
-
},
|
|
5080
|
-
headline:
|
|
5081
|
-
paragraph:
|
|
5082
|
-
label:
|
|
5083
|
-
},
|
|
5144
|
+
}, ro = {
|
|
5145
|
+
headline: eo,
|
|
5146
|
+
paragraph: to,
|
|
5147
|
+
label: no
|
|
5148
|
+
}, io = {
|
|
5084
5149
|
sm: "2rem",
|
|
5085
5150
|
md: "2.5rem",
|
|
5086
5151
|
lg: "3rem"
|
|
5087
|
-
},
|
|
5152
|
+
}, ao = {
|
|
5088
5153
|
sm: "0.875rem",
|
|
5089
5154
|
md: "1rem",
|
|
5090
5155
|
lg: "1.25rem"
|
|
5091
|
-
},
|
|
5156
|
+
}, oo = {
|
|
5092
5157
|
xs: "2px",
|
|
5093
5158
|
sm: "4px",
|
|
5094
5159
|
md: "8px",
|
|
@@ -5097,7 +5162,7 @@ var Ba = {
|
|
|
5097
5162
|
"2xl": "20px",
|
|
5098
5163
|
"3xl": "24px",
|
|
5099
5164
|
full: "9999px"
|
|
5100
|
-
},
|
|
5165
|
+
}, so = {
|
|
5101
5166
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
5102
5167
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
5103
5168
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -5105,6 +5170,6 @@ var Ba = {
|
|
|
5105
5170
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5106
5171
|
};
|
|
5107
5172
|
//#endregion
|
|
5108
|
-
export { Xe as Accordion, Ze as AccordionItem, _t as Avatar, vt as AvatarGroup, Dt as Badge, At as Breadcrumb, nt as Button, Mt as ButtonGroup, Ft as Card, Lt as CardGroup, Bt as Checkbox, qt as Copy, en as Counter,
|
|
5173
|
+
export { Xe as Accordion, Ze as AccordionItem, _t as Avatar, vt as AvatarGroup, Dt as Badge, At as Breadcrumb, nt as Button, Mt as ButtonGroup, Ft as Card, Lt as CardGroup, Bt as Checkbox, qt as Copy, en as Counter, zi as DataTable, hn as DatePicker, yn as DistributionBar, Ge as Divider, Dn as Drawer, In as DropdownContent, Ln as DropdownItem, zn as DropdownLabel, Nn as DropdownMenu, Rn as DropdownSeparator, Pn as DropdownTrigger, Xn as Empty, $n as Filter, tr as FormContainer, nr as FormField, Hn as IconTile, rr as InfoField, ar as InlineAlert, Qt as Input, or as Link, cr as Modal, dr as MultiSelect, gr as NotificationBadge, br as Pagination, Cr as PersonCard, Kt as Popover, Or as Progress, Nr as Radio, Ar as RadioGroup, Pr as ReadMore, zr as Select, Qr as SelectV2, ti as Sidebar, ni as SidebarItem, oi as Skeleton, di as SnackbarProvider, hi as Status, Di as StepIndicator, Ai as Switch, Fi as TBody, Ri as TD, Li as TH, Pi as THead, Ii as TR, ha as Tab, fa as TabList, ga as TabPanel, Ni as Table, sa as TableV2, Bi as TableV2ColumnFilter, Wi as TableV2ColumnVisibilityMenu, Vi as TableV2Pagination, Yi as TableV2RowActionsMenu, Hi as TableV2Skeleton, Gi as TableV2Toolbar, da as Tabs, qn as Text, _a as TextArea, va as ThemeSwitch, Sa as Tooltip, Ea as UnderConstruction, st as Upload, lt as UploadItem, Ga as blue, Ha as brand, Z as cn, Xa as colorPrimitives, io as controlHeight, $i as createRowActionsColumn, Qi as createSelectionColumn, Qa as darkTheme, $a as fontFamily, ea as getPinnedStyles, $ as gray, Wa as green, eo as headline, ao as iconSize, no as label, Za as lightTheme, to as paragraph, qa as pink, Ka as purple, oo as radius, Ja as red, so as shadows, ro as typography, Ma as useEscapeKey, me as useFieldArray, Ra as useFormContext, Va as useFormProps, Fa as useHideBodyScroll, La as useIsMobile, ja as useOnOutsideClick, ui as useSnackbar, Oa as useStepper, ot as validateSingleFile, Ua as white, Ya as yellow };
|
|
5109
5174
|
|
|
5110
5175
|
//# sourceMappingURL=index.js.map
|