jynko-kit 1.0.0 → 1.0.1
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/dist/index.cjs +480 -482
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +761 -1914
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useEffect as e, useId as t, useRef as n, useState as r } from "react";
|
|
2
|
+
import { ThemeProvider as i, createGlobalStyle as a, css as o, styled as s } from "styled-components";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { createPortal as u } from "react-dom";
|
|
5
|
+
import { Link as d, NavLink as f } from "react-router-dom";
|
|
6
6
|
// src/shared/utils/color.ts
|
|
7
|
-
function
|
|
7
|
+
function p(e, t) {
|
|
8
8
|
return `color-mix(in srgb, ${e} 88%, ${t})`;
|
|
9
9
|
}
|
|
10
10
|
// src/shared/styles/theme.ts
|
|
11
|
-
var
|
|
11
|
+
var m = {
|
|
12
12
|
bg: "#0f172a",
|
|
13
13
|
surface: "#1e293b",
|
|
14
14
|
background: "#edf7f6",
|
|
@@ -23,16 +23,16 @@ var p = {
|
|
|
23
23
|
error: "#dc2626",
|
|
24
24
|
success: "#16a34a",
|
|
25
25
|
warning: "#d97706"
|
|
26
|
-
},
|
|
26
|
+
}, h = "30px", g = {
|
|
27
27
|
width: "3px",
|
|
28
28
|
offset: "2px",
|
|
29
29
|
colorMix: "45%"
|
|
30
|
-
},
|
|
30
|
+
}, _ = {
|
|
31
31
|
regular: 400,
|
|
32
32
|
semibold: 600,
|
|
33
33
|
bold: 700
|
|
34
|
-
},
|
|
35
|
-
colors:
|
|
34
|
+
}, v = {
|
|
35
|
+
colors: m,
|
|
36
36
|
opacity: {
|
|
37
37
|
disabled: .6,
|
|
38
38
|
disabledButton: .55
|
|
@@ -79,7 +79,7 @@ var p = {
|
|
|
79
79
|
},
|
|
80
80
|
font: {
|
|
81
81
|
sans: "'Segoe UI', system-ui, -apple-system, sans-serif",
|
|
82
|
-
weight:
|
|
82
|
+
weight: _
|
|
83
83
|
},
|
|
84
84
|
typography: {
|
|
85
85
|
fallback: "1rem",
|
|
@@ -94,9 +94,9 @@ var p = {
|
|
|
94
94
|
sup: "0.75rem"
|
|
95
95
|
},
|
|
96
96
|
avatar: {
|
|
97
|
-
border: `2px solid ${
|
|
97
|
+
border: `2px solid ${m.ink}`,
|
|
98
98
|
borderRadius: "50%",
|
|
99
|
-
fontWeight:
|
|
99
|
+
fontWeight: _.semibold,
|
|
100
100
|
sizes: {
|
|
101
101
|
sm: {
|
|
102
102
|
diameter: "32px",
|
|
@@ -120,7 +120,7 @@ var p = {
|
|
|
120
120
|
logo: {
|
|
121
121
|
size: "36px",
|
|
122
122
|
fontSize: "1rem",
|
|
123
|
-
fontWeight:
|
|
123
|
+
fontWeight: _.bold,
|
|
124
124
|
whiteSpace: "nowrap"
|
|
125
125
|
},
|
|
126
126
|
sidebar: {
|
|
@@ -132,65 +132,65 @@ var p = {
|
|
|
132
132
|
fallback: "100vh",
|
|
133
133
|
dynamic: "100dvh"
|
|
134
134
|
},
|
|
135
|
-
border: `2px solid ${
|
|
135
|
+
border: `2px solid ${m.ink}`,
|
|
136
136
|
borderRadius: "16px"
|
|
137
137
|
},
|
|
138
138
|
camera: {
|
|
139
|
-
border: `2px solid ${
|
|
139
|
+
border: `2px solid ${m.ink}`,
|
|
140
140
|
borderRadius: "12px",
|
|
141
141
|
nameBorderRadius: "4px",
|
|
142
142
|
nameMaxWidthOffset: "64px",
|
|
143
143
|
fallbackFontSize: "clamp(2rem, 8vw, 5rem)",
|
|
144
|
-
fallbackFontWeight:
|
|
144
|
+
fallbackFontWeight: _.bold
|
|
145
145
|
},
|
|
146
146
|
shadow: {
|
|
147
147
|
offsetX: "2px",
|
|
148
148
|
offsetY: "3px",
|
|
149
|
-
button: `2px 3px 0 0 ${
|
|
150
|
-
link: `2px 3px 0 0 ${
|
|
151
|
-
navLinks: `2px 3px 0 0 ${
|
|
152
|
-
section: `3px 5px 0 0 ${
|
|
153
|
-
modal: `3px 5px 0 0 ${
|
|
154
|
-
sidebar: `3px 5px 0 0 ${
|
|
149
|
+
button: `2px 3px 0 0 ${m.ink}`,
|
|
150
|
+
link: `2px 3px 0 0 ${m.ink}`,
|
|
151
|
+
navLinks: `2px 3px 0 0 ${m.ink}`,
|
|
152
|
+
section: `3px 5px 0 0 ${m.ink}`,
|
|
153
|
+
modal: `3px 5px 0 0 ${m.ink}`,
|
|
154
|
+
sidebar: `3px 5px 0 0 ${m.ink}`
|
|
155
155
|
},
|
|
156
156
|
button: {
|
|
157
|
-
border: `2px solid ${
|
|
157
|
+
border: `2px solid ${m.ink}`,
|
|
158
158
|
borderRadius: "8px",
|
|
159
|
-
focus:
|
|
159
|
+
focus: g,
|
|
160
160
|
padding: "16px",
|
|
161
161
|
fontSize: "14px",
|
|
162
162
|
textDecoration: "none",
|
|
163
163
|
textTransform: "uppercase"
|
|
164
164
|
},
|
|
165
165
|
iconButton: {
|
|
166
|
-
border: `2px solid ${
|
|
166
|
+
border: `2px solid ${m.ink}`,
|
|
167
167
|
borderRadius: "8px",
|
|
168
|
-
focus:
|
|
168
|
+
focus: g
|
|
169
169
|
},
|
|
170
170
|
iconLink: {
|
|
171
|
-
border: `2px solid ${
|
|
171
|
+
border: `2px solid ${m.ink}`,
|
|
172
172
|
borderRadius: "8px",
|
|
173
|
-
focus:
|
|
173
|
+
focus: g
|
|
174
174
|
},
|
|
175
175
|
badge: {
|
|
176
|
-
border: `2px solid ${
|
|
176
|
+
border: `2px solid ${m.ink}`,
|
|
177
177
|
borderRadius: "8px",
|
|
178
178
|
fontSize: "14px",
|
|
179
179
|
textTransform: "uppercase"
|
|
180
180
|
},
|
|
181
181
|
link: {
|
|
182
|
-
border: `2px solid ${
|
|
182
|
+
border: `2px solid ${m.ink}`,
|
|
183
183
|
borderRadius: "8px",
|
|
184
|
-
focus:
|
|
184
|
+
focus: g,
|
|
185
185
|
padding: "16px",
|
|
186
186
|
fontSize: "14px",
|
|
187
187
|
textDecoration: "none",
|
|
188
188
|
textTransform: "uppercase"
|
|
189
189
|
},
|
|
190
190
|
navLinks: {
|
|
191
|
-
border: `2px solid ${
|
|
191
|
+
border: `2px solid ${m.ink}`,
|
|
192
192
|
borderRadius: "8px",
|
|
193
|
-
focus:
|
|
193
|
+
focus: g,
|
|
194
194
|
padding: "0",
|
|
195
195
|
fontSize: "14px",
|
|
196
196
|
textDecoration: "none",
|
|
@@ -198,60 +198,60 @@ var p = {
|
|
|
198
198
|
itemPadding: "16px"
|
|
199
199
|
},
|
|
200
200
|
formControl: {
|
|
201
|
-
border: `2px solid ${
|
|
201
|
+
border: `2px solid ${m.ink}`,
|
|
202
202
|
borderRadius: "8px",
|
|
203
203
|
padding: "16px",
|
|
204
204
|
height: "3.5rem",
|
|
205
205
|
textareaHeight: "3rem",
|
|
206
|
-
dropdownBorder: `2px solid ${
|
|
206
|
+
dropdownBorder: `2px solid ${m.ink}`,
|
|
207
207
|
optionListMaxHeight: "16rem",
|
|
208
|
-
focus:
|
|
208
|
+
focus: g,
|
|
209
209
|
trailingActionPadding: "3.25rem",
|
|
210
210
|
fontSize: "14px",
|
|
211
211
|
optionTextTransform: "none"
|
|
212
212
|
},
|
|
213
213
|
userBadge: {
|
|
214
|
-
focus:
|
|
214
|
+
focus: g,
|
|
215
215
|
textDecoration: "none"
|
|
216
216
|
},
|
|
217
217
|
section: {
|
|
218
|
-
border: `2px solid ${
|
|
218
|
+
border: `2px solid ${m.ink}`,
|
|
219
219
|
borderRadius: "16px",
|
|
220
|
-
padding:
|
|
220
|
+
padding: h
|
|
221
221
|
},
|
|
222
222
|
modal: {
|
|
223
|
-
padding:
|
|
223
|
+
padding: h,
|
|
224
224
|
maxWidth: "720px",
|
|
225
225
|
maxHeight: "80vh",
|
|
226
|
-
border: `2px solid ${
|
|
226
|
+
border: `2px solid ${m.ink}`,
|
|
227
227
|
borderRadius: "16px",
|
|
228
228
|
title: {
|
|
229
229
|
fontSize: "1.25rem",
|
|
230
|
-
fontWeight:
|
|
230
|
+
fontWeight: _.semibold
|
|
231
231
|
},
|
|
232
232
|
body: { fontSize: "1rem" }
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
235
|
// src/shared/utils/tokens.ts
|
|
236
|
-
function
|
|
237
|
-
return e?.colors ? e :
|
|
236
|
+
function y(e) {
|
|
237
|
+
return e?.colors ? e : v;
|
|
238
238
|
}
|
|
239
239
|
// src/components/atoms/AAvatar/AAvatar.styles.ts
|
|
240
|
-
var
|
|
240
|
+
var b = s.span`
|
|
241
241
|
display: inline-flex;
|
|
242
242
|
flex: 0 0 auto;
|
|
243
243
|
align-items: center;
|
|
244
244
|
justify-content: center;
|
|
245
245
|
overflow: hidden;
|
|
246
|
-
border: ${({ theme: e }) =>
|
|
247
|
-
border-radius: ${({ theme: e }) =>
|
|
248
|
-
background: ${({ theme: e }) =>
|
|
249
|
-
color: ${({ theme: e }) =>
|
|
250
|
-
font-family: ${({ theme: e }) =>
|
|
251
|
-
font-weight: ${({ theme: e }) =>
|
|
252
|
-
width: ${({ $size: e, theme: t }) =>
|
|
253
|
-
height: ${({ $size: e, theme: t }) =>
|
|
254
|
-
font-size: ${({ $size: e, theme: t }) =>
|
|
246
|
+
border: ${({ theme: e }) => y(e).avatar.border};
|
|
247
|
+
border-radius: ${({ theme: e }) => y(e).avatar.borderRadius};
|
|
248
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
249
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
250
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
251
|
+
font-weight: ${({ theme: e }) => y(e).avatar.fontWeight};
|
|
252
|
+
width: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].diameter};
|
|
253
|
+
height: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].diameter};
|
|
254
|
+
font-size: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].fontSize};
|
|
255
255
|
|
|
256
256
|
& > img {
|
|
257
257
|
width: 100%;
|
|
@@ -260,83 +260,83 @@ var y = c.span`
|
|
|
260
260
|
}
|
|
261
261
|
`;
|
|
262
262
|
// src/components/atoms/AAvatar/AAvatar.tsx
|
|
263
|
-
function
|
|
264
|
-
let [s,
|
|
265
|
-
return /* @__PURE__ */
|
|
263
|
+
function x({ firstName: e, lastName: t, src: n, alt: i, size: a = "md", ...o }) {
|
|
264
|
+
let [s, l] = r(), u = `${e} ${t}`.trim(), d = i ?? u, f = `${e.charAt(0)}${t.charAt(0)}`.toUpperCase(), p = !!(n && s !== n);
|
|
265
|
+
return /* @__PURE__ */ c(b, {
|
|
266
266
|
$size: a,
|
|
267
267
|
role: p ? void 0 : "img",
|
|
268
268
|
"aria-label": p ? void 0 : d,
|
|
269
269
|
...o,
|
|
270
|
-
children: p ? /* @__PURE__ */
|
|
270
|
+
children: p ? /* @__PURE__ */ c("img", {
|
|
271
271
|
src: n,
|
|
272
272
|
alt: d,
|
|
273
273
|
onError: () => {
|
|
274
|
-
|
|
274
|
+
l(n);
|
|
275
275
|
}
|
|
276
276
|
}) : f
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
// src/shared/styles/componentMetrics.ts
|
|
280
|
-
var
|
|
280
|
+
var S = o`
|
|
281
281
|
display: grid;
|
|
282
|
-
gap: ${({ theme: e }) =>
|
|
282
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
283
283
|
width: 100%;
|
|
284
|
-
`,
|
|
285
|
-
sm:
|
|
286
|
-
padding: ${({ theme: t }) =>
|
|
284
|
+
`, C = (e) => ({
|
|
285
|
+
sm: o`
|
|
286
|
+
padding: ${({ theme: t }) => y(t).space.components[e].sm};
|
|
287
287
|
`,
|
|
288
|
-
md:
|
|
289
|
-
padding: ${({ theme: t }) =>
|
|
288
|
+
md: o`
|
|
289
|
+
padding: ${({ theme: t }) => y(t).space.components[e].md};
|
|
290
290
|
`,
|
|
291
|
-
lg:
|
|
292
|
-
padding: ${({ theme: t }) =>
|
|
291
|
+
lg: o`
|
|
292
|
+
padding: ${({ theme: t }) => y(t).space.components[e].lg};
|
|
293
293
|
`
|
|
294
|
-
}),
|
|
295
|
-
padding: ${({ theme: e }) => `${
|
|
296
|
-
`,
|
|
294
|
+
}), w = o`
|
|
295
|
+
padding: ${({ theme: e }) => `${y(e).space.md} ${y(e).space.lg}`};
|
|
296
|
+
`, T = (e) => o`
|
|
297
297
|
&:focus-visible {
|
|
298
|
-
outline: ${({ theme: t }) => `${
|
|
299
|
-
outline-offset: ${({ theme: t }) =>
|
|
298
|
+
outline: ${({ theme: t }) => `${y(t)[e].focus.width} solid color-mix(in srgb, ${y(t).colors.primary} ${y(t)[e].focus.colorMix}, transparent)`};
|
|
299
|
+
outline-offset: ${({ theme: t }) => y(t)[e].focus.offset};
|
|
300
300
|
}
|
|
301
|
-
`,
|
|
302
|
-
default:
|
|
303
|
-
background: ${({ theme: e }) =>
|
|
304
|
-
color: ${({ theme: e }) =>
|
|
301
|
+
`, E = C("badge"), D = {
|
|
302
|
+
default: o`
|
|
303
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
304
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
305
305
|
`,
|
|
306
|
-
info:
|
|
307
|
-
background: ${({ theme: e }) =>
|
|
308
|
-
color: ${({ theme: e }) =>
|
|
306
|
+
info: o`
|
|
307
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
308
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
309
309
|
`,
|
|
310
|
-
success:
|
|
311
|
-
background: ${({ theme: e }) =>
|
|
312
|
-
color: ${({ theme: e }) =>
|
|
310
|
+
success: o`
|
|
311
|
+
background: ${({ theme: e }) => y(e).colors.success};
|
|
312
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
313
313
|
`,
|
|
314
|
-
warning:
|
|
315
|
-
background: ${({ theme: e }) =>
|
|
316
|
-
color: ${({ theme: e }) =>
|
|
314
|
+
warning: o`
|
|
315
|
+
background: ${({ theme: e }) => y(e).colors.warning};
|
|
316
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
317
317
|
`,
|
|
318
|
-
error:
|
|
319
|
-
background: ${({ theme: e }) =>
|
|
320
|
-
color: ${({ theme: e }) =>
|
|
318
|
+
error: o`
|
|
319
|
+
background: ${({ theme: e }) => y(e).colors.error};
|
|
320
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
321
321
|
`
|
|
322
|
-
},
|
|
322
|
+
}, O = s.span`
|
|
323
323
|
display: inline-flex;
|
|
324
324
|
align-items: center;
|
|
325
325
|
justify-content: center;
|
|
326
|
-
gap: ${({ theme: e }) =>
|
|
327
|
-
border: ${({ theme: e }) =>
|
|
328
|
-
border-radius: ${({ theme: e }) =>
|
|
329
|
-
font-family: ${({ theme: e }) =>
|
|
330
|
-
font-size: ${({ theme: e }) =>
|
|
331
|
-
font-weight: ${({ theme: e }) =>
|
|
332
|
-
text-transform: ${({ theme: e }) =>
|
|
333
|
-
|
|
334
|
-
${({ $size: e }) =>
|
|
335
|
-
${({ $variant: e }) =>
|
|
326
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
327
|
+
border: ${({ theme: e }) => y(e).badge.border};
|
|
328
|
+
border-radius: ${({ theme: e }) => y(e).badge.borderRadius};
|
|
329
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
330
|
+
font-size: ${({ theme: e }) => y(e).badge.fontSize};
|
|
331
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
332
|
+
text-transform: ${({ theme: e }) => y(e).badge.textTransform};
|
|
333
|
+
|
|
334
|
+
${({ $size: e }) => E[e]}
|
|
335
|
+
${({ $variant: e }) => D[e]}
|
|
336
336
|
`;
|
|
337
337
|
// src/components/atoms/ABadge/ABadge.tsx
|
|
338
|
-
function
|
|
339
|
-
return /* @__PURE__ */
|
|
338
|
+
function k({ children: e, size: t = "md", variant: n = "default", ...r }) {
|
|
339
|
+
return /* @__PURE__ */ c(O, {
|
|
340
340
|
$size: t,
|
|
341
341
|
$variant: n,
|
|
342
342
|
...r,
|
|
@@ -344,17 +344,17 @@ function O({ children: e, size: t = "md", variant: n = "default", ...r }) {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
// src/shared/hooks/usePressState.ts
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
let [c, l] =
|
|
350
|
-
|
|
347
|
+
var A = 150;
|
|
348
|
+
function j({ disabled: t, onPointerDown: i, onPointerUp: a, onPointerCancel: o, onLostPointerCapture: s }) {
|
|
349
|
+
let [c, l] = r(!1), u = n(0), d = n(null);
|
|
350
|
+
e(() => () => {
|
|
351
351
|
d.current && clearTimeout(d.current);
|
|
352
352
|
}, []);
|
|
353
353
|
let f = () => {
|
|
354
354
|
d.current && clearTimeout(d.current);
|
|
355
355
|
}, p = () => {
|
|
356
356
|
if (!u.current) return;
|
|
357
|
-
let e = performance.now() - u.current, t = Math.max(0,
|
|
357
|
+
let e = performance.now() - u.current, t = Math.max(0, A - e);
|
|
358
358
|
f(), d.current = setTimeout(() => {
|
|
359
359
|
l(!1), u.current = 0, d.current = null;
|
|
360
360
|
}, t);
|
|
@@ -362,8 +362,8 @@ function A({ disabled: e, onPointerDown: n, onPointerUp: a, onPointerCancel: o,
|
|
|
362
362
|
return {
|
|
363
363
|
pressed: c,
|
|
364
364
|
pressHandlers: {
|
|
365
|
-
onPointerDown: (
|
|
366
|
-
|
|
365
|
+
onPointerDown: (e) => {
|
|
366
|
+
i?.(e), e.defaultPrevented || t || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), f(), u.current = performance.now(), l(!0));
|
|
367
367
|
},
|
|
368
368
|
onPointerUp: (e) => {
|
|
369
369
|
a?.(e), p();
|
|
@@ -378,32 +378,32 @@ function A({ disabled: e, onPointerDown: n, onPointerUp: a, onPointerCancel: o,
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/components/atoms/AButton/AButton.styles.ts
|
|
381
|
-
var
|
|
382
|
-
primary:
|
|
383
|
-
background: ${({ theme: e }) =>
|
|
384
|
-
color: ${({ theme: e }) =>
|
|
381
|
+
var M = C("button"), N = {
|
|
382
|
+
primary: o`
|
|
383
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
384
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
385
385
|
|
|
386
386
|
&:hover:not(:disabled) {
|
|
387
|
-
background: ${({ theme: e }) =>
|
|
387
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
388
388
|
}
|
|
389
389
|
`,
|
|
390
|
-
secondary:
|
|
391
|
-
background: ${({ theme: e }) =>
|
|
392
|
-
color: ${({ theme: e }) =>
|
|
390
|
+
secondary: o`
|
|
391
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
392
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
393
393
|
|
|
394
394
|
&:hover:not(:disabled) {
|
|
395
|
-
background: ${({ theme: e }) =>
|
|
395
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
396
396
|
}
|
|
397
397
|
`
|
|
398
|
-
},
|
|
398
|
+
}, P = o`
|
|
399
399
|
display: inline-flex;
|
|
400
400
|
align-items: center;
|
|
401
401
|
justify-content: center;
|
|
402
|
-
gap: ${({ theme: e }) =>
|
|
403
|
-
font-family: ${({ theme: e }) =>
|
|
404
|
-
font-size: ${({ theme: e }) =>
|
|
405
|
-
font-weight: ${({ theme: e }) =>
|
|
406
|
-
text-transform: ${({ theme: e }) =>
|
|
402
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
403
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
404
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
405
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
406
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
407
407
|
cursor: pointer;
|
|
408
408
|
transition:
|
|
409
409
|
background-color 0.15s ease,
|
|
@@ -411,44 +411,44 @@ var j = S("button"), ee = {
|
|
|
411
411
|
box-shadow 0.15s ease;
|
|
412
412
|
white-space: nowrap;
|
|
413
413
|
|
|
414
|
-
${
|
|
414
|
+
${T("button")}
|
|
415
415
|
|
|
416
416
|
&:disabled {
|
|
417
|
-
opacity: ${({ theme: e }) =>
|
|
417
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
418
418
|
cursor: not-allowed;
|
|
419
419
|
}
|
|
420
|
-
`,
|
|
421
|
-
border: ${({ theme: e }) =>
|
|
422
|
-
box-shadow: ${({ theme: e }) =>
|
|
420
|
+
`, F = o`
|
|
421
|
+
border: ${({ theme: e }) => y(e).button.border};
|
|
422
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
423
423
|
|
|
424
424
|
&:active:not(:disabled),
|
|
425
425
|
&[data-pressed='true']:not(:disabled),
|
|
426
426
|
&:disabled {
|
|
427
|
-
transform: ${({ theme: e }) => `translate(${
|
|
427
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
428
428
|
box-shadow: none;
|
|
429
429
|
}
|
|
430
|
-
`,
|
|
431
|
-
border-radius: ${({ theme: e }) =>
|
|
432
|
-
`,
|
|
433
|
-
padding: ${({ theme: e }) =>
|
|
434
|
-
`,
|
|
435
|
-
${M}
|
|
436
|
-
${N}
|
|
430
|
+
`, I = o`
|
|
431
|
+
border-radius: ${({ theme: e }) => y(e).button.borderRadius};
|
|
432
|
+
`, L = o`
|
|
433
|
+
padding: ${({ theme: e }) => y(e).button.padding};
|
|
434
|
+
`, R = s.button`
|
|
437
435
|
${P}
|
|
438
436
|
${F}
|
|
439
|
-
${
|
|
440
|
-
${
|
|
437
|
+
${I}
|
|
438
|
+
${L}
|
|
439
|
+
${({ $variant: e }) => N[e]}
|
|
440
|
+
${({ $size: e }) => M[e]}
|
|
441
441
|
`;
|
|
442
442
|
// src/components/atoms/AButton/AButton.tsx
|
|
443
|
-
function
|
|
444
|
-
let { pressed: d, pressHandlers: f } =
|
|
443
|
+
function z({ children: e, variant: t = "primary", size: n = "md", type: r = "button", disabled: i, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: l, ...u }) {
|
|
444
|
+
let { pressed: d, pressHandlers: f } = j({
|
|
445
445
|
disabled: i,
|
|
446
446
|
onPointerDown: a,
|
|
447
447
|
onPointerUp: o,
|
|
448
448
|
onPointerCancel: s,
|
|
449
|
-
onLostPointerCapture:
|
|
449
|
+
onLostPointerCapture: l
|
|
450
450
|
});
|
|
451
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ c(R, {
|
|
452
452
|
$size: n,
|
|
453
453
|
$variant: t,
|
|
454
454
|
type: r,
|
|
@@ -460,19 +460,19 @@ function I({ children: e, variant: t = "primary", size: n = "md", type: r = "but
|
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
// src/components/atoms/AIcon/AIcon.styles.ts
|
|
463
|
-
var
|
|
464
|
-
default: (e) =>
|
|
465
|
-
error: (e) =>
|
|
466
|
-
success: (e) =>
|
|
467
|
-
warning: (e) =>
|
|
468
|
-
},
|
|
463
|
+
var B = {
|
|
464
|
+
default: (e) => y(e).colors.text,
|
|
465
|
+
error: (e) => y(e).colors.error,
|
|
466
|
+
success: (e) => y(e).colors.success,
|
|
467
|
+
warning: (e) => y(e).colors.warning
|
|
468
|
+
}, V = s.span`
|
|
469
469
|
display: inline-flex;
|
|
470
|
-
width: ${({ $size: e, theme: t }) =>
|
|
471
|
-
height: ${({ $size: e, theme: t }) =>
|
|
470
|
+
width: ${({ $size: e, theme: t }) => y(t).icon.sizes[e]};
|
|
471
|
+
height: ${({ $size: e, theme: t }) => y(t).icon.sizes[e]};
|
|
472
472
|
flex: 0 0 auto;
|
|
473
473
|
align-items: center;
|
|
474
474
|
justify-content: center;
|
|
475
|
-
color: ${({ $type: e, theme: t }) =>
|
|
475
|
+
color: ${({ $type: e, theme: t }) => B[e](t)};
|
|
476
476
|
|
|
477
477
|
& > svg {
|
|
478
478
|
display: block;
|
|
@@ -481,9 +481,9 @@ var ne = {
|
|
|
481
481
|
}
|
|
482
482
|
`;
|
|
483
483
|
// src/components/atoms/AIcon/AIcon.tsx
|
|
484
|
-
function
|
|
484
|
+
function H({ children: e, size: t = "md", type: n = "default", title: r, "aria-label": i, ...a }) {
|
|
485
485
|
let o = r ?? i;
|
|
486
|
-
return /* @__PURE__ */
|
|
486
|
+
return /* @__PURE__ */ c(V, {
|
|
487
487
|
$size: t,
|
|
488
488
|
$type: n,
|
|
489
489
|
"aria-hidden": !o || void 0,
|
|
@@ -495,62 +495,62 @@ function L({ children: e, size: t = "md", type: n = "default", title: r, "aria-l
|
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
// src/components/atoms/AIconButton/AIconButton.styles.ts
|
|
498
|
-
var
|
|
499
|
-
primary:
|
|
500
|
-
background: ${({ theme: e }) =>
|
|
501
|
-
color: ${({ theme: e }) =>
|
|
498
|
+
var U = C("iconButton"), ee = {
|
|
499
|
+
primary: o`
|
|
500
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
501
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
502
502
|
|
|
503
503
|
&:hover:not(:disabled) {
|
|
504
|
-
background: ${({ theme: e }) =>
|
|
504
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
505
505
|
}
|
|
506
506
|
`,
|
|
507
|
-
secondary:
|
|
508
|
-
background: ${({ theme: e }) =>
|
|
509
|
-
color: ${({ theme: e }) =>
|
|
507
|
+
secondary: o`
|
|
508
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
509
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
510
510
|
|
|
511
511
|
&:hover:not(:disabled) {
|
|
512
|
-
background: ${({ theme: e }) =>
|
|
512
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
513
513
|
}
|
|
514
514
|
`
|
|
515
|
-
},
|
|
515
|
+
}, te = o`
|
|
516
516
|
display: inline-flex;
|
|
517
517
|
align-items: center;
|
|
518
518
|
justify-content: center;
|
|
519
|
-
gap: ${({ theme: e }) =>
|
|
520
|
-
font-family: ${({ theme: e }) =>
|
|
521
|
-
font-size: ${({ theme: e }) =>
|
|
522
|
-
font-weight: ${({ theme: e }) =>
|
|
523
|
-
text-transform: ${({ theme: e }) =>
|
|
519
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
520
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
521
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
522
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
523
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
524
524
|
cursor: pointer;
|
|
525
525
|
transition:
|
|
526
526
|
background-color 0.15s ease,
|
|
527
527
|
transform 0.15s ease,
|
|
528
528
|
box-shadow 0.15s ease;
|
|
529
529
|
|
|
530
|
-
${
|
|
530
|
+
${T("iconButton")}
|
|
531
531
|
|
|
532
532
|
&:disabled {
|
|
533
|
-
opacity: ${({ theme: e }) =>
|
|
533
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
534
534
|
cursor: not-allowed;
|
|
535
535
|
}
|
|
536
|
-
`,
|
|
537
|
-
border: ${({ theme: e }) =>
|
|
538
|
-
box-shadow: ${({ theme: e }) =>
|
|
536
|
+
`, ne = o`
|
|
537
|
+
border: ${({ theme: e }) => y(e).iconButton.border};
|
|
538
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
539
539
|
|
|
540
540
|
&:active:not(:disabled),
|
|
541
541
|
&[data-pressed='true']:not(:disabled),
|
|
542
542
|
&:disabled {
|
|
543
|
-
transform: ${({ theme: e }) => `translate(${
|
|
543
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
544
544
|
box-shadow: none;
|
|
545
545
|
}
|
|
546
|
-
`,
|
|
547
|
-
square:
|
|
548
|
-
border-radius: ${({ theme: e }) =>
|
|
546
|
+
`, re = {
|
|
547
|
+
square: o`
|
|
548
|
+
border-radius: ${({ theme: e }) => y(e).iconButton.borderRadius};
|
|
549
549
|
`,
|
|
550
|
-
rounded:
|
|
551
|
-
border-radius: ${({ theme: e }) =>
|
|
550
|
+
rounded: o`
|
|
551
|
+
border-radius: ${({ theme: e }) => y(e).radius.full};
|
|
552
552
|
`
|
|
553
|
-
},
|
|
553
|
+
}, ie = o`
|
|
554
554
|
background: transparent;
|
|
555
555
|
border: none;
|
|
556
556
|
box-shadow: none;
|
|
@@ -562,59 +562,59 @@ var ie = S("iconButton"), ae = {
|
|
|
562
562
|
box-shadow: none;
|
|
563
563
|
}
|
|
564
564
|
`;
|
|
565
|
-
function
|
|
565
|
+
function W(e, t) {
|
|
566
566
|
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
567
567
|
}
|
|
568
|
-
var
|
|
569
|
-
primary:
|
|
570
|
-
color: ${({ theme: e }) =>
|
|
568
|
+
var ae = {
|
|
569
|
+
primary: o`
|
|
570
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
571
571
|
|
|
572
572
|
&:hover:not(:disabled) {
|
|
573
|
-
background: ${({ theme: e }) =>
|
|
573
|
+
background: ${({ theme: e }) => W(y(e).colors.primary, "18%")};
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
&:active:not(:disabled),
|
|
577
577
|
&[data-pressed='true']:not(:disabled) {
|
|
578
|
-
background: ${({ theme: e }) =>
|
|
578
|
+
background: ${({ theme: e }) => p(W(y(e).colors.primary, "18%"), y(e).colors.ink)};
|
|
579
579
|
}
|
|
580
580
|
`,
|
|
581
|
-
secondary:
|
|
582
|
-
color: ${({ theme: e }) =>
|
|
581
|
+
secondary: o`
|
|
582
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
583
583
|
|
|
584
584
|
&:hover:not(:disabled) {
|
|
585
|
-
background: ${({ theme: e }) =>
|
|
585
|
+
background: ${({ theme: e }) => W(y(e).colors.text, "12%")};
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
&:active:not(:disabled),
|
|
589
589
|
&[data-pressed='true']:not(:disabled) {
|
|
590
|
-
background: ${({ theme: e }) =>
|
|
590
|
+
background: ${({ theme: e }) => p(W(y(e).colors.text, "12%"), y(e).colors.ink)};
|
|
591
591
|
}
|
|
592
592
|
`
|
|
593
|
-
},
|
|
594
|
-
${
|
|
593
|
+
}, oe = s.button`
|
|
594
|
+
${te}
|
|
595
595
|
padding: 0;
|
|
596
596
|
flex-shrink: 0;
|
|
597
597
|
|
|
598
|
-
${({ $size: e }) =>
|
|
599
|
-
${({ $shape: e }) =>
|
|
600
|
-
${({ $ghost: e, $variant: t }) => e ?
|
|
601
|
-
${
|
|
602
|
-
${de[t]}
|
|
603
|
-
` : s`
|
|
604
|
-
${se}
|
|
598
|
+
${({ $size: e }) => U[e]}
|
|
599
|
+
${({ $shape: e }) => re[e]}
|
|
600
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
601
|
+
${ie}
|
|
605
602
|
${ae[t]}
|
|
603
|
+
` : o`
|
|
604
|
+
${ne}
|
|
605
|
+
${ee[t]}
|
|
606
606
|
`}
|
|
607
607
|
`;
|
|
608
608
|
// src/components/atoms/AIconButton/AIconButton.tsx
|
|
609
|
-
function
|
|
610
|
-
let { pressed: m, pressHandlers: h } =
|
|
609
|
+
function G({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, type: a = "button", disabled: o, ref: s, onPointerDown: l, onPointerUp: u, onPointerCancel: d, onLostPointerCapture: f, ...p }) {
|
|
610
|
+
let { pressed: m, pressHandlers: h } = j({
|
|
611
611
|
disabled: o,
|
|
612
|
-
onPointerDown:
|
|
612
|
+
onPointerDown: l,
|
|
613
613
|
onPointerUp: u,
|
|
614
614
|
onPointerCancel: d,
|
|
615
615
|
onLostPointerCapture: f
|
|
616
616
|
});
|
|
617
|
-
return /* @__PURE__ */
|
|
617
|
+
return /* @__PURE__ */ c(oe, {
|
|
618
618
|
$ghost: i,
|
|
619
619
|
$shape: r,
|
|
620
620
|
$size: n,
|
|
@@ -625,7 +625,7 @@ function R({ children: e, variant: t = "primary", size: n = "md", shape: r = "sq
|
|
|
625
625
|
ref: s,
|
|
626
626
|
...p,
|
|
627
627
|
...h,
|
|
628
|
-
children: /* @__PURE__ */
|
|
628
|
+
children: /* @__PURE__ */ c(H, {
|
|
629
629
|
size: n,
|
|
630
630
|
style: { color: "inherit" },
|
|
631
631
|
children: e
|
|
@@ -633,31 +633,31 @@ function R({ children: e, variant: t = "primary", size: n = "md", shape: r = "sq
|
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
635
|
// src/components/atoms/AIconLink/AIconLink.styles.ts
|
|
636
|
-
var
|
|
637
|
-
primary:
|
|
638
|
-
background: ${({ theme: e }) =>
|
|
639
|
-
color: ${({ theme: e }) =>
|
|
636
|
+
var se = C("iconLink"), ce = {
|
|
637
|
+
primary: o`
|
|
638
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
639
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
640
640
|
|
|
641
641
|
&:hover {
|
|
642
|
-
background: ${({ theme: e }) =>
|
|
642
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
643
643
|
}
|
|
644
644
|
`,
|
|
645
|
-
secondary:
|
|
646
|
-
background: ${({ theme: e }) =>
|
|
647
|
-
color: ${({ theme: e }) =>
|
|
645
|
+
secondary: o`
|
|
646
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
647
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
648
648
|
|
|
649
649
|
&:hover {
|
|
650
|
-
background: ${({ theme: e }) =>
|
|
650
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
651
651
|
}
|
|
652
652
|
`
|
|
653
|
-
},
|
|
654
|
-
square:
|
|
655
|
-
border-radius: ${({ theme: e }) =>
|
|
653
|
+
}, le = {
|
|
654
|
+
square: o`
|
|
655
|
+
border-radius: ${({ theme: e }) => y(e).iconLink.borderRadius};
|
|
656
656
|
`,
|
|
657
|
-
rounded:
|
|
658
|
-
border-radius: ${({ theme: e }) =>
|
|
657
|
+
rounded: o`
|
|
658
|
+
border-radius: ${({ theme: e }) => y(e).radius.full};
|
|
659
659
|
`
|
|
660
|
-
},
|
|
660
|
+
}, ue = o`
|
|
661
661
|
background: transparent;
|
|
662
662
|
border: none;
|
|
663
663
|
box-shadow: none;
|
|
@@ -669,77 +669,77 @@ var pe = S("iconLink"), me = {
|
|
|
669
669
|
box-shadow: none;
|
|
670
670
|
}
|
|
671
671
|
`;
|
|
672
|
-
function
|
|
672
|
+
function K(e, t) {
|
|
673
673
|
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
674
674
|
}
|
|
675
|
-
var
|
|
676
|
-
primary:
|
|
677
|
-
color: ${({ theme: e }) =>
|
|
675
|
+
var de = {
|
|
676
|
+
primary: o`
|
|
677
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
678
678
|
|
|
679
679
|
&:hover {
|
|
680
|
-
background: ${({ theme: e }) =>
|
|
680
|
+
background: ${({ theme: e }) => K(y(e).colors.primary, "18%")};
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
&:active,
|
|
684
684
|
&[data-pressed='true'] {
|
|
685
|
-
background: ${({ theme: e }) =>
|
|
685
|
+
background: ${({ theme: e }) => p(K(y(e).colors.primary, "18%"), y(e).colors.ink)};
|
|
686
686
|
}
|
|
687
687
|
`,
|
|
688
|
-
secondary:
|
|
689
|
-
color: ${({ theme: e }) =>
|
|
688
|
+
secondary: o`
|
|
689
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
690
690
|
|
|
691
691
|
&:hover {
|
|
692
|
-
background: ${({ theme: e }) =>
|
|
692
|
+
background: ${({ theme: e }) => K(y(e).colors.text, "12%")};
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
&:active,
|
|
696
696
|
&[data-pressed='true'] {
|
|
697
|
-
background: ${({ theme: e }) =>
|
|
697
|
+
background: ${({ theme: e }) => p(K(y(e).colors.text, "12%"), y(e).colors.ink)};
|
|
698
698
|
}
|
|
699
699
|
`
|
|
700
|
-
},
|
|
700
|
+
}, fe = s.a`
|
|
701
701
|
display: inline-flex;
|
|
702
702
|
align-items: center;
|
|
703
703
|
justify-content: center;
|
|
704
|
-
gap: ${({ theme: e }) =>
|
|
705
|
-
font-family: ${({ theme: e }) =>
|
|
706
|
-
font-size: ${({ theme: e }) =>
|
|
707
|
-
font-weight: ${({ theme: e }) =>
|
|
708
|
-
text-transform: ${({ theme: e }) =>
|
|
709
|
-
text-decoration: ${({ theme: e }) =>
|
|
704
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
705
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
706
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
707
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
708
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
709
|
+
text-decoration: ${({ theme: e }) => y(e).button.textDecoration};
|
|
710
710
|
cursor: pointer;
|
|
711
711
|
transition:
|
|
712
712
|
background-color 0.15s ease,
|
|
713
713
|
transform 0.15s ease,
|
|
714
714
|
box-shadow 0.15s ease;
|
|
715
715
|
|
|
716
|
-
${
|
|
716
|
+
${T("iconLink")}
|
|
717
717
|
|
|
718
|
-
border: ${({ theme: e }) =>
|
|
719
|
-
box-shadow: ${({ theme: e }) =>
|
|
718
|
+
border: ${({ theme: e }) => y(e).iconLink.border};
|
|
719
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
720
720
|
|
|
721
721
|
&:active,
|
|
722
722
|
&[data-pressed='true'] {
|
|
723
|
-
transform: ${({ theme: e }) => `translate(${
|
|
723
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
724
724
|
box-shadow: none;
|
|
725
725
|
}
|
|
726
726
|
|
|
727
|
-
${({ $size: e }) =>
|
|
728
|
-
${({ $shape: e }) =>
|
|
729
|
-
${({ $ghost: e, $variant: t }) => e ?
|
|
730
|
-
${
|
|
731
|
-
${
|
|
732
|
-
` :
|
|
727
|
+
${({ $size: e }) => se[e]}
|
|
728
|
+
${({ $shape: e }) => le[e]}
|
|
729
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
730
|
+
${ue}
|
|
731
|
+
${de[t]}
|
|
732
|
+
` : ce[t]}
|
|
733
733
|
`;
|
|
734
734
|
// src/components/atoms/AIconLink/AIconLink.tsx
|
|
735
|
-
function
|
|
736
|
-
let { pressed: d, pressHandlers: f } =
|
|
735
|
+
function q({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: l, ...u }) {
|
|
736
|
+
let { pressed: d, pressHandlers: f } = j({
|
|
737
737
|
onPointerDown: a,
|
|
738
738
|
onPointerUp: o,
|
|
739
739
|
onPointerCancel: s,
|
|
740
|
-
onLostPointerCapture:
|
|
740
|
+
onLostPointerCapture: l
|
|
741
741
|
});
|
|
742
|
-
return /* @__PURE__ */
|
|
742
|
+
return /* @__PURE__ */ c(fe, {
|
|
743
743
|
$ghost: i,
|
|
744
744
|
$shape: r,
|
|
745
745
|
$size: n,
|
|
@@ -747,7 +747,7 @@ function be({ children: e, variant: t = "primary", size: n = "md", shape: r = "s
|
|
|
747
747
|
"data-pressed": d ? "true" : void 0,
|
|
748
748
|
...u,
|
|
749
749
|
...f,
|
|
750
|
-
children: /* @__PURE__ */
|
|
750
|
+
children: /* @__PURE__ */ c(H, {
|
|
751
751
|
size: n,
|
|
752
752
|
style: { color: "inherit" },
|
|
753
753
|
children: e
|
|
@@ -755,83 +755,83 @@ function be({ children: e, variant: t = "primary", size: n = "md", shape: r = "s
|
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
// src/components/atoms/AInput/AInput.styles.ts
|
|
758
|
-
var
|
|
759
|
-
color: ${({ theme: e }) =>
|
|
760
|
-
font-size: ${({ theme: e }) =>
|
|
761
|
-
font-weight: ${({ theme: e }) =>
|
|
762
|
-
`,
|
|
758
|
+
var pe = o`
|
|
759
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
760
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
761
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
762
|
+
`, me = o`
|
|
763
763
|
box-sizing: border-box;
|
|
764
764
|
width: 100%;
|
|
765
|
-
height: ${({ theme: e }) =>
|
|
766
|
-
border: ${({ theme: e }) =>
|
|
767
|
-
border-radius: ${({ theme: e }) =>
|
|
768
|
-
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${
|
|
769
|
-
background: ${({ theme: e }) =>
|
|
770
|
-
color: ${({ theme: e }) =>
|
|
765
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
766
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
767
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
768
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${y(e).formControl.padding} ${y(e).formControl.trailingActionPadding} ${y(e).formControl.padding} ${y(e).formControl.padding}` : y(e).formControl.padding};
|
|
769
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
770
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
771
771
|
font: inherit;
|
|
772
|
-
font-size: ${({ theme: e }) =>
|
|
772
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
773
773
|
|
|
774
|
-
${
|
|
774
|
+
${T("formControl")}
|
|
775
775
|
|
|
776
776
|
&:disabled {
|
|
777
777
|
cursor: not-allowed;
|
|
778
|
-
opacity: ${({ theme: e }) =>
|
|
778
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
782
|
-
border-color: ${
|
|
781
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
782
|
+
border-color: ${y(t).colors.error};
|
|
783
783
|
`}
|
|
784
784
|
|
|
785
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
786
|
-
border-color: ${
|
|
785
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
786
|
+
border-color: ${y(n).colors.warning};
|
|
787
787
|
`}
|
|
788
|
-
`,
|
|
789
|
-
color: ${({ theme: e, $type: t }) =>
|
|
790
|
-
font-size: ${({ theme: e }) =>
|
|
791
|
-
`,
|
|
792
|
-
${
|
|
793
|
-
`,
|
|
794
|
-
${
|
|
795
|
-
`,
|
|
788
|
+
`, he = o`
|
|
789
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
790
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
791
|
+
`, ge = s.div`
|
|
792
|
+
${S}
|
|
793
|
+
`, _e = s.label`
|
|
794
|
+
${pe}
|
|
795
|
+
`, ve = s.div`
|
|
796
796
|
position: relative;
|
|
797
|
-
`,
|
|
798
|
-
${
|
|
797
|
+
`, ye = s.input`
|
|
798
|
+
${me}
|
|
799
799
|
|
|
800
800
|
&:focus,
|
|
801
801
|
&:focus-visible {
|
|
802
|
-
${({ $invalid: e, $warning: t, theme: n }) => e ?
|
|
803
|
-
border-color: ${
|
|
804
|
-
` : t ?
|
|
805
|
-
border-color: ${
|
|
802
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
803
|
+
border-color: ${y(n).colors.error};
|
|
804
|
+
` : t ? o`
|
|
805
|
+
border-color: ${y(n).colors.warning};
|
|
806
806
|
` : ""}
|
|
807
807
|
/* TODO: This prevents the outline from appearing when navigating with the Tab key */
|
|
808
808
|
outline: none;
|
|
809
809
|
}
|
|
810
|
-
`,
|
|
810
|
+
`, be = s(G)`
|
|
811
811
|
position: absolute;
|
|
812
812
|
top: 50%;
|
|
813
|
-
right: ${({ theme: e }) =>
|
|
813
|
+
right: ${({ theme: e }) => y(e).space.md};
|
|
814
814
|
translate: 0 -50%;
|
|
815
|
-
`,
|
|
816
|
-
${
|
|
815
|
+
`, J = s.div`
|
|
816
|
+
${he}
|
|
817
817
|
`;
|
|
818
818
|
// src/components/atoms/AInput/AInput.tsx
|
|
819
|
-
function
|
|
820
|
-
return /* @__PURE__ */
|
|
819
|
+
function xe({ visible: e }) {
|
|
820
|
+
return /* @__PURE__ */ l("svg", {
|
|
821
821
|
fill: "none",
|
|
822
822
|
viewBox: "0 0 24 24",
|
|
823
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ c("path", {
|
|
824
824
|
d: "M2.5 12s3.25-6 9.5-6 9.5 6 9.5 6-3.25 6-9.5 6-9.5-6-9.5-6Z",
|
|
825
825
|
stroke: "currentColor",
|
|
826
826
|
strokeLinecap: "round",
|
|
827
827
|
strokeLinejoin: "round",
|
|
828
828
|
strokeWidth: "1.8"
|
|
829
|
-
}), e ? /* @__PURE__ */
|
|
829
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
830
830
|
d: "m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8",
|
|
831
831
|
stroke: "currentColor",
|
|
832
832
|
strokeLinecap: "round",
|
|
833
833
|
strokeWidth: "1.8"
|
|
834
|
-
}) : /* @__PURE__ */
|
|
834
|
+
}) : /* @__PURE__ */ c("circle", {
|
|
835
835
|
cx: "12",
|
|
836
836
|
cy: "12",
|
|
837
837
|
r: "2.5",
|
|
@@ -840,18 +840,18 @@ function Ae({ visible: e }) {
|
|
|
840
840
|
})]
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
let m =
|
|
843
|
+
function Se({ type: e = "text", id: n, label: i, error: a, warning: o, disabled: s, ref: u, "aria-describedby": d, "aria-invalid": f, ...p }) {
|
|
844
|
+
let m = t(), h = n ?? m, g = `${h}-error`, _ = `${h}-warning`, [v, y] = r(!1), b = !!a || f === !0 || f === "true", x = [
|
|
845
845
|
d,
|
|
846
846
|
a ? g : void 0,
|
|
847
847
|
o ? _ : void 0
|
|
848
848
|
].filter(Boolean).join(" ") || void 0;
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
|
|
849
|
+
return /* @__PURE__ */ l(ge, { children: [
|
|
850
|
+
i ? /* @__PURE__ */ c(_e, {
|
|
851
851
|
htmlFor: h,
|
|
852
|
-
children:
|
|
852
|
+
children: i
|
|
853
853
|
}) : null,
|
|
854
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ l(ve, { children: [/* @__PURE__ */ c(ye, {
|
|
855
855
|
...p,
|
|
856
856
|
$hasTrailingAction: e === "password",
|
|
857
857
|
$invalid: b,
|
|
@@ -860,9 +860,9 @@ function je({ type: e = "text", id: t, label: r, error: a, warning: o, disabled:
|
|
|
860
860
|
"aria-invalid": b || void 0,
|
|
861
861
|
disabled: s,
|
|
862
862
|
id: h,
|
|
863
|
-
ref:
|
|
863
|
+
ref: u,
|
|
864
864
|
type: e === "password" && v ? "text" : e
|
|
865
|
-
}), e === "password" ? /* @__PURE__ */
|
|
865
|
+
}), e === "password" ? /* @__PURE__ */ c(be, {
|
|
866
866
|
"aria-label": v ? "Hide password" : "Show password",
|
|
867
867
|
"aria-pressed": v,
|
|
868
868
|
disabled: s,
|
|
@@ -874,20 +874,20 @@ function je({ type: e = "text", id: t, label: r, error: a, warning: o, disabled:
|
|
|
874
874
|
size: "md",
|
|
875
875
|
type: "button",
|
|
876
876
|
variant: "primary",
|
|
877
|
-
children: /* @__PURE__ */
|
|
877
|
+
children: /* @__PURE__ */ c(H, {
|
|
878
878
|
size: "md",
|
|
879
879
|
style: { color: "inherit" },
|
|
880
880
|
title: v ? "Hide password" : "Show password",
|
|
881
|
-
children: /* @__PURE__ */
|
|
881
|
+
children: /* @__PURE__ */ c(xe, { visible: v })
|
|
882
882
|
})
|
|
883
883
|
}) : null] }),
|
|
884
|
-
a ? /* @__PURE__ */
|
|
884
|
+
a ? /* @__PURE__ */ c(J, {
|
|
885
885
|
$type: "error",
|
|
886
886
|
id: g,
|
|
887
887
|
role: "alert",
|
|
888
888
|
children: a
|
|
889
889
|
}) : null,
|
|
890
|
-
o ? /* @__PURE__ */
|
|
890
|
+
o ? /* @__PURE__ */ c(J, {
|
|
891
891
|
$type: "warning",
|
|
892
892
|
id: _,
|
|
893
893
|
role: "status",
|
|
@@ -896,88 +896,88 @@ function je({ type: e = "text", id: t, label: r, error: a, warning: o, disabled:
|
|
|
896
896
|
] });
|
|
897
897
|
}
|
|
898
898
|
// src/components/atoms/ALink/ALink.styles.ts
|
|
899
|
-
var
|
|
900
|
-
primary:
|
|
901
|
-
background: ${({ theme: e }) =>
|
|
902
|
-
color: ${({ theme: e }) =>
|
|
899
|
+
var Ce = C("link"), we = {
|
|
900
|
+
primary: o`
|
|
901
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
902
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
903
903
|
|
|
904
904
|
&:hover:not(:disabled) {
|
|
905
|
-
background: ${({ theme: e }) =>
|
|
905
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
906
906
|
}
|
|
907
907
|
`,
|
|
908
|
-
secondary:
|
|
909
|
-
background: ${({ theme: e }) =>
|
|
910
|
-
color: ${({ theme: e }) =>
|
|
908
|
+
secondary: o`
|
|
909
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
910
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
911
911
|
|
|
912
912
|
&:hover:not(:disabled) {
|
|
913
|
-
background: ${({ theme: e }) =>
|
|
913
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
914
914
|
}
|
|
915
915
|
`
|
|
916
|
-
},
|
|
916
|
+
}, Te = s.a`
|
|
917
917
|
display: inline-flex;
|
|
918
918
|
align-items: center;
|
|
919
919
|
justify-content: center;
|
|
920
|
-
gap: ${({ theme: e }) =>
|
|
921
|
-
font-family: ${({ theme: e }) =>
|
|
922
|
-
font-size: ${({ theme: e }) =>
|
|
923
|
-
font-weight: ${({ theme: e }) =>
|
|
924
|
-
text-transform: ${({ theme: e }) =>
|
|
925
|
-
text-decoration: ${({ theme: e }) =>
|
|
920
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
921
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
922
|
+
font-size: ${({ theme: e }) => y(e).link.fontSize};
|
|
923
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
924
|
+
text-transform: ${({ theme: e }) => y(e).link.textTransform};
|
|
925
|
+
text-decoration: ${({ theme: e }) => y(e).link.textDecoration};
|
|
926
926
|
cursor: pointer;
|
|
927
927
|
transition:
|
|
928
928
|
background-color 0.15s ease,
|
|
929
929
|
transform 0.15s ease,
|
|
930
930
|
box-shadow 0.15s ease;
|
|
931
931
|
|
|
932
|
-
${
|
|
932
|
+
${T("link")}
|
|
933
933
|
|
|
934
|
-
border: ${({ theme: e }) =>
|
|
935
|
-
box-shadow: ${({ theme: e }) =>
|
|
936
|
-
border-radius: ${({ theme: e }) =>
|
|
937
|
-
padding: ${({ theme: e }) =>
|
|
934
|
+
border: ${({ theme: e }) => y(e).link.border};
|
|
935
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.link};
|
|
936
|
+
border-radius: ${({ theme: e }) => y(e).link.borderRadius};
|
|
937
|
+
padding: ${({ theme: e }) => y(e).link.padding};
|
|
938
938
|
|
|
939
939
|
white-space: nowrap;
|
|
940
940
|
|
|
941
941
|
&:active,
|
|
942
942
|
&[data-pressed='true'] {
|
|
943
|
-
transform: ${({ theme: e }) => `translate(${
|
|
943
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
944
944
|
box-shadow: none;
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
${({ $variant: e }) =>
|
|
948
|
-
${({ $size: e }) =>
|
|
947
|
+
${({ $variant: e }) => we[e]}
|
|
948
|
+
${({ $size: e }) => Ce[e]}
|
|
949
949
|
`;
|
|
950
950
|
// src/components/atoms/ALink/ALink.tsx
|
|
951
|
-
function
|
|
952
|
-
let { pressed:
|
|
951
|
+
function Y({ children: e, variant: t = "primary", size: n = "md", onPointerDown: r, onPointerUp: i, onPointerCancel: a, onLostPointerCapture: o, ...s }) {
|
|
952
|
+
let { pressed: l, pressHandlers: u } = j({
|
|
953
953
|
onPointerDown: r,
|
|
954
954
|
onPointerUp: i,
|
|
955
955
|
onPointerCancel: a,
|
|
956
956
|
onLostPointerCapture: o
|
|
957
957
|
});
|
|
958
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ c(Te, {
|
|
959
959
|
$size: n,
|
|
960
960
|
$variant: t,
|
|
961
|
-
"data-pressed":
|
|
961
|
+
"data-pressed": l ? "true" : void 0,
|
|
962
962
|
...s,
|
|
963
963
|
...u,
|
|
964
964
|
children: e
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
// src/components/atoms/ALogo/ALogo.styles.ts
|
|
968
|
-
var
|
|
969
|
-
--logo-size: ${({ theme: e }) =>
|
|
968
|
+
var Ee = s.div`
|
|
969
|
+
--logo-size: ${({ theme: e }) => y(e).logo.size};
|
|
970
970
|
|
|
971
971
|
display: inline-flex;
|
|
972
972
|
align-items: center;
|
|
973
973
|
justify-content: center;
|
|
974
|
-
gap: ${({ theme: e }) =>
|
|
974
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
975
975
|
min-width: 0;
|
|
976
|
-
color: ${({ theme: e }) =>
|
|
977
|
-
font-family: ${({ theme: e }) =>
|
|
978
|
-
font-size: ${({ theme: e }) =>
|
|
979
|
-
font-weight: ${({ theme: e }) =>
|
|
980
|
-
white-space: ${({ theme: e }) =>
|
|
976
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
977
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
978
|
+
font-size: ${({ theme: e }) => y(e).logo.fontSize};
|
|
979
|
+
font-weight: ${({ theme: e }) => y(e).logo.fontWeight};
|
|
980
|
+
white-space: ${({ theme: e }) => y(e).logo.whiteSpace};
|
|
981
981
|
|
|
982
982
|
& > span:first-child > svg,
|
|
983
983
|
& > span:first-child img {
|
|
@@ -988,90 +988,90 @@ var Ie = c.div`
|
|
|
988
988
|
object-fit: contain;
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
-
${({ $variant: e, theme: t }) => e === "icon" &&
|
|
992
|
-
width: ${
|
|
993
|
-
height: ${
|
|
991
|
+
${({ $variant: e, theme: t }) => e === "icon" && o`
|
|
992
|
+
width: ${y(t).logo.size};
|
|
993
|
+
height: ${y(t).logo.size};
|
|
994
994
|
`}
|
|
995
|
-
`,
|
|
995
|
+
`, De = s.span`
|
|
996
996
|
overflow: hidden;
|
|
997
997
|
text-overflow: ellipsis;
|
|
998
998
|
`;
|
|
999
999
|
// src/components/atoms/ALogo/ALogo.tsx
|
|
1000
|
-
function
|
|
1001
|
-
return /* @__PURE__ */
|
|
1000
|
+
function Oe({ logo: e, name: t, variant: n = "full", ...r }) {
|
|
1001
|
+
return /* @__PURE__ */ l(Ee, {
|
|
1002
1002
|
...r,
|
|
1003
1003
|
$variant: n,
|
|
1004
1004
|
role: n === "icon" ? "img" : void 0,
|
|
1005
1005
|
"aria-label": n === "icon" ? t : r["aria-label"],
|
|
1006
|
-
children: [/* @__PURE__ */
|
|
1006
|
+
children: [/* @__PURE__ */ c("span", {
|
|
1007
1007
|
"aria-hidden": "true",
|
|
1008
1008
|
children: e
|
|
1009
|
-
}), n === "full" ? /* @__PURE__ */
|
|
1009
|
+
}), n === "full" ? /* @__PURE__ */ c(De, { children: t }) : null]
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
1012
|
// src/components/atoms/ASearchInput/ASearchInput.styles.ts
|
|
1013
|
-
var
|
|
1013
|
+
var ke = o`
|
|
1014
1014
|
box-sizing: border-box;
|
|
1015
1015
|
width: 100%;
|
|
1016
|
-
height: ${({ theme: e }) =>
|
|
1017
|
-
border: ${({ theme: e }) =>
|
|
1018
|
-
border-radius: ${({ theme: e }) =>
|
|
1019
|
-
padding: ${({ theme: e }) =>
|
|
1020
|
-
background: ${({ theme: e }) =>
|
|
1021
|
-
color: ${({ theme: e }) =>
|
|
1016
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
1017
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1018
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1019
|
+
padding: ${({ theme: e }) => y(e).formControl.padding};
|
|
1020
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1021
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1022
1022
|
font: inherit;
|
|
1023
|
-
font-size: ${({ theme: e }) =>
|
|
1024
|
-
`,
|
|
1025
|
-
${
|
|
1026
|
-
`,
|
|
1023
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1024
|
+
`, Ae = s.div`
|
|
1025
|
+
${S}
|
|
1026
|
+
`, je = s.div`
|
|
1027
1027
|
position: relative;
|
|
1028
|
-
`,
|
|
1029
|
-
${
|
|
1030
|
-
padding-right: ${({ theme: e }) =>
|
|
1028
|
+
`, Me = s.input`
|
|
1029
|
+
${ke}
|
|
1030
|
+
padding-right: ${({ theme: e }) => y(e).formControl.trailingActionPadding};
|
|
1031
1031
|
|
|
1032
1032
|
/* TODO: Outline styles should be implemented for each form ui elements */
|
|
1033
1033
|
|
|
1034
1034
|
&:disabled {
|
|
1035
1035
|
cursor: not-allowed;
|
|
1036
|
-
opacity: ${({ theme: e }) =>
|
|
1036
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1037
1037
|
}
|
|
1038
|
-
`,
|
|
1038
|
+
`, Ne = s(G)`
|
|
1039
1039
|
position: absolute;
|
|
1040
1040
|
top: 50%;
|
|
1041
|
-
right: ${({ theme: e }) =>
|
|
1041
|
+
right: ${({ theme: e }) => y(e).space.md};
|
|
1042
1042
|
translate: 0 -50%;
|
|
1043
|
-
`,
|
|
1043
|
+
`, Pe = s.ul`
|
|
1044
1044
|
position: absolute;
|
|
1045
1045
|
z-index: 10;
|
|
1046
1046
|
top: 100%;
|
|
1047
1047
|
right: 0;
|
|
1048
1048
|
left: 0;
|
|
1049
|
-
max-height: ${({ theme: e }) =>
|
|
1049
|
+
max-height: ${({ theme: e }) => y(e).formControl.optionListMaxHeight};
|
|
1050
1050
|
margin: 0;
|
|
1051
1051
|
padding: 0;
|
|
1052
1052
|
overflow: auto;
|
|
1053
|
-
border: ${({ theme: e }) =>
|
|
1054
|
-
border-radius: ${({ theme: e }) =>
|
|
1055
|
-
background: ${({ theme: e }) =>
|
|
1053
|
+
border: ${({ theme: e }) => y(e).formControl.dropdownBorder};
|
|
1054
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1055
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1056
1056
|
list-style: none;
|
|
1057
|
-
`,
|
|
1058
|
-
${
|
|
1059
|
-
background: ${({ theme: e, $active: t }) => t ?
|
|
1060
|
-
color: ${({ theme: e }) =>
|
|
1057
|
+
`, Fe = s.li`
|
|
1058
|
+
${w}
|
|
1059
|
+
background: ${({ theme: e, $active: t }) => t ? y(e).colors.secondaryHover : "transparent"};
|
|
1060
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1061
1061
|
cursor: pointer;
|
|
1062
1062
|
`;
|
|
1063
1063
|
// src/components/atoms/ASearchInput/ASearchInput.tsx
|
|
1064
|
-
function
|
|
1065
|
-
return /* @__PURE__ */
|
|
1064
|
+
function Ie() {
|
|
1065
|
+
return /* @__PURE__ */ l("svg", {
|
|
1066
1066
|
fill: "none",
|
|
1067
1067
|
viewBox: "0 0 24 24",
|
|
1068
|
-
children: [/* @__PURE__ */
|
|
1068
|
+
children: [/* @__PURE__ */ c("circle", {
|
|
1069
1069
|
cx: "10.8",
|
|
1070
1070
|
cy: "10.8",
|
|
1071
1071
|
r: "6.3",
|
|
1072
1072
|
stroke: "currentColor",
|
|
1073
1073
|
strokeWidth: "1.8"
|
|
1074
|
-
}), /* @__PURE__ */
|
|
1074
|
+
}), /* @__PURE__ */ c("path", {
|
|
1075
1075
|
d: "m15.5 15.5 4 4",
|
|
1076
1076
|
stroke: "currentColor",
|
|
1077
1077
|
strokeLinecap: "round",
|
|
@@ -1079,83 +1079,83 @@ function Ke() {
|
|
|
1079
1079
|
})]
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
let y =
|
|
1084
|
-
|
|
1082
|
+
function Le({ options: i, value: a, defaultValue: o = "", debounceMs: s = 300, onSearch: u, onSelect: d, onChange: f, onFocus: p, onBlur: m, id: h, disabled: g, ref: _, ...v }) {
|
|
1083
|
+
let y = t(), b = h ?? y, x = `${b}-options`, S = n(null), C = n(!1), w = n(null), [T, E] = r(o), [D, O] = r(!1), [k, A] = r(-1), j = a ?? T, M = a !== void 0, N = j.trim().toLocaleLowerCase(), P = N ? i.filter((e) => e.label.toLocaleLowerCase().includes(N) || String(e.value).toLocaleLowerCase().includes(N)) : [], F = D && P.length > 0;
|
|
1084
|
+
e(() => {
|
|
1085
1085
|
if (!C.current) {
|
|
1086
1086
|
C.current = !0;
|
|
1087
1087
|
return;
|
|
1088
1088
|
}
|
|
1089
|
-
if (!
|
|
1089
|
+
if (!u) return;
|
|
1090
1090
|
let e = setTimeout(() => {
|
|
1091
|
-
w.current = null,
|
|
1091
|
+
w.current = null, u(j);
|
|
1092
1092
|
}, s);
|
|
1093
1093
|
return w.current = e, () => {
|
|
1094
1094
|
clearTimeout(e), w.current === e && (w.current = null);
|
|
1095
1095
|
};
|
|
1096
1096
|
}, [
|
|
1097
1097
|
s,
|
|
1098
|
-
|
|
1098
|
+
u,
|
|
1099
1099
|
j
|
|
1100
1100
|
]);
|
|
1101
|
-
let
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1101
|
+
let I = (e) => {
|
|
1102
|
+
M || E(e.currentTarget.value), A(-1), f?.(e);
|
|
1103
|
+
}, L = (e) => {
|
|
1104
1104
|
e.relatedTarget instanceof Node && S.current?.querySelector("[role=\"listbox\"]")?.contains(e.relatedTarget) || (O(!1), A(-1), m?.(e));
|
|
1105
|
-
},
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1108
|
-
e.key === "ArrowDown" &&
|
|
1105
|
+
}, R = (e) => {
|
|
1106
|
+
M || E(e.label), d?.(e), O(!1);
|
|
1107
|
+
}, z = (e) => {
|
|
1108
|
+
e.key === "ArrowDown" && P.length > 0 ? (e.preventDefault(), O(!0), A((e) => (e + 1) % P.length)) : e.key === "ArrowUp" && P.length > 0 ? (e.preventDefault(), O(!0), A((e) => e <= 0 ? P.length - 1 : e - 1)) : e.key === "Enter" && F && P[k] ? (e.preventDefault(), R(P[k])) : e.key === "Escape" && (O(!1), A(-1)), v.onKeyDown?.(e);
|
|
1109
1109
|
};
|
|
1110
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ c(Ae, {
|
|
1111
1111
|
ref: S,
|
|
1112
|
-
children: /* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1112
|
+
children: /* @__PURE__ */ l(je, { children: [
|
|
1113
|
+
/* @__PURE__ */ c(Me, {
|
|
1114
1114
|
...v,
|
|
1115
|
-
"aria-activedescendant":
|
|
1115
|
+
"aria-activedescendant": F && k >= 0 ? `${x}-option-${String(k)}` : void 0,
|
|
1116
1116
|
"aria-autocomplete": "list",
|
|
1117
|
-
"aria-controls":
|
|
1118
|
-
"aria-expanded":
|
|
1117
|
+
"aria-controls": F ? x : void 0,
|
|
1118
|
+
"aria-expanded": F,
|
|
1119
1119
|
"aria-haspopup": "listbox",
|
|
1120
1120
|
autoComplete: "off",
|
|
1121
1121
|
disabled: g,
|
|
1122
1122
|
id: b,
|
|
1123
|
-
onBlur:
|
|
1124
|
-
onChange:
|
|
1123
|
+
onBlur: L,
|
|
1124
|
+
onChange: I,
|
|
1125
1125
|
onFocus: (e) => {
|
|
1126
1126
|
O(!0), p && p(e);
|
|
1127
1127
|
},
|
|
1128
|
-
onKeyDown:
|
|
1128
|
+
onKeyDown: z,
|
|
1129
1129
|
ref: _,
|
|
1130
1130
|
role: "combobox",
|
|
1131
1131
|
value: j
|
|
1132
1132
|
}),
|
|
1133
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ c(Ne, {
|
|
1134
1134
|
"aria-label": "Search",
|
|
1135
1135
|
disabled: g,
|
|
1136
1136
|
ghost: !0,
|
|
1137
1137
|
onClick: () => {
|
|
1138
|
-
w.current &&= (clearTimeout(w.current), null),
|
|
1138
|
+
w.current &&= (clearTimeout(w.current), null), u?.(j);
|
|
1139
1139
|
},
|
|
1140
1140
|
shape: "rounded",
|
|
1141
1141
|
size: "md",
|
|
1142
1142
|
type: "button",
|
|
1143
1143
|
variant: "primary",
|
|
1144
|
-
children: /* @__PURE__ */
|
|
1144
|
+
children: /* @__PURE__ */ c(H, {
|
|
1145
1145
|
size: "md",
|
|
1146
1146
|
style: { color: "inherit" },
|
|
1147
1147
|
title: "Search",
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1148
|
+
children: /* @__PURE__ */ c(Ie, {})
|
|
1149
1149
|
})
|
|
1150
1150
|
}),
|
|
1151
|
-
|
|
1151
|
+
F ? /* @__PURE__ */ c(Pe, {
|
|
1152
1152
|
id: x,
|
|
1153
1153
|
role: "listbox",
|
|
1154
|
-
children:
|
|
1154
|
+
children: P.map((e, t) => /* @__PURE__ */ c(Fe, {
|
|
1155
1155
|
"aria-selected": t === k,
|
|
1156
1156
|
id: `${x}-option-${String(t)}`,
|
|
1157
1157
|
onClick: () => {
|
|
1158
|
-
|
|
1158
|
+
R(e);
|
|
1159
1159
|
},
|
|
1160
1160
|
onMouseDown: (e) => {
|
|
1161
1161
|
e.preventDefault();
|
|
@@ -1169,103 +1169,103 @@ function qe({ options: e, value: a, defaultValue: o = "", debounceMs: s = 300, o
|
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
1171
|
// src/components/atoms/ASection/ASection.styles.ts
|
|
1172
|
-
var
|
|
1173
|
-
border: ${({ theme: e }) =>
|
|
1174
|
-
border-radius: ${({ theme: e }) =>
|
|
1175
|
-
padding: ${({ theme: e }) =>
|
|
1176
|
-
background-color: ${({ theme: e }) =>
|
|
1177
|
-
box-shadow: ${({ $shadow: e, theme: t }) => e ?
|
|
1172
|
+
var Re = s.section`
|
|
1173
|
+
border: ${({ theme: e }) => y(e).section.border};
|
|
1174
|
+
border-radius: ${({ theme: e }) => y(e).section.borderRadius};
|
|
1175
|
+
padding: ${({ theme: e }) => y(e).section.padding};
|
|
1176
|
+
background-color: ${({ theme: e }) => y(e).colors.surface};
|
|
1177
|
+
box-shadow: ${({ $shadow: e, theme: t }) => e ? y(t).shadow.section : "none"};
|
|
1178
1178
|
`;
|
|
1179
1179
|
// src/components/atoms/ASection/ASection.tsx
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */
|
|
1180
|
+
function ze({ children: e, shadow: t = !1, ...n }) {
|
|
1181
|
+
return /* @__PURE__ */ c(Re, {
|
|
1182
1182
|
$shadow: t,
|
|
1183
1183
|
...n,
|
|
1184
1184
|
children: e
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
1187
|
// src/components/atoms/ASelect/ASelect.styles.ts
|
|
1188
|
-
var
|
|
1189
|
-
color: ${({ theme: e }) =>
|
|
1190
|
-
font-size: ${({ theme: e }) =>
|
|
1191
|
-
font-weight: ${({ theme: e }) =>
|
|
1192
|
-
`,
|
|
1188
|
+
var Be = o`
|
|
1189
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1190
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1191
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1192
|
+
`, Ve = o`
|
|
1193
1193
|
box-sizing: border-box;
|
|
1194
1194
|
width: 100%;
|
|
1195
|
-
height: ${({ theme: e }) =>
|
|
1196
|
-
border: ${({ theme: e }) =>
|
|
1197
|
-
border-radius: ${({ theme: e }) =>
|
|
1198
|
-
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${
|
|
1199
|
-
background: ${({ theme: e }) =>
|
|
1200
|
-
color: ${({ theme: e }) =>
|
|
1195
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
1196
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1197
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1198
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${y(e).formControl.padding} ${y(e).formControl.trailingActionPadding} ${y(e).formControl.padding} ${y(e).formControl.padding}` : y(e).formControl.padding};
|
|
1199
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1200
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1201
1201
|
font: inherit;
|
|
1202
|
-
font-size: ${({ theme: e }) =>
|
|
1202
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1203
1203
|
|
|
1204
|
-
${
|
|
1204
|
+
${T("formControl")}
|
|
1205
1205
|
|
|
1206
1206
|
&:disabled {
|
|
1207
1207
|
cursor: not-allowed;
|
|
1208
|
-
opacity: ${({ theme: e }) =>
|
|
1208
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
1212
|
-
border-color: ${
|
|
1211
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1212
|
+
border-color: ${y(t).colors.error};
|
|
1213
1213
|
`}
|
|
1214
1214
|
|
|
1215
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
1216
|
-
border-color: ${
|
|
1215
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1216
|
+
border-color: ${y(n).colors.warning};
|
|
1217
1217
|
`}
|
|
1218
|
-
`,
|
|
1219
|
-
color: ${({ theme: e, $type: t }) =>
|
|
1220
|
-
font-size: ${({ theme: e }) =>
|
|
1221
|
-
`,
|
|
1222
|
-
${
|
|
1223
|
-
`,
|
|
1218
|
+
`, He = o`
|
|
1219
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
1220
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1221
|
+
`, Ue = s.div`
|
|
1222
|
+
${S}
|
|
1223
|
+
`, We = s.div`
|
|
1224
1224
|
position: relative;
|
|
1225
|
-
`,
|
|
1226
|
-
${
|
|
1227
|
-
`,
|
|
1228
|
-
${
|
|
1225
|
+
`, Ge = s.label`
|
|
1226
|
+
${Be}
|
|
1227
|
+
`, Ke = s.div`
|
|
1228
|
+
${Ve}
|
|
1229
1229
|
display: flex;
|
|
1230
1230
|
align-items: center;
|
|
1231
1231
|
justify-content: space-between;
|
|
1232
|
-
gap: ${({ theme: e }) =>
|
|
1232
|
+
gap: ${({ theme: e }) => y(e).space.lg};
|
|
1233
1233
|
text-align: left;
|
|
1234
1234
|
cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
1235
1235
|
|
|
1236
|
-
${({ $disabled: e }) => e &&
|
|
1237
|
-
opacity: ${({ theme: e }) =>
|
|
1236
|
+
${({ $disabled: e }) => e && o`
|
|
1237
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1238
1238
|
`}
|
|
1239
|
-
`,
|
|
1239
|
+
`, qe = s.div`
|
|
1240
1240
|
position: absolute;
|
|
1241
1241
|
z-index: 10;
|
|
1242
1242
|
top: 100%;
|
|
1243
1243
|
right: 0;
|
|
1244
1244
|
left: 0;
|
|
1245
|
-
max-height: ${({ theme: e }) =>
|
|
1245
|
+
max-height: ${({ theme: e }) => y(e).formControl.optionListMaxHeight};
|
|
1246
1246
|
overflow: auto;
|
|
1247
|
-
border: ${({ theme: e }) =>
|
|
1248
|
-
border-radius: ${({ theme: e }) =>
|
|
1249
|
-
background: ${({ theme: e }) =>
|
|
1250
|
-
`,
|
|
1247
|
+
border: ${({ theme: e }) => y(e).formControl.dropdownBorder};
|
|
1248
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1249
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1250
|
+
`, Je = s.button`
|
|
1251
1251
|
display: block;
|
|
1252
1252
|
width: 100%;
|
|
1253
|
-
${
|
|
1253
|
+
${w}
|
|
1254
1254
|
border: 0;
|
|
1255
1255
|
border-radius: 0;
|
|
1256
|
-
background: ${({ theme: e, $selected: t }) => t ?
|
|
1257
|
-
color: ${({ theme: e }) =>
|
|
1256
|
+
background: ${({ theme: e, $selected: t }) => t ? y(e).colors.secondary : "transparent"};
|
|
1257
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1258
1258
|
font: inherit;
|
|
1259
1259
|
text-align: left;
|
|
1260
|
-
text-transform: ${({ theme: e }) =>
|
|
1260
|
+
text-transform: ${({ theme: e }) => y(e).formControl.optionTextTransform};
|
|
1261
1261
|
cursor: pointer;
|
|
1262
1262
|
|
|
1263
1263
|
&:hover,
|
|
1264
1264
|
&:focus-visible {
|
|
1265
|
-
background: ${({ theme: e }) =>
|
|
1265
|
+
background: ${({ theme: e }) => y(e).colors.secondaryHover};
|
|
1266
1266
|
outline: none;
|
|
1267
1267
|
}
|
|
1268
|
-
`,
|
|
1268
|
+
`, Ye = s.select`
|
|
1269
1269
|
position: absolute;
|
|
1270
1270
|
width: 1px;
|
|
1271
1271
|
height: 1px;
|
|
@@ -1274,115 +1274,115 @@ var Xe = s`
|
|
|
1274
1274
|
clip: rect(0, 0, 0, 0);
|
|
1275
1275
|
white-space: nowrap;
|
|
1276
1276
|
border: 0;
|
|
1277
|
-
`,
|
|
1277
|
+
`, Xe = s.span`
|
|
1278
1278
|
overflow: hidden;
|
|
1279
|
-
color: ${({ theme: e, $placeholder: t }) => t ?
|
|
1279
|
+
color: ${({ theme: e, $placeholder: t }) => t ? y(e).colors.muted : "inherit"};
|
|
1280
1280
|
text-overflow: ellipsis;
|
|
1281
1281
|
white-space: nowrap;
|
|
1282
|
-
`,
|
|
1283
|
-
${
|
|
1282
|
+
`, X = s.div`
|
|
1283
|
+
${He}
|
|
1284
1284
|
`;
|
|
1285
1285
|
// src/components/atoms/ASelect/ASelect.tsx
|
|
1286
|
-
function
|
|
1287
|
-
let w =
|
|
1286
|
+
function Ze({ options: i, value: a, defaultValue: o, onChange: s, onValueChange: u, onBlur: d, id: f, name: p, label: m, placeholder: h = "Select an option", error: g, warning: _, disabled: v, required: y, ref: b, "aria-describedby": x, "aria-invalid": S, ...C }) {
|
|
1287
|
+
let w = t(), T = f ?? w, E = `${T}-options`, D = `${T}-error`, O = `${T}-warning`, k = n(null), A = n(null), j = n(null), [M, N] = r(o), [P, F] = r(!1), I = a ?? M, L = i.find((e) => String(e.value) === String(I)), R = !!g || S === !0 || S === "true", z = [
|
|
1288
1288
|
x,
|
|
1289
1289
|
g ? D : void 0,
|
|
1290
1290
|
_ ? O : void 0
|
|
1291
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1291
|
+
].filter(Boolean).join(" ") || void 0, B = (e) => {
|
|
1292
1292
|
s?.(e);
|
|
1293
1293
|
};
|
|
1294
|
-
|
|
1295
|
-
if (!
|
|
1294
|
+
e(() => {
|
|
1295
|
+
if (!P) return;
|
|
1296
1296
|
let e = (e) => {
|
|
1297
|
-
e.target instanceof Node && k.current?.contains(e.target) ||
|
|
1297
|
+
e.target instanceof Node && k.current?.contains(e.target) || F(!1);
|
|
1298
1298
|
};
|
|
1299
1299
|
return document.addEventListener("pointerdown", e), () => {
|
|
1300
1300
|
document.removeEventListener("pointerdown", e);
|
|
1301
1301
|
};
|
|
1302
|
-
}, [
|
|
1303
|
-
|
|
1304
|
-
}, [
|
|
1305
|
-
let
|
|
1306
|
-
a === void 0 &&
|
|
1302
|
+
}, [P]), e(() => {
|
|
1303
|
+
P && (k.current?.querySelector("[role=\"option\"][aria-selected=\"true\"]") ?? k.current?.querySelector("[role=\"option\"]"))?.focus();
|
|
1304
|
+
}, [P]);
|
|
1305
|
+
let V = (e) => {
|
|
1306
|
+
a === void 0 && N(e), u?.(e);
|
|
1307
1307
|
let t = A.current;
|
|
1308
1308
|
t && (t.value = String(e), t.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
1309
|
-
},
|
|
1310
|
-
k.current?.contains(e.relatedTarget) || (
|
|
1311
|
-
},
|
|
1312
|
-
let
|
|
1313
|
-
|
|
1309
|
+
}, H = (e) => {
|
|
1310
|
+
k.current?.contains(e.relatedTarget) || (F(!1), A.current?.dispatchEvent(new FocusEvent("focusout", { bubbles: !0 })));
|
|
1311
|
+
}, U = (e, t) => {
|
|
1312
|
+
let n;
|
|
1313
|
+
e.key === "ArrowDown" && (n = (t + 1) % i.length), e.key === "ArrowUp" && (n = (t - 1 + i.length) % i.length), e.key === "Home" && (n = 0), e.key === "End" && (n = i.length - 1), e.key === "Escape" ? (e.preventDefault(), F(!1), j.current?.focus()) : n !== void 0 && (e.preventDefault(), k.current?.querySelectorAll("[role=\"option\"]")[n]?.focus());
|
|
1314
1314
|
};
|
|
1315
|
-
return /* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ l(Ue, {
|
|
1316
1316
|
ref: k,
|
|
1317
1317
|
children: [
|
|
1318
|
-
m ? /* @__PURE__ */
|
|
1318
|
+
m ? /* @__PURE__ */ c(Ge, {
|
|
1319
1319
|
htmlFor: T,
|
|
1320
1320
|
children: m
|
|
1321
1321
|
}) : null,
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ l(We, { children: [
|
|
1323
|
+
/* @__PURE__ */ l(Ye, {
|
|
1324
1324
|
...C,
|
|
1325
1325
|
"aria-hidden": "true",
|
|
1326
|
-
"aria-invalid":
|
|
1326
|
+
"aria-invalid": R || void 0,
|
|
1327
1327
|
disabled: v,
|
|
1328
1328
|
id: `${T}-native`,
|
|
1329
1329
|
name: p,
|
|
1330
1330
|
onBlur: d,
|
|
1331
|
-
onChange:
|
|
1331
|
+
onChange: B,
|
|
1332
1332
|
ref: (e) => {
|
|
1333
1333
|
A.current = e, typeof b == "function" ? b(e) : b && (b.current = e);
|
|
1334
1334
|
},
|
|
1335
1335
|
required: y,
|
|
1336
1336
|
tabIndex: -1,
|
|
1337
|
-
value:
|
|
1338
|
-
children: [/* @__PURE__ */
|
|
1337
|
+
value: I === void 0 ? "" : String(I),
|
|
1338
|
+
children: [/* @__PURE__ */ c("option", {
|
|
1339
1339
|
value: "",
|
|
1340
1340
|
children: h
|
|
1341
|
-
}),
|
|
1341
|
+
}), i.map((e) => /* @__PURE__ */ c("option", {
|
|
1342
1342
|
value: String(e.value),
|
|
1343
1343
|
children: e.label
|
|
1344
1344
|
}, String(e.value)))]
|
|
1345
1345
|
}),
|
|
1346
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ l(Ke, {
|
|
1347
1347
|
onClick: () => {
|
|
1348
|
-
v ||
|
|
1348
|
+
v || F((e) => !e);
|
|
1349
1349
|
},
|
|
1350
1350
|
$disabled: !!v,
|
|
1351
|
-
$invalid:
|
|
1351
|
+
$invalid: R,
|
|
1352
1352
|
$warning: !!_,
|
|
1353
|
-
children: [/* @__PURE__ */
|
|
1354
|
-
$placeholder: !
|
|
1355
|
-
children:
|
|
1356
|
-
}), /* @__PURE__ */
|
|
1353
|
+
children: [/* @__PURE__ */ c(Xe, {
|
|
1354
|
+
$placeholder: !L,
|
|
1355
|
+
children: L?.label ?? h
|
|
1356
|
+
}), /* @__PURE__ */ c(G, {
|
|
1357
1357
|
"aria-controls": E,
|
|
1358
|
-
"aria-describedby":
|
|
1359
|
-
"aria-expanded":
|
|
1358
|
+
"aria-describedby": z,
|
|
1359
|
+
"aria-expanded": P,
|
|
1360
1360
|
"aria-haspopup": "listbox",
|
|
1361
|
-
"aria-invalid":
|
|
1361
|
+
"aria-invalid": R || void 0,
|
|
1362
1362
|
"aria-label": m ?? h,
|
|
1363
1363
|
disabled: v,
|
|
1364
1364
|
ghost: !0,
|
|
1365
1365
|
id: T,
|
|
1366
|
-
onBlur:
|
|
1366
|
+
onBlur: H,
|
|
1367
1367
|
onClick: (e) => {
|
|
1368
|
-
e.stopPropagation(),
|
|
1368
|
+
e.stopPropagation(), F((e) => !e);
|
|
1369
1369
|
},
|
|
1370
1370
|
onKeyDown: (e) => {
|
|
1371
|
-
e.key === "Escape" ?
|
|
1371
|
+
e.key === "Escape" ? F(!1) : P || e.key !== "ArrowDown" && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), F(!0));
|
|
1372
1372
|
},
|
|
1373
1373
|
ref: j,
|
|
1374
1374
|
shape: "rounded",
|
|
1375
1375
|
size: "md",
|
|
1376
1376
|
type: "button",
|
|
1377
1377
|
variant: "primary",
|
|
1378
|
-
children: /* @__PURE__ */
|
|
1378
|
+
children: /* @__PURE__ */ c("svg", {
|
|
1379
1379
|
fill: "none",
|
|
1380
1380
|
style: {
|
|
1381
|
-
transform:
|
|
1381
|
+
transform: P ? "rotate(180deg)" : "rotate(0)",
|
|
1382
1382
|
transition: "transform 120ms ease"
|
|
1383
1383
|
},
|
|
1384
1384
|
viewBox: "0 0 24 24",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1385
|
+
children: /* @__PURE__ */ c("path", {
|
|
1386
1386
|
d: "m6 9 6 6 6-6",
|
|
1387
1387
|
stroke: "currentColor",
|
|
1388
1388
|
strokeLinecap: "round",
|
|
@@ -1392,20 +1392,20 @@ function ct({ options: e, value: a, defaultValue: o, onChange: s, onValueChange:
|
|
|
1392
1392
|
})
|
|
1393
1393
|
})]
|
|
1394
1394
|
}),
|
|
1395
|
-
|
|
1395
|
+
P ? /* @__PURE__ */ c(qe, {
|
|
1396
1396
|
id: E,
|
|
1397
1397
|
role: "listbox",
|
|
1398
1398
|
"aria-label": m,
|
|
1399
|
-
children:
|
|
1400
|
-
let n = String(e.value) === String(
|
|
1401
|
-
return /* @__PURE__ */
|
|
1399
|
+
children: i.map((e, t) => {
|
|
1400
|
+
let n = String(e.value) === String(I ?? "");
|
|
1401
|
+
return /* @__PURE__ */ c(Je, {
|
|
1402
1402
|
"aria-selected": n,
|
|
1403
1403
|
onClick: () => {
|
|
1404
|
-
|
|
1404
|
+
V(e.value), F(!1), j.current?.focus();
|
|
1405
1405
|
},
|
|
1406
|
-
onBlur:
|
|
1406
|
+
onBlur: H,
|
|
1407
1407
|
onKeyDown: (e) => {
|
|
1408
|
-
|
|
1408
|
+
U(e, t);
|
|
1409
1409
|
},
|
|
1410
1410
|
role: "option",
|
|
1411
1411
|
tabIndex: -1,
|
|
@@ -1416,13 +1416,13 @@ function ct({ options: e, value: a, defaultValue: o, onChange: s, onValueChange:
|
|
|
1416
1416
|
})
|
|
1417
1417
|
}) : null
|
|
1418
1418
|
] }),
|
|
1419
|
-
g ? /* @__PURE__ */
|
|
1419
|
+
g ? /* @__PURE__ */ c(X, {
|
|
1420
1420
|
$type: "error",
|
|
1421
1421
|
id: D,
|
|
1422
1422
|
role: "alert",
|
|
1423
1423
|
children: g
|
|
1424
1424
|
}) : null,
|
|
1425
|
-
_ ? /* @__PURE__ */
|
|
1425
|
+
_ ? /* @__PURE__ */ c(X, {
|
|
1426
1426
|
$type: "warning",
|
|
1427
1427
|
id: O,
|
|
1428
1428
|
role: "status",
|
|
@@ -1432,67 +1432,67 @@ function ct({ options: e, value: a, defaultValue: o, onChange: s, onValueChange:
|
|
|
1432
1432
|
});
|
|
1433
1433
|
}
|
|
1434
1434
|
// src/components/atoms/ATextarea/ATextarea.styles.ts
|
|
1435
|
-
var
|
|
1436
|
-
${
|
|
1437
|
-
`,
|
|
1438
|
-
color: ${({ theme: e }) =>
|
|
1439
|
-
font-size: ${({ theme: e }) =>
|
|
1440
|
-
font-weight: ${({ theme: e }) =>
|
|
1441
|
-
`,
|
|
1435
|
+
var Qe = s.div`
|
|
1436
|
+
${S}
|
|
1437
|
+
`, $e = s.label`
|
|
1438
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1439
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1440
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1441
|
+
`, et = s.textarea`
|
|
1442
1442
|
box-sizing: border-box;
|
|
1443
1443
|
width: 100%;
|
|
1444
|
-
height: ${({ $height: e, theme: t }) => e == null ?
|
|
1445
|
-
min-height: ${({ theme: e }) =>
|
|
1446
|
-
border: ${({ theme: e }) =>
|
|
1447
|
-
border-radius: ${({ theme: e }) =>
|
|
1448
|
-
padding: ${({ theme: e }) =>
|
|
1449
|
-
background: ${({ theme: e }) =>
|
|
1450
|
-
color: ${({ theme: e }) =>
|
|
1444
|
+
height: ${({ $height: e, theme: t }) => e == null ? y(t).formControl.textareaHeight : typeof e == "number" ? `${e.toString()}px` : e};
|
|
1445
|
+
min-height: ${({ theme: e }) => y(e).formControl.textareaHeight};
|
|
1446
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1447
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1448
|
+
padding: ${({ theme: e }) => y(e).formControl.padding};
|
|
1449
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1450
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1451
1451
|
font: inherit;
|
|
1452
|
-
font-size: ${({ theme: e }) =>
|
|
1452
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1453
1453
|
resize: ${({ $resizable: e }) => e ? "vertical" : "none"};
|
|
1454
1454
|
|
|
1455
|
-
${
|
|
1455
|
+
${T("formControl")}
|
|
1456
1456
|
|
|
1457
1457
|
&:disabled {
|
|
1458
1458
|
cursor: not-allowed;
|
|
1459
|
-
opacity: ${({ theme: e }) =>
|
|
1459
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1460
1460
|
}
|
|
1461
1461
|
|
|
1462
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
1463
|
-
border-color: ${
|
|
1462
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1463
|
+
border-color: ${y(t).colors.error};
|
|
1464
1464
|
`}
|
|
1465
1465
|
|
|
1466
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
1467
|
-
border-color: ${
|
|
1466
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1467
|
+
border-color: ${y(n).colors.warning};
|
|
1468
1468
|
`}
|
|
1469
1469
|
|
|
1470
1470
|
&:focus,
|
|
1471
1471
|
&:focus-visible {
|
|
1472
|
-
${({ $invalid: e, $warning: t, theme: n }) => e ?
|
|
1473
|
-
border-color: ${
|
|
1474
|
-
` : t ?
|
|
1475
|
-
border-color: ${
|
|
1472
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
1473
|
+
border-color: ${y(n).colors.error};
|
|
1474
|
+
` : t ? o`
|
|
1475
|
+
border-color: ${y(n).colors.warning};
|
|
1476
1476
|
` : ""}
|
|
1477
1477
|
outline: none;
|
|
1478
1478
|
}
|
|
1479
|
-
`,
|
|
1480
|
-
color: ${({ theme: e, $type: t }) =>
|
|
1481
|
-
font-size: ${({ theme: e }) =>
|
|
1479
|
+
`, Z = s.div`
|
|
1480
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
1481
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1482
1482
|
`;
|
|
1483
1483
|
// src/components/atoms/ATextarea/ATextarea.tsx
|
|
1484
|
-
function
|
|
1485
|
-
let p =
|
|
1486
|
-
|
|
1484
|
+
function tt({ id: e, label: n, error: r, warning: i, height: a, resizable: o = !1, ref: s, "aria-describedby": u, "aria-invalid": d, ...f }) {
|
|
1485
|
+
let p = t(), m = e ?? p, h = `${m}-error`, g = `${m}-warning`, _ = !!r || d === !0 || d === "true", v = [
|
|
1486
|
+
u,
|
|
1487
1487
|
r ? h : void 0,
|
|
1488
1488
|
i ? g : void 0
|
|
1489
1489
|
].filter(Boolean).join(" ") || void 0;
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
|
|
1490
|
+
return /* @__PURE__ */ l(Qe, { children: [
|
|
1491
|
+
n ? /* @__PURE__ */ c($e, {
|
|
1492
1492
|
htmlFor: m,
|
|
1493
|
-
children:
|
|
1493
|
+
children: n
|
|
1494
1494
|
}) : null,
|
|
1495
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ c(et, {
|
|
1496
1496
|
...f,
|
|
1497
1497
|
$height: a,
|
|
1498
1498
|
$invalid: _,
|
|
@@ -1503,13 +1503,13 @@ function pt({ id: e, label: t, error: r, warning: i, height: a, resizable: o = !
|
|
|
1503
1503
|
id: m,
|
|
1504
1504
|
ref: s
|
|
1505
1505
|
}),
|
|
1506
|
-
r ? /* @__PURE__ */
|
|
1506
|
+
r ? /* @__PURE__ */ c(Z, {
|
|
1507
1507
|
$type: "error",
|
|
1508
1508
|
id: h,
|
|
1509
1509
|
role: "alert",
|
|
1510
1510
|
children: r
|
|
1511
1511
|
}) : null,
|
|
1512
|
-
i ? /* @__PURE__ */
|
|
1512
|
+
i ? /* @__PURE__ */ c(Z, {
|
|
1513
1513
|
$type: "warning",
|
|
1514
1514
|
id: g,
|
|
1515
1515
|
role: "status",
|
|
@@ -1518,19 +1518,19 @@ function pt({ id: e, label: t, error: r, warning: i, height: a, resizable: o = !
|
|
|
1518
1518
|
] });
|
|
1519
1519
|
}
|
|
1520
1520
|
// src/components/atoms/ATypography/ATypography.styles.ts
|
|
1521
|
-
var
|
|
1522
|
-
color: ${({ theme: e }) =>
|
|
1523
|
-
font-family: ${({ theme: e }) =>
|
|
1521
|
+
var nt = s.p`
|
|
1522
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1523
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1524
1524
|
font-size: ${({ theme: e, $fontSize: t, $tag: n }) => {
|
|
1525
1525
|
if (t !== void 0) return t;
|
|
1526
|
-
let r =
|
|
1526
|
+
let r = y(e).typography;
|
|
1527
1527
|
return n && Object.hasOwn(r, n) ? r[n] : r.fallback;
|
|
1528
1528
|
}};
|
|
1529
1529
|
`;
|
|
1530
1530
|
// src/components/atoms/ATypography/ATypography.tsx
|
|
1531
|
-
function
|
|
1531
|
+
function rt({ tag: e, as: t, fontSize: n, ...r }) {
|
|
1532
1532
|
let i = e ?? t ?? "p";
|
|
1533
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ c(nt, {
|
|
1534
1534
|
$tag: typeof i == "string" ? i : void 0,
|
|
1535
1535
|
$fontSize: n,
|
|
1536
1536
|
as: i,
|
|
@@ -1538,15 +1538,15 @@ function ht({ tag: e, as: t, fontSize: n, ...r }) {
|
|
|
1538
1538
|
});
|
|
1539
1539
|
}
|
|
1540
1540
|
// src/components/molecules/MModal/MModal.styles.ts
|
|
1541
|
-
var
|
|
1541
|
+
var it = o`
|
|
1542
1542
|
position: fixed;
|
|
1543
1543
|
inset: 0;
|
|
1544
1544
|
z-index: 1000;
|
|
1545
1545
|
display: flex;
|
|
1546
1546
|
align-items: center;
|
|
1547
1547
|
justify-content: center;
|
|
1548
|
-
padding: ${({ theme: e }) =>
|
|
1549
|
-
`,
|
|
1548
|
+
padding: ${({ theme: e }) => y(e).space.lg};
|
|
1549
|
+
`, at = o`
|
|
1550
1550
|
position: absolute;
|
|
1551
1551
|
inset: 0;
|
|
1552
1552
|
border: none;
|
|
@@ -1554,1275 +1554,122 @@ var gt = s`
|
|
|
1554
1554
|
cursor: pointer;
|
|
1555
1555
|
background: color-mix(
|
|
1556
1556
|
in srgb,
|
|
1557
|
-
${({ theme: e }) =>
|
|
1557
|
+
${({ theme: e }) => y(e).colors.bg} 25%,
|
|
1558
1558
|
transparent
|
|
1559
1559
|
);
|
|
1560
|
-
`,
|
|
1560
|
+
`, ot = o`
|
|
1561
1561
|
position: relative;
|
|
1562
1562
|
z-index: 1;
|
|
1563
1563
|
box-sizing: border-box;
|
|
1564
1564
|
display: flex;
|
|
1565
1565
|
flex-direction: column;
|
|
1566
1566
|
width: 100%;
|
|
1567
|
-
max-width: ${({ theme: e }) =>
|
|
1568
|
-
max-height: ${({ theme: e }) =>
|
|
1569
|
-
padding: ${({ theme: e }) =>
|
|
1567
|
+
max-width: ${({ theme: e }) => y(e).modal.maxWidth};
|
|
1568
|
+
max-height: ${({ theme: e }) => y(e).modal.maxHeight};
|
|
1569
|
+
padding: ${({ theme: e }) => y(e).modal.padding};
|
|
1570
1570
|
overflow: hidden;
|
|
1571
|
-
background-color: ${({ theme: e }) =>
|
|
1572
|
-
border: ${({ theme: e }) =>
|
|
1573
|
-
border-radius: ${({ theme: e }) =>
|
|
1574
|
-
box-shadow: ${({ theme: e }) =>
|
|
1575
|
-
`,
|
|
1571
|
+
background-color: ${({ theme: e }) => y(e).colors.surface};
|
|
1572
|
+
border: ${({ theme: e }) => y(e).modal.border};
|
|
1573
|
+
border-radius: ${({ theme: e }) => y(e).modal.borderRadius};
|
|
1574
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.modal};
|
|
1575
|
+
`, st = o`
|
|
1576
1576
|
display: flex;
|
|
1577
1577
|
align-items: center;
|
|
1578
1578
|
justify-content: space-between;
|
|
1579
|
-
gap: ${({ theme: e }) =>
|
|
1579
|
+
gap: ${({ theme: e }) => y(e).space.md};
|
|
1580
1580
|
flex-shrink: 0;
|
|
1581
|
-
`,
|
|
1581
|
+
`, ct = o`
|
|
1582
1582
|
margin: 0;
|
|
1583
1583
|
min-width: 0;
|
|
1584
1584
|
flex: 1;
|
|
1585
|
-
font-family: ${({ theme: e }) =>
|
|
1586
|
-
font-size: ${({ theme: e }) =>
|
|
1587
|
-
font-weight: ${({ theme: e }) =>
|
|
1588
|
-
color: ${({ theme: e }) =>
|
|
1589
|
-
`,
|
|
1585
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1586
|
+
font-size: ${({ theme: e }) => y(e).modal.title.fontSize};
|
|
1587
|
+
font-weight: ${({ theme: e }) => y(e).modal.title.fontWeight};
|
|
1588
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1589
|
+
`, lt = o`
|
|
1590
1590
|
flex: 1;
|
|
1591
1591
|
min-height: 0;
|
|
1592
|
-
margin-top: ${({ theme: e }) =>
|
|
1592
|
+
margin-top: ${({ theme: e }) => y(e).space.lg};
|
|
1593
1593
|
overflow-x: hidden;
|
|
1594
1594
|
overflow-y: auto;
|
|
1595
|
-
font-family: ${({ theme: e }) =>
|
|
1596
|
-
font-size: ${({ theme: e }) =>
|
|
1597
|
-
color: ${({ theme: e }) =>
|
|
1598
|
-
`,
|
|
1599
|
-
${
|
|
1600
|
-
`,
|
|
1601
|
-
${
|
|
1602
|
-
`,
|
|
1603
|
-
${
|
|
1604
|
-
`,
|
|
1605
|
-
${
|
|
1606
|
-
`,
|
|
1607
|
-
${
|
|
1608
|
-
`,
|
|
1609
|
-
${
|
|
1595
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1596
|
+
font-size: ${({ theme: e }) => y(e).modal.body.fontSize};
|
|
1597
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1598
|
+
`, ut = s.div`
|
|
1599
|
+
${it}
|
|
1600
|
+
`, dt = s.button`
|
|
1601
|
+
${at}
|
|
1602
|
+
`, ft = s.div`
|
|
1603
|
+
${ot}
|
|
1604
|
+
`, pt = s.div`
|
|
1605
|
+
${st}
|
|
1606
|
+
`, mt = s.h2`
|
|
1607
|
+
${ct}
|
|
1608
|
+
`, ht = s.div`
|
|
1609
|
+
${lt}
|
|
1610
1610
|
`;
|
|
1611
1611
|
// src/components/molecules/MModal/MModal.tsx
|
|
1612
|
-
function
|
|
1613
|
-
return /* @__PURE__ */
|
|
1612
|
+
function gt() {
|
|
1613
|
+
return /* @__PURE__ */ c("svg", {
|
|
1614
1614
|
viewBox: "0 0 24 24",
|
|
1615
|
-
children: /* @__PURE__ */
|
|
1615
|
+
children: /* @__PURE__ */ c("path", {
|
|
1616
1616
|
fill: "currentColor",
|
|
1617
1617
|
d: "M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z"
|
|
1618
1618
|
})
|
|
1619
1619
|
});
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1622
|
-
let
|
|
1623
|
-
return
|
|
1624
|
-
if (!
|
|
1621
|
+
function _t({ open: r, onClose: i, title: a, children: o, closeLabel: s = "Close" }) {
|
|
1622
|
+
let d = t(), f = n(null);
|
|
1623
|
+
return e(() => {
|
|
1624
|
+
if (!r) return;
|
|
1625
1625
|
f.current?.focus();
|
|
1626
|
-
let
|
|
1626
|
+
let e = document.body.style.overflow;
|
|
1627
1627
|
document.body.style.overflow = "hidden";
|
|
1628
|
-
let
|
|
1628
|
+
let t = (e) => {
|
|
1629
1629
|
e.key === "Escape" && i();
|
|
1630
1630
|
};
|
|
1631
|
-
return document.addEventListener("keydown",
|
|
1632
|
-
document.body.style.overflow =
|
|
1631
|
+
return document.addEventListener("keydown", t), () => {
|
|
1632
|
+
document.body.style.overflow = e, document.removeEventListener("keydown", t);
|
|
1633
1633
|
};
|
|
1634
|
-
}, [
|
|
1634
|
+
}, [r, i]), !r || typeof document > "u" ? null : u(/* @__PURE__ */ l(ut, { children: [/* @__PURE__ */ c(dt, {
|
|
1635
1635
|
type: "button",
|
|
1636
1636
|
"aria-label": "Close overlay",
|
|
1637
1637
|
onClick: i
|
|
1638
|
-
}), /* @__PURE__ */
|
|
1638
|
+
}), /* @__PURE__ */ l(ft, {
|
|
1639
1639
|
ref: f,
|
|
1640
1640
|
role: "dialog",
|
|
1641
1641
|
"aria-modal": "true",
|
|
1642
|
-
"aria-labelledby":
|
|
1642
|
+
"aria-labelledby": d,
|
|
1643
1643
|
tabIndex: -1,
|
|
1644
|
-
children: [/* @__PURE__ */
|
|
1645
|
-
id:
|
|
1644
|
+
children: [/* @__PURE__ */ l(pt, { children: [/* @__PURE__ */ c(mt, {
|
|
1645
|
+
id: d,
|
|
1646
1646
|
children: a
|
|
1647
|
-
}), /* @__PURE__ */
|
|
1647
|
+
}), /* @__PURE__ */ c(G, {
|
|
1648
1648
|
"aria-label": s,
|
|
1649
1649
|
ghost: !0,
|
|
1650
1650
|
onClick: i,
|
|
1651
1651
|
shape: "rounded",
|
|
1652
1652
|
size: "md",
|
|
1653
1653
|
variant: "primary",
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1655
|
-
})] }), o == null ? null : /* @__PURE__ */
|
|
1654
|
+
children: /* @__PURE__ */ c(gt, {})
|
|
1655
|
+
})] }), o == null ? null : /* @__PURE__ */ c(ht, { children: o })]
|
|
1656
1656
|
})] }), document.body);
|
|
1657
1657
|
}
|
|
1658
|
-
// node_modules/react-router/dist/development/chunk-6KYCQHYJ.mjs
|
|
1659
|
-
var At = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, jt = /^[\\/]{2}/;
|
|
1660
|
-
function Mt(e, t) {
|
|
1661
|
-
return t + e.replace(/\\/g, "/");
|
|
1662
|
-
}
|
|
1663
|
-
function z(e, t) {
|
|
1664
|
-
if (e === !1 || e == null) throw Error(t);
|
|
1665
|
-
}
|
|
1666
|
-
function B(e, t) {
|
|
1667
|
-
if (!e) {
|
|
1668
|
-
typeof console < "u" && console.warn(t);
|
|
1669
|
-
try {
|
|
1670
|
-
throw Error(t);
|
|
1671
|
-
} catch {}
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
function V({ pathname: e = "/", search: t = "", hash: n = "" }) {
|
|
1675
|
-
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
1676
|
-
}
|
|
1677
|
-
function H(e) {
|
|
1678
|
-
let t = {};
|
|
1679
|
-
if (e) {
|
|
1680
|
-
let n = e.indexOf("#");
|
|
1681
|
-
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
1682
|
-
let r = e.indexOf("?");
|
|
1683
|
-
r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
|
|
1684
|
-
}
|
|
1685
|
-
return t;
|
|
1686
|
-
}
|
|
1687
|
-
function Nt(e, t, n = "/") {
|
|
1688
|
-
return Pt(e, t, n, !1);
|
|
1689
|
-
}
|
|
1690
|
-
function Pt(e, t, n, r, i) {
|
|
1691
|
-
let a = W((typeof t == "string" ? H(t) : t).pathname || "/", n);
|
|
1692
|
-
if (a == null) return null;
|
|
1693
|
-
let o = i ?? Ft(e), s = null, c = Zt(a);
|
|
1694
|
-
for (let e = 0; s == null && e < o.length; ++e) s = Jt(o[e], c, r);
|
|
1695
|
-
return s;
|
|
1696
|
-
}
|
|
1697
|
-
function Ft(e) {
|
|
1698
|
-
let t = It(e);
|
|
1699
|
-
return Rt(t), t;
|
|
1700
|
-
}
|
|
1701
|
-
function It(e, t = [], n = [], r = "", i = !1) {
|
|
1702
|
-
let a = (e, a, o = i, s) => {
|
|
1703
|
-
let c = {
|
|
1704
|
-
relativePath: s === void 0 ? e.path || "" : s,
|
|
1705
|
-
caseSensitive: e.caseSensitive === !0,
|
|
1706
|
-
childrenIndex: a,
|
|
1707
|
-
route: e
|
|
1708
|
-
};
|
|
1709
|
-
if (c.relativePath.startsWith("/")) {
|
|
1710
|
-
if (!c.relativePath.startsWith(r) && o) return;
|
|
1711
|
-
z(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
|
|
1712
|
-
}
|
|
1713
|
-
let l = G([r, c.relativePath]), u = n.concat(c);
|
|
1714
|
-
e.children && e.children.length > 0 && (z(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), It(e.children, t, u, l, o)), (e.path != null || e.index) && t.push({
|
|
1715
|
-
path: l,
|
|
1716
|
-
score: Kt(l, e.index),
|
|
1717
|
-
routesMeta: u.map((e, t) => {
|
|
1718
|
-
let [n, r] = Xt(e.relativePath, e.caseSensitive, t === u.length - 1);
|
|
1719
|
-
return {
|
|
1720
|
-
...e,
|
|
1721
|
-
matcher: n,
|
|
1722
|
-
compiledParams: r
|
|
1723
|
-
};
|
|
1724
|
-
})
|
|
1725
|
-
});
|
|
1726
|
-
};
|
|
1727
|
-
return e.forEach((e, t) => {
|
|
1728
|
-
if (e.path === "" || !e.path?.includes("?")) a(e, t);
|
|
1729
|
-
else for (let n of Lt(e.path)) a(e, t, !0, n);
|
|
1730
|
-
}), t;
|
|
1731
|
-
}
|
|
1732
|
-
function Lt(e) {
|
|
1733
|
-
let t = e.split("/");
|
|
1734
|
-
if (t.length === 0) return [];
|
|
1735
|
-
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
|
|
1736
|
-
if (r.length === 0) return i ? [a, ""] : [a];
|
|
1737
|
-
let o = Lt(r.join("/")), s = [];
|
|
1738
|
-
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
|
|
1739
|
-
}
|
|
1740
|
-
function Rt(e) {
|
|
1741
|
-
e.sort((e, t) => e.score === t.score ? qt(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
|
|
1742
|
-
}
|
|
1743
|
-
var zt = /^:[\w-]+$/, Bt = 3, Vt = 2, Ht = 1, Ut = 10, Wt = -2, Gt = (e) => e === "*";
|
|
1744
|
-
function Kt(e, t) {
|
|
1745
|
-
let n = e.split("/"), r = n.length;
|
|
1746
|
-
return n.some(Gt) && (r += Wt), t && (r += Vt), n.filter((e) => !Gt(e)).reduce((e, t) => e + (zt.test(t) ? Bt : t === "" ? Ht : Ut), r);
|
|
1747
|
-
}
|
|
1748
|
-
function qt(e, t) {
|
|
1749
|
-
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
1750
|
-
}
|
|
1751
|
-
function Jt(e, t, n = !1) {
|
|
1752
|
-
let { routesMeta: r } = e, i = {}, a = "/", o = [];
|
|
1753
|
-
for (let e = 0; e < r.length; ++e) {
|
|
1754
|
-
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
|
|
1755
|
-
path: s.relativePath,
|
|
1756
|
-
caseSensitive: s.caseSensitive,
|
|
1757
|
-
end: c
|
|
1758
|
-
}, d = s.matcher && s.compiledParams ? Yt(u, l, s.matcher, s.compiledParams) : U(u, l), f = s.route;
|
|
1759
|
-
if (!d && c && n && !r[r.length - 1].route.index && (d = U({
|
|
1760
|
-
path: s.relativePath,
|
|
1761
|
-
caseSensitive: s.caseSensitive,
|
|
1762
|
-
end: !1
|
|
1763
|
-
}, l)), !d) return null;
|
|
1764
|
-
Object.assign(i, d.params), o.push({
|
|
1765
|
-
params: i,
|
|
1766
|
-
pathname: G([a, d.pathname]),
|
|
1767
|
-
pathnameBase: on(G([a, d.pathnameBase])),
|
|
1768
|
-
route: f
|
|
1769
|
-
}), d.pathnameBase !== "/" && (a = G([a, d.pathnameBase]));
|
|
1770
|
-
}
|
|
1771
|
-
return o;
|
|
1772
|
-
}
|
|
1773
|
-
function U(e, t) {
|
|
1774
|
-
typeof e == "string" && (e = {
|
|
1775
|
-
path: e,
|
|
1776
|
-
caseSensitive: !1,
|
|
1777
|
-
end: !0
|
|
1778
|
-
});
|
|
1779
|
-
let [n, r] = Xt(e.path, e.caseSensitive, e.end);
|
|
1780
|
-
return Yt(e, t, n, r);
|
|
1781
|
-
}
|
|
1782
|
-
function Yt(e, t, n, r) {
|
|
1783
|
-
let i = t.match(n);
|
|
1784
|
-
if (!i) return null;
|
|
1785
|
-
let a = i[0], o = K(a, 1), s = i.slice(1);
|
|
1786
|
-
return {
|
|
1787
|
-
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
|
|
1788
|
-
if (t === "*") {
|
|
1789
|
-
let e = s[r] || "";
|
|
1790
|
-
o = K(a.slice(0, a.length - e.length), 1);
|
|
1791
|
-
}
|
|
1792
|
-
let i = s[r];
|
|
1793
|
-
return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
|
|
1794
|
-
}, {}),
|
|
1795
|
-
pathname: a,
|
|
1796
|
-
pathnameBase: o,
|
|
1797
|
-
pattern: e
|
|
1798
|
-
};
|
|
1799
|
-
}
|
|
1800
|
-
function Xt(e, t = !1, n = !0) {
|
|
1801
|
-
B(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
1802
|
-
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
|
|
1803
|
-
if (r.push({
|
|
1804
|
-
paramName: t,
|
|
1805
|
-
isOptional: n != null
|
|
1806
|
-
}), n) {
|
|
1807
|
-
let t = a.charAt(i + e.length);
|
|
1808
|
-
return t && t !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
1809
|
-
}
|
|
1810
|
-
return "/([^\\/]+)";
|
|
1811
|
-
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
1812
|
-
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
|
|
1813
|
-
}
|
|
1814
|
-
function Zt(e) {
|
|
1815
|
-
try {
|
|
1816
|
-
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
|
|
1817
|
-
} catch (t) {
|
|
1818
|
-
return B(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
function W(e, t) {
|
|
1822
|
-
if (t === "/") return e;
|
|
1823
|
-
if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
|
|
1824
|
-
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
1825
|
-
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
1826
|
-
}
|
|
1827
|
-
function Qt(e, t = "/") {
|
|
1828
|
-
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? H(e) : e, a;
|
|
1829
|
-
return n ? (n = an(n), a = n.startsWith("/") || n.startsWith("\\") ? $t(n.substring(1), "/") : $t(n, t)) : a = t, {
|
|
1830
|
-
pathname: a,
|
|
1831
|
-
search: sn(r),
|
|
1832
|
-
hash: cn(i)
|
|
1833
|
-
};
|
|
1834
|
-
}
|
|
1835
|
-
function $t(e, t) {
|
|
1836
|
-
let n = K(t).split("/");
|
|
1837
|
-
return e.split("/").forEach((e) => {
|
|
1838
|
-
e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
|
|
1839
|
-
}), n.length > 1 ? n.join("/") : "/";
|
|
1840
|
-
}
|
|
1841
|
-
function en(e, t, n, r) {
|
|
1842
|
-
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
1843
|
-
}
|
|
1844
|
-
function tn(e) {
|
|
1845
|
-
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
|
|
1846
|
-
}
|
|
1847
|
-
function nn(e) {
|
|
1848
|
-
let t = tn(e);
|
|
1849
|
-
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
|
|
1850
|
-
}
|
|
1851
|
-
function rn(e, t, n, r = !1) {
|
|
1852
|
-
let i;
|
|
1853
|
-
typeof e == "string" ? i = H(e) : (i = { ...e }, z(!i.pathname || !i.pathname.includes("?"), en("?", "pathname", "search", i)), z(!i.pathname || !i.pathname.includes("#"), en("#", "pathname", "hash", i)), z(!i.search || !i.search.includes("#"), en("#", "search", "hash", i)));
|
|
1854
|
-
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
|
|
1855
|
-
if (o == null) s = n;
|
|
1856
|
-
else {
|
|
1857
|
-
let e = t.length - 1;
|
|
1858
|
-
if (!r && o.startsWith("..")) {
|
|
1859
|
-
let t = o.split("/");
|
|
1860
|
-
for (; t[0] === "..";) t.shift(), --e;
|
|
1861
|
-
i.pathname = t.join("/");
|
|
1862
|
-
}
|
|
1863
|
-
s = e >= 0 ? t[e] : "/";
|
|
1864
|
-
}
|
|
1865
|
-
let c = Qt(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
|
|
1866
|
-
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
|
|
1867
|
-
}
|
|
1868
|
-
var an = (e) => e.replace(/[\\/]{2,}/g, "/"), G = (e) => an(e.join("/"));
|
|
1869
|
-
function K(e, t = 0) {
|
|
1870
|
-
let n = e.length;
|
|
1871
|
-
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
|
|
1872
|
-
return n === e.length ? e : e.slice(0, n);
|
|
1873
|
-
}
|
|
1874
|
-
var on = (e) => K(e).replace(/^\/*/, "/"), sn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, cn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ln = class {
|
|
1875
|
-
constructor(e, t, n, r = !1) {
|
|
1876
|
-
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
1877
|
-
}
|
|
1878
|
-
};
|
|
1879
|
-
function un(e) {
|
|
1880
|
-
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
1881
|
-
}
|
|
1882
|
-
function dn(e) {
|
|
1883
|
-
return G(e.map((e) => e.route.path).filter(Boolean)) || "/";
|
|
1884
|
-
}
|
|
1885
|
-
var fn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
1886
|
-
function pn(e, t) {
|
|
1887
|
-
let n = e;
|
|
1888
|
-
if (typeof n != "string" || !At.test(n)) return {
|
|
1889
|
-
absoluteURL: void 0,
|
|
1890
|
-
isExternal: !1,
|
|
1891
|
-
to: n
|
|
1892
|
-
};
|
|
1893
|
-
let r = n, i = !1;
|
|
1894
|
-
if (fn) try {
|
|
1895
|
-
let e = new URL(window.location.href), r = jt.test(n) ? new URL(Mt(n, e.protocol)) : new URL(n), a = W(r.pathname, t);
|
|
1896
|
-
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
|
|
1897
|
-
} catch {
|
|
1898
|
-
B(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
|
|
1899
|
-
}
|
|
1900
|
-
return {
|
|
1901
|
-
absoluteURL: r,
|
|
1902
|
-
isExternal: i,
|
|
1903
|
-
to: n
|
|
1904
|
-
};
|
|
1905
|
-
}
|
|
1906
|
-
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1907
|
-
var mn = new URL("http://localhost");
|
|
1908
|
-
function hn(e) {
|
|
1909
|
-
if (e.createURL) return e.createURL("/");
|
|
1910
|
-
try {
|
|
1911
|
-
return new URL(e.createHref("/"), mn);
|
|
1912
|
-
} catch {
|
|
1913
|
-
return mn;
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
function gn(e, t) {
|
|
1917
|
-
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
|
|
1918
|
-
}
|
|
1919
|
-
function _n(e, t) {
|
|
1920
|
-
if (e.startsWith("//")) return !0;
|
|
1921
|
-
let n = t.protocol.toLowerCase();
|
|
1922
|
-
return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
|
|
1923
|
-
}
|
|
1924
|
-
function vn(e, t, n, r) {
|
|
1925
|
-
let i = null;
|
|
1926
|
-
try {
|
|
1927
|
-
i = e == null ? null : new URL(e, n);
|
|
1928
|
-
} catch {}
|
|
1929
|
-
let a = new URL(t, n), o = i != null && !gn(i, n), s = !gn(a, n);
|
|
1930
|
-
if (r === "reject") {
|
|
1931
|
-
if (o || s) throw Error("External navigation is not allowed");
|
|
1932
|
-
} else if (s && (i == null || !_n(e, i) || !gn(i, a))) throw Error("External navigation is not allowed");
|
|
1933
|
-
}
|
|
1934
|
-
var yn = [
|
|
1935
|
-
"POST",
|
|
1936
|
-
"PUT",
|
|
1937
|
-
"PATCH",
|
|
1938
|
-
"DELETE"
|
|
1939
|
-
];
|
|
1940
|
-
new Set(yn);
|
|
1941
|
-
var bn = ["GET", ...yn];
|
|
1942
|
-
new Set(bn);
|
|
1943
|
-
var xn = [
|
|
1944
|
-
"about:",
|
|
1945
|
-
"blob:",
|
|
1946
|
-
"chrome:",
|
|
1947
|
-
"chrome-untrusted:",
|
|
1948
|
-
"content:",
|
|
1949
|
-
"data:",
|
|
1950
|
-
"devtools:",
|
|
1951
|
-
"file:",
|
|
1952
|
-
"filesystem:",
|
|
1953
|
-
"javascript:"
|
|
1954
|
-
];
|
|
1955
|
-
function Sn(e) {
|
|
1956
|
-
try {
|
|
1957
|
-
return xn.includes(new URL(e).protocol);
|
|
1958
|
-
} catch {
|
|
1959
|
-
return !1;
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
var q = e.createContext(null);
|
|
1963
|
-
q.displayName = "DataRouter";
|
|
1964
|
-
var Cn = e.createContext(null);
|
|
1965
|
-
Cn.displayName = "DataRouterState";
|
|
1966
|
-
var wn = e.createContext(!1);
|
|
1967
|
-
function Tn() {
|
|
1968
|
-
return e.useContext(wn);
|
|
1969
|
-
}
|
|
1970
|
-
var En = e.createContext({ isTransitioning: !1 });
|
|
1971
|
-
En.displayName = "ViewTransition";
|
|
1972
|
-
var Dn = e.createContext(/* @__PURE__ */ new Map());
|
|
1973
|
-
Dn.displayName = "Fetchers";
|
|
1974
|
-
var On = e.createContext(null);
|
|
1975
|
-
On.displayName = "Await";
|
|
1976
|
-
var J = e.createContext(null);
|
|
1977
|
-
J.displayName = "Navigation";
|
|
1978
|
-
var kn = e.createContext(null);
|
|
1979
|
-
kn.displayName = "Location";
|
|
1980
|
-
var Y = e.createContext({
|
|
1981
|
-
outlet: null,
|
|
1982
|
-
matches: [],
|
|
1983
|
-
isDataRoute: !1
|
|
1984
|
-
});
|
|
1985
|
-
Y.displayName = "Route";
|
|
1986
|
-
var An = e.createContext(null);
|
|
1987
|
-
An.displayName = "RouteError";
|
|
1988
|
-
var jn = "REACT_ROUTER_ERROR", Mn = "REDIRECT", Nn = "ROUTE_ERROR_RESPONSE";
|
|
1989
|
-
function Pn(e) {
|
|
1990
|
-
if (e.startsWith(`${jn}:${Mn}:{`)) try {
|
|
1991
|
-
let t = JSON.parse(e.slice(28));
|
|
1992
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
1993
|
-
} catch {}
|
|
1994
|
-
}
|
|
1995
|
-
function Fn(e) {
|
|
1996
|
-
if (e.startsWith(`${jn}:${Nn}:{`)) try {
|
|
1997
|
-
let t = JSON.parse(e.slice(40));
|
|
1998
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new ln(t.status, t.statusText, t.data);
|
|
1999
|
-
} catch {}
|
|
2000
|
-
}
|
|
2001
|
-
function In(t, { relative: n } = {}) {
|
|
2002
|
-
z(Ln(), "useHref() may be used only in the context of a <Router> component.");
|
|
2003
|
-
let { basename: r, navigator: i } = e.useContext(J), { hash: a, pathname: o, search: s } = Z(t, { relative: n }), c = o;
|
|
2004
|
-
return r !== "/" && (c = o === "/" ? r : G([r, o])), i.createHref({
|
|
2005
|
-
pathname: c,
|
|
2006
|
-
search: s,
|
|
2007
|
-
hash: a
|
|
2008
|
-
});
|
|
2009
|
-
}
|
|
2010
|
-
function Ln() {
|
|
2011
|
-
return e.useContext(kn) != null;
|
|
2012
|
-
}
|
|
2013
|
-
function X() {
|
|
2014
|
-
return z(Ln(), "useLocation() may be used only in the context of a <Router> component."), e.useContext(kn).location;
|
|
2015
|
-
}
|
|
2016
|
-
var Rn = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
2017
|
-
function zn(t) {
|
|
2018
|
-
e.useContext(J).static || e.useLayoutEffect(t);
|
|
2019
|
-
}
|
|
2020
|
-
function Bn() {
|
|
2021
|
-
let { isDataRoute: t } = e.useContext(Y);
|
|
2022
|
-
return t ? rr() : Vn();
|
|
2023
|
-
}
|
|
2024
|
-
function Vn() {
|
|
2025
|
-
z(Ln(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
2026
|
-
let t = e.useContext(q), { basename: n, navigator: r } = e.useContext(J), { matches: i } = e.useContext(Y), { pathname: a } = X(), o = JSON.stringify(nn(i)), s = e.useRef(!1);
|
|
2027
|
-
return zn(() => {
|
|
2028
|
-
s.current = !0;
|
|
2029
|
-
}), e.useCallback((e, i = {}) => {
|
|
2030
|
-
if (B(s.current, Rn), !s.current) return;
|
|
2031
|
-
if (typeof e == "number") {
|
|
2032
|
-
r.go(e);
|
|
2033
|
-
return;
|
|
2034
|
-
}
|
|
2035
|
-
let c = rn(e, JSON.parse(o), a, i.relative === "path");
|
|
2036
|
-
t == null && n !== "/" && (c.pathname = c.pathname === "/" ? n : G([n, c.pathname])), vn(typeof e == "string" ? e : V(e), r.createHref(c), hn(r), "reject"), (i.replace ? r.replace : r.push)(c, i.state, i);
|
|
2037
|
-
}, [
|
|
2038
|
-
n,
|
|
2039
|
-
r,
|
|
2040
|
-
o,
|
|
2041
|
-
a,
|
|
2042
|
-
t
|
|
2043
|
-
]);
|
|
2044
|
-
}
|
|
2045
|
-
e.createContext(null);
|
|
2046
|
-
function Z(t, { relative: n } = {}) {
|
|
2047
|
-
let { matches: r } = e.useContext(Y), { pathname: i } = X(), a = JSON.stringify(nn(r));
|
|
2048
|
-
return e.useMemo(() => rn(t, JSON.parse(a), i, n === "path"), [
|
|
2049
|
-
t,
|
|
2050
|
-
a,
|
|
2051
|
-
i,
|
|
2052
|
-
n
|
|
2053
|
-
]);
|
|
2054
|
-
}
|
|
2055
|
-
function Hn(t, n, r) {
|
|
2056
|
-
z(Ln(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
2057
|
-
let { navigator: i } = e.useContext(J), { matches: a } = e.useContext(Y), o = a[a.length - 1], s = o ? o.params : {}, c = o ? o.pathname : "/", l = o ? o.pathnameBase : "/", u = o && o.route;
|
|
2058
|
-
{
|
|
2059
|
-
let e = u && u.path || "";
|
|
2060
|
-
ar(c, !u || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2061
|
-
|
|
2062
|
-
Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
|
|
2063
|
-
}
|
|
2064
|
-
let d = X(), f;
|
|
2065
|
-
if (n) {
|
|
2066
|
-
let e = typeof n == "string" ? H(n) : n;
|
|
2067
|
-
z(l === "/" || e.pathname?.startsWith(l), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`), f = e;
|
|
2068
|
-
} else f = d;
|
|
2069
|
-
let p = f.pathname || "/", m = p;
|
|
2070
|
-
if (l !== "/") {
|
|
2071
|
-
let e = l.replace(/^\//, "").split("/");
|
|
2072
|
-
m = "/" + p.replace(/^\//, "").split("/").slice(e.length).join("/");
|
|
2073
|
-
}
|
|
2074
|
-
let h = r && r.state.matches.length ? r.state.matches.map((e) => Object.assign(e, { route: r.manifest[e.route.id] || e.route })) : Nt(t, { pathname: m });
|
|
2075
|
-
B(u || h != null, `No routes matched location "${f.pathname}${f.search}${f.hash}" `), B(h == null || h[h.length - 1].route.element !== void 0 || h[h.length - 1].route.Component !== void 0 || h[h.length - 1].route.lazy !== void 0, `Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
2076
|
-
let g = Yn(h && h.map((e) => Object.assign({}, e, {
|
|
2077
|
-
params: Object.assign({}, s, e.params),
|
|
2078
|
-
pathname: G([l, i.encodeLocation ? i.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
|
|
2079
|
-
pathnameBase: e.pathnameBase === "/" ? l : G([l, i.encodeLocation ? i.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
|
|
2080
|
-
})), a, r);
|
|
2081
|
-
return n && g ? /* @__PURE__ */ e.createElement(kn.Provider, { value: {
|
|
2082
|
-
location: {
|
|
2083
|
-
pathname: "/",
|
|
2084
|
-
search: "",
|
|
2085
|
-
hash: "",
|
|
2086
|
-
state: null,
|
|
2087
|
-
key: "default",
|
|
2088
|
-
mask: void 0,
|
|
2089
|
-
...f
|
|
2090
|
-
},
|
|
2091
|
-
navigationType: "POP"
|
|
2092
|
-
} }, g) : g;
|
|
2093
|
-
}
|
|
2094
|
-
function Un() {
|
|
2095
|
-
let t = nr(), n = un(t) ? `${t.status} ${t.statusText}` : t instanceof Error ? t.message : JSON.stringify(t), r = t instanceof Error ? t.stack : null, i = "rgba(200,200,200, 0.5)", a = {
|
|
2096
|
-
padding: "0.5rem",
|
|
2097
|
-
backgroundColor: i
|
|
2098
|
-
}, o = {
|
|
2099
|
-
padding: "2px 4px",
|
|
2100
|
-
backgroundColor: i
|
|
2101
|
-
}, s = null;
|
|
2102
|
-
return console.error("Error handled by React Router default ErrorBoundary:", t), s = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ e.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ e.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ e.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ e.createElement("h3", { style: { fontStyle: "italic" } }, n), r ? /* @__PURE__ */ e.createElement("pre", { style: a }, r) : null, s);
|
|
2103
|
-
}
|
|
2104
|
-
var Wn = /* @__PURE__ */ e.createElement(Un, null), Gn = class extends e.Component {
|
|
2105
|
-
constructor(e) {
|
|
2106
|
-
super(e), this.state = {
|
|
2107
|
-
location: e.location,
|
|
2108
|
-
revalidation: e.revalidation,
|
|
2109
|
-
error: e.error
|
|
2110
|
-
};
|
|
2111
|
-
}
|
|
2112
|
-
static getDerivedStateFromError(e) {
|
|
2113
|
-
return { error: e };
|
|
2114
|
-
}
|
|
2115
|
-
static getDerivedStateFromProps(e, t) {
|
|
2116
|
-
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
2117
|
-
error: e.error,
|
|
2118
|
-
location: e.location,
|
|
2119
|
-
revalidation: e.revalidation
|
|
2120
|
-
} : {
|
|
2121
|
-
error: e.error === void 0 ? t.error : e.error,
|
|
2122
|
-
location: t.location,
|
|
2123
|
-
revalidation: e.revalidation || t.revalidation
|
|
2124
|
-
};
|
|
2125
|
-
}
|
|
2126
|
-
componentDidCatch(e, t) {
|
|
2127
|
-
this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
|
|
2128
|
-
}
|
|
2129
|
-
render() {
|
|
2130
|
-
let t = this.state.error;
|
|
2131
|
-
if (this.context && typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
2132
|
-
let e = Fn(t.digest);
|
|
2133
|
-
e && (t = e);
|
|
2134
|
-
}
|
|
2135
|
-
let n = t === void 0 ? this.props.children : /* @__PURE__ */ e.createElement(Y.Provider, { value: this.props.routeContext }, /* @__PURE__ */ e.createElement(An.Provider, {
|
|
2136
|
-
value: t,
|
|
2137
|
-
children: this.props.component
|
|
2138
|
-
}));
|
|
2139
|
-
return this.context ? /* @__PURE__ */ e.createElement(qn, { error: t }, n) : n;
|
|
2140
|
-
}
|
|
2141
|
-
};
|
|
2142
|
-
Gn.contextType = wn;
|
|
2143
|
-
var Kn = /* @__PURE__ */ new WeakMap();
|
|
2144
|
-
function qn({ children: t, error: n }) {
|
|
2145
|
-
let { basename: r, navigator: i } = e.useContext(J);
|
|
2146
|
-
if (typeof n == "object" && n && "digest" in n && typeof n.digest == "string") {
|
|
2147
|
-
let t = Pn(n.digest);
|
|
2148
|
-
if (t) {
|
|
2149
|
-
let a = Kn.get(n);
|
|
2150
|
-
if (a) throw a;
|
|
2151
|
-
let o = pn(t.location, r), s = o.absoluteURL || o.to;
|
|
2152
|
-
if (vn(t.location, s, hn(i), "allow-explicit"), Sn(s)) throw Error("Invalid redirect location");
|
|
2153
|
-
if (fn && !Kn.get(n)) {
|
|
2154
|
-
if (o.isExternal || t.reloadDocument) window.location.href = s;
|
|
2155
|
-
else {
|
|
2156
|
-
let e = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(o.to, { replace: t.replace }));
|
|
2157
|
-
throw Kn.set(n, e), e;
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
return /* @__PURE__ */ e.createElement("meta", {
|
|
2161
|
-
httpEquiv: "refresh",
|
|
2162
|
-
content: `0;url=${s}`
|
|
2163
|
-
});
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
return t;
|
|
2167
|
-
}
|
|
2168
|
-
function Jn({ routeContext: t, match: n, children: r }) {
|
|
2169
|
-
let i = e.useContext(q);
|
|
2170
|
-
return i && i.static && i.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ e.createElement(Y.Provider, { value: t }, r);
|
|
2171
|
-
}
|
|
2172
|
-
function Yn(t, n = [], r) {
|
|
2173
|
-
let i = r?.state;
|
|
2174
|
-
if (t == null) {
|
|
2175
|
-
if (!i) return null;
|
|
2176
|
-
if (i.errors) t = i.matches;
|
|
2177
|
-
else if (n.length === 0 && !i.initialized && i.matches.length > 0) t = i.matches;
|
|
2178
|
-
else return null;
|
|
2179
|
-
}
|
|
2180
|
-
let a = t, o = i?.errors;
|
|
2181
|
-
if (o != null) {
|
|
2182
|
-
let e = a.findIndex((e) => e.route.id && o?.[e.route.id] !== void 0);
|
|
2183
|
-
z(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`), a = a.slice(0, Math.min(a.length, e + 1));
|
|
2184
|
-
}
|
|
2185
|
-
let s = !1, c = -1;
|
|
2186
|
-
if (r && i) {
|
|
2187
|
-
s = i.renderFallback;
|
|
2188
|
-
for (let e = 0; e < a.length; e++) {
|
|
2189
|
-
let t = a[e];
|
|
2190
|
-
if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (c = e), t.route.id) {
|
|
2191
|
-
let { loaderData: e, errors: n } = i, o = t.route.loader && !e.hasOwnProperty(t.route.id) && (!n || n[t.route.id] === void 0);
|
|
2192
|
-
if (t.route.lazy || o) {
|
|
2193
|
-
r.isStatic && (s = !0), a = c >= 0 ? a.slice(0, c + 1) : [a[0]];
|
|
2194
|
-
break;
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
let l = r?.onError, u = i && l ? (e, t) => {
|
|
2200
|
-
l(e, {
|
|
2201
|
-
location: i.location,
|
|
2202
|
-
params: i.matches?.[0]?.params ?? {},
|
|
2203
|
-
pattern: dn(i.matches),
|
|
2204
|
-
errorInfo: t
|
|
2205
|
-
});
|
|
2206
|
-
} : void 0;
|
|
2207
|
-
return a.reduceRight((t, r, l) => {
|
|
2208
|
-
let d, f = !1, p = null, m = null;
|
|
2209
|
-
i && (d = o && r.route.id ? o[r.route.id] : void 0, p = r.route.errorElement || Wn, s && (c < 0 && l === 0 ? (ar("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), f = !0, m = null) : c === l && (f = !0, m = r.route.hydrateFallbackElement || null)));
|
|
2210
|
-
let h = n.concat(a.slice(0, l + 1)), g = () => {
|
|
2211
|
-
let n;
|
|
2212
|
-
return n = d ? p : f ? m : r.route.Component ? /* @__PURE__ */ e.createElement(r.route.Component, null) : r.route.element ? r.route.element : t, /* @__PURE__ */ e.createElement(Jn, {
|
|
2213
|
-
match: r,
|
|
2214
|
-
routeContext: {
|
|
2215
|
-
outlet: t,
|
|
2216
|
-
matches: h,
|
|
2217
|
-
isDataRoute: i != null
|
|
2218
|
-
},
|
|
2219
|
-
children: n
|
|
2220
|
-
});
|
|
2221
|
-
};
|
|
2222
|
-
return i && (r.route.ErrorBoundary || r.route.errorElement || l === 0) ? /* @__PURE__ */ e.createElement(Gn, {
|
|
2223
|
-
location: i.location,
|
|
2224
|
-
revalidation: i.revalidation,
|
|
2225
|
-
component: p,
|
|
2226
|
-
error: d,
|
|
2227
|
-
children: g(),
|
|
2228
|
-
routeContext: {
|
|
2229
|
-
outlet: null,
|
|
2230
|
-
matches: h,
|
|
2231
|
-
isDataRoute: !0
|
|
2232
|
-
},
|
|
2233
|
-
onError: u
|
|
2234
|
-
}) : g();
|
|
2235
|
-
}, null);
|
|
2236
|
-
}
|
|
2237
|
-
function Xn(e) {
|
|
2238
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
2239
|
-
}
|
|
2240
|
-
function Zn(t) {
|
|
2241
|
-
let n = e.useContext(q);
|
|
2242
|
-
return z(n, Xn(t)), n;
|
|
2243
|
-
}
|
|
2244
|
-
function Qn(t) {
|
|
2245
|
-
let n = e.useContext(Cn);
|
|
2246
|
-
return z(n, Xn(t)), n;
|
|
2247
|
-
}
|
|
2248
|
-
function $n(t) {
|
|
2249
|
-
let n = e.useContext(Y);
|
|
2250
|
-
return z(n, Xn(t)), n;
|
|
2251
|
-
}
|
|
2252
|
-
function er(e) {
|
|
2253
|
-
let t = $n(e), n = t.matches[t.matches.length - 1];
|
|
2254
|
-
return z(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
|
|
2255
|
-
}
|
|
2256
|
-
function tr() {
|
|
2257
|
-
return er("useRouteId");
|
|
2258
|
-
}
|
|
2259
|
-
function nr() {
|
|
2260
|
-
let t = e.useContext(An), n = Qn("useRouteError"), r = er("useRouteError");
|
|
2261
|
-
return t === void 0 ? n.errors?.[r] : t;
|
|
2262
|
-
}
|
|
2263
|
-
function rr() {
|
|
2264
|
-
let { router: t } = Zn("useNavigate"), n = er("useNavigate"), r = e.useRef(!1);
|
|
2265
|
-
return zn(() => {
|
|
2266
|
-
r.current = !0;
|
|
2267
|
-
}), e.useCallback(async (e, i = {}) => {
|
|
2268
|
-
B(r.current, Rn), r.current && (typeof e == "number" ? await t.navigate(e) : await t.navigate(e, {
|
|
2269
|
-
fromRouteId: n,
|
|
2270
|
-
...i
|
|
2271
|
-
}));
|
|
2272
|
-
}, [t, n]);
|
|
2273
|
-
}
|
|
2274
|
-
var ir = {};
|
|
2275
|
-
function ar(e, t, n) {
|
|
2276
|
-
!t && !ir[e] && (ir[e] = !0, B(!1, n));
|
|
2277
|
-
}
|
|
2278
|
-
e.memo(or);
|
|
2279
|
-
function or({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError: a }) {
|
|
2280
|
-
return Hn(e, void 0, {
|
|
2281
|
-
manifest: t,
|
|
2282
|
-
state: r,
|
|
2283
|
-
isStatic: i,
|
|
2284
|
-
onError: a,
|
|
2285
|
-
future: n
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
|
-
e.Component;
|
|
2289
|
-
var sr = "get", cr = "application/x-www-form-urlencoded";
|
|
2290
|
-
function lr(e) {
|
|
2291
|
-
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
2292
|
-
}
|
|
2293
|
-
function ur(e) {
|
|
2294
|
-
return lr(e) && e.tagName.toLowerCase() === "button";
|
|
2295
|
-
}
|
|
2296
|
-
function dr(e) {
|
|
2297
|
-
return lr(e) && e.tagName.toLowerCase() === "form";
|
|
2298
|
-
}
|
|
2299
|
-
function fr(e) {
|
|
2300
|
-
return lr(e) && e.tagName.toLowerCase() === "input";
|
|
2301
|
-
}
|
|
2302
|
-
function pr(e) {
|
|
2303
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
2304
|
-
}
|
|
2305
|
-
function mr(e, t) {
|
|
2306
|
-
return e.button === 0 && (!t || t === "_self") && !pr(e);
|
|
2307
|
-
}
|
|
2308
|
-
var hr = null;
|
|
2309
|
-
function gr() {
|
|
2310
|
-
if (hr === null) try {
|
|
2311
|
-
new FormData(document.createElement("form"), 0), hr = !1;
|
|
2312
|
-
} catch {
|
|
2313
|
-
hr = !0;
|
|
2314
|
-
}
|
|
2315
|
-
return hr;
|
|
2316
|
-
}
|
|
2317
|
-
var _r = /* @__PURE__ */ new Set([
|
|
2318
|
-
"application/x-www-form-urlencoded",
|
|
2319
|
-
"multipart/form-data",
|
|
2320
|
-
"text/plain"
|
|
2321
|
-
]);
|
|
2322
|
-
function vr(e) {
|
|
2323
|
-
return e != null && !_r.has(e) ? (B(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cr}"`), null) : e;
|
|
2324
|
-
}
|
|
2325
|
-
function yr(e, t) {
|
|
2326
|
-
let n, r, i, a, o;
|
|
2327
|
-
if (dr(e)) {
|
|
2328
|
-
let o = e.getAttribute("action");
|
|
2329
|
-
r = o ? W(o, t) : null, n = e.getAttribute("method") || sr, i = vr(e.getAttribute("enctype")) || cr, a = new FormData(e);
|
|
2330
|
-
} else if (ur(e) || fr(e) && (e.type === "submit" || e.type === "image")) {
|
|
2331
|
-
let o = e.form;
|
|
2332
|
-
if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
2333
|
-
let s = e.getAttribute("formaction") || o.getAttribute("action");
|
|
2334
|
-
if (r = s ? W(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || sr, i = vr(e.getAttribute("formenctype")) || vr(o.getAttribute("enctype")) || cr, a = new FormData(o, e), !gr()) {
|
|
2335
|
-
let { name: t, type: n, value: r } = e;
|
|
2336
|
-
if (n === "image") {
|
|
2337
|
-
let e = t ? `${t}.` : "";
|
|
2338
|
-
a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
|
|
2339
|
-
} else t && a.append(t, r);
|
|
2340
|
-
}
|
|
2341
|
-
} else if (lr(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
|
|
2342
|
-
else n = sr, r = null, i = cr, o = e;
|
|
2343
|
-
return a && i === "text/plain" && (o = a, a = void 0), {
|
|
2344
|
-
action: r,
|
|
2345
|
-
method: n.toLowerCase(),
|
|
2346
|
-
encType: i,
|
|
2347
|
-
formData: a,
|
|
2348
|
-
body: o
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
2352
|
-
function br(e, t) {
|
|
2353
|
-
if (e === !1 || e == null) throw Error(t);
|
|
2354
|
-
}
|
|
2355
|
-
function xr(e, t, n, r) {
|
|
2356
|
-
let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
2357
|
-
return i.pathname = n ? i.pathname.endsWith("/") ? `${i.pathname}_.${r}` : `${i.pathname}.${r}` : i.pathname === "/" ? `_root.${r}` : t && W(i.pathname, t) === "/" ? `${K(t)}/_root.${r}` : `${K(i.pathname)}.${r}`, i;
|
|
2358
|
-
}
|
|
2359
|
-
async function Sr(e, t) {
|
|
2360
|
-
if (e.id in t) return t[e.id];
|
|
2361
|
-
try {
|
|
2362
|
-
let n = await import(
|
|
2363
|
-
/* @vite-ignore */
|
|
2364
|
-
/* webpackIgnore: true */
|
|
2365
|
-
e.module
|
|
2366
|
-
);
|
|
2367
|
-
return t[e.id] = n, n;
|
|
2368
|
-
} catch (t) {
|
|
2369
|
-
return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
|
|
2370
|
-
}
|
|
2371
|
-
}
|
|
2372
|
-
function Cr(e) {
|
|
2373
|
-
return e != null && typeof e.page == "string";
|
|
2374
|
-
}
|
|
2375
|
-
function wr(e) {
|
|
2376
|
-
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
2377
|
-
}
|
|
2378
|
-
async function Tr(e, t, n) {
|
|
2379
|
-
return Ar((await Promise.all(e.map(async (e) => {
|
|
2380
|
-
let r = t.routes[e.route.id];
|
|
2381
|
-
if (r) {
|
|
2382
|
-
let e = await Sr(r, n);
|
|
2383
|
-
return e.links ? e.links() : [];
|
|
2384
|
-
}
|
|
2385
|
-
return [];
|
|
2386
|
-
}))).flat(1).filter(wr).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
|
|
2387
|
-
...e,
|
|
2388
|
-
rel: "prefetch",
|
|
2389
|
-
as: "style"
|
|
2390
|
-
} : {
|
|
2391
|
-
...e,
|
|
2392
|
-
rel: "prefetch"
|
|
2393
|
-
}));
|
|
2394
|
-
}
|
|
2395
|
-
function Er(e, t, n, r, i, a) {
|
|
2396
|
-
let o = (e, t) => !n[t] || e.route.id !== n[t].route.id, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
|
|
2397
|
-
return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
|
|
2398
|
-
let c = r.routes[t.route.id];
|
|
2399
|
-
if (!c || !c.hasLoader) return !1;
|
|
2400
|
-
if (o(t, a) || s(t, a)) return !0;
|
|
2401
|
-
if (t.route.shouldRevalidate) {
|
|
2402
|
-
let r = t.route.shouldRevalidate({
|
|
2403
|
-
currentUrl: new URL(i.pathname + i.search + i.hash, window.origin),
|
|
2404
|
-
currentParams: n[0]?.params || {},
|
|
2405
|
-
nextUrl: new URL(e, window.origin),
|
|
2406
|
-
nextParams: t.params,
|
|
2407
|
-
defaultShouldRevalidate: !0
|
|
2408
|
-
});
|
|
2409
|
-
if (typeof r == "boolean") return r;
|
|
2410
|
-
}
|
|
2411
|
-
return !0;
|
|
2412
|
-
}) : [];
|
|
2413
|
-
}
|
|
2414
|
-
function Dr(e, t, { includeHydrateFallback: n } = {}) {
|
|
2415
|
-
return Or(e.map((e) => {
|
|
2416
|
-
let r = t.routes[e.route.id];
|
|
2417
|
-
if (!r) return [];
|
|
2418
|
-
let i = [r.module];
|
|
2419
|
-
return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
|
|
2420
|
-
}).flat(1));
|
|
2421
|
-
}
|
|
2422
|
-
function Or(e) {
|
|
2423
|
-
return [...new Set(e)];
|
|
2424
|
-
}
|
|
2425
|
-
function kr(e) {
|
|
2426
|
-
let t = {}, n = Object.keys(e).sort();
|
|
2427
|
-
for (let r of n) t[r] = e[r];
|
|
2428
|
-
return t;
|
|
2429
|
-
}
|
|
2430
|
-
function Ar(e, t) {
|
|
2431
|
-
let n = /* @__PURE__ */ new Set(), r = new Set(t);
|
|
2432
|
-
return e.reduce((e, i) => {
|
|
2433
|
-
if (t && !Cr(i) && i.as === "script" && i.href && r.has(i.href)) return e;
|
|
2434
|
-
let a = JSON.stringify(kr(i));
|
|
2435
|
-
return n.has(a) || (n.add(a), e.push({
|
|
2436
|
-
key: a,
|
|
2437
|
-
link: i
|
|
2438
|
-
})), e;
|
|
2439
|
-
}, []);
|
|
2440
|
-
}
|
|
2441
|
-
function jr() {
|
|
2442
|
-
let t = e.useContext(q);
|
|
2443
|
-
return br(t, "You must render this element inside a <DataRouterContext.Provider> element"), t;
|
|
2444
|
-
}
|
|
2445
|
-
function Mr() {
|
|
2446
|
-
let t = e.useContext(Cn);
|
|
2447
|
-
return br(t, "You must render this element inside a <DataRouterStateContext.Provider> element"), t;
|
|
2448
|
-
}
|
|
2449
|
-
var Nr = e.createContext(void 0);
|
|
2450
|
-
Nr.displayName = "FrameworkContext";
|
|
2451
|
-
function Q() {
|
|
2452
|
-
let t = e.useContext(Nr);
|
|
2453
|
-
return br(t, "You must render this element inside a <HydratedRouter> element"), t;
|
|
2454
|
-
}
|
|
2455
|
-
function Pr(t, n) {
|
|
2456
|
-
let r = e.useContext(Nr), [i, a] = e.useState(!1), [o, s] = e.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: d, onTouchStart: f } = n, p = e.useRef(null);
|
|
2457
|
-
e.useEffect(() => {
|
|
2458
|
-
if (t === "render" && s(!0), t === "viewport") {
|
|
2459
|
-
let e = new IntersectionObserver((e) => {
|
|
2460
|
-
e.forEach((e) => {
|
|
2461
|
-
s(e.isIntersecting);
|
|
2462
|
-
});
|
|
2463
|
-
}, { threshold: .5 });
|
|
2464
|
-
return p.current && e.observe(p.current), () => {
|
|
2465
|
-
e.disconnect();
|
|
2466
|
-
};
|
|
2467
|
-
}
|
|
2468
|
-
}, [t]), e.useEffect(() => {
|
|
2469
|
-
if (i) {
|
|
2470
|
-
let e = setTimeout(() => {
|
|
2471
|
-
s(!0);
|
|
2472
|
-
}, 100);
|
|
2473
|
-
return () => {
|
|
2474
|
-
clearTimeout(e);
|
|
2475
|
-
};
|
|
2476
|
-
}
|
|
2477
|
-
}, [i]);
|
|
2478
|
-
let m = () => {
|
|
2479
|
-
a(!0);
|
|
2480
|
-
}, h = () => {
|
|
2481
|
-
a(!1), s(!1);
|
|
2482
|
-
};
|
|
2483
|
-
return r ? t === "intent" ? [
|
|
2484
|
-
o,
|
|
2485
|
-
p,
|
|
2486
|
-
{
|
|
2487
|
-
onFocus: $(c, m),
|
|
2488
|
-
onBlur: $(l, h),
|
|
2489
|
-
onMouseEnter: $(u, m),
|
|
2490
|
-
onMouseLeave: $(d, h),
|
|
2491
|
-
onTouchStart: $(f, m)
|
|
2492
|
-
}
|
|
2493
|
-
] : [
|
|
2494
|
-
o,
|
|
2495
|
-
p,
|
|
2496
|
-
{}
|
|
2497
|
-
] : [
|
|
2498
|
-
!1,
|
|
2499
|
-
p,
|
|
2500
|
-
{}
|
|
2501
|
-
];
|
|
2502
|
-
}
|
|
2503
|
-
function $(e, t) {
|
|
2504
|
-
return (n) => {
|
|
2505
|
-
e && e(n), n.defaultPrevented || t(n);
|
|
2506
|
-
};
|
|
2507
|
-
}
|
|
2508
|
-
function Fr({ page: t, ...n }) {
|
|
2509
|
-
let r = Tn(), { nonce: i } = Q(), { router: a } = jr(), o = e.useMemo(() => Nt(a.routes, t, a.basename), [
|
|
2510
|
-
a.routes,
|
|
2511
|
-
t,
|
|
2512
|
-
a.basename
|
|
2513
|
-
]);
|
|
2514
|
-
return o ? (n.nonce == null && i && (n = {
|
|
2515
|
-
...n,
|
|
2516
|
-
nonce: i
|
|
2517
|
-
}), r ? /* @__PURE__ */ e.createElement(Lr, {
|
|
2518
|
-
page: t,
|
|
2519
|
-
matches: o,
|
|
2520
|
-
...n
|
|
2521
|
-
}) : /* @__PURE__ */ e.createElement(Rr, {
|
|
2522
|
-
page: t,
|
|
2523
|
-
matches: o,
|
|
2524
|
-
...n
|
|
2525
|
-
})) : null;
|
|
2526
|
-
}
|
|
2527
|
-
function Ir(t) {
|
|
2528
|
-
let { manifest: n, routeModules: r } = Q(), [i, a] = e.useState([]);
|
|
2529
|
-
return e.useEffect(() => {
|
|
2530
|
-
let e = !1;
|
|
2531
|
-
return Tr(t, n, r).then((t) => {
|
|
2532
|
-
e || a(t);
|
|
2533
|
-
}), () => {
|
|
2534
|
-
e = !0;
|
|
2535
|
-
};
|
|
2536
|
-
}, [
|
|
2537
|
-
t,
|
|
2538
|
-
n,
|
|
2539
|
-
r
|
|
2540
|
-
]), i;
|
|
2541
|
-
}
|
|
2542
|
-
function Lr({ page: t, matches: n, ...r }) {
|
|
2543
|
-
let i = X(), { future: a } = Q(), { basename: o } = jr(), s = e.useMemo(() => {
|
|
2544
|
-
if (t === i.pathname + i.search + i.hash) return [];
|
|
2545
|
-
let e = xr(t, o, a.v8_trailingSlashAwareDataRequests, "rsc"), r = !1, s = [];
|
|
2546
|
-
for (let e of n) typeof e.route.shouldRevalidate == "function" ? r = !0 : s.push(e.route.id);
|
|
2547
|
-
return r && s.length > 0 && e.searchParams.set("_routes", s.join(",")), [e.pathname + e.search];
|
|
2548
|
-
}, [
|
|
2549
|
-
o,
|
|
2550
|
-
a.v8_trailingSlashAwareDataRequests,
|
|
2551
|
-
t,
|
|
2552
|
-
i,
|
|
2553
|
-
n
|
|
2554
|
-
]);
|
|
2555
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, s.map((t) => /* @__PURE__ */ e.createElement("link", {
|
|
2556
|
-
key: t,
|
|
2557
|
-
rel: "prefetch",
|
|
2558
|
-
as: "fetch",
|
|
2559
|
-
href: t,
|
|
2560
|
-
...r
|
|
2561
|
-
})));
|
|
2562
|
-
}
|
|
2563
|
-
function Rr({ page: t, matches: n, ...r }) {
|
|
2564
|
-
let i = X(), { future: a, manifest: o, routeModules: s } = Q(), { basename: c } = jr(), { loaderData: l, matches: u } = Mr(), d = e.useMemo(() => Er(t, n, u, o, i, "data"), [
|
|
2565
|
-
t,
|
|
2566
|
-
n,
|
|
2567
|
-
u,
|
|
2568
|
-
o,
|
|
2569
|
-
i
|
|
2570
|
-
]), f = e.useMemo(() => Er(t, n, u, o, i, "assets"), [
|
|
2571
|
-
t,
|
|
2572
|
-
n,
|
|
2573
|
-
u,
|
|
2574
|
-
o,
|
|
2575
|
-
i
|
|
2576
|
-
]), p = e.useMemo(() => {
|
|
2577
|
-
if (t === i.pathname + i.search + i.hash) return [];
|
|
2578
|
-
let e = /* @__PURE__ */ new Set(), r = !1;
|
|
2579
|
-
if (n.forEach((t) => {
|
|
2580
|
-
let n = o.routes[t.route.id];
|
|
2581
|
-
n && n.hasLoader && (!d.some((e) => e.route.id === t.route.id) && t.route.id in l && s[t.route.id]?.shouldRevalidate || n.hasClientLoader ? r = !0 : e.add(t.route.id));
|
|
2582
|
-
}), e.size === 0) return [];
|
|
2583
|
-
let u = xr(t, c, a.v8_trailingSlashAwareDataRequests, "data");
|
|
2584
|
-
return r && e.size > 0 && u.searchParams.set("_routes", n.filter((t) => e.has(t.route.id)).map((e) => e.route.id).join(",")), [u.pathname + u.search];
|
|
2585
|
-
}, [
|
|
2586
|
-
c,
|
|
2587
|
-
a.v8_trailingSlashAwareDataRequests,
|
|
2588
|
-
l,
|
|
2589
|
-
i,
|
|
2590
|
-
o,
|
|
2591
|
-
d,
|
|
2592
|
-
n,
|
|
2593
|
-
t,
|
|
2594
|
-
s
|
|
2595
|
-
]), m = e.useMemo(() => Dr(f, o), [f, o]), h = Ir(f);
|
|
2596
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, p.map((t) => /* @__PURE__ */ e.createElement("link", {
|
|
2597
|
-
key: t,
|
|
2598
|
-
rel: "prefetch",
|
|
2599
|
-
as: "fetch",
|
|
2600
|
-
href: t,
|
|
2601
|
-
...r
|
|
2602
|
-
})), m.map((t) => /* @__PURE__ */ e.createElement("link", {
|
|
2603
|
-
key: t,
|
|
2604
|
-
rel: "modulepreload",
|
|
2605
|
-
href: t,
|
|
2606
|
-
...r
|
|
2607
|
-
})), h.map(({ key: t, link: n }) => /* @__PURE__ */ e.createElement("link", {
|
|
2608
|
-
key: t,
|
|
2609
|
-
nonce: r.nonce,
|
|
2610
|
-
...n,
|
|
2611
|
-
crossOrigin: n.crossOrigin ?? r.crossOrigin
|
|
2612
|
-
})));
|
|
2613
|
-
}
|
|
2614
|
-
function zr(...e) {
|
|
2615
|
-
return (t) => {
|
|
2616
|
-
e.forEach((e) => {
|
|
2617
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
2618
|
-
});
|
|
2619
|
-
};
|
|
2620
|
-
}
|
|
2621
|
-
e.Component;
|
|
2622
|
-
var Br = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
2623
|
-
try {
|
|
2624
|
-
Br && (window.__reactRouterVersion = "7.18.5");
|
|
2625
|
-
} catch {}
|
|
2626
|
-
var Vr = e.forwardRef(function({ onClick: t, discover: n = "render", prefetch: r = "none", relative: i, reloadDocument: a, replace: o, mask: s, state: c, target: l, to: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) {
|
|
2627
|
-
let { basename: g, navigator: _, useTransitions: v } = e.useContext(J), y = typeof u == "string" && At.test(u), b = pn(u, g);
|
|
2628
|
-
u = b.to;
|
|
2629
|
-
let x = In(u, { relative: i }), S = X(), C = null;
|
|
2630
|
-
if (s) {
|
|
2631
|
-
let e = rn(s, [], S.mask ? S.mask.pathname : "/", !0);
|
|
2632
|
-
g !== "/" && (e.pathname = e.pathname === "/" ? g : G([g, e.pathname])), C = _.createHref(e);
|
|
2633
|
-
}
|
|
2634
|
-
let [w, T, E] = Pr(r, m), D = Kr(u, {
|
|
2635
|
-
replace: o,
|
|
2636
|
-
mask: s,
|
|
2637
|
-
state: c,
|
|
2638
|
-
target: l,
|
|
2639
|
-
preventScrollReset: d,
|
|
2640
|
-
relative: i,
|
|
2641
|
-
viewTransition: f,
|
|
2642
|
-
defaultShouldRevalidate: p,
|
|
2643
|
-
useTransitions: v
|
|
2644
|
-
});
|
|
2645
|
-
function O(e) {
|
|
2646
|
-
t && t(e), e.defaultPrevented || D(e);
|
|
2647
|
-
}
|
|
2648
|
-
let k = !(b.isExternal || a), A = /* @__PURE__ */ e.createElement("a", {
|
|
2649
|
-
...m,
|
|
2650
|
-
...E,
|
|
2651
|
-
href: (k ? C : void 0) || b.absoluteURL || x,
|
|
2652
|
-
onClick: k ? O : t,
|
|
2653
|
-
ref: zr(h, T),
|
|
2654
|
-
target: l,
|
|
2655
|
-
"data-discover": !y && n === "render" ? "true" : void 0
|
|
2656
|
-
});
|
|
2657
|
-
return w && !y ? /* @__PURE__ */ e.createElement(e.Fragment, null, A, /* @__PURE__ */ e.createElement(Fr, { page: x })) : A;
|
|
2658
|
-
});
|
|
2659
|
-
Vr.displayName = "Link";
|
|
2660
|
-
var Hr = e.forwardRef(function({ "aria-current": t = "page", caseSensitive: n = !1, className: r = "", end: i = !1, style: a, to: o, viewTransition: s, children: c, ...l }, u) {
|
|
2661
|
-
let d = Z(o, { relative: l.relative }), f = X(), p = e.useContext(Cn), { navigator: m, basename: h } = e.useContext(J), g = p != null && Zr(d) && s === !0, _ = m.encodeLocation ? m.encodeLocation(d).pathname : d.pathname, v = f.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
|
|
2662
|
-
n || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && h && (y = W(y, h) || y);
|
|
2663
|
-
let b = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length, x = v === _ || !i && v.startsWith(_) && v.charAt(b) === "/", S = y != null && (y === _ || !i && y.startsWith(_) && y.charAt(_.length) === "/"), C = {
|
|
2664
|
-
isActive: x,
|
|
2665
|
-
isPending: S,
|
|
2666
|
-
isTransitioning: g
|
|
2667
|
-
}, w = x ? t : void 0, T;
|
|
2668
|
-
T = typeof r == "function" ? r(C) : [
|
|
2669
|
-
r,
|
|
2670
|
-
x ? "active" : null,
|
|
2671
|
-
S ? "pending" : null,
|
|
2672
|
-
g ? "transitioning" : null
|
|
2673
|
-
].filter(Boolean).join(" ");
|
|
2674
|
-
let E = typeof a == "function" ? a(C) : a;
|
|
2675
|
-
return /* @__PURE__ */ e.createElement(Vr, {
|
|
2676
|
-
...l,
|
|
2677
|
-
"aria-current": w,
|
|
2678
|
-
className: T,
|
|
2679
|
-
ref: u,
|
|
2680
|
-
style: E,
|
|
2681
|
-
to: o,
|
|
2682
|
-
viewTransition: s
|
|
2683
|
-
}, typeof c == "function" ? c(C) : c);
|
|
2684
|
-
});
|
|
2685
|
-
Hr.displayName = "NavLink";
|
|
2686
|
-
var Ur = e.forwardRef(({ discover: t = "render", fetcherKey: n, navigate: r, reloadDocument: i, replace: a, state: o, method: s = sr, action: c, onSubmit: l, relative: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) => {
|
|
2687
|
-
let { useTransitions: g } = e.useContext(J), _ = Yr(), v = Xr(c, { relative: u }), y = s.toLowerCase() === "get" ? "get" : "post", b = typeof c == "string" && At.test(c);
|
|
2688
|
-
return /* @__PURE__ */ e.createElement("form", {
|
|
2689
|
-
ref: h,
|
|
2690
|
-
method: y,
|
|
2691
|
-
action: v,
|
|
2692
|
-
onSubmit: i ? l : (t) => {
|
|
2693
|
-
if (l && l(t), t.defaultPrevented) return;
|
|
2694
|
-
t.preventDefault();
|
|
2695
|
-
let i = t.nativeEvent.submitter, c = i?.getAttribute("formmethod") || s, m = () => _(i || t.currentTarget, {
|
|
2696
|
-
fetcherKey: n,
|
|
2697
|
-
method: c,
|
|
2698
|
-
navigate: r,
|
|
2699
|
-
replace: a,
|
|
2700
|
-
state: o,
|
|
2701
|
-
relative: u,
|
|
2702
|
-
preventScrollReset: d,
|
|
2703
|
-
viewTransition: f,
|
|
2704
|
-
defaultShouldRevalidate: p
|
|
2705
|
-
});
|
|
2706
|
-
g && r !== !1 ? e.startTransition(() => m()) : m();
|
|
2707
|
-
},
|
|
2708
|
-
...m,
|
|
2709
|
-
"data-discover": !b && t === "render" ? "true" : void 0
|
|
2710
|
-
});
|
|
2711
|
-
});
|
|
2712
|
-
Ur.displayName = "Form";
|
|
2713
|
-
function Wr(e) {
|
|
2714
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
2715
|
-
}
|
|
2716
|
-
function Gr(t) {
|
|
2717
|
-
let n = e.useContext(q);
|
|
2718
|
-
return z(n, Wr(t)), n;
|
|
2719
|
-
}
|
|
2720
|
-
function Kr(t, { target: n, replace: r, mask: i, state: a, preventScrollReset: o, relative: s, viewTransition: c, defaultShouldRevalidate: l, useTransitions: u } = {}) {
|
|
2721
|
-
let d = Bn(), f = X(), p = Z(t, { relative: s });
|
|
2722
|
-
return e.useCallback((m) => {
|
|
2723
|
-
if (mr(m, n)) {
|
|
2724
|
-
m.preventDefault();
|
|
2725
|
-
let n = r === void 0 ? V(f) === V(p) : r, h = () => d(t, {
|
|
2726
|
-
replace: n,
|
|
2727
|
-
mask: i,
|
|
2728
|
-
state: a,
|
|
2729
|
-
preventScrollReset: o,
|
|
2730
|
-
relative: s,
|
|
2731
|
-
viewTransition: c,
|
|
2732
|
-
defaultShouldRevalidate: l
|
|
2733
|
-
});
|
|
2734
|
-
u ? e.startTransition(() => h()) : h();
|
|
2735
|
-
}
|
|
2736
|
-
}, [
|
|
2737
|
-
f,
|
|
2738
|
-
d,
|
|
2739
|
-
p,
|
|
2740
|
-
r,
|
|
2741
|
-
i,
|
|
2742
|
-
a,
|
|
2743
|
-
n,
|
|
2744
|
-
t,
|
|
2745
|
-
o,
|
|
2746
|
-
s,
|
|
2747
|
-
c,
|
|
2748
|
-
l,
|
|
2749
|
-
u
|
|
2750
|
-
]);
|
|
2751
|
-
}
|
|
2752
|
-
var qr = 0, Jr = () => `__${String(++qr)}__`;
|
|
2753
|
-
function Yr() {
|
|
2754
|
-
let { router: t } = Gr("useSubmit"), { basename: n } = e.useContext(J), r = tr(), i = t.fetch, a = t.navigate;
|
|
2755
|
-
return e.useCallback(async (e, t = {}) => {
|
|
2756
|
-
let { action: o, method: s, encType: c, formData: l, body: u } = yr(e, n);
|
|
2757
|
-
if (t.navigate === !1) {
|
|
2758
|
-
let e = t.fetcherKey || Jr();
|
|
2759
|
-
await i(e, r, t.action || o, {
|
|
2760
|
-
defaultShouldRevalidate: t.defaultShouldRevalidate,
|
|
2761
|
-
preventScrollReset: t.preventScrollReset,
|
|
2762
|
-
formData: l,
|
|
2763
|
-
body: u,
|
|
2764
|
-
formMethod: t.method || s,
|
|
2765
|
-
formEncType: t.encType || c,
|
|
2766
|
-
flushSync: t.flushSync
|
|
2767
|
-
});
|
|
2768
|
-
} else await a(t.action || o, {
|
|
2769
|
-
defaultShouldRevalidate: t.defaultShouldRevalidate,
|
|
2770
|
-
preventScrollReset: t.preventScrollReset,
|
|
2771
|
-
formData: l,
|
|
2772
|
-
body: u,
|
|
2773
|
-
formMethod: t.method || s,
|
|
2774
|
-
formEncType: t.encType || c,
|
|
2775
|
-
replace: t.replace,
|
|
2776
|
-
state: t.state,
|
|
2777
|
-
fromRouteId: r,
|
|
2778
|
-
flushSync: t.flushSync,
|
|
2779
|
-
viewTransition: t.viewTransition
|
|
2780
|
-
});
|
|
2781
|
-
}, [
|
|
2782
|
-
i,
|
|
2783
|
-
a,
|
|
2784
|
-
n,
|
|
2785
|
-
r
|
|
2786
|
-
]);
|
|
2787
|
-
}
|
|
2788
|
-
function Xr(t, { relative: n } = {}) {
|
|
2789
|
-
let { basename: r } = e.useContext(J), i = e.useContext(Y);
|
|
2790
|
-
z(i, "useFormAction must be used inside a RouteContext");
|
|
2791
|
-
let [a] = i.matches.slice(-1), o = { ...Z(t || ".", { relative: n }) }, s = X();
|
|
2792
|
-
if (t == null) {
|
|
2793
|
-
o.search = s.search;
|
|
2794
|
-
let e = new URLSearchParams(o.search), t = e.getAll("index");
|
|
2795
|
-
if (t.some((e) => e === "")) {
|
|
2796
|
-
e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
|
|
2797
|
-
let n = e.toString();
|
|
2798
|
-
o.search = n ? `?${n}` : "";
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
return (!t || t === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : G([r, o.pathname])), V(o);
|
|
2802
|
-
}
|
|
2803
|
-
function Zr(t, { relative: n } = {}) {
|
|
2804
|
-
let r = e.useContext(En);
|
|
2805
|
-
z(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
2806
|
-
let { basename: i } = Gr("useViewTransitionState"), a = Z(t, { relative: n });
|
|
2807
|
-
if (!r.isTransitioning) return !1;
|
|
2808
|
-
let o = W(r.currentLocation.pathname, i) || r.currentLocation.pathname, s = W(r.nextLocation.pathname, i) || r.nextLocation.pathname;
|
|
2809
|
-
return U(a.pathname, s) != null || U(a.pathname, o) != null;
|
|
2810
|
-
}
|
|
2811
1658
|
// src/components/molecules/MNavLinks/MNavLinks.styles.ts
|
|
2812
|
-
var
|
|
1659
|
+
var Q = o`
|
|
2813
1660
|
display: inline-flex;
|
|
2814
1661
|
align-items: center;
|
|
2815
1662
|
justify-content: center;
|
|
2816
1663
|
border: 0;
|
|
2817
|
-
padding: ${({ theme: e }) =>
|
|
2818
|
-
box-shadow: ${({ theme: e }) =>
|
|
2819
|
-
background: ${({ theme: e }) =>
|
|
2820
|
-
color: ${({ theme: e }) =>
|
|
2821
|
-
font-family: ${({ theme: e }) =>
|
|
2822
|
-
font-size: ${({ theme: e }) =>
|
|
2823
|
-
font-weight: ${({ theme: e }) =>
|
|
2824
|
-
text-decoration: ${({ theme: e }) =>
|
|
2825
|
-
text-transform: ${({ theme: e }) =>
|
|
1664
|
+
padding: ${({ theme: e }) => y(e).navLinks.itemPadding};
|
|
1665
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.link};
|
|
1666
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
1667
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
1668
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1669
|
+
font-size: ${({ theme: e }) => y(e).navLinks.fontSize};
|
|
1670
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1671
|
+
text-decoration: ${({ theme: e }) => y(e).navLinks.textDecoration};
|
|
1672
|
+
text-transform: ${({ theme: e }) => y(e).navLinks.textTransform};
|
|
2826
1673
|
cursor: pointer;
|
|
2827
1674
|
position: relative;
|
|
2828
1675
|
z-index: 1;
|
|
@@ -2833,65 +1680,65 @@ var Qr = s`
|
|
|
2833
1680
|
transform 0.15s ease;
|
|
2834
1681
|
|
|
2835
1682
|
&:hover:not(:disabled) {
|
|
2836
|
-
background: ${({ theme: e }) =>
|
|
1683
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
2837
1684
|
}
|
|
2838
1685
|
|
|
2839
1686
|
&:first-child {
|
|
2840
|
-
border-top-left-radius: ${({ theme: e }) =>
|
|
2841
|
-
border-bottom-left-radius: ${({ theme: e }) =>
|
|
1687
|
+
border-top-left-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1688
|
+
border-bottom-left-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
2842
1689
|
}
|
|
2843
1690
|
|
|
2844
1691
|
&:last-child {
|
|
2845
|
-
border-top-right-radius: ${({ theme: e }) =>
|
|
2846
|
-
border-bottom-right-radius: ${({ theme: e }) =>
|
|
1692
|
+
border-top-right-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1693
|
+
border-bottom-right-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
2847
1694
|
}
|
|
2848
1695
|
|
|
2849
|
-
${
|
|
1696
|
+
${T("navLinks")}
|
|
2850
1697
|
|
|
2851
1698
|
&:disabled {
|
|
2852
|
-
opacity: ${({ theme: e }) =>
|
|
1699
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
2853
1700
|
cursor: not-allowed;
|
|
2854
1701
|
}
|
|
2855
|
-
`,
|
|
1702
|
+
`, vt = s.nav`
|
|
2856
1703
|
display: inline-flex;
|
|
2857
1704
|
align-items: center;
|
|
2858
|
-
border-radius: ${({ theme: e }) =>
|
|
1705
|
+
border-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
2859
1706
|
padding: 0;
|
|
2860
|
-
box-shadow: ${({ theme: e }) =>
|
|
2861
|
-
font-family: ${({ theme: e }) =>
|
|
2862
|
-
font-size: ${({ theme: e }) =>
|
|
2863
|
-
text-transform: ${({ theme: e }) =>
|
|
1707
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.navLinks};
|
|
1708
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1709
|
+
font-size: ${({ theme: e }) => y(e).navLinks.fontSize};
|
|
1710
|
+
text-transform: ${({ theme: e }) => y(e).navLinks.textTransform};
|
|
2864
1711
|
|
|
2865
1712
|
& > a {
|
|
2866
|
-
${
|
|
1713
|
+
${Q}
|
|
2867
1714
|
|
|
2868
|
-
border: ${({ theme: e }) =>
|
|
1715
|
+
border: ${({ theme: e }) => y(e).navLinks.border};
|
|
2869
1716
|
|
|
2870
1717
|
&:active,
|
|
2871
1718
|
&[aria-current='page'] {
|
|
2872
1719
|
z-index: 0;
|
|
2873
1720
|
box-shadow: none;
|
|
2874
1721
|
transform: translate(
|
|
2875
|
-
calc(0px + ${({ theme: e }) =>
|
|
2876
|
-
${({ theme: e }) =>
|
|
1722
|
+
calc(0px + ${({ theme: e }) => y(e).shadow.offsetX}),
|
|
1723
|
+
${({ theme: e }) => y(e).shadow.offsetY}
|
|
2877
1724
|
);
|
|
2878
1725
|
}
|
|
2879
1726
|
}
|
|
2880
|
-
`,
|
|
2881
|
-
${
|
|
1727
|
+
`, yt = s.button`
|
|
1728
|
+
${Q}
|
|
2882
1729
|
`;
|
|
2883
1730
|
// src/components/molecules/MNavLinks/MNavLinks.tsx
|
|
2884
|
-
function
|
|
2885
|
-
return /* @__PURE__ */
|
|
1731
|
+
function bt({ links: e, ...t }) {
|
|
1732
|
+
return /* @__PURE__ */ c(vt, {
|
|
2886
1733
|
...t,
|
|
2887
|
-
children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */
|
|
1734
|
+
children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */ c(f, {
|
|
2888
1735
|
to: e.href,
|
|
2889
1736
|
className: e.className,
|
|
2890
1737
|
style: e.style,
|
|
2891
1738
|
end: e.end,
|
|
2892
1739
|
caseSensitive: e.caseSensitive,
|
|
2893
1740
|
children: e.label
|
|
2894
|
-
}, e.id) : /* @__PURE__ */
|
|
1741
|
+
}, e.id) : /* @__PURE__ */ c(yt, {
|
|
2895
1742
|
type: "button",
|
|
2896
1743
|
disabled: e.disabled,
|
|
2897
1744
|
onClick: e.onClick,
|
|
@@ -2900,72 +1747,72 @@ function ti({ links: e, ...t }) {
|
|
|
2900
1747
|
});
|
|
2901
1748
|
}
|
|
2902
1749
|
// src/components/molecules/MUserBadge/MUserBadge.styles.ts
|
|
2903
|
-
var
|
|
1750
|
+
var xt = s.a`
|
|
2904
1751
|
display: inline-flex;
|
|
2905
1752
|
align-items: center;
|
|
2906
|
-
gap: ${({ theme: e }) =>
|
|
1753
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
2907
1754
|
color: inherit;
|
|
2908
|
-
font-family: ${({ theme: e }) =>
|
|
2909
|
-
text-decoration: ${({ theme: e }) =>
|
|
1755
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1756
|
+
text-decoration: ${({ theme: e }) => y(e).userBadge.textDecoration};
|
|
2910
1757
|
|
|
2911
|
-
${
|
|
1758
|
+
${T("userBadge")}
|
|
2912
1759
|
`;
|
|
2913
1760
|
// src/components/molecules/MUserBadge/MUserBadge.tsx
|
|
2914
|
-
function
|
|
1761
|
+
function St({ to: e, firstName: t, lastName: n, avatarSrc: r, size: i = "md", showName: a = !0, ...o }) {
|
|
2915
1762
|
let s = `${t} ${n}`.trim();
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
as:
|
|
1763
|
+
return /* @__PURE__ */ l(xt, {
|
|
1764
|
+
as: d,
|
|
2918
1765
|
to: e,
|
|
2919
1766
|
...o,
|
|
2920
|
-
children: [/* @__PURE__ */
|
|
1767
|
+
children: [/* @__PURE__ */ c(x, {
|
|
2921
1768
|
firstName: t,
|
|
2922
1769
|
lastName: n,
|
|
2923
1770
|
src: r,
|
|
2924
1771
|
alt: a ? "" : s,
|
|
2925
1772
|
size: i,
|
|
2926
1773
|
"aria-hidden": a ? !0 : void 0
|
|
2927
|
-
}), a ? /* @__PURE__ */
|
|
1774
|
+
}), a ? /* @__PURE__ */ c("span", { children: s }) : null]
|
|
2928
1775
|
});
|
|
2929
1776
|
}
|
|
2930
1777
|
// src/components/organisms/OSidebar/OSidebar.styles.ts
|
|
2931
|
-
var
|
|
1778
|
+
var Ct = s.aside`
|
|
2932
1779
|
box-sizing: border-box;
|
|
2933
1780
|
display: flex;
|
|
2934
1781
|
flex: 0 0
|
|
2935
|
-
${({ $extended: e, theme: t }) => e ?
|
|
1782
|
+
${({ $extended: e, theme: t }) => e ? y(t).sidebar.width.extended : y(t).sidebar.width.compact};
|
|
2936
1783
|
flex-direction: column;
|
|
2937
|
-
gap: ${({ theme: e }) =>
|
|
2938
|
-
width: ${({ $extended: e, theme: t }) => e ?
|
|
2939
|
-
height: ${({ theme: e }) =>
|
|
2940
|
-
height: ${({ theme: e }) =>
|
|
1784
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1785
|
+
width: ${({ $extended: e, theme: t }) => e ? y(t).sidebar.width.extended : y(t).sidebar.width.compact};
|
|
1786
|
+
height: ${({ theme: e }) => y(e).sidebar.height.fallback};
|
|
1787
|
+
height: ${({ theme: e }) => y(e).sidebar.height.dynamic};
|
|
2941
1788
|
min-height: 0;
|
|
2942
1789
|
overflow: hidden;
|
|
2943
|
-
padding: ${({ theme: e }) =>
|
|
2944
|
-
border: ${({ theme: e }) =>
|
|
2945
|
-
border-radius: ${({ theme: e }) =>
|
|
2946
|
-
background: ${({ theme: e }) =>
|
|
2947
|
-
box-shadow: ${({ theme: e }) =>
|
|
1790
|
+
padding: ${({ theme: e }) => y(e).space.inset};
|
|
1791
|
+
border: ${({ theme: e }) => y(e).sidebar.border};
|
|
1792
|
+
border-radius: ${({ theme: e }) => y(e).sidebar.borderRadius};
|
|
1793
|
+
background: ${({ theme: e }) => y(e).colors.surface};
|
|
1794
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.sidebar};
|
|
2948
1795
|
transition:
|
|
2949
1796
|
width 0.2s ease,
|
|
2950
1797
|
flex-basis 0.2s ease;
|
|
2951
|
-
`,
|
|
1798
|
+
`, wt = s.div`
|
|
2952
1799
|
display: flex;
|
|
2953
1800
|
flex-direction: column;
|
|
2954
1801
|
align-items: center;
|
|
2955
|
-
gap: ${({ theme: e }) =>
|
|
1802
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
2956
1803
|
align-items: ${({ $extended: e }) => e ? "flex-end" : "center"};
|
|
2957
|
-
`,
|
|
1804
|
+
`, Tt = s.nav`
|
|
2958
1805
|
display: flex;
|
|
2959
1806
|
min-height: 0;
|
|
2960
1807
|
flex: 1;
|
|
2961
1808
|
flex-direction: column;
|
|
2962
1809
|
align-items: stretch;
|
|
2963
|
-
gap: ${({ theme: e }) =>
|
|
2964
|
-
margin-inline: ${({ theme: e }) => `-${
|
|
2965
|
-
padding-inline: ${({ theme: e }) =>
|
|
1810
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1811
|
+
margin-inline: ${({ theme: e }) => `-${y(e).space.xs}`};
|
|
1812
|
+
padding-inline: ${({ theme: e }) => y(e).space.xs};
|
|
2966
1813
|
overflow-y: auto;
|
|
2967
1814
|
overflow-x: hidden;
|
|
2968
|
-
`,
|
|
1815
|
+
`, Et = s.div`
|
|
2969
1816
|
display: flex;
|
|
2970
1817
|
width: 100%;
|
|
2971
1818
|
min-width: 0;
|
|
@@ -2976,24 +1823,24 @@ var ii = c.aside`
|
|
|
2976
1823
|
min-width: 0;
|
|
2977
1824
|
justify-content: ${({ $extended: e }) => e ? "flex-start" : "center"};
|
|
2978
1825
|
}
|
|
2979
|
-
`,
|
|
1826
|
+
`, Dt = s.div`
|
|
2980
1827
|
display: flex;
|
|
2981
1828
|
flex-direction: column;
|
|
2982
|
-
gap: ${({ theme: e }) =>
|
|
1829
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
2983
1830
|
`;
|
|
2984
1831
|
// src/components/organisms/OSidebar/OSidebar.tsx
|
|
2985
|
-
function
|
|
2986
|
-
return /* @__PURE__ */
|
|
1832
|
+
function Ot({ extended: e }) {
|
|
1833
|
+
return /* @__PURE__ */ c("svg", {
|
|
2987
1834
|
viewBox: "0 0 24 24",
|
|
2988
1835
|
fill: "none",
|
|
2989
1836
|
"aria-hidden": "true",
|
|
2990
|
-
children: e ? /* @__PURE__ */
|
|
1837
|
+
children: e ? /* @__PURE__ */ c("path", {
|
|
2991
1838
|
d: "m15 18-6-6 6-6",
|
|
2992
1839
|
stroke: "currentColor",
|
|
2993
1840
|
strokeWidth: "2",
|
|
2994
1841
|
strokeLinecap: "round",
|
|
2995
1842
|
strokeLinejoin: "round"
|
|
2996
|
-
}) : /* @__PURE__ */
|
|
1843
|
+
}) : /* @__PURE__ */ c("path", {
|
|
2997
1844
|
d: "m9 18 6-6-6-6",
|
|
2998
1845
|
stroke: "currentColor",
|
|
2999
1846
|
strokeWidth: "2",
|
|
@@ -3002,8 +1849,8 @@ function li({ extended: e }) {
|
|
|
3002
1849
|
})
|
|
3003
1850
|
});
|
|
3004
1851
|
}
|
|
3005
|
-
function
|
|
3006
|
-
let [d, f] = i
|
|
1852
|
+
function kt({ links: e, logout: t, extended: n, defaultExtended: i = !1, onExtendedChange: a, navigationLabel: o = "Primary navigation", "aria-label": s = "Application sidebar", ...u }) {
|
|
1853
|
+
let [d, f] = r(i), p = n ?? d, [m, h] = r(p);
|
|
3007
1854
|
function g() {
|
|
3008
1855
|
let e = !p;
|
|
3009
1856
|
e || h(!0), n === void 0 && f(e), a?.(e);
|
|
@@ -3012,16 +1859,16 @@ function ui({ links: e, logout: t, extended: n, defaultExtended: r = !1, onExten
|
|
|
3012
1859
|
e.target === e.currentTarget && e.propertyName === "width" && h(p);
|
|
3013
1860
|
}
|
|
3014
1861
|
function v(e) {
|
|
3015
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ c(Et, {
|
|
3016
1863
|
$extended: m,
|
|
3017
|
-
children: m ? /* @__PURE__ */
|
|
1864
|
+
children: m ? /* @__PURE__ */ l(Y, {
|
|
3018
1865
|
href: e.href,
|
|
3019
|
-
children: [/* @__PURE__ */
|
|
1866
|
+
children: [/* @__PURE__ */ c(H, {
|
|
3020
1867
|
size: "md",
|
|
3021
1868
|
style: { color: "inherit" },
|
|
3022
1869
|
children: e.icon
|
|
3023
1870
|
}), e.label]
|
|
3024
|
-
}) : /* @__PURE__ */
|
|
1871
|
+
}) : /* @__PURE__ */ c(q, {
|
|
3025
1872
|
href: e.href,
|
|
3026
1873
|
"aria-label": e.label,
|
|
3027
1874
|
title: e.label,
|
|
@@ -3029,34 +1876,34 @@ function ui({ links: e, logout: t, extended: n, defaultExtended: r = !1, onExten
|
|
|
3029
1876
|
})
|
|
3030
1877
|
}, e.id);
|
|
3031
1878
|
}
|
|
3032
|
-
return /* @__PURE__ */
|
|
3033
|
-
...
|
|
1879
|
+
return /* @__PURE__ */ l(Ct, {
|
|
1880
|
+
...u,
|
|
3034
1881
|
$extended: p,
|
|
3035
1882
|
"aria-label": s,
|
|
3036
1883
|
"data-extended": p,
|
|
3037
1884
|
onTransitionEnd: _,
|
|
3038
1885
|
children: [
|
|
3039
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ c(wt, {
|
|
3040
1887
|
$extended: p,
|
|
3041
|
-
children: /* @__PURE__ */
|
|
1888
|
+
children: /* @__PURE__ */ c(G, {
|
|
3042
1889
|
"aria-label": p ? "Collapse sidebar" : "Expand sidebar",
|
|
3043
1890
|
"aria-expanded": p,
|
|
3044
1891
|
onClick: g,
|
|
3045
1892
|
size: "sm",
|
|
3046
1893
|
ghost: !0,
|
|
3047
|
-
children: /* @__PURE__ */
|
|
1894
|
+
children: /* @__PURE__ */ c(Ot, { extended: p })
|
|
3048
1895
|
})
|
|
3049
1896
|
}),
|
|
3050
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ c(Tt, {
|
|
3051
1898
|
"aria-label": o,
|
|
3052
1899
|
children: e.map((e) => v(e))
|
|
3053
1900
|
}),
|
|
3054
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ c(Dt, { children: v(t) })
|
|
3055
1902
|
]
|
|
3056
1903
|
});
|
|
3057
1904
|
}
|
|
3058
1905
|
// src/components/organisms/OUserCamera/OUserCamera.styles.ts
|
|
3059
|
-
var
|
|
1906
|
+
var At = s.div`
|
|
3060
1907
|
position: relative;
|
|
3061
1908
|
display: block;
|
|
3062
1909
|
width: 100%;
|
|
@@ -3064,67 +1911,67 @@ var di = c.div`
|
|
|
3064
1911
|
aspect-ratio: ${({ $aspectRatio: e }) => e};
|
|
3065
1912
|
box-sizing: border-box;
|
|
3066
1913
|
overflow: hidden;
|
|
3067
|
-
padding: ${({ theme: e }) =>
|
|
3068
|
-
border: ${({ theme: e }) =>
|
|
3069
|
-
border-radius: ${({ theme: e }) =>
|
|
3070
|
-
background: ${({ theme: e }) =>
|
|
3071
|
-
color: ${({ theme: e }) =>
|
|
3072
|
-
`,
|
|
1914
|
+
padding: ${({ theme: e }) => y(e).space.inset};
|
|
1915
|
+
border: ${({ theme: e }) => y(e).camera.border};
|
|
1916
|
+
border-radius: ${({ theme: e }) => y(e).camera.borderRadius};
|
|
1917
|
+
background: ${({ theme: e }) => y(e).colors.surface};
|
|
1918
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1919
|
+
`, jt = s.video`
|
|
3073
1920
|
position: absolute;
|
|
3074
1921
|
inset: 0;
|
|
3075
1922
|
width: 100%;
|
|
3076
1923
|
height: 100%;
|
|
3077
1924
|
object-fit: cover;
|
|
3078
|
-
`,
|
|
1925
|
+
`, Mt = s.div`
|
|
3079
1926
|
position: absolute;
|
|
3080
1927
|
inset: 0;
|
|
3081
1928
|
display: flex;
|
|
3082
1929
|
align-items: center;
|
|
3083
1930
|
justify-content: center;
|
|
3084
|
-
background: ${({ theme: e }) =>
|
|
3085
|
-
color: ${({ theme: e }) =>
|
|
3086
|
-
font-family: ${({ theme: e }) =>
|
|
3087
|
-
font-size: ${({ theme: e }) =>
|
|
3088
|
-
font-weight: ${({ theme: e }) =>
|
|
3089
|
-
`,
|
|
1931
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
1932
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
1933
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1934
|
+
font-size: ${({ theme: e }) => y(e).camera.fallbackFontSize};
|
|
1935
|
+
font-weight: ${({ theme: e }) => y(e).camera.fallbackFontWeight};
|
|
1936
|
+
`, $ = s.div`
|
|
3090
1937
|
position: absolute;
|
|
3091
1938
|
z-index: 1;
|
|
3092
|
-
${({ $placement: e }) => e === "top-right" ?
|
|
3093
|
-
top: ${({ theme: e }) =>
|
|
3094
|
-
right: ${({ theme: e }) =>
|
|
3095
|
-
` :
|
|
3096
|
-
right: ${({ theme: e }) =>
|
|
3097
|
-
bottom: ${({ theme: e }) =>
|
|
1939
|
+
${({ $placement: e }) => e === "top-right" ? o`
|
|
1940
|
+
top: ${({ theme: e }) => y(e).space.inset};
|
|
1941
|
+
right: ${({ theme: e }) => y(e).space.inset};
|
|
1942
|
+
` : o`
|
|
1943
|
+
right: ${({ theme: e }) => y(e).space.inset};
|
|
1944
|
+
bottom: ${({ theme: e }) => y(e).space.inset};
|
|
3098
1945
|
`}
|
|
3099
|
-
`,
|
|
1946
|
+
`, Nt = s.span`
|
|
3100
1947
|
position: absolute;
|
|
3101
1948
|
z-index: 1;
|
|
3102
|
-
bottom: ${({ theme: e }) =>
|
|
3103
|
-
left: ${({ theme: e }) =>
|
|
3104
|
-
max-width: ${({ theme: e }) => `calc(100% - ${
|
|
1949
|
+
bottom: ${({ theme: e }) => y(e).space.inset};
|
|
1950
|
+
left: ${({ theme: e }) => y(e).space.inset};
|
|
1951
|
+
max-width: ${({ theme: e }) => `calc(100% - ${y(e).camera.nameMaxWidthOffset})`};
|
|
3105
1952
|
overflow: hidden;
|
|
3106
|
-
padding: ${({ theme: e }) => `${
|
|
3107
|
-
border-radius: ${({ theme: e }) =>
|
|
3108
|
-
background: ${({ theme: e }) => `color-mix(in srgb, ${
|
|
3109
|
-
color: ${({ theme: e }) =>
|
|
3110
|
-
font-family: ${({ theme: e }) =>
|
|
3111
|
-
font-size: ${({ theme: e }) =>
|
|
1953
|
+
padding: ${({ theme: e }) => `${y(e).space.xs} ${y(e).space.sm}`};
|
|
1954
|
+
border-radius: ${({ theme: e }) => y(e).camera.nameBorderRadius};
|
|
1955
|
+
background: ${({ theme: e }) => `color-mix(in srgb, ${y(e).colors.ink} 65%, transparent)`};
|
|
1956
|
+
color: ${({ theme: e }) => y(e).colors.muted};
|
|
1957
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1958
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
3112
1959
|
text-overflow: ellipsis;
|
|
3113
1960
|
white-space: nowrap;
|
|
3114
1961
|
`;
|
|
3115
1962
|
// src/components/organisms/OUserCamera/OUserCamera.tsx
|
|
3116
|
-
function
|
|
3117
|
-
return /* @__PURE__ */
|
|
1963
|
+
function Pt({ disabled: e }) {
|
|
1964
|
+
return /* @__PURE__ */ l("svg", {
|
|
3118
1965
|
viewBox: "0 0 24 24",
|
|
3119
1966
|
fill: "none",
|
|
3120
1967
|
"aria-hidden": "true",
|
|
3121
|
-
children: [/* @__PURE__ */
|
|
1968
|
+
children: [/* @__PURE__ */ c("path", {
|
|
3122
1969
|
d: "M4 7.5h11.5A1.5 1.5 0 0 1 17 9v1.5l4-2.5v8l-4-2.5V15a1.5 1.5 0 0 1-1.5 1.5H5.5A1.5 1.5 0 0 1 4 15V7.5Z",
|
|
3123
1970
|
stroke: "currentColor",
|
|
3124
1971
|
strokeWidth: "2",
|
|
3125
1972
|
strokeLinecap: "round",
|
|
3126
1973
|
strokeLinejoin: "round"
|
|
3127
|
-
}), e ? /* @__PURE__ */
|
|
1974
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
3128
1975
|
d: "m3 3 18 18",
|
|
3129
1976
|
stroke: "currentColor",
|
|
3130
1977
|
strokeWidth: "2",
|
|
@@ -3132,18 +1979,18 @@ function gi({ disabled: e }) {
|
|
|
3132
1979
|
}) : null]
|
|
3133
1980
|
});
|
|
3134
1981
|
}
|
|
3135
|
-
function
|
|
3136
|
-
return /* @__PURE__ */
|
|
1982
|
+
function Ft({ disabled: e }) {
|
|
1983
|
+
return /* @__PURE__ */ l("svg", {
|
|
3137
1984
|
viewBox: "0 0 24 24",
|
|
3138
1985
|
fill: "none",
|
|
3139
1986
|
"aria-hidden": "true",
|
|
3140
|
-
children: [/* @__PURE__ */
|
|
1987
|
+
children: [/* @__PURE__ */ c("path", {
|
|
3141
1988
|
d: "M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm0 0v5m-4 0h8m-11-8a7 7 0 0 0 14 0",
|
|
3142
1989
|
stroke: "currentColor",
|
|
3143
1990
|
strokeWidth: "2",
|
|
3144
1991
|
strokeLinecap: "round",
|
|
3145
1992
|
strokeLinejoin: "round"
|
|
3146
|
-
}), e ? /* @__PURE__ */
|
|
1993
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
3147
1994
|
d: "m3 3 18 18",
|
|
3148
1995
|
stroke: "currentColor",
|
|
3149
1996
|
strokeWidth: "2",
|
|
@@ -3151,31 +1998,31 @@ function _i({ disabled: e }) {
|
|
|
3151
1998
|
}) : null]
|
|
3152
1999
|
});
|
|
3153
2000
|
}
|
|
3154
|
-
function
|
|
3155
|
-
let p =
|
|
3156
|
-
return
|
|
2001
|
+
function It({ firstName: t, lastName: r, stream: i, cameraEnabled: a, audioEnabled: o, onCameraToggle: s, onAudioToggle: u, aspectRatio: d = 16 / 9, ...f }) {
|
|
2002
|
+
let p = n(null), m = `${t} ${r}`.trim(), h = `${t.charAt(0)}${r.charAt(0)}`.toUpperCase(), g = a && !!i;
|
|
2003
|
+
return e(() => {
|
|
3157
2004
|
let e = p.current;
|
|
3158
2005
|
if (e) return e.srcObject = g ? i ?? null : null, () => {
|
|
3159
2006
|
e.srcObject = null;
|
|
3160
2007
|
};
|
|
3161
|
-
}, [g, i]), /* @__PURE__ */
|
|
2008
|
+
}, [g, i]), /* @__PURE__ */ l(At, {
|
|
3162
2009
|
...f,
|
|
3163
2010
|
$aspectRatio: Number.isFinite(d) && d > 0 ? d : 16 / 9,
|
|
3164
2011
|
role: "group",
|
|
3165
2012
|
"aria-label": `${m} camera`,
|
|
3166
2013
|
children: [
|
|
3167
|
-
g ? /* @__PURE__ */
|
|
2014
|
+
g ? /* @__PURE__ */ c(jt, {
|
|
3168
2015
|
ref: p,
|
|
3169
2016
|
autoPlay: !0,
|
|
3170
2017
|
muted: !0,
|
|
3171
2018
|
playsInline: !0
|
|
3172
|
-
}) : /* @__PURE__ */
|
|
2019
|
+
}) : /* @__PURE__ */ c(Mt, {
|
|
3173
2020
|
"aria-hidden": "true",
|
|
3174
2021
|
children: h
|
|
3175
2022
|
}),
|
|
3176
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ c($, {
|
|
3177
2024
|
$placement: "top-right",
|
|
3178
|
-
children: /* @__PURE__ */
|
|
2025
|
+
children: /* @__PURE__ */ c(G, {
|
|
3179
2026
|
"aria-label": `Turn camera ${a ? "off" : "on"}`,
|
|
3180
2027
|
"aria-pressed": a,
|
|
3181
2028
|
variant: "primary",
|
|
@@ -3183,52 +2030,52 @@ function vi({ firstName: e, lastName: n, stream: i, cameraEnabled: a, audioEnabl
|
|
|
3183
2030
|
shape: "rounded",
|
|
3184
2031
|
ghost: !0,
|
|
3185
2032
|
onClick: s,
|
|
3186
|
-
children: /* @__PURE__ */
|
|
2033
|
+
children: /* @__PURE__ */ c(Pt, { disabled: !a })
|
|
3187
2034
|
})
|
|
3188
2035
|
}),
|
|
3189
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ c($, {
|
|
3190
2037
|
$placement: "bottom-right",
|
|
3191
|
-
children: /* @__PURE__ */
|
|
2038
|
+
children: /* @__PURE__ */ c(G, {
|
|
3192
2039
|
"aria-label": `Turn audio ${o ? "off" : "on"}`,
|
|
3193
2040
|
"aria-pressed": o,
|
|
3194
2041
|
variant: "primary",
|
|
3195
2042
|
size: "md",
|
|
3196
2043
|
shape: "rounded",
|
|
3197
2044
|
ghost: !0,
|
|
3198
|
-
onClick:
|
|
3199
|
-
children: /* @__PURE__ */
|
|
2045
|
+
onClick: u,
|
|
2046
|
+
children: /* @__PURE__ */ c(Ft, { disabled: !o })
|
|
3200
2047
|
})
|
|
3201
2048
|
}),
|
|
3202
|
-
/* @__PURE__ */
|
|
2049
|
+
/* @__PURE__ */ c(Nt, { children: m })
|
|
3203
2050
|
]
|
|
3204
2051
|
});
|
|
3205
2052
|
}
|
|
3206
2053
|
// src/shared/styles/GlobalStyles.ts
|
|
3207
|
-
var
|
|
2054
|
+
var Lt = a`
|
|
3208
2055
|
:root {
|
|
3209
|
-
--jynko-shadow-solid: ${({ theme: e }) =>
|
|
3210
|
-
--jynko-modal-padding: ${({ theme: e }) =>
|
|
3211
|
-
--jynko-modal-max-width: ${({ theme: e }) =>
|
|
3212
|
-
--jynko-modal-max-height: ${({ theme: e }) =>
|
|
3213
|
-
--jynko-modal-border-radius: ${({ theme: e }) =>
|
|
3214
|
-
--jynko-modal-box-shadow: ${({ theme: e }) =>
|
|
2056
|
+
--jynko-shadow-solid: ${({ theme: e }) => y(e).shadow.button};
|
|
2057
|
+
--jynko-modal-padding: ${({ theme: e }) => y(e).modal.padding};
|
|
2058
|
+
--jynko-modal-max-width: ${({ theme: e }) => y(e).modal.maxWidth};
|
|
2059
|
+
--jynko-modal-max-height: ${({ theme: e }) => y(e).modal.maxHeight};
|
|
2060
|
+
--jynko-modal-border-radius: ${({ theme: e }) => y(e).modal.borderRadius};
|
|
2061
|
+
--jynko-modal-box-shadow: ${({ theme: e }) => y(e).shadow.modal};
|
|
3215
2062
|
}
|
|
3216
2063
|
|
|
3217
2064
|
button {
|
|
3218
|
-
border: ${({ theme: e }) =>
|
|
3219
|
-
border-radius: ${({ theme: e }) =>
|
|
3220
|
-
padding: ${({ theme: e }) =>
|
|
3221
|
-
font-size: ${({ theme: e }) =>
|
|
3222
|
-
text-transform: ${({ theme: e }) =>
|
|
2065
|
+
border: ${({ theme: e }) => y(e).button.border};
|
|
2066
|
+
border-radius: ${({ theme: e }) => y(e).button.borderRadius};
|
|
2067
|
+
padding: ${({ theme: e }) => y(e).button.padding};
|
|
2068
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
2069
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
3223
2070
|
}
|
|
3224
2071
|
`;
|
|
3225
2072
|
// src/providers/JynkoProvider/JynkoProvider.tsx
|
|
3226
|
-
function
|
|
3227
|
-
return /* @__PURE__ */
|
|
2073
|
+
function Rt({ children: e, theme: t = v }) {
|
|
2074
|
+
return /* @__PURE__ */ l(i, {
|
|
3228
2075
|
theme: t,
|
|
3229
|
-
children: [/* @__PURE__ */
|
|
2076
|
+
children: [/* @__PURE__ */ c(Lt, {}), e]
|
|
3230
2077
|
});
|
|
3231
2078
|
}
|
|
3232
|
-
export {
|
|
2079
|
+
export { x as AAvatar, k as ABadge, z as AButton, H as AIcon, G as AIconButton, q as AIconLink, Se as AInput, Y as ALink, Oe as ALogo, Le as ASearchInput, ze as ASection, Ze as ASelect, tt as ATextarea, rt as ATypography, Rt as JynkoProvider, _t as MModal, bt as MNavLinks, St as MUserBadge, kt as OSidebar, It as OUserCamera, v as theme };
|
|
3233
2080
|
|
|
3234
2081
|
//# sourceMappingURL=index.js.map
|