formik-form-components 0.2.29 → 0.3.1
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/README.md +326 -123
- package/dist/index.d.ts +202 -378
- package/dist/index.js +2048 -3969
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2036 -3941
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -23
package/dist/index.d.ts
CHANGED
|
@@ -1,104 +1,52 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ReactElement, ReactNode,
|
|
2
|
+
import React__default, { TextareaHTMLAttributes, ReactElement, ReactNode, InputHTMLAttributes, SelectHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
3
|
import { FormikValues, FormikConfig, FormikProps } from 'formik';
|
|
4
|
-
import { SxProps, Theme, AutocompleteProps, AutocompleteChangeReason, AutocompleteChangeDetails, TextFieldProps, RadioGroupProps, BoxProps } from '@mui/material';
|
|
5
|
-
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
6
|
-
import { SelectProps } from '@mui/material/Select';
|
|
7
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
5
|
import { Dayjs } from 'dayjs';
|
|
9
|
-
import {
|
|
6
|
+
import { Accept } from 'react-dropzone';
|
|
10
7
|
import { IconifyIcon } from '@iconify/react';
|
|
11
8
|
|
|
12
|
-
type
|
|
9
|
+
declare const AppDatePicker: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "name" | "type" | "value"> & {
|
|
13
10
|
name: string;
|
|
14
11
|
label?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
interface Props$7 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChange'> {
|
|
27
|
-
name: string;
|
|
28
|
-
label?: string;
|
|
29
|
-
placeholder?: string;
|
|
30
|
-
options: AppSelectOptions[];
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
sx?: SxProps<Theme>;
|
|
33
|
-
formControlSx?: SxProps<Theme>;
|
|
34
|
-
textFieldSx?: SxProps<Theme>;
|
|
35
|
-
listboxSx?: SxProps<Theme>;
|
|
36
|
-
errorSx?: SxProps<Theme>;
|
|
37
|
-
}
|
|
38
|
-
declare function AppAutoCompleter({ placeholder, name, label, options, disabled, sx, formControlSx, textFieldSx, listboxSx, errorSx }: Props$7): React.JSX.Element;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
disablePast?: boolean;
|
|
15
|
+
disableFuture?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
labelClassName?: string;
|
|
18
|
+
errorClassName?: string;
|
|
19
|
+
containerClassName?: string;
|
|
20
|
+
onValueChange?: (value: Dayjs | null) => void;
|
|
21
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
39
22
|
|
|
40
|
-
|
|
41
|
-
/** Field name for formik */
|
|
23
|
+
declare const AppDateAndTimePicker: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "name" | "type" | "value"> & {
|
|
42
24
|
name: string;
|
|
43
|
-
/** Label for the date and time picker */
|
|
44
25
|
label?: string;
|
|
45
|
-
/** Variant of the input field */
|
|
46
|
-
variant?: "outlined" | "filled" | "standard";
|
|
47
|
-
/** Placeholder text */
|
|
48
|
-
placeholder?: string;
|
|
49
|
-
/** Whether the field is required */
|
|
50
26
|
required?: boolean;
|
|
51
|
-
/** Whether the field is disabled */
|
|
52
|
-
disabled?: boolean;
|
|
53
|
-
/** Minimum selectable date */
|
|
54
|
-
minDate?: Date | Dayjs | null;
|
|
55
|
-
/** Maximum selectable date */
|
|
56
|
-
maxDate?: Date | Dayjs | null;
|
|
57
|
-
/** Format string for the displayed date and time */
|
|
58
|
-
format?: string;
|
|
59
|
-
/** Custom styles for the root container */
|
|
60
|
-
sx?: SxProps<Theme>;
|
|
61
|
-
/** Custom styles for the form control */
|
|
62
|
-
formControlSx?: SxProps<Theme>;
|
|
63
|
-
/** Custom styles for the text field */
|
|
64
|
-
textFieldSx?: SxProps<Theme>;
|
|
65
|
-
/** Custom styles for the label */
|
|
66
|
-
labelSx?: SxProps<Theme>;
|
|
67
|
-
/** Custom styles for the input */
|
|
68
|
-
inputSx?: SxProps<Theme>;
|
|
69
|
-
/** Custom styles for the error message */
|
|
70
|
-
errorSx?: SxProps<Theme>;
|
|
71
|
-
/** Custom styles for the helper text */
|
|
72
|
-
helperTextSx?: SxProps<Theme>;
|
|
73
|
-
/** Whether to show the helper text when no error */
|
|
74
|
-
showHelperText?: boolean;
|
|
75
|
-
/** Custom helper text to display */
|
|
76
27
|
helperText?: string;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
28
|
+
disablePast?: boolean;
|
|
29
|
+
disableFuture?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
labelClassName?: string;
|
|
32
|
+
errorClassName?: string;
|
|
33
|
+
containerClassName?: string;
|
|
34
|
+
onValueChange?: (value: Dayjs | null) => void;
|
|
35
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
85
36
|
|
|
86
|
-
interface Props$
|
|
37
|
+
interface Props$2 {
|
|
87
38
|
name: string;
|
|
88
39
|
alwaysShow?: boolean;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
textSx?: SxProps<Theme>;
|
|
40
|
+
className?: string;
|
|
41
|
+
containerClassName?: string;
|
|
92
42
|
}
|
|
93
|
-
declare function AppFormErrorMessage({ name, alwaysShow,
|
|
43
|
+
declare function AppFormErrorMessage({ name, alwaysShow, className, containerClassName, }: Props$2): React.JSX.Element | null;
|
|
94
44
|
|
|
95
|
-
interface AppTextAreaProps {
|
|
45
|
+
interface AppTextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "name"> {
|
|
96
46
|
/** Field name for formik */
|
|
97
47
|
name: string;
|
|
98
48
|
/** Label for the textarea */
|
|
99
49
|
label?: string;
|
|
100
|
-
/** Variant of the input field */
|
|
101
|
-
variant?: 'outlined' | 'filled' | 'standard';
|
|
102
50
|
/** Placeholder text */
|
|
103
51
|
placeholder?: string;
|
|
104
52
|
/** Number of visible text lines */
|
|
@@ -107,81 +55,67 @@ interface AppTextAreaProps {
|
|
|
107
55
|
maxLength?: number;
|
|
108
56
|
/** Whether the field is required */
|
|
109
57
|
required?: boolean;
|
|
110
|
-
/** Whether the field is disabled */
|
|
111
|
-
disabled?: boolean;
|
|
112
|
-
/** Whether the field is read-only */
|
|
113
|
-
readOnly?: boolean;
|
|
114
58
|
/** Whether to show character counter */
|
|
115
59
|
showCount?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
|
|
118
|
-
/** Custom
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/** Custom styles for the error message */
|
|
125
|
-
errorSx?: SxProps<Theme>;
|
|
126
|
-
/** Custom styles for the character counter */
|
|
127
|
-
counterSx?: SxProps<Theme>;
|
|
60
|
+
/** Helper text */
|
|
61
|
+
helperText?: string;
|
|
62
|
+
/** Custom class names */
|
|
63
|
+
className?: string;
|
|
64
|
+
labelClassName?: string;
|
|
65
|
+
errorClassName?: string;
|
|
66
|
+
counterClassName?: string;
|
|
67
|
+
containerClassName?: string;
|
|
128
68
|
/** Callback when the value changes */
|
|
129
|
-
|
|
130
|
-
/** Callback when the field is focused */
|
|
131
|
-
onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
132
|
-
/** Callback when the field is blurred */
|
|
133
|
-
onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
134
|
-
/** Additional props for the TextField component */
|
|
135
|
-
[key: string]: any;
|
|
69
|
+
onValueChange?: (value: string) => void;
|
|
136
70
|
}
|
|
137
|
-
declare const AppTextArea: React$1.ForwardRefExoticComponent<
|
|
71
|
+
declare const AppTextArea: React$1.ForwardRefExoticComponent<AppTextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
138
72
|
|
|
139
|
-
interface
|
|
73
|
+
interface AppTagsCreatorProps {
|
|
140
74
|
name: string;
|
|
141
|
-
freeSolo?: boolean;
|
|
142
|
-
multiple?: boolean;
|
|
143
75
|
label?: string;
|
|
144
76
|
placeholder?: string;
|
|
145
|
-
options
|
|
77
|
+
options?: string[];
|
|
146
78
|
disabled?: boolean;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
79
|
+
required?: boolean;
|
|
80
|
+
helperText?: string;
|
|
81
|
+
className?: string;
|
|
82
|
+
containerClassName?: string;
|
|
83
|
+
labelClassName?: string;
|
|
84
|
+
inputClassName?: string;
|
|
85
|
+
tagClassName?: string;
|
|
86
|
+
errorClassName?: string;
|
|
155
87
|
}
|
|
156
|
-
declare function AppTagsCreator({ placeholder, name,
|
|
88
|
+
declare function AppTagsCreator({ placeholder, name, label, options, disabled, required, helperText, className, containerClassName, labelClassName, inputClassName, tagClassName, errorClassName, }: AppTagsCreatorProps): React__default.JSX.Element;
|
|
157
89
|
|
|
158
|
-
interface AppSwitchInputProps {
|
|
90
|
+
interface AppSwitchInputProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "name" | "onClick"> {
|
|
159
91
|
name: string;
|
|
160
92
|
label?: string;
|
|
93
|
+
helperText?: string;
|
|
161
94
|
className?: string;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
95
|
+
containerClassName?: string;
|
|
96
|
+
switchClassName?: string;
|
|
97
|
+
labelClassName?: string;
|
|
98
|
+
errorClassName?: string;
|
|
99
|
+
labelPlacement?: "start" | "end";
|
|
168
100
|
disabled?: boolean;
|
|
169
|
-
|
|
101
|
+
onValueChange?: (value: boolean) => void;
|
|
170
102
|
}
|
|
171
|
-
declare function AppSwitchInput({ name, label,
|
|
103
|
+
declare function AppSwitchInput({ name, label, helperText, className, containerClassName, switchClassName, labelClassName, errorClassName, labelPlacement, disabled, onValueChange, ...otherProps }: AppSwitchInputProps): React__default.JSX.Element;
|
|
172
104
|
|
|
173
|
-
interface AppSwitchProps {
|
|
105
|
+
interface AppSwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "name" | "onClick"> {
|
|
174
106
|
name: string;
|
|
175
107
|
label: string;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
108
|
+
helperText?: string;
|
|
109
|
+
className?: string;
|
|
110
|
+
containerClassName?: string;
|
|
111
|
+
switchClassName?: string;
|
|
112
|
+
labelClassName?: string;
|
|
113
|
+
errorClassName?: string;
|
|
114
|
+
labelPlacement?: "start" | "end";
|
|
182
115
|
disabled?: boolean;
|
|
116
|
+
onValueChange?: (value: boolean) => void;
|
|
183
117
|
}
|
|
184
|
-
declare function AppSwitch({ name, label,
|
|
118
|
+
declare function AppSwitch({ name, label, helperText, className, containerClassName, switchClassName, labelClassName, errorClassName, labelPlacement, disabled, onValueChange, ...otherProps }: AppSwitchProps): React.JSX.Element;
|
|
185
119
|
|
|
186
120
|
interface FormProps<T> extends FormikConfig<T> {
|
|
187
121
|
children?: ((props: FormikProps<T>) => ReactNode) | ReactNode;
|
|
@@ -189,79 +123,91 @@ interface FormProps<T> extends FormikConfig<T> {
|
|
|
189
123
|
}
|
|
190
124
|
declare const Form: <T extends FormikValues>({ children, className, ...props }: FormProps<T>) => ReactElement;
|
|
191
125
|
|
|
192
|
-
interface
|
|
126
|
+
interface AppAutoCompleteProps {
|
|
193
127
|
name: string;
|
|
128
|
+
label?: string;
|
|
129
|
+
placeholder?: string;
|
|
130
|
+
options?: string[];
|
|
131
|
+
required?: boolean;
|
|
132
|
+
disabled?: boolean;
|
|
194
133
|
freeSolo?: boolean;
|
|
134
|
+
helperText?: string;
|
|
135
|
+
className?: string;
|
|
136
|
+
containerClassName?: string;
|
|
137
|
+
labelClassName?: string;
|
|
138
|
+
inputClassName?: string;
|
|
139
|
+
tagClassName?: string;
|
|
140
|
+
errorClassName?: string;
|
|
141
|
+
}
|
|
142
|
+
declare function AppAutoComplete({ placeholder, name, label, options, required, disabled, freeSolo, helperText, className, containerClassName, labelClassName, inputClassName, tagClassName, errorClassName, }: AppAutoCompleteProps): React__default.JSX.Element;
|
|
143
|
+
|
|
144
|
+
interface SelectOption {
|
|
145
|
+
label: string;
|
|
146
|
+
value: string | number;
|
|
147
|
+
}
|
|
148
|
+
type OptionType = string | SelectOption;
|
|
149
|
+
interface AppAutoCompleterProps {
|
|
150
|
+
name: string;
|
|
195
151
|
label?: string;
|
|
196
152
|
placeholder?: string;
|
|
197
|
-
options:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
153
|
+
options: OptionType[];
|
|
154
|
+
multiple?: boolean;
|
|
155
|
+
freeSolo?: boolean;
|
|
156
|
+
required?: boolean;
|
|
157
|
+
disabled?: boolean;
|
|
158
|
+
helperText?: string;
|
|
159
|
+
className?: string;
|
|
160
|
+
containerClassName?: string;
|
|
161
|
+
labelClassName?: string;
|
|
162
|
+
inputClassName?: string;
|
|
163
|
+
tagClassName?: string;
|
|
164
|
+
errorClassName?: string;
|
|
207
165
|
}
|
|
208
|
-
declare function
|
|
166
|
+
declare function AppAutoCompleter({ name, label, placeholder, options, multiple, freeSolo, required, disabled, helperText, className, containerClassName, labelClassName, inputClassName, tagClassName, errorClassName, }: AppAutoCompleterProps): React__default.JSX.Element;
|
|
209
167
|
|
|
210
168
|
interface CheckboxOption {
|
|
211
169
|
label: string;
|
|
212
170
|
name: string;
|
|
213
|
-
value: string |
|
|
171
|
+
value: string | number | boolean;
|
|
214
172
|
disabled?: boolean;
|
|
215
173
|
}
|
|
216
|
-
interface
|
|
217
|
-
/** Array of checkbox options with label and value */
|
|
218
|
-
option: CheckboxOption[];
|
|
219
|
-
/** Field name for formik */
|
|
174
|
+
interface AppCheckBoxProps {
|
|
220
175
|
name: string;
|
|
221
|
-
|
|
176
|
+
option: CheckboxOption[];
|
|
222
177
|
label?: string;
|
|
223
|
-
/** Whether the field is required */
|
|
224
178
|
required?: boolean;
|
|
225
|
-
/** Whether the checkbox group is disabled */
|
|
226
179
|
disabled?: boolean;
|
|
227
|
-
/** Whether the checkbox group is in a row */
|
|
228
180
|
row?: boolean;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
errorSx?: SxProps<Theme>;
|
|
237
|
-
/** Custom styles for the checkbox container */
|
|
238
|
-
containerSx?: SxProps<Theme>;
|
|
239
|
-
/** Custom styles for the checkbox icon */
|
|
240
|
-
iconSx?: SxProps<Theme>;
|
|
241
|
-
/** Custom styles for the checked state */
|
|
242
|
-
checkedSx?: SxProps<Theme>;
|
|
181
|
+
className?: string;
|
|
182
|
+
labelClassName?: string;
|
|
183
|
+
errorClassName?: string;
|
|
184
|
+
containerClassName?: string;
|
|
185
|
+
checkboxClassName?: string;
|
|
186
|
+
itemClassName?: string;
|
|
187
|
+
checkboxProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "name" | "checked" | "onChange">;
|
|
243
188
|
}
|
|
244
|
-
declare const AppCheckBox: ({ name, option, label, required, disabled, row,
|
|
189
|
+
declare const AppCheckBox: ({ name, option, label, required, disabled, row, className, labelClassName, errorClassName, containerClassName, checkboxClassName, itemClassName, checkboxProps, }: AppCheckBoxProps) => react_jsx_runtime.JSX.Element;
|
|
245
190
|
|
|
246
|
-
interface
|
|
191
|
+
interface CustomInputProps {
|
|
247
192
|
name: string;
|
|
248
|
-
label
|
|
249
|
-
tagUser?: string;
|
|
250
|
-
hasReply?: boolean;
|
|
193
|
+
label?: ReactNode;
|
|
251
194
|
required?: boolean;
|
|
252
|
-
|
|
195
|
+
helperText?: string;
|
|
196
|
+
className?: string;
|
|
197
|
+
labelClassName?: string;
|
|
198
|
+
errorClassName?: string;
|
|
199
|
+
containerClassName?: string;
|
|
253
200
|
}
|
|
254
|
-
|
|
201
|
+
type AppInputFieldProps = CustomInputProps & Omit<InputHTMLAttributes<HTMLInputElement>, "name">;
|
|
202
|
+
declare function AppInputField({ name, label, type, required, helperText, className, labelClassName, errorClassName, containerClassName, ...otherProps }: AppInputFieldProps): React__default.JSX.Element;
|
|
255
203
|
|
|
256
204
|
interface AppSelectOption$1 {
|
|
257
205
|
label: string;
|
|
258
206
|
value: string | number;
|
|
259
207
|
disabled?: boolean;
|
|
260
|
-
sx?: SxProps<Theme>;
|
|
261
|
-
textSx?: SxProps<Theme>;
|
|
262
208
|
icon?: ReactNode;
|
|
263
209
|
}
|
|
264
|
-
interface
|
|
210
|
+
interface AppMultiSelectorProps {
|
|
265
211
|
name: string;
|
|
266
212
|
label?: string;
|
|
267
213
|
options: AppSelectOption$1[];
|
|
@@ -270,29 +216,16 @@ interface BaseMultiSelectProps {
|
|
|
270
216
|
maxSelections?: number;
|
|
271
217
|
showSelectedCount?: boolean;
|
|
272
218
|
helperText?: string;
|
|
273
|
-
variant?: "outlined" | "filled" | "standard";
|
|
274
219
|
placeholder?: string;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
220
|
+
className?: string;
|
|
221
|
+
containerClassName?: string;
|
|
222
|
+
labelClassName?: string;
|
|
223
|
+
tagClassName?: string;
|
|
224
|
+
errorClassName?: string;
|
|
225
|
+
dropdownClassName?: string;
|
|
280
226
|
onChange?: (value: Array<string | number>) => void;
|
|
281
227
|
onMaxSelectionsReached?: (maxSelections: number) => void;
|
|
282
228
|
}
|
|
283
|
-
interface AutocompleteMultiSelectProps extends BaseMultiSelectProps {
|
|
284
|
-
mode?: "autocomplete";
|
|
285
|
-
onSearchChange?: (query: string) => void;
|
|
286
|
-
searchDebounce?: number;
|
|
287
|
-
clearable?: boolean;
|
|
288
|
-
}
|
|
289
|
-
interface DropdownMultiSelectProps extends BaseMultiSelectProps {
|
|
290
|
-
mode: "dropdown";
|
|
291
|
-
onSearchChange?: never;
|
|
292
|
-
searchDebounce?: never;
|
|
293
|
-
clearable?: never;
|
|
294
|
-
}
|
|
295
|
-
type AppMultiSelectorProps = AutocompleteMultiSelectProps | DropdownMultiSelectProps;
|
|
296
229
|
declare const AppMultiSelector: React__default.ForwardRefExoticComponent<AppMultiSelectorProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
297
230
|
|
|
298
231
|
interface AppPhoneNoInputProps {
|
|
@@ -301,63 +234,40 @@ interface AppPhoneNoInputProps {
|
|
|
301
234
|
required?: boolean;
|
|
302
235
|
defaultCountry?: string;
|
|
303
236
|
placeholder?: string;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
237
|
+
className?: string;
|
|
238
|
+
containerClassName?: string;
|
|
239
|
+
labelClassName?: string;
|
|
240
|
+
inputClassName?: string;
|
|
241
|
+
errorClassName?: string;
|
|
309
242
|
international?: boolean;
|
|
310
243
|
withCountryCallingCode?: boolean;
|
|
311
244
|
}
|
|
312
245
|
declare const AppPhoneNoInput: React__default.FC<AppPhoneNoInputProps>;
|
|
313
246
|
|
|
314
247
|
interface RadioOption {
|
|
315
|
-
/** The label to be shown next to the radio button */
|
|
316
248
|
label: string;
|
|
317
|
-
/** The value to be used when this option is selected */
|
|
318
249
|
value: string | number;
|
|
319
|
-
/** Whether this option is disabled */
|
|
320
250
|
disabled?: boolean;
|
|
321
|
-
/** Custom styles for this specific radio option */
|
|
322
|
-
sx?: SxProps<Theme>;
|
|
323
|
-
/** Custom styles for this specific radio button */
|
|
324
|
-
radioSx?: SxProps<Theme>;
|
|
325
|
-
/** Custom styles for this specific label */
|
|
326
|
-
labelSx?: SxProps<Theme>;
|
|
327
251
|
}
|
|
328
|
-
interface AppRadioGroupProps
|
|
329
|
-
/** Field name for formik */
|
|
252
|
+
interface AppRadioGroupProps {
|
|
330
253
|
name: string;
|
|
331
|
-
/** Array of radio options */
|
|
332
254
|
options: RadioOption[];
|
|
333
|
-
/** Label for the radio group */
|
|
334
255
|
label?: string;
|
|
335
|
-
/** Whether the field is required */
|
|
336
256
|
required?: boolean;
|
|
337
|
-
/** Whether the radio group is disabled */
|
|
338
257
|
disabled?: boolean;
|
|
339
|
-
/** Whether to show the radio group in a row */
|
|
340
258
|
row?: boolean;
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
formLabelSx?: SxProps<Theme>;
|
|
349
|
-
/** Custom styles for the radio buttons */
|
|
350
|
-
radioSx?: SxProps<Theme>;
|
|
351
|
-
/** Custom styles for the radio labels */
|
|
352
|
-
labelSx?: SxProps<Theme>;
|
|
353
|
-
/** Custom styles for the error message */
|
|
354
|
-
errorSx?: SxProps<Theme>;
|
|
355
|
-
/** Callback when the value changes */
|
|
259
|
+
helperText?: string;
|
|
260
|
+
className?: string;
|
|
261
|
+
labelClassName?: string;
|
|
262
|
+
errorClassName?: string;
|
|
263
|
+
containerClassName?: string;
|
|
264
|
+
radioClassName?: string;
|
|
265
|
+
itemClassName?: string;
|
|
356
266
|
onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
357
|
-
/** Callback when the field is blurred */
|
|
358
267
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
268
|
+
radioProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "name" | "checked" | "onChange">;
|
|
359
269
|
}
|
|
360
|
-
declare const AppRadioGroup: React__default.ForwardRefExoticComponent<
|
|
270
|
+
declare const AppRadioGroup: React__default.ForwardRefExoticComponent<AppRadioGroupProps & React__default.RefAttributes<HTMLFieldSetElement>>;
|
|
361
271
|
|
|
362
272
|
interface AppRatingProps {
|
|
363
273
|
/** Field name for formik */
|
|
@@ -372,124 +282,60 @@ interface AppRatingProps {
|
|
|
372
282
|
disabled?: boolean;
|
|
373
283
|
/** Maximum rating value */
|
|
374
284
|
max?: number;
|
|
375
|
-
/** Precision of the rating */
|
|
285
|
+
/** Precision of the rating (e.g., 0.5 for half stars) */
|
|
376
286
|
precision?: number;
|
|
377
287
|
/** Size of the rating icons */
|
|
378
|
-
size?: "small" | "medium" | "large"
|
|
379
|
-
/**
|
|
380
|
-
emptyIcon?: ReactNode;
|
|
381
|
-
/** Custom icon for filled rating */
|
|
382
|
-
icon?: ReactNode;
|
|
383
|
-
/** Custom icon component */
|
|
384
|
-
IconContainerComponent?: ElementType<{
|
|
385
|
-
value: number;
|
|
386
|
-
}>;
|
|
387
|
-
/** Custom label for the rating value */
|
|
388
|
-
getLabelText?: (value: number) => string;
|
|
389
|
-
/** Callback when the rating changes */
|
|
390
|
-
onChange?: (event: React.SyntheticEvent, value: number | null) => void;
|
|
391
|
-
/** Callback when the rating is hovered */
|
|
392
|
-
onChangeActive?: (event: React.SyntheticEvent, value: number) => void;
|
|
393
|
-
/** Custom styles for the root container */
|
|
394
|
-
sx?: SxProps<Theme>;
|
|
395
|
-
/** Custom styles for the label */
|
|
396
|
-
labelSx?: SxProps<Theme>;
|
|
397
|
-
/** Custom styles for the rating component */
|
|
398
|
-
ratingSx?: SxProps<Theme>;
|
|
399
|
-
/** Custom styles for the error message */
|
|
400
|
-
errorSx?: SxProps<Theme>;
|
|
401
|
-
/** Custom styles for the helper text */
|
|
402
|
-
helperTextSx?: SxProps<Theme>;
|
|
403
|
-
/** Whether to show the helper text when no error */
|
|
404
|
-
showHelperText?: boolean;
|
|
405
|
-
/** Custom helper text to display */
|
|
288
|
+
size?: "small" | "medium" | "large";
|
|
289
|
+
/** Helper text */
|
|
406
290
|
helperText?: string;
|
|
407
|
-
/**
|
|
408
|
-
|
|
409
|
-
/** Custom
|
|
410
|
-
ratingComponent?: ElementType;
|
|
411
|
-
/** Custom component for the error */
|
|
412
|
-
errorComponent?: ElementType;
|
|
413
|
-
/** Custom component for the helper text */
|
|
414
|
-
helperTextComponent?: ElementType;
|
|
415
|
-
/** Custom props for the label component */
|
|
416
|
-
labelProps?: Record<string, any>;
|
|
417
|
-
/** Custom props for the rating component */
|
|
418
|
-
ratingProps?: Record<string, any>;
|
|
419
|
-
/** Custom props for the error component */
|
|
420
|
-
errorProps?: Record<string, any>;
|
|
421
|
-
/** Custom props for the helper text component */
|
|
422
|
-
helperTextProps?: Record<string, any>;
|
|
423
|
-
/** Custom class name for the root container */
|
|
291
|
+
/** Callback when the rating changes */
|
|
292
|
+
onChange?: (value: number | null) => void;
|
|
293
|
+
/** Custom class names */
|
|
424
294
|
className?: string;
|
|
425
|
-
/** Custom class name for the label */
|
|
426
295
|
labelClassName?: string;
|
|
427
|
-
/** Custom class name for the rating */
|
|
428
|
-
ratingClassName?: string;
|
|
429
|
-
/** Custom class name for the error */
|
|
430
296
|
errorClassName?: string;
|
|
431
|
-
|
|
432
|
-
|
|
297
|
+
containerClassName?: string;
|
|
298
|
+
starsClassName?: string;
|
|
433
299
|
}
|
|
434
300
|
declare const AppRating: React$1.ForwardRefExoticComponent<AppRatingProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
435
301
|
|
|
302
|
+
type EditorButton = "bold" | "italic" | "underline" | "strike" | "bulletList" | "orderedList" | "alignLeft" | "alignCenter" | "alignRight" | "heading1" | "heading2" | "undo" | "redo" | "link";
|
|
436
303
|
interface Props$1 {
|
|
437
304
|
name: string;
|
|
438
305
|
label?: string;
|
|
439
306
|
placeholder?: string;
|
|
440
307
|
required?: boolean;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
errorSx?: SxProps<Theme>;
|
|
448
|
-
labelSx?: SxProps<Theme>;
|
|
449
|
-
buttonSx?: SxProps<Theme>;
|
|
450
|
-
activeButtonSx?: SxProps<Theme>;
|
|
451
|
-
dialogSx?: SxProps<Theme>;
|
|
308
|
+
className?: string;
|
|
309
|
+
editorClassName?: string;
|
|
310
|
+
toolbarClassName?: string;
|
|
311
|
+
labelClassName?: string;
|
|
312
|
+
errorClassName?: string;
|
|
313
|
+
showButtons?: EditorButton[];
|
|
452
314
|
}
|
|
453
|
-
declare const AppRichTextEditor:
|
|
315
|
+
declare const AppRichTextEditor: React__default.FC<Props$1>;
|
|
454
316
|
|
|
455
317
|
interface AppSelectOption {
|
|
456
318
|
label: string;
|
|
457
319
|
value: string | number;
|
|
458
320
|
disabled?: boolean;
|
|
459
|
-
sx?: SxProps<Theme>;
|
|
460
|
-
textSx?: SxProps<Theme>;
|
|
461
321
|
icon?: ReactNode;
|
|
462
322
|
}
|
|
463
|
-
interface
|
|
323
|
+
interface AppSelectInputProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "name"> {
|
|
464
324
|
name: string;
|
|
465
325
|
label?: string;
|
|
466
326
|
options: AppSelectOption[];
|
|
467
327
|
required?: boolean;
|
|
468
|
-
disabled?: boolean;
|
|
469
328
|
showNoneOption?: boolean;
|
|
470
329
|
noneOptionText?: string;
|
|
471
330
|
helperText?: string;
|
|
472
|
-
variant?: "outlined" | "filled" | "standard";
|
|
473
331
|
placeholder?: string;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
interface AutocompleteSelectProps extends BaseSelectProps {
|
|
480
|
-
mode?: "autocomplete";
|
|
481
|
-
onSearchChange?: (query: string) => void;
|
|
482
|
-
searchDebounce?: number;
|
|
483
|
-
clearable?: boolean;
|
|
484
|
-
}
|
|
485
|
-
interface DropdownSelectProps extends BaseSelectProps {
|
|
486
|
-
mode: "dropdown";
|
|
487
|
-
onSearchChange?: never;
|
|
488
|
-
searchDebounce?: never;
|
|
489
|
-
clearable?: never;
|
|
332
|
+
className?: string;
|
|
333
|
+
labelClassName?: string;
|
|
334
|
+
errorClassName?: string;
|
|
335
|
+
containerClassName?: string;
|
|
336
|
+
onValueChange?: (value: string | number) => void;
|
|
490
337
|
}
|
|
491
|
-
|
|
492
|
-
declare const AppSelectInput: React__default.ForwardRefExoticComponent<AppSelectInputProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
338
|
+
declare const AppSelectInput: React__default.ForwardRefExoticComponent<AppSelectInputProps & React__default.RefAttributes<HTMLSelectElement>>;
|
|
493
339
|
|
|
494
340
|
interface AppSimpleUploadFileProps {
|
|
495
341
|
name: string;
|
|
@@ -500,79 +346,57 @@ interface AppSimpleUploadFileProps {
|
|
|
500
346
|
required?: boolean;
|
|
501
347
|
maxFiles?: number;
|
|
502
348
|
maxSizeInBytes?: number;
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
349
|
+
helperText?: string;
|
|
350
|
+
className?: string;
|
|
351
|
+
containerClassName?: string;
|
|
352
|
+
labelClassName?: string;
|
|
353
|
+
errorClassName?: string;
|
|
354
|
+
buttonClassName?: string;
|
|
355
|
+
fileListClassName?: string;
|
|
506
356
|
onAdd?: (file: File) => void;
|
|
507
357
|
onRemove?: (file: File) => void;
|
|
508
358
|
onError?: (error: string) => void;
|
|
509
359
|
}
|
|
510
360
|
declare const AppSimpleUploadFile: React__default.FC<AppSimpleUploadFileProps>;
|
|
511
361
|
|
|
512
|
-
interface
|
|
513
|
-
id?: number | string;
|
|
514
|
-
preview?: string;
|
|
515
|
-
url?: string;
|
|
516
|
-
is_private?: boolean;
|
|
517
|
-
[key: string]: unknown;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
interface CustomFile extends File {
|
|
521
|
-
path?: string;
|
|
522
|
-
preview?: string;
|
|
523
|
-
lastModifiedDate?: Date;
|
|
524
|
-
}
|
|
525
|
-
interface UploadProps extends DropzoneOptions {
|
|
526
|
-
error?: boolean;
|
|
527
|
-
sx?: SxProps<Theme$1>;
|
|
528
|
-
thumbnail?: boolean;
|
|
529
|
-
isClickable?: boolean;
|
|
530
|
-
placeholder?: React.ReactNode;
|
|
531
|
-
helperText?: React.ReactNode;
|
|
532
|
-
disableMultiple?: boolean;
|
|
533
|
-
isEditable?: boolean;
|
|
534
|
-
onDeleteButtonClick?: (file: FileItem) => void;
|
|
535
|
-
onPrivacyUpdateClick?: (file: FileItem) => void;
|
|
536
|
-
file?: CustomFile | string | File;
|
|
537
|
-
onDelete?: VoidFunction;
|
|
538
|
-
files?: (File | string | {
|
|
539
|
-
name: string;
|
|
540
|
-
url: string;
|
|
541
|
-
})[];
|
|
542
|
-
onUpload?: VoidFunction;
|
|
543
|
-
onRemove?: (file: CustomFile | string) => void;
|
|
544
|
-
onRemoveAll?: VoidFunction;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
interface AppUploadFilePropTypes extends UploadProps {
|
|
362
|
+
interface AppUploadFileProps {
|
|
548
363
|
name: string;
|
|
549
364
|
label?: string;
|
|
365
|
+
multiple?: boolean;
|
|
366
|
+
maxFiles?: number;
|
|
367
|
+
maxSize?: number;
|
|
368
|
+
accept?: Accept;
|
|
369
|
+
disabled?: boolean;
|
|
370
|
+
required?: boolean;
|
|
371
|
+
helperText?: string;
|
|
372
|
+
className?: string;
|
|
373
|
+
containerClassName?: string;
|
|
374
|
+
labelClassName?: string;
|
|
375
|
+
errorClassName?: string;
|
|
376
|
+
dropzoneClassName?: string;
|
|
377
|
+
fileListClassName?: string;
|
|
550
378
|
}
|
|
551
|
-
declare const AppUploadFile: ({ name,
|
|
379
|
+
declare const AppUploadFile: ({ name, label, multiple, maxFiles, maxSize, accept, disabled, required, helperText, className, containerClassName, labelClassName, errorClassName, dropzoneClassName, fileListClassName, }: AppUploadFileProps) => react_jsx_runtime.JSX.Element;
|
|
552
380
|
|
|
553
|
-
interface SubmitButtonProps {
|
|
381
|
+
interface SubmitButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
554
382
|
children: React__default.ReactNode;
|
|
555
383
|
loading?: boolean;
|
|
556
|
-
disabled?: boolean;
|
|
557
384
|
fullWidth?: boolean;
|
|
558
|
-
variant?:
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
endIcon?: React__default.ReactNode;
|
|
563
|
-
sx?: SxProps<Theme>;
|
|
564
|
-
buttonSx?: SxProps<Theme>;
|
|
565
|
-
loadingSx?: SxProps<Theme>;
|
|
566
|
-
disabledSx?: SxProps<Theme>;
|
|
567
|
-
[key: string]: any;
|
|
385
|
+
variant?: "primary" | "secondary" | "outlined" | "text";
|
|
386
|
+
size?: "small" | "medium" | "large";
|
|
387
|
+
loadingText?: string;
|
|
388
|
+
className?: string;
|
|
568
389
|
}
|
|
569
|
-
declare const SubmitButton: ({ children, loading, disabled, fullWidth, variant,
|
|
390
|
+
declare const SubmitButton: ({ children, loading, disabled, fullWidth, variant, size, loadingText, className, ...rest }: SubmitButtonProps) => React__default.JSX.Element;
|
|
570
391
|
|
|
571
392
|
type IconifyProps = IconifyIcon | string;
|
|
572
393
|
|
|
573
|
-
interface Props extends
|
|
394
|
+
interface Props extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
574
395
|
icon: IconifyProps;
|
|
396
|
+
width?: number | string;
|
|
397
|
+
height?: number | string;
|
|
398
|
+
color?: string;
|
|
575
399
|
}
|
|
576
|
-
declare const Iconify: React$1.ForwardRefExoticComponent<
|
|
400
|
+
declare const Iconify: React$1.ForwardRefExoticComponent<Props & React$1.RefAttributes<HTMLSpanElement>>;
|
|
577
401
|
|
|
578
|
-
export { AppAutoComplete, AppAutoCompleter, AppCheckBox, AppDateAndTimePicker, AppDatePicker, AppFormErrorMessage, AppInputField, AppMultiSelector, AppPhoneNoInput, AppRadioGroup, AppRating, AppRichTextEditor, AppSelectInput, AppSimpleUploadFile, AppSwitch, AppSwitchInput, AppTagsCreator, AppTextArea, AppUploadFile, Form, Iconify, IconifyProps,
|
|
402
|
+
export { AppAutoComplete, AppAutoCompleter, AppCheckBox, AppDateAndTimePicker, AppDatePicker, AppFormErrorMessage, AppInputField, AppMultiSelector, AppPhoneNoInput, AppRadioGroup, AppRating, AppRichTextEditor, AppSelectInput, AppSelectOption, AppSimpleUploadFile, AppSwitch, AppSwitchInput, AppTagsCreator, AppTextArea, AppUploadFile, CheckboxOption, Form, Iconify, IconifyProps, RadioOption, SelectOption, SubmitButton };
|