@dinofront/design_system 1.20.7 → 1.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,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, Clock as O, Columns3 as k, Construction as A, Copy as j, Download as M, EyeOff as N, File as ee, GripVertical as te, Info as P, Loader2 as F, Menu as I, Minus as L, Monitor 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, Clock as O, Columns3 as k, Construction as A, Copy as j, Download as M, EyeOff as N, File as ee, GripVertical as te, Info as P, Loader2 as F, Menu as I, Minus as L, Monitor as R, Moon as ne, MoreHorizontal as z, MoreVertical as re, Paperclip as B, Pencil as ie, Pin as ae, PinOff as oe, Plus as se, RefreshCw as ce, Search as le, SearchX as ue, Smartphone as de, Sparkles as fe, Sun as pe, Tablet as me, TabletSmartphone as he, Trash2 as ge, UploadCloud as _e, User as V, X as H, XCircle as U } from "lucide-react";
|
|
3
3
|
import { clsx as ve } from "clsx";
|
|
4
4
|
import { extendTailwindMerge as ye } from "tailwind-merge";
|
|
5
5
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
@@ -301,11 +301,11 @@ var ht = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
301
301
|
className: "inline-flex items-center gap-1",
|
|
302
302
|
children: C
|
|
303
303
|
})]
|
|
304
|
-
}),
|
|
304
|
+
}), R = S ? /* @__PURE__ */ G("p", {
|
|
305
305
|
id: `${N}-error`,
|
|
306
306
|
className: "text-p-sm text-red-700",
|
|
307
307
|
children: S
|
|
308
|
-
}) : null,
|
|
308
|
+
}) : null, ne = f && l.length > 0 && /* @__PURE__ */ G("div", {
|
|
309
309
|
className: "flex flex-col gap-2",
|
|
310
310
|
children: l.map((e, t) => /* @__PURE__ */ G(_t, {
|
|
311
311
|
name: e.name,
|
|
@@ -321,8 +321,8 @@ var ht = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
321
321
|
...E,
|
|
322
322
|
children: [
|
|
323
323
|
L,
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
ne,
|
|
325
|
+
R
|
|
326
326
|
]
|
|
327
327
|
});
|
|
328
328
|
if (g !== "dropzone") {
|
|
@@ -340,17 +340,17 @@ var ht = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
340
340
|
iconOnly: e,
|
|
341
341
|
disabled: a,
|
|
342
342
|
onClick: () => O.current?.click(),
|
|
343
|
-
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ G(
|
|
343
|
+
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ G(B, { className: "h-4 w-4" }),
|
|
344
344
|
"aria-label": e ? "Upload file" : void 0,
|
|
345
|
-
children: e ? v ?? /* @__PURE__ */ G(
|
|
345
|
+
children: e ? v ?? /* @__PURE__ */ G(ie, { className: "h-4 w-4" }) : _ ?? "Choose a file"
|
|
346
346
|
}),
|
|
347
347
|
I,
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
ne,
|
|
349
|
+
R
|
|
350
350
|
]
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
let
|
|
353
|
+
let z = /* @__PURE__ */ K("div", {
|
|
354
354
|
ref: D,
|
|
355
355
|
onDragEnter: () => {
|
|
356
356
|
j.current += 1, a || A(!0);
|
|
@@ -393,13 +393,13 @@ var ht = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
393
393
|
I
|
|
394
394
|
]
|
|
395
395
|
});
|
|
396
|
-
return !L && !
|
|
396
|
+
return !L && !R && !ne ? z : /* @__PURE__ */ K("div", {
|
|
397
397
|
className: "flex flex-col gap-1.5",
|
|
398
398
|
children: [
|
|
399
399
|
L,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
z,
|
|
401
|
+
ne,
|
|
402
|
+
R
|
|
403
403
|
]
|
|
404
404
|
});
|
|
405
405
|
}), gt = {
|
|
@@ -584,7 +584,7 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
584
584
|
},
|
|
585
585
|
"aria-label": "Change avatar image",
|
|
586
586
|
className: X("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", St[r]),
|
|
587
|
-
children: /* @__PURE__ */ G(
|
|
587
|
+
children: /* @__PURE__ */ G(ie, { className: "h-1/2 w-1/2" })
|
|
588
588
|
}), /* @__PURE__ */ G("input", {
|
|
589
589
|
ref: C,
|
|
590
590
|
type: "file",
|
|
@@ -897,8 +897,8 @@ function Qt() {
|
|
|
897
897
|
//#endregion
|
|
898
898
|
//#region src/lib/useFloatingPosition.ts
|
|
899
899
|
var $t = 8, en = 10;
|
|
900
|
-
function tn({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center", offset: a = 8, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1, recomputeKey: l }) {
|
|
901
|
-
let [
|
|
900
|
+
function tn({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center", offset: a = 8, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1, recomputeKey: l, zIndex: u = 50 }) {
|
|
901
|
+
let [f, p] = m({
|
|
902
902
|
style: {
|
|
903
903
|
position: "fixed",
|
|
904
904
|
top: 0,
|
|
@@ -913,39 +913,40 @@ function tn({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
913
913
|
let l = () => {
|
|
914
914
|
let n = e?.current;
|
|
915
915
|
if (!n) return;
|
|
916
|
-
let l = n.getBoundingClientRect(),
|
|
917
|
-
if (o) if (
|
|
918
|
-
let e = l.top, t =
|
|
919
|
-
r === "top" && e <
|
|
916
|
+
let l = n.getBoundingClientRect(), d = t.getBoundingClientRect(), f = window.innerWidth, m = window.innerHeight, h = r === "top" || r === "bottom", g = r;
|
|
917
|
+
if (o) if (h) {
|
|
918
|
+
let e = l.top, t = m - l.bottom;
|
|
919
|
+
r === "top" && e < d.height + a && t > e ? g = "bottom" : r === "bottom" && t < d.height + a && e > t && (g = "top");
|
|
920
920
|
} else {
|
|
921
|
-
let e = l.left, t =
|
|
922
|
-
r === "left" && e <
|
|
921
|
+
let e = l.left, t = f - l.right;
|
|
922
|
+
r === "left" && e < d.width + a && t > e ? g = "right" : r === "right" && t < d.width + a && e > t && (g = "left");
|
|
923
923
|
}
|
|
924
|
-
let
|
|
925
|
-
|
|
926
|
-
let
|
|
927
|
-
if (
|
|
924
|
+
let _ = g === "top" || g === "bottom", v, y;
|
|
925
|
+
_ ? (v = g === "bottom" ? l.bottom + a : l.top - d.height - a, y = i === "start" ? l.left : i === "end" ? l.right - d.width : l.left + l.width / 2 - d.width / 2) : (y = g === "right" ? l.right + a : l.left - d.width - a, v = i === "start" ? l.top : i === "end" ? l.bottom - d.height : l.top + l.height / 2 - d.height / 2), s && (_ ? y = Math.min(Math.max(y, $t), f - d.width - $t) : v = Math.min(Math.max(v, $t), m - d.height - $t));
|
|
926
|
+
let b;
|
|
927
|
+
if (_) {
|
|
928
928
|
let e = l.left + l.width / 2;
|
|
929
|
-
|
|
930
|
-
left: Math.min(Math.max(e -
|
|
931
|
-
[
|
|
929
|
+
b = {
|
|
930
|
+
left: Math.min(Math.max(e - y, en), d.width - en),
|
|
931
|
+
[g === "bottom" ? "top" : "bottom"]: -8 / 2
|
|
932
932
|
};
|
|
933
933
|
} else {
|
|
934
934
|
let e = l.top + l.height / 2;
|
|
935
|
-
|
|
936
|
-
top: Math.min(Math.max(e -
|
|
937
|
-
[
|
|
935
|
+
b = {
|
|
936
|
+
top: Math.min(Math.max(e - v, en), d.height - en),
|
|
937
|
+
[g === "right" ? "left" : "right"]: -8 / 2
|
|
938
938
|
};
|
|
939
939
|
}
|
|
940
|
-
|
|
940
|
+
p({
|
|
941
941
|
style: {
|
|
942
942
|
position: "fixed",
|
|
943
|
-
top:
|
|
944
|
-
left:
|
|
943
|
+
top: v,
|
|
944
|
+
left: y,
|
|
945
|
+
zIndex: u,
|
|
945
946
|
...c ? { minWidth: l.width } : {}
|
|
946
947
|
},
|
|
947
|
-
arrowStyle:
|
|
948
|
-
resolvedSide:
|
|
948
|
+
arrowStyle: b,
|
|
949
|
+
resolvedSide: g
|
|
949
950
|
});
|
|
950
951
|
};
|
|
951
952
|
return l(), window.addEventListener("resize", l), document.addEventListener("scroll", l, {
|
|
@@ -965,7 +966,7 @@ function tn({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
965
966
|
s,
|
|
966
967
|
c,
|
|
967
968
|
l
|
|
968
|
-
]),
|
|
969
|
+
]), f;
|
|
969
970
|
}
|
|
970
971
|
//#endregion
|
|
971
972
|
//#region src/components/Popover/Popover.tsx
|
|
@@ -1215,7 +1216,7 @@ var dn = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1215
1216
|
onClick: () => T(S + a),
|
|
1216
1217
|
"aria-label": "Increase",
|
|
1217
1218
|
className: fn,
|
|
1218
|
-
children: /* @__PURE__ */ G(
|
|
1219
|
+
children: /* @__PURE__ */ G(se, { className: "size-4" })
|
|
1219
1220
|
}),
|
|
1220
1221
|
className: X("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
1221
1222
|
..._
|
|
@@ -1280,26 +1281,26 @@ function En(e) {
|
|
|
1280
1281
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1281
1282
|
}
|
|
1282
1283
|
var Dn = a(function({ value: e, onChange: t, clearable: n = !0, 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, menuPlacement: D = "auto", error: O = !1, errorText: k, id: A, className: j, wrapperClassName: M, dataTestId: N }, ee) {
|
|
1283
|
-
let te = u(), P = A ?? te, [F, I] = m(!1), [L,
|
|
1284
|
-
anchor:
|
|
1285
|
-
panel:
|
|
1284
|
+
let te = u(), P = A ?? te, [F, I] = m(!1), [L, R] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [ne, z] = m(null), [re, B] = m(null), ie = p(null), ae = p(null), oe = Qt(), { style: se, resolvedSide: ce } = tn({
|
|
1285
|
+
anchor: ae,
|
|
1286
|
+
panel: re,
|
|
1286
1287
|
open: F,
|
|
1287
1288
|
side: D === "top" ? "top" : "bottom",
|
|
1288
1289
|
align: "start",
|
|
1289
1290
|
offset: hn,
|
|
1290
1291
|
flip: D === "auto",
|
|
1291
1292
|
recomputeKey: `${L.getFullYear()}-${L.getMonth()}-${r}`
|
|
1292
|
-
}),
|
|
1293
|
+
}), le = O || !!k, ue = k ? `${P}-error` : g ? `${P}-help` : void 0;
|
|
1293
1294
|
l(() => {
|
|
1294
1295
|
b && I(!1);
|
|
1295
1296
|
}, [b]), l(() => {
|
|
1296
1297
|
if (!F) return;
|
|
1297
1298
|
let e = (e) => {
|
|
1298
1299
|
let t = e.target;
|
|
1299
|
-
|
|
1300
|
+
ie.current?.contains(t) || re?.contains(t) || I(!1);
|
|
1300
1301
|
};
|
|
1301
1302
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1302
|
-
}, [F,
|
|
1303
|
+
}, [F, re]);
|
|
1303
1304
|
let de = r ? i?.start ? `${wn(i.start, c)}${i.end ? ` – ${wn(i.end, c)}` : ""}` : "" : e ? wn(e, c) : "";
|
|
1304
1305
|
function fe(e) {
|
|
1305
1306
|
if (!r) {
|
|
@@ -1333,7 +1334,7 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1333
1334
|
e.stopPropagation(), r ? (a?.({
|
|
1334
1335
|
start: null,
|
|
1335
1336
|
end: null
|
|
1336
|
-
}),
|
|
1337
|
+
}), z(null)) : t?.(null);
|
|
1337
1338
|
}
|
|
1338
1339
|
let { monthNames: me, weekdayNames: he } = f(() => {
|
|
1339
1340
|
let e = gn(s);
|
|
@@ -1344,9 +1345,9 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1344
1345
|
}, [s]), ge = Tn(L), _e = Sn(/* @__PURE__ */ new Date()), V = Z(N), U = i ?? {
|
|
1345
1346
|
start: null,
|
|
1346
1347
|
end: null
|
|
1347
|
-
}, ve = U.end ??
|
|
1348
|
+
}, ve = U.end ?? ne;
|
|
1348
1349
|
return /* @__PURE__ */ K("div", {
|
|
1349
|
-
ref:
|
|
1350
|
+
ref: ie,
|
|
1350
1351
|
"data-test-id": V("root"),
|
|
1351
1352
|
className: X("flex flex-col gap-1.5", v && "w-full", M),
|
|
1352
1353
|
children: [
|
|
@@ -1356,7 +1357,7 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1356
1357
|
children: [d, h && /* @__PURE__ */ G(at, {})]
|
|
1357
1358
|
}),
|
|
1358
1359
|
/* @__PURE__ */ K("div", {
|
|
1359
|
-
ref:
|
|
1360
|
+
ref: ae,
|
|
1360
1361
|
className: "relative",
|
|
1361
1362
|
children: [/* @__PURE__ */ K("button", {
|
|
1362
1363
|
ref: ee,
|
|
@@ -1367,11 +1368,11 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1367
1368
|
"data-to": r ? En(i?.end) : void 0,
|
|
1368
1369
|
type: "button",
|
|
1369
1370
|
disabled: b,
|
|
1370
|
-
"aria-invalid":
|
|
1371
|
+
"aria-invalid": le || void 0,
|
|
1371
1372
|
"aria-required": h || void 0,
|
|
1372
|
-
"aria-describedby":
|
|
1373
|
+
"aria-describedby": ue,
|
|
1373
1374
|
onClick: () => I((e) => !e),
|
|
1374
|
-
className: X("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2",
|
|
1375
|
+
className: X("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", le ? "border-red-600" : "border-border-default", !b && !le && "hover:border-border-strong", le ? "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]", mn[o], j),
|
|
1375
1376
|
children: [/* @__PURE__ */ G("span", {
|
|
1376
1377
|
className: X("flex-1 text-left truncate", b ? "text-fg-disabled" : de ? "text-fg-default" : "text-fg-tertiary"),
|
|
1377
1378
|
children: de || _
|
|
@@ -1386,11 +1387,11 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1386
1387
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
|
|
1387
1388
|
children: /* @__PURE__ */ G(H, { className: "w-4 h-4 text-fg-secondary" })
|
|
1388
1389
|
}) : /* @__PURE__ */ G(y, { className: X("w-4 h-4", b ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
1389
|
-
}), F &&
|
|
1390
|
-
ref:
|
|
1390
|
+
}), F && oe && be(/* @__PURE__ */ K("div", {
|
|
1391
|
+
ref: B,
|
|
1391
1392
|
"data-test-id": V("calendar"),
|
|
1392
|
-
"data-side":
|
|
1393
|
-
style:
|
|
1393
|
+
"data-side": ce,
|
|
1394
|
+
style: se,
|
|
1394
1395
|
className: "z-50 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
|
|
1395
1396
|
children: [/* @__PURE__ */ K("div", {
|
|
1396
1397
|
className: "flex items-center justify-between mb-2",
|
|
@@ -1398,7 +1399,7 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1398
1399
|
/* @__PURE__ */ G("button", {
|
|
1399
1400
|
type: "button",
|
|
1400
1401
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1401
|
-
onClick: () =>
|
|
1402
|
+
onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
|
|
1402
1403
|
"aria-label": "Previous month",
|
|
1403
1404
|
"data-test-id": V("prev-month"),
|
|
1404
1405
|
children: /* @__PURE__ */ G(C, { className: "w-4 h-4" })
|
|
@@ -1416,7 +1417,7 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1416
1417
|
/* @__PURE__ */ G("button", {
|
|
1417
1418
|
type: "button",
|
|
1418
1419
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1419
|
-
onClick: () =>
|
|
1420
|
+
onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
|
|
1420
1421
|
"aria-label": "Next month",
|
|
1421
1422
|
"data-test-id": V("next-month"),
|
|
1422
1423
|
children: /* @__PURE__ */ G(w, { className: "w-4 h-4" })
|
|
@@ -1439,14 +1440,14 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1439
1440
|
"data-today": o || void 0,
|
|
1440
1441
|
"data-excluded": a || void 0,
|
|
1441
1442
|
"aria-current": o ? "date" : void 0,
|
|
1442
|
-
onMouseEnter: () => !i && r && U.start && !U.end &&
|
|
1443
|
+
onMouseEnter: () => !i && r && U.start && !U.end && z(t),
|
|
1443
1444
|
onClick: () => !i && fe(t),
|
|
1444
1445
|
className: X("h-8 rounded-md text-p-sm font-medium", d, f),
|
|
1445
1446
|
children: t.getDate()
|
|
1446
1447
|
}, n);
|
|
1447
1448
|
})]
|
|
1448
1449
|
})]
|
|
1449
|
-
}),
|
|
1450
|
+
}), oe)]
|
|
1450
1451
|
}),
|
|
1451
1452
|
k ? /* @__PURE__ */ G("p", {
|
|
1452
1453
|
id: `${P}-error`,
|
|
@@ -1648,7 +1649,7 @@ var Dn = a(function({ value: e, onChange: t, clearable: n = !0, range: r = !1, r
|
|
|
1648
1649
|
}, Ln = {
|
|
1649
1650
|
mobile: de,
|
|
1650
1651
|
tablet: me,
|
|
1651
|
-
desktop:
|
|
1652
|
+
desktop: R,
|
|
1652
1653
|
"mobile-tablet": he
|
|
1653
1654
|
}, Rn = a(function({ type: e = "desktop", locale: t = "en-US", title: n, description: r, icon: i, fillHeight: a = !1, className: o, dataTestId: s, ...c }, l) {
|
|
1654
1655
|
let u = In[t][e];
|
|
@@ -2151,7 +2152,7 @@ var vr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2151
2152
|
...s,
|
|
2152
2153
|
children: [
|
|
2153
2154
|
r ?? /* @__PURE__ */ G(An, {
|
|
2154
|
-
icon:
|
|
2155
|
+
icon: ue,
|
|
2155
2156
|
tone: "gray",
|
|
2156
2157
|
shape: "circle",
|
|
2157
2158
|
size: wr[e]
|
|
@@ -2584,7 +2585,7 @@ var Ur = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2584
2585
|
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ G("span", {
|
|
2585
2586
|
"aria-hidden": !0,
|
|
2586
2587
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2587
|
-
children: /* @__PURE__ */ G(
|
|
2588
|
+
children: /* @__PURE__ */ G(z, { className: "h-4 w-4" })
|
|
2588
2589
|
}, `${t}-${r}`);
|
|
2589
2590
|
let i = t === e;
|
|
2590
2591
|
return /* @__PURE__ */ G("button", {
|
|
@@ -2948,7 +2949,12 @@ function hi(e, t) {
|
|
|
2948
2949
|
let r = `${mi(e)} ${String(e.value)}`.toLowerCase();
|
|
2949
2950
|
return n.every((e) => r.includes(e));
|
|
2950
2951
|
}
|
|
2951
|
-
function gi(e) {
|
|
2952
|
+
function gi(e, t) {
|
|
2953
|
+
if (t.length === 0) return e;
|
|
2954
|
+
let n = new Set(t.map(String));
|
|
2955
|
+
return [...e].sort((e, t) => !n.has(String(e.value)) - +!n.has(String(t.value)));
|
|
2956
|
+
}
|
|
2957
|
+
function _i(e) {
|
|
2952
2958
|
try {
|
|
2953
2959
|
let t = window.localStorage.getItem(e);
|
|
2954
2960
|
return t === null ? void 0 : JSON.parse(t);
|
|
@@ -2956,24 +2962,24 @@ function gi(e) {
|
|
|
2956
2962
|
return;
|
|
2957
2963
|
}
|
|
2958
2964
|
}
|
|
2959
|
-
function
|
|
2965
|
+
function vi(e) {
|
|
2960
2966
|
try {
|
|
2961
2967
|
return window.localStorage.getItem(e) !== null;
|
|
2962
2968
|
} catch {
|
|
2963
2969
|
return !1;
|
|
2964
2970
|
}
|
|
2965
2971
|
}
|
|
2966
|
-
function
|
|
2972
|
+
function yi(e, t) {
|
|
2967
2973
|
try {
|
|
2968
2974
|
window.localStorage.setItem(e, JSON.stringify(t));
|
|
2969
2975
|
} catch {}
|
|
2970
2976
|
}
|
|
2971
|
-
function
|
|
2977
|
+
function bi(e) {
|
|
2972
2978
|
try {
|
|
2973
2979
|
window.localStorage.removeItem(e);
|
|
2974
2980
|
} catch {}
|
|
2975
2981
|
}
|
|
2976
|
-
function
|
|
2982
|
+
function xi(e, t, n) {
|
|
2977
2983
|
return {
|
|
2978
2984
|
container: () => "w-full",
|
|
2979
2985
|
control: ({ isFocused: n, isDisabled: r }) => X("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text", ci[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"),
|
|
@@ -2988,9 +2994,9 @@ function bi(e, t, n) {
|
|
|
2988
2994
|
clearIndicator: () => "text-fg-secondary hover:text-fg-default cursor-pointer p-0.5",
|
|
2989
2995
|
dropdownIndicator: () => "text-fg-secondary p-0.5",
|
|
2990
2996
|
indicatorSeparator: () => "hidden",
|
|
2991
|
-
menu: ({ placement: e }) => X("rounded-lg border border-border-default bg-bg-default shadow-z4 overflow-hidden z-
|
|
2997
|
+
menu: ({ placement: e }) => X("rounded-lg border border-border-default bg-bg-default shadow-z4 overflow-hidden !z-[2]", e === "top" ? "mb-1" : "mt-1"),
|
|
2992
2998
|
menuList: () => "max-h-60 overflow-y-auto py-1",
|
|
2993
|
-
menuPortal: () => "z-50",
|
|
2999
|
+
menuPortal: () => "!z-[50]",
|
|
2994
3000
|
group: () => "py-1",
|
|
2995
3001
|
groupHeading: () => "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
|
|
2996
3002
|
option: ({ isFocused: e, isSelected: t, isDisabled: n }) => X("flex! items-center justify-between gap-2 px-3 py-2 cursor-pointer select-none", n && "opacity-50 cursor-not-allowed", e && !n && "bg-bg-subtle", t && "font-medium"),
|
|
@@ -3000,32 +3006,32 @@ function bi(e, t, n) {
|
|
|
3000
3006
|
}
|
|
3001
3007
|
//#endregion
|
|
3002
3008
|
//#region src/components/SelectV2/SelectV2.tsx
|
|
3003
|
-
var
|
|
3004
|
-
function
|
|
3009
|
+
var Si = 36;
|
|
3010
|
+
function Ci(e, t) {
|
|
3005
3011
|
let { dataTestId: n } = e;
|
|
3006
3012
|
return Z(n)(t);
|
|
3007
3013
|
}
|
|
3008
|
-
function
|
|
3014
|
+
function wi(e, t) {
|
|
3009
3015
|
return {
|
|
3010
3016
|
...e,
|
|
3011
3017
|
"data-test-id": t
|
|
3012
3018
|
};
|
|
3013
3019
|
}
|
|
3014
|
-
function
|
|
3020
|
+
function Ti(e) {
|
|
3015
3021
|
return /* @__PURE__ */ G(q.Control, {
|
|
3016
3022
|
...e,
|
|
3017
|
-
innerProps:
|
|
3023
|
+
innerProps: wi(e.innerProps, Ci(e.selectProps, "trigger"))
|
|
3018
3024
|
});
|
|
3019
3025
|
}
|
|
3020
|
-
function
|
|
3021
|
-
let t = { "data-test-id":
|
|
3026
|
+
function Ei(e) {
|
|
3027
|
+
let t = { "data-test-id": Ci(e.selectProps, "search") }, { inputValueControlled: n } = e.selectProps;
|
|
3022
3028
|
return /* @__PURE__ */ G(q.Input, {
|
|
3023
3029
|
...e,
|
|
3024
3030
|
...t,
|
|
3025
3031
|
isHidden: !n && e.isHidden
|
|
3026
3032
|
});
|
|
3027
3033
|
}
|
|
3028
|
-
function
|
|
3034
|
+
function Di(e) {
|
|
3029
3035
|
let { dropdownIcon: t } = e.selectProps;
|
|
3030
3036
|
return /* @__PURE__ */ G(q.DropdownIndicator, {
|
|
3031
3037
|
...e,
|
|
@@ -3035,17 +3041,17 @@ function Ei(e) {
|
|
|
3035
3041
|
})
|
|
3036
3042
|
});
|
|
3037
3043
|
}
|
|
3038
|
-
function
|
|
3044
|
+
function Oi(e) {
|
|
3039
3045
|
return /* @__PURE__ */ G(q.ClearIndicator, {
|
|
3040
3046
|
...e,
|
|
3041
|
-
innerProps:
|
|
3047
|
+
innerProps: wi(e.innerProps, Ci(e.selectProps, "clear")),
|
|
3042
3048
|
children: /* @__PURE__ */ G(H, {
|
|
3043
3049
|
className: "h-3.5 w-3.5",
|
|
3044
3050
|
"aria-hidden": !0
|
|
3045
3051
|
})
|
|
3046
3052
|
});
|
|
3047
3053
|
}
|
|
3048
|
-
function
|
|
3054
|
+
function ki(e) {
|
|
3049
3055
|
return /* @__PURE__ */ G(q.MultiValueRemove, {
|
|
3050
3056
|
...e,
|
|
3051
3057
|
innerProps: {
|
|
@@ -3058,37 +3064,37 @@ function Oi(e) {
|
|
|
3058
3064
|
})
|
|
3059
3065
|
});
|
|
3060
3066
|
}
|
|
3061
|
-
function
|
|
3067
|
+
function Ai(e) {
|
|
3062
3068
|
let { visibleTagCount: t } = e.selectProps;
|
|
3063
3069
|
return t === void 0 || e.index < t ? /* @__PURE__ */ G(q.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ K("span", {
|
|
3064
3070
|
className: pi,
|
|
3065
3071
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
3066
3072
|
}) : null;
|
|
3067
3073
|
}
|
|
3068
|
-
function
|
|
3074
|
+
function ji(e) {
|
|
3069
3075
|
return /* @__PURE__ */ K(q.Option, {
|
|
3070
3076
|
...e,
|
|
3071
|
-
innerProps:
|
|
3077
|
+
innerProps: wi(e.innerProps, Ci(e.selectProps, `option-${String(e.data.value)}`)),
|
|
3072
3078
|
children: [e.children, e.isSelected && /* @__PURE__ */ G(b, {
|
|
3073
3079
|
className: "h-4 w-4 text-fg-brand shrink-0",
|
|
3074
3080
|
"aria-hidden": !0
|
|
3075
3081
|
})]
|
|
3076
3082
|
});
|
|
3077
3083
|
}
|
|
3078
|
-
function
|
|
3084
|
+
function Mi() {
|
|
3079
3085
|
return /* @__PURE__ */ G(F, {
|
|
3080
3086
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
3081
3087
|
"aria-hidden": !0
|
|
3082
3088
|
});
|
|
3083
3089
|
}
|
|
3084
|
-
function
|
|
3090
|
+
function Ni(e) {
|
|
3085
3091
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
3086
3092
|
return /* @__PURE__ */ K(q.Menu, {
|
|
3087
3093
|
...e,
|
|
3088
|
-
innerProps:
|
|
3094
|
+
innerProps: wi(e.innerProps, Ci(e.selectProps, "content")),
|
|
3089
3095
|
children: [
|
|
3090
3096
|
t && /* @__PURE__ */ G("div", {
|
|
3091
|
-
"data-test-id":
|
|
3097
|
+
"data-test-id": Ci(e.selectProps, "select-all"),
|
|
3092
3098
|
className: "border-b border-border-default px-3 py-2",
|
|
3093
3099
|
onMouseDown: (e) => e.preventDefault(),
|
|
3094
3100
|
onClick: (e) => {
|
|
@@ -3104,7 +3110,7 @@ function Mi(e) {
|
|
|
3104
3110
|
}),
|
|
3105
3111
|
e.children,
|
|
3106
3112
|
r && /* @__PURE__ */ G("div", {
|
|
3107
|
-
"data-test-id":
|
|
3113
|
+
"data-test-id": Ci(e.selectProps, "save_template"),
|
|
3108
3114
|
role: "button",
|
|
3109
3115
|
tabIndex: 0,
|
|
3110
3116
|
"aria-pressed": r.checked,
|
|
@@ -3126,11 +3132,11 @@ function Mi(e) {
|
|
|
3126
3132
|
]
|
|
3127
3133
|
});
|
|
3128
3134
|
}
|
|
3129
|
-
function
|
|
3135
|
+
function Pi(t) {
|
|
3130
3136
|
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = ke({
|
|
3131
3137
|
count: o.length,
|
|
3132
3138
|
getScrollElement: () => s.current,
|
|
3133
|
-
estimateSize: () =>
|
|
3139
|
+
estimateSize: () => Si,
|
|
3134
3140
|
overscan: 8
|
|
3135
3141
|
});
|
|
3136
3142
|
return /* @__PURE__ */ G("div", {
|
|
@@ -3157,23 +3163,23 @@ function Ni(t) {
|
|
|
3157
3163
|
})
|
|
3158
3164
|
});
|
|
3159
3165
|
}
|
|
3160
|
-
var
|
|
3161
|
-
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, dropdownIcon: x, helperText: S, errorText: C, error: w = !1, required: T = !0, loading: E = !1, clearable: D = !0, searchable: O, virtualized: k = !1, emptyText: A, locale: j = "en-US", storageKey: M, saveSelectionLabel: N, size: ee = "md", disabled: te = !1, id: P, className: F, wrapperClassName: I, dataTestId: L, inputValue:
|
|
3166
|
+
var Fi = a(function(e, t) {
|
|
3167
|
+
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, dropdownIcon: x, helperText: S, errorText: C, error: w = !1, required: T = !0, loading: E = !1, clearable: D = !0, searchable: O, virtualized: k = !1, emptyText: A, locale: j = "en-US", storageKey: M, saveSelectionLabel: N, size: ee = "md", disabled: te = !1, id: P, className: F, wrapperClassName: I, dataTestId: L, inputValue: R, onInputChange: ne, ...z } = e, re = e.isMulti ? !!e.singleLine : !1, B = si[j], ie = v ?? B.placeholder, ae = A ?? B.noResults, oe = c ?? ((e) => B.createLabel(e)), se = u(), ce = P ?? se, le = w || !!C, ue = h !== void 0, [de, fe] = m(() => {
|
|
3162
3168
|
if (!d) {
|
|
3163
|
-
if (M && !
|
|
3164
|
-
let e =
|
|
3169
|
+
if (M && !ue) {
|
|
3170
|
+
let e = _i(M);
|
|
3165
3171
|
if (e !== void 0) return e;
|
|
3166
3172
|
}
|
|
3167
3173
|
return g;
|
|
3168
3174
|
}
|
|
3169
3175
|
}), [pe, me] = m(() => {
|
|
3170
3176
|
if (!d) return [];
|
|
3171
|
-
if (M && !
|
|
3172
|
-
let e =
|
|
3177
|
+
if (M && !ue) {
|
|
3178
|
+
let e = _i(M);
|
|
3173
3179
|
if (Array.isArray(e)) return e;
|
|
3174
3180
|
}
|
|
3175
3181
|
return g ?? [];
|
|
3176
|
-
}), [he, ge] = m(() => !!M &&
|
|
3182
|
+
}), [he, ge] = m(() => !!M && vi(M)), [_e, V] = m(() => {
|
|
3177
3183
|
let e = /* @__PURE__ */ new Map();
|
|
3178
3184
|
for (let t of n) e.set(String(t.value), t);
|
|
3179
3185
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
@@ -3194,8 +3200,8 @@ var Pi = a(function(e, t) {
|
|
|
3194
3200
|
let ve = s((e) => _e.get(String(e)) ?? {
|
|
3195
3201
|
value: e,
|
|
3196
3202
|
label: String(e)
|
|
3197
|
-
}, [_e]), ye =
|
|
3198
|
-
|
|
3203
|
+
}, [_e]), ye = ue ? h : de, W = f(() => (ue ? h : pe) ?? [], [
|
|
3204
|
+
ue,
|
|
3199
3205
|
h,
|
|
3200
3206
|
pe
|
|
3201
3207
|
]), be = !d && ye != null ? ve(ye) : null, xe = d ? W.map(ve) : [], Se = f(() => {
|
|
@@ -3229,34 +3235,41 @@ var Pi = a(function(e, t) {
|
|
|
3229
3235
|
U,
|
|
3230
3236
|
_,
|
|
3231
3237
|
o
|
|
3232
|
-
]), q = !!r, ke = O ?? (q || a ? !0 : n.length >= 10), Ae = q ? a ? Oe : Ee : a ? De : Te, je = f(() =>
|
|
3238
|
+
]), q = !!r, ke = O ?? (q || a ? !0 : n.length >= 10), Ae = q ? a ? Oe : Ee : a ? De : Te, je = f(() => xi(ee, le, re), [
|
|
3233
3239
|
ee,
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
]), Me = p(null), Ne = p(null), Pe = p(null), Fe = !!d &&
|
|
3240
|
+
le,
|
|
3241
|
+
re
|
|
3242
|
+
]), Me = p(null), Ne = p(null), Pe = p(null), Fe = !!d && re, Ie = oi({
|
|
3237
3243
|
wrapperRef: Me,
|
|
3238
3244
|
measureRef: Ne,
|
|
3239
3245
|
total: xe.length,
|
|
3240
3246
|
labelsKey: xe.map(mi).join("\0"),
|
|
3241
3247
|
enabled: Fe
|
|
3242
3248
|
}), Le = f(() => n.some((e) => !!e.description), [n]), Re = f(() => {
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3249
|
+
let e = d && !q ? W : [];
|
|
3250
|
+
if (!n.some((e) => e.group)) return gi(n, e);
|
|
3251
|
+
let t = /* @__PURE__ */ new Map(), r = [];
|
|
3252
|
+
for (let e of n) {
|
|
3253
|
+
if (!e.group) {
|
|
3254
|
+
r.push(e);
|
|
3248
3255
|
continue;
|
|
3249
3256
|
}
|
|
3250
|
-
let n =
|
|
3251
|
-
n || (n = [],
|
|
3252
|
-
label:
|
|
3257
|
+
let n = t.get(e.group);
|
|
3258
|
+
n || (n = [], t.set(e.group, n), r.push({
|
|
3259
|
+
label: e.group,
|
|
3253
3260
|
options: n
|
|
3254
|
-
})), n.push(
|
|
3261
|
+
})), n.push(e);
|
|
3255
3262
|
}
|
|
3256
|
-
|
|
3257
|
-
|
|
3263
|
+
for (let n of t.values()) n.splice(0, n.length, ...gi(n, e));
|
|
3264
|
+
return r;
|
|
3265
|
+
}, [
|
|
3266
|
+
d,
|
|
3267
|
+
q,
|
|
3268
|
+
n,
|
|
3269
|
+
W
|
|
3270
|
+
]), ze = !!d && !q, Be = d ? W : ye;
|
|
3258
3271
|
l(() => {
|
|
3259
|
-
!M || !he ||
|
|
3272
|
+
!M || !he || yi(M, Be);
|
|
3260
3273
|
}, [
|
|
3261
3274
|
M,
|
|
3262
3275
|
he,
|
|
@@ -3265,19 +3278,19 @@ var Pi = a(function(e, t) {
|
|
|
3265
3278
|
let Ve = s(() => {
|
|
3266
3279
|
M && ge((e) => {
|
|
3267
3280
|
let t = !e;
|
|
3268
|
-
return t ?
|
|
3281
|
+
return t ? yi(M, Be) : bi(M), t;
|
|
3269
3282
|
});
|
|
3270
3283
|
}, [M, Be]), He = f(() => M ? {
|
|
3271
3284
|
checked: he,
|
|
3272
|
-
label: N ??
|
|
3285
|
+
label: N ?? B.saveSelectionLabel
|
|
3273
3286
|
} : null, [
|
|
3274
3287
|
M,
|
|
3275
3288
|
he,
|
|
3276
3289
|
N,
|
|
3277
|
-
|
|
3278
|
-
]), [Ue, We] = m(""), J =
|
|
3279
|
-
We(e),
|
|
3280
|
-
}, [
|
|
3290
|
+
B
|
|
3291
|
+
]), [Ue, We] = m(""), J = R ?? Ue, Ge = ze || R !== void 0 || ne !== void 0, Ke = s((e, t) => {
|
|
3292
|
+
We(e), ne?.(e, t);
|
|
3293
|
+
}, [ne]), Y = f(() => ze ? n.filter((e) => !e.disabled && hi(e, J)) : [], [
|
|
3281
3294
|
ze,
|
|
3282
3295
|
n,
|
|
3283
3296
|
J
|
|
@@ -3288,13 +3301,13 @@ var Pi = a(function(e, t) {
|
|
|
3288
3301
|
count: Y.length,
|
|
3289
3302
|
checked: n,
|
|
3290
3303
|
indeterminate: t > 0 && t < Y.length,
|
|
3291
|
-
label: n ?
|
|
3304
|
+
label: n ? B.clearAllLabel(Y.length) : B.selectAllLabel(Y.length)
|
|
3292
3305
|
};
|
|
3293
3306
|
}, [
|
|
3294
3307
|
ze,
|
|
3295
3308
|
Y,
|
|
3296
3309
|
W,
|
|
3297
|
-
|
|
3310
|
+
B
|
|
3298
3311
|
]), Je = s(() => {
|
|
3299
3312
|
if (!qe) return;
|
|
3300
3313
|
let e = new Set(Y.map((e) => String(e.value))), t;
|
|
@@ -3313,11 +3326,11 @@ var Pi = a(function(e, t) {
|
|
|
3313
3326
|
_
|
|
3314
3327
|
]), Z = Qt(), Ye = {
|
|
3315
3328
|
...q ? {} : { filterOption: (e, t) => e.data.__isNew__ === !0 || hi(e.data, t) },
|
|
3316
|
-
...
|
|
3329
|
+
...z,
|
|
3317
3330
|
dataTestId: L,
|
|
3318
3331
|
dropdownIcon: x,
|
|
3319
|
-
inputValueControlled:
|
|
3320
|
-
inputId:
|
|
3332
|
+
inputValueControlled: R !== void 0,
|
|
3333
|
+
inputId: ce,
|
|
3321
3334
|
unstyled: !0,
|
|
3322
3335
|
classNames: je,
|
|
3323
3336
|
className: F,
|
|
@@ -3328,7 +3341,7 @@ var Pi = a(function(e, t) {
|
|
|
3328
3341
|
value: d ? xe : be,
|
|
3329
3342
|
onChange: Ce,
|
|
3330
3343
|
onCreateOption: a ? we : void 0,
|
|
3331
|
-
formatCreateLabel: a ?
|
|
3344
|
+
formatCreateLabel: a ? oe : void 0,
|
|
3332
3345
|
getOptionValue: (e) => String(e.value),
|
|
3333
3346
|
getOptionLabel: mi,
|
|
3334
3347
|
formatOptionLabel: (e, t) => {
|
|
@@ -3349,7 +3362,7 @@ var Pi = a(function(e, t) {
|
|
|
3349
3362
|
className: "min-w-0 flex-1 truncate",
|
|
3350
3363
|
children: n
|
|
3351
3364
|
}), /* @__PURE__ */ G("span", {
|
|
3352
|
-
"data-test-id":
|
|
3365
|
+
"data-test-id": Ci({ dataTestId: L }, `option-${String(e.value)}-actions`),
|
|
3353
3366
|
className: "ml-auto inline-flex shrink-0 items-center",
|
|
3354
3367
|
onMouseDown: (e) => {
|
|
3355
3368
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -3360,14 +3373,14 @@ var Pi = a(function(e, t) {
|
|
|
3360
3373
|
}) : n;
|
|
3361
3374
|
},
|
|
3362
3375
|
isOptionDisabled: (e) => !!e.disabled,
|
|
3363
|
-
placeholder:
|
|
3376
|
+
placeholder: ie,
|
|
3364
3377
|
isDisabled: te || E,
|
|
3365
3378
|
isClearable: D,
|
|
3366
3379
|
isSearchable: ke,
|
|
3367
3380
|
isLoading: E || void 0,
|
|
3368
|
-
noOptionsMessage: () =>
|
|
3369
|
-
loadingMessage: () =>
|
|
3370
|
-
"aria-invalid":
|
|
3381
|
+
noOptionsMessage: () => ae,
|
|
3382
|
+
loadingMessage: () => B.loadingMessage,
|
|
3383
|
+
"aria-invalid": le || void 0,
|
|
3371
3384
|
"aria-required": T || void 0,
|
|
3372
3385
|
...Ge ? {
|
|
3373
3386
|
inputValue: J,
|
|
@@ -3383,24 +3396,24 @@ var Pi = a(function(e, t) {
|
|
|
3383
3396
|
} : {},
|
|
3384
3397
|
...Fe ? { visibleTagCount: Ie } : {},
|
|
3385
3398
|
...d ? {
|
|
3386
|
-
closeMenuOnSelect:
|
|
3387
|
-
hideSelectedOptions:
|
|
3399
|
+
closeMenuOnSelect: z.closeMenuOnSelect ?? !1,
|
|
3400
|
+
hideSelectedOptions: z.hideSelectedOptions ?? !1
|
|
3388
3401
|
} : {},
|
|
3389
|
-
menuPlacement:
|
|
3390
|
-
menuPortalTarget:
|
|
3391
|
-
menuPosition:
|
|
3402
|
+
menuPlacement: z.menuPlacement ?? "auto",
|
|
3403
|
+
menuPortalTarget: z.menuPortalTarget ?? Z ?? void 0,
|
|
3404
|
+
menuPosition: z.menuPosition ?? "fixed",
|
|
3392
3405
|
components: {
|
|
3393
|
-
Control:
|
|
3394
|
-
Menu:
|
|
3395
|
-
...ke ? { Input:
|
|
3396
|
-
DropdownIndicator:
|
|
3397
|
-
ClearIndicator:
|
|
3398
|
-
MultiValueRemove:
|
|
3399
|
-
LoadingIndicator:
|
|
3406
|
+
Control: Ti,
|
|
3407
|
+
Menu: Ni,
|
|
3408
|
+
...ke ? { Input: Ei } : {},
|
|
3409
|
+
DropdownIndicator: Di,
|
|
3410
|
+
ClearIndicator: Oi,
|
|
3411
|
+
MultiValueRemove: ki,
|
|
3412
|
+
LoadingIndicator: Mi,
|
|
3400
3413
|
IndicatorSeparator: () => null,
|
|
3401
|
-
...k ? { MenuList:
|
|
3402
|
-
...Fe ? { MultiValue:
|
|
3403
|
-
Option:
|
|
3414
|
+
...k ? { MenuList: Pi } : {},
|
|
3415
|
+
...Fe ? { MultiValue: Ai } : {},
|
|
3416
|
+
Option: ji
|
|
3404
3417
|
}
|
|
3405
3418
|
};
|
|
3406
3419
|
return /* @__PURE__ */ K("div", {
|
|
@@ -3411,7 +3424,7 @@ var Pi = a(function(e, t) {
|
|
|
3411
3424
|
(y || b) && /* @__PURE__ */ K("div", {
|
|
3412
3425
|
className: "flex items-center gap-1.5",
|
|
3413
3426
|
children: [y && /* @__PURE__ */ K("label", {
|
|
3414
|
-
htmlFor:
|
|
3427
|
+
htmlFor: ce,
|
|
3415
3428
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3416
3429
|
children: [y, T && /* @__PURE__ */ G(at, {})]
|
|
3417
3430
|
}), b && /* @__PURE__ */ G("span", {
|
|
@@ -3452,29 +3465,29 @@ var Pi = a(function(e, t) {
|
|
|
3452
3465
|
})]
|
|
3453
3466
|
}),
|
|
3454
3467
|
C ? /* @__PURE__ */ G("p", {
|
|
3455
|
-
id: `${
|
|
3468
|
+
id: `${ce}-error`,
|
|
3456
3469
|
className: "text-p-sm text-fg-danger",
|
|
3457
3470
|
children: C
|
|
3458
3471
|
}) : S ? /* @__PURE__ */ G("p", {
|
|
3459
|
-
id: `${
|
|
3472
|
+
id: `${ce}-help`,
|
|
3460
3473
|
className: "text-p-sm text-fg-secondary",
|
|
3461
3474
|
children: S
|
|
3462
3475
|
}) : null
|
|
3463
3476
|
]
|
|
3464
3477
|
});
|
|
3465
|
-
}),
|
|
3466
|
-
function
|
|
3467
|
-
return c(
|
|
3478
|
+
}), Ii = r(null);
|
|
3479
|
+
function Li() {
|
|
3480
|
+
return c(Ii) ?? {
|
|
3468
3481
|
collapsed: !1,
|
|
3469
3482
|
toggle: () => {}
|
|
3470
3483
|
};
|
|
3471
3484
|
}
|
|
3472
|
-
var
|
|
3485
|
+
var Ri = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
|
|
3473
3486
|
let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
|
|
3474
3487
|
let e = !h;
|
|
3475
3488
|
p || f(e), n?.(e);
|
|
3476
3489
|
};
|
|
3477
|
-
return /* @__PURE__ */ G(
|
|
3490
|
+
return /* @__PURE__ */ G(Ii.Provider, {
|
|
3478
3491
|
value: {
|
|
3479
3492
|
collapsed: h,
|
|
3480
3493
|
toggle: g
|
|
@@ -3515,8 +3528,8 @@ var Li = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3515
3528
|
})]
|
|
3516
3529
|
})
|
|
3517
3530
|
});
|
|
3518
|
-
}),
|
|
3519
|
-
let { collapsed: d } =
|
|
3531
|
+
}), zi = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
3532
|
+
let { collapsed: d } = Li(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ K(W, { children: [e && /* @__PURE__ */ G("span", {
|
|
3520
3533
|
className: "inline-flex shrink-0",
|
|
3521
3534
|
children: e
|
|
3522
3535
|
}), !d && /* @__PURE__ */ K(W, { children: [
|
|
@@ -3555,12 +3568,12 @@ var Li = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3555
3568
|
className: "flex flex-col gap-0.5 pl-8",
|
|
3556
3569
|
children: i
|
|
3557
3570
|
})] });
|
|
3558
|
-
}),
|
|
3571
|
+
}), Bi = {
|
|
3559
3572
|
text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
|
|
3560
3573
|
circular: "size-10 rounded-full",
|
|
3561
3574
|
rectangular: "h-4 w-full",
|
|
3562
3575
|
rounded: "h-4 w-full rounded-md"
|
|
3563
|
-
},
|
|
3576
|
+
}, Vi = {
|
|
3564
3577
|
pulse: "animate-pulse",
|
|
3565
3578
|
wave: [
|
|
3566
3579
|
"relative overflow-hidden",
|
|
@@ -3570,15 +3583,15 @@ var Li = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3570
3583
|
].join(" "),
|
|
3571
3584
|
none: ""
|
|
3572
3585
|
};
|
|
3573
|
-
function
|
|
3586
|
+
function Hi(e) {
|
|
3574
3587
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3575
3588
|
}
|
|
3576
|
-
var
|
|
3589
|
+
var Ui = 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) {
|
|
3577
3590
|
let d = a != null, f = Math.max(1, i), p = {
|
|
3578
|
-
...n === void 0 ? null : { width:
|
|
3579
|
-
...r === void 0 ? null : { height:
|
|
3591
|
+
...n === void 0 ? null : { width: Hi(n) },
|
|
3592
|
+
...r === void 0 ? null : { height: Hi(r) },
|
|
3580
3593
|
...o
|
|
3581
|
-
}, m = X("block bg-bg-subtle leading-none",
|
|
3594
|
+
}, m = X("block bg-bg-subtle leading-none", Bi[e], Vi[t]);
|
|
3582
3595
|
return d ? /* @__PURE__ */ G("span", {
|
|
3583
3596
|
ref: u,
|
|
3584
3597
|
"data-test-id": c,
|
|
@@ -3611,7 +3624,7 @@ var Hi = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3611
3624
|
"aria-label": t === 0 ? "Loading" : void 0
|
|
3612
3625
|
}, t))
|
|
3613
3626
|
});
|
|
3614
|
-
}),
|
|
3627
|
+
}), Wi = {
|
|
3615
3628
|
success: {
|
|
3616
3629
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3617
3630
|
icon: x
|
|
@@ -3632,26 +3645,26 @@ var Hi = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3632
3645
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3633
3646
|
icon: P
|
|
3634
3647
|
}
|
|
3635
|
-
},
|
|
3648
|
+
}, Gi = {
|
|
3636
3649
|
success: "text-green-400",
|
|
3637
3650
|
warning: "text-yellow-300",
|
|
3638
3651
|
danger: "text-red-400",
|
|
3639
3652
|
info: "text-blue-400",
|
|
3640
3653
|
neutral: "text-white/70"
|
|
3641
|
-
},
|
|
3654
|
+
}, Ki = {
|
|
3642
3655
|
"top-left": "top-6 left-4",
|
|
3643
3656
|
"top-center": "top-6 left-1/2 -translate-x-1/2",
|
|
3644
3657
|
"top-right": "top-6 right-4",
|
|
3645
3658
|
"bottom-left": "bottom-6 left-4",
|
|
3646
3659
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
3647
3660
|
"bottom-right": "bottom-6 right-4"
|
|
3648
|
-
},
|
|
3649
|
-
function
|
|
3650
|
-
let e = c(
|
|
3661
|
+
}, qi = r(null);
|
|
3662
|
+
function Ji() {
|
|
3663
|
+
let e = c(qi);
|
|
3651
3664
|
if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
|
|
3652
3665
|
return e;
|
|
3653
3666
|
}
|
|
3654
|
-
function
|
|
3667
|
+
function Yi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
3655
3668
|
let [r, i] = m([]), a = p(/* @__PURE__ */ new Map()), o = s((e) => {
|
|
3656
3669
|
i((t) => t.filter((t) => t.id !== e));
|
|
3657
3670
|
let t = a.current.get(e);
|
|
@@ -3674,25 +3687,25 @@ function Ji({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3674
3687
|
return () => {
|
|
3675
3688
|
e.forEach(clearTimeout), e.clear();
|
|
3676
3689
|
};
|
|
3677
|
-
}, []), /* @__PURE__ */ K(
|
|
3690
|
+
}, []), /* @__PURE__ */ K(qi.Provider, {
|
|
3678
3691
|
value: {
|
|
3679
3692
|
show: c,
|
|
3680
3693
|
dismiss: o
|
|
3681
3694
|
},
|
|
3682
|
-
children: [e, be(/* @__PURE__ */ G(W, { children: Object.keys(
|
|
3695
|
+
children: [e, be(/* @__PURE__ */ G(W, { children: Object.keys(Ki).map((e) => {
|
|
3683
3696
|
let i = r.filter((t) => (t.position ?? n) === e);
|
|
3684
3697
|
return i.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
3685
3698
|
"data-test-id": t,
|
|
3686
|
-
className: X("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
3699
|
+
className: X("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none", Ki[e]),
|
|
3687
3700
|
children: i.map((e) => {
|
|
3688
|
-
let { container: t, icon: n } =
|
|
3701
|
+
let { container: t, icon: n } = Wi[e.variant ?? "neutral"];
|
|
3689
3702
|
return /* @__PURE__ */ K("div", {
|
|
3690
3703
|
role: "status",
|
|
3691
3704
|
"data-test-id": e.dataTestId,
|
|
3692
3705
|
className: X("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
3693
3706
|
children: [
|
|
3694
3707
|
/* @__PURE__ */ G(n, {
|
|
3695
|
-
className: X("h-5 w-5 shrink-0",
|
|
3708
|
+
className: X("h-5 w-5 shrink-0", Gi[e.variant ?? "neutral"]),
|
|
3696
3709
|
"aria-hidden": !0
|
|
3697
3710
|
}),
|
|
3698
3711
|
/* @__PURE__ */ G("p", {
|
|
@@ -3723,15 +3736,15 @@ function Ji({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3723
3736
|
}
|
|
3724
3737
|
//#endregion
|
|
3725
3738
|
//#region src/components/Status/Status.tsx
|
|
3726
|
-
var
|
|
3739
|
+
var Xi = {
|
|
3727
3740
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
3728
3741
|
md: "h-6 px-2 text-p-sm gap-1.5",
|
|
3729
3742
|
sm: "h-5 px-1.5 text-p-sm gap-1"
|
|
3730
|
-
},
|
|
3743
|
+
}, Zi = {
|
|
3731
3744
|
lg: "h-2 w-2",
|
|
3732
3745
|
md: "h-1.5 w-1.5",
|
|
3733
3746
|
sm: "h-1.5 w-1.5"
|
|
3734
|
-
},
|
|
3747
|
+
}, Qi = {
|
|
3735
3748
|
general: {
|
|
3736
3749
|
container: "bg-bg-subtle text-fg-default dark:text-fg-default",
|
|
3737
3750
|
dot: "bg-gray-600 dark:bg-gray-400"
|
|
@@ -3764,19 +3777,19 @@ var Yi = {
|
|
|
3764
3777
|
container: "bg-bg-subtle text-fg-disabled",
|
|
3765
3778
|
dot: "bg-border-strong"
|
|
3766
3779
|
}
|
|
3767
|
-
},
|
|
3768
|
-
let { container: u, dot: d } =
|
|
3780
|
+
}, $i = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3781
|
+
let { container: u, dot: d } = Qi[e];
|
|
3769
3782
|
return /* @__PURE__ */ K("span", {
|
|
3770
3783
|
ref: l,
|
|
3771
3784
|
"data-test-id": s,
|
|
3772
|
-
className: X("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none",
|
|
3785
|
+
className: X("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", Xi[t], u, a),
|
|
3773
3786
|
...c,
|
|
3774
3787
|
children: [
|
|
3775
3788
|
n ? /* @__PURE__ */ G("span", {
|
|
3776
3789
|
className: "inline-flex shrink-0",
|
|
3777
3790
|
children: n
|
|
3778
3791
|
}) : i ? /* @__PURE__ */ G("span", {
|
|
3779
|
-
className: X("inline-block shrink-0 rounded-full",
|
|
3792
|
+
className: X("inline-block shrink-0 rounded-full", Zi[t], d),
|
|
3780
3793
|
"aria-hidden": !0
|
|
3781
3794
|
}) : null,
|
|
3782
3795
|
o,
|
|
@@ -3786,45 +3799,45 @@ var Yi = {
|
|
|
3786
3799
|
})
|
|
3787
3800
|
]
|
|
3788
3801
|
});
|
|
3789
|
-
}),
|
|
3802
|
+
}), ea = {
|
|
3790
3803
|
lg: "size-9",
|
|
3791
3804
|
sm: "size-6"
|
|
3792
|
-
},
|
|
3805
|
+
}, ta = {
|
|
3793
3806
|
lg: "h-9",
|
|
3794
3807
|
sm: "h-6"
|
|
3795
|
-
},
|
|
3808
|
+
}, na = {
|
|
3796
3809
|
lg: "border-2",
|
|
3797
3810
|
sm: "border"
|
|
3798
|
-
},
|
|
3811
|
+
}, ra = {
|
|
3799
3812
|
lg: "text-p-std",
|
|
3800
3813
|
sm: "text-p-xs"
|
|
3801
|
-
},
|
|
3814
|
+
}, ia = {
|
|
3802
3815
|
lg: "size-5",
|
|
3803
3816
|
sm: "size-3.5"
|
|
3804
|
-
},
|
|
3817
|
+
}, aa = {
|
|
3805
3818
|
lg: "size-3",
|
|
3806
3819
|
sm: "size-2"
|
|
3807
|
-
},
|
|
3820
|
+
}, oa = {
|
|
3808
3821
|
lg: "text-p-std",
|
|
3809
3822
|
sm: "text-p-sm"
|
|
3810
|
-
},
|
|
3823
|
+
}, sa = {
|
|
3811
3824
|
lg: "text-p-sm",
|
|
3812
3825
|
sm: "text-p-xs"
|
|
3813
|
-
},
|
|
3826
|
+
}, ca = {
|
|
3814
3827
|
upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
|
|
3815
3828
|
active: "bg-bg-default border-brand-500 text-brand-700",
|
|
3816
3829
|
completed: "bg-brand-500 border-brand-500 text-fg-inverse",
|
|
3817
3830
|
rejected: "bg-red-700 border-red-800 text-fg-inverse"
|
|
3818
|
-
},
|
|
3831
|
+
}, la = {
|
|
3819
3832
|
upcoming: "ring-4 ring-gray-100/80",
|
|
3820
3833
|
active: "ring-4 ring-brand-40/80",
|
|
3821
3834
|
completed: "ring-4 ring-brand-40/80",
|
|
3822
3835
|
rejected: "ring-4 ring-red-100/80"
|
|
3823
3836
|
};
|
|
3824
|
-
function
|
|
3825
|
-
return t === "completed" ? /* @__PURE__ */ G(E, { className:
|
|
3837
|
+
function ua(e, t, n, r) {
|
|
3838
|
+
return t === "completed" ? /* @__PURE__ */ G(E, { className: ia[r] }) : t === "rejected" ? /* @__PURE__ */ G(D, { className: ia[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ G("span", { className: X("rounded-full", aa[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
3826
3839
|
}
|
|
3827
|
-
var
|
|
3840
|
+
var da = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
3828
3841
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
3829
3842
|
return /* @__PURE__ */ G("ol", {
|
|
3830
3843
|
ref: l,
|
|
@@ -3833,15 +3846,15 @@ var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3833
3846
|
...c,
|
|
3834
3847
|
children: e.map((i, o) => {
|
|
3835
3848
|
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__ */ G("span", {
|
|
3836
|
-
className: X("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors",
|
|
3837
|
-
children:
|
|
3849
|
+
className: X("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", ea[a], na[a], ra[a], ca[s], i.highlighted && la[s]),
|
|
3850
|
+
children: ua(r, s, o, a)
|
|
3838
3851
|
}), h = /* @__PURE__ */ K("div", {
|
|
3839
3852
|
className: X("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
3840
3853
|
children: [/* @__PURE__ */ G("span", {
|
|
3841
|
-
className: X("font-medium text-fg-default",
|
|
3854
|
+
className: X("font-medium text-fg-default", oa[a]),
|
|
3842
3855
|
children: i.label
|
|
3843
3856
|
}), i.description && /* @__PURE__ */ G("span", {
|
|
3844
|
-
className: X("text-fg-secondary",
|
|
3857
|
+
className: X("text-fg-secondary", sa[a]),
|
|
3845
3858
|
children: i.description
|
|
3846
3859
|
})]
|
|
3847
3860
|
});
|
|
@@ -3849,7 +3862,7 @@ var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3849
3862
|
"aria-current": $e(i.value, t) ? "step" : void 0,
|
|
3850
3863
|
className: X("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3851
3864
|
children: [/* @__PURE__ */ K("div", {
|
|
3852
|
-
className: X("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : X("w-full items-center justify-center",
|
|
3865
|
+
className: X("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : X("w-full items-center justify-center", ta[a])),
|
|
3853
3866
|
children: [
|
|
3854
3867
|
!c && /* @__PURE__ */ G("span", {
|
|
3855
3868
|
"aria-hidden": !0,
|
|
@@ -3871,13 +3884,13 @@ var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3871
3884
|
}, String(i.value));
|
|
3872
3885
|
})
|
|
3873
3886
|
});
|
|
3874
|
-
}),
|
|
3887
|
+
}), fa = {
|
|
3875
3888
|
md: "h-6 w-11",
|
|
3876
3889
|
sm: "h-5 w-9"
|
|
3877
|
-
},
|
|
3890
|
+
}, pa = {
|
|
3878
3891
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
3879
3892
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
3880
|
-
},
|
|
3893
|
+
}, ma = 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) {
|
|
3881
3894
|
let p = u(), m = i ?? p, h = /* @__PURE__ */ K("span", {
|
|
3882
3895
|
className: "relative inline-flex shrink-0",
|
|
3883
3896
|
children: [
|
|
@@ -3893,8 +3906,8 @@ var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3893
3906
|
"data-test-id": Z(l)("input"),
|
|
3894
3907
|
...d
|
|
3895
3908
|
}),
|
|
3896
|
-
/* @__PURE__ */ G("span", { className: X("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors",
|
|
3897
|
-
/* @__PURE__ */ G("span", { className: X("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform",
|
|
3909
|
+
/* @__PURE__ */ G("span", { className: X("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", fa[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!") }),
|
|
3910
|
+
/* @__PURE__ */ G("span", { className: X("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", pa[e]) })
|
|
3898
3911
|
]
|
|
3899
3912
|
});
|
|
3900
3913
|
return !t && !n ? /* @__PURE__ */ G("label", {
|
|
@@ -3920,11 +3933,11 @@ var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3920
3933
|
});
|
|
3921
3934
|
//#endregion
|
|
3922
3935
|
//#region src/components/TableV2/TableV2Filter.tsx
|
|
3923
|
-
function
|
|
3936
|
+
function ha({ column: e }) {
|
|
3924
3937
|
let t = e.columnDef.meta?.filterVariant;
|
|
3925
3938
|
if (!t) return null;
|
|
3926
3939
|
let n = e.getFilterValue();
|
|
3927
|
-
return t === "custom" ? /* @__PURE__ */ G(W, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ G(
|
|
3940
|
+
return t === "custom" ? /* @__PURE__ */ G(W, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ G(Fi, {
|
|
3928
3941
|
size: "sm",
|
|
3929
3942
|
searchable: !1,
|
|
3930
3943
|
required: !1,
|
|
@@ -3943,7 +3956,7 @@ function ma({ column: e }) {
|
|
|
3943
3956
|
}
|
|
3944
3957
|
//#endregion
|
|
3945
3958
|
//#region src/components/TableV2/TableV2Pagination.i18n.ts
|
|
3946
|
-
var
|
|
3959
|
+
var ga = {
|
|
3947
3960
|
"en-US": {
|
|
3948
3961
|
rowsPerPage: "Rows per page",
|
|
3949
3962
|
noResults: "No results",
|
|
@@ -3962,12 +3975,12 @@ var ha = {
|
|
|
3962
3975
|
};
|
|
3963
3976
|
//#endregion
|
|
3964
3977
|
//#region src/components/TableV2/TableV2Pagination.tsx
|
|
3965
|
-
function
|
|
3978
|
+
function _a({ table: e, pageSizeOptions: t = [
|
|
3966
3979
|
10,
|
|
3967
3980
|
20,
|
|
3968
3981
|
30
|
|
3969
3982
|
], locale: n = "en-US", dataTestId: r }) {
|
|
3970
|
-
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u =
|
|
3983
|
+
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u = ga[n], d = Z(r);
|
|
3971
3984
|
return /* @__PURE__ */ K("div", {
|
|
3972
3985
|
className: "flex flex-wrap items-center justify-between gap-3 p-3 border-t border-border-default",
|
|
3973
3986
|
children: [
|
|
@@ -3976,7 +3989,7 @@ function ga({ table: e, pageSizeOptions: t = [
|
|
|
3976
3989
|
children: [/* @__PURE__ */ G("span", {
|
|
3977
3990
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3978
3991
|
children: u.rowsPerPage
|
|
3979
|
-
}), /* @__PURE__ */ G(
|
|
3992
|
+
}), /* @__PURE__ */ G(Fi, {
|
|
3980
3993
|
size: "sm",
|
|
3981
3994
|
menuPlacement: "top",
|
|
3982
3995
|
searchable: !1,
|
|
@@ -4008,14 +4021,14 @@ function ga({ table: e, pageSizeOptions: t = [
|
|
|
4008
4021
|
}
|
|
4009
4022
|
//#endregion
|
|
4010
4023
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
4011
|
-
function
|
|
4024
|
+
function va({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
4012
4025
|
let r = Z(n);
|
|
4013
4026
|
return /* @__PURE__ */ G(W, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ G("tr", {
|
|
4014
4027
|
"data-test-id": r(`skeleton-row-${n}`),
|
|
4015
4028
|
"aria-hidden": n > 0 || void 0,
|
|
4016
4029
|
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ G("td", {
|
|
4017
4030
|
className: "px-4 py-3",
|
|
4018
|
-
children: /* @__PURE__ */ G(
|
|
4031
|
+
children: /* @__PURE__ */ G(Ui, {
|
|
4019
4032
|
variant: "text",
|
|
4020
4033
|
width: t === 0 ? "70%" : "90%"
|
|
4021
4034
|
})
|
|
@@ -4024,11 +4037,11 @@ function _a({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
|
4024
4037
|
}
|
|
4025
4038
|
//#endregion
|
|
4026
4039
|
//#region src/components/TableV2/TableV2ColumnVisibility.tsx
|
|
4027
|
-
function
|
|
4040
|
+
function ya(e) {
|
|
4028
4041
|
let { header: t } = e.columnDef;
|
|
4029
4042
|
return typeof t == "string" ? t : e.id;
|
|
4030
4043
|
}
|
|
4031
|
-
function
|
|
4044
|
+
function ba({ table: e }) {
|
|
4032
4045
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
4033
4046
|
return /* @__PURE__ */ K(gr, { children: [/* @__PURE__ */ G(_r, { children: /* @__PURE__ */ G(ut, {
|
|
4034
4047
|
variant: "secondary",
|
|
@@ -4041,7 +4054,7 @@ function ya({ table: e }) {
|
|
|
4041
4054
|
className: "px-3 py-1.5 hover:bg-bg-subtle",
|
|
4042
4055
|
children: /* @__PURE__ */ G(Yt, {
|
|
4043
4056
|
size: "sm",
|
|
4044
|
-
label:
|
|
4057
|
+
label: ya(e),
|
|
4045
4058
|
checked: e.getIsVisible(),
|
|
4046
4059
|
onChange: () => e.toggleVisibility()
|
|
4047
4060
|
})
|
|
@@ -4050,12 +4063,12 @@ function ya({ table: e }) {
|
|
|
4050
4063
|
}
|
|
4051
4064
|
//#endregion
|
|
4052
4065
|
//#region src/components/TableV2/TableV2Toolbar.tsx
|
|
4053
|
-
function
|
|
4066
|
+
function xa({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
4054
4067
|
return /* @__PURE__ */ K("div", {
|
|
4055
4068
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
4056
4069
|
children: [t && /* @__PURE__ */ G(dn, {
|
|
4057
4070
|
size: "sm",
|
|
4058
|
-
leftIcon: /* @__PURE__ */ G(
|
|
4071
|
+
leftIcon: /* @__PURE__ */ G(le, { className: "h-4 w-4" }),
|
|
4059
4072
|
placeholder: r ?? "Search...",
|
|
4060
4073
|
"aria-label": "Search",
|
|
4061
4074
|
value: String(e.getState().globalFilter ?? ""),
|
|
@@ -4069,7 +4082,7 @@ function ba({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4069
4082
|
size: "sm",
|
|
4070
4083
|
iconOnly: !0,
|
|
4071
4084
|
"aria-label": "Refresh",
|
|
4072
|
-
leftIcon: /* @__PURE__ */ G(
|
|
4085
|
+
leftIcon: /* @__PURE__ */ G(ce, { className: "h-4 w-4" }),
|
|
4073
4086
|
onClick: i
|
|
4074
4087
|
}),
|
|
4075
4088
|
a && /* @__PURE__ */ G(ut, {
|
|
@@ -4079,7 +4092,7 @@ function ba({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4079
4092
|
onClick: a,
|
|
4080
4093
|
children: "Export"
|
|
4081
4094
|
}),
|
|
4082
|
-
n && /* @__PURE__ */ G(
|
|
4095
|
+
n && /* @__PURE__ */ G(ba, { table: e }),
|
|
4083
4096
|
o
|
|
4084
4097
|
]
|
|
4085
4098
|
})]
|
|
@@ -4087,15 +4100,15 @@ function ba({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4087
4100
|
}
|
|
4088
4101
|
//#endregion
|
|
4089
4102
|
//#region src/components/TableV2/useTableV2ColumnDnd.ts
|
|
4090
|
-
var
|
|
4103
|
+
var Sa = ({ transform: e }) => ({
|
|
4091
4104
|
...e,
|
|
4092
4105
|
y: 0
|
|
4093
4106
|
});
|
|
4094
|
-
function
|
|
4107
|
+
function Ca({ columnOrder: e, onColumnOrderChange: t }) {
|
|
4095
4108
|
return {
|
|
4096
4109
|
sensors: Ve(Be(Re, { activationConstraint: { distance: 4 } }), Be(Le, { coordinateGetter: J })),
|
|
4097
4110
|
collisionDetection: ze,
|
|
4098
|
-
modifiers: [
|
|
4111
|
+
modifiers: [Sa],
|
|
4099
4112
|
handleDragEnd: (n) => {
|
|
4100
4113
|
let { active: r, over: i } = n;
|
|
4101
4114
|
if (!i || r.id === i.id) return;
|
|
@@ -4104,7 +4117,7 @@ function Sa({ columnOrder: e, onColumnOrderChange: t }) {
|
|
|
4104
4117
|
}
|
|
4105
4118
|
};
|
|
4106
4119
|
}
|
|
4107
|
-
function
|
|
4120
|
+
function wa(e) {
|
|
4108
4121
|
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Ge({ id: e });
|
|
4109
4122
|
return {
|
|
4110
4123
|
setNodeRef: r,
|
|
@@ -4122,13 +4135,13 @@ function Ca(e) {
|
|
|
4122
4135
|
}
|
|
4123
4136
|
//#endregion
|
|
4124
4137
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
4125
|
-
function
|
|
4138
|
+
function Ta({ row: e, actions: t }) {
|
|
4126
4139
|
return t.length === 0 ? null : /* @__PURE__ */ K(gr, { children: [/* @__PURE__ */ G(_r, { children: /* @__PURE__ */ G(ut, {
|
|
4127
4140
|
variant: "tertiary",
|
|
4128
4141
|
size: "sm",
|
|
4129
4142
|
iconOnly: !0,
|
|
4130
4143
|
"aria-label": "Row actions",
|
|
4131
|
-
leftIcon: /* @__PURE__ */ G(
|
|
4144
|
+
leftIcon: /* @__PURE__ */ G(re, { className: "h-4 w-4" })
|
|
4132
4145
|
}) }), /* @__PURE__ */ G(yr, {
|
|
4133
4146
|
align: "end",
|
|
4134
4147
|
children: t.map((t, n) => /* @__PURE__ */ G(br, {
|
|
@@ -4142,15 +4155,15 @@ function wa({ row: e, actions: t }) {
|
|
|
4142
4155
|
}
|
|
4143
4156
|
//#endregion
|
|
4144
4157
|
//#region src/components/TableV2/TableV2.utils.tsx
|
|
4145
|
-
var
|
|
4158
|
+
var Ea = {
|
|
4146
4159
|
comfortable: "py-3",
|
|
4147
4160
|
compact: "py-2"
|
|
4148
|
-
},
|
|
4161
|
+
}, Da = {
|
|
4149
4162
|
left: "text-left",
|
|
4150
4163
|
center: "text-center",
|
|
4151
4164
|
right: "text-right"
|
|
4152
4165
|
};
|
|
4153
|
-
function
|
|
4166
|
+
function Oa() {
|
|
4154
4167
|
return {
|
|
4155
4168
|
id: "select",
|
|
4156
4169
|
size: 40,
|
|
@@ -4175,7 +4188,7 @@ function Da() {
|
|
|
4175
4188
|
})
|
|
4176
4189
|
};
|
|
4177
4190
|
}
|
|
4178
|
-
function
|
|
4191
|
+
function ka(e, t) {
|
|
4179
4192
|
return {
|
|
4180
4193
|
id: "actions",
|
|
4181
4194
|
header: t?.header ?? "",
|
|
@@ -4183,13 +4196,13 @@ function Oa(e, t) {
|
|
|
4183
4196
|
enableSorting: !1,
|
|
4184
4197
|
enableColumnFilter: !1,
|
|
4185
4198
|
enableResizing: !1,
|
|
4186
|
-
cell: ({ row: t }) => /* @__PURE__ */ G(
|
|
4199
|
+
cell: ({ row: t }) => /* @__PURE__ */ G(Ta, {
|
|
4187
4200
|
row: t.original,
|
|
4188
4201
|
actions: e(t.original)
|
|
4189
4202
|
})
|
|
4190
4203
|
};
|
|
4191
4204
|
}
|
|
4192
|
-
function
|
|
4205
|
+
function Aa(e) {
|
|
4193
4206
|
let t = e.getIsPinned();
|
|
4194
4207
|
return t ? {
|
|
4195
4208
|
position: "sticky",
|
|
@@ -4200,15 +4213,15 @@ function ka(e) {
|
|
|
4200
4213
|
}
|
|
4201
4214
|
//#endregion
|
|
4202
4215
|
//#region src/components/TableV2/TableV2.tsx
|
|
4203
|
-
function
|
|
4216
|
+
function ja(e, t, n) {
|
|
4204
4217
|
let [r, i] = m(n);
|
|
4205
4218
|
return [e ?? r, (e) => {
|
|
4206
4219
|
i((t) => typeof e == "function" ? e(t) : e), t?.(e);
|
|
4207
4220
|
}];
|
|
4208
4221
|
}
|
|
4209
|
-
var
|
|
4210
|
-
function
|
|
4211
|
-
let l = e.column, u =
|
|
4222
|
+
var Ma = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4223
|
+
function Na({ header: e, dataTestId: t, density: n, enableSorting: r, enableFiltering: i, enableColumnOrdering: a, enableColumnResizing: o, enablePinning: s, enableColumnVisibility: c }) {
|
|
4224
|
+
let l = e.column, u = Ma.has(l.id), d = a && !u, f = wa(l.id), p = l.columnDef.meta?.align ?? "left", m = l.getIsSorted(), h = !u && (s && l.getCanPin() || c && l.getCanHide()), g = Ae(l.columnDef.header, e.getContext());
|
|
4212
4225
|
return /* @__PURE__ */ K("th", {
|
|
4213
4226
|
ref: d ? f.setNodeRef : void 0,
|
|
4214
4227
|
colSpan: e.colSpan,
|
|
@@ -4216,11 +4229,11 @@ function Ma({ header: e, dataTestId: t, density: n, enableSorting: r, enableFilt
|
|
|
4216
4229
|
"data-test-id": t,
|
|
4217
4230
|
style: {
|
|
4218
4231
|
width: o ? e.getSize() : void 0,
|
|
4219
|
-
...
|
|
4232
|
+
...Aa(l),
|
|
4220
4233
|
...d ? f.style : null
|
|
4221
4234
|
},
|
|
4222
4235
|
"aria-sort": m === "asc" ? "ascending" : m === "desc" ? "descending" : void 0,
|
|
4223
|
-
className: X("relative px-4 whitespace-nowrap bg-bg-container",
|
|
4236
|
+
className: X("relative px-4 whitespace-nowrap bg-bg-container", Ea[n], Da[p]),
|
|
4224
4237
|
children: [
|
|
4225
4238
|
/* @__PURE__ */ K("div", {
|
|
4226
4239
|
className: "flex items-center gap-1",
|
|
@@ -4252,23 +4265,23 @@ function Ma({ header: e, dataTestId: t, density: n, enableSorting: r, enableFilt
|
|
|
4252
4265
|
type: "button",
|
|
4253
4266
|
"aria-label": `${typeof g == "string" ? g : l.id} column options`,
|
|
4254
4267
|
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",
|
|
4255
|
-
children: /* @__PURE__ */ G(
|
|
4268
|
+
children: /* @__PURE__ */ G(z, { className: "h-3.5 w-3.5" })
|
|
4256
4269
|
}) }), /* @__PURE__ */ K(yr, {
|
|
4257
4270
|
align: "start",
|
|
4258
4271
|
children: [
|
|
4259
4272
|
s && l.getCanPin() && /* @__PURE__ */ K(W, { children: [
|
|
4260
4273
|
l.getIsPinned() !== "left" && /* @__PURE__ */ G(br, {
|
|
4261
|
-
icon: /* @__PURE__ */ G(
|
|
4274
|
+
icon: /* @__PURE__ */ G(ae, { className: "h-4 w-4" }),
|
|
4262
4275
|
onSelect: () => l.pin("left"),
|
|
4263
4276
|
children: "Pin left"
|
|
4264
4277
|
}),
|
|
4265
4278
|
l.getIsPinned() !== "right" && /* @__PURE__ */ G(br, {
|
|
4266
|
-
icon: /* @__PURE__ */ G(
|
|
4279
|
+
icon: /* @__PURE__ */ G(ae, { className: "h-4 w-4" }),
|
|
4267
4280
|
onSelect: () => l.pin("right"),
|
|
4268
4281
|
children: "Pin right"
|
|
4269
4282
|
}),
|
|
4270
4283
|
l.getIsPinned() && /* @__PURE__ */ G(br, {
|
|
4271
|
-
icon: /* @__PURE__ */ G(
|
|
4284
|
+
icon: /* @__PURE__ */ G(oe, { className: "h-4 w-4" }),
|
|
4272
4285
|
onSelect: () => l.pin(!1),
|
|
4273
4286
|
children: "Unpin"
|
|
4274
4287
|
})
|
|
@@ -4286,7 +4299,7 @@ function Ma({ header: e, dataTestId: t, density: n, enableSorting: r, enableFilt
|
|
|
4286
4299
|
i && l.getCanFilter() && /* @__PURE__ */ G("div", {
|
|
4287
4300
|
className: "mt-2 normal-case",
|
|
4288
4301
|
onClick: (e) => e.stopPropagation(),
|
|
4289
|
-
children: /* @__PURE__ */ G(
|
|
4302
|
+
children: /* @__PURE__ */ G(ha, { column: l })
|
|
4290
4303
|
}),
|
|
4291
4304
|
o && l.getCanResize() && /* @__PURE__ */ G("div", {
|
|
4292
4305
|
onMouseDown: e.getResizeHandler(),
|
|
@@ -4297,8 +4310,8 @@ function Ma({ header: e, dataTestId: t, density: n, enableSorting: r, enableFilt
|
|
|
4297
4310
|
]
|
|
4298
4311
|
});
|
|
4299
4312
|
}
|
|
4300
|
-
function
|
|
4301
|
-
let n = e.getVisibleCells(), r = n.find((e) => !
|
|
4313
|
+
function Pa({ row: e, onRowClick: t }) {
|
|
4314
|
+
let n = e.getVisibleCells(), r = n.find((e) => !Ma.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 && !Ma.has(e.column.id));
|
|
4302
4315
|
return /* @__PURE__ */ K("div", {
|
|
4303
4316
|
"data-selected": e.getIsSelected() || void 0,
|
|
4304
4317
|
onClick: t ? () => t(e.original) : void 0,
|
|
@@ -4333,26 +4346,26 @@ function Na({ row: e, onRowClick: t }) {
|
|
|
4333
4346
|
})]
|
|
4334
4347
|
});
|
|
4335
4348
|
}
|
|
4336
|
-
function
|
|
4349
|
+
function Fa({ rowCount: e }) {
|
|
4337
4350
|
return /* @__PURE__ */ G("div", { children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ K("div", {
|
|
4338
4351
|
"aria-hidden": t > 0 || void 0,
|
|
4339
4352
|
className: "flex flex-col gap-2 border-b border-border-default p-4",
|
|
4340
|
-
children: [/* @__PURE__ */ G(
|
|
4353
|
+
children: [/* @__PURE__ */ G(Ui, {
|
|
4341
4354
|
variant: "text",
|
|
4342
4355
|
width: "60%"
|
|
4343
|
-
}), /* @__PURE__ */ G(
|
|
4356
|
+
}), /* @__PURE__ */ G(Ui, {
|
|
4344
4357
|
variant: "text",
|
|
4345
4358
|
width: "90%"
|
|
4346
4359
|
})]
|
|
4347
4360
|
}, t)) });
|
|
4348
4361
|
}
|
|
4349
|
-
function
|
|
4350
|
-
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: h, manualSorting: g = !1, enableFiltering: _ = !1, columnFilters: v, onColumnFiltersChange: y, manualFiltering: b = !1, enableGlobalFilter: x = !1, globalFilter: S, onGlobalFilterChange: C, enableRowSelection: w = !1, enableMultiRowSelection: T = !0, rowSelection: E, onRowSelectionChange: D, enableColumnVisibility: O = !1, columnVisibility: k, onColumnVisibilityChange: A, enableColumnOrdering: j = !1, columnOrder: M, onColumnOrderChange: N, enablePinning: ee = !1, columnPinning: te, onColumnPinningChange: P, enableColumnResizing: F = !1, columnResizeMode: I = "onChange", enablePagination: L = !1, pageSize:
|
|
4362
|
+
function Ia(e, t) {
|
|
4363
|
+
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: h, manualSorting: g = !1, enableFiltering: _ = !1, columnFilters: v, onColumnFiltersChange: y, manualFiltering: b = !1, enableGlobalFilter: x = !1, globalFilter: S, onGlobalFilterChange: C, enableRowSelection: w = !1, enableMultiRowSelection: T = !0, rowSelection: E, onRowSelectionChange: D, enableColumnVisibility: O = !1, columnVisibility: k, onColumnVisibilityChange: A, enableColumnOrdering: j = !1, columnOrder: M, onColumnOrderChange: N, enablePinning: ee = !1, columnPinning: te, onColumnPinningChange: P, enableColumnResizing: F = !1, columnResizeMode: I = "onChange", enablePagination: L = !1, pageSize: R = 10, pageSizeOptions: ne, pagination: z, onPaginationChange: re, locale: B = "en-US", manualPagination: ie = !1, pageCount: ae, rowCount: oe, enableVirtualization: se = !1, estimatedRowHeight: ce = 44, maxBodyHeight: le = 480, onRowClick: ue, toolbar: de = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: me, onExport: he, density: ge = "comfortable", stickyHeader: _e = !1, fillHeight: V = !1, wrapperClassName: H, className: U, dataTestId: ve } = e, [ye, be] = ja(u, h, []), [xe, Se] = ja(v, y, []), [Ce, we] = ja(S, C, ""), [Te, q] = ja(E, D, {}), [Ee, De] = ja(k, A, {}), [Oe, Le] = ja(M, N, []), [Re, ze] = ja(te, P, {}), [Be, Ve] = ja(z, re, {
|
|
4351
4364
|
pageIndex: 0,
|
|
4352
|
-
pageSize:
|
|
4365
|
+
pageSize: R
|
|
4353
4366
|
}), Ue = Fe({
|
|
4354
4367
|
data: n,
|
|
4355
|
-
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [
|
|
4368
|
+
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [Oa(), ...r], [r, w]),
|
|
4356
4369
|
getRowId: s,
|
|
4357
4370
|
state: {
|
|
4358
4371
|
sorting: ye,
|
|
@@ -4382,35 +4395,35 @@ function Fa(e, t) {
|
|
|
4382
4395
|
enableMultiRowSelection: T,
|
|
4383
4396
|
enableColumnResizing: F,
|
|
4384
4397
|
columnResizeMode: I,
|
|
4385
|
-
manualPagination:
|
|
4386
|
-
pageCount:
|
|
4387
|
-
rowCount:
|
|
4398
|
+
manualPagination: ie,
|
|
4399
|
+
pageCount: ae,
|
|
4400
|
+
rowCount: oe,
|
|
4388
4401
|
getCoreRowModel: je(),
|
|
4389
4402
|
getSortedRowModel: c ? Pe() : void 0,
|
|
4390
4403
|
getFilteredRowModel: _ || x ? Me() : void 0,
|
|
4391
4404
|
getPaginationRowModel: L ? Ne() : void 0
|
|
4392
4405
|
}), J = Ue.getRowModel().rows, Ge = Ue.getVisibleLeafColumns().length, Ke = p(null), [Y, qe] = m(null);
|
|
4393
4406
|
d(() => {
|
|
4394
|
-
if (!L ||
|
|
4407
|
+
if (!L || se) return;
|
|
4395
4408
|
let e = Ke.current?.getBoundingClientRect().height;
|
|
4396
4409
|
e && e !== Y && qe(e);
|
|
4397
4410
|
}, [
|
|
4398
4411
|
L,
|
|
4399
|
-
|
|
4412
|
+
se,
|
|
4400
4413
|
ge,
|
|
4401
4414
|
J,
|
|
4402
4415
|
Y
|
|
4403
4416
|
]);
|
|
4404
|
-
let Je = Y ??
|
|
4417
|
+
let Je = Y ?? ce, Ye = L && !se ? Math.max(0, Be.pageSize - J.length) * Je : 0, Xe = f(() => Oe.length > 0 ? Oe : Ue.getAllLeafColumns().map((e) => e.id), [Oe, Ue]), Ze = Ca({
|
|
4405
4418
|
columnOrder: Xe,
|
|
4406
4419
|
onColumnOrderChange: Le
|
|
4407
4420
|
}), Qe = (e) => Ze.handleDragEnd(e), $e = p(null), et = ke({
|
|
4408
4421
|
count: J.length,
|
|
4409
4422
|
getScrollElement: () => $e.current,
|
|
4410
|
-
estimateSize: () =>
|
|
4423
|
+
estimateSize: () => ce,
|
|
4411
4424
|
overscan: 10,
|
|
4412
|
-
enabled:
|
|
4413
|
-
}), Q =
|
|
4425
|
+
enabled: se
|
|
4426
|
+
}), Q = se ? et.getVirtualItems() : null, tt = Q && Q.length > 0 ? Q[0]?.start ?? 0 : 0, nt = Q && Q.length > 0 ? et.getTotalSize() - (Q[Q.length - 1]?.end ?? 0) : 0, rt = Z(ve), it = (e) => {
|
|
4414
4427
|
let t = e.original?.id;
|
|
4415
4428
|
return typeof t == "string" || typeof t == "number" ? String(t) : e.id;
|
|
4416
4429
|
}, at = (e, t) => /* @__PURE__ */ G("tr", {
|
|
@@ -4418,17 +4431,17 @@ function Fa(e, t) {
|
|
|
4418
4431
|
"data-test-id": rt(`row-${it(e)}`),
|
|
4419
4432
|
"data-row-id": it(e),
|
|
4420
4433
|
"data-selected": e.getIsSelected() || void 0,
|
|
4421
|
-
onClick:
|
|
4422
|
-
className: X("group border-t border-border-default",
|
|
4434
|
+
onClick: ue ? () => ue(e.original) : void 0,
|
|
4435
|
+
className: X("group border-t border-border-default", ue && "cursor-pointer"),
|
|
4423
4436
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ G("td", {
|
|
4424
4437
|
"data-test-id": rt(`cell-${e.column.id}`),
|
|
4425
|
-
style:
|
|
4426
|
-
className: X("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50",
|
|
4438
|
+
style: Aa(e.column),
|
|
4439
|
+
className: X("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", Ea[ge], Da[e.column.columnDef.meta?.align ?? "left"]),
|
|
4427
4440
|
children: Ae(e.column.columnDef.cell, e.getContext())
|
|
4428
4441
|
}, e.id))
|
|
4429
4442
|
}, e.id), ot = (e, t) => /* @__PURE__ */ G("tr", {
|
|
4430
4443
|
"data-test-id": rt(`header-row-${e}`),
|
|
4431
|
-
children: t.map((e) => /* @__PURE__ */ G(
|
|
4444
|
+
children: t.map((e) => /* @__PURE__ */ G(Na, {
|
|
4432
4445
|
header: e,
|
|
4433
4446
|
dataTestId: rt(`header-${e.column.id}`),
|
|
4434
4447
|
density: ge,
|
|
@@ -4445,7 +4458,7 @@ function Fa(e, t) {
|
|
|
4445
4458
|
children: [/* @__PURE__ */ G("thead", {
|
|
4446
4459
|
className: X("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (_e || V) && "sticky top-0 z-10"),
|
|
4447
4460
|
children: Ue.getHeaderGroups().map((e) => ot(e.id, e.headers))
|
|
4448
|
-
}), /* @__PURE__ */ G("tbody", { children: i ? /* @__PURE__ */ G(
|
|
4461
|
+
}), /* @__PURE__ */ G("tbody", { children: i ? /* @__PURE__ */ G(va, {
|
|
4449
4462
|
columnCount: Ge,
|
|
4450
4463
|
rowCount: Be.pageSize,
|
|
4451
4464
|
testIdPrefix: ve
|
|
@@ -4459,7 +4472,7 @@ function Fa(e, t) {
|
|
|
4459
4472
|
title: o
|
|
4460
4473
|
})
|
|
4461
4474
|
})
|
|
4462
|
-
}) :
|
|
4475
|
+
}) : se && Q ? /* @__PURE__ */ K(W, { children: [
|
|
4463
4476
|
tt > 0 && /* @__PURE__ */ G("tr", {
|
|
4464
4477
|
"aria-hidden": !0,
|
|
4465
4478
|
"data-test-id": rt("padding-top-row"),
|
|
@@ -4495,7 +4508,7 @@ function Fa(e, t) {
|
|
|
4495
4508
|
"data-test-id": ve,
|
|
4496
4509
|
className: X("w-full rounded-lg border border-border-default bg-bg-default", V && "h-full flex flex-col", H, U),
|
|
4497
4510
|
children: [
|
|
4498
|
-
de === !1 ? null : de ?? /* @__PURE__ */ G(
|
|
4511
|
+
de === !1 ? null : de ?? /* @__PURE__ */ G(xa, {
|
|
4499
4512
|
table: Ue,
|
|
4500
4513
|
enableGlobalFilter: x,
|
|
4501
4514
|
enableColumnVisibility: O,
|
|
@@ -4516,7 +4529,7 @@ function Fa(e, t) {
|
|
|
4516
4529
|
children: /* @__PURE__ */ G("div", {
|
|
4517
4530
|
ref: $e,
|
|
4518
4531
|
className: X("w-full overflow-auto", de === !1 ? "rounded-lg" : "rounded-b-lg", V && "flex-1 min-h-0"),
|
|
4519
|
-
style: V ? void 0 :
|
|
4532
|
+
style: V ? void 0 : se || _e ? { maxHeight: le } : void 0,
|
|
4520
4533
|
children: j ? /* @__PURE__ */ G(Ie, {
|
|
4521
4534
|
sensors: Ze.sensors,
|
|
4522
4535
|
collisionDetection: Ze.collisionDetection,
|
|
@@ -4531,34 +4544,34 @@ function Fa(e, t) {
|
|
|
4531
4544
|
})
|
|
4532
4545
|
}), /* @__PURE__ */ G("div", {
|
|
4533
4546
|
className: "md:hidden",
|
|
4534
|
-
children: i ? /* @__PURE__ */ G(
|
|
4547
|
+
children: i ? /* @__PURE__ */ G(Fa, { rowCount: Be.pageSize }) : J.length === 0 ? /* @__PURE__ */ G(Tr, {
|
|
4535
4548
|
size: "sm",
|
|
4536
4549
|
title: o
|
|
4537
|
-
}) : J.map((e) => /* @__PURE__ */ G(
|
|
4550
|
+
}) : J.map((e) => /* @__PURE__ */ G(Pa, {
|
|
4538
4551
|
row: e,
|
|
4539
|
-
onRowClick:
|
|
4552
|
+
onRowClick: ue
|
|
4540
4553
|
}, e.id))
|
|
4541
4554
|
})] }),
|
|
4542
|
-
L && !a && /* @__PURE__ */ G(
|
|
4555
|
+
L && !a && /* @__PURE__ */ G(_a, {
|
|
4543
4556
|
table: Ue,
|
|
4544
|
-
pageSizeOptions:
|
|
4545
|
-
locale:
|
|
4557
|
+
pageSizeOptions: ne,
|
|
4558
|
+
locale: B,
|
|
4546
4559
|
dataTestId: ve
|
|
4547
4560
|
})
|
|
4548
4561
|
]
|
|
4549
4562
|
});
|
|
4550
4563
|
}
|
|
4551
|
-
var
|
|
4552
|
-
|
|
4564
|
+
var La = a(Ia);
|
|
4565
|
+
La.displayName = "TableV2";
|
|
4553
4566
|
//#endregion
|
|
4554
4567
|
//#region src/components/Tabs/Tabs.tsx
|
|
4555
|
-
var
|
|
4556
|
-
function
|
|
4557
|
-
let e = c(
|
|
4568
|
+
var Ra = r(null);
|
|
4569
|
+
function za() {
|
|
4570
|
+
let e = c(Ra);
|
|
4558
4571
|
if (!e) throw Error("Tab components must be used inside <Tabs>");
|
|
4559
4572
|
return e;
|
|
4560
4573
|
}
|
|
4561
|
-
function
|
|
4574
|
+
function Ba(t) {
|
|
4562
4575
|
let n = [];
|
|
4563
4576
|
e.forEach(t, (e) => {
|
|
4564
4577
|
o(e) && n.push(e);
|
|
@@ -4572,9 +4585,9 @@ function za(t) {
|
|
|
4572
4585
|
}
|
|
4573
4586
|
return "";
|
|
4574
4587
|
}
|
|
4575
|
-
var
|
|
4576
|
-
let [f, p] = m(() => e ??
|
|
4577
|
-
return /* @__PURE__ */ G(
|
|
4588
|
+
var Va = 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) {
|
|
4589
|
+
let [f, p] = m(() => e ?? Ba(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
4590
|
+
return /* @__PURE__ */ G(Ra.Provider, {
|
|
4578
4591
|
value: {
|
|
4579
4592
|
value: g,
|
|
4580
4593
|
setValue: (e) => {
|
|
@@ -4593,8 +4606,8 @@ var Ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4593
4606
|
children: s
|
|
4594
4607
|
})
|
|
4595
4608
|
});
|
|
4596
|
-
}),
|
|
4597
|
-
let { variant: s } =
|
|
4609
|
+
}), Ha = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
4610
|
+
let { variant: s } = za(), c = p(null);
|
|
4598
4611
|
return /* @__PURE__ */ G("div", {
|
|
4599
4612
|
ref: Xt(o, c),
|
|
4600
4613
|
role: "tablist",
|
|
@@ -4616,12 +4629,12 @@ var Ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4616
4629
|
children: e
|
|
4617
4630
|
});
|
|
4618
4631
|
});
|
|
4619
|
-
|
|
4620
|
-
var
|
|
4632
|
+
Ha.displayName = "TabList";
|
|
4633
|
+
var Ua = {
|
|
4621
4634
|
lg: "h-11 px-4 text-p-md",
|
|
4622
4635
|
md: "h-10 px-3 text-p-std",
|
|
4623
4636
|
sm: "h-8 px-2.5 text-p-sm"
|
|
4624
|
-
},
|
|
4637
|
+
}, Wa = {
|
|
4625
4638
|
underline: {
|
|
4626
4639
|
on: "bg-brand-500 text-white",
|
|
4627
4640
|
off: "bg-bg-subtle text-fg-secondary"
|
|
@@ -4634,8 +4647,8 @@ var Ha = {
|
|
|
4634
4647
|
on: "bg-brand-500 text-white",
|
|
4635
4648
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4636
4649
|
}
|
|
4637
|
-
},
|
|
4638
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } =
|
|
4650
|
+
}, Ga = 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) {
|
|
4651
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = za(), x = $e(h, e), S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Z(u), D = X("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", Ua[v], S && "opacity-50 cursor-not-allowed"), O = _ === "underline" ? X("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? X("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : X("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"), k = /* @__PURE__ */ K("button", {
|
|
4639
4652
|
ref: m,
|
|
4640
4653
|
id: w,
|
|
4641
4654
|
type: "button",
|
|
@@ -4665,7 +4678,7 @@ var Ha = {
|
|
|
4665
4678
|
dataTestId: E("badge"),
|
|
4666
4679
|
children: i
|
|
4667
4680
|
}) : /* @__PURE__ */ G("span", {
|
|
4668
|
-
className: X("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-5", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ?
|
|
4681
|
+
className: X("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-5", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ? Wa[_].on : Wa[_].off),
|
|
4669
4682
|
children: i
|
|
4670
4683
|
})),
|
|
4671
4684
|
_ === "underline" && /* @__PURE__ */ G("span", {
|
|
@@ -4687,8 +4700,8 @@ var Ha = {
|
|
|
4687
4700
|
children: o
|
|
4688
4701
|
})]
|
|
4689
4702
|
}) : k;
|
|
4690
|
-
}),
|
|
4691
|
-
let { value: c, tabsId: l } =
|
|
4703
|
+
}), Ka = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4704
|
+
let { value: c, tabsId: l } = za(), u = $e(c, e);
|
|
4692
4705
|
return !u && !a ? null : /* @__PURE__ */ G("div", {
|
|
4693
4706
|
ref: s,
|
|
4694
4707
|
id: i ?? `${l}-panel-${e}`,
|
|
@@ -4700,7 +4713,7 @@ var Ha = {
|
|
|
4700
4713
|
...o,
|
|
4701
4714
|
children: t
|
|
4702
4715
|
});
|
|
4703
|
-
}),
|
|
4716
|
+
}), qa = 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) {
|
|
4704
4717
|
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;
|
|
4705
4718
|
return /* @__PURE__ */ K("div", {
|
|
4706
4719
|
className: X("flex flex-col gap-1.5 w-full", f),
|
|
@@ -4758,7 +4771,7 @@ var Ha = {
|
|
|
4758
4771
|
})
|
|
4759
4772
|
]
|
|
4760
4773
|
});
|
|
4761
|
-
}),
|
|
4774
|
+
}), Ja = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
4762
4775
|
let c = u(), l = n ?? c;
|
|
4763
4776
|
return /* @__PURE__ */ K("label", {
|
|
4764
4777
|
htmlFor: l,
|
|
@@ -4783,7 +4796,7 @@ var Ha = {
|
|
|
4783
4796
|
children: [/* @__PURE__ */ G(pe, {
|
|
4784
4797
|
className: "size-4 text-yellow-500 z-1",
|
|
4785
4798
|
"aria-hidden": !0
|
|
4786
|
-
}), /* @__PURE__ */ G(
|
|
4799
|
+
}), /* @__PURE__ */ G(ne, {
|
|
4787
4800
|
className: "size-4 text-gray-400 z-1",
|
|
4788
4801
|
"aria-hidden": !0
|
|
4789
4802
|
})]
|
|
@@ -4798,81 +4811,81 @@ var Ha = {
|
|
|
4798
4811
|
children: t
|
|
4799
4812
|
})]
|
|
4800
4813
|
});
|
|
4801
|
-
}),
|
|
4802
|
-
function Za(e) {
|
|
4803
|
-
return `${Xa(Math.floor(e / 60))}:${Xa(e % 60)}`;
|
|
4804
|
-
}
|
|
4814
|
+
}), Ya = 1440, Xa = 15, Za = (e) => String(e).padStart(2, "0");
|
|
4805
4815
|
function Qa(e) {
|
|
4816
|
+
return `${Za(Math.floor(e / 60))}:${Za(e % 60)}`;
|
|
4817
|
+
}
|
|
4818
|
+
function $a(e) {
|
|
4806
4819
|
let t = /^(\d{1,2}):(\d{2})$/.exec(e.trim());
|
|
4807
4820
|
if (!t) return null;
|
|
4808
4821
|
let n = Number(t[1]), r = Number(t[2]);
|
|
4809
4822
|
return n > 23 || r > 59 ? null : n * 60 + r;
|
|
4810
4823
|
}
|
|
4811
|
-
function $a(e) {
|
|
4812
|
-
if (e == null) return null;
|
|
4813
|
-
let t = Qa(e);
|
|
4814
|
-
return t === null ? null : Za(t);
|
|
4815
|
-
}
|
|
4816
4824
|
function eo(e) {
|
|
4817
|
-
|
|
4825
|
+
if (e == null) return null;
|
|
4826
|
+
let t = $a(e);
|
|
4827
|
+
return t === null ? null : Qa(t);
|
|
4818
4828
|
}
|
|
4819
4829
|
function to(e) {
|
|
4820
|
-
|
|
4821
|
-
|
|
4830
|
+
return e !== void 0 && Number.isFinite(e) && e >= 1 && e <= Ya ? Math.floor(e) : Xa;
|
|
4831
|
+
}
|
|
4832
|
+
function no(e) {
|
|
4833
|
+
let t = to(e), n = [];
|
|
4834
|
+
for (let e = 0; e < Ya; e += t) n.push(Qa(e));
|
|
4822
4835
|
return n;
|
|
4823
4836
|
}
|
|
4824
|
-
function
|
|
4825
|
-
let i =
|
|
4837
|
+
function ro({ minTime: e, maxTime: t, excludeTimes: n, filterTime: r }) {
|
|
4838
|
+
let i = eo(e), a = eo(t), o = new Set((n ?? []).map(eo).filter((e) => e !== null));
|
|
4826
4839
|
return (e) => i !== null && e < i || a !== null && e > a || o.has(e) || (r ? !r(e) : !1);
|
|
4827
4840
|
}
|
|
4828
|
-
var
|
|
4829
|
-
function
|
|
4841
|
+
var io = (e) => e !== void 0 && Number(e) <= 5;
|
|
4842
|
+
function ao(e) {
|
|
4830
4843
|
let t = e.trim().replace(".", ":");
|
|
4831
|
-
return /^\d{1,2}:\d{2}$/.test(t) ?
|
|
4844
|
+
return /^\d{1,2}:\d{2}$/.test(t) ? eo(t) : /^\d{3}$/.test(t) ? io(t[1]) ? eo(`${t[0]}:${t.slice(1)}`) : null : /^\d{4}$/.test(t) ? eo(`${t.slice(0, 2)}:${t.slice(2)}`) : null;
|
|
4832
4845
|
}
|
|
4833
|
-
function
|
|
4846
|
+
function oo(e) {
|
|
4834
4847
|
return e.ctrlKey || e.metaKey || e.altKey || e.key.length > 1 ? !0 : /[\d:]/.test(e.key);
|
|
4835
4848
|
}
|
|
4836
|
-
function
|
|
4849
|
+
function so(e) {
|
|
4837
4850
|
let t = e.trim().replace(".", ":");
|
|
4838
4851
|
if (t === "") return "";
|
|
4839
|
-
let n =
|
|
4852
|
+
let n = ao(t);
|
|
4840
4853
|
if (n) return n;
|
|
4841
4854
|
let r = /^(\d{1,2}):(\d?)$/.exec(t);
|
|
4842
4855
|
if (r) {
|
|
4843
4856
|
let e = Number(r[1]), t = r[2] ?? "";
|
|
4844
|
-
return e > 23 || t !== "" && !
|
|
4857
|
+
return e > 23 || t !== "" && !io(t) ? null : `${Za(e)}:${t}`;
|
|
4845
4858
|
}
|
|
4846
|
-
return /^\d{1,3}$/.test(t) ? t.length === 1 ? Number(t) <= 2 ? t : `0${t}` : t.length === 2 ? Number(t) <= 23 ? `${t}:` :
|
|
4859
|
+
return /^\d{1,3}$/.test(t) ? t.length === 1 ? Number(t) <= 2 ? t : `0${t}` : t.length === 2 ? Number(t) <= 23 ? `${t}:` : io(t[1]) ? `0${t[0]}:${t[1]}` : null : Number(t.slice(0, 2)) <= 23 && io(t[2]) ? `${t.slice(0, 2)}:${t[2]}` : null : null;
|
|
4847
4860
|
}
|
|
4848
|
-
function
|
|
4849
|
-
let n =
|
|
4861
|
+
function co(e, t) {
|
|
4862
|
+
let n = so(t);
|
|
4850
4863
|
return n !== null && e.startsWith(n);
|
|
4851
4864
|
}
|
|
4852
|
-
function
|
|
4853
|
-
let n =
|
|
4865
|
+
function lo(e, t = /* @__PURE__ */ new Date()) {
|
|
4866
|
+
let n = $a(e);
|
|
4854
4867
|
if (n === null) throw RangeError(`timeToDate: "${e}" is not a valid HH:mm time`);
|
|
4855
4868
|
let r = new Date(t.getTime());
|
|
4856
4869
|
return r.setHours(Math.floor(n / 60), n % 60, 0, 0), r;
|
|
4857
4870
|
}
|
|
4858
|
-
function
|
|
4859
|
-
return `${
|
|
4871
|
+
function uo(e) {
|
|
4872
|
+
return `${Za(e.getHours())}:${Za(e.getMinutes())}`;
|
|
4860
4873
|
}
|
|
4861
4874
|
//#endregion
|
|
4862
4875
|
//#region src/components/TimePicker/TimePickerDesktop.tsx
|
|
4863
|
-
function
|
|
4876
|
+
function fo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, searchable: a = !0, size: o = "md", label: s, required: c = !1, helperText: l, placeholder: u = "Select time", disabled: d = !1, menuPlacement: p = "auto", error: h = !1, errorText: g, id: _, className: v, dataTestId: y }) {
|
|
4864
4877
|
let b = f(() => n.map((e) => ({
|
|
4865
4878
|
value: e,
|
|
4866
4879
|
label: e,
|
|
4867
4880
|
disabled: r(e)
|
|
4868
4881
|
})), [n, r]), x = f(() => new Set(n), [n]), S = (e) => {
|
|
4869
|
-
let t =
|
|
4882
|
+
let t = ao(e);
|
|
4870
4883
|
return t && !x.has(t) && !r(t) ? t : null;
|
|
4871
4884
|
}, [C, w] = m(null), T = a && !d, E = T ? C ?? e ?? "" : "", D = (n) => {
|
|
4872
|
-
let i =
|
|
4885
|
+
let i = ao(n.target.value);
|
|
4873
4886
|
i && !r(i) && i !== e && t(i);
|
|
4874
4887
|
}, k = (e) => {
|
|
4875
|
-
if (!
|
|
4888
|
+
if (!oo(e)) {
|
|
4876
4889
|
e.preventDefault();
|
|
4877
4890
|
return;
|
|
4878
4891
|
}
|
|
@@ -4883,15 +4896,15 @@ function uo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, sear
|
|
|
4883
4896
|
e.key === "Home" ? e.shiftKey ? t.setSelectionRange(0, t.selectionEnd ?? n, "backward") : t.setSelectionRange(0, 0) : e.shiftKey ? t.setSelectionRange(t.selectionStart ?? 0, n, "forward") : t.setSelectionRange(n, n);
|
|
4884
4897
|
}
|
|
4885
4898
|
}, A = (t) => t === e ? "" : t;
|
|
4886
|
-
return /* @__PURE__ */ G(
|
|
4899
|
+
return /* @__PURE__ */ G(Fi, {
|
|
4887
4900
|
options: b,
|
|
4888
4901
|
value: e,
|
|
4889
4902
|
onChange: (e) => {
|
|
4890
|
-
w(null), t(e == null ? null :
|
|
4903
|
+
w(null), t(e == null ? null : eo(String(e)) ?? ao(String(e)));
|
|
4891
4904
|
},
|
|
4892
4905
|
inputValue: T ? E : void 0,
|
|
4893
4906
|
onInputChange: T ? (e, t) => w(t.action === "input-change" ? e : null) : void 0,
|
|
4894
|
-
filterOption: (e, t) => e.data.__isNew__ === !0 ||
|
|
4907
|
+
filterOption: (e, t) => e.data.__isNew__ === !0 || co(e.value, A(t)),
|
|
4895
4908
|
dropdownIcon: /* @__PURE__ */ G(O, {
|
|
4896
4909
|
className: "h-4 w-4",
|
|
4897
4910
|
"aria-hidden": !0
|
|
@@ -4921,30 +4934,30 @@ function uo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, sear
|
|
|
4921
4934
|
}
|
|
4922
4935
|
//#endregion
|
|
4923
4936
|
//#region src/components/TimePicker/TimePickerMobile.tsx
|
|
4924
|
-
var
|
|
4937
|
+
var po = {
|
|
4925
4938
|
lg: "min-h-12 px-3.5 text-p-md",
|
|
4926
4939
|
md: "min-h-10 px-3 text-p-std",
|
|
4927
4940
|
sm: "min-h-8 px-2.5 text-p-sm"
|
|
4928
|
-
},
|
|
4929
|
-
optionItem: X(
|
|
4941
|
+
}, mo = Array.from({ length: 24 }, (e, t) => Za(t)), ho = Array.from({ length: 60 }, (e, t) => Za(t)), go = "text-p-md font-medium text-fg-tertiary data-[disabled]:opacity-40", _o = "text-p-lg font-semibold text-fg-default data-[disabled]:opacity-40", vo = {
|
|
4942
|
+
optionItem: X(go, "justify-end pr-5"),
|
|
4930
4943
|
highlightWrapper: "bg-bg-subtle rounded-l-lg",
|
|
4931
|
-
highlightItem: X(
|
|
4932
|
-
},
|
|
4933
|
-
optionItem: X(
|
|
4944
|
+
highlightItem: X(_o, "justify-end pr-5")
|
|
4945
|
+
}, yo = {
|
|
4946
|
+
optionItem: X(go, "justify-start pl-5"),
|
|
4934
4947
|
highlightWrapper: "bg-bg-subtle rounded-r-lg",
|
|
4935
|
-
highlightItem: X(
|
|
4948
|
+
highlightItem: X(_o, "justify-start pl-5")
|
|
4936
4949
|
};
|
|
4937
|
-
function
|
|
4938
|
-
let x = u(), S = v ?? x, C = Z(b), w = p || !!h, [T, E] = m(!1), [D, k] = m("00"), [A, j] = m("00"), M = (e, t) => !r(`${e}:${t}`), N = f(() =>
|
|
4950
|
+
function bo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size: a = "md", label: o, required: s = !1, helperText: c, placeholder: l = "Select time", disabled: d = !1, error: p = !1, errorText: h, mobileTitle: g, mobileApplyText: _ = "Apply", id: v, className: y, dataTestId: b }) {
|
|
4951
|
+
let x = u(), S = v ?? x, C = Z(b), w = p || !!h, [T, E] = m(!1), [D, k] = m("00"), [A, j] = m("00"), M = (e, t) => !r(`${e}:${t}`), N = f(() => mo.map((e) => ({
|
|
4939
4952
|
value: e,
|
|
4940
4953
|
label: e,
|
|
4941
|
-
disabled: !
|
|
4942
|
-
})), [r]), ee = f(() =>
|
|
4954
|
+
disabled: !ho.some((t) => !r(`${e}:${t}`))
|
|
4955
|
+
})), [r]), ee = f(() => ho.map((e) => ({
|
|
4943
4956
|
value: e,
|
|
4944
4957
|
label: e,
|
|
4945
4958
|
disabled: r(`${D}:${e}`)
|
|
4946
|
-
})), [D, r]), te = (e) =>
|
|
4947
|
-
let t =
|
|
4959
|
+
})), [D, r]), te = (e) => ho.find((t) => M(e, t)), P = () => {
|
|
4960
|
+
let t = uo(/* @__PURE__ */ new Date()), [i = "00", a = "00"] = (e ?? (r(t) ? n.find((e) => !r(e)) ?? t : t)).split(":");
|
|
4948
4961
|
k(i), j(a), E(!0);
|
|
4949
4962
|
}, F = (e) => {
|
|
4950
4963
|
k(e), M(e, A) || j(te(e) ?? A);
|
|
@@ -4968,7 +4981,7 @@ function yo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
4968
4981
|
"aria-describedby": h ? `${S}-error` : c ? `${S}-help` : void 0,
|
|
4969
4982
|
"data-test-id": C("trigger"),
|
|
4970
4983
|
onClick: P,
|
|
4971
|
-
className: X("flex w-full items-center justify-between gap-2 rounded-lg border bg-bg-default text-left transition-colors", "focus-visible:outline-none",
|
|
4984
|
+
className: X("flex w-full items-center justify-between gap-2 rounded-lg border bg-bg-default text-left transition-colors", "focus-visible:outline-none", po[a], w ? "border-red-600" : "border-border-default", !d && !w && "hover:border-border-strong", T && !w && "ring-2 ring-brand-300 border-brand-500", !w && "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "focus-visible:ring-2 focus-visible:ring-red-300", d && "cursor-not-allowed border-border-default bg-bg-container hover:border-border-default", y),
|
|
4972
4985
|
children: [/* @__PURE__ */ G("span", {
|
|
4973
4986
|
className: X("truncate tabular-nums", e ? "text-fg-default" : "text-fg-tertiary"),
|
|
4974
4987
|
children: e ?? l
|
|
@@ -5022,13 +5035,13 @@ function yo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
5022
5035
|
onValueChange: F,
|
|
5023
5036
|
options: N,
|
|
5024
5037
|
infinite: !0,
|
|
5025
|
-
classNames:
|
|
5038
|
+
classNames: vo
|
|
5026
5039
|
}), /* @__PURE__ */ G(Y, {
|
|
5027
5040
|
value: A,
|
|
5028
5041
|
onValueChange: j,
|
|
5029
5042
|
options: ee,
|
|
5030
5043
|
infinite: !0,
|
|
5031
|
-
classNames:
|
|
5044
|
+
classNames: yo
|
|
5032
5045
|
})]
|
|
5033
5046
|
})
|
|
5034
5047
|
})
|
|
@@ -5038,10 +5051,10 @@ function yo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
5038
5051
|
}
|
|
5039
5052
|
//#endregion
|
|
5040
5053
|
//#region src/components/TimePicker/TimePicker.tsx
|
|
5041
|
-
var
|
|
5042
|
-
let g = nr(), _ = c ?? g, [v, y] = m(() =>
|
|
5054
|
+
var xo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 15, minTime: i, maxTime: a, excludeTimes: o, filterTime: s, mobile: c, fullWidth: l = !1, clearable: u = !0, wrapperClassName: d, ...p }, h) {
|
|
5055
|
+
let g = nr(), _ = c ?? g, [v, y] = m(() => eo(t)), b = e !== void 0, x = b ? eo(e) : v, S = (e) => {
|
|
5043
5056
|
b || y(e), n?.(e);
|
|
5044
|
-
}, C =
|
|
5057
|
+
}, C = to(r), w = f(() => no(C), [C]), T = o?.join(","), E = f(() => ro({
|
|
5045
5058
|
minTime: i,
|
|
5046
5059
|
maxTime: a,
|
|
5047
5060
|
excludeTimes: T ? T.split(",") : void 0,
|
|
@@ -5062,84 +5075,84 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5062
5075
|
return /* @__PURE__ */ G("div", {
|
|
5063
5076
|
ref: h,
|
|
5064
5077
|
className: X(l ? "w-full" : "w-fit min-w-[260px]", d),
|
|
5065
|
-
children: G(_ ?
|
|
5078
|
+
children: G(_ ? bo : fo, { ...D })
|
|
5066
5079
|
});
|
|
5067
|
-
}),
|
|
5080
|
+
}), So = {
|
|
5068
5081
|
lg: "px-3 py-2 text-p-std",
|
|
5069
5082
|
sm: "px-2 py-1 text-p-sm"
|
|
5070
|
-
},
|
|
5083
|
+
}, Co = {
|
|
5071
5084
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5072
5085
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
5073
5086
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
5074
5087
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
5075
|
-
},
|
|
5088
|
+
}, wo = {
|
|
5076
5089
|
top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
|
|
5077
5090
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
|
|
5078
5091
|
left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
|
|
5079
5092
|
right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
|
|
5080
|
-
},
|
|
5093
|
+
}, To = {
|
|
5081
5094
|
top: "border-t-fg-default border-x-transparent border-b-transparent",
|
|
5082
5095
|
bottom: "border-b-fg-default border-x-transparent border-t-transparent",
|
|
5083
5096
|
left: "border-l-fg-default border-y-transparent border-r-transparent",
|
|
5084
5097
|
right: "border-r-fg-default border-y-transparent border-l-transparent"
|
|
5085
|
-
},
|
|
5086
|
-
let [f, h] = m(!1), [g, _] = m(null), v = p(null), y = p(null), b = u(), { style:
|
|
5098
|
+
}, Eo = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, portalTarget: s, className: c, dataTestId: l }, d) {
|
|
5099
|
+
let [f, h] = m(!1), [g, _] = m(null), v = p(null), y = p(null), b = u(), x = Qt(), S = s === void 0 ? x : s, { style: C, arrowStyle: w, resolvedSide: T } = tn({
|
|
5087
5100
|
anchor: y,
|
|
5088
5101
|
panel: g,
|
|
5089
|
-
open: f && !!
|
|
5102
|
+
open: f && !!S,
|
|
5090
5103
|
side: r,
|
|
5091
5104
|
offset: 8
|
|
5092
|
-
}),
|
|
5105
|
+
}), E = () => {
|
|
5093
5106
|
v.current && clearTimeout(v.current), v.current = setTimeout(() => h(!0), a);
|
|
5094
|
-
},
|
|
5107
|
+
}, D = () => {
|
|
5095
5108
|
v.current && clearTimeout(v.current), h(!1);
|
|
5096
5109
|
};
|
|
5097
5110
|
if (!o(t)) return t;
|
|
5098
|
-
let
|
|
5099
|
-
onMouseEnter:
|
|
5100
|
-
onMouseLeave:
|
|
5101
|
-
onFocus:
|
|
5102
|
-
onBlur:
|
|
5103
|
-
"aria-describedby": f ? b :
|
|
5104
|
-
}),
|
|
5105
|
-
ref:
|
|
5111
|
+
let O = t.props ?? {}, k = n(t, {
|
|
5112
|
+
onMouseEnter: E,
|
|
5113
|
+
onMouseLeave: D,
|
|
5114
|
+
onFocus: E,
|
|
5115
|
+
onBlur: D,
|
|
5116
|
+
"aria-describedby": f ? b : O["aria-describedby"]
|
|
5117
|
+
}), A = /* @__PURE__ */ K("span", {
|
|
5118
|
+
ref: S ? _ : void 0,
|
|
5106
5119
|
role: "tooltip",
|
|
5107
5120
|
id: b,
|
|
5108
|
-
style:
|
|
5109
|
-
className: X("z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none",
|
|
5110
|
-
children: [e,
|
|
5121
|
+
style: S ? C : void 0,
|
|
5122
|
+
className: X("z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", So[i], !S && ["absolute", Co[r]], c),
|
|
5123
|
+
children: [e, S ? /* @__PURE__ */ G("span", {
|
|
5111
5124
|
"aria-hidden": !0,
|
|
5112
|
-
style:
|
|
5113
|
-
className: X("absolute h-0 w-0 border-4",
|
|
5125
|
+
style: w,
|
|
5126
|
+
className: X("absolute h-0 w-0 border-4", To[T])
|
|
5114
5127
|
}) : /* @__PURE__ */ G("span", {
|
|
5115
5128
|
"aria-hidden": !0,
|
|
5116
|
-
className: X("absolute h-0 w-0 border-4",
|
|
5129
|
+
className: X("absolute h-0 w-0 border-4", wo[r])
|
|
5117
5130
|
})]
|
|
5118
5131
|
});
|
|
5119
5132
|
return /* @__PURE__ */ K("span", {
|
|
5120
5133
|
ref: Xt(d, y),
|
|
5121
5134
|
"data-test-id": l,
|
|
5122
|
-
className: X("inline-flex", !
|
|
5123
|
-
children: [
|
|
5135
|
+
className: X("inline-flex", !S && "relative"),
|
|
5136
|
+
children: [k, f && (S ? be(A, S) : A)]
|
|
5124
5137
|
});
|
|
5125
|
-
}),
|
|
5138
|
+
}), Do = "We'll be back soon", Oo = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", ko = {
|
|
5126
5139
|
lg: "xl",
|
|
5127
5140
|
sm: "lg"
|
|
5128
|
-
},
|
|
5141
|
+
}, Ao = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
5129
5142
|
return /* @__PURE__ */ G(Tr, {
|
|
5130
5143
|
ref: a,
|
|
5131
5144
|
size: e,
|
|
5132
|
-
title: t ??
|
|
5133
|
-
description: n ??
|
|
5145
|
+
title: t ?? Do,
|
|
5146
|
+
description: n ?? Oo,
|
|
5134
5147
|
illustration: r ?? /* @__PURE__ */ G(An, {
|
|
5135
5148
|
icon: A,
|
|
5136
5149
|
tone: "brand",
|
|
5137
5150
|
shape: "circle",
|
|
5138
|
-
size:
|
|
5151
|
+
size: ko[e]
|
|
5139
5152
|
}),
|
|
5140
5153
|
...i
|
|
5141
5154
|
});
|
|
5142
|
-
}),
|
|
5155
|
+
}), jo = {
|
|
5143
5156
|
900: "#31531C",
|
|
5144
5157
|
800: "#416E26",
|
|
5145
5158
|
700: "#518A2F",
|
|
@@ -5165,7 +5178,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5165
5178
|
100: "#f2f5f8",
|
|
5166
5179
|
50: "#f5f7fa",
|
|
5167
5180
|
20: "#f7f9fc"
|
|
5168
|
-
},
|
|
5181
|
+
}, Mo = "#FEFEFE", No = {
|
|
5169
5182
|
900: "#0b4627",
|
|
5170
5183
|
800: "#0f5c33",
|
|
5171
5184
|
700: "#3D8B46",
|
|
@@ -5176,7 +5189,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5176
5189
|
200: "#aeeacb",
|
|
5177
5190
|
100: "#d0f5e1",
|
|
5178
5191
|
50: "#e0faec"
|
|
5179
|
-
},
|
|
5192
|
+
}, Po = {
|
|
5180
5193
|
900: "#2443B8",
|
|
5181
5194
|
800: "#2E63D6",
|
|
5182
5195
|
700: "#3475E8",
|
|
@@ -5187,7 +5200,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5187
5200
|
200: "#9ACAFA",
|
|
5188
5201
|
100: "#C1DEFC",
|
|
5189
5202
|
50: "#E6F2FE"
|
|
5190
|
-
},
|
|
5203
|
+
}, Fo = {
|
|
5191
5204
|
900: "#081FA6",
|
|
5192
5205
|
800: "#0E2AB2",
|
|
5193
5206
|
700: "#2431B9",
|
|
@@ -5199,7 +5212,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5199
5212
|
100: "#CBC4ED",
|
|
5200
5213
|
50: "#EAE7F7",
|
|
5201
5214
|
20: "#F5F3FB"
|
|
5202
|
-
},
|
|
5215
|
+
}, Io = {
|
|
5203
5216
|
900: "#4A0A20",
|
|
5204
5217
|
800: "#79012F",
|
|
5205
5218
|
700: "#A2023F",
|
|
@@ -5210,7 +5223,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5210
5223
|
200: "#FE7DAF",
|
|
5211
5224
|
100: "#FEA8C9",
|
|
5212
5225
|
50: "#FFD4E4"
|
|
5213
|
-
},
|
|
5226
|
+
}, Lo = {
|
|
5214
5227
|
900: "#8b1822",
|
|
5215
5228
|
800: "#ad1f2b",
|
|
5216
5229
|
700: "#d02533",
|
|
@@ -5222,7 +5235,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5222
5235
|
100: "#ffd5d8",
|
|
5223
5236
|
50: "#ffebec",
|
|
5224
5237
|
20: "#fff4f4"
|
|
5225
|
-
},
|
|
5238
|
+
}, Ro = {
|
|
5226
5239
|
900: "#EB7520",
|
|
5227
5240
|
800: "#ED912A",
|
|
5228
5241
|
700: "#EEA02F",
|
|
@@ -5233,47 +5246,47 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5233
5246
|
200: "#F7DE8E",
|
|
5234
5247
|
100: "#FAEBB9",
|
|
5235
5248
|
50: "#FDF7E4"
|
|
5236
|
-
}, Ro = {
|
|
5237
|
-
brand: Ao,
|
|
5238
|
-
gray: $,
|
|
5239
|
-
green: Mo,
|
|
5240
|
-
blue: No,
|
|
5241
|
-
purple: Po,
|
|
5242
|
-
pink: Fo,
|
|
5243
|
-
red: Io,
|
|
5244
|
-
yellow: Lo
|
|
5245
5249
|
}, zo = {
|
|
5246
|
-
|
|
5250
|
+
brand: jo,
|
|
5251
|
+
gray: $,
|
|
5252
|
+
green: No,
|
|
5253
|
+
blue: Po,
|
|
5254
|
+
purple: Fo,
|
|
5255
|
+
pink: Io,
|
|
5256
|
+
red: Lo,
|
|
5257
|
+
yellow: Ro
|
|
5258
|
+
}, Bo = {
|
|
5259
|
+
bgDefault: Mo,
|
|
5247
5260
|
bgContainer: $[50],
|
|
5248
5261
|
bgSubtle: $[100],
|
|
5249
|
-
bgBrandLighter:
|
|
5250
|
-
bgInfoLighter:
|
|
5251
|
-
bgSuccessLighter:
|
|
5252
|
-
bgWarningLighter:
|
|
5253
|
-
bgDangerLighter:
|
|
5262
|
+
bgBrandLighter: jo[20],
|
|
5263
|
+
bgInfoLighter: Po[50],
|
|
5264
|
+
bgSuccessLighter: No[50],
|
|
5265
|
+
bgWarningLighter: Ro[50],
|
|
5266
|
+
bgDangerLighter: Lo[50],
|
|
5254
5267
|
fgDefault: $[900],
|
|
5255
5268
|
fgSecondary: $[600],
|
|
5256
5269
|
fgTertiary: $[500],
|
|
5257
5270
|
fgDisabled: $[400],
|
|
5258
|
-
fgInverse:
|
|
5259
|
-
fgBrand:
|
|
5260
|
-
fgInfo:
|
|
5261
|
-
fgSuccess:
|
|
5262
|
-
fgWarning:
|
|
5263
|
-
fgDanger:
|
|
5271
|
+
fgInverse: Mo,
|
|
5272
|
+
fgBrand: jo[500],
|
|
5273
|
+
fgInfo: Po[600],
|
|
5274
|
+
fgSuccess: No[600],
|
|
5275
|
+
fgWarning: Ro[800],
|
|
5276
|
+
fgDanger: Lo[600],
|
|
5264
5277
|
borderDefault: $[200],
|
|
5265
5278
|
borderSubtle: $[100],
|
|
5266
5279
|
borderStrong: $[300],
|
|
5267
|
-
borderBrand:
|
|
5280
|
+
borderBrand: jo[500],
|
|
5268
5281
|
iconPrimary: $[900],
|
|
5269
5282
|
iconSecondary: $[600],
|
|
5270
|
-
iconInverse:
|
|
5271
|
-
iconBrand:
|
|
5272
|
-
iconInfo:
|
|
5273
|
-
iconDanger:
|
|
5274
|
-
iconWarning:
|
|
5275
|
-
},
|
|
5276
|
-
...
|
|
5283
|
+
iconInverse: Mo,
|
|
5284
|
+
iconBrand: jo[500],
|
|
5285
|
+
iconInfo: Po[600],
|
|
5286
|
+
iconDanger: Lo[800],
|
|
5287
|
+
iconWarning: Ro[800]
|
|
5288
|
+
}, Vo = {
|
|
5289
|
+
...Bo,
|
|
5277
5290
|
bgDefault: "#0B1120",
|
|
5278
5291
|
bgContainer: "#0F172A",
|
|
5279
5292
|
bgSubtle: "#121C30",
|
|
@@ -5282,17 +5295,17 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5282
5295
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
5283
5296
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
5284
5297
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
5285
|
-
fgDefault:
|
|
5298
|
+
fgDefault: Mo,
|
|
5286
5299
|
fgSecondary: $[400],
|
|
5287
5300
|
fgTertiary: $[500],
|
|
5288
5301
|
fgDisabled: $[600],
|
|
5289
|
-
fgDanger:
|
|
5302
|
+
fgDanger: Lo[600],
|
|
5290
5303
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
5291
5304
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
5292
5305
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
5293
|
-
iconPrimary:
|
|
5306
|
+
iconPrimary: Mo,
|
|
5294
5307
|
iconSecondary: $[400]
|
|
5295
|
-
},
|
|
5308
|
+
}, Ho = {
|
|
5296
5309
|
ps: [
|
|
5297
5310
|
"Noto Sans Armenian",
|
|
5298
5311
|
"Noto Sans",
|
|
@@ -5307,7 +5320,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5307
5320
|
"system-ui",
|
|
5308
5321
|
"sans-serif"
|
|
5309
5322
|
]
|
|
5310
|
-
},
|
|
5323
|
+
}, Uo = {
|
|
5311
5324
|
xl: {
|
|
5312
5325
|
fontSize: "64px",
|
|
5313
5326
|
lineHeight: "72px"
|
|
@@ -5332,7 +5345,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5332
5345
|
fontSize: "24px",
|
|
5333
5346
|
lineHeight: "32px"
|
|
5334
5347
|
}
|
|
5335
|
-
},
|
|
5348
|
+
}, Wo = {
|
|
5336
5349
|
lg: {
|
|
5337
5350
|
fontSize: "20px",
|
|
5338
5351
|
lineHeight: "28px"
|
|
@@ -5353,7 +5366,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5353
5366
|
fontSize: "10px",
|
|
5354
5367
|
lineHeight: "14px"
|
|
5355
5368
|
}
|
|
5356
|
-
},
|
|
5369
|
+
}, Go = {
|
|
5357
5370
|
lg: {
|
|
5358
5371
|
fontSize: "20px",
|
|
5359
5372
|
lineHeight: "28px"
|
|
@@ -5378,19 +5391,19 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5378
5391
|
fontSize: "6px",
|
|
5379
5392
|
lineHeight: "6px"
|
|
5380
5393
|
}
|
|
5381
|
-
}, Go = {
|
|
5382
|
-
headline: Ho,
|
|
5383
|
-
paragraph: Uo,
|
|
5384
|
-
label: Wo
|
|
5385
5394
|
}, Ko = {
|
|
5395
|
+
headline: Uo,
|
|
5396
|
+
paragraph: Wo,
|
|
5397
|
+
label: Go
|
|
5398
|
+
}, qo = {
|
|
5386
5399
|
sm: "2rem",
|
|
5387
5400
|
md: "2.5rem",
|
|
5388
5401
|
lg: "3rem"
|
|
5389
|
-
},
|
|
5402
|
+
}, Jo = {
|
|
5390
5403
|
sm: "0.875rem",
|
|
5391
5404
|
md: "1rem",
|
|
5392
5405
|
lg: "1.25rem"
|
|
5393
|
-
},
|
|
5406
|
+
}, Yo = {
|
|
5394
5407
|
xs: "2px",
|
|
5395
5408
|
sm: "4px",
|
|
5396
5409
|
md: "8px",
|
|
@@ -5399,7 +5412,7 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5399
5412
|
"2xl": "20px",
|
|
5400
5413
|
"3xl": "24px",
|
|
5401
5414
|
full: "9999px"
|
|
5402
|
-
},
|
|
5415
|
+
}, Xo = {
|
|
5403
5416
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
5404
5417
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
5405
5418
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -5407,6 +5420,6 @@ var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5407
5420
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5408
5421
|
};
|
|
5409
5422
|
//#endregion
|
|
5410
|
-
export { rt as Accordion, it as AccordionItem, Tt as Avatar, Et as AvatarGroup, It as Badge, zt as Breadcrumb, ut as Button, Vt as ButtonGroup, Wt as Card, Kt as CardGroup, Yt as Checkbox, an as Copy, pn as Counter, Dn as DatePicker, Rn as DeviceRestriction, Hn as DistributionBar, Qe as Divider, fr as Drawer, yr as DropdownContent, br as DropdownItem, Sr as DropdownLabel, gr as DropdownMenu, xr as DropdownSeparator, _r as DropdownTrigger, Tr as Empty, Or as Filter, kr as FormContainer, Ar as FormField, An as IconTile, jr as InfoField, Nr as InlineAlert, dn as Input, Pr as Link, Ir as Modal, Vr as NotificationBadge, Gr as Pagination, Jr as PersonCard, rn as Popover, $r as Progress, ii as Radio, ti as RadioGroup, ai as ReadMore,
|
|
5423
|
+
export { rt as Accordion, it as AccordionItem, Tt as Avatar, Et as AvatarGroup, It as Badge, zt as Breadcrumb, ut as Button, Vt as ButtonGroup, Wt as Card, Kt as CardGroup, Yt as Checkbox, an as Copy, pn as Counter, Dn as DatePicker, Rn as DeviceRestriction, Hn as DistributionBar, Qe as Divider, fr as Drawer, yr as DropdownContent, br as DropdownItem, Sr as DropdownLabel, gr as DropdownMenu, xr as DropdownSeparator, _r as DropdownTrigger, Tr as Empty, Or as Filter, kr as FormContainer, Ar as FormField, An as IconTile, jr as InfoField, Nr as InlineAlert, dn as Input, Pr as Link, Ir as Modal, Vr as NotificationBadge, Gr as Pagination, Jr as PersonCard, rn as Popover, $r as Progress, ii as Radio, ti as RadioGroup, ai as ReadMore, Fi as SelectV2, Ri as Sidebar, zi as SidebarItem, Ui as Skeleton, Yi as SnackbarProvider, $i as Status, da as StepIndicator, ma as Switch, Ga as Tab, Ha as TabList, Ka as TabPanel, La as TableV2, ha as TableV2ColumnFilter, ba as TableV2ColumnVisibilityMenu, _a as TableV2Pagination, Ta as TableV2RowActionsMenu, va as TableV2Skeleton, xa as TableV2Toolbar, Va as Tabs, Fn as Text, qa as TextArea, Ja as ThemeSwitch, xo as TimePicker, Eo as Tooltip, Ao as UnderConstruction, ht as Upload, _t as UploadItem, Po as blue, jo as brand, X as cn, zo as colorPrimitives, qo as controlHeight, ka as createRowActionsColumn, Oa as createSelectionColumn, Vo as darkTheme, uo as dateToTime, Ho as fontFamily, Aa as getPinnedStyles, $ as gray, No as green, Uo as headline, Jo as iconSize, Go as label, Bo as lightTheme, Wo as paragraph, Io as pink, Fo as purple, Yo as radius, Lo as red, Xo as shadows, lo as timeToDate, Ko as typography, Zn as useEscapeKey, Se as useFieldArray, ir as useFormContext, sr as useFormProps, er as useHideBodyScroll, nr as useIsMobile, Xn as useOnOutsideClick, Ji as useSnackbar, qn as useStepper, mt as validateSingleFile, Mo as white, Ro as yellow };
|
|
5411
5424
|
|
|
5412
5425
|
//# sourceMappingURL=index.js.map
|