dynamic-formik-form 1.0.0 → 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.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 }) => /* @__PURE__ */ jsx(
96
- TextField2,
97
- {
98
- ...props,
99
- type,
100
- disabled,
101
- error: !!error,
102
- className,
103
- fullWidth: true,
104
- variant: "outlined"
105
- }
106
- ),
107
- Textarea: ({ className, disabled, error, rows, ...props }) => /* @__PURE__ */ jsx(
108
- TextField2,
109
- {
110
- ...props,
111
- multiline: true,
112
- rows: rows || 4,
113
- disabled,
114
- error: !!error,
115
- className,
116
- fullWidth: true,
117
- variant: "outlined"
118
- }
119
- ),
120
- Select: ({ className, disabled, error, children, ...props }) => /* @__PURE__ */ jsx(
121
- TextField2,
122
- {
123
- ...props,
124
- select: true,
125
- disabled,
126
- error: !!error,
127
- className,
128
- fullWidth: true,
129
- variant: "outlined",
130
- children
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 }) => /* @__PURE__ */ jsx(
251
- TextField2,
252
- {
253
- inputRef,
254
- inputProps,
255
- label,
256
- id,
257
- error: !!error,
258
- helperText,
259
- ...props,
260
- fullWidth: true,
261
- variant: "outlined"
262
- }
263
- ) : void 0
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) => {