@rjsf/chakra-ui 4.2.3 → 5.0.0-beta.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/README.md +4 -4
- package/dist/AddButton/AddButton.d.ts +2 -3
- package/dist/AltDateTimeWidget/AltDateTimeWidget.d.ts +1 -1
- package/dist/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +3 -0
- package/dist/ArrayFieldItemTemplate/index.d.ts +2 -0
- package/dist/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
- package/dist/BaseInputTemplate/BaseInputTemplate.d.ts +3 -0
- package/dist/BaseInputTemplate/index.d.ts +2 -0
- package/dist/ChakraFrameProvider.d.ts +1 -1
- package/dist/CheckboxWidget/CheckboxWidget.d.ts +1 -1
- package/dist/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
- package/dist/DescriptionField/DescriptionField.d.ts +2 -2
- package/dist/ErrorList/ErrorList.d.ts +1 -1
- package/dist/FieldTemplate/FieldTemplate.d.ts +1 -1
- package/dist/FieldTemplate/WrapIfAdditional.d.ts +4 -13
- package/dist/Form/Form.d.ts +2 -2
- package/dist/IconButton/IconButton.d.ts +4 -10
- package/dist/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
- package/dist/RadioWidget/RadioWidget.d.ts +1 -1
- package/dist/RangeWidget/RangeWidget.d.ts +2 -2
- package/dist/SelectWidget/SelectWidget.d.ts +1 -1
- package/dist/SubmitButton/SubmitButton.d.ts +2 -2
- package/dist/Templates/Templates.d.ts +20 -0
- package/dist/Templates/index.d.ts +2 -0
- package/dist/TextareaWidget/TextareaWidget.d.ts +2 -2
- package/dist/Theme/Theme.d.ts +2 -2
- package/dist/TitleField/TitleField.d.ts +2 -2
- package/dist/UpDownWidget/UpDownWidget.d.ts +1 -1
- package/dist/Widgets/Widgets.d.ts +8 -17
- package/dist/chakra-ui.cjs.development.js +420 -541
- package/dist/chakra-ui.cjs.development.js.map +1 -1
- package/dist/chakra-ui.cjs.production.min.js +1 -1
- package/dist/chakra-ui.cjs.production.min.js.map +1 -1
- package/dist/chakra-ui.esm.js +343 -483
- package/dist/chakra-ui.esm.js.map +1 -1
- package/dist/chakra-ui.umd.development.js +421 -544
- package/dist/chakra-ui.umd.development.js.map +1 -1
- package/dist/chakra-ui.umd.production.min.js +1 -1
- package/dist/chakra-ui.umd.production.min.js.map +1 -1
- package/dist/index.d.ts +4 -7
- package/dist/utils.d.ts +1 -4
- package/package.json +46 -34
- package/dist/ColorWidget/ColorWidget.d.ts +0 -3
- package/dist/ColorWidget/index.d.ts +0 -2
- package/dist/DateTimeWidget/DateTimeWidget.d.ts +0 -3
- package/dist/DateTimeWidget/index.d.ts +0 -2
- package/dist/DateWidget/DateWidget.d.ts +0 -3
- package/dist/DateWidget/index.d.ts +0 -2
- package/dist/EmailWidget/EmailWidget.d.ts +0 -3
- package/dist/EmailWidget/index.d.ts +0 -2
- package/dist/Fields/Fields.d.ts +0 -6
- package/dist/Fields/index.d.ts +0 -2
- package/dist/PasswordWidget/PasswordWidget.d.ts +0 -3
- package/dist/PasswordWidget/index.d.ts +0 -2
- package/dist/TextWidget/TextWidget.d.ts +0 -3
- package/dist/TextWidget/index.d.ts +0 -2
- package/dist/URLWidget/URLWidget.d.ts +0 -3
- package/dist/URLWidget/index.d.ts +0 -2
package/dist/chakra-ui.esm.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { withTheme } from '@rjsf/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { useMemo, memo, useState, useEffect } from 'react';
|
|
4
|
+
import { Button, HStack, Box, ButtonGroup, Grid, GridItem, shouldForwardProp, FormControl, FormLabel, Input, Text, Alert, AlertTitle, List, ListItem, ListIcon, IconButton, FormErrorMessage, FormHelperText, Heading, Divider, Checkbox, CheckboxGroup, Stack, RadioGroup, Radio, Slider, SliderTrack, SliderFilledTrack, SliderThumb, Select as Select$1, Textarea, NumberInput, NumberInputField, NumberInputStepper, NumberIncrementStepper, NumberDecrementStepper, ChakraProvider } from '@chakra-ui/react';
|
|
5
|
+
import { AddIcon, WarningIcon, ArrowDownIcon, ArrowUpIcon, DeleteIcon } from '@chakra-ui/icons';
|
|
6
|
+
import { getUiOptions, getTemplate, getInputProps, ADDITIONAL_PROPERTY_FLAG, canExpand, getSubmitButtonOptions, parseDateString, toDateString, pad, rangeSpec, processSelectValue } from '@rjsf/utils';
|
|
5
7
|
import { Select } from 'chakra-react-select';
|
|
6
8
|
import { Global, CacheProvider } from '@emotion/react';
|
|
7
9
|
import createCache from '@emotion/cache';
|
|
8
10
|
import weakMemoize from '@emotion/weak-memoize';
|
|
9
11
|
|
|
10
12
|
function _extends() {
|
|
11
|
-
_extends = Object.assign
|
|
13
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
14
|
for (var i = 1; i < arguments.length; i++) {
|
|
13
15
|
var source = arguments[i];
|
|
14
16
|
|
|
@@ -21,7 +23,6 @@ function _extends() {
|
|
|
21
23
|
|
|
22
24
|
return target;
|
|
23
25
|
};
|
|
24
|
-
|
|
25
26
|
return _extends.apply(this, arguments);
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -41,97 +42,27 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
var AddButton = function AddButton(props) {
|
|
44
|
-
return React__default.createElement(Button,
|
|
45
|
+
return React__default.createElement(Button, _extends({
|
|
45
46
|
leftIcon: React__default.createElement(AddIcon, null)
|
|
46
47
|
}, props), "Add Item");
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return React__default.createElement(IconButton, Object.assign({}, otherProps, {
|
|
66
|
-
icon: mappings[icon],
|
|
67
|
-
"aria-label": icon
|
|
68
|
-
}));
|
|
69
|
-
});
|
|
70
|
-
ChakraIconButton.displayName = 'ChakraIconButton';
|
|
71
|
-
|
|
72
|
-
var _excluded$1 = ["key"],
|
|
73
|
-
_excluded2 = ["key"];
|
|
74
|
-
var isMultiSelect = utils.isMultiSelect,
|
|
75
|
-
getDefaultRegistry = utils.getDefaultRegistry;
|
|
76
|
-
|
|
77
|
-
var ArrayFieldTemplate = function ArrayFieldTemplate(props) {
|
|
78
|
-
var schema = props.schema,
|
|
79
|
-
_props$registry = props.registry,
|
|
80
|
-
registry = _props$registry === void 0 ? getDefaultRegistry() : _props$registry;
|
|
81
|
-
|
|
82
|
-
if (isMultiSelect(schema, registry.rootSchema)) {
|
|
83
|
-
return React__default.createElement(DefaultFixedArrayFieldTemplate, Object.assign({}, props));
|
|
84
|
-
} else {
|
|
85
|
-
return React__default.createElement(DefaultNormalArrayFieldTemplate, Object.assign({}, props));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
var ArrayFieldTitle = function ArrayFieldTitle(_ref) {
|
|
90
|
-
var TitleField = _ref.TitleField,
|
|
91
|
-
idSchema = _ref.idSchema,
|
|
92
|
-
title = _ref.title,
|
|
93
|
-
required = _ref.required;
|
|
94
|
-
|
|
95
|
-
if (!title) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var id = idSchema.$id + "__title";
|
|
100
|
-
return React__default.createElement(TitleField, {
|
|
101
|
-
id: id,
|
|
102
|
-
title: title,
|
|
103
|
-
required: required
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var ArrayFieldDescription = function ArrayFieldDescription(_ref2) {
|
|
108
|
-
var DescriptionField = _ref2.DescriptionField,
|
|
109
|
-
idSchema = _ref2.idSchema,
|
|
110
|
-
description = _ref2.description;
|
|
111
|
-
|
|
112
|
-
if (!description) {
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var id = idSchema.$id + "__description";
|
|
117
|
-
return React__default.createElement(DescriptionField, {
|
|
118
|
-
id: id,
|
|
119
|
-
description: description
|
|
120
|
-
});
|
|
121
|
-
}; // Used in the two templates
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
var DefaultArrayItem = function DefaultArrayItem(_ref3) {
|
|
125
|
-
var index = _ref3.index,
|
|
126
|
-
readonly = _ref3.readonly,
|
|
127
|
-
disabled = _ref3.disabled,
|
|
128
|
-
children = _ref3.children,
|
|
129
|
-
hasToolbar = _ref3.hasToolbar,
|
|
130
|
-
hasRemove = _ref3.hasRemove,
|
|
131
|
-
hasMoveUp = _ref3.hasMoveUp,
|
|
132
|
-
hasMoveDown = _ref3.hasMoveDown,
|
|
133
|
-
onReorderClick = _ref3.onReorderClick,
|
|
134
|
-
onDropIndexClick = _ref3.onDropIndexClick;
|
|
50
|
+
var ArrayFieldItemTemplate = function ArrayFieldItemTemplate(props) {
|
|
51
|
+
var children = props.children,
|
|
52
|
+
disabled = props.disabled,
|
|
53
|
+
hasToolbar = props.hasToolbar,
|
|
54
|
+
hasMoveDown = props.hasMoveDown,
|
|
55
|
+
hasMoveUp = props.hasMoveUp,
|
|
56
|
+
hasRemove = props.hasRemove,
|
|
57
|
+
index = props.index,
|
|
58
|
+
onDropIndexClick = props.onDropIndexClick,
|
|
59
|
+
onReorderClick = props.onReorderClick,
|
|
60
|
+
readonly = props.readonly,
|
|
61
|
+
registry = props.registry;
|
|
62
|
+
var _registry$templates$B = registry.templates.ButtonTemplates,
|
|
63
|
+
MoveDownButton = _registry$templates$B.MoveDownButton,
|
|
64
|
+
MoveUpButton = _registry$templates$B.MoveUpButton,
|
|
65
|
+
RemoveButton = _registry$templates$B.RemoveButton;
|
|
135
66
|
var onRemoveClick = useMemo(function () {
|
|
136
67
|
return onDropIndexClick(index);
|
|
137
68
|
}, [index, onDropIndexClick]);
|
|
@@ -149,118 +80,166 @@ var DefaultArrayItem = function DefaultArrayItem(_ref3) {
|
|
|
149
80
|
}, children), hasToolbar && React__default.createElement(Box, null, React__default.createElement(ButtonGroup, {
|
|
150
81
|
isAttached: true,
|
|
151
82
|
mb: 1
|
|
152
|
-
}, (hasMoveUp || hasMoveDown) && React__default.createElement(
|
|
153
|
-
icon: "arrow-up",
|
|
154
|
-
tabIndex: -1,
|
|
83
|
+
}, (hasMoveUp || hasMoveDown) && React__default.createElement(MoveUpButton, {
|
|
155
84
|
disabled: disabled || readonly || !hasMoveUp,
|
|
156
85
|
onClick: onArrowUpClick
|
|
157
|
-
}), (hasMoveUp || hasMoveDown) && React__default.createElement(
|
|
158
|
-
icon: "arrow-down",
|
|
159
|
-
tabIndex: -1,
|
|
86
|
+
}), (hasMoveUp || hasMoveDown) && React__default.createElement(MoveDownButton, {
|
|
160
87
|
disabled: disabled || readonly || !hasMoveDown,
|
|
161
88
|
onClick: onArrowDownClick
|
|
162
|
-
}), hasRemove && React__default.createElement(
|
|
163
|
-
icon: "remove",
|
|
164
|
-
tabIndex: -1,
|
|
89
|
+
}), hasRemove && React__default.createElement(RemoveButton, {
|
|
165
90
|
disabled: disabled || readonly,
|
|
166
91
|
onClick: onRemoveClick
|
|
167
92
|
}))));
|
|
168
93
|
};
|
|
169
94
|
|
|
170
|
-
var
|
|
171
|
-
return React__default.createElement("fieldset", {
|
|
172
|
-
className: props.className
|
|
173
|
-
}, React__default.createElement(ArrayFieldTitle, {
|
|
174
|
-
key: "array-field-title-" + props.idSchema.$id,
|
|
175
|
-
TitleField: props.TitleField,
|
|
176
|
-
idSchema: props.idSchema,
|
|
177
|
-
title: props.uiSchema["ui:title"] || props.title,
|
|
178
|
-
required: props.required
|
|
179
|
-
}), (props.uiSchema["ui:description"] || props.schema.description) && // Use DescriptionField if possible
|
|
180
|
-
React__default.createElement("div", {
|
|
181
|
-
className: "field-description",
|
|
182
|
-
key: "field-description-" + props.idSchema.$id
|
|
183
|
-
}, props.uiSchema["ui:description"] || props.schema.description), React__default.createElement("div", {
|
|
184
|
-
className: "row array-item-list",
|
|
185
|
-
key: "array-item-list-" + props.idSchema.$id
|
|
186
|
-
}, props.items && props.items.map(function (p) {
|
|
187
|
-
var key = p.key,
|
|
188
|
-
itemProps = _objectWithoutPropertiesLoose(p, _excluded$1);
|
|
189
|
-
|
|
190
|
-
return React__default.createElement(DefaultArrayItem, Object.assign({
|
|
191
|
-
key: key
|
|
192
|
-
}, itemProps));
|
|
193
|
-
})), props.canAdd && React__default.createElement(AddButton, {
|
|
194
|
-
justifySelf: "flex-end",
|
|
195
|
-
className: "array-item-add",
|
|
196
|
-
onClick: props.onAddClick,
|
|
197
|
-
disabled: props.disabled || props.readonly
|
|
198
|
-
}));
|
|
199
|
-
};
|
|
95
|
+
var _excluded$1 = ["key"];
|
|
200
96
|
|
|
201
|
-
var
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
97
|
+
var ArrayFieldTemplate = function ArrayFieldTemplate(props) {
|
|
98
|
+
var canAdd = props.canAdd,
|
|
99
|
+
disabled = props.disabled,
|
|
100
|
+
idSchema = props.idSchema,
|
|
101
|
+
uiSchema = props.uiSchema,
|
|
102
|
+
items = props.items,
|
|
103
|
+
onAddClick = props.onAddClick,
|
|
104
|
+
readonly = props.readonly,
|
|
105
|
+
registry = props.registry,
|
|
106
|
+
required = props.required,
|
|
107
|
+
schema = props.schema,
|
|
108
|
+
title = props.title;
|
|
109
|
+
var uiOptions = getUiOptions(uiSchema);
|
|
110
|
+
var ArrayFieldDescriptionTemplate = getTemplate("ArrayFieldDescriptionTemplate", registry, uiOptions);
|
|
111
|
+
var ArrayFieldItemTemplate = getTemplate("ArrayFieldItemTemplate", registry, uiOptions);
|
|
112
|
+
var ArrayFieldTitleTemplate = getTemplate("ArrayFieldTitleTemplate", registry, uiOptions); // Button templates are not overridden in the uiSchema
|
|
113
|
+
|
|
114
|
+
var AddButton = registry.templates.ButtonTemplates.AddButton;
|
|
115
|
+
return React__default.createElement(Box, null, React__default.createElement(ArrayFieldTitleTemplate, {
|
|
116
|
+
idSchema: idSchema,
|
|
117
|
+
title: uiOptions.title || title,
|
|
118
|
+
uiSchema: uiSchema,
|
|
119
|
+
required: required,
|
|
120
|
+
registry: registry
|
|
121
|
+
}), (uiOptions.description || schema.description) && React__default.createElement(ArrayFieldDescriptionTemplate, {
|
|
122
|
+
idSchema: idSchema,
|
|
123
|
+
description: uiOptions.description || schema.description,
|
|
124
|
+
uiSchema: uiSchema,
|
|
125
|
+
registry: registry
|
|
213
126
|
}), React__default.createElement(Grid, {
|
|
214
|
-
key: "array-item-list-" +
|
|
215
|
-
}, React__default.createElement(GridItem, null,
|
|
216
|
-
var key =
|
|
217
|
-
itemProps = _objectWithoutPropertiesLoose(
|
|
127
|
+
key: "array-item-list-" + idSchema.$id
|
|
128
|
+
}, React__default.createElement(GridItem, null, items.length > 0 && items.map(function (_ref) {
|
|
129
|
+
var key = _ref.key,
|
|
130
|
+
itemProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
218
131
|
|
|
219
|
-
return React__default.createElement(
|
|
132
|
+
return React__default.createElement(ArrayFieldItemTemplate, _extends({
|
|
220
133
|
key: key
|
|
221
134
|
}, itemProps));
|
|
222
|
-
})),
|
|
135
|
+
})), canAdd && React__default.createElement(GridItem, {
|
|
223
136
|
justifySelf: "flex-end"
|
|
224
137
|
}, React__default.createElement(Box, {
|
|
225
138
|
mt: 2
|
|
226
139
|
}, React__default.createElement(AddButton, {
|
|
227
140
|
className: "array-item-add",
|
|
228
|
-
onClick:
|
|
229
|
-
disabled:
|
|
141
|
+
onClick: onAddClick,
|
|
142
|
+
disabled: disabled || readonly
|
|
230
143
|
})))));
|
|
231
144
|
};
|
|
232
145
|
|
|
233
|
-
|
|
234
|
-
var
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
};
|
|
146
|
+
function getChakra(_ref) {
|
|
147
|
+
var _ref$uiSchema = _ref.uiSchema,
|
|
148
|
+
uiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema;
|
|
149
|
+
var chakraProps = uiSchema["ui:options"] && uiSchema["ui:options"].chakra || {};
|
|
150
|
+
Object.keys(chakraProps).forEach(function (key) {
|
|
151
|
+
/**
|
|
152
|
+
* Leveraging `shouldForwardProp` to remove props
|
|
153
|
+
*
|
|
154
|
+
* This is a utility function that's used in `@chakra-ui/react`'s factory function.
|
|
155
|
+
* Normally, it prevents ChakraProps from being passed to the DOM.
|
|
156
|
+
* In this case we just want to delete the unknown props. So we flip the boolean.
|
|
157
|
+
*/
|
|
158
|
+
if (shouldForwardProp(key)) {
|
|
159
|
+
delete chakraProps[key];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return chakraProps;
|
|
163
|
+
}
|
|
249
164
|
|
|
250
|
-
var
|
|
251
|
-
var
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
165
|
+
var BaseInputTemplate = function BaseInputTemplate(props) {
|
|
166
|
+
var id = props.id,
|
|
167
|
+
type = props.type,
|
|
168
|
+
value = props.value,
|
|
169
|
+
label = props.label,
|
|
170
|
+
schema = props.schema,
|
|
171
|
+
uiSchema = props.uiSchema,
|
|
172
|
+
onChange = props.onChange,
|
|
173
|
+
onBlur = props.onBlur,
|
|
174
|
+
onFocus = props.onFocus,
|
|
175
|
+
options = props.options,
|
|
176
|
+
required = props.required,
|
|
177
|
+
readonly = props.readonly,
|
|
178
|
+
rawErrors = props.rawErrors,
|
|
179
|
+
autofocus = props.autofocus,
|
|
180
|
+
placeholder = props.placeholder,
|
|
181
|
+
disabled = props.disabled,
|
|
182
|
+
registry = props.registry;
|
|
183
|
+
var inputProps = getInputProps(schema, type, options);
|
|
184
|
+
var chakraProps = getChakra({
|
|
185
|
+
uiSchema: uiSchema
|
|
186
|
+
});
|
|
187
|
+
var schemaUtils = registry.schemaUtils;
|
|
188
|
+
|
|
189
|
+
var _onChange = function _onChange(_ref) {
|
|
190
|
+
var value = _ref.target.value;
|
|
191
|
+
return onChange(value === "" ? options.emptyValue : value);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
var _onBlur = function _onBlur(_ref2) {
|
|
195
|
+
var value = _ref2.target.value;
|
|
196
|
+
return onBlur(id, value);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
var _onFocus = function _onFocus(_ref3) {
|
|
200
|
+
var value = _ref3.target.value;
|
|
201
|
+
return onFocus(id, value);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema) && (!!label || !!schema.title);
|
|
205
|
+
return React.createElement(FormControl, _extends({
|
|
206
|
+
mb: 1
|
|
207
|
+
}, chakraProps, {
|
|
208
|
+
isDisabled: disabled || readonly,
|
|
209
|
+
isRequired: required,
|
|
210
|
+
isReadOnly: readonly,
|
|
211
|
+
isInvalid: rawErrors && rawErrors.length > 0
|
|
212
|
+
}), displayLabel ? React.createElement(FormLabel, {
|
|
213
|
+
htmlFor: id,
|
|
214
|
+
id: id + "-label"
|
|
215
|
+
}, label || schema.title) : null, React.createElement(Input, _extends({
|
|
216
|
+
id: id,
|
|
217
|
+
name: id,
|
|
218
|
+
value: value || value === 0 ? value : "",
|
|
219
|
+
onChange: _onChange,
|
|
220
|
+
onBlur: _onBlur,
|
|
221
|
+
onFocus: _onFocus,
|
|
222
|
+
autoFocus: autofocus,
|
|
223
|
+
placeholder: placeholder
|
|
224
|
+
}, inputProps, {
|
|
225
|
+
list: schema.examples ? "examples_" + id : undefined
|
|
226
|
+
})), schema.examples ? React.createElement("datalist", {
|
|
227
|
+
id: "examples_" + id
|
|
228
|
+
}, schema.examples.concat(schema["default"] ? [schema["default"]] : []).map(function (example) {
|
|
229
|
+
return React.createElement("option", {
|
|
230
|
+
key: example,
|
|
231
|
+
value: example
|
|
232
|
+
});
|
|
233
|
+
})) : null);
|
|
258
234
|
};
|
|
259
235
|
|
|
260
236
|
var DescriptionField = function DescriptionField(_ref) {
|
|
261
237
|
var description = _ref.description,
|
|
262
238
|
id = _ref.id;
|
|
263
|
-
|
|
239
|
+
|
|
240
|
+
if (!description) {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
264
243
|
|
|
265
244
|
if (typeof description === "string") {
|
|
266
245
|
return React__default.createElement(Text, {
|
|
@@ -273,27 +252,81 @@ var DescriptionField = function DescriptionField(_ref) {
|
|
|
273
252
|
return React__default.createElement(React__default.Fragment, null, description);
|
|
274
253
|
};
|
|
275
254
|
|
|
276
|
-
var
|
|
277
|
-
|
|
278
|
-
|
|
255
|
+
var ErrorList = function ErrorList(_ref) {
|
|
256
|
+
var errors = _ref.errors;
|
|
257
|
+
return React__default.createElement(Alert, {
|
|
258
|
+
flexDirection: "column",
|
|
259
|
+
alignItems: "flex-start",
|
|
260
|
+
gap: 3,
|
|
261
|
+
status: "error"
|
|
262
|
+
}, React__default.createElement(AlertTitle, null, "Errors"), React__default.createElement(List, null, errors.map(function (error, i) {
|
|
263
|
+
return React__default.createElement(ListItem, {
|
|
264
|
+
key: i
|
|
265
|
+
}, React__default.createElement(ListIcon, {
|
|
266
|
+
as: WarningIcon,
|
|
267
|
+
color: "red.500"
|
|
268
|
+
}), error.stack);
|
|
269
|
+
})));
|
|
279
270
|
};
|
|
280
271
|
|
|
281
|
-
var
|
|
272
|
+
var _excluded = ["icon", "iconType"];
|
|
273
|
+
/**
|
|
274
|
+
* props used in Template:
|
|
275
|
+
* icon, tabIndex, disabled, onClick
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
var ChakraIconButton = /*#__PURE__*/memo(function (props) {
|
|
279
|
+
var icon = props.icon,
|
|
280
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
281
|
+
|
|
282
|
+
return React__default.createElement(IconButton, _extends({
|
|
283
|
+
"aria-label": props.title
|
|
284
|
+
}, otherProps, {
|
|
285
|
+
icon: icon
|
|
286
|
+
}));
|
|
287
|
+
});
|
|
288
|
+
ChakraIconButton.displayName = "ChakraIconButton";
|
|
289
|
+
function MoveDownButton(props) {
|
|
290
|
+
return React__default.createElement(ChakraIconButton, _extends({
|
|
291
|
+
title: "Move down"
|
|
292
|
+
}, props, {
|
|
293
|
+
icon: React__default.createElement(ArrowDownIcon, null)
|
|
294
|
+
}));
|
|
295
|
+
}
|
|
296
|
+
function MoveUpButton(props) {
|
|
297
|
+
return React__default.createElement(ChakraIconButton, _extends({
|
|
298
|
+
title: "Move up"
|
|
299
|
+
}, props, {
|
|
300
|
+
icon: React__default.createElement(ArrowUpIcon, null)
|
|
301
|
+
}));
|
|
302
|
+
}
|
|
303
|
+
function RemoveButton(props) {
|
|
304
|
+
return React__default.createElement(ChakraIconButton, _extends({
|
|
305
|
+
title: "Remove"
|
|
306
|
+
}, props, {
|
|
307
|
+
icon: React__default.createElement(DeleteIcon, null)
|
|
308
|
+
}));
|
|
309
|
+
}
|
|
282
310
|
|
|
283
311
|
var WrapIfAdditional = function WrapIfAdditional(props) {
|
|
284
312
|
var children = props.children,
|
|
313
|
+
classNames = props.classNames,
|
|
285
314
|
disabled = props.disabled,
|
|
286
315
|
id = props.id,
|
|
287
316
|
label = props.label,
|
|
288
317
|
onDropPropertyClick = props.onDropPropertyClick,
|
|
289
318
|
onKeyChange = props.onKeyChange,
|
|
290
319
|
readonly = props.readonly,
|
|
320
|
+
registry = props.registry,
|
|
291
321
|
required = props.required,
|
|
292
322
|
schema = props.schema;
|
|
293
|
-
var
|
|
323
|
+
var RemoveButton = registry.templates.ButtonTemplates.RemoveButton;
|
|
324
|
+
var additional = (ADDITIONAL_PROPERTY_FLAG in schema);
|
|
294
325
|
|
|
295
326
|
if (!additional) {
|
|
296
|
-
return createElement(
|
|
327
|
+
return React__default.createElement("div", {
|
|
328
|
+
className: classNames
|
|
329
|
+
}, children);
|
|
297
330
|
}
|
|
298
331
|
|
|
299
332
|
var keyLabel = label + " Key";
|
|
@@ -303,15 +336,17 @@ var WrapIfAdditional = function WrapIfAdditional(props) {
|
|
|
303
336
|
return onKeyChange(target.value);
|
|
304
337
|
};
|
|
305
338
|
|
|
306
|
-
return createElement(Grid, {
|
|
339
|
+
return React__default.createElement(Grid, {
|
|
307
340
|
key: id + "-key",
|
|
341
|
+
className: classNames,
|
|
308
342
|
alignItems: "center",
|
|
309
343
|
gap: 2
|
|
310
|
-
}, createElement(GridItem, null, createElement(FormControl, {
|
|
344
|
+
}, React__default.createElement(GridItem, null, React__default.createElement(FormControl, {
|
|
311
345
|
isRequired: required
|
|
312
|
-
}, createElement(FormLabel, {
|
|
313
|
-
htmlFor: id + "-key"
|
|
314
|
-
|
|
346
|
+
}, React__default.createElement(FormLabel, {
|
|
347
|
+
htmlFor: id + "-key",
|
|
348
|
+
id: id + "-key-label"
|
|
349
|
+
}, keyLabel), React__default.createElement(Input, {
|
|
315
350
|
defaultValue: label,
|
|
316
351
|
disabled: disabled || readonly,
|
|
317
352
|
id: id + "-key",
|
|
@@ -319,9 +354,7 @@ var WrapIfAdditional = function WrapIfAdditional(props) {
|
|
|
319
354
|
onBlur: !readonly ? handleBlur : undefined,
|
|
320
355
|
type: "text",
|
|
321
356
|
mb: 1
|
|
322
|
-
}))), createElement(GridItem, null, children), createElement(GridItem, null, createElement(
|
|
323
|
-
icon: "remove",
|
|
324
|
-
tabIndex: -1,
|
|
357
|
+
}))), React__default.createElement(GridItem, null, children), React__default.createElement(GridItem, null, React__default.createElement(RemoveButton, {
|
|
325
358
|
disabled: disabled || readonly,
|
|
326
359
|
onClick: onDropPropertyClick(label)
|
|
327
360
|
})));
|
|
@@ -338,6 +371,7 @@ var FieldTemplate = function FieldTemplate(props) {
|
|
|
338
371
|
onDropPropertyClick = props.onDropPropertyClick,
|
|
339
372
|
onKeyChange = props.onKeyChange,
|
|
340
373
|
readonly = props.readonly,
|
|
374
|
+
registry = props.registry,
|
|
341
375
|
required = props.required,
|
|
342
376
|
_props$rawErrors = props.rawErrors,
|
|
343
377
|
rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors,
|
|
@@ -346,7 +380,11 @@ var FieldTemplate = function FieldTemplate(props) {
|
|
|
346
380
|
schema = props.schema;
|
|
347
381
|
|
|
348
382
|
if (hidden) {
|
|
349
|
-
return React__default.createElement(
|
|
383
|
+
return React__default.createElement("div", {
|
|
384
|
+
style: {
|
|
385
|
+
display: "none"
|
|
386
|
+
}
|
|
387
|
+
}, children);
|
|
350
388
|
}
|
|
351
389
|
|
|
352
390
|
return React__default.createElement(WrapIfAdditional, {
|
|
@@ -358,7 +396,8 @@ var FieldTemplate = function FieldTemplate(props) {
|
|
|
358
396
|
onKeyChange: onKeyChange,
|
|
359
397
|
readonly: readonly,
|
|
360
398
|
required: required,
|
|
361
|
-
schema: schema
|
|
399
|
+
schema: schema,
|
|
400
|
+
registry: registry
|
|
362
401
|
}, React__default.createElement(FormControl, {
|
|
363
402
|
isRequired: required,
|
|
364
403
|
isInvalid: rawErrors && rawErrors.length > 0
|
|
@@ -375,12 +414,8 @@ var FieldTemplate = function FieldTemplate(props) {
|
|
|
375
414
|
}, rawHelp)));
|
|
376
415
|
};
|
|
377
416
|
|
|
378
|
-
var canExpand = utils.canExpand;
|
|
379
|
-
|
|
380
417
|
var ObjectFieldTemplate = function ObjectFieldTemplate(props) {
|
|
381
|
-
var
|
|
382
|
-
description = props.description,
|
|
383
|
-
TitleField = props.TitleField,
|
|
418
|
+
var description = props.description,
|
|
384
419
|
title = props.title,
|
|
385
420
|
properties = props.properties,
|
|
386
421
|
required = props.required,
|
|
@@ -390,33 +425,88 @@ var ObjectFieldTemplate = function ObjectFieldTemplate(props) {
|
|
|
390
425
|
idSchema = props.idSchema,
|
|
391
426
|
schema = props.schema,
|
|
392
427
|
formData = props.formData,
|
|
393
|
-
onAddClick = props.onAddClick
|
|
394
|
-
|
|
428
|
+
onAddClick = props.onAddClick,
|
|
429
|
+
registry = props.registry;
|
|
430
|
+
var uiOptions = getUiOptions(uiSchema);
|
|
431
|
+
var TitleFieldTemplate = getTemplate("TitleFieldTemplate", registry, uiOptions);
|
|
432
|
+
var DescriptionFieldTemplate = getTemplate("DescriptionFieldTemplate", registry, uiOptions); // Button templates are not overridden in the uiSchema
|
|
433
|
+
|
|
434
|
+
var AddButton = registry.templates.ButtonTemplates.AddButton;
|
|
435
|
+
return React__default.createElement(React__default.Fragment, null, (uiOptions.title || title) && React__default.createElement(TitleFieldTemplate, {
|
|
395
436
|
id: idSchema.$id + "-title",
|
|
396
|
-
title: title,
|
|
397
|
-
required: required
|
|
398
|
-
|
|
437
|
+
title: uiOptions.title || title,
|
|
438
|
+
required: required,
|
|
439
|
+
uiSchema: uiSchema,
|
|
440
|
+
registry: registry
|
|
441
|
+
}), (uiOptions.description || description) && React__default.createElement(DescriptionFieldTemplate, {
|
|
399
442
|
id: idSchema.$id + "-description",
|
|
400
|
-
description: description
|
|
401
|
-
|
|
443
|
+
description: uiOptions.description || description,
|
|
444
|
+
registry: registry
|
|
445
|
+
}), React__default.createElement(Grid, {
|
|
402
446
|
gap: description ? 2 : 6,
|
|
403
447
|
mb: 4
|
|
404
448
|
}, properties.map(function (element, index) {
|
|
405
|
-
return element.hidden ? element.content : createElement(GridItem, {
|
|
449
|
+
return element.hidden ? element.content : React__default.createElement(GridItem, {
|
|
406
450
|
key: idSchema.$id + "-" + element.name + "-" + index
|
|
407
451
|
}, element.content);
|
|
408
|
-
}), canExpand(schema, uiSchema, formData) && createElement(GridItem, {
|
|
452
|
+
}), canExpand(schema, uiSchema, formData) && React__default.createElement(GridItem, {
|
|
409
453
|
justifySelf: "flex-end"
|
|
410
|
-
}, createElement(AddButton, {
|
|
454
|
+
}, React__default.createElement(AddButton, {
|
|
411
455
|
className: "object-property-expand",
|
|
412
456
|
onClick: onAddClick(schema),
|
|
413
457
|
disabled: disabled || readonly
|
|
414
458
|
}))));
|
|
415
459
|
};
|
|
416
460
|
|
|
417
|
-
var
|
|
418
|
-
|
|
419
|
-
|
|
461
|
+
var SubmitButton = function SubmitButton(_ref) {
|
|
462
|
+
var uiSchema = _ref.uiSchema;
|
|
463
|
+
|
|
464
|
+
var _getSubmitButtonOptio = getSubmitButtonOptions(uiSchema),
|
|
465
|
+
submitText = _getSubmitButtonOptio.submitText,
|
|
466
|
+
norender = _getSubmitButtonOptio.norender,
|
|
467
|
+
submitButtonProps = _getSubmitButtonOptio.props;
|
|
468
|
+
|
|
469
|
+
if (norender) {
|
|
470
|
+
return null;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return React__default.createElement(Box, {
|
|
474
|
+
marginTop: 3
|
|
475
|
+
}, React__default.createElement(Button, _extends({
|
|
476
|
+
type: "submit",
|
|
477
|
+
variant: "solid"
|
|
478
|
+
}, submitButtonProps), submitText));
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
var TitleField = function TitleField(_ref) {
|
|
482
|
+
var id = _ref.id,
|
|
483
|
+
title = _ref.title;
|
|
484
|
+
return React__default.createElement(Box, {
|
|
485
|
+
id: id,
|
|
486
|
+
mt: 1,
|
|
487
|
+
mb: 4
|
|
488
|
+
}, React__default.createElement(Heading, {
|
|
489
|
+
as: "h5"
|
|
490
|
+
}, title), React__default.createElement(Divider, null));
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var Templates = {
|
|
494
|
+
ArrayFieldItemTemplate: ArrayFieldItemTemplate,
|
|
495
|
+
ArrayFieldTemplate: ArrayFieldTemplate,
|
|
496
|
+
BaseInputTemplate: BaseInputTemplate,
|
|
497
|
+
ButtonTemplates: {
|
|
498
|
+
AddButton: AddButton,
|
|
499
|
+
MoveDownButton: MoveDownButton,
|
|
500
|
+
MoveUpButton: MoveUpButton,
|
|
501
|
+
RemoveButton: RemoveButton,
|
|
502
|
+
SubmitButton: SubmitButton
|
|
503
|
+
},
|
|
504
|
+
DescriptionFieldTemplate: DescriptionField,
|
|
505
|
+
ErrorListTemplate: ErrorList,
|
|
506
|
+
FieldTemplate: FieldTemplate,
|
|
507
|
+
ObjectFieldTemplate: ObjectFieldTemplate,
|
|
508
|
+
TitleFieldTemplate: TitleField
|
|
509
|
+
};
|
|
420
510
|
|
|
421
511
|
var rangeOptions = function rangeOptions(start, stop) {
|
|
422
512
|
var options = [];
|
|
@@ -533,8 +623,8 @@ var AltDateWidget = function AltDateWidget(props) {
|
|
|
533
623
|
};
|
|
534
624
|
|
|
535
625
|
var renderDateElement = function renderDateElement(elemProps) {
|
|
536
|
-
var value =
|
|
537
|
-
return React__default.createElement(SelectWidget,
|
|
626
|
+
var value = elemProps.value ? elemProps.value : undefined;
|
|
627
|
+
return React__default.createElement(SelectWidget, _extends({}, elemProps, {
|
|
538
628
|
label: undefined,
|
|
539
629
|
className: "form-control",
|
|
540
630
|
onChange: function onChange(elemValue) {
|
|
@@ -599,7 +689,7 @@ AltDateWidget.defaultProps = {
|
|
|
599
689
|
|
|
600
690
|
var AltDateTimeWidget = function AltDateTimeWidget(props) {
|
|
601
691
|
var AltDateWidget = props.registry.widgets.AltDateWidget;
|
|
602
|
-
return React__default.createElement(AltDateWidget,
|
|
692
|
+
return React__default.createElement(AltDateWidget, _extends({}, props, {
|
|
603
693
|
showTime: true
|
|
604
694
|
}));
|
|
605
695
|
};
|
|
@@ -608,26 +698,6 @@ AltDateTimeWidget.defaultProps = /*#__PURE__*/_extends({}, AltDateWidget.default
|
|
|
608
698
|
showTime: true
|
|
609
699
|
});
|
|
610
700
|
|
|
611
|
-
function getChakra(_ref) {
|
|
612
|
-
var _ref$uiSchema = _ref.uiSchema,
|
|
613
|
-
uiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema;
|
|
614
|
-
var chakraProps = uiSchema["ui:options"] && uiSchema["ui:options"].chakra || {};
|
|
615
|
-
Object.keys(chakraProps).forEach(function (key) {
|
|
616
|
-
/**
|
|
617
|
-
* Leveraging `shouldForwardProp` to remove props
|
|
618
|
-
*
|
|
619
|
-
* This is a utility function that's used in `@chakra-ui/react`'s factory function.
|
|
620
|
-
* Normally, it prevents ChakraProps from being passed to the DOM.
|
|
621
|
-
* In this case we just want to delete the unknown props. So we flip the boolean.
|
|
622
|
-
*/
|
|
623
|
-
if (shouldForwardProp(key)) {
|
|
624
|
-
// @ts-ignore - How to type this?!... 😬
|
|
625
|
-
delete chakraProps[key];
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
return chakraProps;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
701
|
var CheckboxWidget = function CheckboxWidget(props) {
|
|
632
702
|
var id = props.id,
|
|
633
703
|
value = props.value,
|
|
@@ -658,7 +728,7 @@ var CheckboxWidget = function CheckboxWidget(props) {
|
|
|
658
728
|
return onFocus(id, value);
|
|
659
729
|
};
|
|
660
730
|
|
|
661
|
-
return React__default.createElement(FormControl,
|
|
731
|
+
return React__default.createElement(FormControl, _extends({
|
|
662
732
|
mb: 1
|
|
663
733
|
}, chakraProps, {
|
|
664
734
|
isRequired: required
|
|
@@ -722,7 +792,7 @@ var CheckboxesWidget = function CheckboxesWidget(props) {
|
|
|
722
792
|
};
|
|
723
793
|
|
|
724
794
|
var row = options ? options.inline : false;
|
|
725
|
-
return React__default.createElement(FormControl,
|
|
795
|
+
return React__default.createElement(FormControl, _extends({
|
|
726
796
|
mb: 1
|
|
727
797
|
}, chakraProps, {
|
|
728
798
|
isDisabled: disabled || readonly,
|
|
@@ -730,7 +800,8 @@ var CheckboxesWidget = function CheckboxesWidget(props) {
|
|
|
730
800
|
isReadOnly: readonly,
|
|
731
801
|
isInvalid: rawErrors && rawErrors.length > 0
|
|
732
802
|
}), React__default.createElement(FormLabel, {
|
|
733
|
-
htmlFor: id
|
|
803
|
+
htmlFor: id,
|
|
804
|
+
id: id + "-label"
|
|
734
805
|
}, label || schema.title), React__default.createElement(CheckboxGroup, {
|
|
735
806
|
onChange: function onChange(option) {
|
|
736
807
|
return _onChange(option);
|
|
@@ -753,58 +824,6 @@ var CheckboxesWidget = function CheckboxesWidget(props) {
|
|
|
753
824
|
}))));
|
|
754
825
|
};
|
|
755
826
|
|
|
756
|
-
var ColorWidget = function ColorWidget(props) {
|
|
757
|
-
var registry = props.registry;
|
|
758
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
759
|
-
return React__default.createElement(TextWidget, Object.assign({
|
|
760
|
-
type: "color"
|
|
761
|
-
}, props));
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
var DateWidget = function DateWidget(props) {
|
|
765
|
-
var registry = props.registry;
|
|
766
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
767
|
-
return React__default.createElement(TextWidget, Object.assign({}, props, {
|
|
768
|
-
type: "date"
|
|
769
|
-
}));
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
var localToUTC = utils.localToUTC,
|
|
773
|
-
utcToLocal = utils.utcToLocal;
|
|
774
|
-
|
|
775
|
-
var DateTimeWidget = function DateTimeWidget(props) {
|
|
776
|
-
var registry = props.registry;
|
|
777
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
778
|
-
var value = utcToLocal(props.value);
|
|
779
|
-
|
|
780
|
-
var onChange = function onChange(value) {
|
|
781
|
-
props.onChange(localToUTC(value));
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
return React__default.createElement(TextWidget, Object.assign({
|
|
785
|
-
type: "datetime-local"
|
|
786
|
-
}, props, {
|
|
787
|
-
value: value,
|
|
788
|
-
onChange: onChange
|
|
789
|
-
}));
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
var EmailWidget = function EmailWidget(props) {
|
|
793
|
-
var registry = props.registry;
|
|
794
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
795
|
-
return React__default.createElement(TextWidget, Object.assign({}, props, {
|
|
796
|
-
type: "email"
|
|
797
|
-
}));
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
var PasswordWidget = function PasswordWidget(props) {
|
|
801
|
-
var registry = props.registry;
|
|
802
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
803
|
-
return React__default.createElement(TextWidget, Object.assign({
|
|
804
|
-
type: "password"
|
|
805
|
-
}, props));
|
|
806
|
-
};
|
|
807
|
-
|
|
808
827
|
var RadioWidget = function RadioWidget(_ref) {
|
|
809
828
|
var id = _ref.id,
|
|
810
829
|
schema = _ref.schema,
|
|
@@ -835,14 +854,15 @@ var RadioWidget = function RadioWidget(_ref) {
|
|
|
835
854
|
};
|
|
836
855
|
|
|
837
856
|
var row = options ? options.inline : false;
|
|
838
|
-
return React__default.createElement(FormControl,
|
|
857
|
+
return React__default.createElement(FormControl, _extends({
|
|
839
858
|
mb: 1
|
|
840
859
|
}, chakraProps, {
|
|
841
860
|
isDisabled: disabled || readonly,
|
|
842
861
|
isRequired: required,
|
|
843
862
|
isReadOnly: readonly
|
|
844
863
|
}), React__default.createElement(FormLabel, {
|
|
845
|
-
htmlFor: id
|
|
864
|
+
htmlFor: id,
|
|
865
|
+
id: id + "-label"
|
|
846
866
|
}, label || schema.title), React__default.createElement(RadioGroup, {
|
|
847
867
|
onChange: onChange,
|
|
848
868
|
onBlur: _onBlur,
|
|
@@ -856,14 +876,12 @@ var RadioWidget = function RadioWidget(_ref) {
|
|
|
856
876
|
return React__default.createElement(Radio, {
|
|
857
877
|
value: "" + option.value,
|
|
858
878
|
key: i,
|
|
879
|
+
id: id + "-radio-" + option.value,
|
|
859
880
|
disabled: disabled || itemDisabled || readonly
|
|
860
881
|
}, "" + option.label);
|
|
861
882
|
}))));
|
|
862
883
|
};
|
|
863
884
|
|
|
864
|
-
var rangeSpec = utils.rangeSpec,
|
|
865
|
-
getDisplayLabel = utils.getDisplayLabel;
|
|
866
|
-
|
|
867
885
|
var RangeWidget = function RangeWidget(_ref) {
|
|
868
886
|
var value = _ref.value,
|
|
869
887
|
readonly = _ref.readonly,
|
|
@@ -875,7 +893,9 @@ var RangeWidget = function RangeWidget(_ref) {
|
|
|
875
893
|
uiSchema = _ref.uiSchema,
|
|
876
894
|
onChange = _ref.onChange,
|
|
877
895
|
label = _ref.label,
|
|
878
|
-
id = _ref.id
|
|
896
|
+
id = _ref.id,
|
|
897
|
+
registry = _ref.registry;
|
|
898
|
+
var schemaUtils = registry.schemaUtils;
|
|
879
899
|
var chakraProps = getChakra({
|
|
880
900
|
uiSchema: uiSchema
|
|
881
901
|
});
|
|
@@ -886,7 +906,7 @@ var RangeWidget = function RangeWidget(_ref) {
|
|
|
886
906
|
id: id
|
|
887
907
|
}, rangeSpec(schema));
|
|
888
908
|
|
|
889
|
-
var displayLabel = getDisplayLabel(schema, uiSchema) && (!!label || !!schema.title);
|
|
909
|
+
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema) && (!!label || !!schema.title);
|
|
890
910
|
|
|
891
911
|
var _onChange = function _onChange(value) {
|
|
892
912
|
return onChange(value === undefined ? options.emptyValue : value);
|
|
@@ -902,11 +922,11 @@ var RangeWidget = function RangeWidget(_ref) {
|
|
|
902
922
|
return onFocus(id, value);
|
|
903
923
|
};
|
|
904
924
|
|
|
905
|
-
return React__default.createElement(FormControl,
|
|
925
|
+
return React__default.createElement(FormControl, _extends({
|
|
906
926
|
mb: 1
|
|
907
927
|
}, chakraProps), displayLabel ? React__default.createElement(FormLabel, {
|
|
908
928
|
htmlFor: id
|
|
909
|
-
}, label || schema.title) : null, React__default.createElement(Slider,
|
|
929
|
+
}, label || schema.title) : null, React__default.createElement(Slider, _extends({}, sliderWidgetProps, {
|
|
910
930
|
id: id,
|
|
911
931
|
name: id,
|
|
912
932
|
isDisabled: disabled || readonly,
|
|
@@ -916,46 +936,6 @@ var RangeWidget = function RangeWidget(_ref) {
|
|
|
916
936
|
}), React__default.createElement(SliderTrack, null, React__default.createElement(SliderFilledTrack, null)), React__default.createElement(SliderThumb, null)));
|
|
917
937
|
};
|
|
918
938
|
|
|
919
|
-
var asNumber = utils.asNumber,
|
|
920
|
-
guessType = utils.guessType;
|
|
921
|
-
var nums = /*#__PURE__*/new Set(["number", "integer"]);
|
|
922
|
-
/**
|
|
923
|
-
* This is a silly limitation in the DOM where option change event values are
|
|
924
|
-
* always retrieved as strings.
|
|
925
|
-
*/
|
|
926
|
-
|
|
927
|
-
var processValue = function processValue(schema, value) {
|
|
928
|
-
// "enum" is a reserved word, so only "type" and "items" can be destructured
|
|
929
|
-
var type = schema.type,
|
|
930
|
-
items = schema.items;
|
|
931
|
-
|
|
932
|
-
if (value === "") {
|
|
933
|
-
return undefined;
|
|
934
|
-
} else if (type === "array" && items && nums.has(items.type)) {
|
|
935
|
-
return value.map(asNumber);
|
|
936
|
-
} else if (type === "boolean") {
|
|
937
|
-
return value === "true";
|
|
938
|
-
} else if (type === "number") {
|
|
939
|
-
return asNumber(value);
|
|
940
|
-
} // If type is undefined, but an enum is present, try and infer the type from
|
|
941
|
-
// the enum values
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
if (schema["enum"]) {
|
|
945
|
-
if (schema["enum"].every(function (x) {
|
|
946
|
-
return guessType(x) === "number";
|
|
947
|
-
})) {
|
|
948
|
-
return asNumber(value);
|
|
949
|
-
} else if (schema["enum"].every(function (x) {
|
|
950
|
-
return guessType(x) === "boolean";
|
|
951
|
-
})) {
|
|
952
|
-
return value === "true";
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
return value;
|
|
957
|
-
};
|
|
958
|
-
|
|
959
939
|
var SelectWidget = function SelectWidget(props) {
|
|
960
940
|
var schema = props.schema,
|
|
961
941
|
id = props.id,
|
|
@@ -984,27 +964,27 @@ var SelectWidget = function SelectWidget(props) {
|
|
|
984
964
|
var emptyValue = "";
|
|
985
965
|
|
|
986
966
|
var _onMultiChange = function _onMultiChange(e) {
|
|
987
|
-
return onChange(
|
|
967
|
+
return onChange(processSelectValue(schema, e.map(function (v) {
|
|
988
968
|
return v.value;
|
|
989
|
-
})));
|
|
969
|
+
}), options));
|
|
990
970
|
};
|
|
991
971
|
|
|
992
972
|
var _onChange = function _onChange(_ref) {
|
|
993
973
|
var value = _ref.target.value;
|
|
994
|
-
return onChange(
|
|
974
|
+
return onChange(processSelectValue(schema, value, options));
|
|
995
975
|
};
|
|
996
976
|
|
|
997
977
|
var _onBlur = function _onBlur(_ref2) {
|
|
998
978
|
var value = _ref2.target.value;
|
|
999
|
-
return onBlur(id,
|
|
979
|
+
return onBlur(id, processSelectValue(schema, value, options));
|
|
1000
980
|
};
|
|
1001
981
|
|
|
1002
982
|
var _onFocus = function _onFocus(_ref3) {
|
|
1003
983
|
var value = _ref3.target.value;
|
|
1004
|
-
return onFocus(id,
|
|
984
|
+
return onFocus(id, processSelectValue(schema, value, options));
|
|
1005
985
|
};
|
|
1006
986
|
|
|
1007
|
-
return React__default.createElement(FormControl,
|
|
987
|
+
return React__default.createElement(FormControl, _extends({
|
|
1008
988
|
mb: 1
|
|
1009
989
|
}, chakraProps, {
|
|
1010
990
|
isDisabled: disabled || readonly,
|
|
@@ -1048,8 +1028,6 @@ var SelectWidget = function SelectWidget(props) {
|
|
|
1048
1028
|
})));
|
|
1049
1029
|
};
|
|
1050
1030
|
|
|
1051
|
-
var getDisplayLabel$1 = utils.getDisplayLabel;
|
|
1052
|
-
|
|
1053
1031
|
var TextareaWidget = function TextareaWidget(_ref) {
|
|
1054
1032
|
var id = _ref.id,
|
|
1055
1033
|
placeholder = _ref.placeholder,
|
|
@@ -1065,11 +1043,13 @@ var TextareaWidget = function TextareaWidget(_ref) {
|
|
|
1065
1043
|
schema = _ref.schema,
|
|
1066
1044
|
uiSchema = _ref.uiSchema,
|
|
1067
1045
|
required = _ref.required,
|
|
1068
|
-
rawErrors = _ref.rawErrors
|
|
1046
|
+
rawErrors = _ref.rawErrors,
|
|
1047
|
+
registry = _ref.registry;
|
|
1069
1048
|
var chakraProps = getChakra({
|
|
1070
1049
|
uiSchema: uiSchema
|
|
1071
1050
|
});
|
|
1072
|
-
var
|
|
1051
|
+
var schemaUtils = registry.schemaUtils;
|
|
1052
|
+
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema) && (!!label || !!schema.title);
|
|
1073
1053
|
|
|
1074
1054
|
var _onChange = function _onChange(_ref2) {
|
|
1075
1055
|
var value = _ref2.target.value;
|
|
@@ -1086,7 +1066,7 @@ var TextareaWidget = function TextareaWidget(_ref) {
|
|
|
1086
1066
|
return onFocus(id, value);
|
|
1087
1067
|
};
|
|
1088
1068
|
|
|
1089
|
-
return React__default.createElement(FormControl,
|
|
1069
|
+
return React__default.createElement(FormControl, _extends({
|
|
1090
1070
|
mb: 1
|
|
1091
1071
|
}, chakraProps, {
|
|
1092
1072
|
isDisabled: disabled || readonly,
|
|
@@ -1107,79 +1087,6 @@ var TextareaWidget = function TextareaWidget(_ref) {
|
|
|
1107
1087
|
}));
|
|
1108
1088
|
};
|
|
1109
1089
|
|
|
1110
|
-
var getDisplayLabel$2 = utils.getDisplayLabel;
|
|
1111
|
-
|
|
1112
|
-
var TextWidget = function TextWidget(props) {
|
|
1113
|
-
var id = props.id,
|
|
1114
|
-
type = props.type,
|
|
1115
|
-
value = props.value,
|
|
1116
|
-
label = props.label,
|
|
1117
|
-
schema = props.schema,
|
|
1118
|
-
uiSchema = props.uiSchema,
|
|
1119
|
-
onChange = props.onChange,
|
|
1120
|
-
onBlur = props.onBlur,
|
|
1121
|
-
onFocus = props.onFocus,
|
|
1122
|
-
options = props.options,
|
|
1123
|
-
required = props.required,
|
|
1124
|
-
readonly = props.readonly,
|
|
1125
|
-
rawErrors = props.rawErrors,
|
|
1126
|
-
autofocus = props.autofocus,
|
|
1127
|
-
placeholder = props.placeholder,
|
|
1128
|
-
disabled = props.disabled;
|
|
1129
|
-
var chakraProps = getChakra({
|
|
1130
|
-
uiSchema: uiSchema
|
|
1131
|
-
});
|
|
1132
|
-
|
|
1133
|
-
var _onChange = function _onChange(_ref) {
|
|
1134
|
-
var value = _ref.target.value;
|
|
1135
|
-
return onChange(value === "" ? options.emptyValue : value);
|
|
1136
|
-
};
|
|
1137
|
-
|
|
1138
|
-
var _onBlur = function _onBlur(_ref2) {
|
|
1139
|
-
var value = _ref2.target.value;
|
|
1140
|
-
return onBlur(id, value);
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
|
-
var _onFocus = function _onFocus(_ref3) {
|
|
1144
|
-
var value = _ref3.target.value;
|
|
1145
|
-
return onFocus(id, value);
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
var displayLabel = getDisplayLabel$2(schema, uiSchema) && (!!label || !!schema.title);
|
|
1149
|
-
var inputType = (type || schema.type) === "string" ? "text" : "" + (type || schema.type);
|
|
1150
|
-
return createElement(FormControl, Object.assign({
|
|
1151
|
-
mb: 1
|
|
1152
|
-
}, chakraProps, {
|
|
1153
|
-
isDisabled: disabled || readonly,
|
|
1154
|
-
isRequired: required,
|
|
1155
|
-
isReadOnly: readonly,
|
|
1156
|
-
isInvalid: rawErrors && rawErrors.length > 0
|
|
1157
|
-
}), displayLabel ? createElement(FormLabel, {
|
|
1158
|
-
htmlFor: id,
|
|
1159
|
-
id: id + "-label"
|
|
1160
|
-
}, label || schema.title) : null, createElement(Input, {
|
|
1161
|
-
id: id,
|
|
1162
|
-
name: id,
|
|
1163
|
-
value: value || value === 0 ? value : "",
|
|
1164
|
-
onChange: _onChange,
|
|
1165
|
-
onBlur: _onBlur,
|
|
1166
|
-
onFocus: _onFocus,
|
|
1167
|
-
autoFocus: autofocus,
|
|
1168
|
-
placeholder: placeholder,
|
|
1169
|
-
type: inputType,
|
|
1170
|
-
list: schema.examples ? "examples_" + id : undefined
|
|
1171
|
-
}), schema.examples ? createElement("datalist", {
|
|
1172
|
-
id: "examples_" + id
|
|
1173
|
-
}, schema.examples.concat(schema["default"] ? [schema["default"]] : []).map(function (example) {
|
|
1174
|
-
return createElement("option", {
|
|
1175
|
-
key: example,
|
|
1176
|
-
value: example
|
|
1177
|
-
});
|
|
1178
|
-
})) : null);
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
var getDisplayLabel$3 = utils.getDisplayLabel;
|
|
1182
|
-
|
|
1183
1090
|
var UpDownWidget = function UpDownWidget(props) {
|
|
1184
1091
|
var id = props.id,
|
|
1185
1092
|
schema = props.schema,
|
|
@@ -1192,8 +1099,10 @@ var UpDownWidget = function UpDownWidget(props) {
|
|
|
1192
1099
|
onBlur = props.onBlur,
|
|
1193
1100
|
onFocus = props.onFocus,
|
|
1194
1101
|
rawErrors = props.rawErrors,
|
|
1195
|
-
required = props.required
|
|
1196
|
-
|
|
1102
|
+
required = props.required,
|
|
1103
|
+
registry = props.registry;
|
|
1104
|
+
var schemaUtils = registry.schemaUtils;
|
|
1105
|
+
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema) && (!!label || !!schema.title);
|
|
1197
1106
|
var chakraProps = getChakra({
|
|
1198
1107
|
uiSchema: uiSchema
|
|
1199
1108
|
});
|
|
@@ -1212,7 +1121,7 @@ var UpDownWidget = function UpDownWidget(props) {
|
|
|
1212
1121
|
return onFocus(id, value);
|
|
1213
1122
|
};
|
|
1214
1123
|
|
|
1215
|
-
return React__default.createElement(FormControl,
|
|
1124
|
+
return React__default.createElement(FormControl, _extends({
|
|
1216
1125
|
mb: 1
|
|
1217
1126
|
}, chakraProps, {
|
|
1218
1127
|
isDisabled: disabled || readonly,
|
|
@@ -1232,69 +1141,21 @@ var UpDownWidget = function UpDownWidget(props) {
|
|
|
1232
1141
|
}), React__default.createElement(NumberInputStepper, null, React__default.createElement(NumberIncrementStepper, null), React__default.createElement(NumberDecrementStepper, null))));
|
|
1233
1142
|
};
|
|
1234
1143
|
|
|
1235
|
-
var URLWidget = function URLWidget(props) {
|
|
1236
|
-
var registry = props.registry;
|
|
1237
|
-
var TextWidget = registry.widgets.TextWidget;
|
|
1238
|
-
return React__default.createElement(TextWidget, Object.assign({
|
|
1239
|
-
type: "url"
|
|
1240
|
-
}, props));
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
var getSubmitButtonOptions = utils.getSubmitButtonOptions;
|
|
1244
|
-
|
|
1245
|
-
var SubmitButton = function SubmitButton(_ref) {
|
|
1246
|
-
var uiSchema = _ref.uiSchema;
|
|
1247
|
-
|
|
1248
|
-
var _getSubmitButtonOptio = getSubmitButtonOptions(uiSchema),
|
|
1249
|
-
submitText = _getSubmitButtonOptio.submitText,
|
|
1250
|
-
norender = _getSubmitButtonOptio.norender,
|
|
1251
|
-
submitButtonProps = _getSubmitButtonOptio.props;
|
|
1252
|
-
|
|
1253
|
-
if (norender) {
|
|
1254
|
-
return null;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
return React__default.createElement(Box, {
|
|
1258
|
-
marginTop: 3
|
|
1259
|
-
}, React__default.createElement(Button, Object.assign({
|
|
1260
|
-
type: "submit",
|
|
1261
|
-
variant: "solid"
|
|
1262
|
-
}, submitButtonProps), submitText));
|
|
1263
|
-
};
|
|
1264
|
-
|
|
1265
1144
|
var widgets = {
|
|
1266
1145
|
AltDateTimeWidget: AltDateTimeWidget,
|
|
1267
1146
|
AltDateWidget: AltDateWidget,
|
|
1268
1147
|
CheckboxWidget: CheckboxWidget,
|
|
1269
1148
|
CheckboxesWidget: CheckboxesWidget,
|
|
1270
|
-
ColorWidget: ColorWidget,
|
|
1271
|
-
DateWidget: DateWidget,
|
|
1272
|
-
DateTimeWidget: DateTimeWidget,
|
|
1273
|
-
EmailWidget: EmailWidget,
|
|
1274
|
-
PasswordWidget: PasswordWidget,
|
|
1275
1149
|
RadioWidget: RadioWidget,
|
|
1276
1150
|
RangeWidget: RangeWidget,
|
|
1277
1151
|
SelectWidget: SelectWidget,
|
|
1278
1152
|
TextareaWidget: TextareaWidget,
|
|
1279
|
-
|
|
1280
|
-
UpDownWidget: UpDownWidget,
|
|
1281
|
-
URLWidget: URLWidget,
|
|
1282
|
-
SubmitButton: SubmitButton
|
|
1153
|
+
UpDownWidget: UpDownWidget
|
|
1283
1154
|
};
|
|
1284
1155
|
|
|
1285
|
-
var getDefaultRegistry$1 = utils.getDefaultRegistry;
|
|
1286
|
-
|
|
1287
|
-
var _getDefaultRegistry = /*#__PURE__*/getDefaultRegistry$1(),
|
|
1288
|
-
fields = _getDefaultRegistry.fields,
|
|
1289
|
-
widgets$1 = _getDefaultRegistry.widgets;
|
|
1290
|
-
|
|
1291
1156
|
var Theme = {
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
ObjectFieldTemplate: ObjectFieldTemplate,
|
|
1295
|
-
ErrorList: ErrorList,
|
|
1296
|
-
fields: /*#__PURE__*/_extends({}, fields, Fields),
|
|
1297
|
-
widgets: /*#__PURE__*/_extends({}, widgets$1, widgets)
|
|
1157
|
+
templates: Templates,
|
|
1158
|
+
widgets: widgets
|
|
1298
1159
|
};
|
|
1299
1160
|
|
|
1300
1161
|
var Form = /*#__PURE__*/withTheme(Theme);
|
|
@@ -1322,7 +1183,7 @@ var Form = /*#__PURE__*/withTheme(Theme);
|
|
|
1322
1183
|
*/
|
|
1323
1184
|
|
|
1324
1185
|
var CSSReset = function CSSReset() {
|
|
1325
|
-
return createElement(Global, {
|
|
1186
|
+
return React.createElement(Global, {
|
|
1326
1187
|
styles: "\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n body {\n position: relative;\n min-height: 100%;\n font-feature-settings: 'kern';\n }\n *,\n *::before,\n *::after {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n }\n main {\n display: block;\n }\n hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n b,\n strong {\n font-weight: bold;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n img {\n border-style: none;\n }\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n button,\n input {\n overflow: visible;\n }\n button,\n select {\n text-transform: none;\n }\n button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n progress {\n vertical-align: baseline;\n }\n textarea {\n overflow: auto;\n }\n [type=\"checkbox\"],\n [type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n }\n [type=\"number\"]::-webkit-inner-spin-button,\n [type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n [type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n [type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n details {\n display: block;\n }\n summary {\n display: list-item;\n }\n template {\n display: none;\n }\n [hidden] {\n display: none !important;\n }\n body,\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre {\n margin: 0;\n }\n button {\n background: transparent;\n padding: 0;\n }\n fieldset {\n margin: 0;\n padding: 0;\n }\n ol,\n ul {\n margin: 0;\n padding: 0;\n }\n textarea {\n resize: vertical;\n }\n button,\n [role=\"button\"] {\n cursor: pointer;\n }\n button::-moz-focus-inner {\n border: 0 !important;\n }\n table {\n border-collapse: collapse;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n button,\n input,\n optgroup,\n select,\n textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n [data-js-focus-visible] :focus:not([data-focus-visible-added]) {\n outline: none;\n box-shadow: none;\n }\n select::-ms-expand {\n display: none;\n }\n input {\n border-width: revert;\n border-color: revert;\n border-style: revert;\n }\n .array-item > hr {\n margin-top: 16px;\n margin-bottom: 16px;\n }\n "
|
|
1327
1188
|
});
|
|
1328
1189
|
};
|
|
@@ -1352,18 +1213,17 @@ var memoizedCreateCacheWithContainer = /*#__PURE__*/weakMemoize(function (contai
|
|
|
1352
1213
|
var __createChakraFrameProvider = function __createChakraFrameProvider(props) {
|
|
1353
1214
|
return function (_ref) {
|
|
1354
1215
|
var document = _ref.document;
|
|
1355
|
-
return createElement("div", {
|
|
1216
|
+
return React.createElement("div", {
|
|
1356
1217
|
style: {
|
|
1357
1218
|
margin: 2
|
|
1358
1219
|
}
|
|
1359
|
-
}, createElement(CacheProvider, {
|
|
1220
|
+
}, React.createElement(CacheProvider, {
|
|
1360
1221
|
value: memoizedCreateCacheWithContainer(document.head)
|
|
1361
|
-
}, createElement(ChakraProvider, {
|
|
1222
|
+
}, React.createElement(ChakraProvider, {
|
|
1362
1223
|
resetCSS: false
|
|
1363
|
-
}, createElement(CSSReset, null), props.children)));
|
|
1224
|
+
}, React.createElement(CSSReset, null), props.children)));
|
|
1364
1225
|
};
|
|
1365
1226
|
};
|
|
1366
1227
|
|
|
1367
|
-
export default
|
|
1368
|
-
export { ArrayFieldTemplate, FieldTemplate, Fields, Form, ObjectFieldTemplate, Theme, widgets as Widgets, __createChakraFrameProvider };
|
|
1228
|
+
export { Form, Templates, Theme, widgets as Widgets, __createChakraFrameProvider, Form as default };
|
|
1369
1229
|
//# sourceMappingURL=chakra-ui.esm.js.map
|