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