@dinofront/design_system 1.2.0 → 1.2.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/components/DatePicker/DatePicker.types.d.ts +12 -0
- package/dist/components/FormField/FormField.types.d.ts +8 -1
- package/dist/components/Radio/Radio.types.d.ts +1 -0
- package/dist/components/Select/Select.types.d.ts +17 -0
- package/dist/components/Upload/Upload.types.d.ts +5 -1
- package/dist/index.js +1128 -1006
- package/dist/index.js.map +1 -1
- package/dist/styles.css +20 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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, Construction as O, Copy as k, File as A, Info as j, Loader2 as M, Menu as N, Minus as P, Moon as F, MoreHorizontal as I, Paperclip as L, Pencil as R, Plus as z, Search as ee, SearchX 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
|
|
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, Construction as O, Copy as k, File as A, Info as j, Loader2 as M, Menu as N, Minus as P, Moon as F, MoreHorizontal as I, Paperclip as L, Pencil as R, Plus as z, Search as ee, SearchX as B, Sparkles as V, Sun as te, Trash2 as H, UploadCloud as U, User as ne, Users as re, X as W, XCircle as G } from "lucide-react";
|
|
3
|
+
import { clsx as ie } from "clsx";
|
|
4
|
+
import { extendTailwindMerge as K } from "tailwind-merge";
|
|
5
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as X } from "react-dom";
|
|
7
|
+
import { Controller as ae, useForm as oe } from "react-hook-form";
|
|
8
|
+
import { yupResolver as se } from "@hookform/resolvers/yup";
|
|
9
9
|
//#region src/lib/cn.ts
|
|
10
|
-
var
|
|
10
|
+
var ce = K({ extend: { theme: { text: [
|
|
11
11
|
"h-xl",
|
|
12
12
|
"h-lg",
|
|
13
13
|
"h-md",
|
|
@@ -26,43 +26,43 @@ var fe = ce({ extend: { theme: { text: [
|
|
|
26
26
|
"label-xs",
|
|
27
27
|
"label-xxs"
|
|
28
28
|
] } } });
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function Z(...e) {
|
|
30
|
+
return ce(ie(e));
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/components/Divider/Divider.tsx
|
|
34
|
-
var
|
|
34
|
+
var le = {
|
|
35
35
|
horizontal: "h-0 w-full border-t",
|
|
36
36
|
vertical: "w-0 h-full self-stretch border-l"
|
|
37
|
-
},
|
|
37
|
+
}, ue = {
|
|
38
38
|
solid: "border-solid",
|
|
39
39
|
dashed: "border-dashed"
|
|
40
|
-
},
|
|
40
|
+
}, de = {
|
|
41
41
|
default: "border-border-default",
|
|
42
42
|
subtle: "border-border-subtle",
|
|
43
43
|
strong: "border-border-strong",
|
|
44
44
|
brand: "border-border-brand"
|
|
45
|
-
},
|
|
46
|
-
return /* @__PURE__ */
|
|
45
|
+
}, fe = a(function({ orientation: e = "horizontal", variant: t = "solid", color: n = "default", className: r, dataTestId: i, ...a }, o) {
|
|
46
|
+
return /* @__PURE__ */ J("div", {
|
|
47
47
|
ref: o,
|
|
48
48
|
role: "separator",
|
|
49
49
|
"aria-orientation": e,
|
|
50
50
|
"data-test-id": i,
|
|
51
|
-
className:
|
|
51
|
+
className: Z("shrink-0", le[e], ue[t], de[n], r),
|
|
52
52
|
...a
|
|
53
53
|
});
|
|
54
|
-
}),
|
|
55
|
-
function
|
|
56
|
-
let e = c(
|
|
54
|
+
}), pe = r(null);
|
|
55
|
+
function me() {
|
|
56
|
+
let e = c(pe);
|
|
57
57
|
if (!e) throw Error("AccordionItem must be used inside <Accordion>");
|
|
58
58
|
return e;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function he(e) {
|
|
61
61
|
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
let [d, f] = m(() =>
|
|
65
|
-
return /* @__PURE__ */
|
|
63
|
+
var ge = 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) {
|
|
64
|
+
let [d, f] = m(() => he(t)), p = n !== void 0, h = p ? he(n) : d;
|
|
65
|
+
return /* @__PURE__ */ J(pe.Provider, {
|
|
66
66
|
value: {
|
|
67
67
|
openValues: h,
|
|
68
68
|
toggle: (t) => {
|
|
@@ -72,45 +72,45 @@ var be = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
72
72
|
animated: i,
|
|
73
73
|
showDivider: a
|
|
74
74
|
},
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ J("div", {
|
|
76
76
|
ref: u,
|
|
77
77
|
"data-test-id": c,
|
|
78
|
-
className:
|
|
78
|
+
className: Z("flex flex-col divide-y divide-border-default border border-border-default rounded-lg overflow-hidden bg-bg-default", o),
|
|
79
79
|
...l,
|
|
80
80
|
children: s
|
|
81
81
|
})
|
|
82
82
|
});
|
|
83
|
-
}),
|
|
84
|
-
let { openValues: l, toggle: d, animated: f, showDivider: p } =
|
|
85
|
-
return /* @__PURE__ */
|
|
83
|
+
}), _e = a(function({ value: e, title: t, icon: n, disabled: r, className: i, children: a, dataTestId: o, ...s }, c) {
|
|
84
|
+
let { openValues: l, toggle: d, animated: f, showDivider: p } = me(), m = l.includes(e), h = u(), g = u(), _ = /* @__PURE__ */ Y(q, { children: [p && /* @__PURE__ */ J(fe, { className: "mb-4" }), a] });
|
|
85
|
+
return /* @__PURE__ */ Y("div", {
|
|
86
86
|
ref: c,
|
|
87
87
|
"data-test-id": o,
|
|
88
88
|
"data-state": m ? "open" : "closed",
|
|
89
|
-
className:
|
|
89
|
+
className: Z("group", i),
|
|
90
90
|
...s,
|
|
91
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ J("h3", { children: /* @__PURE__ */ Y("button", {
|
|
92
92
|
id: g,
|
|
93
93
|
type: "button",
|
|
94
94
|
onClick: () => d(e),
|
|
95
95
|
disabled: r,
|
|
96
96
|
"aria-expanded": m,
|
|
97
97
|
"aria-controls": h,
|
|
98
|
-
className:
|
|
99
|
-
children: [/* @__PURE__ */
|
|
98
|
+
className: Z("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"),
|
|
99
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
100
100
|
className: "inline-flex items-center gap-3",
|
|
101
|
-
children: [n && /* @__PURE__ */
|
|
101
|
+
children: [n && /* @__PURE__ */ J("span", {
|
|
102
102
|
className: "inline-flex text-fg-secondary",
|
|
103
103
|
children: n
|
|
104
104
|
}), t]
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
className:
|
|
105
|
+
}), /* @__PURE__ */ J(S, {
|
|
106
|
+
className: Z("h-5 w-5 shrink-0 text-fg-secondary transition-transform duration-200", m && "rotate-180"),
|
|
107
107
|
"aria-hidden": !0
|
|
108
108
|
})]
|
|
109
|
-
}) }), f ? /* @__PURE__ */
|
|
110
|
-
className:
|
|
111
|
-
children: /* @__PURE__ */
|
|
109
|
+
}) }), f ? /* @__PURE__ */ J("div", {
|
|
110
|
+
className: Z("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
111
|
+
children: /* @__PURE__ */ J("div", {
|
|
112
112
|
className: "overflow-hidden min-h-0",
|
|
113
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ J("div", {
|
|
114
114
|
id: h,
|
|
115
115
|
role: "region",
|
|
116
116
|
"aria-labelledby": g,
|
|
@@ -119,7 +119,7 @@ var be = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
119
119
|
children: _
|
|
120
120
|
})
|
|
121
121
|
})
|
|
122
|
-
}) : /* @__PURE__ */
|
|
122
|
+
}) : /* @__PURE__ */ J("div", {
|
|
123
123
|
id: h,
|
|
124
124
|
role: "region",
|
|
125
125
|
"aria-labelledby": g,
|
|
@@ -128,26 +128,26 @@ var be = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
128
128
|
children: _
|
|
129
129
|
})]
|
|
130
130
|
});
|
|
131
|
-
}),
|
|
131
|
+
}), ve = {
|
|
132
132
|
xs: "h-6 w-6 text-p-xs",
|
|
133
133
|
sm: "h-8 w-8 text-p-sm",
|
|
134
134
|
md: "h-10 w-10 text-p-std",
|
|
135
135
|
lg: "h-12 w-12 text-p-md",
|
|
136
136
|
xl: "h-16 w-16 text-h-xs",
|
|
137
137
|
"2xl": "h-20 w-20 text-h-xs"
|
|
138
|
-
},
|
|
138
|
+
}, ye = {
|
|
139
139
|
xs: "h-1.5 w-1.5",
|
|
140
140
|
sm: "h-2 w-2",
|
|
141
141
|
md: "h-2.5 w-2.5",
|
|
142
142
|
lg: "h-3 w-3",
|
|
143
143
|
xl: "h-3.5 w-3.5",
|
|
144
144
|
"2xl": "h-4 w-4"
|
|
145
|
-
},
|
|
145
|
+
}, be = {
|
|
146
146
|
online: "bg-green-500",
|
|
147
147
|
offline: "bg-gray-400 dark:bg-gray-500",
|
|
148
148
|
away: "bg-yellow-600",
|
|
149
149
|
busy: "bg-red-600"
|
|
150
|
-
},
|
|
150
|
+
}, xe = {
|
|
151
151
|
xs: "-ml-1.5",
|
|
152
152
|
sm: "-ml-2",
|
|
153
153
|
md: "-ml-2.5",
|
|
@@ -155,11 +155,11 @@ var be = a(function({ type: e = "single", defaultValue: t, value: n, onValueChan
|
|
|
155
155
|
xl: "-ml-4",
|
|
156
156
|
"2xl": "-ml-5"
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function Se(e) {
|
|
159
159
|
let t = e.trim().split(/\s+/);
|
|
160
160
|
return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Ce(e) {
|
|
163
163
|
let t = [
|
|
164
164
|
"bg-brand-500",
|
|
165
165
|
"bg-blue-600",
|
|
@@ -171,66 +171,66 @@ function De(e) {
|
|
|
171
171
|
for (let t = 0; t < e.length; t++) n = (n << 5) - n + e.charCodeAt(t), n |= 0;
|
|
172
172
|
return t[Math.abs(n) % t.length];
|
|
173
173
|
}
|
|
174
|
-
var
|
|
175
|
-
let [d, f] = m(!1), p = !!e && !d, h = n ?
|
|
176
|
-
return /* @__PURE__ */
|
|
174
|
+
var we = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape: a = "circle", fallback: o, className: s, dataTestId: c, ...l }, u) {
|
|
175
|
+
let [d, f] = m(!1), p = !!e && !d, h = n ? Se(n) : "", g = n ? Ce(n) : "bg-gray-300 dark:bg-gray-600";
|
|
176
|
+
return /* @__PURE__ */ Y("span", {
|
|
177
177
|
ref: u,
|
|
178
178
|
"data-test-id": c,
|
|
179
|
-
className:
|
|
179
|
+
className: Z("relative inline-flex shrink-0", s),
|
|
180
180
|
...l,
|
|
181
|
-
children: [/* @__PURE__ */
|
|
182
|
-
className:
|
|
183
|
-
children: p ? /* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ J("span", {
|
|
182
|
+
className: Z("inline-flex items-center justify-center overflow-hidden font-semibold text-white select-none", ve[r], a === "circle" ? "rounded-full" : "rounded-md", !p && g),
|
|
183
|
+
children: p ? /* @__PURE__ */ J("img", {
|
|
184
184
|
src: e,
|
|
185
185
|
alt: t ?? n ?? "",
|
|
186
186
|
onError: () => f(!0),
|
|
187
187
|
className: "h-full w-full object-cover"
|
|
188
|
-
}) : n ? h : o ?? /* @__PURE__ */
|
|
189
|
-
}), i && /* @__PURE__ */
|
|
188
|
+
}) : n ? h : o ?? /* @__PURE__ */ J(ne, { className: "h-1/2 w-1/2 text-white/90" })
|
|
189
|
+
}), i && /* @__PURE__ */ J("span", {
|
|
190
190
|
"aria-label": i,
|
|
191
|
-
className:
|
|
191
|
+
className: Z("absolute right-0 bottom-0 rounded-full ring-2 ring-white", ye[r], be[i])
|
|
192
192
|
})]
|
|
193
193
|
});
|
|
194
|
-
}),
|
|
194
|
+
}), Te = a(function({ size: e = "md", max: t, children: n, className: r, dataTestId: i, ...a }, o) {
|
|
195
195
|
let s = Array.isArray(n) ? n : [n], c = t === void 0 ? s : s.slice(0, t), l = t === void 0 ? 0 : s.length - t;
|
|
196
|
-
return /* @__PURE__ */
|
|
196
|
+
return /* @__PURE__ */ Y("div", {
|
|
197
197
|
ref: o,
|
|
198
198
|
"data-test-id": i,
|
|
199
|
-
className:
|
|
199
|
+
className: Z("inline-flex items-center", r),
|
|
200
200
|
...a,
|
|
201
|
-
children: [c.map((t, n) => /* @__PURE__ */
|
|
202
|
-
className:
|
|
201
|
+
children: [c.map((t, n) => /* @__PURE__ */ J("div", {
|
|
202
|
+
className: Z("rounded-full ring-2 ring-white", n > 0 && xe[e]),
|
|
203
203
|
style: { zIndex: c.length - n },
|
|
204
204
|
children: t
|
|
205
|
-
}, n)), l > 0 && /* @__PURE__ */
|
|
206
|
-
className:
|
|
207
|
-
children: /* @__PURE__ */
|
|
205
|
+
}, n)), l > 0 && /* @__PURE__ */ J("div", {
|
|
206
|
+
className: Z("rounded-full ring-2 ring-white", xe[e]),
|
|
207
|
+
children: /* @__PURE__ */ J(we, {
|
|
208
208
|
size: e,
|
|
209
209
|
name: `+${l}`
|
|
210
210
|
})
|
|
211
211
|
})]
|
|
212
212
|
});
|
|
213
|
-
}),
|
|
213
|
+
}), Ee = {
|
|
214
214
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
215
215
|
md: "h-6 px-2 text-p-sm gap-1",
|
|
216
216
|
sm: "h-5 px-1.5 text-p-sm gap-1",
|
|
217
217
|
xs: "h-4 px-1 text-p-xs gap-0.5"
|
|
218
|
-
},
|
|
218
|
+
}, De = {
|
|
219
219
|
lg: "rounded-md",
|
|
220
220
|
md: "rounded-md",
|
|
221
221
|
sm: "rounded",
|
|
222
222
|
xs: "rounded"
|
|
223
|
-
},
|
|
223
|
+
}, Oe = {
|
|
224
224
|
lg: "size-2.5",
|
|
225
225
|
md: "size-2",
|
|
226
226
|
sm: "size-1.5",
|
|
227
227
|
xs: "size-1"
|
|
228
|
-
},
|
|
228
|
+
}, ke = {
|
|
229
229
|
lg: "min-w-7 px-0 justify-center",
|
|
230
230
|
md: "min-w-6 px-0 justify-center",
|
|
231
231
|
sm: "min-w-5 px-0 justify-center",
|
|
232
232
|
xs: "min-w-4 px-0 justify-center"
|
|
233
|
-
},
|
|
233
|
+
}, Ae = {
|
|
234
234
|
neutral: "bg-bg-subtle text-fg-default border border-border-default",
|
|
235
235
|
brand: "bg-brand-20 text-brand-800 border border-brand-100",
|
|
236
236
|
success: "bg-green-50 text-green-800 border border-green-100",
|
|
@@ -238,7 +238,7 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
238
238
|
danger: "bg-red-50 text-red-800 border border-red-100",
|
|
239
239
|
info: "bg-blue-50 text-blue-800 border border-blue-100",
|
|
240
240
|
privacy: "bg-purple-50 text-purple-800 border border-purple-100"
|
|
241
|
-
},
|
|
241
|
+
}, je = {
|
|
242
242
|
neutral: "bg-transparent text-fg-default border border-border-strong",
|
|
243
243
|
brand: "bg-transparent text-brand-700 border border-brand-500",
|
|
244
244
|
success: "bg-transparent text-green-700 border border-green-500",
|
|
@@ -246,7 +246,7 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
246
246
|
danger: "bg-transparent text-red-700 border border-red-500",
|
|
247
247
|
info: "bg-transparent text-blue-700 border border-blue-500",
|
|
248
248
|
privacy: "bg-transparent text-purple-700 border border-purple-500"
|
|
249
|
-
},
|
|
249
|
+
}, Me = {
|
|
250
250
|
neutral: "bg-fg-default text-bg-default",
|
|
251
251
|
brand: "bg-brand-500 text-white",
|
|
252
252
|
success: "bg-green-600 text-white",
|
|
@@ -254,22 +254,22 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
254
254
|
danger: "bg-red-700 text-white",
|
|
255
255
|
info: "bg-blue-600 text-white",
|
|
256
256
|
privacy: "bg-purple-500 text-white"
|
|
257
|
-
},
|
|
257
|
+
}, Ne = {
|
|
258
258
|
filled: "hover:brightness-95 active:brightness-90",
|
|
259
259
|
outline: "hover:bg-bg-subtle active:bg-bg-container",
|
|
260
260
|
accent: "hover:brightness-90 active:brightness-80"
|
|
261
|
-
},
|
|
262
|
-
let v = t === "filled" ?
|
|
263
|
-
if (s) return /* @__PURE__ */
|
|
261
|
+
}, Pe = 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 }, _) {
|
|
262
|
+
let v = t === "filled" ? Ae[e] : t === "outline" ? je[e] : Me[e];
|
|
263
|
+
if (s) return /* @__PURE__ */ J("span", {
|
|
264
264
|
ref: _,
|
|
265
265
|
"data-test-id": p,
|
|
266
266
|
"aria-hidden": !g["aria-label"] || void 0,
|
|
267
267
|
onClick: l ? void 0 : m,
|
|
268
|
-
className:
|
|
268
|
+
className: Z("inline-block shrink-0 rounded-full", Oe[n], Me[e], l && "opacity-50", d),
|
|
269
269
|
...g
|
|
270
270
|
});
|
|
271
|
-
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" :
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : De[n];
|
|
272
|
+
return /* @__PURE__ */ Y("span", {
|
|
273
273
|
ref: _,
|
|
274
274
|
"data-test-id": p,
|
|
275
275
|
role: u ? "button" : void 0,
|
|
@@ -279,83 +279,83 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
279
279
|
onKeyDown: u ? (e) => {
|
|
280
280
|
h?.(e), !(l || !m) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m(e));
|
|
281
281
|
} : h,
|
|
282
|
-
className:
|
|
282
|
+
className: Z("inline-flex items-center font-medium whitespace-nowrap select-none", Ee[n], b, v, y && ke[n], u && !l && Z("cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", Ne[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
|
|
283
283
|
...g,
|
|
284
284
|
children: [
|
|
285
|
-
c ? /* @__PURE__ */
|
|
286
|
-
className:
|
|
285
|
+
c ? /* @__PURE__ */ J("span", {
|
|
286
|
+
className: Z("inline-block shrink-0 rounded-full", Oe[n], Me[e]),
|
|
287
287
|
"aria-hidden": !0
|
|
288
|
-
}) : i && /* @__PURE__ */
|
|
288
|
+
}) : i && /* @__PURE__ */ J("span", {
|
|
289
289
|
className: "inline-flex shrink-0",
|
|
290
290
|
children: i
|
|
291
291
|
}),
|
|
292
292
|
f,
|
|
293
|
-
a && !o && /* @__PURE__ */
|
|
293
|
+
a && !o && /* @__PURE__ */ J("span", {
|
|
294
294
|
className: "inline-flex shrink-0",
|
|
295
295
|
children: a
|
|
296
296
|
}),
|
|
297
|
-
o && /* @__PURE__ */
|
|
297
|
+
o && /* @__PURE__ */ J("button", {
|
|
298
298
|
type: "button",
|
|
299
299
|
onClick: o,
|
|
300
300
|
disabled: l,
|
|
301
301
|
"aria-label": "Dismiss",
|
|
302
302
|
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",
|
|
303
|
-
children: /* @__PURE__ */ W
|
|
303
|
+
children: /* @__PURE__ */ J(W, { className: "h-3 w-3" })
|
|
304
304
|
})
|
|
305
305
|
]
|
|
306
306
|
});
|
|
307
|
-
}),
|
|
307
|
+
}), Fe = {
|
|
308
308
|
md: "text-p-sm",
|
|
309
309
|
sm: "text-p-xs"
|
|
310
|
-
},
|
|
310
|
+
}, Ie = "rounded-sm text-fg-tertiary transition-colors hover:text-fg-secondary outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Le = a(function({ items: e, currentValue: n, onSelect: r, separator: i = "/", size: a = "md", className: o, dataTestId: s, ...c }, l) {
|
|
311
311
|
let u = n ?? e[e.length - 1]?.value;
|
|
312
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ J("nav", {
|
|
313
313
|
ref: l,
|
|
314
314
|
"aria-label": "Breadcrumb",
|
|
315
315
|
"data-test-id": s,
|
|
316
|
-
className:
|
|
316
|
+
className: Z(Fe[a], o),
|
|
317
317
|
...c,
|
|
318
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ J("ol", {
|
|
319
319
|
className: "flex items-center",
|
|
320
320
|
children: e.map((e, n) => {
|
|
321
321
|
let a = e.value === u;
|
|
322
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ Y(t, { children: [n > 0 && /* @__PURE__ */ J("li", {
|
|
323
323
|
"aria-hidden": "true",
|
|
324
324
|
className: "px-1.5 text-fg-tertiary",
|
|
325
325
|
children: i
|
|
326
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ J("li", {
|
|
327
327
|
className: "flex items-center",
|
|
328
|
-
children: a ? /* @__PURE__ */
|
|
328
|
+
children: a ? /* @__PURE__ */ J("span", {
|
|
329
329
|
"aria-current": "page",
|
|
330
330
|
className: "font-medium text-fg-default",
|
|
331
331
|
children: e.label
|
|
332
|
-
}) : e.disabled ? /* @__PURE__ */
|
|
332
|
+
}) : e.disabled ? /* @__PURE__ */ J("span", {
|
|
333
333
|
className: "cursor-not-allowed text-fg-disabled",
|
|
334
334
|
children: e.label
|
|
335
|
-
}) : e.href ? /* @__PURE__ */
|
|
335
|
+
}) : e.href ? /* @__PURE__ */ J("a", {
|
|
336
336
|
href: e.href,
|
|
337
337
|
onClick: () => r?.(e.value),
|
|
338
|
-
className:
|
|
338
|
+
className: Ie,
|
|
339
339
|
children: e.label
|
|
340
|
-
}) : /* @__PURE__ */
|
|
340
|
+
}) : /* @__PURE__ */ J("button", {
|
|
341
341
|
type: "button",
|
|
342
342
|
onClick: () => r?.(e.value),
|
|
343
|
-
className:
|
|
343
|
+
className: Ie,
|
|
344
344
|
children: e.label
|
|
345
345
|
})
|
|
346
346
|
})] }, e.value);
|
|
347
347
|
})
|
|
348
348
|
})
|
|
349
349
|
});
|
|
350
|
-
}),
|
|
350
|
+
}), Re = {
|
|
351
351
|
lg: "h-12 px-5 text-p-md gap-2 rounded-lg",
|
|
352
352
|
md: "h-10 px-4 text-p-std gap-2 rounded-lg",
|
|
353
353
|
sm: "h-8 px-3 text-p-sm gap-1.5 rounded-md"
|
|
354
|
-
},
|
|
354
|
+
}, ze = {
|
|
355
355
|
lg: "h-12 w-12 rounded-lg",
|
|
356
356
|
md: "h-10 w-10 rounded-lg",
|
|
357
357
|
sm: "h-8 w-8 rounded-md"
|
|
358
|
-
},
|
|
358
|
+
}, Be = {
|
|
359
359
|
primary: [
|
|
360
360
|
"bg-brand-500 text-white border border-transparent",
|
|
361
361
|
"hover:bg-brand-600 active:bg-brand-700",
|
|
@@ -380,13 +380,13 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
380
380
|
"disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
|
|
381
381
|
"focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2"
|
|
382
382
|
].join(" ")
|
|
383
|
-
},
|
|
383
|
+
}, Ve = {
|
|
384
384
|
primary: "bg-brand-700",
|
|
385
385
|
secondary: "bg-bg-subtle",
|
|
386
386
|
tertiary: "bg-bg-subtle",
|
|
387
387
|
danger: "bg-red-900"
|
|
388
|
-
},
|
|
389
|
-
return /* @__PURE__ */
|
|
388
|
+
}, He = 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) {
|
|
389
|
+
return /* @__PURE__ */ J("button", {
|
|
390
390
|
ref: m,
|
|
391
391
|
disabled: c || i,
|
|
392
392
|
"aria-pressed": s,
|
|
@@ -398,108 +398,108 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
398
398
|
}
|
|
399
399
|
d?.(e);
|
|
400
400
|
},
|
|
401
|
-
className:
|
|
401
|
+
className: Z("inline-flex items-center justify-center font-medium transition-colors outline-none", a ? ze[t] : Re[t], Be[e], s && Ve[e], o && "w-full", l),
|
|
402
402
|
...p,
|
|
403
|
-
children: i ? /* @__PURE__ */
|
|
403
|
+
children: i ? /* @__PURE__ */ J(M, {
|
|
404
404
|
className: "h-4 w-4 animate-spin",
|
|
405
405
|
"aria-hidden": !0
|
|
406
|
-
}) : /* @__PURE__ */
|
|
407
|
-
n && /* @__PURE__ */
|
|
406
|
+
}) : /* @__PURE__ */ Y(q, { children: [
|
|
407
|
+
n && /* @__PURE__ */ J("span", {
|
|
408
408
|
className: "inline-flex shrink-0",
|
|
409
409
|
children: n
|
|
410
410
|
}),
|
|
411
411
|
u,
|
|
412
|
-
r && /* @__PURE__ */
|
|
412
|
+
r && /* @__PURE__ */ J("span", {
|
|
413
413
|
className: "inline-flex shrink-0",
|
|
414
414
|
children: r
|
|
415
415
|
})
|
|
416
416
|
] })
|
|
417
417
|
});
|
|
418
|
-
}),
|
|
418
|
+
}), Ue = {
|
|
419
419
|
horizontal: "flex-row [&>*]:rounded-none [&>*:first-child]:rounded-l-lg [&>*:last-child]:rounded-r-lg [&>*:not(:first-child)]:-ml-px",
|
|
420
420
|
vertical: "flex-col [&>*]:rounded-none [&>*:first-child]:rounded-t-lg [&>*:last-child]:rounded-b-lg [&>*:not(:first-child)]:-mt-px"
|
|
421
|
-
},
|
|
422
|
-
return /* @__PURE__ */
|
|
421
|
+
}, We = a(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
422
|
+
return /* @__PURE__ */ J("div", {
|
|
423
423
|
ref: a,
|
|
424
424
|
role: "group",
|
|
425
425
|
"data-test-id": r,
|
|
426
|
-
className:
|
|
426
|
+
className: Z("inline-flex isolate", Ue[e], "[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10", t),
|
|
427
427
|
...i,
|
|
428
428
|
children: n
|
|
429
429
|
});
|
|
430
|
-
}),
|
|
430
|
+
}), Ge = {
|
|
431
431
|
elevated: "bg-bg-default border border-border-default shadow-z1",
|
|
432
432
|
outlined: "bg-bg-default border border-border-default",
|
|
433
433
|
filled: "bg-bg-container border border-transparent"
|
|
434
|
-
},
|
|
434
|
+
}, Ke = {
|
|
435
435
|
none: "p-0",
|
|
436
436
|
sm: "p-4",
|
|
437
437
|
md: "p-5",
|
|
438
438
|
lg: "p-6"
|
|
439
|
-
},
|
|
439
|
+
}, qe = a(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
440
440
|
let u = n || r;
|
|
441
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ Y("div", {
|
|
442
442
|
ref: l,
|
|
443
443
|
"data-test-id": s,
|
|
444
|
-
className:
|
|
444
|
+
className: Z("rounded-xl overflow-hidden", Ge[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && Ke[t], a),
|
|
445
445
|
...c,
|
|
446
446
|
children: [
|
|
447
|
-
n && /* @__PURE__ */
|
|
448
|
-
className:
|
|
447
|
+
n && /* @__PURE__ */ J("div", {
|
|
448
|
+
className: Z("border-b border-border-subtle", Ke[t]),
|
|
449
449
|
children: n
|
|
450
450
|
}),
|
|
451
|
-
u ? /* @__PURE__ */
|
|
452
|
-
className:
|
|
451
|
+
u ? /* @__PURE__ */ J("div", {
|
|
452
|
+
className: Ke[t],
|
|
453
453
|
children: o
|
|
454
454
|
}) : o,
|
|
455
|
-
r && /* @__PURE__ */
|
|
456
|
-
className:
|
|
455
|
+
r && /* @__PURE__ */ J("div", {
|
|
456
|
+
className: Z("border-t border-border-subtle", Ke[t]),
|
|
457
457
|
children: r
|
|
458
458
|
})
|
|
459
459
|
]
|
|
460
460
|
});
|
|
461
|
-
}),
|
|
461
|
+
}), Je = {
|
|
462
462
|
brand: "bg-bg-brand-lighter text-brand-800",
|
|
463
463
|
blue: "bg-bg-info-lighter text-blue-800",
|
|
464
464
|
purple: "bg-purple-50 text-purple-800 dark:bg-purple-900/30 dark:text-purple-200",
|
|
465
465
|
pink: "bg-pink-50 text-pink-800 dark:bg-pink-900/30 dark:text-pink-200",
|
|
466
466
|
yellow: "bg-bg-warning-lighter text-yellow-900",
|
|
467
467
|
gray: "bg-bg-subtle text-fg-secondary"
|
|
468
|
-
},
|
|
469
|
-
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */
|
|
470
|
-
className:
|
|
468
|
+
}, Ye = a(function({ title: e, header: t, children: n, noDivider: r = !1, className: i, dataTestId: a, ...o }, s) {
|
|
469
|
+
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */ J("div", {
|
|
470
|
+
className: Z("flex shrink-0 items-center justify-center text-center text-label-md font-bold", l ? Z("px-2 [writing-mode:vertical-rl]", c === "left" && "rotate-180") : "px-4 py-2", Je[e.color ?? "gray"]),
|
|
471
471
|
children: e.text
|
|
472
472
|
});
|
|
473
|
-
return /* @__PURE__ */
|
|
473
|
+
return /* @__PURE__ */ J(qe, {
|
|
474
474
|
ref: s,
|
|
475
475
|
dataTestId: a,
|
|
476
476
|
variant: "outlined",
|
|
477
477
|
padding: "none",
|
|
478
478
|
className: i,
|
|
479
479
|
...o,
|
|
480
|
-
children: /* @__PURE__ */
|
|
481
|
-
className:
|
|
482
|
-
children: [u, /* @__PURE__ */
|
|
483
|
-
className:
|
|
480
|
+
children: /* @__PURE__ */ Y("div", {
|
|
481
|
+
className: Z("flex", l ? c === "right" ? "flex-row-reverse" : "flex-row" : "flex-col"),
|
|
482
|
+
children: [u, /* @__PURE__ */ Y("div", {
|
|
483
|
+
className: Z("min-w-0 flex-1", !r && "[&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-border-default"),
|
|
484
484
|
children: [t, n]
|
|
485
485
|
})]
|
|
486
486
|
})
|
|
487
487
|
});
|
|
488
|
-
}),
|
|
488
|
+
}), Xe = {
|
|
489
489
|
md: "h-5 w-5 rounded-sm",
|
|
490
490
|
sm: "h-4 w-4 rounded-sm"
|
|
491
|
-
},
|
|
491
|
+
}, Ze = {
|
|
492
492
|
md: "h-3.5 w-3.5",
|
|
493
493
|
sm: "h-3 w-3"
|
|
494
|
-
},
|
|
494
|
+
}, Qe = a(function({ size: e = "md", label: t, description: n, indeterminate: r = !1, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: c, className: l, dataTestId: d, ...f }, p) {
|
|
495
495
|
let m = u(), h = a ?? m;
|
|
496
|
-
return /* @__PURE__ */
|
|
496
|
+
return /* @__PURE__ */ Y("label", {
|
|
497
497
|
htmlFor: h,
|
|
498
498
|
"data-test-id": d,
|
|
499
|
-
className:
|
|
500
|
-
children: [/* @__PURE__ */
|
|
499
|
+
className: Z("inline-flex items-start gap-2.5 group/checkbox", o ? "cursor-not-allowed opacity-60" : "cursor-pointer", l),
|
|
500
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
501
501
|
className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ J("input", {
|
|
503
503
|
ref: p,
|
|
504
504
|
id: h,
|
|
505
505
|
type: "checkbox",
|
|
@@ -510,20 +510,20 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
510
510
|
"aria-invalid": i || void 0,
|
|
511
511
|
"aria-checked": r ? "mixed" : void 0,
|
|
512
512
|
...f
|
|
513
|
-
}), /* @__PURE__ */
|
|
514
|
-
className:
|
|
515
|
-
children:
|
|
516
|
-
className:
|
|
513
|
+
}), /* @__PURE__ */ J("span", {
|
|
514
|
+
className: Z("flex items-center justify-center border transition-colors", Xe[e], !r && "bg-bg-default", i ? "border-red-600" : r ? "border-brand-500" : "border-border-strong", !o && !r && (i ? "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", !r && "peer-checked:bg-brand-500 peer-checked:border-brand-500", r && "bg-brand-500", o && !r && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !r && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
|
|
515
|
+
children: J(r ? P : b, {
|
|
516
|
+
className: Z(Ze[e], "text-white"),
|
|
517
517
|
strokeWidth: 3,
|
|
518
518
|
"aria-hidden": !0
|
|
519
519
|
})
|
|
520
520
|
})]
|
|
521
|
-
}), (t || n) && /* @__PURE__ */
|
|
521
|
+
}), (t || n) && /* @__PURE__ */ Y("span", {
|
|
522
522
|
className: "flex flex-col gap-0.5",
|
|
523
|
-
children: [t && /* @__PURE__ */
|
|
523
|
+
children: [t && /* @__PURE__ */ J("span", {
|
|
524
524
|
className: "text-p-std font-medium text-fg-default leading-tight",
|
|
525
525
|
children: t
|
|
526
|
-
}), n && /* @__PURE__ */
|
|
526
|
+
}), n && /* @__PURE__ */ J("span", {
|
|
527
527
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
528
528
|
children: n
|
|
529
529
|
})]
|
|
@@ -532,15 +532,15 @@ var Oe = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
532
532
|
});
|
|
533
533
|
//#endregion
|
|
534
534
|
//#region src/lib/mergeRefs.ts
|
|
535
|
-
function
|
|
535
|
+
function $e(...e) {
|
|
536
536
|
return (t) => {
|
|
537
537
|
for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
540
|
//#endregion
|
|
541
541
|
//#region src/lib/useFloatingPosition.ts
|
|
542
|
-
var
|
|
543
|
-
function
|
|
542
|
+
var et = 8, tt = 10;
|
|
543
|
+
function nt({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center", offset: a = 8, flip: o = !0, shift: s = !0 }) {
|
|
544
544
|
let [c, l] = m({
|
|
545
545
|
style: {
|
|
546
546
|
position: "fixed",
|
|
@@ -565,18 +565,18 @@ function at({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
565
565
|
r === "left" && e < u.width + a && t > e ? m = "right" : r === "right" && t < u.width + a && e > t && (m = "left");
|
|
566
566
|
}
|
|
567
567
|
let h = m === "top" || m === "bottom", g, _;
|
|
568
|
-
h ? (g = m === "bottom" ? c.bottom + a : c.top - u.height - a, _ = i === "start" ? c.left : i === "end" ? c.right - u.width : c.left + c.width / 2 - u.width / 2) : (_ = m === "right" ? c.right + a : c.left - u.width - a, g = i === "start" ? c.top : i === "end" ? c.bottom - u.height : c.top + c.height / 2 - u.height / 2), s && (h ? _ = Math.min(Math.max(_,
|
|
568
|
+
h ? (g = m === "bottom" ? c.bottom + a : c.top - u.height - a, _ = i === "start" ? c.left : i === "end" ? c.right - u.width : c.left + c.width / 2 - u.width / 2) : (_ = m === "right" ? c.right + a : c.left - u.width - a, g = i === "start" ? c.top : i === "end" ? c.bottom - u.height : c.top + c.height / 2 - u.height / 2), s && (h ? _ = Math.min(Math.max(_, et), d - u.width - et) : g = Math.min(Math.max(g, et), f - u.height - et));
|
|
569
569
|
let v;
|
|
570
570
|
if (h) {
|
|
571
571
|
let e = c.left + c.width / 2;
|
|
572
572
|
v = {
|
|
573
|
-
left: Math.min(Math.max(e - _,
|
|
573
|
+
left: Math.min(Math.max(e - _, tt), u.width - tt),
|
|
574
574
|
[m === "bottom" ? "top" : "bottom"]: -8 / 2
|
|
575
575
|
};
|
|
576
576
|
} else {
|
|
577
577
|
let e = c.top + c.height / 2;
|
|
578
578
|
v = {
|
|
579
|
-
top: Math.min(Math.max(e - g,
|
|
579
|
+
top: Math.min(Math.max(e - g, tt), u.height - tt),
|
|
580
580
|
[m === "right" ? "left" : "right"]: -8 / 2
|
|
581
581
|
};
|
|
582
582
|
}
|
|
@@ -609,16 +609,16 @@ function at({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
609
609
|
}
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/components/Popover/Popover.tsx
|
|
612
|
-
var
|
|
612
|
+
var rt = {
|
|
613
613
|
bottom: "border-l border-t",
|
|
614
614
|
top: "border-b border-r",
|
|
615
615
|
left: "border-t border-r",
|
|
616
616
|
right: "border-b border-l"
|
|
617
617
|
};
|
|
618
|
-
function
|
|
618
|
+
function it({ content: e, children: t, side: r = "top", align: i = "center", offset: a = 8, open: s, defaultOpen: c = !1, onOpenChange: d, flip: f = !0, showArrow: h = !0, closeOnScroll: g = !0, autoFocus: _ = !1, container: v, className: y, dataTestId: b }) {
|
|
619
619
|
let [x, S] = m(c), C = s !== void 0, w = C ? s : x, T = p(null), [E, D] = m(null), O = u(), k = (e) => {
|
|
620
620
|
C || S(e), d?.(e);
|
|
621
|
-
}, { style: A, arrowStyle: j, resolvedSide: M } =
|
|
621
|
+
}, { style: A, arrowStyle: j, resolvedSide: M } = nt({
|
|
622
622
|
anchor: T,
|
|
623
623
|
panel: E,
|
|
624
624
|
open: w,
|
|
@@ -655,15 +655,15 @@ function st({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
655
655
|
E
|
|
656
656
|
]), !o(t)) return t;
|
|
657
657
|
let N = t.props ?? {}, P = t.ref, F = n(t, {
|
|
658
|
-
ref:
|
|
658
|
+
ref: $e(T, P),
|
|
659
659
|
onClick: (e) => {
|
|
660
660
|
N.onClick?.(e), e.defaultPrevented || k(!w);
|
|
661
661
|
},
|
|
662
662
|
"aria-haspopup": "dialog",
|
|
663
663
|
"aria-expanded": w
|
|
664
664
|
}), I = v ?? (typeof document < "u" ? document.body : null);
|
|
665
|
-
return /* @__PURE__ */
|
|
666
|
-
ref:
|
|
665
|
+
return /* @__PURE__ */ Y(q, { children: [F, w && I && X(/* @__PURE__ */ Y("div", {
|
|
666
|
+
ref: $e(D),
|
|
667
667
|
id: O,
|
|
668
668
|
role: "dialog",
|
|
669
669
|
"aria-label": typeof e == "string" ? e : void 0,
|
|
@@ -671,26 +671,26 @@ function st({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
671
671
|
"data-side": M,
|
|
672
672
|
"data-test-id": b,
|
|
673
673
|
style: A,
|
|
674
|
-
className:
|
|
675
|
-
children: [e, h && /* @__PURE__ */
|
|
674
|
+
className: Z("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),
|
|
675
|
+
children: [e, h && /* @__PURE__ */ J("span", {
|
|
676
676
|
"aria-hidden": !0,
|
|
677
677
|
style: j,
|
|
678
|
-
className:
|
|
678
|
+
className: Z("absolute size-2 rotate-45 bg-bg-default", rt[M])
|
|
679
679
|
})]
|
|
680
680
|
}), I)] });
|
|
681
681
|
}
|
|
682
682
|
//#endregion
|
|
683
683
|
//#region src/components/Copy/Copy.tsx
|
|
684
|
-
var
|
|
684
|
+
var at = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to clipboard", timeout: r = 1500, icon: i, onCopy: a, onError: o, disabled: s, dataTestId: c, ...u }, d) {
|
|
685
685
|
let [f, h] = m(!1), g = p(null), _ = typeof navigator < "u" && typeof navigator.clipboard?.writeText == "function";
|
|
686
686
|
return l(() => () => {
|
|
687
687
|
g.current && clearTimeout(g.current);
|
|
688
|
-
}, []), /* @__PURE__ */
|
|
688
|
+
}, []), /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(it, {
|
|
689
689
|
open: f,
|
|
690
690
|
content: t,
|
|
691
691
|
side: "top",
|
|
692
692
|
align: "center",
|
|
693
|
-
children: /* @__PURE__ */
|
|
693
|
+
children: /* @__PURE__ */ J(He, {
|
|
694
694
|
ref: d,
|
|
695
695
|
type: "button",
|
|
696
696
|
variant: "tertiary",
|
|
@@ -705,101 +705,101 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
705
705
|
"aria-label": n,
|
|
706
706
|
dataTestId: c,
|
|
707
707
|
...u,
|
|
708
|
-
children: f ? /* @__PURE__ */
|
|
708
|
+
children: f ? /* @__PURE__ */ J(b, { className: "size-4" }) : i ?? /* @__PURE__ */ J(k, { className: "size-4" })
|
|
709
709
|
})
|
|
710
|
-
}), /* @__PURE__ */
|
|
710
|
+
}), /* @__PURE__ */ J("span", {
|
|
711
711
|
role: "status",
|
|
712
712
|
"aria-live": "polite",
|
|
713
713
|
className: "sr-only",
|
|
714
714
|
children: f ? t : ""
|
|
715
715
|
})] });
|
|
716
|
-
}),
|
|
716
|
+
}), ot = {
|
|
717
717
|
lg: "h-12 text-p-md",
|
|
718
718
|
md: "h-10 text-p-std",
|
|
719
719
|
sm: "h-8 text-p-sm"
|
|
720
|
-
},
|
|
720
|
+
}, st = {
|
|
721
721
|
lg: "pl-10",
|
|
722
722
|
md: "pl-9",
|
|
723
723
|
sm: "pl-8"
|
|
724
|
-
},
|
|
724
|
+
}, ct = {
|
|
725
725
|
lg: "pr-10",
|
|
726
726
|
md: "pr-9",
|
|
727
727
|
sm: "pr-8"
|
|
728
|
-
},
|
|
728
|
+
}, lt = {
|
|
729
729
|
lg: "w-10",
|
|
730
730
|
md: "w-9",
|
|
731
731
|
sm: "w-8"
|
|
732
|
-
},
|
|
732
|
+
}, ut = 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) {
|
|
733
733
|
let b = u(), x = d ?? b, S = r ? `${x}-error` : n ? `${x}-help` : void 0, C = l || !!r;
|
|
734
|
-
return /* @__PURE__ */
|
|
735
|
-
className:
|
|
734
|
+
return /* @__PURE__ */ Y("div", {
|
|
735
|
+
className: Z("flex flex-col gap-1.5 w-full", m),
|
|
736
736
|
"data-test-id": _,
|
|
737
737
|
children: [
|
|
738
|
-
(e || t) && /* @__PURE__ */
|
|
738
|
+
(e || t) && /* @__PURE__ */ Y("div", {
|
|
739
739
|
className: "flex items-center gap-1.5",
|
|
740
|
-
children: [e && /* @__PURE__ */
|
|
740
|
+
children: [e && /* @__PURE__ */ Y("label", {
|
|
741
741
|
htmlFor: x,
|
|
742
742
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
743
|
-
children: [e, g && /* @__PURE__ */
|
|
743
|
+
children: [e, g && /* @__PURE__ */ J("span", {
|
|
744
744
|
className: "text-red-600",
|
|
745
745
|
"aria-hidden": !0,
|
|
746
746
|
children: "*"
|
|
747
747
|
})]
|
|
748
|
-
}), t && /* @__PURE__ */
|
|
748
|
+
}), t && /* @__PURE__ */ J("span", {
|
|
749
749
|
className: "inline-flex items-center gap-1",
|
|
750
750
|
children: t
|
|
751
751
|
})]
|
|
752
752
|
}),
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
className:
|
|
753
|
+
/* @__PURE__ */ Y("div", {
|
|
754
|
+
className: Z("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", ot[i]),
|
|
755
755
|
children: [
|
|
756
|
-
s && /* @__PURE__ */
|
|
756
|
+
s && /* @__PURE__ */ J("span", {
|
|
757
757
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
|
|
758
758
|
children: s
|
|
759
759
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ Y("div", {
|
|
761
761
|
className: "relative flex-1 min-w-0",
|
|
762
762
|
children: [
|
|
763
|
-
a && /* @__PURE__ */
|
|
763
|
+
a && /* @__PURE__ */ J("span", {
|
|
764
764
|
"aria-hidden": !0,
|
|
765
|
-
className:
|
|
765
|
+
className: Z("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", lt[i]),
|
|
766
766
|
children: a
|
|
767
767
|
}),
|
|
768
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ J("input", {
|
|
769
769
|
ref: y,
|
|
770
770
|
id: x,
|
|
771
771
|
disabled: f,
|
|
772
772
|
required: g,
|
|
773
773
|
"aria-invalid": C || void 0,
|
|
774
774
|
"aria-describedby": S,
|
|
775
|
-
className:
|
|
775
|
+
className: Z("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ? st[i] : "pl-3", o || C ? ct[i] : "pr-3", p),
|
|
776
776
|
...v
|
|
777
777
|
}),
|
|
778
|
-
(o || C) && /* @__PURE__ */
|
|
778
|
+
(o || C) && /* @__PURE__ */ J("span", {
|
|
779
779
|
"aria-hidden": !0,
|
|
780
|
-
className:
|
|
781
|
-
children: C ? /* @__PURE__ */
|
|
780
|
+
className: Z("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", lt[i], C ? "text-red-600" : "text-fg-secondary"),
|
|
781
|
+
children: C ? /* @__PURE__ */ J(h, { className: "h-4 w-4" }) : o
|
|
782
782
|
})
|
|
783
783
|
]
|
|
784
784
|
}),
|
|
785
|
-
c && /* @__PURE__ */
|
|
785
|
+
c && /* @__PURE__ */ J("span", {
|
|
786
786
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-l border-border-default rounded-r-lg whitespace-nowrap",
|
|
787
787
|
children: c
|
|
788
788
|
})
|
|
789
789
|
]
|
|
790
790
|
}),
|
|
791
|
-
r ? /* @__PURE__ */
|
|
791
|
+
r ? /* @__PURE__ */ J("p", {
|
|
792
792
|
id: `${x}-error`,
|
|
793
793
|
className: "text-p-sm text-red-700",
|
|
794
794
|
children: r
|
|
795
|
-
}) : n ? /* @__PURE__ */
|
|
795
|
+
}) : n ? /* @__PURE__ */ J("p", {
|
|
796
796
|
id: `${x}-help`,
|
|
797
797
|
className: "text-p-sm text-fg-secondary",
|
|
798
798
|
children: n
|
|
799
799
|
}) : null
|
|
800
800
|
]
|
|
801
801
|
});
|
|
802
|
-
}),
|
|
802
|
+
}), dt = "inline-flex items-center justify-center text-fg-secondary transition-colors hover:text-fg-default disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none", ft = a(function({ value: e, defaultValue: t = 0, onValueChange: n, min: r = 0, max: i = 2 ** 53 - 1, step: a = 1, size: o = "md", label: s, helperText: c, errorText: u, error: d, disabled: f, className: p, wrapperClassName: h, dataTestId: g, ..._ }, v) {
|
|
803
803
|
let y = e !== void 0, [b, x] = m(t), S = y ? e : b, [C, w] = m(String(S));
|
|
804
804
|
l(() => {
|
|
805
805
|
w(String(S));
|
|
@@ -808,7 +808,7 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
808
808
|
let t = Math.min(i, Math.max(r, e));
|
|
809
809
|
return y || x(t), n?.(t), t;
|
|
810
810
|
};
|
|
811
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ J(ut, {
|
|
812
812
|
ref: v,
|
|
813
813
|
type: "number",
|
|
814
814
|
min: r,
|
|
@@ -821,7 +821,7 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
821
821
|
error: d,
|
|
822
822
|
disabled: f,
|
|
823
823
|
dataTestId: g,
|
|
824
|
-
wrapperClassName:
|
|
824
|
+
wrapperClassName: Z("max-w-[140px]", h),
|
|
825
825
|
value: C,
|
|
826
826
|
onChange: (e) => {
|
|
827
827
|
w(e.target.value);
|
|
@@ -834,30 +834,30 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
834
834
|
}
|
|
835
835
|
w(String(T(e)));
|
|
836
836
|
},
|
|
837
|
-
leftAddon: /* @__PURE__ */
|
|
837
|
+
leftAddon: /* @__PURE__ */ J("button", {
|
|
838
838
|
type: "button",
|
|
839
839
|
disabled: f || S <= r,
|
|
840
840
|
onClick: () => T(S - a),
|
|
841
841
|
"aria-label": "Decrease",
|
|
842
|
-
className:
|
|
843
|
-
children: /* @__PURE__ */
|
|
842
|
+
className: dt,
|
|
843
|
+
children: /* @__PURE__ */ J(P, { className: "size-4" })
|
|
844
844
|
}),
|
|
845
|
-
rightAddon: /* @__PURE__ */
|
|
845
|
+
rightAddon: /* @__PURE__ */ J("button", {
|
|
846
846
|
type: "button",
|
|
847
847
|
disabled: f || S >= i,
|
|
848
848
|
onClick: () => T(S + a),
|
|
849
849
|
"aria-label": "Increase",
|
|
850
|
-
className:
|
|
851
|
-
children: /* @__PURE__ */
|
|
850
|
+
className: dt,
|
|
851
|
+
children: /* @__PURE__ */ J(z, { className: "size-4" })
|
|
852
852
|
}),
|
|
853
|
-
className:
|
|
853
|
+
className: Z("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
854
854
|
..._
|
|
855
855
|
});
|
|
856
|
-
}),
|
|
856
|
+
}), pt = {
|
|
857
857
|
lg: "h-12 text-p-md px-3.5",
|
|
858
858
|
md: "h-10 text-p-std px-3",
|
|
859
859
|
sm: "h-8 text-p-sm px-2.5"
|
|
860
|
-
},
|
|
860
|
+
}, mt = [
|
|
861
861
|
"Jan",
|
|
862
862
|
"Feb",
|
|
863
863
|
"Mar",
|
|
@@ -870,7 +870,7 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
870
870
|
"Oct",
|
|
871
871
|
"Nov",
|
|
872
872
|
"Dec"
|
|
873
|
-
],
|
|
873
|
+
], ht = [
|
|
874
874
|
"Mo",
|
|
875
875
|
"Tu",
|
|
876
876
|
"We",
|
|
@@ -879,35 +879,44 @@ var ct = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
879
879
|
"Sa",
|
|
880
880
|
"Su"
|
|
881
881
|
];
|
|
882
|
-
function
|
|
882
|
+
function gt(e) {
|
|
883
883
|
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function _t(e, t) {
|
|
886
886
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function vt(e) {
|
|
889
|
+
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
890
|
+
}
|
|
891
|
+
function yt(e, t, n, r) {
|
|
892
|
+
let i = vt(e).getTime();
|
|
893
|
+
return t && i < vt(t).getTime() || n && i > vt(n).getTime() ? !0 : !!r?.some((t) => _t(t, e));
|
|
894
|
+
}
|
|
895
|
+
function bt(e) {
|
|
889
896
|
return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${e.getFullYear()}`;
|
|
890
897
|
}
|
|
891
|
-
function
|
|
892
|
-
let t = (
|
|
898
|
+
function xt(e) {
|
|
899
|
+
let t = (gt(e).getDay() + 6) % 7, n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), r = [];
|
|
893
900
|
for (let e = 0; e < t; e++) r.push(null);
|
|
894
901
|
for (let t = 1; t <= n; t++) r.push(new Date(e.getFullYear(), e.getMonth(), t));
|
|
895
902
|
for (; r.length % 7 != 0;) r.push(null);
|
|
896
903
|
return r;
|
|
897
904
|
}
|
|
898
|
-
var
|
|
899
|
-
let
|
|
905
|
+
var St = a(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onChangeRange: i, size: a = "md", label: o, placeholder: s = "Select date", fullWidth: c = !1, disabled: d = !1, minDate: f, maxDate: h, excludeDates: g, error: _ = !1, errorText: v, id: b, className: x, wrapperClassName: S, dataTestId: T }, E) {
|
|
906
|
+
let D = u(), O = b ?? D, [k, A] = m(!1), [j, M] = m(e ?? r?.start ?? /* @__PURE__ */ new Date()), [N, P] = m(null), F = p(null), I = _ || !!v, L = v ? `${O}-error` : void 0;
|
|
900
907
|
l(() => {
|
|
901
|
-
|
|
908
|
+
d && A(!1);
|
|
909
|
+
}, [d]), l(() => {
|
|
910
|
+
if (!k) return;
|
|
902
911
|
let e = (e) => {
|
|
903
|
-
|
|
912
|
+
F.current && !F.current.contains(e.target) && A(!1);
|
|
904
913
|
};
|
|
905
914
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
906
|
-
}, [
|
|
907
|
-
let
|
|
908
|
-
function
|
|
915
|
+
}, [k]);
|
|
916
|
+
let R = n ? r?.start ? `${bt(r.start)}${r.end ? ` – ${bt(r.end)}` : ""}` : "" : e ? bt(e) : "";
|
|
917
|
+
function z(e) {
|
|
909
918
|
if (!n) {
|
|
910
|
-
t?.(e),
|
|
919
|
+
t?.(e), A(!1);
|
|
911
920
|
return;
|
|
912
921
|
}
|
|
913
922
|
let a = r ?? {
|
|
@@ -931,81 +940,94 @@ var Ct = a(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onCha
|
|
|
931
940
|
i?.({
|
|
932
941
|
start: a.start,
|
|
933
942
|
end: e
|
|
934
|
-
}),
|
|
943
|
+
}), A(!1);
|
|
935
944
|
}
|
|
936
|
-
let
|
|
945
|
+
let ee = xt(j), B = r ?? {
|
|
937
946
|
start: null,
|
|
938
947
|
end: null
|
|
939
|
-
},
|
|
940
|
-
return /* @__PURE__ */
|
|
941
|
-
ref:
|
|
942
|
-
"data-test-id":
|
|
943
|
-
className:
|
|
944
|
-
children: [
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
948
|
+
}, V = B.end ?? N;
|
|
949
|
+
return /* @__PURE__ */ Y("div", {
|
|
950
|
+
ref: F,
|
|
951
|
+
"data-test-id": T,
|
|
952
|
+
className: Z("flex flex-col gap-1.5", c && "w-full", S),
|
|
953
|
+
children: [
|
|
954
|
+
o && /* @__PURE__ */ J("label", {
|
|
955
|
+
htmlFor: O,
|
|
956
|
+
className: "text-p-std font-medium text-fg-default inline-flex",
|
|
957
|
+
children: o
|
|
958
|
+
}),
|
|
959
|
+
/* @__PURE__ */ Y("div", {
|
|
960
|
+
className: "relative",
|
|
961
|
+
children: [/* @__PURE__ */ Y("button", {
|
|
962
|
+
ref: E,
|
|
963
|
+
id: O,
|
|
964
|
+
type: "button",
|
|
965
|
+
disabled: d,
|
|
966
|
+
"aria-invalid": I || void 0,
|
|
967
|
+
"aria-describedby": L,
|
|
968
|
+
onClick: () => A((e) => !e),
|
|
969
|
+
className: Z("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", I ? "border-red-600" : "border-border-default", !d && !I && "hover:border-border-strong", I ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", d && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", c ? "w-full min-w-0" : "min-w-[260px]", pt[a], x),
|
|
970
|
+
children: [/* @__PURE__ */ J("span", {
|
|
971
|
+
className: Z("flex-1 text-left truncate", d ? "text-fg-disabled" : R ? "text-fg-default" : "text-fg-tertiary"),
|
|
972
|
+
children: R || s
|
|
973
|
+
}), /* @__PURE__ */ J(y, { className: Z("w-4 h-4", d ? "text-fg-disabled" : "text-fg-secondary") })]
|
|
974
|
+
}), k && /* @__PURE__ */ Y("div", {
|
|
975
|
+
className: "absolute z-50 mt-1 left-0 rounded-xl border border-border-default bg-bg-default shadow-z3 p-3 w-[300px]",
|
|
976
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
977
|
+
className: "flex items-center justify-between mb-2",
|
|
978
|
+
children: [
|
|
979
|
+
/* @__PURE__ */ J("button", {
|
|
980
|
+
type: "button",
|
|
981
|
+
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
982
|
+
onClick: () => M(new Date(j.getFullYear(), j.getMonth() - 1, 1)),
|
|
983
|
+
"aria-label": "Previous month",
|
|
984
|
+
children: /* @__PURE__ */ J(C, { className: "w-4 h-4" })
|
|
985
|
+
}),
|
|
986
|
+
/* @__PURE__ */ Y("div", {
|
|
987
|
+
className: "text-p-md font-semibold text-fg-default",
|
|
988
|
+
children: [
|
|
989
|
+
mt[j.getMonth()],
|
|
990
|
+
" ",
|
|
991
|
+
j.getFullYear()
|
|
992
|
+
]
|
|
993
|
+
}),
|
|
994
|
+
/* @__PURE__ */ J("button", {
|
|
995
|
+
type: "button",
|
|
996
|
+
className: "w-8 h-8 rounded-md hover:bg-bg-container flex items-center justify-center text-fg-secondary",
|
|
997
|
+
onClick: () => M(new Date(j.getFullYear(), j.getMonth() + 1, 1)),
|
|
998
|
+
"aria-label": "Next month",
|
|
999
|
+
children: /* @__PURE__ */ J(w, { className: "w-4 h-4" })
|
|
1000
|
+
})
|
|
1001
|
+
]
|
|
1002
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1003
|
+
className: "grid grid-cols-7 gap-1 text-center",
|
|
1004
|
+
children: [ht.map((e) => /* @__PURE__ */ J("div", {
|
|
1005
|
+
className: "text-p-xs text-fg-tertiary py-1",
|
|
1006
|
+
children: e
|
|
1007
|
+
}, e)), ee.map((t, r) => {
|
|
1008
|
+
if (!t) return /* @__PURE__ */ J("div", {}, r);
|
|
1009
|
+
let i = yt(t, f, h, g), a = !n && _t(t, e ?? null), o = n && _t(t, B.start), s = n && _t(t, V), c = n && !!B.start && !!V && t > B.start && t < V;
|
|
1010
|
+
return /* @__PURE__ */ J("button", {
|
|
1011
|
+
type: "button",
|
|
1012
|
+
disabled: i,
|
|
1013
|
+
"aria-disabled": i || void 0,
|
|
1014
|
+
onMouseEnter: () => !i && n && B.start && !B.end && P(t),
|
|
1015
|
+
onClick: () => !i && z(t),
|
|
1016
|
+
className: Z("h-8 rounded-md text-p-sm font-medium", i ? "text-fg-disabled cursor-not-allowed" : a || o || s ? "bg-brand-500 text-white" : c ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container"),
|
|
1017
|
+
children: t.getDate()
|
|
1018
|
+
}, r);
|
|
1019
|
+
})]
|
|
1003
1020
|
})]
|
|
1004
1021
|
})]
|
|
1005
|
-
})
|
|
1006
|
-
|
|
1022
|
+
}),
|
|
1023
|
+
v ? /* @__PURE__ */ J("p", {
|
|
1024
|
+
id: `${O}-error`,
|
|
1025
|
+
className: "text-p-sm text-red-700",
|
|
1026
|
+
children: v
|
|
1027
|
+
}) : null
|
|
1028
|
+
]
|
|
1007
1029
|
});
|
|
1008
|
-
}),
|
|
1030
|
+
}), Ct = {
|
|
1009
1031
|
brand: "bg-brand-500",
|
|
1010
1032
|
blue: "bg-blue-500",
|
|
1011
1033
|
purple: "bg-purple-500",
|
|
@@ -1013,57 +1035,57 @@ var Ct = a(function({ value: e, onChange: t, range: n = !1, rangeValue: r, onCha
|
|
|
1013
1035
|
yellow: "bg-yellow-500",
|
|
1014
1036
|
red: "bg-red-500",
|
|
1015
1037
|
gray: "bg-gray-400"
|
|
1016
|
-
},
|
|
1038
|
+
}, wt = {
|
|
1017
1039
|
sm: "h-1",
|
|
1018
1040
|
lg: "h-2"
|
|
1019
|
-
},
|
|
1041
|
+
}, Tt = (e) => new Intl.NumberFormat().format(e), Et = a(function({ segments: e, hideLegend: t = !1, formatValue: n = Tt, size: r = "lg", className: i, dataTestId: a, ...o }, s) {
|
|
1020
1042
|
let c = e.reduce((e, t) => e + t.value, 0);
|
|
1021
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ Y("div", {
|
|
1022
1044
|
ref: s,
|
|
1023
1045
|
"data-test-id": a,
|
|
1024
|
-
className:
|
|
1046
|
+
className: Z("flex flex-col gap-3", i),
|
|
1025
1047
|
...o,
|
|
1026
|
-
children: [/* @__PURE__ */
|
|
1027
|
-
className:
|
|
1028
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1048
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1049
|
+
className: Z("flex w-full overflow-hidden rounded-full bg-bg-subtle", wt[r]),
|
|
1050
|
+
children: e.map((e, t) => /* @__PURE__ */ J("div", {
|
|
1029
1051
|
style: { flexBasis: `${c > 0 ? e.value / c * 100 : 0}%` },
|
|
1030
|
-
className:
|
|
1052
|
+
className: Z("transition-[flex-basis] duration-700 ease-out", Ct[e.color])
|
|
1031
1053
|
}, t))
|
|
1032
|
-
}), !t && /* @__PURE__ */
|
|
1054
|
+
}), !t && /* @__PURE__ */ J("ul", {
|
|
1033
1055
|
className: "flex flex-col [&>li:not(:last-child)]:border-b [&>li:not(:last-child)]:border-border-default",
|
|
1034
|
-
children: e.filter((e) => !e.hideFromLegend).map((e, t) => /* @__PURE__ */
|
|
1056
|
+
children: e.filter((e) => !e.hideFromLegend).map((e, t) => /* @__PURE__ */ Y("li", {
|
|
1035
1057
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
1036
|
-
children: [/* @__PURE__ */
|
|
1058
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1037
1059
|
className: "flex min-w-0 items-center gap-2",
|
|
1038
|
-
children: [/* @__PURE__ */
|
|
1060
|
+
children: [/* @__PURE__ */ J("span", { className: Z("size-2 shrink-0 rounded-full", Ct[e.color]) }), /* @__PURE__ */ J("span", {
|
|
1039
1061
|
className: "truncate text-p-sm text-fg-tertiary",
|
|
1040
1062
|
children: e.label
|
|
1041
1063
|
})]
|
|
1042
|
-
}), /* @__PURE__ */
|
|
1064
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1043
1065
|
className: "shrink-0 text-p-sm text-fg-default tabular-nums",
|
|
1044
1066
|
children: [n(e.value), e.unit ? ` ${e.unit}` : ""]
|
|
1045
1067
|
})]
|
|
1046
1068
|
}, t))
|
|
1047
1069
|
})]
|
|
1048
1070
|
});
|
|
1049
|
-
}),
|
|
1071
|
+
}), Dt = {
|
|
1050
1072
|
fast: 150,
|
|
1051
1073
|
base: 200,
|
|
1052
1074
|
slow: 300
|
|
1053
1075
|
};
|
|
1054
|
-
function
|
|
1076
|
+
function Ot() {
|
|
1055
1077
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1056
1078
|
}
|
|
1057
1079
|
//#endregion
|
|
1058
1080
|
//#region src/lib/useMountTransition.ts
|
|
1059
|
-
function
|
|
1081
|
+
function kt(e, t) {
|
|
1060
1082
|
let [n, r] = m(e), [i, a] = m(e ? "entered" : "closed"), o = p(null), s = p(null);
|
|
1061
1083
|
return l(() => {
|
|
1062
1084
|
o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current), e ? (r(!0), a("entering"), s.current = requestAnimationFrame(() => {
|
|
1063
1085
|
s.current = requestAnimationFrame(() => a("entered"));
|
|
1064
1086
|
})) : (() => {
|
|
1065
1087
|
a((e) => e === "closed" ? "closed" : "exiting");
|
|
1066
|
-
let e =
|
|
1088
|
+
let e = Ot() ? 0 : t;
|
|
1067
1089
|
e === 0 ? (r(!1), a("closed")) : o.current = setTimeout(() => {
|
|
1068
1090
|
r(!1), a("closed");
|
|
1069
1091
|
}, e);
|
|
@@ -1077,28 +1099,28 @@ function At(e, t) {
|
|
|
1077
1099
|
}
|
|
1078
1100
|
//#endregion
|
|
1079
1101
|
//#region src/components/Drawer/Drawer.tsx
|
|
1080
|
-
var
|
|
1102
|
+
var At = {
|
|
1081
1103
|
sm: "w-[320px]",
|
|
1082
1104
|
md: "w-[420px]",
|
|
1083
1105
|
lg: "w-[560px]",
|
|
1084
1106
|
xl: "w-[720px]"
|
|
1085
|
-
},
|
|
1107
|
+
}, jt = {
|
|
1086
1108
|
sm: "h-[240px]",
|
|
1087
1109
|
md: "h-[360px]",
|
|
1088
1110
|
lg: "h-[480px]",
|
|
1089
1111
|
xl: "h-[600px]"
|
|
1090
|
-
},
|
|
1112
|
+
}, Mt = {
|
|
1091
1113
|
right: "inset-y-0 right-0 border-l",
|
|
1092
1114
|
left: "inset-y-0 left-0 border-r",
|
|
1093
1115
|
top: "inset-x-0 top-0 border-b",
|
|
1094
1116
|
bottom: "inset-x-0 bottom-0 border-t"
|
|
1095
|
-
},
|
|
1117
|
+
}, Nt = {
|
|
1096
1118
|
right: "translate-x-full",
|
|
1097
1119
|
left: "-translate-x-full",
|
|
1098
1120
|
top: "-translate-y-full",
|
|
1099
1121
|
bottom: "translate-y-full"
|
|
1100
|
-
},
|
|
1101
|
-
let _ = p(null), { mounted: v, state: y } =
|
|
1122
|
+
}, Pt = 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) {
|
|
1123
|
+
let _ = p(null), { mounted: v, state: y } = kt(e, d ? Dt.slow : 0), b = y === "entered";
|
|
1102
1124
|
if (l(() => {
|
|
1103
1125
|
if (!v) return;
|
|
1104
1126
|
let e = (e) => {
|
|
@@ -1114,8 +1136,8 @@ var jt = {
|
|
|
1114
1136
|
let t = document.activeElement;
|
|
1115
1137
|
return _.current?.focus(), () => t?.focus?.();
|
|
1116
1138
|
}, [e]), !v) return null;
|
|
1117
|
-
let x = n === "left" || n === "right", S = x ?
|
|
1118
|
-
return
|
|
1139
|
+
let x = n === "left" || n === "right", S = x ? At[r] : jt[r];
|
|
1140
|
+
return X(/* @__PURE__ */ Y("div", {
|
|
1119
1141
|
role: "dialog",
|
|
1120
1142
|
"aria-modal": "true",
|
|
1121
1143
|
"aria-hidden": y === "exiting" || void 0,
|
|
@@ -1123,52 +1145,52 @@ var jt = {
|
|
|
1123
1145
|
"aria-describedby": a ? "drawer-desc" : void 0,
|
|
1124
1146
|
className: "fixed inset-0 z-50",
|
|
1125
1147
|
"data-test-id": h,
|
|
1126
|
-
children: [/* @__PURE__ */
|
|
1127
|
-
className:
|
|
1148
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1149
|
+
className: Z("absolute inset-0 bg-black/50", d && "transition-opacity duration-200 motion-reduce:transition-none", b ? "opacity-100" : "opacity-0"),
|
|
1128
1150
|
onClick: () => c && t(),
|
|
1129
1151
|
"aria-hidden": !0
|
|
1130
|
-
}), /* @__PURE__ */
|
|
1131
|
-
ref:
|
|
1152
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1153
|
+
ref: $e(g, _),
|
|
1132
1154
|
tabIndex: -1,
|
|
1133
|
-
className:
|
|
1155
|
+
className: Z("absolute bg-bg-default shadow-z5 outline-none flex flex-col", Mt[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" : Nt[n], m),
|
|
1134
1156
|
children: [
|
|
1135
|
-
(i || u || f) && /* @__PURE__ */
|
|
1157
|
+
(i || u || f) && /* @__PURE__ */ Y("div", {
|
|
1136
1158
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
|
|
1137
|
-
children: [/* @__PURE__ */
|
|
1159
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1138
1160
|
className: "flex-1 min-w-0",
|
|
1139
|
-
children: [i && /* @__PURE__ */
|
|
1161
|
+
children: [i && /* @__PURE__ */ J("h2", {
|
|
1140
1162
|
id: "drawer-title",
|
|
1141
1163
|
className: "text-h-xs font-semibold text-fg-default",
|
|
1142
1164
|
children: i
|
|
1143
|
-
}), a && /* @__PURE__ */
|
|
1165
|
+
}), a && /* @__PURE__ */ J("p", {
|
|
1144
1166
|
id: "drawer-desc",
|
|
1145
1167
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
1146
1168
|
children: a
|
|
1147
1169
|
})]
|
|
1148
|
-
}), /* @__PURE__ */
|
|
1170
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1149
1171
|
className: "flex items-center gap-1 shrink-0 -mr-2 -mt-2",
|
|
1150
|
-
children: [f, u && /* @__PURE__ */
|
|
1172
|
+
children: [f, u && /* @__PURE__ */ J("button", {
|
|
1151
1173
|
type: "button",
|
|
1152
1174
|
onClick: t,
|
|
1153
1175
|
"aria-label": "Close",
|
|
1154
1176
|
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",
|
|
1155
|
-
children: /* @__PURE__ */ W
|
|
1177
|
+
children: /* @__PURE__ */ J(W, { className: "h-5 w-5" })
|
|
1156
1178
|
})]
|
|
1157
1179
|
})]
|
|
1158
1180
|
}),
|
|
1159
|
-
o && /* @__PURE__ */
|
|
1181
|
+
o && /* @__PURE__ */ J("div", {
|
|
1160
1182
|
className: "flex-1 overflow-y-auto px-6 py-4",
|
|
1161
1183
|
children: o
|
|
1162
1184
|
}),
|
|
1163
|
-
s && /* @__PURE__ */
|
|
1185
|
+
s && /* @__PURE__ */ J("div", {
|
|
1164
1186
|
className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container",
|
|
1165
1187
|
children: s
|
|
1166
1188
|
})
|
|
1167
1189
|
]
|
|
1168
1190
|
})]
|
|
1169
1191
|
}), document.body);
|
|
1170
|
-
}),
|
|
1171
|
-
function
|
|
1192
|
+
}), Ft = 8;
|
|
1193
|
+
function It({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "start", offset: a = 4, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1 }) {
|
|
1172
1194
|
let [l, u] = m({
|
|
1173
1195
|
style: {
|
|
1174
1196
|
position: "fixed",
|
|
@@ -1189,7 +1211,7 @@ function Lt({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "star
|
|
|
1189
1211
|
r === "bottom" && e < d.height + a && t > e ? m = "top" : r === "top" && t < d.height + a && e > t && (m = "bottom");
|
|
1190
1212
|
}
|
|
1191
1213
|
let h = m === "bottom" ? l.bottom + a : l.top - d.height - a, g = i === "end" ? l.right - d.width : l.left;
|
|
1192
|
-
s && (g = Math.min(Math.max(g,
|
|
1214
|
+
s && (g = Math.min(Math.max(g, Ft), p - d.width - Ft)), u({
|
|
1193
1215
|
style: {
|
|
1194
1216
|
position: "fixed",
|
|
1195
1217
|
top: h,
|
|
@@ -1219,13 +1241,13 @@ function Lt({ anchor: e, panel: t, open: n, side: r = "bottom", align: i = "star
|
|
|
1219
1241
|
}
|
|
1220
1242
|
//#endregion
|
|
1221
1243
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
1222
|
-
var
|
|
1223
|
-
function
|
|
1224
|
-
let e = c(
|
|
1244
|
+
var Lt = r(null);
|
|
1245
|
+
function Rt() {
|
|
1246
|
+
let e = c(Lt);
|
|
1225
1247
|
if (!e) throw Error("Dropdown parts must be used inside <DropdownMenu>");
|
|
1226
1248
|
return e;
|
|
1227
1249
|
}
|
|
1228
|
-
var
|
|
1250
|
+
var zt = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r, anchorRef: i, className: a, dataTestId: o, ...s }, c) {
|
|
1229
1251
|
let [u, d] = m(t), f = n !== void 0, h = f ? n : u, g = p(null), _ = (e) => {
|
|
1230
1252
|
f || d(e), r?.(e);
|
|
1231
1253
|
};
|
|
@@ -1235,24 +1257,24 @@ var Bt = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r
|
|
|
1235
1257
|
e.key === "Escape" && _(!1);
|
|
1236
1258
|
};
|
|
1237
1259
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1238
|
-
}, [h]), /* @__PURE__ */
|
|
1260
|
+
}, [h]), /* @__PURE__ */ J(Lt.Provider, {
|
|
1239
1261
|
value: {
|
|
1240
1262
|
open: h,
|
|
1241
1263
|
setOpen: _,
|
|
1242
1264
|
triggerRef: g,
|
|
1243
1265
|
anchorRef: i
|
|
1244
1266
|
},
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1267
|
+
children: /* @__PURE__ */ J("div", {
|
|
1246
1268
|
ref: c,
|
|
1247
1269
|
"data-test-id": o,
|
|
1248
|
-
className:
|
|
1270
|
+
className: Z("relative inline-block", a),
|
|
1249
1271
|
...s,
|
|
1250
1272
|
children: e
|
|
1251
1273
|
})
|
|
1252
1274
|
});
|
|
1253
1275
|
});
|
|
1254
|
-
function
|
|
1255
|
-
let { open: t, setOpen: r, triggerRef: i } =
|
|
1276
|
+
function Bt({ children: e }) {
|
|
1277
|
+
let { open: t, setOpen: r, triggerRef: i } = Rt();
|
|
1256
1278
|
if (!o(e)) return e;
|
|
1257
1279
|
let a = e.props ?? {};
|
|
1258
1280
|
return n(e, {
|
|
@@ -1265,8 +1287,8 @@ function Vt({ children: e }) {
|
|
|
1265
1287
|
"aria-expanded": t
|
|
1266
1288
|
});
|
|
1267
1289
|
}
|
|
1268
|
-
var
|
|
1269
|
-
let { open: g, setOpen: _, triggerRef: v, anchorRef: y } =
|
|
1290
|
+
var Vt = "min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", Ht = 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, ...f }, h) {
|
|
1291
|
+
let { open: g, setOpen: _, triggerRef: v, anchorRef: y } = Rt(), b = p(null), [x, S] = m(null), { style: C, resolvedSide: w } = It({
|
|
1270
1292
|
anchor: y ?? v,
|
|
1271
1293
|
panel: x,
|
|
1272
1294
|
open: g && n === "fixed",
|
|
@@ -1307,8 +1329,8 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1307
1329
|
});
|
|
1308
1330
|
return () => cancelAnimationFrame(e);
|
|
1309
1331
|
}, [g]), !g) return null;
|
|
1310
|
-
let T = /* @__PURE__ */
|
|
1311
|
-
ref:
|
|
1332
|
+
let T = /* @__PURE__ */ J("div", {
|
|
1333
|
+
ref: $e(h, b, n === "fixed" ? S : void 0),
|
|
1312
1334
|
role: "menu",
|
|
1313
1335
|
"data-test-id": d,
|
|
1314
1336
|
"data-side": n === "fixed" ? w : void 0,
|
|
@@ -1320,14 +1342,14 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1320
1342
|
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());
|
|
1321
1343
|
},
|
|
1322
1344
|
style: n === "fixed" ? C : void 0,
|
|
1323
|
-
className:
|
|
1345
|
+
className: Z(Vt, n === "absolute" && Z("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), u),
|
|
1324
1346
|
...f,
|
|
1325
1347
|
children: e
|
|
1326
1348
|
});
|
|
1327
|
-
return n === "fixed" ?
|
|
1328
|
-
}),
|
|
1329
|
-
let { setOpen: p } =
|
|
1330
|
-
return /* @__PURE__ */
|
|
1349
|
+
return n === "fixed" ? X(T, document.body) : T;
|
|
1350
|
+
}), Ut = 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) {
|
|
1351
|
+
let { setOpen: p } = Rt();
|
|
1352
|
+
return /* @__PURE__ */ Y("button", {
|
|
1331
1353
|
ref: f,
|
|
1332
1354
|
type: "button",
|
|
1333
1355
|
role: "menuitem",
|
|
@@ -1336,50 +1358,50 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1336
1358
|
onClick: (e) => {
|
|
1337
1359
|
u?.(e), t?.(), p(!1);
|
|
1338
1360
|
},
|
|
1339
|
-
className:
|
|
1361
|
+
className: Z("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),
|
|
1340
1362
|
...d,
|
|
1341
1363
|
children: [
|
|
1342
|
-
o !== void 0 && /* @__PURE__ */
|
|
1364
|
+
o !== void 0 && /* @__PURE__ */ J("span", {
|
|
1343
1365
|
className: "w-4 shrink-0",
|
|
1344
|
-
children: o && /* @__PURE__ */
|
|
1366
|
+
children: o && /* @__PURE__ */ J(b, { className: "h-4 w-4 text-brand-500" })
|
|
1345
1367
|
}),
|
|
1346
|
-
r && /* @__PURE__ */
|
|
1368
|
+
r && /* @__PURE__ */ J("span", {
|
|
1347
1369
|
className: "inline-flex shrink-0 text-fg-secondary",
|
|
1348
1370
|
children: r
|
|
1349
1371
|
}),
|
|
1350
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ Y("span", {
|
|
1351
1373
|
className: "flex-1 min-w-0 text-left",
|
|
1352
|
-
children: [/* @__PURE__ */
|
|
1374
|
+
children: [/* @__PURE__ */ J("span", {
|
|
1353
1375
|
className: "block truncate",
|
|
1354
1376
|
children: e
|
|
1355
|
-
}), s && /* @__PURE__ */
|
|
1377
|
+
}), s && /* @__PURE__ */ J("span", {
|
|
1356
1378
|
className: "block truncate text-p-sm text-fg-tertiary",
|
|
1357
1379
|
children: s
|
|
1358
1380
|
})]
|
|
1359
1381
|
}),
|
|
1360
|
-
i && /* @__PURE__ */
|
|
1382
|
+
i && /* @__PURE__ */ J("span", {
|
|
1361
1383
|
className: "text-p-sm text-fg-tertiary shrink-0 tabular-nums",
|
|
1362
1384
|
children: i
|
|
1363
1385
|
})
|
|
1364
1386
|
]
|
|
1365
1387
|
});
|
|
1366
|
-
}),
|
|
1367
|
-
return /* @__PURE__ */
|
|
1388
|
+
}), Wt = a(function({ className: e, dataTestId: t, ...n }, r) {
|
|
1389
|
+
return /* @__PURE__ */ J("div", {
|
|
1368
1390
|
ref: r,
|
|
1369
1391
|
role: "separator",
|
|
1370
1392
|
"data-test-id": t,
|
|
1371
|
-
className:
|
|
1393
|
+
className: Z("my-1 h-px bg-border-default", e),
|
|
1372
1394
|
...n
|
|
1373
1395
|
});
|
|
1374
|
-
}),
|
|
1375
|
-
return /* @__PURE__ */
|
|
1396
|
+
}), Gt = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
|
|
1397
|
+
return /* @__PURE__ */ J("div", {
|
|
1376
1398
|
ref: i,
|
|
1377
1399
|
"data-test-id": n,
|
|
1378
|
-
className:
|
|
1400
|
+
className: Z("px-3 py-1.5 text-p-xs font-semibold uppercase tracking-wider text-fg-tertiary", t),
|
|
1379
1401
|
...r,
|
|
1380
1402
|
children: e
|
|
1381
1403
|
});
|
|
1382
|
-
}),
|
|
1404
|
+
}), Kt = {
|
|
1383
1405
|
brand: {
|
|
1384
1406
|
bg: "bg-bg-brand-lighter",
|
|
1385
1407
|
icon: "text-brand-700"
|
|
@@ -1416,7 +1438,7 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1416
1438
|
bg: "bg-bg-danger-lighter",
|
|
1417
1439
|
icon: "text-red-700"
|
|
1418
1440
|
}
|
|
1419
|
-
},
|
|
1441
|
+
}, qt = {
|
|
1420
1442
|
sm: {
|
|
1421
1443
|
box: "h-8 w-8",
|
|
1422
1444
|
icon: "h-4 w-4",
|
|
@@ -1437,17 +1459,17 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1437
1459
|
icon: "h-7 w-7",
|
|
1438
1460
|
radius: "rounded-xl"
|
|
1439
1461
|
}
|
|
1440
|
-
},
|
|
1441
|
-
let c =
|
|
1442
|
-
return /* @__PURE__ */
|
|
1462
|
+
}, Jt = a(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
|
|
1463
|
+
let c = Kt[t], l = qt[n];
|
|
1464
|
+
return /* @__PURE__ */ J("div", {
|
|
1443
1465
|
ref: s,
|
|
1444
1466
|
"data-test-id": a,
|
|
1445
1467
|
"aria-hidden": !o["aria-label"] || void 0,
|
|
1446
|
-
className:
|
|
1468
|
+
className: Z("inline-flex items-center justify-center shrink-0", l.box, r === "circle" ? "rounded-full" : l.radius, c.bg, i),
|
|
1447
1469
|
...o,
|
|
1448
|
-
children: /* @__PURE__ */
|
|
1470
|
+
children: /* @__PURE__ */ J(e, { className: Z(l.icon, c.icon) })
|
|
1449
1471
|
});
|
|
1450
|
-
}),
|
|
1472
|
+
}), Yt = {
|
|
1451
1473
|
"h-xl": "text-h-xl",
|
|
1452
1474
|
"h-lg": "text-h-lg",
|
|
1453
1475
|
"h-md": "text-h-md",
|
|
@@ -1465,12 +1487,12 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1465
1487
|
"label-sm": "text-label-sm",
|
|
1466
1488
|
"label-xs": "text-label-xs",
|
|
1467
1489
|
"label-xxs": "text-label-xxs"
|
|
1468
|
-
},
|
|
1490
|
+
}, Xt = {
|
|
1469
1491
|
normal: "font-normal",
|
|
1470
1492
|
medium: "font-medium",
|
|
1471
1493
|
semibold: "font-semibold",
|
|
1472
1494
|
bold: "font-bold"
|
|
1473
|
-
},
|
|
1495
|
+
}, Zt = {
|
|
1474
1496
|
default: "text-fg-default",
|
|
1475
1497
|
secondary: "text-fg-secondary",
|
|
1476
1498
|
tertiary: "text-fg-tertiary",
|
|
@@ -1481,7 +1503,7 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1481
1503
|
success: "text-fg-success",
|
|
1482
1504
|
warning: "text-fg-warning",
|
|
1483
1505
|
danger: "text-fg-danger"
|
|
1484
|
-
},
|
|
1506
|
+
}, Qt = {
|
|
1485
1507
|
"h-xl": "h1",
|
|
1486
1508
|
"h-lg": "h1",
|
|
1487
1509
|
"h-md": "h2",
|
|
@@ -1499,66 +1521,66 @@ var Ht = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
1499
1521
|
"label-sm": "span",
|
|
1500
1522
|
"label-xs": "span",
|
|
1501
1523
|
"label-xxs": "span"
|
|
1502
|
-
},
|
|
1503
|
-
return i(r ??
|
|
1524
|
+
}, $t = 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) {
|
|
1525
|
+
return i(r ?? Qt[e], {
|
|
1504
1526
|
ref: f,
|
|
1505
1527
|
"data-test-id": u,
|
|
1506
|
-
className:
|
|
1528
|
+
className: Z(Yt[e], t && Xt[t], Zt[n], a && "truncate", o && !a && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", c),
|
|
1507
1529
|
style: o && !a ? {
|
|
1508
1530
|
...s,
|
|
1509
1531
|
WebkitLineClamp: o
|
|
1510
1532
|
} : s,
|
|
1511
1533
|
...d
|
|
1512
1534
|
}, l);
|
|
1513
|
-
}),
|
|
1535
|
+
}), en = {
|
|
1514
1536
|
lg: "py-20 px-6 gap-2",
|
|
1515
1537
|
sm: "py-10 px-4 gap-1"
|
|
1516
|
-
},
|
|
1538
|
+
}, tn = {
|
|
1517
1539
|
lg: "xl",
|
|
1518
1540
|
sm: "lg"
|
|
1519
|
-
},
|
|
1520
|
-
return /* @__PURE__ */
|
|
1541
|
+
}, nn = a(function({ size: e = "lg", title: t, description: n, illustration: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
1542
|
+
return /* @__PURE__ */ Y("div", {
|
|
1521
1543
|
ref: c,
|
|
1522
1544
|
"data-test-id": o,
|
|
1523
|
-
className:
|
|
1545
|
+
className: Z("flex flex-col items-center justify-center text-center", en[e], a),
|
|
1524
1546
|
...s,
|
|
1525
1547
|
children: [
|
|
1526
|
-
r ?? /* @__PURE__ */
|
|
1527
|
-
icon:
|
|
1548
|
+
r ?? /* @__PURE__ */ J(Jt, {
|
|
1549
|
+
icon: B,
|
|
1528
1550
|
tone: "gray",
|
|
1529
1551
|
shape: "circle",
|
|
1530
|
-
size:
|
|
1552
|
+
size: tn[e]
|
|
1531
1553
|
}),
|
|
1532
|
-
t && /* @__PURE__ */
|
|
1554
|
+
t && /* @__PURE__ */ J($t, {
|
|
1533
1555
|
as: "h3",
|
|
1534
1556
|
variant: e === "lg" ? "h-sm" : "h-xs",
|
|
1535
1557
|
weight: "semibold",
|
|
1536
1558
|
className: "mt-2",
|
|
1537
1559
|
children: t
|
|
1538
1560
|
}),
|
|
1539
|
-
n && /* @__PURE__ */
|
|
1561
|
+
n && /* @__PURE__ */ J($t, {
|
|
1540
1562
|
variant: e === "lg" ? "p-sm" : "p-xs",
|
|
1541
1563
|
color: "secondary",
|
|
1542
1564
|
className: "max-w-sm",
|
|
1543
1565
|
children: n
|
|
1544
1566
|
}),
|
|
1545
|
-
i && /* @__PURE__ */
|
|
1567
|
+
i && /* @__PURE__ */ J("div", {
|
|
1546
1568
|
className: "mt-4",
|
|
1547
1569
|
children: i
|
|
1548
1570
|
})
|
|
1549
1571
|
]
|
|
1550
1572
|
});
|
|
1551
|
-
}),
|
|
1573
|
+
}), rn = {
|
|
1552
1574
|
lg: "h-10 px-3 text-p-std gap-2",
|
|
1553
1575
|
md: "h-9 px-2.5 text-p-std gap-1.5",
|
|
1554
1576
|
sm: "h-8 px-2 text-p-sm gap-1.5"
|
|
1555
1577
|
};
|
|
1556
|
-
function
|
|
1578
|
+
function an(...e) {
|
|
1557
1579
|
return (t) => {
|
|
1558
1580
|
for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
|
|
1559
1581
|
};
|
|
1560
1582
|
}
|
|
1561
|
-
var
|
|
1583
|
+
var on = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabled: i, onClear: a, children: o, className: s, dataTestId: c, ...u }, d) {
|
|
1562
1584
|
let [f, h] = m(!1), g = p(null);
|
|
1563
1585
|
l(() => {
|
|
1564
1586
|
if (!f) return;
|
|
@@ -1568,32 +1590,32 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1568
1590
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1569
1591
|
}, [f]);
|
|
1570
1592
|
let _ = n || t !== void 0;
|
|
1571
|
-
return /* @__PURE__ */
|
|
1572
|
-
ref:
|
|
1593
|
+
return /* @__PURE__ */ Y("div", {
|
|
1594
|
+
ref: an(d, g),
|
|
1573
1595
|
"data-test-id": c,
|
|
1574
|
-
className:
|
|
1596
|
+
className: Z("relative inline-flex", s),
|
|
1575
1597
|
...u,
|
|
1576
|
-
children: [/* @__PURE__ */
|
|
1598
|
+
children: [/* @__PURE__ */ Y("button", {
|
|
1577
1599
|
type: "button",
|
|
1578
1600
|
disabled: i,
|
|
1579
1601
|
onClick: () => h((e) => !e),
|
|
1580
1602
|
"aria-haspopup": "dialog",
|
|
1581
1603
|
"aria-expanded": f,
|
|
1582
|
-
className:
|
|
1604
|
+
className: Z("inline-flex items-center rounded-full border transition-colors outline-none", rn[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"),
|
|
1583
1605
|
children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ J("span", {
|
|
1585
1607
|
className: "font-medium",
|
|
1586
1608
|
children: e
|
|
1587
1609
|
}),
|
|
1588
|
-
t !== void 0 && /* @__PURE__ */
|
|
1610
|
+
t !== void 0 && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("span", {
|
|
1589
1611
|
className: "mx-0.5 text-fg-tertiary",
|
|
1590
1612
|
"aria-hidden": !0,
|
|
1591
1613
|
children: "•"
|
|
1592
|
-
}), /* @__PURE__ */
|
|
1614
|
+
}), /* @__PURE__ */ J("span", {
|
|
1593
1615
|
className: "font-semibold truncate max-w-[140px]",
|
|
1594
1616
|
children: t
|
|
1595
1617
|
})] }),
|
|
1596
|
-
_ && a ? /* @__PURE__ */
|
|
1618
|
+
_ && a ? /* @__PURE__ */ J("span", {
|
|
1597
1619
|
role: "button",
|
|
1598
1620
|
tabIndex: 0,
|
|
1599
1621
|
"aria-label": "Clear filter",
|
|
@@ -1604,21 +1626,21 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1604
1626
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a());
|
|
1605
1627
|
},
|
|
1606
1628
|
className: "inline-flex items-center justify-center rounded-full p-0.5 hover:bg-black/10",
|
|
1607
|
-
children: /* @__PURE__ */ W
|
|
1608
|
-
}) : /* @__PURE__ */
|
|
1609
|
-
className:
|
|
1629
|
+
children: /* @__PURE__ */ J(W, { className: "h-3 w-3" })
|
|
1630
|
+
}) : /* @__PURE__ */ J(S, {
|
|
1631
|
+
className: Z("h-4 w-4 text-fg-secondary transition-transform", f && "rotate-180"),
|
|
1610
1632
|
"aria-hidden": !0
|
|
1611
1633
|
})
|
|
1612
1634
|
]
|
|
1613
|
-
}), f && o && /* @__PURE__ */
|
|
1635
|
+
}), f && o && /* @__PURE__ */ J("div", {
|
|
1614
1636
|
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",
|
|
1615
1637
|
children: o
|
|
1616
1638
|
})]
|
|
1617
1639
|
});
|
|
1618
|
-
}),
|
|
1619
|
-
let { handleSubmit: p, register: m, setValue: h, control: g, formState: _, getValues: v, watch: y, reset: b, clearErrors: x, setError: S, trigger: C, getFieldState: w, unregister: T } =
|
|
1640
|
+
}), sn = r(null), cn = a(function({ children: e, className: t, validationSchema: n, defaultValues: r, buttons: i, mode: a = "onBlur", shouldUnregister: o, shouldFocusError: s = !0, formId: c, onSubmit: l, dataTestId: u, ...d }, f) {
|
|
1641
|
+
let { handleSubmit: p, register: m, setValue: h, control: g, formState: _, getValues: v, watch: y, reset: b, clearErrors: x, setError: S, trigger: C, getFieldState: w, unregister: T } = oe({
|
|
1620
1642
|
mode: a,
|
|
1621
|
-
resolver:
|
|
1643
|
+
resolver: se(n),
|
|
1622
1644
|
defaultValues: r,
|
|
1623
1645
|
shouldFocusError: s,
|
|
1624
1646
|
shouldUnregister: o
|
|
@@ -1644,71 +1666,78 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1644
1666
|
dirtyFields: A,
|
|
1645
1667
|
submit: M
|
|
1646
1668
|
};
|
|
1647
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ J("form", {
|
|
1648
1670
|
ref: f,
|
|
1649
1671
|
id: c,
|
|
1650
1672
|
onSubmit: M,
|
|
1651
1673
|
"data-test-id": u,
|
|
1652
|
-
className:
|
|
1674
|
+
className: Z("flex flex-col gap-4", t),
|
|
1653
1675
|
...d,
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1676
|
+
children: /* @__PURE__ */ Y(sn.Provider, {
|
|
1655
1677
|
value: N,
|
|
1656
|
-
children: [e, i && i.length > 0 && /* @__PURE__ */
|
|
1678
|
+
children: [e, i && i.length > 0 && /* @__PURE__ */ J("div", {
|
|
1657
1679
|
className: "flex items-center gap-3",
|
|
1658
1680
|
"data-test-id": u ? `${u}-buttons` : void 0,
|
|
1659
|
-
children: i.map((e, t) => /* @__PURE__ */
|
|
1681
|
+
children: i.map((e, t) => /* @__PURE__ */ J(He, { ...e }, t))
|
|
1660
1682
|
})]
|
|
1661
1683
|
})
|
|
1662
1684
|
});
|
|
1663
|
-
}),
|
|
1664
|
-
let s = c(
|
|
1685
|
+
}), ln = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
|
|
1686
|
+
let s = c(sn);
|
|
1665
1687
|
if (!s) throw Error("FormField must be rendered inside a FormContainer.");
|
|
1666
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ J("div", {
|
|
1667
1689
|
ref: o,
|
|
1668
|
-
className:
|
|
1690
|
+
className: Z(r),
|
|
1669
1691
|
"data-test-id": i,
|
|
1670
1692
|
...a,
|
|
1671
|
-
children: /* @__PURE__ */
|
|
1693
|
+
children: /* @__PURE__ */ J(ae, {
|
|
1672
1694
|
control: s.control,
|
|
1673
1695
|
name: e,
|
|
1674
1696
|
defaultValue: t,
|
|
1675
|
-
render: ({ field:
|
|
1676
|
-
...
|
|
1677
|
-
error: !!
|
|
1678
|
-
errorText:
|
|
1679
|
-
dataTestId: i
|
|
1697
|
+
render: ({ field: t, fieldState: r }) => n({
|
|
1698
|
+
...t,
|
|
1699
|
+
error: !!r.error,
|
|
1700
|
+
errorText: r.error?.message,
|
|
1701
|
+
dataTestId: i,
|
|
1702
|
+
setFieldValue: (t, n) => s.setValue(e, t, {
|
|
1703
|
+
shouldValidate: !0,
|
|
1704
|
+
shouldDirty: !0,
|
|
1705
|
+
shouldTouch: !0,
|
|
1706
|
+
...n
|
|
1707
|
+
}),
|
|
1708
|
+
isValid: r.isTouched && r.isDirty && !r.invalid
|
|
1680
1709
|
})
|
|
1681
1710
|
})
|
|
1682
1711
|
});
|
|
1683
|
-
}),
|
|
1684
|
-
return /* @__PURE__ */
|
|
1712
|
+
}), un = a(function({ icon: e, iconTone: t = "brand", label: n, value: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
1713
|
+
return /* @__PURE__ */ Y("div", {
|
|
1685
1714
|
ref: c,
|
|
1686
1715
|
"data-test-id": o,
|
|
1687
|
-
className:
|
|
1716
|
+
className: Z("flex items-start gap-3", a),
|
|
1688
1717
|
...s,
|
|
1689
1718
|
children: [
|
|
1690
|
-
/* @__PURE__ */
|
|
1719
|
+
/* @__PURE__ */ J(Jt, {
|
|
1691
1720
|
icon: e,
|
|
1692
1721
|
tone: t,
|
|
1693
1722
|
size: "md"
|
|
1694
1723
|
}),
|
|
1695
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ Y("div", {
|
|
1696
1725
|
className: "min-w-0 flex-1",
|
|
1697
|
-
children: [/* @__PURE__ */
|
|
1726
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1698
1727
|
className: "text-p-xs font-medium uppercase tracking-widest text-fg-tertiary",
|
|
1699
1728
|
children: n
|
|
1700
|
-
}), /* @__PURE__ */
|
|
1729
|
+
}), /* @__PURE__ */ J("div", {
|
|
1701
1730
|
className: "text-p-std font-semibold text-fg-default mt-1 break-words",
|
|
1702
1731
|
children: r
|
|
1703
1732
|
})]
|
|
1704
1733
|
}),
|
|
1705
|
-
i && /* @__PURE__ */
|
|
1734
|
+
i && /* @__PURE__ */ J("div", {
|
|
1706
1735
|
className: "shrink-0 flex items-center",
|
|
1707
1736
|
children: i
|
|
1708
1737
|
})
|
|
1709
1738
|
]
|
|
1710
1739
|
});
|
|
1711
|
-
}),
|
|
1740
|
+
}), dn = {
|
|
1712
1741
|
success: {
|
|
1713
1742
|
container: "bg-green-50 border-green-200",
|
|
1714
1743
|
iconColor: "text-green-600",
|
|
@@ -1722,7 +1751,7 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1722
1751
|
danger: {
|
|
1723
1752
|
container: "bg-red-50 border-red-200",
|
|
1724
1753
|
iconColor: "text-red-700",
|
|
1725
|
-
DefaultIcon:
|
|
1754
|
+
DefaultIcon: G
|
|
1726
1755
|
},
|
|
1727
1756
|
info: {
|
|
1728
1757
|
container: "bg-blue-50 border-blue-200",
|
|
@@ -1732,57 +1761,57 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1732
1761
|
discovery: {
|
|
1733
1762
|
container: "bg-purple-50 border-purple-200",
|
|
1734
1763
|
iconColor: "text-purple-700",
|
|
1735
|
-
DefaultIcon:
|
|
1764
|
+
DefaultIcon: V
|
|
1736
1765
|
}
|
|
1737
|
-
},
|
|
1738
|
-
let { container: u, iconColor: d, DefaultIcon: f } =
|
|
1739
|
-
return /* @__PURE__ */
|
|
1766
|
+
}, fn = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
1767
|
+
let { container: u, iconColor: d, DefaultIcon: f } = dn[e];
|
|
1768
|
+
return /* @__PURE__ */ Y("div", {
|
|
1740
1769
|
ref: l,
|
|
1741
1770
|
role: "alert",
|
|
1742
1771
|
"data-test-id": s,
|
|
1743
|
-
className:
|
|
1772
|
+
className: Z("flex gap-3 p-4 border rounded-lg", u, o),
|
|
1744
1773
|
...c,
|
|
1745
1774
|
children: [
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
className:
|
|
1748
|
-
children: a ?? /* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ J("div", {
|
|
1776
|
+
className: Z("flex-shrink-0 mt-0.5", d),
|
|
1777
|
+
children: a ?? /* @__PURE__ */ J(f, {
|
|
1749
1778
|
className: "h-5 w-5",
|
|
1750
1779
|
"aria-hidden": !0
|
|
1751
1780
|
})
|
|
1752
1781
|
}),
|
|
1753
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ Y("div", {
|
|
1754
1783
|
className: "flex-1 min-w-0",
|
|
1755
1784
|
children: [
|
|
1756
|
-
t && /* @__PURE__ */
|
|
1785
|
+
t && /* @__PURE__ */ J("div", {
|
|
1757
1786
|
className: "text-p-std font-semibold text-fg-default mb-0.5",
|
|
1758
1787
|
children: t
|
|
1759
1788
|
}),
|
|
1760
|
-
n && /* @__PURE__ */
|
|
1789
|
+
n && /* @__PURE__ */ J("div", {
|
|
1761
1790
|
className: "text-p-std text-fg-secondary",
|
|
1762
1791
|
children: n
|
|
1763
1792
|
}),
|
|
1764
|
-
i && /* @__PURE__ */
|
|
1793
|
+
i && /* @__PURE__ */ J("div", {
|
|
1765
1794
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
1766
1795
|
children: i
|
|
1767
1796
|
})
|
|
1768
1797
|
]
|
|
1769
1798
|
}),
|
|
1770
|
-
r && /* @__PURE__ */
|
|
1799
|
+
r && /* @__PURE__ */ J("button", {
|
|
1771
1800
|
type: "button",
|
|
1772
1801
|
onClick: r,
|
|
1773
1802
|
"aria-label": "Dismiss",
|
|
1774
1803
|
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",
|
|
1775
|
-
children: /* @__PURE__ */ W
|
|
1804
|
+
children: /* @__PURE__ */ J(W, { className: "h-4 w-4" })
|
|
1776
1805
|
})
|
|
1777
1806
|
]
|
|
1778
1807
|
});
|
|
1779
|
-
}),
|
|
1808
|
+
}), pn = 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) {
|
|
1780
1809
|
let m = {
|
|
1781
1810
|
...f,
|
|
1782
1811
|
target: u,
|
|
1783
1812
|
rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
|
|
1784
1813
|
};
|
|
1785
|
-
return /* @__PURE__ */
|
|
1814
|
+
return /* @__PURE__ */ Y($t, {
|
|
1786
1815
|
as: "a",
|
|
1787
1816
|
ref: p,
|
|
1788
1817
|
variant: e,
|
|
@@ -1790,27 +1819,27 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1790
1819
|
color: n,
|
|
1791
1820
|
truncate: o,
|
|
1792
1821
|
dataTestId: l,
|
|
1793
|
-
className:
|
|
1822
|
+
className: Z("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),
|
|
1794
1823
|
...m,
|
|
1795
1824
|
children: [
|
|
1796
|
-
i && /* @__PURE__ */
|
|
1825
|
+
i && /* @__PURE__ */ J("span", {
|
|
1797
1826
|
className: "inline-flex shrink-0",
|
|
1798
1827
|
children: i
|
|
1799
1828
|
}),
|
|
1800
1829
|
c,
|
|
1801
|
-
a && /* @__PURE__ */
|
|
1830
|
+
a && /* @__PURE__ */ J("span", {
|
|
1802
1831
|
className: "inline-flex shrink-0",
|
|
1803
1832
|
children: a
|
|
1804
1833
|
})
|
|
1805
1834
|
]
|
|
1806
1835
|
});
|
|
1807
|
-
}),
|
|
1836
|
+
}), mn = {
|
|
1808
1837
|
sm: "max-w-sm",
|
|
1809
1838
|
md: "max-w-md",
|
|
1810
1839
|
lg: "max-w-lg",
|
|
1811
1840
|
xl: "max-w-2xl",
|
|
1812
1841
|
"2xl": "max-w-4xl"
|
|
1813
|
-
},
|
|
1842
|
+
}, hn = 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) {
|
|
1814
1843
|
let m = p(null);
|
|
1815
1844
|
return l(() => {
|
|
1816
1845
|
if (!e) return;
|
|
@@ -1826,55 +1855,55 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1826
1855
|
if (!e) return;
|
|
1827
1856
|
let t = document.activeElement;
|
|
1828
1857
|
return m.current?.focus(), () => t?.focus?.();
|
|
1829
|
-
}, [e]), e ?
|
|
1858
|
+
}, [e]), e ? X(/* @__PURE__ */ Y("div", {
|
|
1830
1859
|
role: "dialog",
|
|
1831
1860
|
"aria-modal": "true",
|
|
1832
1861
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
1833
1862
|
"aria-describedby": r ? "modal-desc" : void 0,
|
|
1834
1863
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
1835
|
-
children: [/* @__PURE__ */
|
|
1864
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1836
1865
|
className: "absolute inset-0 bg-black/50",
|
|
1837
1866
|
onClick: () => s && t(),
|
|
1838
1867
|
"aria-hidden": !0
|
|
1839
|
-
}), /* @__PURE__ */
|
|
1840
|
-
ref:
|
|
1868
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1869
|
+
ref: $e(m, f),
|
|
1841
1870
|
tabIndex: -1,
|
|
1842
1871
|
"data-test-id": d,
|
|
1843
|
-
className:
|
|
1872
|
+
className: Z("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", mn[o], u),
|
|
1844
1873
|
children: [
|
|
1845
|
-
(n || c) && /* @__PURE__ */
|
|
1874
|
+
(n || c) && /* @__PURE__ */ Y("div", {
|
|
1846
1875
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4",
|
|
1847
|
-
children: [/* @__PURE__ */
|
|
1876
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1848
1877
|
className: "flex-1 min-w-0",
|
|
1849
|
-
children: [n && /* @__PURE__ */
|
|
1878
|
+
children: [n && /* @__PURE__ */ J("h2", {
|
|
1850
1879
|
id: "modal-title",
|
|
1851
1880
|
className: "text-h-xs font-semibold text-fg-default",
|
|
1852
1881
|
children: n
|
|
1853
|
-
}), r && /* @__PURE__ */
|
|
1882
|
+
}), r && /* @__PURE__ */ J("p", {
|
|
1854
1883
|
id: "modal-desc",
|
|
1855
1884
|
className: "mt-1 text-p-std text-fg-secondary",
|
|
1856
1885
|
children: r
|
|
1857
1886
|
})]
|
|
1858
|
-
}), c && /* @__PURE__ */
|
|
1887
|
+
}), c && /* @__PURE__ */ J("button", {
|
|
1859
1888
|
type: "button",
|
|
1860
1889
|
onClick: t,
|
|
1861
1890
|
"aria-label": "Close",
|
|
1862
1891
|
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",
|
|
1863
|
-
children: /* @__PURE__ */ W
|
|
1892
|
+
children: /* @__PURE__ */ J(W, { className: "h-5 w-5" })
|
|
1864
1893
|
})]
|
|
1865
1894
|
}),
|
|
1866
|
-
i && /* @__PURE__ */
|
|
1895
|
+
i && /* @__PURE__ */ J("div", {
|
|
1867
1896
|
className: "px-6 pb-6 overflow-y-auto",
|
|
1868
1897
|
children: i
|
|
1869
1898
|
}),
|
|
1870
|
-
a && /* @__PURE__ */
|
|
1899
|
+
a && /* @__PURE__ */ J("div", {
|
|
1871
1900
|
className: "flex items-center justify-end gap-2 px-6 py-4 border-t border-border-default bg-bg-container rounded-b-xl",
|
|
1872
1901
|
children: a
|
|
1873
1902
|
})
|
|
1874
1903
|
]
|
|
1875
1904
|
})]
|
|
1876
1905
|
}), document.body) : null;
|
|
1877
|
-
}),
|
|
1906
|
+
}), gn = {
|
|
1878
1907
|
sm: {
|
|
1879
1908
|
box: "px-1.5 py-1.5 gap-1",
|
|
1880
1909
|
chip: "h-6 pl-0.5 pr-1.5",
|
|
@@ -1896,164 +1925,164 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
1896
1925
|
input: "h-8 text-p-md min-w-[140px]",
|
|
1897
1926
|
avatar: "sm"
|
|
1898
1927
|
}
|
|
1899
|
-
},
|
|
1900
|
-
let j = u(), M = E ?? j, N = `${M}-listbox`, P = d || !!v, [F, I] = m(""), [L, R] = m(!1), [z,
|
|
1901
|
-
|
|
1902
|
-
},
|
|
1928
|
+
}, _n = a(function({ options: e, value: t, onChange: n, onAdd: r, onRemove: i, size: a = "md", placeholder: o = "Select…", addMorePlaceholder: s = "Add another…", disabled: c = !1, error: d = !1, label: h, labelAddons: g, helperText: _, errorText: v, required: y = !1, lockedValues: b = [], max: x, searchable: S = !0, suggestionsLabel: C = "Suggestions", emptyText: w = "No matches. Try a different search.", showAvatars: T = !1, id: E, className: D, wrapperClassName: O, dataTestId: k }, A) {
|
|
1929
|
+
let j = u(), M = E ?? j, N = `${M}-listbox`, P = d || !!v, [F, I] = m(""), [L, R] = m(!1), [z, B] = m(0), V = p(null), te = p(null), H = (e) => {
|
|
1930
|
+
te.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
|
|
1931
|
+
}, U = f(() => new Map(e.map((e) => [e.value, e])), [e]), ne = f(() => t.map((e) => U.get(e)).filter((e) => !!e), [t, U]), G = f(() => {
|
|
1903
1932
|
let n = F.trim().toLowerCase();
|
|
1904
1933
|
return e.filter((e) => !t.includes(e.value) && (n === "" || e.label.toLowerCase().includes(n) || (e.description ?? "").toLowerCase().includes(n)));
|
|
1905
1934
|
}, [
|
|
1906
1935
|
e,
|
|
1907
1936
|
t,
|
|
1908
1937
|
F
|
|
1909
|
-
]),
|
|
1938
|
+
]), ie = x !== void 0 && t.length >= x;
|
|
1910
1939
|
l(() => {
|
|
1911
1940
|
if (!L) return;
|
|
1912
1941
|
let e = (e) => {
|
|
1913
|
-
|
|
1942
|
+
V.current && !V.current.contains(e.target) && R(!1);
|
|
1914
1943
|
};
|
|
1915
1944
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1916
1945
|
}, [L]), l(() => {
|
|
1917
|
-
|
|
1918
|
-
}, [
|
|
1919
|
-
let
|
|
1920
|
-
let i =
|
|
1921
|
-
c ||
|
|
1922
|
-
},
|
|
1946
|
+
B((e) => Math.min(e, Math.max(0, G.length - 1)));
|
|
1947
|
+
}, [G.length]);
|
|
1948
|
+
let K = (e) => {
|
|
1949
|
+
let i = U.get(e);
|
|
1950
|
+
c || ie || !i || i.disabled || (n([...t, e]), r?.(i), I(""), B(0), te.current?.focus());
|
|
1951
|
+
}, q = (e) => {
|
|
1923
1952
|
c || b.includes(e) || (n(t.filter((t) => t !== e)), i?.(e));
|
|
1924
|
-
},
|
|
1925
|
-
if (!
|
|
1953
|
+
}, X = (e) => {
|
|
1954
|
+
if (!G.length) return;
|
|
1926
1955
|
let t = z;
|
|
1927
|
-
for (let n = 0; n <
|
|
1928
|
-
|
|
1929
|
-
},
|
|
1930
|
-
if (e.key === "ArrowDown") e.preventDefault(), L ?
|
|
1931
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
1932
|
-
else if (e.key === "Enter") L &&
|
|
1956
|
+
for (let n = 0; n < G.length && (t = (t + e + G.length) % G.length, G[t]?.disabled); n++);
|
|
1957
|
+
B(t);
|
|
1958
|
+
}, ae = (e) => {
|
|
1959
|
+
if (e.key === "ArrowDown") e.preventDefault(), L ? X(1) : R(!0);
|
|
1960
|
+
else if (e.key === "ArrowUp") e.preventDefault(), X(-1);
|
|
1961
|
+
else if (e.key === "Enter") L && G[z] && !G[z].disabled && (e.preventDefault(), K(G[z].value));
|
|
1933
1962
|
else if (e.key === "Escape") R(!1);
|
|
1934
|
-
else if (e.key === "Backspace" && F === "" &&
|
|
1935
|
-
let e = [...
|
|
1936
|
-
e &&
|
|
1963
|
+
else if (e.key === "Backspace" && F === "" && ne.length > 0) {
|
|
1964
|
+
let e = [...ne].reverse().find((e) => !b.includes(e.value));
|
|
1965
|
+
e && q(e.value);
|
|
1937
1966
|
}
|
|
1938
|
-
},
|
|
1939
|
-
return /* @__PURE__ */
|
|
1967
|
+
}, oe = v ? `${M}-error` : _ ? `${M}-help` : void 0;
|
|
1968
|
+
return /* @__PURE__ */ Y("div", {
|
|
1940
1969
|
"data-test-id": k,
|
|
1941
|
-
className:
|
|
1970
|
+
className: Z("flex flex-col gap-1.5 w-full", O),
|
|
1942
1971
|
children: [
|
|
1943
|
-
(h || g) && /* @__PURE__ */
|
|
1972
|
+
(h || g) && /* @__PURE__ */ Y("div", {
|
|
1944
1973
|
className: "flex items-center gap-1.5",
|
|
1945
|
-
children: [h && /* @__PURE__ */
|
|
1974
|
+
children: [h && /* @__PURE__ */ Y("label", {
|
|
1946
1975
|
htmlFor: M,
|
|
1947
1976
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
1948
|
-
children: [h, y && /* @__PURE__ */
|
|
1977
|
+
children: [h, y && /* @__PURE__ */ J("span", {
|
|
1949
1978
|
className: "text-red-600",
|
|
1950
1979
|
"aria-hidden": !0,
|
|
1951
1980
|
children: "*"
|
|
1952
1981
|
})]
|
|
1953
|
-
}), g && /* @__PURE__ */
|
|
1982
|
+
}), g && /* @__PURE__ */ J("span", {
|
|
1954
1983
|
className: "inline-flex items-center gap-1",
|
|
1955
1984
|
children: g
|
|
1956
1985
|
})]
|
|
1957
1986
|
}),
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
ref:
|
|
1987
|
+
/* @__PURE__ */ Y("div", {
|
|
1988
|
+
ref: V,
|
|
1960
1989
|
className: "relative",
|
|
1961
|
-
children: [/* @__PURE__ */
|
|
1962
|
-
className:
|
|
1963
|
-
onClick: () => !c &&
|
|
1964
|
-
children: [
|
|
1990
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1991
|
+
className: Z("flex flex-wrap items-center rounded-lg border bg-bg-default transition-colors", gn[a].box, c ? "opacity-60 cursor-not-allowed border-border-default" : P ? "border-red-500 focus-within:ring-2 focus-within:ring-red-300 focus-within:ring-offset-1 cursor-text" : "border-border-default hover:border-border-strong focus-within:border-fg-tertiary focus-within:ring-2 focus-within:ring-brand-300 focus-within:ring-offset-1 cursor-text", D),
|
|
1992
|
+
onClick: () => !c && te.current?.focus(),
|
|
1993
|
+
children: [ne.map((e) => {
|
|
1965
1994
|
let t = b.includes(e.value);
|
|
1966
|
-
return /* @__PURE__ */
|
|
1967
|
-
className:
|
|
1995
|
+
return /* @__PURE__ */ Y("span", {
|
|
1996
|
+
className: Z("inline-flex items-center gap-1.5 rounded-full text-fg-default bg-bg-subtle", gn[a].chip, gn[a].chipText),
|
|
1968
1997
|
title: e.description,
|
|
1969
1998
|
children: [
|
|
1970
|
-
(T || e.avatarSrc) && /* @__PURE__ */
|
|
1999
|
+
(T || e.avatarSrc) && /* @__PURE__ */ J(we, {
|
|
1971
2000
|
src: e.avatarSrc,
|
|
1972
2001
|
name: e.label,
|
|
1973
|
-
size:
|
|
2002
|
+
size: gn[a].avatar
|
|
1974
2003
|
}),
|
|
1975
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ J("span", {
|
|
1976
2005
|
className: "font-medium",
|
|
1977
2006
|
children: e.label
|
|
1978
2007
|
}),
|
|
1979
|
-
e.badge && /* @__PURE__ */
|
|
2008
|
+
e.badge && /* @__PURE__ */ J("span", {
|
|
1980
2009
|
className: "text-label-xxs uppercase tracking-wider opacity-70",
|
|
1981
2010
|
children: e.badge
|
|
1982
2011
|
}),
|
|
1983
|
-
!t && !c && /* @__PURE__ */
|
|
2012
|
+
!t && !c && /* @__PURE__ */ J("button", {
|
|
1984
2013
|
type: "button",
|
|
1985
2014
|
onClick: (t) => {
|
|
1986
|
-
t.stopPropagation(),
|
|
2015
|
+
t.stopPropagation(), q(e.value);
|
|
1987
2016
|
},
|
|
1988
2017
|
"aria-label": `Remove ${e.label}`,
|
|
1989
2018
|
className: "-mr-0.5 ml-0.5 text-fg-tertiary hover:text-fg-default p-0.5 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
1990
|
-
children: /* @__PURE__ */ W
|
|
2019
|
+
children: /* @__PURE__ */ J(W, { className: "w-3 h-3" })
|
|
1991
2020
|
})
|
|
1992
2021
|
]
|
|
1993
2022
|
}, e.value);
|
|
1994
|
-
}), /* @__PURE__ */
|
|
1995
|
-
ref:
|
|
2023
|
+
}), /* @__PURE__ */ J("input", {
|
|
2024
|
+
ref: H,
|
|
1996
2025
|
id: M,
|
|
1997
2026
|
type: "text",
|
|
1998
2027
|
role: "combobox",
|
|
1999
2028
|
"aria-expanded": L,
|
|
2000
2029
|
"aria-controls": N,
|
|
2001
2030
|
"aria-autocomplete": "list",
|
|
2002
|
-
"aria-activedescendant": L &&
|
|
2031
|
+
"aria-activedescendant": L && G[z] ? `${N}-opt-${z}` : void 0,
|
|
2003
2032
|
"aria-invalid": P || void 0,
|
|
2004
|
-
"aria-describedby":
|
|
2033
|
+
"aria-describedby": oe,
|
|
2005
2034
|
value: F,
|
|
2006
2035
|
readOnly: !S,
|
|
2007
|
-
disabled: c ||
|
|
2036
|
+
disabled: c || ie,
|
|
2008
2037
|
onChange: (e) => {
|
|
2009
2038
|
I(e.target.value), R(!0);
|
|
2010
2039
|
},
|
|
2011
2040
|
onFocus: () => R(!0),
|
|
2012
|
-
onKeyDown:
|
|
2013
|
-
placeholder:
|
|
2014
|
-
className:
|
|
2041
|
+
onKeyDown: ae,
|
|
2042
|
+
placeholder: ne.length === 0 ? o : ie ? `Limit ${x} reached` : s,
|
|
2043
|
+
className: Z("flex-1 bg-transparent outline-none text-fg-default placeholder:text-fg-tertiary disabled:cursor-not-allowed", !S && "cursor-pointer", gn[a].input)
|
|
2015
2044
|
})]
|
|
2016
|
-
}), L && !c && !
|
|
2045
|
+
}), L && !c && !ie && /* @__PURE__ */ Y("div", {
|
|
2017
2046
|
className: "absolute top-full left-0 right-0 mt-1 z-20 max-h-80 overflow-y-auto rounded-lg border border-border-default bg-bg-default shadow-z4",
|
|
2018
|
-
children: [/* @__PURE__ */
|
|
2047
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
2019
2048
|
className: "px-3 py-2 border-b border-border-subtle flex items-center gap-2 text-p-sm text-fg-tertiary",
|
|
2020
|
-
children: [/* @__PURE__ */
|
|
2049
|
+
children: [/* @__PURE__ */ J(ee, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ J("span", {
|
|
2021
2050
|
className: "truncate",
|
|
2022
2051
|
children: F ? `Matches for "${F}"` : C
|
|
2023
2052
|
})]
|
|
2024
|
-
}),
|
|
2053
|
+
}), G.length === 0 ? /* @__PURE__ */ Y("div", {
|
|
2025
2054
|
className: "px-3 py-6 text-center",
|
|
2026
|
-
children: [/* @__PURE__ */
|
|
2055
|
+
children: [/* @__PURE__ */ J(re, { className: "w-5 h-5 mx-auto text-fg-tertiary mb-2" }), /* @__PURE__ */ J("span", {
|
|
2027
2056
|
className: "text-p-sm text-fg-secondary",
|
|
2028
2057
|
children: w
|
|
2029
2058
|
})]
|
|
2030
|
-
}) : /* @__PURE__ */
|
|
2059
|
+
}) : /* @__PURE__ */ J("ul", {
|
|
2031
2060
|
role: "listbox",
|
|
2032
2061
|
id: N,
|
|
2033
2062
|
className: "py-1",
|
|
2034
|
-
children:
|
|
2063
|
+
children: G.map((e, t) => /* @__PURE__ */ J("li", {
|
|
2035
2064
|
role: "option",
|
|
2036
2065
|
id: `${N}-opt-${t}`,
|
|
2037
2066
|
"aria-selected": t === z,
|
|
2038
2067
|
"aria-disabled": e.disabled || void 0,
|
|
2039
|
-
children: /* @__PURE__ */
|
|
2068
|
+
children: /* @__PURE__ */ Y("button", {
|
|
2040
2069
|
type: "button",
|
|
2041
2070
|
disabled: e.disabled,
|
|
2042
|
-
onMouseEnter: () =>
|
|
2071
|
+
onMouseEnter: () => B(t),
|
|
2043
2072
|
onMouseDown: (t) => {
|
|
2044
|
-
t.preventDefault(),
|
|
2073
|
+
t.preventDefault(), K(e.value);
|
|
2045
2074
|
},
|
|
2046
|
-
className:
|
|
2047
|
-
children: [(T || e.avatarSrc) && /* @__PURE__ */
|
|
2075
|
+
className: Z("w-full px-3 py-2 flex items-center gap-3 text-left transition", e.disabled ? "opacity-50 cursor-not-allowed" : t === z ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
|
|
2076
|
+
children: [(T || e.avatarSrc) && /* @__PURE__ */ J(we, {
|
|
2048
2077
|
src: e.avatarSrc,
|
|
2049
2078
|
name: e.label,
|
|
2050
2079
|
size: "sm"
|
|
2051
|
-
}), /* @__PURE__ */
|
|
2080
|
+
}), /* @__PURE__ */ Y("span", {
|
|
2052
2081
|
className: "flex-1 min-w-0",
|
|
2053
|
-
children: [/* @__PURE__ */
|
|
2082
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2054
2083
|
className: "block text-p-std font-medium text-fg-default truncate",
|
|
2055
2084
|
children: e.label
|
|
2056
|
-
}), e.description && /* @__PURE__ */
|
|
2085
|
+
}), e.description && /* @__PURE__ */ J("span", {
|
|
2057
2086
|
className: "block text-p-sm text-fg-secondary truncate",
|
|
2058
2087
|
children: e.description
|
|
2059
2088
|
})]
|
|
@@ -2063,49 +2092,49 @@ var sn = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2063
2092
|
})]
|
|
2064
2093
|
})]
|
|
2065
2094
|
}),
|
|
2066
|
-
v ? /* @__PURE__ */
|
|
2095
|
+
v ? /* @__PURE__ */ J("p", {
|
|
2067
2096
|
id: `${M}-error`,
|
|
2068
2097
|
className: "text-p-sm text-red-700",
|
|
2069
2098
|
children: v
|
|
2070
|
-
}) : _ ? /* @__PURE__ */
|
|
2099
|
+
}) : _ ? /* @__PURE__ */ J("p", {
|
|
2071
2100
|
id: `${M}-help`,
|
|
2072
2101
|
className: "text-p-sm text-fg-secondary",
|
|
2073
2102
|
children: _
|
|
2074
2103
|
}) : null
|
|
2075
2104
|
]
|
|
2076
2105
|
});
|
|
2077
|
-
}),
|
|
2106
|
+
}), vn = {
|
|
2078
2107
|
brand: "bg-brand-500 text-white",
|
|
2079
2108
|
danger: "bg-red-600 text-white",
|
|
2080
2109
|
success: "bg-green-600 text-white",
|
|
2081
2110
|
warning: "bg-yellow-600 text-gray-900 dark:text-gray-900",
|
|
2082
2111
|
info: "bg-blue-600 text-white"
|
|
2083
|
-
},
|
|
2112
|
+
}, yn = {
|
|
2084
2113
|
lg: "min-w-[18px] h-[18px] px-1 text-[11px]",
|
|
2085
2114
|
sm: "min-w-[14px] h-[14px] px-0.5 text-[10px]"
|
|
2086
|
-
},
|
|
2115
|
+
}, bn = {
|
|
2087
2116
|
lg: "h-2.5 w-2.5",
|
|
2088
2117
|
sm: "h-1.5 w-1.5"
|
|
2089
2118
|
};
|
|
2090
|
-
function
|
|
2119
|
+
function xn(e, t) {
|
|
2091
2120
|
return e > t ? `${t}+` : e >= 1e3 ? `${(e / 1e3).toFixed(0)}K` : String(e);
|
|
2092
2121
|
}
|
|
2093
|
-
var
|
|
2094
|
-
let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */
|
|
2122
|
+
var Sn = 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) {
|
|
2123
|
+
let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */ J("span", {
|
|
2095
2124
|
ref: u,
|
|
2096
2125
|
"data-test-id": c,
|
|
2097
|
-
className:
|
|
2126
|
+
className: Z("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white", vn[i], n === "count" ? yn[r] : bn[r], f ? "absolute -top-1 -right-1" : "static", s),
|
|
2098
2127
|
...l,
|
|
2099
|
-
children: n === "count" &&
|
|
2128
|
+
children: n === "count" && xn(e, t)
|
|
2100
2129
|
}) : null;
|
|
2101
|
-
return f ? /* @__PURE__ */
|
|
2130
|
+
return f ? /* @__PURE__ */ Y("span", {
|
|
2102
2131
|
className: "relative inline-flex",
|
|
2103
2132
|
children: [a, p]
|
|
2104
2133
|
}) : p;
|
|
2105
2134
|
});
|
|
2106
2135
|
//#endregion
|
|
2107
2136
|
//#region src/components/Pagination/Pagination.tsx
|
|
2108
|
-
function
|
|
2137
|
+
function Cn(e, t, n, r) {
|
|
2109
2138
|
if (t <= n * 2 + 3 + r * 2) return Array.from({ length: t }, (e, t) => t + 1);
|
|
2110
2139
|
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 = [];
|
|
2111
2140
|
if (o) {
|
|
@@ -2120,49 +2149,49 @@ function wn(e, t, n, r) {
|
|
|
2120
2149
|
...l
|
|
2121
2150
|
];
|
|
2122
2151
|
}
|
|
2123
|
-
var
|
|
2124
|
-
let u =
|
|
2125
|
-
return /* @__PURE__ */
|
|
2152
|
+
var wn = "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", Tn = "text-fg-default hover:bg-bg-subtle disabled:text-fg-disabled disabled:hover:bg-transparent disabled:cursor-not-allowed", En = a(function({ page: e, pageCount: t, onPageChange: n, siblingCount: r = 1, boundaryCount: i = 1, className: a, dataTestId: o, "aria-label": s, ...c }, l) {
|
|
2153
|
+
let u = Cn(e, t, r, i), d = e <= 1, f = e >= t;
|
|
2154
|
+
return /* @__PURE__ */ Y("nav", {
|
|
2126
2155
|
ref: l,
|
|
2127
2156
|
"aria-label": s ?? "Pagination",
|
|
2128
2157
|
"data-test-id": o,
|
|
2129
|
-
className:
|
|
2158
|
+
className: Z("inline-flex items-center gap-1", a),
|
|
2130
2159
|
...c,
|
|
2131
2160
|
children: [
|
|
2132
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ J("button", {
|
|
2133
2162
|
type: "button",
|
|
2134
2163
|
onClick: () => !d && n(e - 1),
|
|
2135
2164
|
disabled: d,
|
|
2136
2165
|
"aria-label": "Previous page",
|
|
2137
|
-
className:
|
|
2138
|
-
children: /* @__PURE__ */
|
|
2166
|
+
className: Z(wn, Tn),
|
|
2167
|
+
children: /* @__PURE__ */ J(C, { className: "h-4 w-4" })
|
|
2139
2168
|
}),
|
|
2140
2169
|
u.map((t, r) => {
|
|
2141
|
-
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */
|
|
2170
|
+
if (t === "ellipsis-left" || t === "ellipsis-right") return /* @__PURE__ */ J("span", {
|
|
2142
2171
|
"aria-hidden": !0,
|
|
2143
2172
|
className: "inline-flex items-center justify-center w-9 h-9 text-fg-tertiary",
|
|
2144
|
-
children: /* @__PURE__ */
|
|
2173
|
+
children: /* @__PURE__ */ J(I, { className: "h-4 w-4" })
|
|
2145
2174
|
}, `${t}-${r}`);
|
|
2146
2175
|
let i = t === e;
|
|
2147
|
-
return /* @__PURE__ */
|
|
2176
|
+
return /* @__PURE__ */ J("button", {
|
|
2148
2177
|
type: "button",
|
|
2149
2178
|
onClick: () => n(t),
|
|
2150
2179
|
"aria-current": i ? "page" : void 0,
|
|
2151
|
-
className:
|
|
2180
|
+
className: Z(wn, i ? "bg-brand-500 text-white font-semibold hover:bg-brand-600" : "text-fg-default hover:bg-bg-subtle"),
|
|
2152
2181
|
children: t
|
|
2153
2182
|
}, t);
|
|
2154
2183
|
}),
|
|
2155
|
-
/* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ J("button", {
|
|
2156
2185
|
type: "button",
|
|
2157
2186
|
onClick: () => !f && n(e + 1),
|
|
2158
2187
|
disabled: f,
|
|
2159
2188
|
"aria-label": "Next page",
|
|
2160
|
-
className:
|
|
2161
|
-
children: /* @__PURE__ */
|
|
2189
|
+
className: Z(wn, Tn),
|
|
2190
|
+
children: /* @__PURE__ */ J(w, { className: "h-4 w-4" })
|
|
2162
2191
|
})
|
|
2163
2192
|
]
|
|
2164
2193
|
});
|
|
2165
|
-
}),
|
|
2194
|
+
}), Dn = {
|
|
2166
2195
|
sm: {
|
|
2167
2196
|
padding: "px-3 py-2",
|
|
2168
2197
|
avatar: "sm",
|
|
@@ -2173,64 +2202,64 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2173
2202
|
avatar: "md",
|
|
2174
2203
|
gap: "gap-3"
|
|
2175
2204
|
}
|
|
2176
|
-
},
|
|
2205
|
+
}, On = {
|
|
2177
2206
|
default: "border-border-default bg-bg-default hover:border-fg-tertiary/40",
|
|
2178
2207
|
highlight: "border-brand-500 bg-brand-200/15 dark:bg-brand-500/10 ring-1 ring-brand-500/40",
|
|
2179
2208
|
warning: "border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20"
|
|
2180
|
-
},
|
|
2181
|
-
let d =
|
|
2182
|
-
/* @__PURE__ */
|
|
2209
|
+
}, kn = a(function({ name: e, role: t, avatar: n, variant: r = "default", size: i = "md", badge: a, onClick: o, className: s, dataTestId: c, ...l }, u) {
|
|
2210
|
+
let d = Dn[i], f = On[r], p = /* @__PURE__ */ Y(q, { children: [
|
|
2211
|
+
/* @__PURE__ */ J(we, {
|
|
2183
2212
|
src: n,
|
|
2184
2213
|
name: e,
|
|
2185
2214
|
size: d.avatar
|
|
2186
2215
|
}),
|
|
2187
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ Y("div", {
|
|
2188
2217
|
className: "min-w-0 flex-1",
|
|
2189
|
-
children: [/* @__PURE__ */
|
|
2218
|
+
children: [/* @__PURE__ */ J("div", {
|
|
2190
2219
|
className: "text-p-std font-semibold text-fg-default truncate leading-tight",
|
|
2191
2220
|
children: e
|
|
2192
|
-
}), t && /* @__PURE__ */
|
|
2221
|
+
}), t && /* @__PURE__ */ J("div", {
|
|
2193
2222
|
className: "text-p-sm text-fg-secondary truncate mt-0.5 leading-tight",
|
|
2194
2223
|
children: t
|
|
2195
2224
|
})]
|
|
2196
2225
|
}),
|
|
2197
|
-
a && /* @__PURE__ */
|
|
2226
|
+
a && /* @__PURE__ */ J("span", {
|
|
2198
2227
|
className: "shrink-0 self-center",
|
|
2199
2228
|
children: a
|
|
2200
2229
|
})
|
|
2201
|
-
] }), m =
|
|
2202
|
-
return o ? /* @__PURE__ */
|
|
2230
|
+
] }), m = Z("relative inline-flex items-center rounded-xl border transition", d.padding, d.gap, f, o && "cursor-pointer hover:shadow-z1", s);
|
|
2231
|
+
return o ? /* @__PURE__ */ J("button", {
|
|
2203
2232
|
ref: u,
|
|
2204
2233
|
type: "button",
|
|
2205
2234
|
onClick: o,
|
|
2206
2235
|
"data-test-id": c,
|
|
2207
|
-
className:
|
|
2236
|
+
className: Z(m, "text-left"),
|
|
2208
2237
|
...l,
|
|
2209
2238
|
children: p
|
|
2210
|
-
}) : /* @__PURE__ */
|
|
2239
|
+
}) : /* @__PURE__ */ J("div", {
|
|
2211
2240
|
ref: u,
|
|
2212
2241
|
"data-test-id": c,
|
|
2213
2242
|
className: m,
|
|
2214
2243
|
...l,
|
|
2215
2244
|
children: p
|
|
2216
2245
|
});
|
|
2217
|
-
}),
|
|
2246
|
+
}), An = {
|
|
2218
2247
|
sm: 29,
|
|
2219
2248
|
lg: 45
|
|
2220
|
-
},
|
|
2249
|
+
}, jn = {
|
|
2221
2250
|
sm: 2,
|
|
2222
2251
|
lg: 4
|
|
2223
|
-
},
|
|
2252
|
+
}, Mn = {
|
|
2224
2253
|
sm: "h-1",
|
|
2225
2254
|
lg: "h-2"
|
|
2226
|
-
},
|
|
2255
|
+
}, Nn = {
|
|
2227
2256
|
sm: "text-p-xs",
|
|
2228
2257
|
lg: "text-p-sm"
|
|
2229
|
-
},
|
|
2258
|
+
}, Pn = 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) {
|
|
2230
2259
|
let f = r && i ? i / r * 100 : n, p = Math.min(100, Math.max(0, f)), m = r ? `${i}/${r}` : `${Math.round(p)}%`;
|
|
2231
2260
|
if (e === "circular") {
|
|
2232
|
-
let e = o ??
|
|
2233
|
-
return /* @__PURE__ */
|
|
2261
|
+
let e = o ?? An[t], n = e - 5, r = 2 * n * Math.PI, i = jn[t];
|
|
2262
|
+
return /* @__PURE__ */ Y("div", {
|
|
2234
2263
|
ref: d,
|
|
2235
2264
|
role: "progressbar",
|
|
2236
2265
|
"aria-valuemin": 0,
|
|
@@ -2238,24 +2267,24 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2238
2267
|
"aria-valuenow": s ? void 0 : p,
|
|
2239
2268
|
"aria-valuetext": s ? void 0 : m,
|
|
2240
2269
|
"data-test-id": l,
|
|
2241
|
-
className:
|
|
2270
|
+
className: Z("relative inline-flex items-center justify-center", c),
|
|
2242
2271
|
style: {
|
|
2243
2272
|
width: e * 2,
|
|
2244
2273
|
height: e * 2
|
|
2245
2274
|
},
|
|
2246
2275
|
...u,
|
|
2247
|
-
children: [/* @__PURE__ */
|
|
2276
|
+
children: [/* @__PURE__ */ Y("svg", {
|
|
2248
2277
|
width: e * 2,
|
|
2249
2278
|
height: e * 2,
|
|
2250
2279
|
viewBox: `0 0 ${e * 2} ${e * 2}`,
|
|
2251
|
-
className:
|
|
2252
|
-
children: [/* @__PURE__ */
|
|
2280
|
+
className: Z("-rotate-90", s && "animate-spin"),
|
|
2281
|
+
children: [/* @__PURE__ */ J("circle", {
|
|
2253
2282
|
cx: e,
|
|
2254
2283
|
cy: e,
|
|
2255
2284
|
r: n,
|
|
2256
2285
|
strokeWidth: i,
|
|
2257
2286
|
className: "fill-none stroke-bg-subtle"
|
|
2258
|
-
}), /* @__PURE__ */
|
|
2287
|
+
}), /* @__PURE__ */ J("circle", {
|
|
2259
2288
|
cx: e,
|
|
2260
2289
|
cy: e,
|
|
2261
2290
|
r: n,
|
|
@@ -2267,14 +2296,14 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2267
2296
|
strokeDashoffset: s ? `${r * .75}px` : `${r - r * p / 100}px`
|
|
2268
2297
|
}
|
|
2269
2298
|
})]
|
|
2270
|
-
}), !a && !s && /* @__PURE__ */
|
|
2271
|
-
className:
|
|
2299
|
+
}), !a && !s && /* @__PURE__ */ J("span", {
|
|
2300
|
+
className: Z("absolute text-fg-secondary", Nn[t]),
|
|
2272
2301
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2273
2302
|
children: m
|
|
2274
2303
|
})]
|
|
2275
2304
|
});
|
|
2276
2305
|
}
|
|
2277
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ Y("div", {
|
|
2278
2307
|
ref: d,
|
|
2279
2308
|
role: "progressbar",
|
|
2280
2309
|
"aria-valuemin": 0,
|
|
@@ -2282,54 +2311,62 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2282
2311
|
"aria-valuenow": p,
|
|
2283
2312
|
"aria-valuetext": m,
|
|
2284
2313
|
"data-test-id": l,
|
|
2285
|
-
className:
|
|
2314
|
+
className: Z("flex w-full items-center gap-2", c),
|
|
2286
2315
|
...u,
|
|
2287
|
-
children: [/* @__PURE__ */
|
|
2288
|
-
className:
|
|
2289
|
-
children: /* @__PURE__ */
|
|
2316
|
+
children: [/* @__PURE__ */ J("div", {
|
|
2317
|
+
className: Z("w-full overflow-hidden rounded-full bg-bg-subtle", Mn[t]),
|
|
2318
|
+
children: /* @__PURE__ */ J("div", {
|
|
2290
2319
|
className: "h-full rounded-full bg-brand-500 transition-all duration-300 ease-linear",
|
|
2291
2320
|
style: { width: `${p}%` }
|
|
2292
2321
|
})
|
|
2293
|
-
}), !a && /* @__PURE__ */
|
|
2294
|
-
className:
|
|
2322
|
+
}), !a && /* @__PURE__ */ J("span", {
|
|
2323
|
+
className: Z("shrink-0 text-fg-secondary", Nn[t]),
|
|
2295
2324
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2296
2325
|
children: m
|
|
2297
2326
|
})]
|
|
2298
2327
|
});
|
|
2299
|
-
}),
|
|
2300
|
-
let
|
|
2301
|
-
|
|
2328
|
+
}), Fn = r(null), In = a(function({ name: e, label: t, value: n, defaultValue: r, onChange: i, disabled: a, size: o = "md", orientation: s = "vertical", children: c, className: l, dataTestId: d }, f) {
|
|
2329
|
+
let p = u(), m = e ?? p, h = `${p}-label`, g = /* @__PURE__ */ J("div", {
|
|
2330
|
+
ref: f,
|
|
2331
|
+
role: "radiogroup",
|
|
2332
|
+
"aria-labelledby": t ? h : void 0,
|
|
2333
|
+
"data-test-id": d,
|
|
2334
|
+
className: Z("flex gap-3", s === "vertical" ? "flex-col" : "flex-row flex-wrap items-center gap-4", l),
|
|
2335
|
+
children: c
|
|
2336
|
+
});
|
|
2337
|
+
return /* @__PURE__ */ J(Fn.Provider, {
|
|
2302
2338
|
value: {
|
|
2303
|
-
name:
|
|
2304
|
-
value:
|
|
2305
|
-
defaultValue:
|
|
2306
|
-
onChange:
|
|
2307
|
-
disabled:
|
|
2308
|
-
size:
|
|
2339
|
+
name: m,
|
|
2340
|
+
value: n,
|
|
2341
|
+
defaultValue: r,
|
|
2342
|
+
onChange: i,
|
|
2343
|
+
disabled: a,
|
|
2344
|
+
size: o
|
|
2309
2345
|
},
|
|
2310
|
-
children: /* @__PURE__ */
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2346
|
+
children: t ? /* @__PURE__ */ Y("div", {
|
|
2347
|
+
className: "flex flex-col gap-1.5",
|
|
2348
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2349
|
+
id: h,
|
|
2350
|
+
className: "text-p-std font-medium text-fg-default inline-flex",
|
|
2351
|
+
children: t
|
|
2352
|
+
}), g]
|
|
2353
|
+
}) : g
|
|
2317
2354
|
});
|
|
2318
|
-
}),
|
|
2355
|
+
}), Ln = {
|
|
2319
2356
|
md: "h-5 w-5",
|
|
2320
2357
|
sm: "h-4 w-4"
|
|
2321
|
-
},
|
|
2358
|
+
}, Rn = {
|
|
2322
2359
|
md: "h-2 w-2",
|
|
2323
2360
|
sm: "h-1.5 w-1.5"
|
|
2324
|
-
},
|
|
2325
|
-
let g = c(
|
|
2326
|
-
return /* @__PURE__ */
|
|
2361
|
+
}, zn = 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) {
|
|
2362
|
+
let g = c(Fn), _ = u(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = g !== null, S = x && g.value !== void 0 ? g.value === e : void 0, C = x && g.defaultValue !== void 0 ? g.defaultValue === e : void 0, w = x ? S : s, T = x ? C : l;
|
|
2363
|
+
return /* @__PURE__ */ Y("label", {
|
|
2327
2364
|
htmlFor: v,
|
|
2328
2365
|
"data-test-id": p,
|
|
2329
|
-
className:
|
|
2330
|
-
children: [/* @__PURE__ */
|
|
2366
|
+
className: Z("inline-flex items-start gap-2.5", b ? "cursor-not-allowed opacity-60" : "cursor-pointer", f),
|
|
2367
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
2331
2368
|
className: "relative inline-flex shrink-0 items-center justify-center mt-0.5",
|
|
2332
|
-
children: [/* @__PURE__ */
|
|
2369
|
+
children: [/* @__PURE__ */ J("input", {
|
|
2333
2370
|
ref: h,
|
|
2334
2371
|
id: v,
|
|
2335
2372
|
type: "radio",
|
|
@@ -2344,37 +2381,37 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2344
2381
|
className: "peer sr-only",
|
|
2345
2382
|
"aria-invalid": i || void 0,
|
|
2346
2383
|
...m
|
|
2347
|
-
}), /* @__PURE__ */
|
|
2348
|
-
className:
|
|
2349
|
-
children: /* @__PURE__ */
|
|
2384
|
+
}), /* @__PURE__ */ J("span", {
|
|
2385
|
+
className: Z("flex items-center justify-center rounded-full border bg-bg-default transition-colors", Ln[y], i ? "border-red-600" : "border-border-strong", !b && !i && "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"),
|
|
2386
|
+
children: /* @__PURE__ */ J("span", { className: Z("rounded-full bg-brand-500 transition-opacity", Rn[y], b && "!bg-fg-disabled") })
|
|
2350
2387
|
})]
|
|
2351
|
-
}), (n || r) && /* @__PURE__ */
|
|
2388
|
+
}), (n || r) && /* @__PURE__ */ Y("span", {
|
|
2352
2389
|
className: "flex flex-col gap-0.5",
|
|
2353
|
-
children: [n && /* @__PURE__ */
|
|
2390
|
+
children: [n && /* @__PURE__ */ J("span", {
|
|
2354
2391
|
className: "text-p-std font-medium text-fg-default leading-tight",
|
|
2355
2392
|
children: n
|
|
2356
|
-
}), r && /* @__PURE__ */
|
|
2393
|
+
}), r && /* @__PURE__ */ J("span", {
|
|
2357
2394
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
2358
2395
|
children: r
|
|
2359
2396
|
})]
|
|
2360
2397
|
})]
|
|
2361
2398
|
});
|
|
2362
|
-
}),
|
|
2399
|
+
}), Bn = 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) {
|
|
2363
2400
|
let [h, g] = m(a), _ = o !== void 0, v = _ ? o : h, y = u(), b = () => {
|
|
2364
2401
|
let e = !v;
|
|
2365
2402
|
_ || g(e), s?.(e);
|
|
2366
2403
|
};
|
|
2367
|
-
return /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ Y("div", {
|
|
2368
2405
|
ref: p,
|
|
2369
2406
|
"data-test-id": d,
|
|
2370
|
-
className:
|
|
2407
|
+
className: Z("flex flex-col gap-1", l),
|
|
2371
2408
|
...f,
|
|
2372
|
-
children: [/* @__PURE__ */
|
|
2409
|
+
children: [/* @__PURE__ */ J($t, {
|
|
2373
2410
|
id: y,
|
|
2374
2411
|
clamp: v ? void 0 : t,
|
|
2375
2412
|
...c,
|
|
2376
2413
|
children: v ? e : n ?? e
|
|
2377
|
-
}), /* @__PURE__ */
|
|
2414
|
+
}), /* @__PURE__ */ J("button", {
|
|
2378
2415
|
type: "button",
|
|
2379
2416
|
onClick: (e) => {
|
|
2380
2417
|
e.stopPropagation(), b();
|
|
@@ -2385,104 +2422,178 @@ var Tn = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2385
2422
|
children: v ? i : r
|
|
2386
2423
|
})]
|
|
2387
2424
|
});
|
|
2388
|
-
}),
|
|
2425
|
+
}), Vn = {
|
|
2389
2426
|
lg: "h-12 text-p-md px-3.5",
|
|
2390
2427
|
md: "h-10 text-p-std px-3",
|
|
2391
2428
|
sm: "h-8 text-p-sm px-2.5"
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2429
|
+
};
|
|
2430
|
+
function Hn(e) {
|
|
2431
|
+
return e.findIndex((e) => !e.disabled);
|
|
2432
|
+
}
|
|
2433
|
+
var Un = a(function({ options: e, value: n, defaultValue: r, onChange: i, placeholder: a = "Select…", label: o, labelAddons: s, helperText: c, errorText: d, error: h = !1, required: g = !1, loading: _ = !1, searchable: v = !1, searchPlaceholder: y = "Search…", emptyText: x = "No results", size: C = "md", disabled: w, id: T, className: E, wrapperClassName: D, dataTestId: O }, k) {
|
|
2434
|
+
let A = u(), j = T ?? A, N = `${j}-listbox`, [P, F] = m(!1), [I, L] = m(r), R = n !== void 0, z = R ? n : I, B = p(null), V = p(null), te = p(null), [H, U] = m(-1), [ne, re] = m(""), W = h || !!d, G = d ? `${j}-error` : c ? `${j}-help` : void 0, ie = e.find((e) => e.value === z), K = f(() => {
|
|
2435
|
+
let t = v ? ne.trim().toLowerCase() : "";
|
|
2436
|
+
return t ? e.filter((e) => (e.searchText ?? (typeof e.label == "string" ? e.label : void 0) ?? e.value).toLowerCase().includes(t)) : e;
|
|
2437
|
+
}, [
|
|
2438
|
+
e,
|
|
2439
|
+
ne,
|
|
2440
|
+
v
|
|
2441
|
+
]), q = (e) => {
|
|
2442
|
+
R || L(e), i?.(e), F(!1), v && V.current?.focus();
|
|
2395
2443
|
};
|
|
2396
|
-
|
|
2397
|
-
if (!
|
|
2444
|
+
l(() => {
|
|
2445
|
+
if (!P) return;
|
|
2398
2446
|
let e = (e) => {
|
|
2399
|
-
|
|
2447
|
+
B.current?.contains(e.target) || F(!1);
|
|
2400
2448
|
};
|
|
2401
2449
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2402
|
-
}, [
|
|
2403
|
-
if (
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
}
|
|
2450
|
+
}, [P]), l(() => {
|
|
2451
|
+
if (!P) {
|
|
2452
|
+
U(-1), re("");
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
let e = K.findIndex((e) => e.value === z);
|
|
2456
|
+
U(e >= 0 && !K[e]?.disabled ? e : Hn(K));
|
|
2407
2457
|
}, [
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
]),
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2458
|
+
P,
|
|
2459
|
+
z,
|
|
2460
|
+
K
|
|
2461
|
+
]), l(() => {
|
|
2462
|
+
P && v && te.current?.focus();
|
|
2463
|
+
}, [P, v]), l(() => {
|
|
2464
|
+
_ && F(!1);
|
|
2465
|
+
}, [_]);
|
|
2466
|
+
let X = (e) => {
|
|
2467
|
+
let t = K.length;
|
|
2468
|
+
if (t === 0) return;
|
|
2469
|
+
let n = H < 0 ? e === 1 ? -1 : 0 : H;
|
|
2470
|
+
for (let r = 0; r < t && (n = (n + e + t) % t, K[n]?.disabled); r++);
|
|
2471
|
+
U(n);
|
|
2472
|
+
}, ae = () => {
|
|
2473
|
+
let e = K[H];
|
|
2474
|
+
e && !e.disabled && q(e.value);
|
|
2475
|
+
};
|
|
2476
|
+
return /* @__PURE__ */ Y("div", {
|
|
2477
|
+
ref: B,
|
|
2478
|
+
"data-test-id": O,
|
|
2479
|
+
className: Z("flex flex-col gap-1.5 w-full relative", D),
|
|
2415
2480
|
children: [
|
|
2416
|
-
(
|
|
2481
|
+
(o || s) && /* @__PURE__ */ Y("div", {
|
|
2417
2482
|
className: "flex items-center gap-1.5",
|
|
2418
|
-
children: [
|
|
2419
|
-
htmlFor:
|
|
2420
|
-
className: "text-p-std font-medium text-fg-default inline-flex",
|
|
2421
|
-
children:
|
|
2422
|
-
|
|
2483
|
+
children: [o && /* @__PURE__ */ Y("label", {
|
|
2484
|
+
htmlFor: j,
|
|
2485
|
+
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
2486
|
+
children: [o, g && /* @__PURE__ */ J("span", {
|
|
2487
|
+
className: "text-red-600",
|
|
2488
|
+
"aria-hidden": !0,
|
|
2489
|
+
children: "*"
|
|
2490
|
+
})]
|
|
2491
|
+
}), s && /* @__PURE__ */ J("span", {
|
|
2423
2492
|
className: "inline-flex items-center gap-1",
|
|
2424
|
-
children:
|
|
2493
|
+
children: s
|
|
2425
2494
|
})]
|
|
2426
2495
|
}),
|
|
2427
|
-
/* @__PURE__ */
|
|
2428
|
-
ref:
|
|
2429
|
-
id:
|
|
2496
|
+
/* @__PURE__ */ Y("button", {
|
|
2497
|
+
ref: $e(k, V),
|
|
2498
|
+
id: j,
|
|
2430
2499
|
type: "button",
|
|
2431
|
-
disabled:
|
|
2432
|
-
onClick: () =>
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2500
|
+
disabled: w,
|
|
2501
|
+
onClick: () => {
|
|
2502
|
+
w || _ || F((e) => !e);
|
|
2503
|
+
},
|
|
2504
|
+
onKeyDown: (e) => {
|
|
2505
|
+
if (!(w || _)) if (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === " ") {
|
|
2506
|
+
if (e.preventDefault(), !P) {
|
|
2507
|
+
F(!0);
|
|
2437
2508
|
return;
|
|
2438
2509
|
}
|
|
2439
|
-
if (
|
|
2440
|
-
|
|
2441
|
-
t && !t.disabled && I(t.value);
|
|
2510
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2511
|
+
ae();
|
|
2442
2512
|
return;
|
|
2443
2513
|
}
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
N(r);
|
|
2447
|
-
} else t.key === "Escape" && E(!1);
|
|
2514
|
+
X(e.key === "ArrowDown" ? 1 : -1);
|
|
2515
|
+
} else e.key === "Escape" && F(!1);
|
|
2448
2516
|
},
|
|
2449
2517
|
"aria-haspopup": "listbox",
|
|
2450
|
-
"aria-expanded":
|
|
2451
|
-
"aria-invalid":
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2518
|
+
"aria-expanded": P,
|
|
2519
|
+
"aria-invalid": W || void 0,
|
|
2520
|
+
"aria-required": g || void 0,
|
|
2521
|
+
"aria-busy": _ || void 0,
|
|
2522
|
+
"aria-disabled": _ || void 0,
|
|
2523
|
+
"aria-describedby": G,
|
|
2524
|
+
"aria-controls": P && K.length > 0 ? N : void 0,
|
|
2525
|
+
className: Z("inline-flex items-center justify-between w-full rounded-lg border bg-bg-default transition-colors outline-none", "text-left", W ? "border-red-600" : "border-border-default", !w && !W && "hover:border-border-strong", "focus-visible:ring-2", W ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", _ && "cursor-wait", Vn[C], E),
|
|
2526
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2527
|
+
className: Z("truncate", !ie && "text-fg-tertiary"),
|
|
2528
|
+
children: ie ? ie.label : a
|
|
2529
|
+
}), _ ? /* @__PURE__ */ J(M, {
|
|
2530
|
+
className: "h-4 w-4 ml-2 shrink-0 text-fg-secondary animate-spin",
|
|
2531
|
+
"aria-hidden": !0
|
|
2532
|
+
}) : /* @__PURE__ */ J(S, {
|
|
2533
|
+
className: Z("h-4 w-4 ml-2 shrink-0 text-fg-secondary transition-transform", P && "rotate-180"),
|
|
2458
2534
|
"aria-hidden": !0
|
|
2459
2535
|
})]
|
|
2460
2536
|
}),
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2537
|
+
P && /* @__PURE__ */ Y("div", {
|
|
2538
|
+
className: "absolute left-0 right-0 top-full mt-1 rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 overflow-hidden",
|
|
2539
|
+
children: [v && /* @__PURE__ */ Y("div", {
|
|
2540
|
+
className: "flex items-center gap-2 px-3 py-2 border-b border-border-default",
|
|
2541
|
+
children: [/* @__PURE__ */ J(ee, {
|
|
2542
|
+
className: "h-3.5 w-3.5 shrink-0 text-fg-tertiary",
|
|
2543
|
+
"aria-hidden": !0
|
|
2544
|
+
}), /* @__PURE__ */ J("input", {
|
|
2545
|
+
ref: te,
|
|
2546
|
+
type: "text",
|
|
2547
|
+
role: "combobox",
|
|
2548
|
+
"aria-expanded": !0,
|
|
2549
|
+
"aria-controls": K.length > 0 ? N : void 0,
|
|
2550
|
+
"aria-autocomplete": "list",
|
|
2551
|
+
"aria-activedescendant": H >= 0 ? `${N}-opt-${H}` : void 0,
|
|
2552
|
+
value: ne,
|
|
2553
|
+
onChange: (e) => re(e.target.value),
|
|
2554
|
+
onKeyDown: (e) => {
|
|
2555
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), X(e.key === "ArrowDown" ? 1 : -1)) : e.key === "Enter" ? (e.preventDefault(), ae()) : e.key === "Escape" ? (e.preventDefault(), F(!1), V.current?.focus()) : e.key === "Tab" && (V.current?.focus(), F(!1));
|
|
2556
|
+
},
|
|
2557
|
+
placeholder: y,
|
|
2558
|
+
className: "w-full bg-transparent outline-none text-p-std text-fg-default placeholder:text-fg-tertiary"
|
|
2559
|
+
})]
|
|
2560
|
+
}), K.length === 0 ? /* @__PURE__ */ J("p", {
|
|
2561
|
+
className: "px-3 py-6 text-center text-p-sm text-fg-secondary",
|
|
2562
|
+
children: x
|
|
2563
|
+
}) : /* @__PURE__ */ J("ul", {
|
|
2564
|
+
id: N,
|
|
2565
|
+
role: "listbox",
|
|
2566
|
+
className: "max-h-60 overflow-y-auto py-1",
|
|
2567
|
+
children: K.map((e, n) => {
|
|
2568
|
+
let r = e.value === z, i = n === H;
|
|
2569
|
+
return /* @__PURE__ */ Y(t, { children: [!!e.group && e.group !== K[n - 1]?.group && /* @__PURE__ */ J("li", {
|
|
2570
|
+
role: "presentation",
|
|
2571
|
+
className: "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
|
|
2572
|
+
children: e.group
|
|
2573
|
+
}), /* @__PURE__ */ Y("li", {
|
|
2574
|
+
id: `${N}-opt-${n}`,
|
|
2575
|
+
role: "option",
|
|
2576
|
+
"aria-selected": r,
|
|
2577
|
+
"aria-disabled": e.disabled || void 0,
|
|
2578
|
+
onMouseEnter: () => !e.disabled && U(n),
|
|
2579
|
+
onClick: () => !e.disabled && q(e.value),
|
|
2580
|
+
className: Z("flex items-center justify-between gap-2 px-3 py-2 text-p-std cursor-pointer select-none", e.disabled && "opacity-50 cursor-not-allowed", i && !e.disabled && "bg-bg-subtle", r && "font-medium"),
|
|
2581
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2582
|
+
className: "truncate",
|
|
2583
|
+
children: e.label
|
|
2584
|
+
}), r && /* @__PURE__ */ J(b, { className: "h-4 w-4 text-brand-500 shrink-0" })]
|
|
2585
|
+
})] }, e.value);
|
|
2586
|
+
})
|
|
2587
|
+
})]
|
|
2479
2588
|
}),
|
|
2480
|
-
|
|
2589
|
+
d ? /* @__PURE__ */ J("p", {
|
|
2590
|
+
id: `${j}-error`,
|
|
2481
2591
|
className: "text-p-sm text-red-700",
|
|
2482
|
-
children:
|
|
2483
|
-
}) :
|
|
2592
|
+
children: d
|
|
2593
|
+
}) : c ? /* @__PURE__ */ J("p", {
|
|
2594
|
+
id: `${j}-help`,
|
|
2484
2595
|
className: "text-p-sm text-fg-secondary",
|
|
2485
|
-
children:
|
|
2596
|
+
children: c
|
|
2486
2597
|
}) : null
|
|
2487
2598
|
]
|
|
2488
2599
|
});
|
|
@@ -2498,68 +2609,68 @@ var Kn = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
2498
2609
|
let e = !h;
|
|
2499
2610
|
p || f(e), n?.(e);
|
|
2500
2611
|
};
|
|
2501
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ J(Wn.Provider, {
|
|
2502
2613
|
value: {
|
|
2503
2614
|
collapsed: h,
|
|
2504
2615
|
toggle: g
|
|
2505
2616
|
},
|
|
2506
|
-
children: /* @__PURE__ */
|
|
2617
|
+
children: /* @__PURE__ */ Y("aside", {
|
|
2507
2618
|
ref: u,
|
|
2508
2619
|
"data-test-id": c,
|
|
2509
|
-
className:
|
|
2620
|
+
className: Z("flex flex-col bg-bg-default border-r border-border-default transition-all duration-200", h ? "w-16" : "w-64", i),
|
|
2510
2621
|
...l,
|
|
2511
|
-
children: [/* @__PURE__ */
|
|
2512
|
-
className:
|
|
2622
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
2623
|
+
className: Z("flex items-center gap-3 px-4 py-4 border-b border-border-default", h && "justify-center px-2"),
|
|
2513
2624
|
children: [
|
|
2514
|
-
a && /* @__PURE__ */
|
|
2625
|
+
a && /* @__PURE__ */ J("div", {
|
|
2515
2626
|
className: "shrink-0",
|
|
2516
2627
|
children: a
|
|
2517
2628
|
}),
|
|
2518
|
-
!h && /* @__PURE__ */
|
|
2629
|
+
!h && /* @__PURE__ */ Y("div", {
|
|
2519
2630
|
className: "flex flex-col min-w-0",
|
|
2520
|
-
children: [o && /* @__PURE__ */
|
|
2631
|
+
children: [o && /* @__PURE__ */ J("div", {
|
|
2521
2632
|
className: "text-p-md font-semibold text-fg-default truncate",
|
|
2522
2633
|
children: o
|
|
2523
|
-
}), s && /* @__PURE__ */
|
|
2634
|
+
}), s && /* @__PURE__ */ J("div", {
|
|
2524
2635
|
className: "text-p-sm text-fg-secondary truncate",
|
|
2525
2636
|
children: s
|
|
2526
2637
|
})]
|
|
2527
2638
|
}),
|
|
2528
|
-
/* @__PURE__ */
|
|
2639
|
+
/* @__PURE__ */ J("button", {
|
|
2529
2640
|
type: "button",
|
|
2530
2641
|
onClick: g,
|
|
2531
2642
|
"aria-label": h ? "Expand sidebar" : "Collapse sidebar",
|
|
2532
|
-
className:
|
|
2533
|
-
children: /* @__PURE__ */
|
|
2643
|
+
className: Z("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"),
|
|
2644
|
+
children: /* @__PURE__ */ J(N, { className: "h-4 w-4" })
|
|
2534
2645
|
})
|
|
2535
2646
|
]
|
|
2536
|
-
}), /* @__PURE__ */
|
|
2647
|
+
}), /* @__PURE__ */ J("nav", {
|
|
2537
2648
|
className: "flex-1 overflow-y-auto p-2 flex flex-col gap-0.5",
|
|
2538
2649
|
children: r
|
|
2539
2650
|
})]
|
|
2540
2651
|
})
|
|
2541
2652
|
});
|
|
2542
2653
|
}), qn = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
2543
|
-
let { collapsed: d } = Gn(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */
|
|
2654
|
+
let { collapsed: d } = Gn(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ Y(q, { children: [e && /* @__PURE__ */ J("span", {
|
|
2544
2655
|
className: "inline-flex shrink-0",
|
|
2545
2656
|
children: e
|
|
2546
|
-
}), !d && /* @__PURE__ */
|
|
2547
|
-
/* @__PURE__ */
|
|
2657
|
+
}), !d && /* @__PURE__ */ Y(q, { children: [
|
|
2658
|
+
/* @__PURE__ */ J("span", {
|
|
2548
2659
|
className: "flex-1 truncate text-left",
|
|
2549
2660
|
children: t
|
|
2550
2661
|
}),
|
|
2551
|
-
r && /* @__PURE__ */
|
|
2662
|
+
r && /* @__PURE__ */ J("span", {
|
|
2552
2663
|
className: "shrink-0",
|
|
2553
2664
|
children: r
|
|
2554
2665
|
}),
|
|
2555
|
-
h && /* @__PURE__ */
|
|
2556
|
-
className:
|
|
2666
|
+
h && /* @__PURE__ */ J(w, {
|
|
2667
|
+
className: Z("h-4 w-4 shrink-0 text-fg-tertiary transition-transform", f && "rotate-90"),
|
|
2557
2668
|
"aria-hidden": !0
|
|
2558
2669
|
})
|
|
2559
2670
|
] })] }), _ = () => {
|
|
2560
2671
|
h && p((e) => !e), a?.();
|
|
2561
|
-
}, v =
|
|
2562
|
-
return /* @__PURE__ */
|
|
2672
|
+
}, v = Z("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);
|
|
2673
|
+
return /* @__PURE__ */ Y(q, { children: [o ? /* @__PURE__ */ J("a", {
|
|
2563
2674
|
ref: u,
|
|
2564
2675
|
href: o,
|
|
2565
2676
|
onClick: _,
|
|
@@ -2567,15 +2678,15 @@ var Kn = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
2567
2678
|
className: v,
|
|
2568
2679
|
...l,
|
|
2569
2680
|
children: g
|
|
2570
|
-
}) : /* @__PURE__ */
|
|
2681
|
+
}) : /* @__PURE__ */ J("button", {
|
|
2571
2682
|
ref: u,
|
|
2572
2683
|
type: "button",
|
|
2573
2684
|
onClick: _,
|
|
2574
2685
|
"data-test-id": c,
|
|
2575
|
-
className:
|
|
2686
|
+
className: Z(v, "w-full"),
|
|
2576
2687
|
...l,
|
|
2577
2688
|
children: g
|
|
2578
|
-
}), h && f && !d && /* @__PURE__ */
|
|
2689
|
+
}), h && f && !d && /* @__PURE__ */ J("div", {
|
|
2579
2690
|
className: "flex flex-col gap-0.5 pl-8",
|
|
2580
2691
|
children: i
|
|
2581
2692
|
})] });
|
|
@@ -2602,32 +2713,32 @@ var Zn = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
2602
2713
|
...n === void 0 ? null : { width: Xn(n) },
|
|
2603
2714
|
...r === void 0 ? null : { height: Xn(r) },
|
|
2604
2715
|
...o
|
|
2605
|
-
}, m =
|
|
2606
|
-
return d ? /* @__PURE__ */
|
|
2716
|
+
}, m = Z("block bg-bg-subtle leading-none", Jn[e], Yn[t]);
|
|
2717
|
+
return d ? /* @__PURE__ */ J("span", {
|
|
2607
2718
|
ref: u,
|
|
2608
2719
|
"data-test-id": c,
|
|
2609
|
-
className:
|
|
2720
|
+
className: Z(m, "inline-block h-auto w-auto scale-100", s),
|
|
2610
2721
|
style: p,
|
|
2611
2722
|
...l,
|
|
2612
|
-
children: /* @__PURE__ */
|
|
2723
|
+
children: /* @__PURE__ */ J("span", {
|
|
2613
2724
|
className: "invisible inline-block",
|
|
2614
2725
|
"aria-hidden": !0,
|
|
2615
2726
|
children: a
|
|
2616
2727
|
})
|
|
2617
|
-
}) : f === 1 ? /* @__PURE__ */
|
|
2728
|
+
}) : f === 1 ? /* @__PURE__ */ J("span", {
|
|
2618
2729
|
ref: u,
|
|
2619
2730
|
"data-test-id": c,
|
|
2620
|
-
className:
|
|
2731
|
+
className: Z(m, s),
|
|
2621
2732
|
style: p,
|
|
2622
2733
|
role: "status",
|
|
2623
2734
|
"aria-label": "Loading",
|
|
2624
2735
|
...l
|
|
2625
|
-
}) : /* @__PURE__ */
|
|
2736
|
+
}) : /* @__PURE__ */ J("span", {
|
|
2626
2737
|
ref: u,
|
|
2627
2738
|
"data-test-id": c,
|
|
2628
|
-
className:
|
|
2739
|
+
className: Z("block", s),
|
|
2629
2740
|
...l,
|
|
2630
|
-
children: Array.from({ length: f }, (e, t) => /* @__PURE__ */
|
|
2741
|
+
children: Array.from({ length: f }, (e, t) => /* @__PURE__ */ J("span", {
|
|
2631
2742
|
className: m,
|
|
2632
2743
|
style: p,
|
|
2633
2744
|
"aria-hidden": t !== 0 || void 0,
|
|
@@ -2646,7 +2757,7 @@ var Zn = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
2646
2757
|
},
|
|
2647
2758
|
danger: {
|
|
2648
2759
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
2649
|
-
icon:
|
|
2760
|
+
icon: G
|
|
2650
2761
|
},
|
|
2651
2762
|
info: {
|
|
2652
2763
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
@@ -2691,30 +2802,30 @@ function nr({ children: e, dataTestId: t }) {
|
|
|
2691
2802
|
return () => {
|
|
2692
2803
|
e.forEach(clearTimeout), e.clear();
|
|
2693
2804
|
};
|
|
2694
|
-
}, []), /* @__PURE__ */
|
|
2805
|
+
}, []), /* @__PURE__ */ Y(er.Provider, {
|
|
2695
2806
|
value: {
|
|
2696
2807
|
show: o,
|
|
2697
2808
|
dismiss: a
|
|
2698
2809
|
},
|
|
2699
|
-
children: [e,
|
|
2810
|
+
children: [e, X(/* @__PURE__ */ J("div", {
|
|
2700
2811
|
"data-test-id": t,
|
|
2701
2812
|
className: "fixed left-1/2 -translate-x-1/2 bottom-6 z-[100] flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
2702
2813
|
children: n.map((e) => {
|
|
2703
2814
|
let { container: t, icon: n } = Qn[e.variant ?? "neutral"];
|
|
2704
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ Y("div", {
|
|
2705
2816
|
role: "status",
|
|
2706
2817
|
"data-test-id": e.dataTestId,
|
|
2707
|
-
className:
|
|
2818
|
+
className: Z("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
2708
2819
|
children: [
|
|
2709
|
-
/* @__PURE__ */
|
|
2710
|
-
className:
|
|
2820
|
+
/* @__PURE__ */ J(n, {
|
|
2821
|
+
className: Z("h-5 w-5 shrink-0", $n[e.variant ?? "neutral"]),
|
|
2711
2822
|
"aria-hidden": !0
|
|
2712
2823
|
}),
|
|
2713
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ J("p", {
|
|
2714
2825
|
className: "flex-1 text-p-std",
|
|
2715
2826
|
children: e.message
|
|
2716
2827
|
}),
|
|
2717
|
-
e.action && /* @__PURE__ */
|
|
2828
|
+
e.action && /* @__PURE__ */ J("button", {
|
|
2718
2829
|
type: "button",
|
|
2719
2830
|
onClick: () => {
|
|
2720
2831
|
e.action?.onClick(), a(e.id);
|
|
@@ -2722,12 +2833,12 @@ function nr({ children: e, dataTestId: t }) {
|
|
|
2722
2833
|
className: "text-p-std font-semibold text-brand-400 hover:text-brand-300 px-1",
|
|
2723
2834
|
children: e.action.label
|
|
2724
2835
|
}),
|
|
2725
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ J("button", {
|
|
2726
2837
|
type: "button",
|
|
2727
2838
|
onClick: () => a(e.id),
|
|
2728
2839
|
"aria-label": "Close",
|
|
2729
2840
|
className: "shrink-0 p-1 rounded-md text-white/70 hover:text-white hover:bg-white/10",
|
|
2730
|
-
children: /* @__PURE__ */ W
|
|
2841
|
+
children: /* @__PURE__ */ J(W, { className: "h-4 w-4" })
|
|
2731
2842
|
})
|
|
2732
2843
|
]
|
|
2733
2844
|
}, e.id);
|
|
@@ -2780,21 +2891,21 @@ var rr = {
|
|
|
2780
2891
|
}
|
|
2781
2892
|
}, or = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
2782
2893
|
let { container: u, dot: d } = ar[e];
|
|
2783
|
-
return /* @__PURE__ */
|
|
2894
|
+
return /* @__PURE__ */ Y("span", {
|
|
2784
2895
|
ref: l,
|
|
2785
2896
|
"data-test-id": s,
|
|
2786
|
-
className:
|
|
2897
|
+
className: Z("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", rr[t], u, a),
|
|
2787
2898
|
...c,
|
|
2788
2899
|
children: [
|
|
2789
|
-
n ? /* @__PURE__ */
|
|
2900
|
+
n ? /* @__PURE__ */ J("span", {
|
|
2790
2901
|
className: "inline-flex shrink-0",
|
|
2791
2902
|
children: n
|
|
2792
|
-
}) : i ? /* @__PURE__ */
|
|
2793
|
-
className:
|
|
2903
|
+
}) : i ? /* @__PURE__ */ J("span", {
|
|
2904
|
+
className: Z("inline-block shrink-0 rounded-full", ir[t], d),
|
|
2794
2905
|
"aria-hidden": !0
|
|
2795
2906
|
}) : null,
|
|
2796
2907
|
o,
|
|
2797
|
-
r && /* @__PURE__ */
|
|
2908
|
+
r && /* @__PURE__ */ J("span", {
|
|
2798
2909
|
className: "inline-flex shrink-0",
|
|
2799
2910
|
children: r
|
|
2800
2911
|
})
|
|
@@ -2836,44 +2947,44 @@ var rr = {
|
|
|
2836
2947
|
rejected: "ring-4 ring-red-100/80"
|
|
2837
2948
|
};
|
|
2838
2949
|
function _r(e, t, n, r) {
|
|
2839
|
-
return t === "completed" ? /* @__PURE__ */
|
|
2950
|
+
return t === "completed" ? /* @__PURE__ */ J(E, { className: dr[r] }) : t === "rejected" ? /* @__PURE__ */ J(D, { className: dr[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ J("span", { className: Z("rounded-full", fr[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
2840
2951
|
}
|
|
2841
2952
|
var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
2842
2953
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
2843
|
-
return /* @__PURE__ */
|
|
2954
|
+
return /* @__PURE__ */ J("ol", {
|
|
2844
2955
|
ref: l,
|
|
2845
2956
|
"data-test-id": s,
|
|
2846
|
-
className:
|
|
2957
|
+
className: Z("flex", u ? "flex-col" : "w-full items-start", o),
|
|
2847
2958
|
...c,
|
|
2848
2959
|
children: e.map((i, o) => {
|
|
2849
|
-
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__ */
|
|
2850
|
-
className:
|
|
2960
|
+
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__ */ J("span", {
|
|
2961
|
+
className: Z("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", sr[a], lr[a], ur[a], hr[s], i.highlighted && gr[s]),
|
|
2851
2962
|
children: _r(r, s, o, a)
|
|
2852
|
-
}), h = /* @__PURE__ */
|
|
2853
|
-
className:
|
|
2854
|
-
children: [/* @__PURE__ */
|
|
2855
|
-
className:
|
|
2963
|
+
}), h = /* @__PURE__ */ Y("div", {
|
|
2964
|
+
className: Z("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
2965
|
+
children: [/* @__PURE__ */ J("span", {
|
|
2966
|
+
className: Z("font-medium text-fg-default", pr[a]),
|
|
2856
2967
|
children: i.label
|
|
2857
|
-
}), i.description && /* @__PURE__ */
|
|
2858
|
-
className:
|
|
2968
|
+
}), i.description && /* @__PURE__ */ J("span", {
|
|
2969
|
+
className: Z("text-fg-secondary", mr[a]),
|
|
2859
2970
|
children: i.description
|
|
2860
2971
|
})]
|
|
2861
2972
|
});
|
|
2862
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ Y("li", {
|
|
2863
2974
|
"aria-current": i.value === t ? "step" : void 0,
|
|
2864
|
-
className:
|
|
2865
|
-
children: [/* @__PURE__ */
|
|
2866
|
-
className:
|
|
2975
|
+
className: Z("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
2976
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
2977
|
+
className: Z("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : Z("w-full items-center justify-center", cr[a])),
|
|
2867
2978
|
children: [
|
|
2868
|
-
!c && /* @__PURE__ */
|
|
2979
|
+
!c && /* @__PURE__ */ J("span", {
|
|
2869
2980
|
"aria-hidden": !0,
|
|
2870
|
-
className:
|
|
2981
|
+
className: Z("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")
|
|
2871
2982
|
}),
|
|
2872
|
-
!l && /* @__PURE__ */
|
|
2983
|
+
!l && /* @__PURE__ */ J("span", {
|
|
2873
2984
|
"aria-hidden": !0,
|
|
2874
|
-
className:
|
|
2985
|
+
className: Z("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")
|
|
2875
2986
|
}),
|
|
2876
|
-
n ? /* @__PURE__ */
|
|
2987
|
+
n ? /* @__PURE__ */ J("button", {
|
|
2877
2988
|
type: "button",
|
|
2878
2989
|
onClick: () => n(i.value),
|
|
2879
2990
|
"aria-label": typeof i.label == "string" ? i.label : void 0,
|
|
@@ -2892,10 +3003,10 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2892
3003
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
2893
3004
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
2894
3005
|
}, xr = 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) {
|
|
2895
|
-
let p = u(), m = i ?? p, h = /* @__PURE__ */
|
|
3006
|
+
let p = u(), m = i ?? p, h = /* @__PURE__ */ Y("span", {
|
|
2896
3007
|
className: "relative inline-flex shrink-0",
|
|
2897
3008
|
children: [
|
|
2898
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ J("input", {
|
|
2899
3010
|
ref: f,
|
|
2900
3011
|
id: m,
|
|
2901
3012
|
type: "checkbox",
|
|
@@ -2906,25 +3017,25 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2906
3017
|
className: "peer sr-only",
|
|
2907
3018
|
...d
|
|
2908
3019
|
}),
|
|
2909
|
-
/* @__PURE__ */
|
|
2910
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ J("span", { className: Z("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", yr[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") }),
|
|
3021
|
+
/* @__PURE__ */ J("span", { className: Z("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", br[e]) })
|
|
2911
3022
|
]
|
|
2912
3023
|
});
|
|
2913
|
-
return !t && !n ? /* @__PURE__ */
|
|
3024
|
+
return !t && !n ? /* @__PURE__ */ J("label", {
|
|
2914
3025
|
htmlFor: m,
|
|
2915
3026
|
"data-test-id": l,
|
|
2916
|
-
className:
|
|
3027
|
+
className: Z("inline-flex", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
|
|
2917
3028
|
children: h
|
|
2918
|
-
}) : /* @__PURE__ */
|
|
3029
|
+
}) : /* @__PURE__ */ Y("label", {
|
|
2919
3030
|
htmlFor: m,
|
|
2920
3031
|
"data-test-id": l,
|
|
2921
|
-
className:
|
|
2922
|
-
children: [h, /* @__PURE__ */
|
|
3032
|
+
className: Z("inline-flex items-start gap-3", r === "left" && "flex-row-reverse justify-end", a ? "cursor-not-allowed opacity-60" : "cursor-pointer", c),
|
|
3033
|
+
children: [h, /* @__PURE__ */ Y("span", {
|
|
2923
3034
|
className: "flex flex-col gap-0.5",
|
|
2924
|
-
children: [t && /* @__PURE__ */
|
|
3035
|
+
children: [t && /* @__PURE__ */ J("span", {
|
|
2925
3036
|
className: "text-p-std font-medium text-fg-default leading-tight",
|
|
2926
3037
|
children: t
|
|
2927
|
-
}), n && /* @__PURE__ */
|
|
3038
|
+
}), n && /* @__PURE__ */ J("span", {
|
|
2928
3039
|
className: "text-p-sm text-fg-secondary leading-snug",
|
|
2929
3040
|
children: n
|
|
2930
3041
|
})]
|
|
@@ -2938,12 +3049,12 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2938
3049
|
center: "text-center",
|
|
2939
3050
|
right: "text-right"
|
|
2940
3051
|
}, wr = a(function({ density: e = "comfortable", striped: t = !1, hoverable: n = !0, stickyHeader: r = !1, wrapperClassName: i, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
2941
|
-
return /* @__PURE__ */
|
|
3052
|
+
return /* @__PURE__ */ J("div", {
|
|
2942
3053
|
"data-test-id": s,
|
|
2943
|
-
className:
|
|
2944
|
-
children: /* @__PURE__ */
|
|
3054
|
+
className: Z("w-full overflow-x-auto rounded-lg border border-border-default bg-bg-default", i),
|
|
3055
|
+
children: /* @__PURE__ */ J("table", {
|
|
2945
3056
|
ref: l,
|
|
2946
|
-
className:
|
|
3057
|
+
className: Z("w-full border-collapse text-p-std text-fg-default", Sr[e], a),
|
|
2947
3058
|
"data-striped": t || void 0,
|
|
2948
3059
|
"data-hoverable": n || void 0,
|
|
2949
3060
|
"data-sticky": r || void 0,
|
|
@@ -2952,23 +3063,23 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2952
3063
|
})
|
|
2953
3064
|
});
|
|
2954
3065
|
}), Tr = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
2955
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ J("thead", {
|
|
2956
3067
|
ref: i,
|
|
2957
3068
|
"data-test-id": n,
|
|
2958
|
-
className:
|
|
3069
|
+
className: Z("bg-bg-container text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", "[[data-sticky]_&]:sticky [[data-sticky]_&]:top-0 [[data-sticky]_&]:z-10", e),
|
|
2959
3070
|
...r,
|
|
2960
3071
|
children: t
|
|
2961
3072
|
});
|
|
2962
3073
|
}), Er = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
2963
|
-
return /* @__PURE__ */
|
|
3074
|
+
return /* @__PURE__ */ J("tbody", {
|
|
2964
3075
|
ref: i,
|
|
2965
3076
|
"data-test-id": n,
|
|
2966
|
-
className:
|
|
3077
|
+
className: Z("[&>tr]:border-t [&>tr]:border-border-default", "[[data-striped]_&>tr:nth-child(even)]:bg-bg-container", "[[data-hoverable]_&>tr:hover]:bg-bg-container", e),
|
|
2967
3078
|
...r,
|
|
2968
3079
|
children: t
|
|
2969
3080
|
});
|
|
2970
3081
|
}), Dr = a(function({ className: e, children: t, dataTestId: n, ...r }, i) {
|
|
2971
|
-
return /* @__PURE__ */
|
|
3082
|
+
return /* @__PURE__ */ J("tr", {
|
|
2972
3083
|
ref: i,
|
|
2973
3084
|
"data-test-id": n,
|
|
2974
3085
|
className: e,
|
|
@@ -2976,18 +3087,18 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2976
3087
|
children: t
|
|
2977
3088
|
});
|
|
2978
3089
|
}), Or = a(function({ sortable: e = !1, sortDir: t = null, onSortChange: n, align: r = "left", className: i, children: a, dataTestId: o, ...s }, c) {
|
|
2979
|
-
let l = /* @__PURE__ */
|
|
3090
|
+
let l = /* @__PURE__ */ Y(q, { children: [a, e && /* @__PURE__ */ J("span", {
|
|
2980
3091
|
className: "inline-flex ml-1 align-middle text-fg-tertiary",
|
|
2981
|
-
children:
|
|
3092
|
+
children: J(t === "asc" ? v : t === "desc" ? _ : T, { className: "h-3.5 w-3.5" })
|
|
2982
3093
|
})] });
|
|
2983
|
-
return /* @__PURE__ */
|
|
3094
|
+
return /* @__PURE__ */ J("th", {
|
|
2984
3095
|
ref: c,
|
|
2985
3096
|
scope: "col",
|
|
2986
3097
|
"data-test-id": o,
|
|
2987
|
-
className:
|
|
3098
|
+
className: Z("px-4 whitespace-nowrap", Cr[r], i),
|
|
2988
3099
|
"aria-sort": t === "asc" ? "ascending" : t === "desc" ? "descending" : void 0,
|
|
2989
3100
|
...s,
|
|
2990
|
-
children: e ? /* @__PURE__ */
|
|
3101
|
+
children: e ? /* @__PURE__ */ J("button", {
|
|
2991
3102
|
type: "button",
|
|
2992
3103
|
onClick: () => {
|
|
2993
3104
|
n?.(t === "asc" ? "desc" : t === "desc" ? null : "asc");
|
|
@@ -2997,36 +3108,36 @@ var vr = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
2997
3108
|
}) : l
|
|
2998
3109
|
});
|
|
2999
3110
|
}), kr = a(function({ align: e = "left", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
3000
|
-
return /* @__PURE__ */
|
|
3111
|
+
return /* @__PURE__ */ J("td", {
|
|
3001
3112
|
ref: a,
|
|
3002
3113
|
"data-test-id": r,
|
|
3003
|
-
className:
|
|
3114
|
+
className: Z("px-4", Cr[e], t),
|
|
3004
3115
|
...i,
|
|
3005
3116
|
children: n
|
|
3006
3117
|
});
|
|
3007
3118
|
});
|
|
3008
3119
|
function Ar({ columns: e, rows: t, rowKey: n, empty: r = "No results", density: i, striped: a, hoverable: o, sortKey: s, sortDir: c = null, onSortChange: l, onRowClick: u, className: d, dataTestId: f }) {
|
|
3009
|
-
return /* @__PURE__ */
|
|
3120
|
+
return /* @__PURE__ */ Y(wr, {
|
|
3010
3121
|
density: i,
|
|
3011
3122
|
striped: a,
|
|
3012
3123
|
hoverable: o,
|
|
3013
3124
|
className: d,
|
|
3014
3125
|
dataTestId: f,
|
|
3015
|
-
children: [/* @__PURE__ */
|
|
3126
|
+
children: [/* @__PURE__ */ J(Tr, { children: /* @__PURE__ */ J(Dr, { children: e.map((e) => /* @__PURE__ */ J(Or, {
|
|
3016
3127
|
align: e.align,
|
|
3017
3128
|
sortable: e.sortable,
|
|
3018
3129
|
sortDir: s === e.key ? c : null,
|
|
3019
3130
|
onSortChange: (t) => l?.(e.key, t),
|
|
3020
3131
|
children: e.header
|
|
3021
|
-
}, e.key)) }) }), /* @__PURE__ */
|
|
3132
|
+
}, e.key)) }) }), /* @__PURE__ */ J(Er, { children: t.length === 0 ? /* @__PURE__ */ J(Dr, { children: /* @__PURE__ */ J(kr, {
|
|
3022
3133
|
colSpan: e.length,
|
|
3023
3134
|
className: "text-center text-fg-tertiary py-10",
|
|
3024
3135
|
align: "center",
|
|
3025
3136
|
children: r
|
|
3026
|
-
}) }) : t.map((t, r) => /* @__PURE__ */
|
|
3137
|
+
}) }) : t.map((t, r) => /* @__PURE__ */ J(Dr, {
|
|
3027
3138
|
onClick: u ? () => u(t) : void 0,
|
|
3028
3139
|
className: u ? "cursor-pointer" : void 0,
|
|
3029
|
-
children: e.map((e) => /* @__PURE__ */
|
|
3140
|
+
children: e.map((e) => /* @__PURE__ */ J(kr, {
|
|
3030
3141
|
align: e.align,
|
|
3031
3142
|
children: e.render ? e.render(t) : e.accessor ? e.accessor(t) : null
|
|
3032
3143
|
}, e.key))
|
|
@@ -3057,7 +3168,7 @@ function Nr(t) {
|
|
|
3057
3168
|
}
|
|
3058
3169
|
var Pr = 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) {
|
|
3059
3170
|
let [f, p] = m(() => e ?? Nr(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
3060
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ J(jr.Provider, {
|
|
3061
3172
|
value: {
|
|
3062
3173
|
value: g,
|
|
3063
3174
|
setValue: (e) => {
|
|
@@ -3068,18 +3179,18 @@ var Pr = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
3068
3179
|
tabsId: _,
|
|
3069
3180
|
disabled: a
|
|
3070
3181
|
},
|
|
3071
|
-
children: /* @__PURE__ */
|
|
3182
|
+
children: /* @__PURE__ */ J("div", {
|
|
3072
3183
|
ref: d,
|
|
3073
3184
|
"data-test-id": c,
|
|
3074
|
-
className:
|
|
3185
|
+
className: Z("flex flex-col gap-4", o),
|
|
3075
3186
|
...l,
|
|
3076
3187
|
children: s
|
|
3077
3188
|
})
|
|
3078
3189
|
});
|
|
3079
3190
|
}), Fr = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
3080
3191
|
let { variant: s } = Mr(), c = p(null);
|
|
3081
|
-
return /* @__PURE__ */
|
|
3082
|
-
ref:
|
|
3192
|
+
return /* @__PURE__ */ J("div", {
|
|
3193
|
+
ref: $e(o, c),
|
|
3083
3194
|
role: "tablist",
|
|
3084
3195
|
onKeyDown: (e) => {
|
|
3085
3196
|
i?.(e);
|
|
@@ -3094,7 +3205,7 @@ var Pr = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
3094
3205
|
}), a.click());
|
|
3095
3206
|
},
|
|
3096
3207
|
"data-test-id": r,
|
|
3097
|
-
className:
|
|
3208
|
+
className: Z("inline-flex", s === "underline" && "border-b border-border-default gap-1 w-full", s === "pills" && "gap-1 p-1 rounded-full bg-bg-container", s === "boxed" && "gap-0 rounded-lg border border-border-default overflow-hidden bg-bg-container", t && Z("overflow-x-auto flex-nowrap scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", "[mask-image:linear-gradient(to_right,transparent,black_16px,black_calc(100%-16px),transparent)]"), n),
|
|
3098
3209
|
...a,
|
|
3099
3210
|
children: e
|
|
3100
3211
|
});
|
|
@@ -3118,7 +3229,7 @@ var Ir = {
|
|
|
3118
3229
|
off: "bg-bg-subtle text-fg-secondary"
|
|
3119
3230
|
}
|
|
3120
3231
|
}, Rr = 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) {
|
|
3121
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = Mr(), x = h === e, S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E =
|
|
3232
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = Mr(), x = h === e, S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Z("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", Ir[v], S && "opacity-50 cursor-not-allowed"), D = _ === "underline" ? Z("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? Z("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : Z("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__ */ Y("button", {
|
|
3122
3233
|
ref: m,
|
|
3123
3234
|
id: w,
|
|
3124
3235
|
type: "button",
|
|
@@ -3131,34 +3242,34 @@ var Ir = {
|
|
|
3131
3242
|
onClick: (t) => {
|
|
3132
3243
|
S || (g(e), d?.(t));
|
|
3133
3244
|
},
|
|
3134
|
-
className:
|
|
3245
|
+
className: Z(E, D, o && "pr-9", l),
|
|
3135
3246
|
...p,
|
|
3136
3247
|
children: [
|
|
3137
|
-
r && /* @__PURE__ */
|
|
3248
|
+
r && /* @__PURE__ */ J("span", {
|
|
3138
3249
|
className: "inline-flex shrink-0",
|
|
3139
3250
|
children: r
|
|
3140
3251
|
}),
|
|
3141
|
-
/* @__PURE__ */
|
|
3252
|
+
/* @__PURE__ */ J("span", {
|
|
3142
3253
|
className: "truncate",
|
|
3143
3254
|
children: t
|
|
3144
3255
|
}),
|
|
3145
|
-
C && (a ? /* @__PURE__ */
|
|
3256
|
+
C && (a ? /* @__PURE__ */ J(Pe, {
|
|
3146
3257
|
size: "xs",
|
|
3147
3258
|
...a,
|
|
3148
3259
|
children: i
|
|
3149
|
-
}) : /* @__PURE__ */
|
|
3150
|
-
className:
|
|
3260
|
+
}) : /* @__PURE__ */ J("span", {
|
|
3261
|
+
className: Z("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 ? Lr[_].on : Lr[_].off),
|
|
3151
3262
|
children: i
|
|
3152
3263
|
})),
|
|
3153
|
-
_ === "underline" && /* @__PURE__ */
|
|
3264
|
+
_ === "underline" && /* @__PURE__ */ J("span", {
|
|
3154
3265
|
"aria-hidden": !0,
|
|
3155
|
-
className:
|
|
3266
|
+
className: Z("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")
|
|
3156
3267
|
})
|
|
3157
3268
|
]
|
|
3158
3269
|
});
|
|
3159
|
-
return o ? /* @__PURE__ */
|
|
3270
|
+
return o ? /* @__PURE__ */ Y("span", {
|
|
3160
3271
|
className: "relative inline-flex",
|
|
3161
|
-
children: [O, /* @__PURE__ */
|
|
3272
|
+
children: [O, /* @__PURE__ */ J("button", {
|
|
3162
3273
|
type: "button",
|
|
3163
3274
|
"aria-label": c,
|
|
3164
3275
|
disabled: S,
|
|
@@ -3171,7 +3282,7 @@ var Ir = {
|
|
|
3171
3282
|
}) : O;
|
|
3172
3283
|
}), zr = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
3173
3284
|
let { value: c, tabsId: l } = Mr(), u = c === e;
|
|
3174
|
-
return !u && !a ? null : /* @__PURE__ */
|
|
3285
|
+
return !u && !a ? null : /* @__PURE__ */ J("div", {
|
|
3175
3286
|
ref: s,
|
|
3176
3287
|
id: i ?? `${l}-panel-${e}`,
|
|
3177
3288
|
role: "tabpanel",
|
|
@@ -3184,26 +3295,26 @@ var Ir = {
|
|
|
3184
3295
|
});
|
|
3185
3296
|
}), Br = 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) {
|
|
3186
3297
|
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;
|
|
3187
|
-
return /* @__PURE__ */
|
|
3188
|
-
className:
|
|
3298
|
+
return /* @__PURE__ */ Y("div", {
|
|
3299
|
+
className: Z("flex flex-col gap-1.5 w-full", f),
|
|
3189
3300
|
"data-test-id": _,
|
|
3190
3301
|
children: [
|
|
3191
|
-
(e || t) && /* @__PURE__ */
|
|
3302
|
+
(e || t) && /* @__PURE__ */ Y("div", {
|
|
3192
3303
|
className: "flex items-center gap-1.5",
|
|
3193
|
-
children: [e && /* @__PURE__ */
|
|
3304
|
+
children: [e && /* @__PURE__ */ Y("label", {
|
|
3194
3305
|
htmlFor: S,
|
|
3195
3306
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3196
|
-
children: [e, s && /* @__PURE__ */
|
|
3307
|
+
children: [e, s && /* @__PURE__ */ J("span", {
|
|
3197
3308
|
className: "text-red-600",
|
|
3198
3309
|
"aria-hidden": !0,
|
|
3199
3310
|
children: "*"
|
|
3200
3311
|
})]
|
|
3201
|
-
}), t && /* @__PURE__ */
|
|
3312
|
+
}), t && /* @__PURE__ */ J("span", {
|
|
3202
3313
|
className: "inline-flex items-center gap-1",
|
|
3203
3314
|
children: t
|
|
3204
3315
|
})]
|
|
3205
3316
|
}),
|
|
3206
|
-
/* @__PURE__ */
|
|
3317
|
+
/* @__PURE__ */ J("textarea", {
|
|
3207
3318
|
ref: b,
|
|
3208
3319
|
id: S,
|
|
3209
3320
|
disabled: o,
|
|
@@ -3217,23 +3328,23 @@ var Ir = {
|
|
|
3217
3328
|
},
|
|
3218
3329
|
"aria-invalid": C || void 0,
|
|
3219
3330
|
"aria-describedby": w,
|
|
3220
|
-
className:
|
|
3331
|
+
className: Z("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),
|
|
3221
3332
|
...y
|
|
3222
3333
|
}),
|
|
3223
|
-
/* @__PURE__ */
|
|
3334
|
+
/* @__PURE__ */ Y("div", {
|
|
3224
3335
|
className: "flex items-start justify-between gap-2",
|
|
3225
|
-
children: [/* @__PURE__ */
|
|
3336
|
+
children: [/* @__PURE__ */ J("div", {
|
|
3226
3337
|
className: "flex-1 min-w-0",
|
|
3227
|
-
children: r ? /* @__PURE__ */
|
|
3338
|
+
children: r ? /* @__PURE__ */ J("p", {
|
|
3228
3339
|
id: `${S}-error`,
|
|
3229
3340
|
className: "text-p-sm text-red-700",
|
|
3230
3341
|
children: r
|
|
3231
|
-
}) : n ? /* @__PURE__ */
|
|
3342
|
+
}) : n ? /* @__PURE__ */ J("p", {
|
|
3232
3343
|
id: `${S}-help`,
|
|
3233
3344
|
className: "text-p-sm text-fg-secondary",
|
|
3234
3345
|
children: n
|
|
3235
3346
|
}) : null
|
|
3236
|
-
}), E && /* @__PURE__ */
|
|
3347
|
+
}), E && /* @__PURE__ */ Y("p", {
|
|
3237
3348
|
className: "text-p-sm text-fg-tertiary tabular-nums shrink-0",
|
|
3238
3349
|
children: [
|
|
3239
3350
|
k,
|
|
@@ -3246,14 +3357,14 @@ var Ir = {
|
|
|
3246
3357
|
});
|
|
3247
3358
|
}), Vr = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
3248
3359
|
let c = u(), l = n ?? c;
|
|
3249
|
-
return /* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ Y("label", {
|
|
3250
3361
|
htmlFor: l,
|
|
3251
3362
|
"data-test-id": a,
|
|
3252
|
-
className:
|
|
3253
|
-
children: [/* @__PURE__ */
|
|
3363
|
+
className: Z("inline-flex items-center gap-3", r ? "cursor-not-allowed opacity-60" : "cursor-pointer", i),
|
|
3364
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
3254
3365
|
className: "relative inline-flex shrink-0",
|
|
3255
3366
|
children: [
|
|
3256
|
-
/* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ J("input", {
|
|
3257
3368
|
ref: s,
|
|
3258
3369
|
id: l,
|
|
3259
3370
|
type: "checkbox",
|
|
@@ -3264,22 +3375,22 @@ var Ir = {
|
|
|
3264
3375
|
className: "peer sr-only",
|
|
3265
3376
|
...o
|
|
3266
3377
|
}),
|
|
3267
|
-
/* @__PURE__ */
|
|
3268
|
-
className:
|
|
3269
|
-
children: [/* @__PURE__ */
|
|
3270
|
-
className: "size-4 text-yellow-500",
|
|
3378
|
+
/* @__PURE__ */ Y("span", {
|
|
3379
|
+
className: Z("inline-flex h-8 w-16 items-center justify-between rounded-full px-2 transition-colors", "bg-gray-200 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"),
|
|
3380
|
+
children: [/* @__PURE__ */ J(te, {
|
|
3381
|
+
className: "size-4 text-yellow-500 z-1",
|
|
3271
3382
|
"aria-hidden": !0
|
|
3272
|
-
}), /* @__PURE__ */
|
|
3273
|
-
className: "size-4 text-gray-400",
|
|
3383
|
+
}), /* @__PURE__ */ J(F, {
|
|
3384
|
+
className: "size-4 text-gray-400 z-1",
|
|
3274
3385
|
"aria-hidden": !0
|
|
3275
3386
|
})]
|
|
3276
3387
|
}),
|
|
3277
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ J("span", {
|
|
3278
3389
|
"aria-hidden": !0,
|
|
3279
|
-
className: "absolute left-1 top-1 size-6 rounded-full bg-white shadow-z1 transition-transform peer-checked:translate-x-8"
|
|
3390
|
+
className: "absolute left-1 top-1 size-6 rounded-full bg-white shadow-z1 transition-transform peer-checked:translate-x-8 peer-checked:bg-gray-600"
|
|
3280
3391
|
})
|
|
3281
3392
|
]
|
|
3282
|
-
}), t && /* @__PURE__ */
|
|
3393
|
+
}), t && /* @__PURE__ */ J("span", {
|
|
3283
3394
|
className: "text-p-std font-medium text-fg-default",
|
|
3284
3395
|
children: t
|
|
3285
3396
|
})]
|
|
@@ -3305,7 +3416,7 @@ var Ir = {
|
|
|
3305
3416
|
};
|
|
3306
3417
|
if (!o(t)) return t;
|
|
3307
3418
|
let y = t.props ?? {};
|
|
3308
|
-
return /* @__PURE__ */
|
|
3419
|
+
return /* @__PURE__ */ Y("span", {
|
|
3309
3420
|
ref: l,
|
|
3310
3421
|
"data-test-id": c,
|
|
3311
3422
|
className: "relative inline-flex",
|
|
@@ -3315,13 +3426,13 @@ var Ir = {
|
|
|
3315
3426
|
onFocus: _,
|
|
3316
3427
|
onBlur: v,
|
|
3317
3428
|
"aria-describedby": d ? g : y["aria-describedby"]
|
|
3318
|
-
}), d && /* @__PURE__ */
|
|
3429
|
+
}), d && /* @__PURE__ */ Y("span", {
|
|
3319
3430
|
role: "tooltip",
|
|
3320
3431
|
id: g,
|
|
3321
|
-
className:
|
|
3322
|
-
children: [e, /* @__PURE__ */
|
|
3432
|
+
className: Z("absolute z-50 whitespace-nowrap rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", Hr[i], Ur[r], s),
|
|
3433
|
+
children: [e, /* @__PURE__ */ J("span", {
|
|
3323
3434
|
"aria-hidden": !0,
|
|
3324
|
-
className:
|
|
3435
|
+
className: Z("absolute h-0 w-0 border-4", Wr[r])
|
|
3325
3436
|
})]
|
|
3326
3437
|
})]
|
|
3327
3438
|
});
|
|
@@ -3329,12 +3440,12 @@ var Ir = {
|
|
|
3329
3440
|
lg: "xl",
|
|
3330
3441
|
sm: "lg"
|
|
3331
3442
|
}, Yr = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
3332
|
-
return /* @__PURE__ */
|
|
3443
|
+
return /* @__PURE__ */ J(nn, {
|
|
3333
3444
|
ref: a,
|
|
3334
3445
|
size: e,
|
|
3335
3446
|
title: t ?? Kr,
|
|
3336
3447
|
description: n ?? qr,
|
|
3337
|
-
illustration: r ?? /* @__PURE__ */
|
|
3448
|
+
illustration: r ?? /* @__PURE__ */ J(Jt, {
|
|
3338
3449
|
icon: O,
|
|
3339
3450
|
tone: "brand",
|
|
3340
3451
|
shape: "circle",
|
|
@@ -3351,16 +3462,16 @@ function Xr(e, t) {
|
|
|
3351
3462
|
let r = e.name.toLowerCase(), i = e.type.toLowerCase();
|
|
3352
3463
|
return n.some((e) => e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : e.startsWith(".") ? r.endsWith(e) : i === e);
|
|
3353
3464
|
}
|
|
3354
|
-
var Zr = 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:
|
|
3355
|
-
let
|
|
3465
|
+
var Zr = 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, mode: f = "dropzone", triggerLabel: h, triggerIcon: g, label: _, required: v, error: y = !1, errorText: b, labelAddons: x, className: S, dataTestId: C, ...w }, T) {
|
|
3466
|
+
let E = p(null), [D, O] = m(!1), k = p(0), A = y || !!b, j = u(), M = b ? `${j}-error` : void 0, N = (t) => {
|
|
3356
3467
|
if (!t.length) return;
|
|
3357
3468
|
if (!o) {
|
|
3358
3469
|
i?.(t);
|
|
3359
3470
|
return;
|
|
3360
3471
|
}
|
|
3361
|
-
let r = [], a = [],
|
|
3472
|
+
let r = [], a = [], u = [...l], f = s === void 0 ? Infinity : Math.max(0, s - l.length);
|
|
3362
3473
|
for (let i of t) {
|
|
3363
|
-
if (c &&
|
|
3474
|
+
if (c && u.some((e) => e.name === i.name && e.size === i.size)) {
|
|
3364
3475
|
a.push({
|
|
3365
3476
|
file: i,
|
|
3366
3477
|
reason: "duplicate"
|
|
@@ -3388,157 +3499,168 @@ var Zr = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
3388
3499
|
});
|
|
3389
3500
|
continue;
|
|
3390
3501
|
}
|
|
3391
|
-
r.push(i),
|
|
3502
|
+
r.push(i), u.push(i), --f;
|
|
3392
3503
|
}
|
|
3393
|
-
r.length && i?.(r), a.length &&
|
|
3394
|
-
},
|
|
3395
|
-
e.preventDefault(),
|
|
3396
|
-
},
|
|
3397
|
-
ref:
|
|
3504
|
+
r.length && i?.(r), a.length && d?.(a);
|
|
3505
|
+
}, P = (e) => {
|
|
3506
|
+
e.preventDefault(), k.current = 0, O(!1), !a && N(Array.from(e.dataTransfer.files ?? []));
|
|
3507
|
+
}, F = r ?? `${e ? e.toUpperCase().replace(/\./g, "") : "Any file"}${n ? `, up to ${n} MB` : ""}`, I = /* @__PURE__ */ J("input", {
|
|
3508
|
+
ref: E,
|
|
3398
3509
|
type: "file",
|
|
3399
3510
|
accept: e,
|
|
3400
3511
|
multiple: t,
|
|
3401
3512
|
disabled: a,
|
|
3402
3513
|
onChange: (e) => {
|
|
3403
|
-
|
|
3514
|
+
N(Array.from(e.target.files ?? [])), e.target.value = "";
|
|
3404
3515
|
},
|
|
3405
3516
|
className: "sr-only"
|
|
3406
|
-
}),
|
|
3517
|
+
}), z = (_ || x) && /* @__PURE__ */ Y("div", {
|
|
3407
3518
|
className: "flex items-center gap-1.5",
|
|
3408
|
-
children: [
|
|
3519
|
+
children: [_ && /* @__PURE__ */ Y("span", {
|
|
3409
3520
|
className: "text-p-std font-medium text-fg-default inline-flex items-center gap-1",
|
|
3410
|
-
children: [
|
|
3521
|
+
children: [_, v && /* @__PURE__ */ J("span", {
|
|
3411
3522
|
className: "text-red-600",
|
|
3412
3523
|
"aria-hidden": !0,
|
|
3413
3524
|
children: "*"
|
|
3414
3525
|
})]
|
|
3415
|
-
}),
|
|
3526
|
+
}), x && /* @__PURE__ */ J("span", {
|
|
3416
3527
|
className: "inline-flex items-center gap-1",
|
|
3417
|
-
children:
|
|
3528
|
+
children: x
|
|
3418
3529
|
})]
|
|
3419
|
-
})
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3530
|
+
}), ee = b ? /* @__PURE__ */ J("p", {
|
|
3531
|
+
id: `${j}-error`,
|
|
3532
|
+
className: "text-p-sm text-red-700",
|
|
3533
|
+
children: b
|
|
3534
|
+
}) : null;
|
|
3535
|
+
if (f !== "dropzone") {
|
|
3536
|
+
let e = f === "icon";
|
|
3537
|
+
return /* @__PURE__ */ Y("div", {
|
|
3538
|
+
ref: T,
|
|
3539
|
+
"data-test-id": C,
|
|
3540
|
+
className: Z("flex flex-col gap-1.5", S),
|
|
3541
|
+
...w,
|
|
3427
3542
|
children: [
|
|
3428
|
-
|
|
3429
|
-
/* @__PURE__ */
|
|
3543
|
+
z,
|
|
3544
|
+
/* @__PURE__ */ J(He, {
|
|
3430
3545
|
type: "button",
|
|
3431
3546
|
variant: "secondary",
|
|
3432
3547
|
iconOnly: e,
|
|
3433
3548
|
disabled: a,
|
|
3434
|
-
onClick: () =>
|
|
3435
|
-
leftIcon: e ? void 0 :
|
|
3549
|
+
onClick: () => E.current?.click(),
|
|
3550
|
+
leftIcon: e ? void 0 : g ?? /* @__PURE__ */ J(L, { className: "h-4 w-4" }),
|
|
3436
3551
|
"aria-label": e ? "Upload file" : void 0,
|
|
3437
|
-
children: e ?
|
|
3552
|
+
children: e ? g ?? /* @__PURE__ */ J(R, { className: "h-4 w-4" }) : h ?? "Choose a file"
|
|
3438
3553
|
}),
|
|
3439
|
-
|
|
3554
|
+
I,
|
|
3555
|
+
ee
|
|
3440
3556
|
]
|
|
3441
3557
|
});
|
|
3442
3558
|
}
|
|
3443
|
-
let
|
|
3444
|
-
ref:
|
|
3559
|
+
let B = /* @__PURE__ */ Y("div", {
|
|
3560
|
+
ref: T,
|
|
3445
3561
|
onDragEnter: () => {
|
|
3446
|
-
|
|
3562
|
+
k.current += 1, a || O(!0);
|
|
3447
3563
|
},
|
|
3448
3564
|
onDragOver: (e) => e.preventDefault(),
|
|
3449
3565
|
onDragLeave: () => {
|
|
3450
|
-
|
|
3566
|
+
k.current = Math.max(0, k.current - 1), k.current === 0 && O(!1);
|
|
3451
3567
|
},
|
|
3452
|
-
onDrop:
|
|
3453
|
-
onClick: () => !a &&
|
|
3568
|
+
onDrop: P,
|
|
3569
|
+
onClick: () => !a && E.current?.click(),
|
|
3454
3570
|
role: "button",
|
|
3455
3571
|
tabIndex: 0,
|
|
3456
3572
|
onKeyDown: (e) => {
|
|
3457
|
-
(e.key === "Enter" || e.key === " ") && !a && (e.preventDefault(),
|
|
3573
|
+
(e.key === "Enter" || e.key === " ") && !a && (e.preventDefault(), E.current?.click());
|
|
3458
3574
|
},
|
|
3459
3575
|
"aria-disabled": a || void 0,
|
|
3460
|
-
"
|
|
3461
|
-
|
|
3462
|
-
|
|
3576
|
+
"aria-invalid": A || void 0,
|
|
3577
|
+
"aria-describedby": M,
|
|
3578
|
+
"data-test-id": C,
|
|
3579
|
+
className: Z("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", A ? "border-red-300 bg-bg-danger-lighter" : D ? "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", S),
|
|
3580
|
+
...w,
|
|
3463
3581
|
children: [
|
|
3464
|
-
/* @__PURE__ */
|
|
3582
|
+
/* @__PURE__ */ J("div", {
|
|
3465
3583
|
className: "h-10 w-10 rounded-full bg-bg-default flex items-center justify-center text-fg-secondary shadow-z1",
|
|
3466
|
-
children: /* @__PURE__ */
|
|
3584
|
+
children: /* @__PURE__ */ J(U, { className: "h-5 w-5" })
|
|
3467
3585
|
}),
|
|
3468
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ Y("div", {
|
|
3469
3587
|
className: "flex flex-col gap-0.5",
|
|
3470
|
-
children: [/* @__PURE__ */
|
|
3588
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
3471
3589
|
className: "text-p-std text-fg-default",
|
|
3472
|
-
children: [/* @__PURE__ */
|
|
3590
|
+
children: [/* @__PURE__ */ J("span", {
|
|
3473
3591
|
className: "font-semibold text-brand-700",
|
|
3474
3592
|
children: "Choose a file"
|
|
3475
3593
|
}), " or drag & drop it here."]
|
|
3476
|
-
}), /* @__PURE__ */
|
|
3594
|
+
}), /* @__PURE__ */ J("p", {
|
|
3477
3595
|
className: "text-p-sm text-fg-tertiary",
|
|
3478
|
-
children:
|
|
3596
|
+
children: F
|
|
3479
3597
|
})]
|
|
3480
3598
|
}),
|
|
3481
|
-
|
|
3599
|
+
I
|
|
3482
3600
|
]
|
|
3483
3601
|
});
|
|
3484
|
-
return
|
|
3602
|
+
return !z && !ee ? B : /* @__PURE__ */ Y("div", {
|
|
3485
3603
|
className: "flex flex-col gap-1.5",
|
|
3486
|
-
children: [
|
|
3487
|
-
|
|
3604
|
+
children: [
|
|
3605
|
+
z,
|
|
3606
|
+
B,
|
|
3607
|
+
ee
|
|
3608
|
+
]
|
|
3609
|
+
});
|
|
3488
3610
|
}), Qr = {
|
|
3489
3611
|
processing: "border-border-default bg-bg-default",
|
|
3490
3612
|
completed: "border-border-default bg-bg-default",
|
|
3491
3613
|
error: "border-red-300 bg-bg-danger-lighter"
|
|
3492
3614
|
}, $r = a(function({ name: e, meta: t, status: n = "processing", progress: r = 0, errorText: i, onRetry: a, onRemove: o, previewSrc: s, className: c, dataTestId: l, ...u }, d) {
|
|
3493
3615
|
let [f, p] = m(!1), g = !!s && !f;
|
|
3494
|
-
return /* @__PURE__ */
|
|
3616
|
+
return /* @__PURE__ */ Y("div", {
|
|
3495
3617
|
ref: d,
|
|
3496
3618
|
"data-test-id": l,
|
|
3497
|
-
className:
|
|
3619
|
+
className: Z("flex items-start gap-3 px-3 py-2.5 rounded-lg border", Qr[n], c),
|
|
3498
3620
|
...u,
|
|
3499
3621
|
children: [
|
|
3500
|
-
/* @__PURE__ */
|
|
3501
|
-
className:
|
|
3502
|
-
children: g ? /* @__PURE__ */
|
|
3622
|
+
/* @__PURE__ */ J("div", {
|
|
3623
|
+
className: Z("shrink-0 flex items-center justify-center h-9 w-9 rounded-md overflow-hidden", !g && (n === "error" ? "bg-red-100 dark:bg-red-900/30 text-red-700" : "bg-bg-subtle text-fg-secondary")),
|
|
3624
|
+
children: g ? /* @__PURE__ */ J("img", {
|
|
3503
3625
|
src: s,
|
|
3504
3626
|
alt: "",
|
|
3505
3627
|
className: "h-full w-full object-cover",
|
|
3506
3628
|
onError: () => p(!0)
|
|
3507
|
-
}) : /* @__PURE__ */
|
|
3629
|
+
}) : /* @__PURE__ */ J(A, { className: "h-4 w-4" })
|
|
3508
3630
|
}),
|
|
3509
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ Y("div", {
|
|
3510
3632
|
className: "flex-1 min-w-0",
|
|
3511
3633
|
children: [
|
|
3512
|
-
/* @__PURE__ */
|
|
3634
|
+
/* @__PURE__ */ Y("div", {
|
|
3513
3635
|
className: "flex items-baseline justify-between gap-2",
|
|
3514
|
-
children: [/* @__PURE__ */
|
|
3636
|
+
children: [/* @__PURE__ */ J("p", {
|
|
3515
3637
|
className: "truncate text-p-std font-medium text-fg-default",
|
|
3516
3638
|
children: e
|
|
3517
|
-
}), /* @__PURE__ */
|
|
3639
|
+
}), /* @__PURE__ */ Y("div", {
|
|
3518
3640
|
className: "flex items-center gap-1 shrink-0",
|
|
3519
|
-
children: [n === "completed" && /* @__PURE__ */
|
|
3641
|
+
children: [n === "completed" && /* @__PURE__ */ J(x, {
|
|
3520
3642
|
className: "h-4 w-4 text-green-600",
|
|
3521
3643
|
"aria-label": "Completed"
|
|
3522
|
-
}), n === "error" && /* @__PURE__ */
|
|
3644
|
+
}), n === "error" && /* @__PURE__ */ J(h, {
|
|
3523
3645
|
className: "h-4 w-4 text-red-600",
|
|
3524
3646
|
"aria-label": "Failed"
|
|
3525
3647
|
})]
|
|
3526
3648
|
})]
|
|
3527
3649
|
}),
|
|
3528
|
-
t && /* @__PURE__ */
|
|
3650
|
+
t && /* @__PURE__ */ J("p", {
|
|
3529
3651
|
className: "text-p-sm text-fg-tertiary mt-0.5",
|
|
3530
3652
|
children: t
|
|
3531
3653
|
}),
|
|
3532
|
-
n === "processing" && /* @__PURE__ */
|
|
3654
|
+
n === "processing" && /* @__PURE__ */ J("div", {
|
|
3533
3655
|
className: "mt-2 h-1 w-full rounded-full bg-bg-subtle overflow-hidden",
|
|
3534
|
-
children: /* @__PURE__ */
|
|
3656
|
+
children: /* @__PURE__ */ J("div", {
|
|
3535
3657
|
className: "h-full bg-brand-500 transition-[width] duration-200",
|
|
3536
3658
|
style: { width: `${Math.min(100, Math.max(0, r))}%` }
|
|
3537
3659
|
})
|
|
3538
3660
|
}),
|
|
3539
|
-
n === "error" && i && /* @__PURE__ */
|
|
3661
|
+
n === "error" && i && /* @__PURE__ */ Y("p", {
|
|
3540
3662
|
className: "text-p-sm text-red-700 mt-1",
|
|
3541
|
-
children: [i, a && /* @__PURE__ */
|
|
3663
|
+
children: [i, a && /* @__PURE__ */ J("button", {
|
|
3542
3664
|
type: "button",
|
|
3543
3665
|
onClick: a,
|
|
3544
3666
|
className: "ml-2 underline font-medium hover:no-underline",
|
|
@@ -3547,12 +3669,12 @@ var Zr = a(function({ accept: e, multiple: t = !1, maxSizeMB: n, hint: r, onFile
|
|
|
3547
3669
|
})
|
|
3548
3670
|
]
|
|
3549
3671
|
}),
|
|
3550
|
-
o && /* @__PURE__ */
|
|
3672
|
+
o && /* @__PURE__ */ J("button", {
|
|
3551
3673
|
type: "button",
|
|
3552
3674
|
onClick: o,
|
|
3553
3675
|
"aria-label": "Remove",
|
|
3554
3676
|
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",
|
|
3555
|
-
children:
|
|
3677
|
+
children: J(n === "completed" ? H : W, { className: "h-4 w-4" })
|
|
3556
3678
|
})
|
|
3557
3679
|
]
|
|
3558
3680
|
});
|
|
@@ -3643,38 +3765,38 @@ function ci(e = si) {
|
|
|
3643
3765
|
//#endregion
|
|
3644
3766
|
//#region src/hooks/useFormContext.ts
|
|
3645
3767
|
function li() {
|
|
3646
|
-
let e = c(
|
|
3768
|
+
let e = c(sn);
|
|
3647
3769
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
3648
3770
|
return e;
|
|
3649
3771
|
}
|
|
3650
3772
|
//#endregion
|
|
3651
3773
|
//#region src/hooks/useFormProps.ts
|
|
3652
|
-
var
|
|
3653
|
-
control:
|
|
3654
|
-
register:
|
|
3774
|
+
var Q = (() => void 0), ui = {
|
|
3775
|
+
control: Q,
|
|
3776
|
+
register: Q,
|
|
3655
3777
|
errors: {},
|
|
3656
|
-
setValue:
|
|
3657
|
-
getValues:
|
|
3658
|
-
watch:
|
|
3659
|
-
reset:
|
|
3660
|
-
trigger:
|
|
3661
|
-
clearErrors:
|
|
3662
|
-
setError:
|
|
3663
|
-
getFieldState:
|
|
3664
|
-
unregister:
|
|
3778
|
+
setValue: Q,
|
|
3779
|
+
getValues: Q,
|
|
3780
|
+
watch: Q,
|
|
3781
|
+
reset: Q,
|
|
3782
|
+
trigger: Q,
|
|
3783
|
+
clearErrors: Q,
|
|
3784
|
+
setError: Q,
|
|
3785
|
+
getFieldState: Q,
|
|
3786
|
+
unregister: Q,
|
|
3665
3787
|
isDirty: !1,
|
|
3666
3788
|
isSubmitted: !1,
|
|
3667
3789
|
isSubmitting: !1,
|
|
3668
3790
|
isValid: !1,
|
|
3669
3791
|
dirtyFields: {},
|
|
3670
|
-
submit:
|
|
3792
|
+
submit: Q
|
|
3671
3793
|
};
|
|
3672
3794
|
function di() {
|
|
3673
|
-
return c(
|
|
3795
|
+
return c(sn) ?? ui;
|
|
3674
3796
|
}
|
|
3675
3797
|
//#endregion
|
|
3676
3798
|
//#region src/tokens/colors.ts
|
|
3677
|
-
var
|
|
3799
|
+
var fi = {
|
|
3678
3800
|
900: "#31531C",
|
|
3679
3801
|
800: "#416E26",
|
|
3680
3802
|
700: "#518A2F",
|
|
@@ -3688,7 +3810,7 @@ var X = {
|
|
|
3688
3810
|
40: "#CAE7B9",
|
|
3689
3811
|
30: "#DBEFD1",
|
|
3690
3812
|
20: "#EDF7E8"
|
|
3691
|
-
},
|
|
3813
|
+
}, $ = {
|
|
3692
3814
|
900: "#0e121b",
|
|
3693
3815
|
800: "#222530",
|
|
3694
3816
|
700: "#2b303b",
|
|
@@ -3700,7 +3822,7 @@ var X = {
|
|
|
3700
3822
|
100: "#f2f5f8",
|
|
3701
3823
|
50: "#f5f7fa",
|
|
3702
3824
|
20: "#f7f9fc"
|
|
3703
|
-
},
|
|
3825
|
+
}, pi = "#FEFEFE", mi = {
|
|
3704
3826
|
900: "#0b4627",
|
|
3705
3827
|
800: "#0f5c33",
|
|
3706
3828
|
700: "#3D8B46",
|
|
@@ -3711,7 +3833,7 @@ var X = {
|
|
|
3711
3833
|
200: "#aeeacb",
|
|
3712
3834
|
100: "#d0f5e1",
|
|
3713
3835
|
50: "#e0faec"
|
|
3714
|
-
},
|
|
3836
|
+
}, hi = {
|
|
3715
3837
|
900: "#2443B8",
|
|
3716
3838
|
800: "#2E63D6",
|
|
3717
3839
|
700: "#3475E8",
|
|
@@ -3722,7 +3844,7 @@ var X = {
|
|
|
3722
3844
|
200: "#9ACAFA",
|
|
3723
3845
|
100: "#C1DEFC",
|
|
3724
3846
|
50: "#E6F2FE"
|
|
3725
|
-
},
|
|
3847
|
+
}, gi = {
|
|
3726
3848
|
900: "#081FA6",
|
|
3727
3849
|
800: "#0E2AB2",
|
|
3728
3850
|
700: "#2431B9",
|
|
@@ -3734,7 +3856,7 @@ var X = {
|
|
|
3734
3856
|
100: "#CBC4ED",
|
|
3735
3857
|
50: "#EAE7F7",
|
|
3736
3858
|
20: "#F5F3FB"
|
|
3737
|
-
},
|
|
3859
|
+
}, _i = {
|
|
3738
3860
|
900: "#4A0A20",
|
|
3739
3861
|
800: "#79012F",
|
|
3740
3862
|
700: "#A2023F",
|
|
@@ -3745,7 +3867,7 @@ var X = {
|
|
|
3745
3867
|
200: "#FE7DAF",
|
|
3746
3868
|
100: "#FEA8C9",
|
|
3747
3869
|
50: "#FFD4E4"
|
|
3748
|
-
},
|
|
3870
|
+
}, vi = {
|
|
3749
3871
|
900: "#8b1822",
|
|
3750
3872
|
800: "#ad1f2b",
|
|
3751
3873
|
700: "#d02533",
|
|
@@ -3757,7 +3879,7 @@ var X = {
|
|
|
3757
3879
|
100: "#ffd5d8",
|
|
3758
3880
|
50: "#ffebec",
|
|
3759
3881
|
20: "#fff4f4"
|
|
3760
|
-
},
|
|
3882
|
+
}, yi = {
|
|
3761
3883
|
900: "#EB7520",
|
|
3762
3884
|
800: "#ED912A",
|
|
3763
3885
|
700: "#EEA02F",
|
|
@@ -3768,47 +3890,47 @@ var X = {
|
|
|
3768
3890
|
200: "#F7DE8E",
|
|
3769
3891
|
100: "#FAEBB9",
|
|
3770
3892
|
50: "#FDF7E4"
|
|
3771
|
-
},
|
|
3772
|
-
brand:
|
|
3773
|
-
gray:
|
|
3774
|
-
green:
|
|
3775
|
-
blue:
|
|
3776
|
-
purple:
|
|
3777
|
-
pink:
|
|
3778
|
-
red:
|
|
3779
|
-
yellow:
|
|
3780
|
-
},
|
|
3781
|
-
bgDefault:
|
|
3782
|
-
bgContainer:
|
|
3783
|
-
bgSubtle:
|
|
3784
|
-
bgBrandLighter:
|
|
3785
|
-
bgInfoLighter:
|
|
3786
|
-
bgSuccessLighter:
|
|
3787
|
-
bgWarningLighter:
|
|
3788
|
-
bgDangerLighter:
|
|
3789
|
-
fgDefault:
|
|
3790
|
-
fgSecondary:
|
|
3791
|
-
fgTertiary:
|
|
3792
|
-
fgDisabled:
|
|
3793
|
-
fgInverse:
|
|
3794
|
-
fgBrand:
|
|
3795
|
-
fgInfo:
|
|
3796
|
-
fgSuccess:
|
|
3797
|
-
fgWarning:
|
|
3798
|
-
fgDanger:
|
|
3799
|
-
borderDefault:
|
|
3800
|
-
borderSubtle:
|
|
3801
|
-
borderStrong:
|
|
3802
|
-
borderBrand:
|
|
3803
|
-
iconPrimary:
|
|
3804
|
-
iconSecondary:
|
|
3805
|
-
iconInverse:
|
|
3806
|
-
iconBrand:
|
|
3807
|
-
iconInfo:
|
|
3808
|
-
iconDanger:
|
|
3809
|
-
iconWarning:
|
|
3810
|
-
},
|
|
3811
|
-
...
|
|
3893
|
+
}, bi = {
|
|
3894
|
+
brand: fi,
|
|
3895
|
+
gray: $,
|
|
3896
|
+
green: mi,
|
|
3897
|
+
blue: hi,
|
|
3898
|
+
purple: gi,
|
|
3899
|
+
pink: _i,
|
|
3900
|
+
red: vi,
|
|
3901
|
+
yellow: yi
|
|
3902
|
+
}, xi = {
|
|
3903
|
+
bgDefault: pi,
|
|
3904
|
+
bgContainer: $[50],
|
|
3905
|
+
bgSubtle: $[100],
|
|
3906
|
+
bgBrandLighter: fi[20],
|
|
3907
|
+
bgInfoLighter: hi[50],
|
|
3908
|
+
bgSuccessLighter: mi[50],
|
|
3909
|
+
bgWarningLighter: yi[50],
|
|
3910
|
+
bgDangerLighter: vi[50],
|
|
3911
|
+
fgDefault: $[900],
|
|
3912
|
+
fgSecondary: $[600],
|
|
3913
|
+
fgTertiary: $[500],
|
|
3914
|
+
fgDisabled: $[400],
|
|
3915
|
+
fgInverse: pi,
|
|
3916
|
+
fgBrand: fi[500],
|
|
3917
|
+
fgInfo: hi[600],
|
|
3918
|
+
fgSuccess: mi[600],
|
|
3919
|
+
fgWarning: yi[800],
|
|
3920
|
+
fgDanger: vi[800],
|
|
3921
|
+
borderDefault: $[200],
|
|
3922
|
+
borderSubtle: $[100],
|
|
3923
|
+
borderStrong: $[300],
|
|
3924
|
+
borderBrand: fi[500],
|
|
3925
|
+
iconPrimary: $[900],
|
|
3926
|
+
iconSecondary: $[600],
|
|
3927
|
+
iconInverse: pi,
|
|
3928
|
+
iconBrand: fi[500],
|
|
3929
|
+
iconInfo: hi[600],
|
|
3930
|
+
iconDanger: vi[800],
|
|
3931
|
+
iconWarning: yi[800]
|
|
3932
|
+
}, Si = {
|
|
3933
|
+
...xi,
|
|
3812
3934
|
bgDefault: "#0B1120",
|
|
3813
3935
|
bgContainer: "#0F172A",
|
|
3814
3936
|
bgSubtle: "#121C30",
|
|
@@ -3817,16 +3939,16 @@ var X = {
|
|
|
3817
3939
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
3818
3940
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
3819
3941
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
3820
|
-
fgDefault:
|
|
3821
|
-
fgSecondary:
|
|
3822
|
-
fgTertiary:
|
|
3823
|
-
fgDisabled:
|
|
3942
|
+
fgDefault: pi,
|
|
3943
|
+
fgSecondary: $[400],
|
|
3944
|
+
fgTertiary: $[500],
|
|
3945
|
+
fgDisabled: $[600],
|
|
3824
3946
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
3825
3947
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
3826
3948
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
3827
|
-
iconPrimary:
|
|
3828
|
-
iconSecondary:
|
|
3829
|
-
},
|
|
3949
|
+
iconPrimary: pi,
|
|
3950
|
+
iconSecondary: $[400]
|
|
3951
|
+
}, Ci = {
|
|
3830
3952
|
ps: [
|
|
3831
3953
|
"Noto Sans Armenian",
|
|
3832
3954
|
"Noto Sans",
|
|
@@ -3841,7 +3963,7 @@ var X = {
|
|
|
3841
3963
|
"system-ui",
|
|
3842
3964
|
"sans-serif"
|
|
3843
3965
|
]
|
|
3844
|
-
},
|
|
3966
|
+
}, wi = {
|
|
3845
3967
|
xl: {
|
|
3846
3968
|
fontSize: "64px",
|
|
3847
3969
|
lineHeight: "72px"
|
|
@@ -3866,7 +3988,7 @@ var X = {
|
|
|
3866
3988
|
fontSize: "24px",
|
|
3867
3989
|
lineHeight: "32px"
|
|
3868
3990
|
}
|
|
3869
|
-
},
|
|
3991
|
+
}, Ti = {
|
|
3870
3992
|
lg: {
|
|
3871
3993
|
fontSize: "20px",
|
|
3872
3994
|
lineHeight: "28px"
|
|
@@ -3887,7 +4009,7 @@ var X = {
|
|
|
3887
4009
|
fontSize: "10px",
|
|
3888
4010
|
lineHeight: "14px"
|
|
3889
4011
|
}
|
|
3890
|
-
},
|
|
4012
|
+
}, Ei = {
|
|
3891
4013
|
lg: {
|
|
3892
4014
|
fontSize: "20px",
|
|
3893
4015
|
lineHeight: "28px"
|
|
@@ -3912,19 +4034,19 @@ var X = {
|
|
|
3912
4034
|
fontSize: "6px",
|
|
3913
4035
|
lineHeight: "6px"
|
|
3914
4036
|
}
|
|
3915
|
-
},
|
|
3916
|
-
headline:
|
|
3917
|
-
paragraph:
|
|
3918
|
-
label:
|
|
3919
|
-
},
|
|
4037
|
+
}, Di = {
|
|
4038
|
+
headline: wi,
|
|
4039
|
+
paragraph: Ti,
|
|
4040
|
+
label: Ei
|
|
4041
|
+
}, Oi = {
|
|
3920
4042
|
sm: "2rem",
|
|
3921
4043
|
md: "2.5rem",
|
|
3922
4044
|
lg: "3rem"
|
|
3923
|
-
},
|
|
4045
|
+
}, ki = {
|
|
3924
4046
|
sm: "0.875rem",
|
|
3925
4047
|
md: "1rem",
|
|
3926
4048
|
lg: "1.25rem"
|
|
3927
|
-
},
|
|
4049
|
+
}, Ai = {
|
|
3928
4050
|
xs: "2px",
|
|
3929
4051
|
sm: "4px",
|
|
3930
4052
|
md: "8px",
|
|
@@ -3933,7 +4055,7 @@ var X = {
|
|
|
3933
4055
|
"2xl": "20px",
|
|
3934
4056
|
"3xl": "24px",
|
|
3935
4057
|
full: "9999px"
|
|
3936
|
-
},
|
|
4058
|
+
}, ji = {
|
|
3937
4059
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
3938
4060
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
3939
4061
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -3941,6 +4063,6 @@ var X = {
|
|
|
3941
4063
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
3942
4064
|
};
|
|
3943
4065
|
//#endregion
|
|
3944
|
-
export {
|
|
4066
|
+
export { ge as Accordion, _e as AccordionItem, we as Avatar, Te as AvatarGroup, Pe as Badge, Le as Breadcrumb, He as Button, We as ButtonGroup, qe as Card, Ye as CardGroup, Qe as Checkbox, at as Copy, ft as Counter, Ar as DataTable, St as DatePicker, Et as DistributionBar, fe as Divider, Pt as Drawer, Ht as DropdownContent, Ut as DropdownItem, Gt as DropdownLabel, zt as DropdownMenu, Wt as DropdownSeparator, Bt as DropdownTrigger, nn as Empty, on as Filter, cn as FormContainer, ln as FormField, Jt as IconTile, un as InfoField, fn as InlineAlert, ut as Input, pn as Link, hn as Modal, _n as MultiSelect, Sn as NotificationBadge, En as Pagination, kn as PersonCard, it as Popover, Pn as Progress, zn as Radio, In as RadioGroup, Bn as ReadMore, Un as Select, Kn as Sidebar, qn as SidebarItem, Zn as Skeleton, nr as SnackbarProvider, or as Status, vr as StepIndicator, xr as Switch, Er as TBody, kr as TD, Or as TH, Tr as THead, Dr as TR, Rr as Tab, Fr as TabList, zr as TabPanel, wr as Table, Pr as Tabs, $t as Text, Br as TextArea, Vr as ThemeSwitch, Gr as Tooltip, Yr as UnderConstruction, Zr as Upload, $r as UploadItem, hi as blue, fi as brand, Z as cn, bi as colorPrimitives, Oi as controlHeight, Si as darkTheme, Ci as fontFamily, $ as gray, mi as green, wi as headline, ki as iconSize, Ei as label, xi as lightTheme, Ti as paragraph, _i as pink, gi as purple, Ai as radius, vi as red, ji as shadows, Di as typography, ri as useEscapeKey, li as useFormContext, di as useFormProps, oi as useHideBodyScroll, ci as useIsMobile, ni as useOnOutsideClick, tr as useSnackbar, ti as useStepper, pi as white, yi as yellow };
|
|
3945
4067
|
|
|
3946
4068
|
//# sourceMappingURL=index.js.map
|