fictoan-react 2.0.0-beta.12 → 2.0.0-beta.14
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-COVfCbBL.js} +646 -642
- package/dist/Accordion-COVfCbBL.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.map +1 -1
- package/dist/components/Meter/Meter.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.css +67 -89
- 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,
|
|
@@ -19,7 +19,7 @@ const Pt = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
|
19
19
|
bgOpacity: u,
|
|
20
20
|
borderColor: p,
|
|
21
21
|
borderColour: f,
|
|
22
|
-
borderOpacity:
|
|
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
|
-
|
|
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,
|
|
75
76
|
...u && { "--bg-opacity": Number(u) / 100 },
|
|
76
|
-
|
|
77
|
+
...$ && { "--border-opacity": Number($) / 100 }
|
|
77
78
|
};
|
|
78
79
|
return /* @__PURE__ */ o(
|
|
79
80
|
e,
|
|
@@ -83,9 +84,10 @@ 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}`,
|
|
@@ -96,48 +98,48 @@ const Pt = (e) => e.filter((t) => !!t).join(" "), D = N.forwardRef(
|
|
|
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" }) }),
|
|
@@ -196,7 +198,7 @@ const de = (e, t) => N.forwardRef(
|
|
|
196
198
|
className: "badge-action-button",
|
|
197
199
|
onClick: d,
|
|
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,
|
|
@@ -230,13 +232,13 @@ const We = (e, t) => {
|
|
|
230
232
|
showOverlay: u = !0,
|
|
231
233
|
blurOverlay: p = !1,
|
|
232
234
|
closeOnClickOutside: f = !0,
|
|
233
|
-
zIndex:
|
|
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,
|
|
@@ -245,19 +247,19 @@ const We = (e, t) => {
|
|
|
245
247
|
...p ? ["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
257
|
L.key === "Escape" && d && a && r && r();
|
|
256
258
|
};
|
|
257
259
|
return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
|
|
258
|
-
}, [d, a, r]),
|
|
260
|
+
}, [d, a, r]), ze(V, () => {
|
|
259
261
|
f && d && a && r && r();
|
|
260
|
-
}), /* @__PURE__ */ I(
|
|
262
|
+
}), /* @__PURE__ */ I(Me, { children: [
|
|
261
263
|
u && /* @__PURE__ */ o(
|
|
262
264
|
K,
|
|
263
265
|
{
|
|
@@ -265,7 +267,7 @@ const We = (e, t) => {
|
|
|
265
267
|
"data-drawer-overlay-for": e,
|
|
266
268
|
"aria-hidden": "true",
|
|
267
269
|
onClick: f && d && r ? r : void 0,
|
|
268
|
-
style: { zIndex:
|
|
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,7 +286,7 @@ 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
|
d && r && /* @__PURE__ */ o(
|
|
@@ -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,7 +380,7 @@ 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}`);
|
|
@@ -386,15 +388,15 @@ const je = N.forwardRef(
|
|
|
386
388
|
if (!N.isValidElement(d)) return i;
|
|
387
389
|
const p = u === s.length - 1;
|
|
388
390
|
let f;
|
|
389
|
-
if (d.type ===
|
|
390
|
-
const
|
|
391
|
-
f = N.cloneElement(
|
|
391
|
+
if (d.type === Xe) {
|
|
392
|
+
const $ = d;
|
|
393
|
+
f = N.cloneElement($, {
|
|
392
394
|
current: p
|
|
393
395
|
});
|
|
394
396
|
} else
|
|
395
|
-
f = /* @__PURE__ */ o(
|
|
397
|
+
f = /* @__PURE__ */ o(Xe, { current: p, children: d }, `item-${u}`);
|
|
396
398
|
return i.push(f), p || i.push(
|
|
397
|
-
/* @__PURE__ */ o(
|
|
399
|
+
/* @__PURE__ */ o(Lt, { separator: t }, `sep-${u}`)
|
|
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",
|
|
@@ -463,9 +465,9 @@ const Bt = N.forwardRef(({
|
|
|
463
465
|
shadow: d,
|
|
464
466
|
...u
|
|
465
467
|
}, p) => {
|
|
466
|
-
const [f,
|
|
467
|
-
let
|
|
468
|
-
e || (
|
|
468
|
+
const [f, $] = 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
|
{
|
|
@@ -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",
|
|
@@ -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",
|
|
@@ -820,12 +822,13 @@ const Ct = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
820
822
|
children: d,
|
|
821
823
|
...u
|
|
822
824
|
}, p) => {
|
|
823
|
-
const f = e || t,
|
|
825
|
+
const f = e || t, $ = r || c;
|
|
824
826
|
return /* @__PURE__ */ I(
|
|
825
827
|
D,
|
|
826
828
|
{
|
|
827
829
|
as: "div",
|
|
828
830
|
"data-form-item": !0,
|
|
831
|
+
"data-form-spaced": !0,
|
|
829
832
|
ref: p,
|
|
830
833
|
role: "group",
|
|
831
834
|
required: s,
|
|
@@ -833,11 +836,11 @@ const Ct = ({ state: e }) => e === "valid" ? /* @__PURE__ */ o(
|
|
|
833
836
|
...u,
|
|
834
837
|
children: [
|
|
835
838
|
f && /* @__PURE__ */ I(K, { "data-label-wrapper": !0, "data-has-validation": n ? "true" : void 0, children: [
|
|
836
|
-
t || e && /* @__PURE__ */ o(
|
|
837
|
-
n && /* @__PURE__ */ o(
|
|
839
|
+
t || e && /* @__PURE__ */ o(Ee, { label: e, htmlFor: a }),
|
|
840
|
+
n && /* @__PURE__ */ o(Ft, { state: n })
|
|
838
841
|
] }),
|
|
839
842
|
/* @__PURE__ */ o(K, { "data-input-wrapper": !0, children: d }),
|
|
840
|
-
|
|
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,
|
|
@@ -862,11 +865,11 @@ const He = N.forwardRef(
|
|
|
862
865
|
required: u,
|
|
863
866
|
size: p = "medium",
|
|
864
867
|
labelFirst: f,
|
|
865
|
-
|
|
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
|
{
|
|
@@ -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,
|
|
@@ -925,11 +928,11 @@ const _e = N.forwardRef(
|
|
|
925
928
|
required: u,
|
|
926
929
|
size: p = "medium",
|
|
927
930
|
labelFirst: f,
|
|
928
|
-
|
|
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
|
{
|
|
@@ -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,
|
|
@@ -988,21 +991,21 @@ const Vt = N.forwardRef(
|
|
|
988
991
|
equaliseWidth: u,
|
|
989
992
|
equalizeWidth: p,
|
|
990
993
|
required: f,
|
|
991
|
-
disabled:
|
|
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
1011
|
return d && E.push(`align-${d}`), (u || p) && E.push("equalise-width"), k && E.push("with-columns"), m && E.push("label-first"), /* @__PURE__ */ o(
|
|
@@ -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,
|
|
@@ -1064,21 +1067,21 @@ const Ft = N.forwardRef(
|
|
|
1064
1067
|
equaliseWidth: u,
|
|
1065
1068
|
equalizeWidth: p,
|
|
1066
1069
|
required: f,
|
|
1067
|
-
disabled:
|
|
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
1087
|
return d && E.push(`align-${d}`), (u || p) && E.push("equalise-width"), k && E.push("with-columns"), m && E.push("label-first"), /* @__PURE__ */ o(
|
|
@@ -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,
|
|
@@ -1140,7 +1143,7 @@ const at = N.forwardRef(
|
|
|
1140
1143
|
onChange: u,
|
|
1141
1144
|
className: p = "",
|
|
1142
1145
|
instructionMainText: f = "Drag and drop or click to upload",
|
|
1143
|
-
instructionSubText:
|
|
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,7 +1162,7 @@ const at = N.forwardRef(
|
|
|
1159
1162
|
z(M);
|
|
1160
1163
|
}, z = (h) => {
|
|
1161
1164
|
if (l)
|
|
1162
|
-
E((M) => [...M, ...h]), u == null || u([...
|
|
1165
|
+
E((M) => [...M, ...h]), u == null || u([...V, ...h]);
|
|
1163
1166
|
else {
|
|
1164
1167
|
const M = h[0];
|
|
1165
1168
|
E([M]), u == null || u([M]);
|
|
@@ -1170,12 +1173,12 @@ const at = N.forwardRef(
|
|
|
1170
1173
|
z(M);
|
|
1171
1174
|
}
|
|
1172
1175
|
}, B = (h) => {
|
|
1173
|
-
const M =
|
|
1176
|
+
const M = V.filter((O, H) => H !== h);
|
|
1174
1177
|
E(M), u == null || u(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,12 +1188,12 @@ 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" : "",
|
|
@@ -1226,12 +1229,12 @@ const at = N.forwardRef(
|
|
|
1226
1229
|
),
|
|
1227
1230
|
f && /* @__PURE__ */ I(K, { className: "file-upload-content", children: [
|
|
1228
1231
|
/* @__PURE__ */ o(J, { children: f }),
|
|
1229
|
-
|
|
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,
|
|
@@ -1271,7 +1274,7 @@ const Se = N.forwardRef(
|
|
|
1271
1274
|
validateThis: u,
|
|
1272
1275
|
valid: p,
|
|
1273
1276
|
invalid: f,
|
|
1274
|
-
validationState:
|
|
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,47 +1298,47 @@ 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 = $ ?? (u ? 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), u && re(), k == null || k(
|
|
1314
|
-
}, W = (
|
|
1315
|
-
m == null || m(
|
|
1312
|
+
le(q.validity.valid ? "valid" : "invalid");
|
|
1313
|
+
}, we = (q) => {
|
|
1314
|
+
v == null || v(q.target.value), O && u && re();
|
|
1315
|
+
}, ge = (q) => {
|
|
1316
|
+
H(!0), u && 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) &&
|
|
1329
|
+
(i || s) && q(x.current, "left"), (d || l) && q(h.current, "right");
|
|
1327
1330
|
}, [i, d, s, l]);
|
|
1328
|
-
const X = (
|
|
1329
|
-
if (!
|
|
1330
|
-
const ue = typeof
|
|
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
1344
|
}, Q = !!(s || i), se = !!(l || d), { wrapperProps: $e, inputProps: Ce } = ie(B);
|
|
@@ -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,
|
|
@@ -1379,13 +1382,13 @@ const Se = N.forwardRef(
|
|
|
1379
1382
|
"aria-invalid": y || f,
|
|
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",
|
|
1391
|
+
X(s || i, "left", x),
|
|
1389
1392
|
X(l || d, "right", h)
|
|
1390
1393
|
] })
|
|
1391
1394
|
]
|
|
@@ -1393,8 +1396,8 @@ const Se = N.forwardRef(
|
|
|
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,
|
|
@@ -1434,7 +1437,7 @@ const st = N.forwardRef(
|
|
|
1434
1437
|
labelFirst: u,
|
|
1435
1438
|
...p
|
|
1436
1439
|
}, f) => {
|
|
1437
|
-
const
|
|
1440
|
+
const $ = ye(() => t || e, [t, e]), v = (A) => {
|
|
1438
1441
|
A.target.checked && s && s(a);
|
|
1439
1442
|
}, { wrapperProps: k, inputProps: m } = ie(p);
|
|
1440
1443
|
return /* @__PURE__ */ o(
|
|
@@ -1464,7 +1467,7 @@ 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,
|
|
@@ -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,
|
|
@@ -1504,17 +1507,17 @@ const nt = N.forwardRef(
|
|
|
1504
1507
|
equaliseWidth: u,
|
|
1505
1508
|
equalizeWidth: p,
|
|
1506
1509
|
required: f,
|
|
1507
|
-
disabled:
|
|
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 d &&
|
|
1519
|
+
let F = [];
|
|
1520
|
+
return d && F.push(`align-${d}`), (u || p) && 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,
|
|
@@ -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",
|
|
@@ -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,
|
|
@@ -1619,7 +1622,7 @@ const it = N.forwardRef(
|
|
|
1619
1622
|
className: u,
|
|
1620
1623
|
...p
|
|
1621
1624
|
}, f) => {
|
|
1622
|
-
const
|
|
1625
|
+
const $ = ye(() => s || n, [s, n]), v = (R) => /* @__PURE__ */ o(
|
|
1623
1626
|
D,
|
|
1624
1627
|
{
|
|
1625
1628
|
as: "option",
|
|
@@ -1655,7 +1658,7 @@ const it = N.forwardRef(
|
|
|
1655
1658
|
as: "select",
|
|
1656
1659
|
ref: f,
|
|
1657
1660
|
id: n,
|
|
1658
|
-
name:
|
|
1661
|
+
name: $,
|
|
1659
1662
|
disabled: d,
|
|
1660
1663
|
required: r,
|
|
1661
1664
|
onChange: m,
|
|
@@ -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,
|
|
@@ -1688,7 +1691,7 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1688
1691
|
id: u,
|
|
1689
1692
|
name: p,
|
|
1690
1693
|
rows: f,
|
|
1691
|
-
cols:
|
|
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
1717
|
if (d) {
|
|
1715
|
-
const B = l.trim().split(/\s+/).filter(Boolean).length, b =
|
|
1718
|
+
const B = l.trim().split(/\s+/).filter(Boolean).length, b = Ue(B, d), x = Math.max(0, B - d), h = d - 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: [
|
|
@@ -1749,7 +1752,7 @@ const Xe = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", I
|
|
|
1749
1752
|
name: p,
|
|
1750
1753
|
value: l,
|
|
1751
1754
|
rows: f,
|
|
1752
|
-
cols:
|
|
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,7 +1794,7 @@ 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,
|
|
@@ -1801,16 +1804,16 @@ const Wt = {
|
|
|
1801
1804
|
isHorizontal: u,
|
|
1802
1805
|
...p
|
|
1803
1806
|
} = c;
|
|
1804
|
-
return /* @__PURE__ */
|
|
1807
|
+
return /* @__PURE__ */ Mt(st, { ...{
|
|
1805
1808
|
desktopSpan: s,
|
|
1806
1809
|
tabletLandscapeSpan: l,
|
|
1807
1810
|
tabletPortraitSpan: i,
|
|
1808
1811
|
mobileSpan: d,
|
|
1809
1812
|
isHorizontal: u
|
|
1810
|
-
}, key: `${c.name}-${n}` },
|
|
1813
|
+
}, key: `${c.name}-${n}` }, Ht(p, 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}`);
|
|
@@ -1818,7 +1821,7 @@ const Wt = {
|
|
|
1818
1821
|
a && a({
|
|
1819
1822
|
[u]: p
|
|
1820
1823
|
});
|
|
1821
|
-
}, d = t != null && t.length ?
|
|
1824
|
+
}, d = t != null && t.length ? _t(t, i, e) : r;
|
|
1822
1825
|
return /* @__PURE__ */ I(
|
|
1823
1826
|
D,
|
|
1824
1827
|
{
|
|
@@ -1829,14 +1832,14 @@ const Wt = {
|
|
|
1829
1832
|
...n,
|
|
1830
1833
|
children: [
|
|
1831
1834
|
d,
|
|
1832
|
-
c && /* @__PURE__ */ o(
|
|
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,
|
|
@@ -1853,6 +1856,7 @@ const Gt = N.forwardRef(
|
|
|
1853
1856
|
{
|
|
1854
1857
|
as: "div",
|
|
1855
1858
|
"data-form-item-group": !0,
|
|
1859
|
+
"data-form-spaced": !0,
|
|
1856
1860
|
ref: l,
|
|
1857
1861
|
id: i,
|
|
1858
1862
|
role: "group",
|
|
@@ -1864,8 +1868,8 @@ const Gt = N.forwardRef(
|
|
|
1864
1868
|
);
|
|
1865
1869
|
}
|
|
1866
1870
|
);
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1871
|
+
Kt.displayName = "FormItemGroup";
|
|
1872
|
+
const jt = (e, t) => {
|
|
1869
1873
|
const a = [], r = e.length, c = t.length;
|
|
1870
1874
|
if (r === 0) return c;
|
|
1871
1875
|
if (c === 0) return r;
|
|
@@ -1884,18 +1888,18 @@ const Kt = (e, t) => {
|
|
|
1884
1888
|
// Substitution
|
|
1885
1889
|
);
|
|
1886
1890
|
return a[c][r];
|
|
1887
|
-
},
|
|
1891
|
+
}, Xt = (e, t) => {
|
|
1888
1892
|
let a = 0, r = 0;
|
|
1889
1893
|
for (; a < e.length && r < t.length; )
|
|
1890
1894
|
e[a] === t[r] && a++, r++;
|
|
1891
1895
|
return a === e.length;
|
|
1892
|
-
},
|
|
1896
|
+
}, Ut = (e) => e.split(/[\s\-_]+/).map((t) => t.slice(0, 2)).join("").toLowerCase(), qt = (e, t) => {
|
|
1893
1897
|
if (!t) return e;
|
|
1894
1898
|
const a = t.toLowerCase().trim(), r = Math.floor(a.length / 2);
|
|
1895
1899
|
return e.map((n) => {
|
|
1896
|
-
const s = n.label.toLowerCase(), l =
|
|
1897
|
-
(
|
|
1898
|
-
), p =
|
|
1900
|
+
const s = n.label.toLowerCase(), l = jt(a, s), i = s.split(/[\s\-_]+/), d = a.split(/[\s\-_]+/), u = s.includes(a) || d.every(
|
|
1901
|
+
($) => i.some((v) => v.startsWith($))
|
|
1902
|
+
), p = Ut(s), f = Xt(a, p);
|
|
1899
1903
|
return {
|
|
1900
1904
|
option: n,
|
|
1901
1905
|
distance: l,
|
|
@@ -1905,7 +1909,7 @@ const Kt = (e, t) => {
|
|
|
1905
1909
|
}).filter(
|
|
1906
1910
|
({ distance: n, isPartialMatch: s, isAcronymMatch: l }) => s || l || n <= r
|
|
1907
1911
|
).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
|
-
},
|
|
1912
|
+
}, Yt = N.forwardRef(
|
|
1909
1913
|
({
|
|
1910
1914
|
options: e = [],
|
|
1911
1915
|
label: t,
|
|
@@ -1920,18 +1924,18 @@ const Kt = (e, t) => {
|
|
|
1920
1924
|
allowMultiSelect: u = !1,
|
|
1921
1925
|
allowCustomEntries: p = !1,
|
|
1922
1926
|
isLoading: f,
|
|
1923
|
-
value:
|
|
1927
|
+
value: $,
|
|
1924
1928
|
isFullWidth: v,
|
|
1925
1929
|
className: k,
|
|
1926
1930
|
required: m,
|
|
1927
1931
|
size: A,
|
|
1928
1932
|
...y
|
|
1929
1933
|
}, R) => {
|
|
1930
|
-
const [T,
|
|
1931
|
-
|
|
1934
|
+
const [T, F] = j(!1), [V, E] = j(""), [P, g] = j(-1), [L, _] = j(null), [S, w] = j([]), [z, C] = j(!1);
|
|
1935
|
+
U(() => {
|
|
1932
1936
|
s && l && l(s);
|
|
1933
1937
|
}, []);
|
|
1934
|
-
const B = N.useMemo(() => [...e], [e]), b = Y(null),
|
|
1938
|
+
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
1939
|
if (W.disabled) return;
|
|
1936
1940
|
let X;
|
|
1937
1941
|
if (u) {
|
|
@@ -1944,13 +1948,13 @@ const Kt = (e, t) => {
|
|
|
1944
1948
|
}
|
|
1945
1949
|
w(X), l == null || l(X.map((se) => se.value));
|
|
1946
1950
|
} else
|
|
1947
|
-
X = [W], _(W), w(X), l == null || l(W.value),
|
|
1951
|
+
X = [W], _(W), w(X), l == null || l(W.value), F(!1);
|
|
1948
1952
|
E(""), g(-1);
|
|
1949
1953
|
}, Z = (W) => {
|
|
1950
1954
|
E(W);
|
|
1951
1955
|
}, le = () => {
|
|
1952
|
-
if (!
|
|
1953
|
-
const W =
|
|
1956
|
+
if (!V.trim() || !p) return;
|
|
1957
|
+
const W = V.trim(), X = {
|
|
1954
1958
|
value: W,
|
|
1955
1959
|
label: W
|
|
1956
1960
|
};
|
|
@@ -1968,24 +1972,24 @@ const Kt = (e, t) => {
|
|
|
1968
1972
|
case "ArrowDown":
|
|
1969
1973
|
W.preventDefault(), T ? g(
|
|
1970
1974
|
(X) => X < O.length - 1 ? X + 1 : X
|
|
1971
|
-
) : (
|
|
1975
|
+
) : (F(!0), g(0));
|
|
1972
1976
|
break;
|
|
1973
1977
|
case "ArrowUp":
|
|
1974
1978
|
W.preventDefault(), g((X) => X > 0 ? X - 1 : X);
|
|
1975
1979
|
break;
|
|
1976
1980
|
case "Enter":
|
|
1977
|
-
if (W.preventDefault(), p &&
|
|
1981
|
+
if (W.preventDefault(), p && V.trim()) {
|
|
1978
1982
|
const X = O.find(
|
|
1979
|
-
(Q) => Q.label.toLowerCase() ===
|
|
1983
|
+
(Q) => Q.label.toLowerCase() === V.trim().toLowerCase()
|
|
1980
1984
|
);
|
|
1981
1985
|
X ? H(X) : le();
|
|
1982
1986
|
} else P >= 0 && O[P] && H(O[P]);
|
|
1983
1987
|
break;
|
|
1984
1988
|
case "Escape":
|
|
1985
|
-
W.preventDefault(),
|
|
1989
|
+
W.preventDefault(), F(!1), g(-1);
|
|
1986
1990
|
break;
|
|
1987
1991
|
case " ":
|
|
1988
|
-
T || (W.preventDefault(),
|
|
1992
|
+
T || (W.preventDefault(), F(!0), g(0));
|
|
1989
1993
|
break;
|
|
1990
1994
|
case "Home":
|
|
1991
1995
|
T && (W.preventDefault(), g(0));
|
|
@@ -1995,23 +1999,23 @@ const Kt = (e, t) => {
|
|
|
1995
1999
|
break;
|
|
1996
2000
|
}
|
|
1997
2001
|
};
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
}),
|
|
2001
|
-
T &&
|
|
2002
|
-
}, [T]),
|
|
2002
|
+
ze(b, () => {
|
|
2003
|
+
F(!1), g(-1);
|
|
2004
|
+
}), U(() => {
|
|
2005
|
+
T && x.current && x.current.focus();
|
|
2006
|
+
}, [T]), U(() => {
|
|
2003
2007
|
if (T && b.current) {
|
|
2004
2008
|
const W = b.current.getBoundingClientRect(), X = window.innerHeight, Q = 300, se = X - W.bottom, $e = W.top;
|
|
2005
2009
|
C(se < Q && $e > se);
|
|
2006
2010
|
} else
|
|
2007
2011
|
C(!1);
|
|
2008
|
-
}, [T]),
|
|
2012
|
+
}, [T]), U(() => {
|
|
2009
2013
|
if (P >= 0) {
|
|
2010
2014
|
const W = document.querySelector(`[data-index="${P}"]`);
|
|
2011
2015
|
W == null || W.scrollIntoView({ block: "nearest" });
|
|
2012
2016
|
}
|
|
2013
2017
|
}, [P]);
|
|
2014
|
-
const { wrapperProps: we, inputProps:
|
|
2018
|
+
const { wrapperProps: we, inputProps: ge } = ie(y);
|
|
2015
2019
|
return /* @__PURE__ */ o(
|
|
2016
2020
|
ee,
|
|
2017
2021
|
{
|
|
@@ -2031,13 +2035,13 @@ const Kt = (e, t) => {
|
|
|
2031
2035
|
classNames: ["list-box-wrapper", i ? "disabled" : "", k || ""],
|
|
2032
2036
|
ref: b,
|
|
2033
2037
|
isFullWidth: v,
|
|
2034
|
-
...
|
|
2038
|
+
...ge,
|
|
2035
2039
|
children: [
|
|
2036
2040
|
/* @__PURE__ */ I(
|
|
2037
2041
|
K,
|
|
2038
2042
|
{
|
|
2039
2043
|
className: "list-box-input-wrapper",
|
|
2040
|
-
onClick: () => !i &&
|
|
2044
|
+
onClick: () => !i && F(!T),
|
|
2041
2045
|
role: "combobox",
|
|
2042
2046
|
"aria-haspopup": "listbox",
|
|
2043
2047
|
"aria-expanded": T,
|
|
@@ -2045,7 +2049,7 @@ const Kt = (e, t) => {
|
|
|
2045
2049
|
"aria-owns": `${M}-listbox`,
|
|
2046
2050
|
tabIndex: i ? -1 : 0,
|
|
2047
2051
|
children: [
|
|
2048
|
-
u ? /* @__PURE__ */ I(
|
|
2052
|
+
u ? /* @__PURE__ */ I(Me, { children: [
|
|
2049
2053
|
S.length > 0 ? /* @__PURE__ */ I(K, { className: "options-wrapper", children: [
|
|
2050
2054
|
/* @__PURE__ */ o(K, { className: "options-list", children: S.map((W) => /* @__PURE__ */ o(
|
|
2051
2055
|
Be,
|
|
@@ -2094,13 +2098,13 @@ const Kt = (e, t) => {
|
|
|
2094
2098
|
children: [
|
|
2095
2099
|
/* @__PURE__ */ I(K, { className: "list-box-search-wrapper", children: [
|
|
2096
2100
|
/* @__PURE__ */ o(
|
|
2097
|
-
|
|
2101
|
+
Pe,
|
|
2098
2102
|
{
|
|
2099
2103
|
type: "text",
|
|
2100
|
-
ref:
|
|
2104
|
+
ref: x,
|
|
2101
2105
|
className: "list-box-search",
|
|
2102
2106
|
placeholder: p ? "Type to search or add new" : "Search",
|
|
2103
|
-
value:
|
|
2107
|
+
value: V,
|
|
2104
2108
|
onChange: Z,
|
|
2105
2109
|
onKeyDown: re,
|
|
2106
2110
|
"aria-controls": `${M}-listbox`,
|
|
@@ -2108,7 +2112,7 @@ const Kt = (e, t) => {
|
|
|
2108
2112
|
isFullWidth: !0
|
|
2109
2113
|
}
|
|
2110
2114
|
),
|
|
2111
|
-
p &&
|
|
2115
|
+
p && V.trim() && !S.some((W) => W.label.toLowerCase() === V.trim().toLowerCase()) && /* @__PURE__ */ o(
|
|
2112
2116
|
"kbd",
|
|
2113
2117
|
{
|
|
2114
2118
|
className: "list-box-enter-key",
|
|
@@ -2162,11 +2166,11 @@ const Kt = (e, t) => {
|
|
|
2162
2166
|
);
|
|
2163
2167
|
}
|
|
2164
2168
|
);
|
|
2165
|
-
|
|
2166
|
-
function
|
|
2169
|
+
Yt.displayName = "ListBox";
|
|
2170
|
+
function qe(e, t) {
|
|
2167
2171
|
return (t === "alphanumeric" ? /^[a-zA-Z0-9]+$/i : /^[0-9]+$/).test(e);
|
|
2168
2172
|
}
|
|
2169
|
-
const
|
|
2173
|
+
const Jt = N.forwardRef(
|
|
2170
2174
|
({
|
|
2171
2175
|
numberOfFields: e,
|
|
2172
2176
|
onChange: t,
|
|
@@ -2180,13 +2184,13 @@ const Yt = N.forwardRef(
|
|
|
2180
2184
|
ariaLabel: d,
|
|
2181
2185
|
...u
|
|
2182
2186
|
}, p) => {
|
|
2183
|
-
const f = Y(null), [
|
|
2187
|
+
const f = Y(null), [$, v] = j([]), [k, m] = j([]), [A, y] = j(!0), [R, T] = j(-1), F = u.id || `pin-input-${Math.random().toString(36).substring(2, 9)}`, V = d || "Enter verification code", E = G(
|
|
2184
2188
|
(B) => {
|
|
2185
|
-
var
|
|
2186
|
-
const b =
|
|
2187
|
-
(
|
|
2189
|
+
var x;
|
|
2190
|
+
const b = $[B];
|
|
2191
|
+
(x = b == null ? void 0 : b.current) == null || x.focus();
|
|
2188
2192
|
},
|
|
2189
|
-
[
|
|
2193
|
+
[$]
|
|
2190
2194
|
), P = G(
|
|
2191
2195
|
(B) => {
|
|
2192
2196
|
if (!A) return;
|
|
@@ -2198,22 +2202,22 @@ const Yt = N.forwardRef(
|
|
|
2198
2202
|
m(Array(e).fill("")), t == null || t(""), l && (E(0), T(0));
|
|
2199
2203
|
}, [e, t, E, l]), L = G(
|
|
2200
2204
|
(B, b) => {
|
|
2201
|
-
const
|
|
2202
|
-
|
|
2205
|
+
const x = [...k];
|
|
2206
|
+
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
2207
|
},
|
|
2204
2208
|
[P, e, t, k]
|
|
2205
2209
|
), _ = G((B, b) => {
|
|
2206
2210
|
var M;
|
|
2207
|
-
const
|
|
2208
|
-
if (
|
|
2211
|
+
const x = typeof B == "string" ? B : B.target.value, h = k[b];
|
|
2212
|
+
if (x === "") {
|
|
2209
2213
|
L("", b);
|
|
2210
2214
|
return;
|
|
2211
2215
|
}
|
|
2212
|
-
if (
|
|
2213
|
-
if (
|
|
2216
|
+
if (x.length > 1 && b < e - 1) {
|
|
2217
|
+
if (qe(x, a)) {
|
|
2214
2218
|
let O = [];
|
|
2215
|
-
const H =
|
|
2216
|
-
h === "" ? O = H.filter((te, ae) => b + ae < e) : ((M =
|
|
2219
|
+
const H = x.split("");
|
|
2220
|
+
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
2221
|
const Z = k.map(
|
|
2218
2222
|
(te, ae) => ae >= b && ae < b + O.length ? O[ae - b] : te
|
|
2219
2223
|
);
|
|
@@ -2222,11 +2226,11 @@ const Yt = N.forwardRef(
|
|
|
2222
2226
|
E(le);
|
|
2223
2227
|
}
|
|
2224
2228
|
} else {
|
|
2225
|
-
let O =
|
|
2226
|
-
(h == null ? void 0 : h.length) > 0 && (O =
|
|
2229
|
+
let O = x;
|
|
2230
|
+
(h == null ? void 0 : h.length) > 0 && (O = x.charAt(x.length - 1)), qe(O, a) && L(O, b);
|
|
2227
2231
|
}
|
|
2228
|
-
}, [e, t, L, a, k, E,
|
|
2229
|
-
var
|
|
2232
|
+
}, [e, t, L, a, k, E, $]), S = G((B, b) => {
|
|
2233
|
+
var x;
|
|
2230
2234
|
if (B.key === "Backspace")
|
|
2231
2235
|
if (B.target.value === "") {
|
|
2232
2236
|
if (b > 0) {
|
|
@@ -2235,8 +2239,8 @@ const Yt = N.forwardRef(
|
|
|
2235
2239
|
}
|
|
2236
2240
|
} else
|
|
2237
2241
|
y(!1);
|
|
2238
|
-
else B.key === "Escape" ? ((
|
|
2239
|
-
}, [E, L,
|
|
2242
|
+
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);
|
|
2243
|
+
}, [E, L, $, e]), w = G((B, b) => {
|
|
2240
2244
|
T(b);
|
|
2241
2245
|
}, []), z = G((B) => {
|
|
2242
2246
|
const b = B.target;
|
|
@@ -2246,13 +2250,13 @@ const Yt = N.forwardRef(
|
|
|
2246
2250
|
}, []), C = G(() => {
|
|
2247
2251
|
T(-1);
|
|
2248
2252
|
}, []);
|
|
2249
|
-
return
|
|
2250
|
-
v((B) => Array(e).fill(0).map((
|
|
2253
|
+
return U(() => {
|
|
2254
|
+
v((B) => Array(e).fill(0).map((x, h) => {
|
|
2251
2255
|
var O;
|
|
2252
|
-
const M = B[h] ||
|
|
2256
|
+
const M = B[h] || Et();
|
|
2253
2257
|
return n && h === 0 && ((O = M.current) == null || O.focus()), M;
|
|
2254
2258
|
}));
|
|
2255
|
-
}, [e, n]),
|
|
2259
|
+
}, [e, n]), Qe(
|
|
2256
2260
|
p,
|
|
2257
2261
|
() => ({
|
|
2258
2262
|
...f.current,
|
|
@@ -2266,27 +2270,27 @@ const Yt = N.forwardRef(
|
|
|
2266
2270
|
ref: f,
|
|
2267
2271
|
classNames: i ? ["full-width"] : [],
|
|
2268
2272
|
role: "group",
|
|
2269
|
-
"aria-label":
|
|
2273
|
+
"aria-label": V,
|
|
2270
2274
|
"aria-required": u.required,
|
|
2271
2275
|
...u,
|
|
2272
2276
|
children: Array.from({ length: e }, (B, b) => /* @__PURE__ */ o(
|
|
2273
|
-
|
|
2277
|
+
Pe,
|
|
2274
2278
|
{
|
|
2275
|
-
id: `${
|
|
2276
|
-
ref:
|
|
2279
|
+
id: `${F}-${b}`,
|
|
2280
|
+
ref: $[b],
|
|
2277
2281
|
type: r ? "password" : a === "number" ? "tel" : "text",
|
|
2278
2282
|
inputMode: a === "number" ? "numeric" : "text",
|
|
2279
|
-
onChange: (
|
|
2280
|
-
onKeyDown: (
|
|
2281
|
-
onFocus: (
|
|
2283
|
+
onChange: (x) => _(x, b),
|
|
2284
|
+
onKeyDown: (x) => S(x, b),
|
|
2285
|
+
onFocus: (x) => w(x, b),
|
|
2282
2286
|
onSelect: z,
|
|
2283
2287
|
onBlur: C,
|
|
2284
2288
|
placeholder: R !== b ? "⦁" : void 0,
|
|
2285
2289
|
autoComplete: c ? "one-time-code" : "off",
|
|
2286
2290
|
value: k[b] || "",
|
|
2287
2291
|
autoFocus: n && b === 0,
|
|
2288
|
-
onCopy: (
|
|
2289
|
-
onPaste: (
|
|
2292
|
+
onCopy: (x) => s === "disabled" && x.preventDefault(),
|
|
2293
|
+
onPaste: (x) => s === "disabled" && x.preventDefault(),
|
|
2290
2294
|
"aria-label": `Digit ${b + 1} of ${e}`,
|
|
2291
2295
|
"aria-required": u.required
|
|
2292
2296
|
},
|
|
@@ -2296,8 +2300,8 @@ const Yt = N.forwardRef(
|
|
|
2296
2300
|
);
|
|
2297
2301
|
}
|
|
2298
2302
|
);
|
|
2299
|
-
|
|
2300
|
-
const
|
|
2303
|
+
Jt.displayName = "PinInputField";
|
|
2304
|
+
const Zt = N.forwardRef(
|
|
2301
2305
|
({
|
|
2302
2306
|
id: e,
|
|
2303
2307
|
name: t,
|
|
@@ -2312,36 +2316,36 @@ const Jt = N.forwardRef(
|
|
|
2312
2316
|
size: u = "medium",
|
|
2313
2317
|
bgColour: p,
|
|
2314
2318
|
disabled: f,
|
|
2315
|
-
|
|
2319
|
+
...$
|
|
2316
2320
|
}, v) => {
|
|
2317
2321
|
const k = ye(() => t || e, [t, e]), m = Y(null), [A, y] = j({
|
|
2318
2322
|
width: 0,
|
|
2319
2323
|
transform: "translateX(0)"
|
|
2320
|
-
}), [R, T] = j(!1), [
|
|
2324
|
+
}), [R, T] = j(!1), [F, V] = j(0), [E, P] = j(0), g = Y([]), L = G(() => {
|
|
2321
2325
|
if (!m.current) return;
|
|
2322
|
-
const
|
|
2323
|
-
if (
|
|
2324
|
-
const M =
|
|
2326
|
+
const x = m.current, h = x.closest("[data-input-wrapper]");
|
|
2327
|
+
if (x && h) {
|
|
2328
|
+
const M = x.scrollWidth, O = h.clientWidth, H = M > O;
|
|
2325
2329
|
T(H), P(H ? M - O : 0);
|
|
2326
2330
|
}
|
|
2327
2331
|
}, []);
|
|
2328
|
-
|
|
2329
|
-
const
|
|
2330
|
-
if (
|
|
2332
|
+
U(() => {
|
|
2333
|
+
const x = m.current;
|
|
2334
|
+
if (!x) return;
|
|
2331
2335
|
L();
|
|
2332
2336
|
const h = new ResizeObserver(() => {
|
|
2333
2337
|
L();
|
|
2334
2338
|
});
|
|
2335
|
-
return h.observe(
|
|
2336
|
-
}, [L]),
|
|
2337
|
-
const
|
|
2338
|
-
if (
|
|
2339
|
+
return h.observe(x), x.closest("[data-input-wrapper]") && h.observe(x.closest("[data-input-wrapper]")), () => h.disconnect();
|
|
2340
|
+
}, [L]), U(() => {
|
|
2341
|
+
const x = n.findIndex((h) => h.value === l);
|
|
2342
|
+
if (x >= 0) {
|
|
2339
2343
|
const h = () => {
|
|
2340
|
-
const M = g.current[
|
|
2344
|
+
const M = g.current[x];
|
|
2341
2345
|
if (M) {
|
|
2342
2346
|
const O = M.offsetWidth;
|
|
2343
2347
|
let H = "translateX(0)";
|
|
2344
|
-
|
|
2348
|
+
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
2349
|
}
|
|
2346
2350
|
};
|
|
2347
2351
|
if (document.fonts && document.fonts.ready)
|
|
@@ -2356,17 +2360,17 @@ const Jt = N.forwardRef(
|
|
|
2356
2360
|
}
|
|
2357
2361
|
}
|
|
2358
2362
|
}, [l, n]);
|
|
2359
|
-
const _ = (
|
|
2360
|
-
d == null || d(
|
|
2361
|
-
}, { wrapperProps: S, inputProps: w } = ie(
|
|
2363
|
+
const _ = (x) => {
|
|
2364
|
+
d == null || d(x.target.value);
|
|
2365
|
+
}, { wrapperProps: S, inputProps: w } = ie($), z = G((x) => {
|
|
2362
2366
|
const h = m.current;
|
|
2363
2367
|
if (!h) return;
|
|
2364
2368
|
const O = h.clientWidth * 0.8;
|
|
2365
|
-
let H =
|
|
2366
|
-
|
|
2369
|
+
let H = x === "right" ? Math.min(F + O, E) : Math.max(F - O, 0);
|
|
2370
|
+
V(H), requestAnimationFrame(() => {
|
|
2367
2371
|
h.style.transform = `translateX(-${H}px)`;
|
|
2368
2372
|
});
|
|
2369
|
-
}, [
|
|
2373
|
+
}, [F, E]), C = F > 0, B = F < E, b = [];
|
|
2370
2374
|
return u && b.push(`size-${u}`), /* @__PURE__ */ o(
|
|
2371
2375
|
ee,
|
|
2372
2376
|
{
|
|
@@ -2412,8 +2416,8 @@ const Jt = N.forwardRef(
|
|
|
2412
2416
|
}
|
|
2413
2417
|
}
|
|
2414
2418
|
),
|
|
2415
|
-
n.map((
|
|
2416
|
-
const { id: M, ...O } =
|
|
2419
|
+
n.map((x, h) => {
|
|
2420
|
+
const { id: M, ...O } = x, H = M || `${e}-option-${h}`;
|
|
2417
2421
|
return /* @__PURE__ */ I(N.Fragment, { children: [
|
|
2418
2422
|
/* @__PURE__ */ o(
|
|
2419
2423
|
"input",
|
|
@@ -2422,8 +2426,8 @@ const Jt = N.forwardRef(
|
|
|
2422
2426
|
...O,
|
|
2423
2427
|
id: H,
|
|
2424
2428
|
name: k,
|
|
2425
|
-
checked: l ===
|
|
2426
|
-
disabled: f ||
|
|
2429
|
+
checked: l === x.value,
|
|
2430
|
+
disabled: f || x.disabled,
|
|
2427
2431
|
onChange: _
|
|
2428
2432
|
}
|
|
2429
2433
|
),
|
|
@@ -2434,7 +2438,7 @@ const Jt = N.forwardRef(
|
|
|
2434
2438
|
g.current[h] = Z;
|
|
2435
2439
|
},
|
|
2436
2440
|
htmlFor: H,
|
|
2437
|
-
children:
|
|
2441
|
+
children: x.label
|
|
2438
2442
|
}
|
|
2439
2443
|
)
|
|
2440
2444
|
] }, H);
|
|
@@ -2458,15 +2462,15 @@ const Jt = N.forwardRef(
|
|
|
2458
2462
|
);
|
|
2459
2463
|
}
|
|
2460
2464
|
);
|
|
2461
|
-
|
|
2462
|
-
function
|
|
2465
|
+
Zt.displayName = "RadioTabGroup";
|
|
2466
|
+
function Qt(e) {
|
|
2463
2467
|
return Array.isArray(e.value);
|
|
2464
2468
|
}
|
|
2465
|
-
const
|
|
2466
|
-
(e, t) =>
|
|
2469
|
+
const ea = N.forwardRef(
|
|
2470
|
+
(e, t) => Qt(e) ? /* @__PURE__ */ o(ut, { ...e, forwardedRef: t }) : /* @__PURE__ */ o(dt, { ...e, forwardedRef: t })
|
|
2467
2471
|
);
|
|
2468
|
-
|
|
2469
|
-
const
|
|
2472
|
+
ea.displayName = "Range";
|
|
2473
|
+
const dt = ({
|
|
2470
2474
|
label: e,
|
|
2471
2475
|
helpText: t,
|
|
2472
2476
|
errorText: a,
|
|
@@ -2481,17 +2485,17 @@ const ct = ({
|
|
|
2481
2485
|
size: p,
|
|
2482
2486
|
...f
|
|
2483
2487
|
}) => {
|
|
2484
|
-
const { wrapperProps:
|
|
2488
|
+
const { wrapperProps: $ } = ie(f), 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
2489
|
if (!k.current) return s;
|
|
2486
2490
|
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
2491
|
return Math.max(s, Math.min(l, B));
|
|
2488
2492
|
}, [s, l, i]), E = G((S) => {
|
|
2489
|
-
const w =
|
|
2493
|
+
const w = V(S);
|
|
2490
2494
|
n == null || n(w);
|
|
2491
|
-
}, [
|
|
2495
|
+
}, [V, n]), P = G((S) => {
|
|
2492
2496
|
u || (S.preventDefault(), A(!0), R(!0), E(S.clientX));
|
|
2493
2497
|
}, [u, E]);
|
|
2494
|
-
|
|
2498
|
+
U(() => {
|
|
2495
2499
|
if (!m) return;
|
|
2496
2500
|
const S = (z) => {
|
|
2497
2501
|
E(z.clientX);
|
|
@@ -2505,7 +2509,7 @@ const ct = ({
|
|
|
2505
2509
|
const g = G((S) => {
|
|
2506
2510
|
u || (A(!0), R(!0), E(S.touches[0].clientX));
|
|
2507
2511
|
}, [u, E]);
|
|
2508
|
-
|
|
2512
|
+
U(() => {
|
|
2509
2513
|
if (!m) return;
|
|
2510
2514
|
const S = (z) => {
|
|
2511
2515
|
z.preventDefault(), E(z.touches[0].clientX);
|
|
@@ -2544,13 +2548,13 @@ const ct = ({
|
|
|
2544
2548
|
return;
|
|
2545
2549
|
}
|
|
2546
2550
|
n == null || n(w);
|
|
2547
|
-
}, [u, T, s, l, i, n]), _ =
|
|
2551
|
+
}, [u, T, s, l, i, n]), _ = F(T);
|
|
2548
2552
|
return /* @__PURE__ */ o(
|
|
2549
2553
|
ee,
|
|
2550
2554
|
{
|
|
2551
2555
|
customLabel: e && /* @__PURE__ */ I(K, { "data-range-meta": !0, children: [
|
|
2552
2556
|
/* @__PURE__ */ o(
|
|
2553
|
-
|
|
2557
|
+
Ee,
|
|
2554
2558
|
{
|
|
2555
2559
|
className: "range-label",
|
|
2556
2560
|
label: e,
|
|
@@ -2565,7 +2569,7 @@ const ct = ({
|
|
|
2565
2569
|
helpText: t,
|
|
2566
2570
|
errorText: a,
|
|
2567
2571
|
size: p,
|
|
2568
|
-
|
|
2572
|
+
...$,
|
|
2569
2573
|
children: /* @__PURE__ */ I(
|
|
2570
2574
|
K,
|
|
2571
2575
|
{
|
|
@@ -2616,8 +2620,8 @@ const ct = ({
|
|
|
2616
2620
|
}
|
|
2617
2621
|
);
|
|
2618
2622
|
};
|
|
2619
|
-
|
|
2620
|
-
const
|
|
2623
|
+
dt.displayName = "SingleThumbRange";
|
|
2624
|
+
const ut = ({
|
|
2621
2625
|
label: e,
|
|
2622
2626
|
helpText: t,
|
|
2623
2627
|
errorText: a,
|
|
@@ -2631,12 +2635,12 @@ const dt = ({
|
|
|
2631
2635
|
maxLabel: u = "Maximum value",
|
|
2632
2636
|
id: p,
|
|
2633
2637
|
disabled: f,
|
|
2634
|
-
size:
|
|
2638
|
+
size: $,
|
|
2635
2639
|
...v
|
|
2636
2640
|
}) => {
|
|
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 =
|
|
2641
|
+
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) => {
|
|
2642
|
+
if (!V.current) return s;
|
|
2643
|
+
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
2644
|
return Math.max(s, Math.min(l, Z));
|
|
2641
2645
|
}, [s, l, i]), w = G((h, M) => {
|
|
2642
2646
|
const O = S(h);
|
|
@@ -2650,7 +2654,7 @@ const dt = ({
|
|
|
2650
2654
|
}, [S, y, R, i, n]), z = G((h) => (M) => {
|
|
2651
2655
|
f || (M.preventDefault(), P(h), L(h), w(M.clientX, h));
|
|
2652
2656
|
}, [f, w]);
|
|
2653
|
-
|
|
2657
|
+
U(() => {
|
|
2654
2658
|
if (!E) return;
|
|
2655
2659
|
const h = (O) => {
|
|
2656
2660
|
w(O.clientX, E);
|
|
@@ -2664,7 +2668,7 @@ const dt = ({
|
|
|
2664
2668
|
const C = G((h) => (M) => {
|
|
2665
2669
|
f || (P(h), L(h), w(M.touches[0].clientX, h));
|
|
2666
2670
|
}, [f, w]);
|
|
2667
|
-
|
|
2671
|
+
U(() => {
|
|
2668
2672
|
if (!E) return;
|
|
2669
2673
|
const h = (O) => {
|
|
2670
2674
|
O.preventDefault(), w(O.touches[0].clientX, E);
|
|
@@ -2710,13 +2714,13 @@ const dt = ({
|
|
|
2710
2714
|
const Z = Math.max(H, y + i);
|
|
2711
2715
|
n == null || n([y, Z]);
|
|
2712
2716
|
}
|
|
2713
|
-
}, [f, y, R, s, l, i, n]), b = _(y),
|
|
2717
|
+
}, [f, y, R, s, l, i, n]), b = _(y), x = _(R);
|
|
2714
2718
|
return /* @__PURE__ */ o(
|
|
2715
2719
|
ee,
|
|
2716
2720
|
{
|
|
2717
2721
|
customLabel: e && /* @__PURE__ */ I(K, { "data-range-meta": !0, children: [
|
|
2718
2722
|
/* @__PURE__ */ o(
|
|
2719
|
-
|
|
2723
|
+
Ee,
|
|
2720
2724
|
{
|
|
2721
2725
|
className: "range-label",
|
|
2722
2726
|
label: e,
|
|
@@ -2732,12 +2736,12 @@ const dt = ({
|
|
|
2732
2736
|
] }),
|
|
2733
2737
|
helpText: t,
|
|
2734
2738
|
errorText: a,
|
|
2735
|
-
size:
|
|
2739
|
+
size: $,
|
|
2736
2740
|
...k,
|
|
2737
2741
|
children: /* @__PURE__ */ I(
|
|
2738
2742
|
K,
|
|
2739
2743
|
{
|
|
2740
|
-
ref:
|
|
2744
|
+
ref: V,
|
|
2741
2745
|
"data-range-dual": !0,
|
|
2742
2746
|
className: f ? "disabled" : "",
|
|
2743
2747
|
role: "group",
|
|
@@ -2750,7 +2754,7 @@ const dt = ({
|
|
|
2750
2754
|
className: "range-track-fill",
|
|
2751
2755
|
style: {
|
|
2752
2756
|
left: `${b}%`,
|
|
2753
|
-
right: `${100 -
|
|
2757
|
+
right: `${100 - x}%`
|
|
2754
2758
|
},
|
|
2755
2759
|
"aria-hidden": "true"
|
|
2756
2760
|
}
|
|
@@ -2782,11 +2786,11 @@ const dt = ({
|
|
|
2782
2786
|
/* @__PURE__ */ o(
|
|
2783
2787
|
"button",
|
|
2784
2788
|
{
|
|
2785
|
-
ref:
|
|
2789
|
+
ref: F,
|
|
2786
2790
|
id: `${p}-max`,
|
|
2787
2791
|
type: "button",
|
|
2788
2792
|
className: "range-thumb range-thumb-max",
|
|
2789
|
-
style: { left: `${
|
|
2793
|
+
style: { left: `${x}%` },
|
|
2790
2794
|
disabled: f,
|
|
2791
2795
|
onMouseDown: z("max"),
|
|
2792
2796
|
onTouchStart: C("max"),
|
|
@@ -2809,8 +2813,8 @@ const dt = ({
|
|
|
2809
2813
|
}
|
|
2810
2814
|
);
|
|
2811
2815
|
};
|
|
2812
|
-
|
|
2813
|
-
const
|
|
2816
|
+
ut.displayName = "DualThumbRange";
|
|
2817
|
+
const ta = N.forwardRef(
|
|
2814
2818
|
({
|
|
2815
2819
|
label: e,
|
|
2816
2820
|
value: t,
|
|
@@ -2825,7 +2829,7 @@ const ea = N.forwardRef(
|
|
|
2825
2829
|
high: u,
|
|
2826
2830
|
optimum: p,
|
|
2827
2831
|
...f
|
|
2828
|
-
},
|
|
2832
|
+
}, $) => {
|
|
2829
2833
|
const v = p ? (p - l) / (i - l) * 100 : 0, k = () => {
|
|
2830
2834
|
const y = (t - l) / (i - l) * 100;
|
|
2831
2835
|
let R;
|
|
@@ -2865,7 +2869,7 @@ const ea = N.forwardRef(
|
|
|
2865
2869
|
{
|
|
2866
2870
|
as: "meter",
|
|
2867
2871
|
"data-meter": !0,
|
|
2868
|
-
ref:
|
|
2872
|
+
ref: $,
|
|
2869
2873
|
value: t,
|
|
2870
2874
|
min: l,
|
|
2871
2875
|
max: i,
|
|
@@ -2908,8 +2912,8 @@ const ea = N.forwardRef(
|
|
|
2908
2912
|
);
|
|
2909
2913
|
}
|
|
2910
2914
|
);
|
|
2911
|
-
|
|
2912
|
-
const
|
|
2915
|
+
ta.displayName = "Meter";
|
|
2916
|
+
const aa = N.forwardRef(
|
|
2913
2917
|
({
|
|
2914
2918
|
id: e,
|
|
2915
2919
|
children: t,
|
|
@@ -2923,8 +2927,8 @@ const ta = N.forwardRef(
|
|
|
2923
2927
|
description: d,
|
|
2924
2928
|
...u
|
|
2925
2929
|
}, p) => {
|
|
2926
|
-
const f = `${e}`,
|
|
2927
|
-
return s && a.push("show-backdrop"), l && a.push("blur-backdrop"),
|
|
2930
|
+
const f = `${e}`, $ = d ? `${f}-description` : void 0;
|
|
2931
|
+
return s && a.push("show-backdrop"), l && a.push("blur-backdrop"), U(() => {
|
|
2928
2932
|
const v = document.querySelector(`#${f}[data-modal]`);
|
|
2929
2933
|
if (!(!v || !(v instanceof HTMLElement)))
|
|
2930
2934
|
if (r) {
|
|
@@ -2935,7 +2939,7 @@ const ta = N.forwardRef(
|
|
|
2935
2939
|
k.length && k[0].focus();
|
|
2936
2940
|
} else
|
|
2937
2941
|
v.matches(":popover-open") && v.hidePopover();
|
|
2938
|
-
}, [r, f]),
|
|
2942
|
+
}, [r, f]), U(() => {
|
|
2939
2943
|
const v = document.querySelector(`#${f}[data-modal]`);
|
|
2940
2944
|
if (!v || !(v instanceof HTMLElement)) return;
|
|
2941
2945
|
const k = (m) => {
|
|
@@ -2954,7 +2958,7 @@ const ta = N.forwardRef(
|
|
|
2954
2958
|
role: "dialog",
|
|
2955
2959
|
"aria-modal": "true",
|
|
2956
2960
|
"aria-label": i || "Modal dialog",
|
|
2957
|
-
"aria-describedby":
|
|
2961
|
+
"aria-describedby": $,
|
|
2958
2962
|
...u,
|
|
2959
2963
|
children: [
|
|
2960
2964
|
n && c && /* @__PURE__ */ o(
|
|
@@ -2967,15 +2971,15 @@ const ta = N.forwardRef(
|
|
|
2967
2971
|
children: "×"
|
|
2968
2972
|
}
|
|
2969
2973
|
),
|
|
2970
|
-
d && /* @__PURE__ */ o("div", { id:
|
|
2974
|
+
d && /* @__PURE__ */ o("div", { id: $, className: "sr-only", children: d }),
|
|
2971
2975
|
/* @__PURE__ */ o("div", { role: "document", children: t })
|
|
2972
2976
|
]
|
|
2973
2977
|
}
|
|
2974
2978
|
);
|
|
2975
2979
|
}
|
|
2976
2980
|
);
|
|
2977
|
-
|
|
2978
|
-
const
|
|
2981
|
+
aa.displayName = "Modal";
|
|
2982
|
+
const ft = N.forwardRef(
|
|
2979
2983
|
({
|
|
2980
2984
|
position: e = "right",
|
|
2981
2985
|
anchor: t = "top",
|
|
@@ -3002,14 +3006,14 @@ const ut = N.forwardRef(
|
|
|
3002
3006
|
);
|
|
3003
3007
|
}
|
|
3004
3008
|
);
|
|
3005
|
-
|
|
3006
|
-
const
|
|
3009
|
+
ft.displayName = "NotificationsWrapper";
|
|
3010
|
+
const ra = {
|
|
3007
3011
|
generic: "status",
|
|
3008
3012
|
info: "status",
|
|
3009
3013
|
warning: "alert",
|
|
3010
3014
|
error: "alert",
|
|
3011
3015
|
success: "status"
|
|
3012
|
-
},
|
|
3016
|
+
}, pt = ({
|
|
3013
3017
|
id: e,
|
|
3014
3018
|
kind: t = "generic",
|
|
3015
3019
|
duration: a = 4,
|
|
@@ -3018,13 +3022,13 @@ const aa = {
|
|
|
3018
3022
|
children: n
|
|
3019
3023
|
}) => {
|
|
3020
3024
|
const [s, l] = j(!1);
|
|
3021
|
-
|
|
3025
|
+
U(() => {
|
|
3022
3026
|
if (a === 0) return;
|
|
3023
3027
|
const f = setTimeout(() => {
|
|
3024
3028
|
l(!0);
|
|
3025
3029
|
}, a * 1e3);
|
|
3026
3030
|
return () => clearTimeout(f);
|
|
3027
|
-
}, [a]),
|
|
3031
|
+
}, [a]), U(() => {
|
|
3028
3032
|
if (!s) return;
|
|
3029
3033
|
const f = setTimeout(() => {
|
|
3030
3034
|
c();
|
|
@@ -3046,7 +3050,7 @@ const aa = {
|
|
|
3046
3050
|
id: e,
|
|
3047
3051
|
classNames: p,
|
|
3048
3052
|
onTransitionEnd: u,
|
|
3049
|
-
role:
|
|
3053
|
+
role: ra[t],
|
|
3050
3054
|
"aria-live": t === "error" || t === "warning" ? "assertive" : "polite",
|
|
3051
3055
|
"aria-atomic": "true",
|
|
3052
3056
|
children: [
|
|
@@ -3066,8 +3070,8 @@ const aa = {
|
|
|
3066
3070
|
}
|
|
3067
3071
|
);
|
|
3068
3072
|
};
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3073
|
+
pt.displayName = "NotificationItem";
|
|
3074
|
+
const mt = Le(null), sa = ({
|
|
3071
3075
|
children: e,
|
|
3072
3076
|
position: t = "right",
|
|
3073
3077
|
anchor: a = "top",
|
|
@@ -3075,14 +3079,14 @@ const pt = Le(null), ra = ({
|
|
|
3075
3079
|
kind: c = "list"
|
|
3076
3080
|
}) => {
|
|
3077
3081
|
const [n, s] = j([]), l = G((p) => {
|
|
3078
|
-
s((f) => f.filter((
|
|
3079
|
-
}, []), i = G((p, f = "generic",
|
|
3082
|
+
s((f) => f.filter(($) => $.id !== p));
|
|
3083
|
+
}, []), i = G((p, f = "generic", $ = 4, v = !0) => {
|
|
3080
3084
|
const k = `notification-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
3081
3085
|
return s((m) => [...m, {
|
|
3082
3086
|
id: k,
|
|
3083
3087
|
content: p,
|
|
3084
3088
|
kind: f,
|
|
3085
|
-
duration:
|
|
3089
|
+
duration: $,
|
|
3086
3090
|
isDismissible: v
|
|
3087
3091
|
}]), k;
|
|
3088
3092
|
}, []), d = G((p) => {
|
|
@@ -3113,20 +3117,20 @@ const pt = Le(null), ra = ({
|
|
|
3113
3117
|
i(f, "info");
|
|
3114
3118
|
}, p;
|
|
3115
3119
|
}, [d, i])();
|
|
3116
|
-
return /* @__PURE__ */ I(
|
|
3120
|
+
return /* @__PURE__ */ I(mt.Provider, { value: { notify: u }, children: [
|
|
3117
3121
|
e,
|
|
3118
3122
|
/* @__PURE__ */ o(
|
|
3119
|
-
|
|
3123
|
+
ft,
|
|
3120
3124
|
{
|
|
3121
3125
|
position: t,
|
|
3122
3126
|
anchor: a,
|
|
3123
3127
|
order: r,
|
|
3124
3128
|
kind: c,
|
|
3125
|
-
children: n.map(({ id: p, content: f, kind:
|
|
3126
|
-
|
|
3129
|
+
children: n.map(({ id: p, content: f, kind: $, duration: v, isDismissible: k }) => /* @__PURE__ */ o(
|
|
3130
|
+
pt,
|
|
3127
3131
|
{
|
|
3128
3132
|
id: p,
|
|
3129
|
-
kind:
|
|
3133
|
+
kind: $,
|
|
3130
3134
|
duration: v,
|
|
3131
3135
|
isDismissible: k,
|
|
3132
3136
|
onClose: () => l(p),
|
|
@@ -3138,13 +3142,13 @@ const pt = Le(null), ra = ({
|
|
|
3138
3142
|
)
|
|
3139
3143
|
] });
|
|
3140
3144
|
};
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3143
|
-
const e =
|
|
3145
|
+
sa.displayName = "NotificationsProvider";
|
|
3146
|
+
const qa = () => {
|
|
3147
|
+
const e = Ne(mt);
|
|
3144
3148
|
if (!e)
|
|
3145
3149
|
throw new Error("useNotifications must be used within a NotificationsProvider");
|
|
3146
3150
|
return e.notify;
|
|
3147
|
-
},
|
|
3151
|
+
}, ht = N.forwardRef(
|
|
3148
3152
|
({
|
|
3149
3153
|
size: e = "medium",
|
|
3150
3154
|
loadingText: t = "Loading...",
|
|
@@ -3167,11 +3171,11 @@ const Ua = () => {
|
|
|
3167
3171
|
);
|
|
3168
3172
|
}
|
|
3169
3173
|
);
|
|
3170
|
-
|
|
3171
|
-
const
|
|
3174
|
+
ht.displayName = "Spinner";
|
|
3175
|
+
const Ye = (e, t) => {
|
|
3172
3176
|
const a = t - e + 1;
|
|
3173
3177
|
return Array.from({ length: a }, (r, c) => e + c);
|
|
3174
|
-
},
|
|
3178
|
+
}, na = ({
|
|
3175
3179
|
totalItems: e,
|
|
3176
3180
|
currentPage: t,
|
|
3177
3181
|
itemsToShowEachSide: a
|
|
@@ -3182,12 +3186,12 @@ const qe = (e, t) => {
|
|
|
3182
3186
|
const n = a * 2 + 1;
|
|
3183
3187
|
let s = [];
|
|
3184
3188
|
if (r <= n)
|
|
3185
|
-
s =
|
|
3189
|
+
s = Ye(1, r);
|
|
3186
3190
|
else {
|
|
3187
3191
|
const l = Math.min(t - 1, a), i = Math.min(r - t, a);
|
|
3188
3192
|
s.push(1), t - a > 2 && s.push("...");
|
|
3189
3193
|
const d = Math.max(2, t - l), u = Math.min(r - 1, t + i);
|
|
3190
|
-
s.push(...
|
|
3194
|
+
s.push(...Ye(d, u)), r - t > a + 1 && s.push("..."), u < r && s.push(r);
|
|
3191
3195
|
}
|
|
3192
3196
|
return s;
|
|
3193
3197
|
})(),
|
|
@@ -3197,7 +3201,7 @@ const qe = (e, t) => {
|
|
|
3197
3201
|
hasPrevPage: t > 1,
|
|
3198
3202
|
hasNextPage: t < r
|
|
3199
3203
|
};
|
|
3200
|
-
},
|
|
3204
|
+
}, oa = ({
|
|
3201
3205
|
type: e,
|
|
3202
3206
|
page: t,
|
|
3203
3207
|
selected: a,
|
|
@@ -3247,14 +3251,14 @@ const qe = (e, t) => {
|
|
|
3247
3251
|
i = t;
|
|
3248
3252
|
}
|
|
3249
3253
|
return /* @__PURE__ */ o(
|
|
3250
|
-
|
|
3254
|
+
He,
|
|
3251
3255
|
{
|
|
3252
3256
|
kind: "custom",
|
|
3253
3257
|
...l,
|
|
3254
3258
|
children: i
|
|
3255
3259
|
}
|
|
3256
3260
|
);
|
|
3257
|
-
},
|
|
3261
|
+
}, ia = N.forwardRef(
|
|
3258
3262
|
({
|
|
3259
3263
|
totalItems: e,
|
|
3260
3264
|
currentPage: t,
|
|
@@ -3268,8 +3272,8 @@ const qe = (e, t) => {
|
|
|
3268
3272
|
showGoToInput: d = !1,
|
|
3269
3273
|
disabled: u = !1,
|
|
3270
3274
|
hideDisabledButtons: p = !1,
|
|
3271
|
-
renderItem: f =
|
|
3272
|
-
isLoading:
|
|
3275
|
+
renderItem: f = oa,
|
|
3276
|
+
isLoading: $ = !1,
|
|
3273
3277
|
loadingText: v,
|
|
3274
3278
|
emptyText: k,
|
|
3275
3279
|
itemDisplayText: m = "Page",
|
|
@@ -3278,10 +3282,10 @@ const qe = (e, t) => {
|
|
|
3278
3282
|
const {
|
|
3279
3283
|
items: R,
|
|
3280
3284
|
totalPages: T,
|
|
3281
|
-
rangeStart:
|
|
3282
|
-
hasPrevPage:
|
|
3285
|
+
rangeStart: F,
|
|
3286
|
+
hasPrevPage: V,
|
|
3283
3287
|
hasNextPage: E
|
|
3284
|
-
} =
|
|
3288
|
+
} = na({
|
|
3285
3289
|
totalItems: e,
|
|
3286
3290
|
currentPage: t,
|
|
3287
3291
|
itemsToShowEachSide: r
|
|
@@ -3296,7 +3300,7 @@ const qe = (e, t) => {
|
|
|
3296
3300
|
if (e === 0)
|
|
3297
3301
|
return /* @__PURE__ */ o(J, { className: "pagination-empty", children: k || "No items to display" });
|
|
3298
3302
|
let S = ["pagination"];
|
|
3299
|
-
return c && S.push(c), u && S.push("disabled"),
|
|
3303
|
+
return c && S.push(c), u && S.push("disabled"), $ && S.push("loading"), /* @__PURE__ */ I(
|
|
3300
3304
|
D,
|
|
3301
3305
|
{
|
|
3302
3306
|
as: "nav",
|
|
@@ -3308,15 +3312,15 @@ const qe = (e, t) => {
|
|
|
3308
3312
|
...A,
|
|
3309
3313
|
children: [
|
|
3310
3314
|
/* @__PURE__ */ I(K, { className: "pagination-controls", children: [
|
|
3311
|
-
n && (!p ||
|
|
3315
|
+
n && (!p || V) && f({
|
|
3312
3316
|
type: "first",
|
|
3313
|
-
disabled: !
|
|
3317
|
+
disabled: !V || u,
|
|
3314
3318
|
selected: !1,
|
|
3315
3319
|
onClick: () => a(1)
|
|
3316
3320
|
}),
|
|
3317
|
-
l && (!p ||
|
|
3321
|
+
l && (!p || V) && f({
|
|
3318
3322
|
type: "previous",
|
|
3319
|
-
disabled: !
|
|
3323
|
+
disabled: !V || u,
|
|
3320
3324
|
selected: !1,
|
|
3321
3325
|
onClick: () => a(t - 1)
|
|
3322
3326
|
}),
|
|
@@ -3349,8 +3353,8 @@ const qe = (e, t) => {
|
|
|
3349
3353
|
selected: !1,
|
|
3350
3354
|
onClick: () => a(T)
|
|
3351
3355
|
}),
|
|
3352
|
-
|
|
3353
|
-
/* @__PURE__ */ o(
|
|
3356
|
+
$ && /* @__PURE__ */ I(K, { className: "pagination-loading", children: [
|
|
3357
|
+
/* @__PURE__ */ o(ht, {}),
|
|
3354
3358
|
v && /* @__PURE__ */ o(J, { size: "small", children: v })
|
|
3355
3359
|
] })
|
|
3356
3360
|
] }),
|
|
@@ -3358,7 +3362,7 @@ const qe = (e, t) => {
|
|
|
3358
3362
|
/* @__PURE__ */ I(J, { size: "tiny", children: [
|
|
3359
3363
|
m,
|
|
3360
3364
|
" ",
|
|
3361
|
-
|
|
3365
|
+
F,
|
|
3362
3366
|
" of ",
|
|
3363
3367
|
e
|
|
3364
3368
|
] }),
|
|
@@ -3382,8 +3386,8 @@ const qe = (e, t) => {
|
|
|
3382
3386
|
);
|
|
3383
3387
|
}
|
|
3384
3388
|
);
|
|
3385
|
-
|
|
3386
|
-
const
|
|
3389
|
+
ia.displayName = "Pagination";
|
|
3390
|
+
const la = N.forwardRef(
|
|
3387
3391
|
({
|
|
3388
3392
|
label: e,
|
|
3389
3393
|
value: t,
|
|
@@ -3396,12 +3400,12 @@ const ia = N.forwardRef(
|
|
|
3396
3400
|
fillColour: i,
|
|
3397
3401
|
...d
|
|
3398
3402
|
}, u) => {
|
|
3399
|
-
const p = Math.max(0, Math.min(r, Number(t) || 0)), f = `${p}${d.suffix || ""}`,
|
|
3403
|
+
const p = Math.max(0, Math.min(r, Number(t) || 0)), f = `${p}${d.suffix || ""}`, $ = s || n, v = i || l, k = {
|
|
3400
3404
|
height: a,
|
|
3401
|
-
|
|
3405
|
+
...$ && { "--progress-bar-bg": `var(--${$})` },
|
|
3402
3406
|
...v && { "--progress-bar-fill": `var(--${v})` }
|
|
3403
3407
|
};
|
|
3404
|
-
return /* @__PURE__ */ I(
|
|
3408
|
+
return /* @__PURE__ */ I(Me, { children: [
|
|
3405
3409
|
e && /* @__PURE__ */ I(
|
|
3406
3410
|
D,
|
|
3407
3411
|
{
|
|
@@ -3435,7 +3439,7 @@ const ia = N.forwardRef(
|
|
|
3435
3439
|
] });
|
|
3436
3440
|
}
|
|
3437
3441
|
);
|
|
3438
|
-
|
|
3442
|
+
la.displayName = "ProgressBar";
|
|
3439
3443
|
const Oe = Le({
|
|
3440
3444
|
isSelected: () => !1,
|
|
3441
3445
|
toggleSelection: () => {
|
|
@@ -3452,7 +3456,7 @@ const Oe = Le({
|
|
|
3452
3456
|
},
|
|
3453
3457
|
unregisterOption: () => {
|
|
3454
3458
|
}
|
|
3455
|
-
}),
|
|
3459
|
+
}), ca = N.forwardRef(
|
|
3456
3460
|
({
|
|
3457
3461
|
children: e,
|
|
3458
3462
|
allowMultipleSelections: t = !1,
|
|
@@ -3466,12 +3470,12 @@ const Oe = Le({
|
|
|
3466
3470
|
}, d) => {
|
|
3467
3471
|
const u = l !== void 0, [p, f] = j(
|
|
3468
3472
|
s ? new Set(s) : /* @__PURE__ */ new Set()
|
|
3469
|
-
),
|
|
3473
|
+
), $ = Y(/* @__PURE__ */ new Map()), v = u ? l : p, k = G((P) => {
|
|
3470
3474
|
u || f(P), r == null || r(P);
|
|
3471
3475
|
}, [u, r]), m = G((P, g) => {
|
|
3472
|
-
|
|
3476
|
+
$.current.set(P, g);
|
|
3473
3477
|
}, []), A = G((P) => {
|
|
3474
|
-
|
|
3478
|
+
$.current.delete(P);
|
|
3475
3479
|
}, []), y = G((P) => {
|
|
3476
3480
|
const g = new Set(v);
|
|
3477
3481
|
if (t)
|
|
@@ -3487,50 +3491,50 @@ const Oe = Le({
|
|
|
3487
3491
|
k(g);
|
|
3488
3492
|
}, [v, t, n, k]), R = G(() => {
|
|
3489
3493
|
if (!t) return;
|
|
3490
|
-
const P = Array.from(
|
|
3494
|
+
const P = Array.from($.current.entries()).filter(([L, _]) => !_).map(([L]) => L), g = n ? P.slice(0, n) : P;
|
|
3491
3495
|
k(new Set(g));
|
|
3492
3496
|
}, [t, n, k]), T = G(() => {
|
|
3493
3497
|
k(/* @__PURE__ */ new Set());
|
|
3494
|
-
}, [k]),
|
|
3498
|
+
}, [k]), F = G(() => {
|
|
3495
3499
|
if (!t) return;
|
|
3496
|
-
const g = Array.from(
|
|
3500
|
+
const g = Array.from($.current.entries()).filter(([_, S]) => !S).map(([_]) => _).filter((_) => !v.has(_)), L = n ? g.slice(0, n) : g;
|
|
3497
3501
|
k(new Set(L));
|
|
3498
|
-
}, [v, t, n, k]),
|
|
3502
|
+
}, [v, t, n, k]), V = G((P) => v.has(P), [v]);
|
|
3499
3503
|
N.useImperativeHandle(d, () => ({
|
|
3500
3504
|
selectAll: R,
|
|
3501
3505
|
selectNone: T,
|
|
3502
|
-
selectInverse:
|
|
3503
|
-
}), [R, T,
|
|
3506
|
+
selectInverse: F
|
|
3507
|
+
}), [R, T, F]);
|
|
3504
3508
|
const E = {
|
|
3505
|
-
isSelected:
|
|
3509
|
+
isSelected: V,
|
|
3506
3510
|
toggleSelection: y,
|
|
3507
3511
|
showTickIcon: a,
|
|
3508
3512
|
tickPosition: c,
|
|
3509
3513
|
selectAll: R,
|
|
3510
3514
|
selectNone: T,
|
|
3511
|
-
selectInverse:
|
|
3515
|
+
selectInverse: F,
|
|
3512
3516
|
registerOption: m,
|
|
3513
3517
|
unregisterOption: A
|
|
3514
3518
|
};
|
|
3515
3519
|
return /* @__PURE__ */ o(Oe.Provider, { value: E, children: /* @__PURE__ */ o(K, { "data-option-cards-group": !0, className: `tick-${c}`, children: e }) });
|
|
3516
3520
|
}
|
|
3517
3521
|
);
|
|
3518
|
-
|
|
3519
|
-
const
|
|
3520
|
-
const t =
|
|
3522
|
+
ca.displayName = "OptionCardsGroup";
|
|
3523
|
+
const Ya = (e) => {
|
|
3524
|
+
const t = Ne(Oe);
|
|
3521
3525
|
return {
|
|
3522
3526
|
isSelected: t.isSelected(e),
|
|
3523
3527
|
toggleSelection: () => t.toggleSelection(e),
|
|
3524
3528
|
showTickIcon: t.showTickIcon
|
|
3525
3529
|
};
|
|
3526
|
-
},
|
|
3527
|
-
const { selectAll: e, selectNone: t, selectInverse: a } =
|
|
3530
|
+
}, Ja = () => {
|
|
3531
|
+
const { selectAll: e, selectNone: t, selectInverse: a } = Ne(Oe);
|
|
3528
3532
|
return { selectAll: e, selectNone: t, selectInverse: a };
|
|
3529
|
-
},
|
|
3530
|
-
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: l, unregisterOption: i } =
|
|
3533
|
+
}, Za = ({ id: e, children: t, disabled: a = !1, ...r }) => {
|
|
3534
|
+
const { isSelected: c, toggleSelection: n, showTickIcon: s, registerOption: l, unregisterOption: i } = Ne(Oe), [d, u] = j(!1), [p, f] = j(!0);
|
|
3531
3535
|
N.useEffect(() => (l(e, a), () => i(e)), [e, a, l, i]);
|
|
3532
|
-
let
|
|
3533
|
-
c(e) &&
|
|
3536
|
+
let $ = [];
|
|
3537
|
+
c(e) && $.push("selected"), a && $.push("disabled"), d && $.push("show-deselect");
|
|
3534
3538
|
const v = () => {
|
|
3535
3539
|
c(e) && !p && u(!0);
|
|
3536
3540
|
}, k = () => {
|
|
@@ -3544,20 +3548,20 @@ const qa = (e) => {
|
|
|
3544
3548
|
return /* @__PURE__ */ I(
|
|
3545
3549
|
D,
|
|
3546
3550
|
{
|
|
3547
|
-
as:
|
|
3551
|
+
as: tt,
|
|
3548
3552
|
"data-option-card": !0,
|
|
3549
3553
|
role: "button",
|
|
3550
3554
|
tabIndex: a ? -1 : 0,
|
|
3551
3555
|
"aria-disabled": a,
|
|
3552
3556
|
"aria-selected": c(e),
|
|
3553
|
-
classNames:
|
|
3557
|
+
classNames: $,
|
|
3554
3558
|
onClick: m,
|
|
3555
3559
|
onKeyDown: A,
|
|
3556
3560
|
onMouseEnter: v,
|
|
3557
3561
|
onMouseLeave: k,
|
|
3558
3562
|
...r,
|
|
3559
3563
|
children: [
|
|
3560
|
-
s && /* @__PURE__ */ I(
|
|
3564
|
+
s && /* @__PURE__ */ I(Me, { children: [
|
|
3561
3565
|
/* @__PURE__ */ I("svg", { viewBox: "0 0 24 24", className: "tick-icon", children: [
|
|
3562
3566
|
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "11" }),
|
|
3563
3567
|
/* @__PURE__ */ o("path", { d: "M8 13 L11 15 L16 9" })
|
|
@@ -3571,7 +3575,7 @@ const qa = (e) => {
|
|
|
3571
3575
|
]
|
|
3572
3576
|
}
|
|
3573
3577
|
);
|
|
3574
|
-
},
|
|
3578
|
+
}, da = N.forwardRef(
|
|
3575
3579
|
({
|
|
3576
3580
|
collapsed: e,
|
|
3577
3581
|
closeOnClickOutside: t,
|
|
@@ -3579,7 +3583,7 @@ const qa = (e) => {
|
|
|
3579
3583
|
...r
|
|
3580
3584
|
}, c) => {
|
|
3581
3585
|
const n = Y(null);
|
|
3582
|
-
|
|
3586
|
+
Qe(c, () => n.current), ze(n, () => {
|
|
3583
3587
|
typeof t == "function" && t();
|
|
3584
3588
|
});
|
|
3585
3589
|
let s = [];
|
|
@@ -3595,8 +3599,8 @@ const qa = (e) => {
|
|
|
3595
3599
|
);
|
|
3596
3600
|
}
|
|
3597
3601
|
);
|
|
3598
|
-
|
|
3599
|
-
const
|
|
3602
|
+
da.displayName = "SidebarWrapper";
|
|
3603
|
+
const ua = N.forwardRef(
|
|
3600
3604
|
({ label: e, ...t }, a) => /* @__PURE__ */ o(
|
|
3601
3605
|
D,
|
|
3602
3606
|
{
|
|
@@ -3609,8 +3613,8 @@ const da = N.forwardRef(
|
|
|
3609
3613
|
}
|
|
3610
3614
|
)
|
|
3611
3615
|
);
|
|
3612
|
-
|
|
3613
|
-
const
|
|
3616
|
+
ua.displayName = "ContentWrapper";
|
|
3617
|
+
const fa = N.forwardRef(
|
|
3614
3618
|
({ isSticky: e, ...t }, a) => {
|
|
3615
3619
|
let r = [];
|
|
3616
3620
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
@@ -3625,8 +3629,8 @@ const ua = N.forwardRef(
|
|
|
3625
3629
|
);
|
|
3626
3630
|
}
|
|
3627
3631
|
);
|
|
3628
|
-
|
|
3629
|
-
const
|
|
3632
|
+
fa.displayName = "SidebarHeader";
|
|
3633
|
+
const pa = N.forwardRef(
|
|
3630
3634
|
({ hasAlert: e, hasEmptyIcon: t, hasNoIcon: a, children: r, ...c }, n) => {
|
|
3631
3635
|
let s = [];
|
|
3632
3636
|
return e && s.push("has-alert"), t ? s.push("has-empty-icon") : a && s.push("has-no-icon"), /* @__PURE__ */ I(
|
|
@@ -3645,8 +3649,8 @@ const fa = N.forwardRef(
|
|
|
3645
3649
|
);
|
|
3646
3650
|
}
|
|
3647
3651
|
);
|
|
3648
|
-
|
|
3649
|
-
const
|
|
3652
|
+
pa.displayName = "SidebarItem";
|
|
3653
|
+
const ma = N.forwardRef(
|
|
3650
3654
|
({ isSticky: e, ...t }, a) => {
|
|
3651
3655
|
let r = [];
|
|
3652
3656
|
return e && r.push("is-sticky"), /* @__PURE__ */ o(
|
|
@@ -3661,11 +3665,11 @@ const pa = N.forwardRef(
|
|
|
3661
3665
|
);
|
|
3662
3666
|
}
|
|
3663
3667
|
);
|
|
3664
|
-
|
|
3665
|
-
const
|
|
3668
|
+
ma.displayName = "SidebarFooter";
|
|
3669
|
+
const vt = Le({
|
|
3666
3670
|
effect: "wave",
|
|
3667
3671
|
animate: !0
|
|
3668
|
-
}),
|
|
3672
|
+
}), ha = N.forwardRef(({
|
|
3669
3673
|
variant: e = "line",
|
|
3670
3674
|
width: t,
|
|
3671
3675
|
height: a,
|
|
@@ -3674,12 +3678,12 @@ const ht = Le({
|
|
|
3674
3678
|
loadingLabel: n,
|
|
3675
3679
|
...s
|
|
3676
3680
|
}, l) => {
|
|
3677
|
-
const i =
|
|
3681
|
+
const i = Ne(vt), d = c || i.effect, u = n || i.loadingLabel || "Loading...";
|
|
3678
3682
|
let p = [];
|
|
3679
3683
|
e && p.push(`variant-${e}`), r && p.push(`shape-${r}`), d && p.push(`effect-${d}`);
|
|
3680
|
-
const f = t || "100%",
|
|
3684
|
+
const f = t || "100%", $ = e === "circle" ? (typeof t == "number" ? `${t}px` : t) || a || "100%" : a, v = {
|
|
3681
3685
|
width: f,
|
|
3682
|
-
height:
|
|
3686
|
+
height: $,
|
|
3683
3687
|
aspectRatio: e === "circle" ? "1 / 1" : "auto",
|
|
3684
3688
|
...s.style
|
|
3685
3689
|
};
|
|
@@ -3701,8 +3705,8 @@ const ht = Le({
|
|
|
3701
3705
|
}
|
|
3702
3706
|
);
|
|
3703
3707
|
});
|
|
3704
|
-
|
|
3705
|
-
const
|
|
3708
|
+
ha.displayName = "Skeleton";
|
|
3709
|
+
const va = N.forwardRef(({
|
|
3706
3710
|
effect: e = "wave",
|
|
3707
3711
|
spacing: t = "small",
|
|
3708
3712
|
animate: a = !0,
|
|
@@ -3718,7 +3722,7 @@ const ha = N.forwardRef(({
|
|
|
3718
3722
|
e && `effect-${e}`,
|
|
3719
3723
|
...s
|
|
3720
3724
|
];
|
|
3721
|
-
return t && u.push(`spacing-${t}`), /* @__PURE__ */ o(
|
|
3725
|
+
return t && u.push(`spacing-${t}`), /* @__PURE__ */ o(vt.Provider, { value: { effect: e, animate: a, loadingLabel: l }, children: /* @__PURE__ */ o(
|
|
3722
3726
|
D,
|
|
3723
3727
|
{
|
|
3724
3728
|
as: "div",
|
|
@@ -3735,8 +3739,8 @@ const ha = N.forwardRef(({
|
|
|
3735
3739
|
}
|
|
3736
3740
|
) });
|
|
3737
3741
|
});
|
|
3738
|
-
|
|
3739
|
-
const
|
|
3742
|
+
va.displayName = "SkeletonGroup";
|
|
3743
|
+
const ya = N.forwardRef(
|
|
3740
3744
|
({
|
|
3741
3745
|
bordersFor: e,
|
|
3742
3746
|
isStriped: t,
|
|
@@ -3779,17 +3783,17 @@ const va = N.forwardRef(
|
|
|
3779
3783
|
);
|
|
3780
3784
|
}
|
|
3781
3785
|
);
|
|
3782
|
-
|
|
3783
|
-
const
|
|
3786
|
+
ya.displayName = "Table";
|
|
3787
|
+
const wa = N.forwardRef(
|
|
3784
3788
|
({ tabs: e, additionalNavContentWrapper: t, defaultActiveTab: a, align: r = "left", isFullWidth: c, ...n }, s) => {
|
|
3785
3789
|
const l = e.findIndex((m) => m.key === a), i = l > -1 ? l : 0, [d, u] = N.useState(
|
|
3786
3790
|
e.length > 0 ? e[i] : void 0
|
|
3787
|
-
), [p, f] = N.useState(!1),
|
|
3791
|
+
), [p, f] = N.useState(!1), $ = Y([]), v = G((m) => {
|
|
3788
3792
|
(d == null ? void 0 : d.key) !== m.key && (f(!0), setTimeout(() => {
|
|
3789
3793
|
u(m), f(!1);
|
|
3790
3794
|
}, 150));
|
|
3791
3795
|
}, [d == null ? void 0 : d.key]);
|
|
3792
|
-
|
|
3796
|
+
U(() => {
|
|
3793
3797
|
e.length > 0 ? e.find((A) => A.key === (d == null ? void 0 : d.key)) || u(e[i]) : u(void 0);
|
|
3794
3798
|
}, [e, i, d == null ? void 0 : d.key]);
|
|
3795
3799
|
const k = G((m, A) => {
|
|
@@ -3807,7 +3811,7 @@ const ya = N.forwardRef(
|
|
|
3807
3811
|
return;
|
|
3808
3812
|
m.preventDefault();
|
|
3809
3813
|
const R = e[y];
|
|
3810
|
-
R && (v(R), (T =
|
|
3814
|
+
R && (v(R), (T = $.current[y]) == null || T.focus());
|
|
3811
3815
|
}, [e, v]);
|
|
3812
3816
|
return d ? /* @__PURE__ */ I(
|
|
3813
3817
|
D,
|
|
@@ -3819,12 +3823,12 @@ const ya = N.forwardRef(
|
|
|
3819
3823
|
"data-full-width": c,
|
|
3820
3824
|
...n,
|
|
3821
3825
|
children: [
|
|
3822
|
-
/* @__PURE__ */ o(
|
|
3826
|
+
/* @__PURE__ */ o(It, { "data-tabs-nav": !0, role: "tablist", "aria-label": "Tab Navigation", children: /* @__PURE__ */ I("ul", { className: "tab-labels-list", children: [
|
|
3823
3827
|
e.map((m, A) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
|
|
3824
3828
|
D,
|
|
3825
3829
|
{
|
|
3826
3830
|
as: "button",
|
|
3827
|
-
ref: (y) =>
|
|
3831
|
+
ref: (y) => $.current[A] = y,
|
|
3828
3832
|
id: `tab-${m.key}`,
|
|
3829
3833
|
role: "tab",
|
|
3830
3834
|
"aria-selected": d.key === m.key,
|
|
@@ -3848,7 +3852,7 @@ const ya = N.forwardRef(
|
|
|
3848
3852
|
) }, m.key)),
|
|
3849
3853
|
t
|
|
3850
3854
|
] }) }),
|
|
3851
|
-
/* @__PURE__ */ o(
|
|
3855
|
+
/* @__PURE__ */ o(at, { kind: "tertiary", marginTop: "none", marginBottom: "micro" }),
|
|
3852
3856
|
e.map((m) => /* @__PURE__ */ o(
|
|
3853
3857
|
K,
|
|
3854
3858
|
{
|
|
@@ -3869,7 +3873,7 @@ const ya = N.forwardRef(
|
|
|
3869
3873
|
) : null;
|
|
3870
3874
|
}
|
|
3871
3875
|
);
|
|
3872
|
-
|
|
3876
|
+
wa.displayName = "Tabs";
|
|
3873
3877
|
const Te = () => {
|
|
3874
3878
|
if (typeof window < "u") {
|
|
3875
3879
|
const e = window.location.hostname, t = window.location.port;
|
|
@@ -3877,20 +3881,20 @@ const Te = () => {
|
|
|
3877
3881
|
return t && (a += `-${t}`), `${a}-theme`;
|
|
3878
3882
|
}
|
|
3879
3883
|
return "fictoan-theme";
|
|
3880
|
-
},
|
|
3881
|
-
}],
|
|
3882
|
-
const e = N.useContext(
|
|
3883
|
-
return e === void 0 ?
|
|
3884
|
-
},
|
|
3884
|
+
}, ga = ["", (e) => {
|
|
3885
|
+
}], yt = N.createContext(void 0), Qa = () => {
|
|
3886
|
+
const e = N.useContext(yt);
|
|
3887
|
+
return e === void 0 ? ga : e;
|
|
3888
|
+
}, Je = (e, t) => {
|
|
3885
3889
|
let a;
|
|
3886
3890
|
try {
|
|
3887
3891
|
a = localStorage.getItem(e) || void 0;
|
|
3888
3892
|
} catch {
|
|
3889
3893
|
}
|
|
3890
3894
|
return a || t;
|
|
3891
|
-
},
|
|
3895
|
+
}, ba = N.forwardRef(
|
|
3892
3896
|
({ currentTheme: e, themeList: t, children: a, ...r }, c) => {
|
|
3893
|
-
const [n, s] = j(!1), [l, i] = j(() =>
|
|
3897
|
+
const [n, s] = j(!1), [l, i] = j(() => Je(Te()) || e), d = G(
|
|
3894
3898
|
(u) => {
|
|
3895
3899
|
const p = typeof u == "function" ? u(l) : u;
|
|
3896
3900
|
if (!t.includes(p)) {
|
|
@@ -3910,14 +3914,14 @@ const Te = () => {
|
|
|
3910
3914
|
},
|
|
3911
3915
|
[l, t]
|
|
3912
3916
|
);
|
|
3913
|
-
return
|
|
3914
|
-
const u =
|
|
3917
|
+
return U(() => {
|
|
3918
|
+
const u = Je(Te());
|
|
3915
3919
|
d(u || e);
|
|
3916
|
-
}, [e, d]), /* @__PURE__ */ o(
|
|
3920
|
+
}, [e, d]), /* @__PURE__ */ o(yt.Provider, { value: [l, d], children: /* @__PURE__ */ o(D, { as: "div", "data-theme-provider": !0, ref: c, ...r, children: n && a }) });
|
|
3917
3921
|
}
|
|
3918
3922
|
);
|
|
3919
|
-
|
|
3920
|
-
const
|
|
3923
|
+
ba.displayName = "ThemeProvider";
|
|
3924
|
+
const wt = N.forwardRef(
|
|
3921
3925
|
({
|
|
3922
3926
|
anchor: e = "top",
|
|
3923
3927
|
children: t,
|
|
@@ -3937,21 +3941,21 @@ const yt = N.forwardRef(
|
|
|
3937
3941
|
}
|
|
3938
3942
|
)
|
|
3939
3943
|
);
|
|
3940
|
-
|
|
3941
|
-
const
|
|
3944
|
+
wt.displayName = "ToastsWrapper";
|
|
3945
|
+
const gt = ({
|
|
3942
3946
|
id: e,
|
|
3943
3947
|
duration: t = 4,
|
|
3944
3948
|
onClose: a,
|
|
3945
3949
|
children: r
|
|
3946
3950
|
}) => {
|
|
3947
3951
|
const [c, n] = j(!1);
|
|
3948
|
-
return
|
|
3952
|
+
return U(() => {
|
|
3949
3953
|
if (t === 0) return;
|
|
3950
3954
|
const l = setTimeout(() => {
|
|
3951
3955
|
n(!0);
|
|
3952
3956
|
}, t * 1e3);
|
|
3953
3957
|
return () => clearTimeout(l);
|
|
3954
|
-
}, [t]),
|
|
3958
|
+
}, [t]), U(() => {
|
|
3955
3959
|
if (!c) return;
|
|
3956
3960
|
const l = setTimeout(() => {
|
|
3957
3961
|
a();
|
|
@@ -3975,8 +3979,8 @@ const wt = ({
|
|
|
3975
3979
|
}
|
|
3976
3980
|
);
|
|
3977
3981
|
};
|
|
3978
|
-
|
|
3979
|
-
const
|
|
3982
|
+
gt.displayName = "ToastItem";
|
|
3983
|
+
const bt = Le(null), Na = ({
|
|
3980
3984
|
children: e,
|
|
3981
3985
|
anchor: t = "top"
|
|
3982
3986
|
}) => {
|
|
@@ -3990,10 +3994,10 @@ const gt = Le(null), ba = ({
|
|
|
3990
3994
|
duration: l
|
|
3991
3995
|
}]);
|
|
3992
3996
|
}, []);
|
|
3993
|
-
return /* @__PURE__ */ I(
|
|
3997
|
+
return /* @__PURE__ */ I(bt.Provider, { value: { toast: n }, children: [
|
|
3994
3998
|
e,
|
|
3995
|
-
/* @__PURE__ */ o(
|
|
3996
|
-
|
|
3999
|
+
/* @__PURE__ */ o(wt, { anchor: t, children: a.map(({ id: s, message: l, duration: i }) => /* @__PURE__ */ o(
|
|
4000
|
+
gt,
|
|
3997
4001
|
{
|
|
3998
4002
|
id: s,
|
|
3999
4003
|
duration: i,
|
|
@@ -4004,15 +4008,15 @@ const gt = Le(null), ba = ({
|
|
|
4004
4008
|
)) })
|
|
4005
4009
|
] });
|
|
4006
4010
|
};
|
|
4007
|
-
|
|
4008
|
-
const
|
|
4009
|
-
const e =
|
|
4011
|
+
Na.displayName = "ToastsProvider";
|
|
4012
|
+
const er = () => {
|
|
4013
|
+
const e = Ne(bt);
|
|
4010
4014
|
if (!e)
|
|
4011
4015
|
throw new Error("useToasts must be used within a ToastsProvider");
|
|
4012
4016
|
return e.toast;
|
|
4013
4017
|
}, fe = 8, ne = 16;
|
|
4014
|
-
let oe = null, pe = null,
|
|
4015
|
-
const me = /* @__PURE__ */ new Map(),
|
|
4018
|
+
let oe = null, pe = null, We = !1, ce = null, ve = null;
|
|
4019
|
+
const me = /* @__PURE__ */ new Map(), ka = (e, t, a) => {
|
|
4016
4020
|
const r = e.getBoundingClientRect(), c = t.getBoundingClientRect(), n = window.innerHeight, s = window.innerWidth;
|
|
4017
4021
|
let l, i;
|
|
4018
4022
|
switch (a) {
|
|
@@ -4046,7 +4050,7 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4046
4050
|
},
|
|
4047
4051
|
children: e
|
|
4048
4052
|
}
|
|
4049
|
-
),
|
|
4053
|
+
), Re = (e, t) => {
|
|
4050
4054
|
if (!(!pe || !oe)) {
|
|
4051
4055
|
if (!e || !t) {
|
|
4052
4056
|
pe.render(
|
|
@@ -4060,39 +4064,39 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4060
4064
|
if (!oe || !t) return;
|
|
4061
4065
|
const a = oe.firstElementChild;
|
|
4062
4066
|
if (!a) return;
|
|
4063
|
-
const { top: r, left: c } =
|
|
4067
|
+
const { top: r, left: c } = ka(a, t, e.position);
|
|
4064
4068
|
pe == null || pe.render(
|
|
4065
4069
|
/* @__PURE__ */ o(De, { content: e.content, isVisible: !0, position: { top: r, left: c }, zIndex: e.zIndex })
|
|
4066
4070
|
);
|
|
4067
4071
|
});
|
|
4068
4072
|
}
|
|
4069
|
-
},
|
|
4073
|
+
}, Ze = () => {
|
|
4070
4074
|
if (!ce || !ve) return;
|
|
4071
4075
|
const e = me.get(ce);
|
|
4072
|
-
e &&
|
|
4073
|
-
},
|
|
4076
|
+
e && Re(e, ve);
|
|
4077
|
+
}, Nt = (e, t) => {
|
|
4074
4078
|
const a = me.get(e);
|
|
4075
|
-
a && (ce = e, ve = t,
|
|
4079
|
+
a && (ce = e, ve = t, Re(a, t));
|
|
4076
4080
|
}, Ae = (e) => {
|
|
4077
|
-
e && ce !== e || (ce = null, ve = null,
|
|
4078
|
-
},
|
|
4081
|
+
e && ce !== e || (ce = null, ve = null, Re(null, null));
|
|
4082
|
+
}, $a = (e) => {
|
|
4079
4083
|
const t = e.target.closest("[id]");
|
|
4080
4084
|
if (!(t != null && t.id)) return;
|
|
4081
4085
|
const a = me.get(t.id);
|
|
4082
|
-
(a == null ? void 0 : a.showOn) === "hover" &&
|
|
4083
|
-
},
|
|
4086
|
+
(a == null ? void 0 : a.showOn) === "hover" && Nt(t.id, t);
|
|
4087
|
+
}, xa = (e) => {
|
|
4084
4088
|
const t = e.target.closest("[id]");
|
|
4085
4089
|
if (!(t != null && t.id)) return;
|
|
4086
4090
|
const a = me.get(t.id);
|
|
4087
4091
|
(a == null ? void 0 : a.showOn) === "hover" && Ae(t.id);
|
|
4088
|
-
},
|
|
4092
|
+
}, Ra = (e) => {
|
|
4089
4093
|
if (oe != null && oe.contains(e.target))
|
|
4090
4094
|
return;
|
|
4091
4095
|
const t = e.target.closest("[id]");
|
|
4092
4096
|
if (t != null && t.id) {
|
|
4093
4097
|
const a = me.get(t.id);
|
|
4094
4098
|
if ((a == null ? void 0 : a.showOn) === "click") {
|
|
4095
|
-
ce === t.id ? Ae() :
|
|
4099
|
+
ce === t.id ? Ae() : Nt(t.id, t);
|
|
4096
4100
|
return;
|
|
4097
4101
|
}
|
|
4098
4102
|
}
|
|
@@ -4100,17 +4104,17 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4100
4104
|
const a = me.get(ce);
|
|
4101
4105
|
(a == null ? void 0 : a.showOn) === "click" && Ae();
|
|
4102
4106
|
}
|
|
4103
|
-
},
|
|
4107
|
+
}, Ma = () => {
|
|
4104
4108
|
if (typeof document > "u") return;
|
|
4105
4109
|
const e = document.getElementById("fictoan-tooltip-singleton");
|
|
4106
|
-
if (e &&
|
|
4110
|
+
if (e && We) {
|
|
4107
4111
|
oe = e;
|
|
4108
4112
|
return;
|
|
4109
4113
|
}
|
|
4110
|
-
|
|
4114
|
+
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
4115
|
/* @__PURE__ */ o(De, { content: null, isVisible: !1, position: { top: -9999, left: -9999 }, zIndex: 1e5 })
|
|
4112
|
-
), document.addEventListener("mouseover",
|
|
4113
|
-
},
|
|
4116
|
+
), document.addEventListener("mouseover", $a), document.addEventListener("mouseout", xa), document.addEventListener("click", Ra), window.addEventListener("scroll", Ze, !0), window.addEventListener("resize", Ze), We = !0;
|
|
4117
|
+
}, tr = ({
|
|
4114
4118
|
children: e,
|
|
4115
4119
|
isTooltipFor: t,
|
|
4116
4120
|
showOn: a = "hover",
|
|
@@ -4118,29 +4122,29 @@ const me = /* @__PURE__ */ new Map(), Na = (e, t, a) => {
|
|
|
4118
4122
|
zIndex: c = 1e5
|
|
4119
4123
|
}) => {
|
|
4120
4124
|
const n = Y({ content: e, position: r, showOn: a, zIndex: c });
|
|
4121
|
-
return n.current = { content: e, position: r, showOn: a, zIndex: c },
|
|
4125
|
+
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
4126
|
me.delete(t), ce === t && Ae();
|
|
4123
|
-
}), [t]),
|
|
4124
|
-
me.set(t, n.current), ce === t && ve &&
|
|
4127
|
+
}), [t]), U(() => {
|
|
4128
|
+
me.set(t, n.current), ce === t && ve && Re(n.current, ve);
|
|
4125
4129
|
}, [e, r, a, c, t]), null;
|
|
4126
|
-
},
|
|
4130
|
+
}, ke = N.forwardRef(
|
|
4127
4131
|
({ fontStyle: e = "sans-serif", weight: t, align: a, ...r }, c) => {
|
|
4128
4132
|
let n = [];
|
|
4129
4133
|
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
4134
|
}
|
|
4131
|
-
),
|
|
4132
|
-
|
|
4133
|
-
const
|
|
4134
|
-
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4137
|
-
const
|
|
4138
|
-
|
|
4139
|
-
const
|
|
4140
|
-
|
|
4141
|
-
const
|
|
4142
|
-
|
|
4143
|
-
const
|
|
4135
|
+
), Ea = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h1", ref: t, ...e }));
|
|
4136
|
+
Ea.displayName = "Heading1";
|
|
4137
|
+
const Pa = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h2", ref: t, ...e }));
|
|
4138
|
+
Pa.displayName = "Heading2";
|
|
4139
|
+
const Sa = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h3", ref: t, ...e }));
|
|
4140
|
+
Sa.displayName = "Heading3";
|
|
4141
|
+
const Ia = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h4", ref: t, ...e }));
|
|
4142
|
+
Ia.displayName = "Heading4";
|
|
4143
|
+
const Ta = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h5", ref: t, ...e }));
|
|
4144
|
+
Ta.displayName = "Heading5";
|
|
4145
|
+
const Da = N.forwardRef((e, t) => /* @__PURE__ */ o(ke, { as: "h6", ref: t, ...e }));
|
|
4146
|
+
Da.displayName = "Heading6";
|
|
4147
|
+
const Aa = N.forwardRef(
|
|
4144
4148
|
({ summary: e, children: t, isOpen: a = !1, ...r }, c) => /* @__PURE__ */ I(
|
|
4145
4149
|
D,
|
|
4146
4150
|
{
|
|
@@ -4167,81 +4171,81 @@ const Da = N.forwardRef(
|
|
|
4167
4171
|
}
|
|
4168
4172
|
)
|
|
4169
4173
|
);
|
|
4170
|
-
|
|
4174
|
+
Aa.displayName = "Accordion";
|
|
4171
4175
|
export {
|
|
4172
|
-
|
|
4173
|
-
|
|
4176
|
+
ua as $,
|
|
4177
|
+
Aa as A,
|
|
4174
4178
|
Be as B,
|
|
4175
|
-
|
|
4176
|
-
|
|
4179
|
+
et as C,
|
|
4180
|
+
Dt as D,
|
|
4177
4181
|
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
|
-
|
|
4182
|
+
_a as F,
|
|
4183
|
+
aa as G,
|
|
4184
|
+
Ga as H,
|
|
4185
|
+
Pe as I,
|
|
4186
|
+
sa as J,
|
|
4187
|
+
qa as K,
|
|
4188
|
+
Yt as L,
|
|
4189
|
+
Ka as M,
|
|
4190
|
+
It as N,
|
|
4191
|
+
ia as O,
|
|
4192
|
+
Jt as P,
|
|
4193
|
+
st as Q,
|
|
4194
|
+
nt as R,
|
|
4195
|
+
ja as S,
|
|
4196
|
+
ct as T,
|
|
4197
|
+
la as U,
|
|
4198
|
+
it as V,
|
|
4199
|
+
Za as W,
|
|
4200
|
+
Ya as X,
|
|
4201
|
+
Ja as Y,
|
|
4202
|
+
ca as Z,
|
|
4203
|
+
da as _,
|
|
4204
|
+
He as a,
|
|
4205
|
+
fa as a0,
|
|
4206
|
+
pa as a1,
|
|
4207
|
+
ma as a2,
|
|
4208
|
+
ha as a3,
|
|
4209
|
+
va as a4,
|
|
4210
|
+
ht as a5,
|
|
4211
|
+
ya as a6,
|
|
4212
|
+
wa as a7,
|
|
4213
|
+
ba as a8,
|
|
4214
|
+
Qa as a9,
|
|
4215
|
+
Na as aa,
|
|
4216
|
+
er as ab,
|
|
4217
|
+
tr as ac,
|
|
4218
|
+
Ea as ad,
|
|
4219
|
+
Pa as ae,
|
|
4220
|
+
Sa as af,
|
|
4221
|
+
Ia as ag,
|
|
4222
|
+
Ta as ah,
|
|
4223
|
+
Da as ai,
|
|
4220
4224
|
J as aj,
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4225
|
+
At as b,
|
|
4226
|
+
Bt as c,
|
|
4227
|
+
tt as d,
|
|
4228
|
+
Ot as e,
|
|
4229
|
+
at as f,
|
|
4226
4230
|
K as g,
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4231
|
+
Wa as h,
|
|
4232
|
+
za as i,
|
|
4233
|
+
Ha as j,
|
|
4234
|
+
Xa as k,
|
|
4235
|
+
Ua as l,
|
|
4236
|
+
_e as m,
|
|
4233
4237
|
Vt as n,
|
|
4234
|
-
|
|
4235
|
-
|
|
4238
|
+
rt as o,
|
|
4239
|
+
Gt as p,
|
|
4236
4240
|
ee as q,
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4241
|
+
Kt as r,
|
|
4242
|
+
Ee as s,
|
|
4243
|
+
ot as t,
|
|
4244
|
+
Zt as u,
|
|
4245
|
+
ea as v,
|
|
4246
|
+
lt as w,
|
|
4247
|
+
Ge as x,
|
|
4248
|
+
Wt as y,
|
|
4249
|
+
ta as z
|
|
4246
4250
|
};
|
|
4247
|
-
//# sourceMappingURL=Accordion-
|
|
4251
|
+
//# sourceMappingURL=Accordion-COVfCbBL.js.map
|