fictoan-react 2.0.0-beta.2 → 2.0.0-beta.3
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/{Accordion-B49ajUrB.js → Accordion-f3si5mdH.js} +1180 -1165
- package/dist/Accordion-f3si5mdH.js.map +1 -0
- package/dist/components/Form/FileUpload/FileUpload.d.ts +3 -1
- package/dist/components/Form/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/Form/ListBox/ListBox.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/Accordion-B49ajUrB.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import { jsx as o, jsxs as T, Fragment as
|
|
4
|
-
import
|
|
3
|
+
import { jsx as o, jsxs as T, Fragment as Ee } from "react/jsx-runtime";
|
|
4
|
+
import g, { useCallback as G, useEffect as U, useRef as Y, useState as j, useMemo as ye, createElement as xt, createRef as Rt, useImperativeHandle as Je, createContext as Oe, useContext as Ne } from "react";
|
|
5
5
|
import { createRoot as Mt } from "react-dom/client";
|
|
6
|
-
const Et = (e) => e.filter((t) => !!t).join(" "),
|
|
6
|
+
const Et = (e) => e.filter((t) => !!t).join(" "), A = g.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
as: e = "div",
|
|
9
9
|
role: t,
|
|
@@ -19,60 +19,60 @@ const Et = (e) => e.filter((t) => !!t).join(" "), I = b.forwardRef(
|
|
|
19
19
|
bgOpacity: d,
|
|
20
20
|
borderColor: f,
|
|
21
21
|
borderColour: p,
|
|
22
|
-
borderOpacity:
|
|
23
|
-
className:
|
|
24
|
-
columns:
|
|
22
|
+
borderOpacity: $,
|
|
23
|
+
className: k,
|
|
24
|
+
columns: x,
|
|
25
25
|
fillColor: h,
|
|
26
26
|
fillColour: L,
|
|
27
|
-
gap:
|
|
28
|
-
hideOnDesktop:
|
|
29
|
-
hideOnMobile:
|
|
27
|
+
gap: v,
|
|
28
|
+
hideOnDesktop: R,
|
|
29
|
+
hideOnMobile: S,
|
|
30
30
|
hideOnTabletLandscape: E,
|
|
31
31
|
hideOnTabletPortrait: D,
|
|
32
|
-
horizontalMargin:
|
|
33
|
-
horizontalPadding:
|
|
32
|
+
horizontalMargin: N,
|
|
33
|
+
horizontalPadding: W,
|
|
34
34
|
horizontallyCenterThis: M,
|
|
35
35
|
horizontallyCentreThis: V,
|
|
36
|
-
isFullHeight:
|
|
36
|
+
isFullHeight: K,
|
|
37
37
|
isFullWidth: P,
|
|
38
|
-
layoutAsFlexbox:
|
|
38
|
+
layoutAsFlexbox: y,
|
|
39
39
|
layoutAsGrid: H,
|
|
40
40
|
stackVertically: F,
|
|
41
|
-
stackHorizontally:
|
|
42
|
-
marginLeft:
|
|
43
|
-
marginBottom:
|
|
44
|
-
margin:
|
|
45
|
-
marginRight:
|
|
46
|
-
marginTop:
|
|
47
|
-
opacity:
|
|
41
|
+
stackHorizontally: O,
|
|
42
|
+
marginLeft: w,
|
|
43
|
+
marginBottom: m,
|
|
44
|
+
margin: b,
|
|
45
|
+
marginRight: I,
|
|
46
|
+
marginTop: B,
|
|
47
|
+
opacity: _,
|
|
48
48
|
paddingBottom: Z,
|
|
49
|
-
paddingLeft:
|
|
49
|
+
paddingLeft: ie,
|
|
50
50
|
padding: te,
|
|
51
51
|
paddingRight: ae,
|
|
52
|
-
paddingTop:
|
|
53
|
-
pushItemsToEnds:
|
|
54
|
-
shadow:
|
|
55
|
-
shape:
|
|
56
|
-
showOnlyOnDesktop:
|
|
57
|
-
showOnlyOnMobile:
|
|
58
|
-
showOnlyOnTabletLandscape:
|
|
59
|
-
showOnlyOnTabletPortrait:
|
|
60
|
-
size:
|
|
61
|
-
strokeColor:
|
|
62
|
-
strokeColour:
|
|
63
|
-
textColor:
|
|
64
|
-
textColour:
|
|
65
|
-
verticalMargin:
|
|
66
|
-
verticalPadding:
|
|
52
|
+
paddingTop: re,
|
|
53
|
+
pushItemsToEnds: $e,
|
|
54
|
+
shadow: we,
|
|
55
|
+
shape: z,
|
|
56
|
+
showOnlyOnDesktop: X,
|
|
57
|
+
showOnlyOnMobile: Q,
|
|
58
|
+
showOnlyOnTabletLandscape: se,
|
|
59
|
+
showOnlyOnTabletPortrait: xe,
|
|
60
|
+
size: De,
|
|
61
|
+
strokeColor: q,
|
|
62
|
+
strokeColour: he,
|
|
63
|
+
textColor: be,
|
|
64
|
+
textColour: ue,
|
|
65
|
+
verticalMargin: ge,
|
|
66
|
+
verticalPadding: Re,
|
|
67
67
|
verticallyCenterItems: gt,
|
|
68
68
|
verticallyCentreItems: Nt,
|
|
69
69
|
weight: Ge,
|
|
70
70
|
style: kt,
|
|
71
71
|
...$t
|
|
72
|
-
} = n, { className: Aa, classNames: La, ...Sa } = n,
|
|
72
|
+
} = n, { className: Aa, classNames: La, ...Sa } = n, Ce = {
|
|
73
73
|
...kt,
|
|
74
74
|
...d && { "--bg-opacity": Number(d) / 100 },
|
|
75
|
-
|
|
75
|
+
...$ && { "--border-opacity": Number($) / 100 }
|
|
76
76
|
};
|
|
77
77
|
return /* @__PURE__ */ o(
|
|
78
78
|
e,
|
|
@@ -83,56 +83,56 @@ const Et = (e) => e.filter((t) => !!t).join(" "), I = b.forwardRef(
|
|
|
83
83
|
tabIndex: r,
|
|
84
84
|
onKeyDown: c,
|
|
85
85
|
...$t,
|
|
86
|
-
style: Object.keys(
|
|
86
|
+
style: Object.keys(Ce).length > 0 ? Ce : void 0,
|
|
87
87
|
className: Et(
|
|
88
88
|
[
|
|
89
|
-
|
|
89
|
+
k,
|
|
90
90
|
l && `bg-${l}`,
|
|
91
91
|
u && `bg-${u}`,
|
|
92
92
|
f && `border-${f}`,
|
|
93
93
|
p && `border-${p}`,
|
|
94
94
|
h && `fill-${h}`,
|
|
95
95
|
L && `fill-${L}`,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
R && "hide-on-desktop",
|
|
97
|
+
S && "hide-on-mobile",
|
|
98
98
|
E && "hide-on-tablet-landscape",
|
|
99
99
|
D && "hide-on-tablet-portrait",
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
N && `margin-right-${N} margin-left-${N}`,
|
|
101
|
+
W && `padding-right-${W} padding-left-${W}`,
|
|
102
102
|
M && "horizontally-centre-this",
|
|
103
103
|
V && "horizontally-centre-this",
|
|
104
|
-
|
|
104
|
+
K && "full-height",
|
|
105
105
|
P && "full-width",
|
|
106
|
-
|
|
106
|
+
y && "layout-flexbox",
|
|
107
107
|
H && "layout-grid",
|
|
108
108
|
F && "stack-vertically",
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
O && "stack-horizontally",
|
|
110
|
+
v && `gap-${v}`,
|
|
111
|
+
w && `margin-left-${w}`,
|
|
112
|
+
m && `margin-bottom-${m}`,
|
|
113
|
+
b && `margin-all-${b}`,
|
|
114
|
+
I && `margin-right-${I}`,
|
|
115
|
+
B && `margin-top-${B}`,
|
|
116
|
+
_ && `opacity-${_}`,
|
|
117
117
|
Z && `padding-bottom-${Z}`,
|
|
118
|
-
|
|
118
|
+
ie && `padding-left-${ie}`,
|
|
119
119
|
te && `padding-all-${te}`,
|
|
120
120
|
ae && `padding-right-${ae}`,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
re && `padding-top-${re}`,
|
|
122
|
+
$e && "push-to-ends",
|
|
123
|
+
we && `shadow-${we}`,
|
|
124
|
+
z && `shape-${z}`,
|
|
125
|
+
X && "show-only-on-desktop",
|
|
126
|
+
Q && "show-only-on-mobile",
|
|
127
|
+
se && "show-only-on-tablet-landscape",
|
|
128
|
+
xe && "show-only-on-tablet-portrait",
|
|
129
|
+
De && `size-${De}`,
|
|
130
|
+
q && `stroke-${q}`,
|
|
131
|
+
he && `stroke-${he}`,
|
|
132
|
+
be && `text-${be}`,
|
|
133
|
+
ue && `text-${ue}`,
|
|
134
|
+
ge && `margin-top-${ge} margin-bottom-${ge}`,
|
|
135
|
+
Re && `padding-top-${Re} padding-bottom-${Re}`,
|
|
136
136
|
gt && "vertically-centre-items",
|
|
137
137
|
Nt && "vertically-centre-items",
|
|
138
138
|
Ge && `weight-${Ge}`
|
|
@@ -142,17 +142,17 @@ const Et = (e) => e.filter((t) => !!t).join(" "), I = b.forwardRef(
|
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
|
-
|
|
146
|
-
const
|
|
145
|
+
A.displayName = "Element";
|
|
146
|
+
const ce = (e, t) => g.forwardRef(
|
|
147
147
|
(a, r) => {
|
|
148
148
|
const c = { ...t, ...a };
|
|
149
149
|
if (e === "a" && "external" in c) {
|
|
150
150
|
const { external: n } = c;
|
|
151
151
|
n && (c.target = "_blank", c.rel = "noopener noreferrer");
|
|
152
152
|
}
|
|
153
|
-
return /* @__PURE__ */ o(
|
|
153
|
+
return /* @__PURE__ */ o(A, { as: e, ref: r, ...c });
|
|
154
154
|
}
|
|
155
|
-
), Fa =
|
|
155
|
+
), Fa = ce("article"), Wa = ce("aside"), za = ce("body"), C = ce("div"), Ha = ce("footer"), _a = ce("header"), Ga = ce("main"), Pt = ce("nav"), Ca = ce("section"), Ka = ce("span"), ja = ce("a", {
|
|
156
156
|
rel: "noopener noreferrer"
|
|
157
157
|
// Default props for Hyperlink
|
|
158
158
|
}), Tt = {
|
|
@@ -160,7 +160,7 @@ const ie = (e, t) => b.forwardRef(
|
|
|
160
160
|
tick: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M5 12l5 5L20 7" }) }),
|
|
161
161
|
plus: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M12 5v14M5 12h14" }) }),
|
|
162
162
|
minus: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M5 12h14" }) })
|
|
163
|
-
},
|
|
163
|
+
}, Be = g.forwardRef(
|
|
164
164
|
({
|
|
165
165
|
children: e,
|
|
166
166
|
size: t = "medium",
|
|
@@ -176,7 +176,7 @@ const ie = (e, t) => b.forwardRef(
|
|
|
176
176
|
f.stopPropagation(), c == null || c(f);
|
|
177
177
|
}, d = !!r;
|
|
178
178
|
return /* @__PURE__ */ T(
|
|
179
|
-
|
|
179
|
+
A,
|
|
180
180
|
{
|
|
181
181
|
"data-badge": !0,
|
|
182
182
|
"data-has-action": d || void 0,
|
|
@@ -202,10 +202,10 @@ const ie = (e, t) => b.forwardRef(
|
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
|
-
|
|
205
|
+
Be.displayName = "Badge";
|
|
206
206
|
const We = (e, t) => {
|
|
207
|
-
const a =
|
|
208
|
-
|
|
207
|
+
const a = G(t, [t]);
|
|
208
|
+
U(() => {
|
|
209
209
|
const r = (c) => {
|
|
210
210
|
!e.current || typeof a != "function" || e.current.contains(c.target) || a(c);
|
|
211
211
|
};
|
|
@@ -213,7 +213,7 @@ const We = (e, t) => {
|
|
|
213
213
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
214
214
|
};
|
|
215
215
|
}, [e, a]);
|
|
216
|
-
}, Dt =
|
|
216
|
+
}, Dt = g.forwardRef(
|
|
217
217
|
({
|
|
218
218
|
id: e,
|
|
219
219
|
children: t,
|
|
@@ -228,13 +228,13 @@ const We = (e, t) => {
|
|
|
228
228
|
showOverlay: d = !0,
|
|
229
229
|
blurOverlay: f = !1,
|
|
230
230
|
closeOnClickOutside: p = !0,
|
|
231
|
-
zIndex:
|
|
232
|
-
label:
|
|
233
|
-
description:
|
|
231
|
+
zIndex: $,
|
|
232
|
+
label: k,
|
|
233
|
+
description: x,
|
|
234
234
|
classNames: h = [],
|
|
235
235
|
...L
|
|
236
|
-
},
|
|
237
|
-
const
|
|
236
|
+
}, v) => {
|
|
237
|
+
const R = `${e}`, S = x ? `${R}-description` : void 0, E = Y(null), D = v || E, N = [
|
|
238
238
|
"drawer",
|
|
239
239
|
c,
|
|
240
240
|
n,
|
|
@@ -243,46 +243,46 @@ const We = (e, t) => {
|
|
|
243
243
|
...f ? ["blur-overlay"] : [],
|
|
244
244
|
...h
|
|
245
245
|
];
|
|
246
|
-
return
|
|
247
|
-
const M = D.current, V = document.querySelector(`[data-drawer-overlay-for="${
|
|
246
|
+
return U(() => {
|
|
247
|
+
const M = D.current, V = document.querySelector(`[data-drawer-overlay-for="${R}"]`);
|
|
248
248
|
return a ? (M == null || M.classList.add("open"), M == null || M.classList.remove("closing"), M == null || M.focus(), V && V.classList.add("visible"), document.body.style.overflow = "hidden") : M != null && M.classList.contains("open") && (M.classList.add("closing"), M.classList.remove("open"), V && V.classList.remove("visible"), document.body.style.overflow = ""), () => {
|
|
249
249
|
document.body.style.overflow = "";
|
|
250
250
|
};
|
|
251
|
-
}, [a,
|
|
251
|
+
}, [a, R, D]), U(() => {
|
|
252
252
|
const M = (V) => {
|
|
253
253
|
V.key === "Escape" && u && a && r && r();
|
|
254
254
|
};
|
|
255
255
|
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
256
256
|
}, [u, a, r]), We(D, () => {
|
|
257
257
|
p && u && a && r && r();
|
|
258
|
-
}), /* @__PURE__ */ T(
|
|
258
|
+
}), /* @__PURE__ */ T(Ee, { children: [
|
|
259
259
|
d && /* @__PURE__ */ o(
|
|
260
|
-
|
|
260
|
+
C,
|
|
261
261
|
{
|
|
262
262
|
className: `drawer-overlay ${f ? "blur" : ""} ${a ? "visible" : ""}`,
|
|
263
263
|
"data-drawer-overlay-for": e,
|
|
264
264
|
"aria-hidden": "true",
|
|
265
265
|
onClick: p && u && r ? r : void 0,
|
|
266
|
-
style: { zIndex:
|
|
266
|
+
style: { zIndex: $ ?? 9999 }
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
269
|
/* @__PURE__ */ T(
|
|
270
|
-
|
|
270
|
+
A,
|
|
271
271
|
{
|
|
272
272
|
as: "div",
|
|
273
|
-
id:
|
|
273
|
+
id: R,
|
|
274
274
|
"data-drawer": !0,
|
|
275
275
|
ref: D,
|
|
276
|
-
classNames:
|
|
276
|
+
classNames: N,
|
|
277
277
|
onAnimationEnd: (M) => {
|
|
278
278
|
(M.animationName.includes("slide-out") || M.animationName.includes("fade-out")) && M.currentTarget.classList.remove("closing");
|
|
279
279
|
},
|
|
280
280
|
role: "dialog",
|
|
281
281
|
"aria-modal": "true",
|
|
282
|
-
"aria-label":
|
|
283
|
-
"aria-describedby":
|
|
282
|
+
"aria-label": k || "Drawer",
|
|
283
|
+
"aria-describedby": S,
|
|
284
284
|
tabIndex: -1,
|
|
285
|
-
style: { zIndex:
|
|
285
|
+
style: { zIndex: $ ?? 1e4 },
|
|
286
286
|
...L,
|
|
287
287
|
children: [
|
|
288
288
|
u && r && /* @__PURE__ */ o(
|
|
@@ -296,14 +296,14 @@ const We = (e, t) => {
|
|
|
296
296
|
}
|
|
297
297
|
),
|
|
298
298
|
/* @__PURE__ */ T(
|
|
299
|
-
|
|
299
|
+
C,
|
|
300
300
|
{
|
|
301
301
|
className: "drawer-content",
|
|
302
302
|
padding: s,
|
|
303
303
|
bgColor: i,
|
|
304
304
|
bgColour: l,
|
|
305
305
|
children: [
|
|
306
|
-
|
|
306
|
+
x && /* @__PURE__ */ o("div", { id: S, className: "sr-only", children: x }),
|
|
307
307
|
/* @__PURE__ */ o("div", { role: "document", children: t })
|
|
308
308
|
]
|
|
309
309
|
}
|
|
@@ -315,11 +315,11 @@ const We = (e, t) => {
|
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
Dt.displayName = "Drawer";
|
|
318
|
-
const ze =
|
|
318
|
+
const ze = g.forwardRef(
|
|
319
319
|
({ size: e = "medium", shape: t, kind: a, isLoading: r, label: c, ...n }, s) => {
|
|
320
320
|
let i = [];
|
|
321
321
|
return a && i.push(a), e && i.push(`size-${e}`), t && i.push(`shape-${t}`), r && i.push("is-loading"), /* @__PURE__ */ o(
|
|
322
|
-
|
|
322
|
+
A,
|
|
323
323
|
{
|
|
324
324
|
as: "button",
|
|
325
325
|
"data-button": !0,
|
|
@@ -334,11 +334,11 @@ const ze = b.forwardRef(
|
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
336
|
ze.displayName = "Button";
|
|
337
|
-
const It =
|
|
337
|
+
const It = g.forwardRef(
|
|
338
338
|
({ isJoint: e = !0, spacing: t, equaliseWidth: a, children: r, ...c }, n) => {
|
|
339
339
|
let s = [];
|
|
340
340
|
return e && s.push("is-joint"), t && !e && s.push(`spacing-${t}`), a && s.push("equal-width"), /* @__PURE__ */ o(
|
|
341
|
-
|
|
341
|
+
A,
|
|
342
342
|
{
|
|
343
343
|
as: "div",
|
|
344
344
|
"data-button-group": !0,
|
|
@@ -352,9 +352,9 @@ const It = b.forwardRef(
|
|
|
352
352
|
}
|
|
353
353
|
);
|
|
354
354
|
It.displayName = "ButtonGroup";
|
|
355
|
-
const
|
|
355
|
+
const Ke = g.forwardRef(
|
|
356
356
|
({ children: e, current: t, ...a }, r) => /* @__PURE__ */ o(
|
|
357
|
-
|
|
357
|
+
A,
|
|
358
358
|
{
|
|
359
359
|
as: "li",
|
|
360
360
|
"data-breadcrumb-item": !0,
|
|
@@ -367,7 +367,7 @@ const Ce = b.forwardRef(
|
|
|
367
367
|
}
|
|
368
368
|
)
|
|
369
369
|
), At = ({ separator: e }) => /* @__PURE__ */ o(
|
|
370
|
-
|
|
370
|
+
J,
|
|
371
371
|
{
|
|
372
372
|
className: "breadcrumb-separator",
|
|
373
373
|
"aria-hidden": "true",
|
|
@@ -375,27 +375,27 @@ const Ce = b.forwardRef(
|
|
|
375
375
|
margin: "none",
|
|
376
376
|
children: e
|
|
377
377
|
}
|
|
378
|
-
), Lt =
|
|
378
|
+
), Lt = g.forwardRef(
|
|
379
379
|
({ children: e, separator: t = "/", spacing: a = "micro", ...r }, c) => {
|
|
380
380
|
let n = [];
|
|
381
381
|
a && n.push(`spacing-${a}`);
|
|
382
|
-
const s =
|
|
383
|
-
if (!
|
|
382
|
+
const s = g.Children.toArray(e).filter(Boolean), i = s.reduce((l, u, d) => {
|
|
383
|
+
if (!g.isValidElement(u)) return l;
|
|
384
384
|
const f = d === s.length - 1;
|
|
385
385
|
let p;
|
|
386
|
-
if (u.type ===
|
|
387
|
-
const
|
|
388
|
-
p =
|
|
386
|
+
if (u.type === Ke) {
|
|
387
|
+
const $ = u;
|
|
388
|
+
p = g.cloneElement($, {
|
|
389
389
|
current: f
|
|
390
390
|
});
|
|
391
391
|
} else
|
|
392
|
-
p = /* @__PURE__ */ o(
|
|
392
|
+
p = /* @__PURE__ */ o(Ke, { current: f, children: u }, `item-${d}`);
|
|
393
393
|
return l.push(p), f || l.push(
|
|
394
394
|
/* @__PURE__ */ o(At, { separator: t }, `sep-${d}`)
|
|
395
395
|
), l;
|
|
396
396
|
}, []);
|
|
397
397
|
return /* @__PURE__ */ o("nav", { "aria-label": "Breadcrumb", ref: c, ...r, children: /* @__PURE__ */ o(
|
|
398
|
-
|
|
398
|
+
A,
|
|
399
399
|
{
|
|
400
400
|
as: "ul",
|
|
401
401
|
"data-breadcrumbs-wrapper": !0,
|
|
@@ -407,9 +407,9 @@ const Ce = b.forwardRef(
|
|
|
407
407
|
}
|
|
408
408
|
);
|
|
409
409
|
Lt.displayName = "Breadcrumbs";
|
|
410
|
-
const Ze =
|
|
410
|
+
const Ze = g.forwardRef(
|
|
411
411
|
({ kind: e, children: t, title: a, ...r }, c) => /* @__PURE__ */ o(
|
|
412
|
-
|
|
412
|
+
A,
|
|
413
413
|
{
|
|
414
414
|
as: "div",
|
|
415
415
|
"data-callout": !0,
|
|
@@ -429,10 +429,10 @@ const Ze = b.forwardRef(
|
|
|
429
429
|
)
|
|
430
430
|
);
|
|
431
431
|
Ze.displayName = "Callout";
|
|
432
|
-
const Qe =
|
|
432
|
+
const Qe = g.forwardRef(({ shape: e, heading: t, children: a, ...r }, c) => {
|
|
433
433
|
let n = [];
|
|
434
434
|
return e && n.push(`shape-${e}`), /* @__PURE__ */ o(
|
|
435
|
-
|
|
435
|
+
A,
|
|
436
436
|
{
|
|
437
437
|
as: "div",
|
|
438
438
|
"data-card": !0,
|
|
@@ -447,7 +447,7 @@ const Qe = b.forwardRef(({ shape: e, heading: t, children: a, ...r }, c) => {
|
|
|
447
447
|
);
|
|
448
448
|
});
|
|
449
449
|
Qe.displayName = "Card";
|
|
450
|
-
const St =
|
|
450
|
+
const St = g.forwardRef(({
|
|
451
451
|
children: e,
|
|
452
452
|
source: t,
|
|
453
453
|
language: a = "json",
|
|
@@ -460,22 +460,22 @@ const St = b.forwardRef(({
|
|
|
460
460
|
shadow: u,
|
|
461
461
|
...d
|
|
462
462
|
}, f) => {
|
|
463
|
-
const [p,
|
|
464
|
-
let E = typeof e == "string" ? e :
|
|
465
|
-
e || (E = typeof t == "object" ? JSON.stringify(t, null, 2) : t ?? ""),
|
|
463
|
+
const [p, $] = j(!1), [k, x] = j(null), [h, L] = j(s), [v, R] = j(null), S = Y(null);
|
|
464
|
+
let E = typeof e == "string" ? e : g.Children.toArray(e).join("");
|
|
465
|
+
e || (E = typeof t == "object" ? JSON.stringify(t, null, 2) : t ?? ""), U(() => {
|
|
466
466
|
if (!s) return;
|
|
467
467
|
(async () => {
|
|
468
468
|
var H;
|
|
469
469
|
L(!0);
|
|
470
470
|
try {
|
|
471
|
-
const
|
|
472
|
-
if (typeof window < "u" && !window.Prism && (window.Prism =
|
|
471
|
+
const O = (await import("prismjs")).default;
|
|
472
|
+
if (typeof window < "u" && !window.Prism && (window.Prism = O), a !== "plain" && !O.languages[a])
|
|
473
473
|
try {
|
|
474
474
|
await import(`prismjs/components/prism-${a}`);
|
|
475
475
|
} catch {
|
|
476
476
|
console.warn(`Language "${a}" not available, falling back to plain text`);
|
|
477
477
|
}
|
|
478
|
-
|
|
478
|
+
x(O);
|
|
479
479
|
} catch (F) {
|
|
480
480
|
(F == null ? void 0 : F.code) === "ERR_MODULE_NOT_FOUND" || (H = F == null ? void 0 : F.message) != null && H.includes("Cannot find module") ? console.warn(
|
|
481
481
|
"PrismJS is not installed. To enable syntax highlighting, run: npm install prismjs"
|
|
@@ -485,92 +485,92 @@ const St = b.forwardRef(({
|
|
|
485
485
|
}
|
|
486
486
|
})();
|
|
487
487
|
}, [s, a]);
|
|
488
|
-
const D =
|
|
489
|
-
var
|
|
490
|
-
const
|
|
491
|
-
if (!
|
|
492
|
-
const H =
|
|
493
|
-
let
|
|
494
|
-
if (F && F !==
|
|
495
|
-
const
|
|
496
|
-
|
|
488
|
+
const D = G(() => {
|
|
489
|
+
var m;
|
|
490
|
+
const y = window.getSelection();
|
|
491
|
+
if (!y || y.rangeCount === 0) return null;
|
|
492
|
+
const H = y.getRangeAt(0), F = H.startContainer;
|
|
493
|
+
let w = H.startOffset;
|
|
494
|
+
if (F && F !== v && v) {
|
|
495
|
+
const b = document.createTreeWalker(
|
|
496
|
+
v,
|
|
497
497
|
NodeFilter.SHOW_TEXT,
|
|
498
498
|
null
|
|
499
499
|
);
|
|
500
|
-
let
|
|
501
|
-
for (; (
|
|
502
|
-
|
|
500
|
+
let I;
|
|
501
|
+
for (; (I = b.nextNode()) && I !== F; )
|
|
502
|
+
w += ((m = I.textContent) == null ? void 0 : m.length) || 0;
|
|
503
503
|
}
|
|
504
|
-
return
|
|
505
|
-
}, [
|
|
504
|
+
return w;
|
|
505
|
+
}, [v]), N = G((y) => {
|
|
506
506
|
var H;
|
|
507
|
-
if (!(!
|
|
507
|
+
if (!(!v || !s || !k))
|
|
508
508
|
try {
|
|
509
|
-
const F = i ? D() : null,
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
const F = i ? D() : null, O = k.highlight(
|
|
510
|
+
y,
|
|
511
|
+
k.languages[a] || k.languages.plain,
|
|
512
512
|
a
|
|
513
513
|
);
|
|
514
|
-
if (
|
|
515
|
-
const
|
|
516
|
-
|
|
514
|
+
if (v.innerHTML = O, i && F !== null) {
|
|
515
|
+
const w = window.getSelection(), m = document.createRange(), b = document.createTreeWalker(
|
|
516
|
+
v,
|
|
517
517
|
NodeFilter.SHOW_TEXT,
|
|
518
518
|
null
|
|
519
519
|
);
|
|
520
|
-
let
|
|
521
|
-
for (;
|
|
522
|
-
const
|
|
523
|
-
if (
|
|
524
|
-
|
|
520
|
+
let I = 0, B;
|
|
521
|
+
for (; B = b.nextNode(); ) {
|
|
522
|
+
const _ = ((H = B.textContent) == null ? void 0 : H.length) || 0;
|
|
523
|
+
if (I + _ >= F) {
|
|
524
|
+
m.setStart(B, F - I), m.setEnd(B, F - I), w == null || w.removeAllRanges(), w == null || w.addRange(m);
|
|
525
525
|
break;
|
|
526
526
|
}
|
|
527
|
-
|
|
527
|
+
I += _;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
} catch (F) {
|
|
531
|
-
console.warn("Error highlighting code:", F),
|
|
531
|
+
console.warn("Error highlighting code:", F), v && (v.textContent = y);
|
|
532
532
|
}
|
|
533
|
-
}, [a, s, i,
|
|
534
|
-
if (!
|
|
535
|
-
const H =
|
|
533
|
+
}, [a, s, i, k, D, v]), W = G((y) => {
|
|
534
|
+
if (!v) return;
|
|
535
|
+
const H = v.textContent || "";
|
|
536
536
|
l == null || l(H), requestAnimationFrame(() => {
|
|
537
|
-
|
|
537
|
+
N(H);
|
|
538
538
|
});
|
|
539
|
-
}, [
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
if (!(!
|
|
543
|
-
return
|
|
544
|
-
|
|
539
|
+
}, [N, l, v]);
|
|
540
|
+
U(() => {
|
|
541
|
+
const y = v;
|
|
542
|
+
if (!(!y || !i))
|
|
543
|
+
return y.addEventListener("input", W), () => {
|
|
544
|
+
y.removeEventListener("input", W);
|
|
545
545
|
};
|
|
546
|
-
}, [i,
|
|
547
|
-
!
|
|
548
|
-
}, [
|
|
546
|
+
}, [i, W, v]), U(() => {
|
|
547
|
+
!v || !k || N(E);
|
|
548
|
+
}, [N, E, k, v]);
|
|
549
549
|
const M = async () => {
|
|
550
550
|
try {
|
|
551
|
-
const
|
|
552
|
-
await navigator.clipboard.writeText(
|
|
553
|
-
} catch (
|
|
554
|
-
console.error("Could not copy text: ",
|
|
551
|
+
const y = v ? v.textContent || "" : E;
|
|
552
|
+
await navigator.clipboard.writeText(y), $(!0), setTimeout(() => $(!1), 3e3);
|
|
553
|
+
} catch (y) {
|
|
554
|
+
console.error("Could not copy text: ", y);
|
|
555
555
|
}
|
|
556
|
-
}, V = async (
|
|
557
|
-
(
|
|
556
|
+
}, V = async (y) => {
|
|
557
|
+
(y.key === "Enter" || y.key === " ") && y.target === S.current && (y.preventDefault(), await M());
|
|
558
558
|
};
|
|
559
|
-
let
|
|
560
|
-
c &&
|
|
559
|
+
let K = [];
|
|
560
|
+
c && K.push("show-line-numbers");
|
|
561
561
|
const P = E.split(/\r\n|\r|\n/gm);
|
|
562
562
|
return /* @__PURE__ */ T(
|
|
563
|
-
|
|
563
|
+
A,
|
|
564
564
|
{
|
|
565
565
|
"data-code-block": !0,
|
|
566
566
|
as: "div",
|
|
567
|
-
classNames:
|
|
567
|
+
classNames: K,
|
|
568
568
|
role: "region",
|
|
569
569
|
"aria-label": n || `Code block in ${a}`,
|
|
570
570
|
...d,
|
|
571
571
|
children: [
|
|
572
572
|
r ? p ? /* @__PURE__ */ o(
|
|
573
|
-
|
|
573
|
+
Be,
|
|
574
574
|
{
|
|
575
575
|
className: "code-block-copied-badge",
|
|
576
576
|
size: "tiny",
|
|
@@ -594,24 +594,24 @@ const St = b.forwardRef(({
|
|
|
594
594
|
/* @__PURE__ */ T(
|
|
595
595
|
"pre",
|
|
596
596
|
{
|
|
597
|
-
ref:
|
|
597
|
+
ref: S,
|
|
598
598
|
className: `language-${a}${u ? ` shadow-${u}` : ""}`,
|
|
599
599
|
tabIndex: 0,
|
|
600
600
|
"aria-label": `Code in ${a}`,
|
|
601
601
|
children: [
|
|
602
|
-
c && Array.from(Array(P.length).keys()).map((
|
|
602
|
+
c && Array.from(Array(P.length).keys()).map((y) => /* @__PURE__ */ o(
|
|
603
603
|
"span",
|
|
604
604
|
{
|
|
605
605
|
className: "line-numbers",
|
|
606
606
|
"aria-hidden": "true",
|
|
607
|
-
children:
|
|
607
|
+
children: y + 1
|
|
608
608
|
},
|
|
609
|
-
|
|
609
|
+
y
|
|
610
610
|
)),
|
|
611
611
|
/* @__PURE__ */ o(
|
|
612
612
|
"code",
|
|
613
613
|
{
|
|
614
|
-
ref:
|
|
614
|
+
ref: R,
|
|
615
615
|
contentEditable: i,
|
|
616
616
|
suppressContentEditableWarning: !0,
|
|
617
617
|
spellCheck: "false",
|
|
@@ -627,11 +627,11 @@ const St = b.forwardRef(({
|
|
|
627
627
|
);
|
|
628
628
|
});
|
|
629
629
|
St.displayName = "CodeBlock";
|
|
630
|
-
const et =
|
|
630
|
+
const et = g.forwardRef(
|
|
631
631
|
({ kind: e, height: t, label: a, ...r }, c) => {
|
|
632
632
|
let n = [];
|
|
633
633
|
return e && n.push(e), /* @__PURE__ */ o(
|
|
634
|
-
|
|
634
|
+
A,
|
|
635
635
|
{
|
|
636
636
|
as: "hr",
|
|
637
637
|
"data-hrule": !0,
|
|
@@ -710,7 +710,7 @@ const Ot = [
|
|
|
710
710
|
"weight",
|
|
711
711
|
// Custom classes
|
|
712
712
|
"classNames"
|
|
713
|
-
],
|
|
713
|
+
], de = (e) => {
|
|
714
714
|
const t = {}, a = {};
|
|
715
715
|
for (const r of Object.keys(e))
|
|
716
716
|
Ot.includes(r) ? t[r] = e[r] : a[r] = e[r];
|
|
@@ -718,7 +718,7 @@ const Ot = [
|
|
|
718
718
|
wrapperProps: t,
|
|
719
719
|
inputProps: a
|
|
720
720
|
};
|
|
721
|
-
},
|
|
721
|
+
}, Pe = g.forwardRef(
|
|
722
722
|
({
|
|
723
723
|
label: e,
|
|
724
724
|
hideLabel: t,
|
|
@@ -727,7 +727,7 @@ const Ot = [
|
|
|
727
727
|
}, c) => {
|
|
728
728
|
let n = [];
|
|
729
729
|
return t && n.push("visually-hidden"), /* @__PURE__ */ o(
|
|
730
|
-
|
|
730
|
+
A,
|
|
731
731
|
{
|
|
732
732
|
as: "label",
|
|
733
733
|
ref: c,
|
|
@@ -739,14 +739,14 @@ const Ot = [
|
|
|
739
739
|
);
|
|
740
740
|
}
|
|
741
741
|
);
|
|
742
|
-
|
|
743
|
-
const
|
|
742
|
+
Pe.displayName = "InputLabel";
|
|
743
|
+
const J = g.forwardRef(
|
|
744
744
|
({ weight: e, size: t, fontStyle: a = "sans-serif", align: r, isSubtext: c, ...n }, s) => {
|
|
745
745
|
let i = [];
|
|
746
|
-
return e && i.push(`weight-${e}`), t && i.push(`text-${t}`), a && i.push(`font-${a}`), c && i.push("sub-text"), r && i.push(`text-${r}`), /* @__PURE__ */ o(
|
|
746
|
+
return e && i.push(`weight-${e}`), t && i.push(`text-${t}`), a && i.push(`font-${a}`), c && i.push("sub-text"), r && i.push(`text-${r}`), /* @__PURE__ */ o(A, { as: "p", ref: s, classNames: i, ...n });
|
|
747
747
|
}
|
|
748
748
|
);
|
|
749
|
-
|
|
749
|
+
J.displayName = "Text";
|
|
750
750
|
const Bt = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
751
751
|
"svg",
|
|
752
752
|
{
|
|
@@ -803,7 +803,7 @@ const Bt = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
803
803
|
)
|
|
804
804
|
]
|
|
805
805
|
}
|
|
806
|
-
), ee =
|
|
806
|
+
), ee = g.forwardRef(
|
|
807
807
|
({
|
|
808
808
|
label: e,
|
|
809
809
|
customLabel: t,
|
|
@@ -817,9 +817,9 @@ const Bt = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
817
817
|
children: u,
|
|
818
818
|
...d
|
|
819
819
|
}, f) => {
|
|
820
|
-
const p = e || t,
|
|
820
|
+
const p = e || t, $ = r || c;
|
|
821
821
|
return /* @__PURE__ */ T(
|
|
822
|
-
|
|
822
|
+
A,
|
|
823
823
|
{
|
|
824
824
|
as: "div",
|
|
825
825
|
"data-form-item": !0,
|
|
@@ -829,14 +829,14 @@ const Bt = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
829
829
|
className: [i ? `size-${i}` : "", l ? "label-first" : ""].filter(Boolean).join(" ") || void 0,
|
|
830
830
|
...d,
|
|
831
831
|
children: [
|
|
832
|
-
p && /* @__PURE__ */ T(
|
|
833
|
-
t || e && /* @__PURE__ */ o(
|
|
832
|
+
p && /* @__PURE__ */ T(C, { "data-label-wrapper": !0, "data-has-validation": n ? "true" : void 0, children: [
|
|
833
|
+
t || e && /* @__PURE__ */ o(Pe, { label: e, htmlFor: a }),
|
|
834
834
|
n && /* @__PURE__ */ o(Bt, { state: n })
|
|
835
835
|
] }),
|
|
836
|
-
/* @__PURE__ */ o(
|
|
837
|
-
|
|
838
|
-
r && /* @__PURE__ */ o(
|
|
839
|
-
c && /* @__PURE__ */ o(
|
|
836
|
+
/* @__PURE__ */ o(C, { "data-input-wrapper": !0, children: u }),
|
|
837
|
+
$ && /* @__PURE__ */ T(C, { className: "info-section vertically-center-items", children: [
|
|
838
|
+
r && /* @__PURE__ */ o(J, { className: "help-text", children: r }),
|
|
839
|
+
c && /* @__PURE__ */ o(J, { className: "error-text", children: c })
|
|
840
840
|
] })
|
|
841
841
|
]
|
|
842
842
|
}
|
|
@@ -844,7 +844,7 @@ const Bt = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
844
844
|
}
|
|
845
845
|
);
|
|
846
846
|
ee.displayName = "FormItem";
|
|
847
|
-
const He =
|
|
847
|
+
const He = g.forwardRef(
|
|
848
848
|
({
|
|
849
849
|
id: e,
|
|
850
850
|
name: t,
|
|
@@ -859,11 +859,11 @@ const He = b.forwardRef(
|
|
|
859
859
|
required: d,
|
|
860
860
|
size: f = "medium",
|
|
861
861
|
labelFirst: p,
|
|
862
|
-
|
|
863
|
-
},
|
|
864
|
-
const
|
|
865
|
-
s == null || s(
|
|
866
|
-
}, { wrapperProps: L, inputProps:
|
|
862
|
+
...$
|
|
863
|
+
}, k) => {
|
|
864
|
+
const x = ye(() => t || e, [t, e]), h = (R) => {
|
|
865
|
+
s == null || s(R.target.checked);
|
|
866
|
+
}, { wrapperProps: L, inputProps: v } = de($);
|
|
867
867
|
return /* @__PURE__ */ T(
|
|
868
868
|
ee,
|
|
869
869
|
{
|
|
@@ -877,23 +877,23 @@ const He = b.forwardRef(
|
|
|
877
877
|
...L,
|
|
878
878
|
children: [
|
|
879
879
|
/* @__PURE__ */ o(
|
|
880
|
-
|
|
880
|
+
A,
|
|
881
881
|
{
|
|
882
882
|
as: "input",
|
|
883
883
|
type: "checkbox",
|
|
884
|
-
ref:
|
|
884
|
+
ref: k,
|
|
885
885
|
id: e,
|
|
886
|
-
name:
|
|
886
|
+
name: x,
|
|
887
887
|
checked: i,
|
|
888
888
|
defaultChecked: l,
|
|
889
889
|
disabled: u,
|
|
890
890
|
required: d,
|
|
891
891
|
onChange: h,
|
|
892
|
-
...
|
|
892
|
+
...v
|
|
893
893
|
}
|
|
894
894
|
),
|
|
895
895
|
/* @__PURE__ */ o(
|
|
896
|
-
|
|
896
|
+
A,
|
|
897
897
|
{
|
|
898
898
|
as: p ? "label" : "div",
|
|
899
899
|
htmlFor: p ? e : void 0,
|
|
@@ -907,7 +907,7 @@ const He = b.forwardRef(
|
|
|
907
907
|
}
|
|
908
908
|
);
|
|
909
909
|
He.displayName = "Checkbox";
|
|
910
|
-
const _e =
|
|
910
|
+
const _e = g.forwardRef(
|
|
911
911
|
({
|
|
912
912
|
id: e,
|
|
913
913
|
name: t,
|
|
@@ -922,11 +922,11 @@ const _e = b.forwardRef(
|
|
|
922
922
|
required: d,
|
|
923
923
|
size: f = "medium",
|
|
924
924
|
labelFirst: p,
|
|
925
|
-
|
|
926
|
-
},
|
|
927
|
-
const
|
|
928
|
-
s == null || s(
|
|
929
|
-
}, { wrapperProps: L, inputProps:
|
|
925
|
+
...$
|
|
926
|
+
}, k) => {
|
|
927
|
+
const x = ye(() => t || e, [t, e]), h = (R) => {
|
|
928
|
+
s == null || s(R.target.checked);
|
|
929
|
+
}, { wrapperProps: L, inputProps: v } = de($);
|
|
930
930
|
return /* @__PURE__ */ T(
|
|
931
931
|
ee,
|
|
932
932
|
{
|
|
@@ -940,23 +940,23 @@ const _e = b.forwardRef(
|
|
|
940
940
|
...L,
|
|
941
941
|
children: [
|
|
942
942
|
/* @__PURE__ */ o(
|
|
943
|
-
|
|
943
|
+
A,
|
|
944
944
|
{
|
|
945
945
|
as: "input",
|
|
946
946
|
type: "checkbox",
|
|
947
|
-
ref:
|
|
947
|
+
ref: k,
|
|
948
948
|
id: e,
|
|
949
|
-
name:
|
|
949
|
+
name: x,
|
|
950
950
|
checked: i,
|
|
951
951
|
defaultChecked: l,
|
|
952
952
|
disabled: u,
|
|
953
953
|
required: d,
|
|
954
954
|
onChange: h,
|
|
955
|
-
...
|
|
955
|
+
...v
|
|
956
956
|
}
|
|
957
957
|
),
|
|
958
958
|
/* @__PURE__ */ o(
|
|
959
|
-
|
|
959
|
+
A,
|
|
960
960
|
{
|
|
961
961
|
as: p ? "label" : "div",
|
|
962
962
|
htmlFor: p ? e : void 0,
|
|
@@ -970,7 +970,7 @@ const _e = b.forwardRef(
|
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
972
|
_e.displayName = "Switch";
|
|
973
|
-
const Vt =
|
|
973
|
+
const Vt = g.forwardRef(
|
|
974
974
|
({
|
|
975
975
|
id: e,
|
|
976
976
|
name: t,
|
|
@@ -985,24 +985,24 @@ const Vt = b.forwardRef(
|
|
|
985
985
|
equaliseWidth: d,
|
|
986
986
|
equalizeWidth: f,
|
|
987
987
|
required: p,
|
|
988
|
-
disabled:
|
|
989
|
-
size:
|
|
990
|
-
columns:
|
|
988
|
+
disabled: $,
|
|
989
|
+
size: k,
|
|
990
|
+
columns: x,
|
|
991
991
|
labelFirst: h,
|
|
992
992
|
...L
|
|
993
|
-
},
|
|
994
|
-
const
|
|
993
|
+
}, v) => {
|
|
994
|
+
const R = ye(() => t || e, [t, e]), [S, E] = g.useState(
|
|
995
995
|
s || i || []
|
|
996
996
|
);
|
|
997
|
-
|
|
997
|
+
g.useEffect(() => {
|
|
998
998
|
s !== void 0 && E(s);
|
|
999
999
|
}, [s]);
|
|
1000
|
-
const D = (
|
|
1000
|
+
const D = (W, M) => {
|
|
1001
1001
|
let V;
|
|
1002
|
-
M ? V = [...
|
|
1002
|
+
M ? V = [...S, W] : V = S.filter((K) => K !== W), s === void 0 && E(V), l == null || l(V);
|
|
1003
1003
|
};
|
|
1004
|
-
let
|
|
1005
|
-
return u &&
|
|
1004
|
+
let N = [];
|
|
1005
|
+
return u && N.push(`align-${u}`), (d || f) && N.push("equalise-width"), x && N.push("with-columns"), h && N.push("label-first"), /* @__PURE__ */ o(
|
|
1006
1006
|
ee,
|
|
1007
1007
|
{
|
|
1008
1008
|
label: a,
|
|
@@ -1011,30 +1011,30 @@ const Vt = b.forwardRef(
|
|
|
1011
1011
|
errorText: c,
|
|
1012
1012
|
required: p,
|
|
1013
1013
|
children: /* @__PURE__ */ o(
|
|
1014
|
-
|
|
1014
|
+
A,
|
|
1015
1015
|
{
|
|
1016
1016
|
as: "div",
|
|
1017
1017
|
"data-checkbox-group": !0,
|
|
1018
|
-
ref:
|
|
1019
|
-
classNames:
|
|
1018
|
+
ref: v,
|
|
1019
|
+
classNames: N,
|
|
1020
1020
|
role: "group",
|
|
1021
1021
|
"aria-label": a,
|
|
1022
|
-
style:
|
|
1022
|
+
style: x ? { gridTemplateColumns: `repeat(${x}, 1fr)` } : void 0,
|
|
1023
1023
|
...L,
|
|
1024
|
-
children: n.map((
|
|
1025
|
-
const { id: V, value:
|
|
1024
|
+
children: n.map((W, M) => {
|
|
1025
|
+
const { id: V, value: K, label: P, ...y } = W, H = V || `${e}-option-${M}`, F = S.includes(K);
|
|
1026
1026
|
return /* @__PURE__ */ o(
|
|
1027
1027
|
He,
|
|
1028
1028
|
{
|
|
1029
1029
|
id: H,
|
|
1030
|
-
name:
|
|
1030
|
+
name: R,
|
|
1031
1031
|
label: P,
|
|
1032
1032
|
checked: F,
|
|
1033
|
-
disabled:
|
|
1034
|
-
size:
|
|
1033
|
+
disabled: $ || W.disabled,
|
|
1034
|
+
size: k,
|
|
1035
1035
|
labelFirst: h,
|
|
1036
|
-
onChange: (
|
|
1037
|
-
...
|
|
1036
|
+
onChange: (O) => D(K, O),
|
|
1037
|
+
...y
|
|
1038
1038
|
},
|
|
1039
1039
|
H
|
|
1040
1040
|
);
|
|
@@ -1046,7 +1046,7 @@ const Vt = b.forwardRef(
|
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
1048
|
Vt.displayName = "CheckboxGroup";
|
|
1049
|
-
const Ft =
|
|
1049
|
+
const Ft = g.forwardRef(
|
|
1050
1050
|
({
|
|
1051
1051
|
id: e,
|
|
1052
1052
|
name: t,
|
|
@@ -1061,24 +1061,24 @@ const Ft = b.forwardRef(
|
|
|
1061
1061
|
equaliseWidth: d,
|
|
1062
1062
|
equalizeWidth: f,
|
|
1063
1063
|
required: p,
|
|
1064
|
-
disabled:
|
|
1065
|
-
size:
|
|
1066
|
-
columns:
|
|
1064
|
+
disabled: $,
|
|
1065
|
+
size: k,
|
|
1066
|
+
columns: x,
|
|
1067
1067
|
labelFirst: h,
|
|
1068
1068
|
...L
|
|
1069
|
-
},
|
|
1070
|
-
const
|
|
1069
|
+
}, v) => {
|
|
1070
|
+
const R = ye(() => t || e, [t, e]), [S, E] = g.useState(
|
|
1071
1071
|
s || i || []
|
|
1072
1072
|
);
|
|
1073
|
-
|
|
1073
|
+
g.useEffect(() => {
|
|
1074
1074
|
s !== void 0 && E(s);
|
|
1075
1075
|
}, [s]);
|
|
1076
|
-
const D = (
|
|
1076
|
+
const D = (W, M) => {
|
|
1077
1077
|
let V;
|
|
1078
|
-
M ? V = [...
|
|
1078
|
+
M ? V = [...S, W] : V = S.filter((K) => K !== W), s === void 0 && E(V), l == null || l(V);
|
|
1079
1079
|
};
|
|
1080
|
-
let
|
|
1081
|
-
return u &&
|
|
1080
|
+
let N = [];
|
|
1081
|
+
return u && N.push(`align-${u}`), (d || f) && N.push("equalise-width"), x && N.push("with-columns"), h && N.push("label-first"), /* @__PURE__ */ o(
|
|
1082
1082
|
ee,
|
|
1083
1083
|
{
|
|
1084
1084
|
label: a,
|
|
@@ -1087,30 +1087,30 @@ const Ft = b.forwardRef(
|
|
|
1087
1087
|
errorText: c,
|
|
1088
1088
|
required: p,
|
|
1089
1089
|
children: /* @__PURE__ */ o(
|
|
1090
|
-
|
|
1090
|
+
A,
|
|
1091
1091
|
{
|
|
1092
1092
|
as: "div",
|
|
1093
1093
|
"data-switch-group": !0,
|
|
1094
|
-
ref:
|
|
1095
|
-
classNames:
|
|
1094
|
+
ref: v,
|
|
1095
|
+
classNames: N,
|
|
1096
1096
|
role: "group",
|
|
1097
1097
|
"aria-label": a,
|
|
1098
|
-
style:
|
|
1098
|
+
style: x ? { gridTemplateColumns: `repeat(${x}, 1fr)` } : void 0,
|
|
1099
1099
|
...L,
|
|
1100
|
-
children: n.map((
|
|
1101
|
-
const { id: V, value:
|
|
1100
|
+
children: n.map((W, M) => {
|
|
1101
|
+
const { id: V, value: K, label: P, ...y } = W, H = V || `${e}-option-${M}`, F = S.includes(K);
|
|
1102
1102
|
return /* @__PURE__ */ o(
|
|
1103
1103
|
_e,
|
|
1104
1104
|
{
|
|
1105
1105
|
id: H,
|
|
1106
|
-
name:
|
|
1106
|
+
name: R,
|
|
1107
1107
|
label: P,
|
|
1108
1108
|
checked: F,
|
|
1109
|
-
disabled:
|
|
1110
|
-
size:
|
|
1109
|
+
disabled: $ || W.disabled,
|
|
1110
|
+
size: k,
|
|
1111
1111
|
labelFirst: h,
|
|
1112
|
-
onChange: (
|
|
1113
|
-
...
|
|
1112
|
+
onChange: (O) => D(K, O),
|
|
1113
|
+
...y
|
|
1114
1114
|
},
|
|
1115
1115
|
H
|
|
1116
1116
|
);
|
|
@@ -1122,7 +1122,7 @@ const Ft = b.forwardRef(
|
|
|
1122
1122
|
}
|
|
1123
1123
|
);
|
|
1124
1124
|
Ft.displayName = "SwitchGroup";
|
|
1125
|
-
const tt =
|
|
1125
|
+
const tt = g.forwardRef(
|
|
1126
1126
|
({
|
|
1127
1127
|
"aria-label": e,
|
|
1128
1128
|
"aria-invalid": t,
|
|
@@ -1137,107 +1137,109 @@ const tt = b.forwardRef(
|
|
|
1137
1137
|
onChange: d,
|
|
1138
1138
|
className: f = "",
|
|
1139
1139
|
instructionMainText: p = "Drag and drop or click to upload",
|
|
1140
|
-
instructionSubText:
|
|
1141
|
-
invalid:
|
|
1142
|
-
id:
|
|
1140
|
+
instructionSubText: $ = "You can add multiple files",
|
|
1141
|
+
invalid: k,
|
|
1142
|
+
id: x,
|
|
1143
1143
|
name: h,
|
|
1144
1144
|
badgeBgColour: L,
|
|
1145
|
-
badgeTextColour:
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
m.preventDefault(), m.stopPropagation(), B(!1);
|
|
1145
|
+
badgeTextColour: v,
|
|
1146
|
+
size: R,
|
|
1147
|
+
...S
|
|
1148
|
+
}, E) => {
|
|
1149
|
+
const [D, N] = j([]), [W, M] = j(!1), V = Y(null), K = (m) => {
|
|
1150
|
+
m.preventDefault(), m.stopPropagation(), M(!0);
|
|
1152
1151
|
}, P = (m) => {
|
|
1153
|
-
m.preventDefault(), m.stopPropagation(),
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1152
|
+
m.preventDefault(), m.stopPropagation(), M(!1);
|
|
1153
|
+
}, y = (m) => {
|
|
1154
|
+
m.preventDefault(), m.stopPropagation(), M(!1);
|
|
1155
|
+
const b = Array.from(m.dataTransfer.files);
|
|
1156
|
+
H(b);
|
|
1157
|
+
}, H = (m) => {
|
|
1157
1158
|
if (i)
|
|
1158
|
-
|
|
1159
|
+
N((b) => [...b, ...m]), d == null || d([...D, ...m]);
|
|
1159
1160
|
else {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1161
|
+
const b = m[0];
|
|
1162
|
+
N([b]), d == null || d([b]);
|
|
1162
1163
|
}
|
|
1163
|
-
},
|
|
1164
|
+
}, F = (m) => {
|
|
1164
1165
|
if (m.target.files) {
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1166
|
+
const b = Array.from(m.target.files);
|
|
1167
|
+
H(b);
|
|
1167
1168
|
}
|
|
1168
|
-
},
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
},
|
|
1169
|
+
}, O = (m) => {
|
|
1170
|
+
const b = D.filter((I, B) => B !== m);
|
|
1171
|
+
N(b), d == null || d(b);
|
|
1172
|
+
}, w = () => {
|
|
1172
1173
|
var m;
|
|
1173
|
-
(m =
|
|
1174
|
+
(m = V.current) == null || m.click();
|
|
1174
1175
|
};
|
|
1175
1176
|
return /* @__PURE__ */ o(
|
|
1176
1177
|
ee,
|
|
1177
1178
|
{
|
|
1178
1179
|
label: a,
|
|
1179
|
-
htmlFor:
|
|
1180
|
+
htmlFor: x,
|
|
1180
1181
|
helpText: r,
|
|
1181
1182
|
errorText: c,
|
|
1182
1183
|
required: n,
|
|
1184
|
+
size: R,
|
|
1183
1185
|
children: /* @__PURE__ */ T(
|
|
1184
|
-
|
|
1186
|
+
C,
|
|
1185
1187
|
{
|
|
1186
1188
|
"data-file-upload-area": !0,
|
|
1187
|
-
ref:
|
|
1189
|
+
ref: E,
|
|
1188
1190
|
className: [
|
|
1189
1191
|
"file-upload-wrapper",
|
|
1190
|
-
|
|
1192
|
+
W ? "dragging" : "",
|
|
1191
1193
|
f
|
|
1192
1194
|
].filter(Boolean).join(" "),
|
|
1193
1195
|
"aria-label": e || a,
|
|
1194
|
-
"aria-invalid": t ||
|
|
1196
|
+
"aria-invalid": t || k || void 0,
|
|
1195
1197
|
"aria-required": n,
|
|
1196
1198
|
children: [
|
|
1197
1199
|
/* @__PURE__ */ T(
|
|
1198
|
-
|
|
1200
|
+
C,
|
|
1199
1201
|
{
|
|
1200
1202
|
className: "file-upload-area",
|
|
1201
|
-
onDragOver:
|
|
1202
|
-
onDragLeave:
|
|
1203
|
-
onDrop:
|
|
1204
|
-
onClick:
|
|
1203
|
+
onDragOver: K,
|
|
1204
|
+
onDragLeave: P,
|
|
1205
|
+
onDrop: y,
|
|
1206
|
+
onClick: w,
|
|
1205
1207
|
style: { height: u },
|
|
1206
1208
|
children: [
|
|
1207
1209
|
/* @__PURE__ */ o(
|
|
1208
1210
|
"input",
|
|
1209
1211
|
{
|
|
1210
|
-
ref:
|
|
1212
|
+
ref: V,
|
|
1211
1213
|
type: "file",
|
|
1212
|
-
id:
|
|
1214
|
+
id: x,
|
|
1213
1215
|
name: h,
|
|
1214
|
-
onChange:
|
|
1216
|
+
onChange: F,
|
|
1215
1217
|
multiple: i,
|
|
1216
1218
|
accept: s,
|
|
1217
1219
|
capture: l,
|
|
1218
1220
|
className: "file-input"
|
|
1219
1221
|
}
|
|
1220
1222
|
),
|
|
1221
|
-
p && /* @__PURE__ */ T(
|
|
1222
|
-
/* @__PURE__ */ o(
|
|
1223
|
-
|
|
1223
|
+
p && /* @__PURE__ */ T(C, { className: "file-upload-content", children: [
|
|
1224
|
+
/* @__PURE__ */ o(J, { children: p }),
|
|
1225
|
+
$ && /* @__PURE__ */ o(J, { isSubtext: !0, children: $ })
|
|
1224
1226
|
] })
|
|
1225
1227
|
]
|
|
1226
1228
|
}
|
|
1227
1229
|
),
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
+
D.length > 0 && /* @__PURE__ */ o(C, { className: "uploaded-files", children: D.map((m, b) => /* @__PURE__ */ o(
|
|
1231
|
+
Be,
|
|
1230
1232
|
{
|
|
1231
1233
|
size: "small",
|
|
1232
1234
|
shape: "rounded",
|
|
1233
1235
|
actionIcon: "cross",
|
|
1234
|
-
onActionClick: () =>
|
|
1236
|
+
onActionClick: () => O(b),
|
|
1235
1237
|
actionAriaLabel: `Remove ${m.name}`,
|
|
1236
1238
|
bgColour: L,
|
|
1237
|
-
textColour:
|
|
1239
|
+
textColour: v,
|
|
1238
1240
|
children: m.name
|
|
1239
1241
|
},
|
|
1240
|
-
`${m.name}-${
|
|
1242
|
+
`${m.name}-${b}`
|
|
1241
1243
|
)) })
|
|
1242
1244
|
]
|
|
1243
1245
|
}
|
|
@@ -1247,7 +1249,7 @@ const tt = b.forwardRef(
|
|
|
1247
1249
|
}
|
|
1248
1250
|
);
|
|
1249
1251
|
tt.displayName = "FileUpload";
|
|
1250
|
-
const
|
|
1252
|
+
const Te = g.forwardRef(
|
|
1251
1253
|
({
|
|
1252
1254
|
// FormItem props
|
|
1253
1255
|
label: e,
|
|
@@ -1265,130 +1267,130 @@ const Re = b.forwardRef(
|
|
|
1265
1267
|
validateThis: d,
|
|
1266
1268
|
valid: f,
|
|
1267
1269
|
invalid: p,
|
|
1268
|
-
validationState:
|
|
1270
|
+
validationState: $,
|
|
1269
1271
|
// Handlers
|
|
1270
|
-
onChange:
|
|
1271
|
-
onBlur:
|
|
1272
|
+
onChange: k,
|
|
1273
|
+
onBlur: x,
|
|
1272
1274
|
onFocus: h,
|
|
1273
1275
|
// Aria
|
|
1274
1276
|
"aria-label": L,
|
|
1275
|
-
"aria-invalid":
|
|
1277
|
+
"aria-invalid": v,
|
|
1276
1278
|
// Input props
|
|
1277
|
-
id:
|
|
1278
|
-
name:
|
|
1279
|
+
id: R,
|
|
1280
|
+
name: S,
|
|
1279
1281
|
value: E,
|
|
1280
1282
|
defaultValue: D,
|
|
1281
|
-
type:
|
|
1282
|
-
placeholder:
|
|
1283
|
+
type: N = "text",
|
|
1284
|
+
placeholder: W,
|
|
1283
1285
|
autoComplete: M,
|
|
1284
1286
|
maxLength: V,
|
|
1285
|
-
minLength:
|
|
1287
|
+
minLength: K,
|
|
1286
1288
|
pattern: P,
|
|
1287
|
-
readOnly:
|
|
1289
|
+
readOnly: y,
|
|
1288
1290
|
disabled: H,
|
|
1289
1291
|
className: F,
|
|
1290
|
-
...
|
|
1291
|
-
},
|
|
1292
|
-
const
|
|
1293
|
-
(
|
|
1294
|
-
|
|
1292
|
+
...O
|
|
1293
|
+
}, w) => {
|
|
1294
|
+
const m = Y(null), b = Y(null), I = Y(null), [B, _] = j(!1), [Z, ie] = j(null), te = $ ?? (d ? Z : null), ae = g.useCallback(
|
|
1295
|
+
(q) => {
|
|
1296
|
+
I.current = q, typeof w == "function" ? w(q) : w && (w.current = q);
|
|
1295
1297
|
},
|
|
1296
|
-
[
|
|
1297
|
-
),
|
|
1298
|
-
const
|
|
1299
|
-
if (!
|
|
1300
|
-
|
|
1298
|
+
[w]
|
|
1299
|
+
), re = () => {
|
|
1300
|
+
const q = I.current;
|
|
1301
|
+
if (!q || q.value === "") {
|
|
1302
|
+
ie(null);
|
|
1301
1303
|
return;
|
|
1302
1304
|
}
|
|
1303
|
-
|
|
1304
|
-
},
|
|
1305
|
-
|
|
1306
|
-
},
|
|
1307
|
-
|
|
1308
|
-
},
|
|
1309
|
-
h == null || h(
|
|
1305
|
+
ie(q.validity.valid ? "valid" : "invalid");
|
|
1306
|
+
}, $e = (q) => {
|
|
1307
|
+
k == null || k(q.target.value), B && d && re();
|
|
1308
|
+
}, we = (q) => {
|
|
1309
|
+
_(!0), d && re(), x == null || x(q);
|
|
1310
|
+
}, z = (q) => {
|
|
1311
|
+
h == null || h(q);
|
|
1310
1312
|
};
|
|
1311
|
-
|
|
1312
|
-
const
|
|
1313
|
-
if (!
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1316
|
-
`--side-element-${
|
|
1317
|
-
`${
|
|
1313
|
+
U(() => {
|
|
1314
|
+
const q = (he, be) => {
|
|
1315
|
+
if (!he) return;
|
|
1316
|
+
const ue = he.closest("[data-form-item]");
|
|
1317
|
+
ue == null || ue.style.setProperty(
|
|
1318
|
+
`--side-element-${be}-width`,
|
|
1319
|
+
`${he.getBoundingClientRect().width}px`
|
|
1318
1320
|
);
|
|
1319
1321
|
};
|
|
1320
|
-
(l || s) &&
|
|
1322
|
+
(l || s) && q(m.current, "left"), (u || i) && q(b.current, "right");
|
|
1321
1323
|
}, [l, u, s, i]);
|
|
1322
|
-
const
|
|
1323
|
-
if (!
|
|
1324
|
-
const
|
|
1324
|
+
const X = (q, he, be) => {
|
|
1325
|
+
if (!q) return null;
|
|
1326
|
+
const ue = typeof q == "string", ge = g.isValidElement(q) ? q.props : {}, Re = !ue && g.isValidElement(q) && (ge.onClick || ge.onKeyDown || q.type === "button" || q.type === "a");
|
|
1325
1327
|
return /* @__PURE__ */ o(
|
|
1326
|
-
|
|
1328
|
+
C,
|
|
1327
1329
|
{
|
|
1328
|
-
ref:
|
|
1330
|
+
ref: be,
|
|
1329
1331
|
"data-input-side-element": !0,
|
|
1330
|
-
className: `${
|
|
1332
|
+
className: `${he} ${ue ? "is-text" : "is-icon"} ${Re ? "is-interactive" : ""}`,
|
|
1331
1333
|
"aria-hidden": "true",
|
|
1332
|
-
children:
|
|
1334
|
+
children: q
|
|
1333
1335
|
}
|
|
1334
1336
|
);
|
|
1335
|
-
},
|
|
1337
|
+
}, Q = !!(s || l), se = !!(i || u), { wrapperProps: xe, inputProps: De } = de(O);
|
|
1336
1338
|
return /* @__PURE__ */ T(
|
|
1337
1339
|
ee,
|
|
1338
1340
|
{
|
|
1339
1341
|
label: e,
|
|
1340
|
-
htmlFor:
|
|
1342
|
+
htmlFor: R,
|
|
1341
1343
|
helpText: a,
|
|
1342
1344
|
errorText: r,
|
|
1343
1345
|
validationState: te,
|
|
1344
1346
|
required: n,
|
|
1345
1347
|
size: c,
|
|
1346
|
-
...
|
|
1348
|
+
...xe,
|
|
1347
1349
|
children: [
|
|
1348
1350
|
/* @__PURE__ */ o(
|
|
1349
|
-
|
|
1351
|
+
A,
|
|
1350
1352
|
{
|
|
1351
1353
|
as: "input",
|
|
1352
1354
|
ref: ae,
|
|
1353
1355
|
"data-input-field": !0,
|
|
1354
|
-
id:
|
|
1355
|
-
name:
|
|
1356
|
-
type:
|
|
1356
|
+
id: R,
|
|
1357
|
+
name: S,
|
|
1358
|
+
type: N,
|
|
1357
1359
|
value: E,
|
|
1358
1360
|
defaultValue: D,
|
|
1359
|
-
placeholder:
|
|
1361
|
+
placeholder: W || " ",
|
|
1360
1362
|
autoComplete: M,
|
|
1361
1363
|
maxLength: V,
|
|
1362
|
-
minLength:
|
|
1364
|
+
minLength: K,
|
|
1363
1365
|
pattern: P,
|
|
1364
|
-
readOnly:
|
|
1366
|
+
readOnly: y,
|
|
1365
1367
|
disabled: H,
|
|
1366
1368
|
required: n,
|
|
1367
1369
|
className: [
|
|
1368
1370
|
F,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
+
Q && "with-left-element",
|
|
1372
|
+
se && "with-right-element"
|
|
1371
1373
|
].filter(Boolean).join(" "),
|
|
1372
1374
|
"aria-label": L || e,
|
|
1373
|
-
"aria-invalid":
|
|
1375
|
+
"aria-invalid": v || p,
|
|
1374
1376
|
"aria-required": n,
|
|
1375
|
-
onChange:
|
|
1376
|
-
onBlur:
|
|
1377
|
-
onFocus:
|
|
1378
|
-
...
|
|
1377
|
+
onChange: $e,
|
|
1378
|
+
onBlur: we,
|
|
1379
|
+
onFocus: z,
|
|
1380
|
+
...De
|
|
1379
1381
|
}
|
|
1380
1382
|
),
|
|
1381
|
-
(
|
|
1382
|
-
|
|
1383
|
-
|
|
1383
|
+
(Q || se) && /* @__PURE__ */ T(C, { "data-input-helper": !0, "aria-hidden": "true", children: [
|
|
1384
|
+
X(s || l, "left", m),
|
|
1385
|
+
X(i || u, "right", b)
|
|
1384
1386
|
] })
|
|
1385
1387
|
]
|
|
1386
1388
|
}
|
|
1387
1389
|
);
|
|
1388
1390
|
}
|
|
1389
1391
|
);
|
|
1390
|
-
|
|
1391
|
-
const at =
|
|
1392
|
+
Te.displayName = "InputField";
|
|
1393
|
+
const at = g.forwardRef(
|
|
1392
1394
|
({
|
|
1393
1395
|
desktopSpan: e,
|
|
1394
1396
|
mobileSpan: t,
|
|
@@ -1400,7 +1402,7 @@ const at = b.forwardRef(
|
|
|
1400
1402
|
}, i) => {
|
|
1401
1403
|
let l = [];
|
|
1402
1404
|
return e || a || r || t ? (e && l.push(`${e}`), a && l.push(`${a}-on-tablet-landscape`), r && l.push(`${r}-on-tablet-portrait`), t && l.push(`${t}-on-mobile`)) : l.push("whole"), c && l.push("horizontal"), /* @__PURE__ */ o(
|
|
1403
|
-
|
|
1405
|
+
A,
|
|
1404
1406
|
{
|
|
1405
1407
|
as: "div",
|
|
1406
1408
|
"data-portion": !0,
|
|
@@ -1413,7 +1415,7 @@ const at = b.forwardRef(
|
|
|
1413
1415
|
}
|
|
1414
1416
|
);
|
|
1415
1417
|
at.displayName = "Portion";
|
|
1416
|
-
const rt =
|
|
1418
|
+
const rt = g.forwardRef(
|
|
1417
1419
|
({
|
|
1418
1420
|
id: e,
|
|
1419
1421
|
name: t,
|
|
@@ -1428,11 +1430,11 @@ const rt = b.forwardRef(
|
|
|
1428
1430
|
labelFirst: d,
|
|
1429
1431
|
...f
|
|
1430
1432
|
}, p) => {
|
|
1431
|
-
const
|
|
1433
|
+
const $ = ye(() => t || e, [t, e]), k = (L) => {
|
|
1432
1434
|
L.target.checked && s && s(a);
|
|
1433
|
-
}, { wrapperProps:
|
|
1435
|
+
}, { wrapperProps: x, inputProps: h } = de(f);
|
|
1434
1436
|
return /* @__PURE__ */ o(
|
|
1435
|
-
|
|
1437
|
+
A,
|
|
1436
1438
|
{
|
|
1437
1439
|
as: "div",
|
|
1438
1440
|
"data-radio-button": !0,
|
|
@@ -1441,7 +1443,7 @@ const rt = b.forwardRef(
|
|
|
1441
1443
|
"aria-checked": i,
|
|
1442
1444
|
"aria-disabled": l,
|
|
1443
1445
|
className: d ? "label-first" : void 0,
|
|
1444
|
-
|
|
1446
|
+
...x,
|
|
1445
1447
|
children: /* @__PURE__ */ T(
|
|
1446
1448
|
ee,
|
|
1447
1449
|
{
|
|
@@ -1453,22 +1455,22 @@ const rt = b.forwardRef(
|
|
|
1453
1455
|
labelFirst: d,
|
|
1454
1456
|
children: [
|
|
1455
1457
|
/* @__PURE__ */ o(
|
|
1456
|
-
|
|
1458
|
+
A,
|
|
1457
1459
|
{
|
|
1458
1460
|
as: "input",
|
|
1459
1461
|
type: "radio",
|
|
1460
1462
|
id: e,
|
|
1461
|
-
name:
|
|
1463
|
+
name: $,
|
|
1462
1464
|
value: a,
|
|
1463
1465
|
checked: i,
|
|
1464
1466
|
disabled: l,
|
|
1465
1467
|
required: u,
|
|
1466
|
-
onChange:
|
|
1468
|
+
onChange: k,
|
|
1467
1469
|
...h
|
|
1468
1470
|
}
|
|
1469
1471
|
),
|
|
1470
1472
|
/* @__PURE__ */ o(
|
|
1471
|
-
|
|
1473
|
+
A,
|
|
1472
1474
|
{
|
|
1473
1475
|
as: d ? "label" : "div",
|
|
1474
1476
|
htmlFor: d ? e : void 0,
|
|
@@ -1483,7 +1485,7 @@ const rt = b.forwardRef(
|
|
|
1483
1485
|
}
|
|
1484
1486
|
);
|
|
1485
1487
|
rt.displayName = "RadioButton";
|
|
1486
|
-
const st =
|
|
1488
|
+
const st = g.forwardRef(
|
|
1487
1489
|
({
|
|
1488
1490
|
id: e,
|
|
1489
1491
|
name: t,
|
|
@@ -1498,17 +1500,17 @@ const st = b.forwardRef(
|
|
|
1498
1500
|
equaliseWidth: d,
|
|
1499
1501
|
equalizeWidth: f,
|
|
1500
1502
|
required: p,
|
|
1501
|
-
disabled:
|
|
1502
|
-
size:
|
|
1503
|
-
columns:
|
|
1503
|
+
disabled: $,
|
|
1504
|
+
size: k,
|
|
1505
|
+
columns: x,
|
|
1504
1506
|
labelFirst: h,
|
|
1505
1507
|
...L
|
|
1506
|
-
},
|
|
1507
|
-
const
|
|
1508
|
+
}, v) => {
|
|
1509
|
+
const R = ye(() => t || e, [t, e]), S = (D) => {
|
|
1508
1510
|
l == null || l(D.target.value);
|
|
1509
1511
|
};
|
|
1510
1512
|
let E = [];
|
|
1511
|
-
return u && E.push(`align-${u}`), (d || f) && E.push("equalise-width"),
|
|
1513
|
+
return u && E.push(`align-${u}`), (d || f) && E.push("equalise-width"), x && E.push("with-columns"), h && E.push("label-first"), /* @__PURE__ */ o(
|
|
1512
1514
|
ee,
|
|
1513
1515
|
{
|
|
1514
1516
|
label: a,
|
|
@@ -1516,26 +1518,26 @@ const st = b.forwardRef(
|
|
|
1516
1518
|
helpText: r,
|
|
1517
1519
|
errorText: c,
|
|
1518
1520
|
required: p,
|
|
1519
|
-
size:
|
|
1521
|
+
size: k,
|
|
1520
1522
|
children: /* @__PURE__ */ o(
|
|
1521
|
-
|
|
1523
|
+
A,
|
|
1522
1524
|
{
|
|
1523
1525
|
as: "div",
|
|
1524
1526
|
"data-radio-group": !0,
|
|
1525
|
-
ref:
|
|
1527
|
+
ref: v,
|
|
1526
1528
|
classNames: E,
|
|
1527
1529
|
role: "radiogroup",
|
|
1528
1530
|
"aria-label": a,
|
|
1529
|
-
style:
|
|
1531
|
+
style: x ? { gridTemplateColumns: `repeat(${x}, 1fr)` } : void 0,
|
|
1530
1532
|
...L,
|
|
1531
|
-
children: n.map((D,
|
|
1532
|
-
const { id:
|
|
1533
|
+
children: n.map((D, N) => {
|
|
1534
|
+
const { id: W, value: M, label: V, ...K } = D, P = W || `${e}-option-${N}`, y = s ? s === M : i === M;
|
|
1533
1535
|
return /* @__PURE__ */ T(
|
|
1534
|
-
|
|
1536
|
+
C,
|
|
1535
1537
|
{
|
|
1536
1538
|
"data-radio-button": !0,
|
|
1537
1539
|
role: "radio",
|
|
1538
|
-
"aria-checked":
|
|
1540
|
+
"aria-checked": y,
|
|
1539
1541
|
className: h ? "label-first" : void 0,
|
|
1540
1542
|
children: [
|
|
1541
1543
|
/* @__PURE__ */ o(
|
|
@@ -1543,16 +1545,16 @@ const st = b.forwardRef(
|
|
|
1543
1545
|
{
|
|
1544
1546
|
type: "radio",
|
|
1545
1547
|
id: P,
|
|
1546
|
-
name:
|
|
1548
|
+
name: R,
|
|
1547
1549
|
value: M,
|
|
1548
|
-
checked:
|
|
1549
|
-
disabled:
|
|
1550
|
-
onChange:
|
|
1551
|
-
...
|
|
1550
|
+
checked: y,
|
|
1551
|
+
disabled: $,
|
|
1552
|
+
onChange: S,
|
|
1553
|
+
...K
|
|
1552
1554
|
}
|
|
1553
1555
|
),
|
|
1554
1556
|
/* @__PURE__ */ o("label", { htmlFor: P, children: V }),
|
|
1555
|
-
h ? /* @__PURE__ */ o("label", { htmlFor: P, "data-radio": !0 }) : /* @__PURE__ */ o(
|
|
1557
|
+
h ? /* @__PURE__ */ o("label", { htmlFor: P, "data-radio": !0 }) : /* @__PURE__ */ o(C, { "data-radio": !0 })
|
|
1556
1558
|
]
|
|
1557
1559
|
},
|
|
1558
1560
|
P
|
|
@@ -1565,7 +1567,7 @@ const st = b.forwardRef(
|
|
|
1565
1567
|
}
|
|
1566
1568
|
);
|
|
1567
1569
|
st.displayName = "RadioGroup";
|
|
1568
|
-
const nt =
|
|
1570
|
+
const nt = g.forwardRef(
|
|
1569
1571
|
({
|
|
1570
1572
|
layout: e = "grid",
|
|
1571
1573
|
gutters: t = "medium",
|
|
@@ -1581,7 +1583,7 @@ const nt = b.forwardRef(
|
|
|
1581
1583
|
return e && d.push(`layout-${e}`), t && d.push(t === "none" ? "no-gutters" : `${t}-gutters`), a && d.push("retain-layout-on-tablet-landscape"), r && d.push("retain-layout-on-tablet-portrait"), c && d.push("retain-layout-on-mobile"), n && d.push(
|
|
1582
1584
|
"retain-layout-on-tablet-landscape retain-layout-on-tablet-portrait retain-layout-on-mobile"
|
|
1583
1585
|
), s && d.push("allow-ultra-wide"), /* @__PURE__ */ o(
|
|
1584
|
-
|
|
1586
|
+
A,
|
|
1585
1587
|
{
|
|
1586
1588
|
as: "div",
|
|
1587
1589
|
"data-row": !0,
|
|
@@ -1596,7 +1598,7 @@ const nt = b.forwardRef(
|
|
|
1596
1598
|
}
|
|
1597
1599
|
);
|
|
1598
1600
|
nt.displayName = "Row";
|
|
1599
|
-
const ot =
|
|
1601
|
+
const ot = g.forwardRef(
|
|
1600
1602
|
({
|
|
1601
1603
|
// FormItem props
|
|
1602
1604
|
label: e,
|
|
@@ -1613,26 +1615,26 @@ const ot = b.forwardRef(
|
|
|
1613
1615
|
className: d,
|
|
1614
1616
|
...f
|
|
1615
1617
|
}, p) => {
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
+
const $ = ye(() => s || n, [s, n]), k = (R) => /* @__PURE__ */ o(
|
|
1619
|
+
A,
|
|
1618
1620
|
{
|
|
1619
1621
|
as: "option",
|
|
1620
|
-
value:
|
|
1621
|
-
disabled:
|
|
1622
|
-
children:
|
|
1622
|
+
value: R.value,
|
|
1623
|
+
disabled: R.disabled,
|
|
1624
|
+
children: R.label
|
|
1623
1625
|
},
|
|
1624
|
-
|
|
1625
|
-
),
|
|
1626
|
-
|
|
1626
|
+
R.value
|
|
1627
|
+
), x = (R) => /* @__PURE__ */ o(
|
|
1628
|
+
A,
|
|
1627
1629
|
{
|
|
1628
1630
|
as: "optgroup",
|
|
1629
|
-
label:
|
|
1630
|
-
children:
|
|
1631
|
+
label: R.label,
|
|
1632
|
+
children: R.options.map(k)
|
|
1631
1633
|
},
|
|
1632
|
-
|
|
1633
|
-
), h = (
|
|
1634
|
-
l == null || l(
|
|
1635
|
-
}, { wrapperProps: L, inputProps:
|
|
1634
|
+
R.label
|
|
1635
|
+
), h = (R) => {
|
|
1636
|
+
l == null || l(R.target.value);
|
|
1637
|
+
}, { wrapperProps: L, inputProps: v } = de(f);
|
|
1636
1638
|
return /* @__PURE__ */ o(
|
|
1637
1639
|
ee,
|
|
1638
1640
|
{
|
|
@@ -1643,19 +1645,19 @@ const ot = b.forwardRef(
|
|
|
1643
1645
|
required: r,
|
|
1644
1646
|
size: c,
|
|
1645
1647
|
...L,
|
|
1646
|
-
children: /* @__PURE__ */ o(
|
|
1647
|
-
|
|
1648
|
+
children: /* @__PURE__ */ o(C, { "data-select": !0, className: d, disabled: u, children: /* @__PURE__ */ o(
|
|
1649
|
+
A,
|
|
1648
1650
|
{
|
|
1649
1651
|
as: "select",
|
|
1650
1652
|
ref: p,
|
|
1651
1653
|
id: n,
|
|
1652
|
-
name:
|
|
1654
|
+
name: $,
|
|
1653
1655
|
disabled: u,
|
|
1654
1656
|
required: r,
|
|
1655
1657
|
onChange: h,
|
|
1656
|
-
...
|
|
1658
|
+
...v,
|
|
1657
1659
|
children: i.map(
|
|
1658
|
-
(
|
|
1660
|
+
(R) => "options" in R ? x(R) : k(R)
|
|
1659
1661
|
)
|
|
1660
1662
|
}
|
|
1661
1663
|
) })
|
|
@@ -1664,7 +1666,7 @@ const ot = b.forwardRef(
|
|
|
1664
1666
|
}
|
|
1665
1667
|
);
|
|
1666
1668
|
ot.displayName = "Select";
|
|
1667
|
-
const je = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal",
|
|
1669
|
+
const je = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", Ie = (e, t, a) => Math.abs(e) === 1 ? t : a, it = g.forwardRef(
|
|
1668
1670
|
({
|
|
1669
1671
|
// FormItem props
|
|
1670
1672
|
label: e,
|
|
@@ -1682,59 +1684,59 @@ const je = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", D
|
|
|
1682
1684
|
id: d,
|
|
1683
1685
|
name: f,
|
|
1684
1686
|
rows: p,
|
|
1685
|
-
cols:
|
|
1686
|
-
minLength:
|
|
1687
|
-
maxLength:
|
|
1687
|
+
cols: $,
|
|
1688
|
+
minLength: k,
|
|
1689
|
+
maxLength: x,
|
|
1688
1690
|
placeholder: h,
|
|
1689
1691
|
readOnly: L,
|
|
1690
|
-
disabled:
|
|
1691
|
-
autoComplete:
|
|
1692
|
+
disabled: v,
|
|
1693
|
+
autoComplete: R,
|
|
1692
1694
|
// Validation (unused but destructured to not pass to DOM)
|
|
1693
|
-
validateThis:
|
|
1695
|
+
validateThis: S,
|
|
1694
1696
|
valid: E,
|
|
1695
1697
|
invalid: D,
|
|
1696
|
-
...
|
|
1697
|
-
},
|
|
1698
|
-
const M =
|
|
1698
|
+
...N
|
|
1699
|
+
}, W) => {
|
|
1700
|
+
const M = Y(null), V = (F) => {
|
|
1699
1701
|
s == null || s(F.target.value);
|
|
1700
|
-
},
|
|
1702
|
+
}, K = () => {
|
|
1701
1703
|
const F = [];
|
|
1702
1704
|
if (l) {
|
|
1703
|
-
const
|
|
1705
|
+
const O = i.length, w = je(O, l), m = Math.max(0, O - l), b = l - O;
|
|
1704
1706
|
F.push(
|
|
1705
|
-
/* @__PURE__ */ o("span", { className: `limit-${
|
|
1707
|
+
/* @__PURE__ */ o("span", { className: `limit-${w}`, children: m > 0 ? `${m} ${Ie(m, "char", "chars")} over limit` : `${b} ${Ie(b, "char", "chars")} left` }, "char-limit")
|
|
1706
1708
|
);
|
|
1707
1709
|
}
|
|
1708
1710
|
if (u) {
|
|
1709
|
-
const
|
|
1711
|
+
const O = i.trim().split(/\s+/).filter(Boolean).length, w = je(O, u), m = Math.max(0, O - u), b = u - O;
|
|
1710
1712
|
F.push(
|
|
1711
|
-
/* @__PURE__ */ o("span", { className: `limit-${
|
|
1713
|
+
/* @__PURE__ */ o("span", { className: `limit-${w}`, children: m > 0 ? `${m} ${Ie(m, "word", "words")} over limit` : `${b} ${Ie(b, "word", "words")} left` }, "word-limit")
|
|
1712
1714
|
);
|
|
1713
1715
|
}
|
|
1714
1716
|
if (!(!F.length && !a))
|
|
1715
|
-
return /* @__PURE__ */ T(
|
|
1717
|
+
return /* @__PURE__ */ T(Ee, { children: [
|
|
1716
1718
|
a,
|
|
1717
1719
|
a && F.length > 0 && /* @__PURE__ */ o("span", { className: "separator", children: " • " }),
|
|
1718
|
-
F.map((
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
] },
|
|
1720
|
+
F.map((O, w) => /* @__PURE__ */ T(g.Fragment, { children: [
|
|
1721
|
+
w > 0 && /* @__PURE__ */ o("span", { className: "separator", children: " • " }),
|
|
1722
|
+
O
|
|
1723
|
+
] }, w))
|
|
1722
1724
|
] });
|
|
1723
1725
|
}, P = (F) => {
|
|
1724
|
-
M.current = F, typeof
|
|
1725
|
-
}, { wrapperProps:
|
|
1726
|
+
M.current = F, typeof W == "function" ? W(F) : W && (W.current = F);
|
|
1727
|
+
}, { wrapperProps: y, inputProps: H } = de(N);
|
|
1726
1728
|
return /* @__PURE__ */ o(
|
|
1727
1729
|
ee,
|
|
1728
1730
|
{
|
|
1729
1731
|
label: e,
|
|
1730
1732
|
htmlFor: d,
|
|
1731
|
-
helpText:
|
|
1733
|
+
helpText: K(),
|
|
1732
1734
|
errorText: r,
|
|
1733
1735
|
required: n,
|
|
1734
1736
|
size: c,
|
|
1735
|
-
...
|
|
1737
|
+
...y,
|
|
1736
1738
|
children: /* @__PURE__ */ o(
|
|
1737
|
-
|
|
1739
|
+
A,
|
|
1738
1740
|
{
|
|
1739
1741
|
as: "textarea",
|
|
1740
1742
|
ref: P,
|
|
@@ -1743,14 +1745,14 @@ const je = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", D
|
|
|
1743
1745
|
name: f,
|
|
1744
1746
|
value: i,
|
|
1745
1747
|
rows: p,
|
|
1746
|
-
cols:
|
|
1747
|
-
minLength:
|
|
1748
|
-
maxLength:
|
|
1748
|
+
cols: $,
|
|
1749
|
+
minLength: k,
|
|
1750
|
+
maxLength: x,
|
|
1749
1751
|
placeholder: h,
|
|
1750
1752
|
readOnly: L,
|
|
1751
|
-
disabled:
|
|
1753
|
+
disabled: v,
|
|
1752
1754
|
required: n,
|
|
1753
|
-
autoComplete:
|
|
1755
|
+
autoComplete: R,
|
|
1754
1756
|
onChange: V,
|
|
1755
1757
|
...H
|
|
1756
1758
|
}
|
|
@@ -1763,9 +1765,9 @@ it.displayName = "TextArea";
|
|
|
1763
1765
|
const Wt = {
|
|
1764
1766
|
Checkbox: He,
|
|
1765
1767
|
Switch: _e,
|
|
1766
|
-
InputField:
|
|
1768
|
+
InputField: Te,
|
|
1767
1769
|
FileUpload: tt,
|
|
1768
|
-
InputLabel:
|
|
1770
|
+
InputLabel: Pe,
|
|
1769
1771
|
RadioButton: rt,
|
|
1770
1772
|
RadioGroup: st,
|
|
1771
1773
|
Select: ot,
|
|
@@ -1774,9 +1776,9 @@ const Wt = {
|
|
|
1774
1776
|
}, zt = (e, t) => {
|
|
1775
1777
|
const { as: a, name: r, ...c } = e, n = (i) => {
|
|
1776
1778
|
t(r, i);
|
|
1777
|
-
}, s = Wt[a] ||
|
|
1779
|
+
}, s = Wt[a] || Te;
|
|
1778
1780
|
return /* @__PURE__ */ o(
|
|
1779
|
-
|
|
1781
|
+
A,
|
|
1780
1782
|
{
|
|
1781
1783
|
as: s,
|
|
1782
1784
|
...c,
|
|
@@ -1804,7 +1806,7 @@ const Wt = {
|
|
|
1804
1806
|
}, key: `${c.name}-${n}` }, zt(f, t));
|
|
1805
1807
|
});
|
|
1806
1808
|
return /* @__PURE__ */ o(nt, { gutters: a, children: r });
|
|
1807
|
-
}, _t =
|
|
1809
|
+
}, _t = g.forwardRef(
|
|
1808
1810
|
({ spacing: e = "small", fields: t, onFieldsChange: a, children: r, errorText: c, ...n }, s) => {
|
|
1809
1811
|
let i = [];
|
|
1810
1812
|
e && i.push(`spacing-${e}`);
|
|
@@ -1814,7 +1816,7 @@ const Wt = {
|
|
|
1814
1816
|
});
|
|
1815
1817
|
}, u = t != null && t.length ? Ht(t, l, e) : r;
|
|
1816
1818
|
return /* @__PURE__ */ T(
|
|
1817
|
-
|
|
1819
|
+
A,
|
|
1818
1820
|
{
|
|
1819
1821
|
as: "form",
|
|
1820
1822
|
"data-form": !0,
|
|
@@ -1830,7 +1832,7 @@ const Wt = {
|
|
|
1830
1832
|
}
|
|
1831
1833
|
);
|
|
1832
1834
|
_t.displayName = "Form";
|
|
1833
|
-
const Gt =
|
|
1835
|
+
const Gt = g.forwardRef(
|
|
1834
1836
|
({
|
|
1835
1837
|
isJoint: e,
|
|
1836
1838
|
equalWidthForChildren: t,
|
|
@@ -1843,7 +1845,7 @@ const Gt = b.forwardRef(
|
|
|
1843
1845
|
const l = n || `form-group-${Math.random().toString(36).substring(2, 9)}`;
|
|
1844
1846
|
let u = [];
|
|
1845
1847
|
return e && u.push("is-joint"), t && u.push("equal-width-for-children"), a && u.push("retain-layout"), /* @__PURE__ */ o(
|
|
1846
|
-
|
|
1848
|
+
A,
|
|
1847
1849
|
{
|
|
1848
1850
|
as: "div",
|
|
1849
1851
|
"data-form-item-group": !0,
|
|
@@ -1859,7 +1861,7 @@ const Gt = b.forwardRef(
|
|
|
1859
1861
|
}
|
|
1860
1862
|
);
|
|
1861
1863
|
Gt.displayName = "FormItemGroup";
|
|
1862
|
-
const
|
|
1864
|
+
const Ct = (e, t) => {
|
|
1863
1865
|
const a = [], r = e.length, c = t.length;
|
|
1864
1866
|
if (r === 0) return c;
|
|
1865
1867
|
if (c === 0) return r;
|
|
@@ -1878,7 +1880,7 @@ const Kt = (e, t) => {
|
|
|
1878
1880
|
// Substitution
|
|
1879
1881
|
);
|
|
1880
1882
|
return a[c][r];
|
|
1881
|
-
},
|
|
1883
|
+
}, Kt = (e, t) => {
|
|
1882
1884
|
let a = 0, r = 0;
|
|
1883
1885
|
for (; a < e.length && r < t.length; )
|
|
1884
1886
|
e[a] === t[r] && a++, r++;
|
|
@@ -1887,9 +1889,9 @@ const Kt = (e, t) => {
|
|
|
1887
1889
|
if (!t) return e;
|
|
1888
1890
|
const a = t.toLowerCase().trim(), r = Math.floor(a.length / 2);
|
|
1889
1891
|
return e.map((n) => {
|
|
1890
|
-
const s = n.label.toLowerCase(), i =
|
|
1891
|
-
(
|
|
1892
|
-
), f = jt(s), p =
|
|
1892
|
+
const s = n.label.toLowerCase(), i = Ct(a, s), l = s.split(/[\s\-_]+/), u = a.split(/[\s\-_]+/), d = s.includes(a) || u.every(
|
|
1893
|
+
($) => l.some((k) => k.startsWith($))
|
|
1894
|
+
), f = jt(s), p = Kt(a, f);
|
|
1893
1895
|
return {
|
|
1894
1896
|
option: n,
|
|
1895
1897
|
distance: i,
|
|
@@ -1899,7 +1901,7 @@ const Kt = (e, t) => {
|
|
|
1899
1901
|
}).filter(
|
|
1900
1902
|
({ distance: n, isPartialMatch: s, isAcronymMatch: i }) => s || i || n <= r
|
|
1901
1903
|
).sort((n, s) => n.isPartialMatch && !s.isPartialMatch ? -1 : !n.isPartialMatch && s.isPartialMatch ? 1 : n.isAcronymMatch && !s.isAcronymMatch ? -1 : !n.isAcronymMatch && s.isAcronymMatch ? 1 : n.distance - s.distance).map(({ option: n }) => n);
|
|
1902
|
-
}, Ut =
|
|
1904
|
+
}, Ut = g.forwardRef(
|
|
1903
1905
|
({
|
|
1904
1906
|
options: e = [],
|
|
1905
1907
|
label: t,
|
|
@@ -1914,92 +1916,98 @@ const Kt = (e, t) => {
|
|
|
1914
1916
|
allowMultiSelect: d = !1,
|
|
1915
1917
|
allowCustomEntries: f = !1,
|
|
1916
1918
|
isLoading: p,
|
|
1917
|
-
value:
|
|
1918
|
-
isFullWidth:
|
|
1919
|
-
className:
|
|
1919
|
+
value: $,
|
|
1920
|
+
isFullWidth: k,
|
|
1921
|
+
className: x,
|
|
1920
1922
|
required: h,
|
|
1921
1923
|
size: L,
|
|
1922
|
-
...
|
|
1923
|
-
},
|
|
1924
|
-
const [
|
|
1925
|
-
|
|
1924
|
+
...v
|
|
1925
|
+
}, R) => {
|
|
1926
|
+
const [S, E] = j(!1), [D, N] = j(""), [W, M] = j(-1), [V, K] = j(null), [P, y] = j([]), [H, F] = j(!1);
|
|
1927
|
+
U(() => {
|
|
1926
1928
|
s && i && i(s);
|
|
1927
1929
|
}, []);
|
|
1928
|
-
const
|
|
1929
|
-
if (
|
|
1930
|
+
const O = g.useMemo(() => [...e], [e]), w = Y(null), m = Y(null), b = Y(null), I = n || `listbox-${Math.random().toString(36).substring(2, 9)}`, B = Xt(O, D), _ = (z) => {
|
|
1931
|
+
if (z.disabled) return;
|
|
1930
1932
|
let X;
|
|
1931
1933
|
if (d) {
|
|
1932
|
-
if (P.some((
|
|
1933
|
-
X = P.filter((
|
|
1934
|
+
if (P.some((se) => se.value === z.value))
|
|
1935
|
+
X = P.filter((se) => se.value !== z.value);
|
|
1934
1936
|
else {
|
|
1935
1937
|
if (u && P.length >= u)
|
|
1936
1938
|
return;
|
|
1937
|
-
X = [...P,
|
|
1939
|
+
X = [...P, z];
|
|
1938
1940
|
}
|
|
1939
|
-
|
|
1941
|
+
y(X), i == null || i(X.map((se) => se.value));
|
|
1940
1942
|
} else
|
|
1941
|
-
X = [
|
|
1942
|
-
|
|
1943
|
-
},
|
|
1944
|
-
|
|
1945
|
-
},
|
|
1943
|
+
X = [z], K(z), y(X), i == null || i(z.value), E(!1);
|
|
1944
|
+
N(""), M(-1);
|
|
1945
|
+
}, Z = (z) => {
|
|
1946
|
+
N(z);
|
|
1947
|
+
}, ie = () => {
|
|
1946
1948
|
if (!D.trim() || !f) return;
|
|
1947
|
-
const
|
|
1948
|
-
value:
|
|
1949
|
-
label:
|
|
1949
|
+
const z = D.trim(), X = {
|
|
1950
|
+
value: z,
|
|
1951
|
+
label: z
|
|
1950
1952
|
};
|
|
1951
|
-
|
|
1952
|
-
},
|
|
1953
|
+
O.some((Q) => Q.value === z) || _(X);
|
|
1954
|
+
}, te = (z) => {
|
|
1953
1955
|
if (d) {
|
|
1954
|
-
const X = P.filter((Q) => Q.value !==
|
|
1955
|
-
|
|
1956
|
+
const X = P.filter((Q) => Q.value !== z);
|
|
1957
|
+
y(X), i == null || i(X.map((Q) => Q.value));
|
|
1956
1958
|
} else
|
|
1957
|
-
|
|
1958
|
-
},
|
|
1959
|
-
|
|
1960
|
-
},
|
|
1961
|
-
switch (
|
|
1959
|
+
K(null), y([]), i == null || i("");
|
|
1960
|
+
}, ae = () => {
|
|
1961
|
+
K(null), y([]), i == null || i(d ? [] : "");
|
|
1962
|
+
}, re = (z) => {
|
|
1963
|
+
switch (z.key) {
|
|
1962
1964
|
case "ArrowDown":
|
|
1963
|
-
|
|
1964
|
-
(X) => X <
|
|
1965
|
+
z.preventDefault(), S ? M(
|
|
1966
|
+
(X) => X < B.length - 1 ? X + 1 : X
|
|
1965
1967
|
) : (E(!0), M(0));
|
|
1966
1968
|
break;
|
|
1967
1969
|
case "ArrowUp":
|
|
1968
|
-
|
|
1970
|
+
z.preventDefault(), M((X) => X > 0 ? X - 1 : X);
|
|
1969
1971
|
break;
|
|
1970
1972
|
case "Enter":
|
|
1971
|
-
if (
|
|
1972
|
-
const X =
|
|
1973
|
+
if (z.preventDefault(), f && D.trim()) {
|
|
1974
|
+
const X = B.find(
|
|
1973
1975
|
(Q) => Q.label.toLowerCase() === D.trim().toLowerCase()
|
|
1974
1976
|
);
|
|
1975
|
-
X ?
|
|
1976
|
-
} else
|
|
1977
|
+
X ? _(X) : ie();
|
|
1978
|
+
} else W >= 0 && B[W] && _(B[W]);
|
|
1977
1979
|
break;
|
|
1978
1980
|
case "Escape":
|
|
1979
|
-
|
|
1981
|
+
z.preventDefault(), E(!1), M(-1);
|
|
1980
1982
|
break;
|
|
1981
1983
|
case " ":
|
|
1982
|
-
|
|
1984
|
+
S || (z.preventDefault(), E(!0), M(0));
|
|
1983
1985
|
break;
|
|
1984
1986
|
case "Home":
|
|
1985
|
-
|
|
1987
|
+
S && (z.preventDefault(), M(0));
|
|
1986
1988
|
break;
|
|
1987
1989
|
case "End":
|
|
1988
|
-
|
|
1990
|
+
S && (z.preventDefault(), M(B.length - 1));
|
|
1989
1991
|
break;
|
|
1990
1992
|
}
|
|
1991
1993
|
};
|
|
1992
|
-
We(
|
|
1994
|
+
We(w, () => {
|
|
1993
1995
|
E(!1), M(-1);
|
|
1994
|
-
}),
|
|
1995
|
-
|
|
1996
|
-
}, [
|
|
1997
|
-
if (
|
|
1998
|
-
const
|
|
1999
|
-
|
|
1996
|
+
}), U(() => {
|
|
1997
|
+
S && m.current && m.current.focus();
|
|
1998
|
+
}, [S]), U(() => {
|
|
1999
|
+
if (S && w.current) {
|
|
2000
|
+
const z = w.current.getBoundingClientRect(), X = window.innerHeight, Q = 300, se = X - z.bottom, xe = z.top;
|
|
2001
|
+
F(se < Q && xe > se);
|
|
2002
|
+
} else
|
|
2003
|
+
F(!1);
|
|
2004
|
+
}, [S]), U(() => {
|
|
2005
|
+
if (W >= 0) {
|
|
2006
|
+
const z = document.querySelector(`[data-index="${W}"]`);
|
|
2007
|
+
z == null || z.scrollIntoView({ block: "nearest" });
|
|
2000
2008
|
}
|
|
2001
|
-
}, [
|
|
2002
|
-
const { wrapperProps:
|
|
2009
|
+
}, [W]);
|
|
2010
|
+
const { wrapperProps: $e, inputProps: we } = de(v);
|
|
2003
2011
|
return /* @__PURE__ */ o(
|
|
2004
2012
|
ee,
|
|
2005
2013
|
{
|
|
@@ -2008,46 +2016,46 @@ const Kt = (e, t) => {
|
|
|
2008
2016
|
helpText: a,
|
|
2009
2017
|
errorText: r,
|
|
2010
2018
|
required: h,
|
|
2011
|
-
isFullWidth:
|
|
2019
|
+
isFullWidth: k,
|
|
2012
2020
|
size: L,
|
|
2013
|
-
|
|
2021
|
+
...$e,
|
|
2014
2022
|
children: /* @__PURE__ */ T(
|
|
2015
|
-
|
|
2023
|
+
A,
|
|
2016
2024
|
{
|
|
2017
2025
|
as: "div",
|
|
2018
2026
|
"data-list-box": !0,
|
|
2019
|
-
classNames: ["list-box-wrapper", l ? "disabled" : "",
|
|
2020
|
-
ref:
|
|
2021
|
-
isFullWidth:
|
|
2022
|
-
...
|
|
2027
|
+
classNames: ["list-box-wrapper", l ? "disabled" : "", x || ""],
|
|
2028
|
+
ref: w,
|
|
2029
|
+
isFullWidth: k,
|
|
2030
|
+
...we,
|
|
2023
2031
|
children: [
|
|
2024
2032
|
/* @__PURE__ */ T(
|
|
2025
|
-
|
|
2033
|
+
C,
|
|
2026
2034
|
{
|
|
2027
2035
|
className: "list-box-input-wrapper",
|
|
2028
|
-
onClick: () => !l && E(!
|
|
2036
|
+
onClick: () => !l && E(!S),
|
|
2029
2037
|
role: "combobox",
|
|
2030
2038
|
"aria-haspopup": "listbox",
|
|
2031
|
-
"aria-expanded":
|
|
2032
|
-
"aria-controls": `${
|
|
2033
|
-
"aria-owns": `${
|
|
2039
|
+
"aria-expanded": S,
|
|
2040
|
+
"aria-controls": `${I}-listbox`,
|
|
2041
|
+
"aria-owns": `${I}-listbox`,
|
|
2034
2042
|
tabIndex: l ? -1 : 0,
|
|
2035
2043
|
children: [
|
|
2036
|
-
d ? /* @__PURE__ */ T(
|
|
2037
|
-
P.length > 0 ? /* @__PURE__ */ T(
|
|
2038
|
-
/* @__PURE__ */ o(
|
|
2039
|
-
|
|
2044
|
+
d ? /* @__PURE__ */ T(Ee, { children: [
|
|
2045
|
+
P.length > 0 ? /* @__PURE__ */ T(C, { className: "options-wrapper", children: [
|
|
2046
|
+
/* @__PURE__ */ o(C, { className: "options-list", children: P.map((z) => /* @__PURE__ */ o(
|
|
2047
|
+
Be,
|
|
2040
2048
|
{
|
|
2041
2049
|
actionIcon: "cross",
|
|
2042
|
-
onActionClick: () =>
|
|
2043
|
-
actionAriaLabel: `Remove ${
|
|
2050
|
+
onActionClick: () => te(z.value),
|
|
2051
|
+
actionAriaLabel: `Remove ${z.label}`,
|
|
2044
2052
|
size: "small",
|
|
2045
2053
|
shape: "rounded",
|
|
2046
|
-
children: /* @__PURE__ */ o(
|
|
2054
|
+
children: /* @__PURE__ */ o(J, { children: z.label })
|
|
2047
2055
|
},
|
|
2048
|
-
|
|
2056
|
+
z.value
|
|
2049
2057
|
)) }),
|
|
2050
|
-
u && P.length >= u && /* @__PURE__ */ T(
|
|
2058
|
+
u && P.length >= u && /* @__PURE__ */ T(J, { className: "options-limit-warning", textColour: "red", size: "tiny", children: [
|
|
2051
2059
|
"You can choose only ",
|
|
2052
2060
|
u,
|
|
2053
2061
|
" option",
|
|
@@ -2055,87 +2063,94 @@ const Kt = (e, t) => {
|
|
|
2055
2063
|
] })
|
|
2056
2064
|
] }) : /* @__PURE__ */ o("span", { className: "placeholder", children: c }),
|
|
2057
2065
|
P.length > 0 && /* @__PURE__ */ o(
|
|
2058
|
-
|
|
2066
|
+
C,
|
|
2059
2067
|
{
|
|
2060
2068
|
className: "icon-wrapper clear-all",
|
|
2061
2069
|
title: "Clear all options",
|
|
2062
|
-
onClick: () =>
|
|
2070
|
+
onClick: () => ae(),
|
|
2063
2071
|
children: /* @__PURE__ */ T("svg", { viewBox: "0 0 24 24", children: [
|
|
2064
2072
|
/* @__PURE__ */ o("line", { x1: "5", y1: "5", x2: "19", y2: "19" }),
|
|
2065
2073
|
/* @__PURE__ */ o("line", { x1: "5", y1: "19", x2: "19", y2: "5" })
|
|
2066
2074
|
] })
|
|
2067
2075
|
}
|
|
2068
2076
|
)
|
|
2069
|
-
] }) : P[0] ? /* @__PURE__ */ o(
|
|
2070
|
-
/* @__PURE__ */ o(
|
|
2077
|
+
] }) : P[0] ? /* @__PURE__ */ o(J, { className: "selected-option", children: P[0].label }) : /* @__PURE__ */ o("span", { className: "placeholder", children: c }),
|
|
2078
|
+
/* @__PURE__ */ o(C, { className: "icon-wrapper chevrons", children: /* @__PURE__ */ T("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
2071
2079
|
/* @__PURE__ */ o("polyline", { points: "6 9 12 4 18 9" }),
|
|
2072
2080
|
/* @__PURE__ */ o("polyline", { points: "6 15 12 20 18 15" })
|
|
2073
2081
|
] }) })
|
|
2074
2082
|
]
|
|
2075
2083
|
}
|
|
2076
2084
|
),
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
"aria-multiselectable": d,
|
|
2111
|
-
"aria-busy": p,
|
|
2112
|
-
tabIndex: -1,
|
|
2113
|
-
children: v.length > 0 ? v.map((W, X) => /* @__PURE__ */ o(
|
|
2114
|
-
"li",
|
|
2085
|
+
S && !l && /* @__PURE__ */ T(
|
|
2086
|
+
C,
|
|
2087
|
+
{
|
|
2088
|
+
ref: b,
|
|
2089
|
+
className: `list-box-dropdown${H ? " opens-upward" : ""}`,
|
|
2090
|
+
children: [
|
|
2091
|
+
/* @__PURE__ */ T(C, { className: "list-box-search-wrapper", children: [
|
|
2092
|
+
/* @__PURE__ */ o(
|
|
2093
|
+
Te,
|
|
2094
|
+
{
|
|
2095
|
+
type: "text",
|
|
2096
|
+
ref: m,
|
|
2097
|
+
className: "list-box-search",
|
|
2098
|
+
placeholder: f ? "Type to search or add new" : "Search",
|
|
2099
|
+
value: D,
|
|
2100
|
+
onChange: Z,
|
|
2101
|
+
onKeyDown: re,
|
|
2102
|
+
"aria-controls": `${I}-listbox`,
|
|
2103
|
+
"aria-label": "Search options",
|
|
2104
|
+
isFullWidth: !0
|
|
2105
|
+
}
|
|
2106
|
+
),
|
|
2107
|
+
f && D.trim() && !P.some((z) => z.label.toLowerCase() === D.trim().toLowerCase()) && /* @__PURE__ */ o(
|
|
2108
|
+
"kbd",
|
|
2109
|
+
{
|
|
2110
|
+
className: "list-box-enter-key",
|
|
2111
|
+
"aria-label": "Press Enter to add custom option",
|
|
2112
|
+
children: "↵"
|
|
2113
|
+
}
|
|
2114
|
+
)
|
|
2115
|
+
] }),
|
|
2116
|
+
/* @__PURE__ */ o(
|
|
2117
|
+
A,
|
|
2115
2118
|
{
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
"
|
|
2120
|
-
"aria-
|
|
2121
|
-
|
|
2122
|
-
"data-index": X,
|
|
2119
|
+
as: "ul",
|
|
2120
|
+
id: `${I}-listbox`,
|
|
2121
|
+
className: "list-box-options",
|
|
2122
|
+
role: "listbox",
|
|
2123
|
+
"aria-multiselectable": d,
|
|
2124
|
+
"aria-busy": p,
|
|
2123
2125
|
tabIndex: -1,
|
|
2124
|
-
children:
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2126
|
+
children: B.length > 0 ? B.map((z, X) => /* @__PURE__ */ o(
|
|
2127
|
+
"li",
|
|
2128
|
+
{
|
|
2129
|
+
id: `${I}-option-${z.value}`,
|
|
2130
|
+
className: `list-box-option ${z.disabled ? "disabled" : ""} ${W === X ? "active" : ""}`,
|
|
2131
|
+
role: "option",
|
|
2132
|
+
"aria-selected": P.some((Q) => Q.value === z.value),
|
|
2133
|
+
"aria-disabled": z.disabled,
|
|
2134
|
+
onClick: () => _(z),
|
|
2135
|
+
"data-index": X,
|
|
2136
|
+
tabIndex: -1,
|
|
2137
|
+
children: z.customLabel || z.label
|
|
2138
|
+
},
|
|
2139
|
+
z.value
|
|
2140
|
+
)) : /* @__PURE__ */ o(
|
|
2141
|
+
"li",
|
|
2142
|
+
{
|
|
2143
|
+
className: "list-box-option disabled",
|
|
2144
|
+
role: "alert",
|
|
2145
|
+
"aria-live": "polite",
|
|
2146
|
+
children: f ? "Type and press Enter to add new option" : "No matches found"
|
|
2147
|
+
}
|
|
2148
|
+
)
|
|
2134
2149
|
}
|
|
2135
2150
|
)
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2151
|
+
]
|
|
2152
|
+
}
|
|
2153
|
+
)
|
|
2139
2154
|
]
|
|
2140
2155
|
}
|
|
2141
2156
|
)
|
|
@@ -2147,7 +2162,7 @@ Ut.displayName = "ListBox";
|
|
|
2147
2162
|
function Xe(e, t) {
|
|
2148
2163
|
return (t === "alphanumeric" ? /^[a-zA-Z0-9]+$/i : /^[0-9]+$/).test(e);
|
|
2149
2164
|
}
|
|
2150
|
-
const qt =
|
|
2165
|
+
const qt = g.forwardRef(
|
|
2151
2166
|
({
|
|
2152
2167
|
numberOfFields: e,
|
|
2153
2168
|
onChange: t,
|
|
@@ -2161,77 +2176,77 @@ const qt = b.forwardRef(
|
|
|
2161
2176
|
ariaLabel: u,
|
|
2162
2177
|
...d
|
|
2163
2178
|
}, f) => {
|
|
2164
|
-
const p =
|
|
2165
|
-
(
|
|
2166
|
-
var
|
|
2167
|
-
const
|
|
2168
|
-
(
|
|
2179
|
+
const p = Y(null), [$, k] = j([]), [x, h] = j([]), [L, v] = j(!0), [R, S] = j(-1), E = d.id || `pin-input-${Math.random().toString(36).substring(2, 9)}`, D = u || "Enter verification code", N = G(
|
|
2180
|
+
(O) => {
|
|
2181
|
+
var m;
|
|
2182
|
+
const w = $[O];
|
|
2183
|
+
(m = w == null ? void 0 : w.current) == null || m.focus();
|
|
2169
2184
|
},
|
|
2170
|
-
[
|
|
2171
|
-
),
|
|
2172
|
-
(
|
|
2185
|
+
[$]
|
|
2186
|
+
), W = G(
|
|
2187
|
+
(O) => {
|
|
2173
2188
|
if (!L) return;
|
|
2174
|
-
const
|
|
2175
|
-
|
|
2189
|
+
const w = O + 1 < e ? O + 1 : null;
|
|
2190
|
+
w && N(w);
|
|
2176
2191
|
},
|
|
2177
|
-
[
|
|
2178
|
-
), M =
|
|
2179
|
-
h(Array(e).fill("")), t == null || t(""), i && (
|
|
2180
|
-
}, [e, t,
|
|
2181
|
-
(
|
|
2182
|
-
const
|
|
2183
|
-
|
|
2192
|
+
[N, e, L]
|
|
2193
|
+
), M = G(() => {
|
|
2194
|
+
h(Array(e).fill("")), t == null || t(""), i && (N(0), S(0));
|
|
2195
|
+
}, [e, t, N, i]), V = G(
|
|
2196
|
+
(O, w) => {
|
|
2197
|
+
const m = [...x];
|
|
2198
|
+
m[w] = O, h(m), t == null || t(m.join("")), O !== "" && m.length === e && m.every((I) => I != null && I !== "") && w === e - 1 || (v(!0), W(w));
|
|
2184
2199
|
},
|
|
2185
|
-
[
|
|
2186
|
-
),
|
|
2187
|
-
var
|
|
2188
|
-
const
|
|
2189
|
-
if (
|
|
2190
|
-
V("",
|
|
2200
|
+
[W, e, t, x]
|
|
2201
|
+
), K = G((O, w) => {
|
|
2202
|
+
var I;
|
|
2203
|
+
const m = typeof O == "string" ? O : O.target.value, b = x[w];
|
|
2204
|
+
if (m === "") {
|
|
2205
|
+
V("", w);
|
|
2191
2206
|
return;
|
|
2192
2207
|
}
|
|
2193
|
-
if (
|
|
2194
|
-
if (Xe(
|
|
2195
|
-
let
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
const Z =
|
|
2199
|
-
(te, ae) => ae >=
|
|
2208
|
+
if (m.length > 1 && w < e - 1) {
|
|
2209
|
+
if (Xe(m, a)) {
|
|
2210
|
+
let B = [];
|
|
2211
|
+
const _ = m.split("");
|
|
2212
|
+
b === "" ? B = _.filter((te, ae) => w + ae < e) : ((I = $[w].current) == null ? void 0 : I.selectionEnd) === m.length ? B = _.filter((ae, re) => re > 0 && w + re - 1 < e) : B = _.filter((ae, re) => re < m.length - 1 && w + re < e);
|
|
2213
|
+
const Z = x.map(
|
|
2214
|
+
(te, ae) => ae >= w && ae < w + B.length ? B[ae - w] : te
|
|
2200
2215
|
);
|
|
2201
2216
|
h(Z), t == null || t(Z.join(""));
|
|
2202
|
-
const
|
|
2203
|
-
|
|
2217
|
+
const ie = Math.min(w + B.length, e - 1);
|
|
2218
|
+
N(ie);
|
|
2204
2219
|
}
|
|
2205
2220
|
} else {
|
|
2206
|
-
let
|
|
2207
|
-
(
|
|
2221
|
+
let B = m;
|
|
2222
|
+
(b == null ? void 0 : b.length) > 0 && (B = m.charAt(m.length - 1)), Xe(B, a) && V(B, w);
|
|
2208
2223
|
}
|
|
2209
|
-
}, [e, t, V, a,
|
|
2210
|
-
var
|
|
2211
|
-
if (
|
|
2212
|
-
if (
|
|
2213
|
-
if (
|
|
2214
|
-
const
|
|
2215
|
-
V("",
|
|
2224
|
+
}, [e, t, V, a, x, N, $]), P = G((O, w) => {
|
|
2225
|
+
var m;
|
|
2226
|
+
if (O.key === "Backspace")
|
|
2227
|
+
if (O.target.value === "") {
|
|
2228
|
+
if (w > 0) {
|
|
2229
|
+
const b = w - 1;
|
|
2230
|
+
V("", b), N(b), v(!0);
|
|
2216
2231
|
}
|
|
2217
2232
|
} else
|
|
2218
|
-
|
|
2219
|
-
else
|
|
2220
|
-
}, [
|
|
2221
|
-
|
|
2222
|
-
}, []), H =
|
|
2223
|
-
const
|
|
2233
|
+
v(!1);
|
|
2234
|
+
else O.key === "Escape" ? ((m = $[w].current) == null || m.blur(), F()) : O.key === "ArrowRight" ? w < e - 1 && N(w + 1) : O.key === "ArrowLeft" && w > 0 && N(w - 1);
|
|
2235
|
+
}, [N, V, $, e]), y = G((O, w) => {
|
|
2236
|
+
S(w);
|
|
2237
|
+
}, []), H = G((O) => {
|
|
2238
|
+
const w = O.target;
|
|
2224
2239
|
setTimeout(() => {
|
|
2225
|
-
|
|
2240
|
+
w.setSelectionRange(w.value.length, w.value.length);
|
|
2226
2241
|
}, 0);
|
|
2227
|
-
}, []), F =
|
|
2228
|
-
|
|
2242
|
+
}, []), F = G(() => {
|
|
2243
|
+
S(-1);
|
|
2229
2244
|
}, []);
|
|
2230
|
-
return
|
|
2231
|
-
|
|
2232
|
-
var
|
|
2233
|
-
const
|
|
2234
|
-
return n &&
|
|
2245
|
+
return U(() => {
|
|
2246
|
+
k((O) => Array(e).fill(0).map((m, b) => {
|
|
2247
|
+
var B;
|
|
2248
|
+
const I = O[b] || Rt();
|
|
2249
|
+
return n && b === 0 && ((B = I.current) == null || B.focus()), I;
|
|
2235
2250
|
}));
|
|
2236
2251
|
}, [e, n]), Je(
|
|
2237
2252
|
f,
|
|
@@ -2241,7 +2256,7 @@ const qt = b.forwardRef(
|
|
|
2241
2256
|
}),
|
|
2242
2257
|
[M]
|
|
2243
2258
|
), /* @__PURE__ */ o(
|
|
2244
|
-
|
|
2259
|
+
C,
|
|
2245
2260
|
{
|
|
2246
2261
|
"data-pin-input-field": !0,
|
|
2247
2262
|
ref: p,
|
|
@@ -2250,35 +2265,35 @@ const qt = b.forwardRef(
|
|
|
2250
2265
|
"aria-label": D,
|
|
2251
2266
|
"aria-required": d.required,
|
|
2252
2267
|
...d,
|
|
2253
|
-
children: Array.from({ length: e }, (
|
|
2254
|
-
|
|
2268
|
+
children: Array.from({ length: e }, (O, w) => /* @__PURE__ */ o(
|
|
2269
|
+
Te,
|
|
2255
2270
|
{
|
|
2256
|
-
id: `${E}-${
|
|
2257
|
-
ref:
|
|
2271
|
+
id: `${E}-${w}`,
|
|
2272
|
+
ref: $[w],
|
|
2258
2273
|
type: r ? "password" : a === "number" ? "tel" : "text",
|
|
2259
2274
|
inputMode: a === "number" ? "numeric" : "text",
|
|
2260
|
-
onChange: (
|
|
2261
|
-
onKeyDown: (
|
|
2262
|
-
onFocus: (
|
|
2275
|
+
onChange: (m) => K(m, w),
|
|
2276
|
+
onKeyDown: (m) => P(m, w),
|
|
2277
|
+
onFocus: (m) => y(m, w),
|
|
2263
2278
|
onSelect: H,
|
|
2264
2279
|
onBlur: F,
|
|
2265
|
-
placeholder:
|
|
2280
|
+
placeholder: R !== w ? "⦁" : void 0,
|
|
2266
2281
|
autoComplete: c ? "one-time-code" : "off",
|
|
2267
|
-
value:
|
|
2268
|
-
autoFocus: n &&
|
|
2269
|
-
onCopy: (
|
|
2270
|
-
onPaste: (
|
|
2271
|
-
"aria-label": `Digit ${
|
|
2282
|
+
value: x[w] || "",
|
|
2283
|
+
autoFocus: n && w === 0,
|
|
2284
|
+
onCopy: (m) => s === "disabled" && m.preventDefault(),
|
|
2285
|
+
onPaste: (m) => s === "disabled" && m.preventDefault(),
|
|
2286
|
+
"aria-label": `Digit ${w + 1} of ${e}`,
|
|
2272
2287
|
"aria-required": d.required
|
|
2273
2288
|
},
|
|
2274
|
-
|
|
2289
|
+
w
|
|
2275
2290
|
))
|
|
2276
2291
|
}
|
|
2277
2292
|
);
|
|
2278
2293
|
}
|
|
2279
2294
|
);
|
|
2280
2295
|
qt.displayName = "PinInputField";
|
|
2281
|
-
const Yt =
|
|
2296
|
+
const Yt = g.forwardRef(
|
|
2282
2297
|
({
|
|
2283
2298
|
id: e,
|
|
2284
2299
|
name: t,
|
|
@@ -2293,62 +2308,62 @@ const Yt = b.forwardRef(
|
|
|
2293
2308
|
size: d = "medium",
|
|
2294
2309
|
bgColour: f,
|
|
2295
2310
|
disabled: p,
|
|
2296
|
-
|
|
2297
|
-
},
|
|
2298
|
-
const
|
|
2311
|
+
...$
|
|
2312
|
+
}, k) => {
|
|
2313
|
+
const x = ye(() => t || e, [t, e]), h = Y(null), [L, v] = j({
|
|
2299
2314
|
width: 0,
|
|
2300
2315
|
transform: "translateX(0)"
|
|
2301
|
-
}), [
|
|
2316
|
+
}), [R, S] = j(!1), [E, D] = j(0), [N, W] = j(0), M = Y([]), V = G(() => {
|
|
2302
2317
|
if (!h.current) return;
|
|
2303
|
-
const
|
|
2304
|
-
if (
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2318
|
+
const m = h.current, b = m.closest("[data-input-wrapper]");
|
|
2319
|
+
if (m && b) {
|
|
2320
|
+
const I = m.scrollWidth, B = b.clientWidth, _ = I > B;
|
|
2321
|
+
S(_), W(_ ? I - B : 0);
|
|
2307
2322
|
}
|
|
2308
2323
|
}, []);
|
|
2309
|
-
|
|
2310
|
-
const
|
|
2311
|
-
if (!
|
|
2324
|
+
U(() => {
|
|
2325
|
+
const m = h.current;
|
|
2326
|
+
if (!m) return;
|
|
2312
2327
|
V();
|
|
2313
|
-
const
|
|
2328
|
+
const b = new ResizeObserver(() => {
|
|
2314
2329
|
V();
|
|
2315
2330
|
});
|
|
2316
|
-
return
|
|
2317
|
-
}, [V]),
|
|
2318
|
-
const
|
|
2319
|
-
if (
|
|
2320
|
-
const
|
|
2321
|
-
const
|
|
2322
|
-
if (
|
|
2323
|
-
const
|
|
2324
|
-
let
|
|
2325
|
-
|
|
2331
|
+
return b.observe(m), m.closest("[data-input-wrapper]") && b.observe(m.closest("[data-input-wrapper]")), () => b.disconnect();
|
|
2332
|
+
}, [V]), U(() => {
|
|
2333
|
+
const m = n.findIndex((b) => b.value === i);
|
|
2334
|
+
if (m >= 0) {
|
|
2335
|
+
const b = () => {
|
|
2336
|
+
const I = M.current[m];
|
|
2337
|
+
if (I) {
|
|
2338
|
+
const B = I.offsetWidth;
|
|
2339
|
+
let _ = "translateX(0)";
|
|
2340
|
+
m > 0 && (_ = `translateX(${M.current.slice(0, m).reduce((ie, te) => ie + ((te == null ? void 0 : te.offsetWidth) || 0), 0)}px)`), v({ width: B, transform: _ });
|
|
2326
2341
|
}
|
|
2327
2342
|
};
|
|
2328
2343
|
if (document.fonts && document.fonts.ready)
|
|
2329
2344
|
document.fonts.ready.then(() => {
|
|
2330
2345
|
requestAnimationFrame(() => {
|
|
2331
|
-
requestAnimationFrame(
|
|
2346
|
+
requestAnimationFrame(b);
|
|
2332
2347
|
});
|
|
2333
2348
|
});
|
|
2334
2349
|
else {
|
|
2335
|
-
const
|
|
2336
|
-
return () => clearTimeout(
|
|
2350
|
+
const I = setTimeout(b, 100);
|
|
2351
|
+
return () => clearTimeout(I);
|
|
2337
2352
|
}
|
|
2338
2353
|
}
|
|
2339
2354
|
}, [i, n]);
|
|
2340
|
-
const
|
|
2341
|
-
u == null || u(
|
|
2342
|
-
}, { wrapperProps: P, inputProps:
|
|
2343
|
-
const
|
|
2344
|
-
if (!
|
|
2345
|
-
const
|
|
2346
|
-
let
|
|
2347
|
-
D(
|
|
2348
|
-
|
|
2355
|
+
const K = (m) => {
|
|
2356
|
+
u == null || u(m.target.value);
|
|
2357
|
+
}, { wrapperProps: P, inputProps: y } = de($), H = G((m) => {
|
|
2358
|
+
const b = h.current;
|
|
2359
|
+
if (!b) return;
|
|
2360
|
+
const B = b.clientWidth * 0.8;
|
|
2361
|
+
let _ = m === "right" ? Math.min(E + B, N) : Math.max(E - B, 0);
|
|
2362
|
+
D(_), requestAnimationFrame(() => {
|
|
2363
|
+
b.style.transform = `translateX(-${_}px)`;
|
|
2349
2364
|
});
|
|
2350
|
-
}, [E,
|
|
2351
|
-
return d &&
|
|
2365
|
+
}, [E, N]), F = E > 0, O = E < N, w = [];
|
|
2366
|
+
return d && w.push(`size-${d}`), /* @__PURE__ */ o(
|
|
2352
2367
|
ee,
|
|
2353
2368
|
{
|
|
2354
2369
|
label: a,
|
|
@@ -2359,32 +2374,32 @@ const Yt = b.forwardRef(
|
|
|
2359
2374
|
size: d,
|
|
2360
2375
|
...P,
|
|
2361
2376
|
children: /* @__PURE__ */ T(
|
|
2362
|
-
|
|
2377
|
+
A,
|
|
2363
2378
|
{
|
|
2364
2379
|
as: "div",
|
|
2365
2380
|
"data-radio-tab-group": !0,
|
|
2366
|
-
ref:
|
|
2367
|
-
classNames:
|
|
2368
|
-
name:
|
|
2369
|
-
...
|
|
2381
|
+
ref: k,
|
|
2382
|
+
classNames: w,
|
|
2383
|
+
name: x,
|
|
2384
|
+
...y,
|
|
2370
2385
|
children: [
|
|
2371
|
-
|
|
2372
|
-
|
|
2386
|
+
R && F && /* @__PURE__ */ o(
|
|
2387
|
+
C,
|
|
2373
2388
|
{
|
|
2374
2389
|
className: "scroll-button left",
|
|
2375
2390
|
onClick: () => H("left"),
|
|
2376
2391
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ o("polyline", { points: "15 18 9 12 15 6" }) })
|
|
2377
2392
|
}
|
|
2378
2393
|
),
|
|
2379
|
-
/* @__PURE__ */ T(
|
|
2394
|
+
/* @__PURE__ */ T(C, { className: "rtg-options-container", children: [
|
|
2380
2395
|
/* @__PURE__ */ T(
|
|
2381
|
-
|
|
2396
|
+
C,
|
|
2382
2397
|
{
|
|
2383
2398
|
className: "rtg-options-wrapper",
|
|
2384
2399
|
ref: h,
|
|
2385
2400
|
children: [
|
|
2386
2401
|
/* @__PURE__ */ o(
|
|
2387
|
-
|
|
2402
|
+
C,
|
|
2388
2403
|
{
|
|
2389
2404
|
className: "indicator",
|
|
2390
2405
|
style: {
|
|
@@ -2393,38 +2408,38 @@ const Yt = b.forwardRef(
|
|
|
2393
2408
|
}
|
|
2394
2409
|
}
|
|
2395
2410
|
),
|
|
2396
|
-
n.map((
|
|
2397
|
-
const { id:
|
|
2398
|
-
return /* @__PURE__ */ T(
|
|
2411
|
+
n.map((m, b) => {
|
|
2412
|
+
const { id: I, ...B } = m, _ = I || `${e}-option-${b}`;
|
|
2413
|
+
return /* @__PURE__ */ T(g.Fragment, { children: [
|
|
2399
2414
|
/* @__PURE__ */ o(
|
|
2400
2415
|
"input",
|
|
2401
2416
|
{
|
|
2402
2417
|
type: "radio",
|
|
2403
|
-
...
|
|
2404
|
-
id:
|
|
2405
|
-
name:
|
|
2406
|
-
checked: i ===
|
|
2407
|
-
disabled: p ||
|
|
2408
|
-
onChange:
|
|
2418
|
+
...B,
|
|
2419
|
+
id: _,
|
|
2420
|
+
name: x,
|
|
2421
|
+
checked: i === m.value,
|
|
2422
|
+
disabled: p || m.disabled,
|
|
2423
|
+
onChange: K
|
|
2409
2424
|
}
|
|
2410
2425
|
),
|
|
2411
2426
|
/* @__PURE__ */ o(
|
|
2412
2427
|
"label",
|
|
2413
2428
|
{
|
|
2414
2429
|
ref: (Z) => {
|
|
2415
|
-
M.current[
|
|
2430
|
+
M.current[b] = Z;
|
|
2416
2431
|
},
|
|
2417
|
-
htmlFor:
|
|
2418
|
-
children:
|
|
2432
|
+
htmlFor: _,
|
|
2433
|
+
children: m.label
|
|
2419
2434
|
}
|
|
2420
2435
|
)
|
|
2421
|
-
] },
|
|
2436
|
+
] }, _);
|
|
2422
2437
|
})
|
|
2423
2438
|
]
|
|
2424
2439
|
}
|
|
2425
2440
|
),
|
|
2426
|
-
|
|
2427
|
-
|
|
2441
|
+
R && O && /* @__PURE__ */ o(
|
|
2442
|
+
C,
|
|
2428
2443
|
{
|
|
2429
2444
|
className: "scroll-button right",
|
|
2430
2445
|
onClick: () => H("right"),
|
|
@@ -2443,7 +2458,7 @@ Yt.displayName = "RadioTabGroup";
|
|
|
2443
2458
|
function Jt(e) {
|
|
2444
2459
|
return Array.isArray(e.value);
|
|
2445
2460
|
}
|
|
2446
|
-
const Zt =
|
|
2461
|
+
const Zt = g.forwardRef(
|
|
2447
2462
|
(e, t) => Jt(e) ? /* @__PURE__ */ o(ct, { ...e, forwardedRef: t }) : /* @__PURE__ */ o(lt, { ...e, forwardedRef: t })
|
|
2448
2463
|
);
|
|
2449
2464
|
Zt.displayName = "Range";
|
|
@@ -2462,108 +2477,108 @@ const lt = ({
|
|
|
2462
2477
|
size: f,
|
|
2463
2478
|
...p
|
|
2464
2479
|
}) => {
|
|
2465
|
-
const { wrapperProps:
|
|
2466
|
-
if (
|
|
2467
|
-
const
|
|
2468
|
-
return Math.max(s, Math.min(i,
|
|
2469
|
-
}, [s, i, l]),
|
|
2470
|
-
const
|
|
2471
|
-
n == null || n(
|
|
2472
|
-
}, [D, n]),
|
|
2473
|
-
d || (P.preventDefault(), L(!0),
|
|
2474
|
-
}, [d,
|
|
2475
|
-
|
|
2480
|
+
const { wrapperProps: $ } = de(p), k = Y(null), x = Y(null), [h, L] = j(!1), [v, R] = j(!1), S = Math.max(s, Math.min(i, r)), E = G((P) => i <= s ? 0 : (Math.max(s, Math.min(i, P)) - s) / (i - s) * 100, [s, i]), D = G((P) => {
|
|
2481
|
+
if (!x.current) return s;
|
|
2482
|
+
const y = x.current.getBoundingClientRect(), H = Math.max(0, Math.min(1, (P - y.left) / y.width)), F = s + H * (i - s), O = Math.round(F / l) * l;
|
|
2483
|
+
return Math.max(s, Math.min(i, O));
|
|
2484
|
+
}, [s, i, l]), N = G((P) => {
|
|
2485
|
+
const y = D(P);
|
|
2486
|
+
n == null || n(y);
|
|
2487
|
+
}, [D, n]), W = G((P) => {
|
|
2488
|
+
d || (P.preventDefault(), L(!0), R(!0), N(P.clientX));
|
|
2489
|
+
}, [d, N]);
|
|
2490
|
+
U(() => {
|
|
2476
2491
|
if (!h) return;
|
|
2477
2492
|
const P = (H) => {
|
|
2478
|
-
|
|
2479
|
-
},
|
|
2493
|
+
N(H.clientX);
|
|
2494
|
+
}, y = () => {
|
|
2480
2495
|
L(!1);
|
|
2481
2496
|
};
|
|
2482
|
-
return document.addEventListener("mousemove", P), document.addEventListener("mouseup",
|
|
2483
|
-
document.removeEventListener("mousemove", P), document.removeEventListener("mouseup",
|
|
2497
|
+
return document.addEventListener("mousemove", P), document.addEventListener("mouseup", y), () => {
|
|
2498
|
+
document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", y);
|
|
2484
2499
|
};
|
|
2485
|
-
}, [h,
|
|
2486
|
-
const M =
|
|
2487
|
-
d || (L(!0),
|
|
2488
|
-
}, [d,
|
|
2489
|
-
|
|
2500
|
+
}, [h, N]);
|
|
2501
|
+
const M = G((P) => {
|
|
2502
|
+
d || (L(!0), R(!0), N(P.touches[0].clientX));
|
|
2503
|
+
}, [d, N]);
|
|
2504
|
+
U(() => {
|
|
2490
2505
|
if (!h) return;
|
|
2491
2506
|
const P = (H) => {
|
|
2492
|
-
H.preventDefault(),
|
|
2493
|
-
},
|
|
2507
|
+
H.preventDefault(), N(H.touches[0].clientX);
|
|
2508
|
+
}, y = () => {
|
|
2494
2509
|
L(!1);
|
|
2495
2510
|
};
|
|
2496
|
-
return document.addEventListener("touchmove", P, { passive: !1 }), document.addEventListener("touchend",
|
|
2497
|
-
document.removeEventListener("touchmove", P), document.removeEventListener("touchend",
|
|
2511
|
+
return document.addEventListener("touchmove", P, { passive: !1 }), document.addEventListener("touchend", y), () => {
|
|
2512
|
+
document.removeEventListener("touchmove", P), document.removeEventListener("touchend", y);
|
|
2498
2513
|
};
|
|
2499
|
-
}, [h,
|
|
2500
|
-
const V =
|
|
2514
|
+
}, [h, N]);
|
|
2515
|
+
const V = G((P) => {
|
|
2501
2516
|
if (d) return;
|
|
2502
|
-
let
|
|
2517
|
+
let y = S;
|
|
2503
2518
|
switch (P.key) {
|
|
2504
2519
|
case "ArrowRight":
|
|
2505
2520
|
case "ArrowUp":
|
|
2506
|
-
P.preventDefault(),
|
|
2521
|
+
P.preventDefault(), y = Math.min(S + l, i);
|
|
2507
2522
|
break;
|
|
2508
2523
|
case "ArrowLeft":
|
|
2509
2524
|
case "ArrowDown":
|
|
2510
|
-
P.preventDefault(),
|
|
2525
|
+
P.preventDefault(), y = Math.max(S - l, s);
|
|
2511
2526
|
break;
|
|
2512
2527
|
case "Home":
|
|
2513
|
-
P.preventDefault(),
|
|
2528
|
+
P.preventDefault(), y = s;
|
|
2514
2529
|
break;
|
|
2515
2530
|
case "End":
|
|
2516
|
-
P.preventDefault(),
|
|
2531
|
+
P.preventDefault(), y = i;
|
|
2517
2532
|
break;
|
|
2518
2533
|
case "PageUp":
|
|
2519
|
-
P.preventDefault(),
|
|
2534
|
+
P.preventDefault(), y = Math.min(S + l * 10, i);
|
|
2520
2535
|
break;
|
|
2521
2536
|
case "PageDown":
|
|
2522
|
-
P.preventDefault(),
|
|
2537
|
+
P.preventDefault(), y = Math.max(S - l * 10, s);
|
|
2523
2538
|
break;
|
|
2524
2539
|
default:
|
|
2525
2540
|
return;
|
|
2526
2541
|
}
|
|
2527
|
-
n == null || n(
|
|
2528
|
-
}, [d,
|
|
2542
|
+
n == null || n(y);
|
|
2543
|
+
}, [d, S, s, i, l, n]), K = E(S);
|
|
2529
2544
|
return /* @__PURE__ */ o(
|
|
2530
2545
|
ee,
|
|
2531
2546
|
{
|
|
2532
|
-
customLabel: e && /* @__PURE__ */ T(
|
|
2547
|
+
customLabel: e && /* @__PURE__ */ T(C, { "data-range-meta": !0, children: [
|
|
2533
2548
|
/* @__PURE__ */ o(
|
|
2534
|
-
|
|
2549
|
+
Pe,
|
|
2535
2550
|
{
|
|
2536
2551
|
className: "range-label",
|
|
2537
2552
|
label: e,
|
|
2538
2553
|
htmlFor: u
|
|
2539
2554
|
}
|
|
2540
2555
|
),
|
|
2541
|
-
/* @__PURE__ */ T(
|
|
2542
|
-
|
|
2556
|
+
/* @__PURE__ */ T(J, { className: "range-value", children: [
|
|
2557
|
+
S,
|
|
2543
2558
|
c && c
|
|
2544
2559
|
] })
|
|
2545
2560
|
] }),
|
|
2546
2561
|
helpText: t,
|
|
2547
2562
|
errorText: a,
|
|
2548
2563
|
size: f,
|
|
2549
|
-
|
|
2564
|
+
...$,
|
|
2550
2565
|
children: /* @__PURE__ */ T(
|
|
2551
|
-
|
|
2566
|
+
C,
|
|
2552
2567
|
{
|
|
2553
|
-
ref:
|
|
2568
|
+
ref: x,
|
|
2554
2569
|
"data-range-single": !0,
|
|
2555
2570
|
className: d ? "disabled" : "",
|
|
2556
2571
|
role: "group",
|
|
2557
2572
|
"aria-labelledby": e ? `${u}-label` : void 0,
|
|
2558
2573
|
children: [
|
|
2559
|
-
/* @__PURE__ */ o(
|
|
2574
|
+
/* @__PURE__ */ o(C, { className: "range-track", "aria-hidden": "true" }),
|
|
2560
2575
|
/* @__PURE__ */ o(
|
|
2561
|
-
|
|
2576
|
+
C,
|
|
2562
2577
|
{
|
|
2563
2578
|
className: "range-track-fill",
|
|
2564
2579
|
style: {
|
|
2565
2580
|
left: "0%",
|
|
2566
|
-
right: `${100 -
|
|
2581
|
+
right: `${100 - K}%`
|
|
2567
2582
|
},
|
|
2568
2583
|
"aria-hidden": "true"
|
|
2569
2584
|
}
|
|
@@ -2571,23 +2586,23 @@ const lt = ({
|
|
|
2571
2586
|
/* @__PURE__ */ o(
|
|
2572
2587
|
"button",
|
|
2573
2588
|
{
|
|
2574
|
-
ref:
|
|
2589
|
+
ref: k,
|
|
2575
2590
|
id: u,
|
|
2576
2591
|
type: "button",
|
|
2577
2592
|
className: "range-thumb",
|
|
2578
|
-
style: { left: `${
|
|
2593
|
+
style: { left: `${K}%` },
|
|
2579
2594
|
disabled: d,
|
|
2580
|
-
onMouseDown:
|
|
2595
|
+
onMouseDown: W,
|
|
2581
2596
|
onTouchStart: M,
|
|
2582
2597
|
onKeyDown: V,
|
|
2583
|
-
onFocus: () =>
|
|
2584
|
-
onBlur: () =>
|
|
2585
|
-
"data-active":
|
|
2598
|
+
onFocus: () => R(!0),
|
|
2599
|
+
onBlur: () => R(!1),
|
|
2600
|
+
"data-active": v || h,
|
|
2586
2601
|
role: "slider",
|
|
2587
2602
|
"aria-valuemin": s,
|
|
2588
2603
|
"aria-valuemax": i,
|
|
2589
|
-
"aria-valuenow":
|
|
2590
|
-
"aria-valuetext": `${
|
|
2604
|
+
"aria-valuenow": S,
|
|
2605
|
+
"aria-valuetext": `${S}${c ? ` ${c}` : ""}`,
|
|
2591
2606
|
"aria-orientation": "horizontal"
|
|
2592
2607
|
}
|
|
2593
2608
|
)
|
|
@@ -2612,111 +2627,111 @@ const ct = ({
|
|
|
2612
2627
|
maxLabel: d = "Maximum value",
|
|
2613
2628
|
id: f,
|
|
2614
2629
|
disabled: p,
|
|
2615
|
-
size:
|
|
2616
|
-
...
|
|
2630
|
+
size: $,
|
|
2631
|
+
...k
|
|
2617
2632
|
}) => {
|
|
2618
|
-
const { wrapperProps:
|
|
2633
|
+
const { wrapperProps: x } = de(k), [h, L] = r, v = Math.max(s, Math.min(i, h)), R = Math.max(s, Math.min(i, L)), S = Y(null), E = Y(null), D = Y(null), [N, W] = j(null), [M, V] = j(null), K = G((b) => i <= s ? 0 : (Math.max(s, Math.min(i, b)) - s) / (i - s) * 100, [s, i]), P = G((b) => {
|
|
2619
2634
|
if (!D.current) return s;
|
|
2620
|
-
const
|
|
2635
|
+
const I = D.current.getBoundingClientRect(), B = Math.max(0, Math.min(1, (b - I.left) / I.width)), _ = s + B * (i - s), Z = Math.round(_ / l) * l;
|
|
2621
2636
|
return Math.max(s, Math.min(i, Z));
|
|
2622
|
-
}, [s, i, l]),
|
|
2623
|
-
const
|
|
2624
|
-
if (
|
|
2625
|
-
const
|
|
2626
|
-
n == null || n([
|
|
2637
|
+
}, [s, i, l]), y = G((b, I) => {
|
|
2638
|
+
const B = P(b);
|
|
2639
|
+
if (I === "min") {
|
|
2640
|
+
const _ = Math.min(B, R - l);
|
|
2641
|
+
n == null || n([_, R]);
|
|
2627
2642
|
} else {
|
|
2628
|
-
const
|
|
2629
|
-
n == null || n([
|
|
2643
|
+
const _ = Math.max(B, v + l);
|
|
2644
|
+
n == null || n([v, _]);
|
|
2630
2645
|
}
|
|
2631
|
-
}, [P,
|
|
2632
|
-
p || (
|
|
2633
|
-
}, [p,
|
|
2634
|
-
|
|
2635
|
-
if (!
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2638
|
-
},
|
|
2639
|
-
|
|
2646
|
+
}, [P, v, R, l, n]), H = G((b) => (I) => {
|
|
2647
|
+
p || (I.preventDefault(), W(b), V(b), y(I.clientX, b));
|
|
2648
|
+
}, [p, y]);
|
|
2649
|
+
U(() => {
|
|
2650
|
+
if (!N) return;
|
|
2651
|
+
const b = (B) => {
|
|
2652
|
+
y(B.clientX, N);
|
|
2653
|
+
}, I = () => {
|
|
2654
|
+
W(null);
|
|
2640
2655
|
};
|
|
2641
|
-
return document.addEventListener("mousemove",
|
|
2642
|
-
document.removeEventListener("mousemove",
|
|
2656
|
+
return document.addEventListener("mousemove", b), document.addEventListener("mouseup", I), () => {
|
|
2657
|
+
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", I);
|
|
2643
2658
|
};
|
|
2644
|
-
}, [
|
|
2645
|
-
const F =
|
|
2646
|
-
p || (
|
|
2647
|
-
}, [p,
|
|
2648
|
-
|
|
2649
|
-
if (!
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2652
|
-
},
|
|
2653
|
-
|
|
2659
|
+
}, [N, y]);
|
|
2660
|
+
const F = G((b) => (I) => {
|
|
2661
|
+
p || (W(b), V(b), y(I.touches[0].clientX, b));
|
|
2662
|
+
}, [p, y]);
|
|
2663
|
+
U(() => {
|
|
2664
|
+
if (!N) return;
|
|
2665
|
+
const b = (B) => {
|
|
2666
|
+
B.preventDefault(), y(B.touches[0].clientX, N);
|
|
2667
|
+
}, I = () => {
|
|
2668
|
+
W(null);
|
|
2654
2669
|
};
|
|
2655
|
-
return document.addEventListener("touchmove",
|
|
2656
|
-
document.removeEventListener("touchmove",
|
|
2670
|
+
return document.addEventListener("touchmove", b, { passive: !1 }), document.addEventListener("touchend", I), () => {
|
|
2671
|
+
document.removeEventListener("touchmove", b), document.removeEventListener("touchend", I);
|
|
2657
2672
|
};
|
|
2658
|
-
}, [
|
|
2659
|
-
const
|
|
2673
|
+
}, [N, y]);
|
|
2674
|
+
const O = G((b) => (I) => {
|
|
2660
2675
|
if (p) return;
|
|
2661
|
-
const
|
|
2662
|
-
let
|
|
2663
|
-
switch (
|
|
2676
|
+
const B = b === "min" ? v : R;
|
|
2677
|
+
let _ = B;
|
|
2678
|
+
switch (I.key) {
|
|
2664
2679
|
case "ArrowRight":
|
|
2665
2680
|
case "ArrowUp":
|
|
2666
|
-
|
|
2681
|
+
I.preventDefault(), _ = Math.min(B + l, i);
|
|
2667
2682
|
break;
|
|
2668
2683
|
case "ArrowLeft":
|
|
2669
2684
|
case "ArrowDown":
|
|
2670
|
-
|
|
2685
|
+
I.preventDefault(), _ = Math.max(B - l, s);
|
|
2671
2686
|
break;
|
|
2672
2687
|
case "Home":
|
|
2673
|
-
|
|
2688
|
+
I.preventDefault(), _ = b === "min" ? s : v + l;
|
|
2674
2689
|
break;
|
|
2675
2690
|
case "End":
|
|
2676
|
-
|
|
2691
|
+
I.preventDefault(), _ = b === "max" ? i : R - l;
|
|
2677
2692
|
break;
|
|
2678
2693
|
case "PageUp":
|
|
2679
|
-
|
|
2694
|
+
I.preventDefault(), _ = Math.min(B + l * 10, i);
|
|
2680
2695
|
break;
|
|
2681
2696
|
case "PageDown":
|
|
2682
|
-
|
|
2697
|
+
I.preventDefault(), _ = Math.max(B - l * 10, s);
|
|
2683
2698
|
break;
|
|
2684
2699
|
default:
|
|
2685
2700
|
return;
|
|
2686
2701
|
}
|
|
2687
|
-
if (
|
|
2688
|
-
const Z = Math.min(
|
|
2689
|
-
n == null || n([Z,
|
|
2702
|
+
if (b === "min") {
|
|
2703
|
+
const Z = Math.min(_, R - l);
|
|
2704
|
+
n == null || n([Z, R]);
|
|
2690
2705
|
} else {
|
|
2691
|
-
const Z = Math.max(
|
|
2692
|
-
n == null || n([
|
|
2706
|
+
const Z = Math.max(_, v + l);
|
|
2707
|
+
n == null || n([v, Z]);
|
|
2693
2708
|
}
|
|
2694
|
-
}, [p,
|
|
2709
|
+
}, [p, v, R, s, i, l, n]), w = K(v), m = K(R);
|
|
2695
2710
|
return /* @__PURE__ */ o(
|
|
2696
2711
|
ee,
|
|
2697
2712
|
{
|
|
2698
|
-
customLabel: e && /* @__PURE__ */ T(
|
|
2713
|
+
customLabel: e && /* @__PURE__ */ T(C, { "data-range-meta": !0, children: [
|
|
2699
2714
|
/* @__PURE__ */ o(
|
|
2700
|
-
|
|
2715
|
+
Pe,
|
|
2701
2716
|
{
|
|
2702
2717
|
className: "range-label",
|
|
2703
2718
|
label: e,
|
|
2704
2719
|
htmlFor: f
|
|
2705
2720
|
}
|
|
2706
2721
|
),
|
|
2707
|
-
/* @__PURE__ */ T(
|
|
2708
|
-
|
|
2722
|
+
/* @__PURE__ */ T(J, { className: "range-value", children: [
|
|
2723
|
+
v,
|
|
2709
2724
|
"–",
|
|
2710
|
-
|
|
2725
|
+
R,
|
|
2711
2726
|
c && c
|
|
2712
2727
|
] })
|
|
2713
2728
|
] }),
|
|
2714
2729
|
helpText: t,
|
|
2715
2730
|
errorText: a,
|
|
2716
|
-
size:
|
|
2717
|
-
|
|
2731
|
+
size: $,
|
|
2732
|
+
...x,
|
|
2718
2733
|
children: /* @__PURE__ */ T(
|
|
2719
|
-
|
|
2734
|
+
C,
|
|
2720
2735
|
{
|
|
2721
2736
|
ref: D,
|
|
2722
2737
|
"data-range-dual": !0,
|
|
@@ -2724,14 +2739,14 @@ const ct = ({
|
|
|
2724
2739
|
role: "group",
|
|
2725
2740
|
"aria-labelledby": e ? `${f}-label` : void 0,
|
|
2726
2741
|
children: [
|
|
2727
|
-
/* @__PURE__ */ o(
|
|
2742
|
+
/* @__PURE__ */ o(C, { className: "range-track", "aria-hidden": "true" }),
|
|
2728
2743
|
/* @__PURE__ */ o(
|
|
2729
|
-
|
|
2744
|
+
C,
|
|
2730
2745
|
{
|
|
2731
2746
|
className: "range-track-fill",
|
|
2732
2747
|
style: {
|
|
2733
|
-
left: `${
|
|
2734
|
-
right: `${100 -
|
|
2748
|
+
left: `${w}%`,
|
|
2749
|
+
right: `${100 - m}%`
|
|
2735
2750
|
},
|
|
2736
2751
|
"aria-hidden": "true"
|
|
2737
2752
|
}
|
|
@@ -2739,24 +2754,24 @@ const ct = ({
|
|
|
2739
2754
|
/* @__PURE__ */ o(
|
|
2740
2755
|
"button",
|
|
2741
2756
|
{
|
|
2742
|
-
ref:
|
|
2757
|
+
ref: S,
|
|
2743
2758
|
id: `${f}-min`,
|
|
2744
2759
|
type: "button",
|
|
2745
2760
|
className: "range-thumb range-thumb-min",
|
|
2746
|
-
style: { left: `${
|
|
2761
|
+
style: { left: `${w}%` },
|
|
2747
2762
|
disabled: p,
|
|
2748
2763
|
onMouseDown: H("min"),
|
|
2749
2764
|
onTouchStart: F("min"),
|
|
2750
|
-
onKeyDown:
|
|
2765
|
+
onKeyDown: O("min"),
|
|
2751
2766
|
onFocus: () => V("min"),
|
|
2752
2767
|
onBlur: () => V(null),
|
|
2753
|
-
"data-active": M === "min" ||
|
|
2768
|
+
"data-active": M === "min" || N === "min",
|
|
2754
2769
|
role: "slider",
|
|
2755
2770
|
"aria-label": u,
|
|
2756
2771
|
"aria-valuemin": s,
|
|
2757
|
-
"aria-valuemax":
|
|
2758
|
-
"aria-valuenow":
|
|
2759
|
-
"aria-valuetext": `${
|
|
2772
|
+
"aria-valuemax": R - l,
|
|
2773
|
+
"aria-valuenow": v,
|
|
2774
|
+
"aria-valuetext": `${v}${c ? ` ${c}` : ""}`,
|
|
2760
2775
|
"aria-orientation": "horizontal"
|
|
2761
2776
|
}
|
|
2762
2777
|
),
|
|
@@ -2767,20 +2782,20 @@ const ct = ({
|
|
|
2767
2782
|
id: `${f}-max`,
|
|
2768
2783
|
type: "button",
|
|
2769
2784
|
className: "range-thumb range-thumb-max",
|
|
2770
|
-
style: { left: `${
|
|
2785
|
+
style: { left: `${m}%` },
|
|
2771
2786
|
disabled: p,
|
|
2772
2787
|
onMouseDown: H("max"),
|
|
2773
2788
|
onTouchStart: F("max"),
|
|
2774
|
-
onKeyDown:
|
|
2789
|
+
onKeyDown: O("max"),
|
|
2775
2790
|
onFocus: () => V("max"),
|
|
2776
2791
|
onBlur: () => V(null),
|
|
2777
|
-
"data-active": M === "max" ||
|
|
2792
|
+
"data-active": M === "max" || N === "max",
|
|
2778
2793
|
role: "slider",
|
|
2779
2794
|
"aria-label": d,
|
|
2780
|
-
"aria-valuemin":
|
|
2795
|
+
"aria-valuemin": v + l,
|
|
2781
2796
|
"aria-valuemax": i,
|
|
2782
|
-
"aria-valuenow":
|
|
2783
|
-
"aria-valuetext": `${
|
|
2797
|
+
"aria-valuenow": R,
|
|
2798
|
+
"aria-valuetext": `${R}${c ? ` ${c}` : ""}`,
|
|
2784
2799
|
"aria-orientation": "horizontal"
|
|
2785
2800
|
}
|
|
2786
2801
|
)
|
|
@@ -2791,7 +2806,7 @@ const ct = ({
|
|
|
2791
2806
|
);
|
|
2792
2807
|
};
|
|
2793
2808
|
ct.displayName = "DualThumbRange";
|
|
2794
|
-
const Qt =
|
|
2809
|
+
const Qt = g.forwardRef(
|
|
2795
2810
|
({
|
|
2796
2811
|
label: e,
|
|
2797
2812
|
value: t,
|
|
@@ -2806,14 +2821,14 @@ const Qt = b.forwardRef(
|
|
|
2806
2821
|
high: d,
|
|
2807
2822
|
optimum: f,
|
|
2808
2823
|
...p
|
|
2809
|
-
},
|
|
2810
|
-
const
|
|
2811
|
-
const
|
|
2812
|
-
let
|
|
2813
|
-
return t <= u ?
|
|
2814
|
-
}, { wrapperProps: h, inputProps: L } =
|
|
2824
|
+
}, $) => {
|
|
2825
|
+
const k = f ? (f - i) / (l - i) * 100 : 0, x = () => {
|
|
2826
|
+
const v = (t - i) / (l - i) * 100;
|
|
2827
|
+
let R;
|
|
2828
|
+
return t <= u ? R = "Low" : t >= d ? R = "High" : R = "Normal", `Current value is ${t}${r || ""} (${v.toFixed(1)}%). Status: ${R}`;
|
|
2829
|
+
}, { wrapperProps: h, inputProps: L } = de(p);
|
|
2815
2830
|
return /* @__PURE__ */ T(
|
|
2816
|
-
|
|
2831
|
+
A,
|
|
2817
2832
|
{
|
|
2818
2833
|
as: "div",
|
|
2819
2834
|
role: "region",
|
|
@@ -2821,14 +2836,14 @@ const Qt = b.forwardRef(
|
|
|
2821
2836
|
...h,
|
|
2822
2837
|
children: [
|
|
2823
2838
|
e && /* @__PURE__ */ T(
|
|
2824
|
-
|
|
2839
|
+
A,
|
|
2825
2840
|
{
|
|
2826
2841
|
as: "div",
|
|
2827
2842
|
"data-meter-meta": !0,
|
|
2828
2843
|
id: `meter-label-${e.toLowerCase().replace(/\s+/g, "-")}`,
|
|
2829
2844
|
children: [
|
|
2830
|
-
/* @__PURE__ */ o(
|
|
2831
|
-
/* @__PURE__ */ T(
|
|
2845
|
+
/* @__PURE__ */ o(J, { children: e }),
|
|
2846
|
+
/* @__PURE__ */ T(J, { children: [
|
|
2832
2847
|
t,
|
|
2833
2848
|
r && r
|
|
2834
2849
|
] })
|
|
@@ -2842,11 +2857,11 @@ const Qt = b.forwardRef(
|
|
|
2842
2857
|
role: "presentation",
|
|
2843
2858
|
children: [
|
|
2844
2859
|
/* @__PURE__ */ o(
|
|
2845
|
-
|
|
2860
|
+
A,
|
|
2846
2861
|
{
|
|
2847
2862
|
as: "meter",
|
|
2848
2863
|
"data-meter": !0,
|
|
2849
|
-
ref:
|
|
2864
|
+
ref: $,
|
|
2850
2865
|
value: t,
|
|
2851
2866
|
min: i,
|
|
2852
2867
|
max: l,
|
|
@@ -2859,7 +2874,7 @@ const Qt = b.forwardRef(
|
|
|
2859
2874
|
"aria-valuemin": i,
|
|
2860
2875
|
"aria-valuemax": l,
|
|
2861
2876
|
"aria-valuenow": t,
|
|
2862
|
-
"aria-valuetext":
|
|
2877
|
+
"aria-valuetext": x(),
|
|
2863
2878
|
"aria-describedby": s ? `meter-description-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}` : void 0
|
|
2864
2879
|
}
|
|
2865
2880
|
),
|
|
@@ -2867,7 +2882,7 @@ const Qt = b.forwardRef(
|
|
|
2867
2882
|
"div",
|
|
2868
2883
|
{
|
|
2869
2884
|
className: "optimum-marker",
|
|
2870
|
-
style: { left: `calc(${
|
|
2885
|
+
style: { left: `calc(${k}% - var(--meter-border-width))` },
|
|
2871
2886
|
title: `Optimum: ${f}`,
|
|
2872
2887
|
role: "presentation",
|
|
2873
2888
|
"aria-hidden": "true"
|
|
@@ -2890,7 +2905,7 @@ const Qt = b.forwardRef(
|
|
|
2890
2905
|
}
|
|
2891
2906
|
);
|
|
2892
2907
|
Qt.displayName = "Meter";
|
|
2893
|
-
const ea =
|
|
2908
|
+
const ea = g.forwardRef(
|
|
2894
2909
|
({
|
|
2895
2910
|
id: e,
|
|
2896
2911
|
children: t,
|
|
@@ -2904,27 +2919,27 @@ const ea = b.forwardRef(
|
|
|
2904
2919
|
description: u,
|
|
2905
2920
|
...d
|
|
2906
2921
|
}, f) => {
|
|
2907
|
-
const p = `${e}`,
|
|
2908
|
-
return s && a.push("show-backdrop"), i && a.push("blur-backdrop"),
|
|
2909
|
-
const
|
|
2910
|
-
if (!(!
|
|
2922
|
+
const p = `${e}`, $ = u ? `${p}-description` : void 0;
|
|
2923
|
+
return s && a.push("show-backdrop"), i && a.push("blur-backdrop"), U(() => {
|
|
2924
|
+
const k = document.querySelector(`#${p}[data-modal]`);
|
|
2925
|
+
if (!(!k || !(k instanceof HTMLElement)))
|
|
2911
2926
|
if (r) {
|
|
2912
|
-
|
|
2913
|
-
const
|
|
2927
|
+
k.showPopover();
|
|
2928
|
+
const x = k.querySelectorAll(
|
|
2914
2929
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2915
2930
|
);
|
|
2916
|
-
|
|
2931
|
+
x.length && x[0].focus();
|
|
2917
2932
|
} else
|
|
2918
|
-
|
|
2919
|
-
}, [r, p]),
|
|
2920
|
-
const
|
|
2921
|
-
if (!
|
|
2922
|
-
const
|
|
2933
|
+
k.matches(":popover-open") && k.hidePopover();
|
|
2934
|
+
}, [r, p]), U(() => {
|
|
2935
|
+
const k = document.querySelector(`#${p}[data-modal]`);
|
|
2936
|
+
if (!k || !(k instanceof HTMLElement)) return;
|
|
2937
|
+
const x = (h) => {
|
|
2923
2938
|
h.newState === "closed" && r && c && c();
|
|
2924
2939
|
};
|
|
2925
|
-
return
|
|
2940
|
+
return k.addEventListener("toggle", x), () => k.removeEventListener("toggle", x);
|
|
2926
2941
|
}, [p, r, c]), /* @__PURE__ */ T(
|
|
2927
|
-
|
|
2942
|
+
A,
|
|
2928
2943
|
{
|
|
2929
2944
|
as: "dialog",
|
|
2930
2945
|
id: p,
|
|
@@ -2935,11 +2950,11 @@ const ea = b.forwardRef(
|
|
|
2935
2950
|
role: "dialog",
|
|
2936
2951
|
"aria-modal": "true",
|
|
2937
2952
|
"aria-label": l || "Modal dialog",
|
|
2938
|
-
"aria-describedby":
|
|
2953
|
+
"aria-describedby": $,
|
|
2939
2954
|
...d,
|
|
2940
2955
|
children: [
|
|
2941
2956
|
n && c && /* @__PURE__ */ o(
|
|
2942
|
-
|
|
2957
|
+
J,
|
|
2943
2958
|
{
|
|
2944
2959
|
className: "dismiss-button",
|
|
2945
2960
|
onClick: c,
|
|
@@ -2948,7 +2963,7 @@ const ea = b.forwardRef(
|
|
|
2948
2963
|
children: "×"
|
|
2949
2964
|
}
|
|
2950
2965
|
),
|
|
2951
|
-
u && /* @__PURE__ */ o("div", { id:
|
|
2966
|
+
u && /* @__PURE__ */ o("div", { id: $, className: "sr-only", children: u }),
|
|
2952
2967
|
/* @__PURE__ */ o("div", { role: "document", children: t })
|
|
2953
2968
|
]
|
|
2954
2969
|
}
|
|
@@ -2956,7 +2971,7 @@ const ea = b.forwardRef(
|
|
|
2956
2971
|
}
|
|
2957
2972
|
);
|
|
2958
2973
|
ea.displayName = "Modal";
|
|
2959
|
-
const dt =
|
|
2974
|
+
const dt = g.forwardRef(
|
|
2960
2975
|
({
|
|
2961
2976
|
position: e = "right",
|
|
2962
2977
|
anchor: t = "top",
|
|
@@ -2967,8 +2982,8 @@ const dt = b.forwardRef(
|
|
|
2967
2982
|
...s
|
|
2968
2983
|
}, i) => {
|
|
2969
2984
|
let l = [];
|
|
2970
|
-
return e && l.push(e), t && l.push(t), a && l.push(a), r && l.push(r),
|
|
2971
|
-
|
|
2985
|
+
return e && l.push(e), t && l.push(t), a && l.push(a), r && l.push(r), g.Children.count(c) === 0 ? null : /* @__PURE__ */ o(
|
|
2986
|
+
A,
|
|
2972
2987
|
{
|
|
2973
2988
|
as: "section",
|
|
2974
2989
|
"data-notifications-wrapper": !0,
|
|
@@ -2999,13 +3014,13 @@ const ta = {
|
|
|
2999
3014
|
children: n
|
|
3000
3015
|
}) => {
|
|
3001
3016
|
const [s, i] = j(!1);
|
|
3002
|
-
|
|
3017
|
+
U(() => {
|
|
3003
3018
|
if (a === 0) return;
|
|
3004
3019
|
const p = setTimeout(() => {
|
|
3005
3020
|
i(!0);
|
|
3006
3021
|
}, a * 1e3);
|
|
3007
3022
|
return () => clearTimeout(p);
|
|
3008
|
-
}, [a]),
|
|
3023
|
+
}, [a]), U(() => {
|
|
3009
3024
|
if (!s) return;
|
|
3010
3025
|
const p = setTimeout(() => {
|
|
3011
3026
|
c();
|
|
@@ -3020,7 +3035,7 @@ const ta = {
|
|
|
3020
3035
|
s && c();
|
|
3021
3036
|
}, f = [t];
|
|
3022
3037
|
return r && f.push("dismissible"), s && f.push("dismissed"), /* @__PURE__ */ T(
|
|
3023
|
-
|
|
3038
|
+
A,
|
|
3024
3039
|
{
|
|
3025
3040
|
as: "div",
|
|
3026
3041
|
"data-notification-item": !0,
|
|
@@ -3033,7 +3048,7 @@ const ta = {
|
|
|
3033
3048
|
children: [
|
|
3034
3049
|
/* @__PURE__ */ o("div", { className: "notification-content", children: n }),
|
|
3035
3050
|
r && /* @__PURE__ */ o(
|
|
3036
|
-
|
|
3051
|
+
C,
|
|
3037
3052
|
{
|
|
3038
3053
|
className: "dismiss-button",
|
|
3039
3054
|
onClick: l,
|
|
@@ -3048,25 +3063,25 @@ const ta = {
|
|
|
3048
3063
|
);
|
|
3049
3064
|
};
|
|
3050
3065
|
ut.displayName = "NotificationItem";
|
|
3051
|
-
const ft =
|
|
3066
|
+
const ft = Oe(null), aa = ({
|
|
3052
3067
|
children: e,
|
|
3053
3068
|
position: t = "right",
|
|
3054
3069
|
anchor: a = "top",
|
|
3055
3070
|
order: r = "new-on-top",
|
|
3056
3071
|
kind: c = "list"
|
|
3057
3072
|
}) => {
|
|
3058
|
-
const [n, s] = j([]), i =
|
|
3059
|
-
s((p) => p.filter((
|
|
3060
|
-
}, []), l =
|
|
3061
|
-
const
|
|
3073
|
+
const [n, s] = j([]), i = G((f) => {
|
|
3074
|
+
s((p) => p.filter(($) => $.id !== f));
|
|
3075
|
+
}, []), l = G((f, p = "generic", $ = 4, k = !0) => {
|
|
3076
|
+
const x = `notification-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
3062
3077
|
return s((h) => [...h, {
|
|
3063
|
-
id:
|
|
3078
|
+
id: x,
|
|
3064
3079
|
content: f,
|
|
3065
3080
|
kind: p,
|
|
3066
|
-
duration:
|
|
3067
|
-
isDismissible:
|
|
3068
|
-
}]),
|
|
3069
|
-
}, []), u =
|
|
3081
|
+
duration: $,
|
|
3082
|
+
isDismissible: k
|
|
3083
|
+
}]), x;
|
|
3084
|
+
}, []), u = G((f) => {
|
|
3070
3085
|
if (typeof f == "string") {
|
|
3071
3086
|
l(f);
|
|
3072
3087
|
return;
|
|
@@ -3082,7 +3097,7 @@ const ft = Se(null), aa = ({
|
|
|
3082
3097
|
return;
|
|
3083
3098
|
}
|
|
3084
3099
|
l(f);
|
|
3085
|
-
}, [l]), d =
|
|
3100
|
+
}, [l]), d = G(() => {
|
|
3086
3101
|
const f = u;
|
|
3087
3102
|
return f.success = (p) => {
|
|
3088
3103
|
l(p, "success");
|
|
@@ -3103,13 +3118,13 @@ const ft = Se(null), aa = ({
|
|
|
3103
3118
|
anchor: a,
|
|
3104
3119
|
order: r,
|
|
3105
3120
|
kind: c,
|
|
3106
|
-
children: n.map(({ id: f, content: p, kind:
|
|
3121
|
+
children: n.map(({ id: f, content: p, kind: $, duration: k, isDismissible: x }) => /* @__PURE__ */ o(
|
|
3107
3122
|
ut,
|
|
3108
3123
|
{
|
|
3109
3124
|
id: f,
|
|
3110
|
-
kind:
|
|
3111
|
-
duration:
|
|
3112
|
-
isDismissible:
|
|
3125
|
+
kind: $,
|
|
3126
|
+
duration: k,
|
|
3127
|
+
isDismissible: x,
|
|
3113
3128
|
onClose: () => i(f),
|
|
3114
3129
|
children: typeof p == "function" ? p({ close: () => i(f) }) : p
|
|
3115
3130
|
},
|
|
@@ -3121,11 +3136,11 @@ const ft = Se(null), aa = ({
|
|
|
3121
3136
|
};
|
|
3122
3137
|
aa.displayName = "NotificationsProvider";
|
|
3123
3138
|
const Xa = () => {
|
|
3124
|
-
const e =
|
|
3139
|
+
const e = Ne(ft);
|
|
3125
3140
|
if (!e)
|
|
3126
3141
|
throw new Error("useNotifications must be used within a NotificationsProvider");
|
|
3127
3142
|
return e.notify;
|
|
3128
|
-
}, pt =
|
|
3143
|
+
}, pt = g.forwardRef(
|
|
3129
3144
|
({
|
|
3130
3145
|
size: e = "medium",
|
|
3131
3146
|
loadingText: t = "Loading...",
|
|
@@ -3133,7 +3148,7 @@ const Xa = () => {
|
|
|
3133
3148
|
}, r) => {
|
|
3134
3149
|
let c = [];
|
|
3135
3150
|
return e && c.push(`size-${e}`), /* @__PURE__ */ o(
|
|
3136
|
-
|
|
3151
|
+
A,
|
|
3137
3152
|
{
|
|
3138
3153
|
as: "div",
|
|
3139
3154
|
"data-spinner": !0,
|
|
@@ -3188,7 +3203,7 @@ const Ue = (e, t) => {
|
|
|
3188
3203
|
...s
|
|
3189
3204
|
}) => {
|
|
3190
3205
|
if (e === "ellipsis")
|
|
3191
|
-
return /* @__PURE__ */ o(
|
|
3206
|
+
return /* @__PURE__ */ o(J, { className: "pagination-ellipsis", children: "..." });
|
|
3192
3207
|
const i = {
|
|
3193
3208
|
type: "button",
|
|
3194
3209
|
className: `pagination-item ${a ? "selected" : ""} ${r ? "disabled" : ""}`,
|
|
@@ -3235,7 +3250,7 @@ const Ue = (e, t) => {
|
|
|
3235
3250
|
children: l
|
|
3236
3251
|
}
|
|
3237
3252
|
);
|
|
3238
|
-
}, na =
|
|
3253
|
+
}, na = g.forwardRef(
|
|
3239
3254
|
({
|
|
3240
3255
|
totalItems: e,
|
|
3241
3256
|
currentPage: t,
|
|
@@ -3250,45 +3265,45 @@ const Ue = (e, t) => {
|
|
|
3250
3265
|
disabled: d = !1,
|
|
3251
3266
|
hideDisabledButtons: f = !1,
|
|
3252
3267
|
renderItem: p = sa,
|
|
3253
|
-
isLoading:
|
|
3254
|
-
loadingText:
|
|
3255
|
-
emptyText:
|
|
3268
|
+
isLoading: $ = !1,
|
|
3269
|
+
loadingText: k,
|
|
3270
|
+
emptyText: x,
|
|
3256
3271
|
itemDisplayText: h = "Page",
|
|
3257
3272
|
...L
|
|
3258
|
-
},
|
|
3273
|
+
}, v) => {
|
|
3259
3274
|
const {
|
|
3260
|
-
items:
|
|
3261
|
-
totalPages:
|
|
3275
|
+
items: R,
|
|
3276
|
+
totalPages: S,
|
|
3262
3277
|
rangeStart: E,
|
|
3263
3278
|
hasPrevPage: D,
|
|
3264
|
-
hasNextPage:
|
|
3279
|
+
hasNextPage: N
|
|
3265
3280
|
} = ra({
|
|
3266
3281
|
totalItems: e,
|
|
3267
3282
|
currentPage: t,
|
|
3268
3283
|
itemsToShowEachSide: r
|
|
3269
|
-
}), [
|
|
3270
|
-
M(
|
|
3271
|
-
},
|
|
3272
|
-
if (
|
|
3273
|
-
const H = parseInt(
|
|
3274
|
-
!isNaN(H) && H >= 1 && H <=
|
|
3284
|
+
}), [W, M] = g.useState(""), V = (y) => {
|
|
3285
|
+
M(y.target.value);
|
|
3286
|
+
}, K = (y) => {
|
|
3287
|
+
if (y.key === "Enter") {
|
|
3288
|
+
const H = parseInt(W);
|
|
3289
|
+
!isNaN(H) && H >= 1 && H <= S && (a(H), M(""));
|
|
3275
3290
|
}
|
|
3276
3291
|
};
|
|
3277
3292
|
if (e === 0)
|
|
3278
|
-
return /* @__PURE__ */ o(
|
|
3293
|
+
return /* @__PURE__ */ o(J, { className: "pagination-empty", children: x || "No items to display" });
|
|
3279
3294
|
let P = ["pagination"];
|
|
3280
|
-
return c && P.push(c), d && P.push("disabled"),
|
|
3281
|
-
|
|
3295
|
+
return c && P.push(c), d && P.push("disabled"), $ && P.push("loading"), /* @__PURE__ */ T(
|
|
3296
|
+
A,
|
|
3282
3297
|
{
|
|
3283
3298
|
as: "nav",
|
|
3284
3299
|
"data-pagination": !0,
|
|
3285
|
-
ref:
|
|
3300
|
+
ref: v,
|
|
3286
3301
|
classNames: P,
|
|
3287
3302
|
role: "navigation",
|
|
3288
3303
|
"aria-label": "pagination",
|
|
3289
3304
|
...L,
|
|
3290
3305
|
children: [
|
|
3291
|
-
/* @__PURE__ */ T(
|
|
3306
|
+
/* @__PURE__ */ T(C, { className: "pagination-controls", children: [
|
|
3292
3307
|
n && (!f || D) && p({
|
|
3293
3308
|
type: "first",
|
|
3294
3309
|
disabled: !D || d,
|
|
@@ -3301,57 +3316,57 @@ const Ue = (e, t) => {
|
|
|
3301
3316
|
selected: !1,
|
|
3302
3317
|
onClick: () => a(t - 1)
|
|
3303
3318
|
}),
|
|
3304
|
-
|
|
3305
|
-
const F =
|
|
3319
|
+
R.map((y, H) => {
|
|
3320
|
+
const F = y === "..." ? {
|
|
3306
3321
|
key: `ellipsis-${H}`,
|
|
3307
3322
|
type: "ellipsis",
|
|
3308
3323
|
selected: !1,
|
|
3309
3324
|
disabled: !0
|
|
3310
3325
|
} : {
|
|
3311
|
-
key:
|
|
3326
|
+
key: y.toString(),
|
|
3312
3327
|
type: "page",
|
|
3313
|
-
page:
|
|
3314
|
-
selected:
|
|
3328
|
+
page: y,
|
|
3329
|
+
selected: y === t,
|
|
3315
3330
|
disabled: d,
|
|
3316
|
-
"aria-current":
|
|
3317
|
-
onClick: () => a(
|
|
3331
|
+
"aria-current": y === t ? "page" : void 0,
|
|
3332
|
+
onClick: () => a(y)
|
|
3318
3333
|
};
|
|
3319
3334
|
return p(F);
|
|
3320
3335
|
}),
|
|
3321
|
-
l && (!f ||
|
|
3336
|
+
l && (!f || N) && p({
|
|
3322
3337
|
type: "next",
|
|
3323
|
-
disabled: !
|
|
3338
|
+
disabled: !N || d,
|
|
3324
3339
|
selected: !1,
|
|
3325
3340
|
onClick: () => a(t + 1)
|
|
3326
3341
|
}),
|
|
3327
|
-
s && (!f ||
|
|
3342
|
+
s && (!f || N) && p({
|
|
3328
3343
|
type: "last",
|
|
3329
|
-
disabled: !
|
|
3344
|
+
disabled: !N || d,
|
|
3330
3345
|
selected: !1,
|
|
3331
|
-
onClick: () => a(
|
|
3346
|
+
onClick: () => a(S)
|
|
3332
3347
|
}),
|
|
3333
|
-
|
|
3348
|
+
$ && /* @__PURE__ */ T(C, { className: "pagination-loading", children: [
|
|
3334
3349
|
/* @__PURE__ */ o(pt, {}),
|
|
3335
|
-
|
|
3350
|
+
k && /* @__PURE__ */ o(J, { size: "small", children: k })
|
|
3336
3351
|
] })
|
|
3337
3352
|
] }),
|
|
3338
|
-
/* @__PURE__ */ T(
|
|
3339
|
-
/* @__PURE__ */ T(
|
|
3353
|
+
/* @__PURE__ */ T(C, { className: "pagination-info", children: [
|
|
3354
|
+
/* @__PURE__ */ T(J, { size: "tiny", children: [
|
|
3340
3355
|
h,
|
|
3341
3356
|
" ",
|
|
3342
3357
|
E,
|
|
3343
3358
|
" of ",
|
|
3344
3359
|
e
|
|
3345
3360
|
] }),
|
|
3346
|
-
u && /* @__PURE__ */ o(
|
|
3361
|
+
u && /* @__PURE__ */ o(C, { className: "pagination-go-to", children: /* @__PURE__ */ o(
|
|
3347
3362
|
"input",
|
|
3348
3363
|
{
|
|
3349
3364
|
type: "number",
|
|
3350
3365
|
min: 1,
|
|
3351
|
-
max:
|
|
3352
|
-
value:
|
|
3366
|
+
max: S,
|
|
3367
|
+
value: W,
|
|
3353
3368
|
onChange: V,
|
|
3354
|
-
onKeyDown:
|
|
3369
|
+
onKeyDown: K,
|
|
3355
3370
|
placeholder: `Go to ${h}`,
|
|
3356
3371
|
"aria-label": `Go to ${h}`,
|
|
3357
3372
|
disabled: d
|
|
@@ -3364,7 +3379,7 @@ const Ue = (e, t) => {
|
|
|
3364
3379
|
}
|
|
3365
3380
|
);
|
|
3366
3381
|
na.displayName = "Pagination";
|
|
3367
|
-
const oa =
|
|
3382
|
+
const oa = g.forwardRef(
|
|
3368
3383
|
({
|
|
3369
3384
|
label: e,
|
|
3370
3385
|
value: t,
|
|
@@ -3377,26 +3392,26 @@ const oa = b.forwardRef(
|
|
|
3377
3392
|
fillColour: l,
|
|
3378
3393
|
...u
|
|
3379
3394
|
}, d) => {
|
|
3380
|
-
const f = Math.max(0, Math.min(r, Number(t) || 0)), p = `${f}${u.suffix || ""}`,
|
|
3395
|
+
const f = Math.max(0, Math.min(r, Number(t) || 0)), p = `${f}${u.suffix || ""}`, $ = s || n, k = l || i, x = {
|
|
3381
3396
|
height: a,
|
|
3382
|
-
|
|
3383
|
-
...
|
|
3397
|
+
...$ && { "--progress-bar-bg": `var(--${$})` },
|
|
3398
|
+
...k && { "--progress-bar-fill": `var(--${k})` }
|
|
3384
3399
|
};
|
|
3385
|
-
return /* @__PURE__ */ T(
|
|
3400
|
+
return /* @__PURE__ */ T(Ee, { children: [
|
|
3386
3401
|
e && /* @__PURE__ */ T(
|
|
3387
|
-
|
|
3402
|
+
A,
|
|
3388
3403
|
{
|
|
3389
3404
|
as: "div",
|
|
3390
3405
|
"data-progress-bar-meta": !0,
|
|
3391
3406
|
"aria-hidden": "true",
|
|
3392
3407
|
children: [
|
|
3393
|
-
/* @__PURE__ */ o(
|
|
3394
|
-
/* @__PURE__ */ o(
|
|
3408
|
+
/* @__PURE__ */ o(J, { children: e }),
|
|
3409
|
+
/* @__PURE__ */ o(J, { children: p })
|
|
3395
3410
|
]
|
|
3396
3411
|
}
|
|
3397
3412
|
),
|
|
3398
3413
|
/* @__PURE__ */ o(
|
|
3399
|
-
|
|
3414
|
+
A,
|
|
3400
3415
|
{
|
|
3401
3416
|
as: "progress",
|
|
3402
3417
|
"data-progress-bar": !0,
|
|
@@ -3410,14 +3425,14 @@ const oa = b.forwardRef(
|
|
|
3410
3425
|
"aria-valuetext": `${e ? `${e}: ` : ""}${p}`,
|
|
3411
3426
|
shape: c,
|
|
3412
3427
|
...u,
|
|
3413
|
-
style:
|
|
3428
|
+
style: x
|
|
3414
3429
|
}
|
|
3415
3430
|
)
|
|
3416
3431
|
] });
|
|
3417
3432
|
}
|
|
3418
3433
|
);
|
|
3419
3434
|
oa.displayName = "ProgressBar";
|
|
3420
|
-
const
|
|
3435
|
+
const Ve = Oe({
|
|
3421
3436
|
isSelected: () => !1,
|
|
3422
3437
|
toggleSelection: () => {
|
|
3423
3438
|
},
|
|
@@ -3435,7 +3450,7 @@ const Be = Se({
|
|
|
3435
3450
|
},
|
|
3436
3451
|
unregisterOption: () => {
|
|
3437
3452
|
}
|
|
3438
|
-
}), ia =
|
|
3453
|
+
}), ia = g.forwardRef(
|
|
3439
3454
|
({
|
|
3440
3455
|
children: e,
|
|
3441
3456
|
allowMultipleSelections: t = !1,
|
|
@@ -3448,71 +3463,71 @@ const Be = Se({
|
|
|
3448
3463
|
}, l) => {
|
|
3449
3464
|
const [u, d] = j(
|
|
3450
3465
|
s ? new Set(s) : /* @__PURE__ */ new Set()
|
|
3451
|
-
), f =
|
|
3452
|
-
|
|
3466
|
+
), f = Y(/* @__PURE__ */ new Map());
|
|
3467
|
+
U(() => {
|
|
3453
3468
|
s && s.size > 0 && (d(new Set(s)), r == null || r(new Set(s)));
|
|
3454
3469
|
}, [s, r]);
|
|
3455
|
-
const p =
|
|
3470
|
+
const p = G((E, D) => {
|
|
3456
3471
|
f.current.set(E, D);
|
|
3457
|
-
}, []),
|
|
3472
|
+
}, []), $ = G((E) => {
|
|
3458
3473
|
f.current.delete(E);
|
|
3459
|
-
}, []),
|
|
3474
|
+
}, []), k = G((E) => {
|
|
3460
3475
|
d((D) => {
|
|
3461
|
-
const
|
|
3476
|
+
const N = new Set(D);
|
|
3462
3477
|
if (t)
|
|
3463
|
-
if (
|
|
3464
|
-
|
|
3478
|
+
if (N.has(E))
|
|
3479
|
+
N.delete(E);
|
|
3465
3480
|
else {
|
|
3466
|
-
if (n &&
|
|
3481
|
+
if (n && N.size >= n)
|
|
3467
3482
|
return D;
|
|
3468
|
-
|
|
3483
|
+
N.add(E);
|
|
3469
3484
|
}
|
|
3470
3485
|
else
|
|
3471
|
-
|
|
3472
|
-
return r == null || r(
|
|
3486
|
+
N.has(E) && D.size === 1 ? N.clear() : (N.clear(), N.add(E));
|
|
3487
|
+
return r == null || r(N), N;
|
|
3473
3488
|
});
|
|
3474
|
-
}, [t, r, n]),
|
|
3489
|
+
}, [t, r, n]), x = G(() => {
|
|
3475
3490
|
t && d((E) => {
|
|
3476
|
-
const D = new Set(E),
|
|
3477
|
-
return (n ?
|
|
3491
|
+
const D = new Set(E), N = Array.from(f.current.entries()).filter(([M, V]) => !V).map(([M]) => M);
|
|
3492
|
+
return (n ? N.slice(0, n) : N).forEach((M) => D.add(M)), r == null || r(D), D;
|
|
3478
3493
|
});
|
|
3479
|
-
}, [t, n, r]), h =
|
|
3494
|
+
}, [t, n, r]), h = G(() => {
|
|
3480
3495
|
d(/* @__PURE__ */ new Set()), r == null || r(/* @__PURE__ */ new Set());
|
|
3481
|
-
}, [r]), L =
|
|
3496
|
+
}, [r]), L = G((E) => {
|
|
3482
3497
|
E && (console.log("Setting selected options:", E), d(() => {
|
|
3483
3498
|
const D = new Set(E);
|
|
3484
3499
|
return r == null || r(D), D;
|
|
3485
3500
|
}));
|
|
3486
|
-
}, [r]),
|
|
3501
|
+
}, [r]), v = G((E) => {
|
|
3487
3502
|
E && (console.log("Setting selected ids:", Array.from(E)), d(() => {
|
|
3488
3503
|
const D = new Set(E);
|
|
3489
3504
|
return r == null || r(D), D;
|
|
3490
3505
|
}));
|
|
3491
|
-
}, [r]),
|
|
3492
|
-
|
|
3493
|
-
selectAllOptions:
|
|
3506
|
+
}, [r]), R = G((E) => u.has(E), [u]);
|
|
3507
|
+
g.useImperativeHandle(l, () => ({
|
|
3508
|
+
selectAllOptions: x,
|
|
3494
3509
|
clearAllOptions: h,
|
|
3495
3510
|
setSelectedOptions: L,
|
|
3496
|
-
setSelectedIds:
|
|
3497
|
-
}), [
|
|
3498
|
-
const
|
|
3499
|
-
isSelected:
|
|
3500
|
-
toggleSelection:
|
|
3511
|
+
setSelectedIds: v
|
|
3512
|
+
}), [x, h, L, v]);
|
|
3513
|
+
const S = {
|
|
3514
|
+
isSelected: R,
|
|
3515
|
+
toggleSelection: k,
|
|
3501
3516
|
showTickIcon: a,
|
|
3502
3517
|
tickPosition: c,
|
|
3503
|
-
selectAllOptions:
|
|
3518
|
+
selectAllOptions: x,
|
|
3504
3519
|
clearAllOptions: h,
|
|
3505
3520
|
setSelectedOptions: L,
|
|
3506
|
-
setSelectedIds:
|
|
3521
|
+
setSelectedIds: v,
|
|
3507
3522
|
registerOption: p,
|
|
3508
|
-
unregisterOption:
|
|
3523
|
+
unregisterOption: $
|
|
3509
3524
|
};
|
|
3510
|
-
return /* @__PURE__ */ o(
|
|
3525
|
+
return /* @__PURE__ */ o(Ve.Provider, { value: S, children: /* @__PURE__ */ o(C, { "data-option-cards-group": !0, className: `tick-${c}`, children: e }) });
|
|
3511
3526
|
}
|
|
3512
3527
|
);
|
|
3513
3528
|
ia.displayName = "OptionCardsGroup";
|
|
3514
3529
|
const Ua = (e) => {
|
|
3515
|
-
const t =
|
|
3530
|
+
const t = Ne(Ve);
|
|
3516
3531
|
return {
|
|
3517
3532
|
isSelected: t.isSelected(e),
|
|
3518
3533
|
toggleSelection: () => t.toggleSelection(e),
|
|
@@ -3524,7 +3539,7 @@ const Ua = (e) => {
|
|
|
3524
3539
|
clearAllOptions: t,
|
|
3525
3540
|
setSelectedOptions: a,
|
|
3526
3541
|
setSelectedIds: r
|
|
3527
|
-
} =
|
|
3542
|
+
} = Ne(Ve);
|
|
3528
3543
|
return {
|
|
3529
3544
|
selectAllOptions: e,
|
|
3530
3545
|
clearAllOptions: t,
|
|
@@ -3532,22 +3547,22 @@ const Ua = (e) => {
|
|
|
3532
3547
|
setSelectedIds: r
|
|
3533
3548
|
};
|
|
3534
3549
|
}, Ya = ({ id: e, children: t, disabled: a = !1, ...r }) => {
|
|
3535
|
-
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: i, unregisterOption: l } =
|
|
3536
|
-
|
|
3537
|
-
let
|
|
3538
|
-
c(e) &&
|
|
3539
|
-
const
|
|
3550
|
+
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: i, unregisterOption: l } = Ne(Ve), [u, d] = j(!1), [f, p] = j(!0);
|
|
3551
|
+
g.useEffect(() => (i(e, a), () => l(e)), [e, a, i, l]);
|
|
3552
|
+
let $ = [];
|
|
3553
|
+
c(e) && $.push("selected"), a && $.push("disabled"), u && $.push("show-deselect");
|
|
3554
|
+
const k = () => {
|
|
3540
3555
|
c(e) && !f && d(!0);
|
|
3541
|
-
},
|
|
3556
|
+
}, x = () => {
|
|
3542
3557
|
d(!1), p(!1);
|
|
3543
|
-
}, h = (
|
|
3544
|
-
var
|
|
3545
|
-
a || (p(!0), d(!1), n(e), (
|
|
3546
|
-
}, L = (
|
|
3547
|
-
(
|
|
3558
|
+
}, h = (v) => {
|
|
3559
|
+
var R;
|
|
3560
|
+
a || (p(!0), d(!1), n(e), (R = r.onClick) == null || R.call(r, v));
|
|
3561
|
+
}, L = (v) => {
|
|
3562
|
+
(v.key === "Enter" || v.key === " ") && !a && (v.preventDefault(), p(!0), d(!1), n(e));
|
|
3548
3563
|
};
|
|
3549
3564
|
return /* @__PURE__ */ T(
|
|
3550
|
-
|
|
3565
|
+
A,
|
|
3551
3566
|
{
|
|
3552
3567
|
as: Qe,
|
|
3553
3568
|
"data-option-card": !0,
|
|
@@ -3555,14 +3570,14 @@ const Ua = (e) => {
|
|
|
3555
3570
|
tabIndex: a ? -1 : 0,
|
|
3556
3571
|
"aria-disabled": a,
|
|
3557
3572
|
"aria-selected": c(e),
|
|
3558
|
-
classNames:
|
|
3573
|
+
classNames: $,
|
|
3559
3574
|
onClick: h,
|
|
3560
3575
|
onKeyDown: L,
|
|
3561
|
-
onMouseEnter:
|
|
3562
|
-
onMouseLeave:
|
|
3576
|
+
onMouseEnter: k,
|
|
3577
|
+
onMouseLeave: x,
|
|
3563
3578
|
...r,
|
|
3564
3579
|
children: [
|
|
3565
|
-
s && /* @__PURE__ */ T(
|
|
3580
|
+
s && /* @__PURE__ */ T(Ee, { children: [
|
|
3566
3581
|
/* @__PURE__ */ T("svg", { viewBox: "0 0 24 24", className: "tick-icon", children: [
|
|
3567
3582
|
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "11" }),
|
|
3568
3583
|
/* @__PURE__ */ o("path", { d: "M8 13 L11 15 L16 9" })
|
|
@@ -3576,20 +3591,20 @@ const Ua = (e) => {
|
|
|
3576
3591
|
]
|
|
3577
3592
|
}
|
|
3578
3593
|
);
|
|
3579
|
-
}, la =
|
|
3594
|
+
}, la = g.forwardRef(
|
|
3580
3595
|
({
|
|
3581
3596
|
collapsed: e,
|
|
3582
3597
|
closeOnClickOutside: t,
|
|
3583
3598
|
showMobileSidebar: a,
|
|
3584
3599
|
...r
|
|
3585
3600
|
}, c) => {
|
|
3586
|
-
const n =
|
|
3601
|
+
const n = Y(null);
|
|
3587
3602
|
Je(c, () => n.current), We(n, () => {
|
|
3588
3603
|
typeof t == "function" && t();
|
|
3589
3604
|
});
|
|
3590
3605
|
let s = [];
|
|
3591
3606
|
return e && s.push("collapsed"), a && s.push("show-sidebar"), /* @__PURE__ */ o(
|
|
3592
|
-
|
|
3607
|
+
A,
|
|
3593
3608
|
{
|
|
3594
3609
|
as: "aside",
|
|
3595
3610
|
"data-sidebar-wrapper": !0,
|
|
@@ -3601,9 +3616,9 @@ const Ua = (e) => {
|
|
|
3601
3616
|
}
|
|
3602
3617
|
);
|
|
3603
3618
|
la.displayName = "SidebarWrapper";
|
|
3604
|
-
const ca =
|
|
3619
|
+
const ca = g.forwardRef(
|
|
3605
3620
|
({ label: e, ...t }, a) => /* @__PURE__ */ o(
|
|
3606
|
-
|
|
3621
|
+
A,
|
|
3607
3622
|
{
|
|
3608
3623
|
as: "main",
|
|
3609
3624
|
"data-content-wrapper": !0,
|
|
@@ -3615,11 +3630,11 @@ const ca = b.forwardRef(
|
|
|
3615
3630
|
)
|
|
3616
3631
|
);
|
|
3617
3632
|
ca.displayName = "ContentWrapper";
|
|
3618
|
-
const da =
|
|
3633
|
+
const da = g.forwardRef(
|
|
3619
3634
|
({ isSticky: e, ...t }, a) => {
|
|
3620
3635
|
let r = [];
|
|
3621
3636
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
3622
|
-
|
|
3637
|
+
A,
|
|
3623
3638
|
{
|
|
3624
3639
|
as: "header",
|
|
3625
3640
|
"data-sidebar-header": !0,
|
|
@@ -3631,11 +3646,11 @@ const da = b.forwardRef(
|
|
|
3631
3646
|
}
|
|
3632
3647
|
);
|
|
3633
3648
|
da.displayName = "SidebarHeader";
|
|
3634
|
-
const ua =
|
|
3649
|
+
const ua = g.forwardRef(
|
|
3635
3650
|
({ hasAlert: e, hasEmptyIcon: t, hasNoIcon: a, children: r, ...c }, n) => {
|
|
3636
3651
|
let s = [];
|
|
3637
3652
|
return e && s.push("has-alert"), t ? s.push("has-empty-icon") : a && s.push("has-no-icon"), /* @__PURE__ */ T(
|
|
3638
|
-
|
|
3653
|
+
A,
|
|
3639
3654
|
{
|
|
3640
3655
|
as: "div",
|
|
3641
3656
|
"data-sidebar-item": !0,
|
|
@@ -3643,7 +3658,7 @@ const ua = b.forwardRef(
|
|
|
3643
3658
|
classNames: s,
|
|
3644
3659
|
...c,
|
|
3645
3660
|
children: [
|
|
3646
|
-
t && /* @__PURE__ */ o(
|
|
3661
|
+
t && /* @__PURE__ */ o(C, { className: "empty-icon-wrapper" }),
|
|
3647
3662
|
r
|
|
3648
3663
|
]
|
|
3649
3664
|
}
|
|
@@ -3651,11 +3666,11 @@ const ua = b.forwardRef(
|
|
|
3651
3666
|
}
|
|
3652
3667
|
);
|
|
3653
3668
|
ua.displayName = "SidebarItem";
|
|
3654
|
-
const fa =
|
|
3669
|
+
const fa = g.forwardRef(
|
|
3655
3670
|
({ isSticky: e, ...t }, a) => {
|
|
3656
3671
|
let r = [];
|
|
3657
3672
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
3658
|
-
|
|
3673
|
+
A,
|
|
3659
3674
|
{
|
|
3660
3675
|
as: "footer",
|
|
3661
3676
|
"data-sidebar-footer": !0,
|
|
@@ -3667,10 +3682,10 @@ const fa = b.forwardRef(
|
|
|
3667
3682
|
}
|
|
3668
3683
|
);
|
|
3669
3684
|
fa.displayName = "SidebarFooter";
|
|
3670
|
-
const mt =
|
|
3685
|
+
const mt = Oe({
|
|
3671
3686
|
effect: "wave",
|
|
3672
3687
|
animate: !0
|
|
3673
|
-
}), pa =
|
|
3688
|
+
}), pa = g.forwardRef(({
|
|
3674
3689
|
variant: e = "line",
|
|
3675
3690
|
width: t,
|
|
3676
3691
|
height: a,
|
|
@@ -3679,23 +3694,23 @@ const mt = Se({
|
|
|
3679
3694
|
loadingLabel: n,
|
|
3680
3695
|
...s
|
|
3681
3696
|
}, i) => {
|
|
3682
|
-
const l =
|
|
3697
|
+
const l = Ne(mt), u = c || l.effect, d = n || l.loadingLabel || "Loading...";
|
|
3683
3698
|
let f = [];
|
|
3684
3699
|
e && f.push(`variant-${e}`), r && f.push(`shape-${r}`), u && f.push(`effect-${u}`);
|
|
3685
|
-
const p = t || "100%",
|
|
3700
|
+
const p = t || "100%", $ = e === "circle" ? (typeof t == "number" ? `${t}px` : t) || a || "100%" : a, k = {
|
|
3686
3701
|
width: p,
|
|
3687
|
-
height:
|
|
3702
|
+
height: $,
|
|
3688
3703
|
aspectRatio: e === "circle" ? "1 / 1" : "auto",
|
|
3689
3704
|
...s.style
|
|
3690
3705
|
};
|
|
3691
3706
|
return /* @__PURE__ */ o(
|
|
3692
|
-
|
|
3707
|
+
A,
|
|
3693
3708
|
{
|
|
3694
3709
|
as: "div",
|
|
3695
3710
|
"data-skeleton": !0,
|
|
3696
3711
|
ref: i,
|
|
3697
3712
|
classNames: f,
|
|
3698
|
-
style:
|
|
3713
|
+
style: k,
|
|
3699
3714
|
role: "progressbar",
|
|
3700
3715
|
"aria-busy": "true",
|
|
3701
3716
|
"aria-valuemin": 0,
|
|
@@ -3707,7 +3722,7 @@ const mt = Se({
|
|
|
3707
3722
|
);
|
|
3708
3723
|
});
|
|
3709
3724
|
pa.displayName = "Skeleton";
|
|
3710
|
-
const ma =
|
|
3725
|
+
const ma = g.forwardRef(({
|
|
3711
3726
|
effect: e = "wave",
|
|
3712
3727
|
spacing: t = "small",
|
|
3713
3728
|
animate: a = !0,
|
|
@@ -3724,7 +3739,7 @@ const ma = b.forwardRef(({
|
|
|
3724
3739
|
...s
|
|
3725
3740
|
];
|
|
3726
3741
|
return t && d.push(`spacing-${t}`), /* @__PURE__ */ o(mt.Provider, { value: { effect: e, animate: a, loadingLabel: i }, children: /* @__PURE__ */ o(
|
|
3727
|
-
|
|
3742
|
+
A,
|
|
3728
3743
|
{
|
|
3729
3744
|
as: "div",
|
|
3730
3745
|
ref: u,
|
|
@@ -3734,14 +3749,14 @@ const ma = b.forwardRef(({
|
|
|
3734
3749
|
"aria-busy": "true",
|
|
3735
3750
|
"aria-label": i,
|
|
3736
3751
|
...l,
|
|
3737
|
-
children: Array(r).fill(n).map((f, p) =>
|
|
3752
|
+
children: Array(r).fill(n).map((f, p) => g.cloneElement(f, {
|
|
3738
3753
|
key: p
|
|
3739
3754
|
}))
|
|
3740
3755
|
}
|
|
3741
3756
|
) });
|
|
3742
3757
|
});
|
|
3743
3758
|
ma.displayName = "SkeletonGroup";
|
|
3744
|
-
const ha =
|
|
3759
|
+
const ha = g.forwardRef(
|
|
3745
3760
|
({
|
|
3746
3761
|
bordersFor: e,
|
|
3747
3762
|
isStriped: t,
|
|
@@ -3756,9 +3771,9 @@ const ha = b.forwardRef(
|
|
|
3756
3771
|
}, d) => {
|
|
3757
3772
|
let f = [];
|
|
3758
3773
|
e && f.push(`bordered-${e}`), t && f.push("striped"), a && f.push("hoverable"), r && f.push("full-width"), c && f.push(`align-text-${c}`);
|
|
3759
|
-
const p =
|
|
3774
|
+
const p = g.Children.count(l);
|
|
3760
3775
|
return /* @__PURE__ */ T(
|
|
3761
|
-
|
|
3776
|
+
A,
|
|
3762
3777
|
{
|
|
3763
3778
|
as: "table",
|
|
3764
3779
|
classNames: f,
|
|
@@ -3766,12 +3781,12 @@ const ha = b.forwardRef(
|
|
|
3766
3781
|
role: "table",
|
|
3767
3782
|
"aria-rowcount": p || void 0,
|
|
3768
3783
|
"aria-colcount": i ? void 0 : (() => {
|
|
3769
|
-
if (!l || !
|
|
3770
|
-
const
|
|
3771
|
-
if (
|
|
3772
|
-
const
|
|
3773
|
-
if (
|
|
3774
|
-
return
|
|
3784
|
+
if (!l || !g.isValidElement(l)) return;
|
|
3785
|
+
const k = g.Children.toArray(l)[0];
|
|
3786
|
+
if (g.isValidElement(k)) {
|
|
3787
|
+
const x = k.props;
|
|
3788
|
+
if (x.children)
|
|
3789
|
+
return g.Children.count(x.children);
|
|
3775
3790
|
}
|
|
3776
3791
|
})(),
|
|
3777
3792
|
summary: s,
|
|
@@ -3785,37 +3800,37 @@ const ha = b.forwardRef(
|
|
|
3785
3800
|
}
|
|
3786
3801
|
);
|
|
3787
3802
|
ha.displayName = "Table";
|
|
3788
|
-
const va =
|
|
3803
|
+
const va = g.forwardRef(
|
|
3789
3804
|
({ tabs: e, additionalNavContentWrapper: t, defaultActiveTab: a, align: r = "left", isFullWidth: c, ...n }, s) => {
|
|
3790
|
-
const i = e.findIndex((h) => h.key === a), l = i > -1 ? i : 0, [u, d] =
|
|
3805
|
+
const i = e.findIndex((h) => h.key === a), l = i > -1 ? i : 0, [u, d] = g.useState(
|
|
3791
3806
|
e.length > 0 ? e[l] : void 0
|
|
3792
|
-
), [f, p] =
|
|
3807
|
+
), [f, p] = g.useState(!1), $ = Y([]), k = G((h) => {
|
|
3793
3808
|
(u == null ? void 0 : u.key) !== h.key && (p(!0), setTimeout(() => {
|
|
3794
3809
|
d(h), p(!1);
|
|
3795
3810
|
}, 150));
|
|
3796
3811
|
}, [u == null ? void 0 : u.key]);
|
|
3797
|
-
|
|
3812
|
+
U(() => {
|
|
3798
3813
|
e.length > 0 ? e.find((L) => L.key === (u == null ? void 0 : u.key)) || d(e[l]) : d(void 0);
|
|
3799
3814
|
}, [e, l, u == null ? void 0 : u.key]);
|
|
3800
|
-
const
|
|
3801
|
-
var
|
|
3802
|
-
let
|
|
3815
|
+
const x = G((h, L) => {
|
|
3816
|
+
var S;
|
|
3817
|
+
let v = L;
|
|
3803
3818
|
if (h.key === "ArrowRight")
|
|
3804
|
-
|
|
3819
|
+
v = (L + 1) % e.length;
|
|
3805
3820
|
else if (h.key === "ArrowLeft")
|
|
3806
|
-
|
|
3821
|
+
v = (L - 1 + e.length) % e.length;
|
|
3807
3822
|
else if (h.key === "Home")
|
|
3808
|
-
|
|
3823
|
+
v = 0;
|
|
3809
3824
|
else if (h.key === "End")
|
|
3810
|
-
|
|
3825
|
+
v = e.length - 1;
|
|
3811
3826
|
else
|
|
3812
3827
|
return;
|
|
3813
3828
|
h.preventDefault();
|
|
3814
|
-
const
|
|
3815
|
-
|
|
3816
|
-
}, [e,
|
|
3829
|
+
const R = e[v];
|
|
3830
|
+
R && (k(R), (S = $.current[v]) == null || S.focus());
|
|
3831
|
+
}, [e, k]);
|
|
3817
3832
|
return u ? /* @__PURE__ */ T(
|
|
3818
|
-
|
|
3833
|
+
A,
|
|
3819
3834
|
{
|
|
3820
3835
|
as: "div",
|
|
3821
3836
|
"data-tabs": !0,
|
|
@@ -3826,10 +3841,10 @@ const va = b.forwardRef(
|
|
|
3826
3841
|
children: [
|
|
3827
3842
|
/* @__PURE__ */ o(Pt, { "data-tabs-nav": !0, role: "tablist", "aria-label": "Tab Navigation", children: /* @__PURE__ */ T("ul", { className: "tab-labels-list", children: [
|
|
3828
3843
|
e.map((h, L) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
|
|
3829
|
-
|
|
3844
|
+
A,
|
|
3830
3845
|
{
|
|
3831
3846
|
as: "button",
|
|
3832
|
-
ref: (
|
|
3847
|
+
ref: (v) => $.current[L] = v,
|
|
3833
3848
|
id: `tab-${h.key}`,
|
|
3834
3849
|
role: "tab",
|
|
3835
3850
|
"aria-selected": u.key === h.key,
|
|
@@ -3838,12 +3853,12 @@ const va = b.forwardRef(
|
|
|
3838
3853
|
"data-tab-label": !0,
|
|
3839
3854
|
"data-active": u.key === h.key,
|
|
3840
3855
|
"data-alert": h.hasAlert,
|
|
3841
|
-
onClick: () =>
|
|
3842
|
-
onKeyDown: (
|
|
3856
|
+
onClick: () => k(h),
|
|
3857
|
+
onKeyDown: (v) => x(v, L),
|
|
3843
3858
|
className: `tab-button ${u.key === h.key ? "is-active" : ""}`,
|
|
3844
3859
|
marginBottom: "nano",
|
|
3845
3860
|
children: /* @__PURE__ */ o(
|
|
3846
|
-
|
|
3861
|
+
J,
|
|
3847
3862
|
{
|
|
3848
3863
|
className: `tab-label ${u.key === h.key ? "is-active" : ""} ${h.hasAlert ? "has-alert" : ""}`,
|
|
3849
3864
|
children: h.label
|
|
@@ -3855,7 +3870,7 @@ const va = b.forwardRef(
|
|
|
3855
3870
|
] }) }),
|
|
3856
3871
|
/* @__PURE__ */ o(et, { kind: "tertiary", marginTop: "none", marginBottom: "micro" }),
|
|
3857
3872
|
e.map((h) => /* @__PURE__ */ o(
|
|
3858
|
-
|
|
3873
|
+
C,
|
|
3859
3874
|
{
|
|
3860
3875
|
id: `tab-panel-${h.key}`,
|
|
3861
3876
|
role: "tabpanel",
|
|
@@ -3875,7 +3890,7 @@ const va = b.forwardRef(
|
|
|
3875
3890
|
}
|
|
3876
3891
|
);
|
|
3877
3892
|
va.displayName = "Tabs";
|
|
3878
|
-
const
|
|
3893
|
+
const Ae = () => {
|
|
3879
3894
|
if (typeof window < "u") {
|
|
3880
3895
|
const e = window.location.hostname, t = window.location.port;
|
|
3881
3896
|
let a = e.replace(/\./g, "-");
|
|
@@ -3883,8 +3898,8 @@ const Ie = () => {
|
|
|
3883
3898
|
}
|
|
3884
3899
|
return "fictoan-theme";
|
|
3885
3900
|
}, ya = ["", (e) => {
|
|
3886
|
-
}], ht =
|
|
3887
|
-
const e =
|
|
3901
|
+
}], ht = g.createContext(void 0), Ja = () => {
|
|
3902
|
+
const e = g.useContext(ht);
|
|
3888
3903
|
return e === void 0 ? ya : e;
|
|
3889
3904
|
}, qe = (e, t) => {
|
|
3890
3905
|
let a;
|
|
@@ -3893,42 +3908,42 @@ const Ie = () => {
|
|
|
3893
3908
|
} catch {
|
|
3894
3909
|
}
|
|
3895
3910
|
return a || t;
|
|
3896
|
-
}, wa =
|
|
3911
|
+
}, wa = g.forwardRef(
|
|
3897
3912
|
({ currentTheme: e, themeList: t, children: a, ...r }, c) => {
|
|
3898
|
-
const [n, s] = j(!1), [i, l] = j(() => qe(
|
|
3913
|
+
const [n, s] = j(!1), [i, l] = j(() => qe(Ae()) || e), u = G(
|
|
3899
3914
|
(d) => {
|
|
3900
3915
|
const f = typeof d == "function" ? d(i) : d;
|
|
3901
3916
|
if (!t.includes(f)) {
|
|
3902
3917
|
const p = t[0];
|
|
3903
3918
|
l(p), document.documentElement.className = "", document.documentElement.classList.add(p);
|
|
3904
3919
|
try {
|
|
3905
|
-
localStorage.setItem(
|
|
3920
|
+
localStorage.setItem(Ae(), p);
|
|
3906
3921
|
} catch {
|
|
3907
3922
|
}
|
|
3908
3923
|
return;
|
|
3909
3924
|
}
|
|
3910
3925
|
l(f), document.documentElement.className = "", document.documentElement.classList.add(f), n || s(!0);
|
|
3911
3926
|
try {
|
|
3912
|
-
localStorage.setItem(
|
|
3927
|
+
localStorage.setItem(Ae(), f);
|
|
3913
3928
|
} catch {
|
|
3914
3929
|
}
|
|
3915
3930
|
},
|
|
3916
3931
|
[i, t]
|
|
3917
3932
|
);
|
|
3918
|
-
return
|
|
3919
|
-
const d = qe(
|
|
3933
|
+
return U(() => {
|
|
3934
|
+
const d = qe(Ae());
|
|
3920
3935
|
u(d || e);
|
|
3921
|
-
}, [e, u]), /* @__PURE__ */ o(ht.Provider, { value: [i, u], children: /* @__PURE__ */ o(
|
|
3936
|
+
}, [e, u]), /* @__PURE__ */ o(ht.Provider, { value: [i, u], children: /* @__PURE__ */ o(A, { as: "div", "data-theme-provider": !0, ref: c, ...r, children: n && a }) });
|
|
3922
3937
|
}
|
|
3923
3938
|
);
|
|
3924
3939
|
wa.displayName = "ThemeProvider";
|
|
3925
|
-
const vt =
|
|
3940
|
+
const vt = g.forwardRef(
|
|
3926
3941
|
({
|
|
3927
3942
|
anchor: e = "top",
|
|
3928
3943
|
children: t,
|
|
3929
3944
|
...a
|
|
3930
|
-
}, r) =>
|
|
3931
|
-
|
|
3945
|
+
}, r) => g.Children.count(t) === 0 ? null : /* @__PURE__ */ o(
|
|
3946
|
+
A,
|
|
3932
3947
|
{
|
|
3933
3948
|
as: "section",
|
|
3934
3949
|
"data-toasts-wrapper": !0,
|
|
@@ -3950,20 +3965,20 @@ const yt = ({
|
|
|
3950
3965
|
children: r
|
|
3951
3966
|
}) => {
|
|
3952
3967
|
const [c, n] = j(!1);
|
|
3953
|
-
return
|
|
3968
|
+
return U(() => {
|
|
3954
3969
|
if (t === 0) return;
|
|
3955
3970
|
const i = setTimeout(() => {
|
|
3956
3971
|
n(!0);
|
|
3957
3972
|
}, t * 1e3);
|
|
3958
3973
|
return () => clearTimeout(i);
|
|
3959
|
-
}, [t]),
|
|
3974
|
+
}, [t]), U(() => {
|
|
3960
3975
|
if (!c) return;
|
|
3961
3976
|
const i = setTimeout(() => {
|
|
3962
3977
|
a();
|
|
3963
3978
|
}, 500);
|
|
3964
3979
|
return () => clearTimeout(i);
|
|
3965
3980
|
}, [c, a]), /* @__PURE__ */ o(
|
|
3966
|
-
|
|
3981
|
+
A,
|
|
3967
3982
|
{
|
|
3968
3983
|
as: "div",
|
|
3969
3984
|
"data-toast-item": !0,
|
|
@@ -3981,13 +3996,13 @@ const yt = ({
|
|
|
3981
3996
|
);
|
|
3982
3997
|
};
|
|
3983
3998
|
yt.displayName = "ToastItem";
|
|
3984
|
-
const wt =
|
|
3999
|
+
const wt = Oe(null), ba = ({
|
|
3985
4000
|
children: e,
|
|
3986
4001
|
anchor: t = "top"
|
|
3987
4002
|
}) => {
|
|
3988
|
-
const [a, r] = j([]), c =
|
|
4003
|
+
const [a, r] = j([]), c = G((s) => {
|
|
3989
4004
|
r((i) => i.filter((l) => l.id !== s));
|
|
3990
|
-
}, []), n =
|
|
4005
|
+
}, []), n = G((s, i = 4) => {
|
|
3991
4006
|
const l = `toast-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
3992
4007
|
r((u) => [...u, {
|
|
3993
4008
|
id: l,
|
|
@@ -4011,33 +4026,33 @@ const wt = Se(null), ba = ({
|
|
|
4011
4026
|
};
|
|
4012
4027
|
ba.displayName = "ToastsProvider";
|
|
4013
4028
|
const Za = () => {
|
|
4014
|
-
const e =
|
|
4029
|
+
const e = Ne(wt);
|
|
4015
4030
|
if (!e)
|
|
4016
4031
|
throw new Error("useToasts must be used within a ToastsProvider");
|
|
4017
4032
|
return e.toast;
|
|
4018
|
-
},
|
|
4019
|
-
let
|
|
4020
|
-
const
|
|
4033
|
+
}, fe = 8, ne = 16;
|
|
4034
|
+
let oe = null, pe = null, Fe = !1, le = null, ve = null;
|
|
4035
|
+
const me = /* @__PURE__ */ new Map(), ga = (e, t, a) => {
|
|
4021
4036
|
const r = e.getBoundingClientRect(), c = t.getBoundingClientRect(), n = window.innerHeight, s = window.innerWidth;
|
|
4022
4037
|
let i, l;
|
|
4023
4038
|
switch (a) {
|
|
4024
4039
|
case "top":
|
|
4025
|
-
i = c.top - r.height -
|
|
4040
|
+
i = c.top - r.height - fe, l = c.left + (c.width - r.width) / 2, i < ne && (i = c.bottom + fe);
|
|
4026
4041
|
break;
|
|
4027
4042
|
case "bottom":
|
|
4028
|
-
i = c.bottom +
|
|
4043
|
+
i = c.bottom + fe, l = c.left + (c.width - r.width) / 2, i + r.height > n - ne && (i = c.top - r.height - fe);
|
|
4029
4044
|
break;
|
|
4030
4045
|
case "left":
|
|
4031
|
-
i = c.top + (c.height - r.height) / 2, l = c.left - r.width -
|
|
4046
|
+
i = c.top + (c.height - r.height) / 2, l = c.left - r.width - fe, l < ne && (l = c.right + fe);
|
|
4032
4047
|
break;
|
|
4033
4048
|
case "right":
|
|
4034
|
-
i = c.top + (c.height - r.height) / 2, l = c.right +
|
|
4049
|
+
i = c.top + (c.height - r.height) / 2, l = c.right + fe, l + r.width > s - ne && (l = c.left - r.width - fe);
|
|
4035
4050
|
break;
|
|
4036
4051
|
default:
|
|
4037
|
-
i = c.top - r.height -
|
|
4052
|
+
i = c.top - r.height - fe, l = c.left + (c.width - r.width) / 2;
|
|
4038
4053
|
}
|
|
4039
|
-
return l <
|
|
4040
|
-
},
|
|
4054
|
+
return l < ne ? l = ne : l + r.width > s - ne && (l = s - r.width - ne), i < ne ? i = ne : i + r.height > n - ne && (i = n - r.height - ne), { top: i, left: l };
|
|
4055
|
+
}, Le = ({ content: e, isVisible: t, position: a, zIndex: r }) => /* @__PURE__ */ o(
|
|
4041
4056
|
"div",
|
|
4042
4057
|
{
|
|
4043
4058
|
"data-tooltip": !0,
|
|
@@ -4051,69 +4066,69 @@ const pe = /* @__PURE__ */ new Map(), ga = (e, t, a) => {
|
|
|
4051
4066
|
},
|
|
4052
4067
|
children: e
|
|
4053
4068
|
}
|
|
4054
|
-
),
|
|
4055
|
-
if (!(!
|
|
4069
|
+
), Me = (e, t) => {
|
|
4070
|
+
if (!(!pe || !oe)) {
|
|
4056
4071
|
if (!e || !t) {
|
|
4057
|
-
|
|
4058
|
-
/* @__PURE__ */ o(
|
|
4072
|
+
pe.render(
|
|
4073
|
+
/* @__PURE__ */ o(Le, { content: null, isVisible: !1, position: { top: -9999, left: -9999 }, zIndex: 1e5 })
|
|
4059
4074
|
);
|
|
4060
4075
|
return;
|
|
4061
4076
|
}
|
|
4062
|
-
|
|
4063
|
-
/* @__PURE__ */ o(
|
|
4077
|
+
pe.render(
|
|
4078
|
+
/* @__PURE__ */ o(Le, { content: e.content, isVisible: !1, position: { top: -9999, left: -9999 }, zIndex: e.zIndex })
|
|
4064
4079
|
), requestAnimationFrame(() => {
|
|
4065
|
-
if (!
|
|
4066
|
-
const a =
|
|
4080
|
+
if (!oe || !t) return;
|
|
4081
|
+
const a = oe.firstElementChild;
|
|
4067
4082
|
if (!a) return;
|
|
4068
4083
|
const { top: r, left: c } = ga(a, t, e.position);
|
|
4069
|
-
|
|
4070
|
-
/* @__PURE__ */ o(
|
|
4084
|
+
pe == null || pe.render(
|
|
4085
|
+
/* @__PURE__ */ o(Le, { content: e.content, isVisible: !0, position: { top: r, left: c }, zIndex: e.zIndex })
|
|
4071
4086
|
);
|
|
4072
4087
|
});
|
|
4073
4088
|
}
|
|
4074
4089
|
}, Ye = () => {
|
|
4075
|
-
if (!
|
|
4076
|
-
const e =
|
|
4077
|
-
e &&
|
|
4090
|
+
if (!le || !ve) return;
|
|
4091
|
+
const e = me.get(le);
|
|
4092
|
+
e && Me(e, ve);
|
|
4078
4093
|
}, bt = (e, t) => {
|
|
4079
|
-
const a =
|
|
4080
|
-
a && (
|
|
4081
|
-
},
|
|
4082
|
-
e &&
|
|
4094
|
+
const a = me.get(e);
|
|
4095
|
+
a && (le = e, ve = t, Me(a, t));
|
|
4096
|
+
}, Se = (e) => {
|
|
4097
|
+
e && le !== e || (le = null, ve = null, Me(null, null));
|
|
4083
4098
|
}, Na = (e) => {
|
|
4084
4099
|
const t = e.target.closest("[id]");
|
|
4085
4100
|
if (!(t != null && t.id)) return;
|
|
4086
|
-
const a =
|
|
4101
|
+
const a = me.get(t.id);
|
|
4087
4102
|
(a == null ? void 0 : a.showOn) === "hover" && bt(t.id, t);
|
|
4088
4103
|
}, ka = (e) => {
|
|
4089
4104
|
const t = e.target.closest("[id]");
|
|
4090
4105
|
if (!(t != null && t.id)) return;
|
|
4091
|
-
const a =
|
|
4092
|
-
(a == null ? void 0 : a.showOn) === "hover" &&
|
|
4106
|
+
const a = me.get(t.id);
|
|
4107
|
+
(a == null ? void 0 : a.showOn) === "hover" && Se(t.id);
|
|
4093
4108
|
}, $a = (e) => {
|
|
4094
|
-
if (
|
|
4109
|
+
if (oe != null && oe.contains(e.target))
|
|
4095
4110
|
return;
|
|
4096
4111
|
const t = e.target.closest("[id]");
|
|
4097
4112
|
if (t != null && t.id) {
|
|
4098
|
-
const a =
|
|
4113
|
+
const a = me.get(t.id);
|
|
4099
4114
|
if ((a == null ? void 0 : a.showOn) === "click") {
|
|
4100
|
-
|
|
4115
|
+
le === t.id ? Se() : bt(t.id, t);
|
|
4101
4116
|
return;
|
|
4102
4117
|
}
|
|
4103
4118
|
}
|
|
4104
|
-
if (
|
|
4105
|
-
const a =
|
|
4106
|
-
(a == null ? void 0 : a.showOn) === "click" &&
|
|
4119
|
+
if (le) {
|
|
4120
|
+
const a = me.get(le);
|
|
4121
|
+
(a == null ? void 0 : a.showOn) === "click" && Se();
|
|
4107
4122
|
}
|
|
4108
4123
|
}, xa = () => {
|
|
4109
4124
|
if (typeof document > "u") return;
|
|
4110
4125
|
const e = document.getElementById("fictoan-tooltip-singleton");
|
|
4111
4126
|
if (e && Fe) {
|
|
4112
|
-
|
|
4127
|
+
oe = e;
|
|
4113
4128
|
return;
|
|
4114
4129
|
}
|
|
4115
|
-
Fe = !1,
|
|
4116
|
-
/* @__PURE__ */ o(
|
|
4130
|
+
Fe = !1, oe = null, pe = null, oe = document.createElement("div"), oe.id = "fictoan-tooltip-singleton", document.body.appendChild(oe), pe = Mt(oe), pe.render(
|
|
4131
|
+
/* @__PURE__ */ o(Le, { content: null, isVisible: !1, position: { top: -9999, left: -9999 }, zIndex: 1e5 })
|
|
4117
4132
|
), document.addEventListener("mouseover", Na), document.addEventListener("mouseout", ka), document.addEventListener("click", $a), window.addEventListener("scroll", Ye, !0), window.addEventListener("resize", Ye), Fe = !0;
|
|
4118
4133
|
}, Qa = ({
|
|
4119
4134
|
children: e,
|
|
@@ -4122,32 +4137,32 @@ const pe = /* @__PURE__ */ new Map(), ga = (e, t, a) => {
|
|
|
4122
4137
|
position: r = "top",
|
|
4123
4138
|
zIndex: c = 1e5
|
|
4124
4139
|
}) => {
|
|
4125
|
-
const n =
|
|
4126
|
-
return n.current = { content: e, position: r, showOn: a, zIndex: c },
|
|
4127
|
-
|
|
4128
|
-
}), [t]),
|
|
4129
|
-
|
|
4140
|
+
const n = Y({ content: e, position: r, showOn: a, zIndex: c });
|
|
4141
|
+
return n.current = { content: e, position: r, showOn: a, zIndex: c }, U(() => (xa(), me.set(t, n.current), le === t && ve && Me(n.current, ve), () => {
|
|
4142
|
+
me.delete(t), le === t && Se();
|
|
4143
|
+
}), [t]), U(() => {
|
|
4144
|
+
me.set(t, n.current), le === t && ve && Me(n.current, ve);
|
|
4130
4145
|
}, [e, r, a, c, t]), null;
|
|
4131
|
-
},
|
|
4146
|
+
}, ke = g.forwardRef(
|
|
4132
4147
|
({ fontStyle: e = "sans-serif", weight: t, align: a, ...r }, c) => {
|
|
4133
4148
|
let n = [];
|
|
4134
|
-
return t && n.push(`weight-${t}`), e && n.push(`font-${e}`), a && n.push(`text-${a}`), /* @__PURE__ */ o(
|
|
4149
|
+
return t && n.push(`weight-${t}`), e && n.push(`font-${e}`), a && n.push(`text-${a}`), /* @__PURE__ */ o(A, { ref: c, classNames: n, ...r });
|
|
4135
4150
|
}
|
|
4136
|
-
), Ra =
|
|
4151
|
+
), Ra = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h1", ref: t, ...e }));
|
|
4137
4152
|
Ra.displayName = "Heading1";
|
|
4138
|
-
const Ma =
|
|
4153
|
+
const Ma = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h2", ref: t, ...e }));
|
|
4139
4154
|
Ma.displayName = "Heading2";
|
|
4140
|
-
const Ea =
|
|
4155
|
+
const Ea = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h3", ref: t, ...e }));
|
|
4141
4156
|
Ea.displayName = "Heading3";
|
|
4142
|
-
const Pa =
|
|
4157
|
+
const Pa = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h4", ref: t, ...e }));
|
|
4143
4158
|
Pa.displayName = "Heading4";
|
|
4144
|
-
const Ta =
|
|
4159
|
+
const Ta = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h5", ref: t, ...e }));
|
|
4145
4160
|
Ta.displayName = "Heading5";
|
|
4146
|
-
const Da =
|
|
4161
|
+
const Da = g.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h6", ref: t, ...e }));
|
|
4147
4162
|
Da.displayName = "Heading6";
|
|
4148
|
-
const Ia =
|
|
4163
|
+
const Ia = g.forwardRef(
|
|
4149
4164
|
({ summary: e, children: t, isOpen: a = !1, ...r }, c) => /* @__PURE__ */ T(
|
|
4150
|
-
|
|
4165
|
+
A,
|
|
4151
4166
|
{
|
|
4152
4167
|
as: "details",
|
|
4153
4168
|
"data-expandable-content": !0,
|
|
@@ -4164,7 +4179,7 @@ const Ia = b.forwardRef(
|
|
|
4164
4179
|
tabIndex: 0,
|
|
4165
4180
|
"aria-controls": "accordion-content",
|
|
4166
4181
|
"aria-expanded": a,
|
|
4167
|
-
children: typeof e == "string" ? /* @__PURE__ */ o(
|
|
4182
|
+
children: typeof e == "string" ? /* @__PURE__ */ o(J, { margin: "none", children: e }) : e
|
|
4168
4183
|
}
|
|
4169
4184
|
),
|
|
4170
4185
|
t
|
|
@@ -4176,14 +4191,14 @@ Ia.displayName = "Accordion";
|
|
|
4176
4191
|
export {
|
|
4177
4192
|
ca as $,
|
|
4178
4193
|
Ia as A,
|
|
4179
|
-
|
|
4194
|
+
Be as B,
|
|
4180
4195
|
Ze as C,
|
|
4181
4196
|
Dt as D,
|
|
4182
|
-
|
|
4197
|
+
A as E,
|
|
4183
4198
|
Ha as F,
|
|
4184
4199
|
ea as G,
|
|
4185
4200
|
_a as H,
|
|
4186
|
-
|
|
4201
|
+
Te as I,
|
|
4187
4202
|
aa as J,
|
|
4188
4203
|
Xa as K,
|
|
4189
4204
|
Ut as L,
|
|
@@ -4193,7 +4208,7 @@ export {
|
|
|
4193
4208
|
qt as P,
|
|
4194
4209
|
at as Q,
|
|
4195
4210
|
rt as R,
|
|
4196
|
-
|
|
4211
|
+
Ca as S,
|
|
4197
4212
|
it as T,
|
|
4198
4213
|
oa as U,
|
|
4199
4214
|
nt as V,
|
|
@@ -4222,17 +4237,17 @@ export {
|
|
|
4222
4237
|
Pa as ag,
|
|
4223
4238
|
Ta as ah,
|
|
4224
4239
|
Da as ai,
|
|
4225
|
-
|
|
4240
|
+
J as aj,
|
|
4226
4241
|
It as b,
|
|
4227
4242
|
Lt as c,
|
|
4228
4243
|
Qe as d,
|
|
4229
4244
|
St as e,
|
|
4230
4245
|
et as f,
|
|
4231
|
-
|
|
4246
|
+
C as g,
|
|
4232
4247
|
Fa as h,
|
|
4233
4248
|
Wa as i,
|
|
4234
4249
|
za as j,
|
|
4235
|
-
|
|
4250
|
+
Ka as k,
|
|
4236
4251
|
ja as l,
|
|
4237
4252
|
He as m,
|
|
4238
4253
|
Vt as n,
|
|
@@ -4240,7 +4255,7 @@ export {
|
|
|
4240
4255
|
_t as p,
|
|
4241
4256
|
ee as q,
|
|
4242
4257
|
Gt as r,
|
|
4243
|
-
|
|
4258
|
+
Pe as s,
|
|
4244
4259
|
st as t,
|
|
4245
4260
|
Yt as u,
|
|
4246
4261
|
Zt as v,
|
|
@@ -4249,4 +4264,4 @@ export {
|
|
|
4249
4264
|
Ft as y,
|
|
4250
4265
|
Qt as z
|
|
4251
4266
|
};
|
|
4252
|
-
//# sourceMappingURL=Accordion-
|
|
4267
|
+
//# sourceMappingURL=Accordion-f3si5mdH.js.map
|