fictoan-react 1.11.14 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/Accordion-ZNSXFjKa.js +4647 -0
- package/dist/Accordion-ZNSXFjKa.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +4 -3
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +0 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +12 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/components/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +3 -5
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Element/Element.d.ts.map +1 -1
- package/dist/components/Element/constants.d.ts +8 -5
- package/dist/components/Element/constants.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.d.ts +20 -7
- package/dist/components/Form/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/CheckboxAndSwitchGroup.d.ts +25 -10
- package/dist/components/Form/Checkbox/CheckboxAndSwitchGroup.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/Switch.d.ts +20 -8
- package/dist/components/Form/Checkbox/Switch.d.ts.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.d.ts +23 -4
- package/dist/components/Form/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/Form/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form/FormGenerator.d.ts +8 -2
- package/dist/components/Form/Form/FormGenerator.d.ts.map +1 -1
- package/dist/components/Form/FormItem/FormItem.d.ts +11 -2
- 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/Form/InputField/InputField.d.ts +31 -12
- package/dist/components/Form/InputField/InputField.d.ts.map +1 -1
- package/dist/components/Form/InputLabel/InputLabel.d.ts.map +1 -1
- package/dist/components/Form/ListBox/ListBox.d.ts.map +1 -1
- package/dist/components/Form/ListBox/constants.d.ts +5 -8
- package/dist/components/Form/ListBox/constants.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioButton.d.ts +8 -2
- package/dist/components/Form/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioGroup.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioTabGroup.d.ts +1 -2
- package/dist/components/Form/RadioButton/RadioTabGroup.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/constants.d.ts +18 -5
- package/dist/components/Form/RadioButton/constants.d.ts.map +1 -1
- package/dist/components/Form/Range/Range.d.ts +24 -4
- package/dist/components/Form/Range/Range.d.ts.map +1 -1
- package/dist/components/Form/Range/index.d.ts +1 -1
- package/dist/components/Form/Range/index.d.ts.map +1 -1
- package/dist/components/Form/Select/Select.d.ts.map +1 -1
- package/dist/components/Form/TextArea/TextArea.d.ts +22 -5
- package/dist/components/Form/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/components/Meter/Meter.d.ts +0 -2
- package/dist/components/Meter/Meter.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +2 -3
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Notification/NotificationItem/NotificationItem.d.ts.map +1 -1
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.d.ts.map +1 -1
- package/dist/components/OptionCard/OptionCard.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Portion/Portion.d.ts.map +1 -1
- package/dist/components/Portion/index.d.ts +1 -0
- package/dist/components/Portion/index.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -3
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/Row/Row.d.ts +1 -0
- package/dist/components/Row/Row.d.ts.map +1 -1
- package/dist/components/Sidebar/ContentWrapper/ContentWrapper.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/SidebarItem.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/Toast/ToastItem/ToastItem.d.ts.map +1 -1
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +9 -8
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Typography/Heading.d.ts.map +1 -1
- package/dist/components/Typography/Text.d.ts +1 -1
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +75 -77
- package/dist/components/index.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +129 -111
- package/dist/index.js.map +1 -0
- package/dist/scripts/generateColourClasses.d.ts +2 -0
- package/dist/scripts/generateColourClasses.d.ts.map +1 -0
- package/dist/styles/colours.d.ts +7 -0
- package/dist/styles/colours.d.ts.map +1 -0
- package/dist/utils/propSeparation.d.ts +22 -0
- package/dist/utils/propSeparation.d.ts.map +1 -0
- package/package.json +36 -37
- package/dist/Modal-eaK0YswF.js +0 -6089
- package/dist/components/Form/BaseInputComponent/BaseInputComponent.d.ts +0 -8
- package/dist/components/Form/BaseInputComponent/BaseInputComponent.d.ts.map +0 -1
- package/dist/components/Form/BaseInputComponent/constants.d.ts +0 -51
- package/dist/components/Form/BaseInputComponent/constants.d.ts.map +0 -1
|
@@ -0,0 +1,4647 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client;";
|
|
3
|
+
import g, { useCallback as U, useEffect as re, useRef as oe, useState as J, useMemo as _e, createElement as vr, createRef as xr, useImperativeHandle as At, useContext as rt, createContext as It } from "react";
|
|
4
|
+
import yr from "react-dom";
|
|
5
|
+
var Je = { exports: {} }, ze = {};
|
|
6
|
+
/**
|
|
7
|
+
* @license React
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var Nt;
|
|
16
|
+
function br() {
|
|
17
|
+
if (Nt) return ze;
|
|
18
|
+
Nt = 1;
|
|
19
|
+
var e = g, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, c = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
+
function o(l, u, p) {
|
|
21
|
+
var d, m = {}, x = null, N = null;
|
|
22
|
+
p !== void 0 && (x = "" + p), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (N = u.ref);
|
|
23
|
+
for (d in u) s.call(u, d) && !i.hasOwnProperty(d) && (m[d] = u[d]);
|
|
24
|
+
if (l && l.defaultProps) for (d in u = l.defaultProps, u) m[d] === void 0 && (m[d] = u[d]);
|
|
25
|
+
return { $$typeof: t, type: l, key: x, ref: N, props: m, _owner: c.current };
|
|
26
|
+
}
|
|
27
|
+
return ze.Fragment = a, ze.jsx = o, ze.jsxs = o, ze;
|
|
28
|
+
}
|
|
29
|
+
var He = {};
|
|
30
|
+
/**
|
|
31
|
+
* @license React
|
|
32
|
+
* react-jsx-runtime.development.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/
|
|
39
|
+
var kt;
|
|
40
|
+
function gr() {
|
|
41
|
+
return kt || (kt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
42
|
+
var e = g, t = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), j = Symbol.iterator, S = "@@iterator";
|
|
43
|
+
function h(n) {
|
|
44
|
+
if (n === null || typeof n != "object")
|
|
45
|
+
return null;
|
|
46
|
+
var b = j && n[j] || n[S];
|
|
47
|
+
return typeof b == "function" ? b : null;
|
|
48
|
+
}
|
|
49
|
+
var R = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
50
|
+
function y(n) {
|
|
51
|
+
{
|
|
52
|
+
for (var b = arguments.length, M = new Array(b > 1 ? b - 1 : 0), z = 1; z < b; z++)
|
|
53
|
+
M[z - 1] = arguments[z];
|
|
54
|
+
F("error", n, M);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function F(n, b, M) {
|
|
58
|
+
{
|
|
59
|
+
var z = R.ReactDebugCurrentFrame, Z = z.getStackAddendum();
|
|
60
|
+
Z !== "" && (b += "%s", M = M.concat([Z]));
|
|
61
|
+
var te = M.map(function(X) {
|
|
62
|
+
return String(X);
|
|
63
|
+
});
|
|
64
|
+
te.unshift("Warning: " + b), Function.prototype.apply.call(console[n], console, te);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
var W = !1, w = !1, P = !1, $ = !1, O = !1, _;
|
|
68
|
+
_ = Symbol.for("react.module.reference");
|
|
69
|
+
function T(n) {
|
|
70
|
+
return !!(typeof n == "string" || typeof n == "function" || n === s || n === i || O || n === c || n === p || n === d || $ || n === N || W || w || P || typeof n == "object" && n !== null && (n.$$typeof === x || n.$$typeof === m || n.$$typeof === o || n.$$typeof === l || n.$$typeof === u || // This needs to include all possible module reference object
|
|
71
|
+
// types supported by any Flight configuration anywhere since
|
|
72
|
+
// we don't know which Flight build this will end up being used
|
|
73
|
+
// with.
|
|
74
|
+
n.$$typeof === _ || n.getModuleId !== void 0));
|
|
75
|
+
}
|
|
76
|
+
function D(n, b, M) {
|
|
77
|
+
var z = n.displayName;
|
|
78
|
+
if (z)
|
|
79
|
+
return z;
|
|
80
|
+
var Z = b.displayName || b.name || "";
|
|
81
|
+
return Z !== "" ? M + "(" + Z + ")" : M;
|
|
82
|
+
}
|
|
83
|
+
function H(n) {
|
|
84
|
+
return n.displayName || "Context";
|
|
85
|
+
}
|
|
86
|
+
function k(n) {
|
|
87
|
+
if (n == null)
|
|
88
|
+
return null;
|
|
89
|
+
if (typeof n.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
90
|
+
return n.displayName || n.name || null;
|
|
91
|
+
if (typeof n == "string")
|
|
92
|
+
return n;
|
|
93
|
+
switch (n) {
|
|
94
|
+
case s:
|
|
95
|
+
return "Fragment";
|
|
96
|
+
case a:
|
|
97
|
+
return "Portal";
|
|
98
|
+
case i:
|
|
99
|
+
return "Profiler";
|
|
100
|
+
case c:
|
|
101
|
+
return "StrictMode";
|
|
102
|
+
case p:
|
|
103
|
+
return "Suspense";
|
|
104
|
+
case d:
|
|
105
|
+
return "SuspenseList";
|
|
106
|
+
}
|
|
107
|
+
if (typeof n == "object")
|
|
108
|
+
switch (n.$$typeof) {
|
|
109
|
+
case l:
|
|
110
|
+
var b = n;
|
|
111
|
+
return H(b) + ".Consumer";
|
|
112
|
+
case o:
|
|
113
|
+
var M = n;
|
|
114
|
+
return H(M._context) + ".Provider";
|
|
115
|
+
case u:
|
|
116
|
+
return D(n, n.render, "ForwardRef");
|
|
117
|
+
case m:
|
|
118
|
+
var z = n.displayName || null;
|
|
119
|
+
return z !== null ? z : k(n.type) || "Memo";
|
|
120
|
+
case x: {
|
|
121
|
+
var Z = n, te = Z._payload, X = Z._init;
|
|
122
|
+
try {
|
|
123
|
+
return k(X(te));
|
|
124
|
+
} catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
var I = Object.assign, B = 0, E, f, v, C, L, K, le;
|
|
132
|
+
function ce() {
|
|
133
|
+
}
|
|
134
|
+
ce.__reactDisabledLog = !0;
|
|
135
|
+
function V() {
|
|
136
|
+
{
|
|
137
|
+
if (B === 0) {
|
|
138
|
+
E = console.log, f = console.info, v = console.warn, C = console.error, L = console.group, K = console.groupCollapsed, le = console.groupEnd;
|
|
139
|
+
var n = {
|
|
140
|
+
configurable: !0,
|
|
141
|
+
enumerable: !0,
|
|
142
|
+
value: ce,
|
|
143
|
+
writable: !0
|
|
144
|
+
};
|
|
145
|
+
Object.defineProperties(console, {
|
|
146
|
+
info: n,
|
|
147
|
+
log: n,
|
|
148
|
+
warn: n,
|
|
149
|
+
error: n,
|
|
150
|
+
group: n,
|
|
151
|
+
groupCollapsed: n,
|
|
152
|
+
groupEnd: n
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
B++;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function Y() {
|
|
159
|
+
{
|
|
160
|
+
if (B--, B === 0) {
|
|
161
|
+
var n = {
|
|
162
|
+
configurable: !0,
|
|
163
|
+
enumerable: !0,
|
|
164
|
+
writable: !0
|
|
165
|
+
};
|
|
166
|
+
Object.defineProperties(console, {
|
|
167
|
+
log: I({}, n, {
|
|
168
|
+
value: E
|
|
169
|
+
}),
|
|
170
|
+
info: I({}, n, {
|
|
171
|
+
value: f
|
|
172
|
+
}),
|
|
173
|
+
warn: I({}, n, {
|
|
174
|
+
value: v
|
|
175
|
+
}),
|
|
176
|
+
error: I({}, n, {
|
|
177
|
+
value: C
|
|
178
|
+
}),
|
|
179
|
+
group: I({}, n, {
|
|
180
|
+
value: L
|
|
181
|
+
}),
|
|
182
|
+
groupCollapsed: I({}, n, {
|
|
183
|
+
value: K
|
|
184
|
+
}),
|
|
185
|
+
groupEnd: I({}, n, {
|
|
186
|
+
value: le
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
B < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
var ee = R.ReactCurrentDispatcher, se;
|
|
194
|
+
function Ne(n, b, M) {
|
|
195
|
+
{
|
|
196
|
+
if (se === void 0)
|
|
197
|
+
try {
|
|
198
|
+
throw Error();
|
|
199
|
+
} catch (Z) {
|
|
200
|
+
var z = Z.stack.trim().match(/\n( *(at )?)/);
|
|
201
|
+
se = z && z[1] || "";
|
|
202
|
+
}
|
|
203
|
+
return `
|
|
204
|
+
` + se + n;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
var ke = !1, we;
|
|
208
|
+
{
|
|
209
|
+
var Oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
210
|
+
we = new Oe();
|
|
211
|
+
}
|
|
212
|
+
function Te(n, b) {
|
|
213
|
+
if (!n || ke)
|
|
214
|
+
return "";
|
|
215
|
+
{
|
|
216
|
+
var M = we.get(n);
|
|
217
|
+
if (M !== void 0)
|
|
218
|
+
return M;
|
|
219
|
+
}
|
|
220
|
+
var z;
|
|
221
|
+
ke = !0;
|
|
222
|
+
var Z = Error.prepareStackTrace;
|
|
223
|
+
Error.prepareStackTrace = void 0;
|
|
224
|
+
var te;
|
|
225
|
+
te = ee.current, ee.current = null, V();
|
|
226
|
+
try {
|
|
227
|
+
if (b) {
|
|
228
|
+
var X = function() {
|
|
229
|
+
throw Error();
|
|
230
|
+
};
|
|
231
|
+
if (Object.defineProperty(X.prototype, "props", {
|
|
232
|
+
set: function() {
|
|
233
|
+
throw Error();
|
|
234
|
+
}
|
|
235
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
|
+
try {
|
|
237
|
+
Reflect.construct(X, []);
|
|
238
|
+
} catch (fe) {
|
|
239
|
+
z = fe;
|
|
240
|
+
}
|
|
241
|
+
Reflect.construct(n, [], X);
|
|
242
|
+
} else {
|
|
243
|
+
try {
|
|
244
|
+
X.call();
|
|
245
|
+
} catch (fe) {
|
|
246
|
+
z = fe;
|
|
247
|
+
}
|
|
248
|
+
n.call(X.prototype);
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
try {
|
|
252
|
+
throw Error();
|
|
253
|
+
} catch (fe) {
|
|
254
|
+
z = fe;
|
|
255
|
+
}
|
|
256
|
+
n();
|
|
257
|
+
}
|
|
258
|
+
} catch (fe) {
|
|
259
|
+
if (fe && z && typeof fe.stack == "string") {
|
|
260
|
+
for (var q = fe.stack.split(`
|
|
261
|
+
`), ue = z.stack.split(`
|
|
262
|
+
`), ne = q.length - 1, ie = ue.length - 1; ne >= 1 && ie >= 0 && q[ne] !== ue[ie]; )
|
|
263
|
+
ie--;
|
|
264
|
+
for (; ne >= 1 && ie >= 0; ne--, ie--)
|
|
265
|
+
if (q[ne] !== ue[ie]) {
|
|
266
|
+
if (ne !== 1 || ie !== 1)
|
|
267
|
+
do
|
|
268
|
+
if (ne--, ie--, ie < 0 || q[ne] !== ue[ie]) {
|
|
269
|
+
var ve = `
|
|
270
|
+
` + q[ne].replace(" at new ", " at ");
|
|
271
|
+
return n.displayName && ve.includes("<anonymous>") && (ve = ve.replace("<anonymous>", n.displayName)), typeof n == "function" && we.set(n, ve), ve;
|
|
272
|
+
}
|
|
273
|
+
while (ne >= 1 && ie >= 0);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
} finally {
|
|
278
|
+
ke = !1, ee.current = te, Y(), Error.prepareStackTrace = Z;
|
|
279
|
+
}
|
|
280
|
+
var Ie = n ? n.displayName || n.name : "", Me = Ie ? Ne(Ie) : "";
|
|
281
|
+
return typeof n == "function" && we.set(n, Me), Me;
|
|
282
|
+
}
|
|
283
|
+
function De(n, b, M) {
|
|
284
|
+
return Te(n, !1);
|
|
285
|
+
}
|
|
286
|
+
function Q(n) {
|
|
287
|
+
var b = n.prototype;
|
|
288
|
+
return !!(b && b.isReactComponent);
|
|
289
|
+
}
|
|
290
|
+
function pe(n, b, M) {
|
|
291
|
+
if (n == null)
|
|
292
|
+
return "";
|
|
293
|
+
if (typeof n == "function")
|
|
294
|
+
return Te(n, Q(n));
|
|
295
|
+
if (typeof n == "string")
|
|
296
|
+
return Ne(n);
|
|
297
|
+
switch (n) {
|
|
298
|
+
case p:
|
|
299
|
+
return Ne("Suspense");
|
|
300
|
+
case d:
|
|
301
|
+
return Ne("SuspenseList");
|
|
302
|
+
}
|
|
303
|
+
if (typeof n == "object")
|
|
304
|
+
switch (n.$$typeof) {
|
|
305
|
+
case u:
|
|
306
|
+
return De(n.render);
|
|
307
|
+
case m:
|
|
308
|
+
return pe(n.type, b, M);
|
|
309
|
+
case x: {
|
|
310
|
+
var z = n, Z = z._payload, te = z._init;
|
|
311
|
+
try {
|
|
312
|
+
return pe(te(Z), b, M);
|
|
313
|
+
} catch {
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return "";
|
|
318
|
+
}
|
|
319
|
+
var me = Object.prototype.hasOwnProperty, he = {}, Se = R.ReactDebugCurrentFrame;
|
|
320
|
+
function Pe(n) {
|
|
321
|
+
if (n) {
|
|
322
|
+
var b = n._owner, M = pe(n.type, n._source, b ? b.type : null);
|
|
323
|
+
Se.setExtraStackFrame(M);
|
|
324
|
+
} else
|
|
325
|
+
Se.setExtraStackFrame(null);
|
|
326
|
+
}
|
|
327
|
+
function Ve(n, b, M, z, Z) {
|
|
328
|
+
{
|
|
329
|
+
var te = Function.call.bind(me);
|
|
330
|
+
for (var X in n)
|
|
331
|
+
if (te(n, X)) {
|
|
332
|
+
var q = void 0;
|
|
333
|
+
try {
|
|
334
|
+
if (typeof n[X] != "function") {
|
|
335
|
+
var ue = Error((z || "React class") + ": " + M + " type `" + X + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[X] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
336
|
+
throw ue.name = "Invariant Violation", ue;
|
|
337
|
+
}
|
|
338
|
+
q = n[X](b, X, z, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
339
|
+
} catch (ne) {
|
|
340
|
+
q = ne;
|
|
341
|
+
}
|
|
342
|
+
q && !(q instanceof Error) && (Pe(Z), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", z || "React class", M, X, typeof q), Pe(null)), q instanceof Error && !(q.message in he) && (he[q.message] = !0, Pe(Z), y("Failed %s type: %s", M, q.message), Pe(null));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
var Be = Array.isArray;
|
|
347
|
+
function Ce(n) {
|
|
348
|
+
return Be(n);
|
|
349
|
+
}
|
|
350
|
+
function nt(n) {
|
|
351
|
+
{
|
|
352
|
+
var b = typeof Symbol == "function" && Symbol.toStringTag, M = b && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
353
|
+
return M;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function Ye(n) {
|
|
357
|
+
try {
|
|
358
|
+
return qe(n), !1;
|
|
359
|
+
} catch {
|
|
360
|
+
return !0;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function qe(n) {
|
|
364
|
+
return "" + n;
|
|
365
|
+
}
|
|
366
|
+
function Xe(n) {
|
|
367
|
+
if (Ye(n))
|
|
368
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(n)), qe(n);
|
|
369
|
+
}
|
|
370
|
+
var ot = R.ReactCurrentOwner, vt = {
|
|
371
|
+
key: !0,
|
|
372
|
+
ref: !0,
|
|
373
|
+
__self: !0,
|
|
374
|
+
__source: !0
|
|
375
|
+
}, it, We;
|
|
376
|
+
function Qt(n) {
|
|
377
|
+
if (me.call(n, "ref")) {
|
|
378
|
+
var b = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
379
|
+
if (b && b.isReactWarning)
|
|
380
|
+
return !1;
|
|
381
|
+
}
|
|
382
|
+
return n.ref !== void 0;
|
|
383
|
+
}
|
|
384
|
+
function er(n) {
|
|
385
|
+
if (me.call(n, "key")) {
|
|
386
|
+
var b = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
387
|
+
if (b && b.isReactWarning)
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
return n.key !== void 0;
|
|
391
|
+
}
|
|
392
|
+
function tr(n, b) {
|
|
393
|
+
typeof n.ref == "string" && ot.current;
|
|
394
|
+
}
|
|
395
|
+
function rr(n, b) {
|
|
396
|
+
{
|
|
397
|
+
var M = function() {
|
|
398
|
+
it || (it = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
399
|
+
};
|
|
400
|
+
M.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
401
|
+
get: M,
|
|
402
|
+
configurable: !0
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function ar(n, b) {
|
|
407
|
+
{
|
|
408
|
+
var M = function() {
|
|
409
|
+
We || (We = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
410
|
+
};
|
|
411
|
+
M.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
412
|
+
get: M,
|
|
413
|
+
configurable: !0
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
var sr = function(n, b, M, z, Z, te, X) {
|
|
418
|
+
var q = {
|
|
419
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
420
|
+
$$typeof: t,
|
|
421
|
+
// Built-in properties that belong on the element
|
|
422
|
+
type: n,
|
|
423
|
+
key: b,
|
|
424
|
+
ref: M,
|
|
425
|
+
props: X,
|
|
426
|
+
// Record the component responsible for creating this element.
|
|
427
|
+
_owner: te
|
|
428
|
+
};
|
|
429
|
+
return q._store = {}, Object.defineProperty(q._store, "validated", {
|
|
430
|
+
configurable: !1,
|
|
431
|
+
enumerable: !1,
|
|
432
|
+
writable: !0,
|
|
433
|
+
value: !1
|
|
434
|
+
}), Object.defineProperty(q, "_self", {
|
|
435
|
+
configurable: !1,
|
|
436
|
+
enumerable: !1,
|
|
437
|
+
writable: !1,
|
|
438
|
+
value: z
|
|
439
|
+
}), Object.defineProperty(q, "_source", {
|
|
440
|
+
configurable: !1,
|
|
441
|
+
enumerable: !1,
|
|
442
|
+
writable: !1,
|
|
443
|
+
value: Z
|
|
444
|
+
}), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
|
|
445
|
+
};
|
|
446
|
+
function nr(n, b, M, z, Z) {
|
|
447
|
+
{
|
|
448
|
+
var te, X = {}, q = null, ue = null;
|
|
449
|
+
M !== void 0 && (Xe(M), q = "" + M), er(b) && (Xe(b.key), q = "" + b.key), Qt(b) && (ue = b.ref, tr(b, Z));
|
|
450
|
+
for (te in b)
|
|
451
|
+
me.call(b, te) && !vt.hasOwnProperty(te) && (X[te] = b[te]);
|
|
452
|
+
if (n && n.defaultProps) {
|
|
453
|
+
var ne = n.defaultProps;
|
|
454
|
+
for (te in ne)
|
|
455
|
+
X[te] === void 0 && (X[te] = ne[te]);
|
|
456
|
+
}
|
|
457
|
+
if (q || ue) {
|
|
458
|
+
var ie = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
459
|
+
q && rr(X, ie), ue && ar(X, ie);
|
|
460
|
+
}
|
|
461
|
+
return sr(n, q, ue, Z, z, ot.current, X);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
var lt = R.ReactCurrentOwner, xt = R.ReactDebugCurrentFrame;
|
|
465
|
+
function Ae(n) {
|
|
466
|
+
if (n) {
|
|
467
|
+
var b = n._owner, M = pe(n.type, n._source, b ? b.type : null);
|
|
468
|
+
xt.setExtraStackFrame(M);
|
|
469
|
+
} else
|
|
470
|
+
xt.setExtraStackFrame(null);
|
|
471
|
+
}
|
|
472
|
+
var ct;
|
|
473
|
+
ct = !1;
|
|
474
|
+
function ut(n) {
|
|
475
|
+
return typeof n == "object" && n !== null && n.$$typeof === t;
|
|
476
|
+
}
|
|
477
|
+
function yt() {
|
|
478
|
+
{
|
|
479
|
+
if (lt.current) {
|
|
480
|
+
var n = k(lt.current.type);
|
|
481
|
+
if (n)
|
|
482
|
+
return `
|
|
483
|
+
|
|
484
|
+
Check the render method of \`` + n + "`.";
|
|
485
|
+
}
|
|
486
|
+
return "";
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
function or(n) {
|
|
490
|
+
return "";
|
|
491
|
+
}
|
|
492
|
+
var bt = {};
|
|
493
|
+
function ir(n) {
|
|
494
|
+
{
|
|
495
|
+
var b = yt();
|
|
496
|
+
if (!b) {
|
|
497
|
+
var M = typeof n == "string" ? n : n.displayName || n.name;
|
|
498
|
+
M && (b = `
|
|
499
|
+
|
|
500
|
+
Check the top-level render call using <` + M + ">.");
|
|
501
|
+
}
|
|
502
|
+
return b;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function gt(n, b) {
|
|
506
|
+
{
|
|
507
|
+
if (!n._store || n._store.validated || n.key != null)
|
|
508
|
+
return;
|
|
509
|
+
n._store.validated = !0;
|
|
510
|
+
var M = ir(b);
|
|
511
|
+
if (bt[M])
|
|
512
|
+
return;
|
|
513
|
+
bt[M] = !0;
|
|
514
|
+
var z = "";
|
|
515
|
+
n && n._owner && n._owner !== lt.current && (z = " It was passed a child from " + k(n._owner.type) + "."), Ae(n), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, z), Ae(null);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function wt(n, b) {
|
|
519
|
+
{
|
|
520
|
+
if (typeof n != "object")
|
|
521
|
+
return;
|
|
522
|
+
if (Ce(n))
|
|
523
|
+
for (var M = 0; M < n.length; M++) {
|
|
524
|
+
var z = n[M];
|
|
525
|
+
ut(z) && gt(z, b);
|
|
526
|
+
}
|
|
527
|
+
else if (ut(n))
|
|
528
|
+
n._store && (n._store.validated = !0);
|
|
529
|
+
else if (n) {
|
|
530
|
+
var Z = h(n);
|
|
531
|
+
if (typeof Z == "function" && Z !== n.entries)
|
|
532
|
+
for (var te = Z.call(n), X; !(X = te.next()).done; )
|
|
533
|
+
ut(X.value) && gt(X.value, b);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function lr(n) {
|
|
538
|
+
{
|
|
539
|
+
var b = n.type;
|
|
540
|
+
if (b == null || typeof b == "string")
|
|
541
|
+
return;
|
|
542
|
+
var M;
|
|
543
|
+
if (typeof b == "function")
|
|
544
|
+
M = b.propTypes;
|
|
545
|
+
else if (typeof b == "object" && (b.$$typeof === u || // Note: Memo only checks outer props here.
|
|
546
|
+
// Inner props are checked in the reconciler.
|
|
547
|
+
b.$$typeof === m))
|
|
548
|
+
M = b.propTypes;
|
|
549
|
+
else
|
|
550
|
+
return;
|
|
551
|
+
if (M) {
|
|
552
|
+
var z = k(b);
|
|
553
|
+
Ve(M, n.props, "prop", z, n);
|
|
554
|
+
} else if (b.PropTypes !== void 0 && !ct) {
|
|
555
|
+
ct = !0;
|
|
556
|
+
var Z = k(b);
|
|
557
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Z || "Unknown");
|
|
558
|
+
}
|
|
559
|
+
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
function cr(n) {
|
|
563
|
+
{
|
|
564
|
+
for (var b = Object.keys(n.props), M = 0; M < b.length; M++) {
|
|
565
|
+
var z = b[M];
|
|
566
|
+
if (z !== "children" && z !== "key") {
|
|
567
|
+
Ae(n), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", z), Ae(null);
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
n.ref !== null && (Ae(n), y("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
var jt = {};
|
|
575
|
+
function Rt(n, b, M, z, Z, te) {
|
|
576
|
+
{
|
|
577
|
+
var X = T(n);
|
|
578
|
+
if (!X) {
|
|
579
|
+
var q = "";
|
|
580
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (q += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
+
var ue = or();
|
|
582
|
+
ue ? q += ue : q += yt();
|
|
583
|
+
var ne;
|
|
584
|
+
n === null ? ne = "null" : Ce(n) ? ne = "array" : n !== void 0 && n.$$typeof === t ? (ne = "<" + (k(n.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof n, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, q);
|
|
585
|
+
}
|
|
586
|
+
var ie = nr(n, b, M, Z, te);
|
|
587
|
+
if (ie == null)
|
|
588
|
+
return ie;
|
|
589
|
+
if (X) {
|
|
590
|
+
var ve = b.children;
|
|
591
|
+
if (ve !== void 0)
|
|
592
|
+
if (z)
|
|
593
|
+
if (Ce(ve)) {
|
|
594
|
+
for (var Ie = 0; Ie < ve.length; Ie++)
|
|
595
|
+
wt(ve[Ie], n);
|
|
596
|
+
Object.freeze && Object.freeze(ve);
|
|
597
|
+
} else
|
|
598
|
+
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
|
+
else
|
|
600
|
+
wt(ve, n);
|
|
601
|
+
}
|
|
602
|
+
if (me.call(b, "key")) {
|
|
603
|
+
var Me = k(n), fe = Object.keys(b).filter(function(hr) {
|
|
604
|
+
return hr !== "key";
|
|
605
|
+
}), dt = fe.length > 0 ? "{key: someKey, " + fe.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
606
|
+
if (!jt[Me + dt]) {
|
|
607
|
+
var mr = fe.length > 0 ? "{" + fe.join(": ..., ") + ": ...}" : "{}";
|
|
608
|
+
y(`A props object containing a "key" prop is being spread into JSX:
|
|
609
|
+
let props = %s;
|
|
610
|
+
<%s {...props} />
|
|
611
|
+
React keys must be passed directly to JSX without using spread:
|
|
612
|
+
let props = %s;
|
|
613
|
+
<%s key={someKey} {...props} />`, dt, Me, mr, Me), jt[Me + dt] = !0;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return n === s ? cr(ie) : lr(ie), ie;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function ur(n, b, M) {
|
|
620
|
+
return Rt(n, b, M, !0);
|
|
621
|
+
}
|
|
622
|
+
function dr(n, b, M) {
|
|
623
|
+
return Rt(n, b, M, !1);
|
|
624
|
+
}
|
|
625
|
+
var fr = dr, pr = ur;
|
|
626
|
+
He.Fragment = s, He.jsx = fr, He.jsxs = pr;
|
|
627
|
+
})()), He;
|
|
628
|
+
}
|
|
629
|
+
var Et;
|
|
630
|
+
function wr() {
|
|
631
|
+
return Et || (Et = 1, process.env.NODE_ENV === "production" ? Je.exports = br() : Je.exports = gr()), Je.exports;
|
|
632
|
+
}
|
|
633
|
+
var r = wr();
|
|
634
|
+
const jr = (e) => e.filter((t) => !!t).join(" "), A = g.forwardRef(
|
|
635
|
+
({
|
|
636
|
+
as: e = "div",
|
|
637
|
+
role: t,
|
|
638
|
+
ariaLabel: a,
|
|
639
|
+
tabIndex: s,
|
|
640
|
+
onKeyDown: c,
|
|
641
|
+
...i
|
|
642
|
+
}, o) => {
|
|
643
|
+
const {
|
|
644
|
+
classNames: l = [],
|
|
645
|
+
bgColor: u,
|
|
646
|
+
bgColour: p,
|
|
647
|
+
bgOpacity: d,
|
|
648
|
+
borderColor: m,
|
|
649
|
+
borderColour: x,
|
|
650
|
+
borderOpacity: N,
|
|
651
|
+
className: j,
|
|
652
|
+
columns: S,
|
|
653
|
+
fillColor: h,
|
|
654
|
+
fillColour: R,
|
|
655
|
+
gap: y,
|
|
656
|
+
hideOnDesktop: F,
|
|
657
|
+
hideOnMobile: W,
|
|
658
|
+
hideOnTabletLandscape: w,
|
|
659
|
+
hideOnTabletPortrait: P,
|
|
660
|
+
horizontalMargin: $,
|
|
661
|
+
horizontalPadding: O,
|
|
662
|
+
horizontallyCenterThis: _,
|
|
663
|
+
horizontallyCentreThis: T,
|
|
664
|
+
isFullHeight: D,
|
|
665
|
+
isFullWidth: H,
|
|
666
|
+
layoutAsFlexbox: k,
|
|
667
|
+
layoutAsGrid: I,
|
|
668
|
+
stackVertically: B,
|
|
669
|
+
stackHorizontally: E,
|
|
670
|
+
marginLeft: f,
|
|
671
|
+
marginBottom: v,
|
|
672
|
+
margin: C,
|
|
673
|
+
marginRight: L,
|
|
674
|
+
marginTop: K,
|
|
675
|
+
opacity: le,
|
|
676
|
+
paddingBottom: ce,
|
|
677
|
+
paddingLeft: V,
|
|
678
|
+
padding: Y,
|
|
679
|
+
paddingRight: ee,
|
|
680
|
+
paddingTop: se,
|
|
681
|
+
pushItemsToEnds: Ne,
|
|
682
|
+
shadow: ke,
|
|
683
|
+
shape: we,
|
|
684
|
+
showOnlyOnDesktop: Oe,
|
|
685
|
+
showOnlyOnMobile: Te,
|
|
686
|
+
showOnlyOnTabletLandscape: De,
|
|
687
|
+
showOnlyOnTabletPortrait: Q,
|
|
688
|
+
size: pe,
|
|
689
|
+
strokeColor: me,
|
|
690
|
+
strokeColour: he,
|
|
691
|
+
textColor: Se,
|
|
692
|
+
textColour: Pe,
|
|
693
|
+
verticalMargin: Ve,
|
|
694
|
+
verticalPadding: Be,
|
|
695
|
+
verticallyCenterItems: Ce,
|
|
696
|
+
verticallyCentreItems: nt,
|
|
697
|
+
weight: Ye,
|
|
698
|
+
style: qe,
|
|
699
|
+
...Xe
|
|
700
|
+
} = i, { className: ot, classNames: vt, ...it } = i, We = {
|
|
701
|
+
...qe,
|
|
702
|
+
...d && { "--bg-opacity": Number(d) / 100 },
|
|
703
|
+
...N && { "--border-opacity": Number(N) / 100 }
|
|
704
|
+
};
|
|
705
|
+
return /* @__PURE__ */ r.jsx(
|
|
706
|
+
e,
|
|
707
|
+
{
|
|
708
|
+
ref: o,
|
|
709
|
+
role: t,
|
|
710
|
+
"aria-label": a,
|
|
711
|
+
tabIndex: s,
|
|
712
|
+
onKeyDown: c,
|
|
713
|
+
...Xe,
|
|
714
|
+
style: Object.keys(We).length > 0 ? We : void 0,
|
|
715
|
+
className: jr(
|
|
716
|
+
[
|
|
717
|
+
j,
|
|
718
|
+
u && `bg-${u}`,
|
|
719
|
+
p && `bg-${p}`,
|
|
720
|
+
m && `border-${m}`,
|
|
721
|
+
x && `border-${x}`,
|
|
722
|
+
h && `fill-${h}`,
|
|
723
|
+
R && `fill-${R}`,
|
|
724
|
+
F && "hide-on-desktop",
|
|
725
|
+
W && "hide-on-mobile",
|
|
726
|
+
w && "hide-on-tablet-landscape",
|
|
727
|
+
P && "hide-on-tablet-portrait",
|
|
728
|
+
$ && `margin-right-${$} margin-left-${$}`,
|
|
729
|
+
O && `padding-right-${O} padding-left-${O}`,
|
|
730
|
+
_ && "horizontally-centre-this",
|
|
731
|
+
T && "horizontally-centre-this",
|
|
732
|
+
D && "full-height",
|
|
733
|
+
H && "full-width",
|
|
734
|
+
k && "layout-flexbox",
|
|
735
|
+
I && "layout-grid",
|
|
736
|
+
B && "stack-vertically",
|
|
737
|
+
E && "stack-horizontally",
|
|
738
|
+
y && `gap-${y}`,
|
|
739
|
+
f && `margin-left-${f}`,
|
|
740
|
+
v && `margin-bottom-${v}`,
|
|
741
|
+
C && `margin-all-${C}`,
|
|
742
|
+
L && `margin-right-${L}`,
|
|
743
|
+
K && `margin-top-${K}`,
|
|
744
|
+
le && `opacity-${le}`,
|
|
745
|
+
ce && `padding-bottom-${ce}`,
|
|
746
|
+
V && `padding-left-${V}`,
|
|
747
|
+
Y && `padding-all-${Y}`,
|
|
748
|
+
ee && `padding-right-${ee}`,
|
|
749
|
+
se && `padding-top-${se}`,
|
|
750
|
+
Ne && "push-to-ends",
|
|
751
|
+
ke && `shadow-${ke}`,
|
|
752
|
+
we && `shape-${we}`,
|
|
753
|
+
Oe && "show-only-on-desktop",
|
|
754
|
+
Te && "show-only-on-mobile",
|
|
755
|
+
De && "show-only-on-tablet-landscape",
|
|
756
|
+
Q && "show-only-on-tablet-portrait",
|
|
757
|
+
pe && `size-${pe}`,
|
|
758
|
+
me && `stroke-${me}`,
|
|
759
|
+
he && `stroke-${he}`,
|
|
760
|
+
Se && `text-${Se}`,
|
|
761
|
+
Pe && `text-${Pe}`,
|
|
762
|
+
Ve && `margin-top-${Ve} margin-bottom-${Ve}`,
|
|
763
|
+
Be && `padding-top-${Be} padding-bottom-${Be}`,
|
|
764
|
+
Ce && "vertically-centre-items",
|
|
765
|
+
nt && "vertically-centre-items",
|
|
766
|
+
Ye && `weight-${Ye}`
|
|
767
|
+
].concat(l)
|
|
768
|
+
)
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
A.displayName = "Element";
|
|
774
|
+
const be = (e, t) => g.forwardRef(
|
|
775
|
+
(a, s) => {
|
|
776
|
+
const c = { ...t, ...a };
|
|
777
|
+
if (e === "a" && "external" in c) {
|
|
778
|
+
const { external: i } = c;
|
|
779
|
+
i && (c.target = "_blank", c.rel = "noopener noreferrer");
|
|
780
|
+
}
|
|
781
|
+
return /* @__PURE__ */ r.jsx(A, { as: e, ref: s, ...c });
|
|
782
|
+
}
|
|
783
|
+
), Pa = be("article"), Ma = be("aside"), Oa = be("body"), G = be("div"), Da = be("footer"), Aa = be("header"), Ia = be("main"), Rr = be("nav"), La = be("section"), Fa = be("span"), Va = be("a", {
|
|
784
|
+
rel: "noopener noreferrer"
|
|
785
|
+
// Default props for Hyperlink
|
|
786
|
+
}), Nr = {
|
|
787
|
+
cross: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) }),
|
|
788
|
+
tick: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M5 12l5 5L20 7" }) }),
|
|
789
|
+
plus: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M12 5v14M5 12h14" }) }),
|
|
790
|
+
minus: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M5 12h14" }) })
|
|
791
|
+
}, at = g.forwardRef(
|
|
792
|
+
({
|
|
793
|
+
children: e,
|
|
794
|
+
size: t = "medium",
|
|
795
|
+
shape: a,
|
|
796
|
+
actionIcon: s,
|
|
797
|
+
onActionClick: c,
|
|
798
|
+
actionAriaLabel: i,
|
|
799
|
+
...o
|
|
800
|
+
}, l) => {
|
|
801
|
+
let u = [];
|
|
802
|
+
t && u.push(`size-${t}`), a && u.push(`shape-${a}`);
|
|
803
|
+
const p = (m) => {
|
|
804
|
+
m.stopPropagation(), c == null || c(m);
|
|
805
|
+
}, d = !!s;
|
|
806
|
+
return /* @__PURE__ */ r.jsxs(
|
|
807
|
+
A,
|
|
808
|
+
{
|
|
809
|
+
"data-badge": !0,
|
|
810
|
+
"data-has-action": d || void 0,
|
|
811
|
+
ref: l,
|
|
812
|
+
classNames: u,
|
|
813
|
+
role: "status",
|
|
814
|
+
"aria-label": typeof e == "string" ? e : void 0,
|
|
815
|
+
...o,
|
|
816
|
+
children: [
|
|
817
|
+
e,
|
|
818
|
+
d && /* @__PURE__ */ r.jsx(
|
|
819
|
+
"button",
|
|
820
|
+
{
|
|
821
|
+
type: "button",
|
|
822
|
+
className: "badge-action-button",
|
|
823
|
+
onClick: p,
|
|
824
|
+
"aria-label": i,
|
|
825
|
+
children: Nr[s]
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
at.displayName = "Badge";
|
|
834
|
+
const ft = (e, t) => {
|
|
835
|
+
const a = U(t, [t]);
|
|
836
|
+
re(() => {
|
|
837
|
+
const s = (c) => {
|
|
838
|
+
!e.current || typeof a != "function" || e.current.contains(c.target) || a(c);
|
|
839
|
+
};
|
|
840
|
+
return document.addEventListener("mousedown", s), document.addEventListener("touchstart", s), () => {
|
|
841
|
+
document.removeEventListener("mousedown", s), document.removeEventListener("touchstart", s);
|
|
842
|
+
};
|
|
843
|
+
}, [e, a]);
|
|
844
|
+
}, kr = g.forwardRef(
|
|
845
|
+
({
|
|
846
|
+
id: e,
|
|
847
|
+
children: t,
|
|
848
|
+
isOpen: a = !1,
|
|
849
|
+
onClose: s,
|
|
850
|
+
position: c = "right",
|
|
851
|
+
size: i = "medium",
|
|
852
|
+
padding: o = "micro",
|
|
853
|
+
bgColor: l,
|
|
854
|
+
bgColour: u,
|
|
855
|
+
isDismissible: p = !0,
|
|
856
|
+
showOverlay: d = !0,
|
|
857
|
+
blurOverlay: m = !1,
|
|
858
|
+
closeOnClickOutside: x = !0,
|
|
859
|
+
zIndex: N,
|
|
860
|
+
label: j,
|
|
861
|
+
description: S,
|
|
862
|
+
classNames: h = [],
|
|
863
|
+
...R
|
|
864
|
+
}, y) => {
|
|
865
|
+
const F = `${e}`, W = S ? `${F}-description` : void 0, w = oe(null), P = y || w, $ = [
|
|
866
|
+
"drawer",
|
|
867
|
+
c,
|
|
868
|
+
i,
|
|
869
|
+
...a ? ["open"] : [],
|
|
870
|
+
...d ? ["with-overlay"] : [],
|
|
871
|
+
...m ? ["blur-overlay"] : [],
|
|
872
|
+
...h
|
|
873
|
+
];
|
|
874
|
+
re(() => {
|
|
875
|
+
const _ = P.current, T = document.querySelector(`[data-drawer-overlay-for="${F}"]`);
|
|
876
|
+
return a ? (_ == null || _.classList.add("open"), _ == null || _.classList.remove("closing"), _ == null || _.focus(), T && T.classList.add("visible"), document.body.style.overflow = "hidden") : _ != null && _.classList.contains("open") && (_.classList.add("closing"), _.classList.remove("open"), T && T.classList.remove("visible"), document.body.style.overflow = ""), () => {
|
|
877
|
+
document.body.style.overflow = "";
|
|
878
|
+
};
|
|
879
|
+
}, [a, F, P]), re(() => {
|
|
880
|
+
const _ = (T) => {
|
|
881
|
+
T.key === "Escape" && p && a && s && s();
|
|
882
|
+
};
|
|
883
|
+
return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
|
|
884
|
+
}, [p, a, s]), ft(P, () => {
|
|
885
|
+
x && p && a && s && s();
|
|
886
|
+
});
|
|
887
|
+
const O = (_) => {
|
|
888
|
+
(_.animationName.includes("slide-out") || _.animationName.includes("fade-out")) && _.currentTarget.classList.remove("closing");
|
|
889
|
+
};
|
|
890
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
891
|
+
d && /* @__PURE__ */ r.jsx(
|
|
892
|
+
G,
|
|
893
|
+
{
|
|
894
|
+
className: `drawer-overlay ${m ? "blur" : ""} ${a ? "visible" : ""}`,
|
|
895
|
+
"data-drawer-overlay-for": e,
|
|
896
|
+
"aria-hidden": "true",
|
|
897
|
+
onClick: x && p && s ? s : void 0,
|
|
898
|
+
style: { zIndex: N ?? 9999 }
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ r.jsxs(
|
|
902
|
+
A,
|
|
903
|
+
{
|
|
904
|
+
as: "div",
|
|
905
|
+
id: F,
|
|
906
|
+
"data-drawer": !0,
|
|
907
|
+
ref: P,
|
|
908
|
+
classNames: $,
|
|
909
|
+
onAnimationEnd: O,
|
|
910
|
+
role: "dialog",
|
|
911
|
+
"aria-modal": "true",
|
|
912
|
+
"aria-label": j || "Drawer",
|
|
913
|
+
"aria-describedby": W,
|
|
914
|
+
tabIndex: -1,
|
|
915
|
+
style: { zIndex: N ?? 1e4 },
|
|
916
|
+
...R,
|
|
917
|
+
children: [
|
|
918
|
+
p && s && /* @__PURE__ */ r.jsx(
|
|
919
|
+
"button",
|
|
920
|
+
{
|
|
921
|
+
className: "drawer-dismiss-button",
|
|
922
|
+
onClick: s,
|
|
923
|
+
"aria-label": "Close drawer",
|
|
924
|
+
tabIndex: 0,
|
|
925
|
+
children: "×"
|
|
926
|
+
}
|
|
927
|
+
),
|
|
928
|
+
/* @__PURE__ */ r.jsxs(
|
|
929
|
+
G,
|
|
930
|
+
{
|
|
931
|
+
className: "drawer-content",
|
|
932
|
+
padding: o,
|
|
933
|
+
bgColor: l,
|
|
934
|
+
bgColour: u,
|
|
935
|
+
children: [
|
|
936
|
+
S && /* @__PURE__ */ r.jsx("div", { id: W, className: "sr-only", children: S }),
|
|
937
|
+
/* @__PURE__ */ r.jsx("div", { role: "document", children: t })
|
|
938
|
+
]
|
|
939
|
+
}
|
|
940
|
+
)
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
)
|
|
944
|
+
] });
|
|
945
|
+
}
|
|
946
|
+
);
|
|
947
|
+
kr.displayName = "Drawer";
|
|
948
|
+
const pt = g.forwardRef(
|
|
949
|
+
({ size: e = "medium", shape: t, kind: a, isLoading: s, label: c, ...i }, o) => {
|
|
950
|
+
let l = [];
|
|
951
|
+
return a && l.push(a), e && l.push(`size-${e}`), t && l.push(`shape-${t}`), s && l.push("is-loading"), /* @__PURE__ */ r.jsx(
|
|
952
|
+
A,
|
|
953
|
+
{
|
|
954
|
+
as: "button",
|
|
955
|
+
"data-button": !0,
|
|
956
|
+
ref: o,
|
|
957
|
+
classNames: l,
|
|
958
|
+
"aria-label": c,
|
|
959
|
+
"aria-disabled": i.disabled || s,
|
|
960
|
+
"aria-busy": s,
|
|
961
|
+
...i
|
|
962
|
+
}
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
);
|
|
966
|
+
pt.displayName = "Button";
|
|
967
|
+
const Er = g.forwardRef(
|
|
968
|
+
({ isJoint: e = !0, spacing: t, equaliseWidth: a, children: s, ...c }, i) => {
|
|
969
|
+
let o = [];
|
|
970
|
+
return e && o.push("is-joint"), t && !e && o.push(`spacing-${t}`), a && o.push("equal-width"), /* @__PURE__ */ r.jsx(
|
|
971
|
+
A,
|
|
972
|
+
{
|
|
973
|
+
as: "div",
|
|
974
|
+
"data-button-group": !0,
|
|
975
|
+
ref: i,
|
|
976
|
+
role: "group",
|
|
977
|
+
classNames: o,
|
|
978
|
+
...c,
|
|
979
|
+
children: s
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
Er.displayName = "ButtonGroup";
|
|
985
|
+
const $t = g.forwardRef(
|
|
986
|
+
({ children: e, current: t, ...a }, s) => /* @__PURE__ */ r.jsx(
|
|
987
|
+
A,
|
|
988
|
+
{
|
|
989
|
+
as: "li",
|
|
990
|
+
"data-breadcrumb-item": !0,
|
|
991
|
+
ref: s,
|
|
992
|
+
...a,
|
|
993
|
+
"aria-current": t ? "page" : void 0,
|
|
994
|
+
className: t ? "current" : void 0,
|
|
995
|
+
role: "listitem",
|
|
996
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "breadcrumb-content", children: e })
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
), $r = ({ separator: e }) => /* @__PURE__ */ r.jsx(
|
|
1000
|
+
ae,
|
|
1001
|
+
{
|
|
1002
|
+
className: "breadcrumb-separator",
|
|
1003
|
+
"aria-hidden": "true",
|
|
1004
|
+
role: "presentation",
|
|
1005
|
+
margin: "none",
|
|
1006
|
+
children: e
|
|
1007
|
+
}
|
|
1008
|
+
), _r = g.forwardRef(
|
|
1009
|
+
({ children: e, separator: t = "/", spacing: a = "micro", ...s }, c) => {
|
|
1010
|
+
let i = [];
|
|
1011
|
+
a && i.push(`spacing-${a}`);
|
|
1012
|
+
const o = g.Children.toArray(e).filter(Boolean), l = o.reduce((u, p, d) => {
|
|
1013
|
+
if (!g.isValidElement(p)) return u;
|
|
1014
|
+
const m = d === o.length - 1;
|
|
1015
|
+
let x;
|
|
1016
|
+
return p.type === $t ? x = g.cloneElement(p, {
|
|
1017
|
+
...p.props,
|
|
1018
|
+
current: m
|
|
1019
|
+
}) : x = /* @__PURE__ */ r.jsx($t, { current: m, children: p }, `item-${d}`), u.push(x), m || u.push(
|
|
1020
|
+
/* @__PURE__ */ r.jsx($r, { separator: t }, `sep-${d}`)
|
|
1021
|
+
), u;
|
|
1022
|
+
}, []);
|
|
1023
|
+
return /* @__PURE__ */ r.jsx("nav", { "aria-label": "Breadcrumb", ref: c, ...s, children: /* @__PURE__ */ r.jsx(
|
|
1024
|
+
A,
|
|
1025
|
+
{
|
|
1026
|
+
as: "ul",
|
|
1027
|
+
"data-breadcrumbs-wrapper": !0,
|
|
1028
|
+
role: "list",
|
|
1029
|
+
classNames: i,
|
|
1030
|
+
children: l
|
|
1031
|
+
}
|
|
1032
|
+
) });
|
|
1033
|
+
}
|
|
1034
|
+
);
|
|
1035
|
+
_r.displayName = "Breadcrumbs";
|
|
1036
|
+
const Lt = g.forwardRef(
|
|
1037
|
+
({ kind: e, children: t, title: a, ...s }, c) => {
|
|
1038
|
+
const i = {
|
|
1039
|
+
info: "status",
|
|
1040
|
+
success: "status",
|
|
1041
|
+
warning: "alert",
|
|
1042
|
+
error: "alert"
|
|
1043
|
+
};
|
|
1044
|
+
return /* @__PURE__ */ r.jsx(
|
|
1045
|
+
A,
|
|
1046
|
+
{
|
|
1047
|
+
as: "div",
|
|
1048
|
+
"data-callout": !0,
|
|
1049
|
+
ref: c,
|
|
1050
|
+
className: e,
|
|
1051
|
+
role: i[e],
|
|
1052
|
+
"aria-live": e === "error" || e === "warning" ? "assertive" : "polite",
|
|
1053
|
+
"aria-label": a,
|
|
1054
|
+
...s,
|
|
1055
|
+
children: t
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
);
|
|
1060
|
+
Lt.displayName = "Callout";
|
|
1061
|
+
const Ft = g.forwardRef(({ shape: e, heading: t, children: a, ...s }, c) => {
|
|
1062
|
+
let i = [];
|
|
1063
|
+
return e && i.push(`shape-${e}`), /* @__PURE__ */ r.jsx(
|
|
1064
|
+
A,
|
|
1065
|
+
{
|
|
1066
|
+
as: "div",
|
|
1067
|
+
"data-card": !0,
|
|
1068
|
+
ref: c,
|
|
1069
|
+
classNames: i,
|
|
1070
|
+
role: "region",
|
|
1071
|
+
"aria-label": t,
|
|
1072
|
+
tabIndex: 0,
|
|
1073
|
+
...s,
|
|
1074
|
+
children: a
|
|
1075
|
+
}
|
|
1076
|
+
);
|
|
1077
|
+
});
|
|
1078
|
+
Ft.displayName = "Card";
|
|
1079
|
+
const Tr = g.forwardRef(({
|
|
1080
|
+
children: e,
|
|
1081
|
+
source: t,
|
|
1082
|
+
language: a = "json",
|
|
1083
|
+
showCopyButton: s,
|
|
1084
|
+
showLineNumbers: c,
|
|
1085
|
+
description: i,
|
|
1086
|
+
withSyntaxHighlighting: o = !1,
|
|
1087
|
+
makeEditable: l = !1,
|
|
1088
|
+
onChange: u,
|
|
1089
|
+
shadow: p,
|
|
1090
|
+
...d
|
|
1091
|
+
}, m) => {
|
|
1092
|
+
const [x, N] = J(!1), [j, S] = J(null), [h, R] = J(o), [y, F] = J(null), W = oe(null);
|
|
1093
|
+
let w = typeof e == "string" ? e : g.Children.toArray(e).join("");
|
|
1094
|
+
e || (w = typeof t == "object" ? JSON.stringify(t, null, 2) : t ?? ""), re(() => {
|
|
1095
|
+
if (!o) return;
|
|
1096
|
+
(async () => {
|
|
1097
|
+
var I;
|
|
1098
|
+
R(!0);
|
|
1099
|
+
try {
|
|
1100
|
+
const E = (await import("prismjs")).default;
|
|
1101
|
+
if (typeof window < "u" && !window.Prism && (window.Prism = E), a !== "plain" && !E.languages[a])
|
|
1102
|
+
try {
|
|
1103
|
+
await import(`prismjs/components/prism-${a}`);
|
|
1104
|
+
} catch {
|
|
1105
|
+
console.warn(`Language "${a}" not available, falling back to plain text`);
|
|
1106
|
+
}
|
|
1107
|
+
S(E);
|
|
1108
|
+
} catch (B) {
|
|
1109
|
+
(B == null ? void 0 : B.code) === "ERR_MODULE_NOT_FOUND" || (I = B == null ? void 0 : B.message) != null && I.includes("Cannot find module") ? console.warn(
|
|
1110
|
+
"PrismJS is not installed. To enable syntax highlighting, run: npm install prismjs"
|
|
1111
|
+
) : console.warn(`Failed to load syntax highlighting for ${a}:`, B);
|
|
1112
|
+
} finally {
|
|
1113
|
+
R(!1);
|
|
1114
|
+
}
|
|
1115
|
+
})();
|
|
1116
|
+
}, [o, a]);
|
|
1117
|
+
const P = U(() => {
|
|
1118
|
+
var v;
|
|
1119
|
+
const k = window.getSelection();
|
|
1120
|
+
if (!k || k.rangeCount === 0) return null;
|
|
1121
|
+
const I = k.getRangeAt(0), B = I.startContainer;
|
|
1122
|
+
let f = I.startOffset;
|
|
1123
|
+
if (B && B !== y && y) {
|
|
1124
|
+
const C = document.createTreeWalker(
|
|
1125
|
+
y,
|
|
1126
|
+
NodeFilter.SHOW_TEXT,
|
|
1127
|
+
null
|
|
1128
|
+
);
|
|
1129
|
+
let L;
|
|
1130
|
+
for (; (L = C.nextNode()) && L !== B; )
|
|
1131
|
+
f += ((v = L.textContent) == null ? void 0 : v.length) || 0;
|
|
1132
|
+
}
|
|
1133
|
+
return f;
|
|
1134
|
+
}, [y]), $ = U((k) => {
|
|
1135
|
+
var I;
|
|
1136
|
+
if (!(!y || !o || !j))
|
|
1137
|
+
try {
|
|
1138
|
+
const B = l ? P() : null, E = j.highlight(
|
|
1139
|
+
k,
|
|
1140
|
+
j.languages[a] || j.languages.plain,
|
|
1141
|
+
a
|
|
1142
|
+
);
|
|
1143
|
+
if (y.innerHTML = E, l && B !== null) {
|
|
1144
|
+
const f = window.getSelection(), v = document.createRange(), C = document.createTreeWalker(
|
|
1145
|
+
y,
|
|
1146
|
+
NodeFilter.SHOW_TEXT,
|
|
1147
|
+
null
|
|
1148
|
+
);
|
|
1149
|
+
let L = 0, K;
|
|
1150
|
+
for (; K = C.nextNode(); ) {
|
|
1151
|
+
const le = ((I = K.textContent) == null ? void 0 : I.length) || 0;
|
|
1152
|
+
if (L + le >= B) {
|
|
1153
|
+
v.setStart(K, B - L), v.setEnd(K, B - L), f == null || f.removeAllRanges(), f == null || f.addRange(v);
|
|
1154
|
+
break;
|
|
1155
|
+
}
|
|
1156
|
+
L += le;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
} catch (B) {
|
|
1160
|
+
console.warn("Error highlighting code:", B), y && (y.textContent = k);
|
|
1161
|
+
}
|
|
1162
|
+
}, [a, o, l, j, P, y]), O = U((k) => {
|
|
1163
|
+
if (!y) return;
|
|
1164
|
+
const I = y.textContent || "";
|
|
1165
|
+
u == null || u(I), requestAnimationFrame(() => {
|
|
1166
|
+
$(I);
|
|
1167
|
+
});
|
|
1168
|
+
}, [$, u, y]);
|
|
1169
|
+
re(() => {
|
|
1170
|
+
const k = y;
|
|
1171
|
+
if (!(!k || !l))
|
|
1172
|
+
return k.addEventListener("input", O), () => {
|
|
1173
|
+
k.removeEventListener("input", O);
|
|
1174
|
+
};
|
|
1175
|
+
}, [l, O, y]), re(() => {
|
|
1176
|
+
!y || !j || $(w);
|
|
1177
|
+
}, [$, w, j, y]);
|
|
1178
|
+
const _ = async () => {
|
|
1179
|
+
try {
|
|
1180
|
+
const k = y ? y.textContent || "" : w;
|
|
1181
|
+
await navigator.clipboard.writeText(k), N(!0), setTimeout(() => N(!1), 3e3);
|
|
1182
|
+
} catch (k) {
|
|
1183
|
+
console.error("Could not copy text: ", k);
|
|
1184
|
+
}
|
|
1185
|
+
}, T = async (k) => {
|
|
1186
|
+
(k.key === "Enter" || k.key === " ") && k.target === W.current && (k.preventDefault(), await _());
|
|
1187
|
+
};
|
|
1188
|
+
let D = [];
|
|
1189
|
+
c && D.push("show-line-numbers");
|
|
1190
|
+
const H = w.split(/\r\n|\r|\n/gm);
|
|
1191
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1192
|
+
A,
|
|
1193
|
+
{
|
|
1194
|
+
"data-code-block": !0,
|
|
1195
|
+
as: "div",
|
|
1196
|
+
classNames: D,
|
|
1197
|
+
role: "region",
|
|
1198
|
+
"aria-label": i || `Code block in ${a}`,
|
|
1199
|
+
...d,
|
|
1200
|
+
children: [
|
|
1201
|
+
s ? x ? /* @__PURE__ */ r.jsx(
|
|
1202
|
+
at,
|
|
1203
|
+
{
|
|
1204
|
+
className: "code-block-copied-badge",
|
|
1205
|
+
size: "tiny",
|
|
1206
|
+
shape: "rounded",
|
|
1207
|
+
"aria-live": "polite",
|
|
1208
|
+
children: "Copied!"
|
|
1209
|
+
}
|
|
1210
|
+
) : /* @__PURE__ */ r.jsx(
|
|
1211
|
+
pt,
|
|
1212
|
+
{
|
|
1213
|
+
type: "button",
|
|
1214
|
+
className: "code-block-copy-button",
|
|
1215
|
+
size: "tiny",
|
|
1216
|
+
shape: "rounded",
|
|
1217
|
+
onClick: _,
|
|
1218
|
+
onKeyDown: T,
|
|
1219
|
+
"aria-label": "Copy code to clipboard",
|
|
1220
|
+
children: "Copy"
|
|
1221
|
+
}
|
|
1222
|
+
) : null,
|
|
1223
|
+
/* @__PURE__ */ r.jsxs(
|
|
1224
|
+
"pre",
|
|
1225
|
+
{
|
|
1226
|
+
ref: W,
|
|
1227
|
+
className: `language-${a}${p ? ` shadow-${p}` : ""}`,
|
|
1228
|
+
tabIndex: 0,
|
|
1229
|
+
"aria-label": `Code in ${a}`,
|
|
1230
|
+
children: [
|
|
1231
|
+
c && Array.from(Array(H.length).keys()).map((k) => /* @__PURE__ */ r.jsx(
|
|
1232
|
+
"span",
|
|
1233
|
+
{
|
|
1234
|
+
className: "line-numbers",
|
|
1235
|
+
"aria-hidden": "true",
|
|
1236
|
+
children: k + 1
|
|
1237
|
+
},
|
|
1238
|
+
k
|
|
1239
|
+
)),
|
|
1240
|
+
/* @__PURE__ */ r.jsx(
|
|
1241
|
+
"code",
|
|
1242
|
+
{
|
|
1243
|
+
ref: F,
|
|
1244
|
+
contentEditable: l,
|
|
1245
|
+
suppressContentEditableWarning: !0,
|
|
1246
|
+
spellCheck: "false",
|
|
1247
|
+
className: `language-${a} ${h ? "is-loading" : ""}`,
|
|
1248
|
+
children: w
|
|
1249
|
+
}
|
|
1250
|
+
)
|
|
1251
|
+
]
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
]
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
});
|
|
1258
|
+
Tr.displayName = "CodeBlock";
|
|
1259
|
+
const Vt = g.forwardRef(
|
|
1260
|
+
({ kind: e, height: t, label: a, ...s }, c) => {
|
|
1261
|
+
let i = [];
|
|
1262
|
+
return e && i.push(e), /* @__PURE__ */ r.jsx(
|
|
1263
|
+
A,
|
|
1264
|
+
{
|
|
1265
|
+
as: "hr",
|
|
1266
|
+
"data-hrule": !0,
|
|
1267
|
+
ref: c,
|
|
1268
|
+
classNames: i,
|
|
1269
|
+
role: "separator",
|
|
1270
|
+
"aria-orientation": "horizontal",
|
|
1271
|
+
"aria-label": a,
|
|
1272
|
+
...s,
|
|
1273
|
+
style: { height: t }
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
);
|
|
1278
|
+
Vt.displayName = "Divider";
|
|
1279
|
+
const Ue = g.forwardRef(
|
|
1280
|
+
({
|
|
1281
|
+
label: e,
|
|
1282
|
+
hideLabel: t,
|
|
1283
|
+
htmlFor: a,
|
|
1284
|
+
...s
|
|
1285
|
+
}, c) => {
|
|
1286
|
+
let i = [];
|
|
1287
|
+
return t && i.push("visually-hidden"), /* @__PURE__ */ r.jsx(
|
|
1288
|
+
A,
|
|
1289
|
+
{
|
|
1290
|
+
as: "label",
|
|
1291
|
+
ref: c,
|
|
1292
|
+
htmlFor: a,
|
|
1293
|
+
classNames: i,
|
|
1294
|
+
...s,
|
|
1295
|
+
children: e
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
);
|
|
1300
|
+
Ue.displayName = "InputLabel";
|
|
1301
|
+
const ae = g.forwardRef(
|
|
1302
|
+
({ weight: e, size: t, fontStyle: a = "sans-serif", align: s, isSubtext: c, ...i }, o) => {
|
|
1303
|
+
let l = [];
|
|
1304
|
+
return e && l.push(`weight-${e}`), t && l.push(`text-${t}`), a && l.push(`font-${a}`), c && l.push("sub-text"), s && l.push(`text-${s}`), /* @__PURE__ */ r.jsx(A, { as: "p", ref: o, classNames: l, ...i });
|
|
1305
|
+
}
|
|
1306
|
+
);
|
|
1307
|
+
ae.displayName = "Text";
|
|
1308
|
+
const Sr = ({ state: e }) => e === "valid" ? /* @__PURE__ */ r.jsx(
|
|
1309
|
+
"svg",
|
|
1310
|
+
{
|
|
1311
|
+
"data-validation-icon": "valid",
|
|
1312
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1313
|
+
viewBox: "0 0 24 24",
|
|
1314
|
+
width: "20",
|
|
1315
|
+
height: "20",
|
|
1316
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1317
|
+
"polyline",
|
|
1318
|
+
{
|
|
1319
|
+
points: "3.5 12.5 8.5 17.5 20.5 5.5",
|
|
1320
|
+
fill: "none",
|
|
1321
|
+
stroke: "#0ec05c",
|
|
1322
|
+
strokeMiterlimit: "10",
|
|
1323
|
+
strokeWidth: "2"
|
|
1324
|
+
}
|
|
1325
|
+
)
|
|
1326
|
+
}
|
|
1327
|
+
) : /* @__PURE__ */ r.jsxs(
|
|
1328
|
+
"svg",
|
|
1329
|
+
{
|
|
1330
|
+
"data-validation-icon": "invalid",
|
|
1331
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1332
|
+
viewBox: "0 0 24 24",
|
|
1333
|
+
width: "20",
|
|
1334
|
+
height: "20",
|
|
1335
|
+
children: [
|
|
1336
|
+
/* @__PURE__ */ r.jsx(
|
|
1337
|
+
"line",
|
|
1338
|
+
{
|
|
1339
|
+
x1: "6.5",
|
|
1340
|
+
y1: "17.5",
|
|
1341
|
+
x2: "18.5",
|
|
1342
|
+
y2: "5.5",
|
|
1343
|
+
fill: "none",
|
|
1344
|
+
stroke: "#ef4343",
|
|
1345
|
+
strokeMiterlimit: "10",
|
|
1346
|
+
strokeWidth: "2"
|
|
1347
|
+
}
|
|
1348
|
+
),
|
|
1349
|
+
/* @__PURE__ */ r.jsx(
|
|
1350
|
+
"line",
|
|
1351
|
+
{
|
|
1352
|
+
x1: "6.5",
|
|
1353
|
+
y1: "5.5",
|
|
1354
|
+
x2: "18.5",
|
|
1355
|
+
y2: "17.5",
|
|
1356
|
+
fill: "none",
|
|
1357
|
+
stroke: "#ef4343",
|
|
1358
|
+
strokeMiterlimit: "10",
|
|
1359
|
+
strokeWidth: "2"
|
|
1360
|
+
}
|
|
1361
|
+
)
|
|
1362
|
+
]
|
|
1363
|
+
}
|
|
1364
|
+
), de = g.forwardRef(
|
|
1365
|
+
({
|
|
1366
|
+
label: e,
|
|
1367
|
+
customLabel: t,
|
|
1368
|
+
htmlFor: a,
|
|
1369
|
+
helpText: s,
|
|
1370
|
+
errorText: c,
|
|
1371
|
+
validationState: i,
|
|
1372
|
+
required: o,
|
|
1373
|
+
size: l,
|
|
1374
|
+
children: u,
|
|
1375
|
+
...p
|
|
1376
|
+
}, d) => {
|
|
1377
|
+
const m = e || t, x = s || c;
|
|
1378
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1379
|
+
A,
|
|
1380
|
+
{
|
|
1381
|
+
as: "div",
|
|
1382
|
+
"data-form-item": !0,
|
|
1383
|
+
ref: d,
|
|
1384
|
+
role: "group",
|
|
1385
|
+
required: o,
|
|
1386
|
+
className: l ? `size-${l}` : void 0,
|
|
1387
|
+
...p,
|
|
1388
|
+
children: [
|
|
1389
|
+
m && /* @__PURE__ */ r.jsxs(G, { "data-label-wrapper": !0, "data-has-validation": i ? "true" : void 0, children: [
|
|
1390
|
+
t || e && /* @__PURE__ */ r.jsx(Ue, { label: e, htmlFor: a }),
|
|
1391
|
+
i && /* @__PURE__ */ r.jsx(Sr, { state: i })
|
|
1392
|
+
] }),
|
|
1393
|
+
/* @__PURE__ */ r.jsx(G, { "data-input-wrapper": !0, children: u }),
|
|
1394
|
+
x && /* @__PURE__ */ r.jsxs(G, { className: "info-section vertically-center-items", children: [
|
|
1395
|
+
s && /* @__PURE__ */ r.jsx(ae, { className: "help-text", children: s }),
|
|
1396
|
+
c && /* @__PURE__ */ r.jsx(ae, { className: "error-text", children: c })
|
|
1397
|
+
] })
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
de.displayName = "FormItem";
|
|
1404
|
+
const mt = g.forwardRef(
|
|
1405
|
+
({
|
|
1406
|
+
id: e,
|
|
1407
|
+
name: t,
|
|
1408
|
+
label: a,
|
|
1409
|
+
hideLabel: s,
|
|
1410
|
+
helpText: c,
|
|
1411
|
+
errorText: i,
|
|
1412
|
+
onChange: o,
|
|
1413
|
+
checked: l,
|
|
1414
|
+
defaultChecked: u,
|
|
1415
|
+
disabled: p,
|
|
1416
|
+
required: d,
|
|
1417
|
+
size: m = "medium",
|
|
1418
|
+
...x
|
|
1419
|
+
}, N) => {
|
|
1420
|
+
const j = _e(() => t || e, [t, e]), S = (h) => {
|
|
1421
|
+
o == null || o(h.target.checked);
|
|
1422
|
+
};
|
|
1423
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1424
|
+
de,
|
|
1425
|
+
{
|
|
1426
|
+
label: a,
|
|
1427
|
+
htmlFor: e,
|
|
1428
|
+
helpText: c,
|
|
1429
|
+
errorText: i,
|
|
1430
|
+
required: d,
|
|
1431
|
+
size: m,
|
|
1432
|
+
children: [
|
|
1433
|
+
/* @__PURE__ */ r.jsx(
|
|
1434
|
+
A,
|
|
1435
|
+
{
|
|
1436
|
+
as: "input",
|
|
1437
|
+
type: "checkbox",
|
|
1438
|
+
ref: N,
|
|
1439
|
+
id: e,
|
|
1440
|
+
name: j,
|
|
1441
|
+
checked: l,
|
|
1442
|
+
defaultChecked: u,
|
|
1443
|
+
disabled: p,
|
|
1444
|
+
required: d,
|
|
1445
|
+
onChange: S,
|
|
1446
|
+
...x
|
|
1447
|
+
}
|
|
1448
|
+
),
|
|
1449
|
+
/* @__PURE__ */ r.jsx(
|
|
1450
|
+
A,
|
|
1451
|
+
{
|
|
1452
|
+
as: "div",
|
|
1453
|
+
"data-checkbox": !0,
|
|
1454
|
+
className: `size-${m}`
|
|
1455
|
+
}
|
|
1456
|
+
)
|
|
1457
|
+
]
|
|
1458
|
+
}
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
);
|
|
1462
|
+
mt.displayName = "Checkbox";
|
|
1463
|
+
const ht = g.forwardRef(
|
|
1464
|
+
({
|
|
1465
|
+
id: e,
|
|
1466
|
+
name: t,
|
|
1467
|
+
label: a,
|
|
1468
|
+
hideLabel: s,
|
|
1469
|
+
helpText: c,
|
|
1470
|
+
errorText: i,
|
|
1471
|
+
onChange: o,
|
|
1472
|
+
checked: l,
|
|
1473
|
+
defaultChecked: u,
|
|
1474
|
+
disabled: p,
|
|
1475
|
+
required: d,
|
|
1476
|
+
size: m = "medium",
|
|
1477
|
+
...x
|
|
1478
|
+
}, N) => {
|
|
1479
|
+
const j = _e(() => t || e, [t, e]), S = (h) => {
|
|
1480
|
+
o == null || o(h.target.checked);
|
|
1481
|
+
};
|
|
1482
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1483
|
+
de,
|
|
1484
|
+
{
|
|
1485
|
+
label: a,
|
|
1486
|
+
htmlFor: e,
|
|
1487
|
+
helpText: c,
|
|
1488
|
+
errorText: i,
|
|
1489
|
+
required: d,
|
|
1490
|
+
size: m,
|
|
1491
|
+
children: [
|
|
1492
|
+
/* @__PURE__ */ r.jsx(
|
|
1493
|
+
A,
|
|
1494
|
+
{
|
|
1495
|
+
as: "input",
|
|
1496
|
+
type: "checkbox",
|
|
1497
|
+
ref: N,
|
|
1498
|
+
id: e,
|
|
1499
|
+
name: j,
|
|
1500
|
+
checked: l,
|
|
1501
|
+
defaultChecked: u,
|
|
1502
|
+
disabled: p,
|
|
1503
|
+
required: d,
|
|
1504
|
+
onChange: S,
|
|
1505
|
+
...x
|
|
1506
|
+
}
|
|
1507
|
+
),
|
|
1508
|
+
/* @__PURE__ */ r.jsx(
|
|
1509
|
+
A,
|
|
1510
|
+
{
|
|
1511
|
+
as: "div",
|
|
1512
|
+
"data-switch": !0,
|
|
1513
|
+
className: `size-${m}`
|
|
1514
|
+
}
|
|
1515
|
+
)
|
|
1516
|
+
]
|
|
1517
|
+
}
|
|
1518
|
+
);
|
|
1519
|
+
}
|
|
1520
|
+
);
|
|
1521
|
+
ht.displayName = "Switch";
|
|
1522
|
+
const Pr = g.forwardRef(
|
|
1523
|
+
({
|
|
1524
|
+
id: e,
|
|
1525
|
+
name: t,
|
|
1526
|
+
label: a,
|
|
1527
|
+
helpText: s,
|
|
1528
|
+
errorText: c,
|
|
1529
|
+
options: i,
|
|
1530
|
+
value: o,
|
|
1531
|
+
defaultValue: l,
|
|
1532
|
+
onChange: u,
|
|
1533
|
+
align: p,
|
|
1534
|
+
equaliseWidth: d,
|
|
1535
|
+
equalizeWidth: m,
|
|
1536
|
+
required: x,
|
|
1537
|
+
disabled: N,
|
|
1538
|
+
size: j,
|
|
1539
|
+
...S
|
|
1540
|
+
}, h) => {
|
|
1541
|
+
const R = _e(() => t || e, [t, e]), [y, F] = g.useState(
|
|
1542
|
+
o || l || []
|
|
1543
|
+
);
|
|
1544
|
+
g.useEffect(() => {
|
|
1545
|
+
o !== void 0 && F(o);
|
|
1546
|
+
}, [o]);
|
|
1547
|
+
const W = (P, $) => {
|
|
1548
|
+
let O;
|
|
1549
|
+
$ ? O = [...y, P] : O = y.filter((_) => _ !== P), o === void 0 && F(O), u == null || u(O);
|
|
1550
|
+
};
|
|
1551
|
+
let w = [];
|
|
1552
|
+
return p && w.push(`align-${p}`), (d || m) && w.push("equalise-width"), /* @__PURE__ */ r.jsx(
|
|
1553
|
+
de,
|
|
1554
|
+
{
|
|
1555
|
+
label: a,
|
|
1556
|
+
htmlFor: e,
|
|
1557
|
+
helpText: s,
|
|
1558
|
+
errorText: c,
|
|
1559
|
+
required: x,
|
|
1560
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1561
|
+
A,
|
|
1562
|
+
{
|
|
1563
|
+
as: "div",
|
|
1564
|
+
"data-checkbox-group": !0,
|
|
1565
|
+
ref: h,
|
|
1566
|
+
classNames: w,
|
|
1567
|
+
role: "group",
|
|
1568
|
+
"aria-label": a,
|
|
1569
|
+
...S,
|
|
1570
|
+
children: i.map((P, $) => {
|
|
1571
|
+
const { id: O, value: _, label: T, ...D } = P, H = O || `${e}-option-${$}`, k = y.includes(_);
|
|
1572
|
+
return /* @__PURE__ */ r.jsx(
|
|
1573
|
+
mt,
|
|
1574
|
+
{
|
|
1575
|
+
id: H,
|
|
1576
|
+
name: R,
|
|
1577
|
+
label: T,
|
|
1578
|
+
checked: k,
|
|
1579
|
+
disabled: N || P.disabled,
|
|
1580
|
+
size: j,
|
|
1581
|
+
onChange: (I) => W(_, I),
|
|
1582
|
+
...D
|
|
1583
|
+
},
|
|
1584
|
+
H
|
|
1585
|
+
);
|
|
1586
|
+
})
|
|
1587
|
+
}
|
|
1588
|
+
)
|
|
1589
|
+
}
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
);
|
|
1593
|
+
Pr.displayName = "CheckboxGroup";
|
|
1594
|
+
const Mr = g.forwardRef(
|
|
1595
|
+
({
|
|
1596
|
+
id: e,
|
|
1597
|
+
name: t,
|
|
1598
|
+
label: a,
|
|
1599
|
+
helpText: s,
|
|
1600
|
+
errorText: c,
|
|
1601
|
+
options: i,
|
|
1602
|
+
value: o,
|
|
1603
|
+
defaultValue: l,
|
|
1604
|
+
onChange: u,
|
|
1605
|
+
align: p,
|
|
1606
|
+
equaliseWidth: d,
|
|
1607
|
+
equalizeWidth: m,
|
|
1608
|
+
required: x,
|
|
1609
|
+
disabled: N,
|
|
1610
|
+
size: j,
|
|
1611
|
+
...S
|
|
1612
|
+
}, h) => {
|
|
1613
|
+
const R = _e(() => t || e, [t, e]), [y, F] = g.useState(
|
|
1614
|
+
o || l || []
|
|
1615
|
+
);
|
|
1616
|
+
g.useEffect(() => {
|
|
1617
|
+
o !== void 0 && F(o);
|
|
1618
|
+
}, [o]);
|
|
1619
|
+
const W = (P, $) => {
|
|
1620
|
+
let O;
|
|
1621
|
+
$ ? O = [...y, P] : O = y.filter((_) => _ !== P), o === void 0 && F(O), u == null || u(O);
|
|
1622
|
+
};
|
|
1623
|
+
let w = [];
|
|
1624
|
+
return p && w.push(`align-${p}`), (d || m) && w.push("equalise-width"), /* @__PURE__ */ r.jsx(
|
|
1625
|
+
de,
|
|
1626
|
+
{
|
|
1627
|
+
label: a,
|
|
1628
|
+
htmlFor: e,
|
|
1629
|
+
helpText: s,
|
|
1630
|
+
errorText: c,
|
|
1631
|
+
required: x,
|
|
1632
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1633
|
+
A,
|
|
1634
|
+
{
|
|
1635
|
+
as: "div",
|
|
1636
|
+
"data-switch-group": !0,
|
|
1637
|
+
ref: h,
|
|
1638
|
+
classNames: w,
|
|
1639
|
+
role: "group",
|
|
1640
|
+
"aria-label": a,
|
|
1641
|
+
...S,
|
|
1642
|
+
children: i.map((P, $) => {
|
|
1643
|
+
const { id: O, value: _, label: T, ...D } = P, H = O || `${e}-option-${$}`, k = y.includes(_);
|
|
1644
|
+
return /* @__PURE__ */ r.jsx(
|
|
1645
|
+
ht,
|
|
1646
|
+
{
|
|
1647
|
+
id: H,
|
|
1648
|
+
name: R,
|
|
1649
|
+
label: T,
|
|
1650
|
+
checked: k,
|
|
1651
|
+
disabled: N || P.disabled,
|
|
1652
|
+
size: j,
|
|
1653
|
+
onChange: (I) => W(_, I),
|
|
1654
|
+
...D
|
|
1655
|
+
},
|
|
1656
|
+
H
|
|
1657
|
+
);
|
|
1658
|
+
})
|
|
1659
|
+
}
|
|
1660
|
+
)
|
|
1661
|
+
}
|
|
1662
|
+
);
|
|
1663
|
+
}
|
|
1664
|
+
);
|
|
1665
|
+
Mr.displayName = "SwitchGroup";
|
|
1666
|
+
const Bt = g.forwardRef(
|
|
1667
|
+
({
|
|
1668
|
+
"aria-label": e,
|
|
1669
|
+
"aria-invalid": t,
|
|
1670
|
+
label: a,
|
|
1671
|
+
helpText: s,
|
|
1672
|
+
errorText: c,
|
|
1673
|
+
required: i,
|
|
1674
|
+
accept: o,
|
|
1675
|
+
allowMultipleFiles: l = !1,
|
|
1676
|
+
capture: u,
|
|
1677
|
+
height: p = "120px",
|
|
1678
|
+
onChange: d,
|
|
1679
|
+
className: m = "",
|
|
1680
|
+
instructionMainText: x = "Drag and drop or click to upload",
|
|
1681
|
+
instructionSubText: N = "You can add multiple files",
|
|
1682
|
+
invalid: j,
|
|
1683
|
+
id: S,
|
|
1684
|
+
name: h,
|
|
1685
|
+
badgeBgColour: R,
|
|
1686
|
+
badgeTextColour: y,
|
|
1687
|
+
...F
|
|
1688
|
+
}, W) => {
|
|
1689
|
+
const [w, P] = J([]), [$, O] = J(!1), _ = oe(null), T = (f) => {
|
|
1690
|
+
f.preventDefault(), f.stopPropagation(), O(!0);
|
|
1691
|
+
}, D = (f) => {
|
|
1692
|
+
f.preventDefault(), f.stopPropagation(), O(!1);
|
|
1693
|
+
}, H = (f) => {
|
|
1694
|
+
f.preventDefault(), f.stopPropagation(), O(!1);
|
|
1695
|
+
const v = Array.from(f.dataTransfer.files);
|
|
1696
|
+
k(v);
|
|
1697
|
+
}, k = (f) => {
|
|
1698
|
+
if (l)
|
|
1699
|
+
P((v) => [...v, ...f]), d == null || d([...w, ...f]);
|
|
1700
|
+
else {
|
|
1701
|
+
const v = f[0];
|
|
1702
|
+
P([v]), d == null || d([v]);
|
|
1703
|
+
}
|
|
1704
|
+
}, I = (f) => {
|
|
1705
|
+
if (f.target.files) {
|
|
1706
|
+
const v = Array.from(f.target.files);
|
|
1707
|
+
k(v);
|
|
1708
|
+
}
|
|
1709
|
+
}, B = (f) => {
|
|
1710
|
+
const v = w.filter((C, L) => L !== f);
|
|
1711
|
+
P(v), d == null || d(v);
|
|
1712
|
+
}, E = () => {
|
|
1713
|
+
var f;
|
|
1714
|
+
(f = _.current) == null || f.click();
|
|
1715
|
+
};
|
|
1716
|
+
return /* @__PURE__ */ r.jsx(
|
|
1717
|
+
de,
|
|
1718
|
+
{
|
|
1719
|
+
label: a,
|
|
1720
|
+
htmlFor: S,
|
|
1721
|
+
helpText: s,
|
|
1722
|
+
errorText: c,
|
|
1723
|
+
required: i,
|
|
1724
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
1725
|
+
G,
|
|
1726
|
+
{
|
|
1727
|
+
"data-file-upload-area": !0,
|
|
1728
|
+
ref: W,
|
|
1729
|
+
className: [
|
|
1730
|
+
"file-upload-wrapper",
|
|
1731
|
+
$ ? "dragging" : "",
|
|
1732
|
+
m
|
|
1733
|
+
].filter(Boolean).join(" "),
|
|
1734
|
+
"aria-label": e || a,
|
|
1735
|
+
"aria-invalid": t || j || void 0,
|
|
1736
|
+
"aria-required": i,
|
|
1737
|
+
children: [
|
|
1738
|
+
/* @__PURE__ */ r.jsxs(
|
|
1739
|
+
G,
|
|
1740
|
+
{
|
|
1741
|
+
className: "file-upload-area",
|
|
1742
|
+
onDragOver: T,
|
|
1743
|
+
onDragLeave: D,
|
|
1744
|
+
onDrop: H,
|
|
1745
|
+
onClick: E,
|
|
1746
|
+
style: { height: p },
|
|
1747
|
+
children: [
|
|
1748
|
+
/* @__PURE__ */ r.jsx(
|
|
1749
|
+
"input",
|
|
1750
|
+
{
|
|
1751
|
+
ref: _,
|
|
1752
|
+
type: "file",
|
|
1753
|
+
id: S,
|
|
1754
|
+
name: h,
|
|
1755
|
+
onChange: I,
|
|
1756
|
+
multiple: l,
|
|
1757
|
+
accept: o,
|
|
1758
|
+
capture: u,
|
|
1759
|
+
className: "file-input"
|
|
1760
|
+
}
|
|
1761
|
+
),
|
|
1762
|
+
x && /* @__PURE__ */ r.jsxs(G, { className: "file-upload-content", children: [
|
|
1763
|
+
/* @__PURE__ */ r.jsx(ae, { children: x }),
|
|
1764
|
+
N && /* @__PURE__ */ r.jsx(ae, { isSubtext: !0, children: N })
|
|
1765
|
+
] })
|
|
1766
|
+
]
|
|
1767
|
+
}
|
|
1768
|
+
),
|
|
1769
|
+
w.length > 0 && /* @__PURE__ */ r.jsx(G, { className: "uploaded-files", children: w.map((f, v) => /* @__PURE__ */ r.jsx(
|
|
1770
|
+
at,
|
|
1771
|
+
{
|
|
1772
|
+
size: "small",
|
|
1773
|
+
shape: "rounded",
|
|
1774
|
+
actionIcon: "cross",
|
|
1775
|
+
onActionClick: () => B(v),
|
|
1776
|
+
actionAriaLabel: `Remove ${f.name}`,
|
|
1777
|
+
bgColour: R,
|
|
1778
|
+
textColour: y,
|
|
1779
|
+
children: f.name
|
|
1780
|
+
},
|
|
1781
|
+
`${f.name}-${v}`
|
|
1782
|
+
)) })
|
|
1783
|
+
]
|
|
1784
|
+
}
|
|
1785
|
+
)
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
}
|
|
1789
|
+
);
|
|
1790
|
+
Bt.displayName = "FileUpload";
|
|
1791
|
+
const Ke = g.forwardRef(
|
|
1792
|
+
({
|
|
1793
|
+
// FormItem props
|
|
1794
|
+
label: e,
|
|
1795
|
+
hideLabel: t,
|
|
1796
|
+
helpText: a,
|
|
1797
|
+
errorText: s,
|
|
1798
|
+
size: c,
|
|
1799
|
+
required: i,
|
|
1800
|
+
// Side elements
|
|
1801
|
+
innerIconLeft: o,
|
|
1802
|
+
innerIconRight: l,
|
|
1803
|
+
innerTextLeft: u,
|
|
1804
|
+
innerTextRight: p,
|
|
1805
|
+
// Validation
|
|
1806
|
+
validateThis: d,
|
|
1807
|
+
valid: m,
|
|
1808
|
+
invalid: x,
|
|
1809
|
+
validationState: N,
|
|
1810
|
+
// Handlers
|
|
1811
|
+
onChange: j,
|
|
1812
|
+
onBlur: S,
|
|
1813
|
+
onFocus: h,
|
|
1814
|
+
// Aria
|
|
1815
|
+
"aria-label": R,
|
|
1816
|
+
"aria-invalid": y,
|
|
1817
|
+
// Input props
|
|
1818
|
+
id: F,
|
|
1819
|
+
name: W,
|
|
1820
|
+
value: w,
|
|
1821
|
+
defaultValue: P,
|
|
1822
|
+
type: $ = "text",
|
|
1823
|
+
placeholder: O,
|
|
1824
|
+
autoComplete: _,
|
|
1825
|
+
maxLength: T,
|
|
1826
|
+
minLength: D,
|
|
1827
|
+
pattern: H,
|
|
1828
|
+
readOnly: k,
|
|
1829
|
+
disabled: I,
|
|
1830
|
+
className: B,
|
|
1831
|
+
...E
|
|
1832
|
+
}, f) => {
|
|
1833
|
+
const v = oe(null), C = oe(null), L = oe(null), [K, le] = J(!1), [ce, V] = J(null), Y = N ?? (d ? ce : null), ee = g.useCallback(
|
|
1834
|
+
(Q) => {
|
|
1835
|
+
L.current = Q, typeof f == "function" ? f(Q) : f && (f.current = Q);
|
|
1836
|
+
},
|
|
1837
|
+
[f]
|
|
1838
|
+
), se = () => {
|
|
1839
|
+
const Q = L.current;
|
|
1840
|
+
if (!Q || Q.value === "") {
|
|
1841
|
+
V(null);
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
V(Q.validity.valid ? "valid" : "invalid");
|
|
1845
|
+
}, Ne = (Q) => {
|
|
1846
|
+
j == null || j(Q.target.value), K && d && se();
|
|
1847
|
+
}, ke = (Q) => {
|
|
1848
|
+
le(!0), d && se(), S == null || S(Q);
|
|
1849
|
+
}, we = (Q) => {
|
|
1850
|
+
h == null || h(Q);
|
|
1851
|
+
};
|
|
1852
|
+
re(() => {
|
|
1853
|
+
const Q = (pe, me) => {
|
|
1854
|
+
if (!pe) return;
|
|
1855
|
+
const he = pe.closest("[data-form-item]");
|
|
1856
|
+
he == null || he.style.setProperty(
|
|
1857
|
+
`--side-element-${me}-width`,
|
|
1858
|
+
`${pe.getBoundingClientRect().width}px`
|
|
1859
|
+
);
|
|
1860
|
+
};
|
|
1861
|
+
(u || o) && Q(v.current, "left"), (p || l) && Q(C.current, "right");
|
|
1862
|
+
}, [u, p, o, l]);
|
|
1863
|
+
const Oe = (Q, pe, me) => {
|
|
1864
|
+
if (!Q) return null;
|
|
1865
|
+
const he = typeof Q == "string", Se = !he && g.isValidElement(Q) && (Q.props.onClick || Q.props.onKeyDown || Q.type === "button" || Q.type === "a");
|
|
1866
|
+
return /* @__PURE__ */ r.jsx(
|
|
1867
|
+
G,
|
|
1868
|
+
{
|
|
1869
|
+
ref: me,
|
|
1870
|
+
"data-input-side-element": !0,
|
|
1871
|
+
className: `${pe} ${he ? "is-text" : "is-icon"} ${Se ? "is-interactive" : ""}`,
|
|
1872
|
+
"aria-hidden": "true",
|
|
1873
|
+
children: Q
|
|
1874
|
+
}
|
|
1875
|
+
);
|
|
1876
|
+
}, Te = !!(o || u), De = !!(l || p);
|
|
1877
|
+
return /* @__PURE__ */ r.jsxs(
|
|
1878
|
+
de,
|
|
1879
|
+
{
|
|
1880
|
+
label: e,
|
|
1881
|
+
htmlFor: F,
|
|
1882
|
+
helpText: a,
|
|
1883
|
+
errorText: s,
|
|
1884
|
+
validationState: Y,
|
|
1885
|
+
required: i,
|
|
1886
|
+
size: c,
|
|
1887
|
+
children: [
|
|
1888
|
+
/* @__PURE__ */ r.jsx(
|
|
1889
|
+
A,
|
|
1890
|
+
{
|
|
1891
|
+
as: "input",
|
|
1892
|
+
ref: ee,
|
|
1893
|
+
"data-input-field": !0,
|
|
1894
|
+
id: F,
|
|
1895
|
+
name: W,
|
|
1896
|
+
type: $,
|
|
1897
|
+
value: w,
|
|
1898
|
+
defaultValue: P,
|
|
1899
|
+
placeholder: O || " ",
|
|
1900
|
+
autoComplete: _,
|
|
1901
|
+
maxLength: T,
|
|
1902
|
+
minLength: D,
|
|
1903
|
+
pattern: H,
|
|
1904
|
+
readOnly: k,
|
|
1905
|
+
disabled: I,
|
|
1906
|
+
required: i,
|
|
1907
|
+
className: [
|
|
1908
|
+
B,
|
|
1909
|
+
Te && "with-left-element",
|
|
1910
|
+
De && "with-right-element"
|
|
1911
|
+
].filter(Boolean).join(" "),
|
|
1912
|
+
"aria-label": R || e,
|
|
1913
|
+
"aria-invalid": y || x,
|
|
1914
|
+
"aria-required": i,
|
|
1915
|
+
onChange: Ne,
|
|
1916
|
+
onBlur: ke,
|
|
1917
|
+
onFocus: we,
|
|
1918
|
+
...E
|
|
1919
|
+
}
|
|
1920
|
+
),
|
|
1921
|
+
(Te || De) && /* @__PURE__ */ r.jsxs(G, { "data-input-helper": !0, "aria-hidden": "true", children: [
|
|
1922
|
+
Oe(o || u, "left", v),
|
|
1923
|
+
Oe(l || p, "right", C)
|
|
1924
|
+
] })
|
|
1925
|
+
]
|
|
1926
|
+
}
|
|
1927
|
+
);
|
|
1928
|
+
}
|
|
1929
|
+
);
|
|
1930
|
+
Ke.displayName = "InputField";
|
|
1931
|
+
const Ct = g.forwardRef(
|
|
1932
|
+
({
|
|
1933
|
+
desktopSpan: e,
|
|
1934
|
+
mobileSpan: t,
|
|
1935
|
+
tabletLandscapeSpan: a,
|
|
1936
|
+
tabletPortraitSpan: s,
|
|
1937
|
+
isHorizontal: c,
|
|
1938
|
+
role: i,
|
|
1939
|
+
...o
|
|
1940
|
+
}, l) => {
|
|
1941
|
+
let u = [];
|
|
1942
|
+
return e || a || s || t ? (e && u.push(`${e}`), a && u.push(`${a}-on-tablet-landscape`), s && u.push(`${s}-on-tablet-portrait`), t && u.push(`${t}-on-mobile`)) : u.push("whole"), c && u.push("horizontal"), /* @__PURE__ */ r.jsx(
|
|
1943
|
+
A,
|
|
1944
|
+
{
|
|
1945
|
+
as: "div",
|
|
1946
|
+
"data-portion": !0,
|
|
1947
|
+
ref: l,
|
|
1948
|
+
classNames: u,
|
|
1949
|
+
role: i,
|
|
1950
|
+
...o
|
|
1951
|
+
}
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
);
|
|
1955
|
+
Ct.displayName = "Portion";
|
|
1956
|
+
const Wt = g.forwardRef(
|
|
1957
|
+
({
|
|
1958
|
+
id: e,
|
|
1959
|
+
name: t,
|
|
1960
|
+
value: a,
|
|
1961
|
+
label: s,
|
|
1962
|
+
helpText: c,
|
|
1963
|
+
errorText: i,
|
|
1964
|
+
onChange: o,
|
|
1965
|
+
checked: l,
|
|
1966
|
+
disabled: u,
|
|
1967
|
+
required: p,
|
|
1968
|
+
...d
|
|
1969
|
+
}, m) => {
|
|
1970
|
+
const x = _e(() => t || e, [t, e]), N = (j) => {
|
|
1971
|
+
j.target.checked && o && o(a);
|
|
1972
|
+
};
|
|
1973
|
+
return /* @__PURE__ */ r.jsx(
|
|
1974
|
+
A,
|
|
1975
|
+
{
|
|
1976
|
+
as: "div",
|
|
1977
|
+
"data-radio-button": !0,
|
|
1978
|
+
ref: m,
|
|
1979
|
+
role: "radio",
|
|
1980
|
+
"aria-checked": l,
|
|
1981
|
+
"aria-disabled": u,
|
|
1982
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1983
|
+
de,
|
|
1984
|
+
{
|
|
1985
|
+
label: s,
|
|
1986
|
+
htmlFor: e,
|
|
1987
|
+
helpText: c,
|
|
1988
|
+
errorText: i,
|
|
1989
|
+
required: p,
|
|
1990
|
+
children: /* @__PURE__ */ r.jsx(
|
|
1991
|
+
A,
|
|
1992
|
+
{
|
|
1993
|
+
as: "input",
|
|
1994
|
+
type: "radio",
|
|
1995
|
+
id: e,
|
|
1996
|
+
name: x,
|
|
1997
|
+
value: a,
|
|
1998
|
+
checked: l,
|
|
1999
|
+
disabled: u,
|
|
2000
|
+
required: p,
|
|
2001
|
+
onChange: N,
|
|
2002
|
+
...d
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
}
|
|
2006
|
+
)
|
|
2007
|
+
}
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2010
|
+
);
|
|
2011
|
+
Wt.displayName = "RadioButton";
|
|
2012
|
+
const zt = g.forwardRef(
|
|
2013
|
+
({
|
|
2014
|
+
id: e,
|
|
2015
|
+
name: t,
|
|
2016
|
+
label: a,
|
|
2017
|
+
helpText: s,
|
|
2018
|
+
errorText: c,
|
|
2019
|
+
options: i,
|
|
2020
|
+
value: o,
|
|
2021
|
+
defaultValue: l,
|
|
2022
|
+
onChange: u,
|
|
2023
|
+
align: p,
|
|
2024
|
+
equaliseWidth: d,
|
|
2025
|
+
equalizeWidth: m,
|
|
2026
|
+
required: x,
|
|
2027
|
+
disabled: N,
|
|
2028
|
+
...j
|
|
2029
|
+
}, S) => {
|
|
2030
|
+
const h = _e(() => t || e, [t, e]), R = (F) => {
|
|
2031
|
+
u == null || u(F.target.value);
|
|
2032
|
+
};
|
|
2033
|
+
let y = [];
|
|
2034
|
+
return p && y.push(`align-${p}`), (d || m) && y.push("equalise-width"), /* @__PURE__ */ r.jsx(
|
|
2035
|
+
de,
|
|
2036
|
+
{
|
|
2037
|
+
label: a,
|
|
2038
|
+
htmlFor: e,
|
|
2039
|
+
helpText: s,
|
|
2040
|
+
errorText: c,
|
|
2041
|
+
required: x,
|
|
2042
|
+
children: /* @__PURE__ */ r.jsx(
|
|
2043
|
+
A,
|
|
2044
|
+
{
|
|
2045
|
+
as: "div",
|
|
2046
|
+
"data-radio-group": !0,
|
|
2047
|
+
ref: S,
|
|
2048
|
+
classNames: y,
|
|
2049
|
+
role: "radiogroup",
|
|
2050
|
+
"aria-label": a,
|
|
2051
|
+
...j,
|
|
2052
|
+
children: i.map((F, W) => {
|
|
2053
|
+
const { id: w, value: P, label: $, ...O } = F, _ = w || `${e}-option-${W}`, T = o ? o === P : l === P;
|
|
2054
|
+
return /* @__PURE__ */ r.jsxs(
|
|
2055
|
+
G,
|
|
2056
|
+
{
|
|
2057
|
+
"data-radio-button": !0,
|
|
2058
|
+
role: "radio",
|
|
2059
|
+
"aria-checked": T,
|
|
2060
|
+
children: [
|
|
2061
|
+
/* @__PURE__ */ r.jsx(
|
|
2062
|
+
"input",
|
|
2063
|
+
{
|
|
2064
|
+
type: "radio",
|
|
2065
|
+
id: _,
|
|
2066
|
+
name: h,
|
|
2067
|
+
value: P,
|
|
2068
|
+
checked: T,
|
|
2069
|
+
disabled: N,
|
|
2070
|
+
onChange: R,
|
|
2071
|
+
...O
|
|
2072
|
+
}
|
|
2073
|
+
),
|
|
2074
|
+
/* @__PURE__ */ r.jsx("label", { htmlFor: _, children: $ })
|
|
2075
|
+
]
|
|
2076
|
+
},
|
|
2077
|
+
_
|
|
2078
|
+
);
|
|
2079
|
+
})
|
|
2080
|
+
}
|
|
2081
|
+
)
|
|
2082
|
+
}
|
|
2083
|
+
);
|
|
2084
|
+
}
|
|
2085
|
+
);
|
|
2086
|
+
zt.displayName = "RadioGroup";
|
|
2087
|
+
const Ht = g.forwardRef(
|
|
2088
|
+
({
|
|
2089
|
+
layout: e = "grid",
|
|
2090
|
+
gutters: t = "medium",
|
|
2091
|
+
retainLayoutOnTabletLandscape: a,
|
|
2092
|
+
retainLayoutOnTabletPortrait: s,
|
|
2093
|
+
retainLayoutOnMobile: c,
|
|
2094
|
+
retainLayoutAlways: i,
|
|
2095
|
+
allowUltraWide: o,
|
|
2096
|
+
groupLabel: l,
|
|
2097
|
+
...u
|
|
2098
|
+
}, p) => {
|
|
2099
|
+
let d = [];
|
|
2100
|
+
return e && d.push(`layout-${e}`), t && d.push(t === "none" ? "no-gutters" : `${t}-gutters`), a && d.push("retain-layout-on-tablet-landscape"), s && d.push("retain-layout-on-tablet-portrait"), c && d.push("retain-layout-on-mobile"), i && d.push(
|
|
2101
|
+
"retain-layout-on-tablet-landscape retain-layout-on-tablet-portrait retain-layout-on-mobile"
|
|
2102
|
+
), o && d.push("allow-ultra-wide"), /* @__PURE__ */ r.jsx(
|
|
2103
|
+
A,
|
|
2104
|
+
{
|
|
2105
|
+
as: "div",
|
|
2106
|
+
"data-row": !0,
|
|
2107
|
+
ref: p,
|
|
2108
|
+
classNames: [d.join(" ")],
|
|
2109
|
+
marginBottom: "tiny",
|
|
2110
|
+
role: "grid",
|
|
2111
|
+
"aria-label": l,
|
|
2112
|
+
...u
|
|
2113
|
+
}
|
|
2114
|
+
);
|
|
2115
|
+
}
|
|
2116
|
+
);
|
|
2117
|
+
Ht.displayName = "Row";
|
|
2118
|
+
const Gt = g.forwardRef(
|
|
2119
|
+
({
|
|
2120
|
+
// FormItem props
|
|
2121
|
+
label: e,
|
|
2122
|
+
helpText: t,
|
|
2123
|
+
errorText: a,
|
|
2124
|
+
required: s,
|
|
2125
|
+
// Select props
|
|
2126
|
+
id: c,
|
|
2127
|
+
name: i,
|
|
2128
|
+
options: o,
|
|
2129
|
+
onChange: l,
|
|
2130
|
+
disabled: u,
|
|
2131
|
+
className: p,
|
|
2132
|
+
...d
|
|
2133
|
+
}, m) => {
|
|
2134
|
+
const x = _e(() => i || c, [i, c]), N = (h) => /* @__PURE__ */ r.jsx(
|
|
2135
|
+
A,
|
|
2136
|
+
{
|
|
2137
|
+
as: "option",
|
|
2138
|
+
value: h.value,
|
|
2139
|
+
disabled: h.disabled,
|
|
2140
|
+
children: h.label
|
|
2141
|
+
},
|
|
2142
|
+
h.value
|
|
2143
|
+
), j = (h) => /* @__PURE__ */ r.jsx(
|
|
2144
|
+
A,
|
|
2145
|
+
{
|
|
2146
|
+
as: "optgroup",
|
|
2147
|
+
label: h.label,
|
|
2148
|
+
children: h.options.map(N)
|
|
2149
|
+
},
|
|
2150
|
+
h.label
|
|
2151
|
+
), S = (h) => {
|
|
2152
|
+
l == null || l(h.target.value);
|
|
2153
|
+
};
|
|
2154
|
+
return /* @__PURE__ */ r.jsx(
|
|
2155
|
+
de,
|
|
2156
|
+
{
|
|
2157
|
+
label: e,
|
|
2158
|
+
htmlFor: c,
|
|
2159
|
+
helpText: t,
|
|
2160
|
+
errorText: a,
|
|
2161
|
+
required: s,
|
|
2162
|
+
children: /* @__PURE__ */ r.jsx(G, { "data-select": !0, className: p, disabled: u, children: /* @__PURE__ */ r.jsx(
|
|
2163
|
+
A,
|
|
2164
|
+
{
|
|
2165
|
+
as: "select",
|
|
2166
|
+
ref: m,
|
|
2167
|
+
id: c,
|
|
2168
|
+
name: x,
|
|
2169
|
+
disabled: u,
|
|
2170
|
+
required: s,
|
|
2171
|
+
onChange: S,
|
|
2172
|
+
...d,
|
|
2173
|
+
children: o.map(
|
|
2174
|
+
(h) => "options" in h ? j(h) : N(h)
|
|
2175
|
+
)
|
|
2176
|
+
}
|
|
2177
|
+
) })
|
|
2178
|
+
}
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2181
|
+
);
|
|
2182
|
+
Gt.displayName = "Select";
|
|
2183
|
+
const _t = (e, t) => e > t ? "exceeded" : e >= t * 0.9 ? "warning" : "normal", Ze = (e, t, a) => Math.abs(e) === 1 ? t : a, Ut = g.forwardRef(
|
|
2184
|
+
({
|
|
2185
|
+
// FormItem props
|
|
2186
|
+
label: e,
|
|
2187
|
+
hideLabel: t,
|
|
2188
|
+
helpText: a,
|
|
2189
|
+
errorText: s,
|
|
2190
|
+
size: c,
|
|
2191
|
+
required: i,
|
|
2192
|
+
// TextArea-specific
|
|
2193
|
+
onChange: o,
|
|
2194
|
+
value: l = "",
|
|
2195
|
+
characterLimit: u,
|
|
2196
|
+
wordLimit: p,
|
|
2197
|
+
// Input props
|
|
2198
|
+
id: d,
|
|
2199
|
+
name: m,
|
|
2200
|
+
rows: x,
|
|
2201
|
+
cols: N,
|
|
2202
|
+
minLength: j,
|
|
2203
|
+
maxLength: S,
|
|
2204
|
+
placeholder: h,
|
|
2205
|
+
readOnly: R,
|
|
2206
|
+
disabled: y,
|
|
2207
|
+
autoComplete: F,
|
|
2208
|
+
// Validation (unused but destructured to not pass to DOM)
|
|
2209
|
+
validateThis: W,
|
|
2210
|
+
valid: w,
|
|
2211
|
+
invalid: P,
|
|
2212
|
+
...$
|
|
2213
|
+
}, O) => {
|
|
2214
|
+
const _ = oe(null), T = (k) => {
|
|
2215
|
+
o == null || o(k.target.value);
|
|
2216
|
+
}, D = () => {
|
|
2217
|
+
const k = [];
|
|
2218
|
+
if (u) {
|
|
2219
|
+
const I = l.length, B = _t(I, u), E = Math.max(0, I - u), f = u - I;
|
|
2220
|
+
k.push(
|
|
2221
|
+
/* @__PURE__ */ r.jsx("span", { className: `limit-${B}`, children: E > 0 ? `${E} ${Ze(E, "char", "chars")} over limit` : `${f} ${Ze(f, "char", "chars")} left` }, "char-limit")
|
|
2222
|
+
);
|
|
2223
|
+
}
|
|
2224
|
+
if (p) {
|
|
2225
|
+
const I = l.trim().split(/\s+/).filter(Boolean).length, B = _t(I, p), E = Math.max(0, I - p), f = p - I;
|
|
2226
|
+
k.push(
|
|
2227
|
+
/* @__PURE__ */ r.jsx("span", { className: `limit-${B}`, children: E > 0 ? `${E} ${Ze(E, "word", "words")} over limit` : `${f} ${Ze(f, "word", "words")} left` }, "word-limit")
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
if (!(!k.length && !a))
|
|
2231
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2232
|
+
a,
|
|
2233
|
+
a && k.length > 0 && /* @__PURE__ */ r.jsx("span", { className: "separator", children: " • " }),
|
|
2234
|
+
k.map((I, B) => /* @__PURE__ */ r.jsxs(g.Fragment, { children: [
|
|
2235
|
+
B > 0 && /* @__PURE__ */ r.jsx("span", { className: "separator", children: " • " }),
|
|
2236
|
+
I
|
|
2237
|
+
] }, B))
|
|
2238
|
+
] });
|
|
2239
|
+
}, H = (k) => {
|
|
2240
|
+
_.current = k, typeof O == "function" ? O(k) : O && (O.current = k);
|
|
2241
|
+
};
|
|
2242
|
+
return /* @__PURE__ */ r.jsx(
|
|
2243
|
+
de,
|
|
2244
|
+
{
|
|
2245
|
+
label: e,
|
|
2246
|
+
htmlFor: d,
|
|
2247
|
+
helpText: D(),
|
|
2248
|
+
errorText: s,
|
|
2249
|
+
required: i,
|
|
2250
|
+
size: c,
|
|
2251
|
+
children: /* @__PURE__ */ r.jsx(
|
|
2252
|
+
A,
|
|
2253
|
+
{
|
|
2254
|
+
as: "textarea",
|
|
2255
|
+
ref: H,
|
|
2256
|
+
"data-textarea": !0,
|
|
2257
|
+
id: d,
|
|
2258
|
+
name: m,
|
|
2259
|
+
value: l,
|
|
2260
|
+
rows: x,
|
|
2261
|
+
cols: N,
|
|
2262
|
+
minLength: j,
|
|
2263
|
+
maxLength: S,
|
|
2264
|
+
placeholder: h,
|
|
2265
|
+
readOnly: R,
|
|
2266
|
+
disabled: y,
|
|
2267
|
+
required: i,
|
|
2268
|
+
autoComplete: F,
|
|
2269
|
+
onChange: T,
|
|
2270
|
+
...$
|
|
2271
|
+
}
|
|
2272
|
+
)
|
|
2273
|
+
}
|
|
2274
|
+
);
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
Ut.displayName = "TextArea";
|
|
2278
|
+
const Or = {
|
|
2279
|
+
Checkbox: mt,
|
|
2280
|
+
Switch: ht,
|
|
2281
|
+
InputField: Ke,
|
|
2282
|
+
FileUpload: Bt,
|
|
2283
|
+
InputLabel: Ue,
|
|
2284
|
+
RadioButton: Wt,
|
|
2285
|
+
RadioGroup: zt,
|
|
2286
|
+
Select: Gt,
|
|
2287
|
+
TextArea: Ut,
|
|
2288
|
+
Empty: "div"
|
|
2289
|
+
}, Dr = (e, t) => {
|
|
2290
|
+
const { as: a, name: s, ...c } = e, i = (l) => {
|
|
2291
|
+
t(s, l);
|
|
2292
|
+
}, o = Or[a] || Ke;
|
|
2293
|
+
return /* @__PURE__ */ r.jsx(
|
|
2294
|
+
A,
|
|
2295
|
+
{
|
|
2296
|
+
as: o,
|
|
2297
|
+
...c,
|
|
2298
|
+
name: s,
|
|
2299
|
+
isFullWidth: !0,
|
|
2300
|
+
onChange: i
|
|
2301
|
+
}
|
|
2302
|
+
);
|
|
2303
|
+
}, Ar = (e, t, a) => {
|
|
2304
|
+
const s = e.map((c, i) => {
|
|
2305
|
+
const {
|
|
2306
|
+
desktopSpan: o,
|
|
2307
|
+
tabletLandscapeSpan: l,
|
|
2308
|
+
tabletPortraitSpan: u,
|
|
2309
|
+
mobileSpan: p,
|
|
2310
|
+
isHorizontal: d,
|
|
2311
|
+
...m
|
|
2312
|
+
} = c;
|
|
2313
|
+
return /* @__PURE__ */ vr(Ct, { ...{
|
|
2314
|
+
desktopSpan: o,
|
|
2315
|
+
tabletLandscapeSpan: l,
|
|
2316
|
+
tabletPortraitSpan: u,
|
|
2317
|
+
mobileSpan: p,
|
|
2318
|
+
isHorizontal: d
|
|
2319
|
+
}, key: `${c.name}-${i}` }, Dr(m, t));
|
|
2320
|
+
});
|
|
2321
|
+
return /* @__PURE__ */ r.jsx(Ht, { gutters: a, children: s });
|
|
2322
|
+
}, Ir = g.forwardRef(
|
|
2323
|
+
({ spacing: e = "small", fields: t, onFieldsChange: a, children: s, errorText: c, ...i }, o) => {
|
|
2324
|
+
let l = [];
|
|
2325
|
+
e && l.push(`spacing-${e}`);
|
|
2326
|
+
const u = (d, m) => {
|
|
2327
|
+
a && a({
|
|
2328
|
+
[d]: m
|
|
2329
|
+
});
|
|
2330
|
+
}, p = t != null && t.length ? Ar(t, u, e) : s;
|
|
2331
|
+
return /* @__PURE__ */ r.jsxs(
|
|
2332
|
+
A,
|
|
2333
|
+
{
|
|
2334
|
+
as: "form",
|
|
2335
|
+
"data-form": !0,
|
|
2336
|
+
ref: o,
|
|
2337
|
+
classNames: l,
|
|
2338
|
+
...i,
|
|
2339
|
+
children: [
|
|
2340
|
+
p,
|
|
2341
|
+
c && /* @__PURE__ */ r.jsx(Lt, { kind: "error", children: c })
|
|
2342
|
+
]
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
);
|
|
2347
|
+
Ir.displayName = "Form";
|
|
2348
|
+
const Lr = g.forwardRef(
|
|
2349
|
+
({
|
|
2350
|
+
isJoint: e,
|
|
2351
|
+
equalWidthForChildren: t,
|
|
2352
|
+
retainLayout: a,
|
|
2353
|
+
children: s,
|
|
2354
|
+
legend: c,
|
|
2355
|
+
id: i,
|
|
2356
|
+
...o
|
|
2357
|
+
}, l) => {
|
|
2358
|
+
const u = i || `form-group-${Math.random().toString(36).substring(2, 9)}`;
|
|
2359
|
+
let p = [];
|
|
2360
|
+
return e && p.push("is-joint"), t && p.push("equal-width-for-children"), a && p.push("retain-layout"), /* @__PURE__ */ r.jsx(
|
|
2361
|
+
A,
|
|
2362
|
+
{
|
|
2363
|
+
as: "div",
|
|
2364
|
+
"data-form-item-group": !0,
|
|
2365
|
+
ref: l,
|
|
2366
|
+
id: u,
|
|
2367
|
+
role: "group",
|
|
2368
|
+
"aria-label": c,
|
|
2369
|
+
classNames: p,
|
|
2370
|
+
...o,
|
|
2371
|
+
children: s
|
|
2372
|
+
}
|
|
2373
|
+
);
|
|
2374
|
+
}
|
|
2375
|
+
);
|
|
2376
|
+
Lr.displayName = "FormItemGroup";
|
|
2377
|
+
const Fr = (e, t) => {
|
|
2378
|
+
const a = [], s = e.length, c = t.length;
|
|
2379
|
+
if (s === 0) return c;
|
|
2380
|
+
if (c === 0) return s;
|
|
2381
|
+
for (let i = 0; i <= c; i++)
|
|
2382
|
+
a[i] = [i];
|
|
2383
|
+
for (let i = 0; i <= s; i++)
|
|
2384
|
+
a[0][i] = i;
|
|
2385
|
+
for (let i = 1; i <= c; i++)
|
|
2386
|
+
for (let o = 1; o <= s; o++)
|
|
2387
|
+
t[i - 1] === e[o - 1] ? a[i][o] = a[i - 1][o - 1] : a[i][o] = Math.min(
|
|
2388
|
+
a[i - 1][o] + 1,
|
|
2389
|
+
// Deletion
|
|
2390
|
+
a[i][o - 1] + 1,
|
|
2391
|
+
// Insertion
|
|
2392
|
+
a[i - 1][o - 1] + 1
|
|
2393
|
+
// Substitution
|
|
2394
|
+
);
|
|
2395
|
+
return a[c][s];
|
|
2396
|
+
}, Vr = (e, t) => {
|
|
2397
|
+
let a = 0, s = 0;
|
|
2398
|
+
for (; a < e.length && s < t.length; )
|
|
2399
|
+
e[a] === t[s] && a++, s++;
|
|
2400
|
+
return a === e.length;
|
|
2401
|
+
}, Br = (e) => e.split(/[\s\-_]+/).map((t) => t.slice(0, 2)).join("").toLowerCase(), Cr = (e, t) => {
|
|
2402
|
+
if (!t) return e;
|
|
2403
|
+
const a = t.toLowerCase().trim(), s = Math.floor(a.length / 2);
|
|
2404
|
+
return e.map((i) => {
|
|
2405
|
+
const o = i.label.toLowerCase(), l = Fr(a, o), u = o.split(/[\s\-_]+/), p = a.split(/[\s\-_]+/), d = o.includes(a) || p.every(
|
|
2406
|
+
(N) => u.some((j) => j.startsWith(N))
|
|
2407
|
+
), m = Br(o), x = Vr(a, m);
|
|
2408
|
+
return {
|
|
2409
|
+
option: i,
|
|
2410
|
+
distance: l,
|
|
2411
|
+
isPartialMatch: d,
|
|
2412
|
+
isAcronymMatch: x
|
|
2413
|
+
};
|
|
2414
|
+
}).filter(
|
|
2415
|
+
({ distance: i, isPartialMatch: o, isAcronymMatch: l }) => o || l || i <= s
|
|
2416
|
+
).sort((i, o) => i.isPartialMatch && !o.isPartialMatch ? -1 : !i.isPartialMatch && o.isPartialMatch ? 1 : i.isAcronymMatch && !o.isAcronymMatch ? -1 : !i.isAcronymMatch && o.isAcronymMatch ? 1 : i.distance - o.distance).map(({ option: i }) => i);
|
|
2417
|
+
}, Wr = g.forwardRef(
|
|
2418
|
+
({
|
|
2419
|
+
options: e = [],
|
|
2420
|
+
label: t,
|
|
2421
|
+
helpText: a,
|
|
2422
|
+
errorText: s,
|
|
2423
|
+
placeholder: c = "Select an option",
|
|
2424
|
+
id: i,
|
|
2425
|
+
defaultValue: o,
|
|
2426
|
+
onChange: l,
|
|
2427
|
+
disabled: u,
|
|
2428
|
+
selectionLimit: p,
|
|
2429
|
+
allowMultiSelect: d = !1,
|
|
2430
|
+
allowCustomEntries: m = !1,
|
|
2431
|
+
isLoading: x,
|
|
2432
|
+
value: N,
|
|
2433
|
+
isFullWidth: j,
|
|
2434
|
+
className: S,
|
|
2435
|
+
required: h,
|
|
2436
|
+
...R
|
|
2437
|
+
}, y) => {
|
|
2438
|
+
const [F, W] = J(!1), [w, P] = J(""), [$, O] = J(-1), [_, T] = J(null), [D, H] = J([]);
|
|
2439
|
+
re(() => {
|
|
2440
|
+
o && l && l(o);
|
|
2441
|
+
}, []);
|
|
2442
|
+
const k = g.useMemo(() => [...e], [e]), I = oe(), B = oe(null), E = i || `listbox-${Math.random().toString(36).substring(2, 9)}`, f = Cr(k, w), v = (V) => {
|
|
2443
|
+
if (V.disabled) return;
|
|
2444
|
+
let Y;
|
|
2445
|
+
if (d) {
|
|
2446
|
+
if (D.some((se) => se.value === V.value))
|
|
2447
|
+
Y = D.filter((se) => se.value !== V.value);
|
|
2448
|
+
else {
|
|
2449
|
+
if (p && D.length >= p)
|
|
2450
|
+
return;
|
|
2451
|
+
Y = [...D, V];
|
|
2452
|
+
}
|
|
2453
|
+
H(Y), l == null || l(Y.map((se) => se.value));
|
|
2454
|
+
} else
|
|
2455
|
+
Y = [V], T(V), H(Y), l == null || l(V.value), W(!1);
|
|
2456
|
+
P(""), O(-1);
|
|
2457
|
+
}, C = (V) => {
|
|
2458
|
+
P(V);
|
|
2459
|
+
}, L = () => {
|
|
2460
|
+
if (!w.trim() || !m) return;
|
|
2461
|
+
const V = w.trim(), Y = {
|
|
2462
|
+
value: V,
|
|
2463
|
+
label: V
|
|
2464
|
+
};
|
|
2465
|
+
k.some((ee) => ee.value === V) || v(Y);
|
|
2466
|
+
}, K = (V) => {
|
|
2467
|
+
if (d) {
|
|
2468
|
+
const Y = D.filter((ee) => ee.value !== V);
|
|
2469
|
+
H(Y), l == null || l(Y.map((ee) => ee.value));
|
|
2470
|
+
} else
|
|
2471
|
+
T(null), H([]), l == null || l("");
|
|
2472
|
+
}, le = () => {
|
|
2473
|
+
T(null), H([]), l == null || l(d ? [] : "");
|
|
2474
|
+
}, ce = (V) => {
|
|
2475
|
+
switch (V.key) {
|
|
2476
|
+
case "ArrowDown":
|
|
2477
|
+
V.preventDefault(), F ? O(
|
|
2478
|
+
(Y) => Y < f.length - 1 ? Y + 1 : Y
|
|
2479
|
+
) : (W(!0), O(0));
|
|
2480
|
+
break;
|
|
2481
|
+
case "ArrowUp":
|
|
2482
|
+
V.preventDefault(), O((Y) => Y > 0 ? Y - 1 : Y);
|
|
2483
|
+
break;
|
|
2484
|
+
case "Enter":
|
|
2485
|
+
if (V.preventDefault(), m && w.trim()) {
|
|
2486
|
+
const Y = f.find(
|
|
2487
|
+
(ee) => ee.label.toLowerCase() === w.trim().toLowerCase()
|
|
2488
|
+
);
|
|
2489
|
+
Y ? v(Y) : L();
|
|
2490
|
+
} else $ >= 0 && f[$] && v(f[$]);
|
|
2491
|
+
break;
|
|
2492
|
+
case "Escape":
|
|
2493
|
+
V.preventDefault(), W(!1), O(-1);
|
|
2494
|
+
break;
|
|
2495
|
+
case " ":
|
|
2496
|
+
F || (V.preventDefault(), W(!0), O(0));
|
|
2497
|
+
break;
|
|
2498
|
+
case "Home":
|
|
2499
|
+
F && (V.preventDefault(), O(0));
|
|
2500
|
+
break;
|
|
2501
|
+
case "End":
|
|
2502
|
+
F && (V.preventDefault(), O(f.length - 1));
|
|
2503
|
+
break;
|
|
2504
|
+
}
|
|
2505
|
+
};
|
|
2506
|
+
return ft(I, () => {
|
|
2507
|
+
W(!1), O(-1);
|
|
2508
|
+
}), re(() => {
|
|
2509
|
+
F && B.current && B.current.focus();
|
|
2510
|
+
}, [F]), re(() => {
|
|
2511
|
+
if ($ >= 0) {
|
|
2512
|
+
const V = document.querySelector(`[data-index="${$}"]`);
|
|
2513
|
+
V == null || V.scrollIntoView({ block: "nearest" });
|
|
2514
|
+
}
|
|
2515
|
+
}, [$]), /* @__PURE__ */ r.jsx(
|
|
2516
|
+
de,
|
|
2517
|
+
{
|
|
2518
|
+
label: t,
|
|
2519
|
+
htmlFor: i,
|
|
2520
|
+
helpText: a,
|
|
2521
|
+
errorText: s,
|
|
2522
|
+
required: h,
|
|
2523
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
2524
|
+
A,
|
|
2525
|
+
{
|
|
2526
|
+
as: "div",
|
|
2527
|
+
"data-list-box": !0,
|
|
2528
|
+
classNames: ["list-box-wrapper", u ? "disabled" : "", S || ""],
|
|
2529
|
+
ref: I,
|
|
2530
|
+
...R,
|
|
2531
|
+
children: [
|
|
2532
|
+
/* @__PURE__ */ r.jsxs(
|
|
2533
|
+
G,
|
|
2534
|
+
{
|
|
2535
|
+
className: "list-box-input-wrapper",
|
|
2536
|
+
onClick: () => !u && W(!F),
|
|
2537
|
+
role: "combobox",
|
|
2538
|
+
"aria-haspopup": "listbox",
|
|
2539
|
+
"aria-expanded": F,
|
|
2540
|
+
"aria-controls": `${E}-listbox`,
|
|
2541
|
+
"aria-owns": `${E}-listbox`,
|
|
2542
|
+
tabIndex: u ? -1 : 0,
|
|
2543
|
+
children: [
|
|
2544
|
+
d ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2545
|
+
D.length > 0 ? /* @__PURE__ */ r.jsxs(G, { className: "options-wrapper", children: [
|
|
2546
|
+
/* @__PURE__ */ r.jsx(G, { className: "options-list", children: D.map((V) => /* @__PURE__ */ r.jsx(
|
|
2547
|
+
at,
|
|
2548
|
+
{
|
|
2549
|
+
actionIcon: "cross",
|
|
2550
|
+
onActionClick: () => K(V.value),
|
|
2551
|
+
actionAriaLabel: `Remove ${V.label}`,
|
|
2552
|
+
size: "small",
|
|
2553
|
+
shape: "rounded",
|
|
2554
|
+
children: /* @__PURE__ */ r.jsx(ae, { children: V.label })
|
|
2555
|
+
},
|
|
2556
|
+
V.value
|
|
2557
|
+
)) }),
|
|
2558
|
+
p && D.length >= p && /* @__PURE__ */ r.jsxs(ae, { className: "options-limit-warning", textColour: "red", size: "small", children: [
|
|
2559
|
+
"You can choose only ",
|
|
2560
|
+
p,
|
|
2561
|
+
" option",
|
|
2562
|
+
p === 1 ? "" : "s"
|
|
2563
|
+
] })
|
|
2564
|
+
] }) : /* @__PURE__ */ r.jsx("span", { className: "placeholder", children: c }),
|
|
2565
|
+
D.length > 0 && /* @__PURE__ */ r.jsx(
|
|
2566
|
+
G,
|
|
2567
|
+
{
|
|
2568
|
+
className: "icon-wrapper clear-all",
|
|
2569
|
+
title: "Clear all options",
|
|
2570
|
+
onClick: () => le(),
|
|
2571
|
+
children: /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", children: [
|
|
2572
|
+
/* @__PURE__ */ r.jsx("line", { x1: "5", y1: "5", x2: "19", y2: "19" }),
|
|
2573
|
+
/* @__PURE__ */ r.jsx("line", { x1: "5", y1: "19", x2: "19", y2: "5" })
|
|
2574
|
+
] })
|
|
2575
|
+
}
|
|
2576
|
+
)
|
|
2577
|
+
] }) : D[0] ? /* @__PURE__ */ r.jsx(ae, { className: "selected-option", children: D[0].label }) : /* @__PURE__ */ r.jsx("span", { className: "placeholder", children: c }),
|
|
2578
|
+
/* @__PURE__ */ r.jsx(G, { className: "icon-wrapper chevrons", children: /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
2579
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "6 9 12 4 18 9" }),
|
|
2580
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "6 15 12 20 18 15" })
|
|
2581
|
+
] }) })
|
|
2582
|
+
]
|
|
2583
|
+
}
|
|
2584
|
+
),
|
|
2585
|
+
F && !u && /* @__PURE__ */ r.jsxs(G, { className: "list-box-dropdown", children: [
|
|
2586
|
+
/* @__PURE__ */ r.jsxs(G, { className: "list-box-search-wrapper", children: [
|
|
2587
|
+
/* @__PURE__ */ r.jsx(
|
|
2588
|
+
Ke,
|
|
2589
|
+
{
|
|
2590
|
+
type: "text",
|
|
2591
|
+
ref: B,
|
|
2592
|
+
className: "list-box-search",
|
|
2593
|
+
placeholder: m ? "Type to search or add new" : "Search",
|
|
2594
|
+
value: w,
|
|
2595
|
+
onChange: C,
|
|
2596
|
+
onKeyDown: ce,
|
|
2597
|
+
"aria-controls": `${E}-listbox`,
|
|
2598
|
+
"aria-label": "Search options"
|
|
2599
|
+
}
|
|
2600
|
+
),
|
|
2601
|
+
m && w.trim() && !D.some((V) => V.label.toLowerCase() === w.trim().toLowerCase()) && /* @__PURE__ */ r.jsx(
|
|
2602
|
+
"kbd",
|
|
2603
|
+
{
|
|
2604
|
+
className: "list-box-enter-key",
|
|
2605
|
+
"aria-label": "Press Enter to add custom option",
|
|
2606
|
+
children: "↵"
|
|
2607
|
+
}
|
|
2608
|
+
)
|
|
2609
|
+
] }),
|
|
2610
|
+
/* @__PURE__ */ r.jsx(
|
|
2611
|
+
A,
|
|
2612
|
+
{
|
|
2613
|
+
as: "ul",
|
|
2614
|
+
id: `${E}-listbox`,
|
|
2615
|
+
className: "list-box-options",
|
|
2616
|
+
role: "listbox",
|
|
2617
|
+
"aria-multiselectable": d,
|
|
2618
|
+
"aria-busy": x,
|
|
2619
|
+
tabIndex: -1,
|
|
2620
|
+
children: f.length > 0 ? f.map((V, Y) => /* @__PURE__ */ r.jsx(
|
|
2621
|
+
"li",
|
|
2622
|
+
{
|
|
2623
|
+
id: `${E}-option-${V.value}`,
|
|
2624
|
+
className: `list-box-option ${V.disabled ? "disabled" : ""} ${$ === Y ? "active" : ""}`,
|
|
2625
|
+
role: "option",
|
|
2626
|
+
"aria-selected": D.some((ee) => ee.value === V.value),
|
|
2627
|
+
"aria-disabled": V.disabled,
|
|
2628
|
+
onClick: () => v(V),
|
|
2629
|
+
"data-index": Y,
|
|
2630
|
+
tabIndex: -1,
|
|
2631
|
+
children: V.customLabel || V.label
|
|
2632
|
+
},
|
|
2633
|
+
V.value
|
|
2634
|
+
)) : /* @__PURE__ */ r.jsx(
|
|
2635
|
+
"li",
|
|
2636
|
+
{
|
|
2637
|
+
className: "list-box-option disabled",
|
|
2638
|
+
role: "alert",
|
|
2639
|
+
"aria-live": "polite",
|
|
2640
|
+
children: m ? "Type and press Enter to add new option" : "No matches found"
|
|
2641
|
+
}
|
|
2642
|
+
)
|
|
2643
|
+
}
|
|
2644
|
+
)
|
|
2645
|
+
] })
|
|
2646
|
+
]
|
|
2647
|
+
}
|
|
2648
|
+
)
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
2651
|
+
}
|
|
2652
|
+
);
|
|
2653
|
+
Wr.displayName = "ListBox";
|
|
2654
|
+
function Tt(e, t) {
|
|
2655
|
+
return (t === "alphanumeric" ? /^[a-zA-Z0-9]+$/i : /^[0-9]+$/).test(e);
|
|
2656
|
+
}
|
|
2657
|
+
const zr = g.forwardRef(
|
|
2658
|
+
({
|
|
2659
|
+
numberOfFields: e,
|
|
2660
|
+
onChange: t,
|
|
2661
|
+
type: a = "number",
|
|
2662
|
+
mask: s = !1,
|
|
2663
|
+
isOTP: c = !1,
|
|
2664
|
+
autoFocus: i = !1,
|
|
2665
|
+
pasteFromClipboard: o = "enabled",
|
|
2666
|
+
focusFirstInputOnReset: l = !0,
|
|
2667
|
+
isFullWidth: u,
|
|
2668
|
+
ariaLabel: p,
|
|
2669
|
+
...d
|
|
2670
|
+
}, m) => {
|
|
2671
|
+
const x = oe(null), [N, j] = J([]), [S, h] = J([]), [R, y] = J(!0), [F, W] = J(-1), w = d.id || `pin-input-${Math.random().toString(36).substring(2, 9)}`, P = p || "Enter verification code", $ = U(
|
|
2672
|
+
(E) => {
|
|
2673
|
+
var v;
|
|
2674
|
+
const f = N[E];
|
|
2675
|
+
(v = f == null ? void 0 : f.current) == null || v.focus();
|
|
2676
|
+
},
|
|
2677
|
+
[N]
|
|
2678
|
+
), O = U(
|
|
2679
|
+
(E) => {
|
|
2680
|
+
if (!R) return;
|
|
2681
|
+
const f = E + 1 < e ? E + 1 : null;
|
|
2682
|
+
f && $(f);
|
|
2683
|
+
},
|
|
2684
|
+
[$, e, R]
|
|
2685
|
+
), _ = U(() => {
|
|
2686
|
+
h(Array(e).fill("")), t == null || t(""), l && ($(0), W(0));
|
|
2687
|
+
}, [e, t, $, l]), T = U(
|
|
2688
|
+
(E, f) => {
|
|
2689
|
+
const v = [...S];
|
|
2690
|
+
v[f] = E, h(v), t == null || t(v.join("")), E !== "" && v.length === e && v.every((L) => L != null && L !== "") && f === e - 1 || (y(!0), O(f));
|
|
2691
|
+
},
|
|
2692
|
+
[O, e, t, S]
|
|
2693
|
+
), D = U((E, f) => {
|
|
2694
|
+
var L;
|
|
2695
|
+
const v = typeof E == "string" ? E : E.target.value, C = S[f];
|
|
2696
|
+
if (v === "") {
|
|
2697
|
+
T("", f);
|
|
2698
|
+
return;
|
|
2699
|
+
}
|
|
2700
|
+
if (v.length > 1 && f < e - 1) {
|
|
2701
|
+
if (Tt(v, a)) {
|
|
2702
|
+
let K = [];
|
|
2703
|
+
const le = v.split("");
|
|
2704
|
+
C === "" ? K = le.filter((Y, ee) => f + ee < e) : ((L = N[f].current) == null ? void 0 : L.selectionEnd) === v.length ? K = le.filter((ee, se) => se > 0 && f + se - 1 < e) : K = le.filter((ee, se) => se < v.length - 1 && f + se < e);
|
|
2705
|
+
const ce = S.map(
|
|
2706
|
+
(Y, ee) => ee >= f && ee < f + K.length ? K[ee - f] : Y
|
|
2707
|
+
);
|
|
2708
|
+
h(ce), t == null || t(ce.join(""));
|
|
2709
|
+
const V = Math.min(f + K.length, e - 1);
|
|
2710
|
+
$(V);
|
|
2711
|
+
}
|
|
2712
|
+
} else {
|
|
2713
|
+
let K = v;
|
|
2714
|
+
(C == null ? void 0 : C.length) > 0 && (K = v.charAt(v.length - 1)), Tt(K, a) && T(K, f);
|
|
2715
|
+
}
|
|
2716
|
+
}, [e, t, T, a, S, $, N]), H = U((E, f) => {
|
|
2717
|
+
var v;
|
|
2718
|
+
if (E.key === "Backspace")
|
|
2719
|
+
if (E.target.value === "") {
|
|
2720
|
+
if (f > 0) {
|
|
2721
|
+
const C = f - 1;
|
|
2722
|
+
T("", C), $(C), y(!0);
|
|
2723
|
+
}
|
|
2724
|
+
} else
|
|
2725
|
+
y(!1);
|
|
2726
|
+
else E.key === "Escape" ? ((v = N[f].current) == null || v.blur(), B()) : E.key === "ArrowRight" ? f < e - 1 && $(f + 1) : E.key === "ArrowLeft" && f > 0 && $(f - 1);
|
|
2727
|
+
}, [$, T, N, e]), k = U((E, f) => {
|
|
2728
|
+
W(f);
|
|
2729
|
+
}, []), I = U((E) => {
|
|
2730
|
+
const f = E.target;
|
|
2731
|
+
setTimeout(() => {
|
|
2732
|
+
f.setSelectionRange(f.value.length, f.value.length);
|
|
2733
|
+
}, 0);
|
|
2734
|
+
}, []), B = U(() => {
|
|
2735
|
+
W(-1);
|
|
2736
|
+
}, []);
|
|
2737
|
+
return re(() => {
|
|
2738
|
+
j((E) => Array(e).fill(0).map((v, C) => {
|
|
2739
|
+
var K;
|
|
2740
|
+
const L = E[C] || xr();
|
|
2741
|
+
return i && C === 0 && ((K = L.current) == null || K.focus()), L;
|
|
2742
|
+
}));
|
|
2743
|
+
}, [e, i]), At(
|
|
2744
|
+
m,
|
|
2745
|
+
() => ({
|
|
2746
|
+
...x.current,
|
|
2747
|
+
reset: _
|
|
2748
|
+
}),
|
|
2749
|
+
[_]
|
|
2750
|
+
), /* @__PURE__ */ r.jsx(
|
|
2751
|
+
G,
|
|
2752
|
+
{
|
|
2753
|
+
"data-pin-input-field": !0,
|
|
2754
|
+
ref: x,
|
|
2755
|
+
classNames: u ? ["full-width"] : [],
|
|
2756
|
+
role: "group",
|
|
2757
|
+
"aria-label": P,
|
|
2758
|
+
"aria-required": d.required,
|
|
2759
|
+
...d,
|
|
2760
|
+
children: Array.from({ length: e }, (E, f) => /* @__PURE__ */ r.jsx(
|
|
2761
|
+
Ke,
|
|
2762
|
+
{
|
|
2763
|
+
id: `${w}-${f}`,
|
|
2764
|
+
ref: N[f],
|
|
2765
|
+
type: s ? "password" : a === "number" ? "tel" : "text",
|
|
2766
|
+
inputMode: a === "number" ? "numeric" : "text",
|
|
2767
|
+
onChange: (v) => D(v, f),
|
|
2768
|
+
onKeyDown: (v) => H(v, f),
|
|
2769
|
+
onFocus: (v) => k(v, f),
|
|
2770
|
+
onSelect: I,
|
|
2771
|
+
onBlur: B,
|
|
2772
|
+
placeholder: F !== f ? "⦁" : void 0,
|
|
2773
|
+
autoComplete: c ? "one-time-code" : "off",
|
|
2774
|
+
value: S[f] || "",
|
|
2775
|
+
autoFocus: i && f === 0,
|
|
2776
|
+
onCopy: (v) => o === "disabled" && v.preventDefault(),
|
|
2777
|
+
onPaste: (v) => o === "disabled" && v.preventDefault(),
|
|
2778
|
+
"aria-label": `Digit ${f + 1} of ${e}`,
|
|
2779
|
+
"aria-required": d.required
|
|
2780
|
+
},
|
|
2781
|
+
f
|
|
2782
|
+
))
|
|
2783
|
+
}
|
|
2784
|
+
);
|
|
2785
|
+
}
|
|
2786
|
+
);
|
|
2787
|
+
zr.displayName = "PinInputField";
|
|
2788
|
+
const Hr = g.forwardRef(
|
|
2789
|
+
({
|
|
2790
|
+
id: e,
|
|
2791
|
+
name: t,
|
|
2792
|
+
label: a,
|
|
2793
|
+
helpText: s,
|
|
2794
|
+
errorText: c,
|
|
2795
|
+
options: i,
|
|
2796
|
+
defaultValue: o,
|
|
2797
|
+
value: l,
|
|
2798
|
+
required: u,
|
|
2799
|
+
onChange: p,
|
|
2800
|
+
size: d = "medium",
|
|
2801
|
+
bgColour: m,
|
|
2802
|
+
disabled: x,
|
|
2803
|
+
...N
|
|
2804
|
+
}, j) => {
|
|
2805
|
+
const S = _e(() => t || e, [t, e]), h = oe(null), [R, y] = J({
|
|
2806
|
+
width: 0,
|
|
2807
|
+
transform: "translateX(0)"
|
|
2808
|
+
}), [F, W] = J(!1), [w, P] = J(0), [$, O] = J(0), _ = oe([]), T = U(() => {
|
|
2809
|
+
if (!h.current) return;
|
|
2810
|
+
const E = h.current, f = E.closest("[data-input-wrapper]");
|
|
2811
|
+
if (E && f) {
|
|
2812
|
+
const v = E.scrollWidth, C = f.clientWidth, L = v > C;
|
|
2813
|
+
W(L), O(L ? v - C : 0);
|
|
2814
|
+
}
|
|
2815
|
+
}, []);
|
|
2816
|
+
re(() => {
|
|
2817
|
+
const E = h.current;
|
|
2818
|
+
if (!E) return;
|
|
2819
|
+
T();
|
|
2820
|
+
const f = new ResizeObserver(() => {
|
|
2821
|
+
T();
|
|
2822
|
+
});
|
|
2823
|
+
return f.observe(E), E.closest("[data-input-wrapper]") && f.observe(E.closest("[data-input-wrapper]")), () => f.disconnect();
|
|
2824
|
+
}, [T]), re(() => {
|
|
2825
|
+
const E = i.findIndex((f) => f.value === l);
|
|
2826
|
+
if (E >= 0) {
|
|
2827
|
+
const f = () => {
|
|
2828
|
+
const v = _.current[E];
|
|
2829
|
+
if (v) {
|
|
2830
|
+
const C = v.offsetWidth;
|
|
2831
|
+
let L = "translateX(0)";
|
|
2832
|
+
E > 0 && (L = `translateX(${_.current.slice(0, E).reduce((le, ce) => le + ((ce == null ? void 0 : ce.offsetWidth) || 0), 0)}px)`), y({ width: C, transform: L });
|
|
2833
|
+
}
|
|
2834
|
+
};
|
|
2835
|
+
if (document.fonts && document.fonts.ready)
|
|
2836
|
+
document.fonts.ready.then(() => {
|
|
2837
|
+
requestAnimationFrame(() => {
|
|
2838
|
+
requestAnimationFrame(f);
|
|
2839
|
+
});
|
|
2840
|
+
});
|
|
2841
|
+
else {
|
|
2842
|
+
const v = setTimeout(f, 100);
|
|
2843
|
+
return () => clearTimeout(v);
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
}, [l, i]);
|
|
2847
|
+
const D = (E) => {
|
|
2848
|
+
p == null || p(E.target.value);
|
|
2849
|
+
}, H = U((E) => {
|
|
2850
|
+
const f = h.current;
|
|
2851
|
+
if (!f) return;
|
|
2852
|
+
const C = f.clientWidth * 0.8;
|
|
2853
|
+
let L = E === "right" ? Math.min(w + C, $) : Math.max(w - C, 0);
|
|
2854
|
+
P(L), requestAnimationFrame(() => {
|
|
2855
|
+
f.style.transform = `translateX(-${L}px)`;
|
|
2856
|
+
});
|
|
2857
|
+
}, [w, $]), k = w > 0, I = w < $, B = [];
|
|
2858
|
+
return d && B.push(`size-${d}`), /* @__PURE__ */ r.jsx(
|
|
2859
|
+
de,
|
|
2860
|
+
{
|
|
2861
|
+
label: a,
|
|
2862
|
+
htmlFor: e,
|
|
2863
|
+
helpText: s,
|
|
2864
|
+
errorText: c,
|
|
2865
|
+
required: u,
|
|
2866
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
2867
|
+
A,
|
|
2868
|
+
{
|
|
2869
|
+
as: "div",
|
|
2870
|
+
"data-radio-tab-group": !0,
|
|
2871
|
+
ref: j,
|
|
2872
|
+
classNames: B,
|
|
2873
|
+
name: S,
|
|
2874
|
+
...N,
|
|
2875
|
+
children: [
|
|
2876
|
+
F && k && /* @__PURE__ */ r.jsx(
|
|
2877
|
+
G,
|
|
2878
|
+
{
|
|
2879
|
+
className: "scroll-button left",
|
|
2880
|
+
onClick: () => H("left"),
|
|
2881
|
+
children: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r.jsx("polyline", { points: "15 18 9 12 15 6" }) })
|
|
2882
|
+
}
|
|
2883
|
+
),
|
|
2884
|
+
/* @__PURE__ */ r.jsxs(G, { className: "rtg-options-container", children: [
|
|
2885
|
+
/* @__PURE__ */ r.jsxs(
|
|
2886
|
+
G,
|
|
2887
|
+
{
|
|
2888
|
+
className: "rtg-options-wrapper",
|
|
2889
|
+
ref: h,
|
|
2890
|
+
children: [
|
|
2891
|
+
/* @__PURE__ */ r.jsx(
|
|
2892
|
+
G,
|
|
2893
|
+
{
|
|
2894
|
+
className: "indicator",
|
|
2895
|
+
style: {
|
|
2896
|
+
width: `${R.width}px`,
|
|
2897
|
+
transform: R.transform
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
),
|
|
2901
|
+
i.map((E, f) => {
|
|
2902
|
+
const { id: v, ...C } = E, L = v || `${e}-option-${f}`;
|
|
2903
|
+
return /* @__PURE__ */ r.jsxs(g.Fragment, { children: [
|
|
2904
|
+
/* @__PURE__ */ r.jsx(
|
|
2905
|
+
"input",
|
|
2906
|
+
{
|
|
2907
|
+
type: "radio",
|
|
2908
|
+
...C,
|
|
2909
|
+
id: L,
|
|
2910
|
+
name: S,
|
|
2911
|
+
checked: l === E.value,
|
|
2912
|
+
disabled: x || E.disabled,
|
|
2913
|
+
onChange: D
|
|
2914
|
+
}
|
|
2915
|
+
),
|
|
2916
|
+
/* @__PURE__ */ r.jsx(
|
|
2917
|
+
"label",
|
|
2918
|
+
{
|
|
2919
|
+
ref: (K) => _.current[f] = K,
|
|
2920
|
+
htmlFor: L,
|
|
2921
|
+
children: E.label
|
|
2922
|
+
}
|
|
2923
|
+
)
|
|
2924
|
+
] }, L);
|
|
2925
|
+
})
|
|
2926
|
+
]
|
|
2927
|
+
}
|
|
2928
|
+
),
|
|
2929
|
+
F && I && /* @__PURE__ */ r.jsx(
|
|
2930
|
+
G,
|
|
2931
|
+
{
|
|
2932
|
+
className: "scroll-button right",
|
|
2933
|
+
onClick: () => H("right"),
|
|
2934
|
+
children: /* @__PURE__ */ r.jsx("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r.jsx("polyline", { points: "9 6 15 12 9 18" }) })
|
|
2935
|
+
}
|
|
2936
|
+
)
|
|
2937
|
+
] })
|
|
2938
|
+
]
|
|
2939
|
+
}
|
|
2940
|
+
)
|
|
2941
|
+
}
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2944
|
+
);
|
|
2945
|
+
Hr.displayName = "RadioTabGroup";
|
|
2946
|
+
function Gr(e) {
|
|
2947
|
+
return Array.isArray(e.value);
|
|
2948
|
+
}
|
|
2949
|
+
const Ur = g.forwardRef(
|
|
2950
|
+
(e, t) => Gr(e) ? /* @__PURE__ */ r.jsx(Yt, { ...e, forwardedRef: t }) : /* @__PURE__ */ r.jsx(Kt, { ...e, forwardedRef: t })
|
|
2951
|
+
);
|
|
2952
|
+
Ur.displayName = "Range";
|
|
2953
|
+
const Kt = ({
|
|
2954
|
+
label: e,
|
|
2955
|
+
helpText: t,
|
|
2956
|
+
errorText: a,
|
|
2957
|
+
value: s = 0,
|
|
2958
|
+
suffix: c,
|
|
2959
|
+
onChange: i,
|
|
2960
|
+
min: o = 0,
|
|
2961
|
+
max: l = 100,
|
|
2962
|
+
step: u = 1,
|
|
2963
|
+
id: p,
|
|
2964
|
+
disabled: d,
|
|
2965
|
+
...m
|
|
2966
|
+
}) => {
|
|
2967
|
+
const x = oe(null), N = oe(null), [j, S] = J(!1), [h, R] = J(!1), y = Math.max(o, Math.min(l, s)), F = U((T) => l <= o ? 0 : (Math.max(o, Math.min(l, T)) - o) / (l - o) * 100, [o, l]), W = U((T) => {
|
|
2968
|
+
if (!N.current) return o;
|
|
2969
|
+
const D = N.current.getBoundingClientRect(), H = Math.max(0, Math.min(1, (T - D.left) / D.width)), k = o + H * (l - o), I = Math.round(k / u) * u;
|
|
2970
|
+
return Math.max(o, Math.min(l, I));
|
|
2971
|
+
}, [o, l, u]), w = U((T) => {
|
|
2972
|
+
const D = W(T);
|
|
2973
|
+
i == null || i(D);
|
|
2974
|
+
}, [W, i]), P = U((T) => {
|
|
2975
|
+
d || (T.preventDefault(), S(!0), R(!0), w(T.clientX));
|
|
2976
|
+
}, [d, w]);
|
|
2977
|
+
re(() => {
|
|
2978
|
+
if (!j) return;
|
|
2979
|
+
const T = (H) => {
|
|
2980
|
+
w(H.clientX);
|
|
2981
|
+
}, D = () => {
|
|
2982
|
+
S(!1);
|
|
2983
|
+
};
|
|
2984
|
+
return document.addEventListener("mousemove", T), document.addEventListener("mouseup", D), () => {
|
|
2985
|
+
document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", D);
|
|
2986
|
+
};
|
|
2987
|
+
}, [j, w]);
|
|
2988
|
+
const $ = U((T) => {
|
|
2989
|
+
d || (S(!0), R(!0), w(T.touches[0].clientX));
|
|
2990
|
+
}, [d, w]);
|
|
2991
|
+
re(() => {
|
|
2992
|
+
if (!j) return;
|
|
2993
|
+
const T = (H) => {
|
|
2994
|
+
H.preventDefault(), w(H.touches[0].clientX);
|
|
2995
|
+
}, D = () => {
|
|
2996
|
+
S(!1);
|
|
2997
|
+
};
|
|
2998
|
+
return document.addEventListener("touchmove", T, { passive: !1 }), document.addEventListener("touchend", D), () => {
|
|
2999
|
+
document.removeEventListener("touchmove", T), document.removeEventListener("touchend", D);
|
|
3000
|
+
};
|
|
3001
|
+
}, [j, w]);
|
|
3002
|
+
const O = U((T) => {
|
|
3003
|
+
if (d) return;
|
|
3004
|
+
let D = y;
|
|
3005
|
+
switch (T.key) {
|
|
3006
|
+
case "ArrowRight":
|
|
3007
|
+
case "ArrowUp":
|
|
3008
|
+
T.preventDefault(), D = Math.min(y + u, l);
|
|
3009
|
+
break;
|
|
3010
|
+
case "ArrowLeft":
|
|
3011
|
+
case "ArrowDown":
|
|
3012
|
+
T.preventDefault(), D = Math.max(y - u, o);
|
|
3013
|
+
break;
|
|
3014
|
+
case "Home":
|
|
3015
|
+
T.preventDefault(), D = o;
|
|
3016
|
+
break;
|
|
3017
|
+
case "End":
|
|
3018
|
+
T.preventDefault(), D = l;
|
|
3019
|
+
break;
|
|
3020
|
+
case "PageUp":
|
|
3021
|
+
T.preventDefault(), D = Math.min(y + u * 10, l);
|
|
3022
|
+
break;
|
|
3023
|
+
case "PageDown":
|
|
3024
|
+
T.preventDefault(), D = Math.max(y - u * 10, o);
|
|
3025
|
+
break;
|
|
3026
|
+
default:
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3029
|
+
i == null || i(D);
|
|
3030
|
+
}, [d, y, o, l, u, i]), _ = F(y);
|
|
3031
|
+
return /* @__PURE__ */ r.jsx(
|
|
3032
|
+
de,
|
|
3033
|
+
{
|
|
3034
|
+
customLabel: e && /* @__PURE__ */ r.jsxs(G, { "data-range-meta": !0, children: [
|
|
3035
|
+
/* @__PURE__ */ r.jsx(
|
|
3036
|
+
Ue,
|
|
3037
|
+
{
|
|
3038
|
+
className: "range-label",
|
|
3039
|
+
label: e,
|
|
3040
|
+
htmlFor: p
|
|
3041
|
+
}
|
|
3042
|
+
),
|
|
3043
|
+
/* @__PURE__ */ r.jsxs(ae, { className: "range-value", children: [
|
|
3044
|
+
y,
|
|
3045
|
+
c && c
|
|
3046
|
+
] })
|
|
3047
|
+
] }),
|
|
3048
|
+
helpText: t,
|
|
3049
|
+
errorText: a,
|
|
3050
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
3051
|
+
G,
|
|
3052
|
+
{
|
|
3053
|
+
ref: N,
|
|
3054
|
+
"data-range-single": !0,
|
|
3055
|
+
className: d ? "disabled" : "",
|
|
3056
|
+
role: "group",
|
|
3057
|
+
"aria-labelledby": e ? `${p}-label` : void 0,
|
|
3058
|
+
children: [
|
|
3059
|
+
/* @__PURE__ */ r.jsx(G, { className: "range-track", "aria-hidden": "true" }),
|
|
3060
|
+
/* @__PURE__ */ r.jsx(
|
|
3061
|
+
G,
|
|
3062
|
+
{
|
|
3063
|
+
className: "range-track-fill",
|
|
3064
|
+
style: {
|
|
3065
|
+
left: "0%",
|
|
3066
|
+
right: `${100 - _}%`
|
|
3067
|
+
},
|
|
3068
|
+
"aria-hidden": "true"
|
|
3069
|
+
}
|
|
3070
|
+
),
|
|
3071
|
+
/* @__PURE__ */ r.jsx(
|
|
3072
|
+
"button",
|
|
3073
|
+
{
|
|
3074
|
+
ref: x,
|
|
3075
|
+
id: p,
|
|
3076
|
+
type: "button",
|
|
3077
|
+
className: "range-thumb",
|
|
3078
|
+
style: { left: `${_}%` },
|
|
3079
|
+
disabled: d,
|
|
3080
|
+
onMouseDown: P,
|
|
3081
|
+
onTouchStart: $,
|
|
3082
|
+
onKeyDown: O,
|
|
3083
|
+
onFocus: () => R(!0),
|
|
3084
|
+
onBlur: () => R(!1),
|
|
3085
|
+
"data-active": h || j,
|
|
3086
|
+
role: "slider",
|
|
3087
|
+
"aria-valuemin": o,
|
|
3088
|
+
"aria-valuemax": l,
|
|
3089
|
+
"aria-valuenow": y,
|
|
3090
|
+
"aria-valuetext": `${y}${c ? ` ${c}` : ""}`,
|
|
3091
|
+
"aria-orientation": "horizontal"
|
|
3092
|
+
}
|
|
3093
|
+
)
|
|
3094
|
+
]
|
|
3095
|
+
}
|
|
3096
|
+
)
|
|
3097
|
+
}
|
|
3098
|
+
);
|
|
3099
|
+
};
|
|
3100
|
+
Kt.displayName = "SingleThumbRange";
|
|
3101
|
+
const Yt = ({
|
|
3102
|
+
label: e,
|
|
3103
|
+
helpText: t,
|
|
3104
|
+
errorText: a,
|
|
3105
|
+
value: s = [0, 100],
|
|
3106
|
+
suffix: c,
|
|
3107
|
+
onChange: i,
|
|
3108
|
+
min: o = 0,
|
|
3109
|
+
max: l = 100,
|
|
3110
|
+
step: u = 1,
|
|
3111
|
+
minLabel: p = "Minimum value",
|
|
3112
|
+
maxLabel: d = "Maximum value",
|
|
3113
|
+
id: m,
|
|
3114
|
+
disabled: x,
|
|
3115
|
+
...N
|
|
3116
|
+
}) => {
|
|
3117
|
+
const [j, S] = s, h = Math.max(o, Math.min(l, j)), R = Math.max(o, Math.min(l, S)), y = oe(null), F = oe(null), W = oe(null), [w, P] = J(null), [$, O] = J(null), _ = U((f) => l <= o ? 0 : (Math.max(o, Math.min(l, f)) - o) / (l - o) * 100, [o, l]), T = U((f) => {
|
|
3118
|
+
if (!W.current) return o;
|
|
3119
|
+
const v = W.current.getBoundingClientRect(), C = Math.max(0, Math.min(1, (f - v.left) / v.width)), L = o + C * (l - o), K = Math.round(L / u) * u;
|
|
3120
|
+
return Math.max(o, Math.min(l, K));
|
|
3121
|
+
}, [o, l, u]), D = U((f, v) => {
|
|
3122
|
+
const C = T(f);
|
|
3123
|
+
if (v === "min") {
|
|
3124
|
+
const L = Math.min(C, R - u);
|
|
3125
|
+
i == null || i([L, R]);
|
|
3126
|
+
} else {
|
|
3127
|
+
const L = Math.max(C, h + u);
|
|
3128
|
+
i == null || i([h, L]);
|
|
3129
|
+
}
|
|
3130
|
+
}, [T, h, R, u, i]), H = U((f) => (v) => {
|
|
3131
|
+
x || (v.preventDefault(), P(f), O(f), D(v.clientX, f));
|
|
3132
|
+
}, [x, D]);
|
|
3133
|
+
re(() => {
|
|
3134
|
+
if (!w) return;
|
|
3135
|
+
const f = (C) => {
|
|
3136
|
+
D(C.clientX, w);
|
|
3137
|
+
}, v = () => {
|
|
3138
|
+
P(null);
|
|
3139
|
+
};
|
|
3140
|
+
return document.addEventListener("mousemove", f), document.addEventListener("mouseup", v), () => {
|
|
3141
|
+
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", v);
|
|
3142
|
+
};
|
|
3143
|
+
}, [w, D]);
|
|
3144
|
+
const k = U((f) => (v) => {
|
|
3145
|
+
x || (P(f), O(f), D(v.touches[0].clientX, f));
|
|
3146
|
+
}, [x, D]);
|
|
3147
|
+
re(() => {
|
|
3148
|
+
if (!w) return;
|
|
3149
|
+
const f = (C) => {
|
|
3150
|
+
C.preventDefault(), D(C.touches[0].clientX, w);
|
|
3151
|
+
}, v = () => {
|
|
3152
|
+
P(null);
|
|
3153
|
+
};
|
|
3154
|
+
return document.addEventListener("touchmove", f, { passive: !1 }), document.addEventListener("touchend", v), () => {
|
|
3155
|
+
document.removeEventListener("touchmove", f), document.removeEventListener("touchend", v);
|
|
3156
|
+
};
|
|
3157
|
+
}, [w, D]);
|
|
3158
|
+
const I = U((f) => (v) => {
|
|
3159
|
+
if (x) return;
|
|
3160
|
+
const C = f === "min" ? h : R;
|
|
3161
|
+
let L = C;
|
|
3162
|
+
switch (v.key) {
|
|
3163
|
+
case "ArrowRight":
|
|
3164
|
+
case "ArrowUp":
|
|
3165
|
+
v.preventDefault(), L = Math.min(C + u, l);
|
|
3166
|
+
break;
|
|
3167
|
+
case "ArrowLeft":
|
|
3168
|
+
case "ArrowDown":
|
|
3169
|
+
v.preventDefault(), L = Math.max(C - u, o);
|
|
3170
|
+
break;
|
|
3171
|
+
case "Home":
|
|
3172
|
+
v.preventDefault(), L = f === "min" ? o : h + u;
|
|
3173
|
+
break;
|
|
3174
|
+
case "End":
|
|
3175
|
+
v.preventDefault(), L = f === "max" ? l : R - u;
|
|
3176
|
+
break;
|
|
3177
|
+
case "PageUp":
|
|
3178
|
+
v.preventDefault(), L = Math.min(C + u * 10, l);
|
|
3179
|
+
break;
|
|
3180
|
+
case "PageDown":
|
|
3181
|
+
v.preventDefault(), L = Math.max(C - u * 10, o);
|
|
3182
|
+
break;
|
|
3183
|
+
default:
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
if (f === "min") {
|
|
3187
|
+
const K = Math.min(L, R - u);
|
|
3188
|
+
i == null || i([K, R]);
|
|
3189
|
+
} else {
|
|
3190
|
+
const K = Math.max(L, h + u);
|
|
3191
|
+
i == null || i([h, K]);
|
|
3192
|
+
}
|
|
3193
|
+
}, [x, h, R, o, l, u, i]), B = _(h), E = _(R);
|
|
3194
|
+
return /* @__PURE__ */ r.jsx(
|
|
3195
|
+
de,
|
|
3196
|
+
{
|
|
3197
|
+
customLabel: e && /* @__PURE__ */ r.jsxs(G, { "data-range-meta": !0, children: [
|
|
3198
|
+
/* @__PURE__ */ r.jsx(
|
|
3199
|
+
Ue,
|
|
3200
|
+
{
|
|
3201
|
+
className: "range-label",
|
|
3202
|
+
label: e,
|
|
3203
|
+
htmlFor: m
|
|
3204
|
+
}
|
|
3205
|
+
),
|
|
3206
|
+
/* @__PURE__ */ r.jsxs(ae, { className: "range-value", children: [
|
|
3207
|
+
h,
|
|
3208
|
+
"–",
|
|
3209
|
+
R,
|
|
3210
|
+
c && c
|
|
3211
|
+
] })
|
|
3212
|
+
] }),
|
|
3213
|
+
helpText: t,
|
|
3214
|
+
errorText: a,
|
|
3215
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
3216
|
+
G,
|
|
3217
|
+
{
|
|
3218
|
+
ref: W,
|
|
3219
|
+
"data-range-dual": !0,
|
|
3220
|
+
className: x ? "disabled" : "",
|
|
3221
|
+
role: "group",
|
|
3222
|
+
"aria-labelledby": e ? `${m}-label` : void 0,
|
|
3223
|
+
children: [
|
|
3224
|
+
/* @__PURE__ */ r.jsx(G, { className: "range-track", "aria-hidden": "true" }),
|
|
3225
|
+
/* @__PURE__ */ r.jsx(
|
|
3226
|
+
G,
|
|
3227
|
+
{
|
|
3228
|
+
className: "range-track-fill",
|
|
3229
|
+
style: {
|
|
3230
|
+
left: `${B}%`,
|
|
3231
|
+
right: `${100 - E}%`
|
|
3232
|
+
},
|
|
3233
|
+
"aria-hidden": "true"
|
|
3234
|
+
}
|
|
3235
|
+
),
|
|
3236
|
+
/* @__PURE__ */ r.jsx(
|
|
3237
|
+
"button",
|
|
3238
|
+
{
|
|
3239
|
+
ref: y,
|
|
3240
|
+
id: `${m}-min`,
|
|
3241
|
+
type: "button",
|
|
3242
|
+
className: "range-thumb range-thumb-min",
|
|
3243
|
+
style: { left: `${B}%` },
|
|
3244
|
+
disabled: x,
|
|
3245
|
+
onMouseDown: H("min"),
|
|
3246
|
+
onTouchStart: k("min"),
|
|
3247
|
+
onKeyDown: I("min"),
|
|
3248
|
+
onFocus: () => O("min"),
|
|
3249
|
+
onBlur: () => O(null),
|
|
3250
|
+
"data-active": $ === "min" || w === "min",
|
|
3251
|
+
role: "slider",
|
|
3252
|
+
"aria-label": p,
|
|
3253
|
+
"aria-valuemin": o,
|
|
3254
|
+
"aria-valuemax": R - u,
|
|
3255
|
+
"aria-valuenow": h,
|
|
3256
|
+
"aria-valuetext": `${h}${c ? ` ${c}` : ""}`,
|
|
3257
|
+
"aria-orientation": "horizontal"
|
|
3258
|
+
}
|
|
3259
|
+
),
|
|
3260
|
+
/* @__PURE__ */ r.jsx(
|
|
3261
|
+
"button",
|
|
3262
|
+
{
|
|
3263
|
+
ref: F,
|
|
3264
|
+
id: `${m}-max`,
|
|
3265
|
+
type: "button",
|
|
3266
|
+
className: "range-thumb range-thumb-max",
|
|
3267
|
+
style: { left: `${E}%` },
|
|
3268
|
+
disabled: x,
|
|
3269
|
+
onMouseDown: H("max"),
|
|
3270
|
+
onTouchStart: k("max"),
|
|
3271
|
+
onKeyDown: I("max"),
|
|
3272
|
+
onFocus: () => O("max"),
|
|
3273
|
+
onBlur: () => O(null),
|
|
3274
|
+
"data-active": $ === "max" || w === "max",
|
|
3275
|
+
role: "slider",
|
|
3276
|
+
"aria-label": d,
|
|
3277
|
+
"aria-valuemin": h + u,
|
|
3278
|
+
"aria-valuemax": l,
|
|
3279
|
+
"aria-valuenow": R,
|
|
3280
|
+
"aria-valuetext": `${R}${c ? ` ${c}` : ""}`,
|
|
3281
|
+
"aria-orientation": "horizontal"
|
|
3282
|
+
}
|
|
3283
|
+
)
|
|
3284
|
+
]
|
|
3285
|
+
}
|
|
3286
|
+
)
|
|
3287
|
+
}
|
|
3288
|
+
);
|
|
3289
|
+
};
|
|
3290
|
+
Yt.displayName = "DualThumbRange";
|
|
3291
|
+
const Kr = g.forwardRef(
|
|
3292
|
+
({
|
|
3293
|
+
label: e,
|
|
3294
|
+
value: t,
|
|
3295
|
+
height: a,
|
|
3296
|
+
suffix: s,
|
|
3297
|
+
showOptimumMarker: c,
|
|
3298
|
+
ariaLabel: i,
|
|
3299
|
+
description: o,
|
|
3300
|
+
min: l,
|
|
3301
|
+
max: u,
|
|
3302
|
+
low: p,
|
|
3303
|
+
high: d,
|
|
3304
|
+
optimum: m,
|
|
3305
|
+
...x
|
|
3306
|
+
}, N) => {
|
|
3307
|
+
const j = m ? (m - l) / (u - l) * 100 : 0, S = () => {
|
|
3308
|
+
const h = (t - l) / (u - l) * 100;
|
|
3309
|
+
let R;
|
|
3310
|
+
return t <= p ? R = "Low" : t >= d ? R = "High" : R = "Normal", `Current value is ${t}${s || ""} (${h.toFixed(1)}%). Status: ${R}`;
|
|
3311
|
+
};
|
|
3312
|
+
return /* @__PURE__ */ r.jsxs(
|
|
3313
|
+
"div",
|
|
3314
|
+
{
|
|
3315
|
+
role: "region",
|
|
3316
|
+
"aria-label": i || "Meter indicator",
|
|
3317
|
+
children: [
|
|
3318
|
+
e && /* @__PURE__ */ r.jsxs(
|
|
3319
|
+
A,
|
|
3320
|
+
{
|
|
3321
|
+
as: "div",
|
|
3322
|
+
"data-meter-meta": !0,
|
|
3323
|
+
id: `meter-label-${e.toLowerCase().replace(/\s+/g, "-")}`,
|
|
3324
|
+
children: [
|
|
3325
|
+
/* @__PURE__ */ r.jsx(ae, { children: e }),
|
|
3326
|
+
/* @__PURE__ */ r.jsxs(ae, { children: [
|
|
3327
|
+
t,
|
|
3328
|
+
s && s
|
|
3329
|
+
] })
|
|
3330
|
+
]
|
|
3331
|
+
}
|
|
3332
|
+
),
|
|
3333
|
+
/* @__PURE__ */ r.jsxs(
|
|
3334
|
+
"div",
|
|
3335
|
+
{
|
|
3336
|
+
className: "meter-wrapper",
|
|
3337
|
+
role: "presentation",
|
|
3338
|
+
children: [
|
|
3339
|
+
/* @__PURE__ */ r.jsx(
|
|
3340
|
+
A,
|
|
3341
|
+
{
|
|
3342
|
+
as: "meter",
|
|
3343
|
+
"data-meter": !0,
|
|
3344
|
+
ref: N,
|
|
3345
|
+
value: t,
|
|
3346
|
+
min: l,
|
|
3347
|
+
max: u,
|
|
3348
|
+
low: p,
|
|
3349
|
+
high: d,
|
|
3350
|
+
optimum: m,
|
|
3351
|
+
...x,
|
|
3352
|
+
style: { height: a },
|
|
3353
|
+
"aria-label": e || i || "Progress meter",
|
|
3354
|
+
"aria-valuemin": l,
|
|
3355
|
+
"aria-valuemax": u,
|
|
3356
|
+
"aria-valuenow": t,
|
|
3357
|
+
"aria-valuetext": S(),
|
|
3358
|
+
"aria-describedby": o ? `meter-description-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}` : void 0
|
|
3359
|
+
}
|
|
3360
|
+
),
|
|
3361
|
+
c && m && /* @__PURE__ */ r.jsx(
|
|
3362
|
+
"div",
|
|
3363
|
+
{
|
|
3364
|
+
className: "optimum-marker",
|
|
3365
|
+
style: { left: `calc(${j}% - var(--meter-border-width))` },
|
|
3366
|
+
title: `Optimum: ${m}`,
|
|
3367
|
+
role: "presentation",
|
|
3368
|
+
"aria-hidden": "true"
|
|
3369
|
+
}
|
|
3370
|
+
)
|
|
3371
|
+
]
|
|
3372
|
+
}
|
|
3373
|
+
),
|
|
3374
|
+
o && /* @__PURE__ */ r.jsx(
|
|
3375
|
+
"div",
|
|
3376
|
+
{
|
|
3377
|
+
id: `meter-description-${e == null ? void 0 : e.toLowerCase().replace(/\s+/g, "-")}`,
|
|
3378
|
+
className: "sr-only",
|
|
3379
|
+
children: o
|
|
3380
|
+
}
|
|
3381
|
+
)
|
|
3382
|
+
]
|
|
3383
|
+
}
|
|
3384
|
+
);
|
|
3385
|
+
}
|
|
3386
|
+
);
|
|
3387
|
+
Kr.displayName = "Meter";
|
|
3388
|
+
const Yr = g.forwardRef(
|
|
3389
|
+
({
|
|
3390
|
+
id: e,
|
|
3391
|
+
children: t,
|
|
3392
|
+
classNames: a = [],
|
|
3393
|
+
isOpen: s = !1,
|
|
3394
|
+
onClose: c,
|
|
3395
|
+
isDismissible: i = !0,
|
|
3396
|
+
showBackdrop: o,
|
|
3397
|
+
blurBackdrop: l,
|
|
3398
|
+
label: u,
|
|
3399
|
+
description: p,
|
|
3400
|
+
...d
|
|
3401
|
+
}, m) => {
|
|
3402
|
+
const x = `${e}`, N = p ? `${x}-description` : void 0;
|
|
3403
|
+
return o && a.push("show-backdrop"), l && a.push("blur-backdrop"), re(() => {
|
|
3404
|
+
const j = document.querySelector(`#${x}[data-modal]`);
|
|
3405
|
+
if (!(!j || !(j instanceof HTMLElement)))
|
|
3406
|
+
if (s) {
|
|
3407
|
+
j.showPopover();
|
|
3408
|
+
const S = j.querySelectorAll(
|
|
3409
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3410
|
+
);
|
|
3411
|
+
S.length && S[0].focus();
|
|
3412
|
+
} else
|
|
3413
|
+
j.matches(":popover-open") && j.hidePopover();
|
|
3414
|
+
}, [s, x]), re(() => {
|
|
3415
|
+
const j = (S) => {
|
|
3416
|
+
S.key === "Escape" && i && s && c && c();
|
|
3417
|
+
};
|
|
3418
|
+
return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
|
|
3419
|
+
}, [i, s, c]), /* @__PURE__ */ r.jsxs(
|
|
3420
|
+
A,
|
|
3421
|
+
{
|
|
3422
|
+
as: "dialog",
|
|
3423
|
+
id: x,
|
|
3424
|
+
"data-modal": !0,
|
|
3425
|
+
popover: i ? "auto" : "manual",
|
|
3426
|
+
ref: m,
|
|
3427
|
+
classNames: a,
|
|
3428
|
+
role: "dialog",
|
|
3429
|
+
"aria-modal": "true",
|
|
3430
|
+
"aria-label": u || "Modal dialog",
|
|
3431
|
+
"aria-describedby": N,
|
|
3432
|
+
...d,
|
|
3433
|
+
children: [
|
|
3434
|
+
i && c && /* @__PURE__ */ r.jsx(
|
|
3435
|
+
ae,
|
|
3436
|
+
{
|
|
3437
|
+
className: "dismiss-button",
|
|
3438
|
+
onClick: c,
|
|
3439
|
+
"aria-label": "Close modal",
|
|
3440
|
+
tabIndex: 0,
|
|
3441
|
+
children: "×"
|
|
3442
|
+
}
|
|
3443
|
+
),
|
|
3444
|
+
p && /* @__PURE__ */ r.jsx("div", { id: N, className: "sr-only", children: p }),
|
|
3445
|
+
/* @__PURE__ */ r.jsx("div", { role: "document", children: t })
|
|
3446
|
+
]
|
|
3447
|
+
}
|
|
3448
|
+
);
|
|
3449
|
+
}
|
|
3450
|
+
);
|
|
3451
|
+
Yr.displayName = "Modal";
|
|
3452
|
+
const qr = g.forwardRef(
|
|
3453
|
+
({
|
|
3454
|
+
position: e = "right",
|
|
3455
|
+
anchor: t = "top",
|
|
3456
|
+
order: a = "new-on-top",
|
|
3457
|
+
children: s,
|
|
3458
|
+
label: c,
|
|
3459
|
+
...i
|
|
3460
|
+
}, o) => {
|
|
3461
|
+
let l = [];
|
|
3462
|
+
return e && l.push(e), t && l.push(t), a && l.push(a), g.Children.count(s) === 0 ? null : /* @__PURE__ */ r.jsx(
|
|
3463
|
+
A,
|
|
3464
|
+
{
|
|
3465
|
+
as: "section",
|
|
3466
|
+
"data-notifications-wrapper": !0,
|
|
3467
|
+
ref: o,
|
|
3468
|
+
classNames: l,
|
|
3469
|
+
"aria-label": c || "Notifications",
|
|
3470
|
+
"aria-relevant": "additions removals",
|
|
3471
|
+
role: "log",
|
|
3472
|
+
...i,
|
|
3473
|
+
children: s
|
|
3474
|
+
}
|
|
3475
|
+
);
|
|
3476
|
+
}
|
|
3477
|
+
);
|
|
3478
|
+
qr.displayName = "NotificationsWrapper";
|
|
3479
|
+
const Xr = g.forwardRef(
|
|
3480
|
+
({
|
|
3481
|
+
showWhen: e,
|
|
3482
|
+
closeWhen: t,
|
|
3483
|
+
kind: a = "info",
|
|
3484
|
+
children: s,
|
|
3485
|
+
isDismissible: c,
|
|
3486
|
+
secondsToShowFor: i,
|
|
3487
|
+
title: o,
|
|
3488
|
+
description: l,
|
|
3489
|
+
...u
|
|
3490
|
+
}, p) => {
|
|
3491
|
+
let d = [];
|
|
3492
|
+
const [m, x] = J(e);
|
|
3493
|
+
re(() => {
|
|
3494
|
+
e && x(!0);
|
|
3495
|
+
const R = e ? setTimeout(() => {
|
|
3496
|
+
t();
|
|
3497
|
+
}, (i ?? 8) * 1e3) : void 0;
|
|
3498
|
+
return () => {
|
|
3499
|
+
R && clearTimeout(R);
|
|
3500
|
+
};
|
|
3501
|
+
}, [e, i, t]), a && d.push(a), c && d.push("dismissible");
|
|
3502
|
+
const N = (R) => {
|
|
3503
|
+
R.preventDefault(), t();
|
|
3504
|
+
}, j = (R) => {
|
|
3505
|
+
(R.key === "Enter" || R.key === " ") && (R.preventDefault(), t());
|
|
3506
|
+
}, S = () => {
|
|
3507
|
+
e || x(!1);
|
|
3508
|
+
}, h = {
|
|
3509
|
+
info: "status",
|
|
3510
|
+
warning: "alert",
|
|
3511
|
+
error: "alert",
|
|
3512
|
+
success: "status"
|
|
3513
|
+
};
|
|
3514
|
+
return m && /* @__PURE__ */ r.jsxs(
|
|
3515
|
+
A,
|
|
3516
|
+
{
|
|
3517
|
+
as: "div",
|
|
3518
|
+
"data-notification-item": !0,
|
|
3519
|
+
ref: p,
|
|
3520
|
+
classNames: [...d, e ? "" : "dismissed"],
|
|
3521
|
+
onTransitionEnd: S,
|
|
3522
|
+
role: h[a],
|
|
3523
|
+
"aria-live": a === "error" || a === "warning" ? "assertive" : "polite",
|
|
3524
|
+
"aria-atomic": "true",
|
|
3525
|
+
"aria-label": o,
|
|
3526
|
+
...u,
|
|
3527
|
+
children: [
|
|
3528
|
+
/* @__PURE__ */ r.jsxs("div", { id: `notification-content-${u.id}`, children: [
|
|
3529
|
+
s,
|
|
3530
|
+
l && /* @__PURE__ */ r.jsx("span", { className: "sr-only", children: l })
|
|
3531
|
+
] }),
|
|
3532
|
+
c && /* @__PURE__ */ r.jsx(
|
|
3533
|
+
G,
|
|
3534
|
+
{
|
|
3535
|
+
className: "dismiss-button",
|
|
3536
|
+
onClick: N,
|
|
3537
|
+
onKeyDown: j,
|
|
3538
|
+
"aria-label": "Dismiss notification",
|
|
3539
|
+
tabIndex: 0,
|
|
3540
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "sr-only", children: "Close notification" })
|
|
3541
|
+
}
|
|
3542
|
+
)
|
|
3543
|
+
]
|
|
3544
|
+
}
|
|
3545
|
+
);
|
|
3546
|
+
}
|
|
3547
|
+
);
|
|
3548
|
+
Xr.displayName = "NotificationItem";
|
|
3549
|
+
const qt = g.forwardRef(
|
|
3550
|
+
({
|
|
3551
|
+
size: e = "medium",
|
|
3552
|
+
loadingText: t = "Loading...",
|
|
3553
|
+
...a
|
|
3554
|
+
}, s) => {
|
|
3555
|
+
let c = [];
|
|
3556
|
+
return e && c.push(`size-${e}`), /* @__PURE__ */ r.jsx(
|
|
3557
|
+
A,
|
|
3558
|
+
{
|
|
3559
|
+
as: "div",
|
|
3560
|
+
"data-spinner": !0,
|
|
3561
|
+
ref: s,
|
|
3562
|
+
classNames: c,
|
|
3563
|
+
role: "status",
|
|
3564
|
+
"aria-busy": "true",
|
|
3565
|
+
"aria-live": "polite",
|
|
3566
|
+
"aria-label": t,
|
|
3567
|
+
...a
|
|
3568
|
+
}
|
|
3569
|
+
);
|
|
3570
|
+
}
|
|
3571
|
+
);
|
|
3572
|
+
qt.displayName = "Spinner";
|
|
3573
|
+
const St = (e, t) => {
|
|
3574
|
+
const a = t - e + 1;
|
|
3575
|
+
return Array.from({ length: a }, (s, c) => e + c);
|
|
3576
|
+
}, Jr = ({
|
|
3577
|
+
totalItems: e,
|
|
3578
|
+
currentPage: t,
|
|
3579
|
+
itemsToShowEachSide: a
|
|
3580
|
+
}) => {
|
|
3581
|
+
const s = e;
|
|
3582
|
+
return {
|
|
3583
|
+
items: (() => {
|
|
3584
|
+
const i = a * 2 + 1;
|
|
3585
|
+
let o = [];
|
|
3586
|
+
if (s <= i)
|
|
3587
|
+
o = St(1, s);
|
|
3588
|
+
else {
|
|
3589
|
+
const l = Math.min(t - 1, a), u = Math.min(s - t, a);
|
|
3590
|
+
o.push(1), t - a > 2 && o.push("...");
|
|
3591
|
+
const p = Math.max(2, t - l), d = Math.min(s - 1, t + u);
|
|
3592
|
+
o.push(...St(p, d)), s - t > a + 1 && o.push("..."), d < s && o.push(s);
|
|
3593
|
+
}
|
|
3594
|
+
return o;
|
|
3595
|
+
})(),
|
|
3596
|
+
totalPages: s,
|
|
3597
|
+
rangeStart: t,
|
|
3598
|
+
rangeEnd: t,
|
|
3599
|
+
hasPrevPage: t > 1,
|
|
3600
|
+
hasNextPage: t < s
|
|
3601
|
+
};
|
|
3602
|
+
}, Zr = ({
|
|
3603
|
+
type: e,
|
|
3604
|
+
page: t,
|
|
3605
|
+
selected: a,
|
|
3606
|
+
disabled: s,
|
|
3607
|
+
onClick: c,
|
|
3608
|
+
key: i,
|
|
3609
|
+
...o
|
|
3610
|
+
}) => {
|
|
3611
|
+
if (e === "ellipsis")
|
|
3612
|
+
return /* @__PURE__ */ r.jsx(ae, { className: "pagination-ellipsis", children: "..." });
|
|
3613
|
+
const l = {
|
|
3614
|
+
type: "button",
|
|
3615
|
+
className: `pagination-item ${a ? "selected" : ""} ${s ? "disabled" : ""}`,
|
|
3616
|
+
onClick: c,
|
|
3617
|
+
disabled: s,
|
|
3618
|
+
...o
|
|
3619
|
+
};
|
|
3620
|
+
let u;
|
|
3621
|
+
switch (e) {
|
|
3622
|
+
case "first":
|
|
3623
|
+
u = u = /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", children: [
|
|
3624
|
+
/* @__PURE__ */ r.jsx("line", { x1: "5", y1: "18", x2: "5", y2: "6" }),
|
|
3625
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "14 18 9 12 14 6" }),
|
|
3626
|
+
/* @__PURE__ */ r.jsx("line", { x1: "10", y1: "12", x2: "19", y2: "12" })
|
|
3627
|
+
] });
|
|
3628
|
+
break;
|
|
3629
|
+
case "previous":
|
|
3630
|
+
u = /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", children: [
|
|
3631
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "12 18 7 12 12 6" }),
|
|
3632
|
+
/* @__PURE__ */ r.jsx("line", { x1: "8", y1: "12", x2: "17", y2: "12" })
|
|
3633
|
+
] });
|
|
3634
|
+
break;
|
|
3635
|
+
case "next":
|
|
3636
|
+
u = u = /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", children: [
|
|
3637
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "12 6 17 12 12 18" }),
|
|
3638
|
+
/* @__PURE__ */ r.jsx("line", { x1: "16", y1: "12", x2: "7", y2: "12" })
|
|
3639
|
+
] });
|
|
3640
|
+
break;
|
|
3641
|
+
case "last":
|
|
3642
|
+
u = u = /* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", children: [
|
|
3643
|
+
/* @__PURE__ */ r.jsx("polyline", { points: "10 6 15 12 10 18" }),
|
|
3644
|
+
/* @__PURE__ */ r.jsx("line", { x1: "19", y1: "6", x2: "19", y2: "18" }),
|
|
3645
|
+
/* @__PURE__ */ r.jsx("line", { x1: "14", y1: "12", x2: "5", y2: "12" })
|
|
3646
|
+
] });
|
|
3647
|
+
break;
|
|
3648
|
+
default:
|
|
3649
|
+
u = t;
|
|
3650
|
+
}
|
|
3651
|
+
return /* @__PURE__ */ r.jsx(
|
|
3652
|
+
pt,
|
|
3653
|
+
{
|
|
3654
|
+
kind: "custom",
|
|
3655
|
+
...l,
|
|
3656
|
+
children: u
|
|
3657
|
+
}
|
|
3658
|
+
);
|
|
3659
|
+
}, Qr = g.forwardRef(
|
|
3660
|
+
({
|
|
3661
|
+
totalItems: e,
|
|
3662
|
+
currentPage: t,
|
|
3663
|
+
onPageChange: a,
|
|
3664
|
+
itemsToShowEachSide: s = 1,
|
|
3665
|
+
kind: c = "plain",
|
|
3666
|
+
showGoToFirstItemButton: i = !0,
|
|
3667
|
+
showGoToLastItemButton: o = !0,
|
|
3668
|
+
showPreviousButton: l = !0,
|
|
3669
|
+
showNextButton: u = !0,
|
|
3670
|
+
showGoToInput: p = !1,
|
|
3671
|
+
disabled: d = !1,
|
|
3672
|
+
hideDisabledButtons: m = !1,
|
|
3673
|
+
renderItem: x = Zr,
|
|
3674
|
+
isLoading: N = !1,
|
|
3675
|
+
loadingText: j,
|
|
3676
|
+
emptyText: S,
|
|
3677
|
+
itemDisplayText: h = "page",
|
|
3678
|
+
...R
|
|
3679
|
+
}, y) => {
|
|
3680
|
+
const {
|
|
3681
|
+
items: F,
|
|
3682
|
+
totalPages: W,
|
|
3683
|
+
rangeStart: w,
|
|
3684
|
+
hasPrevPage: P,
|
|
3685
|
+
hasNextPage: $
|
|
3686
|
+
} = Jr({
|
|
3687
|
+
totalItems: e,
|
|
3688
|
+
currentPage: t,
|
|
3689
|
+
itemsToShowEachSide: s
|
|
3690
|
+
}), [O, _] = g.useState(""), T = (k) => {
|
|
3691
|
+
_(k.target.value);
|
|
3692
|
+
}, D = (k) => {
|
|
3693
|
+
if (k.key === "Enter") {
|
|
3694
|
+
const I = parseInt(O);
|
|
3695
|
+
!isNaN(I) && I >= 1 && I <= W && (a(I), _(""));
|
|
3696
|
+
}
|
|
3697
|
+
};
|
|
3698
|
+
if (e === 0)
|
|
3699
|
+
return /* @__PURE__ */ r.jsx(ae, { className: "pagination-empty", children: S || "No items to display" });
|
|
3700
|
+
let H = ["pagination"];
|
|
3701
|
+
return c && H.push(c), d && H.push("disabled"), N && H.push("loading"), /* @__PURE__ */ r.jsxs(
|
|
3702
|
+
A,
|
|
3703
|
+
{
|
|
3704
|
+
as: "nav",
|
|
3705
|
+
"data-pagination": !0,
|
|
3706
|
+
ref: y,
|
|
3707
|
+
classNames: H,
|
|
3708
|
+
role: "navigation",
|
|
3709
|
+
"aria-label": "pagination",
|
|
3710
|
+
...R,
|
|
3711
|
+
children: [
|
|
3712
|
+
/* @__PURE__ */ r.jsxs(G, { className: "pagination-controls", children: [
|
|
3713
|
+
i && (!m || P) && x({
|
|
3714
|
+
type: "first",
|
|
3715
|
+
disabled: !P || d,
|
|
3716
|
+
selected: !1,
|
|
3717
|
+
onClick: () => a(1)
|
|
3718
|
+
}),
|
|
3719
|
+
l && (!m || P) && x({
|
|
3720
|
+
type: "previous",
|
|
3721
|
+
disabled: !P || d,
|
|
3722
|
+
selected: !1,
|
|
3723
|
+
onClick: () => a(t - 1)
|
|
3724
|
+
}),
|
|
3725
|
+
F.map((k, I) => {
|
|
3726
|
+
const B = k === "..." ? {
|
|
3727
|
+
key: `ellipsis-${I}`,
|
|
3728
|
+
type: "ellipsis",
|
|
3729
|
+
selected: !1,
|
|
3730
|
+
disabled: !0
|
|
3731
|
+
} : {
|
|
3732
|
+
key: k.toString(),
|
|
3733
|
+
type: "page",
|
|
3734
|
+
page: k,
|
|
3735
|
+
selected: k === t,
|
|
3736
|
+
disabled: d,
|
|
3737
|
+
"aria-current": k === t ? "page" : void 0,
|
|
3738
|
+
onClick: () => a(k)
|
|
3739
|
+
};
|
|
3740
|
+
return x(B);
|
|
3741
|
+
}),
|
|
3742
|
+
u && (!m || $) && x({
|
|
3743
|
+
type: "next",
|
|
3744
|
+
disabled: !$ || d,
|
|
3745
|
+
selected: !1,
|
|
3746
|
+
onClick: () => a(t + 1)
|
|
3747
|
+
}),
|
|
3748
|
+
o && (!m || $) && x({
|
|
3749
|
+
type: "last",
|
|
3750
|
+
disabled: !$ || d,
|
|
3751
|
+
selected: !1,
|
|
3752
|
+
onClick: () => a(W)
|
|
3753
|
+
}),
|
|
3754
|
+
N && /* @__PURE__ */ r.jsxs(G, { className: "pagination-loading", children: [
|
|
3755
|
+
/* @__PURE__ */ r.jsx(qt, {}),
|
|
3756
|
+
j && /* @__PURE__ */ r.jsx(ae, { size: "small", children: j })
|
|
3757
|
+
] })
|
|
3758
|
+
] }),
|
|
3759
|
+
/* @__PURE__ */ r.jsxs(G, { className: "pagination-info", children: [
|
|
3760
|
+
/* @__PURE__ */ r.jsxs(ae, { size: "small", children: [
|
|
3761
|
+
"Showing ",
|
|
3762
|
+
h,
|
|
3763
|
+
" ",
|
|
3764
|
+
w,
|
|
3765
|
+
" of ",
|
|
3766
|
+
e
|
|
3767
|
+
] }),
|
|
3768
|
+
p && /* @__PURE__ */ r.jsx(G, { className: "pagination-go-to", children: /* @__PURE__ */ r.jsx(
|
|
3769
|
+
"input",
|
|
3770
|
+
{
|
|
3771
|
+
type: "number",
|
|
3772
|
+
min: 1,
|
|
3773
|
+
max: W,
|
|
3774
|
+
value: O,
|
|
3775
|
+
onChange: T,
|
|
3776
|
+
onKeyDown: D,
|
|
3777
|
+
placeholder: `Go to ${h}`,
|
|
3778
|
+
"aria-label": `Go to ${h}`,
|
|
3779
|
+
disabled: d
|
|
3780
|
+
}
|
|
3781
|
+
) })
|
|
3782
|
+
] })
|
|
3783
|
+
]
|
|
3784
|
+
}
|
|
3785
|
+
);
|
|
3786
|
+
}
|
|
3787
|
+
);
|
|
3788
|
+
Qr.displayName = "Pagination";
|
|
3789
|
+
const ea = g.forwardRef(
|
|
3790
|
+
({
|
|
3791
|
+
label: e,
|
|
3792
|
+
value: t,
|
|
3793
|
+
height: a,
|
|
3794
|
+
max: s = 100,
|
|
3795
|
+
shape: c,
|
|
3796
|
+
bgColor: i,
|
|
3797
|
+
bgColour: o,
|
|
3798
|
+
fillColor: l,
|
|
3799
|
+
fillColour: u,
|
|
3800
|
+
...p
|
|
3801
|
+
}, d) => {
|
|
3802
|
+
const m = Math.max(0, Math.min(s, Number(t) || 0)), x = `${m}${p.suffix || ""}`, N = o || i, j = u || l, S = {
|
|
3803
|
+
height: a,
|
|
3804
|
+
...N && { "--progress-bar-bg": `var(--${N})` },
|
|
3805
|
+
...j && { "--progress-bar-fill": `var(--${j})` }
|
|
3806
|
+
};
|
|
3807
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3808
|
+
e && /* @__PURE__ */ r.jsxs(
|
|
3809
|
+
A,
|
|
3810
|
+
{
|
|
3811
|
+
as: "div",
|
|
3812
|
+
"data-progress-bar-meta": !0,
|
|
3813
|
+
"aria-hidden": "true",
|
|
3814
|
+
children: [
|
|
3815
|
+
/* @__PURE__ */ r.jsx(ae, { children: e }),
|
|
3816
|
+
/* @__PURE__ */ r.jsx(ae, { children: x })
|
|
3817
|
+
]
|
|
3818
|
+
}
|
|
3819
|
+
),
|
|
3820
|
+
/* @__PURE__ */ r.jsx(
|
|
3821
|
+
A,
|
|
3822
|
+
{
|
|
3823
|
+
as: "progress",
|
|
3824
|
+
"data-progress-bar": !0,
|
|
3825
|
+
ref: d,
|
|
3826
|
+
value: m,
|
|
3827
|
+
max: s,
|
|
3828
|
+
"aria-label": e,
|
|
3829
|
+
"aria-valuemin": 0,
|
|
3830
|
+
"aria-valuemax": s,
|
|
3831
|
+
"aria-valuenow": m,
|
|
3832
|
+
"aria-valuetext": `${e ? `${e}: ` : ""}${x}`,
|
|
3833
|
+
shape: c,
|
|
3834
|
+
...p,
|
|
3835
|
+
style: S
|
|
3836
|
+
}
|
|
3837
|
+
)
|
|
3838
|
+
] });
|
|
3839
|
+
}
|
|
3840
|
+
);
|
|
3841
|
+
ea.displayName = "ProgressBar";
|
|
3842
|
+
const st = It({
|
|
3843
|
+
isSelected: () => !1,
|
|
3844
|
+
toggleSelection: () => {
|
|
3845
|
+
},
|
|
3846
|
+
showTickIcon: !1,
|
|
3847
|
+
tickPosition: "top-right",
|
|
3848
|
+
selectAllOptions: () => {
|
|
3849
|
+
},
|
|
3850
|
+
clearAllOptions: () => {
|
|
3851
|
+
},
|
|
3852
|
+
setSelectedOptions: () => {
|
|
3853
|
+
},
|
|
3854
|
+
setSelectedIds: () => {
|
|
3855
|
+
},
|
|
3856
|
+
registerOption: () => {
|
|
3857
|
+
},
|
|
3858
|
+
unregisterOption: () => {
|
|
3859
|
+
}
|
|
3860
|
+
}), ta = g.forwardRef(
|
|
3861
|
+
({
|
|
3862
|
+
children: e,
|
|
3863
|
+
allowMultipleSelections: t = !1,
|
|
3864
|
+
showTickIcon: a,
|
|
3865
|
+
onSelectionChange: s,
|
|
3866
|
+
tickPosition: c = "top-right",
|
|
3867
|
+
selectionLimit: i,
|
|
3868
|
+
defaultSelectedIds: o,
|
|
3869
|
+
...l
|
|
3870
|
+
}, u) => {
|
|
3871
|
+
const [p, d] = J(
|
|
3872
|
+
o ? new Set(o) : /* @__PURE__ */ new Set()
|
|
3873
|
+
), m = oe(/* @__PURE__ */ new Map());
|
|
3874
|
+
re(() => {
|
|
3875
|
+
o && o.size > 0 && (d(new Set(o)), s == null || s(new Set(o)));
|
|
3876
|
+
}, [o, s]);
|
|
3877
|
+
const x = U((w, P) => {
|
|
3878
|
+
m.current.set(w, P);
|
|
3879
|
+
}, []), N = U((w) => {
|
|
3880
|
+
m.current.delete(w);
|
|
3881
|
+
}, []), j = U((w) => {
|
|
3882
|
+
d((P) => {
|
|
3883
|
+
const $ = new Set(P);
|
|
3884
|
+
if (t)
|
|
3885
|
+
if ($.has(w))
|
|
3886
|
+
$.delete(w);
|
|
3887
|
+
else {
|
|
3888
|
+
if (i && $.size >= i)
|
|
3889
|
+
return P;
|
|
3890
|
+
$.add(w);
|
|
3891
|
+
}
|
|
3892
|
+
else
|
|
3893
|
+
$.has(w) && P.size === 1 ? $.clear() : ($.clear(), $.add(w));
|
|
3894
|
+
return s == null || s($), $;
|
|
3895
|
+
});
|
|
3896
|
+
}, [t, s, i]), S = U(() => {
|
|
3897
|
+
t && d((w) => {
|
|
3898
|
+
const P = new Set(w), $ = Array.from(m.current.entries()).filter(([_, T]) => !T).map(([_]) => _);
|
|
3899
|
+
return (i ? $.slice(0, i) : $).forEach((_) => P.add(_)), s == null || s(P), P;
|
|
3900
|
+
});
|
|
3901
|
+
}, [t, i, s]), h = U(() => {
|
|
3902
|
+
d(/* @__PURE__ */ new Set()), s == null || s(/* @__PURE__ */ new Set());
|
|
3903
|
+
}, [s]), R = U((w) => {
|
|
3904
|
+
w && (console.log("Setting selected options:", w), d(() => {
|
|
3905
|
+
const P = new Set(w);
|
|
3906
|
+
return s == null || s(P), P;
|
|
3907
|
+
}));
|
|
3908
|
+
}, [s]), y = U((w) => {
|
|
3909
|
+
w && (console.log("Setting selected ids:", Array.from(w)), d(() => {
|
|
3910
|
+
const P = new Set(w);
|
|
3911
|
+
return s == null || s(P), P;
|
|
3912
|
+
}));
|
|
3913
|
+
}, [s]), F = U((w) => p.has(w), [p]);
|
|
3914
|
+
g.useImperativeHandle(u, () => ({
|
|
3915
|
+
selectAllOptions: S,
|
|
3916
|
+
clearAllOptions: h,
|
|
3917
|
+
setSelectedOptions: R,
|
|
3918
|
+
setSelectedIds: y
|
|
3919
|
+
}), [S, h, R, y]);
|
|
3920
|
+
const W = {
|
|
3921
|
+
isSelected: F,
|
|
3922
|
+
toggleSelection: j,
|
|
3923
|
+
showTickIcon: a,
|
|
3924
|
+
tickPosition: c,
|
|
3925
|
+
selectAllOptions: S,
|
|
3926
|
+
clearAllOptions: h,
|
|
3927
|
+
setSelectedOptions: R,
|
|
3928
|
+
setSelectedIds: y,
|
|
3929
|
+
registerOption: x,
|
|
3930
|
+
unregisterOption: N
|
|
3931
|
+
};
|
|
3932
|
+
return /* @__PURE__ */ r.jsx(st.Provider, { value: W, children: /* @__PURE__ */ r.jsx(G, { "data-option-cards-group": !0, className: `tick-${c}`, children: e }) });
|
|
3933
|
+
}
|
|
3934
|
+
);
|
|
3935
|
+
ta.displayName = "OptionCardsGroup";
|
|
3936
|
+
const Ba = (e) => {
|
|
3937
|
+
const t = rt(st);
|
|
3938
|
+
return {
|
|
3939
|
+
isSelected: t.isSelected(e),
|
|
3940
|
+
toggleSelection: () => t.toggleSelection(e),
|
|
3941
|
+
showTickIcon: t.showTickIcon
|
|
3942
|
+
};
|
|
3943
|
+
}, Ca = () => {
|
|
3944
|
+
const {
|
|
3945
|
+
selectAllOptions: e,
|
|
3946
|
+
clearAllOptions: t,
|
|
3947
|
+
setSelectedOptions: a,
|
|
3948
|
+
setSelectedIds: s
|
|
3949
|
+
} = rt(st);
|
|
3950
|
+
return {
|
|
3951
|
+
selectAllOptions: e,
|
|
3952
|
+
clearAllOptions: t,
|
|
3953
|
+
setSelectedOptions: a,
|
|
3954
|
+
setSelectedIds: s
|
|
3955
|
+
};
|
|
3956
|
+
}, Wa = ({ id: e, children: t, disabled: a = !1, ...s }) => {
|
|
3957
|
+
const { isSelected: c, toggleSelection: i, showTickIcon: o, registerOption: l, unregisterOption: u } = rt(st), [p, d] = J(!1), [m, x] = J(!0);
|
|
3958
|
+
g.useEffect(() => (l(e, a), () => u(e)), [e, a, l, u]);
|
|
3959
|
+
let N = [];
|
|
3960
|
+
c(e) && N.push("selected"), a && N.push("disabled"), p && N.push("show-deselect");
|
|
3961
|
+
const j = () => {
|
|
3962
|
+
c(e) && !m && d(!0);
|
|
3963
|
+
}, S = () => {
|
|
3964
|
+
d(!1), x(!1);
|
|
3965
|
+
}, h = (y) => {
|
|
3966
|
+
var F;
|
|
3967
|
+
a || (x(!0), d(!1), i(e), (F = s.onClick) == null || F.call(s, y));
|
|
3968
|
+
}, R = (y) => {
|
|
3969
|
+
(y.key === "Enter" || y.key === " ") && !a && (y.preventDefault(), x(!0), d(!1), i(e));
|
|
3970
|
+
};
|
|
3971
|
+
return /* @__PURE__ */ r.jsxs(
|
|
3972
|
+
A,
|
|
3973
|
+
{
|
|
3974
|
+
as: Ft,
|
|
3975
|
+
"data-option-card": !0,
|
|
3976
|
+
role: "button",
|
|
3977
|
+
tabIndex: a ? -1 : 0,
|
|
3978
|
+
"aria-disabled": a,
|
|
3979
|
+
"aria-selected": c(e),
|
|
3980
|
+
classNames: N,
|
|
3981
|
+
onClick: h,
|
|
3982
|
+
onKeyDown: R,
|
|
3983
|
+
onMouseEnter: j,
|
|
3984
|
+
onMouseLeave: S,
|
|
3985
|
+
...s,
|
|
3986
|
+
children: [
|
|
3987
|
+
o && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3988
|
+
/* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", className: "tick-icon", children: [
|
|
3989
|
+
/* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "11" }),
|
|
3990
|
+
/* @__PURE__ */ r.jsx("path", { d: "M8 13 L11 15 L16 9" })
|
|
3991
|
+
] }),
|
|
3992
|
+
/* @__PURE__ */ r.jsxs("svg", { viewBox: "0 0 24 24", className: "deselect-icon", children: [
|
|
3993
|
+
/* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "11" }),
|
|
3994
|
+
/* @__PURE__ */ r.jsx("path", { d: "M8 8 L16 16 M16 8 L8 16" })
|
|
3995
|
+
] })
|
|
3996
|
+
] }),
|
|
3997
|
+
t
|
|
3998
|
+
]
|
|
3999
|
+
}
|
|
4000
|
+
);
|
|
4001
|
+
}, ra = g.forwardRef(
|
|
4002
|
+
({
|
|
4003
|
+
collapsed: e,
|
|
4004
|
+
closeOnClickOutside: t,
|
|
4005
|
+
showMobileSidebar: a,
|
|
4006
|
+
...s
|
|
4007
|
+
}, c) => {
|
|
4008
|
+
const i = oe(null);
|
|
4009
|
+
At(c, () => i.current), ft(i, () => {
|
|
4010
|
+
typeof t == "function" && t();
|
|
4011
|
+
});
|
|
4012
|
+
let o = [];
|
|
4013
|
+
return e && o.push("collapsed"), a && o.push("show-sidebar"), /* @__PURE__ */ r.jsx(
|
|
4014
|
+
A,
|
|
4015
|
+
{
|
|
4016
|
+
as: "aside",
|
|
4017
|
+
"data-sidebar-wrapper": !0,
|
|
4018
|
+
ref: i,
|
|
4019
|
+
classNames: o,
|
|
4020
|
+
...s
|
|
4021
|
+
}
|
|
4022
|
+
);
|
|
4023
|
+
}
|
|
4024
|
+
);
|
|
4025
|
+
ra.displayName = "SidebarWrapper";
|
|
4026
|
+
const aa = g.forwardRef(
|
|
4027
|
+
({ label: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
4028
|
+
A,
|
|
4029
|
+
{
|
|
4030
|
+
as: "main",
|
|
4031
|
+
"data-content-wrapper": !0,
|
|
4032
|
+
ref: a,
|
|
4033
|
+
role: "main",
|
|
4034
|
+
"aria-label": e || "Main content",
|
|
4035
|
+
...t
|
|
4036
|
+
}
|
|
4037
|
+
)
|
|
4038
|
+
);
|
|
4039
|
+
aa.displayName = "ContentWrapper";
|
|
4040
|
+
const sa = g.forwardRef(
|
|
4041
|
+
({ isSticky: e, ...t }, a) => {
|
|
4042
|
+
let s = [];
|
|
4043
|
+
return e && s.push("is-sticky"), /* @__PURE__ */ r.jsx(
|
|
4044
|
+
A,
|
|
4045
|
+
{
|
|
4046
|
+
as: "header",
|
|
4047
|
+
"data-sidebar-header": !0,
|
|
4048
|
+
ref: a,
|
|
4049
|
+
classNames: s,
|
|
4050
|
+
...t
|
|
4051
|
+
}
|
|
4052
|
+
);
|
|
4053
|
+
}
|
|
4054
|
+
);
|
|
4055
|
+
sa.displayName = "SidebarHeader";
|
|
4056
|
+
const na = g.forwardRef(
|
|
4057
|
+
({ hasAlert: e, hasEmptyIcon: t, hasNoIcon: a, children: s, ...c }, i) => {
|
|
4058
|
+
let o = [];
|
|
4059
|
+
return e && o.push("has-alert"), t ? o.push("has-empty-icon") : a && o.push("has-no-icon"), /* @__PURE__ */ r.jsxs(
|
|
4060
|
+
A,
|
|
4061
|
+
{
|
|
4062
|
+
as: "div",
|
|
4063
|
+
"data-sidebar-item": !0,
|
|
4064
|
+
ref: i,
|
|
4065
|
+
classNames: o,
|
|
4066
|
+
...c,
|
|
4067
|
+
children: [
|
|
4068
|
+
t && /* @__PURE__ */ r.jsx(G, { className: "empty-icon-wrapper" }),
|
|
4069
|
+
s
|
|
4070
|
+
]
|
|
4071
|
+
}
|
|
4072
|
+
);
|
|
4073
|
+
}
|
|
4074
|
+
);
|
|
4075
|
+
na.displayName = "SidebarItem";
|
|
4076
|
+
const oa = g.forwardRef(
|
|
4077
|
+
({ isSticky: e, ...t }, a) => {
|
|
4078
|
+
let s = [];
|
|
4079
|
+
return e && s.push("is-sticky"), /* @__PURE__ */ r.jsx(
|
|
4080
|
+
A,
|
|
4081
|
+
{
|
|
4082
|
+
as: "footer",
|
|
4083
|
+
"data-sidebar-footer": !0,
|
|
4084
|
+
ref: a,
|
|
4085
|
+
classNames: s,
|
|
4086
|
+
...t
|
|
4087
|
+
}
|
|
4088
|
+
);
|
|
4089
|
+
}
|
|
4090
|
+
);
|
|
4091
|
+
oa.displayName = "SidebarFooter";
|
|
4092
|
+
const Xt = It({
|
|
4093
|
+
effect: "wave",
|
|
4094
|
+
animate: !0
|
|
4095
|
+
}), ia = g.forwardRef(({
|
|
4096
|
+
variant: e = "line",
|
|
4097
|
+
width: t,
|
|
4098
|
+
height: a,
|
|
4099
|
+
shape: s,
|
|
4100
|
+
effect: c,
|
|
4101
|
+
loadingLabel: i,
|
|
4102
|
+
...o
|
|
4103
|
+
}, l) => {
|
|
4104
|
+
const u = rt(Xt), p = c || u.effect, d = i || u.loadingLabel || "Loading...";
|
|
4105
|
+
let m = [];
|
|
4106
|
+
e && m.push(`variant-${e}`), s && m.push(`shape-${s}`), p && m.push(`effect-${p}`);
|
|
4107
|
+
const x = t || "100%", N = e === "circle" ? (typeof t == "number" ? `${t}px` : t) || a || "100%" : a, j = {
|
|
4108
|
+
width: x,
|
|
4109
|
+
height: N,
|
|
4110
|
+
aspectRatio: e === "circle" ? "1 / 1" : "auto",
|
|
4111
|
+
...o.style
|
|
4112
|
+
};
|
|
4113
|
+
return /* @__PURE__ */ r.jsx(
|
|
4114
|
+
A,
|
|
4115
|
+
{
|
|
4116
|
+
as: "div",
|
|
4117
|
+
"data-skeleton": !0,
|
|
4118
|
+
ref: l,
|
|
4119
|
+
classNames: m,
|
|
4120
|
+
style: j,
|
|
4121
|
+
role: "progressbar",
|
|
4122
|
+
"aria-busy": "true",
|
|
4123
|
+
"aria-valuemin": 0,
|
|
4124
|
+
"aria-valuemax": 100,
|
|
4125
|
+
"aria-valuetext": d,
|
|
4126
|
+
"aria-label": d,
|
|
4127
|
+
...o
|
|
4128
|
+
}
|
|
4129
|
+
);
|
|
4130
|
+
});
|
|
4131
|
+
ia.displayName = "Skeleton";
|
|
4132
|
+
const la = g.forwardRef(({
|
|
4133
|
+
effect: e = "wave",
|
|
4134
|
+
spacing: t = "small",
|
|
4135
|
+
animate: a = !0,
|
|
4136
|
+
repeat: s = 1,
|
|
4137
|
+
direction: c = "vertical",
|
|
4138
|
+
children: i,
|
|
4139
|
+
classNames: o = [],
|
|
4140
|
+
loadingLabel: l = "Loading content...",
|
|
4141
|
+
...u
|
|
4142
|
+
}, p) => {
|
|
4143
|
+
const d = [
|
|
4144
|
+
`direction-${c}`,
|
|
4145
|
+
e && `effect-${e}`,
|
|
4146
|
+
...o
|
|
4147
|
+
];
|
|
4148
|
+
return t && d.push(`spacing-${t}`), /* @__PURE__ */ r.jsx(Xt.Provider, { value: { effect: e, animate: a, loadingLabel: l }, children: /* @__PURE__ */ r.jsx(
|
|
4149
|
+
A,
|
|
4150
|
+
{
|
|
4151
|
+
as: "div",
|
|
4152
|
+
ref: p,
|
|
4153
|
+
"data-skeleton-group": !0,
|
|
4154
|
+
classNames: d,
|
|
4155
|
+
role: "alert",
|
|
4156
|
+
"aria-busy": "true",
|
|
4157
|
+
"aria-label": l,
|
|
4158
|
+
...u,
|
|
4159
|
+
children: Array(s).fill(i).map((m, x) => g.cloneElement(m, {
|
|
4160
|
+
key: x
|
|
4161
|
+
}))
|
|
4162
|
+
}
|
|
4163
|
+
) });
|
|
4164
|
+
});
|
|
4165
|
+
la.displayName = "SkeletonGroup";
|
|
4166
|
+
const ca = g.forwardRef(
|
|
4167
|
+
({
|
|
4168
|
+
bordersFor: e,
|
|
4169
|
+
isStriped: t,
|
|
4170
|
+
highlightRowOnHover: a,
|
|
4171
|
+
isFullWidth: s,
|
|
4172
|
+
alignText: c,
|
|
4173
|
+
caption: i,
|
|
4174
|
+
summary: o,
|
|
4175
|
+
hasColSpan: l,
|
|
4176
|
+
children: u,
|
|
4177
|
+
...p
|
|
4178
|
+
}, d) => {
|
|
4179
|
+
let m = [];
|
|
4180
|
+
e && m.push(`bordered-${e}`), t && m.push("striped"), a && m.push("hoverable"), s && m.push("full-width"), c && m.push(`align-text-${c}`);
|
|
4181
|
+
const x = g.Children.count(u), N = () => {
|
|
4182
|
+
if (!u || !g.isValidElement(u)) return;
|
|
4183
|
+
const j = g.Children.toArray(u)[0];
|
|
4184
|
+
if (g.isValidElement(j) && j.props.children)
|
|
4185
|
+
return g.Children.count(j.props.children);
|
|
4186
|
+
};
|
|
4187
|
+
return /* @__PURE__ */ r.jsxs(
|
|
4188
|
+
A,
|
|
4189
|
+
{
|
|
4190
|
+
as: "table",
|
|
4191
|
+
classNames: m,
|
|
4192
|
+
ref: d,
|
|
4193
|
+
role: "table",
|
|
4194
|
+
"aria-rowcount": x || void 0,
|
|
4195
|
+
"aria-colcount": l ? void 0 : N(),
|
|
4196
|
+
summary: o,
|
|
4197
|
+
...p,
|
|
4198
|
+
children: [
|
|
4199
|
+
i && /* @__PURE__ */ r.jsx("caption", { children: i }),
|
|
4200
|
+
u
|
|
4201
|
+
]
|
|
4202
|
+
}
|
|
4203
|
+
);
|
|
4204
|
+
}
|
|
4205
|
+
);
|
|
4206
|
+
ca.displayName = "Table";
|
|
4207
|
+
const ua = g.forwardRef(
|
|
4208
|
+
({ tabs: e, additionalNavContentWrapper: t, defaultActiveTab: a, align: s = "left", isFullWidth: c, ...i }, o) => {
|
|
4209
|
+
const l = e.findIndex((h) => h.key === a), u = l > -1 ? l : 0, [p, d] = g.useState(
|
|
4210
|
+
e.length > 0 ? e[u] : void 0
|
|
4211
|
+
), [m, x] = g.useState(!1), N = oe([]), j = U((h) => {
|
|
4212
|
+
(p == null ? void 0 : p.key) !== h.key && (x(!0), setTimeout(() => {
|
|
4213
|
+
d(h), x(!1);
|
|
4214
|
+
}, 150));
|
|
4215
|
+
}, [p == null ? void 0 : p.key]);
|
|
4216
|
+
re(() => {
|
|
4217
|
+
e.length > 0 ? e.find((R) => R.key === (p == null ? void 0 : p.key)) || d(e[u]) : d(void 0);
|
|
4218
|
+
}, [e, u, p == null ? void 0 : p.key]);
|
|
4219
|
+
const S = U((h, R) => {
|
|
4220
|
+
var W;
|
|
4221
|
+
let y = R;
|
|
4222
|
+
if (h.key === "ArrowRight")
|
|
4223
|
+
y = (R + 1) % e.length;
|
|
4224
|
+
else if (h.key === "ArrowLeft")
|
|
4225
|
+
y = (R - 1 + e.length) % e.length;
|
|
4226
|
+
else if (h.key === "Home")
|
|
4227
|
+
y = 0;
|
|
4228
|
+
else if (h.key === "End")
|
|
4229
|
+
y = e.length - 1;
|
|
4230
|
+
else
|
|
4231
|
+
return;
|
|
4232
|
+
h.preventDefault();
|
|
4233
|
+
const F = e[y];
|
|
4234
|
+
F && (j(F), (W = N.current[y]) == null || W.focus());
|
|
4235
|
+
}, [e, j]);
|
|
4236
|
+
return p ? /* @__PURE__ */ r.jsxs(
|
|
4237
|
+
A,
|
|
4238
|
+
{
|
|
4239
|
+
as: "div",
|
|
4240
|
+
"data-tabs": !0,
|
|
4241
|
+
ref: o,
|
|
4242
|
+
"data-align": s,
|
|
4243
|
+
"data-full-width": c,
|
|
4244
|
+
...i,
|
|
4245
|
+
children: [
|
|
4246
|
+
/* @__PURE__ */ r.jsx(Rr, { "data-tabs-nav": !0, role: "tablist", "aria-label": "Tab Navigation", children: /* @__PURE__ */ r.jsxs("ul", { className: "tab-labels-list", children: [
|
|
4247
|
+
e.map((h, R) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
4248
|
+
A,
|
|
4249
|
+
{
|
|
4250
|
+
as: "button",
|
|
4251
|
+
ref: (y) => N.current[R] = y,
|
|
4252
|
+
id: `tab-${h.key}`,
|
|
4253
|
+
role: "tab",
|
|
4254
|
+
"aria-selected": p.key === h.key,
|
|
4255
|
+
"aria-controls": `tab-panel-${h.key}`,
|
|
4256
|
+
tabIndex: p.key === h.key ? 0 : -1,
|
|
4257
|
+
"data-tab-label": !0,
|
|
4258
|
+
"data-active": p.key === h.key,
|
|
4259
|
+
"data-alert": h.hasAlert,
|
|
4260
|
+
onClick: () => j(h),
|
|
4261
|
+
onKeyDown: (y) => S(y, R),
|
|
4262
|
+
className: `tab-button ${p.key === h.key ? "is-active" : ""}`,
|
|
4263
|
+
marginBottom: "nano",
|
|
4264
|
+
children: /* @__PURE__ */ r.jsx(
|
|
4265
|
+
ae,
|
|
4266
|
+
{
|
|
4267
|
+
className: `tab-label ${p.key === h.key ? "is-active" : ""} ${h.hasAlert ? "has-alert" : ""}`,
|
|
4268
|
+
children: h.label
|
|
4269
|
+
}
|
|
4270
|
+
)
|
|
4271
|
+
}
|
|
4272
|
+
) }, h.key)),
|
|
4273
|
+
t
|
|
4274
|
+
] }) }),
|
|
4275
|
+
/* @__PURE__ */ r.jsx(Vt, { kind: "tertiary", marginTop: "none", marginBottom: "micro" }),
|
|
4276
|
+
/* @__PURE__ */ r.jsx(
|
|
4277
|
+
G,
|
|
4278
|
+
{
|
|
4279
|
+
id: `tab-panel-${p.key}`,
|
|
4280
|
+
role: "tabpanel",
|
|
4281
|
+
"aria-labelledby": `tab-${p.key}`,
|
|
4282
|
+
tabIndex: 0,
|
|
4283
|
+
"data-tab-content": !0,
|
|
4284
|
+
"data-exiting": m,
|
|
4285
|
+
children: p.content
|
|
4286
|
+
},
|
|
4287
|
+
p.key
|
|
4288
|
+
)
|
|
4289
|
+
]
|
|
4290
|
+
}
|
|
4291
|
+
) : null;
|
|
4292
|
+
}
|
|
4293
|
+
);
|
|
4294
|
+
ua.displayName = "Tabs";
|
|
4295
|
+
const Qe = () => {
|
|
4296
|
+
if (typeof window < "u") {
|
|
4297
|
+
const e = window.location.hostname, t = window.location.port;
|
|
4298
|
+
let a = e.replace(/\./g, "-");
|
|
4299
|
+
return t && (a += `-${t}`), `${a}-theme`;
|
|
4300
|
+
}
|
|
4301
|
+
return "fictoan-theme";
|
|
4302
|
+
}, da = ["", (e) => {
|
|
4303
|
+
}], Jt = g.createContext(void 0), za = () => {
|
|
4304
|
+
const e = g.useContext(Jt);
|
|
4305
|
+
return e === void 0 ? da : e;
|
|
4306
|
+
}, Pt = (e, t) => {
|
|
4307
|
+
let a;
|
|
4308
|
+
try {
|
|
4309
|
+
a = localStorage.getItem(e) || void 0;
|
|
4310
|
+
} catch {
|
|
4311
|
+
}
|
|
4312
|
+
return a || t;
|
|
4313
|
+
}, fa = g.forwardRef(
|
|
4314
|
+
({ currentTheme: e, themeList: t, children: a, ...s }, c) => {
|
|
4315
|
+
const [i, o] = J(!1), [l, u] = J(() => Pt(Qe()) || e), p = U(
|
|
4316
|
+
(d) => {
|
|
4317
|
+
const m = typeof d == "function" ? d(l) : d;
|
|
4318
|
+
if (!t.includes(m)) {
|
|
4319
|
+
const x = t[0];
|
|
4320
|
+
u(x), document.documentElement.className = "", document.documentElement.classList.add(x);
|
|
4321
|
+
try {
|
|
4322
|
+
localStorage.setItem(Qe(), x);
|
|
4323
|
+
} catch {
|
|
4324
|
+
}
|
|
4325
|
+
return;
|
|
4326
|
+
}
|
|
4327
|
+
u(m), document.documentElement.className = "", document.documentElement.classList.add(m), i || o(!0);
|
|
4328
|
+
try {
|
|
4329
|
+
localStorage.setItem(Qe(), m);
|
|
4330
|
+
} catch {
|
|
4331
|
+
}
|
|
4332
|
+
},
|
|
4333
|
+
[l, t]
|
|
4334
|
+
);
|
|
4335
|
+
return re(() => {
|
|
4336
|
+
const d = Pt(Qe());
|
|
4337
|
+
p(d || e);
|
|
4338
|
+
}, [e, p]), /* @__PURE__ */ r.jsx(Jt.Provider, { value: [l, p], children: /* @__PURE__ */ r.jsx(A, { as: "div", "data-theme-provider": !0, ref: c, ...s, children: i && a }) });
|
|
4339
|
+
}
|
|
4340
|
+
);
|
|
4341
|
+
fa.displayName = "ThemeProvider";
|
|
4342
|
+
const pa = g.forwardRef(
|
|
4343
|
+
({ position: e, ...t }, a) => {
|
|
4344
|
+
let s = [];
|
|
4345
|
+
return e && s.push(e), /* @__PURE__ */ r.jsx(
|
|
4346
|
+
A,
|
|
4347
|
+
{
|
|
4348
|
+
as: "div",
|
|
4349
|
+
"data-toasts-wrapper": !0,
|
|
4350
|
+
ref: a,
|
|
4351
|
+
classNames: s,
|
|
4352
|
+
...t
|
|
4353
|
+
}
|
|
4354
|
+
);
|
|
4355
|
+
}
|
|
4356
|
+
);
|
|
4357
|
+
pa.displayName = "ToastsWrapper";
|
|
4358
|
+
const ma = g.forwardRef(
|
|
4359
|
+
({ showWhen: e, children: t, secondsToShowFor: a, closeWhen: s, ...c }, i) => {
|
|
4360
|
+
let o = [];
|
|
4361
|
+
const [l, u] = J(e ?? !1);
|
|
4362
|
+
re(() => {
|
|
4363
|
+
e && u(!0);
|
|
4364
|
+
const d = e ? setTimeout(() => {
|
|
4365
|
+
s == null || s();
|
|
4366
|
+
}, (a ?? 4) * 1e3) : void 0;
|
|
4367
|
+
return () => {
|
|
4368
|
+
d && clearTimeout(d);
|
|
4369
|
+
};
|
|
4370
|
+
}, [e, a, s]);
|
|
4371
|
+
const p = () => {
|
|
4372
|
+
e || u(!1);
|
|
4373
|
+
};
|
|
4374
|
+
return l && /* @__PURE__ */ r.jsx(
|
|
4375
|
+
A,
|
|
4376
|
+
{
|
|
4377
|
+
as: "div",
|
|
4378
|
+
"data-toast-item": !0,
|
|
4379
|
+
role: "status",
|
|
4380
|
+
"aria-live": "polite",
|
|
4381
|
+
"aria-atomic": "true",
|
|
4382
|
+
classNames: [...o, e ? "visible" : ""],
|
|
4383
|
+
onTransitionEnd: p,
|
|
4384
|
+
shadow: "soft",
|
|
4385
|
+
...c,
|
|
4386
|
+
children: t
|
|
4387
|
+
}
|
|
4388
|
+
);
|
|
4389
|
+
}
|
|
4390
|
+
);
|
|
4391
|
+
ma.displayName = "ToastItem";
|
|
4392
|
+
var Le = {}, Mt;
|
|
4393
|
+
function ha() {
|
|
4394
|
+
if (Mt) return Le;
|
|
4395
|
+
Mt = 1;
|
|
4396
|
+
var e = yr;
|
|
4397
|
+
if (process.env.NODE_ENV === "production")
|
|
4398
|
+
Le.createRoot = e.createRoot, Le.hydrateRoot = e.hydrateRoot;
|
|
4399
|
+
else {
|
|
4400
|
+
var t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
4401
|
+
Le.createRoot = function(a, s) {
|
|
4402
|
+
t.usingClientEntryPoint = !0;
|
|
4403
|
+
try {
|
|
4404
|
+
return e.createRoot(a, s);
|
|
4405
|
+
} finally {
|
|
4406
|
+
t.usingClientEntryPoint = !1;
|
|
4407
|
+
}
|
|
4408
|
+
}, Le.hydrateRoot = function(a, s, c) {
|
|
4409
|
+
t.usingClientEntryPoint = !0;
|
|
4410
|
+
try {
|
|
4411
|
+
return e.hydrateRoot(a, s, c);
|
|
4412
|
+
} finally {
|
|
4413
|
+
t.usingClientEntryPoint = !1;
|
|
4414
|
+
}
|
|
4415
|
+
};
|
|
4416
|
+
}
|
|
4417
|
+
return Le;
|
|
4418
|
+
}
|
|
4419
|
+
var va = ha();
|
|
4420
|
+
const je = 8, xe = 16;
|
|
4421
|
+
let ge = null, Ee = null, Ot = !1, ye = null, $e = null;
|
|
4422
|
+
const Re = /* @__PURE__ */ new Map(), xa = (e, t, a) => {
|
|
4423
|
+
const s = e.getBoundingClientRect(), c = t.getBoundingClientRect(), i = window.innerHeight, o = window.innerWidth;
|
|
4424
|
+
let l, u;
|
|
4425
|
+
switch (a) {
|
|
4426
|
+
case "top":
|
|
4427
|
+
l = c.top - s.height - je, u = c.left + (c.width - s.width) / 2, l < xe && (l = c.bottom + je);
|
|
4428
|
+
break;
|
|
4429
|
+
case "bottom":
|
|
4430
|
+
l = c.bottom + je, u = c.left + (c.width - s.width) / 2, l + s.height > i - xe && (l = c.top - s.height - je);
|
|
4431
|
+
break;
|
|
4432
|
+
case "left":
|
|
4433
|
+
l = c.top + (c.height - s.height) / 2, u = c.left - s.width - je, u < xe && (u = c.right + je);
|
|
4434
|
+
break;
|
|
4435
|
+
case "right":
|
|
4436
|
+
l = c.top + (c.height - s.height) / 2, u = c.right + je, u + s.width > o - xe && (u = c.left - s.width - je);
|
|
4437
|
+
break;
|
|
4438
|
+
default:
|
|
4439
|
+
l = c.top - s.height - je, u = c.left + (c.width - s.width) / 2;
|
|
4440
|
+
}
|
|
4441
|
+
return u < xe ? u = xe : u + s.width > o - xe && (u = o - s.width - xe), l < xe ? l = xe : l + s.height > i - xe && (l = i - s.height - xe), { top: l, left: u };
|
|
4442
|
+
}, et = ({ content: e, isVisible: t, position: a }) => /* @__PURE__ */ r.jsx(
|
|
4443
|
+
"div",
|
|
4444
|
+
{
|
|
4445
|
+
"data-tooltip": !0,
|
|
4446
|
+
className: t ? "visible" : "",
|
|
4447
|
+
role: "tooltip",
|
|
4448
|
+
style: {
|
|
4449
|
+
position: "fixed",
|
|
4450
|
+
zIndex: 1e3,
|
|
4451
|
+
top: `${a.top}px`,
|
|
4452
|
+
left: `${a.left}px`
|
|
4453
|
+
},
|
|
4454
|
+
children: e
|
|
4455
|
+
}
|
|
4456
|
+
), Ge = (e, t) => {
|
|
4457
|
+
if (!(!Ee || !ge)) {
|
|
4458
|
+
if (!e || !t) {
|
|
4459
|
+
Ee.render(
|
|
4460
|
+
/* @__PURE__ */ r.jsx(et, { content: null, isVisible: !1, position: { top: -9999, left: -9999 } })
|
|
4461
|
+
);
|
|
4462
|
+
return;
|
|
4463
|
+
}
|
|
4464
|
+
Ee.render(
|
|
4465
|
+
/* @__PURE__ */ r.jsx(et, { content: e.content, isVisible: !1, position: { top: -9999, left: -9999 } })
|
|
4466
|
+
), requestAnimationFrame(() => {
|
|
4467
|
+
if (!ge || !t) return;
|
|
4468
|
+
const a = ge.firstElementChild;
|
|
4469
|
+
if (!a) return;
|
|
4470
|
+
const { top: s, left: c } = xa(a, t, e.position);
|
|
4471
|
+
Ee == null || Ee.render(
|
|
4472
|
+
/* @__PURE__ */ r.jsx(et, { content: e.content, isVisible: !0, position: { top: s, left: c } })
|
|
4473
|
+
);
|
|
4474
|
+
});
|
|
4475
|
+
}
|
|
4476
|
+
}, Dt = () => {
|
|
4477
|
+
if (!ye || !$e) return;
|
|
4478
|
+
const e = Re.get(ye);
|
|
4479
|
+
e && Ge(e, $e);
|
|
4480
|
+
}, Zt = (e, t) => {
|
|
4481
|
+
const a = Re.get(e);
|
|
4482
|
+
a && (ye = e, $e = t, Ge(a, t));
|
|
4483
|
+
}, tt = (e) => {
|
|
4484
|
+
e && ye !== e || (ye = null, $e = null, Ge(null, null));
|
|
4485
|
+
}, ya = (e) => {
|
|
4486
|
+
const t = e.target.closest("[id]");
|
|
4487
|
+
if (!(t != null && t.id)) return;
|
|
4488
|
+
const a = Re.get(t.id);
|
|
4489
|
+
(a == null ? void 0 : a.showOn) === "hover" && Zt(t.id, t);
|
|
4490
|
+
}, ba = (e) => {
|
|
4491
|
+
const t = e.target.closest("[id]");
|
|
4492
|
+
if (!(t != null && t.id)) return;
|
|
4493
|
+
const a = Re.get(t.id);
|
|
4494
|
+
(a == null ? void 0 : a.showOn) === "hover" && tt(t.id);
|
|
4495
|
+
}, ga = (e) => {
|
|
4496
|
+
if (ge != null && ge.contains(e.target))
|
|
4497
|
+
return;
|
|
4498
|
+
const t = e.target.closest("[id]");
|
|
4499
|
+
if (t != null && t.id) {
|
|
4500
|
+
const a = Re.get(t.id);
|
|
4501
|
+
if ((a == null ? void 0 : a.showOn) === "click") {
|
|
4502
|
+
ye === t.id ? tt() : Zt(t.id, t);
|
|
4503
|
+
return;
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4506
|
+
if (ye) {
|
|
4507
|
+
const a = Re.get(ye);
|
|
4508
|
+
(a == null ? void 0 : a.showOn) === "click" && tt();
|
|
4509
|
+
}
|
|
4510
|
+
}, wa = () => {
|
|
4511
|
+
Ot || typeof document > "u" || (ge = document.createElement("div"), ge.id = "fictoan-tooltip-singleton", document.body.appendChild(ge), Ee = va.createRoot(ge), Ee.render(
|
|
4512
|
+
/* @__PURE__ */ r.jsx(et, { content: null, isVisible: !1, position: { top: -9999, left: -9999 } })
|
|
4513
|
+
), document.addEventListener("mouseover", ya), document.addEventListener("mouseout", ba), document.addEventListener("click", ga), window.addEventListener("scroll", Dt, !0), window.addEventListener("resize", Dt), Ot = !0);
|
|
4514
|
+
}, Ha = ({
|
|
4515
|
+
children: e,
|
|
4516
|
+
isTooltipFor: t,
|
|
4517
|
+
showOn: a = "hover",
|
|
4518
|
+
position: s = "top"
|
|
4519
|
+
}) => {
|
|
4520
|
+
const c = oe({ content: e, position: s, showOn: a });
|
|
4521
|
+
return c.current = { content: e, position: s, showOn: a }, re(() => (wa(), Re.set(t, c.current), ye === t && $e && Ge(c.current, $e), () => {
|
|
4522
|
+
Re.delete(t), ye === t && tt();
|
|
4523
|
+
}), [t]), re(() => {
|
|
4524
|
+
Re.set(t, c.current), ye === t && $e && Ge(c.current, $e);
|
|
4525
|
+
}, [e, s, a, t]), null;
|
|
4526
|
+
}, Fe = g.forwardRef(
|
|
4527
|
+
({ fontStyle: e = "sans-serif", weight: t, align: a, ...s }, c) => {
|
|
4528
|
+
let i = [];
|
|
4529
|
+
return t && i.push(`weight-${t}`), e && i.push(`font-${e}`), a && i.push(`text-${a}`), /* @__PURE__ */ r.jsx(A, { ref: c, classNames: i, ...s });
|
|
4530
|
+
}
|
|
4531
|
+
), ja = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h1", ref: t, ...e }));
|
|
4532
|
+
ja.displayName = "Heading1";
|
|
4533
|
+
const Ra = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h2", ref: t, ...e }));
|
|
4534
|
+
Ra.displayName = "Heading2";
|
|
4535
|
+
const Na = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h3", ref: t, ...e }));
|
|
4536
|
+
Na.displayName = "Heading3";
|
|
4537
|
+
const ka = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h4", ref: t, ...e }));
|
|
4538
|
+
ka.displayName = "Heading4";
|
|
4539
|
+
const Ea = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h5", ref: t, ...e }));
|
|
4540
|
+
Ea.displayName = "Heading5";
|
|
4541
|
+
const $a = g.forwardRef((e, t) => /* @__PURE__ */ r.jsx(Fe, { as: "h6", ref: t, ...e }));
|
|
4542
|
+
$a.displayName = "Heading6";
|
|
4543
|
+
const _a = g.forwardRef(
|
|
4544
|
+
({ summary: e, children: t, isOpen: a = !1, ...s }, c) => /* @__PURE__ */ r.jsxs(
|
|
4545
|
+
A,
|
|
4546
|
+
{
|
|
4547
|
+
as: "details",
|
|
4548
|
+
"data-expandable-content": !0,
|
|
4549
|
+
ref: c,
|
|
4550
|
+
...s,
|
|
4551
|
+
open: a,
|
|
4552
|
+
role: "region",
|
|
4553
|
+
"aria-labelledby": "accordion-summary",
|
|
4554
|
+
children: [
|
|
4555
|
+
/* @__PURE__ */ r.jsx(
|
|
4556
|
+
"summary",
|
|
4557
|
+
{
|
|
4558
|
+
role: "button",
|
|
4559
|
+
tabIndex: 0,
|
|
4560
|
+
"aria-controls": "accordion-content",
|
|
4561
|
+
"aria-expanded": a,
|
|
4562
|
+
children: typeof e == "string" ? /* @__PURE__ */ r.jsx(ae, { margin: "none", children: e }) : e
|
|
4563
|
+
}
|
|
4564
|
+
),
|
|
4565
|
+
t
|
|
4566
|
+
]
|
|
4567
|
+
}
|
|
4568
|
+
)
|
|
4569
|
+
);
|
|
4570
|
+
_a.displayName = "Accordion";
|
|
4571
|
+
export {
|
|
4572
|
+
aa as $,
|
|
4573
|
+
_a as A,
|
|
4574
|
+
at as B,
|
|
4575
|
+
Lt as C,
|
|
4576
|
+
kr as D,
|
|
4577
|
+
A as E,
|
|
4578
|
+
Da as F,
|
|
4579
|
+
Yr as G,
|
|
4580
|
+
Aa as H,
|
|
4581
|
+
Ke as I,
|
|
4582
|
+
qr as J,
|
|
4583
|
+
Xr as K,
|
|
4584
|
+
Wr as L,
|
|
4585
|
+
Ia as M,
|
|
4586
|
+
Rr as N,
|
|
4587
|
+
Qr as O,
|
|
4588
|
+
zr as P,
|
|
4589
|
+
Ct as Q,
|
|
4590
|
+
Wt as R,
|
|
4591
|
+
La as S,
|
|
4592
|
+
Ut as T,
|
|
4593
|
+
ea as U,
|
|
4594
|
+
Ht as V,
|
|
4595
|
+
Wa as W,
|
|
4596
|
+
ta as X,
|
|
4597
|
+
Ba as Y,
|
|
4598
|
+
Ca as Z,
|
|
4599
|
+
ra as _,
|
|
4600
|
+
pt as a,
|
|
4601
|
+
sa as a0,
|
|
4602
|
+
na as a1,
|
|
4603
|
+
oa as a2,
|
|
4604
|
+
ia as a3,
|
|
4605
|
+
la as a4,
|
|
4606
|
+
qt as a5,
|
|
4607
|
+
ca as a6,
|
|
4608
|
+
ua as a7,
|
|
4609
|
+
fa as a8,
|
|
4610
|
+
za as a9,
|
|
4611
|
+
pa as aa,
|
|
4612
|
+
ma as ab,
|
|
4613
|
+
Ha as ac,
|
|
4614
|
+
ja as ad,
|
|
4615
|
+
Ra as ae,
|
|
4616
|
+
Na as af,
|
|
4617
|
+
ka as ag,
|
|
4618
|
+
Ea as ah,
|
|
4619
|
+
$a as ai,
|
|
4620
|
+
ae as aj,
|
|
4621
|
+
Er as b,
|
|
4622
|
+
_r as c,
|
|
4623
|
+
Ft as d,
|
|
4624
|
+
Tr as e,
|
|
4625
|
+
Vt as f,
|
|
4626
|
+
G as g,
|
|
4627
|
+
Pa as h,
|
|
4628
|
+
Ma as i,
|
|
4629
|
+
Oa as j,
|
|
4630
|
+
Fa as k,
|
|
4631
|
+
Va as l,
|
|
4632
|
+
mt as m,
|
|
4633
|
+
Pr as n,
|
|
4634
|
+
Bt as o,
|
|
4635
|
+
Ir as p,
|
|
4636
|
+
de as q,
|
|
4637
|
+
Lr as r,
|
|
4638
|
+
Ue as s,
|
|
4639
|
+
zt as t,
|
|
4640
|
+
Hr as u,
|
|
4641
|
+
Ur as v,
|
|
4642
|
+
Gt as w,
|
|
4643
|
+
ht as x,
|
|
4644
|
+
Mr as y,
|
|
4645
|
+
Kr as z
|
|
4646
|
+
};
|
|
4647
|
+
//# sourceMappingURL=Accordion-ZNSXFjKa.js.map
|