@rjsf/chakra-ui 6.5.3 → 6.6.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.
Files changed (61) hide show
  1. package/dist/chakra-ui.esm.js +309 -309
  2. package/dist/chakra-ui.esm.js.map +4 -4
  3. package/dist/chakra-ui.umd.js +188 -188
  4. package/dist/index.cjs +339 -339
  5. package/dist/index.cjs.map +4 -4
  6. package/lib/AddButton/AddButton.js +1 -1
  7. package/lib/AddButton/AddButton.js.map +1 -1
  8. package/lib/AltDateWidget/AltDateWidget.js.map +1 -1
  9. package/lib/BaseInputTemplate/BaseInputTemplate.js +1 -1
  10. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  11. package/lib/ChakraFrameProvider.js +2 -2
  12. package/lib/ChakraFrameProvider.js.map +1 -1
  13. package/lib/CheckboxWidget/CheckboxWidget.js +1 -1
  14. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  15. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  16. package/lib/DescriptionField/DescriptionField.js +1 -1
  17. package/lib/DescriptionField/DescriptionField.js.map +1 -1
  18. package/lib/ErrorList/ErrorList.js +1 -1
  19. package/lib/ErrorList/ErrorList.js.map +1 -1
  20. package/lib/FieldErrorTemplate/FieldErrorTemplate.js +1 -1
  21. package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
  22. package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
  23. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  24. package/lib/Form/Form.js.map +1 -1
  25. package/lib/NativeSelectWidget/NativeSelectWidget.js +1 -1
  26. package/lib/NativeSelectWidget/NativeSelectWidget.js.map +1 -1
  27. package/lib/SelectWidget/SelectWidget.js +1 -1
  28. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  29. package/lib/Templates/Templates.js +1 -1
  30. package/lib/Templates/Templates.js.map +1 -1
  31. package/lib/Theme/Theme.js.map +1 -1
  32. package/lib/TitleField/TitleField.js.map +1 -1
  33. package/lib/UpDownWidget/UpDownWidget.js.map +1 -1
  34. package/lib/Widgets/Widgets.js +2 -2
  35. package/lib/Widgets/Widgets.js.map +1 -1
  36. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
  37. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
  38. package/lib/tsconfig.tsbuildinfo +1 -1
  39. package/lib/utils.js.map +1 -1
  40. package/package.json +20 -21
  41. package/src/AddButton/AddButton.tsx +1 -1
  42. package/src/AltDateWidget/AltDateWidget.tsx +1 -0
  43. package/src/BaseInputTemplate/BaseInputTemplate.tsx +1 -1
  44. package/src/ChakraFrameProvider.tsx +2 -2
  45. package/src/CheckboxWidget/CheckboxWidget.tsx +1 -1
  46. package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
  47. package/src/DescriptionField/DescriptionField.tsx +1 -1
  48. package/src/ErrorList/ErrorList.tsx +1 -1
  49. package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +1 -1
  50. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +1 -1
  51. package/src/Form/Form.tsx +2 -1
  52. package/src/NativeSelectWidget/NativeSelectWidget.tsx +1 -1
  53. package/src/SelectWidget/SelectWidget.tsx +1 -2
  54. package/src/Templates/Templates.ts +3 -2
  55. package/src/Theme/Theme.tsx +1 -1
  56. package/src/TitleField/TitleField.tsx +1 -1
  57. package/src/UpDownWidget/UpDownWidget.tsx +1 -2
  58. package/src/Widgets/Widgets.ts +4 -3
  59. package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -1
  60. package/src/tsconfig.json +0 -1
  61. package/src/utils.ts +1 -1
@@ -2,8 +2,8 @@
2
2
  import { withTheme } from "@rjsf/core";
3
3
 
4
4
  // src/AddButton/AddButton.tsx
5
- import { TranslatableString } from "@rjsf/utils";
6
5
  import { Button } from "@chakra-ui/react";
