@dinofront/design_system 1.11.0 → 1.12.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/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { extendTailwindMerge 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 ne, Menu as P, Minus as F, Moon as I, MoreHorizontal as L, MoreVertical as R, Paperclip as re, Pencil as ie, Pin as ae, PinOff as oe, Plus as se, RefreshCw as ce, Search as z, SearchX as le, Sparkles as ue, Sun as de, Trash2 as B, UploadCloud as fe, User as pe, X as V, XCircle as me } from "lucide-react";
|
|
3
|
+
import { clsx as he } from "clsx";
|
|
4
|
+
import { extendTailwindMerge as H } from "tailwind-merge";
|
|
5
5
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
6
6
|
import { createPortal as K } from "react-dom";
|
|
7
|
-
import { Controller as
|
|
8
|
-
import { yupResolver as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useVirtualizer as
|
|
14
|
-
import { flexRender as
|
|
15
|
-
import { DndContext as je, KeyboardSensor as Me, PointerSensor as
|
|
16
|
-
import { SortableContext as
|
|
17
|
-
import { CSS as
|
|
7
|
+
import { Controller as q, useFieldArray as ge, useForm as _e } from "react-hook-form";
|
|
8
|
+
import { yupResolver as ve } from "@hookform/resolvers/yup";
|
|
9
|
+
import ye, { components as be } from "react-select";
|
|
10
|
+
import xe from "react-select/async";
|
|
11
|
+
import Se from "react-select/creatable";
|
|
12
|
+
import Ce from "react-select/async-creatable";
|
|
13
|
+
import { useVirtualizer as we } from "@tanstack/react-virtual";
|
|
14
|
+
import { flexRender as Te, getCoreRowModel as Ee, getFilteredRowModel as De, getPaginationRowModel as Oe, getSortedRowModel as ke, useReactTable as Ae } from "@tanstack/react-table";
|
|
15
|
+
import { DndContext as je, KeyboardSensor as Me, PointerSensor as Ne, closestCenter as Pe, useSensor as Fe, useSensors as Ie } from "@dnd-kit/core";
|
|
16
|
+
import { SortableContext as Le, arrayMove as Re, horizontalListSortingStrategy as ze, sortableKeyboardCoordinates as Be, useSortable as Ve } from "@dnd-kit/sortable";
|
|
17
|
+
import { CSS as J } from "@dnd-kit/utilities";
|
|
18
18
|
//#region src/lib/cn.ts
|
|
19
|
-
var He =
|
|
19
|
+
var He = H({ extend: { theme: { text: [
|
|
20
20
|
"h-xl",
|
|
21
21
|
"h-lg",
|
|
22
22
|
"h-md",
|
|
@@ -36,47 +36,47 @@ var He = he({ extend: { theme: { text: [
|
|
|
36
36
|
"label-xxs"
|
|
37
37
|
] } } });
|
|
38
38
|
function Y(...e) {
|
|
39
|
-
return He(
|
|
39
|
+
return He(he(e));
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/components/Divider/Divider.tsx
|
|
43
|
-
var
|
|
43
|
+
var X = {
|
|
44
44
|
horizontal: "h-0 w-full border-t",
|
|
45
45
|
vertical: "w-0 h-full self-stretch border-l"
|
|
46
|
-
},
|
|
46
|
+
}, Z = {
|
|
47
47
|
solid: "border-solid",
|
|
48
48
|
dashed: "border-dashed"
|
|
49
|
-
},
|
|
49
|
+
}, Ue = {
|
|
50
50
|
default: "border-border-default",
|
|
51
51
|
subtle: "border-border-subtle",
|
|
52
52
|
strong: "border-border-strong",
|
|
53
53
|
brand: "border-border-brand"
|
|
54
|
-
},
|
|
54
|
+
}, We = a(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
|
|
55
55
|
return /* @__PURE__ */ W("div", {
|
|
56
56
|
ref: o,
|
|
57
57
|
role: "separator",
|
|
58
58
|
"aria-orientation": e,
|
|
59
59
|
"data-test-id": i,
|
|
60
|
-
className: Y("shrink-0",
|
|
60
|
+
className: Y("shrink-0", X[e], Z[t], Ue[n], r),
|
|
61
61
|
...a
|
|
62
62
|
});
|
|
63
|
-
}),
|
|
64
|
-
function
|
|
65
|
-
let e = c(
|
|
63
|
+
}), Q = (e, t) => e !== void 0 && t !== void 0 && String(e) === String(t), Ge = (e, t) => e.some((e) => Q(e, t)), Ke = r(null);
|
|
64
|
+
function qe() {
|
|
65
|
+
let e = c(Ke);
|
|
66
66
|
if (!e) throw Error("AccordionItem must be used inside <Accordion>");
|
|
67
67
|
return e;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Je(e) {
|
|
70
70
|
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
let [d, f] = m(() =>
|
|
74
|
-
return /* @__PURE__ */ W(
|
|
72
|
+
var Ye = a(function({ type: e = "single", defaultValue: t, value: n, onValueChange: r, animated: i = !0, showDivider: a = !1, className: o, children: s, dataTestId: c, ...l }, u) {
|
|
73
|
+
let [d, f] = m(() => Je(t)), p = n !== void 0, h = p ? Je(n) : d;
|
|
74
|
+
return /* @__PURE__ */ W(Ke.Provider, {
|
|
75
75
|
value: {
|
|
76
76
|
openValues: h,
|
|
77
77
|
toggle: (t) => {
|
|
78
|
-
let n =
|
|
79
|
-
i = e === "single" ? n ? [] : [t] : n ? h.filter((e) => !
|
|
78
|
+
let n = Ge(h, t), i;
|
|
79
|
+
i = e === "single" ? n ? [] : [t] : n ? h.filter((e) => !Q(e, t)) : [...h, t], p || f(i), r?.(e === "single" ? i[0] : i);
|
|
80
80
|
},
|
|
81
81
|
animated: i,
|
|
82
82
|
showDivider: a
|
|
@@ -89,8 +89,8 @@ var Ze = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
89
89
|
children: s
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
|
-
}),
|
|
93
|
-
let { openValues: l, toggle: d, animated: f, showDivider: p } =
|
|
92
|
+
}), Xe = a(function({ value: e, title: t, icon: n, disabled: r, className: i, children: a, dataTestId: o, ...s }, c) {
|
|
93
|
+
let { openValues: l, toggle: d, animated: f, showDivider: p } = qe(), m = Ge(l, e), h = u(), g = u(), _ = /* @__PURE__ */ G(U, { children: [p && /* @__PURE__ */ W(We, { className: "mb-4" }), a] });
|
|
94
94
|
return /* @__PURE__ */ G("div", {
|
|
95
95
|
ref: c,
|
|
96
96
|
"data-test-id": o,
|
|
@@ -137,15 +137,15 @@ var Ze = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
137
137
|
children: _
|
|
138
138
|
})]
|
|
139
139
|
});
|
|
140
|
-
}),
|
|
140
|
+
}), Ze = {
|
|
141
141
|
lg: "h-12 px-5 text-p-md gap-2 rounded-lg",
|
|
142
142
|
md: "h-10 px-4 text-p-std gap-2 rounded-lg",
|
|
143
143
|
sm: "h-8 px-3 text-p-sm gap-1.5 rounded-md"
|
|
144
|
-
},
|
|
144
|
+
}, Qe = {
|
|
145
145
|
lg: "h-12 w-12 rounded-lg",
|
|
146
146
|
md: "h-10 w-10 rounded-lg",
|
|
147
147
|
sm: "h-8 w-8 rounded-md"
|
|
148
|
-
},
|
|
148
|
+
}, $e = {
|
|
149
149
|
primary: [
|
|
150
150
|
"bg-brand-500 text-white border border-transparent",
|
|
151
151
|
"hover:bg-brand-600 active:bg-brand-700",
|
|
@@ -170,12 +170,12 @@ var Ze = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
170
170
|
"disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
171
171
|
"focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2"
|
|
172
172
|
].join(" ")
|
|
173
|
-
},
|
|
173
|
+
}, et = {
|
|
174
174
|
primary: "bg-brand-700",
|
|
175
175
|
secondary: "bg-bg-subtle",
|
|
176
176
|
tertiary: "bg-bg-subtle",
|
|
177
177
|
danger: "bg-red-900"
|
|
178
|
-
},
|
|
178
|
+
}, tt = a(function({ variant: e = "primary", size: t = "md", leftIcon: n, rightIcon: r, loading: i = !1, iconOnly: a = !1, fullWidth: o = !1, pressed: s = !1, disabled: c, className: l, children: u, onClick: d, dataTestId: f, ...p }, m) {
|
|
179
179
|
return /* @__PURE__ */ W("button", {
|
|
180
180
|
ref: m,
|
|
181
181
|
disabled: c || i,
|
|
@@ -188,9 +188,9 @@ var Ze = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
188
188
|
}
|
|
189
189
|
d?.(e);
|
|
190
190
|
},
|
|
191
|
-
className: Y("inline-flex items-center justify-center font-medium transition-colors outline-none cursor-pointer", a ?
|
|
191
|
+
className: Y("inline-flex items-center justify-center font-medium transition-colors outline-none cursor-pointer", a ? Qe[t] : Ze[t], $e[e], s && et[e], o && "w-full", l),
|
|
192
192
|
...p,
|
|
193
|
-
children: i ? /* @__PURE__ */ W(
|
|
193
|
+
children: i ? /* @__PURE__ */ W(ne, {
|
|
194
194
|
className: "h-4 w-4 animate-spin",
|
|
195
195
|
"aria-hidden": !0
|
|
196
196
|
}) : /* @__PURE__ */ G(U, { children: [
|
|
@@ -265,9 +265,9 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
265
265
|
r.push(i), u.push(i), --f;
|
|
266
266
|
}
|
|
267
267
|
r.length && i?.(r), a.length && d?.(a);
|
|
268
|
-
},
|
|
268
|
+
}, ne = (e) => {
|
|
269
269
|
e.preventDefault(), j.current = 0, A(!1), !a && N(Array.from(e.dataTransfer.files ?? []));
|
|
270
|
-
},
|
|
270
|
+
}, P = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, F = /* @__PURE__ */ W("input", {
|
|
271
271
|
ref: O,
|
|
272
272
|
type: "file",
|
|
273
273
|
accept: e,
|
|
@@ -277,7 +277,7 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
277
277
|
N(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
278
278
|
},
|
|
279
279
|
className: "sr-only"
|
|
280
|
-
}),
|
|
280
|
+
}), I = (y || C) && /* @__PURE__ */ G("div", {
|
|
281
281
|
className: "flex items-center gap-1.5",
|
|
282
282
|
children: [y && /* @__PURE__ */ G("span", {
|
|
283
283
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
@@ -290,11 +290,11 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
290
290
|
className: "inline-flex items-center gap-1",
|
|
291
291
|
children: C
|
|
292
292
|
})]
|
|
293
|
-
}),
|
|
293
|
+
}), L = S ? /* @__PURE__ */ W("p", {
|
|
294
294
|
id: `${ee}-error`,
|
|
295
295
|
className: "text-p-sm text-red-700",
|
|
296
296
|
children: S
|
|
297
|
-
}) : null,
|
|
297
|
+
}) : null, R = f && l.length > 0 && /* @__PURE__ */ W("div", {
|
|
298
298
|
className: "flex flex-col gap-2",
|
|
299
299
|
children: l.map((e, t) => /* @__PURE__ */ W(ct, {
|
|
300
300
|
name: e.name,
|
|
@@ -309,9 +309,9 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
309
309
|
className: Y("flex flex-col gap-1.5", w),
|
|
310
310
|
...E,
|
|
311
311
|
children: [
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
I,
|
|
313
|
+
R,
|
|
314
|
+
L
|
|
315
315
|
]
|
|
316
316
|
});
|
|
317
317
|
if (g !== "dropzone") {
|
|
@@ -322,20 +322,20 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
322
322
|
className: Y("flex flex-col gap-1.5", w),
|
|
323
323
|
...E,
|
|
324
324
|
children: [
|
|
325
|
-
|
|
326
|
-
/* @__PURE__ */ W(
|
|
325
|
+
I,
|
|
326
|
+
/* @__PURE__ */ W(tt, {
|
|
327
327
|
type: "button",
|
|
328
328
|
variant: "secondary",
|
|
329
329
|
iconOnly: e,
|
|
330
330
|
disabled: a,
|
|
331
331
|
onClick: () => O.current?.click(),
|
|
332
|
-
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ W(
|
|
332
|
+
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ W(re, { className: "h-4 w-4" }),
|
|
333
333
|
"aria-label": e ? "Upload file" : void 0,
|
|
334
|
-
children: e ? v ?? /* @__PURE__ */ W(
|
|
334
|
+
children: e ? v ?? /* @__PURE__ */ W(ie, { className: "h-4 w-4" }) : _ ?? "Choose a file"
|
|
335
335
|
}),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
F,
|
|
337
|
+
R,
|
|
338
|
+
L
|
|
339
339
|
]
|
|
340
340
|
});
|
|
341
341
|
}
|
|
@@ -348,7 +348,7 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
348
348
|
onDragLeave: () => {
|
|
349
349
|
j.current = Math.max(0, j.current - 1), j.current === 0 && A(!1);
|
|
350
350
|
},
|
|
351
|
-
onDrop:
|
|
351
|
+
onDrop: ne,
|
|
352
352
|
onClick: () => !a && O.current?.click(),
|
|
353
353
|
role: "button",
|
|
354
354
|
tabIndex: 0,
|
|
@@ -376,19 +376,19 @@ var ot = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
376
376
|
}), " or drag & drop it here."]
|
|
377
377
|
}), /* @__PURE__ */ W("p", {
|
|
378
378
|
className: "text-p-sm text-fg-tertiary",
|
|
379
|
-
children:
|
|
379
|
+
children: P
|
|
380
380
|
})]
|
|
381
381
|
}),
|
|
382
|
-
|
|
382
|
+
F
|
|
383
383
|
]
|
|
384
384
|
});
|
|
385
|
-
return !
|
|
385
|
+
return !I && !L && !R ? ae : /* @__PURE__ */ G("div", {
|
|
386
386
|
className: "flex flex-col gap-1.5",
|
|
387
387
|
children: [
|
|
388
|
-
|
|
388
|
+
I,
|
|
389
389
|
ae,
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
R,
|
|
391
|
+
L
|
|
392
392
|
]
|
|
393
393
|
});
|
|
394
394
|
}), st = {
|
|
@@ -573,7 +573,7 @@ var gt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
573
573
|
},
|
|
574
574
|
"aria-label": "Change avatar image",
|
|
575
575
|
className: Y("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", pt[r]),
|
|
576
|
-
children: /* @__PURE__ */ W(
|
|
576
|
+
children: /* @__PURE__ */ W(ie, { className: "h-1/2 w-1/2" })
|
|
577
577
|
}), /* @__PURE__ */ W("input", {
|
|
578
578
|
ref: C,
|
|
579
579
|
type: "file",
|
|
@@ -842,7 +842,7 @@ var gt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
842
842
|
...m
|
|
843
843
|
}), /* @__PURE__ */ W("span", {
|
|
844
844
|
className: Y("flex items-center justify-center border transition-colors", Lt[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"),
|
|
845
|
-
children: W(a ?
|
|
845
|
+
children: W(a ? F : b, {
|
|
846
846
|
className: Y(Rt[e], "text-white"),
|
|
847
847
|
strokeWidth: 3,
|
|
848
848
|
"aria-hidden": !0
|
|
@@ -999,8 +999,8 @@ function Gt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
999
999
|
},
|
|
1000
1000
|
"aria-haspopup": "dialog",
|
|
1001
1001
|
"aria-expanded": w
|
|
1002
|
-
}),
|
|
1003
|
-
return /* @__PURE__ */ G(U, { children: [N, w &&
|
|
1002
|
+
}), ne = v ?? (typeof document < "u" ? document.body : null);
|
|
1003
|
+
return /* @__PURE__ */ G(U, { children: [N, w && ne && K(/* @__PURE__ */ G("div", {
|
|
1004
1004
|
ref: Bt(D),
|
|
1005
1005
|
id: O,
|
|
1006
1006
|
role: "dialog",
|
|
@@ -1015,7 +1015,7 @@ function Gt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1015
1015
|
style: j,
|
|
1016
1016
|
className: Y("absolute size-2 rotate-45 bg-bg-default", Wt[M])
|
|
1017
1017
|
})]
|
|
1018
|
-
}),
|
|
1018
|
+
}), ne)] });
|
|
1019
1019
|
}
|
|
1020
1020
|
//#endregion
|
|
1021
1021
|
//#region src/components/Copy/Copy.tsx
|
|
@@ -1028,7 +1028,7 @@ var Kt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1028
1028
|
content: t,
|
|
1029
1029
|
side: "top",
|
|
1030
1030
|
align: "center",
|
|
1031
|
-
children: /* @__PURE__ */ W(
|
|
1031
|
+
children: /* @__PURE__ */ W(tt, {
|
|
1032
1032
|
ref: d,
|
|
1033
1033
|
type: "button",
|
|
1034
1034
|
variant: "tertiary",
|
|
@@ -1178,7 +1178,7 @@ var Kt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1178
1178
|
onClick: () => T(S - a),
|
|
1179
1179
|
"aria-label": "Decrease",
|
|
1180
1180
|
className: Qt,
|
|
1181
|
-
children: /* @__PURE__ */ W(
|
|
1181
|
+
children: /* @__PURE__ */ W(F, { className: "size-4" })
|
|
1182
1182
|
}),
|
|
1183
1183
|
rightAddon: /* @__PURE__ */ W("button", {
|
|
1184
1184
|
type: "button",
|
|
@@ -1266,20 +1266,20 @@ function pn(e, t) {
|
|
|
1266
1266
|
return i;
|
|
1267
1267
|
}
|
|
1268
1268
|
var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, error: D = !1, errorText: O, id: k, className: A, wrapperClassName: j, dataTestId: M }, ee) {
|
|
1269
|
-
let te = u(), N = k ?? te, [
|
|
1269
|
+
let te = u(), N = k ?? te, [ne, P] = m(!1), [F, I] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [L, R] = m(null), re = p(null), ie = D || !!O, ae = O ? `${N}-error` : g ? `${N}-help` : void 0;
|
|
1270
1270
|
l(() => {
|
|
1271
|
-
b &&
|
|
1271
|
+
b && P(!1);
|
|
1272
1272
|
}, [b]), l(() => {
|
|
1273
|
-
if (!
|
|
1273
|
+
if (!ne) return;
|
|
1274
1274
|
let e = (e) => {
|
|
1275
|
-
|
|
1275
|
+
re.current && !re.current.contains(e.target) && P(!1);
|
|
1276
1276
|
};
|
|
1277
1277
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1278
|
-
}, [
|
|
1278
|
+
}, [ne]);
|
|
1279
1279
|
let oe = r ? i?.start ? `${fn(i.start, c)}${i.end ? ` – ${fn(i.end, c)}` : ""}` : "" : e ? fn(e, c) : "";
|
|
1280
1280
|
function se(e) {
|
|
1281
1281
|
if (!r) {
|
|
1282
|
-
t?.(e),
|
|
1282
|
+
t?.(e), P(!1);
|
|
1283
1283
|
return;
|
|
1284
1284
|
}
|
|
1285
1285
|
let n = i ?? {
|
|
@@ -1303,13 +1303,13 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1303
1303
|
a?.({
|
|
1304
1304
|
start: n.start,
|
|
1305
1305
|
end: e
|
|
1306
|
-
}),
|
|
1306
|
+
}), P(!1);
|
|
1307
1307
|
}
|
|
1308
1308
|
function ce(e) {
|
|
1309
1309
|
e.stopPropagation(), r ? (a?.({
|
|
1310
1310
|
start: null,
|
|
1311
1311
|
end: null
|
|
1312
|
-
}),
|
|
1312
|
+
}), R(null)) : t?.(null);
|
|
1313
1313
|
}
|
|
1314
1314
|
let { firstDayOfWeek: z, monthNames: le, weekdayNames: ue } = f(() => {
|
|
1315
1315
|
let e = nn(s), t = rn(e);
|
|
@@ -1318,12 +1318,12 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1318
1318
|
monthNames: an(e),
|
|
1319
1319
|
weekdayNames: sn(e, t)
|
|
1320
1320
|
};
|
|
1321
|
-
}, [s]), de = pn(
|
|
1321
|
+
}, [s]), de = pn(F, z), B = i ?? {
|
|
1322
1322
|
start: null,
|
|
1323
1323
|
end: null
|
|
1324
|
-
}, fe = B.end ??
|
|
1324
|
+
}, fe = B.end ?? L;
|
|
1325
1325
|
return /* @__PURE__ */ G("div", {
|
|
1326
|
-
ref:
|
|
1326
|
+
ref: re,
|
|
1327
1327
|
"data-test-id": M,
|
|
1328
1328
|
className: Y("flex flex-col gap-1.5", v && "w-full", j),
|
|
1329
1329
|
children: [
|
|
@@ -1343,11 +1343,11 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1343
1343
|
id: N,
|
|
1344
1344
|
type: "button",
|
|
1345
1345
|
disabled: b,
|
|
1346
|
-
"aria-invalid":
|
|
1346
|
+
"aria-invalid": ie || void 0,
|
|
1347
1347
|
"aria-required": h || void 0,
|
|
1348
1348
|
"aria-describedby": ae,
|
|
1349
|
-
onClick: () =>
|
|
1350
|
-
className: Y("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2",
|
|
1349
|
+
onClick: () => P((e) => !e),
|
|
1350
|
+
className: Y("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", ie ? "border-red-600" : "border-border-default", !b && !ie && "hover:border-border-strong", ie ? "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]", en[o], A),
|
|
1351
1351
|
children: [/* @__PURE__ */ W("span", {
|
|
1352
1352
|
className: Y("flex-1 text-left truncate", b ? "text-fg-disabled" : oe ? "text-fg-default" : "text-fg-tertiary"),
|
|
1353
1353
|
children: oe || _
|
|
@@ -1362,7 +1362,7 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1362
1362
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
|
|
1363
1363
|
children: /* @__PURE__ */ W(V, { className: "w-4 h-4 text-fg-secondary" })
|
|
1364
1364
|
}) : /* @__PURE__ */ W(y, { className: Y("w-4 h-4", b ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
1365
|
-
}),
|
|
1365
|
+
}), ne && /* @__PURE__ */ G("div", {
|
|
1366
1366
|
className: "absolute z-50 mt-1 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
|
|
1367
1367
|
children: [/* @__PURE__ */ G("div", {
|
|
1368
1368
|
className: "flex items-center justify-between mb-2",
|
|
@@ -1370,22 +1370,22 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1370
1370
|
/* @__PURE__ */ W("button", {
|
|
1371
1371
|
type: "button",
|
|
1372
1372
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1373
|
-
onClick: () =>
|
|
1373
|
+
onClick: () => I(new Date(F.getFullYear(), F.getMonth() - 1, 1)),
|
|
1374
1374
|
"aria-label": "Previous month",
|
|
1375
1375
|
children: /* @__PURE__ */ W(C, { className: "w-4 h-4" })
|
|
1376
1376
|
}),
|
|
1377
1377
|
/* @__PURE__ */ G("div", {
|
|
1378
1378
|
className: "text-p-md font-semibold text-fg-default",
|
|
1379
1379
|
children: [
|
|
1380
|
-
le[
|
|
1380
|
+
le[F.getMonth()],
|
|
1381
1381
|
" ",
|
|
1382
|
-
|
|
1382
|
+
F.getFullYear()
|
|
1383
1383
|
]
|
|
1384
1384
|
}),
|
|
1385
1385
|
/* @__PURE__ */ W("button", {
|
|
1386
1386
|
type: "button",
|
|
1387
1387
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1388
|
-
onClick: () =>
|
|
1388
|
+
onClick: () => I(new Date(F.getFullYear(), F.getMonth() + 1, 1)),
|
|
1389
1389
|
"aria-label": "Next month",
|
|
1390
1390
|
children: /* @__PURE__ */ W(w, { className: "w-4 h-4" })
|
|
1391
1391
|
})
|
|
@@ -1402,7 +1402,7 @@ var mn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1402
1402
|
type: "button",
|
|
1403
1403
|
disabled: i,
|
|
1404
1404
|
"aria-disabled": i || void 0,
|
|
1405
|
-
onMouseEnter: () => !i && r && B.start && !B.end &&
|
|
1405
|
+
onMouseEnter: () => !i && r && B.start && !B.end && R(t),
|
|
1406
1406
|
onClick: () => !i && se(t),
|
|
1407
1407
|
className: Y("h-8 rounded-md text-p-sm font-medium", i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
|
|
1408
1408
|
children: t.getDate()
|
|
@@ -2038,9 +2038,9 @@ var Qn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2038
2038
|
})]
|
|
2039
2039
|
});
|
|
2040
2040
|
}), $n = r(null), er = a(function({ children: e, className: t, validationSchema: n, defaultValues: r, buttons: i, mode: a = "onBlur", shouldUnregister: o, shouldFocusError: s = !0, formId: c, onSubmit: u, revalidateKey: d, dataTestId: f, ...p }, m) {
|
|
2041
|
-
let { handleSubmit: h, register: g, setValue: _, control: v, formState: y, getValues: b, watch: x, reset: S, clearErrors: C, setError: w, trigger: T, getFieldState: E, unregister: D } =
|
|
2041
|
+
let { handleSubmit: h, register: g, setValue: _, control: v, formState: y, getValues: b, watch: x, reset: S, clearErrors: C, setError: w, trigger: T, getFieldState: E, unregister: D } = _e({
|
|
2042
2042
|
mode: a,
|
|
2043
|
-
resolver:
|
|
2043
|
+
resolver: ve(n),
|
|
2044
2044
|
defaultValues: r,
|
|
2045
2045
|
shouldFocusError: s,
|
|
2046
2046
|
shouldUnregister: o
|
|
@@ -2083,7 +2083,7 @@ var Qn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2083
2083
|
children: [e, i && i.length > 0 && /* @__PURE__ */ W("div", {
|
|
2084
2084
|
className: "flex items-center gap-3",
|
|
2085
2085
|
"data-test-id": f ? `${f}-buttons` : void 0,
|
|
2086
|
-
children: i.map((e, t) => /* @__PURE__ */ W(
|
|
2086
|
+
children: i.map((e, t) => /* @__PURE__ */ W(tt, { ...e }, t))
|
|
2087
2087
|
})]
|
|
2088
2088
|
})
|
|
2089
2089
|
});
|
|
@@ -2095,7 +2095,7 @@ var Qn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2095
2095
|
className: Y(r),
|
|
2096
2096
|
"data-test-id": i,
|
|
2097
2097
|
...a,
|
|
2098
|
-
children: /* @__PURE__ */ W(
|
|
2098
|
+
children: /* @__PURE__ */ W(q, {
|
|
2099
2099
|
control: s.control,
|
|
2100
2100
|
name: e,
|
|
2101
2101
|
defaultValue: t,
|
|
@@ -2156,7 +2156,7 @@ var Qn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2156
2156
|
danger: {
|
|
2157
2157
|
container: "bg-red-50 border-red-200",
|
|
2158
2158
|
iconColor: "text-red-700",
|
|
2159
|
-
DefaultIcon:
|
|
2159
|
+
DefaultIcon: me
|
|
2160
2160
|
},
|
|
2161
2161
|
info: {
|
|
2162
2162
|
container: "bg-blue-50 border-blue-200",
|
|
@@ -2375,7 +2375,7 @@ var mr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2375
2375
|
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ W("span", {
|
|
2376
2376
|
"aria-hidden": !0,
|
|
2377
2377
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2378
|
-
children: /* @__PURE__ */ W(
|
|
2378
|
+
children: /* @__PURE__ */ W(L, { className: "h-4 w-4" })
|
|
2379
2379
|
}, `${t}-${r}`);
|
|
2380
2380
|
let i = t === e;
|
|
2381
2381
|
return /* @__PURE__ */ W("button", {
|
|
@@ -2584,7 +2584,7 @@ var mr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2584
2584
|
md: "h-2 w-2",
|
|
2585
2585
|
sm: "h-1.5 w-1.5"
|
|
2586
2586
|
}, kr = a(function({ value: e, size: t, label: n, description: r, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: l, onChange: d, className: f, dataTestId: p, ...m }, h) {
|
|
2587
|
-
let g = c(Tr), _ = u(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = i || !!g?.error, S = g !== null, C = S && g.value !== void 0 ?
|
|
2587
|
+
let g = c(Tr), _ = u(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = i || !!g?.error, S = g !== null, C = S && g.value !== void 0 ? Q(g.value, e) : void 0, w = S && g.defaultValue !== void 0 ? Q(g.defaultValue, e) : void 0, T = S ? C : s, E = S ? w : l;
|
|
2588
2588
|
return /* @__PURE__ */ G("label", {
|
|
2589
2589
|
htmlFor: v,
|
|
2590
2590
|
"data-test-id": p,
|
|
@@ -2700,24 +2700,27 @@ var Mr = {
|
|
|
2700
2700
|
noResults: "No results",
|
|
2701
2701
|
loadingMessage: "Loading…",
|
|
2702
2702
|
selectAllLabel: (e) => `Select all (${e})`,
|
|
2703
|
-
|
|
2704
|
-
createLabel: (e) => `Create "${e}"
|
|
2703
|
+
clearAllLabel: (e) => `Clear all (${e})`,
|
|
2704
|
+
createLabel: (e) => `Create "${e}"`,
|
|
2705
|
+
saveSelectionLabel: "Save"
|
|
2705
2706
|
},
|
|
2706
2707
|
"ru-RU": {
|
|
2707
2708
|
placeholder: "Выберите…",
|
|
2708
2709
|
noResults: "Нет результатов",
|
|
2709
2710
|
loadingMessage: "Загрузка…",
|
|
2710
2711
|
selectAllLabel: (e) => `Выбрать все (${e})`,
|
|
2711
|
-
|
|
2712
|
-
createLabel: (e) => `Создать «${e}
|
|
2712
|
+
clearAllLabel: (e) => `Очистить все (${e})`,
|
|
2713
|
+
createLabel: (e) => `Создать «${e}»`,
|
|
2714
|
+
saveSelectionLabel: "Сохранить"
|
|
2713
2715
|
},
|
|
2714
2716
|
"hy-AM": {
|
|
2715
2717
|
placeholder: "Ընտրեք…",
|
|
2716
2718
|
noResults: "Արդյունքներ չկան",
|
|
2717
2719
|
loadingMessage: "Բեռնվում է…",
|
|
2718
2720
|
selectAllLabel: (e) => `Ընտրել բոլորը (${e})`,
|
|
2719
|
-
|
|
2720
|
-
createLabel: (e) => `Ստեղծել «${e}
|
|
2721
|
+
clearAllLabel: (e) => `Մաքրել բոլորը (${e})`,
|
|
2722
|
+
createLabel: (e) => `Ստեղծել «${e}»`,
|
|
2723
|
+
saveSelectionLabel: "Պահպանել"
|
|
2721
2724
|
}
|
|
2722
2725
|
}, Nr = {
|
|
2723
2726
|
lg: "min-h-12 text-p-md",
|
|
@@ -2727,15 +2730,40 @@ var Mr = {
|
|
|
2727
2730
|
lg: "px-3.5 py-1.5",
|
|
2728
2731
|
md: "px-3 py-1",
|
|
2729
2732
|
sm: "px-2.5 py-0.5"
|
|
2730
|
-
}, Fr = "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full", Ir = "truncate text-p-sm text-fg-default", Lr = "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer", Rr = "flex items-center rounded-md bg-bg-info-lighter px-2 py-0.5 text-p-sm text-blue-800 dark:text-blue-300 shrink-0"
|
|
2731
|
-
function
|
|
2733
|
+
}, Fr = "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full", Ir = "truncate text-p-sm text-fg-default", Lr = "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer", Rr = "flex items-center rounded-md bg-bg-info-lighter px-2 py-0.5 text-p-sm text-blue-800 dark:text-blue-300 shrink-0";
|
|
2734
|
+
function zr(e) {
|
|
2732
2735
|
return e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value));
|
|
2733
2736
|
}
|
|
2734
|
-
function
|
|
2737
|
+
function Br(e, t) {
|
|
2735
2738
|
let n = t.trim().toLowerCase();
|
|
2736
|
-
return !n || `${
|
|
2739
|
+
return !n || `${zr(e)} ${String(e.value)}`.toLowerCase().includes(n);
|
|
2740
|
+
}
|
|
2741
|
+
function Vr(e) {
|
|
2742
|
+
try {
|
|
2743
|
+
let t = window.localStorage.getItem(e);
|
|
2744
|
+
return t === null ? void 0 : JSON.parse(t);
|
|
2745
|
+
} catch {
|
|
2746
|
+
return;
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
function Hr(e) {
|
|
2750
|
+
try {
|
|
2751
|
+
return window.localStorage.getItem(e) !== null;
|
|
2752
|
+
} catch {
|
|
2753
|
+
return !1;
|
|
2754
|
+
}
|
|
2737
2755
|
}
|
|
2738
|
-
function
|
|
2756
|
+
function Ur(e, t) {
|
|
2757
|
+
try {
|
|
2758
|
+
window.localStorage.setItem(e, JSON.stringify(t));
|
|
2759
|
+
} catch {}
|
|
2760
|
+
}
|
|
2761
|
+
function Wr(e) {
|
|
2762
|
+
try {
|
|
2763
|
+
window.localStorage.removeItem(e);
|
|
2764
|
+
} catch {}
|
|
2765
|
+
}
|
|
2766
|
+
function Gr(e, t, n) {
|
|
2739
2767
|
return {
|
|
2740
2768
|
container: () => "w-full",
|
|
2741
2769
|
control: ({ isFocused: n, isDisabled: r }) => Y("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text", Nr[e], t ? "border-red-600" : "border-border-default", !r && !t && "hover:border-border-strong", n && !t && "ring-2 ring-brand-300 border-brand-500", n && t && "ring-2 ring-red-300 border-red-600", r && "bg-bg-container border-border-default"),
|
|
@@ -2760,8 +2788,11 @@ function Hr(e, t, n) {
|
|
|
2760
2788
|
loadingMessage: () => "px-3 py-6 text-center text-p-sm text-fg-secondary"
|
|
2761
2789
|
};
|
|
2762
2790
|
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2791
|
+
//#endregion
|
|
2792
|
+
//#region src/components/SelectV2/SelectV2.tsx
|
|
2793
|
+
var Kr = 36;
|
|
2794
|
+
function qr(e) {
|
|
2795
|
+
return /* @__PURE__ */ W(be.DropdownIndicator, {
|
|
2765
2796
|
...e,
|
|
2766
2797
|
children: /* @__PURE__ */ W(S, {
|
|
2767
2798
|
className: Y("h-4 w-4 transition-transform", e.selectProps.menuIsOpen && "rotate-180"),
|
|
@@ -2769,8 +2800,8 @@ function Ur(e) {
|
|
|
2769
2800
|
})
|
|
2770
2801
|
});
|
|
2771
2802
|
}
|
|
2772
|
-
function
|
|
2773
|
-
return /* @__PURE__ */ W(
|
|
2803
|
+
function Jr(e) {
|
|
2804
|
+
return /* @__PURE__ */ W(be.ClearIndicator, {
|
|
2774
2805
|
...e,
|
|
2775
2806
|
children: /* @__PURE__ */ W(V, {
|
|
2776
2807
|
className: "h-3.5 w-3.5",
|
|
@@ -2778,8 +2809,8 @@ function Wr(e) {
|
|
|
2778
2809
|
})
|
|
2779
2810
|
});
|
|
2780
2811
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return /* @__PURE__ */ W(
|
|
2812
|
+
function Yr(e) {
|
|
2813
|
+
return /* @__PURE__ */ W(be.MultiValueRemove, {
|
|
2783
2814
|
...e,
|
|
2784
2815
|
children: /* @__PURE__ */ W(V, {
|
|
2785
2816
|
className: "h-3 w-3",
|
|
@@ -2787,15 +2818,15 @@ function Gr(e) {
|
|
|
2787
2818
|
})
|
|
2788
2819
|
});
|
|
2789
2820
|
}
|
|
2790
|
-
function
|
|
2821
|
+
function Xr(e) {
|
|
2791
2822
|
let { visibleTagCount: t } = e.selectProps;
|
|
2792
|
-
return t === void 0 || e.index < t ? /* @__PURE__ */ W(
|
|
2823
|
+
return t === void 0 || e.index < t ? /* @__PURE__ */ W(be.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ G("span", {
|
|
2793
2824
|
className: Rr,
|
|
2794
2825
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
2795
2826
|
}) : null;
|
|
2796
2827
|
}
|
|
2797
|
-
function
|
|
2798
|
-
return /* @__PURE__ */ G(
|
|
2828
|
+
function Zr(e) {
|
|
2829
|
+
return /* @__PURE__ */ G(be.Option, {
|
|
2799
2830
|
...e,
|
|
2800
2831
|
children: [e.children, e.isSelected && /* @__PURE__ */ W(b, {
|
|
2801
2832
|
className: "h-4 w-4 text-fg-brand shrink-0",
|
|
@@ -2803,37 +2834,53 @@ function qr(e) {
|
|
|
2803
2834
|
})]
|
|
2804
2835
|
});
|
|
2805
2836
|
}
|
|
2806
|
-
function
|
|
2807
|
-
return /* @__PURE__ */ W(
|
|
2837
|
+
function Qr() {
|
|
2838
|
+
return /* @__PURE__ */ W(ne, {
|
|
2808
2839
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
2809
2840
|
"aria-hidden": !0
|
|
2810
2841
|
});
|
|
2811
2842
|
}
|
|
2812
|
-
function
|
|
2813
|
-
let { selectAllState: t, onSelectAllToggle: n } = e.selectProps;
|
|
2814
|
-
return /* @__PURE__ */ G(
|
|
2843
|
+
function $r(e) {
|
|
2844
|
+
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
2845
|
+
return /* @__PURE__ */ G(be.Menu, {
|
|
2815
2846
|
...e,
|
|
2816
|
-
children: [
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
e
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2847
|
+
children: [
|
|
2848
|
+
t && /* @__PURE__ */ W("div", {
|
|
2849
|
+
className: "border-b border-border-default px-3 py-2",
|
|
2850
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
2851
|
+
onClick: (e) => {
|
|
2852
|
+
e.preventDefault(), n?.();
|
|
2853
|
+
},
|
|
2854
|
+
children: /* @__PURE__ */ W(zt, {
|
|
2855
|
+
size: "sm",
|
|
2856
|
+
checked: t.checked,
|
|
2857
|
+
indeterminate: t.indeterminate,
|
|
2858
|
+
label: t.label,
|
|
2859
|
+
readOnly: !0
|
|
2860
|
+
})
|
|
2861
|
+
}),
|
|
2862
|
+
r && /* @__PURE__ */ W("div", {
|
|
2863
|
+
className: "border-b border-border-default px-3 py-2",
|
|
2864
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
2865
|
+
onClick: (e) => {
|
|
2866
|
+
e.preventDefault(), i?.();
|
|
2867
|
+
},
|
|
2868
|
+
children: /* @__PURE__ */ W(zt, {
|
|
2869
|
+
size: "sm",
|
|
2870
|
+
checked: r.checked,
|
|
2871
|
+
label: r.label,
|
|
2872
|
+
readOnly: !0
|
|
2873
|
+
})
|
|
2874
|
+
}),
|
|
2875
|
+
e.children
|
|
2876
|
+
]
|
|
2830
2877
|
});
|
|
2831
2878
|
}
|
|
2832
|
-
function
|
|
2833
|
-
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c =
|
|
2879
|
+
function ei(t) {
|
|
2880
|
+
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = we({
|
|
2834
2881
|
count: o.length,
|
|
2835
2882
|
getScrollElement: () => s.current,
|
|
2836
|
-
estimateSize: () =>
|
|
2883
|
+
estimateSize: () => Kr,
|
|
2837
2884
|
overscan: 8
|
|
2838
2885
|
});
|
|
2839
2886
|
return /* @__PURE__ */ W("div", {
|
|
@@ -2860,14 +2907,29 @@ function Xr(t) {
|
|
|
2860
2907
|
})
|
|
2861
2908
|
});
|
|
2862
2909
|
}
|
|
2863
|
-
var
|
|
2864
|
-
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti:
|
|
2910
|
+
var ti = a(function(e, t) {
|
|
2911
|
+
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 = !0, virtualized: O = !1, emptyText: k, locale: A = "en-US", storageKey: j, saveSelectionLabel: M, size: ee = "md", disabled: te = !1, id: N, className: ne, wrapperClassName: P, dataTestId: F, ...I } = e, L = e.isMulti ? !!e.singleLine : !1, R = Mr[A], re = v ?? R.placeholder, ie = k ?? R.noResults, ae = c ?? ((e) => R.createLabel(e)), oe = u(), se = N ?? oe, ce = C || !!S, z = h !== void 0, [le, ue] = m(() => {
|
|
2912
|
+
if (!d) {
|
|
2913
|
+
if (j && !z) {
|
|
2914
|
+
let e = Vr(j);
|
|
2915
|
+
if (e !== void 0) return e;
|
|
2916
|
+
}
|
|
2917
|
+
return g;
|
|
2918
|
+
}
|
|
2919
|
+
}), [de, B] = m(() => {
|
|
2920
|
+
if (!d) return [];
|
|
2921
|
+
if (j && !z) {
|
|
2922
|
+
let e = Vr(j);
|
|
2923
|
+
if (Array.isArray(e)) return e;
|
|
2924
|
+
}
|
|
2925
|
+
return g ?? [];
|
|
2926
|
+
}), [fe, pe] = m(() => !!j && Hr(j)), [me, he] = m(() => {
|
|
2865
2927
|
let e = /* @__PURE__ */ new Map();
|
|
2866
2928
|
for (let t of n) e.set(String(t.value), t);
|
|
2867
2929
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
2868
2930
|
return e;
|
|
2869
|
-
}),
|
|
2870
|
-
e.length !== 0 &&
|
|
2931
|
+
}), H = s((e) => {
|
|
2932
|
+
e.length !== 0 && he((t) => {
|
|
2871
2933
|
let n = !1, r = new Map(t);
|
|
2872
2934
|
for (let t of e) {
|
|
2873
2935
|
let e = String(t.value);
|
|
@@ -2877,57 +2939,57 @@ var Zr = a(function(e, t) {
|
|
|
2877
2939
|
});
|
|
2878
2940
|
}, []);
|
|
2879
2941
|
f(() => {
|
|
2880
|
-
|
|
2881
|
-
}, [n,
|
|
2882
|
-
let
|
|
2942
|
+
H(n);
|
|
2943
|
+
}, [n, H]);
|
|
2944
|
+
let U = s((e) => me.get(String(e)) ?? {
|
|
2883
2945
|
value: e,
|
|
2884
2946
|
label: String(e)
|
|
2885
|
-
}, [
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
]),
|
|
2890
|
-
if (r) return (e) => Promise.resolve(r(e)).then((e) => (
|
|
2891
|
-
}, [r,
|
|
2892
|
-
if (
|
|
2947
|
+
}, [me]), K = z ? h : le, q = f(() => (z ? h : de) ?? [], [
|
|
2948
|
+
z,
|
|
2949
|
+
h,
|
|
2950
|
+
de
|
|
2951
|
+
]), ge = !d && K !== void 0 ? U(K) : null, _e = d ? q.map(U) : [], ve = f(() => {
|
|
2952
|
+
if (r) return (e) => Promise.resolve(r(e)).then((e) => (H(e), e));
|
|
2953
|
+
}, [r, H]), be = s((e) => {
|
|
2954
|
+
if (d) {
|
|
2893
2955
|
let t = [...e ?? []];
|
|
2894
|
-
|
|
2956
|
+
H(t);
|
|
2895
2957
|
let n = t.map((e) => e.value);
|
|
2896
|
-
|
|
2958
|
+
B(n), _?.(n);
|
|
2897
2959
|
} else {
|
|
2898
2960
|
let t = e;
|
|
2899
|
-
t &&
|
|
2961
|
+
t && H([t]), ue(t?.value), _?.(t?.value ?? void 0);
|
|
2900
2962
|
}
|
|
2901
2963
|
}, [
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
]),
|
|
2964
|
+
d,
|
|
2965
|
+
H,
|
|
2966
|
+
_
|
|
2967
|
+
]), we = s((e) => {
|
|
2906
2968
|
let t = {
|
|
2907
2969
|
value: e,
|
|
2908
2970
|
label: e
|
|
2909
2971
|
};
|
|
2910
|
-
if (
|
|
2911
|
-
let e = [...
|
|
2912
|
-
|
|
2913
|
-
} else
|
|
2972
|
+
if (H([t]), o?.(e), d) {
|
|
2973
|
+
let e = [...q, t.value];
|
|
2974
|
+
B(e), _?.(e);
|
|
2975
|
+
} else ue(t.value), _?.(t.value);
|
|
2914
2976
|
}, [
|
|
2915
|
-
|
|
2977
|
+
d,
|
|
2978
|
+
q,
|
|
2916
2979
|
H,
|
|
2917
|
-
|
|
2918
|
-
g,
|
|
2980
|
+
_,
|
|
2919
2981
|
o
|
|
2920
|
-
]),
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
]),
|
|
2925
|
-
wrapperRef:
|
|
2926
|
-
measureRef:
|
|
2927
|
-
total:
|
|
2928
|
-
labelsKey:
|
|
2929
|
-
enabled:
|
|
2930
|
-
}),
|
|
2982
|
+
]), Te = !!r, Ee = Te ? a ? Ce : xe : a ? Se : ye, De = f(() => Gr(ee, ce, L), [
|
|
2983
|
+
ee,
|
|
2984
|
+
ce,
|
|
2985
|
+
L
|
|
2986
|
+
]), Oe = p(null), ke = p(null), Ae = p(null), je = !!d && L, Me = jr({
|
|
2987
|
+
wrapperRef: Oe,
|
|
2988
|
+
measureRef: ke,
|
|
2989
|
+
total: _e.length,
|
|
2990
|
+
labelsKey: _e.map(zr).join("\0"),
|
|
2991
|
+
enabled: je
|
|
2992
|
+
}), Ne = f(() => n.some((e) => !!e.description), [n]), Pe = f(() => {
|
|
2931
2993
|
if (!n.some((e) => e.group)) return n;
|
|
2932
2994
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
2933
2995
|
for (let r of n) {
|
|
@@ -2942,59 +3004,80 @@ var Zr = a(function(e, t) {
|
|
|
2942
3004
|
})), n.push(r);
|
|
2943
3005
|
}
|
|
2944
3006
|
return t;
|
|
2945
|
-
}, [n]),
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
3007
|
+
}, [n]), Fe = !!d && !Te, Ie = d ? q : K;
|
|
3008
|
+
l(() => {
|
|
3009
|
+
!j || !fe || Ur(j, Ie);
|
|
3010
|
+
}, [
|
|
3011
|
+
j,
|
|
3012
|
+
fe,
|
|
3013
|
+
Ie
|
|
3014
|
+
]);
|
|
3015
|
+
let Le = s(() => {
|
|
3016
|
+
j && pe((e) => {
|
|
3017
|
+
let t = !e;
|
|
3018
|
+
return t ? Ur(j, Ie) : Wr(j), t;
|
|
3019
|
+
});
|
|
3020
|
+
}, [j, Ie]), Re = f(() => j ? {
|
|
3021
|
+
checked: fe,
|
|
3022
|
+
label: M ?? R.saveSelectionLabel
|
|
3023
|
+
} : null, [
|
|
3024
|
+
j,
|
|
3025
|
+
fe,
|
|
3026
|
+
M,
|
|
3027
|
+
R
|
|
3028
|
+
]), [ze, Be] = m(""), Ve = s((e, t) => {
|
|
3029
|
+
t.action === "input-change" && Be(e);
|
|
3030
|
+
}, []), J = f(() => Fe ? n.filter((e) => !e.disabled && Br(e, ze)) : [], [
|
|
3031
|
+
Fe,
|
|
2949
3032
|
n,
|
|
2950
|
-
|
|
2951
|
-
]),
|
|
2952
|
-
if (!
|
|
2953
|
-
let e = new Set(
|
|
3033
|
+
ze
|
|
3034
|
+
]), He = f(() => {
|
|
3035
|
+
if (!Fe || J.length === 0) return null;
|
|
3036
|
+
let e = new Set(q.map(String)), t = J.filter((t) => e.has(String(t.value))).length, n = t === J.length;
|
|
2954
3037
|
return {
|
|
2955
3038
|
count: J.length,
|
|
2956
3039
|
checked: n,
|
|
2957
3040
|
indeterminate: t > 0 && t < J.length,
|
|
2958
|
-
label: n ?
|
|
3041
|
+
label: n ? R.clearAllLabel(J.length) : R.selectAllLabel(J.length)
|
|
2959
3042
|
};
|
|
2960
3043
|
}, [
|
|
2961
|
-
|
|
3044
|
+
Fe,
|
|
2962
3045
|
J,
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
]),
|
|
2966
|
-
if (!
|
|
3046
|
+
q,
|
|
3047
|
+
R
|
|
3048
|
+
]), X = s(() => {
|
|
3049
|
+
if (!He) return;
|
|
2967
3050
|
let e = new Set(J.map((e) => String(e.value))), t;
|
|
2968
|
-
if (
|
|
3051
|
+
if (He.checked) t = q.filter((t) => !e.has(String(t)));
|
|
2969
3052
|
else {
|
|
2970
|
-
|
|
2971
|
-
let e = new Set(
|
|
2972
|
-
t = [...
|
|
3053
|
+
H(J);
|
|
3054
|
+
let e = new Set(q.map(String));
|
|
3055
|
+
t = [...q, ...J.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
2973
3056
|
}
|
|
2974
|
-
|
|
3057
|
+
B(t), _?.(t), Ae.current?.onMenuClose();
|
|
2975
3058
|
}, [
|
|
2976
|
-
|
|
3059
|
+
He,
|
|
2977
3060
|
J,
|
|
3061
|
+
q,
|
|
2978
3062
|
H,
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
inputId: R,
|
|
3063
|
+
_
|
|
3064
|
+
]), Z = {
|
|
3065
|
+
...I,
|
|
3066
|
+
inputId: se,
|
|
2984
3067
|
unstyled: !0,
|
|
2985
|
-
classNames:
|
|
2986
|
-
className:
|
|
2987
|
-
isMulti:
|
|
2988
|
-
options:
|
|
2989
|
-
loadOptions:
|
|
3068
|
+
classNames: De,
|
|
3069
|
+
className: ne,
|
|
3070
|
+
isMulti: d,
|
|
3071
|
+
options: Pe,
|
|
3072
|
+
loadOptions: ve,
|
|
2990
3073
|
defaultOptions: i,
|
|
2991
|
-
value:
|
|
2992
|
-
onChange:
|
|
2993
|
-
onCreateOption: a ?
|
|
2994
|
-
formatCreateLabel: a ?
|
|
3074
|
+
value: d ? _e : ge,
|
|
3075
|
+
onChange: be,
|
|
3076
|
+
onCreateOption: a ? we : void 0,
|
|
3077
|
+
formatCreateLabel: a ? ae : void 0,
|
|
2995
3078
|
getOptionValue: (e) => String(e.value),
|
|
2996
|
-
getOptionLabel:
|
|
2997
|
-
formatOptionLabel: (e, t) => t.context === "value" ? e.label :
|
|
3079
|
+
getOptionLabel: zr,
|
|
3080
|
+
formatOptionLabel: (e, t) => t.context === "value" ? e.label : Ne && e.description ? /* @__PURE__ */ G("span", {
|
|
2998
3081
|
className: "flex flex-col min-w-0",
|
|
2999
3082
|
children: [/* @__PURE__ */ W("span", {
|
|
3000
3083
|
className: "truncate",
|
|
@@ -3005,65 +3088,69 @@ var Zr = a(function(e, t) {
|
|
|
3005
3088
|
})]
|
|
3006
3089
|
}) : e.label,
|
|
3007
3090
|
isOptionDisabled: (e) => !!e.disabled,
|
|
3008
|
-
placeholder:
|
|
3009
|
-
isDisabled:
|
|
3010
|
-
isClearable:
|
|
3011
|
-
isSearchable:
|
|
3012
|
-
isLoading:
|
|
3013
|
-
noOptionsMessage: () =>
|
|
3014
|
-
loadingMessage: () =>
|
|
3015
|
-
"aria-invalid":
|
|
3016
|
-
"aria-required":
|
|
3017
|
-
...
|
|
3018
|
-
inputValue:
|
|
3019
|
-
onInputChange:
|
|
3020
|
-
selectAllState:
|
|
3021
|
-
onSelectAllToggle:
|
|
3091
|
+
placeholder: re,
|
|
3092
|
+
isDisabled: te || T,
|
|
3093
|
+
isClearable: E,
|
|
3094
|
+
isSearchable: D,
|
|
3095
|
+
isLoading: T || void 0,
|
|
3096
|
+
noOptionsMessage: () => ie,
|
|
3097
|
+
loadingMessage: () => R.loadingMessage,
|
|
3098
|
+
"aria-invalid": ce || void 0,
|
|
3099
|
+
"aria-required": w || void 0,
|
|
3100
|
+
...Fe ? {
|
|
3101
|
+
inputValue: ze,
|
|
3102
|
+
onInputChange: Ve,
|
|
3103
|
+
selectAllState: He,
|
|
3104
|
+
onSelectAllToggle: X
|
|
3105
|
+
} : {},
|
|
3106
|
+
...Re ? {
|
|
3107
|
+
saveSelectionState: Re,
|
|
3108
|
+
onSaveSelectionToggle: Le
|
|
3022
3109
|
} : {},
|
|
3023
|
-
...
|
|
3024
|
-
...
|
|
3025
|
-
closeMenuOnSelect:
|
|
3026
|
-
hideSelectedOptions:
|
|
3110
|
+
...je ? { visibleTagCount: Me } : {},
|
|
3111
|
+
...d ? {
|
|
3112
|
+
closeMenuOnSelect: I.closeMenuOnSelect ?? !1,
|
|
3113
|
+
hideSelectedOptions: I.hideSelectedOptions ?? !1
|
|
3027
3114
|
} : {},
|
|
3028
|
-
menuPlacement:
|
|
3115
|
+
menuPlacement: I.menuPlacement ?? "auto",
|
|
3029
3116
|
components: {
|
|
3030
|
-
DropdownIndicator:
|
|
3031
|
-
ClearIndicator:
|
|
3032
|
-
MultiValueRemove:
|
|
3033
|
-
LoadingIndicator:
|
|
3117
|
+
DropdownIndicator: qr,
|
|
3118
|
+
ClearIndicator: Jr,
|
|
3119
|
+
MultiValueRemove: Yr,
|
|
3120
|
+
LoadingIndicator: Qr,
|
|
3034
3121
|
IndicatorSeparator: () => null,
|
|
3035
|
-
...
|
|
3036
|
-
...
|
|
3037
|
-
...
|
|
3038
|
-
Option:
|
|
3122
|
+
...O ? { MenuList: ei } : {},
|
|
3123
|
+
...Fe || Re ? { Menu: $r } : {},
|
|
3124
|
+
...je ? { MultiValue: Xr } : {},
|
|
3125
|
+
Option: Zr
|
|
3039
3126
|
}
|
|
3040
3127
|
};
|
|
3041
3128
|
return /* @__PURE__ */ G("div", {
|
|
3042
|
-
ref:
|
|
3043
|
-
"data-test-id":
|
|
3044
|
-
className: Y("flex flex-col gap-1.5 w-full",
|
|
3129
|
+
ref: Oe,
|
|
3130
|
+
"data-test-id": F,
|
|
3131
|
+
className: Y("flex flex-col gap-1.5 w-full", P),
|
|
3045
3132
|
children: [
|
|
3046
|
-
(
|
|
3133
|
+
(y || b) && /* @__PURE__ */ G("div", {
|
|
3047
3134
|
className: "flex items-center gap-1.5",
|
|
3048
|
-
children: [
|
|
3049
|
-
htmlFor:
|
|
3135
|
+
children: [y && /* @__PURE__ */ G("label", {
|
|
3136
|
+
htmlFor: se,
|
|
3050
3137
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3051
|
-
children: [
|
|
3138
|
+
children: [y, w && /* @__PURE__ */ W("span", {
|
|
3052
3139
|
className: "text-fg-danger",
|
|
3053
3140
|
"aria-hidden": !0,
|
|
3054
3141
|
children: "*"
|
|
3055
3142
|
})]
|
|
3056
|
-
}),
|
|
3143
|
+
}), b && /* @__PURE__ */ W("span", {
|
|
3057
3144
|
className: "inline-flex items-center gap-1",
|
|
3058
|
-
children:
|
|
3145
|
+
children: b
|
|
3059
3146
|
})]
|
|
3060
3147
|
}),
|
|
3061
|
-
/* @__PURE__ */ W(
|
|
3062
|
-
ref: t,
|
|
3063
|
-
...
|
|
3148
|
+
/* @__PURE__ */ W(Ee, {
|
|
3149
|
+
ref: Bt(t, Ae),
|
|
3150
|
+
...Z
|
|
3064
3151
|
}),
|
|
3065
|
-
|
|
3066
|
-
ref:
|
|
3152
|
+
je && /* @__PURE__ */ G("div", {
|
|
3153
|
+
ref: ke,
|
|
3067
3154
|
"aria-hidden": !0,
|
|
3068
3155
|
className: "flex items-center gap-1 whitespace-nowrap",
|
|
3069
3156
|
style: {
|
|
@@ -3072,14 +3159,14 @@ var Zr = a(function(e, t) {
|
|
|
3072
3159
|
left: -9999,
|
|
3073
3160
|
visibility: "hidden"
|
|
3074
3161
|
},
|
|
3075
|
-
children: [
|
|
3162
|
+
children: [_e.map((e) => /* @__PURE__ */ G("span", {
|
|
3076
3163
|
"data-measure-chip": !0,
|
|
3077
|
-
className:
|
|
3164
|
+
className: "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full",
|
|
3078
3165
|
children: [/* @__PURE__ */ W("span", {
|
|
3079
|
-
className:
|
|
3080
|
-
children:
|
|
3166
|
+
className: "truncate text-p-sm text-fg-default",
|
|
3167
|
+
children: zr(e)
|
|
3081
3168
|
}), /* @__PURE__ */ W("span", {
|
|
3082
|
-
className:
|
|
3169
|
+
className: "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer",
|
|
3083
3170
|
children: /* @__PURE__ */ W(V, {
|
|
3084
3171
|
className: "h-3 w-3",
|
|
3085
3172
|
"aria-hidden": !0
|
|
@@ -3087,33 +3174,33 @@ var Zr = a(function(e, t) {
|
|
|
3087
3174
|
})]
|
|
3088
3175
|
}, String(e.value))), /* @__PURE__ */ W("span", {
|
|
3089
3176
|
"data-measure-badge": !0,
|
|
3090
|
-
className:
|
|
3177
|
+
className: "flex items-center rounded-md bg-bg-info-lighter px-2 py-0.5 text-p-sm text-blue-800 dark:text-blue-300 shrink-0"
|
|
3091
3178
|
})]
|
|
3092
3179
|
}),
|
|
3093
|
-
|
|
3094
|
-
id: `${
|
|
3180
|
+
S ? /* @__PURE__ */ W("p", {
|
|
3181
|
+
id: `${se}-error`,
|
|
3095
3182
|
className: "text-p-sm text-fg-danger",
|
|
3096
|
-
children:
|
|
3097
|
-
}) :
|
|
3098
|
-
id: `${
|
|
3183
|
+
children: S
|
|
3184
|
+
}) : x ? /* @__PURE__ */ W("p", {
|
|
3185
|
+
id: `${se}-help`,
|
|
3099
3186
|
className: "text-p-sm text-fg-secondary",
|
|
3100
|
-
children:
|
|
3187
|
+
children: x
|
|
3101
3188
|
}) : null
|
|
3102
3189
|
]
|
|
3103
3190
|
});
|
|
3104
|
-
}),
|
|
3105
|
-
function
|
|
3106
|
-
return c(
|
|
3191
|
+
}), ni = r(null);
|
|
3192
|
+
function ri() {
|
|
3193
|
+
return c(ni) ?? {
|
|
3107
3194
|
collapsed: !1,
|
|
3108
3195
|
toggle: () => {}
|
|
3109
3196
|
};
|
|
3110
3197
|
}
|
|
3111
|
-
var
|
|
3198
|
+
var ii = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
|
|
3112
3199
|
let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
|
|
3113
3200
|
let e = !h;
|
|
3114
3201
|
p || f(e), n?.(e);
|
|
3115
3202
|
};
|
|
3116
|
-
return /* @__PURE__ */ W(
|
|
3203
|
+
return /* @__PURE__ */ W(ni.Provider, {
|
|
3117
3204
|
value: {
|
|
3118
3205
|
collapsed: h,
|
|
3119
3206
|
toggle: g
|
|
@@ -3145,7 +3232,7 @@ var ei = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3145
3232
|
onClick: g,
|
|
3146
3233
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
3147
3234
|
className: Y("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"),
|
|
3148
|
-
children: /* @__PURE__ */ W(
|
|
3235
|
+
children: /* @__PURE__ */ W(P, { className: "h-4 w-4" })
|
|
3149
3236
|
})
|
|
3150
3237
|
]
|
|
3151
3238
|
}), /* @__PURE__ */ W("nav", {
|
|
@@ -3154,8 +3241,8 @@ var ei = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3154
3241
|
})]
|
|
3155
3242
|
})
|
|
3156
3243
|
});
|
|
3157
|
-
}),
|
|
3158
|
-
let { collapsed: d } =
|
|
3244
|
+
}), ai = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
3245
|
+
let { collapsed: d } = ri(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ G(U, { children: [e && /* @__PURE__ */ W("span", {
|
|
3159
3246
|
className: "inline-flex shrink-0",
|
|
3160
3247
|
children: e
|
|
3161
3248
|
}), !d && /* @__PURE__ */ G(U, { children: [
|
|
@@ -3194,12 +3281,12 @@ var ei = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3194
3281
|
className: "flex flex-col gap-0.5 pl-8",
|
|
3195
3282
|
children: i
|
|
3196
3283
|
})] });
|
|
3197
|
-
}),
|
|
3284
|
+
}), oi = {
|
|
3198
3285
|
text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
|
|
3199
3286
|
circular: "size-10 rounded-full",
|
|
3200
3287
|
rectangular: "h-4 w-full",
|
|
3201
3288
|
rounded: "h-4 w-full rounded-md"
|
|
3202
|
-
},
|
|
3289
|
+
}, si = {
|
|
3203
3290
|
pulse: "animate-pulse",
|
|
3204
3291
|
wave: [
|
|
3205
3292
|
"relative overflow-hidden",
|
|
@@ -3209,15 +3296,15 @@ var ei = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3209
3296
|
].join(" "),
|
|
3210
3297
|
none: ""
|
|
3211
3298
|
};
|
|
3212
|
-
function
|
|
3299
|
+
function ci(e) {
|
|
3213
3300
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3214
3301
|
}
|
|
3215
|
-
var
|
|
3302
|
+
var li = a(function({ variant: e = "text", animation: t = "pulse", width: n, height: r, count: i = 1, children: a, style: o, className: s, dataTestId: c, ...l }, u) {
|
|
3216
3303
|
let d = a != null, f = Math.max(1, i), p = {
|
|
3217
|
-
...n === void 0 ? null : { width:
|
|
3218
|
-
...r === void 0 ? null : { height:
|
|
3304
|
+
...n === void 0 ? null : { width: ci(n) },
|
|
3305
|
+
...r === void 0 ? null : { height: ci(r) },
|
|
3219
3306
|
...o
|
|
3220
|
-
}, m = Y("block bg-bg-subtle leading-none",
|
|
3307
|
+
}, m = Y("block bg-bg-subtle leading-none", oi[e], si[t]);
|
|
3221
3308
|
return d ? /* @__PURE__ */ W("span", {
|
|
3222
3309
|
ref: u,
|
|
3223
3310
|
"data-test-id": c,
|
|
@@ -3250,7 +3337,7 @@ var ai = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3250
3337
|
"aria-label": t === 0 ? "Loading" : void 0
|
|
3251
3338
|
}, t))
|
|
3252
3339
|
});
|
|
3253
|
-
}),
|
|
3340
|
+
}), ui = {
|
|
3254
3341
|
success: {
|
|
3255
3342
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3256
3343
|
icon: x
|
|
@@ -3261,7 +3348,7 @@ var ai = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3261
3348
|
},
|
|
3262
3349
|
danger: {
|
|
3263
3350
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3264
|
-
icon:
|
|
3351
|
+
icon: me
|
|
3265
3352
|
},
|
|
3266
3353
|
info: {
|
|
3267
3354
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
@@ -3271,19 +3358,19 @@ var ai = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3271
3358
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3272
3359
|
icon: N
|
|
3273
3360
|
}
|
|
3274
|
-
},
|
|
3361
|
+
}, di = {
|
|
3275
3362
|
success: "text-green-400",
|
|
3276
3363
|
warning: "text-yellow-300",
|
|
3277
3364
|
danger: "text-red-400",
|
|
3278
3365
|
info: "text-blue-400",
|
|
3279
3366
|
neutral: "text-white/70"
|
|
3280
|
-
},
|
|
3281
|
-
function
|
|
3282
|
-
let e = c(
|
|
3367
|
+
}, fi = r(null);
|
|
3368
|
+
function pi() {
|
|
3369
|
+
let e = c(fi);
|
|
3283
3370
|
if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
|
|
3284
3371
|
return e;
|
|
3285
3372
|
}
|
|
3286
|
-
function
|
|
3373
|
+
function mi({ children: e, dataTestId: t }) {
|
|
3287
3374
|
let [n, r] = m([]), i = p(/* @__PURE__ */ new Map()), a = s((e) => {
|
|
3288
3375
|
r((t) => t.filter((t) => t.id !== e));
|
|
3289
3376
|
let t = i.current.get(e);
|
|
@@ -3306,7 +3393,7 @@ function ui({ children: e, dataTestId: t }) {
|
|
|
3306
3393
|
return () => {
|
|
3307
3394
|
e.forEach(clearTimeout), e.clear();
|
|
3308
3395
|
};
|
|
3309
|
-
}, []), /* @__PURE__ */ G(
|
|
3396
|
+
}, []), /* @__PURE__ */ G(fi.Provider, {
|
|
3310
3397
|
value: {
|
|
3311
3398
|
show: o,
|
|
3312
3399
|
dismiss: a
|
|
@@ -3315,14 +3402,14 @@ function ui({ children: e, dataTestId: t }) {
|
|
|
3315
3402
|
"data-test-id": t,
|
|
3316
3403
|
className: "fixed left-1/2 -translate-x-1/2 bottom-6 z-[100] flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
3317
3404
|
children: n.map((e) => {
|
|
3318
|
-
let { container: t, icon: n } =
|
|
3405
|
+
let { container: t, icon: n } = ui[e.variant ?? "neutral"];
|
|
3319
3406
|
return /* @__PURE__ */ G("div", {
|
|
3320
3407
|
role: "status",
|
|
3321
3408
|
"data-test-id": e.dataTestId,
|
|
3322
3409
|
className: Y("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
3323
3410
|
children: [
|
|
3324
3411
|
/* @__PURE__ */ W(n, {
|
|
3325
|
-
className: Y("h-5 w-5 shrink-0",
|
|
3412
|
+
className: Y("h-5 w-5 shrink-0", di[e.variant ?? "neutral"]),
|
|
3326
3413
|
"aria-hidden": !0
|
|
3327
3414
|
}),
|
|
3328
3415
|
/* @__PURE__ */ W("p", {
|
|
@@ -3352,15 +3439,15 @@ function ui({ children: e, dataTestId: t }) {
|
|
|
3352
3439
|
}
|
|
3353
3440
|
//#endregion
|
|
3354
3441
|
//#region src/components/Status/Status.tsx
|
|
3355
|
-
var
|
|
3442
|
+
var hi = {
|
|
3356
3443
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
3357
3444
|
md: "h-6 px-2 text-p-sm gap-1.5",
|
|
3358
3445
|
sm: "h-5 px-1.5 text-p-sm gap-1"
|
|
3359
|
-
},
|
|
3446
|
+
}, gi = {
|
|
3360
3447
|
lg: "h-2 w-2",
|
|
3361
3448
|
md: "h-1.5 w-1.5",
|
|
3362
3449
|
sm: "h-1.5 w-1.5"
|
|
3363
|
-
},
|
|
3450
|
+
}, _i = {
|
|
3364
3451
|
general: {
|
|
3365
3452
|
container: "bg-bg-subtle text-fg-default dark:text-fg-default",
|
|
3366
3453
|
dot: "bg-gray-600 dark:bg-gray-400"
|
|
@@ -3393,19 +3480,19 @@ var di = {
|
|
|
3393
3480
|
container: "bg-bg-subtle text-fg-disabled",
|
|
3394
3481
|
dot: "bg-border-strong"
|
|
3395
3482
|
}
|
|
3396
|
-
},
|
|
3397
|
-
let { container: u, dot: d } =
|
|
3483
|
+
}, vi = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3484
|
+
let { container: u, dot: d } = _i[e];
|
|
3398
3485
|
return /* @__PURE__ */ G("span", {
|
|
3399
3486
|
ref: l,
|
|
3400
3487
|
"data-test-id": s,
|
|
3401
|
-
className: Y("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none",
|
|
3488
|
+
className: Y("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", hi[t], u, a),
|
|
3402
3489
|
...c,
|
|
3403
3490
|
children: [
|
|
3404
3491
|
n ? /* @__PURE__ */ W("span", {
|
|
3405
3492
|
className: "inline-flex shrink-0",
|
|
3406
3493
|
children: n
|
|
3407
3494
|
}) : i ? /* @__PURE__ */ W("span", {
|
|
3408
|
-
className: Y("inline-block shrink-0 rounded-full",
|
|
3495
|
+
className: Y("inline-block shrink-0 rounded-full", gi[t], d),
|
|
3409
3496
|
"aria-hidden": !0
|
|
3410
3497
|
}) : null,
|
|
3411
3498
|
o,
|
|
@@ -3415,45 +3502,45 @@ var di = {
|
|
|
3415
3502
|
})
|
|
3416
3503
|
]
|
|
3417
3504
|
});
|
|
3418
|
-
}),
|
|
3505
|
+
}), yi = {
|
|
3419
3506
|
lg: "size-9",
|
|
3420
3507
|
sm: "size-6"
|
|
3421
|
-
},
|
|
3508
|
+
}, bi = {
|
|
3422
3509
|
lg: "h-9",
|
|
3423
3510
|
sm: "h-6"
|
|
3424
|
-
},
|
|
3511
|
+
}, xi = {
|
|
3425
3512
|
lg: "border-2",
|
|
3426
3513
|
sm: "border"
|
|
3427
|
-
},
|
|
3514
|
+
}, Si = {
|
|
3428
3515
|
lg: "text-p-std",
|
|
3429
3516
|
sm: "text-p-xs"
|
|
3430
|
-
},
|
|
3517
|
+
}, Ci = {
|
|
3431
3518
|
lg: "size-5",
|
|
3432
3519
|
sm: "size-3.5"
|
|
3433
|
-
},
|
|
3520
|
+
}, wi = {
|
|
3434
3521
|
lg: "size-3",
|
|
3435
3522
|
sm: "size-2"
|
|
3436
|
-
},
|
|
3523
|
+
}, Ti = {
|
|
3437
3524
|
lg: "text-p-std",
|
|
3438
3525
|
sm: "text-p-sm"
|
|
3439
|
-
},
|
|
3526
|
+
}, Ei = {
|
|
3440
3527
|
lg: "text-p-sm",
|
|
3441
3528
|
sm: "text-p-xs"
|
|
3442
|
-
},
|
|
3529
|
+
}, Di = {
|
|
3443
3530
|
upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
|
|
3444
3531
|
active: "bg-bg-default border-brand-500 text-brand-700",
|
|
3445
3532
|
completed: "bg-brand-500 border-brand-500 text-fg-inverse",
|
|
3446
3533
|
rejected: "bg-red-700 border-red-800 text-fg-inverse"
|
|
3447
|
-
},
|
|
3534
|
+
}, Oi = {
|
|
3448
3535
|
upcoming: "ring-4 ring-gray-100/80",
|
|
3449
3536
|
active: "ring-4 ring-brand-40/80",
|
|
3450
3537
|
completed: "ring-4 ring-brand-40/80",
|
|
3451
3538
|
rejected: "ring-4 ring-red-100/80"
|
|
3452
3539
|
};
|
|
3453
|
-
function
|
|
3454
|
-
return t === "completed" ? /* @__PURE__ */ W(E, { className:
|
|
3540
|
+
function ki(e, t, n, r) {
|
|
3541
|
+
return t === "completed" ? /* @__PURE__ */ W(E, { className: Ci[r] }) : t === "rejected" ? /* @__PURE__ */ W(D, { className: Ci[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ W("span", { className: Y("rounded-full", wi[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
3455
3542
|
}
|
|
3456
|
-
var
|
|
3543
|
+
var Ai = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
3457
3544
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
3458
3545
|
return /* @__PURE__ */ W("ol", {
|
|
3459
3546
|
ref: l,
|
|
@@ -3462,23 +3549,23 @@ var Ei = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3462
3549
|
...c,
|
|
3463
3550
|
children: e.map((i, o) => {
|
|
3464
3551
|
let s = i.status ?? "upcoming", c = o === 0, l = o === e.length - 1, f = !c && d(e[o - 1]), p = !l && d(i), m = /* @__PURE__ */ W("span", {
|
|
3465
|
-
className: Y("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors",
|
|
3466
|
-
children:
|
|
3552
|
+
className: Y("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", yi[a], xi[a], Si[a], Di[s], i.highlighted && Oi[s]),
|
|
3553
|
+
children: ki(r, s, o, a)
|
|
3467
3554
|
}), h = /* @__PURE__ */ G("div", {
|
|
3468
3555
|
className: Y("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
3469
3556
|
children: [/* @__PURE__ */ W("span", {
|
|
3470
|
-
className: Y("font-medium text-fg-default",
|
|
3557
|
+
className: Y("font-medium text-fg-default", Ti[a]),
|
|
3471
3558
|
children: i.label
|
|
3472
3559
|
}), i.description && /* @__PURE__ */ W("span", {
|
|
3473
|
-
className: Y("text-fg-secondary",
|
|
3560
|
+
className: Y("text-fg-secondary", Ei[a]),
|
|
3474
3561
|
children: i.description
|
|
3475
3562
|
})]
|
|
3476
3563
|
});
|
|
3477
3564
|
return /* @__PURE__ */ G("li", {
|
|
3478
|
-
"aria-current":
|
|
3565
|
+
"aria-current": Q(i.value, t) ? "step" : void 0,
|
|
3479
3566
|
className: Y("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3480
3567
|
children: [/* @__PURE__ */ G("div", {
|
|
3481
|
-
className: Y("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Y("w-full items-center justify-center",
|
|
3568
|
+
className: Y("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Y("w-full items-center justify-center", bi[a])),
|
|
3482
3569
|
children: [
|
|
3483
3570
|
!c && /* @__PURE__ */ W("span", {
|
|
3484
3571
|
"aria-hidden": !0,
|
|
@@ -3500,13 +3587,13 @@ var Ei = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3500
3587
|
}, String(i.value));
|
|
3501
3588
|
})
|
|
3502
3589
|
});
|
|
3503
|
-
}),
|
|
3590
|
+
}), ji = {
|
|
3504
3591
|
md: "h-6 w-11",
|
|
3505
3592
|
sm: "h-5 w-9"
|
|
3506
|
-
},
|
|
3593
|
+
}, Mi = {
|
|
3507
3594
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
3508
3595
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
3509
|
-
},
|
|
3596
|
+
}, Ni = a(function({ size: e = "md", label: t, description: n, labelPosition: r = "right", id: i, disabled: a, checked: o, defaultChecked: s, className: c, dataTestId: l, ...d }, f) {
|
|
3510
3597
|
let p = u(), m = i ?? p, h = /* @__PURE__ */ G("span", {
|
|
3511
3598
|
className: "relative inline-flex shrink-0",
|
|
3512
3599
|
children: [
|
|
@@ -3521,8 +3608,8 @@ var Ei = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3521
3608
|
className: "peer sr-only",
|
|
3522
3609
|
...d
|
|
3523
3610
|
}),
|
|
3524
|
-
/* @__PURE__ */ W("span", { className: Y("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors",
|
|
3525
|
-
/* @__PURE__ */ W("span", { className: Y("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform",
|
|
3611
|
+
/* @__PURE__ */ W("span", { className: Y("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", ji[e], "peer-checked:bg-brand-500 dark:peer-checked:bg-brand-500", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2", a && "!bg-bg-subtle") }),
|
|
3612
|
+
/* @__PURE__ */ W("span", { className: Y("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", Mi[e]) })
|
|
3526
3613
|
]
|
|
3527
3614
|
});
|
|
3528
3615
|
return !t && !n ? /* @__PURE__ */ W("label", {
|
|
@@ -3548,11 +3635,11 @@ var Ei = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3548
3635
|
});
|
|
3549
3636
|
//#endregion
|
|
3550
3637
|
//#region src/components/TableV2/TableV2Filter.tsx
|
|
3551
|
-
function
|
|
3638
|
+
function Pi({ column: e }) {
|
|
3552
3639
|
let t = e.columnDef.meta?.filterVariant;
|
|
3553
3640
|
if (!t) return null;
|
|
3554
3641
|
let n = e.getFilterValue();
|
|
3555
|
-
return t === "custom" ? /* @__PURE__ */ W(U, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ W(
|
|
3642
|
+
return t === "custom" ? /* @__PURE__ */ W(U, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ W(ti, {
|
|
3556
3643
|
size: "sm",
|
|
3557
3644
|
searchable: !1,
|
|
3558
3645
|
required: !1,
|
|
@@ -3571,7 +3658,7 @@ function Ai({ column: e }) {
|
|
|
3571
3658
|
}
|
|
3572
3659
|
//#endregion
|
|
3573
3660
|
//#region src/components/TableV2/TableV2Pagination.i18n.ts
|
|
3574
|
-
var
|
|
3661
|
+
var Fi = {
|
|
3575
3662
|
"en-US": {
|
|
3576
3663
|
rowsPerPage: "Rows per page",
|
|
3577
3664
|
noResults: "No results",
|
|
@@ -3590,12 +3677,12 @@ var ji = {
|
|
|
3590
3677
|
};
|
|
3591
3678
|
//#endregion
|
|
3592
3679
|
//#region src/components/TableV2/TableV2Pagination.tsx
|
|
3593
|
-
function
|
|
3680
|
+
function Ii({ table: e, pageSizeOptions: t = [
|
|
3594
3681
|
10,
|
|
3595
3682
|
20,
|
|
3596
3683
|
30
|
|
3597
3684
|
], locale: n = "en-US" }) {
|
|
3598
|
-
let { pageIndex: r, pageSize: i } = e.getState().pagination, a = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, o = Math.max(1, e.getPageCount()), s = a === 0 ? 0 : r * i + 1, c = Math.min(a, (r + 1) * i), l =
|
|
3685
|
+
let { pageIndex: r, pageSize: i } = e.getState().pagination, a = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, o = Math.max(1, e.getPageCount()), s = a === 0 ? 0 : r * i + 1, c = Math.min(a, (r + 1) * i), l = Fi[n];
|
|
3599
3686
|
return /* @__PURE__ */ G("div", {
|
|
3600
3687
|
className: "flex flex-wrap items-center justify-between gap-3 p-3 border-t border-border-default",
|
|
3601
3688
|
children: [
|
|
@@ -3604,7 +3691,7 @@ function Mi({ table: e, pageSizeOptions: t = [
|
|
|
3604
3691
|
children: [/* @__PURE__ */ W("span", {
|
|
3605
3692
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3606
3693
|
children: l.rowsPerPage
|
|
3607
|
-
}), /* @__PURE__ */ W(
|
|
3694
|
+
}), /* @__PURE__ */ W(ti, {
|
|
3608
3695
|
size: "sm",
|
|
3609
3696
|
menuPlacement: "top",
|
|
3610
3697
|
searchable: !1,
|
|
@@ -3632,12 +3719,12 @@ function Mi({ table: e, pageSizeOptions: t = [
|
|
|
3632
3719
|
}
|
|
3633
3720
|
//#endregion
|
|
3634
3721
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
3635
|
-
function
|
|
3722
|
+
function Li({ columnCount: e, rowCount: t = 8 }) {
|
|
3636
3723
|
return /* @__PURE__ */ W(U, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ W("tr", {
|
|
3637
3724
|
"aria-hidden": n > 0 || void 0,
|
|
3638
3725
|
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ W("td", {
|
|
3639
3726
|
className: "px-4 py-3",
|
|
3640
|
-
children: /* @__PURE__ */ W(
|
|
3727
|
+
children: /* @__PURE__ */ W(li, {
|
|
3641
3728
|
variant: "text",
|
|
3642
3729
|
width: t === 0 ? "70%" : "90%"
|
|
3643
3730
|
})
|
|
@@ -3646,13 +3733,13 @@ function Ni({ columnCount: e, rowCount: t = 8 }) {
|
|
|
3646
3733
|
}
|
|
3647
3734
|
//#endregion
|
|
3648
3735
|
//#region src/components/TableV2/TableV2ColumnVisibility.tsx
|
|
3649
|
-
function
|
|
3736
|
+
function Ri(e) {
|
|
3650
3737
|
let { header: t } = e.columnDef;
|
|
3651
3738
|
return typeof t == "string" ? t : e.id;
|
|
3652
3739
|
}
|
|
3653
|
-
function
|
|
3740
|
+
function zi({ table: e }) {
|
|
3654
3741
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
3655
|
-
return /* @__PURE__ */ G(Mn, { children: [/* @__PURE__ */ W(Nn, { children: /* @__PURE__ */ W(
|
|
3742
|
+
return /* @__PURE__ */ G(Mn, { children: [/* @__PURE__ */ W(Nn, { children: /* @__PURE__ */ W(tt, {
|
|
3656
3743
|
variant: "secondary",
|
|
3657
3744
|
size: "sm",
|
|
3658
3745
|
leftIcon: /* @__PURE__ */ W(O, { className: "h-4 w-4" }),
|
|
@@ -3663,7 +3750,7 @@ function Fi({ table: e }) {
|
|
|
3663
3750
|
className: "px-3 py-1.5 hover:bg-bg-subtle",
|
|
3664
3751
|
children: /* @__PURE__ */ W(zt, {
|
|
3665
3752
|
size: "sm",
|
|
3666
|
-
label:
|
|
3753
|
+
label: Ri(e),
|
|
3667
3754
|
checked: e.getIsVisible(),
|
|
3668
3755
|
onChange: () => e.toggleVisibility()
|
|
3669
3756
|
})
|
|
@@ -3672,7 +3759,7 @@ function Fi({ table: e }) {
|
|
|
3672
3759
|
}
|
|
3673
3760
|
//#endregion
|
|
3674
3761
|
//#region src/components/TableV2/TableV2Toolbar.tsx
|
|
3675
|
-
function
|
|
3762
|
+
function Bi({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
3676
3763
|
return /* @__PURE__ */ G("div", {
|
|
3677
3764
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
3678
3765
|
children: [t && /* @__PURE__ */ W(Zt, {
|
|
@@ -3686,7 +3773,7 @@ function Ii({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3686
3773
|
}), /* @__PURE__ */ G("div", {
|
|
3687
3774
|
className: "ml-auto flex items-center gap-2",
|
|
3688
3775
|
children: [
|
|
3689
|
-
i && /* @__PURE__ */ W(
|
|
3776
|
+
i && /* @__PURE__ */ W(tt, {
|
|
3690
3777
|
variant: "secondary",
|
|
3691
3778
|
size: "sm",
|
|
3692
3779
|
iconOnly: !0,
|
|
@@ -3694,14 +3781,14 @@ function Ii({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3694
3781
|
leftIcon: /* @__PURE__ */ W(ce, { className: "h-4 w-4" }),
|
|
3695
3782
|
onClick: i
|
|
3696
3783
|
}),
|
|
3697
|
-
a && /* @__PURE__ */ W(
|
|
3784
|
+
a && /* @__PURE__ */ W(tt, {
|
|
3698
3785
|
variant: "secondary",
|
|
3699
3786
|
size: "sm",
|
|
3700
3787
|
leftIcon: /* @__PURE__ */ W(j, { className: "h-4 w-4" }),
|
|
3701
3788
|
onClick: a,
|
|
3702
3789
|
children: "Export"
|
|
3703
3790
|
}),
|
|
3704
|
-
n && /* @__PURE__ */ W(
|
|
3791
|
+
n && /* @__PURE__ */ W(zi, { table: e }),
|
|
3705
3792
|
o
|
|
3706
3793
|
]
|
|
3707
3794
|
})]
|
|
@@ -3709,32 +3796,32 @@ function Ii({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3709
3796
|
}
|
|
3710
3797
|
//#endregion
|
|
3711
3798
|
//#region src/components/TableV2/useTableV2ColumnDnd.ts
|
|
3712
|
-
var
|
|
3799
|
+
var Vi = ({ transform: e }) => ({
|
|
3713
3800
|
...e,
|
|
3714
3801
|
y: 0
|
|
3715
3802
|
});
|
|
3716
|
-
function
|
|
3803
|
+
function Hi({ columnOrder: e, onColumnOrderChange: t }) {
|
|
3717
3804
|
return {
|
|
3718
|
-
sensors: Fe(
|
|
3719
|
-
collisionDetection:
|
|
3720
|
-
modifiers: [
|
|
3805
|
+
sensors: Ie(Fe(Ne, { activationConstraint: { distance: 4 } }), Fe(Me, { coordinateGetter: Be })),
|
|
3806
|
+
collisionDetection: Pe,
|
|
3807
|
+
modifiers: [Vi],
|
|
3721
3808
|
handleDragEnd: (n) => {
|
|
3722
3809
|
let { active: r, over: i } = n;
|
|
3723
3810
|
if (!i || r.id === i.id) return;
|
|
3724
3811
|
let a = e.indexOf(String(r.id)), o = e.indexOf(String(i.id));
|
|
3725
|
-
a === -1 || o === -1 || t(
|
|
3812
|
+
a === -1 || o === -1 || t(Re(e, a, o));
|
|
3726
3813
|
}
|
|
3727
3814
|
};
|
|
3728
3815
|
}
|
|
3729
|
-
function
|
|
3730
|
-
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } =
|
|
3816
|
+
function Ui(e) {
|
|
3817
|
+
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Ve({ id: e });
|
|
3731
3818
|
return {
|
|
3732
3819
|
setNodeRef: r,
|
|
3733
3820
|
attributes: t,
|
|
3734
3821
|
listeners: n,
|
|
3735
3822
|
isDragging: o,
|
|
3736
3823
|
style: {
|
|
3737
|
-
transform:
|
|
3824
|
+
transform: J.Translate.toString(i),
|
|
3738
3825
|
transition: a,
|
|
3739
3826
|
opacity: o ? .8 : 1,
|
|
3740
3827
|
zIndex: o ? 10 : void 0,
|
|
@@ -3744,13 +3831,13 @@ function zi(e) {
|
|
|
3744
3831
|
}
|
|
3745
3832
|
//#endregion
|
|
3746
3833
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
3747
|
-
function
|
|
3748
|
-
return t.length === 0 ? null : /* @__PURE__ */ G(Mn, { children: [/* @__PURE__ */ W(Nn, { children: /* @__PURE__ */ W(
|
|
3834
|
+
function Wi({ row: e, actions: t }) {
|
|
3835
|
+
return t.length === 0 ? null : /* @__PURE__ */ G(Mn, { children: [/* @__PURE__ */ W(Nn, { children: /* @__PURE__ */ W(tt, {
|
|
3749
3836
|
variant: "tertiary",
|
|
3750
3837
|
size: "sm",
|
|
3751
3838
|
iconOnly: !0,
|
|
3752
3839
|
"aria-label": "Row actions",
|
|
3753
|
-
leftIcon: /* @__PURE__ */ W(
|
|
3840
|
+
leftIcon: /* @__PURE__ */ W(R, { className: "h-4 w-4" })
|
|
3754
3841
|
}) }), /* @__PURE__ */ W(Fn, {
|
|
3755
3842
|
align: "end",
|
|
3756
3843
|
children: t.map((t, n) => /* @__PURE__ */ W(In, {
|
|
@@ -3764,15 +3851,15 @@ function Bi({ row: e, actions: t }) {
|
|
|
3764
3851
|
}
|
|
3765
3852
|
//#endregion
|
|
3766
3853
|
//#region src/components/TableV2/TableV2.utils.tsx
|
|
3767
|
-
var
|
|
3854
|
+
var Gi = {
|
|
3768
3855
|
comfortable: "py-3",
|
|
3769
3856
|
compact: "py-2"
|
|
3770
|
-
},
|
|
3857
|
+
}, Ki = {
|
|
3771
3858
|
left: "text-left",
|
|
3772
3859
|
center: "text-center",
|
|
3773
3860
|
right: "text-right"
|
|
3774
3861
|
};
|
|
3775
|
-
function
|
|
3862
|
+
function qi() {
|
|
3776
3863
|
return {
|
|
3777
3864
|
id: "select",
|
|
3778
3865
|
size: 40,
|
|
@@ -3797,7 +3884,7 @@ function Ui() {
|
|
|
3797
3884
|
})
|
|
3798
3885
|
};
|
|
3799
3886
|
}
|
|
3800
|
-
function
|
|
3887
|
+
function Ji(e, t) {
|
|
3801
3888
|
return {
|
|
3802
3889
|
id: "actions",
|
|
3803
3890
|
header: t?.header ?? "",
|
|
@@ -3805,13 +3892,13 @@ function Wi(e, t) {
|
|
|
3805
3892
|
enableSorting: !1,
|
|
3806
3893
|
enableColumnFilter: !1,
|
|
3807
3894
|
enableResizing: !1,
|
|
3808
|
-
cell: ({ row: t }) => /* @__PURE__ */ W(
|
|
3895
|
+
cell: ({ row: t }) => /* @__PURE__ */ W(Wi, {
|
|
3809
3896
|
row: t.original,
|
|
3810
3897
|
actions: e(t.original)
|
|
3811
3898
|
})
|
|
3812
3899
|
};
|
|
3813
3900
|
}
|
|
3814
|
-
function
|
|
3901
|
+
function Yi(e) {
|
|
3815
3902
|
let t = e.getIsPinned();
|
|
3816
3903
|
return t ? {
|
|
3817
3904
|
position: "sticky",
|
|
@@ -3822,26 +3909,26 @@ function Gi(e) {
|
|
|
3822
3909
|
}
|
|
3823
3910
|
//#endregion
|
|
3824
3911
|
//#region src/components/TableV2/TableV2.tsx
|
|
3825
|
-
function
|
|
3912
|
+
function Xi(e, t, n) {
|
|
3826
3913
|
let [r, i] = m(n);
|
|
3827
3914
|
return [e === void 0 ? r : e, (e) => {
|
|
3828
3915
|
i((t) => typeof e == "function" ? e(t) : e), t?.(e);
|
|
3829
3916
|
}];
|
|
3830
3917
|
}
|
|
3831
|
-
var
|
|
3832
|
-
function
|
|
3833
|
-
let c = e.column, l =
|
|
3918
|
+
var Zi = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
3919
|
+
function Qi({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
3920
|
+
let c = e.column, l = Zi.has(c.id), u = i && !l, d = Ui(c.id), f = c.columnDef.meta?.align ?? "left", p = c.getIsSorted(), m = !l && (o && c.getCanPin() || s && c.getCanHide()), h = Te(c.columnDef.header, e.getContext());
|
|
3834
3921
|
return /* @__PURE__ */ G("th", {
|
|
3835
3922
|
ref: u ? d.setNodeRef : void 0,
|
|
3836
3923
|
colSpan: e.colSpan,
|
|
3837
3924
|
scope: "col",
|
|
3838
3925
|
style: {
|
|
3839
3926
|
width: a ? e.getSize() : void 0,
|
|
3840
|
-
...
|
|
3927
|
+
...Yi(c),
|
|
3841
3928
|
...u ? d.style : null
|
|
3842
3929
|
},
|
|
3843
3930
|
"aria-sort": p === "asc" ? "ascending" : p === "desc" ? "descending" : void 0,
|
|
3844
|
-
className: Y("relative px-4 whitespace-nowrap bg-bg-container",
|
|
3931
|
+
className: Y("relative px-4 whitespace-nowrap bg-bg-container", Gi[t], Ki[f]),
|
|
3845
3932
|
children: [
|
|
3846
3933
|
/* @__PURE__ */ G("div", {
|
|
3847
3934
|
className: "flex items-center gap-1",
|
|
@@ -3873,7 +3960,7 @@ function Ji({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
3873
3960
|
type: "button",
|
|
3874
3961
|
"aria-label": `${typeof h == "string" ? h : c.id} column options`,
|
|
3875
3962
|
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",
|
|
3876
|
-
children: /* @__PURE__ */ W(
|
|
3963
|
+
children: /* @__PURE__ */ W(L, { className: "h-3.5 w-3.5" })
|
|
3877
3964
|
}) }), /* @__PURE__ */ G(Fn, {
|
|
3878
3965
|
align: "start",
|
|
3879
3966
|
children: [
|
|
@@ -3907,7 +3994,7 @@ function Ji({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
3907
3994
|
r && c.getCanFilter() && /* @__PURE__ */ W("div", {
|
|
3908
3995
|
className: "mt-2 normal-case",
|
|
3909
3996
|
onClick: (e) => e.stopPropagation(),
|
|
3910
|
-
children: /* @__PURE__ */ W(
|
|
3997
|
+
children: /* @__PURE__ */ W(Pi, { column: c })
|
|
3911
3998
|
}),
|
|
3912
3999
|
a && c.getCanResize() && /* @__PURE__ */ W("div", {
|
|
3913
4000
|
onMouseDown: e.getResizeHandler(),
|
|
@@ -3918,8 +4005,8 @@ function Ji({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
3918
4005
|
]
|
|
3919
4006
|
});
|
|
3920
4007
|
}
|
|
3921
|
-
function
|
|
3922
|
-
let n = e.getVisibleCells(), r = n.find((e) => !
|
|
4008
|
+
function $i({ row: e, onRowClick: t }) {
|
|
4009
|
+
let n = e.getVisibleCells(), r = n.find((e) => !Zi.has(e.column.id)), i = n.find((e) => e.column.id === "select"), a = n.find((e) => e.column.id === "actions"), o = n.filter((e) => e !== r && !Zi.has(e.column.id));
|
|
3923
4010
|
return /* @__PURE__ */ G("div", {
|
|
3924
4011
|
"data-selected": e.getIsSelected() || void 0,
|
|
3925
4012
|
onClick: t ? () => t(e.original) : void 0,
|
|
@@ -3929,12 +4016,12 @@ function Yi({ row: e, onRowClick: t }) {
|
|
|
3929
4016
|
children: [/* @__PURE__ */ G("div", {
|
|
3930
4017
|
className: "flex items-center gap-2",
|
|
3931
4018
|
children: [
|
|
3932
|
-
i &&
|
|
4019
|
+
i && Te(i.column.columnDef.cell, i.getContext()),
|
|
3933
4020
|
/* @__PURE__ */ W("div", {
|
|
3934
4021
|
className: "flex-1 min-w-0 text-p-std font-medium text-fg-default truncate",
|
|
3935
|
-
children: r &&
|
|
4022
|
+
children: r && Te(r.column.columnDef.cell, r.getContext())
|
|
3936
4023
|
}),
|
|
3937
|
-
a &&
|
|
4024
|
+
a && Te(a.column.columnDef.cell, a.getContext())
|
|
3938
4025
|
]
|
|
3939
4026
|
}), o.length > 0 && /* @__PURE__ */ W("dl", {
|
|
3940
4027
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -3947,51 +4034,51 @@ function Yi({ row: e, onRowClick: t }) {
|
|
|
3947
4034
|
children: typeof t == "string" ? t : e.column.id
|
|
3948
4035
|
}), /* @__PURE__ */ W("dd", {
|
|
3949
4036
|
className: "text-p-sm text-fg-default truncate",
|
|
3950
|
-
children:
|
|
4037
|
+
children: Te(e.column.columnDef.cell, e.getContext())
|
|
3951
4038
|
})]
|
|
3952
4039
|
}, e.id);
|
|
3953
4040
|
})
|
|
3954
4041
|
})]
|
|
3955
4042
|
});
|
|
3956
4043
|
}
|
|
3957
|
-
function
|
|
4044
|
+
function ea({ rowCount: e }) {
|
|
3958
4045
|
return /* @__PURE__ */ W("div", { children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ G("div", {
|
|
3959
4046
|
"aria-hidden": t > 0 || void 0,
|
|
3960
4047
|
className: "flex flex-col gap-2 border-b border-border-default p-4",
|
|
3961
|
-
children: [/* @__PURE__ */ W(
|
|
4048
|
+
children: [/* @__PURE__ */ W(li, {
|
|
3962
4049
|
variant: "text",
|
|
3963
4050
|
width: "60%"
|
|
3964
|
-
}), /* @__PURE__ */ W(
|
|
4051
|
+
}), /* @__PURE__ */ W(li, {
|
|
3965
4052
|
variant: "text",
|
|
3966
4053
|
width: "90%"
|
|
3967
4054
|
})]
|
|
3968
4055
|
}, t)) });
|
|
3969
4056
|
}
|
|
3970
|
-
function
|
|
3971
|
-
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:
|
|
4057
|
+
function ta(e, t) {
|
|
4058
|
+
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: ne, enableColumnResizing: P = !1, columnResizeMode: F = "onChange", enablePagination: I = !1, pageSize: L = 10, pageSizeOptions: R, pagination: re, onPaginationChange: ie, locale: ae = "en-US", manualPagination: oe = !1, pageCount: se, rowCount: ce, enableVirtualization: z = !1, estimatedRowHeight: le = 44, maxBodyHeight: ue = 480, onRowClick: de, toolbar: B = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: V, onExport: me, density: he = "comfortable", stickyHeader: H = !1, fillHeight: K = !1, wrapperClassName: q, className: ge, dataTestId: _e } = e, [ve, ye] = Xi(u, h, []), [be, xe] = Xi(v, y, []), [Se, Ce] = Xi(S, C, ""), [Me, Ne] = Xi(E, D, {}), [Pe, Fe] = Xi(k, A, {}), [Ie, Re] = Xi(M, ee, []), [Be, Ve] = Xi(N, ne, {}), [J, He] = Xi(re, ie, {
|
|
3972
4059
|
pageIndex: 0,
|
|
3973
|
-
pageSize:
|
|
3974
|
-
}),
|
|
4060
|
+
pageSize: L
|
|
4061
|
+
}), X = Ae({
|
|
3975
4062
|
data: n,
|
|
3976
|
-
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [
|
|
4063
|
+
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [qi(), ...r], [r, w]),
|
|
3977
4064
|
getRowId: s,
|
|
3978
4065
|
state: {
|
|
3979
|
-
sorting:
|
|
3980
|
-
columnFilters:
|
|
3981
|
-
globalFilter:
|
|
4066
|
+
sorting: ve,
|
|
4067
|
+
columnFilters: be,
|
|
4068
|
+
globalFilter: Se,
|
|
3982
4069
|
rowSelection: Me,
|
|
3983
|
-
columnVisibility:
|
|
3984
|
-
columnOrder:
|
|
3985
|
-
columnPinning:
|
|
3986
|
-
pagination:
|
|
4070
|
+
columnVisibility: Pe,
|
|
4071
|
+
columnOrder: Ie,
|
|
4072
|
+
columnPinning: Be,
|
|
4073
|
+
pagination: J
|
|
3987
4074
|
},
|
|
3988
|
-
onSortingChange:
|
|
3989
|
-
onColumnFiltersChange:
|
|
3990
|
-
onGlobalFilterChange:
|
|
3991
|
-
onRowSelectionChange:
|
|
3992
|
-
onColumnVisibilityChange:
|
|
3993
|
-
onColumnOrderChange:
|
|
3994
|
-
onColumnPinningChange:
|
|
4075
|
+
onSortingChange: ye,
|
|
4076
|
+
onColumnFiltersChange: xe,
|
|
4077
|
+
onGlobalFilterChange: Ce,
|
|
4078
|
+
onRowSelectionChange: Ne,
|
|
4079
|
+
onColumnVisibilityChange: Fe,
|
|
4080
|
+
onColumnOrderChange: Re,
|
|
4081
|
+
onColumnPinningChange: Ve,
|
|
3995
4082
|
onPaginationChange: He,
|
|
3996
4083
|
enableSorting: c,
|
|
3997
4084
|
enableMultiSort: l,
|
|
@@ -4001,111 +4088,111 @@ function Zi(e, t) {
|
|
|
4001
4088
|
manualFiltering: b,
|
|
4002
4089
|
enableRowSelection: w,
|
|
4003
4090
|
enableMultiRowSelection: T,
|
|
4004
|
-
enableColumnResizing:
|
|
4005
|
-
columnResizeMode:
|
|
4091
|
+
enableColumnResizing: P,
|
|
4092
|
+
columnResizeMode: F,
|
|
4006
4093
|
manualPagination: oe,
|
|
4007
4094
|
pageCount: se,
|
|
4008
4095
|
rowCount: ce,
|
|
4009
4096
|
getCoreRowModel: Ee(),
|
|
4010
4097
|
getSortedRowModel: c ? ke() : void 0,
|
|
4011
4098
|
getFilteredRowModel: _ || x ? De() : void 0,
|
|
4012
|
-
getPaginationRowModel:
|
|
4013
|
-
}),
|
|
4099
|
+
getPaginationRowModel: I ? Oe() : void 0
|
|
4100
|
+
}), Z = X.getRowModel().rows, Ue = X.getVisibleLeafColumns().length, We = p(null), [Q, Ge] = m(null);
|
|
4014
4101
|
d(() => {
|
|
4015
|
-
if (!
|
|
4016
|
-
let e =
|
|
4017
|
-
e && e !==
|
|
4102
|
+
if (!I || z) return;
|
|
4103
|
+
let e = We.current?.getBoundingClientRect().height;
|
|
4104
|
+
e && e !== Q && Ge(e);
|
|
4018
4105
|
}, [
|
|
4019
|
-
|
|
4106
|
+
I,
|
|
4020
4107
|
z,
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4108
|
+
he,
|
|
4109
|
+
Z,
|
|
4110
|
+
Q
|
|
4024
4111
|
]);
|
|
4025
|
-
let
|
|
4026
|
-
columnOrder:
|
|
4027
|
-
onColumnOrderChange:
|
|
4028
|
-
}),
|
|
4029
|
-
count:
|
|
4030
|
-
getScrollElement: () =>
|
|
4112
|
+
let Ke = Q ?? le, qe = I && !z ? Math.max(0, J.pageSize - Z.length) * Ke : 0, Je = f(() => Ie.length > 0 ? Ie : X.getAllLeafColumns().map((e) => e.id), [Ie, X]), Ye = Hi({
|
|
4113
|
+
columnOrder: Je,
|
|
4114
|
+
onColumnOrderChange: Re
|
|
4115
|
+
}), Xe = (e) => Ye.handleDragEnd(e), Ze = p(null), Qe = we({
|
|
4116
|
+
count: Z.length,
|
|
4117
|
+
getScrollElement: () => Ze.current,
|
|
4031
4118
|
estimateSize: () => le,
|
|
4032
4119
|
overscan: 10,
|
|
4033
4120
|
enabled: z
|
|
4034
|
-
}),
|
|
4121
|
+
}), $e = z ? Qe.getVirtualItems() : null, et = $e && $e.length > 0 ? $e[0]?.start ?? 0 : 0, tt = $e && $e.length > 0 ? Qe.getTotalSize() - ($e[$e.length - 1]?.end ?? 0) : 0, nt = (e, t) => /* @__PURE__ */ W("tr", {
|
|
4035
4122
|
ref: t,
|
|
4036
4123
|
"data-selected": e.getIsSelected() || void 0,
|
|
4037
4124
|
onClick: de ? () => de(e.original) : void 0,
|
|
4038
4125
|
className: Y("group border-t border-border-default", de && "cursor-pointer"),
|
|
4039
4126
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ W("td", {
|
|
4040
|
-
style:
|
|
4041
|
-
className: Y("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50",
|
|
4042
|
-
children:
|
|
4127
|
+
style: Yi(e.column),
|
|
4128
|
+
className: Y("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", Gi[he], Ki[e.column.columnDef.meta?.align ?? "left"]),
|
|
4129
|
+
children: Te(e.column.columnDef.cell, e.getContext())
|
|
4043
4130
|
}, e.id))
|
|
4044
|
-
}, e.id), rt = (e, t) => /* @__PURE__ */ W("tr", { children: t.map((e) => /* @__PURE__ */ W(
|
|
4131
|
+
}, e.id), rt = (e, t) => /* @__PURE__ */ W("tr", { children: t.map((e) => /* @__PURE__ */ W(Qi, {
|
|
4045
4132
|
header: e,
|
|
4046
|
-
density:
|
|
4133
|
+
density: he,
|
|
4047
4134
|
enableSorting: c,
|
|
4048
4135
|
enableFiltering: _,
|
|
4049
4136
|
enableColumnOrdering: j,
|
|
4050
|
-
enableColumnResizing:
|
|
4137
|
+
enableColumnResizing: P,
|
|
4051
4138
|
enablePinning: te,
|
|
4052
4139
|
enableColumnVisibility: O
|
|
4053
4140
|
}, e.id)) }, e), it = /* @__PURE__ */ G("table", {
|
|
4054
4141
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4055
|
-
style: { width:
|
|
4142
|
+
style: { width: P ? X.getTotalSize() : "100%" },
|
|
4056
4143
|
children: [/* @__PURE__ */ W("thead", {
|
|
4057
|
-
className: Y("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (
|
|
4058
|
-
children:
|
|
4059
|
-
}), /* @__PURE__ */ W("tbody", { children: i ? /* @__PURE__ */ W(
|
|
4060
|
-
columnCount:
|
|
4061
|
-
rowCount:
|
|
4062
|
-
}) :
|
|
4063
|
-
colSpan:
|
|
4144
|
+
className: Y("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (H || K) && "sticky top-0 z-10"),
|
|
4145
|
+
children: X.getHeaderGroups().map((e) => rt(e.id, e.headers))
|
|
4146
|
+
}), /* @__PURE__ */ W("tbody", { children: i ? /* @__PURE__ */ W(Li, {
|
|
4147
|
+
columnCount: Ue,
|
|
4148
|
+
rowCount: J.pageSize
|
|
4149
|
+
}) : Z.length === 0 ? /* @__PURE__ */ W("tr", { children: /* @__PURE__ */ W("td", {
|
|
4150
|
+
colSpan: Ue,
|
|
4064
4151
|
className: "p-0",
|
|
4065
4152
|
children: /* @__PURE__ */ W(Yn, {
|
|
4066
4153
|
size: "sm",
|
|
4067
4154
|
title: o
|
|
4068
4155
|
})
|
|
4069
|
-
}) }) : z &&
|
|
4070
|
-
|
|
4156
|
+
}) }) : z && $e ? /* @__PURE__ */ G(U, { children: [
|
|
4157
|
+
et > 0 && /* @__PURE__ */ W("tr", {
|
|
4071
4158
|
"aria-hidden": !0,
|
|
4072
4159
|
children: /* @__PURE__ */ W("td", {
|
|
4073
|
-
style: { height:
|
|
4074
|
-
colSpan:
|
|
4160
|
+
style: { height: et },
|
|
4161
|
+
colSpan: Ue
|
|
4075
4162
|
})
|
|
4076
4163
|
}),
|
|
4077
|
-
|
|
4078
|
-
let t =
|
|
4164
|
+
$e.map((e) => {
|
|
4165
|
+
let t = Z[e.index];
|
|
4079
4166
|
return t ? nt(t) : null;
|
|
4080
4167
|
}),
|
|
4081
|
-
|
|
4168
|
+
tt > 0 && /* @__PURE__ */ W("tr", {
|
|
4082
4169
|
"aria-hidden": !0,
|
|
4083
4170
|
children: /* @__PURE__ */ W("td", {
|
|
4084
|
-
style: { height:
|
|
4085
|
-
colSpan:
|
|
4171
|
+
style: { height: tt },
|
|
4172
|
+
colSpan: Ue
|
|
4086
4173
|
})
|
|
4087
4174
|
})
|
|
4088
|
-
] }) : /* @__PURE__ */ G(U, { children: [
|
|
4175
|
+
] }) : /* @__PURE__ */ G(U, { children: [Z.map((e, t) => nt(e, t === 0 ? We : void 0)), qe > 0 && /* @__PURE__ */ W("tr", {
|
|
4089
4176
|
"aria-hidden": !0,
|
|
4090
4177
|
children: /* @__PURE__ */ W("td", {
|
|
4091
|
-
style: { height:
|
|
4092
|
-
colSpan:
|
|
4178
|
+
style: { height: qe },
|
|
4179
|
+
colSpan: Ue,
|
|
4093
4180
|
className: "p-0"
|
|
4094
4181
|
})
|
|
4095
4182
|
})] }) })]
|
|
4096
4183
|
});
|
|
4097
4184
|
return /* @__PURE__ */ G("div", {
|
|
4098
4185
|
ref: t,
|
|
4099
|
-
"data-test-id":
|
|
4100
|
-
className: Y("w-full rounded-lg border border-border-default bg-bg-default", K && "h-full flex flex-col",
|
|
4186
|
+
"data-test-id": _e,
|
|
4187
|
+
className: Y("w-full rounded-lg border border-border-default bg-bg-default", K && "h-full flex flex-col", q, ge),
|
|
4101
4188
|
children: [
|
|
4102
|
-
B === !1 ? null : B ?? /* @__PURE__ */ W(
|
|
4103
|
-
table:
|
|
4189
|
+
B === !1 ? null : B ?? /* @__PURE__ */ W(Bi, {
|
|
4190
|
+
table: X,
|
|
4104
4191
|
enableGlobalFilter: x,
|
|
4105
4192
|
enableColumnVisibility: O,
|
|
4106
4193
|
searchPlaceholder: pe,
|
|
4107
4194
|
onRefresh: V,
|
|
4108
|
-
onExport:
|
|
4195
|
+
onExport: me,
|
|
4109
4196
|
actions: fe
|
|
4110
4197
|
}),
|
|
4111
4198
|
a ? /* @__PURE__ */ W("div", {
|
|
@@ -4118,50 +4205,50 @@ function Zi(e, t) {
|
|
|
4118
4205
|
}) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
4119
4206
|
className: Y("hidden", K ? "md:flex md:flex-col md:flex-1 md:min-h-0" : "md:block"),
|
|
4120
4207
|
children: /* @__PURE__ */ W("div", {
|
|
4121
|
-
ref:
|
|
4208
|
+
ref: Ze,
|
|
4122
4209
|
className: Y("w-full overflow-auto", B === !1 ? "rounded-lg" : "rounded-b-lg", K && "flex-1 min-h-0"),
|
|
4123
|
-
style: K ? void 0 : z ||
|
|
4210
|
+
style: K ? void 0 : z || H ? { maxHeight: ue } : void 0,
|
|
4124
4211
|
children: j ? /* @__PURE__ */ W(je, {
|
|
4125
|
-
sensors:
|
|
4126
|
-
collisionDetection:
|
|
4127
|
-
modifiers:
|
|
4128
|
-
onDragEnd:
|
|
4129
|
-
children: /* @__PURE__ */ W(
|
|
4130
|
-
items:
|
|
4131
|
-
strategy:
|
|
4212
|
+
sensors: Ye.sensors,
|
|
4213
|
+
collisionDetection: Ye.collisionDetection,
|
|
4214
|
+
modifiers: Ye.modifiers,
|
|
4215
|
+
onDragEnd: Xe,
|
|
4216
|
+
children: /* @__PURE__ */ W(Le, {
|
|
4217
|
+
items: Je,
|
|
4218
|
+
strategy: ze,
|
|
4132
4219
|
children: it
|
|
4133
4220
|
})
|
|
4134
4221
|
}) : it
|
|
4135
4222
|
})
|
|
4136
4223
|
}), /* @__PURE__ */ W("div", {
|
|
4137
4224
|
className: "md:hidden",
|
|
4138
|
-
children: i ? /* @__PURE__ */ W(
|
|
4225
|
+
children: i ? /* @__PURE__ */ W(ea, { rowCount: J.pageSize }) : Z.length === 0 ? /* @__PURE__ */ W(Yn, {
|
|
4139
4226
|
size: "sm",
|
|
4140
4227
|
title: o
|
|
4141
|
-
}) :
|
|
4228
|
+
}) : Z.map((e) => /* @__PURE__ */ W($i, {
|
|
4142
4229
|
row: e,
|
|
4143
4230
|
onRowClick: de
|
|
4144
4231
|
}, e.id))
|
|
4145
4232
|
})] }),
|
|
4146
|
-
|
|
4147
|
-
table:
|
|
4148
|
-
pageSizeOptions:
|
|
4233
|
+
I && !a && /* @__PURE__ */ W(Ii, {
|
|
4234
|
+
table: X,
|
|
4235
|
+
pageSizeOptions: R,
|
|
4149
4236
|
locale: ae
|
|
4150
4237
|
})
|
|
4151
4238
|
]
|
|
4152
4239
|
});
|
|
4153
4240
|
}
|
|
4154
|
-
var
|
|
4155
|
-
|
|
4241
|
+
var na = a(ta);
|
|
4242
|
+
na.displayName = "TableV2";
|
|
4156
4243
|
//#endregion
|
|
4157
4244
|
//#region src/components/Tabs/Tabs.tsx
|
|
4158
|
-
var
|
|
4159
|
-
function
|
|
4160
|
-
let e = c(
|
|
4245
|
+
var ra = r(null);
|
|
4246
|
+
function ia() {
|
|
4247
|
+
let e = c(ra);
|
|
4161
4248
|
if (!e) throw Error("Tab components must be used inside <Tabs>");
|
|
4162
4249
|
return e;
|
|
4163
4250
|
}
|
|
4164
|
-
function
|
|
4251
|
+
function aa(t) {
|
|
4165
4252
|
let n = [];
|
|
4166
4253
|
e.forEach(t, (e) => {
|
|
4167
4254
|
o(e) && n.push(e);
|
|
@@ -4175,9 +4262,9 @@ function ta(t) {
|
|
|
4175
4262
|
}
|
|
4176
4263
|
return "";
|
|
4177
4264
|
}
|
|
4178
|
-
var
|
|
4179
|
-
let [f, p] = m(() => e ??
|
|
4180
|
-
return /* @__PURE__ */ W(
|
|
4265
|
+
var oa = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r = "underline", size: i = "md", disabled: a = !1, className: o, children: s, dataTestId: c, ...l }, d) {
|
|
4266
|
+
let [f, p] = m(() => e ?? aa(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
4267
|
+
return /* @__PURE__ */ W(ra.Provider, {
|
|
4181
4268
|
value: {
|
|
4182
4269
|
value: g,
|
|
4183
4270
|
setValue: (e) => {
|
|
@@ -4196,8 +4283,8 @@ var na = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4196
4283
|
children: s
|
|
4197
4284
|
})
|
|
4198
4285
|
});
|
|
4199
|
-
}),
|
|
4200
|
-
let { variant: s } =
|
|
4286
|
+
}), sa = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
4287
|
+
let { variant: s } = ia(), c = p(null);
|
|
4201
4288
|
return /* @__PURE__ */ W("div", {
|
|
4202
4289
|
ref: Bt(o, c),
|
|
4203
4290
|
role: "tablist",
|
|
@@ -4219,12 +4306,12 @@ var na = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4219
4306
|
children: e
|
|
4220
4307
|
});
|
|
4221
4308
|
});
|
|
4222
|
-
|
|
4223
|
-
var
|
|
4309
|
+
sa.displayName = "TabList";
|
|
4310
|
+
var ca = {
|
|
4224
4311
|
lg: "h-11 px-4 text-p-md",
|
|
4225
4312
|
md: "h-10 px-3 text-p-std",
|
|
4226
4313
|
sm: "h-8 px-2.5 text-p-sm"
|
|
4227
|
-
},
|
|
4314
|
+
}, la = {
|
|
4228
4315
|
underline: {
|
|
4229
4316
|
on: "bg-brand-500 text-white",
|
|
4230
4317
|
off: "bg-bg-subtle text-fg-secondary"
|
|
@@ -4237,8 +4324,8 @@ var ia = {
|
|
|
4237
4324
|
on: "bg-brand-500 text-white",
|
|
4238
4325
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4239
4326
|
}
|
|
4240
|
-
},
|
|
4241
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } =
|
|
4327
|
+
}, ua = a(function({ value: e, children: t, disabled: n, icon: r, badge: i, badgeProps: a, rightIcon: o, onRightIconClick: s, rightIconLabel: c, className: l, dataTestId: u, onClick: d, id: f, ...p }, m) {
|
|
4328
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = ia(), x = Q(h, e), S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Y("group relative inline-flex items-center justify-center gap-2 font-medium outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1 focus-visible:rounded-md", ca[v], S && "opacity-50 cursor-not-allowed"), D = _ === "underline" ? Y("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? Y("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : Y("border-r border-border-default last:border-r-0", x ? "bg-bg-default text-fg-default" : "bg-transparent text-fg-secondary hover:bg-bg-subtle"), O = /* @__PURE__ */ G("button", {
|
|
4242
4329
|
ref: m,
|
|
4243
4330
|
id: w,
|
|
4244
4331
|
type: "button",
|
|
@@ -4267,7 +4354,7 @@ var ia = {
|
|
|
4267
4354
|
...a,
|
|
4268
4355
|
children: i
|
|
4269
4356
|
}) : /* @__PURE__ */ W("span", {
|
|
4270
|
-
className: Y("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ?
|
|
4357
|
+
className: Y("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-[1.25rem]", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ? la[_].on : la[_].off),
|
|
4271
4358
|
children: i
|
|
4272
4359
|
})),
|
|
4273
4360
|
_ === "underline" && /* @__PURE__ */ W("span", {
|
|
@@ -4289,8 +4376,8 @@ var ia = {
|
|
|
4289
4376
|
children: o
|
|
4290
4377
|
})]
|
|
4291
4378
|
}) : O;
|
|
4292
|
-
}),
|
|
4293
|
-
let { value: c, tabsId: l } =
|
|
4379
|
+
}), da = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4380
|
+
let { value: c, tabsId: l } = ia(), u = Q(c, e);
|
|
4294
4381
|
return !u && !a ? null : /* @__PURE__ */ W("div", {
|
|
4295
4382
|
ref: s,
|
|
4296
4383
|
id: i ?? `${l}-panel-${e}`,
|
|
@@ -4302,7 +4389,7 @@ var ia = {
|
|
|
4302
4389
|
...o,
|
|
4303
4390
|
children: t
|
|
4304
4391
|
});
|
|
4305
|
-
}),
|
|
4392
|
+
}), fa = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, error: i = !1, id: a, disabled: o, required: s, maxLength: c, showCount: l = !1, className: d, wrapperClassName: f, value: p, defaultValue: h, rows: g = 4, dataTestId: _, onChange: v, ...y }, b) {
|
|
4306
4393
|
let x = u(), S = a ?? x, C = i || !!r, w = r ? `${S}-error` : n ? `${S}-help` : void 0, T = p !== void 0, E = l && !!c, [D, O] = m(() => String(h ?? "").length), k = T ? String(p).length : D;
|
|
4307
4394
|
return /* @__PURE__ */ G("div", {
|
|
4308
4395
|
className: Y("flex flex-col gap-1.5 w-full", f),
|
|
@@ -4364,7 +4451,7 @@ var ia = {
|
|
|
4364
4451
|
})
|
|
4365
4452
|
]
|
|
4366
4453
|
});
|
|
4367
|
-
}),
|
|
4454
|
+
}), pa = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
4368
4455
|
let c = u(), l = n ?? c;
|
|
4369
4456
|
return /* @__PURE__ */ G("label", {
|
|
4370
4457
|
htmlFor: l,
|
|
@@ -4389,7 +4476,7 @@ var ia = {
|
|
|
4389
4476
|
children: [/* @__PURE__ */ W(de, {
|
|
4390
4477
|
className: "size-4 text-yellow-500 z-1",
|
|
4391
4478
|
"aria-hidden": !0
|
|
4392
|
-
}), /* @__PURE__ */ W(
|
|
4479
|
+
}), /* @__PURE__ */ W(I, {
|
|
4393
4480
|
className: "size-4 text-gray-400 z-1",
|
|
4394
4481
|
"aria-hidden": !0
|
|
4395
4482
|
})]
|
|
@@ -4404,20 +4491,20 @@ var ia = {
|
|
|
4404
4491
|
children: t
|
|
4405
4492
|
})]
|
|
4406
4493
|
});
|
|
4407
|
-
}),
|
|
4494
|
+
}), ma = {
|
|
4408
4495
|
lg: "px-3 py-2 text-p-std",
|
|
4409
4496
|
sm: "px-2 py-1 text-p-sm"
|
|
4410
|
-
},
|
|
4497
|
+
}, ha = {
|
|
4411
4498
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4412
4499
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
4413
4500
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
4414
4501
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
4415
|
-
},
|
|
4502
|
+
}, ga = {
|
|
4416
4503
|
top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
|
|
4417
4504
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
|
|
4418
4505
|
left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
|
|
4419
4506
|
right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
|
|
4420
|
-
},
|
|
4507
|
+
}, _a = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, className: s, dataTestId: c }, l) {
|
|
4421
4508
|
let [d, f] = m(!1), h = p(null), g = u(), _ = () => {
|
|
4422
4509
|
h.current && clearTimeout(h.current), h.current = setTimeout(() => f(!0), a);
|
|
4423
4510
|
}, v = () => {
|
|
@@ -4438,39 +4525,39 @@ var ia = {
|
|
|
4438
4525
|
}), d && /* @__PURE__ */ G("span", {
|
|
4439
4526
|
role: "tooltip",
|
|
4440
4527
|
id: g,
|
|
4441
|
-
className: Y("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none",
|
|
4528
|
+
className: Y("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", ma[i], ha[r], s),
|
|
4442
4529
|
children: [e, /* @__PURE__ */ W("span", {
|
|
4443
4530
|
"aria-hidden": !0,
|
|
4444
|
-
className: Y("absolute h-0 w-0 border-4",
|
|
4531
|
+
className: Y("absolute h-0 w-0 border-4", ga[r])
|
|
4445
4532
|
})]
|
|
4446
4533
|
})]
|
|
4447
4534
|
});
|
|
4448
|
-
}),
|
|
4535
|
+
}), va = "We'll be back soon", ya = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", ba = {
|
|
4449
4536
|
lg: "xl",
|
|
4450
4537
|
sm: "lg"
|
|
4451
|
-
},
|
|
4538
|
+
}, xa = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
4452
4539
|
return /* @__PURE__ */ W(Yn, {
|
|
4453
4540
|
ref: a,
|
|
4454
4541
|
size: e,
|
|
4455
|
-
title: t ??
|
|
4456
|
-
description: n ??
|
|
4542
|
+
title: t ?? va,
|
|
4543
|
+
description: n ?? ya,
|
|
4457
4544
|
illustration: r ?? /* @__PURE__ */ W(Vn, {
|
|
4458
4545
|
icon: k,
|
|
4459
4546
|
tone: "brand",
|
|
4460
4547
|
shape: "circle",
|
|
4461
|
-
size:
|
|
4548
|
+
size: ba[e]
|
|
4462
4549
|
}),
|
|
4463
4550
|
...i
|
|
4464
4551
|
});
|
|
4465
4552
|
});
|
|
4466
4553
|
//#endregion
|
|
4467
4554
|
//#region src/hooks/useStepper.ts
|
|
4468
|
-
function
|
|
4555
|
+
function Sa(e, t) {
|
|
4469
4556
|
return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
|
|
4470
4557
|
}
|
|
4471
|
-
function
|
|
4472
|
-
let [a, o] = m(() =>
|
|
4473
|
-
let n =
|
|
4558
|
+
function Ca({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
|
|
4559
|
+
let [a, o] = m(() => Sa(t, e)), s = n !== void 0, c = s ? Sa(n, e) : a, l = (t) => {
|
|
4560
|
+
let n = Sa(t, e);
|
|
4474
4561
|
s || o(n), r?.(n);
|
|
4475
4562
|
};
|
|
4476
4563
|
return {
|
|
@@ -4498,37 +4585,37 @@ function ya({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i =
|
|
|
4498
4585
|
}
|
|
4499
4586
|
//#endregion
|
|
4500
4587
|
//#region src/hooks/useOnOutsideClick.ts
|
|
4501
|
-
var
|
|
4502
|
-
function
|
|
4503
|
-
let t =
|
|
4588
|
+
var wa = [];
|
|
4589
|
+
function Ta(e) {
|
|
4590
|
+
let t = wa[wa.length - 1];
|
|
4504
4591
|
if (!t) return;
|
|
4505
4592
|
let { ref: n, callback: r, shouldRemoveCallback: i } = t;
|
|
4506
|
-
n && !n.contains(e.target) && (i &&
|
|
4593
|
+
n && !n.contains(e.target) && (i && wa.splice(wa.length - 1, 1), r(e));
|
|
4507
4594
|
}
|
|
4508
|
-
var
|
|
4595
|
+
var Ea = (e, t, n, r, i = !0) => {
|
|
4509
4596
|
l(() => {
|
|
4510
|
-
if (e && n && r) return
|
|
4597
|
+
if (e && n && r) return wa.push({
|
|
4511
4598
|
ref: e,
|
|
4512
4599
|
callback: t,
|
|
4513
4600
|
uid: r,
|
|
4514
4601
|
shouldRemoveCallback: i
|
|
4515
|
-
}),
|
|
4516
|
-
|
|
4602
|
+
}), wa.length === 1 && document.addEventListener("mousedown", Ta), () => {
|
|
4603
|
+
wa.length === 0 && document.removeEventListener("mousedown", Ta);
|
|
4517
4604
|
};
|
|
4518
4605
|
}, [
|
|
4519
4606
|
e,
|
|
4520
4607
|
n,
|
|
4521
4608
|
r
|
|
4522
4609
|
]), l(() => {
|
|
4523
|
-
if (!n &&
|
|
4524
|
-
let e =
|
|
4525
|
-
e >= 0 &&
|
|
4610
|
+
if (!n && wa.length > 0) {
|
|
4611
|
+
let e = wa.findIndex((e) => e.uid === r);
|
|
4612
|
+
e >= 0 && wa.splice(e, 1);
|
|
4526
4613
|
}
|
|
4527
4614
|
}, [n]);
|
|
4528
4615
|
};
|
|
4529
4616
|
//#endregion
|
|
4530
4617
|
//#region src/hooks/useEscapeKey.ts
|
|
4531
|
-
function
|
|
4618
|
+
function Da(e, t = !0) {
|
|
4532
4619
|
l(() => {
|
|
4533
4620
|
if (!t) return;
|
|
4534
4621
|
let n = (t) => {
|
|
@@ -4539,18 +4626,18 @@ function Ca(e, t = !0) {
|
|
|
4539
4626
|
}
|
|
4540
4627
|
//#endregion
|
|
4541
4628
|
//#region src/hooks/useHideBodyScroll.ts
|
|
4542
|
-
var
|
|
4543
|
-
function
|
|
4629
|
+
var Oa = 0, ka = "";
|
|
4630
|
+
function Aa(e) {
|
|
4544
4631
|
l(() => {
|
|
4545
|
-
if (e) return
|
|
4546
|
-
--
|
|
4632
|
+
if (e) return Oa === 0 && (ka = document.body.style.overflow, document.body.style.overflow = "hidden"), Oa += 1, () => {
|
|
4633
|
+
--Oa, Oa === 0 && (document.body.style.overflow = ka);
|
|
4547
4634
|
};
|
|
4548
4635
|
}, [e]);
|
|
4549
4636
|
}
|
|
4550
4637
|
//#endregion
|
|
4551
4638
|
//#region src/hooks/useIsMobile.ts
|
|
4552
|
-
var
|
|
4553
|
-
function
|
|
4639
|
+
var ja = 768;
|
|
4640
|
+
function Ma(e = ja) {
|
|
4554
4641
|
let [t, n] = m(!1);
|
|
4555
4642
|
return l(() => {
|
|
4556
4643
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -4560,33 +4647,33 @@ function Oa(e = Da) {
|
|
|
4560
4647
|
}
|
|
4561
4648
|
//#endregion
|
|
4562
4649
|
//#region src/hooks/useFormContext.ts
|
|
4563
|
-
function
|
|
4650
|
+
function Na() {
|
|
4564
4651
|
let e = c($n);
|
|
4565
4652
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
4566
4653
|
return e;
|
|
4567
4654
|
}
|
|
4568
4655
|
//#endregion
|
|
4569
4656
|
//#region src/hooks/useFormProps.ts
|
|
4570
|
-
var
|
|
4657
|
+
var Pa = () => void 0, Fa = {
|
|
4571
4658
|
errors: {},
|
|
4572
|
-
setValue:
|
|
4573
|
-
reset:
|
|
4574
|
-
clearErrors:
|
|
4575
|
-
setError:
|
|
4576
|
-
unregister:
|
|
4659
|
+
setValue: Pa,
|
|
4660
|
+
reset: Pa,
|
|
4661
|
+
clearErrors: Pa,
|
|
4662
|
+
setError: Pa,
|
|
4663
|
+
unregister: Pa,
|
|
4577
4664
|
isDirty: !1,
|
|
4578
4665
|
isSubmitted: !1,
|
|
4579
4666
|
isSubmitting: !1,
|
|
4580
4667
|
isValid: !1,
|
|
4581
4668
|
dirtyFields: {},
|
|
4582
|
-
submit:
|
|
4669
|
+
submit: Pa
|
|
4583
4670
|
};
|
|
4584
|
-
function
|
|
4585
|
-
return c($n) ??
|
|
4671
|
+
function Ia() {
|
|
4672
|
+
return c($n) ?? Fa;
|
|
4586
4673
|
}
|
|
4587
4674
|
//#endregion
|
|
4588
4675
|
//#region src/tokens/colors.ts
|
|
4589
|
-
var
|
|
4676
|
+
var La = {
|
|
4590
4677
|
900: "#31531C",
|
|
4591
4678
|
800: "#416E26",
|
|
4592
4679
|
700: "#518A2F",
|
|
@@ -4612,7 +4699,7 @@ var Na = {
|
|
|
4612
4699
|
100: "#f2f5f8",
|
|
4613
4700
|
50: "#f5f7fa",
|
|
4614
4701
|
20: "#f7f9fc"
|
|
4615
|
-
},
|
|
4702
|
+
}, Ra = "#FEFEFE", za = {
|
|
4616
4703
|
900: "#0b4627",
|
|
4617
4704
|
800: "#0f5c33",
|
|
4618
4705
|
700: "#3D8B46",
|
|
@@ -4623,7 +4710,7 @@ var Na = {
|
|
|
4623
4710
|
200: "#aeeacb",
|
|
4624
4711
|
100: "#d0f5e1",
|
|
4625
4712
|
50: "#e0faec"
|
|
4626
|
-
},
|
|
4713
|
+
}, Ba = {
|
|
4627
4714
|
900: "#2443B8",
|
|
4628
4715
|
800: "#2E63D6",
|
|
4629
4716
|
700: "#3475E8",
|
|
@@ -4634,7 +4721,7 @@ var Na = {
|
|
|
4634
4721
|
200: "#9ACAFA",
|
|
4635
4722
|
100: "#C1DEFC",
|
|
4636
4723
|
50: "#E6F2FE"
|
|
4637
|
-
},
|
|
4724
|
+
}, Va = {
|
|
4638
4725
|
900: "#081FA6",
|
|
4639
4726
|
800: "#0E2AB2",
|
|
4640
4727
|
700: "#2431B9",
|
|
@@ -4646,7 +4733,7 @@ var Na = {
|
|
|
4646
4733
|
100: "#CBC4ED",
|
|
4647
4734
|
50: "#EAE7F7",
|
|
4648
4735
|
20: "#F5F3FB"
|
|
4649
|
-
},
|
|
4736
|
+
}, Ha = {
|
|
4650
4737
|
900: "#4A0A20",
|
|
4651
4738
|
800: "#79012F",
|
|
4652
4739
|
700: "#A2023F",
|
|
@@ -4657,7 +4744,7 @@ var Na = {
|
|
|
4657
4744
|
200: "#FE7DAF",
|
|
4658
4745
|
100: "#FEA8C9",
|
|
4659
4746
|
50: "#FFD4E4"
|
|
4660
|
-
},
|
|
4747
|
+
}, Ua = {
|
|
4661
4748
|
900: "#8b1822",
|
|
4662
4749
|
800: "#ad1f2b",
|
|
4663
4750
|
700: "#d02533",
|
|
@@ -4669,7 +4756,7 @@ var Na = {
|
|
|
4669
4756
|
100: "#ffd5d8",
|
|
4670
4757
|
50: "#ffebec",
|
|
4671
4758
|
20: "#fff4f4"
|
|
4672
|
-
},
|
|
4759
|
+
}, Wa = {
|
|
4673
4760
|
900: "#EB7520",
|
|
4674
4761
|
800: "#ED912A",
|
|
4675
4762
|
700: "#EEA02F",
|
|
@@ -4680,47 +4767,47 @@ var Na = {
|
|
|
4680
4767
|
200: "#F7DE8E",
|
|
4681
4768
|
100: "#FAEBB9",
|
|
4682
4769
|
50: "#FDF7E4"
|
|
4683
|
-
},
|
|
4684
|
-
brand:
|
|
4770
|
+
}, Ga = {
|
|
4771
|
+
brand: La,
|
|
4685
4772
|
gray: $,
|
|
4686
|
-
green:
|
|
4687
|
-
blue:
|
|
4688
|
-
purple:
|
|
4689
|
-
pink:
|
|
4690
|
-
red:
|
|
4691
|
-
yellow:
|
|
4692
|
-
},
|
|
4693
|
-
bgDefault:
|
|
4773
|
+
green: za,
|
|
4774
|
+
blue: Ba,
|
|
4775
|
+
purple: Va,
|
|
4776
|
+
pink: Ha,
|
|
4777
|
+
red: Ua,
|
|
4778
|
+
yellow: Wa
|
|
4779
|
+
}, Ka = {
|
|
4780
|
+
bgDefault: Ra,
|
|
4694
4781
|
bgContainer: $[50],
|
|
4695
4782
|
bgSubtle: $[100],
|
|
4696
|
-
bgBrandLighter:
|
|
4697
|
-
bgInfoLighter:
|
|
4698
|
-
bgSuccessLighter:
|
|
4699
|
-
bgWarningLighter:
|
|
4700
|
-
bgDangerLighter:
|
|
4783
|
+
bgBrandLighter: La[20],
|
|
4784
|
+
bgInfoLighter: Ba[50],
|
|
4785
|
+
bgSuccessLighter: za[50],
|
|
4786
|
+
bgWarningLighter: Wa[50],
|
|
4787
|
+
bgDangerLighter: Ua[50],
|
|
4701
4788
|
fgDefault: $[900],
|
|
4702
4789
|
fgSecondary: $[600],
|
|
4703
4790
|
fgTertiary: $[500],
|
|
4704
4791
|
fgDisabled: $[400],
|
|
4705
|
-
fgInverse:
|
|
4706
|
-
fgBrand:
|
|
4707
|
-
fgInfo:
|
|
4708
|
-
fgSuccess:
|
|
4709
|
-
fgWarning:
|
|
4710
|
-
fgDanger:
|
|
4792
|
+
fgInverse: Ra,
|
|
4793
|
+
fgBrand: La[500],
|
|
4794
|
+
fgInfo: Ba[600],
|
|
4795
|
+
fgSuccess: za[600],
|
|
4796
|
+
fgWarning: Wa[800],
|
|
4797
|
+
fgDanger: Ua[800],
|
|
4711
4798
|
borderDefault: $[200],
|
|
4712
4799
|
borderSubtle: $[100],
|
|
4713
4800
|
borderStrong: $[300],
|
|
4714
|
-
borderBrand:
|
|
4801
|
+
borderBrand: La[500],
|
|
4715
4802
|
iconPrimary: $[900],
|
|
4716
4803
|
iconSecondary: $[600],
|
|
4717
|
-
iconInverse:
|
|
4718
|
-
iconBrand:
|
|
4719
|
-
iconInfo:
|
|
4720
|
-
iconDanger:
|
|
4721
|
-
iconWarning:
|
|
4722
|
-
},
|
|
4723
|
-
...
|
|
4804
|
+
iconInverse: Ra,
|
|
4805
|
+
iconBrand: La[500],
|
|
4806
|
+
iconInfo: Ba[600],
|
|
4807
|
+
iconDanger: Ua[800],
|
|
4808
|
+
iconWarning: Wa[800]
|
|
4809
|
+
}, qa = {
|
|
4810
|
+
...Ka,
|
|
4724
4811
|
bgDefault: "#0B1120",
|
|
4725
4812
|
bgContainer: "#0F172A",
|
|
4726
4813
|
bgSubtle: "#121C30",
|
|
@@ -4729,16 +4816,16 @@ var Na = {
|
|
|
4729
4816
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
4730
4817
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
4731
4818
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
4732
|
-
fgDefault:
|
|
4819
|
+
fgDefault: Ra,
|
|
4733
4820
|
fgSecondary: $[400],
|
|
4734
4821
|
fgTertiary: $[500],
|
|
4735
4822
|
fgDisabled: $[600],
|
|
4736
4823
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
4737
4824
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
4738
4825
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
4739
|
-
iconPrimary:
|
|
4826
|
+
iconPrimary: Ra,
|
|
4740
4827
|
iconSecondary: $[400]
|
|
4741
|
-
},
|
|
4828
|
+
}, Ja = {
|
|
4742
4829
|
ps: [
|
|
4743
4830
|
"Noto Sans Armenian",
|
|
4744
4831
|
"Noto Sans",
|
|
@@ -4753,7 +4840,7 @@ var Na = {
|
|
|
4753
4840
|
"system-ui",
|
|
4754
4841
|
"sans-serif"
|
|
4755
4842
|
]
|
|
4756
|
-
},
|
|
4843
|
+
}, Ya = {
|
|
4757
4844
|
xl: {
|
|
4758
4845
|
fontSize: "64px",
|
|
4759
4846
|
lineHeight: "72px"
|
|
@@ -4778,7 +4865,7 @@ var Na = {
|
|
|
4778
4865
|
fontSize: "24px",
|
|
4779
4866
|
lineHeight: "32px"
|
|
4780
4867
|
}
|
|
4781
|
-
},
|
|
4868
|
+
}, Xa = {
|
|
4782
4869
|
lg: {
|
|
4783
4870
|
fontSize: "20px",
|
|
4784
4871
|
lineHeight: "28px"
|
|
@@ -4799,7 +4886,7 @@ var Na = {
|
|
|
4799
4886
|
fontSize: "10px",
|
|
4800
4887
|
lineHeight: "14px"
|
|
4801
4888
|
}
|
|
4802
|
-
},
|
|
4889
|
+
}, Za = {
|
|
4803
4890
|
lg: {
|
|
4804
4891
|
fontSize: "20px",
|
|
4805
4892
|
lineHeight: "28px"
|
|
@@ -4824,19 +4911,19 @@ var Na = {
|
|
|
4824
4911
|
fontSize: "6px",
|
|
4825
4912
|
lineHeight: "6px"
|
|
4826
4913
|
}
|
|
4827
|
-
},
|
|
4828
|
-
headline:
|
|
4829
|
-
paragraph:
|
|
4830
|
-
label:
|
|
4831
|
-
},
|
|
4914
|
+
}, Qa = {
|
|
4915
|
+
headline: Ya,
|
|
4916
|
+
paragraph: Xa,
|
|
4917
|
+
label: Za
|
|
4918
|
+
}, $a = {
|
|
4832
4919
|
sm: "2rem",
|
|
4833
4920
|
md: "2.5rem",
|
|
4834
4921
|
lg: "3rem"
|
|
4835
|
-
},
|
|
4922
|
+
}, eo = {
|
|
4836
4923
|
sm: "0.875rem",
|
|
4837
4924
|
md: "1rem",
|
|
4838
4925
|
lg: "1.25rem"
|
|
4839
|
-
},
|
|
4926
|
+
}, to = {
|
|
4840
4927
|
xs: "2px",
|
|
4841
4928
|
sm: "4px",
|
|
4842
4929
|
md: "8px",
|
|
@@ -4845,7 +4932,7 @@ var Na = {
|
|
|
4845
4932
|
"2xl": "20px",
|
|
4846
4933
|
"3xl": "24px",
|
|
4847
4934
|
full: "9999px"
|
|
4848
|
-
},
|
|
4935
|
+
}, no = {
|
|
4849
4936
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
4850
4937
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
4851
4938
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -4853,6 +4940,6 @@ var Na = {
|
|
|
4853
4940
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
4854
4941
|
};
|
|
4855
4942
|
//#endregion
|
|
4856
|
-
export {
|
|
4943
|
+
export { Ye as Accordion, Xe as AccordionItem, gt as Avatar, _t as AvatarGroup, Et as Badge, kt as Breadcrumb, tt as Button, jt as ButtonGroup, Pt as Card, It as CardGroup, zt as Checkbox, Kt as Copy, $t as Counter, mn as DatePicker, vn as DistributionBar, We as Divider, En as Drawer, Fn as DropdownContent, In as DropdownItem, Rn as DropdownLabel, Mn as DropdownMenu, Ln as DropdownSeparator, Nn as DropdownTrigger, Yn as Empty, Qn as Filter, er as FormContainer, tr as FormField, Vn as IconTile, nr as InfoField, ir as InlineAlert, Zt as Input, ar as Link, sr as Modal, fr as NotificationBadge, gr as Pagination, yr as PersonCard, Gt as Popover, wr as Progress, kr as Radio, Er as RadioGroup, Ar as ReadMore, ti as SelectV2, ii as Sidebar, ai as SidebarItem, li as Skeleton, mi as SnackbarProvider, vi as Status, Ai as StepIndicator, Ni as Switch, ua as Tab, sa as TabList, da as TabPanel, na as TableV2, Pi as TableV2ColumnFilter, zi as TableV2ColumnVisibilityMenu, Ii as TableV2Pagination, Wi as TableV2RowActionsMenu, Li as TableV2Skeleton, Bi as TableV2Toolbar, oa as Tabs, Kn as Text, fa as TextArea, pa as ThemeSwitch, _a as Tooltip, xa as UnderConstruction, ot as Upload, ct as UploadItem, Ba as blue, La as brand, Y as cn, Ga as colorPrimitives, $a as controlHeight, Ji as createRowActionsColumn, qi as createSelectionColumn, qa as darkTheme, Ja as fontFamily, Yi as getPinnedStyles, $ as gray, za as green, Ya as headline, eo as iconSize, Za as label, Ka as lightTheme, Xa as paragraph, Ha as pink, Va as purple, to as radius, Ua as red, no as shadows, Qa as typography, Da as useEscapeKey, ge as useFieldArray, Na as useFormContext, Ia as useFormProps, Aa as useHideBodyScroll, Ma as useIsMobile, Ea as useOnOutsideClick, pi as useSnackbar, Ca as useStepper, at as validateSingleFile, Ra as white, Wa as yellow };
|
|
4857
4944
|
|
|
4858
4945
|
//# sourceMappingURL=index.js.map
|