@udixio/ui-react 2.9.15 → 2.9.17
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/CHANGELOG.md +28 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +461 -458
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/components/TextField.d.ts +1 -0
- package/dist/lib/components/TextField.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/FabMenu.tsx +13 -10
- package/src/lib/components/TextField.tsx +11 -11
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Wt = Object.defineProperty;
|
|
2
2
|
var At = (e, t, n) => t in e ? Wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var B = (e, t, n) => At(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsx as d, jsxs as K, Fragment as
|
|
5
|
-
import Q, { useState as V, useEffect as _, useMemo as
|
|
6
|
-
import { AnimatePresence as
|
|
4
|
+
import { jsx as d, jsxs as K, Fragment as ye } from "react/jsx-runtime";
|
|
5
|
+
import Q, { useState as V, useEffect as _, useMemo as be, useRef as j, useLayoutEffect as $e, useId as Ee, useCallback as me, isValidElement as Ie, cloneElement as Re, createContext as Ft, useContext as Ze, Children as Bt, Fragment as Ht } from "react";
|
|
6
|
+
import { AnimatePresence as pe, motion as ne, useScroll as Pt, useMotionValueEvent as Ve, animate as Ot } from "motion/react";
|
|
7
7
|
import { clsx as Qe } from "clsx";
|
|
8
8
|
import { extendTailwindMerge as zt } from "tailwind-merge";
|
|
9
9
|
import { createPortal as et } from "react-dom";
|
|
@@ -66,7 +66,7 @@ const qt = ({
|
|
|
66
66
|
background: `radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,
|
|
67
67
|
pointerEvents: "none"
|
|
68
68
|
};
|
|
69
|
-
return /* @__PURE__ */ d(
|
|
69
|
+
return /* @__PURE__ */ d(pe, { mode: "wait", children: (c || !c && !s) && /* @__PURE__ */ d(
|
|
70
70
|
ne.div,
|
|
71
71
|
{
|
|
72
72
|
style: p,
|
|
@@ -107,7 +107,7 @@ const qt = ({
|
|
|
107
107
|
function jt(e) {
|
|
108
108
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const He = (e) => {
|
|
111
111
|
const t = {};
|
|
112
112
|
e.classNameList.forEach((s) => {
|
|
113
113
|
var r;
|
|
@@ -127,12 +127,12 @@ const Pe = (e) => {
|
|
|
127
127
|
let [r, c] = s;
|
|
128
128
|
c = c.reverse(), r == e.default && c.unshift("relative"), c.unshift(jt(r)), n[r] = Ut(...c);
|
|
129
129
|
}), n;
|
|
130
|
-
}, oe = (e, t) => (n) =>
|
|
130
|
+
}, oe = (e, t) => (n) => He({
|
|
131
131
|
classNameList: [n.className, t],
|
|
132
132
|
default: e,
|
|
133
133
|
states: n
|
|
134
|
-
}), re = (e, t) => (n) =>
|
|
135
|
-
() =>
|
|
134
|
+
}), re = (e, t) => (n) => be(
|
|
135
|
+
() => He({
|
|
136
136
|
classNameList: [n.className, t],
|
|
137
137
|
default: e,
|
|
138
138
|
states: n
|
|
@@ -140,8 +140,8 @@ const Pe = (e) => {
|
|
|
140
140
|
[n]
|
|
141
141
|
);
|
|
142
142
|
function Sr(e, t, n) {
|
|
143
|
-
return
|
|
144
|
-
() =>
|
|
143
|
+
return be(
|
|
144
|
+
() => He({
|
|
145
145
|
classNameList: [n == null ? void 0 : n.className, t],
|
|
146
146
|
default: e,
|
|
147
147
|
states: n
|
|
@@ -211,10 +211,10 @@ const Jt = ({
|
|
|
211
211
|
_(() => {
|
|
212
212
|
if (!o.current) return;
|
|
213
213
|
const k = new ResizeObserver((N) => {
|
|
214
|
-
for (const
|
|
215
|
-
|
|
216
|
-
width:
|
|
217
|
-
height:
|
|
214
|
+
for (const A of N)
|
|
215
|
+
A.target === o.current && f({
|
|
216
|
+
width: A.contentRect.width,
|
|
217
|
+
height: A.contentRect.height
|
|
218
218
|
// On observe aussi la hauteur maintenant
|
|
219
219
|
});
|
|
220
220
|
});
|
|
@@ -235,7 +235,7 @@ const Jt = ({
|
|
|
235
235
|
height: k.clientHeight
|
|
236
236
|
// Correction ici pour retourner la bonne hauteur
|
|
237
237
|
} : null;
|
|
238
|
-
}, { scrollYProgress: M, scrollXProgress: b } =
|
|
238
|
+
}, { scrollYProgress: M, scrollXProgress: b } = Pt({
|
|
239
239
|
container: o
|
|
240
240
|
}), g = j(null);
|
|
241
241
|
g.current || (g.current = Gt(
|
|
@@ -262,29 +262,29 @@ const Jt = ({
|
|
|
262
262
|
}, [m]), _(() => {
|
|
263
263
|
const k = o.current, N = u.current;
|
|
264
264
|
if (!k || !N || typeof i != "number") return;
|
|
265
|
-
const
|
|
265
|
+
const A = (P, X, q) => Math.min(q, Math.max(X, P));
|
|
266
266
|
if (t === "horizontal") {
|
|
267
|
-
const
|
|
268
|
-
k.scrollLeft =
|
|
267
|
+
const P = Math.max(0, (n ?? N.scrollWidth) - k.clientWidth);
|
|
268
|
+
k.scrollLeft = A(i * P, 0, P);
|
|
269
269
|
} else {
|
|
270
|
-
const
|
|
271
|
-
k.scrollTop =
|
|
270
|
+
const P = Math.max(0, (n ?? N.scrollHeight) - k.clientHeight);
|
|
271
|
+
k.scrollTop = A(i * P, 0, P);
|
|
272
272
|
}
|
|
273
273
|
}, [i, t, n]), Ve(b, "change", (k) => {
|
|
274
274
|
O(k, "x");
|
|
275
275
|
}), Ve(M, "change", (k) => {
|
|
276
276
|
O(k, "y");
|
|
277
277
|
});
|
|
278
|
-
const [
|
|
278
|
+
const [R, v] = V(!1);
|
|
279
279
|
$e(() => {
|
|
280
|
-
|
|
280
|
+
R || !h.current || !p.current || !s || (s({
|
|
281
281
|
scrollProgress: 0,
|
|
282
282
|
scroll: 0,
|
|
283
283
|
scrollTotal: t == "vertical" ? p.current.height : p.current.width,
|
|
284
284
|
scrollVisible: t == "vertical" ? h.current.height : h.current.width
|
|
285
285
|
}), v(!0));
|
|
286
286
|
}, [h, p, s]), p.current = x(), h.current = w();
|
|
287
|
-
const [S,
|
|
287
|
+
const [S, $] = V(!1), I = Kt({
|
|
288
288
|
isDragging: S,
|
|
289
289
|
children: e,
|
|
290
290
|
className: r,
|
|
@@ -297,17 +297,17 @@ const Jt = ({
|
|
|
297
297
|
if (!c) return;
|
|
298
298
|
const N = o.current;
|
|
299
299
|
if (!N || F == null) return;
|
|
300
|
-
const
|
|
301
|
-
N.scrollLeft = Y -
|
|
302
|
-
},
|
|
300
|
+
const P = (k.pageX - N.offsetLeft - F) * 1.5;
|
|
301
|
+
N.scrollLeft = Y - P;
|
|
302
|
+
}, H = (k) => {
|
|
303
303
|
const N = o.current;
|
|
304
|
-
N && (
|
|
304
|
+
N && ($(!0), E(k.pageX - N.offsetLeft), z(N.scrollLeft));
|
|
305
305
|
}, C = (k) => {
|
|
306
306
|
S && (k.preventDefault(), te(k));
|
|
307
307
|
}, D = () => {
|
|
308
|
-
|
|
308
|
+
$(!1);
|
|
309
309
|
}, T = () => {
|
|
310
|
-
|
|
310
|
+
$(!1);
|
|
311
311
|
}, J = (k) => {
|
|
312
312
|
k.preventDefault();
|
|
313
313
|
}, Z = j(null);
|
|
@@ -316,38 +316,38 @@ const Jt = ({
|
|
|
316
316
|
}, []), _(() => {
|
|
317
317
|
const k = o.current;
|
|
318
318
|
if (!k) return;
|
|
319
|
-
const N = (
|
|
320
|
-
var ee,
|
|
321
|
-
const
|
|
322
|
-
if (!X || !
|
|
323
|
-
const q =
|
|
324
|
-
if (typeof
|
|
319
|
+
const N = (A) => {
|
|
320
|
+
var ee, W, U, ie;
|
|
321
|
+
const P = A.detail, X = o.current;
|
|
322
|
+
if (!X || !P) return;
|
|
323
|
+
const q = P.orientation ?? t;
|
|
324
|
+
if (typeof P.progress == "number")
|
|
325
325
|
if (q === "horizontal") {
|
|
326
326
|
const de = Math.max(
|
|
327
327
|
0,
|
|
328
328
|
(((ee = p.current) == null ? void 0 : ee.width) ?? 0) - X.clientWidth
|
|
329
329
|
);
|
|
330
|
-
X.scrollLeft = Math.min(de, Math.max(0,
|
|
330
|
+
X.scrollLeft = Math.min(de, Math.max(0, P.progress * de));
|
|
331
331
|
} else {
|
|
332
332
|
const de = Math.max(
|
|
333
333
|
0,
|
|
334
|
-
(((
|
|
334
|
+
(((W = p.current) == null ? void 0 : W.height) ?? 0) - X.clientHeight
|
|
335
335
|
);
|
|
336
|
-
X.scrollTop = Math.min(de, Math.max(0,
|
|
336
|
+
X.scrollTop = Math.min(de, Math.max(0, P.progress * de));
|
|
337
337
|
}
|
|
338
|
-
else if (typeof
|
|
338
|
+
else if (typeof P.scroll == "number")
|
|
339
339
|
if (q === "horizontal") {
|
|
340
340
|
const de = Math.max(
|
|
341
341
|
0,
|
|
342
342
|
(((U = p.current) == null ? void 0 : U.width) ?? 0) - X.clientWidth
|
|
343
343
|
);
|
|
344
|
-
X.scrollLeft = Math.min(de, Math.max(0,
|
|
344
|
+
X.scrollLeft = Math.min(de, Math.max(0, P.scroll));
|
|
345
345
|
} else {
|
|
346
346
|
const de = Math.max(
|
|
347
347
|
0,
|
|
348
348
|
(((ie = p.current) == null ? void 0 : ie.height) ?? 0) - X.clientHeight
|
|
349
349
|
);
|
|
350
|
-
X.scrollTop = Math.min(de, Math.max(0,
|
|
350
|
+
X.scrollTop = Math.min(de, Math.max(0, P.scroll));
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
353
|
return k.addEventListener("udx:customScroll:set", N), () => {
|
|
@@ -358,14 +358,14 @@ const Jt = ({
|
|
|
358
358
|
{
|
|
359
359
|
className: I.customScroll,
|
|
360
360
|
ref: o,
|
|
361
|
-
onMouseDown:
|
|
361
|
+
onMouseDown: H,
|
|
362
362
|
onMouseMove: C,
|
|
363
363
|
onMouseUp: D,
|
|
364
364
|
onMouseLeave: T,
|
|
365
365
|
onDragStart: J,
|
|
366
366
|
onScroll: (k) => {
|
|
367
|
-
S || (E(null),
|
|
368
|
-
|
|
367
|
+
S || (E(null), $(!0), Z.current && clearTimeout(Z.current), Z.current = setTimeout(() => {
|
|
368
|
+
$(!1);
|
|
369
369
|
}, 1e3));
|
|
370
370
|
},
|
|
371
371
|
children: [
|
|
@@ -378,7 +378,7 @@ const Jt = ({
|
|
|
378
378
|
children: e
|
|
379
379
|
}
|
|
380
380
|
),
|
|
381
|
-
h.current && p.current && /* @__PURE__ */ K(
|
|
381
|
+
h.current && p.current && /* @__PURE__ */ K(ye, { children: [
|
|
382
382
|
t === "vertical" && p.current.height > h.current.height && /* @__PURE__ */ d(
|
|
383
383
|
ne.div,
|
|
384
384
|
{
|
|
@@ -545,7 +545,7 @@ var sn = class {
|
|
|
545
545
|
destroy() {
|
|
546
546
|
this.events = {};
|
|
547
547
|
}
|
|
548
|
-
}, Ye = 100 / 6,
|
|
548
|
+
}, Ye = 100 / 6, Se = { passive: !1 }, on = class {
|
|
549
549
|
constructor(e, t = { wheelMultiplier: 1, touchMultiplier: 1 }) {
|
|
550
550
|
B(this, "touchStart", {
|
|
551
551
|
x: 0,
|
|
@@ -607,15 +607,15 @@ var sn = class {
|
|
|
607
607
|
height: window.innerHeight
|
|
608
608
|
};
|
|
609
609
|
});
|
|
610
|
-
this.element = e, this.options = t, window.addEventListener("resize", this.onWindowResize, !1), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel,
|
|
610
|
+
this.element = e, this.options = t, window.addEventListener("resize", this.onWindowResize, !1), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel, Se), this.element.addEventListener(
|
|
611
611
|
"touchstart",
|
|
612
612
|
this.onTouchStart,
|
|
613
|
-
|
|
613
|
+
Se
|
|
614
614
|
), this.element.addEventListener(
|
|
615
615
|
"touchmove",
|
|
616
616
|
this.onTouchMove,
|
|
617
|
-
|
|
618
|
-
), this.element.addEventListener("touchend", this.onTouchEnd,
|
|
617
|
+
Se
|
|
618
|
+
), this.element.addEventListener("touchend", this.onTouchEnd, Se);
|
|
619
619
|
}
|
|
620
620
|
/**
|
|
621
621
|
* Add an event listener for the given event and callback
|
|
@@ -628,18 +628,18 @@ var sn = class {
|
|
|
628
628
|
}
|
|
629
629
|
/** Remove all event listeners and clean up */
|
|
630
630
|
destroy() {
|
|
631
|
-
this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize, !1), this.element.removeEventListener("wheel", this.onWheel,
|
|
631
|
+
this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize, !1), this.element.removeEventListener("wheel", this.onWheel, Se), this.element.removeEventListener(
|
|
632
632
|
"touchstart",
|
|
633
633
|
this.onTouchStart,
|
|
634
|
-
|
|
634
|
+
Se
|
|
635
635
|
), this.element.removeEventListener(
|
|
636
636
|
"touchmove",
|
|
637
637
|
this.onTouchMove,
|
|
638
|
-
|
|
638
|
+
Se
|
|
639
639
|
), this.element.removeEventListener(
|
|
640
640
|
"touchend",
|
|
641
641
|
this.onTouchEnd,
|
|
642
|
-
|
|
642
|
+
Se
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
645
|
}, _e = (e) => Math.min(1, 1.001 - Math.pow(2, -10 * e)), ln = class {
|
|
@@ -668,12 +668,12 @@ var sn = class {
|
|
|
668
668
|
overscroll: b = !0,
|
|
669
669
|
autoRaf: g = !1,
|
|
670
670
|
anchors: O = !1,
|
|
671
|
-
autoToggle:
|
|
671
|
+
autoToggle: R = !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
675
|
__experimental__naiveDimensions: S = !1,
|
|
676
|
-
naiveDimensions:
|
|
676
|
+
naiveDimensions: $ = S,
|
|
677
677
|
stopInertiaOnNavigate: I = !1
|
|
678
678
|
} = {}) {
|
|
679
679
|
B(this, "_isScrolling", !1);
|
|
@@ -870,9 +870,9 @@ var sn = class {
|
|
|
870
870
|
overscroll: b,
|
|
871
871
|
autoRaf: g,
|
|
872
872
|
anchors: O,
|
|
873
|
-
autoToggle:
|
|
873
|
+
autoToggle: R,
|
|
874
874
|
allowNestedScroll: v,
|
|
875
|
-
naiveDimensions:
|
|
875
|
+
naiveDimensions: $,
|
|
876
876
|
stopInertiaOnNavigate: I
|
|
877
877
|
}, this.dimensions = new sn(e, t, { autoResize: x }), 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
|
|
@@ -1066,9 +1066,9 @@ var sn = class {
|
|
|
1066
1066
|
const p = this.options.gestureOrientation;
|
|
1067
1067
|
if (s - (r.time ?? 0) > 2e3) {
|
|
1068
1068
|
r.time = Date.now();
|
|
1069
|
-
const
|
|
1070
|
-
r.computedStyle =
|
|
1071
|
-
const v =
|
|
1069
|
+
const R = window.getComputedStyle(e);
|
|
1070
|
+
r.computedStyle = R;
|
|
1071
|
+
const v = R.overflowX, S = R.overflowY;
|
|
1072
1072
|
if (c = ["auto", "overlay", "scroll"].includes(v), a = ["auto", "overlay", "scroll"].includes(S), r.hasOverflowX = c, r.hasOverflowY = a, !c && !a || p === "vertical" && !a || p === "horizontal" && !c) return !1;
|
|
1073
1073
|
o = e.scrollWidth, u = e.scrollHeight, m = e.clientWidth, f = e.clientHeight, i = o > m, l = u > f, r.isScrollableX = i, r.isScrollableY = l, r.scrollWidth = o, r.scrollHeight = u, r.clientWidth = m, r.clientHeight = f;
|
|
1074
1074
|
} else
|
|
@@ -1081,8 +1081,8 @@ var sn = class {
|
|
|
1081
1081
|
else if (p === "vertical")
|
|
1082
1082
|
h = "y";
|
|
1083
1083
|
else {
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1084
|
+
const R = t !== 0, v = n !== 0;
|
|
1085
|
+
R && c && i && (h = "x"), v && a && l && (h = "y");
|
|
1086
1086
|
}
|
|
1087
1087
|
if (!h) return !1;
|
|
1088
1088
|
let x, w, M, b, g;
|
|
@@ -1207,8 +1207,8 @@ const Nr = ({
|
|
|
1207
1207
|
var m;
|
|
1208
1208
|
i.current !== null && cancelAnimationFrame(i.current), (m = a.current) == null || m.destroy(), a.current = null;
|
|
1209
1209
|
};
|
|
1210
|
-
}, [e, t, n, s, r]), c ? /* @__PURE__ */ d(
|
|
1211
|
-
},
|
|
1210
|
+
}, [e, t, n, s, r]), c ? /* @__PURE__ */ d(ye, { children: c }) : null;
|
|
1211
|
+
}, Ne = ({
|
|
1212
1212
|
style: e,
|
|
1213
1213
|
colorName: t,
|
|
1214
1214
|
stateClassName: n = "state-ripple-group",
|
|
@@ -1350,7 +1350,7 @@ function fn() {
|
|
|
1350
1350
|
function hn() {
|
|
1351
1351
|
return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function Pe(e) {
|
|
1354
1354
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1355
1355
|
const t = e.classList;
|
|
1356
1356
|
return Array.from(t).some(
|
|
@@ -1363,7 +1363,7 @@ function Xe(e) {
|
|
|
1363
1363
|
return Array.from(t).some((n) => n.startsWith("anim-"));
|
|
1364
1364
|
}
|
|
1365
1365
|
function We(e, t) {
|
|
1366
|
-
if (!
|
|
1366
|
+
if (!Pe(e)) return;
|
|
1367
1367
|
if (e.hasAttribute(`data-${t}-scroll`)) {
|
|
1368
1368
|
const a = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), i = a === "x" || a === "inline" ? "inline" : a === "y" || a === "block" ? "block" : "auto";
|
|
1369
1369
|
e.classList.contains(`${t}-timeline`) || e.classList.contains(`${t}-timeline-inline`) || e.classList.contains(`${t}-timeline-block`) || e.classList.contains(`${t}-timeline-x`) || e.classList.contains(`${t}-timeline-y`) || (i === "inline" ? e.classList.add(`${t}-timeline-inline`) : i === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
|
|
@@ -1380,7 +1380,7 @@ function Ae(e = document, t) {
|
|
|
1380
1380
|
e.querySelectorAll(
|
|
1381
1381
|
`[class*="${t}-"][class*="-scroll"]`
|
|
1382
1382
|
)
|
|
1383
|
-
).filter((s) =>
|
|
1383
|
+
).filter((s) => Pe(s));
|
|
1384
1384
|
}
|
|
1385
1385
|
function pn(e = document, t) {
|
|
1386
1386
|
const n = Array.from(
|
|
@@ -1404,7 +1404,7 @@ function pn(e = document, t) {
|
|
|
1404
1404
|
const c = r.classList;
|
|
1405
1405
|
return c.contains(`${t}-in`) || c.contains(`${t}-out`) || Array.from(c).some(
|
|
1406
1406
|
(l) => l.startsWith(`${t}-`) && !l.includes("scroll") && !s.has(l)
|
|
1407
|
-
) ? !0 : !
|
|
1407
|
+
) ? !0 : !Pe(r);
|
|
1408
1408
|
});
|
|
1409
1409
|
}
|
|
1410
1410
|
function mn(e, t) {
|
|
@@ -1512,7 +1512,7 @@ const kr = ot, Ir = ot, it = ({
|
|
|
1512
1512
|
children: n,
|
|
1513
1513
|
style: s
|
|
1514
1514
|
}) => {
|
|
1515
|
-
const c = `--anchor-${
|
|
1515
|
+
const c = `--anchor-${Ee().replace(/:/g, "")}`, [a, i] = V(!1);
|
|
1516
1516
|
if ($e(() => {
|
|
1517
1517
|
typeof CSS < "u" && CSS.supports("anchor-name", "--a") && i(!0);
|
|
1518
1518
|
}, []), $e(() => {
|
|
@@ -2039,7 +2039,7 @@ const kr = ot, Ir = ot, it = ({
|
|
|
2039
2039
|
],
|
|
2040
2040
|
!!t && "text-on-surface/[0.38]"
|
|
2041
2041
|
)
|
|
2042
|
-
}),
|
|
2042
|
+
}), Hr = oe(
|
|
2043
2043
|
"iconButton",
|
|
2044
2044
|
vt
|
|
2045
2045
|
), Mn = re(
|
|
@@ -2074,7 +2074,7 @@ const kr = ot, Ir = ot, it = ({
|
|
|
2074
2074
|
"max-h-full": t
|
|
2075
2075
|
}
|
|
2076
2076
|
)
|
|
2077
|
-
}),
|
|
2077
|
+
}), Pr = oe(
|
|
2078
2078
|
"progressIndicator",
|
|
2079
2079
|
gt
|
|
2080
2080
|
), En = re(
|
|
@@ -2383,7 +2383,7 @@ const kr = ot, Ir = ot, it = ({
|
|
|
2383
2383
|
}), Ur = oe(
|
|
2384
2384
|
"textField",
|
|
2385
2385
|
Mt
|
|
2386
|
-
),
|
|
2386
|
+
), Hn = re(
|
|
2387
2387
|
"textField",
|
|
2388
2388
|
Mt
|
|
2389
2389
|
), Et = ({
|
|
@@ -2417,10 +2417,10 @@ const kr = ot, Ir = ot, it = ({
|
|
|
2417
2417
|
}), jr = oe(
|
|
2418
2418
|
"toolTip",
|
|
2419
2419
|
Et
|
|
2420
|
-
),
|
|
2420
|
+
), Pn = re(
|
|
2421
2421
|
"toolTip",
|
|
2422
2422
|
Et
|
|
2423
|
-
),
|
|
2423
|
+
), he = ({
|
|
2424
2424
|
icon: e,
|
|
2425
2425
|
colors: t = [],
|
|
2426
2426
|
className: n,
|
|
@@ -2531,7 +2531,7 @@ const kr = ot, Ir = ot, it = ({
|
|
|
2531
2531
|
transitionDuration: n,
|
|
2532
2532
|
isVisible: m
|
|
2533
2533
|
});
|
|
2534
|
-
return /* @__PURE__ */ K(
|
|
2534
|
+
return /* @__PURE__ */ K(ye, { children: [
|
|
2535
2535
|
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ K("div", { className: p.progressIndicator, ...r, children: [
|
|
2536
2536
|
/* @__PURE__ */ d(
|
|
2537
2537
|
"div",
|
|
@@ -2621,7 +2621,7 @@ function zn(e) {
|
|
|
2621
2621
|
};
|
|
2622
2622
|
return e && e in t ? t[e] : e || "filled";
|
|
2623
2623
|
}
|
|
2624
|
-
const
|
|
2624
|
+
const Le = ({
|
|
2625
2625
|
variant: e = "filled",
|
|
2626
2626
|
disabled: t = !1,
|
|
2627
2627
|
icon: n,
|
|
@@ -2647,11 +2647,11 @@ const Ne = ({
|
|
|
2647
2647
|
"Button component requires either a label prop or children content"
|
|
2648
2648
|
);
|
|
2649
2649
|
e = zn(e);
|
|
2650
|
-
const g = s ? "a" : "button", O = j(null),
|
|
2650
|
+
const g = s ? "a" : "button", O = j(null), R = p || O, [v, S] = Q.useState(f);
|
|
2651
2651
|
_(() => {
|
|
2652
2652
|
S(f);
|
|
2653
2653
|
}, [f]), w = { duration: 0.3, ...w };
|
|
2654
|
-
const
|
|
2654
|
+
const $ = (E) => {
|
|
2655
2655
|
t && E.preventDefault(), m ? (S(!v), m(!v)) : u && u(E);
|
|
2656
2656
|
}, I = vn({
|
|
2657
2657
|
allowShapeTransformation: x,
|
|
@@ -2671,22 +2671,22 @@ const Ne = ({
|
|
|
2671
2671
|
activated: v,
|
|
2672
2672
|
label: r,
|
|
2673
2673
|
children: r
|
|
2674
|
-
}), F = n ? /* @__PURE__ */ d(
|
|
2674
|
+
}), F = n ? /* @__PURE__ */ d(he, { icon: n, className: I.icon }) : /* @__PURE__ */ d(ye, {});
|
|
2675
2675
|
return /* @__PURE__ */ K(
|
|
2676
2676
|
g,
|
|
2677
2677
|
{
|
|
2678
|
-
ref:
|
|
2678
|
+
ref: R,
|
|
2679
2679
|
href: s,
|
|
2680
2680
|
className: I.button,
|
|
2681
2681
|
...b,
|
|
2682
|
-
onClick:
|
|
2682
|
+
onClick: $,
|
|
2683
2683
|
disabled: t,
|
|
2684
2684
|
"aria-pressed": m ? v : void 0,
|
|
2685
2685
|
style: { transition: w.duration + "s" },
|
|
2686
2686
|
children: [
|
|
2687
2687
|
/* @__PURE__ */ d("div", { className: I.touchTarget }),
|
|
2688
2688
|
/* @__PURE__ */ d(
|
|
2689
|
-
|
|
2689
|
+
Ne,
|
|
2690
2690
|
{
|
|
2691
2691
|
style: { transition: w.duration + "s" },
|
|
2692
2692
|
className: I.stateLayer,
|
|
@@ -2771,7 +2771,7 @@ const Ne = ({
|
|
|
2771
2771
|
}), i = j(null);
|
|
2772
2772
|
return /* @__PURE__ */ K("div", { ...c, ref: r || i, className: a.card, children: [
|
|
2773
2773
|
s && /* @__PURE__ */ d(
|
|
2774
|
-
|
|
2774
|
+
Ne,
|
|
2775
2775
|
{
|
|
2776
2776
|
className: a.stateLayer,
|
|
2777
2777
|
colorName: "on-surface",
|
|
@@ -2780,7 +2780,7 @@ const Ne = ({
|
|
|
2780
2780
|
),
|
|
2781
2781
|
n
|
|
2782
2782
|
] });
|
|
2783
|
-
},
|
|
2783
|
+
}, ke = (e, t, n = [0, 1]) => {
|
|
2784
2784
|
const [s, r] = t, [c, a] = n, l = (Math.max(s, Math.min(e, r)) - s) / (r - s);
|
|
2785
2785
|
return c + l * (a - c);
|
|
2786
2786
|
}, Tn = ({
|
|
@@ -2847,36 +2847,36 @@ const Ne = ({
|
|
|
2847
2847
|
onMetricsChange: o
|
|
2848
2848
|
}), b = Q.Children.toArray(n).filter(
|
|
2849
2849
|
(N) => Q.isValidElement(N) && N.type === Tn
|
|
2850
|
-
), g = j(null), [O,
|
|
2850
|
+
), g = j(null), [O, R] = V(
|
|
2851
2851
|
{}
|
|
2852
|
-
), [v, S] = V(null),
|
|
2853
|
-
var
|
|
2852
|
+
), [v, S] = V(null), $ = j(0), I = j(null), F = () => {
|
|
2853
|
+
var xe, ce;
|
|
2854
2854
|
if (!g.current || !h.current || (v == null ? void 0 : v.scrollProgress) === void 0)
|
|
2855
2855
|
return [];
|
|
2856
|
-
const N = (v == null ? void 0 : v.scrollVisible) ?? ((
|
|
2857
|
-
function
|
|
2858
|
-
return G.map((le,
|
|
2859
|
-
const
|
|
2856
|
+
const N = (v == null ? void 0 : v.scrollVisible) ?? ((xe = h.current) == null ? void 0 : xe.clientWidth) ?? 0;
|
|
2857
|
+
function A(G, ae) {
|
|
2858
|
+
return G.map((le, we) => {
|
|
2859
|
+
const Ce = (le - ae) / Math.abs(G[1] - G[0]);
|
|
2860
2860
|
return {
|
|
2861
2861
|
itemScrollXCenter: le,
|
|
2862
|
-
relativeIndex:
|
|
2863
|
-
index:
|
|
2862
|
+
relativeIndex: Ce,
|
|
2863
|
+
index: we,
|
|
2864
2864
|
width: 0
|
|
2865
2865
|
};
|
|
2866
2866
|
});
|
|
2867
2867
|
}
|
|
2868
|
-
const
|
|
2868
|
+
const P = b.map((G, ae) => {
|
|
2869
2869
|
if (!E[ae].current || !g.current) return 0;
|
|
2870
|
-
const
|
|
2871
|
-
return
|
|
2872
|
-
}), X =
|
|
2873
|
-
|
|
2870
|
+
const we = ae / (b.length - 1);
|
|
2871
|
+
return ke(we, [0, 1], [0, 1]);
|
|
2872
|
+
}), X = A(
|
|
2873
|
+
P,
|
|
2874
2874
|
(v == null ? void 0 : v.scrollProgress) ?? 0
|
|
2875
2875
|
).sort((G, ae) => G.index - ae.index);
|
|
2876
2876
|
let q = (((ce = h.current) == null ? void 0 : ce.clientWidth) ?? N) + i + a[0] + i;
|
|
2877
2877
|
const ee = X.sort((G, ae) => Math.abs(G.relativeIndex) - Math.abs(ae.relativeIndex)).map((G, ae) => {
|
|
2878
2878
|
if (!(q <= 0)) {
|
|
2879
|
-
if (ae == 0 && z(G.index), G.width =
|
|
2879
|
+
if (ae == 0 && z(G.index), G.width = ke(
|
|
2880
2880
|
q - i,
|
|
2881
2881
|
[a[0], a[1]],
|
|
2882
2882
|
[a[0], a[1]]
|
|
@@ -2889,25 +2889,25 @@ const Ne = ({
|
|
|
2889
2889
|
}
|
|
2890
2890
|
return G;
|
|
2891
2891
|
}
|
|
2892
|
-
}).filter(Boolean),
|
|
2892
|
+
}).filter(Boolean), W = ee.reverse(), U = [...ee].sort(
|
|
2893
2893
|
(G, ae) => Math.abs(G.index) - Math.abs(ae.index)
|
|
2894
2894
|
);
|
|
2895
|
-
|
|
2896
|
-
const le =
|
|
2895
|
+
W.forEach((G, ae) => {
|
|
2896
|
+
const le = W[ae + 1];
|
|
2897
2897
|
if (!le) return;
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2898
|
+
const we = 1 - (Math.abs(G.relativeIndex) - Math.abs(le == null ? void 0 : le.relativeIndex)), Ce = ke(
|
|
2899
|
+
we,
|
|
2900
2900
|
[0, 2],
|
|
2901
2901
|
[G.width + q, le.width]
|
|
2902
2902
|
);
|
|
2903
|
-
q += G.width, G.width =
|
|
2903
|
+
q += G.width, G.width = Ce, q -= G.width;
|
|
2904
2904
|
});
|
|
2905
|
-
const ie = ee.length / 2, de =
|
|
2905
|
+
const ie = ee.length / 2, de = ke(
|
|
2906
2906
|
Math.abs(U[0].relativeIndex),
|
|
2907
2907
|
[U[0].index == 0 ? 0 : ie - 1, ie],
|
|
2908
2908
|
[0, 1]
|
|
2909
|
-
),
|
|
2910
|
-
return w(
|
|
2909
|
+
), ve = ke(de, [0, 1], [0, 1]) * -(a[0] + i);
|
|
2910
|
+
return w(ve), Object.fromEntries(
|
|
2911
2911
|
ee.map((G) => [G.index, G.width])
|
|
2912
2912
|
);
|
|
2913
2913
|
}, E = j([]).current, [Y, z] = V(0);
|
|
@@ -2916,55 +2916,55 @@ const Ne = ({
|
|
|
2916
2916
|
}, [Y]), _(() => {
|
|
2917
2917
|
typeof u == "number" && b.length > 0 && u !== Y && C(u);
|
|
2918
2918
|
}, [u, b.length]), _(() => {
|
|
2919
|
-
|
|
2920
|
-
}, [Y]), E.length !== b.length && b.forEach((N,
|
|
2921
|
-
E[
|
|
2919
|
+
H(Y);
|
|
2920
|
+
}, [Y]), E.length !== b.length && b.forEach((N, A) => {
|
|
2921
|
+
E[A] || (E[A] = Q.createRef());
|
|
2922
2922
|
});
|
|
2923
|
-
const [te,
|
|
2923
|
+
const [te, H] = V(0), C = (N, A = {}) => {
|
|
2924
2924
|
if (!b.length) return 0;
|
|
2925
|
-
const
|
|
2926
|
-
if (!
|
|
2927
|
-
const X =
|
|
2925
|
+
const P = E[N];
|
|
2926
|
+
if (!P || !P.current || !g.current) return 0;
|
|
2927
|
+
const X = ke(
|
|
2928
2928
|
N / Math.max(1, b.length - 1),
|
|
2929
2929
|
[0, 1],
|
|
2930
2930
|
[0, 1]
|
|
2931
2931
|
);
|
|
2932
|
-
return
|
|
2932
|
+
return H(N), g.current.dispatchEvent(
|
|
2933
2933
|
new CustomEvent("udx:customScroll:set", {
|
|
2934
2934
|
bubbles: !0,
|
|
2935
2935
|
detail: {
|
|
2936
2936
|
progress: X,
|
|
2937
2937
|
orientation: "horizontal",
|
|
2938
|
-
animate:
|
|
2938
|
+
animate: A.animate !== !1
|
|
2939
2939
|
}
|
|
2940
2940
|
})
|
|
2941
2941
|
), X;
|
|
2942
|
-
}, D = b.map((N,
|
|
2942
|
+
}, D = b.map((N, A) => {
|
|
2943
2943
|
var ee;
|
|
2944
|
-
const
|
|
2945
|
-
|
|
2946
|
-
}, q = () =>
|
|
2944
|
+
const P = (ee = N.props) == null ? void 0 : ee.onClick, X = (W) => {
|
|
2945
|
+
P == null || P(W);
|
|
2946
|
+
}, q = () => H(A);
|
|
2947
2947
|
return Q.cloneElement(
|
|
2948
2948
|
N,
|
|
2949
2949
|
{
|
|
2950
|
-
width: O[
|
|
2950
|
+
width: O[A],
|
|
2951
2951
|
outputRange: a,
|
|
2952
|
-
ref: E[
|
|
2953
|
-
key:
|
|
2954
|
-
index:
|
|
2952
|
+
ref: E[A],
|
|
2953
|
+
key: A,
|
|
2954
|
+
index: A,
|
|
2955
2955
|
role: "option",
|
|
2956
|
-
"aria-selected": Y ===
|
|
2957
|
-
tabIndex: Y ===
|
|
2956
|
+
"aria-selected": Y === A,
|
|
2957
|
+
tabIndex: Y === A ? 0 : -1,
|
|
2958
2958
|
onClick: X,
|
|
2959
2959
|
onFocus: q
|
|
2960
2960
|
}
|
|
2961
2961
|
);
|
|
2962
2962
|
}), T = (N) => {
|
|
2963
|
-
var
|
|
2963
|
+
var A;
|
|
2964
2964
|
if (N.scrollTotal > 0) {
|
|
2965
|
-
(
|
|
2966
|
-
const
|
|
2967
|
-
I.current = Ot(
|
|
2965
|
+
(A = I.current) == null || A.stop();
|
|
2966
|
+
const P = $.current ?? 0, X = N.scrollProgress ?? 0;
|
|
2967
|
+
I.current = Ot(P, X, {
|
|
2968
2968
|
// Spring tuning to add a bit of inertia and smoothness
|
|
2969
2969
|
type: "spring",
|
|
2970
2970
|
stiffness: 260,
|
|
@@ -2972,14 +2972,14 @@ const Ne = ({
|
|
|
2972
2972
|
mass: 0.6,
|
|
2973
2973
|
restDelta: 5e-4,
|
|
2974
2974
|
onUpdate: (q) => {
|
|
2975
|
-
|
|
2975
|
+
$.current = q, S({ ...N, scrollProgress: q });
|
|
2976
2976
|
}
|
|
2977
2977
|
});
|
|
2978
2978
|
}
|
|
2979
2979
|
};
|
|
2980
2980
|
_(() => {
|
|
2981
2981
|
const N = F();
|
|
2982
|
-
|
|
2982
|
+
R(N);
|
|
2983
2983
|
}, [v]);
|
|
2984
2984
|
const J = j(o);
|
|
2985
2985
|
_(() => {
|
|
@@ -2990,33 +2990,33 @@ const Ne = ({
|
|
|
2990
2990
|
var ae;
|
|
2991
2991
|
const N = J.current;
|
|
2992
2992
|
if (!N || !(h != null && h.current)) return;
|
|
2993
|
-
const
|
|
2994
|
-
if (
|
|
2995
|
-
const
|
|
2993
|
+
const A = b.length;
|
|
2994
|
+
if (A <= 0) return;
|
|
2995
|
+
const P = ((ae = h.current) == null ? void 0 : ae.clientWidth) ?? 0, X = a[1], q = $.current ?? (v == null ? void 0 : v.scrollProgress) ?? 0, ee = (P + i) / (X + i), W = Math.max(1, Math.floor(ee)), U = Math.max(1, Math.round(W * (2 / 3))), ie = Math.min(
|
|
2996
2996
|
Math.max(0, Y),
|
|
2997
|
-
Math.max(0,
|
|
2998
|
-
), de = ie > 0,
|
|
2999
|
-
total:
|
|
2997
|
+
Math.max(0, A - 1)
|
|
2998
|
+
), de = ie > 0, ve = ie < A - 1, xe = {
|
|
2999
|
+
total: A,
|
|
3000
3000
|
selectedIndex: ie,
|
|
3001
3001
|
visibleApprox: ee,
|
|
3002
|
-
visibleFull:
|
|
3002
|
+
visibleFull: W,
|
|
3003
3003
|
stepHalf: U,
|
|
3004
3004
|
canPrev: de,
|
|
3005
|
-
canNext:
|
|
3005
|
+
canNext: ve,
|
|
3006
3006
|
scrollProgress: q,
|
|
3007
|
-
viewportWidth:
|
|
3007
|
+
viewportWidth: P,
|
|
3008
3008
|
itemMaxWidth: X,
|
|
3009
3009
|
gap: i
|
|
3010
3010
|
}, ce = Z.current;
|
|
3011
3011
|
let G = !ce;
|
|
3012
3012
|
if (!G) {
|
|
3013
|
-
for (const le in
|
|
3014
|
-
if (
|
|
3013
|
+
for (const le in xe)
|
|
3014
|
+
if (xe[le] !== ce[le]) {
|
|
3015
3015
|
G = !0;
|
|
3016
3016
|
break;
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
3019
|
-
G && (Z.current =
|
|
3019
|
+
G && (Z.current = xe, N(xe));
|
|
3020
3020
|
}, [h, b.length, Y, v, i, a]), _(() => () => {
|
|
3021
3021
|
var N;
|
|
3022
3022
|
(N = I.current) == null || N.stop();
|
|
@@ -3025,18 +3025,18 @@ const Ne = ({
|
|
|
3025
3025
|
$e(() => {
|
|
3026
3026
|
let N = a[1];
|
|
3027
3027
|
v && N > v.scrollVisible && (N = v.scrollVisible);
|
|
3028
|
-
const
|
|
3029
|
-
L(
|
|
3028
|
+
const A = (N + i) * D.length / m;
|
|
3029
|
+
L(A);
|
|
3030
3030
|
}, [h, E, v]);
|
|
3031
3031
|
const k = (N) => {
|
|
3032
3032
|
if (!b.length) return;
|
|
3033
|
-
const
|
|
3033
|
+
const A = te ?? Y;
|
|
3034
3034
|
switch (N.key) {
|
|
3035
3035
|
case "ArrowLeft":
|
|
3036
|
-
N.preventDefault(), C(Math.max(0,
|
|
3036
|
+
N.preventDefault(), C(Math.max(0, A - 1));
|
|
3037
3037
|
break;
|
|
3038
3038
|
case "ArrowRight":
|
|
3039
|
-
N.preventDefault(), C(Math.min(b.length - 1,
|
|
3039
|
+
N.preventDefault(), C(Math.min(b.length - 1, A + 1));
|
|
3040
3040
|
break;
|
|
3041
3041
|
case "Home":
|
|
3042
3042
|
N.preventDefault(), C(0);
|
|
@@ -3046,21 +3046,21 @@ const Ne = ({
|
|
|
3046
3046
|
break;
|
|
3047
3047
|
case "Enter":
|
|
3048
3048
|
case " ":
|
|
3049
|
-
N.preventDefault(), C(
|
|
3049
|
+
N.preventDefault(), C(A);
|
|
3050
3050
|
break;
|
|
3051
3051
|
}
|
|
3052
3052
|
};
|
|
3053
3053
|
return _(() => {
|
|
3054
3054
|
const N = h.current;
|
|
3055
3055
|
if (!N) return;
|
|
3056
|
-
const
|
|
3057
|
-
const X =
|
|
3056
|
+
const A = (P) => {
|
|
3057
|
+
const X = P.detail;
|
|
3058
3058
|
X && typeof X.index == "number" && C(X.index);
|
|
3059
3059
|
};
|
|
3060
|
-
return N.addEventListener("udx:carousel:centerIndex",
|
|
3060
|
+
return N.addEventListener("udx:carousel:centerIndex", A), () => {
|
|
3061
3061
|
N.removeEventListener(
|
|
3062
3062
|
"udx:carousel:centerIndex",
|
|
3063
|
-
|
|
3063
|
+
A
|
|
3064
3064
|
);
|
|
3065
3065
|
};
|
|
3066
3066
|
}, [h, b.length]), /* @__PURE__ */ d(
|
|
@@ -3153,13 +3153,13 @@ const Jr = ({
|
|
|
3153
3153
|
className: u,
|
|
3154
3154
|
...m
|
|
3155
3155
|
}) => {
|
|
3156
|
-
const f =
|
|
3156
|
+
const f = Ee(), p = a || f, h = e !== void 0, [x, w] = V(
|
|
3157
3157
|
t ?? !1
|
|
3158
3158
|
), M = h ? e : x, [b, g] = V(!1), O = Q.useRef(null);
|
|
3159
3159
|
_(() => {
|
|
3160
3160
|
O.current && (O.current.indeterminate = n);
|
|
3161
3161
|
}, [n]);
|
|
3162
|
-
const
|
|
3162
|
+
const R = (S) => {
|
|
3163
3163
|
s || (h || w(S.target.checked), c && c(S));
|
|
3164
3164
|
}, v = xn({
|
|
3165
3165
|
isChecked: !!M,
|
|
@@ -3176,7 +3176,7 @@ const Jr = ({
|
|
|
3176
3176
|
className: y(v.checkbox, u, "group/checkbox"),
|
|
3177
3177
|
style: o,
|
|
3178
3178
|
children: /* @__PURE__ */ K(
|
|
3179
|
-
|
|
3179
|
+
Ne,
|
|
3180
3180
|
{
|
|
3181
3181
|
stateClassName: v.stateLayer,
|
|
3182
3182
|
colorName: M || n ? "primary" : "on-surface",
|
|
@@ -3191,7 +3191,7 @@ const Jr = ({
|
|
|
3191
3191
|
value: l,
|
|
3192
3192
|
checked: M,
|
|
3193
3193
|
disabled: s,
|
|
3194
|
-
onChange:
|
|
3194
|
+
onChange: R,
|
|
3195
3195
|
onFocus: () => g(!0),
|
|
3196
3196
|
onBlur: () => g(!1),
|
|
3197
3197
|
className: v.input,
|
|
@@ -3199,7 +3199,7 @@ const Jr = ({
|
|
|
3199
3199
|
}
|
|
3200
3200
|
),
|
|
3201
3201
|
/* @__PURE__ */ d("div", { className: v.box }),
|
|
3202
|
-
/* @__PURE__ */ d(
|
|
3202
|
+
/* @__PURE__ */ d(pe, { children: (M || n) && /* @__PURE__ */ d(
|
|
3203
3203
|
ne.div,
|
|
3204
3204
|
{
|
|
3205
3205
|
initial: { opacity: 0, scale: 0.5 },
|
|
@@ -3208,7 +3208,7 @@ const Jr = ({
|
|
|
3208
3208
|
transition: { duration: 0.15 },
|
|
3209
3209
|
className: v.icon,
|
|
3210
3210
|
children: /* @__PURE__ */ d(
|
|
3211
|
-
|
|
3211
|
+
he,
|
|
3212
3212
|
{
|
|
3213
3213
|
icon: n ? Vn : Ct,
|
|
3214
3214
|
className: "size-3.5"
|
|
@@ -3247,33 +3247,33 @@ const Jr = ({
|
|
|
3247
3247
|
throw new Error(
|
|
3248
3248
|
"Chip component requires either a label prop or children content"
|
|
3249
3249
|
);
|
|
3250
|
-
const O = s ? "a" : "button",
|
|
3250
|
+
const O = s ? "a" : "button", R = j(null), v = o || R, [S, $] = Q.useState(l), [I, F] = Q.useState(!1), [E, Y] = V(b && m), [z, te] = Q.useState(!1), [H, C] = Q.useState(
|
|
3251
3251
|
typeof r == "string" ? r : ""
|
|
3252
3252
|
), D = Q.useRef(null);
|
|
3253
3253
|
_(() => {
|
|
3254
|
-
|
|
3254
|
+
$(l);
|
|
3255
3255
|
}, [l]), _(() => {
|
|
3256
3256
|
if (b && Y(b), m && I) {
|
|
3257
|
-
const
|
|
3257
|
+
const W = setTimeout(() => {
|
|
3258
3258
|
g != null && g.draggable && z || Y(!0);
|
|
3259
3259
|
}, 1e3);
|
|
3260
|
-
return () => clearTimeout(
|
|
3260
|
+
return () => clearTimeout(W);
|
|
3261
3261
|
} else I || Y(!1);
|
|
3262
|
-
}, [I, m, z, g,
|
|
3262
|
+
}, [I, m, z, g, H]), _(() => {
|
|
3263
3263
|
if (E) {
|
|
3264
3264
|
C(typeof r == "string" ? r : "");
|
|
3265
|
-
const
|
|
3266
|
-
if (
|
|
3267
|
-
|
|
3265
|
+
const W = q.current || D.current;
|
|
3266
|
+
if (W) {
|
|
3267
|
+
W.focus();
|
|
3268
3268
|
const U = document.createRange();
|
|
3269
|
-
U.selectNodeContents(
|
|
3269
|
+
U.selectNodeContents(W), U.collapse(!1);
|
|
3270
3270
|
const ie = window.getSelection();
|
|
3271
3271
|
ie == null || ie.removeAllRanges(), ie == null || ie.addRange(U);
|
|
3272
3272
|
}
|
|
3273
3273
|
}
|
|
3274
3274
|
}, [E]), w = { duration: 0.3, ...w };
|
|
3275
|
-
const T = (
|
|
3276
|
-
t &&
|
|
3275
|
+
const T = (W) => {
|
|
3276
|
+
t && W.preventDefault(), i ? ($(!S), i(!S)) : a && a(W);
|
|
3277
3277
|
}, J = !!i || !!u || !!a || !!s || !!m;
|
|
3278
3278
|
l && (n = Ct);
|
|
3279
3279
|
const {
|
|
@@ -3282,8 +3282,8 @@ const Jr = ({
|
|
|
3282
3282
|
onKeyDown: L,
|
|
3283
3283
|
onDragStart: k,
|
|
3284
3284
|
onDragEnd: N,
|
|
3285
|
-
onDoubleClick:
|
|
3286
|
-
...
|
|
3285
|
+
onDoubleClick: A,
|
|
3286
|
+
...P
|
|
3287
3287
|
} = g ?? {}, X = Sn({
|
|
3288
3288
|
href: s,
|
|
3289
3289
|
disabled: t,
|
|
@@ -3302,12 +3302,12 @@ const Jr = ({
|
|
|
3302
3302
|
onEditCommit: p,
|
|
3303
3303
|
isEditing: E
|
|
3304
3304
|
}), q = j(null), ee = () => {
|
|
3305
|
-
const
|
|
3306
|
-
if (
|
|
3305
|
+
const W = (H ?? "").trim();
|
|
3306
|
+
if (!W) {
|
|
3307
3307
|
u && u();
|
|
3308
3308
|
return;
|
|
3309
3309
|
}
|
|
3310
|
-
p == null || p(
|
|
3310
|
+
p == null || p(W);
|
|
3311
3311
|
};
|
|
3312
3312
|
return /* @__PURE__ */ K(
|
|
3313
3313
|
O,
|
|
@@ -3316,52 +3316,52 @@ const Jr = ({
|
|
|
3316
3316
|
ref: v,
|
|
3317
3317
|
href: s,
|
|
3318
3318
|
className: X.chip,
|
|
3319
|
-
...
|
|
3320
|
-
onClick: (
|
|
3321
|
-
E || T(
|
|
3319
|
+
...P,
|
|
3320
|
+
onClick: (W) => {
|
|
3321
|
+
E || T(W);
|
|
3322
3322
|
},
|
|
3323
3323
|
draggable: !t && !!(g != null && g.draggable),
|
|
3324
|
-
onDragStart: (
|
|
3325
|
-
!t && (g != null && g.draggable) && te(!0), k == null || k(
|
|
3324
|
+
onDragStart: (W) => {
|
|
3325
|
+
!t && (g != null && g.draggable) && te(!0), k == null || k(W);
|
|
3326
3326
|
},
|
|
3327
|
-
onDragEnd: (
|
|
3328
|
-
g != null && g.draggable && te(!1), N == null || N(
|
|
3327
|
+
onDragEnd: (W) => {
|
|
3328
|
+
g != null && g.draggable && te(!1), N == null || N(W);
|
|
3329
3329
|
},
|
|
3330
|
-
onDoubleClick: (
|
|
3331
|
-
!t && m && !E && (f == null || f(),
|
|
3330
|
+
onDoubleClick: (W) => {
|
|
3331
|
+
!t && m && !E && (f == null || f(), W.preventDefault(), W.stopPropagation()), A == null || A(W);
|
|
3332
3332
|
},
|
|
3333
|
-
onFocus: (
|
|
3334
|
-
J && F(!0), Z == null || Z(
|
|
3333
|
+
onFocus: (W) => {
|
|
3334
|
+
J && F(!0), Z == null || Z(W);
|
|
3335
3335
|
},
|
|
3336
|
-
onBlur: (
|
|
3337
|
-
F(!1), se == null || se(
|
|
3336
|
+
onBlur: (W) => {
|
|
3337
|
+
F(!1), se == null || se(W);
|
|
3338
3338
|
},
|
|
3339
|
-
onKeyDown: (
|
|
3340
|
-
const U =
|
|
3339
|
+
onKeyDown: (W) => {
|
|
3340
|
+
const U = W.key;
|
|
3341
3341
|
if (!t && E) {
|
|
3342
|
-
U === "Enter" ? (
|
|
3342
|
+
U === "Enter" ? (W.preventDefault(), ee()) : U === "Escape" ? (W.preventDefault(), h == null || h()) : u && (H == null ? void 0 : H.trim()) === "" && (U === "Backspace" || U === "Delete" || U === "Del") && (W.preventDefault(), W.stopPropagation(), u());
|
|
3343
3343
|
return;
|
|
3344
3344
|
}
|
|
3345
3345
|
if (!t && I) {
|
|
3346
3346
|
if (m && !i && (U === "F2" || U === "Enter")) {
|
|
3347
|
-
|
|
3347
|
+
W.preventDefault(), f == null || f();
|
|
3348
3348
|
return;
|
|
3349
3349
|
}
|
|
3350
3350
|
if (i && (U === "Enter" || U === " " || U === "Spacebar")) {
|
|
3351
|
-
|
|
3351
|
+
W.preventDefault();
|
|
3352
3352
|
const ie = !S;
|
|
3353
|
-
|
|
3353
|
+
$(ie), i(ie);
|
|
3354
3354
|
}
|
|
3355
|
-
u && (U === "Backspace" || U === "Delete" || U === "Del") && (
|
|
3355
|
+
u && (U === "Backspace" || U === "Delete" || U === "Del") && (W.preventDefault(), W.stopPropagation(), u());
|
|
3356
3356
|
}
|
|
3357
|
-
L == null || L(
|
|
3357
|
+
L == null || L(W);
|
|
3358
3358
|
},
|
|
3359
3359
|
disabled: t,
|
|
3360
3360
|
"aria-pressed": i ? S : void 0,
|
|
3361
3361
|
style: { transition: w.duration + "s" },
|
|
3362
3362
|
children: [
|
|
3363
3363
|
J && !t && !E && /* @__PURE__ */ d(
|
|
3364
|
-
|
|
3364
|
+
Ne,
|
|
3365
3365
|
{
|
|
3366
3366
|
style: { transition: w.duration + "s" },
|
|
3367
3367
|
className: X.stateLayer,
|
|
@@ -3372,7 +3372,7 @@ const Jr = ({
|
|
|
3372
3372
|
stateClassName: "state-ripple-group-[chip]"
|
|
3373
3373
|
}
|
|
3374
3374
|
),
|
|
3375
|
-
n && /* @__PURE__ */ d(
|
|
3375
|
+
n && /* @__PURE__ */ d(he, { icon: n, className: X.leadingIcon }),
|
|
3376
3376
|
/* @__PURE__ */ d(
|
|
3377
3377
|
"span",
|
|
3378
3378
|
{
|
|
@@ -3382,33 +3382,33 @@ const Jr = ({
|
|
|
3382
3382
|
className: X.label,
|
|
3383
3383
|
role: m ? "textbox" : void 0,
|
|
3384
3384
|
spellCheck: !1,
|
|
3385
|
-
onInput: (
|
|
3386
|
-
const U =
|
|
3385
|
+
onInput: (W) => {
|
|
3386
|
+
const U = W.currentTarget.innerText;
|
|
3387
3387
|
C(U), x == null || x(U);
|
|
3388
3388
|
},
|
|
3389
|
-
onBlur: (
|
|
3389
|
+
onBlur: (W) => {
|
|
3390
3390
|
m && E && ee();
|
|
3391
3391
|
},
|
|
3392
|
-
onKeyDown: (
|
|
3393
|
-
if (m && E &&
|
|
3394
|
-
|
|
3392
|
+
onKeyDown: (W) => {
|
|
3393
|
+
if (m && E && W.key === "Enter") {
|
|
3394
|
+
W.preventDefault(), W.stopPropagation(), ee();
|
|
3395
3395
|
return;
|
|
3396
3396
|
}
|
|
3397
|
-
m && E &&
|
|
3397
|
+
m && E && W.key === "Escape" && (W.preventDefault(), W.stopPropagation(), h == null || h());
|
|
3398
3398
|
},
|
|
3399
3399
|
children: r
|
|
3400
3400
|
}
|
|
3401
3401
|
),
|
|
3402
3402
|
u && !E && /* @__PURE__ */ d(
|
|
3403
|
-
|
|
3403
|
+
he,
|
|
3404
3404
|
{
|
|
3405
3405
|
icon: De,
|
|
3406
3406
|
className: X.trailingIcon,
|
|
3407
|
-
onMouseDown: (
|
|
3408
|
-
|
|
3407
|
+
onMouseDown: (W) => {
|
|
3408
|
+
W.preventDefault(), W.stopPropagation();
|
|
3409
3409
|
},
|
|
3410
|
-
onClick: (
|
|
3411
|
-
|
|
3410
|
+
onClick: (W) => {
|
|
3411
|
+
W.stopPropagation(), t || u();
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
3414
|
)
|
|
@@ -3459,8 +3459,8 @@ const Zr = ({
|
|
|
3459
3459
|
}) => {
|
|
3460
3460
|
const a = r ?? [], i = Q.useRef(null), [l, o] = Q.useState(!1), u = Q.useRef(/* @__PURE__ */ new WeakMap()), m = Q.useCallback((v) => {
|
|
3461
3461
|
const S = u.current;
|
|
3462
|
-
let
|
|
3463
|
-
return
|
|
3462
|
+
let $ = S.get(v);
|
|
3463
|
+
return $ || ($ = Rt(), S.set(v, $)), $;
|
|
3464
3464
|
}, []);
|
|
3465
3465
|
Q.useEffect(() => {
|
|
3466
3466
|
var v, S;
|
|
@@ -3473,7 +3473,7 @@ const Zr = ({
|
|
|
3473
3473
|
[c, a]
|
|
3474
3474
|
), x = Q.useCallback(
|
|
3475
3475
|
(v) => {
|
|
3476
|
-
h((S) => S.filter((
|
|
3476
|
+
h((S) => S.filter(($, I) => I !== v));
|
|
3477
3477
|
},
|
|
3478
3478
|
[h]
|
|
3479
3479
|
), w = Nn({
|
|
@@ -3486,9 +3486,9 @@ const Zr = ({
|
|
|
3486
3486
|
p.current = !0;
|
|
3487
3487
|
const S = {
|
|
3488
3488
|
label: v
|
|
3489
|
-
},
|
|
3489
|
+
}, $ = m(S), I = [...a, S];
|
|
3490
3490
|
c == null || c(I), requestAnimationFrame(() => {
|
|
3491
|
-
g(
|
|
3491
|
+
g($), p.current = !1;
|
|
3492
3492
|
});
|
|
3493
3493
|
},
|
|
3494
3494
|
[e, c, a, m]
|
|
@@ -3497,17 +3497,17 @@ const Zr = ({
|
|
|
3497
3497
|
var v;
|
|
3498
3498
|
if (b) {
|
|
3499
3499
|
const S = a.findIndex(
|
|
3500
|
-
(
|
|
3500
|
+
($) => m($) === b
|
|
3501
3501
|
);
|
|
3502
3502
|
if (S !== -1) {
|
|
3503
|
-
const
|
|
3504
|
-
(v =
|
|
3505
|
-
const I = i.current, F =
|
|
3503
|
+
const $ = f.current[S];
|
|
3504
|
+
(v = $ == null ? void 0 : $.focus) == null || v.call($);
|
|
3505
|
+
const I = i.current, F = $.offsetLeft + $.offsetWidth / 2 - I.offsetWidth / 2;
|
|
3506
3506
|
I.scrollTo({ left: F, behavior: "smooth" });
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
3509
|
}, [b, a, m]);
|
|
3510
|
-
const O = j(null),
|
|
3510
|
+
const O = j(null), R = (l || a.length === 0) && e === "input";
|
|
3511
3511
|
return /* @__PURE__ */ K(
|
|
3512
3512
|
"div",
|
|
3513
3513
|
{
|
|
@@ -3564,9 +3564,9 @@ const Zr = ({
|
|
|
3564
3564
|
},
|
|
3565
3565
|
children: [
|
|
3566
3566
|
a.map((v, S) => {
|
|
3567
|
-
const
|
|
3567
|
+
const $ = m(v), I = e === "input", F = I ? {
|
|
3568
3568
|
editable: !0,
|
|
3569
|
-
editing: b ===
|
|
3569
|
+
editing: b === $,
|
|
3570
3570
|
onEditCommit: (E) => {
|
|
3571
3571
|
o(!0), h(
|
|
3572
3572
|
(Y) => Y.map(
|
|
@@ -3604,16 +3604,16 @@ const Zr = ({
|
|
|
3604
3604
|
)
|
|
3605
3605
|
),
|
|
3606
3606
|
onBlur: () => {
|
|
3607
|
-
b ===
|
|
3607
|
+
b === $ && g(null);
|
|
3608
3608
|
},
|
|
3609
3609
|
onRemove: I ? () => {
|
|
3610
3610
|
o(!0), x(S);
|
|
3611
3611
|
} : void 0
|
|
3612
3612
|
},
|
|
3613
|
-
|
|
3613
|
+
$
|
|
3614
3614
|
);
|
|
3615
3615
|
}),
|
|
3616
|
-
l && /* @__PURE__ */ K(
|
|
3616
|
+
l && /* @__PURE__ */ K(ye, { children: [
|
|
3617
3617
|
/* @__PURE__ */ d(
|
|
3618
3618
|
Dt,
|
|
3619
3619
|
{
|
|
@@ -3631,7 +3631,7 @@ const Zr = ({
|
|
|
3631
3631
|
}
|
|
3632
3632
|
` })
|
|
3633
3633
|
] }),
|
|
3634
|
-
|
|
3634
|
+
R && /* @__PURE__ */ d(
|
|
3635
3635
|
Ge,
|
|
3636
3636
|
{
|
|
3637
3637
|
ref: O,
|
|
@@ -3644,8 +3644,8 @@ const Zr = ({
|
|
|
3644
3644
|
if (v = v.replace(/( )+/g, " ").trim(), console.log("Ghost chip onChange", v, !!v), v)
|
|
3645
3645
|
M(v);
|
|
3646
3646
|
else if (a.length > 0) {
|
|
3647
|
-
const
|
|
3648
|
-
(S =
|
|
3647
|
+
const $ = f.current[a.length - 1];
|
|
3648
|
+
(S = $ == null ? void 0 : $.focus) == null || S.call($);
|
|
3649
3649
|
}
|
|
3650
3650
|
},
|
|
3651
3651
|
onEditCommit: () => {
|
|
@@ -3672,13 +3672,13 @@ function er({
|
|
|
3672
3672
|
closeDelay: c = 150,
|
|
3673
3673
|
id: a
|
|
3674
3674
|
} = {}) {
|
|
3675
|
-
const i =
|
|
3675
|
+
const i = Ee(), l = a ?? `tooltip-${i}`, o = Array.isArray(e) ? e : [e], u = typeof t == "boolean", [m, f] = V(
|
|
3676
3676
|
n ? "hovered" : "hidden"
|
|
3677
|
-
), [p, h] = V(!1), x = j(null), w = j(null), M =
|
|
3677
|
+
), [p, h] = V(!1), x = j(null), w = j(null), M = me(() => {
|
|
3678
3678
|
x.current && (clearTimeout(x.current), x.current = null), w.current && (clearTimeout(w.current), w.current = null);
|
|
3679
3679
|
}, []);
|
|
3680
3680
|
_(() => () => M(), [M]);
|
|
3681
|
-
const b =
|
|
3681
|
+
const b = me(
|
|
3682
3682
|
(C) => {
|
|
3683
3683
|
if (u) {
|
|
3684
3684
|
const D = C !== "hidden";
|
|
@@ -3690,7 +3690,7 @@ function er({
|
|
|
3690
3690
|
}
|
|
3691
3691
|
},
|
|
3692
3692
|
[u, s]
|
|
3693
|
-
), g = u ? t ? "hovered" : "hidden" : m, O = g !== "hidden",
|
|
3693
|
+
), g = u ? t ? "hovered" : "hidden" : m, O = g !== "hidden", R = (C) => {
|
|
3694
3694
|
switch (C) {
|
|
3695
3695
|
case "hidden":
|
|
3696
3696
|
return 0;
|
|
@@ -3703,27 +3703,27 @@ function er({
|
|
|
3703
3703
|
default:
|
|
3704
3704
|
return 0;
|
|
3705
3705
|
}
|
|
3706
|
-
}, v =
|
|
3706
|
+
}, v = me(
|
|
3707
3707
|
(C) => {
|
|
3708
|
-
M(), !(
|
|
3708
|
+
M(), !(R(C) <= R(g)) && (x.current = setTimeout(() => {
|
|
3709
3709
|
b(C);
|
|
3710
3710
|
}, r));
|
|
3711
3711
|
},
|
|
3712
3712
|
[M, r, g, b]
|
|
3713
|
-
), S =
|
|
3713
|
+
), S = me(
|
|
3714
3714
|
(C) => {
|
|
3715
3715
|
M(), w.current = setTimeout(() => {
|
|
3716
|
-
(!u &&
|
|
3716
|
+
(!u && R(m) <= R(C) || u) && b("hidden");
|
|
3717
3717
|
}, c);
|
|
3718
3718
|
},
|
|
3719
3719
|
[M, c, m, u, b]
|
|
3720
|
-
),
|
|
3720
|
+
), $ = me(() => {
|
|
3721
3721
|
o.includes("hover") && v("hovered");
|
|
3722
|
-
}, [o, v]), I =
|
|
3722
|
+
}, [o, v]), I = me(() => {
|
|
3723
3723
|
o.includes("hover") && (g === "focused" || g === "clicked" || p || S("hovered"));
|
|
3724
|
-
}, [o, g, p, S]), F =
|
|
3724
|
+
}, [o, g, p, S]), F = me(() => {
|
|
3725
3725
|
o.includes("focus") && (M(), b("focused"));
|
|
3726
|
-
}, [o, M, b]), E =
|
|
3726
|
+
}, [o, M, b]), E = me(() => {
|
|
3727
3727
|
if (o.includes("focus") && g !== "clicked") {
|
|
3728
3728
|
if (o.includes("hover") && p) {
|
|
3729
3729
|
b("hovered");
|
|
@@ -3731,22 +3731,22 @@ function er({
|
|
|
3731
3731
|
}
|
|
3732
3732
|
S("focused");
|
|
3733
3733
|
}
|
|
3734
|
-
}, [o, g, p, S, b]), Y =
|
|
3734
|
+
}, [o, g, p, S, b]), Y = me(() => {
|
|
3735
3735
|
o.includes("click") && (M(), b(g === "clicked" ? "hidden" : "clicked"));
|
|
3736
|
-
}, [o, g, M, b]), z =
|
|
3736
|
+
}, [o, g, M, b]), z = me(
|
|
3737
3737
|
(C) => {
|
|
3738
3738
|
C.key === "Escape" && O && (M(), b("hidden"), C.preventDefault());
|
|
3739
3739
|
},
|
|
3740
3740
|
[O, M, b]
|
|
3741
|
-
), te =
|
|
3741
|
+
), te = me(() => {
|
|
3742
3742
|
h(!0), M();
|
|
3743
|
-
}, [M]),
|
|
3743
|
+
}, [M]), H = me(() => {
|
|
3744
3744
|
h(!1), o.includes("hover") && g === "hovered" && S("hovered");
|
|
3745
3745
|
}, [o, g, S]);
|
|
3746
3746
|
return {
|
|
3747
3747
|
triggerProps: {
|
|
3748
3748
|
"aria-describedby": O ? l : void 0,
|
|
3749
|
-
onMouseEnter:
|
|
3749
|
+
onMouseEnter: $,
|
|
3750
3750
|
onMouseLeave: I,
|
|
3751
3751
|
onFocus: F,
|
|
3752
3752
|
onBlur: E,
|
|
@@ -3758,7 +3758,7 @@ function er({
|
|
|
3758
3758
|
role: "tooltip",
|
|
3759
3759
|
"aria-hidden": !O,
|
|
3760
3760
|
onMouseEnter: te,
|
|
3761
|
-
onMouseLeave:
|
|
3761
|
+
onMouseLeave: H
|
|
3762
3762
|
},
|
|
3763
3763
|
isOpen: O,
|
|
3764
3764
|
state: g
|
|
@@ -3786,11 +3786,11 @@ const $t = ({
|
|
|
3786
3786
|
anchorRef: b,
|
|
3787
3787
|
...g
|
|
3788
3788
|
}) => {
|
|
3789
|
-
const
|
|
3789
|
+
const R = i || (e === "rich" ? "bottom-right" : "bottom");
|
|
3790
3790
|
if (m = { duration: 0.3, ...m }, !s && !l)
|
|
3791
3791
|
throw new Error("Tooltip must have a child or a targetRef");
|
|
3792
3792
|
t && !Array.isArray(t) && (t = [t]);
|
|
3793
|
-
const v = j(null),
|
|
3793
|
+
const v = j(null), $ = b || (l || v), { triggerProps: I, tooltipProps: F, isOpen: E } = er({
|
|
3794
3794
|
trigger: u,
|
|
3795
3795
|
isOpen: h,
|
|
3796
3796
|
defaultOpen: x,
|
|
@@ -3798,54 +3798,54 @@ const $t = ({
|
|
|
3798
3798
|
openDelay: f,
|
|
3799
3799
|
closeDelay: p,
|
|
3800
3800
|
id: M
|
|
3801
|
-
}), Y = !l &&
|
|
3801
|
+
}), Y = !l && Ie(s) ? Re(s, {
|
|
3802
3802
|
ref: v,
|
|
3803
3803
|
...I,
|
|
3804
3804
|
// Merge event handlers if the child already has them
|
|
3805
|
-
onMouseEnter: (
|
|
3805
|
+
onMouseEnter: (H) => {
|
|
3806
3806
|
var C, D;
|
|
3807
|
-
I.onMouseEnter(), (D = (C = s.props) == null ? void 0 : C.onMouseEnter) == null || D.call(C,
|
|
3807
|
+
I.onMouseEnter(), (D = (C = s.props) == null ? void 0 : C.onMouseEnter) == null || D.call(C, H);
|
|
3808
3808
|
},
|
|
3809
|
-
onMouseLeave: (
|
|
3809
|
+
onMouseLeave: (H) => {
|
|
3810
3810
|
var C, D;
|
|
3811
|
-
I.onMouseLeave(), (D = (C = s.props) == null ? void 0 : C.onMouseLeave) == null || D.call(C,
|
|
3811
|
+
I.onMouseLeave(), (D = (C = s.props) == null ? void 0 : C.onMouseLeave) == null || D.call(C, H);
|
|
3812
3812
|
},
|
|
3813
|
-
onFocus: (
|
|
3813
|
+
onFocus: (H) => {
|
|
3814
3814
|
var C, D;
|
|
3815
|
-
I.onFocus(), (D = (C = s.props) == null ? void 0 : C.onFocus) == null || D.call(C,
|
|
3815
|
+
I.onFocus(), (D = (C = s.props) == null ? void 0 : C.onFocus) == null || D.call(C, H);
|
|
3816
3816
|
},
|
|
3817
|
-
onBlur: (
|
|
3817
|
+
onBlur: (H) => {
|
|
3818
3818
|
var C, D;
|
|
3819
|
-
I.onBlur(), (D = (C = s.props) == null ? void 0 : C.onBlur) == null || D.call(C,
|
|
3819
|
+
I.onBlur(), (D = (C = s.props) == null ? void 0 : C.onBlur) == null || D.call(C, H);
|
|
3820
3820
|
},
|
|
3821
|
-
onClick: (
|
|
3821
|
+
onClick: (H) => {
|
|
3822
3822
|
var C, D;
|
|
3823
|
-
I.onClick(), (D = (C = s.props) == null ? void 0 : C.onClick) == null || D.call(C,
|
|
3823
|
+
I.onClick(), (D = (C = s.props) == null ? void 0 : C.onClick) == null || D.call(C, H);
|
|
3824
3824
|
},
|
|
3825
|
-
onKeyDown: (
|
|
3825
|
+
onKeyDown: (H) => {
|
|
3826
3826
|
var C, D;
|
|
3827
|
-
I.onKeyDown(
|
|
3827
|
+
I.onKeyDown(H), (D = (C = s.props) == null ? void 0 : C.onKeyDown) == null || D.call(C, H);
|
|
3828
3828
|
}
|
|
3829
3829
|
}) : s;
|
|
3830
3830
|
_(() => {
|
|
3831
3831
|
if (!l) return;
|
|
3832
|
-
const
|
|
3833
|
-
if (!
|
|
3832
|
+
const H = l.current;
|
|
3833
|
+
if (!H) return;
|
|
3834
3834
|
const C = () => I.onMouseEnter(), D = () => I.onMouseLeave(), T = () => I.onFocus(), J = () => I.onBlur(), Z = () => I.onClick(), se = (L) => I.onKeyDown(L);
|
|
3835
|
-
return
|
|
3835
|
+
return H.addEventListener("mouseenter", C), H.addEventListener("mouseleave", D), H.addEventListener("focus", T, !0), H.addEventListener("blur", J, !0), H.addEventListener("click", Z), H.addEventListener("keydown", se), I["aria-describedby"] ? H.setAttribute(
|
|
3836
3836
|
"aria-describedby",
|
|
3837
3837
|
I["aria-describedby"]
|
|
3838
|
-
) :
|
|
3839
|
-
|
|
3838
|
+
) : H.removeAttribute("aria-describedby"), () => {
|
|
3839
|
+
H.removeEventListener("mouseenter", C), H.removeEventListener("mouseleave", D), H.removeEventListener("focus", T, !0), H.removeEventListener("blur", J, !0), H.removeEventListener("click", Z), H.removeEventListener("keydown", se);
|
|
3840
3840
|
};
|
|
3841
3841
|
}, [l, I]);
|
|
3842
|
-
const z =
|
|
3842
|
+
const z = Pn({
|
|
3843
3843
|
variant: e,
|
|
3844
3844
|
buttons: t,
|
|
3845
3845
|
className: n,
|
|
3846
3846
|
title: r,
|
|
3847
3847
|
text: c,
|
|
3848
|
-
position:
|
|
3848
|
+
position: R,
|
|
3849
3849
|
trigger: u,
|
|
3850
3850
|
targetRef: l,
|
|
3851
3851
|
children: s
|
|
@@ -3859,13 +3859,13 @@ const $t = ({
|
|
|
3859
3859
|
height: 16
|
|
3860
3860
|
}
|
|
3861
3861
|
};
|
|
3862
|
-
return /* @__PURE__ */ K(
|
|
3862
|
+
return /* @__PURE__ */ K(ye, { children: [
|
|
3863
3863
|
Y,
|
|
3864
|
-
/* @__PURE__ */ d(
|
|
3864
|
+
/* @__PURE__ */ d(pe, { children: E && /* @__PURE__ */ d(
|
|
3865
3865
|
it,
|
|
3866
3866
|
{
|
|
3867
|
-
anchorRef:
|
|
3868
|
-
position:
|
|
3867
|
+
anchorRef: $,
|
|
3868
|
+
position: R,
|
|
3869
3869
|
children: /* @__PURE__ */ d(
|
|
3870
3870
|
ne.div,
|
|
3871
3871
|
{
|
|
@@ -3877,15 +3877,15 @@ const $t = ({
|
|
|
3877
3877
|
className: z.toolTip,
|
|
3878
3878
|
...g,
|
|
3879
3879
|
...F,
|
|
3880
|
-
children: /* @__PURE__ */ d("div", { className: z.container, children: a ? /* @__PURE__ */ d("div", { className: z.content, children: a }) : /* @__PURE__ */ K(
|
|
3880
|
+
children: /* @__PURE__ */ d("div", { className: z.container, children: a ? /* @__PURE__ */ d("div", { className: z.content, children: a }) : /* @__PURE__ */ K(ye, { children: [
|
|
3881
3881
|
r && /* @__PURE__ */ d("div", { className: z.subHead, children: r }),
|
|
3882
3882
|
c && /* @__PURE__ */ d("div", { className: z.supportingText, children: c }),
|
|
3883
|
-
t && /* @__PURE__ */ d("div", { className: z.actions, children: Array.isArray(t) && t.map((
|
|
3884
|
-
|
|
3883
|
+
t && /* @__PURE__ */ d("div", { className: z.actions, children: Array.isArray(t) && t.map((H, C) => /* @__PURE__ */ d(
|
|
3884
|
+
Le,
|
|
3885
3885
|
{
|
|
3886
3886
|
size: "small",
|
|
3887
3887
|
variant: "text",
|
|
3888
|
-
...
|
|
3888
|
+
...H
|
|
3889
3889
|
},
|
|
3890
3890
|
C
|
|
3891
3891
|
)) })
|
|
@@ -3969,7 +3969,7 @@ const $t = ({
|
|
|
3969
3969
|
}
|
|
3970
3970
|
),
|
|
3971
3971
|
/* @__PURE__ */ d(
|
|
3972
|
-
|
|
3972
|
+
Ne,
|
|
3973
3973
|
{
|
|
3974
3974
|
style: { transition: o.duration + "s" },
|
|
3975
3975
|
className: p.stateLayer,
|
|
@@ -3984,8 +3984,8 @@ const $t = ({
|
|
|
3984
3984
|
stateClassName: "state-ripple-group-[fab]"
|
|
3985
3985
|
}
|
|
3986
3986
|
),
|
|
3987
|
-
/* @__PURE__ */ d(
|
|
3988
|
-
/* @__PURE__ */ d(
|
|
3987
|
+
/* @__PURE__ */ d(he, { icon: a, className: p.icon }),
|
|
3988
|
+
/* @__PURE__ */ d(pe, { children: i && /* @__PURE__ */ d(
|
|
3989
3989
|
ne.span,
|
|
3990
3990
|
{
|
|
3991
3991
|
variants: w,
|
|
@@ -3999,7 +3999,7 @@ const $t = ({
|
|
|
3999
3999
|
]
|
|
4000
4000
|
}
|
|
4001
4001
|
);
|
|
4002
|
-
},
|
|
4002
|
+
}, Me = ({
|
|
4003
4003
|
variant: e = "standard",
|
|
4004
4004
|
href: t,
|
|
4005
4005
|
disabled: n = !1,
|
|
@@ -4025,7 +4025,7 @@ const $t = ({
|
|
|
4025
4025
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
4026
4026
|
);
|
|
4027
4027
|
!s && s !== null && (s = r);
|
|
4028
|
-
const [g, O] = Q.useState(a),
|
|
4028
|
+
const [g, O] = Q.useState(a), R = (F) => {
|
|
4029
4029
|
n && F.preventDefault(), c ? (O(!g), c(!g)) : i && i(F);
|
|
4030
4030
|
};
|
|
4031
4031
|
_(() => {
|
|
@@ -4049,7 +4049,7 @@ const $t = ({
|
|
|
4049
4049
|
size: o,
|
|
4050
4050
|
children: r,
|
|
4051
4051
|
...b
|
|
4052
|
-
}),
|
|
4052
|
+
}), $ = j(null), I = f || $;
|
|
4053
4053
|
return w = { duration: 0.3, ...w }, /* @__PURE__ */ K(
|
|
4054
4054
|
v,
|
|
4055
4055
|
{
|
|
@@ -4060,7 +4060,7 @@ const $t = ({
|
|
|
4060
4060
|
"aria-label": r,
|
|
4061
4061
|
...b,
|
|
4062
4062
|
title: void 0,
|
|
4063
|
-
onClick:
|
|
4063
|
+
onClick: R,
|
|
4064
4064
|
ref: I,
|
|
4065
4065
|
children: [
|
|
4066
4066
|
s !== null && /* @__PURE__ */ d(
|
|
@@ -4073,7 +4073,7 @@ const $t = ({
|
|
|
4073
4073
|
),
|
|
4074
4074
|
/* @__PURE__ */ d("div", { className: S.touchTarget }),
|
|
4075
4075
|
/* @__PURE__ */ d(
|
|
4076
|
-
|
|
4076
|
+
Ne,
|
|
4077
4077
|
{
|
|
4078
4078
|
style: { transition: w.duration + "s" },
|
|
4079
4079
|
className: S.stateLayer,
|
|
@@ -4098,7 +4098,7 @@ const $t = ({
|
|
|
4098
4098
|
stateClassName: "state-ripple-group-[icon-button]"
|
|
4099
4099
|
}
|
|
4100
4100
|
),
|
|
4101
|
-
l ? /* @__PURE__ */ d(
|
|
4101
|
+
l ? /* @__PURE__ */ d(he, { icon: l, className: S.icon }) : M
|
|
4102
4102
|
]
|
|
4103
4103
|
}
|
|
4104
4104
|
);
|
|
@@ -4121,8 +4121,8 @@ const $t = ({
|
|
|
4121
4121
|
l = { duration: 0.3, ease: "easeInOut", ...l };
|
|
4122
4122
|
const h = j(null), x = i || h, w = typeof u == "boolean", [M, b] = V(m), g = w ? u : M, O = (E) => {
|
|
4123
4123
|
w || b(E), f == null || f(E);
|
|
4124
|
-
},
|
|
4125
|
-
(E) => Q.isValidElement(E) && E.type ===
|
|
4124
|
+
}, R = Q.Children.toArray(o).filter(
|
|
4125
|
+
(E) => Q.isValidElement(E) && E.type === Le
|
|
4126
4126
|
), v = In({
|
|
4127
4127
|
href: r,
|
|
4128
4128
|
icon: c,
|
|
@@ -4134,7 +4134,7 @@ const $t = ({
|
|
|
4134
4134
|
transition: l,
|
|
4135
4135
|
children: t,
|
|
4136
4136
|
open: g
|
|
4137
|
-
}), S = ne.create(Be),
|
|
4137
|
+
}), S = ne.create(Be), $ = ne.create(Me), I = (E) => /* @__PURE__ */ d(
|
|
4138
4138
|
S,
|
|
4139
4139
|
{
|
|
4140
4140
|
icon: c,
|
|
@@ -4155,22 +4155,22 @@ const $t = ({
|
|
|
4155
4155
|
},
|
|
4156
4156
|
...E
|
|
4157
4157
|
}
|
|
4158
|
-
), F =
|
|
4158
|
+
), F = Ee();
|
|
4159
4159
|
return /* @__PURE__ */ K("div", { className: v.fabMenu, ref: x, ...p, children: [
|
|
4160
|
-
/* @__PURE__ */ d(
|
|
4161
|
-
const E =
|
|
4162
|
-
return
|
|
4160
|
+
/* @__PURE__ */ d(pe, { children: g && /* @__PURE__ */ d("div", { className: v.actions, role: "menu", "aria-hidden": !g, children: (() => {
|
|
4161
|
+
const E = R.length;
|
|
4162
|
+
return R.map((Y, z) => {
|
|
4163
4163
|
Y.props;
|
|
4164
|
-
const te = E - 1 - z,
|
|
4164
|
+
const te = E - 1 - z, H = ((l == null ? void 0 : l.delay) ?? 0) + te * 0.06, C = {
|
|
4165
4165
|
open: {
|
|
4166
4166
|
overflow: "visible",
|
|
4167
4167
|
opacity: 1,
|
|
4168
4168
|
width: "auto",
|
|
4169
4169
|
transition: {
|
|
4170
4170
|
...l,
|
|
4171
|
-
delay:
|
|
4171
|
+
delay: H,
|
|
4172
4172
|
opacity: {
|
|
4173
|
-
delay: (l == null ? void 0 : l.duration) / 2 +
|
|
4173
|
+
delay: (l == null ? void 0 : l.duration) / 2 + H
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
},
|
|
@@ -4180,7 +4180,7 @@ const $t = ({
|
|
|
4180
4180
|
width: 0,
|
|
4181
4181
|
transition: {
|
|
4182
4182
|
...l,
|
|
4183
|
-
delay:
|
|
4183
|
+
delay: H,
|
|
4184
4184
|
opacity: {
|
|
4185
4185
|
duration: (l == null ? void 0 : l.duration) / 1.5
|
|
4186
4186
|
}
|
|
@@ -4202,12 +4202,15 @@ const $t = ({
|
|
|
4202
4202
|
shape: "rounded",
|
|
4203
4203
|
variant: "filled",
|
|
4204
4204
|
className: () => ({
|
|
4205
|
-
button: y(
|
|
4206
|
-
"
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4205
|
+
button: y(
|
|
4206
|
+
"max-w-full overflow-hidden text-nowrap",
|
|
4207
|
+
{
|
|
4208
|
+
"px-0": !g,
|
|
4209
|
+
"bg-primary-container text-on-primary-container ": n === "primary",
|
|
4210
|
+
"bg-secondary-container text-on-secondary-container": n === "secondary",
|
|
4211
|
+
"bg-tertiary-container text-on-tertiary-container": n === "tertiary"
|
|
4212
|
+
}
|
|
4213
|
+
),
|
|
4211
4214
|
stateLayer: y({
|
|
4212
4215
|
"state-on-primary-container": n === "primary",
|
|
4213
4216
|
"state-on-secondary-container": n === "secondary",
|
|
@@ -4229,14 +4232,14 @@ const $t = ({
|
|
|
4229
4232
|
layout: !0,
|
|
4230
4233
|
layoutId: "fab-menu" + F
|
|
4231
4234
|
}),
|
|
4232
|
-
g && /* @__PURE__ */ d(
|
|
4233
|
-
|
|
4235
|
+
g && /* @__PURE__ */ d(ye, { children: /* @__PURE__ */ d(
|
|
4236
|
+
$,
|
|
4234
4237
|
{
|
|
4235
4238
|
layout: !0,
|
|
4236
4239
|
layoutId: "fab-menu" + F,
|
|
4237
4240
|
variant: "filled",
|
|
4238
4241
|
className: () => ({
|
|
4239
|
-
iconButton: y(
|
|
4242
|
+
iconButton: y({
|
|
4240
4243
|
"bg-primary text-on-primary": n === "primary",
|
|
4241
4244
|
"bg-secondary text-on-secondary": n === "secondary",
|
|
4242
4245
|
"bg-tertiary text-on-tertiary": n === "tertiary"
|
|
@@ -4296,14 +4299,14 @@ const $t = ({
|
|
|
4296
4299
|
}, f = (D = !1) => D ? a : a == 1 / 0 ? i[(i == null ? void 0 : i.length) - 1].value : a, p = (D = !1) => D ? c : c == -1 / 0 ? i[0].value : c, h = (D) => {
|
|
4297
4300
|
const T = p(!1);
|
|
4298
4301
|
return (f(!1) - T) * D / 100 + T;
|
|
4299
|
-
}, [x, w] = V(!1), M = j(null), b = l || M, [g, O] = V(r), [
|
|
4302
|
+
}, [x, w] = V(!1), M = j(null), b = l || M, [g, O] = V(r), [R, v] = V(m(r)), [S, $] = V(!1);
|
|
4300
4303
|
_(() => {
|
|
4301
4304
|
O(r), v(m(r));
|
|
4302
4305
|
}, [r]);
|
|
4303
4306
|
const I = (D) => {
|
|
4304
|
-
|
|
4307
|
+
$(!0), w(!0), Y(D);
|
|
4305
4308
|
}, F = () => {
|
|
4306
|
-
|
|
4309
|
+
$(!1), w(!1);
|
|
4307
4310
|
};
|
|
4308
4311
|
_(() => (S ? (window.addEventListener("mouseup", F), window.addEventListener("mousemove", Y), window.addEventListener("touchend", F), window.addEventListener("touchmove", Y)) : (window.removeEventListener("mouseup", F), window.removeEventListener("mousemove", Y), window.removeEventListener("touchend", F), window.removeEventListener("touchmove", Y)), () => {
|
|
4309
4312
|
window.removeEventListener("mouseup", F), window.removeEventListener("mousemove", Y), window.removeEventListener("touchend", F), window.removeEventListener("touchmove", Y);
|
|
@@ -4355,10 +4358,10 @@ const $t = ({
|
|
|
4355
4358
|
let L = Z.value === 1 / 0 ? f() : Z.value === -1 / 0 ? p() : Z.value, k = J.value === 1 / 0 ? f() : J.value === -1 / 0 ? p() : J.value;
|
|
4356
4359
|
return L = Math.abs(L - T), k = Math.abs(k - T), L < k ? Z : J;
|
|
4357
4360
|
}).value), T >= f() && (T = f(!0)), T <= p() && (T = p(!0)), D = m(T), O(T), v(D), o && o(T);
|
|
4358
|
-
}, [te,
|
|
4361
|
+
}, [te, H] = V(0);
|
|
4359
4362
|
return _(() => {
|
|
4360
4363
|
const D = () => {
|
|
4361
|
-
b.current &&
|
|
4364
|
+
b.current && H(b.current.offsetWidth);
|
|
4362
4365
|
};
|
|
4363
4366
|
return D(), window.addEventListener("resize", D), () => {
|
|
4364
4367
|
window.removeEventListener("resize", D);
|
|
@@ -4403,8 +4406,8 @@ const $t = ({
|
|
|
4403
4406
|
...u,
|
|
4404
4407
|
children: [
|
|
4405
4408
|
/* @__PURE__ */ d("input", { type: "hidden", name: s, value: g }),
|
|
4406
|
-
/* @__PURE__ */ d("div", { className: E.activeTrack, style: { flex:
|
|
4407
|
-
/* @__PURE__ */ d("div", { className: E.handle, children: /* @__PURE__ */ d(
|
|
4409
|
+
/* @__PURE__ */ d("div", { className: E.activeTrack, style: { flex: R / 100 } }),
|
|
4410
|
+
/* @__PURE__ */ d("div", { className: E.handle, children: /* @__PURE__ */ d(pe, { children: x && /* @__PURE__ */ d(
|
|
4408
4411
|
ne.div,
|
|
4409
4412
|
{
|
|
4410
4413
|
className: E.valueIndicator,
|
|
@@ -4428,7 +4431,7 @@ const $t = ({
|
|
|
4428
4431
|
"div",
|
|
4429
4432
|
{
|
|
4430
4433
|
className: E.inactiveTrack,
|
|
4431
|
-
style: { flex: 1 -
|
|
4434
|
+
style: { flex: 1 - R / 100 }
|
|
4432
4435
|
}
|
|
4433
4436
|
),
|
|
4434
4437
|
/* @__PURE__ */ d(
|
|
@@ -4438,7 +4441,7 @@ const $t = ({
|
|
|
4438
4441
|
children: i && i.map((D, T) => {
|
|
4439
4442
|
let J = null;
|
|
4440
4443
|
const Z = (x ? 9 : 10) / te * 100, se = m(D.value);
|
|
4441
|
-
return se <=
|
|
4444
|
+
return se <= R - Z ? J = !0 : se >= R + Z && (J = !1), /* @__PURE__ */ d(
|
|
4442
4445
|
"div",
|
|
4443
4446
|
{
|
|
4444
4447
|
className: y(E.dot, {
|
|
@@ -4496,8 +4499,8 @@ const $t = ({
|
|
|
4496
4499
|
open: {
|
|
4497
4500
|
width: "auto"
|
|
4498
4501
|
}
|
|
4499
|
-
}, x = () => /* @__PURE__ */ K(
|
|
4500
|
-
/* @__PURE__ */ d(
|
|
4502
|
+
}, x = () => /* @__PURE__ */ K(ye, { children: [
|
|
4503
|
+
/* @__PURE__ */ d(pe, { children: e == "modal" && m && /* @__PURE__ */ d(
|
|
4501
4504
|
ne.div,
|
|
4502
4505
|
{
|
|
4503
4506
|
initial: { opacity: 0 },
|
|
@@ -4508,7 +4511,7 @@ const $t = ({
|
|
|
4508
4511
|
className: p.overlay
|
|
4509
4512
|
}
|
|
4510
4513
|
) }),
|
|
4511
|
-
/* @__PURE__ */ d(
|
|
4514
|
+
/* @__PURE__ */ d(pe, { children: m && /* @__PURE__ */ K(
|
|
4512
4515
|
"div",
|
|
4513
4516
|
{
|
|
4514
4517
|
...u,
|
|
@@ -4527,7 +4530,7 @@ const $t = ({
|
|
|
4527
4530
|
/* @__PURE__ */ K("div", { className: p.header, children: [
|
|
4528
4531
|
s && /* @__PURE__ */ d("p", { className: p.title, children: s }),
|
|
4529
4532
|
/* @__PURE__ */ d(
|
|
4530
|
-
|
|
4533
|
+
Me,
|
|
4531
4534
|
{
|
|
4532
4535
|
size: "small",
|
|
4533
4536
|
label: "close",
|
|
@@ -4578,7 +4581,7 @@ const $t = ({
|
|
|
4578
4581
|
const o = () => {
|
|
4579
4582
|
i(!1), r == null || r();
|
|
4580
4583
|
};
|
|
4581
|
-
return /* @__PURE__ */ d(
|
|
4584
|
+
return /* @__PURE__ */ d(pe, { children: a && /* @__PURE__ */ d(
|
|
4582
4585
|
ne.div,
|
|
4583
4586
|
{
|
|
4584
4587
|
initial: { height: 0 },
|
|
@@ -4590,7 +4593,7 @@ const $t = ({
|
|
|
4590
4593
|
children: /* @__PURE__ */ K("div", { className: l.container, children: [
|
|
4591
4594
|
/* @__PURE__ */ d("p", { className: l.supportingText, children: e }),
|
|
4592
4595
|
/* @__PURE__ */ d(
|
|
4593
|
-
|
|
4596
|
+
Me,
|
|
4594
4597
|
{
|
|
4595
4598
|
onClick: () => o(),
|
|
4596
4599
|
className: l.icon,
|
|
@@ -4658,7 +4661,7 @@ const $t = ({
|
|
|
4658
4661
|
className: x.handleContainer,
|
|
4659
4662
|
children: [
|
|
4660
4663
|
/* @__PURE__ */ d("div", { className: x.handle, children: (u ? n : r) && /* @__PURE__ */ d(
|
|
4661
|
-
|
|
4664
|
+
he,
|
|
4662
4665
|
{
|
|
4663
4666
|
className: x.icon,
|
|
4664
4667
|
icon: u ? n : r
|
|
@@ -4700,8 +4703,8 @@ const $t = ({
|
|
|
4700
4703
|
icon: c
|
|
4701
4704
|
});
|
|
4702
4705
|
}, [a]);
|
|
4703
|
-
const
|
|
4704
|
-
i && i(o ?? null), t && t(
|
|
4706
|
+
const R = r ? "a" : "button", v = ($) => {
|
|
4707
|
+
i && i(o ?? null), t && t($);
|
|
4705
4708
|
}, S = Wn({
|
|
4706
4709
|
className: e,
|
|
4707
4710
|
onTabSelected: u,
|
|
@@ -4718,7 +4721,7 @@ const $t = ({
|
|
|
4718
4721
|
href: r
|
|
4719
4722
|
});
|
|
4720
4723
|
return /* @__PURE__ */ K(
|
|
4721
|
-
|
|
4724
|
+
R,
|
|
4722
4725
|
{
|
|
4723
4726
|
...x,
|
|
4724
4727
|
role: "tab",
|
|
@@ -4730,7 +4733,7 @@ const $t = ({
|
|
|
4730
4733
|
...x,
|
|
4731
4734
|
children: [
|
|
4732
4735
|
/* @__PURE__ */ d(
|
|
4733
|
-
|
|
4736
|
+
Ne,
|
|
4734
4737
|
{
|
|
4735
4738
|
style: { transition: 0.3 + "s" },
|
|
4736
4739
|
className: S.stateLayer,
|
|
@@ -4739,7 +4742,7 @@ const $t = ({
|
|
|
4739
4742
|
}
|
|
4740
4743
|
),
|
|
4741
4744
|
/* @__PURE__ */ K("span", { className: S.content, children: [
|
|
4742
|
-
c && /* @__PURE__ */ d(
|
|
4745
|
+
c && /* @__PURE__ */ d(he, { icon: c, className: S.icon }),
|
|
4743
4746
|
/* @__PURE__ */ d("span", { className: S.label, children: b }),
|
|
4744
4747
|
g && /* @__PURE__ */ d(
|
|
4745
4748
|
ne.span,
|
|
@@ -4777,7 +4780,7 @@ const $t = ({
|
|
|
4777
4780
|
b.scrollTo({ left: O, behavior: "smooth" });
|
|
4778
4781
|
}
|
|
4779
4782
|
}
|
|
4780
|
-
}, x =
|
|
4783
|
+
}, x = be(
|
|
4781
4784
|
() => (i == null ? void 0 : i.tabsId) ?? Rt(),
|
|
4782
4785
|
[i == null ? void 0 : i.tabsId]
|
|
4783
4786
|
), w = An({
|
|
@@ -4809,7 +4812,7 @@ const $t = ({
|
|
|
4809
4812
|
s
|
|
4810
4813
|
), a = j(null), i = t !== void 0 ? t : r, l = n ?? c, o = a.current !== null && i !== null ? i > a.current ? 1 : -1 : 0;
|
|
4811
4814
|
i !== a.current && (a.current = i);
|
|
4812
|
-
const u =
|
|
4815
|
+
const u = Ee(), m = be(
|
|
4813
4816
|
() => ({
|
|
4814
4817
|
selectedTab: i,
|
|
4815
4818
|
setSelectedTab: l,
|
|
@@ -4844,7 +4847,7 @@ const $t = ({
|
|
|
4844
4847
|
children: e,
|
|
4845
4848
|
className: t
|
|
4846
4849
|
});
|
|
4847
|
-
return /* @__PURE__ */ d("div", { className: i.tabPanels, children: /* @__PURE__ */ d(
|
|
4850
|
+
return /* @__PURE__ */ d("div", { className: i.tabPanels, children: /* @__PURE__ */ d(pe, { initial: !1, custom: r, mode: "popLayout", children: a.map(
|
|
4848
4851
|
(l, o) => s === o && /* @__PURE__ */ d(
|
|
4849
4852
|
ne.div,
|
|
4850
4853
|
{
|
|
@@ -4918,27 +4921,27 @@ const $t = ({
|
|
|
4918
4921
|
return new Date(k.getFullYear(), k.getMonth(), 1);
|
|
4919
4922
|
}), [h, x] = V(0), [w, M] = V("day"), b = e !== void 0, [g, O] = V(
|
|
4920
4923
|
t || null
|
|
4921
|
-
),
|
|
4922
|
-
const L = f.getFullYear(), k = f.getMonth(), N = v(L, k),
|
|
4923
|
-
for (let U =
|
|
4924
|
+
), R = b ? e || null : g, v = (L, k) => new Date(L, k + 1, 0).getDate(), S = be(() => {
|
|
4925
|
+
const L = f.getFullYear(), k = f.getMonth(), N = v(L, k), P = (new Date(L, k, 1).getDay() - i + 7) % 7, X = [], q = v(L, k - 1);
|
|
4926
|
+
for (let U = P - 1; U >= 0; U--)
|
|
4924
4927
|
X.push({
|
|
4925
4928
|
date: new Date(L, k - 1, q - U),
|
|
4926
4929
|
isCurrentMonth: !1
|
|
4927
4930
|
});
|
|
4928
4931
|
for (let U = 1; U <= N; U++)
|
|
4929
4932
|
X.push({ date: new Date(L, k, U), isCurrentMonth: !0 });
|
|
4930
|
-
const
|
|
4931
|
-
for (let U = 1; U <=
|
|
4933
|
+
const W = 42 - X.length;
|
|
4934
|
+
for (let U = 1; U <= W; U++)
|
|
4932
4935
|
X.push({
|
|
4933
4936
|
date: new Date(L, k + 1, U),
|
|
4934
4937
|
isCurrentMonth: !1
|
|
4935
4938
|
});
|
|
4936
4939
|
return X;
|
|
4937
|
-
}, [f, i]),
|
|
4938
|
-
const L = (/* @__PURE__ */ new Date()).getFullYear(), k = L - 100, N = L + 100,
|
|
4939
|
-
for (let
|
|
4940
|
-
|
|
4941
|
-
return
|
|
4940
|
+
}, [f, i]), $ = be(() => {
|
|
4941
|
+
const L = (/* @__PURE__ */ new Date()).getFullYear(), k = L - 100, N = L + 100, A = [];
|
|
4942
|
+
for (let P = k; P <= N; P++)
|
|
4943
|
+
A.push(P);
|
|
4944
|
+
return A;
|
|
4942
4945
|
}, []), I = j(null);
|
|
4943
4946
|
_(() => {
|
|
4944
4947
|
if (w === "year" && I.current) {
|
|
@@ -4948,62 +4951,62 @@ const $t = ({
|
|
|
4948
4951
|
L && L.scrollIntoView({ block: "center" });
|
|
4949
4952
|
}
|
|
4950
4953
|
}, [w]);
|
|
4951
|
-
const F =
|
|
4954
|
+
const F = be(
|
|
4952
4955
|
() => new Intl.DateTimeFormat(a, { month: "long", year: "numeric" }),
|
|
4953
4956
|
[a]
|
|
4954
|
-
), E =
|
|
4957
|
+
), E = be(
|
|
4955
4958
|
() => new Intl.DateTimeFormat(a, { weekday: "narrow" }),
|
|
4956
4959
|
[a]
|
|
4957
|
-
), Y =
|
|
4960
|
+
), Y = be(() => {
|
|
4958
4961
|
const L = new Date(2023, 0, 1 + i);
|
|
4959
4962
|
return Array.from({ length: 7 }).map((k, N) => {
|
|
4960
|
-
const
|
|
4961
|
-
return
|
|
4963
|
+
const A = new Date(L);
|
|
4964
|
+
return A.setDate(L.getDate() + N), E.format(A).charAt(0).toUpperCase();
|
|
4962
4965
|
});
|
|
4963
4966
|
}, [E, i]), z = () => {
|
|
4964
4967
|
x(-1), p((L) => new Date(L.getFullYear(), L.getMonth() - 1, 1));
|
|
4965
4968
|
}, te = () => {
|
|
4966
4969
|
x(1), p((L) => new Date(L.getFullYear(), L.getMonth() + 1, 1));
|
|
4967
|
-
},
|
|
4970
|
+
}, H = (L) => {
|
|
4968
4971
|
p((k) => new Date(L, k.getMonth(), 1)), M("day");
|
|
4969
4972
|
}, C = (L, k) => L ? L.getDate() === k.getDate() && L.getMonth() === k.getMonth() && L.getFullYear() === k.getFullYear() : !1, D = (L) => C(/* @__PURE__ */ new Date(), L), T = (L) => {
|
|
4970
4973
|
let k = L;
|
|
4971
4974
|
if (u === "single")
|
|
4972
4975
|
k = L;
|
|
4973
4976
|
else {
|
|
4974
|
-
const N =
|
|
4975
|
-
!
|
|
4977
|
+
const N = R, [A, P] = Array.isArray(N) ? N : [null, null];
|
|
4978
|
+
!A || A && P ? k = [L, null] : L < A ? k = [L, A] : k = [A, L];
|
|
4976
4979
|
}
|
|
4977
4980
|
b || O(k), n && n(k);
|
|
4978
4981
|
}, J = (L) => {
|
|
4979
4982
|
if (u === "single")
|
|
4980
4983
|
return {
|
|
4981
|
-
isSelected: C(
|
|
4984
|
+
isSelected: C(R, L),
|
|
4982
4985
|
isStart: !1,
|
|
4983
4986
|
isEnd: !1,
|
|
4984
4987
|
isInRange: !1
|
|
4985
4988
|
};
|
|
4986
|
-
const k = Array.isArray(
|
|
4989
|
+
const k = Array.isArray(R) ? R : [R, null], [N, A] = k, P = C(N, L), X = C(A, L);
|
|
4987
4990
|
let q = !1;
|
|
4988
|
-
if (N &&
|
|
4991
|
+
if (N && A) {
|
|
4989
4992
|
const ee = new Date(
|
|
4990
4993
|
N.getFullYear(),
|
|
4991
4994
|
N.getMonth(),
|
|
4992
4995
|
N.getDate()
|
|
4993
|
-
).getTime(),
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4996
|
+
).getTime(), W = new Date(
|
|
4997
|
+
A.getFullYear(),
|
|
4998
|
+
A.getMonth(),
|
|
4999
|
+
A.getDate()
|
|
4997
5000
|
).getTime(), U = new Date(
|
|
4998
5001
|
L.getFullYear(),
|
|
4999
5002
|
L.getMonth(),
|
|
5000
5003
|
L.getDate()
|
|
5001
5004
|
).getTime();
|
|
5002
|
-
q = U > ee && U <
|
|
5005
|
+
q = U > ee && U < W;
|
|
5003
5006
|
}
|
|
5004
|
-
return { isSelected:
|
|
5007
|
+
return { isSelected: P || X, isStart: P, isEnd: X, isInRange: q };
|
|
5005
5008
|
}, Z = sr({
|
|
5006
|
-
hasSelected: !!
|
|
5009
|
+
hasSelected: !!R
|
|
5007
5010
|
}), se = {
|
|
5008
5011
|
enter: (L) => ({
|
|
5009
5012
|
x: L > 0 ? "100%" : "-100%",
|
|
@@ -5027,7 +5030,7 @@ const $t = ({
|
|
|
5027
5030
|
children: [
|
|
5028
5031
|
/* @__PURE__ */ K("div", { className: Z.header, children: [
|
|
5029
5032
|
/* @__PURE__ */ K(
|
|
5030
|
-
|
|
5033
|
+
Le,
|
|
5031
5034
|
{
|
|
5032
5035
|
variant: "text",
|
|
5033
5036
|
disableTextMargins: !0,
|
|
@@ -5037,7 +5040,7 @@ const $t = ({
|
|
|
5037
5040
|
children: [
|
|
5038
5041
|
/* @__PURE__ */ d("span", { className: "mr-2", children: w === "day" ? F.format(f) : f.getFullYear() }),
|
|
5039
5042
|
/* @__PURE__ */ d(
|
|
5040
|
-
|
|
5043
|
+
he,
|
|
5041
5044
|
{
|
|
5042
5045
|
icon: Un,
|
|
5043
5046
|
className: y(
|
|
@@ -5051,7 +5054,7 @@ const $t = ({
|
|
|
5051
5054
|
),
|
|
5052
5055
|
w === "day" && /* @__PURE__ */ K("div", { className: "flex items-center", children: [
|
|
5053
5056
|
/* @__PURE__ */ d(
|
|
5054
|
-
|
|
5057
|
+
Me,
|
|
5055
5058
|
{
|
|
5056
5059
|
size: "xSmall",
|
|
5057
5060
|
allowShapeTransformation: !1,
|
|
@@ -5062,7 +5065,7 @@ const $t = ({
|
|
|
5062
5065
|
}
|
|
5063
5066
|
),
|
|
5064
5067
|
/* @__PURE__ */ d(
|
|
5065
|
-
|
|
5068
|
+
Me,
|
|
5066
5069
|
{
|
|
5067
5070
|
size: "xSmall",
|
|
5068
5071
|
allowShapeTransformation: !1,
|
|
@@ -5079,12 +5082,12 @@ const $t = ({
|
|
|
5079
5082
|
{
|
|
5080
5083
|
className: "h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",
|
|
5081
5084
|
ref: I,
|
|
5082
|
-
children:
|
|
5083
|
-
|
|
5085
|
+
children: $.map((L) => /* @__PURE__ */ d(
|
|
5086
|
+
Le,
|
|
5084
5087
|
{
|
|
5085
5088
|
size: "small",
|
|
5086
5089
|
variant: L === f.getFullYear() ? "filled" : "text",
|
|
5087
|
-
onClick: () =>
|
|
5090
|
+
onClick: () => H(L),
|
|
5088
5091
|
"data-selected": L === f.getFullYear(),
|
|
5089
5092
|
className: y("w-full", {
|
|
5090
5093
|
"text-on-surface": L !== f.getFullYear()
|
|
@@ -5095,10 +5098,10 @@ const $t = ({
|
|
|
5095
5098
|
L
|
|
5096
5099
|
))
|
|
5097
5100
|
}
|
|
5098
|
-
) : /* @__PURE__ */ K(
|
|
5101
|
+
) : /* @__PURE__ */ K(ye, { children: [
|
|
5099
5102
|
/* @__PURE__ */ d("div", { className: Z.weekDays, children: Y.map((L, k) => /* @__PURE__ */ d("div", { className: Z.weekDay, children: L }, k)) }),
|
|
5100
5103
|
/* @__PURE__ */ d("div", { className: "overflow-hidden relative min-h-[240px]", children: /* @__PURE__ */ d(
|
|
5101
|
-
|
|
5104
|
+
pe,
|
|
5102
5105
|
{
|
|
5103
5106
|
mode: "popLayout",
|
|
5104
5107
|
initial: !1,
|
|
@@ -5116,7 +5119,7 @@ const $t = ({
|
|
|
5116
5119
|
children: S.map((L, k) => {
|
|
5117
5120
|
if (!L.isCurrentMonth)
|
|
5118
5121
|
return /* @__PURE__ */ d("div", { className: Z.dayCell }, k);
|
|
5119
|
-
const { isSelected: N, isStart:
|
|
5122
|
+
const { isSelected: N, isStart: A, isEnd: P, isInRange: X } = J(L.date), q = D(L.date), ee = s && L.date < s || r && L.date > r || (c == null ? void 0 : c(L.date));
|
|
5120
5123
|
return /* @__PURE__ */ d(
|
|
5121
5124
|
"div",
|
|
5122
5125
|
{
|
|
@@ -5124,11 +5127,11 @@ const $t = ({
|
|
|
5124
5127
|
Z.dayCell,
|
|
5125
5128
|
// Range background styles applied to the cell wrapper
|
|
5126
5129
|
X && "bg-primary/20",
|
|
5127
|
-
|
|
5128
|
-
|
|
5130
|
+
A && (R == null ? void 0 : R[1]) && "bg-gradient-to-r from-transparent to-primary/20",
|
|
5131
|
+
P && (R == null ? void 0 : R[0]) && "bg-gradient-to-l from-transparent to-primary/20"
|
|
5129
5132
|
),
|
|
5130
5133
|
children: /* @__PURE__ */ d(
|
|
5131
|
-
|
|
5134
|
+
Le,
|
|
5132
5135
|
{
|
|
5133
5136
|
className: () => ({
|
|
5134
5137
|
button: y("aspect-square h-[40px] p-0", {
|
|
@@ -5187,41 +5190,43 @@ const $t = ({
|
|
|
5187
5190
|
id: b,
|
|
5188
5191
|
style: g,
|
|
5189
5192
|
ref: O,
|
|
5190
|
-
...
|
|
5193
|
+
...R
|
|
5191
5194
|
}) => {
|
|
5192
|
-
const v =
|
|
5195
|
+
const v = Ee(), S = b || v, $ = `${S}-helper`, I = x !== void 0, [F, E] = V(w ?? ""), Y = I ? x : F, [z, te] = V(!1), [H, C] = V(!!(n != null && n.length)), D = j(null), T = O || D, J = j(null), Z = j(null), se = M ?? (!!(n != null && n.length) || !!(l != null && l.length));
|
|
5193
5196
|
_(() => {
|
|
5194
5197
|
C(!!(n != null && n.length));
|
|
5195
5198
|
}, [n]);
|
|
5196
5199
|
const L = () => {
|
|
5197
5200
|
T.current && !z && T.current.focus();
|
|
5198
|
-
}, k = () => {
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
const
|
|
5209
|
-
|
|
5201
|
+
}, k = (fe) => {
|
|
5202
|
+
var ge;
|
|
5203
|
+
te(!0), C(!1), (ge = R.onFocus) == null || ge.call(R, fe);
|
|
5204
|
+
}, N = (fe) => {
|
|
5205
|
+
const ge = fe.target.value;
|
|
5206
|
+
I || E(ge), C(!1), h && h(fe);
|
|
5207
|
+
}, A = (fe) => {
|
|
5208
|
+
var ge;
|
|
5209
|
+
te(!1), n != null && n.length && C(!0), (ge = R.onBlur) == null || ge.call(R, fe);
|
|
5210
|
+
}, P = m === "date", [X, q] = V(!1), [ee, W] = V(null), U = be(() => {
|
|
5211
|
+
const fe = String(Y);
|
|
5212
|
+
if (!fe) return null;
|
|
5213
|
+
const [ge, ze, Te] = fe.split("-").map(Number);
|
|
5214
|
+
return ge && ze && Te ? new Date(ge, ze - 1, Te) : null;
|
|
5210
5215
|
}, [Y]), ie = () => {
|
|
5211
|
-
t || (
|
|
5216
|
+
t || (W(U), q(!0));
|
|
5212
5217
|
}, de = () => {
|
|
5213
|
-
const
|
|
5214
|
-
I || E(
|
|
5218
|
+
const fe = ee ? ee.toLocaleDateString("en-CA") : "";
|
|
5219
|
+
I || E(fe), h && h({
|
|
5215
5220
|
target: {
|
|
5216
|
-
value:
|
|
5221
|
+
value: fe,
|
|
5217
5222
|
name: c,
|
|
5218
5223
|
type: m
|
|
5219
5224
|
}
|
|
5220
5225
|
}), q(!1);
|
|
5221
|
-
},
|
|
5226
|
+
}, ve = P && !o ? Yn : o, xe = P ? "[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer" : "", ce = Hn({
|
|
5222
5227
|
showSupportingText: se,
|
|
5223
5228
|
isFocused: z,
|
|
5224
|
-
showErrorIcon:
|
|
5229
|
+
showErrorIcon: H,
|
|
5225
5230
|
disabled: t,
|
|
5226
5231
|
name: c,
|
|
5227
5232
|
label: a,
|
|
@@ -5232,13 +5237,13 @@ const $t = ({
|
|
|
5232
5237
|
supportingText: l,
|
|
5233
5238
|
type: m,
|
|
5234
5239
|
leadingIcon: u,
|
|
5235
|
-
trailingIcon:
|
|
5240
|
+
trailingIcon: ve,
|
|
5236
5241
|
variant: e,
|
|
5237
5242
|
errorText: n,
|
|
5238
5243
|
value: String(Y),
|
|
5239
5244
|
suffix: r,
|
|
5240
5245
|
multiline: f
|
|
5241
|
-
}), G = f ? Xt : "input", ae = f ? {} : { type: m }, le = z || typeof Y == "string" && Y.length > 0 || m == "date",
|
|
5246
|
+
}), G = f ? Xt : "input", ae = f ? {} : { type: m }, le = z || typeof Y == "string" && Y.length > 0 || m == "date", we = le && e === "outlined", Ce = !we;
|
|
5242
5247
|
return /* @__PURE__ */ K("div", { ref: J, className: ce.textField, style: g, children: [
|
|
5243
5248
|
/* @__PURE__ */ K(
|
|
5244
5249
|
"fieldset",
|
|
@@ -5248,7 +5253,7 @@ const $t = ({
|
|
|
5248
5253
|
role: "presentation",
|
|
5249
5254
|
children: [
|
|
5250
5255
|
/* @__PURE__ */ d("div", { className: ce.stateLayer }),
|
|
5251
|
-
u && /* @__PURE__ */ d("div", { className: ce.leadingIcon, children: Q.isValidElement(u) ? u : /* @__PURE__ */ d(
|
|
5256
|
+
u && /* @__PURE__ */ d("div", { className: ce.leadingIcon, children: Q.isValidElement(u) ? u : /* @__PURE__ */ d(he, { className: "w-5 h-5", icon: u }) }),
|
|
5252
5257
|
/* @__PURE__ */ d(
|
|
5253
5258
|
ne.legend,
|
|
5254
5259
|
{
|
|
@@ -5257,15 +5262,15 @@ const $t = ({
|
|
|
5257
5262
|
hidden: { width: 0, padding: 0 },
|
|
5258
5263
|
visible: { width: "auto", padding: "0 8px" }
|
|
5259
5264
|
},
|
|
5260
|
-
initial:
|
|
5261
|
-
animate:
|
|
5265
|
+
initial: we ? "visible" : "hidden",
|
|
5266
|
+
animate: we ? "visible" : "hidden",
|
|
5262
5267
|
className: "max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",
|
|
5263
5268
|
transition: { duration: 0.2 },
|
|
5264
5269
|
children: /* @__PURE__ */ d("span", { className: "transform inline-flex -translate-y-1/2 opacity-0", children: a })
|
|
5265
5270
|
}
|
|
5266
5271
|
),
|
|
5267
5272
|
/* @__PURE__ */ K("div", { className: "flex-1 relative", children: [
|
|
5268
|
-
|
|
5273
|
+
Ce && /* @__PURE__ */ d(
|
|
5269
5274
|
ne.label,
|
|
5270
5275
|
{
|
|
5271
5276
|
htmlFor: S,
|
|
@@ -5281,7 +5286,7 @@ const $t = ({
|
|
|
5281
5286
|
children: /* @__PURE__ */ d("span", { className: ce.label, children: a })
|
|
5282
5287
|
}
|
|
5283
5288
|
),
|
|
5284
|
-
|
|
5289
|
+
we && /* @__PURE__ */ d(
|
|
5285
5290
|
ne.label,
|
|
5286
5291
|
{
|
|
5287
5292
|
htmlFor: S,
|
|
@@ -5297,58 +5302,56 @@ const $t = ({
|
|
|
5297
5302
|
/* @__PURE__ */ d(
|
|
5298
5303
|
G,
|
|
5299
5304
|
{
|
|
5305
|
+
...R,
|
|
5300
5306
|
ref: T,
|
|
5301
5307
|
value: Y,
|
|
5302
5308
|
onChange: N,
|
|
5303
|
-
className: y(ce.input,
|
|
5309
|
+
className: y(ce.input, xe),
|
|
5304
5310
|
id: S,
|
|
5305
5311
|
name: c,
|
|
5306
5312
|
placeholder: z ? s ?? void 0 : "",
|
|
5307
|
-
onFocus:
|
|
5308
|
-
|
|
5309
|
-
},
|
|
5310
|
-
onBlur: W,
|
|
5313
|
+
onFocus: k,
|
|
5314
|
+
onBlur: A,
|
|
5311
5315
|
disabled: t,
|
|
5312
5316
|
autoComplete: p,
|
|
5313
5317
|
"aria-invalid": !!(n != null && n.length),
|
|
5314
|
-
"aria-describedby": se ?
|
|
5315
|
-
...ae
|
|
5316
|
-
...A
|
|
5318
|
+
"aria-describedby": se ? $ : void 0,
|
|
5319
|
+
...ae
|
|
5317
5320
|
}
|
|
5318
5321
|
)
|
|
5319
5322
|
] }),
|
|
5320
5323
|
/* @__PURE__ */ d("div", { className: ce.activeIndicator }),
|
|
5321
|
-
!
|
|
5322
|
-
|
|
5324
|
+
!H && /* @__PURE__ */ K(ye, { children: [
|
|
5325
|
+
ve && /* @__PURE__ */ d(
|
|
5323
5326
|
"div",
|
|
5324
5327
|
{
|
|
5325
|
-
ref:
|
|
5326
|
-
onClick: (
|
|
5327
|
-
|
|
5328
|
+
ref: P ? Z : void 0,
|
|
5329
|
+
onClick: (fe) => {
|
|
5330
|
+
fe.stopPropagation(), P && ie();
|
|
5328
5331
|
},
|
|
5329
5332
|
className: y(
|
|
5330
5333
|
ce.trailingIcon,
|
|
5331
|
-
|
|
5334
|
+
P && "cursor-pointer"
|
|
5332
5335
|
),
|
|
5333
|
-
children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full h-full", children: Q.isValidElement(
|
|
5334
|
-
|
|
5336
|
+
children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center w-full h-full", children: Q.isValidElement(ve) ? ve : /* @__PURE__ */ d(
|
|
5337
|
+
he,
|
|
5335
5338
|
{
|
|
5336
5339
|
className: "h-5",
|
|
5337
|
-
icon:
|
|
5340
|
+
icon: ve
|
|
5338
5341
|
}
|
|
5339
5342
|
) })
|
|
5340
5343
|
}
|
|
5341
5344
|
),
|
|
5342
|
-
!
|
|
5345
|
+
!ve && r && /* @__PURE__ */ d("span", { className: ce.suffix, children: r })
|
|
5343
5346
|
] }),
|
|
5344
|
-
|
|
5347
|
+
H && /* @__PURE__ */ d(
|
|
5345
5348
|
"div",
|
|
5346
5349
|
{
|
|
5347
5350
|
className: y(ce.trailingIcon, {
|
|
5348
|
-
" absolute right-0": !
|
|
5351
|
+
" absolute right-0": !ve
|
|
5349
5352
|
}),
|
|
5350
5353
|
children: /* @__PURE__ */ d(
|
|
5351
|
-
|
|
5354
|
+
he,
|
|
5352
5355
|
{
|
|
5353
5356
|
className: "h-5 text-error",
|
|
5354
5357
|
icon: Xn
|
|
@@ -5359,8 +5362,8 @@ const $t = ({
|
|
|
5359
5362
|
]
|
|
5360
5363
|
}
|
|
5361
5364
|
),
|
|
5362
|
-
se && /* @__PURE__ */ d("p", { className: ce.supportingText, id:
|
|
5363
|
-
|
|
5365
|
+
se && /* @__PURE__ */ d("p", { className: ce.supportingText, id: $, children: n != null && n.length ? n : l != null && l.length ? l : " " }),
|
|
5366
|
+
P && X && /* @__PURE__ */ K(ye, { children: [
|
|
5364
5367
|
/* @__PURE__ */ d(
|
|
5365
5368
|
"div",
|
|
5366
5369
|
{
|
|
@@ -5374,12 +5377,12 @@ const $t = ({
|
|
|
5374
5377
|
{
|
|
5375
5378
|
className: "",
|
|
5376
5379
|
value: ee,
|
|
5377
|
-
onChange:
|
|
5380
|
+
onChange: W
|
|
5378
5381
|
}
|
|
5379
5382
|
),
|
|
5380
5383
|
/* @__PURE__ */ K("div", { className: "flex justify-end gap-2 p-4 pt-0", children: [
|
|
5381
5384
|
/* @__PURE__ */ d(
|
|
5382
|
-
|
|
5385
|
+
Le,
|
|
5383
5386
|
{
|
|
5384
5387
|
variant: "text",
|
|
5385
5388
|
size: "small",
|
|
@@ -5388,7 +5391,7 @@ const $t = ({
|
|
|
5388
5391
|
}
|
|
5389
5392
|
),
|
|
5390
5393
|
/* @__PURE__ */ d(
|
|
5391
|
-
|
|
5394
|
+
Le,
|
|
5392
5395
|
{
|
|
5393
5396
|
variant: "filled",
|
|
5394
5397
|
size: "small",
|
|
@@ -5457,7 +5460,7 @@ const $t = ({
|
|
|
5457
5460
|
...b
|
|
5458
5461
|
}) => {
|
|
5459
5462
|
M && (n = M);
|
|
5460
|
-
const g = j(null), O = m || g, [
|
|
5463
|
+
const g = j(null), O = m || g, [R, v] = V(u);
|
|
5461
5464
|
_(() => {
|
|
5462
5465
|
u && a == null ? v(!0) : v(a == l && l != null);
|
|
5463
5466
|
}, [a]), _(() => {
|
|
@@ -5468,7 +5471,7 @@ const $t = ({
|
|
|
5468
5471
|
icon: c
|
|
5469
5472
|
});
|
|
5470
5473
|
}, [a]);
|
|
5471
|
-
const S = r ? "a" : "button",
|
|
5474
|
+
const S = r ? "a" : "button", $ = (F) => {
|
|
5472
5475
|
i && i(l ?? null), t && t(F);
|
|
5473
5476
|
}, I = lr({
|
|
5474
5477
|
isExtended: p,
|
|
@@ -5478,11 +5481,11 @@ const $t = ({
|
|
|
5478
5481
|
selectedItem: a,
|
|
5479
5482
|
index: l,
|
|
5480
5483
|
transition: f,
|
|
5481
|
-
selected:
|
|
5484
|
+
selected: R,
|
|
5482
5485
|
variant: s,
|
|
5483
5486
|
icon: c,
|
|
5484
5487
|
label: n,
|
|
5485
|
-
isSelected:
|
|
5488
|
+
isSelected: R,
|
|
5486
5489
|
setSelectedItem: i,
|
|
5487
5490
|
href: r,
|
|
5488
5491
|
children: n,
|
|
@@ -5496,11 +5499,11 @@ const $t = ({
|
|
|
5496
5499
|
{
|
|
5497
5500
|
...b,
|
|
5498
5501
|
role: "tab",
|
|
5499
|
-
"aria-selected":
|
|
5502
|
+
"aria-selected": R,
|
|
5500
5503
|
ref: O,
|
|
5501
5504
|
href: r,
|
|
5502
5505
|
className: I.navigationRailItem,
|
|
5503
|
-
onClick:
|
|
5506
|
+
onClick: $,
|
|
5504
5507
|
style: { transition: f.duration + "s", ...x },
|
|
5505
5508
|
children: [
|
|
5506
5509
|
/* @__PURE__ */ K(
|
|
@@ -5513,25 +5516,25 @@ const $t = ({
|
|
|
5513
5516
|
className: I.container,
|
|
5514
5517
|
children: [
|
|
5515
5518
|
/* @__PURE__ */ d(
|
|
5516
|
-
|
|
5519
|
+
Ne,
|
|
5517
5520
|
{
|
|
5518
5521
|
style: { transition: f.duration + "s" },
|
|
5519
5522
|
className: I.stateLayer,
|
|
5520
5523
|
colorName: y({
|
|
5521
|
-
"on-surface": !
|
|
5522
|
-
"on-secondary-container":
|
|
5524
|
+
"on-surface": !R,
|
|
5525
|
+
"on-secondary-container": R
|
|
5523
5526
|
}),
|
|
5524
5527
|
stateClassName: "state-ripple-group-[navigation-rail-item]"
|
|
5525
5528
|
}
|
|
5526
5529
|
),
|
|
5527
5530
|
c && /* @__PURE__ */ d(
|
|
5528
|
-
|
|
5531
|
+
he,
|
|
5529
5532
|
{
|
|
5530
|
-
icon:
|
|
5533
|
+
icon: R ? h : c,
|
|
5531
5534
|
className: I.icon
|
|
5532
5535
|
}
|
|
5533
5536
|
),
|
|
5534
|
-
/* @__PURE__ */ d(
|
|
5537
|
+
/* @__PURE__ */ d(pe, { children: s == "horizontal" && (() => {
|
|
5535
5538
|
const F = {
|
|
5536
5539
|
width: 0,
|
|
5537
5540
|
opacity: 0,
|
|
@@ -5563,7 +5566,7 @@ const $t = ({
|
|
|
5563
5566
|
]
|
|
5564
5567
|
}
|
|
5565
5568
|
),
|
|
5566
|
-
/* @__PURE__ */ d(
|
|
5569
|
+
/* @__PURE__ */ d(pe, { children: s == "vertical" && (() => {
|
|
5567
5570
|
const F = {
|
|
5568
5571
|
height: 0,
|
|
5569
5572
|
opacity: 0,
|
|
@@ -5651,11 +5654,11 @@ const $t = ({
|
|
|
5651
5654
|
function O(I) {
|
|
5652
5655
|
const F = [];
|
|
5653
5656
|
return Bt.forEach(I, (E) => {
|
|
5654
|
-
|
|
5657
|
+
Ie(E) && E.type === Ht ? F.push(...O(E.props.children)) : F.push(E);
|
|
5655
5658
|
}), F;
|
|
5656
5659
|
}
|
|
5657
|
-
const
|
|
5658
|
-
(I) =>
|
|
5660
|
+
const R = O(n), v = R.filter(
|
|
5661
|
+
(I) => Ie(I) && I.type === Be
|
|
5659
5662
|
), S = dr({
|
|
5660
5663
|
children: n,
|
|
5661
5664
|
onItemSelected: t,
|
|
@@ -5671,8 +5674,8 @@ const $t = ({
|
|
|
5671
5674
|
onExtendedChange: o
|
|
5672
5675
|
});
|
|
5673
5676
|
u = { duration: 0.3, ...u };
|
|
5674
|
-
const
|
|
5675
|
-
return
|
|
5677
|
+
const $ = j(!1);
|
|
5678
|
+
return $.current = !1, _(() => {
|
|
5676
5679
|
o == null || o(h ?? !1);
|
|
5677
5680
|
}, [h]), /* @__PURE__ */ K(
|
|
5678
5681
|
"div",
|
|
@@ -5683,7 +5686,7 @@ const $t = ({
|
|
|
5683
5686
|
children: [
|
|
5684
5687
|
/* @__PURE__ */ K("div", { className: S.header, children: [
|
|
5685
5688
|
/* @__PURE__ */ d(
|
|
5686
|
-
|
|
5689
|
+
Me,
|
|
5687
5690
|
{
|
|
5688
5691
|
onClick: () => x(!h),
|
|
5689
5692
|
label: h ? i == null ? void 0 : i.opened.label : i == null ? void 0 : i.closed.label,
|
|
@@ -5699,7 +5702,7 @@ const $t = ({
|
|
|
5699
5702
|
] }),
|
|
5700
5703
|
/* @__PURE__ */ d("div", { className: S.segments, children: (() => {
|
|
5701
5704
|
let I = 0;
|
|
5702
|
-
return
|
|
5705
|
+
return R.map((F) => Ie(F) && F.type === cr ? Re(
|
|
5703
5706
|
F,
|
|
5704
5707
|
{
|
|
5705
5708
|
key: I,
|
|
@@ -5710,10 +5713,10 @@ const $t = ({
|
|
|
5710
5713
|
setSelectedItem: M,
|
|
5711
5714
|
onItemSelected: g,
|
|
5712
5715
|
transition: u,
|
|
5713
|
-
extendedOnly:
|
|
5716
|
+
extendedOnly: $.current,
|
|
5714
5717
|
isExtended: h
|
|
5715
5718
|
}
|
|
5716
|
-
) :
|
|
5719
|
+
) : Ie(F) && F.type === Be ? null : Ie(F) && F.type === ar ? ($.current = !0, h ? Re(F, {}) : null) : F);
|
|
5717
5720
|
})() }),
|
|
5718
5721
|
/* @__PURE__ */ d("div", { className: "flex-1 max-h-[160px]" })
|
|
5719
5722
|
]
|
|
@@ -5730,7 +5733,7 @@ function cs(e) {
|
|
|
5730
5733
|
export {
|
|
5731
5734
|
it as AnchorPositioner,
|
|
5732
5735
|
kr as AnimateOnScrollInit,
|
|
5733
|
-
|
|
5736
|
+
Le as Button,
|
|
5734
5737
|
Kr as Card,
|
|
5735
5738
|
Gr as Carousel,
|
|
5736
5739
|
Tn as CarouselItem,
|
|
@@ -5742,8 +5745,8 @@ export {
|
|
|
5742
5745
|
Dt as Divider,
|
|
5743
5746
|
Be as Fab,
|
|
5744
5747
|
Qr as FabMenu,
|
|
5745
|
-
|
|
5746
|
-
|
|
5748
|
+
he as Icon,
|
|
5749
|
+
Me as IconButton,
|
|
5747
5750
|
as as NavigationRail,
|
|
5748
5751
|
cr as NavigationRailItem,
|
|
5749
5752
|
ar as NavigationRailSection,
|
|
@@ -5753,7 +5756,7 @@ export {
|
|
|
5753
5756
|
es as Slider,
|
|
5754
5757
|
Nr as SmoothScroll,
|
|
5755
5758
|
ns as Snackbar,
|
|
5756
|
-
|
|
5759
|
+
Ne as State,
|
|
5757
5760
|
rs as Switch,
|
|
5758
5761
|
un as SyncedFixedWrapper,
|
|
5759
5762
|
tr as Tab,
|
|
@@ -5782,11 +5785,11 @@ export {
|
|
|
5782
5785
|
Ar as dividerStyle,
|
|
5783
5786
|
Br as fabMenuStyle,
|
|
5784
5787
|
Fr as fabStyle,
|
|
5785
|
-
|
|
5786
|
-
|
|
5788
|
+
He as getClassNames,
|
|
5789
|
+
Hr as iconButtonStyle,
|
|
5787
5790
|
ot as initAnimateOnScroll,
|
|
5788
|
-
|
|
5789
|
-
|
|
5791
|
+
ke as normalize,
|
|
5792
|
+
Pr as progressIndicatorStyle,
|
|
5790
5793
|
wt as sideSheetConfig,
|
|
5791
5794
|
Cn as sideSheetStyle,
|
|
5792
5795
|
bt as sliderConfig,
|
|
@@ -5821,7 +5824,7 @@ export {
|
|
|
5821
5824
|
Fn as useTabPanelsStyle,
|
|
5822
5825
|
Wn as useTabStyle,
|
|
5823
5826
|
An as useTabsStyle,
|
|
5824
|
-
|
|
5825
|
-
|
|
5827
|
+
Hn as useTextFieldStyle,
|
|
5828
|
+
Pn as useToolTipStyle,
|
|
5826
5829
|
er as useTooltipTrigger
|
|
5827
5830
|
};
|