@classytic/fluid 0.2.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +149 -62
- package/dist/api-pagination-CJ0vR_w6.d.mts +34 -0
- package/dist/api-pagination-DBTE0yk4.mjs +190 -0
- package/dist/chunk-DQk6qfdC.mjs +18 -0
- package/dist/client/calendar.d.mts +105 -0
- package/dist/client/calendar.mjs +202 -0
- package/dist/client/core.d.mts +1614 -0
- package/dist/client/core.mjs +2779 -0
- package/dist/client/error.d.mts +125 -0
- package/dist/client/error.mjs +166 -0
- package/dist/client/hooks.d.mts +162 -0
- package/dist/client/hooks.mjs +447 -0
- package/dist/client/table.d.mts +84 -0
- package/dist/client/table.mjs +373 -0
- package/dist/client/theme.d.mts +6 -0
- package/dist/client/theme.mjs +65 -0
- package/dist/command.d.mts +134 -0
- package/dist/command.mjs +132 -0
- package/dist/compact.d.mts +359 -0
- package/dist/compact.mjs +892 -0
- package/dist/dashboard.d.mts +778 -0
- package/dist/dashboard.mjs +1617 -0
- package/dist/filter-utils-DqMmy_v-.mjs +72 -0
- package/dist/filter-utils-IZ0GtuPo.d.mts +40 -0
- package/dist/forms.d.mts +1549 -0
- package/dist/forms.mjs +3740 -0
- package/dist/index.d.mts +296 -0
- package/dist/index.mjs +432 -0
- package/dist/layouts.d.mts +215 -0
- package/dist/layouts.mjs +460 -0
- package/dist/search-context-DR7DBs7S.mjs +19 -0
- package/dist/search.d.mts +254 -0
- package/dist/search.mjs +523 -0
- package/dist/sheet-wrapper-CWNCvYMD.mjs +211 -0
- package/dist/use-base-search-BGgWnWaF.d.mts +35 -0
- package/dist/use-debounce-xmZucz5e.mjs +53 -0
- package/dist/use-keyboard-shortcut-Bl6YM5Q7.mjs +82 -0
- package/dist/use-keyboard-shortcut-_mRCh3QO.d.mts +24 -0
- package/dist/use-media-query-BnVNIKT4.mjs +17 -0
- package/dist/use-mobile-BX3SQVo2.mjs +20 -0
- package/dist/use-scroll-detection-CsgsQYvy.mjs +43 -0
- package/dist/utils-CDue7cEt.d.mts +6 -0
- package/dist/utils-DQ5SCVoW.mjs +10 -0
- package/package.json +85 -45
- package/styles.css +2 -2
- package/dist/chunk-GUHK2DTW.js +0 -15
- package/dist/chunk-GUHK2DTW.js.map +0 -1
- package/dist/chunk-H3NFL3GJ.js +0 -57
- package/dist/chunk-H3NFL3GJ.js.map +0 -1
- package/dist/chunk-J2YRTQE4.js +0 -293
- package/dist/chunk-J2YRTQE4.js.map +0 -1
- package/dist/compact.d.ts +0 -217
- package/dist/compact.js +0 -986
- package/dist/compact.js.map +0 -1
- package/dist/dashboard.d.ts +0 -386
- package/dist/dashboard.js +0 -1032
- package/dist/dashboard.js.map +0 -1
- package/dist/index.d.ts +0 -2141
- package/dist/index.js +0 -6460
- package/dist/index.js.map +0 -1
- package/dist/layout.d.ts +0 -25
- package/dist/layout.js +0 -4
- package/dist/layout.js.map +0 -1
- package/dist/search.d.ts +0 -172
- package/dist/search.js +0 -341
- package/dist/search.js.map +0 -1
- package/dist/use-base-search-AS5Z3SAy.d.ts +0 -64
- package/dist/utils-Cbsgs0XP.d.ts +0 -5
package/dist/forms.d.mts
ADDED
|
@@ -0,0 +1,1549 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { ComponentType, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
4
|
+
import { LucideIcon } from "lucide-react";
|
|
5
|
+
import { Control, FieldError, FieldPath, FieldValues } from "react-hook-form";
|
|
6
|
+
|
|
7
|
+
//#region src/components/form/form-input.d.ts
|
|
8
|
+
interface TransformFunctions {
|
|
9
|
+
input?: (value: unknown) => string;
|
|
10
|
+
output?: (value: string) => unknown;
|
|
11
|
+
}
|
|
12
|
+
interface FormInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
13
|
+
control?: Control<TFieldValues>;
|
|
14
|
+
name: FieldPath<TFieldValues> | string;
|
|
15
|
+
label?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
helperText?: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
type?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
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"];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
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
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```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
|
|
69
|
+
* control={form.control}
|
|
70
|
+
* name="search"
|
|
71
|
+
* iconLeft={<SearchIcon />}
|
|
72
|
+
* placeholder="Search..."
|
|
73
|
+
* />
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare function FormInput<TFieldValues extends FieldValues = FieldValues>({
|
|
77
|
+
control,
|
|
78
|
+
name,
|
|
79
|
+
label,
|
|
80
|
+
placeholder,
|
|
81
|
+
description,
|
|
82
|
+
helperText,
|
|
83
|
+
required,
|
|
84
|
+
disabled,
|
|
85
|
+
readOnly,
|
|
86
|
+
type,
|
|
87
|
+
className,
|
|
88
|
+
labelClassName,
|
|
89
|
+
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;
|
|
110
|
+
//#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;
|
|
115
|
+
label?: string;
|
|
116
|
+
placeholder?: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
helperText?: string;
|
|
119
|
+
required?: boolean;
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
readOnly?: boolean;
|
|
122
|
+
rows?: number;
|
|
123
|
+
value?: string;
|
|
124
|
+
onChange?: (value: string) => void;
|
|
125
|
+
onValueChange?: (value: string) => void;
|
|
126
|
+
className?: string;
|
|
127
|
+
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;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* FormTextarea - Textarea with react-hook-form integration
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```tsx
|
|
144
|
+
* <FormTextarea
|
|
145
|
+
* control={form.control}
|
|
146
|
+
* name="bio"
|
|
147
|
+
* label="Biography"
|
|
148
|
+
* placeholder="Tell us about yourself..."
|
|
149
|
+
* rows={5}
|
|
150
|
+
* />
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
declare function FormTextarea<TFieldValues extends FieldValues = FieldValues>({
|
|
154
|
+
control,
|
|
155
|
+
name,
|
|
156
|
+
label,
|
|
157
|
+
description,
|
|
158
|
+
helperText,
|
|
159
|
+
required,
|
|
160
|
+
disabled,
|
|
161
|
+
readOnly,
|
|
162
|
+
placeholder,
|
|
163
|
+
value: propValue,
|
|
164
|
+
onChange: propOnChange,
|
|
165
|
+
onValueChange,
|
|
166
|
+
className,
|
|
167
|
+
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;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/components/form/select-input.d.ts
|
|
182
|
+
interface SelectOption {
|
|
183
|
+
value: string | number;
|
|
184
|
+
label: string;
|
|
185
|
+
disabled?: boolean;
|
|
186
|
+
}
|
|
187
|
+
interface SelectOptionGroup {
|
|
188
|
+
label: string;
|
|
189
|
+
items: SelectOption[];
|
|
190
|
+
}
|
|
191
|
+
interface SelectInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
192
|
+
control?: Control<TFieldValues>;
|
|
193
|
+
name: FieldPath<TFieldValues> | string;
|
|
194
|
+
label?: string;
|
|
195
|
+
placeholder?: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
helperText?: string;
|
|
198
|
+
required?: boolean;
|
|
199
|
+
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;
|
|
207
|
+
className?: string;
|
|
208
|
+
labelClassName?: string;
|
|
209
|
+
triggerClassName?: string;
|
|
210
|
+
contentClassName?: string;
|
|
211
|
+
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;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* SelectInput - Select dropdown with react-hook-form integration
|
|
223
|
+
*
|
|
224
|
+
* 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
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```tsx
|
|
319
|
+
* <CheckboxInput
|
|
320
|
+
* control={form.control}
|
|
321
|
+
* name="features"
|
|
322
|
+
* label="Features"
|
|
323
|
+
* items={[
|
|
324
|
+
* { id: "wifi", label: "WiFi" },
|
|
325
|
+
* { id: "parking", label: "Parking" },
|
|
326
|
+
* { id: "pool", label: "Pool" },
|
|
327
|
+
* ]}
|
|
328
|
+
* />
|
|
329
|
+
* ```
|
|
330
|
+
*/
|
|
331
|
+
declare function CheckboxInput<TFieldValues extends FieldValues = FieldValues>({
|
|
332
|
+
control,
|
|
333
|
+
name,
|
|
334
|
+
label,
|
|
335
|
+
description,
|
|
336
|
+
helperText,
|
|
337
|
+
required,
|
|
338
|
+
disabled,
|
|
339
|
+
items,
|
|
340
|
+
value: propValue,
|
|
341
|
+
onChange: propOnChange,
|
|
342
|
+
onValueChange,
|
|
343
|
+
className,
|
|
344
|
+
labelClassName,
|
|
345
|
+
checkboxClassName,
|
|
346
|
+
itemClassName,
|
|
347
|
+
itemLabelClassName
|
|
348
|
+
}: CheckboxInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/components/form/radio-input.d.ts
|
|
351
|
+
interface RadioChoice {
|
|
352
|
+
value: string;
|
|
353
|
+
label: string;
|
|
354
|
+
disabled?: boolean;
|
|
355
|
+
}
|
|
356
|
+
interface RadioInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
357
|
+
control?: Control<TFieldValues>;
|
|
358
|
+
name: FieldPath<TFieldValues> | string;
|
|
359
|
+
label?: string;
|
|
360
|
+
description?: string;
|
|
361
|
+
helperText?: string;
|
|
362
|
+
required?: boolean;
|
|
363
|
+
disabled?: boolean;
|
|
364
|
+
choices?: RadioChoice[];
|
|
365
|
+
items?: RadioChoice[];
|
|
366
|
+
orientation?: "vertical" | "horizontal";
|
|
367
|
+
value?: string;
|
|
368
|
+
onChange?: (value: string) => void;
|
|
369
|
+
onValueChange?: (value: string) => void;
|
|
370
|
+
className?: string;
|
|
371
|
+
labelClassName?: string;
|
|
372
|
+
radioGroupClassName?: string;
|
|
373
|
+
radioItemClassName?: string;
|
|
374
|
+
radioLabelClassName?: string;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* RadioInput - Radio group with react-hook-form integration
|
|
378
|
+
*
|
|
379
|
+
* @example
|
|
380
|
+
* ```tsx
|
|
381
|
+
* <RadioInput
|
|
382
|
+
* 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" },
|
|
389
|
+
* ]}
|
|
390
|
+
* orientation="horizontal"
|
|
391
|
+
* />
|
|
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
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* ```tsx
|
|
437
|
+
* <SwitchInput
|
|
438
|
+
* control={form.control}
|
|
439
|
+
* name="notifications"
|
|
440
|
+
* label="Enable notifications"
|
|
441
|
+
* description="Receive email updates"
|
|
442
|
+
* />
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
declare function SwitchInput<TFieldValues extends FieldValues = FieldValues>({
|
|
446
|
+
control,
|
|
447
|
+
name,
|
|
448
|
+
label,
|
|
449
|
+
description,
|
|
450
|
+
helperText,
|
|
451
|
+
required,
|
|
452
|
+
disabled,
|
|
453
|
+
orientation,
|
|
454
|
+
value: propValue,
|
|
455
|
+
onChange: propOnChange,
|
|
456
|
+
onValueChange,
|
|
457
|
+
className,
|
|
458
|
+
labelClassName,
|
|
459
|
+
switchClassName
|
|
460
|
+
}: SwitchInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region src/components/form/date-input.d.ts
|
|
463
|
+
type DateValue = Date | string | null | undefined;
|
|
464
|
+
interface DateInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
465
|
+
control?: Control<TFieldValues>;
|
|
466
|
+
name: FieldPath<TFieldValues> | string;
|
|
467
|
+
label?: string;
|
|
468
|
+
placeholder?: string;
|
|
469
|
+
description?: string;
|
|
470
|
+
helperText?: string;
|
|
471
|
+
required?: boolean;
|
|
472
|
+
disabled?: boolean;
|
|
473
|
+
minDate?: DateValue;
|
|
474
|
+
maxDate?: DateValue;
|
|
475
|
+
value?: DateValue;
|
|
476
|
+
onChange?: (date: Date | undefined) => void;
|
|
477
|
+
onValueChange?: (date: Date | undefined) => void;
|
|
478
|
+
className?: string;
|
|
479
|
+
labelClassName?: string;
|
|
480
|
+
inputClassName?: string;
|
|
481
|
+
Icon?: React$1.ComponentType<{
|
|
482
|
+
className?: string;
|
|
483
|
+
}>;
|
|
484
|
+
allowClear?: boolean;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* DateInput - Date picker with react-hook-form integration
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* ```tsx
|
|
491
|
+
* <DateInput
|
|
492
|
+
* control={form.control}
|
|
493
|
+
* name="birthDate"
|
|
494
|
+
* label="Date of Birth"
|
|
495
|
+
* minDate="1900-01-01"
|
|
496
|
+
* maxDate={new Date()}
|
|
497
|
+
* />
|
|
498
|
+
* ```
|
|
499
|
+
*/
|
|
500
|
+
declare function DateInput<TFieldValues extends FieldValues = FieldValues>({
|
|
501
|
+
control,
|
|
502
|
+
name,
|
|
503
|
+
label,
|
|
504
|
+
description,
|
|
505
|
+
helperText,
|
|
506
|
+
placeholder,
|
|
507
|
+
required,
|
|
508
|
+
disabled,
|
|
509
|
+
className,
|
|
510
|
+
labelClassName,
|
|
511
|
+
inputClassName,
|
|
512
|
+
minDate,
|
|
513
|
+
maxDate,
|
|
514
|
+
onValueChange,
|
|
515
|
+
value: propValue,
|
|
516
|
+
onChange: propOnChange,
|
|
517
|
+
Icon,
|
|
518
|
+
allowClear
|
|
519
|
+
}: DateInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
520
|
+
//#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;
|
|
542
|
+
className?: string;
|
|
543
|
+
labelClassName?: string;
|
|
544
|
+
inputClassName?: string;
|
|
545
|
+
[key: string]: unknown;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* TagInput - Tag/chip input with react-hook-form integration
|
|
549
|
+
*
|
|
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
|
+
* ```
|
|
561
|
+
*/
|
|
562
|
+
declare function TagInput({
|
|
563
|
+
control,
|
|
564
|
+
name,
|
|
565
|
+
label,
|
|
566
|
+
description,
|
|
567
|
+
helperText,
|
|
568
|
+
placeholder,
|
|
569
|
+
required,
|
|
570
|
+
disabled,
|
|
571
|
+
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;
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region src/components/form/tag-choice-input.d.ts
|
|
589
|
+
interface TagChoiceItem {
|
|
590
|
+
value: string;
|
|
591
|
+
label: string;
|
|
592
|
+
disabled?: boolean;
|
|
593
|
+
}
|
|
594
|
+
interface TagChoiceInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
595
|
+
control?: Control<TFieldValues>;
|
|
596
|
+
name: FieldPath<TFieldValues> | string;
|
|
597
|
+
label?: string;
|
|
598
|
+
placeholder?: string;
|
|
599
|
+
description?: string;
|
|
600
|
+
helperText?: string;
|
|
601
|
+
required?: boolean;
|
|
602
|
+
disabled?: boolean;
|
|
603
|
+
items?: TagChoiceItem[];
|
|
604
|
+
value?: string[];
|
|
605
|
+
onValueChange?: (values: string[]) => void;
|
|
606
|
+
className?: string;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* TagChoiceInput - Multi-select with inline tag display
|
|
610
|
+
*
|
|
611
|
+
* Selected items appear as badges inside the trigger area.
|
|
612
|
+
* The popover dropdown stays anchored without layout jumps.
|
|
613
|
+
*/
|
|
614
|
+
declare function TagChoiceInput<TFieldValues extends FieldValues = FieldValues>({
|
|
615
|
+
control,
|
|
616
|
+
name,
|
|
617
|
+
label,
|
|
618
|
+
description,
|
|
619
|
+
helperText,
|
|
620
|
+
placeholder,
|
|
621
|
+
required,
|
|
622
|
+
disabled,
|
|
623
|
+
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
|
+
}
|
|
631
|
+
//#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;
|
|
641
|
+
label?: string;
|
|
642
|
+
placeholder?: string;
|
|
643
|
+
emptyText?: string;
|
|
644
|
+
description?: string;
|
|
645
|
+
helperText?: string;
|
|
646
|
+
required?: boolean;
|
|
647
|
+
disabled?: boolean;
|
|
648
|
+
items?: ComboboxOption[];
|
|
649
|
+
value?: string;
|
|
650
|
+
onChange?: (value: string) => void;
|
|
651
|
+
onValueChange?: (value: string) => void;
|
|
652
|
+
className?: string;
|
|
653
|
+
labelClassName?: string;
|
|
654
|
+
inputClassName?: string;
|
|
655
|
+
renderOption?: (option: ComboboxOption) => ReactNode;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
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`.
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* ```tsx
|
|
665
|
+
* // With react-hook-form
|
|
666
|
+
* <ComboboxInput
|
|
667
|
+
* 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}
|
|
684
|
+
* />
|
|
685
|
+
* ```
|
|
686
|
+
*/
|
|
687
|
+
declare function ComboboxInput<TFieldValues extends FieldValues = FieldValues>({
|
|
688
|
+
control,
|
|
689
|
+
name,
|
|
690
|
+
label,
|
|
691
|
+
placeholder,
|
|
692
|
+
emptyText,
|
|
693
|
+
description,
|
|
694
|
+
helperText,
|
|
695
|
+
required,
|
|
696
|
+
disabled,
|
|
697
|
+
items,
|
|
698
|
+
className,
|
|
699
|
+
labelClassName,
|
|
700
|
+
inputClassName,
|
|
701
|
+
onValueChange,
|
|
702
|
+
renderOption,
|
|
703
|
+
value: propValue,
|
|
704
|
+
onChange: propOnChange
|
|
705
|
+
}: ComboboxInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
706
|
+
//#endregion
|
|
707
|
+
//#region src/components/form/slug-field.d.ts
|
|
708
|
+
interface SlugFieldProps {
|
|
709
|
+
control?: Control<FieldValues>;
|
|
710
|
+
name: string;
|
|
711
|
+
label?: string;
|
|
712
|
+
placeholder?: string;
|
|
713
|
+
description?: string;
|
|
714
|
+
helperText?: string;
|
|
715
|
+
required?: boolean;
|
|
716
|
+
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
|
|
742
|
+
* 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
|
|
748
|
+
* />
|
|
749
|
+
* ```
|
|
750
|
+
*/
|
|
751
|
+
declare function SlugField({
|
|
752
|
+
control,
|
|
753
|
+
name,
|
|
754
|
+
description,
|
|
755
|
+
helperText,
|
|
756
|
+
required,
|
|
757
|
+
label,
|
|
758
|
+
placeholder,
|
|
759
|
+
disabled,
|
|
760
|
+
sourceValue,
|
|
761
|
+
onGenerate,
|
|
762
|
+
className,
|
|
763
|
+
inputClassName,
|
|
764
|
+
labelClassName,
|
|
765
|
+
onValueChange,
|
|
766
|
+
value,
|
|
767
|
+
onChange,
|
|
768
|
+
error,
|
|
769
|
+
ref
|
|
770
|
+
}: SlugFieldProps): react_jsx_runtime0.JSX.Element;
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region src/components/form/form-error-summary.d.ts
|
|
773
|
+
interface FormErrorSummaryProps {
|
|
774
|
+
/** Form errors object from react-hook-form */
|
|
775
|
+
errors?: Record<string, unknown>;
|
|
776
|
+
/** Additional CSS classes */
|
|
777
|
+
className?: string;
|
|
778
|
+
/** Custom title text */
|
|
779
|
+
title?: string;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* FormErrorSummary - Displays a summary of form validation errors
|
|
783
|
+
*
|
|
784
|
+
* Takes react-hook-form errors object and displays all errors in a list.
|
|
785
|
+
* Automatically flattens nested errors for complex form structures.
|
|
786
|
+
*/
|
|
787
|
+
declare function FormErrorSummary({
|
|
788
|
+
errors,
|
|
789
|
+
className,
|
|
790
|
+
title
|
|
791
|
+
}: FormErrorSummaryProps): react_jsx_runtime0.JSX.Element | null;
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/components/form/date-range-filter.d.ts
|
|
794
|
+
interface DateRange {
|
|
795
|
+
from?: Date;
|
|
796
|
+
to?: Date;
|
|
797
|
+
}
|
|
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 */
|
|
808
|
+
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
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* DateRangeFilter - A date range picker for filtering
|
|
824
|
+
*
|
|
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
|
|
830
|
+
*/
|
|
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;
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region src/components/form/date-range-input.d.ts
|
|
846
|
+
interface DateRangeValue {
|
|
847
|
+
from?: Date | string;
|
|
848
|
+
to?: Date | string;
|
|
849
|
+
}
|
|
850
|
+
interface DateRangeInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
851
|
+
/** React Hook Form control */
|
|
852
|
+
control?: Control<TFieldValues>;
|
|
853
|
+
/** Field name for form registration */
|
|
854
|
+
name: FieldPath<TFieldValues> | string;
|
|
855
|
+
/** Field label */
|
|
856
|
+
label?: string;
|
|
857
|
+
/** Description text below the input */
|
|
858
|
+
description?: string;
|
|
859
|
+
/** Placeholder text */
|
|
860
|
+
placeholder?: string;
|
|
861
|
+
/** Whether the field is required */
|
|
862
|
+
required?: boolean;
|
|
863
|
+
/** Whether the field is disabled */
|
|
864
|
+
disabled?: boolean;
|
|
865
|
+
/** Additional className for the wrapper */
|
|
866
|
+
className?: string;
|
|
867
|
+
/** Additional className for the label */
|
|
868
|
+
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
|
+
};
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* DateRangeInput - Date range picker with react-hook-form integration
|
|
903
|
+
*
|
|
904
|
+
* @example
|
|
905
|
+
* ```tsx
|
|
906
|
+
* <DateRangeInput
|
|
907
|
+
* control={control}
|
|
908
|
+
* name="dateRange"
|
|
909
|
+
* label="Select Dates"
|
|
910
|
+
* placeholder="Pick a date range"
|
|
911
|
+
* />
|
|
912
|
+
* ```
|
|
913
|
+
*/
|
|
914
|
+
declare function DateRangeInput<TFieldValues extends FieldValues = FieldValues>({
|
|
915
|
+
control,
|
|
916
|
+
name,
|
|
917
|
+
label,
|
|
918
|
+
description,
|
|
919
|
+
placeholder,
|
|
920
|
+
required,
|
|
921
|
+
disabled,
|
|
922
|
+
className,
|
|
923
|
+
labelClassName,
|
|
924
|
+
buttonClassName,
|
|
925
|
+
calendarClassName,
|
|
926
|
+
minDate,
|
|
927
|
+
maxDate,
|
|
928
|
+
disabledDates,
|
|
929
|
+
disabledDays,
|
|
930
|
+
onValueChange,
|
|
931
|
+
validateDateRange,
|
|
932
|
+
clearErrors,
|
|
933
|
+
descriptionComponent,
|
|
934
|
+
allowClear,
|
|
935
|
+
showBadge,
|
|
936
|
+
Icon,
|
|
937
|
+
transform
|
|
938
|
+
}: DateRangeInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
939
|
+
//#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;
|
|
944
|
+
label?: string;
|
|
945
|
+
description?: string;
|
|
946
|
+
required?: boolean;
|
|
947
|
+
disabled?: boolean;
|
|
948
|
+
length?: 4 | 6 | 8;
|
|
949
|
+
separatorAfter?: number[];
|
|
950
|
+
pattern?: string;
|
|
951
|
+
autoSubmit?: boolean;
|
|
952
|
+
value?: string;
|
|
953
|
+
onChange?: (value: string) => void;
|
|
954
|
+
onComplete?: (value: string) => void;
|
|
955
|
+
className?: string;
|
|
956
|
+
slotClassName?: string;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* OTPInput - OTP/PIN code input with react-hook-form integration
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* ```tsx
|
|
963
|
+
* <OTPInput
|
|
964
|
+
* control={form.control}
|
|
965
|
+
* name="otp"
|
|
966
|
+
* label="Verification Code"
|
|
967
|
+
* length={6}
|
|
968
|
+
* autoSubmit
|
|
969
|
+
* onComplete={(code) => verify(code)}
|
|
970
|
+
* />
|
|
971
|
+
* ```
|
|
972
|
+
*/
|
|
973
|
+
declare function OTPInput<T extends FieldValues = FieldValues>({
|
|
974
|
+
control,
|
|
975
|
+
name,
|
|
976
|
+
label,
|
|
977
|
+
description,
|
|
978
|
+
required,
|
|
979
|
+
disabled,
|
|
980
|
+
length,
|
|
981
|
+
separatorAfter,
|
|
982
|
+
pattern,
|
|
983
|
+
autoSubmit,
|
|
984
|
+
value: propValue,
|
|
985
|
+
onChange: propOnChange,
|
|
986
|
+
onComplete,
|
|
987
|
+
className,
|
|
988
|
+
slotClassName
|
|
989
|
+
}: OTPInputProps<T>): react_jsx_runtime0.JSX.Element;
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region src/components/form/multi-select.d.ts
|
|
992
|
+
interface MultiSelectOption {
|
|
993
|
+
value: string;
|
|
994
|
+
label: string;
|
|
995
|
+
disabled?: boolean;
|
|
996
|
+
}
|
|
997
|
+
interface MultiSelectOptionGroup {
|
|
998
|
+
label: string;
|
|
999
|
+
items: MultiSelectOption[];
|
|
1000
|
+
}
|
|
1001
|
+
interface MultiSelectProps<T extends FieldValues = FieldValues> {
|
|
1002
|
+
control?: Control<T>;
|
|
1003
|
+
name: FieldPath<T> | string;
|
|
1004
|
+
label?: string;
|
|
1005
|
+
placeholder?: string;
|
|
1006
|
+
emptyText?: string;
|
|
1007
|
+
description?: string;
|
|
1008
|
+
helperText?: string;
|
|
1009
|
+
required?: boolean;
|
|
1010
|
+
disabled?: boolean;
|
|
1011
|
+
items?: MultiSelectOption[];
|
|
1012
|
+
groups?: MultiSelectOptionGroup[];
|
|
1013
|
+
maxSelections?: number;
|
|
1014
|
+
clearable?: boolean;
|
|
1015
|
+
value?: string[];
|
|
1016
|
+
onChange?: (v: string[]) => void;
|
|
1017
|
+
onValueChange?: (v: string[]) => void;
|
|
1018
|
+
className?: string;
|
|
1019
|
+
labelClassName?: string;
|
|
1020
|
+
inputClassName?: string;
|
|
1021
|
+
renderOption?: (option: MultiSelectOption) => ReactNode;
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* MultiSelect - Chips-based multi-select with Base UI Combobox
|
|
1025
|
+
*
|
|
1026
|
+
* @example
|
|
1027
|
+
* ```tsx
|
|
1028
|
+
* <MultiSelect
|
|
1029
|
+
* control={form.control}
|
|
1030
|
+
* name="tags"
|
|
1031
|
+
* label="Tags"
|
|
1032
|
+
* items={[
|
|
1033
|
+
* { value: "react", label: "React" },
|
|
1034
|
+
* { value: "vue", label: "Vue" },
|
|
1035
|
+
* ]}
|
|
1036
|
+
* maxSelections={5}
|
|
1037
|
+
* />
|
|
1038
|
+
* ```
|
|
1039
|
+
*/
|
|
1040
|
+
declare function MultiSelect<T extends FieldValues = FieldValues>({
|
|
1041
|
+
control,
|
|
1042
|
+
name,
|
|
1043
|
+
label,
|
|
1044
|
+
placeholder,
|
|
1045
|
+
emptyText,
|
|
1046
|
+
description,
|
|
1047
|
+
helperText,
|
|
1048
|
+
required,
|
|
1049
|
+
disabled,
|
|
1050
|
+
items,
|
|
1051
|
+
groups,
|
|
1052
|
+
maxSelections,
|
|
1053
|
+
clearable,
|
|
1054
|
+
className,
|
|
1055
|
+
labelClassName,
|
|
1056
|
+
inputClassName,
|
|
1057
|
+
renderOption,
|
|
1058
|
+
value: propValue,
|
|
1059
|
+
onChange: propOnChange,
|
|
1060
|
+
onValueChange
|
|
1061
|
+
}: MultiSelectProps<T>): react_jsx_runtime0.JSX.Element;
|
|
1062
|
+
//#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;
|
|
1072
|
+
label?: string;
|
|
1073
|
+
placeholder?: string;
|
|
1074
|
+
emptyText?: string;
|
|
1075
|
+
description?: string;
|
|
1076
|
+
helperText?: string;
|
|
1077
|
+
required?: boolean;
|
|
1078
|
+
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;
|
|
1089
|
+
className?: string;
|
|
1090
|
+
labelClassName?: string;
|
|
1091
|
+
inputClassName?: string;
|
|
1092
|
+
renderOption?: (option: AsyncComboboxOption) => ReactNode;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* AsyncCombobox - Searchable select with debounced async search
|
|
1096
|
+
*
|
|
1097
|
+
* @example
|
|
1098
|
+
* ```tsx
|
|
1099
|
+
* <AsyncCombobox
|
|
1100
|
+
* 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..."
|
|
1108
|
+
* />
|
|
1109
|
+
* ```
|
|
1110
|
+
*/
|
|
1111
|
+
declare function AsyncCombobox<T extends FieldValues = FieldValues>({
|
|
1112
|
+
control,
|
|
1113
|
+
name,
|
|
1114
|
+
label,
|
|
1115
|
+
placeholder,
|
|
1116
|
+
emptyText,
|
|
1117
|
+
description,
|
|
1118
|
+
helperText,
|
|
1119
|
+
required,
|
|
1120
|
+
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,
|
|
1133
|
+
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,
|
|
1203
|
+
className,
|
|
1204
|
+
labelClassName,
|
|
1205
|
+
inputClassName,
|
|
1206
|
+
renderOption,
|
|
1207
|
+
value: propValue,
|
|
1208
|
+
onChange: propOnChange,
|
|
1209
|
+
onValueChange
|
|
1210
|
+
}: AsyncMultiSelectProps<T>): react_jsx_runtime0.JSX.Element;
|
|
1211
|
+
//#endregion
|
|
1212
|
+
//#region src/components/form/file-upload-input.d.ts
|
|
1213
|
+
interface FileUploadInputProps<T extends FieldValues = FieldValues> {
|
|
1214
|
+
control?: Control<T>;
|
|
1215
|
+
name: FieldPath<T> | string;
|
|
1216
|
+
label?: string;
|
|
1217
|
+
description?: string;
|
|
1218
|
+
required?: boolean;
|
|
1219
|
+
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;
|
|
1236
|
+
className?: string;
|
|
1237
|
+
dropzoneClassName?: string;
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* FileUploadInput - Drag-and-drop file input with validation and preview
|
|
1241
|
+
*
|
|
1242
|
+
* @example
|
|
1243
|
+
* ```tsx
|
|
1244
|
+
* <FileUploadInput
|
|
1245
|
+
* 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}
|
|
1252
|
+
* />
|
|
1253
|
+
* ```
|
|
1254
|
+
*/
|
|
1255
|
+
declare function FileUploadInput<T extends FieldValues = FieldValues>({
|
|
1256
|
+
control,
|
|
1257
|
+
name,
|
|
1258
|
+
label,
|
|
1259
|
+
description,
|
|
1260
|
+
required,
|
|
1261
|
+
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,
|
|
1277
|
+
value: propValue,
|
|
1278
|
+
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,
|
|
1332
|
+
className,
|
|
1333
|
+
labelClassName,
|
|
1334
|
+
value: propValue,
|
|
1335
|
+
onChange: propOnChange,
|
|
1336
|
+
onValueChange
|
|
1337
|
+
}: DateTimeInputProps<T>): react_jsx_runtime0.JSX.Element;
|
|
1338
|
+
//#endregion
|
|
1339
|
+
//#region src/components/form/password-input.d.ts
|
|
1340
|
+
interface PasswordInputProps<TFieldValues extends FieldValues = FieldValues> extends Omit<FormInputProps<TFieldValues>, "type" | "iconRight" | "addonRight"> {
|
|
1341
|
+
/** Show eye toggle button (default: true) */
|
|
1342
|
+
showToggle?: boolean;
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* PasswordInput - Password field with visibility toggle
|
|
1346
|
+
*
|
|
1347
|
+
* Thin wrapper around FormInput. Inherits all FormInput features
|
|
1348
|
+
* (RHF integration, InputGroup, validation, transforms).
|
|
1349
|
+
*
|
|
1350
|
+
* @example
|
|
1351
|
+
* ```tsx
|
|
1352
|
+
* <PasswordInput
|
|
1353
|
+
* control={form.control}
|
|
1354
|
+
* name="password"
|
|
1355
|
+
* label="Password"
|
|
1356
|
+
* placeholder="Enter password"
|
|
1357
|
+
* required
|
|
1358
|
+
* />
|
|
1359
|
+
* ```
|
|
1360
|
+
*/
|
|
1361
|
+
declare function PasswordInput<TFieldValues extends FieldValues = FieldValues>({
|
|
1362
|
+
showToggle,
|
|
1363
|
+
autoComplete,
|
|
1364
|
+
...props
|
|
1365
|
+
}: PasswordInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
1366
|
+
//#endregion
|
|
1367
|
+
//#region src/components/form/number-input.d.ts
|
|
1368
|
+
interface NumberInputProps<TFieldValues extends FieldValues = FieldValues> {
|
|
1369
|
+
control?: Control<TFieldValues>;
|
|
1370
|
+
name: FieldPath<TFieldValues> | string;
|
|
1371
|
+
label?: string;
|
|
1372
|
+
placeholder?: string;
|
|
1373
|
+
description?: string;
|
|
1374
|
+
helperText?: string;
|
|
1375
|
+
required?: boolean;
|
|
1376
|
+
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;
|
|
1384
|
+
className?: string;
|
|
1385
|
+
labelClassName?: string;
|
|
1386
|
+
inputClassName?: string;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
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
|
|
1396
|
+
*
|
|
1397
|
+
* @example
|
|
1398
|
+
* ```tsx
|
|
1399
|
+
* <NumberInput
|
|
1400
|
+
* control={form.control}
|
|
1401
|
+
* name="quantity"
|
|
1402
|
+
* label="Quantity"
|
|
1403
|
+
* min={1}
|
|
1404
|
+
* max={100}
|
|
1405
|
+
* step={1}
|
|
1406
|
+
* />
|
|
1407
|
+
* ```
|
|
1408
|
+
*/
|
|
1409
|
+
declare function NumberInput<TFieldValues extends FieldValues = FieldValues>({
|
|
1410
|
+
control,
|
|
1411
|
+
name,
|
|
1412
|
+
label,
|
|
1413
|
+
placeholder,
|
|
1414
|
+
description,
|
|
1415
|
+
helperText,
|
|
1416
|
+
required,
|
|
1417
|
+
disabled,
|
|
1418
|
+
min,
|
|
1419
|
+
max,
|
|
1420
|
+
step,
|
|
1421
|
+
showStepper,
|
|
1422
|
+
value: propValue,
|
|
1423
|
+
onChange: propOnChange,
|
|
1424
|
+
onValueChange,
|
|
1425
|
+
className,
|
|
1426
|
+
labelClassName,
|
|
1427
|
+
inputClassName
|
|
1428
|
+
}: NumberInputProps<TFieldValues>): react_jsx_runtime0.JSX.Element;
|
|
1429
|
+
//#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;
|
|
1442
|
+
}
|
|
1443
|
+
interface FormGridProps {
|
|
1444
|
+
children: ReactNode;
|
|
1445
|
+
cols?: 1 | 2 | 3 | 4;
|
|
1446
|
+
className?: string;
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* FormSection - Organizes form fields into logical groups with variants
|
|
1450
|
+
*
|
|
1451
|
+
* @example
|
|
1452
|
+
* ```tsx
|
|
1453
|
+
* <FormSection title="Personal Info" variant="card" collapsible>
|
|
1454
|
+
* <FormInput name="name" label="Name" />
|
|
1455
|
+
* <FormInput name="email" label="Email" />
|
|
1456
|
+
* </FormSection>
|
|
1457
|
+
* ```
|
|
1458
|
+
*/
|
|
1459
|
+
declare function FormSection({
|
|
1460
|
+
title,
|
|
1461
|
+
description,
|
|
1462
|
+
children,
|
|
1463
|
+
variant,
|
|
1464
|
+
collapsible,
|
|
1465
|
+
defaultOpen,
|
|
1466
|
+
icon,
|
|
1467
|
+
className
|
|
1468
|
+
}: FormSectionProps): react_jsx_runtime0.JSX.Element;
|
|
1469
|
+
/**
|
|
1470
|
+
* FormGrid - Responsive grid layout for form fields
|
|
1471
|
+
*
|
|
1472
|
+
* @example
|
|
1473
|
+
* ```tsx
|
|
1474
|
+
* <FormGrid cols={2}>
|
|
1475
|
+
* <FormInput name="firstName" label="First Name" />
|
|
1476
|
+
* <FormInput name="lastName" label="Last Name" />
|
|
1477
|
+
* </FormGrid>
|
|
1478
|
+
* ```
|
|
1479
|
+
*/
|
|
1480
|
+
declare function FormGrid({
|
|
1481
|
+
children,
|
|
1482
|
+
cols,
|
|
1483
|
+
className
|
|
1484
|
+
}: FormGridProps): react_jsx_runtime0.JSX.Element;
|
|
1485
|
+
//#endregion
|
|
1486
|
+
//#region src/components/form/form-field-array.d.ts
|
|
1487
|
+
interface FormFieldArrayProps {
|
|
1488
|
+
title?: string;
|
|
1489
|
+
description?: string;
|
|
1490
|
+
children: ReactNode;
|
|
1491
|
+
onAdd?: () => void;
|
|
1492
|
+
addLabel?: string;
|
|
1493
|
+
emptyMessage?: string;
|
|
1494
|
+
itemCount?: number;
|
|
1495
|
+
maxItems?: number;
|
|
1496
|
+
className?: string;
|
|
1497
|
+
}
|
|
1498
|
+
interface FormFieldArrayItemProps {
|
|
1499
|
+
children: ReactNode;
|
|
1500
|
+
onRemove?: () => void;
|
|
1501
|
+
index?: number;
|
|
1502
|
+
title?: string;
|
|
1503
|
+
className?: string;
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* FormFieldArray - Container for dynamic field arrays with add/remove
|
|
1507
|
+
*
|
|
1508
|
+
* @example
|
|
1509
|
+
* ```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>
|
|
1526
|
+
* ```
|
|
1527
|
+
*/
|
|
1528
|
+
declare function FormFieldArray({
|
|
1529
|
+
title,
|
|
1530
|
+
description,
|
|
1531
|
+
children,
|
|
1532
|
+
onAdd,
|
|
1533
|
+
addLabel,
|
|
1534
|
+
emptyMessage,
|
|
1535
|
+
itemCount,
|
|
1536
|
+
maxItems,
|
|
1537
|
+
className
|
|
1538
|
+
}: FormFieldArrayProps): react_jsx_runtime0.JSX.Element;
|
|
1539
|
+
/**
|
|
1540
|
+
* FormFieldArrayItem - Individual item within a FormFieldArray
|
|
1541
|
+
*/
|
|
1542
|
+
declare function FormFieldArrayItem({
|
|
1543
|
+
children,
|
|
1544
|
+
onRemove,
|
|
1545
|
+
title,
|
|
1546
|
+
className
|
|
1547
|
+
}: FormFieldArrayItemProps): react_jsx_runtime0.JSX.Element;
|
|
1548
|
+
//#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 };
|