fictoan-react 2.0.0-beta.13 → 2.0.0-beta.15
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-DCCt5GHU.js → Accordion-CeGNgNW8.js} +1009 -1002
- package/dist/Accordion-CeGNgNW8.js.map +1 -0
- package/dist/components/Element/Element.d.ts.map +1 -1
- package/dist/components/Element/constants.d.ts +1 -0
- package/dist/components/Element/constants.d.ts.map +1 -1
- package/dist/components/Form/FormItem/FormItem.d.ts.map +1 -1
- package/dist/components/Form/FormItemGroup/FormItemGroup.d.ts +1 -0
- package/dist/components/Form/FormItemGroup/FormItemGroup.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.css +60 -78
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Accordion-DCCt5GHU.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client;";
|
|
3
|
-
import { jsx as o, jsxs as I, Fragment as
|
|
4
|
-
import N, { useCallback as G, useEffect as
|
|
5
|
-
import { createRoot as
|
|
6
|
-
const
|
|
3
|
+
import { jsx as o, jsxs as I, Fragment as Me } from "react/jsx-runtime";
|
|
4
|
+
import N, { useCallback as G, useEffect as U, useRef as Y, useState as j, useMemo as ye, createElement as Mt, createRef as Et, useImperativeHandle as Qe, createContext as Le, useContext as Ne } from "react";
|
|
5
|
+
import { createRoot as Pt } from "react-dom/client";
|
|
6
|
+
const St = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
as: e = "div",
|
|
9
9
|
role: t,
|
|
@@ -15,11 +15,11 @@ const Pt = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
|
15
15
|
const {
|
|
16
16
|
classNames: l = [],
|
|
17
17
|
bgColor: i,
|
|
18
|
-
bgColour:
|
|
19
|
-
bgOpacity:
|
|
20
|
-
borderColor:
|
|
21
|
-
borderColour:
|
|
22
|
-
borderOpacity:
|
|
18
|
+
bgColour: u,
|
|
19
|
+
bgOpacity: d,
|
|
20
|
+
borderColor: f,
|
|
21
|
+
borderColour: p,
|
|
22
|
+
borderOpacity: $,
|
|
23
23
|
className: v,
|
|
24
24
|
columns: k,
|
|
25
25
|
fillColor: m,
|
|
@@ -27,53 +27,54 @@ const Pt = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
|
27
27
|
gap: y,
|
|
28
28
|
hideOnDesktop: R,
|
|
29
29
|
hideOnMobile: T,
|
|
30
|
-
hideOnTabletLandscape:
|
|
31
|
-
hideOnTabletPortrait:
|
|
30
|
+
hideOnTabletLandscape: F,
|
|
31
|
+
hideOnTabletPortrait: V,
|
|
32
32
|
horizontalMargin: E,
|
|
33
33
|
horizontalPadding: P,
|
|
34
34
|
horizontallyCenterThis: g,
|
|
35
35
|
horizontallyCentreThis: L,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
inheritFormSpacing: _,
|
|
37
|
+
isClickable: S,
|
|
38
|
+
isFullHeight: w,
|
|
39
|
+
isFullWidth: z,
|
|
40
|
+
layoutAsFlexbox: C,
|
|
41
|
+
layoutAsGrid: B,
|
|
42
|
+
stackVertically: b,
|
|
43
|
+
stackHorizontally: x,
|
|
44
|
+
marginLeft: h,
|
|
45
|
+
marginBottom: M,
|
|
46
|
+
margin: O,
|
|
47
|
+
marginRight: H,
|
|
48
|
+
marginTop: Z,
|
|
49
|
+
opacity: le,
|
|
50
|
+
paddingBottom: te,
|
|
51
|
+
paddingLeft: ae,
|
|
52
|
+
padding: re,
|
|
53
|
+
paddingRight: we,
|
|
54
|
+
paddingTop: ge,
|
|
55
|
+
pushItemsToEnds: W,
|
|
56
|
+
shadow: X,
|
|
57
|
+
shape: Q,
|
|
58
|
+
showOnlyOnDesktop: se,
|
|
59
|
+
showOnlyOnMobile: $e,
|
|
60
|
+
showOnlyOnTabletLandscape: Ce,
|
|
61
|
+
showOnlyOnTabletPortrait: q,
|
|
62
|
+
size: he,
|
|
63
|
+
strokeColor: be,
|
|
64
|
+
strokeColour: ue,
|
|
65
|
+
textColor: xe,
|
|
66
|
+
textColour: Se,
|
|
67
|
+
verticalMargin: Fe,
|
|
67
68
|
verticalPadding: Ve,
|
|
68
|
-
verticallyCenterItems:
|
|
69
|
-
verticallyCentreItems:
|
|
70
|
-
weight:
|
|
71
|
-
style:
|
|
72
|
-
...
|
|
73
|
-
} = n, { className:
|
|
74
|
-
|
|
75
|
-
...
|
|
76
|
-
|
|
69
|
+
verticallyCenterItems: kt,
|
|
70
|
+
verticallyCentreItems: $t,
|
|
71
|
+
weight: Ke,
|
|
72
|
+
style: xt,
|
|
73
|
+
...Rt
|
|
74
|
+
} = n, { className: La, classNames: Ba, ...Oa } = n, je = {
|
|
75
|
+
...xt,
|
|
76
|
+
...d && { "--bg-opacity": Number(d) / 100 },
|
|
77
|
+
...$ && { "--border-opacity": Number($) / 100 }
|
|
77
78
|
};
|
|
78
79
|
return /* @__PURE__ */ o(
|
|
79
80
|
e,
|
|
@@ -83,61 +84,62 @@ const Pt = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
|
83
84
|
"aria-label": a,
|
|
84
85
|
tabIndex: r,
|
|
85
86
|
onKeyDown: c,
|
|
86
|
-
...
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
...Rt,
|
|
88
|
+
"data-form-spaced": _ || void 0,
|
|
89
|
+
style: Object.keys(je).length > 0 ? je : void 0,
|
|
90
|
+
className: St(
|
|
89
91
|
[
|
|
90
92
|
v,
|
|
91
93
|
i && `bg-${i}`,
|
|
92
|
-
|
|
93
|
-
p && `border-${p}`,
|
|
94
|
+
u && `bg-${u}`,
|
|
94
95
|
f && `border-${f}`,
|
|
96
|
+
p && `border-${p}`,
|
|
95
97
|
m && `fill-${m}`,
|
|
96
98
|
A && `fill-${A}`,
|
|
97
99
|
R && "hide-on-desktop",
|
|
98
100
|
T && "hide-on-mobile",
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
F && "hide-on-tablet-landscape",
|
|
102
|
+
V && "hide-on-tablet-portrait",
|
|
101
103
|
E && `margin-right-${E} margin-left-${E}`,
|
|
102
104
|
P && `padding-right-${P} padding-left-${P}`,
|
|
103
105
|
g && "horizontally-centre-this",
|
|
104
106
|
L && "horizontally-centre-this",
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
S && "is-clickable",
|
|
108
|
+
w && "full-height",
|
|
109
|
+
z && "full-width",
|
|
110
|
+
C && "layout-flexbox",
|
|
111
|
+
B && "layout-grid",
|
|
112
|
+
b && "stack-vertically",
|
|
113
|
+
x && "stack-horizontally",
|
|
112
114
|
y && `gap-${y}`,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
ue && `text-${ue}`,
|
|
115
|
+
h && `margin-left-${h}`,
|
|
116
|
+
M && `margin-bottom-${M}`,
|
|
117
|
+
O && `margin-all-${O}`,
|
|
118
|
+
H && `margin-right-${H}`,
|
|
119
|
+
Z && `margin-top-${Z}`,
|
|
120
|
+
le && `opacity-${le}`,
|
|
121
|
+
te && `padding-bottom-${te}`,
|
|
122
|
+
ae && `padding-left-${ae}`,
|
|
123
|
+
re && `padding-all-${re}`,
|
|
124
|
+
we && `padding-right-${we}`,
|
|
125
|
+
ge && `padding-top-${ge}`,
|
|
126
|
+
W && "push-to-ends",
|
|
127
|
+
X && `shadow-${X}`,
|
|
128
|
+
Q && `shape-${Q}`,
|
|
129
|
+
se && "show-only-on-desktop",
|
|
130
|
+
$e && "show-only-on-mobile",
|
|
131
|
+
Ce && "show-only-on-tablet-landscape",
|
|
132
|
+
q && "show-only-on-tablet-portrait",
|
|
133
|
+
he && `size-${he}`,
|
|
134
|
+
be && `stroke-${be}`,
|
|
135
|
+
ue && `stroke-${ue}`,
|
|
135
136
|
xe && `text-${xe}`,
|
|
136
|
-
|
|
137
|
+
Se && `text-${Se}`,
|
|
138
|
+
Fe && `margin-top-${Fe} margin-bottom-${Fe}`,
|
|
137
139
|
Ve && `padding-top-${Ve} padding-bottom-${Ve}`,
|
|
138
|
-
Nt && "vertically-centre-items",
|
|
139
140
|
kt && "vertically-centre-items",
|
|
140
|
-
|
|
141
|
+
$t && "vertically-centre-items",
|
|
142
|
+
Ke && `weight-${Ke}`
|
|
141
143
|
].concat(l)
|
|
142
144
|
)
|
|
143
145
|
}
|
|
@@ -154,10 +156,10 @@ const de = (e, t) => N.forwardRef(
|
|
|
154
156
|
}
|
|
155
157
|
return /* @__PURE__ */ o(D, { as: e, ref: r, ...c });
|
|
156
158
|
}
|
|
157
|
-
),
|
|
159
|
+
), Wa = de("article"), za = de("aside"), Ha = de("body"), K = de("div"), _a = de("footer"), Ga = de("header"), Ka = de("main"), It = de("nav"), ja = de("section"), Xa = de("span"), Ua = de("a", {
|
|
158
160
|
rel: "noopener noreferrer"
|
|
159
161
|
// Default props for Hyperlink
|
|
160
|
-
}),
|
|
162
|
+
}), Tt = {
|
|
161
163
|
cross: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M18 6L6 18M6 6l12 12" }) }),
|
|
162
164
|
tick: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M5 12l5 5L20 7" }) }),
|
|
163
165
|
plus: /* @__PURE__ */ o("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M12 5v14M5 12h14" }) }),
|
|
@@ -174,14 +176,14 @@ const de = (e, t) => N.forwardRef(
|
|
|
174
176
|
}, l) => {
|
|
175
177
|
let i = [];
|
|
176
178
|
t && i.push(`size-${t}`), a && i.push(`shape-${a}`);
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
},
|
|
179
|
+
const u = (f) => {
|
|
180
|
+
f.stopPropagation(), c == null || c(f);
|
|
181
|
+
}, d = !!r;
|
|
180
182
|
return /* @__PURE__ */ I(
|
|
181
183
|
D,
|
|
182
184
|
{
|
|
183
185
|
"data-badge": !0,
|
|
184
|
-
"data-has-action":
|
|
186
|
+
"data-has-action": d || void 0,
|
|
185
187
|
ref: l,
|
|
186
188
|
classNames: i,
|
|
187
189
|
role: "status",
|
|
@@ -189,14 +191,14 @@ const de = (e, t) => N.forwardRef(
|
|
|
189
191
|
...s,
|
|
190
192
|
children: [
|
|
191
193
|
e,
|
|
192
|
-
|
|
194
|
+
d && /* @__PURE__ */ o(
|
|
193
195
|
"button",
|
|
194
196
|
{
|
|
195
197
|
type: "button",
|
|
196
198
|
className: "badge-action-button",
|
|
197
|
-
onClick:
|
|
199
|
+
onClick: u,
|
|
198
200
|
"aria-label": n,
|
|
199
|
-
children:
|
|
201
|
+
children: Tt[r]
|
|
200
202
|
}
|
|
201
203
|
)
|
|
202
204
|
]
|
|
@@ -205,9 +207,9 @@ const de = (e, t) => N.forwardRef(
|
|
|
205
207
|
}
|
|
206
208
|
);
|
|
207
209
|
Be.displayName = "Badge";
|
|
208
|
-
const
|
|
210
|
+
const ze = (e, t) => {
|
|
209
211
|
const a = G(t, [t]);
|
|
210
|
-
|
|
212
|
+
U(() => {
|
|
211
213
|
const r = (c) => {
|
|
212
214
|
!e.current || typeof a != "function" || e.current.contains(c.target) || a(c);
|
|
213
215
|
};
|
|
@@ -215,7 +217,7 @@ const We = (e, t) => {
|
|
|
215
217
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
216
218
|
};
|
|
217
219
|
}, [e, a]);
|
|
218
|
-
},
|
|
220
|
+
}, Dt = N.forwardRef(
|
|
219
221
|
({
|
|
220
222
|
id: e,
|
|
221
223
|
children: t,
|
|
@@ -226,46 +228,46 @@ const We = (e, t) => {
|
|
|
226
228
|
padding: s = "micro",
|
|
227
229
|
bgColor: l,
|
|
228
230
|
bgColour: i,
|
|
229
|
-
isDismissible:
|
|
230
|
-
showOverlay:
|
|
231
|
-
blurOverlay:
|
|
232
|
-
closeOnClickOutside:
|
|
233
|
-
zIndex:
|
|
231
|
+
isDismissible: u = !0,
|
|
232
|
+
showOverlay: d = !0,
|
|
233
|
+
blurOverlay: f = !1,
|
|
234
|
+
closeOnClickOutside: p = !0,
|
|
235
|
+
zIndex: $,
|
|
234
236
|
label: v,
|
|
235
237
|
description: k,
|
|
236
238
|
classNames: m = [],
|
|
237
239
|
...A
|
|
238
240
|
}, y) => {
|
|
239
|
-
const R = `${e}`, T = k ? `${R}-description` : void 0,
|
|
241
|
+
const R = `${e}`, T = k ? `${R}-description` : void 0, F = Y(null), V = y || F, E = [
|
|
240
242
|
"drawer",
|
|
241
243
|
c,
|
|
242
244
|
n,
|
|
243
245
|
...a ? ["open"] : [],
|
|
244
|
-
...
|
|
245
|
-
...
|
|
246
|
+
...d ? ["with-overlay"] : [],
|
|
247
|
+
...f ? ["blur-overlay"] : [],
|
|
246
248
|
...m
|
|
247
249
|
];
|
|
248
|
-
return
|
|
249
|
-
const g =
|
|
250
|
+
return U(() => {
|
|
251
|
+
const g = V.current, L = document.querySelector(`[data-drawer-overlay-for="${R}"]`);
|
|
250
252
|
return a ? (g == null || g.classList.add("open"), g == null || g.classList.remove("closing"), g == null || g.focus(), L && L.classList.add("visible"), document.body.style.overflow = "hidden") : g != null && g.classList.contains("open") && (g.classList.add("closing"), g.classList.remove("open"), L && L.classList.remove("visible"), document.body.style.overflow = ""), () => {
|
|
251
253
|
document.body.style.overflow = "";
|
|
252
254
|
};
|
|
253
|
-
}, [a, R,
|
|
255
|
+
}, [a, R, V]), U(() => {
|
|
254
256
|
const g = (L) => {
|
|
255
|
-
L.key === "Escape" &&
|
|
257
|
+
L.key === "Escape" && u && a && r && r();
|
|
256
258
|
};
|
|
257
259
|
return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
|
|
258
|
-
}, [
|
|
259
|
-
|
|
260
|
-
}), /* @__PURE__ */ I(
|
|
261
|
-
|
|
260
|
+
}, [u, a, r]), ze(V, () => {
|
|
261
|
+
p && u && a && r && r();
|
|
262
|
+
}), /* @__PURE__ */ I(Me, { children: [
|
|
263
|
+
d && /* @__PURE__ */ o(
|
|
262
264
|
K,
|
|
263
265
|
{
|
|
264
|
-
className: `drawer-overlay ${
|
|
266
|
+
className: `drawer-overlay ${f ? "blur" : ""} ${a ? "visible" : ""}`,
|
|
265
267
|
"data-drawer-overlay-for": e,
|
|
266
268
|
"aria-hidden": "true",
|
|
267
|
-
onClick:
|
|
268
|
-
style: { zIndex:
|
|
269
|
+
onClick: p && u && r ? r : void 0,
|
|
270
|
+
style: { zIndex: $ ?? 9999 }
|
|
269
271
|
}
|
|
270
272
|
),
|
|
271
273
|
/* @__PURE__ */ I(
|
|
@@ -274,7 +276,7 @@ const We = (e, t) => {
|
|
|
274
276
|
as: "div",
|
|
275
277
|
id: R,
|
|
276
278
|
"data-drawer": !0,
|
|
277
|
-
ref:
|
|
279
|
+
ref: V,
|
|
278
280
|
classNames: E,
|
|
279
281
|
onAnimationEnd: (g) => {
|
|
280
282
|
(g.animationName.includes("slide-out") || g.animationName.includes("fade-out")) && g.currentTarget.classList.remove("closing");
|
|
@@ -284,10 +286,10 @@ const We = (e, t) => {
|
|
|
284
286
|
"aria-label": v || "Drawer",
|
|
285
287
|
"aria-describedby": T,
|
|
286
288
|
tabIndex: -1,
|
|
287
|
-
style: { zIndex:
|
|
289
|
+
style: { zIndex: $ ?? 1e4 },
|
|
288
290
|
...A,
|
|
289
291
|
children: [
|
|
290
|
-
|
|
292
|
+
u && r && /* @__PURE__ */ o(
|
|
291
293
|
"button",
|
|
292
294
|
{
|
|
293
295
|
className: "drawer-dismiss-button",
|
|
@@ -317,8 +319,8 @@ const We = (e, t) => {
|
|
|
317
319
|
] });
|
|
318
320
|
}
|
|
319
321
|
);
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
+
Dt.displayName = "Drawer";
|
|
323
|
+
const He = N.forwardRef(
|
|
322
324
|
({ size: e = "medium", shape: t, kind: a, variant: r, isLoading: c, label: n, ...s }, l) => {
|
|
323
325
|
let i = [];
|
|
324
326
|
return a && i.push(a), r && i.push(r), e && i.push(`size-${e}`), t && i.push(`shape-${t}`), c && i.push("is-loading"), /* @__PURE__ */ o(
|
|
@@ -336,8 +338,8 @@ const ze = N.forwardRef(
|
|
|
336
338
|
);
|
|
337
339
|
}
|
|
338
340
|
);
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
+
He.displayName = "Button";
|
|
342
|
+
const At = N.forwardRef(
|
|
341
343
|
({ isJoint: e = !0, spacing: t, equaliseWidth: a, children: r, ...c }, n) => {
|
|
342
344
|
let s = [];
|
|
343
345
|
return e && s.push("is-joint"), t && !e && s.push(`spacing-${t}`), a && s.push("equal-width"), /* @__PURE__ */ o(
|
|
@@ -354,8 +356,8 @@ const Dt = N.forwardRef(
|
|
|
354
356
|
);
|
|
355
357
|
}
|
|
356
358
|
);
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
+
At.displayName = "ButtonGroup";
|
|
360
|
+
const Xe = N.forwardRef(
|
|
359
361
|
({ children: e, current: t, ...a }, r) => /* @__PURE__ */ o(
|
|
360
362
|
D,
|
|
361
363
|
{
|
|
@@ -369,7 +371,7 @@ const je = N.forwardRef(
|
|
|
369
371
|
children: /* @__PURE__ */ o("span", { className: "breadcrumb-content", children: e })
|
|
370
372
|
}
|
|
371
373
|
)
|
|
372
|
-
),
|
|
374
|
+
), Lt = ({ separator: e }) => /* @__PURE__ */ o(
|
|
373
375
|
J,
|
|
374
376
|
{
|
|
375
377
|
className: "breadcrumb-separator",
|
|
@@ -378,23 +380,23 @@ const je = N.forwardRef(
|
|
|
378
380
|
margin: "none",
|
|
379
381
|
children: e
|
|
380
382
|
}
|
|
381
|
-
),
|
|
383
|
+
), Bt = N.forwardRef(
|
|
382
384
|
({ children: e, separator: t = "/", spacing: a = "micro", ...r }, c) => {
|
|
383
385
|
let n = [];
|
|
384
386
|
a && n.push(`spacing-${a}`);
|
|
385
|
-
const s = N.Children.toArray(e).filter(Boolean), l = s.reduce((i,
|
|
386
|
-
if (!N.isValidElement(
|
|
387
|
-
const
|
|
388
|
-
let
|
|
389
|
-
if (
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
current:
|
|
387
|
+
const s = N.Children.toArray(e).filter(Boolean), l = s.reduce((i, u, d) => {
|
|
388
|
+
if (!N.isValidElement(u)) return i;
|
|
389
|
+
const f = d === s.length - 1;
|
|
390
|
+
let p;
|
|
391
|
+
if (u.type === Xe) {
|
|
392
|
+
const $ = u;
|
|
393
|
+
p = N.cloneElement($, {
|
|
394
|
+
current: f
|
|
393
395
|
});
|
|
394
396
|
} else
|
|
395
|
-
|
|
396
|
-
return i.push(
|
|
397
|
-
/* @__PURE__ */ o(
|
|
397
|
+
p = /* @__PURE__ */ o(Xe, { current: f, children: u }, `item-${d}`);
|
|
398
|
+
return i.push(p), f || i.push(
|
|
399
|
+
/* @__PURE__ */ o(Lt, { separator: t }, `sep-${d}`)
|
|
398
400
|
), i;
|
|
399
401
|
}, []);
|
|
400
402
|
return /* @__PURE__ */ o("nav", { "aria-label": "Breadcrumb", ref: c, ...r, children: /* @__PURE__ */ o(
|
|
@@ -409,8 +411,8 @@ const je = N.forwardRef(
|
|
|
409
411
|
) });
|
|
410
412
|
}
|
|
411
413
|
);
|
|
412
|
-
|
|
413
|
-
const
|
|
414
|
+
Bt.displayName = "Breadcrumbs";
|
|
415
|
+
const et = N.forwardRef(
|
|
414
416
|
({ kind: e, children: t, title: a, ...r }, c) => /* @__PURE__ */ o(
|
|
415
417
|
D,
|
|
416
418
|
{
|
|
@@ -431,8 +433,8 @@ const Qe = N.forwardRef(
|
|
|
431
433
|
}
|
|
432
434
|
)
|
|
433
435
|
);
|
|
434
|
-
|
|
435
|
-
const
|
|
436
|
+
et.displayName = "Callout";
|
|
437
|
+
const tt = N.forwardRef(({ shape: e, heading: t, children: a, ...r }, c) => {
|
|
436
438
|
let n = [];
|
|
437
439
|
return e && n.push(`shape-${e}`), /* @__PURE__ */ o(
|
|
438
440
|
D,
|
|
@@ -449,8 +451,8 @@ const et = N.forwardRef(({ shape: e, heading: t, children: a, ...r }, c) => {
|
|
|
449
451
|
}
|
|
450
452
|
);
|
|
451
453
|
});
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
+
tt.displayName = "Card";
|
|
455
|
+
const Ot = N.forwardRef(({
|
|
454
456
|
children: e,
|
|
455
457
|
source: t,
|
|
456
458
|
language: a = "json",
|
|
@@ -460,12 +462,12 @@ const Bt = N.forwardRef(({
|
|
|
460
462
|
withSyntaxHighlighting: s = !1,
|
|
461
463
|
makeEditable: l = !1,
|
|
462
464
|
onChange: i,
|
|
463
|
-
shadow:
|
|
464
|
-
...
|
|
465
|
-
},
|
|
466
|
-
const [
|
|
467
|
-
let
|
|
468
|
-
e || (
|
|
465
|
+
shadow: u,
|
|
466
|
+
...d
|
|
467
|
+
}, f) => {
|
|
468
|
+
const [p, $] = j(!1), [v, k] = j(null), [m, A] = j(s), [y, R] = j(null), T = Y(null);
|
|
469
|
+
let F = typeof e == "string" ? e : N.Children.toArray(e).join("");
|
|
470
|
+
e || (F = typeof t == "object" ? JSON.stringify(t, null, 2) : t ?? ""), U(() => {
|
|
469
471
|
if (!s) return;
|
|
470
472
|
(async () => {
|
|
471
473
|
var z;
|
|
@@ -488,8 +490,8 @@ const Bt = N.forwardRef(({
|
|
|
488
490
|
}
|
|
489
491
|
})();
|
|
490
492
|
}, [s, a]);
|
|
491
|
-
const
|
|
492
|
-
var
|
|
493
|
+
const V = G(() => {
|
|
494
|
+
var x;
|
|
493
495
|
const w = window.getSelection();
|
|
494
496
|
if (!w || w.rangeCount === 0) return null;
|
|
495
497
|
const z = w.getRangeAt(0), C = z.startContainer;
|
|
@@ -502,20 +504,20 @@ const Bt = N.forwardRef(({
|
|
|
502
504
|
);
|
|
503
505
|
let M;
|
|
504
506
|
for (; (M = h.nextNode()) && M !== C; )
|
|
505
|
-
b += ((
|
|
507
|
+
b += ((x = M.textContent) == null ? void 0 : x.length) || 0;
|
|
506
508
|
}
|
|
507
509
|
return b;
|
|
508
510
|
}, [y]), E = G((w) => {
|
|
509
511
|
var z;
|
|
510
512
|
if (!(!y || !s || !v))
|
|
511
513
|
try {
|
|
512
|
-
const C = l ?
|
|
514
|
+
const C = l ? V() : null, B = v.highlight(
|
|
513
515
|
w,
|
|
514
516
|
v.languages[a] || v.languages.plain,
|
|
515
517
|
a
|
|
516
518
|
);
|
|
517
519
|
if (y.innerHTML = B, l && C !== null) {
|
|
518
|
-
const b = window.getSelection(),
|
|
520
|
+
const b = window.getSelection(), x = document.createRange(), h = document.createTreeWalker(
|
|
519
521
|
y,
|
|
520
522
|
NodeFilter.SHOW_TEXT,
|
|
521
523
|
null
|
|
@@ -524,7 +526,7 @@ const Bt = N.forwardRef(({
|
|
|
524
526
|
for (; O = h.nextNode(); ) {
|
|
525
527
|
const H = ((z = O.textContent) == null ? void 0 : z.length) || 0;
|
|
526
528
|
if (M + H >= C) {
|
|
527
|
-
|
|
529
|
+
x.setStart(O, C - M), x.setEnd(O, C - M), b == null || b.removeAllRanges(), b == null || b.addRange(x);
|
|
528
530
|
break;
|
|
529
531
|
}
|
|
530
532
|
M += H;
|
|
@@ -533,26 +535,26 @@ const Bt = N.forwardRef(({
|
|
|
533
535
|
} catch (C) {
|
|
534
536
|
console.warn("Error highlighting code:", C), y && (y.textContent = w);
|
|
535
537
|
}
|
|
536
|
-
}, [a, s, l, v,
|
|
538
|
+
}, [a, s, l, v, V, y]), P = G((w) => {
|
|
537
539
|
if (!y) return;
|
|
538
540
|
const z = y.textContent || "";
|
|
539
541
|
i == null || i(z), requestAnimationFrame(() => {
|
|
540
542
|
E(z);
|
|
541
543
|
});
|
|
542
544
|
}, [E, i, y]);
|
|
543
|
-
|
|
545
|
+
U(() => {
|
|
544
546
|
const w = y;
|
|
545
547
|
if (!(!w || !l))
|
|
546
548
|
return w.addEventListener("input", P), () => {
|
|
547
549
|
w.removeEventListener("input", P);
|
|
548
550
|
};
|
|
549
|
-
}, [l, P, y]),
|
|
550
|
-
!y || !v || E(
|
|
551
|
-
}, [E,
|
|
551
|
+
}, [l, P, y]), U(() => {
|
|
552
|
+
!y || !v || E(F);
|
|
553
|
+
}, [E, F, v, y]);
|
|
552
554
|
const g = async () => {
|
|
553
555
|
try {
|
|
554
|
-
const w = y ? y.textContent || "" :
|
|
555
|
-
await navigator.clipboard.writeText(w),
|
|
556
|
+
const w = y ? y.textContent || "" : F;
|
|
557
|
+
await navigator.clipboard.writeText(w), $(!0), setTimeout(() => $(!1), 3e3);
|
|
556
558
|
} catch (w) {
|
|
557
559
|
console.error("Could not copy text: ", w);
|
|
558
560
|
}
|
|
@@ -561,7 +563,7 @@ const Bt = N.forwardRef(({
|
|
|
561
563
|
};
|
|
562
564
|
let _ = [];
|
|
563
565
|
c && _.push("show-line-numbers");
|
|
564
|
-
const S =
|
|
566
|
+
const S = F.split(/\r\n|\r|\n/gm);
|
|
565
567
|
return /* @__PURE__ */ I(
|
|
566
568
|
D,
|
|
567
569
|
{
|
|
@@ -570,9 +572,9 @@ const Bt = N.forwardRef(({
|
|
|
570
572
|
classNames: _,
|
|
571
573
|
role: "region",
|
|
572
574
|
"aria-label": n || `Code block in ${a}`,
|
|
573
|
-
...
|
|
575
|
+
...d,
|
|
574
576
|
children: [
|
|
575
|
-
r ?
|
|
577
|
+
r ? p ? /* @__PURE__ */ o(
|
|
576
578
|
Be,
|
|
577
579
|
{
|
|
578
580
|
className: "code-block-copied-badge",
|
|
@@ -582,7 +584,7 @@ const Bt = N.forwardRef(({
|
|
|
582
584
|
children: "Copied!"
|
|
583
585
|
}
|
|
584
586
|
) : /* @__PURE__ */ o(
|
|
585
|
-
|
|
587
|
+
He,
|
|
586
588
|
{
|
|
587
589
|
type: "button",
|
|
588
590
|
className: "code-block-copy-button",
|
|
@@ -598,7 +600,7 @@ const Bt = N.forwardRef(({
|
|
|
598
600
|
"pre",
|
|
599
601
|
{
|
|
600
602
|
ref: T,
|
|
601
|
-
className: `language-${a}${
|
|
603
|
+
className: `language-${a}${u ? ` shadow-${u}` : ""}`,
|
|
602
604
|
tabIndex: 0,
|
|
603
605
|
"aria-label": `Code in ${a}`,
|
|
604
606
|
children: [
|
|
@@ -619,7 +621,7 @@ const Bt = N.forwardRef(({
|
|
|
619
621
|
suppressContentEditableWarning: !0,
|
|
620
622
|
spellCheck: "false",
|
|
621
623
|
className: `language-${a} ${m ? "is-loading" : ""}`,
|
|
622
|
-
children:
|
|
624
|
+
children: F
|
|
623
625
|
}
|
|
624
626
|
)
|
|
625
627
|
]
|
|
@@ -629,8 +631,8 @@ const Bt = N.forwardRef(({
|
|
|
629
631
|
}
|
|
630
632
|
);
|
|
631
633
|
});
|
|
632
|
-
|
|
633
|
-
const
|
|
634
|
+
Ot.displayName = "CodeBlock";
|
|
635
|
+
const at = N.forwardRef(
|
|
634
636
|
({ kind: e, height: t, label: a, ...r }, c) => {
|
|
635
637
|
let n = [];
|
|
636
638
|
return e && n.push(e), /* @__PURE__ */ o(
|
|
@@ -649,8 +651,8 @@ const tt = N.forwardRef(
|
|
|
649
651
|
);
|
|
650
652
|
}
|
|
651
653
|
);
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
+
at.displayName = "Divider";
|
|
655
|
+
const Ct = [
|
|
654
656
|
// Colours
|
|
655
657
|
"bgColor",
|
|
656
658
|
"bgColour",
|
|
@@ -716,12 +718,12 @@ const Ot = [
|
|
|
716
718
|
], ie = (e) => {
|
|
717
719
|
const t = {}, a = {};
|
|
718
720
|
for (const r of Object.keys(e))
|
|
719
|
-
|
|
721
|
+
Ct.includes(r) ? t[r] = e[r] : a[r] = e[r];
|
|
720
722
|
return {
|
|
721
723
|
wrapperProps: t,
|
|
722
724
|
inputProps: a
|
|
723
725
|
};
|
|
724
|
-
},
|
|
726
|
+
}, Ee = N.forwardRef(
|
|
725
727
|
({
|
|
726
728
|
label: e,
|
|
727
729
|
hideLabel: t,
|
|
@@ -742,7 +744,7 @@ const Ot = [
|
|
|
742
744
|
);
|
|
743
745
|
}
|
|
744
746
|
);
|
|
745
|
-
|
|
747
|
+
Ee.displayName = "InputLabel";
|
|
746
748
|
const J = N.forwardRef(
|
|
747
749
|
({ weight: e, size: t, fontStyle: a = "sans-serif", align: r, isSubtext: c, ...n }, s) => {
|
|
748
750
|
let l = [];
|
|
@@ -750,7 +752,7 @@ const J = N.forwardRef(
|
|
|
750
752
|
}
|
|
751
753
|
);
|
|
752
754
|
J.displayName = "Text";
|
|
753
|
-
const
|
|
755
|
+
const Ft = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
754
756
|
"svg",
|
|
755
757
|
{
|
|
756
758
|
"data-validation-icon": "valid",
|
|
@@ -817,27 +819,28 @@ const Ct = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
817
819
|
required: s,
|
|
818
820
|
size: l,
|
|
819
821
|
labelFirst: i,
|
|
820
|
-
children:
|
|
821
|
-
...
|
|
822
|
-
},
|
|
823
|
-
const
|
|
822
|
+
children: u,
|
|
823
|
+
...d
|
|
824
|
+
}, f) => {
|
|
825
|
+
const p = e || t, $ = r || c;
|
|
824
826
|
return /* @__PURE__ */ I(
|
|
825
827
|
D,
|
|
826
828
|
{
|
|
827
829
|
as: "div",
|
|
828
830
|
"data-form-item": !0,
|
|
829
|
-
|
|
831
|
+
"data-form-spaced": !0,
|
|
832
|
+
ref: f,
|
|
830
833
|
role: "group",
|
|
831
834
|
required: s,
|
|
832
835
|
className: [l ? `size-${l}` : "", i ? "label-first" : ""].filter(Boolean).join(" ") || void 0,
|
|
833
|
-
...
|
|
836
|
+
...d,
|
|
834
837
|
children: [
|
|
835
|
-
|
|
836
|
-
t || e && /* @__PURE__ */ o(
|
|
837
|
-
n && /* @__PURE__ */ o(
|
|
838
|
+
p && /* @__PURE__ */ I(K, { "data-label-wrapper": !0, "data-has-validation": n ? "true" : void 0, children: [
|
|
839
|
+
t || e && /* @__PURE__ */ o(Ee, { label: e, htmlFor: a }),
|
|
840
|
+
n && /* @__PURE__ */ o(Ft, { state: n })
|
|
838
841
|
] }),
|
|
839
|
-
/* @__PURE__ */ o(K, { "data-input-wrapper": !0, children:
|
|
840
|
-
|
|
842
|
+
/* @__PURE__ */ o(K, { "data-input-wrapper": !0, children: u }),
|
|
843
|
+
$ && /* @__PURE__ */ I(K, { className: "info-section vertically-center-items", children: [
|
|
841
844
|
r && /* @__PURE__ */ o(J, { className: "help-text", children: r }),
|
|
842
845
|
c && /* @__PURE__ */ o(J, { className: "error-text", children: c })
|
|
843
846
|
] })
|
|
@@ -847,7 +850,7 @@ const Ct = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
847
850
|
}
|
|
848
851
|
);
|
|
849
852
|
ee.displayName = "FormItem";
|
|
850
|
-
const
|
|
853
|
+
const _e = N.forwardRef(
|
|
851
854
|
({
|
|
852
855
|
id: e,
|
|
853
856
|
name: t,
|
|
@@ -858,15 +861,15 @@ const He = N.forwardRef(
|
|
|
858
861
|
onChange: s,
|
|
859
862
|
checked: l,
|
|
860
863
|
defaultChecked: i,
|
|
861
|
-
disabled:
|
|
862
|
-
required:
|
|
863
|
-
size:
|
|
864
|
-
labelFirst:
|
|
865
|
-
|
|
864
|
+
disabled: u,
|
|
865
|
+
required: d,
|
|
866
|
+
size: f = "medium",
|
|
867
|
+
labelFirst: p,
|
|
868
|
+
...$
|
|
866
869
|
}, v) => {
|
|
867
870
|
const k = ye(() => t || e, [t, e]), m = (R) => {
|
|
868
871
|
s == null || s(R.target.checked);
|
|
869
|
-
}, { wrapperProps: A, inputProps: y } = ie(
|
|
872
|
+
}, { wrapperProps: A, inputProps: y } = ie($);
|
|
870
873
|
return /* @__PURE__ */ I(
|
|
871
874
|
ee,
|
|
872
875
|
{
|
|
@@ -874,9 +877,9 @@ const He = N.forwardRef(
|
|
|
874
877
|
htmlFor: e,
|
|
875
878
|
helpText: c,
|
|
876
879
|
errorText: n,
|
|
877
|
-
required:
|
|
878
|
-
size:
|
|
879
|
-
labelFirst:
|
|
880
|
+
required: d,
|
|
881
|
+
size: f,
|
|
882
|
+
labelFirst: p,
|
|
880
883
|
...A,
|
|
881
884
|
children: [
|
|
882
885
|
/* @__PURE__ */ o(
|
|
@@ -889,8 +892,8 @@ const He = N.forwardRef(
|
|
|
889
892
|
name: k,
|
|
890
893
|
checked: l,
|
|
891
894
|
defaultChecked: i,
|
|
892
|
-
disabled:
|
|
893
|
-
required:
|
|
895
|
+
disabled: u,
|
|
896
|
+
required: d,
|
|
894
897
|
onChange: m,
|
|
895
898
|
...y
|
|
896
899
|
}
|
|
@@ -898,10 +901,10 @@ const He = N.forwardRef(
|
|
|
898
901
|
/* @__PURE__ */ o(
|
|
899
902
|
D,
|
|
900
903
|
{
|
|
901
|
-
as:
|
|
902
|
-
htmlFor:
|
|
904
|
+
as: p ? "label" : "div",
|
|
905
|
+
htmlFor: p ? e : void 0,
|
|
903
906
|
"data-checkbox": !0,
|
|
904
|
-
className: `size-${
|
|
907
|
+
className: `size-${f}`
|
|
905
908
|
}
|
|
906
909
|
)
|
|
907
910
|
]
|
|
@@ -909,8 +912,8 @@ const He = N.forwardRef(
|
|
|
909
912
|
);
|
|
910
913
|
}
|
|
911
914
|
);
|
|
912
|
-
|
|
913
|
-
const
|
|
915
|
+
_e.displayName = "Checkbox";
|
|
916
|
+
const Ge = N.forwardRef(
|
|
914
917
|
({
|
|
915
918
|
id: e,
|
|
916
919
|
name: t,
|
|
@@ -921,15 +924,15 @@ const _e = N.forwardRef(
|
|
|
921
924
|
onChange: s,
|
|
922
925
|
checked: l,
|
|
923
926
|
defaultChecked: i,
|
|
924
|
-
disabled:
|
|
925
|
-
required:
|
|
926
|
-
size:
|
|
927
|
-
labelFirst:
|
|
928
|
-
|
|
927
|
+
disabled: u,
|
|
928
|
+
required: d,
|
|
929
|
+
size: f = "medium",
|
|
930
|
+
labelFirst: p,
|
|
931
|
+
...$
|
|
929
932
|
}, v) => {
|
|
930
933
|
const k = ye(() => t || e, [t, e]), m = (R) => {
|
|
931
934
|
s == null || s(R.target.checked);
|
|
932
|
-
}, { wrapperProps: A, inputProps: y } = ie(
|
|
935
|
+
}, { wrapperProps: A, inputProps: y } = ie($);
|
|
933
936
|
return /* @__PURE__ */ I(
|
|
934
937
|
ee,
|
|
935
938
|
{
|
|
@@ -937,9 +940,9 @@ const _e = N.forwardRef(
|
|
|
937
940
|
htmlFor: e,
|
|
938
941
|
helpText: c,
|
|
939
942
|
errorText: n,
|
|
940
|
-
required:
|
|
941
|
-
size:
|
|
942
|
-
labelFirst:
|
|
943
|
+
required: d,
|
|
944
|
+
size: f,
|
|
945
|
+
labelFirst: p,
|
|
943
946
|
...A,
|
|
944
947
|
children: [
|
|
945
948
|
/* @__PURE__ */ o(
|
|
@@ -952,8 +955,8 @@ const _e = N.forwardRef(
|
|
|
952
955
|
name: k,
|
|
953
956
|
checked: l,
|
|
954
957
|
defaultChecked: i,
|
|
955
|
-
disabled:
|
|
956
|
-
required:
|
|
958
|
+
disabled: u,
|
|
959
|
+
required: d,
|
|
957
960
|
onChange: m,
|
|
958
961
|
...y
|
|
959
962
|
}
|
|
@@ -961,10 +964,10 @@ const _e = N.forwardRef(
|
|
|
961
964
|
/* @__PURE__ */ o(
|
|
962
965
|
D,
|
|
963
966
|
{
|
|
964
|
-
as:
|
|
965
|
-
htmlFor:
|
|
967
|
+
as: p ? "label" : "div",
|
|
968
|
+
htmlFor: p ? e : void 0,
|
|
966
969
|
"data-switch": !0,
|
|
967
|
-
className: `size-${
|
|
970
|
+
className: `size-${f}`
|
|
968
971
|
}
|
|
969
972
|
)
|
|
970
973
|
]
|
|
@@ -972,7 +975,7 @@ const _e = N.forwardRef(
|
|
|
972
975
|
);
|
|
973
976
|
}
|
|
974
977
|
);
|
|
975
|
-
|
|
978
|
+
Ge.displayName = "Switch";
|
|
976
979
|
const Vt = N.forwardRef(
|
|
977
980
|
({
|
|
978
981
|
id: e,
|
|
@@ -984,35 +987,35 @@ const Vt = N.forwardRef(
|
|
|
984
987
|
value: s,
|
|
985
988
|
defaultValue: l,
|
|
986
989
|
onChange: i,
|
|
987
|
-
align:
|
|
988
|
-
equaliseWidth:
|
|
989
|
-
equalizeWidth:
|
|
990
|
-
required:
|
|
991
|
-
disabled:
|
|
990
|
+
align: u,
|
|
991
|
+
equaliseWidth: d,
|
|
992
|
+
equalizeWidth: f,
|
|
993
|
+
required: p,
|
|
994
|
+
disabled: $,
|
|
992
995
|
size: v,
|
|
993
996
|
columns: k,
|
|
994
997
|
labelFirst: m,
|
|
995
998
|
...A
|
|
996
999
|
}, y) => {
|
|
997
|
-
const R = ye(() => t || e, [t, e]), [T,
|
|
1000
|
+
const R = ye(() => t || e, [t, e]), [T, F] = N.useState(
|
|
998
1001
|
s || l || []
|
|
999
1002
|
);
|
|
1000
1003
|
N.useEffect(() => {
|
|
1001
|
-
s !== void 0 &&
|
|
1004
|
+
s !== void 0 && F(s);
|
|
1002
1005
|
}, [s]);
|
|
1003
|
-
const
|
|
1006
|
+
const V = (P, g) => {
|
|
1004
1007
|
let L;
|
|
1005
|
-
g ? L = [...T, P] : L = T.filter((_) => _ !== P), s === void 0 &&
|
|
1008
|
+
g ? L = [...T, P] : L = T.filter((_) => _ !== P), s === void 0 && F(L), i == null || i(L);
|
|
1006
1009
|
};
|
|
1007
1010
|
let E = [];
|
|
1008
|
-
return
|
|
1011
|
+
return u && E.push(`align-${u}`), (d || f) && E.push("equalise-width"), k && E.push("with-columns"), m && E.push("label-first"), /* @__PURE__ */ o(
|
|
1009
1012
|
ee,
|
|
1010
1013
|
{
|
|
1011
1014
|
label: a,
|
|
1012
1015
|
htmlFor: e,
|
|
1013
1016
|
helpText: r,
|
|
1014
1017
|
errorText: c,
|
|
1015
|
-
required:
|
|
1018
|
+
required: p,
|
|
1016
1019
|
children: /* @__PURE__ */ o(
|
|
1017
1020
|
D,
|
|
1018
1021
|
{
|
|
@@ -1027,16 +1030,16 @@ const Vt = N.forwardRef(
|
|
|
1027
1030
|
children: n.map((P, g) => {
|
|
1028
1031
|
const { id: L, value: _, label: S, ...w } = P, z = L || `${e}-option-${g}`, C = T.includes(_);
|
|
1029
1032
|
return /* @__PURE__ */ o(
|
|
1030
|
-
|
|
1033
|
+
_e,
|
|
1031
1034
|
{
|
|
1032
1035
|
id: z,
|
|
1033
1036
|
name: R,
|
|
1034
1037
|
label: S,
|
|
1035
1038
|
checked: C,
|
|
1036
|
-
disabled:
|
|
1039
|
+
disabled: $ || P.disabled,
|
|
1037
1040
|
size: v,
|
|
1038
1041
|
labelFirst: m,
|
|
1039
|
-
onChange: (B) =>
|
|
1042
|
+
onChange: (B) => V(_, B),
|
|
1040
1043
|
...w
|
|
1041
1044
|
},
|
|
1042
1045
|
z
|
|
@@ -1049,7 +1052,7 @@ const Vt = N.forwardRef(
|
|
|
1049
1052
|
}
|
|
1050
1053
|
);
|
|
1051
1054
|
Vt.displayName = "CheckboxGroup";
|
|
1052
|
-
const
|
|
1055
|
+
const Wt = N.forwardRef(
|
|
1053
1056
|
({
|
|
1054
1057
|
id: e,
|
|
1055
1058
|
name: t,
|
|
@@ -1060,35 +1063,35 @@ const Ft = N.forwardRef(
|
|
|
1060
1063
|
value: s,
|
|
1061
1064
|
defaultValue: l,
|
|
1062
1065
|
onChange: i,
|
|
1063
|
-
align:
|
|
1064
|
-
equaliseWidth:
|
|
1065
|
-
equalizeWidth:
|
|
1066
|
-
required:
|
|
1067
|
-
disabled:
|
|
1066
|
+
align: u,
|
|
1067
|
+
equaliseWidth: d,
|
|
1068
|
+
equalizeWidth: f,
|
|
1069
|
+
required: p,
|
|
1070
|
+
disabled: $,
|
|
1068
1071
|
size: v,
|
|
1069
1072
|
columns: k,
|
|
1070
1073
|
labelFirst: m,
|
|
1071
1074
|
...A
|
|
1072
1075
|
}, y) => {
|
|
1073
|
-
const R = ye(() => t || e, [t, e]), [T,
|
|
1076
|
+
const R = ye(() => t || e, [t, e]), [T, F] = N.useState(
|
|
1074
1077
|
s || l || []
|
|
1075
1078
|
);
|
|
1076
1079
|
N.useEffect(() => {
|
|
1077
|
-
s !== void 0 &&
|
|
1080
|
+
s !== void 0 && F(s);
|
|
1078
1081
|
}, [s]);
|
|
1079
|
-
const
|
|
1082
|
+
const V = (P, g) => {
|
|
1080
1083
|
let L;
|
|
1081
|
-
g ? L = [...T, P] : L = T.filter((_) => _ !== P), s === void 0 &&
|
|
1084
|
+
g ? L = [...T, P] : L = T.filter((_) => _ !== P), s === void 0 && F(L), i == null || i(L);
|
|
1082
1085
|
};
|
|
1083
1086
|
let E = [];
|
|
1084
|
-
return
|
|
1087
|
+
return u && E.push(`align-${u}`), (d || f) && E.push("equalise-width"), k && E.push("with-columns"), m && E.push("label-first"), /* @__PURE__ */ o(
|
|
1085
1088
|
ee,
|
|
1086
1089
|
{
|
|
1087
1090
|
label: a,
|
|
1088
1091
|
htmlFor: e,
|
|
1089
1092
|
helpText: r,
|
|
1090
1093
|
errorText: c,
|
|
1091
|
-
required:
|
|
1094
|
+
required: p,
|
|
1092
1095
|
children: /* @__PURE__ */ o(
|
|
1093
1096
|
D,
|
|
1094
1097
|
{
|
|
@@ -1103,16 +1106,16 @@ const Ft = N.forwardRef(
|
|
|
1103
1106
|
children: n.map((P, g) => {
|
|
1104
1107
|
const { id: L, value: _, label: S, ...w } = P, z = L || `${e}-option-${g}`, C = T.includes(_);
|
|
1105
1108
|
return /* @__PURE__ */ o(
|
|
1106
|
-
|
|
1109
|
+
Ge,
|
|
1107
1110
|
{
|
|
1108
1111
|
id: z,
|
|
1109
1112
|
name: R,
|
|
1110
1113
|
label: S,
|
|
1111
1114
|
checked: C,
|
|
1112
|
-
disabled:
|
|
1115
|
+
disabled: $ || P.disabled,
|
|
1113
1116
|
size: v,
|
|
1114
1117
|
labelFirst: m,
|
|
1115
|
-
onChange: (B) =>
|
|
1118
|
+
onChange: (B) => V(_, B),
|
|
1116
1119
|
...w
|
|
1117
1120
|
},
|
|
1118
1121
|
z
|
|
@@ -1124,8 +1127,8 @@ const Ft = N.forwardRef(
|
|
|
1124
1127
|
);
|
|
1125
1128
|
}
|
|
1126
1129
|
);
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1130
|
+
Wt.displayName = "SwitchGroup";
|
|
1131
|
+
const rt = N.forwardRef(
|
|
1129
1132
|
({
|
|
1130
1133
|
"aria-label": e,
|
|
1131
1134
|
"aria-invalid": t,
|
|
@@ -1136,11 +1139,11 @@ const at = N.forwardRef(
|
|
|
1136
1139
|
accept: s,
|
|
1137
1140
|
allowMultipleFiles: l = !1,
|
|
1138
1141
|
capture: i,
|
|
1139
|
-
height:
|
|
1140
|
-
onChange:
|
|
1141
|
-
className:
|
|
1142
|
-
instructionMainText:
|
|
1143
|
-
instructionSubText:
|
|
1142
|
+
height: u = "120px",
|
|
1143
|
+
onChange: d,
|
|
1144
|
+
className: f = "",
|
|
1145
|
+
instructionMainText: p = "Drag and drop or click to upload",
|
|
1146
|
+
instructionSubText: $ = "You can add multiple files",
|
|
1144
1147
|
invalid: v,
|
|
1145
1148
|
id: k,
|
|
1146
1149
|
name: m,
|
|
@@ -1148,8 +1151,8 @@ const at = N.forwardRef(
|
|
|
1148
1151
|
badgeTextColour: y,
|
|
1149
1152
|
size: R,
|
|
1150
1153
|
...T
|
|
1151
|
-
},
|
|
1152
|
-
const [
|
|
1154
|
+
}, F) => {
|
|
1155
|
+
const [V, E] = j([]), [P, g] = j(!1), L = Y(null), _ = (h) => {
|
|
1153
1156
|
h.preventDefault(), h.stopPropagation(), g(!0);
|
|
1154
1157
|
}, S = (h) => {
|
|
1155
1158
|
h.preventDefault(), h.stopPropagation(), g(!1);
|
|
@@ -1159,10 +1162,10 @@ const at = N.forwardRef(
|
|
|
1159
1162
|
z(M);
|
|
1160
1163
|
}, z = (h) => {
|
|
1161
1164
|
if (l)
|
|
1162
|
-
E((M) => [...M, ...h]),
|
|
1165
|
+
E((M) => [...M, ...h]), d == null || d([...V, ...h]);
|
|
1163
1166
|
else {
|
|
1164
1167
|
const M = h[0];
|
|
1165
|
-
E([M]),
|
|
1168
|
+
E([M]), d == null || d([M]);
|
|
1166
1169
|
}
|
|
1167
1170
|
}, C = (h) => {
|
|
1168
1171
|
if (h.target.files) {
|
|
@@ -1170,12 +1173,12 @@ const at = N.forwardRef(
|
|
|
1170
1173
|
z(M);
|
|
1171
1174
|
}
|
|
1172
1175
|
}, B = (h) => {
|
|
1173
|
-
const M =
|
|
1174
|
-
E(M),
|
|
1176
|
+
const M = V.filter((O, H) => H !== h);
|
|
1177
|
+
E(M), d == null || d(M);
|
|
1175
1178
|
}, b = () => {
|
|
1176
1179
|
var h;
|
|
1177
1180
|
(h = L.current) == null || h.click();
|
|
1178
|
-
}, { wrapperProps:
|
|
1181
|
+
}, { wrapperProps: x } = ie(T);
|
|
1179
1182
|
return /* @__PURE__ */ o(
|
|
1180
1183
|
ee,
|
|
1181
1184
|
{
|
|
@@ -1185,16 +1188,16 @@ const at = N.forwardRef(
|
|
|
1185
1188
|
errorText: c,
|
|
1186
1189
|
required: n,
|
|
1187
1190
|
size: R,
|
|
1188
|
-
|
|
1191
|
+
...x,
|
|
1189
1192
|
children: /* @__PURE__ */ I(
|
|
1190
1193
|
K,
|
|
1191
1194
|
{
|
|
1192
1195
|
"data-file-upload-area": !0,
|
|
1193
|
-
ref:
|
|
1196
|
+
ref: F,
|
|
1194
1197
|
className: [
|
|
1195
1198
|
"file-upload-wrapper",
|
|
1196
1199
|
P ? "dragging" : "",
|
|
1197
|
-
|
|
1200
|
+
f
|
|
1198
1201
|
].filter(Boolean).join(" "),
|
|
1199
1202
|
"aria-label": e || a,
|
|
1200
1203
|
"aria-invalid": t || v || void 0,
|
|
@@ -1208,7 +1211,7 @@ const at = N.forwardRef(
|
|
|
1208
1211
|
onDragLeave: S,
|
|
1209
1212
|
onDrop: w,
|
|
1210
1213
|
onClick: b,
|
|
1211
|
-
style: { height:
|
|
1214
|
+
style: { height: u },
|
|
1212
1215
|
children: [
|
|
1213
1216
|
/* @__PURE__ */ o(
|
|
1214
1217
|
"input",
|
|
@@ -1224,14 +1227,14 @@ const at = N.forwardRef(
|
|
|
1224
1227
|
className: "file-input"
|
|
1225
1228
|
}
|
|
1226
1229
|
),
|
|
1227
|
-
|
|
1228
|
-
/* @__PURE__ */ o(J, { children:
|
|
1229
|
-
|
|
1230
|
+
p && /* @__PURE__ */ I(K, { className: "file-upload-content", children: [
|
|
1231
|
+
/* @__PURE__ */ o(J, { children: p }),
|
|
1232
|
+
$ && /* @__PURE__ */ o(J, { isSubtext: !0, children: $ })
|
|
1230
1233
|
] })
|
|
1231
1234
|
]
|
|
1232
1235
|
}
|
|
1233
1236
|
),
|
|
1234
|
-
|
|
1237
|
+
V.length > 0 && /* @__PURE__ */ o(K, { className: "uploaded-files", children: V.map((h, M) => /* @__PURE__ */ o(
|
|
1235
1238
|
Be,
|
|
1236
1239
|
{
|
|
1237
1240
|
size: "small",
|
|
@@ -1252,8 +1255,8 @@ const at = N.forwardRef(
|
|
|
1252
1255
|
);
|
|
1253
1256
|
}
|
|
1254
1257
|
);
|
|
1255
|
-
|
|
1256
|
-
const
|
|
1258
|
+
rt.displayName = "FileUpload";
|
|
1259
|
+
const Pe = N.forwardRef(
|
|
1257
1260
|
({
|
|
1258
1261
|
// FormItem props
|
|
1259
1262
|
label: e,
|
|
@@ -1266,12 +1269,12 @@ const Se = N.forwardRef(
|
|
|
1266
1269
|
innerIconLeft: s,
|
|
1267
1270
|
innerIconRight: l,
|
|
1268
1271
|
innerTextLeft: i,
|
|
1269
|
-
innerTextRight:
|
|
1272
|
+
innerTextRight: u,
|
|
1270
1273
|
// Validation
|
|
1271
|
-
validateThis:
|
|
1272
|
-
valid:
|
|
1273
|
-
invalid:
|
|
1274
|
-
validationState:
|
|
1274
|
+
validateThis: d,
|
|
1275
|
+
valid: f,
|
|
1276
|
+
invalid: p,
|
|
1277
|
+
validationState: $,
|
|
1275
1278
|
// Handlers
|
|
1276
1279
|
onChange: v,
|
|
1277
1280
|
onBlur: k,
|
|
@@ -1282,8 +1285,8 @@ const Se = N.forwardRef(
|
|
|
1282
1285
|
// Input props
|
|
1283
1286
|
id: R,
|
|
1284
1287
|
name: T,
|
|
1285
|
-
value:
|
|
1286
|
-
defaultValue:
|
|
1288
|
+
value: F,
|
|
1289
|
+
defaultValue: V,
|
|
1287
1290
|
type: E = "text",
|
|
1288
1291
|
placeholder: P,
|
|
1289
1292
|
autoComplete: g,
|
|
@@ -1295,50 +1298,50 @@ const Se = N.forwardRef(
|
|
|
1295
1298
|
className: C,
|
|
1296
1299
|
...B
|
|
1297
1300
|
}, b) => {
|
|
1298
|
-
const
|
|
1299
|
-
(
|
|
1300
|
-
M.current =
|
|
1301
|
+
const x = Y(null), h = Y(null), M = Y(null), [O, H] = j(!1), [Z, le] = j(null), te = $ ?? (d ? Z : null), ae = N.useCallback(
|
|
1302
|
+
(q) => {
|
|
1303
|
+
M.current = q, typeof b == "function" ? b(q) : b && (b.current = q);
|
|
1301
1304
|
},
|
|
1302
1305
|
[b]
|
|
1303
1306
|
), re = () => {
|
|
1304
|
-
const
|
|
1305
|
-
if (!
|
|
1307
|
+
const q = M.current;
|
|
1308
|
+
if (!q || q.value === "") {
|
|
1306
1309
|
le(null);
|
|
1307
1310
|
return;
|
|
1308
1311
|
}
|
|
1309
|
-
le(
|
|
1310
|
-
}, we = (
|
|
1311
|
-
v == null || v(
|
|
1312
|
-
},
|
|
1313
|
-
H(!0),
|
|
1314
|
-
}, W = (
|
|
1315
|
-
m == null || m(
|
|
1312
|
+
le(q.validity.valid ? "valid" : "invalid");
|
|
1313
|
+
}, we = (q) => {
|
|
1314
|
+
v == null || v(q.target.value), O && d && re();
|
|
1315
|
+
}, ge = (q) => {
|
|
1316
|
+
H(!0), d && re(), k == null || k(q);
|
|
1317
|
+
}, W = (q) => {
|
|
1318
|
+
m == null || m(q);
|
|
1316
1319
|
};
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1320
|
+
U(() => {
|
|
1321
|
+
const q = (he, be) => {
|
|
1319
1322
|
if (!he) return;
|
|
1320
1323
|
const ue = he.closest("[data-form-item]");
|
|
1321
1324
|
ue == null || ue.style.setProperty(
|
|
1322
|
-
`--side-element-${
|
|
1325
|
+
`--side-element-${be}-width`,
|
|
1323
1326
|
`${he.getBoundingClientRect().width}px`
|
|
1324
1327
|
);
|
|
1325
1328
|
};
|
|
1326
|
-
(i || s) &&
|
|
1327
|
-
}, [i,
|
|
1328
|
-
const X = (
|
|
1329
|
-
if (!
|
|
1330
|
-
const ue = typeof
|
|
1329
|
+
(i || s) && q(x.current, "left"), (u || l) && q(h.current, "right");
|
|
1330
|
+
}, [i, u, s, l]);
|
|
1331
|
+
const X = (q, he, be) => {
|
|
1332
|
+
if (!q) return null;
|
|
1333
|
+
const ue = typeof q == "string", xe = N.isValidElement(q) ? q.props : {}, Se = !ue && N.isValidElement(q) && (xe.onClick || xe.onKeyDown || q.type === "button" || q.type === "a");
|
|
1331
1334
|
return /* @__PURE__ */ o(
|
|
1332
1335
|
K,
|
|
1333
1336
|
{
|
|
1334
|
-
ref:
|
|
1337
|
+
ref: be,
|
|
1335
1338
|
"data-input-side-element": !0,
|
|
1336
|
-
className: `${he} ${ue ? "is-text" : "is-icon"} ${
|
|
1339
|
+
className: `${he} ${ue ? "is-text" : "is-icon"} ${Se ? "is-interactive" : ""}`,
|
|
1337
1340
|
"aria-hidden": "true",
|
|
1338
|
-
children:
|
|
1341
|
+
children: q
|
|
1339
1342
|
}
|
|
1340
1343
|
);
|
|
1341
|
-
}, Q = !!(s || i), se = !!(l ||
|
|
1344
|
+
}, Q = !!(s || i), se = !!(l || u), { wrapperProps: $e, inputProps: Ce } = ie(B);
|
|
1342
1345
|
return /* @__PURE__ */ I(
|
|
1343
1346
|
ee,
|
|
1344
1347
|
{
|
|
@@ -1360,8 +1363,8 @@ const Se = N.forwardRef(
|
|
|
1360
1363
|
id: R,
|
|
1361
1364
|
name: T,
|
|
1362
1365
|
type: E,
|
|
1363
|
-
value:
|
|
1364
|
-
defaultValue:
|
|
1366
|
+
value: F,
|
|
1367
|
+
defaultValue: V,
|
|
1365
1368
|
placeholder: P || " ",
|
|
1366
1369
|
autoComplete: g,
|
|
1367
1370
|
maxLength: L,
|
|
@@ -1376,25 +1379,25 @@ const Se = N.forwardRef(
|
|
|
1376
1379
|
se && "with-right-element"
|
|
1377
1380
|
].filter(Boolean).join(" "),
|
|
1378
1381
|
"aria-label": A || e,
|
|
1379
|
-
"aria-invalid": y ||
|
|
1382
|
+
"aria-invalid": y || p,
|
|
1380
1383
|
"aria-required": n,
|
|
1381
1384
|
onChange: we,
|
|
1382
|
-
onBlur:
|
|
1385
|
+
onBlur: ge,
|
|
1383
1386
|
onFocus: W,
|
|
1384
1387
|
...Ce
|
|
1385
1388
|
}
|
|
1386
1389
|
),
|
|
1387
1390
|
(Q || se) && /* @__PURE__ */ I(K, { "data-input-helper": !0, "aria-hidden": "true", children: [
|
|
1388
|
-
X(s || i, "left",
|
|
1389
|
-
X(l ||
|
|
1391
|
+
X(s || i, "left", x),
|
|
1392
|
+
X(l || u, "right", h)
|
|
1390
1393
|
] })
|
|
1391
1394
|
]
|
|
1392
1395
|
}
|
|
1393
1396
|
);
|
|
1394
1397
|
}
|
|
1395
1398
|
);
|
|
1396
|
-
|
|
1397
|
-
const
|
|
1399
|
+
Pe.displayName = "InputField";
|
|
1400
|
+
const st = N.forwardRef(
|
|
1398
1401
|
({
|
|
1399
1402
|
desktopSpan: e,
|
|
1400
1403
|
mobileSpan: t,
|
|
@@ -1418,8 +1421,8 @@ const rt = N.forwardRef(
|
|
|
1418
1421
|
);
|
|
1419
1422
|
}
|
|
1420
1423
|
);
|
|
1421
|
-
|
|
1422
|
-
const
|
|
1424
|
+
st.displayName = "Portion";
|
|
1425
|
+
const nt = N.forwardRef(
|
|
1423
1426
|
({
|
|
1424
1427
|
id: e,
|
|
1425
1428
|
name: t,
|
|
@@ -1430,23 +1433,23 @@ const st = N.forwardRef(
|
|
|
1430
1433
|
onChange: s,
|
|
1431
1434
|
checked: l,
|
|
1432
1435
|
disabled: i,
|
|
1433
|
-
required:
|
|
1434
|
-
labelFirst:
|
|
1435
|
-
...
|
|
1436
|
-
},
|
|
1437
|
-
const
|
|
1436
|
+
required: u,
|
|
1437
|
+
labelFirst: d,
|
|
1438
|
+
...f
|
|
1439
|
+
}, p) => {
|
|
1440
|
+
const $ = ye(() => t || e, [t, e]), v = (A) => {
|
|
1438
1441
|
A.target.checked && s && s(a);
|
|
1439
|
-
}, { wrapperProps: k, inputProps: m } = ie(
|
|
1442
|
+
}, { wrapperProps: k, inputProps: m } = ie(f);
|
|
1440
1443
|
return /* @__PURE__ */ o(
|
|
1441
1444
|
D,
|
|
1442
1445
|
{
|
|
1443
1446
|
as: "div",
|
|
1444
1447
|
"data-radio-button": !0,
|
|
1445
|
-
ref:
|
|
1448
|
+
ref: p,
|
|
1446
1449
|
role: "radio",
|
|
1447
1450
|
"aria-checked": l,
|
|
1448
1451
|
"aria-disabled": i,
|
|
1449
|
-
className:
|
|
1452
|
+
className: d ? "label-first" : void 0,
|
|
1450
1453
|
...k,
|
|
1451
1454
|
children: /* @__PURE__ */ I(
|
|
1452
1455
|
ee,
|
|
@@ -1455,8 +1458,8 @@ const st = N.forwardRef(
|
|
|
1455
1458
|
htmlFor: e,
|
|
1456
1459
|
helpText: c,
|
|
1457
1460
|
errorText: n,
|
|
1458
|
-
required:
|
|
1459
|
-
labelFirst:
|
|
1461
|
+
required: u,
|
|
1462
|
+
labelFirst: d,
|
|
1460
1463
|
children: [
|
|
1461
1464
|
/* @__PURE__ */ o(
|
|
1462
1465
|
D,
|
|
@@ -1464,11 +1467,11 @@ const st = N.forwardRef(
|
|
|
1464
1467
|
as: "input",
|
|
1465
1468
|
type: "radio",
|
|
1466
1469
|
id: e,
|
|
1467
|
-
name:
|
|
1470
|
+
name: $,
|
|
1468
1471
|
value: a,
|
|
1469
1472
|
checked: l,
|
|
1470
1473
|
disabled: i,
|
|
1471
|
-
required:
|
|
1474
|
+
required: u,
|
|
1472
1475
|
onChange: v,
|
|
1473
1476
|
...m
|
|
1474
1477
|
}
|
|
@@ -1476,8 +1479,8 @@ const st = N.forwardRef(
|
|
|
1476
1479
|
/* @__PURE__ */ o(
|
|
1477
1480
|
D,
|
|
1478
1481
|
{
|
|
1479
|
-
as:
|
|
1480
|
-
htmlFor:
|
|
1482
|
+
as: d ? "label" : "div",
|
|
1483
|
+
htmlFor: d ? e : void 0,
|
|
1481
1484
|
"data-radio": !0
|
|
1482
1485
|
}
|
|
1483
1486
|
)
|
|
@@ -1488,8 +1491,8 @@ const st = N.forwardRef(
|
|
|
1488
1491
|
);
|
|
1489
1492
|
}
|
|
1490
1493
|
);
|
|
1491
|
-
|
|
1492
|
-
const
|
|
1494
|
+
nt.displayName = "RadioButton";
|
|
1495
|
+
const ot = N.forwardRef(
|
|
1493
1496
|
({
|
|
1494
1497
|
id: e,
|
|
1495
1498
|
name: t,
|
|
@@ -1500,28 +1503,28 @@ const nt = N.forwardRef(
|
|
|
1500
1503
|
value: s,
|
|
1501
1504
|
defaultValue: l,
|
|
1502
1505
|
onChange: i,
|
|
1503
|
-
align:
|
|
1504
|
-
equaliseWidth:
|
|
1505
|
-
equalizeWidth:
|
|
1506
|
-
required:
|
|
1507
|
-
disabled:
|
|
1506
|
+
align: u,
|
|
1507
|
+
equaliseWidth: d,
|
|
1508
|
+
equalizeWidth: f,
|
|
1509
|
+
required: p,
|
|
1510
|
+
disabled: $,
|
|
1508
1511
|
size: v,
|
|
1509
1512
|
columns: k,
|
|
1510
1513
|
labelFirst: m,
|
|
1511
1514
|
...A
|
|
1512
1515
|
}, y) => {
|
|
1513
|
-
const R = ye(() => t || e, [t, e]), T = (
|
|
1514
|
-
i == null || i(
|
|
1516
|
+
const R = ye(() => t || e, [t, e]), T = (V) => {
|
|
1517
|
+
i == null || i(V.target.value);
|
|
1515
1518
|
};
|
|
1516
|
-
let
|
|
1517
|
-
return
|
|
1519
|
+
let F = [];
|
|
1520
|
+
return u && F.push(`align-${u}`), (d || f) && F.push("equalise-width"), k && F.push("with-columns"), m && F.push("label-first"), /* @__PURE__ */ o(
|
|
1518
1521
|
ee,
|
|
1519
1522
|
{
|
|
1520
1523
|
label: a,
|
|
1521
1524
|
htmlFor: e,
|
|
1522
1525
|
helpText: r,
|
|
1523
1526
|
errorText: c,
|
|
1524
|
-
required:
|
|
1527
|
+
required: p,
|
|
1525
1528
|
size: v,
|
|
1526
1529
|
children: /* @__PURE__ */ o(
|
|
1527
1530
|
D,
|
|
@@ -1529,13 +1532,13 @@ const nt = N.forwardRef(
|
|
|
1529
1532
|
as: "div",
|
|
1530
1533
|
"data-radio-group": !0,
|
|
1531
1534
|
ref: y,
|
|
1532
|
-
classNames:
|
|
1535
|
+
classNames: F,
|
|
1533
1536
|
role: "radiogroup",
|
|
1534
1537
|
"aria-label": a,
|
|
1535
1538
|
style: k ? { gridTemplateColumns: `repeat(${k}, 1fr)` } : void 0,
|
|
1536
1539
|
...A,
|
|
1537
|
-
children: n.map((
|
|
1538
|
-
const { id: P, value: g, label: L, ..._ } =
|
|
1540
|
+
children: n.map((V, E) => {
|
|
1541
|
+
const { id: P, value: g, label: L, ..._ } = V, S = P || `${e}-option-${E}`, w = s ? s === g : l === g;
|
|
1539
1542
|
return /* @__PURE__ */ I(
|
|
1540
1543
|
K,
|
|
1541
1544
|
{
|
|
@@ -1552,7 +1555,7 @@ const nt = N.forwardRef(
|
|
|
1552
1555
|
name: R,
|
|
1553
1556
|
value: g,
|
|
1554
1557
|
checked: w,
|
|
1555
|
-
disabled:
|
|
1558
|
+
disabled: $,
|
|
1556
1559
|
onChange: T,
|
|
1557
1560
|
..._
|
|
1558
1561
|
}
|
|
@@ -1570,8 +1573,8 @@ const nt = N.forwardRef(
|
|
|
1570
1573
|
);
|
|
1571
1574
|
}
|
|
1572
1575
|
);
|
|
1573
|
-
|
|
1574
|
-
const
|
|
1576
|
+
ot.displayName = "RadioGroup";
|
|
1577
|
+
const it = N.forwardRef(
|
|
1575
1578
|
({
|
|
1576
1579
|
layout: e = "grid",
|
|
1577
1580
|
gutters: t = "medium",
|
|
@@ -1582,17 +1585,17 @@ const ot = N.forwardRef(
|
|
|
1582
1585
|
allowUltraWide: s,
|
|
1583
1586
|
groupLabel: l,
|
|
1584
1587
|
...i
|
|
1585
|
-
},
|
|
1586
|
-
let
|
|
1587
|
-
return e &&
|
|
1588
|
+
}, u) => {
|
|
1589
|
+
let d = [];
|
|
1590
|
+
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(
|
|
1588
1591
|
"retain-layout-on-tablet-landscape retain-layout-on-tablet-portrait retain-layout-on-mobile"
|
|
1589
|
-
), s &&
|
|
1592
|
+
), s && d.push("allow-ultra-wide"), /* @__PURE__ */ o(
|
|
1590
1593
|
D,
|
|
1591
1594
|
{
|
|
1592
1595
|
as: "div",
|
|
1593
1596
|
"data-row": !0,
|
|
1594
|
-
ref:
|
|
1595
|
-
classNames: [
|
|
1597
|
+
ref: u,
|
|
1598
|
+
classNames: [d.join(" ")],
|
|
1596
1599
|
marginBottom: "tiny",
|
|
1597
1600
|
role: "grid",
|
|
1598
1601
|
"aria-label": l,
|
|
@@ -1601,8 +1604,8 @@ const ot = N.forwardRef(
|
|
|
1601
1604
|
);
|
|
1602
1605
|
}
|
|
1603
1606
|
);
|
|
1604
|
-
|
|
1605
|
-
const
|
|
1607
|
+
it.displayName = "Row";
|
|
1608
|
+
const lt = N.forwardRef(
|
|
1606
1609
|
({
|
|
1607
1610
|
// FormItem props
|
|
1608
1611
|
label: e,
|
|
@@ -1615,11 +1618,11 @@ const it = N.forwardRef(
|
|
|
1615
1618
|
name: s,
|
|
1616
1619
|
options: l,
|
|
1617
1620
|
onChange: i,
|
|
1618
|
-
disabled:
|
|
1619
|
-
className:
|
|
1620
|
-
...
|
|
1621
|
-
},
|
|
1622
|
-
const
|
|
1621
|
+
disabled: u,
|
|
1622
|
+
className: d,
|
|
1623
|
+
...f
|
|
1624
|
+
}, p) => {
|
|
1625
|
+
const $ = ye(() => s || n, [s, n]), v = (R) => /* @__PURE__ */ o(
|
|
1623
1626
|
D,
|
|
1624
1627
|
{
|
|
1625
1628
|
as: "option",
|
|
@@ -1638,7 +1641,7 @@ const it = N.forwardRef(
|
|
|
1638
1641
|
R.label
|
|
1639
1642
|
), m = (R) => {
|
|
1640
1643
|
i == null || i(R.target.value);
|
|
1641
|
-
}, { wrapperProps: A, inputProps: y } = ie(
|
|
1644
|
+
}, { wrapperProps: A, inputProps: y } = ie(f);
|
|
1642
1645
|
return /* @__PURE__ */ o(
|
|
1643
1646
|
ee,
|
|
1644
1647
|
{
|
|
@@ -1649,14 +1652,14 @@ const it = N.forwardRef(
|
|
|
1649
1652
|
required: r,
|
|
1650
1653
|
size: c,
|
|
1651
1654
|
...A,
|
|
1652
|
-
children: /* @__PURE__ */ o(K, { "data-select": !0, className:
|
|
1655
|
+
children: /* @__PURE__ */ o(K, { "data-select": !0, className: d, disabled: u, children: /* @__PURE__ */ o(
|
|
1653
1656
|
D,
|
|
1654
1657
|
{
|
|
1655
1658
|
as: "select",
|
|
1656
|
-
ref:
|
|
1659
|
+
ref: p,
|
|
1657
1660
|
id: n,
|
|
1658
|
-
name:
|
|
1659
|
-
disabled:
|
|
1661
|
+
name: $,
|
|
1662
|
+
disabled: u,
|
|
1660
1663
|
required: r,
|
|
1661
1664
|
onChange: m,
|
|
1662
1665
|
...y,
|
|
@@ -1669,8 +1672,8 @@ const it = N.forwardRef(
|
|
|
1669
1672
|
);
|
|
1670
1673
|
}
|
|
1671
1674
|
);
|
|
1672
|
-
|
|
1673
|
-
const
|
|
1675
|
+
lt.displayName = "Select";
|
|
1676
|
+
const Ue = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", Ie = (e, t, a) => Math.abs(e) === 1 ? t : a, ct = N.forwardRef(
|
|
1674
1677
|
({
|
|
1675
1678
|
// FormItem props
|
|
1676
1679
|
label: e,
|
|
@@ -1683,12 +1686,12 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1683
1686
|
onChange: s,
|
|
1684
1687
|
value: l = "",
|
|
1685
1688
|
characterLimit: i,
|
|
1686
|
-
wordLimit:
|
|
1689
|
+
wordLimit: u,
|
|
1687
1690
|
// Input props
|
|
1688
|
-
id:
|
|
1689
|
-
name:
|
|
1690
|
-
rows:
|
|
1691
|
-
cols:
|
|
1691
|
+
id: d,
|
|
1692
|
+
name: f,
|
|
1693
|
+
rows: p,
|
|
1694
|
+
cols: $,
|
|
1692
1695
|
minLength: v,
|
|
1693
1696
|
maxLength: k,
|
|
1694
1697
|
placeholder: m,
|
|
@@ -1697,8 +1700,8 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1697
1700
|
autoComplete: R,
|
|
1698
1701
|
// Validation (unused but destructured to not pass to DOM)
|
|
1699
1702
|
validateThis: T,
|
|
1700
|
-
valid:
|
|
1701
|
-
invalid:
|
|
1703
|
+
valid: F,
|
|
1704
|
+
invalid: V,
|
|
1702
1705
|
...E
|
|
1703
1706
|
}, P) => {
|
|
1704
1707
|
const g = Y(null), L = (C) => {
|
|
@@ -1706,19 +1709,19 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1706
1709
|
}, _ = () => {
|
|
1707
1710
|
const C = [];
|
|
1708
1711
|
if (i) {
|
|
1709
|
-
const B = l.length, b =
|
|
1712
|
+
const B = l.length, b = Ue(B, i), x = Math.max(0, B - i), h = i - B;
|
|
1710
1713
|
C.push(
|
|
1711
|
-
/* @__PURE__ */ o("span", { className: `limit-${b}`, children:
|
|
1714
|
+
/* @__PURE__ */ o("span", { className: `limit-${b}`, children: x > 0 ? `${x} ${Ie(x, "char", "chars")} over limit` : `${h} ${Ie(h, "char", "chars")} left` }, "char-limit")
|
|
1712
1715
|
);
|
|
1713
1716
|
}
|
|
1714
|
-
if (
|
|
1715
|
-
const B = l.trim().split(/\s+/).filter(Boolean).length, b =
|
|
1717
|
+
if (u) {
|
|
1718
|
+
const B = l.trim().split(/\s+/).filter(Boolean).length, b = Ue(B, u), x = Math.max(0, B - u), h = u - B;
|
|
1716
1719
|
C.push(
|
|
1717
|
-
/* @__PURE__ */ o("span", { className: `limit-${b}`, children:
|
|
1720
|
+
/* @__PURE__ */ o("span", { className: `limit-${b}`, children: x > 0 ? `${x} ${Ie(x, "word", "words")} over limit` : `${h} ${Ie(h, "word", "words")} left` }, "word-limit")
|
|
1718
1721
|
);
|
|
1719
1722
|
}
|
|
1720
1723
|
if (!(!C.length && !a))
|
|
1721
|
-
return /* @__PURE__ */ I(
|
|
1724
|
+
return /* @__PURE__ */ I(Me, { children: [
|
|
1722
1725
|
a,
|
|
1723
1726
|
a && C.length > 0 && /* @__PURE__ */ o("span", { className: "separator", children: " • " }),
|
|
1724
1727
|
C.map((B, b) => /* @__PURE__ */ I(N.Fragment, { children: [
|
|
@@ -1733,7 +1736,7 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1733
1736
|
ee,
|
|
1734
1737
|
{
|
|
1735
1738
|
label: e,
|
|
1736
|
-
htmlFor:
|
|
1739
|
+
htmlFor: d,
|
|
1737
1740
|
helpText: _(),
|
|
1738
1741
|
errorText: r,
|
|
1739
1742
|
required: n,
|
|
@@ -1745,11 +1748,11 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1745
1748
|
as: "textarea",
|
|
1746
1749
|
ref: S,
|
|
1747
1750
|
"data-textarea": !0,
|
|
1748
|
-
id:
|
|
1749
|
-
name:
|
|
1751
|
+
id: d,
|
|
1752
|
+
name: f,
|
|
1750
1753
|
value: l,
|
|
1751
|
-
rows:
|
|
1752
|
-
cols:
|
|
1754
|
+
rows: p,
|
|
1755
|
+
cols: $,
|
|
1753
1756
|
minLength: v,
|
|
1754
1757
|
maxLength: k,
|
|
1755
1758
|
placeholder: m,
|
|
@@ -1765,22 +1768,22 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1765
1768
|
);
|
|
1766
1769
|
}
|
|
1767
1770
|
);
|
|
1768
|
-
|
|
1769
|
-
const
|
|
1770
|
-
Checkbox:
|
|
1771
|
-
Switch:
|
|
1772
|
-
InputField:
|
|
1773
|
-
FileUpload:
|
|
1774
|
-
InputLabel:
|
|
1775
|
-
RadioButton:
|
|
1776
|
-
RadioGroup:
|
|
1777
|
-
Select:
|
|
1778
|
-
TextArea:
|
|
1771
|
+
ct.displayName = "TextArea";
|
|
1772
|
+
const zt = {
|
|
1773
|
+
Checkbox: _e,
|
|
1774
|
+
Switch: Ge,
|
|
1775
|
+
InputField: Pe,
|
|
1776
|
+
FileUpload: rt,
|
|
1777
|
+
InputLabel: Ee,
|
|
1778
|
+
RadioButton: nt,
|
|
1779
|
+
RadioGroup: ot,
|
|
1780
|
+
Select: lt,
|
|
1781
|
+
TextArea: ct,
|
|
1779
1782
|
Empty: "div"
|
|
1780
|
-
},
|
|
1783
|
+
}, Ht = (e, t) => {
|
|
1781
1784
|
const { as: a, name: r, ...c } = e, n = (l) => {
|
|
1782
1785
|
t(r, l);
|
|
1783
|
-
}, s =
|
|
1786
|
+
}, s = zt[a] || Pe;
|
|
1784
1787
|
return /* @__PURE__ */ o(
|
|
1785
1788
|
D,
|
|
1786
1789
|
{
|
|
@@ -1791,34 +1794,34 @@ const Wt = {
|
|
|
1791
1794
|
onChange: n
|
|
1792
1795
|
}
|
|
1793
1796
|
);
|
|
1794
|
-
},
|
|
1797
|
+
}, _t = (e, t, a) => {
|
|
1795
1798
|
const r = e.map((c, n) => {
|
|
1796
1799
|
const {
|
|
1797
1800
|
desktopSpan: s,
|
|
1798
1801
|
tabletLandscapeSpan: l,
|
|
1799
1802
|
tabletPortraitSpan: i,
|
|
1800
|
-
mobileSpan:
|
|
1801
|
-
isHorizontal:
|
|
1802
|
-
...
|
|
1803
|
+
mobileSpan: u,
|
|
1804
|
+
isHorizontal: d,
|
|
1805
|
+
...f
|
|
1803
1806
|
} = c;
|
|
1804
|
-
return /* @__PURE__ */
|
|
1807
|
+
return /* @__PURE__ */ Mt(st, { ...{
|
|
1805
1808
|
desktopSpan: s,
|
|
1806
1809
|
tabletLandscapeSpan: l,
|
|
1807
1810
|
tabletPortraitSpan: i,
|
|
1808
|
-
mobileSpan:
|
|
1809
|
-
isHorizontal:
|
|
1810
|
-
}, key: `${c.name}-${n}` },
|
|
1811
|
+
mobileSpan: u,
|
|
1812
|
+
isHorizontal: d
|
|
1813
|
+
}, key: `${c.name}-${n}` }, Ht(f, t));
|
|
1811
1814
|
});
|
|
1812
|
-
return /* @__PURE__ */ o(
|
|
1813
|
-
},
|
|
1815
|
+
return /* @__PURE__ */ o(it, { gutters: a, children: r });
|
|
1816
|
+
}, Gt = N.forwardRef(
|
|
1814
1817
|
({ spacing: e = "small", fields: t, onFieldsChange: a, children: r, errorText: c, ...n }, s) => {
|
|
1815
1818
|
let l = [];
|
|
1816
1819
|
e && l.push(`spacing-${e}`);
|
|
1817
|
-
const i = (
|
|
1820
|
+
const i = (d, f) => {
|
|
1818
1821
|
a && a({
|
|
1819
|
-
[
|
|
1822
|
+
[d]: f
|
|
1820
1823
|
});
|
|
1821
|
-
},
|
|
1824
|
+
}, u = t != null && t.length ? _t(t, i, e) : r;
|
|
1822
1825
|
return /* @__PURE__ */ I(
|
|
1823
1826
|
D,
|
|
1824
1827
|
{
|
|
@@ -1828,15 +1831,15 @@ const Wt = {
|
|
|
1828
1831
|
classNames: l,
|
|
1829
1832
|
...n,
|
|
1830
1833
|
children: [
|
|
1831
|
-
|
|
1832
|
-
c && /* @__PURE__ */ o(
|
|
1834
|
+
u,
|
|
1835
|
+
c && /* @__PURE__ */ o(et, { kind: "error", children: c })
|
|
1833
1836
|
]
|
|
1834
1837
|
}
|
|
1835
1838
|
);
|
|
1836
1839
|
}
|
|
1837
1840
|
);
|
|
1838
|
-
|
|
1839
|
-
const
|
|
1841
|
+
Gt.displayName = "Form";
|
|
1842
|
+
const Kt = N.forwardRef(
|
|
1840
1843
|
({
|
|
1841
1844
|
isJoint: e,
|
|
1842
1845
|
equalWidthForChildren: t,
|
|
@@ -1844,28 +1847,32 @@ const Gt = N.forwardRef(
|
|
|
1844
1847
|
children: r,
|
|
1845
1848
|
legend: c,
|
|
1846
1849
|
id: n,
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1850
|
+
columns: s,
|
|
1851
|
+
style: l,
|
|
1852
|
+
...i
|
|
1853
|
+
}, u) => {
|
|
1854
|
+
const d = n || `form-group-${Math.random().toString(36).substring(2, 9)}`;
|
|
1855
|
+
let f = [];
|
|
1856
|
+
return e && f.push("is-joint"), t && f.push("equal-width-for-children"), a && f.push("retain-layout"), s && f.push("with-columns"), /* @__PURE__ */ o(
|
|
1852
1857
|
D,
|
|
1853
1858
|
{
|
|
1854
1859
|
as: "div",
|
|
1855
1860
|
"data-form-item-group": !0,
|
|
1856
|
-
|
|
1857
|
-
|
|
1861
|
+
"data-form-spaced": !0,
|
|
1862
|
+
ref: u,
|
|
1863
|
+
id: d,
|
|
1858
1864
|
role: "group",
|
|
1859
1865
|
"aria-label": c,
|
|
1860
|
-
classNames:
|
|
1861
|
-
|
|
1866
|
+
classNames: f,
|
|
1867
|
+
style: s ? { gridTemplateColumns: `repeat(${s}, 1fr)`, ...l } : l,
|
|
1868
|
+
...i,
|
|
1862
1869
|
children: r
|
|
1863
1870
|
}
|
|
1864
1871
|
);
|
|
1865
1872
|
}
|
|
1866
1873
|
);
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1874
|
+
Kt.displayName = "FormItemGroup";
|
|
1875
|
+
const jt = (e, t) => {
|
|
1869
1876
|
const a = [], r = e.length, c = t.length;
|
|
1870
1877
|
if (r === 0) return c;
|
|
1871
1878
|
if (c === 0) return r;
|
|
@@ -1884,28 +1891,28 @@ const Kt = (e, t) => {
|
|
|
1884
1891
|
// Substitution
|
|
1885
1892
|
);
|
|
1886
1893
|
return a[c][r];
|
|
1887
|
-
},
|
|
1894
|
+
}, Xt = (e, t) => {
|
|
1888
1895
|
let a = 0, r = 0;
|
|
1889
1896
|
for (; a < e.length && r < t.length; )
|
|
1890
1897
|
e[a] === t[r] && a++, r++;
|
|
1891
1898
|
return a === e.length;
|
|
1892
|
-
},
|
|
1899
|
+
}, Ut = (e) => e.split(/[\s\-_]+/).map((t) => t.slice(0, 2)).join("").toLowerCase(), qt = (e, t) => {
|
|
1893
1900
|
if (!t) return e;
|
|
1894
1901
|
const a = t.toLowerCase().trim(), r = Math.floor(a.length / 2);
|
|
1895
1902
|
return e.map((n) => {
|
|
1896
|
-
const s = n.label.toLowerCase(), l =
|
|
1897
|
-
(
|
|
1898
|
-
),
|
|
1903
|
+
const s = n.label.toLowerCase(), l = jt(a, s), i = s.split(/[\s\-_]+/), u = a.split(/[\s\-_]+/), d = s.includes(a) || u.every(
|
|
1904
|
+
($) => i.some((v) => v.startsWith($))
|
|
1905
|
+
), f = Ut(s), p = Xt(a, f);
|
|
1899
1906
|
return {
|
|
1900
1907
|
option: n,
|
|
1901
1908
|
distance: l,
|
|
1902
|
-
isPartialMatch:
|
|
1903
|
-
isAcronymMatch:
|
|
1909
|
+
isPartialMatch: d,
|
|
1910
|
+
isAcronymMatch: p
|
|
1904
1911
|
};
|
|
1905
1912
|
}).filter(
|
|
1906
1913
|
({ distance: n, isPartialMatch: s, isAcronymMatch: l }) => s || l || n <= r
|
|
1907
1914
|
).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);
|
|
1908
|
-
},
|
|
1915
|
+
}, Yt = N.forwardRef(
|
|
1909
1916
|
({
|
|
1910
1917
|
options: e = [],
|
|
1911
1918
|
label: t,
|
|
@@ -1916,76 +1923,76 @@ const Kt = (e, t) => {
|
|
|
1916
1923
|
defaultValue: s,
|
|
1917
1924
|
onChange: l,
|
|
1918
1925
|
disabled: i,
|
|
1919
|
-
selectionLimit:
|
|
1920
|
-
allowMultiSelect:
|
|
1921
|
-
allowCustomEntries:
|
|
1922
|
-
isLoading:
|
|
1923
|
-
value:
|
|
1926
|
+
selectionLimit: u,
|
|
1927
|
+
allowMultiSelect: d = !1,
|
|
1928
|
+
allowCustomEntries: f = !1,
|
|
1929
|
+
isLoading: p,
|
|
1930
|
+
value: $,
|
|
1924
1931
|
isFullWidth: v,
|
|
1925
1932
|
className: k,
|
|
1926
1933
|
required: m,
|
|
1927
1934
|
size: A,
|
|
1928
1935
|
...y
|
|
1929
1936
|
}, R) => {
|
|
1930
|
-
const [T,
|
|
1931
|
-
|
|
1937
|
+
const [T, F] = j(!1), [V, E] = j(""), [P, g] = j(-1), [L, _] = j(null), [S, w] = j([]), [z, C] = j(!1);
|
|
1938
|
+
U(() => {
|
|
1932
1939
|
s && l && l(s);
|
|
1933
1940
|
}, []);
|
|
1934
|
-
const B = N.useMemo(() => [...e], [e]), b = Y(null),
|
|
1941
|
+
const B = N.useMemo(() => [...e], [e]), b = Y(null), x = Y(null), h = Y(null), M = n || `listbox-${Math.random().toString(36).substring(2, 9)}`, O = qt(B, V), H = (W) => {
|
|
1935
1942
|
if (W.disabled) return;
|
|
1936
1943
|
let X;
|
|
1937
|
-
if (
|
|
1944
|
+
if (d) {
|
|
1938
1945
|
if (S.some((se) => se.value === W.value))
|
|
1939
1946
|
X = S.filter((se) => se.value !== W.value);
|
|
1940
1947
|
else {
|
|
1941
|
-
if (
|
|
1948
|
+
if (u && S.length >= u)
|
|
1942
1949
|
return;
|
|
1943
1950
|
X = [...S, W];
|
|
1944
1951
|
}
|
|
1945
1952
|
w(X), l == null || l(X.map((se) => se.value));
|
|
1946
1953
|
} else
|
|
1947
|
-
X = [W], _(W), w(X), l == null || l(W.value),
|
|
1954
|
+
X = [W], _(W), w(X), l == null || l(W.value), F(!1);
|
|
1948
1955
|
E(""), g(-1);
|
|
1949
1956
|
}, Z = (W) => {
|
|
1950
1957
|
E(W);
|
|
1951
1958
|
}, le = () => {
|
|
1952
|
-
if (!
|
|
1953
|
-
const W =
|
|
1959
|
+
if (!V.trim() || !f) return;
|
|
1960
|
+
const W = V.trim(), X = {
|
|
1954
1961
|
value: W,
|
|
1955
1962
|
label: W
|
|
1956
1963
|
};
|
|
1957
1964
|
B.some((Q) => Q.value === W) || H(X);
|
|
1958
1965
|
}, te = (W) => {
|
|
1959
|
-
if (
|
|
1966
|
+
if (d) {
|
|
1960
1967
|
const X = S.filter((Q) => Q.value !== W);
|
|
1961
1968
|
w(X), l == null || l(X.map((Q) => Q.value));
|
|
1962
1969
|
} else
|
|
1963
1970
|
_(null), w([]), l == null || l("");
|
|
1964
1971
|
}, ae = () => {
|
|
1965
|
-
_(null), w([]), l == null || l(
|
|
1972
|
+
_(null), w([]), l == null || l(d ? [] : "");
|
|
1966
1973
|
}, re = (W) => {
|
|
1967
1974
|
switch (W.key) {
|
|
1968
1975
|
case "ArrowDown":
|
|
1969
1976
|
W.preventDefault(), T ? g(
|
|
1970
1977
|
(X) => X < O.length - 1 ? X + 1 : X
|
|
1971
|
-
) : (
|
|
1978
|
+
) : (F(!0), g(0));
|
|
1972
1979
|
break;
|
|
1973
1980
|
case "ArrowUp":
|
|
1974
1981
|
W.preventDefault(), g((X) => X > 0 ? X - 1 : X);
|
|
1975
1982
|
break;
|
|
1976
1983
|
case "Enter":
|
|
1977
|
-
if (W.preventDefault(),
|
|
1984
|
+
if (W.preventDefault(), f && V.trim()) {
|
|
1978
1985
|
const X = O.find(
|
|
1979
|
-
(Q) => Q.label.toLowerCase() ===
|
|
1986
|
+
(Q) => Q.label.toLowerCase() === V.trim().toLowerCase()
|
|
1980
1987
|
);
|
|
1981
1988
|
X ? H(X) : le();
|
|
1982
1989
|
} else P >= 0 && O[P] && H(O[P]);
|
|
1983
1990
|
break;
|
|
1984
1991
|
case "Escape":
|
|
1985
|
-
W.preventDefault(),
|
|
1992
|
+
W.preventDefault(), F(!1), g(-1);
|
|
1986
1993
|
break;
|
|
1987
1994
|
case " ":
|
|
1988
|
-
T || (W.preventDefault(),
|
|
1995
|
+
T || (W.preventDefault(), F(!0), g(0));
|
|
1989
1996
|
break;
|
|
1990
1997
|
case "Home":
|
|
1991
1998
|
T && (W.preventDefault(), g(0));
|
|
@@ -1995,23 +2002,23 @@ const Kt = (e, t) => {
|
|
|
1995
2002
|
break;
|
|
1996
2003
|
}
|
|
1997
2004
|
};
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
}),
|
|
2001
|
-
T &&
|
|
2002
|
-
}, [T]),
|
|
2005
|
+
ze(b, () => {
|
|
2006
|
+
F(!1), g(-1);
|
|
2007
|
+
}), U(() => {
|
|
2008
|
+
T && x.current && x.current.focus();
|
|
2009
|
+
}, [T]), U(() => {
|
|
2003
2010
|
if (T && b.current) {
|
|
2004
2011
|
const W = b.current.getBoundingClientRect(), X = window.innerHeight, Q = 300, se = X - W.bottom, $e = W.top;
|
|
2005
2012
|
C(se < Q && $e > se);
|
|
2006
2013
|
} else
|
|
2007
2014
|
C(!1);
|
|
2008
|
-
}, [T]),
|
|
2015
|
+
}, [T]), U(() => {
|
|
2009
2016
|
if (P >= 0) {
|
|
2010
2017
|
const W = document.querySelector(`[data-index="${P}"]`);
|
|
2011
2018
|
W == null || W.scrollIntoView({ block: "nearest" });
|
|
2012
2019
|
}
|
|
2013
2020
|
}, [P]);
|
|
2014
|
-
const { wrapperProps: we, inputProps:
|
|
2021
|
+
const { wrapperProps: we, inputProps: ge } = ie(y);
|
|
2015
2022
|
return /* @__PURE__ */ o(
|
|
2016
2023
|
ee,
|
|
2017
2024
|
{
|
|
@@ -2031,13 +2038,13 @@ const Kt = (e, t) => {
|
|
|
2031
2038
|
classNames: ["list-box-wrapper", i ? "disabled" : "", k || ""],
|
|
2032
2039
|
ref: b,
|
|
2033
2040
|
isFullWidth: v,
|
|
2034
|
-
...
|
|
2041
|
+
...ge,
|
|
2035
2042
|
children: [
|
|
2036
2043
|
/* @__PURE__ */ I(
|
|
2037
2044
|
K,
|
|
2038
2045
|
{
|
|
2039
2046
|
className: "list-box-input-wrapper",
|
|
2040
|
-
onClick: () => !i &&
|
|
2047
|
+
onClick: () => !i && F(!T),
|
|
2041
2048
|
role: "combobox",
|
|
2042
2049
|
"aria-haspopup": "listbox",
|
|
2043
2050
|
"aria-expanded": T,
|
|
@@ -2045,7 +2052,7 @@ const Kt = (e, t) => {
|
|
|
2045
2052
|
"aria-owns": `${M}-listbox`,
|
|
2046
2053
|
tabIndex: i ? -1 : 0,
|
|
2047
2054
|
children: [
|
|
2048
|
-
|
|
2055
|
+
d ? /* @__PURE__ */ I(Me, { children: [
|
|
2049
2056
|
S.length > 0 ? /* @__PURE__ */ I(K, { className: "options-wrapper", children: [
|
|
2050
2057
|
/* @__PURE__ */ o(K, { className: "options-list", children: S.map((W) => /* @__PURE__ */ o(
|
|
2051
2058
|
Be,
|
|
@@ -2059,11 +2066,11 @@ const Kt = (e, t) => {
|
|
|
2059
2066
|
},
|
|
2060
2067
|
W.value
|
|
2061
2068
|
)) }),
|
|
2062
|
-
|
|
2069
|
+
u && S.length >= u && /* @__PURE__ */ I(J, { className: "options-limit-warning", textColour: "red", size: "tiny", children: [
|
|
2063
2070
|
"You can choose only ",
|
|
2064
|
-
|
|
2071
|
+
u,
|
|
2065
2072
|
" option",
|
|
2066
|
-
|
|
2073
|
+
u === 1 ? "" : "s"
|
|
2067
2074
|
] })
|
|
2068
2075
|
] }) : /* @__PURE__ */ o("span", { className: "placeholder", children: c }),
|
|
2069
2076
|
S.length > 0 && /* @__PURE__ */ o(
|
|
@@ -2094,13 +2101,13 @@ const Kt = (e, t) => {
|
|
|
2094
2101
|
children: [
|
|
2095
2102
|
/* @__PURE__ */ I(K, { className: "list-box-search-wrapper", children: [
|
|
2096
2103
|
/* @__PURE__ */ o(
|
|
2097
|
-
|
|
2104
|
+
Pe,
|
|
2098
2105
|
{
|
|
2099
2106
|
type: "text",
|
|
2100
|
-
ref:
|
|
2107
|
+
ref: x,
|
|
2101
2108
|
className: "list-box-search",
|
|
2102
|
-
placeholder:
|
|
2103
|
-
value:
|
|
2109
|
+
placeholder: f ? "Type to search or add new" : "Search",
|
|
2110
|
+
value: V,
|
|
2104
2111
|
onChange: Z,
|
|
2105
2112
|
onKeyDown: re,
|
|
2106
2113
|
"aria-controls": `${M}-listbox`,
|
|
@@ -2108,7 +2115,7 @@ const Kt = (e, t) => {
|
|
|
2108
2115
|
isFullWidth: !0
|
|
2109
2116
|
}
|
|
2110
2117
|
),
|
|
2111
|
-
|
|
2118
|
+
f && V.trim() && !S.some((W) => W.label.toLowerCase() === V.trim().toLowerCase()) && /* @__PURE__ */ o(
|
|
2112
2119
|
"kbd",
|
|
2113
2120
|
{
|
|
2114
2121
|
className: "list-box-enter-key",
|
|
@@ -2124,8 +2131,8 @@ const Kt = (e, t) => {
|
|
|
2124
2131
|
id: `${M}-listbox`,
|
|
2125
2132
|
className: "list-box-options",
|
|
2126
2133
|
role: "listbox",
|
|
2127
|
-
"aria-multiselectable":
|
|
2128
|
-
"aria-busy":
|
|
2134
|
+
"aria-multiselectable": d,
|
|
2135
|
+
"aria-busy": p,
|
|
2129
2136
|
tabIndex: -1,
|
|
2130
2137
|
children: O.length > 0 ? O.map((W, X) => /* @__PURE__ */ o(
|
|
2131
2138
|
"li",
|
|
@@ -2147,7 +2154,7 @@ const Kt = (e, t) => {
|
|
|
2147
2154
|
className: "list-box-option disabled",
|
|
2148
2155
|
role: "alert",
|
|
2149
2156
|
"aria-live": "polite",
|
|
2150
|
-
children:
|
|
2157
|
+
children: f ? "Type and press Enter to add new option" : "No matches found"
|
|
2151
2158
|
}
|
|
2152
2159
|
)
|
|
2153
2160
|
}
|
|
@@ -2162,11 +2169,11 @@ const Kt = (e, t) => {
|
|
|
2162
2169
|
);
|
|
2163
2170
|
}
|
|
2164
2171
|
);
|
|
2165
|
-
|
|
2166
|
-
function
|
|
2172
|
+
Yt.displayName = "ListBox";
|
|
2173
|
+
function qe(e, t) {
|
|
2167
2174
|
return (t === "alphanumeric" ? /^[a-zA-Z0-9]+$/i : /^[0-9]+$/).test(e);
|
|
2168
2175
|
}
|
|
2169
|
-
const
|
|
2176
|
+
const Jt = N.forwardRef(
|
|
2170
2177
|
({
|
|
2171
2178
|
numberOfFields: e,
|
|
2172
2179
|
onChange: t,
|
|
@@ -2177,16 +2184,16 @@ const Yt = N.forwardRef(
|
|
|
2177
2184
|
pasteFromClipboard: s = "enabled",
|
|
2178
2185
|
focusFirstInputOnReset: l = !0,
|
|
2179
2186
|
isFullWidth: i,
|
|
2180
|
-
ariaLabel:
|
|
2181
|
-
...
|
|
2182
|
-
},
|
|
2183
|
-
const
|
|
2187
|
+
ariaLabel: u,
|
|
2188
|
+
...d
|
|
2189
|
+
}, f) => {
|
|
2190
|
+
const p = Y(null), [$, v] = j([]), [k, m] = j([]), [A, y] = j(!0), [R, T] = j(-1), F = d.id || `pin-input-${Math.random().toString(36).substring(2, 9)}`, V = u || "Enter verification code", E = G(
|
|
2184
2191
|
(B) => {
|
|
2185
|
-
var
|
|
2186
|
-
const b =
|
|
2187
|
-
(
|
|
2192
|
+
var x;
|
|
2193
|
+
const b = $[B];
|
|
2194
|
+
(x = b == null ? void 0 : b.current) == null || x.focus();
|
|
2188
2195
|
},
|
|
2189
|
-
[
|
|
2196
|
+
[$]
|
|
2190
2197
|
), P = G(
|
|
2191
2198
|
(B) => {
|
|
2192
2199
|
if (!A) return;
|
|
@@ -2198,22 +2205,22 @@ const Yt = N.forwardRef(
|
|
|
2198
2205
|
m(Array(e).fill("")), t == null || t(""), l && (E(0), T(0));
|
|
2199
2206
|
}, [e, t, E, l]), L = G(
|
|
2200
2207
|
(B, b) => {
|
|
2201
|
-
const
|
|
2202
|
-
|
|
2208
|
+
const x = [...k];
|
|
2209
|
+
x[b] = B, m(x), t == null || t(x.join("")), B !== "" && x.length === e && x.every((M) => M != null && M !== "") && b === e - 1 || (y(!0), P(b));
|
|
2203
2210
|
},
|
|
2204
2211
|
[P, e, t, k]
|
|
2205
2212
|
), _ = G((B, b) => {
|
|
2206
2213
|
var M;
|
|
2207
|
-
const
|
|
2208
|
-
if (
|
|
2214
|
+
const x = typeof B == "string" ? B : B.target.value, h = k[b];
|
|
2215
|
+
if (x === "") {
|
|
2209
2216
|
L("", b);
|
|
2210
2217
|
return;
|
|
2211
2218
|
}
|
|
2212
|
-
if (
|
|
2213
|
-
if (
|
|
2219
|
+
if (x.length > 1 && b < e - 1) {
|
|
2220
|
+
if (qe(x, a)) {
|
|
2214
2221
|
let O = [];
|
|
2215
|
-
const H =
|
|
2216
|
-
h === "" ? O = H.filter((te, ae) => b + ae < e) : ((M =
|
|
2222
|
+
const H = x.split("");
|
|
2223
|
+
h === "" ? O = H.filter((te, ae) => b + ae < e) : ((M = $[b].current) == null ? void 0 : M.selectionEnd) === x.length ? O = H.filter((ae, re) => re > 0 && b + re - 1 < e) : O = H.filter((ae, re) => re < x.length - 1 && b + re < e);
|
|
2217
2224
|
const Z = k.map(
|
|
2218
2225
|
(te, ae) => ae >= b && ae < b + O.length ? O[ae - b] : te
|
|
2219
2226
|
);
|
|
@@ -2222,11 +2229,11 @@ const Yt = N.forwardRef(
|
|
|
2222
2229
|
E(le);
|
|
2223
2230
|
}
|
|
2224
2231
|
} else {
|
|
2225
|
-
let O =
|
|
2226
|
-
(h == null ? void 0 : h.length) > 0 && (O =
|
|
2232
|
+
let O = x;
|
|
2233
|
+
(h == null ? void 0 : h.length) > 0 && (O = x.charAt(x.length - 1)), qe(O, a) && L(O, b);
|
|
2227
2234
|
}
|
|
2228
|
-
}, [e, t, L, a, k, E,
|
|
2229
|
-
var
|
|
2235
|
+
}, [e, t, L, a, k, E, $]), S = G((B, b) => {
|
|
2236
|
+
var x;
|
|
2230
2237
|
if (B.key === "Backspace")
|
|
2231
2238
|
if (B.target.value === "") {
|
|
2232
2239
|
if (b > 0) {
|
|
@@ -2235,8 +2242,8 @@ const Yt = N.forwardRef(
|
|
|
2235
2242
|
}
|
|
2236
2243
|
} else
|
|
2237
2244
|
y(!1);
|
|
2238
|
-
else B.key === "Escape" ? ((
|
|
2239
|
-
}, [E, L,
|
|
2245
|
+
else B.key === "Escape" ? ((x = $[b].current) == null || x.blur(), C()) : B.key === "ArrowRight" ? b < e - 1 && E(b + 1) : B.key === "ArrowLeft" && b > 0 && E(b - 1);
|
|
2246
|
+
}, [E, L, $, e]), w = G((B, b) => {
|
|
2240
2247
|
T(b);
|
|
2241
2248
|
}, []), z = G((B) => {
|
|
2242
2249
|
const b = B.target;
|
|
@@ -2246,16 +2253,16 @@ const Yt = N.forwardRef(
|
|
|
2246
2253
|
}, []), C = G(() => {
|
|
2247
2254
|
T(-1);
|
|
2248
2255
|
}, []);
|
|
2249
|
-
return
|
|
2250
|
-
v((B) => Array(e).fill(0).map((
|
|
2256
|
+
return U(() => {
|
|
2257
|
+
v((B) => Array(e).fill(0).map((x, h) => {
|
|
2251
2258
|
var O;
|
|
2252
|
-
const M = B[h] ||
|
|
2259
|
+
const M = B[h] || Et();
|
|
2253
2260
|
return n && h === 0 && ((O = M.current) == null || O.focus()), M;
|
|
2254
2261
|
}));
|
|
2255
|
-
}, [e, n]),
|
|
2256
|
-
|
|
2262
|
+
}, [e, n]), Qe(
|
|
2263
|
+
f,
|
|
2257
2264
|
() => ({
|
|
2258
|
-
...
|
|
2265
|
+
...p.current,
|
|
2259
2266
|
reset: g
|
|
2260
2267
|
}),
|
|
2261
2268
|
[g]
|
|
@@ -2263,32 +2270,32 @@ const Yt = N.forwardRef(
|
|
|
2263
2270
|
K,
|
|
2264
2271
|
{
|
|
2265
2272
|
"data-pin-input-field": !0,
|
|
2266
|
-
ref:
|
|
2273
|
+
ref: p,
|
|
2267
2274
|
classNames: i ? ["full-width"] : [],
|
|
2268
2275
|
role: "group",
|
|
2269
|
-
"aria-label":
|
|
2270
|
-
"aria-required":
|
|
2271
|
-
...
|
|
2276
|
+
"aria-label": V,
|
|
2277
|
+
"aria-required": d.required,
|
|
2278
|
+
...d,
|
|
2272
2279
|
children: Array.from({ length: e }, (B, b) => /* @__PURE__ */ o(
|
|
2273
|
-
|
|
2280
|
+
Pe,
|
|
2274
2281
|
{
|
|
2275
|
-
id: `${
|
|
2276
|
-
ref:
|
|
2282
|
+
id: `${F}-${b}`,
|
|
2283
|
+
ref: $[b],
|
|
2277
2284
|
type: r ? "password" : a === "number" ? "tel" : "text",
|
|
2278
2285
|
inputMode: a === "number" ? "numeric" : "text",
|
|
2279
|
-
onChange: (
|
|
2280
|
-
onKeyDown: (
|
|
2281
|
-
onFocus: (
|
|
2286
|
+
onChange: (x) => _(x, b),
|
|
2287
|
+
onKeyDown: (x) => S(x, b),
|
|
2288
|
+
onFocus: (x) => w(x, b),
|
|
2282
2289
|
onSelect: z,
|
|
2283
2290
|
onBlur: C,
|
|
2284
2291
|
placeholder: R !== b ? "⦁" : void 0,
|
|
2285
2292
|
autoComplete: c ? "one-time-code" : "off",
|
|
2286
2293
|
value: k[b] || "",
|
|
2287
2294
|
autoFocus: n && b === 0,
|
|
2288
|
-
onCopy: (
|
|
2289
|
-
onPaste: (
|
|
2295
|
+
onCopy: (x) => s === "disabled" && x.preventDefault(),
|
|
2296
|
+
onPaste: (x) => s === "disabled" && x.preventDefault(),
|
|
2290
2297
|
"aria-label": `Digit ${b + 1} of ${e}`,
|
|
2291
|
-
"aria-required":
|
|
2298
|
+
"aria-required": d.required
|
|
2292
2299
|
},
|
|
2293
2300
|
b
|
|
2294
2301
|
))
|
|
@@ -2296,8 +2303,8 @@ const Yt = N.forwardRef(
|
|
|
2296
2303
|
);
|
|
2297
2304
|
}
|
|
2298
2305
|
);
|
|
2299
|
-
|
|
2300
|
-
const
|
|
2306
|
+
Jt.displayName = "PinInputField";
|
|
2307
|
+
const Zt = N.forwardRef(
|
|
2301
2308
|
({
|
|
2302
2309
|
id: e,
|
|
2303
2310
|
name: t,
|
|
@@ -2308,40 +2315,40 @@ const Jt = N.forwardRef(
|
|
|
2308
2315
|
defaultValue: s,
|
|
2309
2316
|
value: l,
|
|
2310
2317
|
required: i,
|
|
2311
|
-
onChange:
|
|
2312
|
-
size:
|
|
2313
|
-
bgColour:
|
|
2314
|
-
disabled:
|
|
2315
|
-
|
|
2318
|
+
onChange: u,
|
|
2319
|
+
size: d = "medium",
|
|
2320
|
+
bgColour: f,
|
|
2321
|
+
disabled: p,
|
|
2322
|
+
...$
|
|
2316
2323
|
}, v) => {
|
|
2317
2324
|
const k = ye(() => t || e, [t, e]), m = Y(null), [A, y] = j({
|
|
2318
2325
|
width: 0,
|
|
2319
2326
|
transform: "translateX(0)"
|
|
2320
|
-
}), [R, T] = j(!1), [
|
|
2327
|
+
}), [R, T] = j(!1), [F, V] = j(0), [E, P] = j(0), g = Y([]), L = G(() => {
|
|
2321
2328
|
if (!m.current) return;
|
|
2322
|
-
const
|
|
2323
|
-
if (
|
|
2324
|
-
const M =
|
|
2329
|
+
const x = m.current, h = x.closest("[data-input-wrapper]");
|
|
2330
|
+
if (x && h) {
|
|
2331
|
+
const M = x.scrollWidth, O = h.clientWidth, H = M > O;
|
|
2325
2332
|
T(H), P(H ? M - O : 0);
|
|
2326
2333
|
}
|
|
2327
2334
|
}, []);
|
|
2328
|
-
|
|
2329
|
-
const
|
|
2330
|
-
if (
|
|
2335
|
+
U(() => {
|
|
2336
|
+
const x = m.current;
|
|
2337
|
+
if (!x) return;
|
|
2331
2338
|
L();
|
|
2332
2339
|
const h = new ResizeObserver(() => {
|
|
2333
2340
|
L();
|
|
2334
2341
|
});
|
|
2335
|
-
return h.observe(
|
|
2336
|
-
}, [L]),
|
|
2337
|
-
const
|
|
2338
|
-
if (
|
|
2342
|
+
return h.observe(x), x.closest("[data-input-wrapper]") && h.observe(x.closest("[data-input-wrapper]")), () => h.disconnect();
|
|
2343
|
+
}, [L]), U(() => {
|
|
2344
|
+
const x = n.findIndex((h) => h.value === l);
|
|
2345
|
+
if (x >= 0) {
|
|
2339
2346
|
const h = () => {
|
|
2340
|
-
const M = g.current[
|
|
2347
|
+
const M = g.current[x];
|
|
2341
2348
|
if (M) {
|
|
2342
2349
|
const O = M.offsetWidth;
|
|
2343
2350
|
let H = "translateX(0)";
|
|
2344
|
-
|
|
2351
|
+
x > 0 && (H = `translateX(${g.current.slice(0, x).reduce((le, te) => le + ((te == null ? void 0 : te.offsetWidth) || 0), 0)}px)`), y({ width: O, transform: H });
|
|
2345
2352
|
}
|
|
2346
2353
|
};
|
|
2347
2354
|
if (document.fonts && document.fonts.ready)
|
|
@@ -2356,18 +2363,18 @@ const Jt = N.forwardRef(
|
|
|
2356
2363
|
}
|
|
2357
2364
|
}
|
|
2358
2365
|
}, [l, n]);
|
|
2359
|
-
const _ = (
|
|
2360
|
-
|
|
2361
|
-
}, { wrapperProps: S, inputProps: w } = ie(
|
|
2366
|
+
const _ = (x) => {
|
|
2367
|
+
u == null || u(x.target.value);
|
|
2368
|
+
}, { wrapperProps: S, inputProps: w } = ie($), z = G((x) => {
|
|
2362
2369
|
const h = m.current;
|
|
2363
2370
|
if (!h) return;
|
|
2364
2371
|
const O = h.clientWidth * 0.8;
|
|
2365
|
-
let H =
|
|
2366
|
-
|
|
2372
|
+
let H = x === "right" ? Math.min(F + O, E) : Math.max(F - O, 0);
|
|
2373
|
+
V(H), requestAnimationFrame(() => {
|
|
2367
2374
|
h.style.transform = `translateX(-${H}px)`;
|
|
2368
2375
|
});
|
|
2369
|
-
}, [
|
|
2370
|
-
return
|
|
2376
|
+
}, [F, E]), C = F > 0, B = F < E, b = [];
|
|
2377
|
+
return d && b.push(`size-${d}`), /* @__PURE__ */ o(
|
|
2371
2378
|
ee,
|
|
2372
2379
|
{
|
|
2373
2380
|
label: a,
|
|
@@ -2375,7 +2382,7 @@ const Jt = N.forwardRef(
|
|
|
2375
2382
|
helpText: r,
|
|
2376
2383
|
errorText: c,
|
|
2377
2384
|
required: i,
|
|
2378
|
-
size:
|
|
2385
|
+
size: d,
|
|
2379
2386
|
...S,
|
|
2380
2387
|
children: /* @__PURE__ */ I(
|
|
2381
2388
|
D,
|
|
@@ -2412,8 +2419,8 @@ const Jt = N.forwardRef(
|
|
|
2412
2419
|
}
|
|
2413
2420
|
}
|
|
2414
2421
|
),
|
|
2415
|
-
n.map((
|
|
2416
|
-
const { id: M, ...O } =
|
|
2422
|
+
n.map((x, h) => {
|
|
2423
|
+
const { id: M, ...O } = x, H = M || `${e}-option-${h}`;
|
|
2417
2424
|
return /* @__PURE__ */ I(N.Fragment, { children: [
|
|
2418
2425
|
/* @__PURE__ */ o(
|
|
2419
2426
|
"input",
|
|
@@ -2422,8 +2429,8 @@ const Jt = N.forwardRef(
|
|
|
2422
2429
|
...O,
|
|
2423
2430
|
id: H,
|
|
2424
2431
|
name: k,
|
|
2425
|
-
checked: l ===
|
|
2426
|
-
disabled:
|
|
2432
|
+
checked: l === x.value,
|
|
2433
|
+
disabled: p || x.disabled,
|
|
2427
2434
|
onChange: _
|
|
2428
2435
|
}
|
|
2429
2436
|
),
|
|
@@ -2434,7 +2441,7 @@ const Jt = N.forwardRef(
|
|
|
2434
2441
|
g.current[h] = Z;
|
|
2435
2442
|
},
|
|
2436
2443
|
htmlFor: H,
|
|
2437
|
-
children:
|
|
2444
|
+
children: x.label
|
|
2438
2445
|
}
|
|
2439
2446
|
)
|
|
2440
2447
|
] }, H);
|
|
@@ -2458,15 +2465,15 @@ const Jt = N.forwardRef(
|
|
|
2458
2465
|
);
|
|
2459
2466
|
}
|
|
2460
2467
|
);
|
|
2461
|
-
|
|
2462
|
-
function
|
|
2468
|
+
Zt.displayName = "RadioTabGroup";
|
|
2469
|
+
function Qt(e) {
|
|
2463
2470
|
return Array.isArray(e.value);
|
|
2464
2471
|
}
|
|
2465
|
-
const
|
|
2466
|
-
(e, t) =>
|
|
2472
|
+
const ea = N.forwardRef(
|
|
2473
|
+
(e, t) => Qt(e) ? /* @__PURE__ */ o(ut, { ...e, forwardedRef: t }) : /* @__PURE__ */ o(dt, { ...e, forwardedRef: t })
|
|
2467
2474
|
);
|
|
2468
|
-
|
|
2469
|
-
const
|
|
2475
|
+
ea.displayName = "Range";
|
|
2476
|
+
const dt = ({
|
|
2470
2477
|
label: e,
|
|
2471
2478
|
helpText: t,
|
|
2472
2479
|
errorText: a,
|
|
@@ -2476,22 +2483,22 @@ const ct = ({
|
|
|
2476
2483
|
min: s = 0,
|
|
2477
2484
|
max: l = 100,
|
|
2478
2485
|
step: i = 1,
|
|
2479
|
-
id:
|
|
2480
|
-
disabled:
|
|
2481
|
-
size:
|
|
2482
|
-
...
|
|
2486
|
+
id: u,
|
|
2487
|
+
disabled: d,
|
|
2488
|
+
size: f,
|
|
2489
|
+
...p
|
|
2483
2490
|
}) => {
|
|
2484
|
-
const { wrapperProps:
|
|
2491
|
+
const { wrapperProps: $ } = ie(p), v = Y(null), k = Y(null), [m, A] = j(!1), [y, R] = j(!1), T = Math.max(s, Math.min(l, r)), F = G((S) => l <= s ? 0 : (Math.max(s, Math.min(l, S)) - s) / (l - s) * 100, [s, l]), V = G((S) => {
|
|
2485
2492
|
if (!k.current) return s;
|
|
2486
2493
|
const w = k.current.getBoundingClientRect(), z = Math.max(0, Math.min(1, (S - w.left) / w.width)), C = s + z * (l - s), B = Math.round(C / i) * i;
|
|
2487
2494
|
return Math.max(s, Math.min(l, B));
|
|
2488
2495
|
}, [s, l, i]), E = G((S) => {
|
|
2489
|
-
const w =
|
|
2496
|
+
const w = V(S);
|
|
2490
2497
|
n == null || n(w);
|
|
2491
|
-
}, [
|
|
2492
|
-
|
|
2493
|
-
}, [
|
|
2494
|
-
|
|
2498
|
+
}, [V, n]), P = G((S) => {
|
|
2499
|
+
d || (S.preventDefault(), A(!0), R(!0), E(S.clientX));
|
|
2500
|
+
}, [d, E]);
|
|
2501
|
+
U(() => {
|
|
2495
2502
|
if (!m) return;
|
|
2496
2503
|
const S = (z) => {
|
|
2497
2504
|
E(z.clientX);
|
|
@@ -2503,9 +2510,9 @@ const ct = ({
|
|
|
2503
2510
|
};
|
|
2504
2511
|
}, [m, E]);
|
|
2505
2512
|
const g = G((S) => {
|
|
2506
|
-
|
|
2507
|
-
}, [
|
|
2508
|
-
|
|
2513
|
+
d || (A(!0), R(!0), E(S.touches[0].clientX));
|
|
2514
|
+
}, [d, E]);
|
|
2515
|
+
U(() => {
|
|
2509
2516
|
if (!m) return;
|
|
2510
2517
|
const S = (z) => {
|
|
2511
2518
|
z.preventDefault(), E(z.touches[0].clientX);
|
|
@@ -2517,7 +2524,7 @@ const ct = ({
|
|
|
2517
2524
|
};
|
|
2518
2525
|
}, [m, E]);
|
|
2519
2526
|
const L = G((S) => {
|
|
2520
|
-
if (
|
|
2527
|
+
if (d) return;
|
|
2521
2528
|
let w = T;
|
|
2522
2529
|
switch (S.key) {
|
|
2523
2530
|
case "ArrowRight":
|
|
@@ -2544,17 +2551,17 @@ const ct = ({
|
|
|
2544
2551
|
return;
|
|
2545
2552
|
}
|
|
2546
2553
|
n == null || n(w);
|
|
2547
|
-
}, [
|
|
2554
|
+
}, [d, T, s, l, i, n]), _ = F(T);
|
|
2548
2555
|
return /* @__PURE__ */ o(
|
|
2549
2556
|
ee,
|
|
2550
2557
|
{
|
|
2551
2558
|
customLabel: e && /* @__PURE__ */ I(K, { "data-range-meta": !0, children: [
|
|
2552
2559
|
/* @__PURE__ */ o(
|
|
2553
|
-
|
|
2560
|
+
Ee,
|
|
2554
2561
|
{
|
|
2555
2562
|
className: "range-label",
|
|
2556
2563
|
label: e,
|
|
2557
|
-
htmlFor:
|
|
2564
|
+
htmlFor: u
|
|
2558
2565
|
}
|
|
2559
2566
|
),
|
|
2560
2567
|
/* @__PURE__ */ I(J, { className: "range-value", children: [
|
|
@@ -2564,16 +2571,16 @@ const ct = ({
|
|
|
2564
2571
|
] }),
|
|
2565
2572
|
helpText: t,
|
|
2566
2573
|
errorText: a,
|
|
2567
|
-
size:
|
|
2568
|
-
|
|
2574
|
+
size: f,
|
|
2575
|
+
...$,
|
|
2569
2576
|
children: /* @__PURE__ */ I(
|
|
2570
2577
|
K,
|
|
2571
2578
|
{
|
|
2572
2579
|
ref: k,
|
|
2573
2580
|
"data-range-single": !0,
|
|
2574
|
-
className:
|
|
2581
|
+
className: d ? "disabled" : "",
|
|
2575
2582
|
role: "group",
|
|
2576
|
-
"aria-labelledby": e ? `${
|
|
2583
|
+
"aria-labelledby": e ? `${u}-label` : void 0,
|
|
2577
2584
|
children: [
|
|
2578
2585
|
/* @__PURE__ */ o(K, { className: "range-track", "aria-hidden": "true" }),
|
|
2579
2586
|
/* @__PURE__ */ o(
|
|
@@ -2591,11 +2598,11 @@ const ct = ({
|
|
|
2591
2598
|
"button",
|
|
2592
2599
|
{
|
|
2593
2600
|
ref: v,
|
|
2594
|
-
id:
|
|
2601
|
+
id: u,
|
|
2595
2602
|
type: "button",
|
|
2596
2603
|
className: "range-thumb",
|
|
2597
2604
|
style: { left: `${_}%` },
|
|
2598
|
-
disabled:
|
|
2605
|
+
disabled: d,
|
|
2599
2606
|
onMouseDown: P,
|
|
2600
2607
|
onTouchStart: g,
|
|
2601
2608
|
onKeyDown: L,
|
|
@@ -2616,8 +2623,8 @@ const ct = ({
|
|
|
2616
2623
|
}
|
|
2617
2624
|
);
|
|
2618
2625
|
};
|
|
2619
|
-
|
|
2620
|
-
const
|
|
2626
|
+
dt.displayName = "SingleThumbRange";
|
|
2627
|
+
const ut = ({
|
|
2621
2628
|
label: e,
|
|
2622
2629
|
helpText: t,
|
|
2623
2630
|
errorText: a,
|
|
@@ -2627,16 +2634,16 @@ const dt = ({
|
|
|
2627
2634
|
min: s = 0,
|
|
2628
2635
|
max: l = 100,
|
|
2629
2636
|
step: i = 1,
|
|
2630
|
-
minLabel:
|
|
2631
|
-
maxLabel:
|
|
2632
|
-
id:
|
|
2633
|
-
disabled:
|
|
2634
|
-
size:
|
|
2637
|
+
minLabel: u = "Minimum value",
|
|
2638
|
+
maxLabel: d = "Maximum value",
|
|
2639
|
+
id: f,
|
|
2640
|
+
disabled: p,
|
|
2641
|
+
size: $,
|
|
2635
2642
|
...v
|
|
2636
2643
|
}) => {
|
|
2637
|
-
const { wrapperProps: k } = ie(v), [m, A] = r, y = Math.max(s, Math.min(l, m)), R = Math.max(s, Math.min(l, A)), T = Y(null),
|
|
2638
|
-
if (!
|
|
2639
|
-
const M =
|
|
2644
|
+
const { wrapperProps: k } = ie(v), [m, A] = r, y = Math.max(s, Math.min(l, m)), R = Math.max(s, Math.min(l, A)), T = Y(null), F = Y(null), V = Y(null), [E, P] = j(null), [g, L] = j(null), _ = G((h) => l <= s ? 0 : (Math.max(s, Math.min(l, h)) - s) / (l - s) * 100, [s, l]), S = G((h) => {
|
|
2645
|
+
if (!V.current) return s;
|
|
2646
|
+
const M = V.current.getBoundingClientRect(), O = Math.max(0, Math.min(1, (h - M.left) / M.width)), H = s + O * (l - s), Z = Math.round(H / i) * i;
|
|
2640
2647
|
return Math.max(s, Math.min(l, Z));
|
|
2641
2648
|
}, [s, l, i]), w = G((h, M) => {
|
|
2642
2649
|
const O = S(h);
|
|
@@ -2648,9 +2655,9 @@ const dt = ({
|
|
|
2648
2655
|
n == null || n([y, H]);
|
|
2649
2656
|
}
|
|
2650
2657
|
}, [S, y, R, i, n]), z = G((h) => (M) => {
|
|
2651
|
-
|
|
2652
|
-
}, [
|
|
2653
|
-
|
|
2658
|
+
p || (M.preventDefault(), P(h), L(h), w(M.clientX, h));
|
|
2659
|
+
}, [p, w]);
|
|
2660
|
+
U(() => {
|
|
2654
2661
|
if (!E) return;
|
|
2655
2662
|
const h = (O) => {
|
|
2656
2663
|
w(O.clientX, E);
|
|
@@ -2662,9 +2669,9 @@ const dt = ({
|
|
|
2662
2669
|
};
|
|
2663
2670
|
}, [E, w]);
|
|
2664
2671
|
const C = G((h) => (M) => {
|
|
2665
|
-
|
|
2666
|
-
}, [
|
|
2667
|
-
|
|
2672
|
+
p || (P(h), L(h), w(M.touches[0].clientX, h));
|
|
2673
|
+
}, [p, w]);
|
|
2674
|
+
U(() => {
|
|
2668
2675
|
if (!E) return;
|
|
2669
2676
|
const h = (O) => {
|
|
2670
2677
|
O.preventDefault(), w(O.touches[0].clientX, E);
|
|
@@ -2676,7 +2683,7 @@ const dt = ({
|
|
|
2676
2683
|
};
|
|
2677
2684
|
}, [E, w]);
|
|
2678
2685
|
const B = G((h) => (M) => {
|
|
2679
|
-
if (
|
|
2686
|
+
if (p) return;
|
|
2680
2687
|
const O = h === "min" ? y : R;
|
|
2681
2688
|
let H = O;
|
|
2682
2689
|
switch (M.key) {
|
|
@@ -2710,17 +2717,17 @@ const dt = ({
|
|
|
2710
2717
|
const Z = Math.max(H, y + i);
|
|
2711
2718
|
n == null || n([y, Z]);
|
|
2712
2719
|
}
|
|
2713
|
-
}, [
|
|
2720
|
+
}, [p, y, R, s, l, i, n]), b = _(y), x = _(R);
|
|
2714
2721
|
return /* @__PURE__ */ o(
|
|
2715
2722
|
ee,
|
|
2716
2723
|
{
|
|
2717
2724
|
customLabel: e && /* @__PURE__ */ I(K, { "data-range-meta": !0, children: [
|
|
2718
2725
|
/* @__PURE__ */ o(
|
|
2719
|
-
|
|
2726
|
+
Ee,
|
|
2720
2727
|
{
|
|
2721
2728
|
className: "range-label",
|
|
2722
2729
|
label: e,
|
|
2723
|
-
htmlFor:
|
|
2730
|
+
htmlFor: f
|
|
2724
2731
|
}
|
|
2725
2732
|
),
|
|
2726
2733
|
/* @__PURE__ */ I(J, { className: "range-value", children: [
|
|
@@ -2732,16 +2739,16 @@ const dt = ({
|
|
|
2732
2739
|
] }),
|
|
2733
2740
|
helpText: t,
|
|
2734
2741
|
errorText: a,
|
|
2735
|
-
size:
|
|
2742
|
+
size: $,
|
|
2736
2743
|
...k,
|
|
2737
2744
|
children: /* @__PURE__ */ I(
|
|
2738
2745
|
K,
|
|
2739
2746
|
{
|
|
2740
|
-
ref:
|
|
2747
|
+
ref: V,
|
|
2741
2748
|
"data-range-dual": !0,
|
|
2742
|
-
className:
|
|
2749
|
+
className: p ? "disabled" : "",
|
|
2743
2750
|
role: "group",
|
|
2744
|
-
"aria-labelledby": e ? `${
|
|
2751
|
+
"aria-labelledby": e ? `${f}-label` : void 0,
|
|
2745
2752
|
children: [
|
|
2746
2753
|
/* @__PURE__ */ o(K, { className: "range-track", "aria-hidden": "true" }),
|
|
2747
2754
|
/* @__PURE__ */ o(
|
|
@@ -2750,7 +2757,7 @@ const dt = ({
|
|
|
2750
2757
|
className: "range-track-fill",
|
|
2751
2758
|
style: {
|
|
2752
2759
|
left: `${b}%`,
|
|
2753
|
-
right: `${100 -
|
|
2760
|
+
right: `${100 - x}%`
|
|
2754
2761
|
},
|
|
2755
2762
|
"aria-hidden": "true"
|
|
2756
2763
|
}
|
|
@@ -2759,11 +2766,11 @@ const dt = ({
|
|
|
2759
2766
|
"button",
|
|
2760
2767
|
{
|
|
2761
2768
|
ref: T,
|
|
2762
|
-
id: `${
|
|
2769
|
+
id: `${f}-min`,
|
|
2763
2770
|
type: "button",
|
|
2764
2771
|
className: "range-thumb range-thumb-min",
|
|
2765
2772
|
style: { left: `${b}%` },
|
|
2766
|
-
disabled:
|
|
2773
|
+
disabled: p,
|
|
2767
2774
|
onMouseDown: z("min"),
|
|
2768
2775
|
onTouchStart: C("min"),
|
|
2769
2776
|
onKeyDown: B("min"),
|
|
@@ -2771,7 +2778,7 @@ const dt = ({
|
|
|
2771
2778
|
onBlur: () => L(null),
|
|
2772
2779
|
"data-active": g === "min" || E === "min",
|
|
2773
2780
|
role: "slider",
|
|
2774
|
-
"aria-label":
|
|
2781
|
+
"aria-label": u,
|
|
2775
2782
|
"aria-valuemin": s,
|
|
2776
2783
|
"aria-valuemax": R - i,
|
|
2777
2784
|
"aria-valuenow": y,
|
|
@@ -2782,12 +2789,12 @@ const dt = ({
|
|
|
2782
2789
|
/* @__PURE__ */ o(
|
|
2783
2790
|
"button",
|
|
2784
2791
|
{
|
|
2785
|
-
ref:
|
|
2786
|
-
id: `${
|
|
2792
|
+
ref: F,
|
|
2793
|
+
id: `${f}-max`,
|
|
2787
2794
|
type: "button",
|
|
2788
2795
|
className: "range-thumb range-thumb-max",
|
|
2789
|
-
style: { left: `${
|
|
2790
|
-
disabled:
|
|
2796
|
+
style: { left: `${x}%` },
|
|
2797
|
+
disabled: p,
|
|
2791
2798
|
onMouseDown: z("max"),
|
|
2792
2799
|
onTouchStart: C("max"),
|
|
2793
2800
|
onKeyDown: B("max"),
|
|
@@ -2795,7 +2802,7 @@ const dt = ({
|
|
|
2795
2802
|
onBlur: () => L(null),
|
|
2796
2803
|
"data-active": g === "max" || E === "max",
|
|
2797
2804
|
role: "slider",
|
|
2798
|
-
"aria-label":
|
|
2805
|
+
"aria-label": d,
|
|
2799
2806
|
"aria-valuemin": y + i,
|
|
2800
2807
|
"aria-valuemax": l,
|
|
2801
2808
|
"aria-valuenow": R,
|
|
@@ -2809,8 +2816,8 @@ const dt = ({
|
|
|
2809
2816
|
}
|
|
2810
2817
|
);
|
|
2811
2818
|
};
|
|
2812
|
-
|
|
2813
|
-
const
|
|
2819
|
+
ut.displayName = "DualThumbRange";
|
|
2820
|
+
const ta = N.forwardRef(
|
|
2814
2821
|
({
|
|
2815
2822
|
label: e,
|
|
2816
2823
|
value: t,
|
|
@@ -2821,16 +2828,16 @@ const ea = N.forwardRef(
|
|
|
2821
2828
|
description: s,
|
|
2822
2829
|
min: l,
|
|
2823
2830
|
max: i,
|
|
2824
|
-
low:
|
|
2825
|
-
high:
|
|
2826
|
-
optimum:
|
|
2827
|
-
...
|
|
2828
|
-
},
|
|
2829
|
-
const v =
|
|
2831
|
+
low: u,
|
|
2832
|
+
high: d,
|
|
2833
|
+
optimum: f,
|
|
2834
|
+
...p
|
|
2835
|
+
}, $) => {
|
|
2836
|
+
const v = f ? (f - l) / (i - l) * 100 : 0, k = () => {
|
|
2830
2837
|
const y = (t - l) / (i - l) * 100;
|
|
2831
2838
|
let R;
|
|
2832
|
-
return t <=
|
|
2833
|
-
}, { wrapperProps: m, inputProps: A } = ie(
|
|
2839
|
+
return t <= u ? R = "Low" : t >= d ? R = "High" : R = "Normal", `Current value is ${t}${r || ""} (${y.toFixed(1)}%). Status: ${R}`;
|
|
2840
|
+
}, { wrapperProps: m, inputProps: A } = ie(p);
|
|
2834
2841
|
return /* @__PURE__ */ I(
|
|
2835
2842
|
D,
|
|
2836
2843
|
{
|
|
@@ -2865,13 +2872,13 @@ const ea = N.forwardRef(
|
|
|
2865
2872
|
{
|
|
2866
2873
|
as: "meter",
|
|
2867
2874
|
"data-meter": !0,
|
|
2868
|
-
ref:
|
|
2875
|
+
ref: $,
|
|
2869
2876
|
value: t,
|
|
2870
2877
|
min: l,
|
|
2871
2878
|
max: i,
|
|
2872
|
-
low:
|
|
2873
|
-
high:
|
|
2874
|
-
optimum:
|
|
2879
|
+
low: u,
|
|
2880
|
+
high: d,
|
|
2881
|
+
optimum: f,
|
|
2875
2882
|
...A,
|
|
2876
2883
|
style: { height: a },
|
|
2877
2884
|
"aria-label": e || n || "Progress meter",
|
|
@@ -2882,12 +2889,12 @@ const ea = N.forwardRef(
|
|
|
2882
2889
|
"aria-describedby": s ? `meter-description-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}` : void 0
|
|
2883
2890
|
}
|
|
2884
2891
|
),
|
|
2885
|
-
c &&
|
|
2892
|
+
c && f && /* @__PURE__ */ o(
|
|
2886
2893
|
"div",
|
|
2887
2894
|
{
|
|
2888
2895
|
className: "optimum-marker",
|
|
2889
2896
|
style: { left: `calc(${v}% - var(--meter-border-width))` },
|
|
2890
|
-
title: `Optimum: ${
|
|
2897
|
+
title: `Optimum: ${f}`,
|
|
2891
2898
|
role: "presentation",
|
|
2892
2899
|
"aria-hidden": "true"
|
|
2893
2900
|
}
|
|
@@ -2908,8 +2915,8 @@ const ea = N.forwardRef(
|
|
|
2908
2915
|
);
|
|
2909
2916
|
}
|
|
2910
2917
|
);
|
|
2911
|
-
|
|
2912
|
-
const
|
|
2918
|
+
ta.displayName = "Meter";
|
|
2919
|
+
const aa = N.forwardRef(
|
|
2913
2920
|
({
|
|
2914
2921
|
id: e,
|
|
2915
2922
|
children: t,
|
|
@@ -2920,12 +2927,12 @@ const ta = N.forwardRef(
|
|
|
2920
2927
|
showBackdrop: s,
|
|
2921
2928
|
blurBackdrop: l,
|
|
2922
2929
|
label: i,
|
|
2923
|
-
description:
|
|
2924
|
-
...
|
|
2925
|
-
},
|
|
2926
|
-
const
|
|
2927
|
-
return s && a.push("show-backdrop"), l && a.push("blur-backdrop"),
|
|
2928
|
-
const v = document.querySelector(`#${
|
|
2930
|
+
description: u,
|
|
2931
|
+
...d
|
|
2932
|
+
}, f) => {
|
|
2933
|
+
const p = `${e}`, $ = u ? `${p}-description` : void 0;
|
|
2934
|
+
return s && a.push("show-backdrop"), l && a.push("blur-backdrop"), U(() => {
|
|
2935
|
+
const v = document.querySelector(`#${p}[data-modal]`);
|
|
2929
2936
|
if (!(!v || !(v instanceof HTMLElement)))
|
|
2930
2937
|
if (r) {
|
|
2931
2938
|
v.showPopover();
|
|
@@ -2935,27 +2942,27 @@ const ta = N.forwardRef(
|
|
|
2935
2942
|
k.length && k[0].focus();
|
|
2936
2943
|
} else
|
|
2937
2944
|
v.matches(":popover-open") && v.hidePopover();
|
|
2938
|
-
}, [r,
|
|
2939
|
-
const v = document.querySelector(`#${
|
|
2945
|
+
}, [r, p]), U(() => {
|
|
2946
|
+
const v = document.querySelector(`#${p}[data-modal]`);
|
|
2940
2947
|
if (!v || !(v instanceof HTMLElement)) return;
|
|
2941
2948
|
const k = (m) => {
|
|
2942
2949
|
m.newState === "closed" && r && c && c();
|
|
2943
2950
|
};
|
|
2944
2951
|
return v.addEventListener("toggle", k), () => v.removeEventListener("toggle", k);
|
|
2945
|
-
}, [
|
|
2952
|
+
}, [p, r, c]), /* @__PURE__ */ I(
|
|
2946
2953
|
D,
|
|
2947
2954
|
{
|
|
2948
2955
|
as: "dialog",
|
|
2949
|
-
id:
|
|
2956
|
+
id: p,
|
|
2950
2957
|
"data-modal": !0,
|
|
2951
2958
|
popover: n ? "auto" : "manual",
|
|
2952
|
-
ref:
|
|
2959
|
+
ref: f,
|
|
2953
2960
|
classNames: a,
|
|
2954
2961
|
role: "dialog",
|
|
2955
2962
|
"aria-modal": "true",
|
|
2956
2963
|
"aria-label": i || "Modal dialog",
|
|
2957
|
-
"aria-describedby":
|
|
2958
|
-
...
|
|
2964
|
+
"aria-describedby": $,
|
|
2965
|
+
...d,
|
|
2959
2966
|
children: [
|
|
2960
2967
|
n && c && /* @__PURE__ */ o(
|
|
2961
2968
|
J,
|
|
@@ -2967,15 +2974,15 @@ const ta = N.forwardRef(
|
|
|
2967
2974
|
children: "×"
|
|
2968
2975
|
}
|
|
2969
2976
|
),
|
|
2970
|
-
|
|
2977
|
+
u && /* @__PURE__ */ o("div", { id: $, className: "sr-only", children: u }),
|
|
2971
2978
|
/* @__PURE__ */ o("div", { role: "document", children: t })
|
|
2972
2979
|
]
|
|
2973
2980
|
}
|
|
2974
2981
|
);
|
|
2975
2982
|
}
|
|
2976
2983
|
);
|
|
2977
|
-
|
|
2978
|
-
const
|
|
2984
|
+
aa.displayName = "Modal";
|
|
2985
|
+
const ft = N.forwardRef(
|
|
2979
2986
|
({
|
|
2980
2987
|
position: e = "right",
|
|
2981
2988
|
anchor: t = "top",
|
|
@@ -3002,14 +3009,14 @@ const ut = N.forwardRef(
|
|
|
3002
3009
|
);
|
|
3003
3010
|
}
|
|
3004
3011
|
);
|
|
3005
|
-
|
|
3006
|
-
const
|
|
3012
|
+
ft.displayName = "NotificationsWrapper";
|
|
3013
|
+
const ra = {
|
|
3007
3014
|
generic: "status",
|
|
3008
3015
|
info: "status",
|
|
3009
3016
|
warning: "alert",
|
|
3010
3017
|
error: "alert",
|
|
3011
3018
|
success: "status"
|
|
3012
|
-
},
|
|
3019
|
+
}, pt = ({
|
|
3013
3020
|
id: e,
|
|
3014
3021
|
kind: t = "generic",
|
|
3015
3022
|
duration: a = 4,
|
|
@@ -3018,35 +3025,35 @@ const aa = {
|
|
|
3018
3025
|
children: n
|
|
3019
3026
|
}) => {
|
|
3020
3027
|
const [s, l] = j(!1);
|
|
3021
|
-
|
|
3028
|
+
U(() => {
|
|
3022
3029
|
if (a === 0) return;
|
|
3023
|
-
const
|
|
3030
|
+
const p = setTimeout(() => {
|
|
3024
3031
|
l(!0);
|
|
3025
3032
|
}, a * 1e3);
|
|
3026
|
-
return () => clearTimeout(
|
|
3027
|
-
}, [a]),
|
|
3033
|
+
return () => clearTimeout(p);
|
|
3034
|
+
}, [a]), U(() => {
|
|
3028
3035
|
if (!s) return;
|
|
3029
|
-
const
|
|
3036
|
+
const p = setTimeout(() => {
|
|
3030
3037
|
c();
|
|
3031
3038
|
}, 500);
|
|
3032
|
-
return () => clearTimeout(
|
|
3039
|
+
return () => clearTimeout(p);
|
|
3033
3040
|
}, [s, c]);
|
|
3034
|
-
const i = (
|
|
3035
|
-
|
|
3036
|
-
},
|
|
3037
|
-
(
|
|
3038
|
-
},
|
|
3041
|
+
const i = (p) => {
|
|
3042
|
+
p.preventDefault(), l(!0);
|
|
3043
|
+
}, u = (p) => {
|
|
3044
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), l(!0));
|
|
3045
|
+
}, d = () => {
|
|
3039
3046
|
s && c();
|
|
3040
|
-
},
|
|
3041
|
-
return r &&
|
|
3047
|
+
}, f = [t];
|
|
3048
|
+
return r && f.push("dismissible"), s && f.push("dismissed"), /* @__PURE__ */ I(
|
|
3042
3049
|
D,
|
|
3043
3050
|
{
|
|
3044
3051
|
as: "div",
|
|
3045
3052
|
"data-notification-item": !0,
|
|
3046
3053
|
id: e,
|
|
3047
|
-
classNames:
|
|
3048
|
-
onTransitionEnd:
|
|
3049
|
-
role:
|
|
3054
|
+
classNames: f,
|
|
3055
|
+
onTransitionEnd: d,
|
|
3056
|
+
role: ra[t],
|
|
3050
3057
|
"aria-live": t === "error" || t === "warning" ? "assertive" : "polite",
|
|
3051
3058
|
"aria-atomic": "true",
|
|
3052
3059
|
children: [
|
|
@@ -3056,7 +3063,7 @@ const aa = {
|
|
|
3056
3063
|
{
|
|
3057
3064
|
className: "dismiss-button",
|
|
3058
3065
|
onClick: i,
|
|
3059
|
-
onKeyDown:
|
|
3066
|
+
onKeyDown: u,
|
|
3060
3067
|
"aria-label": "Dismiss notification",
|
|
3061
3068
|
tabIndex: 0,
|
|
3062
3069
|
children: /* @__PURE__ */ o("span", { className: "sr-only", children: "Close notification" })
|
|
@@ -3066,85 +3073,85 @@ const aa = {
|
|
|
3066
3073
|
}
|
|
3067
3074
|
);
|
|
3068
3075
|
};
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3076
|
+
pt.displayName = "NotificationItem";
|
|
3077
|
+
const mt = Le(null), sa = ({
|
|
3071
3078
|
children: e,
|
|
3072
3079
|
position: t = "right",
|
|
3073
3080
|
anchor: a = "top",
|
|
3074
3081
|
order: r = "new-on-top",
|
|
3075
3082
|
kind: c = "list"
|
|
3076
3083
|
}) => {
|
|
3077
|
-
const [n, s] = j([]), l = G((
|
|
3078
|
-
s((
|
|
3079
|
-
}, []), i = G((
|
|
3084
|
+
const [n, s] = j([]), l = G((f) => {
|
|
3085
|
+
s((p) => p.filter(($) => $.id !== f));
|
|
3086
|
+
}, []), i = G((f, p = "generic", $ = 4, v = !0) => {
|
|
3080
3087
|
const k = `notification-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
3081
3088
|
return s((m) => [...m, {
|
|
3082
3089
|
id: k,
|
|
3083
|
-
content:
|
|
3084
|
-
kind:
|
|
3085
|
-
duration:
|
|
3090
|
+
content: f,
|
|
3091
|
+
kind: p,
|
|
3092
|
+
duration: $,
|
|
3086
3093
|
isDismissible: v
|
|
3087
3094
|
}]), k;
|
|
3088
|
-
}, []),
|
|
3089
|
-
if (typeof
|
|
3090
|
-
i(
|
|
3095
|
+
}, []), u = G((f) => {
|
|
3096
|
+
if (typeof f == "string") {
|
|
3097
|
+
i(f);
|
|
3091
3098
|
return;
|
|
3092
3099
|
}
|
|
3093
|
-
if (
|
|
3094
|
-
const
|
|
3100
|
+
if (f !== null && typeof f == "object" && "content" in f) {
|
|
3101
|
+
const p = f;
|
|
3095
3102
|
i(
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3103
|
+
p.content,
|
|
3104
|
+
p.kind ?? "generic",
|
|
3105
|
+
p.duration ?? 4,
|
|
3106
|
+
p.isDismissible ?? !0
|
|
3100
3107
|
);
|
|
3101
3108
|
return;
|
|
3102
3109
|
}
|
|
3103
|
-
i(
|
|
3104
|
-
}, [i]),
|
|
3105
|
-
const
|
|
3106
|
-
return
|
|
3107
|
-
i(
|
|
3108
|
-
},
|
|
3109
|
-
i(
|
|
3110
|
-
},
|
|
3111
|
-
i(
|
|
3112
|
-
},
|
|
3113
|
-
i(
|
|
3114
|
-
},
|
|
3115
|
-
}, [
|
|
3116
|
-
return /* @__PURE__ */ I(
|
|
3110
|
+
i(f);
|
|
3111
|
+
}, [i]), d = G(() => {
|
|
3112
|
+
const f = u;
|
|
3113
|
+
return f.success = (p) => {
|
|
3114
|
+
i(p, "success");
|
|
3115
|
+
}, f.error = (p) => {
|
|
3116
|
+
i(p, "error");
|
|
3117
|
+
}, f.warning = (p) => {
|
|
3118
|
+
i(p, "warning");
|
|
3119
|
+
}, f.info = (p) => {
|
|
3120
|
+
i(p, "info");
|
|
3121
|
+
}, f;
|
|
3122
|
+
}, [u, i])();
|
|
3123
|
+
return /* @__PURE__ */ I(mt.Provider, { value: { notify: d }, children: [
|
|
3117
3124
|
e,
|
|
3118
3125
|
/* @__PURE__ */ o(
|
|
3119
|
-
|
|
3126
|
+
ft,
|
|
3120
3127
|
{
|
|
3121
3128
|
position: t,
|
|
3122
3129
|
anchor: a,
|
|
3123
3130
|
order: r,
|
|
3124
3131
|
kind: c,
|
|
3125
|
-
children: n.map(({ id:
|
|
3126
|
-
|
|
3132
|
+
children: n.map(({ id: f, content: p, kind: $, duration: v, isDismissible: k }) => /* @__PURE__ */ o(
|
|
3133
|
+
pt,
|
|
3127
3134
|
{
|
|
3128
|
-
id:
|
|
3129
|
-
kind:
|
|
3135
|
+
id: f,
|
|
3136
|
+
kind: $,
|
|
3130
3137
|
duration: v,
|
|
3131
3138
|
isDismissible: k,
|
|
3132
|
-
onClose: () => l(
|
|
3133
|
-
children: typeof
|
|
3139
|
+
onClose: () => l(f),
|
|
3140
|
+
children: typeof p == "function" ? p({ close: () => l(f) }) : p
|
|
3134
3141
|
},
|
|
3135
|
-
|
|
3142
|
+
f
|
|
3136
3143
|
))
|
|
3137
3144
|
}
|
|
3138
3145
|
)
|
|
3139
3146
|
] });
|
|
3140
3147
|
};
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3143
|
-
const e =
|
|
3148
|
+
sa.displayName = "NotificationsProvider";
|
|
3149
|
+
const qa = () => {
|
|
3150
|
+
const e = Ne(mt);
|
|
3144
3151
|
if (!e)
|
|
3145
3152
|
throw new Error("useNotifications must be used within a NotificationsProvider");
|
|
3146
3153
|
return e.notify;
|
|
3147
|
-
},
|
|
3154
|
+
}, ht = N.forwardRef(
|
|
3148
3155
|
({
|
|
3149
3156
|
size: e = "medium",
|
|
3150
3157
|
loadingText: t = "Loading...",
|
|
@@ -3167,11 +3174,11 @@ const Ua = () => {
|
|
|
3167
3174
|
);
|
|
3168
3175
|
}
|
|
3169
3176
|
);
|
|
3170
|
-
|
|
3171
|
-
const
|
|
3177
|
+
ht.displayName = "Spinner";
|
|
3178
|
+
const Ye = (e, t) => {
|
|
3172
3179
|
const a = t - e + 1;
|
|
3173
3180
|
return Array.from({ length: a }, (r, c) => e + c);
|
|
3174
|
-
},
|
|
3181
|
+
}, na = ({
|
|
3175
3182
|
totalItems: e,
|
|
3176
3183
|
currentPage: t,
|
|
3177
3184
|
itemsToShowEachSide: a
|
|
@@ -3182,12 +3189,12 @@ const qe = (e, t) => {
|
|
|
3182
3189
|
const n = a * 2 + 1;
|
|
3183
3190
|
let s = [];
|
|
3184
3191
|
if (r <= n)
|
|
3185
|
-
s =
|
|
3192
|
+
s = Ye(1, r);
|
|
3186
3193
|
else {
|
|
3187
3194
|
const l = Math.min(t - 1, a), i = Math.min(r - t, a);
|
|
3188
3195
|
s.push(1), t - a > 2 && s.push("...");
|
|
3189
|
-
const
|
|
3190
|
-
s.push(...
|
|
3196
|
+
const u = Math.max(2, t - l), d = Math.min(r - 1, t + i);
|
|
3197
|
+
s.push(...Ye(u, d)), r - t > a + 1 && s.push("..."), d < r && s.push(r);
|
|
3191
3198
|
}
|
|
3192
3199
|
return s;
|
|
3193
3200
|
})(),
|
|
@@ -3197,7 +3204,7 @@ const qe = (e, t) => {
|
|
|
3197
3204
|
hasPrevPage: t > 1,
|
|
3198
3205
|
hasNextPage: t < r
|
|
3199
3206
|
};
|
|
3200
|
-
},
|
|
3207
|
+
}, oa = ({
|
|
3201
3208
|
type: e,
|
|
3202
3209
|
page: t,
|
|
3203
3210
|
selected: a,
|
|
@@ -3247,14 +3254,14 @@ const qe = (e, t) => {
|
|
|
3247
3254
|
i = t;
|
|
3248
3255
|
}
|
|
3249
3256
|
return /* @__PURE__ */ o(
|
|
3250
|
-
|
|
3257
|
+
He,
|
|
3251
3258
|
{
|
|
3252
3259
|
kind: "custom",
|
|
3253
3260
|
...l,
|
|
3254
3261
|
children: i
|
|
3255
3262
|
}
|
|
3256
3263
|
);
|
|
3257
|
-
},
|
|
3264
|
+
}, ia = N.forwardRef(
|
|
3258
3265
|
({
|
|
3259
3266
|
totalItems: e,
|
|
3260
3267
|
currentPage: t,
|
|
@@ -3265,11 +3272,11 @@ const qe = (e, t) => {
|
|
|
3265
3272
|
showGoToLastItemButton: s = !0,
|
|
3266
3273
|
showPreviousButton: l = !0,
|
|
3267
3274
|
showNextButton: i = !0,
|
|
3268
|
-
showGoToInput:
|
|
3269
|
-
disabled:
|
|
3270
|
-
hideDisabledButtons:
|
|
3271
|
-
renderItem:
|
|
3272
|
-
isLoading:
|
|
3275
|
+
showGoToInput: u = !1,
|
|
3276
|
+
disabled: d = !1,
|
|
3277
|
+
hideDisabledButtons: f = !1,
|
|
3278
|
+
renderItem: p = oa,
|
|
3279
|
+
isLoading: $ = !1,
|
|
3273
3280
|
loadingText: v,
|
|
3274
3281
|
emptyText: k,
|
|
3275
3282
|
itemDisplayText: m = "Page",
|
|
@@ -3278,10 +3285,10 @@ const qe = (e, t) => {
|
|
|
3278
3285
|
const {
|
|
3279
3286
|
items: R,
|
|
3280
3287
|
totalPages: T,
|
|
3281
|
-
rangeStart:
|
|
3282
|
-
hasPrevPage:
|
|
3288
|
+
rangeStart: F,
|
|
3289
|
+
hasPrevPage: V,
|
|
3283
3290
|
hasNextPage: E
|
|
3284
|
-
} =
|
|
3291
|
+
} = na({
|
|
3285
3292
|
totalItems: e,
|
|
3286
3293
|
currentPage: t,
|
|
3287
3294
|
itemsToShowEachSide: r
|
|
@@ -3296,7 +3303,7 @@ const qe = (e, t) => {
|
|
|
3296
3303
|
if (e === 0)
|
|
3297
3304
|
return /* @__PURE__ */ o(J, { className: "pagination-empty", children: k || "No items to display" });
|
|
3298
3305
|
let S = ["pagination"];
|
|
3299
|
-
return c && S.push(c),
|
|
3306
|
+
return c && S.push(c), d && S.push("disabled"), $ && S.push("loading"), /* @__PURE__ */ I(
|
|
3300
3307
|
D,
|
|
3301
3308
|
{
|
|
3302
3309
|
as: "nav",
|
|
@@ -3308,15 +3315,15 @@ const qe = (e, t) => {
|
|
|
3308
3315
|
...A,
|
|
3309
3316
|
children: [
|
|
3310
3317
|
/* @__PURE__ */ I(K, { className: "pagination-controls", children: [
|
|
3311
|
-
n && (!
|
|
3318
|
+
n && (!f || V) && p({
|
|
3312
3319
|
type: "first",
|
|
3313
|
-
disabled: !
|
|
3320
|
+
disabled: !V || d,
|
|
3314
3321
|
selected: !1,
|
|
3315
3322
|
onClick: () => a(1)
|
|
3316
3323
|
}),
|
|
3317
|
-
l && (!
|
|
3324
|
+
l && (!f || V) && p({
|
|
3318
3325
|
type: "previous",
|
|
3319
|
-
disabled: !
|
|
3326
|
+
disabled: !V || d,
|
|
3320
3327
|
selected: !1,
|
|
3321
3328
|
onClick: () => a(t - 1)
|
|
3322
3329
|
}),
|
|
@@ -3331,26 +3338,26 @@ const qe = (e, t) => {
|
|
|
3331
3338
|
type: "page",
|
|
3332
3339
|
page: w,
|
|
3333
3340
|
selected: w === t,
|
|
3334
|
-
disabled:
|
|
3341
|
+
disabled: d,
|
|
3335
3342
|
"aria-current": w === t ? "page" : void 0,
|
|
3336
3343
|
onClick: () => a(w)
|
|
3337
3344
|
};
|
|
3338
|
-
return
|
|
3345
|
+
return p(C);
|
|
3339
3346
|
}),
|
|
3340
|
-
i && (!
|
|
3347
|
+
i && (!f || E) && p({
|
|
3341
3348
|
type: "next",
|
|
3342
|
-
disabled: !E ||
|
|
3349
|
+
disabled: !E || d,
|
|
3343
3350
|
selected: !1,
|
|
3344
3351
|
onClick: () => a(t + 1)
|
|
3345
3352
|
}),
|
|
3346
|
-
s && (!
|
|
3353
|
+
s && (!f || E) && p({
|
|
3347
3354
|
type: "last",
|
|
3348
|
-
disabled: !E ||
|
|
3355
|
+
disabled: !E || d,
|
|
3349
3356
|
selected: !1,
|
|
3350
3357
|
onClick: () => a(T)
|
|
3351
3358
|
}),
|
|
3352
|
-
|
|
3353
|
-
/* @__PURE__ */ o(
|
|
3359
|
+
$ && /* @__PURE__ */ I(K, { className: "pagination-loading", children: [
|
|
3360
|
+
/* @__PURE__ */ o(ht, {}),
|
|
3354
3361
|
v && /* @__PURE__ */ o(J, { size: "small", children: v })
|
|
3355
3362
|
] })
|
|
3356
3363
|
] }),
|
|
@@ -3358,11 +3365,11 @@ const qe = (e, t) => {
|
|
|
3358
3365
|
/* @__PURE__ */ I(J, { size: "tiny", children: [
|
|
3359
3366
|
m,
|
|
3360
3367
|
" ",
|
|
3361
|
-
|
|
3368
|
+
F,
|
|
3362
3369
|
" of ",
|
|
3363
3370
|
e
|
|
3364
3371
|
] }),
|
|
3365
|
-
|
|
3372
|
+
u && /* @__PURE__ */ o(K, { className: "pagination-go-to", children: /* @__PURE__ */ o(
|
|
3366
3373
|
"input",
|
|
3367
3374
|
{
|
|
3368
3375
|
type: "number",
|
|
@@ -3373,7 +3380,7 @@ const qe = (e, t) => {
|
|
|
3373
3380
|
onKeyDown: _,
|
|
3374
3381
|
placeholder: `Go to ${m}`,
|
|
3375
3382
|
"aria-label": `Go to ${m}`,
|
|
3376
|
-
disabled:
|
|
3383
|
+
disabled: d
|
|
3377
3384
|
}
|
|
3378
3385
|
) })
|
|
3379
3386
|
] })
|
|
@@ -3382,8 +3389,8 @@ const qe = (e, t) => {
|
|
|
3382
3389
|
);
|
|
3383
3390
|
}
|
|
3384
3391
|
);
|
|
3385
|
-
|
|
3386
|
-
const
|
|
3392
|
+
ia.displayName = "Pagination";
|
|
3393
|
+
const la = N.forwardRef(
|
|
3387
3394
|
({
|
|
3388
3395
|
label: e,
|
|
3389
3396
|
value: t,
|
|
@@ -3394,14 +3401,14 @@ const ia = N.forwardRef(
|
|
|
3394
3401
|
bgColour: s,
|
|
3395
3402
|
fillColor: l,
|
|
3396
3403
|
fillColour: i,
|
|
3397
|
-
...
|
|
3398
|
-
},
|
|
3399
|
-
const
|
|
3404
|
+
...u
|
|
3405
|
+
}, d) => {
|
|
3406
|
+
const f = Math.max(0, Math.min(r, Number(t) || 0)), p = `${f}${u.suffix || ""}`, $ = s || n, v = i || l, k = {
|
|
3400
3407
|
height: a,
|
|
3401
|
-
|
|
3408
|
+
...$ && { "--progress-bar-bg": `var(--${$})` },
|
|
3402
3409
|
...v && { "--progress-bar-fill": `var(--${v})` }
|
|
3403
3410
|
};
|
|
3404
|
-
return /* @__PURE__ */ I(
|
|
3411
|
+
return /* @__PURE__ */ I(Me, { children: [
|
|
3405
3412
|
e && /* @__PURE__ */ I(
|
|
3406
3413
|
D,
|
|
3407
3414
|
{
|
|
@@ -3410,7 +3417,7 @@ const ia = N.forwardRef(
|
|
|
3410
3417
|
"aria-hidden": "true",
|
|
3411
3418
|
children: [
|
|
3412
3419
|
/* @__PURE__ */ o(J, { children: e }),
|
|
3413
|
-
/* @__PURE__ */ o(J, { children:
|
|
3420
|
+
/* @__PURE__ */ o(J, { children: p })
|
|
3414
3421
|
]
|
|
3415
3422
|
}
|
|
3416
3423
|
),
|
|
@@ -3419,23 +3426,23 @@ const ia = N.forwardRef(
|
|
|
3419
3426
|
{
|
|
3420
3427
|
as: "progress",
|
|
3421
3428
|
"data-progress-bar": !0,
|
|
3422
|
-
ref:
|
|
3423
|
-
value:
|
|
3429
|
+
ref: d,
|
|
3430
|
+
value: f,
|
|
3424
3431
|
max: r,
|
|
3425
3432
|
"aria-label": e,
|
|
3426
3433
|
"aria-valuemin": 0,
|
|
3427
3434
|
"aria-valuemax": r,
|
|
3428
|
-
"aria-valuenow":
|
|
3429
|
-
"aria-valuetext": `${e ? `${e}: ` : ""}${
|
|
3435
|
+
"aria-valuenow": f,
|
|
3436
|
+
"aria-valuetext": `${e ? `${e}: ` : ""}${p}`,
|
|
3430
3437
|
shape: c,
|
|
3431
|
-
...
|
|
3438
|
+
...u,
|
|
3432
3439
|
style: k
|
|
3433
3440
|
}
|
|
3434
3441
|
)
|
|
3435
3442
|
] });
|
|
3436
3443
|
}
|
|
3437
3444
|
);
|
|
3438
|
-
|
|
3445
|
+
la.displayName = "ProgressBar";
|
|
3439
3446
|
const Oe = Le({
|
|
3440
3447
|
isSelected: () => !1,
|
|
3441
3448
|
toggleSelection: () => {
|
|
@@ -3452,7 +3459,7 @@ const Oe = Le({
|
|
|
3452
3459
|
},
|
|
3453
3460
|
unregisterOption: () => {
|
|
3454
3461
|
}
|
|
3455
|
-
}),
|
|
3462
|
+
}), ca = N.forwardRef(
|
|
3456
3463
|
({
|
|
3457
3464
|
children: e,
|
|
3458
3465
|
allowMultipleSelections: t = !1,
|
|
@@ -3463,15 +3470,15 @@ const Oe = Le({
|
|
|
3463
3470
|
defaultSelectedIds: s,
|
|
3464
3471
|
selectedIds: l,
|
|
3465
3472
|
...i
|
|
3466
|
-
},
|
|
3467
|
-
const
|
|
3473
|
+
}, u) => {
|
|
3474
|
+
const d = l !== void 0, [f, p] = j(
|
|
3468
3475
|
s ? new Set(s) : /* @__PURE__ */ new Set()
|
|
3469
|
-
),
|
|
3470
|
-
|
|
3471
|
-
}, [
|
|
3472
|
-
|
|
3476
|
+
), $ = Y(/* @__PURE__ */ new Map()), v = d ? l : f, k = G((P) => {
|
|
3477
|
+
d || p(P), r == null || r(P);
|
|
3478
|
+
}, [d, r]), m = G((P, g) => {
|
|
3479
|
+
$.current.set(P, g);
|
|
3473
3480
|
}, []), A = G((P) => {
|
|
3474
|
-
|
|
3481
|
+
$.current.delete(P);
|
|
3475
3482
|
}, []), y = G((P) => {
|
|
3476
3483
|
const g = new Set(v);
|
|
3477
3484
|
if (t)
|
|
@@ -3487,77 +3494,77 @@ const Oe = Le({
|
|
|
3487
3494
|
k(g);
|
|
3488
3495
|
}, [v, t, n, k]), R = G(() => {
|
|
3489
3496
|
if (!t) return;
|
|
3490
|
-
const P = Array.from(
|
|
3497
|
+
const P = Array.from($.current.entries()).filter(([L, _]) => !_).map(([L]) => L), g = n ? P.slice(0, n) : P;
|
|
3491
3498
|
k(new Set(g));
|
|
3492
3499
|
}, [t, n, k]), T = G(() => {
|
|
3493
3500
|
k(/* @__PURE__ */ new Set());
|
|
3494
|
-
}, [k]),
|
|
3501
|
+
}, [k]), F = G(() => {
|
|
3495
3502
|
if (!t) return;
|
|
3496
|
-
const g = Array.from(
|
|
3503
|
+
const g = Array.from($.current.entries()).filter(([_, S]) => !S).map(([_]) => _).filter((_) => !v.has(_)), L = n ? g.slice(0, n) : g;
|
|
3497
3504
|
k(new Set(L));
|
|
3498
|
-
}, [v, t, n, k]),
|
|
3499
|
-
N.useImperativeHandle(
|
|
3505
|
+
}, [v, t, n, k]), V = G((P) => v.has(P), [v]);
|
|
3506
|
+
N.useImperativeHandle(u, () => ({
|
|
3500
3507
|
selectAll: R,
|
|
3501
3508
|
selectNone: T,
|
|
3502
|
-
selectInverse:
|
|
3503
|
-
}), [R, T,
|
|
3509
|
+
selectInverse: F
|
|
3510
|
+
}), [R, T, F]);
|
|
3504
3511
|
const E = {
|
|
3505
|
-
isSelected:
|
|
3512
|
+
isSelected: V,
|
|
3506
3513
|
toggleSelection: y,
|
|
3507
3514
|
showTickIcon: a,
|
|
3508
3515
|
tickPosition: c,
|
|
3509
3516
|
selectAll: R,
|
|
3510
3517
|
selectNone: T,
|
|
3511
|
-
selectInverse:
|
|
3518
|
+
selectInverse: F,
|
|
3512
3519
|
registerOption: m,
|
|
3513
3520
|
unregisterOption: A
|
|
3514
3521
|
};
|
|
3515
3522
|
return /* @__PURE__ */ o(Oe.Provider, { value: E, children: /* @__PURE__ */ o(K, { "data-option-cards-group": !0, className: `tick-${c}`, children: e }) });
|
|
3516
3523
|
}
|
|
3517
3524
|
);
|
|
3518
|
-
|
|
3519
|
-
const
|
|
3520
|
-
const t =
|
|
3525
|
+
ca.displayName = "OptionCardsGroup";
|
|
3526
|
+
const Ya = (e) => {
|
|
3527
|
+
const t = Ne(Oe);
|
|
3521
3528
|
return {
|
|
3522
3529
|
isSelected: t.isSelected(e),
|
|
3523
3530
|
toggleSelection: () => t.toggleSelection(e),
|
|
3524
3531
|
showTickIcon: t.showTickIcon
|
|
3525
3532
|
};
|
|
3526
|
-
},
|
|
3527
|
-
const { selectAll: e, selectNone: t, selectInverse: a } =
|
|
3533
|
+
}, Ja = () => {
|
|
3534
|
+
const { selectAll: e, selectNone: t, selectInverse: a } = Ne(Oe);
|
|
3528
3535
|
return { selectAll: e, selectNone: t, selectInverse: a };
|
|
3529
|
-
},
|
|
3530
|
-
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: l, unregisterOption: i } =
|
|
3536
|
+
}, Za = ({ id: e, children: t, disabled: a = !1, ...r }) => {
|
|
3537
|
+
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: l, unregisterOption: i } = Ne(Oe), [u, d] = j(!1), [f, p] = j(!0);
|
|
3531
3538
|
N.useEffect(() => (l(e, a), () => i(e)), [e, a, l, i]);
|
|
3532
|
-
let
|
|
3533
|
-
c(e) &&
|
|
3539
|
+
let $ = [];
|
|
3540
|
+
c(e) && $.push("selected"), a && $.push("disabled"), u && $.push("show-deselect");
|
|
3534
3541
|
const v = () => {
|
|
3535
|
-
c(e) && !
|
|
3542
|
+
c(e) && !f && d(!0);
|
|
3536
3543
|
}, k = () => {
|
|
3537
|
-
|
|
3544
|
+
d(!1), p(!1);
|
|
3538
3545
|
}, m = (y) => {
|
|
3539
3546
|
var R;
|
|
3540
|
-
a || (
|
|
3547
|
+
a || (p(!0), d(!1), n(e), (R = r.onClick) == null || R.call(r, y));
|
|
3541
3548
|
}, A = (y) => {
|
|
3542
|
-
(y.key === "Enter" || y.key === " ") && !a && (y.preventDefault(),
|
|
3549
|
+
(y.key === "Enter" || y.key === " ") && !a && (y.preventDefault(), p(!0), d(!1), n(e));
|
|
3543
3550
|
};
|
|
3544
3551
|
return /* @__PURE__ */ I(
|
|
3545
3552
|
D,
|
|
3546
3553
|
{
|
|
3547
|
-
as:
|
|
3554
|
+
as: tt,
|
|
3548
3555
|
"data-option-card": !0,
|
|
3549
3556
|
role: "button",
|
|
3550
3557
|
tabIndex: a ? -1 : 0,
|
|
3551
3558
|
"aria-disabled": a,
|
|
3552
3559
|
"aria-selected": c(e),
|
|
3553
|
-
classNames:
|
|
3560
|
+
classNames: $,
|
|
3554
3561
|
onClick: m,
|
|
3555
3562
|
onKeyDown: A,
|
|
3556
3563
|
onMouseEnter: v,
|
|
3557
3564
|
onMouseLeave: k,
|
|
3558
3565
|
...r,
|
|
3559
3566
|
children: [
|
|
3560
|
-
s && /* @__PURE__ */ I(
|
|
3567
|
+
s && /* @__PURE__ */ I(Me, { children: [
|
|
3561
3568
|
/* @__PURE__ */ I("svg", { viewBox: "0 0 24 24", className: "tick-icon", children: [
|
|
3562
3569
|
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "11" }),
|
|
3563
3570
|
/* @__PURE__ */ o("path", { d: "M8 13 L11 15 L16 9" })
|
|
@@ -3571,7 +3578,7 @@ const qa = (e) => {
|
|
|
3571
3578
|
]
|
|
3572
3579
|
}
|
|
3573
3580
|
);
|
|
3574
|
-
},
|
|
3581
|
+
}, da = N.forwardRef(
|
|
3575
3582
|
({
|
|
3576
3583
|
collapsed: e,
|
|
3577
3584
|
closeOnClickOutside: t,
|
|
@@ -3579,7 +3586,7 @@ const qa = (e) => {
|
|
|
3579
3586
|
...r
|
|
3580
3587
|
}, c) => {
|
|
3581
3588
|
const n = Y(null);
|
|
3582
|
-
|
|
3589
|
+
Qe(c, () => n.current), ze(n, () => {
|
|
3583
3590
|
typeof t == "function" && t();
|
|
3584
3591
|
});
|
|
3585
3592
|
let s = [];
|
|
@@ -3595,8 +3602,8 @@ const qa = (e) => {
|
|
|
3595
3602
|
);
|
|
3596
3603
|
}
|
|
3597
3604
|
);
|
|
3598
|
-
|
|
3599
|
-
const
|
|
3605
|
+
da.displayName = "SidebarWrapper";
|
|
3606
|
+
const ua = N.forwardRef(
|
|
3600
3607
|
({ label: e, ...t }, a) => /* @__PURE__ */ o(
|
|
3601
3608
|
D,
|
|
3602
3609
|
{
|
|
@@ -3609,8 +3616,8 @@ const da = N.forwardRef(
|
|
|
3609
3616
|
}
|
|
3610
3617
|
)
|
|
3611
3618
|
);
|
|
3612
|
-
|
|
3613
|
-
const
|
|
3619
|
+
ua.displayName = "ContentWrapper";
|
|
3620
|
+
const fa = N.forwardRef(
|
|
3614
3621
|
({ isSticky: e, ...t }, a) => {
|
|
3615
3622
|
let r = [];
|
|
3616
3623
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
@@ -3625,8 +3632,8 @@ const ua = N.forwardRef(
|
|
|
3625
3632
|
);
|
|
3626
3633
|
}
|
|
3627
3634
|
);
|
|
3628
|
-
|
|
3629
|
-
const
|
|
3635
|
+
fa.displayName = "SidebarHeader";
|
|
3636
|
+
const pa = N.forwardRef(
|
|
3630
3637
|
({ hasAlert: e, hasEmptyIcon: t, hasNoIcon: a, children: r, ...c }, n) => {
|
|
3631
3638
|
let s = [];
|
|
3632
3639
|
return e && s.push("has-alert"), t ? s.push("has-empty-icon") : a && s.push("has-no-icon"), /* @__PURE__ */ I(
|
|
@@ -3645,8 +3652,8 @@ const fa = N.forwardRef(
|
|
|
3645
3652
|
);
|
|
3646
3653
|
}
|
|
3647
3654
|
);
|
|
3648
|
-
|
|
3649
|
-
const
|
|
3655
|
+
pa.displayName = "SidebarItem";
|
|
3656
|
+
const ma = N.forwardRef(
|
|
3650
3657
|
({ isSticky: e, ...t }, a) => {
|
|
3651
3658
|
let r = [];
|
|
3652
3659
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
@@ -3661,11 +3668,11 @@ const pa = N.forwardRef(
|
|
|
3661
3668
|
);
|
|
3662
3669
|
}
|
|
3663
3670
|
);
|
|
3664
|
-
|
|
3665
|
-
const
|
|
3671
|
+
ma.displayName = "SidebarFooter";
|
|
3672
|
+
const vt = Le({
|
|
3666
3673
|
effect: "wave",
|
|
3667
3674
|
animate: !0
|
|
3668
|
-
}),
|
|
3675
|
+
}), ha = N.forwardRef(({
|
|
3669
3676
|
variant: e = "line",
|
|
3670
3677
|
width: t,
|
|
3671
3678
|
height: a,
|
|
@@ -3674,12 +3681,12 @@ const ht = Le({
|
|
|
3674
3681
|
loadingLabel: n,
|
|
3675
3682
|
...s
|
|
3676
3683
|
}, l) => {
|
|
3677
|
-
const i =
|
|
3678
|
-
let
|
|
3679
|
-
e &&
|
|
3680
|
-
const
|
|
3681
|
-
width:
|
|
3682
|
-
height:
|
|
3684
|
+
const i = Ne(vt), u = c || i.effect, d = n || i.loadingLabel || "Loading...";
|
|
3685
|
+
let f = [];
|
|
3686
|
+
e && f.push(`variant-${e}`), r && f.push(`shape-${r}`), u && f.push(`effect-${u}`);
|
|
3687
|
+
const p = t || "100%", $ = e === "circle" ? (typeof t == "number" ? `${t}px` : t) || a || "100%" : a, v = {
|
|
3688
|
+
width: p,
|
|
3689
|
+
height: $,
|
|
3683
3690
|
aspectRatio: e === "circle" ? "1 / 1" : "auto",
|
|
3684
3691
|
...s.style
|
|
3685
3692
|
};
|
|
@@ -3689,20 +3696,20 @@ const ht = Le({
|
|
|
3689
3696
|
as: "div",
|
|
3690
3697
|
"data-skeleton": !0,
|
|
3691
3698
|
ref: l,
|
|
3692
|
-
classNames:
|
|
3699
|
+
classNames: f,
|
|
3693
3700
|
style: v,
|
|
3694
3701
|
role: "progressbar",
|
|
3695
3702
|
"aria-busy": "true",
|
|
3696
3703
|
"aria-valuemin": 0,
|
|
3697
3704
|
"aria-valuemax": 100,
|
|
3698
|
-
"aria-valuetext":
|
|
3699
|
-
"aria-label":
|
|
3705
|
+
"aria-valuetext": d,
|
|
3706
|
+
"aria-label": d,
|
|
3700
3707
|
...s
|
|
3701
3708
|
}
|
|
3702
3709
|
);
|
|
3703
3710
|
});
|
|
3704
|
-
|
|
3705
|
-
const
|
|
3711
|
+
ha.displayName = "Skeleton";
|
|
3712
|
+
const va = N.forwardRef(({
|
|
3706
3713
|
effect: e = "wave",
|
|
3707
3714
|
spacing: t = "small",
|
|
3708
3715
|
animate: a = !0,
|
|
@@ -3712,31 +3719,31 @@ const ha = N.forwardRef(({
|
|
|
3712
3719
|
classNames: s = [],
|
|
3713
3720
|
loadingLabel: l = "Loading content...",
|
|
3714
3721
|
...i
|
|
3715
|
-
},
|
|
3716
|
-
const
|
|
3722
|
+
}, u) => {
|
|
3723
|
+
const d = [
|
|
3717
3724
|
`direction-${c}`,
|
|
3718
3725
|
e && `effect-${e}`,
|
|
3719
3726
|
...s
|
|
3720
3727
|
];
|
|
3721
|
-
return t &&
|
|
3728
|
+
return t && d.push(`spacing-${t}`), /* @__PURE__ */ o(vt.Provider, { value: { effect: e, animate: a, loadingLabel: l }, children: /* @__PURE__ */ o(
|
|
3722
3729
|
D,
|
|
3723
3730
|
{
|
|
3724
3731
|
as: "div",
|
|
3725
|
-
ref:
|
|
3732
|
+
ref: u,
|
|
3726
3733
|
"data-skeleton-group": !0,
|
|
3727
|
-
classNames:
|
|
3734
|
+
classNames: d,
|
|
3728
3735
|
role: "alert",
|
|
3729
3736
|
"aria-busy": "true",
|
|
3730
3737
|
"aria-label": l,
|
|
3731
3738
|
...i,
|
|
3732
|
-
children: Array(r).fill(n).map((
|
|
3733
|
-
key:
|
|
3739
|
+
children: Array(r).fill(n).map((f, p) => N.cloneElement(f, {
|
|
3740
|
+
key: p
|
|
3734
3741
|
}))
|
|
3735
3742
|
}
|
|
3736
3743
|
) });
|
|
3737
3744
|
});
|
|
3738
|
-
|
|
3739
|
-
const
|
|
3745
|
+
va.displayName = "SkeletonGroup";
|
|
3746
|
+
const ya = N.forwardRef(
|
|
3740
3747
|
({
|
|
3741
3748
|
bordersFor: e,
|
|
3742
3749
|
isStriped: t,
|
|
@@ -3747,19 +3754,19 @@ const va = N.forwardRef(
|
|
|
3747
3754
|
summary: s,
|
|
3748
3755
|
hasColSpan: l,
|
|
3749
3756
|
children: i,
|
|
3750
|
-
...
|
|
3751
|
-
},
|
|
3752
|
-
let
|
|
3753
|
-
e &&
|
|
3754
|
-
const
|
|
3757
|
+
...u
|
|
3758
|
+
}, d) => {
|
|
3759
|
+
let f = [];
|
|
3760
|
+
e && f.push(`bordered-${e}`), t && f.push("striped"), a && f.push("hoverable"), r && f.push("full-width"), c && f.push(`align-text-${c}`);
|
|
3761
|
+
const p = N.Children.count(i);
|
|
3755
3762
|
return /* @__PURE__ */ I(
|
|
3756
3763
|
D,
|
|
3757
3764
|
{
|
|
3758
3765
|
as: "table",
|
|
3759
|
-
classNames:
|
|
3760
|
-
ref:
|
|
3766
|
+
classNames: f,
|
|
3767
|
+
ref: d,
|
|
3761
3768
|
role: "table",
|
|
3762
|
-
"aria-rowcount":
|
|
3769
|
+
"aria-rowcount": p || void 0,
|
|
3763
3770
|
"aria-colcount": l ? void 0 : (() => {
|
|
3764
3771
|
if (!i || !N.isValidElement(i)) return;
|
|
3765
3772
|
const v = N.Children.toArray(i)[0];
|
|
@@ -3770,7 +3777,7 @@ const va = N.forwardRef(
|
|
|
3770
3777
|
}
|
|
3771
3778
|
})(),
|
|
3772
3779
|
summary: s,
|
|
3773
|
-
...
|
|
3780
|
+
...u,
|
|
3774
3781
|
children: [
|
|
3775
3782
|
n && /* @__PURE__ */ o("caption", { children: n }),
|
|
3776
3783
|
i
|
|
@@ -3779,19 +3786,19 @@ const va = N.forwardRef(
|
|
|
3779
3786
|
);
|
|
3780
3787
|
}
|
|
3781
3788
|
);
|
|
3782
|
-
|
|
3783
|
-
const
|
|
3789
|
+
ya.displayName = "Table";
|
|
3790
|
+
const wa = N.forwardRef(
|
|
3784
3791
|
({ tabs: e, additionalNavContentWrapper: t, defaultActiveTab: a, align: r = "left", isFullWidth: c, ...n }, s) => {
|
|
3785
|
-
const l = e.findIndex((m) => m.key === a), i = l > -1 ? l : 0, [
|
|
3792
|
+
const l = e.findIndex((m) => m.key === a), i = l > -1 ? l : 0, [u, d] = N.useState(
|
|
3786
3793
|
e.length > 0 ? e[i] : void 0
|
|
3787
|
-
), [
|
|
3788
|
-
(
|
|
3789
|
-
|
|
3794
|
+
), [f, p] = N.useState(!1), $ = Y([]), v = G((m) => {
|
|
3795
|
+
(u == null ? void 0 : u.key) !== m.key && (p(!0), setTimeout(() => {
|
|
3796
|
+
d(m), p(!1);
|
|
3790
3797
|
}, 150));
|
|
3791
|
-
}, [
|
|
3792
|
-
|
|
3793
|
-
e.length > 0 ? e.find((A) => A.key === (
|
|
3794
|
-
}, [e, i,
|
|
3798
|
+
}, [u == null ? void 0 : u.key]);
|
|
3799
|
+
U(() => {
|
|
3800
|
+
e.length > 0 ? e.find((A) => A.key === (u == null ? void 0 : u.key)) || d(e[i]) : d(void 0);
|
|
3801
|
+
}, [e, i, u == null ? void 0 : u.key]);
|
|
3795
3802
|
const k = G((m, A) => {
|
|
3796
3803
|
var T;
|
|
3797
3804
|
let y = A;
|
|
@@ -3807,9 +3814,9 @@ const ya = N.forwardRef(
|
|
|
3807
3814
|
return;
|
|
3808
3815
|
m.preventDefault();
|
|
3809
3816
|
const R = e[y];
|
|
3810
|
-
R && (v(R), (T =
|
|
3817
|
+
R && (v(R), (T = $.current[y]) == null || T.focus());
|
|
3811
3818
|
}, [e, v]);
|
|
3812
|
-
return
|
|
3819
|
+
return u ? /* @__PURE__ */ I(
|
|
3813
3820
|
D,
|
|
3814
3821
|
{
|
|
3815
3822
|
as: "div",
|
|
@@ -3819,28 +3826,28 @@ const ya = N.forwardRef(
|
|
|
3819
3826
|
"data-full-width": c,
|
|
3820
3827
|
...n,
|
|
3821
3828
|
children: [
|
|
3822
|
-
/* @__PURE__ */ o(
|
|
3829
|
+
/* @__PURE__ */ o(It, { "data-tabs-nav": !0, role: "tablist", "aria-label": "Tab Navigation", children: /* @__PURE__ */ I("ul", { className: "tab-labels-list", children: [
|
|
3823
3830
|
e.map((m, A) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
|
|
3824
3831
|
D,
|
|
3825
3832
|
{
|
|
3826
3833
|
as: "button",
|
|
3827
|
-
ref: (y) =>
|
|
3834
|
+
ref: (y) => $.current[A] = y,
|
|
3828
3835
|
id: `tab-${m.key}`,
|
|
3829
3836
|
role: "tab",
|
|
3830
|
-
"aria-selected":
|
|
3837
|
+
"aria-selected": u.key === m.key,
|
|
3831
3838
|
"aria-controls": `tab-panel-${m.key}`,
|
|
3832
|
-
tabIndex:
|
|
3839
|
+
tabIndex: u.key === m.key ? 0 : -1,
|
|
3833
3840
|
"data-tab-label": !0,
|
|
3834
|
-
"data-active":
|
|
3841
|
+
"data-active": u.key === m.key,
|
|
3835
3842
|
"data-alert": m.hasAlert,
|
|
3836
3843
|
onClick: () => v(m),
|
|
3837
3844
|
onKeyDown: (y) => k(y, A),
|
|
3838
|
-
className: `tab-button ${
|
|
3845
|
+
className: `tab-button ${u.key === m.key ? "is-active" : ""}`,
|
|
3839
3846
|
marginBottom: "nano",
|
|
3840
3847
|
children: /* @__PURE__ */ o(
|
|
3841
3848
|
J,
|
|
3842
3849
|
{
|
|
3843
|
-
className: `tab-label ${
|
|
3850
|
+
className: `tab-label ${u.key === m.key ? "is-active" : ""} ${m.hasAlert ? "has-alert" : ""}`,
|
|
3844
3851
|
children: m.label
|
|
3845
3852
|
}
|
|
3846
3853
|
)
|
|
@@ -3848,18 +3855,18 @@ const ya = N.forwardRef(
|
|
|
3848
3855
|
) }, m.key)),
|
|
3849
3856
|
t
|
|
3850
3857
|
] }) }),
|
|
3851
|
-
/* @__PURE__ */ o(
|
|
3858
|
+
/* @__PURE__ */ o(at, { kind: "tertiary", marginTop: "none", marginBottom: "micro" }),
|
|
3852
3859
|
e.map((m) => /* @__PURE__ */ o(
|
|
3853
3860
|
K,
|
|
3854
3861
|
{
|
|
3855
3862
|
id: `tab-panel-${m.key}`,
|
|
3856
3863
|
role: "tabpanel",
|
|
3857
3864
|
"aria-labelledby": `tab-${m.key}`,
|
|
3858
|
-
tabIndex:
|
|
3865
|
+
tabIndex: u.key === m.key ? 0 : -1,
|
|
3859
3866
|
"data-tab-content": !0,
|
|
3860
|
-
"data-active":
|
|
3861
|
-
"data-exiting":
|
|
3862
|
-
hidden:
|
|
3867
|
+
"data-active": u.key === m.key,
|
|
3868
|
+
"data-exiting": u.key === m.key && f,
|
|
3869
|
+
hidden: u.key !== m.key,
|
|
3863
3870
|
children: m.content
|
|
3864
3871
|
},
|
|
3865
3872
|
m.key
|
|
@@ -3869,7 +3876,7 @@ const ya = N.forwardRef(
|
|
|
3869
3876
|
) : null;
|
|
3870
3877
|
}
|
|
3871
3878
|
);
|
|
3872
|
-
|
|
3879
|
+
wa.displayName = "Tabs";
|
|
3873
3880
|
const Te = () => {
|
|
3874
3881
|
if (typeof window < "u") {
|
|
3875
3882
|
const e = window.location.hostname, t = window.location.port;
|
|
@@ -3877,47 +3884,47 @@ const Te = () => {
|
|
|
3877
3884
|
return t && (a += `-${t}`), `${a}-theme`;
|
|
3878
3885
|
}
|
|
3879
3886
|
return "fictoan-theme";
|
|
3880
|
-
},
|
|
3881
|
-
}],
|
|
3882
|
-
const e = N.useContext(
|
|
3883
|
-
return e === void 0 ?
|
|
3884
|
-
},
|
|
3887
|
+
}, ga = ["", (e) => {
|
|
3888
|
+
}], yt = N.createContext(void 0), Qa = () => {
|
|
3889
|
+
const e = N.useContext(yt);
|
|
3890
|
+
return e === void 0 ? ga : e;
|
|
3891
|
+
}, Je = (e, t) => {
|
|
3885
3892
|
let a;
|
|
3886
3893
|
try {
|
|
3887
3894
|
a = localStorage.getItem(e) || void 0;
|
|
3888
3895
|
} catch {
|
|
3889
3896
|
}
|
|
3890
3897
|
return a || t;
|
|
3891
|
-
},
|
|
3898
|
+
}, ba = N.forwardRef(
|
|
3892
3899
|
({ currentTheme: e, themeList: t, children: a, ...r }, c) => {
|
|
3893
|
-
const [n, s] = j(!1), [l, i] = j(() =>
|
|
3894
|
-
(
|
|
3895
|
-
const
|
|
3896
|
-
if (!t.includes(
|
|
3897
|
-
const
|
|
3898
|
-
i(
|
|
3900
|
+
const [n, s] = j(!1), [l, i] = j(() => Je(Te()) || e), u = G(
|
|
3901
|
+
(d) => {
|
|
3902
|
+
const f = typeof d == "function" ? d(l) : d;
|
|
3903
|
+
if (!t.includes(f)) {
|
|
3904
|
+
const p = t[0];
|
|
3905
|
+
i(p), document.documentElement.className = "", document.documentElement.classList.add(p);
|
|
3899
3906
|
try {
|
|
3900
|
-
localStorage.setItem(Te(),
|
|
3907
|
+
localStorage.setItem(Te(), p);
|
|
3901
3908
|
} catch {
|
|
3902
3909
|
}
|
|
3903
3910
|
return;
|
|
3904
3911
|
}
|
|
3905
|
-
i(
|
|
3912
|
+
i(f), document.documentElement.className = "", document.documentElement.classList.add(f), n || s(!0);
|
|
3906
3913
|
try {
|
|
3907
|
-
localStorage.setItem(Te(),
|
|
3914
|
+
localStorage.setItem(Te(), f);
|
|
3908
3915
|
} catch {
|
|
3909
3916
|
}
|
|
3910
3917
|
},
|
|
3911
3918
|
[l, t]
|
|
3912
3919
|
);
|
|
3913
|
-
return
|
|
3914
|
-
const
|
|
3915
|
-
d
|
|
3916
|
-
}, [e,
|
|
3920
|
+
return U(() => {
|
|
3921
|
+
const d = Je(Te());
|
|
3922
|
+
u(d || e);
|
|
3923
|
+
}, [e, u]), /* @__PURE__ */ o(yt.Provider, { value: [l, u], children: /* @__PURE__ */ o(D, { as: "div", "data-theme-provider": !0, ref: c, ...r, children: n && a }) });
|
|
3917
3924
|
}
|
|
3918
3925
|
);
|
|
3919
|
-
|
|
3920
|
-
const
|
|
3926
|
+
ba.displayName = "ThemeProvider";
|
|
3927
|
+
const wt = N.forwardRef(
|
|
3921
3928
|
({
|
|
3922
3929
|
anchor: e = "top",
|
|
3923
3930
|
children: t,
|
|
@@ -3937,21 +3944,21 @@ const yt = N.forwardRef(
|
|
|
3937
3944
|
}
|
|
3938
3945
|
)
|
|
3939
3946
|
);
|
|
3940
|
-
|
|
3941
|
-
const
|
|
3947
|
+
wt.displayName = "ToastsWrapper";
|
|
3948
|
+
const gt = ({
|
|
3942
3949
|
id: e,
|
|
3943
3950
|
duration: t = 4,
|
|
3944
3951
|
onClose: a,
|
|
3945
3952
|
children: r
|
|
3946
3953
|
}) => {
|
|
3947
3954
|
const [c, n] = j(!1);
|
|
3948
|
-
return
|
|
3955
|
+
return U(() => {
|
|
3949
3956
|
if (t === 0) return;
|
|
3950
3957
|
const l = setTimeout(() => {
|
|
3951
3958
|
n(!0);
|
|
3952
3959
|
}, t * 1e3);
|
|
3953
3960
|
return () => clearTimeout(l);
|
|
3954
|
-
}, [t]),
|
|
3961
|
+
}, [t]), U(() => {
|
|
3955
3962
|
if (!c) return;
|
|
3956
3963
|
const l = setTimeout(() => {
|
|
3957
3964
|
a();
|
|
@@ -3975,8 +3982,8 @@ const wt = ({
|
|
|
3975
3982
|
}
|
|
3976
3983
|
);
|
|
3977
3984
|
};
|
|
3978
|
-
|
|
3979
|
-
const
|
|
3985
|
+
gt.displayName = "ToastItem";
|
|
3986
|
+
const bt = Le(null), Na = ({
|
|
3980
3987
|
children: e,
|
|
3981
3988
|
anchor: t = "top"
|
|
3982
3989
|
}) => {
|
|
@@ -3984,16 +3991,16 @@ const gt = Le(null), ba = ({
|
|
|
3984
3991
|
r((l) => l.filter((i) => i.id !== s));
|
|
3985
3992
|
}, []), n = G((s, l = 4) => {
|
|
3986
3993
|
const i = `toast-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
3987
|
-
r((
|
|
3994
|
+
r((u) => [...u, {
|
|
3988
3995
|
id: i,
|
|
3989
3996
|
message: s,
|
|
3990
3997
|
duration: l
|
|
3991
3998
|
}]);
|
|
3992
3999
|
}, []);
|
|
3993
|
-
return /* @__PURE__ */ I(
|
|
4000
|
+
return /* @__PURE__ */ I(bt.Provider, { value: { toast: n }, children: [
|
|
3994
4001
|
e,
|
|
3995
|
-
/* @__PURE__ */ o(
|
|
3996
|
-
|
|
4002
|
+
/* @__PURE__ */ o(wt, { anchor: t, children: a.map(({ id: s, message: l, duration: i }) => /* @__PURE__ */ o(
|
|
4003
|
+
gt,
|
|
3997
4004
|
{
|
|
3998
4005
|
id: s,
|
|
3999
4006
|
duration: i,
|
|
@@ -4004,15 +4011,15 @@ const gt = Le(null), ba = ({
|
|
|
4004
4011
|
)) })
|
|
4005
4012
|
] });
|
|
4006
4013
|
};
|
|
4007
|
-
|
|
4008
|
-
const
|
|
4009
|
-
const e =
|
|
4014
|
+
Na.displayName = "ToastsProvider";
|
|
4015
|
+
const er = () => {
|
|
4016
|
+
const e = Ne(bt);
|
|
4010
4017
|
if (!e)
|
|
4011
4018
|
throw new Error("useToasts must be used within a ToastsProvider");
|
|
4012
4019
|
return e.toast;
|
|
4013
4020
|
}, fe = 8, ne = 16;
|
|
4014
|
-
let oe = null, pe = null,
|
|
4015
|
-
const me = /* @__PURE__ */ new Map(),
|
|
4021
|
+
let oe = null, pe = null, We = !1, ce = null, ve = null;
|
|
4022
|
+
const me = /* @__PURE__ */ new Map(), ka = (e, t, a) => {
|
|
4016
4023
|
const r = e.getBoundingClientRect(), c = t.getBoundingClientRect(), n = window.innerHeight, s = window.innerWidth;
|
|
4017
4024
|
let l, i;
|
|
4018
4025
|
switch (a) {
|
|
@@ -4046,7 +4053,7 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4046
4053
|
},
|
|
4047
4054
|
children: e
|
|
4048
4055
|
}
|
|
4049
|
-
),
|
|
4056
|
+
), Re = (e, t) => {
|
|
4050
4057
|
if (!(!pe || !oe)) {
|
|
4051
4058
|
if (!e || !t) {
|
|
4052
4059
|
pe.render(
|
|
@@ -4060,39 +4067,39 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4060
4067
|
if (!oe || !t) return;
|
|
4061
4068
|
const a = oe.firstElementChild;
|
|
4062
4069
|
if (!a) return;
|
|
4063
|
-
const { top: r, left: c } =
|
|
4070
|
+
const { top: r, left: c } = ka(a, t, e.position);
|
|
4064
4071
|
pe == null || pe.render(
|
|
4065
4072
|
/* @__PURE__ */ o(De, { content: e.content, isVisible: !0, position: { top: r, left: c }, zIndex: e.zIndex })
|
|
4066
4073
|
);
|
|
4067
4074
|
});
|
|
4068
4075
|
}
|
|
4069
|
-
},
|
|
4076
|
+
}, Ze = () => {
|
|
4070
4077
|
if (!ce || !ve) return;
|
|
4071
4078
|
const e = me.get(ce);
|
|
4072
|
-
e &&
|
|
4073
|
-
},
|
|
4079
|
+
e && Re(e, ve);
|
|
4080
|
+
}, Nt = (e, t) => {
|
|
4074
4081
|
const a = me.get(e);
|
|
4075
|
-
a && (ce = e, ve = t,
|
|
4082
|
+
a && (ce = e, ve = t, Re(a, t));
|
|
4076
4083
|
}, Ae = (e) => {
|
|
4077
|
-
e && ce !== e || (ce = null, ve = null,
|
|
4078
|
-
},
|
|
4084
|
+
e && ce !== e || (ce = null, ve = null, Re(null, null));
|
|
4085
|
+
}, $a = (e) => {
|
|
4079
4086
|
const t = e.target.closest("[id]");
|
|
4080
4087
|
if (!(t != null && t.id)) return;
|
|
4081
4088
|
const a = me.get(t.id);
|
|
4082
|
-
(a == null ? void 0 : a.showOn) === "hover" &&
|
|
4083
|
-
},
|
|
4089
|
+
(a == null ? void 0 : a.showOn) === "hover" && Nt(t.id, t);
|
|
4090
|
+
}, xa = (e) => {
|
|
4084
4091
|
const t = e.target.closest("[id]");
|
|
4085
4092
|
if (!(t != null && t.id)) return;
|
|
4086
4093
|
const a = me.get(t.id);
|
|
4087
4094
|
(a == null ? void 0 : a.showOn) === "hover" && Ae(t.id);
|
|
4088
|
-
},
|
|
4095
|
+
}, Ra = (e) => {
|
|
4089
4096
|
if (oe != null && oe.contains(e.target))
|
|
4090
4097
|
return;
|
|
4091
4098
|
const t = e.target.closest("[id]");
|
|
4092
4099
|
if (t != null && t.id) {
|
|
4093
4100
|
const a = me.get(t.id);
|
|
4094
4101
|
if ((a == null ? void 0 : a.showOn) === "click") {
|
|
4095
|
-
ce === t.id ? Ae() :
|
|
4102
|
+
ce === t.id ? Ae() : Nt(t.id, t);
|
|
4096
4103
|
return;
|
|
4097
4104
|
}
|
|
4098
4105
|
}
|
|
@@ -4100,17 +4107,17 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4100
4107
|
const a = me.get(ce);
|
|
4101
4108
|
(a == null ? void 0 : a.showOn) === "click" && Ae();
|
|
4102
4109
|
}
|
|
4103
|
-
},
|
|
4110
|
+
}, Ma = () => {
|
|
4104
4111
|
if (typeof document > "u") return;
|
|
4105
4112
|
const e = document.getElementById("fictoan-tooltip-singleton");
|
|
4106
|
-
if (e &&
|
|
4113
|
+
if (e && We) {
|
|
4107
4114
|
oe = e;
|
|
4108
4115
|
return;
|
|
4109
4116
|
}
|
|
4110
|
-
|
|
4117
|
+
We = !1, oe = null, pe = null, oe = document.createElement("div"), oe.id = "fictoan-tooltip-singleton", document.body.appendChild(oe), pe = Pt(oe), pe.render(
|
|
4111
4118
|
/* @__PURE__ */ o(De, { content: null, isVisible: !1, position: { top: -9999, left: -9999 }, zIndex: 1e5 })
|
|
4112
|
-
), document.addEventListener("mouseover",
|
|
4113
|
-
},
|
|
4119
|
+
), document.addEventListener("mouseover", $a), document.addEventListener("mouseout", xa), document.addEventListener("click", Ra), window.addEventListener("scroll", Ze, !0), window.addEventListener("resize", Ze), We = !0;
|
|
4120
|
+
}, tr = ({
|
|
4114
4121
|
children: e,
|
|
4115
4122
|
isTooltipFor: t,
|
|
4116
4123
|
showOn: a = "hover",
|
|
@@ -4118,29 +4125,29 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4118
4125
|
zIndex: c = 1e5
|
|
4119
4126
|
}) => {
|
|
4120
4127
|
const n = Y({ content: e, position: r, showOn: a, zIndex: c });
|
|
4121
|
-
return n.current = { content: e, position: r, showOn: a, zIndex: c },
|
|
4128
|
+
return n.current = { content: e, position: r, showOn: a, zIndex: c }, U(() => (Ma(), me.set(t, n.current), ce === t && ve && Re(n.current, ve), () => {
|
|
4122
4129
|
me.delete(t), ce === t && Ae();
|
|
4123
|
-
}), [t]),
|
|
4124
|
-
me.set(t, n.current), ce === t && ve &&
|
|
4130
|
+
}), [t]), U(() => {
|
|
4131
|
+
me.set(t, n.current), ce === t && ve && Re(n.current, ve);
|
|
4125
4132
|
}, [e, r, a, c, t]), null;
|
|
4126
|
-
},
|
|
4133
|
+
}, ke = N.forwardRef(
|
|
4127
4134
|
({ fontStyle: e = "sans-serif", weight: t, align: a, ...r }, c) => {
|
|
4128
4135
|
let n = [];
|
|
4129
4136
|
return t && n.push(`weight-${t}`), e && n.push(`font-${e}`), a && n.push(`text-${a}`), /* @__PURE__ */ o(D, { ref: c, classNames: n, ...r });
|
|
4130
4137
|
}
|
|
4131
|
-
),
|
|
4132
|
-
|
|
4133
|
-
const
|
|
4134
|
-
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4137
|
-
const
|
|
4138
|
-
|
|
4139
|
-
const
|
|
4140
|
-
|
|
4141
|
-
const
|
|
4142
|
-
|
|
4143
|
-
const
|
|
4138
|
+
), Ea = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h1", ref: t, ...e }));
|
|
4139
|
+
Ea.displayName = "Heading1";
|
|
4140
|
+
const Pa = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h2", ref: t, ...e }));
|
|
4141
|
+
Pa.displayName = "Heading2";
|
|
4142
|
+
const Sa = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h3", ref: t, ...e }));
|
|
4143
|
+
Sa.displayName = "Heading3";
|
|
4144
|
+
const Ia = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h4", ref: t, ...e }));
|
|
4145
|
+
Ia.displayName = "Heading4";
|
|
4146
|
+
const Ta = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h5", ref: t, ...e }));
|
|
4147
|
+
Ta.displayName = "Heading5";
|
|
4148
|
+
const Da = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h6", ref: t, ...e }));
|
|
4149
|
+
Da.displayName = "Heading6";
|
|
4150
|
+
const Aa = N.forwardRef(
|
|
4144
4151
|
({ summary: e, children: t, isOpen: a = !1, ...r }, c) => /* @__PURE__ */ I(
|
|
4145
4152
|
D,
|
|
4146
4153
|
{
|
|
@@ -4167,81 +4174,81 @@ const Da = N.forwardRef(
|
|
|
4167
4174
|
}
|
|
4168
4175
|
)
|
|
4169
4176
|
);
|
|
4170
|
-
|
|
4177
|
+
Aa.displayName = "Accordion";
|
|
4171
4178
|
export {
|
|
4172
|
-
|
|
4173
|
-
|
|
4179
|
+
ua as $,
|
|
4180
|
+
Aa as A,
|
|
4174
4181
|
Be as B,
|
|
4175
|
-
|
|
4176
|
-
|
|
4182
|
+
et as C,
|
|
4183
|
+
Dt as D,
|
|
4177
4184
|
D as E,
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4185
|
+
_a as F,
|
|
4186
|
+
aa as G,
|
|
4187
|
+
Ga as H,
|
|
4188
|
+
Pe as I,
|
|
4189
|
+
sa as J,
|
|
4190
|
+
qa as K,
|
|
4191
|
+
Yt as L,
|
|
4192
|
+
Ka as M,
|
|
4193
|
+
It as N,
|
|
4194
|
+
ia as O,
|
|
4195
|
+
Jt as P,
|
|
4196
|
+
st as Q,
|
|
4197
|
+
nt as R,
|
|
4198
|
+
ja as S,
|
|
4199
|
+
ct as T,
|
|
4200
|
+
la as U,
|
|
4201
|
+
it as V,
|
|
4202
|
+
Za as W,
|
|
4203
|
+
Ya as X,
|
|
4204
|
+
Ja as Y,
|
|
4205
|
+
ca as Z,
|
|
4206
|
+
da as _,
|
|
4207
|
+
He as a,
|
|
4208
|
+
fa as a0,
|
|
4209
|
+
pa as a1,
|
|
4210
|
+
ma as a2,
|
|
4211
|
+
ha as a3,
|
|
4212
|
+
va as a4,
|
|
4213
|
+
ht as a5,
|
|
4214
|
+
ya as a6,
|
|
4215
|
+
wa as a7,
|
|
4216
|
+
ba as a8,
|
|
4217
|
+
Qa as a9,
|
|
4218
|
+
Na as aa,
|
|
4219
|
+
er as ab,
|
|
4220
|
+
tr as ac,
|
|
4221
|
+
Ea as ad,
|
|
4222
|
+
Pa as ae,
|
|
4223
|
+
Sa as af,
|
|
4224
|
+
Ia as ag,
|
|
4225
|
+
Ta as ah,
|
|
4226
|
+
Da as ai,
|
|
4220
4227
|
J as aj,
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4228
|
+
At as b,
|
|
4229
|
+
Bt as c,
|
|
4230
|
+
tt as d,
|
|
4231
|
+
Ot as e,
|
|
4232
|
+
at as f,
|
|
4226
4233
|
K as g,
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4234
|
+
Wa as h,
|
|
4235
|
+
za as i,
|
|
4236
|
+
Ha as j,
|
|
4237
|
+
Xa as k,
|
|
4238
|
+
Ua as l,
|
|
4239
|
+
_e as m,
|
|
4233
4240
|
Vt as n,
|
|
4234
|
-
|
|
4235
|
-
|
|
4241
|
+
rt as o,
|
|
4242
|
+
Gt as p,
|
|
4236
4243
|
ee as q,
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4244
|
+
Kt as r,
|
|
4245
|
+
Ee as s,
|
|
4246
|
+
ot as t,
|
|
4247
|
+
Zt as u,
|
|
4248
|
+
ea as v,
|
|
4249
|
+
lt as w,
|
|
4250
|
+
Ge as x,
|
|
4251
|
+
Wt as y,
|
|
4252
|
+
ta as z
|
|
4246
4253
|
};
|
|
4247
|
-
//# sourceMappingURL=Accordion-
|
|
4254
|
+
//# sourceMappingURL=Accordion-CeGNgNW8.js.map
|