@dinofront/design_system 1.19.3-alpha.0 → 1.19.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +4 -4
- package/dist/components/Popover/Popover.types.d.ts +1 -1
- package/dist/index.js +524 -563
- package/dist/index.js.map +1 -1
- package/dist/lib/PortalContext.d.ts +10 -0
- package/dist/lib/useFloatingPosition.d.ts +7 -2
- package/dist/styles.css +3 -0
- package/package.json +1 -1
- package/dist/lib/useAnchoredPosition.d.ts +0 -31
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, createContext as r, createElement as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
2
|
-
import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as A, Download as j, EyeOff as M, File as ee, GripVertical as te, Info as N, Loader2 as
|
|
2
|
+
import { AlertCircle as h, AlertTriangle as g, ArrowDown as _, ArrowUp as v, Calendar as y, Check as b, CheckCircle2 as x, ChevronDown as S, ChevronLeft as C, ChevronRight as w, ChevronsUpDown as T, CircleCheck as E, CircleX as D, Columns3 as O, Construction as k, Copy as A, Download as j, EyeOff as M, File as ee, GripVertical as te, Info as N, Loader2 as P, Menu as F, Minus as I, Monitor as L, Moon as R, MoreHorizontal as z, MoreVertical as ne, Paperclip as re, Pencil as ie, Pin as ae, PinOff as oe, Plus as se, RefreshCw as B, Search as ce, SearchX as le, Smartphone as ue, Sparkles as V, Sun as de, Tablet as fe, TabletSmartphone as pe, Trash2 as me, UploadCloud as H, User as he, X as U, XCircle as W } from "lucide-react";
|
|
3
3
|
import { clsx as G } from "clsx";
|
|
4
4
|
import { extendTailwindMerge as ge } from "tailwind-merge";
|
|
5
5
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as _e } from "react-dom";
|
|
7
7
|
import { Controller as ve, useFieldArray as ye, useForm as be } from "react-hook-form";
|
|
8
8
|
import { yupResolver as xe } from "@hookform/resolvers/yup";
|
|
9
|
-
import Se, { components as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useVirtualizer as
|
|
14
|
-
import { flexRender as
|
|
15
|
-
import { DndContext as
|
|
16
|
-
import { SortableContext as
|
|
9
|
+
import Se, { components as Y } from "react-select";
|
|
10
|
+
import Ce from "react-select/async";
|
|
11
|
+
import we from "react-select/creatable";
|
|
12
|
+
import Te from "react-select/async-creatable";
|
|
13
|
+
import { useVirtualizer as Ee } from "@tanstack/react-virtual";
|
|
14
|
+
import { flexRender as De, getCoreRowModel as Oe, getFilteredRowModel as ke, getPaginationRowModel as Ae, getSortedRowModel as je, useReactTable as Me } from "@tanstack/react-table";
|
|
15
|
+
import { DndContext as Ne, KeyboardSensor as Pe, PointerSensor as Fe, closestCenter as Ie, useSensor as Le, useSensors as Re } from "@dnd-kit/core";
|
|
16
|
+
import { SortableContext as ze, arrayMove as Be, horizontalListSortingStrategy as X, sortableKeyboardCoordinates as Z, useSortable as Ve } from "@dnd-kit/sortable";
|
|
17
17
|
import { CSS as He } from "@dnd-kit/utilities";
|
|
18
18
|
//#region src/lib/cn.ts
|
|
19
19
|
var Ue = ge({ extend: { theme: { text: [
|
|
@@ -192,7 +192,7 @@ var et = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
192
192
|
},
|
|
193
193
|
className: Q("inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors outline-none cursor-pointer", a ? rt[t] : nt[t], it[e], s && at[e], o && "w-full", l),
|
|
194
194
|
...p,
|
|
195
|
-
children: i ? /* @__PURE__ */ q(
|
|
195
|
+
children: i ? /* @__PURE__ */ q(P, {
|
|
196
196
|
className: "h-4 w-4 animate-spin",
|
|
197
197
|
"aria-hidden": !0
|
|
198
198
|
}) : /* @__PURE__ */ J(K, { children: [
|
|
@@ -267,9 +267,9 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
267
267
|
r.push(i), u.push(i), --f;
|
|
268
268
|
}
|
|
269
269
|
r.length && i?.(r), a.length && d?.(a);
|
|
270
|
-
},
|
|
270
|
+
}, P = (e) => {
|
|
271
271
|
e.preventDefault(), j.current = 0, A(!1), !a && N(Array.from(e.dataTransfer.files ?? []));
|
|
272
|
-
},
|
|
272
|
+
}, F = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, I = /* @__PURE__ */ q("input", {
|
|
273
273
|
ref: O,
|
|
274
274
|
type: "file",
|
|
275
275
|
accept: e,
|
|
@@ -279,7 +279,7 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
279
279
|
N(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
280
280
|
},
|
|
281
281
|
className: "sr-only"
|
|
282
|
-
}),
|
|
282
|
+
}), L = (y || C) && /* @__PURE__ */ J("div", {
|
|
283
283
|
className: "flex items-center gap-1.5",
|
|
284
284
|
children: [y && /* @__PURE__ */ J("span", {
|
|
285
285
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
@@ -292,11 +292,11 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
292
292
|
className: "inline-flex items-center gap-1",
|
|
293
293
|
children: C
|
|
294
294
|
})]
|
|
295
|
-
}),
|
|
295
|
+
}), R = S ? /* @__PURE__ */ q("p", {
|
|
296
296
|
id: `${ee}-error`,
|
|
297
297
|
className: "text-p-sm text-red-700",
|
|
298
298
|
children: S
|
|
299
|
-
}) : null,
|
|
299
|
+
}) : null, z = f && l.length > 0 && /* @__PURE__ */ q("div", {
|
|
300
300
|
className: "flex flex-col gap-2",
|
|
301
301
|
children: l.map((e, t) => /* @__PURE__ */ q(pt, {
|
|
302
302
|
name: e.name,
|
|
@@ -311,9 +311,9 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
311
311
|
className: Q("flex flex-col gap-1.5", w),
|
|
312
312
|
...E,
|
|
313
313
|
children: [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
L,
|
|
315
|
+
z,
|
|
316
|
+
R
|
|
317
317
|
]
|
|
318
318
|
});
|
|
319
319
|
if (g !== "dropzone") {
|
|
@@ -324,24 +324,24 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
324
324
|
className: Q("flex flex-col gap-1.5", w),
|
|
325
325
|
...E,
|
|
326
326
|
children: [
|
|
327
|
-
|
|
327
|
+
L,
|
|
328
328
|
/* @__PURE__ */ q(ot, {
|
|
329
329
|
type: "button",
|
|
330
330
|
variant: "secondary",
|
|
331
331
|
iconOnly: e,
|
|
332
332
|
disabled: a,
|
|
333
333
|
onClick: () => O.current?.click(),
|
|
334
|
-
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ q(
|
|
334
|
+
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ q(re, { className: "h-4 w-4" }),
|
|
335
335
|
"aria-label": e ? "Upload file" : void 0,
|
|
336
|
-
children: e ? v ?? /* @__PURE__ */ q(
|
|
336
|
+
children: e ? v ?? /* @__PURE__ */ q(ie, { className: "h-4 w-4" }) : _ ?? "Choose a file"
|
|
337
337
|
}),
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
I,
|
|
339
|
+
z,
|
|
340
|
+
R
|
|
341
341
|
]
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
let
|
|
344
|
+
let ne = /* @__PURE__ */ J("div", {
|
|
345
345
|
ref: D,
|
|
346
346
|
onDragEnter: () => {
|
|
347
347
|
j.current += 1, a || A(!0);
|
|
@@ -350,7 +350,7 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
350
350
|
onDragLeave: () => {
|
|
351
351
|
j.current = Math.max(0, j.current - 1), j.current === 0 && A(!1);
|
|
352
352
|
},
|
|
353
|
-
onDrop:
|
|
353
|
+
onDrop: P,
|
|
354
354
|
onClick: () => !a && O.current?.click(),
|
|
355
355
|
role: "button",
|
|
356
356
|
tabIndex: 0,
|
|
@@ -366,7 +366,7 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
366
366
|
children: [
|
|
367
367
|
/* @__PURE__ */ q("div", {
|
|
368
368
|
className: "h-10 w-10 rounded-full bg-bg-default flex items-center justify-center text-fg-secondary shadow-z1",
|
|
369
|
-
children: /* @__PURE__ */ q(
|
|
369
|
+
children: /* @__PURE__ */ q(H, { className: "h-5 w-5" })
|
|
370
370
|
}),
|
|
371
371
|
/* @__PURE__ */ J("div", {
|
|
372
372
|
className: "flex flex-col gap-0.5",
|
|
@@ -378,19 +378,19 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
378
378
|
}), " or drag & drop it here."]
|
|
379
379
|
}), /* @__PURE__ */ q("p", {
|
|
380
380
|
className: "text-p-sm text-fg-tertiary",
|
|
381
|
-
children:
|
|
381
|
+
children: F
|
|
382
382
|
})]
|
|
383
383
|
}),
|
|
384
|
-
|
|
384
|
+
I
|
|
385
385
|
]
|
|
386
386
|
});
|
|
387
|
-
return !
|
|
387
|
+
return !L && !R && !z ? ne : /* @__PURE__ */ J("div", {
|
|
388
388
|
className: "flex flex-col gap-1.5",
|
|
389
389
|
children: [
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
390
|
+
L,
|
|
391
|
+
ne,
|
|
392
|
+
z,
|
|
393
|
+
R
|
|
394
394
|
]
|
|
395
395
|
});
|
|
396
396
|
}), ft = {
|
|
@@ -465,7 +465,7 @@ var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
465
465
|
onClick: o,
|
|
466
466
|
"aria-label": "Remove",
|
|
467
467
|
className: "shrink-0 p-1 rounded-md text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
468
|
-
children: q(n === "completed" ?
|
|
468
|
+
children: q(n === "completed" ? me : U, { className: "h-4 w-4" })
|
|
469
469
|
})
|
|
470
470
|
]
|
|
471
471
|
});
|
|
@@ -562,7 +562,7 @@ var xt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
562
562
|
alt: t ?? n ?? "",
|
|
563
563
|
onError: () => b(!0),
|
|
564
564
|
className: "h-full w-full object-cover"
|
|
565
|
-
}) : n ? k : o ?? /* @__PURE__ */ q(
|
|
565
|
+
}) : n ? k : o ?? /* @__PURE__ */ q(he, { className: "h-1/2 w-1/2 text-white/90" })
|
|
566
566
|
}),
|
|
567
567
|
i && /* @__PURE__ */ q("span", {
|
|
568
568
|
"aria-label": i,
|
|
@@ -575,7 +575,7 @@ var xt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
575
575
|
},
|
|
576
576
|
"aria-label": "Change avatar image",
|
|
577
577
|
className: Q("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", vt[r]),
|
|
578
|
-
children: /* @__PURE__ */ q(
|
|
578
|
+
children: /* @__PURE__ */ q(ie, { className: "h-1/2 w-1/2" })
|
|
579
579
|
}), /* @__PURE__ */ q("input", {
|
|
580
580
|
ref: C,
|
|
581
581
|
type: "file",
|
|
@@ -845,7 +845,7 @@ var xt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
845
845
|
...m
|
|
846
846
|
}), /* @__PURE__ */ q("span", {
|
|
847
847
|
className: Q("flex items-center justify-center border transition-colors", Ht[e], !a && "bg-bg-default", v ? "border-red-600" : a ? "border-brand-500" : "border-border-strong", !c && !a && (v ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !a && "peer-checked:bg-brand-500 peer-checked:border-brand-500", a && "bg-brand-500", c && !a && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !a && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
|
|
848
|
-
children: q(a ?
|
|
848
|
+
children: q(a ? I : b, {
|
|
849
849
|
className: Q(Ut[e], "text-white"),
|
|
850
850
|
strokeWidth: 3,
|
|
851
851
|
"aria-hidden": !0
|
|
@@ -879,10 +879,16 @@ function Gt(...e) {
|
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
881
|
//#endregion
|
|
882
|
+
//#region src/lib/PortalContext.tsx
|
|
883
|
+
var Kt = r(null);
|
|
884
|
+
function qt() {
|
|
885
|
+
return c(Kt) ?? (typeof document > "u" ? null : document.body);
|
|
886
|
+
}
|
|
887
|
+
//#endregion
|
|
882
888
|
//#region src/lib/useFloatingPosition.ts
|
|
883
|
-
var
|
|
884
|
-
function
|
|
885
|
-
let [
|
|
889
|
+
var Jt = 8, Yt = 10;
|
|
890
|
+
function Xt({ 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 }) {
|
|
891
|
+
let [u, f] = m({
|
|
886
892
|
style: {
|
|
887
893
|
position: "fixed",
|
|
888
894
|
top: 0,
|
|
@@ -894,48 +900,49 @@ function Jt({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
894
900
|
});
|
|
895
901
|
return d(() => {
|
|
896
902
|
if (!n || !t) return;
|
|
897
|
-
let
|
|
903
|
+
let l = () => {
|
|
898
904
|
let n = e?.current;
|
|
899
905
|
if (!n) return;
|
|
900
|
-
let
|
|
901
|
-
if (o) if (
|
|
902
|
-
let e =
|
|
903
|
-
r === "top" && e < u.height + a && t > e ?
|
|
906
|
+
let l = n.getBoundingClientRect(), u = t.getBoundingClientRect(), d = window.innerWidth, p = window.innerHeight, m = r === "top" || r === "bottom", h = r;
|
|
907
|
+
if (o) if (m) {
|
|
908
|
+
let e = l.top, t = p - l.bottom;
|
|
909
|
+
r === "top" && e < u.height + a && t > e ? h = "bottom" : r === "bottom" && t < u.height + a && e > t && (h = "top");
|
|
904
910
|
} else {
|
|
905
|
-
let e =
|
|
906
|
-
r === "left" && e < u.width + a && t > e ?
|
|
911
|
+
let e = l.left, t = d - l.right;
|
|
912
|
+
r === "left" && e < u.width + a && t > e ? h = "right" : r === "right" && t < u.width + a && e > t && (h = "left");
|
|
907
913
|
}
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
let
|
|
911
|
-
if (
|
|
912
|
-
let e =
|
|
913
|
-
|
|
914
|
-
left: Math.min(Math.max(e -
|
|
915
|
-
[
|
|
914
|
+
let g = h === "top" || h === "bottom", _, v;
|
|
915
|
+
g ? (_ = h === "bottom" ? l.bottom + a : l.top - u.height - a, v = i === "start" ? l.left : i === "end" ? l.right - u.width : l.left + l.width / 2 - u.width / 2) : (v = h === "right" ? l.right + a : l.left - u.width - a, _ = i === "start" ? l.top : i === "end" ? l.bottom - u.height : l.top + l.height / 2 - u.height / 2), s && (g ? v = Math.min(Math.max(v, Jt), d - u.width - Jt) : _ = Math.min(Math.max(_, Jt), p - u.height - Jt));
|
|
916
|
+
let y;
|
|
917
|
+
if (g) {
|
|
918
|
+
let e = l.left + l.width / 2;
|
|
919
|
+
y = {
|
|
920
|
+
left: Math.min(Math.max(e - v, Yt), u.width - Yt),
|
|
921
|
+
[h === "bottom" ? "top" : "bottom"]: -8 / 2
|
|
916
922
|
};
|
|
917
923
|
} else {
|
|
918
|
-
let e =
|
|
919
|
-
|
|
920
|
-
top: Math.min(Math.max(e -
|
|
921
|
-
[
|
|
924
|
+
let e = l.top + l.height / 2;
|
|
925
|
+
y = {
|
|
926
|
+
top: Math.min(Math.max(e - _, Yt), u.height - Yt),
|
|
927
|
+
[h === "right" ? "left" : "right"]: -8 / 2
|
|
922
928
|
};
|
|
923
929
|
}
|
|
924
|
-
|
|
930
|
+
f({
|
|
925
931
|
style: {
|
|
926
932
|
position: "fixed",
|
|
927
|
-
top:
|
|
928
|
-
left:
|
|
933
|
+
top: _,
|
|
934
|
+
left: v,
|
|
935
|
+
...c ? { minWidth: l.width } : {}
|
|
929
936
|
},
|
|
930
|
-
arrowStyle:
|
|
931
|
-
resolvedSide:
|
|
937
|
+
arrowStyle: y,
|
|
938
|
+
resolvedSide: h
|
|
932
939
|
});
|
|
933
940
|
};
|
|
934
|
-
return
|
|
941
|
+
return l(), window.addEventListener("resize", l), document.addEventListener("scroll", l, {
|
|
935
942
|
capture: !0,
|
|
936
943
|
passive: !0
|
|
937
944
|
}), () => {
|
|
938
|
-
window.removeEventListener("resize",
|
|
945
|
+
window.removeEventListener("resize", l), document.removeEventListener("scroll", l, { capture: !0 });
|
|
939
946
|
};
|
|
940
947
|
}, [
|
|
941
948
|
n,
|
|
@@ -945,21 +952,23 @@ function Jt({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
945
952
|
i,
|
|
946
953
|
a,
|
|
947
954
|
o,
|
|
948
|
-
s
|
|
949
|
-
|
|
955
|
+
s,
|
|
956
|
+
c,
|
|
957
|
+
l
|
|
958
|
+
]), u;
|
|
950
959
|
}
|
|
951
960
|
//#endregion
|
|
952
961
|
//#region src/components/Popover/Popover.tsx
|
|
953
|
-
var
|
|
962
|
+
var Zt = {
|
|
954
963
|
bottom: "border-l border-t",
|
|
955
964
|
top: "border-b border-r",
|
|
956
965
|
left: "border-t border-r",
|
|
957
966
|
right: "border-b border-l"
|
|
958
967
|
};
|
|
959
|
-
function
|
|
968
|
+
function Qt({ content: e, children: t, side: r = "top", align: i = "center", offset: a = 8, open: s, defaultOpen: c = !1, onOpenChange: d, flip: f = !0, showArrow: h = !0, closeOnScroll: g = !0, autoFocus: _ = !1, container: v, className: y, dataTestId: b }) {
|
|
960
969
|
let [x, S] = m(c), C = s !== void 0, w = C ? s : x, T = p(null), [E, D] = m(null), O = u(), k = (e) => {
|
|
961
970
|
C || S(e), d?.(e);
|
|
962
|
-
}, { style: A, arrowStyle: j, resolvedSide: M } =
|
|
971
|
+
}, { style: A, arrowStyle: j, resolvedSide: M } = Xt({
|
|
963
972
|
anchor: T,
|
|
964
973
|
panel: E,
|
|
965
974
|
open: w,
|
|
@@ -967,7 +976,7 @@ function Xt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
967
976
|
align: i,
|
|
968
977
|
offset: a,
|
|
969
978
|
flip: f
|
|
970
|
-
});
|
|
979
|
+
}), ee = qt();
|
|
971
980
|
if (l(() => {
|
|
972
981
|
if (!w) return;
|
|
973
982
|
let e = (e) => {
|
|
@@ -995,15 +1004,15 @@ function Xt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
995
1004
|
_,
|
|
996
1005
|
E
|
|
997
1006
|
]), !o(t)) return t;
|
|
998
|
-
let
|
|
999
|
-
ref: Gt(T,
|
|
1007
|
+
let te = t.props ?? {}, N = t.ref, P = n(t, {
|
|
1008
|
+
ref: Gt(T, N),
|
|
1000
1009
|
onClick: (e) => {
|
|
1001
|
-
|
|
1010
|
+
te.onClick?.(e), e.defaultPrevented || k(!w);
|
|
1002
1011
|
},
|
|
1003
1012
|
"aria-haspopup": "dialog",
|
|
1004
1013
|
"aria-expanded": w
|
|
1005
|
-
}),
|
|
1006
|
-
return /* @__PURE__ */ J(K, { children: [
|
|
1014
|
+
}), F = v ?? ee;
|
|
1015
|
+
return /* @__PURE__ */ J(K, { children: [P, w && F && _e(/* @__PURE__ */ J("div", {
|
|
1007
1016
|
ref: Gt(D),
|
|
1008
1017
|
id: O,
|
|
1009
1018
|
role: "dialog",
|
|
@@ -1016,17 +1025,17 @@ function Xt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1016
1025
|
children: [e, h && /* @__PURE__ */ q("span", {
|
|
1017
1026
|
"aria-hidden": !0,
|
|
1018
1027
|
style: j,
|
|
1019
|
-
className: Q("absolute size-2 rotate-45 bg-bg-default",
|
|
1028
|
+
className: Q("absolute size-2 rotate-45 bg-bg-default", Zt[M])
|
|
1020
1029
|
})]
|
|
1021
|
-
}),
|
|
1030
|
+
}), F)] });
|
|
1022
1031
|
}
|
|
1023
1032
|
//#endregion
|
|
1024
1033
|
//#region src/components/Copy/Copy.tsx
|
|
1025
|
-
var
|
|
1034
|
+
var $t = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to clipboard", timeout: r = 1500, icon: i, onCopy: a, onError: o, disabled: s, dataTestId: c, ...u }, d) {
|
|
1026
1035
|
let [f, h] = m(!1), g = p(null), _ = typeof navigator < "u" && typeof navigator.clipboard?.writeText == "function";
|
|
1027
1036
|
return l(() => () => {
|
|
1028
1037
|
g.current && clearTimeout(g.current);
|
|
1029
|
-
}, []), /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1038
|
+
}, []), /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Qt, {
|
|
1030
1039
|
open: f,
|
|
1031
1040
|
content: t,
|
|
1032
1041
|
side: "top",
|
|
@@ -1054,23 +1063,23 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1054
1063
|
className: "sr-only",
|
|
1055
1064
|
children: f ? t : ""
|
|
1056
1065
|
})] });
|
|
1057
|
-
}),
|
|
1066
|
+
}), en = {
|
|
1058
1067
|
lg: "h-12 text-p-md",
|
|
1059
1068
|
md: "h-10 text-p-std",
|
|
1060
1069
|
sm: "h-8 text-p-sm"
|
|
1061
|
-
},
|
|
1070
|
+
}, tn = {
|
|
1062
1071
|
lg: "pl-10",
|
|
1063
1072
|
md: "pl-9",
|
|
1064
1073
|
sm: "pl-8"
|
|
1065
|
-
},
|
|
1074
|
+
}, nn = {
|
|
1066
1075
|
lg: "pr-10",
|
|
1067
1076
|
md: "pr-9",
|
|
1068
1077
|
sm: "pr-8"
|
|
1069
|
-
},
|
|
1078
|
+
}, rn = {
|
|
1070
1079
|
lg: "w-10",
|
|
1071
1080
|
md: "w-9",
|
|
1072
1081
|
sm: "w-8"
|
|
1073
|
-
},
|
|
1082
|
+
}, an = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, size: i = "md", leftIcon: a, rightIcon: o, leftAddon: s, rightAddon: c, error: l = !1, id: d, disabled: f, className: p, wrapperClassName: m, required: g, dataTestId: _, ...v }, y) {
|
|
1074
1083
|
let b = u(), x = d ?? b, S = r ? `${x}-error` : n ? `${x}-help` : void 0, C = l || !!r;
|
|
1075
1084
|
return /* @__PURE__ */ J("div", {
|
|
1076
1085
|
className: Q("flex flex-col gap-1.5 w-full", m),
|
|
@@ -1092,7 +1101,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1092
1101
|
})]
|
|
1093
1102
|
}),
|
|
1094
1103
|
/* @__PURE__ */ J("div", {
|
|
1095
|
-
className: Q("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", C ? "border-red-600" : "border-border-default", !f && !C && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", C ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed",
|
|
1104
|
+
className: Q("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", C ? "border-red-600" : "border-border-default", !f && !C && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", C ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed", en[i]),
|
|
1096
1105
|
children: [
|
|
1097
1106
|
s && /* @__PURE__ */ q("span", {
|
|
1098
1107
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
|
|
@@ -1103,7 +1112,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1103
1112
|
children: [
|
|
1104
1113
|
a && /* @__PURE__ */ q("span", {
|
|
1105
1114
|
"aria-hidden": !0,
|
|
1106
|
-
className: Q("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none",
|
|
1115
|
+
className: Q("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", rn[i]),
|
|
1107
1116
|
children: a
|
|
1108
1117
|
}),
|
|
1109
1118
|
/* @__PURE__ */ q("input", {
|
|
@@ -1113,12 +1122,12 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1113
1122
|
required: g,
|
|
1114
1123
|
"aria-invalid": C || void 0,
|
|
1115
1124
|
"aria-describedby": S,
|
|
1116
|
-
className: Q("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ?
|
|
1125
|
+
className: Q("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ? tn[i] : "pl-3", o || C ? nn[i] : "pr-3", p),
|
|
1117
1126
|
...v
|
|
1118
1127
|
}),
|
|
1119
1128
|
(o || C) && /* @__PURE__ */ q("span", {
|
|
1120
1129
|
"aria-hidden": !0,
|
|
1121
|
-
className: Q("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none",
|
|
1130
|
+
className: Q("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", rn[i], C ? "text-red-600" : "text-fg-secondary"),
|
|
1122
1131
|
children: C ? /* @__PURE__ */ q(h, { className: "h-4 w-4" }) : o
|
|
1123
1132
|
})
|
|
1124
1133
|
]
|
|
@@ -1140,7 +1149,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1140
1149
|
}) : null
|
|
1141
1150
|
]
|
|
1142
1151
|
});
|
|
1143
|
-
}),
|
|
1152
|
+
}), on = "inline-flex items-center justify-center text-fg-secondary transition-colors hover:text-fg-default disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none", sn = a(function({ value: e, defaultValue: t = 0, onValueChange: n, min: r = 0, max: i = 2 ** 53 - 1, step: a = 1, size: o = "md", label: s, helperText: c, errorText: u, error: d, disabled: f, className: p, wrapperClassName: h, dataTestId: g, ..._ }, v) {
|
|
1144
1153
|
let y = e !== void 0, [b, x] = m(t), S = y ? e : b, [C, w] = m(String(S));
|
|
1145
1154
|
l(() => {
|
|
1146
1155
|
w(String(S));
|
|
@@ -1149,7 +1158,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1149
1158
|
let t = Math.min(i, Math.max(r, e));
|
|
1150
1159
|
return y || x(t), n?.(t), t;
|
|
1151
1160
|
};
|
|
1152
|
-
return /* @__PURE__ */ q(
|
|
1161
|
+
return /* @__PURE__ */ q(an, {
|
|
1153
1162
|
ref: v,
|
|
1154
1163
|
type: "number",
|
|
1155
1164
|
min: r,
|
|
@@ -1180,25 +1189,25 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1180
1189
|
disabled: f || S <= r,
|
|
1181
1190
|
onClick: () => T(S - a),
|
|
1182
1191
|
"aria-label": "Decrease",
|
|
1183
|
-
className:
|
|
1184
|
-
children: /* @__PURE__ */ q(
|
|
1192
|
+
className: on,
|
|
1193
|
+
children: /* @__PURE__ */ q(I, { className: "size-4" })
|
|
1185
1194
|
}),
|
|
1186
1195
|
rightAddon: /* @__PURE__ */ q("button", {
|
|
1187
1196
|
type: "button",
|
|
1188
1197
|
disabled: f || S >= i,
|
|
1189
1198
|
onClick: () => T(S + a),
|
|
1190
1199
|
"aria-label": "Increase",
|
|
1191
|
-
className:
|
|
1192
|
-
children: /* @__PURE__ */ q(
|
|
1200
|
+
className: on,
|
|
1201
|
+
children: /* @__PURE__ */ q(se, { className: "size-4" })
|
|
1193
1202
|
}),
|
|
1194
1203
|
className: Q("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
1195
1204
|
..._
|
|
1196
1205
|
});
|
|
1197
|
-
}),
|
|
1206
|
+
}), cn = {
|
|
1198
1207
|
lg: "h-12 text-p-md px-3.5",
|
|
1199
1208
|
md: "h-10 text-p-std px-3",
|
|
1200
1209
|
sm: "h-8 text-p-sm px-2.5"
|
|
1201
|
-
},
|
|
1210
|
+
}, ln = 4, un = /* @__PURE__ */ new Set([
|
|
1202
1211
|
"US",
|
|
1203
1212
|
"CA",
|
|
1204
1213
|
"MX",
|
|
@@ -1209,26 +1218,26 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1209
1218
|
"KR",
|
|
1210
1219
|
"TW"
|
|
1211
1220
|
]);
|
|
1212
|
-
function
|
|
1221
|
+
function dn(e) {
|
|
1213
1222
|
try {
|
|
1214
1223
|
return new Intl.Locale(e), e;
|
|
1215
1224
|
} catch {
|
|
1216
1225
|
return "en";
|
|
1217
1226
|
}
|
|
1218
1227
|
}
|
|
1219
|
-
function
|
|
1228
|
+
function fn(e) {
|
|
1220
1229
|
try {
|
|
1221
1230
|
let t = new Intl.Locale(e), n = t.weekInfo ?? t.getWeekInfo?.();
|
|
1222
1231
|
if (n?.firstDay) return n.firstDay % 7;
|
|
1223
1232
|
} catch {}
|
|
1224
1233
|
let t = e.split("-")[1]?.toUpperCase();
|
|
1225
|
-
return !t && e.toLowerCase() === "en" || t &&
|
|
1234
|
+
return !t && e.toLowerCase() === "en" || t && un.has(t) ? 0 : 1;
|
|
1226
1235
|
}
|
|
1227
|
-
function
|
|
1236
|
+
function pn(e) {
|
|
1228
1237
|
let t = new Intl.DateTimeFormat(e, { month: "short" });
|
|
1229
1238
|
return Array.from({ length: 12 }, (e, n) => t.format(new Date(2e3, n, 1)));
|
|
1230
1239
|
}
|
|
1231
|
-
var
|
|
1240
|
+
var mn = [
|
|
1232
1241
|
"Su",
|
|
1233
1242
|
"Mo",
|
|
1234
1243
|
"Tu",
|
|
@@ -1237,69 +1246,64 @@ var fn = [
|
|
|
1237
1246
|
"Fr",
|
|
1238
1247
|
"Sa"
|
|
1239
1248
|
];
|
|
1240
|
-
function
|
|
1241
|
-
let n = e.toLowerCase() === "en" ?
|
|
1249
|
+
function hn(e, t) {
|
|
1250
|
+
let n = e.toLowerCase() === "en" ? mn : (() => {
|
|
1242
1251
|
let t = new Intl.DateTimeFormat(e, { weekday: "short" });
|
|
1243
1252
|
return Array.from({ length: 7 }, (e, n) => t.format(new Date(1970, 0, 4 + n)));
|
|
1244
1253
|
})();
|
|
1245
1254
|
return [...n.slice(t), ...n.slice(0, t)];
|
|
1246
1255
|
}
|
|
1247
|
-
function
|
|
1256
|
+
function gn(e) {
|
|
1248
1257
|
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
1249
1258
|
}
|
|
1250
|
-
function
|
|
1259
|
+
function _n(e, t) {
|
|
1251
1260
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1252
1261
|
}
|
|
1253
|
-
function
|
|
1262
|
+
function vn(e) {
|
|
1254
1263
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1255
1264
|
}
|
|
1256
|
-
function
|
|
1257
|
-
let a =
|
|
1258
|
-
return t && a <
|
|
1265
|
+
function yn(e, t, n, r, i) {
|
|
1266
|
+
let a = vn(e).getTime();
|
|
1267
|
+
return t && a < vn(t).getTime() || n && a > vn(n).getTime() || r?.some((t) => _n(t, e)) ? !0 : !!i && !i(e);
|
|
1259
1268
|
}
|
|
1260
|
-
function
|
|
1269
|
+
function bn(e, t) {
|
|
1261
1270
|
let n = String(e.getDate()).padStart(2, "0"), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getFullYear());
|
|
1262
1271
|
return t.replace(/dd/g, n).replace(/MM/g, r).replace(/yyyy/g, i);
|
|
1263
1272
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let n = (
|
|
1273
|
+
function xn(e, t) {
|
|
1274
|
+
let n = (gn(e).getDay() - t + 7) % 7, r = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), i = [];
|
|
1266
1275
|
for (let e = 0; e < n; e++) i.push(null);
|
|
1267
1276
|
for (let t = 1; t <= r; t++) i.push(new Date(e.getFullYear(), e.getMonth(), t));
|
|
1268
1277
|
for (; i.length % 7 != 0;) i.push(null);
|
|
1269
1278
|
return i;
|
|
1270
1279
|
}
|
|
1271
|
-
function
|
|
1280
|
+
function Sn(e) {
|
|
1272
1281
|
if (!e) return;
|
|
1273
1282
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1274
1283
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1275
1284
|
}
|
|
1276
|
-
var
|
|
1277
|
-
let
|
|
1285
|
+
var Cn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, menuPlacement: D = "auto", error: O = !1, errorText: k, id: A, className: j, wrapperClassName: M, dataTestId: ee }, te) {
|
|
1286
|
+
let N = u(), P = A ?? N, [F, I] = m(!1), [L, R] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [z, ne] = m(null), [re, ie] = m(null), ae = p(null), oe = p(null), se = qt(), { style: B, resolvedSide: ce } = Xt({
|
|
1287
|
+
anchor: oe,
|
|
1288
|
+
panel: re,
|
|
1289
|
+
open: F,
|
|
1290
|
+
side: D === "top" ? "top" : "bottom",
|
|
1291
|
+
align: "start",
|
|
1292
|
+
offset: ln,
|
|
1293
|
+
flip: D === "auto",
|
|
1294
|
+
recomputeKey: `${L.getFullYear()}-${L.getMonth()}-${r}`
|
|
1295
|
+
}), le = O || !!k, ue = k ? `${P}-error` : g ? `${P}-help` : void 0;
|
|
1278
1296
|
l(() => {
|
|
1279
|
-
|
|
1280
|
-
}, [
|
|
1281
|
-
if (!F) return;
|
|
1282
|
-
if (O !== "auto") {
|
|
1283
|
-
oe(O);
|
|
1284
|
-
return;
|
|
1285
|
-
}
|
|
1286
|
-
let e = ce.current, t = z.current;
|
|
1287
|
-
if (!e || !t) return;
|
|
1288
|
-
let n = e.getBoundingClientRect(), r = t.offsetHeight + sn, i = window.innerHeight - n.bottom, a = n.top;
|
|
1289
|
-
oe(i < r && a > i ? "top" : "bottom");
|
|
1290
|
-
}, [
|
|
1291
|
-
F,
|
|
1292
|
-
O,
|
|
1293
|
-
L,
|
|
1294
|
-
r
|
|
1295
|
-
]), l(() => {
|
|
1297
|
+
b && I(!1);
|
|
1298
|
+
}, [b]), l(() => {
|
|
1296
1299
|
if (!F) return;
|
|
1297
1300
|
let e = (e) => {
|
|
1298
|
-
|
|
1301
|
+
let t = e.target;
|
|
1302
|
+
ae.current?.contains(t) || re?.contains(t) || I(!1);
|
|
1299
1303
|
};
|
|
1300
1304
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1301
|
-
}, [F]);
|
|
1302
|
-
let
|
|
1305
|
+
}, [F, re]);
|
|
1306
|
+
let V = r ? i?.start ? `${bn(i.start, c)}${i.end ? ` – ${bn(i.end, c)}` : ""}` : "" : e ? bn(e, c) : "";
|
|
1303
1307
|
function de(e) {
|
|
1304
1308
|
if (!r) {
|
|
1305
1309
|
t?.(e), I(!1);
|
|
@@ -1332,54 +1336,54 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1332
1336
|
e.stopPropagation(), r ? (a?.({
|
|
1333
1337
|
start: null,
|
|
1334
1338
|
end: null
|
|
1335
|
-
}),
|
|
1339
|
+
}), ne(null)) : t?.(null);
|
|
1336
1340
|
}
|
|
1337
|
-
let { firstDayOfWeek: pe, monthNames: me, weekdayNames:
|
|
1338
|
-
let e =
|
|
1341
|
+
let { firstDayOfWeek: pe, monthNames: me, weekdayNames: H } = f(() => {
|
|
1342
|
+
let e = dn(s), t = fn(e);
|
|
1339
1343
|
return {
|
|
1340
1344
|
firstDayOfWeek: t,
|
|
1341
|
-
monthNames:
|
|
1342
|
-
weekdayNames:
|
|
1345
|
+
monthNames: pn(e),
|
|
1346
|
+
weekdayNames: hn(e, t)
|
|
1343
1347
|
};
|
|
1344
|
-
}, [s]),
|
|
1348
|
+
}, [s]), he = xn(L, pe), W = We(ee), G = i ?? {
|
|
1345
1349
|
start: null,
|
|
1346
1350
|
end: null
|
|
1347
|
-
},
|
|
1351
|
+
}, ge = G.end ?? z;
|
|
1348
1352
|
return /* @__PURE__ */ J("div", {
|
|
1349
|
-
ref:
|
|
1350
|
-
"data-test-id":
|
|
1351
|
-
className: Q("flex flex-col gap-1.5",
|
|
1353
|
+
ref: ae,
|
|
1354
|
+
"data-test-id": W("root"),
|
|
1355
|
+
className: Q("flex flex-col gap-1.5", v && "w-full", M),
|
|
1352
1356
|
children: [
|
|
1353
|
-
|
|
1357
|
+
d && /* @__PURE__ */ J("label", {
|
|
1354
1358
|
htmlFor: P,
|
|
1355
1359
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
1356
|
-
children: [
|
|
1360
|
+
children: [d, h && /* @__PURE__ */ q("span", {
|
|
1357
1361
|
className: "text-red-600",
|
|
1358
1362
|
"aria-hidden": !0,
|
|
1359
1363
|
children: "*"
|
|
1360
1364
|
})]
|
|
1361
1365
|
}),
|
|
1362
1366
|
/* @__PURE__ */ J("div", {
|
|
1363
|
-
ref:
|
|
1367
|
+
ref: oe,
|
|
1364
1368
|
className: "relative",
|
|
1365
1369
|
children: [/* @__PURE__ */ J("button", {
|
|
1366
|
-
ref:
|
|
1370
|
+
ref: te,
|
|
1367
1371
|
id: P,
|
|
1368
|
-
"data-test-id":
|
|
1369
|
-
"data-value": r ? void 0 :
|
|
1370
|
-
"data-from": r ?
|
|
1371
|
-
"data-to": r ?
|
|
1372
|
+
"data-test-id": ee,
|
|
1373
|
+
"data-value": r ? void 0 : Sn(e),
|
|
1374
|
+
"data-from": r ? Sn(i?.start) : void 0,
|
|
1375
|
+
"data-to": r ? Sn(i?.end) : void 0,
|
|
1372
1376
|
type: "button",
|
|
1373
|
-
disabled:
|
|
1377
|
+
disabled: b,
|
|
1374
1378
|
"aria-invalid": le || void 0,
|
|
1375
|
-
"aria-required":
|
|
1379
|
+
"aria-required": h || void 0,
|
|
1376
1380
|
"aria-describedby": ue,
|
|
1377
1381
|
onClick: () => I((e) => !e),
|
|
1378
|
-
className: Q("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", !
|
|
1382
|
+
className: Q("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]", cn[o], j),
|
|
1379
1383
|
children: [/* @__PURE__ */ q("span", {
|
|
1380
|
-
className: Q("flex-1 text-left truncate",
|
|
1381
|
-
children:
|
|
1382
|
-
}), n &&
|
|
1384
|
+
className: Q("flex-1 text-left truncate", b ? "text-fg-disabled" : V ? "text-fg-default" : "text-fg-tertiary"),
|
|
1385
|
+
children: V || _
|
|
1386
|
+
}), n && V && !b ? /* @__PURE__ */ q("span", {
|
|
1383
1387
|
role: "button",
|
|
1384
1388
|
tabIndex: 0,
|
|
1385
1389
|
"aria-label": "Clear date",
|
|
@@ -1389,11 +1393,13 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1389
1393
|
},
|
|
1390
1394
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
|
|
1391
1395
|
children: /* @__PURE__ */ q(U, { className: "w-4 h-4 text-fg-secondary" })
|
|
1392
|
-
}) : /* @__PURE__ */ q(y, { className: Q("w-4 h-4",
|
|
1393
|
-
}), F && /* @__PURE__ */ J("div", {
|
|
1394
|
-
ref:
|
|
1395
|
-
"data-test-id":
|
|
1396
|
-
|
|
1396
|
+
}) : /* @__PURE__ */ q(y, { className: Q("w-4 h-4", b ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
1397
|
+
}), F && se && _e(/* @__PURE__ */ J("div", {
|
|
1398
|
+
ref: ie,
|
|
1399
|
+
"data-test-id": W("calendar"),
|
|
1400
|
+
"data-side": ce,
|
|
1401
|
+
style: B,
|
|
1402
|
+
className: "z-50 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
|
|
1397
1403
|
children: [/* @__PURE__ */ J("div", {
|
|
1398
1404
|
className: "flex items-center justify-between mb-2",
|
|
1399
1405
|
children: [
|
|
@@ -1402,11 +1408,11 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1402
1408
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1403
1409
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
|
|
1404
1410
|
"aria-label": "Previous month",
|
|
1405
|
-
"data-test-id":
|
|
1411
|
+
"data-test-id": W("prev-month"),
|
|
1406
1412
|
children: /* @__PURE__ */ q(C, { className: "w-4 h-4" })
|
|
1407
1413
|
}),
|
|
1408
1414
|
/* @__PURE__ */ J("div", {
|
|
1409
|
-
"data-test-id":
|
|
1415
|
+
"data-test-id": W("month-label"),
|
|
1410
1416
|
"data-month": `${L.getFullYear()}-${String(L.getMonth() + 1).padStart(2, "0")}`,
|
|
1411
1417
|
className: "text-p-md font-semibold text-fg-default",
|
|
1412
1418
|
children: [
|
|
@@ -1420,45 +1426,45 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1420
1426
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1421
1427
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
|
|
1422
1428
|
"aria-label": "Next month",
|
|
1423
|
-
"data-test-id":
|
|
1429
|
+
"data-test-id": W("next-month"),
|
|
1424
1430
|
children: /* @__PURE__ */ q(w, { className: "w-4 h-4" })
|
|
1425
1431
|
})
|
|
1426
1432
|
]
|
|
1427
1433
|
}), /* @__PURE__ */ J("div", {
|
|
1428
1434
|
className: "grid grid-cols-7 gap-1 text-center",
|
|
1429
|
-
children: [
|
|
1435
|
+
children: [H.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1430
1436
|
className: "text-p-xs text-fg-tertiary py-1",
|
|
1431
1437
|
children: e
|
|
1432
|
-
}, t)),
|
|
1438
|
+
}, t)), he.map((t, n) => {
|
|
1433
1439
|
if (!t) return /* @__PURE__ */ q("div", {}, n);
|
|
1434
|
-
let i =
|
|
1440
|
+
let i = yn(t, x, S, T, E), a = !r && _n(t, e ?? null), o = r && _n(t, G.start), s = r && _n(t, ge), c = r && !!G.start && !!ge && t > G.start && t < ge, l = i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container";
|
|
1435
1441
|
return /* @__PURE__ */ q("button", {
|
|
1436
1442
|
type: "button",
|
|
1437
1443
|
disabled: i,
|
|
1438
1444
|
"aria-disabled": i || void 0,
|
|
1439
|
-
"data-test-id":
|
|
1440
|
-
"data-date":
|
|
1441
|
-
onMouseEnter: () => !i && r &&
|
|
1445
|
+
"data-test-id": W("day"),
|
|
1446
|
+
"data-date": Sn(t),
|
|
1447
|
+
onMouseEnter: () => !i && r && G.start && !G.end && ne(t),
|
|
1442
1448
|
onClick: () => !i && de(t),
|
|
1443
1449
|
className: Q("h-8 rounded-md text-p-sm font-medium", l),
|
|
1444
1450
|
children: t.getDate()
|
|
1445
1451
|
}, n);
|
|
1446
1452
|
})]
|
|
1447
1453
|
})]
|
|
1448
|
-
})]
|
|
1454
|
+
}), se)]
|
|
1449
1455
|
}),
|
|
1450
|
-
|
|
1456
|
+
k ? /* @__PURE__ */ q("p", {
|
|
1451
1457
|
id: `${P}-error`,
|
|
1452
1458
|
className: "text-p-sm text-red-700",
|
|
1453
|
-
children:
|
|
1454
|
-
}) :
|
|
1459
|
+
children: k
|
|
1460
|
+
}) : g ? /* @__PURE__ */ q("p", {
|
|
1455
1461
|
id: `${P}-help`,
|
|
1456
1462
|
className: "text-p-sm text-fg-secondary",
|
|
1457
|
-
children:
|
|
1463
|
+
children: g
|
|
1458
1464
|
}) : null
|
|
1459
1465
|
]
|
|
1460
1466
|
});
|
|
1461
|
-
}),
|
|
1467
|
+
}), wn = {
|
|
1462
1468
|
brand: {
|
|
1463
1469
|
bg: "bg-bg-brand-lighter",
|
|
1464
1470
|
icon: "text-brand-700"
|
|
@@ -1495,7 +1501,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1495
1501
|
bg: "bg-bg-danger-lighter",
|
|
1496
1502
|
icon: "text-red-700"
|
|
1497
1503
|
}
|
|
1498
|
-
},
|
|
1504
|
+
}, Tn = {
|
|
1499
1505
|
sm: {
|
|
1500
1506
|
box: "h-8 w-8",
|
|
1501
1507
|
icon: "h-4 w-4",
|
|
@@ -1516,8 +1522,8 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1516
1522
|
icon: "h-7 w-7",
|
|
1517
1523
|
radius: "rounded-xl"
|
|
1518
1524
|
}
|
|
1519
|
-
},
|
|
1520
|
-
let c =
|
|
1525
|
+
}, En = a(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
|
|
1526
|
+
let c = wn[t], l = Tn[n];
|
|
1521
1527
|
return /* @__PURE__ */ q("div", {
|
|
1522
1528
|
ref: s,
|
|
1523
1529
|
"data-test-id": a,
|
|
@@ -1526,7 +1532,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1526
1532
|
...o,
|
|
1527
1533
|
children: /* @__PURE__ */ q(e, { className: Q(l.icon, c.icon) })
|
|
1528
1534
|
});
|
|
1529
|
-
}),
|
|
1535
|
+
}), Dn = {
|
|
1530
1536
|
"h-xl": "text-h-xl",
|
|
1531
1537
|
"h-lg": "text-h-lg",
|
|
1532
1538
|
"h-md": "text-h-md",
|
|
@@ -1544,12 +1550,12 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1544
1550
|
"label-sm": "text-label-sm",
|
|
1545
1551
|
"label-xs": "text-label-xs",
|
|
1546
1552
|
"label-xxs": "text-label-xxs"
|
|
1547
|
-
},
|
|
1553
|
+
}, On = {
|
|
1548
1554
|
normal: "font-normal",
|
|
1549
1555
|
medium: "font-medium",
|
|
1550
1556
|
semibold: "font-semibold",
|
|
1551
1557
|
bold: "font-bold"
|
|
1552
|
-
},
|
|
1558
|
+
}, kn = {
|
|
1553
1559
|
default: "text-fg-default",
|
|
1554
1560
|
secondary: "text-fg-secondary",
|
|
1555
1561
|
tertiary: "text-fg-tertiary",
|
|
@@ -1560,7 +1566,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1560
1566
|
success: "text-fg-success",
|
|
1561
1567
|
warning: "text-fg-warning",
|
|
1562
1568
|
danger: "text-fg-danger"
|
|
1563
|
-
},
|
|
1569
|
+
}, An = {
|
|
1564
1570
|
"h-xl": "h1",
|
|
1565
1571
|
"h-lg": "h1",
|
|
1566
1572
|
"h-md": "h2",
|
|
@@ -1578,18 +1584,18 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1578
1584
|
"label-sm": "span",
|
|
1579
1585
|
"label-xs": "span",
|
|
1580
1586
|
"label-xxs": "span"
|
|
1581
|
-
},
|
|
1582
|
-
return i(r ??
|
|
1587
|
+
}, jn = a(function({ variant: e = "p-std", weight: t, color: n = "default", as: r, truncate: a, clamp: o, style: s, className: c, children: l, dataTestId: u, ...d }, f) {
|
|
1588
|
+
return i(r ?? An[e], {
|
|
1583
1589
|
ref: f,
|
|
1584
1590
|
"data-test-id": u,
|
|
1585
|
-
className: Q(
|
|
1591
|
+
className: Q(Dn[e], t && On[t], kn[n], a && "truncate", o && !a && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", c),
|
|
1586
1592
|
style: o && !a ? {
|
|
1587
1593
|
...s,
|
|
1588
1594
|
WebkitLineClamp: o
|
|
1589
1595
|
} : s,
|
|
1590
1596
|
...d
|
|
1591
1597
|
}, l);
|
|
1592
|
-
}),
|
|
1598
|
+
}), Mn = {
|
|
1593
1599
|
"en-US": {
|
|
1594
1600
|
mobile: {
|
|
1595
1601
|
title: "Mobile only",
|
|
@@ -1644,34 +1650,34 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1644
1650
|
description: "Այս էջը հասանելի է միայն մոբայլ և պլանշետ սարքերում։ Շարունակելու համար խնդրում ենք բացել այն ձեր հեռախոսում կամ պլանշետում։"
|
|
1645
1651
|
}
|
|
1646
1652
|
}
|
|
1647
|
-
},
|
|
1648
|
-
mobile:
|
|
1649
|
-
tablet:
|
|
1650
|
-
desktop:
|
|
1651
|
-
"mobile-tablet":
|
|
1652
|
-
},
|
|
1653
|
-
let u =
|
|
1653
|
+
}, Nn = {
|
|
1654
|
+
mobile: ue,
|
|
1655
|
+
tablet: fe,
|
|
1656
|
+
desktop: L,
|
|
1657
|
+
"mobile-tablet": pe
|
|
1658
|
+
}, Pn = a(function({ type: e = "desktop", locale: t = "en-US", title: n, description: r, icon: i, fillHeight: a = !1, className: o, dataTestId: s, ...c }, l) {
|
|
1659
|
+
let u = Mn[t][e];
|
|
1654
1660
|
return /* @__PURE__ */ J("div", {
|
|
1655
1661
|
ref: l,
|
|
1656
1662
|
"data-test-id": s,
|
|
1657
1663
|
className: Q("flex flex-col items-center justify-center text-center px-6 py-16", a && "h-full", o),
|
|
1658
1664
|
...c,
|
|
1659
1665
|
children: [
|
|
1660
|
-
i ?? /* @__PURE__ */ q(
|
|
1661
|
-
icon:
|
|
1666
|
+
i ?? /* @__PURE__ */ q(En, {
|
|
1667
|
+
icon: Nn[e],
|
|
1662
1668
|
tone: "gray",
|
|
1663
1669
|
shape: "rounded",
|
|
1664
1670
|
size: "xl",
|
|
1665
1671
|
className: "rounded-2xl"
|
|
1666
1672
|
}),
|
|
1667
|
-
/* @__PURE__ */ q(
|
|
1673
|
+
/* @__PURE__ */ q(jn, {
|
|
1668
1674
|
as: "h3",
|
|
1669
1675
|
variant: "h-xs",
|
|
1670
1676
|
weight: "semibold",
|
|
1671
1677
|
className: "mt-6",
|
|
1672
1678
|
children: n ?? u.title
|
|
1673
1679
|
}),
|
|
1674
|
-
/* @__PURE__ */ q(
|
|
1680
|
+
/* @__PURE__ */ q(jn, {
|
|
1675
1681
|
variant: "p-md",
|
|
1676
1682
|
color: "secondary",
|
|
1677
1683
|
className: "mt-2 max-w-105",
|
|
@@ -1679,7 +1685,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1679
1685
|
})
|
|
1680
1686
|
]
|
|
1681
1687
|
});
|
|
1682
|
-
}),
|
|
1688
|
+
}), Fn = {
|
|
1683
1689
|
brand: "bg-brand-500",
|
|
1684
1690
|
blue: "bg-blue-500",
|
|
1685
1691
|
purple: "bg-purple-500",
|
|
@@ -1687,10 +1693,10 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1687
1693
|
yellow: "bg-yellow-500",
|
|
1688
1694
|
red: "bg-red-500",
|
|
1689
1695
|
gray: "bg-gray-400"
|
|
1690
|
-
},
|
|
1696
|
+
}, In = {
|
|
1691
1697
|
sm: "h-1",
|
|
1692
1698
|
lg: "h-2"
|
|
1693
|
-
},
|
|
1699
|
+
}, Ln = (e) => new Intl.NumberFormat().format(e), Rn = a(function({ segments: e, hideLegend: t = !1, formatValue: n = Ln, size: r = "lg", className: i, dataTestId: a, ...o }, s) {
|
|
1694
1700
|
let c = e.reduce((e, t) => e + t.value, 0);
|
|
1695
1701
|
return /* @__PURE__ */ J("div", {
|
|
1696
1702
|
ref: s,
|
|
@@ -1698,10 +1704,10 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1698
1704
|
className: Q("flex flex-col gap-3", i),
|
|
1699
1705
|
...o,
|
|
1700
1706
|
children: [/* @__PURE__ */ q("div", {
|
|
1701
|
-
className: Q("flex w-full overflow-hidden rounded-full bg-bg-subtle",
|
|
1707
|
+
className: Q("flex w-full overflow-hidden rounded-full bg-bg-subtle", In[r]),
|
|
1702
1708
|
children: e.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1703
1709
|
style: { flexBasis: `${c > 0 ? e.value / c * 100 : 0}%` },
|
|
1704
|
-
className: Q("transition-[flex-basis] duration-700 ease-out",
|
|
1710
|
+
className: Q("transition-[flex-basis] duration-700 ease-out", Fn[e.color])
|
|
1705
1711
|
}, t))
|
|
1706
1712
|
}), !t && /* @__PURE__ */ q("ul", {
|
|
1707
1713
|
className: "flex flex-col [&>li:not(:last-child)]:border-b [&>li:not(:last-child)]:border-border-default",
|
|
@@ -1709,7 +1715,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1709
1715
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
1710
1716
|
children: [/* @__PURE__ */ J("span", {
|
|
1711
1717
|
className: "flex min-w-0 items-center gap-2",
|
|
1712
|
-
children: [/* @__PURE__ */ q("span", { className: Q("size-2 shrink-0 rounded-full",
|
|
1718
|
+
children: [/* @__PURE__ */ q("span", { className: Q("size-2 shrink-0 rounded-full", Fn[e.color]) }), /* @__PURE__ */ q("span", {
|
|
1713
1719
|
className: "truncate text-p-sm text-fg-tertiary",
|
|
1714
1720
|
children: e.label
|
|
1715
1721
|
})]
|
|
@@ -1720,24 +1726,24 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1720
1726
|
}, t))
|
|
1721
1727
|
})]
|
|
1722
1728
|
});
|
|
1723
|
-
}),
|
|
1729
|
+
}), zn = {
|
|
1724
1730
|
fast: 150,
|
|
1725
1731
|
base: 200,
|
|
1726
1732
|
slow: 300
|
|
1727
1733
|
};
|
|
1728
|
-
function
|
|
1734
|
+
function Bn() {
|
|
1729
1735
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1730
1736
|
}
|
|
1731
1737
|
//#endregion
|
|
1732
1738
|
//#region src/lib/useMountTransition.ts
|
|
1733
|
-
function
|
|
1739
|
+
function Vn(e, t) {
|
|
1734
1740
|
let [n, r] = m(e), [i, a] = m(e ? "entered" : "closed"), o = p(null), s = p(null);
|
|
1735
1741
|
return l(() => {
|
|
1736
1742
|
o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current), e ? (r(!0), a("entering"), s.current = requestAnimationFrame(() => {
|
|
1737
1743
|
s.current = requestAnimationFrame(() => a("entered"));
|
|
1738
1744
|
})) : (() => {
|
|
1739
1745
|
a((e) => e === "closed" ? "closed" : "exiting");
|
|
1740
|
-
let e =
|
|
1746
|
+
let e = Bn() ? 0 : t;
|
|
1741
1747
|
e === 0 ? (r(!1), a("closed")) : o.current = setTimeout(() => {
|
|
1742
1748
|
r(!1), a("closed");
|
|
1743
1749
|
}, e);
|
|
@@ -1751,12 +1757,12 @@ function zn(e, t) {
|
|
|
1751
1757
|
}
|
|
1752
1758
|
//#endregion
|
|
1753
1759
|
//#region src/hooks/useStepper.ts
|
|
1754
|
-
function
|
|
1760
|
+
function Hn(e, t) {
|
|
1755
1761
|
return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
|
|
1756
1762
|
}
|
|
1757
|
-
function
|
|
1758
|
-
let [a, o] = m(() =>
|
|
1759
|
-
let n =
|
|
1763
|
+
function Un({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
|
|
1764
|
+
let [a, o] = m(() => Hn(t, e)), s = n !== void 0, c = s ? Hn(n, e) : a, l = (t) => {
|
|
1765
|
+
let n = Hn(t, e);
|
|
1760
1766
|
s || o(n), r?.(n);
|
|
1761
1767
|
};
|
|
1762
1768
|
return {
|
|
@@ -1784,37 +1790,37 @@ function Vn({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i =
|
|
|
1784
1790
|
}
|
|
1785
1791
|
//#endregion
|
|
1786
1792
|
//#region src/hooks/useOnOutsideClick.ts
|
|
1787
|
-
var
|
|
1788
|
-
function
|
|
1789
|
-
let t =
|
|
1793
|
+
var Wn = [];
|
|
1794
|
+
function Gn(e) {
|
|
1795
|
+
let t = Wn[Wn.length - 1];
|
|
1790
1796
|
if (!t) return;
|
|
1791
1797
|
let { ref: n, callback: r, shouldRemoveCallback: i } = t;
|
|
1792
|
-
n && !n.contains(e.target) && (i &&
|
|
1798
|
+
n && !n.contains(e.target) && (i && Wn.splice(Wn.length - 1, 1), r(e));
|
|
1793
1799
|
}
|
|
1794
|
-
var
|
|
1800
|
+
var Kn = (e, t, n, r, i = !0) => {
|
|
1795
1801
|
l(() => {
|
|
1796
|
-
if (e && n && r) return
|
|
1802
|
+
if (e && n && r) return Wn.push({
|
|
1797
1803
|
ref: e,
|
|
1798
1804
|
callback: t,
|
|
1799
1805
|
uid: r,
|
|
1800
1806
|
shouldRemoveCallback: i
|
|
1801
|
-
}),
|
|
1802
|
-
|
|
1807
|
+
}), Wn.length === 1 && document.addEventListener("mousedown", Gn), () => {
|
|
1808
|
+
Wn.length === 0 && document.removeEventListener("mousedown", Gn);
|
|
1803
1809
|
};
|
|
1804
1810
|
}, [
|
|
1805
1811
|
e,
|
|
1806
1812
|
n,
|
|
1807
1813
|
r
|
|
1808
1814
|
]), l(() => {
|
|
1809
|
-
if (!n &&
|
|
1810
|
-
let e =
|
|
1811
|
-
e >= 0 &&
|
|
1815
|
+
if (!n && Wn.length > 0) {
|
|
1816
|
+
let e = Wn.findIndex((e) => e.uid === r);
|
|
1817
|
+
e >= 0 && Wn.splice(e, 1);
|
|
1812
1818
|
}
|
|
1813
1819
|
}, [n]);
|
|
1814
1820
|
};
|
|
1815
1821
|
//#endregion
|
|
1816
1822
|
//#region src/hooks/useEscapeKey.ts
|
|
1817
|
-
function
|
|
1823
|
+
function qn(e, t = !0) {
|
|
1818
1824
|
l(() => {
|
|
1819
1825
|
if (!t) return;
|
|
1820
1826
|
let n = (t) => {
|
|
@@ -1825,18 +1831,18 @@ function Gn(e, t = !0) {
|
|
|
1825
1831
|
}
|
|
1826
1832
|
//#endregion
|
|
1827
1833
|
//#region src/hooks/useHideBodyScroll.ts
|
|
1828
|
-
var
|
|
1829
|
-
function
|
|
1834
|
+
var Jn = 0, Yn = "";
|
|
1835
|
+
function Xn(e) {
|
|
1830
1836
|
l(() => {
|
|
1831
|
-
if (e) return
|
|
1832
|
-
--
|
|
1837
|
+
if (e) return Jn === 0 && (Yn = document.body.style.overflow, document.body.style.overflow = "hidden"), Jn += 1, () => {
|
|
1838
|
+
--Jn, Jn === 0 && (document.body.style.overflow = Yn);
|
|
1833
1839
|
};
|
|
1834
1840
|
}, [e]);
|
|
1835
1841
|
}
|
|
1836
1842
|
//#endregion
|
|
1837
1843
|
//#region src/hooks/useIsMobile.ts
|
|
1838
|
-
var
|
|
1839
|
-
function
|
|
1844
|
+
var Zn = 768;
|
|
1845
|
+
function Qn(e = Zn) {
|
|
1840
1846
|
let [t, n] = m(!1);
|
|
1841
1847
|
return l(() => {
|
|
1842
1848
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -1846,100 +1852,96 @@ function Xn(e = Yn) {
|
|
|
1846
1852
|
}
|
|
1847
1853
|
//#endregion
|
|
1848
1854
|
//#region src/lib/FormContext.ts
|
|
1849
|
-
var
|
|
1855
|
+
var $n = r(null);
|
|
1850
1856
|
//#endregion
|
|
1851
1857
|
//#region src/hooks/useFormContext.ts
|
|
1852
|
-
function
|
|
1853
|
-
let e = c(
|
|
1858
|
+
function er() {
|
|
1859
|
+
let e = c($n);
|
|
1854
1860
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
1855
1861
|
return e;
|
|
1856
1862
|
}
|
|
1857
1863
|
//#endregion
|
|
1858
1864
|
//#region src/hooks/useFormProps.ts
|
|
1859
|
-
var
|
|
1865
|
+
var tr = () => void 0, nr = {
|
|
1860
1866
|
errors: {},
|
|
1861
|
-
setValue:
|
|
1862
|
-
reset:
|
|
1863
|
-
clearErrors:
|
|
1864
|
-
setError:
|
|
1865
|
-
unregister:
|
|
1867
|
+
setValue: tr,
|
|
1868
|
+
reset: tr,
|
|
1869
|
+
clearErrors: tr,
|
|
1870
|
+
setError: tr,
|
|
1871
|
+
unregister: tr,
|
|
1866
1872
|
isDirty: !1,
|
|
1867
1873
|
isSubmitted: !1,
|
|
1868
1874
|
isSubmitting: !1,
|
|
1869
1875
|
isValid: !1,
|
|
1870
1876
|
dirtyFields: {},
|
|
1871
|
-
submit:
|
|
1877
|
+
submit: tr
|
|
1872
1878
|
};
|
|
1873
|
-
function
|
|
1874
|
-
return c(
|
|
1879
|
+
function rr() {
|
|
1880
|
+
return c($n) ?? nr;
|
|
1875
1881
|
}
|
|
1876
1882
|
//#endregion
|
|
1877
1883
|
//#region src/components/Drawer/Drawer.tsx
|
|
1878
|
-
var
|
|
1884
|
+
var ir = {
|
|
1879
1885
|
sm: "w-[320px]",
|
|
1880
1886
|
md: "w-[420px]",
|
|
1881
1887
|
lg: "w-[560px]",
|
|
1882
1888
|
xl: "w-[720px]"
|
|
1883
|
-
},
|
|
1889
|
+
}, ar = {
|
|
1884
1890
|
sm: "h-[240px]",
|
|
1885
1891
|
md: "h-[360px]",
|
|
1886
1892
|
lg: "h-[480px]",
|
|
1887
1893
|
xl: "h-[600px]"
|
|
1888
|
-
},
|
|
1894
|
+
}, or = {
|
|
1889
1895
|
right: "inset-y-0 right-0 border-l",
|
|
1890
1896
|
left: "inset-y-0 left-0 border-r",
|
|
1891
1897
|
top: "inset-x-0 top-0 border-b",
|
|
1892
1898
|
bottom: "inset-x-0 bottom-0 border-t"
|
|
1893
|
-
},
|
|
1899
|
+
}, sr = {
|
|
1894
1900
|
right: "translate-x-full",
|
|
1895
1901
|
left: "-translate-x-full",
|
|
1896
1902
|
top: "-translate-y-full",
|
|
1897
1903
|
bottom: "translate-y-full"
|
|
1898
|
-
},
|
|
1899
|
-
let
|
|
1900
|
-
if (
|
|
1901
|
-
let e =
|
|
1902
|
-
if (!(!
|
|
1904
|
+
}, cr = a(function({ open: e, onClose: t, side: n = "right", size: r = "md", title: i, description: a, children: o, footer: s, closeOnOverlayClick: c = !0, showClose: u = !0, animated: d = !0, headerActions: f, className: h, dataTestId: g }, _) {
|
|
1905
|
+
let v = p(null), [y, b] = m(null), x = p(null), { mounted: S, state: C } = Vn(e, d ? zn.slow : 0), w = C === "entered";
|
|
1906
|
+
if (Xn(S), l(() => {
|
|
1907
|
+
let e = v.current;
|
|
1908
|
+
if (!(!S || !e || e.open)) return e.showModal(), x.current?.focus({ preventScroll: !0 }), () => {
|
|
1903
1909
|
e.open && e.close();
|
|
1904
1910
|
};
|
|
1905
|
-
}, [
|
|
1911
|
+
}, [S]), l(() => {
|
|
1906
1912
|
if (!e) return;
|
|
1907
1913
|
let t = document.activeElement;
|
|
1908
|
-
return
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
}, [e]), !y) return null;
|
|
1913
|
-
let S = n === "left" || n === "right", C = S ? nr[r] : rr[r];
|
|
1914
|
-
return _e(/* @__PURE__ */ J("dialog", {
|
|
1915
|
-
ref: _,
|
|
1914
|
+
return x.current?.focus({ preventScroll: !0 }), () => t?.focus?.();
|
|
1915
|
+
}, [e]), !S) return null;
|
|
1916
|
+
let T = n === "left" || n === "right", E = T ? ir[r] : ar[r], D = /* @__PURE__ */ J("dialog", {
|
|
1917
|
+
ref: Gt(v, b),
|
|
1916
1918
|
onCancel: (e) => {
|
|
1917
1919
|
e.preventDefault(), t();
|
|
1918
1920
|
},
|
|
1919
|
-
inert:
|
|
1921
|
+
inert: C === "exiting",
|
|
1920
1922
|
"aria-labelledby": i ? "drawer-title" : void 0,
|
|
1921
1923
|
"aria-describedby": a ? "drawer-desc" : void 0,
|
|
1922
|
-
className: "fixed inset-0 z-50 m-0 h-full max-h-none w-full max-w-none overflow-
|
|
1923
|
-
"data-test-id":
|
|
1924
|
+
className: "fixed inset-0 z-50 m-0 h-full max-h-none w-full max-w-none overflow-clip border-0 bg-transparent p-0 text-inherit backdrop:bg-transparent",
|
|
1925
|
+
"data-test-id": g,
|
|
1924
1926
|
children: [/* @__PURE__ */ q("div", {
|
|
1925
|
-
className: Q("absolute inset-0 bg-black/50", d && "transition-opacity duration-200 motion-reduce:transition-none",
|
|
1927
|
+
className: Q("absolute inset-0 bg-black/50", d && "transition-opacity duration-200 motion-reduce:transition-none", w ? "opacity-100" : "opacity-0"),
|
|
1926
1928
|
onClick: () => c && t(),
|
|
1927
1929
|
"aria-hidden": !0
|
|
1928
1930
|
}), /* @__PURE__ */ J("div", {
|
|
1929
|
-
ref: Gt(
|
|
1931
|
+
ref: Gt(_, x),
|
|
1930
1932
|
tabIndex: -1,
|
|
1931
|
-
className: Q("absolute bg-bg-default shadow-z5 outline-none flex flex-col",
|
|
1933
|
+
className: Q("absolute bg-bg-default shadow-z5 outline-none flex flex-col", or[n], T ? `${E} h-full max-w-full` : `${E} w-full max-h-full`, "border-border-default", d && "transition-transform duration-300 ease-out motion-reduce:transition-none will-change-transform", w ? "translate-x-0 translate-y-0" : sr[n], h),
|
|
1932
1934
|
children: [
|
|
1933
1935
|
(i || u || f) && /* @__PURE__ */ J("div", {
|
|
1934
1936
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
|
|
1935
1937
|
children: [/* @__PURE__ */ J("div", {
|
|
1936
1938
|
className: "flex-1 min-w-0",
|
|
1937
1939
|
children: [i && /* @__PURE__ */ q("h2", {
|
|
1938
|
-
"data-test-id":
|
|
1940
|
+
"data-test-id": g ? `${g}-drawer-title` : void 0,
|
|
1939
1941
|
className: "text-h-xs font-semibold text-fg-default",
|
|
1940
1942
|
children: i
|
|
1941
1943
|
}), a && /* @__PURE__ */ q("p", {
|
|
1942
|
-
"data-test-id":
|
|
1944
|
+
"data-test-id": g ? `${g}-drawer-subtitle` : void 0,
|
|
1943
1945
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
1944
1946
|
children: a
|
|
1945
1947
|
})]
|
|
@@ -1949,7 +1951,7 @@ var nr = {
|
|
|
1949
1951
|
type: "button",
|
|
1950
1952
|
onClick: t,
|
|
1951
1953
|
"aria-label": "Close",
|
|
1952
|
-
"data-test-id":
|
|
1954
|
+
"data-test-id": g ? `${g}-drawer-close-button` : void 0,
|
|
1953
1955
|
className: "p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
1954
1956
|
children: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
|
|
1955
1957
|
})]
|
|
@@ -1965,57 +1967,12 @@ var nr = {
|
|
|
1965
1967
|
})
|
|
1966
1968
|
]
|
|
1967
1969
|
})]
|
|
1968
|
-
}), document.body);
|
|
1969
|
-
}), sr = 8;
|
|
1970
|
-
function cr({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "start", offset: a = 4, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1 }) {
|
|
1971
|
-
let [l, u] = m({
|
|
1972
|
-
style: {
|
|
1973
|
-
position: "fixed",
|
|
1974
|
-
top: 0,
|
|
1975
|
-
left: 0,
|
|
1976
|
-
visibility: "hidden"
|
|
1977
|
-
},
|
|
1978
|
-
resolvedSide: r
|
|
1979
1970
|
});
|
|
1980
|
-
return
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
let l = n.getBoundingClientRect(), d = t.getBoundingClientRect(), f = window.innerHeight, p = window.innerWidth, m = r;
|
|
1986
|
-
if (o) {
|
|
1987
|
-
let e = f - l.bottom, t = l.top;
|
|
1988
|
-
r === "bottom" && e < d.height + a && t > e ? m = "top" : r === "top" && t < d.height + a && e > t && (m = "bottom");
|
|
1989
|
-
}
|
|
1990
|
-
let h = m === "bottom" ? l.bottom + a : l.top - d.height - a, g = i === "end" ? l.right - d.width : l.left;
|
|
1991
|
-
s && (g = Math.min(Math.max(g, sr), p - d.width - sr)), u({
|
|
1992
|
-
style: {
|
|
1993
|
-
position: "fixed",
|
|
1994
|
-
top: h,
|
|
1995
|
-
left: g,
|
|
1996
|
-
minWidth: c ? l.width : void 0
|
|
1997
|
-
},
|
|
1998
|
-
resolvedSide: m
|
|
1999
|
-
});
|
|
2000
|
-
};
|
|
2001
|
-
return l(), window.addEventListener("resize", l), document.addEventListener("scroll", l, {
|
|
2002
|
-
capture: !0,
|
|
2003
|
-
passive: !0
|
|
2004
|
-
}), () => {
|
|
2005
|
-
window.removeEventListener("resize", l), document.removeEventListener("scroll", l, { capture: !0 });
|
|
2006
|
-
};
|
|
2007
|
-
}, [
|
|
2008
|
-
n,
|
|
2009
|
-
e,
|
|
2010
|
-
t,
|
|
2011
|
-
r,
|
|
2012
|
-
i,
|
|
2013
|
-
a,
|
|
2014
|
-
o,
|
|
2015
|
-
s,
|
|
2016
|
-
c
|
|
2017
|
-
]), l;
|
|
2018
|
-
}
|
|
1971
|
+
return _e(/* @__PURE__ */ q(Kt.Provider, {
|
|
1972
|
+
value: y,
|
|
1973
|
+
children: D
|
|
1974
|
+
}), document.body);
|
|
1975
|
+
});
|
|
2019
1976
|
//#endregion
|
|
2020
1977
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
2021
1978
|
function lr(e) {
|
|
@@ -2068,10 +2025,10 @@ function pr({ children: e }) {
|
|
|
2068
2025
|
});
|
|
2069
2026
|
}
|
|
2070
2027
|
var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", hr = a(function({ children: e, align: t = "start", strategy: n = "fixed", side: r = "bottom", sideOffset: i = 4, flip: a = !0, shift: o = !0, matchTriggerWidth: s = !1, closeOnScroll: c = !1, autoFocusFirstItem: u = !0, className: d, dataTestId: h, onClick: g, ..._ }, v) {
|
|
2071
|
-
let { open: y, setOpen: b, triggerRef: x, anchorRef: S } = dr(), C = p(null), [w, T] = m(null),
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2028
|
+
let { open: y, setOpen: b, triggerRef: x, anchorRef: S } = dr(), C = p(null), [w, T] = m(null), E = f(() => ({ get current() {
|
|
2029
|
+
return lr(S) ?? x.current;
|
|
2030
|
+
} }), [S, x]), D = qt(), { style: O, resolvedSide: k } = Xt({
|
|
2031
|
+
anchor: E,
|
|
2075
2032
|
panel: w,
|
|
2076
2033
|
open: y && n === "fixed",
|
|
2077
2034
|
side: r,
|
|
@@ -2111,11 +2068,11 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2111
2068
|
});
|
|
2112
2069
|
return () => cancelAnimationFrame(e);
|
|
2113
2070
|
}, [y, u]), !y) return null;
|
|
2114
|
-
let
|
|
2071
|
+
let A = /* @__PURE__ */ q("div", {
|
|
2115
2072
|
ref: Gt(v, C, n === "fixed" ? T : void 0),
|
|
2116
2073
|
role: "menu",
|
|
2117
2074
|
"data-test-id": h,
|
|
2118
|
-
"data-side": n === "fixed" ?
|
|
2075
|
+
"data-side": n === "fixed" ? k : void 0,
|
|
2119
2076
|
"data-align": t,
|
|
2120
2077
|
onKeyDown: (e) => {
|
|
2121
2078
|
let t = Array.from(C.current?.querySelectorAll("[role=\"menuitem\"]:not(:disabled)") ?? []);
|
|
@@ -2126,12 +2083,12 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2126
2083
|
onClick: (e) => {
|
|
2127
2084
|
g?.(e), e.stopPropagation();
|
|
2128
2085
|
},
|
|
2129
|
-
style: n === "fixed" ?
|
|
2086
|
+
style: n === "fixed" ? O : void 0,
|
|
2130
2087
|
className: Q(mr, n === "absolute" && Q("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), d),
|
|
2131
2088
|
..._,
|
|
2132
2089
|
children: e
|
|
2133
2090
|
});
|
|
2134
|
-
return n === "fixed" ? _e(
|
|
2091
|
+
return n === "fixed" ? _e(A, D ?? document.body) : A;
|
|
2135
2092
|
}), gr = a(function({ children: e, onSelect: t, disabled: n, icon: r, shortcut: i, destructive: a, checked: o, meta: s, className: c, dataTestId: l, onClick: u, ...d }, f) {
|
|
2136
2093
|
let { setOpen: p } = dr();
|
|
2137
2094
|
return /* @__PURE__ */ J("button", {
|
|
@@ -2171,11 +2128,10 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2171
2128
|
]
|
|
2172
2129
|
});
|
|
2173
2130
|
}), _r = a(function({ className: e, dataTestId: t, ...n }, r) {
|
|
2174
|
-
return /* @__PURE__ */ q("
|
|
2131
|
+
return /* @__PURE__ */ q("hr", {
|
|
2175
2132
|
ref: r,
|
|
2176
|
-
role: "separator",
|
|
2177
2133
|
"data-test-id": t,
|
|
2178
|
-
className: Q("my-1 h-px bg-border-default", e),
|
|
2134
|
+
className: Q("my-1 h-px border-0 bg-border-default", e),
|
|
2179
2135
|
...n
|
|
2180
2136
|
});
|
|
2181
2137
|
}), vr = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
|
|
@@ -2199,20 +2155,20 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2199
2155
|
className: Q("flex flex-col items-center justify-center text-center", yr[e], a),
|
|
2200
2156
|
...s,
|
|
2201
2157
|
children: [
|
|
2202
|
-
r ?? /* @__PURE__ */ q(
|
|
2203
|
-
icon:
|
|
2158
|
+
r ?? /* @__PURE__ */ q(En, {
|
|
2159
|
+
icon: le,
|
|
2204
2160
|
tone: "gray",
|
|
2205
2161
|
shape: "circle",
|
|
2206
2162
|
size: br[e]
|
|
2207
2163
|
}),
|
|
2208
|
-
t && /* @__PURE__ */ q(
|
|
2164
|
+
t && /* @__PURE__ */ q(jn, {
|
|
2209
2165
|
as: "h3",
|
|
2210
2166
|
variant: e === "lg" ? "h-sm" : "h-xs",
|
|
2211
2167
|
weight: "semibold",
|
|
2212
2168
|
className: "mt-2",
|
|
2213
2169
|
children: t
|
|
2214
2170
|
}),
|
|
2215
|
-
n && /* @__PURE__ */ q(
|
|
2171
|
+
n && /* @__PURE__ */ q(jn, {
|
|
2216
2172
|
variant: e === "lg" ? "p-sm" : "p-xs",
|
|
2217
2173
|
color: "secondary",
|
|
2218
2174
|
className: "max-w-sm",
|
|
@@ -2332,7 +2288,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2332
2288
|
"data-test-id": f,
|
|
2333
2289
|
className: Q("flex flex-col gap-4", t),
|
|
2334
2290
|
...p,
|
|
2335
|
-
children: /* @__PURE__ */ J(
|
|
2291
|
+
children: /* @__PURE__ */ J($n.Provider, {
|
|
2336
2292
|
value: N,
|
|
2337
2293
|
children: [e, i && i.length > 0 && /* @__PURE__ */ q("div", {
|
|
2338
2294
|
className: "flex items-center gap-3",
|
|
@@ -2342,7 +2298,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2342
2298
|
})
|
|
2343
2299
|
});
|
|
2344
2300
|
}), Er = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
|
|
2345
|
-
let s = c(
|
|
2301
|
+
let s = c($n);
|
|
2346
2302
|
if (!s) throw Error("FormField must be rendered inside a FormContainer.");
|
|
2347
2303
|
return /* @__PURE__ */ q("div", {
|
|
2348
2304
|
ref: o,
|
|
@@ -2375,7 +2331,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2375
2331
|
className: Q("flex items-start gap-3", a),
|
|
2376
2332
|
...s,
|
|
2377
2333
|
children: [
|
|
2378
|
-
/* @__PURE__ */ q(
|
|
2334
|
+
/* @__PURE__ */ q(En, {
|
|
2379
2335
|
icon: e,
|
|
2380
2336
|
tone: t,
|
|
2381
2337
|
size: "md"
|
|
@@ -2420,7 +2376,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2420
2376
|
discovery: {
|
|
2421
2377
|
container: "bg-purple-50 border-purple-200",
|
|
2422
2378
|
iconColor: "text-purple-700",
|
|
2423
|
-
DefaultIcon:
|
|
2379
|
+
DefaultIcon: V
|
|
2424
2380
|
}
|
|
2425
2381
|
}, kr = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
2426
2382
|
let { container: u, iconColor: d, DefaultIcon: f } = Or[e];
|
|
@@ -2470,7 +2426,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2470
2426
|
target: u,
|
|
2471
2427
|
rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
|
|
2472
2428
|
};
|
|
2473
|
-
return /* @__PURE__ */ J(
|
|
2429
|
+
return /* @__PURE__ */ J(jn, {
|
|
2474
2430
|
as: "a",
|
|
2475
2431
|
ref: p,
|
|
2476
2432
|
variant: e,
|
|
@@ -2499,18 +2455,19 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2499
2455
|
xl: "max-w-2xl",
|
|
2500
2456
|
"2xl": "max-w-4xl"
|
|
2501
2457
|
}, Mr = a(function({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "md", closeOnOverlayClick: s = !0, showClose: c = !0, className: u, dataTestId: d }, f) {
|
|
2502
|
-
let
|
|
2503
|
-
|
|
2504
|
-
let t =
|
|
2505
|
-
if (!(!e || !t || t.open)) return t.showModal(),
|
|
2458
|
+
let h = p(null), [g, _] = m(null), v = p(null);
|
|
2459
|
+
if (Xn(e), l(() => {
|
|
2460
|
+
let t = h.current;
|
|
2461
|
+
if (!(!e || !t || t.open)) return t.showModal(), v.current?.focus(), () => {
|
|
2506
2462
|
t.open && t.close();
|
|
2507
2463
|
};
|
|
2508
2464
|
}, [e]), l(() => {
|
|
2509
2465
|
if (!e) return;
|
|
2510
2466
|
let t = document.activeElement;
|
|
2511
|
-
return
|
|
2512
|
-
}, [e]), e
|
|
2513
|
-
|
|
2467
|
+
return v.current?.focus(), () => t?.focus?.();
|
|
2468
|
+
}, [e]), !e) return null;
|
|
2469
|
+
let y = /* @__PURE__ */ J("dialog", {
|
|
2470
|
+
ref: Gt(h, _),
|
|
2514
2471
|
onCancel: (e) => {
|
|
2515
2472
|
e.preventDefault(), t();
|
|
2516
2473
|
},
|
|
@@ -2522,7 +2479,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2522
2479
|
onClick: () => s && t(),
|
|
2523
2480
|
"aria-hidden": !0
|
|
2524
2481
|
}), /* @__PURE__ */ J("div", {
|
|
2525
|
-
ref: Gt(
|
|
2482
|
+
ref: Gt(v, f),
|
|
2526
2483
|
tabIndex: -1,
|
|
2527
2484
|
"data-test-id": d,
|
|
2528
2485
|
className: Q("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", jr[o], u),
|
|
@@ -2559,7 +2516,11 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2559
2516
|
})
|
|
2560
2517
|
]
|
|
2561
2518
|
})]
|
|
2562
|
-
})
|
|
2519
|
+
});
|
|
2520
|
+
return _e(/* @__PURE__ */ q(Kt.Provider, {
|
|
2521
|
+
value: g,
|
|
2522
|
+
children: y
|
|
2523
|
+
}), document.body);
|
|
2563
2524
|
}), Nr = {
|
|
2564
2525
|
brand: "bg-brand-500 text-white",
|
|
2565
2526
|
danger: "bg-red-600 text-white",
|
|
@@ -2628,7 +2589,7 @@ var zr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2628
2589
|
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ q("span", {
|
|
2629
2590
|
"aria-hidden": !0,
|
|
2630
2591
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2631
|
-
children: /* @__PURE__ */ q(
|
|
2592
|
+
children: /* @__PURE__ */ q(z, { className: "h-4 w-4" })
|
|
2632
2593
|
}, `${t}-${r}`);
|
|
2633
2594
|
let i = t === e;
|
|
2634
2595
|
return /* @__PURE__ */ q("button", {
|
|
@@ -2887,7 +2848,7 @@ var zr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2887
2848
|
"data-test-id": d,
|
|
2888
2849
|
className: Q("flex flex-col gap-1", l),
|
|
2889
2850
|
...f,
|
|
2890
|
-
children: [/* @__PURE__ */ q(
|
|
2851
|
+
children: [/* @__PURE__ */ q(jn, {
|
|
2891
2852
|
id: y,
|
|
2892
2853
|
clamp: v ? void 0 : t,
|
|
2893
2854
|
...c,
|
|
@@ -3058,20 +3019,20 @@ function yi(e, t) {
|
|
|
3058
3019
|
};
|
|
3059
3020
|
}
|
|
3060
3021
|
function bi(e) {
|
|
3061
|
-
return /* @__PURE__ */ q(
|
|
3022
|
+
return /* @__PURE__ */ q(Y.Control, {
|
|
3062
3023
|
...e,
|
|
3063
3024
|
innerProps: yi(e.innerProps, vi(e.selectProps, "trigger"))
|
|
3064
3025
|
});
|
|
3065
3026
|
}
|
|
3066
3027
|
function xi(e) {
|
|
3067
3028
|
let t = { "data-test-id": vi(e.selectProps, "search") };
|
|
3068
|
-
return /* @__PURE__ */ q(
|
|
3029
|
+
return /* @__PURE__ */ q(Y.Input, {
|
|
3069
3030
|
...e,
|
|
3070
3031
|
...t
|
|
3071
3032
|
});
|
|
3072
3033
|
}
|
|
3073
3034
|
function Si(e) {
|
|
3074
|
-
return /* @__PURE__ */ q(
|
|
3035
|
+
return /* @__PURE__ */ q(Y.DropdownIndicator, {
|
|
3075
3036
|
...e,
|
|
3076
3037
|
children: /* @__PURE__ */ q(S, {
|
|
3077
3038
|
className: Q("h-4 w-4 transition-transform", e.selectProps.menuIsOpen && "rotate-180"),
|
|
@@ -3080,7 +3041,7 @@ function Si(e) {
|
|
|
3080
3041
|
});
|
|
3081
3042
|
}
|
|
3082
3043
|
function Ci(e) {
|
|
3083
|
-
return /* @__PURE__ */ q(
|
|
3044
|
+
return /* @__PURE__ */ q(Y.ClearIndicator, {
|
|
3084
3045
|
...e,
|
|
3085
3046
|
innerProps: yi(e.innerProps, vi(e.selectProps, "clear")),
|
|
3086
3047
|
children: /* @__PURE__ */ q(U, {
|
|
@@ -3090,7 +3051,7 @@ function Ci(e) {
|
|
|
3090
3051
|
});
|
|
3091
3052
|
}
|
|
3092
3053
|
function wi(e) {
|
|
3093
|
-
return /* @__PURE__ */ q(
|
|
3054
|
+
return /* @__PURE__ */ q(Y.MultiValueRemove, {
|
|
3094
3055
|
...e,
|
|
3095
3056
|
innerProps: {
|
|
3096
3057
|
...e.innerProps,
|
|
@@ -3104,13 +3065,13 @@ function wi(e) {
|
|
|
3104
3065
|
}
|
|
3105
3066
|
function Ti(e) {
|
|
3106
3067
|
let { visibleTagCount: t } = e.selectProps;
|
|
3107
|
-
return t === void 0 || e.index < t ? /* @__PURE__ */ q(
|
|
3068
|
+
return t === void 0 || e.index < t ? /* @__PURE__ */ q(Y.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ J("span", {
|
|
3108
3069
|
className: li,
|
|
3109
3070
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
3110
3071
|
}) : null;
|
|
3111
3072
|
}
|
|
3112
3073
|
function Ei(e) {
|
|
3113
|
-
return /* @__PURE__ */ J(
|
|
3074
|
+
return /* @__PURE__ */ J(Y.Option, {
|
|
3114
3075
|
...e,
|
|
3115
3076
|
innerProps: yi(e.innerProps, vi(e.selectProps, `option-${String(e.data.value)}`)),
|
|
3116
3077
|
children: [e.children, e.isSelected && /* @__PURE__ */ q(b, {
|
|
@@ -3120,14 +3081,14 @@ function Ei(e) {
|
|
|
3120
3081
|
});
|
|
3121
3082
|
}
|
|
3122
3083
|
function Di() {
|
|
3123
|
-
return /* @__PURE__ */ q(
|
|
3084
|
+
return /* @__PURE__ */ q(P, {
|
|
3124
3085
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
3125
3086
|
"aria-hidden": !0
|
|
3126
3087
|
});
|
|
3127
3088
|
}
|
|
3128
3089
|
function Oi(e) {
|
|
3129
3090
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
3130
|
-
return /* @__PURE__ */ J(
|
|
3091
|
+
return /* @__PURE__ */ J(Y.Menu, {
|
|
3131
3092
|
...e,
|
|
3132
3093
|
innerProps: yi(e.innerProps, vi(e.selectProps, "content")),
|
|
3133
3094
|
children: [
|
|
@@ -3171,7 +3132,7 @@ function Oi(e) {
|
|
|
3171
3132
|
});
|
|
3172
3133
|
}
|
|
3173
3134
|
function ki(t) {
|
|
3174
|
-
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c =
|
|
3135
|
+
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = Ee({
|
|
3175
3136
|
count: o.length,
|
|
3176
3137
|
getScrollElement: () => s.current,
|
|
3177
3138
|
estimateSize: () => _i,
|
|
@@ -3202,28 +3163,28 @@ function ki(t) {
|
|
|
3202
3163
|
});
|
|
3203
3164
|
}
|
|
3204
3165
|
var Ai = a(function(e, t) {
|
|
3205
|
-
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, helperText: x, errorText: S, error: C = !1, required: w = !0, loading: T = !1, clearable: E = !1, searchable: D, virtualized: O = !1, emptyText: k, locale: A = "en-US", storageKey: j, saveSelectionLabel: M, size: ee = "md", disabled: te = !1, id: N, className:
|
|
3166
|
+
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, helperText: x, errorText: S, error: C = !1, required: w = !0, loading: T = !1, clearable: E = !1, searchable: D, virtualized: O = !1, emptyText: k, locale: A = "en-US", storageKey: j, saveSelectionLabel: M, size: ee = "md", disabled: te = !1, id: N, className: P, wrapperClassName: F, dataTestId: I, ...L } = e, R = e.isMulti ? !!e.singleLine : !1, z = ri[A], ne = v ?? z.placeholder, re = k ?? z.noResults, ie = c ?? ((e) => z.createLabel(e)), ae = u(), oe = N ?? ae, se = C || !!S, B = h !== void 0, [ce, le] = m(() => {
|
|
3206
3167
|
if (!d) {
|
|
3207
|
-
if (j && !
|
|
3168
|
+
if (j && !B) {
|
|
3208
3169
|
let e = fi(j);
|
|
3209
3170
|
if (e !== void 0) return e;
|
|
3210
3171
|
}
|
|
3211
3172
|
return g;
|
|
3212
3173
|
}
|
|
3213
|
-
}), [
|
|
3174
|
+
}), [ue, V] = m(() => {
|
|
3214
3175
|
if (!d) return [];
|
|
3215
|
-
if (j && !
|
|
3176
|
+
if (j && !B) {
|
|
3216
3177
|
let e = fi(j);
|
|
3217
3178
|
if (Array.isArray(e)) return e;
|
|
3218
3179
|
}
|
|
3219
3180
|
return g ?? [];
|
|
3220
|
-
}), [
|
|
3181
|
+
}), [de, fe] = m(() => !!j && pi(j)), [pe, me] = m(() => {
|
|
3221
3182
|
let e = /* @__PURE__ */ new Map();
|
|
3222
3183
|
for (let t of n) e.set(String(t.value), t);
|
|
3223
3184
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
3224
3185
|
return e;
|
|
3225
|
-
}),
|
|
3226
|
-
e.length !== 0 &&
|
|
3186
|
+
}), H = s((e) => {
|
|
3187
|
+
e.length !== 0 && me((t) => {
|
|
3227
3188
|
let n = !1, r = new Map(t);
|
|
3228
3189
|
for (let t of e) {
|
|
3229
3190
|
let e = String(t.value);
|
|
@@ -3233,57 +3194,57 @@ var Ai = a(function(e, t) {
|
|
|
3233
3194
|
});
|
|
3234
3195
|
}, []);
|
|
3235
3196
|
f(() => {
|
|
3236
|
-
|
|
3237
|
-
}, [n,
|
|
3238
|
-
let
|
|
3197
|
+
H(n);
|
|
3198
|
+
}, [n, H]);
|
|
3199
|
+
let he = s((e) => pe.get(String(e)) ?? {
|
|
3239
3200
|
value: e,
|
|
3240
3201
|
label: String(e)
|
|
3241
|
-
}, [
|
|
3242
|
-
|
|
3202
|
+
}, [pe]), W = B ? h : ce, G = f(() => (B ? h : ue) ?? [], [
|
|
3203
|
+
B,
|
|
3243
3204
|
h,
|
|
3244
|
-
|
|
3245
|
-
]), ge = !d && W !== void 0 ?
|
|
3246
|
-
if (r) return (e) => Promise.resolve(r(e)).then((e) => (
|
|
3247
|
-
}, [r,
|
|
3205
|
+
ue
|
|
3206
|
+
]), ge = !d && W !== void 0 ? he(W) : null, K = d ? G.map(he) : [], _e = f(() => {
|
|
3207
|
+
if (r) return (e) => Promise.resolve(r(e)).then((e) => (H(e), e));
|
|
3208
|
+
}, [r, H]), ve = s((e) => {
|
|
3248
3209
|
if (d) {
|
|
3249
3210
|
let t = [...e ?? []];
|
|
3250
|
-
|
|
3211
|
+
H(t);
|
|
3251
3212
|
let n = t.map((e) => e.value);
|
|
3252
|
-
|
|
3213
|
+
V(n), _?.(n);
|
|
3253
3214
|
} else {
|
|
3254
3215
|
let t = e;
|
|
3255
|
-
t &&
|
|
3216
|
+
t && H([t]), le(t?.value), _?.(t?.value ?? void 0);
|
|
3256
3217
|
}
|
|
3257
3218
|
}, [
|
|
3258
3219
|
d,
|
|
3259
|
-
|
|
3220
|
+
H,
|
|
3260
3221
|
_
|
|
3261
3222
|
]), ye = s((e) => {
|
|
3262
3223
|
let t = {
|
|
3263
3224
|
value: e,
|
|
3264
3225
|
label: e
|
|
3265
3226
|
};
|
|
3266
|
-
if (
|
|
3227
|
+
if (H([t]), o?.(e), d) {
|
|
3267
3228
|
let e = [...G, t.value];
|
|
3268
|
-
|
|
3269
|
-
} else
|
|
3229
|
+
V(e), _?.(e);
|
|
3230
|
+
} else le(t.value), _?.(t.value);
|
|
3270
3231
|
}, [
|
|
3271
3232
|
d,
|
|
3272
3233
|
G,
|
|
3273
|
-
|
|
3234
|
+
H,
|
|
3274
3235
|
_,
|
|
3275
3236
|
o
|
|
3276
|
-
]), be = !!r, xe = D ?? (be || a ? !0 : n.length >= 10),
|
|
3237
|
+
]), be = !!r, xe = D ?? (be || a ? !0 : n.length >= 10), Y = be ? a ? Te : Ce : a ? we : Se, Ee = f(() => gi(ee, se, R), [
|
|
3277
3238
|
ee,
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
]),
|
|
3281
|
-
wrapperRef:
|
|
3282
|
-
measureRef:
|
|
3239
|
+
se,
|
|
3240
|
+
R
|
|
3241
|
+
]), De = p(null), Oe = p(null), ke = p(null), Ae = !!d && R, je = ni({
|
|
3242
|
+
wrapperRef: De,
|
|
3243
|
+
measureRef: Oe,
|
|
3283
3244
|
total: K.length,
|
|
3284
3245
|
labelsKey: K.map(ui).join("\0"),
|
|
3285
|
-
enabled:
|
|
3286
|
-
}),
|
|
3246
|
+
enabled: Ae
|
|
3247
|
+
}), Me = f(() => n.some((e) => !!e.description), [n]), Ne = f(() => {
|
|
3287
3248
|
if (!n.some((e) => e.group)) return n;
|
|
3288
3249
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
3289
3250
|
for (let r of n) {
|
|
@@ -3298,83 +3259,83 @@ var Ai = a(function(e, t) {
|
|
|
3298
3259
|
})), n.push(r);
|
|
3299
3260
|
}
|
|
3300
3261
|
return t;
|
|
3301
|
-
}, [n]),
|
|
3262
|
+
}, [n]), Pe = !!d && !be, Fe = d ? G : W;
|
|
3302
3263
|
l(() => {
|
|
3303
|
-
!j || !
|
|
3264
|
+
!j || !de || mi(j, Fe);
|
|
3304
3265
|
}, [
|
|
3305
3266
|
j,
|
|
3306
|
-
|
|
3307
|
-
|
|
3267
|
+
de,
|
|
3268
|
+
Fe
|
|
3308
3269
|
]);
|
|
3309
|
-
let
|
|
3310
|
-
j &&
|
|
3270
|
+
let Ie = s(() => {
|
|
3271
|
+
j && fe((e) => {
|
|
3311
3272
|
let t = !e;
|
|
3312
|
-
return t ? mi(j,
|
|
3273
|
+
return t ? mi(j, Fe) : hi(j), t;
|
|
3313
3274
|
});
|
|
3314
|
-
}, [j,
|
|
3315
|
-
checked:
|
|
3316
|
-
label: M ??
|
|
3275
|
+
}, [j, Fe]), Le = f(() => j ? {
|
|
3276
|
+
checked: de,
|
|
3277
|
+
label: M ?? z.saveSelectionLabel
|
|
3317
3278
|
} : null, [
|
|
3318
3279
|
j,
|
|
3319
|
-
|
|
3280
|
+
de,
|
|
3320
3281
|
M,
|
|
3321
|
-
|
|
3322
|
-
]), [
|
|
3323
|
-
|
|
3324
|
-
}, []),
|
|
3325
|
-
|
|
3282
|
+
z
|
|
3283
|
+
]), [Re, ze] = m(""), Be = s((e) => {
|
|
3284
|
+
ze(e);
|
|
3285
|
+
}, []), X = f(() => Pe ? n.filter((e) => !e.disabled && di(e, Re)) : [], [
|
|
3286
|
+
Pe,
|
|
3326
3287
|
n,
|
|
3327
|
-
|
|
3328
|
-
]),
|
|
3329
|
-
if (!
|
|
3330
|
-
let e = new Set(G.map(String)), t =
|
|
3288
|
+
Re
|
|
3289
|
+
]), Z = f(() => {
|
|
3290
|
+
if (!Pe || X.length === 0) return null;
|
|
3291
|
+
let e = new Set(G.map(String)), t = X.filter((t) => e.has(String(t.value))).length, n = t === X.length;
|
|
3331
3292
|
return {
|
|
3332
|
-
count:
|
|
3293
|
+
count: X.length,
|
|
3333
3294
|
checked: n,
|
|
3334
|
-
indeterminate: t > 0 && t <
|
|
3335
|
-
label: n ?
|
|
3295
|
+
indeterminate: t > 0 && t < X.length,
|
|
3296
|
+
label: n ? z.clearAllLabel(X.length) : z.selectAllLabel(X.length)
|
|
3336
3297
|
};
|
|
3337
3298
|
}, [
|
|
3338
|
-
|
|
3339
|
-
|
|
3299
|
+
Pe,
|
|
3300
|
+
X,
|
|
3340
3301
|
G,
|
|
3341
|
-
|
|
3342
|
-
]),
|
|
3343
|
-
if (!
|
|
3344
|
-
let e = new Set(
|
|
3345
|
-
if (
|
|
3302
|
+
z
|
|
3303
|
+
]), Ve = s(() => {
|
|
3304
|
+
if (!Z) return;
|
|
3305
|
+
let e = new Set(X.map((e) => String(e.value))), t;
|
|
3306
|
+
if (Z.checked) t = G.filter((t) => !e.has(String(t)));
|
|
3346
3307
|
else {
|
|
3347
|
-
|
|
3308
|
+
H(X);
|
|
3348
3309
|
let e = new Set(G.map(String));
|
|
3349
|
-
t = [...G, ...
|
|
3310
|
+
t = [...G, ...X.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
3350
3311
|
}
|
|
3351
|
-
|
|
3312
|
+
V(t), _?.(t), ke.current?.onMenuClose();
|
|
3352
3313
|
}, [
|
|
3314
|
+
Z,
|
|
3353
3315
|
X,
|
|
3354
|
-
Y,
|
|
3355
3316
|
G,
|
|
3356
|
-
|
|
3317
|
+
H,
|
|
3357
3318
|
_
|
|
3358
|
-
]), He = {
|
|
3359
|
-
...
|
|
3360
|
-
dataTestId:
|
|
3361
|
-
inputId:
|
|
3319
|
+
]), He = qt(), Ue = {
|
|
3320
|
+
...L,
|
|
3321
|
+
dataTestId: I,
|
|
3322
|
+
inputId: oe,
|
|
3362
3323
|
unstyled: !0,
|
|
3363
|
-
classNames:
|
|
3364
|
-
className:
|
|
3324
|
+
classNames: Ee,
|
|
3325
|
+
className: P,
|
|
3365
3326
|
isMulti: d,
|
|
3366
|
-
options:
|
|
3327
|
+
options: Ne,
|
|
3367
3328
|
loadOptions: _e,
|
|
3368
3329
|
defaultOptions: i,
|
|
3369
3330
|
value: d ? K : ge,
|
|
3370
3331
|
onChange: ve,
|
|
3371
3332
|
onCreateOption: a ? ye : void 0,
|
|
3372
|
-
formatCreateLabel: a ?
|
|
3333
|
+
formatCreateLabel: a ? ie : void 0,
|
|
3373
3334
|
getOptionValue: (e) => String(e.value),
|
|
3374
3335
|
getOptionLabel: ui,
|
|
3375
3336
|
formatOptionLabel: (e, t) => {
|
|
3376
3337
|
if (t.context === "value") return e.label;
|
|
3377
|
-
let n =
|
|
3338
|
+
let n = Me && e.description ? /* @__PURE__ */ J("span", {
|
|
3378
3339
|
className: "flex flex-col min-w-0",
|
|
3379
3340
|
children: [/* @__PURE__ */ q("span", {
|
|
3380
3341
|
className: "truncate",
|
|
@@ -3390,7 +3351,7 @@ var Ai = a(function(e, t) {
|
|
|
3390
3351
|
className: "min-w-0 flex-1 truncate",
|
|
3391
3352
|
children: n
|
|
3392
3353
|
}), /* @__PURE__ */ q("span", {
|
|
3393
|
-
"data-test-id": vi({ dataTestId:
|
|
3354
|
+
"data-test-id": vi({ dataTestId: I }, `option-${String(e.value)}-actions`),
|
|
3394
3355
|
className: "ml-auto inline-flex shrink-0 items-center",
|
|
3395
3356
|
onMouseDown: (e) => {
|
|
3396
3357
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -3401,33 +3362,33 @@ var Ai = a(function(e, t) {
|
|
|
3401
3362
|
}) : n;
|
|
3402
3363
|
},
|
|
3403
3364
|
isOptionDisabled: (e) => !!e.disabled,
|
|
3404
|
-
placeholder:
|
|
3365
|
+
placeholder: ne,
|
|
3405
3366
|
isDisabled: te || T,
|
|
3406
3367
|
isClearable: E,
|
|
3407
3368
|
isSearchable: xe,
|
|
3408
3369
|
isLoading: T || void 0,
|
|
3409
|
-
noOptionsMessage: () =>
|
|
3410
|
-
loadingMessage: () =>
|
|
3411
|
-
"aria-invalid":
|
|
3370
|
+
noOptionsMessage: () => re,
|
|
3371
|
+
loadingMessage: () => z.loadingMessage,
|
|
3372
|
+
"aria-invalid": se || void 0,
|
|
3412
3373
|
"aria-required": w || void 0,
|
|
3413
|
-
...
|
|
3414
|
-
inputValue:
|
|
3415
|
-
onInputChange:
|
|
3416
|
-
selectAllState:
|
|
3417
|
-
onSelectAllToggle:
|
|
3374
|
+
...Pe ? {
|
|
3375
|
+
inputValue: Re,
|
|
3376
|
+
onInputChange: Be,
|
|
3377
|
+
selectAllState: Z,
|
|
3378
|
+
onSelectAllToggle: Ve
|
|
3418
3379
|
} : {},
|
|
3419
|
-
...
|
|
3420
|
-
saveSelectionState:
|
|
3421
|
-
onSaveSelectionToggle:
|
|
3380
|
+
...Le ? {
|
|
3381
|
+
saveSelectionState: Le,
|
|
3382
|
+
onSaveSelectionToggle: Ie
|
|
3422
3383
|
} : {},
|
|
3423
|
-
...
|
|
3384
|
+
...Ae ? { visibleTagCount: je } : {},
|
|
3424
3385
|
...d ? {
|
|
3425
|
-
closeMenuOnSelect:
|
|
3426
|
-
hideSelectedOptions:
|
|
3386
|
+
closeMenuOnSelect: L.closeMenuOnSelect ?? !1,
|
|
3387
|
+
hideSelectedOptions: L.hideSelectedOptions ?? !1
|
|
3427
3388
|
} : {},
|
|
3428
|
-
menuPlacement:
|
|
3429
|
-
menuPortalTarget:
|
|
3430
|
-
menuPosition:
|
|
3389
|
+
menuPlacement: L.menuPlacement ?? "auto",
|
|
3390
|
+
menuPortalTarget: L.menuPortalTarget ?? He ?? void 0,
|
|
3391
|
+
menuPosition: L.menuPosition ?? "fixed",
|
|
3431
3392
|
components: {
|
|
3432
3393
|
Control: bi,
|
|
3433
3394
|
Menu: Oi,
|
|
@@ -3438,19 +3399,19 @@ var Ai = a(function(e, t) {
|
|
|
3438
3399
|
LoadingIndicator: Di,
|
|
3439
3400
|
IndicatorSeparator: () => null,
|
|
3440
3401
|
...O ? { MenuList: ki } : {},
|
|
3441
|
-
...
|
|
3402
|
+
...Ae ? { MultiValue: Ti } : {},
|
|
3442
3403
|
Option: Ei
|
|
3443
3404
|
}
|
|
3444
3405
|
};
|
|
3445
3406
|
return /* @__PURE__ */ J("div", {
|
|
3446
|
-
ref:
|
|
3447
|
-
"data-test-id":
|
|
3448
|
-
className: Q("flex flex-col gap-1.5 w-full",
|
|
3407
|
+
ref: De,
|
|
3408
|
+
"data-test-id": I,
|
|
3409
|
+
className: Q("flex flex-col gap-1.5 w-full", F),
|
|
3449
3410
|
children: [
|
|
3450
3411
|
(y || b) && /* @__PURE__ */ J("div", {
|
|
3451
3412
|
className: "flex items-center gap-1.5",
|
|
3452
3413
|
children: [y && /* @__PURE__ */ J("label", {
|
|
3453
|
-
htmlFor:
|
|
3414
|
+
htmlFor: oe,
|
|
3454
3415
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3455
3416
|
children: [y, w && /* @__PURE__ */ q("span", {
|
|
3456
3417
|
className: "text-fg-danger",
|
|
@@ -3462,12 +3423,12 @@ var Ai = a(function(e, t) {
|
|
|
3462
3423
|
children: b
|
|
3463
3424
|
})]
|
|
3464
3425
|
}),
|
|
3465
|
-
/* @__PURE__ */ q(
|
|
3466
|
-
ref: Gt(t,
|
|
3467
|
-
...
|
|
3426
|
+
/* @__PURE__ */ q(Y, {
|
|
3427
|
+
ref: Gt(t, ke),
|
|
3428
|
+
...Ue
|
|
3468
3429
|
}),
|
|
3469
|
-
|
|
3470
|
-
ref:
|
|
3430
|
+
Ae && /* @__PURE__ */ J("div", {
|
|
3431
|
+
ref: Oe,
|
|
3471
3432
|
"aria-hidden": !0,
|
|
3472
3433
|
className: "flex items-center gap-1 whitespace-nowrap",
|
|
3473
3434
|
style: {
|
|
@@ -3495,11 +3456,11 @@ var Ai = a(function(e, t) {
|
|
|
3495
3456
|
})]
|
|
3496
3457
|
}),
|
|
3497
3458
|
S ? /* @__PURE__ */ q("p", {
|
|
3498
|
-
id: `${
|
|
3459
|
+
id: `${oe}-error`,
|
|
3499
3460
|
className: "text-p-sm text-fg-danger",
|
|
3500
3461
|
children: S
|
|
3501
3462
|
}) : x ? /* @__PURE__ */ q("p", {
|
|
3502
|
-
id: `${
|
|
3463
|
+
id: `${oe}-help`,
|
|
3503
3464
|
className: "text-p-sm text-fg-secondary",
|
|
3504
3465
|
children: x
|
|
3505
3466
|
}) : null
|
|
@@ -3549,7 +3510,7 @@ var Ni = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3549
3510
|
onClick: g,
|
|
3550
3511
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
3551
3512
|
className: Q("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
|
|
3552
|
-
children: /* @__PURE__ */ q(
|
|
3513
|
+
children: /* @__PURE__ */ q(F, { className: "h-4 w-4" })
|
|
3553
3514
|
})
|
|
3554
3515
|
]
|
|
3555
3516
|
}), /* @__PURE__ */ q("nav", {
|
|
@@ -3974,7 +3935,7 @@ function ua({ column: e }) {
|
|
|
3974
3935
|
placeholder: "All",
|
|
3975
3936
|
value: typeof n == "string" ? n : void 0,
|
|
3976
3937
|
onChange: (t) => e.setFilterValue(t || void 0)
|
|
3977
|
-
}) : /* @__PURE__ */ q(
|
|
3938
|
+
}) : /* @__PURE__ */ q(an, {
|
|
3978
3939
|
size: "sm",
|
|
3979
3940
|
type: t === "date" ? "date" : "text",
|
|
3980
3941
|
"aria-label": `Filter by ${e.id}`,
|
|
@@ -4095,9 +4056,9 @@ function ha({ table: e }) {
|
|
|
4095
4056
|
function ga({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
4096
4057
|
return /* @__PURE__ */ J("div", {
|
|
4097
4058
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
4098
|
-
children: [t && /* @__PURE__ */ q(
|
|
4059
|
+
children: [t && /* @__PURE__ */ q(an, {
|
|
4099
4060
|
size: "sm",
|
|
4100
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4061
|
+
leftIcon: /* @__PURE__ */ q(ce, { className: "h-4 w-4" }),
|
|
4101
4062
|
placeholder: r ?? "Search...",
|
|
4102
4063
|
"aria-label": "Search",
|
|
4103
4064
|
value: String(e.getState().globalFilter ?? ""),
|
|
@@ -4111,7 +4072,7 @@ function ga({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4111
4072
|
size: "sm",
|
|
4112
4073
|
iconOnly: !0,
|
|
4113
4074
|
"aria-label": "Refresh",
|
|
4114
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4075
|
+
leftIcon: /* @__PURE__ */ q(B, { className: "h-4 w-4" }),
|
|
4115
4076
|
onClick: i
|
|
4116
4077
|
}),
|
|
4117
4078
|
a && /* @__PURE__ */ q(ot, {
|
|
@@ -4135,19 +4096,19 @@ var _a = ({ transform: e }) => ({
|
|
|
4135
4096
|
});
|
|
4136
4097
|
function va({ columnOrder: e, onColumnOrderChange: t }) {
|
|
4137
4098
|
return {
|
|
4138
|
-
sensors:
|
|
4139
|
-
collisionDetection:
|
|
4099
|
+
sensors: Re(Le(Fe, { activationConstraint: { distance: 4 } }), Le(Pe, { coordinateGetter: Z })),
|
|
4100
|
+
collisionDetection: Ie,
|
|
4140
4101
|
modifiers: [_a],
|
|
4141
4102
|
handleDragEnd: (n) => {
|
|
4142
4103
|
let { active: r, over: i } = n;
|
|
4143
4104
|
if (!i || r.id === i.id) return;
|
|
4144
4105
|
let a = e.indexOf(String(r.id)), o = e.indexOf(String(i.id));
|
|
4145
|
-
a === -1 || o === -1 || t(
|
|
4106
|
+
a === -1 || o === -1 || t(Be(e, a, o));
|
|
4146
4107
|
}
|
|
4147
4108
|
};
|
|
4148
4109
|
}
|
|
4149
4110
|
function ya(e) {
|
|
4150
|
-
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } =
|
|
4111
|
+
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Ve({ id: e });
|
|
4151
4112
|
return {
|
|
4152
4113
|
setNodeRef: r,
|
|
4153
4114
|
attributes: t,
|
|
@@ -4170,7 +4131,7 @@ function ba({ row: e, actions: t }) {
|
|
|
4170
4131
|
size: "sm",
|
|
4171
4132
|
iconOnly: !0,
|
|
4172
4133
|
"aria-label": "Row actions",
|
|
4173
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4134
|
+
leftIcon: /* @__PURE__ */ q(ne, { className: "h-4 w-4" })
|
|
4174
4135
|
}) }), /* @__PURE__ */ q(hr, {
|
|
4175
4136
|
align: "end",
|
|
4176
4137
|
children: t.map((t, n) => /* @__PURE__ */ q(gr, {
|
|
@@ -4250,7 +4211,7 @@ function Ea(e, t, n) {
|
|
|
4250
4211
|
}
|
|
4251
4212
|
var Da = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4252
4213
|
function Oa({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
4253
|
-
let c = e.column, l = Da.has(c.id), u = i && !l, d = ya(c.id), f = c.columnDef.meta?.align ?? "left", p = c.getIsSorted(), m = !l && (o && c.getCanPin() || s && c.getCanHide()), h =
|
|
4214
|
+
let c = e.column, l = Da.has(c.id), u = i && !l, d = ya(c.id), f = c.columnDef.meta?.align ?? "left", p = c.getIsSorted(), m = !l && (o && c.getCanPin() || s && c.getCanHide()), h = De(c.columnDef.header, e.getContext());
|
|
4254
4215
|
return /* @__PURE__ */ J("th", {
|
|
4255
4216
|
ref: u ? d.setNodeRef : void 0,
|
|
4256
4217
|
colSpan: e.colSpan,
|
|
@@ -4293,23 +4254,23 @@ function Oa({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4293
4254
|
type: "button",
|
|
4294
4255
|
"aria-label": `${typeof h == "string" ? h : c.id} column options`,
|
|
4295
4256
|
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",
|
|
4296
|
-
children: /* @__PURE__ */ q(
|
|
4257
|
+
children: /* @__PURE__ */ q(z, { className: "h-3.5 w-3.5" })
|
|
4297
4258
|
}) }), /* @__PURE__ */ J(hr, {
|
|
4298
4259
|
align: "start",
|
|
4299
4260
|
children: [
|
|
4300
4261
|
o && c.getCanPin() && /* @__PURE__ */ J(K, { children: [
|
|
4301
4262
|
c.getIsPinned() !== "left" && /* @__PURE__ */ q(gr, {
|
|
4302
|
-
icon: /* @__PURE__ */ q(
|
|
4263
|
+
icon: /* @__PURE__ */ q(ae, { className: "h-4 w-4" }),
|
|
4303
4264
|
onSelect: () => c.pin("left"),
|
|
4304
4265
|
children: "Pin left"
|
|
4305
4266
|
}),
|
|
4306
4267
|
c.getIsPinned() !== "right" && /* @__PURE__ */ q(gr, {
|
|
4307
|
-
icon: /* @__PURE__ */ q(
|
|
4268
|
+
icon: /* @__PURE__ */ q(ae, { className: "h-4 w-4" }),
|
|
4308
4269
|
onSelect: () => c.pin("right"),
|
|
4309
4270
|
children: "Pin right"
|
|
4310
4271
|
}),
|
|
4311
4272
|
c.getIsPinned() && /* @__PURE__ */ q(gr, {
|
|
4312
|
-
icon: /* @__PURE__ */ q(
|
|
4273
|
+
icon: /* @__PURE__ */ q(oe, { className: "h-4 w-4" }),
|
|
4313
4274
|
onSelect: () => c.pin(!1),
|
|
4314
4275
|
children: "Unpin"
|
|
4315
4276
|
})
|
|
@@ -4349,12 +4310,12 @@ function ka({ row: e, onRowClick: t }) {
|
|
|
4349
4310
|
children: [/* @__PURE__ */ J("div", {
|
|
4350
4311
|
className: "flex items-center gap-2",
|
|
4351
4312
|
children: [
|
|
4352
|
-
i &&
|
|
4313
|
+
i && De(i.column.columnDef.cell, i.getContext()),
|
|
4353
4314
|
/* @__PURE__ */ q("div", {
|
|
4354
4315
|
className: "flex-1 min-w-0 text-p-std font-medium text-fg-default truncate",
|
|
4355
|
-
children: r &&
|
|
4316
|
+
children: r && De(r.column.columnDef.cell, r.getContext())
|
|
4356
4317
|
}),
|
|
4357
|
-
a &&
|
|
4318
|
+
a && De(a.column.columnDef.cell, a.getContext())
|
|
4358
4319
|
]
|
|
4359
4320
|
}), o.length > 0 && /* @__PURE__ */ q("dl", {
|
|
4360
4321
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -4367,7 +4328,7 @@ function ka({ row: e, onRowClick: t }) {
|
|
|
4367
4328
|
children: typeof t == "string" ? t : e.column.id
|
|
4368
4329
|
}), /* @__PURE__ */ q("dd", {
|
|
4369
4330
|
className: "text-p-sm text-fg-default truncate",
|
|
4370
|
-
children:
|
|
4331
|
+
children: De(e.column.columnDef.cell, e.getContext())
|
|
4371
4332
|
})]
|
|
4372
4333
|
}, e.id);
|
|
4373
4334
|
})
|
|
@@ -4388,10 +4349,10 @@ function Aa({ rowCount: e }) {
|
|
|
4388
4349
|
}, t)) });
|
|
4389
4350
|
}
|
|
4390
4351
|
function ja(e, t) {
|
|
4391
|
-
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: ee, enablePinning: te = !1, columnPinning: N, onColumnPinningChange:
|
|
4352
|
+
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: ee, enablePinning: te = !1, columnPinning: N, onColumnPinningChange: P, enableColumnResizing: F = !1, columnResizeMode: I = "onChange", enablePagination: L = !1, pageSize: R = 10, pageSizeOptions: z, pagination: ne, onPaginationChange: re, locale: ie = "en-US", manualPagination: ae = !1, pageCount: oe, rowCount: se, enableVirtualization: B = !1, estimatedRowHeight: ce = 44, maxBodyHeight: le = 480, onRowClick: ue, toolbar: V = !1, toolbarActions: de, searchPlaceholder: fe, onRefresh: pe, onExport: me, density: H = "comfortable", stickyHeader: he = !1, fillHeight: U = !1, wrapperClassName: W, className: G, dataTestId: ge } = e, [_e, ve] = Ea(u, h, []), [ye, be] = Ea(v, y, []), [xe, Se] = Ea(S, C, ""), [Y, Ce] = Ea(E, D, {}), [we, Te] = Ea(k, A, {}), [Pe, Fe] = Ea(M, ee, []), [Ie, Le] = Ea(N, P, {}), [Re, Be] = Ea(ne, re, {
|
|
4392
4353
|
pageIndex: 0,
|
|
4393
|
-
pageSize:
|
|
4394
|
-
}),
|
|
4354
|
+
pageSize: R
|
|
4355
|
+
}), Z = Me({
|
|
4395
4356
|
data: n,
|
|
4396
4357
|
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [Ca(), ...r], [r, w]),
|
|
4397
4358
|
getRowId: s,
|
|
@@ -4399,20 +4360,20 @@ function ja(e, t) {
|
|
|
4399
4360
|
sorting: _e,
|
|
4400
4361
|
columnFilters: ye,
|
|
4401
4362
|
globalFilter: xe,
|
|
4402
|
-
rowSelection:
|
|
4403
|
-
columnVisibility:
|
|
4404
|
-
columnOrder:
|
|
4405
|
-
columnPinning:
|
|
4406
|
-
pagination:
|
|
4363
|
+
rowSelection: Y,
|
|
4364
|
+
columnVisibility: we,
|
|
4365
|
+
columnOrder: Pe,
|
|
4366
|
+
columnPinning: Ie,
|
|
4367
|
+
pagination: Re
|
|
4407
4368
|
},
|
|
4408
4369
|
onSortingChange: ve,
|
|
4409
4370
|
onColumnFiltersChange: be,
|
|
4410
4371
|
onGlobalFilterChange: Se,
|
|
4411
|
-
onRowSelectionChange:
|
|
4412
|
-
onColumnVisibilityChange:
|
|
4413
|
-
onColumnOrderChange:
|
|
4414
|
-
onColumnPinningChange:
|
|
4415
|
-
onPaginationChange:
|
|
4372
|
+
onRowSelectionChange: Ce,
|
|
4373
|
+
onColumnVisibilityChange: Te,
|
|
4374
|
+
onColumnOrderChange: Fe,
|
|
4375
|
+
onColumnPinningChange: Le,
|
|
4376
|
+
onPaginationChange: Be,
|
|
4416
4377
|
enableSorting: c,
|
|
4417
4378
|
enableMultiSort: l,
|
|
4418
4379
|
manualSorting: g,
|
|
@@ -4421,37 +4382,37 @@ function ja(e, t) {
|
|
|
4421
4382
|
manualFiltering: b,
|
|
4422
4383
|
enableRowSelection: w,
|
|
4423
4384
|
enableMultiRowSelection: T,
|
|
4424
|
-
enableColumnResizing:
|
|
4425
|
-
columnResizeMode:
|
|
4426
|
-
manualPagination:
|
|
4427
|
-
pageCount:
|
|
4428
|
-
rowCount:
|
|
4429
|
-
getCoreRowModel:
|
|
4430
|
-
getSortedRowModel: c ?
|
|
4431
|
-
getFilteredRowModel: _ || x ?
|
|
4432
|
-
getPaginationRowModel:
|
|
4433
|
-
}),
|
|
4385
|
+
enableColumnResizing: F,
|
|
4386
|
+
columnResizeMode: I,
|
|
4387
|
+
manualPagination: ae,
|
|
4388
|
+
pageCount: oe,
|
|
4389
|
+
rowCount: se,
|
|
4390
|
+
getCoreRowModel: Oe(),
|
|
4391
|
+
getSortedRowModel: c ? je() : void 0,
|
|
4392
|
+
getFilteredRowModel: _ || x ? ke() : void 0,
|
|
4393
|
+
getPaginationRowModel: L ? Ae() : void 0
|
|
4394
|
+
}), Ve = Z.getRowModel().rows, He = Z.getVisibleLeafColumns().length, Ue = p(null), [Ge, Ke] = m(null);
|
|
4434
4395
|
d(() => {
|
|
4435
|
-
if (!
|
|
4396
|
+
if (!L || B) return;
|
|
4436
4397
|
let e = Ue.current?.getBoundingClientRect().height;
|
|
4437
4398
|
e && e !== Ge && Ke(e);
|
|
4438
4399
|
}, [
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4400
|
+
L,
|
|
4401
|
+
B,
|
|
4402
|
+
H,
|
|
4403
|
+
Ve,
|
|
4443
4404
|
Ge
|
|
4444
4405
|
]);
|
|
4445
|
-
let qe = Ge ??
|
|
4406
|
+
let qe = Ge ?? ce, Je = L && !B ? Math.max(0, Re.pageSize - Ve.length) * qe : 0, Ye = f(() => Pe.length > 0 ? Pe : Z.getAllLeafColumns().map((e) => e.id), [Pe, Z]), Xe = va({
|
|
4446
4407
|
columnOrder: Ye,
|
|
4447
|
-
onColumnOrderChange:
|
|
4448
|
-
}), Ze = (e) => Xe.handleDragEnd(e), Qe = p(null), $e =
|
|
4449
|
-
count:
|
|
4408
|
+
onColumnOrderChange: Fe
|
|
4409
|
+
}), Ze = (e) => Xe.handleDragEnd(e), Qe = p(null), $e = Ee({
|
|
4410
|
+
count: Ve.length,
|
|
4450
4411
|
getScrollElement: () => Qe.current,
|
|
4451
|
-
estimateSize: () =>
|
|
4412
|
+
estimateSize: () => ce,
|
|
4452
4413
|
overscan: 10,
|
|
4453
|
-
enabled:
|
|
4454
|
-
}), et =
|
|
4414
|
+
enabled: B
|
|
4415
|
+
}), et = B ? $e.getVirtualItems() : null, tt = et && et.length > 0 ? et[0]?.start ?? 0 : 0, nt = et && et.length > 0 ? $e.getTotalSize() - (et[et.length - 1]?.end ?? 0) : 0, rt = We(ge), it = (e) => {
|
|
4455
4416
|
let t = e.original?.id;
|
|
4456
4417
|
return typeof t == "string" || typeof t == "number" ? String(t) : e.id;
|
|
4457
4418
|
}, at = (e, t) => /* @__PURE__ */ q("tr", {
|
|
@@ -4459,37 +4420,37 @@ function ja(e, t) {
|
|
|
4459
4420
|
"data-test-id": rt(`row-${it(e)}`),
|
|
4460
4421
|
"data-row-id": it(e),
|
|
4461
4422
|
"data-selected": e.getIsSelected() || void 0,
|
|
4462
|
-
onClick:
|
|
4463
|
-
className: Q("group border-t border-border-default",
|
|
4423
|
+
onClick: ue ? () => ue(e.original) : void 0,
|
|
4424
|
+
className: Q("group border-t border-border-default", ue && "cursor-pointer"),
|
|
4464
4425
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ q("td", {
|
|
4465
4426
|
"data-test-id": rt(`cell-${e.column.id}`),
|
|
4466
4427
|
style: Ta(e.column),
|
|
4467
|
-
className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", xa[
|
|
4468
|
-
children:
|
|
4428
|
+
className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", xa[H], Sa[e.column.columnDef.meta?.align ?? "left"]),
|
|
4429
|
+
children: De(e.column.columnDef.cell, e.getContext())
|
|
4469
4430
|
}, e.id))
|
|
4470
4431
|
}, e.id), ot = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4471
4432
|
"data-test-id": rt(`header-row-${e}`),
|
|
4472
4433
|
children: t.map((e) => /* @__PURE__ */ q(Oa, {
|
|
4473
4434
|
header: e,
|
|
4474
|
-
density:
|
|
4435
|
+
density: H,
|
|
4475
4436
|
enableSorting: c,
|
|
4476
4437
|
enableFiltering: _,
|
|
4477
4438
|
enableColumnOrdering: j,
|
|
4478
|
-
enableColumnResizing:
|
|
4439
|
+
enableColumnResizing: F,
|
|
4479
4440
|
enablePinning: te,
|
|
4480
4441
|
enableColumnVisibility: O
|
|
4481
4442
|
}, e.id))
|
|
4482
4443
|
}, e), st = /* @__PURE__ */ J("table", {
|
|
4483
4444
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4484
|
-
style: { width:
|
|
4445
|
+
style: { width: F ? Z.getTotalSize() : "100%" },
|
|
4485
4446
|
children: [/* @__PURE__ */ q("thead", {
|
|
4486
|
-
className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (
|
|
4487
|
-
children:
|
|
4447
|
+
className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (he || U) && "sticky top-0 z-10"),
|
|
4448
|
+
children: Z.getHeaderGroups().map((e) => ot(e.id, e.headers))
|
|
4488
4449
|
}), /* @__PURE__ */ q("tbody", { children: i ? /* @__PURE__ */ q(pa, {
|
|
4489
4450
|
columnCount: He,
|
|
4490
|
-
rowCount:
|
|
4451
|
+
rowCount: Re.pageSize,
|
|
4491
4452
|
testIdPrefix: ge
|
|
4492
|
-
}) :
|
|
4453
|
+
}) : Ve.length === 0 ? /* @__PURE__ */ q("tr", {
|
|
4493
4454
|
"data-test-id": rt("empty-row"),
|
|
4494
4455
|
children: /* @__PURE__ */ q("td", {
|
|
4495
4456
|
colSpan: He,
|
|
@@ -4499,7 +4460,7 @@ function ja(e, t) {
|
|
|
4499
4460
|
title: o
|
|
4500
4461
|
})
|
|
4501
4462
|
})
|
|
4502
|
-
}) :
|
|
4463
|
+
}) : B && et ? /* @__PURE__ */ J(K, { children: [
|
|
4503
4464
|
tt > 0 && /* @__PURE__ */ q("tr", {
|
|
4504
4465
|
"aria-hidden": !0,
|
|
4505
4466
|
"data-test-id": rt("padding-top-row"),
|
|
@@ -4509,7 +4470,7 @@ function ja(e, t) {
|
|
|
4509
4470
|
})
|
|
4510
4471
|
}),
|
|
4511
4472
|
et.map((e) => {
|
|
4512
|
-
let t =
|
|
4473
|
+
let t = Ve[e.index];
|
|
4513
4474
|
return t ? at(t) : null;
|
|
4514
4475
|
}),
|
|
4515
4476
|
nt > 0 && /* @__PURE__ */ q("tr", {
|
|
@@ -4520,7 +4481,7 @@ function ja(e, t) {
|
|
|
4520
4481
|
colSpan: He
|
|
4521
4482
|
})
|
|
4522
4483
|
})
|
|
4523
|
-
] }) : /* @__PURE__ */ J(K, { children: [
|
|
4484
|
+
] }) : /* @__PURE__ */ J(K, { children: [Ve.map((e, t) => at(e, t === 0 ? Ue : void 0)), Je > 0 && /* @__PURE__ */ q("tr", {
|
|
4524
4485
|
"aria-hidden": !0,
|
|
4525
4486
|
"data-test-id": rt("filler-row"),
|
|
4526
4487
|
children: /* @__PURE__ */ q("td", {
|
|
@@ -4535,14 +4496,14 @@ function ja(e, t) {
|
|
|
4535
4496
|
"data-test-id": ge,
|
|
4536
4497
|
className: Q("w-full rounded-lg border border-border-default bg-bg-default", U && "h-full flex flex-col", W, G),
|
|
4537
4498
|
children: [
|
|
4538
|
-
|
|
4539
|
-
table:
|
|
4499
|
+
V === !1 ? null : V ?? /* @__PURE__ */ q(ga, {
|
|
4500
|
+
table: Z,
|
|
4540
4501
|
enableGlobalFilter: x,
|
|
4541
4502
|
enableColumnVisibility: O,
|
|
4542
|
-
searchPlaceholder:
|
|
4543
|
-
onRefresh:
|
|
4544
|
-
onExport:
|
|
4545
|
-
actions:
|
|
4503
|
+
searchPlaceholder: fe,
|
|
4504
|
+
onRefresh: pe,
|
|
4505
|
+
onExport: me,
|
|
4506
|
+
actions: de
|
|
4546
4507
|
}),
|
|
4547
4508
|
a ? /* @__PURE__ */ q("div", {
|
|
4548
4509
|
className: "p-4",
|
|
@@ -4555,34 +4516,34 @@ function ja(e, t) {
|
|
|
4555
4516
|
className: Q("hidden", U ? "md:flex md:flex-col md:flex-1 md:min-h-0" : "md:block"),
|
|
4556
4517
|
children: /* @__PURE__ */ q("div", {
|
|
4557
4518
|
ref: Qe,
|
|
4558
|
-
className: Q("w-full overflow-auto",
|
|
4559
|
-
style: U ? void 0 :
|
|
4560
|
-
children: j ? /* @__PURE__ */ q(
|
|
4519
|
+
className: Q("w-full overflow-auto", V === !1 ? "rounded-lg" : "rounded-b-lg", U && "flex-1 min-h-0"),
|
|
4520
|
+
style: U ? void 0 : B || he ? { maxHeight: le } : void 0,
|
|
4521
|
+
children: j ? /* @__PURE__ */ q(Ne, {
|
|
4561
4522
|
sensors: Xe.sensors,
|
|
4562
4523
|
collisionDetection: Xe.collisionDetection,
|
|
4563
4524
|
modifiers: Xe.modifiers,
|
|
4564
4525
|
onDragEnd: Ze,
|
|
4565
|
-
children: /* @__PURE__ */ q(
|
|
4526
|
+
children: /* @__PURE__ */ q(ze, {
|
|
4566
4527
|
items: Ye,
|
|
4567
|
-
strategy:
|
|
4528
|
+
strategy: X,
|
|
4568
4529
|
children: st
|
|
4569
4530
|
})
|
|
4570
4531
|
}) : st
|
|
4571
4532
|
})
|
|
4572
4533
|
}), /* @__PURE__ */ q("div", {
|
|
4573
4534
|
className: "md:hidden",
|
|
4574
|
-
children: i ? /* @__PURE__ */ q(Aa, { rowCount:
|
|
4535
|
+
children: i ? /* @__PURE__ */ q(Aa, { rowCount: Re.pageSize }) : Ve.length === 0 ? /* @__PURE__ */ q(xr, {
|
|
4575
4536
|
size: "sm",
|
|
4576
4537
|
title: o
|
|
4577
|
-
}) :
|
|
4538
|
+
}) : Ve.map((e) => /* @__PURE__ */ q(ka, {
|
|
4578
4539
|
row: e,
|
|
4579
|
-
onRowClick:
|
|
4540
|
+
onRowClick: ue
|
|
4580
4541
|
}, e.id))
|
|
4581
4542
|
})] }),
|
|
4582
|
-
|
|
4583
|
-
table:
|
|
4584
|
-
pageSizeOptions:
|
|
4585
|
-
locale:
|
|
4543
|
+
L && !a && /* @__PURE__ */ q(fa, {
|
|
4544
|
+
table: Z,
|
|
4545
|
+
pageSizeOptions: z,
|
|
4546
|
+
locale: ie,
|
|
4586
4547
|
dataTestId: ge
|
|
4587
4548
|
})
|
|
4588
4549
|
]
|
|
@@ -4823,10 +4784,10 @@ var Ra = {
|
|
|
4823
4784
|
}),
|
|
4824
4785
|
/* @__PURE__ */ J("span", {
|
|
4825
4786
|
className: Q("inline-flex h-8 w-16 items-center justify-between rounded-full border px-2 transition-colors", "peer-checked:bg-gray-700 dark:bg-gray-700 dark:peer-checked:bg-gray-900", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2"),
|
|
4826
|
-
children: [/* @__PURE__ */ q(
|
|
4787
|
+
children: [/* @__PURE__ */ q(de, {
|
|
4827
4788
|
className: "size-4 text-yellow-500 z-1",
|
|
4828
4789
|
"aria-hidden": !0
|
|
4829
|
-
}), /* @__PURE__ */ q(
|
|
4790
|
+
}), /* @__PURE__ */ q(R, {
|
|
4830
4791
|
className: "size-4 text-gray-400 z-1",
|
|
4831
4792
|
"aria-hidden": !0
|
|
4832
4793
|
})]
|
|
@@ -4891,7 +4852,7 @@ var Ra = {
|
|
|
4891
4852
|
size: e,
|
|
4892
4853
|
title: t ?? Ja,
|
|
4893
4854
|
description: n ?? Ya,
|
|
4894
|
-
illustration: r ?? /* @__PURE__ */ q(
|
|
4855
|
+
illustration: r ?? /* @__PURE__ */ q(En, {
|
|
4895
4856
|
icon: k,
|
|
4896
4857
|
tone: "brand",
|
|
4897
4858
|
shape: "circle",
|
|
@@ -5166,6 +5127,6 @@ var Ra = {
|
|
|
5166
5127
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5167
5128
|
};
|
|
5168
5129
|
//#endregion
|
|
5169
|
-
export { et as Accordion, tt as AccordionItem, xt as Avatar, St as AvatarGroup, jt as Badge, Pt as Breadcrumb, ot as Button, It as ButtonGroup, zt as Card, Vt as CardGroup, Wt as Checkbox,
|
|
5130
|
+
export { et as Accordion, tt as AccordionItem, xt as Avatar, St as AvatarGroup, jt as Badge, Pt as Breadcrumb, ot as Button, It as ButtonGroup, zt as Card, Vt as CardGroup, Wt as Checkbox, $t as Copy, sn as Counter, Cn as DatePicker, Pn as DeviceRestriction, Rn as DistributionBar, Je as Divider, cr as Drawer, hr as DropdownContent, gr as DropdownItem, vr as DropdownLabel, fr as DropdownMenu, _r as DropdownSeparator, pr as DropdownTrigger, xr as Empty, wr as Filter, Tr as FormContainer, Er as FormField, En as IconTile, Dr as InfoField, kr as InlineAlert, an as Input, Ar as Link, Mr as Modal, Lr as NotificationBadge, Vr as Pagination, Wr as PersonCard, Qt as Popover, Yr as Progress, ei as Radio, Zr as RadioGroup, ti as ReadMore, Ai as SelectV2, Ni as Sidebar, Pi as SidebarItem, Ri as Skeleton, Wi as SnackbarProvider, Ji as Status, oa as StepIndicator, la as Switch, Ba as Tab, La as TabList, Va as TabPanel, Ma as TableV2, ua as TableV2ColumnFilter, ha as TableV2ColumnVisibilityMenu, fa as TableV2Pagination, ba as TableV2RowActionsMenu, pa as TableV2Skeleton, ga as TableV2Toolbar, Ia as Tabs, jn as Text, Ha as TextArea, Ua as ThemeSwitch, qa as Tooltip, Za as UnderConstruction, dt as Upload, pt as UploadItem, to as blue, Qa as brand, Q as cn, oo as colorPrimitives, ho as controlHeight, wa as createRowActionsColumn, Ca as createSelectionColumn, co as darkTheme, lo as fontFamily, Ta as getPinnedStyles, $ as gray, eo as green, uo as headline, go as iconSize, po as label, so as lightTheme, fo as paragraph, ro as pink, no as purple, _o as radius, io as red, vo as shadows, mo as typography, qn as useEscapeKey, ye as useFieldArray, er as useFormContext, rr as useFormProps, Xn as useHideBodyScroll, Qn as useIsMobile, Kn as useOnOutsideClick, Ui as useSnackbar, Un as useStepper, ut as validateSingleFile, $a as white, ao as yellow };
|
|
5170
5131
|
|
|
5171
5132
|
//# sourceMappingURL=index.js.map
|