@rjsf/chakra-ui 5.10.0 → 5.11.2

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.
@@ -9,77 +9,48 @@
9
9
  var createCache__default = /*#__PURE__*/_interopDefaultLegacy(createCache);
10
10
  var weakMemoize__default = /*#__PURE__*/_interopDefaultLegacy(weakMemoize);
11
11
 
12
- function _extends() {
13
- _extends = Object.assign ? Object.assign.bind() : function (target) {
14
- for (var i = 1; i < arguments.length; i++) {
15
- var source = arguments[i];
16
- for (var key in source) {
17
- if (Object.prototype.hasOwnProperty.call(source, key)) {
18
- target[key] = source[key];
19
- }
20
- }
21
- }
22
- return target;
23
- };
24
- return _extends.apply(this, arguments);
25
- }
26
- function _objectWithoutPropertiesLoose(source, excluded) {
27
- if (source == null) return {};
28
- var target = {};
29
- var sourceKeys = Object.keys(source);
30
- var key, i;
31
- for (i = 0; i < sourceKeys.length; i++) {
32
- key = sourceKeys[i];
33
- if (excluded.indexOf(key) >= 0) continue;
34
- target[key] = source[key];
35
- }
36
- return target;
37
- }
38
-
39
- var _excluded$2 = ["uiSchema", "registry"];
40
- function AddButton(_ref) {
41
- var registry = _ref.registry,
42
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
43
- var translateString = registry.translateString;
44
- return jsxRuntime.jsx(react.Button, _extends({
45
- leftIcon: jsxRuntime.jsx(icons.AddIcon, {})
46
- }, props, {
12
+ function AddButton({
13
+ uiSchema,
14
+ registry,
15
+ ...props
16
+ }) {
17
+ const {
18
+ translateString
19
+ } = registry;
20
+ return jsxRuntime.jsx(react.Button, {
21
+ leftIcon: jsxRuntime.jsx(icons.AddIcon, {}),
22
+ ...props,
47
23
  children: translateString(utils.TranslatableString.AddItemButton)
48
- }));
24
+ });
49
25
  }
50
26
 
51
27
  function ArrayFieldItemTemplate(props) {
52
- var children = props.children,
53
- disabled = props.disabled,
54
- hasToolbar = props.hasToolbar,
55
- hasCopy = props.hasCopy,
56
- hasMoveDown = props.hasMoveDown,
57
- hasMoveUp = props.hasMoveUp,
58
- hasRemove = props.hasRemove,
59
- index = props.index,
60
- onCopyIndexClick = props.onCopyIndexClick,
61
- onDropIndexClick = props.onDropIndexClick,
62
- onReorderClick = props.onReorderClick,
63
- readonly = props.readonly,
64
- uiSchema = props.uiSchema,
65
- registry = props.registry;
66
- var _registry$templates$B = registry.templates.ButtonTemplates,
67
- CopyButton = _registry$templates$B.CopyButton,
68
- MoveDownButton = _registry$templates$B.MoveDownButton,
69
- MoveUpButton = _registry$templates$B.MoveUpButton,
70
- RemoveButton = _registry$templates$B.RemoveButton;
71
- var onCopyClick = react$1.useMemo(function () {
72
- return onCopyIndexClick(index);
73
- }, [index, onCopyIndexClick]);
74
- var onRemoveClick = react$1.useMemo(function () {
75
- return onDropIndexClick(index);
76
- }, [index, onDropIndexClick]);
77
- var onArrowUpClick = react$1.useMemo(function () {
78
- return onReorderClick(index, index - 1);
79
- }, [index, onReorderClick]);
80
- var onArrowDownClick = react$1.useMemo(function () {
81
- return onReorderClick(index, index + 1);
82
- }, [index, onReorderClick]);
28
+ const {
29
+ children,
30
+ disabled,
31
+ hasToolbar,
32
+ hasCopy,
33
+ hasMoveDown,
34
+ hasMoveUp,
35
+ hasRemove,
36
+ index,
37
+ onCopyIndexClick,
38
+ onDropIndexClick,
39
+ onReorderClick,
40
+ readonly,
41
+ uiSchema,
42
+ registry
43
+ } = props;
44
+ const {
45
+ CopyButton,
46
+ MoveDownButton,
47
+ MoveUpButton,
48
+ RemoveButton
49
+ } = registry.templates.ButtonTemplates;
50
+ const onCopyClick = react$1.useMemo(() => onCopyIndexClick(index), [index, onCopyIndexClick]);
51
+ const onRemoveClick = react$1.useMemo(() => onDropIndexClick(index), [index, onDropIndexClick]);
52
+ const onArrowUpClick = react$1.useMemo(() => onReorderClick(index, index - 1), [index, onReorderClick]);
53
+ const onArrowDownClick = react$1.useMemo(() => onReorderClick(index, index + 1), [index, onReorderClick]);
83
54
  return jsxRuntime.jsxs(react.HStack, {
84
55
  alignItems: 'flex-end',
85
56
  py: 1,
@@ -116,25 +87,30 @@
116
87
  });
117
88
  }
118
89
 
119
- var _excluded$1 = ["key"];
120
90
  function ArrayFieldTemplate(props) {
121
- var canAdd = props.canAdd,
122
- disabled = props.disabled,
123
- idSchema = props.idSchema,
124
- uiSchema = props.uiSchema,
125
- items = props.items,
126
- onAddClick = props.onAddClick,
127
- readonly = props.readonly,
128
- registry = props.registry,
129
- required = props.required,
130
- schema = props.schema,
131
- title = props.title;
132
- var uiOptions = utils.getUiOptions(uiSchema);
133
- var ArrayFieldDescriptionTemplate = utils.getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
134
- var ArrayFieldItemTemplate = utils.getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
135
- var ArrayFieldTitleTemplate = utils.getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
91
+ const {
92
+ canAdd,
93
+ disabled,
94
+ idSchema,
95
+ uiSchema,
96
+ items,
97
+ onAddClick,
98
+ readonly,
99
+ registry,
100
+ required,
101
+ schema,
102
+ title
103
+ } = props;
104
+ const uiOptions = utils.getUiOptions(uiSchema);
105
+ const ArrayFieldDescriptionTemplate = utils.getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
106
+ const ArrayFieldItemTemplate = utils.getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
107
+ const ArrayFieldTitleTemplate = utils.getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
136
108
  // Button templates are not overridden in the uiSchema
137
- var AddButton = registry.templates.ButtonTemplates.AddButton;
109
+ const {
110
+ ButtonTemplates: {
111
+ AddButton
112
+ }
113
+ } = registry.templates;
138
114
  return jsxRuntime.jsxs(react.Box, {
139
115
  children: [jsxRuntime.jsx(ArrayFieldTitleTemplate, {
140
116
  idSchema: idSchema,
@@ -151,11 +127,12 @@
151
127
  registry: registry
152
128
  }), jsxRuntime.jsxs(react.Grid, {
153
129
  children: [jsxRuntime.jsx(react.GridItem, {
154
- children: items.length > 0 && items.map(function (_ref) {
155
- var key = _ref.key,
156
- itemProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
157
- return jsxRuntime.jsx(ArrayFieldItemTemplate, _extends({}, itemProps), key);
158
- })
130
+ children: items.length > 0 && items.map(({
131
+ key,
132
+ ...itemProps
133
+ }) => jsxRuntime.jsx(ArrayFieldItemTemplate, {
134
+ ...itemProps
135
+ }, key))
159
136
  }), canAdd && jsxRuntime.jsx(react.GridItem, {
160
137
  justifySelf: 'flex-end',
161
138
  children: jsxRuntime.jsx(react.Box, {
@@ -169,15 +146,15 @@
169
146
  })
170
147
  })
171
148
  })]
172
- }, "array-item-list-" + idSchema.$id)]
149
+ }, `array-item-list-${idSchema.$id}`)]
173
150
  });
174
151
  }
175
152
 
