@youversion/design-system-components 0.6.1 → 0.7.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/CHANGELOG.md +12 -0
- package/dist/Dialog/Dialog.d.ts +56 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +588 -516
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as x, jsx as s, Fragment as ie } from "react/jsx-runtime";
|
|
2
|
+
import Ue, { forwardRef as y, createElement as M, useEffect as A, useLayoutEffect as Nt, useRef as B, useState as z, useCallback as Y, useMemo as V, Children as St, isValidElement as Ot, useId as Et, cloneElement as It } from "react";
|
|
3
3
|
import d from "clsx";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
var
|
|
5
|
+
var Lt = Object.defineProperty, Ct = Object.defineProperties, Pt = Object.getOwnPropertyDescriptors, ee = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable, $e = (e, t, r) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Bt = (e, t) => {
|
|
6
6
|
for (var r in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
Ke.call(t, r) && $e(e, r, t[r]);
|
|
8
8
|
if (ee)
|
|
9
9
|
for (var r of ee(t))
|
|
10
|
-
|
|
10
|
+
qe.call(t, r) && $e(e, r, t[r]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, Tt = (e, t) => Ct(e, Pt(t)), Dt = (e, t) => {
|
|
13
13
|
var r = {};
|
|
14
14
|
for (var n in e)
|
|
15
|
-
|
|
15
|
+
Ke.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
16
16
|
if (e != null && ee)
|
|
17
17
|
for (var n of ee(e))
|
|
18
|
-
t.indexOf(n) < 0 &&
|
|
18
|
+
t.indexOf(n) < 0 && qe.call(e, n) && (r[n] = e[n]);
|
|
19
19
|
return r;
|
|
20
|
-
},
|
|
21
|
-
var r = e, { title: n, titleId: a } = r, o =
|
|
22
|
-
return x("svg",
|
|
23
|
-
},
|
|
24
|
-
const
|
|
20
|
+
}, jt = (e, t) => {
|
|
21
|
+
var r = e, { title: n, titleId: a } = r, o = Dt(r, ["title", "titleId"]);
|
|
22
|
+
return x("svg", Tt(Bt({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.207 10a.5.5 0 0 0-.354.854l3.793 3.792a.5.5 0 0 0 .707 0l3.793-3.792a.5.5 0 0 0-.353-.854H8.207Z", fill: "currentColor" })] }));
|
|
23
|
+
}, Rt = y(jt), Ze = Rt;
|
|
24
|
+
const fe = (e) => {
|
|
25
25
|
if (e) {
|
|
26
26
|
if (typeof e != "string" && e)
|
|
27
27
|
return d(e.lightMode, e.darkMode);
|
|
28
28
|
if (typeof e == "string")
|
|
29
29
|
return e;
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, Ne = (e) => {
|
|
32
32
|
if (e) {
|
|
33
33
|
if (typeof e != "string" && e)
|
|
34
34
|
return d(e.block, e.blockEnd, e.blockStart, e.inline, e.inlineEnd, e.inlineStart);
|
|
35
35
|
if (typeof e == "string")
|
|
36
36
|
return e;
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Mt = ({
|
|
39
39
|
background: e,
|
|
40
40
|
borderColor: t,
|
|
41
41
|
borderRadius: r,
|
|
42
42
|
borderWidth: n,
|
|
43
43
|
className: a,
|
|
44
44
|
component: o = "div",
|
|
45
|
-
color:
|
|
45
|
+
color: l,
|
|
46
46
|
elevation: i = 0,
|
|
47
47
|
height: u,
|
|
48
48
|
margin: f,
|
|
49
49
|
padding: m,
|
|
50
50
|
width: h,
|
|
51
|
-
...
|
|
52
|
-
},
|
|
51
|
+
...v
|
|
52
|
+
}, b) => {
|
|
53
53
|
const p = {
|
|
54
54
|
0: "",
|
|
55
55
|
1: "shadow-light-1 dark:shadow-dark-1",
|
|
@@ -57,11 +57,11 @@ const ce = (e) => {
|
|
|
57
57
|
4: "shadow-light-4 dark:shadow-dark-4",
|
|
58
58
|
8: "shadow-light-8 dark:shadow-dark-8",
|
|
59
59
|
12: "shadow-light-12 dark:shadow-dark-12"
|
|
60
|
-
}, N =
|
|
60
|
+
}, N = fe(l), k = fe(e), T = fe(t), E = Ne(m), I = Ne(f), w = d(
|
|
61
61
|
r,
|
|
62
62
|
n,
|
|
63
63
|
p[i],
|
|
64
|
-
|
|
64
|
+
I,
|
|
65
65
|
E,
|
|
66
66
|
N,
|
|
67
67
|
k,
|
|
@@ -70,49 +70,49 @@ const ce = (e) => {
|
|
|
70
70
|
u,
|
|
71
71
|
a
|
|
72
72
|
);
|
|
73
|
-
return
|
|
74
|
-
className:
|
|
75
|
-
...
|
|
76
|
-
ref:
|
|
73
|
+
return M(o, {
|
|
74
|
+
className: w,
|
|
75
|
+
...v,
|
|
76
|
+
ref: b
|
|
77
77
|
});
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
const
|
|
78
|
+
}, L = y(Mt);
|
|
79
|
+
L.displayName = "Box";
|
|
80
|
+
const xe = ({ innerRef: e, forwardedRef: t }) => (A(() => {
|
|
81
81
|
[e, t].forEach((r) => {
|
|
82
82
|
r && (typeof r == "function" ? r(e.current || null) : r.current = e.current || null);
|
|
83
83
|
});
|
|
84
84
|
}, [e, t]), e);
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function zt() {
|
|
86
|
+
Nt(() => {
|
|
87
87
|
const e = window.getComputedStyle(document.body).overflow;
|
|
88
88
|
return document.body.style.overflow = "hidden", () => document.body.style.overflow = e;
|
|
89
89
|
}, []);
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const Wt = ({
|
|
92
92
|
className: e,
|
|
93
93
|
disabled: t,
|
|
94
94
|
endIcon: r,
|
|
95
95
|
error: n,
|
|
96
96
|
hint: a,
|
|
97
97
|
label: o,
|
|
98
|
-
name:
|
|
98
|
+
name: l,
|
|
99
99
|
onChange: i,
|
|
100
100
|
placeholder: u,
|
|
101
101
|
startIcon: f,
|
|
102
102
|
value: m,
|
|
103
103
|
...h
|
|
104
|
-
},
|
|
105
|
-
const
|
|
104
|
+
}, v) => {
|
|
105
|
+
const b = B(null), p = xe({ forwardedRef: v, innerRef: b }), [N, k] = z(Boolean(m)), [T, E] = z(!1);
|
|
106
106
|
A(() => {
|
|
107
107
|
var c;
|
|
108
108
|
k(Boolean((c = p == null ? void 0 : p.current) == null ? void 0 : c.value) || Boolean(m || u));
|
|
109
109
|
}, [m, u, p]);
|
|
110
|
-
const
|
|
110
|
+
const I = (c) => {
|
|
111
111
|
var Q;
|
|
112
112
|
k(Boolean((Q = p == null ? void 0 : p.current) == null ? void 0 : Q.value) || Boolean(m || u)), i && i(c);
|
|
113
|
-
},
|
|
113
|
+
}, w = () => {
|
|
114
114
|
t || !p.current || (p.current.focus(), E(!0));
|
|
115
|
-
},
|
|
115
|
+
}, g = () => {
|
|
116
116
|
E(!1);
|
|
117
117
|
};
|
|
118
118
|
return /* @__PURE__ */ x("div", { className: d(["flex items-start flex-col gap-0.5", e]), children: [
|
|
@@ -124,12 +124,12 @@ const Pt = ({
|
|
|
124
124
|
t ? "bg-gray-10 dark:bg-gray-40" : null,
|
|
125
125
|
n ? "border-alert dark:border-alert-dark" : "border-tertiary-light dark:border-tertiary-dark"
|
|
126
126
|
]),
|
|
127
|
-
onClick:
|
|
128
|
-
onFocus:
|
|
127
|
+
onClick: w,
|
|
128
|
+
onFocus: w,
|
|
129
129
|
children: [
|
|
130
|
-
f ? /* @__PURE__ */
|
|
130
|
+
f ? /* @__PURE__ */ s("div", { className: "text-text-muted-light dark:text-text-muted-dark pis-1.5", children: f }) : null,
|
|
131
131
|
/* @__PURE__ */ x("span", { className: "relative flex flex-1 overflow-hidden", children: [
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ s(
|
|
133
133
|
"input",
|
|
134
134
|
{
|
|
135
135
|
className: d([
|
|
@@ -139,40 +139,40 @@ const Pt = ({
|
|
|
139
139
|
o ? "pbs-3 pbe-1" : "pbs-2 pbe-2"
|
|
140
140
|
]),
|
|
141
141
|
disabled: t,
|
|
142
|
-
id:
|
|
143
|
-
onBlur:
|
|
144
|
-
onChange:
|
|
142
|
+
id: l,
|
|
143
|
+
onBlur: g,
|
|
144
|
+
onChange: I,
|
|
145
145
|
placeholder: u,
|
|
146
146
|
ref: p,
|
|
147
147
|
value: m,
|
|
148
148
|
...h
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
o ? /* @__PURE__ */
|
|
151
|
+
o ? /* @__PURE__ */ s(
|
|
152
152
|
"label",
|
|
153
153
|
{
|
|
154
154
|
className: d(
|
|
155
|
-
"items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute
|
|
156
|
-
f ? "
|
|
155
|
+
"items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute block-start-2 select-none",
|
|
156
|
+
f ? "inline-start-1" : "inline-start-2",
|
|
157
157
|
T || N ? "text-13 -translate-y-1.5" : "text-16"
|
|
158
158
|
),
|
|
159
|
-
htmlFor:
|
|
159
|
+
htmlFor: l,
|
|
160
160
|
children: o
|
|
161
161
|
}
|
|
162
162
|
) : null
|
|
163
163
|
] }),
|
|
164
|
-
r ? /* @__PURE__ */
|
|
164
|
+
r ? /* @__PURE__ */ s("div", { className: "text-text-muted-light dark:text-text-muted-dark pie-1.5", children: r }) : null
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
n || a ? /* @__PURE__ */ x("div", { className: "flex flex-col", children: [
|
|
169
|
-
n ? /* @__PURE__ */
|
|
170
|
-
a ? /* @__PURE__ */
|
|
169
|
+
n ? /* @__PURE__ */ s("span", { className: "text-alert dark:text-alert-dark", children: n }) : null,
|
|
170
|
+
a ? /* @__PURE__ */ s("span", { className: "text-text-muted-light dark:text-text-muted-dark text-13 leading-default", children: a }) : null
|
|
171
171
|
] }) : null
|
|
172
172
|
] });
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
const
|
|
173
|
+
}, Ge = y(Wt);
|
|
174
|
+
Ge.displayName = "Input";
|
|
175
|
+
const Ft = ({ children: e, className: t, ...r }, n) => /* @__PURE__ */ s(
|
|
176
176
|
"ul",
|
|
177
177
|
{
|
|
178
178
|
className: d(["bg-canvas-light dark:bg-canvas-secondary-dark rounded-1 py-0.5", t]),
|
|
@@ -180,13 +180,13 @@ const Bt = ({ children: e, className: t, ...r }, n) => /* @__PURE__ */ l(
|
|
|
180
180
|
...r,
|
|
181
181
|
children: e
|
|
182
182
|
}
|
|
183
|
-
),
|
|
184
|
-
|
|
185
|
-
const
|
|
183
|
+
), Qe = y(Ft);
|
|
184
|
+
Qe.displayName = "List";
|
|
185
|
+
const _t = ({ children: e, className: t, disabled: r, divider: n, onClick: a, ...o }, l) => {
|
|
186
186
|
const i = (u) => {
|
|
187
187
|
a && (u.code === "Enter" || u.key === " ") && a();
|
|
188
188
|
};
|
|
189
|
-
return /* @__PURE__ */
|
|
189
|
+
return /* @__PURE__ */ s(
|
|
190
190
|
"li",
|
|
191
191
|
{
|
|
192
192
|
className: d([
|
|
@@ -194,9 +194,9 @@ const Tt = ({ children: e, className: t, disabled: r, divider: n, onClick: a, ..
|
|
|
194
194
|
n ? "after:last:content-none after:absolute after:inset-x-0 after:bottom-0 after:mx-2 after:bg-gray-10 after:dark:bg-gray-40 after:h-px" : null,
|
|
195
195
|
t
|
|
196
196
|
]),
|
|
197
|
-
ref:
|
|
197
|
+
ref: l,
|
|
198
198
|
...o,
|
|
199
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ s(
|
|
200
200
|
"div",
|
|
201
201
|
{
|
|
202
202
|
className: d([
|
|
@@ -213,45 +213,45 @@ const Tt = ({ children: e, className: t, disabled: r, divider: n, onClick: a, ..
|
|
|
213
213
|
)
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
const
|
|
216
|
+
}, me = y(_t);
|
|
217
|
+
me.displayName = "ListItem";
|
|
218
|
+
const Vt = ({
|
|
219
219
|
label: e,
|
|
220
220
|
name: t,
|
|
221
221
|
options: r,
|
|
222
222
|
disabled: n = !1,
|
|
223
223
|
error: a,
|
|
224
224
|
hint: o,
|
|
225
|
-
noOptionsText:
|
|
225
|
+
noOptionsText: l,
|
|
226
226
|
onChange: i,
|
|
227
227
|
onSelect: u,
|
|
228
228
|
value: f,
|
|
229
229
|
...m
|
|
230
230
|
}, h) => {
|
|
231
|
-
const
|
|
232
|
-
N || k(!0), !
|
|
233
|
-
}, E = (
|
|
234
|
-
u(
|
|
235
|
-
},
|
|
236
|
-
(
|
|
237
|
-
|
|
231
|
+
const v = B(null), [b, p] = z(f), [N, k] = z(!1), T = (g) => {
|
|
232
|
+
N || k(!0), !g.length && b && p(null), i(g);
|
|
233
|
+
}, E = (g) => {
|
|
234
|
+
u(g), i(g.label), p(g.label), k(!1);
|
|
235
|
+
}, I = Y(
|
|
236
|
+
(g) => {
|
|
237
|
+
v.current && !v.current.contains(g.target) && (!b && f && i(""), b && f && i(b), k(!1));
|
|
238
238
|
},
|
|
239
|
-
[i,
|
|
240
|
-
),
|
|
241
|
-
return A(() => (document.addEventListener("click",
|
|
242
|
-
document.removeEventListener("click",
|
|
243
|
-
}), [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
|
|
239
|
+
[i, b, f]
|
|
240
|
+
), w = V(() => r.filter((g) => g.label.toLowerCase().includes(f.toLowerCase())) ?? [], [r, f]);
|
|
241
|
+
return A(() => (document.addEventListener("click", I, !0), () => {
|
|
242
|
+
document.removeEventListener("click", I, !0);
|
|
243
|
+
}), [I]), /* @__PURE__ */ x(L, { className: "relative", ref: v, children: [
|
|
244
|
+
/* @__PURE__ */ s(
|
|
245
|
+
Ge,
|
|
246
246
|
{
|
|
247
247
|
disabled: n,
|
|
248
|
-
endIcon: /* @__PURE__ */
|
|
248
|
+
endIcon: /* @__PURE__ */ s(Ze, { size: "24" }),
|
|
249
249
|
error: a,
|
|
250
250
|
hint: o,
|
|
251
251
|
label: e,
|
|
252
252
|
name: t ?? e,
|
|
253
|
-
onChange: (
|
|
254
|
-
T(
|
|
253
|
+
onChange: (g) => {
|
|
254
|
+
T(g.target.value);
|
|
255
255
|
},
|
|
256
256
|
onFocus: () => k(!0),
|
|
257
257
|
ref: h,
|
|
@@ -259,11 +259,11 @@ const Dt = ({
|
|
|
259
259
|
...m
|
|
260
260
|
}
|
|
261
261
|
),
|
|
262
|
-
N ? /* @__PURE__ */
|
|
262
|
+
N ? /* @__PURE__ */ s(L, { className: "absolute top-[calc(100%+1px)] w-full z-50", children: /* @__PURE__ */ s(Qe, { className: "max-h-[300px] overflow-y-auto", children: w.length ? w.map((g, c) => /* @__PURE__ */ s(me, { onClick: () => E(g), children: g.label }, `${g.value}-${c}`)) : /* @__PURE__ */ s(me, { children: l }) }) }) : null
|
|
263
263
|
] });
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
const
|
|
264
|
+
}, Ht = y(Vt);
|
|
265
|
+
Ht.displayName = "AutocompleteSelect";
|
|
266
|
+
const Se = {
|
|
267
267
|
base: "font-bold",
|
|
268
268
|
xs: "text-16 md:text-19 leading-default",
|
|
269
269
|
sm: "text-19 md:text-23 leading-default md:leading-comfy",
|
|
@@ -279,23 +279,23 @@ const Ne = {
|
|
|
279
279
|
md: "text-16",
|
|
280
280
|
lg: "text-19",
|
|
281
281
|
xl: "text-23 md:text-28 tracking-tight"
|
|
282
|
-
},
|
|
282
|
+
}, pe = {
|
|
283
283
|
...J,
|
|
284
284
|
base: "font-regular leading-loose",
|
|
285
285
|
xl: "text-23 md:text-28"
|
|
286
|
-
},
|
|
286
|
+
}, Oe = {
|
|
287
287
|
base: "font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",
|
|
288
288
|
xs: "text-11",
|
|
289
289
|
sm: "text-13",
|
|
290
290
|
md: "text-16",
|
|
291
291
|
lg: "text-19",
|
|
292
292
|
xl: "text-23"
|
|
293
|
-
},
|
|
293
|
+
}, Ee = {
|
|
294
294
|
base: "font-regular leading-default text-text-muted-light dark:text-text-muted-dark",
|
|
295
295
|
sm: "text-11",
|
|
296
296
|
md: "text-13",
|
|
297
297
|
lg: "text-16"
|
|
298
|
-
},
|
|
298
|
+
}, Ie = {
|
|
299
299
|
base: "font-bold leading-default",
|
|
300
300
|
xs: "text-11",
|
|
301
301
|
sm: "text-13",
|
|
@@ -306,56 +306,56 @@ const Ne = {
|
|
|
306
306
|
sm: "text-11",
|
|
307
307
|
md: "text-13",
|
|
308
308
|
lg: "text-16"
|
|
309
|
-
},
|
|
309
|
+
}, Ce = {
|
|
310
310
|
base: "font-regular leading-loose",
|
|
311
311
|
md: "text-16",
|
|
312
312
|
lg: "text-19"
|
|
313
|
-
},
|
|
313
|
+
}, Xe = ({ size: e, variant: t }) => {
|
|
314
314
|
switch (t) {
|
|
315
315
|
case "headline":
|
|
316
|
-
return d(
|
|
316
|
+
return d(Se.base, Se[e]);
|
|
317
317
|
case "label":
|
|
318
318
|
return d(J.base, e ? J[e] : J.default);
|
|
319
319
|
case "paragraph":
|
|
320
|
-
return d(
|
|
320
|
+
return d(pe.base, e ? pe[e] : pe.default);
|
|
321
321
|
case "eyebrow":
|
|
322
|
-
return d(Se.base, Se[e]);
|
|
323
|
-
case "caption":
|
|
324
322
|
return d(Oe.base, Oe[e]);
|
|
325
|
-
case "
|
|
323
|
+
case "caption":
|
|
326
324
|
return d(Ee.base, Ee[e]);
|
|
325
|
+
case "buttonLabel":
|
|
326
|
+
return d(Ie.base, Ie[e]);
|
|
327
327
|
case "fieldLabel":
|
|
328
328
|
return d(Le.base, Le[e]);
|
|
329
329
|
case "fieldTextInput":
|
|
330
|
-
return d(
|
|
330
|
+
return d(Ce.base, Ce[e]);
|
|
331
331
|
default:
|
|
332
332
|
return e;
|
|
333
333
|
}
|
|
334
|
-
},
|
|
334
|
+
}, Je = {
|
|
335
335
|
primary: "font-aktiv-grotesk",
|
|
336
336
|
secondary: "font-untitled-serif"
|
|
337
|
-
},
|
|
338
|
-
const u = "text-text-light dark:text-text-dark", f =
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
|
|
337
|
+
}, At = ({ className: e, component: t = "p", children: r, font: n = "primary", size: a, variant: o, ...l }, i) => {
|
|
338
|
+
const u = "text-text-light dark:text-text-dark", f = Je[n], m = Xe({ size: a, variant: o });
|
|
339
|
+
return /* @__PURE__ */ s(
|
|
340
|
+
L,
|
|
341
341
|
{
|
|
342
342
|
className: d(u, m, f, e),
|
|
343
343
|
component: t,
|
|
344
344
|
ref: i,
|
|
345
|
-
...
|
|
345
|
+
...l,
|
|
346
346
|
children: r
|
|
347
347
|
}
|
|
348
348
|
);
|
|
349
|
-
}, P = y(
|
|
349
|
+
}, P = y(At);
|
|
350
350
|
P.displayName = "Text";
|
|
351
|
-
const
|
|
351
|
+
const Ut = ({
|
|
352
352
|
children: e,
|
|
353
353
|
component: t = "a",
|
|
354
354
|
className: r,
|
|
355
355
|
disabled: n,
|
|
356
356
|
active: a,
|
|
357
357
|
...o
|
|
358
|
-
}) => /* @__PURE__ */
|
|
358
|
+
}) => /* @__PURE__ */ s(
|
|
359
359
|
P,
|
|
360
360
|
{
|
|
361
361
|
className: d([
|
|
@@ -369,34 +369,34 @@ const jt = ({
|
|
|
369
369
|
children: e
|
|
370
370
|
}
|
|
371
371
|
);
|
|
372
|
-
|
|
373
|
-
var
|
|
372
|
+
Ut.displayName = "Breadcrumb";
|
|
373
|
+
var Kt = Object.defineProperty, qt = Object.defineProperties, Zt = Object.getOwnPropertyDescriptors, te = Object.getOwnPropertySymbols, Ye = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, Pe = (e, t, r) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Gt = (e, t) => {
|
|
374
374
|
for (var r in t || (t = {}))
|
|
375
|
-
|
|
375
|
+
Ye.call(t, r) && Pe(e, r, t[r]);
|
|
376
376
|
if (te)
|
|
377
377
|
for (var r of te(t))
|
|
378
|
-
|
|
378
|
+
et.call(t, r) && Pe(e, r, t[r]);
|
|
379
379
|
return e;
|
|
380
|
-
},
|
|
380
|
+
}, Qt = (e, t) => qt(e, Zt(t)), Xt = (e, t) => {
|
|
381
381
|
var r = {};
|
|
382
382
|
for (var n in e)
|
|
383
|
-
|
|
383
|
+
Ye.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
384
384
|
if (e != null && te)
|
|
385
385
|
for (var n of te(e))
|
|
386
|
-
t.indexOf(n) < 0 &&
|
|
386
|
+
t.indexOf(n) < 0 && et.call(e, n) && (r[n] = e[n]);
|
|
387
387
|
return r;
|
|
388
|
-
},
|
|
389
|
-
var r = e, { title: n, titleId: a } = r, o =
|
|
390
|
-
return x("svg",
|
|
391
|
-
},
|
|
392
|
-
const
|
|
393
|
-
const a =
|
|
388
|
+
}, Jt = (e, t) => {
|
|
389
|
+
var r = e, { title: n, titleId: a } = r, o = Xt(r, ["title", "titleId"]);
|
|
390
|
+
return x("svg", Qt(Gt({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.293 18.707a1 1 0 0 1 0-1.414l4.94-4.94a.5.5 0 0 0 0-.707l-4.94-4.939a1 1 0 0 1 1.414-1.414l5.647 5.646a1.5 1.5 0 0 1 0 2.122l-5.647 5.646a1 1 0 0 1-1.414 0Z", fill: "currentColor" })] }));
|
|
391
|
+
}, Yt = y(Jt), er = Yt;
|
|
392
|
+
const tr = ({ children: e, className: t, ...r }, n) => {
|
|
393
|
+
const a = St.toArray(e), o = a.findIndex((l) => {
|
|
394
394
|
var i;
|
|
395
|
-
return
|
|
395
|
+
return Ot(l) ? (i = l == null ? void 0 : l.props) == null ? void 0 : i.active : !1;
|
|
396
396
|
});
|
|
397
|
-
return /* @__PURE__ */
|
|
398
|
-
i ? /* @__PURE__ */
|
|
399
|
-
|
|
397
|
+
return /* @__PURE__ */ s("div", { className: d(["flex py-0.5 flex-row min-h-[48px] rtl:rotate-180", t]), ref: n, ...r, children: a.map((l, i) => /* @__PURE__ */ x("div", { className: "flex items-center", children: [
|
|
398
|
+
i ? /* @__PURE__ */ s(
|
|
399
|
+
er,
|
|
400
400
|
{
|
|
401
401
|
className: d([
|
|
402
402
|
"mx-1",
|
|
@@ -406,25 +406,25 @@ const qt = ({ children: e, className: t, ...r }, n) => {
|
|
|
406
406
|
size: "15"
|
|
407
407
|
}
|
|
408
408
|
) : null,
|
|
409
|
-
typeof
|
|
410
|
-
...
|
|
409
|
+
typeof l == "object" && "type" in l ? M(l.type, {
|
|
410
|
+
...l.props,
|
|
411
411
|
className: d([
|
|
412
|
-
|
|
412
|
+
l.props.className ?? "",
|
|
413
413
|
i < o ? "bg-gray-10 dark:bg-gray-40 py-1 px-2 rounded-3 cursor-pointer" : "px-0.5",
|
|
414
414
|
i > o && "[&>*]:text-gray-15 [&>*]:text-16 [&>*]:leading-loose [&>*]:font-medium",
|
|
415
415
|
"rtl:rotate-180"
|
|
416
416
|
])
|
|
417
|
-
}) :
|
|
418
|
-
] }, `${i}-${
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
const
|
|
417
|
+
}) : l
|
|
418
|
+
] }, `${i}-${l.toString()}`)) });
|
|
419
|
+
}, rr = y(tr);
|
|
420
|
+
rr.displayName = "Breadcrumbs";
|
|
421
|
+
const qn = {
|
|
422
422
|
lg: "lg",
|
|
423
423
|
md: "md",
|
|
424
424
|
sm: "sm",
|
|
425
425
|
xl: "xl",
|
|
426
426
|
xs: "xs"
|
|
427
|
-
},
|
|
427
|
+
}, tt = (e) => {
|
|
428
428
|
switch (e) {
|
|
429
429
|
case "start":
|
|
430
430
|
return {
|
|
@@ -457,7 +457,7 @@ const Bn = {
|
|
|
457
457
|
sm: 18,
|
|
458
458
|
xl: 36,
|
|
459
459
|
xs: 12
|
|
460
|
-
},
|
|
460
|
+
}, rt = "items-center leading-default font-bold ease-in-out duration-100 focus:ring-2 focus:ring-info-light dark:focus:ring-info-dark flex w-full max-w-fit h-fit", de = {
|
|
461
461
|
// bgColor, outlineColor, disabled, fontColor, hover, pressed, disabled, textTransform
|
|
462
462
|
all_caps: "bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase",
|
|
463
463
|
borderless: "bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent",
|
|
@@ -469,36 +469,36 @@ const Bn = {
|
|
|
469
469
|
"risk:stroked": "bg-transparent ring ring-2 ring-alert dark:ring-alert-dark text-alert dark:text-alert-dark hover:bg-alert dark:hover:bg-alert-dark hover:text-white dark:hover:text-white active:bg-alert dark:active:bg-alert-dark disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2",
|
|
470
470
|
secondary: "bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50",
|
|
471
471
|
stroked: "bg-transparent ring ring-2 ring-gray-50 dark:ring-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white"
|
|
472
|
-
},
|
|
472
|
+
}, nr = ({
|
|
473
473
|
className: e,
|
|
474
474
|
children: t,
|
|
475
475
|
disabled: r,
|
|
476
476
|
icon: n,
|
|
477
477
|
iconAction: a,
|
|
478
478
|
iconPosition: o,
|
|
479
|
-
size:
|
|
479
|
+
size: l = "md",
|
|
480
480
|
type: i = "button",
|
|
481
481
|
variant: u = "primary",
|
|
482
482
|
...f
|
|
483
483
|
}, m) => {
|
|
484
|
-
const h =
|
|
485
|
-
return /* @__PURE__ */ x("button", { className:
|
|
486
|
-
o === "start" && n !== void 0 ?
|
|
484
|
+
const h = tt(n !== void 0 ? o : void 0), v = d(rt, de[u], h[l], e);
|
|
485
|
+
return /* @__PURE__ */ x("button", { className: v, disabled: r, ref: m, type: i, ...f, children: [
|
|
486
|
+
o === "start" && n !== void 0 ? M(n, {
|
|
487
487
|
className: "mr-0.5",
|
|
488
488
|
onClick: a ?? void 0,
|
|
489
|
-
size: re[
|
|
489
|
+
size: re[l]
|
|
490
490
|
}) : null,
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
o === "end" && n !== void 0 ?
|
|
491
|
+
/* @__PURE__ */ s("span", { className: "truncate", children: t }),
|
|
492
|
+
o === "end" && n !== void 0 ? M(n, {
|
|
493
493
|
className: "ml-0.5",
|
|
494
494
|
onClick: a ?? void 0,
|
|
495
|
-
size: re[
|
|
495
|
+
size: re[l]
|
|
496
496
|
}) : null
|
|
497
497
|
] });
|
|
498
|
-
},
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
const i =
|
|
498
|
+
}, ne = y(nr);
|
|
499
|
+
ne.displayName = "Button";
|
|
500
|
+
const ar = ({ error: e, className: t, label: r, disabled: n, name: a, ...o }, l) => {
|
|
501
|
+
const i = Et(), u = V(() => `checkbox-label-${i}`, [i]);
|
|
502
502
|
return /* @__PURE__ */ x(
|
|
503
503
|
"div",
|
|
504
504
|
{
|
|
@@ -507,7 +507,7 @@ const Qt = ({ error: e, className: t, label: r, disabled: n, name: a, ...o }, s)
|
|
|
507
507
|
t
|
|
508
508
|
]),
|
|
509
509
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ s(
|
|
511
511
|
"input",
|
|
512
512
|
{
|
|
513
513
|
"aria-labelledby": u,
|
|
@@ -515,19 +515,38 @@ const Qt = ({ error: e, className: t, label: r, disabled: n, name: a, ...o }, s)
|
|
|
515
515
|
disabled: n,
|
|
516
516
|
id: a,
|
|
517
517
|
name: a,
|
|
518
|
-
ref:
|
|
518
|
+
ref: l,
|
|
519
519
|
type: "checkbox",
|
|
520
520
|
...o
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
|
-
r ? /* @__PURE__ */
|
|
524
|
-
e ? /* @__PURE__ */
|
|
523
|
+
r ? /* @__PURE__ */ s("div", { className: "peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark", children: /* @__PURE__ */ s("label", { htmlFor: a, id: u, children: r }) }) : null,
|
|
524
|
+
e ? /* @__PURE__ */ s("div", { className: "text-alert-light dark:text-alert-dark text-13", children: e }) : null
|
|
525
525
|
]
|
|
526
526
|
}
|
|
527
527
|
);
|
|
528
|
-
},
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
}, or = y(ar);
|
|
529
|
+
or.displayName = "Checkbox";
|
|
530
|
+
var sr = Object.defineProperty, lr = Object.defineProperties, ir = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, Be = (e, t, r) => t in e ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, dr = (e, t) => {
|
|
531
|
+
for (var r in t || (t = {}))
|
|
532
|
+
nt.call(t, r) && Be(e, r, t[r]);
|
|
533
|
+
if (ae)
|
|
534
|
+
for (var r of ae(t))
|
|
535
|
+
at.call(t, r) && Be(e, r, t[r]);
|
|
536
|
+
return e;
|
|
537
|
+
}, cr = (e, t) => lr(e, ir(t)), ur = (e, t) => {
|
|
538
|
+
var r = {};
|
|
539
|
+
for (var n in e)
|
|
540
|
+
nt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
541
|
+
if (e != null && ae)
|
|
542
|
+
for (var n of ae(e))
|
|
543
|
+
t.indexOf(n) < 0 && at.call(e, n) && (r[n] = e[n]);
|
|
544
|
+
return r;
|
|
545
|
+
}, fr = (e, t) => {
|
|
546
|
+
var r = e, { title: n, titleId: a } = r, o = ur(r, ["title", "titleId"]);
|
|
547
|
+
return x("svg", cr(dr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.768 11.646a.5.5 0 0 0 0 .708l3.182 3.182a1 1 0 0 1-1.414 1.414l-3.182-3.182a.5.5 0 0 0-.708 0L8.464 16.95a1 1 0 1 1-1.414-1.414l3.182-3.182a.5.5 0 0 0 0-.708L7.05 8.464A1 1 0 1 1 8.464 7.05l3.182 3.182a.5.5 0 0 0 .707 0l3.183-3.182a1 1 0 1 1 1.414 1.414l-3.182 3.182Z", fill: "currentColor" })] }));
|
|
548
|
+
}, pr = y(fr), mr = pr;
|
|
549
|
+
const ot = ({ children: e, autoFocus: t = !0 }) => {
|
|
531
550
|
const r = B(null);
|
|
532
551
|
return A(() => {
|
|
533
552
|
if (r.current) {
|
|
@@ -535,11 +554,11 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
|
|
|
535
554
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
536
555
|
);
|
|
537
556
|
let a = document.activeElement;
|
|
538
|
-
const o = n[0],
|
|
557
|
+
const o = n[0], l = n[n.length - 1], i = (m) => {
|
|
539
558
|
if (m.key === "Tab") {
|
|
540
559
|
if (m.shiftKey) {
|
|
541
560
|
if (document.activeElement === o)
|
|
542
|
-
m.preventDefault(),
|
|
561
|
+
m.preventDefault(), l.focus(), a = l;
|
|
543
562
|
else
|
|
544
563
|
for (let h = 0; h < n.length; h++)
|
|
545
564
|
if (n[h] === document.activeElement) {
|
|
@@ -547,7 +566,7 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
|
|
|
547
566
|
break;
|
|
548
567
|
}
|
|
549
568
|
} else if (!m.shiftKey) {
|
|
550
|
-
if (document.activeElement ===
|
|
569
|
+
if (document.activeElement === l)
|
|
551
570
|
m.preventDefault(), o.focus(), a = o;
|
|
552
571
|
else
|
|
553
572
|
for (let h = 0; h < n.length; h++)
|
|
@@ -573,280 +592,332 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
|
|
|
573
592
|
document.removeEventListener("keydown", i), document.removeEventListener("click", f);
|
|
574
593
|
};
|
|
575
594
|
}
|
|
576
|
-
}, [t]), /* @__PURE__ */
|
|
577
|
-
},
|
|
578
|
-
"div",
|
|
579
|
-
{
|
|
580
|
-
className: "bg-blue-30 h-2 ease-in-out duration-300",
|
|
581
|
-
style: {
|
|
582
|
-
transitionProperty: "width",
|
|
583
|
-
width: `${t}%`
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
) }), Yt = ({ children: e, className: t, disabled: r, type: n = "button", variant: a = "borderless", ...o }, s) => /* @__PURE__ */ l(
|
|
595
|
+
}, [t]), /* @__PURE__ */ s("div", { ref: r, children: e });
|
|
596
|
+
}, br = ({ children: e, className: t, disabled: r, type: n = "button", variant: a = "borderless", ...o }, l) => /* @__PURE__ */ s(
|
|
587
597
|
"button",
|
|
588
598
|
{
|
|
589
599
|
className: d([
|
|
590
600
|
"rounded-full inline-flex justify-center items-center p-1",
|
|
591
601
|
t,
|
|
592
|
-
|
|
602
|
+
de[a],
|
|
593
603
|
r ? "pointer-events-none" : ""
|
|
594
604
|
]),
|
|
595
605
|
disabled: r,
|
|
596
|
-
ref:
|
|
606
|
+
ref: l,
|
|
597
607
|
type: n,
|
|
598
608
|
...o,
|
|
599
609
|
children: e
|
|
600
610
|
}
|
|
601
|
-
),
|
|
602
|
-
|
|
603
|
-
const
|
|
611
|
+
), st = y(br);
|
|
612
|
+
st.displayName = "IconButton";
|
|
613
|
+
const gr = {
|
|
614
|
+
1: "h1",
|
|
615
|
+
2: "h2",
|
|
616
|
+
3: "h3",
|
|
617
|
+
4: "h4"
|
|
618
|
+
}, hr = ({ className: e, children: t, font: r = "primary", level: n = 1, size: a, variant: o, ...l }, i) => {
|
|
619
|
+
const u = "text-text-light dark:text-text-dark", f = Je[r], m = Xe({ size: a, variant: o });
|
|
620
|
+
return /* @__PURE__ */ s(
|
|
621
|
+
L,
|
|
622
|
+
{
|
|
623
|
+
className: d(u, m, f, e),
|
|
624
|
+
component: gr[n],
|
|
625
|
+
ref: i,
|
|
626
|
+
...l,
|
|
627
|
+
children: t
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
}, lt = y(hr);
|
|
631
|
+
lt.displayName = "Heading";
|
|
632
|
+
const xr = ({
|
|
633
|
+
autoFocus: e = !0,
|
|
634
|
+
children: t,
|
|
635
|
+
className: r,
|
|
636
|
+
confirmationButtons: n,
|
|
637
|
+
dialogType: a = "confirmation",
|
|
638
|
+
heading: o,
|
|
639
|
+
isDismissableOnOutsideClick: l = !0,
|
|
640
|
+
onClose: i,
|
|
641
|
+
...u
|
|
642
|
+
}, f) => (zt(), /* @__PURE__ */ x("div", { className: "flex items-center justify-center w-full h-full z-20 absolute inset-0", children: [
|
|
643
|
+
/* @__PURE__ */ s(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
className: "absolute inset-0 bg-overlay-light dark:bg-overlay-dark",
|
|
647
|
+
"data-testid": "dialog-overlay",
|
|
648
|
+
id: "overlay",
|
|
649
|
+
onClick: l ? i : void 0
|
|
650
|
+
}
|
|
651
|
+
),
|
|
652
|
+
/* @__PURE__ */ s(ot, { autoFocus: e, children: /* @__PURE__ */ x(
|
|
653
|
+
"dialog",
|
|
654
|
+
{
|
|
655
|
+
className: d(
|
|
656
|
+
" z-20 relative rounded-2 p-3 mlb-4 mli-2 bg-canvas-light dark:bg-canvas-dark",
|
|
657
|
+
a === "confirmation" ? "max-w-[400px]" : "max-w-[700px]",
|
|
658
|
+
r
|
|
659
|
+
),
|
|
660
|
+
open: !0,
|
|
661
|
+
ref: f,
|
|
662
|
+
...u,
|
|
663
|
+
children: [
|
|
664
|
+
a === "modal" ? /* @__PURE__ */ s(
|
|
665
|
+
st,
|
|
666
|
+
{
|
|
667
|
+
className: "absolute inline-end-2 block-start-2",
|
|
668
|
+
"data-testid": "close-modal-button",
|
|
669
|
+
onClick: i,
|
|
670
|
+
children: /* @__PURE__ */ s(mr, {})
|
|
671
|
+
}
|
|
672
|
+
) : null,
|
|
673
|
+
/* @__PURE__ */ s("div", { children: o ? /* @__PURE__ */ s(lt, { className: "pbe-1", size: "md", variant: "headline", children: o }) : null }),
|
|
674
|
+
/* @__PURE__ */ s("div", { children: t }),
|
|
675
|
+
/* @__PURE__ */ s("div", { className: "w-full flex justify-end items-center pbs-2", children: n == null ? void 0 : n.map(({ label: h, ...v }, b) => (
|
|
676
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
677
|
+
/* @__PURE__ */ s(ne, { "aria-label": h, size: "sm", variant: "all_caps", ...v, children: h }, `${h}${b}`)
|
|
678
|
+
)) })
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
) })
|
|
682
|
+
] })), yr = y(xr);
|
|
683
|
+
yr.displayName = "Dialog";
|
|
684
|
+
const Zn = ({ className: e, ...t }) => /* @__PURE__ */ s("hr", { ...t, className: d("w-full border-gray-15 dark:border-gray-30 border-standard", e) }), Gn = ({ className: e, progress: t }) => /* @__PURE__ */ s("div", { className: d(["w-full bg-gray-15 h-2 rounded-3 overflow-hidden", e]), children: /* @__PURE__ */ s(
|
|
685
|
+
"div",
|
|
686
|
+
{
|
|
687
|
+
className: "bg-blue-30 h-2 ease-in-out duration-300",
|
|
688
|
+
style: {
|
|
689
|
+
transitionProperty: "width",
|
|
690
|
+
width: `${t}%`
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
) }), vr = ({ className: e, children: t, component: r = "a", variant: n = "borderless", ...a }, o) => M(
|
|
604
694
|
r,
|
|
605
695
|
{
|
|
606
696
|
...a,
|
|
607
697
|
className: d([
|
|
608
698
|
"rounded-full inline-flex justify-center items-center p-1 no-underline cursor-pointer",
|
|
609
|
-
|
|
699
|
+
de[n],
|
|
610
700
|
e
|
|
611
701
|
]),
|
|
612
702
|
ref: o
|
|
613
703
|
},
|
|
614
704
|
t
|
|
615
|
-
),
|
|
616
|
-
|
|
617
|
-
var
|
|
705
|
+
), wr = y(vr);
|
|
706
|
+
wr.displayName = "IconLinkButton";
|
|
707
|
+
var kr = Object.defineProperty, $r = Object.defineProperties, Nr = Object.getOwnPropertyDescriptors, oe = Object.getOwnPropertySymbols, it = Object.prototype.hasOwnProperty, dt = Object.prototype.propertyIsEnumerable, Te = (e, t, r) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Sr = (e, t) => {
|
|
618
708
|
for (var r in t || (t = {}))
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
for (var r of
|
|
622
|
-
|
|
709
|
+
it.call(t, r) && Te(e, r, t[r]);
|
|
710
|
+
if (oe)
|
|
711
|
+
for (var r of oe(t))
|
|
712
|
+
dt.call(t, r) && Te(e, r, t[r]);
|
|
623
713
|
return e;
|
|
624
|
-
},
|
|
714
|
+
}, Or = (e, t) => $r(e, Nr(t)), Er = (e, t) => {
|
|
625
715
|
var r = {};
|
|
626
716
|
for (var n in e)
|
|
627
|
-
|
|
628
|
-
if (e != null &&
|
|
629
|
-
for (var n of
|
|
630
|
-
t.indexOf(n) < 0 &&
|
|
717
|
+
it.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
718
|
+
if (e != null && oe)
|
|
719
|
+
for (var n of oe(e))
|
|
720
|
+
t.indexOf(n) < 0 && dt.call(e, n) && (r[n] = e[n]);
|
|
631
721
|
return r;
|
|
632
|
-
},
|
|
633
|
-
var r = e, { title: n, titleId: a } = r, o =
|
|
634
|
-
return x("svg",
|
|
635
|
-
},
|
|
722
|
+
}, Ir = (e, t) => {
|
|
723
|
+
var r = e, { title: n, titleId: a } = r, o = Er(r, ["title", "titleId"]);
|
|
724
|
+
return x("svg", Or(Sr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.768 11.646a.5.5 0 0 0 0 .708l3.182 3.182a1 1 0 0 1-1.414 1.414l-3.182-3.182a.5.5 0 0 0-.708 0L8.464 16.95a1 1 0 1 1-1.414-1.414l3.182-3.182a.5.5 0 0 0 0-.708L7.05 8.464A1 1 0 0 1 8.464 7.05l3.182 3.182a.5.5 0 0 0 .707 0l3.183-3.182a1 1 0 1 1 1.414 1.414l-3.182 3.182Z", fill: "currentColor" })] }));
|
|
725
|
+
}, Lr = y(Ir), Cr = Lr, Pr = Object.defineProperty, Br = Object.defineProperties, Tr = Object.getOwnPropertyDescriptors, se = Object.getOwnPropertySymbols, ct = Object.prototype.hasOwnProperty, ut = Object.prototype.propertyIsEnumerable, De = (e, t, r) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Dr = (e, t) => {
|
|
636
726
|
for (var r in t || (t = {}))
|
|
637
|
-
|
|
638
|
-
if (
|
|
639
|
-
for (var r of
|
|
640
|
-
|
|
727
|
+
ct.call(t, r) && De(e, r, t[r]);
|
|
728
|
+
if (se)
|
|
729
|
+
for (var r of se(t))
|
|
730
|
+
ut.call(t, r) && De(e, r, t[r]);
|
|
641
731
|
return e;
|
|
642
|
-
},
|
|
732
|
+
}, jr = (e, t) => Br(e, Tr(t)), Rr = (e, t) => {
|
|
643
733
|
var r = {};
|
|
644
734
|
for (var n in e)
|
|
645
|
-
|
|
646
|
-
if (e != null &&
|
|
647
|
-
for (var n of
|
|
648
|
-
t.indexOf(n) < 0 &&
|
|
735
|
+
ct.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
736
|
+
if (e != null && se)
|
|
737
|
+
for (var n of se(e))
|
|
738
|
+
t.indexOf(n) < 0 && ut.call(e, n) && (r[n] = e[n]);
|
|
649
739
|
return r;
|
|
650
|
-
},
|
|
651
|
-
var r = e, { title: n, titleId: a } = r, o =
|
|
652
|
-
return x("svg",
|
|
653
|
-
},
|
|
740
|
+
}, Mr = (e, t) => {
|
|
741
|
+
var r = e, { title: n, titleId: a } = r, o = Rr(r, ["title", "titleId"]);
|
|
742
|
+
return x("svg", jr(Dr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { d: "M9.346 14.272c.15.228.499.228 1.194.228h5.628c.81 0 1.215 0 1.36-.262.145-.261-.07-.605-.5-1.292l-.667-1.068c-.386-.618-.58-.928-.861-.928s-.475.31-.861.928l-.453.724-1.252-2.924c-.4-.931-.6-1.397-.934-1.397-.335 0-.534.466-.934 1.397l-1.46 3.406c-.273.64-.41.96-.26 1.188ZM18 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z", fill: "currentColor" }), s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.879 3.379C6 4.257 6 5.672 6 8.5v3c0 2.828 0 4.243.879 5.121.878.879 2.293.879 5.121.879h3c2.828 0 4.243 0 5.121-.879C21 15.743 21 14.328 21 11.5v-3c0-2.828 0-4.243-.879-5.121C19.243 2.5 17.828 2.5 15 2.5h-3c-2.828 0-4.243 0-5.121.879ZM18.02 4.623c-.65-.087-1.55-.092-3.021-.092h-3c-1.472 0-2.371.005-3.021.092-.301.04-.466.09-.554.126a.292.292 0 0 0-.11.066.292.292 0 0 0-.066.11 2.313 2.313 0 0 0-.126.554c-.087.65-.092 1.55-.092 3.021v3c0 1.472.005 2.371.092 3.021.04.301.09.466.126.554.03.072.05.095.066.11a.292.292 0 0 0 .11.066c.088.036.253.085.554.126.65.087 1.55.092 3.021.092h3c1.472 0 2.371-.005 3.021-.092.301-.04.466-.09.554-.126a.292.292 0 0 0 .11-.066.292.292 0 0 0 .066-.11c.036-.088.085-.253.126-.554.087-.65.092-1.55.092-3.021v-3c0-1.472-.005-2.371-.092-3.021a2.313 2.313 0 0 0-.126-.554.292.292 0 0 0-.066-.11.292.292 0 0 0-.11-.066 2.313 2.313 0 0 0-.554-.126Z", fill: "currentColor" }), s("path", { d: "M2 8.5c0-1 1-2 2-2v9a4 4 0 0 0 4 4h9c0 1-.887 2-2 2H8a6 6 0 0 1-6-6v-7Z", fill: "currentColor" })] }));
|
|
743
|
+
}, zr = y(Mr), Wr = zr, Fr = Object.defineProperty, _r = Object.defineProperties, Vr = Object.getOwnPropertyDescriptors, le = Object.getOwnPropertySymbols, ft = Object.prototype.hasOwnProperty, pt = Object.prototype.propertyIsEnumerable, je = (e, t, r) => t in e ? Fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Hr = (e, t) => {
|
|
654
744
|
for (var r in t || (t = {}))
|
|
655
|
-
|
|
656
|
-
if (
|
|
657
|
-
for (var r of
|
|
658
|
-
|
|
745
|
+
ft.call(t, r) && je(e, r, t[r]);
|
|
746
|
+
if (le)
|
|
747
|
+
for (var r of le(t))
|
|
748
|
+
pt.call(t, r) && je(e, r, t[r]);
|
|
659
749
|
return e;
|
|
660
|
-
},
|
|
750
|
+
}, Ar = (e, t) => _r(e, Vr(t)), Ur = (e, t) => {
|
|
661
751
|
var r = {};
|
|
662
752
|
for (var n in e)
|
|
663
|
-
|
|
664
|
-
if (e != null &&
|
|
665
|
-
for (var n of
|
|
666
|
-
t.indexOf(n) < 0 &&
|
|
753
|
+
ft.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
754
|
+
if (e != null && le)
|
|
755
|
+
for (var n of le(e))
|
|
756
|
+
t.indexOf(n) < 0 && pt.call(e, n) && (r[n] = e[n]);
|
|
667
757
|
return r;
|
|
668
|
-
},
|
|
669
|
-
var r = e, { title: n, titleId: a } = r, o =
|
|
670
|
-
return x("svg",
|
|
671
|
-
},
|
|
672
|
-
const
|
|
673
|
-
1: "h1",
|
|
674
|
-
2: "h2",
|
|
675
|
-
3: "h3",
|
|
676
|
-
4: "h4"
|
|
677
|
-
}, Pr = ({ className: e, children: t, font: r = "primary", level: n = 1, size: a, variant: o, ...s }, i) => {
|
|
678
|
-
const u = "text-text-light dark:text-text-dark", f = Qe[r], m = Ge({ size: a, variant: o });
|
|
679
|
-
return /* @__PURE__ */ l(
|
|
680
|
-
I,
|
|
681
|
-
{
|
|
682
|
-
className: d(u, m, f, e),
|
|
683
|
-
component: Cr[n],
|
|
684
|
-
ref: i,
|
|
685
|
-
...s,
|
|
686
|
-
children: t
|
|
687
|
-
}
|
|
688
|
-
);
|
|
689
|
-
}, Br = y(Pr);
|
|
690
|
-
Br.displayName = "Heading";
|
|
691
|
-
const Tr = ({
|
|
758
|
+
}, Kr = (e, t) => {
|
|
759
|
+
var r = e, { title: n, titleId: a } = r, o = Ur(r, ["title", "titleId"]);
|
|
760
|
+
return x("svg", Ar(Hr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? s("title", { id: a, children: n }) : null, s("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 4a1 1 0 0 1 1-1 9 9 0 0 1 9 9 1 1 0 1 1-2 0 7.001 7.001 0 0 0-7-7 1 1 0 0 1-1-1Z", fill: "currentColor", children: s("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 12 12", to: "360 12 12", dur: o.dur, repeatCount: "indefinite" }) })] }));
|
|
761
|
+
}, qr = y(Kr), Zr = qr;
|
|
762
|
+
const Gr = ({
|
|
692
763
|
acceptedFileTypes: e = ["image/*"],
|
|
693
764
|
changeImageButtonLabel: t = "Change",
|
|
694
765
|
chooseImageButtonLabel: r = "Choose Image",
|
|
695
766
|
className: n,
|
|
696
767
|
disabled: a = !1,
|
|
697
768
|
dismissCallback: o,
|
|
698
|
-
dismissImageAriaLabel:
|
|
769
|
+
dismissImageAriaLabel: l = "Remove Image",
|
|
699
770
|
error: i = "",
|
|
700
|
-
fileMaxKbSizeError: u = (S,
|
|
771
|
+
fileMaxKbSizeError: u = (S, ce) => `${S} is too big to upload, the maximum size is ${ce}kb. Please try again.`,
|
|
701
772
|
fileMaxSizeError: f = (S) => `${S} is too large to upload. The maximum dimensions are ${c == null ? void 0 : c.maxWidth}x${c == null ? void 0 : c.maxHeight}. Please try again.`,
|
|
702
773
|
fileMinSizeError: m = (S) => `${S} is too small to upload. The minimum dimensions are ${c == null ? void 0 : c.minWidth}x${c == null ? void 0 : c.minHeight}. Please try again.`,
|
|
703
774
|
fileRatioError: h = (S) => `${S} must have a ratio of, ${c == null ? void 0 : c.imageRatio}. Please try again.`,
|
|
704
|
-
fileCallback:
|
|
705
|
-
hero:
|
|
775
|
+
fileCallback: v,
|
|
776
|
+
hero: b = !1,
|
|
706
777
|
hint: p,
|
|
707
778
|
imageWidth: N = 160,
|
|
708
779
|
imageSrc: k,
|
|
709
780
|
label: T = "Upload Image",
|
|
710
781
|
name: E = "imageUpload",
|
|
711
|
-
onBlur:
|
|
712
|
-
preProcessing:
|
|
713
|
-
shape:
|
|
782
|
+
onBlur: I,
|
|
783
|
+
preProcessing: w,
|
|
784
|
+
shape: g = "circle",
|
|
714
785
|
validation: c
|
|
715
786
|
}, Q) => {
|
|
716
|
-
const S = B(null),
|
|
787
|
+
const S = B(null), ce = xe({ forwardedRef: Q, innerRef: S }), [$, U] = z(void 0), [D, j] = z(k ? "resolved" : "idle"), [ue, q] = z(i), bt = () => S != null && S.current ? S.current.click() : void 0, we = V(() => $ && D !== "rejected" ? (j("resolved"), $.imageSrc) : k && D === "resolved" ? (j("resolved"), k) : null, [$, k, D]), gt = V(() => {
|
|
717
788
|
const C = () => {
|
|
718
|
-
o && o(k), U(void 0),
|
|
789
|
+
o && o(k), U(void 0), j("idle");
|
|
719
790
|
};
|
|
720
791
|
switch (D) {
|
|
721
792
|
case "pending":
|
|
722
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ s(L, { className: "animate-spin", children: /* @__PURE__ */ s(Zr, { className: "text-info-light dark:text-info-dark", "data-testid": "loading spinner", size: "32" }) });
|
|
723
794
|
case "resolved":
|
|
724
|
-
return /* @__PURE__ */ x(
|
|
725
|
-
/* @__PURE__ */
|
|
795
|
+
return /* @__PURE__ */ x(ie, { children: [
|
|
796
|
+
/* @__PURE__ */ s(
|
|
726
797
|
"img",
|
|
727
798
|
{
|
|
728
799
|
alt: `${$ == null ? void 0 : $.id} preview`,
|
|
729
800
|
className: d([
|
|
730
801
|
"object-fit w-full h-full",
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
802
|
+
g === "circle" ? "rounded-full" : "rounded-0.5",
|
|
803
|
+
g !== "unset" || !b ? "aspect-square" : "",
|
|
804
|
+
g === "unset" && b ? "aspect-video" : "",
|
|
805
|
+
g === "unset" && !b ? "!aspect-auto" : ""
|
|
735
806
|
]),
|
|
736
807
|
onLoad: () => $ != null && $.imageSrc ? URL.revokeObjectURL($.imageSrc) : void 0,
|
|
737
|
-
src:
|
|
808
|
+
src: we || void 0,
|
|
738
809
|
width: N
|
|
739
810
|
}
|
|
740
811
|
),
|
|
741
|
-
a ? null : /* @__PURE__ */
|
|
742
|
-
|
|
812
|
+
a ? null : /* @__PURE__ */ s(
|
|
813
|
+
ne,
|
|
743
814
|
{
|
|
744
|
-
"aria-label":
|
|
815
|
+
"aria-label": l,
|
|
745
816
|
className: "absolute -top-0.5 -right-0.5 rounded-3 !p-0 !text-text-muted-light dark:text-text-muted-dark bg-white dark:bg-gray-40 dark:hover:bg-white dark:hover:!text-gray-45 hover:!text-white shadow-light-1 dark:shadow-dark-1",
|
|
746
817
|
"data-testid": "remove image",
|
|
747
818
|
onClick: C,
|
|
748
|
-
children: /* @__PURE__ */
|
|
819
|
+
children: /* @__PURE__ */ s(Cr, {})
|
|
749
820
|
}
|
|
750
821
|
)
|
|
751
822
|
] });
|
|
752
823
|
default:
|
|
753
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ s(L, { className: "gray-10 dark:gray-30", children: /* @__PURE__ */ s(Wr, { "data-testid": "placeholder image", size: "32" }) });
|
|
754
825
|
}
|
|
755
826
|
}, [
|
|
756
827
|
a,
|
|
757
828
|
o,
|
|
758
|
-
|
|
759
|
-
|
|
829
|
+
l,
|
|
830
|
+
b,
|
|
760
831
|
$ == null ? void 0 : $.id,
|
|
761
832
|
$ == null ? void 0 : $.imageSrc,
|
|
762
833
|
k,
|
|
763
834
|
D,
|
|
764
835
|
N,
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
]),
|
|
768
|
-
var
|
|
769
|
-
const O = new Image(), Z = (
|
|
836
|
+
we,
|
|
837
|
+
g
|
|
838
|
+
]), ht = ({ file: C, imageUrl: W }) => new Promise((F, _) => {
|
|
839
|
+
var ke;
|
|
840
|
+
const O = new Image(), Z = (ke = c == null ? void 0 : c.imageRatio) == null ? void 0 : ke.split("/");
|
|
770
841
|
O.onload = async () => {
|
|
771
842
|
if (c)
|
|
772
843
|
if (c != null && c.maxByteSize && C.size > c.maxByteSize) {
|
|
773
|
-
U(void 0),
|
|
774
|
-
const
|
|
775
|
-
return q(
|
|
844
|
+
U(void 0), j("rejected");
|
|
845
|
+
const $t = u(C.name, Math.round(c.maxByteSize / 1e3));
|
|
846
|
+
return q($t), _(!1);
|
|
776
847
|
} else {
|
|
777
848
|
if (c != null && c.minWidth && O.width < (c == null ? void 0 : c.minWidth) || c != null && c.minHeight && O.height < (c == null ? void 0 : c.minHeight))
|
|
778
|
-
return U(void 0),
|
|
849
|
+
return U(void 0), j("rejected"), q(m(C.name)), _(!1);
|
|
779
850
|
if (c != null && c.maxHeight && O.height > (c == null ? void 0 : c.maxHeight) || c != null && c.maxWidth && O.width > (c == null ? void 0 : c.maxWidth))
|
|
780
|
-
return U(void 0),
|
|
851
|
+
return U(void 0), j("rejected"), q(f(C.name)), _(!1);
|
|
781
852
|
if (c != null && c.imageRatio && (Z == null ? void 0 : Z.length) === 2 && parseInt(Z[0]) / parseInt(Z[1]) !== O.width / O.height)
|
|
782
|
-
return U(void 0),
|
|
853
|
+
return U(void 0), j("rejected"), q(h(C.name)), _(!1);
|
|
783
854
|
}
|
|
784
|
-
return N = O.width, typeof
|
|
785
|
-
}, O.src =
|
|
786
|
-
}),
|
|
855
|
+
return N = O.width, typeof v == "function" && (console.log("Callback"), await v(C, O)), q(""), F(!0);
|
|
856
|
+
}, O.src = W;
|
|
857
|
+
}), xt = async (C) => {
|
|
787
858
|
try {
|
|
788
|
-
const { files:
|
|
789
|
-
if (
|
|
790
|
-
const F =
|
|
859
|
+
const { files: W } = C.target;
|
|
860
|
+
if (W) {
|
|
861
|
+
const F = W[0], _ = URL.createObjectURL(F);
|
|
791
862
|
let O = !0;
|
|
792
|
-
|
|
863
|
+
j("pending"), w && await w(F), O = await ht({
|
|
793
864
|
file: F,
|
|
794
865
|
imageUrl: _
|
|
795
|
-
}), O && (U({ file: F, id: F.name, imageSrc: _ }),
|
|
866
|
+
}), O && (U({ file: F, id: F.name, imageSrc: _ }), j("resolved"));
|
|
796
867
|
}
|
|
797
|
-
} catch (
|
|
798
|
-
if (
|
|
799
|
-
throw
|
|
868
|
+
} catch (W) {
|
|
869
|
+
if (W instanceof Error)
|
|
870
|
+
throw W;
|
|
800
871
|
}
|
|
801
|
-
},
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
]),
|
|
806
|
-
return /* @__PURE__ */ x(
|
|
872
|
+
}, yt = d([g === "circle" && !b ? "rounded-full aspect-square" : ""]), vt = d([g === "square" && !b ? "aspect-square rounded-1" : ""]), wt = d([
|
|
873
|
+
g === "unset" && !b ? "rounded-1" : "",
|
|
874
|
+
g === "unset" && D !== "idle" && !b ? "aspect-auto" : "",
|
|
875
|
+
g === "unset" && D !== "resolved" && !b ? "aspect-square" : ""
|
|
876
|
+
]), kt = d([b ? "rounded-1 aspect-video" : ""]);
|
|
877
|
+
return /* @__PURE__ */ x(L, { className: d([n]), children: [
|
|
807
878
|
/* @__PURE__ */ x(
|
|
808
|
-
|
|
879
|
+
L,
|
|
809
880
|
{
|
|
810
881
|
className: d([
|
|
811
882
|
"relative border-small border-solid rounded-1 mb-0.5 pt-1 pb-2 px-2 text-text-muted-light dark:text-text-muted-dark",
|
|
812
883
|
,
|
|
813
|
-
|
|
884
|
+
ue ? "border-alert-light dark:border-alert-dark" : "border-tertiary-light dark:border-tertiary-dark",
|
|
814
885
|
a ? "select-none bg-gray-10 dark:bg-gray-40 pointer-events-none" : ""
|
|
815
886
|
]),
|
|
816
887
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */ x(
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
|
|
888
|
+
/* @__PURE__ */ s(P, { className: "pb-1.5 text-text-muted-light dark:text-text-muted-dark", children: /* @__PURE__ */ s("label", { htmlFor: E, children: T }) }),
|
|
889
|
+
/* @__PURE__ */ x(L, { className: "flex relative flex-wrap justify-center md:justify-start", children: [
|
|
890
|
+
/* @__PURE__ */ s(
|
|
891
|
+
L,
|
|
821
892
|
{
|
|
822
893
|
className: d([
|
|
823
894
|
"flex justify-center items-center relative mbe-2 md:mbe-0 md:mie-2",
|
|
824
|
-
|
|
895
|
+
b ? "w-full" : "md:w-1/2 w-4/5",
|
|
825
896
|
a ? "border-small border-solid border-tertiary-light" : "",
|
|
826
897
|
D !== "resolved" ? "bg-gray-10 dark:bg-gray-3" : "",
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
898
|
+
yt,
|
|
899
|
+
vt,
|
|
900
|
+
wt,
|
|
901
|
+
kt
|
|
831
902
|
]),
|
|
832
|
-
children:
|
|
903
|
+
children: gt
|
|
833
904
|
}
|
|
834
905
|
),
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
|
|
906
|
+
/* @__PURE__ */ s(
|
|
907
|
+
ne,
|
|
837
908
|
{
|
|
838
909
|
className: d([
|
|
839
910
|
"my-auto !ring-gray-15 dark:!ring-gray-30 !ring-1 disabled:!bg-gray-15 disabled:!ring-none",
|
|
840
|
-
|
|
911
|
+
b ? "!mbs-2" : ""
|
|
841
912
|
]),
|
|
842
913
|
disabled: a,
|
|
843
|
-
onClick:
|
|
914
|
+
onClick: bt,
|
|
844
915
|
size: "sm",
|
|
845
916
|
variant: "stroked",
|
|
846
917
|
children: D === "resolved" ? t : r
|
|
847
918
|
}
|
|
848
919
|
),
|
|
849
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ s(
|
|
850
921
|
"input",
|
|
851
922
|
{
|
|
852
923
|
accept: e.toString(),
|
|
@@ -854,9 +925,9 @@ const Tr = ({
|
|
|
854
925
|
disabled: a,
|
|
855
926
|
id: E,
|
|
856
927
|
name: E,
|
|
857
|
-
onBlur:
|
|
858
|
-
onChange:
|
|
859
|
-
ref:
|
|
928
|
+
onBlur: I,
|
|
929
|
+
onChange: xt,
|
|
930
|
+
ref: ce,
|
|
860
931
|
title: "",
|
|
861
932
|
type: "file",
|
|
862
933
|
value: ""
|
|
@@ -866,30 +937,30 @@ const Tr = ({
|
|
|
866
937
|
]
|
|
867
938
|
}
|
|
868
939
|
),
|
|
869
|
-
|
|
870
|
-
p ? /* @__PURE__ */
|
|
940
|
+
ue ? /* @__PURE__ */ s(P, { className: "dark:!text-alert-dark !text-alert-light text-13", children: ue }) : null,
|
|
941
|
+
p ? /* @__PURE__ */ s(P, { className: "text-text-muted-light dark:text-text-muted-dark text-13", children: p }) : null
|
|
871
942
|
] });
|
|
872
|
-
},
|
|
873
|
-
|
|
874
|
-
const
|
|
943
|
+
}, Qr = y(Gr);
|
|
944
|
+
Qr.displayName = "ImageUpload";
|
|
945
|
+
const Xr = ({
|
|
875
946
|
className: e,
|
|
876
947
|
children: t,
|
|
877
948
|
component: r = "a",
|
|
878
949
|
icon: n,
|
|
879
950
|
iconPosition: a,
|
|
880
951
|
variant: o = "primary",
|
|
881
|
-
size:
|
|
952
|
+
size: l = "md",
|
|
882
953
|
...i
|
|
883
954
|
}, u) => {
|
|
884
|
-
const f =
|
|
885
|
-
return /* @__PURE__ */ x(({ children: h }) =>
|
|
955
|
+
const f = tt(n !== void 0 ? a : void 0);
|
|
956
|
+
return /* @__PURE__ */ x(({ children: h }) => M(
|
|
886
957
|
r,
|
|
887
958
|
{
|
|
888
959
|
...i,
|
|
889
960
|
className: d([
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
f[
|
|
961
|
+
rt,
|
|
962
|
+
de[o],
|
|
963
|
+
f[l],
|
|
893
964
|
"no-underline cursor-pointer",
|
|
894
965
|
e
|
|
895
966
|
]),
|
|
@@ -897,45 +968,45 @@ const Mr = ({
|
|
|
897
968
|
},
|
|
898
969
|
h
|
|
899
970
|
), { children: [
|
|
900
|
-
a === "start" && n !== void 0 ?
|
|
971
|
+
a === "start" && n !== void 0 ? M(n, {
|
|
901
972
|
className: "mie-0.5 flex-shrink-0",
|
|
902
|
-
size: re[
|
|
973
|
+
size: re[l]
|
|
903
974
|
}) : null,
|
|
904
|
-
|
|
905
|
-
a === "end" && n !== void 0 ?
|
|
975
|
+
M("span", { className: "truncate" }, t),
|
|
976
|
+
a === "end" && n !== void 0 ? M(n, {
|
|
906
977
|
className: "mis-0.5 flex-shrink-0",
|
|
907
|
-
size: re[
|
|
978
|
+
size: re[l]
|
|
908
979
|
}) : null
|
|
909
980
|
] });
|
|
910
|
-
},
|
|
911
|
-
|
|
912
|
-
function
|
|
981
|
+
}, Jr = y(Xr);
|
|
982
|
+
Jr.displayName = "LinkButton";
|
|
983
|
+
function Qn({ children: e, className: t, position: r }) {
|
|
913
984
|
let n = "";
|
|
914
|
-
return r && (r === "start" ? n = "order-first" : n = "order-last"), /* @__PURE__ */
|
|
985
|
+
return r && (r === "start" ? n = "order-first" : n = "order-last"), /* @__PURE__ */ s("div", { className: d("flex gap-1", n, t), children: e });
|
|
915
986
|
}
|
|
916
|
-
function
|
|
917
|
-
return /* @__PURE__ */
|
|
987
|
+
function Xn({ children: e, className: t }) {
|
|
988
|
+
return /* @__PURE__ */ s("div", { className: d("flex-grow", t), children: e });
|
|
918
989
|
}
|
|
919
|
-
const
|
|
990
|
+
const Jn = ({
|
|
920
991
|
children: e,
|
|
921
992
|
className: t,
|
|
922
993
|
endText: r,
|
|
923
994
|
endTextProps: n,
|
|
924
995
|
size: a = "sm",
|
|
925
996
|
subHeadline: o,
|
|
926
|
-
subHeadlineProps:
|
|
997
|
+
subHeadlineProps: l
|
|
927
998
|
}) => /* @__PURE__ */ x("div", { className: d(["flex items-center justify-between break-words", t]), children: [
|
|
928
999
|
/* @__PURE__ */ x("div", { className: "flex flex-col", children: [
|
|
929
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ s(P, { size: a, variant: "label", children: e }),
|
|
930
1001
|
o ? (
|
|
931
1002
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
932
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ s(P, { ...l, children: o })
|
|
933
1004
|
) : null
|
|
934
1005
|
] }),
|
|
935
|
-
r ? /* @__PURE__ */
|
|
936
|
-
] }),
|
|
1006
|
+
r ? /* @__PURE__ */ s(P, { ...n, children: r }) : null
|
|
1007
|
+
] }), Yn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ s("div", { className: d(["relative", t]), ...r, children: e }), Yr = typeof window < "u" ? Ue.useLayoutEffect : () => {
|
|
937
1008
|
};
|
|
938
|
-
let G = /* @__PURE__ */ new Map(),
|
|
1009
|
+
let G = /* @__PURE__ */ new Map(), Re = /* @__PURE__ */ new Set();
|
|
939
1010
|
function Me() {
|
|
940
1011
|
if (typeof window > "u")
|
|
941
1012
|
return;
|
|
@@ -945,32 +1016,32 @@ function Me() {
|
|
|
945
1016
|
}, t = (r) => {
|
|
946
1017
|
let n = G.get(r.target);
|
|
947
1018
|
if (n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", t), G.delete(r.target)), G.size === 0)) {
|
|
948
|
-
for (let a of
|
|
1019
|
+
for (let a of Re)
|
|
949
1020
|
a();
|
|
950
|
-
|
|
1021
|
+
Re.clear();
|
|
951
1022
|
}
|
|
952
1023
|
};
|
|
953
1024
|
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", t);
|
|
954
1025
|
}
|
|
955
1026
|
typeof document < "u" && (document.readyState !== "loading" ? Me() : document.addEventListener("DOMContentLoaded", Me));
|
|
956
|
-
function
|
|
1027
|
+
function en(e) {
|
|
957
1028
|
var t;
|
|
958
1029
|
return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((r) => e.test(r.brand))) || e.test(window.navigator.userAgent);
|
|
959
1030
|
}
|
|
960
|
-
function
|
|
1031
|
+
function tn(e) {
|
|
961
1032
|
var t;
|
|
962
1033
|
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
963
1034
|
}
|
|
964
|
-
function
|
|
965
|
-
return
|
|
1035
|
+
function rn() {
|
|
1036
|
+
return tn(/^Mac/i);
|
|
966
1037
|
}
|
|
967
|
-
function
|
|
968
|
-
return
|
|
1038
|
+
function nn() {
|
|
1039
|
+
return en(/Android/i);
|
|
969
1040
|
}
|
|
970
|
-
function
|
|
971
|
-
return e.mozInputSource === 0 && e.isTrusted ? !0 :
|
|
1041
|
+
function an(e) {
|
|
1042
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : nn() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
972
1043
|
}
|
|
973
|
-
function
|
|
1044
|
+
function be(e, t, r) {
|
|
974
1045
|
return t in e ? Object.defineProperty(e, t, {
|
|
975
1046
|
value: r,
|
|
976
1047
|
enumerable: !0,
|
|
@@ -978,9 +1049,9 @@ function me(e, t, r) {
|
|
|
978
1049
|
writable: !0
|
|
979
1050
|
}) : e[t] = r, e;
|
|
980
1051
|
}
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
class
|
|
1052
|
+
const on = Ue.createContext(null);
|
|
1053
|
+
on.displayName = "PressResponderContext";
|
|
1054
|
+
class sn {
|
|
984
1055
|
isDefaultPrevented() {
|
|
985
1056
|
return this.nativeEvent.defaultPrevented;
|
|
986
1057
|
}
|
|
@@ -999,13 +1070,13 @@ class Ar {
|
|
|
999
1070
|
this.nativeEvent = r, this.target = r.target, this.currentTarget = r.currentTarget, this.relatedTarget = r.relatedTarget, this.bubbles = r.bubbles, this.cancelable = r.cancelable, this.defaultPrevented = r.defaultPrevented, this.eventPhase = r.eventPhase, this.isTrusted = r.isTrusted, this.timeStamp = r.timeStamp, this.type = t;
|
|
1000
1071
|
}
|
|
1001
1072
|
}
|
|
1002
|
-
function
|
|
1073
|
+
function ln(e) {
|
|
1003
1074
|
let t = B({
|
|
1004
1075
|
isFocused: !1,
|
|
1005
1076
|
onBlur: e,
|
|
1006
1077
|
observer: null
|
|
1007
1078
|
});
|
|
1008
|
-
return t.current.onBlur = e,
|
|
1079
|
+
return t.current.onBlur = e, Yr(() => {
|
|
1009
1080
|
const r = t.current;
|
|
1010
1081
|
return () => {
|
|
1011
1082
|
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
@@ -1014,8 +1085,8 @@ function Ur(e) {
|
|
|
1014
1085
|
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
1015
1086
|
t.current.isFocused = !0;
|
|
1016
1087
|
let n = r.target, a = (o) => {
|
|
1017
|
-
var
|
|
1018
|
-
t.current.isFocused = !1, n.disabled && ((i = (
|
|
1088
|
+
var l, i;
|
|
1089
|
+
t.current.isFocused = !1, n.disabled && ((i = (l = t.current).onBlur) === null || i === void 0 || i.call(l, new sn("blur", o))), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
1019
1090
|
};
|
|
1020
1091
|
n.addEventListener("focusout", a, {
|
|
1021
1092
|
once: !0
|
|
@@ -1032,48 +1103,48 @@ function Ur(e) {
|
|
|
1032
1103
|
}
|
|
1033
1104
|
}, []);
|
|
1034
1105
|
}
|
|
1035
|
-
let
|
|
1036
|
-
function
|
|
1037
|
-
for (let r of
|
|
1106
|
+
let dn = /* @__PURE__ */ new Set(), ze = !1, H = !1, ge = !1;
|
|
1107
|
+
function ye(e, t) {
|
|
1108
|
+
for (let r of dn)
|
|
1038
1109
|
r(e, t);
|
|
1039
1110
|
}
|
|
1040
|
-
function
|
|
1041
|
-
return !(e.metaKey || !
|
|
1111
|
+
function cn(e) {
|
|
1112
|
+
return !(e.metaKey || !rn() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
1042
1113
|
}
|
|
1043
|
-
function
|
|
1044
|
-
H = !0,
|
|
1114
|
+
function We(e) {
|
|
1115
|
+
H = !0, cn(e) && ye("keyboard", e);
|
|
1045
1116
|
}
|
|
1046
1117
|
function K(e) {
|
|
1047
|
-
(e.type === "mousedown" || e.type === "pointerdown") && (H = !0,
|
|
1118
|
+
(e.type === "mousedown" || e.type === "pointerdown") && (H = !0, ye("pointer", e));
|
|
1048
1119
|
}
|
|
1049
|
-
function
|
|
1050
|
-
|
|
1120
|
+
function un(e) {
|
|
1121
|
+
an(e) && (H = !0);
|
|
1051
1122
|
}
|
|
1052
|
-
function
|
|
1053
|
-
e.target === window || e.target === document || (!H && !ge &&
|
|
1123
|
+
function fn(e) {
|
|
1124
|
+
e.target === window || e.target === document || (!H && !ge && ye("virtual", e), H = !1, ge = !1);
|
|
1054
1125
|
}
|
|
1055
|
-
function
|
|
1126
|
+
function pn() {
|
|
1056
1127
|
H = !1, ge = !0;
|
|
1057
1128
|
}
|
|
1058
|
-
function
|
|
1059
|
-
if (typeof window > "u" ||
|
|
1129
|
+
function Fe() {
|
|
1130
|
+
if (typeof window > "u" || ze)
|
|
1060
1131
|
return;
|
|
1061
1132
|
let e = HTMLElement.prototype.focus;
|
|
1062
1133
|
HTMLElement.prototype.focus = function() {
|
|
1063
1134
|
H = !0, e.apply(this, arguments);
|
|
1064
|
-
}, document.addEventListener("keydown",
|
|
1135
|
+
}, document.addEventListener("keydown", We, !0), document.addEventListener("keyup", We, !0), document.addEventListener("click", un, !0), window.addEventListener("focus", fn, !0), window.addEventListener("blur", pn, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", K, !0), document.addEventListener("pointermove", K, !0), document.addEventListener("pointerup", K, !0)) : (document.addEventListener("mousedown", K, !0), document.addEventListener("mousemove", K, !0), document.addEventListener("mouseup", K, !0)), ze = !0;
|
|
1065
1136
|
}
|
|
1066
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
1067
|
-
function
|
|
1137
|
+
typeof document < "u" && (document.readyState !== "loading" ? Fe() : document.addEventListener("DOMContentLoaded", Fe));
|
|
1138
|
+
function mn(e) {
|
|
1068
1139
|
let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, o = B({
|
|
1069
1140
|
isFocusWithin: !1
|
|
1070
|
-
}),
|
|
1141
|
+
}), l = Y((f) => {
|
|
1071
1142
|
o.current.isFocusWithin && !f.currentTarget.contains(f.relatedTarget) && (o.current.isFocusWithin = !1, r && r(f), a && a(!1));
|
|
1072
1143
|
}, [
|
|
1073
1144
|
r,
|
|
1074
1145
|
a,
|
|
1075
1146
|
o
|
|
1076
|
-
]), i =
|
|
1147
|
+
]), i = ln(l), u = Y((f) => {
|
|
1077
1148
|
!o.current.isFocusWithin && document.activeElement === f.target && (n && n(f), a && a(!0), o.current.isFocusWithin = !0, i(f));
|
|
1078
1149
|
}, [
|
|
1079
1150
|
n,
|
|
@@ -1088,35 +1159,35 @@ function Xr(e) {
|
|
|
1088
1159
|
} : {
|
|
1089
1160
|
focusWithinProps: {
|
|
1090
1161
|
onFocus: u,
|
|
1091
|
-
onBlur:
|
|
1162
|
+
onBlur: l
|
|
1092
1163
|
}
|
|
1093
1164
|
};
|
|
1094
1165
|
}
|
|
1095
|
-
function
|
|
1096
|
-
let { ref: t, onInteractOutside: r, isDisabled: n, onInteractOutsideStart: a } = e,
|
|
1166
|
+
function bn(e) {
|
|
1167
|
+
let { ref: t, onInteractOutside: r, isDisabled: n, onInteractOutsideStart: a } = e, l = B({
|
|
1097
1168
|
isPointerDown: !1,
|
|
1098
1169
|
ignoreEmulatedMouseEvents: !1,
|
|
1099
1170
|
onInteractOutside: r,
|
|
1100
1171
|
onInteractOutsideStart: a
|
|
1101
1172
|
}).current;
|
|
1102
|
-
|
|
1173
|
+
l.onInteractOutside = r, l.onInteractOutsideStart = a, A(() => {
|
|
1103
1174
|
if (n)
|
|
1104
1175
|
return;
|
|
1105
1176
|
let i = (u) => {
|
|
1106
|
-
X(u, t) &&
|
|
1177
|
+
X(u, t) && l.onInteractOutside && (l.onInteractOutsideStart && l.onInteractOutsideStart(u), l.isPointerDown = !0);
|
|
1107
1178
|
};
|
|
1108
1179
|
if (typeof PointerEvent < "u") {
|
|
1109
1180
|
let u = (f) => {
|
|
1110
|
-
|
|
1181
|
+
l.isPointerDown && l.onInteractOutside && X(f, t) && l.onInteractOutside(f), l.isPointerDown = !1;
|
|
1111
1182
|
};
|
|
1112
1183
|
return document.addEventListener("pointerdown", i, !0), document.addEventListener("pointerup", u, !0), () => {
|
|
1113
1184
|
document.removeEventListener("pointerdown", i, !0), document.removeEventListener("pointerup", u, !0);
|
|
1114
1185
|
};
|
|
1115
1186
|
} else {
|
|
1116
1187
|
let u = (m) => {
|
|
1117
|
-
|
|
1188
|
+
l.ignoreEmulatedMouseEvents ? l.ignoreEmulatedMouseEvents = !1 : l.isPointerDown && l.onInteractOutside && X(m, t) && l.onInteractOutside(m), l.isPointerDown = !1;
|
|
1118
1189
|
}, f = (m) => {
|
|
1119
|
-
|
|
1190
|
+
l.ignoreEmulatedMouseEvents = !0, l.onInteractOutside && l.isPointerDown && X(m, t) && l.onInteractOutside(m), l.isPointerDown = !1;
|
|
1120
1191
|
};
|
|
1121
1192
|
return document.addEventListener("mousedown", i, !0), document.addEventListener("mouseup", u, !0), document.addEventListener("touchstart", i, !0), document.addEventListener("touchend", f, !0), () => {
|
|
1122
1193
|
document.removeEventListener("mousedown", i, !0), document.removeEventListener("mouseup", u, !0), document.removeEventListener("touchstart", i, !0), document.removeEventListener("touchend", f, !0);
|
|
@@ -1124,7 +1195,7 @@ function Jr(e) {
|
|
|
1124
1195
|
}
|
|
1125
1196
|
}, [
|
|
1126
1197
|
t,
|
|
1127
|
-
|
|
1198
|
+
l,
|
|
1128
1199
|
n
|
|
1129
1200
|
]);
|
|
1130
1201
|
}
|
|
@@ -1138,22 +1209,22 @@ function X(e, t) {
|
|
|
1138
1209
|
}
|
|
1139
1210
|
return t.current && !t.current.contains(e.target);
|
|
1140
1211
|
}
|
|
1141
|
-
let
|
|
1142
|
-
function
|
|
1212
|
+
let gn = null;
|
|
1213
|
+
function mt(e, t) {
|
|
1143
1214
|
return t.some((r) => r.contains(e));
|
|
1144
1215
|
}
|
|
1145
|
-
function
|
|
1216
|
+
function hn(e, t = null) {
|
|
1146
1217
|
if (e instanceof Element && e.closest("[data-react-aria-top-layer]"))
|
|
1147
1218
|
return !0;
|
|
1148
|
-
for (let { scopeRef: r } of
|
|
1149
|
-
if (
|
|
1219
|
+
for (let { scopeRef: r } of Ve.traverse(Ve.getTreeNode(t)))
|
|
1220
|
+
if (mt(e, r.current))
|
|
1150
1221
|
return !0;
|
|
1151
1222
|
return !1;
|
|
1152
1223
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1224
|
+
function xn(e) {
|
|
1225
|
+
return hn(e, gn);
|
|
1155
1226
|
}
|
|
1156
|
-
class
|
|
1227
|
+
class ve {
|
|
1157
1228
|
get size() {
|
|
1158
1229
|
return this.fastMap.size;
|
|
1159
1230
|
}
|
|
@@ -1161,7 +1232,7 @@ class ye {
|
|
|
1161
1232
|
return this.fastMap.get(t);
|
|
1162
1233
|
}
|
|
1163
1234
|
addTreeNode(t, r, n) {
|
|
1164
|
-
let a = this.fastMap.get(r ?? null), o = new
|
|
1235
|
+
let a = this.fastMap.get(r ?? null), o = new _e({
|
|
1165
1236
|
scopeRef: t
|
|
1166
1237
|
});
|
|
1167
1238
|
a.addChild(o), o.parent = a, this.fastMap.set(t, o), n && (o.nodeToRestore = n);
|
|
@@ -1174,7 +1245,7 @@ class ye {
|
|
|
1174
1245
|
return;
|
|
1175
1246
|
let r = this.fastMap.get(t), n = r.parent;
|
|
1176
1247
|
for (let o of this.traverse())
|
|
1177
|
-
o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef.current &&
|
|
1248
|
+
o !== r && r.nodeToRestore && o.nodeToRestore && r.scopeRef.current && mt(o.nodeToRestore, r.scopeRef.current) && (o.nodeToRestore = r.nodeToRestore);
|
|
1178
1249
|
let a = r.children;
|
|
1179
1250
|
n.removeChild(r), a.size > 0 && a.forEach((o) => n.addChild(o)), this.fastMap.delete(r.scopeRef);
|
|
1180
1251
|
}
|
|
@@ -1185,18 +1256,18 @@ class ye {
|
|
|
1185
1256
|
yield* this.traverse(r);
|
|
1186
1257
|
}
|
|
1187
1258
|
clone() {
|
|
1188
|
-
let t = new
|
|
1259
|
+
let t = new ve();
|
|
1189
1260
|
for (let r of this.traverse())
|
|
1190
1261
|
t.addTreeNode(r.scopeRef, r.parent.scopeRef, r.nodeToRestore);
|
|
1191
1262
|
return t;
|
|
1192
1263
|
}
|
|
1193
1264
|
constructor() {
|
|
1194
|
-
|
|
1265
|
+
be(this, "fastMap", /* @__PURE__ */ new Map()), this.root = new _e({
|
|
1195
1266
|
scopeRef: null
|
|
1196
1267
|
}), this.fastMap.set(null, this.root);
|
|
1197
1268
|
}
|
|
1198
1269
|
}
|
|
1199
|
-
class
|
|
1270
|
+
class _e {
|
|
1200
1271
|
addChild(t) {
|
|
1201
1272
|
this.children.add(t), t.parent = this;
|
|
1202
1273
|
}
|
|
@@ -1204,13 +1275,13 @@ class ze {
|
|
|
1204
1275
|
this.children.delete(t), t.parent = void 0;
|
|
1205
1276
|
}
|
|
1206
1277
|
constructor(t) {
|
|
1207
|
-
|
|
1278
|
+
be(this, "children", /* @__PURE__ */ new Set()), be(this, "contain", !1), this.scopeRef = t.scopeRef;
|
|
1208
1279
|
}
|
|
1209
1280
|
}
|
|
1210
|
-
let
|
|
1281
|
+
let Ve = new ve();
|
|
1211
1282
|
const R = [];
|
|
1212
|
-
function
|
|
1213
|
-
let { onClose: r, shouldCloseOnBlur: n, isOpen: a, isDismissable: o = !1, isKeyboardDismissDisabled:
|
|
1283
|
+
function yn(e, t) {
|
|
1284
|
+
let { onClose: r, shouldCloseOnBlur: n, isOpen: a, isDismissable: o = !1, isKeyboardDismissDisabled: l = !1, shouldCloseOnInteractOutside: i } = e;
|
|
1214
1285
|
A(() => (a && R.push(t), () => {
|
|
1215
1286
|
let p = R.indexOf(t);
|
|
1216
1287
|
p >= 0 && R.splice(p, 1);
|
|
@@ -1225,34 +1296,34 @@ function rn(e, t) {
|
|
|
1225
1296
|
}, m = (p) => {
|
|
1226
1297
|
(!i || i(p.target)) && (R[R.length - 1] === t && (p.stopPropagation(), p.preventDefault()), u());
|
|
1227
1298
|
}, h = (p) => {
|
|
1228
|
-
p.key === "Escape" && !
|
|
1299
|
+
p.key === "Escape" && !l && (p.stopPropagation(), p.preventDefault(), u());
|
|
1229
1300
|
};
|
|
1230
|
-
|
|
1301
|
+
bn({
|
|
1231
1302
|
ref: t,
|
|
1232
1303
|
onInteractOutside: o ? m : null,
|
|
1233
1304
|
onInteractOutsideStart: f
|
|
1234
1305
|
});
|
|
1235
|
-
let { focusWithinProps:
|
|
1306
|
+
let { focusWithinProps: v } = mn({
|
|
1236
1307
|
isDisabled: !n,
|
|
1237
1308
|
onBlurWithin: (p) => {
|
|
1238
|
-
p.relatedTarget &&
|
|
1309
|
+
p.relatedTarget && xn(p.relatedTarget) || (!i || i(p.relatedTarget)) && r();
|
|
1239
1310
|
}
|
|
1240
|
-
}),
|
|
1311
|
+
}), b = (p) => {
|
|
1241
1312
|
p.target === p.currentTarget && p.preventDefault();
|
|
1242
1313
|
};
|
|
1243
1314
|
return {
|
|
1244
1315
|
overlayProps: {
|
|
1245
1316
|
onKeyDown: h,
|
|
1246
|
-
...
|
|
1317
|
+
...v
|
|
1247
1318
|
},
|
|
1248
1319
|
underlayProps: {
|
|
1249
|
-
onPointerDown:
|
|
1320
|
+
onPointerDown: b
|
|
1250
1321
|
}
|
|
1251
1322
|
};
|
|
1252
1323
|
}
|
|
1253
|
-
const
|
|
1324
|
+
const vn = ({ align: e, children: t, className: r, ...n }) => {
|
|
1254
1325
|
const a = V(() => {
|
|
1255
|
-
const { horizontal: o, vertical:
|
|
1326
|
+
const { horizontal: o, vertical: l } = e, i = {
|
|
1256
1327
|
center: "left-1/2",
|
|
1257
1328
|
end: "inline-end-0",
|
|
1258
1329
|
start: "inline-start-0"
|
|
@@ -1260,9 +1331,9 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
|
|
|
1260
1331
|
bottom: "",
|
|
1261
1332
|
top: "bottom-full"
|
|
1262
1333
|
};
|
|
1263
|
-
return `${i[o]} ${u[
|
|
1334
|
+
return `${i[o]} ${u[l]}`;
|
|
1264
1335
|
}, [e]);
|
|
1265
|
-
return /* @__PURE__ */
|
|
1336
|
+
return /* @__PURE__ */ s(
|
|
1266
1337
|
"div",
|
|
1267
1338
|
{
|
|
1268
1339
|
className: d([
|
|
@@ -1274,57 +1345,57 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
|
|
|
1274
1345
|
children: t
|
|
1275
1346
|
}
|
|
1276
1347
|
);
|
|
1277
|
-
},
|
|
1348
|
+
}, wn = ({ open: e, children: t }) => /* @__PURE__ */ s(ie, { children: e ? t : null }), ea = ({
|
|
1278
1349
|
align: e = { horizontal: "start", vertical: "bottom" },
|
|
1279
1350
|
autoFocus: t = !0,
|
|
1280
1351
|
children: r,
|
|
1281
1352
|
className: n,
|
|
1282
1353
|
isDismissible: a,
|
|
1283
1354
|
isOpen: o,
|
|
1284
|
-
onClose:
|
|
1355
|
+
onClose: l,
|
|
1285
1356
|
...i
|
|
1286
1357
|
}) => {
|
|
1287
|
-
const u = B(null), { overlayProps: f } =
|
|
1358
|
+
const u = B(null), { overlayProps: f } = yn(
|
|
1288
1359
|
{
|
|
1289
1360
|
isDismissable: a,
|
|
1290
1361
|
isKeyboardDismissDisabled: !a,
|
|
1291
1362
|
isOpen: o,
|
|
1292
|
-
onClose:
|
|
1363
|
+
onClose: l
|
|
1293
1364
|
},
|
|
1294
1365
|
u
|
|
1295
1366
|
);
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
|
|
1367
|
+
return /* @__PURE__ */ s(wn, { open: o, children: /* @__PURE__ */ s(ot, { autoFocus: t, children: /* @__PURE__ */ s(
|
|
1368
|
+
vn,
|
|
1298
1369
|
{
|
|
1299
1370
|
align: e,
|
|
1300
1371
|
className: n,
|
|
1301
|
-
onClose:
|
|
1372
|
+
onClose: l,
|
|
1302
1373
|
...i,
|
|
1303
|
-
children: /* @__PURE__ */
|
|
1374
|
+
children: /* @__PURE__ */ s("div", { ref: u, ...f, onClick: l, children: r })
|
|
1304
1375
|
}
|
|
1305
1376
|
) }) });
|
|
1306
|
-
},
|
|
1377
|
+
}, ta = ({ onToggle: e, children: t, className: r, disabled: n }) => {
|
|
1307
1378
|
const a = (i) => {
|
|
1308
1379
|
i.preventDefault(), i.stopPropagation(), e();
|
|
1309
|
-
}, o = B(null),
|
|
1380
|
+
}, o = B(null), l = It(t, {
|
|
1310
1381
|
className: r,
|
|
1311
1382
|
disabled: n,
|
|
1312
1383
|
onClick: a,
|
|
1313
1384
|
ref: o
|
|
1314
1385
|
});
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
},
|
|
1386
|
+
return /* @__PURE__ */ s(ie, { children: l });
|
|
1387
|
+
}, kn = (e, t) => {
|
|
1317
1388
|
const { children: r, error: n, hint: a, label: o } = e;
|
|
1318
1389
|
return /* @__PURE__ */ x("div", { ...e, className: "flex-col rounded-0.5 w-fit", ref: t, children: [
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
n ? /* @__PURE__ */
|
|
1321
|
-
a ? /* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ s("label", { children: o }),
|
|
1391
|
+
n ? /* @__PURE__ */ s("p", { className: "text-alert-light dark:text-alert-dark text-13", children: n }) : null,
|
|
1392
|
+
a ? /* @__PURE__ */ s("p", { className: "text-13 text-gray-25 dark:text-gray-20", children: a }) : null,
|
|
1322
1393
|
r
|
|
1323
1394
|
] });
|
|
1324
|
-
},
|
|
1325
|
-
|
|
1326
|
-
const
|
|
1327
|
-
/* @__PURE__ */
|
|
1395
|
+
}, $n = y(kn);
|
|
1396
|
+
$n.displayName = "Radio Set";
|
|
1397
|
+
const Nn = ({ children: e, disabled: t, name: r, value: n, ...a }, o) => /* @__PURE__ */ x("div", { className: "flex items-baseline rounded-0.5 w-fit focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark", children: [
|
|
1398
|
+
/* @__PURE__ */ s(
|
|
1328
1399
|
"input",
|
|
1329
1400
|
{
|
|
1330
1401
|
className: "w-1.5 h-1.5 mr-0.5 flex-none rounded-0.25 focus-within:outline-none peer display: inline",
|
|
@@ -1337,7 +1408,7 @@ const ln = ({ children: e, disabled: t, name: r, value: n, ...a }, o) => /* @__P
|
|
|
1337
1408
|
value: n
|
|
1338
1409
|
}
|
|
1339
1410
|
),
|
|
1340
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ s(
|
|
1341
1412
|
"label",
|
|
1342
1413
|
{
|
|
1343
1414
|
className: "peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",
|
|
@@ -1345,56 +1416,56 @@ const ln = ({ children: e, disabled: t, name: r, value: n, ...a }, o) => /* @__P
|
|
|
1345
1416
|
children: e
|
|
1346
1417
|
}
|
|
1347
1418
|
)
|
|
1348
|
-
] }),
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1419
|
+
] }), Sn = y(Nn);
|
|
1420
|
+
Sn.displayName = "RadioSetItem";
|
|
1421
|
+
const ra = ({ ...e }) => /* @__PURE__ */ s("option", { ...e }), On = "_select_1dwiy_1";
|
|
1422
|
+
const En = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0", In = "border-alert-light dark:border-alert-dark", Ln = "border-tertiary-light dark:border-tertiary-dark", he = "text-text-muted-light dark:text-text-muted-dark", He = d(
|
|
1423
|
+
he,
|
|
1353
1424
|
"font-aktiv-grotesk font-medium text-13 absolute inline-start-2 block-start-2 pointer-events-none opacity-0 h-1.5"
|
|
1354
|
-
),
|
|
1355
|
-
var
|
|
1356
|
-
const h = d(
|
|
1425
|
+
), Cn = "-translate-y-1 opacity-100", Pn = "text-overlay-text dark:text-text-dark", Bn = "!pbs-3 !pbe-1", Tn = "absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark", Dn = ({ children: e, className: t, disabled: r = !1, error: n, hint: a, label: o, name: l, onChange: i, value: u, ...f }, m) => {
|
|
1426
|
+
var I;
|
|
1427
|
+
const h = d(On, En), v = B(null), b = xe({ forwardedRef: m, innerRef: v }), [p, N] = z(Boolean(u || ((I = b == null ? void 0 : b.current) == null ? void 0 : I.value)));
|
|
1357
1428
|
A(() => {
|
|
1358
|
-
var
|
|
1359
|
-
N(Boolean(((
|
|
1360
|
-
}, [u,
|
|
1429
|
+
var w;
|
|
1430
|
+
N(Boolean(((w = b == null ? void 0 : b.current) == null ? void 0 : w.value) || u));
|
|
1431
|
+
}, [u, b]);
|
|
1361
1432
|
const k = V(() => {
|
|
1362
|
-
const
|
|
1363
|
-
return p ?
|
|
1433
|
+
const w = d(h, Pn, o ? Bn : null), g = d(h, he);
|
|
1434
|
+
return p ? w : g;
|
|
1364
1435
|
}, [h, p, o]), T = V(() => {
|
|
1365
|
-
const
|
|
1366
|
-
return p ?
|
|
1367
|
-
}, [p]), E = (
|
|
1368
|
-
var
|
|
1369
|
-
N(Boolean(((
|
|
1436
|
+
const w = d(He, Cn), g = d(He);
|
|
1437
|
+
return p ? w : g;
|
|
1438
|
+
}, [p]), E = (w) => {
|
|
1439
|
+
var g;
|
|
1440
|
+
N(Boolean(((g = b == null ? void 0 : b.current) == null ? void 0 : g.value) || u)), i && i(w);
|
|
1370
1441
|
};
|
|
1371
1442
|
return /* @__PURE__ */ x("div", { className: d(t), children: [
|
|
1372
1443
|
/* @__PURE__ */ x("div", { className: d("relative w-full border-none"), children: [
|
|
1373
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ s(
|
|
1374
1445
|
"select",
|
|
1375
1446
|
{
|
|
1376
1447
|
...f,
|
|
1377
|
-
className: d([k, n ?
|
|
1448
|
+
className: d([k, n ? In : Ln]),
|
|
1378
1449
|
disabled: r,
|
|
1379
|
-
id:
|
|
1380
|
-
name:
|
|
1450
|
+
id: l,
|
|
1451
|
+
name: l,
|
|
1381
1452
|
onChange: E,
|
|
1382
|
-
ref:
|
|
1453
|
+
ref: b,
|
|
1383
1454
|
value: u,
|
|
1384
1455
|
children: e
|
|
1385
1456
|
}
|
|
1386
1457
|
),
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1458
|
+
/* @__PURE__ */ s("label", { className: T, htmlFor: l, children: o }),
|
|
1459
|
+
/* @__PURE__ */ s("div", { className: Tn, children: /* @__PURE__ */ s(Ze, { size: "24" }) })
|
|
1389
1460
|
] }),
|
|
1390
1461
|
n || a ? /* @__PURE__ */ x("div", { className: "mbs-0.5", children: [
|
|
1391
|
-
n ? /* @__PURE__ */
|
|
1392
|
-
a ? /* @__PURE__ */
|
|
1462
|
+
n ? /* @__PURE__ */ s("p", { className: "text-alert-light dark:text-alert-dark text-13 m-0", children: n }) : null,
|
|
1463
|
+
a ? /* @__PURE__ */ s("p", { className: d(he, "text-13 m-0"), children: a }) : null
|
|
1393
1464
|
] }) : null
|
|
1394
1465
|
] });
|
|
1395
|
-
},
|
|
1396
|
-
function
|
|
1397
|
-
return /* @__PURE__ */
|
|
1466
|
+
}, na = y(Dn);
|
|
1467
|
+
function aa({ active: e, children: t, component: r = "a", className: n, href: a }) {
|
|
1468
|
+
return /* @__PURE__ */ s(
|
|
1398
1469
|
P,
|
|
1399
1470
|
{
|
|
1400
1471
|
className: d(
|
|
@@ -1408,28 +1479,28 @@ function Hn({ active: e, children: t, component: r = "a", className: n, href: a
|
|
|
1408
1479
|
}
|
|
1409
1480
|
);
|
|
1410
1481
|
}
|
|
1411
|
-
const
|
|
1482
|
+
const jn = {
|
|
1412
1483
|
default: "bg-gray-10 dark:bg-gray-40 text-light dark:text-dark",
|
|
1413
1484
|
secondary: "bg-gray-10 dark:bg-gray-35 text-light dark:text-dark",
|
|
1414
1485
|
error: "bg-orange-10 dark:bg-orange-50 text-orange-40 dark:text-orange-20",
|
|
1415
1486
|
info: "bg-blue-10 dark:bg-blue-50 text-blue-40, dark:text-blue-20",
|
|
1416
1487
|
success: "bg-green-10, dark:bg-green-50 text-green-40 dark:text-green-20",
|
|
1417
1488
|
caution: "bg-yellow-10 dark:bg-yellow-50 text-yellow-40 dark:text-yellow-20"
|
|
1418
|
-
},
|
|
1489
|
+
}, Rn = {
|
|
1419
1490
|
sm: "text-11 w-fit rounded-0.5 plb-0.25 pli-0.5",
|
|
1420
1491
|
lg: "text-16 w-fit rounded-0.5 plb-0.5 pli-1"
|
|
1421
|
-
},
|
|
1422
|
-
const a =
|
|
1423
|
-
return /* @__PURE__ */
|
|
1424
|
-
},
|
|
1425
|
-
inputIcon:
|
|
1426
|
-
},
|
|
1427
|
-
/* @__PURE__ */
|
|
1492
|
+
}, oa = ({ message: e, variant: t = "default", size: r = "sm", className: n }) => {
|
|
1493
|
+
const a = jn[t], o = Rn[r];
|
|
1494
|
+
return /* @__PURE__ */ s(L, { className: d(a, o, n), children: /* @__PURE__ */ s(P, { children: e }) });
|
|
1495
|
+
}, Mn = "_inputIcon_1pzdd_1", zn = {
|
|
1496
|
+
inputIcon: Mn
|
|
1497
|
+
}, Wn = ({ className: e, error: t, name: r, ...n }, a) => /* @__PURE__ */ x(ie, { children: [
|
|
1498
|
+
/* @__PURE__ */ s(
|
|
1428
1499
|
"input",
|
|
1429
1500
|
{
|
|
1430
1501
|
className: d([
|
|
1431
1502
|
"rounded-1 text-black dark:text-white p-2 border-small border-tertiary-light dark:border-tertiary-dark hover:cursor-pointer bg-transparent disabled:bg-gray-10 disabled:dark:bg-gray-40 disabled:cursor-auto h-[58px]",
|
|
1432
|
-
|
|
1503
|
+
zn.inputIcon,
|
|
1433
1504
|
e
|
|
1434
1505
|
]),
|
|
1435
1506
|
id: r,
|
|
@@ -1440,53 +1511,54 @@ const yn = {
|
|
|
1440
1511
|
...n
|
|
1441
1512
|
}
|
|
1442
1513
|
),
|
|
1443
|
-
t ? /* @__PURE__ */
|
|
1444
|
-
] }),
|
|
1445
|
-
|
|
1446
|
-
const
|
|
1447
|
-
tooltipWrapper:
|
|
1448
|
-
tooltipContent:
|
|
1449
|
-
},
|
|
1514
|
+
t ? /* @__PURE__ */ s("div", { className: "text-alert-light dark:text-alert-dark text-13", children: t }) : null
|
|
1515
|
+
] }), Fn = y(Wn);
|
|
1516
|
+
Fn.displayName = "TimePicker";
|
|
1517
|
+
const _n = "_tooltipWrapper_qu88w_1", Vn = "_tooltipContent_qu88w_18", Ae = {
|
|
1518
|
+
tooltipWrapper: _n,
|
|
1519
|
+
tooltipContent: Vn
|
|
1520
|
+
}, sa = ({ content: e, className: t, ...r }) => /* @__PURE__ */ s("div", { className: d(Ae.tooltipWrapper, t), ...r, children: /* @__PURE__ */ s("span", { className: Ae.tooltipContent, children: e }) });
|
|
1450
1521
|
export {
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1522
|
+
Ht as AutocompleteSelect,
|
|
1523
|
+
L as Box,
|
|
1524
|
+
Ut as Breadcrumb,
|
|
1525
|
+
rr as Breadcrumbs,
|
|
1526
|
+
ne as Button,
|
|
1527
|
+
nr as ButtonComponent,
|
|
1528
|
+
or as Checkbox,
|
|
1529
|
+
yr as Dialog,
|
|
1530
|
+
Zn as Divider,
|
|
1531
|
+
ot as FocusTrap,
|
|
1532
|
+
lt as Heading,
|
|
1533
|
+
Gn as HorizontalLoader,
|
|
1534
|
+
st as IconButton,
|
|
1535
|
+
wr as IconLinkButton,
|
|
1536
|
+
Qr as ImageUpload,
|
|
1537
|
+
Ge as Input,
|
|
1538
|
+
Jr as LinkButton,
|
|
1539
|
+
Xr as LinkButtonComponent,
|
|
1540
|
+
Qe as List,
|
|
1541
|
+
me as ListItem,
|
|
1542
|
+
Qn as ListItemActions,
|
|
1543
|
+
Xn as ListItemContent,
|
|
1544
|
+
Jn as ListItemText,
|
|
1545
|
+
ra as Option,
|
|
1546
|
+
Yn as Popover,
|
|
1547
|
+
ea as PopoverBody,
|
|
1548
|
+
ta as PopoverTrigger,
|
|
1549
|
+
$n as RadioSet,
|
|
1550
|
+
Sn as RadioSetItem,
|
|
1551
|
+
na as Select,
|
|
1552
|
+
aa as Tab,
|
|
1553
|
+
oa as Tag,
|
|
1482
1554
|
P as Text,
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1555
|
+
Fn as TimePicker,
|
|
1556
|
+
sa as Tooltip,
|
|
1557
|
+
qn as buttonSizeOptions,
|
|
1558
|
+
rt as defaultButtonClasses,
|
|
1559
|
+
tt as determineSizeClasses,
|
|
1488
1560
|
re as iconSizes,
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1561
|
+
xe as useCombinedRefs,
|
|
1562
|
+
zt as useLockBodyScroll,
|
|
1563
|
+
de as variantClasses
|
|
1492
1564
|
};
|