@react-solutions/inputs 1.0.1 → 1.1.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.
- package/dist/index.d.mts +3122 -60
- package/dist/index.d.ts +3122 -60
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToggleButtonGroupProps, ToggleButtonProps, FormControl, FormLabelProps, SliderProps, FormControlProps, SwitchProps, FormControlLabelProps, RadioGroupProps, RadioProps, SxProps, Theme, CheckboxProps, Box, Stack, ButtonProps, TextFieldProps, AutocompleteProps, AutocompleteChangeReason, AutocompleteInputChangeReason, AutocompleteCloseReason, SelectProps, MenuItemProps, InputLabel, SelectChangeEvent, IconButtonProps, TextFieldPropsSizeOverrides } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { SyntheticEvent, FocusEvent, ChangeEvent } from 'react';
|
|
4
4
|
import { DateCalendarProps, TimeClockProps, TimeView, TimePickerProps, DatePickerProps } from '@mui/x-date-pickers';
|
|
@@ -7,6 +7,128 @@ import { FilterOptionsState } from '@mui/material/useAutocomplete';
|
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import { FieldValues } from 'react-hook-form';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Base option type for Toggle Button Group
|
|
12
|
+
*/
|
|
13
|
+
type ToggleOption = {
|
|
14
|
+
name: string;
|
|
15
|
+
value: string | number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
color?: ToggleButtonProps["color"];
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Error object type
|
|
22
|
+
*/
|
|
23
|
+
type FieldError$k = {
|
|
24
|
+
message?: string;
|
|
25
|
+
} | null;
|
|
26
|
+
/**
|
|
27
|
+
* Extended Toggle Button Group Props
|
|
28
|
+
* Extends MUI ToggleButtonGroupProps with custom form field props
|
|
29
|
+
*/
|
|
30
|
+
interface IToggleButtonFieldProps extends Omit<ToggleButtonGroupProps, "value" | "onChange" | "name" | "children"> {
|
|
31
|
+
/** Field name for form identification */
|
|
32
|
+
name?: string;
|
|
33
|
+
/** Label text for the group */
|
|
34
|
+
label?: React__default.ReactNode;
|
|
35
|
+
/** Title text to display when hovering over label */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Current selected value(s) */
|
|
38
|
+
value: any;
|
|
39
|
+
/** Options array to display as toggle buttons */
|
|
40
|
+
options: ToggleOption[];
|
|
41
|
+
/** Error object with optional message */
|
|
42
|
+
error?: FieldError$k;
|
|
43
|
+
/** Helper text to display below the group */
|
|
44
|
+
helperText?: string;
|
|
45
|
+
/** Whether the field is disabled */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** Full width of the field */
|
|
48
|
+
fullWidth?: boolean;
|
|
49
|
+
/** Required field indicator */
|
|
50
|
+
required?: boolean;
|
|
51
|
+
/** Toggle size */
|
|
52
|
+
size?: ToggleButtonGroupProps["size"];
|
|
53
|
+
/** Toggle orientation */
|
|
54
|
+
orientation?: ToggleButtonGroupProps["orientation"];
|
|
55
|
+
/** Whether to allow multiple selection */
|
|
56
|
+
exclusive?: boolean;
|
|
57
|
+
/** Custom styles for individual ToggleButton components */
|
|
58
|
+
buttonStyles?: ToggleButtonProps["sx"];
|
|
59
|
+
/** Custom styles for FormControl */
|
|
60
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
61
|
+
/** Custom styles for FormLabel */
|
|
62
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
63
|
+
/** Custom styles for ToggleButtonGroup */
|
|
64
|
+
groupStyles?: ToggleButtonGroupProps["sx"];
|
|
65
|
+
/** Callback fired when the value changes */
|
|
66
|
+
onChange?: (value: any) => void;
|
|
67
|
+
/** Custom render function for toggle buttons */
|
|
68
|
+
renderButton?: (option: ToggleOption, index: number) => React__default.ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Toggle Button Field Component
|
|
72
|
+
*
|
|
73
|
+
* A customizable toggle button group field built on top of Material UI ToggleButtonGroup and FormControl.
|
|
74
|
+
*
|
|
75
|
+
* @component
|
|
76
|
+
* @version 2.x.x
|
|
77
|
+
* @author call-max
|
|
78
|
+
*
|
|
79
|
+
* @description This component provides a group of flexible toggle buttons for single or multiple selections with support for:
|
|
80
|
+
* error handling, helper text, custom colors per button, styling overrides, and standard toggle behaviors.
|
|
81
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
84
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the group
|
|
85
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as title
|
|
86
|
+
* @param {any} value - {any} Current selected value(s) (controlled component)
|
|
87
|
+
* @param {ToggleOption[]} options - {ToggleOption[]} Array of toggle options
|
|
88
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
89
|
+
* @param {string} [helperText] - {string} Helper text to display below the group
|
|
90
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
91
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
92
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
93
|
+
* @param {'small'|'medium'|'large'} [size='medium'] - {'small'|'medium'|'large'} Toggle size
|
|
94
|
+
* @param {'horizontal'|'vertical'} [orientation='horizontal'] - {'horizontal'|'vertical'} Toggle orientation
|
|
95
|
+
* @param {boolean} [exclusive=true] - {boolean} Whether to allow only single selection
|
|
96
|
+
* @param {ToggleButtonProps['sx']} [buttonStyles] - {ToggleButtonProps['sx']} Custom styles for individual ToggleButton components
|
|
97
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
98
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
99
|
+
* @param {ToggleButtonGroupProps['sx']} [groupStyles] - {ToggleButtonGroupProps['sx']} Custom styles for ToggleButtonGroup
|
|
100
|
+
* @param {(value: any) => void} [onChange] - {(value: any) => void} Callback fired when value changes
|
|
101
|
+
* @param {(option: ToggleOption, index: number) => React.ReactNode} [renderButton] - {(option: ToggleOption, index: number) => React.ReactNode} Custom render function for toggle buttons
|
|
102
|
+
*
|
|
103
|
+
* @returns {JSX.Element} The Toggle Button Field component
|
|
104
|
+
*
|
|
105
|
+
* @usage
|
|
106
|
+
* ```tsx
|
|
107
|
+
* import ToggleButtonField from "@react-solutions/inputs";
|
|
108
|
+
* import { useState } from "react";
|
|
109
|
+
*
|
|
110
|
+
* function MyForm() {
|
|
111
|
+
* const [status, setStatus] = useState("ACTIVE");
|
|
112
|
+
*
|
|
113
|
+
* return (
|
|
114
|
+
* <ToggleButtonField
|
|
115
|
+
* name="status"
|
|
116
|
+
* label="Status"
|
|
117
|
+
* value={status}
|
|
118
|
+
* options={[
|
|
119
|
+
* { name: "Active", value: "ACTIVE", color: "success" },
|
|
120
|
+
* { name: "Inactive", value: "INACTIVE", color: "error" }
|
|
121
|
+
* ]}
|
|
122
|
+
* exclusive
|
|
123
|
+
* onChange={(val) => setStatus(val)}
|
|
124
|
+
* />
|
|
125
|
+
* );
|
|
126
|
+
* }
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
declare const ToggleButtonField: React__default.ForwardRefExoticComponent<Omit<IToggleButtonFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
131
|
+
|
|
10
132
|
/**
|
|
11
133
|
* Error object type
|
|
12
134
|
*/
|
|
@@ -75,6 +197,71 @@ interface ISliderFieldProps extends Omit<SliderProps, "value" | "onChange" | "on
|
|
|
75
197
|
/** FormLabel props */
|
|
76
198
|
formLabelProps?: Omit<FormLabelProps, "children">;
|
|
77
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Slider Field Component
|
|
202
|
+
*
|
|
203
|
+
* A customizable slider field built on top of Material UI Slider and FormControl.
|
|
204
|
+
*
|
|
205
|
+
* @component
|
|
206
|
+
* @version 2.x.x
|
|
207
|
+
* @author call-max
|
|
208
|
+
*
|
|
209
|
+
* @description This component provides a flexible slider for range selections with support for: error handling, helper text, custom marks,
|
|
210
|
+
* styling overrides, orientation (horizontal/vertical), and standard slider behaviors. It integrates seamlessly with form
|
|
211
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
212
|
+
*
|
|
213
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
214
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the slider
|
|
215
|
+
* @param {number | number[]} value - {number | number[]} Current slider value(s) (controlled component)
|
|
216
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
217
|
+
* @param {string} [helperText] - {string} Helper text to display below slider
|
|
218
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
219
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
220
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
221
|
+
* @param {'horizontal'|'vertical'} [orientation='horizontal'] - {'horizontal'|'vertical'} Slider orientation
|
|
222
|
+
* @param {number} [min=0] - {number} Minimum value
|
|
223
|
+
* @param {number} [max=100] - {number} Maximum value
|
|
224
|
+
* @param {number|null} [step=1] - {number|null} Step value
|
|
225
|
+
* @param {'on'|'auto'|'off'} [valueLabelDisplay='auto'] - {'on'|'auto'|'off'} Whether to show value label
|
|
226
|
+
* @param {React.ReactNode | ((value: number, index: number) => React.ReactNode)} [valueLabelFormat] - {React.ReactNode} Custom format for value label
|
|
227
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Slider color
|
|
228
|
+
* @param {'small'|'medium'} [size] - {'small'|'medium'} Slider size
|
|
229
|
+
* @param {boolean | SliderProps['marks']} [marks] - {boolean | SliderProps['marks']} Marks on the slider
|
|
230
|
+
* @param {'normal'|'inverted'|false} [track='normal'] - {'normal'|'inverted'|false} Track display mode
|
|
231
|
+
* @param {SliderProps['sx']} [sliderStyles] - {SliderProps['sx']} Custom styles for the Slider component
|
|
232
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
233
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
234
|
+
* @param {(value: number | number[]) => void} [onChange] - {(value: number | number[]) => void} Callback fired when value changes
|
|
235
|
+
* @param {(value: number | number[]) => void} [onChangeCommitted] - {(value: number | number[]) => void} Callback fired when value change is committed
|
|
236
|
+
* @param {(event: SyntheticEvent) => void} [onFocus] - {(event: SyntheticEvent) => void} Callback when focused
|
|
237
|
+
* @param {(event: SyntheticEvent) => void} [onBlur] - {(event: SyntheticEvent) => void} Callback when blurred
|
|
238
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
239
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
240
|
+
*
|
|
241
|
+
* @returns {JSX.Element} The Slider Field component
|
|
242
|
+
*
|
|
243
|
+
* @usage
|
|
244
|
+
* ```tsx
|
|
245
|
+
* import SliderField from "@react-solutions/inputs";
|
|
246
|
+
* import { useState } from "react";
|
|
247
|
+
*
|
|
248
|
+
* function MyForm() {
|
|
249
|
+
* const [val, setVal] = useState(30);
|
|
250
|
+
*
|
|
251
|
+
* return (
|
|
252
|
+
* <SliderField
|
|
253
|
+
* name="mySlider"
|
|
254
|
+
* label="Volume"
|
|
255
|
+
* value={val}
|
|
256
|
+
* onChange={(newVal) => setVal(newVal as number)}
|
|
257
|
+
* min={0}
|
|
258
|
+
* max={100}
|
|
259
|
+
* />
|
|
260
|
+
* );
|
|
261
|
+
* }
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
78
265
|
declare const SliderField: React__default.ForwardRefExoticComponent<Omit<ISliderFieldProps, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
|
79
266
|
|
|
80
267
|
/**
|
|
@@ -137,6 +324,65 @@ interface ISwitchFieldProps extends Omit<SwitchProps, "checked" | "onChange" | "
|
|
|
137
324
|
/** FormControlLabel props */
|
|
138
325
|
formControlLabelProps?: Omit<FormControlLabelProps, "control" | "label" | "checked">;
|
|
139
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Switch Field Component
|
|
329
|
+
*
|
|
330
|
+
* A customizable switch field built on top of Material UI Switch and FormControl.
|
|
331
|
+
*
|
|
332
|
+
* @component
|
|
333
|
+
* @version 2.x.x
|
|
334
|
+
* @author call-max
|
|
335
|
+
*
|
|
336
|
+
* @description This component provides a flexible switch for binary choices with support for: error handling, helper text, custom icons,
|
|
337
|
+
* styling overrides, label placement, and standard switch behaviors. It integrates seamlessly with form
|
|
338
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
339
|
+
*
|
|
340
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
341
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the switch
|
|
342
|
+
* @param {boolean} value - {boolean} Current checked state (controlled component)
|
|
343
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
344
|
+
* @param {string} [helperText] - {string} Helper text to display below switch
|
|
345
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
346
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Switch color
|
|
347
|
+
* @param {'small'|'medium'} [size] - {'small'|'medium'} Switch size
|
|
348
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
349
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
350
|
+
* @param {'start'|'end'|'top'|'bottom'} [labelPlacement='end'] - {'start'|'end'|'top'|'bottom'} Label placement relative to switch
|
|
351
|
+
* @param {'start'|'end'|false} [edge] - {'start'|'end'|false} Edge placement for the switch
|
|
352
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
353
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
354
|
+
* @param {SwitchProps['sx']} [switchStyles] - {SwitchProps['sx']} Custom styles for the Switch component
|
|
355
|
+
* @param {FormControlLabelProps['sx']} [labelStyles] - {FormControlLabelProps['sx']} Custom styles for FormControlLabel
|
|
356
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
357
|
+
* @param {(checked: boolean) => void} [onChange] - {(checked: boolean) => void} Callback fired when value changes
|
|
358
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {(event: React.MouseEvent<HTMLButtonElement>) => void} Callback fired when clicked
|
|
359
|
+
* @param {SwitchProps['onFocus']} [onFocus] - {SwitchProps['onFocus']} Callback when focused
|
|
360
|
+
* @param {SwitchProps['onBlur']} [onBlur] - {SwitchProps['onBlur']} Callback when blurred
|
|
361
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
362
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
363
|
+
*
|
|
364
|
+
* @returns {JSX.Element} The Switch Field component
|
|
365
|
+
*
|
|
366
|
+
* @usage
|
|
367
|
+
* ```tsx
|
|
368
|
+
* import SwitchField from "@react-solutions/inputs";
|
|
369
|
+
* import { useState } from "react";
|
|
370
|
+
*
|
|
371
|
+
* function MyForm() {
|
|
372
|
+
* const [isEnabled, setIsEnabled] = useState(false);
|
|
373
|
+
*
|
|
374
|
+
* return (
|
|
375
|
+
* <SwitchField
|
|
376
|
+
* name="mySwitch"
|
|
377
|
+
* label="Enable notifications"
|
|
378
|
+
* value={isEnabled}
|
|
379
|
+
* onChange={(checked) => setIsEnabled(checked)}
|
|
380
|
+
* />
|
|
381
|
+
* );
|
|
382
|
+
* }
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
*/
|
|
140
386
|
declare const SwitchField: React__default.ForwardRefExoticComponent<Omit<ISwitchFieldProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
141
387
|
|
|
142
388
|
/**
|
|
@@ -226,6 +472,76 @@ interface IRadioButtonGroupFieldProps extends Omit<RadioGroupProps, "value" | "o
|
|
|
226
472
|
/** Custom styles for RadioGroup */
|
|
227
473
|
sxProps?: SxProps<Theme>;
|
|
228
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* Radio Button Field Group Component
|
|
477
|
+
*
|
|
478
|
+
* A customizable group of radio buttons built on top of Material UI RadioGroup and FormControl.
|
|
479
|
+
*
|
|
480
|
+
* @component
|
|
481
|
+
* @version 2.x.x
|
|
482
|
+
* @author call-max
|
|
483
|
+
*
|
|
484
|
+
* @description This component provides a group of flexible radio buttons with support for: error handling, helper text, custom icons,
|
|
485
|
+
* styling overrides, label placement, row/column layout, and standard radio behaviors. It integrates seamlessly with form
|
|
486
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
487
|
+
*
|
|
488
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
489
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the radio group
|
|
490
|
+
* @param {string | number | null | undefined} value - {string | number | null | undefined} Current selected value (controlled component)
|
|
491
|
+
* @param {RadioOption[]} options - {RadioOption[]} Array of radio options
|
|
492
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
493
|
+
* @param {string} [helperText] - {string} Helper text to display below radio group
|
|
494
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
495
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Radio color
|
|
496
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Radio size
|
|
497
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
498
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
499
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to each radio button
|
|
500
|
+
* @param {boolean} [row=false] - {boolean} Row layout (horizontal) or column layout (vertical)
|
|
501
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
502
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
503
|
+
* @param {RadioProps["sx"]} [radioStyles] - {RadioProps["sx"]} Custom styles for individual Radio components
|
|
504
|
+
* @param {FormControlLabelProps["sx"]} [labelStyles] - {FormControlLabelProps["sx"]} Custom styles for FormControlLabel components
|
|
505
|
+
* @param {FormControlProps["sx"]} [formControlStyles] - {FormControlProps["sx"]} Custom styles for FormControl
|
|
506
|
+
* @param {FormLabelProps["sx"]} [formLabelStyles] - {FormLabelProps["sx"]} Custom styles for FormLabel
|
|
507
|
+
* @param {RadioGroupProps["sx"]} [radioGroupStyles] - {RadioGroupProps["sx"]} Custom styles for RadioGroup
|
|
508
|
+
* @param {(value: string | number) => void} [onChange] - {(value: string | number) => void} Callback fired when value changes
|
|
509
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {(event: React.MouseEvent<HTMLButtonElement>) => void} Callback fired when a radio button is clicked
|
|
510
|
+
* @param {RadioProps["onFocus"]} [onFocus] - {RadioProps["onFocus"]} Callback when focused
|
|
511
|
+
* @param {RadioProps["onBlur"]} [onBlur] - {RadioProps["onBlur"]} Callback when blurred
|
|
512
|
+
* @param {(option: RadioOption, index: number) => React.ReactNode} [renderRadio] - {(option: RadioOption, index: number) => React.ReactNode} Custom render function for radio buttons
|
|
513
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
514
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
515
|
+
* @param {SxProps<Theme>} [sxProps] - {SxProps<Theme>} Custom styles for RadioGroup container
|
|
516
|
+
*
|
|
517
|
+
* @returns {JSX.Element} The Radio Button Field Group component
|
|
518
|
+
*
|
|
519
|
+
* @usage
|
|
520
|
+
* ```tsx
|
|
521
|
+
* import RadioButtonFieldGroup from "@react-solutions/inputs";
|
|
522
|
+
* import { useState } from "react";
|
|
523
|
+
*
|
|
524
|
+
* function MyForm() {
|
|
525
|
+
* const [value, setValue] = useState("opt1");
|
|
526
|
+
* const options = [
|
|
527
|
+
* { name: "Option 1", value: "opt1" },
|
|
528
|
+
* { name: "Option 2", value: "opt2" }
|
|
529
|
+
* ];
|
|
530
|
+
*
|
|
531
|
+
* return (
|
|
532
|
+
* <RadioButtonFieldGroup
|
|
533
|
+
* name="myRadioGroup"
|
|
534
|
+
* label="Select an option"
|
|
535
|
+
* value={value}
|
|
536
|
+
* options={options}
|
|
537
|
+
* onChange={(val) => setValue(val)}
|
|
538
|
+
* row
|
|
539
|
+
* />
|
|
540
|
+
* );
|
|
541
|
+
* }
|
|
542
|
+
* ```
|
|
543
|
+
*
|
|
544
|
+
*/
|
|
229
545
|
declare const RadioButtonFieldGroup: React__default.ForwardRefExoticComponent<Omit<IRadioButtonGroupFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
230
546
|
|
|
231
547
|
/**
|
|
@@ -286,6 +602,64 @@ interface IRadioButtonFieldProps extends Omit<RadioProps, "checked" | "onChange"
|
|
|
286
602
|
/** FormControlLabel props */
|
|
287
603
|
formControlLabelProps?: Omit<FormControlLabelProps, "control" | "label" | "value">;
|
|
288
604
|
}
|
|
605
|
+
/**
|
|
606
|
+
* Radio Button Field Component
|
|
607
|
+
*
|
|
608
|
+
* A customizable radio button field built on top of Material UI Radio and FormControl.
|
|
609
|
+
*
|
|
610
|
+
* @component
|
|
611
|
+
* @version 2.x.x
|
|
612
|
+
* @author call-max
|
|
613
|
+
*
|
|
614
|
+
* @description This component provides a flexible radio button with support for: error handling, helper text, custom icons,
|
|
615
|
+
* styling overrides, label placement, and standard radio behaviors. It integrates seamlessly with form
|
|
616
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
617
|
+
*
|
|
618
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
619
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the radio button
|
|
620
|
+
* @param {boolean} value - {boolean} Current checked state (controlled component)
|
|
621
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
622
|
+
* @param {string} [helperText] - {string} Helper text to display below radio button
|
|
623
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
624
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Radio color
|
|
625
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Radio size
|
|
626
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
627
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
628
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to radio button
|
|
629
|
+
* @param {(checked: boolean) => void} [onChange] - {(checked: boolean) => void} Callback fired when value changes
|
|
630
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {(event: React.MouseEvent<HTMLButtonElement>) => void} Callback fired when clicked
|
|
631
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onFocus] - {React.FocusEventHandler<HTMLButtonElement>} Callback when focused
|
|
632
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onBlur] - {React.FocusEventHandler<HTMLButtonElement>} Callback when blurred
|
|
633
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
634
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
635
|
+
* @param {React.CSSProperties} [radioStyles] - {React.CSSProperties} Custom styles for Radio component
|
|
636
|
+
* @param {React.CSSProperties} [labelStyles] - {React.CSSProperties} Custom styles for FormControlLabel
|
|
637
|
+
* @param {React.CSSProperties} [formControlStyles] - {React.CSSProperties} Custom styles for FormControl container
|
|
638
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
639
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
640
|
+
*
|
|
641
|
+
* @returns {JSX.Element} The Radio Button Field component
|
|
642
|
+
*
|
|
643
|
+
* @usage
|
|
644
|
+
* ```tsx
|
|
645
|
+
* import RadioButtonField from "@react-solutions/inputs";
|
|
646
|
+
* import { useState } from "react";
|
|
647
|
+
*
|
|
648
|
+
* function MyForm() {
|
|
649
|
+
* const [isSelected, setIsSelected] = useState(false);
|
|
650
|
+
*
|
|
651
|
+
* return (
|
|
652
|
+
* <RadioButtonField
|
|
653
|
+
* name="myRadio"
|
|
654
|
+
* label="Option 1"
|
|
655
|
+
* value={isSelected}
|
|
656
|
+
* onChange={(checked) => setIsSelected(checked)}
|
|
657
|
+
* />
|
|
658
|
+
* );
|
|
659
|
+
* }
|
|
660
|
+
* ```
|
|
661
|
+
*
|
|
662
|
+
*/
|
|
289
663
|
declare const RadioButtonField: React__default.ForwardRefExoticComponent<Omit<IRadioButtonFieldProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
290
664
|
|
|
291
665
|
/**
|
|
@@ -370,6 +744,75 @@ interface ICheckboxFieldGroupProps extends Omit<FormControlProps, "error" | "dis
|
|
|
370
744
|
/** xsProps */
|
|
371
745
|
sxProps?: SxProps<Theme>;
|
|
372
746
|
}
|
|
747
|
+
/**
|
|
748
|
+
* Checkbox Field Group Component
|
|
749
|
+
*
|
|
750
|
+
* A customizable group of checkboxes built on top of Material UI Checkbox and FormControl.
|
|
751
|
+
*
|
|
752
|
+
* @component
|
|
753
|
+
* @version 2.x.x
|
|
754
|
+
* @author call-max
|
|
755
|
+
*
|
|
756
|
+
* @description This component provides a group of flexible checkboxes with support for: error handling, helper text, custom icons,
|
|
757
|
+
* styling overrides, label placement, row/column layout, and standard checkbox behaviors. It integrates seamlessly with form
|
|
758
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
759
|
+
*
|
|
760
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
761
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the checkbox group
|
|
762
|
+
* @param {(string | number)[]} value - {(string | number)[]} Array of selected values (controlled component)
|
|
763
|
+
* @param {CheckboxOption[]} options - {CheckboxOption[]} Array of checkbox options
|
|
764
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
765
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
766
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
767
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
768
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
769
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Checkbox color
|
|
770
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Checkbox size
|
|
771
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to checkbox
|
|
772
|
+
* @param {boolean} [row=false] - {boolean} Whether to display checkboxes in a row
|
|
773
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
774
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
775
|
+
* @param {SxProps<Theme>} [checkboxStyles] - {SxProps<Theme>} Custom styles for individual checkboxes
|
|
776
|
+
* @param {SxProps<Theme>} [labelStyles] - {SxProps<Theme>} Custom styles for checkbox labels
|
|
777
|
+
* @param {SxProps<Theme>} [formControlStyles] - {SxProps<Theme>} Custom styles for FormControl container
|
|
778
|
+
* @param {SxProps<Theme>} [formLabelStyles] - {SxProps<Theme>} Custom styles for FormLabel
|
|
779
|
+
* @param {(value: (string | number)[]) => void} [onChange] - {(value: (string | number)[]) => void} Callback fired when value changes
|
|
780
|
+
* @param {Function} [onFocus] - {Function} Callback when focused
|
|
781
|
+
* @param {Function} [onBlur] - {Function} Callback when blurred
|
|
782
|
+
* @param {Function} [onClick] - {Function} Callback when clicked
|
|
783
|
+
* @param {Function} [renderCheckbox] - {Function} Custom render function for checkboxes
|
|
784
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
785
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
786
|
+
* @param {SxProps<Theme>} [sxProps] - {SxProps<Theme>} Custom styles for the Box container
|
|
787
|
+
*
|
|
788
|
+
* @returns {JSX.Element} The Checkbox Field Group component
|
|
789
|
+
*
|
|
790
|
+
* @usage
|
|
791
|
+
* ```tsx
|
|
792
|
+
* import CheckboxFieldGroup from "@react-solutions/inputs";
|
|
793
|
+
* import { useState } from "react";
|
|
794
|
+
*
|
|
795
|
+
* function MyForm() {
|
|
796
|
+
* const [values, setValues] = useState(["opt1"]);
|
|
797
|
+
* const options = [
|
|
798
|
+
* { value: "opt1", label: "Option 1" },
|
|
799
|
+
* { value: "opt2", label: "Option 2" }
|
|
800
|
+
* ];
|
|
801
|
+
*
|
|
802
|
+
* return (
|
|
803
|
+
* <CheckboxFieldGroup
|
|
804
|
+
* name="myCheckGroup"
|
|
805
|
+
* label="Select options"
|
|
806
|
+
* value={values}
|
|
807
|
+
* options={options}
|
|
808
|
+
* onChange={(newValues) => setValues(newValues)}
|
|
809
|
+
* row
|
|
810
|
+
* />
|
|
811
|
+
* );
|
|
812
|
+
* }
|
|
813
|
+
* ```
|
|
814
|
+
*
|
|
815
|
+
*/
|
|
373
816
|
declare const CheckboxFieldGroup: React__default.ForwardRefExoticComponent<Omit<ICheckboxFieldGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
374
817
|
|
|
375
818
|
/**
|
|
@@ -430,6 +873,68 @@ interface ICheckboxFieldProps extends Omit<CheckboxProps, "checked" | "onChange"
|
|
|
430
873
|
/** Custom slots for MUI v7 */
|
|
431
874
|
slots?: CheckboxProps["slots"];
|
|
432
875
|
}
|
|
876
|
+
/**
|
|
877
|
+
* Checkbox Field Component
|
|
878
|
+
*
|
|
879
|
+
* A customizable checkbox field built on top of Material UI Checkbox and FormControl.
|
|
880
|
+
*
|
|
881
|
+
* @component
|
|
882
|
+
* @version 2.x.x
|
|
883
|
+
* @author call-max
|
|
884
|
+
*
|
|
885
|
+
* @description This component provides a flexible checkbox with support for: error handling, helper text, custom icons,
|
|
886
|
+
* styling overrides, label placement, and standard checkbox behaviors. It integrates seamlessly with form
|
|
887
|
+
* management libraries like React Hook Form through the use of `forwardRef`.
|
|
888
|
+
*
|
|
889
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
890
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the checkbox
|
|
891
|
+
* @param {boolean} value - {boolean} Current checked state (controlled component)
|
|
892
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
893
|
+
* @param {string} [helperText] - {string} Helper text to display below checkbox
|
|
894
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
895
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Checkbox color
|
|
896
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Checkbox size (maps to 'medium' for 'large')
|
|
897
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
898
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
899
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to checkbox
|
|
900
|
+
* @param {(checked: boolean) => void} [onChange] - {(checked: boolean) => void} Callback fired when value changes
|
|
901
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {(event: React.MouseEvent<HTMLButtonElement>) => void} Callback fired when clicked
|
|
902
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onFocus] - {React.FocusEventHandler<HTMLButtonElement>} Callback when focused
|
|
903
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onBlur] - {React.FocusEventHandler<HTMLButtonElement>} Callback when blurred
|
|
904
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
905
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
906
|
+
* @param {React.CSSProperties} [checkboxStyles] - {React.CSSProperties} Custom styles for Checkbox component
|
|
907
|
+
* @param {React.CSSProperties} [labelStyles] - {React.CSSProperties} Custom styles for FormControlLabel
|
|
908
|
+
* @param {React.CSSProperties} [formControlStyles] - {React.CSSProperties} Custom styles for FormControl container
|
|
909
|
+
* @param {boolean} [indeterminate=false] - {boolean} Indeterminate state
|
|
910
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
911
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
912
|
+
*
|
|
913
|
+
* @returns {JSX.Element} The Checkbox Field component
|
|
914
|
+
*
|
|
915
|
+
* @usage
|
|
916
|
+
* ```tsx
|
|
917
|
+
* import CheckboxField from "@react-solutions/inputs";
|
|
918
|
+
* import { useState } from "react";
|
|
919
|
+
*
|
|
920
|
+
* function MyForm() {
|
|
921
|
+
* const [isChecked, setIsChecked] = useState(false);
|
|
922
|
+
*
|
|
923
|
+
* return (
|
|
924
|
+
* <CheckboxField
|
|
925
|
+
* name="myCheckbox"
|
|
926
|
+
* label="Accept terms"
|
|
927
|
+
* value={isChecked}
|
|
928
|
+
* onChange={(checked) => setIsChecked(checked)}
|
|
929
|
+
* error={error}
|
|
930
|
+
* helperText={helperText}
|
|
931
|
+
* required
|
|
932
|
+
* />
|
|
933
|
+
* );
|
|
934
|
+
* }
|
|
935
|
+
* ```
|
|
936
|
+
*
|
|
937
|
+
*/
|
|
433
938
|
declare const CheckboxField: React__default.ForwardRefExoticComponent<Omit<ICheckboxFieldProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
434
939
|
|
|
435
940
|
/**
|
|
@@ -442,7 +947,7 @@ type FieldError$d = {
|
|
|
442
947
|
* Extended Date Calendar Field Props
|
|
443
948
|
* Extends MUI DateCalendarProps with custom form field props
|
|
444
949
|
*/
|
|
445
|
-
interface IDateCalendarFieldProps extends Omit<DateCalendarProps
|
|
950
|
+
interface IDateCalendarFieldProps extends Omit<DateCalendarProps<Date>, "value" | "onChange" | "defaultValue" | "slots" | "slotProps"> {
|
|
446
951
|
/** Field name for form identification */
|
|
447
952
|
name?: string;
|
|
448
953
|
/** Label text for the calendar */
|
|
@@ -472,25 +977,25 @@ interface IDateCalendarFieldProps extends Omit<DateCalendarProps, 'value' | 'onC
|
|
|
472
977
|
/** Function to disable specific years */
|
|
473
978
|
shouldDisableYear?: (year: Date) => boolean;
|
|
474
979
|
/** Custom styles for the DateCalendar */
|
|
475
|
-
calendarStyles?: DateCalendarProps[
|
|
980
|
+
calendarStyles?: DateCalendarProps<Date>["sx"];
|
|
476
981
|
/** Custom styles for FormControl */
|
|
477
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
982
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
478
983
|
/** Custom styles for FormLabel */
|
|
479
|
-
formLabelStyles?: FormLabelProps[
|
|
984
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
480
985
|
/** Custom styles for the container Box */
|
|
481
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
986
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
482
987
|
/** Callback fired when the date changes */
|
|
483
988
|
onChange?: (value: Date | null) => void;
|
|
484
989
|
/** Callback fired when a view change is requested */
|
|
485
|
-
onViewChange?: (view:
|
|
990
|
+
onViewChange?: (view: "day" | "month" | "year") => void;
|
|
486
991
|
/** Callback fired when a month change is requested */
|
|
487
992
|
onMonthChange?: (month: Date) => void;
|
|
488
993
|
/** Callback fired when a year change is requested */
|
|
489
994
|
onYearChange?: (year: Date) => void;
|
|
490
995
|
/** Custom slot props for MUI v7 */
|
|
491
|
-
slotProps?: DateCalendarProps[
|
|
996
|
+
slotProps?: DateCalendarProps<Date>["slotProps"];
|
|
492
997
|
/** Custom slots for MUI v7 */
|
|
493
|
-
slots?: DateCalendarProps[
|
|
998
|
+
slots?: DateCalendarProps<Date>["slots"];
|
|
494
999
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
495
1000
|
dateAdapter?: typeof AdapterDateFns;
|
|
496
1001
|
/** Whether to show days outside current month */
|
|
@@ -502,8 +1007,74 @@ interface IDateCalendarFieldProps extends Omit<DateCalendarProps, 'value' | 'onC
|
|
|
502
1007
|
/** Reference date for the calendar */
|
|
503
1008
|
referenceDate?: Date;
|
|
504
1009
|
/** Controlled view state */
|
|
505
|
-
view?:
|
|
1010
|
+
view?: "day" | "month" | "year";
|
|
506
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Date Calendar Field Component
|
|
1014
|
+
*
|
|
1015
|
+
* A customizable inline date calendar field built on top of Material UI X DateCalendar and FormControl.
|
|
1016
|
+
*
|
|
1017
|
+
* @component
|
|
1018
|
+
* @version 2.x.x
|
|
1019
|
+
* @author call-max
|
|
1020
|
+
*
|
|
1021
|
+
* @description This component provides an inline calendar for date selection with support for: error handling, helper text,
|
|
1022
|
+
* date constraints (min/max), disabling specific dates/months/years, and standard calendar behaviors.
|
|
1023
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1024
|
+
*
|
|
1025
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1026
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the calendar
|
|
1027
|
+
* @param {Date | null} value - {Date | null} Current selected date value (controlled component)
|
|
1028
|
+
* @param {Date | null} [defaultValue] - {Date | null} Default date value
|
|
1029
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1030
|
+
* @param {string} [helperText] - {string} Helper text to display below calendar
|
|
1031
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1032
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
1033
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1034
|
+
* @param {Date} [minDate] - {Date} Minimum selectable date
|
|
1035
|
+
* @param {Date} [maxDate] - {Date} Maximum selectable date
|
|
1036
|
+
* @param {(date: Date) => boolean} [shouldDisableDate] - {(date: Date) => boolean} Function to disable specific dates
|
|
1037
|
+
* @param {(month: Date) => boolean} [shouldDisableMonth] - {(month: Date) => boolean} Function to disable specific months
|
|
1038
|
+
* @param {(year: Date) => boolean} [shouldDisableYear] - {(year: Date) => boolean} Function to disable specific years
|
|
1039
|
+
* @param {DateCalendarProps['sx']} [calendarStyles] - {DateCalendarProps['sx']} Custom styles for the DateCalendar component
|
|
1040
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1041
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
1042
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
1043
|
+
* @param {(value: Date | null) => void} [onChange] - {(value: Date | null) => void} Callback fired when the date changes
|
|
1044
|
+
* @param {(view: 'day' | 'month' | 'year') => void} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
1045
|
+
* @param {(month: Date) => void} [onMonthChange] - {Function} Callback fired when a month change is requested
|
|
1046
|
+
* @param {(year: Date) => void} [onYearChange] - {Function} Callback fired when a year change is requested
|
|
1047
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
1048
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
1049
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
1050
|
+
* @param {boolean} [showDaysOutsideCurrentMonth=false] - {boolean} Whether to show days outside current month
|
|
1051
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past dates
|
|
1052
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future dates
|
|
1053
|
+
* @param {Date} [referenceDate] - {Date} Reference date for the calendar
|
|
1054
|
+
* @param {'day' | 'month' | 'year'} [view] - {'day' | 'month' | 'year'} Controlled view state
|
|
1055
|
+
*
|
|
1056
|
+
* @returns {JSX.Element} The Date Calendar Field component
|
|
1057
|
+
*
|
|
1058
|
+
* @usage
|
|
1059
|
+
* ```tsx
|
|
1060
|
+
* import DateCalendarField from "@react-solutions/inputs";
|
|
1061
|
+
* import { useState } from "react";
|
|
1062
|
+
*
|
|
1063
|
+
* function MyForm() {
|
|
1064
|
+
* const [selectedDate, setSelectedDate] = useState<Date | null>(new Date());
|
|
1065
|
+
*
|
|
1066
|
+
* return (
|
|
1067
|
+
* <DateCalendarField
|
|
1068
|
+
* name="myCalendar"
|
|
1069
|
+
* label="Select Date"
|
|
1070
|
+
* value={selectedDate}
|
|
1071
|
+
* onChange={(date) => setSelectedDate(date)}
|
|
1072
|
+
* />
|
|
1073
|
+
* );
|
|
1074
|
+
* }
|
|
1075
|
+
* ```
|
|
1076
|
+
*
|
|
1077
|
+
*/
|
|
507
1078
|
declare const DateCalendarField: React__default.ForwardRefExoticComponent<IDateCalendarFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
508
1079
|
|
|
509
1080
|
/**
|
|
@@ -516,7 +1087,7 @@ type FieldError$c = {
|
|
|
516
1087
|
* Extended Time Clock Field Props
|
|
517
1088
|
* Extends MUI TimeClockProps with custom form field props
|
|
518
1089
|
*/
|
|
519
|
-
interface ITimeClockFieldProps extends Omit<TimeClockProps<
|
|
1090
|
+
interface ITimeClockFieldProps extends Omit<TimeClockProps<Date>, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "view" | "onViewChange"> {
|
|
520
1091
|
/** Field name for form identification */
|
|
521
1092
|
name?: string;
|
|
522
1093
|
/** Label text for the time clock */
|
|
@@ -552,19 +1123,19 @@ interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>, 'value' |
|
|
|
552
1123
|
/** Function to disable specific times */
|
|
553
1124
|
shouldDisableTime?: (time: Date, view: TimeView) => boolean;
|
|
554
1125
|
/** Custom styles for the TimeClock */
|
|
555
|
-
clockStyles?: TimeClockProps<
|
|
1126
|
+
clockStyles?: TimeClockProps<Date>["sx"];
|
|
556
1127
|
/** Custom styles for FormControl */
|
|
557
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
1128
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
558
1129
|
/** Custom styles for FormLabel */
|
|
559
|
-
formLabelStyles?: FormLabelProps[
|
|
1130
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
560
1131
|
/** Custom styles for the container Box */
|
|
561
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
1132
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
562
1133
|
/** Custom styles for the view buttons Stack */
|
|
563
|
-
buttonsStackStyles?: React__default.ComponentProps<typeof Stack>[
|
|
1134
|
+
buttonsStackStyles?: React__default.ComponentProps<typeof Stack>["sx"];
|
|
564
1135
|
/** Custom styles for view buttons */
|
|
565
|
-
buttonStyles?: ButtonProps[
|
|
1136
|
+
buttonStyles?: ButtonProps["sx"];
|
|
566
1137
|
/** Custom styles for active view button */
|
|
567
|
-
activeButtonStyles?: ButtonProps[
|
|
1138
|
+
activeButtonStyles?: ButtonProps["sx"];
|
|
568
1139
|
/** Whether to show view selector buttons */
|
|
569
1140
|
showViewButtons?: boolean;
|
|
570
1141
|
/** Initial view */
|
|
@@ -576,14 +1147,83 @@ interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>, 'value' |
|
|
|
576
1147
|
/** Callback fired when a view change is requested */
|
|
577
1148
|
onViewChange?: (view: TimeView) => void;
|
|
578
1149
|
/** Custom slot props for MUI v7 */
|
|
579
|
-
slotProps?: TimeClockProps<
|
|
1150
|
+
slotProps?: TimeClockProps<Date>["slotProps"];
|
|
580
1151
|
/** Custom slots for MUI v7 */
|
|
581
|
-
slots?: TimeClockProps<
|
|
1152
|
+
slots?: TimeClockProps<Date>["slots"];
|
|
582
1153
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
583
1154
|
dateAdapter?: typeof AdapterDateFns;
|
|
584
1155
|
/** Auto focus */
|
|
585
1156
|
autoFocus?: boolean;
|
|
586
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Time Clock Field Component
|
|
1160
|
+
*
|
|
1161
|
+
* A customizable inline time clock field built on top of Material UI X TimeClock and FormControl.
|
|
1162
|
+
*
|
|
1163
|
+
* @component
|
|
1164
|
+
* @version 2.x.x
|
|
1165
|
+
* @author call-max
|
|
1166
|
+
*
|
|
1167
|
+
* @description This component provides an inline clock for time selection with support for: error handling, helper text,
|
|
1168
|
+
* AM/PM support, time constraints (min/max), and standard clock behaviors.
|
|
1169
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1170
|
+
*
|
|
1171
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1172
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the time clock
|
|
1173
|
+
* @param {Date | null} value - {Date | null} Current selected time value (controlled component)
|
|
1174
|
+
* @param {Date | null} [defaultValue] - {Date | null} Default time value
|
|
1175
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1176
|
+
* @param {string} [helperText] - {string} Helper text to display below time clock
|
|
1177
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1178
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
1179
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1180
|
+
* @param {TimeView[]} [views=['hours', 'minutes']] - {TimeView[]} Available views (hours, minutes, seconds)
|
|
1181
|
+
* @param {boolean} [ampmInClock=false] - {boolean} Whether to show AM/PM in the clock
|
|
1182
|
+
* @param {boolean} [ampm=true] - {boolean} Whether to use 12-hour format
|
|
1183
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past times
|
|
1184
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future times
|
|
1185
|
+
* @param {Date} [minTime] - {Date} Minimum selectable time
|
|
1186
|
+
* @param {Date} [maxTime] - {Date} Maximum selectable time
|
|
1187
|
+
* @param {(time: Date, view: TimeView) => boolean} [shouldDisableTime] - {Function} Function to disable specific times
|
|
1188
|
+
* @param {TimeClockProps<TimeView>['sx']} [clockStyles] - {TimeClockProps<TimeView>['sx']} Custom styles for the TimeClock component
|
|
1189
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1190
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
1191
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
1192
|
+
* @param {StackProps['sx']} [buttonsStackStyles] - {StackProps['sx']} Custom styles for the view buttons Stack
|
|
1193
|
+
* @param {ButtonProps['sx']} [buttonStyles] - {ButtonProps['sx']} Custom styles for view buttons
|
|
1194
|
+
* @param {ButtonProps['sx']} [activeButtonStyles] - {ButtonProps['sx']} Custom styles for active view button
|
|
1195
|
+
* @param {boolean} [showViewButtons=true] - {boolean} Whether to show view selector buttons
|
|
1196
|
+
* @param {TimeView} [initialView='hours'] - {TimeView} Initial view
|
|
1197
|
+
* @param {TimeView} [view] - {TimeView} Controlled view state
|
|
1198
|
+
* @param {(value: Date | null) => void} [onChange] - {(value: Date | null) => void} Callback fired when value changes
|
|
1199
|
+
* @param {(view: TimeView) => void} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
1200
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
1201
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
1202
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
1203
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus
|
|
1204
|
+
*
|
|
1205
|
+
* @returns {JSX.Element} The Time Clock Field component
|
|
1206
|
+
*
|
|
1207
|
+
* @usage
|
|
1208
|
+
* ```tsx
|
|
1209
|
+
* import TimeClockField from "@react-solutions/inputs";
|
|
1210
|
+
* import { useState } from "react";
|
|
1211
|
+
*
|
|
1212
|
+
* function MyForm() {
|
|
1213
|
+
* const [time, setTime] = useState<Date | null>(new Date());
|
|
1214
|
+
*
|
|
1215
|
+
* return (
|
|
1216
|
+
* <TimeClockField
|
|
1217
|
+
* name="myTimeClock"
|
|
1218
|
+
* label="Select Time"
|
|
1219
|
+
* value={time}
|
|
1220
|
+
* onChange={(newTime) => setTime(newTime)}
|
|
1221
|
+
* />
|
|
1222
|
+
* );
|
|
1223
|
+
* }
|
|
1224
|
+
* ```
|
|
1225
|
+
*
|
|
1226
|
+
*/
|
|
587
1227
|
declare const TimeClockField: React__default.ForwardRefExoticComponent<ITimeClockFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
588
1228
|
|
|
589
1229
|
/**
|
|
@@ -596,7 +1236,7 @@ type FieldError$b = {
|
|
|
596
1236
|
* Extended Time Picker Field Props
|
|
597
1237
|
* Extends MUI TimePickerProps with custom form field props
|
|
598
1238
|
*/
|
|
599
|
-
interface ITimePickerFieldProps extends Omit<TimePickerProps
|
|
1239
|
+
interface ITimePickerFieldProps extends Omit<TimePickerProps<Date>, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput" | "onViewChange"> {
|
|
600
1240
|
/** Field name for form identification */
|
|
601
1241
|
name?: string;
|
|
602
1242
|
/** Label text for the time picker */
|
|
@@ -650,7 +1290,7 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChang
|
|
|
650
1290
|
/** Format for displaying the time */
|
|
651
1291
|
format?: string;
|
|
652
1292
|
/** Custom styles for the TimePicker */
|
|
653
|
-
pickerStyles?: TimePickerProps["sx"];
|
|
1293
|
+
pickerStyles?: TimePickerProps<Date>["sx"];
|
|
654
1294
|
/** Custom styles for FormControl */
|
|
655
1295
|
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
656
1296
|
/** Custom styles for FormLabel */
|
|
@@ -672,14 +1312,91 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChang
|
|
|
672
1312
|
/** Callback fired when the picker closes */
|
|
673
1313
|
onClose?: () => void;
|
|
674
1314
|
/** Custom slot props for MUI v7 */
|
|
675
|
-
slotProps?: TimePickerProps["slotProps"];
|
|
1315
|
+
slotProps?: TimePickerProps<Date>["slotProps"];
|
|
676
1316
|
/** Custom slots for MUI v7 */
|
|
677
|
-
slots?: TimePickerProps["slots"];
|
|
1317
|
+
slots?: TimePickerProps<Date>["slots"];
|
|
678
1318
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
679
1319
|
dateAdapter?: typeof AdapterDateFns;
|
|
680
1320
|
/** Auto focus the input */
|
|
681
1321
|
autoFocus?: boolean;
|
|
682
1322
|
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Time Picker Field Component
|
|
1325
|
+
*
|
|
1326
|
+
* A customizable time picker field built on top of Material UI X TimePicker and FormControl.
|
|
1327
|
+
*
|
|
1328
|
+
* @component
|
|
1329
|
+
* @version 2.x.x
|
|
1330
|
+
* @author call-max
|
|
1331
|
+
*
|
|
1332
|
+
* @description This component provides a flexible time picker with support for: error handling, helper text, clear button,
|
|
1333
|
+
* AM/PM support, time constraints (min/max), and standard time picker behaviors.
|
|
1334
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1335
|
+
*
|
|
1336
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1337
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the time picker
|
|
1338
|
+
* @param {Date | null} value - {Date | null} Current selected time value (controlled component)
|
|
1339
|
+
* @param {Date | null} [defaultValue] - {Date | null} Default time value
|
|
1340
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1341
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
1342
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1343
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
1344
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as a separate title above the picker
|
|
1345
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1346
|
+
* @param {Date} [minTime] - {Date} Minimum selectable time
|
|
1347
|
+
* @param {Date} [maxTime] - {Date} Maximum selectable time
|
|
1348
|
+
* @param {(time: Date, view: string) => boolean} [shouldDisableTime] - {Function} Function to disable specific times
|
|
1349
|
+
* @param {TextFieldProps['size']} [size='medium'] - {TextFieldProps['size']} TextField size
|
|
1350
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
1351
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
1352
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
1353
|
+
* @param {boolean} [readOnly=false] - {boolean} Whether the field is read-only
|
|
1354
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button
|
|
1355
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past times
|
|
1356
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future times
|
|
1357
|
+
* @param {boolean} [ampm=true] - {boolean} Whether to use 12-hour format
|
|
1358
|
+
* @param {string[]} [views] - {string[]} Available views (hours, minutes, seconds)
|
|
1359
|
+
* @param {string} [view] - {string} Controlled view state
|
|
1360
|
+
* @param {string} [openTo='hours'] - {string} Default view to open
|
|
1361
|
+
* @param {string} [format] - {string} Format for displaying the time
|
|
1362
|
+
* @param {TimePickerProps['sx']} [pickerStyles] - {TimePickerProps['sx']} Custom styles for the TimePicker component
|
|
1363
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1364
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
1365
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
1366
|
+
* @param {TextFieldProps['sx']} [textFieldStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
1367
|
+
* @param {(value: Date | null) => void} [onChange] - {(value: Date | null) => void} Callback fired when value changes
|
|
1368
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onFocus] - {Function} Callback when field receives focus
|
|
1369
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onBlur] - {Function} Callback when field loses focus
|
|
1370
|
+
* @param {Function} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
1371
|
+
* @param {Function} [onOpen] - {Function} Callback fired when the picker opens
|
|
1372
|
+
* @param {Function} [onClose] - {Function} Callback fired when the picker closes
|
|
1373
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
1374
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
1375
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
1376
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus the input
|
|
1377
|
+
*
|
|
1378
|
+
* @returns {JSX.Element} The Time Picker Field component
|
|
1379
|
+
*
|
|
1380
|
+
* @usage
|
|
1381
|
+
* ```tsx
|
|
1382
|
+
* import TimePickerField from "@react-solutions/inputs";
|
|
1383
|
+
* import { useState } from "react";
|
|
1384
|
+
*
|
|
1385
|
+
* function MyForm() {
|
|
1386
|
+
* const [time, setTime] = useState<Date | null>(null);
|
|
1387
|
+
*
|
|
1388
|
+
* return (
|
|
1389
|
+
* <TimePickerField
|
|
1390
|
+
* name="myTimePicker"
|
|
1391
|
+
* label="Select Time"
|
|
1392
|
+
* value={time}
|
|
1393
|
+
* onChange={(newTime) => setTime(newTime)}
|
|
1394
|
+
* />
|
|
1395
|
+
* );
|
|
1396
|
+
* }
|
|
1397
|
+
* ```
|
|
1398
|
+
*
|
|
1399
|
+
*/
|
|
683
1400
|
declare const TimePickerField: React__default.ForwardRefExoticComponent<ITimePickerFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
684
1401
|
|
|
685
1402
|
/**
|
|
@@ -692,7 +1409,7 @@ type FieldError$a = {
|
|
|
692
1409
|
* Extended Date Picker Field Props
|
|
693
1410
|
* Extends MUI DatePickerProps with custom form field props
|
|
694
1411
|
*/
|
|
695
|
-
interface IDatePickerFieldProps extends Omit<DatePickerProps
|
|
1412
|
+
interface IDatePickerFieldProps extends Omit<DatePickerProps<Date>, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput"> {
|
|
696
1413
|
/** Field name for form identification */
|
|
697
1414
|
name?: string;
|
|
698
1415
|
/** Label text for the date picker */
|
|
@@ -747,7 +1464,7 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
747
1464
|
/** Whether to open the calendar on focus */
|
|
748
1465
|
openTo?: "day" | "month" | "year";
|
|
749
1466
|
/** Custom styles for the DatePicker */
|
|
750
|
-
pickerStyles?: DatePickerProps["sx"];
|
|
1467
|
+
pickerStyles?: DatePickerProps<Date>["sx"];
|
|
751
1468
|
/** Custom styles for FormControl */
|
|
752
1469
|
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
753
1470
|
/** Custom styles for FormLabel */
|
|
@@ -773,9 +1490,9 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
773
1490
|
/** Callback fired when the calendar closes */
|
|
774
1491
|
onClose?: () => void;
|
|
775
1492
|
/** Custom slot props for MUI v7 */
|
|
776
|
-
slotProps?: DatePickerProps["slotProps"];
|
|
1493
|
+
slotProps?: DatePickerProps<Date>["slotProps"];
|
|
777
1494
|
/** Custom slots for MUI v7 */
|
|
778
|
-
slots?: DatePickerProps["slots"];
|
|
1495
|
+
slots?: DatePickerProps<Date>["slots"];
|
|
779
1496
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
780
1497
|
dateAdapter?: typeof AdapterDateFns;
|
|
781
1498
|
/** Whether to reduce animations */
|
|
@@ -783,6 +1500,87 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
783
1500
|
/** Auto focus the input */
|
|
784
1501
|
autoFocus?: boolean;
|
|
785
1502
|
}
|
|
1503
|
+
/**
|
|
1504
|
+
* Date Picker Field Component
|
|
1505
|
+
*
|
|
1506
|
+
* A customizable date picker field built on top of Material UI X DatePicker and FormControl.
|
|
1507
|
+
*
|
|
1508
|
+
* @component
|
|
1509
|
+
* @version 2.x.x
|
|
1510
|
+
* @author call-max
|
|
1511
|
+
*
|
|
1512
|
+
* @description This component provides a flexible date picker with support for: error handling, helper text, clear button,
|
|
1513
|
+
* custom formatting, date constraints (min/max), and standard date picker behaviors.
|
|
1514
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1515
|
+
*
|
|
1516
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1517
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the date picker
|
|
1518
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as a separate title above the picker
|
|
1519
|
+
* @param {Date | null} value - {Date | null} Current selected date value (controlled component)
|
|
1520
|
+
* @param {Date | null} [defaultValue] - {Date | null} Default date value
|
|
1521
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1522
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
1523
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1524
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
1525
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1526
|
+
* @param {Date} [minDate] - {Date} Minimum selectable date
|
|
1527
|
+
* @param {Date} [maxDate] - {Date} Maximum selectable date
|
|
1528
|
+
* @param {(date: Date) => boolean} [shouldDisableDate] - {Function} Function to disable specific dates
|
|
1529
|
+
* @param {(month: Date) => boolean} [shouldDisableMonth] - {Function} Function to disable specific months
|
|
1530
|
+
* @param {(year: Date) => boolean} [shouldDisableYear] - {Function} Function to disable specific years
|
|
1531
|
+
* @param {TextFieldProps['size']} [size='medium'] - {TextFieldProps['size']} TextField size
|
|
1532
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
1533
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
1534
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
1535
|
+
* @param {boolean} [readOnly=false] - {boolean} Whether the field is read-only
|
|
1536
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button
|
|
1537
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past dates
|
|
1538
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future dates
|
|
1539
|
+
* @param {Date} [referenceDate] - {Date} Reference date for the calendar
|
|
1540
|
+
* @param {'day' | 'month' | 'year'} [view] - {'day' | 'month' | 'year'} Controlled view state
|
|
1541
|
+
* @param {string} [format] - {string} Format for displaying the date
|
|
1542
|
+
* @param {'day' | 'month' | 'year'} [openTo='day'] - {string} Whether to open the calendar on focus
|
|
1543
|
+
* @param {DatePickerProps['sx']} [pickerStyles] - {DatePickerProps['sx']} Custom styles for the DatePicker component
|
|
1544
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1545
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
1546
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
1547
|
+
* @param {TextFieldProps['sx']} [textFieldStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
1548
|
+
* @param {(value: Date | null) => void} [onChange] - {(value: Date | null) => void} Callback fired when value changes
|
|
1549
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onFocus] - {Function} Callback when field receives focus
|
|
1550
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onBlur] - {Function} Callback when field loses focus
|
|
1551
|
+
* @param {Function} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
1552
|
+
* @param {Function} [onMonthChange] - {Function} Callback fired when a month change is requested
|
|
1553
|
+
* @param {Function} [onYearChange] - {Function} Callback fired when a year change is requested
|
|
1554
|
+
* @param {Function} [onOpen] - {Function} Callback fired when the calendar opens
|
|
1555
|
+
* @param {Function} [onClose] - {Function} Callback fired when the calendar closes
|
|
1556
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
1557
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
1558
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
1559
|
+
* @param {boolean} [reduceAnimations=false] - {boolean} Whether to reduce animations
|
|
1560
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus the input
|
|
1561
|
+
*
|
|
1562
|
+
* @returns {JSX.Element} The Date Picker Field component
|
|
1563
|
+
*
|
|
1564
|
+
* @usage
|
|
1565
|
+
* ```tsx
|
|
1566
|
+
* import DatePickerField from "@react-solutions/inputs";
|
|
1567
|
+
* import { useState } from "react";
|
|
1568
|
+
*
|
|
1569
|
+
* function MyForm() {
|
|
1570
|
+
* const [date, setDate] = useState<Date | null>(null);
|
|
1571
|
+
*
|
|
1572
|
+
* return (
|
|
1573
|
+
* <DatePickerField
|
|
1574
|
+
* name="myDatePicker"
|
|
1575
|
+
* label="Select Date"
|
|
1576
|
+
* value={date}
|
|
1577
|
+
* onChange={(newDate) => setDate(newDate)}
|
|
1578
|
+
* />
|
|
1579
|
+
* );
|
|
1580
|
+
* }
|
|
1581
|
+
* ```
|
|
1582
|
+
*
|
|
1583
|
+
*/
|
|
786
1584
|
declare const DatePickerField: React__default.ForwardRefExoticComponent<IDatePickerFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
787
1585
|
|
|
788
1586
|
/**
|
|
@@ -869,6 +1667,79 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange
|
|
|
869
1667
|
/** Custom slots for MUI v7 */
|
|
870
1668
|
slots?: TextFieldProps["slots"];
|
|
871
1669
|
}
|
|
1670
|
+
/**
|
|
1671
|
+
* File Upload Field Component
|
|
1672
|
+
*
|
|
1673
|
+
* A versatile file upload field built on top of Material UI TextField and native file input.
|
|
1674
|
+
*
|
|
1675
|
+
* @component
|
|
1676
|
+
* @version 2.x.x
|
|
1677
|
+
* @author call-max
|
|
1678
|
+
*
|
|
1679
|
+
* @description This component provides a file selection interface with support for: single/multiple files,
|
|
1680
|
+
* drag and drop, file validation (size, type), file preview, clear functionality, and standard form field behaviors.
|
|
1681
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1682
|
+
*
|
|
1683
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1684
|
+
* @param {string} [label] - {string} Label text for the file upload field
|
|
1685
|
+
* @param {File | File[] | { name: string } | null} [value] - {File | File[] | { name: string } | null} Current file(s)
|
|
1686
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1687
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
1688
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1689
|
+
* @param {string} [accept] - {string} File types to accept (e.g., "image/*", ".pdf")
|
|
1690
|
+
* @param {boolean} [multiple=false] - {boolean} Whether to allow multiple file selection
|
|
1691
|
+
* @param {number} [maxSize] - {number} Maximum file size in bytes
|
|
1692
|
+
* @param {number} [minSize] - {number} Minimum file size in bytes
|
|
1693
|
+
* @param {string[]} [allowedTypes] - {string[]} Allowed file types (MIME types or extensions)
|
|
1694
|
+
* @param {boolean} [showPreview=true] - {boolean} Whether to show file name preview
|
|
1695
|
+
* @param {boolean} [enableDragDrop=false] - {boolean} Whether to enable drag and drop
|
|
1696
|
+
* @param {string} [placeholder='No file chosen'] - {string} Placeholder text
|
|
1697
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
1698
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
1699
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
1700
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
1701
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1702
|
+
* @param {string} [buttonText='Upload'] - {string} Upload button text
|
|
1703
|
+
* @param {ButtonProps['variant']} [buttonVariant='contained'] - {ButtonProps['variant']} Upload button variant
|
|
1704
|
+
* @param {ButtonProps['color']} [buttonColor='primary'] - {ButtonProps['color']} Upload button color
|
|
1705
|
+
* @param {ButtonProps['size']} [buttonSize] - {ButtonProps['size']} Upload button size
|
|
1706
|
+
* @param {React.ReactNode} [uploadIcon] - {React.ReactNode} Custom upload icon
|
|
1707
|
+
* @param {(file: File | File[] | undefined) => void} [onChange] - {(file: File | File[] | undefined) => void} Callback fired when files change
|
|
1708
|
+
* @param {Function} [onFileSelect] - {Function} Callback fired when file is selected
|
|
1709
|
+
* @param {Function} [onFileRemove] - {Function} Callback fired when file is removed
|
|
1710
|
+
* @param {(error: string) => void} [onValidationError] - {(error: string) => void} Callback fired on validation error
|
|
1711
|
+
* @param {(files: FileList) => void} [onDrop] - {(files: FileList) => void} Callback fired when file is dropped
|
|
1712
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
1713
|
+
* @param {ButtonProps['sx']} [buttonStyles] - {ButtonProps['sx']} Custom styles for the Upload button
|
|
1714
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1715
|
+
* @param {React.CSSProperties} [containerStyles] - {React.CSSProperties} Custom styles for the container
|
|
1716
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
1717
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
1718
|
+
*
|
|
1719
|
+
* @returns {JSX.Element} The File Upload Field component
|
|
1720
|
+
*
|
|
1721
|
+
* @usage
|
|
1722
|
+
* ```tsx
|
|
1723
|
+
* import FileUploadField from "@react-solutions/inputs";
|
|
1724
|
+
* import { useState } from "react";
|
|
1725
|
+
*
|
|
1726
|
+
* function MyForm() {
|
|
1727
|
+
* const [file, setFile] = useState<File | File[] | undefined>(null);
|
|
1728
|
+
*
|
|
1729
|
+
* return (
|
|
1730
|
+
* <FileUploadField
|
|
1731
|
+
* name="resume"
|
|
1732
|
+
* label="Upload Resume"
|
|
1733
|
+
* value={file}
|
|
1734
|
+
* onChange={(newFile) => setFile(newFile)}
|
|
1735
|
+
* accept=".pdf,.doc,.docx"
|
|
1736
|
+
* enableDragDrop
|
|
1737
|
+
* />
|
|
1738
|
+
* );
|
|
1739
|
+
* }
|
|
1740
|
+
* ```
|
|
1741
|
+
*
|
|
1742
|
+
*/
|
|
872
1743
|
declare const FileUploadField: React__default.ForwardRefExoticComponent<Omit<IFileUploadFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
873
1744
|
|
|
874
1745
|
/**
|
|
@@ -880,11 +1751,11 @@ type FieldError$8 = {
|
|
|
880
1751
|
/**
|
|
881
1752
|
* Color format types
|
|
882
1753
|
*/
|
|
883
|
-
type ColorFormat =
|
|
1754
|
+
type ColorFormat = "hex" | "rgb" | "rgba" | "hsl" | "hsla";
|
|
884
1755
|
/**
|
|
885
1756
|
* Extended Color Picker Field Props
|
|
886
1757
|
*/
|
|
887
|
-
interface IColorPickerFieldProps extends Omit<TextFieldProps,
|
|
1758
|
+
interface IColorPickerFieldProps extends Omit<TextFieldProps, "value" | "onChange" | "name" | "type" | "error" | "inputRef" | "multiline" | "variant" | "size"> {
|
|
888
1759
|
/** Field name for form identification */
|
|
889
1760
|
name?: string;
|
|
890
1761
|
/** Label text for the color picker field */
|
|
@@ -900,11 +1771,11 @@ interface IColorPickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChang
|
|
|
900
1771
|
/** Placeholder text */
|
|
901
1772
|
placeholder?: string;
|
|
902
1773
|
/** TextField variant */
|
|
903
|
-
variant?: TextFieldProps[
|
|
1774
|
+
variant?: TextFieldProps["variant"];
|
|
904
1775
|
/** TextField size */
|
|
905
|
-
size?: TextFieldProps[
|
|
1776
|
+
size?: TextFieldProps["size"];
|
|
906
1777
|
/** TextField color */
|
|
907
|
-
color?: TextFieldProps[
|
|
1778
|
+
color?: TextFieldProps["color"];
|
|
908
1779
|
/** Full width of the field */
|
|
909
1780
|
fullWidth?: boolean;
|
|
910
1781
|
/** Required field indicator */
|
|
@@ -932,14 +1803,73 @@ interface IColorPickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChang
|
|
|
932
1803
|
/** Custom styles for the color preview swatch */
|
|
933
1804
|
previewStyles?: React__default.CSSProperties;
|
|
934
1805
|
/** Custom styles for FormControl */
|
|
935
|
-
formControlStyles?: FormControlProps[
|
|
1806
|
+
formControlStyles?: FormControlProps["sx"];
|
|
936
1807
|
/** Custom styles for TextField */
|
|
937
|
-
inputStyles?: TextFieldProps[
|
|
1808
|
+
inputStyles?: TextFieldProps["sx"];
|
|
938
1809
|
/** Custom slot props for MUI v7 */
|
|
939
|
-
slotProps?: TextFieldProps[
|
|
1810
|
+
slotProps?: TextFieldProps["slotProps"];
|
|
940
1811
|
/** Custom slots for MUI v7 */
|
|
941
|
-
slots?: TextFieldProps[
|
|
1812
|
+
slots?: TextFieldProps["slots"];
|
|
942
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Color Picker Field Component
|
|
1816
|
+
*
|
|
1817
|
+
* A customizable color picker field built on top of Material UI TextField and native color input.
|
|
1818
|
+
*
|
|
1819
|
+
* @component
|
|
1820
|
+
* @version 2.x.x
|
|
1821
|
+
* @author call-max
|
|
1822
|
+
*
|
|
1823
|
+
* @description This component provides a color selection input with support for: hex values, color preview swatch,
|
|
1824
|
+
* native color picker integration, error handling, helper text, and standard text field behaviors.
|
|
1825
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1826
|
+
*
|
|
1827
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1828
|
+
* @param {string} [label] - {string} Label text for the color picker field
|
|
1829
|
+
* @param {string} value - {string} Current color value (hex string)
|
|
1830
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1831
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
1832
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1833
|
+
* @param {string} [placeholder='#000000'] - {string} Placeholder text
|
|
1834
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
1835
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
1836
|
+
* @param {TextFieldProps['color']|'primary'} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
1837
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
1838
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1839
|
+
* @param {ColorFormat} [format='hex'] - {ColorFormat} Color format (currently hex supported)
|
|
1840
|
+
* @param {boolean} [showPreview=true] - {boolean} Whether to show color preview swatch
|
|
1841
|
+
* @param {(value: string) => void} [onChange] - {(value: string) => void} Callback fired when value changes
|
|
1842
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
1843
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
1844
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
1845
|
+
* @param {React.CSSProperties} [previewStyles] - {React.CSSProperties} Custom styles for the color preview swatch
|
|
1846
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
1847
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for TextField
|
|
1848
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
1849
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
1850
|
+
*
|
|
1851
|
+
* @returns {JSX.Element} The Color Picker Field component
|
|
1852
|
+
*
|
|
1853
|
+
* @usage
|
|
1854
|
+
* ```tsx
|
|
1855
|
+
* import ColorPickerField from "@react-solutions/inputs";
|
|
1856
|
+
* import { useState } from "react";
|
|
1857
|
+
*
|
|
1858
|
+
* function MyForm() {
|
|
1859
|
+
* const [color, setColor] = useState("#3f51b5");
|
|
1860
|
+
*
|
|
1861
|
+
* return (
|
|
1862
|
+
* <ColorPickerField
|
|
1863
|
+
* name="brandColor"
|
|
1864
|
+
* label="Choose Brand Color"
|
|
1865
|
+
* value={color}
|
|
1866
|
+
* onChange={(newColor) => setColor(newColor)}
|
|
1867
|
+
* />
|
|
1868
|
+
* );
|
|
1869
|
+
* }
|
|
1870
|
+
* ```
|
|
1871
|
+
*
|
|
1872
|
+
*/
|
|
943
1873
|
declare const ColorPickerField: React__default.NamedExoticComponent<Omit<IColorPickerFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
944
1874
|
|
|
945
1875
|
type AutoCompleteOption = {
|
|
@@ -1032,6 +1962,77 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1032
1962
|
/** Custom slots for MUI v7 */
|
|
1033
1963
|
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["slots"];
|
|
1034
1964
|
}
|
|
1965
|
+
/**
|
|
1966
|
+
* AutoComplete Field Component
|
|
1967
|
+
*
|
|
1968
|
+
* A highly customizable autocomplete search and dropdown field built on top of Material UI Autocomplete and TextField.
|
|
1969
|
+
*
|
|
1970
|
+
* @component
|
|
1971
|
+
* @version 2.x.x
|
|
1972
|
+
* @author call-max
|
|
1973
|
+
*
|
|
1974
|
+
* @description This component provides a searchable dropdown with support for: single/multiple selection, remote/local options,
|
|
1975
|
+
* error handling, helper text, custom option rendering, and standard autocomplete behaviors.
|
|
1976
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
1977
|
+
*
|
|
1978
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
1979
|
+
* @param {string} [label] - {string} Label text for the input field
|
|
1980
|
+
* @param {T | T[] | null} value - {T | T[] | null} Current selected value(s) (controlled component)
|
|
1981
|
+
* @param {T[]} options - {T[]} Array of options to display in dropdown
|
|
1982
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
1983
|
+
* @param {string} [helperText] - {string} Helper text to display below input
|
|
1984
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
1985
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
1986
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
1987
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
1988
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
1989
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
1990
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
1991
|
+
* @param {Function} [getOptionLabel] - {Function} Custom function to get option label
|
|
1992
|
+
* @param {Function} [isOptionEqualToValue] - {Function} Custom function to check option equality
|
|
1993
|
+
* @param {Function} [renderOption] - {Function} Custom render function for options
|
|
1994
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
1995
|
+
* @param {Function} [onInputChange] - {Function} Callback fired when input value changes
|
|
1996
|
+
* @param {Function} [onOpen] - {Function} Callback fired when popup opens
|
|
1997
|
+
* @param {Function} [onClose] - {Function} Callback fired when popup closes
|
|
1998
|
+
* @param {React.ReactNode} [popupIcon] - {React.ReactNode} Custom icon for popup indicator
|
|
1999
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
2000
|
+
* @param {AutocompleteProps['sx']} [autocompleteStyles] - {AutocompleteProps['sx']} Custom styles for the Autocomplete component
|
|
2001
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2002
|
+
* @param {boolean} [loading=false] - {boolean} Whether to show loading state
|
|
2003
|
+
* @param {React.ReactNode} [loadingText='Loading...'] - {React.ReactNode} Text to show when loading
|
|
2004
|
+
* @param {React.ReactNode} [noOptionsText='No options'] - {React.ReactNode} Text to show when no options available
|
|
2005
|
+
* @param {Function} [filterOptions] - {Function} Custom filter options function
|
|
2006
|
+
* @param {boolean} [autoHighlight=true] - {boolean} Whether to highlight the first option
|
|
2007
|
+
* @param {boolean} [autoSelect=false] - {boolean} Whether to select the first option on highlight
|
|
2008
|
+
* @param {boolean} [disablePortal=false] - {boolean} Whether to disable portal rendering
|
|
2009
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2010
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2011
|
+
*
|
|
2012
|
+
* @returns {JSX.Element} The AutoComplete Field component
|
|
2013
|
+
*
|
|
2014
|
+
* @usage
|
|
2015
|
+
* ```tsx
|
|
2016
|
+
* import AutoCompleteField from "@react-solutions/inputs";
|
|
2017
|
+
* import { useState } from "react";
|
|
2018
|
+
*
|
|
2019
|
+
* function MyForm() {
|
|
2020
|
+
* const [val, setVal] = useState(null);
|
|
2021
|
+
* const options = [{ name: "Option 1", value: 1 }, { name: "Option 2", value: 2 }];
|
|
2022
|
+
*
|
|
2023
|
+
* return (
|
|
2024
|
+
* <AutoCompleteField
|
|
2025
|
+
* name="myAutocomplete"
|
|
2026
|
+
* label="Select Option"
|
|
2027
|
+
* value={val}
|
|
2028
|
+
* options={options}
|
|
2029
|
+
* onChange={(e, newVal) => setVal(newVal)}
|
|
2030
|
+
* />
|
|
2031
|
+
* );
|
|
2032
|
+
* }
|
|
2033
|
+
* ```
|
|
2034
|
+
*
|
|
2035
|
+
*/
|
|
1035
2036
|
declare const AutoCompleteField: React__default.NamedExoticComponent<Omit<IAutoCompleteInputProps<AutoCompleteOption, boolean, boolean, boolean>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1036
2037
|
|
|
1037
2038
|
/**
|
|
@@ -1113,6 +2114,73 @@ interface ISelectInputFieldProps extends Omit<SelectProps<string | number | (str
|
|
|
1113
2114
|
/** Menu props */
|
|
1114
2115
|
MenuProps?: SelectProps["MenuProps"];
|
|
1115
2116
|
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Select Input Field Component
|
|
2119
|
+
*
|
|
2120
|
+
* A customizable dropdown selection field built on top of Material UI Select and FormControl.
|
|
2121
|
+
*
|
|
2122
|
+
* @component
|
|
2123
|
+
* @version 2.x.x
|
|
2124
|
+
* @author call-max
|
|
2125
|
+
*
|
|
2126
|
+
* @description This component provides a flexible dropdown with support for: single/multiple selection,
|
|
2127
|
+
* error handling, helper text, custom menu item rendering, and standard select behaviors.
|
|
2128
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
2129
|
+
*
|
|
2130
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2131
|
+
* @param {string} [label] - {string} Label text for the select field
|
|
2132
|
+
* @param {string | number | (string | number)[] | ''} value - {string | number | (string | number)[] | ''} Current selected value(s) (controlled component)
|
|
2133
|
+
* @param {SelectOption[]} options - {SelectOption[]} Array of options to display in dropdown
|
|
2134
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2135
|
+
* @param {string} [helperText] - {string} Helper text to display below select
|
|
2136
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2137
|
+
* @param {SelectProps['variant']} [variant='outlined'] - {SelectProps['variant']} Select variant
|
|
2138
|
+
* @param {SelectProps['size']} [size] - {SelectProps['size']} Select size
|
|
2139
|
+
* @param {SelectProps['color']} [color] - {SelectProps['color']} Select color
|
|
2140
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2141
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2142
|
+
* @param {boolean} [multiple=false] - {boolean} Whether to allow multiple selections
|
|
2143
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for dropdown indicator
|
|
2144
|
+
* @param {SelectProps['renderValue']} [renderValue] - {Function} Custom render function for selected value(s)
|
|
2145
|
+
* @param {Function} [renderMenuItem] - {Function} Custom render function for menu items
|
|
2146
|
+
* @param {MenuItemProps['sx'] | Function} [menuItemStyles] - {Object|Function} Custom styles for MenuItem
|
|
2147
|
+
* @param {SelectProps['sx']} [selectStyles] - {SelectProps['sx']} Custom styles for the Select component
|
|
2148
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2149
|
+
* @param {InputLabelProps['sx']} [labelStyles] - {InputLabelProps['sx']} Custom styles for InputLabel
|
|
2150
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
2151
|
+
* @param {Function} [onOpen] - {Function} Callback fired when menu opens
|
|
2152
|
+
* @param {Function} [onClose] - {Function} Callback fired when menu closes
|
|
2153
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2154
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2155
|
+
* @param {boolean} [displayEmpty=false] - {boolean} Whether to display empty value
|
|
2156
|
+
* @param {boolean} [autoWidth=false] - {boolean} Whether the menu should have auto width
|
|
2157
|
+
* @param {boolean} [native=false] - {boolean} Whether to use native select element
|
|
2158
|
+
* @param {SelectProps['MenuProps']} [MenuProps] - {Object} Custom Menu props
|
|
2159
|
+
*
|
|
2160
|
+
* @returns {JSX.Element} The Select Input Field component
|
|
2161
|
+
*
|
|
2162
|
+
* @usage
|
|
2163
|
+
* ```tsx
|
|
2164
|
+
* import SelectInputField from "@react-solutions/inputs";
|
|
2165
|
+
* import { useState } from "react";
|
|
2166
|
+
*
|
|
2167
|
+
* function MyForm() {
|
|
2168
|
+
* const [val, setVal] = useState("");
|
|
2169
|
+
* const options = [{ name: "Option 1", value: "1" }, { name: "Option 2", value: "2" }];
|
|
2170
|
+
*
|
|
2171
|
+
* return (
|
|
2172
|
+
* <SelectInputField
|
|
2173
|
+
* name="mySelect"
|
|
2174
|
+
* label="Select Option"
|
|
2175
|
+
* value={val}
|
|
2176
|
+
* options={options}
|
|
2177
|
+
* onChange={(e) => setVal(e.target.value)}
|
|
2178
|
+
* />
|
|
2179
|
+
* );
|
|
2180
|
+
* }
|
|
2181
|
+
* ```
|
|
2182
|
+
*
|
|
2183
|
+
*/
|
|
1116
2184
|
declare const SelectInputField: React__default.ForwardRefExoticComponent<Omit<ISelectInputFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
1117
2185
|
|
|
1118
2186
|
/**
|
|
@@ -1176,6 +2244,69 @@ interface IOTPInputFieldProps extends Omit<TextFieldProps, "value" | "onChange"
|
|
|
1176
2244
|
/** Custom slots for MUI v7 */
|
|
1177
2245
|
slots?: TextFieldProps["slots"];
|
|
1178
2246
|
}
|
|
2247
|
+
/**
|
|
2248
|
+
* OTP Field Component
|
|
2249
|
+
*
|
|
2250
|
+
* A specialized multi-box input field for One-Time Passwords (OTP) built on top of Material UI TextField.
|
|
2251
|
+
*
|
|
2252
|
+
* @component
|
|
2253
|
+
* @version 2.x.x
|
|
2254
|
+
* @author call-max
|
|
2255
|
+
*
|
|
2256
|
+
* @description This component provides a series of individual input boxes for OTP entry with support for:
|
|
2257
|
+
* automatic focus shifting, backspace handling, pasting multiple digits, error handling, and completion callbacks.
|
|
2258
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
2259
|
+
*
|
|
2260
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2261
|
+
* @param {string} [label] - {string} Label text for the OTP field
|
|
2262
|
+
* @param {string} value - {string} Current OTP value (string of digits)
|
|
2263
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2264
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2265
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2266
|
+
* @param {number} [length=6] - {number} Number of OTP input boxes
|
|
2267
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2268
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2269
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
2270
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2271
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2272
|
+
* @param {number} [spacing=1] - {number} Spacing between OTP boxes
|
|
2273
|
+
* @param {boolean} [autoFocus=false] - {boolean} Whether to auto-focus first input on mount
|
|
2274
|
+
* @param {boolean} [autoSubmit=false] - {boolean} Whether to auto-submit when all boxes are filled
|
|
2275
|
+
* @param {(value: string) => void} [onChange] - {(value: string) => void} Callback fired when value changes
|
|
2276
|
+
* @param {(value: string) => void} [onComplete] - {(value: string) => void} Callback fired when all boxes are filled
|
|
2277
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
2278
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
2279
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
2280
|
+
* @param {React.CSSProperties} [containerStyles] - {React.CSSProperties} Custom styles for the OTP container
|
|
2281
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for individual OTP input boxes
|
|
2282
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2283
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2284
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2285
|
+
*
|
|
2286
|
+
* @returns {JSX.Element} The OTP Field component
|
|
2287
|
+
*
|
|
2288
|
+
* @usage
|
|
2289
|
+
* ```tsx
|
|
2290
|
+
* import OTPField from "@react-solutions/inputs";
|
|
2291
|
+
* import { useState } from "react";
|
|
2292
|
+
*
|
|
2293
|
+
* function MyForm() {
|
|
2294
|
+
* const [otp, setOtp] = useState("");
|
|
2295
|
+
*
|
|
2296
|
+
* return (
|
|
2297
|
+
* <OTPField
|
|
2298
|
+
* name="otp"
|
|
2299
|
+
* label="Enter Verification Code"
|
|
2300
|
+
* value={otp}
|
|
2301
|
+
* length={6}
|
|
2302
|
+
* onChange={(val) => setOtp(val)}
|
|
2303
|
+
* onComplete={(val) => console.log("OTP Complete:", val)}
|
|
2304
|
+
* />
|
|
2305
|
+
* );
|
|
2306
|
+
* }
|
|
2307
|
+
* ```
|
|
2308
|
+
*
|
|
2309
|
+
*/
|
|
1179
2310
|
declare const OTPField: React__default.ForwardRefExoticComponent<Omit<IOTPInputFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1180
2311
|
|
|
1181
2312
|
/**
|
|
@@ -1254,6 +2385,75 @@ interface ISearchInputFieldProps extends Omit<TextFieldProps, "value" | "onChang
|
|
|
1254
2385
|
/** Custom slots for MUI v7 */
|
|
1255
2386
|
slots?: TextFieldProps["slots"];
|
|
1256
2387
|
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Search Input Field Component
|
|
2390
|
+
*
|
|
2391
|
+
* A specialized search input field built on top of Material UI TextField with search and clear functionality.
|
|
2392
|
+
*
|
|
2393
|
+
* @component
|
|
2394
|
+
* @version 2.x.x
|
|
2395
|
+
* @author call-max
|
|
2396
|
+
*
|
|
2397
|
+
* @description This component provides a robust search interface with support for: debounced/throttled search callbacks,
|
|
2398
|
+
* clear button, search button, Enter key handling, error handling, and helper text.
|
|
2399
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
2400
|
+
*
|
|
2401
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2402
|
+
* @param {string} [label] - {string} Label text for the search field
|
|
2403
|
+
* @param {string} value - {string} Current search value (controlled component)
|
|
2404
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2405
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2406
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2407
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
2408
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2409
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2410
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
2411
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2412
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2413
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button when input has value
|
|
2414
|
+
* @param {boolean} [showSearchButton=true] - {boolean} Whether to show search button icon
|
|
2415
|
+
* @param {React.ReactNode} [clearIcon] - {React.ReactNode} Custom clear icon
|
|
2416
|
+
* @param {React.ReactNode} [searchIcon] - {React.ReactNode} Custom search icon
|
|
2417
|
+
* @param {IconButtonProps} [clearButtonProps] - {IconButtonProps} Custom props for clear button
|
|
2418
|
+
* @param {IconButtonProps} [searchButtonProps] - {IconButtonProps} Custom props for search button
|
|
2419
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
2420
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
2421
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
2422
|
+
* @param {(value: string) => void} [onSearch] - {(value: string) => void} Callback fired for search (can be debounced/throttled)
|
|
2423
|
+
* @param {Function} [onClear] - {Function} Callback fired when clear button is clicked
|
|
2424
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
2425
|
+
* @param {boolean} [enableDebounce=true] - {boolean} Enable debounce for search callback
|
|
2426
|
+
* @param {number} [debounceDelay=300] - {number} Debounce delay in milliseconds
|
|
2427
|
+
* @param {boolean} [enableThrottle=false] - {boolean} Enable throttle for search callback
|
|
2428
|
+
* @param {number} [throttleDelay=300] - {number} Throttle delay in milliseconds
|
|
2429
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
2430
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2431
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2432
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2433
|
+
*
|
|
2434
|
+
* @returns {JSX.Element} The Search Input Field component
|
|
2435
|
+
*
|
|
2436
|
+
* @usage
|
|
2437
|
+
* ```tsx
|
|
2438
|
+
* import SearchField from "@react-solutions/inputs";
|
|
2439
|
+
* import { useState } from "react";
|
|
2440
|
+
*
|
|
2441
|
+
* function MyForm() {
|
|
2442
|
+
* const [search, setSearch] = useState("");
|
|
2443
|
+
*
|
|
2444
|
+
* return (
|
|
2445
|
+
* <SearchField
|
|
2446
|
+
* name="userSearch"
|
|
2447
|
+
* label="Search Users"
|
|
2448
|
+
* value={search}
|
|
2449
|
+
* onSearch={(val) => console.log("Searching for:", val)}
|
|
2450
|
+
* onChange={(e) => setSearch(e.target.value)}
|
|
2451
|
+
* />
|
|
2452
|
+
* );
|
|
2453
|
+
* }
|
|
2454
|
+
* ```
|
|
2455
|
+
*
|
|
2456
|
+
*/
|
|
1257
2457
|
declare const SearchField: React__default.NamedExoticComponent<Omit<ISearchInputFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
1258
2458
|
|
|
1259
2459
|
/**
|
|
@@ -1322,6 +2522,72 @@ interface ITelInputFieldProps extends Omit<TextFieldProps, "value" | "onChange"
|
|
|
1322
2522
|
/** Custom slots for MUI v7 */
|
|
1323
2523
|
slots?: TextFieldProps["slots"];
|
|
1324
2524
|
}
|
|
2525
|
+
/**
|
|
2526
|
+
* Telephone Input Field Component
|
|
2527
|
+
*
|
|
2528
|
+
* A specialized telephone number input field built on top of Material UI TextField with pattern formatting.
|
|
2529
|
+
*
|
|
2530
|
+
* @component
|
|
2531
|
+
* @version 2.x.x
|
|
2532
|
+
* @author call-max
|
|
2533
|
+
*
|
|
2534
|
+
* @description This component provides a telephone input with support for: automatic pattern-based formatting,
|
|
2535
|
+
* country code prefix, digits-only value management, error handling, helper text, and standard text field behaviors.
|
|
2536
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
2537
|
+
*
|
|
2538
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2539
|
+
* @param {string} [label] - {string} Label text for the tel field
|
|
2540
|
+
* @param {string} value - {string} Current tel value (digits only, controlled component)
|
|
2541
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2542
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2543
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2544
|
+
* @param {string} [placeholder] - {string} Placeholder text (auto-generated from pattern if not provided)
|
|
2545
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2546
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2547
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
2548
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2549
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2550
|
+
* @param {string} [pattern='XXXXXXXXXX'] - {string} Pattern string (e.g., 'XXX-XXXX' where X represents digits)
|
|
2551
|
+
* @param {number} [maxLength] - {number} Maximum digits allowed
|
|
2552
|
+
* @param {string} [countryCode='+1'] - {string} Country code prefix text
|
|
2553
|
+
* @param {boolean} [showCountryCode=false] - {boolean} Whether to show country code as start adornment
|
|
2554
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
2555
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
2556
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes (returns digits only)
|
|
2557
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
2558
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
2559
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
2560
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
2561
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2562
|
+
* @param {React.CSSProperties} [countryCodeStyles] - {React.CSSProperties} Custom styles for country code display
|
|
2563
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2564
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2565
|
+
*
|
|
2566
|
+
* @returns {JSX.Element} The Telephone Input Field component
|
|
2567
|
+
*
|
|
2568
|
+
* @usage
|
|
2569
|
+
* ```tsx
|
|
2570
|
+
* import TeliField from "@react-solutions/inputs";
|
|
2571
|
+
* import { useState } from "react";
|
|
2572
|
+
*
|
|
2573
|
+
* function MyForm() {
|
|
2574
|
+
* const [phone, setPhone] = useState("");
|
|
2575
|
+
*
|
|
2576
|
+
* return (
|
|
2577
|
+
* <TeliField
|
|
2578
|
+
* name="mobile"
|
|
2579
|
+
* label="Mobile Number"
|
|
2580
|
+
* value={phone}
|
|
2581
|
+
* pattern="XXX-XXX-XXXX"
|
|
2582
|
+
* showCountryCode
|
|
2583
|
+
* countryCode="+91"
|
|
2584
|
+
* onChange={(e) => setPhone(e.target.value)}
|
|
2585
|
+
* />
|
|
2586
|
+
* );
|
|
2587
|
+
* }
|
|
2588
|
+
* ```
|
|
2589
|
+
*
|
|
2590
|
+
*/
|
|
1325
2591
|
declare const TeliField: React__default.NamedExoticComponent<Omit<ITelInputFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1326
2592
|
|
|
1327
2593
|
/**
|
|
@@ -1400,6 +2666,73 @@ interface INumberInputFieldProps extends Omit<TextFieldProps, "value" | "onChang
|
|
|
1400
2666
|
/** Custom slots for MUI v7 */
|
|
1401
2667
|
slots?: TextFieldProps["slots"];
|
|
1402
2668
|
}
|
|
2669
|
+
/**
|
|
2670
|
+
* Number Field Component
|
|
2671
|
+
*
|
|
2672
|
+
* A highly customizable numeric input field built on top of Material UI TextField and FormControl.
|
|
2673
|
+
*
|
|
2674
|
+
* @component
|
|
2675
|
+
* @version 2.x.x
|
|
2676
|
+
* @author call-max
|
|
2677
|
+
*
|
|
2678
|
+
* @description This component provides a numeric input with advanced formatting support for: phone numbers,
|
|
2679
|
+
* credit cards, currency, SSN, ZIP codes, percentages, decimals, and custom patterns.
|
|
2680
|
+
* It handles input validation, automatic formatting, and integrates seamlessly with React Hook Form.
|
|
2681
|
+
*
|
|
2682
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2683
|
+
* @param {string} [label] - {string} Label text for the number field
|
|
2684
|
+
* @param {string} value - {string} Current number value (controlled component)
|
|
2685
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2686
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2687
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2688
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
2689
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2690
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2691
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
2692
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2693
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2694
|
+
* @param {NumberPattern | string} [pattern='integer'] - {NumberPattern | string} Number pattern type or custom pattern string
|
|
2695
|
+
* @param {RegExp} [customPattern] - {RegExp} Custom regex pattern (for pattern="custom")
|
|
2696
|
+
* @param {(value: string) => string} [customFormatter] - {Function} Custom formatter function
|
|
2697
|
+
* @param {number} [min] - {number} Minimum value
|
|
2698
|
+
* @param {number} [max] - {number} Maximum value
|
|
2699
|
+
* @param {number} [step] - {number} Step value for number input
|
|
2700
|
+
* @param {boolean} [allowDecimals=true] - {boolean} Whether to allow decimal numbers
|
|
2701
|
+
* @param {number} [decimalPlaces=2] - {number} Number of decimal places allowed
|
|
2702
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
2703
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
2704
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
2705
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
2706
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
2707
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
2708
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
2709
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2710
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2711
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2712
|
+
*
|
|
2713
|
+
* @returns {JSX.Element} The Number Field component
|
|
2714
|
+
*
|
|
2715
|
+
* @usage
|
|
2716
|
+
* ```tsx
|
|
2717
|
+
* import NumberField from "@react-solutions/inputs";
|
|
2718
|
+
* import { useState } from "react";
|
|
2719
|
+
*
|
|
2720
|
+
* function MyForm() {
|
|
2721
|
+
* const [phone, setPhone] = useState("");
|
|
2722
|
+
*
|
|
2723
|
+
* return (
|
|
2724
|
+
* <NumberField
|
|
2725
|
+
* name="phone"
|
|
2726
|
+
* label="Phone Number"
|
|
2727
|
+
* value={phone}
|
|
2728
|
+
* pattern="phone"
|
|
2729
|
+
* onChange={(e) => setPhone(e.target.value)}
|
|
2730
|
+
* />
|
|
2731
|
+
* );
|
|
2732
|
+
* }
|
|
2733
|
+
* ```
|
|
2734
|
+
*
|
|
2735
|
+
*/
|
|
1403
2736
|
declare const NumberField: React__default.NamedExoticComponent<Omit<INumberInputFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1404
2737
|
|
|
1405
2738
|
/**
|
|
@@ -1474,6 +2807,71 @@ interface IPasswordFieldProps extends Omit<TextFieldProps, "value" | "onChange"
|
|
|
1474
2807
|
/** Custom slots for MUI v7 */
|
|
1475
2808
|
slots?: TextFieldProps["slots"];
|
|
1476
2809
|
}
|
|
2810
|
+
/**
|
|
2811
|
+
* Password Field Component
|
|
2812
|
+
*
|
|
2813
|
+
* A specialized password input field built on top of Material UI TextField with visibility toggle.
|
|
2814
|
+
*
|
|
2815
|
+
* @component
|
|
2816
|
+
* @version 2.x.x
|
|
2817
|
+
* @author call-max
|
|
2818
|
+
*
|
|
2819
|
+
* @description This component provides a secure password input with support for: visibility toggling,
|
|
2820
|
+
* password strength indicator, error handling, helper text, and length validation.
|
|
2821
|
+
* It integrates seamlessly with form management libraries like React Hook Form through the use of `forwardRef`.
|
|
2822
|
+
*
|
|
2823
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2824
|
+
* @param {string} [label] - {string} Label text for the password field
|
|
2825
|
+
* @param {string} value - {string} Current password value (controlled component)
|
|
2826
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2827
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2828
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2829
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
2830
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2831
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2832
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
2833
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2834
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2835
|
+
* @param {boolean} [showPasswordStrength=false] - {boolean} Whether to show password strength indicator
|
|
2836
|
+
* @param {number} [minLength] - {number} Minimum password length
|
|
2837
|
+
* @param {number} [maxLength] - {number} Maximum password length
|
|
2838
|
+
* @param {boolean} [defaultShowPassword=false] - {boolean} Whether to show password by default
|
|
2839
|
+
* @param {React.ReactNode} [visibilityIcon] - {React.ReactNode} Custom visibility icon
|
|
2840
|
+
* @param {React.ReactNode} [visibilityOffIcon] - {React.ReactNode} Custom visibility off icon
|
|
2841
|
+
* @param {IconButtonProps} [iconButtonProps] - {IconButtonProps} Custom icon button props
|
|
2842
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
2843
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
2844
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
2845
|
+
* @param {Function} [onVisibilityToggle] - {Function} Callback when visibility toggles
|
|
2846
|
+
* @param {Function} [getPasswordStrength] - {Function} Custom strength calculation function
|
|
2847
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
2848
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
2849
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
2850
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
2851
|
+
*
|
|
2852
|
+
* @returns {JSX.Element} The Password Field component
|
|
2853
|
+
*
|
|
2854
|
+
* @usage
|
|
2855
|
+
* ```tsx
|
|
2856
|
+
* import PasswordField from "@react-solutions/inputs";
|
|
2857
|
+
* import { useState } from "react";
|
|
2858
|
+
*
|
|
2859
|
+
* function MyForm() {
|
|
2860
|
+
* const [pwd, setPwd] = useState("");
|
|
2861
|
+
*
|
|
2862
|
+
* return (
|
|
2863
|
+
* <PasswordField
|
|
2864
|
+
* name="password"
|
|
2865
|
+
* label="Password"
|
|
2866
|
+
* value={pwd}
|
|
2867
|
+
* showPasswordStrength
|
|
2868
|
+
* onChange={(e) => setPwd(e.target.value)}
|
|
2869
|
+
* />
|
|
2870
|
+
* );
|
|
2871
|
+
* }
|
|
2872
|
+
* ```
|
|
2873
|
+
*
|
|
2874
|
+
*/
|
|
1477
2875
|
declare const PasswordField: React__default.NamedExoticComponent<Omit<IPasswordFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
1478
2876
|
|
|
1479
2877
|
/**
|
|
@@ -1486,6 +2884,10 @@ type FieldError = {
|
|
|
1486
2884
|
* Resize options for textarea
|
|
1487
2885
|
*/
|
|
1488
2886
|
type ResizeOption = "none" | "both" | "horizontal" | "vertical";
|
|
2887
|
+
/**
|
|
2888
|
+
* Text transformation options
|
|
2889
|
+
*/
|
|
2890
|
+
type TextTransformOption = "uppercase" | "lowercase" | "capitalize";
|
|
1489
2891
|
/**
|
|
1490
2892
|
* Extended Text Input Field Props
|
|
1491
2893
|
* Extends MUI TextFieldProps with custom text field props
|
|
@@ -1553,9 +2955,85 @@ interface ITextInputFieldProps extends Omit<TextFieldProps, "value" | "onChange"
|
|
|
1553
2955
|
slotProps?: TextFieldProps["slotProps"];
|
|
1554
2956
|
/** Custom slots for MUI v7 */
|
|
1555
2957
|
slots?: TextFieldProps["slots"];
|
|
2958
|
+
/** Text transformation option */
|
|
2959
|
+
textTransform?: TextTransformOption;
|
|
1556
2960
|
}
|
|
2961
|
+
/**
|
|
2962
|
+
* Text Input Field Component
|
|
2963
|
+
*
|
|
2964
|
+
* A versatile text input field built on top of Material UI TextField with support for various text types and transformations.
|
|
2965
|
+
*
|
|
2966
|
+
* @component
|
|
2967
|
+
* @version 2.x.x
|
|
2968
|
+
* @author call-max
|
|
2969
|
+
*
|
|
2970
|
+
* @description This component provides a flexible text input with support for: single-line and multiline (textarea),
|
|
2971
|
+
* text transformations (uppercase, lowercase, capitalize), error handling, helper text, custom adornments,
|
|
2972
|
+
* and standard text field behaviors. It integrates seamlessly with form management libraries like React Hook Form
|
|
2973
|
+
* through the use of `forwardRef`.
|
|
2974
|
+
*
|
|
2975
|
+
* @param {string} [name] - {string} Field name for form identification
|
|
2976
|
+
* @param {string} [label] - {string} Label text for the text field
|
|
2977
|
+
* @param {string} value - {string} Current text value (controlled component)
|
|
2978
|
+
* @param {FieldError} [error] - {FieldError} Error object with optional message
|
|
2979
|
+
* @param {string} [helperText] - {string} Helper text to display below field
|
|
2980
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
2981
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
2982
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
2983
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
2984
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
2985
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
2986
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
2987
|
+
* @param {boolean} [multiline=false] - {boolean} Whether to enable multiline input (textarea)
|
|
2988
|
+
* @param {number} [rows] - {number} Number of rows for multiline input
|
|
2989
|
+
* @param {number} [minRows] - {number} Minimum number of rows for multiline input
|
|
2990
|
+
* @param {number} [maxRows] - {number} Maximum number of rows for multiline input
|
|
2991
|
+
* @param {ResizeOption} [resize='both'] - {ResizeOption} Resize option for textarea
|
|
2992
|
+
* @param {number} [maxLength] - {number} Maximum length of input
|
|
2993
|
+
* @param {number} [minLength] - {number} Minimum length of input
|
|
2994
|
+
* @param {string} [type='text'] - {string} Input type (text, email, url, etc.)
|
|
2995
|
+
* @param {string} [autoComplete='off'] - {string} Auto complete attribute
|
|
2996
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
2997
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
2998
|
+
* @param {Function} [onChange] - {Function} Callback fired when value changes
|
|
2999
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3000
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3001
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3002
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3003
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3004
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3005
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3006
|
+
* @param {TextTransformOption} [textTransform] - {TextTransformOption} Text transformation option
|
|
3007
|
+
*
|
|
3008
|
+
* @returns {JSX.Element} The Text Input Field component
|
|
3009
|
+
*
|
|
3010
|
+
* @usage
|
|
3011
|
+
* ```tsx
|
|
3012
|
+
* import TextInputField from "@react-solutions/inputs";
|
|
3013
|
+
* import { useState } from "react";
|
|
3014
|
+
*
|
|
3015
|
+
* function MyForm() {
|
|
3016
|
+
* const [name, setName] = useState("");
|
|
3017
|
+
*
|
|
3018
|
+
* return (
|
|
3019
|
+
* <TextInputField
|
|
3020
|
+
* name="fullName"
|
|
3021
|
+
* label="Full Name"
|
|
3022
|
+
* value={name}
|
|
3023
|
+
* textTransform="capitalize"
|
|
3024
|
+
* onChange={(e) => setName(e.target.value)}
|
|
3025
|
+
* />
|
|
3026
|
+
* );
|
|
3027
|
+
* }
|
|
3028
|
+
* ```
|
|
3029
|
+
*
|
|
3030
|
+
*/
|
|
1557
3031
|
declare const TextInputField: React__default.NamedExoticComponent<Omit<ITextInputFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1558
3032
|
|
|
3033
|
+
declare const NormalForm: () => react_jsx_runtime.JSX.Element;
|
|
3034
|
+
|
|
3035
|
+
declare const ReactHookForm: () => react_jsx_runtime.JSX.Element;
|
|
3036
|
+
|
|
1559
3037
|
/**
|
|
1560
3038
|
* Base option type for dropdown fields
|
|
1561
3039
|
*/
|
|
@@ -1638,7 +3116,7 @@ interface IFormInputDateFields<TFieldValues extends FieldValues = FieldValues> e
|
|
|
1638
3116
|
/** Whether to use 12-hour format (AM/PM) */
|
|
1639
3117
|
ampm?: boolean;
|
|
1640
3118
|
/** Views to show in picker */
|
|
1641
|
-
views?:
|
|
3119
|
+
views?: any[];
|
|
1642
3120
|
/** Whether to show AM/PM in clock */
|
|
1643
3121
|
ampmInClock?: boolean;
|
|
1644
3122
|
/** Whether to disable past dates */
|
|
@@ -1699,55 +3177,1637 @@ interface IFormInputCheckBoxGroupFields<TFieldValues extends FieldValues = Field
|
|
|
1699
3177
|
labelPlacement?: "end" | "start" | "top" | "bottom";
|
|
1700
3178
|
}
|
|
1701
3179
|
|
|
1702
|
-
|
|
3180
|
+
/**
|
|
3181
|
+
* Form Input Number Component
|
|
3182
|
+
*
|
|
3183
|
+
* A highly customizable numeric input field built on top of Material UI TextField and FormControl,
|
|
3184
|
+
* integrated with React Hook Form.
|
|
3185
|
+
*
|
|
3186
|
+
* @component
|
|
3187
|
+
* @version 2.x.x
|
|
3188
|
+
* @author call-max
|
|
3189
|
+
*
|
|
3190
|
+
* @description This component provides a numeric input with advanced formatting support for: phone numbers,
|
|
3191
|
+
* credit cards, currency, SSN, ZIP codes, percentages, decimals, and custom patterns.
|
|
3192
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3193
|
+
*
|
|
3194
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3195
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3196
|
+
* @param {string} [label] - {string} Label text for the number field
|
|
3197
|
+
* @param {string} [defaultValue=''] - {string} Default number value
|
|
3198
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3199
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3200
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3201
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3202
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3203
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3204
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3205
|
+
* @param {string} [pattern='integer'] - {string} Number pattern type or custom pattern string
|
|
3206
|
+
* @param {RegExp} [customPattern] - {RegExp} Custom regex pattern (for pattern="custom")
|
|
3207
|
+
* @param {(value: string) => string} [customFormatter] - {Function} Custom formatter function
|
|
3208
|
+
* @param {number} [min] - {number} Minimum value
|
|
3209
|
+
* @param {number} [max] - {number} Maximum value
|
|
3210
|
+
* @param {number} [step] - {number} Step value for number input
|
|
3211
|
+
* @param {boolean} [allowDecimals=true] - {boolean} Whether to allow decimal numbers
|
|
3212
|
+
* @param {number} [decimalPlaces=2] - {number} Number of decimal places allowed
|
|
3213
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
3214
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
3215
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3216
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3217
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3218
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3219
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3220
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3221
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3222
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3223
|
+
*
|
|
3224
|
+
* @returns {JSX.Element} The Form Input Number component
|
|
3225
|
+
*
|
|
3226
|
+
* @usage
|
|
3227
|
+
* ```tsx
|
|
3228
|
+
* import { FormInputNumberField } from "@react-solutions/inputs";
|
|
3229
|
+
* import { useForm } from "react-hook-form";
|
|
3230
|
+
*
|
|
3231
|
+
* function MyForm() {
|
|
3232
|
+
* const { control } = useForm();
|
|
3233
|
+
*
|
|
3234
|
+
* return (
|
|
3235
|
+
* <FormInputNumberField
|
|
3236
|
+
* name="phone"
|
|
3237
|
+
* label="Phone Number"
|
|
3238
|
+
* control={control}
|
|
3239
|
+
* pattern="phone"
|
|
3240
|
+
* />
|
|
3241
|
+
* );
|
|
3242
|
+
* }
|
|
3243
|
+
* ```
|
|
3244
|
+
*
|
|
3245
|
+
*/
|
|
3246
|
+
declare const FormInputNumberField: React__default.MemoExoticComponent<({ name, label, control, pattern, min, max, step, allowDecimals, decimalPlaces, defaultValue, onChange, ...props }: IFormInputNumberFields) => react_jsx_runtime.JSX.Element>;
|
|
1703
3247
|
|
|
1704
|
-
|
|
3248
|
+
/**
|
|
3249
|
+
* Form Input OTP Component
|
|
3250
|
+
*
|
|
3251
|
+
* A specialized multi-box input field for One-Time Passwords (OTP) built on top of Material UI TextField,
|
|
3252
|
+
* integrated with React Hook Form.
|
|
3253
|
+
*
|
|
3254
|
+
* @component
|
|
3255
|
+
* @version 2.x.x
|
|
3256
|
+
* @author call-max
|
|
3257
|
+
*
|
|
3258
|
+
* @description This component provides a series of individual input boxes for OTP entry with support for:
|
|
3259
|
+
* automatic focus shifting, backspace handling, pasting multiple digits, error handling, and completion callbacks.
|
|
3260
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3261
|
+
*
|
|
3262
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3263
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3264
|
+
* @param {string} [label] - {string} Label text for the OTP field
|
|
3265
|
+
* @param {string} [defaultValue=''] - {string} Default OTP value
|
|
3266
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3267
|
+
* @param {number} [length=6] - {number} Number of OTP input boxes
|
|
3268
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3269
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3270
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3271
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3272
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3273
|
+
* @param {number} [spacing=1] - {number} Spacing between OTP boxes
|
|
3274
|
+
* @param {boolean} [autoFocus=false] - {boolean} Whether to auto-focus first input on mount
|
|
3275
|
+
* @param {boolean} [autoSubmit=false] - {boolean} Whether to auto-submit when all boxes are filled
|
|
3276
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3277
|
+
* @param {(value: string) => void} [onComplete] - {Function} Callback fired when all boxes are filled
|
|
3278
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3279
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3280
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3281
|
+
* @param {React.CSSProperties} [containerStyles] - {React.CSSProperties} Custom styles for the OTP container
|
|
3282
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for individual OTP input boxes
|
|
3283
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3284
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3285
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3286
|
+
*
|
|
3287
|
+
* @returns {JSX.Element} The Form Input OTP component
|
|
3288
|
+
*
|
|
3289
|
+
* @usage
|
|
3290
|
+
* ```tsx
|
|
3291
|
+
* import { FormInputOTPField } from "@react-solutions/inputs";
|
|
3292
|
+
* import { useForm } from "react-hook-form";
|
|
3293
|
+
*
|
|
3294
|
+
* function MyForm() {
|
|
3295
|
+
* const { control } = useForm();
|
|
3296
|
+
*
|
|
3297
|
+
* return (
|
|
3298
|
+
* <FormInputOTPField
|
|
3299
|
+
* name="otpCode"
|
|
3300
|
+
* label="Enter Verification Code"
|
|
3301
|
+
* control={control}
|
|
3302
|
+
* length={6}
|
|
3303
|
+
* />
|
|
3304
|
+
* );
|
|
3305
|
+
* }
|
|
3306
|
+
* ```
|
|
3307
|
+
*
|
|
3308
|
+
*/
|
|
3309
|
+
declare const FormInputOTPField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1705
3310
|
|
|
3311
|
+
/**
|
|
3312
|
+
* Form Input Password Component
|
|
3313
|
+
*
|
|
3314
|
+
* A specialized password input field built on top of Material UI TextField with visibility toggle,
|
|
3315
|
+
* integrated with React Hook Form.
|
|
3316
|
+
*
|
|
3317
|
+
* @component
|
|
3318
|
+
* @version 2.x.x
|
|
3319
|
+
* @author call-max
|
|
3320
|
+
*
|
|
3321
|
+
* @description This component provides a secure password input with support for: visibility toggling,
|
|
3322
|
+
* password strength indicator, error handling, helper text, and length validation.
|
|
3323
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3324
|
+
*
|
|
3325
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3326
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3327
|
+
* @param {string} [label] - {string} Label text for the password field
|
|
3328
|
+
* @param {string} [defaultValue=''] - {string} Default password value
|
|
3329
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3330
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3331
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3332
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3333
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
3334
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3335
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3336
|
+
* @param {boolean} [showPasswordStrength=false] - {boolean} Whether to show password strength indicator
|
|
3337
|
+
* @param {number} [minLength] - {number} Minimum password length
|
|
3338
|
+
* @param {number} [maxLength] - {number} Maximum password length
|
|
3339
|
+
* @param {boolean} [defaultShowPassword=false] - {boolean} Whether to show password by default
|
|
3340
|
+
* @param {React.ReactNode} [visibilityIcon] - {React.ReactNode} Custom visibility icon
|
|
3341
|
+
* @param {React.ReactNode} [visibilityOffIcon] - {React.ReactNode} Custom visibility off icon
|
|
3342
|
+
* @param {IconButtonProps} [iconButtonProps] - {IconButtonProps} Custom icon button props
|
|
3343
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3344
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3345
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3346
|
+
* @param {Function} [onVisibilityToggle] - {Function} Callback when visibility toggles
|
|
3347
|
+
* @param {Function} [getPasswordStrength] - {Function} Custom strength calculation function
|
|
3348
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3349
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3350
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3351
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3352
|
+
*
|
|
3353
|
+
* @returns {JSX.Element} The Form Input Password component
|
|
3354
|
+
*
|
|
3355
|
+
* @usage
|
|
3356
|
+
* ```tsx
|
|
3357
|
+
* import { FormInputPasswordField } from "@react-solutions/inputs";
|
|
3358
|
+
* import { useForm } from "react-hook-form";
|
|
3359
|
+
*
|
|
3360
|
+
* function MyForm() {
|
|
3361
|
+
* const { control } = useForm();
|
|
3362
|
+
*
|
|
3363
|
+
* return (
|
|
3364
|
+
* <FormInputPasswordField
|
|
3365
|
+
* name="userPassword"
|
|
3366
|
+
* label="Password"
|
|
3367
|
+
* control={control}
|
|
3368
|
+
* showPasswordStrength
|
|
3369
|
+
* />
|
|
3370
|
+
* );
|
|
3371
|
+
* }
|
|
3372
|
+
* ```
|
|
3373
|
+
*
|
|
3374
|
+
*/
|
|
1706
3375
|
declare const FormInputPasswordField: React__default.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1707
3376
|
|
|
1708
|
-
|
|
3377
|
+
/**
|
|
3378
|
+
* Form Input Search Component
|
|
3379
|
+
*
|
|
3380
|
+
* A specialized search input field built on top of Material UI TextField with search and clear functionality,
|
|
3381
|
+
* integrated with React Hook Form.
|
|
3382
|
+
*
|
|
3383
|
+
* @component
|
|
3384
|
+
* @version 2.x.x
|
|
3385
|
+
* @author call-max
|
|
3386
|
+
*
|
|
3387
|
+
* @description This component provides a robust search interface with support for: debounced/throttled search callbacks,
|
|
3388
|
+
* clear button, search button, Enter key handling, error handling, and helper text.
|
|
3389
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3390
|
+
*
|
|
3391
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3392
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3393
|
+
* @param {string} [label] - {string} Label text for the search field
|
|
3394
|
+
* @param {string} [defaultValue=''] - {string} Default search value
|
|
3395
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3396
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3397
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3398
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3399
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3400
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3401
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3402
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button when input has value
|
|
3403
|
+
* @param {boolean} [showSearchButton=true] - {boolean} Whether to show search button icon
|
|
3404
|
+
* @param {React.ReactNode} [clearIcon] - {React.ReactNode} Custom clear icon
|
|
3405
|
+
* @param {React.ReactNode} [searchIcon] - {React.ReactNode} Custom search icon
|
|
3406
|
+
* @param {IconButtonProps} [clearButtonProps] - {IconButtonProps} Custom props for clear button
|
|
3407
|
+
* @param {IconButtonProps} [searchButtonProps] - {IconButtonProps} Custom props for search button
|
|
3408
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3409
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3410
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3411
|
+
* @param {(value: string) => void} [onSearch] - {Function} Callback fired for search (can be debounced/throttled)
|
|
3412
|
+
* @param {Function} [onClear] - {Function} Callback fired when clear button is clicked
|
|
3413
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3414
|
+
* @param {boolean} [enableDebounce=true] - {boolean} Enable debounce for search callback
|
|
3415
|
+
* @param {number} [debounceDelay=300] - {number} Debounce delay in milliseconds
|
|
3416
|
+
* @param {boolean} [enableThrottle=false] - {boolean} Enable throttle for search callback
|
|
3417
|
+
* @param {number} [throttleDelay=300] - {number} Throttle delay in milliseconds
|
|
3418
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3419
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3420
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3421
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3422
|
+
*
|
|
3423
|
+
* @returns {JSX.Element} The Form Input Search component
|
|
3424
|
+
*
|
|
3425
|
+
* @usage
|
|
3426
|
+
* ```tsx
|
|
3427
|
+
* import { FormInputSearchField } from "@react-solutions/inputs";
|
|
3428
|
+
* import { useForm } from "react-hook-form";
|
|
3429
|
+
*
|
|
3430
|
+
* function MyForm() {
|
|
3431
|
+
* const { control } = useForm();
|
|
3432
|
+
*
|
|
3433
|
+
* return (
|
|
3434
|
+
* <FormInputSearchField
|
|
3435
|
+
* name="userSearch"
|
|
3436
|
+
* label="Search Users"
|
|
3437
|
+
* control={control}
|
|
3438
|
+
* onSearch={(val) => console.log("Searching for:", val)}
|
|
3439
|
+
* />
|
|
3440
|
+
* );
|
|
3441
|
+
* }
|
|
3442
|
+
* ```
|
|
3443
|
+
*
|
|
3444
|
+
*/
|
|
3445
|
+
declare const FormInputSearchField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1709
3446
|
|
|
3447
|
+
/**
|
|
3448
|
+
* Form Input Tel Component
|
|
3449
|
+
*
|
|
3450
|
+
* A specialized telephone number input field built on top of Material UI TextField with pattern formatting,
|
|
3451
|
+
* integrated with React Hook Form.
|
|
3452
|
+
*
|
|
3453
|
+
* @component
|
|
3454
|
+
* @version 2.x.x
|
|
3455
|
+
* @author call-max
|
|
3456
|
+
*
|
|
3457
|
+
* @description This component provides a telephone input with support for: automatic pattern-based formatting,
|
|
3458
|
+
* country code prefix, digits-only value management, error handling, helper text, and standard text field behaviors.
|
|
3459
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3460
|
+
*
|
|
3461
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3462
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3463
|
+
* @param {string} [label] - {string} Label text for the tel field
|
|
3464
|
+
* @param {string} [defaultValue=''] - {string} Default tel value (digits only)
|
|
3465
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3466
|
+
* @param {string} [placeholder] - {string} Placeholder text (auto-generated from pattern if not provided)
|
|
3467
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3468
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3469
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3470
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3471
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3472
|
+
* @param {string} [pattern='XXXXXXXXXX'] - {string} Pattern string (e.g., 'XXX-XXXX' where X represents digits)
|
|
3473
|
+
* @param {number} [maxLength] - {number} Maximum digits allowed
|
|
3474
|
+
* @param {string} [countryCode='+1'] - {string} Country code prefix text
|
|
3475
|
+
* @param {boolean} [showCountryCode=false] - {boolean} Whether to show country code as start adornment
|
|
3476
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
3477
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
3478
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes (returns digits only)
|
|
3479
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3480
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3481
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3482
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3483
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3484
|
+
* @param {React.CSSProperties} [countryCodeStyles] - {React.CSSProperties} Custom styles for country code display
|
|
3485
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3486
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3487
|
+
*
|
|
3488
|
+
* @returns {JSX.Element} The Form Input Tel component
|
|
3489
|
+
*
|
|
3490
|
+
* @usage
|
|
3491
|
+
* ```tsx
|
|
3492
|
+
* import { FormInputTelField } from "@react-solutions/inputs";
|
|
3493
|
+
* import { useForm } from "react-hook-form";
|
|
3494
|
+
*
|
|
3495
|
+
* function MyForm() {
|
|
3496
|
+
* const { control } = useForm();
|
|
3497
|
+
*
|
|
3498
|
+
* return (
|
|
3499
|
+
* <FormInputTelField
|
|
3500
|
+
* name="phoneNumber"
|
|
3501
|
+
* label="Phone Number"
|
|
3502
|
+
* control={control}
|
|
3503
|
+
* pattern="XXX-XXX-XXXX"
|
|
3504
|
+
* showCountryCode
|
|
3505
|
+
* countryCode="+91"
|
|
3506
|
+
* />
|
|
3507
|
+
* );
|
|
3508
|
+
* }
|
|
3509
|
+
* ```
|
|
3510
|
+
*
|
|
3511
|
+
*/
|
|
1710
3512
|
declare const FormInputTelField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1711
3513
|
|
|
1712
|
-
|
|
3514
|
+
/**
|
|
3515
|
+
* Form Input Text Area Component
|
|
3516
|
+
*
|
|
3517
|
+
* A specialized multi-line text input field built on top of Material UI TextField,
|
|
3518
|
+
* integrated with React Hook Form.
|
|
3519
|
+
*
|
|
3520
|
+
* @component
|
|
3521
|
+
* @version 2.x.x
|
|
3522
|
+
* @author call-max
|
|
3523
|
+
*
|
|
3524
|
+
* @description This component provides a dedicated textarea interface with support for:
|
|
3525
|
+
* adjustable rows, dynamic resizing, error handling, helper text, and standard text field behaviors.
|
|
3526
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3527
|
+
*
|
|
3528
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3529
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3530
|
+
* @param {string} [label] - {string} Label text for the textarea
|
|
3531
|
+
* @param {string} [defaultValue=''] - {string} Default text value
|
|
3532
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3533
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3534
|
+
* @param {number} [rows] - {number} Fixed number of rows
|
|
3535
|
+
* @param {number} [minRows] - {number} Minimum number of rows
|
|
3536
|
+
* @param {number} [maxRows] - {number} Maximum number of rows
|
|
3537
|
+
* @param {ResizeOption} [resize='both'] - {ResizeOption} CSS resize property for the textarea
|
|
3538
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3539
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3540
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3541
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3542
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3543
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3544
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3545
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3546
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3547
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3548
|
+
*
|
|
3549
|
+
* @returns {JSX.Element} The Form Input Text Area component
|
|
3550
|
+
*
|
|
3551
|
+
* @usage
|
|
3552
|
+
* ```tsx
|
|
3553
|
+
* import { FormInputTextArea } from "@react-solutions/inputs";
|
|
3554
|
+
* import { useForm } from "react-hook-form";
|
|
3555
|
+
*
|
|
3556
|
+
* function MyForm() {
|
|
3557
|
+
* const { control } = useForm();
|
|
3558
|
+
*
|
|
3559
|
+
* return (
|
|
3560
|
+
* <FormInputTextArea
|
|
3561
|
+
* name="description"
|
|
3562
|
+
* label="Project Description"
|
|
3563
|
+
* control={control}
|
|
3564
|
+
* minRows={3}
|
|
3565
|
+
* maxRows={10}
|
|
3566
|
+
* />
|
|
3567
|
+
* );
|
|
3568
|
+
* }
|
|
3569
|
+
* ```
|
|
3570
|
+
*
|
|
3571
|
+
*/
|
|
3572
|
+
declare const FormInputTextArea: React.MemoExoticComponent<({ name, label, control, rows, minRows, maxRows, resize, defaultValue, onChange, ...props }: IFormInputTextAreaFields) => react_jsx_runtime.JSX.Element>;
|
|
1713
3573
|
|
|
1714
|
-
|
|
3574
|
+
/**
|
|
3575
|
+
* Form Input Text Component
|
|
3576
|
+
*
|
|
3577
|
+
* A versatile text input field built on top of Material UI TextField with support for various text types and transformations,
|
|
3578
|
+
* integrated with React Hook Form.
|
|
3579
|
+
*
|
|
3580
|
+
* @component
|
|
3581
|
+
* @version 2.x.x
|
|
3582
|
+
* @author call-max
|
|
3583
|
+
*
|
|
3584
|
+
* @description This component provides a flexible text input with support for: single-line and multiline (textarea),
|
|
3585
|
+
* text transformations (uppercase, lowercase, capitalize), error handling, helper text, custom adornments,
|
|
3586
|
+
* and standard text field behaviors. It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3587
|
+
*
|
|
3588
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3589
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3590
|
+
* @param {string} [label] - {string} Label text for the text field
|
|
3591
|
+
* @param {string} [defaultValue=''] - {string} Default text value
|
|
3592
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3593
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3594
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3595
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3596
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3597
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3598
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3599
|
+
* @param {boolean} [multiline=false] - {boolean} Whether to enable multiline input (textarea)
|
|
3600
|
+
* @param {number} [rows] - {number} Number of rows for multiline input
|
|
3601
|
+
* @param {number} [minRows] - {number} Minimum number of rows for multiline input
|
|
3602
|
+
* @param {number} [maxRows] - {number} Maximum number of rows for multiline input
|
|
3603
|
+
* @param {ResizeOption} [resize='both'] - {ResizeOption} Resize option for textarea
|
|
3604
|
+
* @param {number} [maxLength] - {number} Maximum length of input
|
|
3605
|
+
* @param {number} [minLength] - {number} Minimum length of input
|
|
3606
|
+
* @param {string} [type='text'] - {string} Input type (text, email, url, etc.)
|
|
3607
|
+
* @param {string} [autoComplete='off'] - {string} Auto complete attribute
|
|
3608
|
+
* @param {React.ReactNode} [startAdornment] - {React.ReactNode} Adornment before input
|
|
3609
|
+
* @param {React.ReactNode} [endAdornment] - {React.ReactNode} Adornment after input
|
|
3610
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3611
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3612
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3613
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3614
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the TextField
|
|
3615
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3616
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3617
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3618
|
+
* @param {TextTransformOption} [textTransform] - {TextTransformOption} Text transformation option
|
|
3619
|
+
*
|
|
3620
|
+
* @returns {JSX.Element} The Form Input Text component
|
|
3621
|
+
*
|
|
3622
|
+
* @usage
|
|
3623
|
+
* ```tsx
|
|
3624
|
+
* import { FormInputTextField } from "@react-solutions/inputs";
|
|
3625
|
+
* import { useForm } from "react-hook-form";
|
|
3626
|
+
*
|
|
3627
|
+
* function MyForm() {
|
|
3628
|
+
* const { control } = useForm();
|
|
3629
|
+
*
|
|
3630
|
+
* return (
|
|
3631
|
+
* <FormInputTextField
|
|
3632
|
+
* name="fullName"
|
|
3633
|
+
* label="Full Name"
|
|
3634
|
+
* control={control}
|
|
3635
|
+
* textTransform="capitalize"
|
|
3636
|
+
* />
|
|
3637
|
+
* );
|
|
3638
|
+
* }
|
|
3639
|
+
* ```
|
|
3640
|
+
*
|
|
3641
|
+
*/
|
|
3642
|
+
declare const FormInputTextField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1715
3643
|
|
|
1716
|
-
|
|
3644
|
+
/**
|
|
3645
|
+
* Form Input AutoComplete Component
|
|
3646
|
+
*
|
|
3647
|
+
* A highly customizable autocomplete search and dropdown field built on top of Material UI Autocomplete and TextField,
|
|
3648
|
+
* integrated with React Hook Form.
|
|
3649
|
+
*
|
|
3650
|
+
* @component
|
|
3651
|
+
* @version 2.x.x
|
|
3652
|
+
* @author call-max
|
|
3653
|
+
*
|
|
3654
|
+
* @description This component provides a searchable dropdown with support for: single/multiple selection, remote/local options,
|
|
3655
|
+
* error handling, helper text, custom option rendering, and standard autocomplete behaviors.
|
|
3656
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3657
|
+
*
|
|
3658
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3659
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3660
|
+
* @param {string} [label] - {string} Label text for the input field
|
|
3661
|
+
* @param {any} [defaultValue=null] - {any} Default selected value(s)
|
|
3662
|
+
* @param {any[]} options - {any[]} Array of options to display in dropdown
|
|
3663
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3664
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3665
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3666
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3667
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
3668
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3669
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3670
|
+
* @param {Function} [getOptionLabel] - {Function} Custom function to get option label
|
|
3671
|
+
* @param {Function} [isOptionEqualToValue] - {Function} Custom function to check option equality
|
|
3672
|
+
* @param {Function} [renderOption] - {Function} Custom render function for options
|
|
3673
|
+
* @param {(value: any) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3674
|
+
* @param {Function} [onInputChange] - {Function} Callback fired when input value changes
|
|
3675
|
+
* @param {Function} [onOpen] - {Function} Callback fired when popup opens
|
|
3676
|
+
* @param {Function} [onClose] - {Function} Callback fired when popup closes
|
|
3677
|
+
* @param {React.ReactNode} [popupIcon] - {React.ReactNode} Custom icon for popup indicator
|
|
3678
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
3679
|
+
* @param {AutocompleteProps['sx']} [autocompleteStyles] - {AutocompleteProps['sx']} Custom styles for the Autocomplete component
|
|
3680
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3681
|
+
* @param {boolean} [loading=false] - {boolean} Whether to show loading state
|
|
3682
|
+
* @param {React.ReactNode} [loadingText='Loading...'] - {React.ReactNode} Text to show when loading
|
|
3683
|
+
* @param {React.ReactNode} [noOptionsText='No options'] - {React.ReactNode} Text to show when no options available
|
|
3684
|
+
* @param {Function} [filterOptions] - {Function} Custom filter options function
|
|
3685
|
+
* @param {boolean} [autoHighlight=true] - {boolean} Whether to highlight the first option
|
|
3686
|
+
* @param {boolean} [autoSelect=false] - {boolean} Whether to select the first option on highlight
|
|
3687
|
+
* @param {boolean} [disablePortal=false] - {boolean} Whether to disable portal rendering
|
|
3688
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3689
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3690
|
+
*
|
|
3691
|
+
* @returns {JSX.Element} The Form Input AutoComplete component
|
|
3692
|
+
*
|
|
3693
|
+
* @usage
|
|
3694
|
+
* ```tsx
|
|
3695
|
+
* import { FormInputAutoComplete } from "@react-solutions/inputs";
|
|
3696
|
+
* import { useForm } from "react-hook-form";
|
|
3697
|
+
*
|
|
3698
|
+
* function MyForm() {
|
|
3699
|
+
* const { control } = useForm();
|
|
3700
|
+
* const options = [{ name: "Option 1", value: 1 }, { name: "Option 2", value: 2 }];
|
|
3701
|
+
*
|
|
3702
|
+
* return (
|
|
3703
|
+
* <FormInputAutoComplete
|
|
3704
|
+
* name="myAutocomplete"
|
|
3705
|
+
* label="Select Option"
|
|
3706
|
+
* control={control}
|
|
3707
|
+
* options={options}
|
|
3708
|
+
* />
|
|
3709
|
+
* );
|
|
3710
|
+
* }
|
|
3711
|
+
* ```
|
|
3712
|
+
*
|
|
3713
|
+
*/
|
|
3714
|
+
declare const FormInputAutoComplete: React.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1717
3715
|
|
|
1718
|
-
|
|
3716
|
+
/**
|
|
3717
|
+
* Form Input Color Picker Component
|
|
3718
|
+
*
|
|
3719
|
+
* A customizable color picker field built on top of Material UI TextField and native color input,
|
|
3720
|
+
* integrated with React Hook Form.
|
|
3721
|
+
*
|
|
3722
|
+
* @component
|
|
3723
|
+
* @version 2.x.x
|
|
3724
|
+
* @author call-max
|
|
3725
|
+
*
|
|
3726
|
+
* @description This component provides a color selection input with support for: hex values, color preview swatch,
|
|
3727
|
+
* native color picker integration, error handling, helper text, and standard text field behaviors.
|
|
3728
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3729
|
+
*
|
|
3730
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3731
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3732
|
+
* @param {string} [label] - {string} Label text for the color picker field
|
|
3733
|
+
* @param {string} [defaultValue='#000000'] - {string} Default color value (hex string)
|
|
3734
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3735
|
+
* @param {string} [placeholder='#000000'] - {string} Placeholder text
|
|
3736
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3737
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3738
|
+
* @param {TextFieldProps['color']|'primary'} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
3739
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3740
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3741
|
+
* @param {string} [format='hex'] - {string} Color format (currently hex supported)
|
|
3742
|
+
* @param {boolean} [showPreview=true] - {boolean} Whether to show color preview swatch
|
|
3743
|
+
* @param {(value: string) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3744
|
+
* @param {Function} [onFocus] - {Function} Callback when field receives focus
|
|
3745
|
+
* @param {Function} [onBlur] - {Function} Callback when field loses focus
|
|
3746
|
+
* @param {Function} [onEnterPress] - {Function} Callback fired on Enter key press
|
|
3747
|
+
* @param {React.CSSProperties} [previewStyles] - {React.CSSProperties} Custom styles for the color preview swatch
|
|
3748
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3749
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for TextField
|
|
3750
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3751
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3752
|
+
*
|
|
3753
|
+
* @returns {JSX.Element} The Form Input Color Picker component
|
|
3754
|
+
*
|
|
3755
|
+
* @usage
|
|
3756
|
+
* ```tsx
|
|
3757
|
+
* import { FormInputColorPicker } from "@react-solutions/inputs";
|
|
3758
|
+
* import { useForm } from "react-hook-form";
|
|
3759
|
+
*
|
|
3760
|
+
* function MyForm() {
|
|
3761
|
+
* const { control } = useForm();
|
|
3762
|
+
*
|
|
3763
|
+
* return (
|
|
3764
|
+
* <FormInputColorPicker
|
|
3765
|
+
* name="themeColor"
|
|
3766
|
+
* label="Theme Color"
|
|
3767
|
+
* control={control}
|
|
3768
|
+
* defaultValue="#3f51b5"
|
|
3769
|
+
* />
|
|
3770
|
+
* );
|
|
3771
|
+
* }
|
|
3772
|
+
* ```
|
|
3773
|
+
*
|
|
3774
|
+
*/
|
|
3775
|
+
declare const FormInputColorPicker: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1719
3776
|
|
|
1720
|
-
|
|
3777
|
+
/**
|
|
3778
|
+
* Form Input File Upload Component
|
|
3779
|
+
*
|
|
3780
|
+
* A versatile file upload field built on top of Material UI TextField and native file input,
|
|
3781
|
+
* integrated with React Hook Form.
|
|
3782
|
+
*
|
|
3783
|
+
* @component
|
|
3784
|
+
* @version 2.x.x
|
|
3785
|
+
* @author call-max
|
|
3786
|
+
*
|
|
3787
|
+
* @description This component provides a file selection interface with support for: single/multiple files,
|
|
3788
|
+
* drag and drop, file validation (size, type), file preview, clear functionality, and standard form field behaviors.
|
|
3789
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3790
|
+
*
|
|
3791
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3792
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3793
|
+
* @param {string} [label] - {string} Label text for the file upload field
|
|
3794
|
+
* @param {any} [defaultValue=null] - {any} Default selected file(s)
|
|
3795
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3796
|
+
* @param {string} [accept] - {string} File types to accept (e.g., "image/*", ".pdf")
|
|
3797
|
+
* @param {boolean} [multiple=false] - {boolean} Whether to allow multiple file selection
|
|
3798
|
+
* @param {number} [maxSize] - {number} Maximum file size in bytes
|
|
3799
|
+
* @param {number} [minSize] - {number} Minimum file size in bytes
|
|
3800
|
+
* @param {string[]} [allowedTypes] - {string[]} Allowed file types (MIME types or extensions)
|
|
3801
|
+
* @param {boolean} [showPreview=true] - {boolean} Whether to show file name preview
|
|
3802
|
+
* @param {boolean} [enableDragDrop=false] - {boolean} Whether to enable drag and drop
|
|
3803
|
+
* @param {string} [placeholder='No file chosen'] - {string} Placeholder text
|
|
3804
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3805
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3806
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
3807
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3808
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3809
|
+
* @param {string} [buttonText='Upload'] - {string} Upload button text
|
|
3810
|
+
* @param {ButtonProps['variant']} [buttonVariant='contained'] - {ButtonProps['variant']} Upload button variant
|
|
3811
|
+
* @param {ButtonProps['color']} [buttonColor='primary'] - {ButtonProps['color']} Upload button color
|
|
3812
|
+
* @param {ButtonProps['size']} [buttonSize] - {ButtonProps['size']} Upload button size
|
|
3813
|
+
* @param {React.ReactNode} [uploadIcon] - {React.ReactNode} Custom upload icon
|
|
3814
|
+
* @param {(file: File | File[] | undefined) => void} [onChange] - {Function} Optional additional callback fired when files change
|
|
3815
|
+
* @param {Function} [onFileSelect] - {Function} Callback fired when file is selected
|
|
3816
|
+
* @param {Function} [onFileRemove] - {Function} Callback fired when file is removed
|
|
3817
|
+
* @param {(error: string) => void} [onValidationError] - {Function} Callback fired on validation error
|
|
3818
|
+
* @param {(files: FileList) => void} [onDrop] - {Function} Callback fired when file is dropped
|
|
3819
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
3820
|
+
* @param {ButtonProps['sx']} [buttonStyles] - {ButtonProps['sx']} Custom styles for the Upload button
|
|
3821
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3822
|
+
* @param {React.CSSProperties} [containerStyles] - {React.CSSProperties} Custom styles for the container
|
|
3823
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3824
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3825
|
+
*
|
|
3826
|
+
* @returns {JSX.Element} The Form Input File Upload component
|
|
3827
|
+
*
|
|
3828
|
+
* @usage
|
|
3829
|
+
* ```tsx
|
|
3830
|
+
* import { FormInputFileUpload } from "@react-solutions/inputs";
|
|
3831
|
+
* import { useForm } from "react-hook-form";
|
|
3832
|
+
*
|
|
3833
|
+
* function MyForm() {
|
|
3834
|
+
* const { control } = useForm();
|
|
3835
|
+
*
|
|
3836
|
+
* return (
|
|
3837
|
+
* <FormInputFileUpload
|
|
3838
|
+
* name="resume"
|
|
3839
|
+
* label="Upload Resume"
|
|
3840
|
+
* control={control}
|
|
3841
|
+
* accept=".pdf,.doc,.docx"
|
|
3842
|
+
* enableDragDrop
|
|
3843
|
+
* />
|
|
3844
|
+
* );
|
|
3845
|
+
* }
|
|
3846
|
+
* ```
|
|
3847
|
+
*
|
|
3848
|
+
*/
|
|
3849
|
+
declare const FormInputFileUpload: React__default.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1721
3850
|
|
|
3851
|
+
/**
|
|
3852
|
+
* Form Input Multi AutoComplete Component
|
|
3853
|
+
*
|
|
3854
|
+
* A highly customizable multi-select autocomplete field built on top of Material UI Autocomplete and TextField,
|
|
3855
|
+
* integrated with React Hook Form.
|
|
3856
|
+
*
|
|
3857
|
+
* @component
|
|
3858
|
+
* @version 2.x.x
|
|
3859
|
+
* @author call-max
|
|
3860
|
+
*
|
|
3861
|
+
* @description This component provides a searchable multi-select dropdown with support for: remote/local options,
|
|
3862
|
+
* error handling, helper text, custom option rendering, and standard autocomplete behaviors.
|
|
3863
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3864
|
+
*
|
|
3865
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3866
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3867
|
+
* @param {string} [label] - {string} Label text for the input field
|
|
3868
|
+
* @param {any[]} [defaultValue=[]] - {any[]} Default selected values
|
|
3869
|
+
* @param {any[]} options - {any[]} Array of options to display in dropdown
|
|
3870
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3871
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
3872
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
3873
|
+
* @param {TextFieldProps['size']} [size] - {TextFieldProps['size']} TextField size
|
|
3874
|
+
* @param {TextFieldProps['color']} [color] - {TextFieldProps['color']} TextField color
|
|
3875
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3876
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3877
|
+
* @param {Function} [getOptionLabel] - {Function} Custom function to get option label
|
|
3878
|
+
* @param {Function} [isOptionEqualToValue] - {Function} Custom function to check option equality
|
|
3879
|
+
* @param {Function} [renderOption] - {Function} Custom render function for options
|
|
3880
|
+
* @param {(value: any[]) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3881
|
+
* @param {Function} [onInputChange] - {Function} Callback fired when input value changes
|
|
3882
|
+
* @param {Function} [onOpen] - {Function} Callback fired when popup opens
|
|
3883
|
+
* @param {Function} [onClose] - {Function} Callback fired when popup closes
|
|
3884
|
+
* @param {React.ReactNode} [popupIcon] - {React.ReactNode} Custom icon for popup indicator
|
|
3885
|
+
* @param {TextFieldProps['sx']} [inputStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
3886
|
+
* @param {AutocompleteProps['sx']} [autocompleteStyles] - {AutocompleteProps['sx']} Custom styles for the Autocomplete component
|
|
3887
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3888
|
+
* @param {boolean} [loading=false] - {boolean} Whether to show loading state
|
|
3889
|
+
* @param {React.ReactNode} [loadingText='Loading...'] - {React.ReactNode} Text to show when loading
|
|
3890
|
+
* @param {React.ReactNode} [noOptionsText='No options'] - {React.ReactNode} Text to show when no options available
|
|
3891
|
+
* @param {Function} [filterOptions] - {Function} Custom filter options function
|
|
3892
|
+
* @param {boolean} [autoHighlight=true] - {boolean} Whether to highlight the first option
|
|
3893
|
+
* @param {boolean} [autoSelect=false] - {boolean} Whether to select the first option on highlight
|
|
3894
|
+
* @param {boolean} [disablePortal=false] - {boolean} Whether to disable portal rendering
|
|
3895
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3896
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3897
|
+
*
|
|
3898
|
+
* @returns {JSX.Element} The Form Input Multi AutoComplete component
|
|
3899
|
+
*
|
|
3900
|
+
* @usage
|
|
3901
|
+
* ```tsx
|
|
3902
|
+
* import { FormInputMultiAutoComplete } from "@react-solutions/inputs";
|
|
3903
|
+
* import { useForm } from "react-hook-form";
|
|
3904
|
+
*
|
|
3905
|
+
* function MyForm() {
|
|
3906
|
+
* const { control } = useForm();
|
|
3907
|
+
* const options = [{ name: "Red", value: "red" }, { name: "Blue", value: "blue" }];
|
|
3908
|
+
*
|
|
3909
|
+
* return (
|
|
3910
|
+
* <FormInputMultiAutoComplete
|
|
3911
|
+
* name="colors"
|
|
3912
|
+
* label="Select Colors"
|
|
3913
|
+
* control={control}
|
|
3914
|
+
* options={options}
|
|
3915
|
+
* />
|
|
3916
|
+
* );
|
|
3917
|
+
* }
|
|
3918
|
+
* ```
|
|
3919
|
+
*
|
|
3920
|
+
*/
|
|
1722
3921
|
declare const FormInputMultiAutoComplete: React__default.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1723
3922
|
|
|
1724
|
-
|
|
3923
|
+
/**
|
|
3924
|
+
* Form Input Multi Select Component
|
|
3925
|
+
*
|
|
3926
|
+
* A customizable multi-select dropdown field built on top of Material UI Select and FormControl,
|
|
3927
|
+
* integrated with React Hook Form.
|
|
3928
|
+
*
|
|
3929
|
+
* @component
|
|
3930
|
+
* @version 2.x.x
|
|
3931
|
+
* @author call-max
|
|
3932
|
+
*
|
|
3933
|
+
* @description This component provides a flexible multi-select dropdown with support for:
|
|
3934
|
+
* error handling, helper text, custom menu item rendering, and standard select behaviors.
|
|
3935
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
3936
|
+
*
|
|
3937
|
+
* @param {string} name - {string} Unique name for form identification
|
|
3938
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
3939
|
+
* @param {string} [label] - {string} Label text for the select field
|
|
3940
|
+
* @param {any[]} [defaultValue=[]] - {any[]} Default selected values
|
|
3941
|
+
* @param {Option[]} options - {Option[]} Array of options to display in dropdown
|
|
3942
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
3943
|
+
* @param {SelectProps['variant']} [variant='outlined'] - {SelectProps['variant']} Select variant
|
|
3944
|
+
* @param {SelectProps['size']} [size] - {SelectProps['size']} Select size
|
|
3945
|
+
* @param {SelectProps['color']} [color] - {SelectProps['color']} Select color
|
|
3946
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
3947
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
3948
|
+
* @param {boolean} [multiple=true] - {boolean} Whether to allow multiple selections
|
|
3949
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for dropdown indicator
|
|
3950
|
+
* @param {SelectProps['renderValue']} [renderValue] - {Function} Custom render function for selected value(s)
|
|
3951
|
+
* @param {Function} [renderMenuItem] - {Function} Custom render function for menu items
|
|
3952
|
+
* @param {MenuItemProps['sx'] | Function} [menuItemStyles] - {Object|Function} Custom styles for MenuItem
|
|
3953
|
+
* @param {SelectProps['sx']} [selectStyles] - {SelectProps['sx']} Custom styles for the Select component
|
|
3954
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
3955
|
+
* @param {InputLabelProps['sx']} [labelStyles] - {InputLabelProps['sx']} Custom styles for InputLabel
|
|
3956
|
+
* @param {(value: any) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
3957
|
+
* @param {Function} [onOpen] - {Function} Callback fired when menu opens
|
|
3958
|
+
* @param {Function} [onClose] - {Function} Callback fired when menu closes
|
|
3959
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
3960
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
3961
|
+
* @param {boolean} [displayEmpty=false] - {boolean} Whether to display empty value
|
|
3962
|
+
* @param {boolean} [autoWidth=false] - {boolean} Whether the menu should have auto width
|
|
3963
|
+
* @param {boolean} [native=false] - {boolean} Whether to use native select element
|
|
3964
|
+
* @param {SelectProps['MenuProps']} [MenuProps] - {Object} Custom Menu props
|
|
3965
|
+
*
|
|
3966
|
+
* @returns {JSX.Element} The Form Input Multi Select component
|
|
3967
|
+
*
|
|
3968
|
+
* @usage
|
|
3969
|
+
* ```tsx
|
|
3970
|
+
* import { FormInputMultiSelect } from "@react-solutions/inputs";
|
|
3971
|
+
* import { useForm } from "react-hook-form";
|
|
3972
|
+
*
|
|
3973
|
+
* function MyForm() {
|
|
3974
|
+
* const { control } = useForm();
|
|
3975
|
+
* const options = [
|
|
3976
|
+
* { value: "1", name: "Option 1" },
|
|
3977
|
+
* { value: "2", name: "Option 2" }
|
|
3978
|
+
* ];
|
|
3979
|
+
*
|
|
3980
|
+
* return (
|
|
3981
|
+
* <FormInputMultiSelect
|
|
3982
|
+
* name="mySelect"
|
|
3983
|
+
* label="Select Options"
|
|
3984
|
+
* control={control}
|
|
3985
|
+
* options={options}
|
|
3986
|
+
* />
|
|
3987
|
+
* );
|
|
3988
|
+
* }
|
|
3989
|
+
* ```
|
|
3990
|
+
*
|
|
3991
|
+
*/
|
|
3992
|
+
declare const FormInputMultiSelect: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1725
3993
|
|
|
1726
|
-
|
|
3994
|
+
/**
|
|
3995
|
+
* Form Input Select Component
|
|
3996
|
+
*
|
|
3997
|
+
* A customizable dropdown selection field built on top of Material UI Select and FormControl,
|
|
3998
|
+
* integrated with React Hook Form.
|
|
3999
|
+
*
|
|
4000
|
+
* @component
|
|
4001
|
+
* @version 2.x.x
|
|
4002
|
+
* @author call-max
|
|
4003
|
+
*
|
|
4004
|
+
* @description This component provides a flexible dropdown with support for: single selection,
|
|
4005
|
+
* error handling, helper text, custom menu item rendering, and standard select behaviors.
|
|
4006
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4007
|
+
*
|
|
4008
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4009
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4010
|
+
* @param {string} [label] - {string} Label text for the select field
|
|
4011
|
+
* @param {any} [defaultValue=''] - {any} Default selected value
|
|
4012
|
+
* @param {Option[]} options - {Option[]} Array of options to display in dropdown
|
|
4013
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4014
|
+
* @param {SelectProps['variant']} [variant='outlined'] - {SelectProps['variant']} Select variant
|
|
4015
|
+
* @param {SelectProps['size']} [size] - {SelectProps['size']} Select size
|
|
4016
|
+
* @param {SelectProps['color']} [color] - {SelectProps['color']} Select color
|
|
4017
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
4018
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4019
|
+
* @param {boolean} [multiple=false] - {boolean} Whether to allow multiple selections
|
|
4020
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for dropdown indicator
|
|
4021
|
+
* @param {SelectProps['renderValue']} [renderValue] - {Function} Custom render function for selected value(s)
|
|
4022
|
+
* @param {Function} [renderMenuItem] - {Function} Custom render function for menu items
|
|
4023
|
+
* @param {MenuItemProps['sx'] | Function} [menuItemStyles] - {Object|Function} Custom styles for MenuItem
|
|
4024
|
+
* @param {SelectProps['sx']} [selectStyles] - {SelectProps['sx']} Custom styles for the Select component
|
|
4025
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4026
|
+
* @param {InputLabelProps['sx']} [labelStyles] - {InputLabelProps['sx']} Custom styles for InputLabel
|
|
4027
|
+
* @param {(value: any) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4028
|
+
* @param {Function} [onOpen] - {Function} Callback fired when menu opens
|
|
4029
|
+
* @param {Function} [onClose] - {Function} Callback fired when menu closes
|
|
4030
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI v7
|
|
4031
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI v7
|
|
4032
|
+
* @param {boolean} [displayEmpty=false] - {boolean} Whether to display empty value
|
|
4033
|
+
* @param {boolean} [autoWidth=false] - {boolean} Whether the menu should have auto width
|
|
4034
|
+
* @param {boolean} [native=false] - {boolean} Whether to use native select element
|
|
4035
|
+
* @param {SelectProps['MenuProps']} [MenuProps] - {Object} Custom Menu props
|
|
4036
|
+
*
|
|
4037
|
+
* @returns {JSX.Element} The Form Input Select component
|
|
4038
|
+
*
|
|
4039
|
+
* @usage
|
|
4040
|
+
* ```tsx
|
|
4041
|
+
* import { FormInputSelect } from "@react-solutions/inputs";
|
|
4042
|
+
* import { useForm } from "react-hook-form";
|
|
4043
|
+
*
|
|
4044
|
+
* function MyForm() {
|
|
4045
|
+
* const { control } = useForm();
|
|
4046
|
+
* const options = [
|
|
4047
|
+
* { value: "1", name: "Option 1" },
|
|
4048
|
+
* { value: "2", name: "Option 2" }
|
|
4049
|
+
* ];
|
|
4050
|
+
*
|
|
4051
|
+
* return (
|
|
4052
|
+
* <FormInputSelect
|
|
4053
|
+
* name="category"
|
|
4054
|
+
* label="Select Category"
|
|
4055
|
+
* control={control}
|
|
4056
|
+
* options={options}
|
|
4057
|
+
* />
|
|
4058
|
+
* );
|
|
4059
|
+
* }
|
|
4060
|
+
* ```
|
|
4061
|
+
*
|
|
4062
|
+
*/
|
|
4063
|
+
declare const FormInputSelect: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1727
4064
|
|
|
1728
|
-
|
|
4065
|
+
/**
|
|
4066
|
+
* Form Input Date Calendar Component
|
|
4067
|
+
*
|
|
4068
|
+
* A customizable inline date calendar field built on top of Material UI X DateCalendar and FormControl,
|
|
4069
|
+
* integrated with React Hook Form.
|
|
4070
|
+
*
|
|
4071
|
+
* @component
|
|
4072
|
+
* @version 2.x.x
|
|
4073
|
+
* @author call-max
|
|
4074
|
+
*
|
|
4075
|
+
* @description This component provides an inline calendar for date selection with support for: error handling, helper text,
|
|
4076
|
+
* date constraints (min/max), disabling specific dates/months/years, and standard calendar behaviors.
|
|
4077
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4078
|
+
*
|
|
4079
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4080
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4081
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the calendar
|
|
4082
|
+
* @param {Date | null} [defaultValue=null] - {Date | null} Default date value
|
|
4083
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4084
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4085
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4086
|
+
* @param {Date} [minDate] - {Date} Minimum selectable date
|
|
4087
|
+
* @param {Date} [maxDate] - {Date} Maximum selectable date
|
|
4088
|
+
* @param {(date: Date) => boolean} [shouldDisableDate] - {Function} Function to disable specific dates
|
|
4089
|
+
* @param {(month: Date) => boolean} [shouldDisableMonth] - {Function} Function to disable specific months
|
|
4090
|
+
* @param {(year: Date) => boolean} [shouldDisableYear] - {Function} Function to disable specific years
|
|
4091
|
+
* @param {DateCalendarProps['sx']} [calendarStyles] - {DateCalendarProps['sx']} Custom styles for the DateCalendar component
|
|
4092
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4093
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4094
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
4095
|
+
* @param {(value: Date | null) => void} [onChange] - {Function} Optional additional callback fired when the date changes
|
|
4096
|
+
* @param {(view: 'day' | 'month' | 'year') => void} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
4097
|
+
* @param {(month: Date) => void} [onMonthChange] - {Function} Callback fired when a month change is requested
|
|
4098
|
+
* @param {(year: Date) => void} [onYearChange] - {Function} Callback fired when a year change is requested
|
|
4099
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
4100
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
4101
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
4102
|
+
* @param {boolean} [showDaysOutsideCurrentMonth=false] - {boolean} Whether to show days outside current month
|
|
4103
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past dates
|
|
4104
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future dates
|
|
4105
|
+
* @param {Date} [referenceDate] - {Date} Reference date for the calendar
|
|
4106
|
+
* @param {'day' | 'month' | 'year'} [view] - {'day' | 'month' | 'year'} Controlled view state
|
|
4107
|
+
*
|
|
4108
|
+
* @returns {JSX.Element} The Form Input Date Calendar component
|
|
4109
|
+
*
|
|
4110
|
+
* @usage
|
|
4111
|
+
* ```tsx
|
|
4112
|
+
* import { FormInputCalendar } from "@react-solutions/inputs";
|
|
4113
|
+
* import { useForm } from "react-hook-form";
|
|
4114
|
+
*
|
|
4115
|
+
* function MyForm() {
|
|
4116
|
+
* const { control } = useForm();
|
|
4117
|
+
*
|
|
4118
|
+
* return (
|
|
4119
|
+
* <FormInputCalendar
|
|
4120
|
+
* name="myCalendar"
|
|
4121
|
+
* label="Select Date"
|
|
4122
|
+
* control={control}
|
|
4123
|
+
* />
|
|
4124
|
+
* );
|
|
4125
|
+
* }
|
|
4126
|
+
* ```
|
|
4127
|
+
*
|
|
4128
|
+
*/
|
|
4129
|
+
declare const FormInputCalendar: React__default.MemoExoticComponent<({ name, label, control, readOnly, disabled, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1729
4130
|
|
|
1730
|
-
|
|
4131
|
+
/**
|
|
4132
|
+
* Form Input Date Picker Component
|
|
4133
|
+
*
|
|
4134
|
+
* A customizable date picker field built on top of Material UI X DatePicker and FormControl,
|
|
4135
|
+
* integrated with React Hook Form.
|
|
4136
|
+
*
|
|
4137
|
+
* @component
|
|
4138
|
+
* @version 2.x.x
|
|
4139
|
+
* @author call-max
|
|
4140
|
+
*
|
|
4141
|
+
* @description This component provides a flexible date picker with support for: error handling, helper text, clear button,
|
|
4142
|
+
* custom formatting, date constraints (min/max), and standard date picker behaviors.
|
|
4143
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4144
|
+
*
|
|
4145
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4146
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4147
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the date picker
|
|
4148
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as a separate title above the picker
|
|
4149
|
+
* @param {Date | null} [defaultValue=null] - {Date | null} Default date value
|
|
4150
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4151
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
4152
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4153
|
+
* @param {Date} [minDate] - {Date} Minimum selectable date
|
|
4154
|
+
* @param {Date} [maxDate] - {Date} Maximum selectable date
|
|
4155
|
+
* @param {(date: Date) => boolean} [shouldDisableDate] - {Function} Function to disable specific dates
|
|
4156
|
+
* @param {(month: Date) => boolean} [shouldDisableMonth] - {Function} Function to disable specific months
|
|
4157
|
+
* @param {(year: Date) => boolean} [shouldDisableYear] - {Function} Function to disable specific years
|
|
4158
|
+
* @param {TextFieldProps['size']} [size='medium'] - {TextFieldProps['size']} TextField size
|
|
4159
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
4160
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
4161
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
4162
|
+
* @param {boolean} [readOnly=false] - {boolean} Whether the field is read-only
|
|
4163
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button
|
|
4164
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past dates
|
|
4165
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future dates
|
|
4166
|
+
* @param {Date} [referenceDate] - {Date} Reference date for the calendar
|
|
4167
|
+
* @param {'day' | 'month' | 'year'} [view] - {'day' | 'month' | 'year'} Controlled view state
|
|
4168
|
+
* @param {string} [format] - {string} Format for displaying the date
|
|
4169
|
+
* @param {'day' | 'month' | 'year'} [openTo='day'] - {string} Whether to open the calendar on focus
|
|
4170
|
+
* @param {DatePickerProps['sx']} [pickerStyles] - {DatePickerProps['sx']} Custom styles for the DatePicker component
|
|
4171
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4172
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4173
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
4174
|
+
* @param {TextFieldProps['sx']} [textFieldStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
4175
|
+
* @param {(value: Date | null) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4176
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onFocus] - {Function} Callback when field receives focus
|
|
4177
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onBlur] - {Function} Callback when field loses focus
|
|
4178
|
+
* @param {Function} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
4179
|
+
* @param {Function} [onMonthChange] - {Function} Callback fired when a month change is requested
|
|
4180
|
+
* @param {Function} [onYearChange] - {Function} Callback fired when a year change is requested
|
|
4181
|
+
* @param {Function} [onOpen] - {Function} Callback fired when the calendar opens
|
|
4182
|
+
* @param {Function} [onClose] - {Function} Callback fired when the calendar closes
|
|
4183
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
4184
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
4185
|
+
* @param {typeof AdapterDateFns} [dateAdapter=AdapterDateFns] - {Type} Date adapter to use
|
|
4186
|
+
* @param {boolean} [reduceAnimations=false] - {boolean} Whether to reduce animations
|
|
4187
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus the input
|
|
4188
|
+
*
|
|
4189
|
+
* @returns {JSX.Element} The Form Input Date Picker component
|
|
4190
|
+
*
|
|
4191
|
+
* @usage
|
|
4192
|
+
* ```tsx
|
|
4193
|
+
* import { FormInputDatePicker } from "@react-solutions/inputs";
|
|
4194
|
+
* import { useForm } from "react-hook-form";
|
|
4195
|
+
*
|
|
4196
|
+
* function MyForm() {
|
|
4197
|
+
* const { control } = useForm();
|
|
4198
|
+
*
|
|
4199
|
+
* return (
|
|
4200
|
+
* <FormInputDatePicker
|
|
4201
|
+
* name="birthday"
|
|
4202
|
+
* label="Birthday"
|
|
4203
|
+
* control={control}
|
|
4204
|
+
* showClearButton
|
|
4205
|
+
* />
|
|
4206
|
+
* );
|
|
4207
|
+
* }
|
|
4208
|
+
* ```
|
|
4209
|
+
*
|
|
4210
|
+
*/
|
|
4211
|
+
declare const FormInputDatePicker: React__default.MemoExoticComponent<({ name, label, control, size, readOnly, shouldDisableDate, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1731
4212
|
|
|
4213
|
+
/**
|
|
4214
|
+
* Form Input Time Clock Component
|
|
4215
|
+
*
|
|
4216
|
+
* A customizable inline time clock field built on top of Material UI X TimeClock and FormControl,
|
|
4217
|
+
* integrated with React Hook Form.
|
|
4218
|
+
*
|
|
4219
|
+
* @component
|
|
4220
|
+
* @version 2.x.x
|
|
4221
|
+
* @author call-max
|
|
4222
|
+
*
|
|
4223
|
+
* @description This component provides an inline clock for time selection with support for: error handling, helper text,
|
|
4224
|
+
* AM/PM support, time constraints (min/max), and standard clock behaviors.
|
|
4225
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4226
|
+
*
|
|
4227
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4228
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4229
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the time clock
|
|
4230
|
+
* @param {Date | null} [defaultValue=null] - {Date | null} Default time value
|
|
4231
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4232
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4233
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4234
|
+
* @param {string[]} [views=['hours', 'minutes']] - {string[]} Available views (hours, minutes, seconds)
|
|
4235
|
+
* @param {boolean} [ampmInClock=false] - {boolean} Whether to show AM/PM in the clock
|
|
4236
|
+
* @param {boolean} [ampm=true] - {boolean} Whether to use 12-hour format
|
|
4237
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past times
|
|
4238
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future times
|
|
4239
|
+
* @param {Date} [minTime] - {Date} Minimum selectable time
|
|
4240
|
+
* @param {Date} [maxTime] - {Date} Maximum selectable time
|
|
4241
|
+
* @param {Function} [shouldDisableTime] - {Function} Function to disable specific times
|
|
4242
|
+
* @param {TimeClockProps['sx']} [clockStyles] - {TimeClockProps['sx']} Custom styles for the TimeClock component
|
|
4243
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4244
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4245
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
4246
|
+
* @param {StackProps['sx']} [buttonsStackStyles] - {StackProps['sx']} Custom styles for the view buttons Stack
|
|
4247
|
+
* @param {ButtonProps['sx']} [buttonStyles] - {ButtonProps['sx']} Custom styles for view buttons
|
|
4248
|
+
* @param {ButtonProps['sx']} [activeButtonStyles] - {ButtonProps['sx']} Custom styles for active view button
|
|
4249
|
+
* @param {boolean} [showViewButtons=true] - {boolean} Whether to show view selector buttons
|
|
4250
|
+
* @param {string} [initialView='hours'] - {string} Initial view
|
|
4251
|
+
* @param {string} [view] - {string} Controlled view state
|
|
4252
|
+
* @param {(value: Date | null) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4253
|
+
* @param {Function} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
4254
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
4255
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
4256
|
+
* @param {any} [dateAdapter] - {any} Date adapter to use
|
|
4257
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus
|
|
4258
|
+
*
|
|
4259
|
+
* @returns {JSX.Element} The Form Input Time Clock component
|
|
4260
|
+
*
|
|
4261
|
+
* @usage
|
|
4262
|
+
* ```tsx
|
|
4263
|
+
* import { FormInputTimeClock } from "@react-solutions/inputs";
|
|
4264
|
+
* import { useForm } from "react-hook-form";
|
|
4265
|
+
*
|
|
4266
|
+
* function MyForm() {
|
|
4267
|
+
* const { control } = useForm();
|
|
4268
|
+
*
|
|
4269
|
+
* return (
|
|
4270
|
+
* <FormInputTimeClock
|
|
4271
|
+
* name="shiftStart"
|
|
4272
|
+
* label="Shift Start Time"
|
|
4273
|
+
* control={control}
|
|
4274
|
+
* ampm={true}
|
|
4275
|
+
* />
|
|
4276
|
+
* );
|
|
4277
|
+
* }
|
|
4278
|
+
* ```
|
|
4279
|
+
*
|
|
4280
|
+
*/
|
|
1732
4281
|
declare const FormInputTimeClock: React__default.MemoExoticComponent<({ name, label, control, readOnly, disabled, ampm, views, ampmInClock, disablePast, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1733
4282
|
|
|
1734
|
-
|
|
4283
|
+
/**
|
|
4284
|
+
* Form Input Time Picker Component
|
|
4285
|
+
*
|
|
4286
|
+
* A customizable time picker field built on top of Material UI X TimePicker and FormControl,
|
|
4287
|
+
* integrated with React Hook Form.
|
|
4288
|
+
*
|
|
4289
|
+
* @component
|
|
4290
|
+
* @version 2.x.x
|
|
4291
|
+
* @author call-max
|
|
4292
|
+
*
|
|
4293
|
+
* @description This component provides a flexible time picker with support for: error handling, helper text, clear button,
|
|
4294
|
+
* AM/PM support, time constraints (min/max), and standard time picker behaviors.
|
|
4295
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4296
|
+
*
|
|
4297
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4298
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4299
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the time picker
|
|
4300
|
+
* @param {Date | null} [defaultValue=null] - {Date | null} Default time value
|
|
4301
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4302
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
4303
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as a separate title above the picker
|
|
4304
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4305
|
+
* @param {Date} [minTime] - {Date} Minimum selectable time
|
|
4306
|
+
* @param {Date} [maxTime] - {Date} Maximum selectable time
|
|
4307
|
+
* @param {(time: Date, view: string) => boolean} [shouldDisableTime] - {Function} Function to disable specific times
|
|
4308
|
+
* @param {TextFieldProps['size']} [size='medium'] - {TextFieldProps['size']} TextField size
|
|
4309
|
+
* @param {TextFieldProps['variant']} [variant='outlined'] - {TextFieldProps['variant']} TextField variant
|
|
4310
|
+
* @param {TextFieldProps['color']} [color='primary'] - {TextFieldProps['color']} TextField color
|
|
4311
|
+
* @param {string} [placeholder] - {string} Placeholder text
|
|
4312
|
+
* @param {boolean} [readOnly=false] - {boolean} Whether the field is read-only
|
|
4313
|
+
* @param {boolean} [showClearButton=true] - {boolean} Whether to show clear button
|
|
4314
|
+
* @param {boolean} [disablePast=false] - {boolean} Whether to disable past times
|
|
4315
|
+
* @param {boolean} [disableFuture=false] - {boolean} Whether to disable future times
|
|
4316
|
+
* @param {boolean} [ampm=true] - {boolean} Whether to use 12-hour format
|
|
4317
|
+
* @param {string[]} [views] - {string[]} Available views (hours, minutes, seconds)
|
|
4318
|
+
* @param {string} [view] - {string} Controlled view state
|
|
4319
|
+
* @param {string} [openTo='hours'] - {string} Default view to open
|
|
4320
|
+
* @param {string} [format] - {string} Format for displaying the time
|
|
4321
|
+
* @param {TimePickerProps['sx']} [pickerStyles] - {TimePickerProps['sx']} Custom styles for the TimePicker component
|
|
4322
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4323
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4324
|
+
* @param {BoxProps['sx']} [containerStyles] - {BoxProps['sx']} Custom styles for the container Box
|
|
4325
|
+
* @param {TextFieldProps['sx']} [textFieldStyles] - {TextFieldProps['sx']} Custom styles for the internal TextField
|
|
4326
|
+
* @param {(value: Date | null) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4327
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onFocus] - {Function} Callback when field receives focus
|
|
4328
|
+
* @param {(event: React.FocusEvent<HTMLInputElement>) => void} [onBlur] - {Function} Callback when field loses focus
|
|
4329
|
+
* @param {Function} [onViewChange] - {Function} Callback fired when a view change is requested
|
|
4330
|
+
* @param {Function} [onOpen] - {Function} Callback fired when the picker opens
|
|
4331
|
+
* @param {Function} [onClose] - {Function} Callback fired when the picker closes
|
|
4332
|
+
* @param {Object} [slotProps] - {Object} Custom slot props for MUI X v7
|
|
4333
|
+
* @param {Object} [slots] - {Object} Custom slots for MUI X v7
|
|
4334
|
+
* @param {any} [dateAdapter] - {any} Date adapter to use
|
|
4335
|
+
* @param {boolean} [autoFocus=false] - {boolean} Auto focus the input
|
|
4336
|
+
* @param {string} [timezone] - {string} Timezone for the picker
|
|
4337
|
+
*
|
|
4338
|
+
* @returns {JSX.Element} The Form Input Time Picker component
|
|
4339
|
+
*
|
|
4340
|
+
* @usage
|
|
4341
|
+
* ```tsx
|
|
4342
|
+
* import { FormInputTimePicker } from "@react-solutions/inputs";
|
|
4343
|
+
* import { useForm } from "react-hook-form";
|
|
4344
|
+
*
|
|
4345
|
+
* function MyForm() {
|
|
4346
|
+
* const { control } = useForm();
|
|
4347
|
+
*
|
|
4348
|
+
* return (
|
|
4349
|
+
* <FormInputTimePicker
|
|
4350
|
+
* name="appointmentTime"
|
|
4351
|
+
* label="Select Time"
|
|
4352
|
+
* control={control}
|
|
4353
|
+
* ampm={true}
|
|
4354
|
+
* />
|
|
4355
|
+
* );
|
|
4356
|
+
* }
|
|
4357
|
+
* ```
|
|
4358
|
+
*
|
|
4359
|
+
*/
|
|
4360
|
+
declare const FormInputTimePicker: React__default.MemoExoticComponent<({ name, label, control, ampm, timezone, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1735
4361
|
|
|
4362
|
+
/**
|
|
4363
|
+
* Form Input CheckBox Component
|
|
4364
|
+
*
|
|
4365
|
+
* A customizable checkbox field built on top of Material UI Checkbox and FormControl,
|
|
4366
|
+
* integrated with React Hook Form.
|
|
4367
|
+
*
|
|
4368
|
+
* @component
|
|
4369
|
+
* @version 2.x.x
|
|
4370
|
+
* @author call-max
|
|
4371
|
+
*
|
|
4372
|
+
* @description This component provides a flexible checkbox with support for: error handling, helper text, custom icons,
|
|
4373
|
+
* styling overrides, label placement, and standard checkbox behaviors.
|
|
4374
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4375
|
+
*
|
|
4376
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4377
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4378
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the checkbox
|
|
4379
|
+
* @param {boolean} [defaultValue=false] - {boolean} Default checked state
|
|
4380
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4381
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Checkbox color
|
|
4382
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Checkbox size
|
|
4383
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4384
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4385
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to checkbox
|
|
4386
|
+
* @param {(checked: boolean) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4387
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {Function} Callback fired when clicked
|
|
4388
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onFocus] - {Function} Callback when focused
|
|
4389
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onBlur] - {Function} Callback when blurred
|
|
4390
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
4391
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
4392
|
+
* @param {React.CSSProperties} [checkboxStyles] - {React.CSSProperties} Custom styles for Checkbox component
|
|
4393
|
+
* @param {React.CSSProperties} [labelStyles] - {React.CSSProperties} Custom styles for FormControlLabel
|
|
4394
|
+
* @param {React.CSSProperties} [formControlStyles] - {React.CSSProperties} Custom styles for FormControl container
|
|
4395
|
+
* @param {boolean} [indeterminate=false] - {boolean} Indeterminate state
|
|
4396
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4397
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4398
|
+
*
|
|
4399
|
+
* @returns {JSX.Element} The Form Input CheckBox component
|
|
4400
|
+
*
|
|
4401
|
+
* @usage
|
|
4402
|
+
* ```tsx
|
|
4403
|
+
* import { FormInputCheckBox } from "@react-solutions/inputs";
|
|
4404
|
+
* import { useForm } from "react-hook-form";
|
|
4405
|
+
*
|
|
4406
|
+
* function MyForm() {
|
|
4407
|
+
* const { control } = useForm();
|
|
4408
|
+
*
|
|
4409
|
+
* return (
|
|
4410
|
+
* <FormInputCheckBox
|
|
4411
|
+
* name="agreeTerms"
|
|
4412
|
+
* label="I agree to terms"
|
|
4413
|
+
* control={control}
|
|
4414
|
+
* required
|
|
4415
|
+
* />
|
|
4416
|
+
* );
|
|
4417
|
+
* }
|
|
4418
|
+
* ```
|
|
4419
|
+
*
|
|
4420
|
+
*/
|
|
1736
4421
|
declare const FormInputCheckBox: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1737
4422
|
|
|
4423
|
+
/**
|
|
4424
|
+
* Form Input CheckBox Group Component
|
|
4425
|
+
*
|
|
4426
|
+
* A customizable group of checkboxes built on top of Material UI Checkbox and FormControl,
|
|
4427
|
+
* integrated with React Hook Form.
|
|
4428
|
+
*
|
|
4429
|
+
* @component
|
|
4430
|
+
* @version 2.x.x
|
|
4431
|
+
* @author call-max
|
|
4432
|
+
*
|
|
4433
|
+
* @description This component provides a group of flexible checkboxes with support for: error handling, helper text, custom icons,
|
|
4434
|
+
* styling overrides, label placement, row/column layout, and standard checkbox behaviors.
|
|
4435
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4436
|
+
*
|
|
4437
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4438
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4439
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the checkbox group
|
|
4440
|
+
* @param {any[]} [defaultValue=[]] - {any[]} Default selected values
|
|
4441
|
+
* @param {Option[]} options - {Option[]} Array of checkbox options
|
|
4442
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4443
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
4444
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4445
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Checkbox color
|
|
4446
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Checkbox size
|
|
4447
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to checkbox
|
|
4448
|
+
* @param {boolean} [row=false] - {boolean} Whether to display checkboxes in a row
|
|
4449
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
4450
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
4451
|
+
* @param {SxProps<Theme>} [checkboxStyles] - {SxProps<Theme>} Custom styles for individual checkboxes
|
|
4452
|
+
* @param {SxProps<Theme>} [labelStyles] - {SxProps<Theme>} Custom styles for checkbox labels
|
|
4453
|
+
* @param {SxProps<Theme>} [formControlStyles] - {SxProps<Theme>} Custom styles for FormControl container
|
|
4454
|
+
* @param {SxProps<Theme>} [formLabelStyles] - {SxProps<Theme>} Custom styles for FormLabel
|
|
4455
|
+
* @param {(value: any[]) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4456
|
+
* @param {Function} [onFocus] - {Function} Callback when focused
|
|
4457
|
+
* @param {Function} [onBlur] - {Function} Callback when blurred
|
|
4458
|
+
* @param {Function} [onClick] - {Function} Callback when clicked
|
|
4459
|
+
* @param {Function} [renderCheckbox] - {Function} Custom render function for checkboxes
|
|
4460
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4461
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4462
|
+
* @param {SxProps<Theme>} [sxProps] - {SxProps<Theme>} Custom styles for the Box container
|
|
4463
|
+
*
|
|
4464
|
+
* @returns {JSX.Element} The Form Input CheckBox Group component
|
|
4465
|
+
*
|
|
4466
|
+
* @usage
|
|
4467
|
+
* ```tsx
|
|
4468
|
+
* import { FormInputCheckBoxGroup } from "@react-solutions/inputs";
|
|
4469
|
+
* import { useForm } from "react-hook-form";
|
|
4470
|
+
*
|
|
4471
|
+
* function MyForm() {
|
|
4472
|
+
* const { control } = useForm();
|
|
4473
|
+
* const options = [
|
|
4474
|
+
* { value: "opt1", name: "Option 1" },
|
|
4475
|
+
* { value: "opt2", name: "Option 2" }
|
|
4476
|
+
* ];
|
|
4477
|
+
*
|
|
4478
|
+
* return (
|
|
4479
|
+
* <FormInputCheckBoxGroup
|
|
4480
|
+
* name="myCheckGroup"
|
|
4481
|
+
* label="Select options"
|
|
4482
|
+
* control={control}
|
|
4483
|
+
* options={options}
|
|
4484
|
+
* row
|
|
4485
|
+
* />
|
|
4486
|
+
* );
|
|
4487
|
+
* }
|
|
4488
|
+
* ```
|
|
4489
|
+
*
|
|
4490
|
+
*/
|
|
1738
4491
|
declare const FormInputCheckBoxGroup: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, row, color, labelPlacement, ...props }: IFormInputCheckBoxGroupFields) => react_jsx_runtime.JSX.Element>;
|
|
1739
4492
|
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
4493
|
+
/**
|
|
4494
|
+
* Form Input Radio Button Component
|
|
4495
|
+
*
|
|
4496
|
+
* A customizable radio button field built on top of Material UI Radio and FormControl,
|
|
4497
|
+
* integrated with React Hook Form.
|
|
4498
|
+
*
|
|
4499
|
+
* @component
|
|
4500
|
+
* @version 2.x.x
|
|
4501
|
+
* @author call-max
|
|
4502
|
+
*
|
|
4503
|
+
* @description This component provides a flexible radio button with support for: error handling, helper text, custom icons,
|
|
4504
|
+
* styling overrides, label placement, and standard radio behaviors.
|
|
4505
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4506
|
+
*
|
|
4507
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4508
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4509
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the radio button
|
|
4510
|
+
* @param {boolean} [defaultValue=false] - {boolean} Default checked state
|
|
4511
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4512
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Radio color
|
|
4513
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Radio size
|
|
4514
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4515
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4516
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to radio button
|
|
4517
|
+
* @param {(checked: boolean) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4518
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {Function} Callback fired when clicked
|
|
4519
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onFocus] - {Function} Callback when focused
|
|
4520
|
+
* @param {React.FocusEventHandler<HTMLButtonElement>} [onBlur] - {Function} Callback when blurred
|
|
4521
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
4522
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
4523
|
+
* @param {React.CSSProperties} [radioStyles] - {React.CSSProperties} Custom styles for Radio component
|
|
4524
|
+
* @param {React.CSSProperties} [labelStyles] - {React.CSSProperties} Custom styles for FormControlLabel
|
|
4525
|
+
* @param {React.CSSProperties} [formControlStyles] - {React.CSSProperties} Custom styles for FormControl container
|
|
4526
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4527
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4528
|
+
*
|
|
4529
|
+
* @returns {JSX.Element} The Form Input Radio Button component
|
|
4530
|
+
*
|
|
4531
|
+
* @usage
|
|
4532
|
+
* ```tsx
|
|
4533
|
+
* import { FormInputRadioButton } from "@react-solutions/inputs";
|
|
4534
|
+
* import { useForm } from "react-hook-form";
|
|
4535
|
+
*
|
|
4536
|
+
* function MyForm() {
|
|
4537
|
+
* const { control } = useForm();
|
|
4538
|
+
*
|
|
4539
|
+
* return (
|
|
4540
|
+
* <FormInputRadioButton
|
|
4541
|
+
* name="option1"
|
|
4542
|
+
* label="Option 1"
|
|
4543
|
+
* control={control}
|
|
4544
|
+
* />
|
|
4545
|
+
* );
|
|
4546
|
+
* }
|
|
4547
|
+
* ```
|
|
4548
|
+
*
|
|
4549
|
+
*/
|
|
4550
|
+
declare const FormInputRadioButton: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, color, labelPlacement, ...props }: IFormInputRadioFields) => react_jsx_runtime.JSX.Element>;
|
|
1745
4551
|
|
|
4552
|
+
/**
|
|
4553
|
+
* Form Input Radio Button Group Component
|
|
4554
|
+
*
|
|
4555
|
+
* A customizable group of radio buttons built on top of Material UI RadioGroup and FormControl,
|
|
4556
|
+
* integrated with React Hook Form.
|
|
4557
|
+
*
|
|
4558
|
+
* @component
|
|
4559
|
+
* @version 2.x.x
|
|
4560
|
+
* @author call-max
|
|
4561
|
+
*
|
|
4562
|
+
* @description This component provides a group of flexible radio buttons with support for: error handling, helper text, custom icons,
|
|
4563
|
+
* styling overrides, label placement, row/column layout, and standard radio behaviors.
|
|
4564
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4565
|
+
*
|
|
4566
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4567
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4568
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the radio group
|
|
4569
|
+
* @param {any} [defaultValue=""] - {any} Default selected value
|
|
4570
|
+
* @param {Option[]} options - {Option[]} Array of radio options
|
|
4571
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4572
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Radio color
|
|
4573
|
+
* @param {'small'|'medium'|'large'} [size] - {'small'|'medium'|'large'} Radio size
|
|
4574
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4575
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4576
|
+
* @param {'start'|'end'} [labelPlacement='end'] - {'start'|'end'} Label placement relative to each radio button
|
|
4577
|
+
* @param {boolean} [row=false] - {boolean} Row layout (horizontal) or column layout (vertical)
|
|
4578
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
4579
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
4580
|
+
* @param {RadioProps["sx"]} [radioStyles] - {RadioProps["sx"]} Custom styles for individual Radio components
|
|
4581
|
+
* @param {FormControlLabelProps["sx"]} [labelStyles] - {FormControlLabelProps["sx"]} Custom styles for FormControlLabel components
|
|
4582
|
+
* @param {FormControlProps["sx"]} [formControlStyles] - {FormControlProps["sx"]} Custom styles for FormControl
|
|
4583
|
+
* @param {FormLabelProps["sx"]} [formLabelStyles] - {FormLabelProps["sx"]} Custom styles for FormLabel
|
|
4584
|
+
* @param {RadioGroupProps["sx"]} [radioGroupStyles] - {RadioGroupProps["sx"]} Custom styles for RadioGroup
|
|
4585
|
+
* @param {(value: any) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4586
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {Function} Callback fired when a radio button is clicked
|
|
4587
|
+
* @param {RadioProps["onFocus"]} [onFocus] - {RadioProps["onFocus"]} Callback when focused
|
|
4588
|
+
* @param {RadioProps["onBlur"]} [onBlur] - {RadioProps["onBlur"]} Callback when blurred
|
|
4589
|
+
* @param {(option: Option, index: number) => React.ReactNode} [renderRadio] - {Function} Custom render function for radio buttons
|
|
4590
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4591
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4592
|
+
* @param {SxProps<Theme>} [sxProps] - {SxProps<Theme>} Custom styles for RadioGroup container
|
|
4593
|
+
*
|
|
4594
|
+
* @returns {JSX.Element} The Form Input Radio Button Group component
|
|
4595
|
+
*
|
|
4596
|
+
* @usage
|
|
4597
|
+
* ```tsx
|
|
4598
|
+
* import { FormInputRadioButtonGroup } from "@react-solutions/inputs";
|
|
4599
|
+
* import { useForm } from "react-hook-form";
|
|
4600
|
+
*
|
|
4601
|
+
* function MyForm() {
|
|
4602
|
+
* const { control } = useForm();
|
|
4603
|
+
* const options = [
|
|
4604
|
+
* { name: "Option 1", value: "opt1" },
|
|
4605
|
+
* { name: "Option 2", value: "opt2" }
|
|
4606
|
+
* ];
|
|
4607
|
+
*
|
|
4608
|
+
* return (
|
|
4609
|
+
* <FormInputRadioButtonGroup
|
|
4610
|
+
* name="choice"
|
|
4611
|
+
* label="Select an option"
|
|
4612
|
+
* control={control}
|
|
4613
|
+
* options={options}
|
|
4614
|
+
* row
|
|
4615
|
+
* />
|
|
4616
|
+
* );
|
|
4617
|
+
* }
|
|
4618
|
+
* ```
|
|
4619
|
+
*
|
|
4620
|
+
*/
|
|
1746
4621
|
declare const FormInputRadioButtonGroup: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1747
4622
|
|
|
1748
|
-
|
|
4623
|
+
/**
|
|
4624
|
+
* Form Input Slider Component
|
|
4625
|
+
*
|
|
4626
|
+
* A customizable slider field built on top of Material UI Slider and FormControl,
|
|
4627
|
+
* integrated with React Hook Form.
|
|
4628
|
+
*
|
|
4629
|
+
* @component
|
|
4630
|
+
* @version 2.x.x
|
|
4631
|
+
* @author call-max
|
|
4632
|
+
*
|
|
4633
|
+
* @description This component provides a flexible slider for range selections with support for: error handling, helper text, custom marks,
|
|
4634
|
+
* styling overrides, orientation (horizontal/vertical), and standard slider behaviors.
|
|
4635
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4636
|
+
*
|
|
4637
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4638
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4639
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the slider
|
|
4640
|
+
* @param {number | number[]} [defaultValue=0] - {number | number[]} Default slider value(s)
|
|
4641
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4642
|
+
* @param {boolean} [fullWidth=true] - {boolean} Whether the field should take full width
|
|
4643
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4644
|
+
* @param {'horizontal'|'vertical'} [orientation='horizontal'] - {'horizontal'|'vertical'} Slider orientation
|
|
4645
|
+
* @param {number} [min=0] - {number} Minimum value
|
|
4646
|
+
* @param {number} [max=100] - {number} Maximum value
|
|
4647
|
+
* @param {number|null} [step=1] - {number|null} Step value
|
|
4648
|
+
* @param {'on'|'auto'|'off'} [valueLabelDisplay='auto'] - {'on'|'auto'|'off'} Whether to show value label
|
|
4649
|
+
* @param {React.ReactNode | ((value: number, index: number) => React.ReactNode)} [valueLabelFormat] - {React.ReactNode} Custom format for value label
|
|
4650
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Slider color
|
|
4651
|
+
* @param {'small'|'medium'} [size] - {'small'|'medium'} Slider size
|
|
4652
|
+
* @param {boolean | SliderProps['marks']} [marks] - {boolean | SliderProps['marks']} Marks on the slider
|
|
4653
|
+
* @param {'normal'|'inverted'|false} [track='normal'] - {'normal'|'inverted'|false} Track display mode
|
|
4654
|
+
* @param {SliderProps['sx']} [sliderStyles] - {SliderProps['sx']} Custom styles for the Slider component
|
|
4655
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4656
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4657
|
+
* @param {(value: number | number[]) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4658
|
+
* @param {(value: number | number[]) => void} [onChangeCommitted] - {Function} Callback fired when value change is committed
|
|
4659
|
+
* @param {(event: SyntheticEvent) => void} [onFocus] - {Function} Callback when focused
|
|
4660
|
+
* @param {(event: SyntheticEvent) => void} [onBlur] - {Function} Callback when blurred
|
|
4661
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4662
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4663
|
+
*
|
|
4664
|
+
* @returns {JSX.Element} The Form Input Slider component
|
|
4665
|
+
*
|
|
4666
|
+
* @usage
|
|
4667
|
+
* ```tsx
|
|
4668
|
+
* import { FormInputSlider } from "@react-solutions/inputs";
|
|
4669
|
+
* import { useForm } from "react-hook-form";
|
|
4670
|
+
*
|
|
4671
|
+
* function MyForm() {
|
|
4672
|
+
* const { control } = useForm();
|
|
4673
|
+
*
|
|
4674
|
+
* return (
|
|
4675
|
+
* <FormInputSlider
|
|
4676
|
+
* name="volume"
|
|
4677
|
+
* label="Volume"
|
|
4678
|
+
* control={control}
|
|
4679
|
+
* min={0}
|
|
4680
|
+
* max={100}
|
|
4681
|
+
* />
|
|
4682
|
+
* );
|
|
4683
|
+
* }
|
|
4684
|
+
* ```
|
|
4685
|
+
*
|
|
4686
|
+
*/
|
|
4687
|
+
declare const FormInputSlider: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1749
4688
|
|
|
1750
|
-
|
|
4689
|
+
/**
|
|
4690
|
+
* Form Input Switch Component
|
|
4691
|
+
*
|
|
4692
|
+
* A customizable switch field built on top of Material UI Switch and FormControl,
|
|
4693
|
+
* integrated with React Hook Form.
|
|
4694
|
+
*
|
|
4695
|
+
* @component
|
|
4696
|
+
* @version 2.x.x
|
|
4697
|
+
* @author call-max
|
|
4698
|
+
*
|
|
4699
|
+
* @description This component provides a flexible switch for binary choices with support for: error handling, helper text, custom icons,
|
|
4700
|
+
* styling overrides, label placement, and standard switch behaviors.
|
|
4701
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4702
|
+
*
|
|
4703
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4704
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4705
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the switch
|
|
4706
|
+
* @param {boolean} [defaultValue=false] - {boolean} Default checked state
|
|
4707
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4708
|
+
* @param {'primary'|'secondary'|'success'|'error'|'info'|'warning'} [color='primary'] - {'primary'|'secondary'|'success'|'error'|'info'|'warning'} Switch color
|
|
4709
|
+
* @param {'small'|'medium'} [size] - {'small'|'medium'} Switch size
|
|
4710
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4711
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4712
|
+
* @param {'start'|'end'|'top'|'bottom'} [labelPlacement='end'] - {'start'|'end'|'top'|'bottom'} Label placement relative to switch
|
|
4713
|
+
* @param {'start'|'end'|false} [edge] - {'start'|'end'|false} Edge placement for the switch
|
|
4714
|
+
* @param {React.ReactNode} [checkedIcon] - {React.ReactNode} Custom icon for checked state
|
|
4715
|
+
* @param {React.ReactNode} [icon] - {React.ReactNode} Custom icon for unchecked state
|
|
4716
|
+
* @param {SwitchProps['sx']} [switchStyles] - {SwitchProps['sx']} Custom styles for the Switch component
|
|
4717
|
+
* @param {FormControlLabelProps['sx']} [labelStyles] - {FormControlLabelProps['sx']} Custom styles for FormControlLabel
|
|
4718
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4719
|
+
* @param {(checked: boolean) => void} [onChange] - {Function} Optional additional callback fired when value changes
|
|
4720
|
+
* @param {(event: React.MouseEvent<HTMLButtonElement>) => void} [onClick] - {Function} Callback fired when clicked
|
|
4721
|
+
* @param {SwitchProps['onFocus']} [onFocus] - {Function} Callback when focused
|
|
4722
|
+
* @param {SwitchProps['onBlur']} [onBlur] - {Function} Callback when blurred
|
|
4723
|
+
* @param {Object} [slotProps] - {Object} Custom slot props
|
|
4724
|
+
* @param {Object} [slots] - {Object} Custom slots
|
|
4725
|
+
*
|
|
4726
|
+
* @returns {JSX.Element} The Form Input Switch component
|
|
4727
|
+
*
|
|
4728
|
+
* @usage
|
|
4729
|
+
* ```tsx
|
|
4730
|
+
* import { FormInputSwitch } from "@react-solutions/inputs";
|
|
4731
|
+
* import { useForm } from "react-hook-form";
|
|
4732
|
+
*
|
|
4733
|
+
* function MyForm() {
|
|
4734
|
+
* const { control } = useForm();
|
|
4735
|
+
*
|
|
4736
|
+
* return (
|
|
4737
|
+
* <FormInputSwitch
|
|
4738
|
+
* name="notifications"
|
|
4739
|
+
* label="Enable Notifications"
|
|
4740
|
+
* control={control}
|
|
4741
|
+
* />
|
|
4742
|
+
* );
|
|
4743
|
+
* }
|
|
4744
|
+
* ```
|
|
4745
|
+
*
|
|
4746
|
+
*/
|
|
4747
|
+
declare const FormInputSwitch: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
4748
|
+
|
|
4749
|
+
/**
|
|
4750
|
+
* Form Input Toggle Button Component
|
|
4751
|
+
*
|
|
4752
|
+
* A customizable toggle button group field built on top of Material UI ToggleButtonGroup and FormControl,
|
|
4753
|
+
* integrated with React Hook Form.
|
|
4754
|
+
*
|
|
4755
|
+
* @component
|
|
4756
|
+
* @version 2.x.x
|
|
4757
|
+
* @author call-max
|
|
4758
|
+
*
|
|
4759
|
+
* @description This component provides a group of flexible toggle buttons for single or multiple selections with support for:
|
|
4760
|
+
* error handling, helper text, custom colors per button, styling overrides, and standard toggle behaviors.
|
|
4761
|
+
* It integrates seamlessly with react-hook-form using the `Controller` component.
|
|
4762
|
+
*
|
|
4763
|
+
* @param {string} name - {string} Unique name for form identification
|
|
4764
|
+
* @param {Control<any>} control - {Control<any>} React Hook Form control object
|
|
4765
|
+
* @param {string | React.ReactNode} [label] - {string | React.ReactNode} Label text for the group
|
|
4766
|
+
* @param {any} [defaultValue=""] - {any} Default selected value(s)
|
|
4767
|
+
* @param {ToggleOption[]} options - {ToggleOption[]} Array of toggle options
|
|
4768
|
+
* @param {boolean} [title=false] - {boolean} Whether to show label as title
|
|
4769
|
+
* @param {boolean} [disabled=false] - {boolean} Whether the field is disabled
|
|
4770
|
+
* @param {boolean} [fullWidth=false] - {boolean} Whether the field should take full width
|
|
4771
|
+
* @param {boolean} [required] - {boolean} Required field indicator
|
|
4772
|
+
* @param {'small'|'medium'|'large'} [size='medium'] - {'small'|'medium'|'large'} Toggle size
|
|
4773
|
+
* @param {'horizontal'|'vertical'} [orientation='horizontal'] - {'horizontal'|'vertical'} Toggle orientation
|
|
4774
|
+
* @param {boolean} [exclusive=true] - {boolean} Whether to allow only single selection
|
|
4775
|
+
* @param {ToggleButtonProps['sx']} [buttonStyles] - {ToggleButtonProps['sx']} Custom styles for individual ToggleButton components
|
|
4776
|
+
* @param {FormControlProps['sx']} [formControlStyles] - {FormControlProps['sx']} Custom styles for FormControl container
|
|
4777
|
+
* @param {FormLabelProps['sx']} [formLabelStyles] - {FormLabelProps['sx']} Custom styles for FormLabel
|
|
4778
|
+
* @param {ToggleButtonGroupProps['sx']} [groupStyles] - {ToggleButtonGroupProps['sx']} Custom styles for ToggleButtonGroup
|
|
4779
|
+
* @param {(value: any) => void} [onChange] - {(value: any) => void} Optional additional callback fired when value changes
|
|
4780
|
+
* @param {(option: ToggleOption, index: number) => React.ReactNode} [renderButton] - {Function} Custom render function for toggle buttons
|
|
4781
|
+
*
|
|
4782
|
+
* @returns {JSX.Element} The Form Input Toggle Button component
|
|
4783
|
+
*
|
|
4784
|
+
* @usage
|
|
4785
|
+
* ```tsx
|
|
4786
|
+
* import { FormInputToggleButton } from "@react-solutions/inputs";
|
|
4787
|
+
* import { useForm } from "react-hook-form";
|
|
4788
|
+
*
|
|
4789
|
+
* function MyForm() {
|
|
4790
|
+
* const { control } = useForm({
|
|
4791
|
+
* defaultValues: { status: "ACTIVE" }
|
|
4792
|
+
* });
|
|
4793
|
+
*
|
|
4794
|
+
* return (
|
|
4795
|
+
* <FormInputToggleButton
|
|
4796
|
+
* name="status"
|
|
4797
|
+
* label="Status"
|
|
4798
|
+
* control={control}
|
|
4799
|
+
* options={[
|
|
4800
|
+
* { name: "Active", value: "ACTIVE", color: "success" },
|
|
4801
|
+
* { name: "Inactive", value: "INACTIVE", color: "error" }
|
|
4802
|
+
* ]}
|
|
4803
|
+
* exclusive
|
|
4804
|
+
* />
|
|
4805
|
+
* );
|
|
4806
|
+
* }
|
|
4807
|
+
* ```
|
|
4808
|
+
*
|
|
4809
|
+
*/
|
|
4810
|
+
declare const FormInputToggleButton: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1751
4811
|
|
|
1752
4812
|
declare const FormFields: {
|
|
1753
4813
|
FormInputTextField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
@@ -1771,8 +4831,9 @@ declare const FormFields: {
|
|
|
1771
4831
|
FormInputCheckBoxGroup: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, row, color, labelPlacement, ...props }: IFormInputCheckBoxGroupFields) => react_jsx_runtime.JSX.Element>;
|
|
1772
4832
|
FormInputSwitch: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1773
4833
|
FormInputSlider: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1774
|
-
FormInputSingleRadio: React.MemoExoticComponent<({ name, label, control,
|
|
4834
|
+
FormInputSingleRadio: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, color, labelPlacement, ...props }: IFormInputRadioFields) => react_jsx_runtime.JSX.Element>;
|
|
1775
4835
|
FormInputRadioButtonGroup: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
4836
|
+
FormInputToggleButton: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1776
4837
|
TextInputField: React.NamedExoticComponent<Omit<ITextInputFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1777
4838
|
PasswordField: React.NamedExoticComponent<Omit<IPasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1778
4839
|
NumberField: React.NamedExoticComponent<Omit<INumberInputFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1793,6 +4854,7 @@ declare const FormFields: {
|
|
|
1793
4854
|
RadioButtonFieldGroup: React.ForwardRefExoticComponent<Omit<IRadioButtonGroupFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1794
4855
|
SwitchField: React.ForwardRefExoticComponent<Omit<ISwitchFieldProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1795
4856
|
SliderField: React.ForwardRefExoticComponent<Omit<ISliderFieldProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4857
|
+
ToggleButtonField: React.ForwardRefExoticComponent<Omit<IToggleButtonFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1796
4858
|
};
|
|
1797
4859
|
|
|
1798
|
-
export { AutoCompleteField, CheckboxField as CheckBoxField, CheckboxFieldGroup as CheckBoxFieldGroup, ColorPickerField, DateCalendarField, DatePickerField, NormalForm as DemoForm, ReactHookForm as DemoHookForm, FileUploadField, FormInputAutoComplete, FormInputCalendar, FormInputCheckBox, FormInputCheckBoxGroup, FormInputColorPicker, FormInputDatePicker, FormInputFileUpload, FormInputMultiAutoComplete, FormInputMultiSelect, FormInputNumberField, FormInputOTPField, FormInputPasswordField, FormInputRadioButtonGroup, FormInputSearchField, FormInputSelect, FormInputRadioButton as FormInputSingleRadio, FormInputSlider, FormInputSwitch, FormInputTelField, FormInputTextArea, FormInputTextField, FormInputTimeClock, FormInputTimePicker, type IFormInputCheckBoxGroupFields, type IFormInputDateFields, type IFormInputFields, type IFormInputFieldsWithOptions, type IFormInputNumberFields, type IFormInputRadioFields, type IFormInputTextAreaFields, NumberField, OTPField, type Option, PasswordField, RadioButtonField, RadioButtonFieldGroup, SearchField as SearchInputField, SelectInputField, SliderField, SwitchField, TeliField as TelInputField, TextInputField, TimeClockField, TimePickerField, FormFields as default };
|
|
4860
|
+
export { AutoCompleteField, CheckboxField as CheckBoxField, CheckboxFieldGroup as CheckBoxFieldGroup, ColorPickerField, DateCalendarField, DatePickerField, NormalForm as DemoForm, ReactHookForm as DemoHookForm, FileUploadField, FormInputAutoComplete, FormInputCalendar, FormInputCheckBox, FormInputCheckBoxGroup, FormInputColorPicker, FormInputDatePicker, FormInputFileUpload, FormInputMultiAutoComplete, FormInputMultiSelect, FormInputNumberField, FormInputOTPField, FormInputPasswordField, FormInputRadioButtonGroup, FormInputSearchField, FormInputSelect, FormInputRadioButton as FormInputSingleRadio, FormInputSlider, FormInputSwitch, FormInputTelField, FormInputTextArea, FormInputTextField, FormInputTimeClock, FormInputTimePicker, FormInputToggleButton, type IFormInputCheckBoxGroupFields, type IFormInputDateFields, type IFormInputFields, type IFormInputFieldsWithOptions, type IFormInputNumberFields, type IFormInputRadioFields, type IFormInputTextAreaFields, NumberField, OTPField, type Option, PasswordField, RadioButtonField, RadioButtonFieldGroup, SearchField as SearchInputField, SelectInputField, SliderField, SwitchField, TeliField as TelInputField, TextInputField, TimeClockField, TimePickerField, ToggleButtonField, FormFields as default };
|