dynamic-formik-form 1.0.2 → 1.0.3
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.js +64 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -92,44 +92,53 @@ var defaultAdapter = {
|
|
|
92
92
|
};
|
|
93
93
|
var createMUIAdapter = (Box, Button, Checkbox, FormControl, FormControlLabel, FormHelperText, IconButton, MenuItem, Paper, Popover, Radio, RadioGroup, Switch, TextField2, Typography, DatePicker, DateTimePicker) => {
|
|
94
94
|
return {
|
|
95
|
-
Input: ({ className, disabled, error, type, ...props }) =>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
Input: ({ className, disabled, error, type, ...props }) => {
|
|
96
|
+
const { error: _, ...restProps } = props;
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
TextField2,
|
|
99
|
+
{
|
|
100
|
+
...restProps,
|
|
101
|
+
type,
|
|
102
|
+
disabled,
|
|
103
|
+
error: !!error,
|
|
104
|
+
className,
|
|
105
|
+
fullWidth: true,
|
|
106
|
+
variant: "outlined"
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
Textarea: ({ className, disabled, error, rows, ...props }) => {
|
|
111
|
+
const { error: _, ...restProps } = props;
|
|
112
|
+
return /* @__PURE__ */ jsx(
|
|
113
|
+
TextField2,
|
|
114
|
+
{
|
|
115
|
+
...restProps,
|
|
116
|
+
multiline: true,
|
|
117
|
+
rows: rows || 4,
|
|
118
|
+
disabled,
|
|
119
|
+
error: !!error,
|
|
120
|
+
className,
|
|
121
|
+
fullWidth: true,
|
|
122
|
+
variant: "outlined"
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
Select: ({ className, disabled, error, children, ...props }) => {
|
|
127
|
+
const { error: _, ...restProps } = props;
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
TextField2,
|
|
130
|
+
{
|
|
131
|
+
...restProps,
|
|
132
|
+
select: true,
|
|
133
|
+
disabled,
|
|
134
|
+
error: !!error,
|
|
135
|
+
className,
|
|
136
|
+
fullWidth: true,
|
|
137
|
+
variant: "outlined",
|
|
138
|
+
children
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
},
|
|
133
142
|
Checkbox: ({ className, disabled, label, ...props }) => /* @__PURE__ */ jsx(
|
|
134
143
|
FormControlLabel,
|
|
135
144
|
{
|
|
@@ -247,20 +256,23 @@ var createMUIAdapter = (Box, Button, Checkbox, FormControl, FormControlLabel, Fo
|
|
|
247
256
|
...props
|
|
248
257
|
}
|
|
249
258
|
) : void 0,
|
|
250
|
-
TextField: TextField2 ? ({ inputRef, inputProps, label, id, error, helperText, ...props }) =>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
TextField: TextField2 ? ({ inputRef, inputProps, label, id, error, helperText, ...props }) => {
|
|
260
|
+
const { error: _, ...restProps } = props;
|
|
261
|
+
return /* @__PURE__ */ jsx(
|
|
262
|
+
TextField2,
|
|
263
|
+
{
|
|
264
|
+
inputRef,
|
|
265
|
+
inputProps,
|
|
266
|
+
label,
|
|
267
|
+
id,
|
|
268
|
+
error: !!error,
|
|
269
|
+
helperText,
|
|
270
|
+
...restProps,
|
|
271
|
+
fullWidth: true,
|
|
272
|
+
variant: "outlined"
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
} : void 0
|
|
264
276
|
};
|
|
265
277
|
};
|
|
266
278
|
var createBootstrapAdapter = (Form, FormControl, FormLabel, FormText, FormCheck, FormSelect, ButtonComponent, InputGroup, OverlayTrigger, Popover, ListGroup, ListGroupItem) => {
|