jynko-kit 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/AIcon/AIcon.d.ts +5 -2
- package/dist/components/atoms/AIcon/AIcon.d.ts.map +1 -1
- package/dist/components/atoms/AIconButton/AIconButton.d.ts +4 -2
- package/dist/components/atoms/AIconButton/AIconButton.d.ts.map +1 -1
- package/dist/components/atoms/AIconLink/AIconLink.d.ts +4 -2
- package/dist/components/atoms/AIconLink/AIconLink.d.ts.map +1 -1
- package/dist/components/atoms/AInput/AInput.d.ts.map +1 -1
- package/dist/components/atoms/AInput/AInput.styles.d.ts.map +1 -1
- package/dist/components/atoms/ASearchInput/ASearchInput.d.ts.map +1 -1
- package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts.map +1 -1
- package/dist/components/atoms/ASelect/ASelect.d.ts.map +1 -1
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts +7 -0
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts.map +1 -1
- package/dist/components/atoms/ATypography/ATypography.styles.d.ts.map +1 -1
- package/dist/components/molecules/MModal/MModal.d.ts.map +1 -1
- package/dist/components/organisms/OSidebar/OSidebar.d.ts.map +1 -1
- package/dist/components/organisms/OUserCamera/OUserCamera.d.ts.map +1 -1
- package/dist/index.cjs +488 -483
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +866 -2138
- package/dist/index.js.map +1 -1
- package/dist/shared/styles/componentMetrics.d.ts.map +1 -1
- package/dist/shared/styles/theme.d.ts +1 -2
- package/dist/shared/styles/theme.d.ts.map +1 -1
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createPortal as
|
|
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 { ChevronDown as u, ChevronLeft as d, ChevronRight as f, Eye as p, EyeOff as m, Mic as h, MicOff as g, Search as _, Video as v, VideoOff as y, X as b } from "lucide-react";
|
|
5
|
+
import { createPortal as x } from "react-dom";
|
|
6
|
+
import { Link as S, NavLink as C } from "react-router-dom";
|
|
6
7
|
// src/shared/utils/color.ts
|
|
7
|
-
function
|
|
8
|
+
function w(e, t) {
|
|
8
9
|
return `color-mix(in srgb, ${e} 88%, ${t})`;
|
|
9
10
|
}
|
|
10
11
|
// src/shared/styles/theme.ts
|
|
11
|
-
var
|
|
12
|
+
var T = {
|
|
12
13
|
bg: "#0f172a",
|
|
13
14
|
surface: "#1e293b",
|
|
14
15
|
background: "#edf7f6",
|
|
@@ -23,16 +24,16 @@ var p = {
|
|
|
23
24
|
error: "#dc2626",
|
|
24
25
|
success: "#16a34a",
|
|
25
26
|
warning: "#d97706"
|
|
26
|
-
},
|
|
27
|
+
}, E = "30px", D = {
|
|
27
28
|
width: "3px",
|
|
28
29
|
offset: "2px",
|
|
29
30
|
colorMix: "45%"
|
|
30
|
-
},
|
|
31
|
+
}, O = {
|
|
31
32
|
regular: 400,
|
|
32
33
|
semibold: 600,
|
|
33
34
|
bold: 700
|
|
34
|
-
},
|
|
35
|
-
colors:
|
|
35
|
+
}, k = {
|
|
36
|
+
colors: T,
|
|
36
37
|
opacity: {
|
|
37
38
|
disabled: .6,
|
|
38
39
|
disabledButton: .55
|
|
@@ -79,7 +80,7 @@ var p = {
|
|
|
79
80
|
},
|
|
80
81
|
font: {
|
|
81
82
|
sans: "'Segoe UI', system-ui, -apple-system, sans-serif",
|
|
82
|
-
weight:
|
|
83
|
+
weight: O
|
|
83
84
|
},
|
|
84
85
|
typography: {
|
|
85
86
|
fallback: "1rem",
|
|
@@ -94,9 +95,9 @@ var p = {
|
|
|
94
95
|
sup: "0.75rem"
|
|
95
96
|
},
|
|
96
97
|
avatar: {
|
|
97
|
-
border: `2px solid ${
|
|
98
|
+
border: `2px solid ${T.ink}`,
|
|
98
99
|
borderRadius: "50%",
|
|
99
|
-
fontWeight:
|
|
100
|
+
fontWeight: O.semibold,
|
|
100
101
|
sizes: {
|
|
101
102
|
sm: {
|
|
102
103
|
diameter: "32px",
|
|
@@ -120,7 +121,7 @@ var p = {
|
|
|
120
121
|
logo: {
|
|
121
122
|
size: "36px",
|
|
122
123
|
fontSize: "1rem",
|
|
123
|
-
fontWeight:
|
|
124
|
+
fontWeight: O.bold,
|
|
124
125
|
whiteSpace: "nowrap"
|
|
125
126
|
},
|
|
126
127
|
sidebar: {
|
|
@@ -132,65 +133,65 @@ var p = {
|
|
|
132
133
|
fallback: "100vh",
|
|
133
134
|
dynamic: "100dvh"
|
|
134
135
|
},
|
|
135
|
-
border: `2px solid ${
|
|
136
|
+
border: `2px solid ${T.ink}`,
|
|
136
137
|
borderRadius: "16px"
|
|
137
138
|
},
|
|
138
139
|
camera: {
|
|
139
|
-
border: `2px solid ${
|
|
140
|
+
border: `2px solid ${T.ink}`,
|
|
140
141
|
borderRadius: "12px",
|
|
141
142
|
nameBorderRadius: "4px",
|
|
142
143
|
nameMaxWidthOffset: "64px",
|
|
143
144
|
fallbackFontSize: "clamp(2rem, 8vw, 5rem)",
|
|
144
|
-
fallbackFontWeight:
|
|
145
|
+
fallbackFontWeight: O.bold
|
|
145
146
|
},
|
|
146
147
|
shadow: {
|
|
147
148
|
offsetX: "2px",
|
|
148
149
|
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 ${
|
|
150
|
+
button: `2px 3px 0 0 ${T.ink}`,
|
|
151
|
+
link: `2px 3px 0 0 ${T.ink}`,
|
|
152
|
+
navLinks: `2px 3px 0 0 ${T.ink}`,
|
|
153
|
+
section: `3px 5px 0 0 ${T.ink}`,
|
|
154
|
+
modal: `3px 5px 0 0 ${T.ink}`,
|
|
155
|
+
sidebar: `3px 5px 0 0 ${T.ink}`
|
|
155
156
|
},
|
|
156
157
|
button: {
|
|
157
|
-
border: `2px solid ${
|
|
158
|
+
border: `2px solid ${T.ink}`,
|
|
158
159
|
borderRadius: "8px",
|
|
159
|
-
focus:
|
|
160
|
+
focus: D,
|
|
160
161
|
padding: "16px",
|
|
161
162
|
fontSize: "14px",
|
|
162
163
|
textDecoration: "none",
|
|
163
164
|
textTransform: "uppercase"
|
|
164
165
|
},
|
|
165
166
|
iconButton: {
|
|
166
|
-
border: `2px solid ${
|
|
167
|
+
border: `2px solid ${T.ink}`,
|
|
167
168
|
borderRadius: "8px",
|
|
168
|
-
focus:
|
|
169
|
+
focus: D
|
|
169
170
|
},
|
|
170
171
|
iconLink: {
|
|
171
|
-
border: `2px solid ${
|
|
172
|
+
border: `2px solid ${T.ink}`,
|
|
172
173
|
borderRadius: "8px",
|
|
173
|
-
focus:
|
|
174
|
+
focus: D
|
|
174
175
|
},
|
|
175
176
|
badge: {
|
|
176
|
-
border: `2px solid ${
|
|
177
|
+
border: `2px solid ${T.ink}`,
|
|
177
178
|
borderRadius: "8px",
|
|
178
179
|
fontSize: "14px",
|
|
179
180
|
textTransform: "uppercase"
|
|
180
181
|
},
|
|
181
182
|
link: {
|
|
182
|
-
border: `2px solid ${
|
|
183
|
+
border: `2px solid ${T.ink}`,
|
|
183
184
|
borderRadius: "8px",
|
|
184
|
-
focus:
|
|
185
|
+
focus: D,
|
|
185
186
|
padding: "16px",
|
|
186
187
|
fontSize: "14px",
|
|
187
188
|
textDecoration: "none",
|
|
188
189
|
textTransform: "uppercase"
|
|
189
190
|
},
|
|
190
191
|
navLinks: {
|
|
191
|
-
border: `2px solid ${
|
|
192
|
+
border: `2px solid ${T.ink}`,
|
|
192
193
|
borderRadius: "8px",
|
|
193
|
-
focus:
|
|
194
|
+
focus: D,
|
|
194
195
|
padding: "0",
|
|
195
196
|
fontSize: "14px",
|
|
196
197
|
textDecoration: "none",
|
|
@@ -198,60 +199,59 @@ var p = {
|
|
|
198
199
|
itemPadding: "16px"
|
|
199
200
|
},
|
|
200
201
|
formControl: {
|
|
201
|
-
border: `2px solid ${
|
|
202
|
+
border: `2px solid ${T.ink}`,
|
|
202
203
|
borderRadius: "8px",
|
|
203
|
-
padding: "
|
|
204
|
-
height: "3.5rem",
|
|
204
|
+
padding: "8px",
|
|
205
205
|
textareaHeight: "3rem",
|
|
206
|
-
dropdownBorder: `2px solid ${
|
|
206
|
+
dropdownBorder: `2px solid ${T.ink}`,
|
|
207
207
|
optionListMaxHeight: "16rem",
|
|
208
|
-
focus:
|
|
208
|
+
focus: D,
|
|
209
209
|
trailingActionPadding: "3.25rem",
|
|
210
210
|
fontSize: "14px",
|
|
211
211
|
optionTextTransform: "none"
|
|
212
212
|
},
|
|
213
213
|
userBadge: {
|
|
214
|
-
focus:
|
|
214
|
+
focus: D,
|
|
215
215
|
textDecoration: "none"
|
|
216
216
|
},
|
|
217
217
|
section: {
|
|
218
|
-
border: `2px solid ${
|
|
218
|
+
border: `2px solid ${T.ink}`,
|
|
219
219
|
borderRadius: "16px",
|
|
220
|
-
padding:
|
|
220
|
+
padding: E
|
|
221
221
|
},
|
|
222
222
|
modal: {
|
|
223
|
-
padding:
|
|
223
|
+
padding: E,
|
|
224
224
|
maxWidth: "720px",
|
|
225
225
|
maxHeight: "80vh",
|
|
226
|
-
border: `2px solid ${
|
|
226
|
+
border: `2px solid ${T.ink}`,
|
|
227
227
|
borderRadius: "16px",
|
|
228
228
|
title: {
|
|
229
229
|
fontSize: "1.25rem",
|
|
230
|
-
fontWeight:
|
|
230
|
+
fontWeight: O.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 A(e) {
|
|
237
|
+
return e?.colors ? e : k;
|
|
238
238
|
}
|
|
239
239
|
// src/components/atoms/AAvatar/AAvatar.styles.ts
|
|
240
|
-
var
|
|
240
|
+
var j = 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 }) => A(e).avatar.border};
|
|
247
|
+
border-radius: ${({ theme: e }) => A(e).avatar.borderRadius};
|
|
248
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
249
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
250
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
251
|
+
font-weight: ${({ theme: e }) => A(e).avatar.fontWeight};
|
|
252
|
+
width: ${({ $size: e, theme: t }) => A(t).avatar.sizes[e].diameter};
|
|
253
|
+
height: ${({ $size: e, theme: t }) => A(t).avatar.sizes[e].diameter};
|
|
254
|
+
font-size: ${({ $size: e, theme: t }) => A(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 M({ 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(j, {
|
|
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 N = o`
|
|
281
281
|
display: grid;
|
|
282
|
-
gap: ${({ theme: e }) =>
|
|
282
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
283
283
|
width: 100%;
|
|
284
|
-
`,
|
|
285
|
-
sm:
|
|
286
|
-
padding: ${({ theme: t }) =>
|
|
284
|
+
`, P = (e) => ({
|
|
285
|
+
sm: o`
|
|
286
|
+
padding: ${({ theme: t }) => A(t).space.components[e].sm};
|
|
287
287
|
`,
|
|
288
|
-
md:
|
|
289
|
-
padding: ${({ theme: t }) =>
|
|
288
|
+
md: o`
|
|
289
|
+
padding: ${({ theme: t }) => A(t).space.components[e].md};
|
|
290
290
|
`,
|
|
291
|
-
lg:
|
|
292
|
-
padding: ${({ theme: t }) =>
|
|
291
|
+
lg: o`
|
|
292
|
+
padding: ${({ theme: t }) => A(t).space.components[e].lg};
|
|
293
293
|
`
|
|
294
|
-
}),
|
|
295
|
-
padding: ${({ theme: e }) =>
|
|
296
|
-
`,
|
|
294
|
+
}), F = o`
|
|
295
|
+
padding: ${({ theme: e }) => A(e).formControl.padding};
|
|
296
|
+
`, I = (e) => o`
|
|
297
297
|
&:focus-visible {
|
|
298
|
-
outline: ${({ theme: t }) => `${
|
|
299
|
-
outline-offset: ${({ theme: t }) =>
|
|
298
|
+
outline: ${({ theme: t }) => `${A(t)[e].focus.width} solid color-mix(in srgb, ${A(t).colors.primary} ${A(t)[e].focus.colorMix}, transparent)`};
|
|
299
|
+
outline-offset: ${({ theme: t }) => A(t)[e].focus.offset};
|
|
300
300
|
}
|
|
301
|
-
`,
|
|
302
|
-
default:
|
|
303
|
-
background: ${({ theme: e }) =>
|
|
304
|
-
color: ${({ theme: e }) =>
|
|
301
|
+
`, L = P("badge"), R = {
|
|
302
|
+
default: o`
|
|
303
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
304
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
305
305
|
`,
|
|
306
|
-
info:
|
|
307
|
-
background: ${({ theme: e }) =>
|
|
308
|
-
color: ${({ theme: e }) =>
|
|
306
|
+
info: o`
|
|
307
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
308
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
309
309
|
`,
|
|
310
|
-
success:
|
|
311
|
-
background: ${({ theme: e }) =>
|
|
312
|
-
color: ${({ theme: e }) =>
|
|
310
|
+
success: o`
|
|
311
|
+
background: ${({ theme: e }) => A(e).colors.success};
|
|
312
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
313
313
|
`,
|
|
314
|
-
warning:
|
|
315
|
-
background: ${({ theme: e }) =>
|
|
316
|
-
color: ${({ theme: e }) =>
|
|
314
|
+
warning: o`
|
|
315
|
+
background: ${({ theme: e }) => A(e).colors.warning};
|
|
316
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
317
317
|
`,
|
|
318
|
-
error:
|
|
319
|
-
background: ${({ theme: e }) =>
|
|
320
|
-
color: ${({ theme: e }) =>
|
|
318
|
+
error: o`
|
|
319
|
+
background: ${({ theme: e }) => A(e).colors.error};
|
|
320
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
321
321
|
`
|
|
322
|
-
},
|
|
322
|
+
}, z = 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 }) => A(e).space.sm};
|
|
327
|
+
border: ${({ theme: e }) => A(e).badge.border};
|
|
328
|
+
border-radius: ${({ theme: e }) => A(e).badge.borderRadius};
|
|
329
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
330
|
+
font-size: ${({ theme: e }) => A(e).badge.fontSize};
|
|
331
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
332
|
+
text-transform: ${({ theme: e }) => A(e).badge.textTransform};
|
|
333
|
+
|
|
334
|
+
${({ $size: e }) => L[e]}
|
|
335
|
+
${({ $variant: e }) => R[e]}
|
|
336
336
|
`;
|
|
337
337
|
// src/components/atoms/ABadge/ABadge.tsx
|
|
338
|
-
function
|
|
339
|
-
return /* @__PURE__ */
|
|
338
|
+
function B({ children: e, size: t = "md", variant: n = "default", ...r }) {
|
|
339
|
+
return /* @__PURE__ */ c(z, {
|
|
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 V = 150;
|
|
348
|
+
function H({ 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, V - 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 U = P("button"), W = {
|
|
382
|
+
primary: o`
|
|
383
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
384
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
385
385
|
|
|
386
386
|
&:hover:not(:disabled) {
|
|
387
|
-
background: ${({ theme: e }) =>
|
|
387
|
+
background: ${({ theme: e }) => w(A(e).colors.primary, A(e).colors.ink)};
|
|
388
388
|
}
|
|
389
389
|
`,
|
|
390
|
-
secondary:
|
|
391
|
-
background: ${({ theme: e }) =>
|
|
392
|
-
color: ${({ theme: e }) =>
|
|
390
|
+
secondary: o`
|
|
391
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
392
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
393
393
|
|
|
394
394
|
&:hover:not(:disabled) {
|
|
395
|
-
background: ${({ theme: e }) =>
|
|
395
|
+
background: ${({ theme: e }) => w(A(e).colors.secondary, A(e).colors.ink)};
|
|
396
396
|
}
|
|
397
397
|
`
|
|
398
|
-
},
|
|
398
|
+
}, ee = 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 }) => A(e).space.sm};
|
|
403
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
404
|
+
font-size: ${({ theme: e }) => A(e).button.fontSize};
|
|
405
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
406
|
+
text-transform: ${({ theme: e }) => A(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
|
+
${I("button")}
|
|
415
415
|
|
|
416
416
|
&:disabled {
|
|
417
|
-
opacity: ${({ theme: e }) =>
|
|
417
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabledButton};
|
|
418
418
|
cursor: not-allowed;
|
|
419
419
|
}
|
|
420
|
-
`,
|
|
421
|
-
border: ${({ theme: e }) =>
|
|
422
|
-
box-shadow: ${({ theme: e }) =>
|
|
420
|
+
`, te = o`
|
|
421
|
+
border: ${({ theme: e }) => A(e).button.border};
|
|
422
|
+
box-shadow: ${({ theme: e }) => A(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(${A(e).shadow.offsetX}, ${A(e).shadow.offsetY})`};
|
|
428
428
|
box-shadow: none;
|
|
429
429
|
}
|
|
430
|
-
`,
|
|
431
|
-
border-radius: ${({ theme: e }) =>
|
|
432
|
-
`,
|
|
433
|
-
padding: ${({ theme: e }) =>
|
|
434
|
-
`,
|
|
435
|
-
${
|
|
436
|
-
${
|
|
437
|
-
${
|
|
438
|
-
${
|
|
439
|
-
${({ $variant: e }) =>
|
|
440
|
-
${({ $size: e }) =>
|
|
430
|
+
`, ne = o`
|
|
431
|
+
border-radius: ${({ theme: e }) => A(e).button.borderRadius};
|
|
432
|
+
`, re = o`
|
|
433
|
+
padding: ${({ theme: e }) => A(e).button.padding};
|
|
434
|
+
`, ie = s.button`
|
|
435
|
+
${ee}
|
|
436
|
+
${te}
|
|
437
|
+
${ne}
|
|
438
|
+
${re}
|
|
439
|
+
${({ $variant: e }) => W[e]}
|
|
440
|
+
${({ $size: e }) => U[e]}
|
|
441
441
|
`;
|
|
442
442
|
// src/components/atoms/AButton/AButton.tsx
|
|
443
|
-
function
|
|
444
|
-
let { pressed: d, pressHandlers: f } =
|
|
443
|
+
function ae({ 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 } = H({
|
|
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(ie, {
|
|
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 oe = {
|
|
464
|
+
default: (e) => A(e).colors.text,
|
|
465
|
+
error: (e) => A(e).colors.error,
|
|
466
|
+
success: (e) => A(e).colors.success,
|
|
467
|
+
warning: (e) => A(e).colors.warning
|
|
468
|
+
}, se = 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 }) => A(t).icon.sizes[e]};
|
|
471
|
+
height: ${({ $size: e, theme: t }) => A(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 }) => oe[e](t)};
|
|
476
476
|
|
|
477
477
|
& > svg {
|
|
478
478
|
display: block;
|
|
@@ -481,76 +481,79 @@ var ne = {
|
|
|
481
481
|
}
|
|
482
482
|
`;
|
|
483
483
|
// src/components/atoms/AIcon/AIcon.tsx
|
|
484
|
-
function
|
|
485
|
-
let
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
$size:
|
|
488
|
-
$type:
|
|
489
|
-
"aria-hidden": !
|
|
490
|
-
"aria-label":
|
|
491
|
-
role:
|
|
492
|
-
title:
|
|
493
|
-
...
|
|
494
|
-
children: e
|
|
484
|
+
function G({ icon: e, children: t, size: n = "md", type: r = "default", title: i, "aria-label": a, ...o }) {
|
|
485
|
+
let s = i ?? a;
|
|
486
|
+
return /* @__PURE__ */ c(se, {
|
|
487
|
+
$size: n,
|
|
488
|
+
$type: r,
|
|
489
|
+
"aria-hidden": !s || void 0,
|
|
490
|
+
"aria-label": s,
|
|
491
|
+
role: s ? "img" : void 0,
|
|
492
|
+
title: i,
|
|
493
|
+
...o,
|
|
494
|
+
children: e ? /* @__PURE__ */ c(e, {
|
|
495
|
+
"aria-hidden": !0,
|
|
496
|
+
focusable: !1
|
|
497
|
+
}) : t
|
|
495
498
|
});
|
|
496
499
|
}
|
|
497
500
|
// src/components/atoms/AIconButton/AIconButton.styles.ts
|
|
498
|
-
var
|
|
499
|
-
primary:
|
|
500
|
-
background: ${({ theme: e }) =>
|
|
501
|
-
color: ${({ theme: e }) =>
|
|
501
|
+
var ce = P("iconButton"), le = {
|
|
502
|
+
primary: o`
|
|
503
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
504
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
502
505
|
|
|
503
506
|
&:hover:not(:disabled) {
|
|
504
|
-
background: ${({ theme: e }) =>
|
|
507
|
+
background: ${({ theme: e }) => w(A(e).colors.primary, A(e).colors.ink)};
|
|
505
508
|
}
|
|
506
509
|
`,
|
|
507
|
-
secondary:
|
|
508
|
-
background: ${({ theme: e }) =>
|
|
509
|
-
color: ${({ theme: e }) =>
|
|
510
|
+
secondary: o`
|
|
511
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
512
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
510
513
|
|
|
511
514
|
&:hover:not(:disabled) {
|
|
512
|
-
background: ${({ theme: e }) =>
|
|
515
|
+
background: ${({ theme: e }) => w(A(e).colors.secondary, A(e).colors.ink)};
|
|
513
516
|
}
|
|
514
517
|
`
|
|
515
|
-
},
|
|
518
|
+
}, ue = o`
|
|
516
519
|
display: inline-flex;
|
|
517
520
|
align-items: center;
|
|
518
521
|
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 }) =>
|
|
522
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
523
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
524
|
+
font-size: ${({ theme: e }) => A(e).button.fontSize};
|
|
525
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
526
|
+
text-transform: ${({ theme: e }) => A(e).button.textTransform};
|
|
524
527
|
cursor: pointer;
|
|
525
528
|
transition:
|
|
526
529
|
background-color 0.15s ease,
|
|
527
530
|
transform 0.15s ease,
|
|
528
531
|
box-shadow 0.15s ease;
|
|
529
532
|
|
|
530
|
-
${
|
|
533
|
+
${I("iconButton")}
|
|
531
534
|
|
|
532
535
|
&:disabled {
|
|
533
|
-
opacity: ${({ theme: e }) =>
|
|
536
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabledButton};
|
|
534
537
|
cursor: not-allowed;
|
|
535
538
|
}
|
|
536
|
-
`,
|
|
537
|
-
border: ${({ theme: e }) =>
|
|
538
|
-
box-shadow: ${({ theme: e }) =>
|
|
539
|
+
`, de = o`
|
|
540
|
+
border: ${({ theme: e }) => A(e).iconButton.border};
|
|
541
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.button};
|
|
539
542
|
|
|
540
543
|
&:active:not(:disabled),
|
|
541
544
|
&[data-pressed='true']:not(:disabled),
|
|
542
545
|
&:disabled {
|
|
543
|
-
transform: ${({ theme: e }) => `translate(${
|
|
546
|
+
transform: ${({ theme: e }) => `translate(${A(e).shadow.offsetX}, ${A(e).shadow.offsetY})`};
|
|
544
547
|
box-shadow: none;
|
|
545
548
|
}
|
|
546
|
-
`,
|
|
547
|
-
square:
|
|
548
|
-
border-radius: ${({ theme: e }) =>
|
|
549
|
+
`, fe = {
|
|
550
|
+
square: o`
|
|
551
|
+
border-radius: ${({ theme: e }) => A(e).iconButton.borderRadius};
|
|
549
552
|
`,
|
|
550
|
-
rounded:
|
|
551
|
-
border-radius: ${({ theme: e }) =>
|
|
553
|
+
rounded: o`
|
|
554
|
+
border-radius: ${({ theme: e }) => A(e).radius.full};
|
|
552
555
|
`
|
|
553
|
-
},
|
|
556
|
+
}, pe = o`
|
|
554
557
|
background: transparent;
|
|
555
558
|
border: none;
|
|
556
559
|
box-shadow: none;
|
|
@@ -562,102 +565,103 @@ var ie = S("iconButton"), ae = {
|
|
|
562
565
|
box-shadow: none;
|
|
563
566
|
}
|
|
564
567
|
`;
|
|
565
|
-
function
|
|
568
|
+
function K(e, t) {
|
|
566
569
|
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
567
570
|
}
|
|
568
|
-
var
|
|
569
|
-
primary:
|
|
570
|
-
color: ${({ theme: e }) =>
|
|
571
|
+
var me = {
|
|
572
|
+
primary: o`
|
|
573
|
+
color: ${({ theme: e }) => A(e).colors.primary};
|
|
571
574
|
|
|
572
575
|
&:hover:not(:disabled) {
|
|
573
|
-
background: ${({ theme: e }) =>
|
|
576
|
+
background: ${({ theme: e }) => K(A(e).colors.primary, "18%")};
|
|
574
577
|
}
|
|
575
578
|
|
|
576
579
|
&:active:not(:disabled),
|
|
577
580
|
&[data-pressed='true']:not(:disabled) {
|
|
578
|
-
background: ${({ theme: e }) =>
|
|
581
|
+
background: ${({ theme: e }) => w(K(A(e).colors.primary, "18%"), A(e).colors.ink)};
|
|
579
582
|
}
|
|
580
583
|
`,
|
|
581
|
-
secondary:
|
|
582
|
-
color: ${({ theme: e }) =>
|
|
584
|
+
secondary: o`
|
|
585
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
583
586
|
|
|
584
587
|
&:hover:not(:disabled) {
|
|
585
|
-
background: ${({ theme: e }) =>
|
|
588
|
+
background: ${({ theme: e }) => K(A(e).colors.text, "12%")};
|
|
586
589
|
}
|
|
587
590
|
|
|
588
591
|
&:active:not(:disabled),
|
|
589
592
|
&[data-pressed='true']:not(:disabled) {
|
|
590
|
-
background: ${({ theme: e }) =>
|
|
593
|
+
background: ${({ theme: e }) => w(K(A(e).colors.text, "12%"), A(e).colors.ink)};
|
|
591
594
|
}
|
|
592
595
|
`
|
|
593
|
-
},
|
|
594
|
-
${
|
|
596
|
+
}, he = s.button`
|
|
597
|
+
${ue}
|
|
595
598
|
padding: 0;
|
|
596
599
|
flex-shrink: 0;
|
|
597
600
|
|
|
598
|
-
${({ $size: e }) =>
|
|
599
|
-
${({ $shape: e }) =>
|
|
600
|
-
${({ $ghost: e, $variant: t }) => e ?
|
|
601
|
-
${
|
|
602
|
-
${
|
|
603
|
-
` :
|
|
604
|
-
${
|
|
605
|
-
${
|
|
601
|
+
${({ $size: e }) => ce[e]}
|
|
602
|
+
${({ $shape: e }) => fe[e]}
|
|
603
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
604
|
+
${pe}
|
|
605
|
+
${me[t]}
|
|
606
|
+
` : o`
|
|
607
|
+
${de}
|
|
608
|
+
${le[t]}
|
|
606
609
|
`}
|
|
607
610
|
`;
|
|
608
611
|
// src/components/atoms/AIconButton/AIconButton.tsx
|
|
609
|
-
function
|
|
610
|
-
let { pressed:
|
|
611
|
-
disabled:
|
|
612
|
-
onPointerDown:
|
|
613
|
-
onPointerUp:
|
|
614
|
-
onPointerCancel:
|
|
615
|
-
onLostPointerCapture:
|
|
612
|
+
function q({ children: e, icon: t, variant: n = "primary", size: r = "md", shape: i = "square", ghost: a = !1, type: o = "button", disabled: s, ref: l, onPointerDown: u, onPointerUp: d, onPointerCancel: f, onLostPointerCapture: p, ...m }) {
|
|
613
|
+
let { pressed: h, pressHandlers: g } = H({
|
|
614
|
+
disabled: s,
|
|
615
|
+
onPointerDown: u,
|
|
616
|
+
onPointerUp: d,
|
|
617
|
+
onPointerCancel: f,
|
|
618
|
+
onLostPointerCapture: p
|
|
616
619
|
});
|
|
617
|
-
return /* @__PURE__ */
|
|
618
|
-
$ghost:
|
|
619
|
-
$shape:
|
|
620
|
-
$size:
|
|
621
|
-
$variant:
|
|
622
|
-
type:
|
|
623
|
-
disabled:
|
|
624
|
-
"data-pressed":
|
|
625
|
-
ref:
|
|
626
|
-
...
|
|
627
|
-
...
|
|
628
|
-
children: /* @__PURE__ */
|
|
629
|
-
|
|
620
|
+
return /* @__PURE__ */ c(he, {
|
|
621
|
+
$ghost: a,
|
|
622
|
+
$shape: i,
|
|
623
|
+
$size: r,
|
|
624
|
+
$variant: n,
|
|
625
|
+
type: o,
|
|
626
|
+
disabled: s,
|
|
627
|
+
"data-pressed": h ? "true" : void 0,
|
|
628
|
+
ref: l,
|
|
629
|
+
...m,
|
|
630
|
+
...g,
|
|
631
|
+
children: /* @__PURE__ */ c(G, {
|
|
632
|
+
icon: t,
|
|
633
|
+
size: r,
|
|
630
634
|
style: { color: "inherit" },
|
|
631
635
|
children: e
|
|
632
636
|
})
|
|
633
637
|
});
|
|
634
638
|
}
|
|
635
639
|
// src/components/atoms/AIconLink/AIconLink.styles.ts
|
|
636
|
-
var
|
|
637
|
-
primary:
|
|
638
|
-
background: ${({ theme: e }) =>
|
|
639
|
-
color: ${({ theme: e }) =>
|
|
640
|
+
var ge = P("iconLink"), _e = {
|
|
641
|
+
primary: o`
|
|
642
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
643
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
640
644
|
|
|
641
645
|
&:hover {
|
|
642
|
-
background: ${({ theme: e }) =>
|
|
646
|
+
background: ${({ theme: e }) => w(A(e).colors.primary, A(e).colors.ink)};
|
|
643
647
|
}
|
|
644
648
|
`,
|
|
645
|
-
secondary:
|
|
646
|
-
background: ${({ theme: e }) =>
|
|
647
|
-
color: ${({ theme: e }) =>
|
|
649
|
+
secondary: o`
|
|
650
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
651
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
648
652
|
|
|
649
653
|
&:hover {
|
|
650
|
-
background: ${({ theme: e }) =>
|
|
654
|
+
background: ${({ theme: e }) => w(A(e).colors.secondary, A(e).colors.ink)};
|
|
651
655
|
}
|
|
652
656
|
`
|
|
653
|
-
},
|
|
654
|
-
square:
|
|
655
|
-
border-radius: ${({ theme: e }) =>
|
|
657
|
+
}, ve = {
|
|
658
|
+
square: o`
|
|
659
|
+
border-radius: ${({ theme: e }) => A(e).iconLink.borderRadius};
|
|
656
660
|
`,
|
|
657
|
-
rounded:
|
|
658
|
-
border-radius: ${({ theme: e }) =>
|
|
661
|
+
rounded: o`
|
|
662
|
+
border-radius: ${({ theme: e }) => A(e).radius.full};
|
|
659
663
|
`
|
|
660
|
-
},
|
|
664
|
+
}, ye = o`
|
|
661
665
|
background: transparent;
|
|
662
666
|
border: none;
|
|
663
667
|
box-shadow: none;
|
|
@@ -669,315 +673,286 @@ var pe = S("iconLink"), me = {
|
|
|
669
673
|
box-shadow: none;
|
|
670
674
|
}
|
|
671
675
|
`;
|
|
672
|
-
function
|
|
676
|
+
function J(e, t) {
|
|
673
677
|
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
674
678
|
}
|
|
675
|
-
var
|
|
676
|
-
primary:
|
|
677
|
-
color: ${({ theme: e }) =>
|
|
679
|
+
var be = {
|
|
680
|
+
primary: o`
|
|
681
|
+
color: ${({ theme: e }) => A(e).colors.primary};
|
|
678
682
|
|
|
679
683
|
&:hover {
|
|
680
|
-
background: ${({ theme: e }) =>
|
|
684
|
+
background: ${({ theme: e }) => J(A(e).colors.primary, "18%")};
|
|
681
685
|
}
|
|
682
686
|
|
|
683
687
|
&:active,
|
|
684
688
|
&[data-pressed='true'] {
|
|
685
|
-
background: ${({ theme: e }) =>
|
|
689
|
+
background: ${({ theme: e }) => w(J(A(e).colors.primary, "18%"), A(e).colors.ink)};
|
|
686
690
|
}
|
|
687
691
|
`,
|
|
688
|
-
secondary:
|
|
689
|
-
color: ${({ theme: e }) =>
|
|
692
|
+
secondary: o`
|
|
693
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
690
694
|
|
|
691
695
|
&:hover {
|
|
692
|
-
background: ${({ theme: e }) =>
|
|
696
|
+
background: ${({ theme: e }) => J(A(e).colors.text, "12%")};
|
|
693
697
|
}
|
|
694
698
|
|
|
695
699
|
&:active,
|
|
696
700
|
&[data-pressed='true'] {
|
|
697
|
-
background: ${({ theme: e }) =>
|
|
701
|
+
background: ${({ theme: e }) => w(J(A(e).colors.text, "12%"), A(e).colors.ink)};
|
|
698
702
|
}
|
|
699
703
|
`
|
|
700
|
-
},
|
|
704
|
+
}, xe = s.a`
|
|
701
705
|
display: inline-flex;
|
|
702
706
|
align-items: center;
|
|
703
707
|
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 }) =>
|
|
708
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
709
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
710
|
+
font-size: ${({ theme: e }) => A(e).button.fontSize};
|
|
711
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
712
|
+
text-transform: ${({ theme: e }) => A(e).button.textTransform};
|
|
713
|
+
text-decoration: ${({ theme: e }) => A(e).button.textDecoration};
|
|
710
714
|
cursor: pointer;
|
|
711
715
|
transition:
|
|
712
716
|
background-color 0.15s ease,
|
|
713
717
|
transform 0.15s ease,
|
|
714
718
|
box-shadow 0.15s ease;
|
|
715
719
|
|
|
716
|
-
${
|
|
720
|
+
${I("iconLink")}
|
|
717
721
|
|
|
718
|
-
border: ${({ theme: e }) =>
|
|
719
|
-
box-shadow: ${({ theme: e }) =>
|
|
722
|
+
border: ${({ theme: e }) => A(e).iconLink.border};
|
|
723
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.button};
|
|
720
724
|
|
|
721
725
|
&:active,
|
|
722
726
|
&[data-pressed='true'] {
|
|
723
|
-
transform: ${({ theme: e }) => `translate(${
|
|
727
|
+
transform: ${({ theme: e }) => `translate(${A(e).shadow.offsetX}, ${A(e).shadow.offsetY})`};
|
|
724
728
|
box-shadow: none;
|
|
725
729
|
}
|
|
726
730
|
|
|
727
|
-
${({ $size: e }) =>
|
|
728
|
-
${({ $shape: e }) =>
|
|
729
|
-
${({ $ghost: e, $variant: t }) => e ?
|
|
730
|
-
${
|
|
731
|
-
${
|
|
732
|
-
` :
|
|
731
|
+
${({ $size: e }) => ge[e]}
|
|
732
|
+
${({ $shape: e }) => ve[e]}
|
|
733
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
734
|
+
${ye}
|
|
735
|
+
${be[t]}
|
|
736
|
+
` : _e[t]}
|
|
733
737
|
`;
|
|
734
738
|
// src/components/atoms/AIconLink/AIconLink.tsx
|
|
735
|
-
function
|
|
736
|
-
let { pressed:
|
|
737
|
-
onPointerDown:
|
|
738
|
-
onPointerUp:
|
|
739
|
-
onPointerCancel:
|
|
740
|
-
onLostPointerCapture:
|
|
739
|
+
function Y({ children: e, icon: t, variant: n = "primary", size: r = "md", shape: i = "square", ghost: a = !1, onPointerDown: o, onPointerUp: s, onPointerCancel: l, onLostPointerCapture: u, ...d }) {
|
|
740
|
+
let { pressed: f, pressHandlers: p } = H({
|
|
741
|
+
onPointerDown: o,
|
|
742
|
+
onPointerUp: s,
|
|
743
|
+
onPointerCancel: l,
|
|
744
|
+
onLostPointerCapture: u
|
|
741
745
|
});
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
$ghost:
|
|
744
|
-
$shape:
|
|
745
|
-
$size:
|
|
746
|
-
$variant:
|
|
747
|
-
"data-pressed":
|
|
748
|
-
...
|
|
749
|
-
...
|
|
750
|
-
children: /* @__PURE__ */
|
|
751
|
-
|
|
746
|
+
return /* @__PURE__ */ c(xe, {
|
|
747
|
+
$ghost: a,
|
|
748
|
+
$shape: i,
|
|
749
|
+
$size: r,
|
|
750
|
+
$variant: n,
|
|
751
|
+
"data-pressed": f ? "true" : void 0,
|
|
752
|
+
...d,
|
|
753
|
+
...p,
|
|
754
|
+
children: /* @__PURE__ */ c(G, {
|
|
755
|
+
icon: t,
|
|
756
|
+
size: r,
|
|
752
757
|
style: { color: "inherit" },
|
|
753
758
|
children: e
|
|
754
759
|
})
|
|
755
760
|
});
|
|
756
761
|
}
|
|
757
762
|
// src/components/atoms/AInput/AInput.styles.ts
|
|
758
|
-
var
|
|
759
|
-
color: ${({ theme: e }) =>
|
|
760
|
-
font-size: ${({ theme: e }) =>
|
|
761
|
-
font-weight: ${({ theme: e }) =>
|
|
762
|
-
`,
|
|
763
|
+
var Se = o`
|
|
764
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
765
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
766
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
767
|
+
`, Ce = o`
|
|
763
768
|
box-sizing: border-box;
|
|
764
769
|
width: 100%;
|
|
765
|
-
|
|
766
|
-
border: ${({ theme: e }) =>
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
color: ${({ theme: e }) => v(e).colors.text};
|
|
770
|
+
border: ${({ theme: e }) => A(e).formControl.border};
|
|
771
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
772
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${A(e).formControl.padding} ${A(e).formControl.trailingActionPadding} ${A(e).formControl.padding} ${A(e).formControl.padding}` : A(e).formControl.padding};
|
|
773
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
774
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
771
775
|
font: inherit;
|
|
772
|
-
font-size: ${({ theme: e }) =>
|
|
776
|
+
font-size: ${({ theme: e }) => A(e).formControl.fontSize};
|
|
773
777
|
|
|
774
|
-
${
|
|
778
|
+
${I("formControl")}
|
|
775
779
|
|
|
776
780
|
&:disabled {
|
|
777
781
|
cursor: not-allowed;
|
|
778
|
-
opacity: ${({ theme: e }) =>
|
|
782
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabled};
|
|
779
783
|
}
|
|
780
784
|
|
|
781
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
782
|
-
border-color: ${
|
|
785
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
786
|
+
border-color: ${A(t).colors.error};
|
|
783
787
|
`}
|
|
784
788
|
|
|
785
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
786
|
-
border-color: ${
|
|
789
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
790
|
+
border-color: ${A(n).colors.warning};
|
|
787
791
|
`}
|
|
788
|
-
`,
|
|
789
|
-
color: ${({ theme: e, $type: t }) =>
|
|
790
|
-
font-size: ${({ theme: e }) =>
|
|
791
|
-
`,
|
|
792
|
-
${
|
|
793
|
-
`,
|
|
794
|
-
${xe}
|
|
795
|
-
`, Ee = c.div`
|
|
796
|
-
position: relative;
|
|
797
|
-
`, De = c.input`
|
|
792
|
+
`, we = o`
|
|
793
|
+
color: ${({ theme: e, $type: t }) => A(e).colors[t]};
|
|
794
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
795
|
+
`, Te = s.div`
|
|
796
|
+
${N}
|
|
797
|
+
`, Ee = s.label`
|
|
798
798
|
${Se}
|
|
799
|
+
`, De = s.div`
|
|
800
|
+
position: relative;
|
|
801
|
+
`, Oe = s.input`
|
|
802
|
+
${Ce}
|
|
799
803
|
|
|
800
804
|
&:focus,
|
|
801
805
|
&:focus-visible {
|
|
802
|
-
${({ $invalid: e, $warning: t, theme: n }) => e ?
|
|
803
|
-
border-color: ${
|
|
804
|
-
` : t ?
|
|
805
|
-
border-color: ${
|
|
806
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
807
|
+
border-color: ${A(n).colors.error};
|
|
808
|
+
` : t ? o`
|
|
809
|
+
border-color: ${A(n).colors.warning};
|
|
806
810
|
` : ""}
|
|
807
811
|
/* TODO: This prevents the outline from appearing when navigating with the Tab key */
|
|
808
812
|
outline: none;
|
|
809
813
|
}
|
|
810
|
-
`,
|
|
814
|
+
`, ke = s(q)`
|
|
811
815
|
position: absolute;
|
|
812
816
|
top: 50%;
|
|
813
|
-
right: ${({ theme: e }) =>
|
|
817
|
+
right: ${({ theme: e }) => A(e).space.md};
|
|
814
818
|
translate: 0 -50%;
|
|
815
|
-
`,
|
|
816
|
-
${
|
|
819
|
+
`, X = s.div`
|
|
820
|
+
${we}
|
|
817
821
|
`;
|
|
818
822
|
// src/components/atoms/AInput/AInput.tsx
|
|
819
|
-
function Ae({
|
|
820
|
-
|
|
821
|
-
fill: "none",
|
|
822
|
-
viewBox: "0 0 24 24",
|
|
823
|
-
children: [/* @__PURE__ */ l("path", {
|
|
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
|
-
stroke: "currentColor",
|
|
826
|
-
strokeLinecap: "round",
|
|
827
|
-
strokeLinejoin: "round",
|
|
828
|
-
strokeWidth: "1.8"
|
|
829
|
-
}), e ? /* @__PURE__ */ l("path", {
|
|
830
|
-
d: "m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8",
|
|
831
|
-
stroke: "currentColor",
|
|
832
|
-
strokeLinecap: "round",
|
|
833
|
-
strokeWidth: "1.8"
|
|
834
|
-
}) : /* @__PURE__ */ l("circle", {
|
|
835
|
-
cx: "12",
|
|
836
|
-
cy: "12",
|
|
837
|
-
r: "2.5",
|
|
838
|
-
stroke: "currentColor",
|
|
839
|
-
strokeWidth: "1.8"
|
|
840
|
-
})]
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
function je({ type: e = "text", id: t, label: r, error: a, warning: o, disabled: s, ref: c, "aria-describedby": d, "aria-invalid": f, ...p }) {
|
|
844
|
-
let m = n(), h = t ?? m, g = `${h}-error`, _ = `${h}-warning`, [v, y] = i(!1), b = !!a || f === !0 || f === "true", x = [
|
|
823
|
+
function Ae({ type: e = "text", id: n, label: i, error: a, warning: o, disabled: s, ref: u, "aria-describedby": d, "aria-invalid": f, ...h }) {
|
|
824
|
+
let g = t(), _ = n ?? g, v = `${_}-error`, y = `${_}-warning`, [b, x] = r(!1), S = !!a || f === !0 || f === "true", C = [
|
|
845
825
|
d,
|
|
846
|
-
a ?
|
|
847
|
-
o ?
|
|
826
|
+
a ? v : void 0,
|
|
827
|
+
o ? y : void 0
|
|
848
828
|
].filter(Boolean).join(" ") || void 0;
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
|
|
851
|
-
htmlFor:
|
|
852
|
-
children:
|
|
829
|
+
return /* @__PURE__ */ l(Te, { children: [
|
|
830
|
+
i ? /* @__PURE__ */ c(Ee, {
|
|
831
|
+
htmlFor: _,
|
|
832
|
+
children: i
|
|
853
833
|
}) : null,
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
...
|
|
834
|
+
/* @__PURE__ */ l(De, { children: [/* @__PURE__ */ c(Oe, {
|
|
835
|
+
...h,
|
|
856
836
|
$hasTrailingAction: e === "password",
|
|
857
|
-
$invalid:
|
|
837
|
+
$invalid: S,
|
|
858
838
|
$warning: !!o,
|
|
859
|
-
"aria-describedby":
|
|
860
|
-
"aria-invalid":
|
|
839
|
+
"aria-describedby": C,
|
|
840
|
+
"aria-invalid": S || void 0,
|
|
861
841
|
disabled: s,
|
|
862
|
-
id:
|
|
863
|
-
ref:
|
|
864
|
-
type: e === "password" &&
|
|
865
|
-
}), e === "password" ? /* @__PURE__ */
|
|
866
|
-
"aria-label":
|
|
867
|
-
"aria-pressed":
|
|
842
|
+
id: _,
|
|
843
|
+
ref: u,
|
|
844
|
+
type: e === "password" && b ? "text" : e
|
|
845
|
+
}), e === "password" ? /* @__PURE__ */ c(ke, {
|
|
846
|
+
"aria-label": b ? "Hide password" : "Show password",
|
|
847
|
+
"aria-pressed": b,
|
|
868
848
|
disabled: s,
|
|
869
849
|
ghost: !0,
|
|
870
850
|
onClick: () => {
|
|
871
|
-
|
|
851
|
+
x((e) => !e);
|
|
872
852
|
},
|
|
873
853
|
shape: "rounded",
|
|
874
|
-
size: "
|
|
854
|
+
size: "sm",
|
|
875
855
|
type: "button",
|
|
876
856
|
variant: "primary",
|
|
877
|
-
|
|
878
|
-
size: "md",
|
|
879
|
-
style: { color: "inherit" },
|
|
880
|
-
title: v ? "Hide password" : "Show password",
|
|
881
|
-
children: /* @__PURE__ */ l(Ae, { visible: v })
|
|
882
|
-
})
|
|
857
|
+
icon: b ? m : p
|
|
883
858
|
}) : null] }),
|
|
884
|
-
a ? /* @__PURE__ */
|
|
859
|
+
a ? /* @__PURE__ */ c(X, {
|
|
885
860
|
$type: "error",
|
|
886
|
-
id:
|
|
861
|
+
id: v,
|
|
887
862
|
role: "alert",
|
|
888
863
|
children: a
|
|
889
864
|
}) : null,
|
|
890
|
-
o ? /* @__PURE__ */
|
|
865
|
+
o ? /* @__PURE__ */ c(X, {
|
|
891
866
|
$type: "warning",
|
|
892
|
-
id:
|
|
867
|
+
id: y,
|
|
893
868
|
role: "status",
|
|
894
869
|
children: o
|
|
895
870
|
}) : null
|
|
896
871
|
] });
|
|
897
872
|
}
|
|
898
873
|
// src/components/atoms/ALink/ALink.styles.ts
|
|
899
|
-
var
|
|
900
|
-
primary:
|
|
901
|
-
background: ${({ theme: e }) =>
|
|
902
|
-
color: ${({ theme: e }) =>
|
|
874
|
+
var je = P("link"), Me = {
|
|
875
|
+
primary: o`
|
|
876
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
877
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
903
878
|
|
|
904
879
|
&:hover:not(:disabled) {
|
|
905
|
-
background: ${({ theme: e }) =>
|
|
880
|
+
background: ${({ theme: e }) => w(A(e).colors.primary, A(e).colors.ink)};
|
|
906
881
|
}
|
|
907
882
|
`,
|
|
908
|
-
secondary:
|
|
909
|
-
background: ${({ theme: e }) =>
|
|
910
|
-
color: ${({ theme: e }) =>
|
|
883
|
+
secondary: o`
|
|
884
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
885
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
911
886
|
|
|
912
887
|
&:hover:not(:disabled) {
|
|
913
|
-
background: ${({ theme: e }) =>
|
|
888
|
+
background: ${({ theme: e }) => w(A(e).colors.secondary, A(e).colors.ink)};
|
|
914
889
|
}
|
|
915
890
|
`
|
|
916
|
-
},
|
|
891
|
+
}, Ne = s.a`
|
|
917
892
|
display: inline-flex;
|
|
918
893
|
align-items: center;
|
|
919
894
|
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 }) =>
|
|
895
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
896
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
897
|
+
font-size: ${({ theme: e }) => A(e).link.fontSize};
|
|
898
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
899
|
+
text-transform: ${({ theme: e }) => A(e).link.textTransform};
|
|
900
|
+
text-decoration: ${({ theme: e }) => A(e).link.textDecoration};
|
|
926
901
|
cursor: pointer;
|
|
927
902
|
transition:
|
|
928
903
|
background-color 0.15s ease,
|
|
929
904
|
transform 0.15s ease,
|
|
930
905
|
box-shadow 0.15s ease;
|
|
931
906
|
|
|
932
|
-
${
|
|
907
|
+
${I("link")}
|
|
933
908
|
|
|
934
|
-
border: ${({ theme: e }) =>
|
|
935
|
-
box-shadow: ${({ theme: e }) =>
|
|
936
|
-
border-radius: ${({ theme: e }) =>
|
|
937
|
-
padding: ${({ theme: e }) =>
|
|
909
|
+
border: ${({ theme: e }) => A(e).link.border};
|
|
910
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.link};
|
|
911
|
+
border-radius: ${({ theme: e }) => A(e).link.borderRadius};
|
|
912
|
+
padding: ${({ theme: e }) => A(e).link.padding};
|
|
938
913
|
|
|
939
914
|
white-space: nowrap;
|
|
940
915
|
|
|
941
916
|
&:active,
|
|
942
917
|
&[data-pressed='true'] {
|
|
943
|
-
transform: ${({ theme: e }) => `translate(${
|
|
918
|
+
transform: ${({ theme: e }) => `translate(${A(e).shadow.offsetX}, ${A(e).shadow.offsetY})`};
|
|
944
919
|
box-shadow: none;
|
|
945
920
|
}
|
|
946
921
|
|
|
947
|
-
${({ $variant: e }) =>
|
|
948
|
-
${({ $size: e }) =>
|
|
922
|
+
${({ $variant: e }) => Me[e]}
|
|
923
|
+
${({ $size: e }) => je[e]}
|
|
949
924
|
`;
|
|
950
925
|
// src/components/atoms/ALink/ALink.tsx
|
|
951
|
-
function
|
|
952
|
-
let { pressed:
|
|
926
|
+
function Z({ children: e, variant: t = "primary", size: n = "md", onPointerDown: r, onPointerUp: i, onPointerCancel: a, onLostPointerCapture: o, ...s }) {
|
|
927
|
+
let { pressed: l, pressHandlers: u } = H({
|
|
953
928
|
onPointerDown: r,
|
|
954
929
|
onPointerUp: i,
|
|
955
930
|
onPointerCancel: a,
|
|
956
931
|
onLostPointerCapture: o
|
|
957
932
|
});
|
|
958
|
-
return /* @__PURE__ */
|
|
933
|
+
return /* @__PURE__ */ c(Ne, {
|
|
959
934
|
$size: n,
|
|
960
935
|
$variant: t,
|
|
961
|
-
"data-pressed":
|
|
936
|
+
"data-pressed": l ? "true" : void 0,
|
|
962
937
|
...s,
|
|
963
938
|
...u,
|
|
964
939
|
children: e
|
|
965
940
|
});
|
|
966
941
|
}
|
|
967
942
|
// src/components/atoms/ALogo/ALogo.styles.ts
|
|
968
|
-
var
|
|
969
|
-
--logo-size: ${({ theme: e }) =>
|
|
943
|
+
var Pe = s.div`
|
|
944
|
+
--logo-size: ${({ theme: e }) => A(e).logo.size};
|
|
970
945
|
|
|
971
946
|
display: inline-flex;
|
|
972
947
|
align-items: center;
|
|
973
948
|
justify-content: center;
|
|
974
|
-
gap: ${({ theme: e }) =>
|
|
949
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
975
950
|
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 }) =>
|
|
951
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
952
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
953
|
+
font-size: ${({ theme: e }) => A(e).logo.fontSize};
|
|
954
|
+
font-weight: ${({ theme: e }) => A(e).logo.fontWeight};
|
|
955
|
+
white-space: ${({ theme: e }) => A(e).logo.whiteSpace};
|
|
981
956
|
|
|
982
957
|
& > span:first-child > svg,
|
|
983
958
|
& > span:first-child img {
|
|
@@ -988,180 +963,156 @@ var Ie = c.div`
|
|
|
988
963
|
object-fit: contain;
|
|
989
964
|
}
|
|
990
965
|
|
|
991
|
-
${({ $variant: e, theme: t }) => e === "icon" &&
|
|
992
|
-
width: ${
|
|
993
|
-
height: ${
|
|
966
|
+
${({ $variant: e, theme: t }) => e === "icon" && o`
|
|
967
|
+
width: ${A(t).logo.size};
|
|
968
|
+
height: ${A(t).logo.size};
|
|
994
969
|
`}
|
|
995
|
-
`,
|
|
970
|
+
`, Fe = s.span`
|
|
996
971
|
overflow: hidden;
|
|
997
972
|
text-overflow: ellipsis;
|
|
998
973
|
`;
|
|
999
974
|
// src/components/atoms/ALogo/ALogo.tsx
|
|
1000
|
-
function
|
|
1001
|
-
return /* @__PURE__ */
|
|
975
|
+
function Ie({ logo: e, name: t, variant: n = "full", ...r }) {
|
|
976
|
+
return /* @__PURE__ */ l(Pe, {
|
|
1002
977
|
...r,
|
|
1003
978
|
$variant: n,
|
|
1004
979
|
role: n === "icon" ? "img" : void 0,
|
|
1005
980
|
"aria-label": n === "icon" ? t : r["aria-label"],
|
|
1006
|
-
children: [/* @__PURE__ */
|
|
981
|
+
children: [/* @__PURE__ */ c("span", {
|
|
1007
982
|
"aria-hidden": "true",
|
|
1008
983
|
children: e
|
|
1009
|
-
}), n === "full" ? /* @__PURE__ */
|
|
984
|
+
}), n === "full" ? /* @__PURE__ */ c(Fe, { children: t }) : null]
|
|
1010
985
|
});
|
|
1011
986
|
}
|
|
1012
987
|
// src/components/atoms/ASearchInput/ASearchInput.styles.ts
|
|
1013
|
-
var
|
|
988
|
+
var Le = o`
|
|
1014
989
|
box-sizing: border-box;
|
|
1015
990
|
width: 100%;
|
|
1016
|
-
|
|
1017
|
-
border: ${({ theme: e }) =>
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
color: ${({ theme: e }) => v(e).colors.text};
|
|
991
|
+
border: ${({ theme: e }) => A(e).formControl.border};
|
|
992
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
993
|
+
padding: ${({ theme: e }) => A(e).formControl.padding};
|
|
994
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
995
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1022
996
|
font: inherit;
|
|
1023
|
-
font-size: ${({ theme: e }) =>
|
|
1024
|
-
`,
|
|
1025
|
-
${
|
|
1026
|
-
`,
|
|
997
|
+
font-size: ${({ theme: e }) => A(e).formControl.fontSize};
|
|
998
|
+
`, Re = s.div`
|
|
999
|
+
${N}
|
|
1000
|
+
`, ze = s.div`
|
|
1027
1001
|
position: relative;
|
|
1028
|
-
`,
|
|
1029
|
-
${
|
|
1030
|
-
padding-right: ${({ theme: e }) =>
|
|
1002
|
+
`, Be = s.input`
|
|
1003
|
+
${Le}
|
|
1004
|
+
padding-right: ${({ theme: e }) => A(e).formControl.trailingActionPadding};
|
|
1031
1005
|
|
|
1032
1006
|
/* TODO: Outline styles should be implemented for each form ui elements */
|
|
1033
1007
|
|
|
1034
1008
|
&:disabled {
|
|
1035
1009
|
cursor: not-allowed;
|
|
1036
|
-
opacity: ${({ theme: e }) =>
|
|
1010
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabled};
|
|
1037
1011
|
}
|
|
1038
|
-
`,
|
|
1012
|
+
`, Ve = s(q)`
|
|
1039
1013
|
position: absolute;
|
|
1040
1014
|
top: 50%;
|
|
1041
|
-
right: ${({ theme: e }) =>
|
|
1015
|
+
right: ${({ theme: e }) => A(e).space.md};
|
|
1042
1016
|
translate: 0 -50%;
|
|
1043
|
-
`,
|
|
1017
|
+
`, He = s.ul`
|
|
1044
1018
|
position: absolute;
|
|
1045
1019
|
z-index: 10;
|
|
1046
1020
|
top: 100%;
|
|
1047
1021
|
right: 0;
|
|
1048
1022
|
left: 0;
|
|
1049
|
-
max-height: ${({ theme: e }) =>
|
|
1023
|
+
max-height: ${({ theme: e }) => A(e).formControl.optionListMaxHeight};
|
|
1050
1024
|
margin: 0;
|
|
1051
1025
|
padding: 0;
|
|
1052
1026
|
overflow: auto;
|
|
1053
|
-
border: ${({ theme: e }) =>
|
|
1054
|
-
border-radius: ${({ theme: e }) =>
|
|
1055
|
-
background: ${({ theme: e }) =>
|
|
1027
|
+
border: ${({ theme: e }) => A(e).formControl.dropdownBorder};
|
|
1028
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
1029
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
1056
1030
|
list-style: none;
|
|
1057
|
-
`,
|
|
1058
|
-
${
|
|
1059
|
-
background: ${({ theme: e, $active: t }) => t ?
|
|
1060
|
-
color: ${({ theme: e }) =>
|
|
1031
|
+
`, Ue = s.li`
|
|
1032
|
+
${F}
|
|
1033
|
+
background: ${({ theme: e, $active: t }) => t ? A(e).colors.secondaryHover : "transparent"};
|
|
1034
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1061
1035
|
cursor: pointer;
|
|
1062
1036
|
`;
|
|
1063
1037
|
// src/components/atoms/ASearchInput/ASearchInput.tsx
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
cx: "10.8",
|
|
1070
|
-
cy: "10.8",
|
|
1071
|
-
r: "6.3",
|
|
1072
|
-
stroke: "currentColor",
|
|
1073
|
-
strokeWidth: "1.8"
|
|
1074
|
-
}), /* @__PURE__ */ l("path", {
|
|
1075
|
-
d: "m15.5 15.5 4 4",
|
|
1076
|
-
stroke: "currentColor",
|
|
1077
|
-
strokeLinecap: "round",
|
|
1078
|
-
strokeWidth: "1.8"
|
|
1079
|
-
})]
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
function qe({ options: e, value: a, defaultValue: o = "", debounceMs: s = 300, onSearch: c, onSelect: d, onChange: f, onFocus: p, onBlur: m, id: h, disabled: g, ref: _, ...v }) {
|
|
1083
|
-
let y = n(), b = h ?? y, x = `${b}-options`, S = r(null), C = r(!1), w = r(null), [T, E] = i(o), [D, O] = i(!1), [k, A] = i(-1), j = a ?? T, ee = a !== void 0, M = j.trim().toLocaleLowerCase(), N = M ? e.filter((e) => e.label.toLocaleLowerCase().includes(M) || String(e.value).toLocaleLowerCase().includes(M)) : [], P = D && N.length > 0;
|
|
1084
|
-
t(() => {
|
|
1085
|
-
if (!C.current) {
|
|
1086
|
-
C.current = !0;
|
|
1038
|
+
function We({ 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, ...y }) {
|
|
1039
|
+
let b = t(), x = h ?? b, S = `${x}-options`, C = n(null), w = n(!1), T = n(null), [E, D] = r(o), [O, k] = r(!1), [A, j] = r(-1), M = a ?? E, N = a !== void 0, P = M.trim().toLocaleLowerCase(), F = P ? i.filter((e) => e.label.toLocaleLowerCase().includes(P) || String(e.value).toLocaleLowerCase().includes(P)) : [], I = O && F.length > 0;
|
|
1040
|
+
e(() => {
|
|
1041
|
+
if (!w.current) {
|
|
1042
|
+
w.current = !0;
|
|
1087
1043
|
return;
|
|
1088
1044
|
}
|
|
1089
|
-
if (!
|
|
1045
|
+
if (!u) return;
|
|
1090
1046
|
let e = setTimeout(() => {
|
|
1091
|
-
|
|
1047
|
+
T.current = null, u(M);
|
|
1092
1048
|
}, s);
|
|
1093
|
-
return
|
|
1094
|
-
clearTimeout(e),
|
|
1049
|
+
return T.current = e, () => {
|
|
1050
|
+
clearTimeout(e), T.current === e && (T.current = null);
|
|
1095
1051
|
};
|
|
1096
1052
|
}, [
|
|
1097
1053
|
s,
|
|
1098
|
-
|
|
1099
|
-
|
|
1054
|
+
u,
|
|
1055
|
+
M
|
|
1100
1056
|
]);
|
|
1101
|
-
let
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1104
|
-
e.relatedTarget instanceof Node &&
|
|
1105
|
-
},
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1108
|
-
e.key === "ArrowDown" &&
|
|
1057
|
+
let L = (e) => {
|
|
1058
|
+
N || D(e.currentTarget.value), j(-1), f?.(e);
|
|
1059
|
+
}, R = (e) => {
|
|
1060
|
+
e.relatedTarget instanceof Node && C.current?.querySelector("[role=\"listbox\"]")?.contains(e.relatedTarget) || (k(!1), j(-1), m?.(e));
|
|
1061
|
+
}, z = (e) => {
|
|
1062
|
+
N || D(e.label), d?.(e), k(!1);
|
|
1063
|
+
}, B = (e) => {
|
|
1064
|
+
e.key === "ArrowDown" && F.length > 0 ? (e.preventDefault(), k(!0), j((e) => (e + 1) % F.length)) : e.key === "ArrowUp" && F.length > 0 ? (e.preventDefault(), k(!0), j((e) => e <= 0 ? F.length - 1 : e - 1)) : e.key === "Enter" && I && F[A] ? (e.preventDefault(), z(F[A])) : e.key === "Escape" && (k(!1), j(-1)), y.onKeyDown?.(e);
|
|
1109
1065
|
};
|
|
1110
|
-
return /* @__PURE__ */
|
|
1111
|
-
ref:
|
|
1112
|
-
children: /* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
...
|
|
1115
|
-
"aria-activedescendant":
|
|
1066
|
+
return /* @__PURE__ */ c(Re, {
|
|
1067
|
+
ref: C,
|
|
1068
|
+
children: /* @__PURE__ */ l(ze, { children: [
|
|
1069
|
+
/* @__PURE__ */ c(Be, {
|
|
1070
|
+
...y,
|
|
1071
|
+
"aria-activedescendant": I && A >= 0 ? `${S}-option-${String(A)}` : void 0,
|
|
1116
1072
|
"aria-autocomplete": "list",
|
|
1117
|
-
"aria-controls":
|
|
1118
|
-
"aria-expanded":
|
|
1073
|
+
"aria-controls": I ? S : void 0,
|
|
1074
|
+
"aria-expanded": I,
|
|
1119
1075
|
"aria-haspopup": "listbox",
|
|
1120
1076
|
autoComplete: "off",
|
|
1121
1077
|
disabled: g,
|
|
1122
|
-
id:
|
|
1123
|
-
onBlur:
|
|
1124
|
-
onChange:
|
|
1078
|
+
id: x,
|
|
1079
|
+
onBlur: R,
|
|
1080
|
+
onChange: L,
|
|
1125
1081
|
onFocus: (e) => {
|
|
1126
|
-
|
|
1082
|
+
k(!0), p && p(e);
|
|
1127
1083
|
},
|
|
1128
|
-
onKeyDown:
|
|
1129
|
-
ref:
|
|
1084
|
+
onKeyDown: B,
|
|
1085
|
+
ref: v,
|
|
1130
1086
|
role: "combobox",
|
|
1131
|
-
value:
|
|
1087
|
+
value: M
|
|
1132
1088
|
}),
|
|
1133
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ c(Ve, {
|
|
1134
1090
|
"aria-label": "Search",
|
|
1135
1091
|
disabled: g,
|
|
1136
1092
|
ghost: !0,
|
|
1137
1093
|
onClick: () => {
|
|
1138
|
-
|
|
1094
|
+
T.current &&= (clearTimeout(T.current), null), u?.(M);
|
|
1139
1095
|
},
|
|
1140
1096
|
shape: "rounded",
|
|
1141
|
-
size: "
|
|
1097
|
+
size: "sm",
|
|
1142
1098
|
type: "button",
|
|
1143
1099
|
variant: "primary",
|
|
1144
|
-
|
|
1145
|
-
size: "md",
|
|
1146
|
-
style: { color: "inherit" },
|
|
1147
|
-
title: "Search",
|
|
1148
|
-
children: /* @__PURE__ */ l(Ke, {})
|
|
1149
|
-
})
|
|
1100
|
+
icon: _
|
|
1150
1101
|
}),
|
|
1151
|
-
|
|
1152
|
-
id:
|
|
1102
|
+
I ? /* @__PURE__ */ c(He, {
|
|
1103
|
+
id: S,
|
|
1153
1104
|
role: "listbox",
|
|
1154
|
-
children:
|
|
1155
|
-
"aria-selected": t ===
|
|
1156
|
-
id: `${
|
|
1105
|
+
children: F.map((e, t) => /* @__PURE__ */ c(Ue, {
|
|
1106
|
+
"aria-selected": t === A,
|
|
1107
|
+
id: `${S}-option-${String(t)}`,
|
|
1157
1108
|
onClick: () => {
|
|
1158
|
-
|
|
1109
|
+
z(e);
|
|
1159
1110
|
},
|
|
1160
1111
|
onMouseDown: (e) => {
|
|
1161
1112
|
e.preventDefault();
|
|
1162
1113
|
},
|
|
1163
1114
|
role: "option",
|
|
1164
|
-
$active: t ===
|
|
1115
|
+
$active: t === A,
|
|
1165
1116
|
children: e.label
|
|
1166
1117
|
}, `${String(e.value)}-${e.label}`))
|
|
1167
1118
|
}) : null
|
|
@@ -1169,103 +1120,111 @@ function qe({ options: e, value: a, defaultValue: o = "", debounceMs: s = 300, o
|
|
|
1169
1120
|
});
|
|
1170
1121
|
}
|
|
1171
1122
|
// 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 ?
|
|
1123
|
+
var Ge = s.section`
|
|
1124
|
+
border: ${({ theme: e }) => A(e).section.border};
|
|
1125
|
+
border-radius: ${({ theme: e }) => A(e).section.borderRadius};
|
|
1126
|
+
padding: ${({ theme: e }) => A(e).section.padding};
|
|
1127
|
+
background-color: ${({ theme: e }) => A(e).colors.surface};
|
|
1128
|
+
box-shadow: ${({ $shadow: e, theme: t }) => e ? A(t).shadow.section : "none"};
|
|
1178
1129
|
`;
|
|
1179
1130
|
// src/components/atoms/ASection/ASection.tsx
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */
|
|
1131
|
+
function Ke({ children: e, shadow: t = !1, ...n }) {
|
|
1132
|
+
return /* @__PURE__ */ c(Ge, {
|
|
1182
1133
|
$shadow: t,
|
|
1183
1134
|
...n,
|
|
1184
1135
|
children: e
|
|
1185
1136
|
});
|
|
1186
1137
|
}
|
|
1187
1138
|
// src/components/atoms/ASelect/ASelect.styles.ts
|
|
1188
|
-
var
|
|
1189
|
-
color: ${({ theme: e }) =>
|
|
1190
|
-
font-size: ${({ theme: e }) =>
|
|
1191
|
-
font-weight: ${({ theme: e }) =>
|
|
1192
|
-
`,
|
|
1139
|
+
var qe = o`
|
|
1140
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1141
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
1142
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
1143
|
+
`, Je = o`
|
|
1193
1144
|
box-sizing: border-box;
|
|
1194
1145
|
width: 100%;
|
|
1195
|
-
|
|
1196
|
-
border: ${({ theme: e }) =>
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
color: ${({ theme: e }) => v(e).colors.text};
|
|
1146
|
+
border: ${({ theme: e }) => A(e).formControl.border};
|
|
1147
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
1148
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${A(e).formControl.padding} ${A(e).formControl.trailingActionPadding} ${A(e).formControl.padding} ${A(e).formControl.padding}` : A(e).formControl.padding};
|
|
1149
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
1150
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1201
1151
|
font: inherit;
|
|
1202
|
-
font-size: ${({ theme: e }) =>
|
|
1152
|
+
font-size: ${({ theme: e }) => A(e).formControl.fontSize};
|
|
1203
1153
|
|
|
1204
|
-
${
|
|
1154
|
+
${I("formControl")}
|
|
1205
1155
|
|
|
1206
1156
|
&:disabled {
|
|
1207
1157
|
cursor: not-allowed;
|
|
1208
|
-
opacity: ${({ theme: e }) =>
|
|
1158
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabled};
|
|
1209
1159
|
}
|
|
1210
1160
|
|
|
1211
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
1212
|
-
border-color: ${
|
|
1161
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1162
|
+
border-color: ${A(t).colors.error};
|
|
1213
1163
|
`}
|
|
1214
1164
|
|
|
1215
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
1216
|
-
border-color: ${
|
|
1165
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1166
|
+
border-color: ${A(n).colors.warning};
|
|
1217
1167
|
`}
|
|
1218
|
-
`,
|
|
1219
|
-
color: ${({ theme: e, $type: t }) =>
|
|
1220
|
-
font-size: ${({ theme: e }) =>
|
|
1221
|
-
`,
|
|
1222
|
-
${
|
|
1223
|
-
`,
|
|
1168
|
+
`, Ye = o`
|
|
1169
|
+
color: ${({ theme: e, $type: t }) => A(e).colors[t]};
|
|
1170
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
1171
|
+
`, Xe = s.div`
|
|
1172
|
+
${N}
|
|
1173
|
+
`, Ze = s.div`
|
|
1174
|
+
position: relative;
|
|
1175
|
+
`, Qe = s.label`
|
|
1176
|
+
${qe}
|
|
1177
|
+
`, $e = s.div`
|
|
1178
|
+
${Je}
|
|
1224
1179
|
position: relative;
|
|
1225
|
-
`, tt = c.label`
|
|
1226
|
-
${Xe}
|
|
1227
|
-
`, nt = c.div`
|
|
1228
|
-
${Ze}
|
|
1229
1180
|
display: flex;
|
|
1230
1181
|
align-items: center;
|
|
1231
|
-
justify-content: space-between;
|
|
1232
|
-
gap: ${({ theme: e }) => v(e).space.lg};
|
|
1233
1182
|
text-align: left;
|
|
1234
1183
|
cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
1235
1184
|
|
|
1236
|
-
${({ $disabled: e }) => e &&
|
|
1237
|
-
opacity: ${({ theme: e }) =>
|
|
1185
|
+
${({ $disabled: e }) => e && o`
|
|
1186
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabled};
|
|
1238
1187
|
`}
|
|
1239
|
-
`,
|
|
1188
|
+
`, et = s.div`
|
|
1240
1189
|
position: absolute;
|
|
1241
1190
|
z-index: 10;
|
|
1242
1191
|
top: 100%;
|
|
1243
1192
|
right: 0;
|
|
1244
1193
|
left: 0;
|
|
1245
|
-
max-height: ${({ theme: e }) =>
|
|
1194
|
+
max-height: ${({ theme: e }) => A(e).formControl.optionListMaxHeight};
|
|
1246
1195
|
overflow: auto;
|
|
1247
|
-
border: ${({ theme: e }) =>
|
|
1248
|
-
border-radius: ${({ theme: e }) =>
|
|
1249
|
-
background: ${({ theme: e }) =>
|
|
1250
|
-
`,
|
|
1196
|
+
border: ${({ theme: e }) => A(e).formControl.dropdownBorder};
|
|
1197
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
1198
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
1199
|
+
`, tt = s.button`
|
|
1251
1200
|
display: block;
|
|
1252
1201
|
width: 100%;
|
|
1253
|
-
${
|
|
1202
|
+
${F}
|
|
1254
1203
|
border: 0;
|
|
1255
1204
|
border-radius: 0;
|
|
1256
|
-
background: ${({ theme: e, $selected: t }) => t ?
|
|
1257
|
-
color: ${({ theme: e }) =>
|
|
1205
|
+
background: ${({ theme: e, $selected: t }) => t ? A(e).colors.secondary : "transparent"};
|
|
1206
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1258
1207
|
font: inherit;
|
|
1259
1208
|
text-align: left;
|
|
1260
|
-
text-transform: ${({ theme: e }) =>
|
|
1209
|
+
text-transform: ${({ theme: e }) => A(e).formControl.optionTextTransform};
|
|
1261
1210
|
cursor: pointer;
|
|
1262
1211
|
|
|
1263
1212
|
&:hover,
|
|
1264
1213
|
&:focus-visible {
|
|
1265
|
-
background: ${({ theme: e }) =>
|
|
1214
|
+
background: ${({ theme: e }) => A(e).colors.secondaryHover};
|
|
1266
1215
|
outline: none;
|
|
1267
1216
|
}
|
|
1268
|
-
`,
|
|
1217
|
+
`, nt = s(q)`
|
|
1218
|
+
position: absolute;
|
|
1219
|
+
top: 50%;
|
|
1220
|
+
right: ${({ theme: e }) => A(e).space.md};
|
|
1221
|
+
translate: 0 -50%;
|
|
1222
|
+
|
|
1223
|
+
svg {
|
|
1224
|
+
transform: ${({ $open: e }) => e ? "rotate(180deg)" : "none"};
|
|
1225
|
+
transition: transform 120ms ease;
|
|
1226
|
+
}
|
|
1227
|
+
`, rt = s.select`
|
|
1269
1228
|
position: absolute;
|
|
1270
1229
|
width: 1px;
|
|
1271
1230
|
height: 1px;
|
|
@@ -1274,138 +1233,126 @@ var Xe = s`
|
|
|
1274
1233
|
clip: rect(0, 0, 0, 0);
|
|
1275
1234
|
white-space: nowrap;
|
|
1276
1235
|
border: 0;
|
|
1277
|
-
`,
|
|
1236
|
+
`, it = s.span`
|
|
1278
1237
|
overflow: hidden;
|
|
1279
|
-
color: ${({ theme: e, $placeholder: t }) => t ?
|
|
1238
|
+
color: ${({ theme: e, $placeholder: t }) => t ? A(e).colors.muted : "inherit"};
|
|
1280
1239
|
text-overflow: ellipsis;
|
|
1281
1240
|
white-space: nowrap;
|
|
1282
|
-
`,
|
|
1283
|
-
${
|
|
1241
|
+
`, Q = s.div`
|
|
1242
|
+
${Ye}
|
|
1284
1243
|
`;
|
|
1285
1244
|
// src/components/atoms/ASelect/ASelect.tsx
|
|
1286
|
-
function
|
|
1287
|
-
let
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1245
|
+
function at({ options: i, value: a, defaultValue: o, onChange: s, onValueChange: d, onBlur: f, id: p, name: m, label: h, placeholder: g = "Select an option", error: _, warning: v, disabled: y, required: b, ref: x, "aria-describedby": S, "aria-invalid": C, ...w }) {
|
|
1246
|
+
let T = t(), E = p ?? T, D = `${E}-options`, O = `${E}-error`, k = `${E}-warning`, A = n(null), j = n(null), M = n(null), [N, P] = r(o), [F, I] = r(!1), L = a ?? N, R = i.find((e) => String(e.value) === String(L)), z = !!_ || C === !0 || C === "true", B = [
|
|
1247
|
+
S,
|
|
1248
|
+
_ ? O : void 0,
|
|
1249
|
+
v ? k : void 0
|
|
1250
|
+
].filter(Boolean).join(" ") || void 0, V = (e) => {
|
|
1292
1251
|
s?.(e);
|
|
1293
1252
|
};
|
|
1294
|
-
|
|
1295
|
-
if (!
|
|
1253
|
+
e(() => {
|
|
1254
|
+
if (!F) return;
|
|
1296
1255
|
let e = (e) => {
|
|
1297
|
-
e.target instanceof Node &&
|
|
1256
|
+
e.target instanceof Node && A.current?.contains(e.target) || I(!1);
|
|
1298
1257
|
};
|
|
1299
1258
|
return document.addEventListener("pointerdown", e), () => {
|
|
1300
1259
|
document.removeEventListener("pointerdown", e);
|
|
1301
1260
|
};
|
|
1302
|
-
}, [
|
|
1303
|
-
|
|
1304
|
-
}, [
|
|
1305
|
-
let
|
|
1306
|
-
a === void 0 &&
|
|
1307
|
-
let t =
|
|
1261
|
+
}, [F]), e(() => {
|
|
1262
|
+
F && (A.current?.querySelector("[role=\"option\"][aria-selected=\"true\"]") ?? A.current?.querySelector("[role=\"option\"]"))?.focus();
|
|
1263
|
+
}, [F]);
|
|
1264
|
+
let H = (e) => {
|
|
1265
|
+
a === void 0 && P(e), d?.(e);
|
|
1266
|
+
let t = j.current;
|
|
1308
1267
|
t && (t.value = String(e), t.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
1309
|
-
},
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1312
|
-
let
|
|
1313
|
-
|
|
1268
|
+
}, U = (e) => {
|
|
1269
|
+
A.current?.contains(e.relatedTarget) || (I(!1), j.current?.dispatchEvent(new FocusEvent("focusout", { bubbles: !0 })));
|
|
1270
|
+
}, W = (e, t) => {
|
|
1271
|
+
let n;
|
|
1272
|
+
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(), I(!1), M.current?.focus()) : n !== void 0 && (e.preventDefault(), A.current?.querySelectorAll("[role=\"option\"]")[n]?.focus());
|
|
1314
1273
|
};
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
ref:
|
|
1274
|
+
return /* @__PURE__ */ l(Xe, {
|
|
1275
|
+
ref: A,
|
|
1317
1276
|
children: [
|
|
1318
|
-
|
|
1319
|
-
htmlFor:
|
|
1320
|
-
children:
|
|
1277
|
+
h ? /* @__PURE__ */ c(Qe, {
|
|
1278
|
+
htmlFor: E,
|
|
1279
|
+
children: h
|
|
1321
1280
|
}) : null,
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1324
|
-
...
|
|
1281
|
+
/* @__PURE__ */ l(Ze, { children: [
|
|
1282
|
+
/* @__PURE__ */ l(rt, {
|
|
1283
|
+
...w,
|
|
1325
1284
|
"aria-hidden": "true",
|
|
1326
|
-
"aria-invalid":
|
|
1327
|
-
disabled:
|
|
1328
|
-
id: `${
|
|
1329
|
-
name:
|
|
1330
|
-
onBlur:
|
|
1331
|
-
onChange:
|
|
1285
|
+
"aria-invalid": z || void 0,
|
|
1286
|
+
disabled: y,
|
|
1287
|
+
id: `${E}-native`,
|
|
1288
|
+
name: m,
|
|
1289
|
+
onBlur: f,
|
|
1290
|
+
onChange: V,
|
|
1332
1291
|
ref: (e) => {
|
|
1333
|
-
|
|
1292
|
+
j.current = e, typeof x == "function" ? x(e) : x && (x.current = e);
|
|
1334
1293
|
},
|
|
1335
|
-
required:
|
|
1294
|
+
required: b,
|
|
1336
1295
|
tabIndex: -1,
|
|
1337
|
-
value:
|
|
1338
|
-
children: [/* @__PURE__ */
|
|
1296
|
+
value: L === void 0 ? "" : String(L),
|
|
1297
|
+
children: [/* @__PURE__ */ c("option", {
|
|
1339
1298
|
value: "",
|
|
1340
|
-
children:
|
|
1341
|
-
}),
|
|
1299
|
+
children: g
|
|
1300
|
+
}), i.map((e) => /* @__PURE__ */ c("option", {
|
|
1342
1301
|
value: String(e.value),
|
|
1343
1302
|
children: e.label
|
|
1344
1303
|
}, String(e.value)))]
|
|
1345
1304
|
}),
|
|
1346
|
-
/* @__PURE__ */
|
|
1305
|
+
/* @__PURE__ */ l($e, {
|
|
1347
1306
|
onClick: () => {
|
|
1348
|
-
|
|
1307
|
+
y || I((e) => !e);
|
|
1349
1308
|
},
|
|
1350
|
-
$disabled: !!
|
|
1351
|
-
$
|
|
1352
|
-
$
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
"aria-
|
|
1359
|
-
"aria-
|
|
1309
|
+
$disabled: !!y,
|
|
1310
|
+
$hasTrailingAction: !0,
|
|
1311
|
+
$invalid: z,
|
|
1312
|
+
$warning: !!v,
|
|
1313
|
+
children: [/* @__PURE__ */ c(it, {
|
|
1314
|
+
$placeholder: !R,
|
|
1315
|
+
children: R?.label ?? g
|
|
1316
|
+
}), /* @__PURE__ */ c(nt, {
|
|
1317
|
+
"aria-controls": D,
|
|
1318
|
+
"aria-describedby": B,
|
|
1319
|
+
"aria-expanded": F,
|
|
1360
1320
|
"aria-haspopup": "listbox",
|
|
1361
|
-
"aria-invalid":
|
|
1362
|
-
"aria-label":
|
|
1363
|
-
disabled:
|
|
1321
|
+
"aria-invalid": z || void 0,
|
|
1322
|
+
"aria-label": h ?? g,
|
|
1323
|
+
disabled: y,
|
|
1364
1324
|
ghost: !0,
|
|
1365
|
-
id:
|
|
1366
|
-
onBlur:
|
|
1325
|
+
id: E,
|
|
1326
|
+
onBlur: U,
|
|
1367
1327
|
onClick: (e) => {
|
|
1368
|
-
e.stopPropagation(),
|
|
1328
|
+
e.stopPropagation(), I((e) => !e);
|
|
1369
1329
|
},
|
|
1370
1330
|
onKeyDown: (e) => {
|
|
1371
|
-
e.key === "Escape" ?
|
|
1331
|
+
e.key === "Escape" ? I(!1) : F || e.key !== "ArrowDown" && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), I(!0));
|
|
1372
1332
|
},
|
|
1373
|
-
ref:
|
|
1333
|
+
ref: M,
|
|
1374
1334
|
shape: "rounded",
|
|
1375
|
-
size: "
|
|
1335
|
+
size: "sm",
|
|
1376
1336
|
type: "button",
|
|
1377
1337
|
variant: "primary",
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
style: {
|
|
1381
|
-
transform: N ? "rotate(180deg)" : "rotate(0)",
|
|
1382
|
-
transition: "transform 120ms ease"
|
|
1383
|
-
},
|
|
1384
|
-
viewBox: "0 0 24 24",
|
|
1385
|
-
children: /* @__PURE__ */ l("path", {
|
|
1386
|
-
d: "m6 9 6 6 6-6",
|
|
1387
|
-
stroke: "currentColor",
|
|
1388
|
-
strokeLinecap: "round",
|
|
1389
|
-
strokeLinejoin: "round",
|
|
1390
|
-
strokeWidth: "2"
|
|
1391
|
-
})
|
|
1392
|
-
})
|
|
1338
|
+
$open: F,
|
|
1339
|
+
icon: u
|
|
1393
1340
|
})]
|
|
1394
1341
|
}),
|
|
1395
|
-
|
|
1396
|
-
id:
|
|
1342
|
+
F ? /* @__PURE__ */ c(et, {
|
|
1343
|
+
id: D,
|
|
1397
1344
|
role: "listbox",
|
|
1398
|
-
"aria-label":
|
|
1399
|
-
children:
|
|
1400
|
-
let n = String(e.value) === String(
|
|
1401
|
-
return /* @__PURE__ */
|
|
1345
|
+
"aria-label": h,
|
|
1346
|
+
children: i.map((e, t) => {
|
|
1347
|
+
let n = String(e.value) === String(L ?? "");
|
|
1348
|
+
return /* @__PURE__ */ c(tt, {
|
|
1402
1349
|
"aria-selected": n,
|
|
1403
1350
|
onClick: () => {
|
|
1404
|
-
|
|
1351
|
+
H(e.value), I(!1), M.current?.focus();
|
|
1405
1352
|
},
|
|
1406
|
-
onBlur:
|
|
1353
|
+
onBlur: U,
|
|
1407
1354
|
onKeyDown: (e) => {
|
|
1408
|
-
|
|
1355
|
+
W(e, t);
|
|
1409
1356
|
},
|
|
1410
1357
|
role: "option",
|
|
1411
1358
|
tabIndex: -1,
|
|
@@ -1416,83 +1363,83 @@ function ct({ options: e, value: a, defaultValue: o, onChange: s, onValueChange:
|
|
|
1416
1363
|
})
|
|
1417
1364
|
}) : null
|
|
1418
1365
|
] }),
|
|
1419
|
-
|
|
1366
|
+
_ ? /* @__PURE__ */ c(Q, {
|
|
1420
1367
|
$type: "error",
|
|
1421
|
-
id:
|
|
1368
|
+
id: O,
|
|
1422
1369
|
role: "alert",
|
|
1423
|
-
children:
|
|
1370
|
+
children: _
|
|
1424
1371
|
}) : null,
|
|
1425
|
-
|
|
1372
|
+
v ? /* @__PURE__ */ c(Q, {
|
|
1426
1373
|
$type: "warning",
|
|
1427
|
-
id:
|
|
1374
|
+
id: k,
|
|
1428
1375
|
role: "status",
|
|
1429
|
-
children:
|
|
1376
|
+
children: v
|
|
1430
1377
|
}) : null
|
|
1431
1378
|
]
|
|
1432
1379
|
});
|
|
1433
1380
|
}
|
|
1434
1381
|
// 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
|
-
`,
|
|
1382
|
+
var ot = s.div`
|
|
1383
|
+
${N}
|
|
1384
|
+
`, st = s.label`
|
|
1385
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1386
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
1387
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
1388
|
+
`, ct = s.textarea`
|
|
1442
1389
|
box-sizing: border-box;
|
|
1443
1390
|
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 }) =>
|
|
1391
|
+
height: ${({ $height: e, theme: t }) => e == null ? A(t).formControl.textareaHeight : typeof e == "number" ? `${e.toString()}px` : e};
|
|
1392
|
+
min-height: ${({ theme: e }) => A(e).formControl.textareaHeight};
|
|
1393
|
+
border: ${({ theme: e }) => A(e).formControl.border};
|
|
1394
|
+
border-radius: ${({ theme: e }) => A(e).formControl.borderRadius};
|
|
1395
|
+
padding: ${({ theme: e }) => A(e).formControl.padding};
|
|
1396
|
+
background: ${({ theme: e }) => A(e).colors.background};
|
|
1397
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1451
1398
|
font: inherit;
|
|
1452
|
-
font-size: ${({ theme: e }) =>
|
|
1399
|
+
font-size: ${({ theme: e }) => A(e).formControl.fontSize};
|
|
1453
1400
|
resize: ${({ $resizable: e }) => e ? "vertical" : "none"};
|
|
1454
1401
|
|
|
1455
|
-
${
|
|
1402
|
+
${I("formControl")}
|
|
1456
1403
|
|
|
1457
1404
|
&:disabled {
|
|
1458
1405
|
cursor: not-allowed;
|
|
1459
|
-
opacity: ${({ theme: e }) =>
|
|
1406
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabled};
|
|
1460
1407
|
}
|
|
1461
1408
|
|
|
1462
|
-
${({ $invalid: e, theme: t }) => e &&
|
|
1463
|
-
border-color: ${
|
|
1409
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1410
|
+
border-color: ${A(t).colors.error};
|
|
1464
1411
|
`}
|
|
1465
1412
|
|
|
1466
|
-
${({ $invalid: e, $warning: t, theme: n }) => !e && t &&
|
|
1467
|
-
border-color: ${
|
|
1413
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1414
|
+
border-color: ${A(n).colors.warning};
|
|
1468
1415
|
`}
|
|
1469
1416
|
|
|
1470
1417
|
&:focus,
|
|
1471
1418
|
&:focus-visible {
|
|
1472
|
-
${({ $invalid: e, $warning: t, theme: n }) => e ?
|
|
1473
|
-
border-color: ${
|
|
1474
|
-
` : t ?
|
|
1475
|
-
border-color: ${
|
|
1419
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
1420
|
+
border-color: ${A(n).colors.error};
|
|
1421
|
+
` : t ? o`
|
|
1422
|
+
border-color: ${A(n).colors.warning};
|
|
1476
1423
|
` : ""}
|
|
1477
1424
|
outline: none;
|
|
1478
1425
|
}
|
|
1479
|
-
`,
|
|
1480
|
-
color: ${({ theme: e, $type: t }) =>
|
|
1481
|
-
font-size: ${({ theme: e }) =>
|
|
1426
|
+
`, $ = s.div`
|
|
1427
|
+
color: ${({ theme: e, $type: t }) => A(e).colors[t]};
|
|
1428
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
1482
1429
|
`;
|
|
1483
1430
|
// src/components/atoms/ATextarea/ATextarea.tsx
|
|
1484
|
-
function
|
|
1485
|
-
let p =
|
|
1486
|
-
|
|
1431
|
+
function lt({ id: e, label: n, error: r, warning: i, height: a, resizable: o = !1, ref: s, "aria-describedby": u, "aria-invalid": d, ...f }) {
|
|
1432
|
+
let p = t(), m = e ?? p, h = `${m}-error`, g = `${m}-warning`, _ = !!r || d === !0 || d === "true", v = [
|
|
1433
|
+
u,
|
|
1487
1434
|
r ? h : void 0,
|
|
1488
1435
|
i ? g : void 0
|
|
1489
1436
|
].filter(Boolean).join(" ") || void 0;
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
|
|
1437
|
+
return /* @__PURE__ */ l(ot, { children: [
|
|
1438
|
+
n ? /* @__PURE__ */ c(st, {
|
|
1492
1439
|
htmlFor: m,
|
|
1493
|
-
children:
|
|
1440
|
+
children: n
|
|
1494
1441
|
}) : null,
|
|
1495
|
-
/* @__PURE__ */
|
|
1442
|
+
/* @__PURE__ */ c(ct, {
|
|
1496
1443
|
...f,
|
|
1497
1444
|
$height: a,
|
|
1498
1445
|
$invalid: _,
|
|
@@ -1503,13 +1450,13 @@ function pt({ id: e, label: t, error: r, warning: i, height: a, resizable: o = !
|
|
|
1503
1450
|
id: m,
|
|
1504
1451
|
ref: s
|
|
1505
1452
|
}),
|
|
1506
|
-
r ? /* @__PURE__ */
|
|
1453
|
+
r ? /* @__PURE__ */ c($, {
|
|
1507
1454
|
$type: "error",
|
|
1508
1455
|
id: h,
|
|
1509
1456
|
role: "alert",
|
|
1510
1457
|
children: r
|
|
1511
1458
|
}) : null,
|
|
1512
|
-
i ? /* @__PURE__ */
|
|
1459
|
+
i ? /* @__PURE__ */ c($, {
|
|
1513
1460
|
$type: "warning",
|
|
1514
1461
|
id: g,
|
|
1515
1462
|
role: "status",
|
|
@@ -1518,19 +1465,20 @@ function pt({ id: e, label: t, error: r, warning: i, height: a, resizable: o = !
|
|
|
1518
1465
|
] });
|
|
1519
1466
|
}
|
|
1520
1467
|
// src/components/atoms/ATypography/ATypography.styles.ts
|
|
1521
|
-
var
|
|
1522
|
-
color: ${({ theme: e }) =>
|
|
1523
|
-
font-family: ${({ theme: e }) =>
|
|
1468
|
+
var ut = s.p`
|
|
1469
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1470
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1471
|
+
margin: 0;
|
|
1524
1472
|
font-size: ${({ theme: e, $fontSize: t, $tag: n }) => {
|
|
1525
1473
|
if (t !== void 0) return t;
|
|
1526
|
-
let r =
|
|
1474
|
+
let r = A(e).typography;
|
|
1527
1475
|
return n && Object.hasOwn(r, n) ? r[n] : r.fallback;
|
|
1528
1476
|
}};
|
|
1529
1477
|
`;
|
|
1530
1478
|
// src/components/atoms/ATypography/ATypography.tsx
|
|
1531
|
-
function
|
|
1479
|
+
function dt({ tag: e, as: t, fontSize: n, ...r }) {
|
|
1532
1480
|
let i = e ?? t ?? "p";
|
|
1533
|
-
return /* @__PURE__ */
|
|
1481
|
+
return /* @__PURE__ */ c(ut, {
|
|
1534
1482
|
$tag: typeof i == "string" ? i : void 0,
|
|
1535
1483
|
$fontSize: n,
|
|
1536
1484
|
as: i,
|
|
@@ -1538,15 +1486,15 @@ function ht({ tag: e, as: t, fontSize: n, ...r }) {
|
|
|
1538
1486
|
});
|
|
1539
1487
|
}
|
|
1540
1488
|
// src/components/molecules/MModal/MModal.styles.ts
|
|
1541
|
-
var
|
|
1489
|
+
var ft = o`
|
|
1542
1490
|
position: fixed;
|
|
1543
1491
|
inset: 0;
|
|
1544
1492
|
z-index: 1000;
|
|
1545
1493
|
display: flex;
|
|
1546
1494
|
align-items: center;
|
|
1547
1495
|
justify-content: center;
|
|
1548
|
-
padding: ${({ theme: e }) =>
|
|
1549
|
-
`,
|
|
1496
|
+
padding: ${({ theme: e }) => A(e).space.lg};
|
|
1497
|
+
`, pt = o`
|
|
1550
1498
|
position: absolute;
|
|
1551
1499
|
inset: 0;
|
|
1552
1500
|
border: none;
|
|
@@ -1554,1275 +1502,113 @@ var gt = s`
|
|
|
1554
1502
|
cursor: pointer;
|
|
1555
1503
|
background: color-mix(
|
|
1556
1504
|
in srgb,
|
|
1557
|
-
${({ theme: e }) =>
|
|
1505
|
+
${({ theme: e }) => A(e).colors.bg} 25%,
|
|
1558
1506
|
transparent
|
|
1559
1507
|
);
|
|
1560
|
-
`,
|
|
1508
|
+
`, mt = o`
|
|
1561
1509
|
position: relative;
|
|
1562
1510
|
z-index: 1;
|
|
1563
1511
|
box-sizing: border-box;
|
|
1564
1512
|
display: flex;
|
|
1565
1513
|
flex-direction: column;
|
|
1566
1514
|
width: 100%;
|
|
1567
|
-
max-width: ${({ theme: e }) =>
|
|
1568
|
-
max-height: ${({ theme: e }) =>
|
|
1569
|
-
padding: ${({ theme: e }) =>
|
|
1515
|
+
max-width: ${({ theme: e }) => A(e).modal.maxWidth};
|
|
1516
|
+
max-height: ${({ theme: e }) => A(e).modal.maxHeight};
|
|
1517
|
+
padding: ${({ theme: e }) => A(e).modal.padding};
|
|
1570
1518
|
overflow: hidden;
|
|
1571
|
-
background-color: ${({ theme: e }) =>
|
|
1572
|
-
border: ${({ theme: e }) =>
|
|
1573
|
-
border-radius: ${({ theme: e }) =>
|
|
1574
|
-
box-shadow: ${({ theme: e }) =>
|
|
1575
|
-
`,
|
|
1519
|
+
background-color: ${({ theme: e }) => A(e).colors.surface};
|
|
1520
|
+
border: ${({ theme: e }) => A(e).modal.border};
|
|
1521
|
+
border-radius: ${({ theme: e }) => A(e).modal.borderRadius};
|
|
1522
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.modal};
|
|
1523
|
+
`, ht = o`
|
|
1576
1524
|
display: flex;
|
|
1577
1525
|
align-items: center;
|
|
1578
1526
|
justify-content: space-between;
|
|
1579
|
-
gap: ${({ theme: e }) =>
|
|
1527
|
+
gap: ${({ theme: e }) => A(e).space.md};
|
|
1580
1528
|
flex-shrink: 0;
|
|
1581
|
-
`,
|
|
1529
|
+
`, gt = o`
|
|
1582
1530
|
margin: 0;
|
|
1583
1531
|
min-width: 0;
|
|
1584
1532
|
flex: 1;
|
|
1585
|
-
font-family: ${({ theme: e }) =>
|
|
1586
|
-
font-size: ${({ theme: e }) =>
|
|
1587
|
-
font-weight: ${({ theme: e }) =>
|
|
1588
|
-
color: ${({ theme: e }) =>
|
|
1589
|
-
`,
|
|
1533
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1534
|
+
font-size: ${({ theme: e }) => A(e).modal.title.fontSize};
|
|
1535
|
+
font-weight: ${({ theme: e }) => A(e).modal.title.fontWeight};
|
|
1536
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1537
|
+
`, _t = o`
|
|
1590
1538
|
flex: 1;
|
|
1591
1539
|
min-height: 0;
|
|
1592
|
-
margin-top: ${({ theme: e }) =>
|
|
1540
|
+
margin-top: ${({ theme: e }) => A(e).space.lg};
|
|
1593
1541
|
overflow-x: hidden;
|
|
1594
1542
|
overflow-y: auto;
|
|
1595
|
-
font-family: ${({ theme: e }) =>
|
|
1596
|
-
font-size: ${({ theme: e }) =>
|
|
1597
|
-
color: ${({ theme: e }) =>
|
|
1598
|
-
`,
|
|
1543
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1544
|
+
font-size: ${({ theme: e }) => A(e).modal.body.fontSize};
|
|
1545
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1546
|
+
`, vt = s.div`
|
|
1547
|
+
${ft}
|
|
1548
|
+
`, yt = s.button`
|
|
1549
|
+
${pt}
|
|
1550
|
+
`, bt = s.div`
|
|
1551
|
+
${mt}
|
|
1552
|
+
`, xt = s.div`
|
|
1553
|
+
${ht}
|
|
1554
|
+
`, St = s.h2`
|
|
1599
1555
|
${gt}
|
|
1600
|
-
`, Ct =
|
|
1556
|
+
`, Ct = s.div`
|
|
1601
1557
|
${_t}
|
|
1602
|
-
`, wt = c.div`
|
|
1603
|
-
${vt}
|
|
1604
|
-
`, Tt = c.div`
|
|
1605
|
-
${yt}
|
|
1606
|
-
`, Et = c.h2`
|
|
1607
|
-
${bt}
|
|
1608
|
-
`, Dt = c.div`
|
|
1609
|
-
${xt}
|
|
1610
1558
|
`;
|
|
1611
1559
|
// src/components/molecules/MModal/MModal.tsx
|
|
1612
|
-
function
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
})
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
function kt({ open: e, onClose: i, title: a, children: o, closeLabel: s = "Close" }) {
|
|
1622
|
-
let c = n(), f = r(null);
|
|
1623
|
-
return t(() => {
|
|
1624
|
-
if (!e) return;
|
|
1625
|
-
f.current?.focus();
|
|
1626
|
-
let t = document.body.style.overflow;
|
|
1560
|
+
function wt({ open: r, onClose: i, title: a, children: o, closeLabel: s = "Close" }) {
|
|
1561
|
+
let u = t(), d = n(null);
|
|
1562
|
+
return e(() => {
|
|
1563
|
+
if (!r) return;
|
|
1564
|
+
d.current?.focus();
|
|
1565
|
+
let e = document.body.style.overflow;
|
|
1627
1566
|
document.body.style.overflow = "hidden";
|
|
1628
|
-
let
|
|
1567
|
+
let t = (e) => {
|
|
1629
1568
|
e.key === "Escape" && i();
|
|
1630
1569
|
};
|
|
1631
|
-
return document.addEventListener("keydown",
|
|
1632
|
-
document.body.style.overflow =
|
|
1570
|
+
return document.addEventListener("keydown", t), () => {
|
|
1571
|
+
document.body.style.overflow = e, document.removeEventListener("keydown", t);
|
|
1633
1572
|
};
|
|
1634
|
-
}, [
|
|
1573
|
+
}, [r, i]), !r || typeof document > "u" ? null : x(/* @__PURE__ */ l(vt, { children: [/* @__PURE__ */ c(yt, {
|
|
1635
1574
|
type: "button",
|
|
1636
1575
|
"aria-label": "Close overlay",
|
|
1637
1576
|
onClick: i
|
|
1638
|
-
}), /* @__PURE__ */
|
|
1639
|
-
ref:
|
|
1577
|
+
}), /* @__PURE__ */ l(bt, {
|
|
1578
|
+
ref: d,
|
|
1640
1579
|
role: "dialog",
|
|
1641
1580
|
"aria-modal": "true",
|
|
1642
|
-
"aria-labelledby":
|
|
1581
|
+
"aria-labelledby": u,
|
|
1643
1582
|
tabIndex: -1,
|
|
1644
|
-
children: [/* @__PURE__ */
|
|
1645
|
-
id:
|
|
1583
|
+
children: [/* @__PURE__ */ l(xt, { children: [/* @__PURE__ */ c(St, {
|
|
1584
|
+
id: u,
|
|
1646
1585
|
children: a
|
|
1647
|
-
}), /* @__PURE__ */
|
|
1586
|
+
}), /* @__PURE__ */ c(q, {
|
|
1648
1587
|
"aria-label": s,
|
|
1649
1588
|
ghost: !0,
|
|
1650
1589
|
onClick: i,
|
|
1651
1590
|
shape: "rounded",
|
|
1652
1591
|
size: "md",
|
|
1653
1592
|
variant: "primary",
|
|
1654
|
-
|
|
1655
|
-
})] }), o == null ? null : /* @__PURE__ */
|
|
1593
|
+
icon: b
|
|
1594
|
+
})] }), o == null ? null : /* @__PURE__ */ c(Ct, { children: o })]
|
|
1656
1595
|
})] }), document.body);
|
|
1657
1596
|
}
|
|
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
1597
|
// src/components/molecules/MNavLinks/MNavLinks.styles.ts
|
|
2812
|
-
var
|
|
1598
|
+
var Tt = o`
|
|
2813
1599
|
display: inline-flex;
|
|
2814
1600
|
align-items: center;
|
|
2815
1601
|
justify-content: center;
|
|
2816
1602
|
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 }) =>
|
|
1603
|
+
padding: ${({ theme: e }) => A(e).navLinks.itemPadding};
|
|
1604
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.link};
|
|
1605
|
+
background: ${({ theme: e }) => A(e).colors.primary};
|
|
1606
|
+
color: ${({ theme: e }) => A(e).colors.primaryText};
|
|
1607
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1608
|
+
font-size: ${({ theme: e }) => A(e).navLinks.fontSize};
|
|
1609
|
+
font-weight: ${({ theme: e }) => A(e).font.weight.semibold};
|
|
1610
|
+
text-decoration: ${({ theme: e }) => A(e).navLinks.textDecoration};
|
|
1611
|
+
text-transform: ${({ theme: e }) => A(e).navLinks.textTransform};
|
|
2826
1612
|
cursor: pointer;
|
|
2827
1613
|
position: relative;
|
|
2828
1614
|
z-index: 1;
|
|
@@ -2833,65 +1619,65 @@ var Qr = s`
|
|
|
2833
1619
|
transform 0.15s ease;
|
|
2834
1620
|
|
|
2835
1621
|
&:hover:not(:disabled) {
|
|
2836
|
-
background: ${({ theme: e }) =>
|
|
1622
|
+
background: ${({ theme: e }) => w(A(e).colors.primary, A(e).colors.ink)};
|
|
2837
1623
|
}
|
|
2838
1624
|
|
|
2839
1625
|
&:first-child {
|
|
2840
|
-
border-top-left-radius: ${({ theme: e }) =>
|
|
2841
|
-
border-bottom-left-radius: ${({ theme: e }) =>
|
|
1626
|
+
border-top-left-radius: ${({ theme: e }) => A(e).navLinks.borderRadius};
|
|
1627
|
+
border-bottom-left-radius: ${({ theme: e }) => A(e).navLinks.borderRadius};
|
|
2842
1628
|
}
|
|
2843
1629
|
|
|
2844
1630
|
&:last-child {
|
|
2845
|
-
border-top-right-radius: ${({ theme: e }) =>
|
|
2846
|
-
border-bottom-right-radius: ${({ theme: e }) =>
|
|
1631
|
+
border-top-right-radius: ${({ theme: e }) => A(e).navLinks.borderRadius};
|
|
1632
|
+
border-bottom-right-radius: ${({ theme: e }) => A(e).navLinks.borderRadius};
|
|
2847
1633
|
}
|
|
2848
1634
|
|
|
2849
|
-
${
|
|
1635
|
+
${I("navLinks")}
|
|
2850
1636
|
|
|
2851
1637
|
&:disabled {
|
|
2852
|
-
opacity: ${({ theme: e }) =>
|
|
1638
|
+
opacity: ${({ theme: e }) => A(e).opacity.disabledButton};
|
|
2853
1639
|
cursor: not-allowed;
|
|
2854
1640
|
}
|
|
2855
|
-
`,
|
|
1641
|
+
`, Et = s.nav`
|
|
2856
1642
|
display: inline-flex;
|
|
2857
1643
|
align-items: center;
|
|
2858
|
-
border-radius: ${({ theme: e }) =>
|
|
1644
|
+
border-radius: ${({ theme: e }) => A(e).navLinks.borderRadius};
|
|
2859
1645
|
padding: 0;
|
|
2860
|
-
box-shadow: ${({ theme: e }) =>
|
|
2861
|
-
font-family: ${({ theme: e }) =>
|
|
2862
|
-
font-size: ${({ theme: e }) =>
|
|
2863
|
-
text-transform: ${({ theme: e }) =>
|
|
1646
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.navLinks};
|
|
1647
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1648
|
+
font-size: ${({ theme: e }) => A(e).navLinks.fontSize};
|
|
1649
|
+
text-transform: ${({ theme: e }) => A(e).navLinks.textTransform};
|
|
2864
1650
|
|
|
2865
1651
|
& > a {
|
|
2866
|
-
${
|
|
1652
|
+
${Tt}
|
|
2867
1653
|
|
|
2868
|
-
border: ${({ theme: e }) =>
|
|
1654
|
+
border: ${({ theme: e }) => A(e).navLinks.border};
|
|
2869
1655
|
|
|
2870
1656
|
&:active,
|
|
2871
1657
|
&[aria-current='page'] {
|
|
2872
1658
|
z-index: 0;
|
|
2873
1659
|
box-shadow: none;
|
|
2874
1660
|
transform: translate(
|
|
2875
|
-
calc(0px + ${({ theme: e }) =>
|
|
2876
|
-
${({ theme: e }) =>
|
|
1661
|
+
calc(0px + ${({ theme: e }) => A(e).shadow.offsetX}),
|
|
1662
|
+
${({ theme: e }) => A(e).shadow.offsetY}
|
|
2877
1663
|
);
|
|
2878
1664
|
}
|
|
2879
1665
|
}
|
|
2880
|
-
`,
|
|
2881
|
-
${
|
|
1666
|
+
`, Dt = s.button`
|
|
1667
|
+
${Tt}
|
|
2882
1668
|
`;
|
|
2883
1669
|
// src/components/molecules/MNavLinks/MNavLinks.tsx
|
|
2884
|
-
function
|
|
2885
|
-
return /* @__PURE__ */
|
|
1670
|
+
function Ot({ links: e, ...t }) {
|
|
1671
|
+
return /* @__PURE__ */ c(Et, {
|
|
2886
1672
|
...t,
|
|
2887
|
-
children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */
|
|
1673
|
+
children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */ c(C, {
|
|
2888
1674
|
to: e.href,
|
|
2889
1675
|
className: e.className,
|
|
2890
1676
|
style: e.style,
|
|
2891
1677
|
end: e.end,
|
|
2892
1678
|
caseSensitive: e.caseSensitive,
|
|
2893
1679
|
children: e.label
|
|
2894
|
-
}, e.id) : /* @__PURE__ */
|
|
1680
|
+
}, e.id) : /* @__PURE__ */ c(Dt, {
|
|
2895
1681
|
type: "button",
|
|
2896
1682
|
disabled: e.disabled,
|
|
2897
1683
|
onClick: e.onClick,
|
|
@@ -2900,72 +1686,72 @@ function ti({ links: e, ...t }) {
|
|
|
2900
1686
|
});
|
|
2901
1687
|
}
|
|
2902
1688
|
// src/components/molecules/MUserBadge/MUserBadge.styles.ts
|
|
2903
|
-
var
|
|
1689
|
+
var kt = s.a`
|
|
2904
1690
|
display: inline-flex;
|
|
2905
1691
|
align-items: center;
|
|
2906
|
-
gap: ${({ theme: e }) =>
|
|
1692
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
2907
1693
|
color: inherit;
|
|
2908
|
-
font-family: ${({ theme: e }) =>
|
|
2909
|
-
text-decoration: ${({ theme: e }) =>
|
|
1694
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1695
|
+
text-decoration: ${({ theme: e }) => A(e).userBadge.textDecoration};
|
|
2910
1696
|
|
|
2911
|
-
${
|
|
1697
|
+
${I("userBadge")}
|
|
2912
1698
|
`;
|
|
2913
1699
|
// src/components/molecules/MUserBadge/MUserBadge.tsx
|
|
2914
|
-
function
|
|
1700
|
+
function At({ to: e, firstName: t, lastName: n, avatarSrc: r, size: i = "md", showName: a = !0, ...o }) {
|
|
2915
1701
|
let s = `${t} ${n}`.trim();
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
as:
|
|
1702
|
+
return /* @__PURE__ */ l(kt, {
|
|
1703
|
+
as: S,
|
|
2918
1704
|
to: e,
|
|
2919
1705
|
...o,
|
|
2920
|
-
children: [/* @__PURE__ */
|
|
1706
|
+
children: [/* @__PURE__ */ c(M, {
|
|
2921
1707
|
firstName: t,
|
|
2922
1708
|
lastName: n,
|
|
2923
1709
|
src: r,
|
|
2924
1710
|
alt: a ? "" : s,
|
|
2925
1711
|
size: i,
|
|
2926
1712
|
"aria-hidden": a ? !0 : void 0
|
|
2927
|
-
}), a ? /* @__PURE__ */
|
|
1713
|
+
}), a ? /* @__PURE__ */ c("span", { children: s }) : null]
|
|
2928
1714
|
});
|
|
2929
1715
|
}
|
|
2930
1716
|
// src/components/organisms/OSidebar/OSidebar.styles.ts
|
|
2931
|
-
var
|
|
1717
|
+
var jt = s.aside`
|
|
2932
1718
|
box-sizing: border-box;
|
|
2933
1719
|
display: flex;
|
|
2934
1720
|
flex: 0 0
|
|
2935
|
-
${({ $extended: e, theme: t }) => e ?
|
|
1721
|
+
${({ $extended: e, theme: t }) => e ? A(t).sidebar.width.extended : A(t).sidebar.width.compact};
|
|
2936
1722
|
flex-direction: column;
|
|
2937
|
-
gap: ${({ theme: e }) =>
|
|
2938
|
-
width: ${({ $extended: e, theme: t }) => e ?
|
|
2939
|
-
height: ${({ theme: e }) =>
|
|
2940
|
-
height: ${({ theme: e }) =>
|
|
1723
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
1724
|
+
width: ${({ $extended: e, theme: t }) => e ? A(t).sidebar.width.extended : A(t).sidebar.width.compact};
|
|
1725
|
+
height: ${({ theme: e }) => A(e).sidebar.height.fallback};
|
|
1726
|
+
height: ${({ theme: e }) => A(e).sidebar.height.dynamic};
|
|
2941
1727
|
min-height: 0;
|
|
2942
1728
|
overflow: hidden;
|
|
2943
|
-
padding: ${({ theme: e }) =>
|
|
2944
|
-
border: ${({ theme: e }) =>
|
|
2945
|
-
border-radius: ${({ theme: e }) =>
|
|
2946
|
-
background: ${({ theme: e }) =>
|
|
2947
|
-
box-shadow: ${({ theme: e }) =>
|
|
1729
|
+
padding: ${({ theme: e }) => A(e).space.inset};
|
|
1730
|
+
border: ${({ theme: e }) => A(e).sidebar.border};
|
|
1731
|
+
border-radius: ${({ theme: e }) => A(e).sidebar.borderRadius};
|
|
1732
|
+
background: ${({ theme: e }) => A(e).colors.surface};
|
|
1733
|
+
box-shadow: ${({ theme: e }) => A(e).shadow.sidebar};
|
|
2948
1734
|
transition:
|
|
2949
1735
|
width 0.2s ease,
|
|
2950
1736
|
flex-basis 0.2s ease;
|
|
2951
|
-
`,
|
|
1737
|
+
`, Mt = s.div`
|
|
2952
1738
|
display: flex;
|
|
2953
1739
|
flex-direction: column;
|
|
2954
1740
|
align-items: center;
|
|
2955
|
-
gap: ${({ theme: e }) =>
|
|
1741
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
2956
1742
|
align-items: ${({ $extended: e }) => e ? "flex-end" : "center"};
|
|
2957
|
-
`,
|
|
1743
|
+
`, Nt = s.nav`
|
|
2958
1744
|
display: flex;
|
|
2959
1745
|
min-height: 0;
|
|
2960
1746
|
flex: 1;
|
|
2961
1747
|
flex-direction: column;
|
|
2962
1748
|
align-items: stretch;
|
|
2963
|
-
gap: ${({ theme: e }) =>
|
|
2964
|
-
margin-inline: ${({ theme: e }) => `-${
|
|
2965
|
-
padding-inline: ${({ theme: e }) =>
|
|
1749
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
1750
|
+
margin-inline: ${({ theme: e }) => `-${A(e).space.xs}`};
|
|
1751
|
+
padding-inline: ${({ theme: e }) => A(e).space.xs};
|
|
2966
1752
|
overflow-y: auto;
|
|
2967
1753
|
overflow-x: hidden;
|
|
2968
|
-
`,
|
|
1754
|
+
`, Pt = s.div`
|
|
2969
1755
|
display: flex;
|
|
2970
1756
|
width: 100%;
|
|
2971
1757
|
min-width: 0;
|
|
@@ -2976,52 +1762,32 @@ var ii = c.aside`
|
|
|
2976
1762
|
min-width: 0;
|
|
2977
1763
|
justify-content: ${({ $extended: e }) => e ? "flex-start" : "center"};
|
|
2978
1764
|
}
|
|
2979
|
-
`,
|
|
1765
|
+
`, Ft = s.div`
|
|
2980
1766
|
display: flex;
|
|
2981
1767
|
flex-direction: column;
|
|
2982
|
-
gap: ${({ theme: e }) =>
|
|
1768
|
+
gap: ${({ theme: e }) => A(e).space.sm};
|
|
2983
1769
|
`;
|
|
2984
1770
|
// src/components/organisms/OSidebar/OSidebar.tsx
|
|
2985
|
-
function
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
children: e ? /* @__PURE__ */ l("path", {
|
|
2991
|
-
d: "m15 18-6-6 6-6",
|
|
2992
|
-
stroke: "currentColor",
|
|
2993
|
-
strokeWidth: "2",
|
|
2994
|
-
strokeLinecap: "round",
|
|
2995
|
-
strokeLinejoin: "round"
|
|
2996
|
-
}) : /* @__PURE__ */ l("path", {
|
|
2997
|
-
d: "m9 18 6-6-6-6",
|
|
2998
|
-
stroke: "currentColor",
|
|
2999
|
-
strokeWidth: "2",
|
|
3000
|
-
strokeLinecap: "round",
|
|
3001
|
-
strokeLinejoin: "round"
|
|
3002
|
-
})
|
|
3003
|
-
});
|
|
3004
|
-
}
|
|
3005
|
-
function ui({ links: e, logout: t, extended: n, defaultExtended: r = !1, onExtendedChange: a, navigationLabel: o = "Primary navigation", "aria-label": s = "Application sidebar", ...c }) {
|
|
3006
|
-
let [d, f] = i(r), p = n ?? d, [m, h] = i(p);
|
|
3007
|
-
function g() {
|
|
3008
|
-
let e = !p;
|
|
3009
|
-
e || h(!0), n === void 0 && f(e), a?.(e);
|
|
1771
|
+
function It({ links: e, logout: t, extended: n, defaultExtended: i = !1, onExtendedChange: a, navigationLabel: o = "Primary navigation", "aria-label": s = "Application sidebar", ...u }) {
|
|
1772
|
+
let [p, m] = r(i), h = n ?? p, [g, _] = r(h);
|
|
1773
|
+
function v() {
|
|
1774
|
+
let e = !h;
|
|
1775
|
+
e || _(!0), n === void 0 && m(e), a?.(e);
|
|
3010
1776
|
}
|
|
3011
|
-
function
|
|
3012
|
-
e.target === e.currentTarget && e.propertyName === "width" && h
|
|
1777
|
+
function y(e) {
|
|
1778
|
+
e.target === e.currentTarget && e.propertyName === "width" && _(h);
|
|
3013
1779
|
}
|
|
3014
|
-
function
|
|
3015
|
-
return /* @__PURE__ */
|
|
3016
|
-
$extended:
|
|
3017
|
-
children:
|
|
1780
|
+
function b(e) {
|
|
1781
|
+
return /* @__PURE__ */ c(Pt, {
|
|
1782
|
+
$extended: g,
|
|
1783
|
+
children: g ? /* @__PURE__ */ l(Z, {
|
|
3018
1784
|
href: e.href,
|
|
3019
|
-
children: [/* @__PURE__ */
|
|
1785
|
+
children: [/* @__PURE__ */ c(G, {
|
|
3020
1786
|
size: "md",
|
|
3021
1787
|
style: { color: "inherit" },
|
|
3022
1788
|
children: e.icon
|
|
3023
1789
|
}), e.label]
|
|
3024
|
-
}) : /* @__PURE__ */
|
|
1790
|
+
}) : /* @__PURE__ */ c(Y, {
|
|
3025
1791
|
href: e.href,
|
|
3026
1792
|
"aria-label": e.label,
|
|
3027
1793
|
title: e.label,
|
|
@@ -3029,34 +1795,34 @@ function ui({ links: e, logout: t, extended: n, defaultExtended: r = !1, onExten
|
|
|
3029
1795
|
})
|
|
3030
1796
|
}, e.id);
|
|
3031
1797
|
}
|
|
3032
|
-
return /* @__PURE__ */
|
|
3033
|
-
...
|
|
3034
|
-
$extended:
|
|
1798
|
+
return /* @__PURE__ */ l(jt, {
|
|
1799
|
+
...u,
|
|
1800
|
+
$extended: h,
|
|
3035
1801
|
"aria-label": s,
|
|
3036
|
-
"data-extended":
|
|
3037
|
-
onTransitionEnd:
|
|
1802
|
+
"data-extended": h,
|
|
1803
|
+
onTransitionEnd: y,
|
|
3038
1804
|
children: [
|
|
3039
|
-
/* @__PURE__ */
|
|
3040
|
-
$extended:
|
|
3041
|
-
children: /* @__PURE__ */
|
|
3042
|
-
"aria-label":
|
|
3043
|
-
"aria-expanded":
|
|
3044
|
-
onClick:
|
|
1805
|
+
/* @__PURE__ */ c(Mt, {
|
|
1806
|
+
$extended: h,
|
|
1807
|
+
children: /* @__PURE__ */ c(q, {
|
|
1808
|
+
"aria-label": h ? "Collapse sidebar" : "Expand sidebar",
|
|
1809
|
+
"aria-expanded": h,
|
|
1810
|
+
onClick: v,
|
|
3045
1811
|
size: "sm",
|
|
3046
1812
|
ghost: !0,
|
|
3047
|
-
|
|
1813
|
+
icon: h ? d : f
|
|
3048
1814
|
})
|
|
3049
1815
|
}),
|
|
3050
|
-
/* @__PURE__ */
|
|
1816
|
+
/* @__PURE__ */ c(Nt, {
|
|
3051
1817
|
"aria-label": o,
|
|
3052
|
-
children: e.map((e) =>
|
|
1818
|
+
children: e.map((e) => b(e))
|
|
3053
1819
|
}),
|
|
3054
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ c(Ft, { children: b(t) })
|
|
3055
1821
|
]
|
|
3056
1822
|
});
|
|
3057
1823
|
}
|
|
3058
1824
|
// src/components/organisms/OUserCamera/OUserCamera.styles.ts
|
|
3059
|
-
var
|
|
1825
|
+
var Lt = s.div`
|
|
3060
1826
|
position: relative;
|
|
3061
1827
|
display: block;
|
|
3062
1828
|
width: 100%;
|
|
@@ -3064,118 +1830,80 @@ var di = c.div`
|
|
|
3064
1830
|
aspect-ratio: ${({ $aspectRatio: e }) => e};
|
|
3065
1831
|
box-sizing: border-box;
|
|
3066
1832
|
overflow: hidden;
|
|
3067
|
-
padding: ${({ theme: e }) =>
|
|
3068
|
-
border: ${({ theme: e }) =>
|
|
3069
|
-
border-radius: ${({ theme: e }) =>
|
|
3070
|
-
background: ${({ theme: e }) =>
|
|
3071
|
-
color: ${({ theme: e }) =>
|
|
3072
|
-
`,
|
|
1833
|
+
padding: ${({ theme: e }) => A(e).space.inset};
|
|
1834
|
+
border: ${({ theme: e }) => A(e).camera.border};
|
|
1835
|
+
border-radius: ${({ theme: e }) => A(e).camera.borderRadius};
|
|
1836
|
+
background: ${({ theme: e }) => A(e).colors.surface};
|
|
1837
|
+
color: ${({ theme: e }) => A(e).colors.text};
|
|
1838
|
+
`, Rt = s.video`
|
|
3073
1839
|
position: absolute;
|
|
3074
1840
|
inset: 0;
|
|
3075
1841
|
width: 100%;
|
|
3076
1842
|
height: 100%;
|
|
3077
1843
|
object-fit: cover;
|
|
3078
|
-
`,
|
|
1844
|
+
`, zt = s.div`
|
|
3079
1845
|
position: absolute;
|
|
3080
1846
|
inset: 0;
|
|
3081
1847
|
display: flex;
|
|
3082
1848
|
align-items: center;
|
|
3083
1849
|
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
|
-
`,
|
|
1850
|
+
background: ${({ theme: e }) => A(e).colors.secondary};
|
|
1851
|
+
color: ${({ theme: e }) => A(e).colors.primary};
|
|
1852
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1853
|
+
font-size: ${({ theme: e }) => A(e).camera.fallbackFontSize};
|
|
1854
|
+
font-weight: ${({ theme: e }) => A(e).camera.fallbackFontWeight};
|
|
1855
|
+
`, Bt = s.div`
|
|
3090
1856
|
position: absolute;
|
|
3091
1857
|
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 }) =>
|
|
1858
|
+
${({ $placement: e }) => e === "top-right" ? o`
|
|
1859
|
+
top: ${({ theme: e }) => A(e).space.inset};
|
|
1860
|
+
right: ${({ theme: e }) => A(e).space.inset};
|
|
1861
|
+
` : o`
|
|
1862
|
+
right: ${({ theme: e }) => A(e).space.inset};
|
|
1863
|
+
bottom: ${({ theme: e }) => A(e).space.inset};
|
|
3098
1864
|
`}
|
|
3099
|
-
`,
|
|
1865
|
+
`, Vt = s.span`
|
|
3100
1866
|
position: absolute;
|
|
3101
1867
|
z-index: 1;
|
|
3102
|
-
bottom: ${({ theme: e }) =>
|
|
3103
|
-
left: ${({ theme: e }) =>
|
|
3104
|
-
max-width: ${({ theme: e }) => `calc(100% - ${
|
|
1868
|
+
bottom: ${({ theme: e }) => A(e).space.inset};
|
|
1869
|
+
left: ${({ theme: e }) => A(e).space.inset};
|
|
1870
|
+
max-width: ${({ theme: e }) => `calc(100% - ${A(e).camera.nameMaxWidthOffset})`};
|
|
3105
1871
|
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 }) =>
|
|
1872
|
+
padding: ${({ theme: e }) => `${A(e).space.xs} ${A(e).space.sm}`};
|
|
1873
|
+
border-radius: ${({ theme: e }) => A(e).camera.nameBorderRadius};
|
|
1874
|
+
background: ${({ theme: e }) => `color-mix(in srgb, ${A(e).colors.ink} 65%, transparent)`};
|
|
1875
|
+
color: ${({ theme: e }) => A(e).colors.muted};
|
|
1876
|
+
font-family: ${({ theme: e }) => A(e).font.sans};
|
|
1877
|
+
font-size: ${({ theme: e }) => A(e).typography.small};
|
|
3112
1878
|
text-overflow: ellipsis;
|
|
3113
1879
|
white-space: nowrap;
|
|
3114
1880
|
`;
|
|
3115
1881
|
// src/components/organisms/OUserCamera/OUserCamera.tsx
|
|
3116
|
-
function
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
fill: "none",
|
|
3120
|
-
"aria-hidden": "true",
|
|
3121
|
-
children: [/* @__PURE__ */ l("path", {
|
|
3122
|
-
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
|
-
stroke: "currentColor",
|
|
3124
|
-
strokeWidth: "2",
|
|
3125
|
-
strokeLinecap: "round",
|
|
3126
|
-
strokeLinejoin: "round"
|
|
3127
|
-
}), e ? /* @__PURE__ */ l("path", {
|
|
3128
|
-
d: "m3 3 18 18",
|
|
3129
|
-
stroke: "currentColor",
|
|
3130
|
-
strokeWidth: "2",
|
|
3131
|
-
strokeLinecap: "round"
|
|
3132
|
-
}) : null]
|
|
3133
|
-
});
|
|
3134
|
-
}
|
|
3135
|
-
function _i({ disabled: e }) {
|
|
3136
|
-
return /* @__PURE__ */ u("svg", {
|
|
3137
|
-
viewBox: "0 0 24 24",
|
|
3138
|
-
fill: "none",
|
|
3139
|
-
"aria-hidden": "true",
|
|
3140
|
-
children: [/* @__PURE__ */ l("path", {
|
|
3141
|
-
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
|
-
stroke: "currentColor",
|
|
3143
|
-
strokeWidth: "2",
|
|
3144
|
-
strokeLinecap: "round",
|
|
3145
|
-
strokeLinejoin: "round"
|
|
3146
|
-
}), e ? /* @__PURE__ */ l("path", {
|
|
3147
|
-
d: "m3 3 18 18",
|
|
3148
|
-
stroke: "currentColor",
|
|
3149
|
-
strokeWidth: "2",
|
|
3150
|
-
strokeLinecap: "round"
|
|
3151
|
-
}) : null]
|
|
3152
|
-
});
|
|
3153
|
-
}
|
|
3154
|
-
function vi({ firstName: e, lastName: n, stream: i, cameraEnabled: a, audioEnabled: o, onCameraToggle: s, onAudioToggle: c, aspectRatio: d = 16 / 9, ...f }) {
|
|
3155
|
-
let p = r(null), m = `${e} ${n}`.trim(), h = `${e.charAt(0)}${n.charAt(0)}`.toUpperCase(), g = a && !!i;
|
|
3156
|
-
return t(() => {
|
|
1882
|
+
function Ht({ firstName: t, lastName: r, stream: i, cameraEnabled: a, audioEnabled: o, onCameraToggle: s, onAudioToggle: u, aspectRatio: d = 16 / 9, ...f }) {
|
|
1883
|
+
let p = n(null), m = `${t} ${r}`.trim(), _ = `${t.charAt(0)}${r.charAt(0)}`.toUpperCase(), b = a && !!i;
|
|
1884
|
+
return e(() => {
|
|
3157
1885
|
let e = p.current;
|
|
3158
|
-
if (e) return e.srcObject =
|
|
1886
|
+
if (e) return e.srcObject = b ? i ?? null : null, () => {
|
|
3159
1887
|
e.srcObject = null;
|
|
3160
1888
|
};
|
|
3161
|
-
}, [
|
|
1889
|
+
}, [b, i]), /* @__PURE__ */ l(Lt, {
|
|
3162
1890
|
...f,
|
|
3163
1891
|
$aspectRatio: Number.isFinite(d) && d > 0 ? d : 16 / 9,
|
|
3164
1892
|
role: "group",
|
|
3165
1893
|
"aria-label": `${m} camera`,
|
|
3166
1894
|
children: [
|
|
3167
|
-
|
|
1895
|
+
b ? /* @__PURE__ */ c(Rt, {
|
|
3168
1896
|
ref: p,
|
|
3169
1897
|
autoPlay: !0,
|
|
3170
1898
|
muted: !0,
|
|
3171
1899
|
playsInline: !0
|
|
3172
|
-
}) : /* @__PURE__ */
|
|
1900
|
+
}) : /* @__PURE__ */ c(zt, {
|
|
3173
1901
|
"aria-hidden": "true",
|
|
3174
|
-
children:
|
|
1902
|
+
children: _
|
|
3175
1903
|
}),
|
|
3176
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ c(Bt, {
|
|
3177
1905
|
$placement: "top-right",
|
|
3178
|
-
children: /* @__PURE__ */
|
|
1906
|
+
children: /* @__PURE__ */ c(q, {
|
|
3179
1907
|
"aria-label": `Turn camera ${a ? "off" : "on"}`,
|
|
3180
1908
|
"aria-pressed": a,
|
|
3181
1909
|
variant: "primary",
|
|
@@ -3183,52 +1911,52 @@ function vi({ firstName: e, lastName: n, stream: i, cameraEnabled: a, audioEnabl
|
|
|
3183
1911
|
shape: "rounded",
|
|
3184
1912
|
ghost: !0,
|
|
3185
1913
|
onClick: s,
|
|
3186
|
-
|
|
1914
|
+
icon: a ? v : y
|
|
3187
1915
|
})
|
|
3188
1916
|
}),
|
|
3189
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ c(Bt, {
|
|
3190
1918
|
$placement: "bottom-right",
|
|
3191
|
-
children: /* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ c(q, {
|
|
3192
1920
|
"aria-label": `Turn audio ${o ? "off" : "on"}`,
|
|
3193
1921
|
"aria-pressed": o,
|
|
3194
1922
|
variant: "primary",
|
|
3195
1923
|
size: "md",
|
|
3196
1924
|
shape: "rounded",
|
|
3197
1925
|
ghost: !0,
|
|
3198
|
-
onClick:
|
|
3199
|
-
|
|
1926
|
+
onClick: u,
|
|
1927
|
+
icon: o ? h : g
|
|
3200
1928
|
})
|
|
3201
1929
|
}),
|
|
3202
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ c(Vt, { children: m })
|
|
3203
1931
|
]
|
|
3204
1932
|
});
|
|
3205
1933
|
}
|
|
3206
1934
|
// src/shared/styles/GlobalStyles.ts
|
|
3207
|
-
var
|
|
1935
|
+
var Ut = a`
|
|
3208
1936
|
: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 }) =>
|
|
1937
|
+
--jynko-shadow-solid: ${({ theme: e }) => A(e).shadow.button};
|
|
1938
|
+
--jynko-modal-padding: ${({ theme: e }) => A(e).modal.padding};
|
|
1939
|
+
--jynko-modal-max-width: ${({ theme: e }) => A(e).modal.maxWidth};
|
|
1940
|
+
--jynko-modal-max-height: ${({ theme: e }) => A(e).modal.maxHeight};
|
|
1941
|
+
--jynko-modal-border-radius: ${({ theme: e }) => A(e).modal.borderRadius};
|
|
1942
|
+
--jynko-modal-box-shadow: ${({ theme: e }) => A(e).shadow.modal};
|
|
3215
1943
|
}
|
|
3216
1944
|
|
|
3217
1945
|
button {
|
|
3218
|
-
border: ${({ theme: e }) =>
|
|
3219
|
-
border-radius: ${({ theme: e }) =>
|
|
3220
|
-
padding: ${({ theme: e }) =>
|
|
3221
|
-
font-size: ${({ theme: e }) =>
|
|
3222
|
-
text-transform: ${({ theme: e }) =>
|
|
1946
|
+
border: ${({ theme: e }) => A(e).button.border};
|
|
1947
|
+
border-radius: ${({ theme: e }) => A(e).button.borderRadius};
|
|
1948
|
+
padding: ${({ theme: e }) => A(e).button.padding};
|
|
1949
|
+
font-size: ${({ theme: e }) => A(e).button.fontSize};
|
|
1950
|
+
text-transform: ${({ theme: e }) => A(e).button.textTransform};
|
|
3223
1951
|
}
|
|
3224
1952
|
`;
|
|
3225
1953
|
// src/providers/JynkoProvider/JynkoProvider.tsx
|
|
3226
|
-
function
|
|
3227
|
-
return /* @__PURE__ */
|
|
1954
|
+
function Wt({ children: e, theme: t = k }) {
|
|
1955
|
+
return /* @__PURE__ */ l(i, {
|
|
3228
1956
|
theme: t,
|
|
3229
|
-
children: [/* @__PURE__ */
|
|
1957
|
+
children: [/* @__PURE__ */ c(Ut, {}), e]
|
|
3230
1958
|
});
|
|
3231
1959
|
}
|
|
3232
|
-
export {
|
|
1960
|
+
export { M as AAvatar, B as ABadge, ae as AButton, G as AIcon, q as AIconButton, Y as AIconLink, Ae as AInput, Z as ALink, Ie as ALogo, We as ASearchInput, Ke as ASection, at as ASelect, lt as ATextarea, dt as ATypography, Wt as JynkoProvider, wt as MModal, Ot as MNavLinks, At as MUserBadge, It as OSidebar, Ht as OUserCamera, k as theme };
|
|
3233
1961
|
|
|
3234
1962
|
//# sourceMappingURL=index.js.map
|