formik-mui-fields 0.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/LICENSE +21 -0
- package/README.md +192 -0
- package/dist/index.cjs +646 -0
- package/dist/index.d.cts +103 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.js +660 -0
- package/package.json +120 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TextFieldProps, SelectProps, SliderProps, CheckboxProps, SwitchProps, AutocompleteProps, RatingProps, ToggleButtonGroupProps } from '@mui/material';
|
|
3
|
+
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
4
|
+
|
|
5
|
+
type Props$c = {
|
|
6
|
+
name: string;
|
|
7
|
+
} & Omit<TextFieldProps, "name" | "value" | "onChange" | "onBlur" | "error" | "helperText">;
|
|
8
|
+
declare const FormikTextField: ({ name, ...props }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
type Props$b = {
|
|
11
|
+
name: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
options: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
} & Omit<SelectProps, "name" | "value" | "onChange" | "onBlur" | "error">;
|
|
18
|
+
declare const FormikSelect: ({ name, label, options, ...props }: Props$b) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
type Props$a = {
|
|
21
|
+
name: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
options: {
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
row?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare const FormikRadioGroup: ({ name, label, options, row }: Props$a) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
type Props$9 = {
|
|
32
|
+
name: string;
|
|
33
|
+
label?: string;
|
|
34
|
+
} & Omit<SliderProps, "name" | "value" | "onChange">;
|
|
35
|
+
declare const FormikSlider: ({ name, label, ...props }: Props$9) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
type Props$8 = {
|
|
38
|
+
name: string;
|
|
39
|
+
label?: string;
|
|
40
|
+
};
|
|
41
|
+
declare const FormikColorPicker: ({ name, label }: Props$8) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
type Props$7 = {
|
|
44
|
+
name: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
};
|
|
47
|
+
declare const FormikFontPicker: ({ name, label }: Props$7) => react_jsx_runtime.JSX.Element;
|
|
48
|
+
|
|
49
|
+
type CropAspectOption = "1.91:1" | "1:1" | "3:1";
|
|
50
|
+
|
|
51
|
+
type Props$6 = {
|
|
52
|
+
name: string;
|
|
53
|
+
label?: string;
|
|
54
|
+
height?: number;
|
|
55
|
+
cropEnabled?: boolean;
|
|
56
|
+
cropOptions?: CropAspectOption[];
|
|
57
|
+
};
|
|
58
|
+
declare const FormikImageUpload: ({ name, label, height, cropEnabled, cropOptions, }: Props$6) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
type Props$5 = {
|
|
61
|
+
name: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
} & Omit<CheckboxProps, "name" | "value" | "checked" | "onChange" | "onBlur">;
|
|
64
|
+
declare const FormikCheckbox: ({ name, label, ...props }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
66
|
+
type Props$4 = {
|
|
67
|
+
name: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
} & Omit<SwitchProps, "name" | "value" | "checked" | "onChange" | "onBlur">;
|
|
70
|
+
declare const FormikSwitch: ({ name, label, ...props }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
|
|
72
|
+
type Props$3<T> = {
|
|
73
|
+
name: string;
|
|
74
|
+
label?: string;
|
|
75
|
+
options: T[];
|
|
76
|
+
getOptionLabel: (option: T) => string;
|
|
77
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
78
|
+
} & Omit<AutocompleteProps<T, false, false, false>, "renderInput" | "value" | "onChange" | "onBlur" | "options" | "getOptionLabel" | "isOptionEqualToValue">;
|
|
79
|
+
declare const FormikAutocomplete: <T>({ name, label, options, getOptionLabel, isOptionEqualToValue, ...props }: Props$3<T>) => react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
type Props$2 = {
|
|
82
|
+
name: string;
|
|
83
|
+
label?: string;
|
|
84
|
+
} & Omit<RatingProps, "name" | "value" | "onChange">;
|
|
85
|
+
declare const FormikRating: ({ name, label, ...props }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
86
|
+
|
|
87
|
+
type Props$1 = {
|
|
88
|
+
name: string;
|
|
89
|
+
label?: string;
|
|
90
|
+
options: {
|
|
91
|
+
value: string;
|
|
92
|
+
label: string;
|
|
93
|
+
}[];
|
|
94
|
+
} & Omit<ToggleButtonGroupProps, "value" | "onChange">;
|
|
95
|
+
declare const FormikToggleButtonGroup: ({ name, label, options, ...props }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
|
|
97
|
+
type Props = {
|
|
98
|
+
name: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
} & Omit<DatePickerProps, "value" | "onChange">;
|
|
101
|
+
declare const FormikDatePicker: ({ name, label, ...props }: Props) => react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
export { FormikAutocomplete, FormikCheckbox, FormikColorPicker, FormikDatePicker, FormikFontPicker, FormikImageUpload, FormikRadioGroup, FormikRating, FormikSelect, FormikSlider, FormikSwitch, FormikTextField, FormikToggleButtonGroup };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TextFieldProps, SelectProps, SliderProps, CheckboxProps, SwitchProps, AutocompleteProps, RatingProps, ToggleButtonGroupProps } from '@mui/material';
|
|
3
|
+
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
4
|
+
|
|
5
|
+
type Props$c = {
|
|
6
|
+
name: string;
|
|
7
|
+
} & Omit<TextFieldProps, "name" | "value" | "onChange" | "onBlur" | "error" | "helperText">;
|
|
8
|
+
declare const FormikTextField: ({ name, ...props }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
type Props$b = {
|
|
11
|
+
name: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
options: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
} & Omit<SelectProps, "name" | "value" | "onChange" | "onBlur" | "error">;
|
|
18
|
+
declare const FormikSelect: ({ name, label, options, ...props }: Props$b) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
type Props$a = {
|
|
21
|
+
name: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
options: {
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
row?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare const FormikRadioGroup: ({ name, label, options, row }: Props$a) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
type Props$9 = {
|
|
32
|
+
name: string;
|
|
33
|
+
label?: string;
|
|
34
|
+
} & Omit<SliderProps, "name" | "value" | "onChange">;
|
|
35
|
+
declare const FormikSlider: ({ name, label, ...props }: Props$9) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
type Props$8 = {
|
|
38
|
+
name: string;
|
|
39
|
+
label?: string;
|
|
40
|
+
};
|
|
41
|
+
declare const FormikColorPicker: ({ name, label }: Props$8) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
type Props$7 = {
|
|
44
|
+
name: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
};
|
|
47
|
+
declare const FormikFontPicker: ({ name, label }: Props$7) => react_jsx_runtime.JSX.Element;
|
|
48
|
+
|
|
49
|
+
type CropAspectOption = "1.91:1" | "1:1" | "3:1";
|
|
50
|
+
|
|
51
|
+
type Props$6 = {
|
|
52
|
+
name: string;
|
|
53
|
+
label?: string;
|
|
54
|
+
height?: number;
|
|
55
|
+
cropEnabled?: boolean;
|
|
56
|
+
cropOptions?: CropAspectOption[];
|
|
57
|
+
};
|
|
58
|
+
declare const FormikImageUpload: ({ name, label, height, cropEnabled, cropOptions, }: Props$6) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
type Props$5 = {
|
|
61
|
+
name: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
} & Omit<CheckboxProps, "name" | "value" | "checked" | "onChange" | "onBlur">;
|
|
64
|
+
declare const FormikCheckbox: ({ name, label, ...props }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
66
|
+
type Props$4 = {
|
|
67
|
+
name: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
} & Omit<SwitchProps, "name" | "value" | "checked" | "onChange" | "onBlur">;
|
|
70
|
+
declare const FormikSwitch: ({ name, label, ...props }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
|
|
72
|
+
type Props$3<T> = {
|
|
73
|
+
name: string;
|
|
74
|
+
label?: string;
|
|
75
|
+
options: T[];
|
|
76
|
+
getOptionLabel: (option: T) => string;
|
|
77
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
78
|
+
} & Omit<AutocompleteProps<T, false, false, false>, "renderInput" | "value" | "onChange" | "onBlur" | "options" | "getOptionLabel" | "isOptionEqualToValue">;
|
|
79
|
+
declare const FormikAutocomplete: <T>({ name, label, options, getOptionLabel, isOptionEqualToValue, ...props }: Props$3<T>) => react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
type Props$2 = {
|
|
82
|
+
name: string;
|
|
83
|
+
label?: string;
|
|
84
|
+
} & Omit<RatingProps, "name" | "value" | "onChange">;
|
|
85
|
+
declare const FormikRating: ({ name, label, ...props }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
86
|
+
|
|
87
|
+
type Props$1 = {
|
|
88
|
+
name: string;
|
|
89
|
+
label?: string;
|
|
90
|
+
options: {
|
|
91
|
+
value: string;
|
|
92
|
+
label: string;
|
|
93
|
+
}[];
|
|
94
|
+
} & Omit<ToggleButtonGroupProps, "value" | "onChange">;
|
|
95
|
+
declare const FormikToggleButtonGroup: ({ name, label, options, ...props }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
|
|
97
|
+
type Props = {
|
|
98
|
+
name: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
} & Omit<DatePickerProps, "value" | "onChange">;
|
|
101
|
+
declare const FormikDatePicker: ({ name, label, ...props }: Props) => react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
export { FormikAutocomplete, FormikCheckbox, FormikColorPicker, FormikDatePicker, FormikFontPicker, FormikImageUpload, FormikRadioGroup, FormikRating, FormikSelect, FormikSlider, FormikSwitch, FormikTextField, FormikToggleButtonGroup };
|