@udixio/ui-react 2.8.0 → 2.8.2
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 +20 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1356 -1336
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/effects/block-scroll.effect.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/FabMenu.tsx +5 -2
- package/src/lib/effects/block-scroll.effect.tsx +62 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
2
|
-
import { clsx as
|
|
1
|
+
import { jsx as m, jsxs as Y, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as Ve } 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 $e, useState as $, useEffect as R, useRef as W, useLayoutEffect as Ye, 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 De, animate as ht } from "motion/react";
|
|
6
6
|
import { animate as pt } from "motion";
|
|
7
7
|
import { createPortal as Ue } from "react-dom";
|
|
8
8
|
import { loader as yt, defineConfig as wt, FontPlugin as vt, Variants as xt } from "@udixio/theme";
|
|
9
|
-
import { TailwindPlugin as
|
|
10
|
-
import
|
|
9
|
+
import { TailwindPlugin as Xe } from "@udixio/tailwind";
|
|
10
|
+
import gt from "react-textarea-autosize";
|
|
11
11
|
const je = ut({
|
|
12
12
|
override: {
|
|
13
13
|
classGroups: {
|
|
@@ -34,36 +34,36 @@ const je = ut({
|
|
|
34
34
|
font: ["font"]
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), y = (...e) => je(Ve(e)), bt = (...e) => je(Ve(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 Re = (e) => {
|
|
42
42
|
const t = {};
|
|
43
|
-
e.classNameList.forEach((
|
|
43
|
+
e.classNameList.forEach((l) => {
|
|
44
44
|
var r;
|
|
45
|
-
if (
|
|
46
|
-
if (typeof
|
|
47
|
-
(t[r = e.default] ?? (t[r] = [])).push(
|
|
45
|
+
if (l)
|
|
46
|
+
if (typeof l == "string")
|
|
47
|
+
(t[r = e.default] ?? (t[r] = [])).push(l);
|
|
48
48
|
else {
|
|
49
|
-
const s =
|
|
49
|
+
const s = l(e.states);
|
|
50
50
|
Object.entries(s).map((c) => {
|
|
51
|
-
const [
|
|
52
|
-
(t[
|
|
51
|
+
const [a, u] = c;
|
|
52
|
+
(t[a] ?? (t[a] = [])).push(u);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const n = t;
|
|
57
|
-
return Object.entries(t).map((
|
|
58
|
-
let [r, s] =
|
|
59
|
-
s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] =
|
|
57
|
+
return Object.entries(t).map((l) => {
|
|
58
|
+
let [r, s] = l;
|
|
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) => Re({
|
|
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) => $e(
|
|
66
|
+
() => Re({
|
|
67
67
|
classNameList: [n.className, t],
|
|
68
68
|
default: e,
|
|
69
69
|
states: n
|
|
@@ -71,8 +71,8 @@ const $e = (e) => {
|
|
|
71
71
|
[n]
|
|
72
72
|
);
|
|
73
73
|
function Mn(e, t, n) {
|
|
74
|
-
return
|
|
75
|
-
() =>
|
|
74
|
+
return $e(
|
|
75
|
+
() => Re({
|
|
76
76
|
classNameList: [n == null ? void 0 : n.className, t],
|
|
77
77
|
default: e,
|
|
78
78
|
states: n
|
|
@@ -84,33 +84,33 @@ const qe = ({
|
|
|
84
84
|
variant: e,
|
|
85
85
|
disableTextMargins: t,
|
|
86
86
|
disabled: n,
|
|
87
|
-
iconPosition:
|
|
87
|
+
iconPosition: l,
|
|
88
88
|
icon: r,
|
|
89
89
|
isActive: s,
|
|
90
90
|
loading: c,
|
|
91
|
-
shape:
|
|
92
|
-
onToggle:
|
|
91
|
+
shape: a,
|
|
92
|
+
onToggle: u,
|
|
93
93
|
size: o,
|
|
94
|
-
allowShapeTransformation:
|
|
94
|
+
allowShapeTransformation: p
|
|
95
95
|
}) => ({
|
|
96
|
-
button:
|
|
96
|
+
button: y(
|
|
97
97
|
" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",
|
|
98
98
|
o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
|
|
99
99
|
o === "small" && "text-label-large px-4 py-2.5 gap-2",
|
|
100
100
|
o === "medium" && "text-title-medium px-6 py-4 gap-2",
|
|
101
101
|
o === "large" && "text-headline-small px-12 py-8 gap-3",
|
|
102
102
|
o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
|
|
103
|
-
|
|
103
|
+
a === "rounded" && {
|
|
104
104
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
105
105
|
"rounded-[40px]": o === "medium",
|
|
106
106
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
107
107
|
},
|
|
108
|
-
(
|
|
108
|
+
(a === "squared" || p && s) && {
|
|
109
109
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
110
110
|
"rounded-[16px]": o === "medium",
|
|
111
111
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
112
112
|
},
|
|
113
|
-
|
|
113
|
+
p && !n && {
|
|
114
114
|
"active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
115
115
|
"active:rounded-[16px]": o === "medium",
|
|
116
116
|
"active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
@@ -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 && u,
|
|
127
|
+
"bg-primary text-on-primary": !n && (s && u || !u),
|
|
128
128
|
"text-on-surface/[38%]": n
|
|
129
129
|
},
|
|
130
130
|
e === "tonal" && {
|
|
@@ -161,29 +161,29 @@ const qe = ({
|
|
|
161
161
|
],
|
|
162
162
|
n && "cursor-default"
|
|
163
163
|
),
|
|
164
|
-
touchTarget:
|
|
164
|
+
touchTarget: y(
|
|
165
165
|
"absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
|
|
166
166
|
),
|
|
167
|
-
stateLayer:
|
|
167
|
+
stateLayer: y(
|
|
168
168
|
"overflow-hidden",
|
|
169
|
-
|
|
169
|
+
a === "rounded" && {
|
|
170
170
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
171
171
|
"rounded-[40px]": o === "medium",
|
|
172
172
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
173
173
|
},
|
|
174
|
-
(
|
|
174
|
+
(a === "squared" || p && s) && {
|
|
175
175
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
176
176
|
"rounded-[16px]": o === "medium",
|
|
177
177
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
178
178
|
},
|
|
179
|
-
|
|
179
|
+
p && !n && {
|
|
180
180
|
"group-active/button:rounded-[12px]": o === "xSmall" || o == "small",
|
|
181
181
|
"group-active/button:rounded-[16px]": o === "medium",
|
|
182
182
|
"group-active/button:rounded-[28px]": o === "large" || o == "xLarge"
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
label:
|
|
186
|
-
icon:
|
|
185
|
+
label: y({ invisible: c }),
|
|
186
|
+
icon: y(
|
|
187
187
|
{ invisible: c },
|
|
188
188
|
o === "xSmall" && "size-5",
|
|
189
189
|
o === "small" && "size-5",
|
|
@@ -201,7 +201,7 @@ const qe = ({
|
|
|
201
201
|
variant: e,
|
|
202
202
|
isInteractive: t
|
|
203
203
|
}) => ({
|
|
204
|
-
card:
|
|
204
|
+
card: y(
|
|
205
205
|
"group/card rounded-xl overflow-hidden z-10",
|
|
206
206
|
e === "outlined" && "bg-surface border border-outline-variant",
|
|
207
207
|
e === "elevated" && "bg-surface-container-low shadow-1",
|
|
@@ -213,29 +213,29 @@ const qe = ({
|
|
|
213
213
|
), Ke = ({
|
|
214
214
|
width: e
|
|
215
215
|
}) => ({
|
|
216
|
-
carouselItem:
|
|
216
|
+
carouselItem: y("rounded-[28px] overflow-hidden flex-none", {
|
|
217
217
|
hidden: e === void 0,
|
|
218
218
|
"flex-1": e == null
|
|
219
219
|
})
|
|
220
220
|
}), Bn = Q(
|
|
221
221
|
"carouselItem",
|
|
222
222
|
Ke
|
|
223
|
-
),
|
|
223
|
+
), St = J(
|
|
224
224
|
"carouselItem",
|
|
225
225
|
Ke
|
|
226
226
|
), Ge = () => ({
|
|
227
|
-
carousel:
|
|
228
|
-
track:
|
|
229
|
-
}),
|
|
227
|
+
carousel: y(["w-full h-[400px]"]),
|
|
228
|
+
track: y("flex h-full w-full")
|
|
229
|
+
}), Dn = Q(
|
|
230
230
|
"carousel",
|
|
231
231
|
Ge
|
|
232
|
-
),
|
|
232
|
+
), It = J(
|
|
233
233
|
"carousel",
|
|
234
234
|
Ge
|
|
235
235
|
), Je = ({
|
|
236
236
|
orientation: e
|
|
237
237
|
}) => ({
|
|
238
|
-
divider:
|
|
238
|
+
divider: y(
|
|
239
239
|
"border-outline-variant ",
|
|
240
240
|
{
|
|
241
241
|
"h-fit w-full border-t": e === "horizontal"
|
|
@@ -244,7 +244,7 @@ const qe = ({
|
|
|
244
244
|
"h-auto self-stretch w-fit border-l": e === "vertical"
|
|
245
245
|
}
|
|
246
246
|
)
|
|
247
|
-
}),
|
|
247
|
+
}), Wn = Q(
|
|
248
248
|
"divider",
|
|
249
249
|
Je
|
|
250
250
|
), kt = J(
|
|
@@ -255,7 +255,7 @@ const qe = ({
|
|
|
255
255
|
variant: t,
|
|
256
256
|
extended: n
|
|
257
257
|
}) => ({
|
|
258
|
-
fab:
|
|
258
|
+
fab: y(
|
|
259
259
|
"flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",
|
|
260
260
|
{
|
|
261
261
|
"rounded-[12px]": e == "small",
|
|
@@ -274,11 +274,11 @@ const qe = ({
|
|
|
274
274
|
t === "secondaryContainer" && "bg-secondary-container text-on-secondary-container",
|
|
275
275
|
t === "tertiaryContainer" && "bg-tertiary-container text-on-tertiary-container"
|
|
276
276
|
),
|
|
277
|
-
icon:
|
|
277
|
+
icon: y({
|
|
278
278
|
"size-6": e == "small" || e == "medium",
|
|
279
279
|
"size-9": e == "large"
|
|
280
280
|
}),
|
|
281
|
-
label:
|
|
281
|
+
label: y("text-nowrap", {
|
|
282
282
|
"text-title-medium": e == "small",
|
|
283
283
|
"text-title-large": e == "medium",
|
|
284
284
|
"text-headline-small": e == "large"
|
|
@@ -288,8 +288,8 @@ const qe = ({
|
|
|
288
288
|
variant: t,
|
|
289
289
|
open: n
|
|
290
290
|
}) => ({
|
|
291
|
-
fabMenu:
|
|
292
|
-
actions:
|
|
291
|
+
fabMenu: y("relative inline-flex flex-col items-end"),
|
|
292
|
+
actions: y(
|
|
293
293
|
"flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"
|
|
294
294
|
)
|
|
295
295
|
}), Pn = Q(
|
|
@@ -302,13 +302,13 @@ const qe = ({
|
|
|
302
302
|
variant: e,
|
|
303
303
|
disabled: t,
|
|
304
304
|
onToggle: n,
|
|
305
|
-
isActive:
|
|
305
|
+
isActive: l,
|
|
306
306
|
size: r,
|
|
307
307
|
width: s,
|
|
308
308
|
shape: c,
|
|
309
|
-
allowShapeTransformation:
|
|
309
|
+
allowShapeTransformation: a
|
|
310
310
|
}) => ({
|
|
311
|
-
iconButton:
|
|
311
|
+
iconButton: y(
|
|
312
312
|
"rounded-full relative flex transition-all duration-300",
|
|
313
313
|
"group/icon-button cursor-pointer",
|
|
314
314
|
{
|
|
@@ -319,81 +319,81 @@ const qe = ({
|
|
|
319
319
|
"rounded-[40px]": r === "medium",
|
|
320
320
|
"rounded-[70px]": r === "large" || r == "xLarge"
|
|
321
321
|
},
|
|
322
|
-
(c === "squared" ||
|
|
322
|
+
(c === "squared" || a && l) && {
|
|
323
323
|
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
324
324
|
"rounded-[16px]": r === "medium",
|
|
325
325
|
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
326
326
|
},
|
|
327
|
-
|
|
327
|
+
a && !t && {
|
|
328
328
|
"active:rounded-[12px]": r === "xSmall" || r == "small",
|
|
329
329
|
"active:rounded-[16px]": r === "medium",
|
|
330
330
|
"active:rounded-[28px]": r === "large" || r == "xLarge"
|
|
331
331
|
},
|
|
332
332
|
e === "filled" && [
|
|
333
333
|
!t && {
|
|
334
|
-
"bg-surface-container": !
|
|
335
|
-
"bg-primary":
|
|
334
|
+
"bg-surface-container": !l && !!n,
|
|
335
|
+
"bg-primary": l || !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": !l && !!n,
|
|
342
|
+
"bg-secondary text-on-secondary": l || !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": !l,
|
|
349
|
+
"border border-transparent bg-inverse-surface": l
|
|
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]": !l,
|
|
353
|
+
"border border-transparent bg-on-surface/[0.12]": l
|
|
354
354
|
}
|
|
355
355
|
]
|
|
356
356
|
),
|
|
357
|
-
touchTarget:
|
|
357
|
+
touchTarget: y(
|
|
358
358
|
"absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
|
|
359
359
|
),
|
|
360
|
-
stateLayer:
|
|
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 && l && 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 && l && a) && {
|
|
368
368
|
"rounded-[12px]": r === "xSmall" || r == "small",
|
|
369
369
|
"rounded-[16px]": r === "medium",
|
|
370
370
|
"rounded-[28px]": r === "large" || r == "xLarge"
|
|
371
371
|
},
|
|
372
|
-
|
|
372
|
+
a && !t && {
|
|
373
373
|
"group-active/icon-button:rounded-[12px]": r === "xSmall" || r == "small",
|
|
374
374
|
"group-active/icon-button:rounded-[16px]": r === "medium",
|
|
375
375
|
"group-active/icon-button:rounded-[28px]": r === "large" || r == "xLarge"
|
|
376
376
|
},
|
|
377
377
|
!t && [
|
|
378
378
|
e === "standard" && {
|
|
379
|
-
"state-on-surface-variant": !
|
|
380
|
-
"state-primary":
|
|
379
|
+
"state-on-surface-variant": !l,
|
|
380
|
+
"state-primary": l
|
|
381
381
|
},
|
|
382
382
|
e === "filled" && {
|
|
383
|
-
"state-primary": !
|
|
384
|
-
"state-inverse-on-surface":
|
|
383
|
+
"state-primary": !l && !!n,
|
|
384
|
+
"state-inverse-on-surface": l || !n
|
|
385
385
|
},
|
|
386
386
|
e === "tonal" && {
|
|
387
|
-
"state-on-surface-variant": !
|
|
388
|
-
"state-on-secondary-container":
|
|
387
|
+
"state-on-surface-variant": !l && !!n,
|
|
388
|
+
"state-on-secondary-container": l || !n
|
|
389
389
|
},
|
|
390
390
|
e === "outlined" && {
|
|
391
|
-
"state-on-surface-variant": !
|
|
392
|
-
"state-on-primary":
|
|
391
|
+
"state-on-surface-variant": !l,
|
|
392
|
+
"state-on-primary": l
|
|
393
393
|
}
|
|
394
394
|
]
|
|
395
395
|
),
|
|
396
|
-
icon:
|
|
396
|
+
icon: y(
|
|
397
397
|
" transition-all duration-300",
|
|
398
398
|
{ "size-5 p-1.5": r === "xSmall" },
|
|
399
399
|
{ "size-6 p-2": r === "small" },
|
|
@@ -416,35 +416,35 @@ const qe = ({
|
|
|
416
416
|
],
|
|
417
417
|
!t && [
|
|
418
418
|
e === "standard" && {
|
|
419
|
-
"text-on-surface-variant": !
|
|
420
|
-
"text-primary":
|
|
419
|
+
"text-on-surface-variant": !l,
|
|
420
|
+
"text-primary": l
|
|
421
421
|
},
|
|
422
422
|
e === "filled" && {
|
|
423
|
-
"text-primary": !
|
|
424
|
-
"text-on-primary":
|
|
423
|
+
"text-primary": !l && !!n,
|
|
424
|
+
"text-on-primary": l || !n
|
|
425
425
|
},
|
|
426
426
|
e === "outlined" && {
|
|
427
|
-
"text-on-surface-variant": !
|
|
428
|
-
"text-inverse-on-surface":
|
|
427
|
+
"text-on-surface-variant": !l,
|
|
428
|
+
"text-inverse-on-surface": l
|
|
429
429
|
}
|
|
430
430
|
],
|
|
431
431
|
!!t && "text-on-surface/[0.38]"
|
|
432
432
|
)
|
|
433
|
-
}),
|
|
433
|
+
}), Hn = Q(
|
|
434
434
|
"iconButton",
|
|
435
435
|
Te
|
|
436
436
|
), $t = J(
|
|
437
437
|
"iconButton",
|
|
438
438
|
Te
|
|
439
439
|
), ze = ({ variant: e, isVisible: t }) => ({
|
|
440
|
-
progressIndicator:
|
|
440
|
+
progressIndicator: y(
|
|
441
441
|
(e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full h-1"
|
|
442
442
|
),
|
|
443
|
-
track:
|
|
443
|
+
track: y("h-full rounded-full bg-primary rounded-l-full", {
|
|
444
444
|
"max-h-0": !t,
|
|
445
445
|
"max-h-full": t
|
|
446
446
|
}),
|
|
447
|
-
activeIndicator:
|
|
447
|
+
activeIndicator: y(
|
|
448
448
|
{
|
|
449
449
|
"max-h-0": !t,
|
|
450
450
|
"max-h-full": t
|
|
@@ -458,14 +458,14 @@ const qe = ({
|
|
|
458
458
|
}
|
|
459
459
|
]
|
|
460
460
|
),
|
|
461
|
-
stop:
|
|
461
|
+
stop: y(
|
|
462
462
|
"absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",
|
|
463
463
|
{
|
|
464
464
|
"max-h-0": !t,
|
|
465
465
|
"max-h-full": t
|
|
466
466
|
}
|
|
467
467
|
)
|
|
468
|
-
}),
|
|
468
|
+
}), Fn = Q(
|
|
469
469
|
"progressIndicator",
|
|
470
470
|
ze
|
|
471
471
|
), Rt = J(
|
|
@@ -475,7 +475,7 @@ const qe = ({
|
|
|
475
475
|
variant: e,
|
|
476
476
|
position: t
|
|
477
477
|
}) => ({
|
|
478
|
-
sideSheet:
|
|
478
|
+
sideSheet: y(
|
|
479
479
|
"bg-surface flex justify-between max-w-xs z-10",
|
|
480
480
|
{
|
|
481
481
|
"flex-row-reverse": t == "right",
|
|
@@ -489,58 +489,58 @@ const qe = ({
|
|
|
489
489
|
}
|
|
490
490
|
]
|
|
491
491
|
),
|
|
492
|
-
container:
|
|
493
|
-
content:
|
|
494
|
-
header:
|
|
495
|
-
title:
|
|
496
|
-
closeButton:
|
|
497
|
-
divider:
|
|
498
|
-
overlay:
|
|
492
|
+
container: y("w-full overflow-hidden", {}),
|
|
493
|
+
content: y("w-fit "),
|
|
494
|
+
header: y("p-4 flex items-center gap-2"),
|
|
495
|
+
title: y("text-on-surface-variant text-title-large"),
|
|
496
|
+
closeButton: y("ml-auto"),
|
|
497
|
+
divider: y({ hidden: e == "modal" }),
|
|
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
|
et
|
|
502
|
-
),
|
|
502
|
+
), On = J(
|
|
503
503
|
"sideSheet",
|
|
504
504
|
et
|
|
505
505
|
), tt = ({
|
|
506
506
|
isChanging: e
|
|
507
507
|
}) => ({
|
|
508
|
-
slider:
|
|
508
|
+
slider: y([
|
|
509
509
|
"relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"
|
|
510
510
|
]),
|
|
511
|
-
activeTrack:
|
|
511
|
+
activeTrack: y([
|
|
512
512
|
"h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "
|
|
513
513
|
]),
|
|
514
|
-
inactiveTrack:
|
|
514
|
+
inactiveTrack: y([
|
|
515
515
|
"h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"
|
|
516
516
|
]),
|
|
517
|
-
handle:
|
|
517
|
+
handle: y([
|
|
518
518
|
"transform relative transition-all duration-100 bg-primary h-full rounded-full ",
|
|
519
519
|
{ "w-0.5": e, "w-1": !e }
|
|
520
520
|
]),
|
|
521
|
-
valueIndicator:
|
|
521
|
+
valueIndicator: y([
|
|
522
522
|
"absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"
|
|
523
523
|
]),
|
|
524
|
-
dot:
|
|
524
|
+
dot: y([
|
|
525
525
|
"h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
|
|
526
526
|
])
|
|
527
|
-
}),
|
|
527
|
+
}), Vn = Q(
|
|
528
528
|
"slider",
|
|
529
529
|
tt
|
|
530
|
-
),
|
|
530
|
+
), Dt = J(
|
|
531
531
|
"slider",
|
|
532
532
|
tt
|
|
533
533
|
), nt = () => ({
|
|
534
|
-
snackbar:
|
|
535
|
-
container:
|
|
534
|
+
snackbar: y(" rounded bg-inverse-surface "),
|
|
535
|
+
container: y(
|
|
536
536
|
"pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
|
|
537
537
|
),
|
|
538
|
-
supportingText:
|
|
539
|
-
icon:
|
|
540
|
-
}),
|
|
538
|
+
supportingText: y("text-body-medium text-inverse-on-surface "),
|
|
539
|
+
icon: y(" ml-auto mr-0 text-inverse-on-surface block dark")
|
|
540
|
+
}), Yn = Q(
|
|
541
541
|
"snackbar",
|
|
542
542
|
nt
|
|
543
|
-
),
|
|
543
|
+
), Wt = J(
|
|
544
544
|
"snackbar",
|
|
545
545
|
nt
|
|
546
546
|
), rt = ({
|
|
@@ -548,7 +548,7 @@ const qe = ({
|
|
|
548
548
|
disabled: t,
|
|
549
549
|
inactiveIcon: n
|
|
550
550
|
}) => ({
|
|
551
|
-
switch:
|
|
551
|
+
switch: y(
|
|
552
552
|
"group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
|
|
553
553
|
{ "bg-on-surface/[0.12] border-transparent": t },
|
|
554
554
|
!t && [
|
|
@@ -559,12 +559,12 @@ const qe = ({
|
|
|
559
559
|
// { 'justify-start': !isSelected },
|
|
560
560
|
// { 'justify-end': isSelected },
|
|
561
561
|
),
|
|
562
|
-
handleContainer:
|
|
562
|
+
handleContainer: y(
|
|
563
563
|
"flex items-center justify-center absolute",
|
|
564
564
|
{ "left-[14px]": !e },
|
|
565
565
|
{ "right-[14px]": e }
|
|
566
566
|
),
|
|
567
|
-
handle:
|
|
567
|
+
handle: y(
|
|
568
568
|
"transition-all duration-100 z-10 rounded-full flex items-center justify-center",
|
|
569
569
|
{ "w-[16px] h-[16px]": !e && !n },
|
|
570
570
|
{ "w-[24px] h-[24px]": !(!e && !n) },
|
|
@@ -575,11 +575,11 @@ const qe = ({
|
|
|
575
575
|
],
|
|
576
576
|
{ "bg-surface": t }
|
|
577
577
|
),
|
|
578
|
-
handleStateLayer:
|
|
578
|
+
handleStateLayer: y(
|
|
579
579
|
"w-[40px] h-[40px] -z-10 rounded-full absolute",
|
|
580
580
|
{ "group-state-primary": !t }
|
|
581
581
|
),
|
|
582
|
-
icon:
|
|
582
|
+
icon: y(
|
|
583
583
|
"w-[16px] h-[16px]",
|
|
584
584
|
!t && [
|
|
585
585
|
{ "text-on-primary-container": e },
|
|
@@ -597,175 +597,175 @@ const qe = ({
|
|
|
597
597
|
isSelected: e,
|
|
598
598
|
icon: t,
|
|
599
599
|
label: n,
|
|
600
|
-
variant:
|
|
600
|
+
variant: l
|
|
601
601
|
}) => ({
|
|
602
|
-
tab:
|
|
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) && l === "primary" && "h-16",
|
|
606
|
+
!(t && n && l === "primary") && "h-12"
|
|
607
607
|
),
|
|
608
|
-
stateLayer:
|
|
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
|
+
l === "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
|
+
l === "secondary" && "group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"
|
|
615
615
|
),
|
|
616
|
-
content:
|
|
616
|
+
content: y(
|
|
617
617
|
"flex gap-0.5 h-full justify-center",
|
|
618
618
|
{
|
|
619
|
-
relative:
|
|
619
|
+
relative: l == "primary"
|
|
620
620
|
},
|
|
621
621
|
{
|
|
622
622
|
"": !!(n && !t)
|
|
623
623
|
},
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
l === "primary" && "flex-col items-center",
|
|
625
|
+
l === "secondary" && {
|
|
626
626
|
"flex-col items-center": !(n && t),
|
|
627
627
|
"flex-row items-center gap-2": !!(n && t)
|
|
628
628
|
}
|
|
629
629
|
),
|
|
630
|
-
icon:
|
|
630
|
+
icon: y(
|
|
631
631
|
"h-6 w-6 p-0.5 !box-border",
|
|
632
|
-
|
|
632
|
+
l === "primary" && {
|
|
633
633
|
"text-on-surface-variant": !e,
|
|
634
634
|
"text-primary": e
|
|
635
635
|
},
|
|
636
|
-
|
|
636
|
+
l === "secondary" && {
|
|
637
637
|
"text-on-surface-variant": !e,
|
|
638
638
|
"text-on-surface": e
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
|
-
label:
|
|
641
|
+
label: y(
|
|
642
642
|
"text-title-small text-nowrap",
|
|
643
|
-
|
|
643
|
+
l === "primary" && {
|
|
644
644
|
"text-on-surface-variant": !e,
|
|
645
645
|
"text-primary": e
|
|
646
646
|
},
|
|
647
|
-
|
|
647
|
+
l === "secondary" && {
|
|
648
648
|
"text-on-surface-variant": !e,
|
|
649
649
|
"text-on-surface": e
|
|
650
650
|
}
|
|
651
651
|
),
|
|
652
|
-
underline:
|
|
652
|
+
underline: y(
|
|
653
653
|
"bg-primary absolute w-full left-0 bottom-0",
|
|
654
|
-
|
|
655
|
-
|
|
654
|
+
l === "primary" && "h-[3px] rounded-t",
|
|
655
|
+
l === "secondary" && "h-0.5"
|
|
656
656
|
)
|
|
657
|
-
}),
|
|
658
|
-
tabs:
|
|
657
|
+
}), Xn = Q("tab", ot), Pt = J("tab", ot), lt = ({ scrollable: e }) => ({
|
|
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", lt), Ht = J(
|
|
664
664
|
"tabs",
|
|
665
|
-
|
|
666
|
-
),
|
|
665
|
+
lt
|
|
666
|
+
), at = ({
|
|
667
667
|
disabled: e,
|
|
668
668
|
leadingIcon: t,
|
|
669
669
|
trailingIcon: n,
|
|
670
|
-
variant:
|
|
670
|
+
variant: l,
|
|
671
671
|
errorText: r,
|
|
672
672
|
isFocused: s,
|
|
673
673
|
value: c,
|
|
674
|
-
suffix:
|
|
675
|
-
textLine:
|
|
674
|
+
suffix: a,
|
|
675
|
+
textLine: u
|
|
676
676
|
}) => ({
|
|
677
|
-
textField:
|
|
677
|
+
textField: y({
|
|
678
678
|
"opacity-[.38]": e
|
|
679
679
|
}),
|
|
680
|
-
content:
|
|
680
|
+
content: y(
|
|
681
681
|
"group/text-field transition-border duration-200 relative flex items-center ",
|
|
682
|
-
{ "h-14":
|
|
682
|
+
{ "h-14": u == "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 && l == "filled",
|
|
685
|
+
"border-outline": !(r != null && r.length) && !s && l == "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
|
+
l == "filled" && [
|
|
691
691
|
"rounded-t overflow-hidden border-b",
|
|
692
692
|
{ "bg-surface-container-highest": !e }
|
|
693
693
|
],
|
|
694
|
-
|
|
694
|
+
l == "outlined" && [
|
|
695
695
|
"border rounded box-border",
|
|
696
696
|
{
|
|
697
697
|
"border-[3px]": s
|
|
698
698
|
}
|
|
699
699
|
]
|
|
700
700
|
),
|
|
701
|
-
stateLayer:
|
|
701
|
+
stateLayer: y(
|
|
702
702
|
"absolute -z-10 w-full h-full top-0 left-0",
|
|
703
703
|
{
|
|
704
|
-
hidden:
|
|
704
|
+
hidden: l == "outlined"
|
|
705
705
|
},
|
|
706
706
|
{
|
|
707
707
|
"group-state-on-surface": !e,
|
|
708
708
|
"focus-state-on-surface": s
|
|
709
709
|
}
|
|
710
710
|
),
|
|
711
|
-
label:
|
|
711
|
+
label: y(
|
|
712
712
|
"inline-flex outline-none whitespace-nowrap",
|
|
713
713
|
{ "text-on-surface-variant": !e && !(r != null && r.length) },
|
|
714
714
|
{ "text-on-surface": e },
|
|
715
715
|
{ "text-error": !!(r != null && r.length) },
|
|
716
716
|
{ "text-primary": !(r != null && r.length) && s }
|
|
717
717
|
),
|
|
718
|
-
input:
|
|
718
|
+
input: y(
|
|
719
719
|
"w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
|
|
720
720
|
{
|
|
721
721
|
" text-on-surface placeholder:text-on-surface-variant": !e,
|
|
722
722
|
"placeholder:text-on-surface text-on-surface": e
|
|
723
723
|
},
|
|
724
724
|
{
|
|
725
|
-
"pr-0": !!
|
|
725
|
+
"pr-0": !!a
|
|
726
726
|
},
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
l == "filled" && " pb-2 pt-6",
|
|
728
|
+
l == "outlined" && "py-4 relative z-10"
|
|
729
729
|
),
|
|
730
|
-
activeIndicator:
|
|
730
|
+
activeIndicator: y(
|
|
731
731
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
732
|
-
|
|
732
|
+
l == "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) },
|
|
736
736
|
{ "!w-full": s }
|
|
737
737
|
]
|
|
738
738
|
),
|
|
739
|
-
supportingText:
|
|
739
|
+
supportingText: y(
|
|
740
740
|
" text-body-small px-4 pt-1",
|
|
741
741
|
{ "text-on-surface-variant": !e && !(r != null && r.length) },
|
|
742
742
|
{ "text-on-surface": e },
|
|
743
743
|
{ "!w-full": s },
|
|
744
744
|
{ "text-error": !!(r != null && r.length) }
|
|
745
745
|
),
|
|
746
|
-
leadingIcon:
|
|
746
|
+
leadingIcon: y([
|
|
747
747
|
"h-12 ml-3 flex items-center justify-center",
|
|
748
748
|
{ "cursor-text": !Z.isValidElement(t) }
|
|
749
749
|
]),
|
|
750
|
-
trailingIcon:
|
|
750
|
+
trailingIcon: y("h-12 w-12 flex items-center justify-center", {
|
|
751
751
|
"cursor-text": !Z.isValidElement(n)
|
|
752
752
|
}),
|
|
753
|
-
suffix:
|
|
753
|
+
suffix: y(
|
|
754
754
|
"text-on-surface-variant pl-0 pr-4",
|
|
755
|
-
|
|
756
|
-
|
|
755
|
+
l == "filled" && " pb-2 pt-6",
|
|
756
|
+
l == "outlined" && "py-4 relative z-10"
|
|
757
757
|
)
|
|
758
758
|
}), qn = Q(
|
|
759
759
|
"textField",
|
|
760
|
-
|
|
761
|
-
),
|
|
760
|
+
at
|
|
761
|
+
), Ft = J(
|
|
762
762
|
"textField",
|
|
763
|
-
|
|
763
|
+
at
|
|
764
764
|
), st = ({
|
|
765
765
|
position: e,
|
|
766
766
|
variant: t
|
|
767
767
|
}) => ({
|
|
768
|
-
toolTip:
|
|
768
|
+
toolTip: y(
|
|
769
769
|
" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",
|
|
770
770
|
{
|
|
771
771
|
"bottom-full left-1/2 -translate-x-1/2": e == "top",
|
|
@@ -778,18 +778,18 @@ const qe = ({
|
|
|
778
778
|
"top-full left-full": e == "bottom-right"
|
|
779
779
|
}
|
|
780
780
|
),
|
|
781
|
-
container:
|
|
781
|
+
container: y(
|
|
782
782
|
"pb-2",
|
|
783
783
|
t == "rich" && "bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",
|
|
784
784
|
t == "plain" && "bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"
|
|
785
785
|
),
|
|
786
|
-
actions:
|
|
787
|
-
subHead:
|
|
788
|
-
supportingText:
|
|
786
|
+
actions: y("flex gap-10 px-1 mt-2", t == "plain" && "hidden"),
|
|
787
|
+
subHead: y("text-title-small mb-1", t == "plain" && "hidden"),
|
|
788
|
+
supportingText: y("")
|
|
789
789
|
}), _n = Q(
|
|
790
790
|
"toolTip",
|
|
791
791
|
st
|
|
792
|
-
),
|
|
792
|
+
), Ot = J(
|
|
793
793
|
"toolTip",
|
|
794
794
|
st
|
|
795
795
|
), ie = ({ icon: e, colors: t = [], className: n }) => {
|
|
@@ -804,7 +804,7 @@ const qe = ({
|
|
|
804
804
|
)), /* @__PURE__ */ m(
|
|
805
805
|
"div",
|
|
806
806
|
{
|
|
807
|
-
className:
|
|
807
|
+
className: y(
|
|
808
808
|
"size-5 box-content inline-flex fill-current",
|
|
809
809
|
n
|
|
810
810
|
),
|
|
@@ -821,7 +821,7 @@ const qe = ({
|
|
|
821
821
|
src: o.src,
|
|
822
822
|
width: o.width,
|
|
823
823
|
height: o.height,
|
|
824
|
-
className:
|
|
824
|
+
className: y("size-5 box-content", n),
|
|
825
825
|
style: {
|
|
826
826
|
filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
|
|
827
827
|
},
|
|
@@ -830,10 +830,10 @@ const qe = ({
|
|
|
830
830
|
}
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
|
-
const
|
|
834
|
-
if (!(
|
|
833
|
+
const l = e;
|
|
834
|
+
if (!(l != null && l.prefix))
|
|
835
835
|
throw new Error(`Invalid icon type: ${typeof e}`);
|
|
836
|
-
const { icon: r } =
|
|
836
|
+
const { icon: r } = l, [s, c, , , a] = r || [], u = (o) => {
|
|
837
837
|
switch (o.length) {
|
|
838
838
|
case 2:
|
|
839
839
|
return {
|
|
@@ -849,56 +849,56 @@ const qe = ({
|
|
|
849
849
|
return /* @__PURE__ */ m(
|
|
850
850
|
"svg",
|
|
851
851
|
{
|
|
852
|
-
className:
|
|
853
|
-
style: { ...
|
|
852
|
+
className: y("size-5 box-content", n),
|
|
853
|
+
style: { ...u(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
|
|
858
|
+
children: typeof a == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: a }) : a.map((o, p) => /* @__PURE__ */ m("path", { d: o }, p))
|
|
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: l,
|
|
866
866
|
...r
|
|
867
867
|
}) => {
|
|
868
|
-
const [s, c] =
|
|
869
|
-
|
|
868
|
+
const [s, c] = $(t), [a] = $(1.5);
|
|
869
|
+
R(() => {
|
|
870
870
|
t > 100 && (t = 100), t < 0 && (t = 0), c(t);
|
|
871
871
|
}, [t]);
|
|
872
|
-
const [
|
|
873
|
-
|
|
872
|
+
const [u, o] = $(!0), p = () => u ? a : a * 0.5;
|
|
873
|
+
R(() => {
|
|
874
874
|
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && s !== 100) {
|
|
875
|
-
const
|
|
876
|
-
c(
|
|
877
|
-
},
|
|
878
|
-
return () => clearInterval(
|
|
875
|
+
const d = setInterval(() => {
|
|
876
|
+
c(u ? 10 : 90), o(!u);
|
|
877
|
+
}, p() * 1e3);
|
|
878
|
+
return () => clearInterval(d);
|
|
879
879
|
}
|
|
880
|
-
}, [e,
|
|
881
|
-
const [
|
|
882
|
-
|
|
880
|
+
}, [e, u, s]);
|
|
881
|
+
const [v, f] = $(!1);
|
|
882
|
+
R(() => {
|
|
883
883
|
if (s >= 100) {
|
|
884
|
-
const
|
|
885
|
-
|
|
884
|
+
const d = setTimeout(() => {
|
|
885
|
+
f(!1);
|
|
886
886
|
}, n);
|
|
887
887
|
return () => {
|
|
888
|
-
clearTimeout(
|
|
888
|
+
clearTimeout(d);
|
|
889
889
|
};
|
|
890
890
|
} else
|
|
891
|
-
|
|
891
|
+
f(!0);
|
|
892
892
|
}, [s, n]);
|
|
893
|
-
const
|
|
894
|
-
className:
|
|
893
|
+
const i = Rt({
|
|
894
|
+
className: l,
|
|
895
895
|
variant: e,
|
|
896
896
|
value: t,
|
|
897
897
|
transitionDuration: n,
|
|
898
|
-
isVisible:
|
|
898
|
+
isVisible: v
|
|
899
899
|
});
|
|
900
|
-
return /* @__PURE__ */
|
|
901
|
-
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ Y(me, { children: [
|
|
901
|
+
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className: i.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: i.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: i.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: i.stop
|
|
930
930
|
}
|
|
931
931
|
)
|
|
932
932
|
] }),
|
|
@@ -940,46 +940,46 @@ const qe = ({
|
|
|
940
940
|
animate: { rotate: 270 },
|
|
941
941
|
transition: {
|
|
942
942
|
repeat: 1 / 0,
|
|
943
|
-
duration:
|
|
943
|
+
duration: p(),
|
|
944
944
|
ease: "linear"
|
|
945
945
|
},
|
|
946
|
-
className:
|
|
946
|
+
className: i.progressIndicator,
|
|
947
947
|
...r,
|
|
948
948
|
children: /* @__PURE__ */ m(
|
|
949
949
|
q.circle,
|
|
950
950
|
{
|
|
951
951
|
cx: "50%",
|
|
952
952
|
cy: "50%",
|
|
953
|
-
r:
|
|
953
|
+
r: v ? "calc(50% - 2px)" : "50%",
|
|
954
954
|
style: {
|
|
955
955
|
strokeLinecap: "round"
|
|
956
956
|
},
|
|
957
957
|
initial: "hidden",
|
|
958
958
|
animate: "visible",
|
|
959
|
-
className:
|
|
959
|
+
className: i.activeIndicator,
|
|
960
960
|
variants: {
|
|
961
961
|
hidden: {
|
|
962
|
-
pathLength:
|
|
962
|
+
pathLength: u ? 10 / 100 : 90 / 100
|
|
963
963
|
},
|
|
964
964
|
visible: {
|
|
965
|
-
pathLength:
|
|
965
|
+
pathLength: u ? 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: p(),
|
|
973
973
|
bounce: 0
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
)
|
|
978
978
|
},
|
|
979
|
-
|
|
979
|
+
u + ""
|
|
980
980
|
)
|
|
981
981
|
] });
|
|
982
|
-
},
|
|
982
|
+
}, Yt = ({
|
|
983
983
|
colorName: e = "on-surface",
|
|
984
984
|
triggerRef: t
|
|
985
985
|
}) => {
|
|
@@ -1002,43 +1002,43 @@ const qe = ({
|
|
|
1002
1002
|
duration: 0.3
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
}, [
|
|
1006
|
-
|
|
1005
|
+
}, [l, r] = $(!0), [s, c] = $(!1), [a, u] = $({ x: 50, y: 50 });
|
|
1006
|
+
R(() => {
|
|
1007
1007
|
s && (r(!0), r(!1));
|
|
1008
|
-
}, [s]),
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1011
|
-
return
|
|
1012
|
-
|
|
1008
|
+
}, [s]), R(() => {
|
|
1009
|
+
const d = t == null ? void 0 : t.current;
|
|
1010
|
+
if (d)
|
|
1011
|
+
return d.addEventListener("mousedown", o), d.addEventListener("mouseup", v), d.addEventListener("mouseleave", p), () => {
|
|
1012
|
+
d.removeEventListener("mousedown", o), d.removeEventListener("mouseup", v), d.removeEventListener("mouseleave", p);
|
|
1013
1013
|
};
|
|
1014
1014
|
}, [t]);
|
|
1015
|
-
const o = (
|
|
1016
|
-
const
|
|
1017
|
-
c(!0),
|
|
1018
|
-
x: (
|
|
1019
|
-
y: (
|
|
1015
|
+
const o = (d) => {
|
|
1016
|
+
const h = t == null ? void 0 : t.current, w = h.getBoundingClientRect();
|
|
1017
|
+
c(!0), u({
|
|
1018
|
+
x: (d.clientX - w.left) / h.clientWidth * 100,
|
|
1019
|
+
y: (d.clientY - w.top) / h.clientHeight * 100
|
|
1020
1020
|
});
|
|
1021
|
-
},
|
|
1021
|
+
}, p = (d) => {
|
|
1022
1022
|
c(!1);
|
|
1023
|
-
},
|
|
1023
|
+
}, v = (d) => {
|
|
1024
1024
|
c(!1);
|
|
1025
|
-
},
|
|
1025
|
+
}, f = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, i = {
|
|
1026
1026
|
position: "absolute",
|
|
1027
1027
|
inset: 0,
|
|
1028
1028
|
width: "100%",
|
|
1029
1029
|
height: "100%",
|
|
1030
1030
|
// supply CSS variables for gradient center and radius
|
|
1031
|
-
"--x":
|
|
1032
|
-
"--y":
|
|
1031
|
+
"--x": a.x + "%",
|
|
1032
|
+
"--y": a.y + "%",
|
|
1033
1033
|
"--r": "0%",
|
|
1034
1034
|
// will be animated by motion
|
|
1035
|
-
background: `radial-gradient(ellipse at var(--x) var(--y), ${
|
|
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 && !l) && /* @__PURE__ */ m(
|
|
1039
1039
|
q.div,
|
|
1040
1040
|
{
|
|
1041
|
-
style:
|
|
1041
|
+
style: i,
|
|
1042
1042
|
variants: n,
|
|
1043
1043
|
initial: "initial",
|
|
1044
1044
|
animate: "animate",
|
|
@@ -1049,7 +1049,7 @@ const qe = ({
|
|
|
1049
1049
|
}, Ut = Q(
|
|
1050
1050
|
"customScroll",
|
|
1051
1051
|
({ orientation: e, draggable: t, isDragging: n }) => ({
|
|
1052
|
-
customScroll:
|
|
1052
|
+
customScroll: y(
|
|
1053
1053
|
"flex h-full w-full",
|
|
1054
1054
|
t && [
|
|
1055
1055
|
"[&::-webkit-scrollbar-track]:rounded-full",
|
|
@@ -1069,23 +1069,23 @@ const qe = ({
|
|
|
1069
1069
|
"cursor-grabbing": t && n
|
|
1070
1070
|
}
|
|
1071
1071
|
),
|
|
1072
|
-
track:
|
|
1072
|
+
track: y("overflow-hidden flex-none sticky", {
|
|
1073
1073
|
"left-0 h-full": e === "horizontal",
|
|
1074
1074
|
"top-0 w-full": e === "vertical"
|
|
1075
1075
|
})
|
|
1076
1076
|
})
|
|
1077
1077
|
);
|
|
1078
|
-
function
|
|
1079
|
-
let n = 0,
|
|
1080
|
-
const s = (c,
|
|
1081
|
-
n = Date.now(), t(c,
|
|
1078
|
+
function Xt(e, t) {
|
|
1079
|
+
let n = 0, l = null, r = null;
|
|
1080
|
+
const s = (c, a) => {
|
|
1081
|
+
n = Date.now(), t(c, a);
|
|
1082
1082
|
};
|
|
1083
|
-
return (c,
|
|
1084
|
-
const
|
|
1085
|
-
o <= 0 ? (
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
r = null,
|
|
1083
|
+
return (c, a) => {
|
|
1084
|
+
const u = Date.now(), o = e - (u - n);
|
|
1085
|
+
o <= 0 ? (l && (clearTimeout(l), l = null), s(c, a)) : (r = { v: c, o: a }, l || (l = setTimeout(() => {
|
|
1086
|
+
l = null;
|
|
1087
|
+
const p = r;
|
|
1088
|
+
r = null, p && s(p.v, p.o);
|
|
1089
1089
|
}, o)));
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
@@ -1093,25 +1093,25 @@ const jt = ({
|
|
|
1093
1093
|
children: e,
|
|
1094
1094
|
orientation: t = "vertical",
|
|
1095
1095
|
scrollSize: n,
|
|
1096
|
-
onScroll:
|
|
1096
|
+
onScroll: l,
|
|
1097
1097
|
className: r,
|
|
1098
1098
|
draggable: s = !1,
|
|
1099
1099
|
throttleDuration: c = 75,
|
|
1100
|
-
scroll:
|
|
1101
|
-
setScroll:
|
|
1100
|
+
scroll: a,
|
|
1101
|
+
setScroll: u
|
|
1102
1102
|
}) => {
|
|
1103
|
-
var
|
|
1104
|
-
const o =
|
|
1103
|
+
var le, ue;
|
|
1104
|
+
const o = W(null), p = W(null), [v, f] = $({
|
|
1105
1105
|
width: null,
|
|
1106
1106
|
height: null
|
|
1107
1107
|
});
|
|
1108
|
-
|
|
1108
|
+
R(() => {
|
|
1109
1109
|
if (!o.current) return;
|
|
1110
|
-
const C = new ResizeObserver((
|
|
1111
|
-
for (const
|
|
1112
|
-
|
|
1113
|
-
width:
|
|
1114
|
-
height:
|
|
1110
|
+
const C = new ResizeObserver((N) => {
|
|
1111
|
+
for (const D of N)
|
|
1112
|
+
D.target === o.current && f({
|
|
1113
|
+
width: D.contentRect.width,
|
|
1114
|
+
height: D.contentRect.height
|
|
1115
1115
|
// On observe aussi la hauteur maintenant
|
|
1116
1116
|
});
|
|
1117
1117
|
});
|
|
@@ -1119,138 +1119,138 @@ const jt = ({
|
|
|
1119
1119
|
C.disconnect();
|
|
1120
1120
|
};
|
|
1121
1121
|
}, [o]);
|
|
1122
|
-
const
|
|
1123
|
-
const C =
|
|
1122
|
+
const i = W(null), d = W(null), h = () => {
|
|
1123
|
+
const C = p.current;
|
|
1124
1124
|
return C ? {
|
|
1125
1125
|
width: n ?? C.scrollWidth,
|
|
1126
1126
|
height: n ?? C.scrollHeight
|
|
1127
1127
|
} : null;
|
|
1128
|
-
},
|
|
1128
|
+
}, w = () => {
|
|
1129
1129
|
const C = o.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:
|
|
1135
|
+
}, { scrollYProgress: b, scrollXProgress: g } = mt({
|
|
1136
1136
|
container: o
|
|
1137
|
-
}),
|
|
1138
|
-
|
|
1137
|
+
}), I = W(null);
|
|
1138
|
+
I.current || (I.current = Xt(
|
|
1139
1139
|
c,
|
|
1140
|
-
(C,
|
|
1141
|
-
!
|
|
1140
|
+
(C, N) => {
|
|
1141
|
+
!d.current || !i.current || !o.current || (N === (t === "horizontal" ? "x" : "y") && (u == null || u(C)), l && (t === "horizontal" && N === "x" && l({
|
|
1142
1142
|
scrollProgress: C,
|
|
1143
|
-
scroll: C * (
|
|
1144
|
-
scrollTotal:
|
|
1145
|
-
scrollVisible:
|
|
1146
|
-
}), t === "vertical" &&
|
|
1143
|
+
scroll: C * (i.current.width - o.current.clientWidth),
|
|
1144
|
+
scrollTotal: i.current.width - o.current.clientWidth,
|
|
1145
|
+
scrollVisible: d.current.width
|
|
1146
|
+
}), t === "vertical" && N === "y" && l({
|
|
1147
1147
|
scrollProgress: C,
|
|
1148
|
-
scroll: C * (
|
|
1149
|
-
scrollTotal:
|
|
1150
|
-
scrollVisible:
|
|
1148
|
+
scroll: C * (i.current.height - o.current.clientHeight),
|
|
1149
|
+
scrollTotal: i.current.height - o.current.clientHeight,
|
|
1150
|
+
scrollVisible: d.current.height
|
|
1151
1151
|
})));
|
|
1152
1152
|
}
|
|
1153
1153
|
));
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1154
|
+
const E = (C, N) => {
|
|
1155
|
+
I.current && I.current(C, N);
|
|
1156
1156
|
};
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}, [
|
|
1160
|
-
const C = o.current,
|
|
1161
|
-
if (!C || !
|
|
1162
|
-
const
|
|
1157
|
+
R(() => {
|
|
1158
|
+
v.width && E(g.get(), "x"), v.height && E(b.get(), "y");
|
|
1159
|
+
}, [v]), R(() => {
|
|
1160
|
+
const C = o.current, N = p.current;
|
|
1161
|
+
if (!C || !N || typeof a != "number") return;
|
|
1162
|
+
const D = (F, j, X) => Math.min(X, Math.max(j, F));
|
|
1163
1163
|
if (t === "horizontal") {
|
|
1164
|
-
const
|
|
1165
|
-
C.scrollLeft =
|
|
1164
|
+
const F = Math.max(0, (n ?? N.scrollWidth) - C.clientWidth);
|
|
1165
|
+
C.scrollLeft = D(a * F, 0, F);
|
|
1166
1166
|
} else {
|
|
1167
|
-
const
|
|
1168
|
-
C.scrollTop =
|
|
1167
|
+
const F = Math.max(0, (n ?? N.scrollHeight) - C.clientHeight);
|
|
1168
|
+
C.scrollTop = D(a * F, 0, F);
|
|
1169
1169
|
}
|
|
1170
|
-
}, [
|
|
1171
|
-
|
|
1172
|
-
}),
|
|
1173
|
-
|
|
1170
|
+
}, [a, t, n]), De(g, "change", (C) => {
|
|
1171
|
+
E(C, "x");
|
|
1172
|
+
}), De(b, "change", (C) => {
|
|
1173
|
+
E(C, "y");
|
|
1174
1174
|
});
|
|
1175
|
-
const [A,
|
|
1176
|
-
|
|
1177
|
-
A || !
|
|
1175
|
+
const [A, L] = $(!1);
|
|
1176
|
+
Ye(() => {
|
|
1177
|
+
A || !d.current || !i.current || !l || (l({
|
|
1178
1178
|
scrollProgress: 0,
|
|
1179
1179
|
scroll: 0,
|
|
1180
|
-
scrollTotal: t == "vertical" ?
|
|
1181
|
-
scrollVisible: t == "vertical" ?
|
|
1182
|
-
}),
|
|
1183
|
-
}, [
|
|
1184
|
-
const [
|
|
1185
|
-
isDragging:
|
|
1180
|
+
scrollTotal: t == "vertical" ? i.current.height : i.current.width,
|
|
1181
|
+
scrollVisible: t == "vertical" ? d.current.height : d.current.width
|
|
1182
|
+
}), L(!0));
|
|
1183
|
+
}, [d, i, l]), i.current = h(), d.current = w();
|
|
1184
|
+
const [V, H] = $(!1), M = Ut({
|
|
1185
|
+
isDragging: V,
|
|
1186
1186
|
children: e,
|
|
1187
1187
|
className: r,
|
|
1188
|
-
onScroll:
|
|
1188
|
+
onScroll: l,
|
|
1189
1189
|
orientation: t,
|
|
1190
1190
|
scrollSize: n,
|
|
1191
1191
|
draggable: s,
|
|
1192
1192
|
throttleDuration: c
|
|
1193
|
-
}), [x, S] =
|
|
1193
|
+
}), [x, S] = $(0), [O, G] = $(0), te = (C) => {
|
|
1194
1194
|
if (!s) return;
|
|
1195
|
-
const
|
|
1196
|
-
if (!
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1195
|
+
const N = o.current;
|
|
1196
|
+
if (!N || x == null) return;
|
|
1197
|
+
const F = (C.pageX - N.offsetLeft - x) * 1.5;
|
|
1198
|
+
N.scrollLeft = O - F;
|
|
1199
1199
|
}, _ = (C) => {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1200
|
+
const N = o.current;
|
|
1201
|
+
N && (H(!0), S(C.pageX - N.offsetLeft), G(N.scrollLeft));
|
|
1202
1202
|
}, ne = (C) => {
|
|
1203
|
-
|
|
1203
|
+
V && (C.preventDefault(), te(C));
|
|
1204
1204
|
}, B = () => {
|
|
1205
|
-
|
|
1205
|
+
H(!1);
|
|
1206
1206
|
}, k = () => {
|
|
1207
|
-
|
|
1207
|
+
H(!1);
|
|
1208
1208
|
}, U = (C) => {
|
|
1209
1209
|
C.preventDefault();
|
|
1210
|
-
}, K =
|
|
1211
|
-
return
|
|
1210
|
+
}, K = W(null);
|
|
1211
|
+
return R(() => () => {
|
|
1212
1212
|
K.current && clearTimeout(K.current);
|
|
1213
|
-
}, []),
|
|
1213
|
+
}, []), R(() => {
|
|
1214
1214
|
const C = o.current;
|
|
1215
1215
|
if (!C) return;
|
|
1216
|
-
const
|
|
1217
|
-
var re,
|
|
1218
|
-
const
|
|
1219
|
-
if (!j || !
|
|
1220
|
-
const
|
|
1221
|
-
if (typeof
|
|
1222
|
-
if (
|
|
1216
|
+
const N = (D) => {
|
|
1217
|
+
var re, ae, de, ce;
|
|
1218
|
+
const F = D.detail, j = o.current;
|
|
1219
|
+
if (!j || !F) return;
|
|
1220
|
+
const X = F.orientation ?? t;
|
|
1221
|
+
if (typeof F.progress == "number")
|
|
1222
|
+
if (X === "horizontal") {
|
|
1223
1223
|
const oe = Math.max(
|
|
1224
1224
|
0,
|
|
1225
|
-
(((re =
|
|
1225
|
+
(((re = i.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, F.progress * oe));
|
|
1228
1228
|
} else {
|
|
1229
1229
|
const oe = Math.max(
|
|
1230
1230
|
0,
|
|
1231
|
-
(((
|
|
1231
|
+
(((ae = i.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, F.progress * oe));
|
|
1234
1234
|
}
|
|
1235
|
-
else if (typeof
|
|
1236
|
-
if (
|
|
1235
|
+
else if (typeof F.scroll == "number")
|
|
1236
|
+
if (X === "horizontal") {
|
|
1237
1237
|
const oe = Math.max(
|
|
1238
1238
|
0,
|
|
1239
|
-
(((de =
|
|
1239
|
+
(((de = i.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, F.scroll));
|
|
1242
1242
|
} else {
|
|
1243
1243
|
const oe = Math.max(
|
|
1244
1244
|
0,
|
|
1245
|
-
(((ce =
|
|
1245
|
+
(((ce = i.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, F.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", N), () => {
|
|
1251
|
+
C.removeEventListener("udx:customScroll:set", N);
|
|
1252
1252
|
};
|
|
1253
|
-
}, [t]), /* @__PURE__ */
|
|
1253
|
+
}, [t]), /* @__PURE__ */ Y(
|
|
1254
1254
|
"div",
|
|
1255
1255
|
{
|
|
1256
1256
|
className: M.customScroll,
|
|
@@ -1261,36 +1261,36 @@ const jt = ({
|
|
|
1261
1261
|
onMouseLeave: k,
|
|
1262
1262
|
onDragStart: U,
|
|
1263
1263
|
onScroll: (C) => {
|
|
1264
|
-
|
|
1265
|
-
|
|
1264
|
+
V || (S(null), H(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
1265
|
+
H(!1);
|
|
1266
1266
|
}, 1e3));
|
|
1267
1267
|
},
|
|
1268
1268
|
children: [
|
|
1269
1269
|
/* @__PURE__ */ m(
|
|
1270
1270
|
"div",
|
|
1271
1271
|
{
|
|
1272
|
-
ref:
|
|
1273
|
-
style: t === "vertical" ? { height: ((
|
|
1272
|
+
ref: p,
|
|
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
1274
|
className: M.track,
|
|
1275
1275
|
children: e
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
|
-
|
|
1279
|
-
t === "vertical" &&
|
|
1278
|
+
d.current && i.current && /* @__PURE__ */ Y(me, { children: [
|
|
1279
|
+
t === "vertical" && i.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: i.current.height - d.current.height
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
1287
|
),
|
|
1288
|
-
t === "horizontal" &&
|
|
1288
|
+
t === "horizontal" && i.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: i.current.width - d.current.width
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
)
|
|
@@ -1303,83 +1303,103 @@ const jt = ({
|
|
|
1303
1303
|
el: t,
|
|
1304
1304
|
touch: n = !0
|
|
1305
1305
|
}) => {
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1306
|
+
const l = W(null), r = W(0), s = W(0);
|
|
1307
|
+
R(() => {
|
|
1308
1308
|
if (!t) return;
|
|
1309
1309
|
r.current = t.scrollTop, s.current = t.scrollLeft;
|
|
1310
|
-
const c = (
|
|
1311
|
-
e == null || e(
|
|
1312
|
-
},
|
|
1313
|
-
|
|
1310
|
+
const c = (i) => {
|
|
1311
|
+
e == null || e(i);
|
|
1312
|
+
}, a = (i) => {
|
|
1313
|
+
let d = i;
|
|
1314
|
+
for (; d && d !== document.body && d !== document.documentElement; ) {
|
|
1315
|
+
const h = window.getComputedStyle(d), w = h.overflowY || h.overflow;
|
|
1316
|
+
if ((w === "auto" || w === "scroll") && d.scrollHeight > d.clientHeight) return d;
|
|
1317
|
+
d = d.parentElement;
|
|
1318
|
+
}
|
|
1319
|
+
return null;
|
|
1320
|
+
}, u = (i) => {
|
|
1321
|
+
const d = i.target, h = a(d);
|
|
1322
|
+
if (h && h !== t) {
|
|
1323
|
+
const w = h.scrollTop < h.scrollHeight - h.clientHeight, b = h.scrollTop > 0;
|
|
1324
|
+
if (i.deltaY > 0 && w || i.deltaY < 0 && b)
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
i.preventDefault(), c({
|
|
1314
1328
|
type: "intent",
|
|
1315
1329
|
source: "wheel",
|
|
1316
|
-
deltaX:
|
|
1317
|
-
deltaY:
|
|
1318
|
-
originalEvent:
|
|
1330
|
+
deltaX: i.deltaX,
|
|
1331
|
+
deltaY: i.deltaY,
|
|
1332
|
+
originalEvent: i
|
|
1319
1333
|
});
|
|
1320
|
-
},
|
|
1334
|
+
}, o = (i) => {
|
|
1321
1335
|
if (!n) return;
|
|
1322
|
-
const d =
|
|
1323
|
-
d && (
|
|
1324
|
-
},
|
|
1336
|
+
const d = i.touches[0];
|
|
1337
|
+
d && (l.current = { x: d.clientX, y: d.clientY });
|
|
1338
|
+
}, p = (i) => {
|
|
1325
1339
|
if (!n) return;
|
|
1326
|
-
const d =
|
|
1327
|
-
if (!d || !
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1340
|
+
const d = i.touches[0];
|
|
1341
|
+
if (!d || !l.current) return;
|
|
1342
|
+
const h = l.current.x - d.clientX, w = l.current.y - d.clientY, b = i.target, g = a(b);
|
|
1343
|
+
if (g && g !== t) {
|
|
1344
|
+
const I = g.scrollTop < g.scrollHeight - g.clientHeight, E = g.scrollTop > 0;
|
|
1345
|
+
if (w > 0 && I || w < 0 && E) {
|
|
1346
|
+
l.current = { x: d.clientX, y: d.clientY };
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
i.preventDefault(), l.current = { x: d.clientX, y: d.clientY }, c({
|
|
1331
1351
|
type: "intent",
|
|
1332
1352
|
source: "touch",
|
|
1333
|
-
deltaX:
|
|
1334
|
-
deltaY:
|
|
1335
|
-
originalEvent:
|
|
1353
|
+
deltaX: h,
|
|
1354
|
+
deltaY: w,
|
|
1355
|
+
originalEvent: i
|
|
1336
1356
|
});
|
|
1337
|
-
},
|
|
1338
|
-
n && (
|
|
1339
|
-
},
|
|
1340
|
-
const
|
|
1341
|
-
let
|
|
1342
|
-
switch (
|
|
1357
|
+
}, v = () => {
|
|
1358
|
+
n && (l.current = null);
|
|
1359
|
+
}, f = (i) => {
|
|
1360
|
+
const h = t.clientHeight * 0.9;
|
|
1361
|
+
let w = 0, b = 0;
|
|
1362
|
+
switch (i.key) {
|
|
1343
1363
|
case "ArrowDown":
|
|
1344
|
-
|
|
1364
|
+
b = 40;
|
|
1345
1365
|
break;
|
|
1346
1366
|
case "ArrowUp":
|
|
1347
|
-
|
|
1367
|
+
b = -40;
|
|
1348
1368
|
break;
|
|
1349
1369
|
case "ArrowRight":
|
|
1350
|
-
|
|
1370
|
+
w = 40;
|
|
1351
1371
|
break;
|
|
1352
1372
|
case "ArrowLeft":
|
|
1353
|
-
|
|
1373
|
+
w = -40;
|
|
1354
1374
|
break;
|
|
1355
1375
|
case "PageDown":
|
|
1356
|
-
|
|
1376
|
+
b = h;
|
|
1357
1377
|
break;
|
|
1358
1378
|
case "PageUp":
|
|
1359
|
-
|
|
1379
|
+
b = -h;
|
|
1360
1380
|
break;
|
|
1361
1381
|
case "Home":
|
|
1362
|
-
|
|
1382
|
+
b = Number.NEGATIVE_INFINITY;
|
|
1363
1383
|
break;
|
|
1364
1384
|
case "End":
|
|
1365
|
-
|
|
1385
|
+
b = Number.POSITIVE_INFINITY;
|
|
1366
1386
|
break;
|
|
1367
1387
|
case " ":
|
|
1368
|
-
|
|
1388
|
+
b = i.shiftKey ? -h : h;
|
|
1369
1389
|
break;
|
|
1370
1390
|
default:
|
|
1371
1391
|
return;
|
|
1372
1392
|
}
|
|
1373
|
-
|
|
1393
|
+
i.preventDefault(), c({
|
|
1374
1394
|
type: "intent",
|
|
1375
1395
|
source: "keyboard",
|
|
1376
|
-
deltaX:
|
|
1377
|
-
deltaY:
|
|
1378
|
-
originalEvent:
|
|
1396
|
+
deltaX: w,
|
|
1397
|
+
deltaY: b,
|
|
1398
|
+
originalEvent: i
|
|
1379
1399
|
});
|
|
1380
1400
|
};
|
|
1381
|
-
return t.addEventListener("wheel",
|
|
1382
|
-
t.removeEventListener("wheel",
|
|
1401
|
+
return t.addEventListener("wheel", u, { passive: !1 }), t.addEventListener("touchstart", o, { passive: !0 }), t.addEventListener("touchmove", p, { passive: !1 }), t.addEventListener("touchend", v, { passive: !0 }), t.addEventListener("keydown", f), () => {
|
|
1402
|
+
t.removeEventListener("wheel", u), t.removeEventListener("touchstart", o), t.removeEventListener("touchmove", p), t.removeEventListener("touchend", v), t.removeEventListener("keydown", f);
|
|
1383
1403
|
};
|
|
1384
1404
|
}, [e]);
|
|
1385
1405
|
}, Kn = ({
|
|
@@ -1387,52 +1407,52 @@ const jt = ({
|
|
|
1387
1407
|
orientation: t = "vertical",
|
|
1388
1408
|
throttleDuration: n = 25
|
|
1389
1409
|
}) => {
|
|
1390
|
-
const [
|
|
1391
|
-
|
|
1410
|
+
const [l, r] = $(0), [s, c] = $(), a = W(!1), u = W(), o = W(0);
|
|
1411
|
+
R(() => {
|
|
1392
1412
|
c(document);
|
|
1393
|
-
const
|
|
1394
|
-
r(
|
|
1395
|
-
}, []),
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1413
|
+
const f = document.documentElement.scrollTop;
|
|
1414
|
+
r(f), o.current = f;
|
|
1415
|
+
}, []), R(() => {
|
|
1416
|
+
const f = () => {
|
|
1417
|
+
a.current || r(document.documentElement.scrollTop);
|
|
1398
1418
|
};
|
|
1399
|
-
return s == null || s.addEventListener("scroll",
|
|
1400
|
-
|
|
1419
|
+
return s == null || s.addEventListener("scroll", f), () => {
|
|
1420
|
+
u.current && clearTimeout(u.current), s == null || s.removeEventListener("scroll", f);
|
|
1401
1421
|
};
|
|
1402
1422
|
}, [s]);
|
|
1403
|
-
const
|
|
1404
|
-
return
|
|
1405
|
-
const
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1423
|
+
const p = W(), v = W(null);
|
|
1424
|
+
return R(() => {
|
|
1425
|
+
const f = l;
|
|
1426
|
+
if (v.current && (v.current.stop(), v.current = null), !a.current) {
|
|
1427
|
+
p.current = f;
|
|
1408
1428
|
return;
|
|
1409
1429
|
}
|
|
1410
|
-
return
|
|
1430
|
+
return v.current = pt(p.current ?? f, f, {
|
|
1411
1431
|
duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
|
|
1412
1432
|
ease: (e == null ? void 0 : e.ease) ?? "easeOut",
|
|
1413
|
-
onUpdate: (
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
Math.abs(
|
|
1433
|
+
onUpdate: (i) => {
|
|
1434
|
+
u.current && clearTimeout(u.current), p.current = i;
|
|
1435
|
+
const d = document.documentElement, h = Math.round(i * 1e3) / 1e3, w = o.current;
|
|
1436
|
+
Math.abs(h - w) < 0.1 || (o.current = h, a.current && d.scrollTo({ top: h }));
|
|
1417
1437
|
},
|
|
1418
1438
|
onComplete: () => {
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
}, 300),
|
|
1439
|
+
u.current = setTimeout(() => {
|
|
1440
|
+
a.current = !1;
|
|
1441
|
+
}, 300), v.current = null;
|
|
1422
1442
|
}
|
|
1423
1443
|
}), () => {
|
|
1424
|
-
|
|
1444
|
+
v.current && (v.current.stop(), v.current = null);
|
|
1425
1445
|
};
|
|
1426
|
-
}, [
|
|
1446
|
+
}, [l]), s ? /* @__PURE__ */ m(
|
|
1427
1447
|
qt,
|
|
1428
1448
|
{
|
|
1429
1449
|
touch: !1,
|
|
1430
1450
|
el: s,
|
|
1431
|
-
onScroll: (
|
|
1432
|
-
if ("deltaY" in
|
|
1433
|
-
let
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1451
|
+
onScroll: (f) => {
|
|
1452
|
+
if ("deltaY" in f && f.deltaY !== 0 && s && l !== null) {
|
|
1453
|
+
let i = l + f.deltaY;
|
|
1454
|
+
const d = s.querySelector("html");
|
|
1455
|
+
d && (i = Math.min(i, d.scrollHeight - d.clientHeight)), i = Math.max(i, 0), r(i), a.current = !0;
|
|
1436
1456
|
}
|
|
1437
1457
|
}
|
|
1438
1458
|
}
|
|
@@ -1441,39 +1461,39 @@ const jt = ({
|
|
|
1441
1461
|
style: e,
|
|
1442
1462
|
colorName: t,
|
|
1443
1463
|
stateClassName: n = "state-ripple-group",
|
|
1444
|
-
className:
|
|
1464
|
+
className: l
|
|
1445
1465
|
}) => {
|
|
1446
|
-
const r =
|
|
1466
|
+
const r = W(null), s = W(null), [c, a] = $(!1), u = Kt({
|
|
1447
1467
|
isClient: c,
|
|
1448
1468
|
stateClassName: n,
|
|
1449
|
-
className:
|
|
1469
|
+
className: l,
|
|
1450
1470
|
colorName: t
|
|
1451
1471
|
});
|
|
1452
|
-
return
|
|
1472
|
+
return R(() => {
|
|
1453
1473
|
if (r.current && n !== "state-layer") {
|
|
1454
|
-
const o = n.includes("[") ? n.split("[")[1].split("]")[0] : "group",
|
|
1474
|
+
const o = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", p = r.current.closest(
|
|
1455
1475
|
`.${o}:not(.${o} .${o})`
|
|
1456
1476
|
);
|
|
1457
|
-
s.current =
|
|
1477
|
+
s.current = p;
|
|
1458
1478
|
}
|
|
1459
|
-
|
|
1479
|
+
a(!0);
|
|
1460
1480
|
}, []), /* @__PURE__ */ m(
|
|
1461
1481
|
"div",
|
|
1462
1482
|
{
|
|
1463
1483
|
ref: r,
|
|
1464
|
-
className:
|
|
1484
|
+
className: u.stateLayer,
|
|
1465
1485
|
style: {
|
|
1466
1486
|
"--state-color": `var(--default-color, var(--color-${t}))`,
|
|
1467
1487
|
...e
|
|
1468
1488
|
},
|
|
1469
|
-
children: c && /* @__PURE__ */ m(
|
|
1489
|
+
children: c && /* @__PURE__ */ m(Yt, { triggerRef: s })
|
|
1470
1490
|
}
|
|
1471
1491
|
);
|
|
1472
1492
|
}, _t = ({
|
|
1473
1493
|
isClient: e,
|
|
1474
1494
|
stateClassName: t
|
|
1475
1495
|
}) => ({
|
|
1476
|
-
stateLayer:
|
|
1496
|
+
stateLayer: y([
|
|
1477
1497
|
t,
|
|
1478
1498
|
"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"
|
|
1479
1499
|
])
|
|
@@ -1484,28 +1504,28 @@ const jt = ({
|
|
|
1484
1504
|
targetRef: e,
|
|
1485
1505
|
children: t
|
|
1486
1506
|
}) => {
|
|
1487
|
-
const [n,
|
|
1507
|
+
const [n, l] = $(null), r = W(null), s = () => {
|
|
1488
1508
|
const c = e.current;
|
|
1489
1509
|
if (!c) return;
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1510
|
+
const a = c.getBoundingClientRect();
|
|
1511
|
+
l({
|
|
1492
1512
|
position: "fixed",
|
|
1493
|
-
top:
|
|
1494
|
-
left:
|
|
1495
|
-
width:
|
|
1496
|
-
height:
|
|
1513
|
+
top: a.top,
|
|
1514
|
+
left: a.left,
|
|
1515
|
+
width: a.width,
|
|
1516
|
+
height: a.height,
|
|
1497
1517
|
pointerEvents: "none",
|
|
1498
1518
|
// si le wrapper ne doit pas capter les events
|
|
1499
1519
|
zIndex: 999
|
|
1500
1520
|
// personnalise si besoin
|
|
1501
1521
|
});
|
|
1502
1522
|
};
|
|
1503
|
-
return
|
|
1523
|
+
return R(() => {
|
|
1504
1524
|
const c = e.current;
|
|
1505
1525
|
if (c)
|
|
1506
1526
|
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), r.current = new ResizeObserver(s), r.current.observe(c), () => {
|
|
1507
|
-
var
|
|
1508
|
-
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (
|
|
1527
|
+
var a;
|
|
1528
|
+
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (a = r.current) == null || a.disconnect();
|
|
1509
1529
|
};
|
|
1510
1530
|
}, [e]), n ? Ue(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
|
|
1511
1531
|
};
|
|
@@ -1517,49 +1537,49 @@ const Gn = ({
|
|
|
1517
1537
|
throttleDelay: t = 100,
|
|
1518
1538
|
// Délai par défaut de 300ms
|
|
1519
1539
|
onLoad: n,
|
|
1520
|
-
loadTheme:
|
|
1540
|
+
loadTheme: l = !1
|
|
1521
1541
|
}) => {
|
|
1522
|
-
const [r, s] =
|
|
1523
|
-
|
|
1542
|
+
const [r, s] = $(null);
|
|
1543
|
+
R(() => {
|
|
1524
1544
|
(async () => {
|
|
1525
|
-
const
|
|
1526
|
-
s(
|
|
1545
|
+
const f = await yt(e, l);
|
|
1546
|
+
s(f);
|
|
1527
1547
|
})();
|
|
1528
1548
|
}, []);
|
|
1529
|
-
const [c,
|
|
1530
|
-
|
|
1549
|
+
const [c, a] = $(null), u = W(null), o = W(0), p = W(null);
|
|
1550
|
+
R(() => {
|
|
1531
1551
|
if (!r) return;
|
|
1532
|
-
const
|
|
1552
|
+
const f = {
|
|
1533
1553
|
...e,
|
|
1534
1554
|
// Assurer la compatibilité avec l'API qui attend sourceColorHex
|
|
1535
1555
|
sourceColor: e.sourceColor
|
|
1536
|
-
},
|
|
1537
|
-
await w
|
|
1556
|
+
}, i = Date.now(), d = i - o.current, h = async (w) => {
|
|
1557
|
+
await v(w);
|
|
1538
1558
|
};
|
|
1539
|
-
if (o.current === 0 ||
|
|
1540
|
-
|
|
1541
|
-
else if (
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1547
|
-
},
|
|
1559
|
+
if (o.current === 0 || d >= t)
|
|
1560
|
+
u.current && (clearTimeout(u.current), u.current = null), p.current = null, o.current = i, h(f);
|
|
1561
|
+
else if (p.current = f, !u.current) {
|
|
1562
|
+
const w = Math.max(0, t - d);
|
|
1563
|
+
u.current = setTimeout(async () => {
|
|
1564
|
+
u.current = null;
|
|
1565
|
+
const b = p.current;
|
|
1566
|
+
p.current = null, b && (o.current = Date.now(), await h(b));
|
|
1567
|
+
}, w);
|
|
1548
1568
|
}
|
|
1549
1569
|
return () => {
|
|
1550
1570
|
};
|
|
1551
1571
|
}, [e, t, r]);
|
|
1552
|
-
const
|
|
1553
|
-
if (typeof
|
|
1572
|
+
const v = async (f) => {
|
|
1573
|
+
if (typeof f.sourceColor == "string" && !Jt(f.sourceColor))
|
|
1554
1574
|
throw new Error("Invalid hex color");
|
|
1555
1575
|
if (!r)
|
|
1556
1576
|
return;
|
|
1557
|
-
r.context.update(
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1577
|
+
r.context.update(f), await r.load();
|
|
1578
|
+
const i = r == null ? void 0 : r.plugins.getPlugin(Xe).getInstance().outputCss;
|
|
1579
|
+
a(i), n == null || n(r);
|
|
1560
1580
|
};
|
|
1561
|
-
return
|
|
1562
|
-
|
|
1581
|
+
return R(() => () => {
|
|
1582
|
+
u.current && (clearTimeout(u.current), u.current = null);
|
|
1563
1583
|
}, []), c ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
|
|
1564
1584
|
};
|
|
1565
1585
|
function Zt() {
|
|
@@ -1575,28 +1595,28 @@ function Zt() {
|
|
|
1575
1595
|
function Qt() {
|
|
1576
1596
|
return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1577
1597
|
}
|
|
1578
|
-
function
|
|
1598
|
+
function Be(e) {
|
|
1579
1599
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1580
1600
|
const t = e.classList;
|
|
1581
1601
|
return Array.from(t).some(
|
|
1582
1602
|
(n) => n.startsWith("anim-") && n.includes("scroll")
|
|
1583
1603
|
);
|
|
1584
1604
|
}
|
|
1585
|
-
function
|
|
1605
|
+
function We(e) {
|
|
1586
1606
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1587
1607
|
const t = e.classList;
|
|
1588
1608
|
return Array.from(t).some((n) => n.startsWith("anim-"));
|
|
1589
1609
|
}
|
|
1590
|
-
function
|
|
1591
|
-
if (!
|
|
1610
|
+
function Se(e, t) {
|
|
1611
|
+
if (!Be(e)) return;
|
|
1592
1612
|
if (e.hasAttribute(`data-${t}-scroll`)) {
|
|
1593
|
-
const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(),
|
|
1594
|
-
e.classList.contains(`${t}-timeline`) || e.classList.contains(`${t}-timeline-inline`) || e.classList.contains(`${t}-timeline-block`) || e.classList.contains(`${t}-timeline-x`) || e.classList.contains(`${t}-timeline-y`) || (
|
|
1613
|
+
const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), a = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
|
|
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`));
|
|
1595
1615
|
}
|
|
1596
1616
|
const n = e.getAttribute(`data-${t}-start`);
|
|
1597
1617
|
n && e.style.setProperty(`--${t}-range-start`, n);
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1618
|
+
const l = e.getAttribute(`data-${t}-end`);
|
|
1619
|
+
l && e.style.setProperty(`--${t}-range-end`, l);
|
|
1600
1620
|
const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), s = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
|
|
1601
1621
|
!r && !s && e.setAttribute(`data-${t}-run`, "");
|
|
1602
1622
|
}
|
|
@@ -1605,12 +1625,12 @@ function Ie(e = document, t) {
|
|
|
1605
1625
|
e.querySelectorAll(
|
|
1606
1626
|
`[class*="${t}-"][class*="-scroll"]`
|
|
1607
1627
|
)
|
|
1608
|
-
).filter((
|
|
1628
|
+
).filter((l) => Be(l));
|
|
1609
1629
|
}
|
|
1610
1630
|
function Tt(e = document, t) {
|
|
1611
1631
|
const n = Array.from(
|
|
1612
1632
|
e.querySelectorAll(`[class*="${t}-"]`)
|
|
1613
|
-
),
|
|
1633
|
+
), l = /* @__PURE__ */ new Set([
|
|
1614
1634
|
`${t}-run`,
|
|
1615
1635
|
`${t}-in`,
|
|
1616
1636
|
`${t}-out`,
|
|
@@ -1628,8 +1648,8 @@ function Tt(e = document, t) {
|
|
|
1628
1648
|
if (!(r instanceof HTMLElement)) return !1;
|
|
1629
1649
|
const s = r.classList;
|
|
1630
1650
|
return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
|
|
1631
|
-
(
|
|
1632
|
-
) ? !0 : !
|
|
1651
|
+
(u) => u.startsWith(`${t}-`) && !u.includes("scroll") && !l.has(u)
|
|
1652
|
+
) ? !0 : !Be(r);
|
|
1633
1653
|
});
|
|
1634
1654
|
}
|
|
1635
1655
|
function zt(e, t) {
|
|
@@ -1641,70 +1661,70 @@ function Ae(e, t, n) {
|
|
|
1641
1661
|
e.setAttribute(`data-${t}-run`, ""), e.setAttribute(`data-${t}-${n}-run`, "");
|
|
1642
1662
|
}
|
|
1643
1663
|
function Pe(e, t, n) {
|
|
1644
|
-
const
|
|
1645
|
-
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 =
|
|
1664
|
+
const l = 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 = l;
|
|
1646
1666
|
}
|
|
1647
|
-
const en = [0, 0.2],
|
|
1648
|
-
function
|
|
1649
|
-
if (
|
|
1650
|
-
|
|
1667
|
+
const en = [0, 0.2], He = /* @__PURE__ */ new WeakSet();
|
|
1668
|
+
function Fe(e, t) {
|
|
1669
|
+
if (He.has(e)) return;
|
|
1670
|
+
He.add(e);
|
|
1651
1671
|
const n = (r) => {
|
|
1652
1672
|
r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
|
|
1653
|
-
},
|
|
1673
|
+
}, l = (r) => {
|
|
1654
1674
|
r.target === e && e.removeAttribute(`data-${t}-animating`);
|
|
1655
1675
|
};
|
|
1656
|
-
e.addEventListener("animationstart", n), e.addEventListener("animationend",
|
|
1676
|
+
e.addEventListener("animationstart", n), e.addEventListener("animationend", l), e.addEventListener("animationcancel", l);
|
|
1657
1677
|
}
|
|
1658
1678
|
function ct(e = {}) {
|
|
1659
1679
|
const { prefix: t = "anim", once: n = !0 } = e;
|
|
1660
1680
|
if (Qt())
|
|
1661
1681
|
return () => {
|
|
1662
1682
|
};
|
|
1663
|
-
const
|
|
1683
|
+
const l = Zt(), r = /* @__PURE__ */ new WeakSet();
|
|
1664
1684
|
let s = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, c = !0;
|
|
1665
|
-
const
|
|
1666
|
-
const
|
|
1667
|
-
c =
|
|
1685
|
+
const a = () => {
|
|
1686
|
+
const i = window.pageYOffset || window.scrollY || 0;
|
|
1687
|
+
c = i >= s, s = i;
|
|
1668
1688
|
};
|
|
1669
|
-
typeof window < "u" && window.addEventListener("scroll",
|
|
1670
|
-
const
|
|
1671
|
-
(
|
|
1672
|
-
for (const
|
|
1673
|
-
const
|
|
1674
|
-
if (!
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1689
|
+
typeof window < "u" && window.addEventListener("scroll", a, { passive: !0 });
|
|
1690
|
+
const u = new IntersectionObserver(
|
|
1691
|
+
(i) => {
|
|
1692
|
+
for (const d of i) {
|
|
1693
|
+
const h = d.target;
|
|
1694
|
+
if (!We(h) || h.hasAttribute(`data-${t}-animating`)) continue;
|
|
1695
|
+
const w = zt(h.classList, t);
|
|
1696
|
+
d.isIntersecting ? (w && Pe(h, t, "out"), Ae(h, t, "in"), n && u.unobserve(h)) : n || (c || Pe(h, t, "in"), w && Ae(h, t, "out"));
|
|
1677
1697
|
}
|
|
1678
1698
|
},
|
|
1679
1699
|
{ threshold: en }
|
|
1680
|
-
), o = (
|
|
1681
|
-
const
|
|
1682
|
-
for (const
|
|
1683
|
-
r.has(
|
|
1700
|
+
), o = (i) => {
|
|
1701
|
+
const d = Tt(i || document, t);
|
|
1702
|
+
for (const h of d)
|
|
1703
|
+
r.has(h) || (r.add(h), u.observe(h), Fe(h, t));
|
|
1684
1704
|
};
|
|
1685
1705
|
o();
|
|
1686
|
-
let
|
|
1687
|
-
if (
|
|
1706
|
+
let p, v = null, f = null;
|
|
1707
|
+
if (l)
|
|
1688
1708
|
(() => {
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
const
|
|
1692
|
-
for (const
|
|
1709
|
+
f == null && (f = requestAnimationFrame(() => {
|
|
1710
|
+
f = null;
|
|
1711
|
+
const d = Ie(void 0, t);
|
|
1712
|
+
for (const h of d) Se(h, t);
|
|
1693
1713
|
}));
|
|
1694
|
-
})(),
|
|
1695
|
-
for (const
|
|
1696
|
-
if (
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1699
|
-
} else if (
|
|
1700
|
-
for (const
|
|
1701
|
-
if (
|
|
1702
|
-
const
|
|
1703
|
-
for (const
|
|
1704
|
-
o(
|
|
1714
|
+
})(), v = new MutationObserver((d) => {
|
|
1715
|
+
for (const h of d)
|
|
1716
|
+
if (h.type === "attributes") {
|
|
1717
|
+
const w = h.target;
|
|
1718
|
+
w instanceof HTMLElement && (Se(w, t), We(w) && (r.has(w) || (r.add(w), u.observe(w), Fe(w, t))));
|
|
1719
|
+
} else if (h.type === "childList" && h.addedNodes && h.addedNodes.length) {
|
|
1720
|
+
for (const w of Array.from(h.addedNodes))
|
|
1721
|
+
if (w instanceof HTMLElement) {
|
|
1722
|
+
const b = Ie(w, t);
|
|
1723
|
+
for (const g of b) Se(g, t);
|
|
1724
|
+
o(w);
|
|
1705
1725
|
}
|
|
1706
1726
|
}
|
|
1707
|
-
}),
|
|
1727
|
+
}), v.observe(document.documentElement, {
|
|
1708
1728
|
subtree: !0,
|
|
1709
1729
|
childList: !0,
|
|
1710
1730
|
attributes: !0,
|
|
@@ -1716,19 +1736,19 @@ function ct(e = {}) {
|
|
|
1716
1736
|
`data-${t}-paused`,
|
|
1717
1737
|
`data-${t}-run`
|
|
1718
1738
|
]
|
|
1719
|
-
}),
|
|
1720
|
-
|
|
1739
|
+
}), p = () => {
|
|
1740
|
+
f != null && cancelAnimationFrame(f), v && v.disconnect();
|
|
1721
1741
|
};
|
|
1722
1742
|
else {
|
|
1723
|
-
let
|
|
1724
|
-
Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((
|
|
1725
|
-
|
|
1726
|
-
}),
|
|
1727
|
-
typeof
|
|
1743
|
+
let i;
|
|
1744
|
+
Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((h) => {
|
|
1745
|
+
i = h.initScrollViewFallback({ once: n });
|
|
1746
|
+
}), p = () => {
|
|
1747
|
+
typeof i == "function" && i();
|
|
1728
1748
|
};
|
|
1729
1749
|
}
|
|
1730
1750
|
return () => {
|
|
1731
|
-
|
|
1751
|
+
p && p(), typeof window < "u" && window.removeEventListener("scroll", a), u.disconnect();
|
|
1732
1752
|
};
|
|
1733
1753
|
}
|
|
1734
1754
|
const Jn = ct, Zn = ct;
|
|
@@ -1739,114 +1759,114 @@ function tn(e) {
|
|
|
1739
1759
|
};
|
|
1740
1760
|
return e && e in t ? t[e] : e || "filled";
|
|
1741
1761
|
}
|
|
1742
|
-
const
|
|
1762
|
+
const Ce = ({
|
|
1743
1763
|
variant: e = "filled",
|
|
1744
1764
|
disabled: t = !1,
|
|
1745
1765
|
icon: n,
|
|
1746
|
-
href:
|
|
1766
|
+
href: l,
|
|
1747
1767
|
label: r,
|
|
1748
1768
|
disableTextMargins: s,
|
|
1749
1769
|
className: c,
|
|
1750
|
-
iconPosition:
|
|
1751
|
-
loading:
|
|
1770
|
+
iconPosition: a = "left",
|
|
1771
|
+
loading: u = !1,
|
|
1752
1772
|
shape: o = "rounded",
|
|
1753
|
-
onClick:
|
|
1754
|
-
onToggle:
|
|
1755
|
-
activated:
|
|
1756
|
-
ref:
|
|
1757
|
-
size:
|
|
1758
|
-
allowShapeTransformation:
|
|
1759
|
-
transition:
|
|
1760
|
-
children:
|
|
1761
|
-
...
|
|
1773
|
+
onClick: p,
|
|
1774
|
+
onToggle: v,
|
|
1775
|
+
activated: f,
|
|
1776
|
+
ref: i,
|
|
1777
|
+
size: d = "medium",
|
|
1778
|
+
allowShapeTransformation: h = !0,
|
|
1779
|
+
transition: w,
|
|
1780
|
+
children: b,
|
|
1781
|
+
...g
|
|
1762
1782
|
}) => {
|
|
1763
|
-
if (
|
|
1783
|
+
if (b && (r = b), !r)
|
|
1764
1784
|
throw new Error(
|
|
1765
1785
|
"Button component requires either a label prop or children content"
|
|
1766
1786
|
);
|
|
1767
1787
|
e = tn(e);
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
}, [
|
|
1772
|
-
let
|
|
1773
|
-
|
|
1788
|
+
const I = l ? "a" : "button", E = W(null), A = i || E, [L, V] = Z.useState(f);
|
|
1789
|
+
R(() => {
|
|
1790
|
+
V(f);
|
|
1791
|
+
}, [f]), w = { duration: 0.3, ...w };
|
|
1792
|
+
let H;
|
|
1793
|
+
v ? v && (H = (S) => {
|
|
1774
1794
|
t && S.preventDefault();
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1777
|
-
}) :
|
|
1778
|
-
t && S.preventDefault(),
|
|
1795
|
+
const O = !L;
|
|
1796
|
+
V(O), v(O);
|
|
1797
|
+
}) : H = (S) => {
|
|
1798
|
+
t && S.preventDefault(), p && p(S);
|
|
1779
1799
|
};
|
|
1780
1800
|
const M = Nt({
|
|
1781
|
-
allowShapeTransformation:
|
|
1782
|
-
size:
|
|
1801
|
+
allowShapeTransformation: h,
|
|
1802
|
+
size: d,
|
|
1783
1803
|
disableTextMargins: s,
|
|
1784
1804
|
shape: o,
|
|
1785
|
-
href:
|
|
1805
|
+
href: l,
|
|
1786
1806
|
disabled: t,
|
|
1787
1807
|
icon: n,
|
|
1788
|
-
iconPosition:
|
|
1789
|
-
loading:
|
|
1808
|
+
iconPosition: a,
|
|
1809
|
+
loading: u,
|
|
1790
1810
|
variant: e,
|
|
1791
|
-
transition:
|
|
1811
|
+
transition: w,
|
|
1792
1812
|
className: c,
|
|
1793
|
-
isActive:
|
|
1794
|
-
onToggle:
|
|
1795
|
-
activated:
|
|
1813
|
+
isActive: L ?? !1,
|
|
1814
|
+
onToggle: v,
|
|
1815
|
+
activated: L,
|
|
1796
1816
|
label: r,
|
|
1797
1817
|
children: r
|
|
1798
1818
|
}), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: M.icon }) : /* @__PURE__ */ m(me, {});
|
|
1799
|
-
return /* @__PURE__ */
|
|
1800
|
-
|
|
1819
|
+
return /* @__PURE__ */ Y(
|
|
1820
|
+
I,
|
|
1801
1821
|
{
|
|
1802
1822
|
ref: A,
|
|
1803
|
-
href:
|
|
1823
|
+
href: l,
|
|
1804
1824
|
className: M.button,
|
|
1805
|
-
...
|
|
1806
|
-
onClick:
|
|
1825
|
+
...g,
|
|
1826
|
+
onClick: H,
|
|
1807
1827
|
disabled: t,
|
|
1808
|
-
"aria-pressed":
|
|
1809
|
-
style: { transition:
|
|
1828
|
+
"aria-pressed": v ? L : void 0,
|
|
1829
|
+
style: { transition: w.duration + "s" },
|
|
1810
1830
|
children: [
|
|
1811
1831
|
/* @__PURE__ */ m("div", { className: M.touchTarget }),
|
|
1812
1832
|
/* @__PURE__ */ m(
|
|
1813
1833
|
ye,
|
|
1814
1834
|
{
|
|
1815
|
-
style: { transition:
|
|
1835
|
+
style: { transition: w.duration + "s" },
|
|
1816
1836
|
className: M.stateLayer,
|
|
1817
|
-
colorName:
|
|
1837
|
+
colorName: y(
|
|
1818
1838
|
e === "filled" && {
|
|
1819
|
-
"on-surface-variant": !
|
|
1820
|
-
"on-primary":
|
|
1839
|
+
"on-surface-variant": !L && !!v,
|
|
1840
|
+
"on-primary": L || !v
|
|
1821
1841
|
},
|
|
1822
1842
|
e === "elevated" && {
|
|
1823
|
-
"on-primary":
|
|
1824
|
-
primary: !
|
|
1843
|
+
"on-primary": L && !!v,
|
|
1844
|
+
primary: !L || !v
|
|
1825
1845
|
},
|
|
1826
1846
|
e === "tonal" && {
|
|
1827
|
-
"on-secondary":
|
|
1828
|
-
"on-secondary-container": !
|
|
1847
|
+
"on-secondary": L && !!v,
|
|
1848
|
+
"on-secondary-container": !L || !v
|
|
1829
1849
|
},
|
|
1830
1850
|
e === "outlined" && {
|
|
1831
|
-
"inverse-on-surface":
|
|
1832
|
-
"on-surface-variant": !
|
|
1851
|
+
"inverse-on-surface": L && !!v,
|
|
1852
|
+
"on-surface-variant": !L || !v
|
|
1833
1853
|
},
|
|
1834
1854
|
e === "text" && "primary"
|
|
1835
1855
|
),
|
|
1836
1856
|
stateClassName: "state-ripple-group-[button]"
|
|
1837
1857
|
}
|
|
1838
1858
|
),
|
|
1839
|
-
|
|
1840
|
-
|
|
1859
|
+
a === "left" && x,
|
|
1860
|
+
u && /* @__PURE__ */ m(
|
|
1841
1861
|
"div",
|
|
1842
1862
|
{
|
|
1843
1863
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
1844
1864
|
children: /* @__PURE__ */ m(
|
|
1845
|
-
|
|
1865
|
+
Vt,
|
|
1846
1866
|
{
|
|
1847
1867
|
className: () => ({
|
|
1848
1868
|
progressIndicator: "h-6 w-6",
|
|
1849
|
-
activeIndicator:
|
|
1869
|
+
activeIndicator: y(
|
|
1850
1870
|
{
|
|
1851
1871
|
"!stroke-primary": e === "elevated" && !t,
|
|
1852
1872
|
"!stroke-on-surface/[38%]": e === "elevated" && t
|
|
@@ -1875,7 +1895,7 @@ const ke = ({
|
|
|
1875
1895
|
}
|
|
1876
1896
|
),
|
|
1877
1897
|
/* @__PURE__ */ m("span", { className: M.label, children: r }),
|
|
1878
|
-
|
|
1898
|
+
a === "right" && x
|
|
1879
1899
|
]
|
|
1880
1900
|
}
|
|
1881
1901
|
);
|
|
@@ -1883,13 +1903,13 @@ const ke = ({
|
|
|
1883
1903
|
variant: e = "outlined",
|
|
1884
1904
|
className: t,
|
|
1885
1905
|
children: n,
|
|
1886
|
-
isInteractive:
|
|
1906
|
+
isInteractive: l = !1,
|
|
1887
1907
|
ref: r,
|
|
1888
1908
|
...s
|
|
1889
1909
|
}) => {
|
|
1890
|
-
const c = Et({ className: t, isInteractive:
|
|
1891
|
-
return /* @__PURE__ */
|
|
1892
|
-
|
|
1910
|
+
const c = Et({ className: t, isInteractive: l, variant: e, children: n }), a = W(null);
|
|
1911
|
+
return /* @__PURE__ */ Y("div", { ...s, ref: r || a, className: c.card, children: [
|
|
1912
|
+
l && /* @__PURE__ */ m(
|
|
1893
1913
|
ye,
|
|
1894
1914
|
{
|
|
1895
1915
|
className: c.stateLayer,
|
|
@@ -1900,20 +1920,20 @@ const ke = ({
|
|
|
1900
1920
|
n
|
|
1901
1921
|
] });
|
|
1902
1922
|
}, he = (e, t, n = [0, 1]) => {
|
|
1903
|
-
const [
|
|
1904
|
-
return s +
|
|
1923
|
+
const [l, r] = t, [s, c] = n, u = (Math.max(l, Math.min(e, r)) - l) / (r - l);
|
|
1924
|
+
return s + u * (c - s);
|
|
1905
1925
|
}, nn = ({
|
|
1906
1926
|
className: e,
|
|
1907
1927
|
children: t,
|
|
1908
1928
|
width: n,
|
|
1909
|
-
index:
|
|
1929
|
+
index: l = 0,
|
|
1910
1930
|
outputRange: r,
|
|
1911
1931
|
ref: s,
|
|
1912
1932
|
...c
|
|
1913
1933
|
}) => {
|
|
1914
|
-
const
|
|
1934
|
+
const a = W(null), u = s || a, o = St({
|
|
1915
1935
|
className: e,
|
|
1916
|
-
index:
|
|
1936
|
+
index: l,
|
|
1917
1937
|
width: n,
|
|
1918
1938
|
children: t,
|
|
1919
1939
|
outputRange: r
|
|
@@ -1921,7 +1941,7 @@ const ke = ({
|
|
|
1921
1941
|
return /* @__PURE__ */ m(
|
|
1922
1942
|
"div",
|
|
1923
1943
|
{
|
|
1924
|
-
ref:
|
|
1944
|
+
ref: u,
|
|
1925
1945
|
style: {
|
|
1926
1946
|
width: n + "px",
|
|
1927
1947
|
maxWidth: r[1] + "px",
|
|
@@ -1941,271 +1961,271 @@ const ke = ({
|
|
|
1941
1961
|
variant: e = "hero",
|
|
1942
1962
|
className: t,
|
|
1943
1963
|
children: n,
|
|
1944
|
-
ref:
|
|
1964
|
+
ref: l,
|
|
1945
1965
|
marginPourcent: r = 0,
|
|
1946
1966
|
inputRange: s = [0.21, 0.65],
|
|
1947
1967
|
outputRange: c = [42, 300],
|
|
1948
|
-
gap:
|
|
1949
|
-
onChange:
|
|
1968
|
+
gap: a = 8,
|
|
1969
|
+
onChange: u,
|
|
1950
1970
|
onMetricsChange: o,
|
|
1951
|
-
index:
|
|
1952
|
-
scrollSensitivity:
|
|
1953
|
-
...
|
|
1971
|
+
index: p,
|
|
1972
|
+
scrollSensitivity: v = 1.25,
|
|
1973
|
+
...f
|
|
1954
1974
|
}) => {
|
|
1955
|
-
const
|
|
1956
|
-
index:
|
|
1975
|
+
const i = W(null), d = l || i, [h, w] = $(0), b = It({
|
|
1976
|
+
index: p,
|
|
1957
1977
|
className: t,
|
|
1958
1978
|
children: n,
|
|
1959
1979
|
variant: e,
|
|
1960
1980
|
inputRange: s,
|
|
1961
1981
|
outputRange: c,
|
|
1962
1982
|
marginPourcent: r,
|
|
1963
|
-
onChange:
|
|
1964
|
-
gap:
|
|
1965
|
-
scrollSensitivity:
|
|
1983
|
+
onChange: u,
|
|
1984
|
+
gap: a,
|
|
1985
|
+
scrollSensitivity: v,
|
|
1966
1986
|
onMetricsChange: o
|
|
1967
|
-
}),
|
|
1968
|
-
(
|
|
1969
|
-
),
|
|
1987
|
+
}), g = Z.Children.toArray(n).filter(
|
|
1988
|
+
(N) => Z.isValidElement(N) && N.type === nn
|
|
1989
|
+
), I = W(null), [E, A] = $(
|
|
1970
1990
|
{}
|
|
1971
|
-
), [
|
|
1991
|
+
), [L, V] = $(null), H = W(0), M = W(null), x = () => {
|
|
1972
1992
|
var fe, we;
|
|
1973
|
-
if (!
|
|
1993
|
+
if (!I.current || !d.current || (L == null ? void 0 : L.scrollProgress) === void 0)
|
|
1974
1994
|
return [];
|
|
1975
|
-
const
|
|
1976
|
-
function
|
|
1977
|
-
return P.map((
|
|
1978
|
-
const
|
|
1995
|
+
const N = (L == null ? void 0 : L.scrollVisible) ?? ((fe = d.current) == null ? void 0 : fe.clientWidth) ?? 0;
|
|
1996
|
+
function D(P, T) {
|
|
1997
|
+
return P.map((ee, ve) => {
|
|
1998
|
+
const Ee = (ee - T) / Math.abs(P[1] - P[0]);
|
|
1979
1999
|
return {
|
|
1980
|
-
itemScrollXCenter:
|
|
1981
|
-
relativeIndex:
|
|
2000
|
+
itemScrollXCenter: ee,
|
|
2001
|
+
relativeIndex: Ee,
|
|
1982
2002
|
index: ve,
|
|
1983
2003
|
width: 0
|
|
1984
2004
|
};
|
|
1985
2005
|
});
|
|
1986
2006
|
}
|
|
1987
|
-
const
|
|
1988
|
-
if (!S[
|
|
1989
|
-
const ve =
|
|
2007
|
+
const F = g.map((P, T) => {
|
|
2008
|
+
if (!S[T].current || !I.current) return 0;
|
|
2009
|
+
const ve = T / (g.length - 1);
|
|
1990
2010
|
return he(ve, [0, 1], [0, 1]);
|
|
1991
|
-
}), j =
|
|
1992
|
-
|
|
1993
|
-
(
|
|
1994
|
-
).sort((P,
|
|
1995
|
-
let
|
|
1996
|
-
const re = j.sort((P,
|
|
1997
|
-
if (!(
|
|
1998
|
-
if (
|
|
1999
|
-
|
|
2011
|
+
}), j = D(
|
|
2012
|
+
F,
|
|
2013
|
+
(L == null ? void 0 : L.scrollProgress) ?? 0
|
|
2014
|
+
).sort((P, T) => P.index - T.index);
|
|
2015
|
+
let X = (((we = d.current) == null ? void 0 : we.clientWidth) ?? N) + a + c[0] + a;
|
|
2016
|
+
const re = j.sort((P, T) => Math.abs(P.relativeIndex) - Math.abs(T.relativeIndex)).map((P, T) => {
|
|
2017
|
+
if (!(X <= 0)) {
|
|
2018
|
+
if (T == 0 && G(P.index), P.width = he(
|
|
2019
|
+
X - a,
|
|
2000
2020
|
[c[0], c[1]],
|
|
2001
2021
|
[c[0], c[1]]
|
|
2002
|
-
),
|
|
2003
|
-
const
|
|
2004
|
-
|
|
2005
|
-
} else if (
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2022
|
+
), X -= P.width + a, X != 0 && X < (c[0] + a) * 2) {
|
|
2023
|
+
const ee = P.width - ((c[0] + a) * 2 - X);
|
|
2024
|
+
X += P.width, P.width = ee, X -= P.width;
|
|
2025
|
+
} else if (X == 0 && P.width >= c[0] * 2 + a) {
|
|
2026
|
+
const ee = P.width - (c[0] + a - X);
|
|
2027
|
+
X += P.width, P.width = ee, X -= P.width;
|
|
2008
2028
|
}
|
|
2009
2029
|
return P;
|
|
2010
2030
|
}
|
|
2011
|
-
}).filter(Boolean),
|
|
2012
|
-
(P,
|
|
2031
|
+
}).filter(Boolean), ae = re.reverse(), de = [...re].sort(
|
|
2032
|
+
(P, T) => Math.abs(P.index) - Math.abs(T.index)
|
|
2013
2033
|
);
|
|
2014
|
-
|
|
2015
|
-
const
|
|
2016
|
-
if (!
|
|
2017
|
-
const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(
|
|
2034
|
+
ae.forEach((P, T) => {
|
|
2035
|
+
const ee = ae[T + 1];
|
|
2036
|
+
if (!ee) return;
|
|
2037
|
+
const ve = 1 - (Math.abs(P.relativeIndex) - Math.abs(ee == null ? void 0 : ee.relativeIndex)), Ee = he(
|
|
2018
2038
|
ve,
|
|
2019
2039
|
[0, 2],
|
|
2020
|
-
[P.width +
|
|
2040
|
+
[P.width + X, ee.width]
|
|
2021
2041
|
);
|
|
2022
|
-
|
|
2042
|
+
X += P.width, P.width = Ee, X -= P.width;
|
|
2023
2043
|
});
|
|
2024
2044
|
const ce = re.length / 2, oe = he(
|
|
2025
2045
|
Math.abs(de[0].relativeIndex),
|
|
2026
2046
|
[de[0].index == 0 ? 0 : ce - 1, ce],
|
|
2027
2047
|
[0, 1]
|
|
2028
|
-
),
|
|
2029
|
-
return
|
|
2048
|
+
), Ne = he(oe, [0, 1], [0, 1]) * -(c[0] + a);
|
|
2049
|
+
return w(Ne), Object.fromEntries(
|
|
2030
2050
|
re.map((P) => [P.index, P.width])
|
|
2031
2051
|
);
|
|
2032
|
-
}, S =
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
}, [
|
|
2036
|
-
typeof
|
|
2037
|
-
}, [
|
|
2038
|
-
_(
|
|
2039
|
-
}, [
|
|
2040
|
-
S[
|
|
2052
|
+
}, S = W([]).current, [O, G] = $(0);
|
|
2053
|
+
R(() => {
|
|
2054
|
+
u && u(O);
|
|
2055
|
+
}, [O]), R(() => {
|
|
2056
|
+
typeof p == "number" && g.length > 0 && p !== O && ne(p);
|
|
2057
|
+
}, [p, g.length]), R(() => {
|
|
2058
|
+
_(O);
|
|
2059
|
+
}, [O]), S.length !== g.length && g.forEach((N, D) => {
|
|
2060
|
+
S[D] || (S[D] = Z.createRef());
|
|
2041
2061
|
});
|
|
2042
|
-
const [
|
|
2043
|
-
if (!
|
|
2044
|
-
const
|
|
2045
|
-
if (!
|
|
2062
|
+
const [te, _] = $(0), ne = (N, D = {}) => {
|
|
2063
|
+
if (!g.length) return 0;
|
|
2064
|
+
const F = S[N];
|
|
2065
|
+
if (!F || !F.current || !I.current) return 0;
|
|
2046
2066
|
const j = he(
|
|
2047
|
-
|
|
2067
|
+
N / Math.max(1, g.length - 1),
|
|
2048
2068
|
[0, 1],
|
|
2049
2069
|
[0, 1]
|
|
2050
2070
|
);
|
|
2051
|
-
return _(
|
|
2071
|
+
return _(N), I.current.dispatchEvent(
|
|
2052
2072
|
new CustomEvent("udx:customScroll:set", {
|
|
2053
2073
|
bubbles: !0,
|
|
2054
2074
|
detail: {
|
|
2055
2075
|
progress: j,
|
|
2056
2076
|
orientation: "horizontal",
|
|
2057
|
-
animate:
|
|
2077
|
+
animate: D.animate !== !1
|
|
2058
2078
|
}
|
|
2059
2079
|
})
|
|
2060
2080
|
), j;
|
|
2061
|
-
}, B =
|
|
2081
|
+
}, B = g.map((N, D) => {
|
|
2062
2082
|
var re;
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2065
|
-
},
|
|
2083
|
+
const F = (re = N.props) == null ? void 0 : re.onClick, j = (ae) => {
|
|
2084
|
+
F == null || F(ae);
|
|
2085
|
+
}, X = () => _(D);
|
|
2066
2086
|
return Z.cloneElement(
|
|
2067
|
-
|
|
2087
|
+
N,
|
|
2068
2088
|
{
|
|
2069
|
-
width:
|
|
2089
|
+
width: E[D],
|
|
2070
2090
|
outputRange: c,
|
|
2071
|
-
ref: S[
|
|
2072
|
-
key:
|
|
2073
|
-
index:
|
|
2091
|
+
ref: S[D],
|
|
2092
|
+
key: D,
|
|
2093
|
+
index: D,
|
|
2074
2094
|
role: "option",
|
|
2075
|
-
"aria-selected":
|
|
2076
|
-
tabIndex:
|
|
2095
|
+
"aria-selected": O === D,
|
|
2096
|
+
tabIndex: O === D ? 0 : -1,
|
|
2077
2097
|
onClick: j,
|
|
2078
|
-
onFocus:
|
|
2098
|
+
onFocus: X
|
|
2079
2099
|
}
|
|
2080
2100
|
);
|
|
2081
|
-
}), k = (
|
|
2082
|
-
var
|
|
2083
|
-
if (
|
|
2084
|
-
(
|
|
2085
|
-
const
|
|
2086
|
-
M.current = ht(
|
|
2101
|
+
}), k = (N) => {
|
|
2102
|
+
var D;
|
|
2103
|
+
if (N.scrollTotal > 0) {
|
|
2104
|
+
(D = M.current) == null || D.stop();
|
|
2105
|
+
const F = H.current ?? 0, j = N.scrollProgress ?? 0;
|
|
2106
|
+
M.current = ht(F, j, {
|
|
2087
2107
|
// Spring tuning to add a bit of inertia and smoothness
|
|
2088
2108
|
type: "spring",
|
|
2089
2109
|
stiffness: 260,
|
|
2090
2110
|
damping: 32,
|
|
2091
2111
|
mass: 0.6,
|
|
2092
2112
|
restDelta: 5e-4,
|
|
2093
|
-
onUpdate: (
|
|
2094
|
-
|
|
2113
|
+
onUpdate: (X) => {
|
|
2114
|
+
H.current = X, V({ ...N, scrollProgress: X });
|
|
2095
2115
|
}
|
|
2096
2116
|
});
|
|
2097
2117
|
}
|
|
2098
2118
|
};
|
|
2099
|
-
|
|
2100
|
-
const
|
|
2101
|
-
A(
|
|
2102
|
-
}, [
|
|
2103
|
-
const U =
|
|
2104
|
-
|
|
2119
|
+
R(() => {
|
|
2120
|
+
const N = x();
|
|
2121
|
+
A(N);
|
|
2122
|
+
}, [L]);
|
|
2123
|
+
const U = W(o);
|
|
2124
|
+
R(() => {
|
|
2105
2125
|
U.current = o;
|
|
2106
2126
|
}, [o]);
|
|
2107
|
-
const K =
|
|
2108
|
-
|
|
2109
|
-
var
|
|
2110
|
-
const
|
|
2111
|
-
if (!
|
|
2112
|
-
const
|
|
2113
|
-
if (
|
|
2114
|
-
const
|
|
2115
|
-
Math.max(0,
|
|
2116
|
-
Math.max(0,
|
|
2117
|
-
), oe = ce > 0,
|
|
2118
|
-
total:
|
|
2127
|
+
const K = W(null);
|
|
2128
|
+
R(() => {
|
|
2129
|
+
var T;
|
|
2130
|
+
const N = U.current;
|
|
2131
|
+
if (!N || !(d != null && d.current)) return;
|
|
2132
|
+
const D = g.length;
|
|
2133
|
+
if (D <= 0) return;
|
|
2134
|
+
const F = ((T = d.current) == null ? void 0 : T.clientWidth) ?? 0, j = c[1], X = H.current ?? (L == null ? void 0 : L.scrollProgress) ?? 0, re = (F + 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, O),
|
|
2136
|
+
Math.max(0, D - 1)
|
|
2137
|
+
), oe = ce > 0, Ne = ce < D - 1, fe = {
|
|
2138
|
+
total: D,
|
|
2119
2139
|
selectedIndex: ce,
|
|
2120
2140
|
visibleApprox: re,
|
|
2121
|
-
visibleFull:
|
|
2141
|
+
visibleFull: ae,
|
|
2122
2142
|
stepHalf: de,
|
|
2123
2143
|
canPrev: oe,
|
|
2124
|
-
canNext:
|
|
2125
|
-
scrollProgress:
|
|
2126
|
-
viewportWidth:
|
|
2144
|
+
canNext: Ne,
|
|
2145
|
+
scrollProgress: X,
|
|
2146
|
+
viewportWidth: F,
|
|
2127
2147
|
itemMaxWidth: j,
|
|
2128
|
-
gap:
|
|
2148
|
+
gap: a
|
|
2129
2149
|
}, we = K.current;
|
|
2130
2150
|
let P = !we;
|
|
2131
2151
|
if (!P) {
|
|
2132
|
-
for (const
|
|
2133
|
-
if (fe[
|
|
2152
|
+
for (const ee in fe)
|
|
2153
|
+
if (fe[ee] !== we[ee]) {
|
|
2134
2154
|
P = !0;
|
|
2135
2155
|
break;
|
|
2136
2156
|
}
|
|
2137
2157
|
}
|
|
2138
|
-
P && (K.current = fe,
|
|
2139
|
-
}, [
|
|
2140
|
-
var
|
|
2141
|
-
(
|
|
2158
|
+
P && (K.current = fe, N(fe));
|
|
2159
|
+
}, [d, g.length, O, L, a, c]), R(() => () => {
|
|
2160
|
+
var N;
|
|
2161
|
+
(N = M.current) == null || N.stop();
|
|
2142
2162
|
}, []);
|
|
2143
|
-
const [
|
|
2144
|
-
|
|
2145
|
-
let
|
|
2146
|
-
|
|
2147
|
-
const
|
|
2148
|
-
ue(
|
|
2149
|
-
}, [
|
|
2150
|
-
const C = (
|
|
2151
|
-
if (!
|
|
2152
|
-
const
|
|
2153
|
-
switch (
|
|
2163
|
+
const [le, ue] = $(0);
|
|
2164
|
+
Ye(() => {
|
|
2165
|
+
let N = c[1];
|
|
2166
|
+
L && N > L.scrollVisible && (N = L.scrollVisible);
|
|
2167
|
+
const D = (N + a) * B.length / v;
|
|
2168
|
+
ue(D);
|
|
2169
|
+
}, [d, S, L]);
|
|
2170
|
+
const C = (N) => {
|
|
2171
|
+
if (!g.length) return;
|
|
2172
|
+
const D = te ?? O;
|
|
2173
|
+
switch (N.key) {
|
|
2154
2174
|
case "ArrowLeft":
|
|
2155
|
-
|
|
2175
|
+
N.preventDefault(), ne(Math.max(0, D - 1));
|
|
2156
2176
|
break;
|
|
2157
2177
|
case "ArrowRight":
|
|
2158
|
-
|
|
2178
|
+
N.preventDefault(), ne(Math.min(g.length - 1, D + 1));
|
|
2159
2179
|
break;
|
|
2160
2180
|
case "Home":
|
|
2161
|
-
|
|
2181
|
+
N.preventDefault(), ne(0);
|
|
2162
2182
|
break;
|
|
2163
2183
|
case "End":
|
|
2164
|
-
|
|
2184
|
+
N.preventDefault(), ne(g.length - 1);
|
|
2165
2185
|
break;
|
|
2166
2186
|
case "Enter":
|
|
2167
2187
|
case " ":
|
|
2168
|
-
|
|
2188
|
+
N.preventDefault(), ne(D);
|
|
2169
2189
|
break;
|
|
2170
2190
|
}
|
|
2171
2191
|
};
|
|
2172
|
-
return
|
|
2173
|
-
const
|
|
2174
|
-
if (!
|
|
2175
|
-
const
|
|
2176
|
-
const j =
|
|
2192
|
+
return R(() => {
|
|
2193
|
+
const N = d.current;
|
|
2194
|
+
if (!N) return;
|
|
2195
|
+
const D = (F) => {
|
|
2196
|
+
const j = F.detail;
|
|
2177
2197
|
j && typeof j.index == "number" && ne(j.index);
|
|
2178
2198
|
};
|
|
2179
|
-
return
|
|
2180
|
-
|
|
2199
|
+
return N.addEventListener("udx:carousel:centerIndex", D), () => {
|
|
2200
|
+
N.removeEventListener(
|
|
2181
2201
|
"udx:carousel:centerIndex",
|
|
2182
|
-
|
|
2202
|
+
D
|
|
2183
2203
|
);
|
|
2184
2204
|
};
|
|
2185
|
-
}, [
|
|
2205
|
+
}, [d, g.length]), /* @__PURE__ */ m(
|
|
2186
2206
|
"div",
|
|
2187
2207
|
{
|
|
2188
|
-
className:
|
|
2189
|
-
ref:
|
|
2208
|
+
className: b.carousel,
|
|
2209
|
+
ref: d,
|
|
2190
2210
|
role: "listbox",
|
|
2191
2211
|
"aria-orientation": "horizontal",
|
|
2192
2212
|
onKeyDown: C,
|
|
2193
|
-
...
|
|
2213
|
+
...f,
|
|
2194
2214
|
children: /* @__PURE__ */ m(
|
|
2195
2215
|
jt,
|
|
2196
2216
|
{
|
|
2197
2217
|
draggable: !0,
|
|
2198
2218
|
orientation: "horizontal",
|
|
2199
2219
|
onScroll: k,
|
|
2200
|
-
scrollSize:
|
|
2220
|
+
scrollSize: le,
|
|
2201
2221
|
children: /* @__PURE__ */ m(
|
|
2202
2222
|
"div",
|
|
2203
2223
|
{
|
|
2204
|
-
className:
|
|
2205
|
-
ref:
|
|
2224
|
+
className: b.track,
|
|
2225
|
+
ref: I,
|
|
2206
2226
|
style: {
|
|
2207
|
-
gap: `${
|
|
2208
|
-
translate:
|
|
2227
|
+
gap: `${a}px`,
|
|
2228
|
+
translate: h,
|
|
2209
2229
|
willChange: "translate"
|
|
2210
2230
|
},
|
|
2211
2231
|
children: B
|
|
@@ -2220,55 +2240,55 @@ const ke = ({
|
|
|
2220
2240
|
className: t,
|
|
2221
2241
|
...n
|
|
2222
2242
|
}) => {
|
|
2223
|
-
const
|
|
2224
|
-
return /* @__PURE__ */ m("hr", { className:
|
|
2225
|
-
},
|
|
2243
|
+
const l = kt({ orientation: e, className: t });
|
|
2244
|
+
return /* @__PURE__ */ m("hr", { className: l.divider, ...n });
|
|
2245
|
+
}, z = [];
|
|
2226
2246
|
for (let e = 0; e < 256; ++e)
|
|
2227
|
-
|
|
2247
|
+
z.push((e + 256).toString(16).slice(1));
|
|
2228
2248
|
function on(e, t = 0) {
|
|
2229
|
-
return (
|
|
2249
|
+
return (z[e[t + 0]] + z[e[t + 1]] + z[e[t + 2]] + z[e[t + 3]] + "-" + z[e[t + 4]] + z[e[t + 5]] + "-" + z[e[t + 6]] + z[e[t + 7]] + "-" + z[e[t + 8]] + z[e[t + 9]] + "-" + z[e[t + 10]] + z[e[t + 11]] + z[e[t + 12]] + z[e[t + 13]] + z[e[t + 14]] + z[e[t + 15]]).toLowerCase();
|
|
2230
2250
|
}
|
|
2231
|
-
let
|
|
2232
|
-
const
|
|
2233
|
-
function
|
|
2234
|
-
if (!
|
|
2251
|
+
let ke;
|
|
2252
|
+
const ln = new Uint8Array(16);
|
|
2253
|
+
function an() {
|
|
2254
|
+
if (!ke) {
|
|
2235
2255
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2236
2256
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2237
|
-
|
|
2257
|
+
ke = crypto.getRandomValues.bind(crypto);
|
|
2238
2258
|
}
|
|
2239
|
-
return
|
|
2259
|
+
return ke(ln);
|
|
2240
2260
|
}
|
|
2241
|
-
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
2242
|
-
function
|
|
2261
|
+
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Oe = { randomUUID: sn };
|
|
2262
|
+
function ge(e, t, n) {
|
|
2243
2263
|
var r;
|
|
2244
|
-
if (
|
|
2245
|
-
return
|
|
2264
|
+
if (Oe.randomUUID && !e)
|
|
2265
|
+
return Oe.randomUUID();
|
|
2246
2266
|
e = e || {};
|
|
2247
|
-
const
|
|
2248
|
-
if (
|
|
2267
|
+
const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? an();
|
|
2268
|
+
if (l.length < 16)
|
|
2249
2269
|
throw new Error("Random bytes length must be >= 16");
|
|
2250
|
-
return
|
|
2270
|
+
return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, on(l);
|
|
2251
2271
|
}
|
|
2252
2272
|
const it = ({
|
|
2253
2273
|
variant: e = "plain",
|
|
2254
2274
|
buttons: t,
|
|
2255
2275
|
className: n,
|
|
2256
|
-
children:
|
|
2276
|
+
children: l,
|
|
2257
2277
|
title: r,
|
|
2258
2278
|
text: s,
|
|
2259
2279
|
position: c,
|
|
2260
|
-
targetRef:
|
|
2261
|
-
ref:
|
|
2280
|
+
targetRef: a,
|
|
2281
|
+
ref: u,
|
|
2262
2282
|
trigger: o = ["hover", "focus"],
|
|
2263
|
-
...
|
|
2283
|
+
...p
|
|
2264
2284
|
}) => {
|
|
2265
|
-
if (!
|
|
2285
|
+
if (!l && !a)
|
|
2266
2286
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
2267
2287
|
Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2288
|
+
const v = W(null), f = a || v, [i, d] = $(null), [h] = $(ge()), [w, b] = $(!1), g = W(null);
|
|
2289
|
+
R(() => {
|
|
2270
2290
|
const x = (S) => {
|
|
2271
|
-
|
|
2291
|
+
d(S.detail);
|
|
2272
2292
|
};
|
|
2273
2293
|
return document.addEventListener("tooltip-update", x), () => {
|
|
2274
2294
|
document.removeEventListener(
|
|
@@ -2276,17 +2296,17 @@ const it = ({
|
|
|
2276
2296
|
x
|
|
2277
2297
|
);
|
|
2278
2298
|
};
|
|
2279
|
-
}, []),
|
|
2280
|
-
|
|
2281
|
-
|
|
2299
|
+
}, []), R(() => {
|
|
2300
|
+
g.current && clearTimeout(g.current), i ? b(i === h) : g.current = setTimeout(() => {
|
|
2301
|
+
b(!1);
|
|
2282
2302
|
}, 1200);
|
|
2283
|
-
}, [
|
|
2284
|
-
const
|
|
2303
|
+
}, [i, h]);
|
|
2304
|
+
const I = () => {
|
|
2285
2305
|
if (o.includes("hover")) {
|
|
2286
|
-
const x = new CustomEvent("tooltip-update", { detail:
|
|
2306
|
+
const x = new CustomEvent("tooltip-update", { detail: h });
|
|
2287
2307
|
document.dispatchEvent(x);
|
|
2288
2308
|
}
|
|
2289
|
-
},
|
|
2309
|
+
}, E = () => {
|
|
2290
2310
|
if (o.includes("hover")) {
|
|
2291
2311
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2292
2312
|
document.dispatchEvent(x);
|
|
@@ -2294,35 +2314,35 @@ const it = ({
|
|
|
2294
2314
|
}, A = () => {
|
|
2295
2315
|
if (o.includes("click")) {
|
|
2296
2316
|
const x = new CustomEvent("tooltip-update", {
|
|
2297
|
-
detail:
|
|
2317
|
+
detail: w ? null : h
|
|
2298
2318
|
});
|
|
2299
2319
|
document.dispatchEvent(x);
|
|
2300
2320
|
}
|
|
2301
|
-
},
|
|
2321
|
+
}, L = () => {
|
|
2302
2322
|
if (o.includes("focus")) {
|
|
2303
|
-
const x = new CustomEvent("tooltip-update", { detail:
|
|
2323
|
+
const x = new CustomEvent("tooltip-update", { detail: h });
|
|
2304
2324
|
document.dispatchEvent(x);
|
|
2305
2325
|
}
|
|
2306
|
-
},
|
|
2326
|
+
}, V = () => {
|
|
2307
2327
|
if (o.includes("focus")) {
|
|
2308
2328
|
const x = new CustomEvent("tooltip-update", { detail: null });
|
|
2309
2329
|
document.dispatchEvent(x);
|
|
2310
2330
|
}
|
|
2311
2331
|
};
|
|
2312
|
-
|
|
2313
|
-
if (
|
|
2314
|
-
const x =
|
|
2315
|
-
return x.addEventListener("mouseenter",
|
|
2316
|
-
x.removeEventListener("mouseenter",
|
|
2332
|
+
R(() => {
|
|
2333
|
+
if (f != null && f.current) {
|
|
2334
|
+
const x = f.current;
|
|
2335
|
+
return x.addEventListener("mouseenter", I), x.addEventListener("mouseleave", E), x.addEventListener("click", A), x.addEventListener("focus", L), x.addEventListener("blur", V), () => {
|
|
2336
|
+
x.removeEventListener("mouseenter", I), x.removeEventListener("mouseleave", E), x.removeEventListener("click", A), x.removeEventListener("focus", L), x.removeEventListener("blur", V);
|
|
2317
2337
|
};
|
|
2318
2338
|
}
|
|
2319
|
-
}, [
|
|
2320
|
-
const
|
|
2321
|
-
if (!c && typeof window < "u" &&
|
|
2322
|
-
const x =
|
|
2323
|
-
e === "plain" ? G < 1 / 3 ? c = "right" : G > 2 / 3 ? c = "left" : c =
|
|
2339
|
+
}, [f, o, h, w]);
|
|
2340
|
+
const H = !a && pe(l) ? xe(l, { ref: v }) : l;
|
|
2341
|
+
if (!c && typeof window < "u" && f != null && f.current && !c) {
|
|
2342
|
+
const x = f.current.getBoundingClientRect(), S = window.innerWidth, O = window.innerHeight, G = x.left / S, te = x.top / O;
|
|
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");
|
|
2324
2344
|
}
|
|
2325
|
-
const M =
|
|
2345
|
+
const M = Ot({
|
|
2326
2346
|
variant: e,
|
|
2327
2347
|
buttons: t,
|
|
2328
2348
|
className: n,
|
|
@@ -2330,23 +2350,23 @@ const it = ({
|
|
|
2330
2350
|
text: s,
|
|
2331
2351
|
position: c,
|
|
2332
2352
|
trigger: o,
|
|
2333
|
-
targetRef:
|
|
2334
|
-
children:
|
|
2353
|
+
targetRef: a,
|
|
2354
|
+
children: l
|
|
2335
2355
|
});
|
|
2336
|
-
return /* @__PURE__ */
|
|
2337
|
-
|
|
2338
|
-
/* @__PURE__ */ m(se, { children:
|
|
2356
|
+
return /* @__PURE__ */ Y(me, { children: [
|
|
2357
|
+
H,
|
|
2358
|
+
/* @__PURE__ */ m(se, { children: w && /* @__PURE__ */ m(Gt, { targetRef: f, children: /* @__PURE__ */ m(
|
|
2339
2359
|
q.div,
|
|
2340
2360
|
{
|
|
2341
|
-
initial: { opacity:
|
|
2361
|
+
initial: { opacity: i ? 1 : 0 },
|
|
2342
2362
|
animate: { opacity: 1 },
|
|
2343
|
-
transition: { duration:
|
|
2344
|
-
exit: { opacity:
|
|
2363
|
+
transition: { duration: i ? 0 : 0.3 },
|
|
2364
|
+
exit: { opacity: i ? 1 : 0 },
|
|
2345
2365
|
className: M.toolTip,
|
|
2346
|
-
...
|
|
2347
|
-
onMouseEnter:
|
|
2348
|
-
onMouseLeave:
|
|
2349
|
-
children: /* @__PURE__ */
|
|
2366
|
+
...p,
|
|
2367
|
+
onMouseEnter: I,
|
|
2368
|
+
onMouseLeave: E,
|
|
2369
|
+
children: /* @__PURE__ */ Y(
|
|
2350
2370
|
q.div,
|
|
2351
2371
|
{
|
|
2352
2372
|
className: M.container,
|
|
@@ -2360,7 +2380,7 @@ const it = ({
|
|
|
2360
2380
|
r && /* @__PURE__ */ m("div", { className: M.subHead, children: r }),
|
|
2361
2381
|
/* @__PURE__ */ m("div", { className: M.supportingText, children: s }),
|
|
2362
2382
|
t && /* @__PURE__ */ m("div", { className: M.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
|
|
2363
|
-
|
|
2383
|
+
Ce,
|
|
2364
2384
|
{
|
|
2365
2385
|
size: "small",
|
|
2366
2386
|
variant: "text",
|
|
@@ -2374,37 +2394,37 @@ const it = ({
|
|
|
2374
2394
|
}
|
|
2375
2395
|
) }) })
|
|
2376
2396
|
] });
|
|
2377
|
-
},
|
|
2397
|
+
}, Me = ({
|
|
2378
2398
|
className: e,
|
|
2379
2399
|
label: t,
|
|
2380
2400
|
variant: n = "primary",
|
|
2381
|
-
size:
|
|
2401
|
+
size: l = "medium",
|
|
2382
2402
|
href: r,
|
|
2383
2403
|
type: s,
|
|
2384
2404
|
icon: c,
|
|
2385
|
-
extended:
|
|
2386
|
-
ref:
|
|
2405
|
+
extended: a = !1,
|
|
2406
|
+
ref: u,
|
|
2387
2407
|
transition: o,
|
|
2388
|
-
children:
|
|
2389
|
-
...
|
|
2408
|
+
children: p,
|
|
2409
|
+
...v
|
|
2390
2410
|
}) => {
|
|
2391
|
-
if (
|
|
2411
|
+
if (p && (t = p), !t)
|
|
2392
2412
|
throw new Error(
|
|
2393
2413
|
"FAB component requires either a label prop or children content"
|
|
2394
2414
|
);
|
|
2395
|
-
const
|
|
2415
|
+
const f = r ? "a" : "button", i = Ct({
|
|
2396
2416
|
href: r,
|
|
2397
2417
|
icon: c,
|
|
2398
|
-
extended:
|
|
2418
|
+
extended: a,
|
|
2399
2419
|
label: t,
|
|
2400
|
-
size:
|
|
2420
|
+
size: l,
|
|
2401
2421
|
variant: n,
|
|
2402
2422
|
className: e,
|
|
2403
2423
|
transition: o,
|
|
2404
2424
|
children: t
|
|
2405
2425
|
});
|
|
2406
2426
|
o = { duration: 0.3, ...o };
|
|
2407
|
-
const
|
|
2427
|
+
const d = W(null), h = u || d, w = {
|
|
2408
2428
|
visible: {
|
|
2409
2429
|
width: "auto",
|
|
2410
2430
|
marginLeft: 12,
|
|
@@ -2430,29 +2450,29 @@ const it = ({
|
|
|
2430
2450
|
}
|
|
2431
2451
|
}
|
|
2432
2452
|
};
|
|
2433
|
-
return /* @__PURE__ */
|
|
2434
|
-
|
|
2453
|
+
return /* @__PURE__ */ Y(
|
|
2454
|
+
f,
|
|
2435
2455
|
{
|
|
2436
|
-
...
|
|
2437
|
-
ref:
|
|
2456
|
+
...v,
|
|
2457
|
+
ref: h,
|
|
2438
2458
|
href: r,
|
|
2439
|
-
"aria-label":
|
|
2440
|
-
className:
|
|
2459
|
+
"aria-label": a ? void 0 : t,
|
|
2460
|
+
className: i.fab,
|
|
2441
2461
|
children: [
|
|
2442
2462
|
/* @__PURE__ */ m(
|
|
2443
2463
|
it,
|
|
2444
2464
|
{
|
|
2445
|
-
trigger:
|
|
2465
|
+
trigger: a ? null : void 0,
|
|
2446
2466
|
text: t,
|
|
2447
|
-
targetRef:
|
|
2467
|
+
targetRef: h
|
|
2448
2468
|
}
|
|
2449
2469
|
),
|
|
2450
2470
|
/* @__PURE__ */ m(
|
|
2451
2471
|
ye,
|
|
2452
2472
|
{
|
|
2453
2473
|
style: { transition: o.duration + "s" },
|
|
2454
|
-
className:
|
|
2455
|
-
colorName:
|
|
2474
|
+
className: i.stateLayer,
|
|
2475
|
+
colorName: y({
|
|
2456
2476
|
"on-primary": n == "primary",
|
|
2457
2477
|
"on-secondary": n == "secondary",
|
|
2458
2478
|
"on-tertiary": n == "tertiary",
|
|
@@ -2463,15 +2483,15 @@ const it = ({
|
|
|
2463
2483
|
stateClassName: "state-ripple-group-[fab]"
|
|
2464
2484
|
}
|
|
2465
2485
|
),
|
|
2466
|
-
/* @__PURE__ */ m(ie, { icon: c, className:
|
|
2467
|
-
/* @__PURE__ */ m(se, { children:
|
|
2486
|
+
/* @__PURE__ */ m(ie, { icon: c, className: i.icon }),
|
|
2487
|
+
/* @__PURE__ */ m(se, { children: a && /* @__PURE__ */ m(
|
|
2468
2488
|
q.span,
|
|
2469
2489
|
{
|
|
2470
|
-
variants:
|
|
2490
|
+
variants: w,
|
|
2471
2491
|
initial: "hidden",
|
|
2472
2492
|
animate: "visible",
|
|
2473
2493
|
exit: "hidden",
|
|
2474
|
-
className:
|
|
2494
|
+
className: i.label,
|
|
2475
2495
|
children: t
|
|
2476
2496
|
}
|
|
2477
2497
|
) })
|
|
@@ -2482,68 +2502,68 @@ const it = ({
|
|
|
2482
2502
|
variant: e = "standard",
|
|
2483
2503
|
href: t,
|
|
2484
2504
|
disabled: n = !1,
|
|
2485
|
-
type:
|
|
2505
|
+
type: l = "button",
|
|
2486
2506
|
title: r,
|
|
2487
2507
|
label: s,
|
|
2488
2508
|
onToggle: c,
|
|
2489
|
-
activated:
|
|
2490
|
-
onClick:
|
|
2509
|
+
activated: a = !1,
|
|
2510
|
+
onClick: u,
|
|
2491
2511
|
icon: o,
|
|
2492
|
-
size:
|
|
2493
|
-
iconSelected:
|
|
2494
|
-
className:
|
|
2495
|
-
ref:
|
|
2496
|
-
width:
|
|
2497
|
-
shape:
|
|
2498
|
-
allowShapeTransformation:
|
|
2499
|
-
transition:
|
|
2500
|
-
children:
|
|
2501
|
-
...
|
|
2512
|
+
size: p = "medium",
|
|
2513
|
+
iconSelected: v,
|
|
2514
|
+
className: f,
|
|
2515
|
+
ref: i,
|
|
2516
|
+
width: d = "default",
|
|
2517
|
+
shape: h = "rounded",
|
|
2518
|
+
allowShapeTransformation: w = !0,
|
|
2519
|
+
transition: b,
|
|
2520
|
+
children: g,
|
|
2521
|
+
...I
|
|
2502
2522
|
}) => {
|
|
2503
|
-
if (
|
|
2523
|
+
if (g && (s = g), !s)
|
|
2504
2524
|
throw new Error(
|
|
2505
2525
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
2506
2526
|
);
|
|
2507
2527
|
r || (r = s);
|
|
2508
|
-
const [
|
|
2509
|
-
let
|
|
2510
|
-
c ? c && (
|
|
2511
|
-
n && S.preventDefault(), A(!
|
|
2512
|
-
}, o =
|
|
2513
|
-
n && S.preventDefault(),
|
|
2514
|
-
},
|
|
2515
|
-
A(
|
|
2516
|
-
}, [
|
|
2517
|
-
const
|
|
2518
|
-
transition:
|
|
2519
|
-
shape:
|
|
2520
|
-
allowShapeTransformation:
|
|
2521
|
-
width:
|
|
2528
|
+
const [E, A] = Z.useState(a);
|
|
2529
|
+
let L;
|
|
2530
|
+
c ? c && (L = (S) => {
|
|
2531
|
+
n && S.preventDefault(), A(!E), c(!!E);
|
|
2532
|
+
}, o = E && v || o) : L = (S) => {
|
|
2533
|
+
n && S.preventDefault(), u && u(S);
|
|
2534
|
+
}, R(() => {
|
|
2535
|
+
A(a);
|
|
2536
|
+
}, [a]);
|
|
2537
|
+
const V = t ? "a" : "button", H = $t({
|
|
2538
|
+
transition: b,
|
|
2539
|
+
shape: h,
|
|
2540
|
+
allowShapeTransformation: w,
|
|
2541
|
+
width: d,
|
|
2522
2542
|
href: t,
|
|
2523
|
-
activated:
|
|
2543
|
+
activated: E,
|
|
2524
2544
|
label: s,
|
|
2525
|
-
iconSelected:
|
|
2526
|
-
isActive:
|
|
2545
|
+
iconSelected: v,
|
|
2546
|
+
isActive: E,
|
|
2527
2547
|
onToggle: c,
|
|
2528
2548
|
disabled: n,
|
|
2529
2549
|
icon: o,
|
|
2530
2550
|
variant: e,
|
|
2531
|
-
className:
|
|
2532
|
-
size:
|
|
2551
|
+
className: f,
|
|
2552
|
+
size: p,
|
|
2533
2553
|
children: s,
|
|
2534
|
-
...
|
|
2535
|
-
}), M =
|
|
2536
|
-
return
|
|
2537
|
-
|
|
2554
|
+
...I
|
|
2555
|
+
}), M = W(null), x = i || M;
|
|
2556
|
+
return b = { duration: 0.3, ...b }, /* @__PURE__ */ Y(
|
|
2557
|
+
V,
|
|
2538
2558
|
{
|
|
2539
2559
|
disabled: n,
|
|
2540
2560
|
href: t,
|
|
2541
|
-
style: { transition:
|
|
2542
|
-
className:
|
|
2561
|
+
style: { transition: b.duration + "s" },
|
|
2562
|
+
className: H.iconButton,
|
|
2543
2563
|
"aria-label": s,
|
|
2544
|
-
...
|
|
2564
|
+
...I,
|
|
2545
2565
|
title: void 0,
|
|
2546
|
-
onClick:
|
|
2566
|
+
onClick: L,
|
|
2547
2567
|
ref: x,
|
|
2548
2568
|
children: [
|
|
2549
2569
|
/* @__PURE__ */ m(
|
|
@@ -2554,34 +2574,34 @@ const it = ({
|
|
|
2554
2574
|
text: r
|
|
2555
2575
|
}
|
|
2556
2576
|
),
|
|
2557
|
-
/* @__PURE__ */ m("div", { className:
|
|
2577
|
+
/* @__PURE__ */ m("div", { className: H.touchTarget }),
|
|
2558
2578
|
/* @__PURE__ */ m(
|
|
2559
2579
|
ye,
|
|
2560
2580
|
{
|
|
2561
|
-
style: { transition:
|
|
2562
|
-
className:
|
|
2563
|
-
colorName:
|
|
2581
|
+
style: { transition: b.duration + "s" },
|
|
2582
|
+
className: H.stateLayer,
|
|
2583
|
+
colorName: y(
|
|
2564
2584
|
e === "standard" && {
|
|
2565
|
-
"on-surface-variant": !
|
|
2566
|
-
"on-primary":
|
|
2585
|
+
"on-surface-variant": !E,
|
|
2586
|
+
"on-primary": E
|
|
2567
2587
|
},
|
|
2568
2588
|
e === "filled" && {
|
|
2569
|
-
"on-surface-variant": !
|
|
2570
|
-
"on-primary":
|
|
2589
|
+
"on-surface-variant": !E && !!c,
|
|
2590
|
+
"on-primary": E || !c
|
|
2571
2591
|
},
|
|
2572
2592
|
e === "tonal" && {
|
|
2573
|
-
"on-secondary":
|
|
2574
|
-
"on-secondary-container": !
|
|
2593
|
+
"on-secondary": E && !!c,
|
|
2594
|
+
"on-secondary-container": !E || !c
|
|
2575
2595
|
},
|
|
2576
2596
|
e === "outlined" && {
|
|
2577
|
-
"inverse-on-surface":
|
|
2578
|
-
"on-surface-variant": !
|
|
2597
|
+
"inverse-on-surface": E && !!c,
|
|
2598
|
+
"on-surface-variant": !E || !c
|
|
2579
2599
|
}
|
|
2580
2600
|
),
|
|
2581
2601
|
stateClassName: "state-ripple-group-[icon-button]"
|
|
2582
2602
|
}
|
|
2583
2603
|
),
|
|
2584
|
-
o && /* @__PURE__ */ m(ie, { icon: o, className:
|
|
2604
|
+
o && /* @__PURE__ */ m(ie, { icon: o, className: H.icon })
|
|
2585
2605
|
]
|
|
2586
2606
|
}
|
|
2587
2607
|
);
|
|
@@ -2595,11 +2615,11 @@ var cn = {
|
|
|
2595
2615
|
prefix: "fas",
|
|
2596
2616
|
iconName: "circle-exclamation",
|
|
2597
2617
|
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
|
|
2598
|
-
},
|
|
2618
|
+
}, Le = {
|
|
2599
2619
|
prefix: "fas",
|
|
2600
2620
|
iconName: "xmark",
|
|
2601
2621
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
2602
|
-
}, un =
|
|
2622
|
+
}, un = Le, dn = {
|
|
2603
2623
|
prefix: "fas",
|
|
2604
2624
|
iconName: "bars",
|
|
2605
2625
|
icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
|
|
@@ -2608,73 +2628,73 @@ const zn = ({
|
|
|
2608
2628
|
className: e,
|
|
2609
2629
|
label: t,
|
|
2610
2630
|
variant: n = "primary",
|
|
2611
|
-
size:
|
|
2631
|
+
size: l = "medium",
|
|
2612
2632
|
href: r,
|
|
2613
2633
|
icon: s,
|
|
2614
2634
|
extended: c = !1,
|
|
2615
|
-
ref:
|
|
2616
|
-
transition:
|
|
2635
|
+
ref: a,
|
|
2636
|
+
transition: u,
|
|
2617
2637
|
children: o,
|
|
2618
|
-
open:
|
|
2619
|
-
defaultOpen:
|
|
2620
|
-
onOpenChange:
|
|
2621
|
-
...
|
|
2638
|
+
open: p,
|
|
2639
|
+
defaultOpen: v = !1,
|
|
2640
|
+
onOpenChange: f,
|
|
2641
|
+
...i
|
|
2622
2642
|
}) => {
|
|
2623
|
-
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2643
|
+
u = { duration: 0.3, ease: "easeInOut", ...u };
|
|
2644
|
+
const d = W(null), h = a || d, w = typeof p == "boolean", [b, g] = $(v), I = w ? p : b, E = (S) => {
|
|
2645
|
+
w || g(S), f == null || f(S);
|
|
2626
2646
|
}, A = Z.Children.toArray(o).filter(
|
|
2627
|
-
(
|
|
2628
|
-
),
|
|
2647
|
+
(S) => Z.isValidElement(S) && S.type === Ce
|
|
2648
|
+
), L = Mt({
|
|
2629
2649
|
href: r,
|
|
2630
2650
|
icon: s,
|
|
2631
2651
|
extended: c,
|
|
2632
2652
|
label: t,
|
|
2633
|
-
size:
|
|
2653
|
+
size: l,
|
|
2634
2654
|
variant: n,
|
|
2635
2655
|
className: e,
|
|
2636
|
-
transition:
|
|
2656
|
+
transition: u,
|
|
2637
2657
|
children: t,
|
|
2638
|
-
open:
|
|
2639
|
-
}),
|
|
2640
|
-
q.create(
|
|
2641
|
-
const M = (
|
|
2642
|
-
|
|
2658
|
+
open: I
|
|
2659
|
+
}), V = q.create(Me), H = q.create(be);
|
|
2660
|
+
q.create(Ce);
|
|
2661
|
+
const M = (S) => /* @__PURE__ */ m(
|
|
2662
|
+
V,
|
|
2643
2663
|
{
|
|
2644
2664
|
icon: s,
|
|
2645
2665
|
extended: c,
|
|
2646
2666
|
label: t,
|
|
2647
2667
|
variant: n + "Container",
|
|
2648
|
-
size:
|
|
2649
|
-
className:
|
|
2650
|
-
"aria-expanded":
|
|
2651
|
-
onClick: () =>
|
|
2668
|
+
size: l,
|
|
2669
|
+
className: L.fab + " " + (e ?? ""),
|
|
2670
|
+
"aria-expanded": I,
|
|
2671
|
+
onClick: () => E(!0),
|
|
2652
2672
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2653
2673
|
transition: {
|
|
2654
|
-
duration:
|
|
2674
|
+
duration: u.duration,
|
|
2655
2675
|
ease: "easeInOut",
|
|
2656
|
-
borderRadius: { duration:
|
|
2657
|
-
background: { duration:
|
|
2658
|
-
...
|
|
2676
|
+
borderRadius: { duration: u.duration, ease: "easeInOut" },
|
|
2677
|
+
background: { duration: u.duration, ease: "easeInOut" },
|
|
2678
|
+
...u
|
|
2659
2679
|
},
|
|
2660
|
-
...
|
|
2680
|
+
...S
|
|
2661
2681
|
}
|
|
2662
|
-
);
|
|
2663
|
-
return /* @__PURE__ */
|
|
2664
|
-
/* @__PURE__ */ m(se, { children:
|
|
2665
|
-
const
|
|
2666
|
-
return A.map((
|
|
2667
|
-
|
|
2668
|
-
const
|
|
2682
|
+
), [x] = $(ge());
|
|
2683
|
+
return /* @__PURE__ */ Y("div", { className: L.fabMenu, ref: h, ...i, children: [
|
|
2684
|
+
/* @__PURE__ */ m(se, { children: I && /* @__PURE__ */ m("div", { className: L.actions, role: "menu", "aria-hidden": !I, children: (() => {
|
|
2685
|
+
const S = A.length;
|
|
2686
|
+
return A.map((O, G) => {
|
|
2687
|
+
O.props;
|
|
2688
|
+
const te = S - 1 - G, _ = ((u == null ? void 0 : u.delay) ?? 0) + te * 0.06, ne = {
|
|
2669
2689
|
open: {
|
|
2670
2690
|
overflow: "visible",
|
|
2671
2691
|
opacity: 1,
|
|
2672
2692
|
width: "auto",
|
|
2673
2693
|
transition: {
|
|
2674
|
-
...
|
|
2675
|
-
delay:
|
|
2694
|
+
...u,
|
|
2695
|
+
delay: _,
|
|
2676
2696
|
opacity: {
|
|
2677
|
-
delay: (
|
|
2697
|
+
delay: (u == null ? void 0 : u.duration) / 2 + _
|
|
2678
2698
|
}
|
|
2679
2699
|
}
|
|
2680
2700
|
},
|
|
@@ -2683,10 +2703,10 @@ const zn = ({
|
|
|
2683
2703
|
opacity: 0,
|
|
2684
2704
|
width: 0,
|
|
2685
2705
|
transition: {
|
|
2686
|
-
...
|
|
2687
|
-
delay:
|
|
2706
|
+
...u,
|
|
2707
|
+
delay: _,
|
|
2688
2708
|
opacity: {
|
|
2689
|
-
duration: (
|
|
2709
|
+
duration: (u == null ? void 0 : u.duration) / 1.5
|
|
2690
2710
|
}
|
|
2691
2711
|
}
|
|
2692
2712
|
}
|
|
@@ -2696,23 +2716,23 @@ const zn = ({
|
|
|
2696
2716
|
{
|
|
2697
2717
|
initial: "close",
|
|
2698
2718
|
animate: "open",
|
|
2699
|
-
variants:
|
|
2700
|
-
transition:
|
|
2719
|
+
variants: ne,
|
|
2720
|
+
transition: u,
|
|
2701
2721
|
exit: "close",
|
|
2702
2722
|
children: Z.cloneElement(
|
|
2703
|
-
|
|
2723
|
+
O,
|
|
2704
2724
|
{
|
|
2705
|
-
key:
|
|
2725
|
+
key: G,
|
|
2706
2726
|
shape: "rounded",
|
|
2707
2727
|
variant: "filled",
|
|
2708
2728
|
className: () => ({
|
|
2709
|
-
button:
|
|
2710
|
-
"px-0": !
|
|
2729
|
+
button: y("max-w-full overflow-hidden", {
|
|
2730
|
+
"px-0": !I,
|
|
2711
2731
|
"bg-primary-container text-on-primary-container ": n === "primary",
|
|
2712
2732
|
"bg-secondary-container text-on-secondary-container": n === "secondary",
|
|
2713
2733
|
"bg-tertiary-container text-on-tertiary-container": n === "tertiary"
|
|
2714
2734
|
}),
|
|
2715
|
-
stateLayer:
|
|
2735
|
+
stateLayer: y({
|
|
2716
2736
|
"state-on-primary-container": n === "primary",
|
|
2717
2737
|
"state-on-secondary-container": n === "secondary",
|
|
2718
2738
|
"state-on-tertiary-container": n === "tertiary"
|
|
@@ -2727,25 +2747,25 @@ const zn = ({
|
|
|
2727
2747
|
M({
|
|
2728
2748
|
className: "invisible pointer-events-none"
|
|
2729
2749
|
}),
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
!
|
|
2750
|
+
/* @__PURE__ */ Y("div", { className: "absolute right-0 top-0", children: [
|
|
2751
|
+
!I && M({
|
|
2732
2752
|
className: "",
|
|
2733
2753
|
layout: !0,
|
|
2734
|
-
layoutId: "fab-menu"
|
|
2754
|
+
layoutId: "fab-menu" + x
|
|
2735
2755
|
}),
|
|
2736
|
-
|
|
2737
|
-
|
|
2756
|
+
I && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
|
|
2757
|
+
H,
|
|
2738
2758
|
{
|
|
2739
2759
|
layout: !0,
|
|
2740
|
-
layoutId: "fab-menu",
|
|
2760
|
+
layoutId: "fab-menu" + x,
|
|
2741
2761
|
variant: "filled",
|
|
2742
2762
|
className: () => ({
|
|
2743
|
-
iconButton:
|
|
2763
|
+
iconButton: y("", {
|
|
2744
2764
|
"bg-primary text-on-primary": n === "primary",
|
|
2745
2765
|
"bg-secondary text-on-secondary": n === "secondary",
|
|
2746
2766
|
"bg-tertiary text-on-tertiary": n === "tertiary"
|
|
2747
2767
|
}),
|
|
2748
|
-
stateLayer:
|
|
2768
|
+
stateLayer: y({
|
|
2749
2769
|
"[--default-color:var(--color-on-primary)]": n === "primary",
|
|
2750
2770
|
"[--default-color:var(--color-on-secondary)]": n === "secondary",
|
|
2751
2771
|
"[--default-color:var(--color-on-tertiary)]": n === "tertiary"
|
|
@@ -2753,20 +2773,20 @@ const zn = ({
|
|
|
2753
2773
|
}),
|
|
2754
2774
|
style: { transition: "border-radius 0.3s ease-in-out" },
|
|
2755
2775
|
transition: {
|
|
2756
|
-
duration:
|
|
2776
|
+
duration: u.duration,
|
|
2757
2777
|
ease: "easeInOut",
|
|
2758
2778
|
borderRadius: {
|
|
2759
|
-
duration:
|
|
2779
|
+
duration: u.duration,
|
|
2760
2780
|
ease: "easeInOut"
|
|
2761
2781
|
},
|
|
2762
2782
|
background: {
|
|
2763
|
-
duration:
|
|
2783
|
+
duration: u.duration,
|
|
2764
2784
|
ease: "easeInOut"
|
|
2765
2785
|
},
|
|
2766
|
-
...
|
|
2786
|
+
...u
|
|
2767
2787
|
},
|
|
2768
2788
|
icon: un,
|
|
2769
|
-
onClick: () =>
|
|
2789
|
+
onClick: () => E(!1),
|
|
2770
2790
|
children: "Close"
|
|
2771
2791
|
}
|
|
2772
2792
|
) })
|
|
@@ -2776,11 +2796,11 @@ const zn = ({
|
|
|
2776
2796
|
className: e,
|
|
2777
2797
|
valueFormatter: t,
|
|
2778
2798
|
step: n = 10,
|
|
2779
|
-
name:
|
|
2799
|
+
name: l,
|
|
2780
2800
|
value: r = 0,
|
|
2781
2801
|
min: s = 0,
|
|
2782
2802
|
max: c = 100,
|
|
2783
|
-
marks:
|
|
2803
|
+
marks: a = [
|
|
2784
2804
|
{
|
|
2785
2805
|
value: 0,
|
|
2786
2806
|
label: "0"
|
|
@@ -2790,40 +2810,40 @@ const zn = ({
|
|
|
2790
2810
|
label: "100"
|
|
2791
2811
|
}
|
|
2792
2812
|
],
|
|
2793
|
-
ref:
|
|
2813
|
+
ref: u,
|
|
2794
2814
|
onChange: o,
|
|
2795
|
-
...
|
|
2815
|
+
...p
|
|
2796
2816
|
}) => {
|
|
2797
|
-
const
|
|
2798
|
-
const k =
|
|
2817
|
+
const v = (B) => {
|
|
2818
|
+
const k = i(), U = f();
|
|
2799
2819
|
return B === 1 / 0 ? 100 : B === -1 / 0 ? 0 : (B - k) / (U - k) * 100;
|
|
2800
|
-
},
|
|
2801
|
-
const k =
|
|
2802
|
-
return (
|
|
2803
|
-
}, [
|
|
2804
|
-
|
|
2820
|
+
}, f = (B = !1) => B ? c : c == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : c, i = (B = !1) => B ? s : s == -1 / 0 ? a[0].value : s, d = (B) => {
|
|
2821
|
+
const k = i(!1);
|
|
2822
|
+
return (f(!1) - k) * B / 100 + k;
|
|
2823
|
+
}, [h, w] = $(!1), b = W(null), g = u || b, [I, E] = $(r), [A, L] = $(v(r)), [V, H] = $(!1), M = (B) => {
|
|
2824
|
+
H(!0), w(!0), O(B);
|
|
2805
2825
|
}, x = () => {
|
|
2806
|
-
|
|
2826
|
+
H(!1), w(!1);
|
|
2807
2827
|
};
|
|
2808
|
-
|
|
2809
|
-
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove",
|
|
2810
|
-
}), [
|
|
2811
|
-
const S =
|
|
2828
|
+
R(() => (V ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", O), window.addEventListener("touchend", x), window.addEventListener("touchmove", O)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", O)), () => {
|
|
2829
|
+
window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", O);
|
|
2830
|
+
}), [V]);
|
|
2831
|
+
const S = Dt({
|
|
2812
2832
|
className: e,
|
|
2813
|
-
isChanging:
|
|
2814
|
-
marks:
|
|
2833
|
+
isChanging: h,
|
|
2834
|
+
marks: a,
|
|
2815
2835
|
max: c,
|
|
2816
2836
|
min: s,
|
|
2817
|
-
name:
|
|
2837
|
+
name: l,
|
|
2818
2838
|
step: n,
|
|
2819
|
-
value:
|
|
2839
|
+
value: I,
|
|
2820
2840
|
valueFormatter: t,
|
|
2821
2841
|
onChange: o
|
|
2822
|
-
}),
|
|
2823
|
-
const k =
|
|
2842
|
+
}), O = (B) => {
|
|
2843
|
+
const k = g == null ? void 0 : g.current;
|
|
2824
2844
|
if (k) {
|
|
2825
|
-
const U = k.getBoundingClientRect().left,
|
|
2826
|
-
G({ percent:
|
|
2845
|
+
const U = k.getBoundingClientRect().left, le = ((B.type === "touchmove" || B.type === "touchstart" ? B.touches[0].clientX : B.clientX) - U) / k.offsetWidth * 100;
|
|
2846
|
+
G({ percent: le });
|
|
2827
2847
|
}
|
|
2828
2848
|
}, G = ({
|
|
2829
2849
|
percent: B,
|
|
@@ -2831,39 +2851,39 @@ const zn = ({
|
|
|
2831
2851
|
}) => {
|
|
2832
2852
|
if (B) {
|
|
2833
2853
|
if (B >= 100) {
|
|
2834
|
-
|
|
2854
|
+
E(f(!0)), L(100);
|
|
2835
2855
|
return;
|
|
2836
2856
|
}
|
|
2837
2857
|
if (B <= 0) {
|
|
2838
|
-
|
|
2858
|
+
E(i(!0)), L(0);
|
|
2839
2859
|
return;
|
|
2840
2860
|
}
|
|
2841
|
-
k =
|
|
2861
|
+
k = d(B), k == i() && (k = i(!0)), k == f() && (k = f(!0));
|
|
2842
2862
|
} else if (k != null) {
|
|
2843
|
-
if (k >=
|
|
2844
|
-
|
|
2863
|
+
if (k >= f()) {
|
|
2864
|
+
E(f(!0)), L(100);
|
|
2845
2865
|
return;
|
|
2846
2866
|
}
|
|
2847
|
-
if (k <=
|
|
2848
|
-
|
|
2867
|
+
if (k <= i()) {
|
|
2868
|
+
E(i(!0)), L(0);
|
|
2849
2869
|
return;
|
|
2850
2870
|
}
|
|
2851
|
-
B =
|
|
2871
|
+
B = v(k);
|
|
2852
2872
|
} else
|
|
2853
2873
|
return;
|
|
2854
|
-
n != null ? k = Math.round((k -
|
|
2855
|
-
let ue = K.value === 1 / 0 ?
|
|
2874
|
+
n != null ? k = Math.round((k - i()) / n) * n + i() : a && (k = a.reduce((U, K, le) => {
|
|
2875
|
+
let ue = K.value === 1 / 0 ? f() : K.value === -1 / 0 ? i() : K.value, C = U.value === 1 / 0 ? f() : U.value === -1 / 0 ? i() : U.value;
|
|
2856
2876
|
return ue = Math.abs(ue - k), C = Math.abs(C - k), ue < C ? K : U;
|
|
2857
|
-
}).value), k >=
|
|
2858
|
-
}, [
|
|
2859
|
-
return
|
|
2877
|
+
}).value), k >= f() && (k = f(!0)), k <= i() && (k = i(!0)), B = v(k), E(k), L(B), o && o(k);
|
|
2878
|
+
}, [te, _] = $(0);
|
|
2879
|
+
return R(() => {
|
|
2860
2880
|
const B = () => {
|
|
2861
|
-
|
|
2881
|
+
g.current && _(g.current.offsetWidth);
|
|
2862
2882
|
};
|
|
2863
2883
|
return B(), window.addEventListener("resize", B), () => {
|
|
2864
2884
|
window.removeEventListener("resize", B);
|
|
2865
2885
|
};
|
|
2866
|
-
}, []), /* @__PURE__ */
|
|
2886
|
+
}, []), /* @__PURE__ */ Y(
|
|
2867
2887
|
"div",
|
|
2868
2888
|
{
|
|
2869
2889
|
tabIndex: 0,
|
|
@@ -2871,17 +2891,17 @@ const zn = ({
|
|
|
2871
2891
|
switch (B.key) {
|
|
2872
2892
|
case "ArrowRight":
|
|
2873
2893
|
if (n)
|
|
2874
|
-
G({ value:
|
|
2875
|
-
else if (
|
|
2876
|
-
const k =
|
|
2894
|
+
G({ value: I + n });
|
|
2895
|
+
else if (a) {
|
|
2896
|
+
const k = a.find((U) => U.value > I);
|
|
2877
2897
|
k && G({ value: k.value });
|
|
2878
2898
|
}
|
|
2879
2899
|
break;
|
|
2880
2900
|
case "ArrowLeft":
|
|
2881
2901
|
if (n)
|
|
2882
|
-
G({ value:
|
|
2883
|
-
else if (
|
|
2884
|
-
const k =
|
|
2902
|
+
G({ value: I - n });
|
|
2903
|
+
else if (a) {
|
|
2904
|
+
const k = a.slice(0).reverse().find((U, K, le) => I === 1 / 0 ? K === 1 : U.value < I);
|
|
2885
2905
|
k && G({ value: k.value });
|
|
2886
2906
|
}
|
|
2887
2907
|
break;
|
|
@@ -2890,21 +2910,21 @@ const zn = ({
|
|
|
2890
2910
|
}
|
|
2891
2911
|
},
|
|
2892
2912
|
role: "slider",
|
|
2893
|
-
"aria-valuemin":
|
|
2894
|
-
"aria-valuemax":
|
|
2895
|
-
"aria-valuenow":
|
|
2896
|
-
"aria-valuetext":
|
|
2913
|
+
"aria-valuemin": i(!0),
|
|
2914
|
+
"aria-valuemax": f(!0),
|
|
2915
|
+
"aria-valuenow": I,
|
|
2916
|
+
"aria-valuetext": I.toString(),
|
|
2897
2917
|
className: S.slider,
|
|
2898
2918
|
onMouseDown: M,
|
|
2899
|
-
onClick:
|
|
2900
|
-
ref:
|
|
2919
|
+
onClick: O,
|
|
2920
|
+
ref: g,
|
|
2901
2921
|
onTouchStart: M,
|
|
2902
2922
|
onDragStart: (B) => B.preventDefault(),
|
|
2903
|
-
...
|
|
2923
|
+
...p,
|
|
2904
2924
|
children: [
|
|
2905
|
-
/* @__PURE__ */ m("input", { type: "hidden", name:
|
|
2925
|
+
/* @__PURE__ */ m("input", { type: "hidden", name: l, value: I }),
|
|
2906
2926
|
/* @__PURE__ */ m("div", { className: S.activeTrack, style: { flex: A / 100 } }),
|
|
2907
|
-
/* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children:
|
|
2927
|
+
/* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: h && /* @__PURE__ */ m(
|
|
2908
2928
|
q.div,
|
|
2909
2929
|
{
|
|
2910
2930
|
className: S.valueIndicator,
|
|
@@ -2921,7 +2941,7 @@ const zn = ({
|
|
|
2921
2941
|
hidden: { opacity: 1, scale: 0 }
|
|
2922
2942
|
},
|
|
2923
2943
|
transition: { duration: 0.1 },
|
|
2924
|
-
children: t ? t(
|
|
2944
|
+
children: t ? t(I) : I
|
|
2925
2945
|
}
|
|
2926
2946
|
) }) }),
|
|
2927
2947
|
/* @__PURE__ */ m(
|
|
@@ -2935,18 +2955,18 @@ const zn = ({
|
|
|
2935
2955
|
"div",
|
|
2936
2956
|
{
|
|
2937
2957
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2938
|
-
children:
|
|
2958
|
+
children: a && a.map((B, k) => {
|
|
2939
2959
|
let U = null;
|
|
2940
|
-
const K = (
|
|
2941
|
-
return
|
|
2960
|
+
const K = (h ? 9 : 10) / te * 100, le = v(B.value);
|
|
2961
|
+
return le <= A - K ? U = !0 : le >= A + K && (U = !1), /* @__PURE__ */ m(
|
|
2942
2962
|
"div",
|
|
2943
2963
|
{
|
|
2944
|
-
className:
|
|
2964
|
+
className: y(S.dot, {
|
|
2945
2965
|
"bg-primary-container": U != null && U,
|
|
2946
2966
|
"bg-primary": U != null && !U
|
|
2947
2967
|
}),
|
|
2948
2968
|
style: {
|
|
2949
|
-
left: `${
|
|
2969
|
+
left: `${v(B.value)}%`
|
|
2950
2970
|
}
|
|
2951
2971
|
},
|
|
2952
2972
|
k
|
|
@@ -2961,86 +2981,86 @@ const zn = ({
|
|
|
2961
2981
|
variant: e = "standard",
|
|
2962
2982
|
className: t,
|
|
2963
2983
|
children: n,
|
|
2964
|
-
title:
|
|
2984
|
+
title: l,
|
|
2965
2985
|
position: r = "right",
|
|
2966
2986
|
extended: s,
|
|
2967
2987
|
divider: c,
|
|
2968
|
-
onExtendedChange:
|
|
2969
|
-
closeIcon:
|
|
2988
|
+
onExtendedChange: a,
|
|
2989
|
+
closeIcon: u = Le,
|
|
2970
2990
|
transition: o,
|
|
2971
|
-
...
|
|
2991
|
+
...p
|
|
2972
2992
|
}) => {
|
|
2973
2993
|
o = { duration: 0.3, ...o };
|
|
2974
|
-
const [
|
|
2994
|
+
const [v, f] = $(s ?? !0), i = Bt({
|
|
2975
2995
|
transition: o,
|
|
2976
|
-
title:
|
|
2996
|
+
title: l,
|
|
2977
2997
|
position: r,
|
|
2978
|
-
closeIcon:
|
|
2998
|
+
closeIcon: u,
|
|
2979
2999
|
className: t,
|
|
2980
3000
|
children: n,
|
|
2981
|
-
onExtendedChange:
|
|
3001
|
+
onExtendedChange: a,
|
|
2982
3002
|
divider: c,
|
|
2983
|
-
isExtended:
|
|
2984
|
-
extended:
|
|
3003
|
+
isExtended: v,
|
|
3004
|
+
extended: v,
|
|
2985
3005
|
variant: e
|
|
2986
3006
|
});
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
}, [
|
|
2990
|
-
s != null &&
|
|
3007
|
+
R(() => {
|
|
3008
|
+
a == null || a(v ?? !1);
|
|
3009
|
+
}, [v]), R(() => {
|
|
3010
|
+
s != null && f(s);
|
|
2991
3011
|
}, [s]);
|
|
2992
|
-
const
|
|
3012
|
+
const d = {
|
|
2993
3013
|
close: {
|
|
2994
3014
|
width: 0
|
|
2995
3015
|
},
|
|
2996
3016
|
open: {
|
|
2997
3017
|
width: "auto"
|
|
2998
3018
|
}
|
|
2999
|
-
},
|
|
3000
|
-
/* @__PURE__ */ m(se, { children: e == "modal" &&
|
|
3019
|
+
}, h = () => /* @__PURE__ */ Y(me, { children: [
|
|
3020
|
+
/* @__PURE__ */ m(se, { children: e == "modal" && v && /* @__PURE__ */ m(
|
|
3001
3021
|
q.div,
|
|
3002
3022
|
{
|
|
3003
3023
|
initial: { opacity: 0 },
|
|
3004
3024
|
animate: { opacity: 1 },
|
|
3005
3025
|
exit: { opacity: 0 },
|
|
3006
3026
|
transition: o,
|
|
3007
|
-
onClick: () =>
|
|
3008
|
-
className:
|
|
3027
|
+
onClick: () => f(!1),
|
|
3028
|
+
className: i.overlay
|
|
3009
3029
|
}
|
|
3010
3030
|
) }),
|
|
3011
|
-
/* @__PURE__ */ m(se, { children:
|
|
3031
|
+
/* @__PURE__ */ m(se, { children: v && /* @__PURE__ */ Y(
|
|
3012
3032
|
"div",
|
|
3013
3033
|
{
|
|
3014
|
-
...
|
|
3015
|
-
className:
|
|
3034
|
+
...p,
|
|
3035
|
+
className: i.sideSheet,
|
|
3016
3036
|
style: { transition: o.duration + "s" },
|
|
3017
3037
|
children: [
|
|
3018
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ Y(
|
|
3019
3039
|
q.div,
|
|
3020
3040
|
{
|
|
3021
|
-
variants:
|
|
3041
|
+
variants: d,
|
|
3022
3042
|
initial: s === !1 ? "open" : "close",
|
|
3023
3043
|
animate: "open",
|
|
3024
3044
|
exit: "close",
|
|
3025
|
-
className:
|
|
3045
|
+
className: i.container,
|
|
3026
3046
|
children: [
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
|
|
3047
|
+
/* @__PURE__ */ Y("div", { className: i.header, children: [
|
|
3048
|
+
l && /* @__PURE__ */ m("p", { className: i.title, children: l }),
|
|
3029
3049
|
/* @__PURE__ */ m(
|
|
3030
3050
|
be,
|
|
3031
3051
|
{
|
|
3032
3052
|
size: "small",
|
|
3033
3053
|
label: "close",
|
|
3034
|
-
icon:
|
|
3035
|
-
onClick: () =>
|
|
3036
|
-
className:
|
|
3054
|
+
icon: u,
|
|
3055
|
+
onClick: () => f(!1),
|
|
3056
|
+
className: i.closeButton
|
|
3037
3057
|
}
|
|
3038
3058
|
)
|
|
3039
3059
|
] }),
|
|
3040
3060
|
/* @__PURE__ */ m(
|
|
3041
3061
|
"div",
|
|
3042
3062
|
{
|
|
3043
|
-
className:
|
|
3063
|
+
className: i.content,
|
|
3044
3064
|
style: { transition: o.duration + "s" },
|
|
3045
3065
|
children: n
|
|
3046
3066
|
}
|
|
@@ -3048,35 +3068,35 @@ const zn = ({
|
|
|
3048
3068
|
]
|
|
3049
3069
|
}
|
|
3050
3070
|
),
|
|
3051
|
-
(c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className:
|
|
3071
|
+
(c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: i.divider, orientation: "vertical" })
|
|
3052
3072
|
]
|
|
3053
3073
|
}
|
|
3054
3074
|
) })
|
|
3055
3075
|
] });
|
|
3056
|
-
return e == "modal" ? Ue(
|
|
3076
|
+
return e == "modal" ? Ue(h(), document.body) : h();
|
|
3057
3077
|
}, nr = ({
|
|
3058
3078
|
message: e,
|
|
3059
3079
|
className: t,
|
|
3060
3080
|
duration: n,
|
|
3061
|
-
closeIcon:
|
|
3081
|
+
closeIcon: l = Le,
|
|
3062
3082
|
onClose: r,
|
|
3063
3083
|
...s
|
|
3064
3084
|
}) => {
|
|
3065
|
-
const [c,
|
|
3085
|
+
const [c, a] = $(!0), u = Wt({
|
|
3066
3086
|
className: t,
|
|
3067
|
-
closeIcon:
|
|
3087
|
+
closeIcon: l,
|
|
3068
3088
|
duration: n,
|
|
3069
3089
|
isVisible: c,
|
|
3070
3090
|
onClose: r,
|
|
3071
3091
|
message: e
|
|
3072
3092
|
});
|
|
3073
|
-
|
|
3093
|
+
R(() => {
|
|
3074
3094
|
n && setTimeout(() => {
|
|
3075
3095
|
o();
|
|
3076
3096
|
}, n);
|
|
3077
3097
|
}, [n]);
|
|
3078
3098
|
const o = () => {
|
|
3079
|
-
|
|
3099
|
+
a(!1), r == null || r();
|
|
3080
3100
|
};
|
|
3081
3101
|
return /* @__PURE__ */ m(se, { children: c && /* @__PURE__ */ m(
|
|
3082
3102
|
q.div,
|
|
@@ -3085,16 +3105,16 @@ const zn = ({
|
|
|
3085
3105
|
animate: { height: "auto" },
|
|
3086
3106
|
exit: { height: 0 },
|
|
3087
3107
|
transition: { duration: 0.1 },
|
|
3088
|
-
className:
|
|
3108
|
+
className: u.snackbar,
|
|
3089
3109
|
...s,
|
|
3090
|
-
children: /* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */ m("p", { className:
|
|
3110
|
+
children: /* @__PURE__ */ Y("div", { className: u.container, children: [
|
|
3111
|
+
/* @__PURE__ */ m("p", { className: u.supportingText, children: e }),
|
|
3092
3112
|
/* @__PURE__ */ m(
|
|
3093
3113
|
be,
|
|
3094
3114
|
{
|
|
3095
3115
|
onClick: () => o(),
|
|
3096
|
-
className:
|
|
3097
|
-
icon:
|
|
3116
|
+
className: u.icon,
|
|
3117
|
+
icon: l,
|
|
3098
3118
|
label: "close the snackbar"
|
|
3099
3119
|
}
|
|
3100
3120
|
)
|
|
@@ -3105,62 +3125,62 @@ const zn = ({
|
|
|
3105
3125
|
selected: e = !1,
|
|
3106
3126
|
className: t,
|
|
3107
3127
|
activeIcon: n,
|
|
3108
|
-
disabled:
|
|
3128
|
+
disabled: l = !1,
|
|
3109
3129
|
inactiveIcon: r,
|
|
3110
3130
|
onChange: s,
|
|
3111
3131
|
onClick: c,
|
|
3112
|
-
onKeyDown:
|
|
3113
|
-
ref:
|
|
3132
|
+
onKeyDown: a,
|
|
3133
|
+
ref: u,
|
|
3114
3134
|
...o
|
|
3115
3135
|
}) => {
|
|
3116
|
-
const [
|
|
3117
|
-
|
|
3118
|
-
},
|
|
3119
|
-
|
|
3120
|
-
},
|
|
3121
|
-
|
|
3122
|
-
},
|
|
3136
|
+
const [p, v] = $(e), f = (g) => {
|
|
3137
|
+
l || (d(), c && c(g));
|
|
3138
|
+
}, i = (g) => {
|
|
3139
|
+
l || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), d()), a && a(g));
|
|
3140
|
+
}, d = () => {
|
|
3141
|
+
v(!p), s == null || s(!p);
|
|
3142
|
+
}, h = At({
|
|
3123
3143
|
className: t,
|
|
3124
|
-
isSelected:
|
|
3144
|
+
isSelected: p,
|
|
3125
3145
|
activeIcon: n,
|
|
3126
3146
|
inactiveIcon: r,
|
|
3127
|
-
disabled:
|
|
3128
|
-
selected:
|
|
3147
|
+
disabled: l,
|
|
3148
|
+
selected: p,
|
|
3129
3149
|
onChange: s
|
|
3130
|
-
}),
|
|
3131
|
-
return /* @__PURE__ */
|
|
3150
|
+
}), w = W(null), b = u || w;
|
|
3151
|
+
return /* @__PURE__ */ Y(
|
|
3132
3152
|
q.div,
|
|
3133
3153
|
{
|
|
3134
3154
|
role: "switch",
|
|
3135
|
-
"aria-checked":
|
|
3136
|
-
tabIndex:
|
|
3137
|
-
onKeyDown:
|
|
3138
|
-
onClick:
|
|
3139
|
-
ref:
|
|
3140
|
-
className:
|
|
3155
|
+
"aria-checked": p,
|
|
3156
|
+
tabIndex: l ? -1 : 0,
|
|
3157
|
+
onKeyDown: i,
|
|
3158
|
+
onClick: f,
|
|
3159
|
+
ref: b,
|
|
3160
|
+
className: h.switch,
|
|
3141
3161
|
...o,
|
|
3142
3162
|
children: [
|
|
3143
|
-
/* @__PURE__ */ m("input", { type: "hidden", value:
|
|
3144
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ m("input", { type: "hidden", value: p ? "1" : "0" }),
|
|
3164
|
+
/* @__PURE__ */ Y(
|
|
3145
3165
|
q.div,
|
|
3146
3166
|
{
|
|
3147
3167
|
layout: !0,
|
|
3148
|
-
style: { translate:
|
|
3168
|
+
style: { translate: p ? "50%" : "-50%" },
|
|
3149
3169
|
transition: {
|
|
3150
3170
|
type: "spring",
|
|
3151
3171
|
stiffness: 700,
|
|
3152
3172
|
damping: 30
|
|
3153
3173
|
},
|
|
3154
|
-
className:
|
|
3174
|
+
className: h.handleContainer,
|
|
3155
3175
|
children: [
|
|
3156
|
-
/* @__PURE__ */ m("div", { className:
|
|
3176
|
+
/* @__PURE__ */ m("div", { className: h.handle, children: (p ? n : r) && /* @__PURE__ */ m(
|
|
3157
3177
|
ie,
|
|
3158
3178
|
{
|
|
3159
|
-
className:
|
|
3160
|
-
icon:
|
|
3179
|
+
className: h.icon,
|
|
3180
|
+
icon: p ? n : r
|
|
3161
3181
|
}
|
|
3162
3182
|
) }),
|
|
3163
|
-
/* @__PURE__ */ m("div", { className:
|
|
3183
|
+
/* @__PURE__ */ m("div", { className: h.handleStateLayer })
|
|
3164
3184
|
]
|
|
3165
3185
|
}
|
|
3166
3186
|
)
|
|
@@ -3171,75 +3191,75 @@ const zn = ({
|
|
|
3171
3191
|
className: e,
|
|
3172
3192
|
onClick: t,
|
|
3173
3193
|
label: n,
|
|
3174
|
-
variant:
|
|
3194
|
+
variant: l = "primary",
|
|
3175
3195
|
href: r,
|
|
3176
3196
|
icon: s,
|
|
3177
3197
|
selectedTab: c,
|
|
3178
|
-
setSelectedTab:
|
|
3179
|
-
tabsId:
|
|
3198
|
+
setSelectedTab: a,
|
|
3199
|
+
tabsId: u,
|
|
3180
3200
|
index: o,
|
|
3181
|
-
onTabSelected:
|
|
3182
|
-
scrollable:
|
|
3183
|
-
selected:
|
|
3184
|
-
ref:
|
|
3185
|
-
...
|
|
3201
|
+
onTabSelected: p,
|
|
3202
|
+
scrollable: v = !1,
|
|
3203
|
+
selected: f = !1,
|
|
3204
|
+
ref: i,
|
|
3205
|
+
...d
|
|
3186
3206
|
}) => {
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
}, [c]),
|
|
3191
|
-
c == o &&
|
|
3192
|
-
ref:
|
|
3207
|
+
const h = W(null), w = i || h, [b, g] = $(f);
|
|
3208
|
+
R(() => {
|
|
3209
|
+
f && c == null ? g(!0) : g(c == o && o != null);
|
|
3210
|
+
}, [c]), R(() => {
|
|
3211
|
+
c == o && p && p({
|
|
3212
|
+
ref: w,
|
|
3193
3213
|
index: o || 0,
|
|
3194
3214
|
label: n,
|
|
3195
3215
|
icon: s
|
|
3196
3216
|
});
|
|
3197
3217
|
}, [c]);
|
|
3198
|
-
const
|
|
3199
|
-
|
|
3218
|
+
const I = r ? "a" : "button", E = (L) => {
|
|
3219
|
+
a && a(o ?? null), t && t(L);
|
|
3200
3220
|
}, A = Pt({
|
|
3201
3221
|
className: e,
|
|
3202
|
-
onTabSelected:
|
|
3203
|
-
scrollable:
|
|
3222
|
+
onTabSelected: p,
|
|
3223
|
+
scrollable: v,
|
|
3204
3224
|
selectedTab: c,
|
|
3205
3225
|
index: o,
|
|
3206
|
-
tabsId:
|
|
3207
|
-
selected:
|
|
3208
|
-
variant:
|
|
3226
|
+
tabsId: u,
|
|
3227
|
+
selected: b,
|
|
3228
|
+
variant: l,
|
|
3209
3229
|
icon: s,
|
|
3210
3230
|
label: n,
|
|
3211
|
-
isSelected:
|
|
3212
|
-
setSelectedTab:
|
|
3231
|
+
isSelected: b,
|
|
3232
|
+
setSelectedTab: a,
|
|
3213
3233
|
href: r
|
|
3214
3234
|
});
|
|
3215
|
-
return /* @__PURE__ */
|
|
3216
|
-
|
|
3235
|
+
return /* @__PURE__ */ Y(
|
|
3236
|
+
I,
|
|
3217
3237
|
{
|
|
3218
|
-
...
|
|
3238
|
+
...d,
|
|
3219
3239
|
role: "tab",
|
|
3220
|
-
"aria-selected":
|
|
3221
|
-
ref:
|
|
3240
|
+
"aria-selected": b,
|
|
3241
|
+
ref: w,
|
|
3222
3242
|
href: r,
|
|
3223
3243
|
className: A.tab,
|
|
3224
|
-
onClick:
|
|
3225
|
-
...
|
|
3244
|
+
onClick: E,
|
|
3245
|
+
...d,
|
|
3226
3246
|
children: [
|
|
3227
3247
|
/* @__PURE__ */ m(
|
|
3228
3248
|
ye,
|
|
3229
3249
|
{
|
|
3230
3250
|
style: { transition: 0.3 + "s" },
|
|
3231
3251
|
className: A.stateLayer,
|
|
3232
|
-
colorName:
|
|
3252
|
+
colorName: l === "primary" && b ? "primary" : "on-surface",
|
|
3233
3253
|
stateClassName: "state-ripple-group-[tab]"
|
|
3234
3254
|
}
|
|
3235
3255
|
),
|
|
3236
|
-
/* @__PURE__ */
|
|
3256
|
+
/* @__PURE__ */ Y("span", { className: A.content, children: [
|
|
3237
3257
|
s && /* @__PURE__ */ m(ie, { icon: s, className: A.icon }),
|
|
3238
3258
|
/* @__PURE__ */ m("span", { className: A.label, children: n }),
|
|
3239
|
-
|
|
3259
|
+
b && /* @__PURE__ */ m(
|
|
3240
3260
|
q.span,
|
|
3241
3261
|
{
|
|
3242
|
-
layoutId: `underline-${
|
|
3262
|
+
layoutId: `underline-${u}`,
|
|
3243
3263
|
className: A.underline,
|
|
3244
3264
|
transition: { duration: 0.3 }
|
|
3245
3265
|
}
|
|
@@ -3252,125 +3272,125 @@ const zn = ({
|
|
|
3252
3272
|
variant: e = "primary",
|
|
3253
3273
|
onTabSelected: t,
|
|
3254
3274
|
children: n,
|
|
3255
|
-
className:
|
|
3275
|
+
className: l,
|
|
3256
3276
|
selectedTab: r,
|
|
3257
3277
|
setSelectedTab: s,
|
|
3258
3278
|
scrollable: c = !1
|
|
3259
3279
|
}) => {
|
|
3260
|
-
const [
|
|
3280
|
+
const [a, u] = $(
|
|
3261
3281
|
null
|
|
3262
3282
|
);
|
|
3263
3283
|
let o;
|
|
3264
|
-
r == 0 || r != null ? o = r : o =
|
|
3265
|
-
const
|
|
3266
|
-
(
|
|
3267
|
-
),
|
|
3268
|
-
if (t == null || t(
|
|
3269
|
-
const
|
|
3270
|
-
if (
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3284
|
+
r == 0 || r != null ? o = r : o = a;
|
|
3285
|
+
const p = s || u, v = Z.Children.toArray(n).filter(
|
|
3286
|
+
(w) => Z.isValidElement(w) && w.type === fn
|
|
3287
|
+
), f = Z.useRef(null), i = (w) => {
|
|
3288
|
+
if (t == null || t(w), c) {
|
|
3289
|
+
const b = f.current, g = w.ref.current;
|
|
3290
|
+
if (b && g) {
|
|
3291
|
+
const I = g.offsetLeft + g.offsetWidth / 2 - b.offsetWidth / 2;
|
|
3292
|
+
b.scrollTo({ left: I, behavior: "smooth" });
|
|
3273
3293
|
}
|
|
3274
3294
|
}
|
|
3275
|
-
},
|
|
3295
|
+
}, d = $e(() => ge(), []), h = Ht({
|
|
3276
3296
|
children: n,
|
|
3277
3297
|
onTabSelected: t,
|
|
3278
3298
|
scrollable: c,
|
|
3279
3299
|
selectedTab: o,
|
|
3280
|
-
setSelectedTab:
|
|
3281
|
-
className:
|
|
3300
|
+
setSelectedTab: p,
|
|
3301
|
+
className: l,
|
|
3282
3302
|
variant: e
|
|
3283
3303
|
});
|
|
3284
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3285
|
-
key:
|
|
3286
|
-
index:
|
|
3304
|
+
return /* @__PURE__ */ m("div", { ref: f, role: "tablist", className: h.tabs, children: v.map((w, b) => Z.cloneElement(w, {
|
|
3305
|
+
key: b,
|
|
3306
|
+
index: b,
|
|
3287
3307
|
variant: e,
|
|
3288
3308
|
selectedTab: o,
|
|
3289
|
-
setSelectedTab:
|
|
3290
|
-
tabsId:
|
|
3291
|
-
onTabSelected:
|
|
3309
|
+
setSelectedTab: p,
|
|
3310
|
+
tabsId: d,
|
|
3311
|
+
onTabSelected: i,
|
|
3292
3312
|
scrollable: c
|
|
3293
3313
|
})) });
|
|
3294
|
-
},
|
|
3314
|
+
}, lr = ({
|
|
3295
3315
|
variant: e = "filled",
|
|
3296
3316
|
disabled: t = !1,
|
|
3297
3317
|
errorText: n,
|
|
3298
|
-
placeholder:
|
|
3318
|
+
placeholder: l,
|
|
3299
3319
|
suffix: r,
|
|
3300
3320
|
name: s,
|
|
3301
3321
|
label: c,
|
|
3302
|
-
className:
|
|
3303
|
-
supportingText:
|
|
3322
|
+
className: a,
|
|
3323
|
+
supportingText: u,
|
|
3304
3324
|
trailingIcon: o,
|
|
3305
|
-
leadingIcon:
|
|
3306
|
-
type:
|
|
3307
|
-
textLine:
|
|
3308
|
-
autoComplete:
|
|
3309
|
-
onChange:
|
|
3310
|
-
value:
|
|
3311
|
-
showSupportingText:
|
|
3312
|
-
...
|
|
3325
|
+
leadingIcon: p,
|
|
3326
|
+
type: v = "text",
|
|
3327
|
+
textLine: f = "singleLine",
|
|
3328
|
+
autoComplete: i = "on",
|
|
3329
|
+
onChange: d,
|
|
3330
|
+
value: h,
|
|
3331
|
+
showSupportingText: w = !1,
|
|
3332
|
+
...b
|
|
3313
3333
|
}) => {
|
|
3314
|
-
const [
|
|
3315
|
-
|
|
3334
|
+
const [g, I] = $(h ?? ""), [E, A] = $(!1), [L, V] = $(!1), [H, M] = $(
|
|
3335
|
+
w
|
|
3316
3336
|
);
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
}, [
|
|
3320
|
-
n != null && n.length ?
|
|
3321
|
-
}, [n]),
|
|
3322
|
-
|
|
3323
|
-
}, [
|
|
3324
|
-
|
|
3325
|
-
}, [
|
|
3337
|
+
R(() => {
|
|
3338
|
+
I(h ?? "");
|
|
3339
|
+
}, [h]), R(() => {
|
|
3340
|
+
n != null && n.length ? V(!0) : V(!1);
|
|
3341
|
+
}, [n]), R(() => {
|
|
3342
|
+
w ? M(w) : u != null && u.length ? M(!0) : M(!1);
|
|
3343
|
+
}, [H, u]), R(() => {
|
|
3344
|
+
E && V(!1);
|
|
3345
|
+
}, [E]);
|
|
3326
3346
|
const x = Z.useRef(null), S = () => {
|
|
3327
|
-
x.current && !
|
|
3328
|
-
},
|
|
3347
|
+
x.current && !E && x.current.focus();
|
|
3348
|
+
}, O = () => {
|
|
3329
3349
|
A(!0);
|
|
3330
3350
|
}, G = (U) => {
|
|
3331
3351
|
const K = U.target.value;
|
|
3332
|
-
|
|
3333
|
-
},
|
|
3352
|
+
I(K), V(!1), typeof d == "function" && d(K);
|
|
3353
|
+
}, te = () => {
|
|
3334
3354
|
A(!1);
|
|
3335
|
-
}, _ =
|
|
3336
|
-
showSupportingText:
|
|
3337
|
-
isFocused:
|
|
3338
|
-
showErrorIcon:
|
|
3355
|
+
}, _ = Ft({
|
|
3356
|
+
showSupportingText: H,
|
|
3357
|
+
isFocused: E,
|
|
3358
|
+
showErrorIcon: L,
|
|
3339
3359
|
disabled: t,
|
|
3340
3360
|
name: s,
|
|
3341
3361
|
label: c,
|
|
3342
|
-
autoComplete:
|
|
3343
|
-
className:
|
|
3344
|
-
onChange:
|
|
3345
|
-
placeholder:
|
|
3346
|
-
supportingText:
|
|
3347
|
-
type:
|
|
3348
|
-
leadingIcon:
|
|
3362
|
+
autoComplete: i,
|
|
3363
|
+
className: a,
|
|
3364
|
+
onChange: d,
|
|
3365
|
+
placeholder: l,
|
|
3366
|
+
supportingText: u,
|
|
3367
|
+
type: v,
|
|
3368
|
+
leadingIcon: p,
|
|
3349
3369
|
trailingIcon: o,
|
|
3350
3370
|
variant: e,
|
|
3351
3371
|
errorText: n,
|
|
3352
|
-
value:
|
|
3372
|
+
value: g,
|
|
3353
3373
|
suffix: r,
|
|
3354
|
-
textLine:
|
|
3355
|
-
}), [ne] =
|
|
3374
|
+
textLine: f
|
|
3375
|
+
}), [ne] = $(ge());
|
|
3356
3376
|
let B, k;
|
|
3357
|
-
switch (
|
|
3377
|
+
switch (f) {
|
|
3358
3378
|
case "multiLine":
|
|
3359
|
-
k =
|
|
3379
|
+
k = gt, B = {};
|
|
3360
3380
|
break;
|
|
3361
3381
|
case "textAreas":
|
|
3362
3382
|
k = "textarea", B = {};
|
|
3363
3383
|
break;
|
|
3364
3384
|
case "singleLine":
|
|
3365
3385
|
default:
|
|
3366
|
-
k = "input", B = { type:
|
|
3386
|
+
k = "input", B = { type: v };
|
|
3367
3387
|
break;
|
|
3368
3388
|
}
|
|
3369
|
-
return /* @__PURE__ */
|
|
3370
|
-
/* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ Y("div", { className: _.textField, ...b, children: [
|
|
3390
|
+
/* @__PURE__ */ Y("fieldset", { onClick: S, className: _.content, children: [
|
|
3371
3391
|
/* @__PURE__ */ m("div", { className: _.stateLayer }),
|
|
3372
|
-
|
|
3373
|
-
!(!
|
|
3392
|
+
p && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(p) ? p : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: p }) }),
|
|
3393
|
+
!(!E && !g.length || e == "filled") && /* @__PURE__ */ m(
|
|
3374
3394
|
q.legend,
|
|
3375
3395
|
{
|
|
3376
3396
|
variants: {
|
|
@@ -3378,7 +3398,7 @@ const zn = ({
|
|
|
3378
3398
|
visible: { width: "auto", padding: "0 8px" }
|
|
3379
3399
|
},
|
|
3380
3400
|
initial: "hidden",
|
|
3381
|
-
animate: !
|
|
3401
|
+
animate: !E && !g.length ? "hidden" : "visible",
|
|
3382
3402
|
className: "max-w-full ml-2 px-2 text-body-small h-0",
|
|
3383
3403
|
transition: { duration: 0.2 },
|
|
3384
3404
|
children: /* @__PURE__ */ m("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ m(
|
|
@@ -3392,16 +3412,16 @@ const zn = ({
|
|
|
3392
3412
|
) })
|
|
3393
3413
|
}
|
|
3394
3414
|
),
|
|
3395
|
-
/* @__PURE__ */
|
|
3396
|
-
(!
|
|
3415
|
+
/* @__PURE__ */ Y("div", { className: "flex-1 relative", children: [
|
|
3416
|
+
(!E && !g.length || e == "filled") && /* @__PURE__ */ m(
|
|
3397
3417
|
q.label,
|
|
3398
3418
|
{
|
|
3399
3419
|
htmlFor: s,
|
|
3400
|
-
className:
|
|
3420
|
+
className: y(
|
|
3401
3421
|
"absolute left-4 transition-all duration-300",
|
|
3402
3422
|
{
|
|
3403
|
-
"text-body-small top-2": e == "filled" && !(!
|
|
3404
|
-
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!
|
|
3423
|
+
"text-body-small top-2": e == "filled" && !(!E && !g.length),
|
|
3424
|
+
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!E && !g.length))
|
|
3405
3425
|
}
|
|
3406
3426
|
),
|
|
3407
3427
|
transition: { duration: 0.3 },
|
|
@@ -3420,16 +3440,16 @@ const zn = ({
|
|
|
3420
3440
|
k,
|
|
3421
3441
|
{
|
|
3422
3442
|
ref: x,
|
|
3423
|
-
value:
|
|
3443
|
+
value: g,
|
|
3424
3444
|
onChange: G,
|
|
3425
3445
|
className: _.input,
|
|
3426
3446
|
id: s,
|
|
3427
3447
|
name: s,
|
|
3428
|
-
placeholder:
|
|
3429
|
-
onFocus:
|
|
3430
|
-
onBlur:
|
|
3448
|
+
placeholder: E ? l ?? void 0 : "",
|
|
3449
|
+
onFocus: O,
|
|
3450
|
+
onBlur: te,
|
|
3431
3451
|
disabled: t,
|
|
3432
|
-
autoComplete:
|
|
3452
|
+
autoComplete: i,
|
|
3433
3453
|
"aria-invalid": !!(n != null && n.length),
|
|
3434
3454
|
"aria-label": c,
|
|
3435
3455
|
...B
|
|
@@ -3437,7 +3457,7 @@ const zn = ({
|
|
|
3437
3457
|
)
|
|
3438
3458
|
] }),
|
|
3439
3459
|
/* @__PURE__ */ m("div", { className: _.activeIndicator }),
|
|
3440
|
-
!
|
|
3460
|
+
!L && /* @__PURE__ */ Y(me, { children: [
|
|
3441
3461
|
o && /* @__PURE__ */ m(
|
|
3442
3462
|
"div",
|
|
3443
3463
|
{
|
|
@@ -3450,10 +3470,10 @@ const zn = ({
|
|
|
3450
3470
|
),
|
|
3451
3471
|
!o && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
|
|
3452
3472
|
] }),
|
|
3453
|
-
|
|
3473
|
+
L && /* @__PURE__ */ m(
|
|
3454
3474
|
"div",
|
|
3455
3475
|
{
|
|
3456
|
-
className:
|
|
3476
|
+
className: y(_.trailingIcon, {
|
|
3457
3477
|
" absolute right-0": !o
|
|
3458
3478
|
}),
|
|
3459
3479
|
children: /* @__PURE__ */ m(
|
|
@@ -3466,39 +3486,39 @@ const zn = ({
|
|
|
3466
3486
|
}
|
|
3467
3487
|
)
|
|
3468
3488
|
] }),
|
|
3469
|
-
|
|
3489
|
+
H && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : u != null && u.length ? u : " " })
|
|
3470
3490
|
] });
|
|
3471
|
-
}, mn = ({ isSelected: e, icon: t, label: n, variant:
|
|
3472
|
-
navigationRailItem:
|
|
3491
|
+
}, mn = ({ isSelected: e, icon: t, label: n, variant: l }) => ({
|
|
3492
|
+
navigationRailItem: y(
|
|
3473
3493
|
" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",
|
|
3474
3494
|
{
|
|
3475
3495
|
"text-on-surface-variant": !e,
|
|
3476
3496
|
"text-on-secondary-container": e,
|
|
3477
|
-
"gap-2 h-[68px]":
|
|
3478
|
-
"gap-0 h-[66px]":
|
|
3497
|
+
"gap-2 h-[68px]": l == "vertical",
|
|
3498
|
+
"gap-0 h-[66px]": l == "horizontal"
|
|
3479
3499
|
}
|
|
3480
3500
|
),
|
|
3481
|
-
container:
|
|
3501
|
+
container: y(
|
|
3482
3502
|
" w-fit flex justify-center relative rounded-full items-center mx-5",
|
|
3483
3503
|
{
|
|
3484
3504
|
"bg-secondary-container overflow-hidden": e,
|
|
3485
|
-
"gap-2 ":
|
|
3486
|
-
"gap-0 ":
|
|
3505
|
+
"gap-2 ": l == "horizontal",
|
|
3506
|
+
"gap-0 ": l == "vertical",
|
|
3487
3507
|
"p-4": !n
|
|
3488
3508
|
},
|
|
3489
3509
|
n && [
|
|
3490
3510
|
"px-4",
|
|
3491
3511
|
{
|
|
3492
|
-
"py-1 ":
|
|
3493
|
-
"py-4 ":
|
|
3512
|
+
"py-1 ": l == "vertical",
|
|
3513
|
+
"py-4 ": l == "horizontal"
|
|
3494
3514
|
}
|
|
3495
3515
|
]
|
|
3496
3516
|
),
|
|
3497
|
-
stateLayer:
|
|
3498
|
-
icon:
|
|
3499
|
-
label:
|
|
3500
|
-
"text-label-large ":
|
|
3501
|
-
"text-label-medium":
|
|
3517
|
+
stateLayer: y("rounded-full"),
|
|
3518
|
+
icon: y("size-6 flex"),
|
|
3519
|
+
label: y("w-fit mx-auto text-nowrap", {
|
|
3520
|
+
"text-label-large ": l == "horizontal",
|
|
3521
|
+
"text-label-medium": l == "vertical"
|
|
3502
3522
|
})
|
|
3503
3523
|
}), hn = J(
|
|
3504
3524
|
"navigationRailItem",
|
|
@@ -3507,85 +3527,85 @@ const zn = ({
|
|
|
3507
3527
|
className: e,
|
|
3508
3528
|
onClick: t,
|
|
3509
3529
|
label: n,
|
|
3510
|
-
variant:
|
|
3530
|
+
variant: l = "vertical",
|
|
3511
3531
|
href: r,
|
|
3512
3532
|
icon: s,
|
|
3513
3533
|
selectedItem: c,
|
|
3514
|
-
setSelectedItem:
|
|
3515
|
-
index:
|
|
3534
|
+
setSelectedItem: a,
|
|
3535
|
+
index: u,
|
|
3516
3536
|
onItemSelected: o,
|
|
3517
|
-
selected:
|
|
3518
|
-
ref:
|
|
3519
|
-
transition:
|
|
3520
|
-
isExtended:
|
|
3521
|
-
iconSelected:
|
|
3522
|
-
style:
|
|
3523
|
-
extendedOnly:
|
|
3524
|
-
children:
|
|
3525
|
-
...
|
|
3537
|
+
selected: p = !1,
|
|
3538
|
+
ref: v,
|
|
3539
|
+
transition: f,
|
|
3540
|
+
isExtended: i,
|
|
3541
|
+
iconSelected: d,
|
|
3542
|
+
style: h,
|
|
3543
|
+
extendedOnly: w,
|
|
3544
|
+
children: b,
|
|
3545
|
+
...g
|
|
3526
3546
|
}) => {
|
|
3527
|
-
|
|
3528
|
-
const
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
}, [c]),
|
|
3532
|
-
c ==
|
|
3533
|
-
ref:
|
|
3534
|
-
index:
|
|
3547
|
+
b && (n = b);
|
|
3548
|
+
const I = W(null), E = v || I, [A, L] = $(p);
|
|
3549
|
+
R(() => {
|
|
3550
|
+
p && c == null ? L(!0) : L(c == u && u != null);
|
|
3551
|
+
}, [c]), R(() => {
|
|
3552
|
+
c == u && o && o({
|
|
3553
|
+
ref: E,
|
|
3554
|
+
index: u || 0,
|
|
3535
3555
|
label: n,
|
|
3536
3556
|
icon: s
|
|
3537
3557
|
});
|
|
3538
3558
|
}, [c]);
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3559
|
+
const V = r ? "a" : "button", H = (x) => {
|
|
3560
|
+
a && a(u ?? null), t && t(x);
|
|
3541
3561
|
}, M = hn({
|
|
3542
|
-
isExtended:
|
|
3543
|
-
extendedOnly:
|
|
3562
|
+
isExtended: i,
|
|
3563
|
+
extendedOnly: w,
|
|
3544
3564
|
className: e,
|
|
3545
3565
|
onItemSelected: o,
|
|
3546
3566
|
selectedItem: c,
|
|
3547
|
-
index:
|
|
3548
|
-
transition:
|
|
3567
|
+
index: u,
|
|
3568
|
+
transition: f,
|
|
3549
3569
|
selected: A,
|
|
3550
|
-
variant:
|
|
3570
|
+
variant: l,
|
|
3551
3571
|
icon: s,
|
|
3552
3572
|
label: n,
|
|
3553
3573
|
isSelected: A,
|
|
3554
|
-
setSelectedItem:
|
|
3574
|
+
setSelectedItem: a,
|
|
3555
3575
|
href: r,
|
|
3556
3576
|
children: n,
|
|
3557
|
-
iconSelected:
|
|
3577
|
+
iconSelected: d
|
|
3558
3578
|
});
|
|
3559
|
-
return
|
|
3579
|
+
return f = { duration: 0.3, ...f }, w && !i ? null : (
|
|
3560
3580
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3561
3581
|
// @ts-expect-error
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
|
|
3582
|
+
/* @__PURE__ */ Y(
|
|
3583
|
+
V,
|
|
3564
3584
|
{
|
|
3565
|
-
...
|
|
3585
|
+
...g,
|
|
3566
3586
|
role: "tab",
|
|
3567
3587
|
"aria-selected": A,
|
|
3568
|
-
ref:
|
|
3588
|
+
ref: E,
|
|
3569
3589
|
href: r,
|
|
3570
3590
|
className: M.navigationRailItem,
|
|
3571
|
-
onClick:
|
|
3572
|
-
style: { transition:
|
|
3591
|
+
onClick: H,
|
|
3592
|
+
style: { transition: f.duration + "s", ...h },
|
|
3573
3593
|
children: [
|
|
3574
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ Y(
|
|
3575
3595
|
q.div,
|
|
3576
3596
|
{
|
|
3577
3597
|
style: {
|
|
3578
|
-
transition:
|
|
3598
|
+
transition: l == "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`
|
|
3579
3599
|
},
|
|
3580
|
-
transition:
|
|
3600
|
+
transition: f,
|
|
3581
3601
|
className: M.container,
|
|
3582
3602
|
children: [
|
|
3583
3603
|
/* @__PURE__ */ m(
|
|
3584
3604
|
ye,
|
|
3585
3605
|
{
|
|
3586
|
-
style: { transition:
|
|
3606
|
+
style: { transition: f.duration + "s" },
|
|
3587
3607
|
className: M.stateLayer,
|
|
3588
|
-
colorName:
|
|
3608
|
+
colorName: y({
|
|
3589
3609
|
"on-surface": !A,
|
|
3590
3610
|
"on-secondary-container": A
|
|
3591
3611
|
}),
|
|
@@ -3595,25 +3615,25 @@ const zn = ({
|
|
|
3595
3615
|
s && /* @__PURE__ */ m(
|
|
3596
3616
|
ie,
|
|
3597
3617
|
{
|
|
3598
|
-
icon: A ?
|
|
3618
|
+
icon: A ? d : s,
|
|
3599
3619
|
className: M.icon
|
|
3600
3620
|
}
|
|
3601
3621
|
),
|
|
3602
|
-
/* @__PURE__ */ m(se, { children:
|
|
3622
|
+
/* @__PURE__ */ m(se, { children: l == "horizontal" && (() => {
|
|
3603
3623
|
const x = {
|
|
3604
3624
|
width: 0,
|
|
3605
3625
|
opacity: 0,
|
|
3606
3626
|
transition: {
|
|
3607
|
-
...
|
|
3627
|
+
...f
|
|
3608
3628
|
}
|
|
3609
3629
|
}, S = {
|
|
3610
3630
|
width: "auto",
|
|
3611
3631
|
opacity: 1,
|
|
3612
3632
|
transition: {
|
|
3613
|
-
...
|
|
3633
|
+
...f,
|
|
3614
3634
|
opacity: {
|
|
3615
|
-
duration:
|
|
3616
|
-
delay:
|
|
3635
|
+
duration: f.duration / 2,
|
|
3636
|
+
delay: f.duration - f.duration / 2
|
|
3617
3637
|
}
|
|
3618
3638
|
}
|
|
3619
3639
|
};
|
|
@@ -3631,12 +3651,12 @@ const zn = ({
|
|
|
3631
3651
|
]
|
|
3632
3652
|
}
|
|
3633
3653
|
),
|
|
3634
|
-
/* @__PURE__ */ m(se, { children:
|
|
3654
|
+
/* @__PURE__ */ m(se, { children: l == "vertical" && (() => {
|
|
3635
3655
|
const x = {
|
|
3636
3656
|
height: 0,
|
|
3637
3657
|
opacity: 0,
|
|
3638
3658
|
transition: {
|
|
3639
|
-
...
|
|
3659
|
+
...f,
|
|
3640
3660
|
opacity: {
|
|
3641
3661
|
duration: 0
|
|
3642
3662
|
}
|
|
@@ -3645,10 +3665,10 @@ const zn = ({
|
|
|
3645
3665
|
height: "auto",
|
|
3646
3666
|
opacity: 1,
|
|
3647
3667
|
transition: {
|
|
3648
|
-
...
|
|
3668
|
+
...f,
|
|
3649
3669
|
opacity: {
|
|
3650
|
-
duration:
|
|
3651
|
-
delay:
|
|
3670
|
+
duration: f.duration / 3,
|
|
3671
|
+
delay: f.duration - f.duration / 3
|
|
3652
3672
|
}
|
|
3653
3673
|
}
|
|
3654
3674
|
};
|
|
@@ -3659,7 +3679,7 @@ const zn = ({
|
|
|
3659
3679
|
animate: S,
|
|
3660
3680
|
exit: x,
|
|
3661
3681
|
className: M.label,
|
|
3662
|
-
transition:
|
|
3682
|
+
transition: f,
|
|
3663
3683
|
children: n
|
|
3664
3684
|
}
|
|
3665
3685
|
);
|
|
@@ -3672,100 +3692,100 @@ const zn = ({
|
|
|
3672
3692
|
isExtended: e,
|
|
3673
3693
|
alignment: t
|
|
3674
3694
|
}) => ({
|
|
3675
|
-
navigationRail:
|
|
3695
|
+
navigationRail: y("flex flex-col left-0 h-full top-0 pt-11", {
|
|
3676
3696
|
"w-fit max-w-24": !e,
|
|
3677
3697
|
"w-fit min-w-[220px] max-w-[360px]": e,
|
|
3678
3698
|
"justify-between": t == "middle",
|
|
3679
3699
|
"justify-start": t == "top"
|
|
3680
3700
|
}),
|
|
3681
|
-
header:
|
|
3701
|
+
header: y("flex flex-col gap-1 items-start"),
|
|
3682
3702
|
menuIcon: "mx-5",
|
|
3683
|
-
segments:
|
|
3703
|
+
segments: y(" flex flex-col overflow-auto min-w-full mt-10", {
|
|
3684
3704
|
"w-full": !e,
|
|
3685
3705
|
"w-fit items-start": e
|
|
3686
3706
|
})
|
|
3687
3707
|
}), vn = J(
|
|
3688
3708
|
"navigationRail",
|
|
3689
3709
|
wn
|
|
3690
|
-
),
|
|
3710
|
+
), ar = ({
|
|
3691
3711
|
variant: e = "standard",
|
|
3692
3712
|
onItemSelected: t,
|
|
3693
3713
|
children: n,
|
|
3694
|
-
className:
|
|
3714
|
+
className: l,
|
|
3695
3715
|
selectedItem: r,
|
|
3696
3716
|
extended: s,
|
|
3697
3717
|
alignment: c = "top",
|
|
3698
|
-
menu:
|
|
3718
|
+
menu: a = {
|
|
3699
3719
|
closed: {
|
|
3700
3720
|
icon: dn,
|
|
3701
3721
|
label: "Open menu"
|
|
3702
3722
|
},
|
|
3703
3723
|
opened: {
|
|
3704
|
-
icon:
|
|
3724
|
+
icon: Le,
|
|
3705
3725
|
label: "Close menu"
|
|
3706
3726
|
}
|
|
3707
3727
|
},
|
|
3708
|
-
style:
|
|
3728
|
+
style: u,
|
|
3709
3729
|
onExtendedChange: o,
|
|
3710
|
-
transition:
|
|
3711
|
-
setSelectedItem:
|
|
3730
|
+
transition: p,
|
|
3731
|
+
setSelectedItem: v
|
|
3712
3732
|
}) => {
|
|
3713
|
-
const [
|
|
3714
|
-
let
|
|
3715
|
-
r == 0 || r != null ?
|
|
3716
|
-
const
|
|
3733
|
+
const [f, i] = $(null), [d, h] = $(s);
|
|
3734
|
+
let w;
|
|
3735
|
+
r == 0 || r != null ? w = r : w = f;
|
|
3736
|
+
const b = v || i, g = W(null), I = (M) => {
|
|
3717
3737
|
t == null || t(M);
|
|
3718
3738
|
};
|
|
3719
|
-
function
|
|
3739
|
+
function E(M) {
|
|
3720
3740
|
const x = [];
|
|
3721
3741
|
return dt.forEach(M, (S) => {
|
|
3722
|
-
pe(S) && S.type === ft ? x.push(...
|
|
3742
|
+
pe(S) && S.type === ft ? x.push(...E(S.props.children)) : x.push(S);
|
|
3723
3743
|
}), x;
|
|
3724
3744
|
}
|
|
3725
|
-
const A =
|
|
3726
|
-
(M) => pe(M) && M.type ===
|
|
3727
|
-
),
|
|
3745
|
+
const A = E(n), L = A.filter(
|
|
3746
|
+
(M) => pe(M) && M.type === Me
|
|
3747
|
+
), V = vn({
|
|
3728
3748
|
children: n,
|
|
3729
3749
|
onItemSelected: t,
|
|
3730
|
-
selectedItem:
|
|
3731
|
-
setSelectedItem:
|
|
3732
|
-
className:
|
|
3750
|
+
selectedItem: w,
|
|
3751
|
+
setSelectedItem: b,
|
|
3752
|
+
className: l,
|
|
3733
3753
|
variant: e,
|
|
3734
|
-
extended:
|
|
3735
|
-
isExtended:
|
|
3754
|
+
extended: d,
|
|
3755
|
+
isExtended: d,
|
|
3736
3756
|
alignment: c,
|
|
3737
|
-
menu:
|
|
3738
|
-
transition:
|
|
3757
|
+
menu: a,
|
|
3758
|
+
transition: p,
|
|
3739
3759
|
onExtendedChange: o
|
|
3740
3760
|
});
|
|
3741
|
-
|
|
3742
|
-
const
|
|
3743
|
-
return
|
|
3744
|
-
o == null || o(
|
|
3745
|
-
}, [
|
|
3761
|
+
p = { duration: 0.3, ...p };
|
|
3762
|
+
const H = W(!1);
|
|
3763
|
+
return H.current = !1, R(() => {
|
|
3764
|
+
o == null || o(d ?? !1);
|
|
3765
|
+
}, [d]), /* @__PURE__ */ Y(
|
|
3746
3766
|
"div",
|
|
3747
3767
|
{
|
|
3748
|
-
style: { transition:
|
|
3749
|
-
ref:
|
|
3750
|
-
className:
|
|
3768
|
+
style: { transition: p.duration + "s", ...u },
|
|
3769
|
+
ref: g,
|
|
3770
|
+
className: V.navigationRail,
|
|
3751
3771
|
children: [
|
|
3752
|
-
/* @__PURE__ */
|
|
3772
|
+
/* @__PURE__ */ Y("div", { className: V.header, children: [
|
|
3753
3773
|
/* @__PURE__ */ m(
|
|
3754
3774
|
be,
|
|
3755
3775
|
{
|
|
3756
|
-
onClick: () =>
|
|
3757
|
-
label:
|
|
3758
|
-
className:
|
|
3759
|
-
icon:
|
|
3776
|
+
onClick: () => h(!d),
|
|
3777
|
+
label: d ? a == null ? void 0 : a.opened.label : a == null ? void 0 : a.closed.label,
|
|
3778
|
+
className: V.menuIcon,
|
|
3779
|
+
icon: d ? a.opened.icon : a == null ? void 0 : a.closed.icon
|
|
3760
3780
|
}
|
|
3761
3781
|
),
|
|
3762
|
-
|
|
3763
|
-
transition:
|
|
3764
|
-
isExtended:
|
|
3765
|
-
className: "!shadow-none mx-5 " +
|
|
3782
|
+
L.length > 0 && xe(L[0], {
|
|
3783
|
+
transition: p,
|
|
3784
|
+
isExtended: d,
|
|
3785
|
+
className: "!shadow-none mx-5 " + L[0].props.className
|
|
3766
3786
|
})
|
|
3767
3787
|
] }),
|
|
3768
|
-
/* @__PURE__ */ m("div", { className:
|
|
3788
|
+
/* @__PURE__ */ m("div", { className: V.segments, children: (() => {
|
|
3769
3789
|
let M = 0;
|
|
3770
3790
|
return A.map((x) => pe(x) && x.type === yn ? xe(
|
|
3771
3791
|
x,
|
|
@@ -3773,15 +3793,15 @@ const zn = ({
|
|
|
3773
3793
|
key: M,
|
|
3774
3794
|
index: M++,
|
|
3775
3795
|
// Utilise et incrémente le compteur dédié
|
|
3776
|
-
variant:
|
|
3777
|
-
selectedItem:
|
|
3778
|
-
setSelectedItem:
|
|
3779
|
-
onItemSelected:
|
|
3780
|
-
transition:
|
|
3781
|
-
extendedOnly:
|
|
3782
|
-
isExtended:
|
|
3796
|
+
variant: d ? "horizontal" : "vertical",
|
|
3797
|
+
selectedItem: w,
|
|
3798
|
+
setSelectedItem: b,
|
|
3799
|
+
onItemSelected: I,
|
|
3800
|
+
transition: p,
|
|
3801
|
+
extendedOnly: H.current,
|
|
3802
|
+
isExtended: d
|
|
3783
3803
|
}
|
|
3784
|
-
) : pe(x) && x.type ===
|
|
3804
|
+
) : pe(x) && x.type === Me ? null : pe(x) && x.type === pn ? (H.current = !0, d ? xe(x, {}) : null) : x);
|
|
3785
3805
|
})() }),
|
|
3786
3806
|
/* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
|
|
3787
3807
|
]
|
|
@@ -3792,26 +3812,26 @@ function sr(e) {
|
|
|
3792
3812
|
return wt({
|
|
3793
3813
|
variant: xt.Udixio,
|
|
3794
3814
|
...e,
|
|
3795
|
-
plugins: [new vt(e), new
|
|
3815
|
+
plugins: [new vt(e), new Xe(e)]
|
|
3796
3816
|
});
|
|
3797
3817
|
}
|
|
3798
3818
|
export {
|
|
3799
3819
|
Jn as AnimateOnScrollInit,
|
|
3800
|
-
|
|
3820
|
+
Ce as Button,
|
|
3801
3821
|
Qn as Card,
|
|
3802
3822
|
Tn as Carousel,
|
|
3803
3823
|
nn as CarouselItem,
|
|
3804
3824
|
jt as CustomScroll,
|
|
3805
3825
|
rn as Divider,
|
|
3806
|
-
|
|
3826
|
+
Me as Fab,
|
|
3807
3827
|
zn as FabMenu,
|
|
3808
3828
|
ie as Icon,
|
|
3809
3829
|
be as IconButton,
|
|
3810
|
-
|
|
3830
|
+
ar as NavigationRail,
|
|
3811
3831
|
yn as NavigationRailItem,
|
|
3812
3832
|
pn as NavigationRailSection,
|
|
3813
|
-
|
|
3814
|
-
|
|
3833
|
+
Vt as ProgressIndicator,
|
|
3834
|
+
Yt as RippleEffect,
|
|
3815
3835
|
tr as SideSheet,
|
|
3816
3836
|
er as Slider,
|
|
3817
3837
|
Kn as SmoothScroll,
|
|
@@ -3821,7 +3841,7 @@ export {
|
|
|
3821
3841
|
Gt as SyncedFixedWrapper,
|
|
3822
3842
|
fn as Tab,
|
|
3823
3843
|
or as Tabs,
|
|
3824
|
-
|
|
3844
|
+
lr as TextField,
|
|
3825
3845
|
Gn as ThemeProvider,
|
|
3826
3846
|
it as ToolTip,
|
|
3827
3847
|
Zn as animateOnScroll,
|
|
@@ -3829,48 +3849,48 @@ export {
|
|
|
3829
3849
|
Rn as cardStyle,
|
|
3830
3850
|
Ke as carouselItemConfig,
|
|
3831
3851
|
Bn as carouselItemStyle,
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3852
|
+
Dn as carouselStyle,
|
|
3853
|
+
y as classNames,
|
|
3854
|
+
bt as classnames,
|
|
3835
3855
|
J as createUseClassNames,
|
|
3836
3856
|
Ut as customScrollStyle,
|
|
3837
3857
|
Q as defaultClassNames,
|
|
3838
3858
|
sr as defineConfig,
|
|
3839
|
-
|
|
3859
|
+
Wn as dividerStyle,
|
|
3840
3860
|
Pn as fabMenuStyle,
|
|
3841
3861
|
An as fabStyle,
|
|
3842
|
-
|
|
3843
|
-
|
|
3862
|
+
Re as getClassNames,
|
|
3863
|
+
Hn as iconButtonStyle,
|
|
3844
3864
|
ct as initAnimateOnScroll,
|
|
3845
3865
|
he as normalize,
|
|
3846
|
-
|
|
3866
|
+
Fn as progressIndicatorStyle,
|
|
3847
3867
|
et as sideSheetConfig,
|
|
3848
3868
|
Bt as sideSheetStyle,
|
|
3849
3869
|
tt as sliderConfig,
|
|
3850
|
-
|
|
3851
|
-
|
|
3870
|
+
Vn as sliderStyle,
|
|
3871
|
+
Yn as snackbarStyle,
|
|
3852
3872
|
Un as switchStyle,
|
|
3853
|
-
|
|
3873
|
+
Xn as tabStyle,
|
|
3854
3874
|
jn as tabsStyle,
|
|
3855
3875
|
qn as textFieldStyle,
|
|
3856
3876
|
_n as toolStyle,
|
|
3857
3877
|
Nt as useButtonStyle,
|
|
3858
3878
|
Et as useCardStyle,
|
|
3859
|
-
|
|
3860
|
-
|
|
3879
|
+
St as useCarouselItemStyle,
|
|
3880
|
+
It as useCarouselStyle,
|
|
3861
3881
|
Mn as useClassNames,
|
|
3862
3882
|
kt as useDividerStyle,
|
|
3863
3883
|
Mt as useFabMenuStyle,
|
|
3864
3884
|
Ct as useFabStyle,
|
|
3865
3885
|
$t as useIconButtonStyle,
|
|
3866
3886
|
Rt as useProgressIndicatorStyle,
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3887
|
+
On as useSideSheetStyle,
|
|
3888
|
+
Dt as useSliderStyle,
|
|
3889
|
+
Wt as useSnackbarStyle,
|
|
3870
3890
|
Kt as useStateStyle,
|
|
3871
3891
|
At as useSwitchStyle,
|
|
3872
3892
|
Pt as useTabStyle,
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3893
|
+
Ht as useTabsStyle,
|
|
3894
|
+
Ft as useTextFieldStyle,
|
|
3895
|
+
Ot as useToolTipStyle
|
|
3876
3896
|
};
|