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/dist/index.d.ts CHANGED
@@ -1,104 +1,52 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactElement, ReactNode, SyntheticEvent, ElementType } from 'react';
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 { DropzoneOptions } from 'react-dropzone';
6
+ import { Accept } from 'react-dropzone';
10
7
  import { IconifyIcon } from '@iconify/react';
11
8
 
12
- type AppDatePickerProps = {
9
+ declare const AppDatePicker: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "name" | "type" | "value"> & {
13
10
  name: string;
14
11
  label?: string;
15
- disabled?: boolean;
16
- format?: string;
17
- sx?: SxProps<Theme>;
18
- textFieldSx?: SxProps<Theme>;
19
- };
20
- declare const AppDatePicker: React__default.ForwardRefExoticComponent<AppDatePickerProps & React__default.RefAttributes<HTMLDivElement>>;
21
-
22
- interface AppSelectOptions {
23
- label: string;
24
- value: string | number;
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
- interface AppDateAndTimePickerProps {
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
- /** Callback when the value changes */
78
- onChange?: (value: Dayjs | null) => void;
79
- /** Callback when the field is blurred */
80
- onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
81
- /** Additional props to pass to the DateTimePicker */
82
- [key: string]: any;
83
- }
84
- declare const AppDateAndTimePicker: React__default.ForwardRefExoticComponent<Omit<AppDateAndTimePickerProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
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$6 {
37
+ interface Props$2 {
87
38
  name: string;
88
39
  alwaysShow?: boolean;
89
- sx?: SxProps<Theme>;
90
- containerSx?: SxProps<Theme>;
91
- textSx?: SxProps<Theme>;
40
+ className?: string;
41
+ containerClassName?: string;
92
42
  }
93
- declare function AppFormErrorMessage({ name, alwaysShow, sx, containerSx, textSx }: Props$6): React.JSX.Element | null;
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
- /** Custom styles for the root container */
117
- sx?: SxProps<Theme>;
118
- /** Custom styles for the TextField component */
119
- textFieldSx?: SxProps<Theme>;
120
- /** Custom styles for the label */
121
- labelSx?: SxProps<Theme>;
122
- /** Custom styles for the input */
123
- inputSx?: SxProps<Theme>;
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
- onChange?: (value: string) => void;
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<Omit<AppTextAreaProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
71
+ declare const AppTextArea: React$1.ForwardRefExoticComponent<AppTextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
138
72
 
139
- interface Props$5 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChange'> {
73
+ interface AppTagsCreatorProps {
140
74
  name: string;
141
- freeSolo?: boolean;
142
- multiple?: boolean;
143
75
  label?: string;
144
76
  placeholder?: string;
145
- options: string[];
77
+ options?: string[];
146
78
  disabled?: boolean;
147
- sx?: SxProps<Theme>;
148
- formControlSx?: SxProps<Theme>;
149
- textFieldSx?: SxProps<Theme>;
150
- chipSx?: SxProps<Theme>;
151
- listboxSx?: SxProps<Theme>;
152
- errorSx?: SxProps<Theme>;
153
- chipContainerSx?: SxProps<Theme>;
154
- inputSx?: SxProps<Theme>;
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, multiple, label, options, disabled, sx, formControlSx, textFieldSx, chipSx, listboxSx, errorSx, chipContainerSx, inputSx, }: Props$5): React.JSX.Element;
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
- sx?: SxProps<Theme>;
163
- containerSx?: SxProps<Theme>;
164
- switchSx?: SxProps<Theme>;
165
- labelSx?: SxProps<Theme>;
166
- errorSx?: SxProps<Theme>;
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
- [key: string]: unknown;
101
+ onValueChange?: (value: boolean) => void;
170
102
  }
171
- declare function AppSwitchInput({ name, label, className, sx, containerSx, switchSx, labelSx, errorSx, labelPlacement, disabled, ...otherProps }: AppSwitchInputProps): React__default.JSX.Element;
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
- sx?: SxProps<Theme>;
177
- containerSx?: SxProps<Theme>;
178
- switchSx?: SxProps<Theme>;
179
- labelSx?: SxProps<Theme>;
180
- errorSx?: SxProps<Theme>;
181
- labelPlacement?: "start" | "end" | "top" | "bottom";
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, sx, containerSx, switchSx, labelSx, errorSx, labelPlacement, disabled, ...otherProps }: AppSwitchProps): React.JSX.Element;
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 Props$4 extends Omit<AutocompleteProps<string, true, boolean, false, 'div'>, 'renderInput' | 'onChange' | 'value' | 'multiple' | 'freeSolo'> {
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: string[];
198
- value?: string[];
199
- onChange?: (event: SyntheticEvent, value: string[], reason: AutocompleteChangeReason, details?: AutocompleteChangeDetails<string>) => void;
200
- /** Variant of the input field */
201
- variant?: "outlined" | "filled" | "standard";
202
- sx?: SxProps<Theme$1>;
203
- formControlSx?: SxProps<Theme$1>;
204
- textFieldSx?: SxProps<Theme$1>;
205
- chipSx?: SxProps<Theme$1>;
206
- errorSx?: SxProps<Theme$1>;
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 AppAutoComplete({ placeholder, name, variant, label, options, value: propValue, onChange: propOnChange, sx, formControlSx, textFieldSx, chipSx, errorSx, }: Props$4): React.JSX.Element;
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 | boolean | number;
171
+ value: string | number | boolean;
214
172
  disabled?: boolean;
215
173
  }
