blunt-ui 0.3.6 → 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 +1999 -1124
  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 R, useState as D, useContext as io, createContext as ao, forwardRef as ko, createElement as to, useRef as j, useEffect as A, useCallback as V, useMemo as lo } from "react";
4
- import { createPortal as Co } from "react-dom";
5
- const U = (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 U = (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: U(
34
+ primary: eo(
35
35
  r,
36
36
  r.colors.primary[500],
37
37
  r.colors.primary.contrast
38
38
  ),
39
- neutral: U(
39
+ neutral: eo(
40
40
  r,
41
41
  r.colors.neutral[200],
42
42
  r.colors.neutral[900]
43
43
  ),
44
- success: U(
44
+ success: eo(
45
45
  r,
46
46
  r.colors.success[50],
47
47
  r.colors.success[500]
48
48
  ),
49
- error: U(
49
+ error: eo(
50
50
  r,
51
51
  r.colors.error[50],
52
52
  r.colors.error[500]
53
53
  ),
54
- warning: U(
54
+ warning: eo(
55
55
  r,
56
56
  r.colors.warning[50],
57
57
  r.colors.warning[500]
58
58
  ),
59
- info: U(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: $,
312
- onClear: g,
313
- fullWidth: w,
314
- id: x,
315
- value: f,
316
- defaultValue: y,
317
- onChange: h,
318
- ...z
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
+ fullWidth: h,
314
+ id: w,
315
+ value: y,
316
+ defaultValue: v,
317
+ onChange: z,
318
+ ...O
319
319
  }) {
320
- const W = R(), v = x ?? W, b = `${v}-hint`, [C, I] = D(y ?? ""), S = f !== void 0, T = S ? f : C, M = typeof c == "string" ? c : void 0, P = !!(a || c), O = (N) => {
321
- S || I(N.target.value), h?.(N);
322
- }, K = () => {
323
- S || I(""), g?.();
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: w, children: [
326
- l && /* @__PURE__ */ s(Ro, { htmlFor: v, 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: v,
332
+ id: L,
333
333
  ref: o,
334
334
  type: r,
335
- value: T,
336
- onChange: O,
337
- ...z,
338
- "aria-invalid": !!c,
339
- "aria-describedby": P ? b : void 0
335
+ value: I,
336
+ onChange: M,
337
+ ...O,
338
+ "aria-invalid": !!d,
339
+ "aria-describedby": W ? g : void 0
340
340
  }
341
341
  ),
342
- $ && T && /* @__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
- P && /* @__PURE__ */ s(Yo, { id: b, $error: !!c, children: M ?? 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: $,
441
- onChange: g,
442
- ...w
434
+ label: t,
435
+ helperText: a,
436
+ error: l,
437
+ fullWidth: d,
438
+ id: p,
439
+ value: u,
440
+ defaultValue: f,
441
+ onChange: $,
442
+ ...h
443
443
  }) {
444
- const x = R(), f = d ?? x, y = `${f}-hint`, [h, z] = D($ ?? ""), W = p !== void 0, v = W ? p : h, b = typeof a == "string" ? a : void 0, C = !!(l || a);
445
- return /* @__PURE__ */ k(Go, { $fullWidth: c, children: [
446
- e && /* @__PURE__ */ s(Jo, { htmlFor: f, 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: f,
450
+ id: y,
451
451
  ref: o,
452
- value: v,
453
- onChange: (S) => {
454
- W || z(S.target.value), g?.(S);
452
+ value: L,
453
+ onChange: (x) => {
454
+ R || O(x.target.value), $?.(x);
455
455
  },
456
- ...w,
457
- "aria-invalid": !!a,
458
- "aria-describedby": C ? y : void 0
456
+ ...h,
457
+ "aria-invalid": !!l,
458
+ "aria-describedby": C ? v : void 0
459
459
  }
460
460
  ) }),
461
- C && /* @__PURE__ */ s(Xo, { id: y, $error: !!a, children: b ?? 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: $ = 24,
495
- strokeWidth: g = 2,
496
- absoluteStrokeWidth: w = !1,
497
- color: x = "currentColor",
498
- className: f = ""
499
- } = er() ?? {}, y = e ?? w ? Number(n ?? g) * 24 / Number(r ?? $) : n ?? g;
500
- return to(
494
+ size: f = 24,
495
+ strokeWidth: $ = 2,
496
+ absoluteStrokeWidth: h = !1,
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 ?? $ ?? ro.width,
506
- height: r ?? $ ?? ro.height,
507
- stroke: o ?? x,
508
- strokeWidth: y,
509
- className: So("lucide", f, 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(([h, z]) => to(h, z)),
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,
746
+ variant: t = "default",
747
+ error: a,
748
+ fullWidth: l,
749
+ clearable: d,
750
+ onClear: p,
751
+ id: u,
752
+ name: f,
672
753
  value: $,
673
- defaultValue: g,
754
+ defaultValue: h,
674
755
  onChange: w,
675
- ...x
756
+ disabled: y,
757
+ searchable: v,
758
+ "aria-label": z,
759
+ "aria-describedby": O
676
760
  }) {
677
- const f = R(), y = p ?? f, h = `${y}-hint`, z = typeof l == "string" ? l : void 0, [W, v] = D(
678
- g ?? ""
679
- ), b = $ !== void 0, C = b ? $ : W, I = (M) => {
680
- b || v(M.target.value), w?.(M);
681
- }, S = () => {
682
- b || v(""), d?.();
683
- }, T = c && !!C;
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: y,
690
- $size: n,
691
- $variant: e,
692
- $error: !!l,
693
- "aria-invalid": !!l,
694
- "aria-describedby": z ? h : void 0,
695
- value: C,
696
- onChange: I,
697
- ...x,
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((M) => /* @__PURE__ */ s("option", { value: M.value, disabled: M.disabled, children: M.label }, M.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
- T ? /* @__PURE__ */ s(
705
- Sr,
706
- {
707
- type: "button",
708
- onClick: S,
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
- z && /* @__PURE__ */ s(kr, { id: h, $error: !0, children: z })
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, $] = D(r), g = d ? o : p, [w, x] = D(!1), [f, y] = D(""), h = j(null), z = () => {
788
- c || (y(g), x(!0), setTimeout(() => {
789
- h.current?.focus(), h.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
- }, W = () => {
792
- d || $(f), n?.(f), e?.(f), x(!1);
793
- }, v = () => {
794
- l?.(g), x(!1);
795
- }, b = (C) => {
796
- C.key === "Enter" ? W() : C.key === "Escape" && v();
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 w ? /* @__PURE__ */ s(go, { children: /* @__PURE__ */ s(
799
- Dr,
1073
+ return h ? /* @__PURE__ */ e(Po, { children: /* @__PURE__ */ e(
1074
+ dn,
800
1075
  {
801
- ref: h,
802
- value: f,
803
- size: Math.max(f.length, a.length, 10),
804
- onChange: (C) => y(C.target.value),
805
- onBlur: W,
806
- onKeyDown: b,
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: !g,
816
- onClick: z,
817
- onKeyDown: (C) => C.key === "Enter" && z(),
818
- children: g || 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,96 +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: $
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 g = j(null), w = j(null), x = j(r);
1009
- x.current = r;
1010
- const f = R(), y = p ?? (n ? f : void 0), [h, z] = D(o), [W, v] = D(!1);
1011
- return A(() => {
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(() => {
1012
1287
  if (o)
1013
- z(!0), v(!1);
1014
- else if (h) {
1015
- v(!0);
1016
- const b = setTimeout(() => {
1017
- z(!1), v(!1);
1288
+ O(!0), L(!1);
1289
+ else if (z) {
1290
+ L(!0);
1291
+ const g = setTimeout(() => {
1292
+ O(!1), L(!1);
1018
1293
  }, 150);
1019
- return () => clearTimeout(b);
1294
+ return () => clearTimeout(g);
1020
1295
  }
1021
- }, [o, h]), A(() => {
1296
+ }, [o, z]), B(() => {
1022
1297
  if (!o)
1023
1298
  return;
1024
- const b = document.body.style.overflow;
1299
+ const g = document.body.style.overflow;
1025
1300
  return document.body.style.overflow = "hidden", () => {
1026
- document.body.style.overflow = b;
1301
+ document.body.style.overflow = g;
1027
1302
  };
1028
- }, [o]), A(() => {
1029
- if (!o || !g.current)
1303
+ }, [o]), B(() => {
1304
+ if (!o || !$.current)
1030
1305
  return;
1031
- const b = g.current, C = document.activeElement;
1032
- (bo(b)[0] ?? b).focus();
1033
- const S = (T) => {
1034
- if (T.key === "Escape" && d) {
1035
- x.current();
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();
1036
1311
  return;
1037
1312
  }
1038
- if (T.key !== "Tab")
1313
+ if (I.key !== "Tab")
1039
1314
  return;
1040
- const M = bo(b);
1041
- if (M.length === 0) {
1042
- T.preventDefault();
1315
+ const D = Ro(g);
1316
+ if (D.length === 0) {
1317
+ I.preventDefault();
1043
1318
  return;
1044
1319
  }
1045
- const P = M[0], O = M[M.length - 1];
1046
- T.shiftKey ? document.activeElement === P && (T.preventDefault(), O.focus()) : document.activeElement === O && (T.preventDefault(), P.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());
1047
1322
  };
1048
- return document.addEventListener("keydown", S), () => {
1049
- document.removeEventListener("keydown", S), C?.focus();
1323
+ return document.addEventListener("keydown", x), () => {
1324
+ document.removeEventListener("keydown", x), C?.focus();
1050
1325
  };
1051
- }, [o, d, h]), h ? Co(
1052
- /* @__PURE__ */ s(
1053
- _r,
1326
+ }, [o, p, z]), z ? go(
1327
+ /* @__PURE__ */ e(
1328
+ mn,
1054
1329
  {
1055
- $closing: W,
1056
- onMouseDown: (b) => {
1057
- w.current = b.target;
1330
+ $closing: R,
1331
+ onMouseDown: (g) => {
1332
+ h.current = g.target;
1058
1333
  },
1059
- onClick: (b) => {
1060
- c && w.current === b.currentTarget && r();
1334
+ onClick: (g) => {
1335
+ d && h.current === g.currentTarget && r();
1061
1336
  },
1062
- children: /* @__PURE__ */ k(
1063
- jr,
1337
+ children: /* @__PURE__ */ S(
1338
+ vn,
1064
1339
  {
1065
- ref: g,
1340
+ ref: $,
1066
1341
  role: "dialog",
1067
1342
  "aria-modal": "true",
1068
- "aria-labelledby": y,
1069
- "aria-describedby": $,
1070
- $size: a,
1071
- $closing: W,
1343
+ "aria-labelledby": v,
1344
+ "aria-describedby": f,
1345
+ $size: l,
1346
+ $closing: R,
1072
1347
  tabIndex: -1,
1073
- onClick: (b) => b.stopPropagation(),
1348
+ onClick: (g) => g.stopPropagation(),
1074
1349
  children: [
1075
- /* @__PURE__ */ k(Ar, { children: [
1076
- n && /* @__PURE__ */ s(Rr, { id: f, children: n }),
1077
- /* @__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: "×" })
1078
1353
  ] }),
1079
- /* @__PURE__ */ s(Hr, { children: e }),
1080
- l && /* @__PURE__ */ s(Ur, { children: l })
1354
+ /* @__PURE__ */ e(Cn, { children: t }),
1355
+ a && /* @__PURE__ */ e(In, { children: a })
1081
1356
  ]
1082
1357
  }
1083
1358
  )
@@ -1086,19 +1361,64 @@ function Io({
1086
1361
  document.body
1087
1362
  ) : null;
1088
1363
  }
1089
- Io.displayName = "Modal";
1090
- const qr = F`
1364
+ Go.displayName = "Modal";
1365
+ const Xo = J`
1091
1366
  from { opacity: 0; transform: translateY(12px); }
1092
1367
  to { opacity: 1; transform: translateY(0); }
1093
- `, Gr = F`
1368
+ `, Jo = J`
1094
1369
  from { opacity: 0; transform: translateY(-12px); }
1095
1370
  to { opacity: 1; transform: translateY(0); }
1096
- `, Jr = F`
1371
+ `, Qo = J`
1097
1372
  from { opacity: 1; }
1098
1373
  to { opacity: 0; }
1099
- `, Xr = i.div`
1100
- position: fixed;
1101
- 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`
1102
1422
  display: flex;
1103
1423
  align-items: center;
1104
1424
  gap: ${({ theme: o }) => o.spacing[3]};
@@ -1106,85 +1426,89 @@ const qr = F`
1106
1426
  max-width: 400px;
1107
1427
  padding: ${({ theme: o }) => `${o.spacing[3]} ${o.spacing[4]}`};
1108
1428
  border-radius: ${({ theme: o }) => o.radius.md};
1109
- animation: ${({ $closing: o, $position: r }) => o ? t`
1110
- ${Jr} 0.2s ease forwards
1111
- ` : r.startsWith("top") ? t`
1112
- ${Gr} 0.2s ease forwards
1113
- ` : t`
1114
- ${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
1115
1471
  `};
1116
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
+
1117
1482
  ${({ $position: o, theme: r }) => ({
1118
- "bottom-right": t`
1483
+ "bottom-right": s`
1119
1484
  bottom: ${r.spacing[6]};
1120
1485
  right: ${r.spacing[6]};
1486
+ align-items: flex-end;
1121
1487
  `,
1122
- "bottom-left": t`
1488
+ "bottom-left": s`
1123
1489
  bottom: ${r.spacing[6]};
1124
1490
  left: ${r.spacing[6]};
1491
+ align-items: flex-start;
1125
1492
  `,
1126
- "top-right": t`
1493
+ "top-right": s`
1127
1494
  top: ${r.spacing[6]};
1128
1495
  right: ${r.spacing[6]};
1496
+ align-items: flex-end;
1129
1497
  `,
1130
- "top-left": t`
1498
+ "top-left": s`
1131
1499
  top: ${r.spacing[6]};
1132
1500
  left: ${r.spacing[6]};
1501
+ align-items: flex-start;
1133
1502
  `
1134
1503
  })[o]}
1135
- `, J = (o, r, n) => t`
1136
- background: ${r};
1137
- border: ${o.brutalism.borderWidth} solid ${n};
1138
- box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
1139
- 0 ${n};
1140
- `, Zr = i(Xr)`
1141
- ${({ $variant: o, theme: r }) => r.brutalism ? {
1142
- success: J(
1143
- r,
1144
- r.colors.success[50],
1145
- r.colors.success[500]
1146
- ),
1147
- error: J(
1148
- r,
1149
- r.colors.error[50],
1150
- r.colors.error[500]
1151
- ),
1152
- warning: J(
1153
- r,
1154
- r.colors.warning[50],
1155
- r.colors.warning[500]
1156
- ),
1157
- info: J(r, r.colors.info[50], r.colors.info[500])
1158
- }[o] : {
1159
- success: t`
1160
- background: ${r.colors.success[50]};
1161
- border-left: 4px solid ${r.colors.success[500]};
1162
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
1163
- `,
1164
- error: t`
1165
- background: ${r.colors.error[50]};
1166
- border-left: 4px solid ${r.colors.error[500]};
1167
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
1168
- `,
1169
- warning: t`
1170
- background: ${r.colors.warning[50]};
1171
- border-left: 4px solid ${r.colors.warning[500]};
1172
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
1173
- `,
1174
- info: t`
1175
- background: ${r.colors.info[50]};
1176
- border-left: 4px solid ${r.colors.info[500]};
1177
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
1178
- `
1179
- }[o]}
1180
- `, Qr = i.p`
1504
+ `, rr = i.p`
1181
1505
  flex: 1;
1182
1506
  margin: 0;
1183
1507
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1184
- font-weight: ${({ theme: o }) => o.brutalism ? 600 : 400};
1508
+ font-weight: ${({ theme: o }) => o.brutalism ? o.fontWeights.semibold : o.fontWeights.normal};
1185
1509
  line-height: 1.5;
1186
1510
  color: ${({ theme: o }) => o.colors.neutral[900]};
1187
- `, on = i.button`
1511
+ `, nr = i.button`
1188
1512
  flex-shrink: 0;
1189
1513
  display: inline-flex;
1190
1514
  align-items: center;
@@ -1207,110 +1531,143 @@ const qr = F`
1207
1531
  outline-offset: 2px;
1208
1532
  }
1209
1533
  `;
1210
- function Do({
1534
+ function On({
1211
1535
  open: o,
1212
1536
  onClose: r,
1213
1537
  message: n,
1214
- variant: e = "info",
1215
- duration: l = 4e3,
1216
- position: a = "bottom-right"
1538
+ variant: t = "info",
1539
+ duration: a = 4e3,
1540
+ position: l = "bottom-right"
1217
1541
  }) {
1218
- const [c, d] = D(o), [p, $] = D(!1);
1219
- return A(() => {
1542
+ const [d, p] = T(o), [u, f] = T(!1);
1543
+ return B(() => {
1220
1544
  if (o)
1221
- d(!0), $(!1);
1222
- else if (c) {
1223
- $(!0);
1224
- const g = setTimeout(() => {
1225
- d(!1), $(!1);
1545
+ p(!0), f(!1);
1546
+ else if (d) {
1547
+ f(!0);
1548
+ const $ = setTimeout(() => {
1549
+ p(!1), f(!1);
1226
1550
  }, 200);
1227
1551
  return () => {
1228
- clearTimeout(g);
1552
+ clearTimeout($);
1229
1553
  };
1230
1554
  }
1231
- }, [o, c]), A(() => {
1232
- if (!o || l === 0)
1555
+ }, [o, d]), B(() => {
1556
+ if (!o || a === 0)
1233
1557
  return;
1234
- const g = setTimeout(r, l);
1558
+ const $ = setTimeout(r, a);
1235
1559
  return () => {
1236
- clearTimeout(g);
1560
+ clearTimeout($);
1237
1561
  };
1238
- }, [o, l, r]), c ? Co(
1239
- /* @__PURE__ */ k(
1240
- Zr,
1562
+ }, [o, a, r]), d ? go(
1563
+ /* @__PURE__ */ S(
1564
+ Dn,
1241
1565
  {
1242
- $position: a,
1243
- $variant: e,
1244
- $closing: p,
1566
+ $position: l,
1567
+ $variant: t,
1568
+ $closing: u,
1245
1569
  role: "alert",
1246
1570
  "aria-live": "polite",
1247
1571
  children: [
1248
- /* @__PURE__ */ s(Qr, { children: n }),
1249
- /* @__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 }) })
1250
1574
  ]
1251
1575
  }
1252
1576
  ),
1253
1577
  document.body
1254
1578
  ) : null;
1255
1579
  }
1256
- Do.displayName = "Toast";
1257
- const Mo = ao(null);
1258
- function yt({ children: o }) {
1259
- const [r, n] = D(null), e = V((a) => {
1260
- n({ ...a, id: Date.now() });
1261
- }, []), l = lo(() => Object.assign((a) => e(a), {
1262
- success: (a, c) => e({ ...c, message: a, variant: "success" }),
1263
- error: (a, c) => e({ ...c, message: a, variant: "error" }),
1264
- warning: (a, c) => e({ ...c, message: a, variant: "warning" }),
1265
- info: (a, c) => e({ ...c, message: a, variant: "info" })
1266
- }), [e]);
1267
- 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: [
1268
1639
  o,
1269
- r && /* @__PURE__ */ s(
1270
- Do,
1271
- {
1272
- open: !0,
1273
- onClose: () => n(null),
1274
- message: r.message,
1275
- variant: r.variant,
1276
- duration: r.duration,
1277
- position: r.position
1278
- },
1279
- 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
1280
1651
  )
1281
1652
  ] });
1282
1653
  }
1283
- function ht() {
1284
- const o = io(Mo);
1654
+ function gs() {
1655
+ const o = To(tr);
1285
1656
  if (!o)
1286
1657
  throw new Error("useToast must be used within a ToastProvider");
1287
1658
  return o;
1288
1659
  }
1289
- const rn = i.form`
1660
+ const Pn = i.form`
1290
1661
  display: flex;
1291
1662
  flex-direction: column;
1292
1663
  gap: ${({ theme: o }) => o.spacing[4]};
1293
- `, nn = i.div`
1294
- display: flex;
1295
- flex-direction: column;
1296
- gap: ${({ theme: o }) => o.spacing[1]};
1297
- `, tn = i.label`
1298
- font-size: ${({ theme: o }) => o.fontSizes.sm};
1299
- font-weight: 500;
1300
- color: ${({ theme: o }) => o.colors.neutral[900]};
1301
- `, sn = i.span`
1302
- color: ${({ theme: o }) => o.colors.error[500]};
1303
- margin-left: 2px;
1304
- `, en = i.span`
1305
- font-size: ${({ theme: o }) => o.fontSizes.xs};
1306
- color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
1307
1664
  `;
1308
- function an({ onSubmit: o, children: r, ...n }) {
1309
- return /* @__PURE__ */ s(
1310
- rn,
1665
+ function Rn({ onSubmit: o, children: r, ...n }) {
1666
+ return /* @__PURE__ */ e(
1667
+ Pn,
1311
1668
  {
1312
- onSubmit: (e) => {
1313
- e.preventDefault(), o?.(e);
1669
+ onSubmit: (t) => {
1670
+ t.preventDefault(), o?.(t);
1314
1671
  },
1315
1672
  noValidate: !0,
1316
1673
  ...n,
@@ -1318,133 +1675,514 @@ function an({ onSubmit: o, children: r, ...n }) {
1318
1675
  }
1319
1676
  );
1320
1677
  }
1321
- an.displayName = "Form";
1322
- 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({
1323
1695
  label: o,
1324
1696
  error: r,
1325
1697
  helperText: n,
1326
- required: e,
1327
- children: l
1698
+ required: t,
1699
+ children: a
1328
1700
  }) {
1329
- const a = R(), c = `${a}-hint`, d = !!(r || n), p = typeof r == "string" ? r : void 0, $ = po.isValidElement(l) ? po.cloneElement(
1330
- 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,
1331
1703
  {
1332
- id: a,
1333
- ...d && { "aria-describedby": c },
1704
+ id: l,
1705
+ ...p && { "aria-describedby": d },
1334
1706
  ...r && { "aria-invalid": !0 }
1335
1707
  }
1336
- ) : l;
1337
- return /* @__PURE__ */ k(nn, { children: [
1338
- o && /* @__PURE__ */ k(tn, { htmlFor: a, children: [
1708
+ ) : a;
1709
+ return /* @__PURE__ */ S(Vn, { children: [
1710
+ o && /* @__PURE__ */ S(Fn, { htmlFor: l, children: [
1339
1711
  o,
1340
- e && /* @__PURE__ */ s(sn, { "aria-hidden": "true", children: " *" })
1712
+ t && /* @__PURE__ */ e(An, { "aria-hidden": "true", children: " *" })
1341
1713
  ] }),
1342
- $,
1343
- 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 })
1344
1716
  ] });
1345
1717
  }
1346
- ln.displayName = "FormField";
1347
- function wt({
1718
+ sr.displayName = "FormField";
1719
+ function bs({
1348
1720
  initialValues: o,
1349
1721
  validate: r,
1350
1722
  onSubmit: n,
1351
- onError: e
1723
+ onError: t
1352
1724
  }) {
1353
- const [l, a] = D(o), [c, d] = D(
1725
+ const [a, l] = T(o), [d, p] = T(
1354
1726
  {}
1355
- ), [p, $] = D({}), [g, w] = D(!1), x = j(l);
1356
- x.current = l;
1357
- const f = V(
1358
- (I) => {
1727
+ ), [u, f] = T({}), [$, h] = T(!1), w = U(a);
1728
+ w.current = a;
1729
+ const y = X(
1730
+ (m) => {
1359
1731
  if (!r)
1360
1732
  return {};
1361
- const S = r(I);
1733
+ const x = r(m);
1362
1734
  return Object.fromEntries(
1363
- Object.entries(S).filter(([, T]) => T !== void 0)
1735
+ Object.entries(x).filter(([, I]) => I !== void 0)
1364
1736
  );
1365
1737
  },
1366
1738
  [r]
1367
- ), y = j(p);
1368
- y.current = p;
1369
- const h = V(
1370
- (I) => {
1371
- const { name: S, value: T } = I.target;
1372
- process.env.NODE_ENV !== "production" && !S && 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(
1373
1745
  "[useForm] handleChange: field is missing a `name` attribute — value will not be tracked."
1374
1746
  );
1375
- const M = { ...x.current, [S]: T };
1376
- a(M), y.current[S] && d(f(M));
1747
+ const D = { ...w.current, [x]: I };
1748
+ l(D), v.current[x] && p(y(D));
1377
1749
  },
1378
- [f]
1379
- ), z = V(
1380
- (I) => {
1381
- const { name: S } = I.target;
1382
- process.env.NODE_ENV !== "production" && !S && console.warn(
1750
+ [y]
1751
+ ), O = X(
1752
+ (m) => {
1753
+ const { name: x } = m.target;
1754
+ process.env.NODE_ENV !== "production" && !x && console.warn(
1383
1755
  "[useForm] handleBlur: field is missing a `name` attribute — touched state will not be tracked."
1384
- ), $((T) => ({ ...T, [S]: !0 })), d(f(x.current));
1756
+ ), f((I) => ({ ...I, [x]: !0 })), p(y(w.current));
1385
1757
  },
1386
- [f]
1387
- ), W = V(
1388
- (I) => {
1389
- I?.preventDefault();
1390
- const S = Object.keys(x.current).reduce(
1391
- (P, O) => ({ ...P, [O]: !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 }),
1392
1764
  {}
1393
1765
  );
1394
- $(S);
1395
- const T = f(x.current);
1396
- if (d(T), Object.keys(T).length > 0) {
1397
- e?.(T);
1766
+ f(x);
1767
+ const I = y(w.current);
1768
+ if (p(I), Object.keys(I).length > 0) {
1769
+ t?.(I);
1398
1770
  return;
1399
1771
  }
1400
1772
  (async () => {
1401
- w(!0);
1773
+ h(!0);
1402
1774
  try {
1403
- await n?.(x.current);
1775
+ await n?.(w.current);
1404
1776
  } finally {
1405
- w(!1);
1777
+ h(!1);
1406
1778
  }
1407
1779
  })();
1408
1780
  },
1409
- [f, n, e]
1410
- ), v = V((I, S) => {
1411
- a((T) => ({ ...T, [I]: S }));
1412
- }, []), b = V(
1413
- (I) => {
1414
- a(I ?? o), d({}), $({}), w(!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);
1415
1787
  },
1416
1788
  [o]
1417
1789
  ), C = Object.fromEntries(
1418
- Object.entries(c).filter(([I]) => p[I])
1790
+ Object.entries(d).filter(([m]) => u[m])
1419
1791
  );
1420
1792
  return {
1421
- values: l,
1793
+ values: a,
1422
1794
  errors: C,
1423
- touched: p,
1424
- handleChange: h,
1425
- handleBlur: z,
1426
- handleSubmit: W,
1427
- setFieldValue: v,
1428
- reset: b,
1429
- isSubmitting: g
1795
+ touched: u,
1796
+ handleChange: z,
1797
+ handleBlur: O,
1798
+ handleSubmit: R,
1799
+ setFieldValue: L,
1800
+ reset: g,
1801
+ isSubmitting: $
1430
1802
  };
1431
1803
  }
1432
- 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`
1433
2171
  border-radius: ${({ theme: o }) => o.radius.md};
1434
2172
  background: ${({ theme: o }) => o.colors.neutral[0]};
1435
2173
  overflow: hidden;
1436
2174
 
1437
- ${({ theme: o, $accentColor: r }) => o.brutalism ? t`
2175
+ ${({ theme: o, $accentColor: r }) => o.brutalism ? s`
1438
2176
  border: ${o.brutalism.borderWidth} solid
1439
2177
  ${r ?? o.colors.neutral[900]};
1440
2178
  box-shadow: ${o.brutalism.shadowOffset}
1441
2179
  ${o.brutalism.shadowOffset} 0
1442
2180
  ${r ?? o.colors.neutral[900]};
1443
- ` : t`
2181
+ ` : s`
1444
2182
  border: 1px solid ${r ?? o.colors.neutral[200]};
1445
2183
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
1446
2184
  `}
1447
- `, dn = i.button`
2185
+ `, ct = i.button`
1448
2186
  width: 100%;
1449
2187
  display: flex;
1450
2188
  align-items: flex-start;
@@ -1464,19 +2202,19 @@ const cn = i.div`
1464
2202
  ${({ theme: o, $accentColor: r }) => r ?? o.colors.primary[500]};
1465
2203
  outline-offset: -2px;
1466
2204
  }
1467
- `, un = i.div`
2205
+ `, dt = i.div`
1468
2206
  flex: 1;
1469
2207
  min-width: 0;
1470
- `, pn = i.span`
2208
+ `, ut = i.span`
1471
2209
  display: block;
1472
2210
  font-size: ${({ theme: o }) => o.fontSizes.md};
1473
- font-weight: 600;
2211
+ font-weight: ${({ theme: o }) => o.fontWeights.semibold};
1474
2212
  color: ${({ theme: o }) => o.colors.neutral[900]};
1475
- `, fn = i.span`
2213
+ `, pt = i.span`
1476
2214
  display: block;
1477
2215
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1478
2216
  color: ${({ theme: o }) => o.colors.neutral[500]};
1479
- `, $n = i.div`
2217
+ `, ft = i.div`
1480
2218
  display: flex;
1481
2219
  flex-direction: row;
1482
2220
  align-items: center;
@@ -1488,11 +2226,11 @@ const cn = i.div`
1488
2226
  align-items: flex-start;
1489
2227
  gap: ${({ theme: o }) => o.spacing[2]};
1490
2228
  }
1491
- `, gn = i.div`
2229
+ `, $t = i.div`
1492
2230
  display: flex;
1493
2231
  align-items: center;
1494
2232
  gap: ${({ theme: o }) => o.spacing[2]};
1495
- `, bn = i.span`
2233
+ `, gt = i.span`
1496
2234
  display: inline-flex;
1497
2235
  align-items: center;
1498
2236
  justify-content: center;
@@ -1500,175 +2238,186 @@ const cn = i.div`
1500
2238
  transition: transform 0.2s ease;
1501
2239
  transform: ${({ $open: o }) => o ? "rotate(180deg)" : "rotate(0deg)"};
1502
2240
  color: ${({ theme: o, $accentColor: r }) => r ?? o.colors.neutral[500]};
1503
- `, xn = i.div`
2241
+ `, bt = i.div`
1504
2242
  display: grid;
1505
2243
  grid-template-rows: ${({ $open: o }) => o ? "1fr" : "0fr"};
1506
2244
  transition: grid-template-rows 0.2s ease;
1507
- `, yn = i.div`
2245
+ `, xt = i.div`
1508
2246
  overflow: hidden;
1509
- `, hn = i.div`
2247
+ `, yt = i.div`
1510
2248
  padding: ${({ theme: o }) => o.spacing[4]};
1511
2249
  border-top: 1px solid ${({ theme: o }) => o.colors.neutral[200]};
1512
2250
  `;
1513
- function wn({
2251
+ function ht({
1514
2252
  title: o,
1515
2253
  children: r,
1516
2254
  defaultOpen: n = !1,
1517
- open: e,
1518
- onToggle: l,
1519
- subtitle: a,
1520
- headerActions: c,
1521
- accentColor: d
2255
+ open: t,
2256
+ onToggle: a,
2257
+ subtitle: l,
2258
+ headerActions: d,
2259
+ accentColor: p
1522
2260
  }) {
1523
- const [p, $] = D(n), g = R(), w = e !== void 0, x = w ? e : p;
1524
- return /* @__PURE__ */ k(cn, { $accentColor: d, children: [
1525
- /* @__PURE__ */ k(
1526
- 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,
1527
2265
  {
1528
2266
  type: "button",
1529
- $open: x,
1530
- $accentColor: d,
1531
- "aria-expanded": x,
1532
- "aria-controls": g,
2267
+ $open: w,
2268
+ $accentColor: p,
2269
+ "aria-expanded": w,
2270
+ "aria-controls": $,
1533
2271
  onClick: () => {
1534
- const y = !x;
1535
- w || $(y), l?.(y);
2272
+ const v = !w;
2273
+ h || f(v), a?.(v);
1536
2274
  },
1537
2275
  children: [
1538
- /* @__PURE__ */ k(un, { children: [
1539
- /* @__PURE__ */ s(pn, { children: o }),
1540
- (a || c) && /* @__PURE__ */ k($n, { children: [
1541
- a && /* @__PURE__ */ s(fn, { children: a }),
1542
- c && /* @__PURE__ */ s(gn, { onClick: (y) => y.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 })
1543
2281
  ] })
1544
2282
  ] }),
1545
- /* @__PURE__ */ s(
1546
- bn,
2283
+ /* @__PURE__ */ e(
2284
+ gt,
1547
2285
  {
1548
- $open: x,
1549
- $accentColor: d,
2286
+ $open: w,
2287
+ $accentColor: p,
1550
2288
  "aria-hidden": "true",
1551
- children: /* @__PURE__ */ s(zo, { size: 18, strokeWidth: 2.5 })
2289
+ children: /* @__PURE__ */ e(Ko, { size: 18, strokeWidth: 2.5 })
1552
2290
  }
1553
2291
  )
1554
2292
  ]
1555
2293
  }
1556
2294
  ),
1557
- /* @__PURE__ */ s(xn, { $open: x, children: /* @__PURE__ */ s(yn, { id: g, 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 }) }) })
1558
2296
  ] });
1559
2297
  }
1560
- wn.displayName = "CollapsibleCard";
1561
- const mn = F`
2298
+ ht.displayName = "CollapsibleCard";
2299
+ const wt = J`
1562
2300
  to { transform: rotate(360deg); }
1563
- `, vn = {
2301
+ `, mt = {
1564
2302
  sm: "16px",
1565
2303
  md: "24px",
1566
2304
  lg: "40px"
1567
- }, kn = {
2305
+ }, vt = {
1568
2306
  thin: "2px",
1569
2307
  normal: "3px",
1570
2308
  bold: "5px"
1571
- }, Cn = i.span`
2309
+ }, kt = i.span`
1572
2310
  display: inline-block;
1573
2311
  border-radius: 50%;
1574
- animation: ${mn} 0.7s linear infinite;
1575
-
1576
- ${({ $size: o = "md", $weight: r = "normal", $color: n, theme: e }) => {
1577
- const l = vn[o], a = kn[r], c = e.colors.neutral[200], d = n ?? e.colors.primary[500];
1578
- return t`
1579
- width: ${l};
1580
- height: ${l};
1581
- border: ${a} solid ${c};
1582
- 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};
1583
2321
  `;
1584
2322
  }}
1585
2323
  `;
1586
- function Sn({
2324
+ function St({
1587
2325
  size: o = "md",
1588
2326
  weight: r = "normal",
1589
2327
  color: n,
1590
- label: e = "Loading..."
2328
+ label: t = "Loading..."
1591
2329
  }) {
1592
- return /* @__PURE__ */ s(
1593
- Cn,
2330
+ return /* @__PURE__ */ e(
2331
+ kt,
1594
2332
  {
1595
2333
  $size: o,
1596
2334
  $weight: r,
1597
2335
  $color: n,
1598
2336
  role: "status",
1599
- "aria-label": e
2337
+ "aria-label": t
1600
2338
  }
1601
2339
  );
1602
2340
  }
1603
- Sn.displayName = "Spinner";
1604
- 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) {
1605
2355
  return o?.key !== r ? { key: r, direction: "asc" } : o.direction === "asc" ? { key: r, direction: "desc" } : null;
1606
2356
  }
1607
- function Tn({
2357
+ function It({
1608
2358
  data: o,
1609
2359
  sort: r,
1610
2360
  defaultSort: n,
1611
- onSortChange: e
2361
+ onSortChange: t
1612
2362
  }) {
1613
- const l = r !== void 0, [a, c] = D(
2363
+ const a = r !== void 0, [l, d] = T(
1614
2364
  n ?? null
1615
- ), d = l ? r ?? null : a, p = (g) => {
1616
- const w = zn(d, g);
1617
- return l || c(w), e?.(w), w;
1618
- }, $ = lo(() => l || !d ? o : [...o].sort((g, w) => {
1619
- const x = g[d.key], f = w[d.key], y = x < f ? -1 : x > f ? 1 : 0;
1620
- return d.direction === "asc" ? y : -y;
1621
- }), [o, d, l]);
1622
- return { activeSort: d, sortedData: $, 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 };
1623
2373
  }
1624
- const In = 7, xo = 3, yo = 1;
1625
- function Dn(o, r) {
1626
- if (r <= In)
1627
- 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);
1628
2377
  const n = [1];
1629
- o > xo && n.push("...");
1630
- for (let e = Math.max(2, o - yo); e <= Math.min(r - 1, o + yo); e++)
1631
- n.push(e);
1632
- 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;
1633
2382
  }
1634
- function Mn({
2383
+ function Wt({
1635
2384
  data: o,
1636
2385
  pageSize: r,
1637
2386
  page: n,
1638
- defaultPage: e,
1639
- totalRows: l,
1640
- onPageChange: a
2387
+ defaultPage: t,
2388
+ totalRows: a,
2389
+ onPageChange: l
1641
2390
  }) {
1642
- const c = n !== void 0, [d, p] = D(e ?? 1), $ = c ? n : d, g = (h) => {
1643
- c || p(h), a?.(h);
1644
- }, w = c || l !== void 0, x = l ?? o.length, f = r ? Math.max(1, Math.ceil(x / r)) : 1, y = lo(() => {
1645
- if (!r || w)
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(() => {
2394
+ if (!r || h)
1646
2395
  return o;
1647
- const h = ($ - 1) * r;
1648
- return o.slice(h, h + r);
1649
- }, [o, r, $, w]);
1650
- return { activePage: $, totalPages: f, displayData: y, handlePageChange: g };
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: $ };
1651
2400
  }
1652
- 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`
1653
2402
  width: 100%;
1654
2403
 
1655
- ${({ theme: o, $borderColor: r }) => o.brutalism ? t`
2404
+ ${({ theme: o, $borderColor: r }) => o.brutalism ? s`
1656
2405
  border: ${o.brutalism.borderWidth} solid
1657
2406
  ${r ?? o.colors.neutral[900]};
1658
2407
  box-shadow: ${o.brutalism.shadowOffset}
1659
2408
  ${o.brutalism.shadowOffset} 0
1660
2409
  ${r ?? o.colors.neutral[900]};
1661
- ` : t`
2410
+ ` : s`
1662
2411
  border: 1px solid ${r ?? o.colors.neutral[300]};
1663
2412
  border-radius: ${o.radius.md};
1664
2413
  overflow: hidden;
1665
2414
  `}
1666
2415
 
1667
2416
  overflow-x: auto;
1668
- ${({ $stickyHeader: o }) => o && t`
2417
+ ${({ $stickyHeader: o }) => o && s`
1669
2418
  overflow-y: auto;
1670
2419
  `}
1671
- `, On = i.table`
2420
+ `, Et = i.table`
1672
2421
  width: 100%;
1673
2422
  border-collapse: collapse;
1674
2423
  font-size: ${({ $size: o, theme: r }) => ({
@@ -1678,36 +2427,36 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1678
2427
  })[o]};
1679
2428
 
1680
2429
  caption {
1681
- padding: 8px 0;
2430
+ padding: ${({ theme: o }) => o.spacing[2]} 0;
1682
2431
  }
1683
- `, Pn = i.thead`
1684
- ${({ $stickyHeader: o }) => o && t`
2432
+ `, Mt = i.thead`
2433
+ ${({ $stickyHeader: o }) => o && s`
1685
2434
  position: sticky;
1686
2435
  top: 0;
1687
2436
  z-index: 1;
1688
2437
  `}
1689
2438
 
1690
- ${({ theme: o, $headerColor: r, $borderColor: n }) => r ? t`
2439
+ ${({ theme: o, $headerColor: r, $borderColor: n }) => r ? s`
1691
2440
  --th-bg: ${r};
1692
2441
  --th-text: ${o.colors.neutral[0]};
1693
2442
  --th-sep: rgba(255, 255, 255, 0.25);
1694
- ` : o.brutalism ? t`
2443
+ ` : o.brutalism ? s`
1695
2444
  --th-bg: ${o.colors.neutral[900]};
1696
2445
  --th-text: ${o.colors.neutral[0]};
1697
2446
  --th-sep: ${n ?? o.colors.neutral[600]};
1698
- ` : t`
2447
+ ` : s`
1699
2448
  --th-bg: ${o.colors.neutral[100]};
1700
2449
  --th-text: ${o.colors.neutral[600]};
1701
2450
  --th-sep: ${n ?? o.colors.neutral[300]};
1702
2451
  `}
1703
- `, Nn = i.tbody`
1704
- ${({ $rowColor: o }) => o && t`
2452
+ `, Ot = i.tbody`
2453
+ ${({ $rowColor: o }) => o && s`
1705
2454
  tr {
1706
2455
  background-color: ${o};
1707
2456
  }
1708
2457
  `}
1709
2458
 
1710
- ${({ $striped: o, theme: r, $stripeColor: n }) => o && t`
2459
+ ${({ $striped: o, theme: r, $stripeColor: n }) => o && s`
1711
2460
  tr:nth-child(even) {
1712
2461
  background-color: ${n ?? r.colors.neutral[100]};
1713
2462
  }
@@ -1720,7 +2469,7 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1720
2469
  tr:hover td {
1721
2470
  background-color: rgba(0, 0, 0, 0.04);
1722
2471
  }
1723
- `, X = i.tr``, En = i(X)`
2472
+ `, $o = i.tr``, Lt = i($o)`
1724
2473
  cursor: pointer;
1725
2474
 
1726
2475
  td {
@@ -1737,25 +2486,25 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1737
2486
  box-shadow: inset 4px 0 0
1738
2487
  ${({ $accentColor: o, theme: r }) => o ?? r.colors.neutral[900]};
1739
2488
  }
1740
- `, Ln = i.th`
2489
+ `, Nt = i.th`
1741
2490
  background-color: var(--th-bg);
1742
2491
  color: var(--th-text);
1743
2492
  text-align: left;
1744
- font-weight: 700;
2493
+ font-weight: ${({ theme: o }) => o.fontWeights.bold};
1745
2494
  white-space: nowrap;
1746
2495
 
1747
- padding: ${({ $size: o, theme: r }) => Wo(o, r)};
2496
+ padding: ${({ $size: o, theme: r }) => er(o, r)};
1748
2497
 
1749
- ${({ theme: o, $bordered: r }) => o.brutalism ? t`` : t`
2498
+ ${({ theme: o, $bordered: r }) => o.brutalism ? s`` : s`
1750
2499
  border-bottom: 2px solid var(--th-sep);
1751
- ${r && t`
2500
+ ${r && s`
1752
2501
  border-right: 1px solid var(--th-sep);
1753
2502
  &:last-child {
1754
2503
  border-right: none;
1755
2504
  }
1756
2505
  `}
1757
2506
  `}
1758
- `, Fn = i.button`
2507
+ `, Pt = i.button`
1759
2508
  display: inline-flex;
1760
2509
  align-items: center;
1761
2510
  gap: ${({ theme: o }) => o.spacing[1]};
@@ -1764,7 +2513,7 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1764
2513
  cursor: pointer;
1765
2514
  font: inherit;
1766
2515
  color: inherit;
1767
- font-weight: 700;
2516
+ font-weight: ${({ theme: o }) => o.fontWeights.bold};
1768
2517
  padding: 0;
1769
2518
  width: 100%;
1770
2519
  text-align: left;
@@ -1774,39 +2523,39 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1774
2523
  outline-offset: 2px;
1775
2524
  border-radius: 2px;
1776
2525
  }
1777
- `, Bn = i.span`
2526
+ `, Rt = i.span`
1778
2527
  opacity: 0.5;
1779
2528
  display: inline-flex;
1780
2529
  align-items: center;
1781
- `, Oo = i.td`
1782
- padding: ${({ $size: o, theme: r }) => Wo(o, r)};
2530
+ `, ir = i.td`
2531
+ padding: ${({ $size: o, theme: r }) => er(o, r)};
1783
2532
 
1784
- ${({ $bordered: o, $borderColor: r, theme: n }) => n.brutalism ? t`
2533
+ ${({ $bordered: o, $borderColor: r, theme: n }) => n.brutalism ? s`
1785
2534
  border-bottom: ${n.brutalism.borderWidth} solid
1786
2535
  ${r ?? n.colors.neutral[900]};
1787
- ${o && t`
2536
+ ${o && s`
1788
2537
  border-right: ${n.brutalism.borderWidth} solid
1789
2538
  ${r ?? n.colors.neutral[900]};
1790
2539
  &:last-child {
1791
2540
  border-right: none;
1792
2541
  }
1793
2542
  `}
1794
- ` : o ? t`
2543
+ ` : o ? s`
1795
2544
  border: 1px solid ${r ?? n.colors.neutral[300]};
1796
- ` : t`
2545
+ ` : s`
1797
2546
  border-bottom: 1px solid
1798
2547
  ${r ?? n.colors.neutral[200]};
1799
2548
  `}
1800
- `, Vn = i.td`
2549
+ `, Vt = i.td`
1801
2550
  text-align: center;
1802
2551
  color: ${({ theme: o }) => o.colors.neutral[400]};
1803
2552
  padding: ${({ theme: o }) => `${o.spacing[4]} ${o.spacing[3]}`};
1804
2553
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1805
2554
  border-bottom: none;
1806
- `, _n = F`
2555
+ `, Ft = J`
1807
2556
  0% { background-position: -400px 0; }
1808
2557
  100% { background-position: 400px 0; }
1809
- `, jn = i(Oo)``, An = i.div`
2558
+ `, At = i(ir)``, Bt = i.div`
1810
2559
  height: 14px;
1811
2560
  border-radius: 4px;
1812
2561
  background: linear-gradient(
@@ -1816,21 +2565,21 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1816
2565
  ${({ theme: o }) => o.colors.neutral[200]} 75%
1817
2566
  );
1818
2567
  background-size: 800px 100%;
1819
- animation: ${_n} 1.6s ease-in-out infinite;
1820
- `, Rn = i.div`
2568
+ animation: ${Ft} 1.6s ease-in-out infinite;
2569
+ `, _t = i.div`
1821
2570
  display: flex;
1822
2571
  align-items: center;
1823
2572
  justify-content: center;
1824
2573
  gap: ${({ theme: o }) => o.spacing[1]};
1825
2574
  padding: ${({ theme: o }) => `${o.spacing[2]} ${o.spacing[3]}`};
1826
2575
 
1827
- ${({ theme: o }) => o.brutalism ? t`
2576
+ ${({ theme: o }) => o.brutalism ? s`
1828
2577
  border-top: ${o.brutalism.borderWidth} solid
1829
2578
  ${o.colors.neutral[900]};
1830
- ` : t`
2579
+ ` : s`
1831
2580
  border-top: 1px solid ${o.colors.neutral[200]};
1832
2581
  `}
1833
- `, no = i.button`
2582
+ `, vo = i.button`
1834
2583
  display: inline-flex;
1835
2584
  align-items: center;
1836
2585
  justify-content: center;
@@ -1841,7 +2590,7 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1841
2590
  font-size: ${({ theme: o }) => o.fontSizes.sm};
1842
2591
  cursor: pointer;
1843
2592
 
1844
- ${({ $active: o, theme: r }) => r.brutalism ? t`
2593
+ ${({ $active: o, theme: r }) => r.brutalism ? s`
1845
2594
  border: ${r.brutalism.borderWidth} solid
1846
2595
  ${r.colors.neutral[900]};
1847
2596
  background: ${o ? r.colors.neutral[900] : "transparent"};
@@ -1851,7 +2600,7 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1851
2600
  &:hover:not(:disabled) {
1852
2601
  background: ${o ? r.colors.neutral[600] : r.colors.neutral[100]};
1853
2602
  }
1854
- ` : t`
2603
+ ` : s`
1855
2604
  border: 1px solid
1856
2605
  ${o ? r.colors.primary[500] : "transparent"};
1857
2606
  border-radius: ${r.radius.md};
@@ -1873,180 +2622,180 @@ const Wo = (o, r) => o === "sm" ? `${r.spacing[1]} ${r.spacing[2]}` : o === "lg"
1873
2622
  outline: 2px solid ${({ theme: o }) => o.colors.primary[500]};
1874
2623
  outline-offset: 2px;
1875
2624
  }
1876
- `, Yn = 4;
1877
- function Hn(o, r) {
1878
- 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 });
1879
2628
  }
1880
- function Un({
2629
+ function Yt({
1881
2630
  columns: o,
1882
2631
  data: r,
1883
2632
  rowKey: n,
1884
- size: e = "md",
1885
- striped: l,
1886
- bordered: a,
1887
- stickyHeader: c,
1888
- caption: d,
1889
- emptyMessage: p = "No data",
1890
- loading: $,
1891
- sort: g,
1892
- defaultSort: w,
1893
- onSortChange: x,
1894
- pageSize: f,
1895
- page: y,
1896
- defaultPage: h,
1897
- totalRows: z,
1898
- onPageChange: W,
1899
- onChange: v,
1900
- onRowClick: 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: $,
2641
+ defaultSort: h,
2642
+ onSortChange: w,
2643
+ pageSize: y,
2644
+ page: v,
2645
+ defaultPage: z,
2646
+ totalRows: O,
2647
+ onPageChange: R,
2648
+ onChange: L,
2649
+ onRowClick: g,
1901
2650
  borderColor: C,
1902
- headerColor: I,
1903
- rowColor: S,
1904
- stripeColor: T,
1905
- className: M,
1906
- style: P
2651
+ headerColor: m,
2652
+ rowColor: x,
2653
+ stripeColor: I,
2654
+ className: D,
2655
+ style: W
1907
2656
  }) {
1908
2657
  const {
1909
- activeSort: O,
1910
- sortedData: K,
1911
- handleSort: N
1912
- } = Tn({
2658
+ activeSort: M,
2659
+ sortedData: A,
2660
+ handleSort: _
2661
+ } = It({
1913
2662
  data: r,
1914
- sort: g,
1915
- defaultSort: w,
1916
- onSortChange: x
2663
+ sort: $,
2664
+ defaultSort: h,
2665
+ onSortChange: w
1917
2666
  }), {
1918
- activePage: E,
1919
- totalPages: q,
1920
- displayData: u,
1921
- handlePageChange: B
1922
- } = Mn({
1923
- data: K,
1924
- pageSize: f,
1925
- page: y,
1926
- defaultPage: h,
1927
- totalRows: z,
1928
- onPageChange: W
1929
- }), Y = (m) => {
1930
- const L = N(m);
1931
- v?.({ sort: L, page: E });
1932
- }, H = (m) => {
1933
- B(m), v?.({ sort: O, page: m });
1934
- }, Z = (m, L) => String(n ? m[n] : L), Q = !$ && u.length === 0, Eo = f ?? Yn;
1935
- return /* @__PURE__ */ k(
1936
- 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,
1937
2686
  {
1938
2687
  $borderColor: C,
1939
- $stickyHeader: c,
1940
- className: M,
1941
- style: P,
2688
+ $stickyHeader: d,
2689
+ className: D,
2690
+ style: W,
1942
2691
  children: [
1943
- /* @__PURE__ */ k(On, { $size: e, children: [
1944
- d && /* @__PURE__ */ s("caption", { children: d }),
1945
- /* @__PURE__ */ s(
1946
- Pn,
2692
+ /* @__PURE__ */ S(Et, { $size: t, children: [
2693
+ p && /* @__PURE__ */ e("caption", { children: p }),
2694
+ /* @__PURE__ */ e(
2695
+ Mt,
1947
2696
  {
1948
- $headerColor: I,
2697
+ $headerColor: m,
1949
2698
  $borderColor: C,
1950
- $stickyHeader: c,
1951
- children: /* @__PURE__ */ s(X, { children: o.map((m) => /* @__PURE__ */ s(
1952
- Ln,
2699
+ $stickyHeader: d,
2700
+ children: /* @__PURE__ */ e($o, { children: o.map((k) => /* @__PURE__ */ e(
2701
+ Nt,
1953
2702
  {
1954
- $size: e,
1955
- $bordered: a,
2703
+ $size: t,
2704
+ $bordered: l,
1956
2705
  scope: "col",
1957
- style: m.width ? { width: m.width } : void 0,
1958
- children: m.sortable ? /* @__PURE__ */ k(
1959
- Fn,
2706
+ style: k.width ? { width: k.width } : void 0,
2707
+ children: k.sortable ? /* @__PURE__ */ S(
2708
+ Pt,
1960
2709
  {
1961
2710
  type: "button",
1962
- onClick: () => Y(m.key),
1963
- "aria-label": `Sort by ${m.header}${O?.key === m.key ? `, ${O.direction}ending` : ""}`,
2711
+ onClick: () => K(k.key),
2712
+ "aria-label": `Sort by ${k.header}${M?.key === k.key ? `, ${M.direction}ending` : ""}`,
1964
2713
  children: [
1965
- m.header,
1966
- /* @__PURE__ */ s(Bn, { "aria-hidden": "true", children: Hn(O, m.key) })
2714
+ k.header,
2715
+ /* @__PURE__ */ e(Rt, { "aria-hidden": "true", children: Ht(M, k.key) })
1967
2716
  ]
1968
2717
  }
1969
- ) : m.header
2718
+ ) : k.header
1970
2719
  },
1971
- m.key
2720
+ k.key
1972
2721
  )) })
1973
2722
  }
1974
2723
  ),
1975
- /* @__PURE__ */ s(
1976
- Nn,
2724
+ /* @__PURE__ */ e(
2725
+ Ot,
1977
2726
  {
1978
- $striped: l,
1979
- $rowColor: S,
1980
- $stripeColor: T,
1981
- children: $ ? Array.from({ length: Eo }).map((m, L) => /* @__PURE__ */ s(X, { children: o.map((uo) => /* @__PURE__ */ s(
1982
- jn,
2727
+ $striped: a,
2728
+ $rowColor: x,
2729
+ $stripeColor: I,
2730
+ children: f ? Array.from({ length: to }).map((k, N) => /* @__PURE__ */ e($o, { children: o.map((Y) => /* @__PURE__ */ e(
2731
+ At,
1983
2732
  {
1984
- $size: e,
1985
- $bordered: a,
2733
+ $size: t,
2734
+ $bordered: l,
1986
2735
  $borderColor: C,
1987
- children: /* @__PURE__ */ s(An, {})
2736
+ children: /* @__PURE__ */ e(Bt, {})
1988
2737
  },
1989
- uo.key
1990
- )) }, L)) : Q ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(Vn, { colSpan: o.length, children: p }) }) : u.map((m, L) => /* @__PURE__ */ s(
1991
- b ? 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,
1992
2741
  {
1993
- onClick: b ? () => b(m) : void 0,
1994
- $accentColor: b ? C : void 0,
1995
- children: o.map((G) => /* @__PURE__ */ s(
1996
- Oo,
2742
+ onClick: g ? () => g(k) : void 0,
2743
+ $accentColor: g ? C : void 0,
2744
+ children: o.map((H) => /* @__PURE__ */ e(
2745
+ ir,
1997
2746
  {
1998
- $size: e,
1999
- $bordered: a,
2747
+ $size: t,
2748
+ $bordered: l,
2000
2749
  $borderColor: C,
2001
- children: G.render ? G.render(m[G.key], m, L) : String(m[G.key] ?? "") || " "
2750
+ children: H.render ? H.render(k[H.key], k, N) : String(k[H.key] ?? "") || " "
2002
2751
  },
2003
- G.key
2752
+ H.key
2004
2753
  ))
2005
2754
  },
2006
- Z(m, L)
2755
+ q(k, N)
2007
2756
  ))
2008
2757
  }
2009
2758
  )
2010
2759
  ] }),
2011
- f && q > 1 && /* @__PURE__ */ k(Rn, { children: [
2012
- /* @__PURE__ */ s(
2013
- no,
2760
+ y && j > 1 && /* @__PURE__ */ S(_t, { children: [
2761
+ /* @__PURE__ */ e(
2762
+ vo,
2014
2763
  {
2015
2764
  type: "button",
2016
- onClick: () => H(E - 1),
2017
- disabled: E <= 1,
2765
+ onClick: () => ro(P - 1),
2766
+ disabled: P <= 1,
2018
2767
  "aria-label": "Previous page",
2019
2768
  children: "←"
2020
2769
  }
2021
2770
  ),
2022
- Dn(E, q).map(
2023
- (m, L) => m === "..." ? /* @__PURE__ */ s(
2771
+ Tt(P, j).map(
2772
+ (k, N) => k === "..." ? /* @__PURE__ */ e(
2024
2773
  "span",
2025
2774
  {
2026
2775
  "aria-hidden": "true",
2027
2776
  style: { padding: "0 4px" },
2028
2777
  children: "…"
2029
2778
  },
2030
- `e${L}`
2031
- ) : /* @__PURE__ */ s(
2032
- no,
2779
+ `e${N}`
2780
+ ) : /* @__PURE__ */ e(
2781
+ vo,
2033
2782
  {
2034
2783
  type: "button",
2035
- $active: m === E,
2036
- onClick: () => H(m),
2037
- "aria-label": `Page ${m}`,
2038
- "aria-current": m === E ? "page" : void 0,
2039
- 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
2040
2789
  },
2041
- m
2790
+ k
2042
2791
  )
2043
2792
  ),
2044
- /* @__PURE__ */ s(
2045
- no,
2793
+ /* @__PURE__ */ e(
2794
+ vo,
2046
2795
  {
2047
2796
  type: "button",
2048
- onClick: () => H(E + 1),
2049
- disabled: E >= q,
2797
+ onClick: () => ro(P + 1),
2798
+ disabled: P >= j,
2050
2799
  "aria-label": "Next page",
2051
2800
  children: "→"
2052
2801
  }
@@ -2056,29 +2805,18 @@ function Un({
2056
2805
  }
2057
2806
  );
2058
2807
  }
2059
- Un.displayName = "Table";
2060
- function mt({
2061
- defaultSort: o,
2062
- defaultPage: r = 1
2063
- } = {}) {
2064
- const [n, e] = D(o ?? null), [l, a] = D(r);
2065
- return { sort: n, page: l, onSortChange: (p) => {
2066
- e(p), a(1);
2067
- }, onPageChange: (p) => {
2068
- a(p);
2069
- } };
2070
- }
2071
- const Kn = i.p`
2808
+ Yt.displayName = "Table";
2809
+ const Ut = i.p`
2072
2810
  margin: 0;
2073
2811
  font-size: ${({ theme: o }) => o.fontSizes.md};
2074
2812
  color: ${({ theme: o }) => o.colors.neutral[600]};
2075
2813
  line-height: 1.5;
2076
- `, qn = i.button`
2814
+ `, Kt = i.button`
2077
2815
  display: inline-flex;
2078
2816
  align-items: center;
2079
2817
  justify-content: center;
2080
2818
  border-radius: ${({ theme: o }) => o.radius.md};
2081
- font-weight: 600;
2819
+ font-weight: ${({ theme: o }) => o.fontWeights.semibold};
2082
2820
  cursor: pointer;
2083
2821
  padding: ${({ theme: o }) => o.spacing[2]} ${({ theme: o }) => o.spacing[4]};
2084
2822
  font-size: ${({ theme: o }) => o.fontSizes.md};
@@ -2100,7 +2838,7 @@ const Kn = i.p`
2100
2838
  cursor: not-allowed;
2101
2839
  }
2102
2840
 
2103
- ${({ theme: o }) => o.brutalism && t`
2841
+ ${({ theme: o }) => o.brutalism && s`
2104
2842
  border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
2105
2843
  box-shadow: ${o.brutalism.shadowOffset}
2106
2844
  ${o.brutalism.shadowOffset} 0 ${o.colors.neutral[900]};
@@ -2114,47 +2852,47 @@ const Kn = i.p`
2114
2852
  }
2115
2853
  `}
2116
2854
  `;
2117
- function Po({
2855
+ function ar({
2118
2856
  open: o,
2119
2857
  title: r = "Are you sure?",
2120
2858
  message: n,
2121
- confirmLabel: e = "Confirm",
2122
- cancelLabel: l = "Cancel",
2123
- variant: a = "default",
2124
- size: c = "sm",
2125
- onConfirm: d,
2126
- onCancel: p
2859
+ confirmLabel: t = "Confirm",
2860
+ cancelLabel: a = "Cancel",
2861
+ variant: l = "default",
2862
+ size: d = "sm",
2863
+ onConfirm: p,
2864
+ onCancel: u
2127
2865
  }) {
2128
- return /* @__PURE__ */ s(
2129
- Io,
2866
+ return /* @__PURE__ */ e(
2867
+ Go,
2130
2868
  {
2131
2869
  open: o,
2132
- onClose: p,
2870
+ onClose: u,
2133
2871
  title: r,
2134
- size: c,
2872
+ size: d,
2135
2873
  closeOnBackdrop: !1,
2136
- footer: /* @__PURE__ */ k(Lo, { children: [
2137
- /* @__PURE__ */ s(so, { variant: "outline", onClick: p, children: l }),
2138
- 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 })
2139
2877
  ] }),
2140
- children: /* @__PURE__ */ s(Kn, { children: n })
2878
+ children: /* @__PURE__ */ e(Ut, { children: n })
2141
2879
  }
2142
2880
  );
2143
2881
  }
2144
- Po.displayName = "ConfirmDialog";
2145
- const No = ao(null);
2146
- function vt({ children: o }) {
2147
- const [r, n] = D(null), e = V((c) => new Promise((d) => {
2148
- n({ ...c, resolve: d });
2149
- }), []), 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 = () => {
2150
2888
  r?.resolve(!0), n(null);
2151
- }, a = () => {
2889
+ }, l = () => {
2152
2890
  r?.resolve(!1), n(null);
2153
2891
  };
2154
- return /* @__PURE__ */ k(No.Provider, { value: { confirm: e }, children: [
2892
+ return /* @__PURE__ */ S(lr.Provider, { value: { confirm: t }, children: [
2155
2893
  o,
2156
- r && /* @__PURE__ */ s(
2157
- Po,
2894
+ r && /* @__PURE__ */ e(
2895
+ ar,
2158
2896
  {
2159
2897
  open: !0,
2160
2898
  title: r.title,
@@ -2163,24 +2901,24 @@ function vt({ children: o }) {
2163
2901
  cancelLabel: r.cancelLabel,
2164
2902
  variant: r.variant,
2165
2903
  size: r.size,
2166
- onConfirm: l,
2167
- onCancel: a
2904
+ onConfirm: a,
2905
+ onCancel: l
2168
2906
  }
2169
2907
  )
2170
2908
  ] });
2171
2909
  }
2172
- function kt() {
2173
- const o = io(No);
2910
+ function Cs() {
2911
+ const o = To(lr);
2174
2912
  if (!o)
2175
2913
  throw new Error("useConfirm must be used within a ConfirmProvider");
2176
2914
  return o.confirm;
2177
2915
  }
2178
- const Gn = i.div`
2916
+ const qt = i.div`
2179
2917
  position: relative;
2180
2918
  display: inline-flex;
2181
2919
  flex-direction: column;
2182
2920
  gap: ${({ theme: o }) => o.spacing[1]};
2183
- `, Jn = i.div`
2921
+ `, Gt = i.div`
2184
2922
  display: flex;
2185
2923
  align-items: center;
2186
2924
  border-radius: ${({ theme: o }) => o.radius.md};
@@ -2192,35 +2930,35 @@ const Gn = i.div`
2192
2930
  box-shadow 0.2s;
2193
2931
 
2194
2932
  ${({ $size: o, theme: r }) => ({
2195
- sm: t`
2933
+ sm: s`
2196
2934
  padding: ${r.spacing[1]} ${r.spacing[2]};
2197
2935
  font-size: ${r.fontSizes.sm};
2198
2936
  `,
2199
- md: t`
2937
+ md: s`
2200
2938
  padding: ${r.spacing[2]} ${r.spacing[3]};
2201
2939
  font-size: ${r.fontSizes.md};
2202
2940
  `,
2203
- lg: t`
2941
+ lg: s`
2204
2942
  padding: ${r.spacing[3]} ${r.spacing[4]};
2205
2943
  font-size: ${r.fontSizes.lg};
2206
2944
  `
2207
2945
  })[o]}
2208
2946
 
2209
- ${({ theme: o }) => o.brutalism ? t`
2947
+ ${({ theme: o }) => o.brutalism ? s`
2210
2948
  border: ${o.brutalism.borderWidth} solid
2211
2949
  ${o.colors.neutral[900]};
2212
2950
  background-color: ${o.colors.neutral[0]};
2213
2951
  box-shadow: 3px 3px 0 ${o.colors.neutral[900]};
2214
- ` : t`
2952
+ ` : s`
2215
2953
  border: 1px solid ${o.colors.neutral[400]};
2216
2954
  background-color: ${o.colors.neutral[0]};
2217
2955
  `}
2218
2956
 
2219
- ${({ $error: o, theme: r }) => o && t`
2957
+ ${({ $error: o, theme: r }) => o && s`
2220
2958
  border-color: ${r.colors.error[500]};
2221
2959
  `}
2222
2960
 
2223
- ${({ $disabled: o }) => o && t`
2961
+ ${({ $disabled: o }) => o && s`
2224
2962
  cursor: not-allowed;
2225
2963
  opacity: 0.6;
2226
2964
  `}
@@ -2229,19 +2967,19 @@ const Gn = i.div`
2229
2967
  outline: none;
2230
2968
  box-shadow: ${({ theme: o }) => o.shadows.focusRing};
2231
2969
  }
2232
- `, Xn = i.span`
2970
+ `, Xt = i.span`
2233
2971
  flex: 1;
2234
2972
  color: ${({ $hasValue: o, theme: r }) => o ? r.colors.neutral[900] : r.colors.neutral[400]};
2235
2973
  white-space: nowrap;
2236
2974
  overflow: hidden;
2237
2975
  text-overflow: ellipsis;
2238
- `, Zn = i.span`
2976
+ `, Jt = i.span`
2239
2977
  display: inline-flex;
2240
2978
  align-items: center;
2241
2979
  margin-left: ${({ theme: o }) => o.spacing[2]};
2242
2980
  color: ${({ theme: o }) => o.colors.neutral[500]};
2243
2981
  flex-shrink: 0;
2244
- `, Qn = i.button`
2982
+ `, Qt = i.button`
2245
2983
  display: inline-flex;
2246
2984
  align-items: center;
2247
2985
  margin-left: ${({ theme: o }) => o.spacing[2]};
@@ -2261,10 +2999,12 @@ const Gn = i.div`
2261
2999
  outline-offset: 2px;
2262
3000
  border-radius: 2px;
2263
3001
  }
2264
- `, ot = i.span`
3002
+ `;
3003
+ i.span`
2265
3004
  font-size: ${({ theme: o }) => o.fontSizes.xs};
2266
3005
  color: ${({ $error: o, theme: r }) => o ? r.colors.error[500] : r.colors.neutral[500]};
2267
- `, rt = i.div`
3006
+ `;
3007
+ const Zt = i.div`
2268
3008
  position: absolute;
2269
3009
  top: calc(100% + 4px);
2270
3010
  left: 0;
@@ -2274,21 +3014,21 @@ const Gn = i.div`
2274
3014
  padding: ${({ theme: o }) => o.spacing[3]};
2275
3015
  min-width: 280px;
2276
3016
 
2277
- ${({ theme: o }) => o.brutalism ? t`
3017
+ ${({ theme: o }) => o.brutalism ? s`
2278
3018
  border: ${o.brutalism.borderWidth} solid
2279
3019
  ${o.colors.neutral[900]};
2280
3020
  box-shadow: ${o.brutalism.shadowOffset}
2281
3021
  ${o.brutalism.shadowOffset} 0 ${o.colors.neutral[900]};
2282
- ` : t`
3022
+ ` : s`
2283
3023
  border: 1px solid ${o.colors.neutral[200]};
2284
3024
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
2285
3025
  `}
2286
- `, nt = i.div`
3026
+ `, os = i.div`
2287
3027
  display: flex;
2288
3028
  align-items: center;
2289
3029
  justify-content: space-between;
2290
3030
  margin-bottom: ${({ theme: o }) => o.spacing[3]};
2291
- `, ho = i.button`
3031
+ `, Bo = i.button`
2292
3032
  display: inline-flex;
2293
3033
  align-items: center;
2294
3034
  justify-content: center;
@@ -2311,31 +3051,31 @@ const Gn = i.div`
2311
3051
  outline-offset: 2px;
2312
3052
  }
2313
3053
 
2314
- ${({ theme: o }) => o.brutalism && t`
3054
+ ${({ theme: o }) => o.brutalism && s`
2315
3055
  border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
2316
3056
  &:hover {
2317
3057
  background-color: ${o.colors.neutral[100]};
2318
3058
  transform: translate(1px, 1px);
2319
3059
  }
2320
3060
  `}
2321
- `, tt = i.span`
2322
- font-weight: 600;
3061
+ `, rs = i.span`
3062
+ font-weight: ${({ theme: o }) => o.fontWeights.semibold};
2323
3063
  font-size: ${({ theme: o }) => o.fontSizes.md};
2324
3064
  color: ${({ theme: o }) => o.colors.neutral[900]};
2325
- `, st = i.div`
3065
+ `, ns = i.div`
2326
3066
  display: grid;
2327
3067
  grid-template-columns: repeat(7, 1fr);
2328
- gap: 2px;
2329
- `, et = i.span`
3068
+ gap: ${({ theme: o }) => o.spacing[0.5]};
3069
+ `, ts = i.span`
2330
3070
  display: flex;
2331
3071
  align-items: center;
2332
3072
  justify-content: center;
2333
3073
  font-size: ${({ theme: o }) => o.fontSizes.xs};
2334
- font-weight: 600;
3074
+ font-weight: ${({ theme: o }) => o.fontWeights.semibold};
2335
3075
  color: ${({ theme: o }) => o.colors.neutral[500]};
2336
3076
  padding: ${({ theme: o }) => o.spacing[1]};
2337
- margin-bottom: 2px;
2338
- `, wo = i.button`
3077
+ margin-bottom: ${({ theme: o }) => o.spacing[0.5]};
3078
+ `, ko = i.button`
2339
3079
  display: flex;
2340
3080
  align-items: center;
2341
3081
  justify-content: center;
@@ -2346,15 +3086,36 @@ const Gn = i.div`
2346
3086
  cursor: pointer;
2347
3087
  font-size: ${({ theme: o }) => o.fontSizes.sm};
2348
3088
  padding: ${({ theme: o }) => o.spacing[1]};
2349
- 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};
2350
3097
  pointer-events: ${({ $currentMonth: o }) => o ? "auto" : "none"};
2351
3098
 
2352
- 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]};
2353
-
2354
- 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"};
2355
3116
 
2356
3117
  &:hover:not(:disabled) {
2357
- 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]};
2358
3119
  }
2359
3120
 
2360
3121
  &:disabled {
@@ -2367,13 +3128,13 @@ const Gn = i.div`
2367
3128
  outline-offset: 1px;
2368
3129
  }
2369
3130
 
2370
- ${({ $selected: o, $today: r, theme: n }) => n.brutalism && (o || r) && t`
2371
- border: ${n.brutalism.borderWidth} solid ${n.colors.neutral[900]};
2372
- ${o && t`
2373
- 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]};
2374
3135
  `}
2375
3136
  `}
2376
- `, it = [
3137
+ `, ss = [
2377
3138
  "January",
2378
3139
  "February",
2379
3140
  "March",
@@ -2386,43 +3147,45 @@ const Gn = i.div`
2386
3147
  "October",
2387
3148
  "November",
2388
3149
  "December"
2389
- ], at = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
2390
- function mo(o, r) {
3150
+ ], es = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
3151
+ function _o(o, r) {
2391
3152
  return new Date(o, r + 1, 0).getDate();
2392
3153
  }
2393
- function lt(o, r) {
3154
+ function is(o, r) {
2394
3155
  return new Date(o, r, 1).getDay();
2395
3156
  }
2396
- function vo(o, r) {
3157
+ function co(o, r) {
2397
3158
  return o.getFullYear() === r.getFullYear() && o.getMonth() === r.getMonth() && o.getDate() === r.getDate();
2398
3159
  }
2399
- function ct(o, r, n) {
3160
+ function as(o, r, n) {
2400
3161
  if (r) {
2401
- const e = new Date(
3162
+ const t = new Date(
2402
3163
  r.getFullYear(),
2403
3164
  r.getMonth(),
2404
3165
  r.getDate()
2405
3166
  );
2406
- if (o < e) return !0;
3167
+ if (o < t)
3168
+ return !0;
2407
3169
  }
2408
3170
  if (n) {
2409
- const e = new Date(
3171
+ const t = new Date(
2410
3172
  n.getFullYear(),
2411
3173
  n.getMonth(),
2412
3174
  n.getDate()
2413
3175
  );
2414
- if (o > e) return !0;
3176
+ if (o > t)
3177
+ return !0;
2415
3178
  }
2416
3179
  return !1;
2417
3180
  }
2418
- function dt(o) {
3181
+ function jo(o) {
2419
3182
  return o.toLocaleDateString("en-US", {
2420
3183
  month: "short",
2421
3184
  day: "numeric",
2422
3185
  year: "numeric"
2423
3186
  });
2424
3187
  }
2425
- function ut(o) {
3188
+ function Ho(o) {
2426
3189
  return o.toLocaleDateString("en-US", {
2427
3190
  weekday: "long",
2428
3191
  month: "long",
@@ -2430,153 +3193,244 @@ function ut(o) {
2430
3193
  year: "numeric"
2431
3194
  });
2432
3195
  }
2433
- function pt({
2434
- value: o = null,
2435
- onChange: r,
2436
- placeholder: n = "Select date...",
2437
- size: e = "md",
2438
- disabled: l = !1,
2439
- clearable: a = !1,
2440
- minDate: c,
2441
- maxDate: d,
2442
- formatDate: p,
2443
- id: $,
2444
- error: g
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
2445
3229
  }) {
2446
- const w = R(), x = $ ?? w, f = /* @__PURE__ */ new Date(), [y, h] = D(!1), [z, W] = D(
2447
- () => (o ?? f).getFullYear()
2448
- ), [v, b] = D(() => (o ?? f).getMonth()), C = j(null);
2449
- A(() => {
2450
- if (!y) return;
2451
- const u = (B) => {
2452
- C.current && !C.current.contains(B.target) && h(!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"));
2453
3240
  };
2454
- return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
2455
- }, [y]), A(() => {
2456
- o && (W(o.getFullYear()), b(o.getMonth()));
2457
- }, [o]);
2458
- const I = o ? p ? p(o) : dt(o) : "", S = (u) => {
2459
- r?.(new Date(z, v, u)), h(!1);
2460
- }, T = (u) => {
2461
- u.stopPropagation(), r?.(null);
2462
- }, M = () => {
2463
- v === 0 ? (b(11), W((u) => u - 1)) : b((u) => u - 1);
2464
- }, P = () => {
2465
- v === 11 ? (b(0), W((u) => u + 1)) : b((u) => u + 1);
2466
- }, O = mo(z, v), K = lt(z, v), N = [], E = mo(
2467
- v === 0 ? z - 1 : z,
2468
- v === 0 ? 11 : v - 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
2469
3298
  );
2470
- for (let u = K - 1; u >= 0; u--)
2471
- N.push({ day: E - u, currentMonth: !1 });
2472
- for (let u = 1; u <= O; u++)
2473
- N.push({ day: u, currentMonth: !0 });
2474
- const q = 42 - N.length;
2475
- for (let u = 1; u <= q; u++)
2476
- N.push({ day: u, currentMonth: !1 });
2477
- return /* @__PURE__ */ k(Gn, { ref: C, children: [
2478
- /* @__PURE__ */ k(
2479
- Jn,
2480
- {
2481
- id: x,
2482
- $size: e,
2483
- $error: !!g,
2484
- $disabled: l,
2485
- role: "combobox",
2486
- "aria-haspopup": "true",
2487
- "aria-expanded": y,
2488
- tabIndex: l ? -1 : 0,
2489
- onClick: () => {
2490
- l || h((u) => !u);
2491
- },
2492
- onKeyDown: (u) => {
2493
- (u.key === "Enter" || u.key === " ") && !l && (u.preventDefault(), h((B) => !B)), u.key === "Escape" && h(!1);
2494
- },
2495
- children: [
2496
- /* @__PURE__ */ s(Xn, { $hasValue: !!o, children: I || n }),
2497
- a && o ? /* @__PURE__ */ s(
2498
- Qn,
2499
- {
2500
- type: "button",
2501
- onClick: T,
2502
- "aria-label": "Clear date",
2503
- children: /* @__PURE__ */ s(co, { size: 14 })
2504
- }
2505
- ) : /* @__PURE__ */ s(Zn, { "aria-hidden": "true", children: /* @__PURE__ */ s($r, { size: 14 }) })
2506
- ]
2507
- }
2508
- ),
2509
- typeof g == "string" && /* @__PURE__ */ s(ot, { $error: !0, children: g }),
2510
- y && /* @__PURE__ */ k(rt, { role: "dialog", "aria-label": "Calendar", children: [
2511
- /* @__PURE__ */ k(nt, { children: [
2512
- /* @__PURE__ */ s(
2513
- 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,
2514
3316
  {
2515
- type: "button",
2516
- onClick: M,
2517
- "aria-label": "Previous month",
2518
- 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
+ ]
2519
3338
  }
2520
3339
  ),
2521
- /* @__PURE__ */ k(tt, { children: [
2522
- it[v],
2523
- " ",
2524
- z
2525
- ] }),
2526
- /* @__PURE__ */ s(
2527
- ho,
2528
- {
2529
- type: "button",
2530
- onClick: P,
2531
- "aria-label": "Next month",
2532
- children: /* @__PURE__ */ s(hr, { size: 16 })
2533
- }
2534
- )
2535
- ] }),
2536
- /* @__PURE__ */ k(st, { children: [
2537
- at.map((u) => /* @__PURE__ */ s(et, { children: u }, u)),
2538
- N.map((u, B) => {
2539
- if (!u.currentMonth)
2540
- return /* @__PURE__ */ s(
2541
- wo,
3340
+ W && /* @__PURE__ */ S(Zt, { role: "dialog", "aria-label": "Calendar", children: [
3341
+ /* @__PURE__ */ S(os, { children: [
3342
+ /* @__PURE__ */ e(
3343
+ Bo,
2542
3344
  {
2543
3345
  type: "button",
2544
- $currentMonth: !1,
2545
- $selected: !1,
2546
- $today: !1,
2547
- disabled: !0,
2548
- tabIndex: -1,
2549
- children: u.day
2550
- },
2551
- B
2552
- );
2553
- const Y = new Date(z, v, u.day), H = o ? vo(Y, o) : !1, Z = vo(Y, f), Q = ct(Y, c, d);
2554
- return /* @__PURE__ */ s(
2555
- wo,
2556
- {
2557
- type: "button",
2558
- $currentMonth: !0,
2559
- $selected: H,
2560
- $today: Z,
2561
- disabled: Q,
2562
- "aria-label": ut(Y),
2563
- "aria-pressed": H,
2564
- onClick: () => S(u.day),
2565
- children: u.day
2566
- },
2567
- B
2568
- );
2569
- })
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
+ ] })
2570
3424
  ] })
2571
- ] })
2572
- ] });
3425
+ }
3426
+ );
2573
3427
  }
2574
- pt.displayName = "DatePicker";
2575
- function ft(o) {
2576
- 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;
2577
- 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";
2578
3432
  }
2579
- const eo = {
3433
+ const Io = {
2580
3434
  colors: {
2581
3435
  primary: {
2582
3436
  50: "#fffde6",
@@ -2599,34 +3453,45 @@ const eo = {
2599
3453
  warning: { 50: "#fffbe6", 500: "#ff9900" },
2600
3454
  info: { 50: "#f0f0ff", 500: "#3333ff" }
2601
3455
  },
2602
- 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
+ },
2603
3467
  radius: { md: "2px" },
2604
3468
  zIndex: { modal: 1e3, toast: 1100 },
2605
3469
  fontSizes: { xs: "12px", sm: "14px", md: "16px", lg: "18px" },
3470
+ fontWeights: { normal: "400", medium: "500", semibold: "600", bold: "700" },
2606
3471
  shadows: { focusRing: "3px 3px 0 #111111" },
2607
3472
  brutalism: { borderWidth: "2px", shadowOffset: "4px" }
2608
3473
  };
2609
- function Ct(o) {
3474
+ function Is(o) {
2610
3475
  return {
2611
- ...eo,
3476
+ ...Io,
2612
3477
  colors: {
2613
- ...eo.colors,
3478
+ ...Io.colors,
2614
3479
  primary: {
2615
3480
  50: "#fffff0",
2616
3481
  500: o,
2617
3482
  700: o,
2618
- contrast: ft(o)
3483
+ contrast: cs(o)
2619
3484
  }
2620
3485
  }
2621
3486
  };
2622
3487
  }
2623
- function St({
2624
- theme: o = eo,
3488
+ function Ts({
3489
+ theme: o = Io,
2625
3490
  children: r
2626
3491
  }) {
2627
- return /* @__PURE__ */ s(Fo, { theme: o, children: r });
3492
+ return /* @__PURE__ */ e(ur, { theme: o, children: r });
2628
3493
  }
2629
- const zt = Bo`
3494
+ const Ws = pr`
2630
3495
  *, *::before, *::after {
2631
3496
  box-sizing: border-box;
2632
3497
  margin: 0;
@@ -2645,31 +3510,41 @@ const zt = Bo`
2645
3510
  }
2646
3511
  `;
2647
3512
  export {
2648
- _o as Badge,
2649
- so as Button,
2650
- wn as CollapsibleCard,
2651
- Po as ConfirmDialog,
2652
- vt as ConfirmProvider,
2653
- pt as DatePicker,
2654
- Mr as Editable,
2655
- Er as Field,
2656
- an as Form,
2657
- ln as FormField,
2658
- zt as GlobalStyles,
2659
- qo as Input,
2660
- To as Link,
2661
- Io as Modal,
2662
- Tr as Select,
2663
- Sn as Spinner,
2664
- Un as Table,
2665
- or as Textarea,
2666
- St as ThemeProvider,
2667
- Do as Toast,
2668
- yt as ToastProvider,
2669
- Ct as createNeoBrutalTheme,
2670
- eo as neoBrutalTheme,
2671
- kt as useConfirm,
2672
- wt as useForm,
2673
- mt as useTable,
2674
- 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
2675
3550
  };