blunt-ui 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +80 -57
  2. package/dist/index.js +852 -821
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsx as e, jsxs as S, Fragment as dr } from "react/jsx-runtime";
2
- import i, { css as t, keyframes as oo, ThemeProvider as ur, createGlobalStyle as pr } from "styled-components";
3
- import Mo, { useId as ro, useState as T, useContext as To, createContext as Wo, forwardRef as Yo, createElement as zo, useRef as Y, useCallback as X, useEffect as B, useMemo as Do } from "react";
4
- import { createPortal as xo } from "react-dom";
5
- const uo = (o, r, n) => t`
1
+ import { jsx as i, jsxs as S, Fragment as ur } from "react/jsx-runtime";
2
+ import s, { css as t, keyframes as oo, ThemeProvider as pr, createGlobalStyle as fr } from "styled-components";
3
+ import Mo, { useId as ro, useState as T, useContext as Wo, createContext as Do, forwardRef as Uo, createElement as Co, useRef as K, useCallback as X, useEffect as _, useLayoutEffect as gr, useMemo as Eo } from "react";
4
+ import { createPortal as yo } from "react-dom";
5
+ const po = (o, r, n) => t`
6
6
  background: ${r};
7
7
  color: ${n};
8
8
  border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
9
9
  box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
10
- `, fr = i.span`
10
+ `, $r = s.span`
11
11
  display: inline-flex;
12
12
  align-items: center;
13
13
  font-weight: ${({ theme: o }) => o.fontWeights.bold};
@@ -31,32 +31,32 @@ const uo = (o, r, n) => t`
31
31
  })[o]}
32
32
 
33
33
  ${({ $variant: o, theme: r }) => r.brutalism ? {
34
- primary: uo(
34
+ primary: po(
35
35
  r,
36
36
  r.colors.primary[500],
37
37
  r.colors.primary.contrast
38
38
  ),
39
- neutral: uo(
39
+ neutral: po(
40
40
  r,
41
41
  r.colors.neutral[200],
42
42
  r.colors.neutral[900]
43
43
  ),
44
- success: uo(
44
+ success: po(
45
45
  r,
46
46
  r.colors.success[50],
47
47
  r.colors.success[500]
48
48
  ),
49
- error: uo(
49
+ error: po(
50
50
  r,
51
51
  r.colors.error[50],
52
52
  r.colors.error[500]
53
53
  ),
54
- warning: uo(
54
+ warning: po(
55
55
  r,
56
56
  r.colors.warning[50],
57
57
  r.colors.warning[500]
58
58
  ),
59
- info: uo(r, r.colors.info[50], r.colors.info[500])
59
+ info: po(r, r.colors.info[50], r.colors.info[500])
60
60
  }[o] : {
61
61
  primary: t`
62
62
  background: ${r.colors.primary[50]};
@@ -84,16 +84,16 @@ const uo = (o, r, n) => t`
84
84
  `
85
85
  }[o]}
86
86
  `;
87
- function $r({
87
+ function br({
88
88
  variant: o = "primary",
89
89
  size: r = "md",
90
90
  children: n,
91
- ...s
91
+ ...e
92
92
  }) {
93
- return /* @__PURE__ */ e(fr, { $variant: o, $size: r, ...s, children: n });
93
+ return /* @__PURE__ */ i($r, { $variant: o, $size: r, ...e, children: n });
94
94
  }
95
- $r.displayName = "Badge";
96
- const ho = (o, r, n) => t`
95
+ br.displayName = "Badge";
96
+ const wo = (o, r, n) => t`
97
97
  background-color: ${r};
98
98
  color: ${n};
99
99
  border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
@@ -106,7 +106,7 @@ const ho = (o, r, n) => t`
106
106
  transform: translate(2px, 2px);
107
107
  box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
108
108
  }
109
- `, gr = i.button`
109
+ `, xr = s.button`
110
110
  display: inline-flex;
111
111
  align-items: center;
112
112
  justify-content: center;
@@ -114,6 +114,7 @@ const ho = (o, r, n) => t`
114
114
  font-weight: ${({ theme: o }) => o.fontWeights.semibold};
115
115
  cursor: pointer;
116
116
  text-decoration: none;
117
+ touch-action: manipulation;
117
118
 
118
119
  &:focus-visible {
119
120
  outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
@@ -126,17 +127,17 @@ const ho = (o, r, n) => t`
126
127
  }
127
128
 
