@dinofront/design_system 1.19.3 → 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 +523 -559
- package/dist/index.js.map +1 -1
- package/dist/lib/PortalContext.d.ts +10 -0
- package/dist/lib/useFloatingPosition.d.ts +7 -2
- 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,97 +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
|
-
}, [e]), !
|
|
1910
|
-
let
|
|
1911
|
-
|
|
1912
|
-
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),
|
|
1913
1918
|
onCancel: (e) => {
|
|
1914
1919
|
e.preventDefault(), t();
|
|
1915
1920
|
},
|
|
1916
|
-
|
|
1921
|
+
inert: C === "exiting",
|
|
1917
1922
|
"aria-labelledby": i ? "drawer-title" : void 0,
|
|
1918
1923
|
"aria-describedby": a ? "drawer-desc" : void 0,
|
|
1919
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",
|
|
1920
|
-
"data-test-id":
|
|
1925
|
+
"data-test-id": g,
|
|
1921
1926
|
children: [/* @__PURE__ */ q("div", {
|
|
1922
|
-
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"),
|
|
1923
1928
|
onClick: () => c && t(),
|
|
1924
1929
|
"aria-hidden": !0
|
|
1925
1930
|
}), /* @__PURE__ */ J("div", {
|
|
1926
|
-
ref: Gt(
|
|
1931
|
+
ref: Gt(_, x),
|
|
1927
1932
|
tabIndex: -1,
|
|
1928
|
-
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),
|
|
1929
1934
|
children: [
|
|
1930
1935
|
(i || u || f) && /* @__PURE__ */ J("div", {
|
|
1931
1936
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
|
|
1932
1937
|
children: [/* @__PURE__ */ J("div", {
|
|
1933
1938
|
className: "flex-1 min-w-0",
|
|
1934
1939
|
children: [i && /* @__PURE__ */ q("h2", {
|
|
1935
|
-
"data-test-id":
|
|
1940
|
+
"data-test-id": g ? `${g}-drawer-title` : void 0,
|
|
1936
1941
|
className: "text-h-xs font-semibold text-fg-default",
|
|
1937
1942
|
children: i
|
|
1938
1943
|
}), a && /* @__PURE__ */ q("p", {
|
|
1939
|
-
"data-test-id":
|
|
1944
|
+
"data-test-id": g ? `${g}-drawer-subtitle` : void 0,
|
|
1940
1945
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
1941
1946
|
children: a
|
|
1942
1947
|
})]
|
|
@@ -1946,7 +1951,7 @@ var nr = {
|
|
|
1946
1951
|
type: "button",
|
|
1947
1952
|
onClick: t,
|
|
1948
1953
|
"aria-label": "Close",
|
|
1949
|
-
"data-test-id":
|
|
1954
|
+
"data-test-id": g ? `${g}-drawer-close-button` : void 0,
|
|
1950
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",
|
|
1951
1956
|
children: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
|
|
1952
1957
|
})]
|
|
@@ -1962,57 +1967,12 @@ var nr = {
|
|
|
1962
1967
|
})
|
|
1963
1968
|
]
|
|
1964
1969
|
})]
|
|
1965
|
-
}), document.body);
|
|
1966
|
-
}), sr = 8;
|
|
1967
|
-
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 }) {
|
|
1968
|
-
let [l, u] = m({
|
|
1969
|
-
style: {
|
|
1970
|
-
position: "fixed",
|
|
1971
|
-
top: 0,
|
|
1972
|
-
left: 0,
|
|
1973
|
-
visibility: "hidden"
|
|
1974
|
-
},
|
|
1975
|
-
resolvedSide: r
|
|
1976
1970
|
});
|
|
1977
|
-
return
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
let l = n.getBoundingClientRect(), d = t.getBoundingClientRect(), f = window.innerHeight, p = window.innerWidth, m = r;
|
|
1983
|
-
if (o) {
|
|
1984
|
-
let e = f - l.bottom, t = l.top;
|
|
1985
|
-
r === "bottom" && e < d.height + a && t > e ? m = "top" : r === "top" && t < d.height + a && e > t && (m = "bottom");
|
|
1986
|
-
}
|
|
1987
|
-
let h = m === "bottom" ? l.bottom + a : l.top - d.height - a, g = i === "end" ? l.right - d.width : l.left;
|
|
1988
|
-
s && (g = Math.min(Math.max(g, sr), p - d.width - sr)), u({
|
|
1989
|
-
style: {
|
|
1990
|
-
position: "fixed",
|
|
1991
|
-
top: h,
|
|
1992
|
-
left: g,
|
|
1993
|
-
minWidth: c ? l.width : void 0
|
|
1994
|
-
},
|
|
1995
|
-
resolvedSide: m
|
|
1996
|
-
});
|
|
1997
|
-
};
|
|
1998
|
-
return l(), window.addEventListener("resize", l), document.addEventListener("scroll", l, {
|
|
1999
|
-
capture: !0,
|
|
2000
|
-
passive: !0
|
|
2001
|
-
}), () => {
|
|
2002
|
-
window.removeEventListener("resize", l), document.removeEventListener("scroll", l, { capture: !0 });
|
|
2003
|
-
};
|
|
2004
|
-
}, [
|
|
2005
|
-
n,
|
|
2006
|
-
e,
|
|
2007
|
-
t,
|
|
2008
|
-
r,
|
|
2009
|
-
i,
|
|
2010
|
-
a,
|
|
2011
|
-
o,
|
|
2012
|
-
s,
|
|
2013
|
-
c
|
|
2014
|
-
]), l;
|
|
2015
|
-
}
|
|
1971
|
+
return _e(/* @__PURE__ */ q(Kt.Provider, {
|
|
1972
|
+
value: y,
|
|
1973
|
+
children: D
|
|
1974
|
+
}), document.body);
|
|
1975
|
+
});
|
|
2016
1976
|
//#endregion
|
|
2017
1977
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
2018
1978
|
function lr(e) {
|
|
@@ -2065,10 +2025,10 @@ function pr({ children: e }) {
|
|
|
2065
2025
|
});
|
|
2066
2026
|
}
|
|
2067
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) {
|
|
2068
|
-
let { open: y, setOpen: b, triggerRef: x, anchorRef: S } = dr(), C = p(null), [w, T] = m(null),
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
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,
|
|
2072
2032
|
panel: w,
|
|
2073
2033
|
open: y && n === "fixed",
|
|
2074
2034
|
side: r,
|
|
@@ -2108,11 +2068,11 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2108
2068
|
});
|
|
2109
2069
|
return () => cancelAnimationFrame(e);
|
|
2110
2070
|
}, [y, u]), !y) return null;
|
|
2111
|
-
let
|
|
2071
|
+
let A = /* @__PURE__ */ q("div", {
|
|
2112
2072
|
ref: Gt(v, C, n === "fixed" ? T : void 0),
|
|
2113
2073
|
role: "menu",
|
|
2114
2074
|
"data-test-id": h,
|
|
2115
|
-
"data-side": n === "fixed" ?
|
|
2075
|
+
"data-side": n === "fixed" ? k : void 0,
|
|
2116
2076
|
"data-align": t,
|
|
2117
2077
|
onKeyDown: (e) => {
|
|
2118
2078
|
let t = Array.from(C.current?.querySelectorAll("[role=\"menuitem\"]:not(:disabled)") ?? []);
|
|
@@ -2123,12 +2083,12 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2123
2083
|
onClick: (e) => {
|
|
2124
2084
|
g?.(e), e.stopPropagation();
|
|
2125
2085
|
},
|
|
2126
|
-
style: n === "fixed" ?
|
|
2086
|
+
style: n === "fixed" ? O : void 0,
|
|
2127
2087
|
className: Q(mr, n === "absolute" && Q("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), d),
|
|
2128
2088
|
..._,
|
|
2129
2089
|
children: e
|
|
2130
2090
|
});
|
|
2131
|
-
return n === "fixed" ? _e(
|
|
2091
|
+
return n === "fixed" ? _e(A, D ?? document.body) : A;
|
|
2132
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) {
|
|
2133
2093
|
let { setOpen: p } = dr();
|
|
2134
2094
|
return /* @__PURE__ */ J("button", {
|
|
@@ -2168,11 +2128,10 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2168
2128
|
]
|
|
2169
2129
|
});
|
|
2170
2130
|
}), _r = a(function({ className: e, dataTestId: t, ...n }, r) {
|
|
2171
|
-
return /* @__PURE__ */ q("
|
|
2131
|
+
return /* @__PURE__ */ q("hr", {
|
|
2172
2132
|
ref: r,
|
|
2173
|
-
role: "separator",
|
|
2174
2133
|
"data-test-id": t,
|
|
2175
|
-
className: Q("my-1 h-px bg-border-default", e),
|
|
2134
|
+
className: Q("my-1 h-px border-0 bg-border-default", e),
|
|
2176
2135
|
...n
|
|
2177
2136
|
});
|
|
2178
2137
|
}), vr = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
|
|
@@ -2196,20 +2155,20 @@ var mr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2196
2155
|
className: Q("flex flex-col items-center justify-center text-center", yr[e], a),
|
|
2197
2156
|
...s,
|
|
2198
2157
|
children: [
|
|
2199
|
-
r ?? /* @__PURE__ */ q(
|
|
2200
|
-
icon:
|
|
2158
|
+
r ?? /* @__PURE__ */ q(En, {
|
|
2159
|
+
icon: le,
|
|
2201
2160
|
tone: "gray",
|
|
2202
2161
|
shape: "circle",
|
|
2203
2162
|
size: br[e]
|
|
2204
2163
|
}),
|
|
2205
|
-
t && /* @__PURE__ */ q(
|
|
2164
|
+
t && /* @__PURE__ */ q(jn, {
|
|
2206
2165
|
as: "h3",
|
|
2207
2166
|
variant: e === "lg" ? "h-sm" : "h-xs",
|
|
2208
2167
|
weight: "semibold",
|
|
2209
2168
|
className: "mt-2",
|
|
2210
2169
|
children: t
|
|
2211
2170
|
}),
|
|
2212
|
-
n && /* @__PURE__ */ q(
|
|
2171
|
+
n && /* @__PURE__ */ q(jn, {
|
|
2213
2172
|
variant: e === "lg" ? "p-sm" : "p-xs",
|
|
2214
2173
|
color: "secondary",
|
|
2215
2174
|
className: "max-w-sm",
|
|
@@ -2329,7 +2288,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2329
2288
|
"data-test-id": f,
|
|
2330
2289
|
className: Q("flex flex-col gap-4", t),
|
|
2331
2290
|
...p,
|
|
2332
|
-
children: /* @__PURE__ */ J(
|
|
2291
|
+
children: /* @__PURE__ */ J($n.Provider, {
|
|
2333
2292
|
value: N,
|
|
2334
2293
|
children: [e, i && i.length > 0 && /* @__PURE__ */ q("div", {
|
|
2335
2294
|
className: "flex items-center gap-3",
|
|
@@ -2339,7 +2298,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2339
2298
|
})
|
|
2340
2299
|
});
|
|
2341
2300
|
}), Er = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
|
|
2342
|
-
let s = c(
|
|
2301
|
+
let s = c($n);
|
|
2343
2302
|
if (!s) throw Error("FormField must be rendered inside a FormContainer.");
|
|
2344
2303
|
return /* @__PURE__ */ q("div", {
|
|
2345
2304
|
ref: o,
|
|
@@ -2372,7 +2331,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2372
2331
|
className: Q("flex items-start gap-3", a),
|
|
2373
2332
|
...s,
|
|
2374
2333
|
children: [
|
|
2375
|
-
/* @__PURE__ */ q(
|
|
2334
|
+
/* @__PURE__ */ q(En, {
|
|
2376
2335
|
icon: e,
|
|
2377
2336
|
tone: t,
|
|
2378
2337
|
size: "md"
|
|
@@ -2417,7 +2376,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2417
2376
|
discovery: {
|
|
2418
2377
|
container: "bg-purple-50 border-purple-200",
|
|
2419
2378
|
iconColor: "text-purple-700",
|
|
2420
|
-
DefaultIcon:
|
|
2379
|
+
DefaultIcon: V
|
|
2421
2380
|
}
|
|
2422
2381
|
}, kr = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
2423
2382
|
let { container: u, iconColor: d, DefaultIcon: f } = Or[e];
|
|
@@ -2467,7 +2426,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2467
2426
|
target: u,
|
|
2468
2427
|
rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
|
|
2469
2428
|
};
|
|
2470
|
-
return /* @__PURE__ */ J(
|
|
2429
|
+
return /* @__PURE__ */ J(jn, {
|
|
2471
2430
|
as: "a",
|
|
2472
2431
|
ref: p,
|
|
2473
2432
|
variant: e,
|
|
@@ -2496,18 +2455,19 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2496
2455
|
xl: "max-w-2xl",
|
|
2497
2456
|
"2xl": "max-w-4xl"
|
|
2498
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) {
|
|
2499
|
-
let
|
|
2500
|
-
|
|
2501
|
-
let t =
|
|
2502
|
-
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(), () => {
|
|
2503
2462
|
t.open && t.close();
|
|
2504
2463
|
};
|
|
2505
2464
|
}, [e]), l(() => {
|
|
2506
2465
|
if (!e) return;
|
|
2507
2466
|
let t = document.activeElement;
|
|
2508
|
-
return
|
|
2509
|
-
}, [e]), e
|
|
2510
|
-
|
|
2467
|
+
return v.current?.focus(), () => t?.focus?.();
|
|
2468
|
+
}, [e]), !e) return null;
|
|
2469
|
+
let y = /* @__PURE__ */ J("dialog", {
|
|
2470
|
+
ref: Gt(h, _),
|
|
2511
2471
|
onCancel: (e) => {
|
|
2512
2472
|
e.preventDefault(), t();
|
|
2513
2473
|
},
|
|
@@ -2519,7 +2479,7 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2519
2479
|
onClick: () => s && t(),
|
|
2520
2480
|
"aria-hidden": !0
|
|
2521
2481
|
}), /* @__PURE__ */ J("div", {
|
|
2522
|
-
ref: Gt(
|
|
2482
|
+
ref: Gt(v, f),
|
|
2523
2483
|
tabIndex: -1,
|
|
2524
2484
|
"data-test-id": d,
|
|
2525
2485
|
className: Q("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", jr[o], u),
|
|
@@ -2556,7 +2516,11 @@ var wr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2556
2516
|
})
|
|
2557
2517
|
]
|
|
2558
2518
|
})]
|
|
2559
|
-
})
|
|
2519
|
+
});
|
|
2520
|
+
return _e(/* @__PURE__ */ q(Kt.Provider, {
|
|
2521
|
+
value: g,
|
|
2522
|
+
children: y
|
|
2523
|
+
}), document.body);
|
|
2560
2524
|
}), Nr = {
|
|
2561
2525
|
brand: "bg-brand-500 text-white",
|
|
2562
2526
|
danger: "bg-red-600 text-white",
|
|
@@ -2625,7 +2589,7 @@ var zr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2625
2589
|
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ q("span", {
|
|
2626
2590
|
"aria-hidden": !0,
|
|
2627
2591
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2628
|
-
children: /* @__PURE__ */ q(
|
|
2592
|
+
children: /* @__PURE__ */ q(z, { className: "h-4 w-4" })
|
|
2629
2593
|
}, `${t}-${r}`);
|
|
2630
2594
|
let i = t === e;
|
|
2631
2595
|
return /* @__PURE__ */ q("button", {
|
|
@@ -2884,7 +2848,7 @@ var zr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2884
2848
|
"data-test-id": d,
|
|
2885
2849
|
className: Q("flex flex-col gap-1", l),
|
|
2886
2850
|
...f,
|
|
2887
|
-
children: [/* @__PURE__ */ q(
|
|
2851
|
+
children: [/* @__PURE__ */ q(jn, {
|
|
2888
2852
|
id: y,
|
|
2889
2853
|
clamp: v ? void 0 : t,
|
|
2890
2854
|
...c,
|
|
@@ -3055,20 +3019,20 @@ function yi(e, t) {
|
|
|
3055
3019
|
};
|
|
3056
3020
|
}
|
|
3057
3021
|
function bi(e) {
|
|
3058
|
-
return /* @__PURE__ */ q(
|
|
3022
|
+
return /* @__PURE__ */ q(Y.Control, {
|
|
3059
3023
|
...e,
|
|
3060
3024
|
innerProps: yi(e.innerProps, vi(e.selectProps, "trigger"))
|
|
3061
3025
|
});
|
|
3062
3026
|
}
|
|
3063
3027
|
function xi(e) {
|
|
3064
3028
|
let t = { "data-test-id": vi(e.selectProps, "search") };
|
|
3065
|
-
return /* @__PURE__ */ q(
|
|
3029
|
+
return /* @__PURE__ */ q(Y.Input, {
|
|
3066
3030
|
...e,
|
|
3067
3031
|
...t
|
|
3068
3032
|
});
|
|
3069
3033
|
}
|
|
3070
3034
|
function Si(e) {
|
|
3071
|
-
return /* @__PURE__ */ q(
|
|
3035
|
+
return /* @__PURE__ */ q(Y.DropdownIndicator, {
|
|
3072
3036
|
...e,
|
|
3073
3037
|
children: /* @__PURE__ */ q(S, {
|
|
3074
3038
|
className: Q("h-4 w-4 transition-transform", e.selectProps.menuIsOpen && "rotate-180"),
|
|
@@ -3077,7 +3041,7 @@ function Si(e) {
|
|
|
3077
3041
|
});
|
|
3078
3042
|
}
|
|
3079
3043
|
function Ci(e) {
|
|
3080
|
-
return /* @__PURE__ */ q(
|
|
3044
|
+
return /* @__PURE__ */ q(Y.ClearIndicator, {
|
|
3081
3045
|
...e,
|
|
3082
3046
|
innerProps: yi(e.innerProps, vi(e.selectProps, "clear")),
|
|
3083
3047
|
children: /* @__PURE__ */ q(U, {
|
|
@@ -3087,7 +3051,7 @@ function Ci(e) {
|
|
|
3087
3051
|
});
|
|
3088
3052
|
}
|
|
3089
3053
|
function wi(e) {
|
|
3090
|
-
return /* @__PURE__ */ q(
|
|
3054
|
+
return /* @__PURE__ */ q(Y.MultiValueRemove, {
|
|
3091
3055
|
...e,
|
|
3092
3056
|
innerProps: {
|
|
3093
3057
|
...e.innerProps,
|
|
@@ -3101,13 +3065,13 @@ function wi(e) {
|
|
|
3101
3065
|
}
|
|
3102
3066
|
function Ti(e) {
|
|
3103
3067
|
let { visibleTagCount: t } = e.selectProps;
|
|
3104
|
-
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", {
|
|
3105
3069
|
className: li,
|
|
3106
3070
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
3107
3071
|
}) : null;
|
|
3108
3072
|
}
|
|
3109
3073
|
function Ei(e) {
|
|
3110
|
-
return /* @__PURE__ */ J(
|
|
3074
|
+
return /* @__PURE__ */ J(Y.Option, {
|
|
3111
3075
|
...e,
|
|
3112
3076
|
innerProps: yi(e.innerProps, vi(e.selectProps, `option-${String(e.data.value)}`)),
|
|
3113
3077
|
children: [e.children, e.isSelected && /* @__PURE__ */ q(b, {
|
|
@@ -3117,14 +3081,14 @@ function Ei(e) {
|
|
|
3117
3081
|
});
|
|
3118
3082
|
}
|
|
3119
3083
|
function Di() {
|
|
3120
|
-
return /* @__PURE__ */ q(
|
|
3084
|
+
return /* @__PURE__ */ q(P, {
|
|
3121
3085
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
3122
3086
|
"aria-hidden": !0
|
|
3123
3087
|
});
|
|
3124
3088
|
}
|
|
3125
3089
|
function Oi(e) {
|
|
3126
3090
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
3127
|
-
return /* @__PURE__ */ J(
|
|
3091
|
+
return /* @__PURE__ */ J(Y.Menu, {
|
|
3128
3092
|
...e,
|
|
3129
3093
|
innerProps: yi(e.innerProps, vi(e.selectProps, "content")),
|
|
3130
3094
|
children: [
|
|
@@ -3168,7 +3132,7 @@ function Oi(e) {
|
|
|
3168
3132
|
});
|
|
3169
3133
|
}
|
|
3170
3134
|
function ki(t) {
|
|
3171
|
-
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({
|
|
3172
3136
|
count: o.length,
|
|
3173
3137
|
getScrollElement: () => s.current,
|
|
3174
3138
|
estimateSize: () => _i,
|
|
@@ -3199,28 +3163,28 @@ function ki(t) {
|
|
|
3199
3163
|
});
|
|
3200
3164
|
}
|
|
3201
3165
|
var Ai = a(function(e, t) {
|
|
3202
|
-
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(() => {
|
|
3203
3167
|
if (!d) {
|
|
3204
|
-
if (j && !
|
|
3168
|
+
if (j && !B) {
|
|
3205
3169
|
let e = fi(j);
|
|
3206
3170
|
if (e !== void 0) return e;
|
|
3207
3171
|
}
|
|
3208
3172
|
return g;
|
|
3209
3173
|
}
|
|
3210
|
-
}), [
|
|
3174
|
+
}), [ue, V] = m(() => {
|
|
3211
3175
|
if (!d) return [];
|
|
3212
|
-
if (j && !
|
|
3176
|
+
if (j && !B) {
|
|
3213
3177
|
let e = fi(j);
|
|
3214
3178
|
if (Array.isArray(e)) return e;
|
|
3215
3179
|
}
|
|
3216
3180
|
return g ?? [];
|
|
3217
|
-
}), [
|
|
3181
|
+
}), [de, fe] = m(() => !!j && pi(j)), [pe, me] = m(() => {
|
|
3218
3182
|
let e = /* @__PURE__ */ new Map();
|
|
3219
3183
|
for (let t of n) e.set(String(t.value), t);
|
|
3220
3184
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
3221
3185
|
return e;
|
|
3222
|
-
}),
|
|
3223
|
-
e.length !== 0 &&
|
|
3186
|
+
}), H = s((e) => {
|
|
3187
|
+
e.length !== 0 && me((t) => {
|
|
3224
3188
|
let n = !1, r = new Map(t);
|
|
3225
3189
|
for (let t of e) {
|
|
3226
3190
|
let e = String(t.value);
|
|
@@ -3230,57 +3194,57 @@ var Ai = a(function(e, t) {
|
|
|
3230
3194
|
});
|
|
3231
3195
|
}, []);
|
|
3232
3196
|
f(() => {
|
|
3233
|
-
|
|
3234
|
-
}, [n,
|
|
3235
|
-
let
|
|
3197
|
+
H(n);
|
|
3198
|
+
}, [n, H]);
|
|
3199
|
+
let he = s((e) => pe.get(String(e)) ?? {
|
|
3236
3200
|
value: e,
|
|
3237
3201
|
label: String(e)
|
|
3238
|
-
}, [
|
|
3239
|
-
|
|
3202
|
+
}, [pe]), W = B ? h : ce, G = f(() => (B ? h : ue) ?? [], [
|
|
3203
|
+
B,
|
|
3240
3204
|
h,
|
|
3241
|
-
|
|
3242
|
-
]), ge = !d && W !== void 0 ?
|
|
3243
|
-
if (r) return (e) => Promise.resolve(r(e)).then((e) => (
|
|
3244
|
-
}, [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) => {
|
|
3245
3209
|
if (d) {
|
|
3246
3210
|
let t = [...e ?? []];
|
|
3247
|
-
|
|
3211
|
+
H(t);
|
|
3248
3212
|
let n = t.map((e) => e.value);
|
|
3249
|
-
|
|
3213
|
+
V(n), _?.(n);
|
|
3250
3214
|
} else {
|
|
3251
3215
|
let t = e;
|
|
3252
|
-
t &&
|
|
3216
|
+
t && H([t]), le(t?.value), _?.(t?.value ?? void 0);
|
|
3253
3217
|
}
|
|
3254
3218
|
}, [
|
|
3255
3219
|
d,
|
|
3256
|
-
|
|
3220
|
+
H,
|
|
3257
3221
|
_
|
|
3258
3222
|
]), ye = s((e) => {
|
|
3259
3223
|
let t = {
|
|
3260
3224
|
value: e,
|
|
3261
3225
|
label: e
|
|
3262
3226
|
};
|
|
3263
|
-
if (
|
|
3227
|
+
if (H([t]), o?.(e), d) {
|
|
3264
3228
|
let e = [...G, t.value];
|
|
3265
|
-
|
|
3266
|
-
} else
|
|
3229
|
+
V(e), _?.(e);
|
|
3230
|
+
} else le(t.value), _?.(t.value);
|
|
3267
3231
|
}, [
|
|
3268
3232
|
d,
|
|
3269
3233
|
G,
|
|
3270
|
-
|
|
3234
|
+
H,
|
|
3271
3235
|
_,
|
|
3272
3236
|
o
|
|
3273
|
-
]), 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), [
|
|
3274
3238
|
ee,
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
]),
|
|
3278
|
-
wrapperRef:
|
|
3279
|
-
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,
|
|
3280
3244
|
total: K.length,
|
|
3281
3245
|
labelsKey: K.map(ui).join("\0"),
|
|
3282
|
-
enabled:
|
|
3283
|
-
}),
|
|
3246
|
+
enabled: Ae
|
|
3247
|
+
}), Me = f(() => n.some((e) => !!e.description), [n]), Ne = f(() => {
|
|
3284
3248
|
if (!n.some((e) => e.group)) return n;
|
|
3285
3249
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
3286
3250
|
for (let r of n) {
|
|
@@ -3295,83 +3259,83 @@ var Ai = a(function(e, t) {
|
|
|
3295
3259
|
})), n.push(r);
|
|
3296
3260
|
}
|
|
3297
3261
|
return t;
|
|
3298
|
-
}, [n]),
|
|
3262
|
+
}, [n]), Pe = !!d && !be, Fe = d ? G : W;
|
|
3299
3263
|
l(() => {
|
|
3300
|
-
!j || !
|
|
3264
|
+
!j || !de || mi(j, Fe);
|
|
3301
3265
|
}, [
|
|
3302
3266
|
j,
|
|
3303
|
-
|
|
3304
|
-
|
|
3267
|
+
de,
|
|
3268
|
+
Fe
|
|
3305
3269
|
]);
|
|
3306
|
-
let
|
|
3307
|
-
j &&
|
|
3270
|
+
let Ie = s(() => {
|
|
3271
|
+
j && fe((e) => {
|
|
3308
3272
|
let t = !e;
|
|
3309
|
-
return t ? mi(j,
|
|
3273
|
+
return t ? mi(j, Fe) : hi(j), t;
|
|
3310
3274
|
});
|
|
3311
|
-
}, [j,
|
|
3312
|
-
checked:
|
|
3313
|
-
label: M ??
|
|
3275
|
+
}, [j, Fe]), Le = f(() => j ? {
|
|
3276
|
+
checked: de,
|
|
3277
|
+
label: M ?? z.saveSelectionLabel
|
|
3314
3278
|
} : null, [
|
|
3315
3279
|
j,
|
|
3316
|
-
|
|
3280
|
+
de,
|
|
3317
3281
|
M,
|
|
3318
|
-
|
|
3319
|
-
]), [
|
|
3320
|
-
|
|
3321
|
-
}, []),
|
|
3322
|
-
|
|
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,
|
|
3323
3287
|
n,
|
|
3324
|
-
|
|
3325
|
-
]),
|
|
3326
|
-
if (!
|
|
3327
|
-
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;
|
|
3328
3292
|
return {
|
|
3329
|
-
count:
|
|
3293
|
+
count: X.length,
|
|
3330
3294
|
checked: n,
|
|
3331
|
-
indeterminate: t > 0 && t <
|
|
3332
|
-
label: n ?
|
|
3295
|
+
indeterminate: t > 0 && t < X.length,
|
|
3296
|
+
label: n ? z.clearAllLabel(X.length) : z.selectAllLabel(X.length)
|
|
3333
3297
|
};
|
|
3334
3298
|
}, [
|
|
3335
|
-
|
|
3336
|
-
|
|
3299
|
+
Pe,
|
|
3300
|
+
X,
|
|
3337
3301
|
G,
|
|
3338
|
-
|
|
3339
|
-
]),
|
|
3340
|
-
if (!
|
|
3341
|
-
let e = new Set(
|
|
3342
|
-
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)));
|
|
3343
3307
|
else {
|
|
3344
|
-
|
|
3308
|
+
H(X);
|
|
3345
3309
|
let e = new Set(G.map(String));
|
|
3346
|
-
t = [...G, ...
|
|
3310
|
+
t = [...G, ...X.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
3347
3311
|
}
|
|
3348
|
-
|
|
3312
|
+
V(t), _?.(t), ke.current?.onMenuClose();
|
|
3349
3313
|
}, [
|
|
3314
|
+
Z,
|
|
3350
3315
|
X,
|
|
3351
|
-
Y,
|
|
3352
3316
|
G,
|
|
3353
|
-
|
|
3317
|
+
H,
|
|
3354
3318
|
_
|
|
3355
|
-
]), He = {
|
|
3356
|
-
...
|
|
3357
|
-
dataTestId:
|
|
3358
|
-
inputId:
|
|
3319
|
+
]), He = qt(), Ue = {
|
|
3320
|
+
...L,
|
|
3321
|
+
dataTestId: I,
|
|
3322
|
+
inputId: oe,
|
|
3359
3323
|
unstyled: !0,
|
|
3360
|
-
classNames:
|
|
3361
|
-
className:
|
|
3324
|
+
classNames: Ee,
|
|
3325
|
+
className: P,
|
|
3362
3326
|
isMulti: d,
|
|
3363
|
-
options:
|
|
3327
|
+
options: Ne,
|
|
3364
3328
|
loadOptions: _e,
|
|
3365
3329
|
defaultOptions: i,
|
|
3366
3330
|
value: d ? K : ge,
|
|
3367
3331
|
onChange: ve,
|
|
3368
3332
|
onCreateOption: a ? ye : void 0,
|
|
3369
|
-
formatCreateLabel: a ?
|
|
3333
|
+
formatCreateLabel: a ? ie : void 0,
|
|
3370
3334
|
getOptionValue: (e) => String(e.value),
|
|
3371
3335
|
getOptionLabel: ui,
|
|
3372
3336
|
formatOptionLabel: (e, t) => {
|
|
3373
3337
|
if (t.context === "value") return e.label;
|
|
3374
|
-
let n =
|
|
3338
|
+
let n = Me && e.description ? /* @__PURE__ */ J("span", {
|
|
3375
3339
|
className: "flex flex-col min-w-0",
|
|
3376
3340
|
children: [/* @__PURE__ */ q("span", {
|
|
3377
3341
|
className: "truncate",
|
|
@@ -3387,7 +3351,7 @@ var Ai = a(function(e, t) {
|
|
|
3387
3351
|
className: "min-w-0 flex-1 truncate",
|
|
3388
3352
|
children: n
|
|
3389
3353
|
}), /* @__PURE__ */ q("span", {
|
|
3390
|
-
"data-test-id": vi({ dataTestId:
|
|
3354
|
+
"data-test-id": vi({ dataTestId: I }, `option-${String(e.value)}-actions`),
|
|
3391
3355
|
className: "ml-auto inline-flex shrink-0 items-center",
|
|
3392
3356
|
onMouseDown: (e) => {
|
|
3393
3357
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -3398,33 +3362,33 @@ var Ai = a(function(e, t) {
|
|
|
3398
3362
|
}) : n;
|
|
3399
3363
|
},
|
|
3400
3364
|
isOptionDisabled: (e) => !!e.disabled,
|
|
3401
|
-
placeholder:
|
|
3365
|
+
placeholder: ne,
|
|
3402
3366
|
isDisabled: te || T,
|
|
3403
3367
|
isClearable: E,
|
|
3404
3368
|
isSearchable: xe,
|
|
3405
3369
|
isLoading: T || void 0,
|
|
3406
|
-
noOptionsMessage: () =>
|
|
3407
|
-
loadingMessage: () =>
|
|
3408
|
-
"aria-invalid":
|
|
3370
|
+
noOptionsMessage: () => re,
|
|
3371
|
+
loadingMessage: () => z.loadingMessage,
|
|
3372
|
+
"aria-invalid": se || void 0,
|
|
3409
3373
|
"aria-required": w || void 0,
|
|
3410
|
-
...
|
|
3411
|
-
inputValue:
|
|
3412
|
-
onInputChange:
|
|
3413
|
-
selectAllState:
|
|
3414
|
-
onSelectAllToggle:
|
|
3374
|
+
...Pe ? {
|
|
3375
|
+
inputValue: Re,
|
|
3376
|
+
onInputChange: Be,
|
|
3377
|
+
selectAllState: Z,
|
|
3378
|
+
onSelectAllToggle: Ve
|
|
3415
3379
|
} : {},
|
|
3416
|
-
...
|
|
3417
|
-
saveSelectionState:
|
|
3418
|
-
onSaveSelectionToggle:
|
|
3380
|
+
...Le ? {
|
|
3381
|
+
saveSelectionState: Le,
|
|
3382
|
+
onSaveSelectionToggle: Ie
|
|
3419
3383
|
} : {},
|
|
3420
|
-
...
|
|
3384
|
+
...Ae ? { visibleTagCount: je } : {},
|
|
3421
3385
|
...d ? {
|
|
3422
|
-
closeMenuOnSelect:
|
|
3423
|
-
hideSelectedOptions:
|
|
3386
|
+
closeMenuOnSelect: L.closeMenuOnSelect ?? !1,
|
|
3387
|
+
hideSelectedOptions: L.hideSelectedOptions ?? !1
|
|
3424
3388
|
} : {},
|
|
3425
|
-
menuPlacement:
|
|
3426
|
-
menuPortalTarget:
|
|
3427
|
-
menuPosition:
|
|
3389
|
+
menuPlacement: L.menuPlacement ?? "auto",
|
|
3390
|
+
menuPortalTarget: L.menuPortalTarget ?? He ?? void 0,
|
|
3391
|
+
menuPosition: L.menuPosition ?? "fixed",
|
|
3428
3392
|
components: {
|
|
3429
3393
|
Control: bi,
|
|
3430
3394
|
Menu: Oi,
|
|
@@ -3435,19 +3399,19 @@ var Ai = a(function(e, t) {
|
|
|
3435
3399
|
LoadingIndicator: Di,
|
|
3436
3400
|
IndicatorSeparator: () => null,
|
|
3437
3401
|
...O ? { MenuList: ki } : {},
|
|
3438
|
-
...
|
|
3402
|
+
...Ae ? { MultiValue: Ti } : {},
|
|
3439
3403
|
Option: Ei
|
|
3440
3404
|
}
|
|
3441
3405
|
};
|
|
3442
3406
|
return /* @__PURE__ */ J("div", {
|
|
3443
|
-
ref:
|
|
3444
|
-
"data-test-id":
|
|
3445
|
-
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),
|
|
3446
3410
|
children: [
|
|
3447
3411
|
(y || b) && /* @__PURE__ */ J("div", {
|
|
3448
3412
|
className: "flex items-center gap-1.5",
|
|
3449
3413
|
children: [y && /* @__PURE__ */ J("label", {
|
|
3450
|
-
htmlFor:
|
|
3414
|
+
htmlFor: oe,
|
|
3451
3415
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3452
3416
|
children: [y, w && /* @__PURE__ */ q("span", {
|
|
3453
3417
|
className: "text-fg-danger",
|
|
@@ -3459,12 +3423,12 @@ var Ai = a(function(e, t) {
|
|
|
3459
3423
|
children: b
|
|
3460
3424
|
})]
|
|
3461
3425
|
}),
|
|
3462
|
-
/* @__PURE__ */ q(
|
|
3463
|
-
ref: Gt(t,
|
|
3464
|
-
...
|
|
3426
|
+
/* @__PURE__ */ q(Y, {
|
|
3427
|
+
ref: Gt(t, ke),
|
|
3428
|
+
...Ue
|
|
3465
3429
|
}),
|
|
3466
|
-
|
|
3467
|
-
ref:
|
|
3430
|
+
Ae && /* @__PURE__ */ J("div", {
|
|
3431
|
+
ref: Oe,
|
|
3468
3432
|
"aria-hidden": !0,
|
|
3469
3433
|
className: "flex items-center gap-1 whitespace-nowrap",
|
|
3470
3434
|
style: {
|
|
@@ -3492,11 +3456,11 @@ var Ai = a(function(e, t) {
|
|
|
3492
3456
|
})]
|
|
3493
3457
|
}),
|
|
3494
3458
|
S ? /* @__PURE__ */ q("p", {
|
|
3495
|
-
id: `${
|
|
3459
|
+
id: `${oe}-error`,
|
|
3496
3460
|
className: "text-p-sm text-fg-danger",
|
|
3497
3461
|
children: S
|
|
3498
3462
|
}) : x ? /* @__PURE__ */ q("p", {
|
|
3499
|
-
id: `${
|
|
3463
|
+
id: `${oe}-help`,
|
|
3500
3464
|
className: "text-p-sm text-fg-secondary",
|
|
3501
3465
|
children: x
|
|
3502
3466
|
}) : null
|
|
@@ -3546,7 +3510,7 @@ var Ni = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3546
3510
|
onClick: g,
|
|
3547
3511
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
3548
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"),
|
|
3549
|
-
children: /* @__PURE__ */ q(
|
|
3513
|
+
children: /* @__PURE__ */ q(F, { className: "h-4 w-4" })
|
|
3550
3514
|
})
|
|
3551
3515
|
]
|
|
3552
3516
|
}), /* @__PURE__ */ q("nav", {
|
|
@@ -3971,7 +3935,7 @@ function ua({ column: e }) {
|
|
|
3971
3935
|
placeholder: "All",
|
|
3972
3936
|
value: typeof n == "string" ? n : void 0,
|
|
3973
3937
|
onChange: (t) => e.setFilterValue(t || void 0)
|
|
3974
|
-
}) : /* @__PURE__ */ q(
|
|
3938
|
+
}) : /* @__PURE__ */ q(an, {
|
|
3975
3939
|
size: "sm",
|
|
3976
3940
|
type: t === "date" ? "date" : "text",
|
|
3977
3941
|
"aria-label": `Filter by ${e.id}`,
|
|
@@ -4092,9 +4056,9 @@ function ha({ table: e }) {
|
|
|
4092
4056
|
function ga({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
4093
4057
|
return /* @__PURE__ */ J("div", {
|
|
4094
4058
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
4095
|
-
children: [t && /* @__PURE__ */ q(
|
|
4059
|
+
children: [t && /* @__PURE__ */ q(an, {
|
|
4096
4060
|
size: "sm",
|
|
4097
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4061
|
+
leftIcon: /* @__PURE__ */ q(ce, { className: "h-4 w-4" }),
|
|
4098
4062
|
placeholder: r ?? "Search...",
|
|
4099
4063
|
"aria-label": "Search",
|
|
4100
4064
|
value: String(e.getState().globalFilter ?? ""),
|
|
@@ -4108,7 +4072,7 @@ function ga({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4108
4072
|
size: "sm",
|
|
4109
4073
|
iconOnly: !0,
|
|
4110
4074
|
"aria-label": "Refresh",
|
|
4111
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4075
|
+
leftIcon: /* @__PURE__ */ q(B, { className: "h-4 w-4" }),
|
|
4112
4076
|
onClick: i
|
|
4113
4077
|
}),
|
|
4114
4078
|
a && /* @__PURE__ */ q(ot, {
|
|
@@ -4132,19 +4096,19 @@ var _a = ({ transform: e }) => ({
|
|
|
4132
4096
|
});
|
|
4133
4097
|
function va({ columnOrder: e, onColumnOrderChange: t }) {
|
|
4134
4098
|
return {
|
|
4135
|
-
sensors:
|
|
4136
|
-
collisionDetection:
|
|
4099
|
+
sensors: Re(Le(Fe, { activationConstraint: { distance: 4 } }), Le(Pe, { coordinateGetter: Z })),
|
|
4100
|
+
collisionDetection: Ie,
|
|
4137
4101
|
modifiers: [_a],
|
|
4138
4102
|
handleDragEnd: (n) => {
|
|
4139
4103
|
let { active: r, over: i } = n;
|
|
4140
4104
|
if (!i || r.id === i.id) return;
|
|
4141
4105
|
let a = e.indexOf(String(r.id)), o = e.indexOf(String(i.id));
|
|
4142
|
-
a === -1 || o === -1 || t(
|
|
4106
|
+
a === -1 || o === -1 || t(Be(e, a, o));
|
|
4143
4107
|
}
|
|
4144
4108
|
};
|
|
4145
4109
|
}
|
|
4146
4110
|
function ya(e) {
|
|
4147
|
-
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 });
|
|
4148
4112
|
return {
|
|
4149
4113
|
setNodeRef: r,
|
|
4150
4114
|
attributes: t,
|
|
@@ -4167,7 +4131,7 @@ function ba({ row: e, actions: t }) {
|
|
|
4167
4131
|
size: "sm",
|
|
4168
4132
|
iconOnly: !0,
|
|
4169
4133
|
"aria-label": "Row actions",
|
|
4170
|
-
leftIcon: /* @__PURE__ */ q(
|
|
4134
|
+
leftIcon: /* @__PURE__ */ q(ne, { className: "h-4 w-4" })
|
|
4171
4135
|
}) }), /* @__PURE__ */ q(hr, {
|
|
4172
4136
|
align: "end",
|
|
4173
4137
|
children: t.map((t, n) => /* @__PURE__ */ q(gr, {
|
|
@@ -4247,7 +4211,7 @@ function Ea(e, t, n) {
|
|
|
4247
4211
|
}
|
|
4248
4212
|
var Da = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4249
4213
|
function Oa({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
4250
|
-
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());
|
|
4251
4215
|
return /* @__PURE__ */ J("th", {
|
|
4252
4216
|
ref: u ? d.setNodeRef : void 0,
|
|
4253
4217
|
colSpan: e.colSpan,
|
|
@@ -4290,23 +4254,23 @@ function Oa({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4290
4254
|
type: "button",
|
|
4291
4255
|
"aria-label": `${typeof h == "string" ? h : c.id} column options`,
|
|
4292
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",
|
|
4293
|
-
children: /* @__PURE__ */ q(
|
|
4257
|
+
children: /* @__PURE__ */ q(z, { className: "h-3.5 w-3.5" })
|
|
4294
4258
|
}) }), /* @__PURE__ */ J(hr, {
|
|
4295
4259
|
align: "start",
|
|
4296
4260
|
children: [
|
|
4297
4261
|
o && c.getCanPin() && /* @__PURE__ */ J(K, { children: [
|
|
4298
4262
|
c.getIsPinned() !== "left" && /* @__PURE__ */ q(gr, {
|
|
4299
|
-
icon: /* @__PURE__ */ q(
|
|
4263
|
+
icon: /* @__PURE__ */ q(ae, { className: "h-4 w-4" }),
|
|
4300
4264
|
onSelect: () => c.pin("left"),
|
|
4301
4265
|
children: "Pin left"
|
|
4302
4266
|
}),
|
|
4303
4267
|
c.getIsPinned() !== "right" && /* @__PURE__ */ q(gr, {
|
|
4304
|
-
icon: /* @__PURE__ */ q(
|
|
4268
|
+
icon: /* @__PURE__ */ q(ae, { className: "h-4 w-4" }),
|
|
4305
4269
|
onSelect: () => c.pin("right"),
|
|
4306
4270
|
children: "Pin right"
|
|
4307
4271
|
}),
|
|
4308
4272
|
c.getIsPinned() && /* @__PURE__ */ q(gr, {
|
|
4309
|
-
icon: /* @__PURE__ */ q(
|
|
4273
|
+
icon: /* @__PURE__ */ q(oe, { className: "h-4 w-4" }),
|
|
4310
4274
|
onSelect: () => c.pin(!1),
|
|
4311
4275
|
children: "Unpin"
|
|
4312
4276
|
})
|
|
@@ -4346,12 +4310,12 @@ function ka({ row: e, onRowClick: t }) {
|
|
|
4346
4310
|
children: [/* @__PURE__ */ J("div", {
|
|
4347
4311
|
className: "flex items-center gap-2",
|
|
4348
4312
|
children: [
|
|
4349
|
-
i &&
|
|
4313
|
+
i && De(i.column.columnDef.cell, i.getContext()),
|
|
4350
4314
|
/* @__PURE__ */ q("div", {
|
|
4351
4315
|
className: "flex-1 min-w-0 text-p-std font-medium text-fg-default truncate",
|
|
4352
|
-
children: r &&
|
|
4316
|
+
children: r && De(r.column.columnDef.cell, r.getContext())
|
|
4353
4317
|
}),
|
|
4354
|
-
a &&
|
|
4318
|
+
a && De(a.column.columnDef.cell, a.getContext())
|
|
4355
4319
|
]
|
|
4356
4320
|
}), o.length > 0 && /* @__PURE__ */ q("dl", {
|
|
4357
4321
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -4364,7 +4328,7 @@ function ka({ row: e, onRowClick: t }) {
|
|
|
4364
4328
|
children: typeof t == "string" ? t : e.column.id
|
|
4365
4329
|
}), /* @__PURE__ */ q("dd", {
|
|
4366
4330
|
className: "text-p-sm text-fg-default truncate",
|
|
4367
|
-
children:
|
|
4331
|
+
children: De(e.column.columnDef.cell, e.getContext())
|
|
4368
4332
|
})]
|
|
4369
4333
|
}, e.id);
|
|
4370
4334
|
})
|
|
@@ -4385,10 +4349,10 @@ function Aa({ rowCount: e }) {
|
|
|
4385
4349
|
}, t)) });
|
|
4386
4350
|
}
|
|
4387
4351
|
function ja(e, t) {
|
|
4388
|
-
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, {
|
|
4389
4353
|
pageIndex: 0,
|
|
4390
|
-
pageSize:
|
|
4391
|
-
}),
|
|
4354
|
+
pageSize: R
|
|
4355
|
+
}), Z = Me({
|
|
4392
4356
|
data: n,
|
|
4393
4357
|
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [Ca(), ...r], [r, w]),
|
|
4394
4358
|
getRowId: s,
|
|
@@ -4396,20 +4360,20 @@ function ja(e, t) {
|
|
|
4396
4360
|
sorting: _e,
|
|
4397
4361
|
columnFilters: ye,
|
|
4398
4362
|
globalFilter: xe,
|
|
4399
|
-
rowSelection:
|
|
4400
|
-
columnVisibility:
|
|
4401
|
-
columnOrder:
|
|
4402
|
-
columnPinning:
|
|
4403
|
-
pagination:
|
|
4363
|
+
rowSelection: Y,
|
|
4364
|
+
columnVisibility: we,
|
|
4365
|
+
columnOrder: Pe,
|
|
4366
|
+
columnPinning: Ie,
|
|
4367
|
+
pagination: Re
|
|
4404
4368
|
},
|
|
4405
4369
|
onSortingChange: ve,
|
|
4406
4370
|
onColumnFiltersChange: be,
|
|
4407
4371
|
onGlobalFilterChange: Se,
|
|
4408
|
-
onRowSelectionChange:
|
|
4409
|
-
onColumnVisibilityChange:
|
|
4410
|
-
onColumnOrderChange:
|
|
4411
|
-
onColumnPinningChange:
|
|
4412
|
-
onPaginationChange:
|
|
4372
|
+
onRowSelectionChange: Ce,
|
|
4373
|
+
onColumnVisibilityChange: Te,
|
|
4374
|
+
onColumnOrderChange: Fe,
|
|
4375
|
+
onColumnPinningChange: Le,
|
|
4376
|
+
onPaginationChange: Be,
|
|
4413
4377
|
enableSorting: c,
|
|
4414
4378
|
enableMultiSort: l,
|
|
4415
4379
|
manualSorting: g,
|
|
@@ -4418,37 +4382,37 @@ function ja(e, t) {
|
|
|
4418
4382
|
manualFiltering: b,
|
|
4419
4383
|
enableRowSelection: w,
|
|
4420
4384
|
enableMultiRowSelection: T,
|
|
4421
|
-
enableColumnResizing:
|
|
4422
|
-
columnResizeMode:
|
|
4423
|
-
manualPagination:
|
|
4424
|
-
pageCount:
|
|
4425
|
-
rowCount:
|
|
4426
|
-
getCoreRowModel:
|
|
4427
|
-
getSortedRowModel: c ?
|
|
4428
|
-
getFilteredRowModel: _ || x ?
|
|
4429
|
-
getPaginationRowModel:
|
|
4430
|
-
}),
|
|
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);
|
|
4431
4395
|
d(() => {
|
|
4432
|
-
if (!
|
|
4396
|
+
if (!L || B) return;
|
|
4433
4397
|
let e = Ue.current?.getBoundingClientRect().height;
|
|
4434
4398
|
e && e !== Ge && Ke(e);
|
|
4435
4399
|
}, [
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4400
|
+
L,
|
|
4401
|
+
B,
|
|
4402
|
+
H,
|
|
4403
|
+
Ve,
|
|
4440
4404
|
Ge
|
|
4441
4405
|
]);
|
|
4442
|
-
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({
|
|
4443
4407
|
columnOrder: Ye,
|
|
4444
|
-
onColumnOrderChange:
|
|
4445
|
-
}), Ze = (e) => Xe.handleDragEnd(e), Qe = p(null), $e =
|
|
4446
|
-
count:
|
|
4408
|
+
onColumnOrderChange: Fe
|
|
4409
|
+
}), Ze = (e) => Xe.handleDragEnd(e), Qe = p(null), $e = Ee({
|
|
4410
|
+
count: Ve.length,
|
|
4447
4411
|
getScrollElement: () => Qe.current,
|
|
4448
|
-
estimateSize: () =>
|
|
4412
|
+
estimateSize: () => ce,
|
|
4449
4413
|
overscan: 10,
|
|
4450
|
-
enabled:
|
|
4451
|
-
}), 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) => {
|
|
4452
4416
|
let t = e.original?.id;
|
|
4453
4417
|
return typeof t == "string" || typeof t == "number" ? String(t) : e.id;
|
|
4454
4418
|
}, at = (e, t) => /* @__PURE__ */ q("tr", {
|
|
@@ -4456,37 +4420,37 @@ function ja(e, t) {
|
|
|
4456
4420
|
"data-test-id": rt(`row-${it(e)}`),
|
|
4457
4421
|
"data-row-id": it(e),
|
|
4458
4422
|
"data-selected": e.getIsSelected() || void 0,
|
|
4459
|
-
onClick:
|
|
4460
|
-
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"),
|
|
4461
4425
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ q("td", {
|
|
4462
4426
|
"data-test-id": rt(`cell-${e.column.id}`),
|
|
4463
4427
|
style: Ta(e.column),
|
|
4464
|
-
className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", xa[
|
|
4465
|
-
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())
|
|
4466
4430
|
}, e.id))
|
|
4467
4431
|
}, e.id), ot = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4468
4432
|
"data-test-id": rt(`header-row-${e}`),
|
|
4469
4433
|
children: t.map((e) => /* @__PURE__ */ q(Oa, {
|
|
4470
4434
|
header: e,
|
|
4471
|
-
density:
|
|
4435
|
+
density: H,
|
|
4472
4436
|
enableSorting: c,
|
|
4473
4437
|
enableFiltering: _,
|
|
4474
4438
|
enableColumnOrdering: j,
|
|
4475
|
-
enableColumnResizing:
|
|
4439
|
+
enableColumnResizing: F,
|
|
4476
4440
|
enablePinning: te,
|
|
4477
4441
|
enableColumnVisibility: O
|
|
4478
4442
|
}, e.id))
|
|
4479
4443
|
}, e), st = /* @__PURE__ */ J("table", {
|
|
4480
4444
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4481
|
-
style: { width:
|
|
4445
|
+
style: { width: F ? Z.getTotalSize() : "100%" },
|
|
4482
4446
|
children: [/* @__PURE__ */ q("thead", {
|
|
4483
|
-
className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (
|
|
4484
|
-
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))
|
|
4485
4449
|
}), /* @__PURE__ */ q("tbody", { children: i ? /* @__PURE__ */ q(pa, {
|
|
4486
4450
|
columnCount: He,
|
|
4487
|
-
rowCount:
|
|
4451
|
+
rowCount: Re.pageSize,
|
|
4488
4452
|
testIdPrefix: ge
|
|
4489
|
-
}) :
|
|
4453
|
+
}) : Ve.length === 0 ? /* @__PURE__ */ q("tr", {
|
|
4490
4454
|
"data-test-id": rt("empty-row"),
|
|
4491
4455
|
children: /* @__PURE__ */ q("td", {
|
|
4492
4456
|
colSpan: He,
|
|
@@ -4496,7 +4460,7 @@ function ja(e, t) {
|
|
|
4496
4460
|
title: o
|
|
4497
4461
|
})
|
|
4498
4462
|
})
|
|
4499
|
-
}) :
|
|
4463
|
+
}) : B && et ? /* @__PURE__ */ J(K, { children: [
|
|
4500
4464
|
tt > 0 && /* @__PURE__ */ q("tr", {
|
|
4501
4465
|
"aria-hidden": !0,
|
|
4502
4466
|
"data-test-id": rt("padding-top-row"),
|
|
@@ -4506,7 +4470,7 @@ function ja(e, t) {
|
|
|
4506
4470
|
})
|
|
4507
4471
|
}),
|
|
4508
4472
|
et.map((e) => {
|
|
4509
|
-
let t =
|
|
4473
|
+
let t = Ve[e.index];
|
|
4510
4474
|
return t ? at(t) : null;
|
|
4511
4475
|
}),
|
|
4512
4476
|
nt > 0 && /* @__PURE__ */ q("tr", {
|
|
@@ -4517,7 +4481,7 @@ function ja(e, t) {
|
|
|
4517
4481
|
colSpan: He
|
|
4518
4482
|
})
|
|
4519
4483
|
})
|
|
4520
|
-
] }) : /* @__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", {
|
|
4521
4485
|
"aria-hidden": !0,
|
|
4522
4486
|
"data-test-id": rt("filler-row"),
|
|
4523
4487
|
children: /* @__PURE__ */ q("td", {
|
|
@@ -4532,14 +4496,14 @@ function ja(e, t) {
|
|
|
4532
4496
|
"data-test-id": ge,
|
|
4533
4497
|
className: Q("w-full rounded-lg border border-border-default bg-bg-default", U && "h-full flex flex-col", W, G),
|
|
4534
4498
|
children: [
|
|
4535
|
-
|
|
4536
|
-
table:
|
|
4499
|
+
V === !1 ? null : V ?? /* @__PURE__ */ q(ga, {
|
|
4500
|
+
table: Z,
|
|
4537
4501
|
enableGlobalFilter: x,
|
|
4538
4502
|
enableColumnVisibility: O,
|
|
4539
|
-
searchPlaceholder:
|
|
4540
|
-
onRefresh:
|
|
4541
|
-
onExport:
|
|
4542
|
-
actions:
|
|
4503
|
+
searchPlaceholder: fe,
|
|
4504
|
+
onRefresh: pe,
|
|
4505
|
+
onExport: me,
|
|
4506
|
+
actions: de
|
|
4543
4507
|
}),
|
|
4544
4508
|
a ? /* @__PURE__ */ q("div", {
|
|
4545
4509
|
className: "p-4",
|
|
@@ -4552,34 +4516,34 @@ function ja(e, t) {
|
|
|
4552
4516
|
className: Q("hidden", U ? "md:flex md:flex-col md:flex-1 md:min-h-0" : "md:block"),
|
|
4553
4517
|
children: /* @__PURE__ */ q("div", {
|
|
4554
4518
|
ref: Qe,
|
|
4555
|
-
className: Q("w-full overflow-auto",
|
|
4556
|
-
style: U ? void 0 :
|
|
4557
|
-
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, {
|
|
4558
4522
|
sensors: Xe.sensors,
|
|
4559
4523
|
collisionDetection: Xe.collisionDetection,
|
|
4560
4524
|
modifiers: Xe.modifiers,
|
|
4561
4525
|
onDragEnd: Ze,
|
|
4562
|
-
children: /* @__PURE__ */ q(
|
|
4526
|
+
children: /* @__PURE__ */ q(ze, {
|
|
4563
4527
|
items: Ye,
|
|
4564
|
-
strategy:
|
|
4528
|
+
strategy: X,
|
|
4565
4529
|
children: st
|
|
4566
4530
|
})
|
|
4567
4531
|
}) : st
|
|
4568
4532
|
})
|
|
4569
4533
|
}), /* @__PURE__ */ q("div", {
|
|
4570
4534
|
className: "md:hidden",
|
|
4571
|
-
children: i ? /* @__PURE__ */ q(Aa, { rowCount:
|
|
4535
|
+
children: i ? /* @__PURE__ */ q(Aa, { rowCount: Re.pageSize }) : Ve.length === 0 ? /* @__PURE__ */ q(xr, {
|
|
4572
4536
|
size: "sm",
|
|
4573
4537
|
title: o
|
|
4574
|
-
}) :
|
|
4538
|
+
}) : Ve.map((e) => /* @__PURE__ */ q(ka, {
|
|
4575
4539
|
row: e,
|
|
4576
|
-
onRowClick:
|
|
4540
|
+
onRowClick: ue
|
|
4577
4541
|
}, e.id))
|
|
4578
4542
|
})] }),
|
|
4579
|
-
|
|
4580
|
-
table:
|
|
4581
|
-
pageSizeOptions:
|
|
4582
|
-
locale:
|
|
4543
|
+
L && !a && /* @__PURE__ */ q(fa, {
|
|
4544
|
+
table: Z,
|
|
4545
|
+
pageSizeOptions: z,
|
|
4546
|
+
locale: ie,
|
|
4583
4547
|
dataTestId: ge
|
|
4584
4548
|
})
|
|
4585
4549
|
]
|
|
@@ -4820,10 +4784,10 @@ var Ra = {
|
|
|
4820
4784
|
}),
|
|
4821
4785
|
/* @__PURE__ */ J("span", {
|
|
4822
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"),
|
|
4823
|
-
children: [/* @__PURE__ */ q(
|
|
4787
|
+
children: [/* @__PURE__ */ q(de, {
|
|
4824
4788
|
className: "size-4 text-yellow-500 z-1",
|
|
4825
4789
|
"aria-hidden": !0
|
|
4826
|
-
}), /* @__PURE__ */ q(
|
|
4790
|
+
}), /* @__PURE__ */ q(R, {
|
|
4827
4791
|
className: "size-4 text-gray-400 z-1",
|
|
4828
4792
|
"aria-hidden": !0
|
|
4829
4793
|
})]
|
|
@@ -4888,7 +4852,7 @@ var Ra = {
|
|
|
4888
4852
|
size: e,
|
|
4889
4853
|
title: t ?? Ja,
|
|
4890
4854
|
description: n ?? Ya,
|
|
4891
|
-
illustration: r ?? /* @__PURE__ */ q(
|
|
4855
|
+
illustration: r ?? /* @__PURE__ */ q(En, {
|
|
4892
4856
|
icon: k,
|
|
4893
4857
|
tone: "brand",
|
|
4894
4858
|
shape: "circle",
|
|
@@ -5163,6 +5127,6 @@ var Ra = {
|
|
|
5163
5127
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5164
5128
|
};
|
|
5165
5129
|
//#endregion
|
|
5166
|
-
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 };
|
|
5167
5131
|
|
|
5168
5132
|
//# sourceMappingURL=index.js.map
|