@udixio/ui-react 2.8.2 → 2.8.4
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 +17 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1083 -1086
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/components/IconButton.d.ts +1 -1
- package/dist/lib/components/IconButton.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/FabMenu.tsx +0 -2
- package/src/lib/components/IconButton.tsx +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as m, jsxs as Y, Fragment as me } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
2
|
+
import { clsx as Oe } from "clsx";
|
|
3
3
|
import { extendTailwindMerge as ut } from "tailwind-merge";
|
|
4
|
-
import Z, { useMemo as
|
|
5
|
-
import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as
|
|
4
|
+
import Z, { useMemo as Me, useState as M, useEffect as $, useRef as W, useLayoutEffect as Ve, 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 Be, animate as ht } from "motion/react";
|
|
6
6
|
import { animate as pt } from "motion";
|
|
7
|
-
import { createPortal as
|
|
7
|
+
import { createPortal as Ye } from "react-dom";
|
|
8
8
|
import { loader as yt, defineConfig as wt, FontPlugin as vt, Variants as xt } from "@udixio/theme";
|
|
9
|
-
import { TailwindPlugin as
|
|
9
|
+
import { TailwindPlugin as Ue } from "@udixio/tailwind";
|
|
10
10
|
import gt from "react-textarea-autosize";
|
|
11
|
-
const
|
|
11
|
+
const Xe = ut({
|
|
12
12
|
override: {
|
|
13
13
|
classGroups: {
|
|
14
14
|
"text-color": [
|
|
@@ -34,36 +34,36 @@ const je = ut({
|
|
|
34
34
|
font: ["font"]
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
}), y = (...e) =>
|
|
37
|
+
}), y = (...e) => Xe(Oe(e)), bt = (...e) => Xe(Oe(e));
|
|
38
38
|
function Lt(e) {
|
|
39
39
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const $e = (e) => {
|
|
42
42
|
const t = {};
|
|
43
|
-
e.classNameList.forEach((
|
|
43
|
+
e.classNameList.forEach((o) => {
|
|
44
44
|
var r;
|
|
45
|
-
if (
|
|
46
|
-
if (typeof
|
|
47
|
-
(t[r = e.default] ?? (t[r] = [])).push(
|
|
45
|
+
if (o)
|
|
46
|
+
if (typeof o == "string")
|
|
47
|
+
(t[r = e.default] ?? (t[r] = [])).push(o);
|
|
48
48
|
else {
|
|
49
|
-
const s =
|
|
49
|
+
const s = o(e.states);
|
|
50
50
|
Object.entries(s).map((c) => {
|
|
51
|
-
const [a,
|
|
52
|
-
(t[a] ?? (t[a] = [])).push(
|
|
51
|
+
const [a, i] = c;
|
|
52
|
+
(t[a] ?? (t[a] = [])).push(i);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const n = t;
|
|
57
|
-
return Object.entries(t).map((
|
|
58
|
-
let [r, s] =
|
|
57
|
+
return Object.entries(t).map((o) => {
|
|
58
|
+
let [r, s] = o;
|
|
59
59
|
s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] = bt(...s);
|
|
60
60
|
}), n;
|
|
61
|
-
}, Q = (e, t) => (n) =>
|
|
61
|
+
}, Q = (e, t) => (n) => $e({
|
|
62
62
|
classNameList: [n.className, t],
|
|
63
63
|
default: e,
|
|
64
64
|
states: n
|
|
65
|
-
}), J = (e, t) => (n) =>
|
|
66
|
-
() =>
|
|
65
|
+
}), J = (e, t) => (n) => Me(
|
|
66
|
+
() => $e({
|
|
67
67
|
classNameList: [n.className, t],
|
|
68
68
|
default: e,
|
|
69
69
|
states: n
|
|
@@ -71,8 +71,8 @@ const Re = (e) => {
|
|
|
71
71
|
[n]
|
|
72
72
|
);
|
|
73
73
|
function Mn(e, t, n) {
|
|
74
|
-
return
|
|
75
|
-
() =>
|
|
74
|
+
return Me(
|
|
75
|
+
() => $e({
|
|
76
76
|
classNameList: [n == null ? void 0 : n.className, t],
|
|
77
77
|
default: e,
|
|
78
78
|
states: n
|
|
@@ -80,40 +80,40 @@ function Mn(e, t, n) {
|
|
|
80
80
|
[e, t, n]
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const je = ({
|
|
84
84
|
variant: e,
|
|
85
85
|
disableTextMargins: t,
|
|
86
86
|
disabled: n,
|
|
87
|
-
iconPosition:
|
|
87
|
+
iconPosition: o,
|
|
88
88
|
icon: r,
|
|
89
89
|
isActive: s,
|
|
90
90
|
loading: c,
|
|
91
91
|
shape: a,
|
|
92
|
-
onToggle:
|
|
93
|
-
size:
|
|
94
|
-
allowShapeTransformation:
|
|
92
|
+
onToggle: i,
|
|
93
|
+
size: l,
|
|
94
|
+
allowShapeTransformation: h
|
|
95
95
|
}) => ({
|
|
96
96
|
button: y(
|
|
97
97
|
" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
l === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
|
|
99
|
+
l === "small" && "text-label-large px-4 py-2.5 gap-2",
|
|
100
|
+
l === "medium" && "text-title-medium px-6 py-4 gap-2",
|
|
101
|
+
l === "large" && "text-headline-small px-12 py-8 gap-3",
|
|
102
|
+
l === "xLarge" && "text-headline-large px-16 py-12 gap-4",
|
|
103
103
|
a === "rounded" && {
|
|
104
|
-
"rounded-[30px]":
|
|
105
|
-
"rounded-[40px]":
|
|
106
|
-
"rounded-[70px]":
|
|
104
|
+
"rounded-[30px]": l === "xSmall" || l == "small",
|
|
105
|
+
"rounded-[40px]": l === "medium",
|
|
106
|
+
"rounded-[70px]": l === "large" || l == "xLarge"
|
|
107
107
|
},
|
|
108
|
-
(a === "squared" ||
|
|
109
|
-
"rounded-[12px]":
|
|
110
|
-
"rounded-[16px]":
|
|
111
|
-
"rounded-[28px]":
|
|
108
|
+
(a === "squared" || h && s) && {
|
|
109
|
+
"rounded-[12px]": l === "xSmall" || l == "small",
|
|
110
|
+
"rounded-[16px]": l === "medium",
|
|
111
|
+
"rounded-[28px]": l === "large" || l == "xLarge"
|
|
112
112
|
},
|
|
113
|
-
|
|
114
|
-
"active:rounded-[12px]":
|
|
115
|
-
"active:rounded-[16px]":
|
|
116
|
-
"active:rounded-[28px]":
|
|
113
|
+
h && !n && {
|
|
114
|
+
"active:rounded-[12px]": l === "xSmall" || l == "small",
|
|
115
|
+
"active:rounded-[16px]": l === "medium",
|
|
116
|
+
"active:rounded-[28px]": l === "large" || l == "xLarge"
|
|
117
117
|
},
|
|
118
118
|
e === "elevated" && {
|
|
119
119
|
"shadow-1 hover:shadow-2": !n,
|
|
@@ -123,8 +123,8 @@ const qe = ({
|
|
|
123
123
|
},
|
|
124
124
|
e === "filled" && {
|
|
125
125
|
"hover:shadow-1": !n,
|
|
126
|
-
"bg-surface-container text-on-surface-variant": !n && !s &&
|
|
127
|
-
"bg-primary text-on-primary": !n && (s &&
|
|
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" && {
|
|
@@ -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
|
+
l === "xSmall" && "-mx-3 ",
|
|
152
|
+
l === "small" && "-mx-4 ",
|
|
153
|
+
l === "medium" && "-mx-6 ",
|
|
154
|
+
l === "large" && "-mx-12",
|
|
155
|
+
l === "xLarge" && "-mx-16 "
|
|
156
156
|
// size === 'small' && ' -my-2.5',
|
|
157
157
|
// size === 'medium' && ' -my-4',
|
|
158
158
|
// size === 'large' && '-my-8',
|
|
@@ -167,37 +167,37 @@ const qe = ({
|
|
|
167
167
|
stateLayer: y(
|
|
168
168
|
"overflow-hidden",
|
|
169
169
|
a === "rounded" && {
|
|
170
|
-
"rounded-[30px]":
|
|
171
|
-
"rounded-[40px]":
|
|
172
|
-
"rounded-[70px]":
|
|
170
|
+
"rounded-[30px]": l === "xSmall" || l == "small",
|
|
171
|
+
"rounded-[40px]": l === "medium",
|
|
172
|
+
"rounded-[70px]": l === "large" || l == "xLarge"
|
|
173
173
|
},
|
|
174
|
-
(a === "squared" ||
|
|
175
|
-
"rounded-[12px]":
|
|
176
|
-
"rounded-[16px]":
|
|
177
|
-
"rounded-[28px]":
|
|
174
|
+
(a === "squared" || h && s) && {
|
|
175
|
+
"rounded-[12px]": l === "xSmall" || l == "small",
|
|
176
|
+
"rounded-[16px]": l === "medium",
|
|
177
|
+
"rounded-[28px]": l === "large" || l == "xLarge"
|
|
178
178
|
},
|
|
179
|
-
|
|
180
|
-
"group-active/button:rounded-[12px]":
|
|
181
|
-
"group-active/button:rounded-[16px]":
|
|
182
|
-
"group-active/button:rounded-[28px]":
|
|
179
|
+
h && !n && {
|
|
180
|
+
"group-active/button:rounded-[12px]": l === "xSmall" || l == "small",
|
|
181
|
+
"group-active/button:rounded-[16px]": l === "medium",
|
|
182
|
+
"group-active/button:rounded-[28px]": l === "large" || l == "xLarge"
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
label: y({ invisible: c }),
|
|
186
186
|
icon: y(
|
|
187
187
|
{ invisible: c },
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
l === "xSmall" && "size-5",
|
|
189
|
+
l === "small" && "size-5",
|
|
190
|
+
l === "medium" && "size-6",
|
|
191
|
+
l === "large" && "size-8",
|
|
192
|
+
l === "xLarge" && "size-10"
|
|
193
193
|
)
|
|
194
194
|
}), $n = Q(
|
|
195
195
|
"button",
|
|
196
|
-
|
|
196
|
+
je
|
|
197
197
|
), Nt = J(
|
|
198
198
|
"button",
|
|
199
|
-
|
|
200
|
-
),
|
|
199
|
+
je
|
|
200
|
+
), qe = ({
|
|
201
201
|
variant: e,
|
|
202
202
|
isInteractive: t
|
|
203
203
|
}) => ({
|
|
@@ -207,10 +207,10 @@ const qe = ({
|
|
|
207
207
|
e === "elevated" && "bg-surface-container-low shadow-1",
|
|
208
208
|
e === "filled" && "bg-surface-container-highest"
|
|
209
209
|
)
|
|
210
|
-
}), Rn = Q("card",
|
|
210
|
+
}), Rn = Q("card", qe), Et = J(
|
|
211
211
|
"card",
|
|
212
|
-
|
|
213
|
-
),
|
|
212
|
+
qe
|
|
213
|
+
), _e = ({
|
|
214
214
|
width: e
|
|
215
215
|
}) => ({
|
|
216
216
|
carouselItem: y("rounded-[28px] overflow-hidden flex-none", {
|
|
@@ -219,20 +219,20 @@ const qe = ({
|
|
|
219
219
|
})
|
|
220
220
|
}), Bn = Q(
|
|
221
221
|
"carouselItem",
|
|
222
|
-
|
|
222
|
+
_e
|
|
223
223
|
), St = J(
|
|
224
224
|
"carouselItem",
|
|
225
|
-
|
|
226
|
-
),
|
|
225
|
+
_e
|
|
226
|
+
), Ke = () => ({
|
|
227
227
|
carousel: y(["w-full h-[400px]"]),
|
|
228
228
|
track: y("flex h-full w-full")
|
|
229
229
|
}), Dn = Q(
|
|
230
230
|
"carousel",
|
|
231
|
-
|
|
231
|
+
Ke
|
|
232
232
|
), It = J(
|
|
233
233
|
"carousel",
|
|
234
|
-
|
|
235
|
-
),
|
|
234
|
+
Ke
|
|
235
|
+
), Ge = ({
|
|
236
236
|
orientation: e
|
|
237
237
|
}) => ({
|
|
238
238
|
divider: y(
|
|
@@ -246,11 +246,11 @@ const qe = ({
|
|
|
246
246
|
)
|
|
247
247
|
}), Wn = Q(
|
|
248
248
|
"divider",
|
|
249
|
-
|
|
249
|
+
Ge
|
|
250
250
|
), kt = J(
|
|
251
251
|
"divider",
|
|
252
|
-
|
|
253
|
-
),
|
|
252
|
+
Ge
|
|
253
|
+
), Je = ({
|
|
254
254
|
size: e,
|
|
255
255
|
variant: t,
|
|
256
256
|
extended: n
|
|
@@ -283,7 +283,7 @@ const qe = ({
|
|
|
283
283
|
"text-title-large": e == "medium",
|
|
284
284
|
"text-headline-small": e == "large"
|
|
285
285
|
})
|
|
286
|
-
}), An = Q("fab",
|
|
286
|
+
}), An = Q("fab", Je), Ct = J("fab", Je), Ze = ({
|
|
287
287
|
size: e,
|
|
288
288
|
variant: t,
|
|
289
289
|
open: n
|
|
@@ -294,15 +294,15 @@ const qe = ({
|
|
|
294
294
|
)
|
|
295
295
|
}), Pn = Q(
|
|
296
296
|
"fabMenu",
|
|
297
|
-
|
|
297
|
+
Ze
|
|
298
298
|
), Mt = J(
|
|
299
299
|
"fabMenu",
|
|
300
|
-
|
|
301
|
-
),
|
|
300
|
+
Ze
|
|
301
|
+
), Qe = ({
|
|
302
302
|
variant: e,
|
|
303
303
|
disabled: t,
|
|
304
304
|
onToggle: n,
|
|
305
|
-
isActive:
|
|
305
|
+
isActive: o,
|
|
306
306
|
size: r,
|
|
307
307
|
width: s,
|
|
308
308
|
shape: c,
|
|
@@ -319,7 +319,7 @@ const qe = ({
|
|
|
319
319
|
"rounded-[40px]": r === "medium",
|
|
320
320
|
"rounded-[70px]": r === "large" || r == "xLarge"
|
|
321
321
|
},
|
|
322
|
-
(c === "squared" || a &&
|
|
322
|
+
(c === "squared" || a && o) && {
|
|
323
323
|
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
324
324
|
"rounded-[16px]": r === "medium",
|
|
325
325
|
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
@@ -331,26 +331,26 @@ const qe = ({
|
|
|
331
331
|
},
|
|
332
332
|
e === "filled" && [
|
|
333
333
|
!t && {
|
|
334
|
-
"bg-surface-container": !
|
|
335
|
-
"bg-primary":
|
|
334
|
+
"bg-surface-container": !o && !!n,
|
|
335
|
+
"bg-primary": o || !n
|
|
336
336
|
},
|
|
337
337
|
!!t && "bg-on-surface/[0.12]"
|
|
338
338
|
],
|
|
339
339
|
e === "tonal" && [
|
|
340
340
|
!t && {
|
|
341
|
-
"bg-secondary-container text-on-secondary-container": !
|
|
342
|
-
"bg-secondary text-on-secondary":
|
|
341
|
+
"bg-secondary-container text-on-secondary-container": !o && !!n,
|
|
342
|
+
"bg-secondary text-on-secondary": o || !n
|
|
343
343
|
},
|
|
344
344
|
!!t && "bg-on-surface/[0.12]"
|
|
345
345
|
],
|
|
346
346
|
e === "outlined" && [
|
|
347
347
|
!t && {
|
|
348
|
-
"border border-outline": !
|
|
349
|
-
"border border-transparent bg-inverse-surface":
|
|
348
|
+
"border border-outline": !o,
|
|
349
|
+
"border border-transparent bg-inverse-surface": o
|
|
350
350
|
},
|
|
351
351
|
!!t && {
|
|
352
|
-
"border border-on-surface/[0.12]": !
|
|
353
|
-
"border border-transparent bg-on-surface/[0.12]":
|
|
352
|
+
"border border-on-surface/[0.12]": !o,
|
|
353
|
+
"border border-transparent bg-on-surface/[0.12]": o
|
|
354
354
|
}
|
|
355
355
|
]
|
|
356
356
|
),
|
|
@@ -359,12 +359,12 @@ const qe = ({
|
|
|
359
359
|
),
|
|
360
360
|
stateLayer: y(
|
|
361
361
|
"absolute top-0 left-0 h-full w-full overflow-hidden",
|
|
362
|
-
(c === "rounded" || c === "squared" && n && !t &&
|
|
362
|
+
(c === "rounded" || c === "squared" && n && !t && o && a) && {
|
|
363
363
|
"rounded-[30px]": r === "xSmall" || r == "small",
|
|
364
364
|
"rounded-[40px]": r === "medium",
|
|
365
365
|
"rounded-[70px]": r === "large" || r == "xLarge"
|
|
366
366
|
},
|
|
367
|
-
(c === "squared" || c === "rounded" && n && !t &&
|
|
367
|
+
(c === "squared" || c === "rounded" && n && !t && o && a) && {
|
|
368
368
|
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
369
369
|
"rounded-[16px]": r === "medium",
|
|
370
370
|
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
@@ -376,20 +376,20 @@ const qe = ({
|
|
|
376
376
|
},
|
|
377
377
|
!t && [
|
|
378
378
|
e === "standard" && {
|
|
379
|
-
"state-on-surface-variant": !
|
|
380
|
-
"state-primary":
|
|
379
|
+
"state-on-surface-variant": !o,
|
|
380
|
+
"state-primary": o
|
|
381
381
|
},
|
|
382
382
|
e === "filled" && {
|
|
383
|
-
"state-primary": !
|
|
384
|
-
"state-inverse-on-surface":
|
|
383
|
+
"state-primary": !o && !!n,
|
|
384
|
+
"state-inverse-on-surface": o || !n
|
|
385
385
|
},
|
|
386
386
|
e === "tonal" && {
|
|
387
|
-
"state-on-surface-variant": !
|
|
388
|
-
"state-on-secondary-container":
|
|
387
|
+
"state-on-surface-variant": !o && !!n,
|
|
388
|
+
"state-on-secondary-container": o || !n
|
|
389
389
|
},
|
|
390
390
|
e === "outlined" && {
|
|
391
|
-
"state-on-surface-variant": !
|
|
392
|
-
"state-on-primary":
|
|
391
|
+
"state-on-surface-variant": !o,
|
|
392
|
+
"state-on-primary": o
|
|
393
393
|
}
|
|
394
394
|
]
|
|
395
395
|
),
|
|
@@ -416,27 +416,27 @@ const qe = ({
|
|
|
416
416
|
],
|
|
417
417
|
!t && [
|
|
418
418
|
e === "standard" && {
|
|
419
|
-
"text-on-surface-variant": !
|
|
420
|
-
"text-primary":
|
|
419
|
+
"text-on-surface-variant": !o,
|
|
420
|
+
"text-primary": o
|
|
421
421
|
},
|
|
422
422
|
e === "filled" && {
|
|
423
|
-
"text-primary": !
|
|
424
|
-
"text-on-primary":
|
|
423
|
+
"text-primary": !o && !!n,
|
|
424
|
+
"text-on-primary": o || !n
|
|
425
425
|
},
|
|
426
426
|
e === "outlined" && {
|
|
427
|
-
"text-on-surface-variant": !
|
|
428
|
-
"text-inverse-on-surface":
|
|
427
|
+
"text-on-surface-variant": !o,
|
|
428
|
+
"text-inverse-on-surface": o
|
|
429
429
|
}
|
|
430
430
|
],
|
|
431
431
|
!!t && "text-on-surface/[0.38]"
|
|
432
432
|
)
|
|
433
433
|
}), Hn = Q(
|
|
434
434
|
"iconButton",
|
|
435
|
-
|
|
435
|
+
Qe
|
|
436
436
|
), $t = J(
|
|
437
437
|
"iconButton",
|
|
438
|
-
|
|
439
|
-
),
|
|
438
|
+
Qe
|
|
439
|
+
), Te = ({ variant: e, isVisible: t }) => ({
|
|
440
440
|
progressIndicator: y(
|
|
441
441
|
(e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full h-1"
|
|
442
442
|
),
|
|
@@ -467,11 +467,11 @@ const qe = ({
|
|
|
467
467
|
)
|
|
468
468
|
}), Fn = Q(
|
|
469
469
|
"progressIndicator",
|
|
470
|
-
|
|
470
|
+
Te
|
|
471
471
|
), Rt = J(
|
|
472
472
|
"progressIndicator",
|
|
473
|
-
|
|
474
|
-
),
|
|
473
|
+
Te
|
|
474
|
+
), ze = ({
|
|
475
475
|
variant: e,
|
|
476
476
|
position: t
|
|
477
477
|
}) => ({
|
|
@@ -498,11 +498,11 @@ const qe = ({
|
|
|
498
498
|
overlay: y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")
|
|
499
499
|
}), Bt = Q(
|
|
500
500
|
"sideSheet",
|
|
501
|
-
|
|
501
|
+
ze
|
|
502
502
|
), On = J(
|
|
503
503
|
"sideSheet",
|
|
504
|
-
|
|
505
|
-
),
|
|
504
|
+
ze
|
|
505
|
+
), et = ({
|
|
506
506
|
isChanging: e
|
|
507
507
|
}) => ({
|
|
508
508
|
slider: y([
|
|
@@ -526,11 +526,11 @@ const qe = ({
|
|
|
526
526
|
])
|
|
527
527
|
}), Vn = Q(
|
|
528
528
|
"slider",
|
|
529
|
-
|
|
529
|
+
et
|
|
530
530
|
), Dt = J(
|
|
531
531
|
"slider",
|
|
532
|
-
|
|
533
|
-
),
|
|
532
|
+
et
|
|
533
|
+
), tt = () => ({
|
|
534
534
|
snackbar: y(" rounded bg-inverse-surface "),
|
|
535
535
|
container: y(
|
|
536
536
|
"pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
|
|
@@ -539,11 +539,11 @@ const qe = ({
|
|
|
539
539
|
icon: y(" ml-auto mr-0 text-inverse-on-surface block dark")
|
|
540
540
|
}), Yn = Q(
|
|
541
541
|
"snackbar",
|
|
542
|
-
|
|
542
|
+
tt
|
|
543
543
|
), Wt = J(
|
|
544
544
|
"snackbar",
|
|
545
|
-
|
|
546
|
-
),
|
|
545
|
+
tt
|
|
546
|
+
), nt = ({
|
|
547
547
|
isSelected: e,
|
|
548
548
|
disabled: t,
|
|
549
549
|
inactiveIcon: n
|
|
@@ -589,109 +589,109 @@ const qe = ({
|
|
|
589
589
|
)
|
|
590
590
|
}), Un = Q(
|
|
591
591
|
"switch",
|
|
592
|
-
|
|
592
|
+
nt
|
|
593
593
|
), At = J(
|
|
594
594
|
"switch",
|
|
595
|
-
|
|
596
|
-
),
|
|
595
|
+
nt
|
|
596
|
+
), rt = ({
|
|
597
597
|
isSelected: e,
|
|
598
598
|
icon: t,
|
|
599
599
|
label: n,
|
|
600
|
-
variant:
|
|
600
|
+
variant: o
|
|
601
601
|
}) => ({
|
|
602
602
|
tab: y(
|
|
603
603
|
"flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",
|
|
604
604
|
{ "z-10": e },
|
|
605
|
-
!!(t && n) &&
|
|
606
|
-
!(t && n &&
|
|
605
|
+
!!(t && n) && o === "primary" && "h-16",
|
|
606
|
+
!(t && n && o === "primary") && "h-12"
|
|
607
607
|
),
|
|
608
608
|
stateLayer: y(
|
|
609
609
|
"absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
|
|
610
|
-
|
|
610
|
+
o === "primary" && {
|
|
611
611
|
"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface": !e,
|
|
612
612
|
"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary": e
|
|
613
613
|
},
|
|
614
|
-
|
|
614
|
+
o === "secondary" && "group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"
|
|
615
615
|
),
|
|
616
616
|
content: y(
|
|
617
617
|
"flex gap-0.5 h-full justify-center",
|
|
618
618
|
{
|
|
619
|
-
relative:
|
|
619
|
+
relative: o == "primary"
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
622
|
"": !!(n && !t)
|
|
623
623
|
},
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
o === "primary" && "flex-col items-center",
|
|
625
|
+
o === "secondary" && {
|
|
626
626
|
"flex-col items-center": !(n && t),
|
|
627
627
|
"flex-row items-center gap-2": !!(n && t)
|
|
628
628
|
}
|
|
629
629
|
),
|
|
630
630
|
icon: y(
|
|
631
631
|
"h-6 w-6 p-0.5 !box-border",
|
|
632
|
-
|
|
632
|
+
o === "primary" && {
|
|
633
633
|
"text-on-surface-variant": !e,
|
|
634
634
|
"text-primary": e
|
|
635
635
|
},
|
|
636
|
-
|
|
636
|
+
o === "secondary" && {
|
|
637
637
|
"text-on-surface-variant": !e,
|
|
638
638
|
"text-on-surface": e
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
641
|
label: y(
|
|
642
642
|
"text-title-small text-nowrap",
|
|
643
|
-
|
|
643
|
+
o === "primary" && {
|
|
644
644
|
"text-on-surface-variant": !e,
|
|
645
645
|
"text-primary": e
|
|
646
646
|
},
|
|
647
|
-
|
|
647
|
+
o === "secondary" && {
|
|
648
648
|
"text-on-surface-variant": !e,
|
|
649
649
|
"text-on-surface": e
|
|
650
650
|
}
|
|
651
651
|
),
|
|
652
652
|
underline: y(
|
|
653
653
|
"bg-primary absolute w-full left-0 bottom-0",
|
|
654
|
-
|
|
655
|
-
|
|
654
|
+
o === "primary" && "h-[3px] rounded-t",
|
|
655
|
+
o === "secondary" && "h-0.5"
|
|
656
656
|
)
|
|
657
|
-
}), Xn = Q("tab",
|
|
657
|
+
}), Xn = Q("tab", rt), Pt = J("tab", rt), ot = ({ scrollable: e }) => ({
|
|
658
658
|
tabs: y(
|
|
659
659
|
"border-b border-surface-container-highest bg-surface",
|
|
660
660
|
"flex relative ",
|
|
661
661
|
{ "overflow-x-auto": e }
|
|
662
662
|
)
|
|
663
|
-
}), jn = Q("tabs",
|
|
663
|
+
}), jn = Q("tabs", ot), Ht = J(
|
|
664
664
|
"tabs",
|
|
665
|
-
|
|
666
|
-
),
|
|
665
|
+
ot
|
|
666
|
+
), lt = ({
|
|
667
667
|
disabled: e,
|
|
668
668
|
leadingIcon: t,
|
|
669
669
|
trailingIcon: n,
|
|
670
|
-
variant:
|
|
670
|
+
variant: o,
|
|
671
671
|
errorText: r,
|
|
672
672
|
isFocused: s,
|
|
673
673
|
value: c,
|
|
674
674
|
suffix: a,
|
|
675
|
-
textLine:
|
|
675
|
+
textLine: i
|
|
676
676
|
}) => ({
|
|
677
677
|
textField: y({
|
|
678
678
|
"opacity-[.38]": e
|
|
679
679
|
}),
|
|
680
680
|
content: y(
|
|
681
681
|
"group/text-field transition-border duration-200 relative flex items-center ",
|
|
682
|
-
{ "h-14":
|
|
682
|
+
{ "h-14": i == "singleLine" },
|
|
683
683
|
{
|
|
684
|
-
"border-on-surface-variant": !(r != null && r.length) && !s &&
|
|
685
|
-
"border-outline": !(r != null && r.length) && !s &&
|
|
684
|
+
"border-on-surface-variant": !(r != null && r.length) && !s && o == "filled",
|
|
685
|
+
"border-outline": !(r != null && r.length) && !s && o == "outlined",
|
|
686
686
|
"border-primary": !(r != null && r.length) && s,
|
|
687
687
|
"border-error": !!(r != null && r.length)
|
|
688
688
|
},
|
|
689
689
|
{ "bg-on-surface/[0.04]": e },
|
|
690
|
-
|
|
690
|
+
o == "filled" && [
|
|
691
691
|
"rounded-t overflow-hidden border-b",
|
|
692
692
|
{ "bg-surface-container-highest": !e }
|
|
693
693
|
],
|
|
694
|
-
|
|
694
|
+
o == "outlined" && [
|
|
695
695
|
"border rounded box-border",
|
|
696
696
|
{
|
|
697
697
|
"border-[3px]": s
|
|
@@ -701,7 +701,7 @@ const qe = ({
|
|
|
701
701
|
stateLayer: y(
|
|
702
702
|
"absolute -z-10 w-full h-full top-0 left-0",
|
|
703
703
|
{
|
|
704
|
-
hidden:
|
|
704
|
+
hidden: o == "outlined"
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
"group-state-on-surface": !e,
|
|
@@ -724,12 +724,12 @@ const qe = ({
|
|
|
724
724
|
{
|
|
725
725
|
"pr-0": !!a
|
|
726
726
|
},
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
o == "filled" && " pb-2 pt-6",
|
|
728
|
+
o == "outlined" && "py-4 relative z-10"
|
|
729
729
|
),
|
|
730
730
|
activeIndicator: y(
|
|
731
731
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
732
|
-
|
|
732
|
+
o == "filled" && [
|
|
733
733
|
"h-[2px] transition-all duration-300",
|
|
734
734
|
{ "bg-primary": !(r != null && r.length) },
|
|
735
735
|
{ "bg-error": !!(r != null && r.length) },
|
|
@@ -752,16 +752,16 @@ const qe = ({
|
|
|
752
752
|
}),
|
|
753
753
|
suffix: y(
|
|
754
754
|
"text-on-surface-variant pl-0 pr-4",
|
|
755
|
-
|
|
756
|
-
|
|
755
|
+
o == "filled" && " pb-2 pt-6",
|
|
756
|
+
o == "outlined" && "py-4 relative z-10"
|
|
757
757
|
)
|
|
758
758
|
}), qn = Q(
|
|
759
759
|
"textField",
|
|
760
|
-
|
|
760
|
+
lt
|
|
761
761
|
), Ft = J(
|
|
762
762
|
"textField",
|
|
763
|
-
|
|
764
|
-
),
|
|
763
|
+
lt
|
|
764
|
+
), at = ({
|
|
765
765
|
position: e,
|
|
766
766
|
variant: t
|
|
767
767
|
}) => ({
|
|
@@ -788,17 +788,17 @@ const qe = ({
|
|
|
788
788
|
supportingText: y("")
|
|
789
789
|
}), _n = Q(
|
|
790
790
|
"toolTip",
|
|
791
|
-
|
|
791
|
+
at
|
|
792
792
|
), Ot = J(
|
|
793
793
|
"toolTip",
|
|
794
|
-
|
|
794
|
+
at
|
|
795
795
|
), ie = ({ icon: e, colors: t = [], className: n }) => {
|
|
796
796
|
if (typeof e == "string") {
|
|
797
|
-
let
|
|
798
|
-
return t[0] && (
|
|
797
|
+
let l = e;
|
|
798
|
+
return t[0] && (l = l.replace(
|
|
799
799
|
/<svg([^>]*)>/,
|
|
800
800
|
`<svg$1 fill="${t[0]}" color="${t[0]}">`
|
|
801
|
-
),
|
|
801
|
+
), l = l.replace(
|
|
802
802
|
/<path([^>]*?)>/g,
|
|
803
803
|
'<path$1 fill="currentColor">'
|
|
804
804
|
)), /* @__PURE__ */ m(
|
|
@@ -809,18 +809,18 @@ const qe = ({
|
|
|
809
809
|
n
|
|
810
810
|
),
|
|
811
811
|
style: { color: t[0] || "inherit" },
|
|
812
|
-
dangerouslySetInnerHTML: { __html:
|
|
812
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
813
813
|
}
|
|
814
814
|
);
|
|
815
815
|
}
|
|
816
816
|
if (e && typeof e == "object" && "src" in e) {
|
|
817
|
-
const
|
|
817
|
+
const l = e;
|
|
818
818
|
return /* @__PURE__ */ m(
|
|
819
819
|
"img",
|
|
820
820
|
{
|
|
821
|
-
src:
|
|
822
|
-
width:
|
|
823
|
-
height:
|
|
821
|
+
src: l.src,
|
|
822
|
+
width: l.width,
|
|
823
|
+
height: l.height,
|
|
824
824
|
className: y("size-5 box-content", n),
|
|
825
825
|
style: {
|
|
826
826
|
filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
|
|
@@ -830,18 +830,18 @@ const qe = ({
|
|
|
830
830
|
}
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
|
-
const
|
|
834
|
-
if (!(
|
|
833
|
+
const o = e;
|
|
834
|
+
if (!(o != null && o.prefix))
|
|
835
835
|
throw new Error(`Invalid icon type: ${typeof e}`);
|
|
836
|
-
const { icon: r } =
|
|
837
|
-
switch (
|
|
836
|
+
const { icon: r } = o, [s, c, , , a] = r || [], i = (l) => {
|
|
837
|
+
switch (l.length) {
|
|
838
838
|
case 2:
|
|
839
839
|
return {
|
|
840
|
-
"--fa-primary-color":
|
|
841
|
-
"--fa-secondary-color":
|
|
840
|
+
"--fa-primary-color": l[0] || "inherit",
|
|
841
|
+
"--fa-secondary-color": l[1] || "inherit"
|
|
842
842
|
};
|
|
843
843
|
case 1:
|
|
844
|
-
return { color:
|
|
844
|
+
return { color: l[0] };
|
|
845
845
|
default:
|
|
846
846
|
return {};
|
|
847
847
|
}
|
|
@@ -850,36 +850,36 @@ const qe = ({
|
|
|
850
850
|
"svg",
|
|
851
851
|
{
|
|
852
852
|
className: y("size-5 box-content", n),
|
|
853
|
-
style: { ...
|
|
853
|
+
style: { ...i(t) },
|
|
854
854
|
xmlns: "http://www.w3.org/2000/svg",
|
|
855
855
|
viewBox: `0 0 ${s} ${c}`,
|
|
856
856
|
role: "img",
|
|
857
857
|
"aria-hidden": "true",
|
|
858
|
-
children: typeof a == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: a }) : a.map((
|
|
858
|
+
children: typeof a == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: a }) : a.map((l, h) => /* @__PURE__ */ m("path", { d: l }, h))
|
|
859
859
|
}
|
|
860
860
|
);
|
|
861
861
|
}, Vt = ({
|
|
862
862
|
variant: e = "linear-determinate",
|
|
863
863
|
value: t = 0,
|
|
864
864
|
transitionDuration: n = 1e3,
|
|
865
|
-
className:
|
|
865
|
+
className: o,
|
|
866
866
|
...r
|
|
867
867
|
}) => {
|
|
868
|
-
const [s, c] =
|
|
869
|
-
|
|
868
|
+
const [s, c] = M(t), [a] = M(1.5);
|
|
869
|
+
$(() => {
|
|
870
870
|
t > 100 && (t = 100), t < 0 && (t = 0), c(t);
|
|
871
871
|
}, [t]);
|
|
872
|
-
const [
|
|
873
|
-
|
|
872
|
+
const [i, l] = M(!0), h = () => i ? a : a * 0.5;
|
|
873
|
+
$(() => {
|
|
874
874
|
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && s !== 100) {
|
|
875
875
|
const d = setInterval(() => {
|
|
876
|
-
c(
|
|
877
|
-
},
|
|
876
|
+
c(i ? 10 : 90), l(!i);
|
|
877
|
+
}, h() * 1e3);
|
|
878
878
|
return () => clearInterval(d);
|
|
879
879
|
}
|
|
880
|
-
}, [e,
|
|
881
|
-
const [v, f] =
|
|
882
|
-
|
|
880
|
+
}, [e, i, s]);
|
|
881
|
+
const [v, f] = M(!1);
|
|
882
|
+
$(() => {
|
|
883
883
|
if (s >= 100) {
|
|
884
884
|
const d = setTimeout(() => {
|
|
885
885
|
f(!1);
|
|
@@ -890,15 +890,15 @@ const qe = ({
|
|
|
890
890
|
} else
|
|
891
891
|
f(!0);
|
|
892
892
|
}, [s, n]);
|
|
893
|
-
const
|
|
894
|
-
className:
|
|
893
|
+
const u = Rt({
|
|
894
|
+
className: o,
|
|
895
895
|
variant: e,
|
|
896
896
|
value: t,
|
|
897
897
|
transitionDuration: n,
|
|
898
898
|
isVisible: v
|
|
899
899
|
});
|
|
900
900
|
return /* @__PURE__ */ Y(me, { children: [
|
|
901
|
-
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className:
|
|
901
|
+
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className: u.progressIndicator, ...r, children: [
|
|
902
902
|
/* @__PURE__ */ m(
|
|
903
903
|
"div",
|
|
904
904
|
{
|
|
@@ -906,7 +906,7 @@ const qe = ({
|
|
|
906
906
|
width: `${s}%`,
|
|
907
907
|
transition: `width ${n}ms ease-in-out ${s == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
|
|
908
908
|
},
|
|
909
|
-
className:
|
|
909
|
+
className: u.track
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
912
|
/* @__PURE__ */ m(
|
|
@@ -916,7 +916,7 @@ const qe = ({
|
|
|
916
916
|
marginLeft: s != 100 ? "6px" : "0px",
|
|
917
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` : ""}`
|
|
918
918
|
},
|
|
919
|
-
className:
|
|
919
|
+
className: u.activeIndicator
|
|
920
920
|
}
|
|
921
921
|
),
|
|
922
922
|
/* @__PURE__ */ m(
|
|
@@ -926,7 +926,7 @@ const qe = ({
|
|
|
926
926
|
width: "4 px",
|
|
927
927
|
transition: `width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
|
|
928
928
|
},
|
|
929
|
-
className:
|
|
929
|
+
className: u.stop
|
|
930
930
|
}
|
|
931
931
|
)
|
|
932
932
|
] }),
|
|
@@ -940,10 +940,10 @@ const qe = ({
|
|
|
940
940
|
animate: { rotate: 270 },
|
|
941
941
|
transition: {
|
|
942
942
|
repeat: 1 / 0,
|
|
943
|
-
duration:
|
|
943
|
+
duration: h(),
|
|
944
944
|
ease: "linear"
|
|
945
945
|
},
|
|
946
|
-
className:
|
|
946
|
+
className: u.progressIndicator,
|
|
947
947
|
...r,
|
|
948
948
|
children: /* @__PURE__ */ m(
|
|
949
949
|
q.circle,
|
|
@@ -956,27 +956,27 @@ const qe = ({
|
|
|
956
956
|
},
|
|
957
957
|
initial: "hidden",
|
|
958
958
|
animate: "visible",
|
|
959
|
-
className:
|
|
959
|
+
className: u.activeIndicator,
|
|
960
960
|
variants: {
|
|
961
961
|
hidden: {
|
|
962
|
-
pathLength:
|
|
962
|
+
pathLength: i ? 10 / 100 : 90 / 100
|
|
963
963
|
},
|
|
964
964
|
visible: {
|
|
965
|
-
pathLength:
|
|
965
|
+
pathLength: i ? 90 / 100 : 10 / 100
|
|
966
966
|
}
|
|
967
967
|
},
|
|
968
968
|
transition: {
|
|
969
969
|
pathLength: {
|
|
970
970
|
type: "tween",
|
|
971
971
|
ease: "linear",
|
|
972
|
-
duration:
|
|
972
|
+
duration: h(),
|
|
973
973
|
bounce: 0
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
)
|
|
978
978
|
},
|
|
979
|
-
|
|
979
|
+
i + ""
|
|
980
980
|
)
|
|
981
981
|
] });
|
|
982
982
|
}, Yt = ({
|
|
@@ -1002,27 +1002,27 @@ const qe = ({
|
|
|
1002
1002
|
duration: 0.3
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
}, [
|
|
1006
|
-
|
|
1005
|
+
}, [o, r] = M(!0), [s, c] = M(!1), [a, i] = M({ x: 50, y: 50 });
|
|
1006
|
+
$(() => {
|
|
1007
1007
|
s && (r(!0), r(!1));
|
|
1008
|
-
}, [s]),
|
|
1008
|
+
}, [s]), $(() => {
|
|
1009
1009
|
const d = t == null ? void 0 : t.current;
|
|
1010
1010
|
if (d)
|
|
1011
|
-
return d.addEventListener("mousedown",
|
|
1012
|
-
d.removeEventListener("mousedown",
|
|
1011
|
+
return d.addEventListener("mousedown", l), d.addEventListener("mouseup", v), d.addEventListener("mouseleave", h), () => {
|
|
1012
|
+
d.removeEventListener("mousedown", l), d.removeEventListener("mouseup", v), d.removeEventListener("mouseleave", h);
|
|
1013
1013
|
};
|
|
1014
1014
|
}, [t]);
|
|
1015
|
-
const
|
|
1016
|
-
const
|
|
1017
|
-
c(!0),
|
|
1018
|
-
x: (d.clientX - w.left) /
|
|
1019
|
-
y: (d.clientY - w.top) /
|
|
1015
|
+
const l = (d) => {
|
|
1016
|
+
const p = t == null ? void 0 : t.current, w = p.getBoundingClientRect();
|
|
1017
|
+
c(!0), i({
|
|
1018
|
+
x: (d.clientX - w.left) / p.clientWidth * 100,
|
|
1019
|
+
y: (d.clientY - w.top) / p.clientHeight * 100
|
|
1020
1020
|
});
|
|
1021
|
-
},
|
|
1021
|
+
}, h = (d) => {
|
|
1022
1022
|
c(!1);
|
|
1023
1023
|
}, v = (d) => {
|
|
1024
1024
|
c(!1);
|
|
1025
|
-
}, f = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,
|
|
1025
|
+
}, f = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, u = {
|
|
1026
1026
|
position: "absolute",
|
|
1027
1027
|
inset: 0,
|
|
1028
1028
|
width: "100%",
|
|
@@ -1035,10 +1035,10 @@ const qe = ({
|
|
|
1035
1035
|
background: `radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,
|
|
1036
1036
|
pointerEvents: "none"
|
|
1037
1037
|
};
|
|
1038
|
-
return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !
|
|
1038
|
+
return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !o) && /* @__PURE__ */ m(
|
|
1039
1039
|
q.div,
|
|
1040
1040
|
{
|
|
1041
|
-
style:
|
|
1041
|
+
style: u,
|
|
1042
1042
|
variants: n,
|
|
1043
1043
|
initial: "initial",
|
|
1044
1044
|
animate: "animate",
|
|
@@ -1076,221 +1076,221 @@ const qe = ({
|
|
|
1076
1076
|
})
|
|
1077
1077
|
);
|
|
1078
1078
|
function Xt(e, t) {
|
|
1079
|
-
let n = 0,
|
|
1079
|
+
let n = 0, o = null, r = null;
|
|
1080
1080
|
const s = (c, a) => {
|
|
1081
1081
|
n = Date.now(), t(c, a);
|
|
1082
1082
|
};
|
|
1083
1083
|
return (c, a) => {
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
r = null,
|
|
1089
|
-
},
|
|
1084
|
+
const i = Date.now(), l = e - (i - n);
|
|
1085
|
+
l <= 0 ? (o && (clearTimeout(o), o = null), s(c, a)) : (r = { v: c, o: a }, o || (o = setTimeout(() => {
|
|
1086
|
+
o = null;
|
|
1087
|
+
const h = r;
|
|
1088
|
+
r = null, h && s(h.v, h.o);
|
|
1089
|
+
}, l)));
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
1092
|
const jt = ({
|
|
1093
1093
|
children: e,
|
|
1094
1094
|
orientation: t = "vertical",
|
|
1095
1095
|
scrollSize: n,
|
|
1096
|
-
onScroll:
|
|
1096
|
+
onScroll: o,
|
|
1097
1097
|
className: r,
|
|
1098
1098
|
draggable: s = !1,
|
|
1099
1099
|
throttleDuration: c = 75,
|
|
1100
1100
|
scroll: a,
|
|
1101
|
-
setScroll:
|
|
1101
|
+
setScroll: i
|
|
1102
1102
|
}) => {
|
|
1103
1103
|
var le, ue;
|
|
1104
|
-
const
|
|
1104
|
+
const l = W(null), h = W(null), [v, f] = M({
|
|
1105
1105
|
width: null,
|
|
1106
1106
|
height: null
|
|
1107
1107
|
});
|
|
1108
|
-
|
|
1109
|
-
if (!
|
|
1110
|
-
const C = new ResizeObserver((
|
|
1111
|
-
for (const D of
|
|
1112
|
-
D.target ===
|
|
1108
|
+
$(() => {
|
|
1109
|
+
if (!l.current) return;
|
|
1110
|
+
const C = new ResizeObserver((L) => {
|
|
1111
|
+
for (const D of L)
|
|
1112
|
+
D.target === l.current && f({
|
|
1113
1113
|
width: D.contentRect.width,
|
|
1114
1114
|
height: D.contentRect.height
|
|
1115
1115
|
// On observe aussi la hauteur maintenant
|
|
1116
1116
|
});
|
|
1117
1117
|
});
|
|
1118
|
-
return C.observe(
|
|
1118
|
+
return C.observe(l.current), () => {
|
|
1119
1119
|
C.disconnect();
|
|
1120
1120
|
};
|
|
1121
|
-
}, [
|
|
1122
|
-
const
|
|
1123
|
-
const C =
|
|
1121
|
+
}, [l]);
|
|
1122
|
+
const u = W(null), d = W(null), p = () => {
|
|
1123
|
+
const C = h.current;
|
|
1124
1124
|
return C ? {
|
|
1125
1125
|
width: n ?? C.scrollWidth,
|
|
1126
1126
|
height: n ?? C.scrollHeight
|
|
1127
1127
|
} : null;
|
|
1128
1128
|
}, w = () => {
|
|
1129
|
-
const C =
|
|
1129
|
+
const C = l.current;
|
|
1130
1130
|
return C ? {
|
|
1131
1131
|
width: C.clientWidth,
|
|
1132
1132
|
height: C.clientHeight
|
|
1133
1133
|
// Correction ici pour retourner la bonne hauteur
|
|
1134
1134
|
} : null;
|
|
1135
|
-
}, { scrollYProgress:
|
|
1136
|
-
container:
|
|
1137
|
-
}),
|
|
1138
|
-
|
|
1135
|
+
}, { scrollYProgress: E, scrollXProgress: g } = mt({
|
|
1136
|
+
container: l
|
|
1137
|
+
}), b = W(null);
|
|
1138
|
+
b.current || (b.current = Xt(
|
|
1139
1139
|
c,
|
|
1140
|
-
(C,
|
|
1141
|
-
!d.current || !
|
|
1140
|
+
(C, L) => {
|
|
1141
|
+
!d.current || !u.current || !l.current || (L === (t === "horizontal" ? "x" : "y") && (i == null || i(C)), o && (t === "horizontal" && L === "x" && o({
|
|
1142
1142
|
scrollProgress: C,
|
|
1143
|
-
scroll: C * (
|
|
1144
|
-
scrollTotal:
|
|
1143
|
+
scroll: C * (u.current.width - l.current.clientWidth),
|
|
1144
|
+
scrollTotal: u.current.width - l.current.clientWidth,
|
|
1145
1145
|
scrollVisible: d.current.width
|
|
1146
|
-
}), t === "vertical" &&
|
|
1146
|
+
}), t === "vertical" && L === "y" && o({
|
|
1147
1147
|
scrollProgress: C,
|
|
1148
|
-
scroll: C * (
|
|
1149
|
-
scrollTotal:
|
|
1148
|
+
scroll: C * (u.current.height - l.current.clientHeight),
|
|
1149
|
+
scrollTotal: u.current.height - l.current.clientHeight,
|
|
1150
1150
|
scrollVisible: d.current.height
|
|
1151
1151
|
})));
|
|
1152
1152
|
}
|
|
1153
1153
|
));
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1154
|
+
const R = (C, L) => {
|
|
1155
|
+
b.current && b.current(C, L);
|
|
1156
1156
|
};
|
|
1157
|
-
|
|
1158
|
-
v.width &&
|
|
1159
|
-
}, [v]),
|
|
1160
|
-
const C =
|
|
1161
|
-
if (!C || !
|
|
1162
|
-
const D = (
|
|
1157
|
+
$(() => {
|
|
1158
|
+
v.width && R(g.get(), "x"), v.height && R(E.get(), "y");
|
|
1159
|
+
}, [v]), $(() => {
|
|
1160
|
+
const C = l.current, L = h.current;
|
|
1161
|
+
if (!C || !L || typeof a != "number") return;
|
|
1162
|
+
const D = (H, j, X) => Math.min(X, Math.max(j, H));
|
|
1163
1163
|
if (t === "horizontal") {
|
|
1164
|
-
const
|
|
1165
|
-
C.scrollLeft = D(a *
|
|
1164
|
+
const H = Math.max(0, (n ?? L.scrollWidth) - C.clientWidth);
|
|
1165
|
+
C.scrollLeft = D(a * H, 0, H);
|
|
1166
1166
|
} else {
|
|
1167
|
-
const
|
|
1168
|
-
C.scrollTop = D(a *
|
|
1167
|
+
const H = Math.max(0, (n ?? L.scrollHeight) - C.clientHeight);
|
|
1168
|
+
C.scrollTop = D(a * H, 0, H);
|
|
1169
1169
|
}
|
|
1170
|
-
}, [a, t, n]),
|
|
1171
|
-
|
|
1172
|
-
}),
|
|
1173
|
-
|
|
1170
|
+
}, [a, t, n]), Be(g, "change", (C) => {
|
|
1171
|
+
R(C, "x");
|
|
1172
|
+
}), Be(E, "change", (C) => {
|
|
1173
|
+
R(C, "y");
|
|
1174
1174
|
});
|
|
1175
|
-
const [A,
|
|
1176
|
-
|
|
1177
|
-
A || !d.current || !
|
|
1175
|
+
const [A, N] = M(!1);
|
|
1176
|
+
Ve(() => {
|
|
1177
|
+
A || !d.current || !u.current || !o || (o({
|
|
1178
1178
|
scrollProgress: 0,
|
|
1179
1179
|
scroll: 0,
|
|
1180
|
-
scrollTotal: t == "vertical" ?
|
|
1180
|
+
scrollTotal: t == "vertical" ? u.current.height : u.current.width,
|
|
1181
1181
|
scrollVisible: t == "vertical" ? d.current.height : d.current.width
|
|
1182
|
-
}),
|
|
1183
|
-
}, [d,
|
|
1184
|
-
const [
|
|
1185
|
-
isDragging:
|
|
1182
|
+
}), N(!0));
|
|
1183
|
+
}, [d, u, o]), u.current = p(), d.current = w();
|
|
1184
|
+
const [F, O] = M(!1), I = Ut({
|
|
1185
|
+
isDragging: F,
|
|
1186
1186
|
children: e,
|
|
1187
1187
|
className: r,
|
|
1188
|
-
onScroll:
|
|
1188
|
+
onScroll: o,
|
|
1189
1189
|
orientation: t,
|
|
1190
1190
|
scrollSize: n,
|
|
1191
1191
|
draggable: s,
|
|
1192
1192
|
throttleDuration: c
|
|
1193
|
-
}), [x, S] =
|
|
1193
|
+
}), [x, S] = M(0), [V, G] = M(0), te = (C) => {
|
|
1194
1194
|
if (!s) return;
|
|
1195
|
-
const
|
|
1196
|
-
if (!
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1195
|
+
const L = l.current;
|
|
1196
|
+
if (!L || x == null) return;
|
|
1197
|
+
const H = (C.pageX - L.offsetLeft - x) * 1.5;
|
|
1198
|
+
L.scrollLeft = V - H;
|
|
1199
1199
|
}, _ = (C) => {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1200
|
+
const L = l.current;
|
|
1201
|
+
L && (O(!0), S(C.pageX - L.offsetLeft), G(L.scrollLeft));
|
|
1202
1202
|
}, ne = (C) => {
|
|
1203
|
-
|
|
1203
|
+
F && (C.preventDefault(), te(C));
|
|
1204
1204
|
}, B = () => {
|
|
1205
|
-
|
|
1205
|
+
O(!1);
|
|
1206
1206
|
}, k = () => {
|
|
1207
|
-
|
|
1207
|
+
O(!1);
|
|
1208
1208
|
}, U = (C) => {
|
|
1209
1209
|
C.preventDefault();
|
|
1210
1210
|
}, K = W(null);
|
|
1211
|
-
return
|
|
1211
|
+
return $(() => () => {
|
|
1212
1212
|
K.current && clearTimeout(K.current);
|
|
1213
|
-
}, []),
|
|
1214
|
-
const C =
|
|
1213
|
+
}, []), $(() => {
|
|
1214
|
+
const C = l.current;
|
|
1215
1215
|
if (!C) return;
|
|
1216
|
-
const
|
|
1216
|
+
const L = (D) => {
|
|
1217
1217
|
var re, ae, de, ce;
|
|
1218
|
-
const
|
|
1219
|
-
if (!j || !
|
|
1220
|
-
const X =
|
|
1221
|
-
if (typeof
|
|
1218
|
+
const H = D.detail, j = l.current;
|
|
1219
|
+
if (!j || !H) return;
|
|
1220
|
+
const X = H.orientation ?? t;
|
|
1221
|
+
if (typeof H.progress == "number")
|
|
1222
1222
|
if (X === "horizontal") {
|
|
1223
1223
|
const oe = Math.max(
|
|
1224
1224
|
0,
|
|
1225
|
-
(((re =
|
|
1225
|
+
(((re = u.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
|
|
1226
1226
|
);
|
|
1227
|
-
j.scrollLeft = Math.min(oe, Math.max(0,
|
|
1227
|
+
j.scrollLeft = Math.min(oe, Math.max(0, H.progress * oe));
|
|
1228
1228
|
} else {
|
|
1229
1229
|
const oe = Math.max(
|
|
1230
1230
|
0,
|
|
1231
|
-
(((ae =
|
|
1231
|
+
(((ae = u.current) == null ? void 0 : ae.height) ?? 0) - j.clientHeight
|
|
1232
1232
|
);
|
|
1233
|
-
j.scrollTop = Math.min(oe, Math.max(0,
|
|
1233
|
+
j.scrollTop = Math.min(oe, Math.max(0, H.progress * oe));
|
|
1234
1234
|
}
|
|
1235
|
-
else if (typeof
|
|
1235
|
+
else if (typeof H.scroll == "number")
|
|
1236
1236
|
if (X === "horizontal") {
|
|
1237
1237
|
const oe = Math.max(
|
|
1238
1238
|
0,
|
|
1239
|
-
(((de =
|
|
1239
|
+
(((de = u.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
|
|
1240
1240
|
);
|
|
1241
|
-
j.scrollLeft = Math.min(oe, Math.max(0,
|
|
1241
|
+
j.scrollLeft = Math.min(oe, Math.max(0, H.scroll));
|
|
1242
1242
|
} else {
|
|
1243
1243
|
const oe = Math.max(
|
|
1244
1244
|
0,
|
|
1245
|
-
(((ce =
|
|
1245
|
+
(((ce = u.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
|
|
1246
1246
|
);
|
|
1247
|
-
j.scrollTop = Math.min(oe, Math.max(0,
|
|
1247
|
+
j.scrollTop = Math.min(oe, Math.max(0, H.scroll));
|
|
1248
1248
|
}
|
|
1249
1249
|
};
|
|
1250
|
-
return C.addEventListener("udx:customScroll:set",
|
|
1251
|
-
C.removeEventListener("udx:customScroll:set",
|
|
1250
|
+
return C.addEventListener("udx:customScroll:set", L), () => {
|
|
1251
|
+
C.removeEventListener("udx:customScroll:set", L);
|
|
1252
1252
|
};
|
|
1253
1253
|
}, [t]), /* @__PURE__ */ Y(
|
|
1254
1254
|
"div",
|
|
1255
1255
|
{
|
|
1256
|
-
className:
|
|
1257
|
-
ref:
|
|
1256
|
+
className: I.customScroll,
|
|
1257
|
+
ref: l,
|
|
1258
1258
|
onMouseDown: _,
|
|
1259
1259
|
onMouseMove: ne,
|
|
1260
1260
|
onMouseUp: B,
|
|
1261
1261
|
onMouseLeave: k,
|
|
1262
1262
|
onDragStart: U,
|
|
1263
1263
|
onScroll: (C) => {
|
|
1264
|
-
|
|
1265
|
-
|
|
1264
|
+
F || (S(null), O(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
1265
|
+
O(!1);
|
|
1266
1266
|
}, 1e3));
|
|
1267
1267
|
},
|
|
1268
1268
|
children: [
|
|
1269
1269
|
/* @__PURE__ */ m(
|
|
1270
1270
|
"div",
|
|
1271
1271
|
{
|
|
1272
|
-
ref:
|
|
1272
|
+
ref: h,
|
|
1273
1273
|
style: t === "vertical" ? { height: ((le = d == null ? void 0 : d.current) == null ? void 0 : le.height) ?? "100%" } : { width: ((ue = d == null ? void 0 : d.current) == null ? void 0 : ue.width) ?? "100%" },
|
|
1274
|
-
className:
|
|
1274
|
+
className: I.track,
|
|
1275
1275
|
children: e
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
d.current &&
|
|
1279
|
-
t === "vertical" &&
|
|
1278
|
+
d.current && u.current && /* @__PURE__ */ Y(me, { children: [
|
|
1279
|
+
t === "vertical" && u.current.height > d.current.height && /* @__PURE__ */ m(
|
|
1280
1280
|
q.div,
|
|
1281
1281
|
{
|
|
1282
1282
|
className: "flex-none",
|
|
1283
1283
|
style: {
|
|
1284
|
-
height:
|
|
1284
|
+
height: u.current.height - d.current.height
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
1287
|
),
|
|
1288
|
-
t === "horizontal" &&
|
|
1288
|
+
t === "horizontal" && u.current.width > d.current.width && /* @__PURE__ */ m(
|
|
1289
1289
|
q.div,
|
|
1290
1290
|
{
|
|
1291
1291
|
className: "flex-none",
|
|
1292
1292
|
style: {
|
|
1293
|
-
width:
|
|
1293
|
+
width: u.current.width - d.current.width
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
)
|
|
@@ -1303,68 +1303,68 @@ const jt = ({
|
|
|
1303
1303
|
el: t,
|
|
1304
1304
|
touch: n = !0
|
|
1305
1305
|
}) => {
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1306
|
+
const o = W(null), r = W(0), s = W(0);
|
|
1307
|
+
$(() => {
|
|
1308
1308
|
if (!t) return;
|
|
1309
1309
|
r.current = t.scrollTop, s.current = t.scrollLeft;
|
|
1310
|
-
const c = (
|
|
1311
|
-
e == null || e(
|
|
1312
|
-
}, a = (
|
|
1313
|
-
let d =
|
|
1310
|
+
const c = (u) => {
|
|
1311
|
+
e == null || e(u);
|
|
1312
|
+
}, a = (u) => {
|
|
1313
|
+
let d = u;
|
|
1314
1314
|
for (; d && d !== document.body && d !== document.documentElement; ) {
|
|
1315
|
-
const
|
|
1315
|
+
const p = window.getComputedStyle(d), w = p.overflowY || p.overflow;
|
|
1316
1316
|
if ((w === "auto" || w === "scroll") && d.scrollHeight > d.clientHeight) return d;
|
|
1317
1317
|
d = d.parentElement;
|
|
1318
1318
|
}
|
|
1319
1319
|
return null;
|
|
1320
|
-
},
|
|
1321
|
-
const d =
|
|
1322
|
-
if (
|
|
1323
|
-
const w =
|
|
1324
|
-
if (
|
|
1320
|
+
}, i = (u) => {
|
|
1321
|
+
const d = u.target, p = a(d);
|
|
1322
|
+
if (p && p !== t) {
|
|
1323
|
+
const w = p.scrollTop < p.scrollHeight - p.clientHeight, E = p.scrollTop > 0;
|
|
1324
|
+
if (u.deltaY > 0 && w || u.deltaY < 0 && E)
|
|
1325
1325
|
return;
|
|
1326
1326
|
}
|
|
1327
|
-
|
|
1327
|
+
u.preventDefault(), c({
|
|
1328
1328
|
type: "intent",
|
|
1329
1329
|
source: "wheel",
|
|
1330
|
-
deltaX:
|
|
1331
|
-
deltaY:
|
|
1332
|
-
originalEvent:
|
|
1330
|
+
deltaX: u.deltaX,
|
|
1331
|
+
deltaY: u.deltaY,
|
|
1332
|
+
originalEvent: u
|
|
1333
1333
|
});
|
|
1334
|
-
},
|
|
1334
|
+
}, l = (u) => {
|
|
1335
1335
|
if (!n) return;
|
|
1336
|
-
const d =
|
|
1337
|
-
d && (
|
|
1338
|
-
},
|
|
1336
|
+
const d = u.touches[0];
|
|
1337
|
+
d && (o.current = { x: d.clientX, y: d.clientY });
|
|
1338
|
+
}, h = (u) => {
|
|
1339
1339
|
if (!n) return;
|
|
1340
|
-
const d =
|
|
1341
|
-
if (!d || !
|
|
1342
|
-
const
|
|
1340
|
+
const d = u.touches[0];
|
|
1341
|
+
if (!d || !o.current) return;
|
|
1342
|
+
const p = o.current.x - d.clientX, w = o.current.y - d.clientY, E = u.target, g = a(E);
|
|
1343
1343
|
if (g && g !== t) {
|
|
1344
|
-
const
|
|
1345
|
-
if (w > 0 &&
|
|
1346
|
-
|
|
1344
|
+
const b = g.scrollTop < g.scrollHeight - g.clientHeight, R = g.scrollTop > 0;
|
|
1345
|
+
if (w > 0 && b || w < 0 && R) {
|
|
1346
|
+
o.current = { x: d.clientX, y: d.clientY };
|
|
1347
1347
|
return;
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
|
-
|
|
1350
|
+
u.preventDefault(), o.current = { x: d.clientX, y: d.clientY }, c({
|
|
1351
1351
|
type: "intent",
|
|
1352
1352
|
source: "touch",
|
|
1353
|
-
deltaX:
|
|
1353
|
+
deltaX: p,
|
|
1354
1354
|
deltaY: w,
|
|
1355
|
-
originalEvent:
|
|
1355
|
+
originalEvent: u
|
|
1356
1356
|
});
|
|
1357
1357
|
}, v = () => {
|
|
1358
|
-
n && (
|
|
1359
|
-
}, f = (
|
|
1360
|
-
const
|
|
1361
|
-
let w = 0,
|
|
1362
|
-
switch (
|
|
1358
|
+
n && (o.current = null);
|
|
1359
|
+
}, f = (u) => {
|
|
1360
|
+
const p = t.clientHeight * 0.9;
|
|
1361
|
+
let w = 0, E = 0;
|
|
1362
|
+
switch (u.key) {
|
|
1363
1363
|
case "ArrowDown":
|
|
1364
|
-
|
|
1364
|
+
E = 40;
|
|
1365
1365
|
break;
|
|
1366
1366
|
case "ArrowUp":
|
|
1367
|
-
|
|
1367
|
+
E = -40;
|
|
1368
1368
|
break;
|
|
1369
1369
|
case "ArrowRight":
|
|
1370
1370
|
w = 40;
|
|
@@ -1373,33 +1373,33 @@ const jt = ({
|
|
|
1373
1373
|
w = -40;
|
|
1374
1374
|
break;
|
|
1375
1375
|
case "PageDown":
|
|
1376
|
-
|
|
1376
|
+
E = p;
|
|
1377
1377
|
break;
|
|
1378
1378
|
case "PageUp":
|
|
1379
|
-
|
|
1379
|
+
E = -p;
|
|
1380
1380
|
break;
|
|
1381
1381
|
case "Home":
|
|
1382
|
-
|
|
1382
|
+
E = Number.NEGATIVE_INFINITY;
|
|
1383
1383
|
break;
|
|
1384
1384
|
case "End":
|
|
1385
|
-
|
|
1385
|
+
E = Number.POSITIVE_INFINITY;
|
|
1386
1386
|
break;
|
|
1387
1387
|
case " ":
|
|
1388
|
-
|
|
1388
|
+
E = u.shiftKey ? -p : p;
|
|
1389
1389
|
break;
|
|
1390
1390
|
default:
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
|
-
|
|
1393
|
+
u.preventDefault(), c({
|
|
1394
1394
|
type: "intent",
|
|
1395
1395
|
source: "keyboard",
|
|
1396
1396
|
deltaX: w,
|
|
1397
|
-
deltaY:
|
|
1398
|
-
originalEvent:
|
|
1397
|
+
deltaY: E,
|
|
1398
|
+
originalEvent: u
|
|
1399
1399
|
});
|
|
1400
1400
|
};
|
|
1401
|
-
return t.addEventListener("wheel",
|
|
1402
|
-
t.removeEventListener("wheel",
|
|
1401
|
+
return t.addEventListener("wheel", i, { passive: !1 }), t.addEventListener("touchstart", l, { passive: !0 }), t.addEventListener("touchmove", h, { passive: !1 }), t.addEventListener("touchend", v, { passive: !0 }), t.addEventListener("keydown", f), () => {
|
|
1402
|
+
t.removeEventListener("wheel", i), t.removeEventListener("touchstart", l), t.removeEventListener("touchmove", h), t.removeEventListener("touchend", v), t.removeEventListener("keydown", f);
|
|
1403
1403
|
};
|
|
1404
1404
|
}, [e]);
|
|
1405
1405
|
}, Kn = ({
|
|
@@ -1407,52 +1407,52 @@ const jt = ({
|
|
|
1407
1407
|
orientation: t = "vertical",
|
|
1408
1408
|
throttleDuration: n = 25
|
|
1409
1409
|
}) => {
|
|
1410
|
-
const [
|
|
1411
|
-
|
|
1410
|
+
const [o, r] = M(0), [s, c] = M(), a = W(!1), i = W(), l = W(0);
|
|
1411
|
+
$(() => {
|
|
1412
1412
|
c(document);
|
|
1413
1413
|
const f = document.documentElement.scrollTop;
|
|
1414
|
-
r(f),
|
|
1415
|
-
}, []),
|
|
1414
|
+
r(f), l.current = f;
|
|
1415
|
+
}, []), $(() => {
|
|
1416
1416
|
const f = () => {
|
|
1417
1417
|
a.current || r(document.documentElement.scrollTop);
|
|
1418
1418
|
};
|
|
1419
1419
|
return s == null || s.addEventListener("scroll", f), () => {
|
|
1420
|
-
|
|
1420
|
+
i.current && clearTimeout(i.current), s == null || s.removeEventListener("scroll", f);
|
|
1421
1421
|
};
|
|
1422
1422
|
}, [s]);
|
|
1423
|
-
const
|
|
1424
|
-
return
|
|
1425
|
-
const f =
|
|
1423
|
+
const h = W(), v = W(null);
|
|
1424
|
+
return $(() => {
|
|
1425
|
+
const f = o;
|
|
1426
1426
|
if (v.current && (v.current.stop(), v.current = null), !a.current) {
|
|
1427
|
-
|
|
1427
|
+
h.current = f;
|
|
1428
1428
|
return;
|
|
1429
1429
|
}
|
|
1430
|
-
return v.current = pt(
|
|
1430
|
+
return v.current = pt(h.current ?? f, f, {
|
|
1431
1431
|
duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
|
|
1432
1432
|
ease: (e == null ? void 0 : e.ease) ?? "easeOut",
|
|
1433
|
-
onUpdate: (
|
|
1434
|
-
|
|
1435
|
-
const d = document.documentElement,
|
|
1436
|
-
Math.abs(
|
|
1433
|
+
onUpdate: (u) => {
|
|
1434
|
+
i.current && clearTimeout(i.current), h.current = u;
|
|
1435
|
+
const d = document.documentElement, p = Math.round(u * 1e3) / 1e3, w = l.current;
|
|
1436
|
+
Math.abs(p - w) < 0.1 || (l.current = p, a.current && d.scrollTo({ top: p }));
|
|
1437
1437
|
},
|
|
1438
1438
|
onComplete: () => {
|
|
1439
|
-
|
|
1439
|
+
i.current = setTimeout(() => {
|
|
1440
1440
|
a.current = !1;
|
|
1441
1441
|
}, 300), v.current = null;
|
|
1442
1442
|
}
|
|
1443
1443
|
}), () => {
|
|
1444
1444
|
v.current && (v.current.stop(), v.current = null);
|
|
1445
1445
|
};
|
|
1446
|
-
}, [
|
|
1446
|
+
}, [o]), s ? /* @__PURE__ */ m(
|
|
1447
1447
|
qt,
|
|
1448
1448
|
{
|
|
1449
1449
|
touch: !1,
|
|
1450
1450
|
el: s,
|
|
1451
1451
|
onScroll: (f) => {
|
|
1452
|
-
if ("deltaY" in f && f.deltaY !== 0 && s &&
|
|
1453
|
-
let
|
|
1452
|
+
if ("deltaY" in f && f.deltaY !== 0 && s && o !== null) {
|
|
1453
|
+
let u = o + f.deltaY;
|
|
1454
1454
|
const d = s.querySelector("html");
|
|
1455
|
-
d && (
|
|
1455
|
+
d && (u = Math.min(u, d.scrollHeight - d.clientHeight)), u = Math.max(u, 0), r(u), a.current = !0;
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
@@ -1461,27 +1461,27 @@ const jt = ({
|
|
|
1461
1461
|
style: e,
|
|
1462
1462
|
colorName: t,
|
|
1463
1463
|
stateClassName: n = "state-ripple-group",
|
|
1464
|
-
className:
|
|
1464
|
+
className: o
|
|
1465
1465
|
}) => {
|
|
1466
|
-
const r = W(null), s = W(null), [c, a] =
|
|
1466
|
+
const r = W(null), s = W(null), [c, a] = M(!1), i = Kt({
|
|
1467
1467
|
isClient: c,
|
|
1468
1468
|
stateClassName: n,
|
|
1469
|
-
className:
|
|
1469
|
+
className: o,
|
|
1470
1470
|
colorName: t
|
|
1471
1471
|
});
|
|
1472
|
-
return
|
|
1472
|
+
return $(() => {
|
|
1473
1473
|
if (r.current && n !== "state-layer") {
|
|
1474
|
-
const
|
|
1475
|
-
`.${
|
|
1474
|
+
const l = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", h = r.current.closest(
|
|
1475
|
+
`.${l}:not(.${l} .${l})`
|
|
1476
1476
|
);
|
|
1477
|
-
s.current =
|
|
1477
|
+
s.current = h;
|
|
1478
1478
|
}
|
|
1479
1479
|
a(!0);
|
|
1480
1480
|
}, []), /* @__PURE__ */ m(
|
|
1481
1481
|
"div",
|
|
1482
1482
|
{
|
|
1483
1483
|
ref: r,
|
|
1484
|
-
className:
|
|
1484
|
+
className: i.stateLayer,
|
|
1485
1485
|
style: {
|
|
1486
1486
|
"--state-color": `var(--default-color, var(--color-${t}))`,
|
|
1487
1487
|
...e
|
|
@@ -1504,11 +1504,11 @@ const jt = ({
|
|
|
1504
1504
|
targetRef: e,
|
|
1505
1505
|
children: t
|
|
1506
1506
|
}) => {
|
|
1507
|
-
const [n,
|
|
1507
|
+
const [n, o] = M(null), r = W(null), s = () => {
|
|
1508
1508
|
const c = e.current;
|
|
1509
1509
|
if (!c) return;
|
|
1510
1510
|
const a = c.getBoundingClientRect();
|
|
1511
|
-
|
|
1511
|
+
o({
|
|
1512
1512
|
position: "fixed",
|
|
1513
1513
|
top: a.top,
|
|
1514
1514
|
left: a.left,
|
|
@@ -1520,14 +1520,14 @@ const jt = ({
|
|
|
1520
1520
|
// personnalise si besoin
|
|
1521
1521
|
});
|
|
1522
1522
|
};
|
|
1523
|
-
return
|
|
1523
|
+
return $(() => {
|
|
1524
1524
|
const c = e.current;
|
|
1525
1525
|
if (c)
|
|
1526
1526
|
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), r.current = new ResizeObserver(s), r.current.observe(c), () => {
|
|
1527
1527
|
var a;
|
|
1528
1528
|
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (a = r.current) == null || a.disconnect();
|
|
1529
1529
|
};
|
|
1530
|
-
}, [e]), n ?
|
|
1530
|
+
}, [e]), n ? Ye(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
|
|
1531
1531
|
};
|
|
1532
1532
|
function Jt(e) {
|
|
1533
1533
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
|
|
@@ -1537,33 +1537,33 @@ const Gn = ({
|
|
|
1537
1537
|
throttleDelay: t = 100,
|
|
1538
1538
|
// Délai par défaut de 300ms
|
|
1539
1539
|
onLoad: n,
|
|
1540
|
-
loadTheme:
|
|
1540
|
+
loadTheme: o = !1
|
|
1541
1541
|
}) => {
|
|
1542
|
-
const [r, s] =
|
|
1543
|
-
|
|
1542
|
+
const [r, s] = M(null);
|
|
1543
|
+
$(() => {
|
|
1544
1544
|
(async () => {
|
|
1545
|
-
const f = await yt(e,
|
|
1545
|
+
const f = await yt(e, o);
|
|
1546
1546
|
s(f);
|
|
1547
1547
|
})();
|
|
1548
1548
|
}, []);
|
|
1549
|
-
const [c, a] =
|
|
1550
|
-
|
|
1549
|
+
const [c, a] = M(null), i = W(null), l = W(0), h = W(null);
|
|
1550
|
+
$(() => {
|
|
1551
1551
|
if (!r) return;
|
|
1552
1552
|
const f = {
|
|
1553
1553
|
...e,
|
|
1554
1554
|
// Assurer la compatibilité avec l'API qui attend sourceColorHex
|
|
1555
1555
|
sourceColor: e.sourceColor
|
|
1556
|
-
},
|
|
1556
|
+
}, u = Date.now(), d = u - l.current, p = async (w) => {
|
|
1557
1557
|
await v(w);
|
|
1558
1558
|
};
|
|
1559
|
-
if (
|
|
1560
|
-
|
|
1561
|
-
else if (
|
|
1559
|
+
if (l.current === 0 || d >= t)
|
|
1560
|
+
i.current && (clearTimeout(i.current), i.current = null), h.current = null, l.current = u, p(f);
|
|
1561
|
+
else if (h.current = f, !i.current) {
|
|
1562
1562
|
const w = Math.max(0, t - d);
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1563
|
+
i.current = setTimeout(async () => {
|
|
1564
|
+
i.current = null;
|
|
1565
|
+
const E = h.current;
|
|
1566
|
+
h.current = null, E && (l.current = Date.now(), await p(E));
|
|
1567
1567
|
}, w);
|
|
1568
1568
|
}
|
|
1569
1569
|
return () => {
|
|
@@ -1575,11 +1575,11 @@ const Gn = ({
|
|
|
1575
1575
|
if (!r)
|
|
1576
1576
|
return;
|
|
1577
1577
|
r.context.update(f), await r.load();
|
|
1578
|
-
const
|
|
1579
|
-
a(
|
|
1578
|
+
const u = r == null ? void 0 : r.plugins.getPlugin(Ue).getInstance().outputCss;
|
|
1579
|
+
a(u), n == null || n(r);
|
|
1580
1580
|
};
|
|
1581
|
-
return
|
|
1582
|
-
|
|
1581
|
+
return $(() => () => {
|
|
1582
|
+
i.current && (clearTimeout(i.current), i.current = null);
|
|
1583
1583
|
}, []), c ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
|
|
1584
1584
|
};
|
|
1585
1585
|
function Zt() {
|
|
@@ -1595,28 +1595,28 @@ function Zt() {
|
|
|
1595
1595
|
function Qt() {
|
|
1596
1596
|
return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function Re(e) {
|
|
1599
1599
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1600
1600
|
const t = e.classList;
|
|
1601
1601
|
return Array.from(t).some(
|
|
1602
1602
|
(n) => n.startsWith("anim-") && n.includes("scroll")
|
|
1603
1603
|
);
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function De(e) {
|
|
1606
1606
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1607
1607
|
const t = e.classList;
|
|
1608
1608
|
return Array.from(t).some((n) => n.startsWith("anim-"));
|
|
1609
1609
|
}
|
|
1610
1610
|
function Se(e, t) {
|
|
1611
|
-
if (!
|
|
1611
|
+
if (!Re(e)) return;
|
|
1612
1612
|
if (e.hasAttribute(`data-${t}-scroll`)) {
|
|
1613
1613
|
const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), a = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
|
|
1614
1614
|
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`) || (a === "inline" ? e.classList.add(`${t}-timeline-inline`) : a === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
|
|
1615
1615
|
}
|
|
1616
1616
|
const n = e.getAttribute(`data-${t}-start`);
|
|
1617
1617
|
n && e.style.setProperty(`--${t}-range-start`, n);
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1618
|
+
const o = e.getAttribute(`data-${t}-end`);
|
|
1619
|
+
o && e.style.setProperty(`--${t}-range-end`, o);
|
|
1620
1620
|
const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), s = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
|
|
1621
1621
|
!r && !s && e.setAttribute(`data-${t}-run`, "");
|
|
1622
1622
|
}
|
|
@@ -1625,12 +1625,12 @@ function Ie(e = document, t) {
|
|
|
1625
1625
|
e.querySelectorAll(
|
|
1626
1626
|
`[class*="${t}-"][class*="-scroll"]`
|
|
1627
1627
|
)
|
|
1628
|
-
).filter((
|
|
1628
|
+
).filter((o) => Re(o));
|
|
1629
1629
|
}
|
|
1630
1630
|
function Tt(e = document, t) {
|
|
1631
1631
|
const n = Array.from(
|
|
1632
1632
|
e.querySelectorAll(`[class*="${t}-"]`)
|
|
1633
|
-
),
|
|
1633
|
+
), o = /* @__PURE__ */ new Set([
|
|
1634
1634
|
`${t}-run`,
|
|
1635
1635
|
`${t}-in`,
|
|
1636
1636
|
`${t}-out`,
|
|
@@ -1648,8 +1648,8 @@ function Tt(e = document, t) {
|
|
|
1648
1648
|
if (!(r instanceof HTMLElement)) return !1;
|
|
1649
1649
|
const s = r.classList;
|
|
1650
1650
|
return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
|
|
1651
|
-
(
|
|
1652
|
-
) ? !0 : !
|
|
1651
|
+
(i) => i.startsWith(`${t}-`) && !i.includes("scroll") && !o.has(i)
|
|
1652
|
+
) ? !0 : !Re(r);
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
1655
1655
|
function zt(e, t) {
|
|
@@ -1657,71 +1657,71 @@ function zt(e, t) {
|
|
|
1657
1657
|
(n) => n.startsWith(t) && n.includes("-out")
|
|
1658
1658
|
);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function We(e, t, n) {
|
|
1661
1661
|
e.setAttribute(`data-${t}-run`, ""), e.setAttribute(`data-${t}-${n}-run`, "");
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
const
|
|
1665
|
-
e.style.animationName = "none", e.removeAttribute(`data-${t}-run`), n ? e.removeAttribute(`data-${t}-${n}-run`) : (e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`)), e.offsetWidth, e.style.animationName =
|
|
1663
|
+
function Ae(e, t, n) {
|
|
1664
|
+
const o = e.style.animationName;
|
|
1665
|
+
e.style.animationName = "none", e.removeAttribute(`data-${t}-run`), n ? e.removeAttribute(`data-${t}-${n}-run`) : (e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`)), e.offsetWidth, e.style.animationName = o;
|
|
1666
1666
|
}
|
|
1667
|
-
const en = [0, 0.2],
|
|
1668
|
-
function
|
|
1669
|
-
if (
|
|
1670
|
-
|
|
1667
|
+
const en = [0, 0.2], Pe = /* @__PURE__ */ new WeakSet();
|
|
1668
|
+
function He(e, t) {
|
|
1669
|
+
if (Pe.has(e)) return;
|
|
1670
|
+
Pe.add(e);
|
|
1671
1671
|
const n = (r) => {
|
|
1672
1672
|
r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
|
|
1673
|
-
},
|
|
1673
|
+
}, o = (r) => {
|
|
1674
1674
|
r.target === e && e.removeAttribute(`data-${t}-animating`);
|
|
1675
1675
|
};
|
|
1676
|
-
e.addEventListener("animationstart", n), e.addEventListener("animationend",
|
|
1676
|
+
e.addEventListener("animationstart", n), e.addEventListener("animationend", o), e.addEventListener("animationcancel", o);
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function st(e = {}) {
|
|
1679
1679
|
const { prefix: t = "anim", once: n = !0 } = e;
|
|
1680
1680
|
if (Qt())
|
|
1681
1681
|
return () => {
|
|
1682
1682
|
};
|
|
1683
|
-
const
|
|
1683
|
+
const o = Zt(), r = /* @__PURE__ */ new WeakSet();
|
|
1684
1684
|
let s = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, c = !0;
|
|
1685
1685
|
const a = () => {
|
|
1686
|
-
const
|
|
1687
|
-
c =
|
|
1686
|
+
const u = window.pageYOffset || window.scrollY || 0;
|
|
1687
|
+
c = u >= s, s = u;
|
|
1688
1688
|
};
|
|
1689
1689
|
typeof window < "u" && window.addEventListener("scroll", a, { passive: !0 });
|
|
1690
|
-
const
|
|
1691
|
-
(
|
|
1692
|
-
for (const d of
|
|
1693
|
-
const
|
|
1694
|
-
if (!
|
|
1695
|
-
const w = zt(
|
|
1696
|
-
d.isIntersecting ? (w &&
|
|
1690
|
+
const i = new IntersectionObserver(
|
|
1691
|
+
(u) => {
|
|
1692
|
+
for (const d of u) {
|
|
1693
|
+
const p = d.target;
|
|
1694
|
+
if (!De(p) || p.hasAttribute(`data-${t}-animating`)) continue;
|
|
1695
|
+
const w = zt(p.classList, t);
|
|
1696
|
+
d.isIntersecting ? (w && Ae(p, t, "out"), We(p, t, "in"), n && i.unobserve(p)) : n || (c || Ae(p, t, "in"), w && We(p, t, "out"));
|
|
1697
1697
|
}
|
|
1698
1698
|
},
|
|
1699
1699
|
{ threshold: en }
|
|
1700
|
-
),
|
|
1701
|
-
const d = Tt(
|
|
1702
|
-
for (const
|
|
1703
|
-
r.has(
|
|
1700
|
+
), l = (u) => {
|
|
1701
|
+
const d = Tt(u || document, t);
|
|
1702
|
+
for (const p of d)
|
|
1703
|
+
r.has(p) || (r.add(p), i.observe(p), He(p, t));
|
|
1704
1704
|
};
|
|
1705
|
-
|
|
1706
|
-
let
|
|
1707
|
-
if (
|
|
1705
|
+
l();
|
|
1706
|
+
let h, v = null, f = null;
|
|
1707
|
+
if (o)
|
|
1708
1708
|
(() => {
|
|
1709
1709
|
f == null && (f = requestAnimationFrame(() => {
|
|
1710
1710
|
f = null;
|
|
1711
1711
|
const d = Ie(void 0, t);
|
|
1712
|
-
for (const
|
|
1712
|
+
for (const p of d) Se(p, t);
|
|
1713
1713
|
}));
|
|
1714
1714
|
})(), v = new MutationObserver((d) => {
|
|
1715
|
-
for (const
|
|
1716
|
-
if (
|
|
1717
|
-
const w =
|
|
1718
|
-
w instanceof HTMLElement && (Se(w, t),
|
|
1719
|
-
} else if (
|
|
1720
|
-
for (const w of Array.from(
|
|
1715
|
+
for (const p of d)
|
|
1716
|
+
if (p.type === "attributes") {
|
|
1717
|
+
const w = p.target;
|
|
1718
|
+
w instanceof HTMLElement && (Se(w, t), De(w) && (r.has(w) || (r.add(w), i.observe(w), He(w, t))));
|
|
1719
|
+
} else if (p.type === "childList" && p.addedNodes && p.addedNodes.length) {
|
|
1720
|
+
for (const w of Array.from(p.addedNodes))
|
|
1721
1721
|
if (w instanceof HTMLElement) {
|
|
1722
|
-
const
|
|
1723
|
-
for (const g of
|
|
1724
|
-
|
|
1722
|
+
const E = Ie(w, t);
|
|
1723
|
+
for (const g of E) Se(g, t);
|
|
1724
|
+
l(w);
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
1727
|
}), v.observe(document.documentElement, {
|
|
@@ -1736,22 +1736,22 @@ function ct(e = {}) {
|
|
|
1736
1736
|
`data-${t}-paused`,
|
|
1737
1737
|
`data-${t}-run`
|
|
1738
1738
|
]
|
|
1739
|
-
}),
|
|
1739
|
+
}), h = () => {
|
|
1740
1740
|
f != null && cancelAnimationFrame(f), v && v.disconnect();
|
|
1741
1741
|
};
|
|
1742
1742
|
else {
|
|
1743
|
-
let
|
|
1744
|
-
Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((
|
|
1745
|
-
|
|
1746
|
-
}),
|
|
1747
|
-
typeof
|
|
1743
|
+
let u;
|
|
1744
|
+
Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((p) => {
|
|
1745
|
+
u = p.initScrollViewFallback({ once: n });
|
|
1746
|
+
}), h = () => {
|
|
1747
|
+
typeof u == "function" && u();
|
|
1748
1748
|
};
|
|
1749
1749
|
}
|
|
1750
1750
|
return () => {
|
|
1751
|
-
|
|
1751
|
+
h && h(), typeof window < "u" && window.removeEventListener("scroll", a), i.disconnect();
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
|
-
const Jn =
|
|
1754
|
+
const Jn = st, Zn = st;
|
|
1755
1755
|
function tn(e) {
|
|
1756
1756
|
const t = {
|
|
1757
1757
|
primary: "filled",
|
|
@@ -1759,97 +1759,97 @@ function tn(e) {
|
|
|
1759
1759
|
};
|
|
1760
1760
|
return e && e in t ? t[e] : e || "filled";
|
|
1761
1761
|
}
|
|
1762
|
-
const
|
|
1762
|
+
const ct = ({
|
|
1763
1763
|
variant: e = "filled",
|
|
1764
1764
|
disabled: t = !1,
|
|
1765
1765
|
icon: n,
|
|
1766
|
-
href:
|
|
1766
|
+
href: o,
|
|
1767
1767
|
label: r,
|
|
1768
1768
|
disableTextMargins: s,
|
|
1769
1769
|
className: c,
|
|
1770
1770
|
iconPosition: a = "left",
|
|
1771
|
-
loading:
|
|
1772
|
-
shape:
|
|
1773
|
-
onClick:
|
|
1771
|
+
loading: i = !1,
|
|
1772
|
+
shape: l = "rounded",
|
|
1773
|
+
onClick: h,
|
|
1774
1774
|
onToggle: v,
|
|
1775
1775
|
activated: f,
|
|
1776
|
-
ref:
|
|
1776
|
+
ref: u,
|
|
1777
1777
|
size: d = "medium",
|
|
1778
|
-
allowShapeTransformation:
|
|
1778
|
+
allowShapeTransformation: p = !0,
|
|
1779
1779
|
transition: w,
|
|
1780
|
-
children:
|
|
1780
|
+
children: E,
|
|
1781
1781
|
...g
|
|
1782
1782
|
}) => {
|
|
1783
|
-
if (
|
|
1783
|
+
if (E && (r = E), !r)
|
|
1784
1784
|
throw new Error(
|
|
1785
1785
|
"Button component requires either a label prop or children content"
|
|
1786
1786
|
);
|
|
1787
1787
|
e = tn(e);
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1790
|
-
|
|
1788
|
+
const b = o ? "a" : "button", R = W(null), A = u || R, [N, F] = Z.useState(f);
|
|
1789
|
+
$(() => {
|
|
1790
|
+
F(f);
|
|
1791
1791
|
}, [f]), w = { duration: 0.3, ...w };
|
|
1792
|
-
let
|
|
1793
|
-
v ? v && (
|
|
1792
|
+
let O;
|
|
1793
|
+
v ? v && (O = (S) => {
|
|
1794
1794
|
t && S.preventDefault();
|
|
1795
|
-
const
|
|
1796
|
-
V
|
|
1797
|
-
}) :
|
|
1798
|
-
t && S.preventDefault(),
|
|
1795
|
+
const V = !N;
|
|
1796
|
+
F(V), v(V);
|
|
1797
|
+
}) : O = (S) => {
|
|
1798
|
+
t && S.preventDefault(), h && h(S);
|
|
1799
1799
|
};
|
|
1800
|
-
const
|
|
1801
|
-
allowShapeTransformation:
|
|
1800
|
+
const I = Nt({
|
|
1801
|
+
allowShapeTransformation: p,
|
|
1802
1802
|
size: d,
|
|
1803
1803
|
disableTextMargins: s,
|
|
1804
|
-
shape:
|
|
1805
|
-
href:
|
|
1804
|
+
shape: l,
|
|
1805
|
+
href: o,
|
|
1806
1806
|
disabled: t,
|
|
1807
1807
|
icon: n,
|
|
1808
1808
|
iconPosition: a,
|
|
1809
|
-
loading:
|
|
1809
|
+
loading: i,
|
|
1810
1810
|
variant: e,
|
|
1811
1811
|
transition: w,
|
|
1812
1812
|
className: c,
|
|
1813
|
-
isActive:
|
|
1813
|
+
isActive: N ?? !1,
|
|
1814
1814
|
onToggle: v,
|
|
1815
|
-
activated:
|
|
1815
|
+
activated: N,
|
|
1816
1816
|
label: r,
|
|
1817
1817
|
children: r
|
|
1818
|
-
}), x = n ? /* @__PURE__ */ m(ie, { icon: n, className:
|
|
1818
|
+
}), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: I.icon }) : /* @__PURE__ */ m(me, {});
|
|
1819
1819
|
return /* @__PURE__ */ Y(
|
|
1820
|
-
|
|
1820
|
+
b,
|
|
1821
1821
|
{
|
|
1822
1822
|
ref: A,
|
|
1823
|
-
href:
|
|
1824
|
-
className:
|
|
1823
|
+
href: o,
|
|
1824
|
+
className: I.button,
|
|
1825
1825
|
...g,
|
|
1826
|
-
onClick:
|
|
1826
|
+
onClick: O,
|
|
1827
1827
|
disabled: t,
|
|
1828
|
-
"aria-pressed": v ?
|
|
1828
|
+
"aria-pressed": v ? N : void 0,
|
|
1829
1829
|
style: { transition: w.duration + "s" },
|
|
1830
1830
|
children: [
|
|
1831
|
-
/* @__PURE__ */ m("div", { className:
|
|
1831
|
+
/* @__PURE__ */ m("div", { className: I.touchTarget }),
|
|
1832
1832
|
/* @__PURE__ */ m(
|
|
1833
1833
|
ye,
|
|
1834
1834
|
{
|
|
1835
1835
|
style: { transition: w.duration + "s" },
|
|
1836
|
-
className:
|
|
1836
|
+
className: I.stateLayer,
|
|
1837
1837
|
colorName: y(
|
|
1838
1838
|
e === "filled" && {
|
|
1839
|
-
"on-surface-variant": !
|
|
1840
|
-
"on-primary":
|
|
1839
|
+
"on-surface-variant": !N && !!v,
|
|
1840
|
+
"on-primary": N || !v
|
|
1841
1841
|
},
|
|
1842
1842
|
e === "elevated" && {
|
|
1843
|
-
"on-primary":
|
|
1844
|
-
primary: !
|
|
1843
|
+
"on-primary": N && !!v,
|
|
1844
|
+
primary: !N || !v
|
|
1845
1845
|
},
|
|
1846
1846
|
e === "tonal" && {
|
|
1847
|
-
"on-secondary":
|
|
1848
|
-
"on-secondary-container": !
|
|
1847
|
+
"on-secondary": N && !!v,
|
|
1848
|
+
"on-secondary-container": !N || !v
|
|
1849
1849
|
},
|
|
1850
1850
|
e === "outlined" && {
|
|
1851
|
-
"inverse-on-surface":
|
|
1852
|
-
"on-surface-variant": !
|
|
1851
|
+
"inverse-on-surface": N && !!v,
|
|
1852
|
+
"on-surface-variant": !N || !v
|
|
1853
1853
|
},
|
|
1854
1854
|
e === "text" && "primary"
|
|
1855
1855
|
),
|
|
@@ -1857,7 +1857,7 @@ const Ce = ({
|
|
|
1857
1857
|
}
|
|
1858
1858
|
),
|
|
1859
1859
|
a === "left" && x,
|
|
1860
|
-
|
|
1860
|
+
i && /* @__PURE__ */ m(
|
|
1861
1861
|
"div",
|
|
1862
1862
|
{
|
|
1863
1863
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
@@ -1894,7 +1894,7 @@ const Ce = ({
|
|
|
1894
1894
|
)
|
|
1895
1895
|
}
|
|
1896
1896
|
),
|
|
1897
|
-
/* @__PURE__ */ m("span", { className:
|
|
1897
|
+
/* @__PURE__ */ m("span", { className: I.label, children: r }),
|
|
1898
1898
|
a === "right" && x
|
|
1899
1899
|
]
|
|
1900
1900
|
}
|
|
@@ -1903,13 +1903,13 @@ const Ce = ({
|
|
|
1903
1903
|
variant: e = "outlined",
|
|
1904
1904
|
className: t,
|
|
1905
1905
|
children: n,
|
|
1906
|
-
isInteractive:
|
|
1906
|
+
isInteractive: o = !1,
|
|
1907
1907
|
ref: r,
|
|
1908
1908
|
...s
|
|
1909
1909
|
}) => {
|
|
1910
|
-
const c = Et({ className: t, isInteractive:
|
|
1910
|
+
const c = Et({ className: t, isInteractive: o, variant: e, children: n }), a = W(null);
|
|
1911
1911
|
return /* @__PURE__ */ Y("div", { ...s, ref: r || a, className: c.card, children: [
|
|
1912
|
-
|
|
1912
|
+
o && /* @__PURE__ */ m(
|
|
1913
1913
|
ye,
|
|
1914
1914
|
{
|
|
1915
1915
|
className: c.stateLayer,
|
|
@@ -1920,20 +1920,20 @@ const Ce = ({
|
|
|
1920
1920
|
n
|
|
1921
1921
|
] });
|
|
1922
1922
|
}, he = (e, t, n = [0, 1]) => {
|
|
1923
|
-
const [
|
|
1924
|
-
return s +
|
|
1923
|
+
const [o, r] = t, [s, c] = n, i = (Math.max(o, Math.min(e, r)) - o) / (r - o);
|
|
1924
|
+
return s + i * (c - s);
|
|
1925
1925
|
}, nn = ({
|
|
1926
1926
|
className: e,
|
|
1927
1927
|
children: t,
|
|
1928
1928
|
width: n,
|
|
1929
|
-
index:
|
|
1929
|
+
index: o = 0,
|
|
1930
1930
|
outputRange: r,
|
|
1931
1931
|
ref: s,
|
|
1932
1932
|
...c
|
|
1933
1933
|
}) => {
|
|
1934
|
-
const a = W(null),
|
|
1934
|
+
const a = W(null), i = s || a, l = St({
|
|
1935
1935
|
className: e,
|
|
1936
|
-
index:
|
|
1936
|
+
index: o,
|
|
1937
1937
|
width: n,
|
|
1938
1938
|
children: t,
|
|
1939
1939
|
outputRange: r
|
|
@@ -1941,7 +1941,7 @@ const Ce = ({
|
|
|
1941
1941
|
return /* @__PURE__ */ m(
|
|
1942
1942
|
"div",
|
|
1943
1943
|
{
|
|
1944
|
-
ref:
|
|
1944
|
+
ref: i,
|
|
1945
1945
|
style: {
|
|
1946
1946
|
width: n + "px",
|
|
1947
1947
|
maxWidth: r[1] + "px",
|
|
@@ -1952,7 +1952,7 @@ const Ce = ({
|
|
|
1952
1952
|
duration: 0.5,
|
|
1953
1953
|
ease: "linear"
|
|
1954
1954
|
},
|
|
1955
|
-
className:
|
|
1955
|
+
className: l.carouselItem,
|
|
1956
1956
|
...c,
|
|
1957
1957
|
children: t
|
|
1958
1958
|
}
|
|
@@ -1961,38 +1961,38 @@ const Ce = ({
|
|
|
1961
1961
|
variant: e = "hero",
|
|
1962
1962
|
className: t,
|
|
1963
1963
|
children: n,
|
|
1964
|
-
ref:
|
|
1964
|
+
ref: o,
|
|
1965
1965
|
marginPourcent: r = 0,
|
|
1966
1966
|
inputRange: s = [0.21, 0.65],
|
|
1967
1967
|
outputRange: c = [42, 300],
|
|
1968
1968
|
gap: a = 8,
|
|
1969
|
-
onChange:
|
|
1970
|
-
onMetricsChange:
|
|
1971
|
-
index:
|
|
1969
|
+
onChange: i,
|
|
1970
|
+
onMetricsChange: l,
|
|
1971
|
+
index: h,
|
|
1972
1972
|
scrollSensitivity: v = 1.25,
|
|
1973
1973
|
...f
|
|
1974
1974
|
}) => {
|
|
1975
|
-
const
|
|
1976
|
-
index:
|
|
1975
|
+
const u = W(null), d = o || u, [p, w] = M(0), E = It({
|
|
1976
|
+
index: h,
|
|
1977
1977
|
className: t,
|
|
1978
1978
|
children: n,
|
|
1979
1979
|
variant: e,
|
|
1980
1980
|
inputRange: s,
|
|
1981
1981
|
outputRange: c,
|
|
1982
1982
|
marginPourcent: r,
|
|
1983
|
-
onChange:
|
|
1983
|
+
onChange: i,
|
|
1984
1984
|
gap: a,
|
|
1985
1985
|
scrollSensitivity: v,
|
|
1986
|
-
onMetricsChange:
|
|
1986
|
+
onMetricsChange: l
|
|
1987
1987
|
}), g = Z.Children.toArray(n).filter(
|
|
1988
|
-
(
|
|
1989
|
-
),
|
|
1988
|
+
(L) => Z.isValidElement(L) && L.type === nn
|
|
1989
|
+
), b = W(null), [R, A] = M(
|
|
1990
1990
|
{}
|
|
1991
|
-
), [
|
|
1991
|
+
), [N, F] = M(null), O = W(0), I = W(null), x = () => {
|
|
1992
1992
|
var fe, we;
|
|
1993
|
-
if (!
|
|
1993
|
+
if (!b.current || !d.current || (N == null ? void 0 : N.scrollProgress) === void 0)
|
|
1994
1994
|
return [];
|
|
1995
|
-
const
|
|
1995
|
+
const L = (N == null ? void 0 : N.scrollVisible) ?? ((fe = d.current) == null ? void 0 : fe.clientWidth) ?? 0;
|
|
1996
1996
|
function D(P, T) {
|
|
1997
1997
|
return P.map((ee, ve) => {
|
|
1998
1998
|
const Ee = (ee - T) / Math.abs(P[1] - P[0]);
|
|
@@ -2004,15 +2004,15 @@ const Ce = ({
|
|
|
2004
2004
|
};
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
|
-
const
|
|
2008
|
-
if (!S[T].current || !
|
|
2007
|
+
const H = g.map((P, T) => {
|
|
2008
|
+
if (!S[T].current || !b.current) return 0;
|
|
2009
2009
|
const ve = T / (g.length - 1);
|
|
2010
2010
|
return he(ve, [0, 1], [0, 1]);
|
|
2011
2011
|
}), j = D(
|
|
2012
|
-
|
|
2013
|
-
(
|
|
2012
|
+
H,
|
|
2013
|
+
(N == null ? void 0 : N.scrollProgress) ?? 0
|
|
2014
2014
|
).sort((P, T) => P.index - T.index);
|
|
2015
|
-
let X = (((we = d.current) == null ? void 0 : we.clientWidth) ??
|
|
2015
|
+
let X = (((we = d.current) == null ? void 0 : we.clientWidth) ?? L) + a + c[0] + a;
|
|
2016
2016
|
const re = j.sort((P, T) => Math.abs(P.relativeIndex) - Math.abs(T.relativeIndex)).map((P, T) => {
|
|
2017
2017
|
if (!(X <= 0)) {
|
|
2018
2018
|
if (T == 0 && G(P.index), P.width = he(
|
|
@@ -2049,26 +2049,26 @@ const Ce = ({
|
|
|
2049
2049
|
return w(Ne), Object.fromEntries(
|
|
2050
2050
|
re.map((P) => [P.index, P.width])
|
|
2051
2051
|
);
|
|
2052
|
-
}, S = W([]).current, [
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
}, [
|
|
2056
|
-
typeof
|
|
2057
|
-
}, [
|
|
2058
|
-
_(
|
|
2059
|
-
}, [
|
|
2052
|
+
}, S = W([]).current, [V, G] = M(0);
|
|
2053
|
+
$(() => {
|
|
2054
|
+
i && i(V);
|
|
2055
|
+
}, [V]), $(() => {
|
|
2056
|
+
typeof h == "number" && g.length > 0 && h !== V && ne(h);
|
|
2057
|
+
}, [h, g.length]), $(() => {
|
|
2058
|
+
_(V);
|
|
2059
|
+
}, [V]), S.length !== g.length && g.forEach((L, D) => {
|
|
2060
2060
|
S[D] || (S[D] = Z.createRef());
|
|
2061
2061
|
});
|
|
2062
|
-
const [te, _] =
|
|
2062
|
+
const [te, _] = M(0), ne = (L, D = {}) => {
|
|
2063
2063
|
if (!g.length) return 0;
|
|
2064
|
-
const
|
|
2065
|
-
if (!
|
|
2064
|
+
const H = S[L];
|
|
2065
|
+
if (!H || !H.current || !b.current) return 0;
|
|
2066
2066
|
const j = he(
|
|
2067
|
-
|
|
2067
|
+
L / Math.max(1, g.length - 1),
|
|
2068
2068
|
[0, 1],
|
|
2069
2069
|
[0, 1]
|
|
2070
2070
|
);
|
|
2071
|
-
return _(
|
|
2071
|
+
return _(L), b.current.dispatchEvent(
|
|
2072
2072
|
new CustomEvent("udx:customScroll:set", {
|
|
2073
2073
|
bubbles: !0,
|
|
2074
2074
|
detail: {
|
|
@@ -2078,32 +2078,32 @@ const Ce = ({
|
|
|
2078
2078
|
}
|
|
2079
2079
|
})
|
|
2080
2080
|
), j;
|
|
2081
|
-
}, B = g.map((
|
|
2081
|
+
}, B = g.map((L, D) => {
|
|
2082
2082
|
var re;
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2083
|
+
const H = (re = L.props) == null ? void 0 : re.onClick, j = (ae) => {
|
|
2084
|
+
H == null || H(ae);
|
|
2085
2085
|
}, X = () => _(D);
|
|
2086
2086
|
return Z.cloneElement(
|
|
2087
|
-
|
|
2087
|
+
L,
|
|
2088
2088
|
{
|
|
2089
|
-
width:
|
|
2089
|
+
width: R[D],
|
|
2090
2090
|
outputRange: c,
|
|
2091
2091
|
ref: S[D],
|
|
2092
2092
|
key: D,
|
|
2093
2093
|
index: D,
|
|
2094
2094
|
role: "option",
|
|
2095
|
-
"aria-selected":
|
|
2096
|
-
tabIndex:
|
|
2095
|
+
"aria-selected": V === D,
|
|
2096
|
+
tabIndex: V === D ? 0 : -1,
|
|
2097
2097
|
onClick: j,
|
|
2098
2098
|
onFocus: X
|
|
2099
2099
|
}
|
|
2100
2100
|
);
|
|
2101
|
-
}), k = (
|
|
2101
|
+
}), k = (L) => {
|
|
2102
2102
|
var D;
|
|
2103
|
-
if (
|
|
2104
|
-
(D =
|
|
2105
|
-
const
|
|
2106
|
-
|
|
2103
|
+
if (L.scrollTotal > 0) {
|
|
2104
|
+
(D = I.current) == null || D.stop();
|
|
2105
|
+
const H = O.current ?? 0, j = L.scrollProgress ?? 0;
|
|
2106
|
+
I.current = ht(H, j, {
|
|
2107
2107
|
// Spring tuning to add a bit of inertia and smoothness
|
|
2108
2108
|
type: "spring",
|
|
2109
2109
|
stiffness: 260,
|
|
@@ -2111,28 +2111,28 @@ const Ce = ({
|
|
|
2111
2111
|
mass: 0.6,
|
|
2112
2112
|
restDelta: 5e-4,
|
|
2113
2113
|
onUpdate: (X) => {
|
|
2114
|
-
|
|
2114
|
+
O.current = X, F({ ...L, scrollProgress: X });
|
|
2115
2115
|
}
|
|
2116
2116
|
});
|
|
2117
2117
|
}
|
|
2118
2118
|
};
|
|
2119
|
-
|
|
2120
|
-
const
|
|
2121
|
-
A(
|
|
2122
|
-
}, [
|
|
2123
|
-
const U = W(
|
|
2124
|
-
|
|
2125
|
-
U.current =
|
|
2126
|
-
}, [
|
|
2119
|
+
$(() => {
|
|
2120
|
+
const L = x();
|
|
2121
|
+
A(L);
|
|
2122
|
+
}, [N]);
|
|
2123
|
+
const U = W(l);
|
|
2124
|
+
$(() => {
|
|
2125
|
+
U.current = l;
|
|
2126
|
+
}, [l]);
|
|
2127
2127
|
const K = W(null);
|
|
2128
|
-
|
|
2128
|
+
$(() => {
|
|
2129
2129
|
var T;
|
|
2130
|
-
const
|
|
2131
|
-
if (!
|
|
2130
|
+
const L = U.current;
|
|
2131
|
+
if (!L || !(d != null && d.current)) return;
|
|
2132
2132
|
const D = g.length;
|
|
2133
2133
|
if (D <= 0) return;
|
|
2134
|
-
const
|
|
2135
|
-
Math.max(0,
|
|
2134
|
+
const H = ((T = d.current) == null ? void 0 : T.clientWidth) ?? 0, j = c[1], X = O.current ?? (N == null ? void 0 : N.scrollProgress) ?? 0, re = (H + a) / (j + a), ae = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(ae * (2 / 3))), ce = Math.min(
|
|
2135
|
+
Math.max(0, V),
|
|
2136
2136
|
Math.max(0, D - 1)
|
|
2137
2137
|
), oe = ce > 0, Ne = ce < D - 1, fe = {
|
|
2138
2138
|
total: D,
|
|
@@ -2143,7 +2143,7 @@ const Ce = ({
|
|
|
2143
2143
|
canPrev: oe,
|
|
2144
2144
|
canNext: Ne,
|
|
2145
2145
|
scrollProgress: X,
|
|
2146
|
-
viewportWidth:
|
|
2146
|
+
viewportWidth: H,
|
|
2147
2147
|
itemMaxWidth: j,
|
|
2148
2148
|
gap: a
|
|
2149
2149
|
}, we = K.current;
|
|
@@ -2155,49 +2155,49 @@ const Ce = ({
|
|
|
2155
2155
|
break;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
P && (K.current = fe,
|
|
2159
|
-
}, [d, g.length,
|
|
2160
|
-
var
|
|
2161
|
-
(
|
|
2158
|
+
P && (K.current = fe, L(fe));
|
|
2159
|
+
}, [d, g.length, V, N, a, c]), $(() => () => {
|
|
2160
|
+
var L;
|
|
2161
|
+
(L = I.current) == null || L.stop();
|
|
2162
2162
|
}, []);
|
|
2163
|
-
const [le, ue] =
|
|
2164
|
-
|
|
2165
|
-
let
|
|
2166
|
-
|
|
2167
|
-
const D = (
|
|
2163
|
+
const [le, ue] = M(0);
|
|
2164
|
+
Ve(() => {
|
|
2165
|
+
let L = c[1];
|
|
2166
|
+
N && L > N.scrollVisible && (L = N.scrollVisible);
|
|
2167
|
+
const D = (L + a) * B.length / v;
|
|
2168
2168
|
ue(D);
|
|
2169
|
-
}, [d, S,
|
|
2170
|
-
const C = (
|
|
2169
|
+
}, [d, S, N]);
|
|
2170
|
+
const C = (L) => {
|
|
2171
2171
|
if (!g.length) return;
|
|
2172
|
-
const D = te ??
|
|
2173
|
-
switch (
|
|
2172
|
+
const D = te ?? V;
|
|
2173
|
+
switch (L.key) {
|
|
2174
2174
|
case "ArrowLeft":
|
|
2175
|
-
|
|
2175
|
+
L.preventDefault(), ne(Math.max(0, D - 1));
|
|
2176
2176
|
break;
|
|
2177
2177
|
case "ArrowRight":
|
|
2178
|
-
|
|
2178
|
+
L.preventDefault(), ne(Math.min(g.length - 1, D + 1));
|
|
2179
2179
|
break;
|
|
2180
2180
|
case "Home":
|
|
2181
|
-
|
|
2181
|
+
L.preventDefault(), ne(0);
|
|
2182
2182
|
break;
|
|
2183
2183
|
case "End":
|
|
2184
|
-
|
|
2184
|
+
L.preventDefault(), ne(g.length - 1);
|
|
2185
2185
|
break;
|
|
2186
2186
|
case "Enter":
|
|
2187
2187
|
case " ":
|
|
2188
|
-
|
|
2188
|
+
L.preventDefault(), ne(D);
|
|
2189
2189
|
break;
|
|
2190
2190
|
}
|
|
2191
2191
|
};
|
|
2192
|
-
return
|
|
2193
|
-
const
|
|
2194
|
-
if (!
|
|
2195
|
-
const D = (
|
|
2196
|
-
const j =
|
|
2192
|
+
return $(() => {
|
|
2193
|
+
const L = d.current;
|
|
2194
|
+
if (!L) return;
|
|
2195
|
+
const D = (H) => {
|
|
2196
|
+
const j = H.detail;
|
|
2197
2197
|
j && typeof j.index == "number" && ne(j.index);
|
|
2198
2198
|
};
|
|
2199
|
-
return
|
|
2200
|
-
|
|
2199
|
+
return L.addEventListener("udx:carousel:centerIndex", D), () => {
|
|
2200
|
+
L.removeEventListener(
|
|
2201
2201
|
"udx:carousel:centerIndex",
|
|
2202
2202
|
D
|
|
2203
2203
|
);
|
|
@@ -2205,7 +2205,7 @@ const Ce = ({
|
|
|
2205
2205
|
}, [d, g.length]), /* @__PURE__ */ m(
|
|
2206
2206
|
"div",
|
|
2207
2207
|
{
|
|
2208
|
-
className:
|
|
2208
|
+
className: E.carousel,
|
|
2209
2209
|
ref: d,
|
|
2210
2210
|
role: "listbox",
|
|
2211
2211
|
"aria-orientation": "horizontal",
|
|
@@ -2221,11 +2221,11 @@ const Ce = ({
|
|
|
2221
2221
|
children: /* @__PURE__ */ m(
|
|
2222
2222
|
"div",
|
|
2223
2223
|
{
|
|
2224
|
-
className:
|
|
2225
|
-
ref:
|
|
2224
|
+
className: E.track,
|
|
2225
|
+
ref: b,
|
|
2226
2226
|
style: {
|
|
2227
2227
|
gap: `${a}px`,
|
|
2228
|
-
translate:
|
|
2228
|
+
translate: p,
|
|
2229
2229
|
willChange: "translate"
|
|
2230
2230
|
},
|
|
2231
2231
|
children: B
|
|
@@ -2240,8 +2240,8 @@ const Ce = ({
|
|
|
2240
2240
|
className: t,
|
|
2241
2241
|
...n
|
|
2242
2242
|
}) => {
|
|
2243
|
-
const
|
|
2244
|
-
return /* @__PURE__ */ m("hr", { className:
|
|
2243
|
+
const o = kt({ orientation: e, className: t });
|
|
2244
|
+
return /* @__PURE__ */ m("hr", { className: o.divider, ...n });
|
|
2245
2245
|
}, z = [];
|
|
2246
2246
|
for (let e = 0; e < 256; ++e)
|
|
2247
2247
|
z.push((e + 256).toString(16).slice(1));
|
|
@@ -2258,35 +2258,35 @@ function an() {
|
|
|
2258
2258
|
}
|
|
2259
2259
|
return ke(ln);
|
|
2260
2260
|
}
|
|
2261
|
-
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
2261
|
+
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Fe = { randomUUID: sn };
|
|
2262
2262
|
function ge(e, t, n) {
|
|
2263
2263
|
var r;
|
|
2264
|
-
if (
|
|
2265
|
-
return
|
|
2264
|
+
if (Fe.randomUUID && !e)
|
|
2265
|
+
return Fe.randomUUID();
|
|
2266
2266
|
e = e || {};
|
|
2267
|
-
const
|
|
2268
|
-
if (
|
|
2267
|
+
const o = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? an();
|
|
2268
|
+
if (o.length < 16)
|
|
2269
2269
|
throw new Error("Random bytes length must be >= 16");
|
|
2270
|
-
return
|
|
2270
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, on(o);
|
|
2271
2271
|
}
|
|
2272
2272
|
const it = ({
|
|
2273
2273
|
variant: e = "plain",
|
|
2274
2274
|
buttons: t,
|
|
2275
2275
|
className: n,
|
|
2276
|
-
children:
|
|
2276
|
+
children: o,
|
|
2277
2277
|
title: r,
|
|
2278
2278
|
text: s,
|
|
2279
2279
|
position: c,
|
|
2280
2280
|
targetRef: a,
|
|
2281
|
-
ref:
|
|
2282
|
-
trigger:
|
|
2283
|
-
...
|
|
2281
|
+
ref: i,
|
|
2282
|
+
trigger: l = ["hover", "focus"],
|
|
2283
|
+
...h
|
|
2284
2284
|
}) => {
|
|
2285
|
-
if (!
|
|
2285
|
+
if (!o && !a)
|
|
2286
2286
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
2287
|
-
Array.isArray(
|
|
2288
|
-
const v = W(null), f = a || v, [
|
|
2289
|
-
|
|
2287
|
+
Array.isArray(l) || (l = [l]), t && !Array.isArray(t) && (t = [t]);
|
|
2288
|
+
const v = W(null), f = a || v, [u, d] = M(null), [p] = M(ge()), [w, E] = M(!1), g = W(null);
|
|
2289
|
+
$(() => {
|
|
2290
2290
|
const x = (S) => {
|
|
2291
2291
|
d(S.detail);
|
|
2292
2292
|
};
|
|
@@ -2296,80 +2296,80 @@ const it = ({
|
|
|
2296
2296
|
x
|
|
2297
2297
|
);
|
|
2298
2298
|
};
|
|
2299
|
-
}, []),
|
|
2300
|
-
g.current && clearTimeout(g.current),
|
|
2301
|
-
|
|
2299
|
+
}, []), $(() => {
|
|
2300
|
+
g.current && clearTimeout(g.current), u ? E(u === p) : g.current = setTimeout(() => {
|
|
2301
|
+
E(!1);
|
|
2302
2302
|
}, 1200);
|
|
2303
|
-
}, [
|
|
2304
|
-
const
|
|
2305
|
-
if (
|
|
2306
|
-
const x = new CustomEvent("tooltip-update", { detail:
|
|
2303
|
+
}, [u, p]);
|
|
2304
|
+
const b = () => {
|
|
2305
|
+
if (l.includes("hover")) {
|
|
2306
|
+
const x = new CustomEvent("tooltip-update", { detail: p });
|
|
2307
2307
|
document.dispatchEvent(x);
|
|
2308
2308
|
}
|
|
2309
|
-
},
|
|
2310
|
-
if (
|
|
2309
|
+
}, R = () => {
|
|
2310
|
+
if (l.includes("hover")) {
|
|
2311
2311
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2312
2312
|
document.dispatchEvent(x);
|
|
2313
2313
|
}
|
|
2314
2314
|
}, A = () => {
|
|
2315
|
-
if (
|
|
2315
|
+
if (l.includes("click")) {
|
|
2316
2316
|
const x = new CustomEvent("tooltip-update", {
|
|
2317
|
-
detail: w ? null :
|
|
2317
|
+
detail: w ? null : p
|
|
2318
2318
|
});
|
|
2319
2319
|
document.dispatchEvent(x);
|
|
2320
2320
|
}
|
|
2321
|
-
},
|
|
2322
|
-
if (
|
|
2323
|
-
const x = new CustomEvent("tooltip-update", { detail:
|
|
2321
|
+
}, N = () => {
|
|
2322
|
+
if (l.includes("focus")) {
|
|
2323
|
+
const x = new CustomEvent("tooltip-update", { detail: p });
|
|
2324
2324
|
document.dispatchEvent(x);
|
|
2325
2325
|
}
|
|
2326
|
-
},
|
|
2327
|
-
if (
|
|
2326
|
+
}, F = () => {
|
|
2327
|
+
if (l.includes("focus")) {
|
|
2328
2328
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2329
2329
|
document.dispatchEvent(x);
|
|
2330
2330
|
}
|
|
2331
2331
|
};
|
|
2332
|
-
|
|
2332
|
+
$(() => {
|
|
2333
2333
|
if (f != null && f.current) {
|
|
2334
2334
|
const x = f.current;
|
|
2335
|
-
return x.addEventListener("mouseenter",
|
|
2336
|
-
x.removeEventListener("mouseenter",
|
|
2335
|
+
return x.addEventListener("mouseenter", b), x.addEventListener("mouseleave", R), x.addEventListener("click", A), x.addEventListener("focus", N), x.addEventListener("blur", F), () => {
|
|
2336
|
+
x.removeEventListener("mouseenter", b), x.removeEventListener("mouseleave", R), x.removeEventListener("click", A), x.removeEventListener("focus", N), x.removeEventListener("blur", F);
|
|
2337
2337
|
};
|
|
2338
2338
|
}
|
|
2339
|
-
}, [f,
|
|
2340
|
-
const
|
|
2339
|
+
}, [f, l, p, w]);
|
|
2340
|
+
const O = !a && pe(o) ? xe(o, { ref: v }) : o;
|
|
2341
2341
|
if (!c && typeof window < "u" && f != null && f.current && !c) {
|
|
2342
|
-
const x = f.current.getBoundingClientRect(), S = window.innerWidth,
|
|
2342
|
+
const x = f.current.getBoundingClientRect(), S = window.innerWidth, V = window.innerHeight, G = x.left / S, te = x.top / V;
|
|
2343
2343
|
e === "plain" ? G < 1 / 3 ? c = "right" : G > 2 / 3 ? c = "left" : c = te > 0.5 ? "top" : "bottom" : G < 1 / 2 && te < 1 / 2 ? c = "bottom-right" : G > 1 / 2 && te < 1 / 2 ? c = "bottom-left" : G > 1 / 2 && te > 1 / 2 ? c = "top-left" : G < 1 / 2 && te > 1 / 2 && (c = "top-right");
|
|
2344
2344
|
}
|
|
2345
|
-
const
|
|
2345
|
+
const I = Ot({
|
|
2346
2346
|
variant: e,
|
|
2347
2347
|
buttons: t,
|
|
2348
2348
|
className: n,
|
|
2349
2349
|
title: r,
|
|
2350
2350
|
text: s,
|
|
2351
2351
|
position: c,
|
|
2352
|
-
trigger:
|
|
2352
|
+
trigger: l,
|
|
2353
2353
|
targetRef: a,
|
|
2354
|
-
children:
|
|
2354
|
+
children: o
|
|
2355
2355
|
});
|
|
2356
2356
|
return /* @__PURE__ */ Y(me, { children: [
|
|
2357
|
-
|
|
2357
|
+
O,
|
|
2358
2358
|
/* @__PURE__ */ m(se, { children: w && /* @__PURE__ */ m(Gt, { targetRef: f, children: /* @__PURE__ */ m(
|
|
2359
2359
|
q.div,
|
|
2360
2360
|
{
|
|
2361
|
-
initial: { opacity:
|
|
2361
|
+
initial: { opacity: u ? 1 : 0 },
|
|
2362
2362
|
animate: { opacity: 1 },
|
|
2363
|
-
transition: { duration:
|
|
2364
|
-
exit: { opacity:
|
|
2365
|
-
className:
|
|
2366
|
-
...
|
|
2367
|
-
onMouseEnter:
|
|
2368
|
-
onMouseLeave:
|
|
2363
|
+
transition: { duration: u ? 0 : 0.3 },
|
|
2364
|
+
exit: { opacity: u ? 1 : 0 },
|
|
2365
|
+
className: I.toolTip,
|
|
2366
|
+
...h,
|
|
2367
|
+
onMouseEnter: b,
|
|
2368
|
+
onMouseLeave: R,
|
|
2369
2369
|
children: /* @__PURE__ */ Y(
|
|
2370
2370
|
q.div,
|
|
2371
2371
|
{
|
|
2372
|
-
className:
|
|
2372
|
+
className: I.container,
|
|
2373
2373
|
layoutId: "tool-tip",
|
|
2374
2374
|
transition: {
|
|
2375
2375
|
type: "spring",
|
|
@@ -2377,10 +2377,10 @@ const it = ({
|
|
|
2377
2377
|
damping: 20
|
|
2378
2378
|
},
|
|
2379
2379
|
children: [
|
|
2380
|
-
r && /* @__PURE__ */ m("div", { className:
|
|
2381
|
-
/* @__PURE__ */ m("div", { className:
|
|
2382
|
-
t && /* @__PURE__ */ m("div", { className:
|
|
2383
|
-
|
|
2380
|
+
r && /* @__PURE__ */ m("div", { className: I.subHead, children: r }),
|
|
2381
|
+
/* @__PURE__ */ m("div", { className: I.supportingText, children: s }),
|
|
2382
|
+
t && /* @__PURE__ */ m("div", { className: I.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
|
|
2383
|
+
ct,
|
|
2384
2384
|
{
|
|
2385
2385
|
size: "small",
|
|
2386
2386
|
variant: "text",
|
|
@@ -2394,46 +2394,46 @@ const it = ({
|
|
|
2394
2394
|
}
|
|
2395
2395
|
) }) })
|
|
2396
2396
|
] });
|
|
2397
|
-
},
|
|
2397
|
+
}, Ce = ({
|
|
2398
2398
|
className: e,
|
|
2399
2399
|
label: t,
|
|
2400
2400
|
variant: n = "primary",
|
|
2401
|
-
size:
|
|
2401
|
+
size: o = "medium",
|
|
2402
2402
|
href: r,
|
|
2403
2403
|
type: s,
|
|
2404
2404
|
icon: c,
|
|
2405
2405
|
extended: a = !1,
|
|
2406
|
-
ref:
|
|
2407
|
-
transition:
|
|
2408
|
-
children:
|
|
2406
|
+
ref: i,
|
|
2407
|
+
transition: l,
|
|
2408
|
+
children: h,
|
|
2409
2409
|
...v
|
|
2410
2410
|
}) => {
|
|
2411
|
-
if (
|
|
2411
|
+
if (h && (t = h), !t)
|
|
2412
2412
|
throw new Error(
|
|
2413
2413
|
"FAB component requires either a label prop or children content"
|
|
2414
2414
|
);
|
|
2415
|
-
const f = r ? "a" : "button",
|
|
2415
|
+
const f = r ? "a" : "button", u = Ct({
|
|
2416
2416
|
href: r,
|
|
2417
2417
|
icon: c,
|
|
2418
2418
|
extended: a,
|
|
2419
2419
|
label: t,
|
|
2420
|
-
size:
|
|
2420
|
+
size: o,
|
|
2421
2421
|
variant: n,
|
|
2422
2422
|
className: e,
|
|
2423
|
-
transition:
|
|
2423
|
+
transition: l,
|
|
2424
2424
|
children: t
|
|
2425
2425
|
});
|
|
2426
|
-
|
|
2427
|
-
const d = W(null),
|
|
2426
|
+
l = { duration: 0.3, ...l };
|
|
2427
|
+
const d = W(null), p = i || d, w = {
|
|
2428
2428
|
visible: {
|
|
2429
2429
|
width: "auto",
|
|
2430
2430
|
marginLeft: 12,
|
|
2431
2431
|
opacity: 1,
|
|
2432
2432
|
transition: {
|
|
2433
|
-
...
|
|
2433
|
+
...l,
|
|
2434
2434
|
opacity: {
|
|
2435
|
-
duration:
|
|
2436
|
-
delay:
|
|
2435
|
+
duration: l.duration / 2,
|
|
2436
|
+
delay: l.duration - l.duration / 2
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
},
|
|
@@ -2442,10 +2442,10 @@ const it = ({
|
|
|
2442
2442
|
marginLeft: 0,
|
|
2443
2443
|
opacity: 0,
|
|
2444
2444
|
transition: {
|
|
2445
|
-
...
|
|
2445
|
+
...l,
|
|
2446
2446
|
marginLeft: {
|
|
2447
|
-
duration:
|
|
2448
|
-
delay:
|
|
2447
|
+
duration: l.duration / 2,
|
|
2448
|
+
delay: l.duration - l.duration / 2
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
@@ -2454,24 +2454,24 @@ const it = ({
|
|
|
2454
2454
|
f,
|
|
2455
2455
|
{
|
|
2456
2456
|
...v,
|
|
2457
|
-
ref:
|
|
2457
|
+
ref: p,
|
|
2458
2458
|
href: r,
|
|
2459
2459
|
"aria-label": a ? void 0 : t,
|
|
2460
|
-
className:
|
|
2460
|
+
className: u.fab,
|
|
2461
2461
|
children: [
|
|
2462
2462
|
/* @__PURE__ */ m(
|
|
2463
2463
|
it,
|
|
2464
2464
|
{
|
|
2465
2465
|
trigger: a ? null : void 0,
|
|
2466
2466
|
text: t,
|
|
2467
|
-
targetRef:
|
|
2467
|
+
targetRef: p
|
|
2468
2468
|
}
|
|
2469
2469
|
),
|
|
2470
2470
|
/* @__PURE__ */ m(
|
|
2471
2471
|
ye,
|
|
2472
2472
|
{
|
|
2473
|
-
style: { transition:
|
|
2474
|
-
className:
|
|
2473
|
+
style: { transition: l.duration + "s" },
|
|
2474
|
+
className: u.stateLayer,
|
|
2475
2475
|
colorName: y({
|
|
2476
2476
|
"on-primary": n == "primary",
|
|
2477
2477
|
"on-secondary": n == "secondary",
|
|
@@ -2483,7 +2483,7 @@ const it = ({
|
|
|
2483
2483
|
stateClassName: "state-ripple-group-[fab]"
|
|
2484
2484
|
}
|
|
2485
2485
|
),
|
|
2486
|
-
/* @__PURE__ */ m(ie, { icon: c, className:
|
|
2486
|
+
/* @__PURE__ */ m(ie, { icon: c, className: u.icon }),
|
|
2487
2487
|
/* @__PURE__ */ m(se, { children: a && /* @__PURE__ */ m(
|
|
2488
2488
|
q.span,
|
|
2489
2489
|
{
|
|
@@ -2491,7 +2491,7 @@ const it = ({
|
|
|
2491
2491
|
initial: "hidden",
|
|
2492
2492
|
animate: "visible",
|
|
2493
2493
|
exit: "hidden",
|
|
2494
|
-
className:
|
|
2494
|
+
className: u.label,
|
|
2495
2495
|
children: t
|
|
2496
2496
|
}
|
|
2497
2497
|
) })
|
|
@@ -2502,106 +2502,105 @@ const it = ({
|
|
|
2502
2502
|
variant: e = "standard",
|
|
2503
2503
|
href: t,
|
|
2504
2504
|
disabled: n = !1,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
...I
|
|
2505
|
+
title: o,
|
|
2506
|
+
label: r,
|
|
2507
|
+
onToggle: s,
|
|
2508
|
+
activated: c = !1,
|
|
2509
|
+
onClick: a,
|
|
2510
|
+
icon: i,
|
|
2511
|
+
size: l = "medium",
|
|
2512
|
+
iconSelected: h,
|
|
2513
|
+
className: v,
|
|
2514
|
+
ref: f,
|
|
2515
|
+
width: u = "default",
|
|
2516
|
+
shape: d = "rounded",
|
|
2517
|
+
allowShapeTransformation: p = !0,
|
|
2518
|
+
transition: w,
|
|
2519
|
+
children: E,
|
|
2520
|
+
...g
|
|
2522
2521
|
}) => {
|
|
2523
|
-
if (
|
|
2522
|
+
if (E && (r = E), !r)
|
|
2524
2523
|
throw new Error(
|
|
2525
2524
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
2526
2525
|
);
|
|
2527
|
-
|
|
2528
|
-
const [
|
|
2529
|
-
let
|
|
2530
|
-
|
|
2531
|
-
n &&
|
|
2532
|
-
},
|
|
2533
|
-
n &&
|
|
2534
|
-
},
|
|
2535
|
-
|
|
2536
|
-
}, [
|
|
2537
|
-
const
|
|
2538
|
-
transition:
|
|
2539
|
-
shape:
|
|
2540
|
-
allowShapeTransformation:
|
|
2541
|
-
width:
|
|
2526
|
+
o || (o = r);
|
|
2527
|
+
const [b, R] = Z.useState(c);
|
|
2528
|
+
let A;
|
|
2529
|
+
s ? s && (A = (x) => {
|
|
2530
|
+
n && x.preventDefault(), R(!b), s(!!b);
|
|
2531
|
+
}, i = b && h || i) : A = (x) => {
|
|
2532
|
+
n && x.preventDefault(), a && a(x);
|
|
2533
|
+
}, $(() => {
|
|
2534
|
+
R(c);
|
|
2535
|
+
}, [c]);
|
|
2536
|
+
const N = t ? "a" : "button", F = $t({
|
|
2537
|
+
transition: w,
|
|
2538
|
+
shape: d,
|
|
2539
|
+
allowShapeTransformation: p,
|
|
2540
|
+
width: u,
|
|
2542
2541
|
href: t,
|
|
2543
|
-
activated:
|
|
2544
|
-
label:
|
|
2545
|
-
iconSelected:
|
|
2546
|
-
isActive:
|
|
2547
|
-
onToggle:
|
|
2542
|
+
activated: b,
|
|
2543
|
+
label: r,
|
|
2544
|
+
iconSelected: h,
|
|
2545
|
+
isActive: b,
|
|
2546
|
+
onToggle: s,
|
|
2548
2547
|
disabled: n,
|
|
2549
|
-
icon:
|
|
2548
|
+
icon: i,
|
|
2550
2549
|
variant: e,
|
|
2551
|
-
className:
|
|
2552
|
-
size:
|
|
2553
|
-
children:
|
|
2554
|
-
...
|
|
2555
|
-
}),
|
|
2556
|
-
return
|
|
2557
|
-
|
|
2550
|
+
className: v,
|
|
2551
|
+
size: l,
|
|
2552
|
+
children: r,
|
|
2553
|
+
...g
|
|
2554
|
+
}), O = W(null), I = f || O;
|
|
2555
|
+
return w = { duration: 0.3, ...w }, /* @__PURE__ */ Y(
|
|
2556
|
+
N,
|
|
2558
2557
|
{
|
|
2559
2558
|
disabled: n,
|
|
2560
2559
|
href: t,
|
|
2561
|
-
style: { transition:
|
|
2562
|
-
className:
|
|
2563
|
-
"aria-label":
|
|
2564
|
-
...
|
|
2560
|
+
style: { transition: w.duration + "s" },
|
|
2561
|
+
className: F.iconButton,
|
|
2562
|
+
"aria-label": r,
|
|
2563
|
+
...g,
|
|
2565
2564
|
title: void 0,
|
|
2566
|
-
onClick:
|
|
2567
|
-
ref:
|
|
2565
|
+
onClick: A,
|
|
2566
|
+
ref: I,
|
|
2568
2567
|
children: [
|
|
2569
2568
|
/* @__PURE__ */ m(
|
|
2570
2569
|
it,
|
|
2571
2570
|
{
|
|
2572
|
-
targetRef:
|
|
2571
|
+
targetRef: I,
|
|
2573
2572
|
trigger: n ? null : void 0,
|
|
2574
|
-
text:
|
|
2573
|
+
text: o
|
|
2575
2574
|
}
|
|
2576
2575
|
),
|
|
2577
|
-
/* @__PURE__ */ m("div", { className:
|
|
2576
|
+
/* @__PURE__ */ m("div", { className: F.touchTarget }),
|
|
2578
2577
|
/* @__PURE__ */ m(
|
|
2579
2578
|
ye,
|
|
2580
2579
|
{
|
|
2581
|
-
style: { transition:
|
|
2582
|
-
className:
|
|
2580
|
+
style: { transition: w.duration + "s" },
|
|
2581
|
+
className: F.stateLayer,
|
|
2583
2582
|
colorName: y(
|
|
2584
2583
|
e === "standard" && {
|
|
2585
|
-
"on-surface-variant": !
|
|
2586
|
-
"on-primary":
|
|
2584
|
+
"on-surface-variant": !b,
|
|
2585
|
+
"on-primary": b
|
|
2587
2586
|
},
|
|
2588
2587
|
e === "filled" && {
|
|
2589
|
-
"on-surface-variant": !
|
|
2590
|
-
"on-primary":
|
|
2588
|
+
"on-surface-variant": !b && !!s,
|
|
2589
|
+
"on-primary": b || !s
|
|
2591
2590
|
},
|
|
2592
2591
|
e === "tonal" && {
|
|
2593
|
-
"on-secondary":
|
|
2594
|
-
"on-secondary-container": !
|
|
2592
|
+
"on-secondary": b && !!s,
|
|
2593
|
+
"on-secondary-container": !b || !s
|
|
2595
2594
|
},
|
|
2596
2595
|
e === "outlined" && {
|
|
2597
|
-
"inverse-on-surface":
|
|
2598
|
-
"on-surface-variant": !
|
|
2596
|
+
"inverse-on-surface": b && !!s,
|
|
2597
|
+
"on-surface-variant": !b || !s
|
|
2599
2598
|
}
|
|
2600
2599
|
),
|
|
2601
2600
|
stateClassName: "state-ripple-group-[icon-button]"
|
|
2602
2601
|
}
|
|
2603
2602
|
),
|
|
2604
|
-
|
|
2603
|
+
i && /* @__PURE__ */ m(ie, { icon: i, className: F.icon })
|
|
2605
2604
|
]
|
|
2606
2605
|
}
|
|
2607
2606
|
);
|
|
@@ -2628,73 +2627,71 @@ const zn = ({
|
|
|
2628
2627
|
className: e,
|
|
2629
2628
|
label: t,
|
|
2630
2629
|
variant: n = "primary",
|
|
2631
|
-
size:
|
|
2630
|
+
size: o = "medium",
|
|
2632
2631
|
href: r,
|
|
2633
2632
|
icon: s,
|
|
2634
2633
|
extended: c = !1,
|
|
2635
2634
|
ref: a,
|
|
2636
|
-
transition:
|
|
2637
|
-
children:
|
|
2638
|
-
open:
|
|
2635
|
+
transition: i,
|
|
2636
|
+
children: l,
|
|
2637
|
+
open: h,
|
|
2639
2638
|
defaultOpen: v = !1,
|
|
2640
2639
|
onOpenChange: f,
|
|
2641
|
-
...
|
|
2640
|
+
...u
|
|
2642
2641
|
}) => {
|
|
2643
|
-
|
|
2644
|
-
const d = W(null),
|
|
2642
|
+
i = { duration: 0.3, ease: "easeInOut", ...i };
|
|
2643
|
+
const d = W(null), p = a || d, w = typeof h == "boolean", [E, g] = M(v), b = w ? h : E, R = (S) => {
|
|
2645
2644
|
w || g(S), f == null || f(S);
|
|
2646
|
-
}, A = Z.Children.toArray(
|
|
2647
|
-
(S) => Z.isValidElement(S) && S.type ===
|
|
2648
|
-
),
|
|
2645
|
+
}, A = Z.Children.toArray(l).filter(
|
|
2646
|
+
(S) => Z.isValidElement(S) && S.type === ct
|
|
2647
|
+
), N = Mt({
|
|
2649
2648
|
href: r,
|
|
2650
2649
|
icon: s,
|
|
2651
2650
|
extended: c,
|
|
2652
2651
|
label: t,
|
|
2653
|
-
size:
|
|
2652
|
+
size: o,
|
|
2654
2653
|
variant: n,
|
|
2655
2654
|
className: e,
|
|
2656
|
-
transition:
|
|
2655
|
+
transition: i,
|
|
2657
2656
|
children: t,
|
|
2658
|
-
open:
|
|
2659
|
-
}),
|
|
2660
|
-
|
|
2661
|
-
const M = (S) => /* @__PURE__ */ m(
|
|
2662
|
-
V,
|
|
2657
|
+
open: b
|
|
2658
|
+
}), F = q.create(Ce), O = q.create(be), I = (S) => /* @__PURE__ */ m(
|
|
2659
|
+
F,
|
|
2663
2660
|
{
|
|
2664
2661
|
icon: s,
|
|
2665
2662
|
extended: c,
|
|
2666
2663
|
label: t,
|
|
2667
2664
|
variant: n + "Container",
|
|
2668
|
-
size:
|
|
2669
|
-
className:
|
|
2670
|
-
"aria-expanded":
|
|
2671
|
-
onClick: () =>
|
|
2665
|
+
size: o,
|
|
2666
|
+
className: N.fab + " " + (e ?? ""),
|
|
2667
|
+
"aria-expanded": b,
|
|
2668
|
+
onClick: () => R(!0),
|
|
2672
2669
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2673
2670
|
transition: {
|
|
2674
|
-
duration:
|
|
2671
|
+
duration: i.duration,
|
|
2675
2672
|
ease: "easeInOut",
|
|
2676
|
-
borderRadius: { duration:
|
|
2677
|
-
background: { duration:
|
|
2678
|
-
...
|
|
2673
|
+
borderRadius: { duration: i.duration, ease: "easeInOut" },
|
|
2674
|
+
background: { duration: i.duration, ease: "easeInOut" },
|
|
2675
|
+
...i
|
|
2679
2676
|
},
|
|
2680
2677
|
...S
|
|
2681
2678
|
}
|
|
2682
|
-
), [x] =
|
|
2683
|
-
return /* @__PURE__ */ Y("div", { className:
|
|
2684
|
-
/* @__PURE__ */ m(se, { children:
|
|
2679
|
+
), [x] = M(ge());
|
|
2680
|
+
return /* @__PURE__ */ Y("div", { className: N.fabMenu, ref: p, ...u, children: [
|
|
2681
|
+
/* @__PURE__ */ m(se, { children: b && /* @__PURE__ */ m("div", { className: N.actions, role: "menu", "aria-hidden": !b, children: (() => {
|
|
2685
2682
|
const S = A.length;
|
|
2686
|
-
return A.map((
|
|
2687
|
-
|
|
2688
|
-
const te = S - 1 - G, _ = ((
|
|
2683
|
+
return A.map((V, G) => {
|
|
2684
|
+
V.props;
|
|
2685
|
+
const te = S - 1 - G, _ = ((i == null ? void 0 : i.delay) ?? 0) + te * 0.06, ne = {
|
|
2689
2686
|
open: {
|
|
2690
2687
|
overflow: "visible",
|
|
2691
2688
|
opacity: 1,
|
|
2692
2689
|
width: "auto",
|
|
2693
2690
|
transition: {
|
|
2694
|
-
...
|
|
2691
|
+
...i,
|
|
2695
2692
|
delay: _,
|
|
2696
2693
|
opacity: {
|
|
2697
|
-
delay: (
|
|
2694
|
+
delay: (i == null ? void 0 : i.duration) / 2 + _
|
|
2698
2695
|
}
|
|
2699
2696
|
}
|
|
2700
2697
|
},
|
|
@@ -2703,10 +2700,10 @@ const zn = ({
|
|
|
2703
2700
|
opacity: 0,
|
|
2704
2701
|
width: 0,
|
|
2705
2702
|
transition: {
|
|
2706
|
-
...
|
|
2703
|
+
...i,
|
|
2707
2704
|
delay: _,
|
|
2708
2705
|
opacity: {
|
|
2709
|
-
duration: (
|
|
2706
|
+
duration: (i == null ? void 0 : i.duration) / 1.5
|
|
2710
2707
|
}
|
|
2711
2708
|
}
|
|
2712
2709
|
}
|
|
@@ -2717,17 +2714,17 @@ const zn = ({
|
|
|
2717
2714
|
initial: "close",
|
|
2718
2715
|
animate: "open",
|
|
2719
2716
|
variants: ne,
|
|
2720
|
-
transition:
|
|
2717
|
+
transition: i,
|
|
2721
2718
|
exit: "close",
|
|
2722
2719
|
children: Z.cloneElement(
|
|
2723
|
-
|
|
2720
|
+
V,
|
|
2724
2721
|
{
|
|
2725
2722
|
key: G,
|
|
2726
2723
|
shape: "rounded",
|
|
2727
2724
|
variant: "filled",
|
|
2728
2725
|
className: () => ({
|
|
2729
2726
|
button: y("max-w-full overflow-hidden", {
|
|
2730
|
-
"px-0": !
|
|
2727
|
+
"px-0": !b,
|
|
2731
2728
|
"bg-primary-container text-on-primary-container ": n === "primary",
|
|
2732
2729
|
"bg-secondary-container text-on-secondary-container": n === "secondary",
|
|
2733
2730
|
"bg-tertiary-container text-on-tertiary-container": n === "tertiary"
|
|
@@ -2744,17 +2741,17 @@ const zn = ({
|
|
|
2744
2741
|
);
|
|
2745
2742
|
});
|
|
2746
2743
|
})() }) }),
|
|
2747
|
-
|
|
2744
|
+
I({
|
|
2748
2745
|
className: "invisible pointer-events-none"
|
|
2749
2746
|
}),
|
|
2750
2747
|
/* @__PURE__ */ Y("div", { className: "absolute right-0 top-0", children: [
|
|
2751
|
-
!
|
|
2748
|
+
!b && I({
|
|
2752
2749
|
className: "",
|
|
2753
2750
|
layout: !0,
|
|
2754
2751
|
layoutId: "fab-menu" + x
|
|
2755
2752
|
}),
|
|
2756
|
-
|
|
2757
|
-
|
|
2753
|
+
b && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
|
|
2754
|
+
O,
|
|
2758
2755
|
{
|
|
2759
2756
|
layout: !0,
|
|
2760
2757
|
layoutId: "fab-menu" + x,
|
|
@@ -2773,20 +2770,20 @@ const zn = ({
|
|
|
2773
2770
|
}),
|
|
2774
2771
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2775
2772
|
transition: {
|
|
2776
|
-
duration:
|
|
2773
|
+
duration: i.duration,
|
|
2777
2774
|
ease: "easeInOut",
|
|
2778
2775
|
borderRadius: {
|
|
2779
|
-
duration:
|
|
2776
|
+
duration: i.duration,
|
|
2780
2777
|
ease: "easeInOut"
|
|
2781
2778
|
},
|
|
2782
2779
|
background: {
|
|
2783
|
-
duration:
|
|
2780
|
+
duration: i.duration,
|
|
2784
2781
|
ease: "easeInOut"
|
|
2785
2782
|
},
|
|
2786
|
-
...
|
|
2783
|
+
...i
|
|
2787
2784
|
},
|
|
2788
2785
|
icon: un,
|
|
2789
|
-
onClick: () =>
|
|
2786
|
+
onClick: () => R(!1),
|
|
2790
2787
|
children: "Close"
|
|
2791
2788
|
}
|
|
2792
2789
|
) })
|
|
@@ -2796,7 +2793,7 @@ const zn = ({
|
|
|
2796
2793
|
className: e,
|
|
2797
2794
|
valueFormatter: t,
|
|
2798
2795
|
step: n = 10,
|
|
2799
|
-
name:
|
|
2796
|
+
name: o,
|
|
2800
2797
|
value: r = 0,
|
|
2801
2798
|
min: s = 0,
|
|
2802
2799
|
max: c = 100,
|
|
@@ -2810,36 +2807,36 @@ const zn = ({
|
|
|
2810
2807
|
label: "100"
|
|
2811
2808
|
}
|
|
2812
2809
|
],
|
|
2813
|
-
ref:
|
|
2814
|
-
onChange:
|
|
2815
|
-
...
|
|
2810
|
+
ref: i,
|
|
2811
|
+
onChange: l,
|
|
2812
|
+
...h
|
|
2816
2813
|
}) => {
|
|
2817
2814
|
const v = (B) => {
|
|
2818
|
-
const k =
|
|
2815
|
+
const k = u(), U = f();
|
|
2819
2816
|
return B === 1 / 0 ? 100 : B === -1 / 0 ? 0 : (B - k) / (U - k) * 100;
|
|
2820
|
-
}, f = (B = !1) => B ? c : c == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : c,
|
|
2821
|
-
const k =
|
|
2817
|
+
}, f = (B = !1) => B ? c : c == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : c, u = (B = !1) => B ? s : s == -1 / 0 ? a[0].value : s, d = (B) => {
|
|
2818
|
+
const k = u(!1);
|
|
2822
2819
|
return (f(!1) - k) * B / 100 + k;
|
|
2823
|
-
}, [
|
|
2824
|
-
|
|
2820
|
+
}, [p, w] = M(!1), E = W(null), g = i || E, [b, R] = M(r), [A, N] = M(v(r)), [F, O] = M(!1), I = (B) => {
|
|
2821
|
+
O(!0), w(!0), V(B);
|
|
2825
2822
|
}, x = () => {
|
|
2826
|
-
|
|
2823
|
+
O(!1), w(!1);
|
|
2827
2824
|
};
|
|
2828
|
-
|
|
2829
|
-
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove",
|
|
2830
|
-
}), [
|
|
2825
|
+
$(() => (F ? (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)), () => {
|
|
2826
|
+
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V);
|
|
2827
|
+
}), [F]);
|
|
2831
2828
|
const S = Dt({
|
|
2832
2829
|
className: e,
|
|
2833
|
-
isChanging:
|
|
2830
|
+
isChanging: p,
|
|
2834
2831
|
marks: a,
|
|
2835
2832
|
max: c,
|
|
2836
2833
|
min: s,
|
|
2837
|
-
name:
|
|
2834
|
+
name: o,
|
|
2838
2835
|
step: n,
|
|
2839
|
-
value:
|
|
2836
|
+
value: b,
|
|
2840
2837
|
valueFormatter: t,
|
|
2841
|
-
onChange:
|
|
2842
|
-
}),
|
|
2838
|
+
onChange: l
|
|
2839
|
+
}), V = (B) => {
|
|
2843
2840
|
const k = g == null ? void 0 : g.current;
|
|
2844
2841
|
if (k) {
|
|
2845
2842
|
const U = k.getBoundingClientRect().left, le = ((B.type === "touchmove" || B.type === "touchstart" ? B.touches[0].clientX : B.clientX) - U) / k.offsetWidth * 100;
|
|
@@ -2851,32 +2848,32 @@ const zn = ({
|
|
|
2851
2848
|
}) => {
|
|
2852
2849
|
if (B) {
|
|
2853
2850
|
if (B >= 100) {
|
|
2854
|
-
|
|
2851
|
+
R(f(!0)), N(100);
|
|
2855
2852
|
return;
|
|
2856
2853
|
}
|
|
2857
2854
|
if (B <= 0) {
|
|
2858
|
-
|
|
2855
|
+
R(u(!0)), N(0);
|
|
2859
2856
|
return;
|
|
2860
2857
|
}
|
|
2861
|
-
k = d(B), k ==
|
|
2858
|
+
k = d(B), k == u() && (k = u(!0)), k == f() && (k = f(!0));
|
|
2862
2859
|
} else if (k != null) {
|
|
2863
2860
|
if (k >= f()) {
|
|
2864
|
-
|
|
2861
|
+
R(f(!0)), N(100);
|
|
2865
2862
|
return;
|
|
2866
2863
|
}
|
|
2867
|
-
if (k <=
|
|
2868
|
-
|
|
2864
|
+
if (k <= u()) {
|
|
2865
|
+
R(u(!0)), N(0);
|
|
2869
2866
|
return;
|
|
2870
2867
|
}
|
|
2871
2868
|
B = v(k);
|
|
2872
2869
|
} else
|
|
2873
2870
|
return;
|
|
2874
|
-
n != null ? k = Math.round((k -
|
|
2875
|
-
let ue = K.value === 1 / 0 ? f() : K.value === -1 / 0 ?
|
|
2871
|
+
n != null ? k = Math.round((k - u()) / n) * n + u() : a && (k = a.reduce((U, K, le) => {
|
|
2872
|
+
let ue = K.value === 1 / 0 ? f() : K.value === -1 / 0 ? u() : K.value, C = U.value === 1 / 0 ? f() : U.value === -1 / 0 ? u() : U.value;
|
|
2876
2873
|
return ue = Math.abs(ue - k), C = Math.abs(C - k), ue < C ? K : U;
|
|
2877
|
-
}).value), k >= f() && (k = f(!0)), k <=
|
|
2878
|
-
}, [te, _] =
|
|
2879
|
-
return
|
|
2874
|
+
}).value), k >= f() && (k = f(!0)), k <= u() && (k = u(!0)), B = v(k), R(k), N(B), l && l(k);
|
|
2875
|
+
}, [te, _] = M(0);
|
|
2876
|
+
return $(() => {
|
|
2880
2877
|
const B = () => {
|
|
2881
2878
|
g.current && _(g.current.offsetWidth);
|
|
2882
2879
|
};
|
|
@@ -2891,17 +2888,17 @@ const zn = ({
|
|
|
2891
2888
|
switch (B.key) {
|
|
2892
2889
|
case "ArrowRight":
|
|
2893
2890
|
if (n)
|
|
2894
|
-
G({ value:
|
|
2891
|
+
G({ value: b + n });
|
|
2895
2892
|
else if (a) {
|
|
2896
|
-
const k = a.find((U) => U.value >
|
|
2893
|
+
const k = a.find((U) => U.value > b);
|
|
2897
2894
|
k && G({ value: k.value });
|
|
2898
2895
|
}
|
|
2899
2896
|
break;
|
|
2900
2897
|
case "ArrowLeft":
|
|
2901
2898
|
if (n)
|
|
2902
|
-
G({ value:
|
|
2899
|
+
G({ value: b - n });
|
|
2903
2900
|
else if (a) {
|
|
2904
|
-
const k = a.slice(0).reverse().find((U, K, le) =>
|
|
2901
|
+
const k = a.slice(0).reverse().find((U, K, le) => b === 1 / 0 ? K === 1 : U.value < b);
|
|
2905
2902
|
k && G({ value: k.value });
|
|
2906
2903
|
}
|
|
2907
2904
|
break;
|
|
@@ -2910,21 +2907,21 @@ const zn = ({
|
|
|
2910
2907
|
}
|
|
2911
2908
|
},
|
|
2912
2909
|
role: "slider",
|
|
2913
|
-
"aria-valuemin":
|
|
2910
|
+
"aria-valuemin": u(!0),
|
|
2914
2911
|
"aria-valuemax": f(!0),
|
|
2915
|
-
"aria-valuenow":
|
|
2916
|
-
"aria-valuetext":
|
|
2912
|
+
"aria-valuenow": b,
|
|
2913
|
+
"aria-valuetext": b.toString(),
|
|
2917
2914
|
className: S.slider,
|
|
2918
|
-
onMouseDown:
|
|
2919
|
-
onClick:
|
|
2915
|
+
onMouseDown: I,
|
|
2916
|
+
onClick: V,
|
|
2920
2917
|
ref: g,
|
|
2921
|
-
onTouchStart:
|
|
2918
|
+
onTouchStart: I,
|
|
2922
2919
|
onDragStart: (B) => B.preventDefault(),
|
|
2923
|
-
...
|
|
2920
|
+
...h,
|
|
2924
2921
|
children: [
|
|
2925
|
-
/* @__PURE__ */ m("input", { type: "hidden", name:
|
|
2922
|
+
/* @__PURE__ */ m("input", { type: "hidden", name: o, value: b }),
|
|
2926
2923
|
/* @__PURE__ */ m("div", { className: S.activeTrack, style: { flex: A / 100 } }),
|
|
2927
|
-
/* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children:
|
|
2924
|
+
/* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: p && /* @__PURE__ */ m(
|
|
2928
2925
|
q.div,
|
|
2929
2926
|
{
|
|
2930
2927
|
className: S.valueIndicator,
|
|
@@ -2941,7 +2938,7 @@ const zn = ({
|
|
|
2941
2938
|
hidden: { opacity: 1, scale: 0 }
|
|
2942
2939
|
},
|
|
2943
2940
|
transition: { duration: 0.1 },
|
|
2944
|
-
children: t ? t(
|
|
2941
|
+
children: t ? t(b) : b
|
|
2945
2942
|
}
|
|
2946
2943
|
) }) }),
|
|
2947
2944
|
/* @__PURE__ */ m(
|
|
@@ -2957,7 +2954,7 @@ const zn = ({
|
|
|
2957
2954
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2958
2955
|
children: a && a.map((B, k) => {
|
|
2959
2956
|
let U = null;
|
|
2960
|
-
const K = (
|
|
2957
|
+
const K = (p ? 9 : 10) / te * 100, le = v(B.value);
|
|
2961
2958
|
return le <= A - K ? U = !0 : le >= A + K && (U = !1), /* @__PURE__ */ m(
|
|
2962
2959
|
"div",
|
|
2963
2960
|
{
|
|
@@ -2981,21 +2978,21 @@ const zn = ({
|
|
|
2981
2978
|
variant: e = "standard",
|
|
2982
2979
|
className: t,
|
|
2983
2980
|
children: n,
|
|
2984
|
-
title:
|
|
2981
|
+
title: o,
|
|
2985
2982
|
position: r = "right",
|
|
2986
2983
|
extended: s,
|
|
2987
2984
|
divider: c,
|
|
2988
2985
|
onExtendedChange: a,
|
|
2989
|
-
closeIcon:
|
|
2990
|
-
transition:
|
|
2991
|
-
...
|
|
2986
|
+
closeIcon: i = Le,
|
|
2987
|
+
transition: l,
|
|
2988
|
+
...h
|
|
2992
2989
|
}) => {
|
|
2993
|
-
|
|
2994
|
-
const [v, f] =
|
|
2995
|
-
transition:
|
|
2996
|
-
title:
|
|
2990
|
+
l = { duration: 0.3, ...l };
|
|
2991
|
+
const [v, f] = M(s ?? !0), u = Bt({
|
|
2992
|
+
transition: l,
|
|
2993
|
+
title: o,
|
|
2997
2994
|
position: r,
|
|
2998
|
-
closeIcon:
|
|
2995
|
+
closeIcon: i,
|
|
2999
2996
|
className: t,
|
|
3000
2997
|
children: n,
|
|
3001
2998
|
onExtendedChange: a,
|
|
@@ -3004,9 +3001,9 @@ const zn = ({
|
|
|
3004
3001
|
extended: v,
|
|
3005
3002
|
variant: e
|
|
3006
3003
|
});
|
|
3007
|
-
|
|
3004
|
+
$(() => {
|
|
3008
3005
|
a == null || a(v ?? !1);
|
|
3009
|
-
}, [v]),
|
|
3006
|
+
}, [v]), $(() => {
|
|
3010
3007
|
s != null && f(s);
|
|
3011
3008
|
}, [s]);
|
|
3012
3009
|
const d = {
|
|
@@ -3016,24 +3013,24 @@ const zn = ({
|
|
|
3016
3013
|
open: {
|
|
3017
3014
|
width: "auto"
|
|
3018
3015
|
}
|
|
3019
|
-
},
|
|
3016
|
+
}, p = () => /* @__PURE__ */ Y(me, { children: [
|
|
3020
3017
|
/* @__PURE__ */ m(se, { children: e == "modal" && v && /* @__PURE__ */ m(
|
|
3021
3018
|
q.div,
|
|
3022
3019
|
{
|
|
3023
3020
|
initial: { opacity: 0 },
|
|
3024
3021
|
animate: { opacity: 1 },
|
|
3025
3022
|
exit: { opacity: 0 },
|
|
3026
|
-
transition:
|
|
3023
|
+
transition: l,
|
|
3027
3024
|
onClick: () => f(!1),
|
|
3028
|
-
className:
|
|
3025
|
+
className: u.overlay
|
|
3029
3026
|
}
|
|
3030
3027
|
) }),
|
|
3031
3028
|
/* @__PURE__ */ m(se, { children: v && /* @__PURE__ */ Y(
|
|
3032
3029
|
"div",
|
|
3033
3030
|
{
|
|
3034
|
-
...
|
|
3035
|
-
className:
|
|
3036
|
-
style: { transition:
|
|
3031
|
+
...h,
|
|
3032
|
+
className: u.sideSheet,
|
|
3033
|
+
style: { transition: l.duration + "s" },
|
|
3037
3034
|
children: [
|
|
3038
3035
|
/* @__PURE__ */ Y(
|
|
3039
3036
|
q.div,
|
|
@@ -3042,60 +3039,60 @@ const zn = ({
|
|
|
3042
3039
|
initial: s === !1 ? "open" : "close",
|
|
3043
3040
|
animate: "open",
|
|
3044
3041
|
exit: "close",
|
|
3045
|
-
className:
|
|
3042
|
+
className: u.container,
|
|
3046
3043
|
children: [
|
|
3047
|
-
/* @__PURE__ */ Y("div", { className:
|
|
3048
|
-
|
|
3044
|
+
/* @__PURE__ */ Y("div", { className: u.header, children: [
|
|
3045
|
+
o && /* @__PURE__ */ m("p", { className: u.title, children: o }),
|
|
3049
3046
|
/* @__PURE__ */ m(
|
|
3050
3047
|
be,
|
|
3051
3048
|
{
|
|
3052
3049
|
size: "small",
|
|
3053
3050
|
label: "close",
|
|
3054
|
-
icon:
|
|
3051
|
+
icon: i,
|
|
3055
3052
|
onClick: () => f(!1),
|
|
3056
|
-
className:
|
|
3053
|
+
className: u.closeButton
|
|
3057
3054
|
}
|
|
3058
3055
|
)
|
|
3059
3056
|
] }),
|
|
3060
3057
|
/* @__PURE__ */ m(
|
|
3061
3058
|
"div",
|
|
3062
3059
|
{
|
|
3063
|
-
className:
|
|
3064
|
-
style: { transition:
|
|
3060
|
+
className: u.content,
|
|
3061
|
+
style: { transition: l.duration + "s" },
|
|
3065
3062
|
children: n
|
|
3066
3063
|
}
|
|
3067
3064
|
)
|
|
3068
3065
|
]
|
|
3069
3066
|
}
|
|
3070
3067
|
),
|
|
3071
|
-
(c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className:
|
|
3068
|
+
(c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: u.divider, orientation: "vertical" })
|
|
3072
3069
|
]
|
|
3073
3070
|
}
|
|
3074
3071
|
) })
|
|
3075
3072
|
] });
|
|
3076
|
-
return e == "modal" ?
|
|
3073
|
+
return e == "modal" ? Ye(p(), document.body) : p();
|
|
3077
3074
|
}, nr = ({
|
|
3078
3075
|
message: e,
|
|
3079
3076
|
className: t,
|
|
3080
3077
|
duration: n,
|
|
3081
|
-
closeIcon:
|
|
3078
|
+
closeIcon: o = Le,
|
|
3082
3079
|
onClose: r,
|
|
3083
3080
|
...s
|
|
3084
3081
|
}) => {
|
|
3085
|
-
const [c, a] =
|
|
3082
|
+
const [c, a] = M(!0), i = Wt({
|
|
3086
3083
|
className: t,
|
|
3087
|
-
closeIcon:
|
|
3084
|
+
closeIcon: o,
|
|
3088
3085
|
duration: n,
|
|
3089
3086
|
isVisible: c,
|
|
3090
3087
|
onClose: r,
|
|
3091
3088
|
message: e
|
|
3092
3089
|
});
|
|
3093
|
-
|
|
3090
|
+
$(() => {
|
|
3094
3091
|
n && setTimeout(() => {
|
|
3095
|
-
|
|
3092
|
+
l();
|
|
3096
3093
|
}, n);
|
|
3097
3094
|
}, [n]);
|
|
3098
|
-
const
|
|
3095
|
+
const l = () => {
|
|
3099
3096
|
a(!1), r == null || r();
|
|
3100
3097
|
};
|
|
3101
3098
|
return /* @__PURE__ */ m(se, { children: c && /* @__PURE__ */ m(
|
|
@@ -3105,16 +3102,16 @@ const zn = ({
|
|
|
3105
3102
|
animate: { height: "auto" },
|
|
3106
3103
|
exit: { height: 0 },
|
|
3107
3104
|
transition: { duration: 0.1 },
|
|
3108
|
-
className:
|
|
3105
|
+
className: i.snackbar,
|
|
3109
3106
|
...s,
|
|
3110
|
-
children: /* @__PURE__ */ Y("div", { className:
|
|
3111
|
-
/* @__PURE__ */ m("p", { className:
|
|
3107
|
+
children: /* @__PURE__ */ Y("div", { className: i.container, children: [
|
|
3108
|
+
/* @__PURE__ */ m("p", { className: i.supportingText, children: e }),
|
|
3112
3109
|
/* @__PURE__ */ m(
|
|
3113
3110
|
be,
|
|
3114
3111
|
{
|
|
3115
|
-
onClick: () =>
|
|
3116
|
-
className:
|
|
3117
|
-
icon:
|
|
3112
|
+
onClick: () => l(),
|
|
3113
|
+
className: i.icon,
|
|
3114
|
+
icon: o,
|
|
3118
3115
|
label: "close the snackbar"
|
|
3119
3116
|
}
|
|
3120
3117
|
)
|
|
@@ -3125,62 +3122,62 @@ const zn = ({
|
|
|
3125
3122
|
selected: e = !1,
|
|
3126
3123
|
className: t,
|
|
3127
3124
|
activeIcon: n,
|
|
3128
|
-
disabled:
|
|
3125
|
+
disabled: o = !1,
|
|
3129
3126
|
inactiveIcon: r,
|
|
3130
3127
|
onChange: s,
|
|
3131
3128
|
onClick: c,
|
|
3132
3129
|
onKeyDown: a,
|
|
3133
|
-
ref:
|
|
3134
|
-
...
|
|
3130
|
+
ref: i,
|
|
3131
|
+
...l
|
|
3135
3132
|
}) => {
|
|
3136
|
-
const [
|
|
3137
|
-
|
|
3138
|
-
},
|
|
3139
|
-
|
|
3133
|
+
const [h, v] = M(e), f = (g) => {
|
|
3134
|
+
o || (d(), c && c(g));
|
|
3135
|
+
}, u = (g) => {
|
|
3136
|
+
o || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), d()), a && a(g));
|
|
3140
3137
|
}, d = () => {
|
|
3141
|
-
v(!
|
|
3142
|
-
},
|
|
3138
|
+
v(!h), s == null || s(!h);
|
|
3139
|
+
}, p = At({
|
|
3143
3140
|
className: t,
|
|
3144
|
-
isSelected:
|
|
3141
|
+
isSelected: h,
|
|
3145
3142
|
activeIcon: n,
|
|
3146
3143
|
inactiveIcon: r,
|
|
3147
|
-
disabled:
|
|
3148
|
-
selected:
|
|
3144
|
+
disabled: o,
|
|
3145
|
+
selected: h,
|
|
3149
3146
|
onChange: s
|
|
3150
|
-
}), w = W(null),
|
|
3147
|
+
}), w = W(null), E = i || w;
|
|
3151
3148
|
return /* @__PURE__ */ Y(
|
|
3152
3149
|
q.div,
|
|
3153
3150
|
{
|
|
3154
3151
|
role: "switch",
|
|
3155
|
-
"aria-checked":
|
|
3156
|
-
tabIndex:
|
|
3157
|
-
onKeyDown:
|
|
3152
|
+
"aria-checked": h,
|
|
3153
|
+
tabIndex: o ? -1 : 0,
|
|
3154
|
+
onKeyDown: u,
|
|
3158
3155
|
onClick: f,
|
|
3159
|
-
ref:
|
|
3160
|
-
className:
|
|
3161
|
-
...
|
|
3156
|
+
ref: E,
|
|
3157
|
+
className: p.switch,
|
|
3158
|
+
...l,
|
|
3162
3159
|
children: [
|
|
3163
|
-
/* @__PURE__ */ m("input", { type: "hidden", value:
|
|
3160
|
+
/* @__PURE__ */ m("input", { type: "hidden", value: h ? "1" : "0" }),
|
|
3164
3161
|
/* @__PURE__ */ Y(
|
|
3165
3162
|
q.div,
|
|
3166
3163
|
{
|
|
3167
3164
|
layout: !0,
|
|
3168
|
-
style: { translate:
|
|
3165
|
+
style: { translate: h ? "50%" : "-50%" },
|
|
3169
3166
|
transition: {
|
|
3170
3167
|
type: "spring",
|
|
3171
3168
|
stiffness: 700,
|
|
3172
3169
|
damping: 30
|
|
3173
3170
|
},
|
|
3174
|
-
className:
|
|
3171
|
+
className: p.handleContainer,
|
|
3175
3172
|
children: [
|
|
3176
|
-
/* @__PURE__ */ m("div", { className:
|
|
3173
|
+
/* @__PURE__ */ m("div", { className: p.handle, children: (h ? n : r) && /* @__PURE__ */ m(
|
|
3177
3174
|
ie,
|
|
3178
3175
|
{
|
|
3179
|
-
className:
|
|
3180
|
-
icon:
|
|
3176
|
+
className: p.icon,
|
|
3177
|
+
icon: h ? n : r
|
|
3181
3178
|
}
|
|
3182
3179
|
) }),
|
|
3183
|
-
/* @__PURE__ */ m("div", { className:
|
|
3180
|
+
/* @__PURE__ */ m("div", { className: p.handleStateLayer })
|
|
3184
3181
|
]
|
|
3185
3182
|
}
|
|
3186
3183
|
)
|
|
@@ -3191,57 +3188,57 @@ const zn = ({
|
|
|
3191
3188
|
className: e,
|
|
3192
3189
|
onClick: t,
|
|
3193
3190
|
label: n,
|
|
3194
|
-
variant:
|
|
3191
|
+
variant: o = "primary",
|
|
3195
3192
|
href: r,
|
|
3196
3193
|
icon: s,
|
|
3197
3194
|
selectedTab: c,
|
|
3198
3195
|
setSelectedTab: a,
|
|
3199
|
-
tabsId:
|
|
3200
|
-
index:
|
|
3201
|
-
onTabSelected:
|
|
3196
|
+
tabsId: i,
|
|
3197
|
+
index: l,
|
|
3198
|
+
onTabSelected: h,
|
|
3202
3199
|
scrollable: v = !1,
|
|
3203
3200
|
selected: f = !1,
|
|
3204
|
-
ref:
|
|
3201
|
+
ref: u,
|
|
3205
3202
|
...d
|
|
3206
3203
|
}) => {
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3209
|
-
f && c == null ? g(!0) : g(c ==
|
|
3210
|
-
}, [c]),
|
|
3211
|
-
c ==
|
|
3204
|
+
const p = W(null), w = u || p, [E, g] = M(f);
|
|
3205
|
+
$(() => {
|
|
3206
|
+
f && c == null ? g(!0) : g(c == l && l != null);
|
|
3207
|
+
}, [c]), $(() => {
|
|
3208
|
+
c == l && h && h({
|
|
3212
3209
|
ref: w,
|
|
3213
|
-
index:
|
|
3210
|
+
index: l || 0,
|
|
3214
3211
|
label: n,
|
|
3215
3212
|
icon: s
|
|
3216
3213
|
});
|
|
3217
3214
|
}, [c]);
|
|
3218
|
-
const
|
|
3219
|
-
a && a(
|
|
3215
|
+
const b = r ? "a" : "button", R = (N) => {
|
|
3216
|
+
a && a(l ?? null), t && t(N);
|
|
3220
3217
|
}, A = Pt({
|
|
3221
3218
|
className: e,
|
|
3222
|
-
onTabSelected:
|
|
3219
|
+
onTabSelected: h,
|
|
3223
3220
|
scrollable: v,
|
|
3224
3221
|
selectedTab: c,
|
|
3225
|
-
index:
|
|
3226
|
-
tabsId:
|
|
3227
|
-
selected:
|
|
3228
|
-
variant:
|
|
3222
|
+
index: l,
|
|
3223
|
+
tabsId: i,
|
|
3224
|
+
selected: E,
|
|
3225
|
+
variant: o,
|
|
3229
3226
|
icon: s,
|
|
3230
3227
|
label: n,
|
|
3231
|
-
isSelected:
|
|
3228
|
+
isSelected: E,
|
|
3232
3229
|
setSelectedTab: a,
|
|
3233
3230
|
href: r
|
|
3234
3231
|
});
|
|
3235
3232
|
return /* @__PURE__ */ Y(
|
|
3236
|
-
|
|
3233
|
+
b,
|
|
3237
3234
|
{
|
|
3238
3235
|
...d,
|
|
3239
3236
|
role: "tab",
|
|
3240
|
-
"aria-selected":
|
|
3237
|
+
"aria-selected": E,
|
|
3241
3238
|
ref: w,
|
|
3242
3239
|
href: r,
|
|
3243
3240
|
className: A.tab,
|
|
3244
|
-
onClick:
|
|
3241
|
+
onClick: R,
|
|
3245
3242
|
...d,
|
|
3246
3243
|
children: [
|
|
3247
3244
|
/* @__PURE__ */ m(
|
|
@@ -3249,17 +3246,17 @@ const zn = ({
|
|
|
3249
3246
|
{
|
|
3250
3247
|
style: { transition: 0.3 + "s" },
|
|
3251
3248
|
className: A.stateLayer,
|
|
3252
|
-
colorName:
|
|
3249
|
+
colorName: o === "primary" && E ? "primary" : "on-surface",
|
|
3253
3250
|
stateClassName: "state-ripple-group-[tab]"
|
|
3254
3251
|
}
|
|
3255
3252
|
),
|
|
3256
3253
|
/* @__PURE__ */ Y("span", { className: A.content, children: [
|
|
3257
3254
|
s && /* @__PURE__ */ m(ie, { icon: s, className: A.icon }),
|
|
3258
3255
|
/* @__PURE__ */ m("span", { className: A.label, children: n }),
|
|
3259
|
-
|
|
3256
|
+
E && /* @__PURE__ */ m(
|
|
3260
3257
|
q.span,
|
|
3261
3258
|
{
|
|
3262
|
-
layoutId: `underline-${
|
|
3259
|
+
layoutId: `underline-${i}`,
|
|
3263
3260
|
className: A.underline,
|
|
3264
3261
|
transition: { duration: 0.3 }
|
|
3265
3262
|
}
|
|
@@ -3272,107 +3269,107 @@ const zn = ({
|
|
|
3272
3269
|
variant: e = "primary",
|
|
3273
3270
|
onTabSelected: t,
|
|
3274
3271
|
children: n,
|
|
3275
|
-
className:
|
|
3272
|
+
className: o,
|
|
3276
3273
|
selectedTab: r,
|
|
3277
3274
|
setSelectedTab: s,
|
|
3278
3275
|
scrollable: c = !1
|
|
3279
3276
|
}) => {
|
|
3280
|
-
const [a,
|
|
3277
|
+
const [a, i] = M(
|
|
3281
3278
|
null
|
|
3282
3279
|
);
|
|
3283
|
-
let
|
|
3284
|
-
r == 0 || r != null ?
|
|
3285
|
-
const
|
|
3280
|
+
let l;
|
|
3281
|
+
r == 0 || r != null ? l = r : l = a;
|
|
3282
|
+
const h = s || i, v = Z.Children.toArray(n).filter(
|
|
3286
3283
|
(w) => Z.isValidElement(w) && w.type === fn
|
|
3287
|
-
), f = Z.useRef(null),
|
|
3284
|
+
), f = Z.useRef(null), u = (w) => {
|
|
3288
3285
|
if (t == null || t(w), c) {
|
|
3289
|
-
const
|
|
3290
|
-
if (
|
|
3291
|
-
const
|
|
3292
|
-
|
|
3286
|
+
const E = f.current, g = w.ref.current;
|
|
3287
|
+
if (E && g) {
|
|
3288
|
+
const b = g.offsetLeft + g.offsetWidth / 2 - E.offsetWidth / 2;
|
|
3289
|
+
E.scrollTo({ left: b, behavior: "smooth" });
|
|
3293
3290
|
}
|
|
3294
3291
|
}
|
|
3295
|
-
}, d =
|
|
3292
|
+
}, d = Me(() => ge(), []), p = Ht({
|
|
3296
3293
|
children: n,
|
|
3297
3294
|
onTabSelected: t,
|
|
3298
3295
|
scrollable: c,
|
|
3299
|
-
selectedTab:
|
|
3300
|
-
setSelectedTab:
|
|
3301
|
-
className:
|
|
3296
|
+
selectedTab: l,
|
|
3297
|
+
setSelectedTab: h,
|
|
3298
|
+
className: o,
|
|
3302
3299
|
variant: e
|
|
3303
3300
|
});
|
|
3304
|
-
return /* @__PURE__ */ m("div", { ref: f, role: "tablist", className:
|
|
3305
|
-
key:
|
|
3306
|
-
index:
|
|
3301
|
+
return /* @__PURE__ */ m("div", { ref: f, role: "tablist", className: p.tabs, children: v.map((w, E) => Z.cloneElement(w, {
|
|
3302
|
+
key: E,
|
|
3303
|
+
index: E,
|
|
3307
3304
|
variant: e,
|
|
3308
|
-
selectedTab:
|
|
3309
|
-
setSelectedTab:
|
|
3305
|
+
selectedTab: l,
|
|
3306
|
+
setSelectedTab: h,
|
|
3310
3307
|
tabsId: d,
|
|
3311
|
-
onTabSelected:
|
|
3308
|
+
onTabSelected: u,
|
|
3312
3309
|
scrollable: c
|
|
3313
3310
|
})) });
|
|
3314
3311
|
}, lr = ({
|
|
3315
3312
|
variant: e = "filled",
|
|
3316
3313
|
disabled: t = !1,
|
|
3317
3314
|
errorText: n,
|
|
3318
|
-
placeholder:
|
|
3315
|
+
placeholder: o,
|
|
3319
3316
|
suffix: r,
|
|
3320
3317
|
name: s,
|
|
3321
3318
|
label: c,
|
|
3322
3319
|
className: a,
|
|
3323
|
-
supportingText:
|
|
3324
|
-
trailingIcon:
|
|
3325
|
-
leadingIcon:
|
|
3320
|
+
supportingText: i,
|
|
3321
|
+
trailingIcon: l,
|
|
3322
|
+
leadingIcon: h,
|
|
3326
3323
|
type: v = "text",
|
|
3327
3324
|
textLine: f = "singleLine",
|
|
3328
|
-
autoComplete:
|
|
3325
|
+
autoComplete: u = "on",
|
|
3329
3326
|
onChange: d,
|
|
3330
|
-
value:
|
|
3327
|
+
value: p,
|
|
3331
3328
|
showSupportingText: w = !1,
|
|
3332
|
-
...
|
|
3329
|
+
...E
|
|
3333
3330
|
}) => {
|
|
3334
|
-
const [g,
|
|
3331
|
+
const [g, b] = M(p ?? ""), [R, A] = M(!1), [N, F] = M(!1), [O, I] = M(
|
|
3335
3332
|
w
|
|
3336
3333
|
);
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
}, [
|
|
3340
|
-
n != null && n.length ?
|
|
3341
|
-
}, [n]),
|
|
3342
|
-
w ?
|
|
3343
|
-
}, [
|
|
3344
|
-
|
|
3345
|
-
}, [
|
|
3334
|
+
$(() => {
|
|
3335
|
+
b(p ?? "");
|
|
3336
|
+
}, [p]), $(() => {
|
|
3337
|
+
n != null && n.length ? F(!0) : F(!1);
|
|
3338
|
+
}, [n]), $(() => {
|
|
3339
|
+
w ? I(w) : i != null && i.length ? I(!0) : I(!1);
|
|
3340
|
+
}, [O, i]), $(() => {
|
|
3341
|
+
R && F(!1);
|
|
3342
|
+
}, [R]);
|
|
3346
3343
|
const x = Z.useRef(null), S = () => {
|
|
3347
|
-
x.current && !
|
|
3348
|
-
},
|
|
3344
|
+
x.current && !R && x.current.focus();
|
|
3345
|
+
}, V = () => {
|
|
3349
3346
|
A(!0);
|
|
3350
3347
|
}, G = (U) => {
|
|
3351
3348
|
const K = U.target.value;
|
|
3352
|
-
|
|
3349
|
+
b(K), F(!1), typeof d == "function" && d(K);
|
|
3353
3350
|
}, te = () => {
|
|
3354
3351
|
A(!1);
|
|
3355
3352
|
}, _ = Ft({
|
|
3356
|
-
showSupportingText:
|
|
3357
|
-
isFocused:
|
|
3358
|
-
showErrorIcon:
|
|
3353
|
+
showSupportingText: O,
|
|
3354
|
+
isFocused: R,
|
|
3355
|
+
showErrorIcon: N,
|
|
3359
3356
|
disabled: t,
|
|
3360
3357
|
name: s,
|
|
3361
3358
|
label: c,
|
|
3362
|
-
autoComplete:
|
|
3359
|
+
autoComplete: u,
|
|
3363
3360
|
className: a,
|
|
3364
3361
|
onChange: d,
|
|
3365
|
-
placeholder:
|
|
3366
|
-
supportingText:
|
|
3362
|
+
placeholder: o,
|
|
3363
|
+
supportingText: i,
|
|
3367
3364
|
type: v,
|
|
3368
|
-
leadingIcon:
|
|
3369
|
-
trailingIcon:
|
|
3365
|
+
leadingIcon: h,
|
|
3366
|
+
trailingIcon: l,
|
|
3370
3367
|
variant: e,
|
|
3371
3368
|
errorText: n,
|
|
3372
3369
|
value: g,
|
|
3373
3370
|
suffix: r,
|
|
3374
3371
|
textLine: f
|
|
3375
|
-
}), [ne] =
|
|
3372
|
+
}), [ne] = M(ge());
|
|
3376
3373
|
let B, k;
|
|
3377
3374
|
switch (f) {
|
|
3378
3375
|
case "multiLine":
|
|
@@ -3386,11 +3383,11 @@ const zn = ({
|
|
|
3386
3383
|
k = "input", B = { type: v };
|
|
3387
3384
|
break;
|
|
3388
3385
|
}
|
|
3389
|
-
return /* @__PURE__ */ Y("div", { className: _.textField, ...
|
|
3386
|
+
return /* @__PURE__ */ Y("div", { className: _.textField, ...E, children: [
|
|
3390
3387
|
/* @__PURE__ */ Y("fieldset", { onClick: S, className: _.content, children: [
|
|
3391
3388
|
/* @__PURE__ */ m("div", { className: _.stateLayer }),
|
|
3392
|
-
|
|
3393
|
-
!(!
|
|
3389
|
+
h && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(h) ? h : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: h }) }),
|
|
3390
|
+
!(!R && !g.length || e == "filled") && /* @__PURE__ */ m(
|
|
3394
3391
|
q.legend,
|
|
3395
3392
|
{
|
|
3396
3393
|
variants: {
|
|
@@ -3398,7 +3395,7 @@ const zn = ({
|
|
|
3398
3395
|
visible: { width: "auto", padding: "0 8px" }
|
|
3399
3396
|
},
|
|
3400
3397
|
initial: "hidden",
|
|
3401
|
-
animate: !
|
|
3398
|
+
animate: !R && !g.length ? "hidden" : "visible",
|
|
3402
3399
|
className: "max-w-full ml-2 px-2 text-body-small h-0",
|
|
3403
3400
|
transition: { duration: 0.2 },
|
|
3404
3401
|
children: /* @__PURE__ */ m("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ m(
|
|
@@ -3413,15 +3410,15 @@ const zn = ({
|
|
|
3413
3410
|
}
|
|
3414
3411
|
),
|
|
3415
3412
|
/* @__PURE__ */ Y("div", { className: "flex-1 relative", children: [
|
|
3416
|
-
(!
|
|
3413
|
+
(!R && !g.length || e == "filled") && /* @__PURE__ */ m(
|
|
3417
3414
|
q.label,
|
|
3418
3415
|
{
|
|
3419
3416
|
htmlFor: s,
|
|
3420
3417
|
className: y(
|
|
3421
3418
|
"absolute left-4 transition-all duration-300",
|
|
3422
3419
|
{
|
|
3423
|
-
"text-body-small top-2": e == "filled" && !(!
|
|
3424
|
-
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!
|
|
3420
|
+
"text-body-small top-2": e == "filled" && !(!R && !g.length),
|
|
3421
|
+
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!R && !g.length))
|
|
3425
3422
|
}
|
|
3426
3423
|
),
|
|
3427
3424
|
transition: { duration: 0.3 },
|
|
@@ -3445,11 +3442,11 @@ const zn = ({
|
|
|
3445
3442
|
className: _.input,
|
|
3446
3443
|
id: s,
|
|
3447
3444
|
name: s,
|
|
3448
|
-
placeholder:
|
|
3449
|
-
onFocus:
|
|
3445
|
+
placeholder: R ? o ?? void 0 : "",
|
|
3446
|
+
onFocus: V,
|
|
3450
3447
|
onBlur: te,
|
|
3451
3448
|
disabled: t,
|
|
3452
|
-
autoComplete:
|
|
3449
|
+
autoComplete: u,
|
|
3453
3450
|
"aria-invalid": !!(n != null && n.length),
|
|
3454
3451
|
"aria-label": c,
|
|
3455
3452
|
...B
|
|
@@ -3457,24 +3454,24 @@ const zn = ({
|
|
|
3457
3454
|
)
|
|
3458
3455
|
] }),
|
|
3459
3456
|
/* @__PURE__ */ m("div", { className: _.activeIndicator }),
|
|
3460
|
-
!
|
|
3461
|
-
|
|
3457
|
+
!N && /* @__PURE__ */ Y(me, { children: [
|
|
3458
|
+
l && /* @__PURE__ */ m(
|
|
3462
3459
|
"div",
|
|
3463
3460
|
{
|
|
3464
3461
|
onClick: (U) => {
|
|
3465
3462
|
U.stopPropagation();
|
|
3466
3463
|
},
|
|
3467
3464
|
className: _.trailingIcon,
|
|
3468
|
-
children: Z.isValidElement(
|
|
3465
|
+
children: Z.isValidElement(l) ? l : /* @__PURE__ */ m(ie, { className: "h-5", icon: l })
|
|
3469
3466
|
}
|
|
3470
3467
|
),
|
|
3471
|
-
!
|
|
3468
|
+
!l && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
|
|
3472
3469
|
] }),
|
|
3473
|
-
|
|
3470
|
+
N && /* @__PURE__ */ m(
|
|
3474
3471
|
"div",
|
|
3475
3472
|
{
|
|
3476
3473
|
className: y(_.trailingIcon, {
|
|
3477
|
-
" absolute right-0": !
|
|
3474
|
+
" absolute right-0": !l
|
|
3478
3475
|
}),
|
|
3479
3476
|
children: /* @__PURE__ */ m(
|
|
3480
3477
|
ie,
|
|
@@ -3486,39 +3483,39 @@ const zn = ({
|
|
|
3486
3483
|
}
|
|
3487
3484
|
)
|
|
3488
3485
|
] }),
|
|
3489
|
-
|
|
3486
|
+
O && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : i != null && i.length ? i : " " })
|
|
3490
3487
|
] });
|
|
3491
|
-
}, mn = ({ isSelected: e, icon: t, label: n, variant:
|
|
3488
|
+
}, mn = ({ isSelected: e, icon: t, label: n, variant: o }) => ({
|
|
3492
3489
|
navigationRailItem: y(
|
|
3493
3490
|
" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",
|
|
3494
3491
|
{
|
|
3495
3492
|
"text-on-surface-variant": !e,
|
|
3496
3493
|
"text-on-secondary-container": e,
|
|
3497
|
-
"gap-2 h-[68px]":
|
|
3498
|
-
"gap-0 h-[66px]":
|
|
3494
|
+
"gap-2 h-[68px]": o == "vertical",
|
|
3495
|
+
"gap-0 h-[66px]": o == "horizontal"
|
|
3499
3496
|
}
|
|
3500
3497
|
),
|
|
3501
3498
|
container: y(
|
|
3502
3499
|
" w-fit flex justify-center relative rounded-full items-center mx-5",
|
|
3503
3500
|
{
|
|
3504
3501
|
"bg-secondary-container overflow-hidden": e,
|
|
3505
|
-
"gap-2 ":
|
|
3506
|
-
"gap-0 ":
|
|
3502
|
+
"gap-2 ": o == "horizontal",
|
|
3503
|
+
"gap-0 ": o == "vertical",
|
|
3507
3504
|
"p-4": !n
|
|
3508
3505
|
},
|
|
3509
3506
|
n && [
|
|
3510
3507
|
"px-4",
|
|
3511
3508
|
{
|
|
3512
|
-
"py-1 ":
|
|
3513
|
-
"py-4 ":
|
|
3509
|
+
"py-1 ": o == "vertical",
|
|
3510
|
+
"py-4 ": o == "horizontal"
|
|
3514
3511
|
}
|
|
3515
3512
|
]
|
|
3516
3513
|
),
|
|
3517
3514
|
stateLayer: y("rounded-full"),
|
|
3518
3515
|
icon: y("size-6 flex"),
|
|
3519
3516
|
label: y("w-fit mx-auto text-nowrap", {
|
|
3520
|
-
"text-label-large ":
|
|
3521
|
-
"text-label-medium":
|
|
3517
|
+
"text-label-large ": o == "horizontal",
|
|
3518
|
+
"text-label-medium": o == "vertical"
|
|
3522
3519
|
})
|
|
3523
3520
|
}), hn = J(
|
|
3524
3521
|
"navigationRailItem",
|
|
@@ -3527,47 +3524,47 @@ const zn = ({
|
|
|
3527
3524
|
className: e,
|
|
3528
3525
|
onClick: t,
|
|
3529
3526
|
label: n,
|
|
3530
|
-
variant:
|
|
3527
|
+
variant: o = "vertical",
|
|
3531
3528
|
href: r,
|
|
3532
3529
|
icon: s,
|
|
3533
3530
|
selectedItem: c,
|
|
3534
3531
|
setSelectedItem: a,
|
|
3535
|
-
index:
|
|
3536
|
-
onItemSelected:
|
|
3537
|
-
selected:
|
|
3532
|
+
index: i,
|
|
3533
|
+
onItemSelected: l,
|
|
3534
|
+
selected: h = !1,
|
|
3538
3535
|
ref: v,
|
|
3539
3536
|
transition: f,
|
|
3540
|
-
isExtended:
|
|
3537
|
+
isExtended: u,
|
|
3541
3538
|
iconSelected: d,
|
|
3542
|
-
style:
|
|
3539
|
+
style: p,
|
|
3543
3540
|
extendedOnly: w,
|
|
3544
|
-
children:
|
|
3541
|
+
children: E,
|
|
3545
3542
|
...g
|
|
3546
3543
|
}) => {
|
|
3547
|
-
|
|
3548
|
-
const
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
}, [c]),
|
|
3552
|
-
c ==
|
|
3553
|
-
ref:
|
|
3554
|
-
index:
|
|
3544
|
+
E && (n = E);
|
|
3545
|
+
const b = W(null), R = v || b, [A, N] = M(h);
|
|
3546
|
+
$(() => {
|
|
3547
|
+
h && c == null ? N(!0) : N(c == i && i != null);
|
|
3548
|
+
}, [c]), $(() => {
|
|
3549
|
+
c == i && l && l({
|
|
3550
|
+
ref: R,
|
|
3551
|
+
index: i || 0,
|
|
3555
3552
|
label: n,
|
|
3556
3553
|
icon: s
|
|
3557
3554
|
});
|
|
3558
3555
|
}, [c]);
|
|
3559
|
-
const
|
|
3560
|
-
a && a(
|
|
3561
|
-
},
|
|
3562
|
-
isExtended:
|
|
3556
|
+
const F = r ? "a" : "button", O = (x) => {
|
|
3557
|
+
a && a(i ?? null), t && t(x);
|
|
3558
|
+
}, I = hn({
|
|
3559
|
+
isExtended: u,
|
|
3563
3560
|
extendedOnly: w,
|
|
3564
3561
|
className: e,
|
|
3565
|
-
onItemSelected:
|
|
3562
|
+
onItemSelected: l,
|
|
3566
3563
|
selectedItem: c,
|
|
3567
|
-
index:
|
|
3564
|
+
index: i,
|
|
3568
3565
|
transition: f,
|
|
3569
3566
|
selected: A,
|
|
3570
|
-
variant:
|
|
3567
|
+
variant: o,
|
|
3571
3568
|
icon: s,
|
|
3572
3569
|
label: n,
|
|
3573
3570
|
isSelected: A,
|
|
@@ -3576,35 +3573,35 @@ const zn = ({
|
|
|
3576
3573
|
children: n,
|
|
3577
3574
|
iconSelected: d
|
|
3578
3575
|
});
|
|
3579
|
-
return f = { duration: 0.3, ...f }, w && !
|
|
3576
|
+
return f = { duration: 0.3, ...f }, w && !u ? null : (
|
|
3580
3577
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3581
3578
|
// @ts-expect-error
|
|
3582
3579
|
/* @__PURE__ */ Y(
|
|
3583
|
-
|
|
3580
|
+
F,
|
|
3584
3581
|
{
|
|
3585
3582
|
...g,
|
|
3586
3583
|
role: "tab",
|
|
3587
3584
|
"aria-selected": A,
|
|
3588
|
-
ref:
|
|
3585
|
+
ref: R,
|
|
3589
3586
|
href: r,
|
|
3590
|
-
className:
|
|
3591
|
-
onClick:
|
|
3592
|
-
style: { transition: f.duration + "s", ...
|
|
3587
|
+
className: I.navigationRailItem,
|
|
3588
|
+
onClick: O,
|
|
3589
|
+
style: { transition: f.duration + "s", ...p },
|
|
3593
3590
|
children: [
|
|
3594
3591
|
/* @__PURE__ */ Y(
|
|
3595
3592
|
q.div,
|
|
3596
3593
|
{
|
|
3597
3594
|
style: {
|
|
3598
|
-
transition:
|
|
3595
|
+
transition: o == "horizontal" ? f.duration + `s, gap ${f.duration / 2}s ${f.duration - f.duration / 2}s` : f.duration + `s, gap ${f.duration / 3}s ${f.duration - f.duration / 3}s`
|
|
3599
3596
|
},
|
|
3600
3597
|
transition: f,
|
|
3601
|
-
className:
|
|
3598
|
+
className: I.container,
|
|
3602
3599
|
children: [
|
|
3603
3600
|
/* @__PURE__ */ m(
|
|
3604
3601
|
ye,
|
|
3605
3602
|
{
|
|
3606
3603
|
style: { transition: f.duration + "s" },
|
|
3607
|
-
className:
|
|
3604
|
+
className: I.stateLayer,
|
|
3608
3605
|
colorName: y({
|
|
3609
3606
|
"on-surface": !A,
|
|
3610
3607
|
"on-secondary-container": A
|
|
@@ -3616,10 +3613,10 @@ const zn = ({
|
|
|
3616
3613
|
ie,
|
|
3617
3614
|
{
|
|
3618
3615
|
icon: A ? d : s,
|
|
3619
|
-
className:
|
|
3616
|
+
className: I.icon
|
|
3620
3617
|
}
|
|
3621
3618
|
),
|
|
3622
|
-
/* @__PURE__ */ m(se, { children:
|
|
3619
|
+
/* @__PURE__ */ m(se, { children: o == "horizontal" && (() => {
|
|
3623
3620
|
const x = {
|
|
3624
3621
|
width: 0,
|
|
3625
3622
|
opacity: 0,
|
|
@@ -3643,7 +3640,7 @@ const zn = ({
|
|
|
3643
3640
|
initial: x,
|
|
3644
3641
|
animate: S,
|
|
3645
3642
|
exit: x,
|
|
3646
|
-
className:
|
|
3643
|
+
className: I.label,
|
|
3647
3644
|
children: n
|
|
3648
3645
|
}
|
|
3649
3646
|
);
|
|
@@ -3651,7 +3648,7 @@ const zn = ({
|
|
|
3651
3648
|
]
|
|
3652
3649
|
}
|
|
3653
3650
|
),
|
|
3654
|
-
/* @__PURE__ */ m(se, { children:
|
|
3651
|
+
/* @__PURE__ */ m(se, { children: o == "vertical" && (() => {
|
|
3655
3652
|
const x = {
|
|
3656
3653
|
height: 0,
|
|
3657
3654
|
opacity: 0,
|
|
@@ -3678,7 +3675,7 @@ const zn = ({
|
|
|
3678
3675
|
initial: S,
|
|
3679
3676
|
animate: S,
|
|
3680
3677
|
exit: x,
|
|
3681
|
-
className:
|
|
3678
|
+
className: I.label,
|
|
3682
3679
|
transition: f,
|
|
3683
3680
|
children: n
|
|
3684
3681
|
}
|
|
@@ -3711,7 +3708,7 @@ const zn = ({
|
|
|
3711
3708
|
variant: e = "standard",
|
|
3712
3709
|
onItemSelected: t,
|
|
3713
3710
|
children: n,
|
|
3714
|
-
className:
|
|
3711
|
+
className: o,
|
|
3715
3712
|
selectedItem: r,
|
|
3716
3713
|
extended: s,
|
|
3717
3714
|
alignment: c = "top",
|
|
@@ -3725,83 +3722,83 @@ const zn = ({
|
|
|
3725
3722
|
label: "Close menu"
|
|
3726
3723
|
}
|
|
3727
3724
|
},
|
|
3728
|
-
style:
|
|
3729
|
-
onExtendedChange:
|
|
3730
|
-
transition:
|
|
3725
|
+
style: i,
|
|
3726
|
+
onExtendedChange: l,
|
|
3727
|
+
transition: h,
|
|
3731
3728
|
setSelectedItem: v
|
|
3732
3729
|
}) => {
|
|
3733
|
-
const [f,
|
|
3730
|
+
const [f, u] = M(null), [d, p] = M(s);
|
|
3734
3731
|
let w;
|
|
3735
3732
|
r == 0 || r != null ? w = r : w = f;
|
|
3736
|
-
const
|
|
3737
|
-
t == null || t(
|
|
3733
|
+
const E = v || u, g = W(null), b = (I) => {
|
|
3734
|
+
t == null || t(I);
|
|
3738
3735
|
};
|
|
3739
|
-
function
|
|
3736
|
+
function R(I) {
|
|
3740
3737
|
const x = [];
|
|
3741
|
-
return dt.forEach(
|
|
3742
|
-
pe(S) && S.type === ft ? x.push(...
|
|
3738
|
+
return dt.forEach(I, (S) => {
|
|
3739
|
+
pe(S) && S.type === ft ? x.push(...R(S.props.children)) : x.push(S);
|
|
3743
3740
|
}), x;
|
|
3744
3741
|
}
|
|
3745
|
-
const A =
|
|
3746
|
-
(
|
|
3747
|
-
),
|
|
3742
|
+
const A = R(n), N = A.filter(
|
|
3743
|
+
(I) => pe(I) && I.type === Ce
|
|
3744
|
+
), F = vn({
|
|
3748
3745
|
children: n,
|
|
3749
3746
|
onItemSelected: t,
|
|
3750
3747
|
selectedItem: w,
|
|
3751
|
-
setSelectedItem:
|
|
3752
|
-
className:
|
|
3748
|
+
setSelectedItem: E,
|
|
3749
|
+
className: o,
|
|
3753
3750
|
variant: e,
|
|
3754
3751
|
extended: d,
|
|
3755
3752
|
isExtended: d,
|
|
3756
3753
|
alignment: c,
|
|
3757
3754
|
menu: a,
|
|
3758
|
-
transition:
|
|
3759
|
-
onExtendedChange:
|
|
3755
|
+
transition: h,
|
|
3756
|
+
onExtendedChange: l
|
|
3760
3757
|
});
|
|
3761
|
-
|
|
3762
|
-
const
|
|
3763
|
-
return
|
|
3764
|
-
|
|
3758
|
+
h = { duration: 0.3, ...h };
|
|
3759
|
+
const O = W(!1);
|
|
3760
|
+
return O.current = !1, $(() => {
|
|
3761
|
+
l == null || l(d ?? !1);
|
|
3765
3762
|
}, [d]), /* @__PURE__ */ Y(
|
|
3766
3763
|
"div",
|
|
3767
3764
|
{
|
|
3768
|
-
style: { transition:
|
|
3765
|
+
style: { transition: h.duration + "s", ...i },
|
|
3769
3766
|
ref: g,
|
|
3770
|
-
className:
|
|
3767
|
+
className: F.navigationRail,
|
|
3771
3768
|
children: [
|
|
3772
|
-
/* @__PURE__ */ Y("div", { className:
|
|
3769
|
+
/* @__PURE__ */ Y("div", { className: F.header, children: [
|
|
3773
3770
|
/* @__PURE__ */ m(
|
|
3774
3771
|
be,
|
|
3775
3772
|
{
|
|
3776
|
-
onClick: () =>
|
|
3773
|
+
onClick: () => p(!d),
|
|
3777
3774
|
label: d ? a == null ? void 0 : a.opened.label : a == null ? void 0 : a.closed.label,
|
|
3778
|
-
className:
|
|
3775
|
+
className: F.menuIcon,
|
|
3779
3776
|
icon: d ? a.opened.icon : a == null ? void 0 : a.closed.icon
|
|
3780
3777
|
}
|
|
3781
3778
|
),
|
|
3782
|
-
|
|
3783
|
-
transition:
|
|
3779
|
+
N.length > 0 && xe(N[0], {
|
|
3780
|
+
transition: h,
|
|
3784
3781
|
isExtended: d,
|
|
3785
|
-
className: "!shadow-none mx-5 " +
|
|
3782
|
+
className: "!shadow-none mx-5 " + N[0].props.className
|
|
3786
3783
|
})
|
|
3787
3784
|
] }),
|
|
3788
|
-
/* @__PURE__ */ m("div", { className:
|
|
3789
|
-
let
|
|
3785
|
+
/* @__PURE__ */ m("div", { className: F.segments, children: (() => {
|
|
3786
|
+
let I = 0;
|
|
3790
3787
|
return A.map((x) => pe(x) && x.type === yn ? xe(
|
|
3791
3788
|
x,
|
|
3792
3789
|
{
|
|
3793
|
-
key:
|
|
3794
|
-
index:
|
|
3790
|
+
key: I,
|
|
3791
|
+
index: I++,
|
|
3795
3792
|
// Utilise et incrémente le compteur dédié
|
|
3796
3793
|
variant: d ? "horizontal" : "vertical",
|
|
3797
3794
|
selectedItem: w,
|
|
3798
|
-
setSelectedItem:
|
|
3799
|
-
onItemSelected:
|
|
3800
|
-
transition:
|
|
3801
|
-
extendedOnly:
|
|
3795
|
+
setSelectedItem: E,
|
|
3796
|
+
onItemSelected: b,
|
|
3797
|
+
transition: h,
|
|
3798
|
+
extendedOnly: O.current,
|
|
3802
3799
|
isExtended: d
|
|
3803
3800
|
}
|
|
3804
|
-
) : pe(x) && x.type ===
|
|
3801
|
+
) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (O.current = !0, d ? xe(x, {}) : null) : x);
|
|
3805
3802
|
})() }),
|
|
3806
3803
|
/* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
|
|
3807
3804
|
]
|
|
@@ -3812,18 +3809,18 @@ function sr(e) {
|
|
|
3812
3809
|
return wt({
|
|
3813
3810
|
variant: xt.Udixio,
|
|
3814
3811
|
...e,
|
|
3815
|
-
plugins: [new vt(e), new
|
|
3812
|
+
plugins: [new vt(e), new Ue(e)]
|
|
3816
3813
|
});
|
|
3817
3814
|
}
|
|
3818
3815
|
export {
|
|
3819
3816
|
Jn as AnimateOnScrollInit,
|
|
3820
|
-
|
|
3817
|
+
ct as Button,
|
|
3821
3818
|
Qn as Card,
|
|
3822
3819
|
Tn as Carousel,
|
|
3823
3820
|
nn as CarouselItem,
|
|
3824
3821
|
jt as CustomScroll,
|
|
3825
3822
|
rn as Divider,
|
|
3826
|
-
|
|
3823
|
+
Ce as Fab,
|
|
3827
3824
|
zn as FabMenu,
|
|
3828
3825
|
ie as Icon,
|
|
3829
3826
|
be as IconButton,
|
|
@@ -3847,7 +3844,7 @@ export {
|
|
|
3847
3844
|
Zn as animateOnScroll,
|
|
3848
3845
|
$n as buttonStyle,
|
|
3849
3846
|
Rn as cardStyle,
|
|
3850
|
-
|
|
3847
|
+
_e as carouselItemConfig,
|
|
3851
3848
|
Bn as carouselItemStyle,
|
|
3852
3849
|
Dn as carouselStyle,
|
|
3853
3850
|
y as classNames,
|
|
@@ -3859,14 +3856,14 @@ export {
|
|
|
3859
3856
|
Wn as dividerStyle,
|
|
3860
3857
|
Pn as fabMenuStyle,
|
|
3861
3858
|
An as fabStyle,
|
|
3862
|
-
|
|
3859
|
+
$e as getClassNames,
|
|
3863
3860
|
Hn as iconButtonStyle,
|
|
3864
|
-
|
|
3861
|
+
st as initAnimateOnScroll,
|
|
3865
3862
|
he as normalize,
|
|
3866
3863
|
Fn as progressIndicatorStyle,
|
|
3867
|
-
|
|
3864
|
+
ze as sideSheetConfig,
|
|
3868
3865
|
Bt as sideSheetStyle,
|
|
3869
|
-
|
|
3866
|
+
et as sliderConfig,
|
|
3870
3867
|
Vn as sliderStyle,
|
|
3871
3868
|
Yn as snackbarStyle,
|
|
3872
3869
|
Un as switchStyle,
|