@udixio/ui-react 1.0.0 → 1.1.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 +16 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1131 -1126
- package/dist/lib/components/Button.d.ts +1 -1
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/interfaces/button.interface.d.ts +6 -0
- package/dist/lib/interfaces/button.interface.d.ts.map +1 -1
- package/dist/lib/styles/button.style.d.ts +4 -0
- package/dist/lib/styles/button.style.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/lib/components/Button.tsx +2 -0
- package/src/lib/interfaces/button.interface.ts +7 -0
- package/src/lib/styles/button.style.ts +12 -9
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u, jsxs as U, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as de } from "clsx";
|
|
3
3
|
import { extendTailwindMerge as we } from "tailwind-merge";
|
|
4
|
-
import _, { useState as
|
|
4
|
+
import _, { useState as S, useEffect as P, useRef as V, useLayoutEffect as fe, isValidElement as ee, cloneElement as le, useMemo as ve, Children as be, Fragment as Ne } from "react";
|
|
5
5
|
import { motion as j, AnimatePresence as z, useScroll as Le, useMotionValueEvent as se, motionValue as me, useTransform as oe } from "motion/react";
|
|
6
6
|
import { throttle as Ee } from "throttle-debounce";
|
|
7
7
|
import { createPortal as Ie } from "react-dom";
|
|
@@ -39,40 +39,41 @@ function Re(e) {
|
|
|
39
39
|
const Se = (e) => {
|
|
40
40
|
const t = {};
|
|
41
41
|
e.classNameList.forEach((l) => {
|
|
42
|
-
var
|
|
42
|
+
var n;
|
|
43
43
|
if (l)
|
|
44
44
|
if (typeof l == "string")
|
|
45
|
-
(t[
|
|
45
|
+
(t[n = e.default] ?? (t[n] = [])).push(l);
|
|
46
46
|
else {
|
|
47
|
-
const
|
|
48
|
-
Object.entries(
|
|
49
|
-
const [
|
|
50
|
-
(t[
|
|
47
|
+
const a = l(e.states);
|
|
48
|
+
Object.entries(a).map((i) => {
|
|
49
|
+
const [s, d] = i;
|
|
50
|
+
(t[s] ?? (t[s] = [])).push(d);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
const
|
|
54
|
+
const r = t;
|
|
55
55
|
return Object.entries(t).map((l) => {
|
|
56
|
-
let [
|
|
57
|
-
|
|
58
|
-
}),
|
|
59
|
-
},
|
|
60
|
-
classNameList: [
|
|
56
|
+
let [n, a] = l;
|
|
57
|
+
a = a.reverse(), n == e.default && a.unshift("relative"), a.unshift(Re(n)), r[n] = Me(...a);
|
|
58
|
+
}), r;
|
|
59
|
+
}, G = (e, t) => (r) => Se({
|
|
60
|
+
classNameList: [r.className, t],
|
|
61
61
|
default: e,
|
|
62
|
-
states:
|
|
63
|
-
}), Be =
|
|
62
|
+
states: r
|
|
63
|
+
}), Be = G(
|
|
64
64
|
"button",
|
|
65
65
|
({
|
|
66
66
|
variant: e,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
disableTextMargins: t,
|
|
68
|
+
disabled: r,
|
|
69
|
+
iconPosition: l,
|
|
70
|
+
icon: n,
|
|
71
|
+
isActive: a,
|
|
71
72
|
loading: i,
|
|
72
|
-
shape:
|
|
73
|
-
onToggle:
|
|
73
|
+
shape: s,
|
|
74
|
+
onToggle: d,
|
|
74
75
|
size: o,
|
|
75
|
-
allowShapeTransformation:
|
|
76
|
+
allowShapeTransformation: y
|
|
76
77
|
}) => ({
|
|
77
78
|
button: f(
|
|
78
79
|
" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",
|
|
@@ -81,64 +82,66 @@ const Se = (e) => {
|
|
|
81
82
|
o === "medium" && "text-title-medium px-6 py-4 gap-2",
|
|
82
83
|
o === "large" && "text-headline-small px-12 py-8 gap-3",
|
|
83
84
|
o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
|
|
84
|
-
|
|
85
|
+
s === "rounded" && {
|
|
85
86
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
86
87
|
"rounded-[40px]": o === "medium",
|
|
87
88
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
88
89
|
},
|
|
89
|
-
(
|
|
90
|
+
(s === "squared" || y && a) && {
|
|
90
91
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
91
92
|
"rounded-[16px]": o === "medium",
|
|
92
93
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
93
94
|
},
|
|
94
|
-
|
|
95
|
+
y && !r && {
|
|
95
96
|
"active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
96
97
|
"active:rounded-[16px]": o === "medium",
|
|
97
98
|
"active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
98
99
|
},
|
|
99
100
|
e === "elevated" && {
|
|
100
|
-
"shadow-1 hover:shadow-2": !
|
|
101
|
-
"bg-surface-container-low text-primary": !
|
|
102
|
-
"bg-primary text-on-primary": !
|
|
103
|
-
"text-on-surface/[38%]":
|
|
101
|
+
"shadow-1 hover:shadow-2": !r,
|
|
102
|
+
"bg-surface-container-low text-primary": !r && !a,
|
|
103
|
+
"bg-primary text-on-primary": !r && a,
|
|
104
|
+
"text-on-surface/[38%]": r
|
|
104
105
|
},
|
|
105
106
|
e === "filled" && {
|
|
106
|
-
"hover:shadow-1": !
|
|
107
|
-
"bg-surface-container text-on-surface-variant": !
|
|
108
|
-
"bg-primary text-on-primary": !
|
|
109
|
-
"text-on-surface/[38%]":
|
|
107
|
+
"hover:shadow-1": !r,
|
|
108
|
+
"bg-surface-container text-on-surface-variant": !r && !a && d,
|
|
109
|
+
"bg-primary text-on-primary": !r && (a && d || !d),
|
|
110
|
+
"text-on-surface/[38%]": r
|
|
110
111
|
},
|
|
111
112
|
e === "tonal" && {
|
|
112
|
-
"hover:shadow-1": !
|
|
113
|
-
"bg-secondary-container text-on-secondary-container": !
|
|
114
|
-
"bg-secondary text-on-secondary": !
|
|
115
|
-
"text-on-surface/[0.38]":
|
|
113
|
+
"hover:shadow-1": !r,
|
|
114
|
+
"bg-secondary-container text-on-secondary-container": !r && !a,
|
|
115
|
+
"bg-secondary text-on-secondary": !r && a,
|
|
116
|
+
"text-on-surface/[0.38]": r
|
|
116
117
|
},
|
|
117
118
|
e === "outlined" && [
|
|
118
119
|
" border",
|
|
119
120
|
{
|
|
120
|
-
"border-on-surface/[0.12] text-on-surface/[0.38]":
|
|
121
|
-
"text-primary border-outline focus:border-primary": !
|
|
122
|
-
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !
|
|
121
|
+
"border-on-surface/[0.12] text-on-surface/[0.38]": r,
|
|
122
|
+
"text-primary border-outline focus:border-primary": !r && !a,
|
|
123
|
+
"text-inverse-on-surface bg-inverse-surface border-inverse-surface": !r && a
|
|
123
124
|
}
|
|
124
125
|
],
|
|
125
126
|
e === "text" && [
|
|
126
127
|
"w-fit",
|
|
127
128
|
{
|
|
128
|
-
"text-primary": !
|
|
129
|
-
"text-on-surface/[0.38]":
|
|
129
|
+
"text-primary": !r,
|
|
130
|
+
"text-on-surface/[0.38]": r
|
|
130
131
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
t && [
|
|
133
|
+
o === "xSmall" && "-mx-3 ",
|
|
134
|
+
o === "small" && "-mx-4 ",
|
|
135
|
+
o === "medium" && "-mx-6 ",
|
|
136
|
+
o === "large" && "-mx-12",
|
|
137
|
+
o === "xLarge" && "-mx-16 "
|
|
138
|
+
// size === 'small' && ' -my-2.5',
|
|
139
|
+
// size === 'medium' && ' -my-4',
|
|
140
|
+
// size === 'large' && '-my-8',
|
|
141
|
+
// size === 'xLarge' && ' -my-12',
|
|
142
|
+
]
|
|
140
143
|
],
|
|
141
|
-
|
|
144
|
+
r && "cursor-default"
|
|
142
145
|
),
|
|
143
146
|
touchTarget: f(
|
|
144
147
|
"absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
|
|
@@ -146,38 +149,38 @@ const Se = (e) => {
|
|
|
146
149
|
stateLayer: f(
|
|
147
150
|
"min-h-full min-w-full absolute top-0 left-0 overflow-hidden",
|
|
148
151
|
e === "elevated" && {
|
|
149
|
-
"bg-on-surface/[0.12]":
|
|
150
|
-
"group-state-primary": !
|
|
152
|
+
"bg-on-surface/[0.12]": r,
|
|
153
|
+
"group-state-primary": !r
|
|
151
154
|
},
|
|
152
155
|
e === "filled" && {
|
|
153
|
-
"bg-on-surface/[0.12]":
|
|
154
|
-
"group-state-on-primary": !
|
|
155
|
-
"group-state-on-surface-variant": !
|
|
156
|
+
"bg-on-surface/[0.12]": r,
|
|
157
|
+
"group-state-on-primary": !r && !d,
|
|
158
|
+
"group-state-on-surface-variant": !r && d
|
|
156
159
|
},
|
|
157
|
-
|
|
160
|
+
s === "rounded" && {
|
|
158
161
|
"rounded-[30px]": o === "xSmall" || o == "small",
|
|
159
162
|
"rounded-[40px]": o === "medium",
|
|
160
163
|
"rounded-[70px]": o === "large" || o == "xLarge"
|
|
161
164
|
},
|
|
162
|
-
(
|
|
165
|
+
(s === "squared" || y && a) && {
|
|
163
166
|
"rounded-[12px]": o === "xSmall" || o == "small",
|
|
164
167
|
"rounded-[16px]": o === "medium",
|
|
165
168
|
"rounded-[28px]": o === "large" || o == "xLarge"
|
|
166
169
|
},
|
|
167
|
-
|
|
170
|
+
y && !r && {
|
|
168
171
|
"group-active:rounded-[12px]": o === "xSmall" || o == "small",
|
|
169
172
|
"group-active:rounded-[16px]": o === "medium",
|
|
170
173
|
"group-active:rounded-[28px]": o === "large" || o == "xLarge"
|
|
171
174
|
},
|
|
172
175
|
e === "tonal" && {
|
|
173
|
-
"bg-on-surface/[0.12]":
|
|
174
|
-
"group-state-on-secondary-container ": !
|
|
176
|
+
"bg-on-surface/[0.12]": r,
|
|
177
|
+
"group-state-on-secondary-container ": !r
|
|
175
178
|
},
|
|
176
179
|
e === "outlined" && {
|
|
177
|
-
"group-state-primary group-state-primary": !
|
|
180
|
+
"group-state-primary group-state-primary": !r
|
|
178
181
|
},
|
|
179
182
|
e === "text" && {
|
|
180
|
-
"group-state-primary": !
|
|
183
|
+
"group-state-primary": !r
|
|
181
184
|
}
|
|
182
185
|
),
|
|
183
186
|
label: f({ invisible: i }),
|
|
@@ -190,7 +193,7 @@ const Se = (e) => {
|
|
|
190
193
|
o === "xLarge" && "size-10"
|
|
191
194
|
)
|
|
192
195
|
})
|
|
193
|
-
), Ce =
|
|
196
|
+
), Ce = G(
|
|
194
197
|
"card",
|
|
195
198
|
({ variant: e, isInteractive: t }) => ({
|
|
196
199
|
card: f(
|
|
@@ -206,12 +209,12 @@ const Se = (e) => {
|
|
|
206
209
|
}
|
|
207
210
|
])
|
|
208
211
|
})
|
|
209
|
-
), We =
|
|
212
|
+
), We = G(
|
|
210
213
|
"carouselItem",
|
|
211
214
|
() => ({
|
|
212
215
|
carouselItem: f("rounded-[28px] overflow-hidden flex-none")
|
|
213
216
|
})
|
|
214
|
-
), De =
|
|
217
|
+
), De = G(
|
|
215
218
|
"carousel",
|
|
216
219
|
() => ({
|
|
217
220
|
carousel: f(["w-full h-[400px]"]),
|
|
@@ -219,7 +222,7 @@ const Se = (e) => {
|
|
|
219
222
|
"grid grid-flow-col h-full transition-transform ease-out w-fit"
|
|
220
223
|
)
|
|
221
224
|
})
|
|
222
|
-
), Pe =
|
|
225
|
+
), Pe = G(
|
|
223
226
|
"divider",
|
|
224
227
|
({ orientation: e }) => ({
|
|
225
228
|
divider: f(
|
|
@@ -232,20 +235,20 @@ const Se = (e) => {
|
|
|
232
235
|
}
|
|
233
236
|
)
|
|
234
237
|
})
|
|
235
|
-
), $e =
|
|
238
|
+
), $e = G(
|
|
236
239
|
"fab",
|
|
237
|
-
({ size: e, variant: t, isExtended:
|
|
240
|
+
({ size: e, variant: t, isExtended: r }) => ({
|
|
238
241
|
fab: f(
|
|
239
242
|
"flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",
|
|
240
243
|
{
|
|
241
|
-
"rounded-[12px]": e == "small" && !
|
|
242
|
-
"rounded-[16px]": e == "medium" ||
|
|
243
|
-
"rounded-[28px]": e == "large" && !
|
|
244
|
+
"rounded-[12px]": e == "small" && !r,
|
|
245
|
+
"rounded-[16px]": e == "medium" || r,
|
|
246
|
+
"rounded-[28px]": e == "large" && !r
|
|
244
247
|
},
|
|
245
248
|
{
|
|
246
|
-
"p-2": e == "small" && !
|
|
247
|
-
"p-4": e == "medium" ||
|
|
248
|
-
"p-[30px]": e == "large" && !
|
|
249
|
+
"p-2": e == "small" && !r,
|
|
250
|
+
"p-4": e == "medium" || r,
|
|
251
|
+
"p-[30px]": e == "large" && !r
|
|
249
252
|
},
|
|
250
253
|
t === "surface" && "bg-surface-container",
|
|
251
254
|
t === "primary" && "bg-primary-container",
|
|
@@ -261,8 +264,8 @@ const Se = (e) => {
|
|
|
261
264
|
),
|
|
262
265
|
icon: f(
|
|
263
266
|
{
|
|
264
|
-
"size-6": e == "small" || e == "medium" ||
|
|
265
|
-
"size-9": e == "large" && !
|
|
267
|
+
"size-6": e == "small" || e == "medium" || r,
|
|
268
|
+
"size-9": e == "large" && !r
|
|
266
269
|
},
|
|
267
270
|
t === "surface" && "text-primary",
|
|
268
271
|
t === "primary" && "text-on-primary-container",
|
|
@@ -277,17 +280,17 @@ const Se = (e) => {
|
|
|
277
280
|
t === "tertiary" && "text-on-tertiary-container"
|
|
278
281
|
)
|
|
279
282
|
})
|
|
280
|
-
), Ve =
|
|
283
|
+
), Ve = G(
|
|
281
284
|
"iconButton",
|
|
282
285
|
({
|
|
283
286
|
variant: e,
|
|
284
287
|
disabled: t,
|
|
285
|
-
onToggle:
|
|
288
|
+
onToggle: r,
|
|
286
289
|
isActive: l,
|
|
287
|
-
size:
|
|
288
|
-
width:
|
|
289
|
-
shape:
|
|
290
|
-
allowShapeTransformation:
|
|
290
|
+
size: n,
|
|
291
|
+
width: a,
|
|
292
|
+
shape: i,
|
|
293
|
+
allowShapeTransformation: s
|
|
291
294
|
}) => ({
|
|
292
295
|
iconButton: f(
|
|
293
296
|
"rounded-full relative flex transition-all duration-300",
|
|
@@ -295,32 +298,32 @@ const Se = (e) => {
|
|
|
295
298
|
{
|
|
296
299
|
"cursor-default": t
|
|
297
300
|
},
|
|
298
|
-
(
|
|
299
|
-
"rounded-[30px]":
|
|
300
|
-
"rounded-[40px]":
|
|
301
|
-
"rounded-[70px]":
|
|
301
|
+
(i === "rounded" || i === "squared" && r && !t && l && s) && {
|
|
302
|
+
"rounded-[30px]": n === "xSmall" || n == "small",
|
|
303
|
+
"rounded-[40px]": n === "medium",
|
|
304
|
+
"rounded-[70px]": n === "large" || n == "xLarge"
|
|
302
305
|
},
|
|
303
|
-
(
|
|
304
|
-
"rounded-[12px]":
|
|
305
|
-
"rounded-[16px]":
|
|
306
|
-
"rounded-[28px]":
|
|
306
|
+
(i === "squared" || i === "rounded" && r && !t && l && s) && {
|
|
307
|
+
"rounded-[12px]": n === "xSmall" || n == "small",
|
|
308
|
+
"rounded-[16px]": n === "medium",
|
|
309
|
+
"rounded-[28px]": n === "large" || n == "xLarge"
|
|
307
310
|
},
|
|
308
|
-
|
|
309
|
-
"group-active:rounded-[12px]":
|
|
310
|
-
"group-active:rounded-[16px]":
|
|
311
|
-
"group-active:rounded-[28px]":
|
|
311
|
+
s && !t && {
|
|
312
|
+
"group-active:rounded-[12px]": n === "xSmall" || n == "small",
|
|
313
|
+
"group-active:rounded-[16px]": n === "medium",
|
|
314
|
+
"group-active:rounded-[28px]": n === "large" || n == "xLarge"
|
|
312
315
|
},
|
|
313
316
|
e === "filled" && [
|
|
314
317
|
!t && {
|
|
315
|
-
"bg-surface-container": !l && !!
|
|
316
|
-
"bg-primary": l || !
|
|
318
|
+
"bg-surface-container": !l && !!r,
|
|
319
|
+
"bg-primary": l || !r
|
|
317
320
|
},
|
|
318
321
|
!!t && "bg-on-surface/[0.12]"
|
|
319
322
|
],
|
|
320
323
|
e === "tonal" && [
|
|
321
324
|
!t && {
|
|
322
|
-
"bg-surface-container": !l && !!
|
|
323
|
-
"bg-secondary-container": l || !
|
|
325
|
+
"bg-surface-container": !l && !!r,
|
|
326
|
+
"bg-secondary-container": l || !r
|
|
324
327
|
},
|
|
325
328
|
!!t && "bg-on-surface/[0.12]"
|
|
326
329
|
],
|
|
@@ -340,20 +343,20 @@ const Se = (e) => {
|
|
|
340
343
|
),
|
|
341
344
|
stateLayer: f(
|
|
342
345
|
"absolute top-0 left-0 h-full w-full overflow-hidden",
|
|
343
|
-
(
|
|
344
|
-
"rounded-[30px]":
|
|
345
|
-
"rounded-[40px]":
|
|
346
|
-
"rounded-[70px]":
|
|
346
|
+
(i === "rounded" || i === "squared" && r && !t && l && s) && {
|
|
347
|
+
"rounded-[30px]": n === "xSmall" || n == "small",
|
|
348
|
+
"rounded-[40px]": n === "medium",
|
|
349
|
+
"rounded-[70px]": n === "large" || n == "xLarge"
|
|
347
350
|
},
|
|
348
|
-
(
|
|
349
|
-
"rounded-[12px]":
|
|
350
|
-
"rounded-[16px]":
|
|
351
|
-
"rounded-[28px]":
|
|
351
|
+
(i === "squared" || i === "rounded" && r && !t && l && s) && {
|
|
352
|
+
"rounded-[12px]": n === "xSmall" || n == "small",
|
|
353
|
+
"rounded-[16px]": n === "medium",
|
|
354
|
+
"rounded-[28px]": n === "large" || n == "xLarge"
|
|
352
355
|
},
|
|
353
|
-
|
|
354
|
-
"group-active:rounded-[12px]":
|
|
355
|
-
"group-active:rounded-[16px]":
|
|
356
|
-
"group-active:rounded-[28px]":
|
|
356
|
+
s && !t && {
|
|
357
|
+
"group-active:rounded-[12px]": n === "xSmall" || n == "small",
|
|
358
|
+
"group-active:rounded-[16px]": n === "medium",
|
|
359
|
+
"group-active:rounded-[28px]": n === "large" || n == "xLarge"
|
|
357
360
|
},
|
|
358
361
|
!t && [
|
|
359
362
|
e === "standard" && {
|
|
@@ -361,12 +364,12 @@ const Se = (e) => {
|
|
|
361
364
|
"state-primary": l
|
|
362
365
|
},
|
|
363
366
|
e === "filled" && {
|
|
364
|
-
"state-primary": !l && !!
|
|
365
|
-
"state-inverse-on-surface": l || !
|
|
367
|
+
"state-primary": !l && !!r,
|
|
368
|
+
"state-inverse-on-surface": l || !r
|
|
366
369
|
},
|
|
367
370
|
e === "tonal" && {
|
|
368
|
-
"state-on-surface-variant": !l && !!
|
|
369
|
-
"state-on-secondary-container": l || !
|
|
371
|
+
"state-on-surface-variant": !l && !!r,
|
|
372
|
+
"state-on-secondary-container": l || !r
|
|
370
373
|
},
|
|
371
374
|
e === "outlined" && {
|
|
372
375
|
"state-on-surface-variant": !l,
|
|
@@ -376,24 +379,24 @@ const Se = (e) => {
|
|
|
376
379
|
),
|
|
377
380
|
icon: f(
|
|
378
381
|
" transition-all duration-300",
|
|
379
|
-
{ "size-5 p-1.5":
|
|
380
|
-
{ "size-6 p-2":
|
|
381
|
-
{ "size-6 p-4":
|
|
382
|
-
{ "size-8 p-8":
|
|
383
|
-
{ "size-10 p-12":
|
|
384
|
-
|
|
385
|
-
{ "px-1":
|
|
386
|
-
{ "px-1":
|
|
387
|
-
{ "px-3":
|
|
388
|
-
{ "px-4":
|
|
389
|
-
{ "px-8":
|
|
382
|
+
{ "size-5 p-1.5": n === "xSmall" },
|
|
383
|
+
{ "size-6 p-2": n === "small" },
|
|
384
|
+
{ "size-6 p-4": n === "medium" },
|
|
385
|
+
{ "size-8 p-8": n === "large" },
|
|
386
|
+
{ "size-10 p-12": n === "xLarge" },
|
|
387
|
+
a == "narrow" && [
|
|
388
|
+
{ "px-1": n === "xSmall" },
|
|
389
|
+
{ "px-1": n === "small" },
|
|
390
|
+
{ "px-3": n === "medium" },
|
|
391
|
+
{ "px-4": n === "large" },
|
|
392
|
+
{ "px-8": n === "xLarge" }
|
|
390
393
|
],
|
|
391
|
-
|
|
392
|
-
{ "px-2.5":
|
|
393
|
-
{ "px-3.5":
|
|
394
|
-
{ "px-6":
|
|
395
|
-
{ "px-12":
|
|
396
|
-
{ "px-[72px]":
|
|
394
|
+
a == "wide" && [
|
|
395
|
+
{ "px-2.5": n === "xSmall" },
|
|
396
|
+
{ "px-3.5": n === "small" },
|
|
397
|
+
{ "px-6": n === "medium" },
|
|
398
|
+
{ "px-12": n === "large" },
|
|
399
|
+
{ "px-[72px]": n === "xLarge" }
|
|
397
400
|
],
|
|
398
401
|
!t && [
|
|
399
402
|
e === "standard" && {
|
|
@@ -401,12 +404,12 @@ const Se = (e) => {
|
|
|
401
404
|
"text-primary": l
|
|
402
405
|
},
|
|
403
406
|
e === "filled" && {
|
|
404
|
-
"text-primary": !l && !!
|
|
405
|
-
"text-on-primary": l || !
|
|
407
|
+
"text-primary": !l && !!r,
|
|
408
|
+
"text-on-primary": l || !r
|
|
406
409
|
},
|
|
407
410
|
e === "tonal" && {
|
|
408
|
-
"text-on-surface-variant": !l && !!
|
|
409
|
-
"text-on-secondary-container": l || !
|
|
411
|
+
"text-on-surface-variant": !l && !!r,
|
|
412
|
+
"text-on-secondary-container": l || !r
|
|
410
413
|
},
|
|
411
414
|
e === "outlined" && {
|
|
412
415
|
"text-on-surface-variant": !l,
|
|
@@ -416,7 +419,7 @@ const Se = (e) => {
|
|
|
416
419
|
!!t && "text-on-surface/[0.38]"
|
|
417
420
|
)
|
|
418
421
|
})
|
|
419
|
-
), Ue =
|
|
422
|
+
), Ue = G(
|
|
420
423
|
"progressIndicator",
|
|
421
424
|
({ variant: e, isVisible: t }) => ({
|
|
422
425
|
progressIndicator: f(
|
|
@@ -448,7 +451,7 @@ const Se = (e) => {
|
|
|
448
451
|
}
|
|
449
452
|
)
|
|
450
453
|
})
|
|
451
|
-
), je =
|
|
454
|
+
), je = G(
|
|
452
455
|
"slider",
|
|
453
456
|
({ isChanging: e }) => ({
|
|
454
457
|
slider: f([
|
|
@@ -471,7 +474,7 @@ const Se = (e) => {
|
|
|
471
474
|
"h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
|
|
472
475
|
])
|
|
473
476
|
})
|
|
474
|
-
), Fe =
|
|
477
|
+
), Fe = G(
|
|
475
478
|
"snackbar",
|
|
476
479
|
() => ({
|
|
477
480
|
snackbar: f(" rounded bg-inverse-surface "),
|
|
@@ -481,9 +484,9 @@ const Se = (e) => {
|
|
|
481
484
|
supportingText: f("text-body-medium text-inverse-on-surface "),
|
|
482
485
|
icon: f(" ml-auto mr-0 text-inverse-on-surface block dark")
|
|
483
486
|
})
|
|
484
|
-
), Xe =
|
|
487
|
+
), Xe = G(
|
|
485
488
|
"switch",
|
|
486
|
-
({ isSelected: e, disabled: t, inactiveIcon:
|
|
489
|
+
({ isSelected: e, disabled: t, inactiveIcon: r }) => ({
|
|
487
490
|
switch: f(
|
|
488
491
|
"group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
|
|
489
492
|
{ "bg-on-surface/[0.12] border-transparent": t },
|
|
@@ -502,8 +505,8 @@ const Se = (e) => {
|
|
|
502
505
|
),
|
|
503
506
|
handle: f(
|
|
504
507
|
"transition-all duration-100 z-10 rounded-full flex items-center justify-center",
|
|
505
|
-
{ "w-[16px] h-[16px]": !e && !
|
|
506
|
-
{ "w-[24px] h-[24px]": !(!e && !
|
|
508
|
+
{ "w-[16px] h-[16px]": !e && !r },
|
|
509
|
+
{ "w-[24px] h-[24px]": !(!e && !r) },
|
|
507
510
|
!t && [
|
|
508
511
|
"cursor-pointer group-active:h-[28px] group-active:w-[28px]",
|
|
509
512
|
{ "bg-on-primary group-hover:bg-primary-container": e },
|
|
@@ -524,14 +527,14 @@ const Se = (e) => {
|
|
|
524
527
|
{ "text-on-surface/[0.38]": t }
|
|
525
528
|
)
|
|
526
529
|
})
|
|
527
|
-
), Oe =
|
|
530
|
+
), Oe = G(
|
|
528
531
|
"tab",
|
|
529
|
-
({ isSelected: e, icon: t, label:
|
|
532
|
+
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
530
533
|
tab: f(
|
|
531
534
|
"bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",
|
|
532
535
|
{ "z-10": e },
|
|
533
|
-
!!(t &&
|
|
534
|
-
!(t &&
|
|
536
|
+
!!(t && r) && l === "primary" && "h-16",
|
|
537
|
+
!(t && r && l === "primary") && "h-12"
|
|
535
538
|
),
|
|
536
539
|
stateLayer: f(
|
|
537
540
|
"absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
|
|
@@ -547,12 +550,12 @@ const Se = (e) => {
|
|
|
547
550
|
relative: l == "primary"
|
|
548
551
|
},
|
|
549
552
|
{
|
|
550
|
-
"": !!(
|
|
553
|
+
"": !!(r && !t)
|
|
551
554
|
},
|
|
552
555
|
l === "primary" && "flex-col items-center",
|
|
553
556
|
l === "secondary" && {
|
|
554
|
-
"flex-col items-center": !(
|
|
555
|
-
"flex-row items-center gap-2": !!(
|
|
557
|
+
"flex-col items-center": !(r && t),
|
|
558
|
+
"flex-row items-center gap-2": !!(r && t)
|
|
556
559
|
}
|
|
557
560
|
),
|
|
558
561
|
icon: f(
|
|
@@ -583,7 +586,7 @@ const Se = (e) => {
|
|
|
583
586
|
l === "secondary" && "h-0.5"
|
|
584
587
|
)
|
|
585
588
|
})
|
|
586
|
-
), qe =
|
|
589
|
+
), qe = G(
|
|
587
590
|
"tabs",
|
|
588
591
|
({ scrollable: e }) => ({
|
|
589
592
|
tabs: f(
|
|
@@ -592,30 +595,30 @@ const Se = (e) => {
|
|
|
592
595
|
{ "overflow-x-auto": e }
|
|
593
596
|
)
|
|
594
597
|
})
|
|
595
|
-
), He =
|
|
598
|
+
), He = G(
|
|
596
599
|
"textField",
|
|
597
600
|
({
|
|
598
601
|
disabled: e,
|
|
599
602
|
leadingIcon: t,
|
|
600
|
-
trailingIcon:
|
|
603
|
+
trailingIcon: r,
|
|
601
604
|
variant: l,
|
|
602
|
-
errorText:
|
|
603
|
-
isFocused:
|
|
604
|
-
value:
|
|
605
|
-
suffix:
|
|
606
|
-
textLine:
|
|
605
|
+
errorText: n,
|
|
606
|
+
isFocused: a,
|
|
607
|
+
value: i,
|
|
608
|
+
suffix: s,
|
|
609
|
+
textLine: d
|
|
607
610
|
}) => ({
|
|
608
611
|
textField: f({
|
|
609
612
|
"opacity-[.38]": e
|
|
610
613
|
}),
|
|
611
614
|
content: f(
|
|
612
615
|
"group transition-border duration-200 relative flex items-center ",
|
|
613
|
-
{ "h-14":
|
|
616
|
+
{ "h-14": d == "singleLine" },
|
|
614
617
|
{
|
|
615
|
-
"border-on-surface-variant": !(
|
|
616
|
-
"border-outline": !(
|
|
617
|
-
"border-primary": !(
|
|
618
|
-
"border-error": !!(
|
|
618
|
+
"border-on-surface-variant": !(n != null && n.length) && !a && l == "filled",
|
|
619
|
+
"border-outline": !(n != null && n.length) && !a && l == "outlined",
|
|
620
|
+
"border-primary": !(n != null && n.length) && a,
|
|
621
|
+
"border-error": !!(n != null && n.length)
|
|
619
622
|
},
|
|
620
623
|
{ "bg-on-surface/[0.04]": e },
|
|
621
624
|
l == "filled" && [
|
|
@@ -625,7 +628,7 @@ const Se = (e) => {
|
|
|
625
628
|
l == "outlined" && [
|
|
626
629
|
"border rounded box-border",
|
|
627
630
|
{
|
|
628
|
-
"border-[3px]":
|
|
631
|
+
"border-[3px]": a
|
|
629
632
|
}
|
|
630
633
|
]
|
|
631
634
|
),
|
|
@@ -636,15 +639,15 @@ const Se = (e) => {
|
|
|
636
639
|
},
|
|
637
640
|
{
|
|
638
641
|
"group-state-on-surface": !e,
|
|
639
|
-
"focus-state-on-surface":
|
|
642
|
+
"focus-state-on-surface": a
|
|
640
643
|
}
|
|
641
644
|
),
|
|
642
645
|
label: f(
|
|
643
646
|
"inline-flex outline-none whitespace-nowrap",
|
|
644
|
-
{ "text-on-surface-variant": !e && !(
|
|
647
|
+
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
645
648
|
{ "text-on-surface": e },
|
|
646
|
-
{ "text-error": !!(
|
|
647
|
-
{ "text-primary": !(
|
|
649
|
+
{ "text-error": !!(n != null && n.length) },
|
|
650
|
+
{ "text-primary": !(n != null && n.length) && a }
|
|
648
651
|
),
|
|
649
652
|
input: f(
|
|
650
653
|
"w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
|
|
@@ -653,7 +656,7 @@ const Se = (e) => {
|
|
|
653
656
|
"placeholder:text-on-surface text-on-surface": e
|
|
654
657
|
},
|
|
655
658
|
{
|
|
656
|
-
"pr-0": !!
|
|
659
|
+
"pr-0": !!s
|
|
657
660
|
},
|
|
658
661
|
l == "filled" && " pb-2 pt-6",
|
|
659
662
|
l == "outlined" && "py-4 relative z-10"
|
|
@@ -662,24 +665,24 @@ const Se = (e) => {
|
|
|
662
665
|
"absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
|
|
663
666
|
l == "filled" && [
|
|
664
667
|
"h-[2px] transition-all duration-300",
|
|
665
|
-
{ "bg-primary": !(
|
|
666
|
-
{ "bg-error": !!(
|
|
667
|
-
{ "!w-full":
|
|
668
|
+
{ "bg-primary": !(n != null && n.length) },
|
|
669
|
+
{ "bg-error": !!(n != null && n.length) },
|
|
670
|
+
{ "!w-full": a }
|
|
668
671
|
]
|
|
669
672
|
),
|
|
670
673
|
supportingText: f(
|
|
671
674
|
" text-body-small px-4 pt-1",
|
|
672
|
-
{ "text-on-surface-variant": !e && !(
|
|
675
|
+
{ "text-on-surface-variant": !e && !(n != null && n.length) },
|
|
673
676
|
{ "text-on-surface": e },
|
|
674
|
-
{ "!w-full":
|
|
675
|
-
{ "text-error": !!(
|
|
677
|
+
{ "!w-full": a },
|
|
678
|
+
{ "text-error": !!(n != null && n.length) }
|
|
676
679
|
),
|
|
677
680
|
leadingIcon: f([
|
|
678
681
|
"h-12 ml-3 flex items-center justify-center",
|
|
679
682
|
{ "cursor-text": !_.isValidElement(t) }
|
|
680
683
|
]),
|
|
681
684
|
trailingIcon: f("h-12 w-12 flex items-center justify-center", {
|
|
682
|
-
"cursor-text": !_.isValidElement(
|
|
685
|
+
"cursor-text": !_.isValidElement(r)
|
|
683
686
|
}),
|
|
684
687
|
suffix: f(
|
|
685
688
|
"text-on-surface-variant pl-0 pr-4",
|
|
@@ -687,7 +690,7 @@ const Se = (e) => {
|
|
|
687
690
|
l == "outlined" && "py-4 relative z-10"
|
|
688
691
|
)
|
|
689
692
|
})
|
|
690
|
-
), Ke =
|
|
693
|
+
), Ke = G(
|
|
691
694
|
"toolTip",
|
|
692
695
|
({ position: e, variant: t }) => ({
|
|
693
696
|
toolTip: f(
|
|
@@ -718,16 +721,16 @@ const Se = (e) => {
|
|
|
718
721
|
),
|
|
719
722
|
supportingText: f("")
|
|
720
723
|
})
|
|
721
|
-
), Q = ({ icon: e, colors: t = [], className:
|
|
722
|
-
const { icon: l } = e, [
|
|
723
|
-
switch (
|
|
724
|
+
), Q = ({ icon: e, colors: t = [], className: r }) => {
|
|
725
|
+
const { icon: l } = e, [n, a, , , i] = l || [], s = (d) => {
|
|
726
|
+
switch (d.length) {
|
|
724
727
|
case 2:
|
|
725
728
|
return {
|
|
726
|
-
"--fa-primary-color":
|
|
727
|
-
"--fa-secondary-color":
|
|
729
|
+
"--fa-primary-color": d[0] || "inherit",
|
|
730
|
+
"--fa-secondary-color": d[1] || "inherit"
|
|
728
731
|
};
|
|
729
732
|
case 1:
|
|
730
|
-
return { color:
|
|
733
|
+
return { color: d[0] };
|
|
731
734
|
default:
|
|
732
735
|
return {};
|
|
733
736
|
}
|
|
@@ -735,76 +738,76 @@ const Se = (e) => {
|
|
|
735
738
|
return /* @__PURE__ */ u(
|
|
736
739
|
"svg",
|
|
737
740
|
{
|
|
738
|
-
className: f("size-5 box-content",
|
|
741
|
+
className: f("size-5 box-content", r),
|
|
739
742
|
style: {
|
|
740
|
-
...
|
|
743
|
+
...s(t)
|
|
741
744
|
},
|
|
742
745
|
xmlns: "http://www.w3.org/2000/svg",
|
|
743
|
-
viewBox: `0 0 ${
|
|
746
|
+
viewBox: `0 0 ${n} ${a}`,
|
|
744
747
|
role: "img",
|
|
745
748
|
"aria-hidden": "true",
|
|
746
|
-
children: typeof
|
|
749
|
+
children: typeof i == "string" ? /* @__PURE__ */ u("path", { className: "fill-current", d: i }) : i.map((d, o) => /* @__PURE__ */ u("path", { d }, o))
|
|
747
750
|
}
|
|
748
751
|
);
|
|
749
752
|
}, Ge = ({
|
|
750
753
|
variant: e = "linear-determinate",
|
|
751
754
|
value: t = 0,
|
|
752
|
-
transitionDuration:
|
|
755
|
+
transitionDuration: r = 1e3,
|
|
753
756
|
className: l,
|
|
754
|
-
...
|
|
757
|
+
...n
|
|
755
758
|
}) => {
|
|
756
|
-
const [
|
|
757
|
-
|
|
758
|
-
t > 100 && (t = 100), t < 0 && (t = 0),
|
|
759
|
+
const [a, i] = S(t), [s] = S(1.5);
|
|
760
|
+
P(() => {
|
|
761
|
+
t > 100 && (t = 100), t < 0 && (t = 0), i(t);
|
|
759
762
|
}, [t]);
|
|
760
|
-
const [
|
|
761
|
-
|
|
762
|
-
if ((e === "circular-indeterminate" || e === "linear-indeterminate") &&
|
|
763
|
+
const [d, o] = S(!0), y = () => d ? s : s * 0.5;
|
|
764
|
+
P(() => {
|
|
765
|
+
if ((e === "circular-indeterminate" || e === "linear-indeterminate") && a !== 100) {
|
|
763
766
|
const v = setInterval(() => {
|
|
764
|
-
|
|
765
|
-
},
|
|
767
|
+
i(d ? 10 : 90), o(!d);
|
|
768
|
+
}, y() * 1e3);
|
|
766
769
|
return () => clearInterval(v);
|
|
767
770
|
}
|
|
768
|
-
}, [e,
|
|
769
|
-
const [
|
|
770
|
-
|
|
771
|
-
if (
|
|
771
|
+
}, [e, d, a]);
|
|
772
|
+
const [p, c] = S(!1);
|
|
773
|
+
P(() => {
|
|
774
|
+
if (a >= 100) {
|
|
772
775
|
const v = setTimeout(() => {
|
|
773
|
-
|
|
774
|
-
},
|
|
776
|
+
c(!1);
|
|
777
|
+
}, r);
|
|
775
778
|
return () => {
|
|
776
779
|
clearTimeout(v);
|
|
777
780
|
};
|
|
778
781
|
} else
|
|
779
|
-
|
|
780
|
-
}, [
|
|
781
|
-
const
|
|
782
|
+
c(!0);
|
|
783
|
+
}, [a, r]);
|
|
784
|
+
const h = Ue({
|
|
782
785
|
className: l,
|
|
783
786
|
variant: e,
|
|
784
787
|
value: t,
|
|
785
|
-
transitionDuration:
|
|
786
|
-
isVisible:
|
|
788
|
+
transitionDuration: r,
|
|
789
|
+
isVisible: p
|
|
787
790
|
});
|
|
788
791
|
return /* @__PURE__ */ U(re, { children: [
|
|
789
|
-
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ U("div", { className:
|
|
792
|
+
(e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ U("div", { className: h.progressIndicator, ...n, children: [
|
|
790
793
|
/* @__PURE__ */ u(
|
|
791
794
|
"div",
|
|
792
795
|
{
|
|
793
796
|
style: {
|
|
794
|
-
width: `${
|
|
795
|
-
transition: `width ${
|
|
797
|
+
width: `${a}%`,
|
|
798
|
+
transition: `width ${r}ms ease-in-out ${a == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
|
|
796
799
|
},
|
|
797
|
-
className:
|
|
800
|
+
className: h.track
|
|
798
801
|
}
|
|
799
802
|
),
|
|
800
803
|
/* @__PURE__ */ u(
|
|
801
804
|
"div",
|
|
802
805
|
{
|
|
803
806
|
style: {
|
|
804
|
-
marginLeft:
|
|
805
|
-
transition: `width ${
|
|
807
|
+
marginLeft: a != 100 ? "6px" : "0px",
|
|
808
|
+
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` : ""}`
|
|
806
809
|
},
|
|
807
|
-
className:
|
|
810
|
+
className: h.activeIndicator
|
|
808
811
|
}
|
|
809
812
|
),
|
|
810
813
|
/* @__PURE__ */ u(
|
|
@@ -812,9 +815,9 @@ const Se = (e) => {
|
|
|
812
815
|
{
|
|
813
816
|
style: {
|
|
814
817
|
width: "4 px",
|
|
815
|
-
transition: `width ${
|
|
818
|
+
transition: `width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
|
|
816
819
|
},
|
|
817
|
-
className:
|
|
820
|
+
className: h.stop
|
|
818
821
|
}
|
|
819
822
|
)
|
|
820
823
|
] }),
|
|
@@ -828,50 +831,50 @@ const Se = (e) => {
|
|
|
828
831
|
animate: { rotate: 270 },
|
|
829
832
|
transition: {
|
|
830
833
|
repeat: 1 / 0,
|
|
831
|
-
duration:
|
|
834
|
+
duration: y(),
|
|
832
835
|
ease: "linear"
|
|
833
836
|
},
|
|
834
|
-
className:
|
|
835
|
-
...
|
|
837
|
+
className: h.progressIndicator,
|
|
838
|
+
...n,
|
|
836
839
|
children: /* @__PURE__ */ u(
|
|
837
840
|
j.circle,
|
|
838
841
|
{
|
|
839
842
|
cx: "50%",
|
|
840
843
|
cy: "50%",
|
|
841
|
-
r:
|
|
844
|
+
r: p ? "calc(50% - 2px)" : "50%",
|
|
842
845
|
style: {
|
|
843
846
|
strokeLinecap: "round"
|
|
844
847
|
},
|
|
845
848
|
initial: "hidden",
|
|
846
849
|
animate: "visible",
|
|
847
|
-
className:
|
|
850
|
+
className: h.activeIndicator,
|
|
848
851
|
variants: {
|
|
849
852
|
hidden: {
|
|
850
|
-
pathLength:
|
|
853
|
+
pathLength: d ? 10 / 100 : 90 / 100
|
|
851
854
|
},
|
|
852
855
|
visible: {
|
|
853
|
-
pathLength:
|
|
856
|
+
pathLength: d ? 90 / 100 : 10 / 100
|
|
854
857
|
}
|
|
855
858
|
},
|
|
856
859
|
transition: {
|
|
857
860
|
pathLength: {
|
|
858
861
|
type: "tween",
|
|
859
862
|
ease: "linear",
|
|
860
|
-
duration:
|
|
863
|
+
duration: y(),
|
|
861
864
|
bounce: 0
|
|
862
865
|
}
|
|
863
866
|
}
|
|
864
867
|
}
|
|
865
868
|
)
|
|
866
869
|
},
|
|
867
|
-
|
|
870
|
+
d + ""
|
|
868
871
|
)
|
|
869
872
|
] });
|
|
870
873
|
}, ne = ({
|
|
871
874
|
colorName: e = "on-surface",
|
|
872
875
|
triggerRef: t
|
|
873
876
|
}) => {
|
|
874
|
-
const
|
|
877
|
+
const r = {
|
|
875
878
|
initial: {
|
|
876
879
|
opacity: 0,
|
|
877
880
|
borderRadius: "50%",
|
|
@@ -888,50 +891,50 @@ const Se = (e) => {
|
|
|
888
891
|
borderRadius: { duration: 0.3, delay: 0.3 }
|
|
889
892
|
}
|
|
890
893
|
}
|
|
891
|
-
}, [l,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}, [
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
897
|
-
return
|
|
898
|
-
|
|
894
|
+
}, [l, n] = S(!0), [a, i] = S(!1), [s, d] = S({ x: 0, y: 0 });
|
|
895
|
+
P(() => {
|
|
896
|
+
a && (n(!0), n(!1));
|
|
897
|
+
}, [a]), P(() => {
|
|
898
|
+
const c = t == null ? void 0 : t.current;
|
|
899
|
+
if (c)
|
|
900
|
+
return c.addEventListener("mousedown", o), c.addEventListener("mouseup", p), c.addEventListener("mouseleave", y), () => {
|
|
901
|
+
c.removeEventListener("mousedown", o), c.removeEventListener("mouseup", p), c.removeEventListener("mouseleave", y);
|
|
899
902
|
};
|
|
900
903
|
}, [t]);
|
|
901
|
-
const
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
x: (
|
|
905
|
-
y: (
|
|
904
|
+
const o = (c) => {
|
|
905
|
+
const h = t == null ? void 0 : t.current, v = h.getBoundingClientRect();
|
|
906
|
+
i(!0), d({
|
|
907
|
+
x: (c.clientX - v.left) / h.clientWidth * 100,
|
|
908
|
+
y: (c.clientY - v.top) / h.clientHeight * 100
|
|
906
909
|
});
|
|
907
|
-
},
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
|
|
910
|
+
}, y = (c) => {
|
|
911
|
+
i(!1);
|
|
912
|
+
}, p = (c) => {
|
|
913
|
+
i(!1);
|
|
911
914
|
};
|
|
912
|
-
return /* @__PURE__ */ u(z, { mode: "wait", children: (
|
|
915
|
+
return /* @__PURE__ */ u(z, { mode: "wait", children: (a || !a && !l) && /* @__PURE__ */ u(
|
|
913
916
|
j.div,
|
|
914
917
|
{
|
|
915
918
|
style: {
|
|
916
919
|
position: "absolute",
|
|
917
920
|
width: "100%",
|
|
918
921
|
height: "100%",
|
|
919
|
-
top:
|
|
920
|
-
left:
|
|
922
|
+
top: s.y + "%",
|
|
923
|
+
left: s.x + "%",
|
|
921
924
|
background: `color-mix(in srgb, var(--color-${e}) 12%, transparent)`,
|
|
922
925
|
pointerEvents: "none"
|
|
923
926
|
},
|
|
924
|
-
variants:
|
|
927
|
+
variants: r,
|
|
925
928
|
initial: "initial",
|
|
926
929
|
animate: "animate",
|
|
927
930
|
exit: { opacity: 0, transition: { duration: 0 } },
|
|
928
|
-
onAnimationComplete: () =>
|
|
931
|
+
onAnimationComplete: () => n(!0),
|
|
929
932
|
className: "transform -translate-x-1/2 -translate-y-1/2"
|
|
930
933
|
}
|
|
931
934
|
) });
|
|
932
|
-
}, Ye =
|
|
935
|
+
}, Ye = G(
|
|
933
936
|
"customScroll",
|
|
934
|
-
({ orientation: e, draggable: t, isDragging:
|
|
937
|
+
({ orientation: e, draggable: t, isDragging: r }) => ({
|
|
935
938
|
customScroll: f(
|
|
936
939
|
"flex h-full w-full",
|
|
937
940
|
t && [
|
|
@@ -939,8 +942,8 @@ const Se = (e) => {
|
|
|
939
942
|
"[&::-webkit-scrollbar-track]:bg-transparent",
|
|
940
943
|
"[&::-webkit-scrollbar-thumb]:rounded-full",
|
|
941
944
|
{
|
|
942
|
-
"[&::-webkit-scrollbar-thumb]:bg-outline":
|
|
943
|
-
"[&::-webkit-scrollbar-thumb]:bg-transparent": !
|
|
945
|
+
"[&::-webkit-scrollbar-thumb]:bg-outline": r,
|
|
946
|
+
"[&::-webkit-scrollbar-thumb]:bg-transparent": !r
|
|
944
947
|
},
|
|
945
948
|
{ "[&::-webkit-scrollbar]:h-2": e === "horizontal" },
|
|
946
949
|
{ "[&::-webkit-scrollbar]:w-2": e === "vertical" }
|
|
@@ -948,8 +951,8 @@ const Se = (e) => {
|
|
|
948
951
|
{
|
|
949
952
|
"overflow-y-scroll flex-col": e === "vertical",
|
|
950
953
|
"overflow-x-scroll flex-row": e === "horizontal",
|
|
951
|
-
"cursor-grab": t && !
|
|
952
|
-
"cursor-grabbing": t &&
|
|
954
|
+
"cursor-grab": t && !r,
|
|
955
|
+
"cursor-grabbing": t && r
|
|
953
956
|
}
|
|
954
957
|
),
|
|
955
958
|
track: f("overflow-hidden flex-none sticky", {
|
|
@@ -960,152 +963,152 @@ const Se = (e) => {
|
|
|
960
963
|
), he = ({
|
|
961
964
|
children: e,
|
|
962
965
|
orientation: t = "vertical",
|
|
963
|
-
scrollSize:
|
|
966
|
+
scrollSize: r,
|
|
964
967
|
onScroll: l,
|
|
965
|
-
className:
|
|
966
|
-
draggable:
|
|
967
|
-
throttleDuration:
|
|
968
|
+
className: n,
|
|
969
|
+
draggable: a = !1,
|
|
970
|
+
throttleDuration: i = 75
|
|
968
971
|
}) => {
|
|
969
972
|
var D, F;
|
|
970
|
-
const
|
|
973
|
+
const s = V(null), d = V(null), [o, y] = S({
|
|
971
974
|
width: null,
|
|
972
975
|
height: null
|
|
973
976
|
});
|
|
974
|
-
|
|
975
|
-
if (!
|
|
976
|
-
const
|
|
977
|
+
P(() => {
|
|
978
|
+
if (!s.current) return;
|
|
979
|
+
const M = new ResizeObserver((X) => {
|
|
977
980
|
for (const O of X)
|
|
978
|
-
O.target ===
|
|
981
|
+
O.target === s.current && y({
|
|
979
982
|
width: O.contentRect.width,
|
|
980
983
|
height: O.contentRect.height
|
|
981
984
|
// On observe aussi la hauteur maintenant
|
|
982
985
|
});
|
|
983
986
|
});
|
|
984
|
-
return
|
|
985
|
-
|
|
987
|
+
return M.observe(s.current), () => {
|
|
988
|
+
M.disconnect();
|
|
986
989
|
};
|
|
987
|
-
}, [
|
|
988
|
-
const
|
|
989
|
-
const
|
|
990
|
-
return
|
|
991
|
-
width:
|
|
992
|
-
height:
|
|
990
|
+
}, [s]);
|
|
991
|
+
const p = V(null), c = V(null), h = () => {
|
|
992
|
+
const M = d.current;
|
|
993
|
+
return M ? {
|
|
994
|
+
width: r ?? M.scrollWidth,
|
|
995
|
+
height: r ?? M.scrollHeight
|
|
993
996
|
} : null;
|
|
994
997
|
}, v = () => {
|
|
995
|
-
const
|
|
996
|
-
return
|
|
997
|
-
width:
|
|
998
|
-
height:
|
|
998
|
+
const M = s.current;
|
|
999
|
+
return M ? {
|
|
1000
|
+
width: M.clientWidth,
|
|
1001
|
+
height: M.clientHeight
|
|
999
1002
|
// Correction ici pour retourner la bonne hauteur
|
|
1000
1003
|
} : null;
|
|
1001
|
-
}, { scrollYProgress:
|
|
1002
|
-
container:
|
|
1003
|
-
}),
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
(
|
|
1007
|
-
!
|
|
1008
|
-
scrollProgress:
|
|
1009
|
-
scroll:
|
|
1010
|
-
scrollTotal:
|
|
1011
|
-
scrollVisible:
|
|
1004
|
+
}, { scrollYProgress: L, scrollXProgress: N } = Le({
|
|
1005
|
+
container: s
|
|
1006
|
+
}), E = V(null);
|
|
1007
|
+
E.current || (E.current = Ee(
|
|
1008
|
+
i,
|
|
1009
|
+
(M, X) => {
|
|
1010
|
+
!c.current || !p.current || l && (t === "horizontal" && X === "x" && l({
|
|
1011
|
+
scrollProgress: M,
|
|
1012
|
+
scroll: M * p.current.width,
|
|
1013
|
+
scrollTotal: p.current.width,
|
|
1014
|
+
scrollVisible: c.current.width
|
|
1012
1015
|
}), t === "vertical" && X === "y" && l({
|
|
1013
|
-
scrollProgress:
|
|
1014
|
-
scroll:
|
|
1015
|
-
scrollTotal:
|
|
1016
|
-
scrollVisible:
|
|
1016
|
+
scrollProgress: M,
|
|
1017
|
+
scroll: M * p.current.height,
|
|
1018
|
+
scrollTotal: p.current.height,
|
|
1019
|
+
scrollVisible: c.current.height
|
|
1017
1020
|
}));
|
|
1018
1021
|
}
|
|
1019
1022
|
));
|
|
1020
|
-
const w = (
|
|
1021
|
-
|
|
1023
|
+
const w = (M, X) => {
|
|
1024
|
+
E.current && E.current(M, X);
|
|
1022
1025
|
};
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
}, [
|
|
1026
|
-
w(
|
|
1027
|
-
}), se(
|
|
1028
|
-
w(
|
|
1026
|
+
P(() => {
|
|
1027
|
+
o.width && w(N.get(), "x"), o.height && w(L.get(), "y");
|
|
1028
|
+
}, [o]), se(N, "change", (M) => {
|
|
1029
|
+
w(M, "x");
|
|
1030
|
+
}), se(L, "change", (M) => {
|
|
1031
|
+
w(M, "y");
|
|
1029
1032
|
});
|
|
1030
|
-
const [
|
|
1033
|
+
const [C, b] = S(!1);
|
|
1031
1034
|
fe(() => {
|
|
1032
|
-
|
|
1035
|
+
C || !c.current || !p.current || !l || (l({
|
|
1033
1036
|
scrollProgress: 0,
|
|
1034
1037
|
scroll: 0,
|
|
1035
|
-
scrollTotal: t == "vertical" ?
|
|
1036
|
-
scrollVisible: t == "vertical" ?
|
|
1037
|
-
}),
|
|
1038
|
-
}, [
|
|
1039
|
-
const [
|
|
1040
|
-
isDragging:
|
|
1038
|
+
scrollTotal: t == "vertical" ? p.current.height : p.current.width,
|
|
1039
|
+
scrollVisible: t == "vertical" ? c.current.height : c.current.width
|
|
1040
|
+
}), b(!0));
|
|
1041
|
+
}, [c, p, l]), p.current = h(), c.current = v();
|
|
1042
|
+
const [I, R] = S(!1), $ = Ye({
|
|
1043
|
+
isDragging: I,
|
|
1041
1044
|
children: e,
|
|
1042
|
-
className:
|
|
1045
|
+
className: n,
|
|
1043
1046
|
onScroll: l,
|
|
1044
1047
|
orientation: t,
|
|
1045
|
-
scrollSize:
|
|
1046
|
-
draggable:
|
|
1047
|
-
throttleDuration:
|
|
1048
|
-
}), [W,
|
|
1049
|
-
if (!
|
|
1050
|
-
const X =
|
|
1048
|
+
scrollSize: r,
|
|
1049
|
+
draggable: a,
|
|
1050
|
+
throttleDuration: i
|
|
1051
|
+
}), [W, k] = S(0), [m, B] = S(0), q = (M) => {
|
|
1052
|
+
if (!a) return;
|
|
1053
|
+
const X = s.current;
|
|
1051
1054
|
if (!X || W == null) return;
|
|
1052
|
-
const J = (
|
|
1055
|
+
const J = (M.pageX - X.offsetLeft - W) * 1.5;
|
|
1053
1056
|
X.scrollLeft = m - J;
|
|
1054
|
-
},
|
|
1055
|
-
const X =
|
|
1056
|
-
X && (
|
|
1057
|
-
}, Z = (
|
|
1058
|
-
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1057
|
+
}, K = (M) => {
|
|
1058
|
+
const X = s.current;
|
|
1059
|
+
X && (R(!0), k(M.pageX - X.offsetLeft), B(X.scrollLeft));
|
|
1060
|
+
}, Z = (M) => {
|
|
1061
|
+
I && (M.preventDefault(), q(M));
|
|
1062
|
+
}, H = () => {
|
|
1063
|
+
R(!1);
|
|
1061
1064
|
}, A = () => {
|
|
1062
|
-
|
|
1063
|
-
},
|
|
1064
|
-
|
|
1065
|
-
},
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1065
|
+
R(!1);
|
|
1066
|
+
}, g = (M) => {
|
|
1067
|
+
M.preventDefault();
|
|
1068
|
+
}, x = V(null);
|
|
1069
|
+
return P(() => () => {
|
|
1070
|
+
x.current && clearTimeout(x.current);
|
|
1068
1071
|
}, []), /* @__PURE__ */ U(
|
|
1069
1072
|
"div",
|
|
1070
1073
|
{
|
|
1071
|
-
className:
|
|
1072
|
-
ref:
|
|
1073
|
-
onMouseDown:
|
|
1074
|
+
className: $.customScroll,
|
|
1075
|
+
ref: s,
|
|
1076
|
+
onMouseDown: K,
|
|
1074
1077
|
onMouseMove: Z,
|
|
1075
|
-
onMouseUp:
|
|
1078
|
+
onMouseUp: H,
|
|
1076
1079
|
onMouseLeave: A,
|
|
1077
|
-
onDragStart:
|
|
1078
|
-
onScroll: (
|
|
1079
|
-
|
|
1080
|
-
|
|
1080
|
+
onDragStart: g,
|
|
1081
|
+
onScroll: (M) => {
|
|
1082
|
+
I || (k(null), R(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
1083
|
+
R(!1);
|
|
1081
1084
|
}, 1e3));
|
|
1082
1085
|
},
|
|
1083
1086
|
children: [
|
|
1084
1087
|
/* @__PURE__ */ u(
|
|
1085
1088
|
"div",
|
|
1086
1089
|
{
|
|
1087
|
-
ref:
|
|
1088
|
-
style: t === "vertical" ? { height: ((D =
|
|
1089
|
-
className:
|
|
1090
|
+
ref: d,
|
|
1091
|
+
style: t === "vertical" ? { height: ((D = c == null ? void 0 : c.current) == null ? void 0 : D.height) ?? "100%" } : { width: ((F = c == null ? void 0 : c.current) == null ? void 0 : F.width) ?? "100%" },
|
|
1092
|
+
className: $.track,
|
|
1090
1093
|
children: e
|
|
1091
1094
|
}
|
|
1092
1095
|
),
|
|
1093
|
-
|
|
1094
|
-
t === "vertical" &&
|
|
1096
|
+
c.current && p.current && /* @__PURE__ */ U(re, { children: [
|
|
1097
|
+
t === "vertical" && p.current.height > c.current.height && /* @__PURE__ */ u(
|
|
1095
1098
|
j.div,
|
|
1096
1099
|
{
|
|
1097
1100
|
className: "flex-none",
|
|
1098
1101
|
style: {
|
|
1099
|
-
height:
|
|
1102
|
+
height: p.current.height - c.current.height
|
|
1100
1103
|
}
|
|
1101
1104
|
}
|
|
1102
1105
|
),
|
|
1103
|
-
t === "horizontal" &&
|
|
1106
|
+
t === "horizontal" && p.current.width > c.current.width && /* @__PURE__ */ u(
|
|
1104
1107
|
j.div,
|
|
1105
1108
|
{
|
|
1106
1109
|
className: "flex-none",
|
|
1107
1110
|
style: {
|
|
1108
|
-
width:
|
|
1111
|
+
width: p.current.width - c.current.width
|
|
1109
1112
|
}
|
|
1110
1113
|
}
|
|
1111
1114
|
)
|
|
@@ -1116,43 +1119,43 @@ const Se = (e) => {
|
|
|
1116
1119
|
}, yt = ({
|
|
1117
1120
|
children: e,
|
|
1118
1121
|
transition: t = ".5s",
|
|
1119
|
-
orientation:
|
|
1122
|
+
orientation: r = "vertical",
|
|
1120
1123
|
throttleDuration: l = 25,
|
|
1121
|
-
...
|
|
1124
|
+
...n
|
|
1122
1125
|
}) => {
|
|
1123
|
-
const [
|
|
1124
|
-
|
|
1126
|
+
const [a, i] = S(null), s = me((a == null ? void 0 : a.scrollProgress) ?? 0), d = oe(
|
|
1127
|
+
s,
|
|
1125
1128
|
[0, 1],
|
|
1126
|
-
[0, 1 - ((
|
|
1127
|
-
),
|
|
1128
|
-
|
|
1129
|
-
(
|
|
1130
|
-
),
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
return se(
|
|
1134
|
-
const
|
|
1135
|
-
if (
|
|
1136
|
-
const v =
|
|
1129
|
+
[0, 1 - ((a == null ? void 0 : a.scrollVisible) ?? 0) / ((a == null ? void 0 : a.scrollTotal) ?? 0)]
|
|
1130
|
+
), o = oe(
|
|
1131
|
+
d,
|
|
1132
|
+
(c) => `${-c * 100}%`
|
|
1133
|
+
), y = (c) => {
|
|
1134
|
+
s.set(c.scrollProgress), c.scrollTotal > 0 && i(c);
|
|
1135
|
+
}, p = V(null);
|
|
1136
|
+
return se(o, "change", (c) => {
|
|
1137
|
+
const h = performance.now();
|
|
1138
|
+
if (p.current !== null) {
|
|
1139
|
+
const v = h - p.current;
|
|
1137
1140
|
console.log(`Delta temps : ${v} ms`);
|
|
1138
1141
|
}
|
|
1139
|
-
|
|
1142
|
+
p.current = h, console.log(c);
|
|
1140
1143
|
}), /* @__PURE__ */ u(
|
|
1141
1144
|
he,
|
|
1142
1145
|
{
|
|
1143
|
-
onScroll:
|
|
1146
|
+
onScroll: y,
|
|
1144
1147
|
throttleDuration: l,
|
|
1145
|
-
...
|
|
1148
|
+
...n,
|
|
1146
1149
|
children: /* @__PURE__ */ u(
|
|
1147
1150
|
j.div,
|
|
1148
1151
|
{
|
|
1149
1152
|
className: f("transition-transform ease-out", {
|
|
1150
|
-
"w-fit h-full":
|
|
1151
|
-
"h-fit w-full":
|
|
1153
|
+
"w-fit h-full": r === "horizontal",
|
|
1154
|
+
"h-fit w-full": r === "vertical"
|
|
1152
1155
|
}),
|
|
1153
1156
|
style: {
|
|
1154
1157
|
transitionDuration: t,
|
|
1155
|
-
...
|
|
1158
|
+
...r == "vertical" ? { y: o } : { x: o }
|
|
1156
1159
|
},
|
|
1157
1160
|
children: e
|
|
1158
1161
|
}
|
|
@@ -1163,113 +1166,115 @@ const Se = (e) => {
|
|
|
1163
1166
|
targetRef: e,
|
|
1164
1167
|
children: t
|
|
1165
1168
|
}) => {
|
|
1166
|
-
const [
|
|
1167
|
-
const
|
|
1168
|
-
if (!
|
|
1169
|
-
const
|
|
1169
|
+
const [r, l] = S(null), n = V(null), a = () => {
|
|
1170
|
+
const i = e.current;
|
|
1171
|
+
if (!i) return;
|
|
1172
|
+
const s = i.getBoundingClientRect();
|
|
1170
1173
|
l({
|
|
1171
1174
|
position: "fixed",
|
|
1172
|
-
top:
|
|
1173
|
-
left:
|
|
1174
|
-
width:
|
|
1175
|
-
height:
|
|
1175
|
+
top: s.top,
|
|
1176
|
+
left: s.left,
|
|
1177
|
+
width: s.width,
|
|
1178
|
+
height: s.height,
|
|
1176
1179
|
pointerEvents: "none",
|
|
1177
1180
|
// si le wrapper ne doit pas capter les events
|
|
1178
1181
|
zIndex: 999
|
|
1179
1182
|
// personnalise si besoin
|
|
1180
1183
|
});
|
|
1181
1184
|
};
|
|
1182
|
-
return
|
|
1183
|
-
const
|
|
1184
|
-
if (
|
|
1185
|
-
return
|
|
1186
|
-
var
|
|
1187
|
-
window.removeEventListener("scroll",
|
|
1185
|
+
return P(() => {
|
|
1186
|
+
const i = e.current;
|
|
1187
|
+
if (i)
|
|
1188
|
+
return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), n.current = new ResizeObserver(a), n.current.observe(i), () => {
|
|
1189
|
+
var s;
|
|
1190
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a), (s = n.current) == null || s.disconnect();
|
|
1188
1191
|
};
|
|
1189
|
-
}, [e]),
|
|
1192
|
+
}, [e]), r ? Ie(/* @__PURE__ */ u("div", { style: r, children: t }), document.body) : null;
|
|
1190
1193
|
}, Ze = ({
|
|
1191
1194
|
variant: e = "filled",
|
|
1192
1195
|
disabled: t = !1,
|
|
1193
|
-
icon:
|
|
1196
|
+
icon: r,
|
|
1194
1197
|
href: l,
|
|
1195
|
-
label:
|
|
1198
|
+
label: n,
|
|
1199
|
+
disableTextMargins: a,
|
|
1196
1200
|
className: i,
|
|
1197
|
-
iconPosition:
|
|
1198
|
-
loading:
|
|
1201
|
+
iconPosition: s = "left",
|
|
1202
|
+
loading: d = !1,
|
|
1199
1203
|
shape: o = "rounded",
|
|
1200
|
-
onClick:
|
|
1201
|
-
onToggle:
|
|
1202
|
-
activated:
|
|
1203
|
-
ref:
|
|
1204
|
-
size:
|
|
1205
|
-
allowShapeTransformation:
|
|
1206
|
-
transition:
|
|
1207
|
-
children:
|
|
1208
|
-
...
|
|
1204
|
+
onClick: y,
|
|
1205
|
+
onToggle: p,
|
|
1206
|
+
activated: c,
|
|
1207
|
+
ref: h,
|
|
1208
|
+
size: v = "medium",
|
|
1209
|
+
allowShapeTransformation: L = !0,
|
|
1210
|
+
transition: N,
|
|
1211
|
+
children: E,
|
|
1212
|
+
...w
|
|
1209
1213
|
}) => {
|
|
1210
|
-
if (
|
|
1214
|
+
if (E && (n = E), !n)
|
|
1211
1215
|
throw new Error(
|
|
1212
1216
|
"Button component requires either a label prop or children content"
|
|
1213
1217
|
);
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
}, [
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1220
|
-
t &&
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1223
|
-
}) :
|
|
1224
|
-
t &&
|
|
1218
|
+
const C = l ? "a" : "button", b = V(null), I = h || b, [R, $] = _.useState(c);
|
|
1219
|
+
P(() => {
|
|
1220
|
+
$(c);
|
|
1221
|
+
}, [c]), N = { duration: 0.3, ...N };
|
|
1222
|
+
let W;
|
|
1223
|
+
p ? p && (W = (B) => {
|
|
1224
|
+
t && B.preventDefault();
|
|
1225
|
+
const q = !R;
|
|
1226
|
+
$(q), p(q);
|
|
1227
|
+
}) : W = (B) => {
|
|
1228
|
+
t && B.preventDefault(), y && y(B);
|
|
1225
1229
|
};
|
|
1226
|
-
const
|
|
1227
|
-
allowShapeTransformation:
|
|
1228
|
-
size:
|
|
1230
|
+
const k = Be({
|
|
1231
|
+
allowShapeTransformation: L,
|
|
1232
|
+
size: v,
|
|
1233
|
+
disableTextMargins: a,
|
|
1229
1234
|
shape: o,
|
|
1230
1235
|
href: l,
|
|
1231
1236
|
disabled: t,
|
|
1232
|
-
icon:
|
|
1233
|
-
iconPosition:
|
|
1234
|
-
loading:
|
|
1237
|
+
icon: r,
|
|
1238
|
+
iconPosition: s,
|
|
1239
|
+
loading: d,
|
|
1235
1240
|
variant: e,
|
|
1236
|
-
transition:
|
|
1241
|
+
transition: N,
|
|
1237
1242
|
className: i,
|
|
1238
|
-
isActive:
|
|
1239
|
-
onToggle:
|
|
1240
|
-
activated:
|
|
1241
|
-
label:
|
|
1242
|
-
children:
|
|
1243
|
-
}),
|
|
1243
|
+
isActive: R ?? !1,
|
|
1244
|
+
onToggle: p,
|
|
1245
|
+
activated: R,
|
|
1246
|
+
label: n,
|
|
1247
|
+
children: n
|
|
1248
|
+
}), m = r ? /* @__PURE__ */ u(Q, { icon: r, className: k.icon }) : /* @__PURE__ */ u(re, {});
|
|
1244
1249
|
return /* @__PURE__ */ U(
|
|
1245
|
-
|
|
1250
|
+
C,
|
|
1246
1251
|
{
|
|
1247
|
-
ref:
|
|
1252
|
+
ref: I,
|
|
1248
1253
|
href: l,
|
|
1249
|
-
className:
|
|
1250
|
-
...
|
|
1251
|
-
onClick:
|
|
1254
|
+
className: k.button,
|
|
1255
|
+
...w,
|
|
1256
|
+
onClick: W,
|
|
1252
1257
|
disabled: t,
|
|
1253
|
-
"aria-pressed":
|
|
1254
|
-
style: { transition:
|
|
1258
|
+
"aria-pressed": p ? R : void 0,
|
|
1259
|
+
style: { transition: N.duration + "s" },
|
|
1255
1260
|
children: [
|
|
1256
|
-
/* @__PURE__ */ u("div", { className:
|
|
1261
|
+
/* @__PURE__ */ u("div", { className: k.touchTarget }),
|
|
1257
1262
|
/* @__PURE__ */ u(
|
|
1258
1263
|
"div",
|
|
1259
1264
|
{
|
|
1260
|
-
className:
|
|
1261
|
-
style: { transition:
|
|
1265
|
+
className: k.stateLayer,
|
|
1266
|
+
style: { transition: N.duration + "s" },
|
|
1262
1267
|
children: !t && /* @__PURE__ */ u(
|
|
1263
1268
|
ne,
|
|
1264
1269
|
{
|
|
1265
|
-
colorName: e === "filled" &&
|
|
1266
|
-
triggerRef:
|
|
1270
|
+
colorName: e === "filled" && p && "on-surface-variant" || e === "filled" && !p && "on-primary" || e === "elevated" && "primary" || e === "tonal" && "on-secondary-container" || e === "outlined" && "primary" || e === "text" && "primary" || "",
|
|
1271
|
+
triggerRef: I
|
|
1267
1272
|
}
|
|
1268
1273
|
)
|
|
1269
1274
|
}
|
|
1270
1275
|
),
|
|
1271
|
-
|
|
1272
|
-
|
|
1276
|
+
s === "left" && m,
|
|
1277
|
+
d && /* @__PURE__ */ u(
|
|
1273
1278
|
"div",
|
|
1274
1279
|
{
|
|
1275
1280
|
className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
@@ -1306,156 +1311,156 @@ const Se = (e) => {
|
|
|
1306
1311
|
)
|
|
1307
1312
|
}
|
|
1308
1313
|
),
|
|
1309
|
-
/* @__PURE__ */ u("span", { className:
|
|
1310
|
-
|
|
1314
|
+
/* @__PURE__ */ u("span", { className: k.label, children: n }),
|
|
1315
|
+
s === "right" && m
|
|
1311
1316
|
]
|
|
1312
1317
|
}
|
|
1313
1318
|
);
|
|
1314
1319
|
}, xt = ({
|
|
1315
1320
|
variant: e = "outlined",
|
|
1316
1321
|
className: t,
|
|
1317
|
-
children:
|
|
1322
|
+
children: r,
|
|
1318
1323
|
isInteractive: l = !1,
|
|
1319
|
-
ref:
|
|
1320
|
-
...
|
|
1324
|
+
ref: n,
|
|
1325
|
+
...a
|
|
1321
1326
|
}) => {
|
|
1322
|
-
const
|
|
1323
|
-
return /* @__PURE__ */ U("div", { ...
|
|
1324
|
-
/* @__PURE__ */ u("div", { className:
|
|
1325
|
-
|
|
1327
|
+
const i = Ce({ className: t, isInteractive: l, variant: e, children: r }), s = V(null), d = n || s;
|
|
1328
|
+
return /* @__PURE__ */ U("div", { ...a, ref: d, className: i.card, children: [
|
|
1329
|
+
/* @__PURE__ */ u("div", { className: i.stateLayer, children: l && /* @__PURE__ */ u(ne, { colorName: "on-surface", triggerRef: d }) }),
|
|
1330
|
+
r
|
|
1326
1331
|
] });
|
|
1327
|
-
}, Je = (e, t,
|
|
1328
|
-
const [l,
|
|
1329
|
-
return
|
|
1332
|
+
}, Je = (e, t, r = [0, 1]) => {
|
|
1333
|
+
const [l, n] = t, [a, i] = r, d = (Math.max(l, Math.min(e, n)) - l) / (n - l);
|
|
1334
|
+
return a + d * (i - a);
|
|
1330
1335
|
}, Qe = ({
|
|
1331
1336
|
className: e,
|
|
1332
1337
|
children: t,
|
|
1333
|
-
width:
|
|
1338
|
+
width: r = 1,
|
|
1334
1339
|
index: l = 0,
|
|
1335
|
-
ref:
|
|
1336
|
-
...
|
|
1340
|
+
ref: n,
|
|
1341
|
+
...a
|
|
1337
1342
|
}) => {
|
|
1338
|
-
const
|
|
1343
|
+
const i = V(null), s = n || i, d = We({
|
|
1339
1344
|
className: e,
|
|
1340
1345
|
index: l,
|
|
1341
|
-
width:
|
|
1346
|
+
width: r,
|
|
1342
1347
|
children: t
|
|
1343
1348
|
});
|
|
1344
1349
|
return /* @__PURE__ */ u(
|
|
1345
1350
|
j.div,
|
|
1346
1351
|
{
|
|
1347
|
-
ref:
|
|
1348
|
-
animate: { width:
|
|
1352
|
+
ref: s,
|
|
1353
|
+
animate: { width: r + "px" },
|
|
1349
1354
|
transition: {
|
|
1350
1355
|
duration: 0.5,
|
|
1351
1356
|
ease: "linear"
|
|
1352
1357
|
},
|
|
1353
|
-
className:
|
|
1354
|
-
...
|
|
1358
|
+
className: d.carouselItem,
|
|
1359
|
+
...a,
|
|
1355
1360
|
children: t
|
|
1356
1361
|
}
|
|
1357
1362
|
);
|
|
1358
1363
|
}, gt = ({
|
|
1359
1364
|
variant: e = "hero",
|
|
1360
1365
|
className: t,
|
|
1361
|
-
children:
|
|
1366
|
+
children: r,
|
|
1362
1367
|
ref: l,
|
|
1363
|
-
marginPourcent:
|
|
1364
|
-
inputRange:
|
|
1365
|
-
outputRange:
|
|
1366
|
-
gap:
|
|
1367
|
-
onChange:
|
|
1368
|
-
scrollSensitivity:
|
|
1369
|
-
...
|
|
1368
|
+
marginPourcent: n = 0,
|
|
1369
|
+
inputRange: a = [0.21, 0.65],
|
|
1370
|
+
outputRange: i = [42, 300],
|
|
1371
|
+
gap: s = 8,
|
|
1372
|
+
onChange: d,
|
|
1373
|
+
scrollSensitivity: o = 1.25,
|
|
1374
|
+
...y
|
|
1370
1375
|
}) => {
|
|
1371
|
-
var
|
|
1372
|
-
const
|
|
1376
|
+
var H, A;
|
|
1377
|
+
const p = V(null), c = l || p, h = De({
|
|
1373
1378
|
className: t,
|
|
1374
|
-
children:
|
|
1379
|
+
children: r,
|
|
1375
1380
|
variant: e,
|
|
1376
|
-
inputRange:
|
|
1377
|
-
outputRange:
|
|
1378
|
-
marginPourcent:
|
|
1379
|
-
onChange:
|
|
1380
|
-
gap:
|
|
1381
|
-
scrollSensitivity:
|
|
1382
|
-
}), v = _.Children.toArray(
|
|
1383
|
-
(
|
|
1384
|
-
),
|
|
1381
|
+
inputRange: a,
|
|
1382
|
+
outputRange: i,
|
|
1383
|
+
marginPourcent: n,
|
|
1384
|
+
onChange: d,
|
|
1385
|
+
gap: s,
|
|
1386
|
+
scrollSensitivity: o
|
|
1387
|
+
}), v = _.Children.toArray(r).filter(
|
|
1388
|
+
(g) => _.isValidElement(g) && g.type === Qe
|
|
1389
|
+
), L = V(null), [N, E] = S([]), [w, C] = S(null), b = () => {
|
|
1385
1390
|
var X;
|
|
1386
|
-
if (!
|
|
1387
|
-
const { scrollVisible:
|
|
1391
|
+
if (!L.current || !c.current || !w) return [];
|
|
1392
|
+
const { scrollVisible: g, scrollProgress: x } = w;
|
|
1388
1393
|
function D(O, J) {
|
|
1389
1394
|
return O.map(
|
|
1390
1395
|
(T) => (T - J) / Math.abs(O[1] - O[0])
|
|
1391
1396
|
);
|
|
1392
1397
|
}
|
|
1393
1398
|
let F = v.map((O, J) => {
|
|
1394
|
-
if (!
|
|
1399
|
+
if (!I[J].current || !L.current) return 0;
|
|
1395
1400
|
let te = J / (v.length - 1);
|
|
1396
1401
|
return te > 1 && (te = 1), te < 0 && (te = 0), te;
|
|
1397
1402
|
});
|
|
1398
|
-
F = D(F,
|
|
1399
|
-
let
|
|
1403
|
+
F = D(F, x);
|
|
1404
|
+
let M = ((((X = c.current) == null ? void 0 : X.clientWidth) ?? g) - (i[0] + s)) / (i[1] + s);
|
|
1400
1405
|
return F.map((O, J) => ({ value: Math.abs(O), originalIndex: J })).sort((O, J) => O.value - J.value).forEach((O, J) => {
|
|
1401
|
-
J === 0 &&
|
|
1402
|
-
let T = Je(
|
|
1403
|
-
T <
|
|
1406
|
+
J === 0 && $(O.originalIndex);
|
|
1407
|
+
let T = Je(M, [0, 1], [0, i[1]]);
|
|
1408
|
+
T < i[0] && (T = i[0]), M--, F[O.originalIndex] = T;
|
|
1404
1409
|
}), F;
|
|
1405
|
-
},
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
}, [
|
|
1409
|
-
|
|
1410
|
+
}, I = V([]).current, [R, $] = S(0);
|
|
1411
|
+
P(() => {
|
|
1412
|
+
d && d(R);
|
|
1413
|
+
}, [R]), I.length !== v.length && v.forEach((g, x) => {
|
|
1414
|
+
I[x] || (I[x] = _.createRef());
|
|
1410
1415
|
});
|
|
1411
|
-
const W = v.map((
|
|
1412
|
-
|
|
1416
|
+
const W = v.map((g, x) => _.cloneElement(
|
|
1417
|
+
g,
|
|
1413
1418
|
{
|
|
1414
|
-
width:
|
|
1415
|
-
ref:
|
|
1416
|
-
key:
|
|
1417
|
-
index:
|
|
1419
|
+
width: N[x],
|
|
1420
|
+
ref: I[x],
|
|
1421
|
+
key: x,
|
|
1422
|
+
index: x
|
|
1418
1423
|
}
|
|
1419
|
-
)),
|
|
1420
|
-
|
|
1424
|
+
)), k = me((w == null ? void 0 : w.scrollProgress) ?? 0), m = oe(
|
|
1425
|
+
k,
|
|
1421
1426
|
[0, 1],
|
|
1422
1427
|
[
|
|
1423
1428
|
0,
|
|
1424
|
-
1 - (((
|
|
1429
|
+
1 - (((H = c.current) == null ? void 0 : H.clientWidth) ?? 0) / (((A = L == null ? void 0 : L.current) == null ? void 0 : A.clientWidth) ?? 0)
|
|
1425
1430
|
]
|
|
1426
|
-
),
|
|
1431
|
+
), B = oe(
|
|
1427
1432
|
m,
|
|
1428
|
-
(
|
|
1429
|
-
),
|
|
1430
|
-
|
|
1433
|
+
(g) => `${-g * 100}%`
|
|
1434
|
+
), q = (g) => {
|
|
1435
|
+
g.scrollTotal > 0 && C(g);
|
|
1431
1436
|
};
|
|
1432
|
-
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1437
|
+
P(() => {
|
|
1438
|
+
const g = b();
|
|
1439
|
+
E(g);
|
|
1435
1440
|
}, [w]);
|
|
1436
|
-
const [
|
|
1441
|
+
const [K, Z] = S(0);
|
|
1437
1442
|
return fe(() => {
|
|
1438
|
-
let
|
|
1439
|
-
w &&
|
|
1440
|
-
const
|
|
1441
|
-
Z(
|
|
1442
|
-
}, [
|
|
1443
|
+
let g = i[1];
|
|
1444
|
+
w && g > w.scrollVisible && (g = w.scrollVisible);
|
|
1445
|
+
const x = (g + s) * W.length / o;
|
|
1446
|
+
Z(x);
|
|
1447
|
+
}, [c, I, w]), /* @__PURE__ */ u("div", { className: h.carousel, ref: c, ...y, children: /* @__PURE__ */ u(
|
|
1443
1448
|
he,
|
|
1444
1449
|
{
|
|
1445
1450
|
draggable: !0,
|
|
1446
1451
|
orientation: "horizontal",
|
|
1447
|
-
onScroll:
|
|
1448
|
-
scrollSize:
|
|
1452
|
+
onScroll: q,
|
|
1453
|
+
scrollSize: K,
|
|
1449
1454
|
children: /* @__PURE__ */ u(
|
|
1450
1455
|
j.div,
|
|
1451
1456
|
{
|
|
1452
|
-
className:
|
|
1453
|
-
ref:
|
|
1457
|
+
className: h.track,
|
|
1458
|
+
ref: L,
|
|
1454
1459
|
style: {
|
|
1455
1460
|
transitionDuration: "0.5s",
|
|
1456
1461
|
transitionTimingFunction: "ease-out",
|
|
1457
|
-
gap: `${
|
|
1458
|
-
x:
|
|
1462
|
+
gap: `${s}px`,
|
|
1463
|
+
x: B
|
|
1459
1464
|
},
|
|
1460
1465
|
children: W
|
|
1461
1466
|
}
|
|
@@ -1465,15 +1470,15 @@ const Se = (e) => {
|
|
|
1465
1470
|
}, wt = ({
|
|
1466
1471
|
orientation: e = "horizontal",
|
|
1467
1472
|
className: t,
|
|
1468
|
-
...
|
|
1473
|
+
...r
|
|
1469
1474
|
}) => {
|
|
1470
1475
|
const l = Pe({ orientation: e, className: t });
|
|
1471
|
-
return /* @__PURE__ */ u("hr", { className: l.divider, ...
|
|
1472
|
-
},
|
|
1476
|
+
return /* @__PURE__ */ u("hr", { className: l.divider, ...r });
|
|
1477
|
+
}, Y = [];
|
|
1473
1478
|
for (let e = 0; e < 256; ++e)
|
|
1474
|
-
|
|
1479
|
+
Y.push((e + 256).toString(16).slice(1));
|
|
1475
1480
|
function Ae(e, t = 0) {
|
|
1476
|
-
return (
|
|
1481
|
+
return (Y[e[t + 0]] + Y[e[t + 1]] + Y[e[t + 2]] + Y[e[t + 3]] + "-" + Y[e[t + 4]] + Y[e[t + 5]] + "-" + Y[e[t + 6]] + Y[e[t + 7]] + "-" + Y[e[t + 8]] + Y[e[t + 9]] + "-" + Y[e[t + 10]] + Y[e[t + 11]] + Y[e[t + 12]] + Y[e[t + 13]] + Y[e[t + 14]] + Y[e[t + 15]]).toLowerCase();
|
|
1477
1482
|
}
|
|
1478
1483
|
let ae;
|
|
1479
1484
|
const ze = new Uint8Array(16);
|
|
@@ -1486,12 +1491,12 @@ function Te() {
|
|
|
1486
1491
|
return ae(ze);
|
|
1487
1492
|
}
|
|
1488
1493
|
const et = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ie = { randomUUID: et };
|
|
1489
|
-
function ce(e, t,
|
|
1490
|
-
var
|
|
1494
|
+
function ce(e, t, r) {
|
|
1495
|
+
var n;
|
|
1491
1496
|
if (ie.randomUUID && !e)
|
|
1492
1497
|
return ie.randomUUID();
|
|
1493
1498
|
e = e || {};
|
|
1494
|
-
const l = e.random ?? ((
|
|
1499
|
+
const l = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Te();
|
|
1495
1500
|
if (l.length < 16)
|
|
1496
1501
|
throw new Error("Random bytes length must be >= 16");
|
|
1497
1502
|
return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, Ae(l);
|
|
@@ -1499,23 +1504,23 @@ function ce(e, t, n) {
|
|
|
1499
1504
|
const ye = ({
|
|
1500
1505
|
variant: e = "plain",
|
|
1501
1506
|
buttons: t,
|
|
1502
|
-
className:
|
|
1507
|
+
className: r,
|
|
1503
1508
|
children: l,
|
|
1504
|
-
title:
|
|
1505
|
-
text:
|
|
1506
|
-
position:
|
|
1507
|
-
targetRef:
|
|
1508
|
-
ref:
|
|
1509
|
-
trigger:
|
|
1510
|
-
...
|
|
1509
|
+
title: n,
|
|
1510
|
+
text: a,
|
|
1511
|
+
position: i,
|
|
1512
|
+
targetRef: s,
|
|
1513
|
+
ref: d,
|
|
1514
|
+
trigger: o = ["hover", "focus"],
|
|
1515
|
+
...y
|
|
1511
1516
|
}) => {
|
|
1512
|
-
if (!l && !
|
|
1517
|
+
if (!l && !s)
|
|
1513
1518
|
throw new Error("ToolTip must have a child or a targetRef");
|
|
1514
|
-
Array.isArray(
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
const m = (
|
|
1518
|
-
v(
|
|
1519
|
+
Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
|
|
1520
|
+
const p = V(null), c = s || p, [h, v] = S(null), [L] = S(ce()), [N, E] = S(!1), w = V(null);
|
|
1521
|
+
P(() => {
|
|
1522
|
+
const m = (B) => {
|
|
1523
|
+
v(B.detail);
|
|
1519
1524
|
};
|
|
1520
1525
|
return document.addEventListener("tooltip-update", m), () => {
|
|
1521
1526
|
document.removeEventListener(
|
|
@@ -1523,80 +1528,80 @@ const ye = ({
|
|
|
1523
1528
|
m
|
|
1524
1529
|
);
|
|
1525
1530
|
};
|
|
1526
|
-
}, []),
|
|
1527
|
-
w.current && clearTimeout(w.current),
|
|
1528
|
-
|
|
1531
|
+
}, []), P(() => {
|
|
1532
|
+
w.current && clearTimeout(w.current), h ? E(h === L) : w.current = setTimeout(() => {
|
|
1533
|
+
E(!1);
|
|
1529
1534
|
}, 1200);
|
|
1530
|
-
}, [
|
|
1531
|
-
const
|
|
1532
|
-
if (
|
|
1533
|
-
const m = new CustomEvent("tooltip-update", { detail:
|
|
1535
|
+
}, [h, L]);
|
|
1536
|
+
const C = () => {
|
|
1537
|
+
if (o.includes("hover")) {
|
|
1538
|
+
const m = new CustomEvent("tooltip-update", { detail: L });
|
|
1534
1539
|
document.dispatchEvent(m);
|
|
1535
1540
|
}
|
|
1536
|
-
},
|
|
1537
|
-
if (
|
|
1541
|
+
}, b = () => {
|
|
1542
|
+
if (o.includes("hover")) {
|
|
1538
1543
|
const m = new CustomEvent("tooltip-update", { detail: null });
|
|
1539
1544
|
document.dispatchEvent(m);
|
|
1540
1545
|
}
|
|
1541
|
-
},
|
|
1542
|
-
if (
|
|
1546
|
+
}, I = () => {
|
|
1547
|
+
if (o.includes("click")) {
|
|
1543
1548
|
const m = new CustomEvent("tooltip-update", {
|
|
1544
|
-
detail:
|
|
1549
|
+
detail: N ? null : L
|
|
1545
1550
|
});
|
|
1546
1551
|
document.dispatchEvent(m);
|
|
1547
1552
|
}
|
|
1548
|
-
},
|
|
1549
|
-
if (
|
|
1550
|
-
const m = new CustomEvent("tooltip-update", { detail:
|
|
1553
|
+
}, R = () => {
|
|
1554
|
+
if (o.includes("focus")) {
|
|
1555
|
+
const m = new CustomEvent("tooltip-update", { detail: L });
|
|
1551
1556
|
document.dispatchEvent(m);
|
|
1552
1557
|
}
|
|
1553
|
-
},
|
|
1554
|
-
if (
|
|
1558
|
+
}, $ = () => {
|
|
1559
|
+
if (o.includes("focus")) {
|
|
1555
1560
|
const m = new CustomEvent("tooltip-update", { detail: null });
|
|
1556
1561
|
document.dispatchEvent(m);
|
|
1557
1562
|
}
|
|
1558
1563
|
};
|
|
1559
|
-
|
|
1560
|
-
if (
|
|
1561
|
-
const m =
|
|
1562
|
-
return m.addEventListener("mouseenter",
|
|
1563
|
-
m.removeEventListener("mouseenter",
|
|
1564
|
+
P(() => {
|
|
1565
|
+
if (c != null && c.current) {
|
|
1566
|
+
const m = c.current;
|
|
1567
|
+
return m.addEventListener("mouseenter", C), m.addEventListener("mouseleave", b), m.addEventListener("click", I), m.addEventListener("focus", R), m.addEventListener("blur", $), () => {
|
|
1568
|
+
m.removeEventListener("mouseenter", C), m.removeEventListener("mouseleave", b), m.removeEventListener("click", I), m.removeEventListener("focus", R), m.removeEventListener("blur", $);
|
|
1564
1569
|
};
|
|
1565
1570
|
}
|
|
1566
|
-
}, [
|
|
1567
|
-
const W = !
|
|
1568
|
-
if (!
|
|
1569
|
-
const m =
|
|
1570
|
-
e === "plain" ?
|
|
1571
|
+
}, [c, o, L, N]);
|
|
1572
|
+
const W = !s && ee(l) ? le(l, { ref: p }) : l;
|
|
1573
|
+
if (!i && typeof window < "u" && c != null && c.current && !i) {
|
|
1574
|
+
const m = c.current.getBoundingClientRect(), B = window.innerWidth, q = window.innerHeight, K = m.left / B, Z = m.top / q;
|
|
1575
|
+
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");
|
|
1571
1576
|
}
|
|
1572
|
-
const
|
|
1577
|
+
const k = Ke({
|
|
1573
1578
|
variant: e,
|
|
1574
1579
|
buttons: t,
|
|
1575
|
-
className:
|
|
1576
|
-
title:
|
|
1577
|
-
text:
|
|
1578
|
-
position:
|
|
1579
|
-
trigger:
|
|
1580
|
-
targetRef:
|
|
1580
|
+
className: r,
|
|
1581
|
+
title: n,
|
|
1582
|
+
text: a,
|
|
1583
|
+
position: i,
|
|
1584
|
+
trigger: o,
|
|
1585
|
+
targetRef: s,
|
|
1581
1586
|
children: l
|
|
1582
1587
|
});
|
|
1583
1588
|
return /* @__PURE__ */ U(re, { children: [
|
|
1584
1589
|
W,
|
|
1585
|
-
/* @__PURE__ */ u(z, { children:
|
|
1590
|
+
/* @__PURE__ */ u(z, { children: N && /* @__PURE__ */ u(_e, { targetRef: c, children: /* @__PURE__ */ u(
|
|
1586
1591
|
j.div,
|
|
1587
1592
|
{
|
|
1588
|
-
initial: { opacity:
|
|
1593
|
+
initial: { opacity: h ? 1 : 0 },
|
|
1589
1594
|
animate: { opacity: 1 },
|
|
1590
|
-
transition: { duration:
|
|
1591
|
-
exit: { opacity:
|
|
1592
|
-
className:
|
|
1593
|
-
...
|
|
1594
|
-
onMouseEnter:
|
|
1595
|
-
onMouseLeave:
|
|
1595
|
+
transition: { duration: h ? 0 : 0.3 },
|
|
1596
|
+
exit: { opacity: h ? 1 : 0 },
|
|
1597
|
+
className: k.toolTip,
|
|
1598
|
+
...y,
|
|
1599
|
+
onMouseEnter: C,
|
|
1600
|
+
onMouseLeave: b,
|
|
1596
1601
|
children: /* @__PURE__ */ U(
|
|
1597
1602
|
j.div,
|
|
1598
1603
|
{
|
|
1599
|
-
className:
|
|
1604
|
+
className: k.container,
|
|
1600
1605
|
layoutId: "tool-tip",
|
|
1601
1606
|
transition: {
|
|
1602
1607
|
type: "spring",
|
|
@@ -1604,16 +1609,16 @@ const ye = ({
|
|
|
1604
1609
|
damping: 20
|
|
1605
1610
|
},
|
|
1606
1611
|
children: [
|
|
1607
|
-
|
|
1608
|
-
/* @__PURE__ */ u("div", { className:
|
|
1609
|
-
t && /* @__PURE__ */ u("div", { className:
|
|
1612
|
+
n && /* @__PURE__ */ u("div", { className: k.subHead, children: n }),
|
|
1613
|
+
/* @__PURE__ */ u("div", { className: k.supportingText, children: a }),
|
|
1614
|
+
t && /* @__PURE__ */ u("div", { className: k.actions, children: Array.isArray(t) && t.map((m, B) => /* @__PURE__ */ u(
|
|
1610
1615
|
Ze,
|
|
1611
1616
|
{
|
|
1612
1617
|
size: "small",
|
|
1613
1618
|
variant: "text",
|
|
1614
1619
|
...m
|
|
1615
1620
|
},
|
|
1616
|
-
|
|
1621
|
+
B
|
|
1617
1622
|
)) })
|
|
1618
1623
|
]
|
|
1619
1624
|
}
|
|
@@ -1624,43 +1629,43 @@ const ye = ({
|
|
|
1624
1629
|
}, ue = ({
|
|
1625
1630
|
className: e,
|
|
1626
1631
|
label: t,
|
|
1627
|
-
variant:
|
|
1632
|
+
variant: r = "primary",
|
|
1628
1633
|
size: l = "medium",
|
|
1629
|
-
href:
|
|
1630
|
-
type:
|
|
1631
|
-
icon:
|
|
1632
|
-
isExtended:
|
|
1633
|
-
ref:
|
|
1634
|
-
transition:
|
|
1635
|
-
children:
|
|
1636
|
-
...
|
|
1634
|
+
href: n,
|
|
1635
|
+
type: a,
|
|
1636
|
+
icon: i,
|
|
1637
|
+
isExtended: s = !1,
|
|
1638
|
+
ref: d,
|
|
1639
|
+
transition: o,
|
|
1640
|
+
children: y,
|
|
1641
|
+
...p
|
|
1637
1642
|
}) => {
|
|
1638
|
-
if (
|
|
1643
|
+
if (y && (t = y), !t)
|
|
1639
1644
|
throw new Error(
|
|
1640
1645
|
"FAB component requires either a label prop or children content"
|
|
1641
1646
|
);
|
|
1642
|
-
const
|
|
1643
|
-
href:
|
|
1644
|
-
icon:
|
|
1645
|
-
isExtended:
|
|
1647
|
+
const c = n ? "a" : "button", h = $e({
|
|
1648
|
+
href: n,
|
|
1649
|
+
icon: i,
|
|
1650
|
+
isExtended: s,
|
|
1646
1651
|
label: t,
|
|
1647
1652
|
size: l,
|
|
1648
|
-
variant:
|
|
1653
|
+
variant: r,
|
|
1649
1654
|
className: e,
|
|
1650
|
-
transition:
|
|
1655
|
+
transition: o,
|
|
1651
1656
|
children: t
|
|
1652
1657
|
});
|
|
1653
|
-
|
|
1654
|
-
const v = V(null),
|
|
1658
|
+
o = { duration: 0.3, ...o };
|
|
1659
|
+
const v = V(null), L = d || v, N = {
|
|
1655
1660
|
visible: {
|
|
1656
1661
|
width: "auto",
|
|
1657
1662
|
marginLeft: 12,
|
|
1658
1663
|
opacity: 1,
|
|
1659
1664
|
transition: {
|
|
1660
|
-
...
|
|
1665
|
+
...o,
|
|
1661
1666
|
opacity: {
|
|
1662
|
-
duration:
|
|
1663
|
-
delay:
|
|
1667
|
+
duration: o.duration / 2,
|
|
1668
|
+
delay: o.duration - o.duration / 2
|
|
1664
1669
|
}
|
|
1665
1670
|
}
|
|
1666
1671
|
},
|
|
@@ -1669,52 +1674,52 @@ const ye = ({
|
|
|
1669
1674
|
marginLeft: 0,
|
|
1670
1675
|
opacity: 0,
|
|
1671
1676
|
transition: {
|
|
1672
|
-
...
|
|
1677
|
+
...o,
|
|
1673
1678
|
marginLeft: {
|
|
1674
|
-
duration:
|
|
1675
|
-
delay:
|
|
1679
|
+
duration: o.duration / 2,
|
|
1680
|
+
delay: o.duration - o.duration / 2
|
|
1676
1681
|
}
|
|
1677
1682
|
}
|
|
1678
1683
|
}
|
|
1679
1684
|
};
|
|
1680
1685
|
return /* @__PURE__ */ U(
|
|
1681
|
-
|
|
1686
|
+
c,
|
|
1682
1687
|
{
|
|
1683
|
-
...
|
|
1684
|
-
ref:
|
|
1685
|
-
href:
|
|
1686
|
-
"aria-label":
|
|
1687
|
-
className:
|
|
1688
|
+
...p,
|
|
1689
|
+
ref: L,
|
|
1690
|
+
href: n,
|
|
1691
|
+
"aria-label": s ? void 0 : t,
|
|
1692
|
+
className: h.fab,
|
|
1688
1693
|
children: [
|
|
1689
1694
|
/* @__PURE__ */ u(
|
|
1690
1695
|
ye,
|
|
1691
1696
|
{
|
|
1692
|
-
trigger:
|
|
1697
|
+
trigger: s ? null : void 0,
|
|
1693
1698
|
text: t,
|
|
1694
|
-
targetRef:
|
|
1699
|
+
targetRef: L
|
|
1695
1700
|
}
|
|
1696
1701
|
),
|
|
1697
|
-
/* @__PURE__ */ u("span", { className:
|
|
1702
|
+
/* @__PURE__ */ u("span", { className: h.stateLayer, children: /* @__PURE__ */ u(
|
|
1698
1703
|
ne,
|
|
1699
1704
|
{
|
|
1700
1705
|
colorName: f({
|
|
1701
|
-
primary:
|
|
1702
|
-
"on-primary-container":
|
|
1703
|
-
"on-secondary-container":
|
|
1704
|
-
"on-tertiary-container":
|
|
1706
|
+
primary: r == "surface",
|
|
1707
|
+
"on-primary-container": r == "primary",
|
|
1708
|
+
"on-secondary-container": r == "secondary",
|
|
1709
|
+
"on-tertiary-container": r == "tertiary"
|
|
1705
1710
|
}),
|
|
1706
|
-
triggerRef:
|
|
1711
|
+
triggerRef: L
|
|
1707
1712
|
}
|
|
1708
1713
|
) }),
|
|
1709
|
-
/* @__PURE__ */ u(Q, { icon:
|
|
1710
|
-
/* @__PURE__ */ u(z, { children:
|
|
1714
|
+
/* @__PURE__ */ u(Q, { icon: i, className: h.icon }),
|
|
1715
|
+
/* @__PURE__ */ u(z, { children: s && /* @__PURE__ */ u(
|
|
1711
1716
|
j.span,
|
|
1712
1717
|
{
|
|
1713
|
-
variants:
|
|
1718
|
+
variants: N,
|
|
1714
1719
|
initial: "hidden",
|
|
1715
1720
|
animate: "visible",
|
|
1716
1721
|
exit: "hidden",
|
|
1717
|
-
className:
|
|
1722
|
+
className: h.label,
|
|
1718
1723
|
children: t
|
|
1719
1724
|
}
|
|
1720
1725
|
) })
|
|
@@ -1724,77 +1729,77 @@ const ye = ({
|
|
|
1724
1729
|
}, xe = ({
|
|
1725
1730
|
variant: e = "standard",
|
|
1726
1731
|
href: t,
|
|
1727
|
-
disabled:
|
|
1732
|
+
disabled: r = !1,
|
|
1728
1733
|
type: l = "button",
|
|
1729
|
-
title:
|
|
1730
|
-
label:
|
|
1731
|
-
onToggle:
|
|
1732
|
-
activated:
|
|
1733
|
-
onClick:
|
|
1734
|
-
icon:
|
|
1735
|
-
size:
|
|
1736
|
-
iconSelected:
|
|
1737
|
-
className:
|
|
1738
|
-
ref:
|
|
1734
|
+
title: n,
|
|
1735
|
+
label: a,
|
|
1736
|
+
onToggle: i,
|
|
1737
|
+
activated: s = !1,
|
|
1738
|
+
onClick: d,
|
|
1739
|
+
icon: o,
|
|
1740
|
+
size: y = "medium",
|
|
1741
|
+
iconSelected: p,
|
|
1742
|
+
className: c,
|
|
1743
|
+
ref: h,
|
|
1739
1744
|
width: v = "default",
|
|
1740
|
-
shape:
|
|
1741
|
-
allowShapeTransformation:
|
|
1742
|
-
transition:
|
|
1745
|
+
shape: L = "rounded",
|
|
1746
|
+
allowShapeTransformation: N = !0,
|
|
1747
|
+
transition: E,
|
|
1743
1748
|
children: w,
|
|
1744
|
-
...
|
|
1749
|
+
...C
|
|
1745
1750
|
}) => {
|
|
1746
|
-
if (w && (
|
|
1751
|
+
if (w && (a = w), !a)
|
|
1747
1752
|
throw new Error(
|
|
1748
1753
|
"IconButton component requires either a label prop or children content to provide an accessible aria-label"
|
|
1749
1754
|
);
|
|
1750
|
-
|
|
1751
|
-
const [
|
|
1752
|
-
let
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
},
|
|
1756
|
-
|
|
1757
|
-
},
|
|
1758
|
-
|
|
1759
|
-
}, [
|
|
1760
|
-
const
|
|
1761
|
-
transition:
|
|
1762
|
-
shape:
|
|
1763
|
-
allowShapeTransformation:
|
|
1755
|
+
n || (n = a);
|
|
1756
|
+
const [b, I] = _.useState(s);
|
|
1757
|
+
let R;
|
|
1758
|
+
i ? i && (R = (B) => {
|
|
1759
|
+
r && B.preventDefault(), I(!b), i(!!b);
|
|
1760
|
+
}, o = b && p || o) : R = (B) => {
|
|
1761
|
+
r && B.preventDefault(), d && d(B);
|
|
1762
|
+
}, P(() => {
|
|
1763
|
+
I(s);
|
|
1764
|
+
}, [s]);
|
|
1765
|
+
const $ = t ? "a" : "button", W = Ve({
|
|
1766
|
+
transition: E,
|
|
1767
|
+
shape: L,
|
|
1768
|
+
allowShapeTransformation: N,
|
|
1764
1769
|
width: v,
|
|
1765
1770
|
href: t,
|
|
1766
|
-
activated:
|
|
1767
|
-
label:
|
|
1768
|
-
iconSelected:
|
|
1769
|
-
isActive:
|
|
1770
|
-
onToggle:
|
|
1771
|
-
disabled:
|
|
1772
|
-
icon:
|
|
1771
|
+
activated: b,
|
|
1772
|
+
label: a,
|
|
1773
|
+
iconSelected: p,
|
|
1774
|
+
isActive: b,
|
|
1775
|
+
onToggle: i,
|
|
1776
|
+
disabled: r,
|
|
1777
|
+
icon: o,
|
|
1773
1778
|
variant: e,
|
|
1774
|
-
className:
|
|
1775
|
-
size:
|
|
1776
|
-
children:
|
|
1777
|
-
...
|
|
1778
|
-
}),
|
|
1779
|
-
return
|
|
1780
|
-
|
|
1779
|
+
className: c,
|
|
1780
|
+
size: y,
|
|
1781
|
+
children: a,
|
|
1782
|
+
...C
|
|
1783
|
+
}), k = V(null), m = h || k;
|
|
1784
|
+
return E = { duration: 0.3, ...E }, /* @__PURE__ */ U(
|
|
1785
|
+
$,
|
|
1781
1786
|
{
|
|
1782
|
-
disabled:
|
|
1787
|
+
disabled: r,
|
|
1783
1788
|
href: t,
|
|
1784
|
-
style: { transition:
|
|
1789
|
+
style: { transition: E.duration + "s" },
|
|
1785
1790
|
className: W.iconButton,
|
|
1786
|
-
"aria-label":
|
|
1787
|
-
...
|
|
1791
|
+
"aria-label": a,
|
|
1792
|
+
...C,
|
|
1788
1793
|
title: void 0,
|
|
1789
|
-
onClick:
|
|
1794
|
+
onClick: R,
|
|
1790
1795
|
ref: m,
|
|
1791
1796
|
children: [
|
|
1792
1797
|
/* @__PURE__ */ u(
|
|
1793
1798
|
ye,
|
|
1794
1799
|
{
|
|
1795
1800
|
targetRef: m,
|
|
1796
|
-
trigger:
|
|
1797
|
-
text:
|
|
1801
|
+
trigger: r ? null : void 0,
|
|
1802
|
+
text: n
|
|
1798
1803
|
}
|
|
1799
1804
|
),
|
|
1800
1805
|
/* @__PURE__ */ u("div", { className: W.touchTarget }),
|
|
@@ -1802,26 +1807,26 @@ const ye = ({
|
|
|
1802
1807
|
"div",
|
|
1803
1808
|
{
|
|
1804
1809
|
className: W.stateLayer,
|
|
1805
|
-
style: { transition:
|
|
1806
|
-
children: !
|
|
1810
|
+
style: { transition: E.duration + "s" },
|
|
1811
|
+
children: !r && /* @__PURE__ */ u(
|
|
1807
1812
|
ne,
|
|
1808
1813
|
{
|
|
1809
1814
|
colorName: f(
|
|
1810
1815
|
e === "standard" && {
|
|
1811
|
-
"on-surface-variant": !
|
|
1812
|
-
primary:
|
|
1816
|
+
"on-surface-variant": !b,
|
|
1817
|
+
primary: b
|
|
1813
1818
|
},
|
|
1814
1819
|
e === "filled" && {
|
|
1815
|
-
primary: !
|
|
1816
|
-
"inverse-on-surface":
|
|
1820
|
+
primary: !b && !!i,
|
|
1821
|
+
"inverse-on-surface": b || !i
|
|
1817
1822
|
},
|
|
1818
1823
|
e === "tonal" && {
|
|
1819
|
-
"on-surface-variant": !
|
|
1820
|
-
"on-secondary-container":
|
|
1824
|
+
"on-surface-variant": !b && !!i,
|
|
1825
|
+
"on-secondary-container": b || !i
|
|
1821
1826
|
},
|
|
1822
1827
|
e === "outlined" && {
|
|
1823
|
-
"on-surface-variant": !
|
|
1824
|
-
"on-primary":
|
|
1828
|
+
"on-surface-variant": !b,
|
|
1829
|
+
"on-primary": b
|
|
1825
1830
|
}
|
|
1826
1831
|
),
|
|
1827
1832
|
triggerRef: m
|
|
@@ -1829,19 +1834,19 @@ const ye = ({
|
|
|
1829
1834
|
)
|
|
1830
1835
|
}
|
|
1831
1836
|
),
|
|
1832
|
-
|
|
1837
|
+
o && /* @__PURE__ */ u(Q, { icon: o, className: W.icon })
|
|
1833
1838
|
]
|
|
1834
1839
|
}
|
|
1835
1840
|
);
|
|
1836
1841
|
}, vt = ({
|
|
1837
1842
|
className: e,
|
|
1838
1843
|
valueFormatter: t,
|
|
1839
|
-
step:
|
|
1844
|
+
step: r = 10,
|
|
1840
1845
|
name: l,
|
|
1841
|
-
value:
|
|
1842
|
-
min:
|
|
1843
|
-
max:
|
|
1844
|
-
marks:
|
|
1846
|
+
value: n = 0,
|
|
1847
|
+
min: a = 0,
|
|
1848
|
+
max: i = 100,
|
|
1849
|
+
marks: s = [
|
|
1845
1850
|
{
|
|
1846
1851
|
value: 0,
|
|
1847
1852
|
label: "0"
|
|
@@ -1851,99 +1856,99 @@ const ye = ({
|
|
|
1851
1856
|
label: "100"
|
|
1852
1857
|
}
|
|
1853
1858
|
],
|
|
1854
|
-
ref:
|
|
1855
|
-
onChange:
|
|
1856
|
-
...
|
|
1859
|
+
ref: d,
|
|
1860
|
+
onChange: o,
|
|
1861
|
+
...y
|
|
1857
1862
|
}) => {
|
|
1858
|
-
const
|
|
1859
|
-
const
|
|
1860
|
-
return
|
|
1861
|
-
},
|
|
1862
|
-
const
|
|
1863
|
-
return (
|
|
1864
|
-
}, [
|
|
1865
|
-
W(!0),
|
|
1863
|
+
const p = (g) => {
|
|
1864
|
+
const x = h(), D = c();
|
|
1865
|
+
return g === 1 / 0 ? 100 : g === -1 / 0 ? 0 : (g - x) / (D - x) * 100;
|
|
1866
|
+
}, c = (g = !1) => g ? i : i == 1 / 0 ? s[(s == null ? void 0 : s.length) - 1].value : i, h = (g = !1) => g ? a : a == -1 / 0 ? s[0].value : a, v = (g) => {
|
|
1867
|
+
const x = h(!1);
|
|
1868
|
+
return (c(!1) - x) * g / 100 + x;
|
|
1869
|
+
}, [L, N] = S(!1), E = V(null), w = d || E, [C, b] = S(n), [I, R] = S(p(n)), [$, W] = S(!1), k = (g) => {
|
|
1870
|
+
W(!0), N(!0), q(g);
|
|
1866
1871
|
}, m = () => {
|
|
1867
|
-
W(!1),
|
|
1872
|
+
W(!1), N(!1);
|
|
1868
1873
|
};
|
|
1869
|
-
|
|
1870
|
-
window.removeEventListener("mouseup", m), window.removeEventListener("mousemove",
|
|
1871
|
-
}), [
|
|
1872
|
-
const
|
|
1874
|
+
P(() => ($ ? (window.addEventListener("mouseup", m), window.addEventListener("mousemove", q), window.addEventListener("touchend", m), window.addEventListener("touchmove", q)) : (window.removeEventListener("mouseup", m), window.removeEventListener("mousemove", q), window.removeEventListener("touchend", m), window.removeEventListener("touchmove", q)), () => {
|
|
1875
|
+
window.removeEventListener("mouseup", m), window.removeEventListener("mousemove", q), window.removeEventListener("touchend", m), window.removeEventListener("touchmove", q);
|
|
1876
|
+
}), [$]);
|
|
1877
|
+
const B = je({
|
|
1873
1878
|
className: e,
|
|
1874
|
-
isChanging:
|
|
1875
|
-
marks:
|
|
1876
|
-
max:
|
|
1877
|
-
min:
|
|
1879
|
+
isChanging: L,
|
|
1880
|
+
marks: s,
|
|
1881
|
+
max: i,
|
|
1882
|
+
min: a,
|
|
1878
1883
|
name: l,
|
|
1879
|
-
step:
|
|
1880
|
-
value:
|
|
1884
|
+
step: r,
|
|
1885
|
+
value: C,
|
|
1881
1886
|
valueFormatter: t,
|
|
1882
|
-
onChange:
|
|
1883
|
-
}),
|
|
1884
|
-
const
|
|
1885
|
-
if (
|
|
1886
|
-
const D =
|
|
1887
|
-
|
|
1887
|
+
onChange: o
|
|
1888
|
+
}), q = (g) => {
|
|
1889
|
+
const x = w == null ? void 0 : w.current;
|
|
1890
|
+
if (x) {
|
|
1891
|
+
const D = x.getBoundingClientRect().left, M = ((g.type === "touchmove" || g.type === "touchstart" ? g.touches[0].clientX : g.clientX) - D) / x.offsetWidth * 100;
|
|
1892
|
+
K({ pourcent: M });
|
|
1888
1893
|
}
|
|
1889
|
-
},
|
|
1890
|
-
pourcent:
|
|
1891
|
-
value:
|
|
1894
|
+
}, K = ({
|
|
1895
|
+
pourcent: g,
|
|
1896
|
+
value: x
|
|
1892
1897
|
}) => {
|
|
1893
|
-
if (
|
|
1894
|
-
if (
|
|
1895
|
-
|
|
1898
|
+
if (g) {
|
|
1899
|
+
if (g >= 100) {
|
|
1900
|
+
b(c(!0)), R(100);
|
|
1896
1901
|
return;
|
|
1897
1902
|
}
|
|
1898
|
-
if (
|
|
1899
|
-
|
|
1903
|
+
if (g <= 0) {
|
|
1904
|
+
b(h(!0)), R(0);
|
|
1900
1905
|
return;
|
|
1901
1906
|
}
|
|
1902
|
-
|
|
1903
|
-
} else if (
|
|
1904
|
-
if (
|
|
1905
|
-
|
|
1907
|
+
x = v(g), x == h() && (x = h(!0)), x == c() && (x = c(!0));
|
|
1908
|
+
} else if (x != null) {
|
|
1909
|
+
if (x >= c()) {
|
|
1910
|
+
b(c(!0)), R(100);
|
|
1906
1911
|
return;
|
|
1907
1912
|
}
|
|
1908
|
-
if (
|
|
1909
|
-
|
|
1913
|
+
if (x <= h()) {
|
|
1914
|
+
b(h(!0)), R(0);
|
|
1910
1915
|
return;
|
|
1911
1916
|
}
|
|
1912
|
-
|
|
1917
|
+
g = p(x);
|
|
1913
1918
|
} else
|
|
1914
1919
|
return;
|
|
1915
|
-
|
|
1916
|
-
let X = F.value === 1 / 0 ?
|
|
1917
|
-
return X = Math.abs(X -
|
|
1918
|
-
}).value),
|
|
1919
|
-
}, [Z,
|
|
1920
|
-
return
|
|
1921
|
-
const
|
|
1922
|
-
w.current &&
|
|
1920
|
+
r != null ? x = Math.round((x - h()) / r) * r + h() : s && (x = s.reduce((D, F, M) => {
|
|
1921
|
+
let X = F.value === 1 / 0 ? c() : F.value === -1 / 0 ? h() : F.value, O = D.value === 1 / 0 ? c() : D.value === -1 / 0 ? h() : D.value;
|
|
1922
|
+
return X = Math.abs(X - x), O = Math.abs(O - x), X < O ? F : D;
|
|
1923
|
+
}).value), x >= c() && (x = c(!0)), x <= h() && (x = h(!0)), g = p(x), b(x), R(g), o && o(x);
|
|
1924
|
+
}, [Z, H] = S(0);
|
|
1925
|
+
return P(() => {
|
|
1926
|
+
const g = () => {
|
|
1927
|
+
w.current && H(w.current.offsetWidth);
|
|
1923
1928
|
};
|
|
1924
|
-
return
|
|
1925
|
-
window.removeEventListener("resize",
|
|
1929
|
+
return g(), window.addEventListener("resize", g), () => {
|
|
1930
|
+
window.removeEventListener("resize", g);
|
|
1926
1931
|
};
|
|
1927
1932
|
}, []), /* @__PURE__ */ U(
|
|
1928
1933
|
"div",
|
|
1929
1934
|
{
|
|
1930
1935
|
tabIndex: 0,
|
|
1931
|
-
onKeyDown: (
|
|
1932
|
-
switch (
|
|
1936
|
+
onKeyDown: (g) => {
|
|
1937
|
+
switch (g.key) {
|
|
1933
1938
|
case "ArrowRight":
|
|
1934
|
-
if (
|
|
1935
|
-
|
|
1936
|
-
else if (
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
+
if (r)
|
|
1940
|
+
K({ value: C + r });
|
|
1941
|
+
else if (s) {
|
|
1942
|
+
const x = s.find((D) => D.value > C);
|
|
1943
|
+
x && K({ value: x.value });
|
|
1939
1944
|
}
|
|
1940
1945
|
break;
|
|
1941
1946
|
case "ArrowLeft":
|
|
1942
|
-
if (
|
|
1943
|
-
|
|
1944
|
-
else if (
|
|
1945
|
-
const
|
|
1946
|
-
|
|
1947
|
+
if (r)
|
|
1948
|
+
K({ value: C - r });
|
|
1949
|
+
else if (s) {
|
|
1950
|
+
const x = s.slice(0).reverse().find((D, F, M) => C === 1 / 0 ? F === 1 : D.value < C);
|
|
1951
|
+
x && K({ value: x.value });
|
|
1947
1952
|
}
|
|
1948
1953
|
break;
|
|
1949
1954
|
default:
|
|
@@ -1951,30 +1956,30 @@ const ye = ({
|
|
|
1951
1956
|
}
|
|
1952
1957
|
},
|
|
1953
1958
|
role: "slider",
|
|
1954
|
-
"aria-valuemin":
|
|
1955
|
-
"aria-valuemax":
|
|
1956
|
-
"aria-valuenow":
|
|
1957
|
-
"aria-valuetext":
|
|
1958
|
-
className:
|
|
1959
|
-
onMouseDown:
|
|
1960
|
-
onClick:
|
|
1959
|
+
"aria-valuemin": h(!0),
|
|
1960
|
+
"aria-valuemax": c(!0),
|
|
1961
|
+
"aria-valuenow": C,
|
|
1962
|
+
"aria-valuetext": C.toString(),
|
|
1963
|
+
className: B.slider,
|
|
1964
|
+
onMouseDown: k,
|
|
1965
|
+
onClick: q,
|
|
1961
1966
|
ref: w,
|
|
1962
|
-
onTouchStart:
|
|
1963
|
-
onDragStart: (
|
|
1964
|
-
...
|
|
1967
|
+
onTouchStart: k,
|
|
1968
|
+
onDragStart: (g) => g.preventDefault(),
|
|
1969
|
+
...y,
|
|
1965
1970
|
children: [
|
|
1966
|
-
/* @__PURE__ */ u("input", { type: "hidden", name: l, value:
|
|
1971
|
+
/* @__PURE__ */ u("input", { type: "hidden", name: l, value: C }),
|
|
1967
1972
|
/* @__PURE__ */ u(
|
|
1968
1973
|
"div",
|
|
1969
1974
|
{
|
|
1970
|
-
className:
|
|
1971
|
-
style: { flex:
|
|
1975
|
+
className: B.activeTrack,
|
|
1976
|
+
style: { flex: I / 100 }
|
|
1972
1977
|
}
|
|
1973
1978
|
),
|
|
1974
|
-
/* @__PURE__ */ u("div", { className:
|
|
1979
|
+
/* @__PURE__ */ u("div", { className: B.handle, children: /* @__PURE__ */ u(z, { children: L && /* @__PURE__ */ u(
|
|
1975
1980
|
j.div,
|
|
1976
1981
|
{
|
|
1977
|
-
className:
|
|
1982
|
+
className: B.valueIndicator,
|
|
1978
1983
|
initial: "hidden",
|
|
1979
1984
|
animate: "visible",
|
|
1980
1985
|
exit: "hidden",
|
|
@@ -1988,35 +1993,35 @@ const ye = ({
|
|
|
1988
1993
|
hidden: { opacity: 1, scale: 0 }
|
|
1989
1994
|
},
|
|
1990
1995
|
transition: { duration: 0.1 },
|
|
1991
|
-
children: t ? t(
|
|
1996
|
+
children: t ? t(C) : C
|
|
1992
1997
|
}
|
|
1993
1998
|
) }) }),
|
|
1994
1999
|
/* @__PURE__ */ u(
|
|
1995
2000
|
"div",
|
|
1996
2001
|
{
|
|
1997
|
-
className:
|
|
1998
|
-
style: { flex: 1 -
|
|
2002
|
+
className: B.inactiveTrack,
|
|
2003
|
+
style: { flex: 1 - I / 100 }
|
|
1999
2004
|
}
|
|
2000
2005
|
),
|
|
2001
2006
|
/* @__PURE__ */ u(
|
|
2002
2007
|
"div",
|
|
2003
2008
|
{
|
|
2004
2009
|
className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
|
|
2005
|
-
children:
|
|
2010
|
+
children: s && s.map((g, x) => {
|
|
2006
2011
|
let D = null;
|
|
2007
|
-
const F = (
|
|
2008
|
-
return
|
|
2012
|
+
const F = (L ? 9 : 10) / Z * 100, M = p(g.value);
|
|
2013
|
+
return M <= I - F ? D = !0 : M >= I + F && (D = !1), /* @__PURE__ */ u(
|
|
2009
2014
|
"div",
|
|
2010
2015
|
{
|
|
2011
|
-
className: f(
|
|
2016
|
+
className: f(B.dot, {
|
|
2012
2017
|
"bg-primary-container": D != null && D,
|
|
2013
2018
|
"bg-primary": D != null && !D
|
|
2014
2019
|
}),
|
|
2015
2020
|
style: {
|
|
2016
|
-
left: `${g
|
|
2021
|
+
left: `${p(g.value)}%`
|
|
2017
2022
|
}
|
|
2018
2023
|
},
|
|
2019
|
-
|
|
2024
|
+
x
|
|
2020
2025
|
);
|
|
2021
2026
|
})
|
|
2022
2027
|
}
|
|
@@ -2045,43 +2050,43 @@ const tt = {
|
|
|
2045
2050
|
}, bt = ({
|
|
2046
2051
|
message: e,
|
|
2047
2052
|
className: t,
|
|
2048
|
-
duration:
|
|
2053
|
+
duration: r,
|
|
2049
2054
|
closeIcon: l = ge,
|
|
2050
|
-
onClose:
|
|
2051
|
-
...
|
|
2055
|
+
onClose: n,
|
|
2056
|
+
...a
|
|
2052
2057
|
}) => {
|
|
2053
|
-
const [
|
|
2058
|
+
const [i, s] = S(!0), d = Fe({
|
|
2054
2059
|
className: t,
|
|
2055
2060
|
closeIcon: l,
|
|
2056
|
-
duration:
|
|
2057
|
-
isVisible:
|
|
2058
|
-
onClose:
|
|
2061
|
+
duration: r,
|
|
2062
|
+
isVisible: i,
|
|
2063
|
+
onClose: n,
|
|
2059
2064
|
message: e
|
|
2060
2065
|
});
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
},
|
|
2065
|
-
}, [
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2066
|
+
P(() => {
|
|
2067
|
+
r && setTimeout(() => {
|
|
2068
|
+
o();
|
|
2069
|
+
}, r);
|
|
2070
|
+
}, [r]);
|
|
2071
|
+
const o = () => {
|
|
2072
|
+
s(!1), n == null || n();
|
|
2068
2073
|
};
|
|
2069
|
-
return /* @__PURE__ */ u(z, { children:
|
|
2074
|
+
return /* @__PURE__ */ u(z, { children: i && /* @__PURE__ */ u(
|
|
2070
2075
|
j.div,
|
|
2071
2076
|
{
|
|
2072
2077
|
initial: { height: 0 },
|
|
2073
2078
|
animate: { height: "auto" },
|
|
2074
2079
|
exit: { height: 0 },
|
|
2075
2080
|
transition: { duration: 0.1 },
|
|
2076
|
-
className:
|
|
2077
|
-
...
|
|
2078
|
-
children: /* @__PURE__ */ U("div", { className:
|
|
2079
|
-
/* @__PURE__ */ u("p", { className:
|
|
2081
|
+
className: d.snackbar,
|
|
2082
|
+
...a,
|
|
2083
|
+
children: /* @__PURE__ */ U("div", { className: d.container, children: [
|
|
2084
|
+
/* @__PURE__ */ u("p", { className: d.supportingText, children: e }),
|
|
2080
2085
|
/* @__PURE__ */ u(
|
|
2081
2086
|
xe,
|
|
2082
2087
|
{
|
|
2083
|
-
onClick: () =>
|
|
2084
|
-
className:
|
|
2088
|
+
onClick: () => o(),
|
|
2089
|
+
className: d.icon,
|
|
2085
2090
|
icon: l,
|
|
2086
2091
|
label: "close the snackbar"
|
|
2087
2092
|
}
|
|
@@ -2092,63 +2097,63 @@ const tt = {
|
|
|
2092
2097
|
}, Nt = ({
|
|
2093
2098
|
selected: e = !1,
|
|
2094
2099
|
className: t,
|
|
2095
|
-
activeIcon:
|
|
2100
|
+
activeIcon: r,
|
|
2096
2101
|
disabled: l = !1,
|
|
2097
|
-
inactiveIcon:
|
|
2098
|
-
onChange:
|
|
2099
|
-
onClick:
|
|
2100
|
-
onKeyDown:
|
|
2101
|
-
ref:
|
|
2102
|
-
...
|
|
2102
|
+
inactiveIcon: n,
|
|
2103
|
+
onChange: a,
|
|
2104
|
+
onClick: i,
|
|
2105
|
+
onKeyDown: s,
|
|
2106
|
+
ref: d,
|
|
2107
|
+
...o
|
|
2103
2108
|
}) => {
|
|
2104
|
-
const [
|
|
2105
|
-
l || (v(),
|
|
2106
|
-
},
|
|
2107
|
-
l || ((w.key === " " || w.key === "Enter") && (w.preventDefault(), v()),
|
|
2109
|
+
const [y, p] = S(e), c = (w) => {
|
|
2110
|
+
l || (v(), i && i(w));
|
|
2111
|
+
}, h = (w) => {
|
|
2112
|
+
l || ((w.key === " " || w.key === "Enter") && (w.preventDefault(), v()), s && s(w));
|
|
2108
2113
|
}, v = () => {
|
|
2109
|
-
|
|
2110
|
-
},
|
|
2114
|
+
p(!y), a == null || a(!y);
|
|
2115
|
+
}, L = Xe({
|
|
2111
2116
|
className: t,
|
|
2112
|
-
isSelected:
|
|
2113
|
-
activeIcon:
|
|
2114
|
-
inactiveIcon:
|
|
2117
|
+
isSelected: y,
|
|
2118
|
+
activeIcon: r,
|
|
2119
|
+
inactiveIcon: n,
|
|
2115
2120
|
disabled: l,
|
|
2116
|
-
selected:
|
|
2117
|
-
onChange:
|
|
2118
|
-
}),
|
|
2121
|
+
selected: y,
|
|
2122
|
+
onChange: a
|
|
2123
|
+
}), N = V(null), E = d || N;
|
|
2119
2124
|
return /* @__PURE__ */ U(
|
|
2120
2125
|
j.div,
|
|
2121
2126
|
{
|
|
2122
2127
|
role: "switch",
|
|
2123
|
-
"aria-checked":
|
|
2128
|
+
"aria-checked": y,
|
|
2124
2129
|
tabIndex: l ? -1 : 0,
|
|
2125
|
-
onKeyDown:
|
|
2126
|
-
onClick:
|
|
2127
|
-
ref:
|
|
2128
|
-
className:
|
|
2129
|
-
...
|
|
2130
|
+
onKeyDown: h,
|
|
2131
|
+
onClick: c,
|
|
2132
|
+
ref: E,
|
|
2133
|
+
className: L.switch,
|
|
2134
|
+
...o,
|
|
2130
2135
|
children: [
|
|
2131
|
-
/* @__PURE__ */ u("input", { type: "hidden", value:
|
|
2136
|
+
/* @__PURE__ */ u("input", { type: "hidden", value: y ? "1" : "0" }),
|
|
2132
2137
|
/* @__PURE__ */ U(
|
|
2133
2138
|
j.div,
|
|
2134
2139
|
{
|
|
2135
2140
|
layout: !0,
|
|
2136
|
-
style: { translate:
|
|
2141
|
+
style: { translate: y ? "50%" : "-50%" },
|
|
2137
2142
|
transition: {
|
|
2138
2143
|
type: "spring",
|
|
2139
2144
|
stiffness: 700,
|
|
2140
2145
|
damping: 30
|
|
2141
2146
|
},
|
|
2142
|
-
className:
|
|
2147
|
+
className: L.handleContainer,
|
|
2143
2148
|
children: [
|
|
2144
|
-
/* @__PURE__ */ u("div", { className:
|
|
2149
|
+
/* @__PURE__ */ u("div", { className: L.handle, children: (y ? r : n) && /* @__PURE__ */ u(
|
|
2145
2150
|
Q,
|
|
2146
2151
|
{
|
|
2147
|
-
className:
|
|
2148
|
-
icon:
|
|
2152
|
+
className: L.icon,
|
|
2153
|
+
icon: y ? r : n
|
|
2149
2154
|
}
|
|
2150
2155
|
) }),
|
|
2151
|
-
/* @__PURE__ */ u("div", { className:
|
|
2156
|
+
/* @__PURE__ */ u("div", { className: L.handleStateLayer })
|
|
2152
2157
|
]
|
|
2153
2158
|
}
|
|
2154
2159
|
)
|
|
@@ -2158,75 +2163,75 @@ const tt = {
|
|
|
2158
2163
|
}, nt = ({
|
|
2159
2164
|
className: e,
|
|
2160
2165
|
onClick: t,
|
|
2161
|
-
label:
|
|
2166
|
+
label: r,
|
|
2162
2167
|
variant: l = "primary",
|
|
2163
|
-
href:
|
|
2164
|
-
icon:
|
|
2165
|
-
selectedTab:
|
|
2166
|
-
setSelectedTab:
|
|
2167
|
-
tabsId:
|
|
2168
|
-
index:
|
|
2169
|
-
onTabSelected:
|
|
2170
|
-
scrollable:
|
|
2171
|
-
selected:
|
|
2172
|
-
ref:
|
|
2168
|
+
href: n,
|
|
2169
|
+
icon: a,
|
|
2170
|
+
selectedTab: i,
|
|
2171
|
+
setSelectedTab: s,
|
|
2172
|
+
tabsId: d,
|
|
2173
|
+
index: o,
|
|
2174
|
+
onTabSelected: y,
|
|
2175
|
+
scrollable: p = !1,
|
|
2176
|
+
selected: c = !1,
|
|
2177
|
+
ref: h,
|
|
2173
2178
|
...v
|
|
2174
2179
|
}) => {
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
}, [
|
|
2179
|
-
|
|
2180
|
-
ref:
|
|
2181
|
-
index:
|
|
2182
|
-
label:
|
|
2183
|
-
icon:
|
|
2180
|
+
const L = V(null), N = h || L, [E, w] = S(c);
|
|
2181
|
+
P(() => {
|
|
2182
|
+
c && i == null ? w(!0) : w(i == o && o != null);
|
|
2183
|
+
}, [i]), P(() => {
|
|
2184
|
+
i == o && y && y({
|
|
2185
|
+
ref: N,
|
|
2186
|
+
index: o || 0,
|
|
2187
|
+
label: r,
|
|
2188
|
+
icon: a
|
|
2184
2189
|
});
|
|
2185
|
-
}, [
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2188
|
-
},
|
|
2190
|
+
}, [i]);
|
|
2191
|
+
const C = n ? "a" : "button", b = (R) => {
|
|
2192
|
+
s && s(o ?? null), t && t(R);
|
|
2193
|
+
}, I = Oe({
|
|
2189
2194
|
className: e,
|
|
2190
|
-
onTabSelected:
|
|
2191
|
-
scrollable:
|
|
2192
|
-
selectedTab:
|
|
2193
|
-
index:
|
|
2194
|
-
tabsId:
|
|
2195
|
-
selected:
|
|
2195
|
+
onTabSelected: y,
|
|
2196
|
+
scrollable: p,
|
|
2197
|
+
selectedTab: i,
|
|
2198
|
+
index: o,
|
|
2199
|
+
tabsId: d,
|
|
2200
|
+
selected: E,
|
|
2196
2201
|
variant: l,
|
|
2197
|
-
icon:
|
|
2198
|
-
label:
|
|
2199
|
-
isSelected:
|
|
2200
|
-
setSelectedTab:
|
|
2201
|
-
href:
|
|
2202
|
+
icon: a,
|
|
2203
|
+
label: r,
|
|
2204
|
+
isSelected: E,
|
|
2205
|
+
setSelectedTab: s,
|
|
2206
|
+
href: n
|
|
2202
2207
|
});
|
|
2203
2208
|
return /* @__PURE__ */ U(
|
|
2204
|
-
|
|
2209
|
+
C,
|
|
2205
2210
|
{
|
|
2206
2211
|
...v,
|
|
2207
2212
|
role: "tab",
|
|
2208
|
-
"aria-selected":
|
|
2209
|
-
ref:
|
|
2210
|
-
href:
|
|
2211
|
-
className:
|
|
2212
|
-
onClick:
|
|
2213
|
+
"aria-selected": E,
|
|
2214
|
+
ref: N,
|
|
2215
|
+
href: n,
|
|
2216
|
+
className: I.tab,
|
|
2217
|
+
onClick: b,
|
|
2213
2218
|
...v,
|
|
2214
2219
|
children: [
|
|
2215
|
-
/* @__PURE__ */ u("span", { className:
|
|
2220
|
+
/* @__PURE__ */ u("span", { className: I.stateLayer, children: /* @__PURE__ */ u(
|
|
2216
2221
|
ne,
|
|
2217
2222
|
{
|
|
2218
|
-
colorName: l === "primary" &&
|
|
2219
|
-
triggerRef:
|
|
2223
|
+
colorName: l === "primary" && E ? "primary" : "on-surface",
|
|
2224
|
+
triggerRef: N
|
|
2220
2225
|
}
|
|
2221
2226
|
) }),
|
|
2222
|
-
/* @__PURE__ */ U("span", { className:
|
|
2223
|
-
|
|
2224
|
-
/* @__PURE__ */ u("span", { className:
|
|
2225
|
-
|
|
2227
|
+
/* @__PURE__ */ U("span", { className: I.content, children: [
|
|
2228
|
+
a && /* @__PURE__ */ u(Q, { icon: a, className: I.icon }),
|
|
2229
|
+
/* @__PURE__ */ u("span", { className: I.label, children: r }),
|
|
2230
|
+
E && /* @__PURE__ */ u(
|
|
2226
2231
|
j.span,
|
|
2227
2232
|
{
|
|
2228
|
-
layoutId: `underline-${
|
|
2229
|
-
className:
|
|
2233
|
+
layoutId: `underline-${d}`,
|
|
2234
|
+
className: I.underline,
|
|
2230
2235
|
transition: { duration: 0.3 }
|
|
2231
2236
|
}
|
|
2232
2237
|
)
|
|
@@ -2237,126 +2242,126 @@ const tt = {
|
|
|
2237
2242
|
}, Lt = ({
|
|
2238
2243
|
variant: e = "primary",
|
|
2239
2244
|
onTabSelected: t,
|
|
2240
|
-
children:
|
|
2245
|
+
children: r,
|
|
2241
2246
|
className: l,
|
|
2242
|
-
selectedTab:
|
|
2243
|
-
setSelectedTab:
|
|
2244
|
-
scrollable:
|
|
2247
|
+
selectedTab: n,
|
|
2248
|
+
setSelectedTab: a,
|
|
2249
|
+
scrollable: i = !1
|
|
2245
2250
|
}) => {
|
|
2246
|
-
const [
|
|
2251
|
+
const [s, d] = S(
|
|
2247
2252
|
null
|
|
2248
2253
|
);
|
|
2249
|
-
let
|
|
2250
|
-
|
|
2251
|
-
const
|
|
2252
|
-
(
|
|
2253
|
-
),
|
|
2254
|
-
if (t == null || t(
|
|
2255
|
-
const
|
|
2256
|
-
if (
|
|
2257
|
-
const
|
|
2258
|
-
|
|
2254
|
+
let o;
|
|
2255
|
+
n == 0 || n != null ? o = n : o = s;
|
|
2256
|
+
const y = a || d, p = _.Children.toArray(r).filter(
|
|
2257
|
+
(N) => _.isValidElement(N) && N.type === nt
|
|
2258
|
+
), c = _.useRef(null), h = (N) => {
|
|
2259
|
+
if (t == null || t(N), i) {
|
|
2260
|
+
const E = c.current, w = N.ref.current;
|
|
2261
|
+
if (E && w) {
|
|
2262
|
+
const C = w.offsetLeft + w.offsetWidth / 2 - E.offsetWidth / 2;
|
|
2263
|
+
E.scrollTo({ left: C, behavior: "smooth" });
|
|
2259
2264
|
}
|
|
2260
2265
|
}
|
|
2261
|
-
}, v = ve(() => ce(), []),
|
|
2262
|
-
children:
|
|
2266
|
+
}, v = ve(() => ce(), []), L = qe({
|
|
2267
|
+
children: r,
|
|
2263
2268
|
onTabSelected: t,
|
|
2264
|
-
scrollable:
|
|
2265
|
-
selectedTab:
|
|
2266
|
-
setSelectedTab:
|
|
2269
|
+
scrollable: i,
|
|
2270
|
+
selectedTab: o,
|
|
2271
|
+
setSelectedTab: y,
|
|
2267
2272
|
className: l,
|
|
2268
2273
|
variant: e
|
|
2269
2274
|
});
|
|
2270
|
-
return /* @__PURE__ */ u("div", { ref:
|
|
2271
|
-
key:
|
|
2272
|
-
index:
|
|
2275
|
+
return /* @__PURE__ */ u("div", { ref: c, role: "tablist", className: L.tabs, children: p.map((N, E) => _.cloneElement(N, {
|
|
2276
|
+
key: E,
|
|
2277
|
+
index: E,
|
|
2273
2278
|
variant: e,
|
|
2274
|
-
selectedTab:
|
|
2275
|
-
setSelectedTab:
|
|
2279
|
+
selectedTab: o,
|
|
2280
|
+
setSelectedTab: y,
|
|
2276
2281
|
tabsId: v,
|
|
2277
|
-
onTabSelected:
|
|
2278
|
-
scrollable:
|
|
2282
|
+
onTabSelected: h,
|
|
2283
|
+
scrollable: i
|
|
2279
2284
|
})) });
|
|
2280
2285
|
}, Et = ({
|
|
2281
2286
|
variant: e = "filled",
|
|
2282
2287
|
disabled: t = !1,
|
|
2283
|
-
errorText:
|
|
2288
|
+
errorText: r,
|
|
2284
2289
|
placeholder: l,
|
|
2285
|
-
suffix:
|
|
2286
|
-
name:
|
|
2287
|
-
label:
|
|
2288
|
-
className:
|
|
2289
|
-
supportingText:
|
|
2290
|
-
trailingIcon:
|
|
2291
|
-
leadingIcon:
|
|
2292
|
-
type:
|
|
2293
|
-
textLine:
|
|
2294
|
-
autoComplete:
|
|
2290
|
+
suffix: n,
|
|
2291
|
+
name: a,
|
|
2292
|
+
label: i,
|
|
2293
|
+
className: s,
|
|
2294
|
+
supportingText: d,
|
|
2295
|
+
trailingIcon: o,
|
|
2296
|
+
leadingIcon: y,
|
|
2297
|
+
type: p = "text",
|
|
2298
|
+
textLine: c = "singleLine",
|
|
2299
|
+
autoComplete: h = "on",
|
|
2295
2300
|
onChange: v,
|
|
2296
|
-
value:
|
|
2297
|
-
showSupportingText:
|
|
2298
|
-
...
|
|
2301
|
+
value: L,
|
|
2302
|
+
showSupportingText: N = !1,
|
|
2303
|
+
...E
|
|
2299
2304
|
}) => {
|
|
2300
|
-
const [w,
|
|
2301
|
-
|
|
2305
|
+
const [w, C] = S(L ?? ""), [b, I] = S(!1), [R, $] = S(!1), [W, k] = S(
|
|
2306
|
+
N
|
|
2302
2307
|
);
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}, [
|
|
2306
|
-
|
|
2307
|
-
}, [
|
|
2308
|
-
|
|
2309
|
-
}, [W,
|
|
2310
|
-
|
|
2311
|
-
}, [
|
|
2312
|
-
const m = _.useRef(null),
|
|
2313
|
-
m.current && !
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2316
|
-
},
|
|
2308
|
+
P(() => {
|
|
2309
|
+
C(L ?? "");
|
|
2310
|
+
}, [L]), P(() => {
|
|
2311
|
+
r != null && r.length ? $(!0) : $(!1);
|
|
2312
|
+
}, [r]), P(() => {
|
|
2313
|
+
N ? k(N) : d != null && d.length ? k(!0) : k(!1);
|
|
2314
|
+
}, [W, d]), P(() => {
|
|
2315
|
+
b && $(!1);
|
|
2316
|
+
}, [b]);
|
|
2317
|
+
const m = _.useRef(null), B = () => {
|
|
2318
|
+
m.current && !b && m.current.focus();
|
|
2319
|
+
}, q = () => {
|
|
2320
|
+
I(!0);
|
|
2321
|
+
}, K = (D) => {
|
|
2317
2322
|
const F = D.target.value;
|
|
2318
|
-
|
|
2323
|
+
C(F), $(!1), typeof v == "function" && v(F);
|
|
2319
2324
|
}, Z = () => {
|
|
2320
|
-
|
|
2321
|
-
},
|
|
2325
|
+
I(!1);
|
|
2326
|
+
}, H = He({
|
|
2322
2327
|
showSupportingText: W,
|
|
2323
|
-
isFocused:
|
|
2324
|
-
showErrorIcon:
|
|
2328
|
+
isFocused: b,
|
|
2329
|
+
showErrorIcon: R,
|
|
2325
2330
|
disabled: t,
|
|
2326
|
-
name:
|
|
2327
|
-
label:
|
|
2328
|
-
autoComplete:
|
|
2329
|
-
className:
|
|
2331
|
+
name: a,
|
|
2332
|
+
label: i,
|
|
2333
|
+
autoComplete: h,
|
|
2334
|
+
className: s,
|
|
2330
2335
|
onChange: v,
|
|
2331
2336
|
placeholder: l,
|
|
2332
|
-
supportingText:
|
|
2333
|
-
type:
|
|
2334
|
-
leadingIcon:
|
|
2335
|
-
trailingIcon:
|
|
2337
|
+
supportingText: d,
|
|
2338
|
+
type: p,
|
|
2339
|
+
leadingIcon: y,
|
|
2340
|
+
trailingIcon: o,
|
|
2336
2341
|
variant: e,
|
|
2337
|
-
errorText:
|
|
2342
|
+
errorText: r,
|
|
2338
2343
|
value: w,
|
|
2339
|
-
suffix:
|
|
2340
|
-
textLine:
|
|
2341
|
-
}), [A] =
|
|
2342
|
-
let
|
|
2343
|
-
switch (
|
|
2344
|
+
suffix: n,
|
|
2345
|
+
textLine: c
|
|
2346
|
+
}), [A] = S(ce());
|
|
2347
|
+
let g, x;
|
|
2348
|
+
switch (c) {
|
|
2344
2349
|
case "multiLine":
|
|
2345
|
-
|
|
2350
|
+
x = ke, g = {};
|
|
2346
2351
|
break;
|
|
2347
2352
|
case "textAreas":
|
|
2348
|
-
|
|
2353
|
+
x = "textarea", g = {};
|
|
2349
2354
|
break;
|
|
2350
2355
|
case "singleLine":
|
|
2351
2356
|
default:
|
|
2352
|
-
|
|
2357
|
+
x = "input", g = { type: p };
|
|
2353
2358
|
break;
|
|
2354
2359
|
}
|
|
2355
|
-
return /* @__PURE__ */ U("div", { className:
|
|
2356
|
-
/* @__PURE__ */ U("fieldset", { onClick:
|
|
2357
|
-
/* @__PURE__ */ u("div", { className:
|
|
2358
|
-
|
|
2359
|
-
!(!
|
|
2360
|
+
return /* @__PURE__ */ U("div", { className: H.textField, ...E, children: [
|
|
2361
|
+
/* @__PURE__ */ U("fieldset", { onClick: B, className: H.content, children: [
|
|
2362
|
+
/* @__PURE__ */ u("div", { className: H.stateLayer }),
|
|
2363
|
+
y && /* @__PURE__ */ u("div", { className: H.leadingIcon, children: _.isValidElement(y) ? y : /* @__PURE__ */ u(Q, { className: "w-5 h-5", icon: y }) }),
|
|
2364
|
+
!(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2360
2365
|
j.legend,
|
|
2361
2366
|
{
|
|
2362
2367
|
variants: {
|
|
@@ -2364,83 +2369,83 @@ const tt = {
|
|
|
2364
2369
|
visible: { width: "auto", padding: "0 8px" }
|
|
2365
2370
|
},
|
|
2366
2371
|
initial: "hidden",
|
|
2367
|
-
animate: !
|
|
2372
|
+
animate: !b && !w.length ? "hidden" : "visible",
|
|
2368
2373
|
className: "max-w-full ml-2 px-2 text-body-small h-0",
|
|
2369
2374
|
transition: { duration: 0.2 },
|
|
2370
2375
|
children: /* @__PURE__ */ u("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ u(
|
|
2371
2376
|
j.span,
|
|
2372
2377
|
{
|
|
2373
|
-
className:
|
|
2378
|
+
className: H.label,
|
|
2374
2379
|
transition: { duration: 0.3 },
|
|
2375
2380
|
layoutId: A,
|
|
2376
|
-
children:
|
|
2381
|
+
children: i
|
|
2377
2382
|
}
|
|
2378
2383
|
) })
|
|
2379
2384
|
}
|
|
2380
2385
|
),
|
|
2381
2386
|
/* @__PURE__ */ U("div", { className: "flex-1 relative", children: [
|
|
2382
|
-
(!
|
|
2387
|
+
(!b && !w.length || e == "filled") && /* @__PURE__ */ u(
|
|
2383
2388
|
j.label,
|
|
2384
2389
|
{
|
|
2385
|
-
htmlFor:
|
|
2390
|
+
htmlFor: a,
|
|
2386
2391
|
className: f(
|
|
2387
2392
|
"absolute left-4 transition-all duration-300",
|
|
2388
2393
|
{
|
|
2389
|
-
"text-body-small top-2": e == "filled" && !(!
|
|
2390
|
-
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!
|
|
2394
|
+
"text-body-small top-2": e == "filled" && !(!b && !w.length),
|
|
2395
|
+
"text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!b && !w.length))
|
|
2391
2396
|
}
|
|
2392
2397
|
),
|
|
2393
2398
|
transition: { duration: 0.3 },
|
|
2394
2399
|
children: /* @__PURE__ */ u(
|
|
2395
2400
|
j.span,
|
|
2396
2401
|
{
|
|
2397
|
-
className:
|
|
2402
|
+
className: H.label,
|
|
2398
2403
|
transition: { duration: 0.3 },
|
|
2399
2404
|
layoutId: e == "outlined" ? A : void 0,
|
|
2400
|
-
children:
|
|
2405
|
+
children: i
|
|
2401
2406
|
}
|
|
2402
2407
|
)
|
|
2403
2408
|
}
|
|
2404
2409
|
),
|
|
2405
2410
|
/* @__PURE__ */ u(
|
|
2406
|
-
|
|
2411
|
+
x,
|
|
2407
2412
|
{
|
|
2408
2413
|
ref: m,
|
|
2409
2414
|
value: w,
|
|
2410
|
-
onChange:
|
|
2411
|
-
className:
|
|
2412
|
-
id:
|
|
2413
|
-
name:
|
|
2414
|
-
placeholder:
|
|
2415
|
-
onFocus:
|
|
2415
|
+
onChange: K,
|
|
2416
|
+
className: H.input,
|
|
2417
|
+
id: a,
|
|
2418
|
+
name: a,
|
|
2419
|
+
placeholder: b ? l ?? void 0 : "",
|
|
2420
|
+
onFocus: q,
|
|
2416
2421
|
onBlur: Z,
|
|
2417
2422
|
disabled: t,
|
|
2418
|
-
autoComplete:
|
|
2419
|
-
"aria-invalid": !!(
|
|
2420
|
-
"aria-label":
|
|
2421
|
-
...
|
|
2423
|
+
autoComplete: h,
|
|
2424
|
+
"aria-invalid": !!(r != null && r.length),
|
|
2425
|
+
"aria-label": i,
|
|
2426
|
+
...g
|
|
2422
2427
|
}
|
|
2423
2428
|
)
|
|
2424
2429
|
] }),
|
|
2425
|
-
/* @__PURE__ */ u("div", { className:
|
|
2426
|
-
!
|
|
2427
|
-
|
|
2430
|
+
/* @__PURE__ */ u("div", { className: H.activeIndicator }),
|
|
2431
|
+
!R && /* @__PURE__ */ U(re, { children: [
|
|
2432
|
+
o && /* @__PURE__ */ u(
|
|
2428
2433
|
"div",
|
|
2429
2434
|
{
|
|
2430
2435
|
onClick: (D) => {
|
|
2431
2436
|
D.stopPropagation();
|
|
2432
2437
|
},
|
|
2433
|
-
className:
|
|
2434
|
-
children: _.isValidElement(
|
|
2438
|
+
className: H.trailingIcon,
|
|
2439
|
+
children: _.isValidElement(o) ? o : /* @__PURE__ */ u(Q, { className: "h-5", icon: o })
|
|
2435
2440
|
}
|
|
2436
2441
|
),
|
|
2437
|
-
!
|
|
2442
|
+
!o && n && /* @__PURE__ */ u("span", { className: H.suffix, children: n })
|
|
2438
2443
|
] }),
|
|
2439
|
-
|
|
2444
|
+
R && /* @__PURE__ */ u(
|
|
2440
2445
|
"div",
|
|
2441
2446
|
{
|
|
2442
|
-
className: f(
|
|
2443
|
-
" absolute right-0": !
|
|
2447
|
+
className: f(H.trailingIcon, {
|
|
2448
|
+
" absolute right-0": !o
|
|
2444
2449
|
}),
|
|
2445
2450
|
children: /* @__PURE__ */ u(
|
|
2446
2451
|
Q,
|
|
@@ -2452,11 +2457,11 @@ const tt = {
|
|
|
2452
2457
|
}
|
|
2453
2458
|
)
|
|
2454
2459
|
] }),
|
|
2455
|
-
W && /* @__PURE__ */ u("p", { className:
|
|
2460
|
+
W && /* @__PURE__ */ u("p", { className: H.supportingText, children: r != null && r.length ? r : d != null && d.length ? d : " " })
|
|
2456
2461
|
] });
|
|
2457
|
-
}, lt =
|
|
2462
|
+
}, lt = G(
|
|
2458
2463
|
"navigationRailItem",
|
|
2459
|
-
({ isSelected: e, icon: t, label:
|
|
2464
|
+
({ isSelected: e, icon: t, label: r, variant: l }) => ({
|
|
2460
2465
|
navigationRailItem: f(" group flex flex-col pt-1 pb-1.5 cursor-pointer", {
|
|
2461
2466
|
"text-on-surface-variant": !e,
|
|
2462
2467
|
"text-on-secondary-container": e,
|
|
@@ -2469,9 +2474,9 @@ const tt = {
|
|
|
2469
2474
|
"bg-secondary-container overflow-hidden": e,
|
|
2470
2475
|
"gap-2 ": l == "horizontal",
|
|
2471
2476
|
"gap-0 ": l == "vertical",
|
|
2472
|
-
"p-4": !
|
|
2477
|
+
"p-4": !r
|
|
2473
2478
|
},
|
|
2474
|
-
|
|
2479
|
+
r && [
|
|
2475
2480
|
"px-4",
|
|
2476
2481
|
{
|
|
2477
2482
|
"py-1 ": l == "vertical",
|
|
@@ -2495,86 +2500,86 @@ const tt = {
|
|
|
2495
2500
|
), ot = ({ 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 }) }), at = ({
|
|
2496
2501
|
className: e,
|
|
2497
2502
|
onClick: t,
|
|
2498
|
-
label:
|
|
2503
|
+
label: r,
|
|
2499
2504
|
variant: l = "vertical",
|
|
2500
|
-
href:
|
|
2501
|
-
icon:
|
|
2502
|
-
selectedItem:
|
|
2503
|
-
setSelectedItem:
|
|
2504
|
-
index:
|
|
2505
|
-
onItemSelected:
|
|
2506
|
-
selected:
|
|
2507
|
-
ref:
|
|
2508
|
-
transition:
|
|
2509
|
-
isExtended:
|
|
2505
|
+
href: n,
|
|
2506
|
+
icon: a,
|
|
2507
|
+
selectedItem: i,
|
|
2508
|
+
setSelectedItem: s,
|
|
2509
|
+
index: d,
|
|
2510
|
+
onItemSelected: o,
|
|
2511
|
+
selected: y = !1,
|
|
2512
|
+
ref: p,
|
|
2513
|
+
transition: c,
|
|
2514
|
+
isExtended: h,
|
|
2510
2515
|
iconSelected: v,
|
|
2511
|
-
style:
|
|
2512
|
-
extendedOnly:
|
|
2513
|
-
children:
|
|
2516
|
+
style: L,
|
|
2517
|
+
extendedOnly: N,
|
|
2518
|
+
children: E,
|
|
2514
2519
|
...w
|
|
2515
2520
|
}) => {
|
|
2516
|
-
|
|
2517
|
-
const
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
}, [
|
|
2521
|
-
|
|
2522
|
-
ref:
|
|
2523
|
-
index:
|
|
2524
|
-
label:
|
|
2525
|
-
icon:
|
|
2521
|
+
E && (r = E);
|
|
2522
|
+
const C = V(null), b = p || C, [I, R] = S(y);
|
|
2523
|
+
P(() => {
|
|
2524
|
+
y && i == null ? R(!0) : R(i == d && d != null);
|
|
2525
|
+
}, [i]), P(() => {
|
|
2526
|
+
i == d && o && o({
|
|
2527
|
+
ref: b,
|
|
2528
|
+
index: d || 0,
|
|
2529
|
+
label: r,
|
|
2530
|
+
icon: a
|
|
2526
2531
|
});
|
|
2527
|
-
}, [
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
},
|
|
2531
|
-
isExtended:
|
|
2532
|
-
extendedOnly:
|
|
2532
|
+
}, [i]);
|
|
2533
|
+
const $ = n ? "a" : "button", W = (m) => {
|
|
2534
|
+
s && s(d ?? null), t && t(m);
|
|
2535
|
+
}, k = lt({
|
|
2536
|
+
isExtended: h,
|
|
2537
|
+
extendedOnly: N,
|
|
2533
2538
|
className: e,
|
|
2534
|
-
onItemSelected:
|
|
2535
|
-
selectedItem:
|
|
2536
|
-
index:
|
|
2537
|
-
transition:
|
|
2538
|
-
selected:
|
|
2539
|
+
onItemSelected: o,
|
|
2540
|
+
selectedItem: i,
|
|
2541
|
+
index: d,
|
|
2542
|
+
transition: c,
|
|
2543
|
+
selected: I,
|
|
2539
2544
|
variant: l,
|
|
2540
|
-
icon:
|
|
2541
|
-
label:
|
|
2542
|
-
isSelected:
|
|
2543
|
-
setSelectedItem:
|
|
2544
|
-
href:
|
|
2545
|
-
children:
|
|
2545
|
+
icon: a,
|
|
2546
|
+
label: r,
|
|
2547
|
+
isSelected: I,
|
|
2548
|
+
setSelectedItem: s,
|
|
2549
|
+
href: n,
|
|
2550
|
+
children: r,
|
|
2546
2551
|
iconSelected: v
|
|
2547
2552
|
});
|
|
2548
|
-
return
|
|
2553
|
+
return c = { duration: 0.3, ...c }, N && !h ? null : (
|
|
2549
2554
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2550
2555
|
// @ts-expect-error
|
|
2551
2556
|
/* @__PURE__ */ U(
|
|
2552
|
-
|
|
2557
|
+
$,
|
|
2553
2558
|
{
|
|
2554
2559
|
...w,
|
|
2555
2560
|
role: "tab",
|
|
2556
|
-
"aria-selected":
|
|
2557
|
-
ref:
|
|
2558
|
-
href:
|
|
2559
|
-
className:
|
|
2561
|
+
"aria-selected": I,
|
|
2562
|
+
ref: b,
|
|
2563
|
+
href: n,
|
|
2564
|
+
className: k.navigationRailItem,
|
|
2560
2565
|
onClick: W,
|
|
2561
|
-
style: { transition:
|
|
2566
|
+
style: { transition: c.duration + "s", ...L },
|
|
2562
2567
|
children: [
|
|
2563
2568
|
/* @__PURE__ */ U(
|
|
2564
2569
|
j.div,
|
|
2565
2570
|
{
|
|
2566
2571
|
style: {
|
|
2567
|
-
transition: l == "horizontal" ?
|
|
2572
|
+
transition: l == "horizontal" ? c.duration + `s, gap ${c.duration / 2}s ${c.duration - c.duration / 2}s` : c.duration + `s, gap ${c.duration / 3}s ${c.duration - c.duration / 3}s`
|
|
2568
2573
|
},
|
|
2569
|
-
transition:
|
|
2570
|
-
className:
|
|
2574
|
+
transition: c,
|
|
2575
|
+
className: k.container,
|
|
2571
2576
|
children: [
|
|
2572
|
-
/* @__PURE__ */ u(j.div, { layout: !0, className:
|
|
2573
|
-
|
|
2577
|
+
/* @__PURE__ */ u(j.div, { layout: !0, className: k.stateLayer }),
|
|
2578
|
+
a && /* @__PURE__ */ u(
|
|
2574
2579
|
Q,
|
|
2575
2580
|
{
|
|
2576
|
-
icon:
|
|
2577
|
-
className:
|
|
2581
|
+
icon: I ? v : a,
|
|
2582
|
+
className: k.icon
|
|
2578
2583
|
}
|
|
2579
2584
|
),
|
|
2580
2585
|
/* @__PURE__ */ u(z, { children: l == "horizontal" && (() => {
|
|
@@ -2582,16 +2587,16 @@ const tt = {
|
|
|
2582
2587
|
width: 0,
|
|
2583
2588
|
opacity: 0,
|
|
2584
2589
|
transition: {
|
|
2585
|
-
...
|
|
2590
|
+
...c
|
|
2586
2591
|
}
|
|
2587
|
-
},
|
|
2592
|
+
}, B = {
|
|
2588
2593
|
width: "auto",
|
|
2589
2594
|
opacity: 1,
|
|
2590
2595
|
transition: {
|
|
2591
|
-
...
|
|
2596
|
+
...c,
|
|
2592
2597
|
opacity: {
|
|
2593
|
-
duration:
|
|
2594
|
-
delay:
|
|
2598
|
+
duration: c.duration / 2,
|
|
2599
|
+
delay: c.duration - c.duration / 2
|
|
2595
2600
|
}
|
|
2596
2601
|
}
|
|
2597
2602
|
};
|
|
@@ -2599,10 +2604,10 @@ const tt = {
|
|
|
2599
2604
|
j.span,
|
|
2600
2605
|
{
|
|
2601
2606
|
initial: m,
|
|
2602
|
-
animate:
|
|
2607
|
+
animate: B,
|
|
2603
2608
|
exit: m,
|
|
2604
|
-
className:
|
|
2605
|
-
children:
|
|
2609
|
+
className: k.label,
|
|
2610
|
+
children: r
|
|
2606
2611
|
}
|
|
2607
2612
|
);
|
|
2608
2613
|
})() })
|
|
@@ -2614,19 +2619,19 @@ const tt = {
|
|
|
2614
2619
|
height: 0,
|
|
2615
2620
|
opacity: 0,
|
|
2616
2621
|
transition: {
|
|
2617
|
-
...
|
|
2622
|
+
...c,
|
|
2618
2623
|
opacity: {
|
|
2619
2624
|
duration: 0
|
|
2620
2625
|
}
|
|
2621
2626
|
}
|
|
2622
|
-
},
|
|
2627
|
+
}, B = {
|
|
2623
2628
|
height: "auto",
|
|
2624
2629
|
opacity: 1,
|
|
2625
2630
|
transition: {
|
|
2626
|
-
...
|
|
2631
|
+
...c,
|
|
2627
2632
|
opacity: {
|
|
2628
|
-
duration:
|
|
2629
|
-
delay:
|
|
2633
|
+
duration: c.duration / 3,
|
|
2634
|
+
delay: c.duration - c.duration / 3
|
|
2630
2635
|
}
|
|
2631
2636
|
}
|
|
2632
2637
|
};
|
|
@@ -2634,11 +2639,11 @@ const tt = {
|
|
|
2634
2639
|
j.span,
|
|
2635
2640
|
{
|
|
2636
2641
|
initial: m,
|
|
2637
|
-
animate:
|
|
2642
|
+
animate: B,
|
|
2638
2643
|
exit: m,
|
|
2639
|
-
className:
|
|
2640
|
-
transition:
|
|
2641
|
-
children:
|
|
2644
|
+
className: k.label,
|
|
2645
|
+
transition: c,
|
|
2646
|
+
children: r
|
|
2642
2647
|
}
|
|
2643
2648
|
);
|
|
2644
2649
|
})() })
|
|
@@ -2646,7 +2651,7 @@ const tt = {
|
|
|
2646
2651
|
}
|
|
2647
2652
|
)
|
|
2648
2653
|
);
|
|
2649
|
-
}, st =
|
|
2654
|
+
}, st = G(
|
|
2650
2655
|
"navigationRail",
|
|
2651
2656
|
({ isExtended: e, alignment: t }) => ({
|
|
2652
2657
|
navigationRail: f("flex flex-col left-0 h-full top-0 pt-11", {
|
|
@@ -2665,12 +2670,12 @@ const tt = {
|
|
|
2665
2670
|
), It = ({
|
|
2666
2671
|
variant: e = "standard",
|
|
2667
2672
|
onItemSelected: t,
|
|
2668
|
-
children:
|
|
2673
|
+
children: r,
|
|
2669
2674
|
className: l,
|
|
2670
|
-
selectedItem:
|
|
2671
|
-
extended:
|
|
2672
|
-
alignment:
|
|
2673
|
-
menu:
|
|
2675
|
+
selectedItem: n,
|
|
2676
|
+
extended: a,
|
|
2677
|
+
alignment: i = "top",
|
|
2678
|
+
menu: s = {
|
|
2674
2679
|
closed: {
|
|
2675
2680
|
icon: tt,
|
|
2676
2681
|
label: "Open menu"
|
|
@@ -2680,79 +2685,79 @@ const tt = {
|
|
|
2680
2685
|
label: "Close menu"
|
|
2681
2686
|
}
|
|
2682
2687
|
},
|
|
2683
|
-
style:
|
|
2684
|
-
onExtendedChange:
|
|
2685
|
-
transition:
|
|
2686
|
-
setSelectedItem:
|
|
2688
|
+
style: d,
|
|
2689
|
+
onExtendedChange: o,
|
|
2690
|
+
transition: y,
|
|
2691
|
+
setSelectedItem: p
|
|
2687
2692
|
}) => {
|
|
2688
|
-
const [
|
|
2689
|
-
let
|
|
2690
|
-
|
|
2691
|
-
const
|
|
2692
|
-
t == null || t(
|
|
2693
|
+
const [c, h] = S(null), [v, L] = S(a);
|
|
2694
|
+
let N;
|
|
2695
|
+
n == 0 || n != null ? N = n : N = c;
|
|
2696
|
+
const E = p || h, w = V(null), C = (k) => {
|
|
2697
|
+
t == null || t(k);
|
|
2693
2698
|
};
|
|
2694
|
-
function
|
|
2699
|
+
function b(k) {
|
|
2695
2700
|
const m = [];
|
|
2696
|
-
return be.forEach(
|
|
2697
|
-
ee(
|
|
2701
|
+
return be.forEach(k, (B) => {
|
|
2702
|
+
ee(B) && B.type === Ne ? m.push(...b(B.props.children)) : m.push(B);
|
|
2698
2703
|
}), m;
|
|
2699
2704
|
}
|
|
2700
|
-
const
|
|
2701
|
-
(
|
|
2702
|
-
),
|
|
2703
|
-
children:
|
|
2705
|
+
const I = b(r), R = I.filter(
|
|
2706
|
+
(k) => ee(k) && k.type === ue
|
|
2707
|
+
), $ = st({
|
|
2708
|
+
children: r,
|
|
2704
2709
|
onItemSelected: t,
|
|
2705
|
-
selectedItem:
|
|
2706
|
-
setSelectedItem:
|
|
2710
|
+
selectedItem: N,
|
|
2711
|
+
setSelectedItem: E,
|
|
2707
2712
|
className: l,
|
|
2708
2713
|
variant: e,
|
|
2709
2714
|
extended: v,
|
|
2710
2715
|
isExtended: v,
|
|
2711
|
-
alignment:
|
|
2712
|
-
menu:
|
|
2713
|
-
transition:
|
|
2714
|
-
onExtendedChange:
|
|
2716
|
+
alignment: i,
|
|
2717
|
+
menu: s,
|
|
2718
|
+
transition: y,
|
|
2719
|
+
onExtendedChange: o
|
|
2715
2720
|
});
|
|
2716
|
-
|
|
2721
|
+
y = { duration: 0.3, ...y };
|
|
2717
2722
|
const W = V(!1);
|
|
2718
|
-
return W.current = !1,
|
|
2719
|
-
|
|
2723
|
+
return W.current = !1, P(() => {
|
|
2724
|
+
o == null || o(v ?? !1);
|
|
2720
2725
|
}, [v]), /* @__PURE__ */ U(
|
|
2721
2726
|
"div",
|
|
2722
2727
|
{
|
|
2723
|
-
style: { transition:
|
|
2728
|
+
style: { transition: y.duration + "s", ...d },
|
|
2724
2729
|
ref: w,
|
|
2725
|
-
className:
|
|
2730
|
+
className: $.navigationRail,
|
|
2726
2731
|
children: [
|
|
2727
|
-
/* @__PURE__ */ U("div", { className:
|
|
2732
|
+
/* @__PURE__ */ U("div", { className: $.header, children: [
|
|
2728
2733
|
/* @__PURE__ */ u(
|
|
2729
2734
|
xe,
|
|
2730
2735
|
{
|
|
2731
|
-
onClick: () =>
|
|
2732
|
-
label: v ?
|
|
2733
|
-
className:
|
|
2734
|
-
icon: v ?
|
|
2736
|
+
onClick: () => L(!v),
|
|
2737
|
+
label: v ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
|
|
2738
|
+
className: $.menuIcon,
|
|
2739
|
+
icon: v ? s.opened.icon : s == null ? void 0 : s.closed.icon
|
|
2735
2740
|
}
|
|
2736
2741
|
),
|
|
2737
|
-
|
|
2738
|
-
transition:
|
|
2742
|
+
R.length > 0 && le(R[0], {
|
|
2743
|
+
transition: y,
|
|
2739
2744
|
isExtended: v,
|
|
2740
|
-
className: "!shadow-none mx-5 " +
|
|
2745
|
+
className: "!shadow-none mx-5 " + R[0].props.className
|
|
2741
2746
|
})
|
|
2742
2747
|
] }),
|
|
2743
|
-
/* @__PURE__ */ u("div", { className:
|
|
2744
|
-
let
|
|
2745
|
-
return
|
|
2748
|
+
/* @__PURE__ */ u("div", { className: $.segments, children: (() => {
|
|
2749
|
+
let k = 0;
|
|
2750
|
+
return I.map((m) => ee(m) && m.type === at ? le(
|
|
2746
2751
|
m,
|
|
2747
2752
|
{
|
|
2748
|
-
key:
|
|
2749
|
-
index:
|
|
2753
|
+
key: k,
|
|
2754
|
+
index: k++,
|
|
2750
2755
|
// Utilise et incrémente le compteur dédié
|
|
2751
2756
|
variant: v ? "horizontal" : "vertical",
|
|
2752
|
-
selectedItem:
|
|
2753
|
-
setSelectedItem:
|
|
2754
|
-
onItemSelected:
|
|
2755
|
-
transition:
|
|
2757
|
+
selectedItem: N,
|
|
2758
|
+
setSelectedItem: E,
|
|
2759
|
+
onItemSelected: C,
|
|
2760
|
+
transition: y,
|
|
2756
2761
|
extendedOnly: W.current,
|
|
2757
2762
|
isExtended: v
|
|
2758
2763
|
}
|
|
@@ -2794,7 +2799,7 @@ export {
|
|
|
2794
2799
|
f as classNames,
|
|
2795
2800
|
Me as classnames,
|
|
2796
2801
|
Ye as customScrollStyle,
|
|
2797
|
-
|
|
2802
|
+
G as defaultClassNames,
|
|
2798
2803
|
Pe as dividerStyle,
|
|
2799
2804
|
$e as fabStyle,
|
|
2800
2805
|
Se as getClassNames,
|