blunt-ui 0.2.2 → 0.3.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/EditableTable/EditableTable.d.ts +5 -0
- package/dist/components/EditableTable/EditableTable.types.d.ts +22 -0
- package/dist/components/EditableTable/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/Table.types.d.ts +18 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/index.cjs +237 -66
- package/dist/index.d.ts +4 -0
- package/dist/index.js +803 -495
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import t, { css as n, keyframes as R, ThemeProvider as yo } from "styled-components";
|
|
3
|
+
import G, { useId as M, useState as W, useRef as Y, useEffect as V, useContext as no, createContext as so, forwardRef as to, createElement as q, useCallback as j, useMemo as wo } from "react";
|
|
4
|
+
import { createPortal as io } from "react-dom";
|
|
5
|
+
const N = (o, r, s) => n`
|
|
6
6
|
background: ${r};
|
|
7
|
-
color: ${
|
|
7
|
+
color: ${s};
|
|
8
8
|
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
9
9
|
box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
|
|
10
|
-
`,
|
|
10
|
+
`, vo = t.span`
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
font-weight: 700;
|
|
@@ -20,82 +20,82 @@ const L = (o, r, n) => s`
|
|
|
20
20
|
max-width: 20ch;
|
|
21
21
|
|
|
22
22
|
${({ $size: o, theme: r }) => ({
|
|
23
|
-
sm:
|
|
23
|
+
sm: n`
|
|
24
24
|
padding: 2px 8px;
|
|
25
25
|
font-size: ${r.fontSizes.xs};
|
|
26
26
|
`,
|
|
27
|
-
md:
|
|
27
|
+
md: n`
|
|
28
28
|
padding: 4px 10px;
|
|
29
29
|
font-size: ${r.fontSizes.sm};
|
|
30
30
|
`
|
|
31
31
|
})[o]}
|
|
32
32
|
|
|
33
33
|
${({ $variant: o, theme: r }) => r.brutalism ? {
|
|
34
|
-
primary:
|
|
34
|
+
primary: N(
|
|
35
35
|
r,
|
|
36
36
|
r.colors.primary[500],
|
|
37
37
|
r.colors.primary.contrast
|
|
38
38
|
),
|
|
39
|
-
neutral:
|
|
39
|
+
neutral: N(
|
|
40
40
|
r,
|
|
41
41
|
r.colors.neutral[200],
|
|
42
42
|
r.colors.neutral[900]
|
|
43
43
|
),
|
|
44
|
-
success:
|
|
44
|
+
success: N(
|
|
45
45
|
r,
|
|
46
46
|
r.colors.success[50],
|
|
47
47
|
r.colors.success[500]
|
|
48
48
|
),
|
|
49
|
-
error:
|
|
49
|
+
error: N(
|
|
50
50
|
r,
|
|
51
51
|
r.colors.error[50],
|
|
52
52
|
r.colors.error[500]
|
|
53
53
|
),
|
|
54
|
-
warning:
|
|
54
|
+
warning: N(
|
|
55
55
|
r,
|
|
56
56
|
r.colors.warning[50],
|
|
57
57
|
r.colors.warning[500]
|
|
58
58
|
),
|
|
59
|
-
info:
|
|
59
|
+
info: N(r, r.colors.info[50], r.colors.info[500])
|
|
60
60
|
}[o] : {
|
|
61
|
-
primary:
|
|
61
|
+
primary: n`
|
|
62
62
|
background: ${r.colors.primary[50]};
|
|
63
63
|
color: ${r.colors.primary[500]};
|
|
64
64
|
`,
|
|
65
|
-
neutral:
|
|
65
|
+
neutral: n`
|
|
66
66
|
background: ${r.colors.neutral[200]};
|
|
67
67
|
color: ${r.colors.neutral[600]};
|
|
68
68
|
`,
|
|
69
|
-
success:
|
|
69
|
+
success: n`
|
|
70
70
|
background: ${r.colors.success[50]};
|
|
71
71
|
color: ${r.colors.success[500]};
|
|
72
72
|
`,
|
|
73
|
-
error:
|
|
73
|
+
error: n`
|
|
74
74
|
background: ${r.colors.error[50]};
|
|
75
75
|
color: ${r.colors.error[500]};
|
|
76
76
|
`,
|
|
77
|
-
warning:
|
|
77
|
+
warning: n`
|
|
78
78
|
background: ${r.colors.warning[50]};
|
|
79
79
|
color: ${r.colors.warning[500]};
|
|
80
80
|
`,
|
|
81
|
-
info:
|
|
81
|
+
info: n`
|
|
82
82
|
background: ${r.colors.info[50]};
|
|
83
83
|
color: ${r.colors.info[500]};
|
|
84
84
|
`
|
|
85
85
|
}[o]}
|
|
86
86
|
`;
|
|
87
|
-
function
|
|
87
|
+
function mo({
|
|
88
88
|
variant: o = "primary",
|
|
89
89
|
size: r = "md",
|
|
90
|
-
children:
|
|
91
|
-
...
|
|
90
|
+
children: s,
|
|
91
|
+
...a
|
|
92
92
|
}) {
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ i(vo, { $variant: o, $size: r, ...a, children: s });
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
const
|
|
95
|
+
mo.displayName = "Badge";
|
|
96
|
+
const _ = (o, r, s) => n`
|
|
97
97
|
background-color: ${r};
|
|
98
|
-
color: ${
|
|
98
|
+
color: ${s};
|
|
99
99
|
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
100
100
|
box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
|
|
101
101
|
0 ${o.colors.neutral[900]};
|
|
@@ -106,7 +106,7 @@ const A = (o, r, n) => s`
|
|
|
106
106
|
transform: translate(2px, 2px);
|
|
107
107
|
box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
|
|
108
108
|
}
|
|
109
|
-
`,
|
|
109
|
+
`, ho = t.button`
|
|
110
110
|
display: inline-flex;
|
|
111
111
|
align-items: center;
|
|
112
112
|
justify-content: center;
|
|
@@ -126,23 +126,23 @@ const A = (o, r, n) => s`
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
${({ $variant: o, theme: r }) => r.brutalism ? {
|
|
129
|
-
primary:
|
|
129
|
+
primary: _(
|
|
130
130
|
r,
|
|
131
131
|
r.colors.primary[500],
|
|
132
132
|
r.colors.primary.contrast
|
|
133
133
|
),
|
|
134
|
-
secondary:
|
|
134
|
+
secondary: _(
|
|
135
135
|
r,
|
|
136
136
|
r.colors.neutral[100],
|
|
137
137
|
r.colors.neutral[900]
|
|
138
138
|
),
|
|
139
|
-
outline:
|
|
139
|
+
outline: _(
|
|
140
140
|
r,
|
|
141
141
|
r.colors.neutral[0],
|
|
142
142
|
r.colors.neutral[900]
|
|
143
143
|
)
|
|
144
144
|
}[o] : {
|
|
145
|
-
primary:
|
|
145
|
+
primary: n`
|
|
146
146
|
background-color: ${r.colors.primary[500]};
|
|
147
147
|
color: ${r.colors.neutral[0]};
|
|
148
148
|
border: none;
|
|
@@ -150,7 +150,7 @@ const A = (o, r, n) => s`
|
|
|
150
150
|
background-color: ${r.colors.primary[700]};
|
|
151
151
|
}
|
|
152
152
|
`,
|
|
153
|
-
secondary:
|
|
153
|
+
secondary: n`
|
|
154
154
|
background-color: ${r.colors.neutral[200]};
|
|
155
155
|
color: ${r.colors.neutral[600]};
|
|
156
156
|
border: none;
|
|
@@ -158,7 +158,7 @@ const A = (o, r, n) => s`
|
|
|
158
158
|
background-color: ${r.colors.neutral[300]};
|
|
159
159
|
}
|
|
160
160
|
`,
|
|
161
|
-
outline:
|
|
161
|
+
outline: n`
|
|
162
162
|
background-color: transparent;
|
|
163
163
|
color: ${r.colors.primary[500]};
|
|
164
164
|
border: 2px solid ${r.colors.primary[500]};
|
|
@@ -169,58 +169,58 @@ const A = (o, r, n) => s`
|
|
|
169
169
|
}[o]}
|
|
170
170
|
|
|
171
171
|
${({ $size: o, theme: r }) => ({
|
|
172
|
-
sm:
|
|
172
|
+
sm: n`
|
|
173
173
|
padding: ${r.spacing[1]} ${r.spacing[3]};
|
|
174
174
|
font-size: ${r.fontSizes.sm};
|
|
175
175
|
`,
|
|
176
|
-
md:
|
|
176
|
+
md: n`
|
|
177
177
|
padding: ${r.spacing[2]} ${r.spacing[4]};
|
|
178
178
|
font-size: ${r.fontSizes.md};
|
|
179
179
|
`,
|
|
180
|
-
lg:
|
|
180
|
+
lg: n`
|
|
181
181
|
padding: ${r.spacing[3]} ${r.spacing[6]};
|
|
182
182
|
font-size: ${r.fontSizes.lg};
|
|
183
183
|
`
|
|
184
184
|
})[o]}
|
|
185
185
|
`;
|
|
186
|
-
function
|
|
186
|
+
function ko({
|
|
187
187
|
ref: o,
|
|
188
188
|
as: r,
|
|
189
|
-
href:
|
|
190
|
-
variant:
|
|
191
|
-
size:
|
|
192
|
-
isLoading:
|
|
193
|
-
disabled:
|
|
194
|
-
children:
|
|
189
|
+
href: s,
|
|
190
|
+
variant: a = "primary",
|
|
191
|
+
size: l = "md",
|
|
192
|
+
isLoading: d,
|
|
193
|
+
disabled: c,
|
|
194
|
+
children: e,
|
|
195
195
|
...p
|
|
196
196
|
}) {
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
197
|
+
return /* @__PURE__ */ i(
|
|
198
|
+
ho,
|
|
199
199
|
{
|
|
200
200
|
ref: o,
|
|
201
|
-
as: r ?? (
|
|
202
|
-
href:
|
|
203
|
-
$variant:
|
|
204
|
-
$size:
|
|
205
|
-
disabled:
|
|
201
|
+
as: r ?? (s ? "a" : "button"),
|
|
202
|
+
href: s,
|
|
203
|
+
$variant: a,
|
|
204
|
+
$size: l,
|
|
205
|
+
disabled: d || c,
|
|
206
206
|
...p,
|
|
207
|
-
children:
|
|
207
|
+
children: d ? "Loading..." : e
|
|
208
208
|
}
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
const
|
|
211
|
+
ko.displayName = "Button";
|
|
212
|
+
const Co = t.div`
|
|
213
213
|
display: flex;
|
|
214
214
|
flex-direction: column;
|
|
215
215
|
gap: ${({ theme: o }) => o.spacing[1]};
|
|
216
216
|
width: ${({ $fullWidth: o }) => o ? "100%" : "auto"};
|
|
217
|
-
`,
|
|
217
|
+
`, zo = t.label`
|
|
218
218
|
font-size: ${({ theme: o }) => o.fontSizes.sm};
|
|
219
219
|
font-weight: ${({ theme: o }) => o.brutalism ? "700" : "500"};
|
|
220
|
-
`,
|
|
220
|
+
`, So = t.span`
|
|
221
221
|
font-size: ${({ theme: o }) => o.fontSizes.xs};
|
|
222
222
|
color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
|
|
223
|
-
`,
|
|
223
|
+
`, To = t.div`
|
|
224
224
|
display: flex;
|
|
225
225
|
align-items: center;
|
|
226
226
|
border-radius: ${({ theme: o }) => o.radius.md};
|
|
@@ -229,43 +229,43 @@ const po = i.div`
|
|
|
229
229
|
box-shadow 0.2s;
|
|
230
230
|
|
|
231
231
|
${({ $size: o = "md", theme: r }) => ({
|
|
232
|
-
sm:
|
|
232
|
+
sm: n`
|
|
233
233
|
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
234
234
|
font-size: ${r.fontSizes.sm};
|
|
235
235
|
`,
|
|
236
|
-
md:
|
|
236
|
+
md: n`
|
|
237
237
|
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
238
238
|
font-size: ${r.fontSizes.md};
|
|
239
239
|
`,
|
|
240
|
-
lg:
|
|
240
|
+
lg: n`
|
|
241
241
|
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
242
242
|
font-size: ${r.fontSizes.lg};
|
|
243
243
|
`
|
|
244
244
|
})[o]}
|
|
245
245
|
|
|
246
|
-
${({ $variant: o = "default", theme: r }) => r.brutalism ?
|
|
246
|
+
${({ $variant: o = "default", theme: r }) => r.brutalism ? n`
|
|
247
247
|
border: ${r.brutalism.borderWidth} solid
|
|
248
248
|
${r.colors.neutral[900]};
|
|
249
249
|
background-color: ${r.colors.neutral[0]};
|
|
250
250
|
box-shadow: 3px 3px 0 ${r.colors.neutral[900]};
|
|
251
251
|
` : {
|
|
252
|
-
default:
|
|
252
|
+
default: n`
|
|
253
253
|
border: 1px solid ${r.colors.neutral[400]};
|
|
254
254
|
background-color: ${r.colors.neutral[0]};
|
|
255
255
|
`,
|
|
256
|
-
outlined:
|
|
256
|
+
outlined: n`
|
|
257
257
|
border: 2px solid ${r.colors.primary[500]};
|
|
258
258
|
background-color: ${r.colors.neutral[0]};
|
|
259
259
|
`,
|
|
260
|
-
filled:
|
|
260
|
+
filled: n`
|
|
261
261
|
border: 1px solid transparent;
|
|
262
262
|
background-color: ${r.colors.neutral[100]};
|
|
263
263
|
`
|
|
264
264
|
}[o]}
|
|
265
265
|
|
|
266
|
-
${({ $error: o, theme: r }) => o &&
|
|
266
|
+
${({ $error: o, theme: r }) => o && n`
|
|
267
267
|
border-color: ${r.colors.error[500]};
|
|
268
|
-
${r.brutalism &&
|
|
268
|
+
${r.brutalism && n`
|
|
269
269
|
box-shadow: 3px 3px 0 ${r.colors.error[500]};
|
|
270
270
|
`}
|
|
271
271
|
`}
|
|
@@ -273,7 +273,7 @@ const po = i.div`
|
|
|
273
273
|
&:focus-within {
|
|
274
274
|
box-shadow: ${({ theme: o }) => o.shadows.focusRing};
|
|
275
275
|
}
|
|
276
|
-
`,
|
|
276
|
+
`, Io = t.input`
|
|
277
277
|
flex: 1;
|
|
278
278
|
border: none;
|
|
279
279
|
outline: none;
|
|
@@ -284,11 +284,11 @@ const po = i.div`
|
|
|
284
284
|
cursor: not-allowed;
|
|
285
285
|
opacity: 0.6;
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`, J = t.div`
|
|
288
288
|
display: inline-flex;
|
|
289
289
|
align-items: center;
|
|
290
290
|
margin: 0 ${({ theme: o }) => o.spacing[1]};
|
|
291
|
-
`,
|
|
291
|
+
`, Wo = t.button`
|
|
292
292
|
display: inline-flex;
|
|
293
293
|
align-items: center;
|
|
294
294
|
margin: 0 ${({ theme: o }) => o.spacing[1]};
|
|
@@ -302,75 +302,75 @@ const po = i.div`
|
|
|
302
302
|
opacity: 0.8;
|
|
303
303
|
}
|
|
304
304
|
`;
|
|
305
|
-
function
|
|
305
|
+
function Eo({
|
|
306
306
|
ref: o,
|
|
307
307
|
type: r = "text",
|
|
308
|
-
size:
|
|
309
|
-
variant:
|
|
310
|
-
label:
|
|
311
|
-
helperText:
|
|
312
|
-
error:
|
|
313
|
-
leftElement:
|
|
308
|
+
size: s = "md",
|
|
309
|
+
variant: a = "default",
|
|
310
|
+
label: l,
|
|
311
|
+
helperText: d,
|
|
312
|
+
error: c,
|
|
313
|
+
leftElement: e,
|
|
314
314
|
rightElement: p,
|
|
315
315
|
clearable: u,
|
|
316
|
-
onClear:
|
|
317
|
-
fullWidth:
|
|
318
|
-
id:
|
|
319
|
-
value:
|
|
320
|
-
defaultValue:
|
|
316
|
+
onClear: x,
|
|
317
|
+
fullWidth: C,
|
|
318
|
+
id: w,
|
|
319
|
+
value: b,
|
|
320
|
+
defaultValue: f,
|
|
321
321
|
onChange: S,
|
|
322
|
-
...
|
|
322
|
+
...z
|
|
323
323
|
}) {
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
},
|
|
327
|
-
|
|
324
|
+
const h = M(), E = w ?? h, B = `${E}-hint`, [O, $] = W(f ?? ""), y = b !== void 0, v = y ? b : O, k = typeof c == "string" ? c : void 0, A = !!(d || c), D = (T) => {
|
|
325
|
+
y || $(T.target.value), S?.(T);
|
|
326
|
+
}, g = () => {
|
|
327
|
+
y || $(""), x?.();
|
|
328
328
|
};
|
|
329
|
-
return /* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
|
|
329
|
+
return /* @__PURE__ */ m(Co, { $fullWidth: C, children: [
|
|
330
|
+
l && /* @__PURE__ */ i(zo, { htmlFor: E, children: l }),
|
|
331
|
+
/* @__PURE__ */ m(To, { $size: s, $variant: a, $error: !!c, children: [
|
|
332
|
+
e && /* @__PURE__ */ i(J, { children: e }),
|
|
333
|
+
/* @__PURE__ */ i(
|
|
334
|
+
Io,
|
|
335
335
|
{
|
|
336
|
-
id:
|
|
336
|
+
id: E,
|
|
337
337
|
ref: o,
|
|
338
338
|
type: r,
|
|
339
|
-
value:
|
|
340
|
-
onChange:
|
|
341
|
-
...
|
|
342
|
-
"aria-invalid": !!
|
|
343
|
-
"aria-describedby":
|
|
339
|
+
value: v,
|
|
340
|
+
onChange: D,
|
|
341
|
+
...z,
|
|
342
|
+
"aria-invalid": !!c,
|
|
343
|
+
"aria-describedby": A ? B : void 0
|
|
344
344
|
}
|
|
345
345
|
),
|
|
346
|
-
u &&
|
|
347
|
-
|
|
346
|
+
u && v && /* @__PURE__ */ i(
|
|
347
|
+
Wo,
|
|
348
348
|
{
|
|
349
349
|
type: "button",
|
|
350
|
-
onClick:
|
|
350
|
+
onClick: g,
|
|
351
351
|
"aria-label": "Clear input",
|
|
352
352
|
children: "✕"
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
|
-
p && /* @__PURE__ */
|
|
355
|
+
p && /* @__PURE__ */ i(J, { children: p })
|
|
356
356
|
] }),
|
|
357
|
-
|
|
357
|
+
A && /* @__PURE__ */ i(So, { id: B, $error: !!c, children: k ?? d })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
|
-
|
|
361
|
-
const
|
|
360
|
+
Eo.displayName = "Input";
|
|
361
|
+
const Bo = R`
|
|
362
362
|
from { opacity: 0; }
|
|
363
363
|
to { opacity: 1; }
|
|
364
|
-
`,
|
|
364
|
+
`, Oo = R`
|
|
365
365
|
from { opacity: 1; }
|
|
366
366
|
to { opacity: 0; }
|
|
367
|
-
`,
|
|
367
|
+
`, jo = R`
|
|
368
368
|
from { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
369
369
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
370
|
-
`,
|
|
370
|
+
`, Ro = R`
|
|
371
371
|
from { opacity: 1; transform: scale(1) translateY(0); }
|
|
372
372
|
to { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
373
|
-
`,
|
|
373
|
+
`, Ao = t.div`
|
|
374
374
|
position: fixed;
|
|
375
375
|
inset: 0;
|
|
376
376
|
background-color: rgba(0, 0, 0, 0.5);
|
|
@@ -378,9 +378,9 @@ const vo = O`
|
|
|
378
378
|
align-items: center;
|
|
379
379
|
justify-content: center;
|
|
380
380
|
z-index: ${({ theme: o }) => o.zIndex.modal};
|
|
381
|
-
animation: ${({ $closing: o }) => o ?
|
|
381
|
+
animation: ${({ $closing: o }) => o ? Oo : Bo} 0.15s ease
|
|
382
382
|
forwards;
|
|
383
|
-
`,
|
|
383
|
+
`, Lo = t.div`
|
|
384
384
|
position: relative;
|
|
385
385
|
background: ${({ theme: o }) => o.colors.neutral[0]};
|
|
386
386
|
border-radius: ${({ theme: o }) => o.radius.md};
|
|
@@ -389,37 +389,37 @@ const vo = O`
|
|
|
389
389
|
display: flex;
|
|
390
390
|
flex-direction: column;
|
|
391
391
|
max-height: 90vh;
|
|
392
|
-
animation: ${({ $closing: o }) => o ?
|
|
392
|
+
animation: ${({ $closing: o }) => o ? Ro : jo} 0.15s ease
|
|
393
393
|
forwards;
|
|
394
394
|
|
|
395
|
-
${({ $size: o }) => o === "sm" &&
|
|
395
|
+
${({ $size: o }) => o === "sm" && n`
|
|
396
396
|
width: min(400px, 90vw);
|
|
397
397
|
`}
|
|
398
|
-
${({ $size: o }) => o === "md" &&
|
|
398
|
+
${({ $size: o }) => o === "md" && n`
|
|
399
399
|
width: min(560px, 90vw);
|
|
400
400
|
`}
|
|
401
|
-
${({ $size: o }) => o === "lg" &&
|
|
401
|
+
${({ $size: o }) => o === "lg" && n`
|
|
402
402
|
width: min(720px, 90vw);
|
|
403
403
|
`}
|
|
404
|
-
${({ $size: o }) => o === "fullscreen" &&
|
|
404
|
+
${({ $size: o }) => o === "fullscreen" && n`
|
|
405
405
|
width: 100vw;
|
|
406
406
|
height: 100vh;
|
|
407
407
|
max-height: 100vh;
|
|
408
408
|
border-radius: 0;
|
|
409
409
|
`}
|
|
410
|
-
`,
|
|
410
|
+
`, No = t.div`
|
|
411
411
|
display: flex;
|
|
412
412
|
align-items: center;
|
|
413
413
|
gap: ${({ theme: o }) => o.spacing[2]};
|
|
414
414
|
padding: ${({ theme: o }) => o.spacing[4]};
|
|
415
415
|
border-bottom: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
|
|
416
416
|
flex-shrink: 0;
|
|
417
|
-
`,
|
|
417
|
+
`, Vo = t.h2`
|
|
418
418
|
flex: 1;
|
|
419
419
|
font-size: ${({ theme: o }) => o.fontSizes.lg};
|
|
420
420
|
font-weight: 600;
|
|
421
421
|
margin: 0;
|
|
422
|
-
`,
|
|
422
|
+
`, Do = t.button`
|
|
423
423
|
display: inline-flex;
|
|
424
424
|
align-items: center;
|
|
425
425
|
justify-content: center;
|
|
@@ -444,11 +444,11 @@ const vo = O`
|
|
|
444
444
|
outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
|
|
445
445
|
outline-offset: 2px;
|
|
446
446
|
}
|
|
447
|
-
`,
|
|
447
|
+
`, Fo = t.div`
|
|
448
448
|
padding: ${({ theme: o }) => o.spacing[4]};
|
|
449
449
|
overflow-y: auto;
|
|
450
450
|
flex: 1;
|
|
451
|
-
`,
|
|
451
|
+
`, Mo = t.div`
|
|
452
452
|
display: flex;
|
|
453
453
|
align-items: center;
|
|
454
454
|
justify-content: flex-end;
|
|
@@ -456,7 +456,7 @@ const vo = O`
|
|
|
456
456
|
padding: ${({ theme: o }) => o.spacing[4]};
|
|
457
457
|
border-top: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
|
|
458
458
|
flex-shrink: 0;
|
|
459
|
-
`,
|
|
459
|
+
`, Po = [
|
|
460
460
|
"button:not([disabled])",
|
|
461
461
|
"input:not([disabled])",
|
|
462
462
|
"select:not([disabled])",
|
|
@@ -464,89 +464,89 @@ const vo = O`
|
|
|
464
464
|
"a[href]",
|
|
465
465
|
'[tabindex]:not([tabindex="-1"])'
|
|
466
466
|
].join(", ");
|
|
467
|
-
function
|
|
467
|
+
function Q(o) {
|
|
468
468
|
return Array.from(
|
|
469
|
-
o.querySelectorAll(
|
|
469
|
+
o.querySelectorAll(Po)
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Yo({
|
|
473
473
|
open: o,
|
|
474
474
|
onClose: r,
|
|
475
|
-
title:
|
|
476
|
-
children:
|
|
477
|
-
footer:
|
|
478
|
-
size:
|
|
479
|
-
closeOnBackdrop:
|
|
480
|
-
closeOnEscape:
|
|
475
|
+
title: s,
|
|
476
|
+
children: a,
|
|
477
|
+
footer: l,
|
|
478
|
+
size: d = "md",
|
|
479
|
+
closeOnBackdrop: c = !0,
|
|
480
|
+
closeOnEscape: e = !0,
|
|
481
481
|
ariaLabelledBy: p,
|
|
482
482
|
ariaDescribedBy: u
|
|
483
483
|
}) {
|
|
484
|
-
const
|
|
485
|
-
return
|
|
484
|
+
const x = Y(null), C = M(), w = p ?? (s ? C : void 0), [b, f] = W(o), [S, z] = W(!1);
|
|
485
|
+
return V(() => {
|
|
486
486
|
if (o)
|
|
487
|
-
|
|
488
|
-
else if (
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
|
|
487
|
+
f(!0), z(!1);
|
|
488
|
+
else if (b) {
|
|
489
|
+
z(!0);
|
|
490
|
+
const h = setTimeout(() => {
|
|
491
|
+
f(!1), z(!1);
|
|
492
492
|
}, 150);
|
|
493
|
-
return () => clearTimeout(
|
|
493
|
+
return () => clearTimeout(h);
|
|
494
494
|
}
|
|
495
|
-
}, [o,
|
|
495
|
+
}, [o, b]), V(() => {
|
|
496
496
|
if (!o)
|
|
497
497
|
return;
|
|
498
|
-
const
|
|
498
|
+
const h = document.body.style.overflow;
|
|
499
499
|
return document.body.style.overflow = "hidden", () => {
|
|
500
|
-
document.body.style.overflow =
|
|
500
|
+
document.body.style.overflow = h;
|
|
501
501
|
};
|
|
502
|
-
}, [o]),
|
|
503
|
-
if (!o || !
|
|
502
|
+
}, [o]), V(() => {
|
|
503
|
+
if (!o || !x.current)
|
|
504
504
|
return;
|
|
505
|
-
const
|
|
506
|
-
(
|
|
507
|
-
const
|
|
508
|
-
if (
|
|
505
|
+
const h = x.current, E = document.activeElement;
|
|
506
|
+
(Q(h)[0] ?? h).focus();
|
|
507
|
+
const O = ($) => {
|
|
508
|
+
if ($.key === "Escape" && e) {
|
|
509
509
|
r();
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
|
-
if (
|
|
512
|
+
if ($.key !== "Tab")
|
|
513
513
|
return;
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
|
|
514
|
+
const y = Q(h);
|
|
515
|
+
if (y.length === 0) {
|
|
516
|
+
$.preventDefault();
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
const
|
|
520
|
-
|
|
519
|
+
const v = y[0], k = y[y.length - 1];
|
|
520
|
+
$.shiftKey ? document.activeElement === v && ($.preventDefault(), k.focus()) : document.activeElement === k && ($.preventDefault(), v.focus());
|
|
521
521
|
};
|
|
522
|
-
return document.addEventListener("keydown",
|
|
523
|
-
document.removeEventListener("keydown",
|
|
522
|
+
return document.addEventListener("keydown", O), () => {
|
|
523
|
+
document.removeEventListener("keydown", O), E?.focus();
|
|
524
524
|
};
|
|
525
|
-
}, [o,
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
525
|
+
}, [o, e, r, b]), b ? io(
|
|
526
|
+
/* @__PURE__ */ i(
|
|
527
|
+
Ao,
|
|
528
528
|
{
|
|
529
529
|
$closing: S,
|
|
530
|
-
onClick:
|
|
531
|
-
children: /* @__PURE__ */
|
|
532
|
-
|
|
530
|
+
onClick: c ? r : void 0,
|
|
531
|
+
children: /* @__PURE__ */ m(
|
|
532
|
+
Lo,
|
|
533
533
|
{
|
|
534
|
-
ref:
|
|
534
|
+
ref: x,
|
|
535
535
|
role: "dialog",
|
|
536
536
|
"aria-modal": "true",
|
|
537
|
-
"aria-labelledby":
|
|
537
|
+
"aria-labelledby": w,
|
|
538
538
|
"aria-describedby": u,
|
|
539
|
-
$size:
|
|
539
|
+
$size: d,
|
|
540
540
|
$closing: S,
|
|
541
541
|
tabIndex: -1,
|
|
542
|
-
onClick: (
|
|
542
|
+
onClick: (h) => h.stopPropagation(),
|
|
543
543
|
children: [
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
|
|
546
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ m(No, { children: [
|
|
545
|
+
s && /* @__PURE__ */ i(Vo, { id: C, children: s }),
|
|
546
|
+
/* @__PURE__ */ i(Do, { onClick: r, "aria-label": "Close modal", children: "×" })
|
|
547
547
|
] }),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
|
|
548
|
+
/* @__PURE__ */ i(Fo, { children: a }),
|
|
549
|
+
l && /* @__PURE__ */ i(Mo, { children: l })
|
|
550
550
|
]
|
|
551
551
|
}
|
|
552
552
|
)
|
|
@@ -555,18 +555,18 @@ function Lo({
|
|
|
555
555
|
document.body
|
|
556
556
|
) : null;
|
|
557
557
|
}
|
|
558
|
-
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
const
|
|
558
|
+
Yo.displayName = "Modal";
|
|
559
|
+
const ao = (...o) => o.filter((r, s, a) => !!r && r.trim() !== "" && a.indexOf(r) === s).join(" ").trim();
|
|
560
|
+
const Ho = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
561
|
+
const _o = (o) => o.replace(
|
|
562
562
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
563
|
-
(r,
|
|
563
|
+
(r, s, a) => a ? a.toUpperCase() : s.toLowerCase()
|
|
564
564
|
);
|
|
565
|
-
const
|
|
566
|
-
const r =
|
|
565
|
+
const oo = (o) => {
|
|
566
|
+
const r = _o(o);
|
|
567
567
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
568
568
|
};
|
|
569
|
-
var
|
|
569
|
+
var K = {
|
|
570
570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
571
|
width: 24,
|
|
572
572
|
height: 24,
|
|
@@ -577,69 +577,69 @@ var R = {
|
|
|
577
577
|
strokeLinecap: "round",
|
|
578
578
|
strokeLinejoin: "round"
|
|
579
579
|
};
|
|
580
|
-
const
|
|
580
|
+
const Ko = (o) => {
|
|
581
581
|
for (const r in o)
|
|
582
582
|
if (r.startsWith("aria-") || r === "role" || r === "title")
|
|
583
583
|
return !0;
|
|
584
584
|
return !1;
|
|
585
|
-
},
|
|
586
|
-
({ color: o, size: r, strokeWidth:
|
|
585
|
+
}, qo = so({}), Uo = () => no(qo), Zo = to(
|
|
586
|
+
({ color: o, size: r, strokeWidth: s, absoluteStrokeWidth: a, className: l = "", children: d, iconNode: c, ...e }, p) => {
|
|
587
587
|
const {
|
|
588
588
|
size: u = 24,
|
|
589
|
-
strokeWidth:
|
|
590
|
-
absoluteStrokeWidth:
|
|
591
|
-
color:
|
|
592
|
-
className:
|
|
593
|
-
} =
|
|
594
|
-
return
|
|
589
|
+
strokeWidth: x = 2,
|
|
590
|
+
absoluteStrokeWidth: C = !1,
|
|
591
|
+
color: w = "currentColor",
|
|
592
|
+
className: b = ""
|
|
593
|
+
} = Uo() ?? {}, f = a ?? C ? Number(s ?? x) * 24 / Number(r ?? u) : s ?? x;
|
|
594
|
+
return q(
|
|
595
595
|
"svg",
|
|
596
596
|
{
|
|
597
597
|
ref: p,
|
|
598
|
-
...
|
|
599
|
-
width: r ?? u ??
|
|
600
|
-
height: r ?? u ??
|
|
601
|
-
stroke: o ??
|
|
602
|
-
strokeWidth:
|
|
603
|
-
className:
|
|
604
|
-
...!
|
|
605
|
-
...
|
|
598
|
+
...K,
|
|
599
|
+
width: r ?? u ?? K.width,
|
|
600
|
+
height: r ?? u ?? K.height,
|
|
601
|
+
stroke: o ?? w,
|
|
602
|
+
strokeWidth: f,
|
|
603
|
+
className: ao("lucide", b, l),
|
|
604
|
+
...!d && !Ko(e) && { "aria-hidden": "true" },
|
|
605
|
+
...e
|
|
606
606
|
},
|
|
607
607
|
[
|
|
608
|
-
...
|
|
609
|
-
...Array.isArray(
|
|
608
|
+
...c.map(([S, z]) => q(S, z)),
|
|
609
|
+
...Array.isArray(d) ? d : [d]
|
|
610
610
|
]
|
|
611
611
|
);
|
|
612
612
|
}
|
|
613
613
|
);
|
|
614
|
-
const
|
|
615
|
-
const
|
|
616
|
-
({ className:
|
|
617
|
-
ref:
|
|
614
|
+
const eo = (o, r) => {
|
|
615
|
+
const s = to(
|
|
616
|
+
({ className: a, ...l }, d) => q(Zo, {
|
|
617
|
+
ref: d,
|
|
618
618
|
iconNode: r,
|
|
619
|
-
className:
|
|
620
|
-
`lucide-${
|
|
619
|
+
className: ao(
|
|
620
|
+
`lucide-${Ho(oo(o))}`,
|
|
621
621
|
`lucide-${o}`,
|
|
622
|
-
|
|
622
|
+
a
|
|
623
623
|
),
|
|
624
|
-
...
|
|
624
|
+
...l
|
|
625
625
|
})
|
|
626
626
|
);
|
|
627
|
-
return
|
|
627
|
+
return s.displayName = oo(o), s;
|
|
628
628
|
};
|
|
629
|
-
const
|
|
630
|
-
const
|
|
629
|
+
const Xo = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], lo = eo("chevron-down", Xo);
|
|
630
|
+
const Go = [
|
|
631
631
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
632
632
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
633
|
-
],
|
|
633
|
+
], co = eo("x", Go), Jo = R`
|
|
634
634
|
from { opacity: 0; transform: translateY(12px); }
|
|
635
635
|
to { opacity: 1; transform: translateY(0); }
|
|
636
|
-
`,
|
|
636
|
+
`, Qo = R`
|
|
637
637
|
from { opacity: 0; transform: translateY(-12px); }
|
|
638
638
|
to { opacity: 1; transform: translateY(0); }
|
|
639
|
-
`,
|
|
639
|
+
`, or = R`
|
|
640
640
|
from { opacity: 1; }
|
|
641
641
|
to { opacity: 0; }
|
|
642
|
-
`,
|
|
642
|
+
`, rr = t.div`
|
|
643
643
|
position: fixed;
|
|
644
644
|
z-index: ${({ theme: o }) => o.zIndex.toast};
|
|
645
645
|
display: flex;
|
|
@@ -649,85 +649,85 @@ const Mo = [
|
|
|
649
649
|
max-width: 400px;
|
|
650
650
|
padding: ${({ theme: o }) => `${o.spacing[3]} ${o.spacing[4]}`};
|
|
651
651
|
border-radius: ${({ theme: o }) => o.radius.md};
|
|
652
|
-
animation: ${({ $closing: o, $position: r }) => o ?
|
|
653
|
-
${
|
|
654
|
-
` : r.startsWith("top") ?
|
|
655
|
-
${
|
|
656
|
-
` :
|
|
657
|
-
${
|
|
652
|
+
animation: ${({ $closing: o, $position: r }) => o ? n`
|
|
653
|
+
${or} 0.2s ease forwards
|
|
654
|
+
` : r.startsWith("top") ? n`
|
|
655
|
+
${Qo} 0.2s ease forwards
|
|
656
|
+
` : n`
|
|
657
|
+
${Jo} 0.2s ease forwards
|
|
658
658
|
`};
|
|
659
659
|
|
|
660
660
|
${({ $position: o, theme: r }) => ({
|
|
661
|
-
"bottom-right":
|
|
661
|
+
"bottom-right": n`
|
|
662
662
|
bottom: ${r.spacing[6]};
|
|
663
663
|
right: ${r.spacing[6]};
|
|
664
664
|
`,
|
|
665
|
-
"bottom-left":
|
|
665
|
+
"bottom-left": n`
|
|
666
666
|
bottom: ${r.spacing[6]};
|
|
667
667
|
left: ${r.spacing[6]};
|
|
668
668
|
`,
|
|
669
|
-
"top-right":
|
|
669
|
+
"top-right": n`
|
|
670
670
|
top: ${r.spacing[6]};
|
|
671
671
|
right: ${r.spacing[6]};
|
|
672
672
|
`,
|
|
673
|
-
"top-left":
|
|
673
|
+
"top-left": n`
|
|
674
674
|
top: ${r.spacing[6]};
|
|
675
675
|
left: ${r.spacing[6]};
|
|
676
676
|
`
|
|
677
677
|
})[o]}
|
|
678
|
-
`,
|
|
678
|
+
`, P = (o, r, s) => n`
|
|
679
679
|
background: ${r};
|
|
680
|
-
border: ${o.brutalism.borderWidth} solid ${
|
|
680
|
+
border: ${o.brutalism.borderWidth} solid ${s};
|
|
681
681
|
box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
|
|
682
|
-
0 ${
|
|
683
|
-
`,
|
|
682
|
+
0 ${s};
|
|
683
|
+
`, nr = t(rr)`
|
|
684
684
|
${({ $variant: o, theme: r }) => r.brutalism ? {
|
|
685
|
-
success:
|
|
685
|
+
success: P(
|
|
686
686
|
r,
|
|
687
687
|
r.colors.success[50],
|
|
688
688
|
r.colors.success[500]
|
|
689
689
|
),
|
|
690
|
-
error:
|
|
690
|
+
error: P(
|
|
691
691
|
r,
|
|
692
692
|
r.colors.error[50],
|
|
693
693
|
r.colors.error[500]
|
|
694
694
|
),
|
|
695
|
-
warning:
|
|
695
|
+
warning: P(
|
|
696
696
|
r,
|
|
697
697
|
r.colors.warning[50],
|
|
698
698
|
r.colors.warning[500]
|
|
699
699
|
),
|
|
700
|
-
info:
|
|
700
|
+
info: P(r, r.colors.info[50], r.colors.info[500])
|
|
701
701
|
}[o] : {
|
|
702
|
-
success:
|
|
702
|
+
success: n`
|
|
703
703
|
background: ${r.colors.success[50]};
|
|
704
704
|
border-left: 4px solid ${r.colors.success[500]};
|
|
705
705
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
706
706
|
`,
|
|
707
|
-
error:
|
|
707
|
+
error: n`
|
|
708
708
|
background: ${r.colors.error[50]};
|
|
709
709
|
border-left: 4px solid ${r.colors.error[500]};
|
|
710
710
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
711
711
|
`,
|
|
712
|
-
warning:
|
|
712
|
+
warning: n`
|
|
713
713
|
background: ${r.colors.warning[50]};
|
|
714
714
|
border-left: 4px solid ${r.colors.warning[500]};
|
|
715
715
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
716
716
|
`,
|
|
717
|
-
info:
|
|
717
|
+
info: n`
|
|
718
718
|
background: ${r.colors.info[50]};
|
|
719
719
|
border-left: 4px solid ${r.colors.info[500]};
|
|
720
720
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
721
721
|
`
|
|
722
722
|
}[o]}
|
|
723
|
-
`,
|
|
723
|
+
`, sr = t.p`
|
|
724
724
|
flex: 1;
|
|
725
725
|
margin: 0;
|
|
726
726
|
font-size: ${({ theme: o }) => o.fontSizes.sm};
|
|
727
727
|
font-weight: ${({ theme: o }) => o.brutalism ? 600 : 400};
|
|
728
728
|
line-height: 1.5;
|
|
729
729
|
color: ${({ theme: o }) => o.colors.neutral[900]};
|
|
730
|
-
`,
|
|
730
|
+
`, tr = t.button`
|
|
731
731
|
flex-shrink: 0;
|
|
732
732
|
display: inline-flex;
|
|
733
733
|
align-items: center;
|
|
@@ -750,121 +750,121 @@ const Mo = [
|
|
|
750
750
|
outline-offset: 2px;
|
|
751
751
|
}
|
|
752
752
|
`;
|
|
753
|
-
function
|
|
753
|
+
function uo({
|
|
754
754
|
open: o,
|
|
755
755
|
onClose: r,
|
|
756
|
-
message:
|
|
757
|
-
variant:
|
|
758
|
-
duration:
|
|
759
|
-
position:
|
|
756
|
+
message: s,
|
|
757
|
+
variant: a = "info",
|
|
758
|
+
duration: l = 4e3,
|
|
759
|
+
position: d = "bottom-right"
|
|
760
760
|
}) {
|
|
761
|
-
const [
|
|
762
|
-
return
|
|
761
|
+
const [c, e] = W(o), [p, u] = W(!1);
|
|
762
|
+
return V(() => {
|
|
763
763
|
if (o)
|
|
764
|
-
|
|
765
|
-
else if (
|
|
764
|
+
e(!0), u(!1);
|
|
765
|
+
else if (c) {
|
|
766
766
|
u(!0);
|
|
767
|
-
const
|
|
768
|
-
|
|
767
|
+
const x = setTimeout(() => {
|
|
768
|
+
e(!1), u(!1);
|
|
769
769
|
}, 200);
|
|
770
|
-
return () => clearTimeout(
|
|
770
|
+
return () => clearTimeout(x);
|
|
771
771
|
}
|
|
772
|
-
}, [o,
|
|
773
|
-
if (!o ||
|
|
772
|
+
}, [o, c]), V(() => {
|
|
773
|
+
if (!o || l === 0)
|
|
774
774
|
return;
|
|
775
|
-
const
|
|
776
|
-
return () => clearTimeout(
|
|
777
|
-
}, [o,
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
|
|
775
|
+
const x = setTimeout(r, l);
|
|
776
|
+
return () => clearTimeout(x);
|
|
777
|
+
}, [o, l, r]), c ? io(
|
|
778
|
+
/* @__PURE__ */ m(
|
|
779
|
+
nr,
|
|
780
780
|
{
|
|
781
|
-
$position:
|
|
782
|
-
$variant:
|
|
781
|
+
$position: d,
|
|
782
|
+
$variant: a,
|
|
783
783
|
$closing: p,
|
|
784
784
|
role: "alert",
|
|
785
785
|
"aria-live": "polite",
|
|
786
786
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ i(sr, { children: s }),
|
|
788
|
+
/* @__PURE__ */ i(tr, { onClick: r, "aria-label": "Close notification", children: /* @__PURE__ */ i(co, { size: 14, strokeWidth: 2.5 }) })
|
|
789
789
|
]
|
|
790
790
|
}
|
|
791
791
|
),
|
|
792
792
|
document.body
|
|
793
793
|
) : null;
|
|
794
794
|
}
|
|
795
|
-
|
|
796
|
-
const
|
|
795
|
+
uo.displayName = "Toast";
|
|
796
|
+
const ir = t.form`
|
|
797
797
|
display: flex;
|
|
798
798
|
flex-direction: column;
|
|
799
799
|
gap: ${({ theme: o }) => o.spacing[4]};
|
|
800
|
-
`,
|
|
800
|
+
`, ar = t.div`
|
|
801
801
|
display: flex;
|
|
802
802
|
flex-direction: column;
|
|
803
803
|
gap: ${({ theme: o }) => o.spacing[1]};
|
|
804
|
-
`,
|
|
804
|
+
`, er = t.label`
|
|
805
805
|
font-size: ${({ theme: o }) => o.fontSizes.sm};
|
|
806
806
|
font-weight: 500;
|
|
807
807
|
color: ${({ theme: o }) => o.colors.neutral[900]};
|
|
808
|
-
`,
|
|
808
|
+
`, lr = t.span`
|
|
809
809
|
color: ${({ theme: o }) => o.colors.error[500]};
|
|
810
810
|
margin-left: 2px;
|
|
811
811
|
aria-hidden: true;
|
|
812
|
-
`,
|
|
812
|
+
`, cr = t.span`
|
|
813
813
|
font-size: ${({ theme: o }) => o.fontSizes.xs};
|
|
814
814
|
color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
|
|
815
815
|
`;
|
|
816
|
-
function
|
|
817
|
-
return /* @__PURE__ */
|
|
818
|
-
|
|
816
|
+
function dr({ onSubmit: o, children: r, ...s }) {
|
|
817
|
+
return /* @__PURE__ */ i(
|
|
818
|
+
ir,
|
|
819
819
|
{
|
|
820
|
-
onSubmit: (
|
|
821
|
-
|
|
820
|
+
onSubmit: (a) => {
|
|
821
|
+
a.preventDefault(), o?.(a);
|
|
822
822
|
},
|
|
823
823
|
noValidate: !0,
|
|
824
|
-
...
|
|
824
|
+
...s,
|
|
825
825
|
children: r
|
|
826
826
|
}
|
|
827
827
|
);
|
|
828
828
|
}
|
|
829
|
-
|
|
830
|
-
function
|
|
829
|
+
dr.displayName = "Form";
|
|
830
|
+
function ur({
|
|
831
831
|
label: o,
|
|
832
832
|
error: r,
|
|
833
|
-
helperText:
|
|
834
|
-
required:
|
|
835
|
-
children:
|
|
833
|
+
helperText: s,
|
|
834
|
+
required: a,
|
|
835
|
+
children: l
|
|
836
836
|
}) {
|
|
837
|
-
const
|
|
838
|
-
|
|
837
|
+
const d = M(), c = `${d}-hint`, e = !!(r || s), p = typeof r == "string" ? r : void 0, u = G.isValidElement(l) ? G.cloneElement(
|
|
838
|
+
l,
|
|
839
839
|
{
|
|
840
|
-
id:
|
|
841
|
-
...
|
|
840
|
+
id: d,
|
|
841
|
+
...e && { "aria-describedby": c },
|
|
842
842
|
...r && { "aria-invalid": !0 }
|
|
843
843
|
}
|
|
844
|
-
) :
|
|
845
|
-
return /* @__PURE__ */
|
|
846
|
-
o && /* @__PURE__ */
|
|
844
|
+
) : l;
|
|
845
|
+
return /* @__PURE__ */ m(ar, { children: [
|
|
846
|
+
o && /* @__PURE__ */ m(er, { htmlFor: d, children: [
|
|
847
847
|
o,
|
|
848
|
-
|
|
848
|
+
a && /* @__PURE__ */ i(lr, { "aria-hidden": "true", children: " *" })
|
|
849
849
|
] }),
|
|
850
850
|
u,
|
|
851
|
-
|
|
851
|
+
e && /* @__PURE__ */ i(cr, { id: c, $error: !!r, children: p ?? s })
|
|
852
852
|
] });
|
|
853
853
|
}
|
|
854
|
-
|
|
855
|
-
const
|
|
854
|
+
ur.displayName = "FormField";
|
|
855
|
+
const pr = t.div`
|
|
856
856
|
display: inline-flex;
|
|
857
857
|
flex-direction: column;
|
|
858
858
|
gap: ${({ theme: o }) => o.spacing[1]};
|
|
859
859
|
width: ${({ $fullWidth: o }) => o ? "100%" : "auto"};
|
|
860
|
-
`,
|
|
860
|
+
`, fr = t.div`
|
|
861
861
|
position: relative;
|
|
862
862
|
display: flex;
|
|
863
863
|
width: 100%;
|
|
864
|
-
`,
|
|
864
|
+
`, $r = t.span`
|
|
865
865
|
font-size: ${({ theme: o }) => o.fontSizes.xs};
|
|
866
866
|
color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
|
|
867
|
-
`,
|
|
867
|
+
`, br = t.select`
|
|
868
868
|
appearance: none;
|
|
869
869
|
width: 100%;
|
|
870
870
|
border-radius: ${({ theme: o }) => o.radius.md};
|
|
@@ -876,15 +876,15 @@ const rr = i.div`
|
|
|
876
876
|
box-shadow 0.2s;
|
|
877
877
|
|
|
878
878
|
${({ $size: o, theme: r }) => ({
|
|
879
|
-
sm:
|
|
879
|
+
sm: n`
|
|
880
880
|
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
881
881
|
font-size: ${r.fontSizes.sm};
|
|
882
882
|
`,
|
|
883
|
-
md:
|
|
883
|
+
md: n`
|
|
884
884
|
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
885
885
|
font-size: ${r.fontSizes.md};
|
|
886
886
|
`,
|
|
887
|
-
lg:
|
|
887
|
+
lg: n`
|
|
888
888
|
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
889
889
|
font-size: ${r.fontSizes.lg};
|
|
890
890
|
`
|
|
@@ -892,27 +892,27 @@ const rr = i.div`
|
|
|
892
892
|
|
|
893
893
|
padding-right: 2.5rem;
|
|
894
894
|
|
|
895
|
-
${({ $variant: o, theme: r }) => r.brutalism ?
|
|
895
|
+
${({ $variant: o, theme: r }) => r.brutalism ? n`
|
|
896
896
|
border: ${r.brutalism.borderWidth} solid
|
|
897
897
|
${r.colors.neutral[900]};
|
|
898
898
|
background-color: ${r.colors.neutral[0]};
|
|
899
899
|
box-shadow: 3px 3px 0 ${r.colors.neutral[900]};
|
|
900
900
|
` : {
|
|
901
|
-
default:
|
|
901
|
+
default: n`
|
|
902
902
|
border: 1px solid ${r.colors.neutral[400]};
|
|
903
903
|
background-color: ${r.colors.neutral[0]};
|
|
904
904
|
`,
|
|
905
|
-
outlined:
|
|
905
|
+
outlined: n`
|
|
906
906
|
border: 2px solid ${r.colors.primary[500]};
|
|
907
907
|
background-color: ${r.colors.neutral[0]};
|
|
908
908
|
`,
|
|
909
|
-
filled:
|
|
909
|
+
filled: n`
|
|
910
910
|
border: 1px solid transparent;
|
|
911
911
|
background-color: ${r.colors.neutral[100]};
|
|
912
912
|
`
|
|
913
913
|
}[o]}
|
|
914
914
|
|
|
915
|
-
${({ $error: o, theme: r }) => o &&
|
|
915
|
+
${({ $error: o, theme: r }) => o && n`
|
|
916
916
|
border-color: ${r.colors.error[500]};
|
|
917
917
|
`}
|
|
918
918
|
|
|
@@ -925,7 +925,7 @@ const rr = i.div`
|
|
|
925
925
|
cursor: not-allowed;
|
|
926
926
|
opacity: 0.6;
|
|
927
927
|
}
|
|
928
|
-
`,
|
|
928
|
+
`, gr = t.button`
|
|
929
929
|
position: absolute;
|
|
930
930
|
right: ${({ theme: o }) => o.spacing[3]};
|
|
931
931
|
top: 50%;
|
|
@@ -947,7 +947,7 @@ const rr = i.div`
|
|
|
947
947
|
outline-offset: 2px;
|
|
948
948
|
border-radius: 2px;
|
|
949
949
|
}
|
|
950
|
-
`,
|
|
950
|
+
`, xr = t.span`
|
|
951
951
|
position: absolute;
|
|
952
952
|
right: ${({ theme: o }) => o.spacing[3]};
|
|
953
953
|
top: 50%;
|
|
@@ -957,63 +957,63 @@ const rr = i.div`
|
|
|
957
957
|
align-items: center;
|
|
958
958
|
color: ${({ theme: o }) => o.colors.neutral[500]};
|
|
959
959
|
`;
|
|
960
|
-
function
|
|
960
|
+
function yr({
|
|
961
961
|
options: o,
|
|
962
962
|
placeholder: r,
|
|
963
|
-
size:
|
|
964
|
-
variant:
|
|
965
|
-
error:
|
|
966
|
-
fullWidth:
|
|
967
|
-
clearable:
|
|
968
|
-
onClear:
|
|
963
|
+
size: s = "md",
|
|
964
|
+
variant: a = "default",
|
|
965
|
+
error: l,
|
|
966
|
+
fullWidth: d,
|
|
967
|
+
clearable: c,
|
|
968
|
+
onClear: e,
|
|
969
969
|
id: p,
|
|
970
970
|
value: u,
|
|
971
|
-
defaultValue:
|
|
972
|
-
onChange:
|
|
973
|
-
|
|
971
|
+
defaultValue: x,
|
|
972
|
+
onChange: C,
|
|
973
|
+
...w
|
|
974
974
|
}) {
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
),
|
|
978
|
-
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
},
|
|
982
|
-
return /* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
|
|
975
|
+
const b = M(), f = p ?? b, S = `${f}-hint`, z = typeof l == "string" ? l : void 0, [h, E] = W(
|
|
976
|
+
x ?? ""
|
|
977
|
+
), B = u !== void 0, O = B ? u : h, $ = (k) => {
|
|
978
|
+
B || E(k.target.value), C?.(k);
|
|
979
|
+
}, y = () => {
|
|
980
|
+
B || E(""), e?.();
|
|
981
|
+
}, v = c && !!O;
|
|
982
|
+
return /* @__PURE__ */ m(pr, { $fullWidth: d, children: [
|
|
983
|
+
/* @__PURE__ */ m(fr, { children: [
|
|
984
|
+
/* @__PURE__ */ m(
|
|
985
|
+
br,
|
|
986
986
|
{
|
|
987
|
-
id:
|
|
988
|
-
$size:
|
|
989
|
-
$variant:
|
|
990
|
-
$error: !!
|
|
991
|
-
"aria-invalid": !!
|
|
992
|
-
"aria-describedby":
|
|
993
|
-
value:
|
|
994
|
-
onChange:
|
|
995
|
-
|
|
987
|
+
id: f,
|
|
988
|
+
$size: s,
|
|
989
|
+
$variant: a,
|
|
990
|
+
$error: !!l,
|
|
991
|
+
"aria-invalid": !!l,
|
|
992
|
+
"aria-describedby": z ? S : void 0,
|
|
993
|
+
value: O,
|
|
994
|
+
onChange: $,
|
|
995
|
+
...w,
|
|
996
996
|
children: [
|
|
997
|
-
r && /* @__PURE__ */
|
|
998
|
-
o.map((
|
|
997
|
+
r && /* @__PURE__ */ i("option", { value: "", disabled: !0, children: r }),
|
|
998
|
+
o.map((k) => /* @__PURE__ */ i("option", { value: k.value, disabled: k.disabled, children: k.label }, k.value))
|
|
999
999
|
]
|
|
1000
1000
|
}
|
|
1001
1001
|
),
|
|
1002
|
-
|
|
1003
|
-
|
|
1002
|
+
v ? /* @__PURE__ */ i(
|
|
1003
|
+
gr,
|
|
1004
1004
|
{
|
|
1005
1005
|
type: "button",
|
|
1006
|
-
onClick:
|
|
1006
|
+
onClick: y,
|
|
1007
1007
|
"aria-label": "Clear selection",
|
|
1008
|
-
children: /* @__PURE__ */
|
|
1008
|
+
children: /* @__PURE__ */ i(co, { size: 14 })
|
|
1009
1009
|
}
|
|
1010
|
-
) : /* @__PURE__ */
|
|
1010
|
+
) : /* @__PURE__ */ i(xr, { "aria-hidden": "true", children: /* @__PURE__ */ i(lo, { size: 14 }) })
|
|
1011
1011
|
] }),
|
|
1012
|
-
|
|
1012
|
+
z && /* @__PURE__ */ i($r, { id: S, $error: !0, children: z })
|
|
1013
1013
|
] });
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1015
|
+
yr.displayName = "Select";
|
|
1016
|
+
const wr = t.a`
|
|
1017
1017
|
text-decoration: underline;
|
|
1018
1018
|
text-underline-offset: 2px;
|
|
1019
1019
|
transition: color 0.15s;
|
|
@@ -1025,13 +1025,13 @@ const lr = i.a`
|
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
${({ $variant: o, theme: r }) => ({
|
|
1028
|
-
default:
|
|
1028
|
+
default: n`
|
|
1029
1029
|
color: ${r.colors.primary[500]};
|
|
1030
1030
|
&:hover {
|
|
1031
1031
|
color: ${r.colors.primary[700]};
|
|
1032
1032
|
}
|
|
1033
1033
|
`,
|
|
1034
|
-
subtle:
|
|
1034
|
+
subtle: n`
|
|
1035
1035
|
color: ${r.colors.neutral[500]};
|
|
1036
1036
|
&:hover {
|
|
1037
1037
|
color: ${r.colors.neutral[900]};
|
|
@@ -1039,39 +1039,39 @@ const lr = i.a`
|
|
|
1039
1039
|
`
|
|
1040
1040
|
})[o]}
|
|
1041
1041
|
`;
|
|
1042
|
-
function
|
|
1042
|
+
function vr({
|
|
1043
1043
|
variant: o = "default",
|
|
1044
1044
|
external: r,
|
|
1045
|
-
children:
|
|
1046
|
-
...
|
|
1045
|
+
children: s,
|
|
1046
|
+
...a
|
|
1047
1047
|
}) {
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
|
|
1048
|
+
return /* @__PURE__ */ i(
|
|
1049
|
+
wr,
|
|
1050
1050
|
{
|
|
1051
1051
|
$variant: o,
|
|
1052
1052
|
...r && { target: "_blank", rel: "noreferrer" },
|
|
1053
|
-
...
|
|
1054
|
-
children:
|
|
1053
|
+
...a,
|
|
1054
|
+
children: s
|
|
1055
1055
|
}
|
|
1056
1056
|
);
|
|
1057
1057
|
}
|
|
1058
|
-
|
|
1059
|
-
const
|
|
1058
|
+
vr.displayName = "Link";
|
|
1059
|
+
const mr = t.div`
|
|
1060
1060
|
border-radius: ${({ theme: o }) => o.radius.md};
|
|
1061
1061
|
background: ${({ theme: o }) => o.colors.neutral[0]};
|
|
1062
1062
|
overflow: hidden;
|
|
1063
1063
|
|
|
1064
|
-
${({ theme: o, $accentColor: r }) => o.brutalism ?
|
|
1064
|
+
${({ theme: o, $accentColor: r }) => o.brutalism ? n`
|
|
1065
1065
|
border: ${o.brutalism.borderWidth} solid
|
|
1066
1066
|
${r ?? o.colors.neutral[900]};
|
|
1067
1067
|
box-shadow: ${o.brutalism.shadowOffset}
|
|
1068
1068
|
${o.brutalism.shadowOffset} 0
|
|
1069
1069
|
${r ?? o.colors.neutral[900]};
|
|
1070
|
-
` :
|
|
1070
|
+
` : n`
|
|
1071
1071
|
border: 1px solid ${r ?? o.colors.neutral[200]};
|
|
1072
1072
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
1073
1073
|
`}
|
|
1074
|
-
`,
|
|
1074
|
+
`, hr = t.button`
|
|
1075
1075
|
width: 100%;
|
|
1076
1076
|
display: flex;
|
|
1077
1077
|
align-items: flex-start;
|
|
@@ -1091,19 +1091,19 @@ const dr = i.div`
|
|
|
1091
1091
|
${({ theme: o, $accentColor: r }) => r ?? o.colors.primary[500]};
|
|
1092
1092
|
outline-offset: -2px;
|
|
1093
1093
|
}
|
|
1094
|
-
`,
|
|
1094
|
+
`, kr = t.div`
|
|
1095
1095
|
flex: 1;
|
|
1096
1096
|
min-width: 0;
|
|
1097
|
-
`,
|
|
1097
|
+
`, Cr = t.span`
|
|
1098
1098
|
display: block;
|
|
1099
1099
|
font-size: ${({ theme: o }) => o.fontSizes.md};
|
|
1100
1100
|
font-weight: 600;
|
|
1101
1101
|
color: ${({ theme: o }) => o.colors.neutral[900]};
|
|
1102
|
-
`,
|
|
1102
|
+
`, zr = t.span`
|
|
1103
1103
|
display: block;
|
|
1104
1104
|
font-size: ${({ theme: o }) => o.fontSizes.sm};
|
|
1105
1105
|
color: ${({ theme: o }) => o.colors.neutral[500]};
|
|
1106
|
-
`,
|
|
1106
|
+
`, Sr = t.div`
|
|
1107
1107
|
display: flex;
|
|
1108
1108
|
flex-direction: row;
|
|
1109
1109
|
align-items: center;
|
|
@@ -1115,11 +1115,11 @@ const dr = i.div`
|
|
|
1115
1115
|
align-items: flex-start;
|
|
1116
1116
|
gap: ${({ theme: o }) => o.spacing[2]};
|
|
1117
1117
|
}
|
|
1118
|
-
`,
|
|
1118
|
+
`, Tr = t.div`
|
|
1119
1119
|
display: flex;
|
|
1120
1120
|
align-items: center;
|
|
1121
1121
|
gap: ${({ theme: o }) => o.spacing[2]};
|
|
1122
|
-
`,
|
|
1122
|
+
`, Ir = t.span`
|
|
1123
1123
|
display: inline-flex;
|
|
1124
1124
|
align-items: center;
|
|
1125
1125
|
justify-content: center;
|
|
@@ -1127,79 +1127,79 @@ const dr = i.div`
|
|
|
1127
1127
|
transition: transform 0.2s ease;
|
|
1128
1128
|
transform: ${({ $open: o }) => o ? "rotate(180deg)" : "rotate(0deg)"};
|
|
1129
1129
|
color: ${({ theme: o, $accentColor: r }) => r ?? o.colors.neutral[500]};
|
|
1130
|
-
`,
|
|
1130
|
+
`, Wr = t.div`
|
|
1131
1131
|
display: grid;
|
|
1132
1132
|
grid-template-rows: ${({ $open: o }) => o ? "1fr" : "0fr"};
|
|
1133
1133
|
transition: grid-template-rows 0.2s ease;
|
|
1134
|
-
`,
|
|
1134
|
+
`, Er = t.div`
|
|
1135
1135
|
overflow: hidden;
|
|
1136
|
-
`,
|
|
1136
|
+
`, Br = t.div`
|
|
1137
1137
|
padding: ${({ theme: o }) => o.spacing[4]};
|
|
1138
1138
|
border-top: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
|
|
1139
1139
|
`;
|
|
1140
|
-
function
|
|
1140
|
+
function Or({
|
|
1141
1141
|
title: o,
|
|
1142
1142
|
children: r,
|
|
1143
|
-
defaultOpen:
|
|
1144
|
-
open:
|
|
1145
|
-
onToggle:
|
|
1146
|
-
subtitle:
|
|
1147
|
-
headerActions:
|
|
1148
|
-
accentColor:
|
|
1143
|
+
defaultOpen: s = !1,
|
|
1144
|
+
open: a,
|
|
1145
|
+
onToggle: l,
|
|
1146
|
+
subtitle: d,
|
|
1147
|
+
headerActions: c,
|
|
1148
|
+
accentColor: e
|
|
1149
1149
|
}) {
|
|
1150
|
-
const [p, u] =
|
|
1151
|
-
return /* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
|
|
1150
|
+
const [p, u] = W(s), x = M(), C = a !== void 0, w = C ? a : p;
|
|
1151
|
+
return /* @__PURE__ */ m(mr, { $accentColor: e, children: [
|
|
1152
|
+
/* @__PURE__ */ m(
|
|
1153
|
+
hr,
|
|
1154
1154
|
{
|
|
1155
1155
|
type: "button",
|
|
1156
|
-
$open:
|
|
1157
|
-
$accentColor:
|
|
1158
|
-
"aria-expanded":
|
|
1159
|
-
"aria-controls":
|
|
1156
|
+
$open: w,
|
|
1157
|
+
$accentColor: e,
|
|
1158
|
+
"aria-expanded": w,
|
|
1159
|
+
"aria-controls": x,
|
|
1160
1160
|
onClick: () => {
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1161
|
+
const f = !w;
|
|
1162
|
+
C || u(f), l?.(f);
|
|
1163
1163
|
},
|
|
1164
1164
|
children: [
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
(
|
|
1168
|
-
|
|
1169
|
-
|
|
1165
|
+
/* @__PURE__ */ m(kr, { children: [
|
|
1166
|
+
/* @__PURE__ */ i(Cr, { children: o }),
|
|
1167
|
+
(d || c) && /* @__PURE__ */ m(Sr, { children: [
|
|
1168
|
+
d && /* @__PURE__ */ i(zr, { children: d }),
|
|
1169
|
+
c && /* @__PURE__ */ i(Tr, { onClick: (f) => f.stopPropagation(), children: c })
|
|
1170
1170
|
] })
|
|
1171
1171
|
] }),
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
|
|
1172
|
+
/* @__PURE__ */ i(
|
|
1173
|
+
Ir,
|
|
1174
1174
|
{
|
|
1175
|
-
$open:
|
|
1176
|
-
$accentColor:
|
|
1175
|
+
$open: w,
|
|
1176
|
+
$accentColor: e,
|
|
1177
1177
|
"aria-hidden": "true",
|
|
1178
|
-
children: /* @__PURE__ */
|
|
1178
|
+
children: /* @__PURE__ */ i(lo, { size: 18, strokeWidth: 2.5 })
|
|
1179
1179
|
}
|
|
1180
1180
|
)
|
|
1181
1181
|
]
|
|
1182
1182
|
}
|
|
1183
1183
|
),
|
|
1184
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ i(Wr, { $open: w, children: /* @__PURE__ */ i(Er, { id: x, role: "region", "aria-label": o, children: /* @__PURE__ */ i(Br, { children: r }) }) })
|
|
1185
1185
|
] });
|
|
1186
1186
|
}
|
|
1187
|
-
|
|
1188
|
-
const
|
|
1189
|
-
function
|
|
1190
|
-
const [r,
|
|
1191
|
-
|
|
1192
|
-
}, []),
|
|
1193
|
-
const
|
|
1194
|
-
return
|
|
1195
|
-
}, [
|
|
1196
|
-
return /* @__PURE__ */
|
|
1187
|
+
Or.displayName = "CollapsibleCard";
|
|
1188
|
+
const po = so(null);
|
|
1189
|
+
function Gr({ children: o }) {
|
|
1190
|
+
const [r, s] = W(null), a = j((d) => {
|
|
1191
|
+
s({ ...d, id: Date.now() });
|
|
1192
|
+
}, []), l = wo(() => {
|
|
1193
|
+
const d = (c) => a(c);
|
|
1194
|
+
return d.success = (c, e) => a({ ...e, message: c, variant: "success" }), d.error = (c, e) => a({ ...e, message: c, variant: "error" }), d.warning = (c, e) => a({ ...e, message: c, variant: "warning" }), d.info = (c, e) => a({ ...e, message: c, variant: "info" }), d;
|
|
1195
|
+
}, [a]);
|
|
1196
|
+
return /* @__PURE__ */ m(po.Provider, { value: { toast: l }, children: [
|
|
1197
1197
|
o,
|
|
1198
|
-
r && /* @__PURE__ */
|
|
1199
|
-
|
|
1198
|
+
r && /* @__PURE__ */ i(
|
|
1199
|
+
uo,
|
|
1200
1200
|
{
|
|
1201
1201
|
open: !0,
|
|
1202
|
-
onClose: () =>
|
|
1202
|
+
onClose: () => s(null),
|
|
1203
1203
|
message: r.message,
|
|
1204
1204
|
variant: r.variant,
|
|
1205
1205
|
duration: r.duration,
|
|
@@ -1209,89 +1209,395 @@ function Or({ children: o }) {
|
|
|
1209
1209
|
)
|
|
1210
1210
|
] });
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
const o =
|
|
1212
|
+
function Jr() {
|
|
1213
|
+
const o = no(po);
|
|
1214
1214
|
if (!o)
|
|
1215
1215
|
throw new Error("useToast must be used within a ToastProvider");
|
|
1216
1216
|
return o;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Qr({
|
|
1219
1219
|
initialValues: o,
|
|
1220
1220
|
validate: r,
|
|
1221
|
-
onSubmit:
|
|
1222
|
-
onError:
|
|
1221
|
+
onSubmit: s,
|
|
1222
|
+
onError: a
|
|
1223
1223
|
}) {
|
|
1224
|
-
const [
|
|
1224
|
+
const [l, d] = W(o), [c, e] = W(
|
|
1225
1225
|
{}
|
|
1226
|
-
), [p, u] =
|
|
1227
|
-
|
|
1228
|
-
const
|
|
1229
|
-
(
|
|
1226
|
+
), [p, u] = W({}), [x, C] = W(!1), w = Y(l);
|
|
1227
|
+
w.current = l;
|
|
1228
|
+
const b = j(
|
|
1229
|
+
($) => {
|
|
1230
1230
|
if (!r)
|
|
1231
1231
|
return {};
|
|
1232
|
-
const
|
|
1232
|
+
const y = r($);
|
|
1233
1233
|
return Object.fromEntries(
|
|
1234
|
-
Object.entries(
|
|
1234
|
+
Object.entries(y).filter(([, v]) => v !== void 0)
|
|
1235
1235
|
);
|
|
1236
1236
|
},
|
|
1237
1237
|
[r]
|
|
1238
|
-
),
|
|
1239
|
-
|
|
1240
|
-
const S =
|
|
1241
|
-
(
|
|
1242
|
-
const { name:
|
|
1243
|
-
|
|
1238
|
+
), f = Y(p);
|
|
1239
|
+
f.current = p;
|
|
1240
|
+
const S = j(
|
|
1241
|
+
($) => {
|
|
1242
|
+
const { name: y, value: v } = $.target, k = { ...w.current, [y]: v };
|
|
1243
|
+
d(k), f.current[y] && e(b(k));
|
|
1244
1244
|
},
|
|
1245
|
-
[
|
|
1246
|
-
),
|
|
1247
|
-
(
|
|
1248
|
-
const { name:
|
|
1249
|
-
u((
|
|
1245
|
+
[b]
|
|
1246
|
+
), z = j(
|
|
1247
|
+
($) => {
|
|
1248
|
+
const { name: y } = $.target;
|
|
1249
|
+
u((v) => ({ ...v, [y]: !0 })), e(b(w.current));
|
|
1250
1250
|
},
|
|
1251
|
-
[
|
|
1252
|
-
),
|
|
1253
|
-
(
|
|
1254
|
-
|
|
1255
|
-
const
|
|
1256
|
-
(
|
|
1251
|
+
[b]
|
|
1252
|
+
), h = j(
|
|
1253
|
+
($) => {
|
|
1254
|
+
$?.preventDefault();
|
|
1255
|
+
const y = Object.keys(w.current).reduce(
|
|
1256
|
+
(A, D) => ({ ...A, [D]: !0 }),
|
|
1257
1257
|
{}
|
|
1258
1258
|
);
|
|
1259
|
-
u(
|
|
1260
|
-
const
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1259
|
+
u(y);
|
|
1260
|
+
const v = b(w.current);
|
|
1261
|
+
if (e(v), Object.keys(v).length > 0) {
|
|
1262
|
+
a?.(v);
|
|
1263
1263
|
return;
|
|
1264
1264
|
}
|
|
1265
1265
|
(async () => {
|
|
1266
|
-
|
|
1266
|
+
C(!0);
|
|
1267
1267
|
try {
|
|
1268
|
-
await
|
|
1268
|
+
await s?.(w.current);
|
|
1269
1269
|
} finally {
|
|
1270
|
-
|
|
1270
|
+
C(!1);
|
|
1271
1271
|
}
|
|
1272
1272
|
})();
|
|
1273
1273
|
},
|
|
1274
|
-
[
|
|
1275
|
-
),
|
|
1276
|
-
|
|
1277
|
-
}, []),
|
|
1278
|
-
|
|
1279
|
-
}, [o]),
|
|
1280
|
-
Object.entries(
|
|
1274
|
+
[b, s, a]
|
|
1275
|
+
), E = j(($, y) => {
|
|
1276
|
+
d((v) => ({ ...v, [$]: y }));
|
|
1277
|
+
}, []), B = j(() => {
|
|
1278
|
+
d(o), e({}), u({}), C(!1);
|
|
1279
|
+
}, [o]), O = Object.fromEntries(
|
|
1280
|
+
Object.entries(c).filter(([$]) => p[$])
|
|
1281
1281
|
);
|
|
1282
1282
|
return {
|
|
1283
|
-
values:
|
|
1284
|
-
errors:
|
|
1283
|
+
values: l,
|
|
1284
|
+
errors: O,
|
|
1285
1285
|
touched: p,
|
|
1286
1286
|
handleChange: S,
|
|
1287
|
-
handleBlur:
|
|
1288
|
-
handleSubmit:
|
|
1289
|
-
setFieldValue:
|
|
1290
|
-
reset:
|
|
1291
|
-
isSubmitting:
|
|
1287
|
+
handleBlur: z,
|
|
1288
|
+
handleSubmit: h,
|
|
1289
|
+
setFieldValue: E,
|
|
1290
|
+
reset: B,
|
|
1291
|
+
isSubmitting: x
|
|
1292
1292
|
};
|
|
1293
1293
|
}
|
|
1294
|
-
const
|
|
1294
|
+
const fo = t.div`
|
|
1295
|
+
overflow-x: auto;
|
|
1296
|
+
width: 100%;
|
|
1297
|
+
|
|
1298
|
+
${({ theme: o }) => o.brutalism ? n`
|
|
1299
|
+
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
1300
|
+
box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
|
|
1301
|
+
0 ${o.colors.neutral[900]};
|
|
1302
|
+
` : n`
|
|
1303
|
+
border: 1px solid ${o.colors.neutral[300]};
|
|
1304
|
+
border-radius: ${o.radius.md};
|
|
1305
|
+
overflow: hidden;
|
|
1306
|
+
`}
|
|
1307
|
+
`, $o = t.table`
|
|
1308
|
+
width: 100%;
|
|
1309
|
+
border-collapse: collapse;
|
|
1310
|
+
font-size: ${({ $size: o, theme: r }) => ({
|
|
1311
|
+
sm: r.fontSizes.sm,
|
|
1312
|
+
md: r.fontSizes.md,
|
|
1313
|
+
lg: r.fontSizes.lg
|
|
1314
|
+
})[o]};
|
|
1315
|
+
`, bo = t.thead`
|
|
1316
|
+
${({ theme: o }) => o.brutalism ? n`
|
|
1317
|
+
background-color: ${o.colors.neutral[900]};
|
|
1318
|
+
color: ${o.colors.neutral[0]};
|
|
1319
|
+
` : n`
|
|
1320
|
+
background-color: ${o.colors.neutral[100]};
|
|
1321
|
+
color: ${o.colors.neutral[600]};
|
|
1322
|
+
`}
|
|
1323
|
+
`, go = t.tbody`
|
|
1324
|
+
${({ $variant: o, theme: r }) => o === "striped" && n`
|
|
1325
|
+
tr:nth-child(even) {
|
|
1326
|
+
background-color: ${r.colors.neutral[100]};
|
|
1327
|
+
}
|
|
1328
|
+
`}
|
|
1329
|
+
|
|
1330
|
+
tr:last-child td {
|
|
1331
|
+
border-bottom: none;
|
|
1332
|
+
}
|
|
1333
|
+
`, H = t.tr``, Z = t.th`
|
|
1334
|
+
text-align: left;
|
|
1335
|
+
font-weight: 700;
|
|
1336
|
+
white-space: nowrap;
|
|
1337
|
+
|
|
1338
|
+
${({ $size: o, theme: r }) => ({
|
|
1339
|
+
sm: n`
|
|
1340
|
+
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
1341
|
+
`,
|
|
1342
|
+
md: n`
|
|
1343
|
+
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
1344
|
+
`,
|
|
1345
|
+
lg: n`
|
|
1346
|
+
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
1347
|
+
`
|
|
1348
|
+
})[o]}
|
|
1349
|
+
|
|
1350
|
+
${({ theme: o }) => o.brutalism ? n`
|
|
1351
|
+
border-right: 1px solid ${o.colors.neutral[600]};
|
|
1352
|
+
&:last-child {
|
|
1353
|
+
border-right: none;
|
|
1354
|
+
}
|
|
1355
|
+
` : n`
|
|
1356
|
+
border-bottom: 2px solid ${o.colors.neutral[300]};
|
|
1357
|
+
border-right: 1px solid ${o.colors.neutral[200]};
|
|
1358
|
+
&:last-child {
|
|
1359
|
+
border-right: none;
|
|
1360
|
+
}
|
|
1361
|
+
`}
|
|
1362
|
+
`, X = t.td`
|
|
1363
|
+
${({ $size: o, theme: r }) => ({
|
|
1364
|
+
sm: n`
|
|
1365
|
+
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
1366
|
+
`,
|
|
1367
|
+
md: n`
|
|
1368
|
+
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
1369
|
+
`,
|
|
1370
|
+
lg: n`
|
|
1371
|
+
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
1372
|
+
`
|
|
1373
|
+
})[o]}
|
|
1374
|
+
|
|
1375
|
+
${({ $variant: o, theme: r }) => r.brutalism ? n`
|
|
1376
|
+
border-bottom: ${r.brutalism.borderWidth} solid
|
|
1377
|
+
${r.colors.neutral[900]};
|
|
1378
|
+
${o === "bordered" && n`
|
|
1379
|
+
border-right: ${r.brutalism.borderWidth} solid
|
|
1380
|
+
${r.colors.neutral[900]};
|
|
1381
|
+
&:last-child {
|
|
1382
|
+
border-right: none;
|
|
1383
|
+
}
|
|
1384
|
+
`}
|
|
1385
|
+
` : o === "bordered" ? n`
|
|
1386
|
+
border: 1px solid ${r.colors.neutral[300]};
|
|
1387
|
+
` : n`
|
|
1388
|
+
border-bottom: 1px solid ${r.colors.neutral[200]};
|
|
1389
|
+
`}
|
|
1390
|
+
`;
|
|
1391
|
+
function jr({
|
|
1392
|
+
columns: o,
|
|
1393
|
+
data: r,
|
|
1394
|
+
size: s = "md",
|
|
1395
|
+
variant: a = "default",
|
|
1396
|
+
caption: l,
|
|
1397
|
+
className: d,
|
|
1398
|
+
style: c
|
|
1399
|
+
}) {
|
|
1400
|
+
return /* @__PURE__ */ i(fo, { className: d, style: c, children: /* @__PURE__ */ m($o, { $size: s, children: [
|
|
1401
|
+
l && /* @__PURE__ */ i("caption", { children: l }),
|
|
1402
|
+
/* @__PURE__ */ i(bo, { children: /* @__PURE__ */ i(H, { children: o.map((e) => /* @__PURE__ */ i(
|
|
1403
|
+
Z,
|
|
1404
|
+
{
|
|
1405
|
+
$size: s,
|
|
1406
|
+
style: e.width ? { width: e.width } : void 0,
|
|
1407
|
+
children: e.header
|
|
1408
|
+
},
|
|
1409
|
+
e.key
|
|
1410
|
+
)) }) }),
|
|
1411
|
+
/* @__PURE__ */ i(go, { $variant: a, children: r.map((e, p) => /* @__PURE__ */ i(H, { children: o.map((u) => /* @__PURE__ */ i(X, { $size: s, $variant: a, children: u.render ? u.render(e[u.key], e, p) : String(e[u.key] ?? "") }, u.key)) }, p)) })
|
|
1412
|
+
] }) });
|
|
1413
|
+
}
|
|
1414
|
+
jr.displayName = "Table";
|
|
1415
|
+
const Rr = t(X)`
|
|
1416
|
+
${({ $editable: o, theme: r }) => o && n`
|
|
1417
|
+
cursor: pointer;
|
|
1418
|
+
position: relative;
|
|
1419
|
+
|
|
1420
|
+
&:hover {
|
|
1421
|
+
background-color: ${r.brutalism ? r.colors.neutral[100] : r.colors.primary[50]};
|
|
1422
|
+
}
|
|
1423
|
+
`}
|
|
1424
|
+
`, Ar = t.input`
|
|
1425
|
+
width: 100%;
|
|
1426
|
+
border: none;
|
|
1427
|
+
outline: none;
|
|
1428
|
+
background: transparent;
|
|
1429
|
+
font: inherit;
|
|
1430
|
+
color: inherit;
|
|
1431
|
+
padding: 0;
|
|
1432
|
+
margin: 0;
|
|
1433
|
+
|
|
1434
|
+
${({ theme: o }) => o.brutalism ? n`
|
|
1435
|
+
&:focus {
|
|
1436
|
+
outline: 2px solid ${o.colors.neutral[900]};
|
|
1437
|
+
outline-offset: 1px;
|
|
1438
|
+
}
|
|
1439
|
+
` : n`
|
|
1440
|
+
&:focus {
|
|
1441
|
+
box-shadow: ${o.shadows.focusRing};
|
|
1442
|
+
}
|
|
1443
|
+
`}
|
|
1444
|
+
`, Lr = t(Z)`
|
|
1445
|
+
width: 40px;
|
|
1446
|
+
`, Nr = t(X)`
|
|
1447
|
+
width: 40px;
|
|
1448
|
+
text-align: center;
|
|
1449
|
+
padding-left: 0;
|
|
1450
|
+
padding-right: 0;
|
|
1451
|
+
`, Vr = t.button`
|
|
1452
|
+
display: inline-flex;
|
|
1453
|
+
align-items: center;
|
|
1454
|
+
justify-content: center;
|
|
1455
|
+
width: 24px;
|
|
1456
|
+
height: 24px;
|
|
1457
|
+
padding: 0;
|
|
1458
|
+
background: none;
|
|
1459
|
+
border: none;
|
|
1460
|
+
cursor: pointer;
|
|
1461
|
+
font-size: ${({ theme: o }) => o.fontSizes.xs};
|
|
1462
|
+
color: ${({ theme: o }) => o.colors.neutral[500]};
|
|
1463
|
+
border-radius: ${({ theme: o }) => o.radius.md};
|
|
1464
|
+
transition: color 0.1s;
|
|
1465
|
+
|
|
1466
|
+
&:hover {
|
|
1467
|
+
color: ${({ theme: o }) => o.colors.error[500]};
|
|
1468
|
+
|
|
1469
|
+
${({ theme: o }) => o.brutalism && n`
|
|
1470
|
+
background-color: ${o.colors.error[50]};
|
|
1471
|
+
`}
|
|
1472
|
+
}
|
|
1473
|
+
`, Dr = t.tr`
|
|
1474
|
+
${({ theme: o }) => o.brutalism ? n`
|
|
1475
|
+
border-top: ${o.brutalism.borderWidth} solid
|
|
1476
|
+
${o.colors.neutral[900]};
|
|
1477
|
+
` : n`
|
|
1478
|
+
border-top: 1px solid ${o.colors.neutral[200]};
|
|
1479
|
+
`}
|
|
1480
|
+
`, Fr = t.button`
|
|
1481
|
+
display: inline-flex;
|
|
1482
|
+
align-items: center;
|
|
1483
|
+
gap: ${({ theme: o }) => o.spacing[1]};
|
|
1484
|
+
background: none;
|
|
1485
|
+
border: none;
|
|
1486
|
+
cursor: pointer;
|
|
1487
|
+
font: inherit;
|
|
1488
|
+
font-weight: 600;
|
|
1489
|
+
color: ${({ theme: o }) => o.colors.neutral[600]};
|
|
1490
|
+
padding: ${({ theme: o }) => `${o.spacing[2]} ${o.spacing[3]}`};
|
|
1491
|
+
width: 100%;
|
|
1492
|
+
text-align: left;
|
|
1493
|
+
|
|
1494
|
+
&:hover {
|
|
1495
|
+
color: ${({ theme: o }) => o.brutalism ? o.colors.neutral[900] : o.colors.primary[500]};
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
&:focus-visible {
|
|
1499
|
+
outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
|
|
1500
|
+
outline-offset: 2px;
|
|
1501
|
+
}
|
|
1502
|
+
`;
|
|
1503
|
+
function Mr({
|
|
1504
|
+
columns: o,
|
|
1505
|
+
defaultData: r,
|
|
1506
|
+
data: s,
|
|
1507
|
+
onChange: a,
|
|
1508
|
+
size: l = "md",
|
|
1509
|
+
addRowLabel: d = "Add row",
|
|
1510
|
+
newRowFactory: c,
|
|
1511
|
+
deletable: e = !1,
|
|
1512
|
+
className: p,
|
|
1513
|
+
style: u
|
|
1514
|
+
}) {
|
|
1515
|
+
const x = s !== void 0, [C, w] = W(r ?? []), b = x ? s : C, [f, S] = W(null), [z, h] = W(""), E = Y(null);
|
|
1516
|
+
V(() => {
|
|
1517
|
+
f && (E.current?.focus(), E.current?.select());
|
|
1518
|
+
}, [f]);
|
|
1519
|
+
const B = j(
|
|
1520
|
+
(g) => {
|
|
1521
|
+
x || w(g), a?.(g);
|
|
1522
|
+
},
|
|
1523
|
+
[x, a]
|
|
1524
|
+
), O = (g, T, I) => {
|
|
1525
|
+
S({ rowIndex: g, colKey: T }), h(String(I ?? ""));
|
|
1526
|
+
}, $ = j(() => {
|
|
1527
|
+
if (!f) return;
|
|
1528
|
+
const { rowIndex: g, colKey: T } = f, I = b.map(
|
|
1529
|
+
(L, F) => F === g ? { ...L, [T]: z } : L
|
|
1530
|
+
);
|
|
1531
|
+
B(I), S(null);
|
|
1532
|
+
}, [f, b, z, B]), y = () => {
|
|
1533
|
+
S(null), h("");
|
|
1534
|
+
}, v = (g) => {
|
|
1535
|
+
g.key === "Enter" && $(), g.key === "Escape" && y();
|
|
1536
|
+
}, k = () => {
|
|
1537
|
+
const g = c ? c() : Object.fromEntries(o.map((T) => [T.key, ""]));
|
|
1538
|
+
B([...b, g]);
|
|
1539
|
+
}, A = (g) => {
|
|
1540
|
+
f?.rowIndex === g && S(null), B(b.filter((T, I) => I !== g));
|
|
1541
|
+
}, D = e ? o.length + 1 : o.length;
|
|
1542
|
+
return /* @__PURE__ */ i(fo, { className: p, style: u, children: /* @__PURE__ */ m($o, { $size: l, children: [
|
|
1543
|
+
/* @__PURE__ */ i(bo, { children: /* @__PURE__ */ m(H, { children: [
|
|
1544
|
+
o.map((g) => /* @__PURE__ */ i(
|
|
1545
|
+
Z,
|
|
1546
|
+
{
|
|
1547
|
+
$size: l,
|
|
1548
|
+
style: g.width ? { width: g.width } : void 0,
|
|
1549
|
+
children: g.header
|
|
1550
|
+
},
|
|
1551
|
+
g.key
|
|
1552
|
+
)),
|
|
1553
|
+
e && /* @__PURE__ */ i(Lr, { $size: l, "aria-label": "Actions" })
|
|
1554
|
+
] }) }),
|
|
1555
|
+
/* @__PURE__ */ m(go, { $variant: "default", children: [
|
|
1556
|
+
b.map((g, T) => /* @__PURE__ */ m(H, { children: [
|
|
1557
|
+
o.map((I) => {
|
|
1558
|
+
const L = f?.rowIndex === T && f.colKey === I.key, F = g[I.key];
|
|
1559
|
+
return /* @__PURE__ */ i(
|
|
1560
|
+
Rr,
|
|
1561
|
+
{
|
|
1562
|
+
$size: l,
|
|
1563
|
+
$variant: "default",
|
|
1564
|
+
$editable: I.editable && !L,
|
|
1565
|
+
onClick: I.editable && !L ? () => O(T, I.key, F) : void 0,
|
|
1566
|
+
children: L ? /* @__PURE__ */ i(
|
|
1567
|
+
Ar,
|
|
1568
|
+
{
|
|
1569
|
+
ref: E,
|
|
1570
|
+
$size: l,
|
|
1571
|
+
value: z,
|
|
1572
|
+
onChange: (xo) => h(xo.target.value),
|
|
1573
|
+
onBlur: $,
|
|
1574
|
+
onKeyDown: v,
|
|
1575
|
+
"aria-label": `Edit ${I.header}`
|
|
1576
|
+
}
|
|
1577
|
+
) : I.render ? I.render(F, g, T) : String(F ?? "")
|
|
1578
|
+
},
|
|
1579
|
+
I.key
|
|
1580
|
+
);
|
|
1581
|
+
}),
|
|
1582
|
+
e && /* @__PURE__ */ i(Nr, { $size: l, $variant: "default", children: /* @__PURE__ */ i(
|
|
1583
|
+
Vr,
|
|
1584
|
+
{
|
|
1585
|
+
type: "button",
|
|
1586
|
+
onClick: () => A(T),
|
|
1587
|
+
"aria-label": "Delete row",
|
|
1588
|
+
children: "✕"
|
|
1589
|
+
}
|
|
1590
|
+
) })
|
|
1591
|
+
] }, T)),
|
|
1592
|
+
/* @__PURE__ */ i(Dr, { children: /* @__PURE__ */ i("td", { colSpan: D, children: /* @__PURE__ */ m(Fr, { type: "button", onClick: k, children: [
|
|
1593
|
+
"+ ",
|
|
1594
|
+
d
|
|
1595
|
+
] }) }) })
|
|
1596
|
+
] })
|
|
1597
|
+
] }) });
|
|
1598
|
+
}
|
|
1599
|
+
Mr.displayName = "EditableTable";
|
|
1600
|
+
const ro = {
|
|
1295
1601
|
primary: {
|
|
1296
1602
|
50: "#f0f8ff",
|
|
1297
1603
|
500: "#0070f3",
|
|
@@ -1323,38 +1629,38 @@ const U = {
|
|
|
1323
1629
|
50: "#eff6ff",
|
|
1324
1630
|
500: "#2563eb"
|
|
1325
1631
|
}
|
|
1326
|
-
},
|
|
1632
|
+
}, Pr = {
|
|
1327
1633
|
1: "4px",
|
|
1328
1634
|
2: "8px",
|
|
1329
1635
|
3: "12px",
|
|
1330
1636
|
4: "16px",
|
|
1331
1637
|
5: "20px",
|
|
1332
1638
|
6: "24px"
|
|
1333
|
-
},
|
|
1639
|
+
}, Yr = {
|
|
1334
1640
|
md: "6px"
|
|
1335
|
-
},
|
|
1641
|
+
}, Hr = {
|
|
1336
1642
|
modal: 1e3,
|
|
1337
1643
|
toast: 1100
|
|
1338
|
-
},
|
|
1644
|
+
}, _r = {
|
|
1339
1645
|
xs: "12px",
|
|
1340
1646
|
sm: "14px",
|
|
1341
1647
|
md: "16px",
|
|
1342
1648
|
lg: "18px"
|
|
1343
|
-
},
|
|
1344
|
-
colors: { ...
|
|
1345
|
-
spacing:
|
|
1346
|
-
fontSizes:
|
|
1347
|
-
radius:
|
|
1348
|
-
zIndex:
|
|
1649
|
+
}, on = {
|
|
1650
|
+
colors: { ...ro, primary: { ...ro.primary, contrast: "#ffffff" } },
|
|
1651
|
+
spacing: Pr,
|
|
1652
|
+
fontSizes: _r,
|
|
1653
|
+
radius: Yr,
|
|
1654
|
+
zIndex: Hr,
|
|
1349
1655
|
shadows: {
|
|
1350
1656
|
focusRing: "0 0 0 2px rgba(0, 112, 243, 0.25)"
|
|
1351
1657
|
}
|
|
1352
1658
|
};
|
|
1353
|
-
function
|
|
1354
|
-
const r = parseInt(o.slice(1, 3), 16) / 255,
|
|
1355
|
-
return 0.2126 *
|
|
1659
|
+
function Kr(o) {
|
|
1660
|
+
const r = parseInt(o.slice(1, 3), 16) / 255, s = parseInt(o.slice(3, 5), 16) / 255, a = parseInt(o.slice(5, 7), 16) / 255, l = (c) => c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
1661
|
+
return 0.2126 * l(r) + 0.7152 * l(s) + 0.0722 * l(a) > 0.179 ? "#111111" : "#ffffff";
|
|
1356
1662
|
}
|
|
1357
|
-
const
|
|
1663
|
+
const U = {
|
|
1358
1664
|
colors: {
|
|
1359
1665
|
primary: {
|
|
1360
1666
|
50: "#fffde6",
|
|
@@ -1384,42 +1690,44 @@ const Y = {
|
|
|
1384
1690
|
shadows: { focusRing: "3px 3px 0 #111111" },
|
|
1385
1691
|
brutalism: { borderWidth: "2px", shadowOffset: "4px" }
|
|
1386
1692
|
};
|
|
1387
|
-
function
|
|
1693
|
+
function rn(o) {
|
|
1388
1694
|
return {
|
|
1389
|
-
...
|
|
1695
|
+
...U,
|
|
1390
1696
|
colors: {
|
|
1391
|
-
...
|
|
1697
|
+
...U.colors,
|
|
1392
1698
|
primary: {
|
|
1393
1699
|
50: "#fffff0",
|
|
1394
1700
|
500: o,
|
|
1395
1701
|
700: o,
|
|
1396
|
-
contrast:
|
|
1702
|
+
contrast: Kr(o)
|
|
1397
1703
|
}
|
|
1398
1704
|
}
|
|
1399
1705
|
};
|
|
1400
1706
|
}
|
|
1401
|
-
function
|
|
1402
|
-
theme: o =
|
|
1707
|
+
function nn({
|
|
1708
|
+
theme: o = U,
|
|
1403
1709
|
children: r
|
|
1404
1710
|
}) {
|
|
1405
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ i(yo, { theme: o, children: r });
|
|
1406
1712
|
}
|
|
1407
1713
|
export {
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1714
|
+
mo as Badge,
|
|
1715
|
+
ko as Button,
|
|
1716
|
+
Or as CollapsibleCard,
|
|
1717
|
+
Mr as EditableTable,
|
|
1718
|
+
dr as Form,
|
|
1719
|
+
ur as FormField,
|
|
1720
|
+
Eo as Input,
|
|
1721
|
+
vr as Link,
|
|
1722
|
+
Yo as Modal,
|
|
1723
|
+
yr as Select,
|
|
1724
|
+
jr as Table,
|
|
1725
|
+
nn as ThemeProvider,
|
|
1726
|
+
uo as Toast,
|
|
1727
|
+
Gr as ToastProvider,
|
|
1728
|
+
rn as createNeoBrutalTheme,
|
|
1729
|
+
on as defaultTheme,
|
|
1730
|
+
U as neoBrutalTheme,
|
|
1731
|
+
Qr as useForm,
|
|
1732
|
+
Jr as useToast
|
|
1425
1733
|
};
|