128
129
  ${({ $variant: o, theme: r }) => r.brutalism ? {
129
- primary: ho(
130
+ primary: wo(
130
131
  r,
131
132
  r.colors.primary[500],
132
133
  r.colors.primary.contrast
133
134
  ),
134
- secondary: ho(
135
+ secondary: wo(
135
136
  r,
136
137
  r.colors.neutral[100],
137
138
  r.colors.neutral[900]
138
139
  ),
139
- outline: ho(
140
+ outline: wo(
140
141
  r,
141
142
  r.colors.neutral[0],
142
143
  r.colors.neutral[900]
@@ -183,24 +184,24 @@ const ho = (o, r, n) => t`
183
184
  `
184
185
  })[o]}
185
186
  `;
186
- function Co({
187
+ function Io({
187
188
  ref: o,
188
189
  as: r,
189
190
  href: n,
190
- variant: s = "primary",
191
+ variant: e = "primary",
191
192
  size: a = "md",
192
193
  isLoading: l,
193
194
  disabled: d,
194
195
  children: p,
195
196
  ...u
196
197
  }) {
197
- return /* @__PURE__ */ e(
198
- gr,
198
+ return /* @__PURE__ */ i(
199
+ xr,
199
200
  {
200
201
  ref: o,
201
202
  as: r ?? (n ? "a" : "button"),
202
203
  href: n,
203
- $variant: s,
204
+ $variant: e,
204
205
  $size: a,
205
206
  disabled: l || d,
206
207
  ...u,
@@ -208,19 +209,19 @@ function Co({
208
209
  }
209
210
  );
210
211
  }
211
- Co.displayName = "Button";
212
- const br = i.div`
212
+ Io.displayName = "Button";
213
+ const yr = s.div`
213
214
  display: flex;
214
215
  flex-direction: column;
215
216
  gap: ${({ theme: o }) => o.spacing[1]};
216
217
  width: ${({ $fullWidth: o }) => o ? "100%" : "auto"};
217
- `, xr = i.label`
218
+ `, hr = s.label`
218
219
  font-size: ${({ theme: o }) => o.fontSizes.sm};
219
220
  font-weight: ${({ theme: o }) => o.brutalism ? o.fontWeights.bold : o.fontWeights.medium};
220
- `, yr = i.span`
221
+ `, wr = s.span`
221
222
  font-size: ${({ theme: o }) => o.fontSizes.xs};
222
223
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
223
- `, hr = i.div`
224
+ `, mr = s.div`
224
225
  display: flex;
225
226
  align-items: center;
226
227
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -269,7 +270,7 @@ const br = i.div`
269
270
  &:focus-within {
270
271
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
271
272
  }
272
- `, wr = i.input`
273
+ `, vr = s.input`
273
274
  flex: 1;
274
275
  border: none;
275
276
  outline: none;
@@ -280,11 +281,11 @@ const br = i.div`
280
281
  cursor: not-allowed;
281
282
  opacity: 0.6;
282
283
  }
283
- `, Lo = i.div`
284
+ `, Lo = s.div`
284
285
  display: inline-flex;
285
286
  align-items: center;
286
287
  margin: 0 ${({ theme: o }) => o.spacing[1]};
287
- `, mr = i.button`
288
+ `, kr = s.button`
288
289
  display: inline-flex;
289
290
  align-items: center;
290
291
  margin: 0 ${({ theme: o }) => o.spacing[1]};
@@ -298,36 +299,36 @@ const br = i.div`
298
299
  opacity: 0.8;
299
300
  }
300
301
  `;
301
- function vr({
302
+ function Sr({
302
303
  ref: o,
303
304
  type: r = "text",
304
305
  size: n = "md",
305
- variant: s = "default",
306
+ variant: e = "default",
306
307
  label: a,
307
308
  helperText: l,
308
309
  error: d,
309
310
  leftElement: p,
310
311
  rightElement: u,
311
312
  clearable: f,
312
- onClear: g,
313
+ onClear: $,
313
314
  fullWidth: m,
314
315
  id: v,
315
- value: h,
316
+ value: y,
316
317
  defaultValue: k,
317
318
  onChange: C,
318
319
  ...M
319
320
  }) {
320
- const P = ro(), L = v ?? P, x = `${L}-hint`, [I, w] = T(k ?? ""), b = h !== void 0, z = b ? h : I, D = typeof d == "string" ? d : void 0, W = !!(l || d), N = (_) => {
321
- b || w(_.target.value), C?.(_);
321
+ const P = ro(), L = v ?? P, x = `${L}-hint`, [I, w] = T(k ?? ""), b = y !== void 0, z = b ? y : I, E = typeof d == "string" ? d : void 0, D = !!(l || d), N = (B) => {
322
+ b || w(B.target.value), C?.(B);
322
323
  }, F = () => {
323
- b || w(""), g?.();
324
+ b || w(""), $?.();
324
325
  };
325
- return /* @__PURE__ */ S(br, { $fullWidth: m, children: [
326
- a && /* @__PURE__ */ e(xr, { htmlFor: L, children: a }),
327
- /* @__PURE__ */ S(hr, { $size: n, $variant: s, $error: !!d, children: [
328
- p && /* @__PURE__ */ e(Lo, { children: p }),
329
- /* @__PURE__ */ e(
330
- wr,
326
+ return /* @__PURE__ */ S(yr, { $fullWidth: m, children: [
327
+ a && /* @__PURE__ */ i(hr, { htmlFor: L, children: a }),
328
+ /* @__PURE__ */ S(mr, { $size: n, $variant: e, $error: !!d, children: [
329
+ p && /* @__PURE__ */ i(Lo, { children: p }),
330
+ /* @__PURE__ */ i(
331
+ vr,
331
332
  {
332
333
  id: L,
333
334
  ref: o,
@@ -336,11 +337,11 @@ function vr({
336
337
  onChange: N,
337
338
  ...M,
338
339
  "aria-invalid": !!d,
339
- "aria-describedby": W ? x : void 0
340
+ "aria-describedby": D ? x : void 0
340
341
  }
341
342
  ),
342
- f && z && /* @__PURE__ */ e(
343
- mr,
343
+ f && z && /* @__PURE__ */ i(
344
+ kr,
344
345
  {
345
346
  type: "button",
346
347
  onClick: F,
@@ -348,24 +349,24 @@ function vr({
348
349
  children: "✕"
349
350
  }
350
351
  ),
351
- u && /* @__PURE__ */ e(Lo, { children: u })
352
+ u && /* @__PURE__ */ i(Lo, { children: u })
352
353
  ] }),
353
- W && /* @__PURE__ */ e(yr, { id: x, $error: !!d, children: D ?? l })
354
+ D && /* @__PURE__ */ i(wr, { id: x, $error: !!d, children: E ?? l })
354
355
  ] });
355
356
  }
356
- vr.displayName = "Input";
357
- const kr = i.div`
357
+ Sr.displayName = "Input";
358
+ const zr = s.div`
358
359
  display: flex;
359
360
  flex-direction: column;
360
361
  gap: ${({ theme: o }) => o.spacing[1]};
361
362
  width: ${({ $fullWidth: o }) => o ? "100%" : "auto"};
362
- `, Sr = i.label`
363
+ `, Cr = s.label`
363
364
  font-size: ${({ theme: o }) => o.fontSizes.sm};
364
365
  font-weight: ${({ theme: o }) => o.brutalism ? o.fontWeights.bold : o.fontWeights.medium};
365
- `, zr = i.span`
366
+ `, Ir = s.span`
366
367
  font-size: ${({ theme: o }) => o.fontSizes.xs};
367
368
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
368
- `, Cr = i.div`
369
+ `, Tr = s.div`
369
370
  display: flex;
370
371
  border-radius: ${({ theme: o }) => o.radius.md};
371
372
  transition:
@@ -413,7 +414,7 @@ const kr = i.div`
413
414
  &:focus-within {
414
415
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
415
416
  }
416
- `, Ir = i.textarea`
417
+ `, Wr = s.textarea`
417
418
  flex: 1;
418
419
  border: none;
419
420
  outline: none;
@@ -427,52 +428,52 @@ const kr = i.div`
427
428
  opacity: 0.6;
428
429
  }
429
430
  `;
430
- function Tr({
431
+ function Dr({
431
432
  ref: o,
432
433
  size: r = "md",
433
434
  variant: n = "default",
434
- label: s,
435
+ label: e,
435
436
  helperText: a,
436
437
  error: l,
437
438
  fullWidth: d,
438
439
  id: p,
439
440
  value: u,
440
441
  defaultValue: f,
441
- onChange: g,
442
+ onChange: $,
442
443
  ...m
443
444
  }) {
444
- const v = ro(), h = p ?? v, k = `${h}-hint`, [C, M] = T(f ?? ""), P = u !== void 0, L = P ? u : C, x = typeof l == "string" ? l : void 0, I = !!(a || l);
445
- return /* @__PURE__ */ S(kr, { $fullWidth: d, children: [
446
- s && /* @__PURE__ */ e(Sr, { htmlFor: h, children: s }),
447
- /* @__PURE__ */ e(Cr, { $size: r, $variant: n, $error: !!l, children: /* @__PURE__ */ e(
448
- Ir,
445
+ const v = ro(), y = p ?? v, k = `${y}-hint`, [C, M] = T(f ?? ""), P = u !== void 0, L = P ? u : C, x = typeof l == "string" ? l : void 0, I = !!(a || l);
446
+ return /* @__PURE__ */ S(zr, { $fullWidth: d, children: [
447
+ e && /* @__PURE__ */ i(Cr, { htmlFor: y, children: e }),
448
+ /* @__PURE__ */ i(Tr, { $size: r, $variant: n, $error: !!l, children: /* @__PURE__ */ i(
449
+ Wr,
449
450
  {
450
- id: h,
451
+ id: y,
451
452
  ref: o,
452
453
  value: L,
453
454
  onChange: (b) => {
454
- P || M(b.target.value), g?.(b);
455
+ P || M(b.target.value), $?.(b);
455
456
  },
456
457
  ...m,
457
458
  "aria-invalid": !!l,
458
459
  "aria-describedby": I ? k : void 0
459
460
  }
460
461
  ) }),
461
- I && /* @__PURE__ */ e(zr, { id: k, $error: !!l, children: x ?? a })
462
+ I && /* @__PURE__ */ i(Ir, { id: k, $error: !!l, children: x ?? a })
462
463
  ] });
463
464
  }
464
- Tr.displayName = "Textarea";
465
- const Uo = (...o) => o.filter((r, n, s) => !!r && r.trim() !== "" && s.indexOf(r) === n).join(" ").trim();
466
- const Wr = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
467
- const Dr = (o) => o.replace(
465
+ Dr.displayName = "Textarea";
466
+ const Yo = (...o) => o.filter((r, n, e) => !!r && r.trim() !== "" && e.indexOf(r) === n).join(" ").trim();
467
+ const Er = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
468
+ const Or = (o) => o.replace(
468
469
  /^([A-Z])|[\s-_]+(\w)/g,
469
- (r, n, s) => s ? s.toUpperCase() : n.toLowerCase()
470
+ (r, n, e) => e ? e.toUpperCase() : n.toLowerCase()
470
471
  );
471
472
  const No = (o) => {
472
- const r = Dr(o);
473
+ const r = Or(o);
473
474
  return r.charAt(0).toUpperCase() + r.slice(1);
474
475
  };
475
- var wo = {
476
+ var mo = {
476
477
  xmlns: "http://www.w3.org/2000/svg",
477
478
  width: 24,
478
479
  height: 24,
@@ -483,96 +484,96 @@ var wo = {
483
484
  strokeLinecap: "round",
484
485
  strokeLinejoin: "round"
485
486
  };
486
- const Er = (o) => {
487
+ const Mr = (o) => {
487
488
  for (const r in o)
488
489
  if (r.startsWith("aria-") || r === "role" || r === "title")
489
490
  return !0;
490
491
  return !1;
491
- }, Or = Wo({}), Mr = () => To(Or), Lr = Yo(
492
- ({ color: o, size: r, strokeWidth: n, absoluteStrokeWidth: s, className: a = "", children: l, iconNode: d, ...p }, u) => {
492
+ }, Lr = Do({}), Nr = () => Wo(Lr), Pr = Uo(
493
+ ({ color: o, size: r, strokeWidth: n, absoluteStrokeWidth: e, className: a = "", children: l, iconNode: d, ...p }, u) => {
493
494
  const {
494
495
  size: f = 24,
495
- strokeWidth: g = 2,
496
+ strokeWidth: $ = 2,
496
497
  absoluteStrokeWidth: m = !1,
497
498
  color: v = "currentColor",
498
- className: h = ""
499
- } = Mr() ?? {}, k = s ?? m ? Number(n ?? g) * 24 / Number(r ?? f) : n ?? g;
500
- return zo(
499
+ className: y = ""
500
+ } = Nr() ?? {}, k = e ?? m ? Number(n ?? $) * 24 / Number(r ?? f) : n ?? $;
501
+ return Co(
501
502
  "svg",
502
503
  {
503
504
  ref: u,
504
- ...wo,
505
- width: r ?? f ?? wo.width,
506
- height: r ?? f ?? wo.height,
505
+ ...mo,
506
+ width: r ?? f ?? mo.width,
507
+ height: r ?? f ?? mo.height,
507
508
  stroke: o ?? v,
508
509
  strokeWidth: k,
509
- className: Uo("lucide", h, a),
510
- ...!l && !Er(p) && { "aria-hidden": "true" },
510
+ className: Yo("lucide", y, a),
511
+ ...!l && !Mr(p) && { "aria-hidden": "true" },
511
512
  ...p
512
513
  },
513
514
  [
514
- ...d.map(([C, M]) => zo(C, M)),
515
+ ...d.map(([C, M]) => Co(C, M)),
515
516
  ...Array.isArray(l) ? l : [l]
516
517
  ]
517
518
  );
518
519
  }
519
520
  );
520
- const no = (o, r) => {
521
- const n = Yo(
522
- ({ className: s, ...a }, l) => zo(Lr, {
521
+ const to = (o, r) => {
522
+ const n = Uo(
523
+ ({ className: e, ...a }, l) => Co(Pr, {
523
524
  ref: l,
524
525
  iconNode: r,
525
- className: Uo(
526
- `lucide-${Wr(No(o))}`,
526
+ className: Yo(
527
+ `lucide-${Er(No(o))}`,
527
528
  `lucide-${o}`,
528
- s
529
+ e
529
530
  ),
530
531
  ...a
531
532
  })
532
533
  );
533
534
  return n.displayName = No(o), n;
534
535
  };
535
- const Nr = [
536
+ const Rr = [
536
537
  ["path", { d: "M12 5v14", key: "s699le" }],
537
538
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
538
- ], Pr = no("arrow-down", Nr);
539
- const Rr = [
539
+ ], Vr = to("arrow-down", Rr);
540
+ const Br = [
540
541
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
541
542
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
542
543
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
543
544
  ["path", { d: "M7 4v16", key: "1glfcx" }]
544
- ], Vr = no("arrow-up-down", Rr);
545
- const Fr = [
545
+ ], Fr = to("arrow-up-down", Br);
546
+ const Ar = [
546
547
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
547
548
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
548
- ], Ar = no("arrow-up", Fr);
549
- const Br = [
549
+ ], _r = to("arrow-up", Ar);
550
+ const jr = [
550
551
  ["path", { d: "M8 2v4", key: "1cmpym" }],
551
552
  ["path", { d: "M16 2v4", key: "4m81vk" }],
552
553
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
553
554
  ["path", { d: "M3 10h18", key: "8toen8" }]
554
- ], _r = no("calendar", Br);
555
- const jr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Ko = no("chevron-down", jr);
556
- const Hr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Yr = no("chevron-left", Hr);
557
- const Ur = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Kr = no("chevron-right", Ur);
558
- const qr = [
555
+ ], Hr = to("calendar", jr);
556
+ const Ur = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Ko = to("chevron-down", Ur);
557
+ const Yr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Kr = to("chevron-left", Yr);
558
+ const qr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Gr = to("chevron-right", qr);
559
+ const Xr = [
559
560
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
560
561
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
561
- ], yo = no("x", qr), Gr = i.div`
562
+ ], ho = to("x", Xr), Jr = s.div`
562
563
  display: inline-flex;
563
564
  flex-direction: column;
564
565
  gap: ${({ theme: o }) => o.spacing[1]};
565
566
  width: ${({ $fullWidth: o }) => o ? "100%" : "auto"};
566
567
  position: relative;
567
568
  min-width: 0;
568
- `, Xr = i.div`
569
+ `, Qr = s.div`
569
570
  height: 0;
570
571
  overflow: hidden;
571
572
  visibility: hidden;
572
573
  pointer-events: none;
573
574
  display: flex;
574
575
  flex-direction: column;
575
- `, Jr = i.button`
576
+ `, Zr = s.button`
576
577
  appearance: none;
577
578
  width: 100%;
578
579
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -631,24 +632,24 @@ const qr = [
631
632
  outline: none;
632
633
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
633
634
  }
634
- `, mo = i.span`
635
+ `, vo = s.span`
635
636
  flex: 1;
636
637
  overflow: hidden;
637
638
  white-space: nowrap;
638
639
  text-overflow: ellipsis;
639
640
  color: ${({ $placeholder: o, theme: r }) => o ? r.colors.neutral[400] : r.colors.neutral[900]};
640
- `, Qr = i.span`
641
+ `, on = s.span`
641
642
  display: flex;
642
643
  align-items: center;
643
644
  gap: ${({ theme: o }) => o.spacing[1]};
644
645
  flex-shrink: 0;
645
646
  color: ${({ theme: o }) => o.colors.neutral[500]};
646
- `, Zr = i.span`
647
+ `, rn = s.span`
647
648
  display: inline-flex;
648
649
  align-items: center;
649
650
  transition: transform 0.15s;
650
651
  transform: ${({ $open: o }) => o ? "rotate(180deg)" : "rotate(0deg)"};
651
- `, on = i.ul`
652
+ `, nn = s.ul`
652
653
  z-index: ${({ theme: o }) => o.zIndex.modal};
653
654
  margin: 0;
654
655
  padding: ${({ theme: o }) => o.spacing[1]} 0;
@@ -667,10 +668,10 @@ const qr = [
667
668
  border: 1px solid ${o.colors.neutral[300]};
668
669
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
669
670
  `}
670
- `, rn = i.div`
671
+ `, tn = s.div`
671
672
  padding: ${({ theme: o }) => o.spacing[2]};
672
673
  border-bottom: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
673
- `, nn = i.input`
674
+ `, en = s.input`
674
675
  width: 100%;
675
676
  border: 1px solid ${({ theme: o }) => o.colors.neutral[300]};
676
677
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -692,12 +693,12 @@ const qr = [
692
693
  box-shadow: ${o.shadows.focusRing};
693
694
  }
694
695
  `}
695
- `, tn = i.li`
696
+ `, sn = s.li`
696
697
  padding: ${({ theme: o }) => `${o.spacing[2]} ${o.spacing[3]}`};
697
698
  font-size: ${({ theme: o }) => o.fontSizes.sm};
698
699
  color: ${({ theme: o }) => o.colors.neutral[400]};
699
700
  list-style: none;
700
- `, sn = i.li`
701
+ `, an = s.li`
701
702
  display: flex;
702
703
  align-items: center;
703
704
  padding: ${({ theme: o }) => `${o.spacing[2]} ${o.spacing[3]}`};
@@ -717,10 +718,10 @@ const qr = [
717
718
  &:hover {
718
719
  background-color: ${({ $disabled: o, $selected: r, theme: n }) => o ? "transparent" : r ? n.colors.primary[50] : n.colors.neutral[100]};
719
720
  }
720
- `, en = i.span`
721
+ `, ln = s.span`
721
722
  font-size: ${({ theme: o }) => o.fontSizes.xs};
722
723
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
723
- `, an = i.button`
724
+ `, cn = s.button`
724
725
  display: inline-flex;
725
726
  align-items: center;
726
727
  padding: 0;
@@ -739,110 +740,116 @@ const qr = [
739
740
  border-radius: 2px;
740
741
  }
741
742
  `;
742
- function ln({
743
+ function qo({
743
744
  options: o,
744
745
  placeholder: r,
745
746
  size: n = "md",
746
- variant: s = "default",
747
+ variant: e = "default",
747
748
  error: a,
748
749
  fullWidth: l,
749
750
  clearable: d,
750
751
  onClear: p,
751
752
  id: u,
752
753
  name: f,
753
- value: g,
754
+ value: $,
754
755
  defaultValue: m,
755
756
  onChange: v,
756
- disabled: h,
757
+ disabled: y,
757
758
  searchable: k,
758
759
  "aria-label": C,
759
760
  "aria-describedby": M
760
761
  }) {
761
- const P = ro(), L = u ?? P, x = `${L}-list`, I = `${L}-search`, w = typeof a == "string" ? a : void 0, [b, z] = T(!1), [D, W] = T(-1), [N, F] = T(""), [_, V] = T({
762
+ const P = ro(), L = u ?? P, x = `${L}-list`, I = `${L}-search`, w = typeof a == "string" ? a : void 0, [b, z] = T(!1), [E, D] = T(-1), [N, F] = T(""), [B, V] = T({
762
763
  top: 0,
764
+ bottom: 0,
763
765
  left: 0,
764
- width: 0
765
- }), [U, io] = T(
766
+ width: 0,
767
+ openUpward: !1
768
+ }), [q, ao] = T(
766
769
  m ?? ""
767
- ), O = g !== void 0, H = O ? g : U, ao = Y(null), K = Y(null), to = Y(null), J = Y(null), lo = o.find(
770
+ ), O = $ !== void 0, H = O ? $ : q, lo = K(null), G = K(null), no = K(null), J = K(null), co = o.find(
768
771
  (c) => c.value === H
769
772
  ), j = k && N ? o.filter(
770
773
  (c) => c.label.toLowerCase().includes(N.toLowerCase())
771
- ) : o, q = X(() => {
772
- if (!K.current)
774
+ ) : o, U = X(() => {
775
+ if (!G.current)
773
776
  return;
774
- const c = K.current.getBoundingClientRect();
777
+ const c = G.current.getBoundingClientRect(), W = window.innerHeight, Y = no.current?.getBoundingClientRect().height ?? 200, io = W - c.bottom, $o = io < Y + 4 && c.top > io;
775
778
  V({
776
779
  top: c.bottom + 4,
780
+ bottom: W - c.top + 4,
777
781
  left: c.left,
778
- width: c.width
782
+ width: c.width,
783
+ openUpward: $o
779
784
  });
780
785
  }, []);
781
- B(() => {
786
+ _(() => {
782
787
  if (b)
783
- return q(), window.addEventListener("scroll", q, !0), window.addEventListener("resize", q), () => {
784
- window.removeEventListener("scroll", q, !0), window.removeEventListener("resize", q);
788
+ return U(), window.addEventListener("scroll", U, !0), window.addEventListener("resize", U), () => {
789
+ window.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U);
785
790
  };
786
- }, [b, q]), B(() => {
791
+ }, [b, U]), gr(() => {
792
+ b && U();
793
+ }, [b, U]), _(() => {
787
794
  if (!b)
788
795
  return;
789
- const c = (E) => {
790
- const G = ao.current?.contains(
791
- E.target
792
- ), $o = to.current?.contains(
793
- E.target
796
+ const c = (W) => {
797
+ const Y = lo.current?.contains(
798
+ W.target
799
+ ), io = no.current?.contains(
800
+ W.target
794
801
  );
795
- !G && !$o && z(!1);
802
+ !Y && !io && z(!1);
796
803
  };
797
804
  return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
798
- }, [b]), B(() => {
799
- b && k && setTimeout(() => J.current?.focus(), 0), b || (F(""), W(-1));
800
- }, [b, k]), B(() => {
801
- W(-1);
802
- }, [N]), B(() => {
803
- if (D < 0)
805
+ }, [b]), _(() => {
806
+ b && k && setTimeout(() => J.current?.focus(), 0), b || (F(""), D(-1));
807
+ }, [b, k]), _(() => {
808
+ D(-1);
809
+ }, [N]), _(() => {
810
+ if (E < 0)
804
811
  return;
805
- const c = document.getElementById(`${x}-option-${D}`);
812
+ const c = document.getElementById(`${x}-option-${E}`);
806
813
  c && typeof c.scrollIntoView == "function" && c.scrollIntoView({ block: "nearest" });
807
- }, [D, x]);
808
- function Q(c, E) {
809
- let G = c + E;
810
- for (; G >= 0 && G < j.length; ) {
811
- if (!j[G].disabled)
812
- return G;
813
- G += E;
814
+ }, [E, x]);
815
+ function Q(c, W) {
816
+ let Y = c + W;
817
+ for (; Y >= 0 && Y < j.length; ) {
818
+ if (!j[Y].disabled)
819
+ return Y;
820
+ Y += W;
814
821
  }
815
822
  return c;
816
823
  }
817
824
  function Z() {
818
825
  return j.findIndex((c) => !c.disabled);
819
826
  }
820
- function so() {
827
+ function eo() {
821
828
  for (let c = j.length - 1; c >= 0; c--)
822
829
  if (!j[c].disabled)
823
830
  return c;
824
831
  return -1;
825
832
  }
826
- function eo(c) {
833
+ function so(c) {
827
834
  if (c.disabled)
828
835
  return;
829
- O || io(c.value);
830
- const E = {
836
+ O || ao(c.value);
837
+ const W = {
831
838
  target: { name: f ?? "", value: c.value },
832
839
  currentTarget: { name: f ?? "", value: c.value }
833
840
  };
834
- v?.(E), z(!1), K.current?.focus();
841
+ v?.(W), z(!1), G.current?.focus();
835
842
  }
836
- function y(c) {
837
- c.stopPropagation(), O || io(""), v?.({
843
+ function h(c) {
844
+ c.stopPropagation(), O || ao(""), v?.({
838
845
  target: { name: f ?? "", value: "" },
839
846
  currentTarget: { name: f ?? "", value: "" }
840
- }), p?.(), K.current?.focus();
847
+ }), p?.(), G.current?.focus();
841
848
  }
842
849
  function A(c) {
843
- if (!h) {
850
+ if (!y) {
844
851
  if (!b) {
845
- ["ArrowDown", "ArrowUp", "Enter", " "].includes(c.key) && (c.preventDefault(), z(!0), k || W(Z()));
852
+ ["ArrowDown", "ArrowUp", "Enter", " "].includes(c.key) && (c.preventDefault(), z(!0), k || D(Z()));
846
853
  return;
847
854
  }
848
855
  if (c.key === "Escape") {
@@ -851,54 +858,54 @@ function ln({
851
858
  }
852
859
  if (!k) {
853
860
  if (c.key === "ArrowDown") {
854
- c.preventDefault(), W((E) => Q(E, 1));
861
+ c.preventDefault(), D((W) => Q(W, 1));
855
862
  return;
856
863
  }
857
864
  if (c.key === "ArrowUp") {
858
- c.preventDefault(), W((E) => Q(E, -1));
865
+ c.preventDefault(), D((W) => Q(W, -1));
859
866
  return;
860
867
  }
861
868
  if (c.key === "Home") {
862
- c.preventDefault(), W(Z());
869
+ c.preventDefault(), D(Z());
863
870
  return;
864
871
  }
865
872
  if (c.key === "End") {
866
- c.preventDefault(), W(so());
873
+ c.preventDefault(), D(eo());
867
874
  return;
868
875
  }
869
- (c.key === "Enter" || c.key === " ") && D >= 0 && (c.preventDefault(), eo(j[D]));
876
+ (c.key === "Enter" || c.key === " ") && E >= 0 && (c.preventDefault(), so(j[E]));
870
877
  }
871
878
  }
872
879
  }
873
- function co(c) {
880
+ function uo(c) {
874
881
  if (c.key === "Escape") {
875
- z(!1), K.current?.focus();
882
+ z(!1), G.current?.focus();
876
883
  return;
877
884
  }
878
885
  if (c.key === "ArrowDown") {
879
- c.preventDefault(), W(
880
- (E) => E < 0 ? Z() : Q(E, 1)
886
+ c.preventDefault(), D(
887
+ (W) => W < 0 ? Z() : Q(W, 1)
881
888
  );
882
889
  return;
883
890
  }
884
891
  if (c.key === "ArrowUp") {
885
- c.preventDefault(), W(
886
- (E) => E < 0 ? so() : Q(E, -1)
892
+ c.preventDefault(), D(
893
+ (W) => W < 0 ? eo() : Q(W, -1)
887
894
  );
888
895
  return;
889
896
  }
890
- c.key === "Enter" && D >= 0 && (c.preventDefault(), eo(j[D]));
897
+ c.key === "Enter" && E >= 0 && (c.preventDefault(), so(j[E]));
891
898
  }
892
- const $ = d && !!H && !h, R = D >= 0 ? `${x}-option-${D}` : void 0;
893
- return /* @__PURE__ */ S(Gr, { ref: ao, $fullWidth: l, children: [
894
- /* @__PURE__ */ S(Xr, { "aria-hidden": "true", children: [
895
- r && /* @__PURE__ */ e(mo, { children: r }),
896
- o.map((c) => /* @__PURE__ */ e(mo, { children: c.label }, c.value))
899
+ const g = d && !!H && !y, R = E >= 0 ? `${x}-option-${E}` : void 0;
900
+ return /* @__PURE__ */ S(Jr, { ref: lo, $fullWidth: l, children: [
901
+ /* @__PURE__ */ S(Qr, { "aria-hidden": "true", children: [
902
+ r && /* @__PURE__ */ i(vo, { children: r }),
903
+ o.map((c) => /* @__PURE__ */ i(vo, { children: c.label }, c.value))
897
904
  ] }),
898
905
  /* @__PURE__ */ S(
899
- Jr,
906
+ Zr,
900
907
  {
901
- ref: K,
908
+ ref: G,
902
909
  id: L,
903
910
  type: "button",
904
911
  role: "combobox",
@@ -910,47 +917,48 @@ function ln({
910
917
  "aria-label": C,
911
918
  "aria-describedby": M,
912
919
  $size: n,
913
- $variant: s,
920
+ $variant: e,
914
921
  $error: !!a,
915
- $disabled: h,
922
+ $disabled: y,
916
923
  $open: b,
917
- disabled: h,
918
- onClick: () => !h && z((c) => !c),
924
+ disabled: y,
925
+ onClick: () => !y && z((c) => !c),
919
926
  onKeyDown: A,
920
927
  children: [
921
- /* @__PURE__ */ e(mo, { $placeholder: !lo, children: lo?.label ?? r ?? "Select..." }),
922
- /* @__PURE__ */ S(Qr, { children: [
923
- $ && /* @__PURE__ */ e(
924
- an,
928
+ /* @__PURE__ */ i(vo, { $placeholder: !co, children: co?.label ?? r ?? "Select..." }),
929
+ /* @__PURE__ */ S(on, { children: [
930
+ g && /* @__PURE__ */ i(
931
+ cn,
925
932
  {
926
933
  type: "button",
927
- onClick: y,
934
+ onClick: h,
928
935
  "aria-label": "Clear selection",
929
- children: /* @__PURE__ */ e(yo, { size: 14 })
936
+ children: /* @__PURE__ */ i(ho, { size: 14 })
930
937
  }
931
938
  ),
932
- /* @__PURE__ */ e(Zr, { $open: b, "aria-hidden": "true", children: /* @__PURE__ */ e(Ko, { size: 14 }) })
939
+ /* @__PURE__ */ i(rn, { $open: b, "aria-hidden": "true", children: /* @__PURE__ */ i(Ko, { size: 14 }) })
933
940
  ] })
934
941
  ]
935
942
  }
936
943
  ),
937
- b && xo(
944
+ b && yo(
938
945
  /* @__PURE__ */ S(
939
- on,
946
+ nn,
940
947
  {
941
- ref: to,
948
+ ref: no,
942
949
  id: x,
943
950
  role: "listbox",
944
951
  "aria-label": r ?? "Options",
945
952
  style: {
946
953
  position: "fixed",
947
- top: _.top,
948
- left: _.left,
949
- width: _.width
954
+ top: B.openUpward ? "auto" : B.top,
955
+ bottom: B.openUpward ? B.bottom : "auto",
956
+ left: B.left,
957
+ width: B.width
950
958
  },
951
959
  children: [
952
- k && /* @__PURE__ */ e(rn, { children: /* @__PURE__ */ e(
953
- nn,
960
+ k && /* @__PURE__ */ i(tn, { children: /* @__PURE__ */ i(
961
+ en,
954
962
  {
955
963
  ref: J,
956
964
  id: I,
@@ -958,25 +966,25 @@ function ln({
958
966
  placeholder: "Search...",
959
967
  value: N,
960
968
  onChange: (c) => F(c.target.value),
961
- onKeyDown: co,
969
+ onKeyDown: uo,
962
970
  "aria-label": "Search options",
963
971
  "aria-controls": x,
964
972
  "aria-activedescendant": R
965
973
  }
966
974
  ) }),
967
- j.length === 0 && /* @__PURE__ */ e(tn, { children: "No options found" }),
968
- j.map((c, E) => /* @__PURE__ */ e(
969
- sn,
975
+ j.length === 0 && /* @__PURE__ */ i(sn, { children: "No options found" }),
976
+ j.map((c, W) => /* @__PURE__ */ i(
977
+ an,
970
978
  {
971
- id: `${x}-option-${E}`,
979
+ id: `${x}-option-${W}`,
972
980
  role: "option",
973
981
  "aria-selected": c.value === H,
974
982
  "aria-disabled": c.disabled,
975
983
  $selected: c.value === H,
976
- $focused: E === D,
984
+ $focused: W === E,
977
985
  $disabled: c.disabled,
978
- onClick: () => eo(c),
979
- onMouseEnter: () => !c.disabled && W(E),
986
+ onClick: () => so(c),
987
+ onMouseEnter: () => !c.disabled && D(W),
980
988
  children: c.label
981
989
  },
982
990
  c.value
@@ -986,13 +994,13 @@ function ln({
986
994
  ),
987
995
  document.body
988
996
  ),
989
- w && /* @__PURE__ */ e(en, { $error: !0, children: w })
997
+ w && /* @__PURE__ */ i(ln, { $error: !0, children: w })
990
998
  ] });
991
999
  }
992
- ln.displayName = "Select";
993
- const Po = i.span`
1000
+ qo.displayName = "Select";
1001
+ const Po = s.span`
994
1002
  display: inline-block;
995
- `, cn = i.span`
1003
+ `, dn = s.span`
996
1004
  display: inline-block;
997
1005
  min-width: 60px;
998
1006
  padding: ${({ theme: o }) => `${o.spacing[1]} ${o.spacing[2]}`};
@@ -1030,7 +1038,7 @@ const Po = i.span`
1030
1038
  box-shadow: ${r.shadows.focusRing};
1031
1039
  }
1032
1040
  `}
1033
- `, dn = i.input`
1041
+ `, un = s.input`
1034
1042
  display: inline-block;
1035
1043
  min-width: 60px;
1036
1044
  padding: ${({ theme: o }) => `${o.spacing[1]} ${o.spacing[2]}`};
@@ -1050,52 +1058,52 @@ const Po = i.span`
1050
1058
  box-shadow: ${o.shadows.focusRing};
1051
1059
  `}
1052
1060
  `;
1053
- function un({
1061
+ function pn({
1054
1062
  value: o,
1055
1063
  defaultValue: r = "",
1056
1064
  onChange: n,
1057
- onSubmit: s,
1065
+ onSubmit: e,
1058
1066
  onCancel: a,
1059
1067
  placeholder: l = "Click to edit",
1060
1068
  disabled: d = !1
1061
1069
  }) {
1062
- const p = o !== void 0, [u, f] = T(r), g = p ? o : u, [m, v] = T(!1), [h, k] = T(""), C = Y(null), M = () => {
1063
- d || (k(g), v(!0), setTimeout(() => {
1070
+ const p = o !== void 0, [u, f] = T(r), $ = p ? o : u, [m, v] = T(!1), [y, k] = T(""), C = K(null), M = () => {
1071
+ d || (k($), v(!0), setTimeout(() => {
1064
1072
  C.current?.focus(), C.current?.select();
1065
1073
  }, 0));
1066
1074
  }, P = () => {
1067
- p || f(h), n?.(h), s?.(h), v(!1);
1075
+ p || f(y), n?.(y), e?.(y), v(!1);
1068
1076
  }, L = () => {
1069
- a?.(g), v(!1);
1077
+ a?.($), v(!1);
1070
1078
  }, x = (I) => {
1071
1079
  I.key === "Enter" ? P() : I.key === "Escape" && L();
1072
1080
  };
1073
- return m ? /* @__PURE__ */ e(Po, { children: /* @__PURE__ */ e(
1074
- dn,
1081
+ return m ? /* @__PURE__ */ i(Po, { children: /* @__PURE__ */ i(
1082
+ un,
1075
1083
  {
1076
1084
  ref: C,
1077
- value: h,
1078
- size: Math.max(h.length, l.length, 10),
1085
+ value: y,
1086
+ size: Math.max(y.length, l.length, 10),
1079
1087
  onChange: (I) => k(I.target.value),
1080
1088
  onBlur: P,
1081
1089
  onKeyDown: x,
1082
1090
  "aria-label": "Edit value"
1083
1091
  }
1084
- ) }) : /* @__PURE__ */ e(Po, { children: /* @__PURE__ */ e(
1085
- cn,
1092
+ ) }) : /* @__PURE__ */ i(Po, { children: /* @__PURE__ */ i(
1093
+ dn,
1086
1094
  {
1087
1095
  role: d ? void 0 : "button",
1088
1096
  tabIndex: d ? void 0 : 0,
1089
1097
  $disabled: d,
1090
- $empty: !g,
1098
+ $empty: !$,
1091
1099
  onClick: M,
1092
1100
  onKeyDown: (I) => I.key === "Enter" && M(),
1093
- children: g || l
1101
+ children: $ || l
1094
1102
  }
1095
1103
  ) });
1096
1104
  }
1097
- un.displayName = "Editable";
1098
- const pn = i.a`
1105
+ pn.displayName = "Editable";
1106
+ const fn = s.a`
1099
1107
  text-decoration: underline;
1100
1108
  text-underline-offset: 2px;
1101
1109
  transition: color 0.15s;
@@ -1121,55 +1129,55 @@ const pn = i.a`
1121
1129
  `
1122
1130
  })[o]}
1123
1131
  `;
1124
- function qo({
1132
+ function Go({
1125
1133
  variant: o = "default",
1126
1134
  external: r,
1127
1135
  children: n,
1128
- ...s
1136
+ ...e
1129
1137
  }) {
1130
- return /* @__PURE__ */ e(
1131
- pn,
1138
+ return /* @__PURE__ */ i(
1139
+ fn,
1132
1140
  {
1133
1141
  $variant: o,
1134
1142
  ...r && { target: "_blank", rel: "noreferrer" },
1135
- ...s,
1143
+ ...e,
1136
1144
  children: n
1137
1145
  }
1138
1146
  );
1139
1147
  }
1140
- qo.displayName = "Link";
1141
- const fn = i.div`
1148
+ Go.displayName = "Link";
1149
+ const gn = s.div`
1142
1150
  display: flex;
1143
1151
  flex-direction: column;
1144
1152
  gap: ${({ theme: o }) => o.spacing[1]};
1145
- `, $n = i.span`
1153
+ `, $n = s.span`
1146
1154
  font-size: ${({ theme: o }) => o.fontSizes.xs};
1147
1155
  color: ${({ theme: o }) => o.colors.neutral[500]};
1148
1156
  font-weight: ${({ theme: o }) => o.brutalism ? o.fontWeights.bold : o.fontWeights.medium};
1149
- `, gn = i.span`
1157
+ `, bn = s.span`
1150
1158
  font-size: ${({ theme: o }) => o.fontSizes.md};
1151
1159
  color: ${({ theme: o }) => o.colors.neutral[900]};
1152
1160
  `;
1153
- function bn({ label: o, value: r, href: n }) {
1154
- return /* @__PURE__ */ S(fn, { children: [
1155
- /* @__PURE__ */ e($n, { children: o }),
1156
- n ? /* @__PURE__ */ e(qo, { href: n, external: !0, children: r }) : /* @__PURE__ */ e(gn, { children: r ?? "—" })
1161
+ function xn({ label: o, value: r, href: n }) {
1162
+ return /* @__PURE__ */ S(gn, { children: [
1163
+ /* @__PURE__ */ i($n, { children: o }),
1164
+ n ? /* @__PURE__ */ i(Go, { href: n, external: !0, children: r }) : /* @__PURE__ */ i(bn, { children: r ?? "—" })
1157
1165
  ] });
1158
1166
  }
1159
- bn.displayName = "Field";
1160
- const xn = oo`
1167
+ xn.displayName = "Field";
1168
+ const yn = oo`
1161
1169
  from { opacity: 0; }
1162
1170
  to { opacity: 1; }
1163
- `, yn = oo`
1171
+ `, hn = oo`
1164
1172
  from { opacity: 1; }
1165
1173
  to { opacity: 0; }
1166
- `, hn = oo`
1174
+ `, wn = oo`
1167
1175
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
1168
1176
  to { opacity: 1; transform: scale(1) translateY(0); }
1169
- `, wn = oo`
1177
+ `, mn = oo`
1170
1178
  from { opacity: 1; transform: scale(1) translateY(0); }
1171
1179
  to { opacity: 0; transform: scale(0.95) translateY(-8px); }
1172
- `, mn = i.div`
1180
+ `, vn = s.div`
1173
1181
  position: fixed;
1174
1182
  inset: 0;
1175
1183
  background-color: rgba(0, 0, 0, 0.5);
@@ -1177,9 +1185,9 @@ const xn = oo`
1177
1185
  align-items: center;
1178
1186
  justify-content: center;
1179
1187
  z-index: ${({ theme: o }) => o.zIndex.modal};
1180
- animation: ${({ $closing: o }) => o ? yn : xn} 0.15s ease
1188
+ animation: ${({ $closing: o }) => o ? hn : yn} 0.15s ease
1181
1189
  forwards;
1182
- `, vn = i.div`
1190
+ `, kn = s.div`
1183
1191
  position: relative;
1184
1192
  background: ${({ theme: o }) => o.colors.neutral[0]};
1185
1193
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -1188,7 +1196,7 @@ const xn = oo`
1188
1196
  display: flex;
1189
1197
  flex-direction: column;
1190
1198
  max-height: 90vh;
1191
- animation: ${({ $closing: o }) => o ? wn : hn} 0.15s ease
1199
+ animation: ${({ $closing: o }) => o ? mn : wn} 0.15s ease
1192
1200
  forwards;
1193
1201
 
1194
1202
  ${({ $size: o }) => o === "sm" && t`
@@ -1206,19 +1214,19 @@ const xn = oo`
1206
1214
  max-height: 100vh;
1207
1215
  border-radius: 0;
1208
1216
  `}
1209
- `, kn = i.div`
1217
+ `, Sn = s.div`
1210
1218
  display: flex;
1211
1219
  align-items: center;
1212
1220
  gap: ${({ theme: o }) => o.spacing[2]};
1213
1221
  padding: ${({ theme: o }) => o.spacing[4]};
1214
1222
  border-bottom: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
1215
1223
  flex-shrink: 0;
1216
- `, Sn = i.h2`
1224
+ `, zn = s.h2`
1217
1225
  flex: 1;
1218
1226
  font-size: ${({ theme: o }) => o.fontSizes.lg};
1219
1227
  font-weight: ${({ theme: o }) => o.fontWeights.semibold};
1220
1228
  margin: 0;
1221
- `, zn = i.button`
1229
+ `, Cn = s.button`
1222
1230
  display: inline-flex;
1223
1231
  align-items: center;
1224
1232
  justify-content: center;
@@ -1243,11 +1251,11 @@ const xn = oo`
1243
1251
  outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
1244
1252
  outline-offset: 2px;
1245
1253
  }
1246
- `, Cn = i.div`
1254
+ `, In = s.div`
1247
1255
  padding: ${({ theme: o }) => o.spacing[4]};
1248
1256
  overflow-y: auto;
1249
1257
  flex: 1;
1250
- `, In = i.div`
1258
+ `, Tn = s.div`
1251
1259
  display: flex;
1252
1260
  align-items: center;
1253
1261
  justify-content: flex-end;
@@ -1255,7 +1263,7 @@ const xn = oo`
1255
1263
  padding: ${({ theme: o }) => o.spacing[4]};
1256
1264
  border-top: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
1257
1265
  flex-shrink: 0;
1258
- `, Tn = [
1266
+ `, Wn = [
1259
1267
  "button:not([disabled])",
1260
1268
  "input:not([disabled])",
1261
1269
  "select:not([disabled])",
@@ -1265,14 +1273,14 @@ const xn = oo`
1265
1273
  ].join(", ");
1266
1274
  function Ro(o) {
1267
1275
  return Array.from(
1268
- o.querySelectorAll(Tn)
1276
+ o.querySelectorAll(Wn)
1269
1277
  );
1270
1278
  }
1271
- function Go({
1279
+ function Xo({
1272
1280
  open: o,
1273
1281
  onClose: r,
1274
1282
  title: n,
1275
- children: s,
1283
+ children: e,
1276
1284
  footer: a,
1277
1285
  size: l = "md",
1278
1286
  closeOnBackdrop: d = !0,
@@ -1280,10 +1288,10 @@ function Go({
1280
1288
  ariaLabelledBy: u,
1281
1289
  ariaDescribedBy: f
1282
1290
  }) {
1283
- const g = Y(null), m = Y(null), v = Y(r);
1291
+ const $ = K(null), m = K(null), v = K(r);
1284
1292
  v.current = r;
1285
- const h = ro(), k = u ?? (n ? h : void 0), [C, M] = T(o), [P, L] = T(!1);
1286
- return B(() => {
1293
+ const y = ro(), k = u ?? (n ? y : void 0), [C, M] = T(o), [P, L] = T(!1);
1294
+ return _(() => {
1287
1295
  if (o)
1288
1296
  M(!0), L(!1);
1289
1297
  else if (C) {
@@ -1293,17 +1301,17 @@ function Go({
1293
1301
  }, 150);
1294
1302
  return () => clearTimeout(x);
1295
1303
  }
1296
- }, [o, C]), B(() => {
1304
+ }, [o, C]), _(() => {
1297
1305
  if (!o)
1298
1306
  return;
1299
1307
  const x = document.body.style.overflow;
1300
1308
  return document.body.style.overflow = "hidden", () => {
1301
1309
  document.body.style.overflow = x;
1302
1310
  };
1303
- }, [o]), B(() => {
1304
- if (!o || !g.current)
1311
+ }, [o]), _(() => {
1312
+ if (!o || !$.current)
1305
1313
  return;
1306
- const x = g.current, I = document.activeElement;
1314
+ const x = $.current, I = document.activeElement;
1307
1315
  (Ro(x)[0] ?? x).focus();
1308
1316
  const b = (z) => {
1309
1317
  if (z.key === "Escape" && p) {
@@ -1312,20 +1320,20 @@ function Go({
1312
1320
  }
1313
1321
  if (z.key !== "Tab")
1314
1322
  return;
1315
- const D = Ro(x);
1316
- if (D.length === 0) {
1323
+ const E = Ro(x);
1324
+ if (E.length === 0) {
1317
1325
  z.preventDefault();
1318
1326
  return;
1319
1327
  }
1320
- const W = D[0], N = D[D.length - 1];
1321
- z.shiftKey ? document.activeElement === W && (z.preventDefault(), N.focus()) : document.activeElement === N && (z.preventDefault(), W.focus());
1328
+ const D = E[0], N = E[E.length - 1];
1329
+ z.shiftKey ? document.activeElement === D && (z.preventDefault(), N.focus()) : document.activeElement === N && (z.preventDefault(), D.focus());
1322
1330
  };
1323
1331
  return document.addEventListener("keydown", b), () => {
1324
1332
  document.removeEventListener("keydown", b), I?.focus();
1325
1333
  };
1326
- }, [o, p, C]), C ? xo(
1327
- /* @__PURE__ */ e(
1328
- mn,
1334
+ }, [o, p, C]), C ? yo(
1335
+ /* @__PURE__ */ i(
1336
+ vn,
1329
1337
  {
1330
1338
  $closing: P,
1331
1339
  onMouseDown: (x) => {
@@ -1335,9 +1343,9 @@ function Go({
1335
1343
  d && m.current === x.currentTarget && r();
1336
1344
  },
1337
1345
  children: /* @__PURE__ */ S(
1338
- vn,
1346
+ kn,
1339
1347
  {
1340
- ref: g,
1348
+ ref: $,
1341
1349
  role: "dialog",
1342
1350
  "aria-modal": "true",
1343
1351
  "aria-labelledby": k,
@@ -1347,12 +1355,12 @@ function Go({
1347
1355
  tabIndex: -1,
1348
1356
  onClick: (x) => x.stopPropagation(),
1349
1357
  children: [
1350
- /* @__PURE__ */ S(kn, { children: [
1351
- n && /* @__PURE__ */ e(Sn, { id: h, children: n }),
1352
- /* @__PURE__ */ e(zn, { onClick: r, "aria-label": "Close modal", children: "×" })
1358
+ /* @__PURE__ */ S(Sn, { children: [
1359
+ n && /* @__PURE__ */ i(zn, { id: y, children: n }),
1360
+ /* @__PURE__ */ i(Cn, { onClick: r, "aria-label": "Close modal", children: "×" })
1353
1361
  ] }),
1354
- /* @__PURE__ */ e(Cn, { children: s }),
1355
- a && /* @__PURE__ */ e(In, { children: a })
1362
+ /* @__PURE__ */ i(In, { children: e }),
1363
+ a && /* @__PURE__ */ i(Tn, { children: a })
1356
1364
  ]
1357
1365
  }
1358
1366
  )
@@ -1361,40 +1369,40 @@ function Go({
1361
1369
  document.body
1362
1370
  ) : null;
1363
1371
  }
1364
- Go.displayName = "Modal";
1365
- const Xo = oo`
1372
+ Xo.displayName = "Modal";
1373
+ const Jo = oo`
1366
1374
  from { opacity: 0; transform: translateY(12px); }
1367
1375
  to { opacity: 1; transform: translateY(0); }
1368
- `, Jo = oo`
1376
+ `, Qo = oo`
1369
1377
  from { opacity: 0; transform: translateY(-12px); }
1370
1378
  to { opacity: 1; transform: translateY(0); }
1371
- `, Qo = oo`
1379
+ `, Zo = oo`
1372
1380
  from { opacity: 1; }
1373
1381
  to { opacity: 0; }
1374
- `, go = (o, r, n) => t`
1382
+ `, bo = (o, r, n) => t`
1375
1383
  background: ${r};
1376
1384
  border: ${o.brutalism.borderWidth} solid ${n};
1377
1385
  box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
1378
1386
  0 ${n};
1379
1387
  `;
1380
- function Zo(o, r) {
1388
+ function or(o, r) {
1381
1389
  return r.brutalism ? {
1382
- success: go(
1390
+ success: bo(
1383
1391
  r,
1384
1392
  r.colors.success[50],
1385
1393
  r.colors.success[500]
1386
1394
  ),
1387
- error: go(
1395
+ error: bo(
1388
1396
  r,
1389
1397
  r.colors.error[50],
1390
1398
  r.colors.error[500]
1391
1399
  ),
1392
- warning: go(
1400
+ warning: bo(
1393
1401
  r,
1394
1402
  r.colors.warning[50],
1395
1403
  r.colors.warning[500]
1396
1404
  ),
1397
- info: go(r, r.colors.info[50], r.colors.info[500])
1405
+ info: bo(r, r.colors.info[50], r.colors.info[500])
1398
1406
  }[o] : {
1399
1407
  success: t`
1400
1408
  background: ${r.colors.success[50]};
@@ -1418,7 +1426,7 @@ function Zo(o, r) {
1418
1426
  `
1419
1427
  }[o];
1420
1428
  }
1421
- const or = t`
1429
+ const rr = t`
1422
1430
  display: flex;
1423
1431
  align-items: center;
1424
1432
  gap: ${({ theme: o }) => o.spacing[3]};
@@ -1426,7 +1434,13 @@ const or = t`
1426
1434
  max-width: 400px;
1427
1435
  padding: ${({ theme: o }) => `${o.spacing[3]} ${o.spacing[4]}`};
1428
1436
  border-radius: ${({ theme: o }) => o.radius.md};
1429
- `, Wn = {
1437
+
1438
+ @media (max-width: 640px) {
1439
+ min-width: unset;
1440
+ max-width: unset;
1441
+ width: 100%;
1442
+ }
1443
+ `, Dn = {
1430
1444
  "bottom-right": t`
1431
1445
  bottom: 24px;
1432
1446
  right: 24px;
@@ -1443,35 +1457,35 @@ const or = t`
1443
1457
  top: 24px;
1444
1458
  left: 24px;
1445
1459
  `
1446
- }, Dn = i.div`
1460
+ }, En = s.div`
1447
1461
  position: fixed;
1448
1462
  z-index: ${({ theme: o }) => o.zIndex.toast};
1449
- ${or}
1463
+ ${rr}
1450
1464
 
1451
1465
  animation: ${({ $closing: o, $position: r }) => o ? t`
1452
- ${Qo} 0.2s ease forwards
1466
+ ${Zo} 0.2s ease forwards
1453
1467
  ` : r.startsWith("top") ? t`
1454
- ${Jo} 0.2s ease forwards
1468
+ ${Qo} 0.2s ease forwards
1455
1469
  ` : t`
1456
- ${Xo} 0.2s ease forwards
1470
+ ${Jo} 0.2s ease forwards
1457
1471
  `};
1458
1472
 
1459
- ${({ $position: o }) => Wn[o]}
1460
- ${({ $variant: o, theme: r }) => Zo(o, r)}
1461
- `, En = i.div`
1462
- ${or}
1473
+ ${({ $position: o }) => Dn[o]}
1474
+ ${({ $variant: o, theme: r }) => or(o, r)}
1475
+ `, On = s.div`
1476
+ ${rr}
1463
1477
  pointer-events: all;
1464
1478
 
1465
1479
  animation: ${({ $closing: o, $isTop: r }) => o ? t`
1466
- ${Qo} 0.2s ease forwards
1480
+ ${Zo} 0.2s ease forwards
1467
1481
  ` : r ? t`
1468
- ${Jo} 0.2s ease forwards
1482
+ ${Qo} 0.2s ease forwards
1469
1483
  ` : t`
1470
- ${Xo} 0.2s ease forwards
1484
+ ${Jo} 0.2s ease forwards
1471
1485
  `};
1472
1486
 
1473
- ${({ $variant: o, theme: r }) => Zo(o, r)}
1474
- `, On = i.div`
1487
+ ${({ $variant: o, theme: r }) => or(o, r)}
1488
+ `, Mn = s.div`
1475
1489
  position: fixed;
1476
1490
  z-index: ${({ theme: o }) => o.zIndex.toast};
1477
1491
  display: flex;
@@ -1501,14 +1515,22 @@ const or = t`
1501
1515
  align-items: flex-start;
1502
1516
  `
1503
1517
  })[o]}
1504
- `, rr = i.p`
1518
+
1519
+ @media (max-width: 640px) {
1520
+ top: ${({ theme: o }) => o.spacing[4]};
1521
+ left: ${({ theme: o }) => o.spacing[3]};
1522
+ right: ${({ theme: o }) => o.spacing[3]};
1523
+ bottom: auto;
1524
+ align-items: stretch;
1525
+ }
1526
+ `, nr = s.p`
1505
1527
  flex: 1;
1506
1528
  margin: 0;
1507
1529
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1508
1530
  font-weight: ${({ theme: o }) => o.brutalism ? o.fontWeights.semibold : o.fontWeights.normal};
1509
1531
  line-height: 1.5;
1510
1532
  color: ${({ theme: o }) => o.colors.neutral[900]};
1511
- `, nr = i.button`
1533
+ `, tr = s.button`
1512
1534
  flex-shrink: 0;
1513
1535
  display: inline-flex;
1514
1536
  align-items: center;
@@ -1531,67 +1553,67 @@ const or = t`
1531
1553
  outline-offset: 2px;
1532
1554
  }
1533
1555
  `;
1534
- function Mn({
1556
+ function Ln({
1535
1557
  open: o,
1536
1558
  onClose: r,
1537
1559
  message: n,
1538
- variant: s = "info",
1560
+ variant: e = "info",
1539
1561
  duration: a = 4e3,
1540
1562
  position: l = "bottom-right"
1541
1563
  }) {
1542
1564
  const [d, p] = T(o), [u, f] = T(!1);
1543
- return B(() => {
1565
+ return _(() => {
1544
1566
  if (o)
1545
1567
  p(!0), f(!1);
1546
1568
  else if (d) {
1547
1569
  f(!0);
1548
- const g = setTimeout(() => {
1570
+ const $ = setTimeout(() => {
1549
1571
  p(!1), f(!1);
1550
1572
  }, 200);
1551
1573
  return () => {
1552
- clearTimeout(g);
1574
+ clearTimeout($);
1553
1575
  };
1554
1576
  }
1555
- }, [o, d]), B(() => {
1577
+ }, [o, d]), _(() => {
1556
1578
  if (!o || a === 0)
1557
1579
  return;
1558
- const g = setTimeout(r, a);
1580
+ const $ = setTimeout(r, a);
1559
1581
  return () => {
1560
- clearTimeout(g);
1582
+ clearTimeout($);
1561
1583
  };
1562
- }, [o, a, r]), d ? xo(
1584
+ }, [o, a, r]), d ? yo(
1563
1585
  /* @__PURE__ */ S(
1564
- Dn,
1586
+ En,
1565
1587
  {
1566
1588
  $position: l,
1567
- $variant: s,
1589
+ $variant: e,
1568
1590
  $closing: u,
1569
1591
  role: "alert",
1570
1592
  "aria-live": "polite",
1571
1593
  children: [
1572
- /* @__PURE__ */ e(rr, { children: n }),
1573
- /* @__PURE__ */ e(nr, { onClick: r, "aria-label": "Close notification", children: /* @__PURE__ */ e(yo, { size: 14, strokeWidth: 2.5 }) })
1594
+ /* @__PURE__ */ i(nr, { children: n }),
1595
+ /* @__PURE__ */ i(tr, { onClick: r, "aria-label": "Close notification", children: /* @__PURE__ */ i(ho, { size: 14, strokeWidth: 2.5 }) })
1574
1596
  ]
1575
1597
  }
1576
1598
  ),
1577
1599
  document.body
1578
1600
  ) : null;
1579
1601
  }
1580
- Mn.displayName = "Toast";
1581
- const tr = Wo(null), Vo = 5, Ln = "bottom-right";
1582
- function Nn({
1602
+ Ln.displayName = "Toast";
1603
+ const er = Do(null), Vo = 5, Nn = "bottom-right";
1604
+ function Pn({
1583
1605
  toast: o,
1584
1606
  isTop: r,
1585
1607
  onClose: n
1586
1608
  }) {
1587
- return B(() => {
1588
- const s = o.duration ?? 4e3;
1589
- if (s === 0)
1609
+ return _(() => {
1610
+ const e = o.duration ?? 4e3;
1611
+ if (e === 0)
1590
1612
  return;
1591
- const a = setTimeout(() => n(o.id), s);
1613
+ const a = setTimeout(() => n(o.id), e);
1592
1614
  return () => clearTimeout(a);
1593
1615
  }, [o.id, o.duration, n]), /* @__PURE__ */ S(
1594
- En,
1616
+ On,
1595
1617
  {
1596
1618
  $variant: o.variant ?? "info",
1597
1619
  $closing: o.closing,
@@ -1599,51 +1621,51 @@ function Nn({
1599
1621
  role: "alert",
1600
1622
  "aria-live": "polite",
1601
1623
  children: [
1602
- /* @__PURE__ */ e(rr, { children: o.message }),
1603
- /* @__PURE__ */ e(
1604
- nr,
1624
+ /* @__PURE__ */ i(nr, { children: o.message }),
1625
+ /* @__PURE__ */ i(
1626
+ tr,
1605
1627
  {
1606
1628
  onClick: () => n(o.id),
1607
1629
  "aria-label": "Close notification",
1608
- children: /* @__PURE__ */ e(yo, { size: 14, strokeWidth: 2.5 })
1630
+ children: /* @__PURE__ */ i(ho, { size: 14, strokeWidth: 2.5 })
1609
1631
  }
1610
1632
  )
1611
1633
  ]
1612
1634
  }
1613
1635
  );
1614
1636
  }
1615
- function xs({ children: o }) {
1616
- const [r, n] = T([]), s = X((u) => {
1637
+ function ye({ children: o }) {
1638
+ const [r, n] = T([]), e = X((u) => {
1617
1639
  n(
1618
1640
  (f) => f.map(
1619
- (g) => g.id === u ? { ...g, closing: !0 } : g
1641
+ ($) => $.id === u ? { ...$, closing: !0 } : $
1620
1642
  )
1621
1643
  ), setTimeout(() => {
1622
1644
  n(
1623
- (f) => f.filter((g) => g.id !== u)
1645
+ (f) => f.filter(($) => $.id !== u)
1624
1646
  );
1625
1647
  }, 200);
1626
1648
  }, []), a = X((u) => {
1627
1649
  const f = Date.now();
1628
- n((g) => {
1629
- const m = [...g, { ...u, id: f, closing: !1 }];
1650
+ n(($) => {
1651
+ const m = [...$, { ...u, id: f, closing: !1 }];
1630
1652
  return m.length > Vo ? m.slice(m.length - Vo) : m;
1631
1653
  });
1632
- }, []), l = Do(() => Object.assign((u) => a(u), {
1654
+ }, []), l = Eo(() => Object.assign((u) => a(u), {
1633
1655
  success: (u, f) => a({ ...f, message: u, variant: "success" }),
1634
1656
  error: (u, f) => a({ ...f, message: u, variant: "error" }),
1635
1657
  warning: (u, f) => a({ ...f, message: u, variant: "warning" }),
1636
1658
  info: (u, f) => a({ ...f, message: u, variant: "info" })
1637
- }), [a]), d = r[r.length - 1]?.position ?? Ln, p = d.startsWith("top");
1638
- return /* @__PURE__ */ S(tr.Provider, { value: { toast: l }, children: [
1659
+ }), [a]), d = r[r.length - 1]?.position ?? Nn, p = d.startsWith("top");
1660
+ return /* @__PURE__ */ S(er.Provider, { value: { toast: l }, children: [
1639
1661
  o,
1640
- r.length > 0 && xo(
1641
- /* @__PURE__ */ e(On, { $position: d, children: r.map((u) => /* @__PURE__ */ e(
1642
- Nn,
1662
+ r.length > 0 && yo(
1663
+ /* @__PURE__ */ i(Mn, { $position: d, children: r.map((u) => /* @__PURE__ */ i(
1664
+ Pn,
1643
1665
  {
1644
1666
  toast: u,
1645
1667
  isTop: p,
1646
- onClose: s
1668
+ onClose: e
1647
1669
  },
1648
1670
  u.id
1649
1671
  )) }),
@@ -1651,23 +1673,23 @@ function xs({ children: o }) {
1651
1673
  )
1652
1674
  ] });
1653
1675
  }
1654
- function ys() {
1655
- const o = To(tr);
1676
+ function he() {
1677
+ const o = Wo(er);
1656
1678
  if (!o)
1657
1679
  throw new Error("useToast must be used within a ToastProvider");
1658
1680
  return o;
1659
1681
  }
1660
- const Pn = i.form`
1682
+ const Rn = s.form`
1661
1683
  display: flex;
1662
1684
  flex-direction: column;
1663
1685
  gap: ${({ theme: o }) => o.spacing[4]};
1664
1686
  `;
1665
- function Rn({ onSubmit: o, children: r, ...n }) {
1666
- return /* @__PURE__ */ e(
1667
- Pn,
1687
+ function Vn({ onSubmit: o, children: r, ...n }) {
1688
+ return /* @__PURE__ */ i(
1689
+ Rn,
1668
1690
  {
1669
- onSubmit: (s) => {
1670
- s.preventDefault(), o?.(s);
1691
+ onSubmit: (e) => {
1692
+ e.preventDefault(), o?.(e);
1671
1693
  },
1672
1694
  noValidate: !0,
1673
1695
  ...n,
@@ -1675,19 +1697,19 @@ function Rn({ onSubmit: o, children: r, ...n }) {
1675
1697
  }
1676
1698
  );
1677
1699
  }
1678
- Rn.displayName = "Form";
1679
- const Vn = i.div`
1700
+ Vn.displayName = "Form";
1701
+ const Bn = s.div`
1680
1702
  display: flex;
1681
1703
  flex-direction: column;
1682
1704
  gap: ${({ theme: o }) => o.spacing[1]};
1683
- `, Fn = i.label`
1705
+ `, Fn = s.label`
1684
1706
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1685
1707
  font-weight: ${({ theme: o }) => o.fontWeights.medium};
1686
1708
  color: ${({ theme: o }) => o.colors.neutral[900]};
1687
- `, An = i.span`
1709
+ `, An = s.span`
1688
1710
  color: ${({ theme: o }) => o.colors.error[500]};
1689
1711
  margin-left: ${({ theme: o }) => o.spacing[0.5]};
1690
- `, Bn = i.span`
1712
+ `, _n = s.span`
1691
1713
  font-size: ${({ theme: o }) => o.fontSizes.xs};
1692
1714
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
1693
1715
  `;
@@ -1695,7 +1717,7 @@ function sr({
1695
1717
  label: o,
1696
1718
  error: r,
1697
1719
  helperText: n,
1698
- required: s,
1720
+ required: e,
1699
1721
  children: a
1700
1722
  }) {
1701
1723
  const l = ro(), d = `${l}-hint`, p = !!(r || n), u = typeof r == "string" ? r : void 0, f = Mo.isValidElement(a) ? Mo.cloneElement(
@@ -1706,27 +1728,27 @@ function sr({
1706
1728
  ...r && { "aria-invalid": !0 }
1707
1729
  }
1708
1730
  ) : a;
1709
- return /* @__PURE__ */ S(Vn, { children: [
1731
+ return /* @__PURE__ */ S(Bn, { children: [
1710
1732
  o && /* @__PURE__ */ S(Fn, { htmlFor: l, children: [
1711
1733
  o,
1712
- s && /* @__PURE__ */ e(An, { "aria-hidden": "true", children: " *" })
1734
+ e && /* @__PURE__ */ i(An, { "aria-hidden": "true", children: " *" })
1713
1735
  ] }),
1714
1736
  f,
1715
- p && /* @__PURE__ */ e(Bn, { id: d, $error: !!r, children: u ?? n })
1737
+ p && /* @__PURE__ */ i(_n, { id: d, $error: !!r, children: u ?? n })
1716
1738
  ] });
1717
1739
  }
1718
1740
  sr.displayName = "FormField";
1719
- function hs({
1741
+ function we({
1720
1742
  initialValues: o,
1721
1743
  validate: r,
1722
1744
  onSubmit: n,
1723
- onError: s
1745
+ onError: e
1724
1746
  }) {
1725
1747
  const [a, l] = T(o), [d, p] = T(
1726
1748
  {}
1727
- ), [u, f] = T({}), [g, m] = T(!1), v = Y(a);
1749
+ ), [u, f] = T({}), [$, m] = T(!1), v = K(a);
1728
1750
  v.current = a;
1729
- const h = X(
1751
+ const y = X(
1730
1752
  (w) => {
1731
1753
  if (!r)
1732
1754
  return {};
@@ -1736,7 +1758,7 @@ function hs({
1736
1758
  );
1737
1759
  },
1738
1760
  [r]
1739
- ), k = Y(u);
1761
+ ), k = K(u);
1740
1762
  k.current = u;
1741
1763
  const C = X(
1742
1764
  (w) => {
@@ -1744,29 +1766,29 @@ function hs({
1744
1766
  process.env.NODE_ENV !== "production" && !b && console.warn(
1745
1767
  "[useForm] handleChange: field is missing a `name` attribute — value will not be tracked."
1746
1768
  );
1747
- const D = { ...v.current, [b]: z };
1748
- l(D), k.current[b] && p(h(D));
1769
+ const E = { ...v.current, [b]: z };
1770
+ l(E), k.current[b] && p(y(E));
1749
1771
  },
1750
- [h]
1772
+ [y]
1751
1773
  ), M = X(
1752
1774
  (w) => {
1753
1775
  const { name: b } = w.target;
1754
1776
  process.env.NODE_ENV !== "production" && !b && console.warn(
1755
1777
  "[useForm] handleBlur: field is missing a `name` attribute — touched state will not be tracked."
1756
- ), f((z) => ({ ...z, [b]: !0 })), p(h(v.current));
1778
+ ), f((z) => ({ ...z, [b]: !0 })), p(y(v.current));
1757
1779
  },
1758
- [h]
1780
+ [y]
1759
1781
  ), P = X(
1760
1782
  (w) => {
1761
1783
  w?.preventDefault();
1762
1784
  const b = Object.keys(v.current).reduce(
1763
- (W, N) => ({ ...W, [N]: !0 }),
1785
+ (D, N) => ({ ...D, [N]: !0 }),
1764
1786
  {}
1765
1787
  );
1766
1788
  f(b);
1767
- const z = h(v.current);
1789
+ const z = y(v.current);
1768
1790
  if (p(z), Object.keys(z).length > 0) {
1769
- s?.(z);
1791
+ e?.(z);
1770
1792
  return;
1771
1793
  }
1772
1794
  (async () => {
@@ -1778,7 +1800,7 @@ function hs({
1778
1800
  }
1779
1801
  })();
1780
1802
  },
1781
- [h, n, s]
1803
+ [y, n, e]
1782
1804
  ), L = X((w, b) => {
1783
1805
  l((z) => ({ ...z, [w]: b }));
1784
1806
  }, []), x = X(
@@ -1798,52 +1820,52 @@ function hs({
1798
1820
  handleSubmit: P,
1799
1821
  setFieldValue: L,
1800
1822
  reset: x,
1801
- isSubmitting: g
1823
+ isSubmitting: $
1802
1824
  };
1803
1825
  }
1804
- const ws = (o = "Required") => (r) => {
1826
+ const me = (o = "Required") => (r) => {
1805
1827
  if (!r.trim())
1806
1828
  return o;
1807
- }, ms = (o, r) => (n) => {
1829
+ }, ve = (o, r) => (n) => {
1808
1830
  if (n.length < o)
1809
1831
  return r ?? `Must be at least ${o} characters`;
1810
- }, vs = (o, r) => (n) => {
1832
+ }, ke = (o, r) => (n) => {
1811
1833
  if (n.length > o)
1812
1834
  return r ?? `Must be at most ${o} characters`;
1813
- }, ks = (o = "Enter a valid email") => (r) => {
1835
+ }, Se = (o = "Enter a valid email") => (r) => {
1814
1836
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))
1815
1837
  return o;
1816
- }, Ss = (o = "Enter a valid URL") => (r) => {
1838
+ }, ze = (o = "Enter a valid URL") => (r) => {
1817
1839
  try {
1818
1840
  new URL(r);
1819
1841
  return;
1820
1842
  } catch {
1821
1843
  return o;
1822
1844
  }
1823
- }, zs = (o, r) => (n) => {
1845
+ }, Ce = (o, r) => (n) => {
1824
1846
  if (!o.test(n))
1825
1847
  return r;
1826
1848
  };
1827
- function Cs(...o) {
1849
+ function Ie(...o) {
1828
1850
  return (r) => {
1829
1851
  for (const n of o) {
1830
- const s = n(r);
1831
- if (s !== void 0)
1832
- return s;
1852
+ const e = n(r);
1853
+ if (e !== void 0)
1854
+ return e;
1833
1855
  }
1834
1856
  };
1835
1857
  }
1836
- const _n = i.div`
1858
+ const jn = s.div`
1837
1859
  display: flex;
1838
1860
  flex-direction: column;
1839
1861
  gap: ${({ theme: o }) => o.spacing[1]};
1840
- `, jn = i.label`
1862
+ `, Hn = s.label`
1841
1863
  display: inline-flex;
1842
1864
  align-items: center;
1843
1865
  gap: ${({ theme: o }) => o.spacing[2]};
1844
1866
  cursor: ${({ $disabled: o }) => o ? "not-allowed" : "pointer"};
1845
1867
  opacity: ${({ $disabled: o }) => o ? 0.6 : 1};
1846
- `, Hn = i.input`
1868
+ `, Un = s.input`
1847
1869
  position: absolute;
1848
1870
  opacity: 0;
1849
1871
  width: 0;
@@ -1854,7 +1876,7 @@ const _n = i.div`
1854
1876
  &:focus-visible + div {
1855
1877
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
1856
1878
  }
1857
- `, Yn = i.div`
1879
+ `, Yn = s.div`
1858
1880
  position: relative;
1859
1881
  display: flex;
1860
1882
  align-items: center;
@@ -1891,71 +1913,71 @@ const _n = i.div`
1891
1913
  transform: rotate(45deg) translate(-1px, -1px);
1892
1914
  }
1893
1915
  `}
1894
- `, Un = i.span`
1916
+ `, Kn = s.span`
1895
1917
  font-size: ${({ $size: o = "md", theme: r }) => o === "sm" ? r.fontSizes.sm : r.fontSizes.md};
1896
1918
  font-weight: ${({ theme: o }) => o.fontWeights.medium};
1897
- `, Kn = i.span`
1919
+ `, qn = s.span`
1898
1920
  font-size: ${({ theme: o }) => o.fontSizes.xs};
1899
1921
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
1900
1922
  `;
1901
- function qn({
1923
+ function Gn({
1902
1924
  ref: o,
1903
1925
  label: r,
1904
1926
  size: n = "md",
1905
- error: s,
1927
+ error: e,
1906
1928
  helperText: a,
1907
1929
  disabled: l,
1908
1930
  checked: d,
1909
1931
  id: p,
1910
1932
  color: u,
1911
1933
  borderColor: f,
1912
- checkColor: g,
1934
+ checkColor: $,
1913
1935
  ...m
1914
1936
  }) {
1915
- const v = ro(), h = p ?? v, k = typeof s == "string" ? s : void 0, C = !!(a || s);
1916
- return /* @__PURE__ */ S(_n, { children: [
1917
- /* @__PURE__ */ S(jn, { htmlFor: h, $disabled: l, children: [
1918
- /* @__PURE__ */ e(
1919
- Hn,
1937
+ const v = ro(), y = p ?? v, k = typeof e == "string" ? e : void 0, C = !!(a || e);
1938
+ return /* @__PURE__ */ S(jn, { children: [
1939
+ /* @__PURE__ */ S(Hn, { htmlFor: y, $disabled: l, children: [
1940
+ /* @__PURE__ */ i(
1941
+ Un,
1920
1942
  {
1921
- id: h,
1943
+ id: y,
1922
1944
  ref: o,
1923
1945
  type: "checkbox",
1924
1946
  checked: d,
1925
1947
  disabled: l,
1926
- "aria-invalid": !!s,
1948
+ "aria-invalid": !!e,
1927
1949
  ...m
1928
1950
  }
1929
1951
  ),
1930
- /* @__PURE__ */ e(
1952
+ /* @__PURE__ */ i(
1931
1953
  Yn,
1932
1954
  {
1933
1955
  $checked: d,
1934
- $error: !!s,
1956
+ $error: !!e,
1935
1957
  $disabled: l,
1936
1958
  $size: n,
1937
1959
  $color: u,
1938
1960
  $borderColor: f,
1939
- $checkColor: g
1961
+ $checkColor: $
1940
1962
  }
1941
1963
  ),
1942
- r && /* @__PURE__ */ e(Un, { $size: n, children: r })
1964
+ r && /* @__PURE__ */ i(Kn, { $size: n, children: r })
1943
1965
  ] }),
1944
- C && /* @__PURE__ */ e(Kn, { $error: !!s, children: k ?? a })
1966
+ C && /* @__PURE__ */ i(qn, { $error: !!e, children: k ?? a })
1945
1967
  ] });
1946
1968
  }
1947
- qn.displayName = "Checkbox";
1948
- const Gn = i.div`
1969
+ Gn.displayName = "Checkbox";
1970
+ const Xn = s.div`
1949
1971
  display: flex;
1950
1972
  flex-direction: column;
1951
1973
  gap: ${({ theme: o }) => o.spacing[1]};
1952
- `, Xn = i.label`
1974
+ `, Jn = s.label`
1953
1975
  display: inline-flex;
1954
1976
  align-items: center;
1955
1977
  gap: ${({ theme: o }) => o.spacing[2]};
1956
1978
  cursor: ${({ $disabled: o }) => o ? "not-allowed" : "pointer"};
1957
1979
  opacity: ${({ $disabled: o }) => o ? 0.6 : 1};
1958
- `, Jn = i.input`
1980
+ `, Qn = s.input`
1959
1981
  position: absolute;
1960
1982
  opacity: 0;
1961
1983
  width: 0;
@@ -1966,7 +1988,7 @@ const Gn = i.div`
1966
1988
  &:focus-visible + div {
1967
1989
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
1968
1990
  }
1969
- `, Qn = i.div`
1991
+ `, Zn = s.div`
1970
1992
  position: relative;
1971
1993
  display: flex;
1972
1994
  align-items: center;
@@ -2001,69 +2023,69 @@ const Gn = i.div`
2001
2023
  background-color: ${r ?? n.colors.primary[500]};
2002
2024
  }
2003
2025
  `}
2004
- `, Zn = i.span`
2026
+ `, ot = s.span`
2005
2027
  font-size: ${({ $size: o = "md", theme: r }) => o === "sm" ? r.fontSizes.sm : r.fontSizes.md};
2006
2028
  font-weight: ${({ theme: o }) => o.fontWeights.medium};
2007
- `, ot = i.span`
2029
+ `, rt = s.span`
2008
2030
  font-size: ${({ theme: o }) => o.fontSizes.xs};
2009
2031
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
2010
2032
  `;
2011
- function rt({
2033
+ function nt({
2012
2034
  ref: o,
2013
2035
  label: r,
2014
2036
  size: n = "md",
2015
- error: s,
2037
+ error: e,
2016
2038
  helperText: a,
2017
2039
  disabled: l,
2018
2040
  checked: d,
2019
2041
  id: p,
2020
2042
  color: u,
2021
2043
  borderColor: f,
2022
- ...g
2044
+ ...$
2023
2045
  }) {
2024
- const m = ro(), v = p ?? m, h = !!(a || s);
2025
- return /* @__PURE__ */ S(Gn, { children: [
2026
- /* @__PURE__ */ S(Xn, { htmlFor: v, $disabled: l, children: [
2027
- /* @__PURE__ */ e(
2028
- Jn,
2046
+ const m = ro(), v = p ?? m, y = !!(a || e);
2047
+ return /* @__PURE__ */ S(Xn, { children: [
2048
+ /* @__PURE__ */ S(Jn, { htmlFor: v, $disabled: l, children: [
2049
+ /* @__PURE__ */ i(
2050
+ Qn,
2029
2051
  {
2030
2052
  id: v,
2031
2053
  ref: o,
2032
2054
  type: "radio",
2033
2055
  checked: d,
2034
2056
  disabled: l,
2035
- "aria-invalid": !!s,
2036
- ...g
2057
+ "aria-invalid": !!e,
2058
+ ...$
2037
2059
  }
2038
2060
  ),
2039
- /* @__PURE__ */ e(
2040
- Qn,
2061
+ /* @__PURE__ */ i(
2062
+ Zn,
2041
2063
  {
2042
2064
  $checked: d,
2043
- $error: s,
2065
+ $error: e,
2044
2066
  $disabled: l,
2045
2067
  $size: n,
2046
2068
  $color: u,
2047
2069
  $borderColor: f
2048
2070
  }
2049
2071
  ),
2050
- r && /* @__PURE__ */ e(Zn, { $size: n, children: r })
2072
+ r && /* @__PURE__ */ i(ot, { $size: n, children: r })
2051
2073
  ] }),
2052
- h && /* @__PURE__ */ e(ot, { $error: s, children: a })
2074
+ y && /* @__PURE__ */ i(rt, { $error: e, children: a })
2053
2075
  ] });
2054
2076
  }
2055
- rt.displayName = "Radio";
2056
- const nt = i.div`
2077
+ nt.displayName = "Radio";
2078
+ const tt = s.div`
2057
2079
  display: flex;
2058
2080
  flex-direction: column;
2059
2081
  gap: ${({ theme: o }) => o.spacing[1]};
2060
- `, tt = i.label`
2082
+ `, et = s.label`
2061
2083
  display: inline-flex;
2062
2084
  align-items: center;
2063
2085
  gap: ${({ theme: o }) => o.spacing[2]};
2064
2086
  cursor: ${({ $disabled: o }) => o ? "not-allowed" : "pointer"};
2065
2087
  opacity: ${({ $disabled: o }) => o ? 0.6 : 1};
2066
- `, st = i.input`
2088
+ `, st = s.input`
2067
2089
  position: absolute;
2068
2090
  opacity: 0;
2069
2091
  width: 0;
@@ -2074,7 +2096,7 @@ const nt = i.div`
2074
2096
  &:focus-visible + div {
2075
2097
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
2076
2098
  }
2077
- `, et = i.div`
2099
+ `, it = s.div`
2078
2100
  position: relative;
2079
2101
  flex-shrink: 0;
2080
2102
  border-radius: 9999px;
@@ -2116,46 +2138,46 @@ const nt = i.div`
2116
2138
  height: 12px;
2117
2139
  margin-top: -6px;
2118
2140
  transform: translateX(${r ? "calc(100% + 4px)" : "2px"});
2119
- `, s = t`
2141
+ `, e = t`
2120
2142
  width: 16px;
2121
2143
  height: 16px;
2122
2144
  margin-top: -8px;
2123
2145
  transform: translateX(${r ? "calc(100% + 4px)" : "2px"});
2124
2146
  `;
2125
- return o === "sm" ? n : s;
2147
+ return o === "sm" ? n : e;
2126
2148
  }}
2127
2149
  }
2128
- `, it = i.span`
2150
+ `, at = s.span`
2129
2151
  font-size: ${({ $size: o = "md", theme: r }) => o === "sm" ? r.fontSizes.sm : r.fontSizes.md};
2130
2152
  font-weight: ${({ theme: o }) => o.fontWeights.medium};
2131
2153
  `;
2132
- function at({
2154
+ function lt({
2133
2155
  ref: o,
2134
2156
  label: r,
2135
2157
  size: n = "md",
2136
- disabled: s,
2158
+ disabled: e,
2137
2159
  checked: a,
2138
2160
  id: l,
2139
2161
  color: d,
2140
2162
  borderColor: p,
2141
2163
  ...u
2142
2164
  }) {
2143
- const f = ro(), g = l ?? f;
2144
- return /* @__PURE__ */ e(nt, { children: /* @__PURE__ */ S(tt, { htmlFor: g, $disabled: s, children: [
2145
- /* @__PURE__ */ e(
2165
+ const f = ro(), $ = l ?? f;
2166
+ return /* @__PURE__ */ i(tt, { children: /* @__PURE__ */ S(et, { htmlFor: $, $disabled: e, children: [
2167
+ /* @__PURE__ */ i(
2146
2168
  st,
2147
2169
  {
2148
- id: g,
2170
+ id: $,
2149
2171
  ref: o,
2150
2172
  type: "checkbox",
2151
2173
  role: "switch",
2152
2174
  checked: a,
2153
- disabled: s,
2175
+ disabled: e,
2154
2176
  ...u
2155
2177
  }
2156
2178
  ),
2157
- /* @__PURE__ */ e(
2158
- et,
2179
+ /* @__PURE__ */ i(
2180
+ it,
2159
2181
  {
2160
2182
  $checked: a,
2161
2183
  $size: n,
@@ -2163,11 +2185,11 @@ function at({
2163
2185
  $borderColor: p
2164
2186
  }
2165
2187
  ),
2166
- r && /* @__PURE__ */ e(it, { $size: n, children: r })
2188
+ r && /* @__PURE__ */ i(at, { $size: n, children: r })
2167
2189
  ] }) });
2168
2190
  }
2169
- at.displayName = "Switch";
2170
- const lt = i.div`
2191
+ lt.displayName = "Switch";
2192
+ const ct = s.div`
2171
2193
  border-radius: ${({ theme: o }) => o.radius.md};
2172
2194
  background: ${({ theme: o }) => o.colors.neutral[0]};
2173
2195
  overflow: hidden;
@@ -2182,7 +2204,7 @@ const lt = i.div`
2182
2204
  border: 1px solid ${r ?? o.colors.neutral[200]};
2183
2205
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
2184
2206
  `}
2185
- `, ct = i.button`
2207
+ `, dt = s.button`
2186
2208
  width: 100%;
2187
2209
  display: flex;
2188
2210
  align-items: flex-start;
@@ -2202,19 +2224,19 @@ const lt = i.div`
2202
2224
  ${({ theme: o, $accentColor: r }) => r ?? o.colors.primary[500]};
2203
2225
  outline-offset: -2px;
2204
2226
  }
2205
- `, dt = i.div`
2227
+ `, ut = s.div`
2206
2228
  flex: 1;
2207
2229
  min-width: 0;
2208
- `, ut = i.span`
2230
+ `, pt = s.span`
2209
2231
  display: block;
2210
2232
  font-size: ${({ theme: o }) => o.fontSizes.md};
2211
2233
  font-weight: ${({ theme: o }) => o.fontWeights.semibold};
2212
2234
  color: ${({ theme: o }) => o.colors.neutral[900]};
2213
- `, pt = i.span`
2235
+ `, ft = s.span`
2214
2236
  display: block;
2215
2237
  font-size: ${({ theme: o }) => o.fontSizes.sm};
2216
2238
  color: ${({ theme: o }) => o.colors.neutral[500]};
2217
- `, ft = i.div`
2239
+ `, gt = s.div`
2218
2240
  display: flex;
2219
2241
  flex-direction: row;
2220
2242
  align-items: center;
@@ -2226,11 +2248,11 @@ const lt = i.div`
2226
2248
  align-items: flex-start;
2227
2249
  gap: ${({ theme: o }) => o.spacing[2]};
2228
2250
  }
2229
- `, $t = i.div`
2251
+ `, $t = s.div`
2230
2252
  display: flex;
2231
2253
  align-items: center;
2232
2254
  gap: ${({ theme: o }) => o.spacing[2]};
2233
- `, gt = i.span`
2255
+ `, bt = s.span`
2234
2256
  display: inline-flex;
2235
2257
  align-items: center;
2236
2258
  justify-content: center;
@@ -2238,81 +2260,81 @@ const lt = i.div`
2238
2260
  transition: transform 0.2s ease;
2239
2261
  transform: ${({ $open: o }) => o ? "rotate(180deg)" : "rotate(0deg)"};
2240
2262
  color: ${({ theme: o, $accentColor: r }) => r ?? o.colors.neutral[500]};
2241
- `, bt = i.div`
2263
+ `, xt = s.div`
2242
2264
  display: grid;
2243
2265
  grid-template-rows: ${({ $open: o }) => o ? "1fr" : "0fr"};
2244
2266
  transition: grid-template-rows 0.2s ease;
2245
- `, xt = i.div`
2267
+ `, yt = s.div`
2246
2268
  overflow: hidden;
2247
- `, yt = i.div`
2269
+ `, ht = s.div`
2248
2270
  padding: ${({ theme: o }) => o.spacing[4]};
2249
2271
  border-top: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
2250
2272
  `;
2251
- function ht({
2273
+ function wt({
2252
2274
  title: o,
2253
2275
  children: r,
2254
2276
  defaultOpen: n = !1,
2255
- open: s,
2277
+ open: e,
2256
2278
  onToggle: a,
2257
2279
  subtitle: l,
2258
2280
  headerActions: d,
2259
2281
  accentColor: p
2260
2282
  }) {
2261
- const [u, f] = T(n), g = ro(), m = s !== void 0, v = m ? s : u;
2262
- return /* @__PURE__ */ S(lt, { $accentColor: p, children: [
2283
+ const [u, f] = T(n), $ = ro(), m = e !== void 0, v = m ? e : u;
2284
+ return /* @__PURE__ */ S(ct, { $accentColor: p, children: [
2263
2285
  /* @__PURE__ */ S(
2264
- ct,
2286
+ dt,
2265
2287
  {
2266
2288
  type: "button",
2267
2289
  $open: v,
2268
2290
  $accentColor: p,
2269
2291
  "aria-expanded": v,
2270
- "aria-controls": g,
2292
+ "aria-controls": $,
2271
2293
  onClick: () => {
2272
2294
  const k = !v;
2273
2295
  m || f(k), a?.(k);
2274
2296
  },
2275
2297
  children: [
2276
- /* @__PURE__ */ S(dt, { children: [
2277
- /* @__PURE__ */ e(ut, { children: o }),
2278
- (l || d) && /* @__PURE__ */ S(ft, { children: [
2279
- l && /* @__PURE__ */ e(pt, { children: l }),
2280
- d && /* @__PURE__ */ e($t, { onClick: (k) => k.stopPropagation(), children: d })
2298
+ /* @__PURE__ */ S(ut, { children: [
2299
+ /* @__PURE__ */ i(pt, { children: o }),
2300
+ (l || d) && /* @__PURE__ */ S(gt, { children: [
2301
+ l && /* @__PURE__ */ i(ft, { children: l }),
2302
+ d && /* @__PURE__ */ i($t, { onClick: (k) => k.stopPropagation(), children: d })
2281
2303
  ] })
2282
2304
  ] }),
2283
- /* @__PURE__ */ e(
2284
- gt,
2305
+ /* @__PURE__ */ i(
2306
+ bt,
2285
2307
  {
2286
2308
  $open: v,
2287
2309
  $accentColor: p,
2288
2310
  "aria-hidden": "true",
2289
- children: /* @__PURE__ */ e(Ko, { size: 18, strokeWidth: 2.5 })
2311
+ children: /* @__PURE__ */ i(Ko, { size: 18, strokeWidth: 2.5 })
2290
2312
  }
2291
2313
  )
2292
2314
  ]
2293
2315
  }
2294
2316
  ),
2295
- /* @__PURE__ */ e(bt, { $open: v, children: /* @__PURE__ */ e(xt, { id: g, role: "region", "aria-label": o, children: /* @__PURE__ */ e(yt, { children: r }) }) })
2317
+ /* @__PURE__ */ i(xt, { $open: v, children: /* @__PURE__ */ i(yt, { id: $, role: "region", "aria-label": o, children: /* @__PURE__ */ i(ht, { children: r }) }) })
2296
2318
  ] });
2297
2319
  }
2298
- ht.displayName = "CollapsibleCard";
2299
- const wt = oo`
2320
+ wt.displayName = "CollapsibleCard";
2321
+ const mt = oo`
2300
2322
  to { transform: rotate(360deg); }
2301
- `, mt = {
2323
+ `, vt = {
2302
2324
  sm: "16px",
2303
2325
  md: "24px",
2304
2326
  lg: "40px"
2305
- }, vt = {
2327
+ }, kt = {
2306
2328
  thin: "2px",
2307
2329
  normal: "3px",
2308
2330
  bold: "5px"
2309
- }, kt = i.span`
2331
+ }, St = s.span`
2310
2332
  display: inline-block;
2311
2333
  border-radius: 50%;
2312
- animation: ${wt} 0.7s linear infinite;
2334
+ animation: ${mt} 0.7s linear infinite;
2313
2335
 
2314
- ${({ $size: o = "md", $weight: r = "normal", $color: n, theme: s }) => {
2315
- const a = mt[o], l = vt[r], d = s.colors.neutral[200], p = n ?? s.colors.primary[500];
2336
+ ${({ $size: o = "md", $weight: r = "normal", $color: n, theme: e }) => {
2337
+ const a = vt[o], l = kt[r], d = e.colors.neutral[200], p = n ?? e.colors.primary[500];
2316
2338
  return t`
2317
2339
  width: ${a};
2318
2340
  height: ${a};
@@ -2321,84 +2343,84 @@ const wt = oo`
2321
2343
  `;
2322
2344
  }}
2323
2345
  `;
2324
- function St({
2346
+ function zt({
2325
2347
  size: o = "md",
2326
2348
  weight: r = "normal",
2327
2349
  color: n,
2328
- label: s = "Loading..."
2350
+ label: e = "Loading..."
2329
2351
  }) {
2330
- return /* @__PURE__ */ e(
2331
- kt,
2352
+ return /* @__PURE__ */ i(
2353
+ St,
2332
2354
  {
2333
2355
  $size: o,
2334
2356
  $weight: r,
2335
2357
  $color: n,
2336
2358
  role: "status",
2337
- "aria-label": s
2359
+ "aria-label": e
2338
2360
  }
2339
2361
  );
2340
2362
  }
2341
- St.displayName = "Spinner";
2342
- const zt = 7, Fo = 3, Ao = 1;
2343
- function Is({
2363
+ zt.displayName = "Spinner";
2364
+ const Ct = 7, Bo = 3, Fo = 1;
2365
+ function Te({
2344
2366
  defaultSort: o,
2345
2367
  defaultPage: r = 1
2346
2368
  } = {}) {
2347
- const [n, s] = T(o ?? null), [a, l] = T(r);
2369
+ const [n, e] = T(o ?? null), [a, l] = T(r);
2348
2370
  return { sort: n, page: a, onSortChange: (u) => {
2349
- s(u), l(1);
2371
+ e(u), l(1);
2350
2372
  }, onPageChange: (u) => {
2351
2373
  l(u);
2352
2374
  } };
2353
2375
  }
2354
- function Ct(o, r) {
2376
+ function It(o, r) {
2355
2377
  return o?.key !== r ? { key: r, direction: "asc" } : o.direction === "asc" ? { key: r, direction: "desc" } : null;
2356
2378
  }
2357
- function It({
2379
+ function Tt({
2358
2380
  data: o,
2359
2381
  sort: r,
2360
2382
  defaultSort: n,
2361
- onSortChange: s
2383
+ onSortChange: e
2362
2384
  }) {
2363
2385
  const a = r !== void 0, [l, d] = T(
2364
2386
  n ?? null
2365
- ), p = a ? r ?? null : l, u = (g) => {
2366
- const m = Ct(p, g);
2367
- return a || d(m), s?.(m), m;
2368
- }, f = Do(() => a || !p ? o : [...o].sort((g, m) => {
2369
- const v = g[p.key], h = m[p.key], k = v < h ? -1 : v > h ? 1 : 0;
2387
+ ), p = a ? r ?? null : l, u = ($) => {
2388
+ const m = It(p, $);
2389
+ return a || d(m), e?.(m), m;
2390
+ }, f = Eo(() => a || !p ? o : [...o].sort(($, m) => {
2391
+ const v = $[p.key], y = m[p.key], k = v < y ? -1 : v > y ? 1 : 0;
2370
2392
  return p.direction === "asc" ? k : -k;
2371
2393
  }), [o, p, a]);
2372
2394
  return { activeSort: p, sortedData: f, handleSort: u };
2373
2395
  }
2374
- function Tt(o, r) {
2375
- if (r <= zt)
2376
- return Array.from({ length: r }, (s, a) => a + 1);
2396
+ function Wt(o, r) {
2397
+ if (r <= Ct)
2398
+ return Array.from({ length: r }, (e, a) => a + 1);
2377
2399
  const n = [1];
2378
- o > Fo && n.push("...");
2379
- for (let s = Math.max(2, o - Ao); s <= Math.min(r - 1, o + Ao); s++)
2380
- n.push(s);
2381
- return o < r - Fo + 1 && n.push("..."), n.push(r), n;
2400
+ o > Bo && n.push("...");
2401
+ for (let e = Math.max(2, o - Fo); e <= Math.min(r - 1, o + Fo); e++)
2402
+ n.push(e);
2403
+ return o < r - Bo + 1 && n.push("..."), n.push(r), n;
2382
2404
  }
2383
- function Wt({
2405
+ function Dt({
2384
2406
  data: o,
2385
2407
  pageSize: r,
2386
2408
  page: n,
2387
- defaultPage: s,
2409
+ defaultPage: e,
2388
2410
  totalRows: a,
2389
2411
  onPageChange: l
2390
2412
  }) {
2391
- const d = n !== void 0, [p, u] = T(s ?? 1), f = d ? n : p, g = (C) => {
2413
+ const d = n !== void 0, [p, u] = T(e ?? 1), f = d ? n : p, $ = (C) => {
2392
2414
  d || u(C), l?.(C);
2393
- }, m = a !== void 0, v = a ?? o.length, h = r ? Math.max(1, Math.ceil(v / r)) : 1, k = Do(() => {
2415
+ }, m = a !== void 0, v = a ?? o.length, y = r ? Math.max(1, Math.ceil(v / r)) : 1, k = Eo(() => {
2394
2416
  if (!r || m)
2395
2417
  return o;
2396
2418
  const C = (f - 1) * r;
2397
2419
  return o.slice(C, C + r);
2398
2420
  }, [o, r, f, m]);
2399
- return { activePage: f, totalPages: h, displayData: k, handlePageChange: g };
2421
+ return { activePage: f, totalPages: y, displayData: k, handlePageChange: $ };
2400
2422
  }
2401
- const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg" ? `${r.spacing[3]} ${r.spacing[4]}` : `${r.spacing[2]} ${r.spacing[3]}`, Dt = i.div`
2423
+ const ir = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg" ? `${r.spacing[3]} ${r.spacing[4]}` : `${r.spacing[2]} ${r.spacing[3]}`, Et = s.div`
2402
2424
  width: 100%;
2403
2425
 
2404
2426
  ${({ theme: o, $borderColor: r }) => o.brutalism ? t`
@@ -2419,11 +2441,12 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2419
2441
  ` : t`
2420
2442
  overflow-x: auto;
2421
2443
  `}
2422
- `, Et = i.div`
2444
+ `, Ot = s.div`
2423
2445
  overflow: auto;
2424
2446
  min-height: 0;
2425
- `, Ot = i.table`
2426
- width: 100%;
2447
+ `, Mt = s.table`
2448
+ width: max-content;
2449
+ min-width: 100%;
2427
2450
  border-collapse: collapse;
2428
2451
  font-size: ${({ $size: o, theme: r }) => ({
2429
2452
  sm: r.fontSizes.sm,
@@ -2434,7 +2457,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2434
2457
  caption {
2435
2458
  padding: ${({ theme: o }) => o.spacing[2]} 0;
2436
2459
  }
2437
- `, Mt = i.thead`
2460
+ `, Lt = s.thead`
2438
2461
  ${({ $stickyHeader: o }) => o && t`
2439
2462
  position: sticky;
2440
2463
  top: 0;
@@ -2454,7 +2477,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2454
2477
  --th-text: ${o.colors.neutral[600]};
2455
2478
  --th-sep: ${n ?? o.colors.neutral[300]};
2456
2479
  `}
2457
- `, Lt = i.tbody`
2480
+ `, Nt = s.tbody`
2458
2481
  ${({ $rowColor: o }) => o && t`
2459
2482
  tr {
2460
2483
  background-color: ${o};
@@ -2474,7 +2497,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2474
2497
  tr:hover td {
2475
2498
  background-color: rgba(0, 0, 0, 0.04);
2476
2499
  }
2477
- `, bo = i.tr``, Nt = i(bo)`
2500
+ `, xo = s.tr``, Pt = s(xo)`
2478
2501
  cursor: pointer;
2479
2502
 
2480
2503
  td {
@@ -2491,14 +2514,14 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2491
2514
  box-shadow: inset 4px 0 0
2492
2515
  ${({ $accentColor: o, theme: r }) => o ?? r.colors.neutral[900]};
2493
2516
  }
2494
- `, Pt = i.th`
2517
+ `, Rt = s.th`
2495
2518
  background-color: var(--th-bg);
2496
2519
  color: var(--th-text);
2497
2520
  text-align: left;
2498
2521
  font-weight: ${({ theme: o }) => o.fontWeights.bold};
2499
2522
  white-space: nowrap;
2500
2523
 
2501
- padding: ${({ $size: o, theme: r }) => er(o, r)};
2524
+ padding: ${({ $size: o, theme: r }) => ir(o, r)};
2502
2525
 
2503
2526
  ${({ theme: o, $bordered: r }) => o.brutalism ? t`` : t`
2504
2527
  border-bottom: 2px solid var(--th-sep);
@@ -2509,7 +2532,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2509
2532
  }
2510
2533
  `}
2511
2534
  `}
2512
- `, Rt = i.button`
2535
+ `, Vt = s.button`
2513
2536
  display: inline-flex;
2514
2537
  align-items: center;
2515
2538
  gap: ${({ theme: o }) => o.spacing[1]};
@@ -2528,12 +2551,12 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2528
2551
  outline-offset: 2px;
2529
2552
  border-radius: 2px;
2530
2553
  }
2531
- `, Vt = i.span`
2554
+ `, Bt = s.span`
2532
2555
  opacity: 0.5;
2533
2556
  display: inline-flex;
2534
2557
  align-items: center;
2535
- `, ir = i.td`
2536
- padding: ${({ $size: o, theme: r }) => er(o, r)};
2558
+ `, ar = s.td`
2559
+ padding: ${({ $size: o, theme: r }) => ir(o, r)};
2537
2560
 
2538
2561
  ${({ $bordered: o, $borderColor: r, theme: n }) => n.brutalism ? t`
2539
2562
  border-bottom: ${n.brutalism.borderWidth} solid
@@ -2551,7 +2574,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2551
2574
  border-bottom: 1px solid
2552
2575
  ${r ?? n.colors.neutral[200]};
2553
2576
  `}
2554
- `, Ft = i.td`
2577
+ `, Ft = s.td`
2555
2578
  text-align: center;
2556
2579
  color: ${({ theme: o }) => o.colors.neutral[400]};
2557
2580
  padding: ${({ theme: o }) => `${o.spacing[4]} ${o.spacing[3]}`};
@@ -2560,7 +2583,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2560
2583
  `, At = oo`
2561
2584
  0% { background-position: -400px 0; }
2562
2585
  100% { background-position: 400px 0; }
2563
- `, Bt = i(ir)``, _t = i.div`
2586
+ `, _t = s(ar)``, jt = s.div`
2564
2587
  height: 14px;
2565
2588
  border-radius: 4px;
2566
2589
  background: linear-gradient(
@@ -2571,13 +2594,14 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2571
2594
  );
2572
2595
  background-size: 800px 100%;
2573
2596
  animation: ${At} 1.6s ease-in-out infinite;
2574
- `, jt = i.div`
2597
+ `, Ht = s.div`
2575
2598
  display: flex;
2576
2599
  align-items: center;
2577
2600
  justify-content: ${({ $hasPageSizeOptions: o }) => o ? "space-between" : "center"};
2578
2601
  gap: ${({ theme: o }) => o.spacing[1]};
2579
2602
  padding: ${({ theme: o }) => `${o.spacing[2]} ${o.spacing[3]}`};
2580
2603
  flex-shrink: 0;
2604
+ flex-wrap: wrap;
2581
2605
 
2582
2606
  ${({ theme: o }) => o.brutalism ? t`
2583
2607
  border-top: ${o.brutalism.borderWidth} solid
@@ -2585,7 +2609,7 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2585
2609
  ` : t`
2586
2610
  border-top: 1px solid ${o.colors.neutral[200]};
2587
2611
  `}
2588
- `, Ht = i.label`
2612
+ `, Ut = s.label`
2589
2613
  display: flex;
2590
2614
  align-items: center;
2591
2615
  gap: ${({ theme: o }) => o.spacing[2]};
@@ -2618,11 +2642,13 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2618
2642
  }
2619
2643
  `}
2620
2644
  }
2621
- `, Yt = i.div`
2645
+ `, Yt = s.div`
2622
2646
  display: flex;
2623
2647
  align-items: center;
2624
2648
  gap: ${({ theme: o }) => o.spacing[1]};
2625
- `, vo = i.button`
2649
+ flex-wrap: wrap;
2650
+ justify-content: center;
2651
+ `, ko = s.button`
2626
2652
  display: inline-flex;
2627
2653
  align-items: center;
2628
2654
  justify-content: center;
@@ -2665,25 +2691,25 @@ const er = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
2665
2691
  outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
2666
2692
  outline-offset: 2px;
2667
2693
  }
2668
- `, Ut = 4;
2669
- function Kt(o, r) {
2670
- return o?.key !== r ? /* @__PURE__ */ e(Vr, { size: 14 }) : o.direction === "asc" ? /* @__PURE__ */ e(Ar, { size: 14 }) : /* @__PURE__ */ e(Pr, { size: 14 });
2694
+ `, Kt = 4;
2695
+ function qt(o, r) {
2696
+ return o?.key !== r ? /* @__PURE__ */ i(Fr, { size: 14 }) : o.direction === "asc" ? /* @__PURE__ */ i(_r, { size: 14 }) : /* @__PURE__ */ i(Vr, { size: 14 });
2671
2697
  }
2672
- function qt({
2698
+ function Gt({
2673
2699
  columns: o,
2674
2700
  data: r,
2675
2701
  rowKey: n,
2676
- size: s = "md",
2702
+ size: e = "md",
2677
2703
  striped: a,
2678
2704
  bordered: l,
2679
2705
  stickyHeader: d,
2680
2706
  stickyPagination: p,
2681
2707
  caption: u,
2682
2708
  emptyMessage: f = "No data",
2683
- loading: g,
2709
+ loading: $,
2684
2710
  sort: m,
2685
2711
  defaultSort: v,
2686
- onSortChange: h,
2712
+ onSortChange: y,
2687
2713
  pageSize: k,
2688
2714
  page: C,
2689
2715
  defaultPage: M,
@@ -2694,113 +2720,114 @@ function qt({
2694
2720
  onChange: w,
2695
2721
  onRowClick: b,
2696
2722
  borderColor: z,
2697
- headerColor: D,
2698
- rowColor: W,
2723
+ headerColor: E,
2724
+ rowColor: D,
2699
2725
  stripeColor: N,
2700
2726
  className: F,
2701
- style: _
2727
+ style: B
2702
2728
  }) {
2703
2729
  const {
2704
2730
  activeSort: V,
2705
- sortedData: U,
2706
- handleSort: io
2707
- } = It({
2731
+ sortedData: q,
2732
+ handleSort: ao
2733
+ } = Tt({
2708
2734
  data: r,
2709
2735
  sort: m,
2710
2736
  defaultSort: v,
2711
- onSortChange: h
2737
+ onSortChange: y
2712
2738
  }), {
2713
2739
  activePage: O,
2714
2740
  totalPages: H,
2715
- displayData: ao,
2716
- handlePageChange: K
2717
- } = Wt({
2718
- data: U,
2741
+ displayData: lo,
2742
+ handlePageChange: G
2743
+ } = Dt({
2744
+ data: q,
2719
2745
  pageSize: k,
2720
2746
  page: C,
2721
2747
  defaultPage: M,
2722
2748
  totalRows: P,
2723
2749
  onPageChange: L
2724
- }), to = (y) => {
2725
- const A = io(y);
2750
+ }), no = (h) => {
2751
+ const A = ao(h);
2726
2752
  w?.({ sort: A, page: O });
2727
- }, J = (y) => {
2728
- K(y), w?.({ sort: V, page: y });
2729
- }, lo = (y, A) => String(n ? y[n] : A), j = !g && ao.length === 0, q = k ?? Ut, Q = !!k && H > 1, Z = !!x?.length, so = /* @__PURE__ */ S(Ot, { $size: s, children: [
2730
- u && /* @__PURE__ */ e("caption", { children: u }),
2731
- /* @__PURE__ */ e(
2732
- Mt,
2753
+ }, J = (h) => {
2754
+ G(h), w?.({ sort: V, page: h });
2755
+ }, co = (h, A) => String(n ? h[n] : A), j = !$ && lo.length === 0, U = k ?? Kt, Q = !!k && H > 1, Z = !!x?.length, eo = /* @__PURE__ */ S(Mt, { $size: e, children: [
2756
+ u && /* @__PURE__ */ i("caption", { children: u }),
2757
+ /* @__PURE__ */ i(
2758
+ Lt,
2733
2759
  {
2734
- $headerColor: D,
2760
+ $headerColor: E,
2735
2761
  $borderColor: z,
2736
2762
  $stickyHeader: d,
2737
- children: /* @__PURE__ */ e(bo, { children: o.map((y) => /* @__PURE__ */ e(
2738
- Pt,
2763
+ children: /* @__PURE__ */ i(xo, { children: o.map((h) => /* @__PURE__ */ i(
2764
+ Rt,
2739
2765
  {
2740
- $size: s,
2766
+ $size: e,
2741
2767
  $bordered: l,
2742
2768
  scope: "col",
2743
- style: y.width ? { width: y.width } : void 0,
2744
- children: y.sortable ? /* @__PURE__ */ S(
2745
- Rt,
2769
+ style: h.width ? { width: h.width } : void 0,
2770
+ children: h.sortable ? /* @__PURE__ */ S(
2771
+ Vt,
2746
2772
  {
2747
2773
  type: "button",
2748
- onClick: () => to(y.key),
2749
- "aria-label": `Sort by ${y.header}${V?.key === y.key ? `, ${V.direction}ending` : ""}`,
2774
+ onClick: () => no(h.key),
2775
+ "aria-label": `Sort by ${h.header}${V?.key === h.key ? `, ${V.direction}ending` : ""}`,
2750
2776
  children: [
2751
- y.header,
2752
- /* @__PURE__ */ e(Vt, { "aria-hidden": "true", children: Kt(V, y.key) })
2777
+ h.header,
2778
+ /* @__PURE__ */ i(Bt, { "aria-hidden": "true", children: qt(V, h.key) })
2753
2779
  ]
2754
2780
  }
2755
- ) : y.header
2781
+ ) : h.header
2756
2782
  },
2757
- y.key
2783
+ h.key
2758
2784
  )) })
2759
2785
  }
2760
2786
  ),
2761
- /* @__PURE__ */ e(Lt, { $striped: a, $rowColor: W, $stripeColor: N, children: g ? Array.from({ length: q }).map((y, A) => /* @__PURE__ */ e(bo, { children: o.map((co) => /* @__PURE__ */ e(
2762
- Bt,
2787
+ /* @__PURE__ */ i(Nt, { $striped: a, $rowColor: D, $stripeColor: N, children: $ ? Array.from({ length: U }).map((h, A) => /* @__PURE__ */ i(xo, { children: o.map((uo) => /* @__PURE__ */ i(
2788
+ _t,
2763
2789
  {
2764
- $size: s,
2790
+ $size: e,
2765
2791
  $bordered: l,
2766
2792
  $borderColor: z,
2767
- children: /* @__PURE__ */ e(_t, {})
2793
+ children: /* @__PURE__ */ i(jt, {})
2768
2794
  },
2769
- co.key
2770
- )) }, A)) : j ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(Ft, { colSpan: o.length, children: f }) }) : ao.map((y, A) => /* @__PURE__ */ e(
2771
- b ? Nt : bo,
2795
+ uo.key
2796
+ )) }, A)) : j ? /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(Ft, { colSpan: o.length, children: f }) }) : lo.map((h, A) => /* @__PURE__ */ i(
2797
+ b ? Pt : xo,
2772
2798
  {
2773
- onClick: b ? () => b(y) : void 0,
2799
+ onClick: b ? () => b(h) : void 0,
2774
2800
  $accentColor: b ? z : void 0,
2775
- children: o.map(($) => /* @__PURE__ */ e(
2776
- ir,
2801
+ children: o.map((g) => /* @__PURE__ */ i(
2802
+ ar,
2777
2803
  {
2778
- $size: s,
2804
+ $size: e,
2779
2805
  $bordered: l,
2780
2806
  $borderColor: z,
2781
- children: $.render ? $.render(y[$.key], y, A) : String(y[$.key] ?? "") || " "
2807
+ children: g.render ? g.render(h[g.key], h, A) : String(h[g.key] ?? "") || " "
2782
2808
  },
2783
- $.key
2809
+ g.key
2784
2810
  ))
2785
2811
  },
2786
- lo(y, A)
2812
+ co(h, A)
2787
2813
  )) })
2788
- ] }), eo = (Q || Z) && /* @__PURE__ */ S(jt, { $hasPageSizeOptions: Z, children: [
2789
- Z && /* @__PURE__ */ S(Ht, { children: [
2814
+ ] }), so = (Q || Z) && /* @__PURE__ */ S(Ht, { $hasPageSizeOptions: Z, children: [
2815
+ Z && /* @__PURE__ */ S(Ut, { children: [
2790
2816
  "Rows per page:",
2791
- /* @__PURE__ */ e(
2792
- "select",
2817
+ /* @__PURE__ */ i(
2818
+ qo,
2793
2819
  {
2794
- value: k,
2795
- onChange: (y) => I?.(Number(y.target.value)),
2796
- "aria-label": "Rows per page",
2797
- children: x.map((y) => /* @__PURE__ */ e("option", { value: y, children: y }, y))
2820
+ size: "sm",
2821
+ value: String(k),
2822
+ options: x.map((h) => ({ value: String(h), label: String(h) })),
2823
+ onChange: (h) => I?.(Number(h.target.value)),
2824
+ "aria-label": "Rows per page"
2798
2825
  }
2799
2826
  )
2800
2827
  ] }),
2801
2828
  Q && /* @__PURE__ */ S(Yt, { children: [
2802
- /* @__PURE__ */ e(
2803
- vo,
2829
+ /* @__PURE__ */ i(
2830
+ ko,
2804
2831
  {
2805
2832
  type: "button",
2806
2833
  onClick: () => J(O - 1),
@@ -2809,8 +2836,8 @@ function qt({
2809
2836
  children: "←"
2810
2837
  }
2811
2838
  ),
2812
- Tt(O, H).map(
2813
- (y, A) => y === "..." ? /* @__PURE__ */ e(
2839
+ Wt(O, H).map(
2840
+ (h, A) => h === "..." ? /* @__PURE__ */ i(
2814
2841
  "span",
2815
2842
  {
2816
2843
  "aria-hidden": "true",
@@ -2818,21 +2845,21 @@ function qt({
2818
2845
  children: "…"
2819
2846
  },
2820
2847
  `e${A}`
2821
- ) : /* @__PURE__ */ e(
2822
- vo,
2848
+ ) : /* @__PURE__ */ i(
2849
+ ko,
2823
2850
  {
2824
2851
  type: "button",
2825
- $active: y === O,
2826
- onClick: () => J(y),
2827
- "aria-label": `Page ${y}`,
2828
- "aria-current": y === O ? "page" : void 0,
2829
- children: y
2852
+ $active: h === O,
2853
+ onClick: () => J(h),
2854
+ "aria-label": `Page ${h}`,
2855
+ "aria-current": h === O ? "page" : void 0,
2856
+ children: h
2830
2857
  },
2831
- y
2858
+ h
2832
2859
  )
2833
2860
  ),
2834
- /* @__PURE__ */ e(
2835
- vo,
2861
+ /* @__PURE__ */ i(
2862
+ ko,
2836
2863
  {
2837
2864
  type: "button",
2838
2865
  onClick: () => J(O + 1),
@@ -2844,26 +2871,26 @@ function qt({
2844
2871
  ] })
2845
2872
  ] });
2846
2873
  return /* @__PURE__ */ S(
2847
- Dt,
2874
+ Et,
2848
2875
  {
2849
2876
  $borderColor: z,
2850
2877
  $stickyPagination: p,
2851
2878
  className: F,
2852
- style: _,
2879
+ style: B,
2853
2880
  children: [
2854
- p ? /* @__PURE__ */ e(Et, { children: so }) : so,
2855
- eo
2881
+ p ? /* @__PURE__ */ i(Ot, { children: eo }) : eo,
2882
+ so
2856
2883
  ]
2857
2884
  }
2858
2885
  );
2859
2886
  }
2860
- qt.displayName = "Table";
2861
- const Gt = i.p`
2887
+ Gt.displayName = "Table";
2888
+ const Xt = s.p`
2862
2889
  margin: 0;
2863
2890
  font-size: ${({ theme: o }) => o.fontSizes.md};
2864
2891
  color: ${({ theme: o }) => o.colors.neutral[600]};
2865
2892
  line-height: 1.5;
2866
- `, Xt = i.button`
2893
+ `, Jt = s.button`
2867
2894
  display: inline-flex;
2868
2895
  align-items: center;
2869
2896
  justify-content: center;
@@ -2904,47 +2931,47 @@ const Gt = i.p`
2904
2931
  }
2905
2932
  `}
2906
2933
  `;
2907
- function ar({
2934
+ function lr({
2908
2935
  open: o,
2909
2936
  title: r = "Are you sure?",
2910
2937
  message: n,
2911
- confirmLabel: s = "Confirm",
2938
+ confirmLabel: e = "Confirm",
2912
2939
  cancelLabel: a = "Cancel",
2913
2940
  variant: l = "default",
2914
2941
  size: d = "sm",
2915
2942
  onConfirm: p,
2916
2943
  onCancel: u
2917
2944
  }) {
2918
- return /* @__PURE__ */ e(
2919
- Go,
2945
+ return /* @__PURE__ */ i(
2946
+ Xo,
2920
2947
  {
2921
2948
  open: o,
2922
2949
  onClose: u,
2923
2950
  title: r,
2924
2951
  size: d,
2925
2952
  closeOnBackdrop: !1,
2926
- footer: /* @__PURE__ */ S(dr, { children: [
2927
- /* @__PURE__ */ e(Co, { variant: "outline", onClick: u, children: a }),
2928
- l === "danger" ? /* @__PURE__ */ e(Xt, { type: "button", onClick: p, children: s }) : /* @__PURE__ */ e(Co, { variant: "primary", onClick: p, children: s })
2953
+ footer: /* @__PURE__ */ S(ur, { children: [
2954
+ /* @__PURE__ */ i(Io, { variant: "outline", onClick: u, children: a }),
2955
+ l === "danger" ? /* @__PURE__ */ i(Jt, { type: "button", onClick: p, children: e }) : /* @__PURE__ */ i(Io, { variant: "primary", onClick: p, children: e })
2929
2956
  ] }),
2930
- children: /* @__PURE__ */ e(Gt, { children: n })
2957
+ children: /* @__PURE__ */ i(Xt, { children: n })
2931
2958
  }
2932
2959
  );
2933
2960
  }
2934
- ar.displayName = "ConfirmDialog";
2935
- const lr = Wo(null);
2936
- function Ts({ children: o }) {
2937
- const [r, n] = T(null), s = X((d) => new Promise((p) => {
2961
+ lr.displayName = "ConfirmDialog";
2962
+ const cr = Do(null);
2963
+ function We({ children: o }) {
2964
+ const [r, n] = T(null), e = X((d) => new Promise((p) => {
2938
2965
  n({ ...d, resolve: p });
2939
2966
  }), []), a = () => {
2940
2967
  r?.resolve(!0), n(null);
2941
2968
  }, l = () => {
2942
2969
  r?.resolve(!1), n(null);
2943
2970
  };
2944
- return /* @__PURE__ */ S(lr.Provider, { value: { confirm: s }, children: [
2971
+ return /* @__PURE__ */ S(cr.Provider, { value: { confirm: e }, children: [
2945
2972
  o,
2946
- r && /* @__PURE__ */ e(
2947
- ar,
2973
+ r && /* @__PURE__ */ i(
2974
+ lr,
2948
2975
  {
2949
2976
  open: !0,
2950
2977
  title: r.title,
@@ -2959,18 +2986,18 @@ function Ts({ children: o }) {
2959
2986
  )
2960
2987
  ] });
2961
2988
  }
2962
- function Ws() {
2963
- const o = To(lr);
2989
+ function De() {
2990
+ const o = Wo(cr);
2964
2991
  if (!o)
2965
2992
  throw new Error("useConfirm must be used within a ConfirmProvider");
2966
2993
  return o.confirm;
2967
2994
  }
2968
- const Jt = i.div`
2995
+ const Qt = s.div`
2969
2996
  position: relative;
2970
2997
  display: inline-flex;
2971
2998
  flex-direction: column;
2972
2999
  gap: ${({ theme: o }) => o.spacing[1]};
2973
- `, Qt = i.div`
3000
+ `, Zt = s.div`
2974
3001
  display: flex;
2975
3002
  align-items: center;
2976
3003
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -3019,19 +3046,19 @@ const Jt = i.div`
3019
3046
  outline: none;
3020
3047
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
3021
3048
  }
3022
- `, Zt = i.span`
3049
+ `, oe = s.span`
3023
3050
  flex: 1;
3024
3051
  color: ${({ $hasValue: o, theme: r }) => o ? r.colors.neutral[900] : r.colors.neutral[400]};
3025
3052
  white-space: nowrap;
3026
3053
  overflow: hidden;
3027
3054
  text-overflow: ellipsis;
3028
- `, os = i.span`
3055
+ `, re = s.span`
3029
3056
  display: inline-flex;
3030
3057
  align-items: center;
3031
3058
  margin-left: ${({ theme: o }) => o.spacing[2]};
3032
3059
  color: ${({ theme: o }) => o.colors.neutral[500]};
3033
3060
  flex-shrink: 0;
3034
- `, rs = i.button`
3061
+ `, ne = s.button`
3035
3062
  display: inline-flex;
3036
3063
  align-items: center;
3037
3064
  margin-left: ${({ theme: o }) => o.spacing[2]};
@@ -3052,11 +3079,11 @@ const Jt = i.div`
3052
3079
  border-radius: 2px;
3053
3080
  }
3054
3081
  `;
3055
- i.span`
3082
+ s.span`
3056
3083
  font-size: ${({ theme: o }) => o.fontSizes.xs};
3057
3084
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
3058
3085
  `;
3059
- const ns = i.div`
3086
+ const te = s.div`
3060
3087
  position: absolute;
3061
3088
  top: calc(100% + 4px);
3062
3089
  left: 0;
@@ -3075,12 +3102,12 @@ const ns = i.div`
3075
3102
  border: 1px solid ${o.colors.neutral[200]};
3076
3103
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
3077
3104
  `}
3078
- `, ts = i.div`
3105
+ `, ee = s.div`
3079
3106
  display: flex;
3080
3107
  align-items: center;
3081
3108
  justify-content: space-between;
3082
3109
  margin-bottom: ${({ theme: o }) => o.spacing[3]};
3083
- `, Bo = i.button`
3110
+ `, Ao = s.button`
3084
3111
  display: inline-flex;
3085
3112
  align-items: center;
3086
3113
  justify-content: center;
@@ -3110,15 +3137,15 @@ const ns = i.div`
3110
3137
  transform: translate(1px, 1px);
3111
3138
  }
3112
3139
  `}
3113
- `, ss = i.span`
3140
+ `, se = s.span`
3114
3141
  font-weight: ${({ theme: o }) => o.fontWeights.semibold};
3115
3142
  font-size: ${({ theme: o }) => o.fontSizes.md};
3116
3143
  color: ${({ theme: o }) => o.colors.neutral[900]};
3117
- `, es = i.div`
3144
+ `, ie = s.div`
3118
3145
  display: grid;
3119
3146
  grid-template-columns: repeat(7, 1fr);
3120
3147
  gap: ${({ theme: o }) => o.spacing[0.5]};
3121
- `, is = i.span`
3148
+ `, ae = s.span`
3122
3149
  display: flex;
3123
3150
  align-items: center;
3124
3151
  justify-content: center;
@@ -3127,7 +3154,7 @@ const ns = i.div`
3127
3154
  color: ${({ theme: o }) => o.colors.neutral[500]};
3128
3155
  padding: ${({ theme: o }) => o.spacing[1]};
3129
3156
  margin-bottom: ${({ theme: o }) => o.spacing[0.5]};
3130
- `, ko = i.button`
3157
+ `, So = s.button`
3131
3158
  display: flex;
3132
3159
  align-items: center;
3133
3160
  justify-content: center;
@@ -3142,32 +3169,32 @@ const ns = i.div`
3142
3169
  $today: o,
3143
3170
  $selected: r,
3144
3171
  $rangeStart: n,
3145
- $rangeEnd: s,
3172
+ $rangeEnd: e,
3146
3173
  $inRange: a,
3147
3174
  theme: l
3148
- }) => o || r || n || s ? l.fontWeights.semibold : l.fontWeights.normal};
3175
+ }) => o || r || n || e ? l.fontWeights.semibold : l.fontWeights.normal};
3149
3176
  pointer-events: ${({ $currentMonth: o }) => o ? "auto" : "none"};
3150
3177
 
3151
3178
  color: ${({
3152
3179
  $currentMonth: o,
3153
3180
  $selected: r,
3154
3181
  $today: n,
3155
- $rangeStart: s,
3182
+ $rangeStart: e,
3156
3183
  $rangeEnd: a,
3157
3184
  theme: l
3158
- }) => o ? r || s || a ? l.colors.primary.contrast : n ? l.colors.primary[500] : l.colors.neutral[900] : l.colors.neutral[300]};
3185
+ }) => o ? r || e || a ? l.colors.primary.contrast : n ? l.colors.primary[500] : l.colors.neutral[900] : l.colors.neutral[300]};
3159
3186
 
3160
3187
  background-color: ${({
3161
3188
  $selected: o,
3162
3189
  $rangeStart: r,
3163
3190
  $rangeEnd: n,
3164
- $inRange: s,
3191
+ $inRange: e,
3165
3192
  $currentMonth: a,
3166
3193
  theme: l
3167
- }) => a ? o || r || n ? l.colors.primary[500] : s ? l.colors.primary[50] : "transparent" : "transparent"};
3194
+ }) => a ? o || r || n ? l.colors.primary[500] : e ? l.colors.primary[50] : "transparent" : "transparent"};
3168
3195
 
3169
3196
  &:hover:not(:disabled) {
3170
- background-color: ${({ $selected: o, $rangeStart: r, $rangeEnd: n, theme: s }) => o || r || n ? s.colors.primary[700] : s.colors.neutral[100]};
3197
+ background-color: ${({ $selected: o, $rangeStart: r, $rangeEnd: n, theme: e }) => o || r || n ? e.colors.primary[700] : e.colors.neutral[100]};
3171
3198
  }
3172
3199
 
3173
3200
  &:disabled {
@@ -3180,13 +3207,13 @@ const ns = i.div`
3180
3207
  outline-offset: 1px;
3181
3208
  }
3182
3209
 
3183
- ${({ $selected: o, $rangeStart: r, $rangeEnd: n, $today: s, theme: a }) => a.brutalism && (o || r || n || s) && t`
3210
+ ${({ $selected: o, $rangeStart: r, $rangeEnd: n, $today: e, theme: a }) => a.brutalism && (o || r || n || e) && t`
3184
3211
  border: ${a.brutalism.borderWidth} solid ${a.colors.neutral[900]};
3185
3212
  ${(o || r || n) && t`
3186
3213
  box-shadow: 2px 2px 0 ${a.colors.neutral[900]};
3187
3214
  `}
3188
3215
  `}
3189
- `, as = [
3216
+ `, le = [
3190
3217
  "January",
3191
3218
  "February",
3192
3219
  "March",
@@ -3199,33 +3226,33 @@ const ns = i.div`
3199
3226
  "October",
3200
3227
  "November",
3201
3228
  "December"
3202
- ], ls = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
3229
+ ], ce = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
3203
3230
  function _o(o, r) {
3204
3231
  return new Date(o, r + 1, 0).getDate();
3205
3232
  }
3206
- function cs(o, r) {
3233
+ function de(o, r) {
3207
3234
  return new Date(o, r, 1).getDay();
3208
3235
  }
3209
- function fo(o, r) {
3236
+ function go(o, r) {
3210
3237
  return o.getFullYear() === r.getFullYear() && o.getMonth() === r.getMonth() && o.getDate() === r.getDate();
3211
3238
  }
3212
- function ds(o, r, n) {
3239
+ function ue(o, r, n) {
3213
3240
  if (r) {
3214
- const s = new Date(
3241
+ const e = new Date(
3215
3242
  r.getFullYear(),
3216
3243
  r.getMonth(),
3217
3244
  r.getDate()
3218
3245
  );
3219
- if (o < s)
3246
+ if (o < e)
3220
3247
  return !0;
3221
3248
  }
3222
3249
  if (n) {
3223
- const s = new Date(
3250
+ const e = new Date(
3224
3251
  n.getFullYear(),
3225
3252
  n.getMonth(),
3226
3253
  n.getDate()
3227
3254
  );
3228
- if (o > s)
3255
+ if (o > e)
3229
3256
  return !0;
3230
3257
  }
3231
3258
  return !1;
@@ -3245,182 +3272,182 @@ function Ho(o) {
3245
3272
  year: "numeric"
3246
3273
  });
3247
3274
  }
3248
- function So(o) {
3275
+ function zo(o) {
3249
3276
  if (!o)
3250
3277
  return null;
3251
3278
  const r = o.split("-");
3252
3279
  if (r.length !== 3)
3253
3280
  return null;
3254
- const n = parseInt(r[0], 10), s = parseInt(r[1], 10), a = parseInt(r[2], 10);
3255
- return isNaN(n) || isNaN(s) || isNaN(a) ? null : new Date(n, s - 1, a);
3281
+ const n = parseInt(r[0], 10), e = parseInt(r[1], 10), a = parseInt(r[2], 10);
3282
+ return isNaN(n) || isNaN(e) || isNaN(a) ? null : new Date(n, e - 1, a);
3256
3283
  }
3257
- function po(o) {
3258
- const r = o.getFullYear(), n = String(o.getMonth() + 1).padStart(2, "0"), s = String(o.getDate()).padStart(2, "0");
3259
- return `${r}-${n}-${s}`;
3284
+ function fo(o) {
3285
+ const r = o.getFullYear(), n = String(o.getMonth() + 1).padStart(2, "0"), e = String(o.getDate()).padStart(2, "0");
3286
+ return `${r}-${n}-${e}`;
3260
3287
  }
3261
- function us({
3288
+ function pe({
3262
3289
  name: o,
3263
3290
  label: r,
3264
3291
  value: n,
3265
- onChange: s,
3292
+ onChange: e,
3266
3293
  placeholder: a = "Select date...",
3267
3294
  size: l = "md",
3268
3295
  disabled: d = !1,
3269
3296
  clearable: p = !1,
3270
3297
  minDate: u,
3271
3298
  maxDate: f,
3272
- formatDate: g,
3299
+ formatDate: $,
3273
3300
  error: m,
3274
3301
  required: v,
3275
- helperText: h,
3302
+ helperText: y,
3276
3303
  mode: k = "single",
3277
3304
  nameFrom: C,
3278
3305
  nameTo: M,
3279
3306
  valueFrom: P,
3280
3307
  valueTo: L
3281
3308
  }) {
3282
- const x = k === "range", I = So(n ?? ""), w = So(P ?? ""), b = So(L ?? ""), z = /* @__PURE__ */ new Date(), D = () => x ? w ?? b ?? z : I ?? z, [W, N] = T(!1), [F, _] = T(
3283
- () => D().getFullYear()
3284
- ), [V, U] = T(
3285
- () => D().getMonth()
3286
- ), [io, O] = T("from"), H = Y(null);
3287
- B(() => {
3288
- if (!W)
3309
+ const x = k === "range", I = zo(n ?? ""), w = zo(P ?? ""), b = zo(L ?? ""), z = /* @__PURE__ */ new Date(), E = () => x ? w ?? b ?? z : I ?? z, [D, N] = T(!1), [F, B] = T(
3310
+ () => E().getFullYear()
3311
+ ), [V, q] = T(
3312
+ () => E().getMonth()
3313
+ ), [ao, O] = T("from"), H = K(null);
3314
+ _(() => {
3315
+ if (!D)
3289
3316
  return;
3290
- const $ = (R) => {
3317
+ const g = (R) => {
3291
3318
  H.current && !H.current.contains(R.target) && (N(!1), x && O("from"));
3292
3319
  };
3293
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
3294
- }, [W, x]), B(() => {
3295
- !x && I && (_(I.getFullYear()), U(I.getMonth()));
3296
- }, [n, x]), B(() => {
3297
- x && w && (_(w.getFullYear()), U(w.getMonth()));
3320
+ return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
3321
+ }, [D, x]), _(() => {
3322
+ !x && I && (B(I.getFullYear()), q(I.getMonth()));
3323
+ }, [n, x]), _(() => {
3324
+ x && w && (B(w.getFullYear()), q(w.getMonth()));
3298
3325
  }, [P, x]);
3299
- const K = (() => {
3326
+ const G = (() => {
3300
3327
  if (!x)
3301
- return I ? g ? g(I) : jo(I) : "";
3328
+ return I ? $ ? $(I) : jo(I) : "";
3302
3329
  if (!w && !b)
3303
3330
  return "";
3304
- const $ = g ?? jo;
3305
- return w && b ? `${$(w)} - ${$(b)}` : w ? `${$(w)} - ...` : "";
3306
- })(), to = x ? !!(w || b) : !!I, J = ($) => {
3307
- const R = new Date(F, V, $);
3331
+ const g = $ ?? jo;
3332
+ return w && b ? `${g(w)} - ${g(b)}` : w ? `${g(w)} - ...` : "";
3333
+ })(), no = x ? !!(w || b) : !!I, J = (g) => {
3334
+ const R = new Date(F, V, g);
3308
3335
  if (!x) {
3309
- s(o ?? "", po(R)), N(!1);
3336
+ e(o ?? "", fo(R)), N(!1);
3310
3337
  return;
3311
3338
  }
3312
- if (io === "from") {
3313
- s(C ?? "", po(R)), O("to");
3339
+ if (ao === "from") {
3340
+ e(C ?? "", fo(R)), O("to");
3314
3341
  return;
3315
3342
  }
3316
3343
  if (!w) {
3317
- s(C ?? "", po(R)), O("to");
3344
+ e(C ?? "", fo(R)), O("to");
3318
3345
  return;
3319
3346
  }
3320
- if (fo(R, w)) {
3321
- s(C ?? "", ""), s(M ?? "", ""), O("from");
3347
+ if (go(R, w)) {
3348
+ e(C ?? "", ""), e(M ?? "", ""), O("from");
3322
3349
  return;
3323
3350
  }
3324
3351
  if (R >= w) {
3325
- s(M ?? "", po(R)), O("from"), N(!1);
3352
+ e(M ?? "", fo(R)), O("from"), N(!1);
3326
3353
  return;
3327
3354
  }
3328
- s(M ?? "", po(w)), s(C ?? "", po(R)), O("from"), N(!1);
3329
- }, lo = ($) => {
3330
- $.stopPropagation(), x ? (s(C ?? "", ""), s(M ?? "", ""), O("from")) : s(o ?? "", "");
3355
+ e(M ?? "", fo(w)), e(C ?? "", fo(R)), O("from"), N(!1);
3356
+ }, co = (g) => {
3357
+ g.stopPropagation(), x ? (e(C ?? "", ""), e(M ?? "", ""), O("from")) : e(o ?? "", "");
3331
3358
  }, j = () => {
3332
3359
  if (d)
3333
3360
  return;
3334
- const $ = !W;
3335
- N($), !$ && x && O("from");
3336
- }, q = ($) => {
3337
- if (($.key === "Enter" || $.key === " ") && !d) {
3338
- $.preventDefault();
3339
- const R = !W;
3361
+ const g = !D;
3362
+ N(g), !g && x && O("from");
3363
+ }, U = (g) => {
3364
+ if ((g.key === "Enter" || g.key === " ") && !d) {
3365
+ g.preventDefault();
3366
+ const R = !D;
3340
3367
  N(R), !R && x && O("from");
3341
3368
  }
3342
- $.key === "Escape" && (N(!1), x && O("from"));
3369
+ g.key === "Escape" && (N(!1), x && O("from"));
3343
3370
  }, Q = () => {
3344
- V === 0 ? (U(11), _(($) => $ - 1)) : U(($) => $ - 1);
3371
+ V === 0 ? (q(11), B((g) => g - 1)) : q((g) => g - 1);
3345
3372
  }, Z = () => {
3346
- V === 11 ? (U(0), _(($) => $ + 1)) : U(($) => $ + 1);
3347
- }, so = _o(F, V), eo = cs(F, V), y = [], A = _o(
3373
+ V === 11 ? (q(0), B((g) => g + 1)) : q((g) => g + 1);
3374
+ }, eo = _o(F, V), so = de(F, V), h = [], A = _o(
3348
3375
  V === 0 ? F - 1 : F,
3349
3376
  V === 0 ? 11 : V - 1
3350
3377
  );
3351
- for (let $ = eo - 1; $ >= 0; $--)
3352
- y.push({ day: A - $, currentMonth: !1 });
3353
- for (let $ = 1; $ <= so; $++)
3354
- y.push({ day: $, currentMonth: !0 });
3355
- const co = 42 - y.length;
3356
- for (let $ = 1; $ <= co; $++)
3357
- y.push({ day: $, currentMonth: !1 });
3358
- return /* @__PURE__ */ e(
3378
+ for (let g = so - 1; g >= 0; g--)
3379
+ h.push({ day: A - g, currentMonth: !1 });
3380
+ for (let g = 1; g <= eo; g++)
3381
+ h.push({ day: g, currentMonth: !0 });
3382
+ const uo = 42 - h.length;
3383
+ for (let g = 1; g <= uo; g++)
3384
+ h.push({ day: g, currentMonth: !1 });
3385
+ return /* @__PURE__ */ i(
3359
3386
  sr,
3360
3387
  {
3361
3388
  label: r,
3362
3389
  error: m,
3363
- helperText: h,
3390
+ helperText: y,
3364
3391
  required: v,
3365
- children: /* @__PURE__ */ S(Jt, { ref: H, children: [
3392
+ children: /* @__PURE__ */ S(Qt, { ref: H, children: [
3366
3393
  /* @__PURE__ */ S(
3367
- Qt,
3394
+ Zt,
3368
3395
  {
3369
3396
  $size: l,
3370
3397
  $error: !!m,
3371
3398
  $disabled: d,
3372
3399
  role: "combobox",
3373
3400
  "aria-haspopup": "true",
3374
- "aria-expanded": W,
3401
+ "aria-expanded": D,
3375
3402
  tabIndex: d ? -1 : 0,
3376
3403
  onClick: j,
3377
- onKeyDown: q,
3404
+ onKeyDown: U,
3378
3405
  children: [
3379
- /* @__PURE__ */ e(Zt, { $hasValue: to, children: K || a }),
3380
- p && to ? /* @__PURE__ */ e(
3381
- rs,
3406
+ /* @__PURE__ */ i(oe, { $hasValue: no, children: G || a }),
3407
+ p && no ? /* @__PURE__ */ i(
3408
+ ne,
3382
3409
  {
3383
3410
  type: "button",
3384
- onClick: lo,
3411
+ onClick: co,
3385
3412
  "aria-label": "Clear date",
3386
- children: /* @__PURE__ */ e(yo, { size: 14 })
3413
+ children: /* @__PURE__ */ i(ho, { size: 14 })
3387
3414
  }
3388
- ) : /* @__PURE__ */ e(os, { "aria-hidden": "true", children: /* @__PURE__ */ e(_r, { size: 14 }) })
3415
+ ) : /* @__PURE__ */ i(re, { "aria-hidden": "true", children: /* @__PURE__ */ i(Hr, { size: 14 }) })
3389
3416
  ]
3390
3417
  }
3391
3418
  ),
3392
- W && /* @__PURE__ */ S(ns, { role: "dialog", "aria-label": "Calendar", children: [
3393
- /* @__PURE__ */ S(ts, { children: [
3394
- /* @__PURE__ */ e(
3395
- Bo,
3419
+ D && /* @__PURE__ */ S(te, { role: "dialog", "aria-label": "Calendar", children: [
3420
+ /* @__PURE__ */ S(ee, { children: [
3421
+ /* @__PURE__ */ i(
3422
+ Ao,
3396
3423
  {
3397
3424
  type: "button",
3398
3425
  onClick: Q,
3399
3426
  "aria-label": "Previous month",
3400
- children: /* @__PURE__ */ e(Yr, { size: 16 })
3427
+ children: /* @__PURE__ */ i(Kr, { size: 16 })
3401
3428
  }
3402
3429
  ),
3403
- /* @__PURE__ */ S(ss, { children: [
3404
- as[V],
3430
+ /* @__PURE__ */ S(se, { children: [
3431
+ le[V],
3405
3432
  " ",
3406
3433
  F
3407
3434
  ] }),
3408
- /* @__PURE__ */ e(
3409
- Bo,
3435
+ /* @__PURE__ */ i(
3436
+ Ao,
3410
3437
  {
3411
3438
  type: "button",
3412
3439
  onClick: Z,
3413
3440
  "aria-label": "Next month",
3414
- children: /* @__PURE__ */ e(Kr, { size: 16 })
3441
+ children: /* @__PURE__ */ i(Gr, { size: 16 })
3415
3442
  }
3416
3443
  )
3417
3444
  ] }),
3418
- /* @__PURE__ */ S(es, { children: [
3419
- ls.map(($) => /* @__PURE__ */ e(is, { children: $ }, $)),
3420
- y.map(($, R) => {
3421
- if (!$.currentMonth)
3422
- return /* @__PURE__ */ e(
3423
- ko,
3445
+ /* @__PURE__ */ S(ie, { children: [
3446
+ ce.map((g) => /* @__PURE__ */ i(ae, { children: g }, g)),
3447
+ h.map((g, R) => {
3448
+ if (!g.currentMonth)
3449
+ return /* @__PURE__ */ i(
3450
+ So,
3424
3451
  {
3425
3452
  type: "button",
3426
3453
  $currentMonth: !1,
@@ -3428,45 +3455,45 @@ function us({
3428
3455
  $today: !1,
3429
3456
  disabled: !0,
3430
3457
  tabIndex: -1,
3431
- children: $.day
3458
+ children: g.day
3432
3459
  },
3433
3460
  R
3434
3461
  );
3435
- const c = new Date(F, V, $.day), E = fo(c, z), G = ds(c, u, f);
3462
+ const c = new Date(F, V, g.day), W = go(c, z), Y = ue(c, u, f);
3436
3463
  if (x) {
3437
- const Eo = w ? fo(c, w) : !1, Oo = b ? fo(c, b) : !1, cr = w && b ? c > w && c < b : !1;
3438
- return /* @__PURE__ */ e(
3439
- ko,
3464
+ const $o = w ? go(c, w) : !1, Oo = b ? go(c, b) : !1, dr = w && b ? c > w && c < b : !1;
3465
+ return /* @__PURE__ */ i(
3466
+ So,
3440
3467
  {
3441
3468
  type: "button",
3442
3469
  $currentMonth: !0,
3443
3470
  $selected: !1,
3444
- $today: E,
3445
- $rangeStart: Eo,
3471
+ $today: W,
3472
+ $rangeStart: $o,
3446
3473
  $rangeEnd: Oo,
3447
- $inRange: cr,
3448
- disabled: G,
3474
+ $inRange: dr,
3475
+ disabled: Y,
3449
3476
  "aria-label": Ho(c),
3450
- "aria-pressed": Eo || Oo,
3451
- onClick: () => J($.day),
3452
- children: $.day
3477
+ "aria-pressed": $o || Oo,
3478
+ onClick: () => J(g.day),
3479
+ children: g.day
3453
3480
  },
3454
3481
  R
3455
3482
  );
3456
3483
  }
3457
- const $o = I ? fo(c, I) : !1;
3458
- return /* @__PURE__ */ e(
3459
- ko,
3484
+ const io = I ? go(c, I) : !1;
3485
+ return /* @__PURE__ */ i(
3486
+ So,
3460
3487
  {
3461
3488
  type: "button",
3462
3489
  $currentMonth: !0,
3463
- $selected: $o,
3464
- $today: E,
3465
- disabled: G,
3490
+ $selected: io,
3491
+ $today: W,
3492
+ disabled: Y,
3466
3493
  "aria-label": Ho(c),
3467
- "aria-pressed": $o,
3468
- onClick: () => J($.day),
3469
- children: $.day
3494
+ "aria-pressed": io,
3495
+ onClick: () => J(g.day),
3496
+ children: g.day
3470
3497
  },
3471
3498
  R
3472
3499
  );
@@ -3477,12 +3504,12 @@ function us({
3477
3504
  }
3478
3505
  );
3479
3506
  }
3480
- us.displayName = "DatePicker";
3481
- function ps(o) {
3482
- const r = parseInt(o.slice(1, 3), 16) / 255, n = parseInt(o.slice(3, 5), 16) / 255, s = parseInt(o.slice(5, 7), 16) / 255, a = (d) => d <= 0.03928 ? d / 12.92 : ((d + 0.055) / 1.055) ** 2.4;
3483
- return 0.2126 * a(r) + 0.7152 * a(n) + 0.0722 * a(s) > 0.179 ? "#111111" : "#ffffff";
3507
+ pe.displayName = "DatePicker";
3508
+ function fe(o) {
3509
+ const r = parseInt(o.slice(1, 3), 16) / 255, n = parseInt(o.slice(3, 5), 16) / 255, e = parseInt(o.slice(5, 7), 16) / 255, a = (d) => d <= 0.03928 ? d / 12.92 : ((d + 0.055) / 1.055) ** 2.4;
3510
+ return 0.2126 * a(r) + 0.7152 * a(n) + 0.0722 * a(e) > 0.179 ? "#111111" : "#ffffff";
3484
3511
  }
3485
- const Io = {
3512
+ const To = {
3486
3513
  colors: {
3487
3514
  primary: {
3488
3515
  50: "#fffde6",
@@ -3523,27 +3550,27 @@ const Io = {
3523
3550
  shadows: { focusRing: "3px 3px 0 #111111" },
3524
3551
  brutalism: { borderWidth: "2px", shadowOffset: "4px" }
3525
3552
  };
3526
- function Ds(o) {
3553
+ function Ee(o) {
3527
3554
  return {
3528
- ...Io,
3555
+ ...To,
3529
3556
  colors: {
3530
- ...Io.colors,
3557
+ ...To.colors,
3531
3558
  primary: {
3532
3559
  50: "#fffff0",
3533
3560
  500: o,
3534
3561
  700: o,
3535
- contrast: ps(o)
3562
+ contrast: fe(o)
3536
3563
  }
3537
3564
  }
3538
3565
  };
3539
3566
  }
3540
- function Es({
3541
- theme: o = Io,
3567
+ function Oe({
3568
+ theme: o = To,
3542
3569
  children: r
3543
3570
  }) {
3544
- return /* @__PURE__ */ e(ur, { theme: o, children: r });
3571
+ return /* @__PURE__ */ i(pr, { theme: o, children: r });
3545
3572
  }
3546
- const Os = pr`
3573
+ const Me = fr`
3547
3574
  *, *::before, *::after {
3548
3575
  box-sizing: border-box;
3549
3576
  margin: 0;
@@ -3560,43 +3587,47 @@ const Os = pr`
3560
3587
  button, input, select, textarea {
3561
3588
  font-family: inherit;
3562
3589
  }
3590
+
3591
+ button, a, [role="button"] {
3592
+ touch-action: manipulation;
3593
+ }
3563
3594
  `;
3564
3595
  export {
3565
- $r as Badge,
3566
- Co as Button,
3567
- qn as Checkbox,
3568
- ht as CollapsibleCard,
3569
- ar as ConfirmDialog,
3570
- Ts as ConfirmProvider,
3571
- us as DatePicker,
3572
- un as Editable,
3573
- bn as Field,
3574
- Rn as Form,
3596
+ br as Badge,
3597
+ Io as Button,
3598
+ Gn as Checkbox,
3599
+ wt as CollapsibleCard,
3600
+ lr as ConfirmDialog,
3601
+ We as ConfirmProvider,
3602
+ pe as DatePicker,
3603
+ pn as Editable,
3604
+ xn as Field,
3605
+ Vn as Form,
3575
3606
  sr as FormField,
3576
- Os as GlobalStyles,
3577
- vr as Input,
3578
- qo as Link,
3579
- Go as Modal,
3580
- rt as Radio,
3581
- ln as Select,
3582
- St as Spinner,
3583
- at as Switch,
3584
- qt as Table,
3585
- Tr as Textarea,
3586
- Es as ThemeProvider,
3587
- Mn as Toast,
3588
- xs as ToastProvider,
3589
- Cs as composeValidators,
3590
- Ds as createNeoBrutalTheme,
3591
- ks as isEmail,
3592
- Ss as isUrl,
3593
- vs as maxLength,
3594
- ms as minLength,
3595
- Io as neoBrutalTheme,
3596
- zs as pattern,
3597
- ws as required,
3598
- Ws as useConfirm,
3599
- hs as useForm,
3600
- Is as useTable,
3601
- ys as useToast
3607
+ Me as GlobalStyles,
3608
+ Sr as Input,
3609
+ Go as Link,
3610
+ Xo as Modal,
3611
+ nt as Radio,
3612
+ qo as Select,
3613
+ zt as Spinner,
3614
+ lt as Switch,
3615
+ Gt as Table,
3616
+ Dr as Textarea,
3617
+ Oe as ThemeProvider,
3618
+ Ln as Toast,
3619
+ ye as ToastProvider,
3620
+ Ie as composeValidators,
3621
+ Ee as createNeoBrutalTheme,
3622
+ Se as isEmail,
3623
+ ze as isUrl,
3624
+ ke as maxLength,
3625
+ ve as minLength,
3626
+ To as neoBrutalTheme,
3627
+ Ce as pattern,
3628
+ me as required,
3629
+ De as useConfirm,
3630
+ we as useForm,
3631
+ Te as useTable,
3632
+ he as useToast
3602
3633
  };