formik-form-components 0.2.26 → 0.2.28
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 +91 -184
- package/dist/index.js +761 -1122
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +731 -1092
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactElement, ReactNode, SyntheticEvent, ElementType, SetStateAction } from 'react';
|
|
3
3
|
import { FormikValues, FormikConfig, FormikProps } from 'formik';
|
|
4
|
-
import { SxProps, Theme, AutocompleteProps, AutocompleteChangeReason, AutocompleteChangeDetails, TextFieldProps,
|
|
4
|
+
import { SxProps, Theme, AutocompleteProps, AutocompleteChangeReason, AutocompleteChangeDetails, TextFieldProps, RadioGroupProps, AutocompleteRenderInputParams, AutocompleteRenderOptionState, AutocompleteRenderGroupParams, CheckboxProps, ChipProps, BoxProps } from '@mui/material';
|
|
5
5
|
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
6
|
-
import { SelectProps
|
|
6
|
+
import { SelectProps } from '@mui/material/Select';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import { Dayjs } from 'dayjs';
|
|
9
9
|
import { DropzoneOptions } from 'react-dropzone';
|
|
@@ -19,15 +19,15 @@ type AppDatePickerProps = {
|
|
|
19
19
|
};
|
|
20
20
|
declare const AppDatePicker: React__default.ForwardRefExoticComponent<AppDatePickerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
|
|
22
|
-
interface AppSelectOptions$
|
|
22
|
+
interface AppSelectOptions$2 {
|
|
23
23
|
label: string;
|
|
24
24
|
value: string | number;
|
|
25
25
|
}
|
|
26
|
-
interface Props$
|
|
26
|
+
interface Props$8 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChange'> {
|
|
27
27
|
name: string;
|
|
28
28
|
label?: string;
|
|
29
29
|
placeholder?: string;
|
|
30
|
-
options: AppSelectOptions$
|
|
30
|
+
options: AppSelectOptions$2[];
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
sx?: SxProps<Theme>;
|
|
33
33
|
formControlSx?: SxProps<Theme>;
|
|
@@ -35,7 +35,7 @@ interface Props$7 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChan
|
|
|
35
35
|
listboxSx?: SxProps<Theme>;
|
|
36
36
|
errorSx?: SxProps<Theme>;
|
|
37
37
|
}
|
|
38
|
-
declare function AppAutoCompleter({ placeholder, name, label, options, disabled, sx, formControlSx, textFieldSx, listboxSx, errorSx }: Props$
|
|
38
|
+
declare function AppAutoCompleter({ placeholder, name, label, options, disabled, sx, formControlSx, textFieldSx, listboxSx, errorSx }: Props$8): React.JSX.Element;
|
|
39
39
|
|
|
40
40
|
interface AppDateAndTimePickerProps {
|
|
41
41
|
/** Field name for formik */
|
|
@@ -83,14 +83,14 @@ interface AppDateAndTimePickerProps {
|
|
|
83
83
|
}
|
|
84
84
|
declare const AppDateAndTimePicker: React__default.ForwardRefExoticComponent<Omit<AppDateAndTimePickerProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
85
85
|
|
|
86
|
-
interface Props$
|
|
86
|
+
interface Props$7 {
|
|
87
87
|
name: string;
|
|
88
88
|
alwaysShow?: boolean;
|
|
89
89
|
sx?: SxProps<Theme>;
|
|
90
90
|
containerSx?: SxProps<Theme>;
|
|
91
91
|
textSx?: SxProps<Theme>;
|
|
92
92
|
}
|
|
93
|
-
declare function AppFormErrorMessage({ name, alwaysShow, sx, containerSx, textSx }: Props$
|
|
93
|
+
declare function AppFormErrorMessage({ name, alwaysShow, sx, containerSx, textSx }: Props$7): React.JSX.Element | null;
|
|
94
94
|
|
|
95
95
|
interface AppTextAreaProps {
|
|
96
96
|
/** Field name for formik */
|
|
@@ -136,7 +136,7 @@ interface AppTextAreaProps {
|
|
|
136
136
|
}
|
|
137
137
|
declare const AppTextArea: React$1.ForwardRefExoticComponent<Omit<AppTextAreaProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
138
138
|
|
|
139
|
-
interface Props$
|
|
139
|
+
interface Props$6 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChange'> {
|
|
140
140
|
name: string;
|
|
141
141
|
freeSolo?: boolean;
|
|
142
142
|
multiple?: boolean;
|
|
@@ -153,7 +153,7 @@ interface Props$5 extends Omit<SelectProps, 'name' | 'label' | 'value' | 'onChan
|
|
|
153
153
|
chipContainerSx?: SxProps<Theme>;
|
|
154
154
|
inputSx?: SxProps<Theme>;
|
|
155
155
|
}
|
|
156
|
-
declare function AppTagsCreator({ placeholder, name, multiple, label, options, disabled, sx, formControlSx, textFieldSx, chipSx, listboxSx, errorSx, chipContainerSx, inputSx, }: Props$
|
|
156
|
+
declare function AppTagsCreator({ placeholder, name, multiple, label, options, disabled, sx, formControlSx, textFieldSx, chipSx, listboxSx, errorSx, chipContainerSx, inputSx, }: Props$6): React.JSX.Element;
|
|
157
157
|
|
|
158
158
|
interface AppSwitchInputProps {
|
|
159
159
|
name: string;
|
|
@@ -164,7 +164,7 @@ interface AppSwitchInputProps {
|
|
|
164
164
|
switchSx?: SxProps<Theme>;
|
|
165
165
|
labelSx?: SxProps<Theme>;
|
|
166
166
|
errorSx?: SxProps<Theme>;
|
|
167
|
-
labelPlacement?:
|
|
167
|
+
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
168
168
|
disabled?: boolean;
|
|
169
169
|
[key: string]: unknown;
|
|
170
170
|
}
|
|
@@ -178,7 +178,7 @@ interface AppSwitchProps {
|
|
|
178
178
|
switchSx?: SxProps<Theme>;
|
|
179
179
|
labelSx?: SxProps<Theme>;
|
|
180
180
|
errorSx?: SxProps<Theme>;
|
|
181
|
-
labelPlacement?:
|
|
181
|
+
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
182
182
|
disabled?: boolean;
|
|
183
183
|
}
|
|
184
184
|
declare function AppSwitch({ name, label, sx, containerSx, switchSx, labelSx, errorSx, labelPlacement, disabled, ...otherProps }: AppSwitchProps): React.JSX.Element;
|
|
@@ -189,7 +189,7 @@ interface FormProps<T> extends FormikConfig<T> {
|
|
|
189
189
|
}
|
|
190
190
|
declare const Form: <T extends FormikValues>({ children, className, ...props }: FormProps<T>) => ReactElement;
|
|
191
191
|
|
|
192
|
-
interface Props$
|
|
192
|
+
interface Props$5 extends Omit<AutocompleteProps<string, true, boolean, false, 'div'>, 'renderInput' | 'onChange' | 'value' | 'multiple' | 'freeSolo'> {
|
|
193
193
|
name: string;
|
|
194
194
|
freeSolo?: boolean;
|
|
195
195
|
label?: string;
|
|
@@ -205,7 +205,7 @@ interface Props$4 extends Omit<AutocompleteProps<string, true, boolean, false, '
|
|
|
205
205
|
chipSx?: SxProps<Theme$1>;
|
|
206
206
|
errorSx?: SxProps<Theme$1>;
|
|
207
207
|
}
|
|
208
|
-
declare function AppAutoComplete({ placeholder, name, variant, label, options, value: propValue, onChange: propOnChange, sx, formControlSx, textFieldSx, chipSx, errorSx, }: Props$
|
|
208
|
+
declare function AppAutoComplete({ placeholder, name, variant, label, options, value: propValue, onChange: propOnChange, sx, formControlSx, textFieldSx, chipSx, errorSx, }: Props$5): React.JSX.Element;
|
|
209
209
|
|
|
210
210
|
interface CheckboxOption {
|
|
211
211
|
label: string;
|
|
@@ -213,7 +213,7 @@ interface CheckboxOption {
|
|
|
213
213
|
value: string | boolean | number;
|
|
214
214
|
disabled?: boolean;
|
|
215
215
|
}
|
|
216
|
-
interface Props$
|
|
216
|
+
interface Props$4 {
|
|
217
217
|
/** Array of checkbox options with label and value */
|
|
218
218
|
option: CheckboxOption[];
|
|
219
219
|
/** Field name for formik */
|
|
@@ -241,9 +241,9 @@ interface Props$3 {
|
|
|
241
241
|
/** Custom styles for the checked state */
|
|
242
242
|
checkedSx?: SxProps<Theme>;
|
|
243
243
|
}
|
|
244
|
-
declare const AppCheckBox: ({ name, option, label, required, disabled, row, sx, checkboxSx, labelSx, errorSx, containerSx, iconSx, checkedSx, ...rest }: Props$
|
|
244
|
+
declare const AppCheckBox: ({ name, option, label, required, disabled, row, sx, checkboxSx, labelSx, errorSx, containerSx, iconSx, checkedSx, ...rest }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
245
245
|
|
|
246
|
-
interface Props$
|
|
246
|
+
interface Props$3 extends Omit<TextFieldProps, 'variant'> {
|
|
247
247
|
name: string;
|
|
248
248
|
label: ReactNode;
|
|
249
249
|
tagUser?: string;
|
|
@@ -251,75 +251,52 @@ interface Props$2 extends Omit<TextFieldProps, 'variant'> {
|
|
|
251
251
|
required?: boolean;
|
|
252
252
|
variant?: 'outlined' | 'filled' | 'standard';
|
|
253
253
|
}
|
|
254
|
-
declare function AppInputField({ name, label, type, InputProps, required, variant, ...otherProps }: Props$
|
|
254
|
+
declare function AppInputField({ name, label, type, InputProps, required, variant, ...otherProps }: Props$3): React__default.JSX.Element;
|
|
255
255
|
|
|
256
|
-
interface
|
|
257
|
-
/** The label to display for this option */
|
|
256
|
+
interface AppSelectOption$1 {
|
|
258
257
|
label: string;
|
|
259
|
-
/** The value to be used when this option is selected */
|
|
260
258
|
value: string | number;
|
|
261
|
-
/** Whether this option is disabled */
|
|
262
259
|
disabled?: boolean;
|
|
263
|
-
|
|
260
|
+
searchAbleValue1?: string;
|
|
261
|
+
searchAbleValue2?: string;
|
|
262
|
+
searchAbleValue3?: string;
|
|
264
263
|
sx?: SxProps<Theme>;
|
|
265
|
-
/** Custom styles for this specific menu item text */
|
|
266
264
|
textSx?: SxProps<Theme>;
|
|
265
|
+
icon?: ReactNode;
|
|
267
266
|
}
|
|
268
|
-
interface
|
|
269
|
-
/** Field name for formik */
|
|
267
|
+
interface BaseMultiSelectProps {
|
|
270
268
|
name: string;
|
|
271
|
-
/** Label for the multi-selector */
|
|
272
269
|
label?: string;
|
|
273
|
-
|
|
274
|
-
multiple?: boolean;
|
|
275
|
-
/** Array of select options */
|
|
276
|
-
options: AppSelectOptions$3[];
|
|
277
|
-
/** Whether the field is required */
|
|
270
|
+
options: AppSelectOption$1[];
|
|
278
271
|
required?: boolean;
|
|
279
|
-
/** Whether the field is disabled */
|
|
280
272
|
disabled?: boolean;
|
|
281
|
-
/** Maximum number of items that can be selected */
|
|
282
273
|
maxSelections?: number;
|
|
283
|
-
/** Whether to show the selected count in the label */
|
|
284
274
|
showSelectedCount?: boolean;
|
|
285
|
-
/** Whether to show the helper text when no error */
|
|
286
|
-
showHelperText?: boolean;
|
|
287
|
-
/** Variant of the input field */
|
|
288
|
-
variant?: 'outlined' | 'filled' | 'standard';
|
|
289
|
-
/** Custom helper text to display */
|
|
290
275
|
helperText?: string;
|
|
291
|
-
|
|
276
|
+
variant?: "outlined" | "filled" | "standard";
|
|
277
|
+
placeholder?: string;
|
|
292
278
|
sx?: SxProps<Theme>;
|
|
293
|
-
/** Custom styles for the form control */
|
|
294
279
|
formControlSx?: SxProps<Theme>;
|
|
295
|
-
/** Custom styles for the select component */
|
|
296
|
-
selectSx?: SxProps<Theme>;
|
|
297
|
-
/** Custom styles for the label */
|
|
298
280
|
labelSx?: SxProps<Theme>;
|
|
299
|
-
/** Custom styles for the chip components */
|
|
300
281
|
chipSx?: SxProps<Theme>;
|
|
301
|
-
/** Custom styles for the checkbox components */
|
|
302
282
|
checkboxSx?: SxProps<Theme>;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
/** Custom render function for the selected value */
|
|
318
|
-
renderValue?: (selected: Array<string | number>) => ReactNode;
|
|
319
|
-
/** Custom render function for menu items */
|
|
320
|
-
renderMenuItem?: (option: AppSelectOptions$3, isSelected: boolean) => ReactNode;
|
|
283
|
+
onChange?: (value: Array<string | number>) => void;
|
|
284
|
+
onMaxSelectionsReached?: (maxSelections: number) => void;
|
|
285
|
+
}
|
|
286
|
+
interface AutocompleteMultiSelectProps extends BaseMultiSelectProps {
|
|
287
|
+
mode?: "autocomplete";
|
|
288
|
+
onSearchChange?: (query: string) => void;
|
|
289
|
+
searchDebounce?: number;
|
|
290
|
+
clearable?: boolean;
|
|
291
|
+
}
|
|
292
|
+
interface DropdownMultiSelectProps extends BaseMultiSelectProps {
|
|
293
|
+
mode: "dropdown";
|
|
294
|
+
onSearchChange?: never;
|
|
295
|
+
searchDebounce?: never;
|
|
296
|
+
clearable?: never;
|
|
321
297
|
}
|
|
322
|
-
|
|
298
|
+
type AppMultiSelectorProps = AutocompleteMultiSelectProps | DropdownMultiSelectProps;
|
|
299
|
+
declare const AppMultiSelector: React__default.ForwardRefExoticComponent<AppMultiSelectorProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
323
300
|
|
|
324
301
|
interface AppPhoneNoInputProps {
|
|
325
302
|
name: string;
|
|
@@ -459,7 +436,7 @@ interface AppRatingProps {
|
|
|
459
436
|
}
|
|
460
437
|
declare const AppRating: React$1.ForwardRefExoticComponent<AppRatingProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
461
438
|
|
|
462
|
-
interface Props$
|
|
439
|
+
interface Props$2 {
|
|
463
440
|
name: string;
|
|
464
441
|
label?: string;
|
|
465
442
|
placeholder?: string;
|
|
@@ -476,9 +453,9 @@ interface Props$1 {
|
|
|
476
453
|
activeButtonSx?: SxProps<Theme>;
|
|
477
454
|
dialogSx?: SxProps<Theme>;
|
|
478
455
|
}
|
|
479
|
-
declare const AppRichTextEditor: ({ name, label, required, variant, placeholder, sx, editorSx, toolbarSx, contentSx, errorSx, labelSx, buttonSx, activeButtonSx, dialogSx, }: Props$
|
|
456
|
+
declare const AppRichTextEditor: ({ name, label, required, variant, placeholder, sx, editorSx, toolbarSx, contentSx, errorSx, labelSx, buttonSx, activeButtonSx, dialogSx, }: Props$2) => react_jsx_runtime.JSX.Element | null;
|
|
480
457
|
|
|
481
|
-
interface AppSelectOptions$
|
|
458
|
+
interface AppSelectOptions$1 {
|
|
482
459
|
/** Display text for the option */
|
|
483
460
|
label: string;
|
|
484
461
|
/** Unique value for the option */
|
|
@@ -502,8 +479,8 @@ interface AppSelectOptions$2 {
|
|
|
502
479
|
/** Custom props for the option component */
|
|
503
480
|
componentProps?: Record<string, any>;
|
|
504
481
|
}
|
|
505
|
-
type CustomAutocompleteProps
|
|
506
|
-
interface AppSearchableMultiSelectorProps
|
|
482
|
+
type CustomAutocompleteProps = Omit<AutocompleteProps<AppSelectOptions$1, boolean, boolean, boolean>, "renderInput" | "options" | "renderTags" | "onChange" | "value" | "multiple">;
|
|
483
|
+
interface AppSearchableMultiSelectorProps extends CustomAutocompleteProps {
|
|
507
484
|
/** Field name for formik */
|
|
508
485
|
name: string;
|
|
509
486
|
/** Label for the input */
|
|
@@ -511,9 +488,9 @@ interface AppSearchableMultiSelectorProps$1 extends CustomAutocompleteProps$1 {
|
|
|
511
488
|
/** Whether multiple selections are allowed */
|
|
512
489
|
multiple?: boolean;
|
|
513
490
|
/** Available options */
|
|
514
|
-
options: AppSelectOptions$
|
|
515
|
-
/** Callback when search query changes
|
|
516
|
-
setSearchQuery
|
|
491
|
+
options: AppSelectOptions$1[];
|
|
492
|
+
/** Callback when search query changes */
|
|
493
|
+
setSearchQuery: React__default.Dispatch<SetStateAction<string>>;
|
|
517
494
|
/** Whether the field is required */
|
|
518
495
|
required?: boolean;
|
|
519
496
|
/** Whether the field is disabled */
|
|
@@ -557,9 +534,9 @@ interface AppSearchableMultiSelectorProps$1 extends CustomAutocompleteProps$1 {
|
|
|
557
534
|
/** Custom render function for the input */
|
|
558
535
|
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
559
536
|
/** Custom render function for the option */
|
|
560
|
-
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement>, option: AppSelectOptions$
|
|
537
|
+
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement>, option: AppSelectOptions$1, state: AutocompleteRenderOptionState, ownerState: any) => ReactNode;
|
|
561
538
|
/** Custom render function for the selected value */
|
|
562
|
-
renderTags?: (value: AppSelectOptions$
|
|
539
|
+
renderTags?: (value: AppSelectOptions$1[], getTagProps: (params: {
|
|
563
540
|
index: number;
|
|
564
541
|
}) => {
|
|
565
542
|
key: number | string;
|
|
@@ -613,7 +590,7 @@ interface AppSearchableMultiSelectorProps$1 extends CustomAutocompleteProps$1 {
|
|
|
613
590
|
/** Custom class name for the helper text */
|
|
614
591
|
helperTextClassName?: string;
|
|
615
592
|
/** Callback when the selection changes */
|
|
616
|
-
onChange?: (event: React__default.SyntheticEvent, value: AppSelectOptions$
|
|
593
|
+
onChange?: (event: React__default.SyntheticEvent, value: AppSelectOptions$1[], reason: string) => void;
|
|
617
594
|
/** Callback when the input value changes */
|
|
618
595
|
onInputChange?: (event: React__default.SyntheticEvent, value: string, reason: string) => void;
|
|
619
596
|
/** Callback when the dropdown is opened */
|
|
@@ -629,142 +606,72 @@ interface AppSearchableMultiSelectorProps$1 extends CustomAutocompleteProps$1 {
|
|
|
629
606
|
/** Callback when the maximum number of selections is reached */
|
|
630
607
|
onMaxSelectionsReached?: (maxSelections: number) => void;
|
|
631
608
|
/** Callback when a selection is removed */
|
|
632
|
-
onRemove?: (value: AppSelectOptions$
|
|
609
|
+
onRemove?: (value: AppSelectOptions$1) => void;
|
|
633
610
|
/** Callback when a selection is added */
|
|
634
|
-
onAdd?: (value: AppSelectOptions$
|
|
611
|
+
onAdd?: (value: AppSelectOptions$1) => void;
|
|
635
612
|
}
|
|
636
|
-
declare const AppSearchableMultiSelector
|
|
613
|
+
declare const AppSearchableMultiSelector: React__default.ForwardRefExoticComponent<Omit<AppSearchableMultiSelectorProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
637
614
|
|
|
638
|
-
interface AppSelectOptions
|
|
615
|
+
interface AppSelectOptions {
|
|
639
616
|
label: string;
|
|
640
|
-
value:
|
|
617
|
+
value: string | number;
|
|
641
618
|
searchAbleValue1?: string;
|
|
642
619
|
searchAbleValue2?: string;
|
|
643
620
|
searchAbleValue3?: string;
|
|
644
|
-
disabled?: boolean;
|
|
645
|
-
sx?: SxProps<Theme>;
|
|
646
|
-
textSx?: SxProps<Theme>;
|
|
647
|
-
icon?: ReactNode;
|
|
648
|
-
component?: ElementType;
|
|
649
|
-
componentProps?: Record<string, any>;
|
|
650
621
|
}
|
|
651
|
-
|
|
652
|
-
interface AppSearchableMultiSelectorProps extends CustomAutocompleteProps {
|
|
622
|
+
interface Props$1 extends Omit<AutocompleteProps<AppSelectOptions, false, false, false>, "options" | "renderInput" | "value" | "onChange"> {
|
|
653
623
|
name: string;
|
|
654
|
-
label
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
setSearchQuery?: React__default.Dispatch<SetStateAction<string>>;
|
|
624
|
+
label: string;
|
|
625
|
+
options: AppSelectOptions[];
|
|
626
|
+
setSearchQuery?: React__default.Dispatch<SetStateAction<string>> | undefined;
|
|
658
627
|
required?: boolean;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
showHelperText?: boolean;
|
|
662
|
-
helperText?: string;
|
|
663
|
-
maxSelections?: number;
|
|
664
|
-
showSelectedCount?: boolean;
|
|
628
|
+
placeholder?: string;
|
|
629
|
+
isResetRequired?: boolean;
|
|
665
630
|
variant?: "outlined" | "filled" | "standard";
|
|
666
|
-
sx?: SxProps<Theme>;
|
|
667
|
-
formControlSx?: SxProps<Theme>;
|
|
668
|
-
labelSx?: SxProps<Theme>;
|
|
669
|
-
inputSx?: SxProps<Theme>;
|
|
670
|
-
textFieldSx?: SxProps<Theme>;
|
|
671
|
-
autocompleteSx?: SxProps<Theme>;
|
|
672
|
-
listboxSx?: SxProps<Theme>;
|
|
673
|
-
optionSx?: SxProps<Theme>;
|
|
674
|
-
chipSx?: SxProps<Theme>;
|
|
675
|
-
errorSx?: SxProps<Theme>;
|
|
676
|
-
helperTextSx?: SxProps<Theme>;
|
|
677
|
-
selectedCountSx?: SxProps<Theme>;
|
|
678
|
-
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
679
|
-
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement>, option: AppSelectOptions$1, state: AutocompleteRenderOptionState, ownerState: any) => ReactNode;
|
|
680
|
-
renderTags?: (value: AppSelectOptions$1[], getTagProps: (params: {
|
|
681
|
-
index: number;
|
|
682
|
-
}) => {
|
|
683
|
-
key: number | string;
|
|
684
|
-
}, ownerState: any) => ReactNode;
|
|
685
|
-
renderGroup?: (params: AutocompleteRenderGroupParams) => ReactNode;
|
|
686
|
-
labelComponent?: ElementType;
|
|
687
|
-
inputComponent?: ElementType;
|
|
688
|
-
errorComponent?: ElementType;
|
|
689
|
-
helperTextComponent?: ElementType;
|
|
690
|
-
labelProps?: Record<string, any>;
|
|
691
|
-
inputProps?: Record<string, any>;
|
|
692
|
-
textFieldProps?: Record<string, any>;
|
|
693
|
-
autocompleteProps?: Record<string, any>;
|
|
694
|
-
checkboxProps?: CheckboxProps;
|
|
695
|
-
chipProps?: ChipProps;
|
|
696
|
-
errorProps?: Record<string, any>;
|
|
697
|
-
helperTextProps?: Record<string, any>;
|
|
698
|
-
className?: string;
|
|
699
|
-
formControlClassName?: string;
|
|
700
|
-
labelClassName?: string;
|
|
701
|
-
inputClassName?: string;
|
|
702
|
-
textFieldClassName?: string;
|
|
703
|
-
autocompleteClassName?: string;
|
|
704
|
-
listboxClassName?: string;
|
|
705
|
-
optionClassName?: string;
|
|
706
|
-
chipClassName?: string;
|
|
707
|
-
errorClassName?: string;
|
|
708
|
-
helperTextClassName?: string;
|
|
709
|
-
onChange?: (event: React__default.SyntheticEvent, value: AppSelectOptions$1[], reason: string) => void;
|
|
710
|
-
onInputChange?: (event: React__default.SyntheticEvent, value: string, reason: string) => void;
|
|
711
|
-
onOpen?: (event: React__default.SyntheticEvent) => void;
|
|
712
|
-
onClose?: (event: React__default.SyntheticEvent, reason: string) => void;
|
|
713
|
-
onBlur?: (event: React__default.FocusEvent) => void;
|
|
714
|
-
onFocus?: (event: React__default.FocusEvent) => void;
|
|
715
|
-
onClear?: () => void;
|
|
716
|
-
onMaxSelectionsReached?: (maxSelections: number) => void;
|
|
717
|
-
onRemove?: (value: AppSelectOptions$1) => void;
|
|
718
|
-
onAdd?: (value: AppSelectOptions$1) => void;
|
|
719
631
|
}
|
|
720
|
-
declare
|
|
632
|
+
declare function AppSearchableSelectInput({ name, label, options, required, variant, placeholder, setSearchQuery, isResetRequired, ...otherProps }: Props$1): React__default.JSX.Element;
|
|
721
633
|
|
|
722
|
-
interface
|
|
634
|
+
interface AppSelectOption {
|
|
723
635
|
label: string;
|
|
724
636
|
value: string | number;
|
|
725
637
|
disabled?: boolean;
|
|
638
|
+
searchAbleValue1?: string;
|
|
639
|
+
searchAbleValue2?: string;
|
|
640
|
+
searchAbleValue3?: string;
|
|
726
641
|
sx?: SxProps<Theme>;
|
|
727
642
|
textSx?: SxProps<Theme>;
|
|
728
643
|
icon?: ReactNode;
|
|
729
|
-
component?: ElementType;
|
|
730
|
-
componentProps?: Record<string, any>;
|
|
731
644
|
}
|
|
732
|
-
interface
|
|
645
|
+
interface BaseSelectProps {
|
|
733
646
|
name: string;
|
|
734
647
|
label?: string;
|
|
735
|
-
options:
|
|
648
|
+
options: AppSelectOption[];
|
|
736
649
|
required?: boolean;
|
|
737
650
|
disabled?: boolean;
|
|
738
|
-
readOnly?: boolean;
|
|
739
|
-
variant?: "outlined" | "filled" | "standard";
|
|
740
651
|
showNoneOption?: boolean;
|
|
741
652
|
noneOptionText?: string;
|
|
742
|
-
showHelperText?: boolean;
|
|
743
653
|
helperText?: string;
|
|
654
|
+
variant?: "outlined" | "filled" | "standard";
|
|
655
|
+
placeholder?: string;
|
|
744
656
|
sx?: SxProps<Theme>;
|
|
745
657
|
formControlSx?: SxProps<Theme>;
|
|
746
|
-
selectSx?: SxProps<Theme>;
|
|
747
|
-
inputSx?: SxProps<Theme>;
|
|
748
658
|
labelSx?: SxProps<Theme>;
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
inputProps?: any;
|
|
766
|
-
}
|
|
767
|
-
declare const AppSelectInput: React$1.ForwardRefExoticComponent<Omit<AppSelectInputProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
659
|
+
onChange?: (value: string | number) => void;
|
|
660
|
+
}
|
|
661
|
+
interface AutocompleteSelectProps extends BaseSelectProps {
|
|
662
|
+
mode?: "autocomplete";
|
|
663
|
+
onSearchChange?: (query: string) => void;
|
|
664
|
+
searchDebounce?: number;
|
|
665
|
+
clearable?: boolean;
|
|
666
|
+
}
|
|
667
|
+
interface DropdownSelectProps extends BaseSelectProps {
|
|
668
|
+
mode: "dropdown";
|
|
669
|
+
onSearchChange?: never;
|
|
670
|
+
searchDebounce?: never;
|
|
671
|
+
clearable?: never;
|
|
672
|
+
}
|
|
673
|
+
type AppSelectInputProps = AutocompleteSelectProps | DropdownSelectProps;
|
|
674
|
+
declare const AppSelectInput: React__default.ForwardRefExoticComponent<AppSelectInputProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
768
675
|
|
|
769
676
|
interface AppSimpleUploadFileProps {
|
|
770
677
|
name: string;
|
|
@@ -850,4 +757,4 @@ interface Props extends BoxProps {
|
|
|
850
757
|
}
|
|
851
758
|
declare const Iconify: React$1.ForwardRefExoticComponent<Omit<Props, "ref"> & React$1.RefAttributes<SVGElement>>;
|
|
852
759
|
|
|
853
|
-
export { AppAutoComplete, AppAutoCompleter, AppCheckBox, AppDateAndTimePicker, AppDatePicker, AppFormErrorMessage, AppInputField, AppMultiSelector, AppPhoneNoInput, AppRadioGroup, AppRating, AppRichTextEditor, AppSearchableMultiSelector
|
|
760
|
+
export { AppAutoComplete, AppAutoCompleter, AppCheckBox, AppDateAndTimePicker, AppDatePicker, AppFormErrorMessage, AppInputField, AppMultiSelector, AppPhoneNoInput, AppRadioGroup, AppRating, AppRichTextEditor, AppSearchableMultiSelector, AppSearchableSelectInput, AppSelectInput, AppSimpleUploadFile, AppSwitch, AppSwitchInput, AppTagsCreator, AppTextArea, AppUploadFile, Form, Iconify, IconifyProps, SubmitButton, UploadProps };
|