@udixio/ui-react 2.10.14 → 2.10.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.js +606 -594
- package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var ln = Object.defineProperty;
|
|
|
2
2
|
var an = (e, t, n) => t in e ? ln(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var H = (e, t, n) => an(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as u, jsxs as j, Fragment as me } from "react/jsx-runtime";
|
|
5
|
-
import Y, { useState as X, useEffect as _, useMemo as ve, useRef as z, useLayoutEffect as Ae, useId as Ce, useCallback as he, isValidElement as
|
|
5
|
+
import Y, { useState as X, useEffect as _, useMemo as ve, useRef as z, useLayoutEffect as Ae, useId as Ce, useCallback as he, isValidElement as Me, cloneElement as Te, createContext as cn, useContext as vt, Children as un, Fragment as dn } from "react";
|
|
6
6
|
import { createPortal as Ke } from "react-dom";
|
|
7
7
|
import { AnimatePresence as pe, motion as se, useScroll as fn, useMotionValueEvent as it, animate as hn } from "motion/react";
|
|
8
8
|
import { clsx as gt } from "clsx";
|
|
@@ -210,7 +210,7 @@ const Ln = ({
|
|
|
210
210
|
});
|
|
211
211
|
_(() => {
|
|
212
212
|
if (!o.current) return;
|
|
213
|
-
const
|
|
213
|
+
const k = new ResizeObserver((C) => {
|
|
214
214
|
for (const K of C)
|
|
215
215
|
K.target === o.current && f({
|
|
216
216
|
width: K.contentRect.width,
|
|
@@ -218,21 +218,21 @@ const Ln = ({
|
|
|
218
218
|
// On observe aussi la hauteur maintenant
|
|
219
219
|
});
|
|
220
220
|
});
|
|
221
|
-
return
|
|
222
|
-
|
|
221
|
+
return k.observe(o.current), () => {
|
|
222
|
+
k.disconnect();
|
|
223
223
|
};
|
|
224
224
|
}, [o]);
|
|
225
225
|
const h = z(null), m = z(null), b = () => {
|
|
226
|
-
const
|
|
227
|
-
return
|
|
228
|
-
width: n ??
|
|
229
|
-
height: n ??
|
|
226
|
+
const k = d.current;
|
|
227
|
+
return k ? {
|
|
228
|
+
width: n ?? k.scrollWidth,
|
|
229
|
+
height: n ?? k.scrollHeight
|
|
230
230
|
} : null;
|
|
231
231
|
}, w = () => {
|
|
232
|
-
const
|
|
233
|
-
return
|
|
234
|
-
width:
|
|
235
|
-
height:
|
|
232
|
+
const k = o.current;
|
|
233
|
+
return k ? {
|
|
234
|
+
width: k.clientWidth,
|
|
235
|
+
height: k.clientHeight
|
|
236
236
|
// Correction ici pour retourner la bonne hauteur
|
|
237
237
|
} : null;
|
|
238
238
|
}, { scrollYProgress: E, scrollXProgress: S } = fn({
|
|
@@ -240,52 +240,52 @@ const Ln = ({
|
|
|
240
240
|
}), g = z(null);
|
|
241
241
|
g.current || (g.current = kn(
|
|
242
242
|
l,
|
|
243
|
-
(
|
|
244
|
-
!m.current || !h.current || !o.current || (C === (t === "horizontal" ? "x" : "y") && (c == null || c(
|
|
245
|
-
scrollProgress:
|
|
246
|
-
scroll:
|
|
243
|
+
(k, C) => {
|
|
244
|
+
!m.current || !h.current || !o.current || (C === (t === "horizontal" ? "x" : "y") && (c == null || c(k)), r && (t === "horizontal" && C === "x" && r({
|
|
245
|
+
scrollProgress: k,
|
|
246
|
+
scroll: k * (h.current.width - o.current.clientWidth),
|
|
247
247
|
scrollTotal: h.current.width - o.current.clientWidth,
|
|
248
248
|
scrollVisible: m.current.width
|
|
249
249
|
}), t === "vertical" && C === "y" && r({
|
|
250
|
-
scrollProgress:
|
|
251
|
-
scroll:
|
|
250
|
+
scrollProgress: k,
|
|
251
|
+
scroll: k * (h.current.height - o.current.clientHeight),
|
|
252
252
|
scrollTotal: h.current.height - o.current.clientHeight,
|
|
253
253
|
scrollVisible: m.current.height
|
|
254
254
|
})));
|
|
255
255
|
}
|
|
256
256
|
));
|
|
257
|
-
const A = (
|
|
258
|
-
g.current && g.current(
|
|
257
|
+
const A = (k, C) => {
|
|
258
|
+
g.current && g.current(k, C);
|
|
259
259
|
};
|
|
260
260
|
_(() => {
|
|
261
261
|
y.width && A(S.get(), "x"), y.height && A(E.get(), "y");
|
|
262
262
|
}, [y]), _(() => {
|
|
263
|
-
const
|
|
264
|
-
if (!
|
|
263
|
+
const k = o.current, C = d.current;
|
|
264
|
+
if (!k || !C || typeof i != "number") return;
|
|
265
265
|
const K = (G, ee, oe) => Math.min(oe, Math.max(ee, G));
|
|
266
266
|
if (t === "horizontal") {
|
|
267
|
-
const G = Math.max(0, (n ?? C.scrollWidth) -
|
|
268
|
-
|
|
267
|
+
const G = Math.max(0, (n ?? C.scrollWidth) - k.clientWidth);
|
|
268
|
+
k.scrollLeft = K(i * G, 0, G);
|
|
269
269
|
} else {
|
|
270
|
-
const G = Math.max(0, (n ?? C.scrollHeight) -
|
|
271
|
-
|
|
270
|
+
const G = Math.max(0, (n ?? C.scrollHeight) - k.clientHeight);
|
|
271
|
+
k.scrollTop = K(i * G, 0, G);
|
|
272
272
|
}
|
|
273
|
-
}, [i, t, n]), it(S, "change", (
|
|
274
|
-
A(
|
|
275
|
-
}), it(E, "change", (
|
|
276
|
-
A(
|
|
273
|
+
}, [i, t, n]), it(S, "change", (k) => {
|
|
274
|
+
A(k, "x");
|
|
275
|
+
}), it(E, "change", (k) => {
|
|
276
|
+
A(k, "y");
|
|
277
277
|
});
|
|
278
|
-
const [
|
|
278
|
+
const [I, v] = X(!1);
|
|
279
279
|
Ae(() => {
|
|
280
|
-
|
|
280
|
+
I || !m.current || !h.current || !r || (r({
|
|
281
281
|
scrollProgress: 0,
|
|
282
282
|
scroll: 0,
|
|
283
283
|
scrollTotal: t == "vertical" ? h.current.height : h.current.width,
|
|
284
284
|
scrollVisible: t == "vertical" ? m.current.height : m.current.width
|
|
285
285
|
}), v(!0));
|
|
286
286
|
}, [m, h, r]), h.current = b(), m.current = w();
|
|
287
|
-
const [
|
|
288
|
-
isDragging:
|
|
287
|
+
const [N, D] = X(!1), M = Nn({
|
|
288
|
+
isDragging: N,
|
|
289
289
|
children: e,
|
|
290
290
|
className: s,
|
|
291
291
|
onScroll: r,
|
|
@@ -293,31 +293,31 @@ const Ln = ({
|
|
|
293
293
|
scrollSize: n,
|
|
294
294
|
draggable: a,
|
|
295
295
|
throttleDuration: l
|
|
296
|
-
}), [O, L] = X(0), [J, V] = X(0), te = (
|
|
296
|
+
}), [O, L] = X(0), [J, V] = X(0), te = (k) => {
|
|
297
297
|
if (!a) return;
|
|
298
298
|
const C = o.current;
|
|
299
299
|
if (!C || O == null) return;
|
|
300
|
-
const G = (
|
|
300
|
+
const G = (k.pageX - C.offsetLeft - O) * 1.5;
|
|
301
301
|
C.scrollLeft = J - G;
|
|
302
|
-
}, U = (
|
|
302
|
+
}, U = (k) => {
|
|
303
303
|
const C = o.current;
|
|
304
|
-
C && (
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
}, $ = (
|
|
312
|
-
|
|
304
|
+
C && (D(!0), L(k.pageX - C.offsetLeft), V(C.scrollLeft));
|
|
305
|
+
}, W = (k) => {
|
|
306
|
+
N && (k.preventDefault(), te(k));
|
|
307
|
+
}, R = () => {
|
|
308
|
+
D(!1);
|
|
309
|
+
}, T = () => {
|
|
310
|
+
D(!1);
|
|
311
|
+
}, $ = (k) => {
|
|
312
|
+
k.preventDefault();
|
|
313
313
|
}, P = z(null);
|
|
314
314
|
return _(() => () => {
|
|
315
315
|
P.current && clearTimeout(P.current);
|
|
316
316
|
}, []), _(() => {
|
|
317
|
-
const
|
|
318
|
-
if (!
|
|
317
|
+
const k = o.current;
|
|
318
|
+
if (!k) return;
|
|
319
319
|
const C = (K) => {
|
|
320
|
-
var le,
|
|
320
|
+
var le, F, q, B;
|
|
321
321
|
const G = K.detail, ee = o.current;
|
|
322
322
|
if (!ee || !G) return;
|
|
323
323
|
const oe = G.orientation ?? t;
|
|
@@ -331,7 +331,7 @@ const Ln = ({
|
|
|
331
331
|
} else {
|
|
332
332
|
const re = Math.max(
|
|
333
333
|
0,
|
|
334
|
-
(((
|
|
334
|
+
(((F = h.current) == null ? void 0 : F.height) ?? 0) - ee.clientHeight
|
|
335
335
|
);
|
|
336
336
|
ee.scrollTop = Math.min(re, Math.max(0, G.progress * re));
|
|
337
337
|
}
|
|
@@ -345,27 +345,27 @@ const Ln = ({
|
|
|
345
345
|
} else {
|
|
346
346
|
const re = Math.max(
|
|
347
347
|
0,
|
|
348
|
-
(((
|
|
348
|
+
(((B = h.current) == null ? void 0 : B.height) ?? 0) - ee.clientHeight
|
|
349
349
|
);
|
|
350
350
|
ee.scrollTop = Math.min(re, Math.max(0, G.scroll));
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
return
|
|
354
|
-
|
|
353
|
+
return k.addEventListener("udx:customScroll:set", C), () => {
|
|
354
|
+
k.removeEventListener("udx:customScroll:set", C);
|
|
355
355
|
};
|
|
356
356
|
}, [t]), /* @__PURE__ */ j(
|
|
357
357
|
"div",
|
|
358
358
|
{
|
|
359
|
-
className:
|
|
359
|
+
className: M.customScroll,
|
|
360
360
|
ref: o,
|
|
361
361
|
onMouseDown: U,
|
|
362
|
-
onMouseMove:
|
|
363
|
-
onMouseUp:
|
|
364
|
-
onMouseLeave:
|
|
362
|
+
onMouseMove: W,
|
|
363
|
+
onMouseUp: R,
|
|
364
|
+
onMouseLeave: T,
|
|
365
365
|
onDragStart: $,
|
|
366
|
-
onScroll: (
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
onScroll: (k) => {
|
|
367
|
+
N || (L(null), D(!0), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
368
|
+
D(!1);
|
|
369
369
|
}, 1e3));
|
|
370
370
|
},
|
|
371
371
|
children: [
|
|
@@ -374,7 +374,7 @@ const Ln = ({
|
|
|
374
374
|
{
|
|
375
375
|
ref: d,
|
|
376
376
|
style: t === "vertical" ? { height: ((Z = m == null ? void 0 : m.current) == null ? void 0 : Z.height) ?? "100%" } : { width: ((x = m == null ? void 0 : m.current) == null ? void 0 : x.width) ?? "100%" },
|
|
377
|
-
className:
|
|
377
|
+
className: M.track,
|
|
378
378
|
children: e
|
|
379
379
|
}
|
|
380
380
|
),
|
|
@@ -406,11 +406,11 @@ var En = "1.3.17";
|
|
|
406
406
|
function xt(e, t, n) {
|
|
407
407
|
return Math.max(e, Math.min(t, n));
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Mn(e, t, n) {
|
|
410
410
|
return (1 - n) * e + n * t;
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
return
|
|
412
|
+
function In(e, t, n, r) {
|
|
413
|
+
return Mn(e, t, 1 - Math.exp(-n * r));
|
|
414
414
|
}
|
|
415
415
|
function Cn(e, t) {
|
|
416
416
|
return (e % t + t) % t;
|
|
@@ -443,7 +443,7 @@ var Dn = class {
|
|
|
443
443
|
t = r >= 1;
|
|
444
444
|
const s = t ? 1 : this.easing(r);
|
|
445
445
|
this.value = this.from + (this.to - this.from) * s;
|
|
446
|
-
} else this.lerp ? (this.value =
|
|
446
|
+
} else this.lerp ? (this.value = In(this.value, this.to, this.lerp * 60, e), Math.round(this.value) === this.to && (this.value = this.to, t = !0)) : (this.value = this.to, t = !0);
|
|
447
447
|
t && this.stop(), (n = this.onUpdate) == null || n.call(this, this.value, t);
|
|
448
448
|
}
|
|
449
449
|
/** Stop the animation */
|
|
@@ -642,7 +642,7 @@ var $n = class {
|
|
|
642
642
|
xe
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
}, at = (e) => Math.min(1, 1.001 - Math.pow(2, -10 * e)),
|
|
645
|
+
}, at = (e) => Math.min(1, 1.001 - Math.pow(2, -10 * e)), Fn = class {
|
|
646
646
|
constructor({
|
|
647
647
|
wrapper: e = window,
|
|
648
648
|
content: t = document.documentElement,
|
|
@@ -668,13 +668,13 @@ var $n = class {
|
|
|
668
668
|
overscroll: S = !0,
|
|
669
669
|
autoRaf: g = !1,
|
|
670
670
|
anchors: A = !1,
|
|
671
|
-
autoToggle:
|
|
671
|
+
autoToggle: I = !1,
|
|
672
672
|
// https://caniuse.com/?search=transition-behavior
|
|
673
673
|
allowNestedScroll: v = !1,
|
|
674
674
|
// @ts-ignore: this will be deprecated in the future
|
|
675
|
-
__experimental__naiveDimensions:
|
|
676
|
-
naiveDimensions:
|
|
677
|
-
stopInertiaOnNavigate:
|
|
675
|
+
__experimental__naiveDimensions: N = !1,
|
|
676
|
+
naiveDimensions: D = N,
|
|
677
|
+
stopInertiaOnNavigate: M = !1
|
|
678
678
|
} = {}) {
|
|
679
679
|
H(this, "_isScrolling", !1);
|
|
680
680
|
// true when scroll is animating
|
|
@@ -870,10 +870,10 @@ var $n = class {
|
|
|
870
870
|
overscroll: S,
|
|
871
871
|
autoRaf: g,
|
|
872
872
|
anchors: A,
|
|
873
|
-
autoToggle:
|
|
873
|
+
autoToggle: I,
|
|
874
874
|
allowNestedScroll: v,
|
|
875
|
-
naiveDimensions:
|
|
876
|
-
stopInertiaOnNavigate:
|
|
875
|
+
naiveDimensions: D,
|
|
876
|
+
stopInertiaOnNavigate: M
|
|
877
877
|
}, this.dimensions = new $n(e, t, { autoResize: b }), this.updateClassName(), this.targetScroll = this.animatedScroll = this.actualScroll, this.options.wrapper.addEventListener("scroll", this.onNativeScroll, !1), this.options.wrapper.addEventListener("scrollend", this.onScrollEnd, {
|
|
878
878
|
capture: !0
|
|
879
879
|
}), (this.options.anchors || this.options.stopInertiaOnNavigate) && this.options.wrapper.addEventListener(
|
|
@@ -1066,10 +1066,10 @@ var $n = class {
|
|
|
1066
1066
|
const h = this.options.gestureOrientation;
|
|
1067
1067
|
if (r - (s.time ?? 0) > 2e3) {
|
|
1068
1068
|
s.time = Date.now();
|
|
1069
|
-
const
|
|
1070
|
-
s.computedStyle =
|
|
1071
|
-
const v =
|
|
1072
|
-
if (a = ["auto", "overlay", "scroll"].includes(v), l = ["auto", "overlay", "scroll"].includes(
|
|
1069
|
+
const I = window.getComputedStyle(e);
|
|
1070
|
+
s.computedStyle = I;
|
|
1071
|
+
const v = I.overflowX, N = I.overflowY;
|
|
1072
|
+
if (a = ["auto", "overlay", "scroll"].includes(v), l = ["auto", "overlay", "scroll"].includes(N), s.hasOverflowX = a, s.hasOverflowY = l, !a && !l || h === "vertical" && !l || h === "horizontal" && !a) return !1;
|
|
1073
1073
|
o = e.scrollWidth, d = e.scrollHeight, y = e.clientWidth, f = e.clientHeight, i = o > y, c = d > f, s.isScrollableX = i, s.isScrollableY = c, s.scrollWidth = o, s.scrollHeight = d, s.clientWidth = y, s.clientHeight = f;
|
|
1074
1074
|
} else
|
|
1075
1075
|
i = s.isScrollableX, c = s.isScrollableY, a = s.hasOverflowX, l = s.hasOverflowY, o = s.scrollWidth, d = s.scrollHeight, y = s.clientWidth, f = s.clientHeight;
|
|
@@ -1081,8 +1081,8 @@ var $n = class {
|
|
|
1081
1081
|
else if (h === "vertical")
|
|
1082
1082
|
m = "y";
|
|
1083
1083
|
else {
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1084
|
+
const I = t !== 0, v = n !== 0;
|
|
1085
|
+
I && a && i && (m = "x"), v && l && c && (m = "y");
|
|
1086
1086
|
}
|
|
1087
1087
|
if (!m) return !1;
|
|
1088
1088
|
let b, w, E, S, g;
|
|
@@ -1191,7 +1191,7 @@ const ts = ({
|
|
|
1191
1191
|
let c;
|
|
1192
1192
|
typeof e == "string" ? e.endsWith("ms") ? c = parseFloat(e) / 1e3 : e.endsWith("s") ? c = parseFloat(e) : c = parseFloat(e) || 1.2 : c = e;
|
|
1193
1193
|
const o = (y) => 1 - Math.pow(1 - y, 5);
|
|
1194
|
-
l.current = new
|
|
1194
|
+
l.current = new Fn({
|
|
1195
1195
|
duration: c,
|
|
1196
1196
|
easing: t ?? o,
|
|
1197
1197
|
orientation: n,
|
|
@@ -1244,7 +1244,7 @@ const ts = ({
|
|
|
1244
1244
|
]
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
|
-
},
|
|
1247
|
+
}, Wn = ({
|
|
1248
1248
|
isClient: e,
|
|
1249
1249
|
stateClassName: t
|
|
1250
1250
|
}) => ({
|
|
@@ -1254,7 +1254,7 @@ const ts = ({
|
|
|
1254
1254
|
])
|
|
1255
1255
|
}), Pn = ne(
|
|
1256
1256
|
"stateLayer",
|
|
1257
|
-
|
|
1257
|
+
Wn
|
|
1258
1258
|
), On = ({
|
|
1259
1259
|
targetRef: e,
|
|
1260
1260
|
children: t
|
|
@@ -1284,7 +1284,7 @@ const ts = ({
|
|
|
1284
1284
|
};
|
|
1285
1285
|
}, [e]), n ? Ke(/* @__PURE__ */ u("div", { style: n, children: t }), document.body) : null;
|
|
1286
1286
|
};
|
|
1287
|
-
function
|
|
1287
|
+
function Tn(e) {
|
|
1288
1288
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
|
|
1289
1289
|
}
|
|
1290
1290
|
const ns = ({
|
|
@@ -1310,9 +1310,9 @@ const ns = ({
|
|
|
1310
1310
|
),
|
|
1311
1311
|
{ type: "module" }
|
|
1312
1312
|
);
|
|
1313
|
-
c.current = A, A.onmessage = (
|
|
1313
|
+
c.current = A, A.onmessage = (I) => {
|
|
1314
1314
|
var v;
|
|
1315
|
-
|
|
1315
|
+
I.data.id > d.current && (d.current = I.data.id, f.current = !0, i(I.data.css), (v = h.current) == null || v.call(h, y.current));
|
|
1316
1316
|
};
|
|
1317
1317
|
})(), () => {
|
|
1318
1318
|
var g;
|
|
@@ -1325,24 +1325,24 @@ const ns = ({
|
|
|
1325
1325
|
const S = {
|
|
1326
1326
|
...e,
|
|
1327
1327
|
sourceColor: e.sourceColor
|
|
1328
|
-
}, g = Date.now(), A = g - b.current,
|
|
1328
|
+
}, g = Date.now(), A = g - b.current, I = async (v) => {
|
|
1329
1329
|
await E(v);
|
|
1330
1330
|
};
|
|
1331
1331
|
if (b.current === 0 || A >= t)
|
|
1332
|
-
m.current && (clearTimeout(m.current), m.current = null), w.current = null, b.current = g,
|
|
1332
|
+
m.current && (clearTimeout(m.current), m.current = null), w.current = null, b.current = g, I(S);
|
|
1333
1333
|
else if (w.current = S, !m.current) {
|
|
1334
1334
|
const v = Math.max(0, t - A);
|
|
1335
1335
|
m.current = setTimeout(async () => {
|
|
1336
1336
|
m.current = null;
|
|
1337
|
-
const
|
|
1338
|
-
w.current = null,
|
|
1337
|
+
const N = w.current;
|
|
1338
|
+
w.current = null, N && (b.current = Date.now(), await I(N));
|
|
1339
1339
|
}, v);
|
|
1340
1340
|
}
|
|
1341
1341
|
return () => {
|
|
1342
1342
|
};
|
|
1343
1343
|
}, [e, t, s]);
|
|
1344
1344
|
const E = async (S) => {
|
|
1345
|
-
if (typeof S.sourceColor == "string" && !
|
|
1345
|
+
if (typeof S.sourceColor == "string" && !Tn(S.sourceColor))
|
|
1346
1346
|
throw new Error("Invalid hex color");
|
|
1347
1347
|
const g = y.current;
|
|
1348
1348
|
if (!g) return;
|
|
@@ -1350,23 +1350,35 @@ const ns = ({
|
|
|
1350
1350
|
const A = c.current;
|
|
1351
1351
|
if (!A || !f.current) {
|
|
1352
1352
|
await g.load();
|
|
1353
|
-
const
|
|
1354
|
-
i(
|
|
1353
|
+
const D = g.plugins.getPlugin(Ue).getInstance().outputCss;
|
|
1354
|
+
i(D), f.current = !0, n == null || n(g);
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
|
-
const
|
|
1357
|
+
const I = ++o.current, v = g.plugins.getPlugin(Ue).options, N = g.plugins.getPlugin(wt).options;
|
|
1358
1358
|
A.postMessage({
|
|
1359
|
-
id:
|
|
1359
|
+
id: I,
|
|
1360
1360
|
snapshot: yn(g),
|
|
1361
|
-
|
|
1362
|
-
|
|
1361
|
+
// Ne passer que les champs primitifs : TailwindPlugin.options stocke le ConfigInterface
|
|
1362
|
+
// complet (palettes inclus) qui peut contenir des fonctions non-clonables.
|
|
1363
|
+
tailwindOptions: {
|
|
1364
|
+
darkMode: v.darkMode,
|
|
1365
|
+
dynamicSelector: v.dynamicSelector,
|
|
1366
|
+
darkSelector: v.darkSelector,
|
|
1367
|
+
responsiveBreakPoints: v.responsiveBreakPoints,
|
|
1368
|
+
styleFilePath: v.styleFilePath,
|
|
1369
|
+
subThemes: v.subThemes
|
|
1370
|
+
},
|
|
1371
|
+
fontOptions: {
|
|
1372
|
+
fontFamily: N.fontFamily,
|
|
1373
|
+
fontStyles: N.fontStyles
|
|
1374
|
+
}
|
|
1363
1375
|
});
|
|
1364
1376
|
};
|
|
1365
1377
|
return _(() => () => {
|
|
1366
1378
|
m.current && (clearTimeout(m.current), m.current = null);
|
|
1367
1379
|
}, []), l ? /* @__PURE__ */ u("style", { dangerouslySetInnerHTML: { __html: l } }) : null;
|
|
1368
1380
|
};
|
|
1369
|
-
function
|
|
1381
|
+
function Bn() {
|
|
1370
1382
|
if (typeof window > "u") return !1;
|
|
1371
1383
|
try {
|
|
1372
1384
|
if (window.CSS && typeof window.CSS.supports == "function")
|
|
@@ -1464,7 +1476,7 @@ function Nt(e = {}) {
|
|
|
1464
1476
|
if (Hn())
|
|
1465
1477
|
return () => {
|
|
1466
1478
|
};
|
|
1467
|
-
const r =
|
|
1479
|
+
const r = Bn(), s = /* @__PURE__ */ new WeakSet();
|
|
1468
1480
|
let a = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, l = !0;
|
|
1469
1481
|
const i = () => {
|
|
1470
1482
|
const h = window.pageYOffset || window.scrollY || 0;
|
|
@@ -1535,7 +1547,7 @@ function Nt(e = {}) {
|
|
|
1535
1547
|
d && d(), typeof window < "u" && window.removeEventListener("scroll", i), c.disconnect();
|
|
1536
1548
|
};
|
|
1537
1549
|
}
|
|
1538
|
-
const rs = Nt, ss = Nt,
|
|
1550
|
+
const rs = Nt, ss = Nt, Fe = ({
|
|
1539
1551
|
anchorRef: e,
|
|
1540
1552
|
position: t = "bottom",
|
|
1541
1553
|
children: n,
|
|
@@ -1741,16 +1753,16 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
1741
1753
|
), Un = ne(
|
|
1742
1754
|
"carouselItem",
|
|
1743
1755
|
Et
|
|
1744
|
-
),
|
|
1756
|
+
), Mt = () => ({
|
|
1745
1757
|
carousel: p(["w-full h-[400px]"]),
|
|
1746
1758
|
track: p("flex h-full w-full")
|
|
1747
1759
|
}), as = ie(
|
|
1748
1760
|
"carousel",
|
|
1749
|
-
|
|
1761
|
+
Mt
|
|
1750
1762
|
), qn = ne(
|
|
1751
1763
|
"carousel",
|
|
1752
|
-
|
|
1753
|
-
),
|
|
1764
|
+
Mt
|
|
1765
|
+
), It = ({
|
|
1754
1766
|
isChecked: e,
|
|
1755
1767
|
isIndeterminate: t,
|
|
1756
1768
|
isDisabled: n,
|
|
@@ -1796,10 +1808,10 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
1796
1808
|
stateLayer: "size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
1797
1809
|
}), cs = ie(
|
|
1798
1810
|
"checkbox",
|
|
1799
|
-
|
|
1811
|
+
It
|
|
1800
1812
|
), jn = ne(
|
|
1801
1813
|
"checkbox",
|
|
1802
|
-
|
|
1814
|
+
It
|
|
1803
1815
|
), Ct = ({
|
|
1804
1816
|
variant: e,
|
|
1805
1817
|
disabled: t,
|
|
@@ -1927,7 +1939,7 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
1927
1939
|
), Qn = ne(
|
|
1928
1940
|
"fabMenu",
|
|
1929
1941
|
At
|
|
1930
|
-
),
|
|
1942
|
+
), Ft = ({
|
|
1931
1943
|
variant: e,
|
|
1932
1944
|
disabled: t,
|
|
1933
1945
|
onToggle: n,
|
|
@@ -2061,11 +2073,11 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2061
2073
|
)
|
|
2062
2074
|
}), ps = ie(
|
|
2063
2075
|
"iconButton",
|
|
2064
|
-
|
|
2076
|
+
Ft
|
|
2065
2077
|
), er = ne(
|
|
2066
2078
|
"iconButton",
|
|
2067
|
-
|
|
2068
|
-
),
|
|
2079
|
+
Ft
|
|
2080
|
+
), Wt = ({
|
|
2069
2081
|
variant: e,
|
|
2070
2082
|
hasGroups: t
|
|
2071
2083
|
}) => ({
|
|
@@ -2081,9 +2093,9 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2081
2093
|
"bg-transparent ": t
|
|
2082
2094
|
}
|
|
2083
2095
|
)
|
|
2084
|
-
}), ys = ie("menu",
|
|
2096
|
+
}), ys = ie("menu", Wt), tr = ne(
|
|
2085
2097
|
"menu",
|
|
2086
|
-
|
|
2098
|
+
Wt
|
|
2087
2099
|
), Pt = ({
|
|
2088
2100
|
variant: e
|
|
2089
2101
|
}) => ({
|
|
@@ -2154,7 +2166,7 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2154
2166
|
), rr = ne(
|
|
2155
2167
|
"progressIndicator",
|
|
2156
2168
|
Ot
|
|
2157
|
-
),
|
|
2169
|
+
), Tt = ({
|
|
2158
2170
|
variant: e,
|
|
2159
2171
|
position: t
|
|
2160
2172
|
}) => ({
|
|
@@ -2181,11 +2193,11 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2181
2193
|
overlay: p("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")
|
|
2182
2194
|
}), sr = ie(
|
|
2183
2195
|
"sideSheet",
|
|
2184
|
-
|
|
2196
|
+
Tt
|
|
2185
2197
|
), ws = ne(
|
|
2186
2198
|
"sideSheet",
|
|
2187
|
-
|
|
2188
|
-
),
|
|
2199
|
+
Tt
|
|
2200
|
+
), Bt = ({
|
|
2189
2201
|
isChanging: e
|
|
2190
2202
|
}) => ({
|
|
2191
2203
|
slider: p([
|
|
@@ -2209,10 +2221,10 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2209
2221
|
])
|
|
2210
2222
|
}), bs = ie(
|
|
2211
2223
|
"slider",
|
|
2212
|
-
|
|
2224
|
+
Bt
|
|
2213
2225
|
), or = ne(
|
|
2214
2226
|
"slider",
|
|
2215
|
-
|
|
2227
|
+
Bt
|
|
2216
2228
|
), Ht = () => ({
|
|
2217
2229
|
snackbar: p(" rounded bg-inverse-surface "),
|
|
2218
2230
|
container: p(
|
|
@@ -2454,7 +2466,7 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2454
2466
|
r == "filled" && " pb-2 pt-6",
|
|
2455
2467
|
r == "outlined" && "py-4 relative z-10"
|
|
2456
2468
|
)
|
|
2457
|
-
}),
|
|
2469
|
+
}), Ms = ie(
|
|
2458
2470
|
"textField",
|
|
2459
2471
|
Ut
|
|
2460
2472
|
), fr = ne(
|
|
@@ -2488,7 +2500,7 @@ const rs = Nt, ss = Nt, We = ({
|
|
|
2488
2500
|
subHead: p("text-title-small mb-1", t == "plain" && "hidden"),
|
|
2489
2501
|
supportingText: p(""),
|
|
2490
2502
|
content: p("w-full")
|
|
2491
|
-
}),
|
|
2503
|
+
}), Is = ie(
|
|
2492
2504
|
"toolTip",
|
|
2493
2505
|
qt
|
|
2494
2506
|
), hr = ne(
|
|
@@ -2772,13 +2784,13 @@ const Le = ({
|
|
|
2772
2784
|
"Button component requires either a label prop or children content"
|
|
2773
2785
|
);
|
|
2774
2786
|
e = pr(e);
|
|
2775
|
-
const g = r ? "a" : "button", A = z(null),
|
|
2787
|
+
const g = r ? "a" : "button", A = z(null), I = h || A, [v, N] = Y.useState(f);
|
|
2776
2788
|
_(() => {
|
|
2777
|
-
|
|
2789
|
+
N(f);
|
|
2778
2790
|
}, [f]), w = { duration: 0.3, ...w };
|
|
2779
|
-
const
|
|
2780
|
-
t && L.preventDefault(), y ? (
|
|
2781
|
-
},
|
|
2791
|
+
const D = (L) => {
|
|
2792
|
+
t && L.preventDefault(), y ? (N(!v), y(!v)) : d && d(L);
|
|
2793
|
+
}, M = _n({
|
|
2782
2794
|
allowShapeTransformation: b,
|
|
2783
2795
|
size: m,
|
|
2784
2796
|
disableTextMargins: a,
|
|
@@ -2796,25 +2808,25 @@ const Le = ({
|
|
|
2796
2808
|
activated: v,
|
|
2797
2809
|
label: s,
|
|
2798
2810
|
children: s
|
|
2799
|
-
}), O = n ? /* @__PURE__ */ u(fe, { icon: n, className:
|
|
2811
|
+
}), O = n ? /* @__PURE__ */ u(fe, { icon: n, className: M.icon }) : /* @__PURE__ */ u(me, {});
|
|
2800
2812
|
return /* @__PURE__ */ j(
|
|
2801
2813
|
g,
|
|
2802
2814
|
{
|
|
2803
|
-
ref:
|
|
2815
|
+
ref: I,
|
|
2804
2816
|
href: r,
|
|
2805
|
-
className:
|
|
2817
|
+
className: M.button,
|
|
2806
2818
|
...S,
|
|
2807
|
-
onClick:
|
|
2819
|
+
onClick: D,
|
|
2808
2820
|
disabled: t,
|
|
2809
2821
|
"aria-pressed": y ? v : void 0,
|
|
2810
2822
|
style: { transition: w.duration + "s" },
|
|
2811
2823
|
children: [
|
|
2812
|
-
/* @__PURE__ */ u("div", { className:
|
|
2824
|
+
/* @__PURE__ */ u("div", { className: M.touchTarget }),
|
|
2813
2825
|
/* @__PURE__ */ u(
|
|
2814
2826
|
be,
|
|
2815
2827
|
{
|
|
2816
2828
|
style: { transition: w.duration + "s" },
|
|
2817
|
-
className:
|
|
2829
|
+
className: M.stateLayer,
|
|
2818
2830
|
colorName: p(
|
|
2819
2831
|
e === "filled" && {
|
|
2820
2832
|
"on-surface-variant": !v && !!y,
|
|
@@ -2875,7 +2887,7 @@ const Le = ({
|
|
|
2875
2887
|
)
|
|
2876
2888
|
}
|
|
2877
2889
|
),
|
|
2878
|
-
/* @__PURE__ */ u("span", { className:
|
|
2890
|
+
/* @__PURE__ */ u("span", { className: M.label, children: s }),
|
|
2879
2891
|
i === "right" && O
|
|
2880
2892
|
]
|
|
2881
2893
|
}
|
|
@@ -2970,73 +2982,73 @@ const Le = ({
|
|
|
2970
2982
|
scrollTotal: 0,
|
|
2971
2983
|
scrollVisible: 0,
|
|
2972
2984
|
scroll: 0
|
|
2973
|
-
}), g = z(0), A = z(null),
|
|
2974
|
-
|
|
2975
|
-
|
|
2985
|
+
}), g = z(0), A = z(null), I = z([]).current, [v, N] = X(0);
|
|
2986
|
+
I.length !== w.length && (I.length = 0, w.forEach(($, P) => {
|
|
2987
|
+
I[P] = Y.createRef();
|
|
2976
2988
|
}));
|
|
2977
|
-
const
|
|
2989
|
+
const D = he(() => {
|
|
2978
2990
|
if (!E.current || !m.current) return;
|
|
2979
2991
|
const $ = g.current, P = S.current.scrollVisible || m.current.clientWidth || 0;
|
|
2980
|
-
function Z(
|
|
2981
|
-
return
|
|
2982
|
-
const De = (ce - re) / Math.abs(
|
|
2992
|
+
function Z(B, re) {
|
|
2993
|
+
return B.map((ce, Se) => {
|
|
2994
|
+
const De = (ce - re) / Math.abs(B[1] - B[0]);
|
|
2983
2995
|
return { itemScrollXCenter: ce, relativeIndex: De, index: Se, width: 0 };
|
|
2984
2996
|
});
|
|
2985
2997
|
}
|
|
2986
|
-
const x = w.map((
|
|
2998
|
+
const x = w.map((B, re) => {
|
|
2987
2999
|
const ce = re / Math.max(1, w.length - 1);
|
|
2988
3000
|
return Ee(ce, [0, 1], [0, 1]);
|
|
2989
|
-
}),
|
|
3001
|
+
}), k = Z(
|
|
2990
3002
|
x,
|
|
2991
3003
|
$
|
|
2992
|
-
).sort((
|
|
3004
|
+
).sort((B, re) => B.index - re.index);
|
|
2993
3005
|
let C = P + i + l[0] + i, K = v;
|
|
2994
|
-
const G =
|
|
3006
|
+
const G = k.sort((B, re) => Math.abs(B.relativeIndex) - Math.abs(re.relativeIndex)).map((B, re) => {
|
|
2995
3007
|
if (!(C <= 0)) {
|
|
2996
|
-
if (re === 0 && (K =
|
|
3008
|
+
if (re === 0 && (K = B.index), B.width = Ee(
|
|
2997
3009
|
C - i,
|
|
2998
3010
|
[l[0], l[1]],
|
|
2999
3011
|
[l[0], l[1]]
|
|
3000
|
-
), C -=
|
|
3001
|
-
const ce =
|
|
3002
|
-
C +=
|
|
3003
|
-
} else if (C === 0 &&
|
|
3004
|
-
const ce =
|
|
3005
|
-
C +=
|
|
3012
|
+
), C -= B.width + i, C !== 0 && C < (l[0] + i) * 2) {
|
|
3013
|
+
const ce = B.width - ((l[0] + i) * 2 - C);
|
|
3014
|
+
C += B.width, B.width = ce, C -= B.width;
|
|
3015
|
+
} else if (C === 0 && B.width >= l[0] * 2 + i) {
|
|
3016
|
+
const ce = B.width - (l[0] + i - C);
|
|
3017
|
+
C += B.width, B.width = ce, C -= B.width;
|
|
3006
3018
|
}
|
|
3007
|
-
return
|
|
3019
|
+
return B;
|
|
3008
3020
|
}
|
|
3009
|
-
}).filter(Boolean), ee = [...G].reverse(), oe = [...G].sort((
|
|
3010
|
-
ee.forEach((
|
|
3021
|
+
}).filter(Boolean), ee = [...G].reverse(), oe = [...G].sort((B, re) => Math.abs(B.index) - Math.abs(re.index));
|
|
3022
|
+
ee.forEach((B, re) => {
|
|
3011
3023
|
const ce = ee[re + 1];
|
|
3012
3024
|
if (!ce) return;
|
|
3013
|
-
const Se = 1 - (Math.abs(
|
|
3014
|
-
C +=
|
|
3025
|
+
const Se = 1 - (Math.abs(B.relativeIndex) - Math.abs(ce.relativeIndex)), De = Ee(Se, [0, 2], [B.width + C, ce.width]);
|
|
3026
|
+
C += B.width, B.width = De, C -= B.width;
|
|
3015
3027
|
});
|
|
3016
|
-
const le = G.length / 2,
|
|
3028
|
+
const le = G.length / 2, F = Ee(
|
|
3017
3029
|
Math.abs(oe[0].relativeIndex),
|
|
3018
3030
|
[oe[0].index === 0 ? 0 : le - 1, le],
|
|
3019
3031
|
[0, 1]
|
|
3020
|
-
), q = Ee(
|
|
3021
|
-
|
|
3022
|
-
if (
|
|
3032
|
+
), q = Ee(F, [0, 1], [0, 1]) * -(l[0] + i);
|
|
3033
|
+
I.forEach((B, re) => {
|
|
3034
|
+
if (B.current) {
|
|
3023
3035
|
const ce = G.find((Se) => Se.index === re);
|
|
3024
|
-
ce ? (
|
|
3036
|
+
ce ? (B.current.style.setProperty("--carousel-item-width", `${ce.width}px`), B.current.style.display = "block") : (B.current.style.setProperty("--carousel-item-width", `${l[0]}px`), B.current.style.display = "none");
|
|
3025
3037
|
}
|
|
3026
|
-
}), E.current.style.transform = `translateX(${q}px)`, K !== v &&
|
|
3038
|
+
}), E.current.style.transform = `translateX(${q}px)`, K !== v && N(K);
|
|
3027
3039
|
}, [w.length, l, i, v]);
|
|
3028
3040
|
Ae(() => {
|
|
3029
|
-
|
|
3030
|
-
}, [
|
|
3041
|
+
D();
|
|
3042
|
+
}, [D, w.length]), _(() => {
|
|
3031
3043
|
c && c(v);
|
|
3032
3044
|
}, [v, c]);
|
|
3033
|
-
const [
|
|
3045
|
+
const [M, O] = X(0);
|
|
3034
3046
|
_(() => {
|
|
3035
3047
|
O(v);
|
|
3036
3048
|
}, [v]);
|
|
3037
3049
|
const L = ($, P = {}) => {
|
|
3038
3050
|
if (!w.length) return 0;
|
|
3039
|
-
const Z =
|
|
3051
|
+
const Z = I[$];
|
|
3040
3052
|
if (!Z || !Z.current || !E.current) return 0;
|
|
3041
3053
|
const x = Ee(
|
|
3042
3054
|
$ / Math.max(1, w.length - 1),
|
|
@@ -3068,9 +3080,9 @@ const Le = ({
|
|
|
3068
3080
|
damping: 32,
|
|
3069
3081
|
mass: 0.6,
|
|
3070
3082
|
restDelta: 5e-4,
|
|
3071
|
-
onUpdate: (
|
|
3072
|
-
g.current =
|
|
3073
|
-
|
|
3083
|
+
onUpdate: (k) => {
|
|
3084
|
+
g.current = k, requestAnimationFrame(() => {
|
|
3085
|
+
D();
|
|
3074
3086
|
});
|
|
3075
3087
|
}
|
|
3076
3088
|
});
|
|
@@ -3083,7 +3095,7 @@ const Le = ({
|
|
|
3083
3095
|
_(() => {
|
|
3084
3096
|
const $ = V.current;
|
|
3085
3097
|
if (!$ || !(m != null && m.current) || w.length <= 0) return;
|
|
3086
|
-
const P = w.length, Z = m.current.clientWidth || 0, x = l[1],
|
|
3098
|
+
const P = w.length, Z = m.current.clientWidth || 0, x = l[1], k = g.current, C = (Z + i) / (x + i), K = Math.max(1, Math.floor(C)), G = Math.max(1, Math.round(K * (2 / 3))), ee = Math.min(Math.max(0, v), Math.max(0, P - 1)), oe = {
|
|
3087
3099
|
total: P,
|
|
3088
3100
|
selectedIndex: ee,
|
|
3089
3101
|
visibleApprox: C,
|
|
@@ -3091,35 +3103,35 @@ const Le = ({
|
|
|
3091
3103
|
stepHalf: G,
|
|
3092
3104
|
canPrev: ee > 0,
|
|
3093
3105
|
canNext: ee < P - 1,
|
|
3094
|
-
scrollProgress:
|
|
3106
|
+
scrollProgress: k,
|
|
3095
3107
|
viewportWidth: Z,
|
|
3096
3108
|
itemMaxWidth: x,
|
|
3097
3109
|
gap: i
|
|
3098
3110
|
}, le = te.current;
|
|
3099
|
-
let
|
|
3100
|
-
if (!
|
|
3111
|
+
let F = !le;
|
|
3112
|
+
if (!F) {
|
|
3101
3113
|
for (const q in oe)
|
|
3102
3114
|
if (oe[q] !== le[q]) {
|
|
3103
|
-
|
|
3115
|
+
F = !0;
|
|
3104
3116
|
break;
|
|
3105
3117
|
}
|
|
3106
3118
|
}
|
|
3107
|
-
|
|
3119
|
+
F && (te.current = oe, $(oe));
|
|
3108
3120
|
}, [m, w.length, v, i, l]), _(() => () => {
|
|
3109
3121
|
var $;
|
|
3110
3122
|
($ = A.current) == null || $.stop();
|
|
3111
3123
|
}, []);
|
|
3112
|
-
const [U,
|
|
3124
|
+
const [U, W] = X(0);
|
|
3113
3125
|
Ae(() => {
|
|
3114
3126
|
let $ = l[1];
|
|
3115
3127
|
const P = S.current;
|
|
3116
3128
|
P && $ > P.scrollVisible && P.scrollVisible > 0 && ($ = P.scrollVisible);
|
|
3117
3129
|
const Z = ($ + i) * w.length / y;
|
|
3118
|
-
|
|
3130
|
+
W(Z || 400);
|
|
3119
3131
|
}, [m, w.length, i, l, y]);
|
|
3120
|
-
const
|
|
3132
|
+
const R = ($) => {
|
|
3121
3133
|
if (!w.length) return;
|
|
3122
|
-
const P =
|
|
3134
|
+
const P = M ?? v;
|
|
3123
3135
|
switch ($.key) {
|
|
3124
3136
|
case "ArrowLeft":
|
|
3125
3137
|
$.preventDefault(), L(Math.max(0, P - 1));
|
|
@@ -3150,16 +3162,16 @@ const Le = ({
|
|
|
3150
3162
|
$.removeEventListener("udx:carousel:centerIndex", P);
|
|
3151
3163
|
};
|
|
3152
3164
|
}, [m, w.length]);
|
|
3153
|
-
const
|
|
3154
|
-
var
|
|
3155
|
-
const Z = (
|
|
3165
|
+
const T = w.map(($, P) => {
|
|
3166
|
+
var k;
|
|
3167
|
+
const Z = (k = $.props) == null ? void 0 : k.onClick, x = (C) => {
|
|
3156
3168
|
Z == null || Z(C);
|
|
3157
3169
|
};
|
|
3158
3170
|
return Y.cloneElement(
|
|
3159
3171
|
$,
|
|
3160
3172
|
{
|
|
3161
3173
|
outputRange: l,
|
|
3162
|
-
ref:
|
|
3174
|
+
ref: I[P],
|
|
3163
3175
|
key: P,
|
|
3164
3176
|
index: P,
|
|
3165
3177
|
role: "option",
|
|
@@ -3178,7 +3190,7 @@ const Le = ({
|
|
|
3178
3190
|
ref: m,
|
|
3179
3191
|
role: "listbox",
|
|
3180
3192
|
"aria-orientation": "horizontal",
|
|
3181
|
-
onKeyDown:
|
|
3193
|
+
onKeyDown: R,
|
|
3182
3194
|
...f,
|
|
3183
3195
|
children: /* @__PURE__ */ u(
|
|
3184
3196
|
Ln,
|
|
@@ -3196,7 +3208,7 @@ const Le = ({
|
|
|
3196
3208
|
gap: `${i}px`,
|
|
3197
3209
|
willChange: "transform"
|
|
3198
3210
|
},
|
|
3199
|
-
children:
|
|
3211
|
+
children: T
|
|
3200
3212
|
}
|
|
3201
3213
|
)
|
|
3202
3214
|
}
|
|
@@ -3233,11 +3245,11 @@ var vr = {
|
|
|
3233
3245
|
prefix: "fas",
|
|
3234
3246
|
iconName: "check",
|
|
3235
3247
|
icon: [448, 512, [10003, 10004], "f00c", "M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]
|
|
3236
|
-
},
|
|
3248
|
+
}, We = {
|
|
3237
3249
|
prefix: "fas",
|
|
3238
3250
|
iconName: "xmark",
|
|
3239
3251
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
3240
|
-
}, xr =
|
|
3252
|
+
}, xr = We, Kt = {
|
|
3241
3253
|
prefix: "fas",
|
|
3242
3254
|
iconName: "chevron-down",
|
|
3243
3255
|
icon: [448, 512, [], "f078", "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]
|
|
@@ -3270,8 +3282,8 @@ const Rs = ({
|
|
|
3270
3282
|
_(() => {
|
|
3271
3283
|
A.current && (A.current.indeterminate = n);
|
|
3272
3284
|
}, [n]);
|
|
3273
|
-
const
|
|
3274
|
-
r || (m || w(
|
|
3285
|
+
const I = (N) => {
|
|
3286
|
+
r || (m || w(N.target.checked), a && a(N));
|
|
3275
3287
|
}, v = jn({
|
|
3276
3288
|
isChecked: !!E,
|
|
3277
3289
|
isIndeterminate: n,
|
|
@@ -3302,7 +3314,7 @@ const Rs = ({
|
|
|
3302
3314
|
value: c,
|
|
3303
3315
|
checked: E,
|
|
3304
3316
|
disabled: r,
|
|
3305
|
-
onChange:
|
|
3317
|
+
onChange: I,
|
|
3306
3318
|
onFocus: () => g(!0),
|
|
3307
3319
|
onBlur: () => g(!1),
|
|
3308
3320
|
className: v.input,
|
|
@@ -3358,40 +3370,40 @@ const Rs = ({
|
|
|
3358
3370
|
throw new Error(
|
|
3359
3371
|
"Chip component requires either a label prop or children content"
|
|
3360
3372
|
);
|
|
3361
|
-
const A = r ? "a" : "button",
|
|
3373
|
+
const A = r ? "a" : "button", I = z(null), v = o || I, [N, D] = Y.useState(c), [M, O] = Y.useState(!1), [L, J] = X(S && y), [V, te] = Y.useState(!1), [U, W] = Y.useState(
|
|
3362
3374
|
typeof s == "string" ? s : ""
|
|
3363
|
-
),
|
|
3375
|
+
), R = Y.useRef(null);
|
|
3364
3376
|
_(() => {
|
|
3365
|
-
|
|
3377
|
+
D(c);
|
|
3366
3378
|
}, [c]), _(() => {
|
|
3367
|
-
if (S && J(S), y &&
|
|
3368
|
-
const
|
|
3379
|
+
if (S && J(S), y && M) {
|
|
3380
|
+
const F = setTimeout(() => {
|
|
3369
3381
|
g != null && g.draggable && V || J(!0);
|
|
3370
3382
|
}, 1e3);
|
|
3371
|
-
return () => clearTimeout(
|
|
3372
|
-
} else
|
|
3373
|
-
}, [
|
|
3383
|
+
return () => clearTimeout(F);
|
|
3384
|
+
} else M || J(!1);
|
|
3385
|
+
}, [M, y, V, g, U]), _(() => {
|
|
3374
3386
|
if (L) {
|
|
3375
|
-
|
|
3376
|
-
const
|
|
3377
|
-
if (
|
|
3378
|
-
|
|
3387
|
+
W(typeof s == "string" ? s : "");
|
|
3388
|
+
const F = oe.current || R.current;
|
|
3389
|
+
if (F) {
|
|
3390
|
+
F.focus();
|
|
3379
3391
|
const q = document.createRange();
|
|
3380
|
-
q.selectNodeContents(
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3392
|
+
q.selectNodeContents(F), q.collapse(!1);
|
|
3393
|
+
const B = window.getSelection();
|
|
3394
|
+
B == null || B.removeAllRanges(), B == null || B.addRange(q);
|
|
3383
3395
|
}
|
|
3384
3396
|
}
|
|
3385
3397
|
}, [L]), w = { duration: 0.3, ...w };
|
|
3386
|
-
const
|
|
3387
|
-
t &&
|
|
3398
|
+
const T = (F) => {
|
|
3399
|
+
t && F.preventDefault(), i ? (D(!N), i(!N)) : l && l(F);
|
|
3388
3400
|
}, $ = !!i || !!d || !!l || !!r || !!y;
|
|
3389
3401
|
c && (n = Ze);
|
|
3390
3402
|
const {
|
|
3391
3403
|
onFocus: P,
|
|
3392
3404
|
onBlur: Z,
|
|
3393
3405
|
onKeyDown: x,
|
|
3394
|
-
onDragStart:
|
|
3406
|
+
onDragStart: k,
|
|
3395
3407
|
onDragEnd: C,
|
|
3396
3408
|
onDoubleClick: K,
|
|
3397
3409
|
...G
|
|
@@ -3402,23 +3414,23 @@ const Rs = ({
|
|
|
3402
3414
|
variant: e,
|
|
3403
3415
|
transition: w,
|
|
3404
3416
|
className: a,
|
|
3405
|
-
isActive:
|
|
3417
|
+
isActive: N ?? !1,
|
|
3406
3418
|
onToggle: i,
|
|
3407
|
-
activated:
|
|
3419
|
+
activated: N,
|
|
3408
3420
|
label: s,
|
|
3409
3421
|
isInteractive: $,
|
|
3410
3422
|
children: s,
|
|
3411
|
-
isFocused:
|
|
3423
|
+
isFocused: M,
|
|
3412
3424
|
isDragging: V,
|
|
3413
3425
|
onEditCommit: h,
|
|
3414
3426
|
isEditing: L
|
|
3415
3427
|
}), oe = z(null), le = () => {
|
|
3416
|
-
const
|
|
3417
|
-
if (!
|
|
3428
|
+
const F = (U ?? "").trim();
|
|
3429
|
+
if (!F) {
|
|
3418
3430
|
d && d();
|
|
3419
3431
|
return;
|
|
3420
3432
|
}
|
|
3421
|
-
h == null || h(
|
|
3433
|
+
h == null || h(F);
|
|
3422
3434
|
};
|
|
3423
3435
|
return /* @__PURE__ */ j(
|
|
3424
3436
|
A,
|
|
@@ -3428,47 +3440,47 @@ const Rs = ({
|
|
|
3428
3440
|
href: r,
|
|
3429
3441
|
className: ee.chip,
|
|
3430
3442
|
...G,
|
|
3431
|
-
onClick: (
|
|
3432
|
-
L ||
|
|
3443
|
+
onClick: (F) => {
|
|
3444
|
+
L || T(F);
|
|
3433
3445
|
},
|
|
3434
3446
|
draggable: !t && !!(g != null && g.draggable),
|
|
3435
|
-
onDragStart: (
|
|
3436
|
-
!t && (g != null && g.draggable) && te(!0),
|
|
3447
|
+
onDragStart: (F) => {
|
|
3448
|
+
!t && (g != null && g.draggable) && te(!0), k == null || k(F);
|
|
3437
3449
|
},
|
|
3438
|
-
onDragEnd: (
|
|
3439
|
-
g != null && g.draggable && te(!1), C == null || C(
|
|
3450
|
+
onDragEnd: (F) => {
|
|
3451
|
+
g != null && g.draggable && te(!1), C == null || C(F);
|
|
3440
3452
|
},
|
|
3441
|
-
onDoubleClick: (
|
|
3442
|
-
!t && y && !L && (f == null || f(),
|
|
3453
|
+
onDoubleClick: (F) => {
|
|
3454
|
+
!t && y && !L && (f == null || f(), F.preventDefault(), F.stopPropagation()), K == null || K(F);
|
|
3443
3455
|
},
|
|
3444
|
-
onFocus: (
|
|
3445
|
-
$ && O(!0), P == null || P(
|
|
3456
|
+
onFocus: (F) => {
|
|
3457
|
+
$ && O(!0), P == null || P(F);
|
|
3446
3458
|
},
|
|
3447
|
-
onBlur: (
|
|
3448
|
-
O(!1), Z == null || Z(
|
|
3459
|
+
onBlur: (F) => {
|
|
3460
|
+
O(!1), Z == null || Z(F);
|
|
3449
3461
|
},
|
|
3450
|
-
onKeyDown: (
|
|
3451
|
-
const q =
|
|
3462
|
+
onKeyDown: (F) => {
|
|
3463
|
+
const q = F.key;
|
|
3452
3464
|
if (!t && L) {
|
|
3453
|
-
q === "Enter" ? (
|
|
3465
|
+
q === "Enter" ? (F.preventDefault(), le()) : q === "Escape" ? (F.preventDefault(), m == null || m()) : d && (U == null ? void 0 : U.trim()) === "" && (q === "Backspace" || q === "Delete" || q === "Del") && (F.preventDefault(), F.stopPropagation(), d());
|
|
3454
3466
|
return;
|
|
3455
3467
|
}
|
|
3456
|
-
if (!t &&
|
|
3468
|
+
if (!t && M) {
|
|
3457
3469
|
if (y && !i && (q === "F2" || q === "Enter")) {
|
|
3458
|
-
|
|
3470
|
+
F.preventDefault(), f == null || f();
|
|
3459
3471
|
return;
|
|
3460
3472
|
}
|
|
3461
3473
|
if (i && (q === "Enter" || q === " " || q === "Spacebar")) {
|
|
3462
|
-
|
|
3463
|
-
const
|
|
3464
|
-
|
|
3474
|
+
F.preventDefault();
|
|
3475
|
+
const B = !N;
|
|
3476
|
+
D(B), i(B);
|
|
3465
3477
|
}
|
|
3466
|
-
d && (q === "Backspace" || q === "Delete" || q === "Del") && (
|
|
3478
|
+
d && (q === "Backspace" || q === "Delete" || q === "Del") && (F.preventDefault(), F.stopPropagation(), d());
|
|
3467
3479
|
}
|
|
3468
|
-
x == null || x(
|
|
3480
|
+
x == null || x(F);
|
|
3469
3481
|
},
|
|
3470
3482
|
disabled: t,
|
|
3471
|
-
"aria-pressed": i ?
|
|
3483
|
+
"aria-pressed": i ? N : void 0,
|
|
3472
3484
|
style: { transition: w.duration + "s" },
|
|
3473
3485
|
children: [
|
|
3474
3486
|
$ && !t && !L && /* @__PURE__ */ u(
|
|
@@ -3477,8 +3489,8 @@ const Rs = ({
|
|
|
3477
3489
|
style: { transition: w.duration + "s" },
|
|
3478
3490
|
className: ee.stateLayer,
|
|
3479
3491
|
colorName: p({
|
|
3480
|
-
"on-surface-variant": !
|
|
3481
|
-
"on-secondary-container":
|
|
3492
|
+
"on-surface-variant": !N,
|
|
3493
|
+
"on-secondary-container": N
|
|
3482
3494
|
}),
|
|
3483
3495
|
stateClassName: "state-ripple-group-[chip]"
|
|
3484
3496
|
}
|
|
@@ -3493,19 +3505,19 @@ const Rs = ({
|
|
|
3493
3505
|
className: ee.label,
|
|
3494
3506
|
role: y ? "textbox" : void 0,
|
|
3495
3507
|
spellCheck: !1,
|
|
3496
|
-
onInput: (
|
|
3497
|
-
const q =
|
|
3498
|
-
|
|
3508
|
+
onInput: (F) => {
|
|
3509
|
+
const q = F.currentTarget.innerText;
|
|
3510
|
+
W(q), b == null || b(q);
|
|
3499
3511
|
},
|
|
3500
|
-
onBlur: (
|
|
3512
|
+
onBlur: (F) => {
|
|
3501
3513
|
y && L && le();
|
|
3502
3514
|
},
|
|
3503
|
-
onKeyDown: (
|
|
3504
|
-
if (y && L &&
|
|
3505
|
-
|
|
3515
|
+
onKeyDown: (F) => {
|
|
3516
|
+
if (y && L && F.key === "Enter") {
|
|
3517
|
+
F.preventDefault(), F.stopPropagation(), le();
|
|
3506
3518
|
return;
|
|
3507
3519
|
}
|
|
3508
|
-
y && L &&
|
|
3520
|
+
y && L && F.key === "Escape" && (F.preventDefault(), F.stopPropagation(), m == null || m());
|
|
3509
3521
|
},
|
|
3510
3522
|
children: s
|
|
3511
3523
|
}
|
|
@@ -3513,13 +3525,13 @@ const Rs = ({
|
|
|
3513
3525
|
d && !L && /* @__PURE__ */ u(
|
|
3514
3526
|
fe,
|
|
3515
3527
|
{
|
|
3516
|
-
icon:
|
|
3528
|
+
icon: We,
|
|
3517
3529
|
className: ee.trailingIcon,
|
|
3518
|
-
onMouseDown: (
|
|
3519
|
-
|
|
3530
|
+
onMouseDown: (F) => {
|
|
3531
|
+
F.preventDefault(), F.stopPropagation();
|
|
3520
3532
|
},
|
|
3521
|
-
onClick: (
|
|
3522
|
-
|
|
3533
|
+
onClick: (F) => {
|
|
3534
|
+
F.stopPropagation(), t || d();
|
|
3523
3535
|
}
|
|
3524
3536
|
}
|
|
3525
3537
|
)
|
|
@@ -3581,7 +3593,7 @@ const Rs = ({
|
|
|
3581
3593
|
_(() => {
|
|
3582
3594
|
S(o);
|
|
3583
3595
|
}, [o]);
|
|
3584
|
-
const
|
|
3596
|
+
const I = Lr({
|
|
3585
3597
|
variant: a,
|
|
3586
3598
|
disabled: s,
|
|
3587
3599
|
className: d,
|
|
@@ -3597,9 +3609,9 @@ const Rs = ({
|
|
|
3597
3609
|
return;
|
|
3598
3610
|
}
|
|
3599
3611
|
c ? (S(!E), c(!E)) : (console.log("click", i), i == null || i(L));
|
|
3600
|
-
},
|
|
3612
|
+
}, N = () => {
|
|
3601
3613
|
A.current && (clearTimeout(A.current), A.current = null), !s && f && w(!0);
|
|
3602
|
-
},
|
|
3614
|
+
}, D = () => {
|
|
3603
3615
|
f && (A.current = setTimeout(() => {
|
|
3604
3616
|
w(!1);
|
|
3605
3617
|
}, 150));
|
|
@@ -3607,16 +3619,16 @@ const Rs = ({
|
|
|
3607
3619
|
Y.useEffect(() => () => {
|
|
3608
3620
|
A.current && clearTimeout(A.current);
|
|
3609
3621
|
}, []);
|
|
3610
|
-
const
|
|
3622
|
+
const M = r ?? (f ? jt : void 0);
|
|
3611
3623
|
return /* @__PURE__ */ j(
|
|
3612
3624
|
l ? "a" : "button",
|
|
3613
3625
|
{
|
|
3614
3626
|
ref: g,
|
|
3615
3627
|
href: l,
|
|
3616
|
-
className:
|
|
3628
|
+
className: I.menuItem,
|
|
3617
3629
|
onClick: v,
|
|
3618
|
-
onMouseEnter:
|
|
3619
|
-
onMouseLeave:
|
|
3630
|
+
onMouseEnter: N,
|
|
3631
|
+
onMouseLeave: D,
|
|
3620
3632
|
role: "option",
|
|
3621
3633
|
"aria-haspopup": !!f,
|
|
3622
3634
|
"aria-expanded": b,
|
|
@@ -3643,38 +3655,38 @@ const Rs = ({
|
|
|
3643
3655
|
"div",
|
|
3644
3656
|
{
|
|
3645
3657
|
className: p(
|
|
3646
|
-
|
|
3647
|
-
|
|
3658
|
+
I.itemIcon,
|
|
3659
|
+
I.leadingIcon,
|
|
3648
3660
|
"z-10 relative"
|
|
3649
3661
|
),
|
|
3650
3662
|
children: Y.isValidElement(n) ? n : /* @__PURE__ */ u(fe, { icon: n })
|
|
3651
3663
|
}
|
|
3652
3664
|
),
|
|
3653
|
-
/* @__PURE__ */ u("span", { className: p(
|
|
3654
|
-
|
|
3665
|
+
/* @__PURE__ */ u("span", { className: p(I.itemLabel, "z-10 relative"), children: m }),
|
|
3666
|
+
M && /* @__PURE__ */ u(
|
|
3655
3667
|
"div",
|
|
3656
3668
|
{
|
|
3657
3669
|
className: p(
|
|
3658
|
-
|
|
3659
|
-
|
|
3670
|
+
I.itemIcon,
|
|
3671
|
+
I.trailingIcon,
|
|
3660
3672
|
"z-10 relative"
|
|
3661
3673
|
),
|
|
3662
|
-
children: Y.isValidElement(
|
|
3674
|
+
children: Y.isValidElement(M) ? M : /* @__PURE__ */ u(fe, { icon: M })
|
|
3663
3675
|
}
|
|
3664
3676
|
),
|
|
3665
3677
|
f && b && /* @__PURE__ */ u(
|
|
3666
|
-
|
|
3678
|
+
Fe,
|
|
3667
3679
|
{
|
|
3668
3680
|
anchorRef: g,
|
|
3669
3681
|
position: "inline-end span-block-end",
|
|
3670
3682
|
hoverOpen: !0,
|
|
3671
|
-
children: /* @__PURE__ */ u("div", { onMouseEnter:
|
|
3683
|
+
children: /* @__PURE__ */ u("div", { onMouseEnter: N, onMouseLeave: D, children: f })
|
|
3672
3684
|
}
|
|
3673
3685
|
)
|
|
3674
3686
|
]
|
|
3675
3687
|
}
|
|
3676
3688
|
);
|
|
3677
|
-
},
|
|
3689
|
+
}, Be = ({
|
|
3678
3690
|
orientation: e = "horizontal",
|
|
3679
3691
|
className: t,
|
|
3680
3692
|
...n
|
|
@@ -3686,8 +3698,8 @@ const Rs = ({
|
|
|
3686
3698
|
"text-on-surface-variant": !(e != null && e.variant) || e.variant === "standard"
|
|
3687
3699
|
// Vibrant treatment if different
|
|
3688
3700
|
})
|
|
3689
|
-
}),
|
|
3690
|
-
const a =
|
|
3701
|
+
}), Mr = ne("menu-headline", Er), Gt = ({ label: e, children: t, variant: n, className: r, ...s }) => {
|
|
3702
|
+
const a = Mr({ variant: n, className: r });
|
|
3691
3703
|
return /* @__PURE__ */ u("div", { className: a.headline, role: "group", "aria-label": e, ...s, children: t ?? e });
|
|
3692
3704
|
}, pt = ({
|
|
3693
3705
|
children: e,
|
|
@@ -3734,7 +3746,7 @@ const Rs = ({
|
|
|
3734
3746
|
variant: o.props.variant ?? n
|
|
3735
3747
|
}) : o.type === Gt ? Y.cloneElement(o, {
|
|
3736
3748
|
variant: n
|
|
3737
|
-
}) : o.type ===
|
|
3749
|
+
}) : o.type === Be ? Y.cloneElement(o, {
|
|
3738
3750
|
className: p("my-1", o.props.className)
|
|
3739
3751
|
}) : o;
|
|
3740
3752
|
});
|
|
@@ -3791,7 +3803,7 @@ const Rs = ({
|
|
|
3791
3803
|
}
|
|
3792
3804
|
),
|
|
3793
3805
|
r && /* @__PURE__ */ u(
|
|
3794
|
-
|
|
3806
|
+
Fe,
|
|
3795
3807
|
{
|
|
3796
3808
|
anchorRef: a,
|
|
3797
3809
|
position: "bottom right",
|
|
@@ -3803,7 +3815,7 @@ const Rs = ({
|
|
|
3803
3815
|
}, ue = [];
|
|
3804
3816
|
for (let e = 0; e < 256; ++e)
|
|
3805
3817
|
ue.push((e + 256).toString(16).slice(1));
|
|
3806
|
-
function
|
|
3818
|
+
function Ir(e, t = 0) {
|
|
3807
3819
|
return (ue[e[t + 0]] + ue[e[t + 1]] + ue[e[t + 2]] + ue[e[t + 3]] + "-" + ue[e[t + 4]] + ue[e[t + 5]] + "-" + ue[e[t + 6]] + ue[e[t + 7]] + "-" + ue[e[t + 8]] + ue[e[t + 9]] + "-" + ue[e[t + 10]] + ue[e[t + 11]] + ue[e[t + 12]] + ue[e[t + 13]] + ue[e[t + 14]] + ue[e[t + 15]]).toLowerCase();
|
|
3808
3820
|
}
|
|
3809
3821
|
let Xe;
|
|
@@ -3825,7 +3837,7 @@ function Zt(e, t, n) {
|
|
|
3825
3837
|
const r = e.random ?? ((s = e.rng) == null ? void 0 : s.call(e)) ?? Dr();
|
|
3826
3838
|
if (r.length < 16)
|
|
3827
3839
|
throw new Error("Random bytes length must be >= 16");
|
|
3828
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
3840
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Ir(r);
|
|
3829
3841
|
}
|
|
3830
3842
|
const As = ({
|
|
3831
3843
|
variant: e = "input",
|
|
@@ -3836,13 +3848,13 @@ const As = ({
|
|
|
3836
3848
|
onItemsChange: a
|
|
3837
3849
|
}) => {
|
|
3838
3850
|
const l = s ?? [], i = Y.useRef(null), [c, o] = Y.useState(!1), d = Y.useRef(/* @__PURE__ */ new WeakMap()), y = Y.useCallback((v) => {
|
|
3839
|
-
const
|
|
3840
|
-
let
|
|
3841
|
-
return
|
|
3851
|
+
const N = d.current;
|
|
3852
|
+
let D = N.get(v);
|
|
3853
|
+
return D || (D = Zt(), N.set(v, D)), D;
|
|
3842
3854
|
}, []);
|
|
3843
3855
|
Y.useEffect(() => {
|
|
3844
|
-
var v,
|
|
3845
|
-
c && (e == "input" ? (v = A.current) == null || v.focus() : (
|
|
3856
|
+
var v, N;
|
|
3857
|
+
c && (e == "input" ? (v = A.current) == null || v.focus() : (N = i.current) == null || N.focus());
|
|
3846
3858
|
}, [c]);
|
|
3847
3859
|
const f = Y.useRef([]), h = Y.useRef(!1), m = Y.useCallback(
|
|
3848
3860
|
(v) => {
|
|
@@ -3851,7 +3863,7 @@ const As = ({
|
|
|
3851
3863
|
[a, l]
|
|
3852
3864
|
), b = Y.useCallback(
|
|
3853
3865
|
(v) => {
|
|
3854
|
-
m((
|
|
3866
|
+
m((N) => N.filter((D, M) => M !== v));
|
|
3855
3867
|
},
|
|
3856
3868
|
[m]
|
|
3857
3869
|
), w = Gn({
|
|
@@ -3862,11 +3874,11 @@ const As = ({
|
|
|
3862
3874
|
(v = "") => {
|
|
3863
3875
|
if (e !== "input" || h.current) return;
|
|
3864
3876
|
h.current = !0;
|
|
3865
|
-
const
|
|
3877
|
+
const N = {
|
|
3866
3878
|
label: v
|
|
3867
|
-
},
|
|
3868
|
-
a == null || a(
|
|
3869
|
-
g(
|
|
3879
|
+
}, D = y(N), M = [...l, N];
|
|
3880
|
+
a == null || a(M), requestAnimationFrame(() => {
|
|
3881
|
+
g(D), h.current = !1;
|
|
3870
3882
|
});
|
|
3871
3883
|
},
|
|
3872
3884
|
[e, a, l, y]
|
|
@@ -3874,18 +3886,18 @@ const As = ({
|
|
|
3874
3886
|
_(() => {
|
|
3875
3887
|
var v;
|
|
3876
3888
|
if (S) {
|
|
3877
|
-
const
|
|
3878
|
-
(
|
|
3889
|
+
const N = l.findIndex(
|
|
3890
|
+
(D) => y(D) === S
|
|
3879
3891
|
);
|
|
3880
|
-
if (
|
|
3881
|
-
const
|
|
3882
|
-
(v =
|
|
3883
|
-
const
|
|
3884
|
-
|
|
3892
|
+
if (N !== -1) {
|
|
3893
|
+
const D = f.current[N];
|
|
3894
|
+
(v = D == null ? void 0 : D.focus) == null || v.call(D);
|
|
3895
|
+
const M = i.current, O = D.offsetLeft + D.offsetWidth / 2 - M.offsetWidth / 2;
|
|
3896
|
+
M.scrollTo({ left: O, behavior: "smooth" });
|
|
3885
3897
|
}
|
|
3886
3898
|
}
|
|
3887
3899
|
}, [S, l, y]);
|
|
3888
|
-
const A = z(null),
|
|
3900
|
+
const A = z(null), I = (c || l.length === 0) && e === "input";
|
|
3889
3901
|
return /* @__PURE__ */ j(
|
|
3890
3902
|
"div",
|
|
3891
3903
|
{
|
|
@@ -3903,36 +3915,36 @@ const As = ({
|
|
|
3903
3915
|
onKeyDown: (v) => {
|
|
3904
3916
|
var J;
|
|
3905
3917
|
if (e !== "input") return;
|
|
3906
|
-
const
|
|
3918
|
+
const N = v.key, M = v.target === v.currentTarget;
|
|
3907
3919
|
if (!c) return;
|
|
3908
3920
|
const O = document.activeElement, L = f.current.findIndex(
|
|
3909
3921
|
(V) => V === O
|
|
3910
3922
|
);
|
|
3911
|
-
if (
|
|
3923
|
+
if (N === "ArrowLeft") {
|
|
3912
3924
|
v.preventDefault();
|
|
3913
3925
|
const V = L > 0 ? L - 1 : l.length - 1, te = y(l[V]);
|
|
3914
3926
|
g(te);
|
|
3915
3927
|
return;
|
|
3916
3928
|
}
|
|
3917
|
-
if (
|
|
3929
|
+
if (N === "ArrowRight") {
|
|
3918
3930
|
v.preventDefault();
|
|
3919
3931
|
const V = L >= 0 ? (L + 1) % Math.max(1, l.length) : 0, te = y(l[V]);
|
|
3920
3932
|
g(te);
|
|
3921
3933
|
return;
|
|
3922
3934
|
}
|
|
3923
|
-
if (
|
|
3935
|
+
if (N === "Home") {
|
|
3924
3936
|
v.preventDefault();
|
|
3925
3937
|
const V = y(l[0]);
|
|
3926
3938
|
g(V);
|
|
3927
3939
|
return;
|
|
3928
3940
|
}
|
|
3929
|
-
if (
|
|
3941
|
+
if (N === "End") {
|
|
3930
3942
|
v.preventDefault();
|
|
3931
3943
|
const V = y(l[l.length - 1]);
|
|
3932
3944
|
g(V);
|
|
3933
3945
|
return;
|
|
3934
3946
|
}
|
|
3935
|
-
if (
|
|
3947
|
+
if (M && N === "Backspace") {
|
|
3936
3948
|
if (v.preventDefault(), l.length > 0) {
|
|
3937
3949
|
const V = f.current[l.length - 1];
|
|
3938
3950
|
(J = V == null ? void 0 : V.focus) == null || J.call(V);
|
|
@@ -3941,14 +3953,14 @@ const As = ({
|
|
|
3941
3953
|
}
|
|
3942
3954
|
},
|
|
3943
3955
|
children: [
|
|
3944
|
-
l.map((v,
|
|
3945
|
-
const
|
|
3956
|
+
l.map((v, N) => {
|
|
3957
|
+
const D = y(v), M = e === "input", O = M ? {
|
|
3946
3958
|
editable: !0,
|
|
3947
|
-
editing: S ===
|
|
3959
|
+
editing: S === D,
|
|
3948
3960
|
onEditCommit: (L) => {
|
|
3949
3961
|
o(!0), m(
|
|
3950
3962
|
(J) => J.map(
|
|
3951
|
-
(V, te) => te ===
|
|
3963
|
+
(V, te) => te === N ? { ...V, label: L } : V
|
|
3952
3964
|
)
|
|
3953
3965
|
);
|
|
3954
3966
|
},
|
|
@@ -3956,7 +3968,7 @@ const As = ({
|
|
|
3956
3968
|
o(!0);
|
|
3957
3969
|
},
|
|
3958
3970
|
onChange: () => {
|
|
3959
|
-
if (f.current.length ==
|
|
3971
|
+
if (f.current.length == N + 1) {
|
|
3960
3972
|
const L = i.current;
|
|
3961
3973
|
requestAnimationFrame(() => {
|
|
3962
3974
|
L.scrollTo({ left: L.scrollWidth, behavior: "smooth" });
|
|
@@ -3967,7 +3979,7 @@ const As = ({
|
|
|
3967
3979
|
return /* @__PURE__ */ u(
|
|
3968
3980
|
mt,
|
|
3969
3981
|
{
|
|
3970
|
-
ref: (L) => f.current[
|
|
3982
|
+
ref: (L) => f.current[N] = L,
|
|
3971
3983
|
label: v.label ?? "",
|
|
3972
3984
|
icon: v.icon,
|
|
3973
3985
|
activated: v.activated,
|
|
@@ -3978,22 +3990,22 @@ const As = ({
|
|
|
3978
3990
|
...O,
|
|
3979
3991
|
onToggle: v.activated === void 0 ? void 0 : (L) => m(
|
|
3980
3992
|
(J) => J.map(
|
|
3981
|
-
(V, te) => te ===
|
|
3993
|
+
(V, te) => te === N ? { ...V, activated: L } : V
|
|
3982
3994
|
)
|
|
3983
3995
|
),
|
|
3984
3996
|
onBlur: () => {
|
|
3985
|
-
S ===
|
|
3997
|
+
S === D && g(null);
|
|
3986
3998
|
},
|
|
3987
|
-
onRemove:
|
|
3988
|
-
o(!0), b(
|
|
3999
|
+
onRemove: M ? () => {
|
|
4000
|
+
o(!0), b(N);
|
|
3989
4001
|
} : void 0
|
|
3990
4002
|
},
|
|
3991
|
-
|
|
4003
|
+
D
|
|
3992
4004
|
);
|
|
3993
4005
|
}),
|
|
3994
4006
|
c && /* @__PURE__ */ j(me, { children: [
|
|
3995
4007
|
/* @__PURE__ */ u(
|
|
3996
|
-
|
|
4008
|
+
Be,
|
|
3997
4009
|
{
|
|
3998
4010
|
orientation: "vertical",
|
|
3999
4011
|
className: "animate-[var(--animate-blink)] border-outline",
|
|
@@ -4009,7 +4021,7 @@ const As = ({
|
|
|
4009
4021
|
}
|
|
4010
4022
|
` })
|
|
4011
4023
|
] }),
|
|
4012
|
-
|
|
4024
|
+
I && /* @__PURE__ */ u(
|
|
4013
4025
|
mt,
|
|
4014
4026
|
{
|
|
4015
4027
|
ref: A,
|
|
@@ -4018,12 +4030,12 @@ const As = ({
|
|
|
4018
4030
|
editable: !0,
|
|
4019
4031
|
editing: !0,
|
|
4020
4032
|
onChange: (v) => {
|
|
4021
|
-
var
|
|
4033
|
+
var N;
|
|
4022
4034
|
if (v = v.replace(/( )+/g, " ").trim(), console.log("Ghost chip onChange", v, !!v), v)
|
|
4023
4035
|
E(v);
|
|
4024
4036
|
else if (l.length > 0) {
|
|
4025
|
-
const
|
|
4026
|
-
(
|
|
4037
|
+
const D = f.current[l.length - 1];
|
|
4038
|
+
(N = D == null ? void 0 : D.focus) == null || N.call(D);
|
|
4027
4039
|
}
|
|
4028
4040
|
},
|
|
4029
4041
|
onEditCommit: () => {
|
|
@@ -4057,19 +4069,19 @@ function $r({
|
|
|
4057
4069
|
}, []);
|
|
4058
4070
|
_(() => () => E(), [E]);
|
|
4059
4071
|
const S = he(
|
|
4060
|
-
(
|
|
4072
|
+
(W) => {
|
|
4061
4073
|
if (d) {
|
|
4062
|
-
const
|
|
4063
|
-
r == null || r(
|
|
4074
|
+
const R = W !== "hidden";
|
|
4075
|
+
r == null || r(R);
|
|
4064
4076
|
} else {
|
|
4065
|
-
f(
|
|
4066
|
-
const
|
|
4067
|
-
r == null || r(
|
|
4077
|
+
f(W);
|
|
4078
|
+
const R = W !== "hidden";
|
|
4079
|
+
r == null || r(R);
|
|
4068
4080
|
}
|
|
4069
4081
|
},
|
|
4070
4082
|
[d, r]
|
|
4071
|
-
), g = d ? t ? "hovered" : "hidden" : y, A = g !== "hidden",
|
|
4072
|
-
switch (
|
|
4083
|
+
), g = d ? t ? "hovered" : "hidden" : y, A = g !== "hidden", I = (W) => {
|
|
4084
|
+
switch (W) {
|
|
4073
4085
|
case "hidden":
|
|
4074
4086
|
return 0;
|
|
4075
4087
|
case "hovered":
|
|
@@ -4082,24 +4094,24 @@ function $r({
|
|
|
4082
4094
|
return 0;
|
|
4083
4095
|
}
|
|
4084
4096
|
}, v = he(
|
|
4085
|
-
(
|
|
4086
|
-
E(), !(
|
|
4087
|
-
S(
|
|
4097
|
+
(W) => {
|
|
4098
|
+
E(), !(I(W) <= I(g)) && (b.current = setTimeout(() => {
|
|
4099
|
+
S(W);
|
|
4088
4100
|
}, s));
|
|
4089
4101
|
},
|
|
4090
4102
|
[E, s, g, S]
|
|
4091
|
-
),
|
|
4092
|
-
(
|
|
4103
|
+
), N = he(
|
|
4104
|
+
(W) => {
|
|
4093
4105
|
E(), w.current = setTimeout(() => {
|
|
4094
|
-
(!d &&
|
|
4106
|
+
(!d && I(y) <= I(W) || d) && S("hidden");
|
|
4095
4107
|
}, a);
|
|
4096
4108
|
},
|
|
4097
4109
|
[E, a, y, d, S]
|
|
4098
|
-
),
|
|
4110
|
+
), D = he(() => {
|
|
4099
4111
|
o.includes("hover") && v("hovered");
|
|
4100
|
-
}, [o, v]),
|
|
4101
|
-
o.includes("hover") && (g === "focused" || g === "clicked" || h ||
|
|
4102
|
-
}, [o, g, h,
|
|
4112
|
+
}, [o, v]), M = he(() => {
|
|
4113
|
+
o.includes("hover") && (g === "focused" || g === "clicked" || h || N("hovered"));
|
|
4114
|
+
}, [o, g, h, N]), O = he(() => {
|
|
4103
4115
|
o.includes("focus") && (E(), S("focused"));
|
|
4104
4116
|
}, [o, E, S]), L = he(() => {
|
|
4105
4117
|
if (o.includes("focus") && g !== "clicked") {
|
|
@@ -4107,25 +4119,25 @@ function $r({
|
|
|
4107
4119
|
S("hovered");
|
|
4108
4120
|
return;
|
|
4109
4121
|
}
|
|
4110
|
-
|
|
4122
|
+
N("focused");
|
|
4111
4123
|
}
|
|
4112
|
-
}, [o, g, h,
|
|
4124
|
+
}, [o, g, h, N, S]), J = he(() => {
|
|
4113
4125
|
o.includes("click") && (E(), S(g === "clicked" ? "hidden" : "clicked"));
|
|
4114
4126
|
}, [o, g, E, S]), V = he(
|
|
4115
|
-
(
|
|
4116
|
-
|
|
4127
|
+
(W) => {
|
|
4128
|
+
W.key === "Escape" && A && (E(), S("hidden"), W.preventDefault());
|
|
4117
4129
|
},
|
|
4118
4130
|
[A, E, S]
|
|
4119
4131
|
), te = he(() => {
|
|
4120
4132
|
m(!0), E();
|
|
4121
4133
|
}, [E]), U = he(() => {
|
|
4122
|
-
m(!1), o.includes("hover") && g === "hovered" &&
|
|
4123
|
-
}, [o, g,
|
|
4134
|
+
m(!1), o.includes("hover") && g === "hovered" && N("hovered");
|
|
4135
|
+
}, [o, g, N]);
|
|
4124
4136
|
return {
|
|
4125
4137
|
triggerProps: {
|
|
4126
4138
|
"aria-describedby": A ? c : void 0,
|
|
4127
|
-
onMouseEnter:
|
|
4128
|
-
onMouseLeave:
|
|
4139
|
+
onMouseEnter: D,
|
|
4140
|
+
onMouseLeave: M,
|
|
4129
4141
|
onFocus: O,
|
|
4130
4142
|
onBlur: L,
|
|
4131
4143
|
onClick: J,
|
|
@@ -4164,11 +4176,11 @@ const Qt = ({
|
|
|
4164
4176
|
anchorRef: S,
|
|
4165
4177
|
...g
|
|
4166
4178
|
}) => {
|
|
4167
|
-
const
|
|
4179
|
+
const I = i || (e === "rich" ? "bottom-right" : "bottom");
|
|
4168
4180
|
if (y = { duration: 0.3, ...y }, !r && !c)
|
|
4169
4181
|
throw new Error("Tooltip must have a child or a targetRef");
|
|
4170
4182
|
t && !Array.isArray(t) && (t = [t]);
|
|
4171
|
-
const v = z(null),
|
|
4183
|
+
const v = z(null), D = S || (c || v), { triggerProps: M, tooltipProps: O, isOpen: L } = $r({
|
|
4172
4184
|
trigger: d,
|
|
4173
4185
|
isOpen: m,
|
|
4174
4186
|
defaultOpen: b,
|
|
@@ -4176,54 +4188,54 @@ const Qt = ({
|
|
|
4176
4188
|
openDelay: f,
|
|
4177
4189
|
closeDelay: h,
|
|
4178
4190
|
id: E
|
|
4179
|
-
}), J = !c &&
|
|
4191
|
+
}), J = !c && Me(r) ? Te(r, {
|
|
4180
4192
|
ref: v,
|
|
4181
|
-
...
|
|
4193
|
+
...M,
|
|
4182
4194
|
// Merge event handlers if the child already has them
|
|
4183
4195
|
onMouseEnter: (U) => {
|
|
4184
|
-
var
|
|
4185
|
-
|
|
4196
|
+
var W, R;
|
|
4197
|
+
M.onMouseEnter(), (R = (W = r.props) == null ? void 0 : W.onMouseEnter) == null || R.call(W, U);
|
|
4186
4198
|
},
|
|
4187
4199
|
onMouseLeave: (U) => {
|
|
4188
|
-
var
|
|
4189
|
-
|
|
4200
|
+
var W, R;
|
|
4201
|
+
M.onMouseLeave(), (R = (W = r.props) == null ? void 0 : W.onMouseLeave) == null || R.call(W, U);
|
|
4190
4202
|
},
|
|
4191
4203
|
onFocus: (U) => {
|
|
4192
|
-
var
|
|
4193
|
-
|
|
4204
|
+
var W, R;
|
|
4205
|
+
M.onFocus(), (R = (W = r.props) == null ? void 0 : W.onFocus) == null || R.call(W, U);
|
|
4194
4206
|
},
|
|
4195
4207
|
onBlur: (U) => {
|
|
4196
|
-
var
|
|
4197
|
-
|
|
4208
|
+
var W, R;
|
|
4209
|
+
M.onBlur(), (R = (W = r.props) == null ? void 0 : W.onBlur) == null || R.call(W, U);
|
|
4198
4210
|
},
|
|
4199
4211
|
onClick: (U) => {
|
|
4200
|
-
var
|
|
4201
|
-
|
|
4212
|
+
var W, R;
|
|
4213
|
+
M.onClick(), (R = (W = r.props) == null ? void 0 : W.onClick) == null || R.call(W, U);
|
|
4202
4214
|
},
|
|
4203
4215
|
onKeyDown: (U) => {
|
|
4204
|
-
var
|
|
4205
|
-
|
|
4216
|
+
var W, R;
|
|
4217
|
+
M.onKeyDown(U), (R = (W = r.props) == null ? void 0 : W.onKeyDown) == null || R.call(W, U);
|
|
4206
4218
|
}
|
|
4207
4219
|
}) : r;
|
|
4208
4220
|
_(() => {
|
|
4209
4221
|
if (!c) return;
|
|
4210
4222
|
const U = c.current;
|
|
4211
4223
|
if (!U) return;
|
|
4212
|
-
const
|
|
4213
|
-
return U.addEventListener("mouseenter",
|
|
4224
|
+
const W = () => M.onMouseEnter(), R = () => M.onMouseLeave(), T = () => M.onFocus(), $ = () => M.onBlur(), P = () => M.onClick(), Z = (x) => M.onKeyDown(x);
|
|
4225
|
+
return U.addEventListener("mouseenter", W), U.addEventListener("mouseleave", R), U.addEventListener("focus", T, !0), U.addEventListener("blur", $, !0), U.addEventListener("click", P), U.addEventListener("keydown", Z), M["aria-describedby"] ? U.setAttribute(
|
|
4214
4226
|
"aria-describedby",
|
|
4215
|
-
|
|
4227
|
+
M["aria-describedby"]
|
|
4216
4228
|
) : U.removeAttribute("aria-describedby"), () => {
|
|
4217
|
-
U.removeEventListener("mouseenter",
|
|
4229
|
+
U.removeEventListener("mouseenter", W), U.removeEventListener("mouseleave", R), U.removeEventListener("focus", T, !0), U.removeEventListener("blur", $, !0), U.removeEventListener("click", P), U.removeEventListener("keydown", Z);
|
|
4218
4230
|
};
|
|
4219
|
-
}, [c,
|
|
4231
|
+
}, [c, M]);
|
|
4220
4232
|
const V = hr({
|
|
4221
4233
|
variant: e,
|
|
4222
4234
|
buttons: t,
|
|
4223
4235
|
className: n,
|
|
4224
4236
|
title: s,
|
|
4225
4237
|
text: a,
|
|
4226
|
-
position:
|
|
4238
|
+
position: I,
|
|
4227
4239
|
trigger: d,
|
|
4228
4240
|
targetRef: c,
|
|
4229
4241
|
children: r
|
|
@@ -4240,10 +4252,10 @@ const Qt = ({
|
|
|
4240
4252
|
return /* @__PURE__ */ j(me, { children: [
|
|
4241
4253
|
J,
|
|
4242
4254
|
/* @__PURE__ */ u(pe, { children: L && /* @__PURE__ */ u(
|
|
4243
|
-
|
|
4255
|
+
Fe,
|
|
4244
4256
|
{
|
|
4245
|
-
anchorRef:
|
|
4246
|
-
position:
|
|
4257
|
+
anchorRef: D,
|
|
4258
|
+
position: I,
|
|
4247
4259
|
children: /* @__PURE__ */ u(
|
|
4248
4260
|
se.div,
|
|
4249
4261
|
{
|
|
@@ -4258,14 +4270,14 @@ const Qt = ({
|
|
|
4258
4270
|
children: /* @__PURE__ */ u("div", { className: V.container, children: l ? /* @__PURE__ */ u("div", { className: V.content, children: l }) : /* @__PURE__ */ j(me, { children: [
|
|
4259
4271
|
s && /* @__PURE__ */ u("div", { className: V.subHead, children: s }),
|
|
4260
4272
|
a && /* @__PURE__ */ u("div", { className: V.supportingText, children: a }),
|
|
4261
|
-
t && /* @__PURE__ */ u("div", { className: V.actions, children: Array.isArray(t) && t.map((U,
|
|
4273
|
+
t && /* @__PURE__ */ u("div", { className: V.actions, children: Array.isArray(t) && t.map((U, W) => /* @__PURE__ */ u(
|
|
4262
4274
|
Le,
|
|
4263
4275
|
{
|
|
4264
4276
|
size: "small",
|
|
4265
4277
|
variant: "text",
|
|
4266
4278
|
...U
|
|
4267
4279
|
},
|
|
4268
|
-
|
|
4280
|
+
W
|
|
4269
4281
|
)) })
|
|
4270
4282
|
] }) })
|
|
4271
4283
|
}
|
|
@@ -4377,7 +4389,7 @@ const Qt = ({
|
|
|
4377
4389
|
]
|
|
4378
4390
|
}
|
|
4379
4391
|
);
|
|
4380
|
-
},
|
|
4392
|
+
}, Ie = ({
|
|
4381
4393
|
variant: e = "standard",
|
|
4382
4394
|
href: t,
|
|
4383
4395
|
disabled: n = !1,
|
|
@@ -4403,13 +4415,13 @@ const Qt = ({
|
|
|
4403
4415
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
4404
4416
|
);
|
|
4405
4417
|
!r && r !== null && (r = s);
|
|
4406
|
-
const [g, A] = Y.useState(l),
|
|
4418
|
+
const [g, A] = Y.useState(l), I = (O) => {
|
|
4407
4419
|
n && O.preventDefault(), a ? (A(!g), a(!g)) : i && i(O);
|
|
4408
4420
|
};
|
|
4409
4421
|
_(() => {
|
|
4410
4422
|
A(l);
|
|
4411
4423
|
}, [l]);
|
|
4412
|
-
const v = t ? "a" : "button",
|
|
4424
|
+
const v = t ? "a" : "button", N = er({
|
|
4413
4425
|
transition: w,
|
|
4414
4426
|
shape: m,
|
|
4415
4427
|
allowShapeTransformation: b,
|
|
@@ -4427,34 +4439,34 @@ const Qt = ({
|
|
|
4427
4439
|
size: o,
|
|
4428
4440
|
children: s,
|
|
4429
4441
|
...S
|
|
4430
|
-
}),
|
|
4442
|
+
}), D = z(null), M = f || D;
|
|
4431
4443
|
return w = { duration: 0.3, ...w }, /* @__PURE__ */ j(
|
|
4432
4444
|
v,
|
|
4433
4445
|
{
|
|
4434
4446
|
disabled: n,
|
|
4435
4447
|
href: t,
|
|
4436
4448
|
style: { transition: w.duration + "s" },
|
|
4437
|
-
className:
|
|
4449
|
+
className: N.iconButton,
|
|
4438
4450
|
"aria-label": s,
|
|
4439
4451
|
...S,
|
|
4440
4452
|
title: void 0,
|
|
4441
|
-
onClick:
|
|
4442
|
-
ref:
|
|
4453
|
+
onClick: I,
|
|
4454
|
+
ref: M,
|
|
4443
4455
|
children: [
|
|
4444
4456
|
r !== null && /* @__PURE__ */ u(
|
|
4445
4457
|
Qt,
|
|
4446
4458
|
{
|
|
4447
|
-
targetRef:
|
|
4459
|
+
targetRef: M,
|
|
4448
4460
|
trigger: n ? null : void 0,
|
|
4449
4461
|
text: r
|
|
4450
4462
|
}
|
|
4451
4463
|
),
|
|
4452
|
-
/* @__PURE__ */ u("div", { className:
|
|
4464
|
+
/* @__PURE__ */ u("div", { className: N.touchTarget }),
|
|
4453
4465
|
/* @__PURE__ */ u(
|
|
4454
4466
|
be,
|
|
4455
4467
|
{
|
|
4456
4468
|
style: { transition: w.duration + "s" },
|
|
4457
|
-
className:
|
|
4469
|
+
className: N.stateLayer,
|
|
4458
4470
|
colorName: p(
|
|
4459
4471
|
e === "standard" && {
|
|
4460
4472
|
"on-surface-variant": !g,
|
|
@@ -4476,11 +4488,11 @@ const Qt = ({
|
|
|
4476
4488
|
stateClassName: "state-ripple-group-[icon-button]"
|
|
4477
4489
|
}
|
|
4478
4490
|
),
|
|
4479
|
-
c ? /* @__PURE__ */ u(fe, { icon: c, className:
|
|
4491
|
+
c ? /* @__PURE__ */ u(fe, { icon: c, className: N.icon }) : E
|
|
4480
4492
|
]
|
|
4481
4493
|
}
|
|
4482
4494
|
);
|
|
4483
|
-
},
|
|
4495
|
+
}, Fs = ({
|
|
4484
4496
|
className: e,
|
|
4485
4497
|
label: t,
|
|
4486
4498
|
variant: n = "primary",
|
|
@@ -4499,7 +4511,7 @@ const Qt = ({
|
|
|
4499
4511
|
c = { duration: 0.3, ease: "easeInOut", ...c };
|
|
4500
4512
|
const m = z(null), b = i || m, w = typeof d == "boolean", [E, S] = X(y), g = w ? d : E, A = (L) => {
|
|
4501
4513
|
w || S(L), f == null || f(L);
|
|
4502
|
-
},
|
|
4514
|
+
}, I = Y.Children.toArray(o).filter(
|
|
4503
4515
|
(L) => Y.isValidElement(L) && L.type === Le
|
|
4504
4516
|
), v = Qn({
|
|
4505
4517
|
href: s,
|
|
@@ -4512,8 +4524,8 @@ const Qt = ({
|
|
|
4512
4524
|
transition: c,
|
|
4513
4525
|
children: t,
|
|
4514
4526
|
open: g
|
|
4515
|
-
}),
|
|
4516
|
-
|
|
4527
|
+
}), N = se.create(je), D = se.create(Ie), M = (L) => /* @__PURE__ */ u(
|
|
4528
|
+
N,
|
|
4517
4529
|
{
|
|
4518
4530
|
icon: a,
|
|
4519
4531
|
extended: l,
|
|
@@ -4536,10 +4548,10 @@ const Qt = ({
|
|
|
4536
4548
|
), O = Ce();
|
|
4537
4549
|
return /* @__PURE__ */ j("div", { className: v.fabMenu, ref: b, ...h, children: [
|
|
4538
4550
|
/* @__PURE__ */ u(pe, { children: g && /* @__PURE__ */ u("div", { className: v.actions, role: "menu", "aria-hidden": !g, children: (() => {
|
|
4539
|
-
const L =
|
|
4540
|
-
return
|
|
4551
|
+
const L = I.length;
|
|
4552
|
+
return I.map((J, V) => {
|
|
4541
4553
|
J.props;
|
|
4542
|
-
const te = L - 1 - V, U = ((c == null ? void 0 : c.delay) ?? 0) + te * 0.06,
|
|
4554
|
+
const te = L - 1 - V, U = ((c == null ? void 0 : c.delay) ?? 0) + te * 0.06, W = {
|
|
4543
4555
|
open: {
|
|
4544
4556
|
overflow: "visible",
|
|
4545
4557
|
opacity: 1,
|
|
@@ -4570,7 +4582,7 @@ const Qt = ({
|
|
|
4570
4582
|
{
|
|
4571
4583
|
initial: "close",
|
|
4572
4584
|
animate: "open",
|
|
4573
|
-
variants:
|
|
4585
|
+
variants: W,
|
|
4574
4586
|
transition: c,
|
|
4575
4587
|
exit: "close",
|
|
4576
4588
|
children: Y.cloneElement(
|
|
@@ -4601,17 +4613,17 @@ const Qt = ({
|
|
|
4601
4613
|
);
|
|
4602
4614
|
});
|
|
4603
4615
|
})() }) }),
|
|
4604
|
-
|
|
4616
|
+
M({
|
|
4605
4617
|
className: "invisible pointer-events-none"
|
|
4606
4618
|
}),
|
|
4607
4619
|
/* @__PURE__ */ j("div", { className: "absolute right-0 top-0", children: [
|
|
4608
|
-
!g &&
|
|
4620
|
+
!g && M({
|
|
4609
4621
|
className: "",
|
|
4610
4622
|
layout: !0,
|
|
4611
4623
|
layoutId: "fab-menu" + O
|
|
4612
4624
|
}),
|
|
4613
4625
|
g && /* @__PURE__ */ u(me, { children: /* @__PURE__ */ u(
|
|
4614
|
-
|
|
4626
|
+
D,
|
|
4615
4627
|
{
|
|
4616
4628
|
layout: !0,
|
|
4617
4629
|
layoutId: "fab-menu" + O,
|
|
@@ -4649,7 +4661,7 @@ const Qt = ({
|
|
|
4649
4661
|
) })
|
|
4650
4662
|
] })
|
|
4651
4663
|
] });
|
|
4652
|
-
},
|
|
4664
|
+
}, Ws = ({
|
|
4653
4665
|
className: e,
|
|
4654
4666
|
valueFormatter: t,
|
|
4655
4667
|
step: n = 10,
|
|
@@ -4671,24 +4683,24 @@ const Qt = ({
|
|
|
4671
4683
|
onChange: o,
|
|
4672
4684
|
...d
|
|
4673
4685
|
}) => {
|
|
4674
|
-
const y = (
|
|
4675
|
-
const
|
|
4676
|
-
return
|
|
4677
|
-
}, f = (
|
|
4678
|
-
const
|
|
4679
|
-
return (f(!1) -
|
|
4680
|
-
}, [b, w] = X(!1), E = z(null), S = c || E, [g, A] = X(s), [
|
|
4686
|
+
const y = (R) => {
|
|
4687
|
+
const T = h(), $ = f();
|
|
4688
|
+
return R === 1 / 0 ? 100 : R === -1 / 0 ? 0 : (R - T) / ($ - T) * 100;
|
|
4689
|
+
}, f = (R = !1) => R ? l : l == 1 / 0 ? i[(i == null ? void 0 : i.length) - 1].value : l, h = (R = !1) => R ? a : a == -1 / 0 ? i[0].value : a, m = (R) => {
|
|
4690
|
+
const T = h(!1);
|
|
4691
|
+
return (f(!1) - T) * R / 100 + T;
|
|
4692
|
+
}, [b, w] = X(!1), E = z(null), S = c || E, [g, A] = X(s), [I, v] = X(y(s)), [N, D] = X(!1);
|
|
4681
4693
|
_(() => {
|
|
4682
4694
|
A(s), v(y(s));
|
|
4683
4695
|
}, [s]);
|
|
4684
|
-
const
|
|
4685
|
-
|
|
4696
|
+
const M = (R) => {
|
|
4697
|
+
D(!0), w(!0), J(R);
|
|
4686
4698
|
}, O = () => {
|
|
4687
|
-
|
|
4699
|
+
D(!1), w(!1);
|
|
4688
4700
|
};
|
|
4689
|
-
_(() => (
|
|
4701
|
+
_(() => (N ? (window.addEventListener("mouseup", O), window.addEventListener("mousemove", J), window.addEventListener("touchend", O), window.addEventListener("touchmove", J)) : (window.removeEventListener("mouseup", O), window.removeEventListener("mousemove", J), window.removeEventListener("touchend", O), window.removeEventListener("touchmove", J)), () => {
|
|
4690
4702
|
window.removeEventListener("mouseup", O), window.removeEventListener("mousemove", J), window.removeEventListener("touchend", O), window.removeEventListener("touchmove", J);
|
|
4691
|
-
}), [
|
|
4703
|
+
}), [N]);
|
|
4692
4704
|
const L = or({
|
|
4693
4705
|
className: e,
|
|
4694
4706
|
isChanging: b,
|
|
@@ -4700,70 +4712,70 @@ const Qt = ({
|
|
|
4700
4712
|
value: g,
|
|
4701
4713
|
valueFormatter: t,
|
|
4702
4714
|
onChange: o
|
|
4703
|
-
}), J = (
|
|
4704
|
-
const
|
|
4705
|
-
if (
|
|
4706
|
-
const $ =
|
|
4715
|
+
}), J = (R) => {
|
|
4716
|
+
const T = S == null ? void 0 : S.current;
|
|
4717
|
+
if (T) {
|
|
4718
|
+
const $ = T.getBoundingClientRect().left, Z = ((R.type === "touchmove" || R.type === "touchstart" ? R.touches[0].clientX : R.clientX) - $) / T.offsetWidth * 100;
|
|
4707
4719
|
V({ percent: Z });
|
|
4708
4720
|
}
|
|
4709
4721
|
}, V = ({
|
|
4710
|
-
percent:
|
|
4711
|
-
value:
|
|
4722
|
+
percent: R,
|
|
4723
|
+
value: T
|
|
4712
4724
|
}) => {
|
|
4713
|
-
if (
|
|
4714
|
-
if (
|
|
4725
|
+
if (R) {
|
|
4726
|
+
if (R >= 100) {
|
|
4715
4727
|
A(f(!0)), v(100);
|
|
4716
4728
|
return;
|
|
4717
4729
|
}
|
|
4718
|
-
if (
|
|
4730
|
+
if (R <= 0) {
|
|
4719
4731
|
A(h(!0)), v(0);
|
|
4720
4732
|
return;
|
|
4721
4733
|
}
|
|
4722
|
-
|
|
4723
|
-
} else if (
|
|
4724
|
-
if (
|
|
4734
|
+
T = m(R), T == h() && (T = h(!0)), T == f() && (T = f(!0));
|
|
4735
|
+
} else if (T != null) {
|
|
4736
|
+
if (T >= f()) {
|
|
4725
4737
|
A(f(!0)), v(100);
|
|
4726
4738
|
return;
|
|
4727
4739
|
}
|
|
4728
|
-
if (
|
|
4740
|
+
if (T <= h()) {
|
|
4729
4741
|
A(h(!0)), v(0);
|
|
4730
4742
|
return;
|
|
4731
4743
|
}
|
|
4732
|
-
|
|
4744
|
+
R = y(T);
|
|
4733
4745
|
} else
|
|
4734
4746
|
return;
|
|
4735
|
-
n != null ?
|
|
4736
|
-
let x = P.value === 1 / 0 ? f() : P.value === -1 / 0 ? h() : P.value,
|
|
4737
|
-
return x = Math.abs(x -
|
|
4738
|
-
}).value),
|
|
4747
|
+
n != null ? T = Math.round((T - h()) / n) * n + h() : i && (T = i.reduce(($, P, Z) => {
|
|
4748
|
+
let x = P.value === 1 / 0 ? f() : P.value === -1 / 0 ? h() : P.value, k = $.value === 1 / 0 ? f() : $.value === -1 / 0 ? h() : $.value;
|
|
4749
|
+
return x = Math.abs(x - T), k = Math.abs(k - T), x < k ? P : $;
|
|
4750
|
+
}).value), T >= f() && (T = f(!0)), T <= h() && (T = h(!0)), R = y(T), A(T), v(R), o && o(T);
|
|
4739
4751
|
}, [te, U] = X(0);
|
|
4740
4752
|
return _(() => {
|
|
4741
|
-
const
|
|
4753
|
+
const R = () => {
|
|
4742
4754
|
S.current && U(S.current.offsetWidth);
|
|
4743
4755
|
};
|
|
4744
|
-
return
|
|
4745
|
-
window.removeEventListener("resize",
|
|
4756
|
+
return R(), window.addEventListener("resize", R), () => {
|
|
4757
|
+
window.removeEventListener("resize", R);
|
|
4746
4758
|
};
|
|
4747
4759
|
}, []), /* @__PURE__ */ j(
|
|
4748
4760
|
"div",
|
|
4749
4761
|
{
|
|
4750
4762
|
tabIndex: 0,
|
|
4751
|
-
onKeyDown: (
|
|
4752
|
-
switch (
|
|
4763
|
+
onKeyDown: (R) => {
|
|
4764
|
+
switch (R.key) {
|
|
4753
4765
|
case "ArrowRight":
|
|
4754
4766
|
if (n)
|
|
4755
4767
|
V({ value: g + n });
|
|
4756
4768
|
else if (i) {
|
|
4757
|
-
const
|
|
4758
|
-
|
|
4769
|
+
const T = i.find(($) => $.value > g);
|
|
4770
|
+
T && V({ value: T.value });
|
|
4759
4771
|
}
|
|
4760
4772
|
break;
|
|
4761
4773
|
case "ArrowLeft":
|
|
4762
4774
|
if (n)
|
|
4763
4775
|
V({ value: g - n });
|
|
4764
4776
|
else if (i) {
|
|
4765
|
-
const
|
|
4766
|
-
|
|
4777
|
+
const T = i.slice(0).reverse().find(($, P, Z) => g === 1 / 0 ? P === 1 : $.value < g);
|
|
4778
|
+
T && V({ value: T.value });
|
|
4767
4779
|
}
|
|
4768
4780
|
break;
|
|
4769
4781
|
default:
|
|
@@ -4776,15 +4788,15 @@ const Qt = ({
|
|
|
4776
4788
|
"aria-valuenow": g,
|
|
4777
4789
|
"aria-valuetext": g.toString(),
|
|
4778
4790
|
className: L.slider,
|
|
4779
|
-
onMouseDown:
|
|
4791
|
+
onMouseDown: M,
|
|
4780
4792
|
onClick: J,
|
|
4781
4793
|
ref: S,
|
|
4782
|
-
onTouchStart:
|
|
4783
|
-
onDragStart: (
|
|
4794
|
+
onTouchStart: M,
|
|
4795
|
+
onDragStart: (R) => R.preventDefault(),
|
|
4784
4796
|
...d,
|
|
4785
4797
|
children: [
|
|
4786
4798
|
/* @__PURE__ */ u("input", { type: "hidden", name: r, value: g }),
|
|
4787
|
-
/* @__PURE__ */ u("div", { className: L.activeTrack, style: { flex:
|
|
4799
|
+
/* @__PURE__ */ u("div", { className: L.activeTrack, style: { flex: I / 100 } }),
|
|
4788
4800
|
/* @__PURE__ */ u("div", { className: L.handle, children: /* @__PURE__ */ u(pe, { children: b && /* @__PURE__ */ u(
|
|
4789
4801
|
se.div,
|
|
4790
4802
|
{
|
|
@@ -4809,17 +4821,17 @@ const Qt = ({
|
|
|
4809
4821
|
"div",
|
|
4810
4822
|
{
|
|
4811
4823
|
className: L.inactiveTrack,
|
|
4812
|
-
style: { flex: 1 -
|
|
4824
|
+
style: { flex: 1 - I / 100 }
|
|
4813
4825
|
}
|
|
4814
4826
|
),
|
|
4815
4827
|
/* @__PURE__ */ u(
|
|
4816
4828
|
"div",
|
|
4817
4829
|
{
|
|
4818
4830
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
4819
|
-
children: i && i.map((
|
|
4831
|
+
children: i && i.map((R, T) => {
|
|
4820
4832
|
let $ = null;
|
|
4821
|
-
const P = (b ? 9 : 10) / te * 100, Z = y(
|
|
4822
|
-
return Z <=
|
|
4833
|
+
const P = (b ? 9 : 10) / te * 100, Z = y(R.value);
|
|
4834
|
+
return Z <= I - P ? $ = !0 : Z >= I + P && ($ = !1), /* @__PURE__ */ u(
|
|
4823
4835
|
"div",
|
|
4824
4836
|
{
|
|
4825
4837
|
className: p(L.dot, {
|
|
@@ -4827,10 +4839,10 @@ const Qt = ({
|
|
|
4827
4839
|
"bg-primary": $ != null && !$
|
|
4828
4840
|
}),
|
|
4829
4841
|
style: {
|
|
4830
|
-
left: `${y(
|
|
4842
|
+
left: `${y(R.value)}%`
|
|
4831
4843
|
}
|
|
4832
4844
|
},
|
|
4833
|
-
|
|
4845
|
+
T
|
|
4834
4846
|
);
|
|
4835
4847
|
})
|
|
4836
4848
|
}
|
|
@@ -4847,7 +4859,7 @@ const Qt = ({
|
|
|
4847
4859
|
extended: a,
|
|
4848
4860
|
divider: l,
|
|
4849
4861
|
onExtendedChange: i,
|
|
4850
|
-
closeIcon: c =
|
|
4862
|
+
closeIcon: c = We,
|
|
4851
4863
|
transition: o,
|
|
4852
4864
|
...d
|
|
4853
4865
|
}) => {
|
|
@@ -4908,7 +4920,7 @@ const Qt = ({
|
|
|
4908
4920
|
/* @__PURE__ */ j("div", { className: h.header, children: [
|
|
4909
4921
|
r && /* @__PURE__ */ u("p", { className: h.title, children: r }),
|
|
4910
4922
|
/* @__PURE__ */ u(
|
|
4911
|
-
|
|
4923
|
+
Ie,
|
|
4912
4924
|
{
|
|
4913
4925
|
size: "small",
|
|
4914
4926
|
label: "close",
|
|
@@ -4929,7 +4941,7 @@ const Qt = ({
|
|
|
4929
4941
|
]
|
|
4930
4942
|
}
|
|
4931
4943
|
),
|
|
4932
|
-
(l == null && e == "standard" ? !0 : l) && /* @__PURE__ */ u(
|
|
4944
|
+
(l == null && e == "standard" ? !0 : l) && /* @__PURE__ */ u(Be, { className: h.divider, orientation: "vertical" })
|
|
4933
4945
|
]
|
|
4934
4946
|
}
|
|
4935
4947
|
) })
|
|
@@ -4939,7 +4951,7 @@ const Qt = ({
|
|
|
4939
4951
|
message: e,
|
|
4940
4952
|
className: t,
|
|
4941
4953
|
duration: n,
|
|
4942
|
-
closeIcon: r =
|
|
4954
|
+
closeIcon: r = We,
|
|
4943
4955
|
onClose: s,
|
|
4944
4956
|
...a
|
|
4945
4957
|
}) => {
|
|
@@ -4971,7 +4983,7 @@ const Qt = ({
|
|
|
4971
4983
|
children: /* @__PURE__ */ j("div", { className: c.container, children: [
|
|
4972
4984
|
/* @__PURE__ */ u("p", { className: c.supportingText, children: e }),
|
|
4973
4985
|
/* @__PURE__ */ u(
|
|
4974
|
-
|
|
4986
|
+
Ie,
|
|
4975
4987
|
{
|
|
4976
4988
|
onClick: () => o(),
|
|
4977
4989
|
className: c.icon,
|
|
@@ -4982,7 +4994,7 @@ const Qt = ({
|
|
|
4982
4994
|
] })
|
|
4983
4995
|
}
|
|
4984
4996
|
) });
|
|
4985
|
-
},
|
|
4997
|
+
}, Ts = ({
|
|
4986
4998
|
selected: e = !1,
|
|
4987
4999
|
className: t,
|
|
4988
5000
|
activeIcon: n,
|
|
@@ -5081,9 +5093,9 @@ const Qt = ({
|
|
|
5081
5093
|
icon: a
|
|
5082
5094
|
});
|
|
5083
5095
|
}, [l]);
|
|
5084
|
-
const
|
|
5085
|
-
i && i(o ?? null), t && t(
|
|
5086
|
-
},
|
|
5096
|
+
const I = s ? "a" : "button", v = (D) => {
|
|
5097
|
+
i && i(o ?? null), t && t(D);
|
|
5098
|
+
}, N = ar({
|
|
5087
5099
|
className: e,
|
|
5088
5100
|
onTabSelected: d,
|
|
5089
5101
|
scrollable: y,
|
|
@@ -5099,14 +5111,14 @@ const Qt = ({
|
|
|
5099
5111
|
href: s
|
|
5100
5112
|
});
|
|
5101
5113
|
return /* @__PURE__ */ j(
|
|
5102
|
-
|
|
5114
|
+
I,
|
|
5103
5115
|
{
|
|
5104
5116
|
...b,
|
|
5105
5117
|
role: "tab",
|
|
5106
5118
|
"aria-selected": g,
|
|
5107
5119
|
ref: E,
|
|
5108
5120
|
href: s,
|
|
5109
|
-
className:
|
|
5121
|
+
className: N.tab,
|
|
5110
5122
|
onClick: v,
|
|
5111
5123
|
...b,
|
|
5112
5124
|
children: [
|
|
@@ -5114,19 +5126,19 @@ const Qt = ({
|
|
|
5114
5126
|
be,
|
|
5115
5127
|
{
|
|
5116
5128
|
style: { transition: 0.3 + "s" },
|
|
5117
|
-
className:
|
|
5129
|
+
className: N.stateLayer,
|
|
5118
5130
|
colorName: r === "primary" && g ? "primary" : "on-surface",
|
|
5119
5131
|
stateClassName: "state-ripple-group-[tab]"
|
|
5120
5132
|
}
|
|
5121
5133
|
),
|
|
5122
|
-
/* @__PURE__ */ j("span", { className:
|
|
5123
|
-
a && /* @__PURE__ */ u(fe, { icon: a, className:
|
|
5124
|
-
/* @__PURE__ */ u("span", { className:
|
|
5134
|
+
/* @__PURE__ */ j("span", { className: N.content, children: [
|
|
5135
|
+
a && /* @__PURE__ */ u(fe, { icon: a, className: N.icon }),
|
|
5136
|
+
/* @__PURE__ */ u("span", { className: N.label, children: S }),
|
|
5125
5137
|
g && /* @__PURE__ */ u(
|
|
5126
5138
|
se.span,
|
|
5127
5139
|
{
|
|
5128
5140
|
layoutId: `underline-${c}`,
|
|
5129
|
-
className:
|
|
5141
|
+
className: N.underline,
|
|
5130
5142
|
transition: { duration: 0.3 }
|
|
5131
5143
|
}
|
|
5132
5144
|
)
|
|
@@ -5134,7 +5146,7 @@ const Qt = ({
|
|
|
5134
5146
|
]
|
|
5135
5147
|
}
|
|
5136
5148
|
);
|
|
5137
|
-
}, Qe = cn(null),
|
|
5149
|
+
}, Qe = cn(null), Bs = ({
|
|
5138
5150
|
variant: e = "primary",
|
|
5139
5151
|
onTabSelected: t,
|
|
5140
5152
|
children: n,
|
|
@@ -5201,7 +5213,7 @@ const Qt = ({
|
|
|
5201
5213
|
[i, c, o, d]
|
|
5202
5214
|
);
|
|
5203
5215
|
return /* @__PURE__ */ u(Qe.Provider, { value: y, children: e });
|
|
5204
|
-
},
|
|
5216
|
+
}, Fr = ({
|
|
5205
5217
|
children: e,
|
|
5206
5218
|
className: t,
|
|
5207
5219
|
isSelected: n = !1
|
|
@@ -5220,7 +5232,7 @@ const Qt = ({
|
|
|
5220
5232
|
if (!n)
|
|
5221
5233
|
return console.warn("TabPanels must be used within a TabGroup"), null;
|
|
5222
5234
|
const { selectedTab: r, direction: s, tabsId: a } = n, l = Y.Children.toArray(e).filter(
|
|
5223
|
-
(c) => Y.isValidElement(c) && c.type ===
|
|
5235
|
+
(c) => Y.isValidElement(c) && c.type === Fr
|
|
5224
5236
|
), i = ur({
|
|
5225
5237
|
children: e,
|
|
5226
5238
|
className: t
|
|
@@ -5252,7 +5264,7 @@ const Qt = ({
|
|
|
5252
5264
|
o
|
|
5253
5265
|
)
|
|
5254
5266
|
) }) });
|
|
5255
|
-
},
|
|
5267
|
+
}, Wr = ({
|
|
5256
5268
|
hasSelected: e
|
|
5257
5269
|
}) => ({
|
|
5258
5270
|
datePicker: p(
|
|
@@ -5279,7 +5291,7 @@ const Qt = ({
|
|
|
5279
5291
|
)
|
|
5280
5292
|
}), Pr = ne(
|
|
5281
5293
|
"datePicker",
|
|
5282
|
-
|
|
5294
|
+
Wr
|
|
5283
5295
|
), Or = ({
|
|
5284
5296
|
value: e,
|
|
5285
5297
|
defaultValue: t,
|
|
@@ -5295,35 +5307,35 @@ const Qt = ({
|
|
|
5295
5307
|
...y
|
|
5296
5308
|
}) => {
|
|
5297
5309
|
const [f, h] = X(() => {
|
|
5298
|
-
const x = (C) => C instanceof Date ? C : Array.isArray(C) && C[0] ? C[0] : null,
|
|
5299
|
-
return new Date(
|
|
5310
|
+
const x = (C) => C instanceof Date ? C : Array.isArray(C) && C[0] ? C[0] : null, k = x(e) || x(t) || /* @__PURE__ */ new Date();
|
|
5311
|
+
return new Date(k.getFullYear(), k.getMonth(), 1);
|
|
5300
5312
|
}), [m, b] = X(0), [w, E] = X("day"), S = e !== void 0, [g, A] = X(
|
|
5301
5313
|
t || null
|
|
5302
|
-
),
|
|
5303
|
-
const x = f.getFullYear(),
|
|
5314
|
+
), I = S ? e || null : g, v = (x, k) => new Date(x, k + 1, 0).getDate(), N = ve(() => {
|
|
5315
|
+
const x = f.getFullYear(), k = f.getMonth(), C = v(x, k), G = (new Date(x, k, 1).getDay() - i + 7) % 7, ee = [], oe = v(x, k - 1);
|
|
5304
5316
|
for (let q = G - 1; q >= 0; q--)
|
|
5305
5317
|
ee.push({
|
|
5306
|
-
date: new Date(x,
|
|
5318
|
+
date: new Date(x, k - 1, oe - q),
|
|
5307
5319
|
isCurrentMonth: !1
|
|
5308
5320
|
});
|
|
5309
5321
|
for (let q = 1; q <= C; q++)
|
|
5310
|
-
ee.push({ date: new Date(x,
|
|
5311
|
-
const
|
|
5312
|
-
for (let q = 1; q <=
|
|
5322
|
+
ee.push({ date: new Date(x, k, q), isCurrentMonth: !0 });
|
|
5323
|
+
const F = 42 - ee.length;
|
|
5324
|
+
for (let q = 1; q <= F; q++)
|
|
5313
5325
|
ee.push({
|
|
5314
|
-
date: new Date(x,
|
|
5326
|
+
date: new Date(x, k + 1, q),
|
|
5315
5327
|
isCurrentMonth: !1
|
|
5316
5328
|
});
|
|
5317
5329
|
return ee;
|
|
5318
|
-
}, [f, i]),
|
|
5319
|
-
const x = (/* @__PURE__ */ new Date()).getFullYear(),
|
|
5320
|
-
for (let G =
|
|
5330
|
+
}, [f, i]), D = ve(() => {
|
|
5331
|
+
const x = (/* @__PURE__ */ new Date()).getFullYear(), k = x - 100, C = x + 100, K = [];
|
|
5332
|
+
for (let G = k; G <= C; G++)
|
|
5321
5333
|
K.push(G);
|
|
5322
5334
|
return K;
|
|
5323
|
-
}, []),
|
|
5335
|
+
}, []), M = z(null);
|
|
5324
5336
|
_(() => {
|
|
5325
|
-
if (w === "year" &&
|
|
5326
|
-
const x =
|
|
5337
|
+
if (w === "year" && M.current) {
|
|
5338
|
+
const x = M.current.querySelector(
|
|
5327
5339
|
'[data-selected="true"]'
|
|
5328
5340
|
);
|
|
5329
5341
|
x && x.scrollIntoView({ block: "center" });
|
|
@@ -5337,7 +5349,7 @@ const Qt = ({
|
|
|
5337
5349
|
[l]
|
|
5338
5350
|
), J = ve(() => {
|
|
5339
5351
|
const x = new Date(2023, 0, 1 + i);
|
|
5340
|
-
return Array.from({ length: 7 }).map((
|
|
5352
|
+
return Array.from({ length: 7 }).map((k, C) => {
|
|
5341
5353
|
const K = new Date(x);
|
|
5342
5354
|
return K.setDate(x.getDate() + C), L.format(K).charAt(0).toUpperCase();
|
|
5343
5355
|
});
|
|
@@ -5346,32 +5358,32 @@ const Qt = ({
|
|
|
5346
5358
|
}, te = () => {
|
|
5347
5359
|
b(1), h((x) => new Date(x.getFullYear(), x.getMonth() + 1, 1));
|
|
5348
5360
|
}, U = (x) => {
|
|
5349
|
-
h((
|
|
5350
|
-
},
|
|
5351
|
-
let
|
|
5361
|
+
h((k) => new Date(x, k.getMonth(), 1)), E("day");
|
|
5362
|
+
}, W = (x, k) => x ? x.getDate() === k.getDate() && x.getMonth() === k.getMonth() && x.getFullYear() === k.getFullYear() : !1, R = (x) => W(/* @__PURE__ */ new Date(), x), T = (x) => {
|
|
5363
|
+
let k = x;
|
|
5352
5364
|
if (d === "single")
|
|
5353
|
-
|
|
5365
|
+
k = x;
|
|
5354
5366
|
else {
|
|
5355
|
-
const C =
|
|
5356
|
-
!K || K && G ?
|
|
5367
|
+
const C = I, [K, G] = Array.isArray(C) ? C : [null, null];
|
|
5368
|
+
!K || K && G ? k = [x, null] : x < K ? k = [x, K] : k = [K, x];
|
|
5357
5369
|
}
|
|
5358
|
-
S || A(
|
|
5370
|
+
S || A(k), n && n(k);
|
|
5359
5371
|
}, $ = (x) => {
|
|
5360
5372
|
if (d === "single")
|
|
5361
5373
|
return {
|
|
5362
|
-
isSelected:
|
|
5374
|
+
isSelected: W(I, x),
|
|
5363
5375
|
isStart: !1,
|
|
5364
5376
|
isEnd: !1,
|
|
5365
5377
|
isInRange: !1
|
|
5366
5378
|
};
|
|
5367
|
-
const
|
|
5379
|
+
const k = Array.isArray(I) ? I : [I, null], [C, K] = k, G = W(C, x), ee = W(K, x);
|
|
5368
5380
|
let oe = !1;
|
|
5369
5381
|
if (C && K) {
|
|
5370
5382
|
const le = new Date(
|
|
5371
5383
|
C.getFullYear(),
|
|
5372
5384
|
C.getMonth(),
|
|
5373
5385
|
C.getDate()
|
|
5374
|
-
).getTime(),
|
|
5386
|
+
).getTime(), F = new Date(
|
|
5375
5387
|
K.getFullYear(),
|
|
5376
5388
|
K.getMonth(),
|
|
5377
5389
|
K.getDate()
|
|
@@ -5380,11 +5392,11 @@ const Qt = ({
|
|
|
5380
5392
|
x.getMonth(),
|
|
5381
5393
|
x.getDate()
|
|
5382
5394
|
).getTime();
|
|
5383
|
-
oe = q > le && q <
|
|
5395
|
+
oe = q > le && q < F;
|
|
5384
5396
|
}
|
|
5385
5397
|
return { isSelected: G || ee, isStart: G, isEnd: ee, isInRange: oe };
|
|
5386
5398
|
}, P = Pr({
|
|
5387
|
-
hasSelected: !!
|
|
5399
|
+
hasSelected: !!I
|
|
5388
5400
|
}), Z = {
|
|
5389
5401
|
enter: (x) => ({
|
|
5390
5402
|
x: x > 0 ? "100%" : "-100%",
|
|
@@ -5432,7 +5444,7 @@ const Qt = ({
|
|
|
5432
5444
|
),
|
|
5433
5445
|
w === "day" && /* @__PURE__ */ j("div", { className: "flex items-center", children: [
|
|
5434
5446
|
/* @__PURE__ */ u(
|
|
5435
|
-
|
|
5447
|
+
Ie,
|
|
5436
5448
|
{
|
|
5437
5449
|
size: "xSmall",
|
|
5438
5450
|
allowShapeTransformation: !1,
|
|
@@ -5443,7 +5455,7 @@ const Qt = ({
|
|
|
5443
5455
|
}
|
|
5444
5456
|
),
|
|
5445
5457
|
/* @__PURE__ */ u(
|
|
5446
|
-
|
|
5458
|
+
Ie,
|
|
5447
5459
|
{
|
|
5448
5460
|
size: "xSmall",
|
|
5449
5461
|
allowShapeTransformation: !1,
|
|
@@ -5459,8 +5471,8 @@ const Qt = ({
|
|
|
5459
5471
|
"div",
|
|
5460
5472
|
{
|
|
5461
5473
|
className: "h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",
|
|
5462
|
-
ref:
|
|
5463
|
-
children:
|
|
5474
|
+
ref: M,
|
|
5475
|
+
children: D.map((x) => /* @__PURE__ */ u(
|
|
5464
5476
|
Le,
|
|
5465
5477
|
{
|
|
5466
5478
|
size: "small",
|
|
@@ -5477,7 +5489,7 @@ const Qt = ({
|
|
|
5477
5489
|
))
|
|
5478
5490
|
}
|
|
5479
5491
|
) : /* @__PURE__ */ j(me, { children: [
|
|
5480
|
-
/* @__PURE__ */ u("div", { className: P.weekDays, children: J.map((x,
|
|
5492
|
+
/* @__PURE__ */ u("div", { className: P.weekDays, children: J.map((x, k) => /* @__PURE__ */ u("div", { className: P.weekDay, children: x }, k)) }),
|
|
5481
5493
|
/* @__PURE__ */ u("div", { className: "overflow-hidden relative min-h-[240px]", children: /* @__PURE__ */ u(
|
|
5482
5494
|
pe,
|
|
5483
5495
|
{
|
|
@@ -5494,10 +5506,10 @@ const Qt = ({
|
|
|
5494
5506
|
exit: "exit",
|
|
5495
5507
|
transition: { type: "spring", bounce: 0, duration: 0.3 },
|
|
5496
5508
|
className: P.daysGrid,
|
|
5497
|
-
children:
|
|
5509
|
+
children: N.map((x, k) => {
|
|
5498
5510
|
if (!x.isCurrentMonth)
|
|
5499
|
-
return /* @__PURE__ */ u("div", { className: P.dayCell },
|
|
5500
|
-
const { isSelected: C, isStart: K, isEnd: G, isInRange: ee } = $(x.date), oe =
|
|
5511
|
+
return /* @__PURE__ */ u("div", { className: P.dayCell }, k);
|
|
5512
|
+
const { isSelected: C, isStart: K, isEnd: G, isInRange: ee } = $(x.date), oe = R(x.date), le = r && x.date < r || s && x.date > s || (a == null ? void 0 : a(x.date));
|
|
5501
5513
|
return /* @__PURE__ */ u(
|
|
5502
5514
|
"div",
|
|
5503
5515
|
{
|
|
@@ -5505,8 +5517,8 @@ const Qt = ({
|
|
|
5505
5517
|
P.dayCell,
|
|
5506
5518
|
// Range background styles applied to the cell wrapper
|
|
5507
5519
|
ee && "bg-primary/20",
|
|
5508
|
-
K && (
|
|
5509
|
-
G && (
|
|
5520
|
+
K && (I == null ? void 0 : I[1]) && "bg-gradient-to-r from-transparent to-primary/20",
|
|
5521
|
+
G && (I == null ? void 0 : I[0]) && "bg-gradient-to-l from-transparent to-primary/20"
|
|
5510
5522
|
),
|
|
5511
5523
|
children: /* @__PURE__ */ u(
|
|
5512
5524
|
Le,
|
|
@@ -5528,13 +5540,13 @@ const Qt = ({
|
|
|
5528
5540
|
text: !C && !oe
|
|
5529
5541
|
}),
|
|
5530
5542
|
label: x.date.getDate().toString(),
|
|
5531
|
-
onClick: () =>
|
|
5543
|
+
onClick: () => T(x.date),
|
|
5532
5544
|
disabled: le,
|
|
5533
5545
|
children: x.date.getDate().toString()
|
|
5534
5546
|
}
|
|
5535
5547
|
)
|
|
5536
5548
|
},
|
|
5537
|
-
|
|
5549
|
+
k
|
|
5538
5550
|
);
|
|
5539
5551
|
})
|
|
5540
5552
|
},
|
|
@@ -5568,20 +5580,20 @@ const Qt = ({
|
|
|
5568
5580
|
showSupportingText: S,
|
|
5569
5581
|
id: g,
|
|
5570
5582
|
style: A,
|
|
5571
|
-
ref:
|
|
5583
|
+
ref: I,
|
|
5572
5584
|
onFocus: v,
|
|
5573
|
-
onBlur:
|
|
5574
|
-
options:
|
|
5575
|
-
children:
|
|
5585
|
+
onBlur: N,
|
|
5586
|
+
options: D,
|
|
5587
|
+
children: M,
|
|
5576
5588
|
...O
|
|
5577
5589
|
}) => {
|
|
5578
5590
|
var rt;
|
|
5579
|
-
const L = Ce(), J = g || L, V = `${J}-helper`, te = w !== void 0, [U,
|
|
5591
|
+
const L = Ce(), J = g || L, V = `${J}-helper`, te = w !== void 0, [U, W] = X(E ?? ""), R = te ? w : U, [T, $] = X(!1), [P, Z] = X(!!(r != null && r.length)), x = z(null), k = I || x, C = z(null), K = z(null), G = z(null), ee = S ?? (!!(r != null && r.length) || !!(o != null && o.length));
|
|
5580
5592
|
_(() => {
|
|
5581
5593
|
Z(!!(r != null && r.length));
|
|
5582
5594
|
}, [r]);
|
|
5583
5595
|
const oe = () => {
|
|
5584
|
-
|
|
5596
|
+
k.current && !T && !n && f !== "select" && k.current.focus();
|
|
5585
5597
|
};
|
|
5586
5598
|
_(() => {
|
|
5587
5599
|
if (!(!t || n) && f !== "select") {
|
|
@@ -5590,19 +5602,19 @@ const Qt = ({
|
|
|
5590
5602
|
});
|
|
5591
5603
|
return () => window.cancelAnimationFrame(Q);
|
|
5592
5604
|
}
|
|
5593
|
-
}, [t, n,
|
|
5594
|
-
|
|
5595
|
-
}, [
|
|
5605
|
+
}, [t, n, k, f]), _(() => {
|
|
5606
|
+
T ? (Z(!1), v == null || v()) : (r != null && r.length && Z(!0), N == null || N());
|
|
5607
|
+
}, [T]);
|
|
5596
5608
|
const le = (Q) => {
|
|
5597
5609
|
const ae = Q.target.value;
|
|
5598
|
-
te ||
|
|
5599
|
-
},
|
|
5600
|
-
const Q = String(
|
|
5610
|
+
te || W(ae), Z(!1), b && b(Q);
|
|
5611
|
+
}, F = f === "date", [q, B] = X(!1), [re, ce] = X(null), Se = ve(() => {
|
|
5612
|
+
const Q = String(R);
|
|
5601
5613
|
if (!Q) return null;
|
|
5602
5614
|
const [ae, ke, Re] = Q.split("-").map(Number);
|
|
5603
5615
|
return ae && ke && Re ? new Date(ae, ke - 1, Re) : null;
|
|
5604
|
-
}, [
|
|
5605
|
-
n || (q ?
|
|
5616
|
+
}, [R]), De = () => {
|
|
5617
|
+
n || (q ? B(!1) : (ce(Se), B(!0)));
|
|
5606
5618
|
};
|
|
5607
5619
|
_(() => {
|
|
5608
5620
|
q ? $(!0) : (!de || !ge) && $(!1);
|
|
@@ -5614,11 +5626,11 @@ const Qt = ({
|
|
|
5614
5626
|
}, ae = (we) => {
|
|
5615
5627
|
var st, ot;
|
|
5616
5628
|
const $e = we.target, Oe = (st = G.current) == null ? void 0 : st.contains($e), on = (ot = K.current) == null ? void 0 : ot.contains($e);
|
|
5617
|
-
!Oe && !on &&
|
|
5629
|
+
!Oe && !on && B(!1);
|
|
5618
5630
|
}, ke = (we) => {
|
|
5619
|
-
Q(we.target) ||
|
|
5631
|
+
Q(we.target) || B(!1);
|
|
5620
5632
|
}, Re = (we) => {
|
|
5621
|
-
we.key === "Escape" &&
|
|
5633
|
+
we.key === "Escape" && B(!1);
|
|
5622
5634
|
};
|
|
5623
5635
|
return document.addEventListener("pointerdown", ae), document.addEventListener("focusin", ke), document.addEventListener("keydown", Re), () => {
|
|
5624
5636
|
document.removeEventListener("pointerdown", ae), document.removeEventListener("focusin", ke), document.removeEventListener("keydown", Re);
|
|
@@ -5626,25 +5638,25 @@ const Qt = ({
|
|
|
5626
5638
|
}, [q]);
|
|
5627
5639
|
const en = () => {
|
|
5628
5640
|
const Q = re ? re.toLocaleDateString("en-CA") : "";
|
|
5629
|
-
te ||
|
|
5641
|
+
te || W(Q), b && b({
|
|
5630
5642
|
target: {
|
|
5631
5643
|
value: Q,
|
|
5632
5644
|
name: l,
|
|
5633
5645
|
type: f
|
|
5634
5646
|
}
|
|
5635
|
-
}),
|
|
5647
|
+
}), B(!1);
|
|
5636
5648
|
}, de = f === "select", [ge, He] = X(!1), ze = z(null), et = ve(() => {
|
|
5637
|
-
if (de &&
|
|
5638
|
-
const Q =
|
|
5639
|
-
(ae) => String(ae.value) === String(
|
|
5649
|
+
if (de && D) {
|
|
5650
|
+
const Q = D.find(
|
|
5651
|
+
(ae) => String(ae.value) === String(R)
|
|
5640
5652
|
);
|
|
5641
|
-
return Q ? Q.label :
|
|
5653
|
+
return Q ? Q.label : R;
|
|
5642
5654
|
}
|
|
5643
|
-
return
|
|
5644
|
-
}, [
|
|
5655
|
+
return R;
|
|
5656
|
+
}, [R, de, D]), tt = () => {
|
|
5645
5657
|
n || (He(!ge), $(!ge));
|
|
5646
5658
|
}, nt = (Q) => {
|
|
5647
|
-
if (te ||
|
|
5659
|
+
if (te || W(String(Q)), b) {
|
|
5648
5660
|
const ae = {
|
|
5649
5661
|
target: {
|
|
5650
5662
|
value: String(Q),
|
|
@@ -5667,11 +5679,11 @@ const Qt = ({
|
|
|
5667
5679
|
}, [ge]);
|
|
5668
5680
|
const Ne = ve(() => {
|
|
5669
5681
|
if (d) return d;
|
|
5670
|
-
if (
|
|
5682
|
+
if (F) return gr;
|
|
5671
5683
|
if (de) return ge ? wr : Kt;
|
|
5672
|
-
}, [d,
|
|
5684
|
+
}, [d, F, de, ge]), tn = F || de ? "[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent" : "", ye = fr({
|
|
5673
5685
|
showSupportingText: ee,
|
|
5674
|
-
isFocused:
|
|
5686
|
+
isFocused: T,
|
|
5675
5687
|
showErrorIcon: P,
|
|
5676
5688
|
disabled: n,
|
|
5677
5689
|
name: l,
|
|
@@ -5692,7 +5704,7 @@ const Qt = ({
|
|
|
5692
5704
|
}), nn = h ? wn : "input", rn = h ? {} : {
|
|
5693
5705
|
type: de ? "text" : f,
|
|
5694
5706
|
readOnly: de
|
|
5695
|
-
}, Ve =
|
|
5707
|
+
}, Ve = T || typeof R == "string" && R.length > 0 || f == "date" || de && ge, Pe = Ve && e === "outlined", sn = !Pe;
|
|
5696
5708
|
return /* @__PURE__ */ j("div", { ref: C, className: ye.textField, style: A, children: [
|
|
5697
5709
|
/* @__PURE__ */ j(
|
|
5698
5710
|
"fieldset",
|
|
@@ -5754,13 +5766,13 @@ const Qt = ({
|
|
|
5754
5766
|
nn,
|
|
5755
5767
|
{
|
|
5756
5768
|
...O,
|
|
5757
|
-
ref:
|
|
5769
|
+
ref: k,
|
|
5758
5770
|
value: et,
|
|
5759
5771
|
onChange: le,
|
|
5760
5772
|
className: p(ye.input, tn),
|
|
5761
5773
|
id: J,
|
|
5762
5774
|
name: l,
|
|
5763
|
-
placeholder:
|
|
5775
|
+
placeholder: T ? s ?? void 0 : "",
|
|
5764
5776
|
onFocus: () => {
|
|
5765
5777
|
de || $(!0);
|
|
5766
5778
|
},
|
|
@@ -5780,13 +5792,13 @@ const Qt = ({
|
|
|
5780
5792
|
Ne && /* @__PURE__ */ u(
|
|
5781
5793
|
"div",
|
|
5782
5794
|
{
|
|
5783
|
-
ref:
|
|
5795
|
+
ref: F ? K : void 0,
|
|
5784
5796
|
onClick: (Q) => {
|
|
5785
|
-
Q.stopPropagation(),
|
|
5797
|
+
Q.stopPropagation(), F && De(), de && tt();
|
|
5786
5798
|
},
|
|
5787
5799
|
className: p(
|
|
5788
5800
|
ye.trailingIcon,
|
|
5789
|
-
(
|
|
5801
|
+
(F || de) && "cursor-pointer"
|
|
5790
5802
|
),
|
|
5791
5803
|
children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center w-full h-full", children: Y.isValidElement(Ne) ? Ne : /* @__PURE__ */ u(
|
|
5792
5804
|
fe,
|
|
@@ -5818,7 +5830,7 @@ const Qt = ({
|
|
|
5818
5830
|
}
|
|
5819
5831
|
),
|
|
5820
5832
|
ee && /* @__PURE__ */ u("p", { className: ye.supportingText, id: V, children: r != null && r.length ? r : o != null && o.length ? o : " " }),
|
|
5821
|
-
|
|
5833
|
+
F && q && /* @__PURE__ */ u(me, { children: /* @__PURE__ */ u(Fe, { anchorRef: C, position: "bottom", children: /* @__PURE__ */ j(
|
|
5822
5834
|
"div",
|
|
5823
5835
|
{
|
|
5824
5836
|
ref: G,
|
|
@@ -5838,7 +5850,7 @@ const Qt = ({
|
|
|
5838
5850
|
{
|
|
5839
5851
|
variant: "text",
|
|
5840
5852
|
size: "small",
|
|
5841
|
-
onClick: () =>
|
|
5853
|
+
onClick: () => B(!1),
|
|
5842
5854
|
children: "Cancel"
|
|
5843
5855
|
}
|
|
5844
5856
|
),
|
|
@@ -5856,16 +5868,16 @@ const Qt = ({
|
|
|
5856
5868
|
}
|
|
5857
5869
|
) }) }),
|
|
5858
5870
|
de && ge && /* @__PURE__ */ u(
|
|
5859
|
-
|
|
5871
|
+
Fe,
|
|
5860
5872
|
{
|
|
5861
5873
|
anchorRef: C,
|
|
5862
5874
|
position: "bottom",
|
|
5863
5875
|
style: { width: (rt = C.current) == null ? void 0 : rt.offsetWidth },
|
|
5864
|
-
children: /* @__PURE__ */ u("div", { ref: ze, children: /* @__PURE__ */ u(Jt, { className: "max-w-full", selected:
|
|
5876
|
+
children: /* @__PURE__ */ u("div", { ref: ze, children: /* @__PURE__ */ u(Jt, { className: "max-w-full", selected: R, children: M ? Y.Children.map(M, (Q) => Y.isValidElement(Q) && Q.type === qe ? Y.cloneElement(Q, {
|
|
5865
5877
|
onClick: (ae) => {
|
|
5866
5878
|
Q.props.onClick && Q.props.onClick(ae), nt(Q.props.value ?? "");
|
|
5867
5879
|
}
|
|
5868
|
-
}) : Q) :
|
|
5880
|
+
}) : Q) : D == null ? void 0 : D.map((Q, ae) => Q.type === "divider" ? /* @__PURE__ */ u(Be, { className: "my-1" }, ae) : Q.type === "headline" ? /* @__PURE__ */ u(Gt, { label: Q.label }, ae) : /* @__PURE__ */ u(
|
|
5869
5881
|
qe,
|
|
5870
5882
|
{
|
|
5871
5883
|
onClick: (ke) => {
|
|
@@ -5879,7 +5891,7 @@ const Qt = ({
|
|
|
5879
5891
|
}
|
|
5880
5892
|
)
|
|
5881
5893
|
] });
|
|
5882
|
-
},
|
|
5894
|
+
}, Tr = ({ isSelected: e, icon: t, label: n, variant: r }) => ({
|
|
5883
5895
|
navigationRailItem: p(
|
|
5884
5896
|
" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",
|
|
5885
5897
|
{
|
|
@@ -5911,9 +5923,9 @@ const Qt = ({
|
|
|
5911
5923
|
"text-label-large ": r == "horizontal",
|
|
5912
5924
|
"text-label-medium": r == "vertical"
|
|
5913
5925
|
})
|
|
5914
|
-
}),
|
|
5926
|
+
}), Br = ne(
|
|
5915
5927
|
"navigationRailItem",
|
|
5916
|
-
|
|
5928
|
+
Tr
|
|
5917
5929
|
), Hr = ({ label: e }) => /* @__PURE__ */ u("div", { className: " h-9 flex items-center mx-9 mt-3", children: /* @__PURE__ */ u("p", { className: "text-label-large text-on-surface-variant", children: e }) }), zr = ({
|
|
5918
5930
|
className: e,
|
|
5919
5931
|
onClick: t,
|
|
@@ -5936,7 +5948,7 @@ const Qt = ({
|
|
|
5936
5948
|
...S
|
|
5937
5949
|
}) => {
|
|
5938
5950
|
E && (n = E);
|
|
5939
|
-
const g = z(null), A = y || g, [
|
|
5951
|
+
const g = z(null), A = y || g, [I, v] = X(d);
|
|
5940
5952
|
_(() => {
|
|
5941
5953
|
d && l == null ? v(!0) : v(l == c && c != null);
|
|
5942
5954
|
}, [l]), _(() => {
|
|
@@ -5947,9 +5959,9 @@ const Qt = ({
|
|
|
5947
5959
|
icon: a
|
|
5948
5960
|
});
|
|
5949
5961
|
}, [l]);
|
|
5950
|
-
const
|
|
5962
|
+
const N = s ? "a" : "button", D = (O) => {
|
|
5951
5963
|
i && i(c ?? null), t && t(O);
|
|
5952
|
-
},
|
|
5964
|
+
}, M = Br({
|
|
5953
5965
|
isExtended: h,
|
|
5954
5966
|
extendedOnly: w,
|
|
5955
5967
|
className: e,
|
|
@@ -5957,11 +5969,11 @@ const Qt = ({
|
|
|
5957
5969
|
selectedItem: l,
|
|
5958
5970
|
index: c,
|
|
5959
5971
|
transition: f,
|
|
5960
|
-
selected:
|
|
5972
|
+
selected: I,
|
|
5961
5973
|
variant: r,
|
|
5962
5974
|
icon: a,
|
|
5963
5975
|
label: n,
|
|
5964
|
-
isSelected:
|
|
5976
|
+
isSelected: I,
|
|
5965
5977
|
setSelectedItem: i,
|
|
5966
5978
|
href: s,
|
|
5967
5979
|
children: n,
|
|
@@ -5971,15 +5983,15 @@ const Qt = ({
|
|
|
5971
5983
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5972
5984
|
// @ts-expect-error
|
|
5973
5985
|
/* @__PURE__ */ j(
|
|
5974
|
-
|
|
5986
|
+
N,
|
|
5975
5987
|
{
|
|
5976
5988
|
...S,
|
|
5977
5989
|
role: "tab",
|
|
5978
|
-
"aria-selected":
|
|
5990
|
+
"aria-selected": I,
|
|
5979
5991
|
ref: A,
|
|
5980
5992
|
href: s,
|
|
5981
|
-
className:
|
|
5982
|
-
onClick:
|
|
5993
|
+
className: M.navigationRailItem,
|
|
5994
|
+
onClick: D,
|
|
5983
5995
|
style: { transition: f.duration + "s", ...b },
|
|
5984
5996
|
children: [
|
|
5985
5997
|
/* @__PURE__ */ j(
|
|
@@ -5989,16 +6001,16 @@ const Qt = ({
|
|
|
5989
6001
|
transition: r == "horizontal" ? f.duration + `s, gap ${f.duration / 2}s ${f.duration - f.duration / 2}s` : f.duration + `s, gap ${f.duration / 3}s ${f.duration - f.duration / 3}s`
|
|
5990
6002
|
},
|
|
5991
6003
|
transition: f,
|
|
5992
|
-
className:
|
|
6004
|
+
className: M.container,
|
|
5993
6005
|
children: [
|
|
5994
6006
|
/* @__PURE__ */ u(
|
|
5995
6007
|
be,
|
|
5996
6008
|
{
|
|
5997
6009
|
style: { transition: f.duration + "s" },
|
|
5998
|
-
className:
|
|
6010
|
+
className: M.stateLayer,
|
|
5999
6011
|
colorName: p({
|
|
6000
|
-
"on-surface": !
|
|
6001
|
-
"on-secondary-container":
|
|
6012
|
+
"on-surface": !I,
|
|
6013
|
+
"on-secondary-container": I
|
|
6002
6014
|
}),
|
|
6003
6015
|
stateClassName: "state-ripple-group-[navigation-rail-item]"
|
|
6004
6016
|
}
|
|
@@ -6006,8 +6018,8 @@ const Qt = ({
|
|
|
6006
6018
|
a && /* @__PURE__ */ u(
|
|
6007
6019
|
fe,
|
|
6008
6020
|
{
|
|
6009
|
-
icon:
|
|
6010
|
-
className:
|
|
6021
|
+
icon: I ? m : a,
|
|
6022
|
+
className: M.icon
|
|
6011
6023
|
}
|
|
6012
6024
|
),
|
|
6013
6025
|
/* @__PURE__ */ u(pe, { children: r == "horizontal" && (() => {
|
|
@@ -6034,7 +6046,7 @@ const Qt = ({
|
|
|
6034
6046
|
initial: O,
|
|
6035
6047
|
animate: L,
|
|
6036
6048
|
exit: O,
|
|
6037
|
-
className:
|
|
6049
|
+
className: M.label,
|
|
6038
6050
|
children: n
|
|
6039
6051
|
}
|
|
6040
6052
|
);
|
|
@@ -6069,7 +6081,7 @@ const Qt = ({
|
|
|
6069
6081
|
initial: L,
|
|
6070
6082
|
animate: L,
|
|
6071
6083
|
exit: O,
|
|
6072
|
-
className:
|
|
6084
|
+
className: M.label,
|
|
6073
6085
|
transition: f,
|
|
6074
6086
|
children: n
|
|
6075
6087
|
}
|
|
@@ -6112,7 +6124,7 @@ const Qt = ({
|
|
|
6112
6124
|
label: "Open menu"
|
|
6113
6125
|
},
|
|
6114
6126
|
opened: {
|
|
6115
|
-
icon:
|
|
6127
|
+
icon: We,
|
|
6116
6128
|
label: "Close menu"
|
|
6117
6129
|
}
|
|
6118
6130
|
},
|
|
@@ -6124,18 +6136,18 @@ const Qt = ({
|
|
|
6124
6136
|
const [f, h] = X(null), [m, b] = X(a);
|
|
6125
6137
|
let w;
|
|
6126
6138
|
s == 0 || s != null ? w = s : w = f;
|
|
6127
|
-
const E = y || h, S = z(null), g = (
|
|
6128
|
-
t == null || t(
|
|
6139
|
+
const E = y || h, S = z(null), g = (M) => {
|
|
6140
|
+
t == null || t(M);
|
|
6129
6141
|
};
|
|
6130
|
-
function A(
|
|
6142
|
+
function A(M) {
|
|
6131
6143
|
const O = [];
|
|
6132
|
-
return un.forEach(
|
|
6133
|
-
|
|
6144
|
+
return un.forEach(M, (L) => {
|
|
6145
|
+
Me(L) && L.type === dn ? O.push(...A(L.props.children)) : O.push(L);
|
|
6134
6146
|
}), O;
|
|
6135
6147
|
}
|
|
6136
|
-
const
|
|
6137
|
-
(
|
|
6138
|
-
),
|
|
6148
|
+
const I = A(n), v = I.filter(
|
|
6149
|
+
(M) => Me(M) && M.type === je
|
|
6150
|
+
), N = Yr({
|
|
6139
6151
|
children: n,
|
|
6140
6152
|
onItemSelected: t,
|
|
6141
6153
|
selectedItem: w,
|
|
@@ -6150,49 +6162,49 @@ const Qt = ({
|
|
|
6150
6162
|
onExtendedChange: o
|
|
6151
6163
|
});
|
|
6152
6164
|
d = { duration: 0.3, ...d };
|
|
6153
|
-
const
|
|
6154
|
-
return
|
|
6165
|
+
const D = z(!1);
|
|
6166
|
+
return D.current = !1, _(() => {
|
|
6155
6167
|
o == null || o(m ?? !1);
|
|
6156
6168
|
}, [m]), /* @__PURE__ */ j(
|
|
6157
6169
|
"div",
|
|
6158
6170
|
{
|
|
6159
6171
|
style: { transition: d.duration + "s", ...c },
|
|
6160
6172
|
ref: S,
|
|
6161
|
-
className:
|
|
6173
|
+
className: N.navigationRail,
|
|
6162
6174
|
children: [
|
|
6163
|
-
/* @__PURE__ */ j("div", { className:
|
|
6175
|
+
/* @__PURE__ */ j("div", { className: N.header, children: [
|
|
6164
6176
|
/* @__PURE__ */ u(
|
|
6165
|
-
|
|
6177
|
+
Ie,
|
|
6166
6178
|
{
|
|
6167
6179
|
onClick: () => b(!m),
|
|
6168
6180
|
label: m ? i == null ? void 0 : i.opened.label : i == null ? void 0 : i.closed.label,
|
|
6169
|
-
className:
|
|
6181
|
+
className: N.menuIcon,
|
|
6170
6182
|
icon: m ? i.opened.icon : i == null ? void 0 : i.closed.icon
|
|
6171
6183
|
}
|
|
6172
6184
|
),
|
|
6173
|
-
v.length > 0 &&
|
|
6185
|
+
v.length > 0 && Te(v[0], {
|
|
6174
6186
|
transition: d,
|
|
6175
6187
|
isExtended: m,
|
|
6176
6188
|
className: "!shadow-none mx-5 " + v[0].props.className
|
|
6177
6189
|
})
|
|
6178
6190
|
] }),
|
|
6179
|
-
/* @__PURE__ */ u("div", { className:
|
|
6180
|
-
let
|
|
6181
|
-
return
|
|
6191
|
+
/* @__PURE__ */ u("div", { className: N.segments, children: (() => {
|
|
6192
|
+
let M = 0;
|
|
6193
|
+
return I.map((O) => Me(O) && O.type === zr ? Te(
|
|
6182
6194
|
O,
|
|
6183
6195
|
{
|
|
6184
|
-
key:
|
|
6185
|
-
index:
|
|
6196
|
+
key: M,
|
|
6197
|
+
index: M++,
|
|
6186
6198
|
// Utilise et incrémente le compteur dédié
|
|
6187
6199
|
variant: m ? "horizontal" : "vertical",
|
|
6188
6200
|
selectedItem: w,
|
|
6189
6201
|
setSelectedItem: E,
|
|
6190
6202
|
onItemSelected: g,
|
|
6191
6203
|
transition: d,
|
|
6192
|
-
extendedOnly:
|
|
6204
|
+
extendedOnly: D.current,
|
|
6193
6205
|
isExtended: m
|
|
6194
6206
|
}
|
|
6195
|
-
) :
|
|
6207
|
+
) : Me(O) && O.type === je ? null : Me(O) && O.type === Hr ? (D.current = !0, m ? Te(O, {}) : null) : O);
|
|
6196
6208
|
})() }),
|
|
6197
6209
|
/* @__PURE__ */ u("div", { className: "flex-1 max-h-[160px]" })
|
|
6198
6210
|
]
|
|
@@ -6207,7 +6219,7 @@ function _s(e) {
|
|
|
6207
6219
|
});
|
|
6208
6220
|
}
|
|
6209
6221
|
export {
|
|
6210
|
-
|
|
6222
|
+
Fe as AnchorPositioner,
|
|
6211
6223
|
rs as AnimateOnScrollInit,
|
|
6212
6224
|
Le as Button,
|
|
6213
6225
|
Cs as Card,
|
|
@@ -6219,11 +6231,11 @@ export {
|
|
|
6219
6231
|
$s as ContextMenu,
|
|
6220
6232
|
Ln as CustomScroll,
|
|
6221
6233
|
Or as DatePicker,
|
|
6222
|
-
|
|
6234
|
+
Be as Divider,
|
|
6223
6235
|
je as Fab,
|
|
6224
|
-
|
|
6236
|
+
Fs as FabMenu,
|
|
6225
6237
|
fe as Icon,
|
|
6226
|
-
|
|
6238
|
+
Ie as IconButton,
|
|
6227
6239
|
Jt as Menu,
|
|
6228
6240
|
pt as MenuGroup,
|
|
6229
6241
|
Gt as MenuHeadline,
|
|
@@ -6234,17 +6246,17 @@ export {
|
|
|
6234
6246
|
mr as ProgressIndicator,
|
|
6235
6247
|
bn as RippleEffect,
|
|
6236
6248
|
Ps as SideSheet,
|
|
6237
|
-
|
|
6249
|
+
Ws as Slider,
|
|
6238
6250
|
ts as SmoothScroll,
|
|
6239
6251
|
Os as Snackbar,
|
|
6240
6252
|
be as State,
|
|
6241
|
-
|
|
6253
|
+
Ts as Switch,
|
|
6242
6254
|
On as SyncedFixedWrapper,
|
|
6243
6255
|
Ar as Tab,
|
|
6244
6256
|
Hs as TabGroup,
|
|
6245
|
-
|
|
6257
|
+
Fr as TabPanel,
|
|
6246
6258
|
zs as TabPanels,
|
|
6247
|
-
|
|
6259
|
+
Bs as Tabs,
|
|
6248
6260
|
Vs as TextField,
|
|
6249
6261
|
ns as ThemeProvider,
|
|
6250
6262
|
Qt as Tooltip,
|
|
@@ -6273,9 +6285,9 @@ export {
|
|
|
6273
6285
|
ys as menuStyle,
|
|
6274
6286
|
Ee as normalize,
|
|
6275
6287
|
gs as progressIndicatorStyle,
|
|
6276
|
-
|
|
6288
|
+
Tt as sideSheetConfig,
|
|
6277
6289
|
sr as sideSheetStyle,
|
|
6278
|
-
|
|
6290
|
+
Bt as sliderConfig,
|
|
6279
6291
|
bs as sliderStyle,
|
|
6280
6292
|
xs as snackbarStyle,
|
|
6281
6293
|
Ss as switchStyle,
|
|
@@ -6283,8 +6295,8 @@ export {
|
|
|
6283
6295
|
Ls as tabPanelsStyle,
|
|
6284
6296
|
Ns as tabStyle,
|
|
6285
6297
|
ks as tabsStyle,
|
|
6286
|
-
|
|
6287
|
-
|
|
6298
|
+
Ms as textFieldStyle,
|
|
6299
|
+
Is as toolStyle,
|
|
6288
6300
|
_n as useButtonStyle,
|
|
6289
6301
|
Xn as useCardStyle,
|
|
6290
6302
|
Un as useCarouselItemStyle,
|