@dinofront/design_system 1.17.0 → 1.17.2
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 +989 -967
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 ne, Menu as P, Minus as F, Monitor as I, Moon as L, MoreHorizontal as R, MoreVertical as re, Paperclip as ie, Pencil as ae, Pin as oe, PinOff as se, Plus as ce, RefreshCw as z, Search as le, SearchX as ue, Smartphone as B, Sparkles as de, Sun as fe, Tablet as pe, TabletSmartphone as me, Trash2 as he, UploadCloud as V, User as H, X as U, XCircle as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { extendTailwindMerge as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
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
|
|
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, Monitor as I, Moon as L, MoreHorizontal as R, MoreVertical as re, Paperclip as ie, Pencil as ae, Pin as oe, PinOff as se, Plus as ce, RefreshCw as z, Search as le, SearchX as ue, Smartphone as B, Sparkles as de, Sun as fe, Tablet as pe, TabletSmartphone as me, Trash2 as he, UploadCloud as V, User as H, X as U, XCircle as W } from "lucide-react";
|
|
3
|
+
import { clsx as G } from "clsx";
|
|
4
|
+
import { extendTailwindMerge as ge } from "tailwind-merge";
|
|
5
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as _e } from "react-dom";
|
|
7
|
+
import { Controller as ve, useFieldArray as ye, useForm as be } from "react-hook-form";
|
|
8
|
+
import { yupResolver as xe } from "@hookform/resolvers/yup";
|
|
9
|
+
import Se, { components as Y } from "react-select";
|
|
10
|
+
import Ce from "react-select/async";
|
|
11
|
+
import we from "react-select/creatable";
|
|
12
|
+
import Te from "react-select/async-creatable";
|
|
13
|
+
import { useVirtualizer as Ee } from "@tanstack/react-virtual";
|
|
14
|
+
import { flexRender as De, getCoreRowModel as Oe, getFilteredRowModel as ke, getPaginationRowModel as Ae, getSortedRowModel as je, useReactTable as Me } from "@tanstack/react-table";
|
|
15
|
+
import { DndContext as Ne, KeyboardSensor as Pe, PointerSensor as Fe, closestCenter as Ie, useSensor as Le, useSensors as Re } from "@dnd-kit/core";
|
|
16
16
|
import { SortableContext as ze, arrayMove as Be, horizontalListSortingStrategy as X, sortableKeyboardCoordinates as Z, useSortable as Ve } from "@dnd-kit/sortable";
|
|
17
17
|
import { CSS as He } from "@dnd-kit/utilities";
|
|
18
18
|
//#region src/lib/cn.ts
|
|
19
|
-
var Ue =
|
|
19
|
+
var Ue = ge({ extend: { theme: { text: [
|
|
20
20
|
"h-xl",
|
|
21
21
|
"h-lg",
|
|
22
22
|
"h-md",
|
|
@@ -36,7 +36,7 @@ var Ue = _e({ extend: { theme: { text: [
|
|
|
36
36
|
"label-xxs"
|
|
37
37
|
] } } });
|
|
38
38
|
function Q(...e) {
|
|
39
|
-
return Ue(
|
|
39
|
+
return Ue(G(e));
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/components/Divider/Divider.tsx
|
|
@@ -52,7 +52,7 @@ var We = {
|
|
|
52
52
|
strong: "border-border-strong",
|
|
53
53
|
brand: "border-border-brand"
|
|
54
54
|
}, qe = a(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ q("div", {
|
|
56
56
|
ref: o,
|
|
57
57
|
role: "separator",
|
|
58
58
|
"aria-orientation": e,
|
|
@@ -71,7 +71,7 @@ function Qe(e) {
|
|
|
71
71
|
}
|
|
72
72
|
var $e = 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
73
|
let [d, f] = m(() => Qe(t)), p = n !== void 0, h = p ? Qe(n) : d;
|
|
74
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ q(Xe.Provider, {
|
|
75
75
|
value: {
|
|
76
76
|
openValues: h,
|
|
77
77
|
toggle: (t) => {
|
|
@@ -81,7 +81,7 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
81
81
|
animated: i,
|
|
82
82
|
showDivider: a
|
|
83
83
|
},
|
|
84
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ q("div", {
|
|
85
85
|
ref: u,
|
|
86
86
|
"data-test-id": c,
|
|
87
87
|
className: Q("flex flex-col divide-y divide-border-default border border-border-default rounded-lg overflow-hidden bg-bg-default", o),
|
|
@@ -90,14 +90,14 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
}), et = 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 } = Ze(), m = Ye(l, e), h = u(), g = u(), _ = /* @__PURE__ */
|
|
94
|
-
return /* @__PURE__ */
|
|
93
|
+
let { openValues: l, toggle: d, animated: f, showDivider: p } = Ze(), m = Ye(l, e), h = u(), g = u(), _ = /* @__PURE__ */ J(K, { children: [p && /* @__PURE__ */ q(qe, { className: "mb-4" }), a] });
|
|
94
|
+
return /* @__PURE__ */ J("div", {
|
|
95
95
|
ref: c,
|
|
96
96
|
"data-test-id": o,
|
|
97
97
|
"data-state": m ? "open" : "closed",
|
|
98
98
|
className: Q("group", i),
|
|
99
99
|
...s,
|
|
100
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ q("h3", { children: /* @__PURE__ */ J("button", {
|
|
101
101
|
id: g,
|
|
102
102
|
type: "button",
|
|
103
103
|
onClick: () => d(e),
|
|
@@ -105,21 +105,21 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
105
105
|
"aria-expanded": m,
|
|
106
106
|
"aria-controls": h,
|
|
107
107
|
className: Q("flex w-full items-center justify-between gap-3 px-5 py-4 text-left", "text-p-md font-medium text-fg-default", "hover:bg-bg-container transition-colors", "focus-visible:outline-none focus-visible:bg-bg-container", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ J("span", {
|
|
109
109
|
className: "inline-flex items-center gap-3",
|
|
110
|
-
children: [n && /* @__PURE__ */
|
|
110
|
+
children: [n && /* @__PURE__ */ q("span", {
|
|
111
111
|
className: "inline-flex text-fg-secondary",
|
|
112
112
|
children: n
|
|
113
113
|
}), t]
|
|
114
|
-
}), /* @__PURE__ */
|
|
114
|
+
}), /* @__PURE__ */ q(S, {
|
|
115
115
|
className: Q("h-5 w-5 shrink-0 text-fg-secondary transition-transform duration-200", m && "rotate-180"),
|
|
116
116
|
"aria-hidden": !0
|
|
117
117
|
})]
|
|
118
|
-
}) }), f ? /* @__PURE__ */
|
|
118
|
+
}) }), f ? /* @__PURE__ */ q("div", {
|
|
119
119
|
className: Q("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
120
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ q("div", {
|
|
121
121
|
className: "overflow-hidden min-h-0",
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ q("div", {
|
|
123
123
|
id: h,
|
|
124
124
|
role: "region",
|
|
125
125
|
"aria-labelledby": g,
|
|
@@ -128,7 +128,7 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
128
128
|
children: _
|
|
129
129
|
})
|
|
130
130
|
})
|
|
131
|
-
}) : /* @__PURE__ */
|
|
131
|
+
}) : /* @__PURE__ */ q("div", {
|
|
132
132
|
id: h,
|
|
133
133
|
role: "region",
|
|
134
134
|
"aria-labelledby": g,
|
|
@@ -176,7 +176,8 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
176
176
|
tertiary: "bg-bg-subtle",
|
|
177
177
|
danger: "bg-red-900"
|
|
178
178
|
}, at = 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
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ q("button", {
|
|
180
|
+
type: "button",
|
|
180
181
|
ref: m,
|
|
181
182
|
disabled: c || i,
|
|
182
183
|
"aria-pressed": s,
|
|
@@ -190,16 +191,16 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
190
191
|
},
|
|
191
192
|
className: Q("inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors outline-none cursor-pointer", a ? nt[t] : tt[t], rt[e], s && it[e], o && "w-full", l),
|
|
192
193
|
...p,
|
|
193
|
-
children: i ? /* @__PURE__ */
|
|
194
|
+
children: i ? /* @__PURE__ */ q(ne, {
|
|
194
195
|
className: "h-4 w-4 animate-spin",
|
|
195
196
|
"aria-hidden": !0
|
|
196
|
-
}) : /* @__PURE__ */
|
|
197
|
-
n && /* @__PURE__ */
|
|
197
|
+
}) : /* @__PURE__ */ J(K, { children: [
|
|
198
|
+
n && /* @__PURE__ */ q("span", {
|
|
198
199
|
className: "inline-flex shrink-0",
|
|
199
200
|
children: n
|
|
200
201
|
}),
|
|
201
202
|
u,
|
|
202
|
-
r && /* @__PURE__ */
|
|
203
|
+
r && /* @__PURE__ */ q("span", {
|
|
203
204
|
className: "inline-flex shrink-0",
|
|
204
205
|
children: r
|
|
205
206
|
})
|
|
@@ -267,7 +268,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
267
268
|
r.length && i?.(r), a.length && d?.(a);
|
|
268
269
|
}, ne = (e) => {
|
|
269
270
|
e.preventDefault(), j.current = 0, A(!1), !a && N(Array.from(e.dataTransfer.files ?? []));
|
|
270
|
-
}, P = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, F = /* @__PURE__ */
|
|
271
|
+
}, P = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, F = /* @__PURE__ */ q("input", {
|
|
271
272
|
ref: O,
|
|
272
273
|
type: "file",
|
|
273
274
|
accept: e,
|
|
@@ -277,33 +278,33 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
277
278
|
N(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
278
279
|
},
|
|
279
280
|
className: "sr-only"
|
|
280
|
-
}), I = (y || C) && /* @__PURE__ */
|
|
281
|
+
}), I = (y || C) && /* @__PURE__ */ J("div", {
|
|
281
282
|
className: "flex items-center gap-1.5",
|
|
282
|
-
children: [y && /* @__PURE__ */
|
|
283
|
+
children: [y && /* @__PURE__ */ J("span", {
|
|
283
284
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
284
|
-
children: [y, b && /* @__PURE__ */
|
|
285
|
+
children: [y, b && /* @__PURE__ */ q("span", {
|
|
285
286
|
className: "text-red-600",
|
|
286
287
|
"aria-hidden": !0,
|
|
287
288
|
children: "*"
|
|
288
289
|
})]
|
|
289
|
-
}), C && /* @__PURE__ */
|
|
290
|
+
}), C && /* @__PURE__ */ q("span", {
|
|
290
291
|
className: "inline-flex items-center gap-1",
|
|
291
292
|
children: C
|
|
292
293
|
})]
|
|
293
|
-
}), L = S ? /* @__PURE__ */
|
|
294
|
+
}), L = S ? /* @__PURE__ */ q("p", {
|
|
294
295
|
id: `${ee}-error`,
|
|
295
296
|
className: "text-p-sm text-red-700",
|
|
296
297
|
children: S
|
|
297
|
-
}) : null, R = f && l.length > 0 && /* @__PURE__ */
|
|
298
|
+
}) : null, R = f && l.length > 0 && /* @__PURE__ */ q("div", {
|
|
298
299
|
className: "flex flex-col gap-2",
|
|
299
|
-
children: l.map((e, t) => /* @__PURE__ */
|
|
300
|
+
children: l.map((e, t) => /* @__PURE__ */ q(ft, {
|
|
300
301
|
name: e.name,
|
|
301
302
|
meta: ct(e.size),
|
|
302
303
|
status: "completed",
|
|
303
304
|
onRemove: g !== "view" && h ? () => h(e, t) : void 0
|
|
304
305
|
}, `${t}-${e.name}-${e.size}`))
|
|
305
306
|
});
|
|
306
|
-
if (g === "view") return /* @__PURE__ */
|
|
307
|
+
if (g === "view") return /* @__PURE__ */ J("div", {
|
|
307
308
|
ref: D,
|
|
308
309
|
"data-test-id": T,
|
|
309
310
|
className: Q("flex flex-col gap-1.5", w),
|
|
@@ -316,22 +317,22 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
316
317
|
});
|
|
317
318
|
if (g !== "dropzone") {
|
|
318
319
|
let e = g === "icon";
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ J("div", {
|
|
320
321
|
ref: D,
|
|
321
322
|
"data-test-id": T,
|
|
322
323
|
className: Q("flex flex-col gap-1.5", w),
|
|
323
324
|
...E,
|
|
324
325
|
children: [
|
|
325
326
|
I,
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ q(at, {
|
|
327
328
|
type: "button",
|
|
328
329
|
variant: "secondary",
|
|
329
330
|
iconOnly: e,
|
|
330
331
|
disabled: a,
|
|
331
332
|
onClick: () => O.current?.click(),
|
|
332
|
-
leftIcon: e ? void 0 : v ?? /* @__PURE__ */
|
|
333
|
+
leftIcon: e ? void 0 : v ?? /* @__PURE__ */ q(ie, { className: "h-4 w-4" }),
|
|
333
334
|
"aria-label": e ? "Upload file" : void 0,
|
|
334
|
-
children: e ? v ?? /* @__PURE__ */
|
|
335
|
+
children: e ? v ?? /* @__PURE__ */ q(ae, { className: "h-4 w-4" }) : _ ?? "Choose a file"
|
|
335
336
|
}),
|
|
336
337
|
F,
|
|
337
338
|
R,
|
|
@@ -339,7 +340,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
339
340
|
]
|
|
340
341
|
});
|
|
341
342
|
}
|
|
342
|
-
let re = /* @__PURE__ */
|
|
343
|
+
let re = /* @__PURE__ */ J("div", {
|
|
343
344
|
ref: D,
|
|
344
345
|
onDragEnter: () => {
|
|
345
346
|
j.current += 1, a || A(!0);
|
|
@@ -362,19 +363,19 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
362
363
|
className: Q("flex flex-col items-center justify-center text-center gap-2 px-6 py-8 rounded-lg border-2 border-dashed cursor-pointer transition-colors outline-none", M ? "border-red-300 bg-bg-danger-lighter" : k ? "border-brand-500 bg-brand-20" : "border-border-default bg-bg-container hover:bg-bg-subtle", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", a && "opacity-50 cursor-not-allowed", w),
|
|
363
364
|
...E,
|
|
364
365
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ q("div", {
|
|
366
367
|
className: "h-10 w-10 rounded-full bg-bg-default flex items-center justify-center text-fg-secondary shadow-z1",
|
|
367
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ q(V, { className: "h-5 w-5" })
|
|
368
369
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ J("div", {
|
|
370
371
|
className: "flex flex-col gap-0.5",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ J("p", {
|
|
372
373
|
className: "text-p-std text-fg-default",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
374
|
+
children: [/* @__PURE__ */ q("span", {
|
|
374
375
|
className: "font-semibold text-brand-700",
|
|
375
376
|
children: "Choose a file"
|
|
376
377
|
}), " or drag & drop it here."]
|
|
377
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ q("p", {
|
|
378
379
|
className: "text-p-sm text-fg-tertiary",
|
|
379
380
|
children: P
|
|
380
381
|
})]
|
|
@@ -382,7 +383,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
382
383
|
F
|
|
383
384
|
]
|
|
384
385
|
});
|
|
385
|
-
return !I && !L && !R ? re : /* @__PURE__ */
|
|
386
|
+
return !I && !L && !R ? re : /* @__PURE__ */ J("div", {
|
|
386
387
|
className: "flex flex-col gap-1.5",
|
|
387
388
|
children: [
|
|
388
389
|
I,
|
|
@@ -397,59 +398,59 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
397
398
|
error: "border-red-300 bg-bg-danger-lighter"
|
|
398
399
|
}, ft = a(function({ name: e, meta: t, status: n = "processing", progress: r = 0, errorText: i, onRetry: a, onRemove: o, onOpen: s, previewSrc: c, className: l, dataTestId: u, ...d }, f) {
|
|
399
400
|
let [p, g] = m(!1), _ = !!c && !p;
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ J("div", {
|
|
401
402
|
ref: f,
|
|
402
403
|
"data-test-id": u,
|
|
403
404
|
className: Q("flex items-start gap-3 px-3 py-2.5 rounded-lg border", dt[n], l),
|
|
404
405
|
...d,
|
|
405
406
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ q("div", {
|
|
407
408
|
className: Q("shrink-0 flex items-center justify-center h-9 w-9 rounded-md overflow-hidden", !_ && (n === "error" ? "bg-red-100 dark:bg-red-900/30 text-red-700" : "bg-bg-subtle text-fg-secondary")),
|
|
408
|
-
children: _ ? /* @__PURE__ */
|
|
409
|
+
children: _ ? /* @__PURE__ */ q("img", {
|
|
409
410
|
src: c,
|
|
410
411
|
alt: "",
|
|
411
412
|
className: "h-full w-full object-cover",
|
|
412
413
|
onError: () => g(!0)
|
|
413
|
-
}) : /* @__PURE__ */
|
|
414
|
+
}) : /* @__PURE__ */ q(ee, { className: "h-4 w-4" })
|
|
414
415
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ J("div", {
|
|
416
417
|
className: "flex-1 min-w-0",
|
|
417
418
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ J("div", {
|
|
419
420
|
className: "flex items-baseline justify-between gap-2",
|
|
420
|
-
children: [s ? /* @__PURE__ */
|
|
421
|
+
children: [s ? /* @__PURE__ */ q("button", {
|
|
421
422
|
type: "button",
|
|
422
423
|
onClick: s,
|
|
423
424
|
className: "truncate text-p-std font-medium text-fg-default text-left rounded-sm hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 min-w-0",
|
|
424
425
|
children: e
|
|
425
|
-
}) : /* @__PURE__ */
|
|
426
|
+
}) : /* @__PURE__ */ q("p", {
|
|
426
427
|
className: "truncate text-p-std font-medium text-fg-default",
|
|
427
428
|
children: e
|
|
428
|
-
}), /* @__PURE__ */
|
|
429
|
+
}), /* @__PURE__ */ J("div", {
|
|
429
430
|
className: "flex items-center gap-1 shrink-0",
|
|
430
|
-
children: [n === "completed" && /* @__PURE__ */
|
|
431
|
+
children: [n === "completed" && /* @__PURE__ */ q(x, {
|
|
431
432
|
className: "h-4 w-4 text-green-600",
|
|
432
433
|
"aria-label": "Completed"
|
|
433
|
-
}), n === "error" && /* @__PURE__ */
|
|
434
|
+
}), n === "error" && /* @__PURE__ */ q(h, {
|
|
434
435
|
className: "h-4 w-4 text-red-600",
|
|
435
436
|
"aria-label": "Failed"
|
|
436
437
|
})]
|
|
437
438
|
})]
|
|
438
439
|
}),
|
|
439
|
-
t && /* @__PURE__ */
|
|
440
|
+
t && /* @__PURE__ */ q("p", {
|
|
440
441
|
className: "text-p-sm text-fg-tertiary mt-0.5",
|
|
441
442
|
children: t
|
|
442
443
|
}),
|
|
443
|
-
n === "processing" && /* @__PURE__ */
|
|
444
|
+
n === "processing" && /* @__PURE__ */ q("div", {
|
|
444
445
|
className: "mt-2 h-1 w-full rounded-full bg-bg-subtle overflow-hidden",
|
|
445
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ q("div", {
|
|
446
447
|
className: "h-full bg-brand-500 transition-[width] duration-200",
|
|
447
448
|
style: { width: `${Math.min(100, Math.max(0, r))}%` }
|
|
448
449
|
})
|
|
449
450
|
}),
|
|
450
|
-
n === "error" && i && /* @__PURE__ */
|
|
451
|
+
n === "error" && i && /* @__PURE__ */ J("p", {
|
|
451
452
|
className: "text-p-sm text-red-700 mt-1",
|
|
452
|
-
children: [i, a && /* @__PURE__ */
|
|
453
|
+
children: [i, a && /* @__PURE__ */ q("button", {
|
|
453
454
|
type: "button",
|
|
454
455
|
onClick: a,
|
|
455
456
|
className: "ml-2 underline font-medium hover:no-underline",
|
|
@@ -458,12 +459,12 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
458
459
|
})
|
|
459
460
|
]
|
|
460
461
|
}),
|
|
461
|
-
o && /* @__PURE__ */
|
|
462
|
+
o && /* @__PURE__ */ q("button", {
|
|
462
463
|
type: "button",
|
|
463
464
|
onClick: o,
|
|
464
465
|
"aria-label": "Remove",
|
|
465
466
|
className: "shrink-0 p-1 rounded-md text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
466
|
-
children:
|
|
467
|
+
children: q(n === "completed" ? he : U, { className: "h-4 w-4" })
|
|
467
468
|
})
|
|
468
469
|
]
|
|
469
470
|
});
|
|
@@ -547,34 +548,34 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
547
548
|
let r = URL.createObjectURL(t);
|
|
548
549
|
T.current = r, S(r), b(!1), c?.(t);
|
|
549
550
|
}, D = x ?? e, O = !!D && !y, k = n ? vt(n) : "", A = n ? yt(n) : "bg-gray-300 dark:bg-gray-600";
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ J("span", {
|
|
551
552
|
ref: v,
|
|
552
553
|
"data-test-id": g,
|
|
553
554
|
className: Q("relative inline-flex shrink-0", h),
|
|
554
555
|
..._,
|
|
555
556
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ q("span", {
|
|
557
558
|
className: Q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", pt[r], a === "circle" ? "rounded-full" : "rounded-md", !O && A),
|
|
558
|
-
children: O ? /* @__PURE__ */
|
|
559
|
+
children: O ? /* @__PURE__ */ q("img", {
|
|
559
560
|
src: D,
|
|
560
561
|
alt: t ?? n ?? "",
|
|
561
562
|
onError: () => b(!0),
|
|
562
563
|
className: "h-full w-full object-cover"
|
|
563
|
-
}) : n ? k : o ?? /* @__PURE__ */
|
|
564
|
+
}) : n ? k : o ?? /* @__PURE__ */ q(H, { className: "h-1/2 w-1/2 text-white/90" })
|
|
564
565
|
}),
|
|
565
|
-
i && /* @__PURE__ */
|
|
566
|
+
i && /* @__PURE__ */ q("span", {
|
|
566
567
|
"aria-label": i,
|
|
567
568
|
className: Q("absolute bottom-0 rounded-full ring-2 ring-white", s ? "left-0" : "right-0", mt[r], ht[i])
|
|
568
569
|
}),
|
|
569
|
-
s && /* @__PURE__ */
|
|
570
|
+
s && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("button", {
|
|
570
571
|
type: "button",
|
|
571
572
|
onClick: (e) => {
|
|
572
573
|
e.stopPropagation(), C.current?.click();
|
|
573
574
|
},
|
|
574
575
|
"aria-label": "Change avatar image",
|
|
575
576
|
className: Q("absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full ring-2 ring-white bg-brand-500 text-white hover:bg-brand-600 transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", _t[r]),
|
|
576
|
-
children: /* @__PURE__ */
|
|
577
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ q(ae, { className: "h-1/2 w-1/2" })
|
|
578
|
+
}), /* @__PURE__ */ q("input", {
|
|
578
579
|
ref: C,
|
|
579
580
|
type: "file",
|
|
580
581
|
accept: u,
|
|
@@ -588,18 +589,18 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
588
589
|
});
|
|
589
590
|
}), xt = a(function({ size: e = "md", max: t, children: n, className: r, dataTestId: i, ...a }, o) {
|
|
590
591
|
let s = Array.isArray(n) ? n : [n], c = t === void 0 ? s : s.slice(0, t), l = t === void 0 ? 0 : s.length - t;
|
|
591
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ J("div", {
|
|
592
593
|
ref: o,
|
|
593
594
|
"data-test-id": i,
|
|
594
595
|
className: Q("inline-flex items-center", r),
|
|
595
596
|
...a,
|
|
596
|
-
children: [c.map((t, n) => /* @__PURE__ */
|
|
597
|
+
children: [c.map((t, n) => /* @__PURE__ */ q("div", {
|
|
597
598
|
className: Q("rounded-full ring-2 ring-white", n > 0 && gt[e]),
|
|
598
599
|
style: { zIndex: c.length - n },
|
|
599
600
|
children: t
|
|
600
|
-
}, n)), l > 0 && /* @__PURE__ */
|
|
601
|
+
}, n)), l > 0 && /* @__PURE__ */ q("div", {
|
|
601
602
|
className: Q("rounded-full ring-2 ring-white", gt[e]),
|
|
602
|
-
children: /* @__PURE__ */
|
|
603
|
+
children: /* @__PURE__ */ q(bt, {
|
|
603
604
|
size: e,
|
|
604
605
|
name: `+${l}`
|
|
605
606
|
})
|
|
@@ -655,7 +656,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
655
656
|
accent: "hover:brightness-90 active:brightness-80"
|
|
656
657
|
}, At = a(function({ variant: e = "neutral", appearance: t = "filled", size: n = "md", shape: r = "rounded", leftIcon: i, rightIcon: a, onDismiss: o, dot: s = !1, withDot: c = !1, disabled: l = !1, interactive: u = !1, className: d, children: f, dataTestId: p, onClick: m, onKeyDown: h, ...g }, _) {
|
|
657
658
|
let v = t === "filled" ? Et[e] : t === "outline" ? Dt[e] : Ot[e];
|
|
658
|
-
if (s) return /* @__PURE__ */
|
|
659
|
+
if (s) return /* @__PURE__ */ q("span", {
|
|
659
660
|
ref: _,
|
|
660
661
|
"data-test-id": p,
|
|
661
662
|
"aria-hidden": !g["aria-label"] || void 0,
|
|
@@ -664,7 +665,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
664
665
|
...g
|
|
665
666
|
});
|
|
666
667
|
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : Ct[n];
|
|
667
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ J("span", {
|
|
668
669
|
ref: _,
|
|
669
670
|
"data-test-id": p,
|
|
670
671
|
role: u ? "button" : void 0,
|
|
@@ -677,25 +678,25 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
677
678
|
className: Q("inline-flex items-center font-medium whitespace-nowrap select-none", St[n], b, v, y && Tt[n], u && !l && Q("cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", kt[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
|
|
678
679
|
...g,
|
|
679
680
|
children: [
|
|
680
|
-
c ? /* @__PURE__ */
|
|
681
|
+
c ? /* @__PURE__ */ q("span", {
|
|
681
682
|
className: Q("inline-block shrink-0 rounded-full", wt[n], Ot[e]),
|
|
682
683
|
"aria-hidden": !0
|
|
683
|
-
}) : i && /* @__PURE__ */
|
|
684
|
+
}) : i && /* @__PURE__ */ q("span", {
|
|
684
685
|
className: "inline-flex shrink-0",
|
|
685
686
|
children: i
|
|
686
687
|
}),
|
|
687
688
|
f,
|
|
688
|
-
a && !o && /* @__PURE__ */
|
|
689
|
+
a && !o && /* @__PURE__ */ q("span", {
|
|
689
690
|
className: "inline-flex shrink-0",
|
|
690
691
|
children: a
|
|
691
692
|
}),
|
|
692
|
-
o && /* @__PURE__ */
|
|
693
|
+
o && /* @__PURE__ */ q("button", {
|
|
693
694
|
type: "button",
|
|
694
695
|
onClick: o,
|
|
695
696
|
disabled: l,
|
|
696
697
|
"aria-label": "Dismiss",
|
|
697
698
|
className: "inline-flex shrink-0 -mr-0.5 rounded-full p-0.5 hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
698
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ q(U, { className: "h-3 w-3" })
|
|
699
700
|
})
|
|
700
701
|
]
|
|
701
702
|
});
|
|
@@ -704,35 +705,35 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
704
705
|
sm: "text-p-xs"
|
|
705
706
|
}, Mt = "rounded-sm text-fg-tertiary transition-colors hover:text-fg-secondary outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Nt = a(function({ items: e, currentValue: n, onSelect: r, separator: i = "/", size: a = "md", className: o, dataTestId: s, ...c }, l) {
|
|
706
707
|
let u = n ?? e[e.length - 1]?.value;
|
|
707
|
-
return /* @__PURE__ */
|
|
708
|
+
return /* @__PURE__ */ q("nav", {
|
|
708
709
|
ref: l,
|
|
709
710
|
"aria-label": "Breadcrumb",
|
|
710
711
|
"data-test-id": s,
|
|
711
712
|
className: Q(jt[a], o),
|
|
712
713
|
...c,
|
|
713
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ q("ol", {
|
|
714
715
|
className: "flex items-center",
|
|
715
716
|
children: e.map((e, n) => {
|
|
716
717
|
let a = e.value === u;
|
|
717
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ J(t, { children: [n > 0 && /* @__PURE__ */ q("li", {
|
|
718
719
|
"aria-hidden": "true",
|
|
719
720
|
className: "px-1.5 text-fg-tertiary",
|
|
720
721
|
children: i
|
|
721
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ q("li", {
|
|
722
723
|
className: "flex items-center",
|
|
723
|
-
children: a ? /* @__PURE__ */
|
|
724
|
+
children: a ? /* @__PURE__ */ q("span", {
|
|
724
725
|
"aria-current": "page",
|
|
725
726
|
className: "font-medium text-fg-default",
|
|
726
727
|
children: e.label
|
|
727
|
-
}) : e.disabled ? /* @__PURE__ */
|
|
728
|
+
}) : e.disabled ? /* @__PURE__ */ q("span", {
|
|
728
729
|
className: "cursor-not-allowed text-fg-disabled",
|
|
729
730
|
children: e.label
|
|
730
|
-
}) : e.href ? /* @__PURE__ */
|
|
731
|
+
}) : e.href ? /* @__PURE__ */ q("a", {
|
|
731
732
|
href: e.href,
|
|
732
733
|
onClick: () => r?.(e.value),
|
|
733
734
|
className: Mt,
|
|
734
735
|
children: e.label
|
|
735
|
-
}) : /* @__PURE__ */
|
|
736
|
+
}) : /* @__PURE__ */ q("button", {
|
|
736
737
|
type: "button",
|
|
737
738
|
onClick: () => r?.(e.value),
|
|
738
739
|
className: Mt,
|
|
@@ -746,7 +747,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
746
747
|
horizontal: "flex-row [&>*]:rounded-none [&>*:first-child]:rounded-l-lg [&>*:last-child]:rounded-r-lg [&>*:not(:first-child)]:-ml-px",
|
|
747
748
|
vertical: "flex-col [&>*]:rounded-none [&>*:first-child]:rounded-t-lg [&>*:last-child]:rounded-b-lg [&>*:not(:first-child)]:-mt-px"
|
|
748
749
|
}, Ft = a(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
749
|
-
return /* @__PURE__ */
|
|
750
|
+
return /* @__PURE__ */ q("div", {
|
|
750
751
|
ref: a,
|
|
751
752
|
role: "group",
|
|
752
753
|
"data-test-id": r,
|
|
@@ -765,21 +766,21 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
765
766
|
lg: "p-6"
|
|
766
767
|
}, Rt = a(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
767
768
|
let u = n || r;
|
|
768
|
-
return /* @__PURE__ */
|
|
769
|
+
return /* @__PURE__ */ J("div", {
|
|
769
770
|
ref: l,
|
|
770
771
|
"data-test-id": s,
|
|
771
772
|
className: Q("rounded-xl overflow-hidden", It[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && Lt[t], a),
|
|
772
773
|
...c,
|
|
773
774
|
children: [
|
|
774
|
-
n && /* @__PURE__ */
|
|
775
|
+
n && /* @__PURE__ */ q("div", {
|
|
775
776
|
className: Q("border-b border-border-subtle", Lt[t]),
|
|
776
777
|
children: n
|
|
777
778
|
}),
|
|
778
|
-
u ? /* @__PURE__ */
|
|
779
|
+
u ? /* @__PURE__ */ q("div", {
|
|
779
780
|
className: Lt[t],
|
|
780
781
|
children: o
|
|
781
782
|
}) : o,
|
|
782
|
-
r && /* @__PURE__ */
|
|
783
|
+
r && /* @__PURE__ */ q("div", {
|
|
783
784
|
className: Q("border-t border-border-subtle", Lt[t]),
|
|
784
785
|
children: r
|
|
785
786
|
})
|
|
@@ -793,20 +794,20 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
793
794
|
yellow: "bg-bg-warning-lighter text-yellow-900",
|
|
794
795
|
gray: "bg-bg-subtle text-fg-secondary"
|
|
795
796
|
}, Bt = a(function({ title: e, header: t, children: n, noDivider: r = !1, className: i, dataTestId: a, ...o }, s) {
|
|
796
|
-
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */
|
|
797
|
+
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */ q("div", {
|
|
797
798
|
className: Q("flex shrink-0 items-center justify-center text-center text-label-md font-bold", l ? Q("px-2 [writing-mode:vertical-rl]", c === "left" && "rotate-180") : "px-4 py-2", zt[e.color ?? "gray"]),
|
|
798
799
|
children: e.text
|
|
799
800
|
});
|
|
800
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ q(Rt, {
|
|
801
802
|
ref: s,
|
|
802
803
|
dataTestId: a,
|
|
803
804
|
variant: "outlined",
|
|
804
805
|
padding: "none",
|
|
805
806
|
className: i,
|
|
806
807
|
...o,
|
|
807
|
-
children: /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ J("div", {
|
|
808
809
|
className: Q("flex", l ? c === "right" ? "flex-row-reverse" : "flex-row" : "flex-col"),
|
|
809
|
-
children: [u, /* @__PURE__ */
|
|
810
|
+
children: [u, /* @__PURE__ */ J("div", {
|
|
810
811
|
className: Q("min-w-0 flex-1", !r && "[&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-border-default"),
|
|
811
812
|
children: [t, n]
|
|
812
813
|
})]
|
|
@@ -820,13 +821,13 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
820
821
|
sm: "h-3 w-3"
|
|
821
822
|
}, Wt = a(function({ size: e = "md", label: t, description: n, errorText: r, required: i, indeterminate: a = !1, error: o = !1, id: s, disabled: c, checked: l, defaultChecked: d, className: f, dataTestId: p, ...m }, h) {
|
|
822
823
|
let g = u(), _ = s ?? g, v = o || !!r, y = r ? `${_}-error` : void 0, x = Vt(p);
|
|
823
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ J("label", {
|
|
824
825
|
htmlFor: _,
|
|
825
826
|
"data-test-id": p,
|
|
826
827
|
className: Q("inline-flex items-center gap-2.5 group/checkbox", c ? "cursor-not-allowed opacity-60" : "cursor-pointer", f),
|
|
827
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ J("span", {
|
|
828
829
|
className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ q("input", {
|
|
830
831
|
ref: h,
|
|
831
832
|
id: _,
|
|
832
833
|
type: "checkbox",
|
|
@@ -841,28 +842,28 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
841
842
|
"aria-checked": a ? "mixed" : void 0,
|
|
842
843
|
"data-test-id": x("input"),
|
|
843
844
|
...m
|
|
844
|
-
}), /* @__PURE__ */
|
|
845
|
+
}), /* @__PURE__ */ q("span", {
|
|
845
846
|
className: Q("flex items-center justify-center border transition-colors", Ht[e], !a && "bg-bg-default", v ? "border-red-600" : a ? "border-brand-500" : "border-border-strong", !c && !a && (v ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !a && "peer-checked:bg-brand-500 peer-checked:border-brand-500", a && "bg-brand-500", c && !a && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !a && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
|
|
846
|
-
children:
|
|
847
|
+
children: q(a ? F : b, {
|
|
847
848
|
className: Q(Ut[e], "text-white"),
|
|
848
849
|
strokeWidth: 3,
|
|
849
850
|
"aria-hidden": !0
|
|
850
851
|
})
|
|
851
852
|
})]
|
|
852
|
-
}), (t || n || r) && /* @__PURE__ */
|
|
853
|
+
}), (t || n || r) && /* @__PURE__ */ J("span", {
|
|
853
854
|
className: "flex flex-col gap-0.5",
|
|
854
|
-
children: [t && /* @__PURE__ */
|
|
855
|
+
children: [t && /* @__PURE__ */ J("span", {
|
|
855
856
|
className: "text-p-std font-medium text-fg-default leading-tight inline-flex items-center gap-1",
|
|
856
|
-
children: [t, i && /* @__PURE__ */
|
|
857
|
+
children: [t, i && /* @__PURE__ */ q("span", {
|
|
857
858
|
className: "text-red-600",
|
|
858
859
|
"aria-hidden": !0,
|
|
859
860
|
children: "*"
|
|
860
861
|
})]
|
|
861
|
-
}), r ? /* @__PURE__ */
|
|
862
|
+
}), r ? /* @__PURE__ */ q("span", {
|
|
862
863
|
id: `${_}-error`,
|
|
863
864
|
className: "text-p-sm text-red-700 leading-snug",
|
|
864
865
|
children: r
|
|
865
|
-
}) : n && /* @__PURE__ */
|
|
866
|
+
}) : n && /* @__PURE__ */ q("span", {
|
|
866
867
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
867
868
|
children: n
|
|
868
869
|
})]
|
|
@@ -1001,7 +1002,7 @@ function Xt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1001
1002
|
"aria-haspopup": "dialog",
|
|
1002
1003
|
"aria-expanded": w
|
|
1003
1004
|
}), ne = v ?? (typeof document < "u" ? document.body : null);
|
|
1004
|
-
return /* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ J(K, { children: [N, w && ne && _e(/* @__PURE__ */ J("div", {
|
|
1005
1006
|
ref: Gt(D),
|
|
1006
1007
|
id: O,
|
|
1007
1008
|
role: "dialog",
|
|
@@ -1011,7 +1012,7 @@ function Xt({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1011
1012
|
"data-test-id": b,
|
|
1012
1013
|
style: A,
|
|
1013
1014
|
className: Q("fixed z-50 max-w-60 max-h-54 overflow-auto rounded-lg border border-border-default bg-bg-default p-3 text-fg-default shadow-z4", y),
|
|
1014
|
-
children: [e, h && /* @__PURE__ */
|
|
1015
|
+
children: [e, h && /* @__PURE__ */ q("span", {
|
|
1015
1016
|
"aria-hidden": !0,
|
|
1016
1017
|
style: j,
|
|
1017
1018
|
className: Q("absolute size-2 rotate-45 bg-bg-default", Yt[M])
|
|
@@ -1024,12 +1025,12 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1024
1025
|
let [f, h] = m(!1), g = p(null), _ = typeof navigator < "u" && typeof navigator.clipboard?.writeText == "function";
|
|
1025
1026
|
return l(() => () => {
|
|
1026
1027
|
g.current && clearTimeout(g.current);
|
|
1027
|
-
}, []), /* @__PURE__ */
|
|
1028
|
+
}, []), /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Xt, {
|
|
1028
1029
|
open: f,
|
|
1029
1030
|
content: t,
|
|
1030
1031
|
side: "top",
|
|
1031
1032
|
align: "center",
|
|
1032
|
-
children: /* @__PURE__ */
|
|
1033
|
+
children: /* @__PURE__ */ q(at, {
|
|
1033
1034
|
ref: d,
|
|
1034
1035
|
type: "button",
|
|
1035
1036
|
variant: "tertiary",
|
|
@@ -1044,9 +1045,9 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1044
1045
|
"aria-label": n,
|
|
1045
1046
|
dataTestId: c,
|
|
1046
1047
|
...u,
|
|
1047
|
-
children: f ? /* @__PURE__ */
|
|
1048
|
+
children: f ? /* @__PURE__ */ q(b, { className: "size-4" }) : i ?? /* @__PURE__ */ q(A, { className: "size-4" })
|
|
1048
1049
|
})
|
|
1049
|
-
}), /* @__PURE__ */
|
|
1050
|
+
}), /* @__PURE__ */ q("span", {
|
|
1050
1051
|
role: "status",
|
|
1051
1052
|
"aria-live": "polite",
|
|
1052
1053
|
className: "sr-only",
|
|
@@ -1070,41 +1071,41 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1070
1071
|
sm: "w-8"
|
|
1071
1072
|
}, nn = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, size: i = "md", leftIcon: a, rightIcon: o, leftAddon: s, rightAddon: c, error: l = !1, id: d, disabled: f, className: p, wrapperClassName: m, required: g, dataTestId: _, ...v }, y) {
|
|
1072
1073
|
let b = u(), x = d ?? b, S = r ? `${x}-error` : n ? `${x}-help` : void 0, C = l || !!r;
|
|
1073
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ J("div", {
|
|
1074
1075
|
className: Q("flex flex-col gap-1.5 w-full", m),
|
|
1075
1076
|
"data-test-id": _,
|
|
1076
1077
|
children: [
|
|
1077
|
-
(e || t) && /* @__PURE__ */
|
|
1078
|
+
(e || t) && /* @__PURE__ */ J("div", {
|
|
1078
1079
|
className: "flex items-center gap-1.5",
|
|
1079
|
-
children: [e && /* @__PURE__ */
|
|
1080
|
+
children: [e && /* @__PURE__ */ J("label", {
|
|
1080
1081
|
htmlFor: x,
|
|
1081
1082
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
1082
|
-
children: [e, g && /* @__PURE__ */
|
|
1083
|
+
children: [e, g && /* @__PURE__ */ q("span", {
|
|
1083
1084
|
className: "text-red-600",
|
|
1084
1085
|
"aria-hidden": !0,
|
|
1085
1086
|
children: "*"
|
|
1086
1087
|
})]
|
|
1087
|
-
}), t && /* @__PURE__ */
|
|
1088
|
+
}), t && /* @__PURE__ */ q("span", {
|
|
1088
1089
|
className: "inline-flex items-center gap-1",
|
|
1089
1090
|
children: t
|
|
1090
1091
|
})]
|
|
1091
1092
|
}),
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ J("div", {
|
|
1093
1094
|
className: Q("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", C ? "border-red-600" : "border-border-default", !f && !C && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", C ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed", Qt[i]),
|
|
1094
1095
|
children: [
|
|
1095
|
-
s && /* @__PURE__ */
|
|
1096
|
+
s && /* @__PURE__ */ q("span", {
|
|
1096
1097
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
|
|
1097
1098
|
children: s
|
|
1098
1099
|
}),
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
+
/* @__PURE__ */ J("div", {
|
|
1100
1101
|
className: "relative flex-1 min-w-0",
|
|
1101
1102
|
children: [
|
|
1102
|
-
a && /* @__PURE__ */
|
|
1103
|
+
a && /* @__PURE__ */ q("span", {
|
|
1103
1104
|
"aria-hidden": !0,
|
|
1104
1105
|
className: Q("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", tn[i]),
|
|
1105
1106
|
children: a
|
|
1106
1107
|
}),
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ q("input", {
|
|
1108
1109
|
ref: y,
|
|
1109
1110
|
id: x,
|
|
1110
1111
|
disabled: f,
|
|
@@ -1114,24 +1115,24 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1114
1115
|
className: Q("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ? $t[i] : "pl-3", o || C ? en[i] : "pr-3", p),
|
|
1115
1116
|
...v
|
|
1116
1117
|
}),
|
|
1117
|
-
(o || C) && /* @__PURE__ */
|
|
1118
|
+
(o || C) && /* @__PURE__ */ q("span", {
|
|
1118
1119
|
"aria-hidden": !0,
|
|
1119
1120
|
className: Q("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", tn[i], C ? "text-red-600" : "text-fg-secondary"),
|
|
1120
|
-
children: C ? /* @__PURE__ */
|
|
1121
|
+
children: C ? /* @__PURE__ */ q(h, { className: "h-4 w-4" }) : o
|
|
1121
1122
|
})
|
|
1122
1123
|
]
|
|
1123
1124
|
}),
|
|
1124
|
-
c && /* @__PURE__ */
|
|
1125
|
+
c && /* @__PURE__ */ q("span", {
|
|
1125
1126
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-l border-border-default rounded-r-lg whitespace-nowrap",
|
|
1126
1127
|
children: c
|
|
1127
1128
|
})
|
|
1128
1129
|
]
|
|
1129
1130
|
}),
|
|
1130
|
-
r ? /* @__PURE__ */
|
|
1131
|
+
r ? /* @__PURE__ */ q("p", {
|
|
1131
1132
|
id: `${x}-error`,
|
|
1132
1133
|
className: "text-p-sm text-red-700",
|
|
1133
1134
|
children: r
|
|
1134
|
-
}) : n ? /* @__PURE__ */
|
|
1135
|
+
}) : n ? /* @__PURE__ */ q("p", {
|
|
1135
1136
|
id: `${x}-help`,
|
|
1136
1137
|
className: "text-p-sm text-fg-secondary",
|
|
1137
1138
|
children: n
|
|
@@ -1147,7 +1148,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1147
1148
|
let t = Math.min(i, Math.max(r, e));
|
|
1148
1149
|
return y || x(t), n?.(t), t;
|
|
1149
1150
|
};
|
|
1150
|
-
return /* @__PURE__ */
|
|
1151
|
+
return /* @__PURE__ */ q(nn, {
|
|
1151
1152
|
ref: v,
|
|
1152
1153
|
type: "number",
|
|
1153
1154
|
min: r,
|
|
@@ -1173,21 +1174,21 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1173
1174
|
}
|
|
1174
1175
|
w(String(T(e)));
|
|
1175
1176
|
},
|
|
1176
|
-
leftAddon: /* @__PURE__ */
|
|
1177
|
+
leftAddon: /* @__PURE__ */ q("button", {
|
|
1177
1178
|
type: "button",
|
|
1178
1179
|
disabled: f || S <= r,
|
|
1179
1180
|
onClick: () => T(S - a),
|
|
1180
1181
|
"aria-label": "Decrease",
|
|
1181
1182
|
className: rn,
|
|
1182
|
-
children: /* @__PURE__ */
|
|
1183
|
+
children: /* @__PURE__ */ q(F, { className: "size-4" })
|
|
1183
1184
|
}),
|
|
1184
|
-
rightAddon: /* @__PURE__ */
|
|
1185
|
+
rightAddon: /* @__PURE__ */ q("button", {
|
|
1185
1186
|
type: "button",
|
|
1186
1187
|
disabled: f || S >= i,
|
|
1187
1188
|
onClick: () => T(S + a),
|
|
1188
1189
|
"aria-label": "Increase",
|
|
1189
1190
|
className: rn,
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1191
|
+
children: /* @__PURE__ */ q(ce, { className: "size-4" })
|
|
1191
1192
|
}),
|
|
1192
1193
|
className: Q("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
1193
1194
|
..._
|
|
@@ -1266,7 +1267,12 @@ function yn(e, t) {
|
|
|
1266
1267
|
for (; i.length % 7 != 0;) i.push(null);
|
|
1267
1268
|
return i;
|
|
1268
1269
|
}
|
|
1269
|
-
|
|
1270
|
+
function bn(e) {
|
|
1271
|
+
if (!e) return;
|
|
1272
|
+
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1273
|
+
return `${e.getFullYear()}-${t}-${n}`;
|
|
1274
|
+
}
|
|
1275
|
+
var xn = 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: h, required: g = !1, helperText: _, placeholder: v = "Select date", fullWidth: b = !1, disabled: x = !1, minDate: S, maxDate: T, excludeDates: E, filterDate: D, menuPlacement: O = "auto", error: k = !1, errorText: A, id: j, className: M, wrapperClassName: ee, dataTestId: te }, N) {
|
|
1270
1276
|
let ne = u(), P = j ?? ne, [F, I] = m(!1), [L, R] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [re, ie] = m(null), [ae, oe] = m(O === "top" ? "top" : "bottom"), se = p(null), ce = p(null), z = p(null), le = k || !!A, ue = A ? `${P}-error` : _ ? `${P}-help` : void 0;
|
|
1271
1277
|
l(() => {
|
|
1272
1278
|
x && I(!1);
|
|
@@ -1334,30 +1340,34 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1334
1340
|
monthNames: dn(e),
|
|
1335
1341
|
weekdayNames: pn(e, t)
|
|
1336
1342
|
};
|
|
1337
|
-
}, [s]), V = yn(L, pe), H = i ?? {
|
|
1343
|
+
}, [s]), V = yn(L, pe), H = Vt(te), W = i ?? {
|
|
1338
1344
|
start: null,
|
|
1339
1345
|
end: null
|
|
1340
|
-
},
|
|
1341
|
-
return /* @__PURE__ */
|
|
1346
|
+
}, G = W.end ?? re;
|
|
1347
|
+
return /* @__PURE__ */ J("div", {
|
|
1342
1348
|
ref: se,
|
|
1343
|
-
"data-test-id":
|
|
1349
|
+
"data-test-id": H("root"),
|
|
1344
1350
|
className: Q("flex flex-col gap-1.5", b && "w-full", ee),
|
|
1345
1351
|
children: [
|
|
1346
|
-
h && /* @__PURE__ */
|
|
1352
|
+
h && /* @__PURE__ */ J("label", {
|
|
1347
1353
|
htmlFor: P,
|
|
1348
1354
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
1349
|
-
children: [h, g && /* @__PURE__ */
|
|
1355
|
+
children: [h, g && /* @__PURE__ */ q("span", {
|
|
1350
1356
|
className: "text-red-600",
|
|
1351
1357
|
"aria-hidden": !0,
|
|
1352
1358
|
children: "*"
|
|
1353
1359
|
})]
|
|
1354
1360
|
}),
|
|
1355
|
-
/* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ J("div", {
|
|
1356
1362
|
ref: ce,
|
|
1357
1363
|
className: "relative",
|
|
1358
|
-
children: [/* @__PURE__ */
|
|
1364
|
+
children: [/* @__PURE__ */ J("button", {
|
|
1359
1365
|
ref: N,
|
|
1360
1366
|
id: P,
|
|
1367
|
+
"data-test-id": te,
|
|
1368
|
+
"data-value": r ? void 0 : bn(e),
|
|
1369
|
+
"data-from": r ? bn(i?.start) : void 0,
|
|
1370
|
+
"data-to": r ? bn(i?.end) : void 0,
|
|
1361
1371
|
type: "button",
|
|
1362
1372
|
disabled: x,
|
|
1363
1373
|
"aria-invalid": le || void 0,
|
|
@@ -1365,10 +1375,10 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1365
1375
|
"aria-describedby": ue,
|
|
1366
1376
|
onClick: () => I((e) => !e),
|
|
1367
1377
|
className: Q("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", le ? "border-red-600" : "border-border-default", !x && !le && "hover:border-border-strong", le ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", x && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", b ? "w-full min-w-0" : "min-w-[260px]", on[o], M),
|
|
1368
|
-
children: [/* @__PURE__ */
|
|
1378
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1369
1379
|
className: Q("flex-1 text-left truncate", x ? "text-fg-disabled" : B ? "text-fg-default" : "text-fg-tertiary"),
|
|
1370
1380
|
children: B || v
|
|
1371
|
-
}), n && B && !x ? /* @__PURE__ */
|
|
1381
|
+
}), n && B && !x ? /* @__PURE__ */ q("span", {
|
|
1372
1382
|
role: "button",
|
|
1373
1383
|
tabIndex: 0,
|
|
1374
1384
|
"aria-label": "Clear date",
|
|
@@ -1377,22 +1387,26 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1377
1387
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), fe(e));
|
|
1378
1388
|
},
|
|
1379
1389
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-bg-container",
|
|
1380
|
-
children: /* @__PURE__ */
|
|
1381
|
-
}) : /* @__PURE__ */
|
|
1382
|
-
}), F && /* @__PURE__ */
|
|
1390
|
+
children: /* @__PURE__ */ q(U, { className: "w-4 h-4 text-fg-secondary" })
|
|
1391
|
+
}) : /* @__PURE__ */ q(y, { className: Q("w-4 h-4", x ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
1392
|
+
}), F && /* @__PURE__ */ J("div", {
|
|
1383
1393
|
ref: z,
|
|
1394
|
+
"data-test-id": H("calendar"),
|
|
1384
1395
|
className: Q("absolute z-50 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]", ae === "top" ? "bottom-full mb-1" : "top-full mt-1"),
|
|
1385
|
-
children: [/* @__PURE__ */
|
|
1396
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1386
1397
|
className: "flex items-center justify-between mb-2",
|
|
1387
1398
|
children: [
|
|
1388
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ q("button", {
|
|
1389
1400
|
type: "button",
|
|
1390
1401
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1391
1402
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
|
|
1392
1403
|
"aria-label": "Previous month",
|
|
1393
|
-
|
|
1404
|
+
"data-test-id": H("prev-month"),
|
|
1405
|
+
children: /* @__PURE__ */ q(C, { className: "w-4 h-4" })
|
|
1394
1406
|
}),
|
|
1395
|
-
/* @__PURE__ */
|
|
1407
|
+
/* @__PURE__ */ J("div", {
|
|
1408
|
+
"data-test-id": H("month-label"),
|
|
1409
|
+
"data-month": `${L.getFullYear()}-${String(L.getMonth() + 1).padStart(2, "0")}`,
|
|
1396
1410
|
className: "text-p-md font-semibold text-fg-default",
|
|
1397
1411
|
children: [
|
|
1398
1412
|
me[L.getMonth()],
|
|
@@ -1400,47 +1414,50 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1400
1414
|
L.getFullYear()
|
|
1401
1415
|
]
|
|
1402
1416
|
}),
|
|
1403
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ q("button", {
|
|
1404
1418
|
type: "button",
|
|
1405
1419
|
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
1406
1420
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
|
|
1407
1421
|
"aria-label": "Next month",
|
|
1408
|
-
|
|
1422
|
+
"data-test-id": H("next-month"),
|
|
1423
|
+
children: /* @__PURE__ */ q(w, { className: "w-4 h-4" })
|
|
1409
1424
|
})
|
|
1410
1425
|
]
|
|
1411
|
-
}), /* @__PURE__ */
|
|
1426
|
+
}), /* @__PURE__ */ J("div", {
|
|
1412
1427
|
className: "grid grid-cols-7 gap-1 text-center",
|
|
1413
|
-
children: [he.map((e, t) => /* @__PURE__ */
|
|
1428
|
+
children: [he.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1414
1429
|
className: "text-p-xs text-fg-tertiary py-1",
|
|
1415
1430
|
children: e
|
|
1416
1431
|
}, t)), V.map((t, n) => {
|
|
1417
|
-
if (!t) return /* @__PURE__ */
|
|
1418
|
-
let i = _n(t, S, T, E, D), a = !r && hn(t, e ?? null), o = r && hn(t,
|
|
1419
|
-
return /* @__PURE__ */
|
|
1432
|
+
if (!t) return /* @__PURE__ */ q("div", {}, n);
|
|
1433
|
+
let i = _n(t, S, T, E, D), a = !r && hn(t, e ?? null), o = r && hn(t, W.start), s = r && hn(t, G), c = r && !!W.start && !!G && t > W.start && t < G, l = i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container";
|
|
1434
|
+
return /* @__PURE__ */ q("button", {
|
|
1420
1435
|
type: "button",
|
|
1421
1436
|
disabled: i,
|
|
1422
1437
|
"aria-disabled": i || void 0,
|
|
1423
|
-
|
|
1438
|
+
"data-test-id": H("day"),
|
|
1439
|
+
"data-date": bn(t),
|
|
1440
|
+
onMouseEnter: () => !i && r && W.start && !W.end && ie(t),
|
|
1424
1441
|
onClick: () => !i && de(t),
|
|
1425
|
-
className: Q("h-8 rounded-md text-p-sm font-medium",
|
|
1442
|
+
className: Q("h-8 rounded-md text-p-sm font-medium", l),
|
|
1426
1443
|
children: t.getDate()
|
|
1427
1444
|
}, n);
|
|
1428
1445
|
})]
|
|
1429
1446
|
})]
|
|
1430
1447
|
})]
|
|
1431
1448
|
}),
|
|
1432
|
-
A ? /* @__PURE__ */
|
|
1449
|
+
A ? /* @__PURE__ */ q("p", {
|
|
1433
1450
|
id: `${P}-error`,
|
|
1434
1451
|
className: "text-p-sm text-red-700",
|
|
1435
1452
|
children: A
|
|
1436
|
-
}) : _ ? /* @__PURE__ */
|
|
1453
|
+
}) : _ ? /* @__PURE__ */ q("p", {
|
|
1437
1454
|
id: `${P}-help`,
|
|
1438
1455
|
className: "text-p-sm text-fg-secondary",
|
|
1439
1456
|
children: _
|
|
1440
1457
|
}) : null
|
|
1441
1458
|
]
|
|
1442
1459
|
});
|
|
1443
|
-
}),
|
|
1460
|
+
}), Sn = {
|
|
1444
1461
|
brand: {
|
|
1445
1462
|
bg: "bg-bg-brand-lighter",
|
|
1446
1463
|
icon: "text-brand-700"
|
|
@@ -1477,7 +1494,7 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1477
1494
|
bg: "bg-bg-danger-lighter",
|
|
1478
1495
|
icon: "text-red-700"
|
|
1479
1496
|
}
|
|
1480
|
-
},
|
|
1497
|
+
}, Cn = {
|
|
1481
1498
|
sm: {
|
|
1482
1499
|
box: "h-8 w-8",
|
|
1483
1500
|
icon: "h-4 w-4",
|
|
@@ -1498,17 +1515,17 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1498
1515
|
icon: "h-7 w-7",
|
|
1499
1516
|
radius: "rounded-xl"
|
|
1500
1517
|
}
|
|
1501
|
-
},
|
|
1502
|
-
let c =
|
|
1503
|
-
return /* @__PURE__ */
|
|
1518
|
+
}, wn = a(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
|
|
1519
|
+
let c = Sn[t], l = Cn[n];
|
|
1520
|
+
return /* @__PURE__ */ q("div", {
|
|
1504
1521
|
ref: s,
|
|
1505
1522
|
"data-test-id": a,
|
|
1506
1523
|
"aria-hidden": !o["aria-label"] || void 0,
|
|
1507
1524
|
className: Q("inline-flex items-center justify-center shrink-0", l.box, r === "circle" ? "rounded-full" : l.radius, c.bg, i),
|
|
1508
1525
|
...o,
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1526
|
+
children: /* @__PURE__ */ q(e, { className: Q(l.icon, c.icon) })
|
|
1510
1527
|
});
|
|
1511
|
-
}),
|
|
1528
|
+
}), Tn = {
|
|
1512
1529
|
"h-xl": "text-h-xl",
|
|
1513
1530
|
"h-lg": "text-h-lg",
|
|
1514
1531
|
"h-md": "text-h-md",
|
|
@@ -1526,12 +1543,12 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1526
1543
|
"label-sm": "text-label-sm",
|
|
1527
1544
|
"label-xs": "text-label-xs",
|
|
1528
1545
|
"label-xxs": "text-label-xxs"
|
|
1529
|
-
},
|
|
1546
|
+
}, En = {
|
|
1530
1547
|
normal: "font-normal",
|
|
1531
1548
|
medium: "font-medium",
|
|
1532
1549
|
semibold: "font-semibold",
|
|
1533
1550
|
bold: "font-bold"
|
|
1534
|
-
},
|
|
1551
|
+
}, Dn = {
|
|
1535
1552
|
default: "text-fg-default",
|
|
1536
1553
|
secondary: "text-fg-secondary",
|
|
1537
1554
|
tertiary: "text-fg-tertiary",
|
|
@@ -1542,7 +1559,7 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1542
1559
|
success: "text-fg-success",
|
|
1543
1560
|
warning: "text-fg-warning",
|
|
1544
1561
|
danger: "text-fg-danger"
|
|
1545
|
-
},
|
|
1562
|
+
}, On = {
|
|
1546
1563
|
"h-xl": "h1",
|
|
1547
1564
|
"h-lg": "h1",
|
|
1548
1565
|
"h-md": "h2",
|
|
@@ -1560,18 +1577,18 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1560
1577
|
"label-sm": "span",
|
|
1561
1578
|
"label-xs": "span",
|
|
1562
1579
|
"label-xxs": "span"
|
|
1563
|
-
},
|
|
1564
|
-
return i(r ??
|
|
1580
|
+
}, kn = a(function({ variant: e = "p-std", weight: t, color: n = "default", as: r, truncate: a, clamp: o, style: s, className: c, children: l, dataTestId: u, ...d }, f) {
|
|
1581
|
+
return i(r ?? On[e], {
|
|
1565
1582
|
ref: f,
|
|
1566
1583
|
"data-test-id": u,
|
|
1567
|
-
className: Q(
|
|
1584
|
+
className: Q(Tn[e], t && En[t], Dn[n], a && "truncate", o && !a && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", c),
|
|
1568
1585
|
style: o && !a ? {
|
|
1569
1586
|
...s,
|
|
1570
1587
|
WebkitLineClamp: o
|
|
1571
1588
|
} : s,
|
|
1572
1589
|
...d
|
|
1573
1590
|
}, l);
|
|
1574
|
-
}),
|
|
1591
|
+
}), An = {
|
|
1575
1592
|
"en-US": {
|
|
1576
1593
|
mobile: {
|
|
1577
1594
|
title: "Mobile only",
|
|
@@ -1626,34 +1643,34 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1626
1643
|
description: "Այս էջը հասանելի է միայն մոբայլ և պլանշետ սարքերում։ Շարունակելու համար խնդրում ենք բացել այն ձեր հեռախոսում կամ պլանշետում։"
|
|
1627
1644
|
}
|
|
1628
1645
|
}
|
|
1629
|
-
},
|
|
1646
|
+
}, jn = {
|
|
1630
1647
|
mobile: B,
|
|
1631
1648
|
tablet: pe,
|
|
1632
1649
|
desktop: I,
|
|
1633
1650
|
"mobile-tablet": me
|
|
1634
|
-
},
|
|
1635
|
-
let u =
|
|
1636
|
-
return /* @__PURE__ */
|
|
1651
|
+
}, Mn = a(function({ type: e = "desktop", locale: t = "en-US", title: n, description: r, icon: i, fillHeight: a = !1, className: o, dataTestId: s, ...c }, l) {
|
|
1652
|
+
let u = An[t][e];
|
|
1653
|
+
return /* @__PURE__ */ J("div", {
|
|
1637
1654
|
ref: l,
|
|
1638
1655
|
"data-test-id": s,
|
|
1639
1656
|
className: Q("flex flex-col items-center justify-center text-center px-6 py-16", a && "h-full", o),
|
|
1640
1657
|
...c,
|
|
1641
1658
|
children: [
|
|
1642
|
-
i ?? /* @__PURE__ */
|
|
1643
|
-
icon:
|
|
1659
|
+
i ?? /* @__PURE__ */ q(wn, {
|
|
1660
|
+
icon: jn[e],
|
|
1644
1661
|
tone: "gray",
|
|
1645
1662
|
shape: "rounded",
|
|
1646
1663
|
size: "xl",
|
|
1647
1664
|
className: "rounded-2xl"
|
|
1648
1665
|
}),
|
|
1649
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ q(kn, {
|
|
1650
1667
|
as: "h3",
|
|
1651
1668
|
variant: "h-xs",
|
|
1652
1669
|
weight: "semibold",
|
|
1653
1670
|
className: "mt-6",
|
|
1654
1671
|
children: n ?? u.title
|
|
1655
1672
|
}),
|
|
1656
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ q(kn, {
|
|
1657
1674
|
variant: "p-md",
|
|
1658
1675
|
color: "secondary",
|
|
1659
1676
|
className: "mt-2 max-w-105",
|
|
@@ -1661,7 +1678,7 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1661
1678
|
})
|
|
1662
1679
|
]
|
|
1663
1680
|
});
|
|
1664
|
-
}),
|
|
1681
|
+
}), Nn = {
|
|
1665
1682
|
brand: "bg-brand-500",
|
|
1666
1683
|
blue: "bg-blue-500",
|
|
1667
1684
|
purple: "bg-purple-500",
|
|
@@ -1669,57 +1686,57 @@ var bn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1669
1686
|
yellow: "bg-yellow-500",
|
|
1670
1687
|
red: "bg-red-500",
|
|
1671
1688
|
gray: "bg-gray-400"
|
|
1672
|
-
},
|
|
1689
|
+
}, Pn = {
|
|
1673
1690
|
sm: "h-1",
|
|
1674
1691
|
lg: "h-2"
|
|
1675
|
-
},
|
|
1692
|
+
}, Fn = (e) => new Intl.NumberFormat().format(e), In = a(function({ segments: e, hideLegend: t = !1, formatValue: n = Fn, size: r = "lg", className: i, dataTestId: a, ...o }, s) {
|
|
1676
1693
|
let c = e.reduce((e, t) => e + t.value, 0);
|
|
1677
|
-
return /* @__PURE__ */
|
|
1694
|
+
return /* @__PURE__ */ J("div", {
|
|
1678
1695
|
ref: s,
|
|
1679
1696
|
"data-test-id": a,
|
|
1680
1697
|
className: Q("flex flex-col gap-3", i),
|
|
1681
1698
|
...o,
|
|
1682
|
-
children: [/* @__PURE__ */
|
|
1683
|
-
className: Q("flex w-full overflow-hidden rounded-full bg-bg-subtle",
|
|
1684
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1699
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1700
|
+
className: Q("flex w-full overflow-hidden rounded-full bg-bg-subtle", Pn[r]),
|
|
1701
|
+
children: e.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1685
1702
|
style: { flexBasis: `${c > 0 ? e.value / c * 100 : 0}%` },
|
|
1686
|
-
className: Q("transition-[flex-basis] duration-700 ease-out",
|
|
1703
|
+
className: Q("transition-[flex-basis] duration-700 ease-out", Nn[e.color])
|
|
1687
1704
|
}, t))
|
|
1688
|
-
}), !t && /* @__PURE__ */
|
|
1705
|
+
}), !t && /* @__PURE__ */ q("ul", {
|
|
1689
1706
|
className: "flex flex-col [&>li:not(:last-child)]:border-b [&>li:not(:last-child)]:border-border-default",
|
|
1690
|
-
children: e.filter((e) => !e.hideFromLegend).map((e, t) => /* @__PURE__ */
|
|
1707
|
+
children: e.filter((e) => !e.hideFromLegend).map((e, t) => /* @__PURE__ */ J("li", {
|
|
1691
1708
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
1692
|
-
children: [/* @__PURE__ */
|
|
1709
|
+
children: [/* @__PURE__ */ J("span", {
|
|
1693
1710
|
className: "flex min-w-0 items-center gap-2",
|
|
1694
|
-
children: [/* @__PURE__ */
|
|
1711
|
+
children: [/* @__PURE__ */ q("span", { className: Q("size-2 shrink-0 rounded-full", Nn[e.color]) }), /* @__PURE__ */ q("span", {
|
|
1695
1712
|
className: "truncate text-p-sm text-fg-tertiary",
|
|
1696
1713
|
children: e.label
|
|
1697
1714
|
})]
|
|
1698
|
-
}), /* @__PURE__ */
|
|
1715
|
+
}), /* @__PURE__ */ J("span", {
|
|
1699
1716
|
className: "shrink-0 text-p-sm text-fg-default tabular-nums",
|
|
1700
1717
|
children: [n(e.value), e.unit ? ` ${e.unit}` : ""]
|
|
1701
1718
|
})]
|
|
1702
1719
|
}, t))
|
|
1703
1720
|
})]
|
|
1704
1721
|
});
|
|
1705
|
-
}),
|
|
1722
|
+
}), Ln = {
|
|
1706
1723
|
fast: 150,
|
|
1707
1724
|
base: 200,
|
|
1708
1725
|
slow: 300
|
|
1709
1726
|
};
|
|
1710
|
-
function
|
|
1727
|
+
function Rn() {
|
|
1711
1728
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1712
1729
|
}
|
|
1713
1730
|
//#endregion
|
|
1714
1731
|
//#region src/lib/useMountTransition.ts
|
|
1715
|
-
function
|
|
1732
|
+
function zn(e, t) {
|
|
1716
1733
|
let [n, r] = m(e), [i, a] = m(e ? "entered" : "closed"), o = p(null), s = p(null);
|
|
1717
1734
|
return l(() => {
|
|
1718
1735
|
o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current), e ? (r(!0), a("entering"), s.current = requestAnimationFrame(() => {
|
|
1719
1736
|
s.current = requestAnimationFrame(() => a("entered"));
|
|
1720
1737
|
})) : (() => {
|
|
1721
1738
|
a((e) => e === "closed" ? "closed" : "exiting");
|
|
1722
|
-
let e =
|
|
1739
|
+
let e = Rn() ? 0 : t;
|
|
1723
1740
|
e === 0 ? (r(!1), a("closed")) : o.current = setTimeout(() => {
|
|
1724
1741
|
r(!1), a("closed");
|
|
1725
1742
|
}, e);
|
|
@@ -1733,28 +1750,28 @@ function Rn(e, t) {
|
|
|
1733
1750
|
}
|
|
1734
1751
|
//#endregion
|
|
1735
1752
|
//#region src/components/Drawer/Drawer.tsx
|
|
1736
|
-
var
|
|
1753
|
+
var Bn = {
|
|
1737
1754
|
sm: "w-[320px]",
|
|
1738
1755
|
md: "w-[420px]",
|
|
1739
1756
|
lg: "w-[560px]",
|
|
1740
1757
|
xl: "w-[720px]"
|
|
1741
|
-
},
|
|
1758
|
+
}, Vn = {
|
|
1742
1759
|
sm: "h-[240px]",
|
|
1743
1760
|
md: "h-[360px]",
|
|
1744
1761
|
lg: "h-[480px]",
|
|
1745
1762
|
xl: "h-[600px]"
|
|
1746
|
-
},
|
|
1763
|
+
}, Hn = {
|
|
1747
1764
|
right: "inset-y-0 right-0 border-l",
|
|
1748
1765
|
left: "inset-y-0 left-0 border-r",
|
|
1749
1766
|
top: "inset-x-0 top-0 border-b",
|
|
1750
1767
|
bottom: "inset-x-0 bottom-0 border-t"
|
|
1751
|
-
},
|
|
1768
|
+
}, Un = {
|
|
1752
1769
|
right: "translate-x-full",
|
|
1753
1770
|
left: "-translate-x-full",
|
|
1754
1771
|
top: "-translate-y-full",
|
|
1755
1772
|
bottom: "translate-y-full"
|
|
1756
|
-
},
|
|
1757
|
-
let _ = p(null), { mounted: v, state: y } =
|
|
1773
|
+
}, Wn = a(function({ open: e, onClose: t, side: n = "right", size: r = "md", title: i, description: a, children: o, footer: s, closeOnOverlayClick: c = !0, showClose: u = !0, animated: d = !0, headerActions: f, className: m, dataTestId: h }, g) {
|
|
1774
|
+
let _ = p(null), { mounted: v, state: y } = zn(e, d ? Ln.slow : 0), b = y === "entered";
|
|
1758
1775
|
if (l(() => {
|
|
1759
1776
|
if (!v) return;
|
|
1760
1777
|
let e = (e) => {
|
|
@@ -1770,8 +1787,8 @@ var zn = {
|
|
|
1770
1787
|
let t = document.activeElement;
|
|
1771
1788
|
return _.current?.focus(), () => t?.focus?.();
|
|
1772
1789
|
}, [e]), !v) return null;
|
|
1773
|
-
let x = n === "left" || n === "right", S = x ?
|
|
1774
|
-
return
|
|
1790
|
+
let x = n === "left" || n === "right", S = x ? Bn[r] : Vn[r];
|
|
1791
|
+
return _e(/* @__PURE__ */ J("div", {
|
|
1775
1792
|
role: "dialog",
|
|
1776
1793
|
"aria-modal": "true",
|
|
1777
1794
|
"aria-hidden": y === "exiting" || void 0,
|
|
@@ -1779,53 +1796,53 @@ var zn = {
|
|
|
1779
1796
|
"aria-describedby": a ? "drawer-desc" : void 0,
|
|
1780
1797
|
className: "fixed inset-0 z-50",
|
|
1781
1798
|
"data-test-id": h,
|
|
1782
|
-
children: [/* @__PURE__ */
|
|
1799
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1783
1800
|
className: Q("absolute inset-0 bg-black/50", d && "transition-opacity duration-200 motion-reduce:transition-none", b ? "opacity-100" : "opacity-0"),
|
|
1784
1801
|
onClick: () => c && t(),
|
|
1785
1802
|
"aria-hidden": !0
|
|
1786
|
-
}), /* @__PURE__ */
|
|
1803
|
+
}), /* @__PURE__ */ J("div", {
|
|
1787
1804
|
ref: Gt(g, _),
|
|
1788
1805
|
tabIndex: -1,
|
|
1789
|
-
className: Q("absolute bg-bg-default shadow-z5 outline-none flex flex-col",
|
|
1806
|
+
className: Q("absolute bg-bg-default shadow-z5 outline-none flex flex-col", Hn[n], x ? `${S} h-full max-w-full` : `${S} w-full max-h-full`, "border-border-default", d && "transition-transform duration-300 ease-out motion-reduce:transition-none will-change-transform", b ? "translate-x-0 translate-y-0" : Un[n], m),
|
|
1790
1807
|
children: [
|
|
1791
|
-
(i || u || f) && /* @__PURE__ */
|
|
1808
|
+
(i || u || f) && /* @__PURE__ */ J("div", {
|
|
1792
1809
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
|
|
1793
|
-
children: [/* @__PURE__ */
|
|
1810
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1794
1811
|
className: "flex-1 min-w-0",
|
|
1795
|
-
children: [i && /* @__PURE__ */
|
|
1812
|
+
children: [i && /* @__PURE__ */ q("h2", {
|
|
1796
1813
|
"data-test-id": h ? `${h}-drawer-title` : void 0,
|
|
1797
1814
|
className: "text-h-xs font-semibold text-fg-default",
|
|
1798
1815
|
children: i
|
|
1799
|
-
}), a && /* @__PURE__ */
|
|
1816
|
+
}), a && /* @__PURE__ */ q("p", {
|
|
1800
1817
|
"data-test-id": h ? `${h}-drawer-subtitle` : void 0,
|
|
1801
1818
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
1802
1819
|
children: a
|
|
1803
1820
|
})]
|
|
1804
|
-
}), /* @__PURE__ */
|
|
1821
|
+
}), /* @__PURE__ */ J("div", {
|
|
1805
1822
|
className: "flex items-center gap-1 shrink-0 -mr-2 -mt-2",
|
|
1806
|
-
children: [f, u && /* @__PURE__ */
|
|
1823
|
+
children: [f, u && /* @__PURE__ */ q("button", {
|
|
1807
1824
|
type: "button",
|
|
1808
1825
|
onClick: t,
|
|
1809
1826
|
"aria-label": "Close",
|
|
1810
1827
|
"data-test-id": h ? `${h}-drawer-close-button` : void 0,
|
|
1811
1828
|
className: "p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
1812
|
-
children: /* @__PURE__ */
|
|
1829
|
+
children: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
|
|
1813
1830
|
})]
|
|
1814
1831
|
})]
|
|
1815
1832
|
}),
|
|
1816
|
-
o && /* @__PURE__ */
|
|
1833
|
+
o && /* @__PURE__ */ q("div", {
|
|
1817
1834
|
className: "flex-1 overflow-y-auto px-6 py-4",
|
|
1818
1835
|
children: o
|
|
1819
1836
|
}),
|
|
1820
|
-
s && /* @__PURE__ */
|
|
1837
|
+
s && /* @__PURE__ */ q("div", {
|
|
1821
1838
|
className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container",
|
|
1822
1839
|
children: s
|
|
1823
1840
|
})
|
|
1824
1841
|
]
|
|
1825
1842
|
})]
|
|
1826
1843
|
}), document.body);
|
|
1827
|
-
}),
|
|
1828
|
-
function
|
|
1844
|
+
}), Gn = 8;
|
|
1845
|
+
function Kn({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "start", offset: a = 4, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1 }) {
|
|
1829
1846
|
let [l, u] = m({
|
|
1830
1847
|
style: {
|
|
1831
1848
|
position: "fixed",
|
|
@@ -1846,7 +1863,7 @@ function Gn({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "star
|
|
|
1846
1863
|
r === "bottom" && e < d.height + a && t > e ? m = "top" : r === "top" && t < d.height + a && e > t && (m = "bottom");
|
|
1847
1864
|
}
|
|
1848
1865
|
let h = m === "bottom" ? l.bottom + a : l.top - d.height - a, g = i === "end" ? l.right - d.width : l.left;
|
|
1849
|
-
s && (g = Math.min(Math.max(g,
|
|
1866
|
+
s && (g = Math.min(Math.max(g, Gn), p - d.width - Gn)), u({
|
|
1850
1867
|
style: {
|
|
1851
1868
|
position: "fixed",
|
|
1852
1869
|
top: h,
|
|
@@ -1876,16 +1893,16 @@ function Gn({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "star
|
|
|
1876
1893
|
}
|
|
1877
1894
|
//#endregion
|
|
1878
1895
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
1879
|
-
function
|
|
1896
|
+
function qn(e) {
|
|
1880
1897
|
return e == null ? null : e instanceof HTMLElement ? e : e.current;
|
|
1881
1898
|
}
|
|
1882
|
-
var
|
|
1883
|
-
function
|
|
1884
|
-
let e = c(
|
|
1899
|
+
var Jn = r(null);
|
|
1900
|
+
function Yn() {
|
|
1901
|
+
let e = c(Jn);
|
|
1885
1902
|
if (!e) throw Error("Dropdown parts must be used inside <DropdownMenu>");
|
|
1886
1903
|
return e;
|
|
1887
1904
|
}
|
|
1888
|
-
var
|
|
1905
|
+
var Xn = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r, anchorRef: i, className: a, dataTestId: o, ...s }, c) {
|
|
1889
1906
|
let [u, d] = m(t), f = n !== void 0, h = f ? n : u, g = p(null), _ = (e) => {
|
|
1890
1907
|
f || d(e), r?.(e);
|
|
1891
1908
|
};
|
|
@@ -1895,14 +1912,14 @@ var Yn = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r
|
|
|
1895
1912
|
e.key === "Escape" && _(!1);
|
|
1896
1913
|
};
|
|
1897
1914
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1898
|
-
}, [h]), /* @__PURE__ */
|
|
1915
|
+
}, [h]), /* @__PURE__ */ q(Jn.Provider, {
|
|
1899
1916
|
value: {
|
|
1900
1917
|
open: h,
|
|
1901
1918
|
setOpen: _,
|
|
1902
1919
|
triggerRef: g,
|
|
1903
1920
|
anchorRef: i
|
|
1904
1921
|
},
|
|
1905
|
-
children: /* @__PURE__ */
|
|
1922
|
+
children: /* @__PURE__ */ q("div", {
|
|
1906
1923
|
ref: c,
|
|
1907
1924
|
"data-test-id": o,
|
|
1908
1925
|
className: Q("relative inline-block", a),
|
|
@@ -1911,8 +1928,8 @@ var Yn = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r
|
|
|
1911
1928
|
})
|
|
1912
1929
|
});
|
|
1913
1930
|
});
|
|
1914
|
-
function
|
|
1915
|
-
let { open: t, setOpen: r, triggerRef: i } =
|
|
1931
|
+
function Zn({ children: e }) {
|
|
1932
|
+
let { open: t, setOpen: r, triggerRef: i } = Yn();
|
|
1916
1933
|
if (!o(e)) return e;
|
|
1917
1934
|
let a = e.props ?? {};
|
|
1918
1935
|
return n(e, {
|
|
@@ -1925,10 +1942,10 @@ function Xn({ children: e }) {
|
|
|
1925
1942
|
"aria-expanded": t
|
|
1926
1943
|
});
|
|
1927
1944
|
}
|
|
1928
|
-
var
|
|
1929
|
-
let { open: _, setOpen: v, triggerRef: y, anchorRef: b } =
|
|
1945
|
+
var Qn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", $n = a(function({ children: e, align: t = "start", strategy: n = "fixed", side: r = "bottom", sideOffset: i = 4, flip: a = !0, shift: o = !0, matchTriggerWidth: s = !1, closeOnScroll: c = !1, className: u, dataTestId: d, ...h }, g) {
|
|
1946
|
+
let { open: _, setOpen: v, triggerRef: y, anchorRef: b } = Yn(), x = p(null), [S, C] = m(null), { style: w, resolvedSide: T } = Kn({
|
|
1930
1947
|
anchor: f(() => ({ get current() {
|
|
1931
|
-
return
|
|
1948
|
+
return qn(b) ?? y.current;
|
|
1932
1949
|
} }), [b, y]),
|
|
1933
1950
|
panel: S,
|
|
1934
1951
|
open: _ && n === "fixed",
|
|
@@ -1943,7 +1960,7 @@ var Zn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1943
1960
|
if (!_) return;
|
|
1944
1961
|
let e = (e) => {
|
|
1945
1962
|
let t = e.target;
|
|
1946
|
-
x.current?.contains(t) || y.current?.contains(t) ||
|
|
1963
|
+
x.current?.contains(t) || y.current?.contains(t) || qn(b)?.contains(t) || v(!1);
|
|
1947
1964
|
};
|
|
1948
1965
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1949
1966
|
}, [
|
|
@@ -1969,7 +1986,7 @@ var Zn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1969
1986
|
});
|
|
1970
1987
|
return () => cancelAnimationFrame(e);
|
|
1971
1988
|
}, [_]), !_) return null;
|
|
1972
|
-
let E = /* @__PURE__ */
|
|
1989
|
+
let E = /* @__PURE__ */ q("div", {
|
|
1973
1990
|
ref: Gt(g, x, n === "fixed" ? C : void 0),
|
|
1974
1991
|
role: "menu",
|
|
1975
1992
|
"data-test-id": d,
|
|
@@ -1982,14 +1999,14 @@ var Zn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1982
1999
|
e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1 + t.length) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Home" ? (e.preventDefault(), t[0]?.focus()) : e.key === "End" && (e.preventDefault(), t[t.length - 1]?.focus());
|
|
1983
2000
|
},
|
|
1984
2001
|
style: n === "fixed" ? w : void 0,
|
|
1985
|
-
className: Q(
|
|
2002
|
+
className: Q(Qn, n === "absolute" && Q("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), u),
|
|
1986
2003
|
...h,
|
|
1987
2004
|
children: e
|
|
1988
2005
|
});
|
|
1989
|
-
return n === "fixed" ?
|
|
1990
|
-
}),
|
|
1991
|
-
let { setOpen: p } =
|
|
1992
|
-
return /* @__PURE__ */
|
|
2006
|
+
return n === "fixed" ? _e(E, document.body) : E;
|
|
2007
|
+
}), er = a(function({ children: e, onSelect: t, disabled: n, icon: r, shortcut: i, destructive: a, checked: o, meta: s, className: c, dataTestId: l, onClick: u, ...d }, f) {
|
|
2008
|
+
let { setOpen: p } = Yn();
|
|
2009
|
+
return /* @__PURE__ */ J("button", {
|
|
1993
2010
|
ref: f,
|
|
1994
2011
|
type: "button",
|
|
1995
2012
|
role: "menuitem",
|
|
@@ -2001,95 +2018,95 @@ var Zn = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2001
2018
|
className: Q("flex w-full gap-2 px-3 py-2 text-left text-p-std text-fg-default", s ? "items-start" : "items-center", "hover:bg-bg-subtle focus-visible:outline-none focus-visible:bg-bg-subtle", n && "opacity-50 cursor-not-allowed hover:bg-transparent", a && "text-red-700 hover:bg-red-50", c),
|
|
2002
2019
|
...d,
|
|
2003
2020
|
children: [
|
|
2004
|
-
o !== void 0 && /* @__PURE__ */
|
|
2021
|
+
o !== void 0 && /* @__PURE__ */ q("span", {
|
|
2005
2022
|
className: "w-4 shrink-0",
|
|
2006
|
-
children: o && /* @__PURE__ */
|
|
2023
|
+
children: o && /* @__PURE__ */ q(b, { className: "h-4 w-4 text-brand-500" })
|
|
2007
2024
|
}),
|
|
2008
|
-
r && /* @__PURE__ */
|
|
2025
|
+
r && /* @__PURE__ */ q("span", {
|
|
2009
2026
|
className: "inline-flex shrink-0 text-fg-secondary",
|
|
2010
2027
|
children: r
|
|
2011
2028
|
}),
|
|
2012
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ J("span", {
|
|
2013
2030
|
className: "flex-1 min-w-0 text-left",
|
|
2014
|
-
children: [/* @__PURE__ */
|
|
2031
|
+
children: [/* @__PURE__ */ q("span", {
|
|
2015
2032
|
className: "block truncate",
|
|
2016
2033
|
children: e
|
|
2017
|
-
}), s && /* @__PURE__ */
|
|
2034
|
+
}), s && /* @__PURE__ */ q("span", {
|
|
2018
2035
|
className: "block truncate text-p-sm text-fg-tertiary",
|
|
2019
2036
|
children: s
|
|
2020
2037
|
})]
|
|
2021
2038
|
}),
|
|
2022
|
-
i && /* @__PURE__ */
|
|
2039
|
+
i && /* @__PURE__ */ q("span", {
|
|
2023
2040
|
className: "text-p-sm text-fg-tertiary shrink-0 tabular-nums",
|
|
2024
2041
|
children: i
|
|
2025
2042
|
})
|
|
2026
2043
|
]
|
|
2027
2044
|
});
|
|
2028
|
-
}),
|
|
2029
|
-
return /* @__PURE__ */
|
|
2045
|
+
}), tr = a(function({ className: e, dataTestId: t, ...n }, r) {
|
|
2046
|
+
return /* @__PURE__ */ q("div", {
|
|
2030
2047
|
ref: r,
|
|
2031
2048
|
role: "separator",
|
|
2032
2049
|
"data-test-id": t,
|
|
2033
2050
|
className: Q("my-1 h-px bg-border-default", e),
|
|
2034
2051
|
...n
|
|
2035
2052
|
});
|
|
2036
|
-
}),
|
|
2037
|
-
return /* @__PURE__ */
|
|
2053
|
+
}), nr = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
|
|
2054
|
+
return /* @__PURE__ */ q("div", {
|
|
2038
2055
|
ref: i,
|
|
2039
2056
|
"data-test-id": n,
|
|
2040
2057
|
className: Q("px-3 py-1.5 text-p-xs font-semibold uppercase tracking-wider text-fg-tertiary", t),
|
|
2041
2058
|
...r,
|
|
2042
2059
|
children: e
|
|
2043
2060
|
});
|
|
2044
|
-
}),
|
|
2061
|
+
}), rr = {
|
|
2045
2062
|
lg: "py-20 px-6 gap-2",
|
|
2046
2063
|
sm: "py-10 px-4 gap-1"
|
|
2047
|
-
},
|
|
2064
|
+
}, ir = {
|
|
2048
2065
|
lg: "xl",
|
|
2049
2066
|
sm: "lg"
|
|
2050
|
-
},
|
|
2051
|
-
return /* @__PURE__ */
|
|
2067
|
+
}, ar = a(function({ size: e = "lg", title: t, description: n, illustration: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
2068
|
+
return /* @__PURE__ */ J("div", {
|
|
2052
2069
|
ref: c,
|
|
2053
2070
|
"data-test-id": o,
|
|
2054
|
-
className: Q("flex flex-col items-center justify-center text-center",
|
|
2071
|
+
className: Q("flex flex-col items-center justify-center text-center", rr[e], a),
|
|
2055
2072
|
...s,
|
|
2056
2073
|
children: [
|
|
2057
|
-
r ?? /* @__PURE__ */
|
|
2074
|
+
r ?? /* @__PURE__ */ q(wn, {
|
|
2058
2075
|
icon: ue,
|
|
2059
2076
|
tone: "gray",
|
|
2060
2077
|
shape: "circle",
|
|
2061
|
-
size:
|
|
2078
|
+
size: ir[e]
|
|
2062
2079
|
}),
|
|
2063
|
-
t && /* @__PURE__ */
|
|
2080
|
+
t && /* @__PURE__ */ q(kn, {
|
|
2064
2081
|
as: "h3",
|
|
2065
2082
|
variant: e === "lg" ? "h-sm" : "h-xs",
|
|
2066
2083
|
weight: "semibold",
|
|
2067
2084
|
className: "mt-2",
|
|
2068
2085
|
children: t
|
|
2069
2086
|
}),
|
|
2070
|
-
n && /* @__PURE__ */
|
|
2087
|
+
n && /* @__PURE__ */ q(kn, {
|
|
2071
2088
|
variant: e === "lg" ? "p-sm" : "p-xs",
|
|
2072
2089
|
color: "secondary",
|
|
2073
2090
|
className: "max-w-sm",
|
|
2074
2091
|
children: n
|
|
2075
2092
|
}),
|
|
2076
|
-
i && /* @__PURE__ */
|
|
2093
|
+
i && /* @__PURE__ */ q("div", {
|
|
2077
2094
|
className: "mt-4",
|
|
2078
2095
|
children: i
|
|
2079
2096
|
})
|
|
2080
2097
|
]
|
|
2081
2098
|
});
|
|
2082
|
-
}),
|
|
2099
|
+
}), or = {
|
|
2083
2100
|
lg: "h-10 px-3 text-p-std gap-2",
|
|
2084
2101
|
md: "h-9 px-2.5 text-p-std gap-1.5",
|
|
2085
2102
|
sm: "h-8 px-2 text-p-sm gap-1.5"
|
|
2086
2103
|
};
|
|
2087
|
-
function
|
|
2104
|
+
function sr(...e) {
|
|
2088
2105
|
return (t) => {
|
|
2089
2106
|
for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
|
|
2090
2107
|
};
|
|
2091
2108
|
}
|
|
2092
|
-
var
|
|
2109
|
+
var cr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabled: i, onClear: a, children: o, className: s, dataTestId: c, ...u }, d) {
|
|
2093
2110
|
let [f, h] = m(!1), g = p(null);
|
|
2094
2111
|
l(() => {
|
|
2095
2112
|
if (!f) return;
|
|
@@ -2099,32 +2116,32 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2099
2116
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2100
2117
|
}, [f]);
|
|
2101
2118
|
let _ = n || t !== void 0;
|
|
2102
|
-
return /* @__PURE__ */
|
|
2103
|
-
ref:
|
|
2119
|
+
return /* @__PURE__ */ J("div", {
|
|
2120
|
+
ref: sr(d, g),
|
|
2104
2121
|
"data-test-id": c,
|
|
2105
2122
|
className: Q("relative inline-flex", s),
|
|
2106
2123
|
...u,
|
|
2107
|
-
children: [/* @__PURE__ */
|
|
2124
|
+
children: [/* @__PURE__ */ J("button", {
|
|
2108
2125
|
type: "button",
|
|
2109
2126
|
disabled: i,
|
|
2110
2127
|
onClick: () => h((e) => !e),
|
|
2111
2128
|
"aria-haspopup": "dialog",
|
|
2112
2129
|
"aria-expanded": f,
|
|
2113
|
-
className: Q("inline-flex items-center rounded-full border transition-colors outline-none",
|
|
2130
|
+
className: Q("inline-flex items-center rounded-full border transition-colors outline-none", or[r], _ ? "bg-brand-20 text-brand-800 border-brand-500" : "bg-bg-default text-fg-default border-border-default", !i && "hover:border-border-strong", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", i && "bg-bg-container text-fg-disabled cursor-not-allowed"),
|
|
2114
2131
|
children: [
|
|
2115
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ q("span", {
|
|
2116
2133
|
className: "font-medium",
|
|
2117
2134
|
children: e
|
|
2118
2135
|
}),
|
|
2119
|
-
t !== void 0 && /* @__PURE__ */
|
|
2136
|
+
t !== void 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("span", {
|
|
2120
2137
|
className: "mx-0.5 text-fg-tertiary",
|
|
2121
2138
|
"aria-hidden": !0,
|
|
2122
2139
|
children: "•"
|
|
2123
|
-
}), /* @__PURE__ */
|
|
2140
|
+
}), /* @__PURE__ */ q("span", {
|
|
2124
2141
|
className: "font-semibold truncate max-w-[140px]",
|
|
2125
2142
|
children: t
|
|
2126
2143
|
})] }),
|
|
2127
|
-
_ && a ? /* @__PURE__ */
|
|
2144
|
+
_ && a ? /* @__PURE__ */ q("span", {
|
|
2128
2145
|
role: "button",
|
|
2129
2146
|
tabIndex: 0,
|
|
2130
2147
|
"aria-label": "Clear filter",
|
|
@@ -2135,21 +2152,21 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2135
2152
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
|
|
2136
2153
|
},
|
|
2137
2154
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
|
|
2138
|
-
children: /* @__PURE__ */
|
|
2139
|
-
}) : /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ q(U, { className: "h-3 w-3" })
|
|
2156
|
+
}) : /* @__PURE__ */ q(S, {
|
|
2140
2157
|
className: Q("h-4 w-4 text-fg-secondary transition-transform", f && "rotate-180"),
|
|
2141
2158
|
"aria-hidden": !0
|
|
2142
2159
|
})
|
|
2143
2160
|
]
|
|
2144
|
-
}), f && o && /* @__PURE__ */
|
|
2161
|
+
}), f && o && /* @__PURE__ */ q("div", {
|
|
2145
2162
|
className: "absolute left-0 top-full mt-1 min-w-[220px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 p-3",
|
|
2146
2163
|
children: o
|
|
2147
2164
|
})]
|
|
2148
2165
|
});
|
|
2149
|
-
}),
|
|
2150
|
-
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 } =
|
|
2166
|
+
}), lr = r(null), ur = 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) {
|
|
2167
|
+
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 } = be({
|
|
2151
2168
|
mode: a,
|
|
2152
|
-
resolver:
|
|
2169
|
+
resolver: xe(n),
|
|
2153
2170
|
defaultValues: r,
|
|
2154
2171
|
shouldFocusError: s,
|
|
2155
2172
|
shouldUnregister: o
|
|
@@ -2180,31 +2197,31 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2180
2197
|
dirtyFields: M,
|
|
2181
2198
|
submit: te
|
|
2182
2199
|
};
|
|
2183
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ q("form", {
|
|
2184
2201
|
ref: m,
|
|
2185
2202
|
id: c,
|
|
2186
2203
|
onSubmit: te,
|
|
2187
2204
|
"data-test-id": f,
|
|
2188
2205
|
className: Q("flex flex-col gap-4", t),
|
|
2189
2206
|
...p,
|
|
2190
|
-
children: /* @__PURE__ */
|
|
2207
|
+
children: /* @__PURE__ */ J(lr.Provider, {
|
|
2191
2208
|
value: N,
|
|
2192
|
-
children: [e, i && i.length > 0 && /* @__PURE__ */
|
|
2209
|
+
children: [e, i && i.length > 0 && /* @__PURE__ */ q("div", {
|
|
2193
2210
|
className: "flex items-center gap-3",
|
|
2194
2211
|
"data-test-id": f ? `${f}-buttons` : void 0,
|
|
2195
|
-
children: i.map((e, t) => /* @__PURE__ */
|
|
2212
|
+
children: i.map((e, t) => /* @__PURE__ */ q(at, { ...e }, t))
|
|
2196
2213
|
})]
|
|
2197
2214
|
})
|
|
2198
2215
|
});
|
|
2199
|
-
}),
|
|
2200
|
-
let s = c(
|
|
2216
|
+
}), dr = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
|
|
2217
|
+
let s = c(lr);
|
|
2201
2218
|
if (!s) throw Error("FormField must be rendered inside a FormContainer.");
|
|
2202
|
-
return /* @__PURE__ */
|
|
2219
|
+
return /* @__PURE__ */ q("div", {
|
|
2203
2220
|
ref: o,
|
|
2204
2221
|
className: Q(r),
|
|
2205
2222
|
"data-test-id": i,
|
|
2206
2223
|
...a,
|
|
2207
|
-
children: /* @__PURE__ */
|
|
2224
|
+
children: /* @__PURE__ */ q(ve, {
|
|
2208
2225
|
control: s.control,
|
|
2209
2226
|
name: e,
|
|
2210
2227
|
defaultValue: t,
|
|
@@ -2223,35 +2240,35 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2223
2240
|
})
|
|
2224
2241
|
})
|
|
2225
2242
|
});
|
|
2226
|
-
}),
|
|
2227
|
-
return /* @__PURE__ */
|
|
2243
|
+
}), fr = a(function({ icon: e, iconTone: t = "brand", label: n, value: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
2244
|
+
return /* @__PURE__ */ J("div", {
|
|
2228
2245
|
ref: c,
|
|
2229
2246
|
"data-test-id": o,
|
|
2230
2247
|
className: Q("flex items-start gap-3", a),
|
|
2231
2248
|
...s,
|
|
2232
2249
|
children: [
|
|
2233
|
-
/* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ q(wn, {
|
|
2234
2251
|
icon: e,
|
|
2235
2252
|
tone: t,
|
|
2236
2253
|
size: "md"
|
|
2237
2254
|
}),
|
|
2238
|
-
/* @__PURE__ */
|
|
2255
|
+
/* @__PURE__ */ J("div", {
|
|
2239
2256
|
className: "min-w-0 flex-1",
|
|
2240
|
-
children: [/* @__PURE__ */
|
|
2257
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2241
2258
|
className: "text-p-xs font-medium uppercase tracking-widest text-fg-tertiary",
|
|
2242
2259
|
children: n
|
|
2243
|
-
}), /* @__PURE__ */
|
|
2260
|
+
}), /* @__PURE__ */ q("div", {
|
|
2244
2261
|
className: "text-p-std font-semibold text-fg-default mt-1 break-words",
|
|
2245
2262
|
children: r
|
|
2246
2263
|
})]
|
|
2247
2264
|
}),
|
|
2248
|
-
i && /* @__PURE__ */
|
|
2265
|
+
i && /* @__PURE__ */ q("div", {
|
|
2249
2266
|
className: "shrink-0 flex items-center",
|
|
2250
2267
|
children: i
|
|
2251
2268
|
})
|
|
2252
2269
|
]
|
|
2253
2270
|
});
|
|
2254
|
-
}),
|
|
2271
|
+
}), pr = {
|
|
2255
2272
|
success: {
|
|
2256
2273
|
container: "bg-green-50 border-green-200",
|
|
2257
2274
|
iconColor: "text-green-600",
|
|
@@ -2265,7 +2282,7 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2265
2282
|
danger: {
|
|
2266
2283
|
container: "bg-red-50 border-red-200",
|
|
2267
2284
|
iconColor: "text-red-700",
|
|
2268
|
-
DefaultIcon:
|
|
2285
|
+
DefaultIcon: W
|
|
2269
2286
|
},
|
|
2270
2287
|
info: {
|
|
2271
2288
|
container: "bg-blue-50 border-blue-200",
|
|
@@ -2277,55 +2294,55 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2277
2294
|
iconColor: "text-purple-700",
|
|
2278
2295
|
DefaultIcon: de
|
|
2279
2296
|
}
|
|
2280
|
-
},
|
|
2281
|
-
let { container: u, iconColor: d, DefaultIcon: f } =
|
|
2282
|
-
return /* @__PURE__ */
|
|
2297
|
+
}, mr = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
2298
|
+
let { container: u, iconColor: d, DefaultIcon: f } = pr[e];
|
|
2299
|
+
return /* @__PURE__ */ J("div", {
|
|
2283
2300
|
ref: l,
|
|
2284
2301
|
role: "alert",
|
|
2285
2302
|
"data-test-id": s,
|
|
2286
2303
|
className: Q("flex gap-3 p-4 border rounded-lg", u, o),
|
|
2287
2304
|
...c,
|
|
2288
2305
|
children: [
|
|
2289
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ q("div", {
|
|
2290
2307
|
className: Q("flex-shrink-0 mt-0.5", d),
|
|
2291
|
-
children: a ?? /* @__PURE__ */
|
|
2308
|
+
children: a ?? /* @__PURE__ */ q(f, {
|
|
2292
2309
|
className: "h-5 w-5",
|
|
2293
2310
|
"aria-hidden": !0
|
|
2294
2311
|
})
|
|
2295
2312
|
}),
|
|
2296
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ J("div", {
|
|
2297
2314
|
className: "flex-1 min-w-0",
|
|
2298
2315
|
children: [
|
|
2299
|
-
t && /* @__PURE__ */
|
|
2316
|
+
t && /* @__PURE__ */ q("div", {
|
|
2300
2317
|
className: "text-p-std font-semibold text-fg-default mb-0.5",
|
|
2301
2318
|
children: t
|
|
2302
2319
|
}),
|
|
2303
|
-
n && /* @__PURE__ */
|
|
2320
|
+
n && /* @__PURE__ */ q("div", {
|
|
2304
2321
|
className: "text-p-std text-fg-secondary",
|
|
2305
2322
|
children: n
|
|
2306
2323
|
}),
|
|
2307
|
-
i && /* @__PURE__ */
|
|
2324
|
+
i && /* @__PURE__ */ q("div", {
|
|
2308
2325
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
2309
2326
|
children: i
|
|
2310
2327
|
})
|
|
2311
2328
|
]
|
|
2312
2329
|
}),
|
|
2313
|
-
r && /* @__PURE__ */
|
|
2330
|
+
r && /* @__PURE__ */ q("button", {
|
|
2314
2331
|
type: "button",
|
|
2315
2332
|
onClick: r,
|
|
2316
2333
|
"aria-label": "Dismiss",
|
|
2317
2334
|
className: "flex-shrink-0 -mr-1 -mt-1 p-1 rounded-md text-fg-secondary hover:text-fg-default hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
2318
|
-
children: /* @__PURE__ */
|
|
2335
|
+
children: /* @__PURE__ */ q(U, { className: "h-4 w-4" })
|
|
2319
2336
|
})
|
|
2320
2337
|
]
|
|
2321
2338
|
});
|
|
2322
|
-
}),
|
|
2339
|
+
}), hr = a(function({ variant: e = "p-std", weight: t, color: n = "brand", underline: r = "hover", leftIcon: i, rightIcon: a, truncate: o, className: s, children: c, dataTestId: l, target: u, rel: d, ...f }, p) {
|
|
2323
2340
|
let m = {
|
|
2324
2341
|
...f,
|
|
2325
2342
|
target: u,
|
|
2326
2343
|
rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
|
|
2327
2344
|
};
|
|
2328
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ J(kn, {
|
|
2329
2346
|
as: "a",
|
|
2330
2347
|
ref: p,
|
|
2331
2348
|
variant: e,
|
|
@@ -2336,24 +2353,24 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2336
2353
|
className: Q("inline-flex items-center gap-1 rounded-sm outline-none transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", r === "always" && "underline", r === "hover" && "hover:underline", s),
|
|
2337
2354
|
...m,
|
|
2338
2355
|
children: [
|
|
2339
|
-
i && /* @__PURE__ */
|
|
2356
|
+
i && /* @__PURE__ */ q("span", {
|
|
2340
2357
|
className: "inline-flex shrink-0",
|
|
2341
2358
|
children: i
|
|
2342
2359
|
}),
|
|
2343
2360
|
c,
|
|
2344
|
-
a && /* @__PURE__ */
|
|
2361
|
+
a && /* @__PURE__ */ q("span", {
|
|
2345
2362
|
className: "inline-flex shrink-0",
|
|
2346
2363
|
children: a
|
|
2347
2364
|
})
|
|
2348
2365
|
]
|
|
2349
2366
|
});
|
|
2350
|
-
}),
|
|
2367
|
+
}), gr = {
|
|
2351
2368
|
sm: "max-w-sm",
|
|
2352
2369
|
md: "max-w-md",
|
|
2353
2370
|
lg: "max-w-lg",
|
|
2354
2371
|
xl: "max-w-2xl",
|
|
2355
2372
|
"2xl": "max-w-4xl"
|
|
2356
|
-
},
|
|
2373
|
+
}, _r = a(function({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "md", closeOnOverlayClick: s = !0, showClose: c = !0, className: u, dataTestId: d }, f) {
|
|
2357
2374
|
let m = p(null);
|
|
2358
2375
|
return l(() => {
|
|
2359
2376
|
if (!e) return;
|
|
@@ -2369,87 +2386,87 @@ var sr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2369
2386
|
if (!e) return;
|
|
2370
2387
|
let t = document.activeElement;
|
|
2371
2388
|
return m.current?.focus(), () => t?.focus?.();
|
|
2372
|
-
}, [e]), e ?
|
|
2389
|
+
}, [e]), e ? _e(/* @__PURE__ */ J("div", {
|
|
2373
2390
|
role: "dialog",
|
|
2374
2391
|
"aria-modal": "true",
|
|
2375
2392
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
2376
2393
|
"aria-describedby": r ? "modal-desc" : void 0,
|
|
2377
2394
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2378
|
-
children: [/* @__PURE__ */
|
|
2395
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2379
2396
|
className: "absolute inset-0 bg-black/50",
|
|
2380
2397
|
onClick: () => s && t(),
|
|
2381
2398
|
"aria-hidden": !0
|
|
2382
|
-
}), /* @__PURE__ */
|
|
2399
|
+
}), /* @__PURE__ */ J("div", {
|
|
2383
2400
|
ref: Gt(m, f),
|
|
2384
2401
|
tabIndex: -1,
|
|
2385
2402
|
"data-test-id": d,
|
|
2386
|
-
className: Q("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]",
|
|
2403
|
+
className: Q("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", gr[o], u),
|
|
2387
2404
|
children: [
|
|
2388
|
-
(n || c) && /* @__PURE__ */
|
|
2405
|
+
(n || c) && /* @__PURE__ */ J("div", {
|
|
2389
2406
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4",
|
|
2390
|
-
children: [/* @__PURE__ */
|
|
2407
|
+
children: [/* @__PURE__ */ J("div", {
|
|
2391
2408
|
className: "flex-1 min-w-0",
|
|
2392
|
-
children: [n && /* @__PURE__ */
|
|
2409
|
+
children: [n && /* @__PURE__ */ q("h2", {
|
|
2393
2410
|
"data-test-id": d ? `${d}-modal-title` : void 0,
|
|
2394
2411
|
className: "text-h-xs font-semibold text-fg-default",
|
|
2395
2412
|
children: n
|
|
2396
|
-
}), r && /* @__PURE__ */
|
|
2413
|
+
}), r && /* @__PURE__ */ q("p", {
|
|
2397
2414
|
"data-test-id": d ? `${d}-modal-subtitle` : void 0,
|
|
2398
2415
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
2399
2416
|
children: r
|
|
2400
2417
|
})]
|
|
2401
|
-
}), c && /* @__PURE__ */
|
|
2418
|
+
}), c && /* @__PURE__ */ q("button", {
|
|
2402
2419
|
type: "button",
|
|
2403
2420
|
onClick: t,
|
|
2404
2421
|
"aria-label": "Close",
|
|
2405
2422
|
"data-test-id": d ? `${d}-modal-close-button` : void 0,
|
|
2406
2423
|
className: "-mr-2 -mt-2 p-2 rounded-md text-fg-secondary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
2407
|
-
children: /* @__PURE__ */
|
|
2424
|
+
children: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
|
|
2408
2425
|
})]
|
|
2409
2426
|
}),
|
|
2410
|
-
i && /* @__PURE__ */
|
|
2427
|
+
i && /* @__PURE__ */ q("div", {
|
|
2411
2428
|
className: "px-6 pb-6 overflow-y-auto",
|
|
2412
2429
|
children: i
|
|
2413
2430
|
}),
|
|
2414
|
-
a && /* @__PURE__ */
|
|
2431
|
+
a && /* @__PURE__ */ q("div", {
|
|
2415
2432
|
className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container rounded-b-xl",
|
|
2416
2433
|
children: a
|
|
2417
2434
|
})
|
|
2418
2435
|
]
|
|
2419
2436
|
})]
|
|
2420
2437
|
}), document.body) : null;
|
|
2421
|
-
}),
|
|
2438
|
+
}), vr = {
|
|
2422
2439
|
brand: "bg-brand-500 text-white",
|
|
2423
2440
|
danger: "bg-red-600 text-white",
|
|
2424
2441
|
success: "bg-green-600 text-white",
|
|
2425
2442
|
warning: "bg-yellow-600 text-gray-900 dark:text-gray-900",
|
|
2426
2443
|
info: "bg-blue-600 text-white"
|
|
2427
|
-
},
|
|
2444
|
+
}, yr = {
|
|
2428
2445
|
lg: "min-w-[18px] h-[18px] px-1 text-[11px]",
|
|
2429
2446
|
sm: "min-w-[14px] h-[14px] px-0.5 text-[10px]"
|
|
2430
|
-
},
|
|
2447
|
+
}, br = {
|
|
2431
2448
|
lg: "h-2.5 w-2.5",
|
|
2432
2449
|
sm: "h-1.5 w-1.5"
|
|
2433
2450
|
};
|
|
2434
|
-
function
|
|
2451
|
+
function xr(e, t) {
|
|
2435
2452
|
return e > t ? `${t}+` : e >= 1e3 ? `${(e / 1e3).toFixed(0)}K` : String(e);
|
|
2436
2453
|
}
|
|
2437
|
-
var
|
|
2438
|
-
let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */
|
|
2454
|
+
var Sr = a(function({ count: e = 0, max: t = 99, kind: n = "count", size: r = "lg", variant: i = "danger", children: a, showZero: o = !1, className: s, dataTestId: c, ...l }, u) {
|
|
2455
|
+
let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */ q("span", {
|
|
2439
2456
|
ref: u,
|
|
2440
2457
|
"data-test-id": c,
|
|
2441
|
-
className: Q("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white",
|
|
2458
|
+
className: Q("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white", vr[i], n === "count" ? yr[r] : br[r], f ? "absolute -top-1 -right-1" : "static", s),
|
|
2442
2459
|
...l,
|
|
2443
|
-
children: n === "count" &&
|
|
2460
|
+
children: n === "count" && xr(e, t)
|
|
2444
2461
|
}) : null;
|
|
2445
|
-
return f ? /* @__PURE__ */
|
|
2462
|
+
return f ? /* @__PURE__ */ J("span", {
|
|
2446
2463
|
className: "relative inline-flex",
|
|
2447
2464
|
children: [a, p]
|
|
2448
2465
|
}) : p;
|
|
2449
2466
|
});
|
|
2450
2467
|
//#endregion
|
|
2451
2468
|
//#region src/components/Pagination/Pagination.tsx
|
|
2452
|
-
function
|
|
2469
|
+
function Cr(e, t, n, r) {
|
|
2453
2470
|
if (t <= n * 2 + 3 + r * 2) return Array.from({ length: t }, (e, t) => t + 1);
|
|
2454
2471
|
let i = Math.max(e - n, r + 2), a = Math.min(e + n, t - r - 1), o = i > r + 2, s = a < t - r - 1, c = Array.from({ length: r }, (e, t) => t + 1), l = Array.from({ length: r }, (e, n) => t - r + 1 + n), u = [];
|
|
2455
2472
|
if (o) {
|
|
@@ -2464,52 +2481,53 @@ function Sr(e, t, n, r) {
|
|
|
2464
2481
|
...l
|
|
2465
2482
|
];
|
|
2466
2483
|
}
|
|
2467
|
-
var
|
|
2468
|
-
let u =
|
|
2469
|
-
return /* @__PURE__ */
|
|
2484
|
+
var wr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Tr = "text-fg-default hover:bg-bg-subtle disabled:text-fg-disabled disabled:hover:bg-transparent disabled:cursor-not-allowed", Er = a(function({ page: e, pageCount: t, onPageChange: n, siblingCount: r = 1, boundaryCount: i = 1, className: a, dataTestId: o, "aria-label": s, ...c }, l) {
|
|
2485
|
+
let u = Cr(e, t, r, i), d = e <= 1, f = e >= t, p = Vt(o);
|
|
2486
|
+
return /* @__PURE__ */ J("nav", {
|
|
2470
2487
|
ref: l,
|
|
2471
2488
|
"aria-label": s ?? "Pagination",
|
|
2472
|
-
"data-test-id":
|
|
2489
|
+
"data-test-id": p("pagination"),
|
|
2473
2490
|
className: Q("inline-flex items-center gap-1", a),
|
|
2474
2491
|
...c,
|
|
2475
2492
|
children: [
|
|
2476
|
-
/* @__PURE__ */
|
|
2493
|
+
/* @__PURE__ */ q("button", {
|
|
2477
2494
|
type: "button",
|
|
2478
2495
|
onClick: () => !d && n(e - 1),
|
|
2479
|
-
|
|
2496
|
+
disabled: d,
|
|
2497
|
+
"data-test-id": p("pagination-prev-page"),
|
|
2480
2498
|
"aria-label": "Previous page",
|
|
2481
|
-
className: Q(
|
|
2482
|
-
children: /* @__PURE__ */
|
|
2499
|
+
className: Q(wr, Tr),
|
|
2500
|
+
children: /* @__PURE__ */ q(C, { className: "h-4 w-4" })
|
|
2483
2501
|
}),
|
|
2484
2502
|
u.map((t, r) => {
|
|
2485
|
-
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */
|
|
2503
|
+
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ q("span", {
|
|
2486
2504
|
"aria-hidden": !0,
|
|
2487
2505
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2488
|
-
children: /* @__PURE__ */
|
|
2506
|
+
children: /* @__PURE__ */ q(R, { className: "h-4 w-4" })
|
|
2489
2507
|
}, `${t}-${r}`);
|
|
2490
2508
|
let i = t === e;
|
|
2491
|
-
return /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ q("button", {
|
|
2492
2510
|
type: "button",
|
|
2493
2511
|
onClick: () => n(t),
|
|
2494
2512
|
"aria-current": i ? "page" : void 0,
|
|
2495
|
-
"data-test-id": p("page-link"),
|
|
2513
|
+
"data-test-id": p("pagination-page-link"),
|
|
2496
2514
|
"data-page": t,
|
|
2497
|
-
className: Q(
|
|
2515
|
+
className: Q(wr, i ? "bg-brand-500 text-white font-semibold hover:bg-brand-600" : "text-fg-default hover:bg-bg-subtle"),
|
|
2498
2516
|
children: t
|
|
2499
2517
|
}, t);
|
|
2500
2518
|
}),
|
|
2501
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ q("button", {
|
|
2502
2520
|
type: "button",
|
|
2503
2521
|
onClick: () => !f && n(e + 1),
|
|
2504
2522
|
disabled: f,
|
|
2505
2523
|
"aria-label": "Next page",
|
|
2506
|
-
"data-test-id": p("next-page"),
|
|
2507
|
-
className: Q(
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2524
|
+
"data-test-id": p("pagination-next-page"),
|
|
2525
|
+
className: Q(wr, Tr),
|
|
2526
|
+
children: /* @__PURE__ */ q(w, { className: "h-4 w-4" })
|
|
2509
2527
|
})
|
|
2510
2528
|
]
|
|
2511
2529
|
});
|
|
2512
|
-
}),
|
|
2530
|
+
}), Dr = {
|
|
2513
2531
|
sm: {
|
|
2514
2532
|
padding: "px-3 py-2",
|
|
2515
2533
|
avatar: "sm",
|
|
@@ -2520,33 +2538,33 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2520
2538
|
avatar: "md",
|
|
2521
2539
|
gap: "gap-3"
|
|
2522
2540
|
}
|
|
2523
|
-
},
|
|
2541
|
+
}, Or = {
|
|
2524
2542
|
default: "border-border-default bg-bg-default hover:border-fg-tertiary/40",
|
|
2525
2543
|
highlight: "border-brand-500 bg-brand-200/15 dark:bg-brand-500/10 ring-1 ring-brand-500/40",
|
|
2526
2544
|
warning: "border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20"
|
|
2527
|
-
},
|
|
2528
|
-
let d =
|
|
2529
|
-
/* @__PURE__ */
|
|
2545
|
+
}, kr = a(function({ name: e, role: t, avatar: n, variant: r = "default", size: i = "md", badge: a, onClick: o, className: s, dataTestId: c, ...l }, u) {
|
|
2546
|
+
let d = Dr[i], f = Or[r], p = /* @__PURE__ */ J(K, { children: [
|
|
2547
|
+
/* @__PURE__ */ q(bt, {
|
|
2530
2548
|
src: n,
|
|
2531
2549
|
name: e,
|
|
2532
2550
|
size: d.avatar
|
|
2533
2551
|
}),
|
|
2534
|
-
/* @__PURE__ */
|
|
2552
|
+
/* @__PURE__ */ J("div", {
|
|
2535
2553
|
className: "min-w-0 flex-1",
|
|
2536
|
-
children: [/* @__PURE__ */
|
|
2554
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2537
2555
|
className: "text-p-std font-semibold text-fg-default truncate leading-tight",
|
|
2538
2556
|
children: e
|
|
2539
|
-
}), t && /* @__PURE__ */
|
|
2557
|
+
}), t && /* @__PURE__ */ q("div", {
|
|
2540
2558
|
className: "text-p-sm text-fg-secondary truncate mt-0.5 leading-tight",
|
|
2541
2559
|
children: t
|
|
2542
2560
|
})]
|
|
2543
2561
|
}),
|
|
2544
|
-
a && /* @__PURE__ */
|
|
2562
|
+
a && /* @__PURE__ */ q("span", {
|
|
2545
2563
|
className: "shrink-0 self-center",
|
|
2546
2564
|
children: a
|
|
2547
2565
|
})
|
|
2548
2566
|
] }), m = Q("relative inline-flex items-center rounded-xl border transition", d.padding, d.gap, f, o && "cursor-pointer hover:shadow-z1", s);
|
|
2549
|
-
return o ? /* @__PURE__ */
|
|
2567
|
+
return o ? /* @__PURE__ */ q("button", {
|
|
2550
2568
|
ref: u,
|
|
2551
2569
|
type: "button",
|
|
2552
2570
|
onClick: o,
|
|
@@ -2554,30 +2572,30 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2554
2572
|
className: Q(m, "text-left"),
|
|
2555
2573
|
...l,
|
|
2556
2574
|
children: p
|
|
2557
|
-
}) : /* @__PURE__ */
|
|
2575
|
+
}) : /* @__PURE__ */ q("div", {
|
|
2558
2576
|
ref: u,
|
|
2559
2577
|
"data-test-id": c,
|
|
2560
2578
|
className: m,
|
|
2561
2579
|
...l,
|
|
2562
2580
|
children: p
|
|
2563
2581
|
});
|
|
2564
|
-
}),
|
|
2582
|
+
}), Ar = {
|
|
2565
2583
|
sm: 29,
|
|
2566
2584
|
lg: 45
|
|
2567
|
-
},
|
|
2585
|
+
}, jr = {
|
|
2568
2586
|
sm: 2,
|
|
2569
2587
|
lg: 4
|
|
2570
|
-
},
|
|
2588
|
+
}, Mr = {
|
|
2571
2589
|
sm: "h-1",
|
|
2572
2590
|
lg: "h-2"
|
|
2573
|
-
},
|
|
2591
|
+
}, Nr = {
|
|
2574
2592
|
sm: "text-p-xs",
|
|
2575
2593
|
lg: "text-p-sm"
|
|
2576
|
-
},
|
|
2594
|
+
}, Pr = a(function({ variant: e = "linear", size: t = "lg", percent: n = 0, stepCount: r, currentStep: i, hideLabel: a = !1, dimension: o, loop: s = !1, className: c, dataTestId: l, ...u }, d) {
|
|
2577
2595
|
let f = r && i ? i / r * 100 : n, p = Math.min(100, Math.max(0, f)), m = r ? `${i}/${r}` : `${Math.round(p)}%`;
|
|
2578
2596
|
if (e === "circular") {
|
|
2579
|
-
let e = o ??
|
|
2580
|
-
return /* @__PURE__ */
|
|
2597
|
+
let e = o ?? Ar[t], n = e - 5, r = 2 * n * Math.PI, i = jr[t];
|
|
2598
|
+
return /* @__PURE__ */ J("div", {
|
|
2581
2599
|
ref: d,
|
|
2582
2600
|
role: "progressbar",
|
|
2583
2601
|
"aria-valuemin": 0,
|
|
@@ -2591,18 +2609,18 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2591
2609
|
height: e * 2
|
|
2592
2610
|
},
|
|
2593
2611
|
...u,
|
|
2594
|
-
children: [/* @__PURE__ */
|
|
2612
|
+
children: [/* @__PURE__ */ J("svg", {
|
|
2595
2613
|
width: e * 2,
|
|
2596
2614
|
height: e * 2,
|
|
2597
2615
|
viewBox: `0 0 ${e * 2} ${e * 2}`,
|
|
2598
2616
|
className: Q("-rotate-90", s && "animate-spin"),
|
|
2599
|
-
children: [/* @__PURE__ */
|
|
2617
|
+
children: [/* @__PURE__ */ q("circle", {
|
|
2600
2618
|
cx: e,
|
|
2601
2619
|
cy: e,
|
|
2602
2620
|
r: n,
|
|
2603
2621
|
strokeWidth: i,
|
|
2604
2622
|
className: "fill-none stroke-bg-subtle"
|
|
2605
|
-
}), /* @__PURE__ */
|
|
2623
|
+
}), /* @__PURE__ */ q("circle", {
|
|
2606
2624
|
cx: e,
|
|
2607
2625
|
cy: e,
|
|
2608
2626
|
r: n,
|
|
@@ -2614,14 +2632,14 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2614
2632
|
strokeDashoffset: s ? `${r * .75}px` : `${r - r * p / 100}px`
|
|
2615
2633
|
}
|
|
2616
2634
|
})]
|
|
2617
|
-
}), !a && !s && /* @__PURE__ */
|
|
2618
|
-
className: Q("absolute text-fg-secondary",
|
|
2635
|
+
}), !a && !s && /* @__PURE__ */ q("span", {
|
|
2636
|
+
className: Q("absolute text-fg-secondary", Nr[t]),
|
|
2619
2637
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2620
2638
|
children: m
|
|
2621
2639
|
})]
|
|
2622
2640
|
});
|
|
2623
2641
|
}
|
|
2624
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ J("div", {
|
|
2625
2643
|
ref: d,
|
|
2626
2644
|
role: "progressbar",
|
|
2627
2645
|
"aria-valuemin": 0,
|
|
@@ -2631,20 +2649,20 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2631
2649
|
"data-test-id": l,
|
|
2632
2650
|
className: Q("flex w-full items-center gap-2", c),
|
|
2633
2651
|
...u,
|
|
2634
|
-
children: [/* @__PURE__ */
|
|
2635
|
-
className: Q("w-full overflow-hidden rounded-full bg-bg-subtle",
|
|
2636
|
-
children: /* @__PURE__ */
|
|
2652
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2653
|
+
className: Q("w-full overflow-hidden rounded-full bg-bg-subtle", Mr[t]),
|
|
2654
|
+
children: /* @__PURE__ */ q("div", {
|
|
2637
2655
|
className: "h-full rounded-full bg-brand-500 transition-all duration-300 ease-linear",
|
|
2638
2656
|
style: { width: `${p}%` }
|
|
2639
2657
|
})
|
|
2640
|
-
}), !a && /* @__PURE__ */
|
|
2641
|
-
className: Q("shrink-0 text-fg-secondary",
|
|
2658
|
+
}), !a && /* @__PURE__ */ q("span", {
|
|
2659
|
+
className: Q("shrink-0 text-fg-secondary", Nr[t]),
|
|
2642
2660
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2643
2661
|
children: m
|
|
2644
2662
|
})]
|
|
2645
2663
|
});
|
|
2646
|
-
}),
|
|
2647
|
-
let v = u(), y = e ?? v, b = `${v}-label`, x = s || !!c, S = c ? `${v}-error` : l ? `${v}-help` : void 0, C = /* @__PURE__ */
|
|
2664
|
+
}), Fr = r(null), Ir = a(function({ name: e, label: t, value: n, defaultValue: r, onChange: i, disabled: a, required: o, error: s, errorText: c, helperText: l, size: d = "md", orientation: f = "vertical", children: p, className: m, wrapperClassName: h, dataTestId: g }, _) {
|
|
2665
|
+
let v = u(), y = e ?? v, b = `${v}-label`, x = s || !!c, S = c ? `${v}-error` : l ? `${v}-help` : void 0, C = /* @__PURE__ */ q("div", {
|
|
2648
2666
|
ref: _,
|
|
2649
2667
|
role: "radiogroup",
|
|
2650
2668
|
"aria-labelledby": t ? b : void 0,
|
|
@@ -2655,7 +2673,7 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2655
2673
|
className: Q("flex gap-3", f === "vertical" ? "flex-col" : "flex-row flex-wrap items-center gap-4", m),
|
|
2656
2674
|
children: p
|
|
2657
2675
|
});
|
|
2658
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ q(Fr.Provider, {
|
|
2659
2677
|
value: {
|
|
2660
2678
|
name: y,
|
|
2661
2679
|
value: n,
|
|
@@ -2665,24 +2683,24 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2665
2683
|
size: d,
|
|
2666
2684
|
error: x
|
|
2667
2685
|
},
|
|
2668
|
-
children: t || c || l ? /* @__PURE__ */
|
|
2686
|
+
children: t || c || l ? /* @__PURE__ */ J("div", {
|
|
2669
2687
|
className: Q("flex flex-col gap-1.5", h),
|
|
2670
2688
|
children: [
|
|
2671
|
-
t && /* @__PURE__ */
|
|
2689
|
+
t && /* @__PURE__ */ J("span", {
|
|
2672
2690
|
id: b,
|
|
2673
2691
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
2674
|
-
children: [t, o && /* @__PURE__ */
|
|
2692
|
+
children: [t, o && /* @__PURE__ */ q("span", {
|
|
2675
2693
|
className: "text-red-600",
|
|
2676
2694
|
"aria-hidden": !0,
|
|
2677
2695
|
children: "*"
|
|
2678
2696
|
})]
|
|
2679
2697
|
}),
|
|
2680
2698
|
C,
|
|
2681
|
-
c ? /* @__PURE__ */
|
|
2699
|
+
c ? /* @__PURE__ */ q("p", {
|
|
2682
2700
|
id: `${v}-error`,
|
|
2683
2701
|
className: "text-p-sm text-red-700",
|
|
2684
2702
|
children: c
|
|
2685
|
-
}) : l ? /* @__PURE__ */
|
|
2703
|
+
}) : l ? /* @__PURE__ */ q("p", {
|
|
2686
2704
|
id: `${v}-help`,
|
|
2687
2705
|
className: "text-p-sm text-fg-secondary",
|
|
2688
2706
|
children: l
|
|
@@ -2690,21 +2708,21 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2690
2708
|
]
|
|
2691
2709
|
}) : C
|
|
2692
2710
|
});
|
|
2693
|
-
}),
|
|
2711
|
+
}), Lr = {
|
|
2694
2712
|
md: "h-5 w-5",
|
|
2695
2713
|
sm: "h-4 w-4"
|
|
2696
|
-
},
|
|
2714
|
+
}, Rr = {
|
|
2697
2715
|
md: "h-2 w-2",
|
|
2698
2716
|
sm: "h-1.5 w-1.5"
|
|
2699
|
-
},
|
|
2700
|
-
let g = c(
|
|
2701
|
-
return /* @__PURE__ */
|
|
2717
|
+
}, zr = 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) {
|
|
2718
|
+
let g = c(Fr), _ = 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 ? Je(g.value, e) : void 0, w = S && g.defaultValue !== void 0 ? Je(g.defaultValue, e) : void 0, T = S ? C : s, E = S ? w : l;
|
|
2719
|
+
return /* @__PURE__ */ J("label", {
|
|
2702
2720
|
htmlFor: v,
|
|
2703
2721
|
"data-test-id": p,
|
|
2704
2722
|
className: Q("inline-flex items-center gap-2.5", b ? "cursor-not-allowed opacity-60" : "cursor-pointer", f),
|
|
2705
|
-
children: [/* @__PURE__ */
|
|
2723
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2706
2724
|
className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
|
|
2707
|
-
children: [/* @__PURE__ */
|
|
2725
|
+
children: [/* @__PURE__ */ q("input", {
|
|
2708
2726
|
ref: h,
|
|
2709
2727
|
id: v,
|
|
2710
2728
|
type: "radio",
|
|
@@ -2719,37 +2737,37 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2719
2737
|
className: "peer sr-only",
|
|
2720
2738
|
"aria-invalid": x || void 0,
|
|
2721
2739
|
...m
|
|
2722
|
-
}), /* @__PURE__ */
|
|
2723
|
-
className: Q("flex items-center justify-center rounded-full border bg-bg-default transition-colors",
|
|
2724
|
-
children: /* @__PURE__ */
|
|
2740
|
+
}), /* @__PURE__ */ q("span", {
|
|
2741
|
+
className: Q("flex items-center justify-center rounded-full border bg-bg-default transition-colors", Lr[y], x ? "border-red-600" : "border-border-strong", !b && !x && "peer-hover:border-fg-tertiary", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", "peer-checked:border-brand-500", b && "!bg-bg-subtle !border-border-default", "[&>span]:opacity-0 peer-checked:[&>span]:opacity-100"),
|
|
2742
|
+
children: /* @__PURE__ */ q("span", { className: Q("rounded-full bg-brand-500 transition-opacity", Rr[y], b && "!bg-fg-disabled") })
|
|
2725
2743
|
})]
|
|
2726
|
-
}), (n || r) && /* @__PURE__ */
|
|
2744
|
+
}), (n || r) && /* @__PURE__ */ J("span", {
|
|
2727
2745
|
className: "flex flex-col gap-0.5",
|
|
2728
|
-
children: [n && /* @__PURE__ */
|
|
2746
|
+
children: [n && /* @__PURE__ */ q("span", {
|
|
2729
2747
|
className: "text-p-std font-medium text-fg-default leading-tight",
|
|
2730
2748
|
children: n
|
|
2731
|
-
}), r && /* @__PURE__ */
|
|
2749
|
+
}), r && /* @__PURE__ */ q("span", {
|
|
2732
2750
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
2733
2751
|
children: r
|
|
2734
2752
|
})]
|
|
2735
2753
|
})]
|
|
2736
2754
|
});
|
|
2737
|
-
}),
|
|
2755
|
+
}), Br = a(function({ children: e, clamp: t = 3, collapsedContent: n, expandLabel: r = "Show more", collapseLabel: i = "Show less", defaultExpanded: a = !1, expanded: o, onExpandedChange: s, textProps: c, className: l, dataTestId: d, ...f }, p) {
|
|
2738
2756
|
let [h, g] = m(a), _ = o !== void 0, v = _ ? o : h, y = u(), b = () => {
|
|
2739
2757
|
let e = !v;
|
|
2740
2758
|
_ || g(e), s?.(e);
|
|
2741
2759
|
};
|
|
2742
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ J("div", {
|
|
2743
2761
|
ref: p,
|
|
2744
2762
|
"data-test-id": d,
|
|
2745
2763
|
className: Q("flex flex-col gap-1", l),
|
|
2746
2764
|
...f,
|
|
2747
|
-
children: [/* @__PURE__ */
|
|
2765
|
+
children: [/* @__PURE__ */ q(kn, {
|
|
2748
2766
|
id: y,
|
|
2749
2767
|
clamp: v ? void 0 : t,
|
|
2750
2768
|
...c,
|
|
2751
2769
|
children: v ? e : n ?? e
|
|
2752
|
-
}), /* @__PURE__ */
|
|
2770
|
+
}), /* @__PURE__ */ q("button", {
|
|
2753
2771
|
type: "button",
|
|
2754
2772
|
onClick: (e) => {
|
|
2755
2773
|
e.stopPropagation(), b();
|
|
@@ -2763,7 +2781,7 @@ var Cr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2763
2781
|
});
|
|
2764
2782
|
//#endregion
|
|
2765
2783
|
//#region src/components/SelectV2/useVisibleTagCount.ts
|
|
2766
|
-
function
|
|
2784
|
+
function Vr({ wrapperRef: e, measureRef: t, total: n, labelsKey: r, enabled: i }) {
|
|
2767
2785
|
let [a, o] = m(n);
|
|
2768
2786
|
return d(() => {
|
|
2769
2787
|
if (!i) return;
|
|
@@ -2807,7 +2825,7 @@ function Br({ wrapperRef: e, measureRef: t, total: n, labelsKey: r, enabled: i }
|
|
|
2807
2825
|
}
|
|
2808
2826
|
//#endregion
|
|
2809
2827
|
//#region src/components/SelectV2/SelectV2.i18n.ts
|
|
2810
|
-
var
|
|
2828
|
+
var Hr = {
|
|
2811
2829
|
"en-US": {
|
|
2812
2830
|
placeholder: "Select…",
|
|
2813
2831
|
noResults: "No results",
|
|
@@ -2835,23 +2853,23 @@ var Vr = {
|
|
|
2835
2853
|
createLabel: (e) => `Ստեղծել «${e}»`,
|
|
2836
2854
|
saveSelectionLabel: "Պահպանել ձևանմուշը"
|
|
2837
2855
|
}
|
|
2838
|
-
},
|
|
2856
|
+
}, Ur = {
|
|
2839
2857
|
lg: "min-h-12 text-p-md",
|
|
2840
2858
|
md: "min-h-10 text-p-std",
|
|
2841
2859
|
sm: "min-h-8 text-p-sm"
|
|
2842
|
-
},
|
|
2860
|
+
}, Wr = {
|
|
2843
2861
|
lg: "px-3.5 py-1.5",
|
|
2844
2862
|
md: "px-3 py-1",
|
|
2845
2863
|
sm: "px-2.5 py-0.5"
|
|
2846
|
-
},
|
|
2847
|
-
function
|
|
2864
|
+
}, Gr = "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full", Kr = "truncate text-p-sm text-fg-default", qr = "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer", Jr = "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";
|
|
2865
|
+
function Yr(e) {
|
|
2848
2866
|
return e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value));
|
|
2849
2867
|
}
|
|
2850
|
-
function
|
|
2868
|
+
function Xr(e, t) {
|
|
2851
2869
|
let n = t.trim().toLowerCase();
|
|
2852
|
-
return !n || `${
|
|
2870
|
+
return !n || `${Yr(e)} ${String(e.value)}`.toLowerCase().includes(n);
|
|
2853
2871
|
}
|
|
2854
|
-
function
|
|
2872
|
+
function Zr(e) {
|
|
2855
2873
|
try {
|
|
2856
2874
|
let t = window.localStorage.getItem(e);
|
|
2857
2875
|
return t === null ? void 0 : JSON.parse(t);
|
|
@@ -2859,34 +2877,34 @@ function Xr(e) {
|
|
|
2859
2877
|
return;
|
|
2860
2878
|
}
|
|
2861
2879
|
}
|
|
2862
|
-
function
|
|
2880
|
+
function Qr(e) {
|
|
2863
2881
|
try {
|
|
2864
2882
|
return window.localStorage.getItem(e) !== null;
|
|
2865
2883
|
} catch {
|
|
2866
2884
|
return !1;
|
|
2867
2885
|
}
|
|
2868
2886
|
}
|
|
2869
|
-
function
|
|
2887
|
+
function $r(e, t) {
|
|
2870
2888
|
try {
|
|
2871
2889
|
window.localStorage.setItem(e, JSON.stringify(t));
|
|
2872
2890
|
} catch {}
|
|
2873
2891
|
}
|
|
2874
|
-
function
|
|
2892
|
+
function ei(e) {
|
|
2875
2893
|
try {
|
|
2876
2894
|
window.localStorage.removeItem(e);
|
|
2877
2895
|
} catch {}
|
|
2878
2896
|
}
|
|
2879
|
-
function
|
|
2897
|
+
function ti(e, t, n) {
|
|
2880
2898
|
return {
|
|
2881
2899
|
container: () => "w-full",
|
|
2882
|
-
control: ({ isFocused: n, isDisabled: r }) => Q("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text",
|
|
2883
|
-
valueContainer: () => Q("flex flex-1 items-center gap-1 min-w-0 sv2-value-container", n ? "flex-nowrap! overflow-hidden" : "flex-wrap",
|
|
2900
|
+
control: ({ isFocused: n, isDisabled: r }) => Q("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text", Ur[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"),
|
|
2901
|
+
valueContainer: () => Q("flex flex-1 items-center gap-1 min-w-0 sv2-value-container", n ? "flex-nowrap! overflow-hidden" : "flex-wrap", Wr[e]),
|
|
2884
2902
|
placeholder: () => "text-fg-tertiary truncate",
|
|
2885
2903
|
singleValue: () => "text-fg-default truncate min-w-0",
|
|
2886
2904
|
input: () => "text-fg-default",
|
|
2887
|
-
multiValue: () =>
|
|
2888
|
-
multiValueLabel: () =>
|
|
2889
|
-
multiValueRemove: () =>
|
|
2905
|
+
multiValue: () => Gr,
|
|
2906
|
+
multiValueLabel: () => Kr,
|
|
2907
|
+
multiValueRemove: () => qr,
|
|
2890
2908
|
indicatorsContainer: () => "flex items-center gap-1 pr-2 shrink-0",
|
|
2891
2909
|
clearIndicator: () => "text-fg-secondary hover:text-fg-default cursor-pointer p-0.5",
|
|
2892
2910
|
dropdownIndicator: () => "text-fg-secondary p-0.5",
|
|
@@ -2903,95 +2921,99 @@ function ei(e, t, n) {
|
|
|
2903
2921
|
}
|
|
2904
2922
|
//#endregion
|
|
2905
2923
|
//#region src/components/SelectV2/SelectV2.tsx
|
|
2906
|
-
var
|
|
2907
|
-
function
|
|
2924
|
+
var ni = 36;
|
|
2925
|
+
function ri(e, t) {
|
|
2908
2926
|
let { dataTestId: n } = e;
|
|
2909
2927
|
return Vt(n)(t);
|
|
2910
2928
|
}
|
|
2911
|
-
function
|
|
2929
|
+
function ii(e, t) {
|
|
2912
2930
|
return {
|
|
2913
2931
|
...e,
|
|
2914
2932
|
"data-test-id": t
|
|
2915
2933
|
};
|
|
2916
2934
|
}
|
|
2917
|
-
function
|
|
2918
|
-
return /* @__PURE__ */
|
|
2935
|
+
function ai(e) {
|
|
2936
|
+
return /* @__PURE__ */ q(Y.Control, {
|
|
2919
2937
|
...e,
|
|
2920
|
-
innerProps:
|
|
2938
|
+
innerProps: ii(e.innerProps, ri(e.selectProps, "trigger"))
|
|
2921
2939
|
});
|
|
2922
2940
|
}
|
|
2923
|
-
function
|
|
2924
|
-
let t = { "data-test-id":
|
|
2925
|
-
return /* @__PURE__ */
|
|
2941
|
+
function oi(e) {
|
|
2942
|
+
let t = { "data-test-id": ri(e.selectProps, "search") };
|
|
2943
|
+
return /* @__PURE__ */ q(Y.Input, {
|
|
2926
2944
|
...e,
|
|
2927
2945
|
...t
|
|
2928
2946
|
});
|
|
2929
2947
|
}
|
|
2930
|
-
function
|
|
2931
|
-
return /* @__PURE__ */
|
|
2948
|
+
function si(e) {
|
|
2949
|
+
return /* @__PURE__ */ q(Y.DropdownIndicator, {
|
|
2932
2950
|
...e,
|
|
2933
|
-
children: /* @__PURE__ */
|
|
2951
|
+
children: /* @__PURE__ */ q(S, {
|
|
2934
2952
|
className: Q("h-4 w-4 transition-transform", e.selectProps.menuIsOpen && "rotate-180"),
|
|
2935
2953
|
"aria-hidden": !0
|
|
2936
2954
|
})
|
|
2937
2955
|
});
|
|
2938
2956
|
}
|
|
2939
|
-
function
|
|
2940
|
-
return /* @__PURE__ */
|
|
2957
|
+
function ci(e) {
|
|
2958
|
+
return /* @__PURE__ */ q(Y.ClearIndicator, {
|
|
2941
2959
|
...e,
|
|
2942
|
-
innerProps:
|
|
2943
|
-
children: /* @__PURE__ */
|
|
2960
|
+
innerProps: ii(e.innerProps, ri(e.selectProps, "clear")),
|
|
2961
|
+
children: /* @__PURE__ */ q(U, {
|
|
2944
2962
|
className: "h-3.5 w-3.5",
|
|
2945
2963
|
"aria-hidden": !0
|
|
2946
2964
|
})
|
|
2947
2965
|
});
|
|
2948
2966
|
}
|
|
2949
|
-
function
|
|
2950
|
-
return /* @__PURE__ */
|
|
2967
|
+
function li(e) {
|
|
2968
|
+
return /* @__PURE__ */ q(Y.MultiValueRemove, {
|
|
2951
2969
|
...e,
|
|
2952
|
-
|
|
2970
|
+
innerProps: {
|
|
2971
|
+
...e.innerProps,
|
|
2972
|
+
"aria-label": `Remove ${Yr(e.data)}`
|
|
2973
|
+
},
|
|
2974
|
+
children: /* @__PURE__ */ q(U, {
|
|
2953
2975
|
className: "h-3 w-3",
|
|
2954
2976
|
"aria-hidden": !0
|
|
2955
2977
|
})
|
|
2956
2978
|
});
|
|
2957
2979
|
}
|
|
2958
|
-
function
|
|
2980
|
+
function ui(e) {
|
|
2959
2981
|
let { visibleTagCount: t } = e.selectProps;
|
|
2960
|
-
return t === void 0 || e.index < t ? /* @__PURE__ */
|
|
2961
|
-
className:
|
|
2982
|
+
return t === void 0 || e.index < t ? /* @__PURE__ */ q(Y.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ J("span", {
|
|
2983
|
+
className: Jr,
|
|
2962
2984
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
2963
2985
|
}) : null;
|
|
2964
2986
|
}
|
|
2965
|
-
function
|
|
2966
|
-
return /* @__PURE__ */
|
|
2987
|
+
function di(e) {
|
|
2988
|
+
return /* @__PURE__ */ J(Y.Option, {
|
|
2967
2989
|
...e,
|
|
2968
|
-
innerProps:
|
|
2969
|
-
children: [e.children, e.isSelected && /* @__PURE__ */
|
|
2990
|
+
innerProps: ii(e.innerProps, ri(e.selectProps, `option-${String(e.data.value)}`)),
|
|
2991
|
+
children: [e.children, e.isSelected && /* @__PURE__ */ q(b, {
|
|
2970
2992
|
className: "h-4 w-4 text-fg-brand shrink-0",
|
|
2971
2993
|
"aria-hidden": !0
|
|
2972
2994
|
})]
|
|
2973
2995
|
});
|
|
2974
2996
|
}
|
|
2975
|
-
function
|
|
2976
|
-
return /* @__PURE__ */
|
|
2997
|
+
function fi() {
|
|
2998
|
+
return /* @__PURE__ */ q(ne, {
|
|
2977
2999
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
2978
3000
|
"aria-hidden": !0
|
|
2979
3001
|
});
|
|
2980
3002
|
}
|
|
2981
|
-
function
|
|
3003
|
+
function pi(e) {
|
|
2982
3004
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
2983
|
-
return /* @__PURE__ */
|
|
3005
|
+
return /* @__PURE__ */ J(Y.Menu, {
|
|
2984
3006
|
...e,
|
|
2985
|
-
innerProps:
|
|
3007
|
+
innerProps: ii(e.innerProps, ri(e.selectProps, "content")),
|
|
2986
3008
|
children: [
|
|
2987
|
-
t && /* @__PURE__ */
|
|
2988
|
-
"data-test-id":
|
|
3009
|
+
t && /* @__PURE__ */ q("div", {
|
|
3010
|
+
"data-test-id": ri(e.selectProps, "select-all"),
|
|
2989
3011
|
className: "border-b border-border-default px-3 py-2",
|
|
2990
3012
|
onMouseDown: (e) => e.preventDefault(),
|
|
2991
3013
|
onClick: (e) => {
|
|
2992
3014
|
e.preventDefault(), n?.();
|
|
2993
3015
|
},
|
|
2994
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ q(Wt, {
|
|
2995
3017
|
size: "sm",
|
|
2996
3018
|
checked: t.checked,
|
|
2997
3019
|
indeterminate: t.indeterminate,
|
|
@@ -3000,13 +3022,13 @@ function fi(e) {
|
|
|
3000
3022
|
})
|
|
3001
3023
|
}),
|
|
3002
3024
|
e.children,
|
|
3003
|
-
r && /* @__PURE__ */
|
|
3025
|
+
r && /* @__PURE__ */ q("div", {
|
|
3004
3026
|
className: "border-t border-border-default px-3 py-2",
|
|
3005
3027
|
onMouseDown: (e) => e.preventDefault(),
|
|
3006
3028
|
onClick: (e) => {
|
|
3007
3029
|
e.preventDefault(), i?.();
|
|
3008
3030
|
},
|
|
3009
|
-
children: /* @__PURE__ */
|
|
3031
|
+
children: /* @__PURE__ */ q(Wt, {
|
|
3010
3032
|
size: "sm",
|
|
3011
3033
|
checked: r.checked,
|
|
3012
3034
|
label: r.label,
|
|
@@ -3016,25 +3038,25 @@ function fi(e) {
|
|
|
3016
3038
|
]
|
|
3017
3039
|
});
|
|
3018
3040
|
}
|
|
3019
|
-
function
|
|
3020
|
-
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c =
|
|
3041
|
+
function mi(t) {
|
|
3042
|
+
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = Ee({
|
|
3021
3043
|
count: o.length,
|
|
3022
3044
|
getScrollElement: () => s.current,
|
|
3023
|
-
estimateSize: () =>
|
|
3045
|
+
estimateSize: () => ni,
|
|
3024
3046
|
overscan: 8
|
|
3025
3047
|
});
|
|
3026
|
-
return /* @__PURE__ */
|
|
3048
|
+
return /* @__PURE__ */ q("div", {
|
|
3027
3049
|
...i,
|
|
3028
3050
|
ref: Gt(r, s),
|
|
3029
3051
|
className: "overflow-y-auto py-1",
|
|
3030
3052
|
style: { maxHeight: a },
|
|
3031
|
-
children: /* @__PURE__ */
|
|
3053
|
+
children: /* @__PURE__ */ q("div", {
|
|
3032
3054
|
style: {
|
|
3033
3055
|
height: c.getTotalSize(),
|
|
3034
3056
|
position: "relative",
|
|
3035
3057
|
width: "100%"
|
|
3036
3058
|
},
|
|
3037
|
-
children: c.getVirtualItems().map((e) => /* @__PURE__ */
|
|
3059
|
+
children: c.getVirtualItems().map((e) => /* @__PURE__ */ q("div", {
|
|
3038
3060
|
style: {
|
|
3039
3061
|
position: "absolute",
|
|
3040
3062
|
top: 0,
|
|
@@ -3047,11 +3069,11 @@ function pi(t) {
|
|
|
3047
3069
|
})
|
|
3048
3070
|
});
|
|
3049
3071
|
}
|
|
3050
|
-
var
|
|
3051
|
-
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, helperText: x, errorText: S, error: C = !1, required: w = !0, loading: T = !1, clearable: E = !1, searchable: D, virtualized: O = !1, emptyText: k, locale: A = "en-US", storageKey: j, saveSelectionLabel: M, size: ee = "md", disabled: te = !1, id: N, className: ne, wrapperClassName: P, dataTestId: F, ...I } = e, L = e.isMulti ? !!e.singleLine : !1, R =
|
|
3072
|
+
var hi = a(function(e, t) {
|
|
3073
|
+
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, helperText: x, errorText: S, error: C = !1, required: w = !0, loading: T = !1, clearable: E = !1, searchable: D, virtualized: O = !1, emptyText: k, locale: A = "en-US", storageKey: j, saveSelectionLabel: M, size: ee = "md", disabled: te = !1, id: N, className: ne, wrapperClassName: P, dataTestId: F, ...I } = e, L = e.isMulti ? !!e.singleLine : !1, R = Hr[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(() => {
|
|
3052
3074
|
if (!d) {
|
|
3053
3075
|
if (j && !z) {
|
|
3054
|
-
let e =
|
|
3076
|
+
let e = Zr(j);
|
|
3055
3077
|
if (e !== void 0) return e;
|
|
3056
3078
|
}
|
|
3057
3079
|
return g;
|
|
@@ -3059,11 +3081,11 @@ var mi = a(function(e, t) {
|
|
|
3059
3081
|
}), [B, de] = m(() => {
|
|
3060
3082
|
if (!d) return [];
|
|
3061
3083
|
if (j && !z) {
|
|
3062
|
-
let e =
|
|
3084
|
+
let e = Zr(j);
|
|
3063
3085
|
if (Array.isArray(e)) return e;
|
|
3064
3086
|
}
|
|
3065
3087
|
return g ?? [];
|
|
3066
|
-
}), [fe, pe] = m(() => !!j &&
|
|
3088
|
+
}), [fe, pe] = m(() => !!j && Qr(j)), [me, he] = m(() => {
|
|
3067
3089
|
let e = /* @__PURE__ */ new Map();
|
|
3068
3090
|
for (let t of n) e.set(String(t.value), t);
|
|
3069
3091
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
@@ -3084,13 +3106,13 @@ var mi = a(function(e, t) {
|
|
|
3084
3106
|
let H = s((e) => me.get(String(e)) ?? {
|
|
3085
3107
|
value: e,
|
|
3086
3108
|
label: String(e)
|
|
3087
|
-
}, [me]),
|
|
3109
|
+
}, [me]), W = z ? h : le, G = f(() => (z ? h : B) ?? [], [
|
|
3088
3110
|
z,
|
|
3089
3111
|
h,
|
|
3090
3112
|
B
|
|
3091
|
-
]),
|
|
3113
|
+
]), ge = !d && W !== void 0 ? H(W) : null, K = d ? G.map(H) : [], _e = f(() => {
|
|
3092
3114
|
if (r) return (e) => Promise.resolve(r(e)).then((e) => (V(e), e));
|
|
3093
|
-
}, [r, V]),
|
|
3115
|
+
}, [r, V]), ve = s((e) => {
|
|
3094
3116
|
if (d) {
|
|
3095
3117
|
let t = [...e ?? []];
|
|
3096
3118
|
V(t);
|
|
@@ -3104,32 +3126,32 @@ var mi = a(function(e, t) {
|
|
|
3104
3126
|
d,
|
|
3105
3127
|
V,
|
|
3106
3128
|
_
|
|
3107
|
-
]),
|
|
3129
|
+
]), ye = s((e) => {
|
|
3108
3130
|
let t = {
|
|
3109
3131
|
value: e,
|
|
3110
3132
|
label: e
|
|
3111
3133
|
};
|
|
3112
3134
|
if (V([t]), o?.(e), d) {
|
|
3113
|
-
let e = [...
|
|
3135
|
+
let e = [...G, t.value];
|
|
3114
3136
|
de(e), _?.(e);
|
|
3115
3137
|
} else ue(t.value), _?.(t.value);
|
|
3116
3138
|
}, [
|
|
3117
3139
|
d,
|
|
3118
|
-
|
|
3140
|
+
G,
|
|
3119
3141
|
V,
|
|
3120
3142
|
_,
|
|
3121
3143
|
o
|
|
3122
|
-
]),
|
|
3144
|
+
]), be = !!r, xe = D ?? (be || a ? !0 : n.length >= 10), Y = be ? a ? Te : Ce : a ? we : Se, Ee = f(() => ti(ee, ce, L), [
|
|
3123
3145
|
ee,
|
|
3124
3146
|
ce,
|
|
3125
3147
|
L
|
|
3126
|
-
]),
|
|
3127
|
-
wrapperRef:
|
|
3128
|
-
measureRef:
|
|
3129
|
-
total:
|
|
3130
|
-
labelsKey:
|
|
3131
|
-
enabled:
|
|
3132
|
-
}),
|
|
3148
|
+
]), De = p(null), Oe = p(null), ke = p(null), Ae = !!d && L, je = Vr({
|
|
3149
|
+
wrapperRef: De,
|
|
3150
|
+
measureRef: Oe,
|
|
3151
|
+
total: K.length,
|
|
3152
|
+
labelsKey: K.map(Yr).join("\0"),
|
|
3153
|
+
enabled: Ae
|
|
3154
|
+
}), Me = f(() => n.some((e) => !!e.description), [n]), Ne = f(() => {
|
|
3133
3155
|
if (!n.some((e) => e.group)) return n;
|
|
3134
3156
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
3135
3157
|
for (let r of n) {
|
|
@@ -3144,9 +3166,9 @@ var mi = a(function(e, t) {
|
|
|
3144
3166
|
})), n.push(r);
|
|
3145
3167
|
}
|
|
3146
3168
|
return t;
|
|
3147
|
-
}, [n]),
|
|
3169
|
+
}, [n]), Pe = !!d && !be, Fe = d ? G : W;
|
|
3148
3170
|
l(() => {
|
|
3149
|
-
!j || !fe ||
|
|
3171
|
+
!j || !fe || $r(j, Fe);
|
|
3150
3172
|
}, [
|
|
3151
3173
|
j,
|
|
3152
3174
|
fe,
|
|
@@ -3155,7 +3177,7 @@ var mi = a(function(e, t) {
|
|
|
3155
3177
|
let Ie = s(() => {
|
|
3156
3178
|
j && pe((e) => {
|
|
3157
3179
|
let t = !e;
|
|
3158
|
-
return t ?
|
|
3180
|
+
return t ? $r(j, Fe) : ei(j), t;
|
|
3159
3181
|
});
|
|
3160
3182
|
}, [j, Fe]), Le = f(() => j ? {
|
|
3161
3183
|
checked: fe,
|
|
@@ -3167,13 +3189,13 @@ var mi = a(function(e, t) {
|
|
|
3167
3189
|
R
|
|
3168
3190
|
]), [Re, ze] = m(""), Be = s((e) => {
|
|
3169
3191
|
ze(e);
|
|
3170
|
-
}, []), X = f(() =>
|
|
3171
|
-
|
|
3192
|
+
}, []), X = f(() => Pe ? n.filter((e) => !e.disabled && Xr(e, Re)) : [], [
|
|
3193
|
+
Pe,
|
|
3172
3194
|
n,
|
|
3173
3195
|
Re
|
|
3174
3196
|
]), Z = f(() => {
|
|
3175
|
-
if (!
|
|
3176
|
-
let e = new Set(
|
|
3197
|
+
if (!Pe || X.length === 0) return null;
|
|
3198
|
+
let e = new Set(G.map(String)), t = X.filter((t) => e.has(String(t.value))).length, n = t === X.length;
|
|
3177
3199
|
return {
|
|
3178
3200
|
count: X.length,
|
|
3179
3201
|
checked: n,
|
|
@@ -3181,24 +3203,24 @@ var mi = a(function(e, t) {
|
|
|
3181
3203
|
label: n ? R.clearAllLabel(X.length) : R.selectAllLabel(X.length)
|
|
3182
3204
|
};
|
|
3183
3205
|
}, [
|
|
3184
|
-
|
|
3206
|
+
Pe,
|
|
3185
3207
|
X,
|
|
3186
|
-
|
|
3208
|
+
G,
|
|
3187
3209
|
R
|
|
3188
3210
|
]), Ve = s(() => {
|
|
3189
3211
|
if (!Z) return;
|
|
3190
3212
|
let e = new Set(X.map((e) => String(e.value))), t;
|
|
3191
|
-
if (Z.checked) t =
|
|
3213
|
+
if (Z.checked) t = G.filter((t) => !e.has(String(t)));
|
|
3192
3214
|
else {
|
|
3193
3215
|
V(X);
|
|
3194
|
-
let e = new Set(
|
|
3195
|
-
t = [...
|
|
3216
|
+
let e = new Set(G.map(String));
|
|
3217
|
+
t = [...G, ...X.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
3196
3218
|
}
|
|
3197
|
-
de(t), _?.(t),
|
|
3219
|
+
de(t), _?.(t), ke.current?.onMenuClose();
|
|
3198
3220
|
}, [
|
|
3199
3221
|
Z,
|
|
3200
3222
|
X,
|
|
3201
|
-
|
|
3223
|
+
G,
|
|
3202
3224
|
V,
|
|
3203
3225
|
_
|
|
3204
3226
|
]), He = {
|
|
@@ -3206,24 +3228,24 @@ var mi = a(function(e, t) {
|
|
|
3206
3228
|
dataTestId: F,
|
|
3207
3229
|
inputId: se,
|
|
3208
3230
|
unstyled: !0,
|
|
3209
|
-
classNames:
|
|
3231
|
+
classNames: Ee,
|
|
3210
3232
|
className: ne,
|
|
3211
3233
|
isMulti: d,
|
|
3212
|
-
options:
|
|
3213
|
-
loadOptions:
|
|
3234
|
+
options: Ne,
|
|
3235
|
+
loadOptions: _e,
|
|
3214
3236
|
defaultOptions: i,
|
|
3215
|
-
value: d ?
|
|
3216
|
-
onChange:
|
|
3217
|
-
onCreateOption: a ?
|
|
3237
|
+
value: d ? K : ge,
|
|
3238
|
+
onChange: ve,
|
|
3239
|
+
onCreateOption: a ? ye : void 0,
|
|
3218
3240
|
formatCreateLabel: a ? ae : void 0,
|
|
3219
3241
|
getOptionValue: (e) => String(e.value),
|
|
3220
|
-
getOptionLabel:
|
|
3221
|
-
formatOptionLabel: (e, t) => t.context === "value" ? e.label :
|
|
3242
|
+
getOptionLabel: Yr,
|
|
3243
|
+
formatOptionLabel: (e, t) => t.context === "value" ? e.label : Me && e.description ? /* @__PURE__ */ J("span", {
|
|
3222
3244
|
className: "flex flex-col min-w-0",
|
|
3223
|
-
children: [/* @__PURE__ */
|
|
3245
|
+
children: [/* @__PURE__ */ q("span", {
|
|
3224
3246
|
className: "truncate",
|
|
3225
3247
|
children: e.label
|
|
3226
|
-
}), /* @__PURE__ */
|
|
3248
|
+
}), /* @__PURE__ */ q("span", {
|
|
3227
3249
|
className: "truncate text-p-sm text-fg-secondary",
|
|
3228
3250
|
children: e.description
|
|
3229
3251
|
})]
|
|
@@ -3232,13 +3254,13 @@ var mi = a(function(e, t) {
|
|
|
3232
3254
|
placeholder: re,
|
|
3233
3255
|
isDisabled: te || T,
|
|
3234
3256
|
isClearable: E,
|
|
3235
|
-
isSearchable:
|
|
3257
|
+
isSearchable: xe,
|
|
3236
3258
|
isLoading: T || void 0,
|
|
3237
3259
|
noOptionsMessage: () => ie,
|
|
3238
3260
|
loadingMessage: () => R.loadingMessage,
|
|
3239
3261
|
"aria-invalid": ce || void 0,
|
|
3240
3262
|
"aria-required": w || void 0,
|
|
3241
|
-
...
|
|
3263
|
+
...Pe ? {
|
|
3242
3264
|
inputValue: Re,
|
|
3243
3265
|
onInputChange: Be,
|
|
3244
3266
|
selectAllState: Z,
|
|
@@ -3248,52 +3270,52 @@ var mi = a(function(e, t) {
|
|
|
3248
3270
|
saveSelectionState: Le,
|
|
3249
3271
|
onSaveSelectionToggle: Ie
|
|
3250
3272
|
} : {},
|
|
3251
|
-
...
|
|
3273
|
+
...Ae ? { visibleTagCount: je } : {},
|
|
3252
3274
|
...d ? {
|
|
3253
3275
|
closeMenuOnSelect: I.closeMenuOnSelect ?? !1,
|
|
3254
3276
|
hideSelectedOptions: I.hideSelectedOptions ?? !1
|
|
3255
3277
|
} : {},
|
|
3256
3278
|
menuPlacement: I.menuPlacement ?? "auto",
|
|
3257
3279
|
components: {
|
|
3258
|
-
Control:
|
|
3259
|
-
Menu:
|
|
3260
|
-
...
|
|
3261
|
-
DropdownIndicator:
|
|
3262
|
-
ClearIndicator:
|
|
3263
|
-
MultiValueRemove:
|
|
3264
|
-
LoadingIndicator:
|
|
3280
|
+
Control: ai,
|
|
3281
|
+
Menu: pi,
|
|
3282
|
+
...xe ? { Input: oi } : {},
|
|
3283
|
+
DropdownIndicator: si,
|
|
3284
|
+
ClearIndicator: ci,
|
|
3285
|
+
MultiValueRemove: li,
|
|
3286
|
+
LoadingIndicator: fi,
|
|
3265
3287
|
IndicatorSeparator: () => null,
|
|
3266
|
-
...O ? { MenuList:
|
|
3267
|
-
...
|
|
3268
|
-
Option:
|
|
3288
|
+
...O ? { MenuList: mi } : {},
|
|
3289
|
+
...Ae ? { MultiValue: ui } : {},
|
|
3290
|
+
Option: di
|
|
3269
3291
|
}
|
|
3270
3292
|
};
|
|
3271
|
-
return /* @__PURE__ */
|
|
3272
|
-
ref:
|
|
3293
|
+
return /* @__PURE__ */ J("div", {
|
|
3294
|
+
ref: De,
|
|
3273
3295
|
"data-test-id": F,
|
|
3274
3296
|
className: Q("flex flex-col gap-1.5 w-full", P),
|
|
3275
3297
|
children: [
|
|
3276
|
-
(y || b) && /* @__PURE__ */
|
|
3298
|
+
(y || b) && /* @__PURE__ */ J("div", {
|
|
3277
3299
|
className: "flex items-center gap-1.5",
|
|
3278
|
-
children: [y && /* @__PURE__ */
|
|
3300
|
+
children: [y && /* @__PURE__ */ J("label", {
|
|
3279
3301
|
htmlFor: se,
|
|
3280
3302
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3281
|
-
children: [y, w && /* @__PURE__ */
|
|
3303
|
+
children: [y, w && /* @__PURE__ */ q("span", {
|
|
3282
3304
|
className: "text-fg-danger",
|
|
3283
3305
|
"aria-hidden": !0,
|
|
3284
3306
|
children: "*"
|
|
3285
3307
|
})]
|
|
3286
|
-
}), b && /* @__PURE__ */
|
|
3308
|
+
}), b && /* @__PURE__ */ q("span", {
|
|
3287
3309
|
className: "inline-flex items-center gap-1",
|
|
3288
3310
|
children: b
|
|
3289
3311
|
})]
|
|
3290
3312
|
}),
|
|
3291
|
-
/* @__PURE__ */
|
|
3292
|
-
ref: Gt(t,
|
|
3313
|
+
/* @__PURE__ */ q(Y, {
|
|
3314
|
+
ref: Gt(t, ke),
|
|
3293
3315
|
...He
|
|
3294
3316
|
}),
|
|
3295
|
-
|
|
3296
|
-
ref:
|
|
3317
|
+
Ae && /* @__PURE__ */ J("div", {
|
|
3318
|
+
ref: Oe,
|
|
3297
3319
|
"aria-hidden": !0,
|
|
3298
3320
|
className: "flex items-center gap-1 whitespace-nowrap",
|
|
3299
3321
|
style: {
|
|
@@ -3302,109 +3324,109 @@ var mi = a(function(e, t) {
|
|
|
3302
3324
|
left: -9999,
|
|
3303
3325
|
visibility: "hidden"
|
|
3304
3326
|
},
|
|
3305
|
-
children: [
|
|
3327
|
+
children: [K.map((e) => /* @__PURE__ */ J("span", {
|
|
3306
3328
|
"data-measure-chip": !0,
|
|
3307
3329
|
className: "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full",
|
|
3308
|
-
children: [/* @__PURE__ */
|
|
3330
|
+
children: [/* @__PURE__ */ q("span", {
|
|
3309
3331
|
className: "truncate text-p-sm text-fg-default",
|
|
3310
|
-
children:
|
|
3311
|
-
}), /* @__PURE__ */
|
|
3332
|
+
children: Yr(e)
|
|
3333
|
+
}), /* @__PURE__ */ q("span", {
|
|
3312
3334
|
className: "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer",
|
|
3313
|
-
children: /* @__PURE__ */
|
|
3335
|
+
children: /* @__PURE__ */ q(U, {
|
|
3314
3336
|
className: "h-3 w-3",
|
|
3315
3337
|
"aria-hidden": !0
|
|
3316
3338
|
})
|
|
3317
3339
|
})]
|
|
3318
|
-
}, String(e.value))), /* @__PURE__ */
|
|
3340
|
+
}, String(e.value))), /* @__PURE__ */ q("span", {
|
|
3319
3341
|
"data-measure-badge": !0,
|
|
3320
3342
|
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"
|
|
3321
3343
|
})]
|
|
3322
3344
|
}),
|
|
3323
|
-
S ? /* @__PURE__ */
|
|
3345
|
+
S ? /* @__PURE__ */ q("p", {
|
|
3324
3346
|
id: `${se}-error`,
|
|
3325
3347
|
className: "text-p-sm text-fg-danger",
|
|
3326
3348
|
children: S
|
|
3327
|
-
}) : x ? /* @__PURE__ */
|
|
3349
|
+
}) : x ? /* @__PURE__ */ q("p", {
|
|
3328
3350
|
id: `${se}-help`,
|
|
3329
3351
|
className: "text-p-sm text-fg-secondary",
|
|
3330
3352
|
children: x
|
|
3331
3353
|
}) : null
|
|
3332
3354
|
]
|
|
3333
3355
|
});
|
|
3334
|
-
}),
|
|
3335
|
-
function
|
|
3336
|
-
return c(
|
|
3356
|
+
}), gi = r(null);
|
|
3357
|
+
function _i() {
|
|
3358
|
+
return c(gi) ?? {
|
|
3337
3359
|
collapsed: !1,
|
|
3338
3360
|
toggle: () => {}
|
|
3339
3361
|
};
|
|
3340
3362
|
}
|
|
3341
|
-
var
|
|
3363
|
+
var vi = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
|
|
3342
3364
|
let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
|
|
3343
3365
|
let e = !h;
|
|
3344
3366
|
p || f(e), n?.(e);
|
|
3345
3367
|
};
|
|
3346
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ q(gi.Provider, {
|
|
3347
3369
|
value: {
|
|
3348
3370
|
collapsed: h,
|
|
3349
3371
|
toggle: g
|
|
3350
3372
|
},
|
|
3351
|
-
children: /* @__PURE__ */
|
|
3373
|
+
children: /* @__PURE__ */ J("aside", {
|
|
3352
3374
|
ref: u,
|
|
3353
3375
|
"data-test-id": c,
|
|
3354
3376
|
className: Q("flex flex-col bg-bg-default border-r border-border-default transition-all duration-200", h ? "w-16" : "w-64", i),
|
|
3355
3377
|
...l,
|
|
3356
|
-
children: [/* @__PURE__ */
|
|
3378
|
+
children: [/* @__PURE__ */ J("div", {
|
|
3357
3379
|
className: Q("flex items-center gap-3 px-4 py-4 border-b border-border-default", h && "justify-center px-2"),
|
|
3358
3380
|
children: [
|
|
3359
|
-
a && /* @__PURE__ */
|
|
3381
|
+
a && /* @__PURE__ */ q("div", {
|
|
3360
3382
|
className: "shrink-0",
|
|
3361
3383
|
children: a
|
|
3362
3384
|
}),
|
|
3363
|
-
!h && /* @__PURE__ */
|
|
3385
|
+
!h && /* @__PURE__ */ J("div", {
|
|
3364
3386
|
className: "flex flex-col min-w-0",
|
|
3365
|
-
children: [o && /* @__PURE__ */
|
|
3387
|
+
children: [o && /* @__PURE__ */ q("div", {
|
|
3366
3388
|
className: "text-p-md font-semibold text-fg-default truncate",
|
|
3367
3389
|
children: o
|
|
3368
|
-
}), s && /* @__PURE__ */
|
|
3390
|
+
}), s && /* @__PURE__ */ q("div", {
|
|
3369
3391
|
className: "text-p-sm text-fg-secondary truncate",
|
|
3370
3392
|
children: s
|
|
3371
3393
|
})]
|
|
3372
3394
|
}),
|
|
3373
|
-
/* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ q("button", {
|
|
3374
3396
|
type: "button",
|
|
3375
3397
|
onClick: g,
|
|
3376
3398
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
3377
3399
|
className: Q("ml-auto inline-flex items-center justify-center h-8 w-8 rounded-md text-fg-secondary hover:bg-bg-subtle hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", h && "ml-0"),
|
|
3378
|
-
children: /* @__PURE__ */
|
|
3400
|
+
children: /* @__PURE__ */ q(P, { className: "h-4 w-4" })
|
|
3379
3401
|
})
|
|
3380
3402
|
]
|
|
3381
|
-
}), /* @__PURE__ */
|
|
3403
|
+
}), /* @__PURE__ */ q("nav", {
|
|
3382
3404
|
className: "flex-1 overflow-y-auto p-2 flex flex-col gap-0.5",
|
|
3383
3405
|
children: r
|
|
3384
3406
|
})]
|
|
3385
3407
|
})
|
|
3386
3408
|
});
|
|
3387
|
-
}),
|
|
3388
|
-
let { collapsed: d } =
|
|
3409
|
+
}), yi = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
3410
|
+
let { collapsed: d } = _i(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ J(K, { children: [e && /* @__PURE__ */ q("span", {
|
|
3389
3411
|
className: "inline-flex shrink-0",
|
|
3390
3412
|
children: e
|
|
3391
|
-
}), !d && /* @__PURE__ */
|
|
3392
|
-
/* @__PURE__ */
|
|
3413
|
+
}), !d && /* @__PURE__ */ J(K, { children: [
|
|
3414
|
+
/* @__PURE__ */ q("span", {
|
|
3393
3415
|
className: "flex-1 truncate text-left",
|
|
3394
3416
|
children: t
|
|
3395
3417
|
}),
|
|
3396
|
-
r && /* @__PURE__ */
|
|
3418
|
+
r && /* @__PURE__ */ q("span", {
|
|
3397
3419
|
className: "shrink-0",
|
|
3398
3420
|
children: r
|
|
3399
3421
|
}),
|
|
3400
|
-
h && /* @__PURE__ */
|
|
3422
|
+
h && /* @__PURE__ */ q(w, {
|
|
3401
3423
|
className: Q("h-4 w-4 shrink-0 text-fg-tertiary transition-transform", f && "rotate-90"),
|
|
3402
3424
|
"aria-hidden": !0
|
|
3403
3425
|
})
|
|
3404
3426
|
] })] }), _ = () => {
|
|
3405
3427
|
h && p((e) => !e), a?.();
|
|
3406
3428
|
}, v = Q("group relative flex items-center gap-3 rounded-md px-3 py-2 text-p-std font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", d && "px-2 justify-center", n ? "bg-brand-20 text-brand-800 before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-5 before:w-0.5 before:rounded-r before:bg-brand-500" : "text-fg-default hover:bg-bg-container", s);
|
|
3407
|
-
return /* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ J(K, { children: [o ? /* @__PURE__ */ q("a", {
|
|
3408
3430
|
ref: u,
|
|
3409
3431
|
href: o,
|
|
3410
3432
|
onClick: _,
|
|
@@ -3412,7 +3434,7 @@ var _i = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3412
3434
|
className: v,
|
|
3413
3435
|
...l,
|
|
3414
3436
|
children: g
|
|
3415
|
-
}) : /* @__PURE__ */
|
|
3437
|
+
}) : /* @__PURE__ */ q("button", {
|
|
3416
3438
|
ref: u,
|
|
3417
3439
|
type: "button",
|
|
3418
3440
|
onClick: _,
|
|
@@ -3420,16 +3442,16 @@ var _i = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3420
3442
|
className: Q(v, "w-full"),
|
|
3421
3443
|
...l,
|
|
3422
3444
|
children: g
|
|
3423
|
-
}), h && f && !d && /* @__PURE__ */
|
|
3445
|
+
}), h && f && !d && /* @__PURE__ */ q("div", {
|
|
3424
3446
|
className: "flex flex-col gap-0.5 pl-8",
|
|
3425
3447
|
children: i
|
|
3426
3448
|
})] });
|
|
3427
|
-
}),
|
|
3449
|
+
}), bi = {
|
|
3428
3450
|
text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
|
|
3429
3451
|
circular: "size-10 rounded-full",
|
|
3430
3452
|
rectangular: "h-4 w-full",
|
|
3431
3453
|
rounded: "h-4 w-full rounded-md"
|
|
3432
|
-
},
|
|
3454
|
+
}, xi = {
|
|
3433
3455
|
pulse: "animate-pulse",
|
|
3434
3456
|
wave: [
|
|
3435
3457
|
"relative overflow-hidden",
|
|
@@ -3439,27 +3461,27 @@ var _i = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3439
3461
|
].join(" "),
|
|
3440
3462
|
none: ""
|
|
3441
3463
|
};
|
|
3442
|
-
function
|
|
3464
|
+
function Si(e) {
|
|
3443
3465
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3444
3466
|
}
|
|
3445
|
-
var
|
|
3467
|
+
var Ci = 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) {
|
|
3446
3468
|
let d = a != null, f = Math.max(1, i), p = {
|
|
3447
|
-
...n === void 0 ? null : { width:
|
|
3448
|
-
...r === void 0 ? null : { height:
|
|
3469
|
+
...n === void 0 ? null : { width: Si(n) },
|
|
3470
|
+
...r === void 0 ? null : { height: Si(r) },
|
|
3449
3471
|
...o
|
|
3450
|
-
}, m = Q("block bg-bg-subtle leading-none",
|
|
3451
|
-
return d ? /* @__PURE__ */
|
|
3472
|
+
}, m = Q("block bg-bg-subtle leading-none", bi[e], xi[t]);
|
|
3473
|
+
return d ? /* @__PURE__ */ q("span", {
|
|
3452
3474
|
ref: u,
|
|
3453
3475
|
"data-test-id": c,
|
|
3454
3476
|
className: Q(m, "inline-block h-auto w-auto scale-100", s),
|
|
3455
3477
|
style: p,
|
|
3456
3478
|
...l,
|
|
3457
|
-
children: /* @__PURE__ */
|
|
3479
|
+
children: /* @__PURE__ */ q("span", {
|
|
3458
3480
|
className: "invisible inline-block",
|
|
3459
3481
|
"aria-hidden": !0,
|
|
3460
3482
|
children: a
|
|
3461
3483
|
})
|
|
3462
|
-
}) : f === 1 ? /* @__PURE__ */
|
|
3484
|
+
}) : f === 1 ? /* @__PURE__ */ q("span", {
|
|
3463
3485
|
ref: u,
|
|
3464
3486
|
"data-test-id": c,
|
|
3465
3487
|
className: Q(m, s),
|
|
@@ -3467,12 +3489,12 @@ var Si = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3467
3489
|
role: "status",
|
|
3468
3490
|
"aria-label": "Loading",
|
|
3469
3491
|
...l
|
|
3470
|
-
}) : /* @__PURE__ */
|
|
3492
|
+
}) : /* @__PURE__ */ q("span", {
|
|
3471
3493
|
ref: u,
|
|
3472
3494
|
"data-test-id": c,
|
|
3473
3495
|
className: Q("block", s),
|
|
3474
3496
|
...l,
|
|
3475
|
-
children: Array.from({ length: f }, (e, t) => /* @__PURE__ */
|
|
3497
|
+
children: Array.from({ length: f }, (e, t) => /* @__PURE__ */ q("span", {
|
|
3476
3498
|
className: m,
|
|
3477
3499
|
style: p,
|
|
3478
3500
|
"aria-hidden": t !== 0 || void 0,
|
|
@@ -3480,7 +3502,7 @@ var Si = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3480
3502
|
"aria-label": t === 0 ? "Loading" : void 0
|
|
3481
3503
|
}, t))
|
|
3482
3504
|
});
|
|
3483
|
-
}),
|
|
3505
|
+
}), wi = {
|
|
3484
3506
|
success: {
|
|
3485
3507
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3486
3508
|
icon: x
|
|
@@ -3491,7 +3513,7 @@ var Si = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3491
3513
|
},
|
|
3492
3514
|
danger: {
|
|
3493
3515
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3494
|
-
icon:
|
|
3516
|
+
icon: W
|
|
3495
3517
|
},
|
|
3496
3518
|
info: {
|
|
3497
3519
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
@@ -3501,26 +3523,26 @@ var Si = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3501
3523
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3502
3524
|
icon: N
|
|
3503
3525
|
}
|
|
3504
|
-
},
|
|
3526
|
+
}, Ti = {
|
|
3505
3527
|
success: "text-green-400",
|
|
3506
3528
|
warning: "text-yellow-300",
|
|
3507
3529
|
danger: "text-red-400",
|
|
3508
3530
|
info: "text-blue-400",
|
|
3509
3531
|
neutral: "text-white/70"
|
|
3510
|
-
},
|
|
3532
|
+
}, Ei = {
|
|
3511
3533
|
"top-left": "top-6 left-4",
|
|
3512
3534
|
"top-center": "top-6 left-1/2 -translate-x-1/2",
|
|
3513
3535
|
"top-right": "top-6 right-4",
|
|
3514
3536
|
"bottom-left": "bottom-6 left-4",
|
|
3515
3537
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
3516
3538
|
"bottom-right": "bottom-6 right-4"
|
|
3517
|
-
},
|
|
3518
|
-
function
|
|
3519
|
-
let e = c(
|
|
3539
|
+
}, Di = r(null);
|
|
3540
|
+
function Oi() {
|
|
3541
|
+
let e = c(Di);
|
|
3520
3542
|
if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
|
|
3521
3543
|
return e;
|
|
3522
3544
|
}
|
|
3523
|
-
function
|
|
3545
|
+
function ki({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
3524
3546
|
let [r, i] = m([]), a = p(/* @__PURE__ */ new Map()), o = s((e) => {
|
|
3525
3547
|
i((t) => t.filter((t) => t.id !== e));
|
|
3526
3548
|
let t = a.current.get(e);
|
|
@@ -3543,32 +3565,32 @@ function Oi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3543
3565
|
return () => {
|
|
3544
3566
|
e.forEach(clearTimeout), e.clear();
|
|
3545
3567
|
};
|
|
3546
|
-
}, []), /* @__PURE__ */
|
|
3568
|
+
}, []), /* @__PURE__ */ J(Di.Provider, {
|
|
3547
3569
|
value: {
|
|
3548
3570
|
show: c,
|
|
3549
3571
|
dismiss: o
|
|
3550
3572
|
},
|
|
3551
|
-
children: [e,
|
|
3573
|
+
children: [e, _e(/* @__PURE__ */ q(K, { children: Object.keys(Ei).map((e) => {
|
|
3552
3574
|
let i = r.filter((t) => (t.position ?? n) === e);
|
|
3553
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
3575
|
+
return i.length === 0 ? null : /* @__PURE__ */ q("div", {
|
|
3554
3576
|
"data-test-id": t,
|
|
3555
|
-
className: Q("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
3577
|
+
className: Q("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none", Ei[e]),
|
|
3556
3578
|
children: i.map((e) => {
|
|
3557
|
-
let { container: t, icon: n } =
|
|
3558
|
-
return /* @__PURE__ */
|
|
3579
|
+
let { container: t, icon: n } = wi[e.variant ?? "neutral"];
|
|
3580
|
+
return /* @__PURE__ */ J("div", {
|
|
3559
3581
|
role: "status",
|
|
3560
3582
|
"data-test-id": e.dataTestId,
|
|
3561
3583
|
className: Q("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
3562
3584
|
children: [
|
|
3563
|
-
/* @__PURE__ */
|
|
3564
|
-
className: Q("h-5 w-5 shrink-0",
|
|
3585
|
+
/* @__PURE__ */ q(n, {
|
|
3586
|
+
className: Q("h-5 w-5 shrink-0", Ti[e.variant ?? "neutral"]),
|
|
3565
3587
|
"aria-hidden": !0
|
|
3566
3588
|
}),
|
|
3567
|
-
/* @__PURE__ */
|
|
3589
|
+
/* @__PURE__ */ q("p", {
|
|
3568
3590
|
className: "flex-1 text-p-std",
|
|
3569
3591
|
children: e.message
|
|
3570
3592
|
}),
|
|
3571
|
-
e.action && /* @__PURE__ */
|
|
3593
|
+
e.action && /* @__PURE__ */ q("button", {
|
|
3572
3594
|
type: "button",
|
|
3573
3595
|
onClick: () => {
|
|
3574
3596
|
e.action?.onClick(), o(e.id);
|
|
@@ -3576,12 +3598,12 @@ function Oi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3576
3598
|
className: "text-p-std font-semibold text-brand-400 hover:text-brand-300 px-1",
|
|
3577
3599
|
children: e.action.label
|
|
3578
3600
|
}),
|
|
3579
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ q("button", {
|
|
3580
3602
|
type: "button",
|
|
3581
3603
|
onClick: () => o(e.id),
|
|
3582
3604
|
"aria-label": "Close",
|
|
3583
3605
|
className: "shrink-0 p-1 rounded-md text-white/70 hover:text-white hover:bg-white/10",
|
|
3584
|
-
children: /* @__PURE__ */
|
|
3606
|
+
children: /* @__PURE__ */ q(U, { className: "h-4 w-4" })
|
|
3585
3607
|
})
|
|
3586
3608
|
]
|
|
3587
3609
|
}, e.id);
|
|
@@ -3592,15 +3614,15 @@ function Oi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3592
3614
|
}
|
|
3593
3615
|
//#endregion
|
|
3594
3616
|
//#region src/components/Status/Status.tsx
|
|
3595
|
-
var
|
|
3617
|
+
var Ai = {
|
|
3596
3618
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
3597
3619
|
md: "h-6 px-2 text-p-sm gap-1.5",
|
|
3598
3620
|
sm: "h-5 px-1.5 text-p-sm gap-1"
|
|
3599
|
-
},
|
|
3621
|
+
}, ji = {
|
|
3600
3622
|
lg: "h-2 w-2",
|
|
3601
3623
|
md: "h-1.5 w-1.5",
|
|
3602
3624
|
sm: "h-1.5 w-1.5"
|
|
3603
|
-
},
|
|
3625
|
+
}, Mi = {
|
|
3604
3626
|
general: {
|
|
3605
3627
|
container: "bg-bg-subtle text-fg-default dark:text-fg-default",
|
|
3606
3628
|
dot: "bg-gray-600 dark:bg-gray-400"
|
|
@@ -3633,102 +3655,102 @@ var ki = {
|
|
|
3633
3655
|
container: "bg-bg-subtle text-fg-disabled",
|
|
3634
3656
|
dot: "bg-border-strong"
|
|
3635
3657
|
}
|
|
3636
|
-
},
|
|
3637
|
-
let { container: u, dot: d } =
|
|
3638
|
-
return /* @__PURE__ */
|
|
3658
|
+
}, Ni = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3659
|
+
let { container: u, dot: d } = Mi[e];
|
|
3660
|
+
return /* @__PURE__ */ J("span", {
|
|
3639
3661
|
ref: l,
|
|
3640
3662
|
"data-test-id": s,
|
|
3641
|
-
className: Q("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none",
|
|
3663
|
+
className: Q("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", Ai[t], u, a),
|
|
3642
3664
|
...c,
|
|
3643
3665
|
children: [
|
|
3644
|
-
n ? /* @__PURE__ */
|
|
3666
|
+
n ? /* @__PURE__ */ q("span", {
|
|
3645
3667
|
className: "inline-flex shrink-0",
|
|
3646
3668
|
children: n
|
|
3647
|
-
}) : i ? /* @__PURE__ */
|
|
3648
|
-
className: Q("inline-block shrink-0 rounded-full",
|
|
3669
|
+
}) : i ? /* @__PURE__ */ q("span", {
|
|
3670
|
+
className: Q("inline-block shrink-0 rounded-full", ji[t], d),
|
|
3649
3671
|
"aria-hidden": !0
|
|
3650
3672
|
}) : null,
|
|
3651
3673
|
o,
|
|
3652
|
-
r && /* @__PURE__ */
|
|
3674
|
+
r && /* @__PURE__ */ q("span", {
|
|
3653
3675
|
className: "inline-flex shrink-0",
|
|
3654
3676
|
children: r
|
|
3655
3677
|
})
|
|
3656
3678
|
]
|
|
3657
3679
|
});
|
|
3658
|
-
}),
|
|
3680
|
+
}), Pi = {
|
|
3659
3681
|
lg: "size-9",
|
|
3660
3682
|
sm: "size-6"
|
|
3661
|
-
},
|
|
3683
|
+
}, Fi = {
|
|
3662
3684
|
lg: "h-9",
|
|
3663
3685
|
sm: "h-6"
|
|
3664
|
-
},
|
|
3686
|
+
}, Ii = {
|
|
3665
3687
|
lg: "border-2",
|
|
3666
3688
|
sm: "border"
|
|
3667
|
-
},
|
|
3689
|
+
}, Li = {
|
|
3668
3690
|
lg: "text-p-std",
|
|
3669
3691
|
sm: "text-p-xs"
|
|
3670
|
-
},
|
|
3692
|
+
}, Ri = {
|
|
3671
3693
|
lg: "size-5",
|
|
3672
3694
|
sm: "size-3.5"
|
|
3673
|
-
},
|
|
3695
|
+
}, zi = {
|
|
3674
3696
|
lg: "size-3",
|
|
3675
3697
|
sm: "size-2"
|
|
3676
|
-
},
|
|
3698
|
+
}, Bi = {
|
|
3677
3699
|
lg: "text-p-std",
|
|
3678
3700
|
sm: "text-p-sm"
|
|
3679
|
-
},
|
|
3701
|
+
}, Vi = {
|
|
3680
3702
|
lg: "text-p-sm",
|
|
3681
3703
|
sm: "text-p-xs"
|
|
3682
|
-
},
|
|
3704
|
+
}, Hi = {
|
|
3683
3705
|
upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
|
|
3684
3706
|
active: "bg-bg-default border-brand-500 text-brand-700",
|
|
3685
3707
|
completed: "bg-brand-500 border-brand-500 text-fg-inverse",
|
|
3686
3708
|
rejected: "bg-red-700 border-red-800 text-fg-inverse"
|
|
3687
|
-
},
|
|
3709
|
+
}, Ui = {
|
|
3688
3710
|
upcoming: "ring-4 ring-gray-100/80",
|
|
3689
3711
|
active: "ring-4 ring-brand-40/80",
|
|
3690
3712
|
completed: "ring-4 ring-brand-40/80",
|
|
3691
3713
|
rejected: "ring-4 ring-red-100/80"
|
|
3692
3714
|
};
|
|
3693
|
-
function
|
|
3694
|
-
return t === "completed" ? /* @__PURE__ */
|
|
3715
|
+
function Wi(e, t, n, r) {
|
|
3716
|
+
return t === "completed" ? /* @__PURE__ */ q(E, { className: Ri[r] }) : t === "rejected" ? /* @__PURE__ */ q(D, { className: Ri[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ q("span", { className: Q("rounded-full", zi[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
3695
3717
|
}
|
|
3696
|
-
var
|
|
3718
|
+
var Gi = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
3697
3719
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
3698
|
-
return /* @__PURE__ */
|
|
3720
|
+
return /* @__PURE__ */ q("ol", {
|
|
3699
3721
|
ref: l,
|
|
3700
3722
|
"data-test-id": s,
|
|
3701
3723
|
className: Q("flex", u ? "flex-col" : "w-full items-start", o),
|
|
3702
3724
|
...c,
|
|
3703
3725
|
children: e.map((i, o) => {
|
|
3704
|
-
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__ */
|
|
3705
|
-
className: Q("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors",
|
|
3706
|
-
children:
|
|
3707
|
-
}), h = /* @__PURE__ */
|
|
3726
|
+
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__ */ q("span", {
|
|
3727
|
+
className: Q("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", Pi[a], Ii[a], Li[a], Hi[s], i.highlighted && Ui[s]),
|
|
3728
|
+
children: Wi(r, s, o, a)
|
|
3729
|
+
}), h = /* @__PURE__ */ J("div", {
|
|
3708
3730
|
className: Q("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
3709
|
-
children: [/* @__PURE__ */
|
|
3710
|
-
className: Q("font-medium text-fg-default",
|
|
3731
|
+
children: [/* @__PURE__ */ q("span", {
|
|
3732
|
+
className: Q("font-medium text-fg-default", Bi[a]),
|
|
3711
3733
|
children: i.label
|
|
3712
|
-
}), i.description && /* @__PURE__ */
|
|
3713
|
-
className: Q("text-fg-secondary",
|
|
3734
|
+
}), i.description && /* @__PURE__ */ q("span", {
|
|
3735
|
+
className: Q("text-fg-secondary", Vi[a]),
|
|
3714
3736
|
children: i.description
|
|
3715
3737
|
})]
|
|
3716
3738
|
});
|
|
3717
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ J("li", {
|
|
3718
3740
|
"aria-current": Je(i.value, t) ? "step" : void 0,
|
|
3719
3741
|
className: Q("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3720
|
-
children: [/* @__PURE__ */
|
|
3721
|
-
className: Q("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Q("w-full items-center justify-center",
|
|
3742
|
+
children: [/* @__PURE__ */ J("div", {
|
|
3743
|
+
className: Q("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Q("w-full items-center justify-center", Fi[a])),
|
|
3722
3744
|
children: [
|
|
3723
|
-
!c && /* @__PURE__ */
|
|
3745
|
+
!c && /* @__PURE__ */ q("span", {
|
|
3724
3746
|
"aria-hidden": !0,
|
|
3725
3747
|
className: Q("absolute", u ? "left-1/2 top-0 bottom-1/2 w-0.5 -translate-x-1/2" : "left-0 right-1/2 top-1/2 h-0.5 -translate-y-1/2", f ? "bg-brand-500" : "bg-border-default")
|
|
3726
3748
|
}),
|
|
3727
|
-
!l && /* @__PURE__ */
|
|
3749
|
+
!l && /* @__PURE__ */ q("span", {
|
|
3728
3750
|
"aria-hidden": !0,
|
|
3729
3751
|
className: Q("absolute", u ? "left-1/2 top-1/2 bottom-0 w-0.5 -translate-x-1/2" : "left-1/2 right-0 top-1/2 h-0.5 -translate-y-1/2", p ? "bg-brand-500" : "bg-border-default")
|
|
3730
3752
|
}),
|
|
3731
|
-
n ? /* @__PURE__ */
|
|
3753
|
+
n ? /* @__PURE__ */ q("button", {
|
|
3732
3754
|
type: "button",
|
|
3733
3755
|
onClick: () => n(i.value),
|
|
3734
3756
|
"aria-label": typeof i.label == "string" ? i.label : void 0,
|
|
@@ -3740,17 +3762,17 @@ var Wi = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3740
3762
|
}, String(i.value));
|
|
3741
3763
|
})
|
|
3742
3764
|
});
|
|
3743
|
-
}),
|
|
3765
|
+
}), Ki = {
|
|
3744
3766
|
md: "h-6 w-11",
|
|
3745
3767
|
sm: "h-5 w-9"
|
|
3746
|
-
},
|
|
3768
|
+
}, qi = {
|
|
3747
3769
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
3748
3770
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
3749
|
-
},
|
|
3750
|
-
let p = u(), m = i ?? p, h = /* @__PURE__ */
|
|
3771
|
+
}, Ji = 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) {
|
|
3772
|
+
let p = u(), m = i ?? p, h = /* @__PURE__ */ J("span", {
|
|
3751
3773
|
className: "relative inline-flex shrink-0",
|
|
3752
3774
|
children: [
|
|
3753
|
-
/* @__PURE__ */
|
|
3775
|
+
/* @__PURE__ */ q("input", {
|
|
3754
3776
|
ref: f,
|
|
3755
3777
|
id: m,
|
|
3756
3778
|
type: "checkbox",
|
|
@@ -3761,25 +3783,25 @@ var Wi = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3761
3783
|
className: "peer sr-only",
|
|
3762
3784
|
...d
|
|
3763
3785
|
}),
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3786
|
+
/* @__PURE__ */ q("span", { className: Q("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", Ki[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") }),
|
|
3787
|
+
/* @__PURE__ */ q("span", { className: Q("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", qi[e]) })
|
|
3766
3788
|
]
|
|
3767
3789
|
});
|
|
3768
|
-
return !t && !n ? /* @__PURE__ */
|
|
3790
|
+
return !t && !n ? /* @__PURE__ */ q("label", {
|
|
3769
3791
|
htmlFor: m,
|
|
3770
3792
|
"data-test-id": l,
|
|
3771
3793
|
className: Q("inline-flex", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
|
|
3772
3794
|
children: h
|
|
3773
|
-
}) : /* @__PURE__ */
|
|
3795
|
+
}) : /* @__PURE__ */ J("label", {
|
|
3774
3796
|
htmlFor: m,
|
|
3775
3797
|
"data-test-id": l,
|
|
3776
3798
|
className: Q("inline-flex items-center gap-3", r === "left" && "flex-row-reverse justify-end", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
|
|
3777
|
-
children: [h, /* @__PURE__ */
|
|
3799
|
+
children: [h, /* @__PURE__ */ J("span", {
|
|
3778
3800
|
className: "flex flex-col gap-0.5",
|
|
3779
|
-
children: [t && /* @__PURE__ */
|
|
3801
|
+
children: [t && /* @__PURE__ */ q("span", {
|
|
3780
3802
|
className: "text-p-std font-medium text-fg-default leading-tight",
|
|
3781
3803
|
children: t
|
|
3782
|
-
}), n && /* @__PURE__ */
|
|
3804
|
+
}), n && /* @__PURE__ */ q("span", {
|
|
3783
3805
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
3784
3806
|
children: n
|
|
3785
3807
|
})]
|
|
@@ -3788,11 +3810,11 @@ var Wi = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3788
3810
|
});
|
|
3789
3811
|
//#endregion
|
|
3790
3812
|
//#region src/components/TableV2/TableV2Filter.tsx
|
|
3791
|
-
function
|
|
3813
|
+
function Yi({ column: e }) {
|
|
3792
3814
|
let t = e.columnDef.meta?.filterVariant;
|
|
3793
3815
|
if (!t) return null;
|
|
3794
3816
|
let n = e.getFilterValue();
|
|
3795
|
-
return t === "custom" ? /* @__PURE__ */ K
|
|
3817
|
+
return t === "custom" ? /* @__PURE__ */ q(K, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ q(hi, {
|
|
3796
3818
|
size: "sm",
|
|
3797
3819
|
searchable: !1,
|
|
3798
3820
|
required: !1,
|
|
@@ -3800,7 +3822,7 @@ function Ji({ column: e }) {
|
|
|
3800
3822
|
placeholder: "All",
|
|
3801
3823
|
value: typeof n == "string" ? n : void 0,
|
|
3802
3824
|
onChange: (t) => e.setFilterValue(t || void 0)
|
|
3803
|
-
}) : /* @__PURE__ */
|
|
3825
|
+
}) : /* @__PURE__ */ q(nn, {
|
|
3804
3826
|
size: "sm",
|
|
3805
3827
|
type: t === "date" ? "date" : "text",
|
|
3806
3828
|
"aria-label": `Filter by ${e.id}`,
|
|
@@ -3811,7 +3833,7 @@ function Ji({ column: e }) {
|
|
|
3811
3833
|
}
|
|
3812
3834
|
//#endregion
|
|
3813
3835
|
//#region src/components/TableV2/TableV2Pagination.i18n.ts
|
|
3814
|
-
var
|
|
3836
|
+
var Xi = {
|
|
3815
3837
|
"en-US": {
|
|
3816
3838
|
rowsPerPage: "Rows per page",
|
|
3817
3839
|
noResults: "No results",
|
|
@@ -3830,21 +3852,21 @@ var Yi = {
|
|
|
3830
3852
|
};
|
|
3831
3853
|
//#endregion
|
|
3832
3854
|
//#region src/components/TableV2/TableV2Pagination.tsx
|
|
3833
|
-
function
|
|
3855
|
+
function Zi({ table: e, pageSizeOptions: t = [
|
|
3834
3856
|
10,
|
|
3835
3857
|
20,
|
|
3836
3858
|
30
|
|
3837
3859
|
], locale: n = "en-US", dataTestId: r }) {
|
|
3838
|
-
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u =
|
|
3839
|
-
return /* @__PURE__ */
|
|
3860
|
+
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u = Xi[n], d = Vt(r);
|
|
3861
|
+
return /* @__PURE__ */ J("div", {
|
|
3840
3862
|
className: "flex flex-wrap items-center justify-between gap-3 p-3 border-t border-border-default",
|
|
3841
3863
|
children: [
|
|
3842
|
-
/* @__PURE__ */
|
|
3864
|
+
/* @__PURE__ */ J("div", {
|
|
3843
3865
|
className: "flex items-center gap-2",
|
|
3844
|
-
children: [/* @__PURE__ */
|
|
3866
|
+
children: [/* @__PURE__ */ q("span", {
|
|
3845
3867
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3846
3868
|
children: u.rowsPerPage
|
|
3847
|
-
}), /* @__PURE__ */
|
|
3869
|
+
}), /* @__PURE__ */ q(hi, {
|
|
3848
3870
|
size: "sm",
|
|
3849
3871
|
menuPlacement: "top",
|
|
3850
3872
|
searchable: !1,
|
|
@@ -3859,13 +3881,13 @@ function Xi({ table: e, pageSizeOptions: t = [
|
|
|
3859
3881
|
}))
|
|
3860
3882
|
})]
|
|
3861
3883
|
}),
|
|
3862
|
-
/* @__PURE__ */
|
|
3884
|
+
/* @__PURE__ */ q("span", {
|
|
3863
3885
|
"data-test-id": d("total_count"),
|
|
3864
3886
|
"data-total": o,
|
|
3865
3887
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3866
3888
|
children: o === 0 ? u.noResults : u.rangeSummary(c, l, o)
|
|
3867
3889
|
}),
|
|
3868
|
-
/* @__PURE__ */
|
|
3890
|
+
/* @__PURE__ */ q(Er, {
|
|
3869
3891
|
page: i + 1,
|
|
3870
3892
|
pageCount: s,
|
|
3871
3893
|
onPageChange: (t) => e.setPageIndex(t - 1),
|
|
@@ -3876,14 +3898,14 @@ function Xi({ table: e, pageSizeOptions: t = [
|
|
|
3876
3898
|
}
|
|
3877
3899
|
//#endregion
|
|
3878
3900
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
3879
|
-
function
|
|
3901
|
+
function Qi({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
3880
3902
|
let r = Vt(n);
|
|
3881
|
-
return /* @__PURE__ */ K
|
|
3903
|
+
return /* @__PURE__ */ q(K, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ q("tr", {
|
|
3882
3904
|
"data-test-id": r(`skeleton-row-${n}`),
|
|
3883
3905
|
"aria-hidden": n > 0 || void 0,
|
|
3884
|
-
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */
|
|
3906
|
+
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ q("td", {
|
|
3885
3907
|
className: "px-4 py-3",
|
|
3886
|
-
children: /* @__PURE__ */
|
|
3908
|
+
children: /* @__PURE__ */ q(Ci, {
|
|
3887
3909
|
variant: "text",
|
|
3888
3910
|
width: t === 0 ? "70%" : "90%"
|
|
3889
3911
|
})
|
|
@@ -3892,24 +3914,24 @@ function Zi({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
|
3892
3914
|
}
|
|
3893
3915
|
//#endregion
|
|
3894
3916
|
//#region src/components/TableV2/TableV2ColumnVisibility.tsx
|
|
3895
|
-
function
|
|
3917
|
+
function $i(e) {
|
|
3896
3918
|
let { header: t } = e.columnDef;
|
|
3897
3919
|
return typeof t == "string" ? t : e.id;
|
|
3898
3920
|
}
|
|
3899
|
-
function
|
|
3921
|
+
function ea({ table: e }) {
|
|
3900
3922
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
3901
|
-
return /* @__PURE__ */
|
|
3923
|
+
return /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(at, {
|
|
3902
3924
|
variant: "secondary",
|
|
3903
3925
|
size: "sm",
|
|
3904
|
-
leftIcon: /* @__PURE__ */
|
|
3926
|
+
leftIcon: /* @__PURE__ */ q(O, { className: "h-4 w-4" }),
|
|
3905
3927
|
children: "Columns"
|
|
3906
|
-
}) }), /* @__PURE__ */
|
|
3928
|
+
}) }), /* @__PURE__ */ q($n, {
|
|
3907
3929
|
align: "end",
|
|
3908
|
-
children: t.map((e) => /* @__PURE__ */
|
|
3930
|
+
children: t.map((e) => /* @__PURE__ */ q("div", {
|
|
3909
3931
|
className: "px-3 py-1.5 hover:bg-bg-subtle",
|
|
3910
|
-
children: /* @__PURE__ */
|
|
3932
|
+
children: /* @__PURE__ */ q(Wt, {
|
|
3911
3933
|
size: "sm",
|
|
3912
|
-
label:
|
|
3934
|
+
label: $i(e),
|
|
3913
3935
|
checked: e.getIsVisible(),
|
|
3914
3936
|
onChange: () => e.toggleVisibility()
|
|
3915
3937
|
})
|
|
@@ -3918,36 +3940,36 @@ function $i({ table: e }) {
|
|
|
3918
3940
|
}
|
|
3919
3941
|
//#endregion
|
|
3920
3942
|
//#region src/components/TableV2/TableV2Toolbar.tsx
|
|
3921
|
-
function
|
|
3922
|
-
return /* @__PURE__ */
|
|
3943
|
+
function ta({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
3944
|
+
return /* @__PURE__ */ J("div", {
|
|
3923
3945
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
3924
|
-
children: [t && /* @__PURE__ */
|
|
3946
|
+
children: [t && /* @__PURE__ */ q(nn, {
|
|
3925
3947
|
size: "sm",
|
|
3926
|
-
leftIcon: /* @__PURE__ */
|
|
3948
|
+
leftIcon: /* @__PURE__ */ q(le, { className: "h-4 w-4" }),
|
|
3927
3949
|
placeholder: r ?? "Search...",
|
|
3928
3950
|
"aria-label": "Search",
|
|
3929
3951
|
value: String(e.getState().globalFilter ?? ""),
|
|
3930
3952
|
onChange: (t) => e.setGlobalFilter(t.target.value),
|
|
3931
3953
|
wrapperClassName: "max-w-xs w-full"
|
|
3932
|
-
}), /* @__PURE__ */
|
|
3954
|
+
}), /* @__PURE__ */ J("div", {
|
|
3933
3955
|
className: "ml-auto flex items-center gap-2",
|
|
3934
3956
|
children: [
|
|
3935
|
-
i && /* @__PURE__ */
|
|
3957
|
+
i && /* @__PURE__ */ q(at, {
|
|
3936
3958
|
variant: "secondary",
|
|
3937
3959
|
size: "sm",
|
|
3938
3960
|
iconOnly: !0,
|
|
3939
3961
|
"aria-label": "Refresh",
|
|
3940
|
-
leftIcon: /* @__PURE__ */
|
|
3962
|
+
leftIcon: /* @__PURE__ */ q(z, { className: "h-4 w-4" }),
|
|
3941
3963
|
onClick: i
|
|
3942
3964
|
}),
|
|
3943
|
-
a && /* @__PURE__ */
|
|
3965
|
+
a && /* @__PURE__ */ q(at, {
|
|
3944
3966
|
variant: "secondary",
|
|
3945
3967
|
size: "sm",
|
|
3946
|
-
leftIcon: /* @__PURE__ */
|
|
3968
|
+
leftIcon: /* @__PURE__ */ q(j, { className: "h-4 w-4" }),
|
|
3947
3969
|
onClick: a,
|
|
3948
3970
|
children: "Export"
|
|
3949
3971
|
}),
|
|
3950
|
-
n && /* @__PURE__ */
|
|
3972
|
+
n && /* @__PURE__ */ q(ea, { table: e }),
|
|
3951
3973
|
o
|
|
3952
3974
|
]
|
|
3953
3975
|
})]
|
|
@@ -3955,15 +3977,15 @@ function ea({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3955
3977
|
}
|
|
3956
3978
|
//#endregion
|
|
3957
3979
|
//#region src/components/TableV2/useTableV2ColumnDnd.ts
|
|
3958
|
-
var
|
|
3980
|
+
var na = ({ transform: e }) => ({
|
|
3959
3981
|
...e,
|
|
3960
3982
|
y: 0
|
|
3961
3983
|
});
|
|
3962
|
-
function
|
|
3984
|
+
function ra({ columnOrder: e, onColumnOrderChange: t }) {
|
|
3963
3985
|
return {
|
|
3964
|
-
sensors: Re(Le(Fe, { activationConstraint: { distance: 4 } }), Le(
|
|
3986
|
+
sensors: Re(Le(Fe, { activationConstraint: { distance: 4 } }), Le(Pe, { coordinateGetter: Z })),
|
|
3965
3987
|
collisionDetection: Ie,
|
|
3966
|
-
modifiers: [
|
|
3988
|
+
modifiers: [na],
|
|
3967
3989
|
handleDragEnd: (n) => {
|
|
3968
3990
|
let { active: r, over: i } = n;
|
|
3969
3991
|
if (!i || r.id === i.id) return;
|
|
@@ -3972,7 +3994,7 @@ function na({ columnOrder: e, onColumnOrderChange: t }) {
|
|
|
3972
3994
|
}
|
|
3973
3995
|
};
|
|
3974
3996
|
}
|
|
3975
|
-
function
|
|
3997
|
+
function ia(e) {
|
|
3976
3998
|
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Ve({ id: e });
|
|
3977
3999
|
return {
|
|
3978
4000
|
setNodeRef: r,
|
|
@@ -3990,16 +4012,16 @@ function ra(e) {
|
|
|
3990
4012
|
}
|
|
3991
4013
|
//#endregion
|
|
3992
4014
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
3993
|
-
function
|
|
3994
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
4015
|
+
function aa({ row: e, actions: t }) {
|
|
4016
|
+
return t.length === 0 ? null : /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(at, {
|
|
3995
4017
|
variant: "tertiary",
|
|
3996
4018
|
size: "sm",
|
|
3997
4019
|
iconOnly: !0,
|
|
3998
4020
|
"aria-label": "Row actions",
|
|
3999
|
-
leftIcon: /* @__PURE__ */
|
|
4000
|
-
}) }), /* @__PURE__ */
|
|
4021
|
+
leftIcon: /* @__PURE__ */ q(re, { className: "h-4 w-4" })
|
|
4022
|
+
}) }), /* @__PURE__ */ q($n, {
|
|
4001
4023
|
align: "end",
|
|
4002
|
-
children: t.map((t, n) => /* @__PURE__ */
|
|
4024
|
+
children: t.map((t, n) => /* @__PURE__ */ q(er, {
|
|
4003
4025
|
icon: t.icon,
|
|
4004
4026
|
destructive: t.destructive,
|
|
4005
4027
|
disabled: t.disabled?.(e),
|
|
@@ -4010,15 +4032,15 @@ function ia({ row: e, actions: t }) {
|
|
|
4010
4032
|
}
|
|
4011
4033
|
//#endregion
|
|
4012
4034
|
//#region src/components/TableV2/TableV2.utils.tsx
|
|
4013
|
-
var
|
|
4035
|
+
var oa = {
|
|
4014
4036
|
comfortable: "py-3",
|
|
4015
4037
|
compact: "py-2"
|
|
4016
|
-
},
|
|
4038
|
+
}, sa = {
|
|
4017
4039
|
left: "text-left",
|
|
4018
4040
|
center: "text-center",
|
|
4019
4041
|
right: "text-right"
|
|
4020
4042
|
};
|
|
4021
|
-
function
|
|
4043
|
+
function ca() {
|
|
4022
4044
|
return {
|
|
4023
4045
|
id: "select",
|
|
4024
4046
|
size: 40,
|
|
@@ -4028,13 +4050,13 @@ function sa() {
|
|
|
4028
4050
|
enableHiding: !1,
|
|
4029
4051
|
enableResizing: !1,
|
|
4030
4052
|
enableColumnFilter: !1,
|
|
4031
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
4053
|
+
header: ({ table: e }) => /* @__PURE__ */ q(Wt, {
|
|
4032
4054
|
"aria-label": "Select all rows",
|
|
4033
4055
|
checked: e.getIsAllRowsSelected(),
|
|
4034
4056
|
indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
|
|
4035
4057
|
onChange: e.getToggleAllRowsSelectedHandler()
|
|
4036
4058
|
}),
|
|
4037
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
4059
|
+
cell: ({ row: e }) => /* @__PURE__ */ q(Wt, {
|
|
4038
4060
|
"aria-label": "Select row",
|
|
4039
4061
|
checked: e.getIsSelected(),
|
|
4040
4062
|
disabled: !e.getCanSelect(),
|
|
@@ -4043,7 +4065,7 @@ function sa() {
|
|
|
4043
4065
|
})
|
|
4044
4066
|
};
|
|
4045
4067
|
}
|
|
4046
|
-
function
|
|
4068
|
+
function la(e, t) {
|
|
4047
4069
|
return {
|
|
4048
4070
|
id: "actions",
|
|
4049
4071
|
header: t?.header ?? "",
|
|
@@ -4051,13 +4073,13 @@ function ca(e, t) {
|
|
|
4051
4073
|
enableSorting: !1,
|
|
4052
4074
|
enableColumnFilter: !1,
|
|
4053
4075
|
enableResizing: !1,
|
|
4054
|
-
cell: ({ row: t }) => /* @__PURE__ */
|
|
4076
|
+
cell: ({ row: t }) => /* @__PURE__ */ q(aa, {
|
|
4055
4077
|
row: t.original,
|
|
4056
4078
|
actions: e(t.original)
|
|
4057
4079
|
})
|
|
4058
4080
|
};
|
|
4059
4081
|
}
|
|
4060
|
-
function
|
|
4082
|
+
function ua(e) {
|
|
4061
4083
|
let t = e.getIsPinned();
|
|
4062
4084
|
return t ? {
|
|
4063
4085
|
position: "sticky",
|
|
@@ -4068,81 +4090,81 @@ function la(e) {
|
|
|
4068
4090
|
}
|
|
4069
4091
|
//#endregion
|
|
4070
4092
|
//#region src/components/TableV2/TableV2.tsx
|
|
4071
|
-
function
|
|
4093
|
+
function da(e, t, n) {
|
|
4072
4094
|
let [r, i] = m(n);
|
|
4073
4095
|
return [e === void 0 ? r : e, (e) => {
|
|
4074
4096
|
i((t) => typeof e == "function" ? e(t) : e), t?.(e);
|
|
4075
4097
|
}];
|
|
4076
4098
|
}
|
|
4077
|
-
var
|
|
4078
|
-
function
|
|
4079
|
-
let c = e.column, l =
|
|
4080
|
-
return /* @__PURE__ */
|
|
4099
|
+
var fa = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4100
|
+
function pa({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
4101
|
+
let c = e.column, l = fa.has(c.id), u = i && !l, d = ia(c.id), f = c.columnDef.meta?.align ?? "left", p = c.getIsSorted(), m = !l && (o && c.getCanPin() || s && c.getCanHide()), h = De(c.columnDef.header, e.getContext());
|
|
4102
|
+
return /* @__PURE__ */ J("th", {
|
|
4081
4103
|
ref: u ? d.setNodeRef : void 0,
|
|
4082
4104
|
colSpan: e.colSpan,
|
|
4083
4105
|
scope: "col",
|
|
4084
4106
|
style: {
|
|
4085
4107
|
width: a ? e.getSize() : void 0,
|
|
4086
|
-
...
|
|
4108
|
+
...ua(c),
|
|
4087
4109
|
...u ? d.style : null
|
|
4088
4110
|
},
|
|
4089
4111
|
"aria-sort": p === "asc" ? "ascending" : p === "desc" ? "descending" : void 0,
|
|
4090
|
-
className: Q("relative px-4 whitespace-nowrap bg-bg-container",
|
|
4112
|
+
className: Q("relative px-4 whitespace-nowrap bg-bg-container", oa[t], sa[f]),
|
|
4091
4113
|
children: [
|
|
4092
|
-
/* @__PURE__ */
|
|
4114
|
+
/* @__PURE__ */ J("div", {
|
|
4093
4115
|
className: "flex items-center gap-1",
|
|
4094
4116
|
children: [
|
|
4095
|
-
u && /* @__PURE__ */
|
|
4117
|
+
u && /* @__PURE__ */ q("button", {
|
|
4096
4118
|
type: "button",
|
|
4097
4119
|
className: "shrink-0 cursor-grab touch-none text-fg-tertiary hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 rounded-sm",
|
|
4098
4120
|
"aria-label": `Reorder ${typeof h == "string" ? h : c.id} column`,
|
|
4099
4121
|
...d.attributes,
|
|
4100
4122
|
...d.listeners,
|
|
4101
|
-
children: /* @__PURE__ */
|
|
4123
|
+
children: /* @__PURE__ */ q(te, { className: "h-3.5 w-3.5" })
|
|
4102
4124
|
}),
|
|
4103
|
-
n && c.getCanSort() ? /* @__PURE__ */
|
|
4125
|
+
n && c.getCanSort() ? /* @__PURE__ */ J("button", {
|
|
4104
4126
|
type: "button",
|
|
4105
4127
|
onClick: c.getToggleSortingHandler(),
|
|
4106
4128
|
className: "inline-flex items-center gap-1 hover:text-fg-default focus-visible:outline-none min-w-0",
|
|
4107
|
-
children: [/* @__PURE__ */
|
|
4129
|
+
children: [/* @__PURE__ */ q("span", {
|
|
4108
4130
|
className: "truncate",
|
|
4109
4131
|
children: h
|
|
4110
|
-
}), /* @__PURE__ */
|
|
4132
|
+
}), /* @__PURE__ */ q("span", {
|
|
4111
4133
|
className: "inline-flex shrink-0 text-fg-tertiary",
|
|
4112
|
-
children:
|
|
4134
|
+
children: q(p === "asc" ? v : p === "desc" ? _ : T, { className: "h-3.5 w-3.5" })
|
|
4113
4135
|
})]
|
|
4114
|
-
}) : /* @__PURE__ */
|
|
4136
|
+
}) : /* @__PURE__ */ q("span", {
|
|
4115
4137
|
className: "truncate",
|
|
4116
4138
|
children: h
|
|
4117
4139
|
}),
|
|
4118
|
-
m && /* @__PURE__ */
|
|
4140
|
+
m && /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q("button", {
|
|
4119
4141
|
type: "button",
|
|
4120
4142
|
"aria-label": `${typeof h == "string" ? h : c.id} column options`,
|
|
4121
4143
|
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",
|
|
4122
|
-
children: /* @__PURE__ */
|
|
4123
|
-
}) }), /* @__PURE__ */
|
|
4144
|
+
children: /* @__PURE__ */ q(R, { className: "h-3.5 w-3.5" })
|
|
4145
|
+
}) }), /* @__PURE__ */ J($n, {
|
|
4124
4146
|
align: "start",
|
|
4125
4147
|
children: [
|
|
4126
|
-
o && c.getCanPin() && /* @__PURE__ */
|
|
4127
|
-
c.getIsPinned() !== "left" && /* @__PURE__ */
|
|
4128
|
-
icon: /* @__PURE__ */
|
|
4148
|
+
o && c.getCanPin() && /* @__PURE__ */ J(K, { children: [
|
|
4149
|
+
c.getIsPinned() !== "left" && /* @__PURE__ */ q(er, {
|
|
4150
|
+
icon: /* @__PURE__ */ q(oe, { className: "h-4 w-4" }),
|
|
4129
4151
|
onSelect: () => c.pin("left"),
|
|
4130
4152
|
children: "Pin left"
|
|
4131
4153
|
}),
|
|
4132
|
-
c.getIsPinned() !== "right" && /* @__PURE__ */
|
|
4133
|
-
icon: /* @__PURE__ */
|
|
4154
|
+
c.getIsPinned() !== "right" && /* @__PURE__ */ q(er, {
|
|
4155
|
+
icon: /* @__PURE__ */ q(oe, { className: "h-4 w-4" }),
|
|
4134
4156
|
onSelect: () => c.pin("right"),
|
|
4135
4157
|
children: "Pin right"
|
|
4136
4158
|
}),
|
|
4137
|
-
c.getIsPinned() && /* @__PURE__ */
|
|
4138
|
-
icon: /* @__PURE__ */
|
|
4159
|
+
c.getIsPinned() && /* @__PURE__ */ q(er, {
|
|
4160
|
+
icon: /* @__PURE__ */ q(se, { className: "h-4 w-4" }),
|
|
4139
4161
|
onSelect: () => c.pin(!1),
|
|
4140
4162
|
children: "Unpin"
|
|
4141
4163
|
})
|
|
4142
4164
|
] }),
|
|
4143
|
-
o && c.getCanPin() && s && c.getCanHide() && /* @__PURE__ */
|
|
4144
|
-
s && c.getCanHide() && /* @__PURE__ */
|
|
4145
|
-
icon: /* @__PURE__ */
|
|
4165
|
+
o && c.getCanPin() && s && c.getCanHide() && /* @__PURE__ */ q(tr, {}),
|
|
4166
|
+
s && c.getCanHide() && /* @__PURE__ */ q(er, {
|
|
4167
|
+
icon: /* @__PURE__ */ q(M, { className: "h-4 w-4" }),
|
|
4146
4168
|
onSelect: () => c.toggleVisibility(!1),
|
|
4147
4169
|
children: "Hide column"
|
|
4148
4170
|
})
|
|
@@ -4150,12 +4172,12 @@ function fa({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4150
4172
|
})] })
|
|
4151
4173
|
]
|
|
4152
4174
|
}),
|
|
4153
|
-
r && c.getCanFilter() && /* @__PURE__ */
|
|
4175
|
+
r && c.getCanFilter() && /* @__PURE__ */ q("div", {
|
|
4154
4176
|
className: "mt-2 normal-case",
|
|
4155
4177
|
onClick: (e) => e.stopPropagation(),
|
|
4156
|
-
children: /* @__PURE__ */
|
|
4178
|
+
children: /* @__PURE__ */ q(Yi, { column: c })
|
|
4157
4179
|
}),
|
|
4158
|
-
a && c.getCanResize() && /* @__PURE__ */
|
|
4180
|
+
a && c.getCanResize() && /* @__PURE__ */ q("div", {
|
|
4159
4181
|
onMouseDown: e.getResizeHandler(),
|
|
4160
4182
|
onTouchStart: e.getResizeHandler(),
|
|
4161
4183
|
"data-resizing": c.getIsResizing() || void 0,
|
|
@@ -4164,78 +4186,78 @@ function fa({ header: e, density: t, enableSorting: n, enableFiltering: r, enabl
|
|
|
4164
4186
|
]
|
|
4165
4187
|
});
|
|
4166
4188
|
}
|
|
4167
|
-
function
|
|
4168
|
-
let n = e.getVisibleCells(), r = n.find((e) => !
|
|
4169
|
-
return /* @__PURE__ */
|
|
4189
|
+
function ma({ row: e, onRowClick: t }) {
|
|
4190
|
+
let n = e.getVisibleCells(), r = n.find((e) => !fa.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 && !fa.has(e.column.id));
|
|
4191
|
+
return /* @__PURE__ */ J("div", {
|
|
4170
4192
|
"data-selected": e.getIsSelected() || void 0,
|
|
4171
4193
|
onClick: t ? () => t(e.original) : void 0,
|
|
4172
4194
|
role: t ? "button" : void 0,
|
|
4173
4195
|
tabIndex: t ? 0 : void 0,
|
|
4174
4196
|
className: Q("flex flex-col gap-2 border-b border-border-default p-4", t && "cursor-pointer hover:bg-bg-container", e.getIsSelected() && "bg-brand-50"),
|
|
4175
|
-
children: [/* @__PURE__ */
|
|
4197
|
+
children: [/* @__PURE__ */ J("div", {
|
|
4176
4198
|
className: "flex items-center gap-2",
|
|
4177
4199
|
children: [
|
|
4178
|
-
i &&
|
|
4179
|
-
/* @__PURE__ */
|
|
4200
|
+
i && De(i.column.columnDef.cell, i.getContext()),
|
|
4201
|
+
/* @__PURE__ */ q("div", {
|
|
4180
4202
|
className: "flex-1 min-w-0 text-p-std font-medium text-fg-default truncate",
|
|
4181
|
-
children: r &&
|
|
4203
|
+
children: r && De(r.column.columnDef.cell, r.getContext())
|
|
4182
4204
|
}),
|
|
4183
|
-
a &&
|
|
4205
|
+
a && De(a.column.columnDef.cell, a.getContext())
|
|
4184
4206
|
]
|
|
4185
|
-
}), o.length > 0 && /* @__PURE__ */
|
|
4207
|
+
}), o.length > 0 && /* @__PURE__ */ q("dl", {
|
|
4186
4208
|
className: "grid grid-cols-2 gap-2",
|
|
4187
4209
|
children: o.map((e) => {
|
|
4188
4210
|
let t = e.column.columnDef.header;
|
|
4189
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ J("div", {
|
|
4190
4212
|
className: "min-w-0",
|
|
4191
|
-
children: [/* @__PURE__ */
|
|
4213
|
+
children: [/* @__PURE__ */ q("dt", {
|
|
4192
4214
|
className: "text-p-xs text-fg-tertiary uppercase tracking-wide",
|
|
4193
4215
|
children: typeof t == "string" ? t : e.column.id
|
|
4194
|
-
}), /* @__PURE__ */
|
|
4216
|
+
}), /* @__PURE__ */ q("dd", {
|
|
4195
4217
|
className: "text-p-sm text-fg-default truncate",
|
|
4196
|
-
children:
|
|
4218
|
+
children: De(e.column.columnDef.cell, e.getContext())
|
|
4197
4219
|
})]
|
|
4198
4220
|
}, e.id);
|
|
4199
4221
|
})
|
|
4200
4222
|
})]
|
|
4201
4223
|
});
|
|
4202
4224
|
}
|
|
4203
|
-
function
|
|
4204
|
-
return /* @__PURE__ */
|
|
4225
|
+
function ha({ rowCount: e }) {
|
|
4226
|
+
return /* @__PURE__ */ q("div", { children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ J("div", {
|
|
4205
4227
|
"aria-hidden": t > 0 || void 0,
|
|
4206
4228
|
className: "flex flex-col gap-2 border-b border-border-default p-4",
|
|
4207
|
-
children: [/* @__PURE__ */
|
|
4229
|
+
children: [/* @__PURE__ */ q(Ci, {
|
|
4208
4230
|
variant: "text",
|
|
4209
4231
|
width: "60%"
|
|
4210
|
-
}), /* @__PURE__ */
|
|
4232
|
+
}), /* @__PURE__ */ q(Ci, {
|
|
4211
4233
|
variant: "text",
|
|
4212
4234
|
width: "90%"
|
|
4213
4235
|
})]
|
|
4214
4236
|
}, t)) });
|
|
4215
4237
|
}
|
|
4216
|
-
function
|
|
4217
|
-
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: B, toolbar: de = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: me, onExport: he, density: V = "comfortable", stickyHeader: H = !1, fillHeight: U = !1, wrapperClassName:
|
|
4238
|
+
function ga(e, t) {
|
|
4239
|
+
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: B, toolbar: de = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: me, onExport: he, density: V = "comfortable", stickyHeader: H = !1, fillHeight: U = !1, wrapperClassName: W, className: G, dataTestId: ge } = e, [_e, ve] = da(u, h, []), [ye, be] = da(v, y, []), [xe, Se] = da(S, C, ""), [Y, Ce] = da(E, D, {}), [we, Te] = da(k, A, {}), [Pe, Fe] = da(M, ee, []), [Ie, Le] = da(N, ne, {}), [Re, Be] = da(re, ie, {
|
|
4218
4240
|
pageIndex: 0,
|
|
4219
4241
|
pageSize: L
|
|
4220
|
-
}), Z =
|
|
4242
|
+
}), Z = Me({
|
|
4221
4243
|
data: n,
|
|
4222
|
-
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [
|
|
4244
|
+
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [ca(), ...r], [r, w]),
|
|
4223
4245
|
getRowId: s,
|
|
4224
4246
|
state: {
|
|
4225
|
-
sorting:
|
|
4226
|
-
columnFilters:
|
|
4227
|
-
globalFilter:
|
|
4228
|
-
rowSelection:
|
|
4229
|
-
columnVisibility:
|
|
4230
|
-
columnOrder:
|
|
4247
|
+
sorting: _e,
|
|
4248
|
+
columnFilters: ye,
|
|
4249
|
+
globalFilter: xe,
|
|
4250
|
+
rowSelection: Y,
|
|
4251
|
+
columnVisibility: we,
|
|
4252
|
+
columnOrder: Pe,
|
|
4231
4253
|
columnPinning: Ie,
|
|
4232
4254
|
pagination: Re
|
|
4233
4255
|
},
|
|
4234
|
-
onSortingChange:
|
|
4235
|
-
onColumnFiltersChange:
|
|
4236
|
-
onGlobalFilterChange:
|
|
4237
|
-
onRowSelectionChange:
|
|
4238
|
-
onColumnVisibilityChange:
|
|
4256
|
+
onSortingChange: ve,
|
|
4257
|
+
onColumnFiltersChange: be,
|
|
4258
|
+
onGlobalFilterChange: Se,
|
|
4259
|
+
onRowSelectionChange: Ce,
|
|
4260
|
+
onColumnVisibilityChange: Te,
|
|
4239
4261
|
onColumnOrderChange: Fe,
|
|
4240
4262
|
onColumnPinningChange: Le,
|
|
4241
4263
|
onPaginationChange: Be,
|
|
@@ -4252,10 +4274,10 @@ function ha(e, t) {
|
|
|
4252
4274
|
manualPagination: oe,
|
|
4253
4275
|
pageCount: se,
|
|
4254
4276
|
rowCount: ce,
|
|
4255
|
-
getCoreRowModel:
|
|
4256
|
-
getSortedRowModel: c ?
|
|
4257
|
-
getFilteredRowModel: _ || x ?
|
|
4258
|
-
getPaginationRowModel: I ?
|
|
4277
|
+
getCoreRowModel: Oe(),
|
|
4278
|
+
getSortedRowModel: c ? je() : void 0,
|
|
4279
|
+
getFilteredRowModel: _ || x ? ke() : void 0,
|
|
4280
|
+
getPaginationRowModel: I ? Ae() : void 0
|
|
4259
4281
|
}), Ve = Z.getRowModel().rows, He = Z.getVisibleLeafColumns().length, Ue = p(null), [We, Ge] = m(null);
|
|
4260
4282
|
d(() => {
|
|
4261
4283
|
if (!I || z) return;
|
|
@@ -4268,34 +4290,34 @@ function ha(e, t) {
|
|
|
4268
4290
|
Ve,
|
|
4269
4291
|
We
|
|
4270
4292
|
]);
|
|
4271
|
-
let Ke = We ?? le, qe = I && !z ? Math.max(0, Re.pageSize - Ve.length) * Ke : 0, Je = f(() =>
|
|
4293
|
+
let Ke = We ?? le, qe = I && !z ? Math.max(0, Re.pageSize - Ve.length) * Ke : 0, Je = f(() => Pe.length > 0 ? Pe : Z.getAllLeafColumns().map((e) => e.id), [Pe, Z]), Ye = ra({
|
|
4272
4294
|
columnOrder: Je,
|
|
4273
4295
|
onColumnOrderChange: Fe
|
|
4274
|
-
}), Xe = (e) => Ye.handleDragEnd(e), Ze = p(null), Qe =
|
|
4296
|
+
}), Xe = (e) => Ye.handleDragEnd(e), Ze = p(null), Qe = Ee({
|
|
4275
4297
|
count: Ve.length,
|
|
4276
4298
|
getScrollElement: () => Ze.current,
|
|
4277
4299
|
estimateSize: () => le,
|
|
4278
4300
|
overscan: 10,
|
|
4279
4301
|
enabled: z
|
|
4280
|
-
}), $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 = Vt(
|
|
4302
|
+
}), $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 = Vt(ge), rt = (e) => {
|
|
4281
4303
|
let t = e.original?.id;
|
|
4282
4304
|
return typeof t == "string" || typeof t == "number" ? String(t) : e.id;
|
|
4283
|
-
}, it = (e, t) => /* @__PURE__ */
|
|
4305
|
+
}, it = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4284
4306
|
ref: t,
|
|
4285
4307
|
"data-test-id": nt(`row-${rt(e)}`),
|
|
4286
4308
|
"data-row-id": rt(e),
|
|
4287
4309
|
"data-selected": e.getIsSelected() || void 0,
|
|
4288
4310
|
onClick: B ? () => B(e.original) : void 0,
|
|
4289
4311
|
className: Q("group border-t border-border-default", B && "cursor-pointer"),
|
|
4290
|
-
children: e.getVisibleCells().map((e) => /* @__PURE__ */
|
|
4312
|
+
children: e.getVisibleCells().map((e) => /* @__PURE__ */ q("td", {
|
|
4291
4313
|
"data-test-id": nt(`cell-${e.column.id}`),
|
|
4292
|
-
style:
|
|
4293
|
-
className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50",
|
|
4294
|
-
children:
|
|
4314
|
+
style: ua(e.column),
|
|
4315
|
+
className: Q("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", oa[V], sa[e.column.columnDef.meta?.align ?? "left"]),
|
|
4316
|
+
children: De(e.column.columnDef.cell, e.getContext())
|
|
4295
4317
|
}, e.id))
|
|
4296
|
-
}, e.id), at = (e, t) => /* @__PURE__ */
|
|
4318
|
+
}, e.id), at = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4297
4319
|
"data-test-id": nt(`header-row-${e}`),
|
|
4298
|
-
children: t.map((e) => /* @__PURE__ */
|
|
4320
|
+
children: t.map((e) => /* @__PURE__ */ q(pa, {
|
|
4299
4321
|
header: e,
|
|
4300
4322
|
density: V,
|
|
4301
4323
|
enableSorting: c,
|
|
@@ -4305,31 +4327,31 @@ function ha(e, t) {
|
|
|
4305
4327
|
enablePinning: te,
|
|
4306
4328
|
enableColumnVisibility: O
|
|
4307
4329
|
}, e.id))
|
|
4308
|
-
}, e), ot = /* @__PURE__ */
|
|
4330
|
+
}, e), ot = /* @__PURE__ */ J("table", {
|
|
4309
4331
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4310
4332
|
style: { width: P ? Z.getTotalSize() : "100%" },
|
|
4311
|
-
children: [/* @__PURE__ */
|
|
4333
|
+
children: [/* @__PURE__ */ q("thead", {
|
|
4312
4334
|
className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (H || U) && "sticky top-0 z-10"),
|
|
4313
4335
|
children: Z.getHeaderGroups().map((e) => at(e.id, e.headers))
|
|
4314
|
-
}), /* @__PURE__ */
|
|
4336
|
+
}), /* @__PURE__ */ q("tbody", { children: i ? /* @__PURE__ */ q(Qi, {
|
|
4315
4337
|
columnCount: He,
|
|
4316
4338
|
rowCount: Re.pageSize,
|
|
4317
|
-
testIdPrefix:
|
|
4318
|
-
}) : Ve.length === 0 ? /* @__PURE__ */
|
|
4339
|
+
testIdPrefix: ge
|
|
4340
|
+
}) : Ve.length === 0 ? /* @__PURE__ */ q("tr", {
|
|
4319
4341
|
"data-test-id": nt("empty-row"),
|
|
4320
|
-
children: /* @__PURE__ */
|
|
4342
|
+
children: /* @__PURE__ */ q("td", {
|
|
4321
4343
|
colSpan: He,
|
|
4322
4344
|
className: "p-0",
|
|
4323
|
-
children: /* @__PURE__ */
|
|
4345
|
+
children: /* @__PURE__ */ q(ar, {
|
|
4324
4346
|
size: "sm",
|
|
4325
4347
|
title: o
|
|
4326
4348
|
})
|
|
4327
4349
|
})
|
|
4328
|
-
}) : z && $e ? /* @__PURE__ */
|
|
4329
|
-
et > 0 && /* @__PURE__ */
|
|
4350
|
+
}) : z && $e ? /* @__PURE__ */ J(K, { children: [
|
|
4351
|
+
et > 0 && /* @__PURE__ */ q("tr", {
|
|
4330
4352
|
"aria-hidden": !0,
|
|
4331
4353
|
"data-test-id": nt("padding-top-row"),
|
|
4332
|
-
children: /* @__PURE__ */
|
|
4354
|
+
children: /* @__PURE__ */ q("td", {
|
|
4333
4355
|
style: { height: et },
|
|
4334
4356
|
colSpan: He
|
|
4335
4357
|
})
|
|
@@ -4338,30 +4360,30 @@ function ha(e, t) {
|
|
|
4338
4360
|
let t = Ve[e.index];
|
|
4339
4361
|
return t ? it(t) : null;
|
|
4340
4362
|
}),
|
|
4341
|
-
tt > 0 && /* @__PURE__ */
|
|
4363
|
+
tt > 0 && /* @__PURE__ */ q("tr", {
|
|
4342
4364
|
"aria-hidden": !0,
|
|
4343
4365
|
"data-test-id": nt("padding-bottom-row"),
|
|
4344
|
-
children: /* @__PURE__ */
|
|
4366
|
+
children: /* @__PURE__ */ q("td", {
|
|
4345
4367
|
style: { height: tt },
|
|
4346
4368
|
colSpan: He
|
|
4347
4369
|
})
|
|
4348
4370
|
})
|
|
4349
|
-
] }) : /* @__PURE__ */
|
|
4371
|
+
] }) : /* @__PURE__ */ J(K, { children: [Ve.map((e, t) => it(e, t === 0 ? Ue : void 0)), qe > 0 && /* @__PURE__ */ q("tr", {
|
|
4350
4372
|
"aria-hidden": !0,
|
|
4351
4373
|
"data-test-id": nt("filler-row"),
|
|
4352
|
-
children: /* @__PURE__ */
|
|
4374
|
+
children: /* @__PURE__ */ q("td", {
|
|
4353
4375
|
style: { height: qe },
|
|
4354
4376
|
colSpan: He,
|
|
4355
4377
|
className: "p-0"
|
|
4356
4378
|
})
|
|
4357
4379
|
})] }) })]
|
|
4358
4380
|
});
|
|
4359
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ J("div", {
|
|
4360
4382
|
ref: t,
|
|
4361
|
-
"data-test-id":
|
|
4362
|
-
className: Q("w-full rounded-lg border border-border-default bg-bg-default", U && "h-full flex flex-col",
|
|
4383
|
+
"data-test-id": ge,
|
|
4384
|
+
className: Q("w-full rounded-lg border border-border-default bg-bg-default", U && "h-full flex flex-col", W, G),
|
|
4363
4385
|
children: [
|
|
4364
|
-
de === !1 ? null : de ?? /* @__PURE__ */
|
|
4386
|
+
de === !1 ? null : de ?? /* @__PURE__ */ q(ta, {
|
|
4365
4387
|
table: Z,
|
|
4366
4388
|
enableGlobalFilter: x,
|
|
4367
4389
|
enableColumnVisibility: O,
|
|
@@ -4370,61 +4392,61 @@ function ha(e, t) {
|
|
|
4370
4392
|
onExport: he,
|
|
4371
4393
|
actions: fe
|
|
4372
4394
|
}),
|
|
4373
|
-
a ? /* @__PURE__ */
|
|
4395
|
+
a ? /* @__PURE__ */ q("div", {
|
|
4374
4396
|
className: "p-4",
|
|
4375
|
-
children: /* @__PURE__ */
|
|
4397
|
+
children: /* @__PURE__ */ q(mr, {
|
|
4376
4398
|
variant: "danger",
|
|
4377
4399
|
title: "Couldn't load data",
|
|
4378
4400
|
description: a
|
|
4379
4401
|
})
|
|
4380
|
-
}) : /* @__PURE__ */
|
|
4402
|
+
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
4381
4403
|
className: Q("hidden", U ? "md:flex md:flex-col md:flex-1 md:min-h-0" : "md:block"),
|
|
4382
|
-
children: /* @__PURE__ */
|
|
4404
|
+
children: /* @__PURE__ */ q("div", {
|
|
4383
4405
|
ref: Ze,
|
|
4384
4406
|
className: Q("w-full overflow-auto", de === !1 ? "rounded-lg" : "rounded-b-lg", U && "flex-1 min-h-0"),
|
|
4385
4407
|
style: U ? void 0 : z || H ? { maxHeight: ue } : void 0,
|
|
4386
|
-
children: j ? /* @__PURE__ */
|
|
4408
|
+
children: j ? /* @__PURE__ */ q(Ne, {
|
|
4387
4409
|
sensors: Ye.sensors,
|
|
4388
4410
|
collisionDetection: Ye.collisionDetection,
|
|
4389
4411
|
modifiers: Ye.modifiers,
|
|
4390
4412
|
onDragEnd: Xe,
|
|
4391
|
-
children: /* @__PURE__ */
|
|
4413
|
+
children: /* @__PURE__ */ q(ze, {
|
|
4392
4414
|
items: Je,
|
|
4393
4415
|
strategy: X,
|
|
4394
4416
|
children: ot
|
|
4395
4417
|
})
|
|
4396
4418
|
}) : ot
|
|
4397
4419
|
})
|
|
4398
|
-
}), /* @__PURE__ */
|
|
4420
|
+
}), /* @__PURE__ */ q("div", {
|
|
4399
4421
|
className: "md:hidden",
|
|
4400
|
-
children: i ? /* @__PURE__ */
|
|
4422
|
+
children: i ? /* @__PURE__ */ q(ha, { rowCount: Re.pageSize }) : Ve.length === 0 ? /* @__PURE__ */ q(ar, {
|
|
4401
4423
|
size: "sm",
|
|
4402
4424
|
title: o
|
|
4403
|
-
}) : Ve.map((e) => /* @__PURE__ */
|
|
4425
|
+
}) : Ve.map((e) => /* @__PURE__ */ q(ma, {
|
|
4404
4426
|
row: e,
|
|
4405
4427
|
onRowClick: B
|
|
4406
4428
|
}, e.id))
|
|
4407
4429
|
})] }),
|
|
4408
|
-
I && !a && /* @__PURE__ */
|
|
4430
|
+
I && !a && /* @__PURE__ */ q(Zi, {
|
|
4409
4431
|
table: Z,
|
|
4410
4432
|
pageSizeOptions: R,
|
|
4411
4433
|
locale: ae,
|
|
4412
|
-
dataTestId:
|
|
4434
|
+
dataTestId: ge
|
|
4413
4435
|
})
|
|
4414
4436
|
]
|
|
4415
4437
|
});
|
|
4416
4438
|
}
|
|
4417
|
-
var
|
|
4418
|
-
|
|
4439
|
+
var _a = a(ga);
|
|
4440
|
+
_a.displayName = "TableV2";
|
|
4419
4441
|
//#endregion
|
|
4420
4442
|
//#region src/components/Tabs/Tabs.tsx
|
|
4421
|
-
var
|
|
4422
|
-
function
|
|
4423
|
-
let e = c(
|
|
4443
|
+
var va = r(null);
|
|
4444
|
+
function ya() {
|
|
4445
|
+
let e = c(va);
|
|
4424
4446
|
if (!e) throw Error("Tab components must be used inside <Tabs>");
|
|
4425
4447
|
return e;
|
|
4426
4448
|
}
|
|
4427
|
-
function
|
|
4449
|
+
function ba(t) {
|
|
4428
4450
|
let n = [];
|
|
4429
4451
|
e.forEach(t, (e) => {
|
|
4430
4452
|
o(e) && n.push(e);
|
|
@@ -4438,9 +4460,9 @@ function ya(t) {
|
|
|
4438
4460
|
}
|
|
4439
4461
|
return "";
|
|
4440
4462
|
}
|
|
4441
|
-
var
|
|
4442
|
-
let [f, p] = m(() => e ??
|
|
4443
|
-
return /* @__PURE__ */
|
|
4463
|
+
var xa = 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) {
|
|
4464
|
+
let [f, p] = m(() => e ?? ba(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
4465
|
+
return /* @__PURE__ */ q(va.Provider, {
|
|
4444
4466
|
value: {
|
|
4445
4467
|
value: g,
|
|
4446
4468
|
setValue: (e) => {
|
|
@@ -4451,7 +4473,7 @@ var ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4451
4473
|
tabsId: _,
|
|
4452
4474
|
disabled: a
|
|
4453
4475
|
},
|
|
4454
|
-
children: /* @__PURE__ */
|
|
4476
|
+
children: /* @__PURE__ */ q("div", {
|
|
4455
4477
|
ref: d,
|
|
4456
4478
|
"data-test-id": c,
|
|
4457
4479
|
className: Q("flex flex-col gap-4", o),
|
|
@@ -4459,9 +4481,9 @@ var ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4459
4481
|
children: s
|
|
4460
4482
|
})
|
|
4461
4483
|
});
|
|
4462
|
-
}),
|
|
4463
|
-
let { variant: s } =
|
|
4464
|
-
return /* @__PURE__ */
|
|
4484
|
+
}), Sa = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
4485
|
+
let { variant: s } = ya(), c = p(null);
|
|
4486
|
+
return /* @__PURE__ */ q("div", {
|
|
4465
4487
|
ref: Gt(o, c),
|
|
4466
4488
|
role: "tablist",
|
|
4467
4489
|
onKeyDown: (e) => {
|
|
@@ -4482,12 +4504,12 @@ var ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4482
4504
|
children: e
|
|
4483
4505
|
});
|
|
4484
4506
|
});
|
|
4485
|
-
|
|
4486
|
-
var
|
|
4507
|
+
Sa.displayName = "TabList";
|
|
4508
|
+
var Ca = {
|
|
4487
4509
|
lg: "h-11 px-4 text-p-md",
|
|
4488
4510
|
md: "h-10 px-3 text-p-std",
|
|
4489
4511
|
sm: "h-8 px-2.5 text-p-sm"
|
|
4490
|
-
},
|
|
4512
|
+
}, wa = {
|
|
4491
4513
|
underline: {
|
|
4492
4514
|
on: "bg-brand-500 text-white",
|
|
4493
4515
|
off: "bg-bg-subtle text-fg-secondary"
|
|
@@ -4500,8 +4522,8 @@ var Sa = {
|
|
|
4500
4522
|
on: "bg-brand-500 text-white",
|
|
4501
4523
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4502
4524
|
}
|
|
4503
|
-
},
|
|
4504
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } =
|
|
4525
|
+
}, Ta = 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) {
|
|
4526
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = ya(), x = Je(h, e), S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Q("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" ? Q("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? Q("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : Q("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__ */ J("button", {
|
|
4505
4527
|
ref: m,
|
|
4506
4528
|
id: w,
|
|
4507
4529
|
type: "button",
|
|
@@ -4517,31 +4539,31 @@ var Sa = {
|
|
|
4517
4539
|
className: Q(E, D, o && "pr-9", l),
|
|
4518
4540
|
...p,
|
|
4519
4541
|
children: [
|
|
4520
|
-
r && /* @__PURE__ */
|
|
4542
|
+
r && /* @__PURE__ */ q("span", {
|
|
4521
4543
|
className: "inline-flex shrink-0",
|
|
4522
4544
|
children: r
|
|
4523
4545
|
}),
|
|
4524
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ q("span", {
|
|
4525
4547
|
className: "truncate",
|
|
4526
4548
|
children: t
|
|
4527
4549
|
}),
|
|
4528
|
-
C && (a ? /* @__PURE__ */
|
|
4550
|
+
C && (a ? /* @__PURE__ */ q(At, {
|
|
4529
4551
|
size: "xs",
|
|
4530
4552
|
...a,
|
|
4531
4553
|
children: i
|
|
4532
|
-
}) : /* @__PURE__ */
|
|
4533
|
-
className: Q("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 ?
|
|
4554
|
+
}) : /* @__PURE__ */ q("span", {
|
|
4555
|
+
className: Q("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 ? wa[_].on : wa[_].off),
|
|
4534
4556
|
children: i
|
|
4535
4557
|
})),
|
|
4536
|
-
_ === "underline" && /* @__PURE__ */
|
|
4558
|
+
_ === "underline" && /* @__PURE__ */ q("span", {
|
|
4537
4559
|
"aria-hidden": !0,
|
|
4538
4560
|
className: Q("pointer-events-none absolute inset-x-0 -bottom-px h-[2px] rounded-full bg-brand-500 transition-opacity duration-150", x ? "opacity-100" : "opacity-0")
|
|
4539
4561
|
})
|
|
4540
4562
|
]
|
|
4541
4563
|
});
|
|
4542
|
-
return o ? /* @__PURE__ */
|
|
4564
|
+
return o ? /* @__PURE__ */ J("span", {
|
|
4543
4565
|
className: "relative inline-flex",
|
|
4544
|
-
children: [O, /* @__PURE__ */
|
|
4566
|
+
children: [O, /* @__PURE__ */ q("button", {
|
|
4545
4567
|
type: "button",
|
|
4546
4568
|
"aria-label": c,
|
|
4547
4569
|
disabled: S,
|
|
@@ -4552,9 +4574,9 @@ var Sa = {
|
|
|
4552
4574
|
children: o
|
|
4553
4575
|
})]
|
|
4554
4576
|
}) : O;
|
|
4555
|
-
}),
|
|
4556
|
-
let { value: c, tabsId: l } =
|
|
4557
|
-
return !u && !a ? null : /* @__PURE__ */
|
|
4577
|
+
}), Ea = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4578
|
+
let { value: c, tabsId: l } = ya(), u = Je(c, e);
|
|
4579
|
+
return !u && !a ? null : /* @__PURE__ */ q("div", {
|
|
4558
4580
|
ref: s,
|
|
4559
4581
|
id: i ?? `${l}-panel-${e}`,
|
|
4560
4582
|
role: "tabpanel",
|
|
@@ -4565,28 +4587,28 @@ var Sa = {
|
|
|
4565
4587
|
...o,
|
|
4566
4588
|
children: t
|
|
4567
4589
|
});
|
|
4568
|
-
}),
|
|
4590
|
+
}), Da = 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) {
|
|
4569
4591
|
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;
|
|
4570
|
-
return /* @__PURE__ */
|
|
4592
|
+
return /* @__PURE__ */ J("div", {
|
|
4571
4593
|
className: Q("flex flex-col gap-1.5 w-full", f),
|
|
4572
4594
|
"data-test-id": _,
|
|
4573
4595
|
children: [
|
|
4574
|
-
(e || t) && /* @__PURE__ */
|
|
4596
|
+
(e || t) && /* @__PURE__ */ J("div", {
|
|
4575
4597
|
className: "flex items-center gap-1.5",
|
|
4576
|
-
children: [e && /* @__PURE__ */
|
|
4598
|
+
children: [e && /* @__PURE__ */ J("label", {
|
|
4577
4599
|
htmlFor: S,
|
|
4578
4600
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
4579
|
-
children: [e, s && /* @__PURE__ */
|
|
4601
|
+
children: [e, s && /* @__PURE__ */ q("span", {
|
|
4580
4602
|
className: "text-red-600",
|
|
4581
4603
|
"aria-hidden": !0,
|
|
4582
4604
|
children: "*"
|
|
4583
4605
|
})]
|
|
4584
|
-
}), t && /* @__PURE__ */
|
|
4606
|
+
}), t && /* @__PURE__ */ q("span", {
|
|
4585
4607
|
className: "inline-flex items-center gap-1",
|
|
4586
4608
|
children: t
|
|
4587
4609
|
})]
|
|
4588
4610
|
}),
|
|
4589
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ q("textarea", {
|
|
4590
4612
|
ref: b,
|
|
4591
4613
|
id: S,
|
|
4592
4614
|
disabled: o,
|
|
@@ -4603,20 +4625,20 @@ var Sa = {
|
|
|
4603
4625
|
className: Q("w-full px-3 py-2.5 rounded-lg border bg-bg-default text-p-std text-fg-default placeholder:text-fg-tertiary outline-none transition-colors resize-y", C ? "border-red-600" : "border-border-default", !o && !C && "hover:border-border-strong", "focus:ring-2", C ? "focus:ring-red-300 focus:border-red-600" : "focus:ring-brand-300 focus:border-brand-500", o && "bg-bg-container border-border-default cursor-not-allowed", d),
|
|
4604
4626
|
...y
|
|
4605
4627
|
}),
|
|
4606
|
-
/* @__PURE__ */
|
|
4628
|
+
/* @__PURE__ */ J("div", {
|
|
4607
4629
|
className: "flex items-start justify-between gap-2",
|
|
4608
|
-
children: [/* @__PURE__ */
|
|
4630
|
+
children: [/* @__PURE__ */ q("div", {
|
|
4609
4631
|
className: "flex-1 min-w-0",
|
|
4610
|
-
children: r ? /* @__PURE__ */
|
|
4632
|
+
children: r ? /* @__PURE__ */ q("p", {
|
|
4611
4633
|
id: `${S}-error`,
|
|
4612
4634
|
className: "text-p-sm text-red-700",
|
|
4613
4635
|
children: r
|
|
4614
|
-
}) : n ? /* @__PURE__ */
|
|
4636
|
+
}) : n ? /* @__PURE__ */ q("p", {
|
|
4615
4637
|
id: `${S}-help`,
|
|
4616
4638
|
className: "text-p-sm text-fg-secondary",
|
|
4617
4639
|
children: n
|
|
4618
4640
|
}) : null
|
|
4619
|
-
}), E && /* @__PURE__ */
|
|
4641
|
+
}), E && /* @__PURE__ */ J("p", {
|
|
4620
4642
|
className: "text-p-sm text-fg-tertiary tabular-nums shrink-0",
|
|
4621
4643
|
children: [
|
|
4622
4644
|
k,
|
|
@@ -4627,16 +4649,16 @@ var Sa = {
|
|
|
4627
4649
|
})
|
|
4628
4650
|
]
|
|
4629
4651
|
});
|
|
4630
|
-
}),
|
|
4652
|
+
}), Oa = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
4631
4653
|
let c = u(), l = n ?? c;
|
|
4632
|
-
return /* @__PURE__ */
|
|
4654
|
+
return /* @__PURE__ */ J("label", {
|
|
4633
4655
|
htmlFor: l,
|
|
4634
4656
|
"data-test-id": a,
|
|
4635
4657
|
className: Q("inline-flex items-center gap-3", r ? "cursor-not-allowed opacity-60" : "cursor-pointer", i),
|
|
4636
|
-
children: [/* @__PURE__ */
|
|
4658
|
+
children: [/* @__PURE__ */ J("span", {
|
|
4637
4659
|
className: "relative inline-flex shrink-0",
|
|
4638
4660
|
children: [
|
|
4639
|
-
/* @__PURE__ */
|
|
4661
|
+
/* @__PURE__ */ q("input", {
|
|
4640
4662
|
ref: s,
|
|
4641
4663
|
id: l,
|
|
4642
4664
|
type: "checkbox",
|
|
@@ -4647,40 +4669,40 @@ var Sa = {
|
|
|
4647
4669
|
className: "peer sr-only",
|
|
4648
4670
|
...o
|
|
4649
4671
|
}),
|
|
4650
|
-
/* @__PURE__ */
|
|
4672
|
+
/* @__PURE__ */ J("span", {
|
|
4651
4673
|
className: Q("inline-flex h-8 w-16 items-center justify-between rounded-full border px-2 transition-colors", "peer-checked:bg-gray-700 dark:bg-gray-700 dark:peer-checked:bg-gray-900", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2"),
|
|
4652
|
-
children: [/* @__PURE__ */
|
|
4674
|
+
children: [/* @__PURE__ */ q(fe, {
|
|
4653
4675
|
className: "size-4 text-yellow-500 z-1",
|
|
4654
4676
|
"aria-hidden": !0
|
|
4655
|
-
}), /* @__PURE__ */
|
|
4677
|
+
}), /* @__PURE__ */ q(L, {
|
|
4656
4678
|
className: "size-4 text-gray-400 z-1",
|
|
4657
4679
|
"aria-hidden": !0
|
|
4658
4680
|
})]
|
|
4659
4681
|
}),
|
|
4660
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ q("span", {
|
|
4661
4683
|
"aria-hidden": !0,
|
|
4662
4684
|
className: "absolute left-1 top-1 size-6 rounded-full bg-white shadow-[0_1px_3px_#00000040] transition-transform peer-checked:translate-x-8 peer-checked:bg-gray-600"
|
|
4663
4685
|
})
|
|
4664
4686
|
]
|
|
4665
|
-
}), t && /* @__PURE__ */
|
|
4687
|
+
}), t && /* @__PURE__ */ q("span", {
|
|
4666
4688
|
className: "text-p-std font-medium text-fg-default",
|
|
4667
4689
|
children: t
|
|
4668
4690
|
})]
|
|
4669
4691
|
});
|
|
4670
|
-
}),
|
|
4692
|
+
}), ka = {
|
|
4671
4693
|
lg: "px-3 py-2 text-p-std",
|
|
4672
4694
|
sm: "px-2 py-1 text-p-sm"
|
|
4673
|
-
},
|
|
4695
|
+
}, Aa = {
|
|
4674
4696
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
4675
4697
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
4676
4698
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
4677
4699
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
4678
|
-
},
|
|
4700
|
+
}, ja = {
|
|
4679
4701
|
top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
|
|
4680
4702
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
|
|
4681
4703
|
left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
|
|
4682
4704
|
right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
|
|
4683
|
-
},
|
|
4705
|
+
}, Ma = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, className: s, dataTestId: c }, l) {
|
|
4684
4706
|
let [d, f] = m(!1), h = p(null), g = u(), _ = () => {
|
|
4685
4707
|
h.current && clearTimeout(h.current), h.current = setTimeout(() => f(!0), a);
|
|
4686
4708
|
}, v = () => {
|
|
@@ -4688,7 +4710,7 @@ var Sa = {
|
|
|
4688
4710
|
};
|
|
4689
4711
|
if (!o(t)) return t;
|
|
4690
4712
|
let y = t.props ?? {};
|
|
4691
|
-
return /* @__PURE__ */
|
|
4713
|
+
return /* @__PURE__ */ J("span", {
|
|
4692
4714
|
ref: l,
|
|
4693
4715
|
"data-test-id": c,
|
|
4694
4716
|
className: "relative inline-flex",
|
|
@@ -4698,42 +4720,42 @@ var Sa = {
|
|
|
4698
4720
|
onFocus: _,
|
|
4699
4721
|
onBlur: v,
|
|
4700
4722
|
"aria-describedby": d ? g : y["aria-describedby"]
|
|
4701
|
-
}), d && /* @__PURE__ */
|
|
4723
|
+
}), d && /* @__PURE__ */ J("span", {
|
|
4702
4724
|
role: "tooltip",
|
|
4703
4725
|
id: g,
|
|
4704
|
-
className: Q("absolute z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none",
|
|
4705
|
-
children: [e, /* @__PURE__ */
|
|
4726
|
+
className: Q("absolute z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", ka[i], Aa[r], s),
|
|
4727
|
+
children: [e, /* @__PURE__ */ q("span", {
|
|
4706
4728
|
"aria-hidden": !0,
|
|
4707
|
-
className: Q("absolute h-0 w-0 border-4",
|
|
4729
|
+
className: Q("absolute h-0 w-0 border-4", ja[r])
|
|
4708
4730
|
})]
|
|
4709
4731
|
})]
|
|
4710
4732
|
});
|
|
4711
|
-
}),
|
|
4733
|
+
}), Na = "We'll be back soon", Pa = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", Fa = {
|
|
4712
4734
|
lg: "xl",
|
|
4713
4735
|
sm: "lg"
|
|
4714
|
-
},
|
|
4715
|
-
return /* @__PURE__ */
|
|
4736
|
+
}, Ia = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
4737
|
+
return /* @__PURE__ */ q(ar, {
|
|
4716
4738
|
ref: a,
|
|
4717
4739
|
size: e,
|
|
4718
|
-
title: t ??
|
|
4719
|
-
description: n ??
|
|
4720
|
-
illustration: r ?? /* @__PURE__ */
|
|
4740
|
+
title: t ?? Na,
|
|
4741
|
+
description: n ?? Pa,
|
|
4742
|
+
illustration: r ?? /* @__PURE__ */ q(wn, {
|
|
4721
4743
|
icon: k,
|
|
4722
4744
|
tone: "brand",
|
|
4723
4745
|
shape: "circle",
|
|
4724
|
-
size:
|
|
4746
|
+
size: Fa[e]
|
|
4725
4747
|
}),
|
|
4726
4748
|
...i
|
|
4727
4749
|
});
|
|
4728
4750
|
});
|
|
4729
4751
|
//#endregion
|
|
4730
4752
|
//#region src/hooks/useStepper.ts
|
|
4731
|
-
function
|
|
4753
|
+
function La(e, t) {
|
|
4732
4754
|
return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
|
|
4733
4755
|
}
|
|
4734
|
-
function
|
|
4735
|
-
let [a, o] = m(() =>
|
|
4736
|
-
let n =
|
|
4756
|
+
function Ra({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
|
|
4757
|
+
let [a, o] = m(() => La(t, e)), s = n !== void 0, c = s ? La(n, e) : a, l = (t) => {
|
|
4758
|
+
let n = La(t, e);
|
|
4737
4759
|
s || o(n), r?.(n);
|
|
4738
4760
|
};
|
|
4739
4761
|
return {
|
|
@@ -4761,37 +4783,37 @@ function La({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i =
|
|
|
4761
4783
|
}
|
|
4762
4784
|
//#endregion
|
|
4763
4785
|
//#region src/hooks/useOnOutsideClick.ts
|
|
4764
|
-
var
|
|
4765
|
-
function
|
|
4766
|
-
let t =
|
|
4786
|
+
var za = [];
|
|
4787
|
+
function Ba(e) {
|
|
4788
|
+
let t = za[za.length - 1];
|
|
4767
4789
|
if (!t) return;
|
|
4768
4790
|
let { ref: n, callback: r, shouldRemoveCallback: i } = t;
|
|
4769
|
-
n && !n.contains(e.target) && (i &&
|
|
4791
|
+
n && !n.contains(e.target) && (i && za.splice(za.length - 1, 1), r(e));
|
|
4770
4792
|
}
|
|
4771
|
-
var
|
|
4793
|
+
var Va = (e, t, n, r, i = !0) => {
|
|
4772
4794
|
l(() => {
|
|
4773
|
-
if (e && n && r) return
|
|
4795
|
+
if (e && n && r) return za.push({
|
|
4774
4796
|
ref: e,
|
|
4775
4797
|
callback: t,
|
|
4776
4798
|
uid: r,
|
|
4777
4799
|
shouldRemoveCallback: i
|
|
4778
|
-
}),
|
|
4779
|
-
|
|
4800
|
+
}), za.length === 1 && document.addEventListener("mousedown", Ba), () => {
|
|
4801
|
+
za.length === 0 && document.removeEventListener("mousedown", Ba);
|
|
4780
4802
|
};
|
|
4781
4803
|
}, [
|
|
4782
4804
|
e,
|
|
4783
4805
|
n,
|
|
4784
4806
|
r
|
|
4785
4807
|
]), l(() => {
|
|
4786
|
-
if (!n &&
|
|
4787
|
-
let e =
|
|
4788
|
-
e >= 0 &&
|
|
4808
|
+
if (!n && za.length > 0) {
|
|
4809
|
+
let e = za.findIndex((e) => e.uid === r);
|
|
4810
|
+
e >= 0 && za.splice(e, 1);
|
|
4789
4811
|
}
|
|
4790
4812
|
}, [n]);
|
|
4791
4813
|
};
|
|
4792
4814
|
//#endregion
|
|
4793
4815
|
//#region src/hooks/useEscapeKey.ts
|
|
4794
|
-
function
|
|
4816
|
+
function Ha(e, t = !0) {
|
|
4795
4817
|
l(() => {
|
|
4796
4818
|
if (!t) return;
|
|
4797
4819
|
let n = (t) => {
|
|
@@ -4802,18 +4824,18 @@ function Va(e, t = !0) {
|
|
|
4802
4824
|
}
|
|
4803
4825
|
//#endregion
|
|
4804
4826
|
//#region src/hooks/useHideBodyScroll.ts
|
|
4805
|
-
var
|
|
4806
|
-
function
|
|
4827
|
+
var Ua = 0, Wa = "";
|
|
4828
|
+
function Ga(e) {
|
|
4807
4829
|
l(() => {
|
|
4808
|
-
if (e) return
|
|
4809
|
-
--
|
|
4830
|
+
if (e) return Ua === 0 && (Wa = document.body.style.overflow, document.body.style.overflow = "hidden"), Ua += 1, () => {
|
|
4831
|
+
--Ua, Ua === 0 && (document.body.style.overflow = Wa);
|
|
4810
4832
|
};
|
|
4811
4833
|
}, [e]);
|
|
4812
4834
|
}
|
|
4813
4835
|
//#endregion
|
|
4814
4836
|
//#region src/hooks/useIsMobile.ts
|
|
4815
|
-
var
|
|
4816
|
-
function
|
|
4837
|
+
var Ka = 768;
|
|
4838
|
+
function qa(e = Ka) {
|
|
4817
4839
|
let [t, n] = m(!1);
|
|
4818
4840
|
return l(() => {
|
|
4819
4841
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -4823,33 +4845,33 @@ function Ka(e = Ga) {
|
|
|
4823
4845
|
}
|
|
4824
4846
|
//#endregion
|
|
4825
4847
|
//#region src/hooks/useFormContext.ts
|
|
4826
|
-
function
|
|
4827
|
-
let e = c(
|
|
4848
|
+
function Ja() {
|
|
4849
|
+
let e = c(lr);
|
|
4828
4850
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
4829
4851
|
return e;
|
|
4830
4852
|
}
|
|
4831
4853
|
//#endregion
|
|
4832
4854
|
//#region src/hooks/useFormProps.ts
|
|
4833
|
-
var
|
|
4855
|
+
var Ya = () => void 0, Xa = {
|
|
4834
4856
|
errors: {},
|
|
4835
|
-
setValue:
|
|
4836
|
-
reset:
|
|
4837
|
-
clearErrors:
|
|
4838
|
-
setError:
|
|
4839
|
-
unregister:
|
|
4857
|
+
setValue: Ya,
|
|
4858
|
+
reset: Ya,
|
|
4859
|
+
clearErrors: Ya,
|
|
4860
|
+
setError: Ya,
|
|
4861
|
+
unregister: Ya,
|
|
4840
4862
|
isDirty: !1,
|
|
4841
4863
|
isSubmitted: !1,
|
|
4842
4864
|
isSubmitting: !1,
|
|
4843
4865
|
isValid: !1,
|
|
4844
4866
|
dirtyFields: {},
|
|
4845
|
-
submit:
|
|
4867
|
+
submit: Ya
|
|
4846
4868
|
};
|
|
4847
|
-
function
|
|
4848
|
-
return c(
|
|
4869
|
+
function Za() {
|
|
4870
|
+
return c(lr) ?? Xa;
|
|
4849
4871
|
}
|
|
4850
4872
|
//#endregion
|
|
4851
4873
|
//#region src/tokens/colors.ts
|
|
4852
|
-
var
|
|
4874
|
+
var Qa = {
|
|
4853
4875
|
900: "#31531C",
|
|
4854
4876
|
800: "#416E26",
|
|
4855
4877
|
700: "#518A2F",
|
|
@@ -4875,7 +4897,7 @@ var Za = {
|
|
|
4875
4897
|
100: "#f2f5f8",
|
|
4876
4898
|
50: "#f5f7fa",
|
|
4877
4899
|
20: "#f7f9fc"
|
|
4878
|
-
},
|
|
4900
|
+
}, $a = "#FEFEFE", eo = {
|
|
4879
4901
|
900: "#0b4627",
|
|
4880
4902
|
800: "#0f5c33",
|
|
4881
4903
|
700: "#3D8B46",
|
|
@@ -4886,7 +4908,7 @@ var Za = {
|
|
|
4886
4908
|
200: "#aeeacb",
|
|
4887
4909
|
100: "#d0f5e1",
|
|
4888
4910
|
50: "#e0faec"
|
|
4889
|
-
},
|
|
4911
|
+
}, to = {
|
|
4890
4912
|
900: "#2443B8",
|
|
4891
4913
|
800: "#2E63D6",
|
|
4892
4914
|
700: "#3475E8",
|
|
@@ -4897,7 +4919,7 @@ var Za = {
|
|
|
4897
4919
|
200: "#9ACAFA",
|
|
4898
4920
|
100: "#C1DEFC",
|
|
4899
4921
|
50: "#E6F2FE"
|
|
4900
|
-
},
|
|
4922
|
+
}, no = {
|
|
4901
4923
|
900: "#081FA6",
|
|
4902
4924
|
800: "#0E2AB2",
|
|
4903
4925
|
700: "#2431B9",
|
|
@@ -4909,7 +4931,7 @@ var Za = {
|
|
|
4909
4931
|
100: "#CBC4ED",
|
|
4910
4932
|
50: "#EAE7F7",
|
|
4911
4933
|
20: "#F5F3FB"
|
|
4912
|
-
},
|
|
4934
|
+
}, ro = {
|
|
4913
4935
|
900: "#4A0A20",
|
|
4914
4936
|
800: "#79012F",
|
|
4915
4937
|
700: "#A2023F",
|
|
@@ -4920,7 +4942,7 @@ var Za = {
|
|
|
4920
4942
|
200: "#FE7DAF",
|
|
4921
4943
|
100: "#FEA8C9",
|
|
4922
4944
|
50: "#FFD4E4"
|
|
4923
|
-
},
|
|
4945
|
+
}, io = {
|
|
4924
4946
|
900: "#8b1822",
|
|
4925
4947
|
800: "#ad1f2b",
|
|
4926
4948
|
700: "#d02533",
|
|
@@ -4932,7 +4954,7 @@ var Za = {
|
|
|
4932
4954
|
100: "#ffd5d8",
|
|
4933
4955
|
50: "#ffebec",
|
|
4934
4956
|
20: "#fff4f4"
|
|
4935
|
-
},
|
|
4957
|
+
}, ao = {
|
|
4936
4958
|
900: "#EB7520",
|
|
4937
4959
|
800: "#ED912A",
|
|
4938
4960
|
700: "#EEA02F",
|
|
@@ -4943,47 +4965,47 @@ var Za = {
|
|
|
4943
4965
|
200: "#F7DE8E",
|
|
4944
4966
|
100: "#FAEBB9",
|
|
4945
4967
|
50: "#FDF7E4"
|
|
4946
|
-
}, ao = {
|
|
4947
|
-
brand: Za,
|
|
4948
|
-
gray: $,
|
|
4949
|
-
green: $a,
|
|
4950
|
-
blue: eo,
|
|
4951
|
-
purple: to,
|
|
4952
|
-
pink: no,
|
|
4953
|
-
red: ro,
|
|
4954
|
-
yellow: io
|
|
4955
4968
|
}, oo = {
|
|
4956
|
-
|
|
4969
|
+
brand: Qa,
|
|
4970
|
+
gray: $,
|
|
4971
|
+
green: eo,
|
|
4972
|
+
blue: to,
|
|
4973
|
+
purple: no,
|
|
4974
|
+
pink: ro,
|
|
4975
|
+
red: io,
|
|
4976
|
+
yellow: ao
|
|
4977
|
+
}, so = {
|
|
4978
|
+
bgDefault: $a,
|
|
4957
4979
|
bgContainer: $[50],
|
|
4958
4980
|
bgSubtle: $[100],
|
|
4959
|
-
bgBrandLighter:
|
|
4960
|
-
bgInfoLighter:
|
|
4961
|
-
bgSuccessLighter:
|
|
4962
|
-
bgWarningLighter:
|
|
4963
|
-
bgDangerLighter:
|
|
4981
|
+
bgBrandLighter: Qa[20],
|
|
4982
|
+
bgInfoLighter: to[50],
|
|
4983
|
+
bgSuccessLighter: eo[50],
|
|
4984
|
+
bgWarningLighter: ao[50],
|
|
4985
|
+
bgDangerLighter: io[50],
|
|
4964
4986
|
fgDefault: $[900],
|
|
4965
4987
|
fgSecondary: $[600],
|
|
4966
4988
|
fgTertiary: $[500],
|
|
4967
4989
|
fgDisabled: $[400],
|
|
4968
|
-
fgInverse:
|
|
4969
|
-
fgBrand:
|
|
4970
|
-
fgInfo:
|
|
4971
|
-
fgSuccess:
|
|
4972
|
-
fgWarning:
|
|
4973
|
-
fgDanger:
|
|
4990
|
+
fgInverse: $a,
|
|
4991
|
+
fgBrand: Qa[500],
|
|
4992
|
+
fgInfo: to[600],
|
|
4993
|
+
fgSuccess: eo[600],
|
|
4994
|
+
fgWarning: ao[800],
|
|
4995
|
+
fgDanger: io[800],
|
|
4974
4996
|
borderDefault: $[200],
|
|
4975
4997
|
borderSubtle: $[100],
|
|
4976
4998
|
borderStrong: $[300],
|
|
4977
|
-
borderBrand:
|
|
4999
|
+
borderBrand: Qa[500],
|
|
4978
5000
|
iconPrimary: $[900],
|
|
4979
5001
|
iconSecondary: $[600],
|
|
4980
|
-
iconInverse:
|
|
4981
|
-
iconBrand:
|
|
4982
|
-
iconInfo:
|
|
4983
|
-
iconDanger:
|
|
4984
|
-
iconWarning:
|
|
4985
|
-
},
|
|
4986
|
-
...
|
|
5002
|
+
iconInverse: $a,
|
|
5003
|
+
iconBrand: Qa[500],
|
|
5004
|
+
iconInfo: to[600],
|
|
5005
|
+
iconDanger: io[800],
|
|
5006
|
+
iconWarning: ao[800]
|
|
5007
|
+
}, co = {
|
|
5008
|
+
...so,
|
|
4987
5009
|
bgDefault: "#0B1120",
|
|
4988
5010
|
bgContainer: "#0F172A",
|
|
4989
5011
|
bgSubtle: "#121C30",
|
|
@@ -4992,16 +5014,16 @@ var Za = {
|
|
|
4992
5014
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
4993
5015
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
4994
5016
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
4995
|
-
fgDefault:
|
|
5017
|
+
fgDefault: $a,
|
|
4996
5018
|
fgSecondary: $[400],
|
|
4997
5019
|
fgTertiary: $[500],
|
|
4998
5020
|
fgDisabled: $[600],
|
|
4999
5021
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
5000
5022
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
5001
5023
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
5002
|
-
iconPrimary:
|
|
5024
|
+
iconPrimary: $a,
|
|
5003
5025
|
iconSecondary: $[400]
|
|
5004
|
-
},
|
|
5026
|
+
}, lo = {
|
|
5005
5027
|
ps: [
|
|
5006
5028
|
"Noto Sans Armenian",
|
|
5007
5029
|
"Noto Sans",
|
|
@@ -5016,7 +5038,7 @@ var Za = {
|
|
|
5016
5038
|
"system-ui",
|
|
5017
5039
|
"sans-serif"
|
|
5018
5040
|
]
|
|
5019
|
-
},
|
|
5041
|
+
}, uo = {
|
|
5020
5042
|
xl: {
|
|
5021
5043
|
fontSize: "64px",
|
|
5022
5044
|
lineHeight: "72px"
|
|
@@ -5041,7 +5063,7 @@ var Za = {
|
|
|
5041
5063
|
fontSize: "24px",
|
|
5042
5064
|
lineHeight: "32px"
|
|
5043
5065
|
}
|
|
5044
|
-
},
|
|
5066
|
+
}, fo = {
|
|
5045
5067
|
lg: {
|
|
5046
5068
|
fontSize: "20px",
|
|
5047
5069
|
lineHeight: "28px"
|
|
@@ -5062,7 +5084,7 @@ var Za = {
|
|
|
5062
5084
|
fontSize: "10px",
|
|
5063
5085
|
lineHeight: "14px"
|
|
5064
5086
|
}
|
|
5065
|
-
},
|
|
5087
|
+
}, po = {
|
|
5066
5088
|
lg: {
|
|
5067
5089
|
fontSize: "20px",
|
|
5068
5090
|
lineHeight: "28px"
|
|
@@ -5087,19 +5109,19 @@ var Za = {
|
|
|
5087
5109
|
fontSize: "6px",
|
|
5088
5110
|
lineHeight: "6px"
|
|
5089
5111
|
}
|
|
5090
|
-
}, po = {
|
|
5091
|
-
headline: lo,
|
|
5092
|
-
paragraph: uo,
|
|
5093
|
-
label: fo
|
|
5094
5112
|
}, mo = {
|
|
5113
|
+
headline: uo,
|
|
5114
|
+
paragraph: fo,
|
|
5115
|
+
label: po
|
|
5116
|
+
}, ho = {
|
|
5095
5117
|
sm: "2rem",
|
|
5096
5118
|
md: "2.5rem",
|
|
5097
5119
|
lg: "3rem"
|
|
5098
|
-
},
|
|
5120
|
+
}, go = {
|
|
5099
5121
|
sm: "0.875rem",
|
|
5100
5122
|
md: "1rem",
|
|
5101
5123
|
lg: "1.25rem"
|
|
5102
|
-
},
|
|
5124
|
+
}, _o = {
|
|
5103
5125
|
xs: "2px",
|
|
5104
5126
|
sm: "4px",
|
|
5105
5127
|
md: "8px",
|
|
@@ -5108,7 +5130,7 @@ var Za = {
|
|
|
5108
5130
|
"2xl": "20px",
|
|
5109
5131
|
"3xl": "24px",
|
|
5110
5132
|
full: "9999px"
|
|
5111
|
-
},
|
|
5133
|
+
}, vo = {
|
|
5112
5134
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
5113
5135
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
5114
5136
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -5116,6 +5138,6 @@ var Za = {
|
|
|
5116
5138
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5117
5139
|
};
|
|
5118
5140
|
//#endregion
|
|
5119
|
-
export { $e as Accordion, et as AccordionItem, bt as Avatar, xt as AvatarGroup, At as Badge, Nt as Breadcrumb, at as Button, Ft as ButtonGroup, Rt as Card, Bt as CardGroup, Wt as Checkbox, Zt as Copy, an as Counter,
|
|
5141
|
+
export { $e as Accordion, et as AccordionItem, bt as Avatar, xt as AvatarGroup, At as Badge, Nt as Breadcrumb, at as Button, Ft as ButtonGroup, Rt as Card, Bt as CardGroup, Wt as Checkbox, Zt as Copy, an as Counter, xn as DatePicker, Mn as DeviceRestriction, In as DistributionBar, qe as Divider, Wn as Drawer, $n as DropdownContent, er as DropdownItem, nr as DropdownLabel, Xn as DropdownMenu, tr as DropdownSeparator, Zn as DropdownTrigger, ar as Empty, cr as Filter, ur as FormContainer, dr as FormField, wn as IconTile, fr as InfoField, mr as InlineAlert, nn as Input, hr as Link, _r as Modal, Sr as NotificationBadge, Er as Pagination, kr as PersonCard, Xt as Popover, Pr as Progress, zr as Radio, Ir as RadioGroup, Br as ReadMore, hi as SelectV2, vi as Sidebar, yi as SidebarItem, Ci as Skeleton, ki as SnackbarProvider, Ni as Status, Gi as StepIndicator, Ji as Switch, Ta as Tab, Sa as TabList, Ea as TabPanel, _a as TableV2, Yi as TableV2ColumnFilter, ea as TableV2ColumnVisibilityMenu, Zi as TableV2Pagination, aa as TableV2RowActionsMenu, Qi as TableV2Skeleton, ta as TableV2Toolbar, xa as Tabs, kn as Text, Da as TextArea, Oa as ThemeSwitch, Ma as Tooltip, Ia as UnderConstruction, ut as Upload, ft as UploadItem, to as blue, Qa as brand, Q as cn, oo as colorPrimitives, ho as controlHeight, la as createRowActionsColumn, ca as createSelectionColumn, co as darkTheme, lo as fontFamily, ua as getPinnedStyles, $ as gray, eo as green, uo as headline, go as iconSize, po as label, so as lightTheme, fo as paragraph, ro as pink, no as purple, _o as radius, io as red, vo as shadows, mo as typography, Ha as useEscapeKey, ye as useFieldArray, Ja as useFormContext, Za as useFormProps, Ga as useHideBodyScroll, qa as useIsMobile, Va as useOnOutsideClick, Oi as useSnackbar, Ra as useStepper, lt as validateSingleFile, $a as white, ao as yellow };
|
|
5120
5142
|
|
|
5121
5143
|
//# sourceMappingURL=index.js.map
|