@classytic/fluid 0.4.2 → 0.5.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 (51) hide show
  1. package/README.md +21 -1
  2. package/dist/client/calendar.d.mts +1 -2
  3. package/dist/client/calendar.mjs +4 -4
  4. package/dist/client/color-picker.d.mts +41 -25
  5. package/dist/client/color-picker.mjs +121 -73
  6. package/dist/client/core.d.mts +243 -557
  7. package/dist/client/core.mjs +351 -1462
  8. package/dist/client/error.d.mts +41 -41
  9. package/dist/client/error.mjs +35 -35
  10. package/dist/client/gallery.d.mts +33 -33
  11. package/dist/client/gallery.mjs +128 -127
  12. package/dist/client/hooks.d.mts +57 -39
  13. package/dist/client/hooks.mjs +29 -7
  14. package/dist/client/spreadsheet.d.mts +28 -28
  15. package/dist/client/spreadsheet.mjs +77 -77
  16. package/dist/client/table.d.mts +66 -33
  17. package/dist/client/table.mjs +87 -54
  18. package/dist/client/theme.mjs +1 -1
  19. package/dist/command.d.mts +6 -4
  20. package/dist/command.mjs +3 -3
  21. package/dist/compact.d.mts +97 -95
  22. package/dist/compact.mjs +336 -322
  23. package/dist/dashboard.d.mts +614 -422
  24. package/dist/dashboard.mjs +1051 -762
  25. package/dist/{dropdown-wrapper-B86u9Fri.mjs → dropdown-wrapper-B9nRDUlz.mjs} +25 -35
  26. package/dist/forms.d.mts +1037 -972
  27. package/dist/forms.mjs +2849 -2721
  28. package/dist/index.d.mts +218 -152
  29. package/dist/index.mjs +357 -264
  30. package/dist/layouts.d.mts +94 -94
  31. package/dist/layouts.mjs +115 -110
  32. package/dist/phone-input-B9_XPNvv.mjs +429 -0
  33. package/dist/phone-input-CLH_UjQZ.d.mts +31 -0
  34. package/dist/{search-context-DR7DBs7S.mjs → search-context-1g3ZmOvx.mjs} +1 -1
  35. package/dist/search.d.mts +168 -164
  36. package/dist/search.mjs +305 -301
  37. package/dist/{sheet-wrapper-C13Y-Q6w.mjs → sheet-wrapper-B2uxookb.mjs} +1 -1
  38. package/dist/timeline-Bgu1mIe9.d.mts +373 -0
  39. package/dist/timeline-HJtWf4Op.mjs +804 -0
  40. package/dist/{use-base-search-BGgWnWaF.d.mts → use-base-search-DFC4QKYU.d.mts} +1 -1
  41. package/dist/{use-media-query-BnVNIKT4.mjs → use-media-query-ChLfFChU.mjs} +6 -7
  42. package/package.json +2 -2
  43. /package/dist/{api-pagination-CJ0vR_w6.d.mts → api-pagination-C30ser2L.d.mts} +0 -0
  44. /package/dist/{filter-utils-DqMmy_v-.mjs → filter-utils-BGIvtq1R.mjs} +0 -0
  45. /package/dist/{filter-utils-IZ0GtuPo.d.mts → filter-utils-DOFTBWm1.d.mts} +0 -0
  46. /package/dist/{use-debounce-xmZucz5e.mjs → use-debounce-BNoNiEon.mjs} +0 -0
  47. /package/dist/{use-keyboard-shortcut-Bl6YM5Q7.mjs → use-keyboard-shortcut-C_Vk-36P.mjs} +0 -0
  48. /package/dist/{use-keyboard-shortcut-_mRCh3QO.d.mts → use-keyboard-shortcut-Q4CSPzSI.d.mts} +0 -0
  49. /package/dist/{use-mobile-BX3SQVo2.mjs → use-mobile-CnEmFiQx.mjs} +0 -0
  50. /package/dist/{use-scroll-detection-CsgsQYvy.mjs → use-scroll-detection-BKfqkmEC.mjs} +0 -0
  51. /package/dist/{utils-CDue7cEt.d.mts → utils-rqvYP1by.d.mts} +0 -0
package/dist/forms.d.mts CHANGED
@@ -1,318 +1,190 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { n as PhoneCountry } from "./phone-input-CLH_UjQZ.mjs";
2
2
  import * as React$1 from "react";
3
3
  import { ComponentType, InputHTMLAttributes, ReactNode, Ref } from "react";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
  import { LucideIcon } from "lucide-react";
5
6
  import { Control, FieldError, FieldPath, FieldValues } from "react-hook-form";
6
7
 