176
- function getChakra(_ref) {
177
- var _ref$uiSchema = _ref.uiSchema,
178
- uiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema;
179
- var chakraProps = uiSchema['ui:options'] && uiSchema['ui:options'].chakra || {};
180
- Object.keys(chakraProps).forEach(function (key) {
153
+ function getChakra({
154
+ uiSchema = {}
155
+ }) {
156
+ const chakraProps = uiSchema['ui:options'] && uiSchema['ui:options'].chakra || {};
157
+ Object.keys(chakraProps).forEach(key => {
181
158
  /**
182
159
  * Leveraging `shouldForwardProp` to remove props
183
160
  *
@@ -193,52 +170,57 @@
193
170
  }
194
171
 
195
172
  function BaseInputTemplate(props) {
196
- var id = props.id,
197
- type = props.type,
198
- value = props.value,
199
- label = props.label,
200
- hideLabel = props.hideLabel,
201
- schema = props.schema,
202
- uiSchema = props.uiSchema,
203
- onChange = props.onChange,
204
- onChangeOverride = props.onChangeOverride,
205
- onBlur = props.onBlur,
206
- onFocus = props.onFocus,
207
- options = props.options,
208
- required = props.required,
209
- readonly = props.readonly,
210
- rawErrors = props.rawErrors,
211
- autofocus = props.autofocus,
212
- placeholder = props.placeholder,
213
- disabled = props.disabled;
214
- var inputProps = utils.getInputProps(schema, type, options);
215
- var chakraProps = getChakra({
216
- uiSchema: uiSchema
173
+ const {
174
+ id,
175
+ type,
176
+ value,
177
+ label,
178
+ hideLabel,
179
+ schema,
180
+ uiSchema,
181
+ onChange,
182
+ onChangeOverride,
183
+ onBlur,
184
+ onFocus,
185
+ options,
186
+ required,
187
+ readonly,
188
+ rawErrors,
189
+ autofocus,
190
+ placeholder,
191
+ disabled
192
+ } = props;
193
+ const inputProps = utils.getInputProps(schema, type, options);
194
+ const chakraProps = getChakra({
195
+ uiSchema
217
196
  });
218
- var _onChange = function _onChange(_ref) {
219
- var value = _ref.target.value;
220
- return onChange(value === '' ? options.emptyValue : value);
221
- };
222
- var _onBlur = function _onBlur(_ref2) {
223
- var value = _ref2.target.value;
224
- return onBlur(id, value);
225
- };
226
- var _onFocus = function _onFocus(_ref3) {
227
- var value = _ref3.target.value;
228
- return onFocus(id, value);
229
- };
230
- return jsxRuntime.jsxs(react.FormControl, _extends({
231
- mb: 1
232
- }, chakraProps, {
197
+ const _onChange = ({
198
+ target: {
199
+ value
200
+ }
201
+ }) => onChange(value === '' ? options.emptyValue : value);
202
+ const _onBlur = ({
203
+ target: {
204
+ value
205
+ }
206
+ }) => onBlur(id, value);
207
+ const _onFocus = ({
208
+ target: {
209
+ value
210
+ }
211
+ }) => onFocus(id, value);
212
+ return jsxRuntime.jsxs(react.FormControl, {
213
+ mb: 1,
214
+ ...chakraProps,
233
215
  isDisabled: disabled || readonly,
234
216
  isRequired: required,
235
217
  isReadOnly: readonly,
236
218
  isInvalid: rawErrors && rawErrors.length > 0,
237
219
  children: [utils.labelValue(jsxRuntime.jsx(react.FormLabel, {
238
220
  htmlFor: id,
239
- id: id + "-label",
221
+ id: `${id}-label`,
240
222
  children: label
241
- }), hideLabel || !label), jsxRuntime.jsx(react.Input, _extends({
223
+ }), hideLabel || !label), jsxRuntime.jsx(react.Input, {
242
224
  id: id,
243
225
  name: id,
244
226
  value: value || value === 0 ? value : '',
@@ -246,24 +228,25 @@
246
228
  onBlur: _onBlur,
247
229
  onFocus: _onFocus,
248
230
  autoFocus: autofocus,
249
- placeholder: placeholder
250
- }, inputProps, {
231
+ placeholder: placeholder,
232
+ ...inputProps,
251
233
  list: schema.examples ? utils.examplesId(id) : undefined,
252
234
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples)
253
- })), Array.isArray(schema.examples) ? jsxRuntime.jsx("datalist", {
235
+ }), Array.isArray(schema.examples) ? jsxRuntime.jsx("datalist", {
254
236
  id: utils.examplesId(id),
255
- children: schema.examples.concat(schema["default"] && !schema.examples.includes(schema["default"]) ? [schema["default"]] : []).map(function (example) {
237
+ children: schema.examples.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : []).map(example => {
256
238
  return jsxRuntime.jsx("option", {
257
239
  value: example
258
240
  }, example);
259
241
  })
260
242
  }) : null]
261
- }));
243
+ });
262
244
  }
263
245
 
264
- function DescriptionField(_ref) {
265
- var description = _ref.description,
266
- id = _ref.id;
246
+ function DescriptionField({
247
+ description,
248
+ id
249
+ }) {
267
250
  if (!description) {
268
251
  return null;
269
252
  }
@@ -280,10 +263,13 @@
280
263
  });
281
264
  }
282
265
 
283
- function ErrorList(_ref) {
284
- var errors = _ref.errors,
285
- registry = _ref.registry;
286
- var translateString = registry.translateString;
266
+ function ErrorList({
267
+ errors,
268
+ registry
269
+ }) {
270
+ const {
271
+ translateString
272
+ } = registry;
287
273
  return jsxRuntime.jsxs(react.Alert, {
288
274
  flexDirection: 'column',
289
275
  alignItems: 'flex-start',
@@ -292,62 +278,80 @@
292
278
  children: [jsxRuntime.jsx(react.AlertTitle, {
293
279
  children: translateString(utils.TranslatableString.ErrorsLabel)
294
280
  }), jsxRuntime.jsx(react.List, {
295
- children: errors.map(function (error, i) {
296
- return jsxRuntime.jsxs(react.ListItem, {
297
- children: [jsxRuntime.jsx(react.ListIcon, {
298
- as: icons.WarningIcon,
299
- color: 'red.500'
300
- }), error.stack]
301
- }, i);
302
- })
281
+ children: errors.map((error, i) => jsxRuntime.jsxs(react.ListItem, {
282
+ children: [jsxRuntime.jsx(react.ListIcon, {
283
+ as: icons.WarningIcon,
284
+ color: 'red.500'
285
+ }), error.stack]
286
+ }, i))
303
287
  })]
304
288
  });
305
289
  }
306
290
 
307
- var _excluded = ["icon", "iconType", "uiSchema", "registry"];
308
291
  function ChakraIconButton(props) {
309
- var icon = props.icon,
310
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
311
- return jsxRuntime.jsx(react.IconButton, _extends({
312
- "aria-label": props.title
313
- }, otherProps, {
292
+ const {
293
+ icon,
294
+ iconType,
295
+ uiSchema,
296
+ registry,
297
+ ...otherProps
298
+ } = props;
299
+ return jsxRuntime.jsx(react.IconButton, {
300
+ "aria-label": props.title,
301
+ ...otherProps,
314
302
  icon: icon
315
- }));
303
+ });
316
304
  }
317
305
  ChakraIconButton.displayName = 'ChakraIconButton';
318
306
  var ChakraIconButton$1 = /*#__PURE__*/react$1.memo(ChakraIconButton);
319
307
 
320
308
  function CopyButton(props) {
321
- var translateString = props.registry.translateString;
322
- return jsxRuntime.jsx(ChakraIconButton$1, _extends({
323
- title: translateString(utils.TranslatableString.CopyButton)
324
- }, props, {
309
+ const {
310
+ registry: {
311
+ translateString
312
+ }
313
+ } = props;
314
+ return jsxRuntime.jsx(ChakraIconButton$1, {
315
+ title: translateString(utils.TranslatableString.CopyButton),
316
+ ...props,
325
317
  icon: jsxRuntime.jsx(icons.CopyIcon, {})
326
- }));
318
+ });
327
319
  }
328
320
  function MoveDownButton(props) {
329
- var translateString = props.registry.translateString;
330
- return jsxRuntime.jsx(ChakraIconButton$1, _extends({
331
- title: translateString(utils.TranslatableString.MoveDownButton)
332
- }, props, {
321
+ const {
322
+ registry: {
323
+ translateString
324
+ }
325
+ } = props;
326
+ return jsxRuntime.jsx(ChakraIconButton$1, {
327
+ title: translateString(utils.TranslatableString.MoveDownButton),
328
+ ...props,
333
329
  icon: jsxRuntime.jsx(icons.ArrowDownIcon, {})
334
- }));
330
+ });
335
331
  }
336
332
  function MoveUpButton(props) {
337
- var translateString = props.registry.translateString;
338
- return jsxRuntime.jsx(ChakraIconButton$1, _extends({
339
- title: translateString(utils.TranslatableString.MoveUpButton)
340
- }, props, {
333
+ const {
334
+ registry: {
335
+ translateString
336
+ }
337
+ } = props;
338
+ return jsxRuntime.jsx(ChakraIconButton$1, {
339
+ title: translateString(utils.TranslatableString.MoveUpButton),
340
+ ...props,
341
341
  icon: jsxRuntime.jsx(icons.ArrowUpIcon, {})
342
- }));
342
+ });
343
343
  }
344
344
  function RemoveButton(props) {
345
- var translateString = props.registry.translateString;
346
- return jsxRuntime.jsx(ChakraIconButton$1, _extends({
347
- title: translateString(utils.TranslatableString.RemoveButton)
348
- }, props, {
345
+ const {
346
+ registry: {
347
+ translateString
348
+ }
349
+ } = props;
350
+ return jsxRuntime.jsx(ChakraIconButton$1, {
351
+ title: translateString(utils.TranslatableString.RemoveButton),
352
+ ...props,
349
353
  icon: jsxRuntime.jsx(icons.DeleteIcon, {})
350
- }));
354
+ });
351
355
  }
352
356
 
353
357
  /** The `FieldErrorTemplate` component renders the errors local to the particular field
@@ -355,15 +359,16 @@
355
359
  * @param props - The `FieldErrorProps` for the errors being rendered
356
360
  */
357
361
  function FieldErrorTemplate(props) {
358
- var _props$errors = props.errors,
359
- errors = _props$errors === void 0 ? [] : _props$errors,
360
- idSchema = props.idSchema;
362
+ const {
363
+ errors = [],
364
+ idSchema
365
+ } = props;
361
366
  if (errors.length === 0) {
362
367
  return null;
363
368
  }
364
- var id = utils.errorId(idSchema);
369
+ const id = utils.errorId(idSchema);
365
370
  return jsxRuntime.jsx(react.List, {
366
- children: errors.map(function (error, i) {
371
+ children: errors.map((error, i) => {
367
372
  return jsxRuntime.jsx(react.ListItem, {
368
373
  children: jsxRuntime.jsx(react.FormErrorMessage, {
369
374
  id: id,
@@ -379,12 +384,14 @@
379
384
  * @param props - The `FieldHelpProps` to be rendered
380
385
  */
381
386
  function FieldHelpTemplate(props) {
382
- var idSchema = props.idSchema,
383
- help = props.help;
387
+ const {
388
+ idSchema,
389
+ help
390
+ } = props;
384
391
  if (!help) {
385
392
  return null;
386
393
  }
387
- var id = utils.helpId(idSchema);
394
+ const id = utils.helpId(idSchema);
388
395
  return jsxRuntime.jsx(react.FormHelperText, {
389
396
  id: id,
390
397
  children: help
@@ -392,29 +399,30 @@
392
399
  }
393
400
 
394
401
  function FieldTemplate(props) {
395
- var id = props.id,
396
- children = props.children,
397
- classNames = props.classNames,
398
- style = props.style,
399
- disabled = props.disabled,
400
- displayLabel = props.displayLabel,
401
- hidden = props.hidden,
402
- label = props.label,
403
- onDropPropertyClick = props.onDropPropertyClick,
404
- onKeyChange = props.onKeyChange,
405
- readonly = props.readonly,
406
- registry = props.registry,
407
- required = props.required,
408
- _props$rawErrors = props.rawErrors,
409
- rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors,
410
- errors = props.errors,
411
- help = props.help,
412
- description = props.description,
413
- rawDescription = props.rawDescription,
414
- schema = props.schema,
415
- uiSchema = props.uiSchema;
416
- var uiOptions = utils.getUiOptions(uiSchema);
417
- var WrapIfAdditionalTemplate = utils.getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
402
+ const {
403
+ id,
404
+ children,
405
+ classNames,
406
+ style,
407
+ disabled,
408
+ displayLabel,
409
+ hidden,
410
+ label,
411
+ onDropPropertyClick,
412
+ onKeyChange,
413
+ readonly,
414
+ registry,
415
+ required,
416
+ rawErrors = [],
417
+ errors,
418
+ help,
419
+ description,
420
+ rawDescription,
421
+ schema,
422
+ uiSchema
423
+ } = props;
424
+ const uiOptions = utils.getUiOptions(uiSchema);
425
+ const WrapIfAdditionalTemplate = utils.getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
418
426
  if (hidden) {
419
427
  return jsxRuntime.jsx("div", {
420
428
  style: {
@@ -448,23 +456,29 @@
448
456
  }
449
457
 
450
458
  function ObjectFieldTemplate(props) {
451
- var description = props.description,
452
- title = props.title,
453
- properties = props.properties,
454
- required = props.required,
455
- disabled = props.disabled,
456
- readonly = props.readonly,
457
- uiSchema = props.uiSchema,
458
- idSchema = props.idSchema,
459
- schema = props.schema,
460
- formData = props.formData,
461
- onAddClick = props.onAddClick,
462
- registry = props.registry;
463
- var uiOptions = utils.getUiOptions(uiSchema);
464
- var TitleFieldTemplate = utils.getTemplate('TitleFieldTemplate', registry, uiOptions);
465
- var DescriptionFieldTemplate = utils.getTemplate('DescriptionFieldTemplate', registry, uiOptions);
459
+ const {
460
+ description,
461
+ title,
462
+ properties,
463
+ required,
464
+ disabled,
465
+ readonly,
466
+ uiSchema,
467
+ idSchema,
468
+ schema,
469
+ formData,
470
+ onAddClick,
471
+ registry
472
+ } = props;
473
+ const uiOptions = utils.getUiOptions(uiSchema);
474
+ const TitleFieldTemplate = utils.getTemplate('TitleFieldTemplate', registry, uiOptions);
475
+ const DescriptionFieldTemplate = utils.getTemplate('DescriptionFieldTemplate', registry, uiOptions);
466
476
  // Button templates are not overridden in the uiSchema
467
- var AddButton = registry.templates.ButtonTemplates.AddButton;
477
+ const {
478
+ ButtonTemplates: {
479
+ AddButton
480
+ }
481
+ } = registry.templates;
468
482
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
469
483
  children: [title && jsxRuntime.jsx(TitleFieldTemplate, {
470
484
  id: utils.titleId(idSchema),
@@ -482,11 +496,9 @@
482
496
  }), jsxRuntime.jsxs(react.Grid, {
483
497
  gap: description ? 2 : 6,
484
498
  mb: 4,
485
- children: [properties.map(function (element, index) {
486
- return element.hidden ? element.content : jsxRuntime.jsx(react.GridItem, {
487
- children: element.content
488
- }, idSchema.$id + "-" + element.name + "-" + index);
489
- }), utils.canExpand(schema, uiSchema, formData) && jsxRuntime.jsx(react.GridItem, {
499
+ children: [properties.map((element, index) => element.hidden ? element.content : jsxRuntime.jsx(react.GridItem, {
500
+ children: element.content
501
+ }, `${idSchema.$id}-${element.name}-${index}`)), utils.canExpand(schema, uiSchema, formData) && jsxRuntime.jsx(react.GridItem, {
490
502
  justifySelf: 'flex-end',
491
503
  children: jsxRuntime.jsx(AddButton, {
492
504
  className: 'object-property-expand',
@@ -500,29 +512,32 @@
500
512
  });
501
513
  }
502
514
 
503
- function SubmitButton(_ref) {
504
- var uiSchema = _ref.uiSchema;
505
- var _getSubmitButtonOptio = utils.getSubmitButtonOptions(uiSchema),
506
- submitText = _getSubmitButtonOptio.submitText,
507
- norender = _getSubmitButtonOptio.norender,
508
- submitButtonProps = _getSubmitButtonOptio.props;
515
+ function SubmitButton({
516
+ uiSchema
517
+ }) {
518
+ const {
519
+ submitText,
520
+ norender,
521
+ props: submitButtonProps
522
+ } = utils.getSubmitButtonOptions(uiSchema);
509
523
  if (norender) {
510
524
  return null;
511
525
  }
512
526
  return jsxRuntime.jsx(react.Box, {
513
527
  marginTop: 3,
514
- children: jsxRuntime.jsx(react.Button, _extends({
528
+ children: jsxRuntime.jsx(react.Button, {
515
529
  type: 'submit',
516
- variant: 'solid'
517
- }, submitButtonProps, {
530
+ variant: 'solid',
531
+ ...submitButtonProps,
518
532
  children: submitText
519
- }))
533
+ })
520
534
  });
521
535
  }
522
536
 
523
- function TitleField(_ref) {
524
- var id = _ref.id,
525
- title = _ref.title;
537
+ function TitleField({
538
+ id,
539
+ title
540
+ }) {
526
541
  return jsxRuntime.jsxs(react.Box, {
527
542
  id: id,
528
543
  mt: 1,
@@ -535,25 +550,31 @@
535
550
  }
536
551
 
537
552
  function WrapIfAdditionalTemplate(props) {
538
- var children = props.children,
539
- classNames = props.classNames,
540
- style = props.style,
541
- disabled = props.disabled,
542
- id = props.id,
543
- label = props.label,
544
- onDropPropertyClick = props.onDropPropertyClick,
545
- onKeyChange = props.onKeyChange,
546
- readonly = props.readonly,
547
- registry = props.registry,
548
- required = props.required,
549
- schema = props.schema,
550
- uiSchema = props.uiSchema;
551
- var templates = registry.templates,
552
- translateString = registry.translateString;
553
+ const {
554
+ children,
555
+ classNames,
556
+ style,
557
+ disabled,
558
+ id,
559
+ label,
560
+ onDropPropertyClick,
561
+ onKeyChange,
562
+ readonly,
563
+ registry,
564
+ required,
565
+ schema,
566
+ uiSchema
567
+ } = props;
568
+ const {
569
+ templates,
570
+ translateString
571
+ } = registry;
553
572
  // Button templates are not overridden in the uiSchema
554
- var RemoveButton = templates.ButtonTemplates.RemoveButton;
555
- var keyLabel = translateString(utils.TranslatableString.KeyLabel, [label]);
556
- var additional = (utils.ADDITIONAL_PROPERTY_FLAG in schema);
573
+ const {
574
+ RemoveButton
575
+ } = templates.ButtonTemplates;
576
+ const keyLabel = translateString(utils.TranslatableString.KeyLabel, [label]);
577
+ const additional = (utils.ADDITIONAL_PROPERTY_FLAG in schema);
557
578
  if (!additional) {
558
579
  return jsxRuntime.jsx("div", {
559
580
  className: classNames,
@@ -561,10 +582,9 @@
561
582
  children: children
562
583
  });
563
584
  }
564
- var handleBlur = function handleBlur(_ref) {
565
- var target = _ref.target;
566
- return onKeyChange(target.value);
567
- };
585
+ const handleBlur = ({
586
+ target
587
+ }) => onKeyChange(target.value);
568
588
  return jsxRuntime.jsxs(react.Grid, {
569
589
  className: classNames,
570
590
  style: style,
@@ -574,14 +594,14 @@
574
594
  children: jsxRuntime.jsxs(react.FormControl, {
575
595
  isRequired: required,
576
596
  children: [jsxRuntime.jsx(react.FormLabel, {
577
- htmlFor: id + "-key",
578
- id: id + "-key-label",
597
+ htmlFor: `${id}-key`,
598
+ id: `${id}-key-label`,
579
599
  children: keyLabel
580
600
  }), jsxRuntime.jsx(react.Input, {
581
601
  defaultValue: label,
582
602
  disabled: disabled || readonly,
583
- id: id + "-key",
584
- name: id + "-key",
603
+ id: `${id}-key`,
604
+ name: `${id}-key`,
585
605
  onBlur: !readonly ? handleBlur : undefined,
586
606
  type: 'text',
587
607
  mb: 1
@@ -597,37 +617,37 @@
597
617
  registry: registry
598
618
  })
599
619
  })]
600
- }, id + "-key");
620
+ }, `${id}-key`);
601
621
  }
602
622
 
603
623
  function generateTemplates() {
604
624
  return {
605
- ArrayFieldItemTemplate: ArrayFieldItemTemplate,
606
- ArrayFieldTemplate: ArrayFieldTemplate,
607
- BaseInputTemplate: BaseInputTemplate,
625
+ ArrayFieldItemTemplate,
626
+ ArrayFieldTemplate,
627
+ BaseInputTemplate,
608
628
  ButtonTemplates: {
609
- CopyButton: CopyButton,
610
- AddButton: AddButton,
611
- MoveDownButton: MoveDownButton,
612
- MoveUpButton: MoveUpButton,
613
- RemoveButton: RemoveButton,
614
- SubmitButton: SubmitButton
629
+ CopyButton,
630
+ AddButton,
631
+ MoveDownButton,
632
+ MoveUpButton,
633
+ RemoveButton,
634
+ SubmitButton
615
635
  },
616
636
  DescriptionFieldTemplate: DescriptionField,
617
637
  ErrorListTemplate: ErrorList,
618
- FieldErrorTemplate: FieldErrorTemplate,
619
- FieldHelpTemplate: FieldHelpTemplate,
620
- FieldTemplate: FieldTemplate,
621
- ObjectFieldTemplate: ObjectFieldTemplate,
638
+ FieldErrorTemplate,
639
+ FieldHelpTemplate,
640
+ FieldTemplate,
641
+ ObjectFieldTemplate,
622
642
  TitleFieldTemplate: TitleField,
623
- WrapIfAdditionalTemplate: WrapIfAdditionalTemplate
643
+ WrapIfAdditionalTemplate
624
644
  };
625
645
  }
626
646
  var Templates = /*#__PURE__*/generateTemplates();
627
647
 
628
- var rangeOptions = function rangeOptions(start, stop) {
629
- var options = [];
630
- for (var i = start; i <= stop; i++) {
648
+ const rangeOptions = (start, stop) => {
649
+ const options = [];
650
+ for (let i = start; i <= stop; i++) {
631
651
  options.push({
632
652
  value: i,
633
653
  label: utils.pad(i, 2)
@@ -636,14 +656,15 @@
636
656
  return options;
637
657
  };
638
658
  function DateElement(props) {
639
- var SelectWidget = props.registry.widgets.SelectWidget;
640
- var value = props.value ? props.value : undefined;
641
- return jsxRuntime.jsx(SelectWidget, _extends({}, props, {
659
+ const {
660
+ SelectWidget
661
+ } = props.registry.widgets;
662
+ const value = props.value ? props.value : undefined;
663
+ return jsxRuntime.jsx(SelectWidget, {
664
+ ...props,
642
665
  label: '',
643
666
  className: 'form-control',
644
- onChange: function onChange(elemValue) {
645
- return props.select(props.type, elemValue);
646
- },
667
+ onChange: elemValue => props.select(props.type, elemValue),
647
668
  options: {
648
669
  enumOptions: rangeOptions(props.range[0], props.range[1])
649
670
  },
@@ -653,64 +674,68 @@
653
674
  },
654
675
  value: value,
655
676
  "aria-describedby": utils.ariaDescribedByIds(props.name)
656
- }));
657
- }
658
- var readyForChange = function readyForChange(state) {
659
- return Object.keys(state).every(function (key) {
660
- return typeof state[key] !== 'undefined' && state[key] !== -1;
661
677
  });
678
+ }
679
+ const readyForChange = state => {
680
+ return Object.keys(state).every(key => typeof state[key] !== 'undefined' && state[key] !== -1);
662
681
  };
663
682
  function AltDateWidget(props) {
664
- var autofocus = props.autofocus,
665
- disabled = props.disabled,
666
- id = props.id,
667
- onBlur = props.onBlur,
668
- onChange = props.onChange,
669
- onFocus = props.onFocus,
670
- options = props.options,
671
- readonly = props.readonly,
672
- registry = props.registry,
673
- showTime = props.showTime,
674
- value = props.value;
675
- var translateString = registry.translateString;
676
- var _useState = react$1.useState(utils.parseDateString(value, showTime)),
677
- state = _useState[0],
678
- setState = _useState[1];
679
- react$1.useEffect(function () {
683
+ const {
684
+ autofocus,
685
+ disabled,
686
+ id,
687
+ onBlur,
688
+ onChange,
689
+ onFocus,
690
+ options,
691
+ readonly,
692
+ registry,
693
+ showTime,
694
+ value
695
+ } = props;
696
+ const {
697
+ translateString
698
+ } = registry;
699
+ const [state, setState] = react$1.useState(utils.parseDateString(value, showTime));
700
+ react$1.useEffect(() => {
680
701
  setState(utils.parseDateString(value, showTime));
681
702
  }, [showTime, value]);
682
- var handleChange = function handleChange(property, nextValue) {
683
- var _extends2;
684
- var nextState = _extends({}, state, (_extends2 = {}, _extends2[property] = typeof nextValue === 'undefined' ? -1 : nextValue, _extends2));
703
+ const handleChange = (property, nextValue) => {
704
+ const nextState = {
705
+ ...state,
706
+ [property]: typeof nextValue === 'undefined' ? -1 : nextValue
707
+ };
685
708
  if (readyForChange(nextState)) {
686
709
  onChange(utils.toDateString(nextState, showTime));
687
710
  } else {
688
711
  setState(nextState);
689
712
  }
690
713
  };
691
- var handleNow = function handleNow(event) {
714
+ const handleNow = event => {
692
715
  event.preventDefault();
693
716
  if (disabled || readonly) {
694
717
  return;
695
718
  }
696
- var nextState = utils.parseDateString(new Date().toJSON(), showTime);
719
+ const nextState = utils.parseDateString(new Date().toJSON(), showTime);
697
720
  onChange(utils.toDateString(nextState, showTime));
698
721
  };
699
- var handleClear = function handleClear(event) {
722
+ const handleClear = event => {
700
723
  event.preventDefault();
701
724
  if (disabled || readonly) {
702
725
  return;
703
726
  }
704
727
  onChange(undefined);
705
728
  };
706
- var dateElementProps = function dateElementProps() {
707
- var year = state.year,
708
- month = state.month,
709
- day = state.day,
710
- hour = state.hour,
711
- minute = state.minute,
712
- second = state.second;
713
- var data = [{
729
+ const dateElementProps = () => {
730
+ const {
731
+ year,
732
+ month,
733
+ day,
734
+ hour,
735
+ minute,
736
+ second
737
+ } = state;
738
+ const data = [{
714
739
  type: 'year',
715
740
  range: options.yearsRange,
716
741
  value: year
@@ -745,12 +770,14 @@
745
770
  display: 'flex',
746
771
  flexWrap: 'wrap',
747
772
  alignItems: 'center',
748
- children: dateElementProps().map(function (elemProps, i) {
749
- var elemId = id + '_' + elemProps.type;
773
+ children: dateElementProps().map((elemProps, i) => {
774
+ const elemId = id + '_' + elemProps.type;
750
775
  return jsxRuntime.jsx(react.Box, {
751
776
  mr: '2',
752
777
  mb: '2',
753
- children: jsxRuntime.jsx(DateElement, _extends({}, props, elemProps, {
778
+ children: jsxRuntime.jsx(DateElement, {
779
+ ...props,
780
+ ...elemProps,
754
781
  autofocus: autofocus && i === 0,
755
782
  disabled: disabled,
756
783
  id: elemId,
@@ -761,21 +788,17 @@
761
788
  registry: registry,
762
789
  select: handleChange,
763
790
  value: elemProps.value < 0 ? '' : elemProps.value
764
- }))
791
+ })
765
792
  }, elemId);
766
793
  })
767
794
  }), jsxRuntime.jsxs(react.Box, {
768
795
  display: 'flex',
769
796
  children: [!options.hideNowButton && jsxRuntime.jsx(react.Button, {
770
- onClick: function onClick(e) {
771
- return handleNow(e);
772
- },
797
+ onClick: e => handleNow(e),
773
798
  mr: '2',
774
799
  children: translateString(utils.TranslatableString.NowLabel)
775
800
  }), !options.hideClearButton && jsxRuntime.jsx(react.Button, {
776
- onClick: function onClick(e) {
777
- return handleClear(e);
778
- },
801
+ onClick: e => handleClear(e),
779
802
  children: translateString(utils.TranslatableString.ClearLabel)
780
803
  })]
781
804
  })]
@@ -792,53 +815,62 @@
792
815
  };
793
816
 
794
817
  function AltDateTimeWidget(props) {
795
- var AltDateWidget = props.registry.widgets.AltDateWidget;
796
- return jsxRuntime.jsx(AltDateWidget, _extends({}, props, {
818
+ const {
819
+ AltDateWidget
820
+ } = props.registry.widgets;
821
+ return jsxRuntime.jsx(AltDateWidget, {
822
+ ...props,
797
823
  showTime: true
798
- }));
824
+ });
799
825
  }
800
- AltDateTimeWidget.defaultProps = /*#__PURE__*/_extends({}, AltDateWidget.defaultProps, {
826
+ AltDateTimeWidget.defaultProps = {
827
+ ...AltDateWidget.defaultProps,
801
828
  showTime: true
802
- });
829
+ };
803
830
 
804
831
  function CheckboxWidget(props) {
805
- var id = props.id,
806
- value = props.value,
807
- disabled = props.disabled,
808
- readonly = props.readonly,
809
- onChange = props.onChange,
810
- onBlur = props.onBlur,
811
- onFocus = props.onFocus,
812
- label = props.label,
813
- hideLabel = props.hideLabel,
814
- registry = props.registry,
815
- options = props.options,
816
- uiSchema = props.uiSchema,
817
- schema = props.schema;
818
- var chakraProps = getChakra({
819
- uiSchema: uiSchema
832
+ const {
833
+ id,
834
+ value,
835
+ disabled,
836
+ readonly,
837
+ onChange,
838
+ onBlur,
839
+ onFocus,
840
+ label,
841
+ hideLabel,
842
+ registry,
843
+ options,
844
+ uiSchema,
845
+ schema
846
+ } = props;
847
+ const chakraProps = getChakra({
848
+ uiSchema
820
849
  });
821
850
  // Because an unchecked checkbox will cause html5 validation to fail, only add
822
851
  // the "required" attribute if the field value must be "true", due to the
823
852
  // "const" or "enum" keywords
824
- var required = utils.schemaRequiresTrueValue(schema);
825
- var DescriptionFieldTemplate = utils.getTemplate('DescriptionFieldTemplate', registry, options);
826
- var description = options.description || schema.description;
827
- var _onChange = function _onChange(_ref) {
828
- var checked = _ref.target.checked;
829
- return onChange(checked);
830
- };
831
- var _onBlur = function _onBlur(_ref2) {
832
- var value = _ref2.target.value;
833
- return onBlur(id, value);
834
- };
835
- var _onFocus = function _onFocus(_ref3) {
836
- var value = _ref3.target.value;
837
- return onFocus(id, value);
838
- };
839
- return jsxRuntime.jsxs(react.FormControl, _extends({
840
- mb: 1
841
- }, chakraProps, {
853
+ const required = utils.schemaRequiresTrueValue(schema);
854
+ const DescriptionFieldTemplate = utils.getTemplate('DescriptionFieldTemplate', registry, options);
855
+ const description = options.description || schema.description;
856
+ const _onChange = ({
857
+ target: {
858
+ checked
859
+ }
860
+ }) => onChange(checked);
861
+ const _onBlur = ({
862
+ target: {
863
+ value
864
+ }
865
+ }) => onBlur(id, value);
866
+ const _onFocus = ({
867
+ target: {
868
+ value
869
+ }
870
+ }) => onFocus(id, value);
871
+ return jsxRuntime.jsxs(react.FormControl, {
872
+ mb: 1,
873
+ ...chakraProps,
842
874
  isRequired: required,
843
875
  children: [!hideLabel && !!description && jsxRuntime.jsx(DescriptionFieldTemplate, {
844
876
  id: utils.descriptionId(id),
@@ -859,63 +891,66 @@
859
891
  children: label
860
892
  }), hideLabel || !label)
861
893
  })]
862
- }));
894
+ });
863
895
  }
864
896
 
865
897
  function CheckboxesWidget(props) {
866
- var id = props.id,
867
- disabled = props.disabled,
868
- options = props.options,
869
- value = props.value,
870
- readonly = props.readonly,
871
- _onChange = props.onChange,
872
- onBlur = props.onBlur,
873
- onFocus = props.onFocus,
874
- required = props.required,
875
- label = props.label,
876
- hideLabel = props.hideLabel,
877
- uiSchema = props.uiSchema,
878
- _props$rawErrors = props.rawErrors,
879
- rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors;
880
- var enumOptions = options.enumOptions,
881
- enumDisabled = options.enumDisabled,
882
- emptyValue = options.emptyValue;
883
- var chakraProps = getChakra({
884
- uiSchema: uiSchema
898
+ const {
899
+ id,
900
+ disabled,
901
+ options,
902
+ value,
903
+ readonly,
904
+ onChange,
905
+ onBlur,
906
+ onFocus,
907
+ required,
908
+ label,
909
+ hideLabel,
910
+ uiSchema,
911
+ rawErrors = []
912
+ } = props;
913
+ const {
914
+ enumOptions,
915
+ enumDisabled,
916
+ emptyValue
917
+ } = options;
918
+ const chakraProps = getChakra({
919
+ uiSchema
885
920
  });
886
- var checkboxesValues = Array.isArray(value) ? value : [value];
887
- var _onBlur = function _onBlur(_ref) {
888
- var value = _ref.target.value;
889
- return onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
890
- };
891
- var _onFocus = function _onFocus(_ref2) {
892
- var value = _ref2.target.value;
893
- return onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
894
- };
895
- var row = options ? options.inline : false;
896
- var selectedIndexes = utils.enumOptionsIndexForValue(value, enumOptions, true);
897
- return jsxRuntime.jsxs(react.FormControl, _extends({
898
- mb: 1
899
- }, chakraProps, {
921
+ const checkboxesValues = Array.isArray(value) ? value : [value];
922
+ const _onBlur = ({
923
+ target: {
924
+ value
925
+ }
926
+ }) => onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
927
+ const _onFocus = ({
928
+ target: {
929
+ value
930
+ }
931
+ }) => onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
932
+ const row = options ? options.inline : false;
933
+ const selectedIndexes = utils.enumOptionsIndexForValue(value, enumOptions, true);
934
+ return jsxRuntime.jsxs(react.FormControl, {
935
+ mb: 1,
936
+ ...chakraProps,
900
937
  isDisabled: disabled || readonly,
901
938
  isRequired: required,
902
939
  isReadOnly: readonly,
903
940
  isInvalid: rawErrors && rawErrors.length > 0,
904
941
  children: [utils.labelValue(jsxRuntime.jsx(react.FormLabel, {
905
942
  htmlFor: id,
906
- id: id + "-label",
943
+ id: `${id}-label`,
907
944
  children: label
908
945
  }), hideLabel || !label), jsxRuntime.jsx(react.CheckboxGroup, {
909
- onChange: function onChange(option) {
910
- return _onChange(utils.enumOptionsValueForIndex(option, enumOptions, emptyValue));
911
- },
946
+ onChange: option => onChange(utils.enumOptionsValueForIndex(option, enumOptions, emptyValue)),
912
947
  defaultValue: selectedIndexes,
913
948
  "aria-describedby": utils.ariaDescribedByIds(id),
914
949
  children: jsxRuntime.jsx(react.Stack, {
915
950
  direction: row ? 'row' : 'column',
916
- children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
917
- var checked = utils.enumOptionsIsSelected(option.value, checkboxesValues);
918
- var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
951
+ children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
952
+ const checked = utils.enumOptionsIsSelected(option.value, checkboxesValues);
953
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
919
954
  return jsxRuntime.jsx(react.Checkbox, {
920
955
  id: utils.optionId(id, index),
921
956
  name: id,
@@ -931,51 +966,53 @@
931
966
  })
932
967
  })
933
968
  })]
934
- }));
969
+ });
935
970
  }
936
971
 
937
- function RadioWidget(_ref) {
938
- var _enumOptionsIndexForV;
939
- var id = _ref.id,
940
- options = _ref.options,
941
- value = _ref.value,
942
- required = _ref.required,
943
- disabled = _ref.disabled,
944
- readonly = _ref.readonly,
945
- label = _ref.label,
946
- hideLabel = _ref.hideLabel,
947
- onChange = _ref.onChange,
948
- onBlur = _ref.onBlur,
949
- onFocus = _ref.onFocus,
950
- uiSchema = _ref.uiSchema;
951
- var enumOptions = options.enumOptions,
952
- enumDisabled = options.enumDisabled,
953
- emptyValue = options.emptyValue;
954
- var chakraProps = getChakra({
955
- uiSchema: uiSchema
972
+ function RadioWidget({
973
+ id,
974
+ options,
975
+ value,
976
+ required,
977
+ disabled,
978
+ readonly,
979
+ label,
980
+ hideLabel,
981
+ onChange,
982
+ onBlur,
983
+ onFocus,
984
+ uiSchema
985
+ }) {
986
+ const {
987
+ enumOptions,
988
+ enumDisabled,
989
+ emptyValue
990
+ } = options;
991
+ const chakraProps = getChakra({
992
+ uiSchema
956
993
  });
957
- var _onChange = function _onChange(nextValue) {
958
- return onChange(utils.enumOptionsValueForIndex(nextValue, enumOptions, emptyValue));
959
- };
960
- var _onBlur = function _onBlur(_ref2) {
961
- var value = _ref2.target.value;
962
- return onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
963
- };
964
- var _onFocus = function _onFocus(_ref3) {
965
- var value = _ref3.target.value;
966
- return onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
967
- };
968
- var row = options ? options.inline : false;
969
- var selectedIndex = (_enumOptionsIndexForV = utils.enumOptionsIndexForValue(value, enumOptions)) != null ? _enumOptionsIndexForV : null;
970
- return jsxRuntime.jsxs(react.FormControl, _extends({
971
- mb: 1
972
- }, chakraProps, {
994
+ const _onChange = nextValue => onChange(utils.enumOptionsValueForIndex(nextValue, enumOptions, emptyValue));
995
+ const _onBlur = ({
996
+ target: {
997
+ value
998
+ }
999
+ }) => onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1000
+ const _onFocus = ({
1001
+ target: {
1002
+ value
1003
+ }
1004
+ }) => onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1005
+ const row = options ? options.inline : false;
1006
+ const selectedIndex = utils.enumOptionsIndexForValue(value, enumOptions) ?? null;
1007
+ return jsxRuntime.jsxs(react.FormControl, {
1008
+ mb: 1,
1009
+ ...chakraProps,
973
1010
  isDisabled: disabled || readonly,
974
1011
  isRequired: required,
975
1012
  isReadOnly: readonly,
976
1013
  children: [utils.labelValue(jsxRuntime.jsx(react.FormLabel, {
977
1014
  htmlFor: id,
978
- id: id + "-label",
1015
+ id: `${id}-label`,
979
1016
  children: label
980
1017
  }), hideLabel || !label), jsxRuntime.jsx(react.RadioGroup, {
981
1018
  onChange: _onChange,
@@ -986,8 +1023,8 @@
986
1023
  "aria-describedby": utils.ariaDescribedByIds(id),
987
1024
  children: jsxRuntime.jsx(react.Stack, {
988
1025
  direction: row ? 'row' : 'column',
989
- children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
990
- var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
1026
+ children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
1027
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
991
1028
  return jsxRuntime.jsx(react.Radio, {
992
1029
  value: String(index),
993
1030
  id: utils.optionId(id, index),
@@ -997,48 +1034,51 @@
997
1034
  })
998
1035
  })
999
1036
  })]
1000
- }));
1037
+ });
1001
1038
  }
1002
1039
 
1003
- function RangeWidget(_ref) {
1004
- var value = _ref.value,
1005
- readonly = _ref.readonly,
1006
- disabled = _ref.disabled,
1007
- onBlur = _ref.onBlur,
1008
- onFocus = _ref.onFocus,
1009
- options = _ref.options,
1010
- schema = _ref.schema,
1011
- uiSchema = _ref.uiSchema,
1012
- onChange = _ref.onChange,
1013
- label = _ref.label,
1014
- hideLabel = _ref.hideLabel,
1015
- id = _ref.id;
1016
- var chakraProps = getChakra({
1017
- uiSchema: uiSchema
1040
+ function RangeWidget({
1041
+ value,
1042
+ readonly,
1043
+ disabled,
1044
+ onBlur,
1045
+ onFocus,
1046
+ options,
1047
+ schema,
1048
+ uiSchema,
1049
+ onChange,
1050
+ label,
1051
+ hideLabel,
1052
+ id
1053
+ }) {
1054
+ const chakraProps = getChakra({
1055
+ uiSchema
1018
1056
  });
1019
- var sliderWidgetProps = _extends({
1020
- value: value,
1021
- label: label,
1022
- id: id
1023
- }, utils.rangeSpec(schema));
1024
- var _onChange = function _onChange(value) {
1025
- return onChange(value === undefined ? options.emptyValue : value);
1026
- };
1027
- var _onBlur = function _onBlur(_ref2) {
1028
- var value = _ref2.target.value;
1029
- return onBlur(id, value);
1057
+ const sliderWidgetProps = {
1058
+ value,
1059
+ label,
1060
+ id,
1061
+ ...utils.rangeSpec(schema)
1030
1062
  };
1031
- var _onFocus = function _onFocus(_ref3) {
1032
- var value = _ref3.target.value;
1033
- return onFocus(id, value);
1034
- };
1035
- return jsxRuntime.jsxs(react.FormControl, _extends({
1036
- mb: 1
1037
- }, chakraProps, {
1063
+ const _onChange = value => onChange(value === undefined ? options.emptyValue : value);
1064
+ const _onBlur = ({
1065
+ target: {
1066
+ value
1067
+ }
1068
+ }) => onBlur(id, value);
1069
+ const _onFocus = ({
1070
+ target: {
1071
+ value
1072
+ }
1073
+ }) => onFocus(id, value);
1074
+ return jsxRuntime.jsxs(react.FormControl, {
1075
+ mb: 1,
1076
+ ...chakraProps,
1038
1077
  children: [utils.labelValue(jsxRuntime.jsx(react.FormLabel, {
1039
1078
  htmlFor: id,
1040
1079
  children: label
1041
- }), hideLabel || !label), jsxRuntime.jsxs(react.Slider, _extends({}, sliderWidgetProps, {
1080
+ }), hideLabel || !label), jsxRuntime.jsxs(react.Slider, {
1081
+ ...sliderWidgetProps,
1042
1082
  id: id,
1043
1083
  name: id,
1044
1084
  isDisabled: disabled || readonly,
@@ -1049,82 +1089,89 @@
1049
1089
  children: [jsxRuntime.jsx(react.SliderTrack, {
1050
1090
  children: jsxRuntime.jsx(react.SliderFilledTrack, {})
1051
1091
  }), jsxRuntime.jsx(react.SliderThumb, {})]
1052
- }))]
1053
- }));
1092
+ })]
1093
+ });
1054
1094
  }
1055
1095
 
1056
1096
  function SelectWidget(props) {
1057
- var id = props.id,
1058
- options = props.options,
1059
- label = props.label,
1060
- hideLabel = props.hideLabel,
1061
- placeholder = props.placeholder,
1062
- multiple = props.multiple,
1063
- required = props.required,
1064
- disabled = props.disabled,
1065
- readonly = props.readonly,
1066
- value = props.value,
1067
- autofocus = props.autofocus,
1068
- onChange = props.onChange,
1069
- onBlur = props.onBlur,
1070
- onFocus = props.onFocus,
1071
- _props$rawErrors = props.rawErrors,
1072
- rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors,
1073
- uiSchema = props.uiSchema;
1074
- var enumOptions = options.enumOptions,
1075
- enumDisabled = options.enumDisabled,
1076
- emptyValue = options.emptyValue;
1077
- var chakraProps = getChakra({
1078
- uiSchema: uiSchema
1097
+ const {
1098
+ id,
1099
+ options,
1100
+ label,
1101
+ hideLabel,
1102
+ placeholder,
1103
+ multiple,
1104
+ required,
1105
+ disabled,
1106
+ readonly,
1107
+ value,
1108
+ autofocus,
1109
+ onChange,
1110
+ onBlur,
1111
+ onFocus,
1112
+ rawErrors = [],
1113
+ uiSchema
1114
+ } = props;
1115
+ const {
1116
+ enumOptions,
1117
+ enumDisabled,
1118
+ emptyValue
1119
+ } = options;
1120
+ const chakraProps = getChakra({
1121
+ uiSchema
1079
1122
  });
1080
- var _onMultiChange = function _onMultiChange(e) {
1081
- return onChange(utils.enumOptionsValueForIndex(e.map(function (v) {
1123
+ const _onMultiChange = e => {
1124
+ return onChange(utils.enumOptionsValueForIndex(e.map(v => {
1082
1125
  return v.value;
1083
1126
  }), enumOptions, emptyValue));
1084
1127
  };
1085
- var _onChange = function _onChange(e) {
1128
+ const _onChange = e => {
1086
1129
  return onChange(utils.enumOptionsValueForIndex(e.value, enumOptions, emptyValue));
1087
1130
  };
1088
- var _onBlur = function _onBlur(_ref) {
1089
- var value = _ref.target.value;
1090
- return onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1091
- };
1092
- var _onFocus = function _onFocus(_ref2) {
1093
- var value = _ref2.target.value;
1094
- return onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1095
- };
1096
- var _valueLabelMap = {};
1097
- var displayEnumOptions = Array.isArray(enumOptions) ? enumOptions.map(function (option, index) {
1098
- var value = option.value,
1099
- label = option.label;
1131
+ const _onBlur = ({
1132
+ target: {
1133
+ value
1134
+ }
1135
+ }) => onBlur(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1136
+ const _onFocus = ({
1137
+ target: {
1138
+ value
1139
+ }
1140
+ }) => onFocus(id, utils.enumOptionsValueForIndex(value, enumOptions, emptyValue));
1141
+ const _valueLabelMap = {};
1142
+ const displayEnumOptions = Array.isArray(enumOptions) ? enumOptions.map((option, index) => {
1143
+ const {
1144
+ value,
1145
+ label
1146
+ } = option;
1100
1147
  _valueLabelMap[index] = label || String(value);
1101
1148
  return {
1102
- label: label,
1149
+ label,
1103
1150
  value: String(index),
1104
1151
  isDisabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1
1105
1152
  };
1106
1153
  }) : [];
1107
- var isMultiple = typeof multiple !== 'undefined' && Boolean(enumOptions);
1108
- var selectedIndex = utils.enumOptionsIndexForValue(value, enumOptions, isMultiple);
1109
- var formValue = isMultiple ? (selectedIndex || []).map(function (i) {
1154
+ const isMultiple = typeof multiple !== 'undefined' && Boolean(enumOptions);
1155
+ const selectedIndex = utils.enumOptionsIndexForValue(value, enumOptions, isMultiple);
1156
+ const formValue = isMultiple ? (selectedIndex || []).map(i => {
1110
1157
  return {
1111
1158
  label: _valueLabelMap[i],
1112
1159
  value: i
1113
1160
  };
1114
1161
  }) : {
1115
1162
  label: _valueLabelMap[selectedIndex] || '',
1116
- selectedIndex: selectedIndex
1163
+ selectedIndex
1117
1164
  };
1118
- return jsxRuntime.jsxs(react.FormControl, _extends({
1119
- mb: 1
1120
- }, chakraProps, {
1165
+ return jsxRuntime.jsxs(react.FormControl, {
1166
+ mb: 1,
1167
+ ...chakraProps,
1121
1168
  isDisabled: disabled || readonly,
1122
1169
  isRequired: required,
1123
1170
  isReadOnly: readonly,
1124
1171
  isInvalid: rawErrors && rawErrors.length > 0,
1125
1172
  children: [utils.labelValue(jsxRuntime.jsx(react.FormLabel, {
1126
1173
  htmlFor: id,
1127
- id: id + "-label",
1174
+ id: `${id}-label`,
1128
1175
  children: label
1129
1176
  }), hideLabel || !label), jsxRuntime.jsx(chakraReactSelect.Select, {
1130
1177
  inputId: id,
@@ -1140,43 +1187,47 @@
1140
1187
  value: formValue,
1141
1188
  "aria-describedby": utils.ariaDescribedByIds(id)
1142
1189
  })]
1143
- }));
1190
+ });
1144
1191
  }
1145
1192
 
1146
- function TextareaWidget(_ref) {
1147
- var id = _ref.id,
1148
- placeholder = _ref.placeholder,
1149
- value = _ref.value,
1150
- label = _ref.label,
1151
- hideLabel = _ref.hideLabel,
1152
- disabled = _ref.disabled,
1153
- autofocus = _ref.autofocus,
1154
- readonly = _ref.readonly,
1155
- onBlur = _ref.onBlur,
1156
- onFocus = _ref.onFocus,
1157
- onChange = _ref.onChange,
1158
- options = _ref.options,
1159
- uiSchema = _ref.uiSchema,
1160
- required = _ref.required,
1161
- rawErrors = _ref.rawErrors;
1162
- var chakraProps = getChakra({
1163
- uiSchema: uiSchema
1193
+ function TextareaWidget({
1194
+ id,
1195
+ placeholder,
1196
+ value,
1197
+ label,
1198
+ hideLabel,
1199
+ disabled,
1200
+ autofocus,
1201
+ readonly,
1202
+ onBlur,
1203
+ onFocus,
1204
+ onChange,
1205
+ options,
1206
+ uiSchema,
1207
+ required,
1208
+ rawErrors
1209
+ }) {
1210
+ const chakraProps = getChakra({
1211
+ uiSchema
1164
1212
  });
1165
- var _onChange = function _onChange(_ref2) {
1166
- var value = _ref2.target.value;
1167
- return onChange(value === '' ? options.emptyValue : value);
1168
- };
1169
- var _onBlur = function _onBlur(_ref3) {
1170
- var value = _ref3.target.value;
1171
- return onBlur(id, value);
1172
- };
1173
- var _onFocus = function _onFocus(_ref4) {
1174
- var value = _ref4.target.value;
1175
- return onFocus(id, value);
1176
- };
1177
- return jsxRuntime.jsxs(react.FormControl, _extends({
1178
- mb: 1
1179
- }, chakraProps, {
1213
+ const _onChange = ({
1214
+ target: {
1215
+ value
1216
+ }
1217
+ }) => onChange(value === '' ? options.emptyValue : value);
1218
+ const _onBlur = ({
1219
+ target: {
1220
+ value
1221
+ }
1222
+ }) => onBlur(id, value);
1223
+ const _onFocus = ({
1224
+ target: {
1225
+ value
1226
+ }
1227
+ }) => onFocus(id, value);
1228
+ return jsxRuntime.jsxs(react.FormControl, {
1229
+ mb: 1,
1230
+ ...chakraProps,
1180
1231
  isDisabled: disabled || readonly,
1181
1232
  isRequired: required,
1182
1233
  isReadOnly: readonly,
@@ -1187,7 +1238,7 @@
1187
1238
  }), hideLabel || !label), jsxRuntime.jsx(react.Textarea, {
1188
1239
  id: id,
1189
1240
  name: id,
1190
- value: value != null ? value : '',
1241
+ value: value ?? '',
1191
1242
  placeholder: placeholder,
1192
1243
  autoFocus: autofocus,
1193
1244
  onChange: _onChange,
@@ -1195,39 +1246,41 @@
1195
1246
  onFocus: _onFocus,
1196
1247
  "aria-describedby": utils.ariaDescribedByIds(id)
1197
1248
  })]
1198
- }));
1249
+ });
1199
1250
  }
1200
1251
 
1201
1252
  function UpDownWidget(props) {
1202
- var id = props.id,
1203
- uiSchema = props.uiSchema,
1204
- readonly = props.readonly,
1205
- disabled = props.disabled,
1206
- label = props.label,
1207
- hideLabel = props.hideLabel,
1208
- value = props.value,
1209
- onChange = props.onChange,
1210
- onBlur = props.onBlur,
1211
- onFocus = props.onFocus,
1212
- rawErrors = props.rawErrors,
1213
- required = props.required;
1214
- var chakraProps = getChakra({
1215
- uiSchema: uiSchema
1253
+ const {
1254
+ id,
1255
+ uiSchema,
1256
+ readonly,
1257
+ disabled,
1258
+ label,
1259
+ hideLabel,
1260
+ value,
1261
+ onChange,
1262
+ onBlur,
1263
+ onFocus,
1264
+ rawErrors,
1265
+ required
1266
+ } = props;
1267
+ const chakraProps = getChakra({
1268
+ uiSchema
1216
1269
  });
1217
- var _onChange = function _onChange(value) {
1218
- return onChange(value);
1219
- };
1220
- var _onBlur = function _onBlur(_ref) {
1221
- var value = _ref.target.value;
1222
- return onBlur(id, value);
1223
- };
1224
- var _onFocus = function _onFocus(_ref2) {
1225
- var value = _ref2.target.value;
1226
- return onFocus(id, value);
1227
- };
1228
- return jsxRuntime.jsxs(react.FormControl, _extends({
1229
- mb: 1
1230
- }, chakraProps, {
1270
+ const _onChange = value => onChange(value);
1271
+ const _onBlur = ({
1272
+ target: {
1273
+ value
1274
+ }
1275
+ }) => onBlur(id, value);
1276
+ const _onFocus = ({
1277
+ target: {
1278
+ value
1279
+ }
1280
+ }) => onFocus(id, value);
1281
+ return jsxRuntime.jsxs(react.FormControl, {
1282
+ mb: 1,
1283
+ ...chakraProps,
1231
1284
  isDisabled: disabled || readonly,
1232
1285
  isRequired: required,
1233
1286
  isReadOnly: readonly,
@@ -1236,7 +1289,7 @@
1236
1289
  htmlFor: id,
1237
1290
  children: label
1238
1291
  }), hideLabel || !label), jsxRuntime.jsxs(react.NumberInput, {
1239
- value: value != null ? value : '',
1292
+ value: value ?? '',
1240
1293
  onChange: _onChange,
1241
1294
  onBlur: _onBlur,
1242
1295
  onFocus: _onFocus,
@@ -1248,20 +1301,20 @@
1248
1301
  children: [jsxRuntime.jsx(react.NumberIncrementStepper, {}), jsxRuntime.jsx(react.NumberDecrementStepper, {})]
1249
1302
  })]
1250
1303
  })]
1251
- }));
1304
+ });
1252
1305
  }
1253
1306
 
1254
1307
  function generateWidgets() {
1255
1308
  return {
1256
- AltDateTimeWidget: AltDateTimeWidget,
1257
- AltDateWidget: AltDateWidget,
1258
- CheckboxWidget: CheckboxWidget,
1259
- CheckboxesWidget: CheckboxesWidget,
1260
- RadioWidget: RadioWidget,
1261
- RangeWidget: RangeWidget,
1262
- SelectWidget: SelectWidget,
1263
- TextareaWidget: TextareaWidget,
1264
- UpDownWidget: UpDownWidget
1309
+ AltDateTimeWidget,
1310
+ AltDateWidget,
1311
+ CheckboxWidget,
1312
+ CheckboxesWidget,
1313
+ RadioWidget,
1314
+ RangeWidget,
1315
+ SelectWidget,
1316
+ TextareaWidget,
1317
+ UpDownWidget
1265
1318
  };
1266
1319
  }
1267
1320
  var Widgets = /*#__PURE__*/generateWidgets();
@@ -1300,11 +1353,249 @@
1300
1353
 
1301
1354
  It is located at the bottom of the styles string.
1302
1355
  */
1303
- var CSSReset = function CSSReset() {
1304
- return jsxRuntime.jsx(react$2.Global, {
1305
- 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 "
1306
- });
1307
- };
1356
+ const CSSReset = () => jsxRuntime.jsx(react$2.Global, {
1357
+ styles: `
1358
+ html {
1359
+ line-height: 1.5;
1360
+ -webkit-text-size-adjust: 100%;
1361
+ font-family: system-ui, sans-serif;
1362
+ -webkit-font-smoothing: antialiased;
1363
+ text-rendering: optimizeLegibility;
1364
+ -moz-osx-font-smoothing: grayscale;
1365
+ touch-action: manipulation;
1366
+ }
1367
+ body {
1368
+ position: relative;
1369
+ min-height: 100%;
1370
+ font-feature-settings: 'kern';
1371
+ }
1372
+ *,
1373
+ *::before,
1374
+ *::after {
1375
+ border-width: 0;
1376
+ border-style: solid;
1377
+ box-sizing: border-box;
1378
+ }
1379
+ main {
1380
+ display: block;
1381
+ }
1382
+ hr {
1383
+ border-top-width: 1px;
1384
+ box-sizing: content-box;
1385
+ height: 0;
1386
+ overflow: visible;
1387
+ }
1388
+ pre,
1389
+ code,
1390
+ kbd,
1391
+ samp {
1392
+ font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1393
+ font-size: 1em;
1394
+ }
1395
+ a {
1396
+ background-color: transparent;
1397
+ color: inherit;
1398
+ text-decoration: inherit;
1399
+ }
1400
+ abbr[title] {
1401
+ border-bottom: none;
1402
+ text-decoration: underline;
1403
+ -webkit-text-decoration: underline dotted;
1404
+ text-decoration: underline dotted;
1405
+ }
1406
+ b,
1407
+ strong {
1408
+ font-weight: bold;
1409
+ }
1410
+ small {
1411
+ font-size: 80%;
1412
+ }
1413
+ sub,
1414
+ sup {
1415
+ font-size: 75%;
1416
+ line-height: 0;
1417
+ position: relative;
1418
+ vertical-align: baseline;
1419
+ }
1420
+ sub {
1421
+ bottom: -0.25em;
1422
+ }
1423
+ sup {
1424
+ top: -0.5em;
1425
+ }
1426
+ img {
1427
+ border-style: none;
1428
+ }
1429
+ button,
1430
+ input,
1431
+ optgroup,
1432
+ select,
1433
+ textarea {
1434
+ font-family: inherit;
1435
+ font-size: 100%;
1436
+ line-height: 1.15;
1437
+ margin: 0;
1438
+ }
1439
+ button,
1440
+ input {
1441
+ overflow: visible;
1442
+ }
1443
+ button,
1444
+ select {
1445
+ text-transform: none;
1446
+ }
1447
+ button::-moz-focus-inner,
1448
+ [type="button"]::-moz-focus-inner,
1449
+ [type="reset"]::-moz-focus-inner,
1450
+ [type="submit"]::-moz-focus-inner {
1451
+ border-style: none;
1452
+ padding: 0;
1453
+ }
1454
+ fieldset {
1455
+ padding: 0.35em 0.75em 0.625em;
1456
+ }
1457
+ legend {
1458
+ box-sizing: border-box;
1459
+ color: inherit;
1460
+ display: table;
1461
+ max-width: 100%;
1462
+ padding: 0;
1463
+ white-space: normal;
1464
+ }
1465
+ progress {
1466
+ vertical-align: baseline;
1467
+ }
1468
+ textarea {
1469
+ overflow: auto;
1470
+ }
1471
+ [type="checkbox"],
1472
+ [type="radio"] {
1473
+ box-sizing: border-box;
1474
+ padding: 0;
1475
+ }
1476
+ [type="number"]::-webkit-inner-spin-button,
1477
+ [type="number"]::-webkit-outer-spin-button {
1478
+ -webkit-appearance: none !important;
1479
+ }
1480
+ input[type="number"] {
1481
+ -moz-appearance: textfield;
1482
+ }
1483
+ [type="search"] {
1484
+ -webkit-appearance: textfield;
1485
+ outline-offset: -2px;
1486
+ }
1487
+ [type="search"]::-webkit-search-decoration {
1488
+ -webkit-appearance: none !important;
1489
+ }
1490
+ ::-webkit-file-upload-button {
1491
+ -webkit-appearance: button;
1492
+ font: inherit;
1493
+ }
1494
+ details {
1495
+ display: block;
1496
+ }
1497
+ summary {
1498
+ display: list-item;
1499
+ }
1500
+ template {
1501
+ display: none;
1502
+ }
1503
+ [hidden] {
1504
+ display: none !important;
1505
+ }
1506
+ body,
1507
+ blockquote,
1508
+ dl,
1509
+ dd,
1510
+ h1,
1511
+ h2,
1512
+ h3,
1513
+ h4,
1514
+ h5,
1515
+ h6,
1516
+ hr,
1517
+ figure,
1518
+ p,
1519
+ pre {
1520
+ margin: 0;
1521
+ }
1522
+ button {
1523
+ background: transparent;
1524
+ padding: 0;
1525
+ }
1526
+ fieldset {
1527
+ margin: 0;
1528
+ padding: 0;
1529
+ }
1530
+ ol,
1531
+ ul {
1532
+ margin: 0;
1533
+ padding: 0;
1534
+ }
1535
+ textarea {
1536
+ resize: vertical;
1537
+ }
1538
+ button,
1539
+ [role="button"] {
1540
+ cursor: pointer;
1541
+ }
1542
+ button::-moz-focus-inner {
1543
+ border: 0 !important;
1544
+ }
1545
+ table {
1546
+ border-collapse: collapse;
1547
+ }
1548
+ h1,
1549
+ h2,
1550
+ h3,
1551
+ h4,
1552
+ h5,
1553
+ h6 {
1554
+ font-size: inherit;
1555
+ font-weight: inherit;
1556
+ }
1557
+ button,
1558
+ input,
1559
+ optgroup,
1560
+ select,
1561
+ textarea {
1562
+ padding: 0;
1563
+ line-height: inherit;
1564
+ color: inherit;
1565
+ }
1566
+ img,
1567
+ svg,
1568
+ video,
1569
+ canvas,
1570
+ audio,
1571
+ iframe,
1572
+ embed,
1573
+ object {
1574
+ display: block;
1575
+ }
1576
+ img,
1577
+ video {
1578
+ max-width: 100%;
1579
+ height: auto;
1580
+ }
1581
+ [data-js-focus-visible] :focus:not([data-focus-visible-added]) {
1582
+ outline: none;
1583
+ box-shadow: none;
1584
+ }
1585
+ select::-ms-expand {
1586
+ display: none;
1587
+ }
1588
+ input {
1589
+ border-width: revert;
1590
+ border-color: revert;
1591
+ border-style: revert;
1592
+ }
1593
+ .array-item > hr {
1594
+ margin-top: 16px;
1595
+ margin-bottom: 16px;
1596
+ }
1597
+ `
1598
+ });
1308
1599
 
1309
1600
  /**
1310
1601
  * __createChakraFrameProvider is used to ensure that <Global> emotion components
@@ -1320,29 +1611,28 @@
1320
1611
  * From: https://codesandbox.io/s/p98y9o7jz0?file=/src/frame-provider.js:0-650
1321
1612
  * Also see: https://github.com/emotion-js/emotion/issues/760#issuecomment-404353706
1322
1613
  */
1323
- var memoizedCreateCacheWithContainer = /*#__PURE__*/weakMemoize__default["default"](function (container) {
1324
- var newCache = createCache__default["default"]({
1325
- container: container,
1614
+ const memoizedCreateCacheWithContainer = /*#__PURE__*/weakMemoize__default["default"](container => {
1615
+ const newCache = createCache__default["default"]({
1616
+ container,
1326
1617
  key: 'rjsf'
1327
1618
  });
1328
1619
  return newCache;
1329
1620
  });
1330
- var __createChakraFrameProvider = function __createChakraFrameProvider(props) {
1331
- return function (_ref) {
1332
- var document = _ref.document;
1333
- return jsxRuntime.jsx("div", {
1334
- style: {
1335
- margin: 2
1336
- },
1337
- children: jsxRuntime.jsx(react$2.CacheProvider, {
1338
- value: memoizedCreateCacheWithContainer(document.head),
1339
- children: jsxRuntime.jsxs(react.ChakraProvider, {
1340
- resetCSS: false,
1341
- children: [jsxRuntime.jsx(CSSReset, {}), props.children]
1342
- })
1621
+ const __createChakraFrameProvider = props => ({
1622
+ document
1623
+ }) => {
1624
+ return jsxRuntime.jsx("div", {
1625
+ style: {
1626
+ margin: 2
1627
+ },
1628
+ children: jsxRuntime.jsx(react$2.CacheProvider, {
1629
+ value: memoizedCreateCacheWithContainer(document.head),
1630
+ children: jsxRuntime.jsxs(react.ChakraProvider, {
1631
+ resetCSS: false,
1632
+ children: [jsxRuntime.jsx(CSSReset, {}), props.children]
1343
1633
  })
1344
- });
1345
- };
1634
+ })
1635
+ });
1346
1636
  };
1347
1637
 
1348
1638
  exports.Form = Form;