@dinofront/design_system 1.18.0 → 1.19.1
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 +261 -253
- package/dist/index.js.map +1 -1
- package/dist/styles.css +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
|
6
6
|
import { createPortal as _e } from "react-dom";
|
|
7
7
|
import { Controller as ve, useFieldArray as ye, useForm as be } from "react-hook-form";
|
|
8
8
|
import { yupResolver as xe } from "@hookform/resolvers/yup";
|
|
9
|
-
import Se, { components as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useVirtualizer as
|
|
14
|
-
import { flexRender as
|
|
15
|
-
import { DndContext as
|
|
16
|
-
import { SortableContext as
|
|
9
|
+
import Se, { components as Ce } from "react-select";
|
|
10
|
+
import we from "react-select/async";
|
|
11
|
+
import Te from "react-select/creatable";
|
|
12
|
+
import Ee from "react-select/async-creatable";
|
|
13
|
+
import { useVirtualizer as De } from "@tanstack/react-virtual";
|
|
14
|
+
import { flexRender as Oe, getCoreRowModel as ke, getFilteredRowModel as Ae, getPaginationRowModel as je, getSortedRowModel as Me, useReactTable as Ne } from "@tanstack/react-table";
|
|
15
|
+
import { DndContext as Pe, KeyboardSensor as Fe, PointerSensor as Ie, closestCenter as Le, useSensor as Re, useSensors as ze } from "@dnd-kit/core";
|
|
16
|
+
import { SortableContext as Be, arrayMove as Ve, horizontalListSortingStrategy as Y, sortableKeyboardCoordinates as X, useSortable as Z } from "@dnd-kit/sortable";
|
|
17
17
|
import { CSS as He } from "@dnd-kit/utilities";
|
|
18
18
|
//#region src/lib/cn.ts
|
|
19
19
|
var Ue = ge({ extend: { theme: { text: [
|
|
@@ -39,44 +39,44 @@ function Q(...e) {
|
|
|
39
39
|
return Ue(G(e));
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region src/
|
|
43
|
-
var We = {
|
|
42
|
+
//#region src/lib/testId.ts
|
|
43
|
+
var We = (e) => (t) => e ? `${e}-${t}` : void 0, Ge = {
|
|
44
44
|
horizontal: "h-0 w-full border-t",
|
|
45
45
|
vertical: "w-0 h-full self-stretch border-l"
|
|
46
|
-
},
|
|
46
|
+
}, Ke = {
|
|
47
47
|
solid: "border-solid",
|
|
48
48
|
dashed: "border-dashed"
|
|
49
|
-
},
|
|
49
|
+
}, qe = {
|
|
50
50
|
default: "border-border-default",
|
|
51
51
|
subtle: "border-border-subtle",
|
|
52
52
|
strong: "border-border-strong",
|
|
53
53
|
brand: "border-border-brand"
|
|
54
|
-
},
|
|
54
|
+
}, Je = a(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
|
|
55
55
|
return /* @__PURE__ */ q("div", {
|
|
56
56
|
ref: o,
|
|
57
57
|
role: "separator",
|
|
58
58
|
"aria-orientation": e,
|
|
59
59
|
"data-test-id": i,
|
|
60
|
-
className: Q("shrink-0",
|
|
60
|
+
className: Q("shrink-0", Ge[e], Ke[t], qe[n], r),
|
|
61
61
|
...a
|
|
62
62
|
});
|
|
63
|
-
}),
|
|
64
|
-
function
|
|
65
|
-
let e = c(
|
|
63
|
+
}), Ye = (e, t) => e !== void 0 && t !== void 0 && String(e) === String(t), Xe = (e, t) => e.some((e) => Ye(e, t)), Ze = r(null);
|
|
64
|
+
function Qe() {
|
|
65
|
+
let e = c(Ze);
|
|
66
66
|
if (!e) throw Error("AccordionItem must be used inside <Accordion>");
|
|
67
67
|
return e;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function $e(e) {
|
|
70
70
|
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
let [d, f] = m(() =>
|
|
74
|
-
return /* @__PURE__ */ q(
|
|
72
|
+
var et = a(function({ type: e = "single", defaultValue: t, value: n, onValueChange: r, animated: i = !0, showDivider: a = !1, className: o, children: s, dataTestId: c, ...l }, u) {
|
|
73
|
+
let [d, f] = m(() => $e(t)), p = n !== void 0, h = p ? $e(n) : d;
|
|
74
|
+
return /* @__PURE__ */ q(Ze.Provider, {
|
|
75
75
|
value: {
|
|
76
76
|
openValues: h,
|
|
77
77
|
toggle: (t) => {
|
|
78
|
-
let n =
|
|
79
|
-
i = e === "single" ? n ? [] : [t] : n ? h.filter((e) => !
|
|
78
|
+
let n = Xe(h, t), i;
|
|
79
|
+
i = e === "single" ? n ? [] : [t] : n ? h.filter((e) => !Ye(e, t)) : [...h, t], p || f(i), r?.(e === "single" ? i[0] : i);
|
|
80
80
|
},
|
|
81
81
|
animated: i,
|
|
82
82
|
showDivider: a
|
|
@@ -89,8 +89,8 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
89
89
|
children: s
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
|
-
}),
|
|
93
|
-
let { openValues: l, toggle: d, animated: f, showDivider: p } =
|
|
92
|
+
}), tt = a(function({ value: e, title: t, icon: n, disabled: r, className: i, children: a, dataTestId: o, ...s }, c) {
|
|
93
|
+
let { openValues: l, toggle: d, animated: f, showDivider: p } = Qe(), m = Xe(l, e), h = u(), g = u(), _ = /* @__PURE__ */ J(K, { children: [p && /* @__PURE__ */ q(Je, { className: "mb-4" }), a] });
|
|
94
94
|
return /* @__PURE__ */ J("div", {
|
|
95
95
|
ref: c,
|
|
96
96
|
"data-test-id": o,
|
|
@@ -99,6 +99,7 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
99
99
|
...s,
|
|
100
100
|
children: [/* @__PURE__ */ q("h3", { children: /* @__PURE__ */ J("button", {
|
|
101
101
|
id: g,
|
|
102
|
+
"data-test-id": We(o)("trigger"),
|
|
102
103
|
type: "button",
|
|
103
104
|
onClick: () => d(e),
|
|
104
105
|
disabled: r,
|
|
@@ -137,15 +138,15 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
137
138
|
children: _
|
|
138
139
|
})]
|
|
139
140
|
});
|
|
140
|
-
}),
|
|
141
|
+
}), nt = {
|
|
141
142
|
lg: "h-12 px-5 text-p-md gap-2 rounded-lg",
|
|
142
143
|
md: "h-10 px-4 text-p-std gap-2 rounded-lg",
|
|
143
144
|
sm: "h-8 px-3 text-p-sm gap-1.5 rounded-md"
|
|
144
|
-
},
|
|
145
|
+
}, rt = {
|
|
145
146
|
lg: "h-12 w-12 rounded-lg",
|
|
146
147
|
md: "h-10 w-10 rounded-lg",
|
|
147
148
|
sm: "h-8 w-8 rounded-md"
|
|
148
|
-
},
|
|
149
|
+
}, it = {
|
|
149
150
|
primary: [
|
|
150
151
|
"bg-brand-500 text-white border border-transparent",
|
|
151
152
|
"hover:bg-brand-600 active:bg-brand-700",
|
|
@@ -170,12 +171,12 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
170
171
|
"disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
171
172
|
"focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2"
|
|
172
173
|
].join(" ")
|
|
173
|
-
},
|
|
174
|
+
}, at = {
|
|
174
175
|
primary: "bg-brand-700",
|
|
175
176
|
secondary: "bg-bg-subtle",
|
|
176
177
|
tertiary: "bg-bg-subtle",
|
|
177
178
|
danger: "bg-red-900"
|
|
178
|
-
},
|
|
179
|
+
}, ot = 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
180
|
return /* @__PURE__ */ q("button", {
|
|
180
181
|
type: "button",
|
|
181
182
|
ref: m,
|
|
@@ -189,7 +190,7 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
189
190
|
}
|
|
190
191
|
d?.(e);
|
|
191
192
|
},
|
|
192
|
-
className: Q("inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors outline-none cursor-pointer", a ?
|
|
193
|
+
className: Q("inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors outline-none cursor-pointer", a ? rt[t] : nt[t], it[e], s && at[e], o && "w-full", l),
|
|
193
194
|
...p,
|
|
194
195
|
children: i ? /* @__PURE__ */ q(ne, {
|
|
195
196
|
className: "h-4 w-4 animate-spin",
|
|
@@ -209,27 +210,27 @@ var $e = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
209
210
|
});
|
|
210
211
|
//#endregion
|
|
211
212
|
//#region src/components/Upload/Upload.tsx
|
|
212
|
-
function
|
|
213
|
+
function st(e, t) {
|
|
213
214
|
let n = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
214
215
|
if (!n.length) return !0;
|
|
215
216
|
let r = e.name.toLowerCase(), i = e.type.toLowerCase();
|
|
216
217
|
return n.some((e) => e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : e.startsWith(".") ? r.endsWith(e) : i === e);
|
|
217
218
|
}
|
|
218
|
-
var
|
|
219
|
+
var ct = [
|
|
219
220
|
"KB",
|
|
220
221
|
"MB",
|
|
221
222
|
"GB"
|
|
222
223
|
];
|
|
223
|
-
function
|
|
224
|
+
function lt(e) {
|
|
224
225
|
if (e < 1024) return `${e} B`;
|
|
225
226
|
let t = e / 1024, n = 0;
|
|
226
|
-
for (; t >= 1024 && n <
|
|
227
|
-
return `${t.toFixed(1)} ${
|
|
227
|
+
for (; t >= 1024 && n < ct.length - 1;) t /= 1024, n += 1;
|
|
228
|
+
return `${t.toFixed(1)} ${ct[n]}`;
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
-
return t && !
|
|
230
|
+
function ut(e, { accept: t, maxSizeMB: n }) {
|
|
231
|
+
return t && !st(e, t) ? "type" : n !== void 0 && e.size > n * 1024 * 1024 ? "size" : null;
|
|
231
232
|
}
|
|
232
|
-
var
|
|
233
|
+
var dt = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFiles: i, disabled: a, validateFiles: o = !1, maxFiles: s, dedupe: c = o, currentFiles: l = [], onReject: d, showFileList: f = !1, onRemoveFile: h, mode: g = "dropzone", triggerLabel: _, triggerIcon: v, label: y, required: b, error: x = !1, errorText: S, labelAddons: C, className: w, dataTestId: T, ...E }, D) {
|
|
233
234
|
let O = p(null), [k, A] = m(!1), j = p(0), M = x || !!S, ee = u(), te = S ? `${ee}-error` : void 0, N = (t) => {
|
|
234
235
|
if (!t.length) return;
|
|
235
236
|
if (!o) {
|
|
@@ -245,7 +246,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
245
246
|
});
|
|
246
247
|
continue;
|
|
247
248
|
}
|
|
248
|
-
let t =
|
|
249
|
+
let t = ut(i, {
|
|
249
250
|
accept: e,
|
|
250
251
|
maxSizeMB: n
|
|
251
252
|
});
|
|
@@ -297,9 +298,9 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
297
298
|
children: S
|
|
298
299
|
}) : null, R = f && l.length > 0 && /* @__PURE__ */ q("div", {
|
|
299
300
|
className: "flex flex-col gap-2",
|
|
300
|
-
children: l.map((e, t) => /* @__PURE__ */ q(
|
|
301
|
+
children: l.map((e, t) => /* @__PURE__ */ q(pt, {
|
|
301
302
|
name: e.name,
|
|
302
|
-
meta:
|
|
303
|
+
meta: lt(e.size),
|
|
303
304
|
status: "completed",
|
|
304
305
|
onRemove: g !== "view" && h ? () => h(e, t) : void 0
|
|
305
306
|
}, `${t}-${e.name}-${e.size}`))
|
|
@@ -324,7 +325,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
324
325
|
...E,
|
|
325
326
|
children: [
|
|
326
327
|
I,
|
|
327
|
-
/* @__PURE__ */ q(
|
|
328
|
+
/* @__PURE__ */ q(ot, {
|
|
328
329
|
type: "button",
|
|
329
330
|
variant: "secondary",
|
|
330
331
|
iconOnly: e,
|
|
@@ -392,16 +393,16 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
392
393
|
L
|
|
393
394
|
]
|
|
394
395
|
});
|
|
395
|
-
}),
|
|
396
|
+
}), ft = {
|
|
396
397
|
processing: "border-border-default bg-bg-default",
|
|
397
398
|
completed: "border-border-default bg-bg-default",
|
|
398
399
|
error: "border-red-300 bg-bg-danger-lighter"
|
|
399
|
-
},
|
|
400
|
+
}, pt = 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) {
|
|
400
401
|
let [p, g] = m(!1), _ = !!c && !p;
|
|
401
402
|
return /* @__PURE__ */ J("div", {
|
|
402
403
|
ref: f,
|
|
403
404
|
"data-test-id": u,
|
|
404
|
-
className: Q("flex items-start gap-3 px-3 py-2.5 rounded-lg border",
|
|
405
|
+
className: Q("flex items-start gap-3 px-3 py-2.5 rounded-lg border", ft[n], l),
|
|
405
406
|
...d,
|
|
406
407
|
children: [
|
|
407
408
|
/* @__PURE__ */ q("div", {
|
|
@@ -468,7 +469,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
468
469
|
})
|
|
469
470
|
]
|
|
470
471
|
});
|
|
471
|
-
}),
|
|
472
|
+
}), mt = {
|
|
472
473
|
"2xs": "h-5 w-5 text-p-xs",
|
|
473
474
|
xs: "h-6 w-6 text-p-xs",
|
|
474
475
|
sm: "h-8 w-8 text-p-sm",
|
|
@@ -476,7 +477,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
476
477
|
lg: "h-12 w-12 text-p-md",
|
|
477
478
|
xl: "h-16 w-16 text-h-xs",
|
|
478
479
|
"2xl": "h-20 w-20 text-h-xs"
|
|
479
|
-
},
|
|
480
|
+
}, ht = {
|
|
480
481
|
"2xs": "h-1 w-1",
|
|
481
482
|
xs: "h-1.5 w-1.5",
|
|
482
483
|
sm: "h-2 w-2",
|
|
@@ -484,12 +485,12 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
484
485
|
lg: "h-3 w-3",
|
|
485
486
|
xl: "h-3.5 w-3.5",
|
|
486
487
|
"2xl": "h-4 w-4"
|
|
487
|
-
},
|
|
488
|
+
}, gt = {
|
|
488
489
|
online: "bg-green-500",
|
|
489
490
|
offline: "bg-gray-400 dark:bg-gray-500",
|
|
490
491
|
away: "bg-yellow-600",
|
|
491
492
|
busy: "bg-red-600"
|
|
492
|
-
},
|
|
493
|
+
}, _t = {
|
|
493
494
|
"2xs": "-ml-1",
|
|
494
495
|
xs: "-ml-1.5",
|
|
495
496
|
sm: "-ml-2",
|
|
@@ -497,7 +498,7 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
497
498
|
lg: "-ml-3",
|
|
498
499
|
xl: "-ml-4",
|
|
499
500
|
"2xl": "-ml-5"
|
|
500
|
-
},
|
|
501
|
+
}, vt = {
|
|
501
502
|
"2xs": "h-2 w-2",
|
|
502
503
|
xs: "h-3 w-3",
|
|
503
504
|
sm: "h-4 w-4",
|
|
@@ -506,11 +507,11 @@ var ut = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
506
507
|
xl: "h-7 w-7",
|
|
507
508
|
"2xl": "h-8 w-8"
|
|
508
509
|
};
|
|
509
|
-
function
|
|
510
|
+
function yt(e) {
|
|
510
511
|
let t = e.trim().split(/\s+/);
|
|
511
512
|
return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
512
513
|
}
|
|
513
|
-
function
|
|
514
|
+
function bt(e) {
|
|
514
515
|
let t = [
|
|
515
516
|
"bg-brand-500",
|
|
516
517
|
"bg-blue-600",
|
|
@@ -522,7 +523,7 @@ function yt(e) {
|
|
|
522
523
|
for (let t = 0; t < e.length; t++) n = (n << 5) - n + e.charCodeAt(t), n |= 0;
|
|
523
524
|
return t[Math.abs(n) % t.length];
|
|
524
525
|
}
|
|
525
|
-
var
|
|
526
|
+
var xt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape: a = "circle", fallback: o, editable: s, onImageChange: c, accept: u, maxSizeMB: d, onReject: f, className: h, dataTestId: g, ..._ }, v) {
|
|
526
527
|
let [y, b] = m(!1), [x, S] = m(null), C = p(null), w = p(e), T = p(null);
|
|
527
528
|
l(() => {
|
|
528
529
|
if (T.current = x, x) return () => URL.revokeObjectURL(x);
|
|
@@ -534,7 +535,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
534
535
|
let E = (e) => {
|
|
535
536
|
let t = e?.[0];
|
|
536
537
|
if (!t) return;
|
|
537
|
-
let n =
|
|
538
|
+
let n = ut(t, {
|
|
538
539
|
accept: u,
|
|
539
540
|
maxSizeMB: d
|
|
540
541
|
});
|
|
@@ -547,7 +548,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
547
548
|
}
|
|
548
549
|
let r = URL.createObjectURL(t);
|
|
549
550
|
T.current = r, S(r), b(!1), c?.(t);
|
|
550
|
-
}, D = x ?? e, O = !!D && !y, k = n ?
|
|
551
|
+
}, D = x ?? e, O = !!D && !y, k = n ? yt(n) : "", A = n ? bt(n) : "bg-gray-300 dark:bg-gray-600";
|
|
551
552
|
return /* @__PURE__ */ J("span", {
|
|
552
553
|
ref: v,
|
|
553
554
|
"data-test-id": g,
|
|
@@ -555,7 +556,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
555
556
|
..._,
|
|
556
557
|
children: [
|
|
557
558
|
/* @__PURE__ */ q("span", {
|
|
558
|
-
className: Q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none",
|
|
559
|
+
className: Q("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", mt[r], a === "circle" ? "rounded-full" : "rounded-md", !O && A),
|
|
559
560
|
children: O ? /* @__PURE__ */ q("img", {
|
|
560
561
|
src: D,
|
|
561
562
|
alt: t ?? n ?? "",
|
|
@@ -565,7 +566,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
565
566
|
}),
|
|
566
567
|
i && /* @__PURE__ */ q("span", {
|
|
567
568
|
"aria-label": i,
|
|
568
|
-
className: Q("absolute bottom-0 rounded-full ring-2 ring-white", s ? "left-0" : "right-0",
|
|
569
|
+
className: Q("absolute bottom-0 rounded-full ring-2 ring-white", s ? "left-0" : "right-0", ht[r], gt[i])
|
|
569
570
|
}),
|
|
570
571
|
s && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("button", {
|
|
571
572
|
type: "button",
|
|
@@ -573,7 +574,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
573
574
|
e.stopPropagation(), C.current?.click();
|
|
574
575
|
},
|
|
575
576
|
"aria-label": "Change avatar image",
|
|
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",
|
|
577
|
+
className: Q("absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full ring-2 ring-white bg-brand-500 text-white hover:bg-brand-600 transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", vt[r]),
|
|
577
578
|
children: /* @__PURE__ */ q(ae, { className: "h-1/2 w-1/2" })
|
|
578
579
|
}), /* @__PURE__ */ q("input", {
|
|
579
580
|
ref: C,
|
|
@@ -587,7 +588,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
587
588
|
})] })
|
|
588
589
|
]
|
|
589
590
|
});
|
|
590
|
-
}),
|
|
591
|
+
}), St = a(function({ size: e = "md", max: t, children: n, className: r, dataTestId: i, ...a }, o) {
|
|
591
592
|
let s = Array.isArray(n) ? n : [n], c = t === void 0 ? s : s.slice(0, t), l = t === void 0 ? 0 : s.length - t;
|
|
592
593
|
return /* @__PURE__ */ J("div", {
|
|
593
594
|
ref: o,
|
|
@@ -595,38 +596,38 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
595
596
|
className: Q("inline-flex items-center", r),
|
|
596
597
|
...a,
|
|
597
598
|
children: [c.map((t, n) => /* @__PURE__ */ q("div", {
|
|
598
|
-
className: Q("rounded-full ring-2 ring-white", n > 0 &&
|
|
599
|
+
className: Q("rounded-full ring-2 ring-white", n > 0 && _t[e]),
|
|
599
600
|
style: { zIndex: c.length - n },
|
|
600
601
|
children: t
|
|
601
602
|
}, n)), l > 0 && /* @__PURE__ */ q("div", {
|
|
602
|
-
className: Q("rounded-full ring-2 ring-white",
|
|
603
|
-
children: /* @__PURE__ */ q(
|
|
603
|
+
className: Q("rounded-full ring-2 ring-white", _t[e]),
|
|
604
|
+
children: /* @__PURE__ */ q(xt, {
|
|
604
605
|
size: e,
|
|
605
606
|
name: `+${l}`
|
|
606
607
|
})
|
|
607
608
|
})]
|
|
608
609
|
});
|
|
609
|
-
}),
|
|
610
|
+
}), Ct = {
|
|
610
611
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
611
612
|
md: "h-6 px-2 text-p-sm gap-1",
|
|
612
613
|
sm: "h-5 px-1.5 text-p-sm gap-1",
|
|
613
614
|
xs: "h-4 px-1 text-p-xs gap-0.5"
|
|
614
|
-
},
|
|
615
|
+
}, wt = {
|
|
615
616
|
lg: "rounded-md",
|
|
616
617
|
md: "rounded-md",
|
|
617
618
|
sm: "rounded",
|
|
618
619
|
xs: "rounded"
|
|
619
|
-
},
|
|
620
|
+
}, Tt = {
|
|
620
621
|
lg: "size-2.5",
|
|
621
622
|
md: "size-2",
|
|
622
623
|
sm: "size-1.5",
|
|
623
624
|
xs: "size-1"
|
|
624
|
-
},
|
|
625
|
+
}, Et = {
|
|
625
626
|
lg: "min-w-7 px-0 justify-center",
|
|
626
627
|
md: "min-w-6 px-0 justify-center",
|
|
627
628
|
sm: "min-w-5 px-0 justify-center",
|
|
628
629
|
xs: "min-w-4 px-0 justify-center"
|
|
629
|
-
},
|
|
630
|
+
}, Dt = {
|
|
630
631
|
neutral: "bg-bg-subtle text-fg-default border border-border-default",
|
|
631
632
|
brand: "bg-brand-20 text-brand-800 border border-brand-100",
|
|
632
633
|
success: "bg-green-50 text-green-800 border border-green-100",
|
|
@@ -634,7 +635,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
634
635
|
danger: "bg-red-50 text-red-800 border border-red-100",
|
|
635
636
|
info: "bg-blue-50 text-blue-800 border border-blue-100",
|
|
636
637
|
privacy: "bg-purple-50 text-purple-800 border border-purple-100"
|
|
637
|
-
},
|
|
638
|
+
}, Ot = {
|
|
638
639
|
neutral: "bg-transparent text-fg-default border border-border-strong",
|
|
639
640
|
brand: "bg-transparent text-brand-700 border border-brand-500",
|
|
640
641
|
success: "bg-transparent text-green-700 border border-green-500",
|
|
@@ -642,7 +643,7 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
642
643
|
danger: "bg-transparent text-red-700 border border-red-500",
|
|
643
644
|
info: "bg-transparent text-blue-700 border border-blue-500",
|
|
644
645
|
privacy: "bg-transparent text-purple-700 border border-purple-500"
|
|
645
|
-
},
|
|
646
|
+
}, kt = {
|
|
646
647
|
neutral: "bg-fg-default text-bg-default",
|
|
647
648
|
brand: "bg-brand-500 text-white",
|
|
648
649
|
success: "bg-green-600 text-white",
|
|
@@ -650,21 +651,21 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
650
651
|
danger: "bg-red-700 text-white",
|
|
651
652
|
info: "bg-blue-600 text-white",
|
|
652
653
|
privacy: "bg-purple-500 text-white"
|
|
653
|
-
},
|
|
654
|
+
}, At = {
|
|
654
655
|
filled: "hover:brightness-95 active:brightness-90",
|
|
655
656
|
outline: "hover:bg-bg-subtle active:bg-bg-container",
|
|
656
657
|
accent: "hover:brightness-90 active:brightness-80"
|
|
657
|
-
},
|
|
658
|
-
let v = t === "filled" ?
|
|
658
|
+
}, jt = 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 }, _) {
|
|
659
|
+
let v = t === "filled" ? Dt[e] : t === "outline" ? Ot[e] : kt[e];
|
|
659
660
|
if (s) return /* @__PURE__ */ q("span", {
|
|
660
661
|
ref: _,
|
|
661
662
|
"data-test-id": p,
|
|
662
663
|
"aria-hidden": !g["aria-label"] || void 0,
|
|
663
664
|
onClick: l ? void 0 : m,
|
|
664
|
-
className: Q("inline-block shrink-0 rounded-full",
|
|
665
|
+
className: Q("inline-block shrink-0 rounded-full", Tt[n], kt[e], l && "opacity-50", d),
|
|
665
666
|
...g
|
|
666
667
|
});
|
|
667
|
-
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" :
|
|
668
|
+
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : wt[n];
|
|
668
669
|
return /* @__PURE__ */ J("span", {
|
|
669
670
|
ref: _,
|
|
670
671
|
"data-test-id": p,
|
|
@@ -675,11 +676,11 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
675
676
|
onKeyDown: u ? (e) => {
|
|
676
677
|
h?.(e), !(l || !m) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m(e));
|
|
677
678
|
} : h,
|
|
678
|
-
className: Q("inline-flex items-center font-medium whitespace-nowrap select-none",
|
|
679
|
+
className: Q("inline-flex items-center font-medium whitespace-nowrap select-none", Ct[n], b, v, y && Et[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", At[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
|
|
679
680
|
...g,
|
|
680
681
|
children: [
|
|
681
682
|
c ? /* @__PURE__ */ q("span", {
|
|
682
|
-
className: Q("inline-block shrink-0 rounded-full",
|
|
683
|
+
className: Q("inline-block shrink-0 rounded-full", Tt[n], kt[e]),
|
|
683
684
|
"aria-hidden": !0
|
|
684
685
|
}) : i && /* @__PURE__ */ q("span", {
|
|
685
686
|
className: "inline-flex shrink-0",
|
|
@@ -700,16 +701,16 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
700
701
|
})
|
|
701
702
|
]
|
|
702
703
|
});
|
|
703
|
-
}),
|
|
704
|
+
}), Mt = {
|
|
704
705
|
md: "text-p-sm",
|
|
705
706
|
sm: "text-p-xs"
|
|
706
|
-
},
|
|
707
|
+
}, Nt = "rounded-sm text-fg-tertiary transition-colors hover:text-fg-secondary outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Pt = a(function({ items: e, currentValue: n, onSelect: r, separator: i = "/", size: a = "md", className: o, dataTestId: s, ...c }, l) {
|
|
707
708
|
let u = n ?? e[e.length - 1]?.value;
|
|
708
709
|
return /* @__PURE__ */ q("nav", {
|
|
709
710
|
ref: l,
|
|
710
711
|
"aria-label": "Breadcrumb",
|
|
711
712
|
"data-test-id": s,
|
|
712
|
-
className: Q(
|
|
713
|
+
className: Q(Mt[a], o),
|
|
713
714
|
...c,
|
|
714
715
|
children: /* @__PURE__ */ q("ol", {
|
|
715
716
|
className: "flex items-center",
|
|
@@ -731,74 +732,74 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
731
732
|
}) : e.href ? /* @__PURE__ */ q("a", {
|
|
732
733
|
href: e.href,
|
|
733
734
|
onClick: () => r?.(e.value),
|
|
734
|
-
className:
|
|
735
|
+
className: Nt,
|
|
735
736
|
children: e.label
|
|
736
737
|
}) : /* @__PURE__ */ q("button", {
|
|
737
738
|
type: "button",
|
|
738
739
|
onClick: () => r?.(e.value),
|
|
739
|
-
className:
|
|
740
|
+
className: Nt,
|
|
740
741
|
children: e.label
|
|
741
742
|
})
|
|
742
743
|
})] }, e.value);
|
|
743
744
|
})
|
|
744
745
|
})
|
|
745
746
|
});
|
|
746
|
-
}),
|
|
747
|
+
}), Ft = {
|
|
747
748
|
horizontal: "flex-row [&>*]:rounded-none [&>*:first-child]:rounded-l-lg [&>*:last-child]:rounded-r-lg [&>*:not(:first-child)]:-ml-px",
|
|
748
749
|
vertical: "flex-col [&>*]:rounded-none [&>*:first-child]:rounded-t-lg [&>*:last-child]:rounded-b-lg [&>*:not(:first-child)]:-mt-px"
|
|
749
|
-
},
|
|
750
|
+
}, It = a(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
750
751
|
return /* @__PURE__ */ q("div", {
|
|
751
752
|
ref: a,
|
|
752
753
|
role: "group",
|
|
753
754
|
"data-test-id": r,
|
|
754
|
-
className: Q("inline-flex isolate",
|
|
755
|
+
className: Q("inline-flex isolate", Ft[e], "[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10", t),
|
|
755
756
|
...i,
|
|
756
757
|
children: n
|
|
757
758
|
});
|
|
758
|
-
}),
|
|
759
|
+
}), Lt = {
|
|
759
760
|
elevated: "bg-bg-default border border-border-default shadow-z1",
|
|
760
761
|
outlined: "bg-bg-default border border-border-default",
|
|
761
762
|
filled: "bg-bg-container border border-transparent"
|
|
762
|
-
},
|
|
763
|
+
}, Rt = {
|
|
763
764
|
none: "p-0",
|
|
764
765
|
sm: "p-4",
|
|
765
766
|
md: "p-5",
|
|
766
767
|
lg: "p-6"
|
|
767
|
-
},
|
|
768
|
+
}, zt = a(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
768
769
|
let u = n || r;
|
|
769
770
|
return /* @__PURE__ */ J("div", {
|
|
770
771
|
ref: l,
|
|
771
772
|
"data-test-id": s,
|
|
772
|
-
className: Q("rounded-xl overflow-hidden",
|
|
773
|
+
className: Q("rounded-xl overflow-hidden", Lt[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && Rt[t], a),
|
|
773
774
|
...c,
|
|
774
775
|
children: [
|
|
775
776
|
n && /* @__PURE__ */ q("div", {
|
|
776
|
-
className: Q("border-b border-border-subtle",
|
|
777
|
+
className: Q("border-b border-border-subtle", Rt[t]),
|
|
777
778
|
children: n
|
|
778
779
|
}),
|
|
779
780
|
u ? /* @__PURE__ */ q("div", {
|
|
780
|
-
className:
|
|
781
|
+
className: Rt[t],
|
|
781
782
|
children: o
|
|
782
783
|
}) : o,
|
|
783
784
|
r && /* @__PURE__ */ q("div", {
|
|
784
|
-
className: Q("border-t border-border-subtle",
|
|
785
|
+
className: Q("border-t border-border-subtle", Rt[t]),
|
|
785
786
|
children: r
|
|
786
787
|
})
|
|
787
788
|
]
|
|
788
789
|
});
|
|
789
|
-
}),
|
|
790
|
+
}), Bt = {
|
|
790
791
|
brand: "bg-bg-brand-lighter text-brand-800",
|
|
791
792
|
blue: "bg-bg-info-lighter text-blue-800",
|
|
792
793
|
purple: "bg-purple-50 text-purple-800 dark:bg-purple-900/30 dark:text-purple-200",
|
|
793
794
|
pink: "bg-pink-50 text-pink-800 dark:bg-pink-900/30 dark:text-pink-200",
|
|
794
795
|
yellow: "bg-bg-warning-lighter text-yellow-900",
|
|
795
796
|
gray: "bg-bg-subtle text-fg-secondary"
|
|
796
|
-
},
|
|
797
|
+
}, Vt = a(function({ title: e, header: t, children: n, noDivider: r = !1, className: i, dataTestId: a, ...o }, s) {
|
|
797
798
|
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */ q("div", {
|
|
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",
|
|
799
|
+
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", Bt[e.color ?? "gray"]),
|
|
799
800
|
children: e.text
|
|
800
801
|
});
|
|
801
|
-
return /* @__PURE__ */ q(
|
|
802
|
+
return /* @__PURE__ */ q(zt, {
|
|
802
803
|
ref: s,
|
|
803
804
|
dataTestId: a,
|
|
804
805
|
variant: "outlined",
|
|
@@ -813,14 +814,14 @@ var bt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
813
814
|
})]
|
|
814
815
|
})
|
|
815
816
|
});
|
|
816
|
-
}),
|
|
817
|
+
}), Ht = {
|
|
817
818
|
md: "h-5 w-5 rounded-sm",
|
|
818
819
|
sm: "h-4 w-4 rounded-sm"
|
|
819
820
|
}, Ut = {
|
|
820
821
|
md: "h-3.5 w-3.5",
|
|
821
822
|
sm: "h-3 w-3"
|
|
822
823
|
}, 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) {
|
|
823
|
-
let g = u(), _ = s ?? g, v = o || !!r, y = r ? `${_}-error` : void 0, x =
|
|
824
|
+
let g = u(), _ = s ?? g, v = o || !!r, y = r ? `${_}-error` : void 0, x = We(p);
|
|
824
825
|
return /* @__PURE__ */ J("label", {
|
|
825
826
|
htmlFor: _,
|
|
826
827
|
"data-test-id": p,
|
|
@@ -1030,7 +1031,7 @@ var Zt = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1030
1031
|
content: t,
|
|
1031
1032
|
side: "top",
|
|
1032
1033
|
align: "center",
|
|
1033
|
-
children: /* @__PURE__ */ q(
|
|
1034
|
+
children: /* @__PURE__ */ q(ot, {
|
|
1034
1035
|
ref: d,
|
|
1035
1036
|
type: "button",
|
|
1036
1037
|
variant: "tertiary",
|
|
@@ -1340,7 +1341,7 @@ var xn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1340
1341
|
monthNames: dn(e),
|
|
1341
1342
|
weekdayNames: pn(e, t)
|
|
1342
1343
|
};
|
|
1343
|
-
}, [s]), V = yn(L, pe), H =
|
|
1344
|
+
}, [s]), V = yn(L, pe), H = We(te), W = i ?? {
|
|
1344
1345
|
start: null,
|
|
1345
1346
|
end: null
|
|
1346
1347
|
}, G = W.end ?? re;
|
|
@@ -2215,7 +2216,7 @@ var cr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2215
2216
|
children: [e, i && i.length > 0 && /* @__PURE__ */ q("div", {
|
|
2216
2217
|
className: "flex items-center gap-3",
|
|
2217
2218
|
"data-test-id": f ? `${f}-buttons` : void 0,
|
|
2218
|
-
children: i.map((e, t) => /* @__PURE__ */ q(
|
|
2219
|
+
children: i.map((e, t) => /* @__PURE__ */ q(ot, { ...e }, t))
|
|
2219
2220
|
})]
|
|
2220
2221
|
})
|
|
2221
2222
|
});
|
|
@@ -2488,7 +2489,7 @@ function Cr(e, t, n, r) {
|
|
|
2488
2489
|
];
|
|
2489
2490
|
}
|
|
2490
2491
|
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) {
|
|
2491
|
-
let u = Cr(e, t, r, i), d = e <= 1, f = e >= t, p =
|
|
2492
|
+
let u = Cr(e, t, r, i), d = e <= 1, f = e >= t, p = We(o);
|
|
2492
2493
|
return /* @__PURE__ */ J("nav", {
|
|
2493
2494
|
ref: l,
|
|
2494
2495
|
"aria-label": s ?? "Pagination",
|
|
@@ -2550,7 +2551,7 @@ var wr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2550
2551
|
warning: "border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20"
|
|
2551
2552
|
}, 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) {
|
|
2552
2553
|
let d = Dr[i], f = Or[r], p = /* @__PURE__ */ J(K, { children: [
|
|
2553
|
-
/* @__PURE__ */ q(
|
|
2554
|
+
/* @__PURE__ */ q(xt, {
|
|
2554
2555
|
src: n,
|
|
2555
2556
|
name: e,
|
|
2556
2557
|
size: d.avatar
|
|
@@ -2721,7 +2722,7 @@ var wr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2721
2722
|
md: "h-2 w-2",
|
|
2722
2723
|
sm: "h-1.5 w-1.5"
|
|
2723
2724
|
}, 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) {
|
|
2724
|
-
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 ?
|
|
2725
|
+
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 ? Ye(g.value, e) : void 0, w = S && g.defaultValue !== void 0 ? Ye(g.defaultValue, e) : void 0, T = S ? C : s, E = S ? w : l;
|
|
2725
2726
|
return /* @__PURE__ */ J("label", {
|
|
2726
2727
|
htmlFor: v,
|
|
2727
2728
|
"data-test-id": p,
|
|
@@ -2930,7 +2931,7 @@ function ti(e, t, n) {
|
|
|
2930
2931
|
var ni = 36;
|
|
2931
2932
|
function ri(e, t) {
|
|
2932
2933
|
let { dataTestId: n } = e;
|
|
2933
|
-
return
|
|
2934
|
+
return We(n)(t);
|
|
2934
2935
|
}
|
|
2935
2936
|
function ii(e, t) {
|
|
2936
2937
|
return {
|
|
@@ -2939,20 +2940,20 @@ function ii(e, t) {
|
|
|
2939
2940
|
};
|
|
2940
2941
|
}
|
|
2941
2942
|
function ai(e) {
|
|
2942
|
-
return /* @__PURE__ */ q(
|
|
2943
|
+
return /* @__PURE__ */ q(Ce.Control, {
|
|
2943
2944
|
...e,
|
|
2944
2945
|
innerProps: ii(e.innerProps, ri(e.selectProps, "trigger"))
|
|
2945
2946
|
});
|
|
2946
2947
|
}
|
|
2947
2948
|
function oi(e) {
|
|
2948
2949
|
let t = { "data-test-id": ri(e.selectProps, "search") };
|
|
2949
|
-
return /* @__PURE__ */ q(
|
|
2950
|
+
return /* @__PURE__ */ q(Ce.Input, {
|
|
2950
2951
|
...e,
|
|
2951
2952
|
...t
|
|
2952
2953
|
});
|
|
2953
2954
|
}
|
|
2954
2955
|
function si(e) {
|
|
2955
|
-
return /* @__PURE__ */ q(
|
|
2956
|
+
return /* @__PURE__ */ q(Ce.DropdownIndicator, {
|
|
2956
2957
|
...e,
|
|
2957
2958
|
children: /* @__PURE__ */ q(S, {
|
|
2958
2959
|
className: Q("h-4 w-4 transition-transform", e.selectProps.menuIsOpen && "rotate-180"),
|
|
@@ -2961,7 +2962,7 @@ function si(e) {
|
|
|
2961
2962
|
});
|
|
2962
2963
|
}
|
|
2963
2964
|
function ci(e) {
|
|
2964
|
-
return /* @__PURE__ */ q(
|
|
2965
|
+
return /* @__PURE__ */ q(Ce.ClearIndicator, {
|
|
2965
2966
|
...e,
|
|
2966
2967
|
innerProps: ii(e.innerProps, ri(e.selectProps, "clear")),
|
|
2967
2968
|
children: /* @__PURE__ */ q(U, {
|
|
@@ -2971,7 +2972,7 @@ function ci(e) {
|
|
|
2971
2972
|
});
|
|
2972
2973
|
}
|
|
2973
2974
|
function li(e) {
|
|
2974
|
-
return /* @__PURE__ */ q(
|
|
2975
|
+
return /* @__PURE__ */ q(Ce.MultiValueRemove, {
|
|
2975
2976
|
...e,
|
|
2976
2977
|
innerProps: {
|
|
2977
2978
|
...e.innerProps,
|
|
@@ -2985,13 +2986,13 @@ function li(e) {
|
|
|
2985
2986
|
}
|
|
2986
2987
|
function ui(e) {
|
|
2987
2988
|
let { visibleTagCount: t } = e.selectProps;
|
|
2988
|
-
return t === void 0 || e.index < t ? /* @__PURE__ */ q(
|
|
2989
|
+
return t === void 0 || e.index < t ? /* @__PURE__ */ q(Ce.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ J("span", {
|
|
2989
2990
|
className: Jr,
|
|
2990
2991
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
2991
2992
|
}) : null;
|
|
2992
2993
|
}
|
|
2993
2994
|
function di(e) {
|
|
2994
|
-
return /* @__PURE__ */ J(
|
|
2995
|
+
return /* @__PURE__ */ J(Ce.Option, {
|
|
2995
2996
|
...e,
|
|
2996
2997
|
innerProps: ii(e.innerProps, ri(e.selectProps, `option-${String(e.data.value)}`)),
|
|
2997
2998
|
children: [e.children, e.isSelected && /* @__PURE__ */ q(b, {
|
|
@@ -3008,7 +3009,7 @@ function fi() {
|
|
|
3008
3009
|
}
|
|
3009
3010
|
function pi(e) {
|
|
3010
3011
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
3011
|
-
return /* @__PURE__ */ J(
|
|
3012
|
+
return /* @__PURE__ */ J(Ce.Menu, {
|
|
3012
3013
|
...e,
|
|
3013
3014
|
innerProps: ii(e.innerProps, ri(e.selectProps, "content")),
|
|
3014
3015
|
children: [
|
|
@@ -3029,11 +3030,18 @@ function pi(e) {
|
|
|
3029
3030
|
}),
|
|
3030
3031
|
e.children,
|
|
3031
3032
|
r && /* @__PURE__ */ q("div", {
|
|
3033
|
+
"data-test-id": ri(e.selectProps, "save_template"),
|
|
3034
|
+
role: "button",
|
|
3035
|
+
tabIndex: 0,
|
|
3036
|
+
"aria-pressed": r.checked,
|
|
3032
3037
|
className: "border-t border-border-default px-3 py-2",
|
|
3033
3038
|
onMouseDown: (e) => e.preventDefault(),
|
|
3034
3039
|
onClick: (e) => {
|
|
3035
3040
|
e.preventDefault(), i?.();
|
|
3036
3041
|
},
|
|
3042
|
+
onKeyDown: (e) => {
|
|
3043
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i?.());
|
|
3044
|
+
},
|
|
3037
3045
|
children: /* @__PURE__ */ q(Wt, {
|
|
3038
3046
|
size: "sm",
|
|
3039
3047
|
checked: r.checked,
|
|
@@ -3045,7 +3053,7 @@ function pi(e) {
|
|
|
3045
3053
|
});
|
|
3046
3054
|
}
|
|
3047
3055
|
function mi(t) {
|
|
3048
|
-
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c =
|
|
3056
|
+
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = De({
|
|
3049
3057
|
count: o.length,
|
|
3050
3058
|
getScrollElement: () => s.current,
|
|
3051
3059
|
estimateSize: () => ni,
|
|
@@ -3147,17 +3155,17 @@ var hi = a(function(e, t) {
|
|
|
3147
3155
|
V,
|
|
3148
3156
|
_,
|
|
3149
3157
|
o
|
|
3150
|
-
]), be = !!r, xe = D ?? (be || a ? !0 : n.length >= 10),
|
|
3158
|
+
]), be = !!r, xe = D ?? (be || a ? !0 : n.length >= 10), Ce = be ? a ? Ee : we : a ? Te : Se, De = f(() => ti(ee, ce, L), [
|
|
3151
3159
|
ee,
|
|
3152
3160
|
ce,
|
|
3153
3161
|
L
|
|
3154
|
-
]),
|
|
3155
|
-
wrapperRef:
|
|
3156
|
-
measureRef:
|
|
3162
|
+
]), Oe = p(null), ke = p(null), Ae = p(null), je = !!d && L, Me = Vr({
|
|
3163
|
+
wrapperRef: Oe,
|
|
3164
|
+
measureRef: ke,
|
|
3157
3165
|
total: K.length,
|
|
3158
3166
|
labelsKey: K.map(Yr).join("\0"),
|
|
3159
|
-
enabled:
|
|
3160
|
-
}),
|
|
3167
|
+
enabled: je
|
|
3168
|
+
}), Ne = f(() => n.some((e) => !!e.description), [n]), Pe = f(() => {
|
|
3161
3169
|
if (!n.some((e) => e.group)) return n;
|
|
3162
3170
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
3163
3171
|
for (let r of n) {
|
|
@@ -3172,20 +3180,20 @@ var hi = a(function(e, t) {
|
|
|
3172
3180
|
})), n.push(r);
|
|
3173
3181
|
}
|
|
3174
3182
|
return t;
|
|
3175
|
-
}, [n]),
|
|
3183
|
+
}, [n]), Fe = !!d && !be, Ie = d ? G : W;
|
|
3176
3184
|
l(() => {
|
|
3177
|
-
!j || !fe || $r(j,
|
|
3185
|
+
!j || !fe || $r(j, Ie);
|
|
3178
3186
|
}, [
|
|
3179
3187
|
j,
|
|
3180
3188
|
fe,
|
|
3181
|
-
|
|
3189
|
+
Ie
|
|
3182
3190
|
]);
|
|
3183
|
-
let
|
|
3191
|
+
let Le = s(() => {
|
|
3184
3192
|
j && pe((e) => {
|
|
3185
3193
|
let t = !e;
|
|
3186
|
-
return t ? $r(j,
|
|
3194
|
+
return t ? $r(j, Ie) : ei(j), t;
|
|
3187
3195
|
});
|
|
3188
|
-
}, [j,
|
|
3196
|
+
}, [j, Ie]), Re = f(() => j ? {
|
|
3189
3197
|
checked: fe,
|
|
3190
3198
|
label: M ?? R.saveSelectionLabel
|
|
3191
3199
|
} : null, [
|
|
@@ -3193,39 +3201,39 @@ var hi = a(function(e, t) {
|
|
|
3193
3201
|
fe,
|
|
3194
3202
|
M,
|
|
3195
3203
|
R
|
|
3196
|
-
]), [
|
|
3197
|
-
|
|
3198
|
-
}, []),
|
|
3199
|
-
|
|
3204
|
+
]), [ze, Be] = m(""), Ve = s((e) => {
|
|
3205
|
+
Be(e);
|
|
3206
|
+
}, []), Y = f(() => Fe ? n.filter((e) => !e.disabled && Xr(e, ze)) : [], [
|
|
3207
|
+
Fe,
|
|
3200
3208
|
n,
|
|
3201
|
-
|
|
3202
|
-
]),
|
|
3203
|
-
if (!
|
|
3204
|
-
let e = new Set(G.map(String)), t =
|
|
3209
|
+
ze
|
|
3210
|
+
]), X = f(() => {
|
|
3211
|
+
if (!Fe || Y.length === 0) return null;
|
|
3212
|
+
let e = new Set(G.map(String)), t = Y.filter((t) => e.has(String(t.value))).length, n = t === Y.length;
|
|
3205
3213
|
return {
|
|
3206
|
-
count:
|
|
3214
|
+
count: Y.length,
|
|
3207
3215
|
checked: n,
|
|
3208
|
-
indeterminate: t > 0 && t <
|
|
3209
|
-
label: n ? R.clearAllLabel(
|
|
3216
|
+
indeterminate: t > 0 && t < Y.length,
|
|
3217
|
+
label: n ? R.clearAllLabel(Y.length) : R.selectAllLabel(Y.length)
|
|
3210
3218
|
};
|
|
3211
3219
|
}, [
|
|
3212
|
-
|
|
3213
|
-
|
|
3220
|
+
Fe,
|
|
3221
|
+
Y,
|
|
3214
3222
|
G,
|
|
3215
3223
|
R
|
|
3216
|
-
]),
|
|
3217
|
-
if (!
|
|
3218
|
-
let e = new Set(
|
|
3219
|
-
if (
|
|
3224
|
+
]), Z = s(() => {
|
|
3225
|
+
if (!X) return;
|
|
3226
|
+
let e = new Set(Y.map((e) => String(e.value))), t;
|
|
3227
|
+
if (X.checked) t = G.filter((t) => !e.has(String(t)));
|
|
3220
3228
|
else {
|
|
3221
|
-
V(
|
|
3229
|
+
V(Y);
|
|
3222
3230
|
let e = new Set(G.map(String));
|
|
3223
|
-
t = [...G, ...
|
|
3231
|
+
t = [...G, ...Y.filter((t) => !e.has(String(t.value))).map((e) => e.value)];
|
|
3224
3232
|
}
|
|
3225
|
-
de(t), _?.(t),
|
|
3233
|
+
de(t), _?.(t), Ae.current?.onMenuClose();
|
|
3226
3234
|
}, [
|
|
3227
|
-
Z,
|
|
3228
3235
|
X,
|
|
3236
|
+
Y,
|
|
3229
3237
|
G,
|
|
3230
3238
|
V,
|
|
3231
3239
|
_
|
|
@@ -3234,10 +3242,10 @@ var hi = a(function(e, t) {
|
|
|
3234
3242
|
dataTestId: F,
|
|
3235
3243
|
inputId: se,
|
|
3236
3244
|
unstyled: !0,
|
|
3237
|
-
classNames:
|
|
3245
|
+
classNames: De,
|
|
3238
3246
|
className: ne,
|
|
3239
3247
|
isMulti: d,
|
|
3240
|
-
options:
|
|
3248
|
+
options: Pe,
|
|
3241
3249
|
loadOptions: _e,
|
|
3242
3250
|
defaultOptions: i,
|
|
3243
3251
|
value: d ? K : ge,
|
|
@@ -3248,7 +3256,7 @@ var hi = a(function(e, t) {
|
|
|
3248
3256
|
getOptionLabel: Yr,
|
|
3249
3257
|
formatOptionLabel: (e, t) => {
|
|
3250
3258
|
if (t.context === "value") return e.label;
|
|
3251
|
-
let n =
|
|
3259
|
+
let n = Ne && e.description ? /* @__PURE__ */ J("span", {
|
|
3252
3260
|
className: "flex flex-col min-w-0",
|
|
3253
3261
|
children: [/* @__PURE__ */ q("span", {
|
|
3254
3262
|
className: "truncate",
|
|
@@ -3284,17 +3292,17 @@ var hi = a(function(e, t) {
|
|
|
3284
3292
|
loadingMessage: () => R.loadingMessage,
|
|
3285
3293
|
"aria-invalid": ce || void 0,
|
|
3286
3294
|
"aria-required": w || void 0,
|
|
3287
|
-
...
|
|
3288
|
-
inputValue:
|
|
3289
|
-
onInputChange:
|
|
3290
|
-
selectAllState:
|
|
3291
|
-
onSelectAllToggle:
|
|
3295
|
+
...Fe ? {
|
|
3296
|
+
inputValue: ze,
|
|
3297
|
+
onInputChange: Ve,
|
|
3298
|
+
selectAllState: X,
|
|
3299
|
+
onSelectAllToggle: Z
|
|
3292
3300
|
} : {},
|
|
3293
|
-
...
|
|
3294
|
-
saveSelectionState:
|
|
3295
|
-
onSaveSelectionToggle:
|
|
3301
|
+
...Re ? {
|
|
3302
|
+
saveSelectionState: Re,
|
|
3303
|
+
onSaveSelectionToggle: Le
|
|
3296
3304
|
} : {},
|
|
3297
|
-
...
|
|
3305
|
+
...je ? { visibleTagCount: Me } : {},
|
|
3298
3306
|
...d ? {
|
|
3299
3307
|
closeMenuOnSelect: I.closeMenuOnSelect ?? !1,
|
|
3300
3308
|
hideSelectedOptions: I.hideSelectedOptions ?? !1
|
|
@@ -3310,12 +3318,12 @@ var hi = a(function(e, t) {
|
|
|
3310
3318
|
LoadingIndicator: fi,
|
|
3311
3319
|
IndicatorSeparator: () => null,
|
|
3312
3320
|
...O ? { MenuList: mi } : {},
|
|
3313
|
-
...
|
|
3321
|
+
...je ? { MultiValue: ui } : {},
|
|
3314
3322
|
Option: di
|
|
3315
3323
|
}
|
|
3316
3324
|
};
|
|
3317
3325
|
return /* @__PURE__ */ J("div", {
|
|
3318
|
-
ref:
|
|
3326
|
+
ref: Oe,
|
|
3319
3327
|
"data-test-id": F,
|
|
3320
3328
|
className: Q("flex flex-col gap-1.5 w-full", P),
|
|
3321
3329
|
children: [
|
|
@@ -3334,12 +3342,12 @@ var hi = a(function(e, t) {
|
|
|
3334
3342
|
children: b
|
|
3335
3343
|
})]
|
|
3336
3344
|
}),
|
|
3337
|
-
/* @__PURE__ */ q(
|
|
3338
|
-
ref: Gt(t,
|
|
3345
|
+
/* @__PURE__ */ q(Ce, {
|
|
3346
|
+
ref: Gt(t, Ae),
|
|
3339
3347
|
...He
|
|
3340
3348
|
}),
|
|
3341
|
-
|
|
3342
|
-
ref:
|
|
3349
|
+
je && /* @__PURE__ */ J("div", {
|
|
3350
|
+
ref: ke,
|
|
3343
3351
|
"aria-hidden": !0,
|
|
3344
3352
|
className: "flex items-center gap-1 whitespace-nowrap",
|
|
3345
3353
|
style: {
|
|
@@ -3761,7 +3769,7 @@ var Gi = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3761
3769
|
})]
|
|
3762
3770
|
});
|
|
3763
3771
|
return /* @__PURE__ */ J("li", {
|
|
3764
|
-
"aria-current":
|
|
3772
|
+
"aria-current": Ye(i.value, t) ? "step" : void 0,
|
|
3765
3773
|
className: Q("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3766
3774
|
children: [/* @__PURE__ */ J("div", {
|
|
3767
3775
|
className: Q("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Q("w-full items-center justify-center", Fi[a])),
|
|
@@ -3881,7 +3889,7 @@ function Zi({ table: e, pageSizeOptions: t = [
|
|
|
3881
3889
|
20,
|
|
3882
3890
|
30
|
|
3883
3891
|
], locale: n = "en-US", dataTestId: r }) {
|
|
3884
|
-
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 =
|
|
3892
|
+
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 = We(r);
|
|
3885
3893
|
return /* @__PURE__ */ J("div", {
|
|
3886
3894
|
className: "flex flex-wrap items-center justify-between gap-3 p-3 border-t border-border-default",
|
|
3887
3895
|
children: [
|
|
@@ -3923,7 +3931,7 @@ function Zi({ table: e, pageSizeOptions: t = [
|
|
|
3923
3931
|
//#endregion
|
|
3924
3932
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
3925
3933
|
function Qi({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
3926
|
-
let r =
|
|
3934
|
+
let r = We(n);
|
|
3927
3935
|
return /* @__PURE__ */ q(K, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ q("tr", {
|
|
3928
3936
|
"data-test-id": r(`skeleton-row-${n}`),
|
|
3929
3937
|
"aria-hidden": n > 0 || void 0,
|
|
@@ -3944,7 +3952,7 @@ function $i(e) {
|
|
|
3944
3952
|
}
|
|
3945
3953
|
function ea({ table: e }) {
|
|
3946
3954
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
3947
|
-
return /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(
|
|
3955
|
+
return /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(ot, {
|
|
3948
3956
|
variant: "secondary",
|
|
3949
3957
|
size: "sm",
|
|
3950
3958
|
leftIcon: /* @__PURE__ */ q(O, { className: "h-4 w-4" }),
|
|
@@ -3978,7 +3986,7 @@ function ta({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3978
3986
|
}), /* @__PURE__ */ J("div", {
|
|
3979
3987
|
className: "ml-auto flex items-center gap-2",
|
|
3980
3988
|
children: [
|
|
3981
|
-
i && /* @__PURE__ */ q(
|
|
3989
|
+
i && /* @__PURE__ */ q(ot, {
|
|
3982
3990
|
variant: "secondary",
|
|
3983
3991
|
size: "sm",
|
|
3984
3992
|
iconOnly: !0,
|
|
@@ -3986,7 +3994,7 @@ function ta({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
3986
3994
|
leftIcon: /* @__PURE__ */ q(z, { className: "h-4 w-4" }),
|
|
3987
3995
|
onClick: i
|
|
3988
3996
|
}),
|
|
3989
|
-
a && /* @__PURE__ */ q(
|
|
3997
|
+
a && /* @__PURE__ */ q(ot, {
|
|
3990
3998
|
variant: "secondary",
|
|
3991
3999
|
size: "sm",
|
|
3992
4000
|
leftIcon: /* @__PURE__ */ q(j, { className: "h-4 w-4" }),
|
|
@@ -4007,19 +4015,19 @@ var na = ({ transform: e }) => ({
|
|
|
4007
4015
|
});
|
|
4008
4016
|
function ra({ columnOrder: e, onColumnOrderChange: t }) {
|
|
4009
4017
|
return {
|
|
4010
|
-
sensors: Re(
|
|
4011
|
-
collisionDetection:
|
|
4018
|
+
sensors: ze(Re(Ie, { activationConstraint: { distance: 4 } }), Re(Fe, { coordinateGetter: X })),
|
|
4019
|
+
collisionDetection: Le,
|
|
4012
4020
|
modifiers: [na],
|
|
4013
4021
|
handleDragEnd: (n) => {
|
|
4014
4022
|
let { active: r, over: i } = n;
|
|
4015
4023
|
if (!i || r.id === i.id) return;
|
|
4016
4024
|
let a = e.indexOf(String(r.id)), o = e.indexOf(String(i.id));
|
|
4017
|
-
a === -1 || o === -1 || t(
|
|
4025
|
+
a === -1 || o === -1 || t(Ve(e, a, o));
|
|
4018
4026
|
}
|
|
4019
4027
|
};
|
|
4020
4028
|
}
|
|
4021
4029
|
function ia(e) {
|
|
4022
|
-
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } =
|
|
4030
|
+
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Z({ id: e });
|
|
4023
4031
|
return {
|
|
4024
4032
|
setNodeRef: r,
|
|
4025
4033
|
attributes: t,
|
|
@@ -4037,7 +4045,7 @@ function ia(e) {
|
|
|
4037
4045
|
//#endregion
|
|
4038
4046
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
4039
4047
|
function aa({ row: e, actions: t }) {
|
|
4040
|
-
return t.length === 0 ? null : /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(
|
|
4048
|
+
return t.length === 0 ? null : /* @__PURE__ */ J(Xn, { children: [/* @__PURE__ */ q(Zn, { children: /* @__PURE__ */ q(ot, {
|
|
4041
4049
|
variant: "tertiary",
|
|
4042
4050
|
size: "sm",
|
|
4043
4051
|
iconOnly: !0,
|
|
@@ -4122,7 +4130,7 @@ function da(e, t, n) {
|
|
|
4122
4130
|
}
|
|
4123
4131
|
var fa = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4124
4132
|
function pa({ header: e, density: t, enableSorting: n, enableFiltering: r, enableColumnOrdering: i, enableColumnResizing: a, enablePinning: o, enableColumnVisibility: s }) {
|
|
4125
|
-
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 =
|
|
4133
|
+
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 = Oe(c.columnDef.header, e.getContext());
|
|
4126
4134
|
return /* @__PURE__ */ J("th", {
|
|
4127
4135
|
ref: u ? d.setNodeRef : void 0,
|
|
4128
4136
|
colSpan: e.colSpan,
|
|
@@ -4221,12 +4229,12 @@ function ma({ row: e, onRowClick: t }) {
|
|
|
4221
4229
|
children: [/* @__PURE__ */ J("div", {
|
|
4222
4230
|
className: "flex items-center gap-2",
|
|
4223
4231
|
children: [
|
|
4224
|
-
i &&
|
|
4232
|
+
i && Oe(i.column.columnDef.cell, i.getContext()),
|
|
4225
4233
|
/* @__PURE__ */ q("div", {
|
|
4226
4234
|
className: "flex-1 min-w-0 text-p-std font-medium text-fg-default truncate",
|
|
4227
|
-
children: r &&
|
|
4235
|
+
children: r && Oe(r.column.columnDef.cell, r.getContext())
|
|
4228
4236
|
}),
|
|
4229
|
-
a &&
|
|
4237
|
+
a && Oe(a.column.columnDef.cell, a.getContext())
|
|
4230
4238
|
]
|
|
4231
4239
|
}), o.length > 0 && /* @__PURE__ */ q("dl", {
|
|
4232
4240
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -4239,7 +4247,7 @@ function ma({ row: e, onRowClick: t }) {
|
|
|
4239
4247
|
children: typeof t == "string" ? t : e.column.id
|
|
4240
4248
|
}), /* @__PURE__ */ q("dd", {
|
|
4241
4249
|
className: "text-p-sm text-fg-default truncate",
|
|
4242
|
-
children:
|
|
4250
|
+
children: Oe(e.column.columnDef.cell, e.getContext())
|
|
4243
4251
|
})]
|
|
4244
4252
|
}, e.id);
|
|
4245
4253
|
})
|
|
@@ -4260,10 +4268,10 @@ function ha({ rowCount: e }) {
|
|
|
4260
4268
|
}, t)) });
|
|
4261
4269
|
}
|
|
4262
4270
|
function ga(e, t) {
|
|
4263
|
-
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, ""), [
|
|
4271
|
+
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, ""), [Ce, we] = da(E, D, {}), [Te, Ee] = da(k, A, {}), [Fe, Ie] = da(M, ee, []), [Le, Re] = da(N, ne, {}), [ze, Ve] = da(re, ie, {
|
|
4264
4272
|
pageIndex: 0,
|
|
4265
4273
|
pageSize: L
|
|
4266
|
-
}),
|
|
4274
|
+
}), X = Ne({
|
|
4267
4275
|
data: n,
|
|
4268
4276
|
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [ca(), ...r], [r, w]),
|
|
4269
4277
|
getRowId: s,
|
|
@@ -4271,20 +4279,20 @@ function ga(e, t) {
|
|
|
4271
4279
|
sorting: _e,
|
|
4272
4280
|
columnFilters: ye,
|
|
4273
4281
|
globalFilter: xe,
|
|
4274
|
-
rowSelection:
|
|
4275
|
-
columnVisibility:
|
|
4276
|
-
columnOrder:
|
|
4277
|
-
columnPinning:
|
|
4278
|
-
pagination:
|
|
4282
|
+
rowSelection: Ce,
|
|
4283
|
+
columnVisibility: Te,
|
|
4284
|
+
columnOrder: Fe,
|
|
4285
|
+
columnPinning: Le,
|
|
4286
|
+
pagination: ze
|
|
4279
4287
|
},
|
|
4280
4288
|
onSortingChange: ve,
|
|
4281
4289
|
onColumnFiltersChange: be,
|
|
4282
4290
|
onGlobalFilterChange: Se,
|
|
4283
|
-
onRowSelectionChange:
|
|
4284
|
-
onColumnVisibilityChange:
|
|
4285
|
-
onColumnOrderChange:
|
|
4286
|
-
onColumnPinningChange:
|
|
4287
|
-
onPaginationChange:
|
|
4291
|
+
onRowSelectionChange: we,
|
|
4292
|
+
onColumnVisibilityChange: Ee,
|
|
4293
|
+
onColumnOrderChange: Ie,
|
|
4294
|
+
onColumnPinningChange: Re,
|
|
4295
|
+
onPaginationChange: Ve,
|
|
4288
4296
|
enableSorting: c,
|
|
4289
4297
|
enableMultiSort: l,
|
|
4290
4298
|
manualSorting: g,
|
|
@@ -4298,49 +4306,49 @@ function ga(e, t) {
|
|
|
4298
4306
|
manualPagination: oe,
|
|
4299
4307
|
pageCount: se,
|
|
4300
4308
|
rowCount: ce,
|
|
4301
|
-
getCoreRowModel:
|
|
4302
|
-
getSortedRowModel: c ?
|
|
4303
|
-
getFilteredRowModel: _ || x ?
|
|
4304
|
-
getPaginationRowModel: I ?
|
|
4305
|
-
}),
|
|
4309
|
+
getCoreRowModel: ke(),
|
|
4310
|
+
getSortedRowModel: c ? Me() : void 0,
|
|
4311
|
+
getFilteredRowModel: _ || x ? Ae() : void 0,
|
|
4312
|
+
getPaginationRowModel: I ? je() : void 0
|
|
4313
|
+
}), Z = X.getRowModel().rows, He = X.getVisibleLeafColumns().length, Ue = p(null), [Ge, Ke] = m(null);
|
|
4306
4314
|
d(() => {
|
|
4307
4315
|
if (!I || z) return;
|
|
4308
4316
|
let e = Ue.current?.getBoundingClientRect().height;
|
|
4309
|
-
e && e !==
|
|
4317
|
+
e && e !== Ge && Ke(e);
|
|
4310
4318
|
}, [
|
|
4311
4319
|
I,
|
|
4312
4320
|
z,
|
|
4313
4321
|
V,
|
|
4314
|
-
|
|
4315
|
-
|
|
4322
|
+
Z,
|
|
4323
|
+
Ge
|
|
4316
4324
|
]);
|
|
4317
|
-
let
|
|
4318
|
-
columnOrder:
|
|
4319
|
-
onColumnOrderChange:
|
|
4320
|
-
}),
|
|
4321
|
-
count:
|
|
4322
|
-
getScrollElement: () =>
|
|
4325
|
+
let qe = Ge ?? le, Je = I && !z ? Math.max(0, ze.pageSize - Z.length) * qe : 0, Ye = f(() => Fe.length > 0 ? Fe : X.getAllLeafColumns().map((e) => e.id), [Fe, X]), Xe = ra({
|
|
4326
|
+
columnOrder: Ye,
|
|
4327
|
+
onColumnOrderChange: Ie
|
|
4328
|
+
}), Ze = (e) => Xe.handleDragEnd(e), Qe = p(null), $e = De({
|
|
4329
|
+
count: Z.length,
|
|
4330
|
+
getScrollElement: () => Qe.current,
|
|
4323
4331
|
estimateSize: () => le,
|
|
4324
4332
|
overscan: 10,
|
|
4325
4333
|
enabled: z
|
|
4326
|
-
}),
|
|
4334
|
+
}), et = z ? $e.getVirtualItems() : null, tt = et && et.length > 0 ? et[0]?.start ?? 0 : 0, nt = et && et.length > 0 ? $e.getTotalSize() - (et[et.length - 1]?.end ?? 0) : 0, rt = We(ge), it = (e) => {
|
|
4327
4335
|
let t = e.original?.id;
|
|
4328
4336
|
return typeof t == "string" || typeof t == "number" ? String(t) : e.id;
|
|
4329
|
-
},
|
|
4337
|
+
}, at = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4330
4338
|
ref: t,
|
|
4331
|
-
"data-test-id":
|
|
4332
|
-
"data-row-id":
|
|
4339
|
+
"data-test-id": rt(`row-${it(e)}`),
|
|
4340
|
+
"data-row-id": it(e),
|
|
4333
4341
|
"data-selected": e.getIsSelected() || void 0,
|
|
4334
4342
|
onClick: B ? () => B(e.original) : void 0,
|
|
4335
4343
|
className: Q("group border-t border-border-default", B && "cursor-pointer"),
|
|
4336
4344
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ q("td", {
|
|
4337
|
-
"data-test-id":
|
|
4345
|
+
"data-test-id": rt(`cell-${e.column.id}`),
|
|
4338
4346
|
style: ua(e.column),
|
|
4339
4347
|
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"]),
|
|
4340
|
-
children:
|
|
4348
|
+
children: Oe(e.column.columnDef.cell, e.getContext())
|
|
4341
4349
|
}, e.id))
|
|
4342
|
-
}, e.id),
|
|
4343
|
-
"data-test-id":
|
|
4350
|
+
}, e.id), ot = (e, t) => /* @__PURE__ */ q("tr", {
|
|
4351
|
+
"data-test-id": rt(`header-row-${e}`),
|
|
4344
4352
|
children: t.map((e) => /* @__PURE__ */ q(pa, {
|
|
4345
4353
|
header: e,
|
|
4346
4354
|
density: V,
|
|
@@ -4351,18 +4359,18 @@ function ga(e, t) {
|
|
|
4351
4359
|
enablePinning: te,
|
|
4352
4360
|
enableColumnVisibility: O
|
|
4353
4361
|
}, e.id))
|
|
4354
|
-
}, e),
|
|
4362
|
+
}, e), st = /* @__PURE__ */ J("table", {
|
|
4355
4363
|
className: "w-full border-collapse text-p-std text-fg-default",
|
|
4356
|
-
style: { width: P ?
|
|
4364
|
+
style: { width: P ? X.getTotalSize() : "100%" },
|
|
4357
4365
|
children: [/* @__PURE__ */ q("thead", {
|
|
4358
4366
|
className: Q("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (H || U) && "sticky top-0 z-10"),
|
|
4359
|
-
children:
|
|
4367
|
+
children: X.getHeaderGroups().map((e) => ot(e.id, e.headers))
|
|
4360
4368
|
}), /* @__PURE__ */ q("tbody", { children: i ? /* @__PURE__ */ q(Qi, {
|
|
4361
4369
|
columnCount: He,
|
|
4362
|
-
rowCount:
|
|
4370
|
+
rowCount: ze.pageSize,
|
|
4363
4371
|
testIdPrefix: ge
|
|
4364
|
-
}) :
|
|
4365
|
-
"data-test-id":
|
|
4372
|
+
}) : Z.length === 0 ? /* @__PURE__ */ q("tr", {
|
|
4373
|
+
"data-test-id": rt("empty-row"),
|
|
4366
4374
|
children: /* @__PURE__ */ q("td", {
|
|
4367
4375
|
colSpan: He,
|
|
4368
4376
|
className: "p-0",
|
|
@@ -4371,32 +4379,32 @@ function ga(e, t) {
|
|
|
4371
4379
|
title: o
|
|
4372
4380
|
})
|
|
4373
4381
|
})
|
|
4374
|
-
}) : z &&
|
|
4375
|
-
|
|
4382
|
+
}) : z && et ? /* @__PURE__ */ J(K, { children: [
|
|
4383
|
+
tt > 0 && /* @__PURE__ */ q("tr", {
|
|
4376
4384
|
"aria-hidden": !0,
|
|
4377
|
-
"data-test-id":
|
|
4385
|
+
"data-test-id": rt("padding-top-row"),
|
|
4378
4386
|
children: /* @__PURE__ */ q("td", {
|
|
4379
|
-
style: { height:
|
|
4387
|
+
style: { height: tt },
|
|
4380
4388
|
colSpan: He
|
|
4381
4389
|
})
|
|
4382
4390
|
}),
|
|
4383
|
-
|
|
4384
|
-
let t =
|
|
4385
|
-
return t ?
|
|
4391
|
+
et.map((e) => {
|
|
4392
|
+
let t = Z[e.index];
|
|
4393
|
+
return t ? at(t) : null;
|
|
4386
4394
|
}),
|
|
4387
|
-
|
|
4395
|
+
nt > 0 && /* @__PURE__ */ q("tr", {
|
|
4388
4396
|
"aria-hidden": !0,
|
|
4389
|
-
"data-test-id":
|
|
4397
|
+
"data-test-id": rt("padding-bottom-row"),
|
|
4390
4398
|
children: /* @__PURE__ */ q("td", {
|
|
4391
|
-
style: { height:
|
|
4399
|
+
style: { height: nt },
|
|
4392
4400
|
colSpan: He
|
|
4393
4401
|
})
|
|
4394
4402
|
})
|
|
4395
|
-
] }) : /* @__PURE__ */ J(K, { children: [
|
|
4403
|
+
] }) : /* @__PURE__ */ J(K, { children: [Z.map((e, t) => at(e, t === 0 ? Ue : void 0)), Je > 0 && /* @__PURE__ */ q("tr", {
|
|
4396
4404
|
"aria-hidden": !0,
|
|
4397
|
-
"data-test-id":
|
|
4405
|
+
"data-test-id": rt("filler-row"),
|
|
4398
4406
|
children: /* @__PURE__ */ q("td", {
|
|
4399
|
-
style: { height:
|
|
4407
|
+
style: { height: Je },
|
|
4400
4408
|
colSpan: He,
|
|
4401
4409
|
className: "p-0"
|
|
4402
4410
|
})
|
|
@@ -4408,7 +4416,7 @@ function ga(e, t) {
|
|
|
4408
4416
|
className: Q("w-full rounded-lg border border-border-default bg-bg-default", U && "h-full flex flex-col", W, G),
|
|
4409
4417
|
children: [
|
|
4410
4418
|
de === !1 ? null : de ?? /* @__PURE__ */ q(ta, {
|
|
4411
|
-
table:
|
|
4419
|
+
table: X,
|
|
4412
4420
|
enableGlobalFilter: x,
|
|
4413
4421
|
enableColumnVisibility: O,
|
|
4414
4422
|
searchPlaceholder: pe,
|
|
@@ -4426,33 +4434,33 @@ function ga(e, t) {
|
|
|
4426
4434
|
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
4427
4435
|
className: Q("hidden", U ? "md:flex md:flex-col md:flex-1 md:min-h-0" : "md:block"),
|
|
4428
4436
|
children: /* @__PURE__ */ q("div", {
|
|
4429
|
-
ref:
|
|
4437
|
+
ref: Qe,
|
|
4430
4438
|
className: Q("w-full overflow-auto", de === !1 ? "rounded-lg" : "rounded-b-lg", U && "flex-1 min-h-0"),
|
|
4431
4439
|
style: U ? void 0 : z || H ? { maxHeight: ue } : void 0,
|
|
4432
|
-
children: j ? /* @__PURE__ */ q(
|
|
4433
|
-
sensors:
|
|
4434
|
-
collisionDetection:
|
|
4435
|
-
modifiers:
|
|
4436
|
-
onDragEnd:
|
|
4437
|
-
children: /* @__PURE__ */ q(
|
|
4438
|
-
items:
|
|
4439
|
-
strategy:
|
|
4440
|
-
children:
|
|
4440
|
+
children: j ? /* @__PURE__ */ q(Pe, {
|
|
4441
|
+
sensors: Xe.sensors,
|
|
4442
|
+
collisionDetection: Xe.collisionDetection,
|
|
4443
|
+
modifiers: Xe.modifiers,
|
|
4444
|
+
onDragEnd: Ze,
|
|
4445
|
+
children: /* @__PURE__ */ q(Be, {
|
|
4446
|
+
items: Ye,
|
|
4447
|
+
strategy: Y,
|
|
4448
|
+
children: st
|
|
4441
4449
|
})
|
|
4442
|
-
}) :
|
|
4450
|
+
}) : st
|
|
4443
4451
|
})
|
|
4444
4452
|
}), /* @__PURE__ */ q("div", {
|
|
4445
4453
|
className: "md:hidden",
|
|
4446
|
-
children: i ? /* @__PURE__ */ q(ha, { rowCount:
|
|
4454
|
+
children: i ? /* @__PURE__ */ q(ha, { rowCount: ze.pageSize }) : Z.length === 0 ? /* @__PURE__ */ q(ar, {
|
|
4447
4455
|
size: "sm",
|
|
4448
4456
|
title: o
|
|
4449
|
-
}) :
|
|
4457
|
+
}) : Z.map((e) => /* @__PURE__ */ q(ma, {
|
|
4450
4458
|
row: e,
|
|
4451
4459
|
onRowClick: B
|
|
4452
4460
|
}, e.id))
|
|
4453
4461
|
})] }),
|
|
4454
4462
|
I && !a && /* @__PURE__ */ q(Zi, {
|
|
4455
|
-
table:
|
|
4463
|
+
table: X,
|
|
4456
4464
|
pageSizeOptions: R,
|
|
4457
4465
|
locale: ae,
|
|
4458
4466
|
dataTestId: ge
|
|
@@ -4547,7 +4555,7 @@ var Ca = {
|
|
|
4547
4555
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4548
4556
|
}
|
|
4549
4557
|
}, 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) {
|
|
4550
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = ya(), x =
|
|
4558
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = ya(), x = Ye(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", {
|
|
4551
4559
|
ref: m,
|
|
4552
4560
|
id: w,
|
|
4553
4561
|
type: "button",
|
|
@@ -4571,7 +4579,7 @@ var Ca = {
|
|
|
4571
4579
|
className: "truncate",
|
|
4572
4580
|
children: t
|
|
4573
4581
|
}),
|
|
4574
|
-
C && (a ? /* @__PURE__ */ q(
|
|
4582
|
+
C && (a ? /* @__PURE__ */ q(jt, {
|
|
4575
4583
|
size: "xs",
|
|
4576
4584
|
...a,
|
|
4577
4585
|
children: i
|
|
@@ -4599,7 +4607,7 @@ var Ca = {
|
|
|
4599
4607
|
})]
|
|
4600
4608
|
}) : O;
|
|
4601
4609
|
}), Ea = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4602
|
-
let { value: c, tabsId: l } = ya(), u =
|
|
4610
|
+
let { value: c, tabsId: l } = ya(), u = Ye(c, e);
|
|
4603
4611
|
return !u && !a ? null : /* @__PURE__ */ q("div", {
|
|
4604
4612
|
ref: s,
|
|
4605
4613
|
id: i ?? `${l}-panel-${e}`,
|
|
@@ -5162,6 +5170,6 @@ var Qa = {
|
|
|
5162
5170
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5163
5171
|
};
|
|
5164
5172
|
//#endregion
|
|
5165
|
-
export {
|
|
5173
|
+
export { et as Accordion, tt as AccordionItem, xt as Avatar, St as AvatarGroup, jt as Badge, Pt as Breadcrumb, ot as Button, It as ButtonGroup, zt as Card, Vt as CardGroup, Wt as Checkbox, Zt as Copy, an as Counter, xn as DatePicker, Mn as DeviceRestriction, In as DistributionBar, Je 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, dt as Upload, pt 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, ut as validateSingleFile, $a as white, ao as yellow };
|
|
5166
5174
|
|
|
5167
5175
|
//# sourceMappingURL=index.js.map
|