@udixio/ui-react 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1188 -1184
- package/dist/lib/components/FabMenu.d.ts +1 -1
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/styles/fab.style.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/FabMenu.tsx +3 -3
- package/src/lib/styles/fab.style.ts +13 -9
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as m, jsxs as X, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as He } from "clsx";
|
|
3
3
|
import { extendTailwindMerge as ut } from "tailwind-merge";
|
|
4
|
-
import Z, { useMemo as Me, useState as
|
|
5
|
-
import { motion as q, AnimatePresence as
|
|
4
|
+
import Z, { useMemo as Me, useState as R, useEffect as $, useRef as D, useLayoutEffect as Xe, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
|
|
5
|
+
import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as We, animate as ht } from "motion/react";
|
|
6
6
|
import { animate as pt } from "motion";
|
|
7
7
|
import { createPortal as Ue } from "react-dom";
|
|
8
8
|
import { loader as yt, defineConfig as wt, FontPlugin as vt, Variants as xt } from "@udixio/theme";
|
|
@@ -41,22 +41,22 @@ function Lt(e) {
|
|
|
41
41
|
const $e = (e) => {
|
|
42
42
|
const t = {};
|
|
43
43
|
e.classNameList.forEach((a) => {
|
|
44
|
-
var
|
|
44
|
+
var r;
|
|
45
45
|
if (a)
|
|
46
46
|
if (typeof a == "string")
|
|
47
|
-
(t[
|
|
47
|
+
(t[r = e.default] ?? (t[r] = [])).push(a);
|
|
48
48
|
else {
|
|
49
|
-
const
|
|
50
|
-
Object.entries(
|
|
51
|
-
const [
|
|
52
|
-
(t[
|
|
49
|
+
const s = a(e.states);
|
|
50
|
+
Object.entries(s).map((c) => {
|
|
51
|
+
const [l, i] = c;
|
|
52
|
+
(t[l] ?? (t[l] = [])).push(i);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const n = t;
|
|
57
57
|
return Object.entries(t).map((a) => {
|
|
58
|
-
let [
|
|
59
|
-
|
|
58
|
+
let [r, s] = a;
|
|
59
|
+
s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] = gt(...s);
|
|
60
60
|
}), n;
|
|
61
61
|
}, Q = (e, t) => (n) => $e({
|
|
62
62
|
classNameList: [n.className, t],
|
|
@@ -85,60 +85,60 @@ const qe = ({
|
|
|
85
85
|
disableTextMargins: t,
|
|
86
86
|
disabled: n,
|
|
87
87
|
iconPosition: a,
|
|
88
|
-
icon:
|
|
89
|
-
isActive:
|
|
90
|
-
loading:
|
|
91
|
-
shape:
|
|
92
|
-
onToggle:
|
|
93
|
-
size:
|
|
88
|
+
icon: r,
|
|
89
|
+
isActive: s,
|
|
90
|
+
loading: c,
|
|
91
|
+
shape: l,
|
|
92
|
+
onToggle: i,
|
|
93
|
+
size: o,
|
|
94
94
|
allowShapeTransformation: h
|
|
95
95
|
}) => ({
|
|
96
96
|
button: p(
|
|
97
97
|
" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"rounded-[30px]":
|
|
105
|
-
"rounded-[40px]":
|
|
106
|
-
"rounded-[70px]":
|
|
98
|
+
o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
|
|
99
|
+
o === "small" && "text-label-large px-4 py-2.5 gap-2",
|
|
100
|
+
o === "medium" && "text-title-medium px-6 py-4 gap-2",
|
|
101
|
+
o === "large" && "text-headline-small px-12 py-8 gap-3",
|
|
102
|
+
o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
|
|
103
|
+
l === "rounded" && {
|
|
104
|
+
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
105
|
+
"rounded-[40px]": o === "medium",
|
|
106
|
+
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
107
107
|
},
|
|
108
|
-
(
|
|
109
|
-
"rounded-[12px]":
|
|
110
|
-
"rounded-[16px]":
|
|
111
|
-
"rounded-[28px]":
|
|
108
|
+
(l === "squared" || h && s) && {
|
|
109
|
+
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
110
|
+
"rounded-[16px]": o === "medium",
|
|
111
|
+
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
112
112
|
},
|
|
113
113
|
h && !n && {
|
|
114
|
-
"active:rounded-[12px]":
|
|
115
|
-
"active:rounded-[16px]":
|
|
116
|
-
"active:rounded-[28px]":
|
|
114
|
+
"active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
115
|
+
"active:rounded-[16px]": o === "medium",
|
|
116
|
+
"active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
117
117
|
},
|
|
118
118
|
e === "elevated" && {
|
|
119
119
|
"shadow-1 hover:shadow-2": !n,
|
|
120
|
-
"bg-surface-container-low text-primary": !n && !
|
|
121
|
-
"bg-primary text-on-primary": !n &&
|
|
120
|
+
"bg-surface-container-low text-primary": !n && !s,
|
|
121
|
+
"bg-primary text-on-primary": !n && s,
|
|
122
122
|
"text-on-surface/[38%]": n
|
|
123
123
|
},
|
|
124
124
|
e === "filled" && {
|
|
125
125
|
"hover:shadow-1": !n,
|
|
126
|
-
"bg-surface-container text-on-surface-variant": !n && !
|
|
127
|
-
"bg-primary text-on-primary": !n && (
|
|
126
|
+
"bg-surface-container text-on-surface-variant": !n && !s && i,
|
|
127
|
+
"bg-primary text-on-primary": !n && (s && i || !i),
|
|
128
128
|
"text-on-surface/[38%]": n
|
|
129
129
|
},
|
|
130
130
|
e === "tonal" && {
|
|
131
131
|
"hover:shadow-1": !n,
|
|
132
|
-
"bg-secondary-container text-on-secondary-container": !n && !
|
|
133
|
-
"bg-secondary text-on-secondary": !n &&
|
|
132
|
+
"bg-secondary-container text-on-secondary-container": !n && !s,
|
|
133
|
+
"bg-secondary text-on-secondary": !n && s,
|
|
134
134
|
"text-on-surface/[0.38]": n
|
|
135
135
|
},
|
|
136
136
|
e === "outlined" && [
|
|
137
137
|
" border",
|
|
138
138
|
{
|
|
139
139
|
"border-on-surface/[0.12] text-on-surface/[0.38]": n,
|
|
140
|
-
"text-primary border-outline focus:border-primary": !n && !
|
|
141
|
-
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n &&
|
|
140
|
+
"text-primary border-outline focus:border-primary": !n && !s,
|
|
141
|
+
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n && s
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
144
|
e === "text" && [
|
|
@@ -148,11 +148,11 @@ const qe = ({
|
|
|
148
148
|
"text-on-surface/[0.38]": n
|
|
149
149
|
},
|
|
150
150
|
t && [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
o === "xSmall" && "-mx-3 ",
|
|
152
|
+
o === "small" && "-mx-4 ",
|
|
153
|
+
o === "medium" && "-mx-6 ",
|
|
154
|
+
o === "large" && "-mx-12",
|
|
155
|
+
o === "xLarge" && "-mx-16 "
|
|
156
156
|
// size === 'small' && ' -my-2.5',
|
|
157
157
|
// size === 'medium' && ' -my-4',
|
|
158
158
|
// size === 'large' && '-my-8',
|
|
@@ -166,30 +166,30 @@ const qe = ({
|
|
|
166
166
|
),
|
|
167
167
|
stateLayer: p(
|
|
168
168
|
"overflow-hidden",
|
|
169
|
-
|
|
170
|
-
"rounded-[30px]":
|
|
171
|
-
"rounded-[40px]":
|
|
172
|
-
"rounded-[70px]":
|
|
169
|
+
l === "rounded" && {
|
|
170
|
+
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
171
|
+
"rounded-[40px]": o === "medium",
|
|
172
|
+
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
173
173
|
},
|
|
174
|
-
(
|
|
175
|
-
"rounded-[12px]":
|
|
176
|
-
"rounded-[16px]":
|
|
177
|
-
"rounded-[28px]":
|
|
174
|
+
(l === "squared" || h && s) && {
|
|
175
|
+
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
176
|
+
"rounded-[16px]": o === "medium",
|
|
177
|
+
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
178
178
|
},
|
|
179
179
|
h && !n && {
|
|
180
|
-
"group-active/button:rounded-[12px]":
|
|
181
|
-
"group-active/button:rounded-[16px]":
|
|
182
|
-
"group-active/button:rounded-[28px]":
|
|
180
|
+
"group-active/button:rounded-[12px]": o === "xSmall" || o == "small",
|
|
181
|
+
"group-active/button:rounded-[16px]": o === "medium",
|
|
182
|
+
"group-active/button:rounded-[28px]": o === "large" || o == "xLarge"
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
label: p({ invisible:
|
|
185
|
+
label: p({ invisible: c }),
|
|
186
186
|
icon: p(
|
|
187
|
-
{ invisible:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
187
|
+
{ invisible: c },
|
|
188
|
+
o === "xSmall" && "size-5",
|
|
189
|
+
o === "small" && "size-5",
|
|
190
|
+
o === "medium" && "size-6",
|
|
191
|
+
o === "large" && "size-8",
|
|
192
|
+
o === "xLarge" && "size-10"
|
|
193
193
|
)
|
|
194
194
|
}), $n = Q(
|
|
195
195
|
"button",
|
|
@@ -258,14 +258,14 @@ const qe = ({
|
|
|
258
258
|
fab: p(
|
|
259
259
|
"flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",
|
|
260
260
|
{
|
|
261
|
-
"rounded-[12px]": e == "small"
|
|
262
|
-
"rounded-[16px]": e == "medium"
|
|
263
|
-
"rounded-[28px]": e == "large"
|
|
261
|
+
"rounded-[12px]": e == "small",
|
|
262
|
+
"rounded-[16px]": e == "medium",
|
|
263
|
+
"rounded-[28px]": e == "large"
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
|
-
"p-2": e == "small"
|
|
267
|
-
"p-4": e == "medium"
|
|
268
|
-
"p-[30px]": e == "large"
|
|
266
|
+
"p-2": e == "small",
|
|
267
|
+
"p-4": e == "medium",
|
|
268
|
+
"p-[30px]": e == "large"
|
|
269
269
|
},
|
|
270
270
|
t === "primary" && "bg-primary text-on-primary",
|
|
271
271
|
t === "secondary" && "bg-secondary text-on-secondary",
|
|
@@ -275,10 +275,14 @@ const qe = ({
|
|
|
275
275
|
t === "tertiaryContainer" && "bg-tertiary-container text-on-tertiary-container"
|
|
276
276
|
),
|
|
277
277
|
icon: p({
|
|
278
|
-
"size-6": e == "small" || e == "medium"
|
|
279
|
-
"size-9": e == "large"
|
|
278
|
+
"size-6": e == "small" || e == "medium",
|
|
279
|
+
"size-9": e == "large"
|
|
280
280
|
}),
|
|
281
|
-
label: p("text-
|
|
281
|
+
label: p("text-nowrap", {
|
|
282
|
+
"text-title-medium": e == "small",
|
|
283
|
+
"text-title-large": e == "medium",
|
|
284
|
+
"text-headline-small": e == "large"
|
|
285
|
+
})
|
|
282
286
|
}), An = Q("fab", Ze), Ct = J("fab", Ze), Qe = ({
|
|
283
287
|
size: e,
|
|
284
288
|
variant: t,
|
|
@@ -299,10 +303,10 @@ const qe = ({
|
|
|
299
303
|
disabled: t,
|
|
300
304
|
onToggle: n,
|
|
301
305
|
isActive: a,
|
|
302
|
-
size:
|
|
303
|
-
width:
|
|
304
|
-
shape:
|
|
305
|
-
allowShapeTransformation:
|
|
306
|
+
size: r,
|
|
307
|
+
width: s,
|
|
308
|
+
shape: c,
|
|
309
|
+
allowShapeTransformation: l
|
|
306
310
|
}) => ({
|
|
307
311
|
iconButton: p(
|
|
308
312
|
"rounded-full relative flex transition-all duration-300",
|
|
@@ -310,20 +314,20 @@ const qe = ({
|
|
|
310
314
|
{
|
|
311
315
|
"cursor-default": t
|
|
312
316
|
},
|
|
313
|
-
|
|
314
|
-
"rounded-[30px]":
|
|
315
|
-
"rounded-[40px]":
|
|
316
|
-
"rounded-[70px]":
|
|
317
|
+
c === "rounded" && {
|
|
318
|
+
"rounded-[30px]": r === "xSmall" || r == "small",
|
|
319
|
+
"rounded-[40px]": r === "medium",
|
|
320
|
+
"rounded-[70px]": r === "large" || r == "xLarge"
|
|
317
321
|
},
|
|
318
|
-
(
|
|
319
|
-
"rounded-[12px]":
|
|
320
|
-
"rounded-[16px]":
|
|
321
|
-
"rounded-[28px]":
|
|
322
|
+
(c === "squared" || l && a) && {
|
|
323
|
+
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
324
|
+
"rounded-[16px]": r === "medium",
|
|
325
|
+
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
322
326
|
},
|
|
323
|
-
|
|
324
|
-
"active:rounded-[12px]":
|
|
325
|
-
"active:rounded-[16px]":
|
|
326
|
-
"active:rounded-[28px]":
|
|
327
|
+
l && !t && {
|
|
328
|
+
"active:rounded-[12px]": r === "xSmall" || r == "small",
|
|
329
|
+
"active:rounded-[16px]": r === "medium",
|
|
330
|
+
"active:rounded-[28px]": r === "large" || r == "xLarge"
|
|
327
331
|
},
|
|
328
332
|
e === "filled" && [
|
|
329
333
|
!t && {
|
|
@@ -355,20 +359,20 @@ const qe = ({
|
|
|
355
359
|
),
|
|
356
360
|
stateLayer: p(
|
|
357
361
|
"absolute top-0 left-0 h-full w-full overflow-hidden",
|
|
358
|
-
(
|
|
359
|
-
"rounded-[30px]":
|
|
360
|
-
"rounded-[40px]":
|
|
361
|
-
"rounded-[70px]":
|
|
362
|
+
(c === "rounded" || c === "squared" && n && !t && a && l) && {
|
|
363
|
+
"rounded-[30px]": r === "xSmall" || r == "small",
|
|
364
|
+
"rounded-[40px]": r === "medium",
|
|
365
|
+
"rounded-[70px]": r === "large" || r == "xLarge"
|
|
362
366
|
},
|
|
363
|
-
(
|
|
364
|
-
"rounded-[12px]":
|
|
365
|
-
"rounded-[16px]":
|
|
366
|
-
"rounded-[28px]":
|
|
367
|
+
(c === "squared" || c === "rounded" && n && !t && a && l) && {
|
|
368
|
+
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
369
|
+
"rounded-[16px]": r === "medium",
|
|
370
|
+
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
367
371
|
},
|
|
368
|
-
|
|
369
|
-
"group-active/icon-button:rounded-[12px]":
|
|
370
|
-
"group-active/icon-button:rounded-[16px]":
|
|
371
|
-
"group-active/icon-button:rounded-[28px]":
|
|
372
|
+
l && !t && {
|
|
373
|
+
"group-active/icon-button:rounded-[12px]": r === "xSmall" || r == "small",
|
|
374
|
+
"group-active/icon-button:rounded-[16px]": r === "medium",
|
|
375
|
+
"group-active/icon-button:rounded-[28px]": r === "large" || r == "xLarge"
|
|
372
376
|
},
|
|
373
377
|
!t && [
|
|
374
378
|
e === "standard" && {
|
|
@@ -391,24 +395,24 @@ const qe = ({
|
|
|
391
395
|
),
|
|
392
396
|
icon: p(
|
|
393
397
|
" transition-all duration-300",
|
|
394
|
-
{ "size-5 p-1.5":
|
|
395
|
-
{ "size-6 p-2":
|
|
396
|
-
{ "size-6 p-4":
|
|
397
|
-
{ "size-8 p-8":
|
|
398
|
-
{ "size-10 p-12":
|
|
399
|
-
|
|
400
|
-
{ "px-1":
|
|
401
|
-
{ "px-1":
|
|
402
|
-
{ "px-3":
|
|
403
|
-
{ "px-4":
|
|
404
|
-
{ "px-8":
|
|
398
|
+
{ "size-5 p-1.5": r === "xSmall" },
|
|
399
|
+
{ "size-6 p-2": r === "small" },
|
|
400
|
+
{ "size-6 p-4": r === "medium" },
|
|
401
|
+
{ "size-8 p-8": r === "large" },
|
|
402
|
+
{ "size-10 p-12": r === "xLarge" },
|
|
403
|
+
s == "narrow" && [
|
|
404
|
+
{ "px-1": r === "xSmall" },
|
|
405
|
+
{ "px-1": r === "small" },
|
|
406
|
+
{ "px-3": r === "medium" },
|
|
407
|
+
{ "px-4": r === "large" },
|
|
408
|
+
{ "px-8": r === "xLarge" }
|
|
405
409
|
],
|
|
406
|
-
|
|
407
|
-
{ "px-2.5":
|
|
408
|
-
{ "px-3.5":
|
|
409
|
-
{ "px-6":
|
|
410
|
-
{ "px-12":
|
|
411
|
-
{ "px-[72px]":
|
|
410
|
+
s == "wide" && [
|
|
411
|
+
{ "px-2.5": r === "xSmall" },
|
|
412
|
+
{ "px-3.5": r === "small" },
|
|
413
|
+
{ "px-6": r === "medium" },
|
|
414
|
+
{ "px-12": r === "large" },
|
|
415
|
+
{ "px-[72px]": r === "xLarge" }
|
|
412
416
|
],
|
|
413
417
|
!t && [
|
|
414
418
|
e === "standard" && {
|
|
@@ -659,28 +663,28 @@ const qe = ({
|
|
|
659
663
|
}), jn = Q("tabs", at), Ft = J(
|
|
660
664
|
"tabs",
|
|
661
665
|
at
|
|
662
|
-
),
|
|
666
|
+
), lt = ({
|
|
663
667
|
disabled: e,
|
|
664
668
|
leadingIcon: t,
|
|
665
669
|
trailingIcon: n,
|
|
666
670
|
variant: a,
|
|
667
|
-
errorText:
|
|
668
|
-
isFocused:
|
|
669
|
-
value:
|
|
670
|
-
suffix:
|
|
671
|
-
textLine:
|
|
671
|
+
errorText: r,
|
|
672
|
+
isFocused: s,
|
|
673
|
+
value: c,
|
|
674
|
+
suffix: l,
|
|
675
|
+
textLine: i
|
|
672
676
|
}) => ({
|
|
673
677
|
textField: p({
|
|
674
678
|
"opacity-[.38]": e
|
|
675
679
|
}),
|
|
676
680
|
content: p(
|
|
677
681
|
"group/text-field transition-border duration-200 relative flex items-center ",
|
|
678
|
-
{ "h-14":
|
|
682
|
+
{ "h-14": i == "singleLine" },
|
|
679
683
|
{
|
|
680
|
-
"border-on-surface-variant": !(
|
|
681
|
-
"border-outline": !(
|
|
682
|
-
"border-primary": !(
|
|
683
|
-
"border-error": !!(
|
|
684
|
+
"border-on-surface-variant": !(r != null && r.length) && !s && a == "filled",
|
|
685
|
+
"border-outline": !(r != null && r.length) && !s && a == "outlined",
|
|
686
|
+
"border-primary": !(r != null && r.length) && s,
|
|
687
|
+
"border-error": !!(r != null && r.length)
|
|
684
688
|
},
|
|
685
689
|
{ "bg-on-surface/[0.04]": e },
|
|
686
690
|
a == "filled" && [
|
|
@@ -690,7 +694,7 @@ const qe = ({
|
|
|
690
694
|
a == "outlined" && [
|
|
691
695
|
"border rounded box-border",
|
|
692
696
|
{
|
|
693
|
-
"border-[3px]":
|
|
697
|
+
"border-[3px]": s
|
|
694
698
|
}
|
|
695
699
|
]
|
|
696
700
|
),
|
|
@@ -701,15 +705,15 @@ const qe = ({
|
|
|
701
705
|
},
|
|
702
706
|
{
|
|
703
707
|
"group-state-on-surface": !e,
|
|
704
|
-
"focus-state-on-surface":
|
|
708
|
+
"focus-state-on-surface": s
|
|
705
709
|
}
|
|
706
710
|
),
|
|
707
711
|
label: p(
|
|
708
712
|
"inline-flex outline-none whitespace-nowrap",
|
|
709
|
-
{ "text-on-surface-variant": !e && !(
|
|
713
|
+
{ "text-on-surface-variant": !e && !(r != null && r.length) },
|
|
710
714
|
{ "text-on-surface": e },
|
|
711
|
-
{ "text-error": !!(
|
|
712
|
-
{ "text-primary": !(
|
|
715
|
+
{ "text-error": !!(r != null && r.length) },
|
|
716
|
+
{ "text-primary": !(r != null && r.length) && s }
|
|
713
717
|
),
|
|
714
718
|
input: p(
|
|
715
719
|
"w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
|
|
@@ -718,7 +722,7 @@ const qe = ({
|
|
|
718
722
|
"placeholder:text-on-surface text-on-surface": e
|
|
719
723
|
},
|
|
720
724
|
{
|
|
721
|
-
"pr-0": !!
|
|
725
|
+
"pr-0": !!l
|
|
722
726
|
},
|
|
723
727
|
a == "filled" && " pb-2 pt-6",
|
|
724
728
|
a == "outlined" && "py-4 relative z-10"
|
|
@@ -727,17 +731,17 @@ const qe = ({
|
|
|
727
731
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
728
732
|
a == "filled" && [
|
|
729
733
|
"h-[2px] transition-all duration-300",
|
|
730
|
-
{ "bg-primary": !(
|
|
731
|
-
{ "bg-error": !!(
|
|
732
|
-
{ "!w-full":
|
|
734
|
+
{ "bg-primary": !(r != null && r.length) },
|
|
735
|
+
{ "bg-error": !!(r != null && r.length) },
|
|
736
|
+
{ "!w-full": s }
|
|
733
737
|
]
|
|
734
738
|
),
|
|
735
739
|
supportingText: p(
|
|
736
740
|
" text-body-small px-4 pt-1",
|
|
737
|
-
{ "text-on-surface-variant": !e && !(
|
|
741
|
+
{ "text-on-surface-variant": !e && !(r != null && r.length) },
|
|
738
742
|
{ "text-on-surface": e },
|
|
739
|
-
{ "!w-full":
|
|
740
|
-
{ "text-error": !!(
|
|
743
|
+
{ "!w-full": s },
|
|
744
|
+
{ "text-error": !!(r != null && r.length) }
|
|
741
745
|
),
|
|
742
746
|
leadingIcon: p([
|
|
743
747
|
"h-12 ml-3 flex items-center justify-center",
|
|
@@ -753,11 +757,11 @@ const qe = ({
|
|
|
753
757
|
)
|
|
754
758
|
}), qn = Q(
|
|
755
759
|
"textField",
|
|
756
|
-
|
|
760
|
+
lt
|
|
757
761
|
), Ot = J(
|
|
758
762
|
"textField",
|
|
759
|
-
|
|
760
|
-
),
|
|
763
|
+
lt
|
|
764
|
+
), st = ({
|
|
761
765
|
position: e,
|
|
762
766
|
variant: t
|
|
763
767
|
}) => ({
|
|
@@ -784,17 +788,17 @@ const qe = ({
|
|
|
784
788
|
supportingText: p("")
|
|
785
789
|
}), _n = Q(
|
|
786
790
|
"toolTip",
|
|
787
|
-
|
|
791
|
+
st
|
|
788
792
|
), Vt = J(
|
|
789
793
|
"toolTip",
|
|
790
|
-
|
|
794
|
+
st
|
|
791
795
|
), ie = ({ icon: e, colors: t = [], className: n }) => {
|
|
792
796
|
if (typeof e == "string") {
|
|
793
|
-
let
|
|
794
|
-
return t[0] && (
|
|
797
|
+
let o = e;
|
|
798
|
+
return t[0] && (o = o.replace(
|
|
795
799
|
/<svg([^>]*)>/,
|
|
796
800
|
`<svg$1 fill="${t[0]}" color="${t[0]}">`
|
|
797
|
-
),
|
|
801
|
+
), o = o.replace(
|
|
798
802
|
/<path([^>]*?)>/g,
|
|
799
803
|
'<path$1 fill="currentColor">'
|
|
800
804
|
)), /* @__PURE__ */ m(
|
|
@@ -805,18 +809,18 @@ const qe = ({
|
|
|
805
809
|
n
|
|
806
810
|
),
|
|
807
811
|
style: { color: t[0] || "inherit" },
|
|
808
|
-
dangerouslySetInnerHTML: { __html:
|
|
812
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
809
813
|
}
|
|
810
814
|
);
|
|
811
815
|
}
|
|
812
816
|
if (e && typeof e == "object" && "src" in e) {
|
|
813
|
-
const
|
|
817
|
+
const o = e;
|
|
814
818
|
return /* @__PURE__ */ m(
|
|
815
819
|
"img",
|
|
816
820
|
{
|
|
817
|
-
src:
|
|
818
|
-
width:
|
|
819
|
-
height:
|
|
821
|
+
src: o.src,
|
|
822
|
+
width: o.width,
|
|
823
|
+
height: o.height,
|
|
820
824
|
className: p("size-5 box-content", n),
|
|
821
825
|
style: {
|
|
822
826
|
filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
|
|
@@ -829,15 +833,15 @@ const qe = ({
|
|
|
829
833
|
const a = e;
|
|
830
834
|
if (!(a != null && a.prefix))
|
|
831
835
|
throw new Error(`Invalid icon type: ${typeof e}`);
|
|
832
|
-
const { icon:
|
|
833
|
-
switch (
|
|
836
|
+
const { icon: r } = a, [s, c, , , l] = r || [], i = (o) => {
|
|
837
|
+
switch (o.length) {
|
|
834
838
|
case 2:
|
|
835
839
|
return {
|
|
836
|
-
"--fa-primary-color":
|
|
837
|
-
"--fa-secondary-color":
|
|
840
|
+
"--fa-primary-color": o[0] || "inherit",
|
|
841
|
+
"--fa-secondary-color": o[1] || "inherit"
|
|
838
842
|
};
|
|
839
843
|
case 1:
|
|
840
|
-
return { color:
|
|
844
|
+
return { color: o[0] };
|
|
841
845
|
default:
|
|
842
846
|
return {};
|
|
843
847
|
}
|
|
@@ -846,12 +850,12 @@ const qe = ({
|
|
|
846
850
|
"svg",
|
|
847
851
|
{
|
|
848
852
|
className: p("size-5 box-content", n),
|
|
849
|
-
style: { ...
|
|
853
|
+
style: { ...i(t) },
|
|
850
854
|
xmlns: "http://www.w3.org/2000/svg",
|
|
851
|
-
viewBox: `0 0 ${
|
|
855
|
+
viewBox: `0 0 ${s} ${c}`,
|
|
852
856
|
role: "img",
|
|
853
857
|
"aria-hidden": "true",
|
|
854
|
-
children: typeof
|
|
858
|
+
children: typeof l == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: l }) : l.map((o, h) => /* @__PURE__ */ m("path", { d: o }, h))
|
|
855
859
|
}
|
|
856
860
|
);
|
|
857
861
|
}, Ht = ({
|
|
@@ -859,34 +863,34 @@ const qe = ({
|
|
|
859
863
|
value: t = 0,
|
|
860
864
|
transitionDuration: n = 1e3,
|
|
861
865
|
className: a,
|
|
862
|
-
...
|
|
866
|
+
...r
|
|
863
867
|
}) => {
|
|
864
|
-
const [
|
|
865
|
-
|
|
866
|
-
t > 100 && (t = 100), t < 0 && (t = 0),
|
|
868
|
+
const [s, c] = R(t), [l] = R(1.5);
|
|
869
|
+
$(() => {
|
|
870
|
+
t > 100 && (t = 100), t < 0 && (t = 0), c(t);
|
|
867
871
|
}, [t]);
|
|
868
|
-
const [
|
|
869
|
-
|
|
870
|
-
if ((e === "circular-indeterminate" || e === "linear-indeterminate") &&
|
|
871
|
-
const
|
|
872
|
-
|
|
872
|
+
const [i, o] = R(!0), h = () => i ? l : l * 0.5;
|
|
873
|
+
$(() => {
|
|
874
|
+
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && s !== 100) {
|
|
875
|
+
const f = setInterval(() => {
|
|
876
|
+
c(i ? 10 : 90), o(!i);
|
|
873
877
|
}, h() * 1e3);
|
|
874
|
-
return () => clearInterval(
|
|
878
|
+
return () => clearInterval(f);
|
|
875
879
|
}
|
|
876
|
-
}, [e,
|
|
877
|
-
const [w,
|
|
878
|
-
|
|
879
|
-
if (
|
|
880
|
-
const
|
|
881
|
-
|
|
880
|
+
}, [e, i, s]);
|
|
881
|
+
const [w, u] = R(!1);
|
|
882
|
+
$(() => {
|
|
883
|
+
if (s >= 100) {
|
|
884
|
+
const f = setTimeout(() => {
|
|
885
|
+
u(!1);
|
|
882
886
|
}, n);
|
|
883
887
|
return () => {
|
|
884
|
-
clearTimeout(
|
|
888
|
+
clearTimeout(f);
|
|
885
889
|
};
|
|
886
890
|
} else
|
|
887
|
-
|
|
888
|
-
}, [
|
|
889
|
-
const
|
|
891
|
+
u(!0);
|
|
892
|
+
}, [s, n]);
|
|
893
|
+
const d = Rt({
|
|
890
894
|
className: a,
|
|
891
895
|
variant: e,
|
|
892
896
|
value: t,
|
|
@@ -894,25 +898,25 @@ const qe = ({
|
|
|
894
898
|
isVisible: w
|
|
895
899
|
});
|
|
896
900
|
return /* @__PURE__ */ X(me, { children: [
|
|
897
|
-
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ X("div", { className:
|
|
901
|
+
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ X("div", { className: d.progressIndicator, ...r, children: [
|
|
898
902
|
/* @__PURE__ */ m(
|
|
899
903
|
"div",
|
|
900
904
|
{
|
|
901
905
|
style: {
|
|
902
|
-
width: `${
|
|
903
|
-
transition: `width ${n}ms ease-in-out ${
|
|
906
|
+
width: `${s}%`,
|
|
907
|
+
transition: `width ${n}ms ease-in-out ${s == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
|
|
904
908
|
},
|
|
905
|
-
className:
|
|
909
|
+
className: d.track
|
|
906
910
|
}
|
|
907
911
|
),
|
|
908
912
|
/* @__PURE__ */ m(
|
|
909
913
|
"div",
|
|
910
914
|
{
|
|
911
915
|
style: {
|
|
912
|
-
marginLeft:
|
|
913
|
-
transition: `width ${n}ms ease-in-out ${
|
|
916
|
+
marginLeft: s != 100 ? "6px" : "0px",
|
|
917
|
+
transition: `width ${n}ms ease-in-out ${s == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
|
|
914
918
|
},
|
|
915
|
-
className:
|
|
919
|
+
className: d.activeIndicator
|
|
916
920
|
}
|
|
917
921
|
),
|
|
918
922
|
/* @__PURE__ */ m(
|
|
@@ -922,7 +926,7 @@ const qe = ({
|
|
|
922
926
|
width: "4 px",
|
|
923
927
|
transition: `width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
|
|
924
928
|
},
|
|
925
|
-
className:
|
|
929
|
+
className: d.stop
|
|
926
930
|
}
|
|
927
931
|
)
|
|
928
932
|
] }),
|
|
@@ -939,8 +943,8 @@ const qe = ({
|
|
|
939
943
|
duration: h(),
|
|
940
944
|
ease: "linear"
|
|
941
945
|
},
|
|
942
|
-
className:
|
|
943
|
-
...
|
|
946
|
+
className: d.progressIndicator,
|
|
947
|
+
...r,
|
|
944
948
|
children: /* @__PURE__ */ m(
|
|
945
949
|
q.circle,
|
|
946
950
|
{
|
|
@@ -952,13 +956,13 @@ const qe = ({
|
|
|
952
956
|
},
|
|
953
957
|
initial: "hidden",
|
|
954
958
|
animate: "visible",
|
|
955
|
-
className:
|
|
959
|
+
className: d.activeIndicator,
|
|
956
960
|
variants: {
|
|
957
961
|
hidden: {
|
|
958
|
-
pathLength:
|
|
962
|
+
pathLength: i ? 10 / 100 : 90 / 100
|
|
959
963
|
},
|
|
960
964
|
visible: {
|
|
961
|
-
pathLength:
|
|
965
|
+
pathLength: i ? 90 / 100 : 10 / 100
|
|
962
966
|
}
|
|
963
967
|
},
|
|
964
968
|
transition: {
|
|
@@ -972,7 +976,7 @@ const qe = ({
|
|
|
972
976
|
}
|
|
973
977
|
)
|
|
974
978
|
},
|
|
975
|
-
|
|
979
|
+
i + ""
|
|
976
980
|
)
|
|
977
981
|
] });
|
|
978
982
|
}, Xt = ({
|
|
@@ -998,48 +1002,48 @@ const qe = ({
|
|
|
998
1002
|
duration: 0.3
|
|
999
1003
|
}
|
|
1000
1004
|
}
|
|
1001
|
-
}, [a,
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}, [
|
|
1005
|
-
const
|
|
1006
|
-
if (
|
|
1007
|
-
return
|
|
1008
|
-
|
|
1005
|
+
}, [a, r] = R(!0), [s, c] = R(!1), [l, i] = R({ x: 50, y: 50 });
|
|
1006
|
+
$(() => {
|
|
1007
|
+
s && (r(!0), r(!1));
|
|
1008
|
+
}, [s]), $(() => {
|
|
1009
|
+
const f = t == null ? void 0 : t.current;
|
|
1010
|
+
if (f)
|
|
1011
|
+
return f.addEventListener("mousedown", o), f.addEventListener("mouseup", w), f.addEventListener("mouseleave", h), () => {
|
|
1012
|
+
f.removeEventListener("mousedown", o), f.removeEventListener("mouseup", w), f.removeEventListener("mouseleave", h);
|
|
1009
1013
|
};
|
|
1010
1014
|
}, [t]);
|
|
1011
|
-
const
|
|
1015
|
+
const o = (f) => {
|
|
1012
1016
|
const y = t == null ? void 0 : t.current, v = y.getBoundingClientRect();
|
|
1013
|
-
|
|
1014
|
-
x: (
|
|
1015
|
-
y: (
|
|
1017
|
+
c(!0), i({
|
|
1018
|
+
x: (f.clientX - v.left) / y.clientWidth * 100,
|
|
1019
|
+
y: (f.clientY - v.top) / y.clientHeight * 100
|
|
1016
1020
|
});
|
|
1017
|
-
}, h = (
|
|
1018
|
-
|
|
1019
|
-
}, w = (
|
|
1020
|
-
|
|
1021
|
-
},
|
|
1021
|
+
}, h = (f) => {
|
|
1022
|
+
c(!1);
|
|
1023
|
+
}, w = (f) => {
|
|
1024
|
+
c(!1);
|
|
1025
|
+
}, u = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, d = {
|
|
1022
1026
|
position: "absolute",
|
|
1023
1027
|
inset: 0,
|
|
1024
1028
|
width: "100%",
|
|
1025
1029
|
height: "100%",
|
|
1026
1030
|
// supply CSS variables for gradient center and radius
|
|
1027
|
-
"--x":
|
|
1028
|
-
"--y":
|
|
1031
|
+
"--x": l.x + "%",
|
|
1032
|
+
"--y": l.y + "%",
|
|
1029
1033
|
"--r": "0%",
|
|
1030
1034
|
// will be animated by motion
|
|
1031
|
-
background: `radial-gradient(ellipse at var(--x) var(--y), ${
|
|
1035
|
+
background: `radial-gradient(ellipse at var(--x) var(--y), ${u} var(--r), transparent calc(var(--r) * 2))`,
|
|
1032
1036
|
pointerEvents: "none"
|
|
1033
1037
|
};
|
|
1034
|
-
return /* @__PURE__ */ m(
|
|
1038
|
+
return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !a) && /* @__PURE__ */ m(
|
|
1035
1039
|
q.div,
|
|
1036
1040
|
{
|
|
1037
|
-
style:
|
|
1041
|
+
style: d,
|
|
1038
1042
|
variants: n,
|
|
1039
1043
|
initial: "initial",
|
|
1040
1044
|
animate: "animate",
|
|
1041
1045
|
exit: "exit",
|
|
1042
|
-
onAnimationComplete: () =>
|
|
1046
|
+
onAnimationComplete: () => r(!0)
|
|
1043
1047
|
}
|
|
1044
1048
|
) });
|
|
1045
1049
|
}, Ut = Q(
|
|
@@ -1072,17 +1076,17 @@ const qe = ({
|
|
|
1072
1076
|
})
|
|
1073
1077
|
);
|
|
1074
1078
|
function Yt(e, t) {
|
|
1075
|
-
let n = 0, a = null,
|
|
1076
|
-
const
|
|
1077
|
-
n = Date.now(), t(
|
|
1079
|
+
let n = 0, a = null, r = null;
|
|
1080
|
+
const s = (c, l) => {
|
|
1081
|
+
n = Date.now(), t(c, l);
|
|
1078
1082
|
};
|
|
1079
|
-
return (
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1083
|
+
return (c, l) => {
|
|
1084
|
+
const i = Date.now(), o = e - (i - n);
|
|
1085
|
+
o <= 0 ? (a && (clearTimeout(a), a = null), s(c, l)) : (r = { v: c, o: l }, a || (a = setTimeout(() => {
|
|
1082
1086
|
a = null;
|
|
1083
|
-
const h =
|
|
1084
|
-
|
|
1085
|
-
},
|
|
1087
|
+
const h = r;
|
|
1088
|
+
r = null, h && s(h.v, h.o);
|
|
1089
|
+
}, o)));
|
|
1086
1090
|
};
|
|
1087
1091
|
}
|
|
1088
1092
|
const jt = ({
|
|
@@ -1090,141 +1094,141 @@ const jt = ({
|
|
|
1090
1094
|
orientation: t = "vertical",
|
|
1091
1095
|
scrollSize: n,
|
|
1092
1096
|
onScroll: a,
|
|
1093
|
-
className:
|
|
1094
|
-
draggable:
|
|
1095
|
-
throttleDuration:
|
|
1096
|
-
scroll:
|
|
1097
|
-
setScroll:
|
|
1097
|
+
className: r,
|
|
1098
|
+
draggable: s = !1,
|
|
1099
|
+
throttleDuration: c = 75,
|
|
1100
|
+
scroll: l,
|
|
1101
|
+
setScroll: i
|
|
1098
1102
|
}) => {
|
|
1099
1103
|
var ae, ue;
|
|
1100
|
-
const
|
|
1104
|
+
const o = D(null), h = D(null), [w, u] = R({
|
|
1101
1105
|
width: null,
|
|
1102
1106
|
height: null
|
|
1103
1107
|
});
|
|
1104
|
-
|
|
1105
|
-
if (!
|
|
1106
|
-
const
|
|
1108
|
+
$(() => {
|
|
1109
|
+
if (!o.current) return;
|
|
1110
|
+
const C = new ResizeObserver((L) => {
|
|
1107
1111
|
for (const W of L)
|
|
1108
|
-
W.target ===
|
|
1112
|
+
W.target === o.current && u({
|
|
1109
1113
|
width: W.contentRect.width,
|
|
1110
1114
|
height: W.contentRect.height
|
|
1111
1115
|
// On observe aussi la hauteur maintenant
|
|
1112
1116
|
});
|
|
1113
1117
|
});
|
|
1114
|
-
return
|
|
1115
|
-
|
|
1118
|
+
return C.observe(o.current), () => {
|
|
1119
|
+
C.disconnect();
|
|
1116
1120
|
};
|
|
1117
|
-
}, [
|
|
1118
|
-
const
|
|
1119
|
-
const
|
|
1120
|
-
return
|
|
1121
|
-
width: n ??
|
|
1122
|
-
height: n ??
|
|
1121
|
+
}, [o]);
|
|
1122
|
+
const d = D(null), f = D(null), y = () => {
|
|
1123
|
+
const C = h.current;
|
|
1124
|
+
return C ? {
|
|
1125
|
+
width: n ?? C.scrollWidth,
|
|
1126
|
+
height: n ?? C.scrollHeight
|
|
1123
1127
|
} : null;
|
|
1124
1128
|
}, v = () => {
|
|
1125
|
-
const
|
|
1126
|
-
return
|
|
1127
|
-
width:
|
|
1128
|
-
height:
|
|
1129
|
+
const C = o.current;
|
|
1130
|
+
return C ? {
|
|
1131
|
+
width: C.clientWidth,
|
|
1132
|
+
height: C.clientHeight
|
|
1129
1133
|
// Correction ici pour retourner la bonne hauteur
|
|
1130
1134
|
} : null;
|
|
1131
1135
|
}, { scrollYProgress: I, scrollXProgress: b } = mt({
|
|
1132
|
-
container:
|
|
1133
|
-
}),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
(
|
|
1137
|
-
!
|
|
1138
|
-
scrollProgress:
|
|
1139
|
-
scroll:
|
|
1140
|
-
scrollTotal:
|
|
1141
|
-
scrollVisible:
|
|
1136
|
+
container: o
|
|
1137
|
+
}), E = D(null);
|
|
1138
|
+
E.current || (E.current = Yt(
|
|
1139
|
+
c,
|
|
1140
|
+
(C, L) => {
|
|
1141
|
+
!f.current || !d.current || !o.current || (L === (t === "horizontal" ? "x" : "y") && (i == null || i(C)), a && (t === "horizontal" && L === "x" && a({
|
|
1142
|
+
scrollProgress: C,
|
|
1143
|
+
scroll: C * (d.current.width - o.current.clientWidth),
|
|
1144
|
+
scrollTotal: d.current.width - o.current.clientWidth,
|
|
1145
|
+
scrollVisible: f.current.width
|
|
1142
1146
|
}), t === "vertical" && L === "y" && a({
|
|
1143
|
-
scrollProgress:
|
|
1144
|
-
scroll:
|
|
1145
|
-
scrollTotal:
|
|
1146
|
-
scrollVisible:
|
|
1147
|
+
scrollProgress: C,
|
|
1148
|
+
scroll: C * (d.current.height - o.current.clientHeight),
|
|
1149
|
+
scrollTotal: d.current.height - o.current.clientHeight,
|
|
1150
|
+
scrollVisible: f.current.height
|
|
1147
1151
|
})));
|
|
1148
1152
|
}
|
|
1149
1153
|
));
|
|
1150
|
-
const N = (
|
|
1151
|
-
|
|
1154
|
+
const N = (C, L) => {
|
|
1155
|
+
E.current && E.current(C, L);
|
|
1152
1156
|
};
|
|
1153
|
-
|
|
1157
|
+
$(() => {
|
|
1154
1158
|
w.width && N(b.get(), "x"), w.height && N(I.get(), "y");
|
|
1155
|
-
}, [w]),
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1159
|
+
}, [w]), $(() => {
|
|
1160
|
+
const C = o.current, L = h.current;
|
|
1161
|
+
if (!C || !L || typeof l != "number") return;
|
|
1158
1162
|
const W = (O, j, Y) => Math.min(Y, Math.max(j, O));
|
|
1159
1163
|
if (t === "horizontal") {
|
|
1160
|
-
const O = Math.max(0, (n ?? L.scrollWidth) -
|
|
1161
|
-
|
|
1164
|
+
const O = Math.max(0, (n ?? L.scrollWidth) - C.clientWidth);
|
|
1165
|
+
C.scrollLeft = W(l * O, 0, O);
|
|
1162
1166
|
} else {
|
|
1163
|
-
const O = Math.max(0, (n ?? L.scrollHeight) -
|
|
1164
|
-
|
|
1167
|
+
const O = Math.max(0, (n ?? L.scrollHeight) - C.clientHeight);
|
|
1168
|
+
C.scrollTop = W(l * O, 0, O);
|
|
1165
1169
|
}
|
|
1166
|
-
}, [
|
|
1167
|
-
N(
|
|
1168
|
-
}), We(I, "change", (
|
|
1169
|
-
N(
|
|
1170
|
+
}, [l, t, n]), We(b, "change", (C) => {
|
|
1171
|
+
N(C, "x");
|
|
1172
|
+
}), We(I, "change", (C) => {
|
|
1173
|
+
N(C, "y");
|
|
1170
1174
|
});
|
|
1171
|
-
const [A, g] =
|
|
1175
|
+
const [A, g] = R(!1);
|
|
1172
1176
|
Xe(() => {
|
|
1173
|
-
A || !
|
|
1177
|
+
A || !f.current || !d.current || !a || (a({
|
|
1174
1178
|
scrollProgress: 0,
|
|
1175
1179
|
scroll: 0,
|
|
1176
|
-
scrollTotal: t == "vertical" ?
|
|
1177
|
-
scrollVisible: t == "vertical" ?
|
|
1180
|
+
scrollTotal: t == "vertical" ? d.current.height : d.current.width,
|
|
1181
|
+
scrollVisible: t == "vertical" ? f.current.height : f.current.width
|
|
1178
1182
|
}), g(!0));
|
|
1179
|
-
}, [
|
|
1180
|
-
const [
|
|
1181
|
-
isDragging:
|
|
1183
|
+
}, [f, d, a]), d.current = y(), f.current = v();
|
|
1184
|
+
const [H, F] = R(!1), M = Ut({
|
|
1185
|
+
isDragging: H,
|
|
1182
1186
|
children: e,
|
|
1183
|
-
className:
|
|
1187
|
+
className: r,
|
|
1184
1188
|
onScroll: a,
|
|
1185
1189
|
orientation: t,
|
|
1186
1190
|
scrollSize: n,
|
|
1187
|
-
draggable:
|
|
1188
|
-
throttleDuration:
|
|
1189
|
-
}), [x,
|
|
1190
|
-
if (!
|
|
1191
|
-
const L =
|
|
1191
|
+
draggable: s,
|
|
1192
|
+
throttleDuration: c
|
|
1193
|
+
}), [x, S] = R(0), [V, G] = R(0), T = (C) => {
|
|
1194
|
+
if (!s) return;
|
|
1195
|
+
const L = o.current;
|
|
1192
1196
|
if (!L || x == null) return;
|
|
1193
|
-
const O = (
|
|
1194
|
-
L.scrollLeft =
|
|
1195
|
-
}, _ = (
|
|
1196
|
-
const L =
|
|
1197
|
-
L && (F(!0),
|
|
1198
|
-
}, ne = (
|
|
1199
|
-
|
|
1200
|
-
},
|
|
1197
|
+
const O = (C.pageX - L.offsetLeft - x) * 1.5;
|
|
1198
|
+
L.scrollLeft = V - O;
|
|
1199
|
+
}, _ = (C) => {
|
|
1200
|
+
const L = o.current;
|
|
1201
|
+
L && (F(!0), S(C.pageX - L.offsetLeft), G(L.scrollLeft));
|
|
1202
|
+
}, ne = (C) => {
|
|
1203
|
+
H && (C.preventDefault(), T(C));
|
|
1204
|
+
}, B = () => {
|
|
1201
1205
|
F(!1);
|
|
1202
|
-
},
|
|
1206
|
+
}, k = () => {
|
|
1203
1207
|
F(!1);
|
|
1204
|
-
}, U = (
|
|
1205
|
-
|
|
1208
|
+
}, U = (C) => {
|
|
1209
|
+
C.preventDefault();
|
|
1206
1210
|
}, K = D(null);
|
|
1207
|
-
return
|
|
1211
|
+
return $(() => () => {
|
|
1208
1212
|
K.current && clearTimeout(K.current);
|
|
1209
|
-
}, []),
|
|
1210
|
-
const
|
|
1211
|
-
if (!
|
|
1213
|
+
}, []), $(() => {
|
|
1214
|
+
const C = o.current;
|
|
1215
|
+
if (!C) return;
|
|
1212
1216
|
const L = (W) => {
|
|
1213
|
-
var re,
|
|
1214
|
-
const O = W.detail, j =
|
|
1217
|
+
var re, le, de, ce;
|
|
1218
|
+
const O = W.detail, j = o.current;
|
|
1215
1219
|
if (!j || !O) return;
|
|
1216
1220
|
const Y = O.orientation ?? t;
|
|
1217
1221
|
if (typeof O.progress == "number")
|
|
1218
1222
|
if (Y === "horizontal") {
|
|
1219
1223
|
const oe = Math.max(
|
|
1220
1224
|
0,
|
|
1221
|
-
(((re =
|
|
1225
|
+
(((re = d.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
|
|
1222
1226
|
);
|
|
1223
1227
|
j.scrollLeft = Math.min(oe, Math.max(0, O.progress * oe));
|
|
1224
1228
|
} else {
|
|
1225
1229
|
const oe = Math.max(
|
|
1226
1230
|
0,
|
|
1227
|
-
(((
|
|
1231
|
+
(((le = d.current) == null ? void 0 : le.height) ?? 0) - j.clientHeight
|
|
1228
1232
|
);
|
|
1229
1233
|
j.scrollTop = Math.min(oe, Math.max(0, O.progress * oe));
|
|
1230
1234
|
}
|
|
@@ -1232,32 +1236,32 @@ const jt = ({
|
|
|
1232
1236
|
if (Y === "horizontal") {
|
|
1233
1237
|
const oe = Math.max(
|
|
1234
1238
|
0,
|
|
1235
|
-
(((de =
|
|
1239
|
+
(((de = d.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
|
|
1236
1240
|
);
|
|
1237
1241
|
j.scrollLeft = Math.min(oe, Math.max(0, O.scroll));
|
|
1238
1242
|
} else {
|
|
1239
1243
|
const oe = Math.max(
|
|
1240
1244
|
0,
|
|
1241
|
-
(((ce =
|
|
1245
|
+
(((ce = d.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
|
|
1242
1246
|
);
|
|
1243
1247
|
j.scrollTop = Math.min(oe, Math.max(0, O.scroll));
|
|
1244
1248
|
}
|
|
1245
1249
|
};
|
|
1246
|
-
return
|
|
1247
|
-
|
|
1250
|
+
return C.addEventListener("udx:customScroll:set", L), () => {
|
|
1251
|
+
C.removeEventListener("udx:customScroll:set", L);
|
|
1248
1252
|
};
|
|
1249
1253
|
}, [t]), /* @__PURE__ */ X(
|
|
1250
1254
|
"div",
|
|
1251
1255
|
{
|
|
1252
|
-
className:
|
|
1253
|
-
ref:
|
|
1256
|
+
className: M.customScroll,
|
|
1257
|
+
ref: o,
|
|
1254
1258
|
onMouseDown: _,
|
|
1255
1259
|
onMouseMove: ne,
|
|
1256
|
-
onMouseUp:
|
|
1257
|
-
onMouseLeave:
|
|
1260
|
+
onMouseUp: B,
|
|
1261
|
+
onMouseLeave: k,
|
|
1258
1262
|
onDragStart: U,
|
|
1259
|
-
onScroll: (
|
|
1260
|
-
|
|
1263
|
+
onScroll: (C) => {
|
|
1264
|
+
H || (S(null), F(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
1261
1265
|
F(!1);
|
|
1262
1266
|
}, 1e3));
|
|
1263
1267
|
},
|
|
@@ -1266,27 +1270,27 @@ const jt = ({
|
|
|
1266
1270
|
"div",
|
|
1267
1271
|
{
|
|
1268
1272
|
ref: h,
|
|
1269
|
-
style: t === "vertical" ? { height: ((ae =
|
|
1270
|
-
className:
|
|
1273
|
+
style: t === "vertical" ? { height: ((ae = f == null ? void 0 : f.current) == null ? void 0 : ae.height) ?? "100%" } : { width: ((ue = f == null ? void 0 : f.current) == null ? void 0 : ue.width) ?? "100%" },
|
|
1274
|
+
className: M.track,
|
|
1271
1275
|
children: e
|
|
1272
1276
|
}
|
|
1273
1277
|
),
|
|
1274
|
-
|
|
1275
|
-
t === "vertical" &&
|
|
1278
|
+
f.current && d.current && /* @__PURE__ */ X(me, { children: [
|
|
1279
|
+
t === "vertical" && d.current.height > f.current.height && /* @__PURE__ */ m(
|
|
1276
1280
|
q.div,
|
|
1277
1281
|
{
|
|
1278
1282
|
className: "flex-none",
|
|
1279
1283
|
style: {
|
|
1280
|
-
height:
|
|
1284
|
+
height: d.current.height - f.current.height
|
|
1281
1285
|
}
|
|
1282
1286
|
}
|
|
1283
1287
|
),
|
|
1284
|
-
t === "horizontal" &&
|
|
1288
|
+
t === "horizontal" && d.current.width > f.current.width && /* @__PURE__ */ m(
|
|
1285
1289
|
q.div,
|
|
1286
1290
|
{
|
|
1287
1291
|
className: "flex-none",
|
|
1288
1292
|
style: {
|
|
1289
|
-
width:
|
|
1293
|
+
width: d.current.width - f.current.width
|
|
1290
1294
|
}
|
|
1291
1295
|
}
|
|
1292
1296
|
)
|
|
@@ -1299,43 +1303,43 @@ const jt = ({
|
|
|
1299
1303
|
el: t,
|
|
1300
1304
|
touch: n = !0
|
|
1301
1305
|
}) => {
|
|
1302
|
-
const a = D(null),
|
|
1303
|
-
|
|
1306
|
+
const a = D(null), r = D(0), s = D(0);
|
|
1307
|
+
$(() => {
|
|
1304
1308
|
if (!t) return;
|
|
1305
|
-
|
|
1306
|
-
const
|
|
1307
|
-
e == null || e(
|
|
1308
|
-
},
|
|
1309
|
-
|
|
1309
|
+
r.current = t.scrollTop, s.current = t.scrollLeft;
|
|
1310
|
+
const c = (u) => {
|
|
1311
|
+
e == null || e(u);
|
|
1312
|
+
}, l = (u) => {
|
|
1313
|
+
u.preventDefault(), c({
|
|
1310
1314
|
type: "intent",
|
|
1311
1315
|
source: "wheel",
|
|
1312
|
-
deltaX:
|
|
1313
|
-
deltaY:
|
|
1314
|
-
originalEvent:
|
|
1316
|
+
deltaX: u.deltaX,
|
|
1317
|
+
deltaY: u.deltaY,
|
|
1318
|
+
originalEvent: u
|
|
1315
1319
|
});
|
|
1316
|
-
},
|
|
1320
|
+
}, i = (u) => {
|
|
1317
1321
|
if (!n) return;
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1320
|
-
},
|
|
1322
|
+
const d = u.touches[0];
|
|
1323
|
+
d && (a.current = { x: d.clientX, y: d.clientY });
|
|
1324
|
+
}, o = (u) => {
|
|
1321
1325
|
if (!n) return;
|
|
1322
|
-
const
|
|
1323
|
-
if (!
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
a.current = { x:
|
|
1326
|
+
const d = u.touches[0];
|
|
1327
|
+
if (!d || !a.current) return;
|
|
1328
|
+
u.preventDefault();
|
|
1329
|
+
const f = a.current.x - d.clientX, y = a.current.y - d.clientY;
|
|
1330
|
+
a.current = { x: d.clientX, y: d.clientY }, c({
|
|
1327
1331
|
type: "intent",
|
|
1328
1332
|
source: "touch",
|
|
1329
|
-
deltaX:
|
|
1333
|
+
deltaX: f,
|
|
1330
1334
|
deltaY: y,
|
|
1331
|
-
originalEvent:
|
|
1335
|
+
originalEvent: u
|
|
1332
1336
|
});
|
|
1333
1337
|
}, h = () => {
|
|
1334
1338
|
n && (a.current = null);
|
|
1335
|
-
}, w = (
|
|
1336
|
-
const
|
|
1339
|
+
}, w = (u) => {
|
|
1340
|
+
const f = t.clientHeight * 0.9;
|
|
1337
1341
|
let y = 0, v = 0;
|
|
1338
|
-
switch (
|
|
1342
|
+
switch (u.key) {
|
|
1339
1343
|
case "ArrowDown":
|
|
1340
1344
|
v = 40;
|
|
1341
1345
|
break;
|
|
@@ -1349,10 +1353,10 @@ const jt = ({
|
|
|
1349
1353
|
y = -40;
|
|
1350
1354
|
break;
|
|
1351
1355
|
case "PageDown":
|
|
1352
|
-
v =
|
|
1356
|
+
v = f;
|
|
1353
1357
|
break;
|
|
1354
1358
|
case "PageUp":
|
|
1355
|
-
v = -
|
|
1359
|
+
v = -f;
|
|
1356
1360
|
break;
|
|
1357
1361
|
case "Home":
|
|
1358
1362
|
v = Number.NEGATIVE_INFINITY;
|
|
@@ -1361,21 +1365,21 @@ const jt = ({
|
|
|
1361
1365
|
v = Number.POSITIVE_INFINITY;
|
|
1362
1366
|
break;
|
|
1363
1367
|
case " ":
|
|
1364
|
-
v =
|
|
1368
|
+
v = u.shiftKey ? -f : f;
|
|
1365
1369
|
break;
|
|
1366
1370
|
default:
|
|
1367
1371
|
return;
|
|
1368
1372
|
}
|
|
1369
|
-
|
|
1373
|
+
u.preventDefault(), c({
|
|
1370
1374
|
type: "intent",
|
|
1371
1375
|
source: "keyboard",
|
|
1372
1376
|
deltaX: y,
|
|
1373
1377
|
deltaY: v,
|
|
1374
|
-
originalEvent:
|
|
1378
|
+
originalEvent: u
|
|
1375
1379
|
});
|
|
1376
1380
|
};
|
|
1377
|
-
return t.addEventListener("wheel",
|
|
1378
|
-
t.removeEventListener("wheel",
|
|
1381
|
+
return t.addEventListener("wheel", l, { passive: !1 }), t.addEventListener("touchstart", i, { passive: !0 }), t.addEventListener("touchmove", o, { passive: !1 }), t.addEventListener("touchend", h, { passive: !0 }), t.addEventListener("keydown", w), () => {
|
|
1382
|
+
t.removeEventListener("wheel", l), t.removeEventListener("touchstart", i), t.removeEventListener("touchmove", o), t.removeEventListener("touchend", h), t.removeEventListener("keydown", w);
|
|
1379
1383
|
};
|
|
1380
1384
|
}, [e]);
|
|
1381
1385
|
}, Kn = ({
|
|
@@ -1383,52 +1387,52 @@ const jt = ({
|
|
|
1383
1387
|
orientation: t = "vertical",
|
|
1384
1388
|
throttleDuration: n = 25
|
|
1385
1389
|
}) => {
|
|
1386
|
-
const [a,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
}, []),
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1390
|
+
const [a, r] = R(0), [s, c] = R(), l = D(!1), i = D(), o = D(0);
|
|
1391
|
+
$(() => {
|
|
1392
|
+
c(document);
|
|
1393
|
+
const u = document.documentElement.scrollTop;
|
|
1394
|
+
r(u), o.current = u;
|
|
1395
|
+
}, []), $(() => {
|
|
1396
|
+
const u = () => {
|
|
1397
|
+
l.current || r(document.documentElement.scrollTop);
|
|
1394
1398
|
};
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1399
|
+
return s == null || s.addEventListener("scroll", u), () => {
|
|
1400
|
+
i.current && clearTimeout(i.current), s == null || s.removeEventListener("scroll", u);
|
|
1397
1401
|
};
|
|
1398
|
-
}, [
|
|
1402
|
+
}, [s]);
|
|
1399
1403
|
const h = D(), w = D(null);
|
|
1400
|
-
return
|
|
1401
|
-
const
|
|
1402
|
-
if (w.current && (w.current.stop(), w.current = null), !
|
|
1403
|
-
h.current =
|
|
1404
|
+
return $(() => {
|
|
1405
|
+
const u = a;
|
|
1406
|
+
if (w.current && (w.current.stop(), w.current = null), !l.current) {
|
|
1407
|
+
h.current = u;
|
|
1404
1408
|
return;
|
|
1405
1409
|
}
|
|
1406
|
-
return w.current = pt(h.current ??
|
|
1410
|
+
return w.current = pt(h.current ?? u, u, {
|
|
1407
1411
|
duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
|
|
1408
1412
|
ease: (e == null ? void 0 : e.ease) ?? "easeOut",
|
|
1409
|
-
onUpdate: (
|
|
1410
|
-
|
|
1411
|
-
const
|
|
1412
|
-
Math.abs(y - v) < 0.1 || (
|
|
1413
|
+
onUpdate: (d) => {
|
|
1414
|
+
i.current && clearTimeout(i.current), h.current = d;
|
|
1415
|
+
const f = document.documentElement, y = Math.round(d * 1e3) / 1e3, v = o.current;
|
|
1416
|
+
Math.abs(y - v) < 0.1 || (o.current = y, l.current && f.scrollTo({ top: y }));
|
|
1413
1417
|
},
|
|
1414
1418
|
onComplete: () => {
|
|
1415
|
-
|
|
1416
|
-
|
|
1419
|
+
i.current = setTimeout(() => {
|
|
1420
|
+
l.current = !1;
|
|
1417
1421
|
}, 300), w.current = null;
|
|
1418
1422
|
}
|
|
1419
1423
|
}), () => {
|
|
1420
1424
|
w.current && (w.current.stop(), w.current = null);
|
|
1421
1425
|
};
|
|
1422
|
-
}, [a]),
|
|
1426
|
+
}, [a]), s ? /* @__PURE__ */ m(
|
|
1423
1427
|
qt,
|
|
1424
1428
|
{
|
|
1425
1429
|
touch: !1,
|
|
1426
|
-
el:
|
|
1427
|
-
onScroll: (
|
|
1428
|
-
if ("deltaY" in
|
|
1429
|
-
let
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1430
|
+
el: s,
|
|
1431
|
+
onScroll: (u) => {
|
|
1432
|
+
if ("deltaY" in u && u.deltaY !== 0 && s && a !== null) {
|
|
1433
|
+
let d = a + u.deltaY;
|
|
1434
|
+
const f = s.querySelector("html");
|
|
1435
|
+
f && (d = Math.min(d, f.scrollHeight - f.clientHeight)), d = Math.max(d, 0), r(d), l.current = !0;
|
|
1432
1436
|
}
|
|
1433
1437
|
}
|
|
1434
1438
|
}
|
|
@@ -1439,30 +1443,30 @@ const jt = ({
|
|
|
1439
1443
|
stateClassName: n = "state-ripple-group",
|
|
1440
1444
|
className: a
|
|
1441
1445
|
}) => {
|
|
1442
|
-
const
|
|
1443
|
-
isClient:
|
|
1446
|
+
const r = D(null), s = D(null), [c, l] = R(!1), i = Kt({
|
|
1447
|
+
isClient: c,
|
|
1444
1448
|
stateClassName: n,
|
|
1445
1449
|
className: a,
|
|
1446
1450
|
colorName: t
|
|
1447
1451
|
});
|
|
1448
|
-
return
|
|
1449
|
-
if (
|
|
1450
|
-
const
|
|
1451
|
-
`.${
|
|
1452
|
+
return $(() => {
|
|
1453
|
+
if (r.current && n !== "state-layer") {
|
|
1454
|
+
const o = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", h = r.current.closest(
|
|
1455
|
+
`.${o}:not(.${o} .${o})`
|
|
1452
1456
|
);
|
|
1453
|
-
|
|
1457
|
+
s.current = h;
|
|
1454
1458
|
}
|
|
1455
|
-
|
|
1459
|
+
l(!0);
|
|
1456
1460
|
}, []), /* @__PURE__ */ m(
|
|
1457
1461
|
"div",
|
|
1458
1462
|
{
|
|
1459
|
-
ref:
|
|
1460
|
-
className:
|
|
1463
|
+
ref: r,
|
|
1464
|
+
className: i.stateLayer,
|
|
1461
1465
|
style: {
|
|
1462
1466
|
"--state-color": `var(--default-color, var(--color-${t}))`,
|
|
1463
1467
|
...e
|
|
1464
1468
|
},
|
|
1465
|
-
children:
|
|
1469
|
+
children: c && /* @__PURE__ */ m(Xt, { triggerRef: s })
|
|
1466
1470
|
}
|
|
1467
1471
|
);
|
|
1468
1472
|
}, _t = ({
|
|
@@ -1480,28 +1484,28 @@ const jt = ({
|
|
|
1480
1484
|
targetRef: e,
|
|
1481
1485
|
children: t
|
|
1482
1486
|
}) => {
|
|
1483
|
-
const [n, a] =
|
|
1484
|
-
const
|
|
1485
|
-
if (!
|
|
1486
|
-
const
|
|
1487
|
+
const [n, a] = R(null), r = D(null), s = () => {
|
|
1488
|
+
const c = e.current;
|
|
1489
|
+
if (!c) return;
|
|
1490
|
+
const l = c.getBoundingClientRect();
|
|
1487
1491
|
a({
|
|
1488
1492
|
position: "fixed",
|
|
1489
|
-
top:
|
|
1490
|
-
left:
|
|
1491
|
-
width:
|
|
1492
|
-
height:
|
|
1493
|
+
top: l.top,
|
|
1494
|
+
left: l.left,
|
|
1495
|
+
width: l.width,
|
|
1496
|
+
height: l.height,
|
|
1493
1497
|
pointerEvents: "none",
|
|
1494
1498
|
// si le wrapper ne doit pas capter les events
|
|
1495
1499
|
zIndex: 999
|
|
1496
1500
|
// personnalise si besoin
|
|
1497
1501
|
});
|
|
1498
1502
|
};
|
|
1499
|
-
return
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
return
|
|
1503
|
-
var
|
|
1504
|
-
window.removeEventListener("scroll",
|
|
1503
|
+
return $(() => {
|
|
1504
|
+
const c = e.current;
|
|
1505
|
+
if (c)
|
|
1506
|
+
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), r.current = new ResizeObserver(s), r.current.observe(c), () => {
|
|
1507
|
+
var l;
|
|
1508
|
+
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (l = r.current) == null || l.disconnect();
|
|
1505
1509
|
};
|
|
1506
1510
|
}, [e]), n ? Ue(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
|
|
1507
1511
|
};
|
|
@@ -1515,48 +1519,48 @@ const Gn = ({
|
|
|
1515
1519
|
onLoad: n,
|
|
1516
1520
|
loadTheme: a = !1
|
|
1517
1521
|
}) => {
|
|
1518
|
-
const [
|
|
1519
|
-
|
|
1522
|
+
const [r, s] = R(null);
|
|
1523
|
+
$(() => {
|
|
1520
1524
|
(async () => {
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1525
|
+
const u = await yt(e, a);
|
|
1526
|
+
s(u);
|
|
1523
1527
|
})();
|
|
1524
1528
|
}, []);
|
|
1525
|
-
const [
|
|
1526
|
-
|
|
1527
|
-
if (!
|
|
1528
|
-
const
|
|
1529
|
+
const [c, l] = R(null), i = D(null), o = D(0), h = D(null);
|
|
1530
|
+
$(() => {
|
|
1531
|
+
if (!r) return;
|
|
1532
|
+
const u = {
|
|
1529
1533
|
...e,
|
|
1530
1534
|
// Assurer la compatibilité avec l'API qui attend sourceColorHex
|
|
1531
1535
|
sourceColor: e.sourceColor
|
|
1532
|
-
},
|
|
1536
|
+
}, d = Date.now(), f = d - o.current, y = async (v) => {
|
|
1533
1537
|
await w(v);
|
|
1534
1538
|
};
|
|
1535
|
-
if (
|
|
1536
|
-
|
|
1537
|
-
else if (h.current =
|
|
1538
|
-
const v = Math.max(0, t -
|
|
1539
|
-
|
|
1540
|
-
|
|
1539
|
+
if (o.current === 0 || f >= t)
|
|
1540
|
+
i.current && (clearTimeout(i.current), i.current = null), h.current = null, o.current = d, y(u);
|
|
1541
|
+
else if (h.current = u, !i.current) {
|
|
1542
|
+
const v = Math.max(0, t - f);
|
|
1543
|
+
i.current = setTimeout(async () => {
|
|
1544
|
+
i.current = null;
|
|
1541
1545
|
const I = h.current;
|
|
1542
|
-
h.current = null, I && (
|
|
1546
|
+
h.current = null, I && (o.current = Date.now(), await y(I));
|
|
1543
1547
|
}, v);
|
|
1544
1548
|
}
|
|
1545
1549
|
return () => {
|
|
1546
1550
|
};
|
|
1547
|
-
}, [e, t,
|
|
1548
|
-
const w = async (
|
|
1549
|
-
if (typeof
|
|
1551
|
+
}, [e, t, r]);
|
|
1552
|
+
const w = async (u) => {
|
|
1553
|
+
if (typeof u.sourceColor == "string" && !Jt(u.sourceColor))
|
|
1550
1554
|
throw new Error("Invalid hex color");
|
|
1551
|
-
if (!
|
|
1555
|
+
if (!r)
|
|
1552
1556
|
return;
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1557
|
+
r.context.update(u), await r.load();
|
|
1558
|
+
const d = r == null ? void 0 : r.plugins.getPlugin(Ye).getInstance().outputCss;
|
|
1559
|
+
l(d), n == null || n(r);
|
|
1556
1560
|
};
|
|
1557
|
-
return
|
|
1558
|
-
|
|
1559
|
-
}, []),
|
|
1561
|
+
return $(() => () => {
|
|
1562
|
+
i.current && (clearTimeout(i.current), i.current = null);
|
|
1563
|
+
}, []), c ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
|
|
1560
1564
|
};
|
|
1561
1565
|
function Zt() {
|
|
1562
1566
|
if (typeof window > "u") return !1;
|
|
@@ -1586,15 +1590,15 @@ function De(e) {
|
|
|
1586
1590
|
function Ee(e, t) {
|
|
1587
1591
|
if (!Re(e)) return;
|
|
1588
1592
|
if (e.hasAttribute(`data-${t}-scroll`)) {
|
|
1589
|
-
const
|
|
1590
|
-
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`) || (
|
|
1593
|
+
const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), l = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
|
|
1594
|
+
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`) || (l === "inline" ? e.classList.add(`${t}-timeline-inline`) : l === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
|
|
1591
1595
|
}
|
|
1592
1596
|
const n = e.getAttribute(`data-${t}-start`);
|
|
1593
1597
|
n && e.style.setProperty(`--${t}-range-start`, n);
|
|
1594
1598
|
const a = e.getAttribute(`data-${t}-end`);
|
|
1595
1599
|
a && e.style.setProperty(`--${t}-range-end`, a);
|
|
1596
|
-
const
|
|
1597
|
-
!
|
|
1600
|
+
const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), s = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
|
|
1601
|
+
!r && !s && e.setAttribute(`data-${t}-run`, "");
|
|
1598
1602
|
}
|
|
1599
1603
|
function Ie(e = document, t) {
|
|
1600
1604
|
return Array.from(
|
|
@@ -1620,12 +1624,12 @@ function Tt(e = document, t) {
|
|
|
1620
1624
|
`${t}-timeline-y`,
|
|
1621
1625
|
`${t}-scroll`
|
|
1622
1626
|
]);
|
|
1623
|
-
return n.filter((
|
|
1624
|
-
if (!(
|
|
1625
|
-
const
|
|
1626
|
-
return
|
|
1627
|
-
(
|
|
1628
|
-
) ? !0 : !Re(
|
|
1627
|
+
return n.filter((r) => {
|
|
1628
|
+
if (!(r instanceof HTMLElement)) return !1;
|
|
1629
|
+
const s = r.classList;
|
|
1630
|
+
return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
|
|
1631
|
+
(i) => i.startsWith(`${t}-`) && !i.includes("scroll") && !a.has(i)
|
|
1632
|
+
) ? !0 : !Re(r);
|
|
1629
1633
|
});
|
|
1630
1634
|
}
|
|
1631
1635
|
function zt(e, t) {
|
|
@@ -1644,10 +1648,10 @@ const en = [0, 0.2], Fe = /* @__PURE__ */ new WeakSet();
|
|
|
1644
1648
|
function Oe(e, t) {
|
|
1645
1649
|
if (Fe.has(e)) return;
|
|
1646
1650
|
Fe.add(e);
|
|
1647
|
-
const n = (
|
|
1648
|
-
|
|
1649
|
-
}, a = (
|
|
1650
|
-
|
|
1651
|
+
const n = (r) => {
|
|
1652
|
+
r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
|
|
1653
|
+
}, a = (r) => {
|
|
1654
|
+
r.target === e && e.removeAttribute(`data-${t}-animating`);
|
|
1651
1655
|
};
|
|
1652
1656
|
e.addEventListener("animationstart", n), e.addEventListener("animationend", a), e.addEventListener("animationcancel", a);
|
|
1653
1657
|
}
|
|
@@ -1656,48 +1660,48 @@ function ct(e = {}) {
|
|
|
1656
1660
|
if (Qt())
|
|
1657
1661
|
return () => {
|
|
1658
1662
|
};
|
|
1659
|
-
const a = Zt(),
|
|
1660
|
-
let
|
|
1661
|
-
const
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1663
|
+
const a = Zt(), r = /* @__PURE__ */ new WeakSet();
|
|
1664
|
+
let s = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, c = !0;
|
|
1665
|
+
const l = () => {
|
|
1666
|
+
const d = window.pageYOffset || window.scrollY || 0;
|
|
1667
|
+
c = d >= s, s = d;
|
|
1664
1668
|
};
|
|
1665
|
-
typeof window < "u" && window.addEventListener("scroll",
|
|
1666
|
-
const
|
|
1667
|
-
(
|
|
1668
|
-
for (const
|
|
1669
|
-
const y =
|
|
1669
|
+
typeof window < "u" && window.addEventListener("scroll", l, { passive: !0 });
|
|
1670
|
+
const i = new IntersectionObserver(
|
|
1671
|
+
(d) => {
|
|
1672
|
+
for (const f of d) {
|
|
1673
|
+
const y = f.target;
|
|
1670
1674
|
if (!De(y) || y.hasAttribute(`data-${t}-animating`)) continue;
|
|
1671
1675
|
const v = zt(y.classList, t);
|
|
1672
|
-
|
|
1676
|
+
f.isIntersecting ? (v && Pe(y, t, "out"), Ae(y, t, "in"), n && i.unobserve(y)) : n || (c || Pe(y, t, "in"), v && Ae(y, t, "out"));
|
|
1673
1677
|
}
|
|
1674
1678
|
},
|
|
1675
1679
|
{ threshold: en }
|
|
1676
|
-
),
|
|
1677
|
-
const
|
|
1678
|
-
for (const y of
|
|
1679
|
-
|
|
1680
|
+
), o = (d) => {
|
|
1681
|
+
const f = Tt(d || document, t);
|
|
1682
|
+
for (const y of f)
|
|
1683
|
+
r.has(y) || (r.add(y), i.observe(y), Oe(y, t));
|
|
1680
1684
|
};
|
|
1681
|
-
|
|
1682
|
-
let h, w = null,
|
|
1685
|
+
o();
|
|
1686
|
+
let h, w = null, u = null;
|
|
1683
1687
|
if (a)
|
|
1684
1688
|
(() => {
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
const
|
|
1688
|
-
for (const y of
|
|
1689
|
+
u == null && (u = requestAnimationFrame(() => {
|
|
1690
|
+
u = null;
|
|
1691
|
+
const f = Ie(void 0, t);
|
|
1692
|
+
for (const y of f) Ee(y, t);
|
|
1689
1693
|
}));
|
|
1690
|
-
})(), w = new MutationObserver((
|
|
1691
|
-
for (const y of
|
|
1694
|
+
})(), w = new MutationObserver((f) => {
|
|
1695
|
+
for (const y of f)
|
|
1692
1696
|
if (y.type === "attributes") {
|
|
1693
1697
|
const v = y.target;
|
|
1694
|
-
v instanceof HTMLElement && (Ee(v, t), De(v) && (
|
|
1698
|
+
v instanceof HTMLElement && (Ee(v, t), De(v) && (r.has(v) || (r.add(v), i.observe(v), Oe(v, t))));
|
|
1695
1699
|
} else if (y.type === "childList" && y.addedNodes && y.addedNodes.length) {
|
|
1696
1700
|
for (const v of Array.from(y.addedNodes))
|
|
1697
1701
|
if (v instanceof HTMLElement) {
|
|
1698
1702
|
const I = Ie(v, t);
|
|
1699
1703
|
for (const b of I) Ee(b, t);
|
|
1700
|
-
|
|
1704
|
+
o(v);
|
|
1701
1705
|
}
|
|
1702
1706
|
}
|
|
1703
1707
|
}), w.observe(document.documentElement, {
|
|
@@ -1713,18 +1717,18 @@ function ct(e = {}) {
|
|
|
1713
1717
|
`data-${t}-run`
|
|
1714
1718
|
]
|
|
1715
1719
|
}), h = () => {
|
|
1716
|
-
|
|
1720
|
+
u != null && cancelAnimationFrame(u), w && w.disconnect();
|
|
1717
1721
|
};
|
|
1718
1722
|
else {
|
|
1719
|
-
let
|
|
1723
|
+
let d;
|
|
1720
1724
|
Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((y) => {
|
|
1721
|
-
|
|
1725
|
+
d = y.initScrollViewFallback({ once: n });
|
|
1722
1726
|
}), h = () => {
|
|
1723
|
-
typeof
|
|
1727
|
+
typeof d == "function" && d();
|
|
1724
1728
|
};
|
|
1725
1729
|
}
|
|
1726
1730
|
return () => {
|
|
1727
|
-
h && h(), typeof window < "u" && window.removeEventListener("scroll",
|
|
1731
|
+
h && h(), typeof window < "u" && window.removeEventListener("scroll", l), i.disconnect();
|
|
1728
1732
|
};
|
|
1729
1733
|
}
|
|
1730
1734
|
const Jn = ct, Zn = ct;
|
|
@@ -1740,76 +1744,76 @@ const ke = ({
|
|
|
1740
1744
|
disabled: t = !1,
|
|
1741
1745
|
icon: n,
|
|
1742
1746
|
href: a,
|
|
1743
|
-
label:
|
|
1744
|
-
disableTextMargins:
|
|
1745
|
-
className:
|
|
1746
|
-
iconPosition:
|
|
1747
|
-
loading:
|
|
1748
|
-
shape:
|
|
1747
|
+
label: r,
|
|
1748
|
+
disableTextMargins: s,
|
|
1749
|
+
className: c,
|
|
1750
|
+
iconPosition: l = "left",
|
|
1751
|
+
loading: i = !1,
|
|
1752
|
+
shape: o = "rounded",
|
|
1749
1753
|
onClick: h,
|
|
1750
1754
|
onToggle: w,
|
|
1751
|
-
activated:
|
|
1752
|
-
ref:
|
|
1753
|
-
size:
|
|
1755
|
+
activated: u,
|
|
1756
|
+
ref: d,
|
|
1757
|
+
size: f = "medium",
|
|
1754
1758
|
allowShapeTransformation: y = !0,
|
|
1755
1759
|
transition: v,
|
|
1756
1760
|
children: I,
|
|
1757
1761
|
...b
|
|
1758
1762
|
}) => {
|
|
1759
|
-
if (I && (
|
|
1763
|
+
if (I && (r = I), !r)
|
|
1760
1764
|
throw new Error(
|
|
1761
1765
|
"Button component requires either a label prop or children content"
|
|
1762
1766
|
);
|
|
1763
1767
|
e = tn(e);
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
}, [
|
|
1768
|
+
const E = a ? "a" : "button", N = D(null), A = d || N, [g, H] = Z.useState(u);
|
|
1769
|
+
$(() => {
|
|
1770
|
+
H(u);
|
|
1771
|
+
}, [u]), v = { duration: 0.3, ...v };
|
|
1768
1772
|
let F;
|
|
1769
|
-
w ? w && (F = (
|
|
1770
|
-
t &&
|
|
1771
|
-
const
|
|
1772
|
-
V
|
|
1773
|
-
}) : F = (
|
|
1774
|
-
t &&
|
|
1773
|
+
w ? w && (F = (S) => {
|
|
1774
|
+
t && S.preventDefault();
|
|
1775
|
+
const V = !g;
|
|
1776
|
+
H(V), w(V);
|
|
1777
|
+
}) : F = (S) => {
|
|
1778
|
+
t && S.preventDefault(), h && h(S);
|
|
1775
1779
|
};
|
|
1776
|
-
const
|
|
1780
|
+
const M = Nt({
|
|
1777
1781
|
allowShapeTransformation: y,
|
|
1778
|
-
size:
|
|
1779
|
-
disableTextMargins:
|
|
1780
|
-
shape:
|
|
1782
|
+
size: f,
|
|
1783
|
+
disableTextMargins: s,
|
|
1784
|
+
shape: o,
|
|
1781
1785
|
href: a,
|
|
1782
1786
|
disabled: t,
|
|
1783
1787
|
icon: n,
|
|
1784
|
-
iconPosition:
|
|
1785
|
-
loading:
|
|
1788
|
+
iconPosition: l,
|
|
1789
|
+
loading: i,
|
|
1786
1790
|
variant: e,
|
|
1787
1791
|
transition: v,
|
|
1788
|
-
className:
|
|
1792
|
+
className: c,
|
|
1789
1793
|
isActive: g ?? !1,
|
|
1790
1794
|
onToggle: w,
|
|
1791
1795
|
activated: g,
|
|
1792
|
-
label:
|
|
1793
|
-
children:
|
|
1794
|
-
}), x = n ? /* @__PURE__ */ m(ie, { icon: n, className:
|
|
1796
|
+
label: r,
|
|
1797
|
+
children: r
|
|
1798
|
+
}), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: M.icon }) : /* @__PURE__ */ m(me, {});
|
|
1795
1799
|
return /* @__PURE__ */ X(
|
|
1796
|
-
|
|
1800
|
+
E,
|
|
1797
1801
|
{
|
|
1798
1802
|
ref: A,
|
|
1799
1803
|
href: a,
|
|
1800
|
-
className:
|
|
1804
|
+
className: M.button,
|
|
1801
1805
|
...b,
|
|
1802
1806
|
onClick: F,
|
|
1803
1807
|
disabled: t,
|
|
1804
1808
|
"aria-pressed": w ? g : void 0,
|
|
1805
1809
|
style: { transition: v.duration + "s" },
|
|
1806
1810
|
children: [
|
|
1807
|
-
/* @__PURE__ */ m("div", { className:
|
|
1811
|
+
/* @__PURE__ */ m("div", { className: M.touchTarget }),
|
|
1808
1812
|
/* @__PURE__ */ m(
|
|
1809
1813
|
ye,
|
|
1810
1814
|
{
|
|
1811
1815
|
style: { transition: v.duration + "s" },
|
|
1812
|
-
className:
|
|
1816
|
+
className: M.stateLayer,
|
|
1813
1817
|
colorName: p(
|
|
1814
1818
|
e === "filled" && {
|
|
1815
1819
|
"on-surface-variant": !g && !!w,
|
|
@@ -1832,8 +1836,8 @@ const ke = ({
|
|
|
1832
1836
|
stateClassName: "state-ripple-group-[button]"
|
|
1833
1837
|
}
|
|
1834
1838
|
),
|
|
1835
|
-
|
|
1836
|
-
|
|
1839
|
+
l === "left" && x,
|
|
1840
|
+
i && /* @__PURE__ */ m(
|
|
1837
1841
|
"div",
|
|
1838
1842
|
{
|
|
1839
1843
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
@@ -1870,8 +1874,8 @@ const ke = ({
|
|
|
1870
1874
|
)
|
|
1871
1875
|
}
|
|
1872
1876
|
),
|
|
1873
|
-
/* @__PURE__ */ m("span", { className:
|
|
1874
|
-
|
|
1877
|
+
/* @__PURE__ */ m("span", { className: M.label, children: r }),
|
|
1878
|
+
l === "right" && x
|
|
1875
1879
|
]
|
|
1876
1880
|
}
|
|
1877
1881
|
);
|
|
@@ -1880,15 +1884,15 @@ const ke = ({
|
|
|
1880
1884
|
className: t,
|
|
1881
1885
|
children: n,
|
|
1882
1886
|
isInteractive: a = !1,
|
|
1883
|
-
ref:
|
|
1884
|
-
...
|
|
1887
|
+
ref: r,
|
|
1888
|
+
...s
|
|
1885
1889
|
}) => {
|
|
1886
|
-
const
|
|
1887
|
-
return /* @__PURE__ */ X("div", { ...
|
|
1890
|
+
const c = Et({ className: t, isInteractive: a, variant: e, children: n }), l = D(null);
|
|
1891
|
+
return /* @__PURE__ */ X("div", { ...s, ref: r || l, className: c.card, children: [
|
|
1888
1892
|
a && /* @__PURE__ */ m(
|
|
1889
1893
|
ye,
|
|
1890
1894
|
{
|
|
1891
|
-
className:
|
|
1895
|
+
className: c.stateLayer,
|
|
1892
1896
|
colorName: "on-surface",
|
|
1893
1897
|
stateClassName: "state-ripple-group-[card]"
|
|
1894
1898
|
}
|
|
@@ -1896,40 +1900,40 @@ const ke = ({
|
|
|
1896
1900
|
n
|
|
1897
1901
|
] });
|
|
1898
1902
|
}, he = (e, t, n = [0, 1]) => {
|
|
1899
|
-
const [a,
|
|
1900
|
-
return
|
|
1903
|
+
const [a, r] = t, [s, c] = n, i = (Math.max(a, Math.min(e, r)) - a) / (r - a);
|
|
1904
|
+
return s + i * (c - s);
|
|
1901
1905
|
}, nn = ({
|
|
1902
1906
|
className: e,
|
|
1903
1907
|
children: t,
|
|
1904
1908
|
width: n,
|
|
1905
1909
|
index: a = 0,
|
|
1906
|
-
outputRange:
|
|
1907
|
-
ref:
|
|
1908
|
-
...
|
|
1910
|
+
outputRange: r,
|
|
1911
|
+
ref: s,
|
|
1912
|
+
...c
|
|
1909
1913
|
}) => {
|
|
1910
|
-
const
|
|
1914
|
+
const l = D(null), i = s || l, o = It({
|
|
1911
1915
|
className: e,
|
|
1912
1916
|
index: a,
|
|
1913
1917
|
width: n,
|
|
1914
1918
|
children: t,
|
|
1915
|
-
outputRange:
|
|
1919
|
+
outputRange: r
|
|
1916
1920
|
});
|
|
1917
1921
|
return /* @__PURE__ */ m(
|
|
1918
1922
|
"div",
|
|
1919
1923
|
{
|
|
1920
|
-
ref:
|
|
1924
|
+
ref: i,
|
|
1921
1925
|
style: {
|
|
1922
1926
|
width: n + "px",
|
|
1923
|
-
maxWidth:
|
|
1924
|
-
minWidth:
|
|
1927
|
+
maxWidth: r[1] + "px",
|
|
1928
|
+
minWidth: r[0] + "px",
|
|
1925
1929
|
willChange: "width"
|
|
1926
1930
|
},
|
|
1927
1931
|
transition: {
|
|
1928
1932
|
duration: 0.5,
|
|
1929
1933
|
ease: "linear"
|
|
1930
1934
|
},
|
|
1931
|
-
className:
|
|
1932
|
-
...
|
|
1935
|
+
className: o.carouselItem,
|
|
1936
|
+
...c,
|
|
1933
1937
|
children: t
|
|
1934
1938
|
}
|
|
1935
1939
|
);
|
|
@@ -1938,82 +1942,82 @@ const ke = ({
|
|
|
1938
1942
|
className: t,
|
|
1939
1943
|
children: n,
|
|
1940
1944
|
ref: a,
|
|
1941
|
-
marginPourcent:
|
|
1942
|
-
inputRange:
|
|
1943
|
-
outputRange:
|
|
1944
|
-
gap:
|
|
1945
|
-
onChange:
|
|
1946
|
-
onMetricsChange:
|
|
1945
|
+
marginPourcent: r = 0,
|
|
1946
|
+
inputRange: s = [0.21, 0.65],
|
|
1947
|
+
outputRange: c = [42, 300],
|
|
1948
|
+
gap: l = 8,
|
|
1949
|
+
onChange: i,
|
|
1950
|
+
onMetricsChange: o,
|
|
1947
1951
|
index: h,
|
|
1948
1952
|
scrollSensitivity: w = 1.25,
|
|
1949
|
-
...
|
|
1953
|
+
...u
|
|
1950
1954
|
}) => {
|
|
1951
|
-
const
|
|
1955
|
+
const d = D(null), f = a || d, [y, v] = R(0), I = St({
|
|
1952
1956
|
index: h,
|
|
1953
1957
|
className: t,
|
|
1954
1958
|
children: n,
|
|
1955
1959
|
variant: e,
|
|
1956
|
-
inputRange:
|
|
1957
|
-
outputRange:
|
|
1958
|
-
marginPourcent:
|
|
1959
|
-
onChange:
|
|
1960
|
-
gap:
|
|
1960
|
+
inputRange: s,
|
|
1961
|
+
outputRange: c,
|
|
1962
|
+
marginPourcent: r,
|
|
1963
|
+
onChange: i,
|
|
1964
|
+
gap: l,
|
|
1961
1965
|
scrollSensitivity: w,
|
|
1962
|
-
onMetricsChange:
|
|
1966
|
+
onMetricsChange: o
|
|
1963
1967
|
}), b = Z.Children.toArray(n).filter(
|
|
1964
1968
|
(L) => Z.isValidElement(L) && L.type === nn
|
|
1965
|
-
),
|
|
1969
|
+
), E = D(null), [N, A] = R(
|
|
1966
1970
|
{}
|
|
1967
|
-
), [g,
|
|
1971
|
+
), [g, H] = R(null), F = D(0), M = D(null), x = () => {
|
|
1968
1972
|
var fe, we;
|
|
1969
|
-
if (!
|
|
1973
|
+
if (!E.current || !f.current || (g == null ? void 0 : g.scrollProgress) === void 0)
|
|
1970
1974
|
return [];
|
|
1971
|
-
const L = (g == null ? void 0 : g.scrollVisible) ?? ((fe =
|
|
1972
|
-
function W(P,
|
|
1973
|
-
return P.map((
|
|
1974
|
-
const Ne = (
|
|
1975
|
+
const L = (g == null ? void 0 : g.scrollVisible) ?? ((fe = f.current) == null ? void 0 : fe.clientWidth) ?? 0;
|
|
1976
|
+
function W(P, z) {
|
|
1977
|
+
return P.map((te, ve) => {
|
|
1978
|
+
const Ne = (te - z) / Math.abs(P[1] - P[0]);
|
|
1975
1979
|
return {
|
|
1976
|
-
itemScrollXCenter:
|
|
1980
|
+
itemScrollXCenter: te,
|
|
1977
1981
|
relativeIndex: Ne,
|
|
1978
1982
|
index: ve,
|
|
1979
1983
|
width: 0
|
|
1980
1984
|
};
|
|
1981
1985
|
});
|
|
1982
1986
|
}
|
|
1983
|
-
const O = b.map((P,
|
|
1984
|
-
if (!
|
|
1985
|
-
const ve =
|
|
1987
|
+
const O = b.map((P, z) => {
|
|
1988
|
+
if (!S[z].current || !E.current) return 0;
|
|
1989
|
+
const ve = z / (b.length - 1);
|
|
1986
1990
|
return he(ve, [0, 1], [0, 1]);
|
|
1987
1991
|
}), j = W(
|
|
1988
1992
|
O,
|
|
1989
1993
|
(g == null ? void 0 : g.scrollProgress) ?? 0
|
|
1990
|
-
).sort((P,
|
|
1991
|
-
let Y = (((we =
|
|
1992
|
-
const re = j.sort((P,
|
|
1994
|
+
).sort((P, z) => P.index - z.index);
|
|
1995
|
+
let Y = (((we = f.current) == null ? void 0 : we.clientWidth) ?? L) + l + c[0] + l;
|
|
1996
|
+
const re = j.sort((P, z) => Math.abs(P.relativeIndex) - Math.abs(z.relativeIndex)).map((P, z) => {
|
|
1993
1997
|
if (!(Y <= 0)) {
|
|
1994
|
-
if (
|
|
1995
|
-
Y -
|
|
1996
|
-
[
|
|
1997
|
-
[
|
|
1998
|
-
), Y -= P.width +
|
|
1999
|
-
const
|
|
2000
|
-
Y += P.width, P.width =
|
|
2001
|
-
} else if (Y == 0 && P.width >=
|
|
2002
|
-
const
|
|
2003
|
-
Y += P.width, P.width =
|
|
1998
|
+
if (z == 0 && G(P.index), P.width = he(
|
|
1999
|
+
Y - l,
|
|
2000
|
+
[c[0], c[1]],
|
|
2001
|
+
[c[0], c[1]]
|
|
2002
|
+
), Y -= P.width + l, Y != 0 && Y < (c[0] + l) * 2) {
|
|
2003
|
+
const te = P.width - ((c[0] + l) * 2 - Y);
|
|
2004
|
+
Y += P.width, P.width = te, Y -= P.width;
|
|
2005
|
+
} else if (Y == 0 && P.width >= c[0] * 2 + l) {
|
|
2006
|
+
const te = P.width - (c[0] + l - Y);
|
|
2007
|
+
Y += P.width, P.width = te, Y -= P.width;
|
|
2004
2008
|
}
|
|
2005
2009
|
return P;
|
|
2006
2010
|
}
|
|
2007
|
-
}).filter(Boolean),
|
|
2008
|
-
(P,
|
|
2011
|
+
}).filter(Boolean), le = re.reverse(), de = [...re].sort(
|
|
2012
|
+
(P, z) => Math.abs(P.index) - Math.abs(z.index)
|
|
2009
2013
|
);
|
|
2010
|
-
|
|
2011
|
-
const
|
|
2012
|
-
if (!
|
|
2013
|
-
const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(
|
|
2014
|
+
le.forEach((P, z) => {
|
|
2015
|
+
const te = le[z + 1];
|
|
2016
|
+
if (!te) return;
|
|
2017
|
+
const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(te == null ? void 0 : te.relativeIndex)), Ne = he(
|
|
2014
2018
|
ve,
|
|
2015
2019
|
[0, 2],
|
|
2016
|
-
[P.width + Y,
|
|
2020
|
+
[P.width + Y, te.width]
|
|
2017
2021
|
);
|
|
2018
2022
|
Y += P.width, P.width = Ne, Y -= P.width;
|
|
2019
2023
|
});
|
|
@@ -2021,30 +2025,30 @@ const ke = ({
|
|
|
2021
2025
|
Math.abs(de[0].relativeIndex),
|
|
2022
2026
|
[de[0].index == 0 ? 0 : ce - 1, ce],
|
|
2023
2027
|
[0, 1]
|
|
2024
|
-
), Le = he(oe, [0, 1], [0, 1]) * -(
|
|
2028
|
+
), Le = he(oe, [0, 1], [0, 1]) * -(c[0] + l);
|
|
2025
2029
|
return v(Le), Object.fromEntries(
|
|
2026
2030
|
re.map((P) => [P.index, P.width])
|
|
2027
2031
|
);
|
|
2028
|
-
},
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
}, [
|
|
2032
|
-
typeof h == "number" && b.length > 0 && h !==
|
|
2033
|
-
}, [h, b.length]),
|
|
2034
|
-
_(
|
|
2035
|
-
}, [
|
|
2036
|
-
|
|
2032
|
+
}, S = D([]).current, [V, G] = R(0);
|
|
2033
|
+
$(() => {
|
|
2034
|
+
i && i(V);
|
|
2035
|
+
}, [V]), $(() => {
|
|
2036
|
+
typeof h == "number" && b.length > 0 && h !== V && ne(h);
|
|
2037
|
+
}, [h, b.length]), $(() => {
|
|
2038
|
+
_(V);
|
|
2039
|
+
}, [V]), S.length !== b.length && b.forEach((L, W) => {
|
|
2040
|
+
S[W] || (S[W] = Z.createRef());
|
|
2037
2041
|
});
|
|
2038
|
-
const [
|
|
2042
|
+
const [T, _] = R(0), ne = (L, W = {}) => {
|
|
2039
2043
|
if (!b.length) return 0;
|
|
2040
|
-
const O =
|
|
2041
|
-
if (!O || !O.current || !
|
|
2044
|
+
const O = S[L];
|
|
2045
|
+
if (!O || !O.current || !E.current) return 0;
|
|
2042
2046
|
const j = he(
|
|
2043
2047
|
L / Math.max(1, b.length - 1),
|
|
2044
2048
|
[0, 1],
|
|
2045
2049
|
[0, 1]
|
|
2046
2050
|
);
|
|
2047
|
-
return _(L),
|
|
2051
|
+
return _(L), E.current.dispatchEvent(
|
|
2048
2052
|
new CustomEvent("udx:customScroll:set", {
|
|
2049
2053
|
bubbles: !0,
|
|
2050
2054
|
detail: {
|
|
@@ -2054,32 +2058,32 @@ const ke = ({
|
|
|
2054
2058
|
}
|
|
2055
2059
|
})
|
|
2056
2060
|
), j;
|
|
2057
|
-
},
|
|
2061
|
+
}, B = b.map((L, W) => {
|
|
2058
2062
|
var re;
|
|
2059
|
-
const O = (re = L.props) == null ? void 0 : re.onClick, j = (
|
|
2060
|
-
O == null || O(
|
|
2063
|
+
const O = (re = L.props) == null ? void 0 : re.onClick, j = (le) => {
|
|
2064
|
+
O == null || O(le);
|
|
2061
2065
|
}, Y = () => _(W);
|
|
2062
2066
|
return Z.cloneElement(
|
|
2063
2067
|
L,
|
|
2064
2068
|
{
|
|
2065
2069
|
width: N[W],
|
|
2066
|
-
outputRange:
|
|
2067
|
-
ref:
|
|
2070
|
+
outputRange: c,
|
|
2071
|
+
ref: S[W],
|
|
2068
2072
|
key: W,
|
|
2069
2073
|
index: W,
|
|
2070
2074
|
role: "option",
|
|
2071
|
-
"aria-selected":
|
|
2072
|
-
tabIndex:
|
|
2075
|
+
"aria-selected": V === W,
|
|
2076
|
+
tabIndex: V === W ? 0 : -1,
|
|
2073
2077
|
onClick: j,
|
|
2074
2078
|
onFocus: Y
|
|
2075
2079
|
}
|
|
2076
2080
|
);
|
|
2077
|
-
}),
|
|
2081
|
+
}), k = (L) => {
|
|
2078
2082
|
var W;
|
|
2079
2083
|
if (L.scrollTotal > 0) {
|
|
2080
|
-
(W =
|
|
2084
|
+
(W = M.current) == null || W.stop();
|
|
2081
2085
|
const O = F.current ?? 0, j = L.scrollProgress ?? 0;
|
|
2082
|
-
|
|
2086
|
+
M.current = ht(O, j, {
|
|
2083
2087
|
// Spring tuning to add a bit of inertia and smoothness
|
|
2084
2088
|
type: "spring",
|
|
2085
2089
|
stiffness: 260,
|
|
@@ -2087,65 +2091,65 @@ const ke = ({
|
|
|
2087
2091
|
mass: 0.6,
|
|
2088
2092
|
restDelta: 5e-4,
|
|
2089
2093
|
onUpdate: (Y) => {
|
|
2090
|
-
F.current = Y,
|
|
2094
|
+
F.current = Y, H({ ...L, scrollProgress: Y });
|
|
2091
2095
|
}
|
|
2092
2096
|
});
|
|
2093
2097
|
}
|
|
2094
2098
|
};
|
|
2095
|
-
|
|
2099
|
+
$(() => {
|
|
2096
2100
|
const L = x();
|
|
2097
2101
|
A(L);
|
|
2098
2102
|
}, [g]);
|
|
2099
|
-
const U = D(
|
|
2100
|
-
|
|
2101
|
-
U.current =
|
|
2102
|
-
}, [
|
|
2103
|
+
const U = D(o);
|
|
2104
|
+
$(() => {
|
|
2105
|
+
U.current = o;
|
|
2106
|
+
}, [o]);
|
|
2103
2107
|
const K = D(null);
|
|
2104
|
-
|
|
2105
|
-
var
|
|
2108
|
+
$(() => {
|
|
2109
|
+
var z;
|
|
2106
2110
|
const L = U.current;
|
|
2107
|
-
if (!L || !(
|
|
2111
|
+
if (!L || !(f != null && f.current)) return;
|
|
2108
2112
|
const W = b.length;
|
|
2109
2113
|
if (W <= 0) return;
|
|
2110
|
-
const O = ((
|
|
2111
|
-
Math.max(0,
|
|
2114
|
+
const O = ((z = f.current) == null ? void 0 : z.clientWidth) ?? 0, j = c[1], Y = F.current ?? (g == null ? void 0 : g.scrollProgress) ?? 0, re = (O + l) / (j + l), le = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(le * (2 / 3))), ce = Math.min(
|
|
2115
|
+
Math.max(0, V),
|
|
2112
2116
|
Math.max(0, W - 1)
|
|
2113
2117
|
), oe = ce > 0, Le = ce < W - 1, fe = {
|
|
2114
2118
|
total: W,
|
|
2115
2119
|
selectedIndex: ce,
|
|
2116
2120
|
visibleApprox: re,
|
|
2117
|
-
visibleFull:
|
|
2121
|
+
visibleFull: le,
|
|
2118
2122
|
stepHalf: de,
|
|
2119
2123
|
canPrev: oe,
|
|
2120
2124
|
canNext: Le,
|
|
2121
2125
|
scrollProgress: Y,
|
|
2122
2126
|
viewportWidth: O,
|
|
2123
2127
|
itemMaxWidth: j,
|
|
2124
|
-
gap:
|
|
2128
|
+
gap: l
|
|
2125
2129
|
}, we = K.current;
|
|
2126
2130
|
let P = !we;
|
|
2127
2131
|
if (!P) {
|
|
2128
|
-
for (const
|
|
2129
|
-
if (fe[
|
|
2132
|
+
for (const te in fe)
|
|
2133
|
+
if (fe[te] !== we[te]) {
|
|
2130
2134
|
P = !0;
|
|
2131
2135
|
break;
|
|
2132
2136
|
}
|
|
2133
2137
|
}
|
|
2134
2138
|
P && (K.current = fe, L(fe));
|
|
2135
|
-
}, [
|
|
2139
|
+
}, [f, b.length, V, g, l, c]), $(() => () => {
|
|
2136
2140
|
var L;
|
|
2137
|
-
(L =
|
|
2141
|
+
(L = M.current) == null || L.stop();
|
|
2138
2142
|
}, []);
|
|
2139
|
-
const [ae, ue] =
|
|
2143
|
+
const [ae, ue] = R(0);
|
|
2140
2144
|
Xe(() => {
|
|
2141
|
-
let L =
|
|
2145
|
+
let L = c[1];
|
|
2142
2146
|
g && L > g.scrollVisible && (L = g.scrollVisible);
|
|
2143
|
-
const W = (L +
|
|
2147
|
+
const W = (L + l) * B.length / w;
|
|
2144
2148
|
ue(W);
|
|
2145
|
-
}, [
|
|
2146
|
-
const
|
|
2149
|
+
}, [f, S, g]);
|
|
2150
|
+
const C = (L) => {
|
|
2147
2151
|
if (!b.length) return;
|
|
2148
|
-
const W =
|
|
2152
|
+
const W = T ?? V;
|
|
2149
2153
|
switch (L.key) {
|
|
2150
2154
|
case "ArrowLeft":
|
|
2151
2155
|
L.preventDefault(), ne(Math.max(0, W - 1));
|
|
@@ -2165,8 +2169,8 @@ const ke = ({
|
|
|
2165
2169
|
break;
|
|
2166
2170
|
}
|
|
2167
2171
|
};
|
|
2168
|
-
return
|
|
2169
|
-
const L =
|
|
2172
|
+
return $(() => {
|
|
2173
|
+
const L = f.current;
|
|
2170
2174
|
if (!L) return;
|
|
2171
2175
|
const W = (O) => {
|
|
2172
2176
|
const j = O.detail;
|
|
@@ -2178,33 +2182,33 @@ const ke = ({
|
|
|
2178
2182
|
W
|
|
2179
2183
|
);
|
|
2180
2184
|
};
|
|
2181
|
-
}, [
|
|
2185
|
+
}, [f, b.length]), /* @__PURE__ */ m(
|
|
2182
2186
|
"div",
|
|
2183
2187
|
{
|
|
2184
2188
|
className: I.carousel,
|
|
2185
|
-
ref:
|
|
2189
|
+
ref: f,
|
|
2186
2190
|
role: "listbox",
|
|
2187
2191
|
"aria-orientation": "horizontal",
|
|
2188
|
-
onKeyDown:
|
|
2189
|
-
...
|
|
2192
|
+
onKeyDown: C,
|
|
2193
|
+
...u,
|
|
2190
2194
|
children: /* @__PURE__ */ m(
|
|
2191
2195
|
jt,
|
|
2192
2196
|
{
|
|
2193
2197
|
draggable: !0,
|
|
2194
2198
|
orientation: "horizontal",
|
|
2195
|
-
onScroll:
|
|
2199
|
+
onScroll: k,
|
|
2196
2200
|
scrollSize: ae,
|
|
2197
2201
|
children: /* @__PURE__ */ m(
|
|
2198
2202
|
"div",
|
|
2199
2203
|
{
|
|
2200
2204
|
className: I.track,
|
|
2201
|
-
ref:
|
|
2205
|
+
ref: E,
|
|
2202
2206
|
style: {
|
|
2203
|
-
gap: `${
|
|
2207
|
+
gap: `${l}px`,
|
|
2204
2208
|
translate: y,
|
|
2205
2209
|
willChange: "translate"
|
|
2206
2210
|
},
|
|
2207
|
-
children:
|
|
2211
|
+
children: B
|
|
2208
2212
|
}
|
|
2209
2213
|
)
|
|
2210
2214
|
}
|
|
@@ -2218,15 +2222,15 @@ const ke = ({
|
|
|
2218
2222
|
}) => {
|
|
2219
2223
|
const a = kt({ orientation: e, className: t });
|
|
2220
2224
|
return /* @__PURE__ */ m("hr", { className: a.divider, ...n });
|
|
2221
|
-
},
|
|
2225
|
+
}, ee = [];
|
|
2222
2226
|
for (let e = 0; e < 256; ++e)
|
|
2223
|
-
|
|
2227
|
+
ee.push((e + 256).toString(16).slice(1));
|
|
2224
2228
|
function on(e, t = 0) {
|
|
2225
|
-
return (
|
|
2229
|
+
return (ee[e[t + 0]] + ee[e[t + 1]] + ee[e[t + 2]] + ee[e[t + 3]] + "-" + ee[e[t + 4]] + ee[e[t + 5]] + "-" + ee[e[t + 6]] + ee[e[t + 7]] + "-" + ee[e[t + 8]] + ee[e[t + 9]] + "-" + ee[e[t + 10]] + ee[e[t + 11]] + ee[e[t + 12]] + ee[e[t + 13]] + ee[e[t + 14]] + ee[e[t + 15]]).toLowerCase();
|
|
2226
2230
|
}
|
|
2227
2231
|
let Se;
|
|
2228
2232
|
const an = new Uint8Array(16);
|
|
2229
|
-
function
|
|
2233
|
+
function ln() {
|
|
2230
2234
|
if (!Se) {
|
|
2231
2235
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2232
2236
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
@@ -2234,13 +2238,13 @@ function sn() {
|
|
|
2234
2238
|
}
|
|
2235
2239
|
return Se(an);
|
|
2236
2240
|
}
|
|
2237
|
-
const
|
|
2241
|
+
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ve = { randomUUID: sn };
|
|
2238
2242
|
function Be(e, t, n) {
|
|
2239
|
-
var
|
|
2243
|
+
var r;
|
|
2240
2244
|
if (Ve.randomUUID && !e)
|
|
2241
2245
|
return Ve.randomUUID();
|
|
2242
2246
|
e = e || {};
|
|
2243
|
-
const a = e.random ?? ((
|
|
2247
|
+
const a = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? ln();
|
|
2244
2248
|
if (a.length < 16)
|
|
2245
2249
|
throw new Error("Random bytes length must be >= 16");
|
|
2246
2250
|
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, on(a);
|
|
@@ -2250,21 +2254,21 @@ const it = ({
|
|
|
2250
2254
|
buttons: t,
|
|
2251
2255
|
className: n,
|
|
2252
2256
|
children: a,
|
|
2253
|
-
title:
|
|
2254
|
-
text:
|
|
2255
|
-
position:
|
|
2256
|
-
targetRef:
|
|
2257
|
-
ref:
|
|
2258
|
-
trigger:
|
|
2257
|
+
title: r,
|
|
2258
|
+
text: s,
|
|
2259
|
+
position: c,
|
|
2260
|
+
targetRef: l,
|
|
2261
|
+
ref: i,
|
|
2262
|
+
trigger: o = ["hover", "focus"],
|
|
2259
2263
|
...h
|
|
2260
2264
|
}) => {
|
|
2261
|
-
if (!a && !
|
|
2265
|
+
if (!a && !l)
|
|
2262
2266
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
2263
|
-
Array.isArray(
|
|
2264
|
-
const w = D(null),
|
|
2265
|
-
|
|
2266
|
-
const x = (
|
|
2267
|
-
|
|
2267
|
+
Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
|
|
2268
|
+
const w = D(null), u = l || w, [d, f] = R(null), [y] = R(Be()), [v, I] = R(!1), b = D(null);
|
|
2269
|
+
$(() => {
|
|
2270
|
+
const x = (S) => {
|
|
2271
|
+
f(S.detail);
|
|
2268
2272
|
};
|
|
2269
2273
|
return document.addEventListener("tooltip-update", x), () => {
|
|
2270
2274
|
document.removeEventListener(
|
|
@@ -2272,80 +2276,80 @@ const it = ({
|
|
|
2272
2276
|
x
|
|
2273
2277
|
);
|
|
2274
2278
|
};
|
|
2275
|
-
}, []),
|
|
2276
|
-
b.current && clearTimeout(b.current),
|
|
2279
|
+
}, []), $(() => {
|
|
2280
|
+
b.current && clearTimeout(b.current), d ? I(d === y) : b.current = setTimeout(() => {
|
|
2277
2281
|
I(!1);
|
|
2278
2282
|
}, 1200);
|
|
2279
|
-
}, [
|
|
2280
|
-
const
|
|
2281
|
-
if (
|
|
2283
|
+
}, [d, y]);
|
|
2284
|
+
const E = () => {
|
|
2285
|
+
if (o.includes("hover")) {
|
|
2282
2286
|
const x = new CustomEvent("tooltip-update", { detail: y });
|
|
2283
2287
|
document.dispatchEvent(x);
|
|
2284
2288
|
}
|
|
2285
2289
|
}, N = () => {
|
|
2286
|
-
if (
|
|
2290
|
+
if (o.includes("hover")) {
|
|
2287
2291
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2288
2292
|
document.dispatchEvent(x);
|
|
2289
2293
|
}
|
|
2290
2294
|
}, A = () => {
|
|
2291
|
-
if (
|
|
2295
|
+
if (o.includes("click")) {
|
|
2292
2296
|
const x = new CustomEvent("tooltip-update", {
|
|
2293
2297
|
detail: v ? null : y
|
|
2294
2298
|
});
|
|
2295
2299
|
document.dispatchEvent(x);
|
|
2296
2300
|
}
|
|
2297
2301
|
}, g = () => {
|
|
2298
|
-
if (
|
|
2302
|
+
if (o.includes("focus")) {
|
|
2299
2303
|
const x = new CustomEvent("tooltip-update", { detail: y });
|
|
2300
2304
|
document.dispatchEvent(x);
|
|
2301
2305
|
}
|
|
2302
|
-
},
|
|
2303
|
-
if (
|
|
2306
|
+
}, H = () => {
|
|
2307
|
+
if (o.includes("focus")) {
|
|
2304
2308
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2305
2309
|
document.dispatchEvent(x);
|
|
2306
2310
|
}
|
|
2307
2311
|
};
|
|
2308
|
-
|
|
2309
|
-
if (
|
|
2310
|
-
const x =
|
|
2311
|
-
return x.addEventListener("mouseenter",
|
|
2312
|
-
x.removeEventListener("mouseenter",
|
|
2312
|
+
$(() => {
|
|
2313
|
+
if (u != null && u.current) {
|
|
2314
|
+
const x = u.current;
|
|
2315
|
+
return x.addEventListener("mouseenter", E), x.addEventListener("mouseleave", N), x.addEventListener("click", A), x.addEventListener("focus", g), x.addEventListener("blur", H), () => {
|
|
2316
|
+
x.removeEventListener("mouseenter", E), x.removeEventListener("mouseleave", N), x.removeEventListener("click", A), x.removeEventListener("focus", g), x.removeEventListener("blur", H);
|
|
2313
2317
|
};
|
|
2314
2318
|
}
|
|
2315
|
-
}, [
|
|
2316
|
-
const F = !
|
|
2317
|
-
if (!
|
|
2318
|
-
const x =
|
|
2319
|
-
e === "plain" ? G < 1 / 3 ?
|
|
2319
|
+
}, [u, o, y, v]);
|
|
2320
|
+
const F = !l && pe(a) ? xe(a, { ref: w }) : a;
|
|
2321
|
+
if (!c && typeof window < "u" && u != null && u.current && !c) {
|
|
2322
|
+
const x = u.current.getBoundingClientRect(), S = window.innerWidth, V = window.innerHeight, G = x.left / S, T = x.top / V;
|
|
2323
|
+
e === "plain" ? G < 1 / 3 ? c = "right" : G > 2 / 3 ? c = "left" : c = T > 0.5 ? "top" : "bottom" : G < 1 / 2 && T < 1 / 2 ? c = "bottom-right" : G > 1 / 2 && T < 1 / 2 ? c = "bottom-left" : G > 1 / 2 && T > 1 / 2 ? c = "top-left" : G < 1 / 2 && T > 1 / 2 && (c = "top-right");
|
|
2320
2324
|
}
|
|
2321
|
-
const
|
|
2325
|
+
const M = Vt({
|
|
2322
2326
|
variant: e,
|
|
2323
2327
|
buttons: t,
|
|
2324
2328
|
className: n,
|
|
2325
|
-
title:
|
|
2326
|
-
text:
|
|
2327
|
-
position:
|
|
2328
|
-
trigger:
|
|
2329
|
-
targetRef:
|
|
2329
|
+
title: r,
|
|
2330
|
+
text: s,
|
|
2331
|
+
position: c,
|
|
2332
|
+
trigger: o,
|
|
2333
|
+
targetRef: l,
|
|
2330
2334
|
children: a
|
|
2331
2335
|
});
|
|
2332
2336
|
return /* @__PURE__ */ X(me, { children: [
|
|
2333
2337
|
F,
|
|
2334
|
-
/* @__PURE__ */ m(
|
|
2338
|
+
/* @__PURE__ */ m(se, { children: v && /* @__PURE__ */ m(Gt, { targetRef: u, children: /* @__PURE__ */ m(
|
|
2335
2339
|
q.div,
|
|
2336
2340
|
{
|
|
2337
|
-
initial: { opacity:
|
|
2341
|
+
initial: { opacity: d ? 1 : 0 },
|
|
2338
2342
|
animate: { opacity: 1 },
|
|
2339
|
-
transition: { duration:
|
|
2340
|
-
exit: { opacity:
|
|
2341
|
-
className:
|
|
2343
|
+
transition: { duration: d ? 0 : 0.3 },
|
|
2344
|
+
exit: { opacity: d ? 1 : 0 },
|
|
2345
|
+
className: M.toolTip,
|
|
2342
2346
|
...h,
|
|
2343
|
-
onMouseEnter:
|
|
2347
|
+
onMouseEnter: E,
|
|
2344
2348
|
onMouseLeave: N,
|
|
2345
2349
|
children: /* @__PURE__ */ X(
|
|
2346
2350
|
q.div,
|
|
2347
2351
|
{
|
|
2348
|
-
className:
|
|
2352
|
+
className: M.container,
|
|
2349
2353
|
layoutId: "tool-tip",
|
|
2350
2354
|
transition: {
|
|
2351
2355
|
type: "spring",
|
|
@@ -2353,16 +2357,16 @@ const it = ({
|
|
|
2353
2357
|
damping: 20
|
|
2354
2358
|
},
|
|
2355
2359
|
children: [
|
|
2356
|
-
|
|
2357
|
-
/* @__PURE__ */ m("div", { className:
|
|
2358
|
-
t && /* @__PURE__ */ m("div", { className:
|
|
2360
|
+
r && /* @__PURE__ */ m("div", { className: M.subHead, children: r }),
|
|
2361
|
+
/* @__PURE__ */ m("div", { className: M.supportingText, children: s }),
|
|
2362
|
+
t && /* @__PURE__ */ m("div", { className: M.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
|
|
2359
2363
|
ke,
|
|
2360
2364
|
{
|
|
2361
2365
|
size: "small",
|
|
2362
2366
|
variant: "text",
|
|
2363
2367
|
...x
|
|
2364
2368
|
},
|
|
2365
|
-
|
|
2369
|
+
S
|
|
2366
2370
|
)) })
|
|
2367
2371
|
]
|
|
2368
2372
|
}
|
|
@@ -2375,12 +2379,12 @@ const it = ({
|
|
|
2375
2379
|
label: t,
|
|
2376
2380
|
variant: n = "primary",
|
|
2377
2381
|
size: a = "medium",
|
|
2378
|
-
href:
|
|
2379
|
-
type:
|
|
2380
|
-
icon:
|
|
2381
|
-
extended:
|
|
2382
|
-
ref:
|
|
2383
|
-
transition:
|
|
2382
|
+
href: r,
|
|
2383
|
+
type: s,
|
|
2384
|
+
icon: c,
|
|
2385
|
+
extended: l = !1,
|
|
2386
|
+
ref: i,
|
|
2387
|
+
transition: o,
|
|
2384
2388
|
children: h,
|
|
2385
2389
|
...w
|
|
2386
2390
|
}) => {
|
|
@@ -2388,28 +2392,28 @@ const it = ({
|
|
|
2388
2392
|
throw new Error(
|
|
2389
2393
|
"FAB component requires either a label prop or children content"
|
|
2390
2394
|
);
|
|
2391
|
-
const
|
|
2392
|
-
href:
|
|
2393
|
-
icon:
|
|
2394
|
-
extended:
|
|
2395
|
+
const u = r ? "a" : "button", d = Ct({
|
|
2396
|
+
href: r,
|
|
2397
|
+
icon: c,
|
|
2398
|
+
extended: l,
|
|
2395
2399
|
label: t,
|
|
2396
2400
|
size: a,
|
|
2397
2401
|
variant: n,
|
|
2398
2402
|
className: e,
|
|
2399
|
-
transition:
|
|
2403
|
+
transition: o,
|
|
2400
2404
|
children: t
|
|
2401
2405
|
});
|
|
2402
|
-
|
|
2403
|
-
const
|
|
2406
|
+
o = { duration: 0.3, ...o };
|
|
2407
|
+
const f = D(null), y = i || f, v = {
|
|
2404
2408
|
visible: {
|
|
2405
2409
|
width: "auto",
|
|
2406
2410
|
marginLeft: 12,
|
|
2407
2411
|
opacity: 1,
|
|
2408
2412
|
transition: {
|
|
2409
|
-
...
|
|
2413
|
+
...o,
|
|
2410
2414
|
opacity: {
|
|
2411
|
-
duration:
|
|
2412
|
-
delay:
|
|
2415
|
+
duration: o.duration / 2,
|
|
2416
|
+
delay: o.duration - o.duration / 2
|
|
2413
2417
|
}
|
|
2414
2418
|
}
|
|
2415
2419
|
},
|
|
@@ -2418,27 +2422,27 @@ const it = ({
|
|
|
2418
2422
|
marginLeft: 0,
|
|
2419
2423
|
opacity: 0,
|
|
2420
2424
|
transition: {
|
|
2421
|
-
...
|
|
2425
|
+
...o,
|
|
2422
2426
|
marginLeft: {
|
|
2423
|
-
duration:
|
|
2424
|
-
delay:
|
|
2427
|
+
duration: o.duration / 2,
|
|
2428
|
+
delay: o.duration - o.duration / 2
|
|
2425
2429
|
}
|
|
2426
2430
|
}
|
|
2427
2431
|
}
|
|
2428
2432
|
};
|
|
2429
2433
|
return /* @__PURE__ */ X(
|
|
2430
|
-
|
|
2434
|
+
u,
|
|
2431
2435
|
{
|
|
2432
2436
|
...w,
|
|
2433
2437
|
ref: y,
|
|
2434
|
-
href:
|
|
2435
|
-
"aria-label":
|
|
2436
|
-
className:
|
|
2438
|
+
href: r,
|
|
2439
|
+
"aria-label": l ? void 0 : t,
|
|
2440
|
+
className: d.fab,
|
|
2437
2441
|
children: [
|
|
2438
2442
|
/* @__PURE__ */ m(
|
|
2439
2443
|
it,
|
|
2440
2444
|
{
|
|
2441
|
-
trigger:
|
|
2445
|
+
trigger: l ? null : void 0,
|
|
2442
2446
|
text: t,
|
|
2443
2447
|
targetRef: y
|
|
2444
2448
|
}
|
|
@@ -2446,8 +2450,8 @@ const it = ({
|
|
|
2446
2450
|
/* @__PURE__ */ m(
|
|
2447
2451
|
ye,
|
|
2448
2452
|
{
|
|
2449
|
-
style: { transition:
|
|
2450
|
-
className:
|
|
2453
|
+
style: { transition: o.duration + "s" },
|
|
2454
|
+
className: d.stateLayer,
|
|
2451
2455
|
colorName: p({
|
|
2452
2456
|
"on-primary": n == "primary",
|
|
2453
2457
|
"on-secondary": n == "secondary",
|
|
@@ -2459,15 +2463,15 @@ const it = ({
|
|
|
2459
2463
|
stateClassName: "state-ripple-group-[fab]"
|
|
2460
2464
|
}
|
|
2461
2465
|
),
|
|
2462
|
-
/* @__PURE__ */ m(ie, { icon:
|
|
2463
|
-
/* @__PURE__ */ m(
|
|
2466
|
+
/* @__PURE__ */ m(ie, { icon: c, className: d.icon }),
|
|
2467
|
+
/* @__PURE__ */ m(se, { children: l && /* @__PURE__ */ m(
|
|
2464
2468
|
q.span,
|
|
2465
2469
|
{
|
|
2466
2470
|
variants: v,
|
|
2467
2471
|
initial: "hidden",
|
|
2468
2472
|
animate: "visible",
|
|
2469
2473
|
exit: "hidden",
|
|
2470
|
-
className:
|
|
2474
|
+
className: d.label,
|
|
2471
2475
|
children: t
|
|
2472
2476
|
}
|
|
2473
2477
|
) })
|
|
@@ -2479,65 +2483,65 @@ const it = ({
|
|
|
2479
2483
|
href: t,
|
|
2480
2484
|
disabled: n = !1,
|
|
2481
2485
|
type: a = "button",
|
|
2482
|
-
title:
|
|
2483
|
-
label:
|
|
2484
|
-
onToggle:
|
|
2485
|
-
activated:
|
|
2486
|
-
onClick:
|
|
2487
|
-
icon:
|
|
2486
|
+
title: r,
|
|
2487
|
+
label: s,
|
|
2488
|
+
onToggle: c,
|
|
2489
|
+
activated: l = !1,
|
|
2490
|
+
onClick: i,
|
|
2491
|
+
icon: o,
|
|
2488
2492
|
size: h = "medium",
|
|
2489
2493
|
iconSelected: w,
|
|
2490
|
-
className:
|
|
2491
|
-
ref:
|
|
2492
|
-
width:
|
|
2494
|
+
className: u,
|
|
2495
|
+
ref: d,
|
|
2496
|
+
width: f = "default",
|
|
2493
2497
|
shape: y = "rounded",
|
|
2494
2498
|
allowShapeTransformation: v = !0,
|
|
2495
2499
|
transition: I,
|
|
2496
2500
|
children: b,
|
|
2497
|
-
...
|
|
2501
|
+
...E
|
|
2498
2502
|
}) => {
|
|
2499
|
-
if (b && (
|
|
2503
|
+
if (b && (s = b), !s)
|
|
2500
2504
|
throw new Error(
|
|
2501
2505
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
2502
2506
|
);
|
|
2503
|
-
|
|
2504
|
-
const [N, A] = Z.useState(
|
|
2507
|
+
r || (r = s);
|
|
2508
|
+
const [N, A] = Z.useState(l);
|
|
2505
2509
|
let g;
|
|
2506
|
-
|
|
2507
|
-
n &&
|
|
2508
|
-
},
|
|
2509
|
-
n &&
|
|
2510
|
-
},
|
|
2511
|
-
A(
|
|
2512
|
-
}, [
|
|
2513
|
-
const
|
|
2510
|
+
c ? c && (g = (S) => {
|
|
2511
|
+
n && S.preventDefault(), A(!N), c(!!N);
|
|
2512
|
+
}, o = N && w || o) : g = (S) => {
|
|
2513
|
+
n && S.preventDefault(), i && i(S);
|
|
2514
|
+
}, $(() => {
|
|
2515
|
+
A(l);
|
|
2516
|
+
}, [l]);
|
|
2517
|
+
const H = t ? "a" : "button", F = $t({
|
|
2514
2518
|
transition: I,
|
|
2515
2519
|
shape: y,
|
|
2516
2520
|
allowShapeTransformation: v,
|
|
2517
|
-
width:
|
|
2521
|
+
width: f,
|
|
2518
2522
|
href: t,
|
|
2519
2523
|
activated: N,
|
|
2520
|
-
label:
|
|
2524
|
+
label: s,
|
|
2521
2525
|
iconSelected: w,
|
|
2522
2526
|
isActive: N,
|
|
2523
|
-
onToggle:
|
|
2527
|
+
onToggle: c,
|
|
2524
2528
|
disabled: n,
|
|
2525
|
-
icon:
|
|
2529
|
+
icon: o,
|
|
2526
2530
|
variant: e,
|
|
2527
|
-
className:
|
|
2531
|
+
className: u,
|
|
2528
2532
|
size: h,
|
|
2529
|
-
children:
|
|
2530
|
-
...
|
|
2531
|
-
}),
|
|
2533
|
+
children: s,
|
|
2534
|
+
...E
|
|
2535
|
+
}), M = D(null), x = d || M;
|
|
2532
2536
|
return I = { duration: 0.3, ...I }, /* @__PURE__ */ X(
|
|
2533
|
-
|
|
2537
|
+
H,
|
|
2534
2538
|
{
|
|
2535
2539
|
disabled: n,
|
|
2536
2540
|
href: t,
|
|
2537
2541
|
style: { transition: I.duration + "s" },
|
|
2538
2542
|
className: F.iconButton,
|
|
2539
|
-
"aria-label":
|
|
2540
|
-
...
|
|
2543
|
+
"aria-label": s,
|
|
2544
|
+
...E,
|
|
2541
2545
|
title: void 0,
|
|
2542
2546
|
onClick: g,
|
|
2543
2547
|
ref: x,
|
|
@@ -2547,7 +2551,7 @@ const it = ({
|
|
|
2547
2551
|
{
|
|
2548
2552
|
targetRef: x,
|
|
2549
2553
|
trigger: n ? null : void 0,
|
|
2550
|
-
text:
|
|
2554
|
+
text: r
|
|
2551
2555
|
}
|
|
2552
2556
|
),
|
|
2553
2557
|
/* @__PURE__ */ m("div", { className: F.touchTarget }),
|
|
@@ -2562,22 +2566,22 @@ const it = ({
|
|
|
2562
2566
|
"on-primary": N
|
|
2563
2567
|
},
|
|
2564
2568
|
e === "filled" && {
|
|
2565
|
-
"on-surface-variant": !N && !!
|
|
2566
|
-
"on-primary": N || !
|
|
2569
|
+
"on-surface-variant": !N && !!c,
|
|
2570
|
+
"on-primary": N || !c
|
|
2567
2571
|
},
|
|
2568
2572
|
e === "tonal" && {
|
|
2569
|
-
"on-secondary": N && !!
|
|
2570
|
-
"on-secondary-container": !N || !
|
|
2573
|
+
"on-secondary": N && !!c,
|
|
2574
|
+
"on-secondary-container": !N || !c
|
|
2571
2575
|
},
|
|
2572
2576
|
e === "outlined" && {
|
|
2573
|
-
"inverse-on-surface": N && !!
|
|
2574
|
-
"on-surface-variant": !N || !
|
|
2577
|
+
"inverse-on-surface": N && !!c,
|
|
2578
|
+
"on-surface-variant": !N || !c
|
|
2575
2579
|
}
|
|
2576
2580
|
),
|
|
2577
2581
|
stateClassName: "state-ripple-group-[icon-button]"
|
|
2578
2582
|
}
|
|
2579
2583
|
),
|
|
2580
|
-
|
|
2584
|
+
o && /* @__PURE__ */ m(ie, { icon: o, className: F.icon })
|
|
2581
2585
|
]
|
|
2582
2586
|
}
|
|
2583
2587
|
);
|
|
@@ -2605,83 +2609,84 @@ const zn = ({
|
|
|
2605
2609
|
label: t,
|
|
2606
2610
|
variant: n = "primary",
|
|
2607
2611
|
size: a = "medium",
|
|
2608
|
-
href:
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
defaultOpen: i = !1,
|
|
2612
|
+
href: r,
|
|
2613
|
+
icon: s,
|
|
2614
|
+
extended: c = !1,
|
|
2615
|
+
ref: l,
|
|
2616
|
+
transition: i,
|
|
2617
|
+
children: o,
|
|
2618
|
+
open: h,
|
|
2619
|
+
defaultOpen: w = !1,
|
|
2617
2620
|
onOpenChange: u,
|
|
2618
2621
|
...d
|
|
2619
2622
|
}) => {
|
|
2620
|
-
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2623
|
-
},
|
|
2624
|
-
(
|
|
2625
|
-
),
|
|
2626
|
-
href:
|
|
2627
|
-
icon:
|
|
2628
|
-
extended:
|
|
2623
|
+
i = { duration: 0.3, ease: "easeInOut", ...i };
|
|
2624
|
+
const f = D(null), y = l || f, v = typeof h == "boolean", [I, b] = R(w), E = v ? h : I, N = (x) => {
|
|
2625
|
+
v || b(x), u == null || u(x);
|
|
2626
|
+
}, A = Z.Children.toArray(o).filter(
|
|
2627
|
+
(x) => Z.isValidElement(x) && x.type === ke
|
|
2628
|
+
), g = Mt({
|
|
2629
|
+
href: r,
|
|
2630
|
+
icon: s,
|
|
2631
|
+
extended: c,
|
|
2629
2632
|
label: t,
|
|
2630
2633
|
size: a,
|
|
2631
2634
|
variant: n,
|
|
2632
2635
|
className: e,
|
|
2633
|
-
transition:
|
|
2636
|
+
transition: i,
|
|
2634
2637
|
children: t,
|
|
2635
|
-
open:
|
|
2636
|
-
}),
|
|
2638
|
+
open: E
|
|
2639
|
+
}), H = q.create(Ce), F = q.create(be);
|
|
2637
2640
|
q.create(ke);
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2641
|
+
const M = (x) => /* @__PURE__ */ m(
|
|
2642
|
+
H,
|
|
2640
2643
|
{
|
|
2641
|
-
icon:
|
|
2642
|
-
extended:
|
|
2644
|
+
icon: s,
|
|
2645
|
+
extended: c,
|
|
2643
2646
|
label: t,
|
|
2644
2647
|
variant: n + "Container",
|
|
2645
2648
|
size: a,
|
|
2646
|
-
className:
|
|
2647
|
-
"aria-expanded":
|
|
2648
|
-
onClick: () =>
|
|
2649
|
+
className: g.fab + " " + (e ?? ""),
|
|
2650
|
+
"aria-expanded": E,
|
|
2651
|
+
onClick: () => N(!0),
|
|
2649
2652
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2650
2653
|
transition: {
|
|
2651
|
-
duration:
|
|
2654
|
+
duration: i.duration,
|
|
2652
2655
|
ease: "easeInOut",
|
|
2653
|
-
borderRadius: { duration:
|
|
2654
|
-
background: { duration:
|
|
2655
|
-
...
|
|
2656
|
+
borderRadius: { duration: i.duration, ease: "easeInOut" },
|
|
2657
|
+
background: { duration: i.duration, ease: "easeInOut" },
|
|
2658
|
+
...i
|
|
2656
2659
|
},
|
|
2657
|
-
...
|
|
2660
|
+
...x
|
|
2658
2661
|
}
|
|
2659
2662
|
);
|
|
2660
|
-
return /* @__PURE__ */ X("div", { className:
|
|
2661
|
-
/* @__PURE__ */ m(
|
|
2662
|
-
const
|
|
2663
|
-
return
|
|
2664
|
-
|
|
2665
|
-
const
|
|
2663
|
+
return /* @__PURE__ */ X("div", { className: g.fabMenu, ref: y, ...d, children: [
|
|
2664
|
+
/* @__PURE__ */ m(se, { children: E && /* @__PURE__ */ m("div", { className: g.actions, role: "menu", "aria-hidden": !E, children: (() => {
|
|
2665
|
+
const x = A.length;
|
|
2666
|
+
return A.map((S, V) => {
|
|
2667
|
+
S.props;
|
|
2668
|
+
const G = x - 1 - V, T = ((i == null ? void 0 : i.delay) ?? 0) + G * 0.06, _ = {
|
|
2666
2669
|
open: {
|
|
2670
|
+
overflow: "visible",
|
|
2667
2671
|
opacity: 1,
|
|
2668
2672
|
width: "auto",
|
|
2669
2673
|
transition: {
|
|
2670
|
-
...
|
|
2671
|
-
delay:
|
|
2674
|
+
...i,
|
|
2675
|
+
delay: T,
|
|
2672
2676
|
opacity: {
|
|
2673
|
-
delay: (
|
|
2677
|
+
delay: (i == null ? void 0 : i.duration) / 2 + T
|
|
2674
2678
|
}
|
|
2675
2679
|
}
|
|
2676
2680
|
},
|
|
2677
2681
|
close: {
|
|
2682
|
+
overflow: "hidden",
|
|
2678
2683
|
opacity: 0,
|
|
2679
2684
|
width: 0,
|
|
2680
2685
|
transition: {
|
|
2681
|
-
...
|
|
2682
|
-
delay:
|
|
2686
|
+
...i,
|
|
2687
|
+
delay: T,
|
|
2683
2688
|
opacity: {
|
|
2684
|
-
duration: (
|
|
2689
|
+
duration: (i == null ? void 0 : i.duration) / 1.5
|
|
2685
2690
|
}
|
|
2686
2691
|
}
|
|
2687
2692
|
}
|
|
@@ -2691,19 +2696,18 @@ const zn = ({
|
|
|
2691
2696
|
{
|
|
2692
2697
|
initial: "close",
|
|
2693
2698
|
animate: "open",
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
transition: r,
|
|
2699
|
+
variants: _,
|
|
2700
|
+
transition: i,
|
|
2697
2701
|
exit: "close",
|
|
2698
2702
|
children: Z.cloneElement(
|
|
2699
|
-
|
|
2703
|
+
S,
|
|
2700
2704
|
{
|
|
2701
|
-
key:
|
|
2705
|
+
key: V,
|
|
2702
2706
|
shape: "rounded",
|
|
2703
2707
|
variant: "filled",
|
|
2704
2708
|
className: () => ({
|
|
2705
2709
|
button: p("max-w-full overflow-hidden", {
|
|
2706
|
-
"px-0": !
|
|
2710
|
+
"px-0": !E,
|
|
2707
2711
|
"bg-primary-container text-on-primary-container ": n === "primary",
|
|
2708
2712
|
"bg-secondary-container text-on-secondary-container": n === "secondary",
|
|
2709
2713
|
"bg-tertiary-container text-on-tertiary-container": n === "tertiary"
|
|
@@ -2720,17 +2724,17 @@ const zn = ({
|
|
|
2720
2724
|
);
|
|
2721
2725
|
});
|
|
2722
2726
|
})() }) }),
|
|
2723
|
-
|
|
2727
|
+
M({
|
|
2724
2728
|
className: "invisible pointer-events-none"
|
|
2725
2729
|
}),
|
|
2726
2730
|
/* @__PURE__ */ X("div", { className: "absolute right-0 top-0", children: [
|
|
2727
|
-
!
|
|
2731
|
+
!E && M({
|
|
2728
2732
|
className: "",
|
|
2729
2733
|
layout: !0,
|
|
2730
2734
|
layoutId: "fab-menu"
|
|
2731
2735
|
}),
|
|
2732
|
-
|
|
2733
|
-
|
|
2736
|
+
E && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
|
|
2737
|
+
F,
|
|
2734
2738
|
{
|
|
2735
2739
|
layout: !0,
|
|
2736
2740
|
layoutId: "fab-menu",
|
|
@@ -2749,20 +2753,20 @@ const zn = ({
|
|
|
2749
2753
|
}),
|
|
2750
2754
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2751
2755
|
transition: {
|
|
2752
|
-
duration:
|
|
2756
|
+
duration: i.duration,
|
|
2753
2757
|
ease: "easeInOut",
|
|
2754
2758
|
borderRadius: {
|
|
2755
|
-
duration:
|
|
2759
|
+
duration: i.duration,
|
|
2756
2760
|
ease: "easeInOut"
|
|
2757
2761
|
},
|
|
2758
2762
|
background: {
|
|
2759
|
-
duration:
|
|
2763
|
+
duration: i.duration,
|
|
2760
2764
|
ease: "easeInOut"
|
|
2761
2765
|
},
|
|
2762
|
-
...
|
|
2766
|
+
...i
|
|
2763
2767
|
},
|
|
2764
2768
|
icon: un,
|
|
2765
|
-
onClick: () =>
|
|
2769
|
+
onClick: () => N(!1),
|
|
2766
2770
|
children: "Close"
|
|
2767
2771
|
}
|
|
2768
2772
|
) })
|
|
@@ -2773,10 +2777,10 @@ const zn = ({
|
|
|
2773
2777
|
valueFormatter: t,
|
|
2774
2778
|
step: n = 10,
|
|
2775
2779
|
name: a,
|
|
2776
|
-
value:
|
|
2777
|
-
min:
|
|
2778
|
-
max:
|
|
2779
|
-
marks:
|
|
2780
|
+
value: r = 0,
|
|
2781
|
+
min: s = 0,
|
|
2782
|
+
max: c = 100,
|
|
2783
|
+
marks: l = [
|
|
2780
2784
|
{
|
|
2781
2785
|
value: 0,
|
|
2782
2786
|
label: "0"
|
|
@@ -2786,99 +2790,99 @@ const zn = ({
|
|
|
2786
2790
|
label: "100"
|
|
2787
2791
|
}
|
|
2788
2792
|
],
|
|
2789
|
-
ref:
|
|
2790
|
-
onChange:
|
|
2793
|
+
ref: i,
|
|
2794
|
+
onChange: o,
|
|
2791
2795
|
...h
|
|
2792
2796
|
}) => {
|
|
2793
|
-
const w = (
|
|
2794
|
-
const
|
|
2795
|
-
return
|
|
2796
|
-
},
|
|
2797
|
-
const
|
|
2798
|
-
return (
|
|
2799
|
-
}, [y, v] =
|
|
2800
|
-
F(!0), v(!0),
|
|
2797
|
+
const w = (B) => {
|
|
2798
|
+
const k = d(), U = u();
|
|
2799
|
+
return B === 1 / 0 ? 100 : B === -1 / 0 ? 0 : (B - k) / (U - k) * 100;
|
|
2800
|
+
}, u = (B = !1) => B ? c : c == 1 / 0 ? l[(l == null ? void 0 : l.length) - 1].value : c, d = (B = !1) => B ? s : s == -1 / 0 ? l[0].value : s, f = (B) => {
|
|
2801
|
+
const k = d(!1);
|
|
2802
|
+
return (u(!1) - k) * B / 100 + k;
|
|
2803
|
+
}, [y, v] = R(!1), I = D(null), b = i || I, [E, N] = R(r), [A, g] = R(w(r)), [H, F] = R(!1), M = (B) => {
|
|
2804
|
+
F(!0), v(!0), V(B);
|
|
2801
2805
|
}, x = () => {
|
|
2802
2806
|
F(!1), v(!1);
|
|
2803
2807
|
};
|
|
2804
|
-
|
|
2805
|
-
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove",
|
|
2806
|
-
}), [
|
|
2807
|
-
const
|
|
2808
|
+
$(() => (H ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", V), window.addEventListener("touchend", x), window.addEventListener("touchmove", V)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V)), () => {
|
|
2809
|
+
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V);
|
|
2810
|
+
}), [H]);
|
|
2811
|
+
const S = Wt({
|
|
2808
2812
|
className: e,
|
|
2809
2813
|
isChanging: y,
|
|
2810
|
-
marks:
|
|
2811
|
-
max:
|
|
2812
|
-
min:
|
|
2814
|
+
marks: l,
|
|
2815
|
+
max: c,
|
|
2816
|
+
min: s,
|
|
2813
2817
|
name: a,
|
|
2814
2818
|
step: n,
|
|
2815
|
-
value:
|
|
2819
|
+
value: E,
|
|
2816
2820
|
valueFormatter: t,
|
|
2817
|
-
onChange:
|
|
2818
|
-
}),
|
|
2819
|
-
const
|
|
2820
|
-
if (
|
|
2821
|
-
const U =
|
|
2821
|
+
onChange: o
|
|
2822
|
+
}), V = (B) => {
|
|
2823
|
+
const k = b == null ? void 0 : b.current;
|
|
2824
|
+
if (k) {
|
|
2825
|
+
const U = k.getBoundingClientRect().left, ae = ((B.type === "touchmove" || B.type === "touchstart" ? B.touches[0].clientX : B.clientX) - U) / k.offsetWidth * 100;
|
|
2822
2826
|
G({ percent: ae });
|
|
2823
2827
|
}
|
|
2824
2828
|
}, G = ({
|
|
2825
|
-
percent:
|
|
2826
|
-
value:
|
|
2829
|
+
percent: B,
|
|
2830
|
+
value: k
|
|
2827
2831
|
}) => {
|
|
2828
|
-
if (
|
|
2829
|
-
if (
|
|
2830
|
-
N(
|
|
2832
|
+
if (B) {
|
|
2833
|
+
if (B >= 100) {
|
|
2834
|
+
N(u(!0)), g(100);
|
|
2831
2835
|
return;
|
|
2832
2836
|
}
|
|
2833
|
-
if (
|
|
2834
|
-
N(
|
|
2837
|
+
if (B <= 0) {
|
|
2838
|
+
N(d(!0)), g(0);
|
|
2835
2839
|
return;
|
|
2836
2840
|
}
|
|
2837
|
-
|
|
2838
|
-
} else if (
|
|
2839
|
-
if (
|
|
2840
|
-
N(
|
|
2841
|
+
k = f(B), k == d() && (k = d(!0)), k == u() && (k = u(!0));
|
|
2842
|
+
} else if (k != null) {
|
|
2843
|
+
if (k >= u()) {
|
|
2844
|
+
N(u(!0)), g(100);
|
|
2841
2845
|
return;
|
|
2842
2846
|
}
|
|
2843
|
-
if (
|
|
2844
|
-
N(
|
|
2847
|
+
if (k <= d()) {
|
|
2848
|
+
N(d(!0)), g(0);
|
|
2845
2849
|
return;
|
|
2846
2850
|
}
|
|
2847
|
-
|
|
2851
|
+
B = w(k);
|
|
2848
2852
|
} else
|
|
2849
2853
|
return;
|
|
2850
|
-
n != null ?
|
|
2851
|
-
let ue = K.value === 1 / 0 ?
|
|
2852
|
-
return ue = Math.abs(ue -
|
|
2853
|
-
}).value),
|
|
2854
|
-
}, [
|
|
2855
|
-
return
|
|
2856
|
-
const
|
|
2854
|
+
n != null ? k = Math.round((k - d()) / n) * n + d() : l && (k = l.reduce((U, K, ae) => {
|
|
2855
|
+
let ue = K.value === 1 / 0 ? u() : K.value === -1 / 0 ? d() : K.value, C = U.value === 1 / 0 ? u() : U.value === -1 / 0 ? d() : U.value;
|
|
2856
|
+
return ue = Math.abs(ue - k), C = Math.abs(C - k), ue < C ? K : U;
|
|
2857
|
+
}).value), k >= u() && (k = u(!0)), k <= d() && (k = d(!0)), B = w(k), N(k), g(B), o && o(k);
|
|
2858
|
+
}, [T, _] = R(0);
|
|
2859
|
+
return $(() => {
|
|
2860
|
+
const B = () => {
|
|
2857
2861
|
b.current && _(b.current.offsetWidth);
|
|
2858
2862
|
};
|
|
2859
|
-
return
|
|
2860
|
-
window.removeEventListener("resize",
|
|
2863
|
+
return B(), window.addEventListener("resize", B), () => {
|
|
2864
|
+
window.removeEventListener("resize", B);
|
|
2861
2865
|
};
|
|
2862
2866
|
}, []), /* @__PURE__ */ X(
|
|
2863
2867
|
"div",
|
|
2864
2868
|
{
|
|
2865
2869
|
tabIndex: 0,
|
|
2866
|
-
onKeyDown: (
|
|
2867
|
-
switch (
|
|
2870
|
+
onKeyDown: (B) => {
|
|
2871
|
+
switch (B.key) {
|
|
2868
2872
|
case "ArrowRight":
|
|
2869
2873
|
if (n)
|
|
2870
|
-
G({ value:
|
|
2871
|
-
else if (
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2874
|
+
G({ value: E + n });
|
|
2875
|
+
else if (l) {
|
|
2876
|
+
const k = l.find((U) => U.value > E);
|
|
2877
|
+
k && G({ value: k.value });
|
|
2874
2878
|
}
|
|
2875
2879
|
break;
|
|
2876
2880
|
case "ArrowLeft":
|
|
2877
2881
|
if (n)
|
|
2878
|
-
G({ value:
|
|
2879
|
-
else if (
|
|
2880
|
-
const
|
|
2881
|
-
|
|
2882
|
+
G({ value: E - n });
|
|
2883
|
+
else if (l) {
|
|
2884
|
+
const k = l.slice(0).reverse().find((U, K, ae) => E === 1 / 0 ? K === 1 : U.value < E);
|
|
2885
|
+
k && G({ value: k.value });
|
|
2882
2886
|
}
|
|
2883
2887
|
break;
|
|
2884
2888
|
default:
|
|
@@ -2886,24 +2890,24 @@ const zn = ({
|
|
|
2886
2890
|
}
|
|
2887
2891
|
},
|
|
2888
2892
|
role: "slider",
|
|
2889
|
-
"aria-valuemin":
|
|
2890
|
-
"aria-valuemax":
|
|
2891
|
-
"aria-valuenow":
|
|
2892
|
-
"aria-valuetext":
|
|
2893
|
-
className:
|
|
2894
|
-
onMouseDown:
|
|
2895
|
-
onClick:
|
|
2893
|
+
"aria-valuemin": d(!0),
|
|
2894
|
+
"aria-valuemax": u(!0),
|
|
2895
|
+
"aria-valuenow": E,
|
|
2896
|
+
"aria-valuetext": E.toString(),
|
|
2897
|
+
className: S.slider,
|
|
2898
|
+
onMouseDown: M,
|
|
2899
|
+
onClick: V,
|
|
2896
2900
|
ref: b,
|
|
2897
|
-
onTouchStart:
|
|
2898
|
-
onDragStart: (
|
|
2901
|
+
onTouchStart: M,
|
|
2902
|
+
onDragStart: (B) => B.preventDefault(),
|
|
2899
2903
|
...h,
|
|
2900
2904
|
children: [
|
|
2901
|
-
/* @__PURE__ */ m("input", { type: "hidden", name: a, value:
|
|
2902
|
-
/* @__PURE__ */ m("div", { className:
|
|
2903
|
-
/* @__PURE__ */ m("div", { className:
|
|
2905
|
+
/* @__PURE__ */ m("input", { type: "hidden", name: a, value: E }),
|
|
2906
|
+
/* @__PURE__ */ m("div", { className: S.activeTrack, style: { flex: A / 100 } }),
|
|
2907
|
+
/* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: y && /* @__PURE__ */ m(
|
|
2904
2908
|
q.div,
|
|
2905
2909
|
{
|
|
2906
|
-
className:
|
|
2910
|
+
className: S.valueIndicator,
|
|
2907
2911
|
initial: "hidden",
|
|
2908
2912
|
animate: "visible",
|
|
2909
2913
|
exit: "hidden",
|
|
@@ -2917,13 +2921,13 @@ const zn = ({
|
|
|
2917
2921
|
hidden: { opacity: 1, scale: 0 }
|
|
2918
2922
|
},
|
|
2919
2923
|
transition: { duration: 0.1 },
|
|
2920
|
-
children: t ? t(
|
|
2924
|
+
children: t ? t(E) : E
|
|
2921
2925
|
}
|
|
2922
2926
|
) }) }),
|
|
2923
2927
|
/* @__PURE__ */ m(
|
|
2924
2928
|
"div",
|
|
2925
2929
|
{
|
|
2926
|
-
className:
|
|
2930
|
+
className: S.inactiveTrack,
|
|
2927
2931
|
style: { flex: 1 - A / 100 }
|
|
2928
2932
|
}
|
|
2929
2933
|
),
|
|
@@ -2931,21 +2935,21 @@ const zn = ({
|
|
|
2931
2935
|
"div",
|
|
2932
2936
|
{
|
|
2933
2937
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2934
|
-
children:
|
|
2938
|
+
children: l && l.map((B, k) => {
|
|
2935
2939
|
let U = null;
|
|
2936
|
-
const K = (y ? 9 : 10) /
|
|
2940
|
+
const K = (y ? 9 : 10) / T * 100, ae = w(B.value);
|
|
2937
2941
|
return ae <= A - K ? U = !0 : ae >= A + K && (U = !1), /* @__PURE__ */ m(
|
|
2938
2942
|
"div",
|
|
2939
2943
|
{
|
|
2940
|
-
className: p(
|
|
2944
|
+
className: p(S.dot, {
|
|
2941
2945
|
"bg-primary-container": U != null && U,
|
|
2942
2946
|
"bg-primary": U != null && !U
|
|
2943
2947
|
}),
|
|
2944
2948
|
style: {
|
|
2945
|
-
left: `${w(
|
|
2949
|
+
left: `${w(B.value)}%`
|
|
2946
2950
|
}
|
|
2947
2951
|
},
|
|
2948
|
-
|
|
2952
|
+
k
|
|
2949
2953
|
);
|
|
2950
2954
|
})
|
|
2951
2955
|
}
|
|
@@ -2958,34 +2962,34 @@ const zn = ({
|
|
|
2958
2962
|
className: t,
|
|
2959
2963
|
children: n,
|
|
2960
2964
|
title: a,
|
|
2961
|
-
position:
|
|
2962
|
-
extended:
|
|
2963
|
-
divider:
|
|
2964
|
-
onExtendedChange:
|
|
2965
|
-
closeIcon:
|
|
2966
|
-
transition:
|
|
2965
|
+
position: r = "right",
|
|
2966
|
+
extended: s,
|
|
2967
|
+
divider: c,
|
|
2968
|
+
onExtendedChange: l,
|
|
2969
|
+
closeIcon: i = ge,
|
|
2970
|
+
transition: o,
|
|
2967
2971
|
...h
|
|
2968
2972
|
}) => {
|
|
2969
|
-
|
|
2970
|
-
const [w,
|
|
2971
|
-
transition:
|
|
2973
|
+
o = { duration: 0.3, ...o };
|
|
2974
|
+
const [w, u] = R(s ?? !0), d = Bt({
|
|
2975
|
+
transition: o,
|
|
2972
2976
|
title: a,
|
|
2973
|
-
position:
|
|
2974
|
-
closeIcon:
|
|
2977
|
+
position: r,
|
|
2978
|
+
closeIcon: i,
|
|
2975
2979
|
className: t,
|
|
2976
2980
|
children: n,
|
|
2977
|
-
onExtendedChange:
|
|
2978
|
-
divider:
|
|
2981
|
+
onExtendedChange: l,
|
|
2982
|
+
divider: c,
|
|
2979
2983
|
isExtended: w,
|
|
2980
2984
|
extended: w,
|
|
2981
2985
|
variant: e
|
|
2982
2986
|
});
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
}, [w]),
|
|
2986
|
-
|
|
2987
|
-
}, [
|
|
2988
|
-
const
|
|
2987
|
+
$(() => {
|
|
2988
|
+
l == null || l(w ?? !1);
|
|
2989
|
+
}, [w]), $(() => {
|
|
2990
|
+
s != null && u(s);
|
|
2991
|
+
}, [s]);
|
|
2992
|
+
const f = {
|
|
2989
2993
|
close: {
|
|
2990
2994
|
width: 0
|
|
2991
2995
|
},
|
|
@@ -2993,58 +2997,58 @@ const zn = ({
|
|
|
2993
2997
|
width: "auto"
|
|
2994
2998
|
}
|
|
2995
2999
|
}, y = () => /* @__PURE__ */ X(me, { children: [
|
|
2996
|
-
/* @__PURE__ */ m(
|
|
3000
|
+
/* @__PURE__ */ m(se, { children: e == "modal" && w && /* @__PURE__ */ m(
|
|
2997
3001
|
q.div,
|
|
2998
3002
|
{
|
|
2999
3003
|
initial: { opacity: 0 },
|
|
3000
3004
|
animate: { opacity: 1 },
|
|
3001
3005
|
exit: { opacity: 0 },
|
|
3002
|
-
transition:
|
|
3003
|
-
onClick: () =>
|
|
3004
|
-
className:
|
|
3006
|
+
transition: o,
|
|
3007
|
+
onClick: () => u(!1),
|
|
3008
|
+
className: d.overlay
|
|
3005
3009
|
}
|
|
3006
3010
|
) }),
|
|
3007
|
-
/* @__PURE__ */ m(
|
|
3011
|
+
/* @__PURE__ */ m(se, { children: w && /* @__PURE__ */ X(
|
|
3008
3012
|
"div",
|
|
3009
3013
|
{
|
|
3010
3014
|
...h,
|
|
3011
|
-
className:
|
|
3012
|
-
style: { transition:
|
|
3015
|
+
className: d.sideSheet,
|
|
3016
|
+
style: { transition: o.duration + "s" },
|
|
3013
3017
|
children: [
|
|
3014
3018
|
/* @__PURE__ */ X(
|
|
3015
3019
|
q.div,
|
|
3016
3020
|
{
|
|
3017
|
-
variants:
|
|
3018
|
-
initial:
|
|
3021
|
+
variants: f,
|
|
3022
|
+
initial: s === !1 ? "open" : "close",
|
|
3019
3023
|
animate: "open",
|
|
3020
3024
|
exit: "close",
|
|
3021
|
-
className:
|
|
3025
|
+
className: d.container,
|
|
3022
3026
|
children: [
|
|
3023
|
-
/* @__PURE__ */ X("div", { className:
|
|
3024
|
-
a && /* @__PURE__ */ m("p", { className:
|
|
3027
|
+
/* @__PURE__ */ X("div", { className: d.header, children: [
|
|
3028
|
+
a && /* @__PURE__ */ m("p", { className: d.title, children: a }),
|
|
3025
3029
|
/* @__PURE__ */ m(
|
|
3026
3030
|
be,
|
|
3027
3031
|
{
|
|
3028
3032
|
size: "small",
|
|
3029
3033
|
label: "close",
|
|
3030
|
-
icon:
|
|
3031
|
-
onClick: () =>
|
|
3032
|
-
className:
|
|
3034
|
+
icon: i,
|
|
3035
|
+
onClick: () => u(!1),
|
|
3036
|
+
className: d.closeButton
|
|
3033
3037
|
}
|
|
3034
3038
|
)
|
|
3035
3039
|
] }),
|
|
3036
3040
|
/* @__PURE__ */ m(
|
|
3037
3041
|
"div",
|
|
3038
3042
|
{
|
|
3039
|
-
className:
|
|
3040
|
-
style: { transition:
|
|
3043
|
+
className: d.content,
|
|
3044
|
+
style: { transition: o.duration + "s" },
|
|
3041
3045
|
children: n
|
|
3042
3046
|
}
|
|
3043
3047
|
)
|
|
3044
3048
|
]
|
|
3045
3049
|
}
|
|
3046
3050
|
),
|
|
3047
|
-
(
|
|
3051
|
+
(c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: d.divider, orientation: "vertical" })
|
|
3048
3052
|
]
|
|
3049
3053
|
}
|
|
3050
3054
|
) })
|
|
@@ -3055,41 +3059,41 @@ const zn = ({
|
|
|
3055
3059
|
className: t,
|
|
3056
3060
|
duration: n,
|
|
3057
3061
|
closeIcon: a = ge,
|
|
3058
|
-
onClose:
|
|
3059
|
-
...
|
|
3062
|
+
onClose: r,
|
|
3063
|
+
...s
|
|
3060
3064
|
}) => {
|
|
3061
|
-
const [
|
|
3065
|
+
const [c, l] = R(!0), i = Dt({
|
|
3062
3066
|
className: t,
|
|
3063
3067
|
closeIcon: a,
|
|
3064
3068
|
duration: n,
|
|
3065
|
-
isVisible:
|
|
3066
|
-
onClose:
|
|
3069
|
+
isVisible: c,
|
|
3070
|
+
onClose: r,
|
|
3067
3071
|
message: e
|
|
3068
3072
|
});
|
|
3069
|
-
|
|
3073
|
+
$(() => {
|
|
3070
3074
|
n && setTimeout(() => {
|
|
3071
|
-
|
|
3075
|
+
o();
|
|
3072
3076
|
}, n);
|
|
3073
3077
|
}, [n]);
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3078
|
+
const o = () => {
|
|
3079
|
+
l(!1), r == null || r();
|
|
3076
3080
|
};
|
|
3077
|
-
return /* @__PURE__ */ m(
|
|
3081
|
+
return /* @__PURE__ */ m(se, { children: c && /* @__PURE__ */ m(
|
|
3078
3082
|
q.div,
|
|
3079
3083
|
{
|
|
3080
3084
|
initial: { height: 0 },
|
|
3081
3085
|
animate: { height: "auto" },
|
|
3082
3086
|
exit: { height: 0 },
|
|
3083
3087
|
transition: { duration: 0.1 },
|
|
3084
|
-
className:
|
|
3085
|
-
...
|
|
3086
|
-
children: /* @__PURE__ */ X("div", { className:
|
|
3087
|
-
/* @__PURE__ */ m("p", { className:
|
|
3088
|
+
className: i.snackbar,
|
|
3089
|
+
...s,
|
|
3090
|
+
children: /* @__PURE__ */ X("div", { className: i.container, children: [
|
|
3091
|
+
/* @__PURE__ */ m("p", { className: i.supportingText, children: e }),
|
|
3088
3092
|
/* @__PURE__ */ m(
|
|
3089
3093
|
be,
|
|
3090
3094
|
{
|
|
3091
|
-
onClick: () =>
|
|
3092
|
-
className:
|
|
3095
|
+
onClick: () => o(),
|
|
3096
|
+
className: i.icon,
|
|
3093
3097
|
icon: a,
|
|
3094
3098
|
label: "close the snackbar"
|
|
3095
3099
|
}
|
|
@@ -3102,39 +3106,39 @@ const zn = ({
|
|
|
3102
3106
|
className: t,
|
|
3103
3107
|
activeIcon: n,
|
|
3104
3108
|
disabled: a = !1,
|
|
3105
|
-
inactiveIcon:
|
|
3106
|
-
onChange:
|
|
3107
|
-
onClick:
|
|
3108
|
-
onKeyDown:
|
|
3109
|
-
ref:
|
|
3110
|
-
...
|
|
3109
|
+
inactiveIcon: r,
|
|
3110
|
+
onChange: s,
|
|
3111
|
+
onClick: c,
|
|
3112
|
+
onKeyDown: l,
|
|
3113
|
+
ref: i,
|
|
3114
|
+
...o
|
|
3111
3115
|
}) => {
|
|
3112
|
-
const [h, w] =
|
|
3113
|
-
a || (
|
|
3114
|
-
},
|
|
3115
|
-
a || ((b.key === " " || b.key === "Enter") && (b.preventDefault(),
|
|
3116
|
-
},
|
|
3117
|
-
w(!h),
|
|
3116
|
+
const [h, w] = R(e), u = (b) => {
|
|
3117
|
+
a || (f(), c && c(b));
|
|
3118
|
+
}, d = (b) => {
|
|
3119
|
+
a || ((b.key === " " || b.key === "Enter") && (b.preventDefault(), f()), l && l(b));
|
|
3120
|
+
}, f = () => {
|
|
3121
|
+
w(!h), s == null || s(!h);
|
|
3118
3122
|
}, y = At({
|
|
3119
3123
|
className: t,
|
|
3120
3124
|
isSelected: h,
|
|
3121
3125
|
activeIcon: n,
|
|
3122
|
-
inactiveIcon:
|
|
3126
|
+
inactiveIcon: r,
|
|
3123
3127
|
disabled: a,
|
|
3124
3128
|
selected: h,
|
|
3125
|
-
onChange:
|
|
3126
|
-
}), v = D(null), I =
|
|
3129
|
+
onChange: s
|
|
3130
|
+
}), v = D(null), I = i || v;
|
|
3127
3131
|
return /* @__PURE__ */ X(
|
|
3128
3132
|
q.div,
|
|
3129
3133
|
{
|
|
3130
3134
|
role: "switch",
|
|
3131
3135
|
"aria-checked": h,
|
|
3132
3136
|
tabIndex: a ? -1 : 0,
|
|
3133
|
-
onKeyDown:
|
|
3134
|
-
onClick:
|
|
3137
|
+
onKeyDown: d,
|
|
3138
|
+
onClick: u,
|
|
3135
3139
|
ref: I,
|
|
3136
3140
|
className: y.switch,
|
|
3137
|
-
...
|
|
3141
|
+
...o,
|
|
3138
3142
|
children: [
|
|
3139
3143
|
/* @__PURE__ */ m("input", { type: "hidden", value: h ? "1" : "0" }),
|
|
3140
3144
|
/* @__PURE__ */ X(
|
|
@@ -3149,11 +3153,11 @@ const zn = ({
|
|
|
3149
3153
|
},
|
|
3150
3154
|
className: y.handleContainer,
|
|
3151
3155
|
children: [
|
|
3152
|
-
/* @__PURE__ */ m("div", { className: y.handle, children: (h ? n :
|
|
3156
|
+
/* @__PURE__ */ m("div", { className: y.handle, children: (h ? n : r) && /* @__PURE__ */ m(
|
|
3153
3157
|
ie,
|
|
3154
3158
|
{
|
|
3155
3159
|
className: y.icon,
|
|
3156
|
-
icon: h ? n :
|
|
3160
|
+
icon: h ? n : r
|
|
3157
3161
|
}
|
|
3158
3162
|
) }),
|
|
3159
3163
|
/* @__PURE__ */ m("div", { className: y.handleStateLayer })
|
|
@@ -3168,57 +3172,57 @@ const zn = ({
|
|
|
3168
3172
|
onClick: t,
|
|
3169
3173
|
label: n,
|
|
3170
3174
|
variant: a = "primary",
|
|
3171
|
-
href:
|
|
3172
|
-
icon:
|
|
3173
|
-
selectedTab:
|
|
3174
|
-
setSelectedTab:
|
|
3175
|
-
tabsId:
|
|
3176
|
-
index:
|
|
3175
|
+
href: r,
|
|
3176
|
+
icon: s,
|
|
3177
|
+
selectedTab: c,
|
|
3178
|
+
setSelectedTab: l,
|
|
3179
|
+
tabsId: i,
|
|
3180
|
+
index: o,
|
|
3177
3181
|
onTabSelected: h,
|
|
3178
3182
|
scrollable: w = !1,
|
|
3179
|
-
selected:
|
|
3180
|
-
ref:
|
|
3181
|
-
...
|
|
3183
|
+
selected: u = !1,
|
|
3184
|
+
ref: d,
|
|
3185
|
+
...f
|
|
3182
3186
|
}) => {
|
|
3183
|
-
const y = D(null), v =
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
}, [
|
|
3187
|
-
|
|
3187
|
+
const y = D(null), v = d || y, [I, b] = R(u);
|
|
3188
|
+
$(() => {
|
|
3189
|
+
u && c == null ? b(!0) : b(c == o && o != null);
|
|
3190
|
+
}, [c]), $(() => {
|
|
3191
|
+
c == o && h && h({
|
|
3188
3192
|
ref: v,
|
|
3189
|
-
index:
|
|
3193
|
+
index: o || 0,
|
|
3190
3194
|
label: n,
|
|
3191
|
-
icon:
|
|
3195
|
+
icon: s
|
|
3192
3196
|
});
|
|
3193
|
-
}, [
|
|
3194
|
-
const
|
|
3195
|
-
|
|
3197
|
+
}, [c]);
|
|
3198
|
+
const E = r ? "a" : "button", N = (g) => {
|
|
3199
|
+
l && l(o ?? null), t && t(g);
|
|
3196
3200
|
}, A = Pt({
|
|
3197
3201
|
className: e,
|
|
3198
3202
|
onTabSelected: h,
|
|
3199
3203
|
scrollable: w,
|
|
3200
|
-
selectedTab:
|
|
3201
|
-
index:
|
|
3202
|
-
tabsId:
|
|
3204
|
+
selectedTab: c,
|
|
3205
|
+
index: o,
|
|
3206
|
+
tabsId: i,
|
|
3203
3207
|
selected: I,
|
|
3204
3208
|
variant: a,
|
|
3205
|
-
icon:
|
|
3209
|
+
icon: s,
|
|
3206
3210
|
label: n,
|
|
3207
3211
|
isSelected: I,
|
|
3208
|
-
setSelectedTab:
|
|
3209
|
-
href:
|
|
3212
|
+
setSelectedTab: l,
|
|
3213
|
+
href: r
|
|
3210
3214
|
});
|
|
3211
3215
|
return /* @__PURE__ */ X(
|
|
3212
|
-
|
|
3216
|
+
E,
|
|
3213
3217
|
{
|
|
3214
|
-
...
|
|
3218
|
+
...f,
|
|
3215
3219
|
role: "tab",
|
|
3216
3220
|
"aria-selected": I,
|
|
3217
3221
|
ref: v,
|
|
3218
|
-
href:
|
|
3222
|
+
href: r,
|
|
3219
3223
|
className: A.tab,
|
|
3220
3224
|
onClick: N,
|
|
3221
|
-
...
|
|
3225
|
+
...f,
|
|
3222
3226
|
children: [
|
|
3223
3227
|
/* @__PURE__ */ m(
|
|
3224
3228
|
ye,
|
|
@@ -3230,12 +3234,12 @@ const zn = ({
|
|
|
3230
3234
|
}
|
|
3231
3235
|
),
|
|
3232
3236
|
/* @__PURE__ */ X("span", { className: A.content, children: [
|
|
3233
|
-
|
|
3237
|
+
s && /* @__PURE__ */ m(ie, { icon: s, className: A.icon }),
|
|
3234
3238
|
/* @__PURE__ */ m("span", { className: A.label, children: n }),
|
|
3235
3239
|
I && /* @__PURE__ */ m(
|
|
3236
3240
|
q.span,
|
|
3237
3241
|
{
|
|
3238
|
-
layoutId: `underline-${
|
|
3242
|
+
layoutId: `underline-${i}`,
|
|
3239
3243
|
className: A.underline,
|
|
3240
3244
|
transition: { duration: 0.3 }
|
|
3241
3245
|
}
|
|
@@ -3249,121 +3253,121 @@ const zn = ({
|
|
|
3249
3253
|
onTabSelected: t,
|
|
3250
3254
|
children: n,
|
|
3251
3255
|
className: a,
|
|
3252
|
-
selectedTab:
|
|
3253
|
-
setSelectedTab:
|
|
3254
|
-
scrollable:
|
|
3256
|
+
selectedTab: r,
|
|
3257
|
+
setSelectedTab: s,
|
|
3258
|
+
scrollable: c = !1
|
|
3255
3259
|
}) => {
|
|
3256
|
-
const [
|
|
3260
|
+
const [l, i] = R(
|
|
3257
3261
|
null
|
|
3258
3262
|
);
|
|
3259
|
-
let
|
|
3260
|
-
|
|
3261
|
-
const h =
|
|
3263
|
+
let o;
|
|
3264
|
+
r == 0 || r != null ? o = r : o = l;
|
|
3265
|
+
const h = s || i, w = Z.Children.toArray(n).filter(
|
|
3262
3266
|
(v) => Z.isValidElement(v) && v.type === fn
|
|
3263
|
-
),
|
|
3264
|
-
if (t == null || t(v),
|
|
3265
|
-
const I =
|
|
3267
|
+
), u = Z.useRef(null), d = (v) => {
|
|
3268
|
+
if (t == null || t(v), c) {
|
|
3269
|
+
const I = u.current, b = v.ref.current;
|
|
3266
3270
|
if (I && b) {
|
|
3267
|
-
const
|
|
3268
|
-
I.scrollTo({ left:
|
|
3271
|
+
const E = b.offsetLeft + b.offsetWidth / 2 - I.offsetWidth / 2;
|
|
3272
|
+
I.scrollTo({ left: E, behavior: "smooth" });
|
|
3269
3273
|
}
|
|
3270
3274
|
}
|
|
3271
|
-
},
|
|
3275
|
+
}, f = Me(() => Be(), []), y = Ft({
|
|
3272
3276
|
children: n,
|
|
3273
3277
|
onTabSelected: t,
|
|
3274
|
-
scrollable:
|
|
3275
|
-
selectedTab:
|
|
3278
|
+
scrollable: c,
|
|
3279
|
+
selectedTab: o,
|
|
3276
3280
|
setSelectedTab: h,
|
|
3277
3281
|
className: a,
|
|
3278
3282
|
variant: e
|
|
3279
3283
|
});
|
|
3280
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3284
|
+
return /* @__PURE__ */ m("div", { ref: u, role: "tablist", className: y.tabs, children: w.map((v, I) => Z.cloneElement(v, {
|
|
3281
3285
|
key: I,
|
|
3282
3286
|
index: I,
|
|
3283
3287
|
variant: e,
|
|
3284
|
-
selectedTab:
|
|
3288
|
+
selectedTab: o,
|
|
3285
3289
|
setSelectedTab: h,
|
|
3286
|
-
tabsId:
|
|
3287
|
-
onTabSelected:
|
|
3288
|
-
scrollable:
|
|
3290
|
+
tabsId: f,
|
|
3291
|
+
onTabSelected: d,
|
|
3292
|
+
scrollable: c
|
|
3289
3293
|
})) });
|
|
3290
3294
|
}, ar = ({
|
|
3291
3295
|
variant: e = "filled",
|
|
3292
3296
|
disabled: t = !1,
|
|
3293
3297
|
errorText: n,
|
|
3294
3298
|
placeholder: a,
|
|
3295
|
-
suffix:
|
|
3296
|
-
name:
|
|
3297
|
-
label:
|
|
3298
|
-
className:
|
|
3299
|
-
supportingText:
|
|
3300
|
-
trailingIcon:
|
|
3299
|
+
suffix: r,
|
|
3300
|
+
name: s,
|
|
3301
|
+
label: c,
|
|
3302
|
+
className: l,
|
|
3303
|
+
supportingText: i,
|
|
3304
|
+
trailingIcon: o,
|
|
3301
3305
|
leadingIcon: h,
|
|
3302
3306
|
type: w = "text",
|
|
3303
|
-
textLine:
|
|
3304
|
-
autoComplete:
|
|
3305
|
-
onChange:
|
|
3307
|
+
textLine: u = "singleLine",
|
|
3308
|
+
autoComplete: d = "on",
|
|
3309
|
+
onChange: f,
|
|
3306
3310
|
value: y,
|
|
3307
3311
|
showSupportingText: v = !1,
|
|
3308
3312
|
...I
|
|
3309
3313
|
}) => {
|
|
3310
|
-
const [b,
|
|
3314
|
+
const [b, E] = R(y ?? ""), [N, A] = R(!1), [g, H] = R(!1), [F, M] = R(
|
|
3311
3315
|
v
|
|
3312
3316
|
);
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
}, [y]),
|
|
3316
|
-
n != null && n.length ?
|
|
3317
|
-
}, [n]),
|
|
3318
|
-
v ?
|
|
3319
|
-
}, [F,
|
|
3320
|
-
N &&
|
|
3317
|
+
$(() => {
|
|
3318
|
+
E(y ?? "");
|
|
3319
|
+
}, [y]), $(() => {
|
|
3320
|
+
n != null && n.length ? H(!0) : H(!1);
|
|
3321
|
+
}, [n]), $(() => {
|
|
3322
|
+
v ? M(v) : i != null && i.length ? M(!0) : M(!1);
|
|
3323
|
+
}, [F, i]), $(() => {
|
|
3324
|
+
N && H(!1);
|
|
3321
3325
|
}, [N]);
|
|
3322
|
-
const x = Z.useRef(null),
|
|
3326
|
+
const x = Z.useRef(null), S = () => {
|
|
3323
3327
|
x.current && !N && x.current.focus();
|
|
3324
|
-
},
|
|
3328
|
+
}, V = () => {
|
|
3325
3329
|
A(!0);
|
|
3326
3330
|
}, G = (U) => {
|
|
3327
3331
|
const K = U.target.value;
|
|
3328
|
-
|
|
3329
|
-
},
|
|
3332
|
+
E(K), H(!1), typeof f == "function" && f(K);
|
|
3333
|
+
}, T = () => {
|
|
3330
3334
|
A(!1);
|
|
3331
3335
|
}, _ = Ot({
|
|
3332
3336
|
showSupportingText: F,
|
|
3333
3337
|
isFocused: N,
|
|
3334
3338
|
showErrorIcon: g,
|
|
3335
3339
|
disabled: t,
|
|
3336
|
-
name:
|
|
3337
|
-
label:
|
|
3338
|
-
autoComplete:
|
|
3339
|
-
className:
|
|
3340
|
-
onChange:
|
|
3340
|
+
name: s,
|
|
3341
|
+
label: c,
|
|
3342
|
+
autoComplete: d,
|
|
3343
|
+
className: l,
|
|
3344
|
+
onChange: f,
|
|
3341
3345
|
placeholder: a,
|
|
3342
|
-
supportingText:
|
|
3346
|
+
supportingText: i,
|
|
3343
3347
|
type: w,
|
|
3344
3348
|
leadingIcon: h,
|
|
3345
|
-
trailingIcon:
|
|
3349
|
+
trailingIcon: o,
|
|
3346
3350
|
variant: e,
|
|
3347
3351
|
errorText: n,
|
|
3348
3352
|
value: b,
|
|
3349
|
-
suffix:
|
|
3350
|
-
textLine:
|
|
3351
|
-
}), [ne] =
|
|
3352
|
-
let
|
|
3353
|
-
switch (
|
|
3353
|
+
suffix: r,
|
|
3354
|
+
textLine: u
|
|
3355
|
+
}), [ne] = R(Be());
|
|
3356
|
+
let B, k;
|
|
3357
|
+
switch (u) {
|
|
3354
3358
|
case "multiLine":
|
|
3355
|
-
|
|
3359
|
+
k = bt, B = {};
|
|
3356
3360
|
break;
|
|
3357
3361
|
case "textAreas":
|
|
3358
|
-
|
|
3362
|
+
k = "textarea", B = {};
|
|
3359
3363
|
break;
|
|
3360
3364
|
case "singleLine":
|
|
3361
3365
|
default:
|
|
3362
|
-
|
|
3366
|
+
k = "input", B = { type: w };
|
|
3363
3367
|
break;
|
|
3364
3368
|
}
|
|
3365
3369
|
return /* @__PURE__ */ X("div", { className: _.textField, ...I, children: [
|
|
3366
|
-
/* @__PURE__ */ X("fieldset", { onClick:
|
|
3370
|
+
/* @__PURE__ */ X("fieldset", { onClick: S, className: _.content, children: [
|
|
3367
3371
|
/* @__PURE__ */ m("div", { className: _.stateLayer }),
|
|
3368
3372
|
h && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(h) ? h : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: h }) }),
|
|
3369
3373
|
!(!N && !b.length || e == "filled") && /* @__PURE__ */ m(
|
|
@@ -3383,7 +3387,7 @@ const zn = ({
|
|
|
3383
3387
|
className: _.label,
|
|
3384
3388
|
transition: { duration: 0.3 },
|
|
3385
3389
|
layoutId: ne,
|
|
3386
|
-
children:
|
|
3390
|
+
children: c
|
|
3387
3391
|
}
|
|
3388
3392
|
) })
|
|
3389
3393
|
}
|
|
@@ -3392,7 +3396,7 @@ const zn = ({
|
|
|
3392
3396
|
(!N && !b.length || e == "filled") && /* @__PURE__ */ m(
|
|
3393
3397
|
q.label,
|
|
3394
3398
|
{
|
|
3395
|
-
htmlFor:
|
|
3399
|
+
htmlFor: s,
|
|
3396
3400
|
className: p(
|
|
3397
3401
|
"absolute left-4 transition-all duration-300",
|
|
3398
3402
|
{
|
|
@@ -3407,50 +3411,50 @@ const zn = ({
|
|
|
3407
3411
|
className: _.label,
|
|
3408
3412
|
transition: { duration: 0.3 },
|
|
3409
3413
|
layoutId: e == "outlined" ? ne : void 0,
|
|
3410
|
-
children:
|
|
3414
|
+
children: c
|
|
3411
3415
|
}
|
|
3412
3416
|
)
|
|
3413
3417
|
}
|
|
3414
3418
|
),
|
|
3415
3419
|
/* @__PURE__ */ m(
|
|
3416
|
-
|
|
3420
|
+
k,
|
|
3417
3421
|
{
|
|
3418
3422
|
ref: x,
|
|
3419
3423
|
value: b,
|
|
3420
3424
|
onChange: G,
|
|
3421
3425
|
className: _.input,
|
|
3422
|
-
id:
|
|
3423
|
-
name:
|
|
3426
|
+
id: s,
|
|
3427
|
+
name: s,
|
|
3424
3428
|
placeholder: N ? a ?? void 0 : "",
|
|
3425
|
-
onFocus:
|
|
3426
|
-
onBlur:
|
|
3429
|
+
onFocus: V,
|
|
3430
|
+
onBlur: T,
|
|
3427
3431
|
disabled: t,
|
|
3428
|
-
autoComplete:
|
|
3432
|
+
autoComplete: d,
|
|
3429
3433
|
"aria-invalid": !!(n != null && n.length),
|
|
3430
|
-
"aria-label":
|
|
3431
|
-
...
|
|
3434
|
+
"aria-label": c,
|
|
3435
|
+
...B
|
|
3432
3436
|
}
|
|
3433
3437
|
)
|
|
3434
3438
|
] }),
|
|
3435
3439
|
/* @__PURE__ */ m("div", { className: _.activeIndicator }),
|
|
3436
3440
|
!g && /* @__PURE__ */ X(me, { children: [
|
|
3437
|
-
|
|
3441
|
+
o && /* @__PURE__ */ m(
|
|
3438
3442
|
"div",
|
|
3439
3443
|
{
|
|
3440
3444
|
onClick: (U) => {
|
|
3441
3445
|
U.stopPropagation();
|
|
3442
3446
|
},
|
|
3443
3447
|
className: _.trailingIcon,
|
|
3444
|
-
children: Z.isValidElement(
|
|
3448
|
+
children: Z.isValidElement(o) ? o : /* @__PURE__ */ m(ie, { className: "h-5", icon: o })
|
|
3445
3449
|
}
|
|
3446
3450
|
),
|
|
3447
|
-
!
|
|
3451
|
+
!o && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
|
|
3448
3452
|
] }),
|
|
3449
3453
|
g && /* @__PURE__ */ m(
|
|
3450
3454
|
"div",
|
|
3451
3455
|
{
|
|
3452
3456
|
className: p(_.trailingIcon, {
|
|
3453
|
-
" absolute right-0": !
|
|
3457
|
+
" absolute right-0": !o
|
|
3454
3458
|
}),
|
|
3455
3459
|
children: /* @__PURE__ */ m(
|
|
3456
3460
|
ie,
|
|
@@ -3462,7 +3466,7 @@ const zn = ({
|
|
|
3462
3466
|
}
|
|
3463
3467
|
)
|
|
3464
3468
|
] }),
|
|
3465
|
-
F && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n :
|
|
3469
|
+
F && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : i != null && i.length ? i : " " })
|
|
3466
3470
|
] });
|
|
3467
3471
|
}, mn = ({ isSelected: e, icon: t, label: n, variant: a }) => ({
|
|
3468
3472
|
navigationRailItem: p(
|
|
@@ -3504,83 +3508,83 @@ const zn = ({
|
|
|
3504
3508
|
onClick: t,
|
|
3505
3509
|
label: n,
|
|
3506
3510
|
variant: a = "vertical",
|
|
3507
|
-
href:
|
|
3508
|
-
icon:
|
|
3509
|
-
selectedItem:
|
|
3510
|
-
setSelectedItem:
|
|
3511
|
-
index:
|
|
3512
|
-
onItemSelected:
|
|
3511
|
+
href: r,
|
|
3512
|
+
icon: s,
|
|
3513
|
+
selectedItem: c,
|
|
3514
|
+
setSelectedItem: l,
|
|
3515
|
+
index: i,
|
|
3516
|
+
onItemSelected: o,
|
|
3513
3517
|
selected: h = !1,
|
|
3514
3518
|
ref: w,
|
|
3515
|
-
transition:
|
|
3516
|
-
isExtended:
|
|
3517
|
-
iconSelected:
|
|
3519
|
+
transition: u,
|
|
3520
|
+
isExtended: d,
|
|
3521
|
+
iconSelected: f,
|
|
3518
3522
|
style: y,
|
|
3519
3523
|
extendedOnly: v,
|
|
3520
3524
|
children: I,
|
|
3521
3525
|
...b
|
|
3522
3526
|
}) => {
|
|
3523
3527
|
I && (n = I);
|
|
3524
|
-
const
|
|
3525
|
-
|
|
3526
|
-
h &&
|
|
3527
|
-
}, [
|
|
3528
|
-
|
|
3528
|
+
const E = D(null), N = w || E, [A, g] = R(h);
|
|
3529
|
+
$(() => {
|
|
3530
|
+
h && c == null ? g(!0) : g(c == i && i != null);
|
|
3531
|
+
}, [c]), $(() => {
|
|
3532
|
+
c == i && o && o({
|
|
3529
3533
|
ref: N,
|
|
3530
|
-
index:
|
|
3534
|
+
index: i || 0,
|
|
3531
3535
|
label: n,
|
|
3532
|
-
icon:
|
|
3536
|
+
icon: s
|
|
3533
3537
|
});
|
|
3534
|
-
}, [
|
|
3535
|
-
const
|
|
3536
|
-
|
|
3537
|
-
},
|
|
3538
|
-
isExtended:
|
|
3538
|
+
}, [c]);
|
|
3539
|
+
const H = r ? "a" : "button", F = (x) => {
|
|
3540
|
+
l && l(i ?? null), t && t(x);
|
|
3541
|
+
}, M = hn({
|
|
3542
|
+
isExtended: d,
|
|
3539
3543
|
extendedOnly: v,
|
|
3540
3544
|
className: e,
|
|
3541
|
-
onItemSelected:
|
|
3542
|
-
selectedItem:
|
|
3543
|
-
index:
|
|
3544
|
-
transition:
|
|
3545
|
+
onItemSelected: o,
|
|
3546
|
+
selectedItem: c,
|
|
3547
|
+
index: i,
|
|
3548
|
+
transition: u,
|
|
3545
3549
|
selected: A,
|
|
3546
3550
|
variant: a,
|
|
3547
|
-
icon:
|
|
3551
|
+
icon: s,
|
|
3548
3552
|
label: n,
|
|
3549
3553
|
isSelected: A,
|
|
3550
|
-
setSelectedItem:
|
|
3551
|
-
href:
|
|
3554
|
+
setSelectedItem: l,
|
|
3555
|
+
href: r,
|
|
3552
3556
|
children: n,
|
|
3553
|
-
iconSelected:
|
|
3557
|
+
iconSelected: f
|
|
3554
3558
|
});
|
|
3555
|
-
return
|
|
3559
|
+
return u = { duration: 0.3, ...u }, v && !d ? null : (
|
|
3556
3560
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3557
3561
|
// @ts-expect-error
|
|
3558
3562
|
/* @__PURE__ */ X(
|
|
3559
|
-
|
|
3563
|
+
H,
|
|
3560
3564
|
{
|
|
3561
3565
|
...b,
|
|
3562
3566
|
role: "tab",
|
|
3563
3567
|
"aria-selected": A,
|
|
3564
3568
|
ref: N,
|
|
3565
|
-
href:
|
|
3566
|
-
className:
|
|
3569
|
+
href: r,
|
|
3570
|
+
className: M.navigationRailItem,
|
|
3567
3571
|
onClick: F,
|
|
3568
|
-
style: { transition:
|
|
3572
|
+
style: { transition: u.duration + "s", ...y },
|
|
3569
3573
|
children: [
|
|
3570
3574
|
/* @__PURE__ */ X(
|
|
3571
3575
|
q.div,
|
|
3572
3576
|
{
|
|
3573
3577
|
style: {
|
|
3574
|
-
transition: a == "horizontal" ?
|
|
3578
|
+
transition: a == "horizontal" ? u.duration + `s, gap ${u.duration / 2}s ${u.duration - u.duration / 2}s` : u.duration + `s, gap ${u.duration / 3}s ${u.duration - u.duration / 3}s`
|
|
3575
3579
|
},
|
|
3576
|
-
transition:
|
|
3577
|
-
className:
|
|
3580
|
+
transition: u,
|
|
3581
|
+
className: M.container,
|
|
3578
3582
|
children: [
|
|
3579
3583
|
/* @__PURE__ */ m(
|
|
3580
3584
|
ye,
|
|
3581
3585
|
{
|
|
3582
|
-
style: { transition:
|
|
3583
|
-
className:
|
|
3586
|
+
style: { transition: u.duration + "s" },
|
|
3587
|
+
className: M.stateLayer,
|
|
3584
3588
|
colorName: p({
|
|
3585
3589
|
"on-surface": !A,
|
|
3586
3590
|
"on-secondary-container": A
|
|
@@ -3588,28 +3592,28 @@ const zn = ({
|
|
|
3588
3592
|
stateClassName: "state-ripple-group-[navigation-rail-item]"
|
|
3589
3593
|
}
|
|
3590
3594
|
),
|
|
3591
|
-
|
|
3595
|
+
s && /* @__PURE__ */ m(
|
|
3592
3596
|
ie,
|
|
3593
3597
|
{
|
|
3594
|
-
icon: A ?
|
|
3595
|
-
className:
|
|
3598
|
+
icon: A ? f : s,
|
|
3599
|
+
className: M.icon
|
|
3596
3600
|
}
|
|
3597
3601
|
),
|
|
3598
|
-
/* @__PURE__ */ m(
|
|
3602
|
+
/* @__PURE__ */ m(se, { children: a == "horizontal" && (() => {
|
|
3599
3603
|
const x = {
|
|
3600
3604
|
width: 0,
|
|
3601
3605
|
opacity: 0,
|
|
3602
3606
|
transition: {
|
|
3603
|
-
...
|
|
3607
|
+
...u
|
|
3604
3608
|
}
|
|
3605
|
-
},
|
|
3609
|
+
}, S = {
|
|
3606
3610
|
width: "auto",
|
|
3607
3611
|
opacity: 1,
|
|
3608
3612
|
transition: {
|
|
3609
|
-
...
|
|
3613
|
+
...u,
|
|
3610
3614
|
opacity: {
|
|
3611
|
-
duration:
|
|
3612
|
-
delay:
|
|
3615
|
+
duration: u.duration / 2,
|
|
3616
|
+
delay: u.duration - u.duration / 2
|
|
3613
3617
|
}
|
|
3614
3618
|
}
|
|
3615
3619
|
};
|
|
@@ -3617,9 +3621,9 @@ const zn = ({
|
|
|
3617
3621
|
q.span,
|
|
3618
3622
|
{
|
|
3619
3623
|
initial: x,
|
|
3620
|
-
animate:
|
|
3624
|
+
animate: S,
|
|
3621
3625
|
exit: x,
|
|
3622
|
-
className:
|
|
3626
|
+
className: M.label,
|
|
3623
3627
|
children: n
|
|
3624
3628
|
}
|
|
3625
3629
|
);
|
|
@@ -3627,35 +3631,35 @@ const zn = ({
|
|
|
3627
3631
|
]
|
|
3628
3632
|
}
|
|
3629
3633
|
),
|
|
3630
|
-
/* @__PURE__ */ m(
|
|
3634
|
+
/* @__PURE__ */ m(se, { children: a == "vertical" && (() => {
|
|
3631
3635
|
const x = {
|
|
3632
3636
|
height: 0,
|
|
3633
3637
|
opacity: 0,
|
|
3634
3638
|
transition: {
|
|
3635
|
-
...
|
|
3639
|
+
...u,
|
|
3636
3640
|
opacity: {
|
|
3637
3641
|
duration: 0
|
|
3638
3642
|
}
|
|
3639
3643
|
}
|
|
3640
|
-
},
|
|
3644
|
+
}, S = {
|
|
3641
3645
|
height: "auto",
|
|
3642
3646
|
opacity: 1,
|
|
3643
3647
|
transition: {
|
|
3644
|
-
...
|
|
3648
|
+
...u,
|
|
3645
3649
|
opacity: {
|
|
3646
|
-
duration:
|
|
3647
|
-
delay:
|
|
3650
|
+
duration: u.duration / 3,
|
|
3651
|
+
delay: u.duration - u.duration / 3
|
|
3648
3652
|
}
|
|
3649
3653
|
}
|
|
3650
3654
|
};
|
|
3651
3655
|
return /* @__PURE__ */ m(
|
|
3652
3656
|
q.span,
|
|
3653
3657
|
{
|
|
3654
|
-
initial:
|
|
3655
|
-
animate:
|
|
3658
|
+
initial: S,
|
|
3659
|
+
animate: S,
|
|
3656
3660
|
exit: x,
|
|
3657
|
-
className:
|
|
3658
|
-
transition:
|
|
3661
|
+
className: M.label,
|
|
3662
|
+
transition: u,
|
|
3659
3663
|
children: n
|
|
3660
3664
|
}
|
|
3661
3665
|
);
|
|
@@ -3683,15 +3687,15 @@ const zn = ({
|
|
|
3683
3687
|
}), vn = J(
|
|
3684
3688
|
"navigationRail",
|
|
3685
3689
|
wn
|
|
3686
|
-
),
|
|
3690
|
+
), lr = ({
|
|
3687
3691
|
variant: e = "standard",
|
|
3688
3692
|
onItemSelected: t,
|
|
3689
3693
|
children: n,
|
|
3690
3694
|
className: a,
|
|
3691
|
-
selectedItem:
|
|
3692
|
-
extended:
|
|
3693
|
-
alignment:
|
|
3694
|
-
menu:
|
|
3695
|
+
selectedItem: r,
|
|
3696
|
+
extended: s,
|
|
3697
|
+
alignment: c = "top",
|
|
3698
|
+
menu: l = {
|
|
3695
3699
|
closed: {
|
|
3696
3700
|
icon: dn,
|
|
3697
3701
|
label: "Open menu"
|
|
@@ -3701,90 +3705,90 @@ const zn = ({
|
|
|
3701
3705
|
label: "Close menu"
|
|
3702
3706
|
}
|
|
3703
3707
|
},
|
|
3704
|
-
style:
|
|
3705
|
-
onExtendedChange:
|
|
3708
|
+
style: i,
|
|
3709
|
+
onExtendedChange: o,
|
|
3706
3710
|
transition: h,
|
|
3707
3711
|
setSelectedItem: w
|
|
3708
3712
|
}) => {
|
|
3709
|
-
const [
|
|
3713
|
+
const [u, d] = R(null), [f, y] = R(s);
|
|
3710
3714
|
let v;
|
|
3711
|
-
|
|
3712
|
-
const I = w ||
|
|
3713
|
-
t == null || t(
|
|
3715
|
+
r == 0 || r != null ? v = r : v = u;
|
|
3716
|
+
const I = w || d, b = D(null), E = (M) => {
|
|
3717
|
+
t == null || t(M);
|
|
3714
3718
|
};
|
|
3715
|
-
function N(
|
|
3719
|
+
function N(M) {
|
|
3716
3720
|
const x = [];
|
|
3717
|
-
return dt.forEach(
|
|
3718
|
-
pe(
|
|
3721
|
+
return dt.forEach(M, (S) => {
|
|
3722
|
+
pe(S) && S.type === ft ? x.push(...N(S.props.children)) : x.push(S);
|
|
3719
3723
|
}), x;
|
|
3720
3724
|
}
|
|
3721
3725
|
const A = N(n), g = A.filter(
|
|
3722
|
-
(
|
|
3723
|
-
),
|
|
3726
|
+
(M) => pe(M) && M.type === Ce
|
|
3727
|
+
), H = vn({
|
|
3724
3728
|
children: n,
|
|
3725
3729
|
onItemSelected: t,
|
|
3726
3730
|
selectedItem: v,
|
|
3727
3731
|
setSelectedItem: I,
|
|
3728
3732
|
className: a,
|
|
3729
3733
|
variant: e,
|
|
3730
|
-
extended:
|
|
3731
|
-
isExtended:
|
|
3732
|
-
alignment:
|
|
3733
|
-
menu:
|
|
3734
|
+
extended: f,
|
|
3735
|
+
isExtended: f,
|
|
3736
|
+
alignment: c,
|
|
3737
|
+
menu: l,
|
|
3734
3738
|
transition: h,
|
|
3735
|
-
onExtendedChange:
|
|
3739
|
+
onExtendedChange: o
|
|
3736
3740
|
});
|
|
3737
3741
|
h = { duration: 0.3, ...h };
|
|
3738
3742
|
const F = D(!1);
|
|
3739
|
-
return F.current = !1,
|
|
3740
|
-
|
|
3741
|
-
}, [
|
|
3743
|
+
return F.current = !1, $(() => {
|
|
3744
|
+
o == null || o(f ?? !1);
|
|
3745
|
+
}, [f]), /* @__PURE__ */ X(
|
|
3742
3746
|
"div",
|
|
3743
3747
|
{
|
|
3744
|
-
style: { transition: h.duration + "s", ...
|
|
3748
|
+
style: { transition: h.duration + "s", ...i },
|
|
3745
3749
|
ref: b,
|
|
3746
|
-
className:
|
|
3750
|
+
className: H.navigationRail,
|
|
3747
3751
|
children: [
|
|
3748
|
-
/* @__PURE__ */ X("div", { className:
|
|
3752
|
+
/* @__PURE__ */ X("div", { className: H.header, children: [
|
|
3749
3753
|
/* @__PURE__ */ m(
|
|
3750
3754
|
be,
|
|
3751
3755
|
{
|
|
3752
|
-
onClick: () => y(!
|
|
3753
|
-
label:
|
|
3754
|
-
className:
|
|
3755
|
-
icon:
|
|
3756
|
+
onClick: () => y(!f),
|
|
3757
|
+
label: f ? l == null ? void 0 : l.opened.label : l == null ? void 0 : l.closed.label,
|
|
3758
|
+
className: H.menuIcon,
|
|
3759
|
+
icon: f ? l.opened.icon : l == null ? void 0 : l.closed.icon
|
|
3756
3760
|
}
|
|
3757
3761
|
),
|
|
3758
3762
|
g.length > 0 && xe(g[0], {
|
|
3759
3763
|
transition: h,
|
|
3760
|
-
isExtended:
|
|
3764
|
+
isExtended: f,
|
|
3761
3765
|
className: "!shadow-none mx-5 " + g[0].props.className
|
|
3762
3766
|
})
|
|
3763
3767
|
] }),
|
|
3764
|
-
/* @__PURE__ */ m("div", { className:
|
|
3765
|
-
let
|
|
3768
|
+
/* @__PURE__ */ m("div", { className: H.segments, children: (() => {
|
|
3769
|
+
let M = 0;
|
|
3766
3770
|
return A.map((x) => pe(x) && x.type === yn ? xe(
|
|
3767
3771
|
x,
|
|
3768
3772
|
{
|
|
3769
|
-
key:
|
|
3770
|
-
index:
|
|
3773
|
+
key: M,
|
|
3774
|
+
index: M++,
|
|
3771
3775
|
// Utilise et incrémente le compteur dédié
|
|
3772
|
-
variant:
|
|
3776
|
+
variant: f ? "horizontal" : "vertical",
|
|
3773
3777
|
selectedItem: v,
|
|
3774
3778
|
setSelectedItem: I,
|
|
3775
|
-
onItemSelected:
|
|
3779
|
+
onItemSelected: E,
|
|
3776
3780
|
transition: h,
|
|
3777
3781
|
extendedOnly: F.current,
|
|
3778
|
-
isExtended:
|
|
3782
|
+
isExtended: f
|
|
3779
3783
|
}
|
|
3780
|
-
) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (F.current = !0,
|
|
3784
|
+
) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (F.current = !0, f ? xe(x, {}) : null) : x);
|
|
3781
3785
|
})() }),
|
|
3782
3786
|
/* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
|
|
3783
3787
|
]
|
|
3784
3788
|
}
|
|
3785
3789
|
);
|
|
3786
3790
|
};
|
|
3787
|
-
function
|
|
3791
|
+
function sr(e) {
|
|
3788
3792
|
return wt({
|
|
3789
3793
|
variant: xt.Udixio,
|
|
3790
3794
|
...e,
|
|
@@ -3803,7 +3807,7 @@ export {
|
|
|
3803
3807
|
zn as FabMenu,
|
|
3804
3808
|
ie as Icon,
|
|
3805
3809
|
be as IconButton,
|
|
3806
|
-
|
|
3810
|
+
lr as NavigationRail,
|
|
3807
3811
|
yn as NavigationRailItem,
|
|
3808
3812
|
pn as NavigationRailSection,
|
|
3809
3813
|
Ht as ProgressIndicator,
|
|
@@ -3831,7 +3835,7 @@ export {
|
|
|
3831
3835
|
J as createUseClassNames,
|
|
3832
3836
|
Ut as customScrollStyle,
|
|
3833
3837
|
Q as defaultClassNames,
|
|
3834
|
-
|
|
3838
|
+
sr as defineConfig,
|
|
3835
3839
|
Dn as dividerStyle,
|
|
3836
3840
|
Pn as fabMenuStyle,
|
|
3837
3841
|
An as fabStyle,
|