@udixio/ui-react 1.4.0 → 1.6.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 +34 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1029 -892
- package/dist/lib/components/SlideSheet.d.ts +9 -0
- package/dist/lib/components/SlideSheet.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/effects/ThemeProvider.d.ts +4 -2
- package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
- package/dist/lib/interfaces/index.d.ts +1 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -1
- package/dist/lib/interfaces/navigation-rail.interface.d.ts +1 -1
- package/dist/lib/interfaces/navigation-rail.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/slide-sheet.interface.d.ts +29 -0
- package/dist/lib/interfaces/slide-sheet.interface.d.ts.map +1 -0
- package/dist/lib/styles/index.d.ts +1 -0
- package/dist/lib/styles/index.d.ts.map +1 -1
- package/dist/lib/styles/navigation-rail.style.d.ts +2 -2
- package/dist/lib/styles/slide-sheet.style.d.ts +25 -0
- package/dist/lib/styles/slide-sheet.style.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/lib/components/SlideSheet.tsx +122 -0
- package/src/lib/components/index.ts +1 -0
- package/src/lib/effects/ThemeProvider.tsx +78 -34
- package/src/lib/interfaces/index.ts +1 -0
- package/src/lib/interfaces/navigation-rail.interface.ts +1 -1
- package/src/lib/interfaces/slide-sheet.interface.tsx +27 -0
- package/src/lib/styles/index.ts +1 -0
- package/src/lib/styles/slide-sheet.style.ts +31 -0
- package/src/stories/containment/slide-sheet.stories.tsx +50 -0
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { extendTailwindMerge as
|
|
4
|
-
import Y, { useState as
|
|
5
|
-
import { motion as
|
|
6
|
-
import { throttle as
|
|
7
|
-
import { createPortal as
|
|
1
|
+
import { jsx as u, jsxs as D, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as me } from "clsx";
|
|
3
|
+
import { extendTailwindMerge as ve } from "tailwind-merge";
|
|
4
|
+
import Y, { useState as R, useEffect as $, useRef as j, useLayoutEffect as pe, isValidElement as ee, cloneElement as le, useMemo as be, Children as Ne, Fragment as Le } from "react";
|
|
5
|
+
import { motion as U, AnimatePresence as A, useScroll as Ie, useMotionValueEvent as se, motionValue as he, useTransform as oe } from "motion/react";
|
|
6
|
+
import { throttle as Ee } from "throttle-debounce";
|
|
7
|
+
import { createPortal as ye } from "react-dom";
|
|
8
8
|
import { loader as ke } from "@udixio/theme";
|
|
9
|
-
import { TailwindPlugin as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
9
|
+
import { TailwindPlugin as Se } from "@udixio/tailwind";
|
|
10
|
+
import Re from "react-textarea-autosize";
|
|
11
|
+
const xe = ve({
|
|
12
12
|
override: {
|
|
13
13
|
classGroups: {
|
|
14
14
|
"text-color": [
|
|
@@ -34,8 +34,8 @@ const pe = we({
|
|
|
34
34
|
font: ["font"]
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
38
|
-
function
|
|
37
|
+
}), f = (...e) => xe(me(e)), Ce = (...e) => xe(me(e));
|
|
38
|
+
function Me(e) {
|
|
39
39
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
40
40
|
}
|
|
41
41
|
const Be = (e) => {
|
|
@@ -46,23 +46,23 @@ 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 [
|
|
52
|
-
(t[
|
|
49
|
+
const a = l(e.states);
|
|
50
|
+
Object.entries(a).map((i) => {
|
|
51
|
+
const [c, d] = i;
|
|
52
|
+
(t[c] ?? (t[c] = [])).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, a] = l;
|
|
59
|
+
a = a.reverse(), n == e.default && a.unshift("relative"), a.unshift(Me(n)), r[n] = Ce(...a);
|
|
60
60
|
}), r;
|
|
61
|
-
},
|
|
61
|
+
}, _ = (e, t) => (r) => Be({
|
|
62
62
|
classNameList: [r.className, t],
|
|
63
63
|
default: e,
|
|
64
64
|
states: r
|
|
65
|
-
}),
|
|
65
|
+
}), $e = _(
|
|
66
66
|
"button",
|
|
67
67
|
({
|
|
68
68
|
variant: e,
|
|
@@ -70,59 +70,59 @@ const Be = (e) => {
|
|
|
70
70
|
disabled: r,
|
|
71
71
|
iconPosition: l,
|
|
72
72
|
icon: n,
|
|
73
|
-
isActive:
|
|
73
|
+
isActive: a,
|
|
74
74
|
loading: i,
|
|
75
|
-
shape:
|
|
76
|
-
onToggle:
|
|
75
|
+
shape: c,
|
|
76
|
+
onToggle: d,
|
|
77
77
|
size: o,
|
|
78
|
-
allowShapeTransformation:
|
|
78
|
+
allowShapeTransformation: m
|
|
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",
|
|
84
84
|
o === "medium" && "text-title-medium px-6 py-4 gap-2",
|
|
85
85
|
o === "large" && "text-headline-small px-12 py-8 gap-3",
|
|
86
86
|
o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
|
|
87
|
-
|
|
87
|
+
c === "rounded" && {
|
|
88
88
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
89
89
|
"rounded-[40px]": o === "medium",
|
|
90
90
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
91
91
|
},
|
|
92
|
-
(
|
|
92
|
+
(c === "squared" || m && a) && {
|
|
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
|
+
m && !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 && !a,
|
|
105
|
+
"bg-primary text-on-primary": !r && a,
|
|
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 && !a && d,
|
|
111
|
+
"bg-primary text-on-primary": !r && (a && 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 && !a,
|
|
117
|
+
"bg-secondary text-on-secondary": !r && a,
|
|
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 && !a,
|
|
125
|
+
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !r && a
|
|
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
|
+
c === "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
|
-
(
|
|
167
|
+
(c === "squared" || m && a) && {
|
|
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
|
+
m && !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",
|
|
@@ -195,39 +195,39 @@ const Be = (e) => {
|
|
|
195
195
|
o === "xLarge" && "size-10"
|
|
196
196
|
)
|
|
197
197
|
})
|
|
198
|
-
),
|
|
198
|
+
), Pe = _(
|
|
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
|
|
211
211
|
}
|
|
212
212
|
])
|
|
213
213
|
})
|
|
214
|
-
), We =
|
|
214
|
+
), We = _(
|
|
215
215
|
"carouselItem",
|
|
216
216
|
() => ({
|
|
217
|
-
carouselItem:
|
|
217
|
+
carouselItem: f("rounded-[28px] overflow-hidden flex-none")
|
|
218
218
|
})
|
|
219
|
-
), De =
|
|
219
|
+
), De = _(
|
|
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
|
-
), Ve =
|
|
227
|
+
), Ve = _(
|
|
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"
|
|
@@ -237,10 +237,10 @@ const Be = (e) => {
|
|
|
237
237
|
}
|
|
238
238
|
)
|
|
239
239
|
})
|
|
240
|
-
),
|
|
240
|
+
), je = _(
|
|
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",
|
|
@@ -282,7 +282,7 @@ const Be = (e) => {
|
|
|
282
282
|
t === "tertiary" && "text-on-tertiary-container"
|
|
283
283
|
)
|
|
284
284
|
})
|
|
285
|
-
),
|
|
285
|
+
), Ue = _(
|
|
286
286
|
"iconButton",
|
|
287
287
|
({
|
|
288
288
|
variant: e,
|
|
@@ -290,27 +290,27 @@ const Be = (e) => {
|
|
|
290
290
|
onToggle: r,
|
|
291
291
|
isActive: l,
|
|
292
292
|
size: n,
|
|
293
|
-
width:
|
|
293
|
+
width: a,
|
|
294
294
|
shape: i,
|
|
295
|
-
allowShapeTransformation:
|
|
295
|
+
allowShapeTransformation: c
|
|
296
296
|
}) => ({
|
|
297
|
-
iconButton:
|
|
297
|
+
iconButton: f(
|
|
298
298
|
"rounded-full relative flex transition-all duration-300",
|
|
299
299
|
"group cursor-pointer",
|
|
300
300
|
{
|
|
301
301
|
"cursor-default": t
|
|
302
302
|
},
|
|
303
|
-
(i === "rounded" || i === "squared" && r && !t && l &&
|
|
303
|
+
(i === "rounded" || i === "squared" && r && !t && l && c) && {
|
|
304
304
|
"rounded-[30px]": n === "xSmall" || n == "small",
|
|
305
305
|
"rounded-[40px]": n === "medium",
|
|
306
306
|
"rounded-[70px]": n === "large" || n == "xLarge"
|
|
307
307
|
},
|
|
308
|
-
(i === "squared" || i === "rounded" && r && !t && l &&
|
|
308
|
+
(i === "squared" || i === "rounded" && r && !t && l && c) && {
|
|
309
309
|
"rounded-[12px]": n === "xSmall" || n == "small",
|
|
310
310
|
"rounded-[16px]": n === "medium",
|
|
311
311
|
"rounded-[28px]": n === "large" || n == "xLarge"
|
|
312
312
|
},
|
|
313
|
-
|
|
313
|
+
c && !t && {
|
|
314
314
|
"group-active:rounded-[12px]": n === "xSmall" || n == "small",
|
|
315
315
|
"group-active:rounded-[16px]": n === "medium",
|
|
316
316
|
"group-active:rounded-[28px]": n === "large" || n == "xLarge"
|
|
@@ -340,22 +340,22 @@ 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
|
-
(i === "rounded" || i === "squared" && r && !t && l &&
|
|
348
|
+
(i === "rounded" || i === "squared" && r && !t && l && c) && {
|
|
349
349
|
"rounded-[30px]": n === "xSmall" || n == "small",
|
|
350
350
|
"rounded-[40px]": n === "medium",
|
|
351
351
|
"rounded-[70px]": n === "large" || n == "xLarge"
|
|
352
352
|
},
|
|
353
|
-
(i === "squared" || i === "rounded" && r && !t && l &&
|
|
353
|
+
(i === "squared" || i === "rounded" && r && !t && l && c) && {
|
|
354
354
|
"rounded-[12px]": n === "xSmall" || n == "small",
|
|
355
355
|
"rounded-[16px]": n === "medium",
|
|
356
356
|
"rounded-[28px]": n === "large" || n == "xLarge"
|
|
357
357
|
},
|
|
358
|
-
|
|
358
|
+
c && !t && {
|
|
359
359
|
"group-active:rounded-[12px]": n === "xSmall" || n == "small",
|
|
360
360
|
"group-active:rounded-[16px]": n === "medium",
|
|
361
361
|
"group-active:rounded-[28px]": n === "large" || n == "xLarge"
|
|
@@ -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
|
+
a == "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
|
+
a == "wide" && [
|
|
397
397
|
{ "px-2.5": n === "xSmall" },
|
|
398
398
|
{ "px-3.5": n === "small" },
|
|
399
399
|
{ "px-6": n === "medium" },
|
|
@@ -421,17 +421,17 @@ const Be = (e) => {
|
|
|
421
421
|
!!t && "text-on-surface/[0.38]"
|
|
422
422
|
)
|
|
423
423
|
})
|
|
424
|
-
), Fe =
|
|
424
|
+
), Fe = _(
|
|
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,
|
|
@@ -453,43 +453,70 @@ const Be = (e) => {
|
|
|
453
453
|
}
|
|
454
454
|
)
|
|
455
455
|
})
|
|
456
|
-
),
|
|
456
|
+
), Xe = _(
|
|
457
|
+
"slideSheet",
|
|
458
|
+
({ variant: e, position: t }) => ({
|
|
459
|
+
slideSheet: f(
|
|
460
|
+
"bg-surface flex justify-between max-w-xs z-10",
|
|
461
|
+
{
|
|
462
|
+
"flex-row-reverse": t == "right",
|
|
463
|
+
"h-screen": e == "standard"
|
|
464
|
+
},
|
|
465
|
+
e == "modal" && [
|
|
466
|
+
"rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",
|
|
467
|
+
{
|
|
468
|
+
"right-0": t == "right",
|
|
469
|
+
"left-0": t == "left"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
),
|
|
473
|
+
container: f("w-full overflow-hidden", {}),
|
|
474
|
+
content: f("w-fit "),
|
|
475
|
+
header: f("p-4 flex items-center gap-2"),
|
|
476
|
+
title: f("text-on-surface-variant text-title-large"),
|
|
477
|
+
closeButton: f("ml-auto"),
|
|
478
|
+
divider: f({ hidden: e == "modal" }),
|
|
479
|
+
overlay: f(
|
|
480
|
+
"bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen"
|
|
481
|
+
)
|
|
482
|
+
})
|
|
483
|
+
), He = _(
|
|
457
484
|
"slider",
|
|
458
485
|
({ isChanging: e }) => ({
|
|
459
|
-
slider:
|
|
486
|
+
slider: f([
|
|
460
487
|
"relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"
|
|
461
488
|
]),
|
|
462
|
-
activeTrack:
|
|
489
|
+
activeTrack: f([
|
|
463
490
|
"h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "
|
|
464
491
|
]),
|
|
465
|
-
inactiveTrack:
|
|
492
|
+
inactiveTrack: f([
|
|
466
493
|
"h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"
|
|
467
494
|
]),
|
|
468
|
-
handle:
|
|
495
|
+
handle: f([
|
|
469
496
|
"transform transition-all duration-100 bg-primary h-full rounded-full ",
|
|
470
497
|
{ "w-0.5": e, "w-1": !e }
|
|
471
498
|
]),
|
|
472
|
-
valueIndicator:
|
|
499
|
+
valueIndicator: f([
|
|
473
500
|
"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
501
|
]),
|
|
475
|
-
dot:
|
|
502
|
+
dot: f([
|
|
476
503
|
"h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
|
|
477
504
|
])
|
|
478
505
|
})
|
|
479
|
-
),
|
|
506
|
+
), Oe = _(
|
|
480
507
|
"snackbar",
|
|
481
508
|
() => ({
|
|
482
|
-
snackbar:
|
|
483
|
-
container:
|
|
509
|
+
snackbar: f(" rounded bg-inverse-surface "),
|
|
510
|
+
container: f(
|
|
484
511
|
"pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
|
|
485
512
|
),
|
|
486
|
-
supportingText:
|
|
487
|
-
icon:
|
|
513
|
+
supportingText: f("text-body-medium text-inverse-on-surface "),
|
|
514
|
+
icon: f(" ml-auto mr-0 text-inverse-on-surface block dark")
|
|
488
515
|
})
|
|
489
|
-
),
|
|
516
|
+
), qe = _(
|
|
490
517
|
"switch",
|
|
491
518
|
({ isSelected: e, disabled: t, inactiveIcon: r }) => ({
|
|
492
|
-
switch:
|
|
519
|
+
switch: f(
|
|
493
520
|
"group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
|
|
494
521
|
{ "bg-on-surface/[0.12] border-transparent": t },
|
|
495
522
|
!t && [
|
|
@@ -500,12 +527,12 @@ const Be = (e) => {
|
|
|
500
527
|
// { 'justify-start': !isSelected },
|
|
501
528
|
// { 'justify-end': isSelected },
|
|
502
529
|
),
|
|
503
|
-
handleContainer:
|
|
530
|
+
handleContainer: f(
|
|
504
531
|
"flex items-center justify-center absolute",
|
|
505
532
|
{ "left-[14px]": !e },
|
|
506
533
|
{ "right-[14px]": e }
|
|
507
534
|
),
|
|
508
|
-
handle:
|
|
535
|
+
handle: f(
|
|
509
536
|
"transition-all duration-100 z-10 rounded-full flex items-center justify-center",
|
|
510
537
|
{ "w-[16px] h-[16px]": !e && !r },
|
|
511
538
|
{ "w-[24px] h-[24px]": !(!e && !r) },
|
|
@@ -516,11 +543,11 @@ const Be = (e) => {
|
|
|
516
543
|
],
|
|
517
544
|
{ "bg-surface": t }
|
|
518
545
|
),
|
|
519
|
-
handleStateLayer:
|
|
546
|
+
handleStateLayer: f(
|
|
520
547
|
"w-[40px] h-[40px] -z-10 rounded-full absolute",
|
|
521
548
|
{ "group-state-primary": !t }
|
|
522
549
|
),
|
|
523
|
-
icon:
|
|
550
|
+
icon: f(
|
|
524
551
|
"w-[16px] h-[16px]",
|
|
525
552
|
!t && [
|
|
526
553
|
{ "text-on-primary-container": e },
|
|
@@ -529,16 +556,16 @@ const Be = (e) => {
|
|
|
529
556
|
{ "text-on-surface/[0.38]": t }
|
|
530
557
|
)
|
|
531
558
|
})
|
|
532
|
-
),
|
|
559
|
+
), _e = _(
|
|
533
560
|
"tab",
|
|
534
561
|
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
535
|
-
tab:
|
|
562
|
+
tab: f(
|
|
536
563
|
"bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",
|
|
537
564
|
{ "z-10": e },
|
|
538
565
|
!!(t && r) && l === "primary" && "h-16",
|
|
539
566
|
!(t && r && l === "primary") && "h-12"
|
|
540
567
|
),
|
|
541
|
-
stateLayer:
|
|
568
|
+
stateLayer: f(
|
|
542
569
|
"absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
|
|
543
570
|
l === "primary" && {
|
|
544
571
|
"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface": !e,
|
|
@@ -546,7 +573,7 @@ const Be = (e) => {
|
|
|
546
573
|
},
|
|
547
574
|
l === "secondary" && "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"
|
|
548
575
|
),
|
|
549
|
-
content:
|
|
576
|
+
content: f(
|
|
550
577
|
"flex gap-0.5 h-full justify-center",
|
|
551
578
|
{
|
|
552
579
|
relative: l == "primary"
|
|
@@ -560,7 +587,7 @@ const Be = (e) => {
|
|
|
560
587
|
"flex-row items-center gap-2": !!(r && t)
|
|
561
588
|
}
|
|
562
589
|
),
|
|
563
|
-
icon:
|
|
590
|
+
icon: f(
|
|
564
591
|
"h-6 w-6 p-0.5 !box-border",
|
|
565
592
|
l === "primary" && {
|
|
566
593
|
"text-on-surface-variant": !e,
|
|
@@ -571,7 +598,7 @@ const Be = (e) => {
|
|
|
571
598
|
"text-on-surface": e
|
|
572
599
|
}
|
|
573
600
|
),
|
|
574
|
-
label:
|
|
601
|
+
label: f(
|
|
575
602
|
"text-title-small text-nowrap",
|
|
576
603
|
l === "primary" && {
|
|
577
604
|
"text-on-surface-variant": !e,
|
|
@@ -582,22 +609,22 @@ const Be = (e) => {
|
|
|
582
609
|
"text-on-surface": e
|
|
583
610
|
}
|
|
584
611
|
),
|
|
585
|
-
underline:
|
|
612
|
+
underline: f(
|
|
586
613
|
"bg-primary absolute w-full left-0 bottom-0",
|
|
587
614
|
l === "primary" && "h-[3px] rounded-t",
|
|
588
615
|
l === "secondary" && "h-0.5"
|
|
589
616
|
)
|
|
590
617
|
})
|
|
591
|
-
),
|
|
618
|
+
), Ke = _(
|
|
592
619
|
"tabs",
|
|
593
620
|
({ scrollable: e }) => ({
|
|
594
|
-
tabs:
|
|
621
|
+
tabs: f(
|
|
595
622
|
"border-b border-surface-container-highest",
|
|
596
623
|
"flex relative ",
|
|
597
624
|
{ "overflow-x-auto": e }
|
|
598
625
|
)
|
|
599
626
|
})
|
|
600
|
-
),
|
|
627
|
+
), Ge = _(
|
|
601
628
|
"textField",
|
|
602
629
|
({
|
|
603
630
|
disabled: e,
|
|
@@ -605,21 +632,21 @@ const Be = (e) => {
|
|
|
605
632
|
trailingIcon: r,
|
|
606
633
|
variant: l,
|
|
607
634
|
errorText: n,
|
|
608
|
-
isFocused:
|
|
635
|
+
isFocused: a,
|
|
609
636
|
value: i,
|
|
610
|
-
suffix:
|
|
611
|
-
textLine:
|
|
637
|
+
suffix: c,
|
|
638
|
+
textLine: d
|
|
612
639
|
}) => ({
|
|
613
|
-
textField:
|
|
640
|
+
textField: f({
|
|
614
641
|
"opacity-[.38]": e
|
|
615
642
|
}),
|
|
616
|
-
content:
|
|
643
|
+
content: f(
|
|
617
644
|
"group transition-border duration-200 relative flex items-center ",
|
|
618
|
-
{ "h-14":
|
|
645
|
+
{ "h-14": d == "singleLine" },
|
|
619
646
|
{
|
|
620
|
-
"border-on-surface-variant": !(n != null && n.length) && !
|
|
621
|
-
"border-outline": !(n != null && n.length) && !
|
|
622
|
-
"border-primary": !(n != null && n.length) &&
|
|
647
|
+
"border-on-surface-variant": !(n != null && n.length) && !a && l == "filled",
|
|
648
|
+
"border-outline": !(n != null && n.length) && !a && l == "outlined",
|
|
649
|
+
"border-primary": !(n != null && n.length) && a,
|
|
623
650
|
"border-error": !!(n != null && n.length)
|
|
624
651
|
},
|
|
625
652
|
{ "bg-on-surface/[0.04]": e },
|
|
@@ -630,72 +657,72 @@ const Be = (e) => {
|
|
|
630
657
|
l == "outlined" && [
|
|
631
658
|
"border rounded box-border",
|
|
632
659
|
{
|
|
633
|
-
"border-[3px]":
|
|
660
|
+
"border-[3px]": a
|
|
634
661
|
}
|
|
635
662
|
]
|
|
636
663
|
),
|
|
637
|
-
stateLayer:
|
|
664
|
+
stateLayer: f(
|
|
638
665
|
"absolute -z-10 w-full h-full top-0 left-0",
|
|
639
666
|
{
|
|
640
667
|
hidden: l == "outlined"
|
|
641
668
|
},
|
|
642
669
|
{
|
|
643
670
|
"group-state-on-surface": !e,
|
|
644
|
-
"focus-state-on-surface":
|
|
671
|
+
"focus-state-on-surface": a
|
|
645
672
|
}
|
|
646
673
|
),
|
|
647
|
-
label:
|
|
674
|
+
label: f(
|
|
648
675
|
"inline-flex outline-none whitespace-nowrap",
|
|
649
676
|
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
650
677
|
{ "text-on-surface": e },
|
|
651
678
|
{ "text-error": !!(n != null && n.length) },
|
|
652
|
-
{ "text-primary": !(n != null && n.length) &&
|
|
679
|
+
{ "text-primary": !(n != null && n.length) && a }
|
|
653
680
|
),
|
|
654
|
-
input:
|
|
681
|
+
input: f(
|
|
655
682
|
"w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
|
|
656
683
|
{
|
|
657
684
|
" text-on-surface placeholder:text-on-surface-variant": !e,
|
|
658
685
|
"placeholder:text-on-surface text-on-surface": e
|
|
659
686
|
},
|
|
660
687
|
{
|
|
661
|
-
"pr-0": !!
|
|
688
|
+
"pr-0": !!c
|
|
662
689
|
},
|
|
663
690
|
l == "filled" && " pb-2 pt-6",
|
|
664
691
|
l == "outlined" && "py-4 relative z-10"
|
|
665
692
|
),
|
|
666
|
-
activeIndicator:
|
|
693
|
+
activeIndicator: f(
|
|
667
694
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
668
695
|
l == "filled" && [
|
|
669
696
|
"h-[2px] transition-all duration-300",
|
|
670
697
|
{ "bg-primary": !(n != null && n.length) },
|
|
671
698
|
{ "bg-error": !!(n != null && n.length) },
|
|
672
|
-
{ "!w-full":
|
|
699
|
+
{ "!w-full": a }
|
|
673
700
|
]
|
|
674
701
|
),
|
|
675
|
-
supportingText:
|
|
702
|
+
supportingText: f(
|
|
676
703
|
" text-body-small px-4 pt-1",
|
|
677
704
|
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
678
705
|
{ "text-on-surface": e },
|
|
679
|
-
{ "!w-full":
|
|
706
|
+
{ "!w-full": a },
|
|
680
707
|
{ "text-error": !!(n != null && n.length) }
|
|
681
708
|
),
|
|
682
|
-
leadingIcon:
|
|
709
|
+
leadingIcon: f([
|
|
683
710
|
"h-12 ml-3 flex items-center justify-center",
|
|
684
711
|
{ "cursor-text": !Y.isValidElement(t) }
|
|
685
712
|
]),
|
|
686
|
-
trailingIcon:
|
|
713
|
+
trailingIcon: f("h-12 w-12 flex items-center justify-center", {
|
|
687
714
|
"cursor-text": !Y.isValidElement(r)
|
|
688
715
|
}),
|
|
689
|
-
suffix:
|
|
716
|
+
suffix: f(
|
|
690
717
|
"text-on-surface-variant pl-0 pr-4",
|
|
691
718
|
l == "filled" && " pb-2 pt-6",
|
|
692
719
|
l == "outlined" && "py-4 relative z-10"
|
|
693
720
|
)
|
|
694
721
|
})
|
|
695
|
-
),
|
|
722
|
+
), Ye = _(
|
|
696
723
|
"toolTip",
|
|
697
724
|
({ position: e, variant: t }) => ({
|
|
698
|
-
toolTip:
|
|
725
|
+
toolTip: f(
|
|
699
726
|
" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",
|
|
700
727
|
{
|
|
701
728
|
"bottom-full left-1/2 -translate-x-1/2": e == "top",
|
|
@@ -708,20 +735,20 @@ const Be = (e) => {
|
|
|
708
735
|
"top-full left-full": e == "bottom-right"
|
|
709
736
|
}
|
|
710
737
|
),
|
|
711
|
-
container:
|
|
738
|
+
container: f(
|
|
712
739
|
"pb-2",
|
|
713
740
|
t == "rich" && "bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",
|
|
714
741
|
t == "plain" && "bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"
|
|
715
742
|
),
|
|
716
|
-
actions:
|
|
743
|
+
actions: f(
|
|
717
744
|
"flex gap-10 px-1 mt-2",
|
|
718
745
|
t == "plain" && "hidden"
|
|
719
746
|
),
|
|
720
|
-
subHead:
|
|
747
|
+
subHead: f(
|
|
721
748
|
"text-title-small mb-1",
|
|
722
749
|
t == "plain" && "hidden"
|
|
723
750
|
),
|
|
724
|
-
supportingText:
|
|
751
|
+
supportingText: f("")
|
|
725
752
|
})
|
|
726
753
|
), Q = ({ icon: e, colors: t = [], className: r }) => {
|
|
727
754
|
if (typeof e == "string") {
|
|
@@ -735,7 +762,7 @@ const Be = (e) => {
|
|
|
735
762
|
)), /* @__PURE__ */ u(
|
|
736
763
|
"div",
|
|
737
764
|
{
|
|
738
|
-
className:
|
|
765
|
+
className: f(
|
|
739
766
|
"size-5 box-content inline-flex fill-current",
|
|
740
767
|
r
|
|
741
768
|
),
|
|
@@ -752,7 +779,7 @@ const Be = (e) => {
|
|
|
752
779
|
src: o.src,
|
|
753
780
|
width: o.width,
|
|
754
781
|
height: o.height,
|
|
755
|
-
className:
|
|
782
|
+
className: f("size-5 box-content", r),
|
|
756
783
|
style: {
|
|
757
784
|
filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
|
|
758
785
|
},
|
|
@@ -764,7 +791,7 @@ const Be = (e) => {
|
|
|
764
791
|
const l = e;
|
|
765
792
|
if (!(l != null && l.prefix))
|
|
766
793
|
throw new Error(`Invalid icon type: ${typeof e}`);
|
|
767
|
-
const { icon: n } = l, [
|
|
794
|
+
const { icon: n } = l, [a, i, , , c] = n || [], d = (o) => {
|
|
768
795
|
switch (o.length) {
|
|
769
796
|
case 2:
|
|
770
797
|
return {
|
|
@@ -780,47 +807,47 @@ const Be = (e) => {
|
|
|
780
807
|
return /* @__PURE__ */ u(
|
|
781
808
|
"svg",
|
|
782
809
|
{
|
|
783
|
-
className:
|
|
784
|
-
style: { ...
|
|
810
|
+
className: f("size-5 box-content", r),
|
|
811
|
+
style: { ...d(t) },
|
|
785
812
|
xmlns: "http://www.w3.org/2000/svg",
|
|
786
|
-
viewBox: `0 0 ${
|
|
813
|
+
viewBox: `0 0 ${a} ${i}`,
|
|
787
814
|
role: "img",
|
|
788
815
|
"aria-hidden": "true",
|
|
789
|
-
children: typeof
|
|
816
|
+
children: typeof c == "string" ? /* @__PURE__ */ u("path", { className: "fill-current", d: c }) : c.map((o, m) => /* @__PURE__ */ u("path", { d: o }, m))
|
|
790
817
|
}
|
|
791
818
|
);
|
|
792
|
-
},
|
|
819
|
+
}, Ze = ({
|
|
793
820
|
variant: e = "linear-determinate",
|
|
794
821
|
value: t = 0,
|
|
795
822
|
transitionDuration: r = 1e3,
|
|
796
823
|
className: l,
|
|
797
824
|
...n
|
|
798
825
|
}) => {
|
|
799
|
-
const [
|
|
800
|
-
|
|
826
|
+
const [a, i] = R(t), [c] = R(1.5);
|
|
827
|
+
$(() => {
|
|
801
828
|
t > 100 && (t = 100), t < 0 && (t = 0), i(t);
|
|
802
829
|
}, [t]);
|
|
803
|
-
const [
|
|
804
|
-
|
|
805
|
-
if ((e === "circular-indeterminate" || e === "linear-indeterminate") &&
|
|
830
|
+
const [d, o] = R(!0), m = () => d ? c : c * 0.5;
|
|
831
|
+
$(() => {
|
|
832
|
+
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && a !== 100) {
|
|
806
833
|
const v = setInterval(() => {
|
|
807
|
-
i(
|
|
808
|
-
},
|
|
834
|
+
i(d ? 10 : 90), o(!d);
|
|
835
|
+
}, m() * 1e3);
|
|
809
836
|
return () => clearInterval(v);
|
|
810
837
|
}
|
|
811
|
-
}, [e,
|
|
812
|
-
const [h,
|
|
813
|
-
|
|
814
|
-
if (
|
|
838
|
+
}, [e, d, a]);
|
|
839
|
+
const [h, s] = R(!1);
|
|
840
|
+
$(() => {
|
|
841
|
+
if (a >= 100) {
|
|
815
842
|
const v = setTimeout(() => {
|
|
816
|
-
|
|
843
|
+
s(!1);
|
|
817
844
|
}, r);
|
|
818
845
|
return () => {
|
|
819
846
|
clearTimeout(v);
|
|
820
847
|
};
|
|
821
848
|
} else
|
|
822
|
-
|
|
823
|
-
}, [
|
|
849
|
+
s(!0);
|
|
850
|
+
}, [a, r]);
|
|
824
851
|
const y = Fe({
|
|
825
852
|
className: l,
|
|
826
853
|
variant: e,
|
|
@@ -828,14 +855,14 @@ const Be = (e) => {
|
|
|
828
855
|
transitionDuration: r,
|
|
829
856
|
isVisible: h
|
|
830
857
|
});
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ D(te, { children: [
|
|
859
|
+
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ D("div", { className: y.progressIndicator, ...n, children: [
|
|
833
860
|
/* @__PURE__ */ u(
|
|
834
861
|
"div",
|
|
835
862
|
{
|
|
836
863
|
style: {
|
|
837
|
-
width: `${
|
|
838
|
-
transition: `width ${r}ms ease-in-out ${
|
|
864
|
+
width: `${a}%`,
|
|
865
|
+
transition: `width ${r}ms ease-in-out ${a == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
|
|
839
866
|
},
|
|
840
867
|
className: y.track
|
|
841
868
|
}
|
|
@@ -844,8 +871,8 @@ const Be = (e) => {
|
|
|
844
871
|
"div",
|
|
845
872
|
{
|
|
846
873
|
style: {
|
|
847
|
-
marginLeft:
|
|
848
|
-
transition: `width ${r}ms ease-in-out ${
|
|
874
|
+
marginLeft: a != 100 ? "6px" : "0px",
|
|
875
|
+
transition: `width ${r}ms ease-in-out ${a == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r / 1.5}ms` : ""}`
|
|
849
876
|
},
|
|
850
877
|
className: y.activeIndicator
|
|
851
878
|
}
|
|
@@ -862,7 +889,7 @@ const Be = (e) => {
|
|
|
862
889
|
)
|
|
863
890
|
] }),
|
|
864
891
|
(e === "circular-determinate" || e == "circular-indeterminate") && /* @__PURE__ */ u(
|
|
865
|
-
|
|
892
|
+
U.svg,
|
|
866
893
|
{
|
|
867
894
|
width: "48",
|
|
868
895
|
height: "48",
|
|
@@ -871,13 +898,13 @@ const Be = (e) => {
|
|
|
871
898
|
animate: { rotate: 270 },
|
|
872
899
|
transition: {
|
|
873
900
|
repeat: 1 / 0,
|
|
874
|
-
duration:
|
|
901
|
+
duration: m(),
|
|
875
902
|
ease: "linear"
|
|
876
903
|
},
|
|
877
904
|
className: y.progressIndicator,
|
|
878
905
|
...n,
|
|
879
906
|
children: /* @__PURE__ */ u(
|
|
880
|
-
|
|
907
|
+
U.circle,
|
|
881
908
|
{
|
|
882
909
|
cx: "50%",
|
|
883
910
|
cy: "50%",
|
|
@@ -890,24 +917,24 @@ const Be = (e) => {
|
|
|
890
917
|
className: y.activeIndicator,
|
|
891
918
|
variants: {
|
|
892
919
|
hidden: {
|
|
893
|
-
pathLength:
|
|
920
|
+
pathLength: d ? 10 / 100 : 90 / 100
|
|
894
921
|
},
|
|
895
922
|
visible: {
|
|
896
|
-
pathLength:
|
|
923
|
+
pathLength: d ? 90 / 100 : 10 / 100
|
|
897
924
|
}
|
|
898
925
|
},
|
|
899
926
|
transition: {
|
|
900
927
|
pathLength: {
|
|
901
928
|
type: "tween",
|
|
902
929
|
ease: "linear",
|
|
903
|
-
duration:
|
|
930
|
+
duration: m(),
|
|
904
931
|
bounce: 0
|
|
905
932
|
}
|
|
906
933
|
}
|
|
907
934
|
}
|
|
908
935
|
)
|
|
909
936
|
},
|
|
910
|
-
|
|
937
|
+
d + ""
|
|
911
938
|
)
|
|
912
939
|
] });
|
|
913
940
|
}, ne = ({
|
|
@@ -931,36 +958,36 @@ const Be = (e) => {
|
|
|
931
958
|
borderRadius: { duration: 0.3, delay: 0.3 }
|
|
932
959
|
}
|
|
933
960
|
}
|
|
934
|
-
}, [l, n] =
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}, [
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
return
|
|
941
|
-
|
|
961
|
+
}, [l, n] = R(!0), [a, i] = R(!1), [c, d] = R({ x: 0, y: 0 });
|
|
962
|
+
$(() => {
|
|
963
|
+
a && (n(!0), n(!1));
|
|
964
|
+
}, [a]), $(() => {
|
|
965
|
+
const s = t == null ? void 0 : t.current;
|
|
966
|
+
if (s)
|
|
967
|
+
return s.addEventListener("mousedown", o), s.addEventListener("mouseup", h), s.addEventListener("mouseleave", m), () => {
|
|
968
|
+
s.removeEventListener("mousedown", o), s.removeEventListener("mouseup", h), s.removeEventListener("mouseleave", m);
|
|
942
969
|
};
|
|
943
970
|
}, [t]);
|
|
944
|
-
const o = (
|
|
971
|
+
const o = (s) => {
|
|
945
972
|
const y = t == null ? void 0 : t.current, v = y.getBoundingClientRect();
|
|
946
|
-
i(!0),
|
|
947
|
-
x: (
|
|
948
|
-
y: (
|
|
973
|
+
i(!0), d({
|
|
974
|
+
x: (s.clientX - v.left) / y.clientWidth * 100,
|
|
975
|
+
y: (s.clientY - v.top) / y.clientHeight * 100
|
|
949
976
|
});
|
|
950
|
-
},
|
|
977
|
+
}, m = (s) => {
|
|
951
978
|
i(!1);
|
|
952
|
-
}, h = (
|
|
979
|
+
}, h = (s) => {
|
|
953
980
|
i(!1);
|
|
954
981
|
};
|
|
955
|
-
return /* @__PURE__ */ u(
|
|
956
|
-
|
|
982
|
+
return /* @__PURE__ */ u(A, { mode: "wait", children: (a || !a && !l) && /* @__PURE__ */ u(
|
|
983
|
+
U.div,
|
|
957
984
|
{
|
|
958
985
|
style: {
|
|
959
986
|
position: "absolute",
|
|
960
987
|
width: "100%",
|
|
961
988
|
height: "100%",
|
|
962
|
-
top:
|
|
963
|
-
left:
|
|
989
|
+
top: c.y + "%",
|
|
990
|
+
left: c.x + "%",
|
|
964
991
|
background: `color-mix(in srgb, var(--color-${e}) 12%, transparent)`,
|
|
965
992
|
pointerEvents: "none"
|
|
966
993
|
},
|
|
@@ -972,10 +999,10 @@ const Be = (e) => {
|
|
|
972
999
|
className: "transform -translate-x-1/2 -translate-y-1/2"
|
|
973
1000
|
}
|
|
974
1001
|
) });
|
|
975
|
-
},
|
|
1002
|
+
}, Je = _(
|
|
976
1003
|
"customScroll",
|
|
977
1004
|
({ orientation: e, draggable: t, isDragging: r }) => ({
|
|
978
|
-
customScroll:
|
|
1005
|
+
customScroll: f(
|
|
979
1006
|
"flex h-full w-full",
|
|
980
1007
|
t && [
|
|
981
1008
|
"[&::-webkit-scrollbar-track]:rounded-full",
|
|
@@ -995,160 +1022,160 @@ const Be = (e) => {
|
|
|
995
1022
|
"cursor-grabbing": t && r
|
|
996
1023
|
}
|
|
997
1024
|
),
|
|
998
|
-
track:
|
|
1025
|
+
track: f("overflow-hidden flex-none sticky", {
|
|
999
1026
|
"left-0 h-full": e === "horizontal",
|
|
1000
1027
|
"top-0 w-full": e === "vertical"
|
|
1001
1028
|
})
|
|
1002
1029
|
})
|
|
1003
|
-
),
|
|
1030
|
+
), ge = ({
|
|
1004
1031
|
children: e,
|
|
1005
1032
|
orientation: t = "vertical",
|
|
1006
1033
|
scrollSize: r,
|
|
1007
1034
|
onScroll: l,
|
|
1008
1035
|
className: n,
|
|
1009
|
-
draggable:
|
|
1036
|
+
draggable: a = !1,
|
|
1010
1037
|
throttleDuration: i = 75
|
|
1011
1038
|
}) => {
|
|
1012
|
-
var
|
|
1013
|
-
const
|
|
1039
|
+
var W, F;
|
|
1040
|
+
const c = j(null), d = j(null), [o, m] = R({
|
|
1014
1041
|
width: null,
|
|
1015
1042
|
height: null
|
|
1016
1043
|
});
|
|
1017
|
-
|
|
1018
|
-
if (!
|
|
1019
|
-
const
|
|
1020
|
-
for (const
|
|
1021
|
-
|
|
1022
|
-
width:
|
|
1023
|
-
height:
|
|
1044
|
+
$(() => {
|
|
1045
|
+
if (!c.current) return;
|
|
1046
|
+
const S = new ResizeObserver((X) => {
|
|
1047
|
+
for (const H of X)
|
|
1048
|
+
H.target === c.current && m({
|
|
1049
|
+
width: H.contentRect.width,
|
|
1050
|
+
height: H.contentRect.height
|
|
1024
1051
|
// On observe aussi la hauteur maintenant
|
|
1025
1052
|
});
|
|
1026
1053
|
});
|
|
1027
|
-
return
|
|
1028
|
-
|
|
1054
|
+
return S.observe(c.current), () => {
|
|
1055
|
+
S.disconnect();
|
|
1029
1056
|
};
|
|
1030
|
-
}, [
|
|
1031
|
-
const h =
|
|
1032
|
-
const
|
|
1033
|
-
return
|
|
1034
|
-
width: r ??
|
|
1035
|
-
height: r ??
|
|
1057
|
+
}, [c]);
|
|
1058
|
+
const h = j(null), s = j(null), y = () => {
|
|
1059
|
+
const S = d.current;
|
|
1060
|
+
return S ? {
|
|
1061
|
+
width: r ?? S.scrollWidth,
|
|
1062
|
+
height: r ?? S.scrollHeight
|
|
1036
1063
|
} : null;
|
|
1037
1064
|
}, v = () => {
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1040
|
-
width:
|
|
1041
|
-
height:
|
|
1065
|
+
const S = c.current;
|
|
1066
|
+
return S ? {
|
|
1067
|
+
width: S.clientWidth,
|
|
1068
|
+
height: S.clientHeight
|
|
1042
1069
|
// Correction ici pour retourner la bonne hauteur
|
|
1043
1070
|
} : null;
|
|
1044
|
-
}, { scrollYProgress:
|
|
1045
|
-
container:
|
|
1046
|
-
}), I =
|
|
1047
|
-
I.current || (I.current =
|
|
1071
|
+
}, { scrollYProgress: L, scrollXProgress: N } = Ie({
|
|
1072
|
+
container: c
|
|
1073
|
+
}), I = j(null);
|
|
1074
|
+
I.current || (I.current = Ee(
|
|
1048
1075
|
i,
|
|
1049
|
-
(
|
|
1050
|
-
!
|
|
1051
|
-
scrollProgress:
|
|
1052
|
-
scroll:
|
|
1076
|
+
(S, X) => {
|
|
1077
|
+
!s.current || !h.current || l && (t === "horizontal" && X === "x" && l({
|
|
1078
|
+
scrollProgress: S,
|
|
1079
|
+
scroll: S * h.current.width,
|
|
1053
1080
|
scrollTotal: h.current.width,
|
|
1054
|
-
scrollVisible:
|
|
1055
|
-
}), t === "vertical" &&
|
|
1056
|
-
scrollProgress:
|
|
1057
|
-
scroll:
|
|
1081
|
+
scrollVisible: s.current.width
|
|
1082
|
+
}), t === "vertical" && X === "y" && l({
|
|
1083
|
+
scrollProgress: S,
|
|
1084
|
+
scroll: S * h.current.height,
|
|
1058
1085
|
scrollTotal: h.current.height,
|
|
1059
|
-
scrollVisible:
|
|
1086
|
+
scrollVisible: s.current.height
|
|
1060
1087
|
}));
|
|
1061
1088
|
}
|
|
1062
1089
|
));
|
|
1063
|
-
const w = (
|
|
1064
|
-
I.current && I.current(
|
|
1090
|
+
const w = (S, X) => {
|
|
1091
|
+
I.current && I.current(S, X);
|
|
1065
1092
|
};
|
|
1066
|
-
|
|
1067
|
-
o.width && w(
|
|
1068
|
-
}, [o]), se(
|
|
1069
|
-
w(
|
|
1070
|
-
}), se(
|
|
1071
|
-
w(
|
|
1093
|
+
$(() => {
|
|
1094
|
+
o.width && w(N.get(), "x"), o.height && w(L.get(), "y");
|
|
1095
|
+
}, [o]), se(N, "change", (S) => {
|
|
1096
|
+
w(S, "x");
|
|
1097
|
+
}), se(L, "change", (S) => {
|
|
1098
|
+
w(S, "y");
|
|
1072
1099
|
});
|
|
1073
|
-
const [B, b] =
|
|
1074
|
-
|
|
1075
|
-
B || !
|
|
1100
|
+
const [B, b] = R(!1);
|
|
1101
|
+
pe(() => {
|
|
1102
|
+
B || !s.current || !h.current || !l || (l({
|
|
1076
1103
|
scrollProgress: 0,
|
|
1077
1104
|
scroll: 0,
|
|
1078
1105
|
scrollTotal: t == "vertical" ? h.current.height : h.current.width,
|
|
1079
|
-
scrollVisible: t == "vertical" ?
|
|
1106
|
+
scrollVisible: t == "vertical" ? s.current.height : s.current.width
|
|
1080
1107
|
}), b(!0));
|
|
1081
|
-
}, [
|
|
1082
|
-
const [E,
|
|
1108
|
+
}, [s, h, l]), h.current = y(), s.current = v();
|
|
1109
|
+
const [E, C] = R(!1), V = Je({
|
|
1083
1110
|
isDragging: E,
|
|
1084
1111
|
children: e,
|
|
1085
1112
|
className: n,
|
|
1086
1113
|
onScroll: l,
|
|
1087
1114
|
orientation: t,
|
|
1088
1115
|
scrollSize: r,
|
|
1089
|
-
draggable:
|
|
1116
|
+
draggable: a,
|
|
1090
1117
|
throttleDuration: i
|
|
1091
|
-
}), [P, k] =
|
|
1092
|
-
if (!
|
|
1093
|
-
const
|
|
1094
|
-
if (!
|
|
1095
|
-
const J = (
|
|
1096
|
-
|
|
1097
|
-
},
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1100
|
-
}, Z = (
|
|
1101
|
-
E && (
|
|
1118
|
+
}), [P, k] = R(0), [p, M] = R(0), O = (S) => {
|
|
1119
|
+
if (!a) return;
|
|
1120
|
+
const X = c.current;
|
|
1121
|
+
if (!X || P == null) return;
|
|
1122
|
+
const J = (S.pageX - X.offsetLeft - P) * 1.5;
|
|
1123
|
+
X.scrollLeft = p - J;
|
|
1124
|
+
}, K = (S) => {
|
|
1125
|
+
const X = c.current;
|
|
1126
|
+
X && (C(!0), k(S.pageX - X.offsetLeft), M(X.scrollLeft));
|
|
1127
|
+
}, Z = (S) => {
|
|
1128
|
+
E && (S.preventDefault(), O(S));
|
|
1102
1129
|
}, q = () => {
|
|
1103
|
-
|
|
1104
|
-
},
|
|
1105
|
-
|
|
1106
|
-
}, g = (
|
|
1107
|
-
|
|
1108
|
-
}, x =
|
|
1109
|
-
return
|
|
1130
|
+
C(!1);
|
|
1131
|
+
}, z = () => {
|
|
1132
|
+
C(!1);
|
|
1133
|
+
}, g = (S) => {
|
|
1134
|
+
S.preventDefault();
|
|
1135
|
+
}, x = j(null);
|
|
1136
|
+
return $(() => () => {
|
|
1110
1137
|
x.current && clearTimeout(x.current);
|
|
1111
|
-
}, []), /* @__PURE__ */
|
|
1138
|
+
}, []), /* @__PURE__ */ D(
|
|
1112
1139
|
"div",
|
|
1113
1140
|
{
|
|
1114
|
-
className:
|
|
1115
|
-
ref:
|
|
1116
|
-
onMouseDown:
|
|
1141
|
+
className: V.customScroll,
|
|
1142
|
+
ref: c,
|
|
1143
|
+
onMouseDown: K,
|
|
1117
1144
|
onMouseMove: Z,
|
|
1118
1145
|
onMouseUp: q,
|
|
1119
|
-
onMouseLeave:
|
|
1146
|
+
onMouseLeave: z,
|
|
1120
1147
|
onDragStart: g,
|
|
1121
|
-
onScroll: (
|
|
1122
|
-
E || (k(null),
|
|
1123
|
-
|
|
1148
|
+
onScroll: (S) => {
|
|
1149
|
+
E || (k(null), C(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
1150
|
+
C(!1);
|
|
1124
1151
|
}, 1e3));
|
|
1125
1152
|
},
|
|
1126
1153
|
children: [
|
|
1127
1154
|
/* @__PURE__ */ u(
|
|
1128
1155
|
"div",
|
|
1129
1156
|
{
|
|
1130
|
-
ref:
|
|
1131
|
-
style: t === "vertical" ? { height: ((
|
|
1132
|
-
className:
|
|
1157
|
+
ref: d,
|
|
1158
|
+
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%" },
|
|
1159
|
+
className: V.track,
|
|
1133
1160
|
children: e
|
|
1134
1161
|
}
|
|
1135
1162
|
),
|
|
1136
|
-
|
|
1137
|
-
t === "vertical" && h.current.height >
|
|
1138
|
-
|
|
1163
|
+
s.current && h.current && /* @__PURE__ */ D(te, { children: [
|
|
1164
|
+
t === "vertical" && h.current.height > s.current.height && /* @__PURE__ */ u(
|
|
1165
|
+
U.div,
|
|
1139
1166
|
{
|
|
1140
1167
|
className: "flex-none",
|
|
1141
1168
|
style: {
|
|
1142
|
-
height: h.current.height -
|
|
1169
|
+
height: h.current.height - s.current.height
|
|
1143
1170
|
}
|
|
1144
1171
|
}
|
|
1145
1172
|
),
|
|
1146
|
-
t === "horizontal" && h.current.width >
|
|
1147
|
-
|
|
1173
|
+
t === "horizontal" && h.current.width > s.current.width && /* @__PURE__ */ u(
|
|
1174
|
+
U.div,
|
|
1148
1175
|
{
|
|
1149
1176
|
className: "flex-none",
|
|
1150
1177
|
style: {
|
|
1151
|
-
width: h.current.width -
|
|
1178
|
+
width: h.current.width - s.current.width
|
|
1152
1179
|
}
|
|
1153
1180
|
}
|
|
1154
1181
|
)
|
|
@@ -1156,40 +1183,40 @@ const Be = (e) => {
|
|
|
1156
1183
|
]
|
|
1157
1184
|
}
|
|
1158
1185
|
);
|
|
1159
|
-
},
|
|
1186
|
+
}, Lt = ({
|
|
1160
1187
|
children: e,
|
|
1161
1188
|
transition: t = ".5s",
|
|
1162
1189
|
orientation: r = "vertical",
|
|
1163
1190
|
throttleDuration: l = 25,
|
|
1164
1191
|
...n
|
|
1165
1192
|
}) => {
|
|
1166
|
-
const [
|
|
1167
|
-
|
|
1193
|
+
const [a, i] = R(null), c = he((a == null ? void 0 : a.scrollProgress) ?? 0), d = oe(
|
|
1194
|
+
c,
|
|
1168
1195
|
[0, 1],
|
|
1169
|
-
[0, 1 - ((
|
|
1196
|
+
[0, 1 - ((a == null ? void 0 : a.scrollVisible) ?? 0) / ((a == null ? void 0 : a.scrollTotal) ?? 0)]
|
|
1170
1197
|
), o = oe(
|
|
1171
|
-
|
|
1172
|
-
(
|
|
1173
|
-
),
|
|
1174
|
-
|
|
1175
|
-
}, h =
|
|
1176
|
-
return se(o, "change", (
|
|
1198
|
+
d,
|
|
1199
|
+
(s) => `${-s * 100}%`
|
|
1200
|
+
), m = (s) => {
|
|
1201
|
+
c.set(s.scrollProgress), s.scrollTotal > 0 && i(s);
|
|
1202
|
+
}, h = j(null);
|
|
1203
|
+
return se(o, "change", (s) => {
|
|
1177
1204
|
const y = performance.now();
|
|
1178
1205
|
if (h.current !== null) {
|
|
1179
1206
|
const v = y - h.current;
|
|
1180
1207
|
console.log(`Delta temps : ${v} ms`);
|
|
1181
1208
|
}
|
|
1182
|
-
h.current = y, console.log(
|
|
1209
|
+
h.current = y, console.log(s);
|
|
1183
1210
|
}), /* @__PURE__ */ u(
|
|
1184
|
-
|
|
1211
|
+
ge,
|
|
1185
1212
|
{
|
|
1186
|
-
onScroll:
|
|
1213
|
+
onScroll: m,
|
|
1187
1214
|
throttleDuration: l,
|
|
1188
1215
|
...n,
|
|
1189
1216
|
children: /* @__PURE__ */ u(
|
|
1190
|
-
|
|
1217
|
+
U.div,
|
|
1191
1218
|
{
|
|
1192
|
-
className:
|
|
1219
|
+
className: f("transition-transform ease-out", {
|
|
1193
1220
|
"w-fit h-full": r === "horizontal",
|
|
1194
1221
|
"h-fit w-full": r === "vertical"
|
|
1195
1222
|
}),
|
|
@@ -1202,82 +1229,95 @@ const Be = (e) => {
|
|
|
1202
1229
|
)
|
|
1203
1230
|
}
|
|
1204
1231
|
);
|
|
1205
|
-
},
|
|
1232
|
+
}, Qe = ({
|
|
1206
1233
|
targetRef: e,
|
|
1207
1234
|
children: t
|
|
1208
1235
|
}) => {
|
|
1209
|
-
const [r, l] =
|
|
1236
|
+
const [r, l] = R(null), n = j(null), a = () => {
|
|
1210
1237
|
const i = e.current;
|
|
1211
1238
|
if (!i) return;
|
|
1212
|
-
const
|
|
1239
|
+
const c = i.getBoundingClientRect();
|
|
1213
1240
|
l({
|
|
1214
1241
|
position: "fixed",
|
|
1215
|
-
top:
|
|
1216
|
-
left:
|
|
1217
|
-
width:
|
|
1218
|
-
height:
|
|
1242
|
+
top: c.top,
|
|
1243
|
+
left: c.left,
|
|
1244
|
+
width: c.width,
|
|
1245
|
+
height: c.height,
|
|
1219
1246
|
pointerEvents: "none",
|
|
1220
1247
|
// si le wrapper ne doit pas capter les events
|
|
1221
1248
|
zIndex: 999
|
|
1222
1249
|
// personnalise si besoin
|
|
1223
1250
|
});
|
|
1224
1251
|
};
|
|
1225
|
-
return
|
|
1252
|
+
return $(() => {
|
|
1226
1253
|
const i = e.current;
|
|
1227
1254
|
if (i)
|
|
1228
|
-
return
|
|
1229
|
-
var
|
|
1230
|
-
window.removeEventListener("scroll",
|
|
1255
|
+
return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), n.current = new ResizeObserver(a), n.current.observe(i), () => {
|
|
1256
|
+
var c;
|
|
1257
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a), (c = n.current) == null || c.disconnect();
|
|
1231
1258
|
};
|
|
1232
|
-
}, [e]), r ?
|
|
1259
|
+
}, [e]), r ? ye(/* @__PURE__ */ u("div", { style: r, children: t }), document.body) : null;
|
|
1233
1260
|
};
|
|
1234
|
-
function
|
|
1261
|
+
function Ae(e) {
|
|
1235
1262
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
|
|
1236
1263
|
}
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1264
|
+
const It = ({
|
|
1265
|
+
config: e,
|
|
1266
|
+
throttleDelay: t = 100,
|
|
1267
|
+
// Délai par défaut de 300ms
|
|
1268
|
+
onLoad: r
|
|
1269
|
+
}) => {
|
|
1270
|
+
const [l, n] = R(null), a = j(null), i = j(e.sourceColor), c = j(!0);
|
|
1271
|
+
$(() => {
|
|
1272
|
+
if (c.current) {
|
|
1273
|
+
c.current = !1, i.current = e.sourceColor, d(e.sourceColor);
|
|
1242
1274
|
return;
|
|
1243
1275
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1276
|
+
if (e.sourceColor !== i.current)
|
|
1277
|
+
return a.current && clearTimeout(a.current), a.current = setTimeout(async () => {
|
|
1278
|
+
i.current = e.sourceColor, await d(e.sourceColor), a.current = null;
|
|
1279
|
+
}, t), () => {
|
|
1280
|
+
a.current && (clearTimeout(a.current), a.current = null);
|
|
1281
|
+
};
|
|
1282
|
+
}, [e.sourceColor, t]);
|
|
1283
|
+
const d = async (o) => {
|
|
1284
|
+
if (!Ae(o))
|
|
1285
|
+
throw new Error("Invalid hex color");
|
|
1286
|
+
try {
|
|
1287
|
+
const m = await ke({
|
|
1288
|
+
...e,
|
|
1289
|
+
sourceColor: o
|
|
1290
|
+
});
|
|
1291
|
+
r == null || r(m);
|
|
1292
|
+
const h = m.plugins.getPlugin(Se).getInstance().outputCss;
|
|
1293
|
+
h && n(h);
|
|
1294
|
+
} catch (m) {
|
|
1295
|
+
throw new Error(
|
|
1296
|
+
m instanceof Error ? m.message : "Theme loading failed"
|
|
1297
|
+
);
|
|
1261
1298
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1299
|
+
};
|
|
1300
|
+
return $(() => () => {
|
|
1301
|
+
a.current && clearTimeout(a.current);
|
|
1302
|
+
}, []), l ? /* @__PURE__ */ u("style", { dangerouslySetInnerHTML: { __html: l } }) : null;
|
|
1303
|
+
}, ze = ({
|
|
1264
1304
|
variant: e = "filled",
|
|
1265
1305
|
disabled: t = !1,
|
|
1266
1306
|
icon: r,
|
|
1267
1307
|
href: l,
|
|
1268
1308
|
label: n,
|
|
1269
|
-
disableTextMargins:
|
|
1309
|
+
disableTextMargins: a,
|
|
1270
1310
|
className: i,
|
|
1271
|
-
iconPosition:
|
|
1272
|
-
loading:
|
|
1311
|
+
iconPosition: c = "left",
|
|
1312
|
+
loading: d = !1,
|
|
1273
1313
|
shape: o = "rounded",
|
|
1274
|
-
onClick:
|
|
1314
|
+
onClick: m,
|
|
1275
1315
|
onToggle: h,
|
|
1276
|
-
activated:
|
|
1316
|
+
activated: s,
|
|
1277
1317
|
ref: y,
|
|
1278
1318
|
size: v = "medium",
|
|
1279
|
-
allowShapeTransformation:
|
|
1280
|
-
transition:
|
|
1319
|
+
allowShapeTransformation: L = !0,
|
|
1320
|
+
transition: N,
|
|
1281
1321
|
children: I,
|
|
1282
1322
|
...w
|
|
1283
1323
|
}) => {
|
|
@@ -1285,38 +1325,38 @@ const Lt = ({ config: e }) => {
|
|
|
1285
1325
|
throw new Error(
|
|
1286
1326
|
"Button component requires either a label prop or children content"
|
|
1287
1327
|
);
|
|
1288
|
-
const B = l ? "a" : "button", b =
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
}, [
|
|
1328
|
+
const B = l ? "a" : "button", b = j(null), E = y || b, [C, V] = Y.useState(s);
|
|
1329
|
+
$(() => {
|
|
1330
|
+
V(s);
|
|
1331
|
+
}, [s]), N = { duration: 0.3, ...N };
|
|
1292
1332
|
let P;
|
|
1293
|
-
h ? h && (P = (
|
|
1294
|
-
t &&
|
|
1295
|
-
const O = !
|
|
1296
|
-
|
|
1297
|
-
}) : P = (
|
|
1298
|
-
t &&
|
|
1333
|
+
h ? h && (P = (M) => {
|
|
1334
|
+
t && M.preventDefault();
|
|
1335
|
+
const O = !C;
|
|
1336
|
+
V(O), h(O);
|
|
1337
|
+
}) : P = (M) => {
|
|
1338
|
+
t && M.preventDefault(), m && m(M);
|
|
1299
1339
|
};
|
|
1300
|
-
const k =
|
|
1301
|
-
allowShapeTransformation:
|
|
1340
|
+
const k = $e({
|
|
1341
|
+
allowShapeTransformation: L,
|
|
1302
1342
|
size: v,
|
|
1303
|
-
disableTextMargins:
|
|
1343
|
+
disableTextMargins: a,
|
|
1304
1344
|
shape: o,
|
|
1305
1345
|
href: l,
|
|
1306
1346
|
disabled: t,
|
|
1307
1347
|
icon: r,
|
|
1308
|
-
iconPosition:
|
|
1309
|
-
loading:
|
|
1348
|
+
iconPosition: c,
|
|
1349
|
+
loading: d,
|
|
1310
1350
|
variant: e,
|
|
1311
|
-
transition:
|
|
1351
|
+
transition: N,
|
|
1312
1352
|
className: i,
|
|
1313
|
-
isActive:
|
|
1353
|
+
isActive: C ?? !1,
|
|
1314
1354
|
onToggle: h,
|
|
1315
|
-
activated:
|
|
1355
|
+
activated: C,
|
|
1316
1356
|
label: n,
|
|
1317
1357
|
children: n
|
|
1318
|
-
}),
|
|
1319
|
-
return /* @__PURE__ */
|
|
1358
|
+
}), p = r ? /* @__PURE__ */ u(Q, { icon: r, className: k.icon }) : /* @__PURE__ */ u(te, {});
|
|
1359
|
+
return /* @__PURE__ */ D(
|
|
1320
1360
|
B,
|
|
1321
1361
|
{
|
|
1322
1362
|
ref: E,
|
|
@@ -1325,15 +1365,15 @@ const Lt = ({ config: e }) => {
|
|
|
1325
1365
|
...w,
|
|
1326
1366
|
onClick: P,
|
|
1327
1367
|
disabled: t,
|
|
1328
|
-
"aria-pressed": h ?
|
|
1329
|
-
style: { transition:
|
|
1368
|
+
"aria-pressed": h ? C : void 0,
|
|
1369
|
+
style: { transition: N.duration + "s" },
|
|
1330
1370
|
children: [
|
|
1331
1371
|
/* @__PURE__ */ u("div", { className: k.touchTarget }),
|
|
1332
1372
|
/* @__PURE__ */ u(
|
|
1333
1373
|
"div",
|
|
1334
1374
|
{
|
|
1335
1375
|
className: k.stateLayer,
|
|
1336
|
-
style: { transition:
|
|
1376
|
+
style: { transition: N.duration + "s" },
|
|
1337
1377
|
children: !t && /* @__PURE__ */ u(
|
|
1338
1378
|
ne,
|
|
1339
1379
|
{
|
|
@@ -1343,17 +1383,17 @@ const Lt = ({ config: e }) => {
|
|
|
1343
1383
|
)
|
|
1344
1384
|
}
|
|
1345
1385
|
),
|
|
1346
|
-
|
|
1347
|
-
|
|
1386
|
+
c === "left" && p,
|
|
1387
|
+
d && /* @__PURE__ */ u(
|
|
1348
1388
|
"div",
|
|
1349
1389
|
{
|
|
1350
1390
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
1351
1391
|
children: /* @__PURE__ */ u(
|
|
1352
|
-
|
|
1392
|
+
Ze,
|
|
1353
1393
|
{
|
|
1354
1394
|
className: () => ({
|
|
1355
1395
|
progressIndicator: "h-6 w-6",
|
|
1356
|
-
activeIndicator:
|
|
1396
|
+
activeIndicator: f(
|
|
1357
1397
|
{
|
|
1358
1398
|
"!stroke-primary": e === "elevated" && !t,
|
|
1359
1399
|
"!stroke-on-surface/[38%]": e === "elevated" && t
|
|
@@ -1382,162 +1422,162 @@ const Lt = ({ config: e }) => {
|
|
|
1382
1422
|
}
|
|
1383
1423
|
),
|
|
1384
1424
|
/* @__PURE__ */ u("span", { className: k.label, children: n }),
|
|
1385
|
-
|
|
1425
|
+
c === "right" && p
|
|
1386
1426
|
]
|
|
1387
1427
|
}
|
|
1388
1428
|
);
|
|
1389
|
-
},
|
|
1429
|
+
}, Et = ({
|
|
1390
1430
|
variant: e = "outlined",
|
|
1391
1431
|
className: t,
|
|
1392
1432
|
children: r,
|
|
1393
1433
|
isInteractive: l = !1,
|
|
1394
1434
|
ref: n,
|
|
1395
|
-
...
|
|
1435
|
+
...a
|
|
1396
1436
|
}) => {
|
|
1397
|
-
const i =
|
|
1398
|
-
return /* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */ u("div", { className: i.stateLayer, children: l && /* @__PURE__ */ u(ne, { colorName: "on-surface", triggerRef:
|
|
1437
|
+
const i = Pe({ className: t, isInteractive: l, variant: e, children: r }), c = j(null), d = n || c;
|
|
1438
|
+
return /* @__PURE__ */ D("div", { ...a, ref: d, className: i.card, children: [
|
|
1439
|
+
/* @__PURE__ */ u("div", { className: i.stateLayer, children: l && /* @__PURE__ */ u(ne, { colorName: "on-surface", triggerRef: d }) }),
|
|
1400
1440
|
r
|
|
1401
1441
|
] });
|
|
1402
|
-
},
|
|
1403
|
-
const [l, n] = t, [
|
|
1404
|
-
return
|
|
1405
|
-
},
|
|
1442
|
+
}, Te = (e, t, r = [0, 1]) => {
|
|
1443
|
+
const [l, n] = t, [a, i] = r, d = (Math.max(l, Math.min(e, n)) - l) / (n - l);
|
|
1444
|
+
return a + d * (i - a);
|
|
1445
|
+
}, et = ({
|
|
1406
1446
|
className: e,
|
|
1407
1447
|
children: t,
|
|
1408
1448
|
width: r = 1,
|
|
1409
1449
|
index: l = 0,
|
|
1410
1450
|
ref: n,
|
|
1411
|
-
...
|
|
1451
|
+
...a
|
|
1412
1452
|
}) => {
|
|
1413
|
-
const i =
|
|
1453
|
+
const i = j(null), c = n || i, d = We({
|
|
1414
1454
|
className: e,
|
|
1415
1455
|
index: l,
|
|
1416
1456
|
width: r,
|
|
1417
1457
|
children: t
|
|
1418
1458
|
});
|
|
1419
1459
|
return /* @__PURE__ */ u(
|
|
1420
|
-
|
|
1460
|
+
U.div,
|
|
1421
1461
|
{
|
|
1422
|
-
ref:
|
|
1462
|
+
ref: c,
|
|
1423
1463
|
animate: { width: r + "px" },
|
|
1424
1464
|
transition: {
|
|
1425
1465
|
duration: 0.5,
|
|
1426
1466
|
ease: "linear"
|
|
1427
1467
|
},
|
|
1428
|
-
className:
|
|
1429
|
-
...
|
|
1468
|
+
className: d.carouselItem,
|
|
1469
|
+
...a,
|
|
1430
1470
|
children: t
|
|
1431
1471
|
}
|
|
1432
1472
|
);
|
|
1433
|
-
},
|
|
1473
|
+
}, kt = ({
|
|
1434
1474
|
variant: e = "hero",
|
|
1435
1475
|
className: t,
|
|
1436
1476
|
children: r,
|
|
1437
1477
|
ref: l,
|
|
1438
1478
|
marginPourcent: n = 0,
|
|
1439
|
-
inputRange:
|
|
1479
|
+
inputRange: a = [0.21, 0.65],
|
|
1440
1480
|
outputRange: i = [42, 300],
|
|
1441
|
-
gap:
|
|
1442
|
-
onChange:
|
|
1481
|
+
gap: c = 8,
|
|
1482
|
+
onChange: d,
|
|
1443
1483
|
scrollSensitivity: o = 1.25,
|
|
1444
|
-
...
|
|
1484
|
+
...m
|
|
1445
1485
|
}) => {
|
|
1446
|
-
var q,
|
|
1447
|
-
const h =
|
|
1486
|
+
var q, z;
|
|
1487
|
+
const h = j(null), s = l || h, y = De({
|
|
1448
1488
|
className: t,
|
|
1449
1489
|
children: r,
|
|
1450
1490
|
variant: e,
|
|
1451
|
-
inputRange:
|
|
1491
|
+
inputRange: a,
|
|
1452
1492
|
outputRange: i,
|
|
1453
1493
|
marginPourcent: n,
|
|
1454
|
-
onChange:
|
|
1455
|
-
gap:
|
|
1494
|
+
onChange: d,
|
|
1495
|
+
gap: c,
|
|
1456
1496
|
scrollSensitivity: o
|
|
1457
1497
|
}), v = Y.Children.toArray(r).filter(
|
|
1458
|
-
(g) => Y.isValidElement(g) && g.type ===
|
|
1459
|
-
),
|
|
1460
|
-
var
|
|
1461
|
-
if (!
|
|
1498
|
+
(g) => Y.isValidElement(g) && g.type === et
|
|
1499
|
+
), L = j(null), [N, I] = R([]), [w, B] = R(null), b = () => {
|
|
1500
|
+
var X;
|
|
1501
|
+
if (!L.current || !s.current || !w) return [];
|
|
1462
1502
|
const { scrollVisible: g, scrollProgress: x } = w;
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1465
|
-
(T) => (T - J) / Math.abs(
|
|
1503
|
+
function W(H, J) {
|
|
1504
|
+
return H.map(
|
|
1505
|
+
(T) => (T - J) / Math.abs(H[1] - H[0])
|
|
1466
1506
|
);
|
|
1467
1507
|
}
|
|
1468
|
-
let F = v.map((
|
|
1469
|
-
if (!E[J].current || !
|
|
1470
|
-
let
|
|
1471
|
-
return
|
|
1508
|
+
let F = v.map((H, J) => {
|
|
1509
|
+
if (!E[J].current || !L.current) return 0;
|
|
1510
|
+
let re = J / (v.length - 1);
|
|
1511
|
+
return re > 1 && (re = 1), re < 0 && (re = 0), re;
|
|
1472
1512
|
});
|
|
1473
|
-
F =
|
|
1474
|
-
let
|
|
1475
|
-
return F.map((
|
|
1476
|
-
J === 0 &&
|
|
1477
|
-
let T =
|
|
1478
|
-
T < i[0] && (T = i[0]),
|
|
1513
|
+
F = W(F, x);
|
|
1514
|
+
let S = ((((X = s.current) == null ? void 0 : X.clientWidth) ?? g) - (i[0] + c)) / (i[1] + c);
|
|
1515
|
+
return F.map((H, J) => ({ value: Math.abs(H), originalIndex: J })).sort((H, J) => H.value - J.value).forEach((H, J) => {
|
|
1516
|
+
J === 0 && V(H.originalIndex);
|
|
1517
|
+
let T = Te(S, [0, 1], [0, i[1]]);
|
|
1518
|
+
T < i[0] && (T = i[0]), S--, F[H.originalIndex] = T;
|
|
1479
1519
|
}), F;
|
|
1480
|
-
}, E =
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
}, [
|
|
1520
|
+
}, E = j([]).current, [C, V] = R(0);
|
|
1521
|
+
$(() => {
|
|
1522
|
+
d && d(C);
|
|
1523
|
+
}, [C]), E.length !== v.length && v.forEach((g, x) => {
|
|
1484
1524
|
E[x] || (E[x] = Y.createRef());
|
|
1485
1525
|
});
|
|
1486
1526
|
const P = v.map((g, x) => Y.cloneElement(
|
|
1487
1527
|
g,
|
|
1488
1528
|
{
|
|
1489
|
-
width:
|
|
1529
|
+
width: N[x],
|
|
1490
1530
|
ref: E[x],
|
|
1491
1531
|
key: x,
|
|
1492
1532
|
index: x
|
|
1493
1533
|
}
|
|
1494
|
-
)), k =
|
|
1534
|
+
)), k = he((w == null ? void 0 : w.scrollProgress) ?? 0), p = oe(
|
|
1495
1535
|
k,
|
|
1496
1536
|
[0, 1],
|
|
1497
1537
|
[
|
|
1498
1538
|
0,
|
|
1499
|
-
1 - (((q =
|
|
1539
|
+
1 - (((q = s.current) == null ? void 0 : q.clientWidth) ?? 0) / (((z = L == null ? void 0 : L.current) == null ? void 0 : z.clientWidth) ?? 0)
|
|
1500
1540
|
]
|
|
1501
|
-
),
|
|
1502
|
-
|
|
1541
|
+
), M = oe(
|
|
1542
|
+
p,
|
|
1503
1543
|
(g) => `${-g * 100}%`
|
|
1504
1544
|
), O = (g) => {
|
|
1505
1545
|
g.scrollTotal > 0 && B(g);
|
|
1506
1546
|
};
|
|
1507
|
-
|
|
1547
|
+
$(() => {
|
|
1508
1548
|
const g = b();
|
|
1509
1549
|
I(g);
|
|
1510
1550
|
}, [w]);
|
|
1511
|
-
const [
|
|
1512
|
-
return
|
|
1551
|
+
const [K, Z] = R(0);
|
|
1552
|
+
return pe(() => {
|
|
1513
1553
|
let g = i[1];
|
|
1514
1554
|
w && g > w.scrollVisible && (g = w.scrollVisible);
|
|
1515
|
-
const x = (g +
|
|
1555
|
+
const x = (g + c) * P.length / o;
|
|
1516
1556
|
Z(x);
|
|
1517
|
-
}, [
|
|
1518
|
-
|
|
1557
|
+
}, [s, E, w]), /* @__PURE__ */ u("div", { className: y.carousel, ref: s, ...m, children: /* @__PURE__ */ u(
|
|
1558
|
+
ge,
|
|
1519
1559
|
{
|
|
1520
1560
|
draggable: !0,
|
|
1521
1561
|
orientation: "horizontal",
|
|
1522
1562
|
onScroll: O,
|
|
1523
|
-
scrollSize:
|
|
1563
|
+
scrollSize: K,
|
|
1524
1564
|
children: /* @__PURE__ */ u(
|
|
1525
|
-
|
|
1565
|
+
U.div,
|
|
1526
1566
|
{
|
|
1527
1567
|
className: y.track,
|
|
1528
|
-
ref:
|
|
1568
|
+
ref: L,
|
|
1529
1569
|
style: {
|
|
1530
1570
|
transitionDuration: "0.5s",
|
|
1531
1571
|
transitionTimingFunction: "ease-out",
|
|
1532
|
-
gap: `${
|
|
1533
|
-
x:
|
|
1572
|
+
gap: `${c}px`,
|
|
1573
|
+
x: M
|
|
1534
1574
|
},
|
|
1535
1575
|
children: P
|
|
1536
1576
|
}
|
|
1537
1577
|
)
|
|
1538
1578
|
}
|
|
1539
1579
|
) });
|
|
1540
|
-
},
|
|
1580
|
+
}, tt = ({
|
|
1541
1581
|
orientation: e = "horizontal",
|
|
1542
1582
|
className: t,
|
|
1543
1583
|
...r
|
|
@@ -1547,129 +1587,129 @@ const Lt = ({ config: e }) => {
|
|
|
1547
1587
|
}, G = [];
|
|
1548
1588
|
for (let e = 0; e < 256; ++e)
|
|
1549
1589
|
G.push((e + 256).toString(16).slice(1));
|
|
1550
|
-
function
|
|
1590
|
+
function rt(e, t = 0) {
|
|
1551
1591
|
return (G[e[t + 0]] + G[e[t + 1]] + G[e[t + 2]] + G[e[t + 3]] + "-" + G[e[t + 4]] + G[e[t + 5]] + "-" + G[e[t + 6]] + G[e[t + 7]] + "-" + G[e[t + 8]] + G[e[t + 9]] + "-" + G[e[t + 10]] + G[e[t + 11]] + G[e[t + 12]] + G[e[t + 13]] + G[e[t + 14]] + G[e[t + 15]]).toLowerCase();
|
|
1552
1592
|
}
|
|
1553
1593
|
let ae;
|
|
1554
|
-
const
|
|
1555
|
-
function
|
|
1594
|
+
const nt = new Uint8Array(16);
|
|
1595
|
+
function lt() {
|
|
1556
1596
|
if (!ae) {
|
|
1557
1597
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1558
1598
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1559
1599
|
ae = crypto.getRandomValues.bind(crypto);
|
|
1560
1600
|
}
|
|
1561
|
-
return ae(
|
|
1601
|
+
return ae(nt);
|
|
1562
1602
|
}
|
|
1563
|
-
const
|
|
1603
|
+
const ot = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), de = { randomUUID: ot };
|
|
1564
1604
|
function ce(e, t, r) {
|
|
1565
1605
|
var n;
|
|
1566
|
-
if (
|
|
1567
|
-
return
|
|
1606
|
+
if (de.randomUUID && !e)
|
|
1607
|
+
return de.randomUUID();
|
|
1568
1608
|
e = e || {};
|
|
1569
|
-
const l = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ??
|
|
1609
|
+
const l = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? lt();
|
|
1570
1610
|
if (l.length < 16)
|
|
1571
1611
|
throw new Error("Random bytes length must be >= 16");
|
|
1572
|
-
return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128,
|
|
1612
|
+
return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, rt(l);
|
|
1573
1613
|
}
|
|
1574
|
-
const
|
|
1614
|
+
const we = ({
|
|
1575
1615
|
variant: e = "plain",
|
|
1576
1616
|
buttons: t,
|
|
1577
1617
|
className: r,
|
|
1578
1618
|
children: l,
|
|
1579
1619
|
title: n,
|
|
1580
|
-
text:
|
|
1620
|
+
text: a,
|
|
1581
1621
|
position: i,
|
|
1582
|
-
targetRef:
|
|
1583
|
-
ref:
|
|
1622
|
+
targetRef: c,
|
|
1623
|
+
ref: d,
|
|
1584
1624
|
trigger: o = ["hover", "focus"],
|
|
1585
|
-
...
|
|
1625
|
+
...m
|
|
1586
1626
|
}) => {
|
|
1587
|
-
if (!l && !
|
|
1627
|
+
if (!l && !c)
|
|
1588
1628
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
1589
1629
|
Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
|
|
1590
|
-
const h =
|
|
1591
|
-
|
|
1592
|
-
const
|
|
1593
|
-
v(
|
|
1630
|
+
const h = j(null), s = c || h, [y, v] = R(null), [L] = R(ce()), [N, I] = R(!1), w = j(null);
|
|
1631
|
+
$(() => {
|
|
1632
|
+
const p = (M) => {
|
|
1633
|
+
v(M.detail);
|
|
1594
1634
|
};
|
|
1595
|
-
return document.addEventListener("tooltip-update",
|
|
1635
|
+
return document.addEventListener("tooltip-update", p), () => {
|
|
1596
1636
|
document.removeEventListener(
|
|
1597
1637
|
"tooltip-update",
|
|
1598
|
-
|
|
1638
|
+
p
|
|
1599
1639
|
);
|
|
1600
1640
|
};
|
|
1601
|
-
}, []),
|
|
1602
|
-
w.current && clearTimeout(w.current), y ? I(y ===
|
|
1641
|
+
}, []), $(() => {
|
|
1642
|
+
w.current && clearTimeout(w.current), y ? I(y === L) : w.current = setTimeout(() => {
|
|
1603
1643
|
I(!1);
|
|
1604
1644
|
}, 1200);
|
|
1605
|
-
}, [y,
|
|
1645
|
+
}, [y, L]);
|
|
1606
1646
|
const B = () => {
|
|
1607
1647
|
if (o.includes("hover")) {
|
|
1608
|
-
const
|
|
1609
|
-
document.dispatchEvent(
|
|
1648
|
+
const p = new CustomEvent("tooltip-update", { detail: L });
|
|
1649
|
+
document.dispatchEvent(p);
|
|
1610
1650
|
}
|
|
1611
1651
|
}, b = () => {
|
|
1612
1652
|
if (o.includes("hover")) {
|
|
1613
|
-
const
|
|
1614
|
-
document.dispatchEvent(
|
|
1653
|
+
const p = new CustomEvent("tooltip-update", { detail: null });
|
|
1654
|
+
document.dispatchEvent(p);
|
|
1615
1655
|
}
|
|
1616
1656
|
}, E = () => {
|
|
1617
1657
|
if (o.includes("click")) {
|
|
1618
|
-
const
|
|
1619
|
-
detail:
|
|
1658
|
+
const p = new CustomEvent("tooltip-update", {
|
|
1659
|
+
detail: N ? null : L
|
|
1620
1660
|
});
|
|
1621
|
-
document.dispatchEvent(
|
|
1661
|
+
document.dispatchEvent(p);
|
|
1622
1662
|
}
|
|
1623
|
-
},
|
|
1663
|
+
}, C = () => {
|
|
1624
1664
|
if (o.includes("focus")) {
|
|
1625
|
-
const
|
|
1626
|
-
document.dispatchEvent(
|
|
1665
|
+
const p = new CustomEvent("tooltip-update", { detail: L });
|
|
1666
|
+
document.dispatchEvent(p);
|
|
1627
1667
|
}
|
|
1628
|
-
},
|
|
1668
|
+
}, V = () => {
|
|
1629
1669
|
if (o.includes("focus")) {
|
|
1630
|
-
const
|
|
1631
|
-
document.dispatchEvent(
|
|
1670
|
+
const p = new CustomEvent("tooltip-update", { detail: null });
|
|
1671
|
+
document.dispatchEvent(p);
|
|
1632
1672
|
}
|
|
1633
1673
|
};
|
|
1634
|
-
|
|
1635
|
-
if (
|
|
1636
|
-
const
|
|
1637
|
-
return
|
|
1638
|
-
|
|
1674
|
+
$(() => {
|
|
1675
|
+
if (s != null && s.current) {
|
|
1676
|
+
const p = s.current;
|
|
1677
|
+
return p.addEventListener("mouseenter", B), p.addEventListener("mouseleave", b), p.addEventListener("click", E), p.addEventListener("focus", C), p.addEventListener("blur", V), () => {
|
|
1678
|
+
p.removeEventListener("mouseenter", B), p.removeEventListener("mouseleave", b), p.removeEventListener("click", E), p.removeEventListener("focus", C), p.removeEventListener("blur", V);
|
|
1639
1679
|
};
|
|
1640
1680
|
}
|
|
1641
|
-
}, [
|
|
1642
|
-
const P = !
|
|
1643
|
-
if (!i && typeof window < "u" &&
|
|
1644
|
-
const
|
|
1645
|
-
e === "plain" ?
|
|
1681
|
+
}, [s, o, L, N]);
|
|
1682
|
+
const P = !c && ee(l) ? le(l, { ref: h }) : l;
|
|
1683
|
+
if (!i && typeof window < "u" && s != null && s.current && !i) {
|
|
1684
|
+
const p = s.current.getBoundingClientRect(), M = window.innerWidth, O = window.innerHeight, K = p.left / M, Z = p.top / O;
|
|
1685
|
+
e === "plain" ? K < 1 / 3 ? i = "right" : K > 2 / 3 ? i = "left" : i = Z > 0.5 ? "top" : "bottom" : K < 1 / 2 && Z < 1 / 2 ? i = "bottom-right" : K > 1 / 2 && Z < 1 / 2 ? i = "bottom-left" : K > 1 / 2 && Z > 1 / 2 ? i = "top-left" : K < 1 / 2 && Z > 1 / 2 && (i = "top-right");
|
|
1646
1686
|
}
|
|
1647
|
-
const k =
|
|
1687
|
+
const k = Ye({
|
|
1648
1688
|
variant: e,
|
|
1649
1689
|
buttons: t,
|
|
1650
1690
|
className: r,
|
|
1651
1691
|
title: n,
|
|
1652
|
-
text:
|
|
1692
|
+
text: a,
|
|
1653
1693
|
position: i,
|
|
1654
1694
|
trigger: o,
|
|
1655
|
-
targetRef:
|
|
1695
|
+
targetRef: c,
|
|
1656
1696
|
children: l
|
|
1657
1697
|
});
|
|
1658
|
-
return /* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ D(te, { children: [
|
|
1659
1699
|
P,
|
|
1660
|
-
/* @__PURE__ */ u(
|
|
1661
|
-
|
|
1700
|
+
/* @__PURE__ */ u(A, { children: N && /* @__PURE__ */ u(Qe, { targetRef: s, children: /* @__PURE__ */ u(
|
|
1701
|
+
U.div,
|
|
1662
1702
|
{
|
|
1663
1703
|
initial: { opacity: y ? 1 : 0 },
|
|
1664
1704
|
animate: { opacity: 1 },
|
|
1665
1705
|
transition: { duration: y ? 0 : 0.3 },
|
|
1666
1706
|
exit: { opacity: y ? 1 : 0 },
|
|
1667
1707
|
className: k.toolTip,
|
|
1668
|
-
...
|
|
1708
|
+
...m,
|
|
1669
1709
|
onMouseEnter: B,
|
|
1670
1710
|
onMouseLeave: b,
|
|
1671
|
-
children: /* @__PURE__ */
|
|
1672
|
-
|
|
1711
|
+
children: /* @__PURE__ */ D(
|
|
1712
|
+
U.div,
|
|
1673
1713
|
{
|
|
1674
1714
|
className: k.container,
|
|
1675
1715
|
layoutId: "tool-tip",
|
|
@@ -1680,15 +1720,15 @@ const ye = ({
|
|
|
1680
1720
|
},
|
|
1681
1721
|
children: [
|
|
1682
1722
|
n && /* @__PURE__ */ u("div", { className: k.subHead, children: n }),
|
|
1683
|
-
/* @__PURE__ */ u("div", { className: k.supportingText, children:
|
|
1684
|
-
t && /* @__PURE__ */ u("div", { className: k.actions, children: Array.isArray(t) && t.map((
|
|
1685
|
-
|
|
1723
|
+
/* @__PURE__ */ u("div", { className: k.supportingText, children: a }),
|
|
1724
|
+
t && /* @__PURE__ */ u("div", { className: k.actions, children: Array.isArray(t) && t.map((p, M) => /* @__PURE__ */ u(
|
|
1725
|
+
ze,
|
|
1686
1726
|
{
|
|
1687
1727
|
size: "small",
|
|
1688
1728
|
variant: "text",
|
|
1689
|
-
...
|
|
1729
|
+
...p
|
|
1690
1730
|
},
|
|
1691
|
-
|
|
1731
|
+
M
|
|
1692
1732
|
)) })
|
|
1693
1733
|
]
|
|
1694
1734
|
}
|
|
@@ -1696,28 +1736,28 @@ const ye = ({
|
|
|
1696
1736
|
}
|
|
1697
1737
|
) }) })
|
|
1698
1738
|
] });
|
|
1699
|
-
},
|
|
1739
|
+
}, fe = ({
|
|
1700
1740
|
className: e,
|
|
1701
1741
|
label: t,
|
|
1702
1742
|
variant: r = "primary",
|
|
1703
1743
|
size: l = "medium",
|
|
1704
1744
|
href: n,
|
|
1705
|
-
type:
|
|
1745
|
+
type: a,
|
|
1706
1746
|
icon: i,
|
|
1707
|
-
isExtended:
|
|
1708
|
-
ref:
|
|
1747
|
+
isExtended: c = !1,
|
|
1748
|
+
ref: d,
|
|
1709
1749
|
transition: o,
|
|
1710
|
-
children:
|
|
1750
|
+
children: m,
|
|
1711
1751
|
...h
|
|
1712
1752
|
}) => {
|
|
1713
|
-
if (
|
|
1753
|
+
if (m && (t = m), !t)
|
|
1714
1754
|
throw new Error(
|
|
1715
1755
|
"FAB component requires either a label prop or children content"
|
|
1716
1756
|
);
|
|
1717
|
-
const
|
|
1757
|
+
const s = n ? "a" : "button", y = je({
|
|
1718
1758
|
href: n,
|
|
1719
1759
|
icon: i,
|
|
1720
|
-
isExtended:
|
|
1760
|
+
isExtended: c,
|
|
1721
1761
|
label: t,
|
|
1722
1762
|
size: l,
|
|
1723
1763
|
variant: r,
|
|
@@ -1726,7 +1766,7 @@ const ye = ({
|
|
|
1726
1766
|
children: t
|
|
1727
1767
|
});
|
|
1728
1768
|
o = { duration: 0.3, ...o };
|
|
1729
|
-
const v =
|
|
1769
|
+
const v = j(null), L = d || v, N = {
|
|
1730
1770
|
visible: {
|
|
1731
1771
|
width: "auto",
|
|
1732
1772
|
marginLeft: 12,
|
|
@@ -1752,40 +1792,40 @@ const ye = ({
|
|
|
1752
1792
|
}
|
|
1753
1793
|
}
|
|
1754
1794
|
};
|
|
1755
|
-
return /* @__PURE__ */
|
|
1756
|
-
|
|
1795
|
+
return /* @__PURE__ */ D(
|
|
1796
|
+
s,
|
|
1757
1797
|
{
|
|
1758
1798
|
...h,
|
|
1759
|
-
ref:
|
|
1799
|
+
ref: L,
|
|
1760
1800
|
href: n,
|
|
1761
|
-
"aria-label":
|
|
1801
|
+
"aria-label": c ? void 0 : t,
|
|
1762
1802
|
className: y.fab,
|
|
1763
1803
|
children: [
|
|
1764
1804
|
/* @__PURE__ */ u(
|
|
1765
|
-
|
|
1805
|
+
we,
|
|
1766
1806
|
{
|
|
1767
|
-
trigger:
|
|
1807
|
+
trigger: c ? null : void 0,
|
|
1768
1808
|
text: t,
|
|
1769
|
-
targetRef:
|
|
1809
|
+
targetRef: L
|
|
1770
1810
|
}
|
|
1771
1811
|
),
|
|
1772
1812
|
/* @__PURE__ */ u("span", { className: y.stateLayer, children: /* @__PURE__ */ u(
|
|
1773
1813
|
ne,
|
|
1774
1814
|
{
|
|
1775
|
-
colorName:
|
|
1815
|
+
colorName: f({
|
|
1776
1816
|
primary: r == "surface",
|
|
1777
1817
|
"on-primary-container": r == "primary",
|
|
1778
1818
|
"on-secondary-container": r == "secondary",
|
|
1779
1819
|
"on-tertiary-container": r == "tertiary"
|
|
1780
1820
|
}),
|
|
1781
|
-
triggerRef:
|
|
1821
|
+
triggerRef: L
|
|
1782
1822
|
}
|
|
1783
1823
|
) }),
|
|
1784
1824
|
/* @__PURE__ */ u(Q, { icon: i, className: y.icon }),
|
|
1785
|
-
/* @__PURE__ */ u(
|
|
1786
|
-
|
|
1825
|
+
/* @__PURE__ */ u(A, { children: c && /* @__PURE__ */ u(
|
|
1826
|
+
U.span,
|
|
1787
1827
|
{
|
|
1788
|
-
variants:
|
|
1828
|
+
variants: N,
|
|
1789
1829
|
initial: "hidden",
|
|
1790
1830
|
animate: "visible",
|
|
1791
1831
|
exit: "hidden",
|
|
@@ -1796,78 +1836,78 @@ const ye = ({
|
|
|
1796
1836
|
]
|
|
1797
1837
|
}
|
|
1798
1838
|
);
|
|
1799
|
-
},
|
|
1839
|
+
}, ie = ({
|
|
1800
1840
|
variant: e = "standard",
|
|
1801
1841
|
href: t,
|
|
1802
1842
|
disabled: r = !1,
|
|
1803
1843
|
type: l = "button",
|
|
1804
1844
|
title: n,
|
|
1805
|
-
label:
|
|
1845
|
+
label: a,
|
|
1806
1846
|
onToggle: i,
|
|
1807
|
-
activated:
|
|
1808
|
-
onClick:
|
|
1847
|
+
activated: c = !1,
|
|
1848
|
+
onClick: d,
|
|
1809
1849
|
icon: o,
|
|
1810
|
-
size:
|
|
1850
|
+
size: m = "medium",
|
|
1811
1851
|
iconSelected: h,
|
|
1812
|
-
className:
|
|
1852
|
+
className: s,
|
|
1813
1853
|
ref: y,
|
|
1814
1854
|
width: v = "default",
|
|
1815
|
-
shape:
|
|
1816
|
-
allowShapeTransformation:
|
|
1855
|
+
shape: L = "rounded",
|
|
1856
|
+
allowShapeTransformation: N = !0,
|
|
1817
1857
|
transition: I,
|
|
1818
1858
|
children: w,
|
|
1819
1859
|
...B
|
|
1820
1860
|
}) => {
|
|
1821
|
-
if (w && (
|
|
1861
|
+
if (w && (a = w), !a)
|
|
1822
1862
|
throw new Error(
|
|
1823
1863
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
1824
1864
|
);
|
|
1825
|
-
n || (n =
|
|
1826
|
-
const [b, E] = Y.useState(
|
|
1827
|
-
let
|
|
1828
|
-
i ? i && (
|
|
1829
|
-
r &&
|
|
1830
|
-
}, o = b && h || o) :
|
|
1831
|
-
r &&
|
|
1832
|
-
},
|
|
1833
|
-
E(
|
|
1834
|
-
}, [
|
|
1835
|
-
const
|
|
1865
|
+
n || (n = a);
|
|
1866
|
+
const [b, E] = Y.useState(c);
|
|
1867
|
+
let C;
|
|
1868
|
+
i ? i && (C = (M) => {
|
|
1869
|
+
r && M.preventDefault(), E(!b), i(!!b);
|
|
1870
|
+
}, o = b && h || o) : C = (M) => {
|
|
1871
|
+
r && M.preventDefault(), d && d(M);
|
|
1872
|
+
}, $(() => {
|
|
1873
|
+
E(c);
|
|
1874
|
+
}, [c]);
|
|
1875
|
+
const V = t ? "a" : "button", P = Ue({
|
|
1836
1876
|
transition: I,
|
|
1837
|
-
shape:
|
|
1838
|
-
allowShapeTransformation:
|
|
1877
|
+
shape: L,
|
|
1878
|
+
allowShapeTransformation: N,
|
|
1839
1879
|
width: v,
|
|
1840
1880
|
href: t,
|
|
1841
1881
|
activated: b,
|
|
1842
|
-
label:
|
|
1882
|
+
label: a,
|
|
1843
1883
|
iconSelected: h,
|
|
1844
1884
|
isActive: b,
|
|
1845
1885
|
onToggle: i,
|
|
1846
1886
|
disabled: r,
|
|
1847
1887
|
icon: o,
|
|
1848
1888
|
variant: e,
|
|
1849
|
-
className:
|
|
1850
|
-
size:
|
|
1851
|
-
children:
|
|
1889
|
+
className: s,
|
|
1890
|
+
size: m,
|
|
1891
|
+
children: a,
|
|
1852
1892
|
...B
|
|
1853
|
-
}), k =
|
|
1854
|
-
return I = { duration: 0.3, ...I }, /* @__PURE__ */
|
|
1855
|
-
|
|
1893
|
+
}), k = j(null), p = y || k;
|
|
1894
|
+
return I = { duration: 0.3, ...I }, /* @__PURE__ */ D(
|
|
1895
|
+
V,
|
|
1856
1896
|
{
|
|
1857
1897
|
disabled: r,
|
|
1858
1898
|
href: t,
|
|
1859
1899
|
style: { transition: I.duration + "s" },
|
|
1860
1900
|
className: P.iconButton,
|
|
1861
|
-
"aria-label":
|
|
1901
|
+
"aria-label": a,
|
|
1862
1902
|
...B,
|
|
1863
1903
|
title: void 0,
|
|
1864
|
-
onClick:
|
|
1865
|
-
ref:
|
|
1904
|
+
onClick: C,
|
|
1905
|
+
ref: p,
|
|
1866
1906
|
children: [
|
|
1867
1907
|
/* @__PURE__ */ u(
|
|
1868
|
-
|
|
1908
|
+
we,
|
|
1869
1909
|
{
|
|
1870
|
-
targetRef:
|
|
1910
|
+
targetRef: p,
|
|
1871
1911
|
trigger: r ? null : void 0,
|
|
1872
1912
|
text: n
|
|
1873
1913
|
}
|
|
@@ -1881,7 +1921,7 @@ const ye = ({
|
|
|
1881
1921
|
children: !r && /* @__PURE__ */ u(
|
|
1882
1922
|
ne,
|
|
1883
1923
|
{
|
|
1884
|
-
colorName:
|
|
1924
|
+
colorName: f(
|
|
1885
1925
|
e === "standard" && {
|
|
1886
1926
|
"on-surface-variant": !b,
|
|
1887
1927
|
primary: b
|
|
@@ -1899,7 +1939,7 @@ const ye = ({
|
|
|
1899
1939
|
"on-primary": b
|
|
1900
1940
|
}
|
|
1901
1941
|
),
|
|
1902
|
-
triggerRef:
|
|
1942
|
+
triggerRef: p
|
|
1903
1943
|
}
|
|
1904
1944
|
)
|
|
1905
1945
|
}
|
|
@@ -1908,15 +1948,15 @@ const ye = ({
|
|
|
1908
1948
|
]
|
|
1909
1949
|
}
|
|
1910
1950
|
);
|
|
1911
|
-
},
|
|
1951
|
+
}, St = ({
|
|
1912
1952
|
className: e,
|
|
1913
1953
|
valueFormatter: t,
|
|
1914
1954
|
step: r = 10,
|
|
1915
1955
|
name: l,
|
|
1916
1956
|
value: n = 0,
|
|
1917
|
-
min:
|
|
1957
|
+
min: a = 0,
|
|
1918
1958
|
max: i = 100,
|
|
1919
|
-
marks:
|
|
1959
|
+
marks: c = [
|
|
1920
1960
|
{
|
|
1921
1961
|
value: 0,
|
|
1922
1962
|
label: "0"
|
|
@@ -1926,30 +1966,30 @@ const ye = ({
|
|
|
1926
1966
|
label: "100"
|
|
1927
1967
|
}
|
|
1928
1968
|
],
|
|
1929
|
-
ref:
|
|
1969
|
+
ref: d,
|
|
1930
1970
|
onChange: o,
|
|
1931
|
-
...
|
|
1971
|
+
...m
|
|
1932
1972
|
}) => {
|
|
1933
1973
|
const h = (g) => {
|
|
1934
|
-
const x = y(),
|
|
1935
|
-
return g === 1 / 0 ? 100 : g === -1 / 0 ? 0 : (g - x) / (
|
|
1936
|
-
},
|
|
1974
|
+
const x = y(), W = s();
|
|
1975
|
+
return g === 1 / 0 ? 100 : g === -1 / 0 ? 0 : (g - x) / (W - x) * 100;
|
|
1976
|
+
}, s = (g = !1) => g ? i : i == 1 / 0 ? c[(c == null ? void 0 : c.length) - 1].value : i, y = (g = !1) => g ? a : a == -1 / 0 ? c[0].value : a, v = (g) => {
|
|
1937
1977
|
const x = y(!1);
|
|
1938
|
-
return (
|
|
1939
|
-
}, [
|
|
1940
|
-
P(!0),
|
|
1941
|
-
},
|
|
1942
|
-
P(!1),
|
|
1978
|
+
return (s(!1) - x) * g / 100 + x;
|
|
1979
|
+
}, [L, N] = R(!1), I = j(null), w = d || I, [B, b] = R(n), [E, C] = R(h(n)), [V, P] = R(!1), k = (g) => {
|
|
1980
|
+
P(!0), N(!0), O(g);
|
|
1981
|
+
}, p = () => {
|
|
1982
|
+
P(!1), N(!1);
|
|
1943
1983
|
};
|
|
1944
|
-
|
|
1945
|
-
window.removeEventListener("mouseup",
|
|
1946
|
-
}), [
|
|
1947
|
-
const
|
|
1984
|
+
$(() => (V ? (window.addEventListener("mouseup", p), window.addEventListener("mousemove", O), window.addEventListener("touchend", p), window.addEventListener("touchmove", O)) : (window.removeEventListener("mouseup", p), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", p), window.removeEventListener("touchmove", O)), () => {
|
|
1985
|
+
window.removeEventListener("mouseup", p), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", p), window.removeEventListener("touchmove", O);
|
|
1986
|
+
}), [V]);
|
|
1987
|
+
const M = He({
|
|
1948
1988
|
className: e,
|
|
1949
|
-
isChanging:
|
|
1950
|
-
marks:
|
|
1989
|
+
isChanging: L,
|
|
1990
|
+
marks: c,
|
|
1951
1991
|
max: i,
|
|
1952
|
-
min:
|
|
1992
|
+
min: a,
|
|
1953
1993
|
name: l,
|
|
1954
1994
|
step: r,
|
|
1955
1995
|
value: B,
|
|
@@ -1958,48 +1998,48 @@ const ye = ({
|
|
|
1958
1998
|
}), O = (g) => {
|
|
1959
1999
|
const x = w == null ? void 0 : w.current;
|
|
1960
2000
|
if (x) {
|
|
1961
|
-
const
|
|
1962
|
-
|
|
2001
|
+
const W = x.getBoundingClientRect().left, S = ((g.type === "touchmove" || g.type === "touchstart" ? g.touches[0].clientX : g.clientX) - W) / x.offsetWidth * 100;
|
|
2002
|
+
K({ pourcent: S });
|
|
1963
2003
|
}
|
|
1964
|
-
},
|
|
2004
|
+
}, K = ({
|
|
1965
2005
|
pourcent: g,
|
|
1966
2006
|
value: x
|
|
1967
2007
|
}) => {
|
|
1968
2008
|
if (g) {
|
|
1969
2009
|
if (g >= 100) {
|
|
1970
|
-
b(
|
|
2010
|
+
b(s(!0)), C(100);
|
|
1971
2011
|
return;
|
|
1972
2012
|
}
|
|
1973
2013
|
if (g <= 0) {
|
|
1974
|
-
b(y(!0)),
|
|
2014
|
+
b(y(!0)), C(0);
|
|
1975
2015
|
return;
|
|
1976
2016
|
}
|
|
1977
|
-
x = v(g), x == y() && (x = y(!0)), x ==
|
|
2017
|
+
x = v(g), x == y() && (x = y(!0)), x == s() && (x = s(!0));
|
|
1978
2018
|
} else if (x != null) {
|
|
1979
|
-
if (x >=
|
|
1980
|
-
b(
|
|
2019
|
+
if (x >= s()) {
|
|
2020
|
+
b(s(!0)), C(100);
|
|
1981
2021
|
return;
|
|
1982
2022
|
}
|
|
1983
2023
|
if (x <= y()) {
|
|
1984
|
-
b(y(!0)),
|
|
2024
|
+
b(y(!0)), C(0);
|
|
1985
2025
|
return;
|
|
1986
2026
|
}
|
|
1987
2027
|
g = h(x);
|
|
1988
2028
|
} else
|
|
1989
2029
|
return;
|
|
1990
|
-
r != null ? x = Math.round((x - y()) / r) * r + y() :
|
|
1991
|
-
let
|
|
1992
|
-
return
|
|
1993
|
-
}).value), x >=
|
|
1994
|
-
}, [Z, q] =
|
|
1995
|
-
return
|
|
2030
|
+
r != null ? x = Math.round((x - y()) / r) * r + y() : c && (x = c.reduce((W, F, S) => {
|
|
2031
|
+
let X = F.value === 1 / 0 ? s() : F.value === -1 / 0 ? y() : F.value, H = W.value === 1 / 0 ? s() : W.value === -1 / 0 ? y() : W.value;
|
|
2032
|
+
return X = Math.abs(X - x), H = Math.abs(H - x), X < H ? F : W;
|
|
2033
|
+
}).value), x >= s() && (x = s(!0)), x <= y() && (x = y(!0)), g = h(x), b(x), C(g), o && o(x);
|
|
2034
|
+
}, [Z, q] = R(0);
|
|
2035
|
+
return $(() => {
|
|
1996
2036
|
const g = () => {
|
|
1997
2037
|
w.current && q(w.current.offsetWidth);
|
|
1998
2038
|
};
|
|
1999
2039
|
return g(), window.addEventListener("resize", g), () => {
|
|
2000
2040
|
window.removeEventListener("resize", g);
|
|
2001
2041
|
};
|
|
2002
|
-
}, []), /* @__PURE__ */
|
|
2042
|
+
}, []), /* @__PURE__ */ D(
|
|
2003
2043
|
"div",
|
|
2004
2044
|
{
|
|
2005
2045
|
tabIndex: 0,
|
|
@@ -2007,18 +2047,18 @@ const ye = ({
|
|
|
2007
2047
|
switch (g.key) {
|
|
2008
2048
|
case "ArrowRight":
|
|
2009
2049
|
if (r)
|
|
2010
|
-
|
|
2011
|
-
else if (
|
|
2012
|
-
const x =
|
|
2013
|
-
x &&
|
|
2050
|
+
K({ value: B + r });
|
|
2051
|
+
else if (c) {
|
|
2052
|
+
const x = c.find((W) => W.value > B);
|
|
2053
|
+
x && K({ value: x.value });
|
|
2014
2054
|
}
|
|
2015
2055
|
break;
|
|
2016
2056
|
case "ArrowLeft":
|
|
2017
2057
|
if (r)
|
|
2018
|
-
|
|
2019
|
-
else if (
|
|
2020
|
-
const x =
|
|
2021
|
-
x &&
|
|
2058
|
+
K({ value: B - r });
|
|
2059
|
+
else if (c) {
|
|
2060
|
+
const x = c.slice(0).reverse().find((W, F, S) => B === 1 / 0 ? F === 1 : W.value < B);
|
|
2061
|
+
x && K({ value: x.value });
|
|
2022
2062
|
}
|
|
2023
2063
|
break;
|
|
2024
2064
|
default:
|
|
@@ -2027,29 +2067,29 @@ const ye = ({
|
|
|
2027
2067
|
},
|
|
2028
2068
|
role: "slider",
|
|
2029
2069
|
"aria-valuemin": y(!0),
|
|
2030
|
-
"aria-valuemax":
|
|
2070
|
+
"aria-valuemax": s(!0),
|
|
2031
2071
|
"aria-valuenow": B,
|
|
2032
2072
|
"aria-valuetext": B.toString(),
|
|
2033
|
-
className:
|
|
2073
|
+
className: M.slider,
|
|
2034
2074
|
onMouseDown: k,
|
|
2035
2075
|
onClick: O,
|
|
2036
2076
|
ref: w,
|
|
2037
2077
|
onTouchStart: k,
|
|
2038
2078
|
onDragStart: (g) => g.preventDefault(),
|
|
2039
|
-
...
|
|
2079
|
+
...m,
|
|
2040
2080
|
children: [
|
|
2041
2081
|
/* @__PURE__ */ u("input", { type: "hidden", name: l, value: B }),
|
|
2042
2082
|
/* @__PURE__ */ u(
|
|
2043
2083
|
"div",
|
|
2044
2084
|
{
|
|
2045
|
-
className:
|
|
2085
|
+
className: M.activeTrack,
|
|
2046
2086
|
style: { flex: E / 100 }
|
|
2047
2087
|
}
|
|
2048
2088
|
),
|
|
2049
|
-
/* @__PURE__ */ u("div", { className:
|
|
2050
|
-
|
|
2089
|
+
/* @__PURE__ */ u("div", { className: M.handle, children: /* @__PURE__ */ u(A, { children: L && /* @__PURE__ */ u(
|
|
2090
|
+
U.div,
|
|
2051
2091
|
{
|
|
2052
|
-
className:
|
|
2092
|
+
className: M.valueIndicator,
|
|
2053
2093
|
initial: "hidden",
|
|
2054
2094
|
animate: "visible",
|
|
2055
2095
|
exit: "hidden",
|
|
@@ -2069,7 +2109,7 @@ const ye = ({
|
|
|
2069
2109
|
/* @__PURE__ */ u(
|
|
2070
2110
|
"div",
|
|
2071
2111
|
{
|
|
2072
|
-
className:
|
|
2112
|
+
className: M.inactiveTrack,
|
|
2073
2113
|
style: { flex: 1 - E / 100 }
|
|
2074
2114
|
}
|
|
2075
2115
|
),
|
|
@@ -2077,15 +2117,15 @@ const ye = ({
|
|
|
2077
2117
|
"div",
|
|
2078
2118
|
{
|
|
2079
2119
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2080
|
-
children:
|
|
2081
|
-
let
|
|
2082
|
-
const F = (
|
|
2083
|
-
return
|
|
2120
|
+
children: c && c.map((g, x) => {
|
|
2121
|
+
let W = null;
|
|
2122
|
+
const F = (L ? 9 : 10) / Z * 100, S = h(g.value);
|
|
2123
|
+
return S <= E - F ? W = !0 : S >= E + F && (W = !1), /* @__PURE__ */ u(
|
|
2084
2124
|
"div",
|
|
2085
2125
|
{
|
|
2086
|
-
className:
|
|
2087
|
-
"bg-primary-container":
|
|
2088
|
-
"bg-primary":
|
|
2126
|
+
className: f(M.dot, {
|
|
2127
|
+
"bg-primary-container": W != null && W,
|
|
2128
|
+
"bg-primary": W != null && !W
|
|
2089
2129
|
}),
|
|
2090
2130
|
style: {
|
|
2091
2131
|
left: `${h(g.value)}%`
|
|
@@ -2105,28 +2145,123 @@ const ye = ({
|
|
|
2105
2145
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
2106
2146
|
* Copyright 2025 Fonticons, Inc.
|
|
2107
2147
|
*/
|
|
2108
|
-
var
|
|
2148
|
+
var at = {
|
|
2109
2149
|
prefix: "fas",
|
|
2110
2150
|
iconName: "circle-exclamation",
|
|
2111
2151
|
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]
|
|
2112
|
-
},
|
|
2152
|
+
}, ue = {
|
|
2113
2153
|
prefix: "fas",
|
|
2114
2154
|
iconName: "xmark",
|
|
2115
2155
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
2116
|
-
},
|
|
2156
|
+
}, st = {
|
|
2117
2157
|
prefix: "fas",
|
|
2118
2158
|
iconName: "bars",
|
|
2119
2159
|
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
2160
|
};
|
|
2121
|
-
const
|
|
2161
|
+
const Rt = ({
|
|
2162
|
+
variant: e = "standard",
|
|
2163
|
+
className: t,
|
|
2164
|
+
children: r,
|
|
2165
|
+
title: l,
|
|
2166
|
+
position: n = "right",
|
|
2167
|
+
extended: a,
|
|
2168
|
+
onExtendedChange: i,
|
|
2169
|
+
closeIcon: c = ue,
|
|
2170
|
+
transition: d,
|
|
2171
|
+
...o
|
|
2172
|
+
}) => {
|
|
2173
|
+
d = { duration: 0.3, ...d };
|
|
2174
|
+
const [m, h] = R(a ?? !0), s = Xe({
|
|
2175
|
+
transition: d,
|
|
2176
|
+
title: l,
|
|
2177
|
+
position: n,
|
|
2178
|
+
closeIcon: c,
|
|
2179
|
+
className: t,
|
|
2180
|
+
children: r,
|
|
2181
|
+
onExtendedChange: i,
|
|
2182
|
+
isExtended: m,
|
|
2183
|
+
extended: m,
|
|
2184
|
+
variant: e
|
|
2185
|
+
});
|
|
2186
|
+
$(() => {
|
|
2187
|
+
i == null || i(m ?? !1);
|
|
2188
|
+
}, [m]), $(() => {
|
|
2189
|
+
a != null && h(a);
|
|
2190
|
+
}, [a]);
|
|
2191
|
+
const y = {
|
|
2192
|
+
close: {
|
|
2193
|
+
width: 0
|
|
2194
|
+
},
|
|
2195
|
+
open: {
|
|
2196
|
+
width: "auto"
|
|
2197
|
+
}
|
|
2198
|
+
}, v = () => /* @__PURE__ */ D(te, { children: [
|
|
2199
|
+
/* @__PURE__ */ u(A, { children: e == "modal" && m && /* @__PURE__ */ u(
|
|
2200
|
+
U.div,
|
|
2201
|
+
{
|
|
2202
|
+
initial: { opacity: 0 },
|
|
2203
|
+
animate: { opacity: 1 },
|
|
2204
|
+
exit: { opacity: 0 },
|
|
2205
|
+
transition: d,
|
|
2206
|
+
onClick: () => h(!1),
|
|
2207
|
+
className: s.overlay
|
|
2208
|
+
}
|
|
2209
|
+
) }),
|
|
2210
|
+
/* @__PURE__ */ u(A, { children: m && /* @__PURE__ */ D(
|
|
2211
|
+
"div",
|
|
2212
|
+
{
|
|
2213
|
+
...o,
|
|
2214
|
+
className: s.slideSheet,
|
|
2215
|
+
style: { transition: d.duration + "s" },
|
|
2216
|
+
children: [
|
|
2217
|
+
/* @__PURE__ */ D(
|
|
2218
|
+
U.div,
|
|
2219
|
+
{
|
|
2220
|
+
variants: y,
|
|
2221
|
+
initial: a === !1 ? "open" : "close",
|
|
2222
|
+
animate: "open",
|
|
2223
|
+
exit: "close",
|
|
2224
|
+
className: s.container,
|
|
2225
|
+
children: [
|
|
2226
|
+
/* @__PURE__ */ D("div", { className: s.header, children: [
|
|
2227
|
+
l && /* @__PURE__ */ u("p", { className: s.title, children: l }),
|
|
2228
|
+
/* @__PURE__ */ u(
|
|
2229
|
+
ie,
|
|
2230
|
+
{
|
|
2231
|
+
size: "small",
|
|
2232
|
+
label: "close",
|
|
2233
|
+
icon: c,
|
|
2234
|
+
onClick: () => h(!1),
|
|
2235
|
+
className: s.closeButton
|
|
2236
|
+
}
|
|
2237
|
+
)
|
|
2238
|
+
] }),
|
|
2239
|
+
/* @__PURE__ */ u(
|
|
2240
|
+
"div",
|
|
2241
|
+
{
|
|
2242
|
+
className: s.content,
|
|
2243
|
+
style: { transition: d.duration + "s" },
|
|
2244
|
+
children: r
|
|
2245
|
+
}
|
|
2246
|
+
)
|
|
2247
|
+
]
|
|
2248
|
+
}
|
|
2249
|
+
),
|
|
2250
|
+
/* @__PURE__ */ u(tt, { className: s.divider, orientation: "vertical" })
|
|
2251
|
+
]
|
|
2252
|
+
}
|
|
2253
|
+
) })
|
|
2254
|
+
] });
|
|
2255
|
+
return e == "modal" ? ye(v(), document.body) : v();
|
|
2256
|
+
}, Ct = ({
|
|
2122
2257
|
message: e,
|
|
2123
2258
|
className: t,
|
|
2124
2259
|
duration: r,
|
|
2125
|
-
closeIcon: l =
|
|
2260
|
+
closeIcon: l = ue,
|
|
2126
2261
|
onClose: n,
|
|
2127
|
-
...
|
|
2262
|
+
...a
|
|
2128
2263
|
}) => {
|
|
2129
|
-
const [i,
|
|
2264
|
+
const [i, c] = R(!0), d = Oe({
|
|
2130
2265
|
className: t,
|
|
2131
2266
|
closeIcon: l,
|
|
2132
2267
|
duration: r,
|
|
@@ -2134,30 +2269,30 @@ const Mt = ({
|
|
|
2134
2269
|
onClose: n,
|
|
2135
2270
|
message: e
|
|
2136
2271
|
});
|
|
2137
|
-
|
|
2272
|
+
$(() => {
|
|
2138
2273
|
r && setTimeout(() => {
|
|
2139
2274
|
o();
|
|
2140
2275
|
}, r);
|
|
2141
2276
|
}, [r]);
|
|
2142
2277
|
const o = () => {
|
|
2143
|
-
|
|
2278
|
+
c(!1), n == null || n();
|
|
2144
2279
|
};
|
|
2145
|
-
return /* @__PURE__ */ u(
|
|
2146
|
-
|
|
2280
|
+
return /* @__PURE__ */ u(A, { children: i && /* @__PURE__ */ u(
|
|
2281
|
+
U.div,
|
|
2147
2282
|
{
|
|
2148
2283
|
initial: { height: 0 },
|
|
2149
2284
|
animate: { height: "auto" },
|
|
2150
2285
|
exit: { height: 0 },
|
|
2151
2286
|
transition: { duration: 0.1 },
|
|
2152
|
-
className:
|
|
2153
|
-
...
|
|
2154
|
-
children: /* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */ u("p", { className:
|
|
2287
|
+
className: d.snackbar,
|
|
2288
|
+
...a,
|
|
2289
|
+
children: /* @__PURE__ */ D("div", { className: d.container, children: [
|
|
2290
|
+
/* @__PURE__ */ u("p", { className: d.supportingText, children: e }),
|
|
2156
2291
|
/* @__PURE__ */ u(
|
|
2157
|
-
|
|
2292
|
+
ie,
|
|
2158
2293
|
{
|
|
2159
2294
|
onClick: () => o(),
|
|
2160
|
-
className:
|
|
2295
|
+
className: d.icon,
|
|
2161
2296
|
icon: l,
|
|
2162
2297
|
label: "close the snackbar"
|
|
2163
2298
|
}
|
|
@@ -2165,124 +2300,124 @@ const Mt = ({
|
|
|
2165
2300
|
] })
|
|
2166
2301
|
}
|
|
2167
2302
|
) });
|
|
2168
|
-
},
|
|
2303
|
+
}, Mt = ({
|
|
2169
2304
|
selected: e = !1,
|
|
2170
2305
|
className: t,
|
|
2171
2306
|
activeIcon: r,
|
|
2172
2307
|
disabled: l = !1,
|
|
2173
2308
|
inactiveIcon: n,
|
|
2174
|
-
onChange:
|
|
2309
|
+
onChange: a,
|
|
2175
2310
|
onClick: i,
|
|
2176
|
-
onKeyDown:
|
|
2177
|
-
ref:
|
|
2311
|
+
onKeyDown: c,
|
|
2312
|
+
ref: d,
|
|
2178
2313
|
...o
|
|
2179
2314
|
}) => {
|
|
2180
|
-
const [
|
|
2315
|
+
const [m, h] = R(e), s = (w) => {
|
|
2181
2316
|
l || (v(), i && i(w));
|
|
2182
2317
|
}, y = (w) => {
|
|
2183
|
-
l || ((w.key === " " || w.key === "Enter") && (w.preventDefault(), v()),
|
|
2318
|
+
l || ((w.key === " " || w.key === "Enter") && (w.preventDefault(), v()), c && c(w));
|
|
2184
2319
|
}, v = () => {
|
|
2185
|
-
h(!
|
|
2186
|
-
},
|
|
2320
|
+
h(!m), a == null || a(!m);
|
|
2321
|
+
}, L = qe({
|
|
2187
2322
|
className: t,
|
|
2188
|
-
isSelected:
|
|
2323
|
+
isSelected: m,
|
|
2189
2324
|
activeIcon: r,
|
|
2190
2325
|
inactiveIcon: n,
|
|
2191
2326
|
disabled: l,
|
|
2192
|
-
selected:
|
|
2193
|
-
onChange:
|
|
2194
|
-
}),
|
|
2195
|
-
return /* @__PURE__ */
|
|
2196
|
-
|
|
2327
|
+
selected: m,
|
|
2328
|
+
onChange: a
|
|
2329
|
+
}), N = j(null), I = d || N;
|
|
2330
|
+
return /* @__PURE__ */ D(
|
|
2331
|
+
U.div,
|
|
2197
2332
|
{
|
|
2198
2333
|
role: "switch",
|
|
2199
|
-
"aria-checked":
|
|
2334
|
+
"aria-checked": m,
|
|
2200
2335
|
tabIndex: l ? -1 : 0,
|
|
2201
2336
|
onKeyDown: y,
|
|
2202
|
-
onClick:
|
|
2337
|
+
onClick: s,
|
|
2203
2338
|
ref: I,
|
|
2204
|
-
className:
|
|
2339
|
+
className: L.switch,
|
|
2205
2340
|
...o,
|
|
2206
2341
|
children: [
|
|
2207
|
-
/* @__PURE__ */ u("input", { type: "hidden", value:
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
|
|
2342
|
+
/* @__PURE__ */ u("input", { type: "hidden", value: m ? "1" : "0" }),
|
|
2343
|
+
/* @__PURE__ */ D(
|
|
2344
|
+
U.div,
|
|
2210
2345
|
{
|
|
2211
2346
|
layout: !0,
|
|
2212
|
-
style: { translate:
|
|
2347
|
+
style: { translate: m ? "50%" : "-50%" },
|
|
2213
2348
|
transition: {
|
|
2214
2349
|
type: "spring",
|
|
2215
2350
|
stiffness: 700,
|
|
2216
2351
|
damping: 30
|
|
2217
2352
|
},
|
|
2218
|
-
className:
|
|
2353
|
+
className: L.handleContainer,
|
|
2219
2354
|
children: [
|
|
2220
|
-
/* @__PURE__ */ u("div", { className:
|
|
2355
|
+
/* @__PURE__ */ u("div", { className: L.handle, children: (m ? r : n) && /* @__PURE__ */ u(
|
|
2221
2356
|
Q,
|
|
2222
2357
|
{
|
|
2223
|
-
className:
|
|
2224
|
-
icon:
|
|
2358
|
+
className: L.icon,
|
|
2359
|
+
icon: m ? r : n
|
|
2225
2360
|
}
|
|
2226
2361
|
) }),
|
|
2227
|
-
/* @__PURE__ */ u("div", { className:
|
|
2362
|
+
/* @__PURE__ */ u("div", { className: L.handleStateLayer })
|
|
2228
2363
|
]
|
|
2229
2364
|
}
|
|
2230
2365
|
)
|
|
2231
2366
|
]
|
|
2232
2367
|
}
|
|
2233
2368
|
);
|
|
2234
|
-
},
|
|
2369
|
+
}, ct = ({
|
|
2235
2370
|
className: e,
|
|
2236
2371
|
onClick: t,
|
|
2237
2372
|
label: r,
|
|
2238
2373
|
variant: l = "primary",
|
|
2239
2374
|
href: n,
|
|
2240
|
-
icon:
|
|
2375
|
+
icon: a,
|
|
2241
2376
|
selectedTab: i,
|
|
2242
|
-
setSelectedTab:
|
|
2243
|
-
tabsId:
|
|
2377
|
+
setSelectedTab: c,
|
|
2378
|
+
tabsId: d,
|
|
2244
2379
|
index: o,
|
|
2245
|
-
onTabSelected:
|
|
2380
|
+
onTabSelected: m,
|
|
2246
2381
|
scrollable: h = !1,
|
|
2247
|
-
selected:
|
|
2382
|
+
selected: s = !1,
|
|
2248
2383
|
ref: y,
|
|
2249
2384
|
...v
|
|
2250
2385
|
}) => {
|
|
2251
|
-
const
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
}, [i]),
|
|
2255
|
-
i == o &&
|
|
2256
|
-
ref:
|
|
2386
|
+
const L = j(null), N = y || L, [I, w] = R(s);
|
|
2387
|
+
$(() => {
|
|
2388
|
+
s && i == null ? w(!0) : w(i == o && o != null);
|
|
2389
|
+
}, [i]), $(() => {
|
|
2390
|
+
i == o && m && m({
|
|
2391
|
+
ref: N,
|
|
2257
2392
|
index: o || 0,
|
|
2258
2393
|
label: r,
|
|
2259
|
-
icon:
|
|
2394
|
+
icon: a
|
|
2260
2395
|
});
|
|
2261
2396
|
}, [i]);
|
|
2262
|
-
const B = n ? "a" : "button", b = (
|
|
2263
|
-
|
|
2264
|
-
}, E =
|
|
2397
|
+
const B = n ? "a" : "button", b = (C) => {
|
|
2398
|
+
c && c(o ?? null), t && t(C);
|
|
2399
|
+
}, E = _e({
|
|
2265
2400
|
className: e,
|
|
2266
|
-
onTabSelected:
|
|
2401
|
+
onTabSelected: m,
|
|
2267
2402
|
scrollable: h,
|
|
2268
2403
|
selectedTab: i,
|
|
2269
2404
|
index: o,
|
|
2270
|
-
tabsId:
|
|
2405
|
+
tabsId: d,
|
|
2271
2406
|
selected: I,
|
|
2272
2407
|
variant: l,
|
|
2273
|
-
icon:
|
|
2408
|
+
icon: a,
|
|
2274
2409
|
label: r,
|
|
2275
2410
|
isSelected: I,
|
|
2276
|
-
setSelectedTab:
|
|
2411
|
+
setSelectedTab: c,
|
|
2277
2412
|
href: n
|
|
2278
2413
|
});
|
|
2279
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ D(
|
|
2280
2415
|
B,
|
|
2281
2416
|
{
|
|
2282
2417
|
...v,
|
|
2283
2418
|
role: "tab",
|
|
2284
2419
|
"aria-selected": I,
|
|
2285
|
-
ref:
|
|
2420
|
+
ref: N,
|
|
2286
2421
|
href: n,
|
|
2287
2422
|
className: E.tab,
|
|
2288
2423
|
onClick: b,
|
|
@@ -2292,16 +2427,16 @@ const Mt = ({
|
|
|
2292
2427
|
ne,
|
|
2293
2428
|
{
|
|
2294
2429
|
colorName: l === "primary" && I ? "primary" : "on-surface",
|
|
2295
|
-
triggerRef:
|
|
2430
|
+
triggerRef: N
|
|
2296
2431
|
}
|
|
2297
2432
|
) }),
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
|
|
2433
|
+
/* @__PURE__ */ D("span", { className: E.content, children: [
|
|
2434
|
+
a && /* @__PURE__ */ u(Q, { icon: a, className: E.icon }),
|
|
2300
2435
|
/* @__PURE__ */ u("span", { className: E.label, children: r }),
|
|
2301
2436
|
I && /* @__PURE__ */ u(
|
|
2302
|
-
|
|
2437
|
+
U.span,
|
|
2303
2438
|
{
|
|
2304
|
-
layoutId: `underline-${
|
|
2439
|
+
layoutId: `underline-${d}`,
|
|
2305
2440
|
className: E.underline,
|
|
2306
2441
|
transition: { duration: 0.3 }
|
|
2307
2442
|
}
|
|
@@ -2310,115 +2445,115 @@ const Mt = ({
|
|
|
2310
2445
|
]
|
|
2311
2446
|
}
|
|
2312
2447
|
);
|
|
2313
|
-
},
|
|
2448
|
+
}, Bt = ({
|
|
2314
2449
|
variant: e = "primary",
|
|
2315
2450
|
onTabSelected: t,
|
|
2316
2451
|
children: r,
|
|
2317
2452
|
className: l,
|
|
2318
2453
|
selectedTab: n,
|
|
2319
|
-
setSelectedTab:
|
|
2454
|
+
setSelectedTab: a,
|
|
2320
2455
|
scrollable: i = !1
|
|
2321
2456
|
}) => {
|
|
2322
|
-
const [
|
|
2457
|
+
const [c, d] = R(
|
|
2323
2458
|
null
|
|
2324
2459
|
);
|
|
2325
2460
|
let o;
|
|
2326
|
-
n == 0 || n != null ? o = n : o =
|
|
2327
|
-
const
|
|
2328
|
-
(
|
|
2329
|
-
),
|
|
2330
|
-
if (t == null || t(
|
|
2331
|
-
const I =
|
|
2461
|
+
n == 0 || n != null ? o = n : o = c;
|
|
2462
|
+
const m = a || d, h = Y.Children.toArray(r).filter(
|
|
2463
|
+
(N) => Y.isValidElement(N) && N.type === ct
|
|
2464
|
+
), s = Y.useRef(null), y = (N) => {
|
|
2465
|
+
if (t == null || t(N), i) {
|
|
2466
|
+
const I = s.current, w = N.ref.current;
|
|
2332
2467
|
if (I && w) {
|
|
2333
2468
|
const B = w.offsetLeft + w.offsetWidth / 2 - I.offsetWidth / 2;
|
|
2334
2469
|
I.scrollTo({ left: B, behavior: "smooth" });
|
|
2335
2470
|
}
|
|
2336
2471
|
}
|
|
2337
|
-
}, v =
|
|
2472
|
+
}, v = be(() => ce(), []), L = Ke({
|
|
2338
2473
|
children: r,
|
|
2339
2474
|
onTabSelected: t,
|
|
2340
2475
|
scrollable: i,
|
|
2341
2476
|
selectedTab: o,
|
|
2342
|
-
setSelectedTab:
|
|
2477
|
+
setSelectedTab: m,
|
|
2343
2478
|
className: l,
|
|
2344
2479
|
variant: e
|
|
2345
2480
|
});
|
|
2346
|
-
return /* @__PURE__ */ u("div", { ref:
|
|
2481
|
+
return /* @__PURE__ */ u("div", { ref: s, role: "tablist", className: L.tabs, children: h.map((N, I) => Y.cloneElement(N, {
|
|
2347
2482
|
key: I,
|
|
2348
2483
|
index: I,
|
|
2349
2484
|
variant: e,
|
|
2350
2485
|
selectedTab: o,
|
|
2351
|
-
setSelectedTab:
|
|
2486
|
+
setSelectedTab: m,
|
|
2352
2487
|
tabsId: v,
|
|
2353
2488
|
onTabSelected: y,
|
|
2354
2489
|
scrollable: i
|
|
2355
2490
|
})) });
|
|
2356
|
-
},
|
|
2491
|
+
}, $t = ({
|
|
2357
2492
|
variant: e = "filled",
|
|
2358
2493
|
disabled: t = !1,
|
|
2359
2494
|
errorText: r,
|
|
2360
2495
|
placeholder: l,
|
|
2361
2496
|
suffix: n,
|
|
2362
|
-
name:
|
|
2497
|
+
name: a,
|
|
2363
2498
|
label: i,
|
|
2364
|
-
className:
|
|
2365
|
-
supportingText:
|
|
2499
|
+
className: c,
|
|
2500
|
+
supportingText: d,
|
|
2366
2501
|
trailingIcon: o,
|
|
2367
|
-
leadingIcon:
|
|
2502
|
+
leadingIcon: m,
|
|
2368
2503
|
type: h = "text",
|
|
2369
|
-
textLine:
|
|
2504
|
+
textLine: s = "singleLine",
|
|
2370
2505
|
autoComplete: y = "on",
|
|
2371
2506
|
onChange: v,
|
|
2372
|
-
value:
|
|
2373
|
-
showSupportingText:
|
|
2507
|
+
value: L,
|
|
2508
|
+
showSupportingText: N = !1,
|
|
2374
2509
|
...I
|
|
2375
2510
|
}) => {
|
|
2376
|
-
const [w, B] =
|
|
2377
|
-
|
|
2511
|
+
const [w, B] = R(L ?? ""), [b, E] = R(!1), [C, V] = R(!1), [P, k] = R(
|
|
2512
|
+
N
|
|
2378
2513
|
);
|
|
2379
|
-
|
|
2380
|
-
B(
|
|
2381
|
-
}, [
|
|
2382
|
-
r != null && r.length ?
|
|
2383
|
-
}, [r]),
|
|
2384
|
-
|
|
2385
|
-
}, [P,
|
|
2386
|
-
b &&
|
|
2514
|
+
$(() => {
|
|
2515
|
+
B(L ?? "");
|
|
2516
|
+
}, [L]), $(() => {
|
|
2517
|
+
r != null && r.length ? V(!0) : V(!1);
|
|
2518
|
+
}, [r]), $(() => {
|
|
2519
|
+
N ? k(N) : d != null && d.length ? k(!0) : k(!1);
|
|
2520
|
+
}, [P, d]), $(() => {
|
|
2521
|
+
b && V(!1);
|
|
2387
2522
|
}, [b]);
|
|
2388
|
-
const
|
|
2389
|
-
|
|
2523
|
+
const p = Y.useRef(null), M = () => {
|
|
2524
|
+
p.current && !b && p.current.focus();
|
|
2390
2525
|
}, O = () => {
|
|
2391
2526
|
E(!0);
|
|
2392
|
-
},
|
|
2393
|
-
const F =
|
|
2394
|
-
B(F),
|
|
2527
|
+
}, K = (W) => {
|
|
2528
|
+
const F = W.target.value;
|
|
2529
|
+
B(F), V(!1), typeof v == "function" && v(F);
|
|
2395
2530
|
}, Z = () => {
|
|
2396
2531
|
E(!1);
|
|
2397
|
-
}, q =
|
|
2532
|
+
}, q = Ge({
|
|
2398
2533
|
showSupportingText: P,
|
|
2399
2534
|
isFocused: b,
|
|
2400
|
-
showErrorIcon:
|
|
2535
|
+
showErrorIcon: C,
|
|
2401
2536
|
disabled: t,
|
|
2402
|
-
name:
|
|
2537
|
+
name: a,
|
|
2403
2538
|
label: i,
|
|
2404
2539
|
autoComplete: y,
|
|
2405
|
-
className:
|
|
2540
|
+
className: c,
|
|
2406
2541
|
onChange: v,
|
|
2407
2542
|
placeholder: l,
|
|
2408
|
-
supportingText:
|
|
2543
|
+
supportingText: d,
|
|
2409
2544
|
type: h,
|
|
2410
|
-
leadingIcon:
|
|
2545
|
+
leadingIcon: m,
|
|
2411
2546
|
trailingIcon: o,
|
|
2412
2547
|
variant: e,
|
|
2413
2548
|
errorText: r,
|
|
2414
2549
|
value: w,
|
|
2415
2550
|
suffix: n,
|
|
2416
|
-
textLine:
|
|
2417
|
-
}), [
|
|
2551
|
+
textLine: s
|
|
2552
|
+
}), [z] = R(ce());
|
|
2418
2553
|
let g, x;
|
|
2419
|
-
switch (
|
|
2554
|
+
switch (s) {
|
|
2420
2555
|
case "multiLine":
|
|
2421
|
-
x =
|
|
2556
|
+
x = Re, g = {};
|
|
2422
2557
|
break;
|
|
2423
2558
|
case "textAreas":
|
|
2424
2559
|
x = "textarea", g = {};
|
|
@@ -2428,12 +2563,12 @@ const Mt = ({
|
|
|
2428
2563
|
x = "input", g = { type: h };
|
|
2429
2564
|
break;
|
|
2430
2565
|
}
|
|
2431
|
-
return /* @__PURE__ */
|
|
2432
|
-
/* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ D("div", { className: q.textField, ...I, children: [
|
|
2567
|
+
/* @__PURE__ */ D("fieldset", { onClick: M, className: q.content, children: [
|
|
2433
2568
|
/* @__PURE__ */ u("div", { className: q.stateLayer }),
|
|
2434
|
-
|
|
2569
|
+
m && /* @__PURE__ */ u("div", { className: q.leadingIcon, children: Y.isValidElement(m) ? m : /* @__PURE__ */ u(Q, { className: "w-5 h-5", icon: m }) }),
|
|
2435
2570
|
!(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2436
|
-
|
|
2571
|
+
U.legend,
|
|
2437
2572
|
{
|
|
2438
2573
|
variants: {
|
|
2439
2574
|
hidden: { width: 0, padding: 0 },
|
|
@@ -2444,22 +2579,22 @@ const Mt = ({
|
|
|
2444
2579
|
className: "max-w-full ml-2 px-2 text-body-small h-0",
|
|
2445
2580
|
transition: { duration: 0.2 },
|
|
2446
2581
|
children: /* @__PURE__ */ u("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ u(
|
|
2447
|
-
|
|
2582
|
+
U.span,
|
|
2448
2583
|
{
|
|
2449
2584
|
className: q.label,
|
|
2450
2585
|
transition: { duration: 0.3 },
|
|
2451
|
-
layoutId:
|
|
2586
|
+
layoutId: z,
|
|
2452
2587
|
children: i
|
|
2453
2588
|
}
|
|
2454
2589
|
) })
|
|
2455
2590
|
}
|
|
2456
2591
|
),
|
|
2457
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ D("div", { className: "flex-1 relative", children: [
|
|
2458
2593
|
(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2459
|
-
|
|
2594
|
+
U.label,
|
|
2460
2595
|
{
|
|
2461
|
-
htmlFor:
|
|
2462
|
-
className:
|
|
2596
|
+
htmlFor: a,
|
|
2597
|
+
className: f(
|
|
2463
2598
|
"absolute left-4 transition-all duration-300",
|
|
2464
2599
|
{
|
|
2465
2600
|
"text-body-small top-2": e == "filled" && !(!b && !w.length),
|
|
@@ -2468,11 +2603,11 @@ const Mt = ({
|
|
|
2468
2603
|
),
|
|
2469
2604
|
transition: { duration: 0.3 },
|
|
2470
2605
|
children: /* @__PURE__ */ u(
|
|
2471
|
-
|
|
2606
|
+
U.span,
|
|
2472
2607
|
{
|
|
2473
2608
|
className: q.label,
|
|
2474
2609
|
transition: { duration: 0.3 },
|
|
2475
|
-
layoutId: e == "outlined" ?
|
|
2610
|
+
layoutId: e == "outlined" ? z : void 0,
|
|
2476
2611
|
children: i
|
|
2477
2612
|
}
|
|
2478
2613
|
)
|
|
@@ -2481,12 +2616,12 @@ const Mt = ({
|
|
|
2481
2616
|
/* @__PURE__ */ u(
|
|
2482
2617
|
x,
|
|
2483
2618
|
{
|
|
2484
|
-
ref:
|
|
2619
|
+
ref: p,
|
|
2485
2620
|
value: w,
|
|
2486
|
-
onChange:
|
|
2621
|
+
onChange: K,
|
|
2487
2622
|
className: q.input,
|
|
2488
|
-
id:
|
|
2489
|
-
name:
|
|
2623
|
+
id: a,
|
|
2624
|
+
name: a,
|
|
2490
2625
|
placeholder: b ? l ?? void 0 : "",
|
|
2491
2626
|
onFocus: O,
|
|
2492
2627
|
onBlur: Z,
|
|
@@ -2499,12 +2634,12 @@ const Mt = ({
|
|
|
2499
2634
|
)
|
|
2500
2635
|
] }),
|
|
2501
2636
|
/* @__PURE__ */ u("div", { className: q.activeIndicator }),
|
|
2502
|
-
!
|
|
2637
|
+
!C && /* @__PURE__ */ D(te, { children: [
|
|
2503
2638
|
o && /* @__PURE__ */ u(
|
|
2504
2639
|
"div",
|
|
2505
2640
|
{
|
|
2506
|
-
onClick: (
|
|
2507
|
-
|
|
2641
|
+
onClick: (W) => {
|
|
2642
|
+
W.stopPropagation();
|
|
2508
2643
|
},
|
|
2509
2644
|
className: q.trailingIcon,
|
|
2510
2645
|
children: Y.isValidElement(o) ? o : /* @__PURE__ */ u(Q, { className: "h-5", icon: o })
|
|
@@ -2512,28 +2647,28 @@ const Mt = ({
|
|
|
2512
2647
|
),
|
|
2513
2648
|
!o && n && /* @__PURE__ */ u("span", { className: q.suffix, children: n })
|
|
2514
2649
|
] }),
|
|
2515
|
-
|
|
2650
|
+
C && /* @__PURE__ */ u(
|
|
2516
2651
|
"div",
|
|
2517
2652
|
{
|
|
2518
|
-
className:
|
|
2653
|
+
className: f(q.trailingIcon, {
|
|
2519
2654
|
" absolute right-0": !o
|
|
2520
2655
|
}),
|
|
2521
2656
|
children: /* @__PURE__ */ u(
|
|
2522
2657
|
Q,
|
|
2523
2658
|
{
|
|
2524
2659
|
className: "h-5 text-error",
|
|
2525
|
-
icon:
|
|
2660
|
+
icon: at
|
|
2526
2661
|
}
|
|
2527
2662
|
)
|
|
2528
2663
|
}
|
|
2529
2664
|
)
|
|
2530
2665
|
] }),
|
|
2531
|
-
P && /* @__PURE__ */ u("p", { className: q.supportingText, children: r != null && r.length ? r :
|
|
2666
|
+
P && /* @__PURE__ */ u("p", { className: q.supportingText, children: r != null && r.length ? r : d != null && d.length ? d : " " })
|
|
2532
2667
|
] });
|
|
2533
|
-
},
|
|
2668
|
+
}, it = _(
|
|
2534
2669
|
"navigationRailItem",
|
|
2535
2670
|
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
2536
|
-
navigationRailItem:
|
|
2671
|
+
navigationRailItem: f(
|
|
2537
2672
|
" group flex flex-col pt-1 pb-1.5 cursor-pointer",
|
|
2538
2673
|
{
|
|
2539
2674
|
"text-on-surface-variant": !e,
|
|
@@ -2542,7 +2677,7 @@ const Mt = ({
|
|
|
2542
2677
|
"gap-0 h-[66px]": l == "horizontal"
|
|
2543
2678
|
}
|
|
2544
2679
|
),
|
|
2545
|
-
container:
|
|
2680
|
+
container: f(
|
|
2546
2681
|
" w-fit flex justify-center relative rounded-full items-center mx-5",
|
|
2547
2682
|
{
|
|
2548
2683
|
"bg-secondary-container overflow-hidden": e,
|
|
@@ -2558,77 +2693,77 @@ const Mt = ({
|
|
|
2558
2693
|
}
|
|
2559
2694
|
]
|
|
2560
2695
|
),
|
|
2561
|
-
stateLayer:
|
|
2696
|
+
stateLayer: f(
|
|
2562
2697
|
" absolute w-full rounded-full h-full left-0 top-0 ",
|
|
2563
2698
|
{
|
|
2564
2699
|
"group-state-on-surface": !e,
|
|
2565
2700
|
"group-state-on-secondary-container": e
|
|
2566
2701
|
}
|
|
2567
2702
|
),
|
|
2568
|
-
icon:
|
|
2569
|
-
label:
|
|
2703
|
+
icon: f("size-6 flex"),
|
|
2704
|
+
label: f("w-fit mx-auto text-nowrap", {
|
|
2570
2705
|
"text-label-large ": l == "horizontal",
|
|
2571
2706
|
"text-label-medium": l == "vertical"
|
|
2572
2707
|
})
|
|
2573
2708
|
})
|
|
2574
|
-
),
|
|
2709
|
+
), ut = ({ label: e }) => /* @__PURE__ */ u("div", { className: " h-9 flex items-center mx-9 mt-3", children: /* @__PURE__ */ u("p", { className: "text-label-large text-on-surface-variant", children: e }) }), dt = ({
|
|
2575
2710
|
className: e,
|
|
2576
2711
|
onClick: t,
|
|
2577
2712
|
label: r,
|
|
2578
2713
|
variant: l = "vertical",
|
|
2579
2714
|
href: n,
|
|
2580
|
-
icon:
|
|
2715
|
+
icon: a,
|
|
2581
2716
|
selectedItem: i,
|
|
2582
|
-
setSelectedItem:
|
|
2583
|
-
index:
|
|
2717
|
+
setSelectedItem: c,
|
|
2718
|
+
index: d,
|
|
2584
2719
|
onItemSelected: o,
|
|
2585
|
-
selected:
|
|
2720
|
+
selected: m = !1,
|
|
2586
2721
|
ref: h,
|
|
2587
|
-
transition:
|
|
2722
|
+
transition: s,
|
|
2588
2723
|
isExtended: y,
|
|
2589
2724
|
iconSelected: v,
|
|
2590
|
-
style:
|
|
2591
|
-
extendedOnly:
|
|
2725
|
+
style: L,
|
|
2726
|
+
extendedOnly: N,
|
|
2592
2727
|
children: I,
|
|
2593
2728
|
...w
|
|
2594
2729
|
}) => {
|
|
2595
2730
|
I && (r = I);
|
|
2596
|
-
const B =
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
}, [i]),
|
|
2600
|
-
i ==
|
|
2731
|
+
const B = j(null), b = h || B, [E, C] = R(m);
|
|
2732
|
+
$(() => {
|
|
2733
|
+
m && i == null ? C(!0) : C(i == d && d != null);
|
|
2734
|
+
}, [i]), $(() => {
|
|
2735
|
+
i == d && o && o({
|
|
2601
2736
|
ref: b,
|
|
2602
|
-
index:
|
|
2737
|
+
index: d || 0,
|
|
2603
2738
|
label: r,
|
|
2604
|
-
icon:
|
|
2739
|
+
icon: a
|
|
2605
2740
|
});
|
|
2606
2741
|
}, [i]);
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
}, k =
|
|
2742
|
+
const V = n ? "a" : "button", P = (p) => {
|
|
2743
|
+
c && c(d ?? null), t && t(p);
|
|
2744
|
+
}, k = it({
|
|
2610
2745
|
isExtended: y,
|
|
2611
|
-
extendedOnly:
|
|
2746
|
+
extendedOnly: N,
|
|
2612
2747
|
className: e,
|
|
2613
2748
|
onItemSelected: o,
|
|
2614
2749
|
selectedItem: i,
|
|
2615
|
-
index:
|
|
2616
|
-
transition:
|
|
2750
|
+
index: d,
|
|
2751
|
+
transition: s,
|
|
2617
2752
|
selected: E,
|
|
2618
2753
|
variant: l,
|
|
2619
|
-
icon:
|
|
2754
|
+
icon: a,
|
|
2620
2755
|
label: r,
|
|
2621
2756
|
isSelected: E,
|
|
2622
|
-
setSelectedItem:
|
|
2757
|
+
setSelectedItem: c,
|
|
2623
2758
|
href: n,
|
|
2624
2759
|
children: r,
|
|
2625
2760
|
iconSelected: v
|
|
2626
2761
|
});
|
|
2627
|
-
return
|
|
2762
|
+
return s = { duration: 0.3, ...s }, N && !y ? null : (
|
|
2628
2763
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2629
2764
|
// @ts-expect-error
|
|
2630
|
-
/* @__PURE__ */
|
|
2631
|
-
|
|
2765
|
+
/* @__PURE__ */ D(
|
|
2766
|
+
V,
|
|
2632
2767
|
{
|
|
2633
2768
|
...w,
|
|
2634
2769
|
role: "tab",
|
|
@@ -2637,49 +2772,49 @@ const Mt = ({
|
|
|
2637
2772
|
href: n,
|
|
2638
2773
|
className: k.navigationRailItem,
|
|
2639
2774
|
onClick: P,
|
|
2640
|
-
style: { transition:
|
|
2775
|
+
style: { transition: s.duration + "s", ...L },
|
|
2641
2776
|
children: [
|
|
2642
|
-
/* @__PURE__ */
|
|
2643
|
-
|
|
2777
|
+
/* @__PURE__ */ D(
|
|
2778
|
+
U.div,
|
|
2644
2779
|
{
|
|
2645
2780
|
style: {
|
|
2646
|
-
transition: l == "horizontal" ?
|
|
2781
|
+
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
2782
|
},
|
|
2648
|
-
transition:
|
|
2783
|
+
transition: s,
|
|
2649
2784
|
className: k.container,
|
|
2650
2785
|
children: [
|
|
2651
|
-
/* @__PURE__ */ u(
|
|
2652
|
-
|
|
2786
|
+
/* @__PURE__ */ u(U.div, { layout: !0, className: k.stateLayer }),
|
|
2787
|
+
a && /* @__PURE__ */ u(
|
|
2653
2788
|
Q,
|
|
2654
2789
|
{
|
|
2655
|
-
icon: E ? v :
|
|
2790
|
+
icon: E ? v : a,
|
|
2656
2791
|
className: k.icon
|
|
2657
2792
|
}
|
|
2658
2793
|
),
|
|
2659
|
-
/* @__PURE__ */ u(
|
|
2660
|
-
const
|
|
2794
|
+
/* @__PURE__ */ u(A, { children: l == "horizontal" && (() => {
|
|
2795
|
+
const p = {
|
|
2661
2796
|
width: 0,
|
|
2662
2797
|
opacity: 0,
|
|
2663
2798
|
transition: {
|
|
2664
|
-
...
|
|
2799
|
+
...s
|
|
2665
2800
|
}
|
|
2666
|
-
},
|
|
2801
|
+
}, M = {
|
|
2667
2802
|
width: "auto",
|
|
2668
2803
|
opacity: 1,
|
|
2669
2804
|
transition: {
|
|
2670
|
-
...
|
|
2805
|
+
...s,
|
|
2671
2806
|
opacity: {
|
|
2672
|
-
duration:
|
|
2673
|
-
delay:
|
|
2807
|
+
duration: s.duration / 2,
|
|
2808
|
+
delay: s.duration - s.duration / 2
|
|
2674
2809
|
}
|
|
2675
2810
|
}
|
|
2676
2811
|
};
|
|
2677
2812
|
return /* @__PURE__ */ u(
|
|
2678
|
-
|
|
2813
|
+
U.span,
|
|
2679
2814
|
{
|
|
2680
|
-
initial:
|
|
2681
|
-
animate:
|
|
2682
|
-
exit:
|
|
2815
|
+
initial: p,
|
|
2816
|
+
animate: M,
|
|
2817
|
+
exit: p,
|
|
2683
2818
|
className: k.label,
|
|
2684
2819
|
children: r
|
|
2685
2820
|
}
|
|
@@ -2688,35 +2823,35 @@ const Mt = ({
|
|
|
2688
2823
|
]
|
|
2689
2824
|
}
|
|
2690
2825
|
),
|
|
2691
|
-
/* @__PURE__ */ u(
|
|
2692
|
-
const
|
|
2826
|
+
/* @__PURE__ */ u(A, { children: l == "vertical" && (() => {
|
|
2827
|
+
const p = {
|
|
2693
2828
|
height: 0,
|
|
2694
2829
|
opacity: 0,
|
|
2695
2830
|
transition: {
|
|
2696
|
-
...
|
|
2831
|
+
...s,
|
|
2697
2832
|
opacity: {
|
|
2698
2833
|
duration: 0
|
|
2699
2834
|
}
|
|
2700
2835
|
}
|
|
2701
|
-
},
|
|
2836
|
+
}, M = {
|
|
2702
2837
|
height: "auto",
|
|
2703
2838
|
opacity: 1,
|
|
2704
2839
|
transition: {
|
|
2705
|
-
...
|
|
2840
|
+
...s,
|
|
2706
2841
|
opacity: {
|
|
2707
|
-
duration:
|
|
2708
|
-
delay:
|
|
2842
|
+
duration: s.duration / 3,
|
|
2843
|
+
delay: s.duration - s.duration / 3
|
|
2709
2844
|
}
|
|
2710
2845
|
}
|
|
2711
2846
|
};
|
|
2712
2847
|
return /* @__PURE__ */ u(
|
|
2713
|
-
|
|
2848
|
+
U.span,
|
|
2714
2849
|
{
|
|
2715
|
-
initial:
|
|
2716
|
-
animate:
|
|
2717
|
-
exit:
|
|
2850
|
+
initial: M,
|
|
2851
|
+
animate: M,
|
|
2852
|
+
exit: p,
|
|
2718
2853
|
className: k.label,
|
|
2719
|
-
transition:
|
|
2854
|
+
transition: s,
|
|
2720
2855
|
children: r
|
|
2721
2856
|
}
|
|
2722
2857
|
);
|
|
@@ -2725,117 +2860,117 @@ const Mt = ({
|
|
|
2725
2860
|
}
|
|
2726
2861
|
)
|
|
2727
2862
|
);
|
|
2728
|
-
},
|
|
2863
|
+
}, ft = _(
|
|
2729
2864
|
"navigationRail",
|
|
2730
2865
|
({ isExtended: e, alignment: t }) => ({
|
|
2731
|
-
navigationRail:
|
|
2866
|
+
navigationRail: f("flex flex-col left-0 h-full top-0 pt-11", {
|
|
2732
2867
|
"w-fit max-w-24": !e,
|
|
2733
2868
|
"w-fit min-w-[220px] max-w-[360px]": e,
|
|
2734
2869
|
"justify-between": t == "middle",
|
|
2735
2870
|
"justify-start": t == "top"
|
|
2736
2871
|
}),
|
|
2737
|
-
header:
|
|
2872
|
+
header: f("flex flex-col gap-1 items-start"),
|
|
2738
2873
|
menuIcon: "mx-5",
|
|
2739
|
-
segments:
|
|
2874
|
+
segments: f(" flex flex-col overflow-auto min-w-full mt-10", {
|
|
2740
2875
|
"w-full": !e,
|
|
2741
2876
|
"w-fit items-start": e
|
|
2742
2877
|
})
|
|
2743
2878
|
})
|
|
2744
|
-
),
|
|
2879
|
+
), Pt = ({
|
|
2745
2880
|
variant: e = "standard",
|
|
2746
2881
|
onItemSelected: t,
|
|
2747
2882
|
children: r,
|
|
2748
2883
|
className: l,
|
|
2749
2884
|
selectedItem: n,
|
|
2750
|
-
extended:
|
|
2885
|
+
extended: a,
|
|
2751
2886
|
alignment: i = "top",
|
|
2752
|
-
menu:
|
|
2887
|
+
menu: c = {
|
|
2753
2888
|
closed: {
|
|
2754
|
-
icon:
|
|
2889
|
+
icon: st,
|
|
2755
2890
|
label: "Open menu"
|
|
2756
2891
|
},
|
|
2757
2892
|
opened: {
|
|
2758
|
-
icon:
|
|
2893
|
+
icon: ue,
|
|
2759
2894
|
label: "Close menu"
|
|
2760
2895
|
}
|
|
2761
2896
|
},
|
|
2762
|
-
style:
|
|
2897
|
+
style: d,
|
|
2763
2898
|
onExtendedChange: o,
|
|
2764
|
-
transition:
|
|
2899
|
+
transition: m,
|
|
2765
2900
|
setSelectedItem: h
|
|
2766
2901
|
}) => {
|
|
2767
|
-
const [
|
|
2768
|
-
let
|
|
2769
|
-
n == 0 || n != null ?
|
|
2770
|
-
const I = h || y, w =
|
|
2902
|
+
const [s, y] = R(null), [v, L] = R(a);
|
|
2903
|
+
let N;
|
|
2904
|
+
n == 0 || n != null ? N = n : N = s;
|
|
2905
|
+
const I = h || y, w = j(null), B = (k) => {
|
|
2771
2906
|
t == null || t(k);
|
|
2772
2907
|
};
|
|
2773
2908
|
function b(k) {
|
|
2774
|
-
const
|
|
2775
|
-
return
|
|
2776
|
-
ee(
|
|
2777
|
-
}),
|
|
2909
|
+
const p = [];
|
|
2910
|
+
return Ne.forEach(k, (M) => {
|
|
2911
|
+
ee(M) && M.type === Le ? p.push(...b(M.props.children)) : p.push(M);
|
|
2912
|
+
}), p;
|
|
2778
2913
|
}
|
|
2779
|
-
const E = b(r),
|
|
2780
|
-
(k) => ee(k) && k.type ===
|
|
2781
|
-
),
|
|
2914
|
+
const E = b(r), C = E.filter(
|
|
2915
|
+
(k) => ee(k) && k.type === fe
|
|
2916
|
+
), V = ft({
|
|
2782
2917
|
children: r,
|
|
2783
2918
|
onItemSelected: t,
|
|
2784
|
-
selectedItem:
|
|
2919
|
+
selectedItem: N,
|
|
2785
2920
|
setSelectedItem: I,
|
|
2786
2921
|
className: l,
|
|
2787
2922
|
variant: e,
|
|
2788
2923
|
extended: v,
|
|
2789
2924
|
isExtended: v,
|
|
2790
2925
|
alignment: i,
|
|
2791
|
-
menu:
|
|
2792
|
-
transition:
|
|
2926
|
+
menu: c,
|
|
2927
|
+
transition: m,
|
|
2793
2928
|
onExtendedChange: o
|
|
2794
2929
|
});
|
|
2795
|
-
|
|
2796
|
-
const P =
|
|
2797
|
-
return P.current = !1,
|
|
2930
|
+
m = { duration: 0.3, ...m };
|
|
2931
|
+
const P = j(!1);
|
|
2932
|
+
return P.current = !1, $(() => {
|
|
2798
2933
|
o == null || o(v ?? !1);
|
|
2799
|
-
}, [v]), /* @__PURE__ */
|
|
2934
|
+
}, [v]), /* @__PURE__ */ D(
|
|
2800
2935
|
"div",
|
|
2801
2936
|
{
|
|
2802
|
-
style: { transition:
|
|
2937
|
+
style: { transition: m.duration + "s", ...d },
|
|
2803
2938
|
ref: w,
|
|
2804
|
-
className:
|
|
2939
|
+
className: V.navigationRail,
|
|
2805
2940
|
children: [
|
|
2806
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ D("div", { className: V.header, children: [
|
|
2807
2942
|
/* @__PURE__ */ u(
|
|
2808
|
-
|
|
2943
|
+
ie,
|
|
2809
2944
|
{
|
|
2810
|
-
onClick: () =>
|
|
2811
|
-
label: v ?
|
|
2812
|
-
className:
|
|
2813
|
-
icon: v ?
|
|
2945
|
+
onClick: () => L(!v),
|
|
2946
|
+
label: v ? c == null ? void 0 : c.opened.label : c == null ? void 0 : c.closed.label,
|
|
2947
|
+
className: V.menuIcon,
|
|
2948
|
+
icon: v ? c.opened.icon : c == null ? void 0 : c.closed.icon
|
|
2814
2949
|
}
|
|
2815
2950
|
),
|
|
2816
|
-
|
|
2817
|
-
transition:
|
|
2951
|
+
C.length > 0 && le(C[0], {
|
|
2952
|
+
transition: m,
|
|
2818
2953
|
isExtended: v,
|
|
2819
|
-
className: "!shadow-none mx-5 " +
|
|
2954
|
+
className: "!shadow-none mx-5 " + C[0].props.className
|
|
2820
2955
|
})
|
|
2821
2956
|
] }),
|
|
2822
|
-
/* @__PURE__ */ u("div", { className:
|
|
2957
|
+
/* @__PURE__ */ u("div", { className: V.segments, children: (() => {
|
|
2823
2958
|
let k = 0;
|
|
2824
|
-
return E.map((
|
|
2825
|
-
|
|
2959
|
+
return E.map((p) => ee(p) && p.type === dt ? le(
|
|
2960
|
+
p,
|
|
2826
2961
|
{
|
|
2827
2962
|
key: k,
|
|
2828
2963
|
index: k++,
|
|
2829
2964
|
// Utilise et incrémente le compteur dédié
|
|
2830
2965
|
variant: v ? "horizontal" : "vertical",
|
|
2831
|
-
selectedItem:
|
|
2966
|
+
selectedItem: N,
|
|
2832
2967
|
setSelectedItem: I,
|
|
2833
2968
|
onItemSelected: B,
|
|
2834
|
-
transition:
|
|
2969
|
+
transition: m,
|
|
2835
2970
|
extendedOnly: P.current,
|
|
2836
2971
|
isExtended: v
|
|
2837
2972
|
}
|
|
2838
|
-
) : ee(
|
|
2973
|
+
) : ee(p) && p.type === fe ? null : ee(p) && p.type === ut ? (P.current = !0, v ? le(p, {}) : null) : p);
|
|
2839
2974
|
})() }),
|
|
2840
2975
|
/* @__PURE__ */ u("div", { className: "flex-1 max-h-[160px]" })
|
|
2841
2976
|
]
|
|
@@ -2843,49 +2978,51 @@ const Mt = ({
|
|
|
2843
2978
|
);
|
|
2844
2979
|
};
|
|
2845
2980
|
export {
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2981
|
+
ze as Button,
|
|
2982
|
+
Et as Card,
|
|
2983
|
+
kt as Carousel,
|
|
2984
|
+
et as CarouselItem,
|
|
2985
|
+
ge as CustomScroll,
|
|
2986
|
+
tt as Divider,
|
|
2987
|
+
fe as Fab,
|
|
2853
2988
|
Q as Icon,
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2989
|
+
ie as IconButton,
|
|
2990
|
+
Pt as NavigationRail,
|
|
2991
|
+
dt as NavigationRailItem,
|
|
2992
|
+
ut as NavigationRailSection,
|
|
2993
|
+
Ze as ProgressIndicator,
|
|
2859
2994
|
ne as RippleEffect,
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
Ct as
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
$e as
|
|
2995
|
+
Rt as SlideSheet,
|
|
2996
|
+
St as Slider,
|
|
2997
|
+
Lt as SmoothScroll,
|
|
2998
|
+
Ct as Snackbar,
|
|
2999
|
+
Mt as Switch,
|
|
3000
|
+
Qe as SyncedFixedWrapper,
|
|
3001
|
+
ct as Tab,
|
|
3002
|
+
Bt as Tabs,
|
|
3003
|
+
$t as TextField,
|
|
3004
|
+
It as ThemeProvider,
|
|
3005
|
+
we as ToolTip,
|
|
3006
|
+
$e as buttonStyle,
|
|
3007
|
+
Pe as cardStyle,
|
|
2872
3008
|
We as carouselItemStyle,
|
|
2873
3009
|
De as carouselStyle,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3010
|
+
f as classNames,
|
|
3011
|
+
Ce as classnames,
|
|
3012
|
+
Je as customScrollStyle,
|
|
3013
|
+
_ as defaultClassNames,
|
|
2878
3014
|
Ve as dividerStyle,
|
|
2879
|
-
|
|
3015
|
+
je as fabStyle,
|
|
2880
3016
|
Be as getClassNames,
|
|
2881
|
-
|
|
2882
|
-
|
|
3017
|
+
Ue as iconButtonStyle,
|
|
3018
|
+
Te as normalize,
|
|
2883
3019
|
Fe as progressIndicatorStyle,
|
|
3020
|
+
Xe as slideSheetStyle,
|
|
2884
3021
|
He as sliderStyle,
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
3022
|
+
Oe as snackbarStyle,
|
|
3023
|
+
qe as switchStyle,
|
|
3024
|
+
_e as tabStyle,
|
|
3025
|
+
Ke as tabsStyle,
|
|
3026
|
+
Ge as textFieldStyle,
|
|
3027
|
+
Ye as toolStyle
|
|
2891
3028
|
};
|