@udixio/ui-react 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +572 -560
- package/dist/lib/effects/ThemeProvider.d.ts +2 -1
- package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/lib/effects/ThemeProvider.tsx +76 -27
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as u, jsxs as U, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as de } from "clsx";
|
|
3
3
|
import { extendTailwindMerge as we } from "tailwind-merge";
|
|
4
|
-
import Y, { useState as
|
|
4
|
+
import Y, { useState as R, useEffect as P, useRef as V, useLayoutEffect as fe, isValidElement as ee, cloneElement as le, useMemo as ve, Children as be, Fragment as Le } from "react";
|
|
5
5
|
import { motion as j, AnimatePresence as z, useScroll as Ne, useMotionValueEvent as se, motionValue as me, useTransform as oe } from "motion/react";
|
|
6
6
|
import { throttle as Ie } from "throttle-debounce";
|
|
7
7
|
import { createPortal as Ee } from "react-dom";
|
|
8
8
|
import { loader as ke } from "@udixio/theme";
|
|
9
|
-
import { TailwindPlugin as
|
|
10
|
-
import
|
|
9
|
+
import { TailwindPlugin as Ce } from "@udixio/tailwind";
|
|
10
|
+
import Re from "react-textarea-autosize";
|
|
11
11
|
const pe = we({
|
|
12
12
|
override: {
|
|
13
13
|
classGroups: {
|
|
@@ -34,7 +34,7 @@ const pe = we({
|
|
|
34
34
|
font: ["font"]
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), f = (...e) => pe(de(e)), Me = (...e) => pe(de(e));
|
|
38
38
|
function Se(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
|
}
|
|
@@ -46,17 +46,17 @@ const Be = (e) => {
|
|
|
46
46
|
if (typeof l == "string")
|
|
47
47
|
(t[n = e.default] ?? (t[n] = [])).push(l);
|
|
48
48
|
else {
|
|
49
|
-
const
|
|
50
|
-
Object.entries(
|
|
51
|
-
const [a,
|
|
52
|
-
(t[a] ?? (t[a] = [])).push(
|
|
49
|
+
const c = l(e.states);
|
|
50
|
+
Object.entries(c).map((i) => {
|
|
51
|
+
const [a, d] = i;
|
|
52
|
+
(t[a] ?? (t[a] = [])).push(d);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const r = t;
|
|
57
57
|
return Object.entries(t).map((l) => {
|
|
58
|
-
let [n,
|
|
59
|
-
|
|
58
|
+
let [n, c] = l;
|
|
59
|
+
c = c.reverse(), n == e.default && c.unshift("relative"), c.unshift(Se(n)), r[n] = Me(...c);
|
|
60
60
|
}), r;
|
|
61
61
|
}, K = (e, t) => (r) => Be({
|
|
62
62
|
classNameList: [r.className, t],
|
|
@@ -70,14 +70,14 @@ const Be = (e) => {
|
|
|
70
70
|
disabled: r,
|
|
71
71
|
iconPosition: l,
|
|
72
72
|
icon: n,
|
|
73
|
-
isActive:
|
|
73
|
+
isActive: c,
|
|
74
74
|
loading: i,
|
|
75
75
|
shape: a,
|
|
76
|
-
onToggle:
|
|
76
|
+
onToggle: d,
|
|
77
77
|
size: o,
|
|
78
|
-
allowShapeTransformation:
|
|
78
|
+
allowShapeTransformation: h
|
|
79
79
|
}) => ({
|
|
80
|
-
button:
|
|
80
|
+
button: f(
|
|
81
81
|
" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",
|
|
82
82
|
o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
|
|
83
83
|
o === "small" && "text-label-large px-4 py-2.5 gap-2",
|
|
@@ -89,40 +89,40 @@ const Be = (e) => {
|
|
|
89
89
|
"rounded-[40px]": o === "medium",
|
|
90
90
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
91
91
|
},
|
|
92
|
-
(a === "squared" ||
|
|
92
|
+
(a === "squared" || h && c) && {
|
|
93
93
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
94
94
|
"rounded-[16px]": o === "medium",
|
|
95
95
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
96
96
|
},
|
|
97
|
-
|
|
97
|
+
h && !r && {
|
|
98
98
|
"active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
99
99
|
"active:rounded-[16px]": o === "medium",
|
|
100
100
|
"active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
101
101
|
},
|
|
102
102
|
e === "elevated" && {
|
|
103
103
|
"shadow-1 hover:shadow-2": !r,
|
|
104
|
-
"bg-surface-container-low text-primary": !r && !
|
|
105
|
-
"bg-primary text-on-primary": !r &&
|
|
104
|
+
"bg-surface-container-low text-primary": !r && !c,
|
|
105
|
+
"bg-primary text-on-primary": !r && c,
|
|
106
106
|
"text-on-surface/[38%]": r
|
|
107
107
|
},
|
|
108
108
|
e === "filled" && {
|
|
109
109
|
"hover:shadow-1": !r,
|
|
110
|
-
"bg-surface-container text-on-surface-variant": !r && !
|
|
111
|
-
"bg-primary text-on-primary": !r && (
|
|
110
|
+
"bg-surface-container text-on-surface-variant": !r && !c && d,
|
|
111
|
+
"bg-primary text-on-primary": !r && (c && d || !d),
|
|
112
112
|
"text-on-surface/[38%]": r
|
|
113
113
|
},
|
|
114
114
|
e === "tonal" && {
|
|
115
115
|
"hover:shadow-1": !r,
|
|
116
|
-
"bg-secondary-container text-on-secondary-container": !r && !
|
|
117
|
-
"bg-secondary text-on-secondary": !r &&
|
|
116
|
+
"bg-secondary-container text-on-secondary-container": !r && !c,
|
|
117
|
+
"bg-secondary text-on-secondary": !r && c,
|
|
118
118
|
"text-on-surface/[0.38]": r
|
|
119
119
|
},
|
|
120
120
|
e === "outlined" && [
|
|
121
121
|
" border",
|
|
122
122
|
{
|
|
123
123
|
"border-on-surface/[0.12] text-on-surface/[0.38]": r,
|
|
124
|
-
"text-primary border-outline focus:border-primary": !r && !
|
|
125
|
-
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !r &&
|
|
124
|
+
"text-primary border-outline focus:border-primary": !r && !c,
|
|
125
|
+
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !r && c
|
|
126
126
|
}
|
|
127
127
|
],
|
|
128
128
|
e === "text" && [
|
|
@@ -145,10 +145,10 @@ const Be = (e) => {
|
|
|
145
145
|
],
|
|
146
146
|
r && "cursor-default"
|
|
147
147
|
),
|
|
148
|
-
touchTarget:
|
|
148
|
+
touchTarget: f(
|
|
149
149
|
"absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
|
|
150
150
|
),
|
|
151
|
-
stateLayer:
|
|
151
|
+
stateLayer: f(
|
|
152
152
|
"min-h-full min-w-full absolute top-0 left-0 overflow-hidden",
|
|
153
153
|
e === "elevated" && {
|
|
154
154
|
"bg-on-surface/[0.12]": r,
|
|
@@ -156,20 +156,20 @@ const Be = (e) => {
|
|
|
156
156
|
},
|
|
157
157
|
e === "filled" && {
|
|
158
158
|
"bg-on-surface/[0.12]": r,
|
|
159
|
-
"group-state-on-primary": !r && !
|
|
160
|
-
"group-state-on-surface-variant": !r &&
|
|
159
|
+
"group-state-on-primary": !r && !d,
|
|
160
|
+
"group-state-on-surface-variant": !r && d
|
|
161
161
|
},
|
|
162
162
|
a === "rounded" && {
|
|
163
163
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
164
164
|
"rounded-[40px]": o === "medium",
|
|
165
165
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
166
166
|
},
|
|
167
|
-
(a === "squared" ||
|
|
167
|
+
(a === "squared" || h && c) && {
|
|
168
168
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
169
169
|
"rounded-[16px]": o === "medium",
|
|
170
170
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
h && !r && {
|
|
173
173
|
"group-active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
174
174
|
"group-active:rounded-[16px]": o === "medium",
|
|
175
175
|
"group-active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
@@ -185,8 +185,8 @@ const Be = (e) => {
|
|
|
185
185
|
"group-state-primary": !r
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
label:
|
|
189
|
-
icon:
|
|
188
|
+
label: f({ invisible: i }),
|
|
189
|
+
icon: f(
|
|
190
190
|
{ invisible: i },
|
|
191
191
|
o === "xSmall" && "size-5",
|
|
192
192
|
o === "small" && "size-5",
|
|
@@ -198,13 +198,13 @@ const Be = (e) => {
|
|
|
198
198
|
), $e = K(
|
|
199
199
|
"card",
|
|
200
200
|
({ variant: e, isInteractive: t }) => ({
|
|
201
|
-
card:
|
|
201
|
+
card: f(
|
|
202
202
|
"card group/card rounded-xl overflow-hidden z-10",
|
|
203
203
|
e === "outlined" && "bg-surface border border-outline-variant",
|
|
204
204
|
e === "elevated" && "bg-surface-container-low shadow-1",
|
|
205
205
|
e === "filled" && "bg-surface-container-highest"
|
|
206
206
|
),
|
|
207
|
-
stateLayer:
|
|
207
|
+
stateLayer: f([
|
|
208
208
|
"w-full top-0 left-0 h-full absolute -z-10",
|
|
209
209
|
{
|
|
210
210
|
" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface": t
|
|
@@ -214,20 +214,20 @@ const Be = (e) => {
|
|
|
214
214
|
), We = K(
|
|
215
215
|
"carouselItem",
|
|
216
216
|
() => ({
|
|
217
|
-
carouselItem:
|
|
217
|
+
carouselItem: f("rounded-[28px] overflow-hidden flex-none")
|
|
218
218
|
})
|
|
219
219
|
), De = K(
|
|
220
220
|
"carousel",
|
|
221
221
|
() => ({
|
|
222
|
-
carousel:
|
|
223
|
-
track:
|
|
222
|
+
carousel: f(["w-full h-[400px]"]),
|
|
223
|
+
track: f(
|
|
224
224
|
"grid grid-flow-col h-full transition-transform ease-out w-fit"
|
|
225
225
|
)
|
|
226
226
|
})
|
|
227
227
|
), Ve = K(
|
|
228
228
|
"divider",
|
|
229
229
|
({ orientation: e }) => ({
|
|
230
|
-
divider:
|
|
230
|
+
divider: f(
|
|
231
231
|
"border-outline-variant ",
|
|
232
232
|
{
|
|
233
233
|
"h-fit w-full border-t": e === "horizontal"
|
|
@@ -240,7 +240,7 @@ const Be = (e) => {
|
|
|
240
240
|
), Ue = K(
|
|
241
241
|
"fab",
|
|
242
242
|
({ size: e, variant: t, isExtended: r }) => ({
|
|
243
|
-
fab:
|
|
243
|
+
fab: f(
|
|
244
244
|
"flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",
|
|
245
245
|
{
|
|
246
246
|
"rounded-[12px]": e == "small" && !r,
|
|
@@ -257,14 +257,14 @@ const Be = (e) => {
|
|
|
257
257
|
t === "secondary" && "bg-secondary-container",
|
|
258
258
|
t === "tertiary" && "bg-tertiary-container"
|
|
259
259
|
),
|
|
260
|
-
stateLayer:
|
|
260
|
+
stateLayer: f(
|
|
261
261
|
"absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
|
|
262
262
|
t === "surface" && "group-hover:hover-state-primary group-focus:focus-state-primary",
|
|
263
263
|
t === "primary" && "group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",
|
|
264
264
|
t === "secondary" && "group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",
|
|
265
265
|
t === "tertiary" && "group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"
|
|
266
266
|
),
|
|
267
|
-
icon:
|
|
267
|
+
icon: f(
|
|
268
268
|
{
|
|
269
269
|
"size-6": e == "small" || e == "medium" || r,
|
|
270
270
|
"size-9": e == "large" && !r
|
|
@@ -274,7 +274,7 @@ const Be = (e) => {
|
|
|
274
274
|
t === "secondary" && "text-on-secondary-container",
|
|
275
275
|
t === "tertiary" && "text-on-tertiary-container"
|
|
276
276
|
),
|
|
277
|
-
label:
|
|
277
|
+
label: f(
|
|
278
278
|
"text-title-medium text-nowrap",
|
|
279
279
|
t === "surface" && "text-primary",
|
|
280
280
|
t === "primary" && "text-on-primary-container",
|
|
@@ -290,11 +290,11 @@ const Be = (e) => {
|
|
|
290
290
|
onToggle: r,
|
|
291
291
|
isActive: l,
|
|
292
292
|
size: n,
|
|
293
|
-
width:
|
|
293
|
+
width: c,
|
|
294
294
|
shape: i,
|
|
295
295
|
allowShapeTransformation: a
|
|
296
296
|
}) => ({
|
|
297
|
-
iconButton:
|
|
297
|
+
iconButton: f(
|
|
298
298
|
"rounded-full relative flex transition-all duration-300",
|
|
299
299
|
"group cursor-pointer",
|
|
300
300
|
{
|
|
@@ -340,10 +340,10 @@ const Be = (e) => {
|
|
|
340
340
|
}
|
|
341
341
|
]
|
|
342
342
|
),
|
|
343
|
-
touchTarget:
|
|
343
|
+
touchTarget: f(
|
|
344
344
|
"absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
|
|
345
345
|
),
|
|
346
|
-
stateLayer:
|
|
346
|
+
stateLayer: f(
|
|
347
347
|
"absolute top-0 left-0 h-full w-full overflow-hidden",
|
|
348
348
|
(i === "rounded" || i === "squared" && r && !t && l && a) && {
|
|
349
349
|
"rounded-[30px]": n === "xSmall" || n == "small",
|
|
@@ -379,21 +379,21 @@ const Be = (e) => {
|
|
|
379
379
|
}
|
|
380
380
|
]
|
|
381
381
|
),
|
|
382
|
-
icon:
|
|
382
|
+
icon: f(
|
|
383
383
|
" transition-all duration-300",
|
|
384
384
|
{ "size-5 p-1.5": n === "xSmall" },
|
|
385
385
|
{ "size-6 p-2": n === "small" },
|
|
386
386
|
{ "size-6 p-4": n === "medium" },
|
|
387
387
|
{ "size-8 p-8": n === "large" },
|
|
388
388
|
{ "size-10 p-12": n === "xLarge" },
|
|
389
|
-
|
|
389
|
+
c == "narrow" && [
|
|
390
390
|
{ "px-1": n === "xSmall" },
|
|
391
391
|
{ "px-1": n === "small" },
|
|
392
392
|
{ "px-3": n === "medium" },
|
|
393
393
|
{ "px-4": n === "large" },
|
|
394
394
|
{ "px-8": n === "xLarge" }
|
|
395
395
|
],
|
|
396
|
-
|
|
396
|
+
c == "wide" && [
|
|
397
397
|
{ "px-2.5": n === "xSmall" },
|
|
398
398
|
{ "px-3.5": n === "small" },
|
|
399
399
|
{ "px-6": n === "medium" },
|
|
@@ -424,14 +424,14 @@ const Be = (e) => {
|
|
|
424
424
|
), Fe = K(
|
|
425
425
|
"progressIndicator",
|
|
426
426
|
({ variant: e, isVisible: t }) => ({
|
|
427
|
-
progressIndicator:
|
|
427
|
+
progressIndicator: f(
|
|
428
428
|
(e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full h-1"
|
|
429
429
|
),
|
|
430
|
-
track:
|
|
430
|
+
track: f("h-full rounded-full bg-primary rounded-l-full", {
|
|
431
431
|
"max-h-0": !t,
|
|
432
432
|
"max-h-full": t
|
|
433
433
|
}),
|
|
434
|
-
activeIndicator:
|
|
434
|
+
activeIndicator: f(
|
|
435
435
|
{
|
|
436
436
|
"max-h-0": !t,
|
|
437
437
|
"max-h-full": t
|
|
@@ -445,7 +445,7 @@ const Be = (e) => {
|
|
|
445
445
|
}
|
|
446
446
|
]
|
|
447
447
|
),
|
|
448
|
-
stop:
|
|
448
|
+
stop: f(
|
|
449
449
|
"absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",
|
|
450
450
|
{
|
|
451
451
|
"max-h-0": !t,
|
|
@@ -456,40 +456,40 @@ const Be = (e) => {
|
|
|
456
456
|
), He = K(
|
|
457
457
|
"slider",
|
|
458
458
|
({ isChanging: e }) => ({
|
|
459
|
-
slider:
|
|
459
|
+
slider: f([
|
|
460
460
|
"relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"
|
|
461
461
|
]),
|
|
462
|
-
activeTrack:
|
|
462
|
+
activeTrack: f([
|
|
463
463
|
"h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "
|
|
464
464
|
]),
|
|
465
|
-
inactiveTrack:
|
|
465
|
+
inactiveTrack: f([
|
|
466
466
|
"h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"
|
|
467
467
|
]),
|
|
468
|
-
handle:
|
|
468
|
+
handle: f([
|
|
469
469
|
"transform transition-all duration-100 bg-primary h-full rounded-full ",
|
|
470
470
|
{ "w-0.5": e, "w-1": !e }
|
|
471
471
|
]),
|
|
472
|
-
valueIndicator:
|
|
472
|
+
valueIndicator: f([
|
|
473
473
|
"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"
|
|
474
474
|
]),
|
|
475
|
-
dot:
|
|
475
|
+
dot: f([
|
|
476
476
|
"h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
|
|
477
477
|
])
|
|
478
478
|
})
|
|
479
479
|
), Xe = K(
|
|
480
480
|
"snackbar",
|
|
481
481
|
() => ({
|
|
482
|
-
snackbar:
|
|
483
|
-
container:
|
|
482
|
+
snackbar: f(" rounded bg-inverse-surface "),
|
|
483
|
+
container: f(
|
|
484
484
|
"pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
|
|
485
485
|
),
|
|
486
|
-
supportingText:
|
|
487
|
-
icon:
|
|
486
|
+
supportingText: f("text-body-medium text-inverse-on-surface "),
|
|
487
|
+
icon: f(" ml-auto mr-0 text-inverse-on-surface block dark")
|
|
488
488
|
})
|
|
489
489
|
), Oe = K(
|
|
490
490
|
"switch",
|
|
491
491
|
({ isSelected: e, disabled: t, inactiveIcon: r }) => ({
|
|
492
|
-
switch:
|
|
492
|
+
switch: f(
|
|
493
493
|
"group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
|
|
494
494
|
{ "bg-on-surface/[0.12] border-transparent": t },
|
|
495
495
|
!t && [
|
|
@@ -500,12 +500,12 @@ const Be = (e) => {
|
|
|
500
500
|
// { 'justify-start': !isSelected },
|
|
501
501
|
// { 'justify-end': isSelected },
|
|
502
502
|
),
|
|
503
|
-
handleContainer:
|
|
503
|
+
handleContainer: f(
|
|
504
504
|
"flex items-center justify-center absolute",
|
|
505
505
|
{ "left-[14px]": !e },
|
|
506
506
|
{ "right-[14px]": e }
|
|
507
507
|
),
|
|
508
|
-
handle:
|
|
508
|
+
handle: f(
|
|
509
509
|
"transition-all duration-100 z-10 rounded-full flex items-center justify-center",
|
|
510
510
|
{ "w-[16px] h-[16px]": !e && !r },
|
|
511
511
|
{ "w-[24px] h-[24px]": !(!e && !r) },
|
|
@@ -516,11 +516,11 @@ const Be = (e) => {
|
|
|
516
516
|
],
|
|
517
517
|
{ "bg-surface": t }
|
|
518
518
|
),
|
|
519
|
-
handleStateLayer:
|
|
519
|
+
handleStateLayer: f(
|
|
520
520
|
"w-[40px] h-[40px] -z-10 rounded-full absolute",
|
|
521
521
|
{ "group-state-primary": !t }
|
|
522
522
|
),
|
|
523
|
-
icon:
|
|
523
|
+
icon: f(
|
|
524
524
|
"w-[16px] h-[16px]",
|
|
525
525
|
!t && [
|
|
526
526
|
{ "text-on-primary-container": e },
|
|
@@ -532,13 +532,13 @@ const Be = (e) => {
|
|
|
532
532
|
), qe = K(
|
|
533
533
|
"tab",
|
|
534
534
|
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
535
|
-
tab:
|
|
535
|
+
tab: f(
|
|
536
536
|
"bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",
|
|
537
537
|
{ "z-10": e },
|
|
538
538
|
!!(t && r) && l === "primary" && "h-16",
|
|
539
539
|
!(t && r && l === "primary") && "h-12"
|
|
540
540
|
),
|
|
541
|
-
stateLayer:
|
|
541
|
+
stateLayer: f(
|
|
542
542
|
"absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
|
|
543
543
|
l === "primary" && {
|
|
544
544
|
"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface": !e,
|
|
@@ -546,7 +546,7 @@ const Be = (e) => {
|
|
|
546
546
|
},
|
|
547
547
|
l === "secondary" && "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"
|
|
548
548
|
),
|
|
549
|
-
content:
|
|
549
|
+
content: f(
|
|
550
550
|
"flex gap-0.5 h-full justify-center",
|
|
551
551
|
{
|
|
552
552
|
relative: l == "primary"
|
|
@@ -560,7 +560,7 @@ const Be = (e) => {
|
|
|
560
560
|
"flex-row items-center gap-2": !!(r && t)
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
|
-
icon:
|
|
563
|
+
icon: f(
|
|
564
564
|
"h-6 w-6 p-0.5 !box-border",
|
|
565
565
|
l === "primary" && {
|
|
566
566
|
"text-on-surface-variant": !e,
|
|
@@ -571,7 +571,7 @@ const Be = (e) => {
|
|
|
571
571
|
"text-on-surface": e
|
|
572
572
|
}
|
|
573
573
|
),
|
|
574
|
-
label:
|
|
574
|
+
label: f(
|
|
575
575
|
"text-title-small text-nowrap",
|
|
576
576
|
l === "primary" && {
|
|
577
577
|
"text-on-surface-variant": !e,
|
|
@@ -582,7 +582,7 @@ const Be = (e) => {
|
|
|
582
582
|
"text-on-surface": e
|
|
583
583
|
}
|
|
584
584
|
),
|
|
585
|
-
underline:
|
|
585
|
+
underline: f(
|
|
586
586
|
"bg-primary absolute w-full left-0 bottom-0",
|
|
587
587
|
l === "primary" && "h-[3px] rounded-t",
|
|
588
588
|
l === "secondary" && "h-0.5"
|
|
@@ -591,7 +591,7 @@ const Be = (e) => {
|
|
|
591
591
|
), _e = K(
|
|
592
592
|
"tabs",
|
|
593
593
|
({ scrollable: e }) => ({
|
|
594
|
-
tabs:
|
|
594
|
+
tabs: f(
|
|
595
595
|
"border-b border-surface-container-highest",
|
|
596
596
|
"flex relative ",
|
|
597
597
|
{ "overflow-x-auto": e }
|
|
@@ -605,21 +605,21 @@ const Be = (e) => {
|
|
|
605
605
|
trailingIcon: r,
|
|
606
606
|
variant: l,
|
|
607
607
|
errorText: n,
|
|
608
|
-
isFocused:
|
|
608
|
+
isFocused: c,
|
|
609
609
|
value: i,
|
|
610
610
|
suffix: a,
|
|
611
|
-
textLine:
|
|
611
|
+
textLine: d
|
|
612
612
|
}) => ({
|
|
613
|
-
textField:
|
|
613
|
+
textField: f({
|
|
614
614
|
"opacity-[.38]": e
|
|
615
615
|
}),
|
|
616
|
-
content:
|
|
616
|
+
content: f(
|
|
617
617
|
"group transition-border duration-200 relative flex items-center ",
|
|
618
|
-
{ "h-14":
|
|
618
|
+
{ "h-14": d == "singleLine" },
|
|
619
619
|
{
|
|
620
|
-
"border-on-surface-variant": !(n != null && n.length) && !
|
|
621
|
-
"border-outline": !(n != null && n.length) && !
|
|
622
|
-
"border-primary": !(n != null && n.length) &&
|
|
620
|
+
"border-on-surface-variant": !(n != null && n.length) && !c && l == "filled",
|
|
621
|
+
"border-outline": !(n != null && n.length) && !c && l == "outlined",
|
|
622
|
+
"border-primary": !(n != null && n.length) && c,
|
|
623
623
|
"border-error": !!(n != null && n.length)
|
|
624
624
|
},
|
|
625
625
|
{ "bg-on-surface/[0.04]": e },
|
|
@@ -630,28 +630,28 @@ const Be = (e) => {
|
|
|
630
630
|
l == "outlined" && [
|
|
631
631
|
"border rounded box-border",
|
|
632
632
|
{
|
|
633
|
-
"border-[3px]":
|
|
633
|
+
"border-[3px]": c
|
|
634
634
|
}
|
|
635
635
|
]
|
|
636
636
|
),
|
|
637
|
-
stateLayer:
|
|
637
|
+
stateLayer: f(
|
|
638
638
|
"absolute -z-10 w-full h-full top-0 left-0",
|
|
639
639
|
{
|
|
640
640
|
hidden: l == "outlined"
|
|
641
641
|
},
|
|
642
642
|
{
|
|
643
643
|
"group-state-on-surface": !e,
|
|
644
|
-
"focus-state-on-surface":
|
|
644
|
+
"focus-state-on-surface": c
|
|
645
645
|
}
|
|
646
646
|
),
|
|
647
|
-
label:
|
|
647
|
+
label: f(
|
|
648
648
|
"inline-flex outline-none whitespace-nowrap",
|
|
649
649
|
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
650
650
|
{ "text-on-surface": e },
|
|
651
651
|
{ "text-error": !!(n != null && n.length) },
|
|
652
|
-
{ "text-primary": !(n != null && n.length) &&
|
|
652
|
+
{ "text-primary": !(n != null && n.length) && c }
|
|
653
653
|
),
|
|
654
|
-
input:
|
|
654
|
+
input: f(
|
|
655
655
|
"w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
|
|
656
656
|
{
|
|
657
657
|
" text-on-surface placeholder:text-on-surface-variant": !e,
|
|
@@ -663,30 +663,30 @@ const Be = (e) => {
|
|
|
663
663
|
l == "filled" && " pb-2 pt-6",
|
|
664
664
|
l == "outlined" && "py-4 relative z-10"
|
|
665
665
|
),
|
|
666
|
-
activeIndicator:
|
|
666
|
+
activeIndicator: f(
|
|
667
667
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
668
668
|
l == "filled" && [
|
|
669
669
|
"h-[2px] transition-all duration-300",
|
|
670
670
|
{ "bg-primary": !(n != null && n.length) },
|
|
671
671
|
{ "bg-error": !!(n != null && n.length) },
|
|
672
|
-
{ "!w-full":
|
|
672
|
+
{ "!w-full": c }
|
|
673
673
|
]
|
|
674
674
|
),
|
|
675
|
-
supportingText:
|
|
675
|
+
supportingText: f(
|
|
676
676
|
" text-body-small px-4 pt-1",
|
|
677
677
|
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
678
678
|
{ "text-on-surface": e },
|
|
679
|
-
{ "!w-full":
|
|
679
|
+
{ "!w-full": c },
|
|
680
680
|
{ "text-error": !!(n != null && n.length) }
|
|
681
681
|
),
|
|
682
|
-
leadingIcon:
|
|
682
|
+
leadingIcon: f([
|
|
683
683
|
"h-12 ml-3 flex items-center justify-center",
|
|
684
684
|
{ "cursor-text": !Y.isValidElement(t) }
|
|
685
685
|
]),
|
|
686
|
-
trailingIcon:
|
|
686
|
+
trailingIcon: f("h-12 w-12 flex items-center justify-center", {
|
|
687
687
|
"cursor-text": !Y.isValidElement(r)
|
|
688
688
|
}),
|
|
689
|
-
suffix:
|
|
689
|
+
suffix: f(
|
|
690
690
|
"text-on-surface-variant pl-0 pr-4",
|
|
691
691
|
l == "filled" && " pb-2 pt-6",
|
|
692
692
|
l == "outlined" && "py-4 relative z-10"
|
|
@@ -695,7 +695,7 @@ const Be = (e) => {
|
|
|
695
695
|
), Ge = K(
|
|
696
696
|
"toolTip",
|
|
697
697
|
({ position: e, variant: t }) => ({
|
|
698
|
-
toolTip:
|
|
698
|
+
toolTip: f(
|
|
699
699
|
" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",
|
|
700
700
|
{
|
|
701
701
|
"bottom-full left-1/2 -translate-x-1/2": e == "top",
|
|
@@ -708,20 +708,20 @@ const Be = (e) => {
|
|
|
708
708
|
"top-full left-full": e == "bottom-right"
|
|
709
709
|
}
|
|
710
710
|
),
|
|
711
|
-
container:
|
|
711
|
+
container: f(
|
|
712
712
|
"pb-2",
|
|
713
713
|
t == "rich" && "bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",
|
|
714
714
|
t == "plain" && "bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"
|
|
715
715
|
),
|
|
716
|
-
actions:
|
|
716
|
+
actions: f(
|
|
717
717
|
"flex gap-10 px-1 mt-2",
|
|
718
718
|
t == "plain" && "hidden"
|
|
719
719
|
),
|
|
720
|
-
subHead:
|
|
720
|
+
subHead: f(
|
|
721
721
|
"text-title-small mb-1",
|
|
722
722
|
t == "plain" && "hidden"
|
|
723
723
|
),
|
|
724
|
-
supportingText:
|
|
724
|
+
supportingText: f("")
|
|
725
725
|
})
|
|
726
726
|
), Q = ({ icon: e, colors: t = [], className: r }) => {
|
|
727
727
|
if (typeof e == "string") {
|
|
@@ -735,7 +735,7 @@ const Be = (e) => {
|
|
|
735
735
|
)), /* @__PURE__ */ u(
|
|
736
736
|
"div",
|
|
737
737
|
{
|
|
738
|
-
className:
|
|
738
|
+
className: f(
|
|
739
739
|
"size-5 box-content inline-flex fill-current",
|
|
740
740
|
r
|
|
741
741
|
),
|
|
@@ -752,7 +752,7 @@ const Be = (e) => {
|
|
|
752
752
|
src: o.src,
|
|
753
753
|
width: o.width,
|
|
754
754
|
height: o.height,
|
|
755
|
-
className:
|
|
755
|
+
className: f("size-5 box-content", r),
|
|
756
756
|
style: {
|
|
757
757
|
filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
|
|
758
758
|
},
|
|
@@ -764,7 +764,7 @@ const Be = (e) => {
|
|
|
764
764
|
const l = e;
|
|
765
765
|
if (!(l != null && l.prefix))
|
|
766
766
|
throw new Error(`Invalid icon type: ${typeof e}`);
|
|
767
|
-
const { icon: n } = l, [
|
|
767
|
+
const { icon: n } = l, [c, i, , , a] = n || [], d = (o) => {
|
|
768
768
|
switch (o.length) {
|
|
769
769
|
case 2:
|
|
770
770
|
return {
|
|
@@ -780,13 +780,13 @@ const Be = (e) => {
|
|
|
780
780
|
return /* @__PURE__ */ u(
|
|
781
781
|
"svg",
|
|
782
782
|
{
|
|
783
|
-
className:
|
|
784
|
-
style: { ...
|
|
783
|
+
className: f("size-5 box-content", r),
|
|
784
|
+
style: { ...d(t) },
|
|
785
785
|
xmlns: "http://www.w3.org/2000/svg",
|
|
786
|
-
viewBox: `0 0 ${
|
|
786
|
+
viewBox: `0 0 ${c} ${i}`,
|
|
787
787
|
role: "img",
|
|
788
788
|
"aria-hidden": "true",
|
|
789
|
-
children: typeof a == "string" ? /* @__PURE__ */ u("path", { className: "fill-current", d: a }) : a.map((o,
|
|
789
|
+
children: typeof a == "string" ? /* @__PURE__ */ u("path", { className: "fill-current", d: a }) : a.map((o, h) => /* @__PURE__ */ u("path", { d: o }, h))
|
|
790
790
|
}
|
|
791
791
|
);
|
|
792
792
|
}, Ye = ({
|
|
@@ -796,37 +796,37 @@ const Be = (e) => {
|
|
|
796
796
|
className: l,
|
|
797
797
|
...n
|
|
798
798
|
}) => {
|
|
799
|
-
const [
|
|
800
|
-
|
|
799
|
+
const [c, i] = R(t), [a] = R(1.5);
|
|
800
|
+
P(() => {
|
|
801
801
|
t > 100 && (t = 100), t < 0 && (t = 0), i(t);
|
|
802
802
|
}, [t]);
|
|
803
|
-
const [
|
|
804
|
-
|
|
805
|
-
if ((e === "circular-indeterminate" || e === "linear-indeterminate") &&
|
|
803
|
+
const [d, o] = R(!0), h = () => d ? a : a * 0.5;
|
|
804
|
+
P(() => {
|
|
805
|
+
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && c !== 100) {
|
|
806
806
|
const v = setInterval(() => {
|
|
807
|
-
i(
|
|
808
|
-
},
|
|
807
|
+
i(d ? 10 : 90), o(!d);
|
|
808
|
+
}, h() * 1e3);
|
|
809
809
|
return () => clearInterval(v);
|
|
810
810
|
}
|
|
811
|
-
}, [e,
|
|
812
|
-
const [
|
|
813
|
-
|
|
814
|
-
if (
|
|
811
|
+
}, [e, d, c]);
|
|
812
|
+
const [p, s] = R(!1);
|
|
813
|
+
P(() => {
|
|
814
|
+
if (c >= 100) {
|
|
815
815
|
const v = setTimeout(() => {
|
|
816
|
-
|
|
816
|
+
s(!1);
|
|
817
817
|
}, r);
|
|
818
818
|
return () => {
|
|
819
819
|
clearTimeout(v);
|
|
820
820
|
};
|
|
821
821
|
} else
|
|
822
|
-
|
|
823
|
-
}, [
|
|
822
|
+
s(!0);
|
|
823
|
+
}, [c, r]);
|
|
824
824
|
const y = Fe({
|
|
825
825
|
className: l,
|
|
826
826
|
variant: e,
|
|
827
827
|
value: t,
|
|
828
828
|
transitionDuration: r,
|
|
829
|
-
isVisible:
|
|
829
|
+
isVisible: p
|
|
830
830
|
});
|
|
831
831
|
return /* @__PURE__ */ U(re, { children: [
|
|
832
832
|
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ U("div", { className: y.progressIndicator, ...n, children: [
|
|
@@ -834,8 +834,8 @@ const Be = (e) => {
|
|
|
834
834
|
"div",
|
|
835
835
|
{
|
|
836
836
|
style: {
|
|
837
|
-
width: `${
|
|
838
|
-
transition: `width ${r}ms ease-in-out ${
|
|
837
|
+
width: `${c}%`,
|
|
838
|
+
transition: `width ${r}ms ease-in-out ${c == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
|
|
839
839
|
},
|
|
840
840
|
className: y.track
|
|
841
841
|
}
|
|
@@ -844,8 +844,8 @@ const Be = (e) => {
|
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
846
846
|
style: {
|
|
847
|
-
marginLeft:
|
|
848
|
-
transition: `width ${r}ms ease-in-out ${
|
|
847
|
+
marginLeft: c != 100 ? "6px" : "0px",
|
|
848
|
+
transition: `width ${r}ms ease-in-out ${c == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r / 1.5}ms` : ""}`
|
|
849
849
|
},
|
|
850
850
|
className: y.activeIndicator
|
|
851
851
|
}
|
|
@@ -871,7 +871,7 @@ const Be = (e) => {
|
|
|
871
871
|
animate: { rotate: 270 },
|
|
872
872
|
transition: {
|
|
873
873
|
repeat: 1 / 0,
|
|
874
|
-
duration:
|
|
874
|
+
duration: h(),
|
|
875
875
|
ease: "linear"
|
|
876
876
|
},
|
|
877
877
|
className: y.progressIndicator,
|
|
@@ -881,7 +881,7 @@ const Be = (e) => {
|
|
|
881
881
|
{
|
|
882
882
|
cx: "50%",
|
|
883
883
|
cy: "50%",
|
|
884
|
-
r:
|
|
884
|
+
r: p ? "calc(50% - 2px)" : "50%",
|
|
885
885
|
style: {
|
|
886
886
|
strokeLinecap: "round"
|
|
887
887
|
},
|
|
@@ -890,24 +890,24 @@ const Be = (e) => {
|
|
|
890
890
|
className: y.activeIndicator,
|
|
891
891
|
variants: {
|
|
892
892
|
hidden: {
|
|
893
|
-
pathLength:
|
|
893
|
+
pathLength: d ? 10 / 100 : 90 / 100
|
|
894
894
|
},
|
|
895
895
|
visible: {
|
|
896
|
-
pathLength:
|
|
896
|
+
pathLength: d ? 90 / 100 : 10 / 100
|
|
897
897
|
}
|
|
898
898
|
},
|
|
899
899
|
transition: {
|
|
900
900
|
pathLength: {
|
|
901
901
|
type: "tween",
|
|
902
902
|
ease: "linear",
|
|
903
|
-
duration:
|
|
903
|
+
duration: h(),
|
|
904
904
|
bounce: 0
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
)
|
|
909
909
|
},
|
|
910
|
-
|
|
910
|
+
d + ""
|
|
911
911
|
)
|
|
912
912
|
] });
|
|
913
913
|
}, ne = ({
|
|
@@ -931,28 +931,28 @@ const Be = (e) => {
|
|
|
931
931
|
borderRadius: { duration: 0.3, delay: 0.3 }
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
}, [l, n] =
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}, [
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
return
|
|
941
|
-
|
|
934
|
+
}, [l, n] = R(!0), [c, i] = R(!1), [a, d] = R({ x: 0, y: 0 });
|
|
935
|
+
P(() => {
|
|
936
|
+
c && (n(!0), n(!1));
|
|
937
|
+
}, [c]), P(() => {
|
|
938
|
+
const s = t == null ? void 0 : t.current;
|
|
939
|
+
if (s)
|
|
940
|
+
return s.addEventListener("mousedown", o), s.addEventListener("mouseup", p), s.addEventListener("mouseleave", h), () => {
|
|
941
|
+
s.removeEventListener("mousedown", o), s.removeEventListener("mouseup", p), s.removeEventListener("mouseleave", h);
|
|
942
942
|
};
|
|
943
943
|
}, [t]);
|
|
944
|
-
const o = (
|
|
944
|
+
const o = (s) => {
|
|
945
945
|
const y = t == null ? void 0 : t.current, v = y.getBoundingClientRect();
|
|
946
|
-
i(!0),
|
|
947
|
-
x: (
|
|
948
|
-
y: (
|
|
946
|
+
i(!0), d({
|
|
947
|
+
x: (s.clientX - v.left) / y.clientWidth * 100,
|
|
948
|
+
y: (s.clientY - v.top) / y.clientHeight * 100
|
|
949
949
|
});
|
|
950
|
-
},
|
|
950
|
+
}, h = (s) => {
|
|
951
951
|
i(!1);
|
|
952
|
-
},
|
|
952
|
+
}, p = (s) => {
|
|
953
953
|
i(!1);
|
|
954
954
|
};
|
|
955
|
-
return /* @__PURE__ */ u(z, { mode: "wait", children: (
|
|
955
|
+
return /* @__PURE__ */ u(z, { mode: "wait", children: (c || !c && !l) && /* @__PURE__ */ u(
|
|
956
956
|
j.div,
|
|
957
957
|
{
|
|
958
958
|
style: {
|
|
@@ -975,7 +975,7 @@ const Be = (e) => {
|
|
|
975
975
|
}, Ze = K(
|
|
976
976
|
"customScroll",
|
|
977
977
|
({ orientation: e, draggable: t, isDragging: r }) => ({
|
|
978
|
-
customScroll:
|
|
978
|
+
customScroll: f(
|
|
979
979
|
"flex h-full w-full",
|
|
980
980
|
t && [
|
|
981
981
|
"[&::-webkit-scrollbar-track]:rounded-full",
|
|
@@ -995,7 +995,7 @@ const Be = (e) => {
|
|
|
995
995
|
"cursor-grabbing": t && r
|
|
996
996
|
}
|
|
997
997
|
),
|
|
998
|
-
track:
|
|
998
|
+
track: f("overflow-hidden flex-none sticky", {
|
|
999
999
|
"left-0 h-full": e === "horizontal",
|
|
1000
1000
|
"top-0 w-full": e === "vertical"
|
|
1001
1001
|
})
|
|
@@ -1006,39 +1006,39 @@ const Be = (e) => {
|
|
|
1006
1006
|
scrollSize: r,
|
|
1007
1007
|
onScroll: l,
|
|
1008
1008
|
className: n,
|
|
1009
|
-
draggable:
|
|
1009
|
+
draggable: c = !1,
|
|
1010
1010
|
throttleDuration: i = 75
|
|
1011
1011
|
}) => {
|
|
1012
|
-
var
|
|
1013
|
-
const a = V(null),
|
|
1012
|
+
var W, F;
|
|
1013
|
+
const a = V(null), d = V(null), [o, h] = R({
|
|
1014
1014
|
width: null,
|
|
1015
1015
|
height: null
|
|
1016
1016
|
});
|
|
1017
|
-
|
|
1017
|
+
P(() => {
|
|
1018
1018
|
if (!a.current) return;
|
|
1019
|
-
const
|
|
1019
|
+
const C = new ResizeObserver((H) => {
|
|
1020
1020
|
for (const X of H)
|
|
1021
|
-
X.target === a.current &&
|
|
1021
|
+
X.target === a.current && h({
|
|
1022
1022
|
width: X.contentRect.width,
|
|
1023
1023
|
height: X.contentRect.height
|
|
1024
1024
|
// On observe aussi la hauteur maintenant
|
|
1025
1025
|
});
|
|
1026
1026
|
});
|
|
1027
|
-
return
|
|
1028
|
-
|
|
1027
|
+
return C.observe(a.current), () => {
|
|
1028
|
+
C.disconnect();
|
|
1029
1029
|
};
|
|
1030
1030
|
}, [a]);
|
|
1031
|
-
const
|
|
1032
|
-
const
|
|
1033
|
-
return
|
|
1034
|
-
width: r ??
|
|
1035
|
-
height: r ??
|
|
1031
|
+
const p = V(null), s = V(null), y = () => {
|
|
1032
|
+
const C = d.current;
|
|
1033
|
+
return C ? {
|
|
1034
|
+
width: r ?? C.scrollWidth,
|
|
1035
|
+
height: r ?? C.scrollHeight
|
|
1036
1036
|
} : null;
|
|
1037
1037
|
}, v = () => {
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1040
|
-
width:
|
|
1041
|
-
height:
|
|
1038
|
+
const C = a.current;
|
|
1039
|
+
return C ? {
|
|
1040
|
+
width: C.clientWidth,
|
|
1041
|
+
height: C.clientHeight
|
|
1042
1042
|
// Correction ici pour retourner la bonne hauteur
|
|
1043
1043
|
} : null;
|
|
1044
1044
|
}, { scrollYProgress: N, scrollXProgress: L } = Ne({
|
|
@@ -1046,67 +1046,67 @@ const Be = (e) => {
|
|
|
1046
1046
|
}), I = V(null);
|
|
1047
1047
|
I.current || (I.current = Ie(
|
|
1048
1048
|
i,
|
|
1049
|
-
(
|
|
1050
|
-
!
|
|
1051
|
-
scrollProgress:
|
|
1052
|
-
scroll:
|
|
1053
|
-
scrollTotal:
|
|
1054
|
-
scrollVisible:
|
|
1049
|
+
(C, H) => {
|
|
1050
|
+
!s.current || !p.current || l && (t === "horizontal" && H === "x" && l({
|
|
1051
|
+
scrollProgress: C,
|
|
1052
|
+
scroll: C * p.current.width,
|
|
1053
|
+
scrollTotal: p.current.width,
|
|
1054
|
+
scrollVisible: s.current.width
|
|
1055
1055
|
}), t === "vertical" && H === "y" && l({
|
|
1056
|
-
scrollProgress:
|
|
1057
|
-
scroll:
|
|
1058
|
-
scrollTotal:
|
|
1059
|
-
scrollVisible:
|
|
1056
|
+
scrollProgress: C,
|
|
1057
|
+
scroll: C * p.current.height,
|
|
1058
|
+
scrollTotal: p.current.height,
|
|
1059
|
+
scrollVisible: s.current.height
|
|
1060
1060
|
}));
|
|
1061
1061
|
}
|
|
1062
1062
|
));
|
|
1063
|
-
const w = (
|
|
1064
|
-
I.current && I.current(
|
|
1063
|
+
const w = (C, H) => {
|
|
1064
|
+
I.current && I.current(C, H);
|
|
1065
1065
|
};
|
|
1066
|
-
|
|
1066
|
+
P(() => {
|
|
1067
1067
|
o.width && w(L.get(), "x"), o.height && w(N.get(), "y");
|
|
1068
|
-
}, [o]), se(L, "change", (
|
|
1069
|
-
w(
|
|
1070
|
-
}), se(N, "change", (
|
|
1071
|
-
w(
|
|
1068
|
+
}, [o]), se(L, "change", (C) => {
|
|
1069
|
+
w(C, "x");
|
|
1070
|
+
}), se(N, "change", (C) => {
|
|
1071
|
+
w(C, "y");
|
|
1072
1072
|
});
|
|
1073
|
-
const [B, b] =
|
|
1073
|
+
const [B, b] = R(!1);
|
|
1074
1074
|
fe(() => {
|
|
1075
|
-
B || !
|
|
1075
|
+
B || !s.current || !p.current || !l || (l({
|
|
1076
1076
|
scrollProgress: 0,
|
|
1077
1077
|
scroll: 0,
|
|
1078
|
-
scrollTotal: t == "vertical" ?
|
|
1079
|
-
scrollVisible: t == "vertical" ?
|
|
1078
|
+
scrollTotal: t == "vertical" ? p.current.height : p.current.width,
|
|
1079
|
+
scrollVisible: t == "vertical" ? s.current.height : s.current.width
|
|
1080
1080
|
}), b(!0));
|
|
1081
|
-
}, [
|
|
1082
|
-
const [E,
|
|
1081
|
+
}, [s, p, l]), p.current = y(), s.current = v();
|
|
1082
|
+
const [E, M] = R(!1), D = Ze({
|
|
1083
1083
|
isDragging: E,
|
|
1084
1084
|
children: e,
|
|
1085
1085
|
className: n,
|
|
1086
1086
|
onScroll: l,
|
|
1087
1087
|
orientation: t,
|
|
1088
1088
|
scrollSize: r,
|
|
1089
|
-
draggable:
|
|
1089
|
+
draggable: c,
|
|
1090
1090
|
throttleDuration: i
|
|
1091
|
-
}), [
|
|
1092
|
-
if (!
|
|
1091
|
+
}), [$, k] = R(0), [m, S] = R(0), O = (C) => {
|
|
1092
|
+
if (!c) return;
|
|
1093
1093
|
const H = a.current;
|
|
1094
|
-
if (!H ||
|
|
1095
|
-
const J = (
|
|
1094
|
+
if (!H || $ == null) return;
|
|
1095
|
+
const J = (C.pageX - H.offsetLeft - $) * 1.5;
|
|
1096
1096
|
H.scrollLeft = m - J;
|
|
1097
|
-
}, _ = (
|
|
1097
|
+
}, _ = (C) => {
|
|
1098
1098
|
const H = a.current;
|
|
1099
|
-
H && (
|
|
1100
|
-
}, Z = (
|
|
1101
|
-
E && (
|
|
1099
|
+
H && (M(!0), k(C.pageX - H.offsetLeft), S(H.scrollLeft));
|
|
1100
|
+
}, Z = (C) => {
|
|
1101
|
+
E && (C.preventDefault(), O(C));
|
|
1102
1102
|
}, q = () => {
|
|
1103
|
-
|
|
1103
|
+
M(!1);
|
|
1104
1104
|
}, A = () => {
|
|
1105
|
-
|
|
1106
|
-
}, g = (
|
|
1107
|
-
|
|
1105
|
+
M(!1);
|
|
1106
|
+
}, g = (C) => {
|
|
1107
|
+
C.preventDefault();
|
|
1108
1108
|
}, x = V(null);
|
|
1109
|
-
return
|
|
1109
|
+
return P(() => () => {
|
|
1110
1110
|
x.current && clearTimeout(x.current);
|
|
1111
1111
|
}, []), /* @__PURE__ */ U(
|
|
1112
1112
|
"div",
|
|
@@ -1118,37 +1118,37 @@ const Be = (e) => {
|
|
|
1118
1118
|
onMouseUp: q,
|
|
1119
1119
|
onMouseLeave: A,
|
|
1120
1120
|
onDragStart: g,
|
|
1121
|
-
onScroll: (
|
|
1122
|
-
E || (k(null),
|
|
1123
|
-
|
|
1121
|
+
onScroll: (C) => {
|
|
1122
|
+
E || (k(null), M(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
1123
|
+
M(!1);
|
|
1124
1124
|
}, 1e3));
|
|
1125
1125
|
},
|
|
1126
1126
|
children: [
|
|
1127
1127
|
/* @__PURE__ */ u(
|
|
1128
1128
|
"div",
|
|
1129
1129
|
{
|
|
1130
|
-
ref:
|
|
1131
|
-
style: t === "vertical" ? { height: ((
|
|
1130
|
+
ref: d,
|
|
1131
|
+
style: t === "vertical" ? { height: ((W = s == null ? void 0 : s.current) == null ? void 0 : W.height) ?? "100%" } : { width: ((F = s == null ? void 0 : s.current) == null ? void 0 : F.width) ?? "100%" },
|
|
1132
1132
|
className: D.track,
|
|
1133
1133
|
children: e
|
|
1134
1134
|
}
|
|
1135
1135
|
),
|
|
1136
|
-
|
|
1137
|
-
t === "vertical" &&
|
|
1136
|
+
s.current && p.current && /* @__PURE__ */ U(re, { children: [
|
|
1137
|
+
t === "vertical" && p.current.height > s.current.height && /* @__PURE__ */ u(
|
|
1138
1138
|
j.div,
|
|
1139
1139
|
{
|
|
1140
1140
|
className: "flex-none",
|
|
1141
1141
|
style: {
|
|
1142
|
-
height:
|
|
1142
|
+
height: p.current.height - s.current.height
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
),
|
|
1146
|
-
t === "horizontal" &&
|
|
1146
|
+
t === "horizontal" && p.current.width > s.current.width && /* @__PURE__ */ u(
|
|
1147
1147
|
j.div,
|
|
1148
1148
|
{
|
|
1149
1149
|
className: "flex-none",
|
|
1150
1150
|
style: {
|
|
1151
|
-
width:
|
|
1151
|
+
width: p.current.width - s.current.width
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
)
|
|
@@ -1163,33 +1163,33 @@ const Be = (e) => {
|
|
|
1163
1163
|
throttleDuration: l = 25,
|
|
1164
1164
|
...n
|
|
1165
1165
|
}) => {
|
|
1166
|
-
const [
|
|
1166
|
+
const [c, i] = R(null), a = me((c == null ? void 0 : c.scrollProgress) ?? 0), d = oe(
|
|
1167
1167
|
a,
|
|
1168
1168
|
[0, 1],
|
|
1169
|
-
[0, 1 - ((
|
|
1169
|
+
[0, 1 - ((c == null ? void 0 : c.scrollVisible) ?? 0) / ((c == null ? void 0 : c.scrollTotal) ?? 0)]
|
|
1170
1170
|
), o = oe(
|
|
1171
|
-
|
|
1172
|
-
(
|
|
1173
|
-
),
|
|
1174
|
-
a.set(
|
|
1175
|
-
},
|
|
1176
|
-
return se(o, "change", (
|
|
1171
|
+
d,
|
|
1172
|
+
(s) => `${-s * 100}%`
|
|
1173
|
+
), h = (s) => {
|
|
1174
|
+
a.set(s.scrollProgress), s.scrollTotal > 0 && i(s);
|
|
1175
|
+
}, p = V(null);
|
|
1176
|
+
return se(o, "change", (s) => {
|
|
1177
1177
|
const y = performance.now();
|
|
1178
|
-
if (
|
|
1179
|
-
const v = y -
|
|
1178
|
+
if (p.current !== null) {
|
|
1179
|
+
const v = y - p.current;
|
|
1180
1180
|
console.log(`Delta temps : ${v} ms`);
|
|
1181
1181
|
}
|
|
1182
|
-
|
|
1182
|
+
p.current = y, console.log(s);
|
|
1183
1183
|
}), /* @__PURE__ */ u(
|
|
1184
1184
|
he,
|
|
1185
1185
|
{
|
|
1186
|
-
onScroll:
|
|
1186
|
+
onScroll: h,
|
|
1187
1187
|
throttleDuration: l,
|
|
1188
1188
|
...n,
|
|
1189
1189
|
children: /* @__PURE__ */ u(
|
|
1190
1190
|
j.div,
|
|
1191
1191
|
{
|
|
1192
|
-
className:
|
|
1192
|
+
className: f("transition-transform ease-out", {
|
|
1193
1193
|
"w-fit h-full": r === "horizontal",
|
|
1194
1194
|
"h-fit w-full": r === "vertical"
|
|
1195
1195
|
}),
|
|
@@ -1206,7 +1206,7 @@ const Be = (e) => {
|
|
|
1206
1206
|
targetRef: e,
|
|
1207
1207
|
children: t
|
|
1208
1208
|
}) => {
|
|
1209
|
-
const [r, l] =
|
|
1209
|
+
const [r, l] = R(null), n = V(null), c = () => {
|
|
1210
1210
|
const i = e.current;
|
|
1211
1211
|
if (!i) return;
|
|
1212
1212
|
const a = i.getBoundingClientRect();
|
|
@@ -1222,58 +1222,70 @@ const Be = (e) => {
|
|
|
1222
1222
|
// personnalise si besoin
|
|
1223
1223
|
});
|
|
1224
1224
|
};
|
|
1225
|
-
return
|
|
1225
|
+
return P(() => {
|
|
1226
1226
|
const i = e.current;
|
|
1227
1227
|
if (i)
|
|
1228
|
-
return
|
|
1228
|
+
return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), n.current = new ResizeObserver(c), n.current.observe(i), () => {
|
|
1229
1229
|
var a;
|
|
1230
|
-
window.removeEventListener("scroll",
|
|
1230
|
+
window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), (a = n.current) == null || a.disconnect();
|
|
1231
1231
|
};
|
|
1232
1232
|
}, [e]), r ? Ee(/* @__PURE__ */ u("div", { style: r, children: t }), document.body) : null;
|
|
1233
1233
|
};
|
|
1234
1234
|
function Qe(e) {
|
|
1235
1235
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
|
|
1236
1236
|
}
|
|
1237
|
-
const Lt = ({
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1237
|
+
const Lt = ({
|
|
1238
|
+
config: e,
|
|
1239
|
+
throttleDelay: t = 100
|
|
1240
|
+
// Délai par défaut de 300ms
|
|
1241
|
+
}) => {
|
|
1242
|
+
const [r, l] = R(null), [n, c] = R(null), i = V(null), a = V(e.sourceColor), d = V(!0);
|
|
1243
|
+
P(() => {
|
|
1244
|
+
if (d.current) {
|
|
1245
|
+
d.current = !1, a.current = e.sourceColor, o(e.sourceColor);
|
|
1242
1246
|
return;
|
|
1243
1247
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1248
|
+
if (e.sourceColor !== a.current)
|
|
1249
|
+
return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
1250
|
+
a.current = e.sourceColor, o(e.sourceColor), i.current = null;
|
|
1251
|
+
}, t), () => {
|
|
1252
|
+
i.current && (clearTimeout(i.current), i.current = null);
|
|
1253
|
+
};
|
|
1254
|
+
}, [e.sourceColor, t]);
|
|
1255
|
+
const o = async (h) => {
|
|
1256
|
+
if (!Qe(h)) {
|
|
1257
|
+
l("Invalid hex color");
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
l(null);
|
|
1261
|
+
try {
|
|
1262
|
+
const p = await ke(e);
|
|
1263
|
+
p.themes.update({
|
|
1264
|
+
sourceColorHex: h
|
|
1265
|
+
}), await p.load();
|
|
1266
|
+
const s = p.plugins.getPlugin(Ce).getInstance().outputCss;
|
|
1267
|
+
s && c(s);
|
|
1268
|
+
} catch (p) {
|
|
1269
|
+
l(p instanceof Error ? p.message : "Theme loading failed");
|
|
1261
1270
|
}
|
|
1262
|
-
|
|
1271
|
+
};
|
|
1272
|
+
return P(() => () => {
|
|
1273
|
+
i.current && clearTimeout(i.current);
|
|
1274
|
+
}, []), r ? null : n ? /* @__PURE__ */ u("style", { dangerouslySetInnerHTML: { __html: n } }) : (console.error("ThemeProvider null"), null);
|
|
1263
1275
|
}, Ae = ({
|
|
1264
1276
|
variant: e = "filled",
|
|
1265
1277
|
disabled: t = !1,
|
|
1266
1278
|
icon: r,
|
|
1267
1279
|
href: l,
|
|
1268
1280
|
label: n,
|
|
1269
|
-
disableTextMargins:
|
|
1281
|
+
disableTextMargins: c,
|
|
1270
1282
|
className: i,
|
|
1271
1283
|
iconPosition: a = "left",
|
|
1272
|
-
loading:
|
|
1284
|
+
loading: d = !1,
|
|
1273
1285
|
shape: o = "rounded",
|
|
1274
|
-
onClick:
|
|
1275
|
-
onToggle:
|
|
1276
|
-
activated:
|
|
1286
|
+
onClick: h,
|
|
1287
|
+
onToggle: p,
|
|
1288
|
+
activated: s,
|
|
1277
1289
|
ref: y,
|
|
1278
1290
|
size: v = "medium",
|
|
1279
1291
|
allowShapeTransformation: N = !0,
|
|
@@ -1285,34 +1297,34 @@ const Lt = ({ config: e }) => {
|
|
|
1285
1297
|
throw new Error(
|
|
1286
1298
|
"Button component requires either a label prop or children content"
|
|
1287
1299
|
);
|
|
1288
|
-
const B = l ? "a" : "button", b = V(null), E = y || b, [
|
|
1289
|
-
|
|
1290
|
-
D(
|
|
1291
|
-
}, [
|
|
1292
|
-
let
|
|
1293
|
-
|
|
1300
|
+
const B = l ? "a" : "button", b = V(null), E = y || b, [M, D] = Y.useState(s);
|
|
1301
|
+
P(() => {
|
|
1302
|
+
D(s);
|
|
1303
|
+
}, [s]), L = { duration: 0.3, ...L };
|
|
1304
|
+
let $;
|
|
1305
|
+
p ? p && ($ = (S) => {
|
|
1294
1306
|
t && S.preventDefault();
|
|
1295
|
-
const O = !
|
|
1296
|
-
D(O),
|
|
1297
|
-
}) :
|
|
1298
|
-
t && S.preventDefault(),
|
|
1307
|
+
const O = !M;
|
|
1308
|
+
D(O), p(O);
|
|
1309
|
+
}) : $ = (S) => {
|
|
1310
|
+
t && S.preventDefault(), h && h(S);
|
|
1299
1311
|
};
|
|
1300
1312
|
const k = Pe({
|
|
1301
1313
|
allowShapeTransformation: N,
|
|
1302
1314
|
size: v,
|
|
1303
|
-
disableTextMargins:
|
|
1315
|
+
disableTextMargins: c,
|
|
1304
1316
|
shape: o,
|
|
1305
1317
|
href: l,
|
|
1306
1318
|
disabled: t,
|
|
1307
1319
|
icon: r,
|
|
1308
1320
|
iconPosition: a,
|
|
1309
|
-
loading:
|
|
1321
|
+
loading: d,
|
|
1310
1322
|
variant: e,
|
|
1311
1323
|
transition: L,
|
|
1312
1324
|
className: i,
|
|
1313
|
-
isActive:
|
|
1314
|
-
onToggle:
|
|
1315
|
-
activated:
|
|
1325
|
+
isActive: M ?? !1,
|
|
1326
|
+
onToggle: p,
|
|
1327
|
+
activated: M,
|
|
1316
1328
|
label: n,
|
|
1317
1329
|
children: n
|
|
1318
1330
|
}), m = r ? /* @__PURE__ */ u(Q, { icon: r, className: k.icon }) : /* @__PURE__ */ u(re, {});
|
|
@@ -1323,9 +1335,9 @@ const Lt = ({ config: e }) => {
|
|
|
1323
1335
|
href: l,
|
|
1324
1336
|
className: k.button,
|
|
1325
1337
|
...w,
|
|
1326
|
-
onClick:
|
|
1338
|
+
onClick: $,
|
|
1327
1339
|
disabled: t,
|
|
1328
|
-
"aria-pressed":
|
|
1340
|
+
"aria-pressed": p ? M : void 0,
|
|
1329
1341
|
style: { transition: L.duration + "s" },
|
|
1330
1342
|
children: [
|
|
1331
1343
|
/* @__PURE__ */ u("div", { className: k.touchTarget }),
|
|
@@ -1337,14 +1349,14 @@ const Lt = ({ config: e }) => {
|
|
|
1337
1349
|
children: !t && /* @__PURE__ */ u(
|
|
1338
1350
|
ne,
|
|
1339
1351
|
{
|
|
1340
|
-
colorName: e === "filled" &&
|
|
1352
|
+
colorName: e === "filled" && p && "on-surface-variant" || e === "filled" && !p && "on-primary" || e === "elevated" && "primary" || e === "tonal" && "on-secondary-container" || e === "outlined" && "primary" || e === "text" && "primary" || "",
|
|
1341
1353
|
triggerRef: E
|
|
1342
1354
|
}
|
|
1343
1355
|
)
|
|
1344
1356
|
}
|
|
1345
1357
|
),
|
|
1346
1358
|
a === "left" && m,
|
|
1347
|
-
|
|
1359
|
+
d && /* @__PURE__ */ u(
|
|
1348
1360
|
"div",
|
|
1349
1361
|
{
|
|
1350
1362
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
@@ -1353,7 +1365,7 @@ const Lt = ({ config: e }) => {
|
|
|
1353
1365
|
{
|
|
1354
1366
|
className: () => ({
|
|
1355
1367
|
progressIndicator: "h-6 w-6",
|
|
1356
|
-
activeIndicator:
|
|
1368
|
+
activeIndicator: f(
|
|
1357
1369
|
{
|
|
1358
1370
|
"!stroke-primary": e === "elevated" && !t,
|
|
1359
1371
|
"!stroke-on-surface/[38%]": e === "elevated" && t
|
|
@@ -1392,25 +1404,25 @@ const Lt = ({ config: e }) => {
|
|
|
1392
1404
|
children: r,
|
|
1393
1405
|
isInteractive: l = !1,
|
|
1394
1406
|
ref: n,
|
|
1395
|
-
...
|
|
1407
|
+
...c
|
|
1396
1408
|
}) => {
|
|
1397
|
-
const i = $e({ className: t, isInteractive: l, variant: e, children: r }), a = V(null),
|
|
1398
|
-
return /* @__PURE__ */ U("div", { ...
|
|
1399
|
-
/* @__PURE__ */ u("div", { className: i.stateLayer, children: l && /* @__PURE__ */ u(ne, { colorName: "on-surface", triggerRef:
|
|
1409
|
+
const i = $e({ className: t, isInteractive: l, variant: e, children: r }), a = V(null), d = n || a;
|
|
1410
|
+
return /* @__PURE__ */ U("div", { ...c, ref: d, className: i.card, children: [
|
|
1411
|
+
/* @__PURE__ */ u("div", { className: i.stateLayer, children: l && /* @__PURE__ */ u(ne, { colorName: "on-surface", triggerRef: d }) }),
|
|
1400
1412
|
r
|
|
1401
1413
|
] });
|
|
1402
1414
|
}, ze = (e, t, r = [0, 1]) => {
|
|
1403
|
-
const [l, n] = t, [
|
|
1404
|
-
return
|
|
1415
|
+
const [l, n] = t, [c, i] = r, d = (Math.max(l, Math.min(e, n)) - l) / (n - l);
|
|
1416
|
+
return c + d * (i - c);
|
|
1405
1417
|
}, Te = ({
|
|
1406
1418
|
className: e,
|
|
1407
1419
|
children: t,
|
|
1408
1420
|
width: r = 1,
|
|
1409
1421
|
index: l = 0,
|
|
1410
1422
|
ref: n,
|
|
1411
|
-
...
|
|
1423
|
+
...c
|
|
1412
1424
|
}) => {
|
|
1413
|
-
const i = V(null), a = n || i,
|
|
1425
|
+
const i = V(null), a = n || i, d = We({
|
|
1414
1426
|
className: e,
|
|
1415
1427
|
index: l,
|
|
1416
1428
|
width: r,
|
|
@@ -1425,8 +1437,8 @@ const Lt = ({ config: e }) => {
|
|
|
1425
1437
|
duration: 0.5,
|
|
1426
1438
|
ease: "linear"
|
|
1427
1439
|
},
|
|
1428
|
-
className:
|
|
1429
|
-
...
|
|
1440
|
+
className: d.carouselItem,
|
|
1441
|
+
...c,
|
|
1430
1442
|
children: t
|
|
1431
1443
|
}
|
|
1432
1444
|
);
|
|
@@ -1436,31 +1448,31 @@ const Lt = ({ config: e }) => {
|
|
|
1436
1448
|
children: r,
|
|
1437
1449
|
ref: l,
|
|
1438
1450
|
marginPourcent: n = 0,
|
|
1439
|
-
inputRange:
|
|
1451
|
+
inputRange: c = [0.21, 0.65],
|
|
1440
1452
|
outputRange: i = [42, 300],
|
|
1441
1453
|
gap: a = 8,
|
|
1442
|
-
onChange:
|
|
1454
|
+
onChange: d,
|
|
1443
1455
|
scrollSensitivity: o = 1.25,
|
|
1444
|
-
...
|
|
1456
|
+
...h
|
|
1445
1457
|
}) => {
|
|
1446
1458
|
var q, A;
|
|
1447
|
-
const
|
|
1459
|
+
const p = V(null), s = l || p, y = De({
|
|
1448
1460
|
className: t,
|
|
1449
1461
|
children: r,
|
|
1450
1462
|
variant: e,
|
|
1451
|
-
inputRange:
|
|
1463
|
+
inputRange: c,
|
|
1452
1464
|
outputRange: i,
|
|
1453
1465
|
marginPourcent: n,
|
|
1454
|
-
onChange:
|
|
1466
|
+
onChange: d,
|
|
1455
1467
|
gap: a,
|
|
1456
1468
|
scrollSensitivity: o
|
|
1457
1469
|
}), v = Y.Children.toArray(r).filter(
|
|
1458
1470
|
(g) => Y.isValidElement(g) && g.type === Te
|
|
1459
|
-
), N = V(null), [L, I] =
|
|
1471
|
+
), N = V(null), [L, I] = R([]), [w, B] = R(null), b = () => {
|
|
1460
1472
|
var H;
|
|
1461
|
-
if (!N.current || !
|
|
1473
|
+
if (!N.current || !s.current || !w) return [];
|
|
1462
1474
|
const { scrollVisible: g, scrollProgress: x } = w;
|
|
1463
|
-
function
|
|
1475
|
+
function W(X, J) {
|
|
1464
1476
|
return X.map(
|
|
1465
1477
|
(T) => (T - J) / Math.abs(X[1] - X[0])
|
|
1466
1478
|
);
|
|
@@ -1470,20 +1482,20 @@ const Lt = ({ config: e }) => {
|
|
|
1470
1482
|
let te = J / (v.length - 1);
|
|
1471
1483
|
return te > 1 && (te = 1), te < 0 && (te = 0), te;
|
|
1472
1484
|
});
|
|
1473
|
-
F =
|
|
1474
|
-
let
|
|
1485
|
+
F = W(F, x);
|
|
1486
|
+
let C = ((((H = s.current) == null ? void 0 : H.clientWidth) ?? g) - (i[0] + a)) / (i[1] + a);
|
|
1475
1487
|
return F.map((X, J) => ({ value: Math.abs(X), originalIndex: J })).sort((X, J) => X.value - J.value).forEach((X, J) => {
|
|
1476
1488
|
J === 0 && D(X.originalIndex);
|
|
1477
|
-
let T = ze(
|
|
1478
|
-
T < i[0] && (T = i[0]),
|
|
1489
|
+
let T = ze(C, [0, 1], [0, i[1]]);
|
|
1490
|
+
T < i[0] && (T = i[0]), C--, F[X.originalIndex] = T;
|
|
1479
1491
|
}), F;
|
|
1480
|
-
}, E = V([]).current, [
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
}, [
|
|
1492
|
+
}, E = V([]).current, [M, D] = R(0);
|
|
1493
|
+
P(() => {
|
|
1494
|
+
d && d(M);
|
|
1495
|
+
}, [M]), E.length !== v.length && v.forEach((g, x) => {
|
|
1484
1496
|
E[x] || (E[x] = Y.createRef());
|
|
1485
1497
|
});
|
|
1486
|
-
const
|
|
1498
|
+
const $ = v.map((g, x) => Y.cloneElement(
|
|
1487
1499
|
g,
|
|
1488
1500
|
{
|
|
1489
1501
|
width: L[x],
|
|
@@ -1496,7 +1508,7 @@ const Lt = ({ config: e }) => {
|
|
|
1496
1508
|
[0, 1],
|
|
1497
1509
|
[
|
|
1498
1510
|
0,
|
|
1499
|
-
1 - (((q =
|
|
1511
|
+
1 - (((q = s.current) == null ? void 0 : q.clientWidth) ?? 0) / (((A = N == null ? void 0 : N.current) == null ? void 0 : A.clientWidth) ?? 0)
|
|
1500
1512
|
]
|
|
1501
1513
|
), S = oe(
|
|
1502
1514
|
m,
|
|
@@ -1504,17 +1516,17 @@ const Lt = ({ config: e }) => {
|
|
|
1504
1516
|
), O = (g) => {
|
|
1505
1517
|
g.scrollTotal > 0 && B(g);
|
|
1506
1518
|
};
|
|
1507
|
-
|
|
1519
|
+
P(() => {
|
|
1508
1520
|
const g = b();
|
|
1509
1521
|
I(g);
|
|
1510
1522
|
}, [w]);
|
|
1511
|
-
const [_, Z] =
|
|
1523
|
+
const [_, Z] = R(0);
|
|
1512
1524
|
return fe(() => {
|
|
1513
1525
|
let g = i[1];
|
|
1514
1526
|
w && g > w.scrollVisible && (g = w.scrollVisible);
|
|
1515
|
-
const x = (g + a) *
|
|
1527
|
+
const x = (g + a) * $.length / o;
|
|
1516
1528
|
Z(x);
|
|
1517
|
-
}, [
|
|
1529
|
+
}, [s, E, w]), /* @__PURE__ */ u("div", { className: y.carousel, ref: s, ...h, children: /* @__PURE__ */ u(
|
|
1518
1530
|
he,
|
|
1519
1531
|
{
|
|
1520
1532
|
draggable: !0,
|
|
@@ -1532,7 +1544,7 @@ const Lt = ({ config: e }) => {
|
|
|
1532
1544
|
gap: `${a}px`,
|
|
1533
1545
|
x: S
|
|
1534
1546
|
},
|
|
1535
|
-
children:
|
|
1547
|
+
children: $
|
|
1536
1548
|
}
|
|
1537
1549
|
)
|
|
1538
1550
|
}
|
|
@@ -1577,18 +1589,18 @@ const ye = ({
|
|
|
1577
1589
|
className: r,
|
|
1578
1590
|
children: l,
|
|
1579
1591
|
title: n,
|
|
1580
|
-
text:
|
|
1592
|
+
text: c,
|
|
1581
1593
|
position: i,
|
|
1582
1594
|
targetRef: a,
|
|
1583
|
-
ref:
|
|
1595
|
+
ref: d,
|
|
1584
1596
|
trigger: o = ["hover", "focus"],
|
|
1585
|
-
...
|
|
1597
|
+
...h
|
|
1586
1598
|
}) => {
|
|
1587
1599
|
if (!l && !a)
|
|
1588
1600
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
1589
1601
|
Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1602
|
+
const p = V(null), s = a || p, [y, v] = R(null), [N] = R(ce()), [L, I] = R(!1), w = V(null);
|
|
1603
|
+
P(() => {
|
|
1592
1604
|
const m = (S) => {
|
|
1593
1605
|
v(S.detail);
|
|
1594
1606
|
};
|
|
@@ -1598,7 +1610,7 @@ const ye = ({
|
|
|
1598
1610
|
m
|
|
1599
1611
|
);
|
|
1600
1612
|
};
|
|
1601
|
-
}, []),
|
|
1613
|
+
}, []), P(() => {
|
|
1602
1614
|
w.current && clearTimeout(w.current), y ? I(y === N) : w.current = setTimeout(() => {
|
|
1603
1615
|
I(!1);
|
|
1604
1616
|
}, 1200);
|
|
@@ -1620,7 +1632,7 @@ const ye = ({
|
|
|
1620
1632
|
});
|
|
1621
1633
|
document.dispatchEvent(m);
|
|
1622
1634
|
}
|
|
1623
|
-
},
|
|
1635
|
+
}, M = () => {
|
|
1624
1636
|
if (o.includes("focus")) {
|
|
1625
1637
|
const m = new CustomEvent("tooltip-update", { detail: N });
|
|
1626
1638
|
document.dispatchEvent(m);
|
|
@@ -1631,17 +1643,17 @@ const ye = ({
|
|
|
1631
1643
|
document.dispatchEvent(m);
|
|
1632
1644
|
}
|
|
1633
1645
|
};
|
|
1634
|
-
|
|
1635
|
-
if (
|
|
1636
|
-
const m =
|
|
1637
|
-
return m.addEventListener("mouseenter", B), m.addEventListener("mouseleave", b), m.addEventListener("click", E), m.addEventListener("focus",
|
|
1638
|
-
m.removeEventListener("mouseenter", B), m.removeEventListener("mouseleave", b), m.removeEventListener("click", E), m.removeEventListener("focus",
|
|
1646
|
+
P(() => {
|
|
1647
|
+
if (s != null && s.current) {
|
|
1648
|
+
const m = s.current;
|
|
1649
|
+
return m.addEventListener("mouseenter", B), m.addEventListener("mouseleave", b), m.addEventListener("click", E), m.addEventListener("focus", M), m.addEventListener("blur", D), () => {
|
|
1650
|
+
m.removeEventListener("mouseenter", B), m.removeEventListener("mouseleave", b), m.removeEventListener("click", E), m.removeEventListener("focus", M), m.removeEventListener("blur", D);
|
|
1639
1651
|
};
|
|
1640
1652
|
}
|
|
1641
|
-
}, [
|
|
1642
|
-
const
|
|
1643
|
-
if (!i && typeof window < "u" &&
|
|
1644
|
-
const m =
|
|
1653
|
+
}, [s, o, N, L]);
|
|
1654
|
+
const $ = !a && ee(l) ? le(l, { ref: p }) : l;
|
|
1655
|
+
if (!i && typeof window < "u" && s != null && s.current && !i) {
|
|
1656
|
+
const m = s.current.getBoundingClientRect(), S = window.innerWidth, O = window.innerHeight, _ = m.left / S, Z = m.top / O;
|
|
1645
1657
|
e === "plain" ? _ < 1 / 3 ? i = "right" : _ > 2 / 3 ? i = "left" : i = Z > 0.5 ? "top" : "bottom" : _ < 1 / 2 && Z < 1 / 2 ? i = "bottom-right" : _ > 1 / 2 && Z < 1 / 2 ? i = "bottom-left" : _ > 1 / 2 && Z > 1 / 2 ? i = "top-left" : _ < 1 / 2 && Z > 1 / 2 && (i = "top-right");
|
|
1646
1658
|
}
|
|
1647
1659
|
const k = Ge({
|
|
@@ -1649,15 +1661,15 @@ const ye = ({
|
|
|
1649
1661
|
buttons: t,
|
|
1650
1662
|
className: r,
|
|
1651
1663
|
title: n,
|
|
1652
|
-
text:
|
|
1664
|
+
text: c,
|
|
1653
1665
|
position: i,
|
|
1654
1666
|
trigger: o,
|
|
1655
1667
|
targetRef: a,
|
|
1656
1668
|
children: l
|
|
1657
1669
|
});
|
|
1658
1670
|
return /* @__PURE__ */ U(re, { children: [
|
|
1659
|
-
|
|
1660
|
-
/* @__PURE__ */ u(z, { children: L && /* @__PURE__ */ u(Je, { targetRef:
|
|
1671
|
+
$,
|
|
1672
|
+
/* @__PURE__ */ u(z, { children: L && /* @__PURE__ */ u(Je, { targetRef: s, children: /* @__PURE__ */ u(
|
|
1661
1673
|
j.div,
|
|
1662
1674
|
{
|
|
1663
1675
|
initial: { opacity: y ? 1 : 0 },
|
|
@@ -1665,7 +1677,7 @@ const ye = ({
|
|
|
1665
1677
|
transition: { duration: y ? 0 : 0.3 },
|
|
1666
1678
|
exit: { opacity: y ? 1 : 0 },
|
|
1667
1679
|
className: k.toolTip,
|
|
1668
|
-
...
|
|
1680
|
+
...h,
|
|
1669
1681
|
onMouseEnter: B,
|
|
1670
1682
|
onMouseLeave: b,
|
|
1671
1683
|
children: /* @__PURE__ */ U(
|
|
@@ -1680,7 +1692,7 @@ const ye = ({
|
|
|
1680
1692
|
},
|
|
1681
1693
|
children: [
|
|
1682
1694
|
n && /* @__PURE__ */ u("div", { className: k.subHead, children: n }),
|
|
1683
|
-
/* @__PURE__ */ u("div", { className: k.supportingText, children:
|
|
1695
|
+
/* @__PURE__ */ u("div", { className: k.supportingText, children: c }),
|
|
1684
1696
|
t && /* @__PURE__ */ u("div", { className: k.actions, children: Array.isArray(t) && t.map((m, S) => /* @__PURE__ */ u(
|
|
1685
1697
|
Ae,
|
|
1686
1698
|
{
|
|
@@ -1702,19 +1714,19 @@ const ye = ({
|
|
|
1702
1714
|
variant: r = "primary",
|
|
1703
1715
|
size: l = "medium",
|
|
1704
1716
|
href: n,
|
|
1705
|
-
type:
|
|
1717
|
+
type: c,
|
|
1706
1718
|
icon: i,
|
|
1707
1719
|
isExtended: a = !1,
|
|
1708
|
-
ref:
|
|
1720
|
+
ref: d,
|
|
1709
1721
|
transition: o,
|
|
1710
|
-
children:
|
|
1711
|
-
...
|
|
1722
|
+
children: h,
|
|
1723
|
+
...p
|
|
1712
1724
|
}) => {
|
|
1713
|
-
if (
|
|
1725
|
+
if (h && (t = h), !t)
|
|
1714
1726
|
throw new Error(
|
|
1715
1727
|
"FAB component requires either a label prop or children content"
|
|
1716
1728
|
);
|
|
1717
|
-
const
|
|
1729
|
+
const s = n ? "a" : "button", y = Ue({
|
|
1718
1730
|
href: n,
|
|
1719
1731
|
icon: i,
|
|
1720
1732
|
isExtended: a,
|
|
@@ -1726,7 +1738,7 @@ const ye = ({
|
|
|
1726
1738
|
children: t
|
|
1727
1739
|
});
|
|
1728
1740
|
o = { duration: 0.3, ...o };
|
|
1729
|
-
const v = V(null), N =
|
|
1741
|
+
const v = V(null), N = d || v, L = {
|
|
1730
1742
|
visible: {
|
|
1731
1743
|
width: "auto",
|
|
1732
1744
|
marginLeft: 12,
|
|
@@ -1753,9 +1765,9 @@ const ye = ({
|
|
|
1753
1765
|
}
|
|
1754
1766
|
};
|
|
1755
1767
|
return /* @__PURE__ */ U(
|
|
1756
|
-
|
|
1768
|
+
s,
|
|
1757
1769
|
{
|
|
1758
|
-
...
|
|
1770
|
+
...p,
|
|
1759
1771
|
ref: N,
|
|
1760
1772
|
href: n,
|
|
1761
1773
|
"aria-label": a ? void 0 : t,
|
|
@@ -1772,7 +1784,7 @@ const ye = ({
|
|
|
1772
1784
|
/* @__PURE__ */ u("span", { className: y.stateLayer, children: /* @__PURE__ */ u(
|
|
1773
1785
|
ne,
|
|
1774
1786
|
{
|
|
1775
|
-
colorName:
|
|
1787
|
+
colorName: f({
|
|
1776
1788
|
primary: r == "surface",
|
|
1777
1789
|
"on-primary-container": r == "primary",
|
|
1778
1790
|
"on-secondary-container": r == "secondary",
|
|
@@ -1802,14 +1814,14 @@ const ye = ({
|
|
|
1802
1814
|
disabled: r = !1,
|
|
1803
1815
|
type: l = "button",
|
|
1804
1816
|
title: n,
|
|
1805
|
-
label:
|
|
1817
|
+
label: c,
|
|
1806
1818
|
onToggle: i,
|
|
1807
1819
|
activated: a = !1,
|
|
1808
|
-
onClick:
|
|
1820
|
+
onClick: d,
|
|
1809
1821
|
icon: o,
|
|
1810
|
-
size:
|
|
1811
|
-
iconSelected:
|
|
1812
|
-
className:
|
|
1822
|
+
size: h = "medium",
|
|
1823
|
+
iconSelected: p,
|
|
1824
|
+
className: s,
|
|
1813
1825
|
ref: y,
|
|
1814
1826
|
width: v = "default",
|
|
1815
1827
|
shape: N = "rounded",
|
|
@@ -1818,37 +1830,37 @@ const ye = ({
|
|
|
1818
1830
|
children: w,
|
|
1819
1831
|
...B
|
|
1820
1832
|
}) => {
|
|
1821
|
-
if (w && (
|
|
1833
|
+
if (w && (c = w), !c)
|
|
1822
1834
|
throw new Error(
|
|
1823
1835
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
1824
1836
|
);
|
|
1825
|
-
n || (n =
|
|
1837
|
+
n || (n = c);
|
|
1826
1838
|
const [b, E] = Y.useState(a);
|
|
1827
|
-
let
|
|
1828
|
-
i ? i && (
|
|
1839
|
+
let M;
|
|
1840
|
+
i ? i && (M = (S) => {
|
|
1829
1841
|
r && S.preventDefault(), E(!b), i(!!b);
|
|
1830
|
-
}, o = b &&
|
|
1831
|
-
r && S.preventDefault(),
|
|
1832
|
-
},
|
|
1842
|
+
}, o = b && p || o) : M = (S) => {
|
|
1843
|
+
r && S.preventDefault(), d && d(S);
|
|
1844
|
+
}, P(() => {
|
|
1833
1845
|
E(a);
|
|
1834
1846
|
}, [a]);
|
|
1835
|
-
const D = t ? "a" : "button",
|
|
1847
|
+
const D = t ? "a" : "button", $ = je({
|
|
1836
1848
|
transition: I,
|
|
1837
1849
|
shape: N,
|
|
1838
1850
|
allowShapeTransformation: L,
|
|
1839
1851
|
width: v,
|
|
1840
1852
|
href: t,
|
|
1841
1853
|
activated: b,
|
|
1842
|
-
label:
|
|
1843
|
-
iconSelected:
|
|
1854
|
+
label: c,
|
|
1855
|
+
iconSelected: p,
|
|
1844
1856
|
isActive: b,
|
|
1845
1857
|
onToggle: i,
|
|
1846
1858
|
disabled: r,
|
|
1847
1859
|
icon: o,
|
|
1848
1860
|
variant: e,
|
|
1849
|
-
className:
|
|
1850
|
-
size:
|
|
1851
|
-
children:
|
|
1861
|
+
className: s,
|
|
1862
|
+
size: h,
|
|
1863
|
+
children: c,
|
|
1852
1864
|
...B
|
|
1853
1865
|
}), k = V(null), m = y || k;
|
|
1854
1866
|
return I = { duration: 0.3, ...I }, /* @__PURE__ */ U(
|
|
@@ -1857,11 +1869,11 @@ const ye = ({
|
|
|
1857
1869
|
disabled: r,
|
|
1858
1870
|
href: t,
|
|
1859
1871
|
style: { transition: I.duration + "s" },
|
|
1860
|
-
className:
|
|
1861
|
-
"aria-label":
|
|
1872
|
+
className: $.iconButton,
|
|
1873
|
+
"aria-label": c,
|
|
1862
1874
|
...B,
|
|
1863
1875
|
title: void 0,
|
|
1864
|
-
onClick:
|
|
1876
|
+
onClick: M,
|
|
1865
1877
|
ref: m,
|
|
1866
1878
|
children: [
|
|
1867
1879
|
/* @__PURE__ */ u(
|
|
@@ -1872,16 +1884,16 @@ const ye = ({
|
|
|
1872
1884
|
text: n
|
|
1873
1885
|
}
|
|
1874
1886
|
),
|
|
1875
|
-
/* @__PURE__ */ u("div", { className:
|
|
1887
|
+
/* @__PURE__ */ u("div", { className: $.touchTarget }),
|
|
1876
1888
|
/* @__PURE__ */ u(
|
|
1877
1889
|
"div",
|
|
1878
1890
|
{
|
|
1879
|
-
className:
|
|
1891
|
+
className: $.stateLayer,
|
|
1880
1892
|
style: { transition: I.duration + "s" },
|
|
1881
1893
|
children: !r && /* @__PURE__ */ u(
|
|
1882
1894
|
ne,
|
|
1883
1895
|
{
|
|
1884
|
-
colorName:
|
|
1896
|
+
colorName: f(
|
|
1885
1897
|
e === "standard" && {
|
|
1886
1898
|
"on-surface-variant": !b,
|
|
1887
1899
|
primary: b
|
|
@@ -1904,7 +1916,7 @@ const ye = ({
|
|
|
1904
1916
|
)
|
|
1905
1917
|
}
|
|
1906
1918
|
),
|
|
1907
|
-
o && /* @__PURE__ */ u(Q, { icon: o, className:
|
|
1919
|
+
o && /* @__PURE__ */ u(Q, { icon: o, className: $.icon })
|
|
1908
1920
|
]
|
|
1909
1921
|
}
|
|
1910
1922
|
);
|
|
@@ -1914,7 +1926,7 @@ const ye = ({
|
|
|
1914
1926
|
step: r = 10,
|
|
1915
1927
|
name: l,
|
|
1916
1928
|
value: n = 0,
|
|
1917
|
-
min:
|
|
1929
|
+
min: c = 0,
|
|
1918
1930
|
max: i = 100,
|
|
1919
1931
|
marks: a = [
|
|
1920
1932
|
{
|
|
@@ -1926,22 +1938,22 @@ const ye = ({
|
|
|
1926
1938
|
label: "100"
|
|
1927
1939
|
}
|
|
1928
1940
|
],
|
|
1929
|
-
ref:
|
|
1941
|
+
ref: d,
|
|
1930
1942
|
onChange: o,
|
|
1931
|
-
...
|
|
1943
|
+
...h
|
|
1932
1944
|
}) => {
|
|
1933
|
-
const
|
|
1934
|
-
const x = y(),
|
|
1935
|
-
return g === 1 / 0 ? 100 : g === -1 / 0 ? 0 : (g - x) / (
|
|
1936
|
-
},
|
|
1945
|
+
const p = (g) => {
|
|
1946
|
+
const x = y(), W = s();
|
|
1947
|
+
return g === 1 / 0 ? 100 : g === -1 / 0 ? 0 : (g - x) / (W - x) * 100;
|
|
1948
|
+
}, s = (g = !1) => g ? i : i == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : i, y = (g = !1) => g ? c : c == -1 / 0 ? a[0].value : c, v = (g) => {
|
|
1937
1949
|
const x = y(!1);
|
|
1938
|
-
return (
|
|
1939
|
-
}, [N, L] =
|
|
1940
|
-
|
|
1950
|
+
return (s(!1) - x) * g / 100 + x;
|
|
1951
|
+
}, [N, L] = R(!1), I = V(null), w = d || I, [B, b] = R(n), [E, M] = R(p(n)), [D, $] = R(!1), k = (g) => {
|
|
1952
|
+
$(!0), L(!0), O(g);
|
|
1941
1953
|
}, m = () => {
|
|
1942
|
-
|
|
1954
|
+
$(!1), L(!1);
|
|
1943
1955
|
};
|
|
1944
|
-
|
|
1956
|
+
P(() => (D ? (window.addEventListener("mouseup", m), window.addEventListener("mousemove", O), window.addEventListener("touchend", m), window.addEventListener("touchmove", O)) : (window.removeEventListener("mouseup", m), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", m), window.removeEventListener("touchmove", O)), () => {
|
|
1945
1957
|
window.removeEventListener("mouseup", m), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", m), window.removeEventListener("touchmove", O);
|
|
1946
1958
|
}), [D]);
|
|
1947
1959
|
const S = He({
|
|
@@ -1949,7 +1961,7 @@ const ye = ({
|
|
|
1949
1961
|
isChanging: N,
|
|
1950
1962
|
marks: a,
|
|
1951
1963
|
max: i,
|
|
1952
|
-
min:
|
|
1964
|
+
min: c,
|
|
1953
1965
|
name: l,
|
|
1954
1966
|
step: r,
|
|
1955
1967
|
value: B,
|
|
@@ -1958,8 +1970,8 @@ const ye = ({
|
|
|
1958
1970
|
}), O = (g) => {
|
|
1959
1971
|
const x = w == null ? void 0 : w.current;
|
|
1960
1972
|
if (x) {
|
|
1961
|
-
const
|
|
1962
|
-
_({ pourcent:
|
|
1973
|
+
const W = x.getBoundingClientRect().left, C = ((g.type === "touchmove" || g.type === "touchstart" ? g.touches[0].clientX : g.clientX) - W) / x.offsetWidth * 100;
|
|
1974
|
+
_({ pourcent: C });
|
|
1963
1975
|
}
|
|
1964
1976
|
}, _ = ({
|
|
1965
1977
|
pourcent: g,
|
|
@@ -1967,32 +1979,32 @@ const ye = ({
|
|
|
1967
1979
|
}) => {
|
|
1968
1980
|
if (g) {
|
|
1969
1981
|
if (g >= 100) {
|
|
1970
|
-
b(
|
|
1982
|
+
b(s(!0)), M(100);
|
|
1971
1983
|
return;
|
|
1972
1984
|
}
|
|
1973
1985
|
if (g <= 0) {
|
|
1974
|
-
b(y(!0)),
|
|
1986
|
+
b(y(!0)), M(0);
|
|
1975
1987
|
return;
|
|
1976
1988
|
}
|
|
1977
|
-
x = v(g), x == y() && (x = y(!0)), x ==
|
|
1989
|
+
x = v(g), x == y() && (x = y(!0)), x == s() && (x = s(!0));
|
|
1978
1990
|
} else if (x != null) {
|
|
1979
|
-
if (x >=
|
|
1980
|
-
b(
|
|
1991
|
+
if (x >= s()) {
|
|
1992
|
+
b(s(!0)), M(100);
|
|
1981
1993
|
return;
|
|
1982
1994
|
}
|
|
1983
1995
|
if (x <= y()) {
|
|
1984
|
-
b(y(!0)),
|
|
1996
|
+
b(y(!0)), M(0);
|
|
1985
1997
|
return;
|
|
1986
1998
|
}
|
|
1987
|
-
g =
|
|
1999
|
+
g = p(x);
|
|
1988
2000
|
} else
|
|
1989
2001
|
return;
|
|
1990
|
-
r != null ? x = Math.round((x - y()) / r) * r + y() : a && (x = a.reduce((
|
|
1991
|
-
let H = F.value === 1 / 0 ?
|
|
1992
|
-
return H = Math.abs(H - x), X = Math.abs(X - x), H < X ? F :
|
|
1993
|
-
}).value), x >=
|
|
1994
|
-
}, [Z, q] =
|
|
1995
|
-
return
|
|
2002
|
+
r != null ? x = Math.round((x - y()) / r) * r + y() : a && (x = a.reduce((W, F, C) => {
|
|
2003
|
+
let H = F.value === 1 / 0 ? s() : F.value === -1 / 0 ? y() : F.value, X = W.value === 1 / 0 ? s() : W.value === -1 / 0 ? y() : W.value;
|
|
2004
|
+
return H = Math.abs(H - x), X = Math.abs(X - x), H < X ? F : W;
|
|
2005
|
+
}).value), x >= s() && (x = s(!0)), x <= y() && (x = y(!0)), g = p(x), b(x), M(g), o && o(x);
|
|
2006
|
+
}, [Z, q] = R(0);
|
|
2007
|
+
return P(() => {
|
|
1996
2008
|
const g = () => {
|
|
1997
2009
|
w.current && q(w.current.offsetWidth);
|
|
1998
2010
|
};
|
|
@@ -2009,7 +2021,7 @@ const ye = ({
|
|
|
2009
2021
|
if (r)
|
|
2010
2022
|
_({ value: B + r });
|
|
2011
2023
|
else if (a) {
|
|
2012
|
-
const x = a.find((
|
|
2024
|
+
const x = a.find((W) => W.value > B);
|
|
2013
2025
|
x && _({ value: x.value });
|
|
2014
2026
|
}
|
|
2015
2027
|
break;
|
|
@@ -2017,7 +2029,7 @@ const ye = ({
|
|
|
2017
2029
|
if (r)
|
|
2018
2030
|
_({ value: B - r });
|
|
2019
2031
|
else if (a) {
|
|
2020
|
-
const x = a.slice(0).reverse().find((
|
|
2032
|
+
const x = a.slice(0).reverse().find((W, F, C) => B === 1 / 0 ? F === 1 : W.value < B);
|
|
2021
2033
|
x && _({ value: x.value });
|
|
2022
2034
|
}
|
|
2023
2035
|
break;
|
|
@@ -2027,7 +2039,7 @@ const ye = ({
|
|
|
2027
2039
|
},
|
|
2028
2040
|
role: "slider",
|
|
2029
2041
|
"aria-valuemin": y(!0),
|
|
2030
|
-
"aria-valuemax":
|
|
2042
|
+
"aria-valuemax": s(!0),
|
|
2031
2043
|
"aria-valuenow": B,
|
|
2032
2044
|
"aria-valuetext": B.toString(),
|
|
2033
2045
|
className: S.slider,
|
|
@@ -2036,7 +2048,7 @@ const ye = ({
|
|
|
2036
2048
|
ref: w,
|
|
2037
2049
|
onTouchStart: k,
|
|
2038
2050
|
onDragStart: (g) => g.preventDefault(),
|
|
2039
|
-
...
|
|
2051
|
+
...h,
|
|
2040
2052
|
children: [
|
|
2041
2053
|
/* @__PURE__ */ u("input", { type: "hidden", name: l, value: B }),
|
|
2042
2054
|
/* @__PURE__ */ u(
|
|
@@ -2078,17 +2090,17 @@ const ye = ({
|
|
|
2078
2090
|
{
|
|
2079
2091
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2080
2092
|
children: a && a.map((g, x) => {
|
|
2081
|
-
let
|
|
2082
|
-
const F = (N ? 9 : 10) / Z * 100,
|
|
2083
|
-
return
|
|
2093
|
+
let W = null;
|
|
2094
|
+
const F = (N ? 9 : 10) / Z * 100, C = p(g.value);
|
|
2095
|
+
return C <= E - F ? W = !0 : C >= E + F && (W = !1), /* @__PURE__ */ u(
|
|
2084
2096
|
"div",
|
|
2085
2097
|
{
|
|
2086
|
-
className:
|
|
2087
|
-
"bg-primary-container":
|
|
2088
|
-
"bg-primary":
|
|
2098
|
+
className: f(S.dot, {
|
|
2099
|
+
"bg-primary-container": W != null && W,
|
|
2100
|
+
"bg-primary": W != null && !W
|
|
2089
2101
|
}),
|
|
2090
2102
|
style: {
|
|
2091
|
-
left: `${
|
|
2103
|
+
left: `${p(g.value)}%`
|
|
2092
2104
|
}
|
|
2093
2105
|
},
|
|
2094
2106
|
x
|
|
@@ -2118,15 +2130,15 @@ var lt = {
|
|
|
2118
2130
|
iconName: "bars",
|
|
2119
2131
|
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"]
|
|
2120
2132
|
};
|
|
2121
|
-
const
|
|
2133
|
+
const Ct = ({
|
|
2122
2134
|
message: e,
|
|
2123
2135
|
className: t,
|
|
2124
2136
|
duration: r,
|
|
2125
2137
|
closeIcon: l = ge,
|
|
2126
2138
|
onClose: n,
|
|
2127
|
-
...
|
|
2139
|
+
...c
|
|
2128
2140
|
}) => {
|
|
2129
|
-
const [i, a] =
|
|
2141
|
+
const [i, a] = R(!0), d = Xe({
|
|
2130
2142
|
className: t,
|
|
2131
2143
|
closeIcon: l,
|
|
2132
2144
|
duration: r,
|
|
@@ -2134,7 +2146,7 @@ const Mt = ({
|
|
|
2134
2146
|
onClose: n,
|
|
2135
2147
|
message: e
|
|
2136
2148
|
});
|
|
2137
|
-
|
|
2149
|
+
P(() => {
|
|
2138
2150
|
r && setTimeout(() => {
|
|
2139
2151
|
o();
|
|
2140
2152
|
}, r);
|
|
@@ -2149,15 +2161,15 @@ const Mt = ({
|
|
|
2149
2161
|
animate: { height: "auto" },
|
|
2150
2162
|
exit: { height: 0 },
|
|
2151
2163
|
transition: { duration: 0.1 },
|
|
2152
|
-
className:
|
|
2153
|
-
...
|
|
2154
|
-
children: /* @__PURE__ */ U("div", { className:
|
|
2155
|
-
/* @__PURE__ */ u("p", { className:
|
|
2164
|
+
className: d.snackbar,
|
|
2165
|
+
...c,
|
|
2166
|
+
children: /* @__PURE__ */ U("div", { className: d.container, children: [
|
|
2167
|
+
/* @__PURE__ */ u("p", { className: d.supportingText, children: e }),
|
|
2156
2168
|
/* @__PURE__ */ u(
|
|
2157
2169
|
xe,
|
|
2158
2170
|
{
|
|
2159
2171
|
onClick: () => o(),
|
|
2160
|
-
className:
|
|
2172
|
+
className: d.icon,
|
|
2161
2173
|
icon: l,
|
|
2162
2174
|
label: "close the snackbar"
|
|
2163
2175
|
}
|
|
@@ -2165,51 +2177,51 @@ const Mt = ({
|
|
|
2165
2177
|
] })
|
|
2166
2178
|
}
|
|
2167
2179
|
) });
|
|
2168
|
-
},
|
|
2180
|
+
}, Rt = ({
|
|
2169
2181
|
selected: e = !1,
|
|
2170
2182
|
className: t,
|
|
2171
2183
|
activeIcon: r,
|
|
2172
2184
|
disabled: l = !1,
|
|
2173
2185
|
inactiveIcon: n,
|
|
2174
|
-
onChange:
|
|
2186
|
+
onChange: c,
|
|
2175
2187
|
onClick: i,
|
|
2176
2188
|
onKeyDown: a,
|
|
2177
|
-
ref:
|
|
2189
|
+
ref: d,
|
|
2178
2190
|
...o
|
|
2179
2191
|
}) => {
|
|
2180
|
-
const [
|
|
2192
|
+
const [h, p] = R(e), s = (w) => {
|
|
2181
2193
|
l || (v(), i && i(w));
|
|
2182
2194
|
}, y = (w) => {
|
|
2183
2195
|
l || ((w.key === " " || w.key === "Enter") && (w.preventDefault(), v()), a && a(w));
|
|
2184
2196
|
}, v = () => {
|
|
2185
|
-
|
|
2197
|
+
p(!h), c == null || c(!h);
|
|
2186
2198
|
}, N = Oe({
|
|
2187
2199
|
className: t,
|
|
2188
|
-
isSelected:
|
|
2200
|
+
isSelected: h,
|
|
2189
2201
|
activeIcon: r,
|
|
2190
2202
|
inactiveIcon: n,
|
|
2191
2203
|
disabled: l,
|
|
2192
|
-
selected:
|
|
2193
|
-
onChange:
|
|
2194
|
-
}), L = V(null), I =
|
|
2204
|
+
selected: h,
|
|
2205
|
+
onChange: c
|
|
2206
|
+
}), L = V(null), I = d || L;
|
|
2195
2207
|
return /* @__PURE__ */ U(
|
|
2196
2208
|
j.div,
|
|
2197
2209
|
{
|
|
2198
2210
|
role: "switch",
|
|
2199
|
-
"aria-checked":
|
|
2211
|
+
"aria-checked": h,
|
|
2200
2212
|
tabIndex: l ? -1 : 0,
|
|
2201
2213
|
onKeyDown: y,
|
|
2202
|
-
onClick:
|
|
2214
|
+
onClick: s,
|
|
2203
2215
|
ref: I,
|
|
2204
2216
|
className: N.switch,
|
|
2205
2217
|
...o,
|
|
2206
2218
|
children: [
|
|
2207
|
-
/* @__PURE__ */ u("input", { type: "hidden", value:
|
|
2219
|
+
/* @__PURE__ */ u("input", { type: "hidden", value: h ? "1" : "0" }),
|
|
2208
2220
|
/* @__PURE__ */ U(
|
|
2209
2221
|
j.div,
|
|
2210
2222
|
{
|
|
2211
2223
|
layout: !0,
|
|
2212
|
-
style: { translate:
|
|
2224
|
+
style: { translate: h ? "50%" : "-50%" },
|
|
2213
2225
|
transition: {
|
|
2214
2226
|
type: "spring",
|
|
2215
2227
|
stiffness: 700,
|
|
@@ -2217,11 +2229,11 @@ const Mt = ({
|
|
|
2217
2229
|
},
|
|
2218
2230
|
className: N.handleContainer,
|
|
2219
2231
|
children: [
|
|
2220
|
-
/* @__PURE__ */ u("div", { className: N.handle, children: (
|
|
2232
|
+
/* @__PURE__ */ u("div", { className: N.handle, children: (h ? r : n) && /* @__PURE__ */ u(
|
|
2221
2233
|
Q,
|
|
2222
2234
|
{
|
|
2223
2235
|
className: N.icon,
|
|
2224
|
-
icon:
|
|
2236
|
+
icon: h ? r : n
|
|
2225
2237
|
}
|
|
2226
2238
|
) }),
|
|
2227
2239
|
/* @__PURE__ */ u("div", { className: N.handleStateLayer })
|
|
@@ -2237,40 +2249,40 @@ const Mt = ({
|
|
|
2237
2249
|
label: r,
|
|
2238
2250
|
variant: l = "primary",
|
|
2239
2251
|
href: n,
|
|
2240
|
-
icon:
|
|
2252
|
+
icon: c,
|
|
2241
2253
|
selectedTab: i,
|
|
2242
2254
|
setSelectedTab: a,
|
|
2243
|
-
tabsId:
|
|
2255
|
+
tabsId: d,
|
|
2244
2256
|
index: o,
|
|
2245
|
-
onTabSelected:
|
|
2246
|
-
scrollable:
|
|
2247
|
-
selected:
|
|
2257
|
+
onTabSelected: h,
|
|
2258
|
+
scrollable: p = !1,
|
|
2259
|
+
selected: s = !1,
|
|
2248
2260
|
ref: y,
|
|
2249
2261
|
...v
|
|
2250
2262
|
}) => {
|
|
2251
|
-
const N = V(null), L = y || N, [I, w] =
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
}, [i]),
|
|
2255
|
-
i == o &&
|
|
2263
|
+
const N = V(null), L = y || N, [I, w] = R(s);
|
|
2264
|
+
P(() => {
|
|
2265
|
+
s && i == null ? w(!0) : w(i == o && o != null);
|
|
2266
|
+
}, [i]), P(() => {
|
|
2267
|
+
i == o && h && h({
|
|
2256
2268
|
ref: L,
|
|
2257
2269
|
index: o || 0,
|
|
2258
2270
|
label: r,
|
|
2259
|
-
icon:
|
|
2271
|
+
icon: c
|
|
2260
2272
|
});
|
|
2261
2273
|
}, [i]);
|
|
2262
|
-
const B = n ? "a" : "button", b = (
|
|
2263
|
-
a && a(o ?? null), t && t(
|
|
2274
|
+
const B = n ? "a" : "button", b = (M) => {
|
|
2275
|
+
a && a(o ?? null), t && t(M);
|
|
2264
2276
|
}, E = qe({
|
|
2265
2277
|
className: e,
|
|
2266
|
-
onTabSelected:
|
|
2267
|
-
scrollable:
|
|
2278
|
+
onTabSelected: h,
|
|
2279
|
+
scrollable: p,
|
|
2268
2280
|
selectedTab: i,
|
|
2269
2281
|
index: o,
|
|
2270
|
-
tabsId:
|
|
2282
|
+
tabsId: d,
|
|
2271
2283
|
selected: I,
|
|
2272
2284
|
variant: l,
|
|
2273
|
-
icon:
|
|
2285
|
+
icon: c,
|
|
2274
2286
|
label: r,
|
|
2275
2287
|
isSelected: I,
|
|
2276
2288
|
setSelectedTab: a,
|
|
@@ -2296,12 +2308,12 @@ const Mt = ({
|
|
|
2296
2308
|
}
|
|
2297
2309
|
) }),
|
|
2298
2310
|
/* @__PURE__ */ U("span", { className: E.content, children: [
|
|
2299
|
-
|
|
2311
|
+
c && /* @__PURE__ */ u(Q, { icon: c, className: E.icon }),
|
|
2300
2312
|
/* @__PURE__ */ u("span", { className: E.label, children: r }),
|
|
2301
2313
|
I && /* @__PURE__ */ u(
|
|
2302
2314
|
j.span,
|
|
2303
2315
|
{
|
|
2304
|
-
layoutId: `underline-${
|
|
2316
|
+
layoutId: `underline-${d}`,
|
|
2305
2317
|
className: E.underline,
|
|
2306
2318
|
transition: { duration: 0.3 }
|
|
2307
2319
|
}
|
|
@@ -2310,25 +2322,25 @@ const Mt = ({
|
|
|
2310
2322
|
]
|
|
2311
2323
|
}
|
|
2312
2324
|
);
|
|
2313
|
-
},
|
|
2325
|
+
}, Mt = ({
|
|
2314
2326
|
variant: e = "primary",
|
|
2315
2327
|
onTabSelected: t,
|
|
2316
2328
|
children: r,
|
|
2317
2329
|
className: l,
|
|
2318
2330
|
selectedTab: n,
|
|
2319
|
-
setSelectedTab:
|
|
2331
|
+
setSelectedTab: c,
|
|
2320
2332
|
scrollable: i = !1
|
|
2321
2333
|
}) => {
|
|
2322
|
-
const [a,
|
|
2334
|
+
const [a, d] = R(
|
|
2323
2335
|
null
|
|
2324
2336
|
);
|
|
2325
2337
|
let o;
|
|
2326
2338
|
n == 0 || n != null ? o = n : o = a;
|
|
2327
|
-
const
|
|
2339
|
+
const h = c || d, p = Y.Children.toArray(r).filter(
|
|
2328
2340
|
(L) => Y.isValidElement(L) && L.type === at
|
|
2329
|
-
),
|
|
2341
|
+
), s = Y.useRef(null), y = (L) => {
|
|
2330
2342
|
if (t == null || t(L), i) {
|
|
2331
|
-
const I =
|
|
2343
|
+
const I = s.current, w = L.ref.current;
|
|
2332
2344
|
if (I && w) {
|
|
2333
2345
|
const B = w.offsetLeft + w.offsetWidth / 2 - I.offsetWidth / 2;
|
|
2334
2346
|
I.scrollTo({ left: B, behavior: "smooth" });
|
|
@@ -2339,16 +2351,16 @@ const Mt = ({
|
|
|
2339
2351
|
onTabSelected: t,
|
|
2340
2352
|
scrollable: i,
|
|
2341
2353
|
selectedTab: o,
|
|
2342
|
-
setSelectedTab:
|
|
2354
|
+
setSelectedTab: h,
|
|
2343
2355
|
className: l,
|
|
2344
2356
|
variant: e
|
|
2345
2357
|
});
|
|
2346
|
-
return /* @__PURE__ */ u("div", { ref:
|
|
2358
|
+
return /* @__PURE__ */ u("div", { ref: s, role: "tablist", className: N.tabs, children: p.map((L, I) => Y.cloneElement(L, {
|
|
2347
2359
|
key: I,
|
|
2348
2360
|
index: I,
|
|
2349
2361
|
variant: e,
|
|
2350
2362
|
selectedTab: o,
|
|
2351
|
-
setSelectedTab:
|
|
2363
|
+
setSelectedTab: h,
|
|
2352
2364
|
tabsId: v,
|
|
2353
2365
|
onTabSelected: y,
|
|
2354
2366
|
scrollable: i
|
|
@@ -2359,79 +2371,79 @@ const Mt = ({
|
|
|
2359
2371
|
errorText: r,
|
|
2360
2372
|
placeholder: l,
|
|
2361
2373
|
suffix: n,
|
|
2362
|
-
name:
|
|
2374
|
+
name: c,
|
|
2363
2375
|
label: i,
|
|
2364
2376
|
className: a,
|
|
2365
|
-
supportingText:
|
|
2377
|
+
supportingText: d,
|
|
2366
2378
|
trailingIcon: o,
|
|
2367
|
-
leadingIcon:
|
|
2368
|
-
type:
|
|
2369
|
-
textLine:
|
|
2379
|
+
leadingIcon: h,
|
|
2380
|
+
type: p = "text",
|
|
2381
|
+
textLine: s = "singleLine",
|
|
2370
2382
|
autoComplete: y = "on",
|
|
2371
2383
|
onChange: v,
|
|
2372
2384
|
value: N,
|
|
2373
2385
|
showSupportingText: L = !1,
|
|
2374
2386
|
...I
|
|
2375
2387
|
}) => {
|
|
2376
|
-
const [w, B] =
|
|
2388
|
+
const [w, B] = R(N ?? ""), [b, E] = R(!1), [M, D] = R(!1), [$, k] = R(
|
|
2377
2389
|
L
|
|
2378
2390
|
);
|
|
2379
|
-
|
|
2391
|
+
P(() => {
|
|
2380
2392
|
B(N ?? "");
|
|
2381
|
-
}, [N]),
|
|
2393
|
+
}, [N]), P(() => {
|
|
2382
2394
|
r != null && r.length ? D(!0) : D(!1);
|
|
2383
|
-
}, [r]),
|
|
2384
|
-
L ? k(L) :
|
|
2385
|
-
}, [
|
|
2395
|
+
}, [r]), P(() => {
|
|
2396
|
+
L ? k(L) : d != null && d.length ? k(!0) : k(!1);
|
|
2397
|
+
}, [$, d]), P(() => {
|
|
2386
2398
|
b && D(!1);
|
|
2387
2399
|
}, [b]);
|
|
2388
2400
|
const m = Y.useRef(null), S = () => {
|
|
2389
2401
|
m.current && !b && m.current.focus();
|
|
2390
2402
|
}, O = () => {
|
|
2391
2403
|
E(!0);
|
|
2392
|
-
}, _ = (
|
|
2393
|
-
const F =
|
|
2404
|
+
}, _ = (W) => {
|
|
2405
|
+
const F = W.target.value;
|
|
2394
2406
|
B(F), D(!1), typeof v == "function" && v(F);
|
|
2395
2407
|
}, Z = () => {
|
|
2396
2408
|
E(!1);
|
|
2397
2409
|
}, q = Ke({
|
|
2398
|
-
showSupportingText:
|
|
2410
|
+
showSupportingText: $,
|
|
2399
2411
|
isFocused: b,
|
|
2400
|
-
showErrorIcon:
|
|
2412
|
+
showErrorIcon: M,
|
|
2401
2413
|
disabled: t,
|
|
2402
|
-
name:
|
|
2414
|
+
name: c,
|
|
2403
2415
|
label: i,
|
|
2404
2416
|
autoComplete: y,
|
|
2405
2417
|
className: a,
|
|
2406
2418
|
onChange: v,
|
|
2407
2419
|
placeholder: l,
|
|
2408
|
-
supportingText:
|
|
2409
|
-
type:
|
|
2410
|
-
leadingIcon:
|
|
2420
|
+
supportingText: d,
|
|
2421
|
+
type: p,
|
|
2422
|
+
leadingIcon: h,
|
|
2411
2423
|
trailingIcon: o,
|
|
2412
2424
|
variant: e,
|
|
2413
2425
|
errorText: r,
|
|
2414
2426
|
value: w,
|
|
2415
2427
|
suffix: n,
|
|
2416
|
-
textLine:
|
|
2417
|
-
}), [A] =
|
|
2428
|
+
textLine: s
|
|
2429
|
+
}), [A] = R(ce());
|
|
2418
2430
|
let g, x;
|
|
2419
|
-
switch (
|
|
2431
|
+
switch (s) {
|
|
2420
2432
|
case "multiLine":
|
|
2421
|
-
x =
|
|
2433
|
+
x = Re, g = {};
|
|
2422
2434
|
break;
|
|
2423
2435
|
case "textAreas":
|
|
2424
2436
|
x = "textarea", g = {};
|
|
2425
2437
|
break;
|
|
2426
2438
|
case "singleLine":
|
|
2427
2439
|
default:
|
|
2428
|
-
x = "input", g = { type:
|
|
2440
|
+
x = "input", g = { type: p };
|
|
2429
2441
|
break;
|
|
2430
2442
|
}
|
|
2431
2443
|
return /* @__PURE__ */ U("div", { className: q.textField, ...I, children: [
|
|
2432
2444
|
/* @__PURE__ */ U("fieldset", { onClick: S, className: q.content, children: [
|
|
2433
2445
|
/* @__PURE__ */ u("div", { className: q.stateLayer }),
|
|
2434
|
-
|
|
2446
|
+
h && /* @__PURE__ */ u("div", { className: q.leadingIcon, children: Y.isValidElement(h) ? h : /* @__PURE__ */ u(Q, { className: "w-5 h-5", icon: h }) }),
|
|
2435
2447
|
!(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2436
2448
|
j.legend,
|
|
2437
2449
|
{
|
|
@@ -2458,8 +2470,8 @@ const Mt = ({
|
|
|
2458
2470
|
(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2459
2471
|
j.label,
|
|
2460
2472
|
{
|
|
2461
|
-
htmlFor:
|
|
2462
|
-
className:
|
|
2473
|
+
htmlFor: c,
|
|
2474
|
+
className: f(
|
|
2463
2475
|
"absolute left-4 transition-all duration-300",
|
|
2464
2476
|
{
|
|
2465
2477
|
"text-body-small top-2": e == "filled" && !(!b && !w.length),
|
|
@@ -2485,8 +2497,8 @@ const Mt = ({
|
|
|
2485
2497
|
value: w,
|
|
2486
2498
|
onChange: _,
|
|
2487
2499
|
className: q.input,
|
|
2488
|
-
id:
|
|
2489
|
-
name:
|
|
2500
|
+
id: c,
|
|
2501
|
+
name: c,
|
|
2490
2502
|
placeholder: b ? l ?? void 0 : "",
|
|
2491
2503
|
onFocus: O,
|
|
2492
2504
|
onBlur: Z,
|
|
@@ -2499,12 +2511,12 @@ const Mt = ({
|
|
|
2499
2511
|
)
|
|
2500
2512
|
] }),
|
|
2501
2513
|
/* @__PURE__ */ u("div", { className: q.activeIndicator }),
|
|
2502
|
-
!
|
|
2514
|
+
!M && /* @__PURE__ */ U(re, { children: [
|
|
2503
2515
|
o && /* @__PURE__ */ u(
|
|
2504
2516
|
"div",
|
|
2505
2517
|
{
|
|
2506
|
-
onClick: (
|
|
2507
|
-
|
|
2518
|
+
onClick: (W) => {
|
|
2519
|
+
W.stopPropagation();
|
|
2508
2520
|
},
|
|
2509
2521
|
className: q.trailingIcon,
|
|
2510
2522
|
children: Y.isValidElement(o) ? o : /* @__PURE__ */ u(Q, { className: "h-5", icon: o })
|
|
@@ -2512,10 +2524,10 @@ const Mt = ({
|
|
|
2512
2524
|
),
|
|
2513
2525
|
!o && n && /* @__PURE__ */ u("span", { className: q.suffix, children: n })
|
|
2514
2526
|
] }),
|
|
2515
|
-
|
|
2527
|
+
M && /* @__PURE__ */ u(
|
|
2516
2528
|
"div",
|
|
2517
2529
|
{
|
|
2518
|
-
className:
|
|
2530
|
+
className: f(q.trailingIcon, {
|
|
2519
2531
|
" absolute right-0": !o
|
|
2520
2532
|
}),
|
|
2521
2533
|
children: /* @__PURE__ */ u(
|
|
@@ -2528,12 +2540,12 @@ const Mt = ({
|
|
|
2528
2540
|
}
|
|
2529
2541
|
)
|
|
2530
2542
|
] }),
|
|
2531
|
-
|
|
2543
|
+
$ && /* @__PURE__ */ u("p", { className: q.supportingText, children: r != null && r.length ? r : d != null && d.length ? d : " " })
|
|
2532
2544
|
] });
|
|
2533
2545
|
}, st = K(
|
|
2534
2546
|
"navigationRailItem",
|
|
2535
2547
|
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
2536
|
-
navigationRailItem:
|
|
2548
|
+
navigationRailItem: f(
|
|
2537
2549
|
" group flex flex-col pt-1 pb-1.5 cursor-pointer",
|
|
2538
2550
|
{
|
|
2539
2551
|
"text-on-surface-variant": !e,
|
|
@@ -2542,7 +2554,7 @@ const Mt = ({
|
|
|
2542
2554
|
"gap-0 h-[66px]": l == "horizontal"
|
|
2543
2555
|
}
|
|
2544
2556
|
),
|
|
2545
|
-
container:
|
|
2557
|
+
container: f(
|
|
2546
2558
|
" w-fit flex justify-center relative rounded-full items-center mx-5",
|
|
2547
2559
|
{
|
|
2548
2560
|
"bg-secondary-container overflow-hidden": e,
|
|
@@ -2558,15 +2570,15 @@ const Mt = ({
|
|
|
2558
2570
|
}
|
|
2559
2571
|
]
|
|
2560
2572
|
),
|
|
2561
|
-
stateLayer:
|
|
2573
|
+
stateLayer: f(
|
|
2562
2574
|
" absolute w-full rounded-full h-full left-0 top-0 ",
|
|
2563
2575
|
{
|
|
2564
2576
|
"group-state-on-surface": !e,
|
|
2565
2577
|
"group-state-on-secondary-container": e
|
|
2566
2578
|
}
|
|
2567
2579
|
),
|
|
2568
|
-
icon:
|
|
2569
|
-
label:
|
|
2580
|
+
icon: f("size-6 flex"),
|
|
2581
|
+
label: f("w-fit mx-auto text-nowrap", {
|
|
2570
2582
|
"text-label-large ": l == "horizontal",
|
|
2571
2583
|
"text-label-medium": l == "vertical"
|
|
2572
2584
|
})
|
|
@@ -2577,14 +2589,14 @@ const Mt = ({
|
|
|
2577
2589
|
label: r,
|
|
2578
2590
|
variant: l = "vertical",
|
|
2579
2591
|
href: n,
|
|
2580
|
-
icon:
|
|
2592
|
+
icon: c,
|
|
2581
2593
|
selectedItem: i,
|
|
2582
2594
|
setSelectedItem: a,
|
|
2583
|
-
index:
|
|
2595
|
+
index: d,
|
|
2584
2596
|
onItemSelected: o,
|
|
2585
|
-
selected:
|
|
2586
|
-
ref:
|
|
2587
|
-
transition:
|
|
2597
|
+
selected: h = !1,
|
|
2598
|
+
ref: p,
|
|
2599
|
+
transition: s,
|
|
2588
2600
|
isExtended: y,
|
|
2589
2601
|
iconSelected: v,
|
|
2590
2602
|
style: N,
|
|
@@ -2593,30 +2605,30 @@ const Mt = ({
|
|
|
2593
2605
|
...w
|
|
2594
2606
|
}) => {
|
|
2595
2607
|
I && (r = I);
|
|
2596
|
-
const B = V(null), b =
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
}, [i]),
|
|
2600
|
-
i ==
|
|
2608
|
+
const B = V(null), b = p || B, [E, M] = R(h);
|
|
2609
|
+
P(() => {
|
|
2610
|
+
h && i == null ? M(!0) : M(i == d && d != null);
|
|
2611
|
+
}, [i]), P(() => {
|
|
2612
|
+
i == d && o && o({
|
|
2601
2613
|
ref: b,
|
|
2602
|
-
index:
|
|
2614
|
+
index: d || 0,
|
|
2603
2615
|
label: r,
|
|
2604
|
-
icon:
|
|
2616
|
+
icon: c
|
|
2605
2617
|
});
|
|
2606
2618
|
}, [i]);
|
|
2607
|
-
const D = n ? "a" : "button",
|
|
2608
|
-
a && a(
|
|
2619
|
+
const D = n ? "a" : "button", $ = (m) => {
|
|
2620
|
+
a && a(d ?? null), t && t(m);
|
|
2609
2621
|
}, k = st({
|
|
2610
2622
|
isExtended: y,
|
|
2611
2623
|
extendedOnly: L,
|
|
2612
2624
|
className: e,
|
|
2613
2625
|
onItemSelected: o,
|
|
2614
2626
|
selectedItem: i,
|
|
2615
|
-
index:
|
|
2616
|
-
transition:
|
|
2627
|
+
index: d,
|
|
2628
|
+
transition: s,
|
|
2617
2629
|
selected: E,
|
|
2618
2630
|
variant: l,
|
|
2619
|
-
icon:
|
|
2631
|
+
icon: c,
|
|
2620
2632
|
label: r,
|
|
2621
2633
|
isSelected: E,
|
|
2622
2634
|
setSelectedItem: a,
|
|
@@ -2624,7 +2636,7 @@ const Mt = ({
|
|
|
2624
2636
|
children: r,
|
|
2625
2637
|
iconSelected: v
|
|
2626
2638
|
});
|
|
2627
|
-
return
|
|
2639
|
+
return s = { duration: 0.3, ...s }, L && !y ? null : (
|
|
2628
2640
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2629
2641
|
// @ts-expect-error
|
|
2630
2642
|
/* @__PURE__ */ U(
|
|
@@ -2636,23 +2648,23 @@ const Mt = ({
|
|
|
2636
2648
|
ref: b,
|
|
2637
2649
|
href: n,
|
|
2638
2650
|
className: k.navigationRailItem,
|
|
2639
|
-
onClick:
|
|
2640
|
-
style: { transition:
|
|
2651
|
+
onClick: $,
|
|
2652
|
+
style: { transition: s.duration + "s", ...N },
|
|
2641
2653
|
children: [
|
|
2642
2654
|
/* @__PURE__ */ U(
|
|
2643
2655
|
j.div,
|
|
2644
2656
|
{
|
|
2645
2657
|
style: {
|
|
2646
|
-
transition: l == "horizontal" ?
|
|
2658
|
+
transition: l == "horizontal" ? s.duration + `s, gap ${s.duration / 2}s ${s.duration - s.duration / 2}s` : s.duration + `s, gap ${s.duration / 3}s ${s.duration - s.duration / 3}s`
|
|
2647
2659
|
},
|
|
2648
|
-
transition:
|
|
2660
|
+
transition: s,
|
|
2649
2661
|
className: k.container,
|
|
2650
2662
|
children: [
|
|
2651
2663
|
/* @__PURE__ */ u(j.div, { layout: !0, className: k.stateLayer }),
|
|
2652
|
-
|
|
2664
|
+
c && /* @__PURE__ */ u(
|
|
2653
2665
|
Q,
|
|
2654
2666
|
{
|
|
2655
|
-
icon: E ? v :
|
|
2667
|
+
icon: E ? v : c,
|
|
2656
2668
|
className: k.icon
|
|
2657
2669
|
}
|
|
2658
2670
|
),
|
|
@@ -2661,16 +2673,16 @@ const Mt = ({
|
|
|
2661
2673
|
width: 0,
|
|
2662
2674
|
opacity: 0,
|
|
2663
2675
|
transition: {
|
|
2664
|
-
...
|
|
2676
|
+
...s
|
|
2665
2677
|
}
|
|
2666
2678
|
}, S = {
|
|
2667
2679
|
width: "auto",
|
|
2668
2680
|
opacity: 1,
|
|
2669
2681
|
transition: {
|
|
2670
|
-
...
|
|
2682
|
+
...s,
|
|
2671
2683
|
opacity: {
|
|
2672
|
-
duration:
|
|
2673
|
-
delay:
|
|
2684
|
+
duration: s.duration / 2,
|
|
2685
|
+
delay: s.duration - s.duration / 2
|
|
2674
2686
|
}
|
|
2675
2687
|
}
|
|
2676
2688
|
};
|
|
@@ -2693,7 +2705,7 @@ const Mt = ({
|
|
|
2693
2705
|
height: 0,
|
|
2694
2706
|
opacity: 0,
|
|
2695
2707
|
transition: {
|
|
2696
|
-
...
|
|
2708
|
+
...s,
|
|
2697
2709
|
opacity: {
|
|
2698
2710
|
duration: 0
|
|
2699
2711
|
}
|
|
@@ -2702,10 +2714,10 @@ const Mt = ({
|
|
|
2702
2714
|
height: "auto",
|
|
2703
2715
|
opacity: 1,
|
|
2704
2716
|
transition: {
|
|
2705
|
-
...
|
|
2717
|
+
...s,
|
|
2706
2718
|
opacity: {
|
|
2707
|
-
duration:
|
|
2708
|
-
delay:
|
|
2719
|
+
duration: s.duration / 3,
|
|
2720
|
+
delay: s.duration - s.duration / 3
|
|
2709
2721
|
}
|
|
2710
2722
|
}
|
|
2711
2723
|
};
|
|
@@ -2716,7 +2728,7 @@ const Mt = ({
|
|
|
2716
2728
|
animate: S,
|
|
2717
2729
|
exit: m,
|
|
2718
2730
|
className: k.label,
|
|
2719
|
-
transition:
|
|
2731
|
+
transition: s,
|
|
2720
2732
|
children: r
|
|
2721
2733
|
}
|
|
2722
2734
|
);
|
|
@@ -2728,15 +2740,15 @@ const Mt = ({
|
|
|
2728
2740
|
}, ut = K(
|
|
2729
2741
|
"navigationRail",
|
|
2730
2742
|
({ isExtended: e, alignment: t }) => ({
|
|
2731
|
-
navigationRail:
|
|
2743
|
+
navigationRail: f("flex flex-col left-0 h-full top-0 pt-11", {
|
|
2732
2744
|
"w-fit max-w-24": !e,
|
|
2733
2745
|
"w-fit min-w-[220px] max-w-[360px]": e,
|
|
2734
2746
|
"justify-between": t == "middle",
|
|
2735
2747
|
"justify-start": t == "top"
|
|
2736
2748
|
}),
|
|
2737
|
-
header:
|
|
2749
|
+
header: f("flex flex-col gap-1 items-start"),
|
|
2738
2750
|
menuIcon: "mx-5",
|
|
2739
|
-
segments:
|
|
2751
|
+
segments: f(" flex flex-col overflow-auto min-w-full mt-10", {
|
|
2740
2752
|
"w-full": !e,
|
|
2741
2753
|
"w-fit items-start": e
|
|
2742
2754
|
})
|
|
@@ -2747,7 +2759,7 @@ const Mt = ({
|
|
|
2747
2759
|
children: r,
|
|
2748
2760
|
className: l,
|
|
2749
2761
|
selectedItem: n,
|
|
2750
|
-
extended:
|
|
2762
|
+
extended: c,
|
|
2751
2763
|
alignment: i = "top",
|
|
2752
2764
|
menu: a = {
|
|
2753
2765
|
closed: {
|
|
@@ -2759,15 +2771,15 @@ const Mt = ({
|
|
|
2759
2771
|
label: "Close menu"
|
|
2760
2772
|
}
|
|
2761
2773
|
},
|
|
2762
|
-
style:
|
|
2774
|
+
style: d,
|
|
2763
2775
|
onExtendedChange: o,
|
|
2764
|
-
transition:
|
|
2765
|
-
setSelectedItem:
|
|
2776
|
+
transition: h,
|
|
2777
|
+
setSelectedItem: p
|
|
2766
2778
|
}) => {
|
|
2767
|
-
const [
|
|
2779
|
+
const [s, y] = R(null), [v, N] = R(c);
|
|
2768
2780
|
let L;
|
|
2769
|
-
n == 0 || n != null ? L = n : L =
|
|
2770
|
-
const I =
|
|
2781
|
+
n == 0 || n != null ? L = n : L = s;
|
|
2782
|
+
const I = p || y, w = V(null), B = (k) => {
|
|
2771
2783
|
t == null || t(k);
|
|
2772
2784
|
};
|
|
2773
2785
|
function b(k) {
|
|
@@ -2776,7 +2788,7 @@ const Mt = ({
|
|
|
2776
2788
|
ee(S) && S.type === Le ? m.push(...b(S.props.children)) : m.push(S);
|
|
2777
2789
|
}), m;
|
|
2778
2790
|
}
|
|
2779
|
-
const E = b(r),
|
|
2791
|
+
const E = b(r), M = E.filter(
|
|
2780
2792
|
(k) => ee(k) && k.type === ue
|
|
2781
2793
|
), D = ut({
|
|
2782
2794
|
children: r,
|
|
@@ -2789,17 +2801,17 @@ const Mt = ({
|
|
|
2789
2801
|
isExtended: v,
|
|
2790
2802
|
alignment: i,
|
|
2791
2803
|
menu: a,
|
|
2792
|
-
transition:
|
|
2804
|
+
transition: h,
|
|
2793
2805
|
onExtendedChange: o
|
|
2794
2806
|
});
|
|
2795
|
-
|
|
2796
|
-
const
|
|
2797
|
-
return
|
|
2807
|
+
h = { duration: 0.3, ...h };
|
|
2808
|
+
const $ = V(!1);
|
|
2809
|
+
return $.current = !1, P(() => {
|
|
2798
2810
|
o == null || o(v ?? !1);
|
|
2799
2811
|
}, [v]), /* @__PURE__ */ U(
|
|
2800
2812
|
"div",
|
|
2801
2813
|
{
|
|
2802
|
-
style: { transition:
|
|
2814
|
+
style: { transition: h.duration + "s", ...d },
|
|
2803
2815
|
ref: w,
|
|
2804
2816
|
className: D.navigationRail,
|
|
2805
2817
|
children: [
|
|
@@ -2813,10 +2825,10 @@ const Mt = ({
|
|
|
2813
2825
|
icon: v ? a.opened.icon : a == null ? void 0 : a.closed.icon
|
|
2814
2826
|
}
|
|
2815
2827
|
),
|
|
2816
|
-
|
|
2817
|
-
transition:
|
|
2828
|
+
M.length > 0 && le(M[0], {
|
|
2829
|
+
transition: h,
|
|
2818
2830
|
isExtended: v,
|
|
2819
|
-
className: "!shadow-none mx-5 " +
|
|
2831
|
+
className: "!shadow-none mx-5 " + M[0].props.className
|
|
2820
2832
|
})
|
|
2821
2833
|
] }),
|
|
2822
2834
|
/* @__PURE__ */ u("div", { className: D.segments, children: (() => {
|
|
@@ -2831,11 +2843,11 @@ const Mt = ({
|
|
|
2831
2843
|
selectedItem: L,
|
|
2832
2844
|
setSelectedItem: I,
|
|
2833
2845
|
onItemSelected: B,
|
|
2834
|
-
transition:
|
|
2835
|
-
extendedOnly:
|
|
2846
|
+
transition: h,
|
|
2847
|
+
extendedOnly: $.current,
|
|
2836
2848
|
isExtended: v
|
|
2837
2849
|
}
|
|
2838
|
-
) : ee(m) && m.type === ue ? null : ee(m) && m.type === ct ? (
|
|
2850
|
+
) : ee(m) && m.type === ue ? null : ee(m) && m.type === ct ? ($.current = !0, v ? le(m, {}) : null) : m);
|
|
2839
2851
|
})() }),
|
|
2840
2852
|
/* @__PURE__ */ u("div", { className: "flex-1 max-h-[160px]" })
|
|
2841
2853
|
]
|
|
@@ -2859,11 +2871,11 @@ export {
|
|
|
2859
2871
|
ne as RippleEffect,
|
|
2860
2872
|
kt as Slider,
|
|
2861
2873
|
bt as SmoothScroll,
|
|
2862
|
-
|
|
2863
|
-
|
|
2874
|
+
Ct as Snackbar,
|
|
2875
|
+
Rt as Switch,
|
|
2864
2876
|
Je as SyncedFixedWrapper,
|
|
2865
2877
|
at as Tab,
|
|
2866
|
-
|
|
2878
|
+
Mt as Tabs,
|
|
2867
2879
|
St as TextField,
|
|
2868
2880
|
Lt as ThemeProvider,
|
|
2869
2881
|
ye as ToolTip,
|
|
@@ -2871,8 +2883,8 @@ export {
|
|
|
2871
2883
|
$e as cardStyle,
|
|
2872
2884
|
We as carouselItemStyle,
|
|
2873
2885
|
De as carouselStyle,
|
|
2874
|
-
|
|
2875
|
-
|
|
2886
|
+
f as classNames,
|
|
2887
|
+
Me as classnames,
|
|
2876
2888
|
Ze as customScrollStyle,
|
|
2877
2889
|
K as defaultClassNames,
|
|
2878
2890
|
Ve as dividerStyle,
|