6
+ import { TranslatableString } from "@rjsf/utils";
7
7
  import { PlusIcon } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  function AddButton({
@@ -122,13 +122,13 @@ function ArrayFieldTemplate(props) {
122
122
  // src/BaseInputTemplate/BaseInputTemplate.tsx
123
123
  import { useCallback } from "react";
124
124
  import { Input } from "@chakra-ui/react";
125
+ import { SchemaExamples } from "@rjsf/core";
125
126
  import {
126
127
  ariaDescribedByIds,
127
128
  examplesId,
128
129
  labelValue,
129
130
  getInputProps
130
131
  } from "@rjsf/utils";
131
- import { SchemaExamples } from "@rjsf/core";
132
132
 
133
133
  // src/components/ui/field.tsx
134
134
  import { forwardRef } from "react";
@@ -235,8 +235,8 @@ function BaseInputTemplate(props) {
235
235
  }
236
236
 
237
237
  // src/DescriptionField/DescriptionField.tsx
238
- import { RichDescription } from "@rjsf/core";
239
238
  import { Text } from "@chakra-ui/react";
239
+ import { RichDescription } from "@rjsf/core";
240
240
  import { jsx as jsx6 } from "react/jsx-runtime";
241
241
  function DescriptionField({ description, id, registry, uiSchema }) {
242
242
  if (!description) {
@@ -246,8 +246,8 @@ function DescriptionField({ description, id, registry, uiSchema }) {
246
246
  }
247
247
 
248
248
  // src/ErrorList/ErrorList.tsx
249
- import { TranslatableString as TranslatableString2 } from "@rjsf/utils";
250
249
  import { ListItem, ListRoot } from "@chakra-ui/react";
250
+ import { TranslatableString as TranslatableString2 } from "@rjsf/utils";
251
251
 
252
252
  // src/components/ui/alert.tsx
253
253
  import { forwardRef as forwardRef3 } from "react";
@@ -287,77 +287,10 @@ function ErrorList({
287
287
  return /* @__PURE__ */ jsx9(Alert, { status: "error", title: translateString(TranslatableString2.ErrorsLabel), mb: 3, children: /* @__PURE__ */ jsx9(ListRoot, { listStylePosition: "inside", children: errors.map((error, i) => /* @__PURE__ */ jsx9(ListItem, { children: error.stack }, i)) }) });
288
288
  }
289
289
 
290
- // src/IconButton/ChakraIconButton.tsx
291
- import { memo } from "react";
292
- import { IconButton } from "@chakra-ui/react";
293
- import { jsx as jsx10 } from "react/jsx-runtime";
294
- function ChakraIconButton2(props) {
295
- const { icon, iconType, uiSchema, registry, ...otherProps } = props;
296
- return /* @__PURE__ */ jsx10(IconButton, { "aria-label": props.title, ...otherProps, children: icon });
297
- }
298
- ChakraIconButton2.displayName = "ChakraIconButton";
299
- var ChakraIconButton_default = memo(ChakraIconButton2);
300
-
301
- // src/IconButton/IconButton.tsx
302
- import { TranslatableString as TranslatableString3 } from "@rjsf/utils";
303
- import { ArrowUpIcon, ArrowDownIcon, CopyIcon, DeleteIcon, X } from "lucide-react";
304
- import { jsx as jsx11 } from "react/jsx-runtime";
305
- function CopyButton(props) {
306
- const {
307
- registry: { translateString }
308
- } = props;
309
- return /* @__PURE__ */ jsx11(ChakraIconButton_default, { title: translateString(TranslatableString3.CopyButton), ...props, icon: /* @__PURE__ */ jsx11(CopyIcon, {}) });
310
- }
311
- function MoveDownButton(props) {
312
- const {
313
- registry: { translateString }
314
- } = props;
315
- return /* @__PURE__ */ jsx11(
316
- ChakraIconButton_default,
317
- {
318
- title: translateString(TranslatableString3.MoveDownButton),
319
- ...props,
320
- icon: /* @__PURE__ */ jsx11(ArrowDownIcon, {})
321
- }
322
- );
323
- }
324
- function MoveUpButton(props) {
325
- const {
326
- registry: { translateString }
327
- } = props;
328
- return /* @__PURE__ */ jsx11(
329
- ChakraIconButton_default,
330
- {
331
- title: translateString(TranslatableString3.MoveUpButton),
332
- ...props,
333
- icon: /* @__PURE__ */ jsx11(ArrowUpIcon, {})
334
- }
335
- );
336
- }
337
- function RemoveButton(props) {
338
- const {
339
- registry: { translateString }
340
- } = props;
341
- return /* @__PURE__ */ jsx11(
342
- ChakraIconButton_default,
343
- {
344
- title: translateString(TranslatableString3.RemoveButton),
345
- ...props,
346
- icon: /* @__PURE__ */ jsx11(DeleteIcon, {})
347
- }
348
- );
349
- }
350
- function ClearButton(props) {
351
- const {
352
- registry: { translateString }
353
- } = props;
354
- return /* @__PURE__ */ jsx11(ChakraIconButton_default, { title: translateString(TranslatableString3.ClearButton), ...props, icon: /* @__PURE__ */ jsx11(X, {}) });
355
- }
356
-
357
290
  // src/FieldErrorTemplate/FieldErrorTemplate.tsx
358
- import { errorId } from "@rjsf/utils";
359
291
  import { Fieldset } from "@chakra-ui/react";
360
- import { jsx as jsx12 } from "react/jsx-runtime";
292
+ import { errorId } from "@rjsf/utils";
293
+ import { jsx as jsx10 } from "react/jsx-runtime";
361
294
  function FieldErrorTemplate(props) {
362
295
  const { errors = [], fieldPathId } = props;
363
296
  if (errors.length === 0) {
@@ -365,21 +298,21 @@ function FieldErrorTemplate(props) {
365
298
  }
366
299
  const id = errorId(fieldPathId);
367
300
  return errors.map((error, i) => {
368
- return /* @__PURE__ */ jsx12(Fieldset.ErrorText, { mt: 0, id, children: error }, i);
301
+ return /* @__PURE__ */ jsx10(Fieldset.ErrorText, { mt: 0, id, children: error }, i);
369
302
  });
370
303
  }
371
304
 
372
305
  // src/FieldHelpTemplate/FieldHelpTemplate.tsx
373
306
  import { Text as Text2 } from "@chakra-ui/react";
374
- import { helpId } from "@rjsf/utils";
375
307
  import { RichHelp } from "@rjsf/core";
376
- import { jsx as jsx13 } from "react/jsx-runtime";
308
+ import { helpId } from "@rjsf/utils";
309
+ import { jsx as jsx11 } from "react/jsx-runtime";
377
310
  function FieldHelpTemplate(props) {
378
311
  const { fieldPathId, help, uiSchema, registry } = props;
379
312
  if (!help) {
380
313
  return null;
381
314
  }
382
- return /* @__PURE__ */ jsx13(Text2, { as: "sup", fontSize: "md", id: helpId(fieldPathId), children: /* @__PURE__ */ jsx13(RichHelp, { help, registry, uiSchema }) });
315
+ return /* @__PURE__ */ jsx11(Text2, { as: "sup", fontSize: "md", id: helpId(fieldPathId), children: /* @__PURE__ */ jsx11(RichHelp, { help, registry, uiSchema }) });
383
316
  }
384
317
 
385
318
  // src/FieldTemplate/FieldTemplate.tsx
@@ -388,7 +321,7 @@ import {
388
321
  getTemplate as getTemplate3,
389
322
  getUiOptions as getUiOptions3
390
323
  } from "@rjsf/utils";
391
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
324
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
392
325
  function FieldTemplate(props) {
393
326
  const {
394
327
  id,
@@ -420,9 +353,9 @@ function FieldTemplate(props) {
420
353
  uiOptions
421
354
  );
422
355
  if (hidden) {
423
- return /* @__PURE__ */ jsx14("div", { style: { display: "none" }, children });
356
+ return /* @__PURE__ */ jsx12("div", { style: { display: "none" }, children });
424
357
  }
425
- return /* @__PURE__ */ jsx14(
358
+ return /* @__PURE__ */ jsx12(
426
359
  WrapIfAdditionalTemplate2,
427
360
  {
428
361
  classNames,
@@ -441,9 +374,9 @@ function FieldTemplate(props) {
441
374
  uiSchema,
442
375
  registry,
443
376
  children: /* @__PURE__ */ jsxs7(Fieldset2.Root, { disabled, invalid: rawErrors && rawErrors.length > 0, children: [
444
- displayLabel && rawDescription ? /* @__PURE__ */ jsx14(Fieldset2.Legend, { mt: 2, children: description }) : null,
377
+ displayLabel && rawDescription ? /* @__PURE__ */ jsx12(Fieldset2.Legend, { mt: 2, children: description }) : null,
445
378
  help,
446
- /* @__PURE__ */ jsx14(Fieldset2.Content, { children }),
379
+ /* @__PURE__ */ jsx12(Fieldset2.Content, { children }),
447
380
  errors
448
381
  ] })
449
382
  }
@@ -452,13 +385,80 @@ function FieldTemplate(props) {
452
385
 
453
386
  // src/GridTemplate/GridTemplate.tsx
454
387
  import { Grid as Grid2, GridItem as GridItem2 } from "@chakra-ui/react";
455
- import { jsx as jsx15 } from "react/jsx-runtime";
388
+ import { jsx as jsx13 } from "react/jsx-runtime";
456
389
  function GridTemplate(props) {
457
390
  const { children, column, ...rest } = props;
458
391
  if (column) {
459
- return /* @__PURE__ */ jsx15(GridItem2, { ...rest, children });
392
+ return /* @__PURE__ */ jsx13(GridItem2, { ...rest, children });
460
393
  }
461
- return /* @__PURE__ */ jsx15(Grid2, { ...rest, children });
394
+ return /* @__PURE__ */ jsx13(Grid2, { ...rest, children });
395
+ }
396
+
397
+ // src/IconButton/ChakraIconButton.tsx
398
+ import { memo } from "react";
399
+ import { IconButton } from "@chakra-ui/react";
400
+ import { jsx as jsx14 } from "react/jsx-runtime";
401
+ function ChakraIconButton2(props) {
402
+ const { icon, iconType, uiSchema, registry, ...otherProps } = props;
403
+ return /* @__PURE__ */ jsx14(IconButton, { "aria-label": props.title, ...otherProps, children: icon });
404
+ }
405
+ ChakraIconButton2.displayName = "ChakraIconButton";
406
+ var ChakraIconButton_default = memo(ChakraIconButton2);
407
+
408
+ // src/IconButton/IconButton.tsx
409
+ import { TranslatableString as TranslatableString3 } from "@rjsf/utils";
410
+ import { ArrowUpIcon, ArrowDownIcon, CopyIcon, DeleteIcon, X } from "lucide-react";
411
+ import { jsx as jsx15 } from "react/jsx-runtime";
412
+ function CopyButton(props) {
413
+ const {
414
+ registry: { translateString }
415
+ } = props;
416
+ return /* @__PURE__ */ jsx15(ChakraIconButton_default, { title: translateString(TranslatableString3.CopyButton), ...props, icon: /* @__PURE__ */ jsx15(CopyIcon, {}) });
417
+ }
418
+ function MoveDownButton(props) {
419
+ const {
420
+ registry: { translateString }
421
+ } = props;
422
+ return /* @__PURE__ */ jsx15(
423
+ ChakraIconButton_default,
424
+ {
425
+ title: translateString(TranslatableString3.MoveDownButton),
426
+ ...props,
427
+ icon: /* @__PURE__ */ jsx15(ArrowDownIcon, {})
428
+ }
429
+ );
430
+ }
431
+ function MoveUpButton(props) {
432
+ const {
433
+ registry: { translateString }
434
+ } = props;
435
+ return /* @__PURE__ */ jsx15(
436
+ ChakraIconButton_default,
437
+ {
438
+ title: translateString(TranslatableString3.MoveUpButton),
439
+ ...props,
440
+ icon: /* @__PURE__ */ jsx15(ArrowUpIcon, {})
441
+ }
442
+ );
443
+ }
444
+ function RemoveButton(props) {
445
+ const {
446
+ registry: { translateString }
447
+ } = props;
448
+ return /* @__PURE__ */ jsx15(
449
+ ChakraIconButton_default,
450
+ {
451
+ title: translateString(TranslatableString3.RemoveButton),
452
+ ...props,
453
+ icon: /* @__PURE__ */ jsx15(DeleteIcon, {})
454
+ }
455
+ );
456
+ }
457
+ function ClearButton(props) {
458
+ const {
459
+ registry: { translateString }
460
+ } = props;
461
+ return /* @__PURE__ */ jsx15(ChakraIconButton_default, { title: translateString(TranslatableString3.ClearButton), ...props, icon: /* @__PURE__ */ jsx15(X, {}) });
462
462
  }
463
463
 
464
464
  // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
@@ -624,12 +624,12 @@ function TitleField({
624
624
  }
625
625
 
626
626
  // src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
627
+ import { Grid as Grid4, GridItem as GridItem4, Input as Input2 } from "@chakra-ui/react";
627
628
  import {
628
629
  ADDITIONAL_PROPERTY_FLAG,
629
630
  buttonId as buttonId3,
630
631
  TranslatableString as TranslatableString4
631
632
  } from "@rjsf/utils";
632
- import { Grid as Grid4, GridItem as GridItem4, Input as Input2 } from "@chakra-ui/react";
633
633
  import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
634
634
  function WrapIfAdditionalTemplate(props) {
635
635
  const {
@@ -792,15 +792,16 @@ function AltDateWidget({
792
792
  }
793
793
  var AltDateWidget_default = AltDateWidget;
794
794
 
795
- // src/CheckboxWidget/CheckboxWidget.tsx
796
- import { Text as Text3 } from "@chakra-ui/react";
795
+ // src/CheckboxesWidget/CheckboxesWidget.tsx
796
+ import { CheckboxGroup, FieldsetRoot as FieldsetRoot2, Stack, Text as Text3, FieldsetLegend } from "@chakra-ui/react";
797
797
  import {
798
798
  ariaDescribedByIds as ariaDescribedByIds2,
799
- descriptionId as descriptionId2,
800
- getTemplate as getTemplate5,
801
- labelValue as labelValue2,
802
- schemaRequiresTrueValue,
803
- getUiOptions as getUiOptions5
799
+ enumOptionSelectedValue,
800
+ enumOptionValueDecoder,
801
+ enumOptionValueEncoder,
802
+ getOptionValueFormat,
803
+ optionId,
804
+ labelValue as labelValue2
804
805
  } from "@rjsf/utils";
805
806
 
806
807
  // src/components/ui/checkbox.tsx
@@ -816,8 +817,83 @@ var Checkbox = forwardRef4(function Checkbox2(props, ref) {
816
817
  ] });
817
818
  });
818
819
 
819
- // src/CheckboxWidget/CheckboxWidget.tsx
820
+ // src/CheckboxesWidget/CheckboxesWidget.tsx
820
821
  import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
822
+ function CheckboxesWidget(props) {
823
+ const {
824
+ id,
825
+ htmlName,
826
+ disabled,
827
+ options,
828
+ value,
829
+ readonly,
830
+ onChange,
831
+ onBlur,
832
+ onFocus,
833
+ required,
834
+ label,
835
+ rawErrors = [],
836
+ hideLabel,
837
+ uiSchema
838
+ } = props;
839
+ const { enumOptions, enumDisabled, emptyValue } = options;
840
+ const optionValueFormat = getOptionValueFormat(options);
841
+ const _onBlur = ({ target }) => onBlur(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
842
+ const _onFocus = ({ target }) => onFocus(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
843
+ const row = options ? options.inline : false;
844
+ const selectValue = enumOptionSelectedValue(value, enumOptions, true, optionValueFormat, []);
845
+ const chakraProps = getChakra({ uiSchema });
846
+ return /* @__PURE__ */ jsxs14(
847
+ FieldsetRoot2,
848
+ {
849
+ mb: 1,
850
+ disabled: disabled || readonly,
851
+ invalid: rawErrors && rawErrors.length > 0,
852
+ ...chakraProps,
853
+ children: [
854
+ !hideLabel && label && /* @__PURE__ */ jsx25(FieldsetLegend, { children: labelValue2(label) }),
855
+ /* @__PURE__ */ jsx25(
856
+ CheckboxGroup,
857
+ {
858
+ onValueChange: (option) => onChange(enumOptionValueDecoder(option, enumOptions, optionValueFormat, emptyValue)),
859
+ value: selectValue,
860
+ "aria-describedby": ariaDescribedByIds2(id),
861
+ readOnly: readonly,
862
+ invalid: required && value.length === 0,
863
+ children: /* @__PURE__ */ jsx25(Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
864
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
865
+ return /* @__PURE__ */ jsx25(
866
+ Checkbox,
867
+ {
868
+ id: optionId(id, index),
869
+ name: htmlName || id,
870
+ value: enumOptionValueEncoder(option.value, index, optionValueFormat),
871
+ disabled: disabled || itemDisabled || readonly,
872
+ onBlur: _onBlur,
873
+ onFocus: _onFocus,
874
+ children: option.label && /* @__PURE__ */ jsx25(Text3, { children: option.label })
875
+ },
876
+ index
877
+ );
878
+ }) })
879
+ }
880
+ )
881
+ ]
882
+ }
883
+ );
884
+ }
885
+
886
+ // src/CheckboxWidget/CheckboxWidget.tsx
887
+ import { Text as Text4 } from "@chakra-ui/react";
888
+ import {
889
+ ariaDescribedByIds as ariaDescribedByIds3,
890
+ descriptionId as descriptionId2,
891
+ getTemplate as getTemplate5,
892
+ labelValue as labelValue3,
893
+ schemaRequiresTrueValue,
894
+ getUiOptions as getUiOptions5
895
+ } from "@rjsf/utils";
896
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
821
897
  function CheckboxWidget(props) {
822
898
  const {
823
899
  id,
@@ -848,8 +924,8 @@ function CheckboxWidget(props) {
848
924
  const _onBlur = ({ target }) => onBlur(id, target && target.checked);
849
925
  const _onFocus = ({ target }) => onFocus(id, target && target.checked);
850
926
  const chakraProps = getChakra({ uiSchema });
851
- return /* @__PURE__ */ jsxs14(Field, { mb: 1, required, ...chakraProps, children: [
852
- !hideLabel && description && /* @__PURE__ */ jsx25(
927
+ return /* @__PURE__ */ jsxs15(Field, { mb: 1, required, ...chakraProps, children: [
928
+ !hideLabel && description && /* @__PURE__ */ jsx26(
853
929
  DescriptionFieldTemplate,
854
930
  {
855
931
  id: descriptionId2(id),
@@ -859,7 +935,7 @@ function CheckboxWidget(props) {
859
935
  registry
860
936
  }
861
937
  ),
862
- /* @__PURE__ */ jsx25(
938
+ /* @__PURE__ */ jsx26(
863
939
  Checkbox,
864
940
  {
865
941
  id,
@@ -869,85 +945,107 @@ function CheckboxWidget(props) {
869
945
  onCheckedChange: _onChange,
870
946
  onBlur: _onBlur,
871
947
  onFocus: _onFocus,
872
- "aria-describedby": ariaDescribedByIds2(id),
873
- children: labelValue2(/* @__PURE__ */ jsx25(Text3, { children: label }), hideLabel || !label)
948
+ "aria-describedby": ariaDescribedByIds3(id),
949
+ children: labelValue3(/* @__PURE__ */ jsx26(Text4, { children: label }), hideLabel || !label)
874
950
  }
875
951
  )
876
952
  ] });
877
953
  }
878
954
 
879
- // src/CheckboxesWidget/CheckboxesWidget.tsx
880
- import { CheckboxGroup, FieldsetRoot as FieldsetRoot2, Stack, Text as Text4, FieldsetLegend } from "@chakra-ui/react";
955
+ // src/NativeSelectWidget/NativeSelectWidget.tsx
956
+ import { useMemo } from "react";
957
+ import { createListCollection, NativeSelect } from "@chakra-ui/react";
881
958
  import {
882
- ariaDescribedByIds as ariaDescribedByIds3,
883
- enumOptionSelectedValue,
884
- enumOptionValueDecoder,
885
- enumOptionValueEncoder,
886
- getOptionValueFormat,
887
- optionId,
888
- labelValue as labelValue3
959
+ ariaDescribedByIds as ariaDescribedByIds4,
960
+ enumOptionsIndexForValue,
961
+ enumOptionsValueForIndex,
962
+ labelValue as labelValue4
889
963
  } from "@rjsf/utils";
890
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
891
- function CheckboxesWidget(props) {
964
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
965
+ function NativeSelectWidget(props) {
892
966
  const {
893
967
  id,
894
- htmlName,
895
- disabled,
896
968
  options,
897
- value,
969
+ label,
970
+ hideLabel,
971
+ placeholder,
972
+ multiple,
973
+ required,
974
+ disabled,
898
975
  readonly,
976
+ value,
977
+ autofocus,
899
978
  onChange,
900
979
  onBlur,
901
980
  onFocus,
902
- required,
903
- label,
904
981
  rawErrors = [],
905
- hideLabel,
982
+ schema,
906
983
  uiSchema
907
984
  } = props;
908
985
  const { enumOptions, enumDisabled, emptyValue } = options;
909
- const optionValueFormat = getOptionValueFormat(options);
910
- const _onBlur = ({ target }) => onBlur(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
911
- const _onFocus = ({ target }) => onFocus(id, enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, emptyValue));
912
- const row = options ? options.inline : false;
913
- const selectValue = enumOptionSelectedValue(value, enumOptions, true, optionValueFormat, []);
986
+ const _onChange = ({ target }) => {
987
+ return onChange(enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
988
+ };
989
+ const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
990
+ const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
991
+ const showPlaceholderOption = !multiple && schema.default === void 0;
992
+ const { valueLabelMap, displayEnumOptions } = useMemo(() => {
993
+ const valueLabelMap2 = {};
994
+ let displayEnumOptions2 = [];
995
+ if (Array.isArray(enumOptions)) {
996
+ displayEnumOptions2 = enumOptions.map((option, index) => {
997
+ const { value: value2, label: label2 } = option;
998
+ valueLabelMap2[index] = label2 || String(value2);
999
+ return {
1000
+ label: label2,
1001
+ value: String(index),
1002
+ disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1003
+ };
1004
+ });
1005
+ }
1006
+ return { valueLabelMap: valueLabelMap2, displayEnumOptions: displayEnumOptions2 };
1007
+ }, [enumDisabled, enumOptions]);
1008
+ const selectedIndex = enumOptionsIndexForValue(value, enumOptions, false);
1009
+ const getSingleValue = () => typeof selectedIndex !== "undefined" ? [
1010
+ {
1011
+ label: valueLabelMap[selectedIndex] || "",
1012
+ value: selectedIndex.toString()
1013
+ }
1014
+ ] : [];
1015
+ const formValue = getSingleValue()[0]?.value || "";
1016
+ const selectOptions = createListCollection({
1017
+ items: displayEnumOptions.filter((item) => item.value)
1018
+ });
914
1019
  const chakraProps = getChakra({ uiSchema });
915
- return /* @__PURE__ */ jsxs15(
916
- FieldsetRoot2,
1020
+ return /* @__PURE__ */ jsx27(
1021
+ Field,
917
1022
  {
918
1023
  mb: 1,
919
1024
  disabled: disabled || readonly,
1025
+ required,
1026
+ readOnly: readonly,
920
1027
  invalid: rawErrors && rawErrors.length > 0,
1028
+ label: labelValue4(label, hideLabel || !label),
921
1029
  ...chakraProps,
922
- children: [
923
- !hideLabel && label && /* @__PURE__ */ jsx26(FieldsetLegend, { children: labelValue3(label) }),
924
- /* @__PURE__ */ jsx26(
925
- CheckboxGroup,
1030
+ children: /* @__PURE__ */ jsxs16(NativeSelect.Root, { children: [
1031
+ /* @__PURE__ */ jsxs16(
1032
+ NativeSelect.Field,
926
1033
  {
927
- onValueChange: (option) => onChange(enumOptionValueDecoder(option, enumOptions, optionValueFormat, emptyValue)),
928
- value: selectValue,
929
- "aria-describedby": ariaDescribedByIds3(id),
930
- readOnly: readonly,
931
- invalid: required && value.length === 0,
932
- children: /* @__PURE__ */ jsx26(Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
933
- const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
934
- return /* @__PURE__ */ jsx26(
935
- Checkbox,
936
- {
937
- id: optionId(id, index),
938
- name: htmlName || id,
939
- value: enumOptionValueEncoder(option.value, index, optionValueFormat),
940
- disabled: disabled || itemDisabled || readonly,
941
- onBlur: _onBlur,
942
- onFocus: _onFocus,
943
- children: option.label && /* @__PURE__ */ jsx26(Text4, { children: option.label })
944
- },
945
- index
946
- );
947
- }) })
1034
+ id,
1035
+ onBlur: _onBlur,
1036
+ onChange: _onChange,
1037
+ onFocus: _onFocus,
1038
+ autoFocus: autofocus,
1039
+ value: formValue,
1040
+ "aria-describedby": ariaDescribedByIds4(id),
1041
+ children: [
1042
+ showPlaceholderOption ? /* @__PURE__ */ jsx27("option", { value: "", disabled: true, hidden: true, children: placeholder || "" }) : void 0,
1043
+ selectOptions.items.map((item) => /* @__PURE__ */ jsx27("option", { value: item.value, children: item.label }, item.value))
1044
+ ]
948
1045
  }
949
- )
950
- ]
1046
+ ),
1047
+ /* @__PURE__ */ jsx27(NativeSelect.Indicator, {})
1048
+ ] })
951
1049
  }
952
1050
  );
953
1051
  }
@@ -955,31 +1053,31 @@ function CheckboxesWidget(props) {
955
1053
  // src/RadioWidget/RadioWidget.tsx
956
1054
  import { Stack as Stack2 } from "@chakra-ui/react";
957
1055
  import {
958
- ariaDescribedByIds as ariaDescribedByIds4,
1056
+ ariaDescribedByIds as ariaDescribedByIds5,
959
1057
  enumOptionSelectedValue as enumOptionSelectedValue2,
960
1058
  enumOptionValueDecoder as enumOptionValueDecoder2,
961
1059
  enumOptionValueEncoder as enumOptionValueEncoder2,
962
1060
  getOptionValueFormat as getOptionValueFormat2,
963
- labelValue as labelValue4,
1061
+ labelValue as labelValue5,
964
1062
  optionId as optionId2
965
1063
  } from "@rjsf/utils";
966
1064
 
967
1065
  // src/components/ui/radio.tsx
968
1066
  import { forwardRef as forwardRef5 } from "react";
969
1067
  import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
970
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
1068
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
971
1069
  var Radio = forwardRef5(function Radio2(props, ref) {
972
1070
  const { children, inputProps, rootRef, ...rest } = props;
973
- return /* @__PURE__ */ jsxs16(ChakraRadioGroup.Item, { ref: rootRef, ...rest, children: [
974
- /* @__PURE__ */ jsx27(ChakraRadioGroup.ItemHiddenInput, { ref, ...inputProps }),
975
- /* @__PURE__ */ jsx27(ChakraRadioGroup.ItemIndicator, {}),
976
- children && /* @__PURE__ */ jsx27(ChakraRadioGroup.ItemText, { children })
1071
+ return /* @__PURE__ */ jsxs17(ChakraRadioGroup.Item, { ref: rootRef, ...rest, children: [
1072
+ /* @__PURE__ */ jsx28(ChakraRadioGroup.ItemHiddenInput, { ref, ...inputProps }),
1073
+ /* @__PURE__ */ jsx28(ChakraRadioGroup.ItemIndicator, {}),
1074
+ children && /* @__PURE__ */ jsx28(ChakraRadioGroup.ItemText, { children })
977
1075
  ] });
978
1076
  });
979
1077
  var RadioGroup = ChakraRadioGroup.Root;
980
1078
 
981
1079
  // src/RadioWidget/RadioWidget.tsx
982
- import { jsx as jsx28 } from "react/jsx-runtime";
1080
+ import { jsx as jsx29 } from "react/jsx-runtime";
983
1081
  function RadioWidget({
984
1082
  id,
985
1083
  htmlName,
@@ -1003,16 +1101,16 @@ function RadioWidget({
1003
1101
  const row = options ? options.inline : false;
1004
1102
  const selectValue = enumOptionSelectedValue2(value, enumOptions, false, optionValueFormat, null);
1005
1103
  const chakraProps = getChakra({ uiSchema });
1006
- return /* @__PURE__ */ jsx28(
1104
+ return /* @__PURE__ */ jsx29(
1007
1105
  Field,
1008
1106
  {
1009
1107
  mb: 1,
1010
1108
  disabled: disabled || readonly,
1011
1109
  required,
1012
1110
  readOnly: readonly,
1013
- label: labelValue4(label, hideLabel || !label),
1111
+ label: labelValue5(label, hideLabel || !label),
1014
1112
  ...chakraProps,
1015
- children: /* @__PURE__ */ jsx28(
1113
+ children: /* @__PURE__ */ jsx29(
1016
1114
  RadioGroup,
1017
1115
  {
1018
1116
  onChange: _onChange,
@@ -1020,10 +1118,10 @@ function RadioWidget({
1020
1118
  onFocus: _onFocus,
1021
1119
  value: selectValue,
1022
1120
  name: htmlName || id,
1023
- "aria-describedby": ariaDescribedByIds4(id),
1024
- children: /* @__PURE__ */ jsx28(Stack2, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
1121
+ "aria-describedby": ariaDescribedByIds5(id),
1122
+ children: /* @__PURE__ */ jsx29(Stack2, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
1025
1123
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
1026
- return /* @__PURE__ */ jsx28(
1124
+ return /* @__PURE__ */ jsx29(
1027
1125
  Radio,
1028
1126
  {
1029
1127
  value: enumOptionValueEncoder2(option.value, index, optionValueFormat),
@@ -1042,15 +1140,15 @@ function RadioWidget({
1042
1140
 
1043
1141
  // src/RangeWidget/RangeWidget.tsx
1044
1142
  import {
1045
- ariaDescribedByIds as ariaDescribedByIds5,
1046
- labelValue as labelValue5,
1143
+ ariaDescribedByIds as ariaDescribedByIds6,
1144
+ labelValue as labelValue6,
1047
1145
  rangeSpec
1048
1146
  } from "@rjsf/utils";
1049
1147
 
1050
1148
  // src/components/ui/slider.tsx
1051
1149
  import { forwardRef as forwardRef6 } from "react";
1052
1150
  import { Slider as ChakraSlider, HStack as HStack2 } from "@chakra-ui/react";
1053
- import { Fragment as Fragment2, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1151
+ import { Fragment as Fragment2, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1054
1152
  var Slider = forwardRef6(function Slider2(props, ref) {
1055
1153
  const { marks: marksProp, showValue, ...rest } = props;
1056
1154
  const value = props.defaultValue ?? props.value;
@@ -1061,36 +1159,36 @@ var Slider = forwardRef6(function Slider2(props, ref) {
1061
1159
  return mark;
1062
1160
  });
1063
1161
  const hasMarkLabel = !!marks?.some((mark) => mark.label);
1064
- return /* @__PURE__ */ jsxs17(ChakraSlider.Root, { ref, width: "200px", thumbAlignment: "center", ...rest, children: [
1065
- showValue && /* @__PURE__ */ jsx29(HStack2, { justify: "space-between", children: /* @__PURE__ */ jsx29(ChakraSlider.ValueText, {}) }),
1066
- /* @__PURE__ */ jsxs17(ChakraSlider.Control, { "data-has-mark-label": hasMarkLabel || void 0, children: [
1067
- /* @__PURE__ */ jsx29(ChakraSlider.Track, { children: /* @__PURE__ */ jsx29(ChakraSlider.Range, {}) }),
1068
- /* @__PURE__ */ jsx29(SliderThumbs, { value }),
1069
- /* @__PURE__ */ jsx29(SliderMarks, { marks })
1162
+ return /* @__PURE__ */ jsxs18(ChakraSlider.Root, { ref, width: "200px", thumbAlignment: "center", ...rest, children: [
1163
+ showValue && /* @__PURE__ */ jsx30(HStack2, { justify: "space-between", children: /* @__PURE__ */ jsx30(ChakraSlider.ValueText, {}) }),
1164
+ /* @__PURE__ */ jsxs18(ChakraSlider.Control, { "data-has-mark-label": hasMarkLabel || void 0, children: [
1165
+ /* @__PURE__ */ jsx30(ChakraSlider.Track, { children: /* @__PURE__ */ jsx30(ChakraSlider.Range, {}) }),
1166
+ /* @__PURE__ */ jsx30(SliderThumbs, { value }),
1167
+ /* @__PURE__ */ jsx30(SliderMarks, { marks })
1070
1168
  ] })
1071
1169
  ] });
1072
1170
  });
1073
1171
  function SliderThumbs(props) {
1074
1172
  const { value } = props;
1075
- return /* @__PURE__ */ jsx29(Fragment2, { children: value?.map((_, index) => /* @__PURE__ */ jsx29(ChakraSlider.Thumb, { index, children: /* @__PURE__ */ jsx29(ChakraSlider.HiddenInput, {}) }, index)) });
1173
+ return /* @__PURE__ */ jsx30(Fragment2, { children: value?.map((_, index) => /* @__PURE__ */ jsx30(ChakraSlider.Thumb, { index, children: /* @__PURE__ */ jsx30(ChakraSlider.HiddenInput, {}) }, index)) });
1076
1174
  }
1077
1175
  var SliderMarks = forwardRef6(function SliderMarks2(props, ref) {
1078
1176
  const { marks } = props;
1079
1177
  if (!marks?.length) {
1080
1178
  return null;
1081
1179
  }
1082
- return /* @__PURE__ */ jsx29(ChakraSlider.MarkerGroup, { ref, children: marks.map((mark, index) => {
1180
+ return /* @__PURE__ */ jsx30(ChakraSlider.MarkerGroup, { ref, children: marks.map((mark, index) => {
1083
1181
  const value = typeof mark === "number" ? mark : mark.value;
1084
1182
  const label = typeof mark === "number" ? void 0 : mark.label;
1085
- return /* @__PURE__ */ jsxs17(ChakraSlider.Marker, { value, children: [
1086
- /* @__PURE__ */ jsx29(ChakraSlider.MarkerIndicator, {}),
1183
+ return /* @__PURE__ */ jsxs18(ChakraSlider.Marker, { value, children: [
1184
+ /* @__PURE__ */ jsx30(ChakraSlider.MarkerIndicator, {}),
1087
1185
  label
1088
1186
  ] }, index);
1089
1187
  }) });
1090
1188
  });
1091
1189
 
1092
1190
  // src/RangeWidget/RangeWidget.tsx
1093
- import { jsx as jsx30 } from "react/jsx-runtime";
1191
+ import { jsx as jsx31 } from "react/jsx-runtime";
1094
1192
  function RangeWidget({
1095
1193
  value,
1096
1194
  readonly,
@@ -1109,7 +1207,7 @@ function RangeWidget({
1109
1207
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
1110
1208
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
1111
1209
  const chakraProps = getChakra({ uiSchema });
1112
- return /* @__PURE__ */ jsx30(Field, { mb: 1, label: labelValue5(label, hideLabel || !label), ...chakraProps, children: /* @__PURE__ */ jsx30(
1210
+ return /* @__PURE__ */ jsx31(Field, { mb: 1, label: labelValue6(label, hideLabel || !label), ...chakraProps, children: /* @__PURE__ */ jsx31(
1113
1211
  Slider,
1114
1212
  {
1115
1213
  ...rangeSpec(schema),
@@ -1120,56 +1218,56 @@ function RangeWidget({
1120
1218
  onValueChange: _onChange,
1121
1219
  onBlur: _onBlur,
1122
1220
  onFocus: _onFocus,
1123
- "aria-describedby": ariaDescribedByIds5(id)
1221
+ "aria-describedby": ariaDescribedByIds6(id)
1124
1222
  }
1125
1223
  ) });
1126
1224
  }
1127
1225
 
1128
1226
  // src/SelectWidget/SelectWidget.tsx
1129
- import { useMemo, useRef } from "react";
1227
+ import { useMemo as useMemo2, useRef } from "react";
1228
+ import { createListCollection as createListCollection2, Select as ChakraSelect2 } from "@chakra-ui/react";
1130
1229
  import {
1131
- ariaDescribedByIds as ariaDescribedByIds6,
1230
+ ariaDescribedByIds as ariaDescribedByIds7,
1132
1231
  enumOptionSelectedValue as enumOptionSelectedValue3,
1133
1232
  enumOptionValueDecoder as enumOptionValueDecoder3,
1134
1233
  enumOptionValueEncoder as enumOptionValueEncoder3,
1135
1234
  getOptionValueFormat as getOptionValueFormat3,
1136
- labelValue as labelValue6
1235
+ labelValue as labelValue7
1137
1236
  } from "@rjsf/utils";
1138
- import { createListCollection, Select as ChakraSelect2 } from "@chakra-ui/react";
1139
1237
 
1140
1238
  // src/components/ui/select.tsx
1141
1239
  import { forwardRef as forwardRef7 } from "react";
1142
1240
  import { Select as ChakraSelect, Portal } from "@chakra-ui/react";
1143
- import { Fragment as Fragment3, jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
1241
+ import { Fragment as Fragment3, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
1144
1242
  var SelectTrigger = forwardRef7(function SelectTrigger2(props, ref) {
1145
1243
  const { children, clearable, ...rest } = props;
1146
- return /* @__PURE__ */ jsxs18(ChakraSelect.Control, { ...rest, children: [
1147
- /* @__PURE__ */ jsx31(ChakraSelect.Trigger, { ref, children }),
1148
- /* @__PURE__ */ jsxs18(ChakraSelect.IndicatorGroup, { children: [
1149
- clearable && /* @__PURE__ */ jsx31(SelectClearTrigger, {}),
1150
- /* @__PURE__ */ jsx31(ChakraSelect.Indicator, {})
1244
+ return /* @__PURE__ */ jsxs19(ChakraSelect.Control, { ...rest, children: [
1245
+ /* @__PURE__ */ jsx32(ChakraSelect.Trigger, { ref, children }),
1246
+ /* @__PURE__ */ jsxs19(ChakraSelect.IndicatorGroup, { children: [
1247
+ clearable && /* @__PURE__ */ jsx32(SelectClearTrigger, {}),
1248
+ /* @__PURE__ */ jsx32(ChakraSelect.Indicator, {})
1151
1249
  ] })
1152
1250
  ] });
1153
1251
  });
1154
1252
  var SelectClearTrigger = forwardRef7(
1155
1253
  function SelectClearTrigger2(props, ref) {
1156
- return /* @__PURE__ */ jsx31(ChakraSelect.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx31(CloseButton, { size: "xs", variant: "plain", focusVisibleRing: "inside", focusRingWidth: "2px", pointerEvents: "auto" }) });
1254
+ return /* @__PURE__ */ jsx32(ChakraSelect.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx32(CloseButton, { size: "xs", variant: "plain", focusVisibleRing: "inside", focusRingWidth: "2px", pointerEvents: "auto" }) });
1157
1255
  }
1158
1256
  );
1159
1257
  var SelectContent = forwardRef7(function SelectContent2(props, ref) {
1160
1258
  const { portalled = true, portalRef, ...rest } = props;
1161
- return /* @__PURE__ */ jsx31(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx31(ChakraSelect.Positioner, { children: /* @__PURE__ */ jsx31(ChakraSelect.Content, { ...rest, ref }) }) });
1259
+ return /* @__PURE__ */ jsx32(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx32(ChakraSelect.Positioner, { children: /* @__PURE__ */ jsx32(ChakraSelect.Content, { ...rest, ref }) }) });
1162
1260
  });
1163
1261
  var SelectItem = forwardRef7(function SelectItem2(props, ref) {
1164
1262
  const { item, children, ...rest } = props;
1165
- return /* @__PURE__ */ jsxs18(ChakraSelect.Item, { item, ...rest, ref, children: [
1263
+ return /* @__PURE__ */ jsxs19(ChakraSelect.Item, { item, ...rest, ref, children: [
1166
1264
  children,
1167
- /* @__PURE__ */ jsx31(ChakraSelect.ItemIndicator, {})
1265
+ /* @__PURE__ */ jsx32(ChakraSelect.ItemIndicator, {})
1168
1266
  ] }, item.value);
1169
1267
  });
1170
1268
  var SelectValueText = forwardRef7(function SelectValueText2(props, ref) {
1171
1269
  const { children, ...rest } = props;
1172
- return /* @__PURE__ */ jsx31(ChakraSelect.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx31(ChakraSelect.Context, { children: (select) => {
1270
+ return /* @__PURE__ */ jsx32(ChakraSelect.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx32(ChakraSelect.Context, { children: (select) => {
1173
1271
  const items = select.selectedItems;
1174
1272
  if (items.length === 0) {
1175
1273
  return props.placeholder;
@@ -1184,15 +1282,15 @@ var SelectValueText = forwardRef7(function SelectValueText2(props, ref) {
1184
1282
  } }) });
1185
1283
  });
1186
1284
  var SelectRoot = forwardRef7(function SelectRoot2(props, ref) {
1187
- return /* @__PURE__ */ jsx31(ChakraSelect.Root, { ...props, ref, positioning: { sameWidth: true, ...props.positioning }, children: props.asChild ? props.children : /* @__PURE__ */ jsxs18(Fragment3, { children: [
1188
- /* @__PURE__ */ jsx31(ChakraSelect.HiddenSelect, {}),
1285
+ return /* @__PURE__ */ jsx32(ChakraSelect.Root, { ...props, ref, positioning: { sameWidth: true, ...props.positioning }, children: props.asChild ? props.children : /* @__PURE__ */ jsxs19(Fragment3, { children: [
1286
+ /* @__PURE__ */ jsx32(ChakraSelect.HiddenSelect, {}),
1189
1287
  props.children
1190
1288
  ] }) });
1191
1289
  });
1192
1290
  var SelectItemGroup = forwardRef7(function SelectItemGroup2(props, ref) {
1193
1291
  const { children, label, ...rest } = props;
1194
- return /* @__PURE__ */ jsxs18(ChakraSelect.ItemGroup, { ...rest, ref, children: [
1195
- /* @__PURE__ */ jsx31(ChakraSelect.ItemGroupLabel, { children: label }),
1292
+ return /* @__PURE__ */ jsxs19(ChakraSelect.ItemGroup, { ...rest, ref, children: [
1293
+ /* @__PURE__ */ jsx32(ChakraSelect.ItemGroupLabel, { children: label }),
1196
1294
  children
1197
1295
  ] });
1198
1296
  });
@@ -1200,7 +1298,7 @@ var SelectLabel = ChakraSelect.Label;
1200
1298
  var SelectItemText = ChakraSelect.ItemText;
1201
1299
 
1202
1300
  // src/SelectWidget/SelectWidget.tsx
1203
- import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
1301
+ import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1204
1302
  function SelectWidget(props) {
1205
1303
  const {
1206
1304
  id,
@@ -1234,7 +1332,7 @@ function SelectWidget(props) {
1234
1332
  const _onBlur = ({ target }) => onBlur(id, enumOptionValueDecoder3(target && target.value, enumOptions, optionValueFormat, emptyValue));
1235
1333
  const _onFocus = ({ target }) => onFocus(id, enumOptionValueDecoder3(target && target.value, enumOptions, optionValueFormat, emptyValue));
1236
1334
  const showPlaceholderOption = !multiple && schema.default === void 0;
1237
- const displayEnumOptions = useMemo(() => {
1335
+ const displayEnumOptions = useMemo2(() => {
1238
1336
  let displayEnumOptions2 = [];
1239
1337
  if (Array.isArray(enumOptions)) {
1240
1338
  displayEnumOptions2 = enumOptions.map((option, index) => {
@@ -1255,12 +1353,12 @@ function SelectWidget(props) {
1255
1353
  const formValue = [
1256
1354
  enumOptionSelectedValue3(value, enumOptions, isMultiple, optionValueFormat, isMultiple ? [] : "")
1257
1355
  ].flat().filter((v) => v !== "");
1258
- const selectOptions = createListCollection({
1356
+ const selectOptions = createListCollection2({
1259
1357
  items: displayEnumOptions.filter((item) => item.value)
1260
1358
  });
1261
1359
  const containerRef = useRef(null);
1262
1360
  const chakraProps = getChakra({ uiSchema });
1263
- return /* @__PURE__ */ jsx32(
1361
+ return /* @__PURE__ */ jsx33(
1264
1362
  Field,
1265
1363
  {
1266
1364
  ref: containerRef,
@@ -1269,10 +1367,10 @@ function SelectWidget(props) {
1269
1367
  required,
1270
1368
  readOnly: readonly,
1271
1369
  invalid: rawErrors && rawErrors.length > 0,
1272
- label: labelValue6(label, hideLabel || !label),
1370
+ label: labelValue7(label, hideLabel || !label),
1273
1371
  position: "relative",
1274
1372
  ...chakraProps,
1275
- children: /* @__PURE__ */ jsxs19(
1373
+ children: /* @__PURE__ */ jsxs20(
1276
1374
  SelectRoot,
1277
1375
  {
1278
1376
  collection: selectOptions,
@@ -1285,13 +1383,13 @@ function SelectWidget(props) {
1285
1383
  onFocus: _onFocus,
1286
1384
  autoFocus: autofocus,
1287
1385
  value: formValue,
1288
- "aria-describedby": ariaDescribedByIds6(id),
1386
+ "aria-describedby": ariaDescribedByIds7(id),
1289
1387
  positioning: { placement: "bottom" },
1290
1388
  children: [
1291
- /* @__PURE__ */ jsx32(ChakraSelect2.Control, { children: /* @__PURE__ */ jsx32(SelectTrigger, { children: /* @__PURE__ */ jsx32(SelectValueText, { placeholder }) }) }),
1292
- /* @__PURE__ */ jsx32(ChakraSelect2.Positioner, { minWidth: "100% !important", zIndex: "2 !important", top: "calc(100% + 5px) !important", children: /* @__PURE__ */ jsx32(ChakraSelect2.Content, { children: selectOptions.items.map((item) => /* @__PURE__ */ jsxs19(ChakraSelect2.Item, { item, children: [
1389
+ /* @__PURE__ */ jsx33(ChakraSelect2.Control, { children: /* @__PURE__ */ jsx33(SelectTrigger, { children: /* @__PURE__ */ jsx33(SelectValueText, { placeholder }) }) }),
1390
+ /* @__PURE__ */ jsx33(ChakraSelect2.Positioner, { minWidth: "100% !important", zIndex: "2 !important", top: "calc(100% + 5px) !important", children: /* @__PURE__ */ jsx33(ChakraSelect2.Content, { children: selectOptions.items.map((item) => /* @__PURE__ */ jsxs20(ChakraSelect2.Item, { item, children: [
1293
1391
  item.label,
1294
- /* @__PURE__ */ jsx32(ChakraSelect2.ItemIndicator, {})
1392
+ /* @__PURE__ */ jsx33(ChakraSelect2.ItemIndicator, {})
1295
1393
  ] }, item.value)) }) })
1296
1394
  ]
1297
1395
  }
@@ -1300,104 +1398,6 @@ function SelectWidget(props) {
1300
1398
  );
1301
1399
  }
1302
1400
 
1303
- // src/NativeSelectWidget/NativeSelectWidget.tsx
1304
- import { useMemo as useMemo2 } from "react";
1305
- import {
1306
- ariaDescribedByIds as ariaDescribedByIds7,
1307
- enumOptionsIndexForValue,
1308
- enumOptionsValueForIndex,
1309
- labelValue as labelValue7
1310
- } from "@rjsf/utils";
1311
- import { createListCollection as createListCollection2, NativeSelect } from "@chakra-ui/react";
1312
- import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1313
- function NativeSelectWidget(props) {
1314
- const {
1315
- id,
1316
- options,
1317
- label,
1318
- hideLabel,
1319
- placeholder,
1320
- multiple,
1321
- required,
1322
- disabled,
1323
- readonly,
1324
- value,
1325
- autofocus,
1326
- onChange,
1327
- onBlur,
1328
- onFocus,
1329
- rawErrors = [],
1330
- schema,
1331
- uiSchema
1332
- } = props;
1333
- const { enumOptions, enumDisabled, emptyValue } = options;
1334
- const _onChange = ({ target }) => {
1335
- return onChange(enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
1336
- };
1337
- const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
1338
- const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
1339
- const showPlaceholderOption = !multiple && schema.default === void 0;
1340
- const { valueLabelMap, displayEnumOptions } = useMemo2(() => {
1341
- const valueLabelMap2 = {};
1342
- let displayEnumOptions2 = [];
1343
- if (Array.isArray(enumOptions)) {
1344
- displayEnumOptions2 = enumOptions.map((option, index) => {
1345
- const { value: value2, label: label2 } = option;
1346
- valueLabelMap2[index] = label2 || String(value2);
1347
- return {
1348
- label: label2,
1349
- value: String(index),
1350
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1351
- };
1352
- });
1353
- }
1354
- return { valueLabelMap: valueLabelMap2, displayEnumOptions: displayEnumOptions2 };
1355
- }, [enumDisabled, enumOptions]);
1356
- const selectedIndex = enumOptionsIndexForValue(value, enumOptions, false);
1357
- const getSingleValue = () => typeof selectedIndex !== "undefined" ? [
1358
- {
1359
- label: valueLabelMap[selectedIndex] || "",
1360
- value: selectedIndex.toString()
1361
- }
1362
- ] : [];
1363
- const formValue = getSingleValue()[0]?.value || "";
1364
- const selectOptions = createListCollection2({
1365
- items: displayEnumOptions.filter((item) => item.value)
1366
- });
1367
- const chakraProps = getChakra({ uiSchema });
1368
- return /* @__PURE__ */ jsx33(
1369
- Field,
1370
- {
1371
- mb: 1,
1372
- disabled: disabled || readonly,
1373
- required,
1374
- readOnly: readonly,
1375
- invalid: rawErrors && rawErrors.length > 0,
1376
- label: labelValue7(label, hideLabel || !label),
1377
- ...chakraProps,
1378
- children: /* @__PURE__ */ jsxs20(NativeSelect.Root, { children: [
1379
- /* @__PURE__ */ jsxs20(
1380
- NativeSelect.Field,
1381
- {
1382
- id,
1383
- onBlur: _onBlur,
1384
- onChange: _onChange,
1385
- onFocus: _onFocus,
1386
- autoFocus: autofocus,
1387
- value: formValue,
1388
- "aria-describedby": ariaDescribedByIds7(id),
1389
- children: [
1390
- showPlaceholderOption ? /* @__PURE__ */ jsx33("option", { value: "", disabled: true, hidden: true, children: placeholder || "" }) : void 0,
1391
- selectOptions.items.map((item) => /* @__PURE__ */ jsx33("option", { value: item.value, children: item.label }, item.value))
1392
- ]
1393
- }
1394
- ),
1395
- /* @__PURE__ */ jsx33(NativeSelect.Indicator, {})
1396
- ] })
1397
- }
1398
- );
1399
- }
1400
-
1401
1401
  // src/TextareaWidget/TextareaWidget.tsx
1402
1402
  import { Textarea } from "@chakra-ui/react";
1403
1403
  import {
@@ -1549,10 +1549,10 @@ function generateForm() {
1549
1549
  var Form_default = generateForm();
1550
1550
 
1551
1551
  // src/ChakraFrameProvider.tsx
1552
- import { CacheProvider } from "@emotion/react";
1552
+ import { ChakraProvider, defaultSystem as defaultSystem2 } from "@chakra-ui/react";
1553
1553
  import createCache from "@emotion/cache";
1554
+ import { CacheProvider } from "@emotion/react";
1554
1555
  import weakMemoize from "@emotion/weak-memoize";
1555
- import { ChakraProvider, defaultSystem as defaultSystem2 } from "@chakra-ui/react";
1556
1556
  import { jsx as jsx37 } from "react/jsx-runtime";
1557
1557
  var memoizedCreateCacheWithContainer = weakMemoize((container) => {
1558
1558
  const newCache = createCache({ container, key: "rjsf" });