@adamjanicki/ui 1.5.8 → 1.6.0
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/components/Accordion/Accordion.d.ts +3 -11
- package/components/Accordion/Accordion.js +27 -5
- package/components/Box/Box.js +3 -38
- package/components/Button/Button.d.ts +6 -12
- package/components/Button/Button.js +12 -12
- package/components/Carousel/Carousel.js +5 -1
- package/components/ClickOutside/ClickOutside.d.ts +3 -3
- package/components/ClickOutside/ClickOutside.js +1 -1
- package/components/Icon/Icon.d.ts +3 -2
- package/components/Icon/Icon.js +2 -4
- package/components/Icon/icons.d.ts +2 -7
- package/components/Icon/icons.js +174 -23
- package/components/Input/IconInput.js +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/TextArea.js +1 -1
- package/components/Layer/Layer.d.ts +3 -3
- package/components/Layer/Layer.js +19 -18
- package/components/Link/Link.d.ts +38 -8
- package/components/Link/Link.js +14 -8
- package/components/Link/index.d.ts +2 -2
- package/components/Link/index.js +2 -2
- package/components/Select/Select.js +1 -1
- package/dist/aui.cjs.js +22 -0
- package/dist/aui.es.js +1091 -0
- package/dist/aui.umd.js +22 -0
- package/functions/assertDefined.d.ts +8 -0
- package/functions/assertDefined.js +13 -0
- package/functions/classNames.js +4 -1
- package/functions/index.d.ts +2 -2
- package/functions/index.js +2 -2
- package/package.json +14 -4
- package/style.css +1 -564
- package/utils/transformLayout.d.ts +2 -0
- package/utils/transformLayout.js +76 -0
- package/utils/types.d.ts +51 -34
- package/vite.config.ts +23 -0
- package/functions/assert.d.ts +0 -15
- package/functions/assert.js +0 -24
package/dist/aui.es.js
ADDED
|
@@ -0,0 +1,1091 @@
|
|
|
1
|
+
import h, { useState as L, useRef as O, useEffect as R, useCallback as ee, cloneElement as ve, useMemo as P, forwardRef as V } from "react";
|
|
2
|
+
var W = { exports: {} }, B = {};
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var le;
|
|
13
|
+
function je() {
|
|
14
|
+
if (le) return B;
|
|
15
|
+
le = 1;
|
|
16
|
+
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
17
|
+
function r(s, o, a) {
|
|
18
|
+
var c = null;
|
|
19
|
+
if (a !== void 0 && (c = "" + a), o.key !== void 0 && (c = "" + o.key), "key" in o) {
|
|
20
|
+
a = {};
|
|
21
|
+
for (var u in o)
|
|
22
|
+
u !== "key" && (a[u] = o[u]);
|
|
23
|
+
} else a = o;
|
|
24
|
+
return o = a.ref, {
|
|
25
|
+
$$typeof: t,
|
|
26
|
+
type: s,
|
|
27
|
+
key: c,
|
|
28
|
+
ref: o !== void 0 ? o : null,
|
|
29
|
+
props: a
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return B.Fragment = e, B.jsx = r, B.jsxs = r, B;
|
|
33
|
+
}
|
|
34
|
+
var U = {};
|
|
35
|
+
/**
|
|
36
|
+
* @license React
|
|
37
|
+
* react-jsx-runtime.development.js
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the MIT license found in the
|
|
42
|
+
* LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
var ue;
|
|
45
|
+
function Re() {
|
|
46
|
+
return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
function t(n) {
|
|
48
|
+
if (n == null) return null;
|
|
49
|
+
if (typeof n == "function")
|
|
50
|
+
return n.$$typeof === ge ? null : n.displayName || n.name || null;
|
|
51
|
+
if (typeof n == "string") return n;
|
|
52
|
+
switch (n) {
|
|
53
|
+
case y:
|
|
54
|
+
return "Fragment";
|
|
55
|
+
case N:
|
|
56
|
+
return "Profiler";
|
|
57
|
+
case E:
|
|
58
|
+
return "StrictMode";
|
|
59
|
+
case I:
|
|
60
|
+
return "Suspense";
|
|
61
|
+
case k:
|
|
62
|
+
return "SuspenseList";
|
|
63
|
+
case be:
|
|
64
|
+
return "Activity";
|
|
65
|
+
}
|
|
66
|
+
if (typeof n == "object")
|
|
67
|
+
switch (typeof n.tag == "number" && console.error(
|
|
68
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
+
), n.$$typeof) {
|
|
70
|
+
case T:
|
|
71
|
+
return "Portal";
|
|
72
|
+
case $:
|
|
73
|
+
return (n.displayName || "Context") + ".Provider";
|
|
74
|
+
case F:
|
|
75
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case Y:
|
|
77
|
+
var d = n.render;
|
|
78
|
+
return n = n.displayName, n || (n = d.displayName || d.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
79
|
+
case A:
|
|
80
|
+
return d = n.displayName || null, d !== null ? d : t(n.type) || "Memo";
|
|
81
|
+
case re:
|
|
82
|
+
d = n._payload, n = n._init;
|
|
83
|
+
try {
|
|
84
|
+
return t(n(d));
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function e(n) {
|
|
91
|
+
return "" + n;
|
|
92
|
+
}
|
|
93
|
+
function r(n) {
|
|
94
|
+
try {
|
|
95
|
+
e(n);
|
|
96
|
+
var d = !1;
|
|
97
|
+
} catch {
|
|
98
|
+
d = !0;
|
|
99
|
+
}
|
|
100
|
+
if (d) {
|
|
101
|
+
d = console;
|
|
102
|
+
var p = d.error, b = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
103
|
+
return p.call(
|
|
104
|
+
d,
|
|
105
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
+
b
|
|
107
|
+
), e(n);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function s(n) {
|
|
111
|
+
if (n === y) return "<>";
|
|
112
|
+
if (typeof n == "object" && n !== null && n.$$typeof === re)
|
|
113
|
+
return "<...>";
|
|
114
|
+
try {
|
|
115
|
+
var d = t(n);
|
|
116
|
+
return d ? "<" + d + ">" : "<...>";
|
|
117
|
+
} catch {
|
|
118
|
+
return "<...>";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function o() {
|
|
122
|
+
var n = X.A;
|
|
123
|
+
return n === null ? null : n.getOwner();
|
|
124
|
+
}
|
|
125
|
+
function a() {
|
|
126
|
+
return Error("react-stack-top-frame");
|
|
127
|
+
}
|
|
128
|
+
function c(n) {
|
|
129
|
+
if (ne.call(n, "key")) {
|
|
130
|
+
var d = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
131
|
+
if (d && d.isReactWarning) return !1;
|
|
132
|
+
}
|
|
133
|
+
return n.key !== void 0;
|
|
134
|
+
}
|
|
135
|
+
function u(n, d) {
|
|
136
|
+
function p() {
|
|
137
|
+
oe || (oe = !0, console.error(
|
|
138
|
+
"%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://react.dev/link/special-props)",
|
|
139
|
+
d
|
|
140
|
+
));
|
|
141
|
+
}
|
|
142
|
+
p.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
143
|
+
get: p,
|
|
144
|
+
configurable: !0
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function f() {
|
|
148
|
+
var n = t(this.type);
|
|
149
|
+
return se[n] || (se[n] = !0, console.error(
|
|
150
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
152
|
+
}
|
|
153
|
+
function l(n, d, p, b, C, _, G, Z) {
|
|
154
|
+
return p = _.ref, n = {
|
|
155
|
+
$$typeof: S,
|
|
156
|
+
type: n,
|
|
157
|
+
key: d,
|
|
158
|
+
props: _,
|
|
159
|
+
_owner: C
|
|
160
|
+
}, (p !== void 0 ? p : null) !== null ? Object.defineProperty(n, "ref", {
|
|
161
|
+
enumerable: !1,
|
|
162
|
+
get: f
|
|
163
|
+
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: 0
|
|
168
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: null
|
|
173
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: G
|
|
178
|
+
}), Object.defineProperty(n, "_debugTask", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: Z
|
|
183
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
184
|
+
}
|
|
185
|
+
function v(n, d, p, b, C, _, G, Z) {
|
|
186
|
+
var g = d.children;
|
|
187
|
+
if (g !== void 0)
|
|
188
|
+
if (b)
|
|
189
|
+
if (we(g)) {
|
|
190
|
+
for (b = 0; b < g.length; b++)
|
|
191
|
+
j(g[b]);
|
|
192
|
+
Object.freeze && Object.freeze(g);
|
|
193
|
+
} else
|
|
194
|
+
console.error(
|
|
195
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
|
+
);
|
|
197
|
+
else j(g);
|
|
198
|
+
if (ne.call(d, "key")) {
|
|
199
|
+
g = t(n);
|
|
200
|
+
var D = Object.keys(d).filter(function(ye) {
|
|
201
|
+
return ye !== "key";
|
|
202
|
+
});
|
|
203
|
+
b = 0 < D.length ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}", ie[g + b] || (D = 0 < D.length ? "{" + D.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
205
|
+
let props = %s;
|
|
206
|
+
<%s {...props} />
|
|
207
|
+
React keys must be passed directly to JSX without using spread:
|
|
208
|
+
let props = %s;
|
|
209
|
+
<%s key={someKey} {...props} />`,
|
|
210
|
+
b,
|
|
211
|
+
g,
|
|
212
|
+
D,
|
|
213
|
+
g
|
|
214
|
+
), ie[g + b] = !0);
|
|
215
|
+
}
|
|
216
|
+
if (g = null, p !== void 0 && (r(p), g = "" + p), c(d) && (r(d.key), g = "" + d.key), "key" in d) {
|
|
217
|
+
p = {};
|
|
218
|
+
for (var Q in d)
|
|
219
|
+
Q !== "key" && (p[Q] = d[Q]);
|
|
220
|
+
} else p = d;
|
|
221
|
+
return g && u(
|
|
222
|
+
p,
|
|
223
|
+
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
224
|
+
), l(
|
|
225
|
+
n,
|
|
226
|
+
g,
|
|
227
|
+
_,
|
|
228
|
+
C,
|
|
229
|
+
o(),
|
|
230
|
+
p,
|
|
231
|
+
G,
|
|
232
|
+
Z
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function j(n) {
|
|
236
|
+
typeof n == "object" && n !== null && n.$$typeof === S && n._store && (n._store.validated = 1);
|
|
237
|
+
}
|
|
238
|
+
var x = h, S = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), re = Symbol.for("react.lazy"), be = Symbol.for("react.activity"), ge = Symbol.for("react.client.reference"), X = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ne = Object.prototype.hasOwnProperty, we = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
239
|
+
return null;
|
|
240
|
+
};
|
|
241
|
+
x = {
|
|
242
|
+
react_stack_bottom_frame: function(n) {
|
|
243
|
+
return n();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var oe, se = {}, ae = x.react_stack_bottom_frame.bind(
|
|
247
|
+
x,
|
|
248
|
+
a
|
|
249
|
+
)(), ce = J(s(a)), ie = {};
|
|
250
|
+
U.Fragment = y, U.jsx = function(n, d, p, b, C) {
|
|
251
|
+
var _ = 1e4 > X.recentlyCreatedOwnerStacks++;
|
|
252
|
+
return v(
|
|
253
|
+
n,
|
|
254
|
+
d,
|
|
255
|
+
p,
|
|
256
|
+
!1,
|
|
257
|
+
b,
|
|
258
|
+
C,
|
|
259
|
+
_ ? Error("react-stack-top-frame") : ae,
|
|
260
|
+
_ ? J(s(n)) : ce
|
|
261
|
+
);
|
|
262
|
+
}, U.jsxs = function(n, d, p, b, C) {
|
|
263
|
+
var _ = 1e4 > X.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return v(
|
|
265
|
+
n,
|
|
266
|
+
d,
|
|
267
|
+
p,
|
|
268
|
+
!0,
|
|
269
|
+
b,
|
|
270
|
+
C,
|
|
271
|
+
_ ? Error("react-stack-top-frame") : ae,
|
|
272
|
+
_ ? J(s(n)) : ce
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
}()), U;
|
|
276
|
+
}
|
|
277
|
+
var de;
|
|
278
|
+
function Ee() {
|
|
279
|
+
return de || (de = 1, process.env.NODE_ENV === "production" ? W.exports = je() : W.exports = Re()), W.exports;
|
|
280
|
+
}
|
|
281
|
+
var i = Ee();
|
|
282
|
+
function m(...t) {
|
|
283
|
+
return t.filter(Boolean).join(" ");
|
|
284
|
+
}
|
|
285
|
+
function fe(t, e) {
|
|
286
|
+
try {
|
|
287
|
+
const r = document.getElementById(t);
|
|
288
|
+
r && r.scrollIntoView({ behavior: e });
|
|
289
|
+
} catch {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function Fe(t, e) {
|
|
294
|
+
if (t === void 0)
|
|
295
|
+
throw new Error(e || "Unexpected undefined value");
|
|
296
|
+
return t;
|
|
297
|
+
}
|
|
298
|
+
const w = h.forwardRef(
|
|
299
|
+
({ layout: t, className: e, style: r, ...s }, o) => {
|
|
300
|
+
const a = Te(t);
|
|
301
|
+
return /* @__PURE__ */ i.jsx(
|
|
302
|
+
"div",
|
|
303
|
+
{
|
|
304
|
+
...s,
|
|
305
|
+
className: m(a.className, e),
|
|
306
|
+
style: { ...a.style, ...r },
|
|
307
|
+
ref: o
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
function Te(t) {
|
|
313
|
+
if (!t) return { className: void 0, style: void 0 };
|
|
314
|
+
const { axis: e, gap: r, align: s, justify: o, padding: a, margin: c, wrap: u } = t, f = {};
|
|
315
|
+
let l = `aui-flex-${e}`;
|
|
316
|
+
return s && (l = m(l, `aui-align-${s}`)), o && (l = m(l, `aui-justify-${o}`)), u && (l = m(l, "aui-flex-wrap")), r && (typeof r == "number" ? f.gap = r : l = m(l, `aui-gap-${r}`)), a && (typeof a == "number" ? f.padding = a : l = m(l, `aui-pa-${a}`)), c && (typeof c == "number" ? f.margin = c : l = m(l, `aui-ma-${c}`)), { className: l, style: f };
|
|
317
|
+
}
|
|
318
|
+
const q = "M94.0908,296.3057c-29.82338,0-54-24.17662-54-54s24.17662-54,54-54c.00237,0,.00475,0,.00712,0c.0017,0,141.65138,0,221.99288,0v-222c0-29.82338,24.17662-54,54-54s54,24.17662,54,54c0,.00237,0,.00475,0,.00712s0,273.40726,0,275.97468c0,.00607,0,.01213,0,.0182c0,29.82338-24.17662,54-54,54h-276Z", Se = {
|
|
319
|
+
down: {
|
|
320
|
+
contents: [
|
|
321
|
+
/* @__PURE__ */ i.jsx(
|
|
322
|
+
"path",
|
|
323
|
+
{
|
|
324
|
+
d: q,
|
|
325
|
+
transform: "matrix(.707107 0.707107-.707107 0.707107 165.642289-79.868246)"
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
up: {
|
|
331
|
+
contents: [
|
|
332
|
+
/* @__PURE__ */ i.jsx(
|
|
333
|
+
"path",
|
|
334
|
+
{
|
|
335
|
+
d: q,
|
|
336
|
+
transform: "matrix(-.707107-.707107 0.707107-.707107 346.357711 591.868246)"
|
|
337
|
+
}
|
|
338
|
+
)
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
left: {
|
|
342
|
+
contents: [
|
|
343
|
+
/* @__PURE__ */ i.jsx(
|
|
344
|
+
"path",
|
|
345
|
+
{
|
|
346
|
+
d: q,
|
|
347
|
+
transform: "matrix(-.707107 0.707107-.707107-.707107 591.868246 165.642289)"
|
|
348
|
+
}
|
|
349
|
+
)
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
right: {
|
|
353
|
+
contents: [
|
|
354
|
+
/* @__PURE__ */ i.jsx(
|
|
355
|
+
"path",
|
|
356
|
+
{
|
|
357
|
+
d: q,
|
|
358
|
+
transform: "matrix(.707107-.707107 0.707107 0.707107-79.868246 346.357711)"
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
}, Ne = "0 0 512 512", H = h.forwardRef(
|
|
364
|
+
({ icon: t, className: e, size: r, style: s, ...o }, a) => {
|
|
365
|
+
const { contents: c, viewBox: u } = Se[t];
|
|
366
|
+
return /* @__PURE__ */ i.jsx(
|
|
367
|
+
"svg",
|
|
368
|
+
{
|
|
369
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
370
|
+
viewBox: u || Ne,
|
|
371
|
+
className: m("aui-icon", e),
|
|
372
|
+
style: { width: r, height: r, ...s },
|
|
373
|
+
...o,
|
|
374
|
+
ref: a,
|
|
375
|
+
children: c.map((f, l) => /* @__PURE__ */ i.jsx(h.Fragment, { children: f }, l))
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
), te = h.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i.jsx(
|
|
380
|
+
"button",
|
|
381
|
+
{
|
|
382
|
+
...e,
|
|
383
|
+
className: m("aui-action aui-button", t),
|
|
384
|
+
ref: r
|
|
385
|
+
}
|
|
386
|
+
)), K = h.forwardRef(
|
|
387
|
+
({ variant: t, corners: e, className: r, size: s, ...o }, a) => /* @__PURE__ */ i.jsx(
|
|
388
|
+
te,
|
|
389
|
+
{
|
|
390
|
+
...o,
|
|
391
|
+
className: m(
|
|
392
|
+
pe({ variant: t, corners: e, size: s }),
|
|
393
|
+
r
|
|
394
|
+
),
|
|
395
|
+
ref: a
|
|
396
|
+
}
|
|
397
|
+
)
|
|
398
|
+
), pe = ({
|
|
399
|
+
variant: t = "primary",
|
|
400
|
+
corners: e = "rounded",
|
|
401
|
+
size: r = "regular"
|
|
402
|
+
}) => `aui-button--${t} aui-button-size--${r} aui-corners--${e}`, ke = h.forwardRef((t, e) => {
|
|
403
|
+
const {
|
|
404
|
+
animated: r,
|
|
405
|
+
duration: s = 0.25,
|
|
406
|
+
keepMounted: o = !1,
|
|
407
|
+
animateTo: a,
|
|
408
|
+
animateFrom: c,
|
|
409
|
+
className: u,
|
|
410
|
+
style: f,
|
|
411
|
+
...l
|
|
412
|
+
} = t, [v, j] = L(r || o), [x, S] = L(!1), T = O(null), y = O(null), E = () => {
|
|
413
|
+
T.current && (clearTimeout(T.current), T.current = null), y.current && (cancelAnimationFrame(y.current), y.current = null);
|
|
414
|
+
};
|
|
415
|
+
if (R(() => (r && v && (E(), y.current = requestAnimationFrame(
|
|
416
|
+
() => S(!0)
|
|
417
|
+
)), E), [r, v]), R(() => (r ? j(!0) : (E(), S(!1), T.current = window.setTimeout(() => {
|
|
418
|
+
o || j(!1);
|
|
419
|
+
}, s * 1e3)), E), [r, s, o]), !v) return null;
|
|
420
|
+
const N = x ? a : c;
|
|
421
|
+
return /* @__PURE__ */ i.jsx(
|
|
422
|
+
w,
|
|
423
|
+
{
|
|
424
|
+
className: m(u, N?.className),
|
|
425
|
+
style: {
|
|
426
|
+
transition: `all ${s}s ease-in-out`,
|
|
427
|
+
...f,
|
|
428
|
+
...N?.style
|
|
429
|
+
},
|
|
430
|
+
...l,
|
|
431
|
+
ref: e
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}), Ye = h.forwardRef(
|
|
435
|
+
({ drawers: t, className: e, duration: r, hideDividers: s, ...o }, a) => {
|
|
436
|
+
const [c, u] = L(/* @__PURE__ */ new Set());
|
|
437
|
+
return /* @__PURE__ */ i.jsx(
|
|
438
|
+
w,
|
|
439
|
+
{
|
|
440
|
+
layout: { axis: "y" },
|
|
441
|
+
...o,
|
|
442
|
+
className: m("aui-accordion aui-corners--rounded", e),
|
|
443
|
+
ref: a,
|
|
444
|
+
children: t.map((f, l) => /* @__PURE__ */ i.jsx(
|
|
445
|
+
_e,
|
|
446
|
+
{
|
|
447
|
+
item: f,
|
|
448
|
+
open: c.has(l),
|
|
449
|
+
onOpenChange: (v) => u((j) => {
|
|
450
|
+
const x = new Set(j);
|
|
451
|
+
return v ? x.add(l) : x.delete(l), x;
|
|
452
|
+
}),
|
|
453
|
+
duration: r,
|
|
454
|
+
showDivider: !s && l < t.length - 1
|
|
455
|
+
},
|
|
456
|
+
l
|
|
457
|
+
))
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
), _e = ({
|
|
462
|
+
item: t,
|
|
463
|
+
open: e,
|
|
464
|
+
onOpenChange: r,
|
|
465
|
+
duration: s,
|
|
466
|
+
showDivider: o
|
|
467
|
+
}) => {
|
|
468
|
+
const a = O(null), [c, u] = L(), f = t.content;
|
|
469
|
+
return R(() => {
|
|
470
|
+
e && f && a.current && u(a.current.offsetHeight);
|
|
471
|
+
}, [e, f]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
472
|
+
/* @__PURE__ */ i.jsxs(w, { layout: { axis: "y" }, children: [
|
|
473
|
+
/* @__PURE__ */ i.jsx(te, { onClick: () => r(!e), children: /* @__PURE__ */ i.jsxs(w, { layout: { axis: "x", align: "center", gap: "m", padding: "l" }, children: [
|
|
474
|
+
/* @__PURE__ */ i.jsx(
|
|
475
|
+
H,
|
|
476
|
+
{
|
|
477
|
+
size: 12,
|
|
478
|
+
icon: e ? "down" : "right",
|
|
479
|
+
className: "aui-accordion-arrow"
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
/* @__PURE__ */ i.jsx("span", { className: "aui-accordion-label", children: t.label })
|
|
483
|
+
] }) }),
|
|
484
|
+
/* @__PURE__ */ i.jsx(
|
|
485
|
+
ke,
|
|
486
|
+
{
|
|
487
|
+
style: { overflow: "hidden" },
|
|
488
|
+
keepMounted: !0,
|
|
489
|
+
duration: s,
|
|
490
|
+
animated: e,
|
|
491
|
+
animateFrom: {
|
|
492
|
+
style: {
|
|
493
|
+
visibility: "hidden",
|
|
494
|
+
height: 0,
|
|
495
|
+
transform: "translateY(-4px)",
|
|
496
|
+
opacity: 0.9
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
animateTo: {
|
|
500
|
+
style: { height: c, transform: "translateY(0)", opacity: 1 }
|
|
501
|
+
},
|
|
502
|
+
children: /* @__PURE__ */ i.jsx(w, { ref: a, children: f })
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
] }),
|
|
506
|
+
o && /* @__PURE__ */ i.jsx("hr", { className: "aui-accordion-hr" })
|
|
507
|
+
] });
|
|
508
|
+
}, Ie = h.forwardRef(
|
|
509
|
+
({ type: t, corners: e = "rounded", className: r, ...s }, o) => /* @__PURE__ */ i.jsx(
|
|
510
|
+
w,
|
|
511
|
+
{
|
|
512
|
+
...s,
|
|
513
|
+
className: m(
|
|
514
|
+
`aui-alert aui-content--${t} aui-corners--${e}`,
|
|
515
|
+
r
|
|
516
|
+
),
|
|
517
|
+
ref: o
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
), Be = h.forwardRef(
|
|
521
|
+
({ type: t, className: e, corners: r = "rounded", ...s }, o) => /* @__PURE__ */ i.jsx(
|
|
522
|
+
w,
|
|
523
|
+
{
|
|
524
|
+
...s,
|
|
525
|
+
className: m(
|
|
526
|
+
`aui-badge aui-content--${t} aui-corners--${r}`,
|
|
527
|
+
e
|
|
528
|
+
),
|
|
529
|
+
ref: o
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
), Ue = h.forwardRef(
|
|
533
|
+
({ type: t, className: e, ...r }, s) => /* @__PURE__ */ i.jsx(
|
|
534
|
+
w,
|
|
535
|
+
{
|
|
536
|
+
...r,
|
|
537
|
+
className: m(`aui-content--${t} aui-banner`, e),
|
|
538
|
+
ref: s
|
|
539
|
+
}
|
|
540
|
+
)
|
|
541
|
+
), $e = 1, ze = h.forwardRef(
|
|
542
|
+
({
|
|
543
|
+
children: t,
|
|
544
|
+
className: e,
|
|
545
|
+
hideArrows: r,
|
|
546
|
+
hideDots: s,
|
|
547
|
+
dotProps: o,
|
|
548
|
+
leftArrowProps: a,
|
|
549
|
+
rightArrowProps: c,
|
|
550
|
+
autoplayInterval: u,
|
|
551
|
+
duration: f,
|
|
552
|
+
...l
|
|
553
|
+
}, v) => {
|
|
554
|
+
f = Math.max(f ?? $e, 0.1), u = u ? Math.max(f, u) : void 0;
|
|
555
|
+
const j = t.length, [x, S] = L({
|
|
556
|
+
cur: 0,
|
|
557
|
+
delta: 0,
|
|
558
|
+
animating: !1
|
|
559
|
+
}), T = O(null), { cur: y, delta: E, animating: N } = x, F = me(y + E, j), $ = ee(
|
|
560
|
+
(k) => {
|
|
561
|
+
N || k === 0 || S((A) => ({
|
|
562
|
+
...A,
|
|
563
|
+
delta: k,
|
|
564
|
+
animating: !0
|
|
565
|
+
}));
|
|
566
|
+
},
|
|
567
|
+
[N]
|
|
568
|
+
), Y = () => {
|
|
569
|
+
S(({ delta: k, cur: A }) => ({
|
|
570
|
+
delta: k,
|
|
571
|
+
animating: !1,
|
|
572
|
+
cur: me(A + k, j)
|
|
573
|
+
}));
|
|
574
|
+
};
|
|
575
|
+
if (R(() => (u && (T.current = window.setInterval(() => {
|
|
576
|
+
$(1);
|
|
577
|
+
}, u * 1e3)), () => {
|
|
578
|
+
const k = T.current;
|
|
579
|
+
T.current = null, k && clearInterval(k);
|
|
580
|
+
}), [u, $]), j <= 0) return null;
|
|
581
|
+
const I = N ? {
|
|
582
|
+
transform: `translateX(${-(E / Math.abs(E)) * 100}%)`,
|
|
583
|
+
transition: `transform ${f}s ease-in-out`
|
|
584
|
+
} : void 0;
|
|
585
|
+
return /* @__PURE__ */ i.jsxs(
|
|
586
|
+
w,
|
|
587
|
+
{
|
|
588
|
+
...l,
|
|
589
|
+
className: m("aui-carousel", e),
|
|
590
|
+
ref: v,
|
|
591
|
+
children: [
|
|
592
|
+
/* @__PURE__ */ i.jsxs(
|
|
593
|
+
w,
|
|
594
|
+
{
|
|
595
|
+
className: "aui-carousel-slider",
|
|
596
|
+
style: {
|
|
597
|
+
...I,
|
|
598
|
+
flexDirection: E >= 0 ? "row" : "row-reverse"
|
|
599
|
+
},
|
|
600
|
+
onTransitionEnd: Y,
|
|
601
|
+
children: [
|
|
602
|
+
/* @__PURE__ */ i.jsx(w, { className: "aui-carousel-item", children: t[y] }),
|
|
603
|
+
/* @__PURE__ */ i.jsx(w, { className: "aui-carousel-item", "aria-hidden": !0, children: t[F] })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
j > 1 && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
608
|
+
!r && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
609
|
+
/* @__PURE__ */ i.jsx(
|
|
610
|
+
K,
|
|
611
|
+
{
|
|
612
|
+
className: m(
|
|
613
|
+
"aui-flex-x aui-align-center aui-justify-center aui-carousel-arrow",
|
|
614
|
+
a?.className
|
|
615
|
+
),
|
|
616
|
+
style: { left: 8, ...a?.style },
|
|
617
|
+
corners: "pill",
|
|
618
|
+
"aria-label": "previous",
|
|
619
|
+
onClick: () => $(-1),
|
|
620
|
+
children: a?.children ?? /* @__PURE__ */ i.jsx(H, { icon: "left", size: 12, style: { marginRight: 2 } })
|
|
621
|
+
}
|
|
622
|
+
),
|
|
623
|
+
/* @__PURE__ */ i.jsx(
|
|
624
|
+
K,
|
|
625
|
+
{
|
|
626
|
+
className: m(
|
|
627
|
+
"aui-flex-x aui-align-center aui-justify-center aui-carousel-arrow",
|
|
628
|
+
c?.className
|
|
629
|
+
),
|
|
630
|
+
style: { right: 8, ...c?.style },
|
|
631
|
+
corners: "pill",
|
|
632
|
+
"aria-label": "next",
|
|
633
|
+
onClick: () => $(1),
|
|
634
|
+
children: c?.children ?? /* @__PURE__ */ i.jsx(H, { icon: "right", size: 12, style: { marginLeft: 2 } })
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
] }),
|
|
638
|
+
!s && /* @__PURE__ */ i.jsx(
|
|
639
|
+
w,
|
|
640
|
+
{
|
|
641
|
+
layout: { axis: "x", align: "center", gap: "xs" },
|
|
642
|
+
className: "aui-carousel-dots",
|
|
643
|
+
children: t.map((k, A) => /* @__PURE__ */ i.jsx(
|
|
644
|
+
K,
|
|
645
|
+
{
|
|
646
|
+
className: m(
|
|
647
|
+
"aui-carousel-dot",
|
|
648
|
+
o?.className
|
|
649
|
+
),
|
|
650
|
+
corners: "pill",
|
|
651
|
+
disabled: y === A || N,
|
|
652
|
+
onClick: () => $(A - y),
|
|
653
|
+
style: o?.style
|
|
654
|
+
},
|
|
655
|
+
A
|
|
656
|
+
))
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
] })
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
);
|
|
665
|
+
function me(t, e) {
|
|
666
|
+
return (t % e + e) % e;
|
|
667
|
+
}
|
|
668
|
+
const We = ({
|
|
669
|
+
children: t,
|
|
670
|
+
onClickOutside: e
|
|
671
|
+
}) => {
|
|
672
|
+
const r = O(null), s = O(!1), o = O(!1);
|
|
673
|
+
R(() => {
|
|
674
|
+
const c = window.setTimeout(() => {
|
|
675
|
+
o.current = !0;
|
|
676
|
+
}, 0);
|
|
677
|
+
return () => {
|
|
678
|
+
clearTimeout(c), o.current = !1;
|
|
679
|
+
};
|
|
680
|
+
}, []);
|
|
681
|
+
const a = ee(
|
|
682
|
+
(c) => {
|
|
683
|
+
const u = s.current;
|
|
684
|
+
s.current = !1, !(!o.current || !r.current || u) && (c.composedPath().includes(r.current) || e(c));
|
|
685
|
+
},
|
|
686
|
+
[e]
|
|
687
|
+
);
|
|
688
|
+
return R(() => (document.addEventListener("click", a), () => document.removeEventListener("click", a)), [a]), ve(t, {
|
|
689
|
+
ref: r,
|
|
690
|
+
onClick: (c) => {
|
|
691
|
+
s.current = !0, t.props?.onClick?.(c);
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
}, z = {
|
|
695
|
+
right: 45,
|
|
696
|
+
left: -45
|
|
697
|
+
}, he = {
|
|
698
|
+
right: -135,
|
|
699
|
+
left: -225
|
|
700
|
+
}, M = (t) => {
|
|
701
|
+
const {
|
|
702
|
+
size: e = 36,
|
|
703
|
+
duration: r = 0.25,
|
|
704
|
+
double: s,
|
|
705
|
+
openStyle: o,
|
|
706
|
+
open: a,
|
|
707
|
+
style: c,
|
|
708
|
+
rounded: u,
|
|
709
|
+
lineHeight: f,
|
|
710
|
+
...l
|
|
711
|
+
} = t, v = f || Math.max(1, Math.round(e / 20)), j = {
|
|
712
|
+
width: e,
|
|
713
|
+
height: e,
|
|
714
|
+
display: "flex",
|
|
715
|
+
position: "relative",
|
|
716
|
+
justifyContent: "center",
|
|
717
|
+
alignItems: "center",
|
|
718
|
+
transition: `transform ${r}s ease`
|
|
719
|
+
}, x = {
|
|
720
|
+
height: v,
|
|
721
|
+
width: e * 0.7,
|
|
722
|
+
backgroundColor: "currentColor",
|
|
723
|
+
position: "absolute",
|
|
724
|
+
transition: `transform ${r}s ease, opacity ${r}s ease`,
|
|
725
|
+
borderRadius: u ? 1e4 : 0
|
|
726
|
+
}, S = P(
|
|
727
|
+
() => e / (s ? 7 : 4),
|
|
728
|
+
[e, s]
|
|
729
|
+
), { outer: T, top: y, middle: E, bottom: N } = o, F = a ? T : {}, $ = a ? y : { transform: `translateY(-${S}px)` }, Y = a ? N : { transform: `translateY(${S}px)` }, I = a ? E : {};
|
|
730
|
+
return /* @__PURE__ */ i.jsxs(
|
|
731
|
+
te,
|
|
732
|
+
{
|
|
733
|
+
style: { ...c, ...F, ...j },
|
|
734
|
+
...l,
|
|
735
|
+
"aria-label": l["aria-label"] || "hamburger",
|
|
736
|
+
"aria-expanded": a,
|
|
737
|
+
children: [
|
|
738
|
+
/* @__PURE__ */ i.jsx("span", { style: { ...x, ...$ } }),
|
|
739
|
+
!s && /* @__PURE__ */ i.jsx("span", { style: { ...x, ...I } }),
|
|
740
|
+
/* @__PURE__ */ i.jsx("span", { style: { ...x, ...Y } })
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
);
|
|
744
|
+
}, qe = (t) => {
|
|
745
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
746
|
+
const o = z[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
747
|
+
return {
|
|
748
|
+
top: { transform: a },
|
|
749
|
+
middle: { transform: "scale(0)" },
|
|
750
|
+
bottom: { transform: c }
|
|
751
|
+
};
|
|
752
|
+
}, [e]);
|
|
753
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, openStyle: s });
|
|
754
|
+
}, He = (t) => {
|
|
755
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
756
|
+
const o = z[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
757
|
+
return {
|
|
758
|
+
top: { transform: a },
|
|
759
|
+
bottom: { transform: c }
|
|
760
|
+
};
|
|
761
|
+
}, [e]);
|
|
762
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, double: !0, openStyle: s });
|
|
763
|
+
}, Ve = (t) => {
|
|
764
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
765
|
+
const o = he[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
766
|
+
return {
|
|
767
|
+
top: { transform: a },
|
|
768
|
+
bottom: { transform: c }
|
|
769
|
+
};
|
|
770
|
+
}, [e]);
|
|
771
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, double: !0, openStyle: s });
|
|
772
|
+
}, Xe = (t) => {
|
|
773
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
774
|
+
const o = z[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
775
|
+
return {
|
|
776
|
+
top: { transform: a },
|
|
777
|
+
bottom: { transform: c },
|
|
778
|
+
outer: { transform: "rotate(180deg)" }
|
|
779
|
+
};
|
|
780
|
+
}, [e]);
|
|
781
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, double: !0, openStyle: s });
|
|
782
|
+
}, Je = (t) => {
|
|
783
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
784
|
+
const o = z[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
785
|
+
return {
|
|
786
|
+
top: { transform: a },
|
|
787
|
+
middle: { opacity: 0 },
|
|
788
|
+
bottom: { transform: c }
|
|
789
|
+
};
|
|
790
|
+
}, [e]);
|
|
791
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, openStyle: s });
|
|
792
|
+
}, Ge = (t) => {
|
|
793
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
794
|
+
const o = he[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
795
|
+
return {
|
|
796
|
+
top: { transform: a },
|
|
797
|
+
middle: { transform: "scale(0)" },
|
|
798
|
+
bottom: { transform: c }
|
|
799
|
+
};
|
|
800
|
+
}, [e]);
|
|
801
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, openStyle: s });
|
|
802
|
+
}, Ze = (t) => {
|
|
803
|
+
const { direction: e = "left", ...r } = t, s = P(() => {
|
|
804
|
+
const o = z[e], a = `rotate(${o}deg)`, c = `rotate(${-o}deg)`;
|
|
805
|
+
return {
|
|
806
|
+
top: { transform: a },
|
|
807
|
+
middle: { opacity: 0 },
|
|
808
|
+
bottom: { transform: c },
|
|
809
|
+
outer: { transform: "rotate(180deg)" }
|
|
810
|
+
};
|
|
811
|
+
}, [e]);
|
|
812
|
+
return /* @__PURE__ */ i.jsx(M, { ...r, openStyle: s });
|
|
813
|
+
}, Qe = V(
|
|
814
|
+
({ className: t, corners: e = "rounded", ...r }, s) => /* @__PURE__ */ i.jsx(
|
|
815
|
+
"input",
|
|
816
|
+
{
|
|
817
|
+
...r,
|
|
818
|
+
ref: s,
|
|
819
|
+
className: m(
|
|
820
|
+
`aui-input-base aui-input aui-corners--${e}`,
|
|
821
|
+
t
|
|
822
|
+
)
|
|
823
|
+
}
|
|
824
|
+
)
|
|
825
|
+
), Ke = V(
|
|
826
|
+
({ className: t, rows: e = 3, corners: r = "rounded", ...s }, o) => /* @__PURE__ */ i.jsx(
|
|
827
|
+
"textarea",
|
|
828
|
+
{
|
|
829
|
+
...s,
|
|
830
|
+
ref: o,
|
|
831
|
+
className: m(
|
|
832
|
+
`aui-input-base aui-input aui-corners--${r}`,
|
|
833
|
+
t
|
|
834
|
+
),
|
|
835
|
+
rows: e
|
|
836
|
+
}
|
|
837
|
+
)
|
|
838
|
+
), et = V(
|
|
839
|
+
({ startIcon: t, endIcon: e, className: r, style: s, corners: o = "rounded", inputProps: a }, c) => /* @__PURE__ */ i.jsxs(
|
|
840
|
+
w,
|
|
841
|
+
{
|
|
842
|
+
layout: { axis: "x", align: "center" },
|
|
843
|
+
className: m(
|
|
844
|
+
`aui-input aui-icon-input aui-corners--${o}`,
|
|
845
|
+
r
|
|
846
|
+
),
|
|
847
|
+
style: s,
|
|
848
|
+
ref: c,
|
|
849
|
+
children: [
|
|
850
|
+
t,
|
|
851
|
+
/* @__PURE__ */ i.jsx(
|
|
852
|
+
"input",
|
|
853
|
+
{
|
|
854
|
+
...a,
|
|
855
|
+
className: m(
|
|
856
|
+
`aui-input-base aui-corners--${o}`,
|
|
857
|
+
a?.className
|
|
858
|
+
)
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
e
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
)
|
|
865
|
+
), Ae = () => {
|
|
866
|
+
const t = window.scrollY, e = document.body.style, r = document.documentElement.style, { overflow: s, position: o, top: a, width: c } = e, { scrollBehavior: u } = r;
|
|
867
|
+
return r.scrollBehavior = "auto", e.overflow = "hidden", e.position = "fixed", e.top = `-${t}px`, e.width = "100%", () => {
|
|
868
|
+
e.overflow = s, e.position = o, e.top = a, e.width = c, window.scrollTo(0, t), r.scrollBehavior = u;
|
|
869
|
+
};
|
|
870
|
+
}, Oe = (t = !0) => {
|
|
871
|
+
R(() => {
|
|
872
|
+
if (t)
|
|
873
|
+
return Ae();
|
|
874
|
+
}, [t]);
|
|
875
|
+
}, tt = (t) => {
|
|
876
|
+
const { onMatch: e, onUnmatch: r, query: s } = t, [o, a] = L(!1);
|
|
877
|
+
return R(() => {
|
|
878
|
+
const c = window.matchMedia(s), u = (f) => {
|
|
879
|
+
f.matches ? e?.() : r?.(), a(f.matches);
|
|
880
|
+
};
|
|
881
|
+
return c.addEventListener("change", u), a(c.matches), () => c.removeEventListener("change", u);
|
|
882
|
+
}, [e, r, s]), o;
|
|
883
|
+
}, rt = () => {
|
|
884
|
+
const [t, e] = L({
|
|
885
|
+
scrollX: window.scrollX,
|
|
886
|
+
scrollY: window.scrollY
|
|
887
|
+
});
|
|
888
|
+
return R(() => {
|
|
889
|
+
const r = () => {
|
|
890
|
+
e({
|
|
891
|
+
scrollX: window.scrollX,
|
|
892
|
+
scrollY: window.scrollY
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
return window.addEventListener("scroll", r), () => window.removeEventListener("scroll", r);
|
|
896
|
+
}, []), t;
|
|
897
|
+
}, Ce = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]', Pe = (t = !0) => {
|
|
898
|
+
const e = O(null), r = O(null), s = ee(() => {
|
|
899
|
+
e.current && (r.current = e.current.querySelectorAll(Ce));
|
|
900
|
+
}, []);
|
|
901
|
+
return R(() => {
|
|
902
|
+
if (!t || !e.current) return;
|
|
903
|
+
s();
|
|
904
|
+
const o = (c) => {
|
|
905
|
+
if (c.key !== "Tab") return;
|
|
906
|
+
if (!r.current || r.current.length === 0)
|
|
907
|
+
return c.preventDefault();
|
|
908
|
+
const { activeElement: u } = document, f = r.current[0], l = r.current[r.current.length - 1];
|
|
909
|
+
c.shiftKey && u === f ? (l.focus(), c.preventDefault()) : !c.shiftKey && u === l ? (f.focus(), c.preventDefault()) : e.current?.contains(u) || ((c.shiftKey ? l : f).focus(), c.preventDefault());
|
|
910
|
+
}, a = new MutationObserver(s);
|
|
911
|
+
return a.observe(e.current, { childList: !0, subtree: !0 }), document.addEventListener("keydown", o), () => {
|
|
912
|
+
document.removeEventListener("keydown", o), a.disconnect();
|
|
913
|
+
};
|
|
914
|
+
}, [t, s]), e;
|
|
915
|
+
}, nt = (t = {}) => {
|
|
916
|
+
const { active: e = !0, behavior: r, delay: s } = t;
|
|
917
|
+
R(() => {
|
|
918
|
+
const o = window.location.hash;
|
|
919
|
+
if (!e || o?.length <= 1) return;
|
|
920
|
+
const a = o.substring(1);
|
|
921
|
+
if (s !== void 0) {
|
|
922
|
+
const c = setTimeout(() => fe(a, r), s);
|
|
923
|
+
return () => clearTimeout(c);
|
|
924
|
+
}
|
|
925
|
+
fe(a, r);
|
|
926
|
+
}, [e, r, s]);
|
|
927
|
+
}, ot = (t) => {
|
|
928
|
+
R(() => (window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), [t]);
|
|
929
|
+
}, Le = h.forwardRef(
|
|
930
|
+
({
|
|
931
|
+
onClose: t,
|
|
932
|
+
children: e,
|
|
933
|
+
className: r,
|
|
934
|
+
disableEscape: s = !1,
|
|
935
|
+
visible: o,
|
|
936
|
+
onMouseDown: a,
|
|
937
|
+
...c
|
|
938
|
+
}, u) => {
|
|
939
|
+
const f = Pe(o);
|
|
940
|
+
return R(() => {
|
|
941
|
+
const l = (v) => {
|
|
942
|
+
v.key === "Escape" && t?.();
|
|
943
|
+
};
|
|
944
|
+
return s || document.addEventListener("keydown", l), () => {
|
|
945
|
+
s || document.removeEventListener("keydown", l);
|
|
946
|
+
};
|
|
947
|
+
}, [t, s]), /* @__PURE__ */ i.jsx(
|
|
948
|
+
w,
|
|
949
|
+
{
|
|
950
|
+
layout: { axis: "y", align: "center", justify: "center" },
|
|
951
|
+
...c,
|
|
952
|
+
className: m("aui-layer-backdrop", r),
|
|
953
|
+
onMouseDown: (l) => {
|
|
954
|
+
a?.(l), t?.();
|
|
955
|
+
},
|
|
956
|
+
ref: u,
|
|
957
|
+
children: h.cloneElement(e, {
|
|
958
|
+
ref: f,
|
|
959
|
+
onMouseDown: (l) => {
|
|
960
|
+
l.stopPropagation(), e.props?.onMouseDown?.(l);
|
|
961
|
+
}
|
|
962
|
+
})
|
|
963
|
+
}
|
|
964
|
+
);
|
|
965
|
+
}
|
|
966
|
+
), st = h.forwardRef(
|
|
967
|
+
({ returnFocusOnEscape: t, disableScrollLock: e, ...r }, s) => (Oe(!e), R(
|
|
968
|
+
() => () => {
|
|
969
|
+
const o = document.activeElement;
|
|
970
|
+
t || o?.blur?.();
|
|
971
|
+
},
|
|
972
|
+
[t]
|
|
973
|
+
), /* @__PURE__ */ i.jsx(Le, { ...r, visible: !0, ref: s }))
|
|
974
|
+
), xe = h.forwardRef(
|
|
975
|
+
({ LinkElement: t, to: e, className: r, external: s, ...o }, a) => {
|
|
976
|
+
const c = {
|
|
977
|
+
...s ? { target: "_blank", rel: "noreferrer noopener" } : {},
|
|
978
|
+
...o,
|
|
979
|
+
className: m("aui-action", r)
|
|
980
|
+
};
|
|
981
|
+
return t ? /* @__PURE__ */ i.jsx(t, { ...c, to: e, ref: a }) : /* @__PURE__ */ i.jsx("a", { ...c, href: e, ref: a });
|
|
982
|
+
}
|
|
983
|
+
), at = h.forwardRef(({ className: t, variant: e, corners: r, size: s, ...o }, a) => /* @__PURE__ */ i.jsx(
|
|
984
|
+
xe,
|
|
985
|
+
{
|
|
986
|
+
...o,
|
|
987
|
+
className: m(
|
|
988
|
+
pe({ variant: e, corners: r, size: s }),
|
|
989
|
+
t
|
|
990
|
+
),
|
|
991
|
+
ref: a
|
|
992
|
+
}
|
|
993
|
+
)), ct = h.forwardRef(
|
|
994
|
+
({ className: t, ...e }, r) => /* @__PURE__ */ i.jsx(
|
|
995
|
+
xe,
|
|
996
|
+
{
|
|
997
|
+
...e,
|
|
998
|
+
className: m("aui-link", t),
|
|
999
|
+
ref: r
|
|
1000
|
+
}
|
|
1001
|
+
)
|
|
1002
|
+
), Me = ({
|
|
1003
|
+
className: t,
|
|
1004
|
+
options: e,
|
|
1005
|
+
getOptionLabel: r,
|
|
1006
|
+
corners: s = "rounded",
|
|
1007
|
+
style: o,
|
|
1008
|
+
disabled: a,
|
|
1009
|
+
...c
|
|
1010
|
+
}, u) => /* @__PURE__ */ i.jsxs(
|
|
1011
|
+
w,
|
|
1012
|
+
{
|
|
1013
|
+
className: m(
|
|
1014
|
+
"aui-select-container",
|
|
1015
|
+
`aui-corners--${s}`,
|
|
1016
|
+
a ? "aui-select-disabled" : void 0,
|
|
1017
|
+
t
|
|
1018
|
+
),
|
|
1019
|
+
style: o,
|
|
1020
|
+
children: [
|
|
1021
|
+
/* @__PURE__ */ i.jsx(
|
|
1022
|
+
"select",
|
|
1023
|
+
{
|
|
1024
|
+
...c,
|
|
1025
|
+
ref: u,
|
|
1026
|
+
className: `aui-select aui-corners--${s}`,
|
|
1027
|
+
disabled: a,
|
|
1028
|
+
children: e.map((f, l) => /* @__PURE__ */ i.jsx("option", { value: f, children: r?.(f) || f }, l))
|
|
1029
|
+
}
|
|
1030
|
+
),
|
|
1031
|
+
/* @__PURE__ */ i.jsx(H, { icon: "down", className: "aui-select-icon", "aria-hidden": !0 })
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
), it = V(Me), lt = ({ className: t, ...e }) => (
|
|
1035
|
+
// Designed on 2023-08-18
|
|
1036
|
+
/* @__PURE__ */ i.jsx(
|
|
1037
|
+
"svg",
|
|
1038
|
+
{
|
|
1039
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1040
|
+
viewBox: "0 0 512 512",
|
|
1041
|
+
className: m("aui-spinner", t),
|
|
1042
|
+
...e,
|
|
1043
|
+
children: /* @__PURE__ */ i.jsx(
|
|
1044
|
+
"path",
|
|
1045
|
+
{
|
|
1046
|
+
fill: "currentColor",
|
|
1047
|
+
d: "M256,0C114.62,0,0,114.62,0,256S114.62,512,256,512c70.64,0,134.59-28.61,180.91-74.88l-31.11-31.11c-38.35,38.3-91.31,61.99-149.8,61.99-117.08,0-212-94.92-212-212S138.92,44,256,44V0Z"
|
|
1048
|
+
}
|
|
1049
|
+
)
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1052
|
+
);
|
|
1053
|
+
export {
|
|
1054
|
+
Ye as Accordion,
|
|
1055
|
+
Ie as Alert,
|
|
1056
|
+
ke as Animated,
|
|
1057
|
+
Be as Badge,
|
|
1058
|
+
Ue as Banner,
|
|
1059
|
+
w as Box,
|
|
1060
|
+
K as Button,
|
|
1061
|
+
at as ButtonLink,
|
|
1062
|
+
ze as Carousel,
|
|
1063
|
+
We as ClickOutside,
|
|
1064
|
+
He as DoubleCross,
|
|
1065
|
+
Ve as DoubleFlip,
|
|
1066
|
+
Xe as DoubleSpin,
|
|
1067
|
+
qe as Hamburger,
|
|
1068
|
+
H as Icon,
|
|
1069
|
+
et as IconInput,
|
|
1070
|
+
Qe as Input,
|
|
1071
|
+
st as Layer,
|
|
1072
|
+
ct as Link,
|
|
1073
|
+
it as Select,
|
|
1074
|
+
lt as Spinner,
|
|
1075
|
+
Ke as TextArea,
|
|
1076
|
+
Je as TripleFade,
|
|
1077
|
+
Ge as TripleFlip,
|
|
1078
|
+
qe as TriplePrestige,
|
|
1079
|
+
Ze as TripleSpin,
|
|
1080
|
+
te as UnstyledButton,
|
|
1081
|
+
xe as UnstyledLink,
|
|
1082
|
+
Fe as assertDefined,
|
|
1083
|
+
m as classNames,
|
|
1084
|
+
fe as scrollToId,
|
|
1085
|
+
Pe as useFocusTrap,
|
|
1086
|
+
tt as useMediaQuery,
|
|
1087
|
+
rt as useScroll,
|
|
1088
|
+
Oe as useScrollLock,
|
|
1089
|
+
nt as useScrollToHash,
|
|
1090
|
+
ot as useWindowResize
|
|
1091
|
+
};
|