216
- interface Props$3 {
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
- /** Label for the checkbox group */
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
- /** Custom styles for the root container */
230
- sx?: SxProps<Theme>;
231
- /** Custom styles for the checkbox component */
232
- checkboxSx?: SxProps<Theme>;
233
- /** Custom styles for the label */
234
- labelSx?: SxProps<Theme>;
235
- /** Custom styles for the error message */
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, sx, checkboxSx, labelSx, errorSx, containerSx, iconSx, checkedSx, ...rest }: Props$3) => react_jsx_runtime.JSX.Element;
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 Props$2 extends Omit<TextFieldProps, 'variant'> {
191
+ interface CustomInputProps {
247
192
  name: string;
248
- label: ReactNode;
249
- tagUser?: string;
250
- hasReply?: boolean;
193
+ label?: ReactNode;
251
194
  required?: boolean;
252
- variant?: 'outlined' | 'filled' | 'standard';
195
+ helperText?: string;
196
+ className?: string;
197
+ labelClassName?: string;
198
+ errorClassName?: string;
199
+ containerClassName?: string;
253
200
  }
254
- declare function AppInputField({ name, label, type, InputProps, required, variant, ...otherProps }: Props$2): React__default.JSX.Element;
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 BaseMultiSelectProps {
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
- sx?: SxProps<Theme>;
276
- formControlSx?: SxProps<Theme>;
277
- labelSx?: SxProps<Theme>;
278
- chipSx?: SxProps<Theme>;
279
- checkboxSx?: SxProps<Theme>;
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
- sx?: SxProps<Theme>;
305
- containerSx?: SxProps<Theme>;
306
- labelSx?: SxProps<Theme>;
307
- inputSx?: React__default.CSSProperties;
308
- errorSx?: SxProps<Theme>;
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 extends Omit<RadioGroupProps, 'onChange' | 'onBlur' | 'value'> {
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
- /** Custom styles for the root container */
342
- sx?: SxProps<Theme>;
343
- /** Custom styles for the form control */
344
- formControlSx?: SxProps<Theme>;
345
- /** Custom styles for the radio group */
346
- radioGroupSx?: SxProps<Theme>;
347
- /** Custom styles for the form label */
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<Omit<AppRadioGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
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" | number;
379
- /** Custom icon for empty rating */
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
- /** Custom component for the label */
408
- labelComponent?: ElementType;
409
- /** Custom component for the rating */
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
- /** Custom class name for the helper text */
432
- helperTextClassName?: string;
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
- /** Variant of the input field */
442
- variant?: "outlined" | "filled" | "standard";
443
- sx?: SxProps<Theme>;
444
- editorSx?: SxProps<Theme>;
445
- toolbarSx?: SxProps<Theme>;
446
- contentSx?: SxProps<Theme>;
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: ({ name, label, required, variant, placeholder, sx, editorSx, toolbarSx, contentSx, errorSx, labelSx, buttonSx, activeButtonSx, dialogSx, }: Props$1) => react_jsx_runtime.JSX.Element | null;
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 BaseSelectProps {
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
- sx?: SxProps<Theme>;
475
- formControlSx?: SxProps<Theme>;
476
- labelSx?: SxProps<Theme>;
477
- onChange?: (value: string | number) => void;
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
- type AppSelectInputProps = AutocompleteSelectProps | DropdownSelectProps;
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
- sx?: SxProps<Theme>;
504
- buttonSx?: SxProps<Theme>;
505
- errorSx?: SxProps<Theme>;
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 FileItem extends File {
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, ...rest }: AppUploadFilePropTypes) => react_jsx_runtime.JSX.Element;
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?: 'text' | 'outlined' | 'contained';
559
- color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
560
- size?: 'small' | 'medium' | 'large';
561
- startIcon?: React__default.ReactNode;
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, color, size, startIcon, endIcon, sx, buttonSx, loadingSx, disabledSx, ...rest }: SubmitButtonProps) => React__default.JSX.Element;
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 BoxProps {
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<Omit<Props, "ref"> & React$1.RefAttributes<SVGElement>>;
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, SubmitButton, UploadProps };
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 };