7
- //#region src/components/form/form-input.d.ts
8
- interface TransformFunctions {
9
- input?: (value: unknown) => string;
10
- output?: (value: string) => unknown;
8
+ //#region src/components/form/async-combobox.d.ts
9
+ interface AsyncComboboxOption {
10
+ value: string;
11
+ label: string;
12
+ disabled?: boolean;
11
13
  }
12
- interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
13
- control?: Control<TFieldValues>;
14
- name: FieldPath<TFieldValues> | string;
14
+ interface AsyncComboboxProps<T extends FieldValues = FieldValues> {
15
+ control?: Control<T>;
16
+ name: FieldPath<T> | string;
15
17
  label?: string;
16
18
  placeholder?: string;
19
+ emptyText?: string;
17
20
  description?: string;
18
21
  helperText?: string;
19
22
  required?: boolean;
20
23
  disabled?: boolean;
21
- readOnly?: boolean;
22
- type?: string;
24
+ onSearch: (query: string) => Promise<AsyncComboboxOption[]>;
25
+ debounceMs?: number;
26
+ minChars?: number;
27
+ initialItems?: AsyncComboboxOption[];
28
+ isLoading?: boolean;
29
+ hasMore?: boolean;
30
+ onLoadMore?: () => void;
31
+ value?: string;
32
+ onChange?: (v: string) => void;
33
+ onValueChange?: (v: string) => void;
23
34
  className?: string;
24
35
  labelClassName?: string;
25
36
  inputClassName?: string;
26
- inputGroupClassName?: string;
27
- iconLeft?: ReactNode;
28
- iconRight?: ReactNode;
29
- addonLeft?: ReactNode;
30
- addonRight?: ReactNode;
31
- transform?: TransformFunctions;
32
- onValueChange?: (value: unknown) => void;
33
- value?: string | number;
34
- onChange?: (value: unknown) => void;
35
- min?: number | string;
36
- max?: number | string;
37
- step?: number | string;
38
- minLength?: number;
39
- maxLength?: number;
40
- pattern?: string;
41
- autoComplete?: string;
42
- autoFocus?: boolean;
43
- inputMode?: InputHTMLAttributes<HTMLInputElement>["inputMode"];
44
- enterKeyHint?: InputHTMLAttributes<HTMLInputElement>["enterKeyHint"];
37
+ renderOption?: (option: AsyncComboboxOption) => ReactNode;
45
38
  }
46
39
  /**
47
- * FormInput - Text input with react-hook-form integration
48
- *
49
- * Features:
50
- * - Works with react-hook-form Controller
51
- * - Supports input groups with icons/addons
52
- * - Value transformation (input/output)
53
- * - Can be used standalone without form
40
+ * AsyncCombobox - Searchable select with debounced async search
54
41
  *
55
42
  * @example
56
43
  * ```tsx
57
- * // With react-hook-form
58
- * <FormInput
59
- * control={form.control}
60
- * name="email"
61
- * type="email"
62
- * label="Email"
63
- * placeholder="user@example.com"
64
- * required
65
- * />
66
- *
67
- * // With icon
68
- * <FormInput
44
+ * <AsyncCombobox
69
45
  * control={form.control}
70
- * name="search"
71
- * iconLeft={<SearchIcon />}
72
- * placeholder="Search..."
46
+ * name="city"
47
+ * label="City"
48
+ * onSearch={async (q) => {
49
+ * const res = await fetch(`/api/cities?search=${q}`);
50
+ * return res.json();
51
+ * }}
52
+ * placeholder="Search cities..."
73
53
  * />
74
54
  * ```
75
55
  */
76
- declare function FormInput<TFieldValues extends FieldValues = FieldValues>({
56
+ declare function AsyncCombobox<T extends FieldValues = FieldValues>({
77
57
  control,
78
58
  name,
79
59
  label,
80
60
  placeholder,
61
+ emptyText,
81
62
  description,
82
63
  helperText,
83
64
  required,
84
65
  disabled,
85
- readOnly,
86
- type,
66
+ onSearch,
67
+ debounceMs,
68
+ minChars,
69
+ initialItems,
70
+ isLoading: externalLoading,
71
+ hasMore,
72
+ onLoadMore,
87
73
  className,
88
74
  labelClassName,
89
75
  inputClassName,
90
- inputGroupClassName,
91
- iconLeft,
92
- iconRight,
93
- addonLeft,
94
- addonRight,
95
- onValueChange,
96
- transform,
97
- value,
98
- onChange,
99
- min,
100
- max,
101
- step,
102
- minLength,
103
- maxLength,
104
- pattern,
105
- autoComplete,
106
- autoFocus,
107
- inputMode,
108
- enterKeyHint
109
- }: FormInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
76
+ renderOption,
77
+ value: propValue,
78
+ onChange: propOnChange,
79
+ onValueChange
80
+ }: AsyncComboboxProps<T>): react_jsx_runtime0.JSX.Element;
110
81
  //#endregion
111
- //#region src/components/form/form-textarea.d.ts
112
- interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
113
- control?: Control<TFieldValues>;
114
- name: FieldPath<TFieldValues> | string;
82
+ //#region src/components/form/async-multi-select.d.ts
83
+ interface AsyncMultiSelectOption {
84
+ value: string;
85
+ label: string;
86
+ disabled?: boolean;
87
+ }
88
+ interface AsyncMultiSelectProps<T extends FieldValues = FieldValues> {
89
+ control?: Control<T>;
90
+ name: FieldPath<T> | string;
115
91
  label?: string;
116
92
  placeholder?: string;
93
+ emptyText?: string;
117
94
  description?: string;
118
95
  helperText?: string;
119
96
  required?: boolean;
120
97
  disabled?: boolean;
121
- readOnly?: boolean;
122
- rows?: number;
123
- value?: string;
124
- onChange?: (value: string) => void;
125
- onValueChange?: (value: string) => void;
98
+ onSearch: (query: string) => Promise<AsyncMultiSelectOption[]>;
99
+ debounceMs?: number;
100
+ minChars?: number;
101
+ initialItems?: AsyncMultiSelectOption[];
102
+ isLoading?: boolean;
103
+ maxSelections?: number;
104
+ clearable?: boolean;
105
+ value?: string[];
106
+ onChange?: (v: string[]) => void;
107
+ onValueChange?: (v: string[]) => void;
126
108
  className?: string;
127
109
  labelClassName?: string;
128
- textareaClassName?: string;
129
- inputGroupClassName?: string;
130
- iconLeft?: React$1.ReactNode;
131
- iconRight?: React$1.ReactNode;
132
- addonLeft?: React$1.ReactNode;
133
- addonRight?: React$1.ReactNode;
134
- minLength?: number;
135
- maxLength?: number;
136
- autoComplete?: string;
137
- autoFocus?: boolean;
110
+ inputClassName?: string;
111
+ renderOption?: (option: AsyncMultiSelectOption) => ReactNode;
138
112
  }
139
113
  /**
140
- * FormTextarea - Textarea with react-hook-form integration
114
+ * AsyncMultiSelect - Async search + chips-based multi-select
141
115
  *
142
116
  * @example
143
117
  * ```tsx
144
- * <FormTextarea
118
+ * <AsyncMultiSelect
145
119
  * control={form.control}
146
- * name="bio"
147
- * label="Biography"
148
- * placeholder="Tell us about yourself..."
149
- * rows={5}
120
+ * name="teamMembers"
121
+ * label="Team Members"
122
+ * onSearch={async (q) => {
123
+ * const res = await fetch(`/api/users?search=${q}`);
124
+ * const users = await res.json();
125
+ * return users.map(u => ({ value: u.id, label: u.name }));
126
+ * }}
127
+ * maxSelections={5}
150
128
  * />
151
129
  * ```
152
130
  */
153
- declare function FormTextarea<TFieldValues extends FieldValues = FieldValues>({
131
+ declare function AsyncMultiSelect<T extends FieldValues = FieldValues>({
154
132
  control,
155
133
  name,
156
134
  label,
135
+ placeholder,
136
+ emptyText,
157
137
  description,
158
138
  helperText,
159
139
  required,
160
140
  disabled,
161
- readOnly,
162
- placeholder,
163
- value: propValue,
164
- onChange: propOnChange,
165
- onValueChange,
141
+ onSearch,
142
+ debounceMs,
143
+ minChars,
144
+ initialItems,
145
+ isLoading: externalLoading,
146
+ maxSelections,
147
+ clearable,
166
148
  className,
167
149
  labelClassName,
168
- textareaClassName,
169
- inputGroupClassName,
170
- iconLeft,
171
- iconRight,
172
- addonLeft,
173
- addonRight,
174
- rows,
175
- minLength,
176
- maxLength,
177
- autoComplete,
178
- autoFocus
179
- }: FormTextareaProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
150
+ inputClassName,
151
+ renderOption,
152
+ value: propValue,
153
+ onChange: propOnChange,
154
+ onValueChange
155
+ }: AsyncMultiSelectProps<T>): react_jsx_runtime0.JSX.Element;
180
156
  //#endregion
181
- //#region src/components/form/select-input.d.ts
182
- interface SelectOption {
183
- value: string | number;
157
+ //#region src/components/form/checkbox-input.d.ts
158
+ interface CheckboxItem {
159
+ id: string;
184
160
  label: string;
185
161
  disabled?: boolean;
186
162
  }
187
- interface SelectOptionGroup {
188
- label: string;
189
- items: SelectOption[];
190
- }
191
- interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
163
+ interface CheckboxInputProps<TFieldValues extends FieldValues = FieldValues> {
192
164
  control?: Control<TFieldValues>;
193
165
  name: FieldPath<TFieldValues> | string;
194
166
  label?: string;
195
- placeholder?: string;
196
167
  description?: string;
197
168
  helperText?: string;
198
169
  required?: boolean;
199
170
  disabled?: boolean;
200
- items?: SelectOption[];
201
- groups?: SelectOptionGroup[];
202
- allOption?: SelectOption;
203
- valueKey?: string;
204
- displayKey?: string;
205
- value?: string | number;
206
- onValueChange?: (value: string) => void;
171
+ items?: CheckboxItem[];
172
+ value?: string[];
173
+ onChange?: (values: string[]) => void;
174
+ onValueChange?: (values: string[]) => void;
207
175
  className?: string;
208
176
  labelClassName?: string;
209
- triggerClassName?: string;
210
- contentClassName?: string;
177
+ checkboxClassName?: string;
211
178
  itemClassName?: string;
212
- Icon?: React$1.ComponentType<{
213
- className?: string;
214
- }>;
215
- defaultOpen?: boolean;
216
- side?: "top" | "bottom" | "left" | "right";
217
- sideOffset?: number;
218
- align?: "start" | "center" | "end";
219
- alignOffset?: number;
179
+ itemLabelClassName?: string;
220
180
  }
221
181
  /**
222
- * SelectInput - Select dropdown with react-hook-form integration
182
+ * CheckboxInput - Checkbox group with react-hook-form integration
223
183
  *
224
184
  * Features:
225
- * - Flat and grouped options
226
- * - Custom placeholder
227
- * - Optional "All" option (use placeholder text to match)
228
- * - Custom styling
229
- *
230
- * Note: For "All" options with value="", the placeholder will be shown when selected.
231
- * Make sure your placeholder text matches what you want to display for "All".
232
- *
233
- * @example
234
- * ```tsx
235
- * // Basic usage
236
- * <SelectInput
237
- * control={form.control}
238
- * name="role"
239
- * label="Role"
240
- * items={[
241
- * { value: "admin", label: "Admin" },
242
- * { value: "user", label: "User" },
243
- * ]}
244
- * />
245
- *
246
- * // With "All" option - placeholder shows when "All" is selected
247
- * <SelectInput
248
- * name="status"
249
- * label="Status"
250
- * items={[
251
- * { value: "", label: "All" }, // This will show placeholder when selected
252
- * { value: "active", label: "Active" },
253
- * ]}
254
- * placeholder="All" // Make sure this matches the "All" label
255
- * />
256
- * ```
257
- */
258
- declare function SelectInput<TFieldValues extends FieldValues = FieldValues>({
259
- control,
260
- items,
261
- groups,
262
- name,
263
- label,
264
- placeholder,
265
- allOption,
266
- description,
267
- helperText,
268
- required,
269
- disabled,
270
- className,
271
- labelClassName,
272
- triggerClassName,
273
- contentClassName,
274
- itemClassName,
275
- Icon,
276
- onValueChange,
277
- value: propValue,
278
- defaultOpen,
279
- side,
280
- sideOffset,
281
- align,
282
- alignOffset
283
- }: SelectInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
284
- //#endregion
285
- //#region src/components/form/checkbox-input.d.ts
286
- interface CheckboxItem {
287
- id: string;
288
- label: string;
289
- disabled?: boolean;
290
- }
291
- interface CheckboxInputProps<TFieldValues extends FieldValues = FieldValues> {
292
- control?: Control<TFieldValues>;
293
- name: FieldPath<TFieldValues> | string;
294
- label?: string;
295
- description?: string;
296
- helperText?: string;
297
- required?: boolean;
298
- disabled?: boolean;
299
- items?: CheckboxItem[];
300
- value?: string[];
301
- onChange?: (values: string[]) => void;
302
- onValueChange?: (values: string[]) => void;
303
- className?: string;
304
- labelClassName?: string;
305
- checkboxClassName?: string;
306
- itemClassName?: string;
307
- itemLabelClassName?: string;
308
- }
309
- /**
310
- * CheckboxInput - Checkbox group with react-hook-form integration
311
- *
312
- * Features:
313
- * - Multiple checkbox items
314
- * - Array value support
315
- * - Can be used standalone
185
+ * - Multiple checkbox items
186
+ * - Array value support
187
+ * - Can be used standalone
316
188
  *
317
189
  * @example
318
190
  * ```tsx
@@ -347,117 +219,80 @@ declare function CheckboxInput<TFieldValues extends FieldValues = FieldValues>({
347
219
  itemLabelClassName
348
220
  }: CheckboxInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
349
221
  //#endregion
350
- //#region src/components/form/radio-input.d.ts
351
- interface RadioChoice {
222
+ //#region src/components/form/combobox-input.d.ts
223
+ interface ComboboxOption {
352
224
  value: string;
353
225
  label: string;
354
226
  disabled?: boolean;
355
227
  }
356
- interface RadioInputProps<TFieldValues extends FieldValues = FieldValues> {
228
+ interface ComboboxInputProps<TFieldValues extends FieldValues = FieldValues> {
357
229
  control?: Control<TFieldValues>;
358
230
  name: FieldPath<TFieldValues> | string;
359
231
  label?: string;
232
+ placeholder?: string;
233
+ emptyText?: string;
360
234
  description?: string;
361
235
  helperText?: string;
362
236
  required?: boolean;
363
237
  disabled?: boolean;
364
- choices?: RadioChoice[];
365
- items?: RadioChoice[];
366
- orientation?: "vertical" | "horizontal";
238
+ items?: ComboboxOption[];
367
239
  value?: string;
368
240
  onChange?: (value: string) => void;
369
241
  onValueChange?: (value: string) => void;
370
242
  className?: string;
371
243
  labelClassName?: string;
372
- radioGroupClassName?: string;
373
- radioItemClassName?: string;
374
- radioLabelClassName?: string;
244
+ inputClassName?: string;
245
+ renderOption?: (option: ComboboxOption) => ReactNode;
375
246
  }
376
247
  /**
377
- * RadioInput - Radio group with react-hook-form integration
248
+ * ComboboxInput - Searchable select with react-hook-form integration using Base UI
249
+ *
250
+ * Passes `{ value, label }` objects to Base UI Combobox so it auto-resolves
251
+ * labels for display and filtering. The form value is always the string `value`.
378
252
  *
379
253
  * @example
380
254
  * ```tsx
381
- * <RadioInput
255
+ * // With react-hook-form
256
+ * <ComboboxInput
382
257
  * control={form.control}
383
- * name="plan"
384
- * label="Select Plan"
385
- * choices={[
386
- * { value: "free", label: "Free" },
387
- * { value: "pro", label: "Pro" },
388
- * { value: "enterprise", label: "Enterprise" },
258
+ * name="country"
259
+ * label="Country"
260
+ * items={[
261
+ * { value: "us", label: "United States" },
262
+ * { value: "uk", label: "United Kingdom" },
389
263
  * ]}
390
- * orientation="horizontal"
264
+ * placeholder="Select a country..."
391
265
  * />
392
- * ```
393
- */
394
- declare function RadioInput<TFieldValues extends FieldValues = FieldValues>({
395
- control,
396
- name,
397
- label,
398
- description,
399
- helperText,
400
- required,
401
- disabled,
402
- choices,
403
- items,
404
- orientation,
405
- value: propValue,
406
- onChange: propOnChange,
407
- onValueChange,
408
- className,
409
- labelClassName,
410
- radioGroupClassName,
411
- radioItemClassName,
412
- radioLabelClassName
413
- }: RadioInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
414
- //#endregion
415
- //#region src/components/form/switch-input.d.ts
416
- interface SwitchInputProps<TFieldValues extends FieldValues = FieldValues> {
417
- control?: Control<TFieldValues>;
418
- name: FieldPath<TFieldValues> | string;
419
- label?: string;
420
- description?: string;
421
- helperText?: string;
422
- required?: boolean;
423
- disabled?: boolean;
424
- orientation?: "horizontal" | "vertical";
425
- value?: boolean;
426
- onChange?: (value: boolean) => void;
427
- onValueChange?: (value: boolean) => void;
428
- className?: string;
429
- labelClassName?: string;
430
- switchClassName?: string;
431
- }
432
- /**
433
- * SwitchInput - Toggle switch with react-hook-form integration
434
266
  *
435
- * @example
436
- * ```tsx
437
- * <SwitchInput
438
- * control={form.control}
439
- * name="notifications"
440
- * label="Enable notifications"
441
- * description="Receive email updates"
267
+ * // Standalone
268
+ * <ComboboxInput
269
+ * name="country"
270
+ * label="Country"
271
+ * items={items}
272
+ * value={selectedCountry}
273
+ * onValueChange={setSelectedCountry}
442
274
  * />
443
275
  * ```
444
276
  */
445
- declare function SwitchInput<TFieldValues extends FieldValues = FieldValues>({
277
+ declare function ComboboxInput<TFieldValues extends FieldValues = FieldValues>({
446
278
  control,
447
279
  name,
448
280
  label,
281
+ placeholder,
282
+ emptyText,
449
283
  description,
450
284
  helperText,
451
285
  required,
452
286
  disabled,
453
- orientation,
454
- value: propValue,
455
- onChange: propOnChange,
456
- onValueChange,
287
+ items,
457
288
  className,
458
289
  labelClassName,
459
- switchClassName
460
- }: SwitchInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
290
+ inputClassName,
291
+ onValueChange,
292
+ renderOption,
293
+ value: propValue,
294
+ onChange: propOnChange
295
+ }: ComboboxInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
461
296
  //#endregion
462
297
  //#region src/components/form/date-input.d.ts
463
298
  type DateValue = Date | string | null | undefined;
@@ -518,256 +353,281 @@ declare function DateInput<TFieldValues extends FieldValues = FieldValues>({
518
353
  allowClear
519
354
  }: DateInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
520
355
  //#endregion
521
- //#region src/components/form/tag-input.d.ts
522
- interface TagInputProps {
523
- control?: Control<FieldValues>;
524
- name: string;
525
- label?: string;
526
- placeholder?: string;
527
- description?: string;
528
- helperText?: string;
529
- required?: boolean;
530
- disabled?: boolean;
531
- maxTags?: number;
532
- allowDuplicates?: boolean;
533
- delimiter?: string;
534
- suggestions?: string[];
535
- suggestionLimit?: number;
536
- value?: string[];
537
- onChange?: (tags: string[]) => void;
538
- onValueChange?: (tags: string[]) => void;
539
- validateTag?: (tag: string) => boolean;
540
- transformTag?: (tag: string) => string;
541
- formatTag?: (tag: string) => string;
356
+ //#region src/components/form/date-range-filter.d.ts
357
+ interface DateRange {
358
+ from?: Date;
359
+ to?: Date;
360
+ }
361
+ interface DateRangeFilterProps {
362
+ /** Initial start date */
363
+ initialStartDate?: Date;
364
+ /** Initial end date */
365
+ initialEndDate?: Date;
366
+ /** Callback when filter is applied (receives startDate, endDate) */
367
+ onFilter?: (startDate: Date | null, endDate: Date | null) => void;
368
+ /** Callback when filter is cleared */
369
+ onClear?: () => void;
370
+ /** Additional classes for the container */
542
371
  className?: string;
543
- labelClassName?: string;
544
- inputClassName?: string;
545
- [key: string]: unknown;
372
+ /** Additional classes for trigger button */
373
+ buttonClassName?: string;
374
+ /** Placeholder text when no date selected */
375
+ placeholder?: string;
376
+ /** Minimum selectable date */
377
+ minDate?: Date;
378
+ /** Maximum selectable date */
379
+ maxDate?: Date;
380
+ /** Align popover to the right */
381
+ alignRight?: boolean;
382
+ /** Number of months to display */
383
+ numberOfMonths?: number;
546
384
  }
547
385
  /**
548
- * TagInput - Tag/chip input with react-hook-form integration
386
+ * DateRangeFilter - A date range picker for filtering
549
387
  *
550
- * @example
551
- * ```tsx
552
- * <TagInput
553
- * control={form.control}
554
- * name="tags"
555
- * label="Tags"
556
- * placeholder="Add tags..."
557
- * maxTags={10}
558
- * suggestions={["react", "typescript", "nextjs"]}
559
- * />
560
- * ```
388
+ * Features:
389
+ * - Only applies filter when explicitly submitted
390
+ * - Supports clearing filters
391
+ * - Uses Popover to show calendar on click
392
+ * - Configurable min/max dates
561
393
  */
562
- declare function TagInput({
563
- control,
564
- name,
565
- label,
566
- description,
567
- helperText,
568
- placeholder,
569
- required,
570
- disabled,
394
+ declare function DateRangeFilter({
395
+ initialStartDate,
396
+ initialEndDate,
397
+ onFilter,
398
+ onClear,
571
399
  className,
572
- labelClassName,
573
- inputClassName,
574
- maxTags,
575
- allowDuplicates,
576
- suggestions,
577
- suggestionLimit,
578
- value: propValue,
579
- onChange: propOnChange,
580
- onValueChange,
581
- delimiter,
582
- validateTag,
583
- transformTag,
584
- formatTag,
585
- ...props
586
- }: TagInputProps): react_jsx_runtime0.JSX.Element;
400
+ buttonClassName,
401
+ placeholder,
402
+ minDate,
403
+ maxDate,
404
+ alignRight,
405
+ numberOfMonths
406
+ }: DateRangeFilterProps): react_jsx_runtime0.JSX.Element;
587
407
  //#endregion
588
- //#region src/components/form/tag-choice-input.d.ts
589
- interface TagChoiceItem {
590
- value: string;
591
- label: string;
592
- disabled?: boolean;
408
+ //#region src/components/form/date-range-input.d.ts
409
+ interface DateRangeValue {
410
+ from?: Date | string;
411
+ to?: Date | string;
593
412
  }
594
- interface TagChoiceInputProps<TFieldValues extends FieldValues = FieldValues> {
413
+ interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
414
+ /** React Hook Form control */
595
415
  control?: Control<TFieldValues>;
416
+ /** Field name for form registration */
596
417
  name: FieldPath<TFieldValues> | string;
418
+ /** Field label */
597
419
  label?: string;
598
- placeholder?: string;
420
+ /** Description text below the input */
599
421
  description?: string;
600
- helperText?: string;
422
+ /** Placeholder text */
423
+ placeholder?: string;
424
+ /** Whether the field is required */
601
425
  required?: boolean;
426
+ /** Whether the field is disabled */
602
427
  disabled?: boolean;
603
- items?: TagChoiceItem[];
604
- value?: string[];
605
- onValueChange?: (values: string[]) => void;
428
+ /** Additional className for the wrapper */
606
429
  className?: string;
430
+ /** Additional className for the label */
431
+ labelClassName?: string;
432
+ /** Additional className for the button */
433
+ buttonClassName?: string;
434
+ /** Additional className for the calendar popover */
435
+ calendarClassName?: string;
436
+ /** Minimum selectable date */
437
+ minDate?: Date;
438
+ /** Maximum selectable date */
439
+ maxDate?: Date;
440
+ /** Array of disabled dates */
441
+ disabledDates?: Date[];
442
+ /** Array of disabled days (0-6, where 0 is Sunday) */
443
+ disabledDays?: number[];
444
+ /** Callback when value changes */
445
+ onValueChange?: (range: DateRangeValue) => void;
446
+ /** Custom validation function for date range */
447
+ validateDateRange?: (range: DateRangeValue) => boolean;
448
+ /** Function to clear form errors */
449
+ clearErrors?: (name: string) => void;
450
+ /** Custom description component */
451
+ descriptionComponent?: ReactNode;
452
+ /** Whether to show clear button */
453
+ allowClear?: boolean;
454
+ /** Whether to show badge with date range */
455
+ showBadge?: boolean;
456
+ /** Custom icon component */
457
+ Icon?: LucideIcon;
458
+ /** Transform functions for input/output */
459
+ transform?: {
460
+ input: (value: any) => DateRangeValue;
461
+ output: (range: DateRangeValue) => any;
462
+ };
607
463
  }
608
464
  /**
609
- * TagChoiceInput - Multi-select with inline tag display
465
+ * DateRangeInput - Date range picker with react-hook-form integration
610
466
  *
611
- * Selected items appear as badges inside the trigger area.
612
- * The popover dropdown stays anchored without layout jumps.
467
+ * @example
468
+ * ```tsx
469
+ * <DateRangeInput
470
+ * control={control}
471
+ * name="dateRange"
472
+ * label="Select Dates"
473
+ * placeholder="Pick a date range"
474
+ * />
475
+ * ```
613
476
  */
614
- declare function TagChoiceInput<TFieldValues extends FieldValues = FieldValues>({
477
+ declare function DateRangeInput<TFieldValues extends FieldValues = FieldValues>({
615
478
  control,
616
479
  name,
617
480
  label,
618
481
  description,
619
- helperText,
620
482
  placeholder,
621
483
  required,
622
484
  disabled,
623
485
  className,
624
- items,
625
- value: propValue,
626
- onValueChange
627
- }: TagChoiceInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
628
- declare namespace TagChoiceInput {
629
- var displayName: string;
630
- }
486
+ labelClassName,
487
+ buttonClassName,
488
+ calendarClassName,
489
+ minDate,
490
+ maxDate,
491
+ disabledDates,
492
+ disabledDays,
493
+ onValueChange,
494
+ validateDateRange,
495
+ clearErrors,
496
+ descriptionComponent,
497
+ allowClear,
498
+ showBadge,
499
+ Icon,
500
+ transform
501
+ }: DateRangeInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
631
502
  //#endregion
632
- //#region src/components/form/combobox-input.d.ts
633
- interface ComboboxOption {
634
- value: string;
635
- label: string;
636
- disabled?: boolean;
637
- }
638
- interface ComboboxInputProps<TFieldValues extends FieldValues = FieldValues> {
639
- control?: Control<TFieldValues>;
640
- name: FieldPath<TFieldValues> | string;
503
+ //#region src/components/form/date-time-input.d.ts
504
+ interface DateTimeInputProps<T extends FieldValues = FieldValues> {
505
+ control?: Control<T>;
506
+ name: FieldPath<T> | string;
641
507
  label?: string;
642
- placeholder?: string;
643
- emptyText?: string;
644
508
  description?: string;
645
- helperText?: string;
646
509
  required?: boolean;
647
510
  disabled?: boolean;
648
- items?: ComboboxOption[];
649
- value?: string;
650
- onChange?: (value: string) => void;
651
- onValueChange?: (value: string) => void;
511
+ placeholder?: string;
512
+ mode?: "date" | "datetime";
513
+ minDate?: Date;
514
+ maxDate?: Date;
515
+ timeSlotInterval?: 15 | 30 | 60;
516
+ hourFormat?: 12 | 24;
517
+ clearable?: boolean;
518
+ value?: Date;
519
+ onChange?: (v: Date | undefined) => void;
520
+ onValueChange?: (v: Date | undefined) => void;
652
521
  className?: string;
653
522
  labelClassName?: string;
654
- inputClassName?: string;
655
- renderOption?: (option: ComboboxOption) => ReactNode;
656
523
  }
657
524
  /**
658
- * ComboboxInput - Searchable select with react-hook-form integration using Base UI
659
- *
660
- * Passes `{ value, label }` objects to Base UI Combobox so it auto-resolves
661
- * labels for display and filtering. The form value is always the string `value`.
525
+ * DateTimeInput - Date + time picker with Popover and Calendar
662
526
  *
663
527
  * @example
664
528
  * ```tsx
665
- * // With react-hook-form
666
- * <ComboboxInput
529
+ * <DateTimeInput
667
530
  * control={form.control}
668
- * name="country"
669
- * label="Country"
670
- * items={[
671
- * { value: "us", label: "United States" },
672
- * { value: "uk", label: "United Kingdom" },
673
- * ]}
674
- * placeholder="Select a country..."
675
- * />
676
- *
677
- * // Standalone
678
- * <ComboboxInput
679
- * name="country"
680
- * label="Country"
681
- * items={items}
682
- * value={selectedCountry}
683
- * onValueChange={setSelectedCountry}
531
+ * name="scheduledAt"
532
+ * label="Schedule Date"
533
+ * mode="datetime"
534
+ * minDate={new Date()}
535
+ * timeSlotInterval={15}
684
536
  * />
685
537
  * ```
686
538
  */
687
- declare function ComboboxInput<TFieldValues extends FieldValues = FieldValues>({
539
+ declare function DateTimeInput<T extends FieldValues = FieldValues>({
688
540
  control,
689
541
  name,
690
542
  label,
691
- placeholder,
692
- emptyText,
693
543
  description,
694
- helperText,
695
544
  required,
696
545
  disabled,
697
- items,
546
+ placeholder,
547
+ mode,
548
+ minDate,
549
+ maxDate,
550
+ timeSlotInterval,
551
+ hourFormat,
552
+ clearable,
698
553
  className,
699
554
  labelClassName,
700
- inputClassName,
701
- onValueChange,
702
- renderOption,
703
555
  value: propValue,
704
- onChange: propOnChange
705
- }: ComboboxInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
556
+ onChange: propOnChange,
557
+ onValueChange
558
+ }: DateTimeInputProps<T>): react_jsx_runtime0.JSX.Element;
706
559
  //#endregion
707
- //#region src/components/form/slug-field.d.ts
708
- interface SlugFieldProps {
709
- control?: Control<FieldValues>;
710
- name: string;
560
+ //#region src/components/form/file-upload-input/types.d.ts
561
+ interface FileUploadInputProps<T extends FieldValues = FieldValues> {
562
+ control?: Control<T>;
563
+ name: FieldPath<T> | string;
711
564
  label?: string;
712
- placeholder?: string;
713
565
  description?: string;
714
- helperText?: string;
715
566
  required?: boolean;
716
567
  disabled?: boolean;
717
- sourceValue?: string;
718
- onGenerate?: (sourceValue: string) => string;
719
- value?: string;
720
- onChange?: (e: {
721
- target: {
722
- value: string;
723
- };
724
- }) => void;
725
- onValueChange?: (value: string) => void;
726
- className?: string;
727
- labelClassName?: string;
728
- inputClassName?: string;
729
- error?: FieldError;
730
- ref?: Ref<HTMLInputElement>;
731
- }
732
- /**
733
- * Generates a URL-friendly slug from a string
734
- */
735
- declare function generateSlug(text: string | undefined): string;
736
- /**
737
- * SlugField - URL slug input with auto-generation
738
- *
739
- * @example
740
- * ```tsx
741
- * <SlugField
568
+ multiple?: boolean;
569
+ accept?: string;
570
+ maxFiles?: number;
571
+ maxFileSize?: number;
572
+ minFileSize?: number;
573
+ uploadProgress?: Record<string, number>;
574
+ uploadErrors?: Record<string, string>;
575
+ dropzoneText?: string;
576
+ dropzoneHint?: string;
577
+ showPreview?: boolean;
578
+ compact?: boolean;
579
+ onFilesAdded?: (files: File[]) => void;
580
+ onFileRemoved?: (file: File, index: number) => void;
581
+ value?: File[];
582
+ onChange?: (files: File[]) => void;
583
+ onValueChange?: (files: File[]) => void;
584
+ className?: string;
585
+ dropzoneClassName?: string;
586
+ }
587
+ //#endregion
588
+ //#region src/components/form/file-upload-input/file-upload-input.d.ts
589
+ /**
590
+ * FileUploadInput - Drag-and-drop file input with validation and preview
591
+ *
592
+ * @example
593
+ * ```tsx
594
+ * <FileUploadInput
742
595
  * control={form.control}
743
- * name="slug"
744
- * label="URL Slug"
745
- * sourceValue={form.watch("title")}
746
- * description="This will be used in the page URL"
747
- * required
596
+ * name="avatar"
597
+ * label="Profile Picture"
598
+ * accept="image/*"
599
+ * maxFileSize={5 * 1024 * 1024}
600
+ * onFilesAdded={(files) => startUpload(files)}
601
+ * uploadProgress={uploadProgress}
748
602
  * />
749
603
  * ```
750
604
  */
751
- declare function SlugField({
605
+ declare function FileUploadInput<T extends FieldValues = FieldValues>({
752
606
  control,
753
607
  name,
608
+ label,
754
609
  description,
755
- helperText,
756
610
  required,
757
- label,
758
- placeholder,
759
611
  disabled,
760
- sourceValue,
761
- onGenerate,
612
+ multiple,
613
+ accept,
614
+ maxFiles,
615
+ maxFileSize,
616
+ minFileSize,
617
+ uploadProgress,
618
+ uploadErrors,
619
+ dropzoneText,
620
+ dropzoneHint,
621
+ showPreview,
622
+ compact,
623
+ onFilesAdded,
624
+ onFileRemoved,
762
625
  className,
763
- inputClassName,
764
- labelClassName,
765
- onValueChange,
766
- value,
767
- onChange,
768
- error,
769
- ref
770
- }: SlugFieldProps): react_jsx_runtime0.JSX.Element;
626
+ dropzoneClassName,
627
+ value: propValue,
628
+ onChange: propOnChange,
629
+ onValueChange
630
+ }: FileUploadInputProps<T>): react_jsx_runtime0.JSX.Element;
771
631
  //#endregion
772
632
  //#region src/components/form/form-error-summary.d.ts
773
633
  interface FormErrorSummaryProps {
@@ -790,203 +650,298 @@ declare function FormErrorSummary({
790
650
  title
791
651
  }: FormErrorSummaryProps): react_jsx_runtime0.JSX.Element | null;
792
652
  //#endregion
793
- //#region src/components/form/date-range-filter.d.ts
794
- interface DateRange {
795
- from?: Date;
796
- to?: Date;
653
+ //#region src/components/form/form-field-array.d.ts
654
+ interface FormFieldArrayProps {
655
+ title?: string;
656
+ description?: string;
657
+ children: ReactNode;
658
+ onAdd?: () => void;
659
+ addLabel?: string;
660
+ emptyMessage?: string;
661
+ itemCount?: number;
662
+ maxItems?: number;
663
+ className?: string;
797
664
  }
798
- interface DateRangeFilterProps {
799
- /** Initial start date */
800
- initialStartDate?: Date;
801
- /** Initial end date */
802
- initialEndDate?: Date;
803
- /** Callback when filter is applied (receives startDate, endDate) */
804
- onFilter?: (startDate: Date | null, endDate: Date | null) => void;
805
- /** Callback when filter is cleared */
806
- onClear?: () => void;
807
- /** Additional classes for the container */
665
+ interface FormFieldArrayItemProps {
666
+ children: ReactNode;
667
+ onRemove?: () => void;
668
+ index?: number;
669
+ title?: string;
808
670
  className?: string;
809
- /** Additional classes for trigger button */
810
- buttonClassName?: string;
811
- /** Placeholder text when no date selected */
812
- placeholder?: string;
813
- /** Minimum selectable date */
814
- minDate?: Date;
815
- /** Maximum selectable date */
816
- maxDate?: Date;
817
- /** Align popover to the right */
818
- alignRight?: boolean;
819
- /** Number of months to display */
820
- numberOfMonths?: number;
821
671
  }
822
672
  /**
823
- * DateRangeFilter - A date range picker for filtering
673
+ * FormFieldArray - Container for dynamic field arrays with add/remove
824
674
  *
825
- * Features:
826
- * - Only applies filter when explicitly submitted
827
- * - Supports clearing filters
828
- * - Uses Popover to show calendar on click
829
- * - Configurable min/max dates
675
+ * @example
676
+ * ```tsx
677
+ * <FormFieldArray
678
+ * title="Team Members"
679
+ * onAdd={() => append({ name: "", role: "" })}
680
+ * itemCount={fields.length}
681
+ * maxItems={10}
682
+ * >
683
+ * {fields.map((field, index) => (
684
+ * <FormFieldArrayItem
685
+ * key={field.id}
686
+ * title={`Member ${index + 1}`}
687
+ * onRemove={() => remove(index)}
688
+ * >
689
+ * <FormInput control={control} name={`members.${index}.name`} label="Name" />
690
+ * </FormFieldArrayItem>
691
+ * ))}
692
+ * </FormFieldArray>
693
+ * ```
830
694
  */
831
- declare function DateRangeFilter({
832
- initialStartDate,
833
- initialEndDate,
834
- onFilter,
835
- onClear,
836
- className,
837
- buttonClassName,
838
- placeholder,
839
- minDate,
840
- maxDate,
841
- alignRight,
842
- numberOfMonths
843
- }: DateRangeFilterProps): react_jsx_runtime0.JSX.Element;
695
+ declare function FormFieldArray({
696
+ title,
697
+ description,
698
+ children,
699
+ onAdd,
700
+ addLabel,
701
+ emptyMessage,
702
+ itemCount,
703
+ maxItems,
704
+ className
705
+ }: FormFieldArrayProps): react_jsx_runtime0.JSX.Element;
706
+ /**
707
+ * FormFieldArrayItem - Individual item within a FormFieldArray
708
+ */
709
+ declare function FormFieldArrayItem({
710
+ children,
711
+ onRemove,
712
+ title,
713
+ className
714
+ }: FormFieldArrayItemProps): react_jsx_runtime0.JSX.Element;
844
715
  //#endregion
845
- //#region src/components/form/date-range-input.d.ts
846
- interface DateRangeValue {
847
- from?: Date | string;
848
- to?: Date | string;
716
+ //#region src/components/form/form-input.d.ts
717
+ interface TransformFunctions {
718
+ input?: (value: unknown) => string;
719
+ output?: (value: string) => unknown;
849
720
  }
850
- interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
851
- /** React Hook Form control */
721
+ interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
852
722
  control?: Control<TFieldValues>;
853
- /** Field name for form registration */
854
723
  name: FieldPath<TFieldValues> | string;
855
- /** Field label */
856
724
  label?: string;
857
- /** Description text below the input */
858
- description?: string;
859
- /** Placeholder text */
860
725
  placeholder?: string;
861
- /** Whether the field is required */
726
+ description?: string;
727
+ helperText?: string;
862
728
  required?: boolean;
863
- /** Whether the field is disabled */
864
729
  disabled?: boolean;
865
- /** Additional className for the wrapper */
730
+ readOnly?: boolean;
731
+ type?: string;
866
732
  className?: string;
867
- /** Additional className for the label */
868
733
  labelClassName?: string;
869
- /** Additional className for the button */
870
- buttonClassName?: string;
871
- /** Additional className for the calendar popover */
872
- calendarClassName?: string;
873
- /** Minimum selectable date */
874
- minDate?: Date;
875
- /** Maximum selectable date */
876
- maxDate?: Date;
877
- /** Array of disabled dates */
878
- disabledDates?: Date[];
879
- /** Array of disabled days (0-6, where 0 is Sunday) */
880
- disabledDays?: number[];
881
- /** Callback when value changes */
882
- onValueChange?: (range: DateRangeValue) => void;
883
- /** Custom validation function for date range */
884
- validateDateRange?: (range: DateRangeValue) => boolean;
885
- /** Function to clear form errors */
886
- clearErrors?: (name: string) => void;
887
- /** Custom description component */
888
- descriptionComponent?: ReactNode;
889
- /** Whether to show clear button */
890
- allowClear?: boolean;
891
- /** Whether to show badge with date range */
892
- showBadge?: boolean;
893
- /** Custom icon component */
894
- Icon?: LucideIcon;
895
- /** Transform functions for input/output */
896
- transform?: {
897
- input: (value: any) => DateRangeValue;
898
- output: (range: DateRangeValue) => any;
899
- };
734
+ inputClassName?: string;
735
+ inputGroupClassName?: string;
736
+ iconLeft?: ReactNode;
737
+ iconRight?: ReactNode;
738
+ addonLeft?: ReactNode;
739
+ addonRight?: ReactNode;
740
+ transform?: TransformFunctions;
741
+ onValueChange?: (value: unknown) => void;
742
+ value?: string | number;
743
+ onChange?: (value: unknown) => void;
744
+ min?: number | string;
745
+ max?: number | string;
746
+ step?: number | string;
747
+ minLength?: number;
748
+ maxLength?: number;
749
+ pattern?: string;
750
+ autoComplete?: string;
751
+ autoFocus?: boolean;
752
+ inputMode?: InputHTMLAttributes<HTMLInputElement>["inputMode"];
753
+ enterKeyHint?: InputHTMLAttributes<HTMLInputElement>["enterKeyHint"];
900
754
  }
901
755
  /**
902
- * DateRangeInput - Date range picker with react-hook-form integration
756
+ * FormInput - Text input with react-hook-form integration
757
+ *
758
+ * Features:
759
+ * - Works with react-hook-form Controller
760
+ * - Supports input groups with icons/addons
761
+ * - Value transformation (input/output)
762
+ * - Can be used standalone without form
903
763
  *
904
764
  * @example
905
765
  * ```tsx
906
- * <DateRangeInput
907
- * control={control}
908
- * name="dateRange"
909
- * label="Select Dates"
910
- * placeholder="Pick a date range"
766
+ * // With react-hook-form
767
+ * <FormInput
768
+ * control={form.control}
769
+ * name="email"
770
+ * type="email"
771
+ * label="Email"
772
+ * placeholder="user@example.com"
773
+ * required
774
+ * />
775
+ *
776
+ * // With icon
777
+ * <FormInput
778
+ * control={form.control}
779
+ * name="search"
780
+ * iconLeft={<SearchIcon />}
781
+ * placeholder="Search..."
911
782
  * />
912
783
  * ```
913
784
  */
914
- declare function DateRangeInput<TFieldValues extends FieldValues = FieldValues>({
785
+ declare function FormInput<TFieldValues extends FieldValues = FieldValues>({
915
786
  control,
916
787
  name,
917
788
  label,
918
- description,
919
789
  placeholder,
790
+ description,
791
+ helperText,
920
792
  required,
921
793
  disabled,
794
+ readOnly,
795
+ type,
922
796
  className,
923
797
  labelClassName,
924
- buttonClassName,
925
- calendarClassName,
926
- minDate,
927
- maxDate,
928
- disabledDates,
929
- disabledDays,
798
+ inputClassName,
799
+ inputGroupClassName,
800
+ iconLeft,
801
+ iconRight,
802
+ addonLeft,
803
+ addonRight,
930
804
  onValueChange,
931
- validateDateRange,
932
- clearErrors,
933
- descriptionComponent,
934
- allowClear,
935
- showBadge,
936
- Icon,
937
- transform
938
- }: DateRangeInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
805
+ transform,
806
+ value,
807
+ onChange,
808
+ min,
809
+ max,
810
+ step,
811
+ minLength,
812
+ maxLength,
813
+ pattern,
814
+ autoComplete,
815
+ autoFocus,
816
+ inputMode,
817
+ enterKeyHint
818
+ }: FormInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
939
819
  //#endregion
940
- //#region src/components/form/otp-input.d.ts
941
- interface OTPInputProps<T extends FieldValues = FieldValues> {
942
- control?: Control<T>;
943
- name: FieldPath<T> | string;
820
+ //#region src/components/form/form-section.d.ts
821
+ interface FormSectionProps {
822
+ title?: string;
823
+ description?: string;
824
+ children: ReactNode;
825
+ variant?: "default" | "card" | "subtle";
826
+ collapsible?: boolean;
827
+ defaultOpen?: boolean;
828
+ icon?: ReactNode | ComponentType<{
829
+ className?: string;
830
+ }>;
831
+ className?: string;
832
+ }
833
+ interface FormGridProps {
834
+ children: ReactNode;
835
+ cols?: 1 | 2 | 3 | 4;
836
+ className?: string;
837
+ }
838
+ /**
839
+ * FormSection - Organizes form fields into logical groups with variants
840
+ *
841
+ * @example
842
+ * ```tsx
843
+ * <FormSection title="Personal Info" variant="card" collapsible>
844
+ * <FormInput name="name" label="Name" />
845
+ * <FormInput name="email" label="Email" />
846
+ * </FormSection>
847
+ * ```
848
+ */
849
+ declare function FormSection({
850
+ title,
851
+ description,
852
+ children,
853
+ variant,
854
+ collapsible,
855
+ defaultOpen,
856
+ icon,
857
+ className
858
+ }: FormSectionProps): react_jsx_runtime0.JSX.Element;
859
+ /**
860
+ * FormGrid - Responsive grid layout for form fields
861
+ *
862
+ * @example
863
+ * ```tsx
864
+ * <FormGrid cols={2}>
865
+ * <FormInput name="firstName" label="First Name" />
866
+ * <FormInput name="lastName" label="Last Name" />
867
+ * </FormGrid>
868
+ * ```
869
+ */
870
+ declare function FormGrid({
871
+ children,
872
+ cols,
873
+ className
874
+ }: FormGridProps): react_jsx_runtime0.JSX.Element;
875
+ //#endregion
876
+ //#region src/components/form/form-textarea.d.ts
877
+ interface FormTextareaProps<TFieldValues extends FieldValues = FieldValues> {
878
+ control?: Control<TFieldValues>;
879
+ name: FieldPath<TFieldValues> | string;
944
880
  label?: string;
881
+ placeholder?: string;
945
882
  description?: string;
883
+ helperText?: string;
946
884
  required?: boolean;
947
885
  disabled?: boolean;
948
- length?: 4 | 6 | 8;
949
- separatorAfter?: number[];
950
- pattern?: string;
951
- autoSubmit?: boolean;
886
+ readOnly?: boolean;
887
+ rows?: number;
952
888
  value?: string;
953
889
  onChange?: (value: string) => void;
954
- onComplete?: (value: string) => void;
890
+ onValueChange?: (value: string) => void;
955
891
  className?: string;
956
- slotClassName?: string;
892
+ labelClassName?: string;
893
+ textareaClassName?: string;
894
+ inputGroupClassName?: string;
895
+ iconLeft?: React$1.ReactNode;
896
+ iconRight?: React$1.ReactNode;
897
+ addonLeft?: React$1.ReactNode;
898
+ addonRight?: React$1.ReactNode;
899
+ minLength?: number;
900
+ maxLength?: number;
901
+ autoComplete?: string;
902
+ autoFocus?: boolean;
957
903
  }
958
904
  /**
959
- * OTPInput - OTP/PIN code input with react-hook-form integration
905
+ * FormTextarea - Textarea with react-hook-form integration
960
906
  *
961
907
  * @example
962
908
  * ```tsx
963
- * <OTPInput
909
+ * <FormTextarea
964
910
  * control={form.control}
965
- * name="otp"
966
- * label="Verification Code"
967
- * length={6}
968
- * autoSubmit
969
- * onComplete={(code) => verify(code)}
911
+ * name="bio"
912
+ * label="Biography"
913
+ * placeholder="Tell us about yourself..."
914
+ * rows={5}
970
915
  * />
971
916
  * ```
972
917
  */
973
- declare function OTPInput<T extends FieldValues = FieldValues>({
918
+ declare function FormTextarea<TFieldValues extends FieldValues = FieldValues>({
974
919
  control,
975
920
  name,
976
921
  label,
977
922
  description,
923
+ helperText,
978
924
  required,
979
925
  disabled,
980
- length,
981
- separatorAfter,
982
- pattern,
983
- autoSubmit,
926
+ readOnly,
927
+ placeholder,
984
928
  value: propValue,
985
929
  onChange: propOnChange,
986
- onComplete,
930
+ onValueChange,
987
931
  className,
988
- slotClassName
989
- }: OTPInputProps<T>): react_jsx_runtime0.JSX.Element;
932
+ labelClassName,
933
+ textareaClassName,
934
+ inputGroupClassName,
935
+ iconLeft,
936
+ iconRight,
937
+ addonLeft,
938
+ addonRight,
939
+ rows,
940
+ minLength,
941
+ maxLength,
942
+ autoComplete,
943
+ autoFocus
944
+ }: FormTextareaProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
990
945
  //#endregion
991
946
  //#region src/components/form/multi-select.d.ts
992
947
  interface MultiSelectOption {
@@ -1060,281 +1015,119 @@ declare function MultiSelect<T extends FieldValues = FieldValues>({
1060
1015
  onValueChange
1061
1016
  }: MultiSelectProps<T>): react_jsx_runtime0.JSX.Element;
1062
1017
  //#endregion
1063
- //#region src/components/form/async-combobox.d.ts
1064
- interface AsyncComboboxOption {
1065
- value: string;
1066
- label: string;
1067
- disabled?: boolean;
1068
- }
1069
- interface AsyncComboboxProps<T extends FieldValues = FieldValues> {
1070
- control?: Control<T>;
1071
- name: FieldPath<T> | string;
1018
+ //#region src/components/form/number-input.d.ts
1019
+ interface NumberInputProps<TFieldValues extends FieldValues = FieldValues> {
1020
+ control?: Control<TFieldValues>;
1021
+ name: FieldPath<TFieldValues> | string;
1072
1022
  label?: string;
1073
1023
  placeholder?: string;
1074
- emptyText?: string;
1075
1024
  description?: string;
1076
1025
  helperText?: string;
1077
1026
  required?: boolean;
1078
1027
  disabled?: boolean;
1079
- onSearch: (query: string) => Promise<AsyncComboboxOption[]>;
1080
- debounceMs?: number;
1081
- minChars?: number;
1082
- initialItems?: AsyncComboboxOption[];
1083
- isLoading?: boolean;
1084
- hasMore?: boolean;
1085
- onLoadMore?: () => void;
1086
- value?: string;
1087
- onChange?: (v: string) => void;
1088
- onValueChange?: (v: string) => void;
1028
+ min?: number;
1029
+ max?: number;
1030
+ step?: number;
1031
+ showStepper?: boolean;
1032
+ value?: number | string;
1033
+ onChange?: (value: number | undefined) => void;
1034
+ onValueChange?: (value: number | undefined) => void;
1089
1035
  className?: string;
1090
1036
  labelClassName?: string;
1091
1037
  inputClassName?: string;
1092
- renderOption?: (option: AsyncComboboxOption) => ReactNode;
1093
1038
  }
1094
1039
  /**
1095
- * AsyncCombobox - Searchable select with debounced async search
1040
+ * NumberInput - Numeric input with optional stepper buttons
1041
+ *
1042
+ * Features:
1043
+ * - +/- stepper buttons with min/max clamping
1044
+ * - Works with react-hook-form Controller
1045
+ * - Can be used standalone without form
1046
+ * - Native spinner hidden when stepper is shown
1096
1047
  *
1097
1048
  * @example
1098
1049
  * ```tsx
1099
- * <AsyncCombobox
1050
+ * <NumberInput
1100
1051
  * control={form.control}
1101
- * name="city"
1102
- * label="City"
1103
- * onSearch={async (q) => {
1104
- * const res = await fetch(`/api/cities?search=${q}`);
1105
- * return res.json();
1106
- * }}
1107
- * placeholder="Search cities..."
1052
+ * name="quantity"
1053
+ * label="Quantity"
1054
+ * min={1}
1055
+ * max={100}
1056
+ * step={1}
1108
1057
  * />
1109
1058
  * ```
1110
1059
  */
1111
- declare function AsyncCombobox<T extends FieldValues = FieldValues>({
1060
+ declare function NumberInput<TFieldValues extends FieldValues = FieldValues>({
1112
1061
  control,
1113
1062
  name,
1114
1063
  label,
1115
1064
  placeholder,
1116
- emptyText,
1117
1065
  description,
1118
1066
  helperText,
1119
1067
  required,
1120
1068
  disabled,
1121
- onSearch,
1122
- debounceMs,
1123
- minChars,
1124
- initialItems,
1125
- isLoading: externalLoading,
1126
- hasMore,
1127
- onLoadMore,
1128
- className,
1129
- labelClassName,
1130
- inputClassName,
1131
- renderOption,
1132
- value: propValue,
1069
+ min,
1070
+ max,
1071
+ step,
1072
+ showStepper,
1073
+ value: propValue,
1133
1074
  onChange: propOnChange,
1134
- onValueChange
1135
- }: AsyncComboboxProps<T>): react_jsx_runtime0.JSX.Element;
1136
- //#endregion
1137
- //#region src/components/form/async-multi-select.d.ts
1138
- interface AsyncMultiSelectOption {
1139
- value: string;
1140
- label: string;
1141
- disabled?: boolean;
1142
- }
1143
- interface AsyncMultiSelectProps<T extends FieldValues = FieldValues> {
1144
- control?: Control<T>;
1145
- name: FieldPath<T> | string;
1146
- label?: string;
1147
- placeholder?: string;
1148
- emptyText?: string;
1149
- description?: string;
1150
- helperText?: string;
1151
- required?: boolean;
1152
- disabled?: boolean;
1153
- onSearch: (query: string) => Promise<AsyncMultiSelectOption[]>;
1154
- debounceMs?: number;
1155
- minChars?: number;
1156
- initialItems?: AsyncMultiSelectOption[];
1157
- isLoading?: boolean;
1158
- maxSelections?: number;
1159
- clearable?: boolean;
1160
- value?: string[];
1161
- onChange?: (v: string[]) => void;
1162
- onValueChange?: (v: string[]) => void;
1163
- className?: string;
1164
- labelClassName?: string;
1165
- inputClassName?: string;
1166
- renderOption?: (option: AsyncMultiSelectOption) => ReactNode;
1167
- }
1168
- /**
1169
- * AsyncMultiSelect - Async search + chips-based multi-select
1170
- *
1171
- * @example
1172
- * ```tsx
1173
- * <AsyncMultiSelect
1174
- * control={form.control}
1175
- * name="teamMembers"
1176
- * label="Team Members"
1177
- * onSearch={async (q) => {
1178
- * const res = await fetch(`/api/users?search=${q}`);
1179
- * const users = await res.json();
1180
- * return users.map(u => ({ value: u.id, label: u.name }));
1181
- * }}
1182
- * maxSelections={5}
1183
- * />
1184
- * ```
1185
- */
1186
- declare function AsyncMultiSelect<T extends FieldValues = FieldValues>({
1187
- control,
1188
- name,
1189
- label,
1190
- placeholder,
1191
- emptyText,
1192
- description,
1193
- helperText,
1194
- required,
1195
- disabled,
1196
- onSearch,
1197
- debounceMs,
1198
- minChars,
1199
- initialItems,
1200
- isLoading: externalLoading,
1201
- maxSelections,
1202
- clearable,
1075
+ onValueChange,
1203
1076
  className,
1204
1077
  labelClassName,
1205
- inputClassName,
1206
- renderOption,
1207
- value: propValue,
1208
- onChange: propOnChange,
1209
- onValueChange
1210
- }: AsyncMultiSelectProps<T>): react_jsx_runtime0.JSX.Element;
1078
+ inputClassName
1079
+ }: NumberInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1211
1080
  //#endregion
1212
- //#region src/components/form/file-upload-input.d.ts
1213
- interface FileUploadInputProps<T extends FieldValues = FieldValues> {
1081
+ //#region src/components/form/otp-input.d.ts
1082
+ interface OTPInputProps<T extends FieldValues = FieldValues> {
1214
1083
  control?: Control<T>;
1215
1084
  name: FieldPath<T> | string;
1216
1085
  label?: string;
1217
1086
  description?: string;
1218
1087
  required?: boolean;
1219
1088
  disabled?: boolean;
1220
- multiple?: boolean;
1221
- accept?: string;
1222
- maxFiles?: number;
1223
- maxFileSize?: number;
1224
- minFileSize?: number;
1225
- uploadProgress?: Record<string, number>;
1226
- uploadErrors?: Record<string, string>;
1227
- dropzoneText?: string;
1228
- dropzoneHint?: string;
1229
- showPreview?: boolean;
1230
- compact?: boolean;
1231
- onFilesAdded?: (files: File[]) => void;
1232
- onFileRemoved?: (file: File, index: number) => void;
1233
- value?: File[];
1234
- onChange?: (files: File[]) => void;
1235
- onValueChange?: (files: File[]) => void;
1089
+ length?: 4 | 6 | 8;
1090
+ separatorAfter?: number[];
1091
+ pattern?: string;
1092
+ autoSubmit?: boolean;
1093
+ value?: string;
1094
+ onChange?: (value: string) => void;
1095
+ onComplete?: (value: string) => void;
1236
1096
  className?: string;
1237
- dropzoneClassName?: string;
1097
+ slotClassName?: string;
1238
1098
  }
1239
1099
  /**
1240
- * FileUploadInput - Drag-and-drop file input with validation and preview
1100
+ * OTPInput - OTP/PIN code input with react-hook-form integration
1241
1101
  *
1242
1102
  * @example
1243
1103
  * ```tsx
1244
- * <FileUploadInput
1104
+ * <OTPInput
1245
1105
  * control={form.control}
1246
- * name="avatar"
1247
- * label="Profile Picture"
1248
- * accept="image/*"
1249
- * maxFileSize={5 * 1024 * 1024}
1250
- * onFilesAdded={(files) => startUpload(files)}
1251
- * uploadProgress={uploadProgress}
1106
+ * name="otp"
1107
+ * label="Verification Code"
1108
+ * length={6}
1109
+ * autoSubmit
1110
+ * onComplete={(code) => verify(code)}
1252
1111
  * />
1253
1112
  * ```
1254
1113
  */
1255
- declare function FileUploadInput<T extends FieldValues = FieldValues>({
1114
+ declare function OTPInput<T extends FieldValues = FieldValues>({
1256
1115
  control,
1257
1116
  name,
1258
1117
  label,
1259
1118
  description,
1260
1119
  required,
1261
1120
  disabled,
1262
- multiple,
1263
- accept,
1264
- maxFiles,
1265
- maxFileSize,
1266
- minFileSize,
1267
- uploadProgress,
1268
- uploadErrors,
1269
- dropzoneText,
1270
- dropzoneHint,
1271
- showPreview,
1272
- compact,
1273
- onFilesAdded,
1274
- onFileRemoved,
1275
- className,
1276
- dropzoneClassName,
1121
+ length,
1122
+ separatorAfter,
1123
+ pattern,
1124
+ autoSubmit,
1277
1125
  value: propValue,
1278
1126
  onChange: propOnChange,
1279
- onValueChange
1280
- }: FileUploadInputProps<T>): react_jsx_runtime0.JSX.Element;
1281
- //#endregion
1282
- //#region src/components/form/date-time-input.d.ts
1283
- interface DateTimeInputProps<T extends FieldValues = FieldValues> {
1284
- control?: Control<T>;
1285
- name: FieldPath<T> | string;
1286
- label?: string;
1287
- description?: string;
1288
- required?: boolean;
1289
- disabled?: boolean;
1290
- placeholder?: string;
1291
- mode?: "date" | "datetime";
1292
- minDate?: Date;
1293
- maxDate?: Date;
1294
- timeSlotInterval?: 15 | 30 | 60;
1295
- hourFormat?: 12 | 24;
1296
- clearable?: boolean;
1297
- value?: Date;
1298
- onChange?: (v: Date | undefined) => void;
1299
- onValueChange?: (v: Date | undefined) => void;
1300
- className?: string;
1301
- labelClassName?: string;
1302
- }
1303
- /**
1304
- * DateTimeInput - Date + time picker with Popover and Calendar
1305
- *
1306
- * @example
1307
- * ```tsx
1308
- * <DateTimeInput
1309
- * control={form.control}
1310
- * name="scheduledAt"
1311
- * label="Schedule Date"
1312
- * mode="datetime"
1313
- * minDate={new Date()}
1314
- * timeSlotInterval={15}
1315
- * />
1316
- * ```
1317
- */
1318
- declare function DateTimeInput<T extends FieldValues = FieldValues>({
1319
- control,
1320
- name,
1321
- label,
1322
- description,
1323
- required,
1324
- disabled,
1325
- placeholder,
1326
- mode,
1327
- minDate,
1328
- maxDate,
1329
- timeSlotInterval,
1330
- hourFormat,
1331
- clearable,
1127
+ onComplete,
1332
1128
  className,
1333
- labelClassName,
1334
- value: propValue,
1335
- onChange: propOnChange,
1336
- onValueChange
1337
- }: DateTimeInputProps<T>): react_jsx_runtime0.JSX.Element;
1129
+ slotClassName
1130
+ }: OTPInputProps<T>): react_jsx_runtime0.JSX.Element;
1338
1131
  //#endregion
1339
1132
  //#region src/components/form/password-input.d.ts
1340
1133
  interface PasswordInputProps<TFieldValues extends FieldValues = FieldValues> extends Omit<FormInputProps<TFieldValues>, "type" | "iconRight" | "addonRight"> {
@@ -1364,186 +1157,458 @@ declare function PasswordInput<TFieldValues extends FieldValues = FieldValues>({
1364
1157
  ...props
1365
1158
  }: PasswordInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1366
1159
  //#endregion
1367
- //#region src/components/form/number-input.d.ts
1368
- interface NumberInputProps<TFieldValues extends FieldValues = FieldValues> {
1160
+ //#region src/components/form/phone-input.d.ts
1161
+ interface FormPhoneInputProps<TFieldValues extends FieldValues = FieldValues> {
1369
1162
  control?: Control<TFieldValues>;
1370
1163
  name: FieldPath<TFieldValues> | string;
1371
1164
  label?: string;
1372
1165
  placeholder?: string;
1373
1166
  description?: string;
1374
- helperText?: string;
1375
1167
  required?: boolean;
1376
1168
  disabled?: boolean;
1377
- min?: number;
1378
- max?: number;
1379
- step?: number;
1380
- showStepper?: boolean;
1381
- value?: number | string;
1382
- onChange?: (value: number | undefined) => void;
1383
- onValueChange?: (value: number | undefined) => void;
1169
+ defaultCountry?: string;
1170
+ countries?: PhoneCountry[];
1384
1171
  className?: string;
1385
1172
  labelClassName?: string;
1386
1173
  inputClassName?: string;
1174
+ value?: string;
1175
+ onChange?: (value: string) => void;
1387
1176
  }
1388
1177
  /**
1389
- * NumberInput - Numeric input with optional stepper buttons
1390
- *
1391
- * Features:
1392
- * - +/- stepper buttons with min/max clamping
1393
- * - Works with react-hook-form Controller
1394
- * - Can be used standalone without form
1395
- * - Native spinner hidden when stepper is shown
1178
+ * FormPhoneInput - Phone input with Field integration and react-hook-form support
1396
1179
  *
1397
1180
  * @example
1398
1181
  * ```tsx
1399
- * <NumberInput
1182
+ * // With react-hook-form
1183
+ * <FormPhoneInput
1400
1184
  * control={form.control}
1401
- * name="quantity"
1402
- * label="Quantity"
1403
- * min={1}
1404
- * max={100}
1405
- * step={1}
1185
+ * name="phone"
1186
+ * label="Phone Number"
1187
+ * required
1188
+ * />
1189
+ *
1190
+ * // Standalone
1191
+ * <FormPhoneInput
1192
+ * name="phone"
1193
+ * label="Phone Number"
1194
+ * value={phone}
1195
+ * onChange={setPhone}
1406
1196
  * />
1407
1197
  * ```
1408
1198
  */
1409
- declare function NumberInput<TFieldValues extends FieldValues = FieldValues>({
1199
+ declare function FormPhoneInput<TFieldValues extends FieldValues = FieldValues>({
1410
1200
  control,
1411
1201
  name,
1412
1202
  label,
1413
1203
  placeholder,
1414
1204
  description,
1415
- helperText,
1416
1205
  required,
1417
1206
  disabled,
1418
- min,
1419
- max,
1420
- step,
1421
- showStepper,
1422
- value: propValue,
1423
- onChange: propOnChange,
1424
- onValueChange,
1207
+ defaultCountry,
1208
+ countries,
1425
1209
  className,
1426
1210
  labelClassName,
1427
- inputClassName
1428
- }: NumberInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1211
+ inputClassName,
1212
+ value,
1213
+ onChange
1214
+ }: FormPhoneInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1429
1215
  //#endregion
1430
- //#region src/components/form/form-section.d.ts
1431
- interface FormSectionProps {
1432
- title?: string;
1433
- description?: string;
1434
- children: ReactNode;
1435
- variant?: "default" | "card" | "subtle";
1436
- collapsible?: boolean;
1437
- defaultOpen?: boolean;
1438
- icon?: ReactNode | ComponentType<{
1439
- className?: string;
1440
- }>;
1441
- className?: string;
1216
+ //#region src/components/form/radio-input.d.ts
1217
+ interface RadioChoice {
1218
+ value: string;
1219
+ label: string;
1220
+ disabled?: boolean;
1442
1221
  }
1443
- interface FormGridProps {
1444
- children: ReactNode;
1445
- cols?: 1 | 2 | 3 | 4;
1222
+ interface RadioInputProps<TFieldValues extends FieldValues = FieldValues> {
1223
+ control?: Control<TFieldValues>;
1224
+ name: FieldPath<TFieldValues> | string;
1225
+ label?: string;
1226
+ description?: string;
1227
+ helperText?: string;
1228
+ required?: boolean;
1229
+ disabled?: boolean;
1230
+ choices?: RadioChoice[];
1231
+ items?: RadioChoice[];
1232
+ orientation?: "vertical" | "horizontal";
1233
+ value?: string;
1234
+ onChange?: (value: string) => void;
1235
+ onValueChange?: (value: string) => void;
1446
1236
  className?: string;
1237
+ labelClassName?: string;
1238
+ radioGroupClassName?: string;
1239
+ radioItemClassName?: string;
1240
+ radioLabelClassName?: string;
1447
1241
  }
1448
1242
  /**
1449
- * FormSection - Organizes form fields into logical groups with variants
1243
+ * RadioInput - Radio group with react-hook-form integration
1450
1244
  *
1451
1245
  * @example
1452
1246
  * ```tsx
1453
- * <FormSection title="Personal Info" variant="card" collapsible>
1454
- * <FormInput name="name" label="Name" />
1455
- * <FormInput name="email" label="Email" />
1456
- * </FormSection>
1247
+ * <RadioInput
1248
+ * control={form.control}
1249
+ * name="plan"
1250
+ * label="Select Plan"
1251
+ * choices={[
1252
+ * { value: "free", label: "Free" },
1253
+ * { value: "pro", label: "Pro" },
1254
+ * { value: "enterprise", label: "Enterprise" },
1255
+ * ]}
1256
+ * orientation="horizontal"
1257
+ * />
1457
1258
  * ```
1458
1259
  */
1459
- declare function FormSection({
1460
- title,
1260
+ declare function RadioInput<TFieldValues extends FieldValues = FieldValues>({
1261
+ control,
1262
+ name,
1263
+ label,
1461
1264
  description,
1462
- children,
1463
- variant,
1464
- collapsible,
1465
- defaultOpen,
1466
- icon,
1467
- className
1468
- }: FormSectionProps): react_jsx_runtime0.JSX.Element;
1265
+ helperText,
1266
+ required,
1267
+ disabled,
1268
+ choices,
1269
+ items,
1270
+ orientation,
1271
+ value: propValue,
1272
+ onChange: propOnChange,
1273
+ onValueChange,
1274
+ className,
1275
+ labelClassName,
1276
+ radioGroupClassName,
1277
+ radioItemClassName,
1278
+ radioLabelClassName
1279
+ }: RadioInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1280
+ //#endregion
1281
+ //#region src/components/form/select-input.d.ts
1282
+ interface SelectOption {
1283
+ value: string | number;
1284
+ label: string;
1285
+ disabled?: boolean;
1286
+ }
1287
+ interface SelectOptionGroup {
1288
+ label: string;
1289
+ items: SelectOption[];
1290
+ }
1291
+ interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
1292
+ control?: Control<TFieldValues>;
1293
+ name: FieldPath<TFieldValues> | string;
1294
+ label?: string;
1295
+ placeholder?: string;
1296
+ description?: string;
1297
+ helperText?: string;
1298
+ required?: boolean;
1299
+ disabled?: boolean;
1300
+ items?: SelectOption[];
1301
+ groups?: SelectOptionGroup[];
1302
+ /** Explicit "all/clear" option prepended to items */
1303
+ allOption?: SelectOption;
1304
+ /** When true, auto-adds a clear option using the placeholder text as its label */
1305
+ clearable?: boolean;
1306
+ valueKey?: string;
1307
+ displayKey?: string;
1308
+ value?: string | number;
1309
+ onValueChange?: (value: string) => void;
1310
+ className?: string;
1311
+ labelClassName?: string;
1312
+ triggerClassName?: string;
1313
+ contentClassName?: string;
1314
+ itemClassName?: string;
1315
+ Icon?: React$1.ComponentType<{
1316
+ className?: string;
1317
+ }>;
1318
+ defaultOpen?: boolean;
1319
+ side?: "top" | "bottom" | "left" | "right";
1320
+ sideOffset?: number;
1321
+ align?: "start" | "center" | "end";
1322
+ alignOffset?: number;
1323
+ }
1469
1324
  /**
1470
- * FormGrid - Responsive grid layout for form fields
1325
+ * SelectInput - Select dropdown with react-hook-form integration
1326
+ *
1327
+ * Features:
1328
+ * - Flat and grouped options
1329
+ * - Custom placeholder
1330
+ * - Optional "All" option (use placeholder text to match)
1331
+ * - Custom styling
1332
+ *
1333
+ * Note: For "All" options with value="", the placeholder will be shown when selected.
1334
+ * Make sure your placeholder text matches what you want to display for "All".
1471
1335
  *
1472
1336
  * @example
1473
1337
  * ```tsx
1474
- * <FormGrid cols={2}>
1475
- * <FormInput name="firstName" label="First Name" />
1476
- * <FormInput name="lastName" label="Last Name" />
1477
- * </FormGrid>
1338
+ * // Basic usage
1339
+ * <SelectInput
1340
+ * control={form.control}
1341
+ * name="role"
1342
+ * label="Role"
1343
+ * items={[
1344
+ * { value: "admin", label: "Admin" },
1345
+ * { value: "user", label: "User" },
1346
+ * ]}
1347
+ * />
1348
+ *
1349
+ * // With "All" option - placeholder shows when "All" is selected
1350
+ * <SelectInput
1351
+ * name="status"
1352
+ * label="Status"
1353
+ * items={[
1354
+ * { value: "", label: "All" }, // This will show placeholder when selected
1355
+ * { value: "active", label: "Active" },
1356
+ * ]}
1357
+ * placeholder="All" // Make sure this matches the "All" label
1358
+ * />
1478
1359
  * ```
1479
1360
  */
1480
- declare function FormGrid({
1481
- children,
1482
- cols,
1483
- className
1484
- }: FormGridProps): react_jsx_runtime0.JSX.Element;
1361
+ declare function SelectInput<TFieldValues extends FieldValues = FieldValues>({
1362
+ control,
1363
+ items,
1364
+ groups,
1365
+ name,
1366
+ label,
1367
+ placeholder,
1368
+ allOption,
1369
+ clearable,
1370
+ description,
1371
+ helperText,
1372
+ required,
1373
+ disabled,
1374
+ className,
1375
+ labelClassName,
1376
+ triggerClassName,
1377
+ contentClassName,
1378
+ itemClassName,
1379
+ Icon,
1380
+ onValueChange,
1381
+ value: propValue,
1382
+ defaultOpen,
1383
+ side,
1384
+ sideOffset,
1385
+ align,
1386
+ alignOffset
1387
+ }: SelectInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1485
1388
  //#endregion
1486
- //#region src/components/form/form-field-array.d.ts
1487
- interface FormFieldArrayProps {
1488
- title?: string;
1389
+ //#region src/components/form/slug-field.d.ts
1390
+ interface SlugFieldProps {
1391
+ control?: Control<FieldValues>;
1392
+ name: string;
1393
+ label?: string;
1394
+ placeholder?: string;
1489
1395
  description?: string;
1490
- children: ReactNode;
1491
- onAdd?: () => void;
1492
- addLabel?: string;
1493
- emptyMessage?: string;
1494
- itemCount?: number;
1495
- maxItems?: number;
1396
+ helperText?: string;
1397
+ required?: boolean;
1398
+ disabled?: boolean;
1399
+ sourceValue?: string;
1400
+ onGenerate?: (sourceValue: string) => string;
1401
+ value?: string;
1402
+ onChange?: (e: {
1403
+ target: {
1404
+ value: string;
1405
+ };
1406
+ }) => void;
1407
+ onValueChange?: (value: string) => void;
1496
1408
  className?: string;
1409
+ labelClassName?: string;
1410
+ inputClassName?: string;
1411
+ error?: FieldError;
1412
+ ref?: Ref<HTMLInputElement>;
1497
1413
  }
1498
- interface FormFieldArrayItemProps {
1499
- children: ReactNode;
1500
- onRemove?: () => void;
1501
- index?: number;
1502
- title?: string;
1414
+ /**
1415
+ * Generates a URL-friendly slug from a string
1416
+ */
1417
+ declare function generateSlug(text: string | undefined): string;
1418
+ /**
1419
+ * SlugField - URL slug input with auto-generation
1420
+ *
1421
+ * @example
1422
+ * ```tsx
1423
+ * <SlugField
1424
+ * control={form.control}
1425
+ * name="slug"
1426
+ * label="URL Slug"
1427
+ * sourceValue={form.watch("title")}
1428
+ * description="This will be used in the page URL"
1429
+ * required
1430
+ * />
1431
+ * ```
1432
+ */
1433
+ declare function SlugField({
1434
+ control,
1435
+ name,
1436
+ description,
1437
+ helperText,
1438
+ required,
1439
+ label,
1440
+ placeholder,
1441
+ disabled,
1442
+ sourceValue,
1443
+ onGenerate,
1444
+ className,
1445
+ inputClassName,
1446
+ labelClassName,
1447
+ onValueChange,
1448
+ value,
1449
+ onChange,
1450
+ error,
1451
+ ref
1452
+ }: SlugFieldProps): react_jsx_runtime0.JSX.Element;
1453
+ //#endregion
1454
+ //#region src/components/form/switch-input.d.ts
1455
+ interface SwitchInputProps<TFieldValues extends FieldValues = FieldValues> {
1456
+ control?: Control<TFieldValues>;
1457
+ name: FieldPath<TFieldValues> | string;
1458
+ label?: string;
1459
+ description?: string;
1460
+ helperText?: string;
1461
+ required?: boolean;
1462
+ disabled?: boolean;
1463
+ orientation?: "horizontal" | "vertical";
1464
+ value?: boolean;
1465
+ onChange?: (value: boolean) => void;
1466
+ onValueChange?: (value: boolean) => void;
1503
1467
  className?: string;
1468
+ labelClassName?: string;
1469
+ switchClassName?: string;
1504
1470
  }
1505
1471
  /**
1506
- * FormFieldArray - Container for dynamic field arrays with add/remove
1472
+ * SwitchInput - Toggle switch with react-hook-form integration
1507
1473
  *
1508
1474
  * @example
1509
1475
  * ```tsx
1510
- * <FormFieldArray
1511
- * title="Team Members"
1512
- * onAdd={() => append({ name: "", role: "" })}
1513
- * itemCount={fields.length}
1514
- * maxItems={10}
1515
- * >
1516
- * {fields.map((field, index) => (
1517
- * <FormFieldArrayItem
1518
- * key={field.id}
1519
- * title={`Member ${index + 1}`}
1520
- * onRemove={() => remove(index)}
1521
- * >
1522
- * <FormInput control={control} name={`members.${index}.name`} label="Name" />
1523
- * </FormFieldArrayItem>
1524
- * ))}
1525
- * </FormFieldArray>
1476
+ * <SwitchInput
1477
+ * control={form.control}
1478
+ * name="notifications"
1479
+ * label="Enable notifications"
1480
+ * description="Receive email updates"
1481
+ * />
1526
1482
  * ```
1527
1483
  */
1528
- declare function FormFieldArray({
1529
- title,
1484
+ declare function SwitchInput<TFieldValues extends FieldValues = FieldValues>({
1485
+ control,
1486
+ name,
1487
+ label,
1530
1488
  description,
1531
- children,
1532
- onAdd,
1533
- addLabel,
1534
- emptyMessage,
1535
- itemCount,
1536
- maxItems,
1537
- className
1538
- }: FormFieldArrayProps): react_jsx_runtime0.JSX.Element;
1489
+ helperText,
1490
+ required,
1491
+ disabled,
1492
+ orientation,
1493
+ value: propValue,
1494
+ onChange: propOnChange,
1495
+ onValueChange,
1496
+ className,
1497
+ labelClassName,
1498
+ switchClassName
1499
+ }: SwitchInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1500
+ //#endregion
1501
+ //#region src/components/form/tag-choice-input.d.ts
1502
+ interface TagChoiceItem {
1503
+ value: string;
1504
+ label: string;
1505
+ disabled?: boolean;
1506
+ }
1507
+ interface TagChoiceInputProps<TFieldValues extends FieldValues = FieldValues> {
1508
+ control?: Control<TFieldValues>;
1509
+ name: FieldPath<TFieldValues> | string;
1510
+ label?: string;
1511
+ placeholder?: string;
1512
+ description?: string;
1513
+ helperText?: string;
1514
+ required?: boolean;
1515
+ disabled?: boolean;
1516
+ items?: TagChoiceItem[];
1517
+ value?: string[];
1518
+ onValueChange?: (values: string[]) => void;
1519
+ className?: string;
1520
+ }
1539
1521
  /**
1540
- * FormFieldArrayItem - Individual item within a FormFieldArray
1522
+ * TagChoiceInput - Multi-select with inline tag display
1523
+ *
1524
+ * Selected items appear as badges inside the trigger area.
1525
+ * The popover dropdown stays anchored without layout jumps.
1541
1526
  */
1542
- declare function FormFieldArrayItem({
1543
- children,
1544
- onRemove,
1545
- title,
1546
- className
1547
- }: FormFieldArrayItemProps): react_jsx_runtime0.JSX.Element;
1527
+ declare function TagChoiceInput<TFieldValues extends FieldValues = FieldValues>({
1528
+ control,
1529
+ name,
1530
+ label,
1531
+ description,
1532
+ helperText,
1533
+ placeholder,
1534
+ required,
1535
+ disabled,
1536
+ className,
1537
+ items,
1538
+ value: propValue,
1539
+ onValueChange
1540
+ }: TagChoiceInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
1541
+ declare namespace TagChoiceInput {
1542
+ var displayName: string;
1543
+ }
1544
+ //#endregion
1545
+ //#region src/components/form/tag-input/types.d.ts
1546
+ interface TagInputProps {
1547
+ control?: Control<FieldValues>;
1548
+ name: string;
1549
+ label?: string;
1550
+ placeholder?: string;
1551
+ description?: string;
1552
+ helperText?: string;
1553
+ required?: boolean;
1554
+ disabled?: boolean;
1555
+ maxTags?: number;
1556
+ allowDuplicates?: boolean;
1557
+ delimiter?: string;
1558
+ suggestions?: string[];
1559
+ suggestionLimit?: number;
1560
+ value?: string[];
1561
+ onChange?: (tags: string[]) => void;
1562
+ onValueChange?: (tags: string[]) => void;
1563
+ validateTag?: (tag: string) => boolean;
1564
+ transformTag?: (tag: string) => string;
1565
+ formatTag?: (tag: string) => string;
1566
+ className?: string;
1567
+ labelClassName?: string;
1568
+ inputClassName?: string;
1569
+ [key: string]: unknown;
1570
+ }
1571
+ //#endregion
1572
+ //#region src/components/form/tag-input/tag-input.d.ts
1573
+ /**
1574
+ * TagInput - Tag/chip input with react-hook-form integration
1575
+ *
1576
+ * @example
1577
+ * ```tsx
1578
+ * <TagInput
1579
+ * control={form.control}
1580
+ * name="tags"
1581
+ * label="Tags"
1582
+ * placeholder="Add tags..."
1583
+ * maxTags={10}
1584
+ * suggestions={["react", "typescript", "nextjs"]}
1585
+ * />
1586
+ * ```
1587
+ */
1588
+ declare function TagInput({
1589
+ control,
1590
+ name,
1591
+ label,
1592
+ description,
1593
+ helperText,
1594
+ placeholder,
1595
+ required,
1596
+ disabled,
1597
+ className,
1598
+ labelClassName,
1599
+ inputClassName,
1600
+ maxTags,
1601
+ allowDuplicates,
1602
+ suggestions,
1603
+ suggestionLimit,
1604
+ value: propValue,
1605
+ onChange: propOnChange,
1606
+ onValueChange,
1607
+ delimiter,
1608
+ validateTag,
1609
+ transformTag,
1610
+ formatTag,
1611
+ ...props
1612
+ }: TagInputProps): react_jsx_runtime0.JSX.Element;
1548
1613
  //#endregion
1549
- export { AsyncCombobox, type AsyncComboboxOption, type AsyncComboboxProps, AsyncMultiSelect, type AsyncMultiSelectOption, type AsyncMultiSelectProps, CheckboxInput, type CheckboxInputProps, type CheckboxItem, ComboboxInput, type ComboboxInputProps, type ComboboxOption, DateInput, type DateInputProps, type DateRange, DateRangeFilter, type DateRangeFilterProps, DateRangeInput, type DateRangeInputProps, type DateRangeValue, DateTimeInput, type DateTimeInputProps, FileUploadInput, type FileUploadInputProps, FormErrorSummary, type FormErrorSummaryProps, FormFieldArray, FormFieldArrayItem, type FormFieldArrayItemProps, type FormFieldArrayProps, FormGrid, type FormGridProps, FormInput, type FormInputProps, FormSection, type FormSectionProps, FormTextarea, type FormTextareaProps, MultiSelect, type MultiSelectOption, type MultiSelectOptionGroup, type MultiSelectProps, NumberInput, type NumberInputProps, OTPInput, type OTPInputProps, PasswordInput, type PasswordInputProps, type RadioChoice, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, type SelectOption, type SelectOptionGroup, SlugField, type SlugFieldProps, SwitchInput, type SwitchInputProps, TagChoiceInput, type TagChoiceInputProps, type TagChoiceItem, TagInput, type TagInputProps, generateSlug };
1614
+ export { AsyncCombobox, type AsyncComboboxOption, type AsyncComboboxProps, AsyncMultiSelect, type AsyncMultiSelectOption, type AsyncMultiSelectProps, CheckboxInput, type CheckboxInputProps, type CheckboxItem, ComboboxInput, type ComboboxInputProps, type ComboboxOption, DateInput, type DateInputProps, type DateRange, DateRangeFilter, type DateRangeFilterProps, DateRangeInput, type DateRangeInputProps, type DateRangeValue, DateTimeInput, type DateTimeInputProps, FileUploadInput, type FileUploadInputProps, FormErrorSummary, type FormErrorSummaryProps, FormFieldArray, FormFieldArrayItem, type FormFieldArrayItemProps, type FormFieldArrayProps, FormGrid, type FormGridProps, FormInput, type FormInputProps, FormPhoneInput, type FormPhoneInputProps, FormSection, type FormSectionProps, FormTextarea, type FormTextareaProps, MultiSelect, type MultiSelectOption, type MultiSelectOptionGroup, type MultiSelectProps, NumberInput, type NumberInputProps, OTPInput, type OTPInputProps, PasswordInput, type PasswordInputProps, type RadioChoice, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, type SelectOption, type SelectOptionGroup, SlugField, type SlugFieldProps, SwitchInput, type SwitchInputProps, TagChoiceInput, type TagChoiceInputProps, type TagChoiceItem, TagInput, type TagInputProps, generateSlug };