blunt-ui 0.3.5 → 1.0.0

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