@rjsf/chakra-ui 6.0.0-alpha.0 → 6.0.0-beta.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.
Files changed (208) hide show
  1. package/dist/chakra-ui.esm.js +665 -703
  2. package/dist/chakra-ui.esm.js.map +4 -4
  3. package/dist/chakra-ui.umd.js +491 -585
  4. package/dist/index.js +673 -713
  5. package/dist/index.js.map +4 -4
  6. package/lib/AddButton/AddButton.js +3 -3
  7. package/lib/AddButton/AddButton.js.map +1 -1
  8. package/lib/AddButton/index.d.ts +2 -2
  9. package/lib/AddButton/index.js +2 -2
  10. package/lib/AltDateTimeWidget/AltDateTimeWidget.js +1 -1
  11. package/lib/AltDateTimeWidget/index.d.ts +2 -2
  12. package/lib/AltDateTimeWidget/index.js +2 -2
  13. package/lib/AltDateWidget/AltDateWidget.js.map +1 -1
  14. package/lib/AltDateWidget/index.d.ts +2 -2
  15. package/lib/AltDateWidget/index.js +2 -2
  16. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +2 -2
  17. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +5 -8
  18. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
  19. package/lib/ArrayFieldItemTemplate/index.d.ts +2 -2
  20. package/lib/ArrayFieldItemTemplate/index.js +2 -2
  21. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +2 -2
  22. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
  23. package/lib/ArrayFieldTemplate/index.d.ts +2 -2
  24. package/lib/ArrayFieldTemplate/index.js +2 -2
  25. package/lib/BaseInputTemplate/BaseInputTemplate.js +4 -5
  26. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  27. package/lib/BaseInputTemplate/index.d.ts +2 -2
  28. package/lib/BaseInputTemplate/index.js +2 -2
  29. package/lib/ChakraFrameProvider.js +3 -4
  30. package/lib/ChakraFrameProvider.js.map +1 -1
  31. package/lib/CheckboxWidget/CheckboxWidget.js +5 -5
  32. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  33. package/lib/CheckboxWidget/index.d.ts +2 -2
  34. package/lib/CheckboxWidget/index.js +2 -2
  35. package/lib/CheckboxesWidget/CheckboxesWidget.js +10 -13
  36. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  37. package/lib/CheckboxesWidget/index.d.ts +2 -2
  38. package/lib/CheckboxesWidget/index.js +2 -2
  39. package/lib/DescriptionField/DescriptionField.d.ts +5 -1
  40. package/lib/DescriptionField/DescriptionField.js +8 -6
  41. package/lib/DescriptionField/DescriptionField.js.map +1 -1
  42. package/lib/DescriptionField/index.d.ts +2 -2
  43. package/lib/DescriptionField/index.js +2 -2
  44. package/lib/ErrorList/ErrorList.js +4 -3
  45. package/lib/ErrorList/ErrorList.js.map +1 -1
  46. package/lib/ErrorList/index.d.ts +2 -2
  47. package/lib/ErrorList/index.js +2 -2
  48. package/lib/FieldErrorTemplate/FieldErrorTemplate.js +3 -3
  49. package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
  50. package/lib/FieldErrorTemplate/index.d.ts +2 -2
  51. package/lib/FieldErrorTemplate/index.js +2 -2
  52. package/lib/FieldHelpTemplate/FieldHelpTemplate.js +2 -2
  53. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  54. package/lib/FieldHelpTemplate/index.d.ts +2 -2
  55. package/lib/FieldHelpTemplate/index.js +2 -2
  56. package/lib/FieldTemplate/FieldTemplate.js +2 -2
  57. package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
  58. package/lib/FieldTemplate/index.d.ts +2 -2
  59. package/lib/FieldTemplate/index.js +2 -2
  60. package/lib/Form/Form.js +1 -1
  61. package/lib/Form/index.d.ts +2 -2
  62. package/lib/Form/index.js +2 -2
  63. package/lib/GridTemplate/GridTemplate.d.ts +7 -0
  64. package/lib/GridTemplate/GridTemplate.js +15 -0
  65. package/lib/GridTemplate/GridTemplate.js.map +1 -0
  66. package/lib/GridTemplate/index.d.ts +2 -0
  67. package/lib/GridTemplate/index.js +3 -0
  68. package/lib/GridTemplate/index.js.map +1 -0
  69. package/lib/IconButton/ChakraIconButton.js +1 -1
  70. package/lib/IconButton/ChakraIconButton.js.map +1 -1
  71. package/lib/IconButton/IconButton.js +2 -2
  72. package/lib/IconButton/IconButton.js.map +1 -1
  73. package/lib/IconButton/index.d.ts +2 -2
  74. package/lib/IconButton/index.js +2 -2
  75. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +2 -2
  76. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
  77. package/lib/ObjectFieldTemplate/index.d.ts +2 -2
  78. package/lib/ObjectFieldTemplate/index.js +2 -2
  79. package/lib/RadioWidget/RadioWidget.d.ts +1 -1
  80. package/lib/RadioWidget/RadioWidget.js +11 -11
  81. package/lib/RadioWidget/RadioWidget.js.map +1 -1
  82. package/lib/RadioWidget/index.d.ts +2 -2
  83. package/lib/RadioWidget/index.js +2 -2
  84. package/lib/RangeWidget/RangeWidget.d.ts +1 -1
  85. package/lib/RangeWidget/RangeWidget.js +6 -8
  86. package/lib/RangeWidget/RangeWidget.js.map +1 -1
  87. package/lib/RangeWidget/index.d.ts +2 -2
  88. package/lib/RangeWidget/index.js +2 -2
  89. package/lib/SelectNativeWidget/NativeSelectWidget.d.ts +12 -0
  90. package/lib/SelectNativeWidget/NativeSelectWidget.js +60 -0
  91. package/lib/SelectNativeWidget/NativeSelectWidget.js.map +1 -0
  92. package/lib/SelectNativeWidget/index.d.ts +2 -0
  93. package/lib/SelectNativeWidget/index.js +3 -0
  94. package/lib/SelectNativeWidget/index.js.map +1 -0
  95. package/lib/SelectWidget/SelectWidget.js +30 -23
  96. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  97. package/lib/SelectWidget/index.d.ts +2 -2
  98. package/lib/SelectWidget/index.js +2 -2
  99. package/lib/SubmitButton/SubmitButton.js.map +1 -1
  100. package/lib/SubmitButton/index.d.ts +2 -2
  101. package/lib/SubmitButton/index.js +2 -2
  102. package/lib/Templates/Templates.js +16 -14
  103. package/lib/Templates/Templates.js.map +1 -1
  104. package/lib/Templates/index.d.ts +2 -2
  105. package/lib/Templates/index.js +2 -2
  106. package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
  107. package/lib/TextareaWidget/TextareaWidget.js +5 -6
  108. package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
  109. package/lib/TextareaWidget/index.d.ts +2 -2
  110. package/lib/TextareaWidget/index.js +2 -2
  111. package/lib/Theme/Theme.js +2 -2
  112. package/lib/Theme/index.d.ts +2 -2
  113. package/lib/Theme/index.js +2 -2
  114. package/lib/TitleField/TitleField.js +2 -2
  115. package/lib/TitleField/TitleField.js.map +1 -1
  116. package/lib/TitleField/index.d.ts +2 -2
  117. package/lib/TitleField/index.js +2 -2
  118. package/lib/UpDownWidget/UpDownWidget.js +6 -7
  119. package/lib/UpDownWidget/UpDownWidget.js.map +1 -1
  120. package/lib/UpDownWidget/index.d.ts +2 -2
  121. package/lib/UpDownWidget/index.js +2 -2
  122. package/lib/Widgets/Widgets.js +11 -9
  123. package/lib/Widgets/Widgets.js.map +1 -1
  124. package/lib/Widgets/index.d.ts +2 -2
  125. package/lib/Widgets/index.js +2 -2
  126. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +4 -3
  127. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
  128. package/lib/WrapIfAdditionalTemplate/index.d.ts +2 -2
  129. package/lib/WrapIfAdditionalTemplate/index.js +2 -2
  130. package/lib/components/ui/alert.d.ts +24 -0
  131. package/lib/components/ui/alert.js +9 -0
  132. package/lib/components/ui/alert.js.map +1 -0
  133. package/lib/components/ui/checkbox.d.ts +17 -0
  134. package/lib/components/ui/checkbox.js +17 -0
  135. package/lib/components/ui/checkbox.js.map +1 -0
  136. package/lib/components/ui/close-button.d.ts +10 -0
  137. package/lib/components/ui/close-button.js +16 -0
  138. package/lib/components/ui/close-button.js.map +1 -0
  139. package/lib/components/ui/field.d.ts +20 -0
  140. package/lib/components/ui/field.js +19 -0
  141. package/lib/components/ui/field.js.map +1 -0
  142. package/lib/components/ui/number-input.d.ts +10 -0
  143. package/lib/components/ui/number-input.js +20 -0
  144. package/lib/components/ui/number-input.js.map +1 -0
  145. package/lib/components/ui/radio.d.ts +16 -0
  146. package/lib/components/ui/radio.js +17 -0
  147. package/lib/components/ui/radio.js.map +1 -0
  148. package/lib/components/ui/select.d.ts +73 -0
  149. package/lib/components/ui/select.js +99 -0
  150. package/lib/components/ui/select.js.map +1 -0
  151. package/lib/components/ui/slider.d.ts +18 -0
  152. package/lib/components/ui/slider.js +55 -0
  153. package/lib/components/ui/slider.js.map +1 -0
  154. package/lib/index.d.ts +7 -7
  155. package/lib/index.js +6 -6
  156. package/lib/tsconfig.tsbuildinfo +1 -1
  157. package/lib/utils.d.ts +3 -6
  158. package/lib/utils.js +6 -7
  159. package/lib/utils.js.map +1 -1
  160. package/package.json +53 -49
  161. package/src/AddButton/AddButton.tsx +3 -2
  162. package/src/AltDateTimeWidget/AltDateTimeWidget.tsx +1 -1
  163. package/src/AltDateWidget/AltDateWidget.tsx +3 -3
  164. package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +18 -60
  165. package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +9 -7
  166. package/src/BaseInputTemplate/BaseInputTemplate.tsx +11 -18
  167. package/src/ChakraFrameProvider.tsx +2 -6
  168. package/src/CheckboxWidget/CheckboxWidget.tsx +14 -13
  169. package/src/CheckboxesWidget/CheckboxesWidget.tsx +14 -29
  170. package/src/DescriptionField/DescriptionField.tsx +12 -11
  171. package/src/ErrorList/ErrorList.tsx +16 -7
  172. package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +5 -5
  173. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +3 -3
  174. package/src/FieldTemplate/FieldTemplate.tsx +8 -8
  175. package/src/Form/Form.tsx +1 -1
  176. package/src/GridTemplate/GridTemplate.tsx +15 -0
  177. package/src/GridTemplate/index.ts +2 -0
  178. package/src/IconButton/ChakraIconButton.tsx +7 -3
  179. package/src/IconButton/IconButton.tsx +5 -5
  180. package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +6 -4
  181. package/src/RadioWidget/RadioWidget.tsx +15 -14
  182. package/src/RangeWidget/RangeWidget.tsx +13 -20
  183. package/src/SelectNativeWidget/NativeSelectWidget.tsx +134 -0
  184. package/src/SelectNativeWidget/index.ts +2 -0
  185. package/src/SelectWidget/SelectWidget.tsx +74 -46
  186. package/src/SubmitButton/SubmitButton.tsx +1 -1
  187. package/src/Templates/Templates.ts +3 -1
  188. package/src/TextareaWidget/TextareaWidget.tsx +11 -14
  189. package/src/Theme/Theme.tsx +1 -1
  190. package/src/TitleField/TitleField.tsx +2 -2
  191. package/src/UpDownWidget/UpDownWidget.tsx +21 -34
  192. package/src/Widgets/Widgets.ts +3 -1
  193. package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +9 -7
  194. package/src/components/ui/alert.tsx +47 -0
  195. package/src/components/ui/checkbox.tsx +28 -0
  196. package/src/components/ui/close-button.tsx +21 -0
  197. package/src/components/ui/field.tsx +37 -0
  198. package/src/components/ui/number-input.tsx +31 -0
  199. package/src/components/ui/radio.tsx +28 -0
  200. package/src/components/ui/select.tsx +171 -0
  201. package/src/components/ui/slider.tsx +100 -0
  202. package/src/tsconfig.json +3 -4
  203. package/src/utils.ts +8 -12
  204. package/LICENSE.md +0 -201
  205. package/lib/CssReset.d.ts +0 -23
  206. package/lib/CssReset.js +0 -266
  207. package/lib/CssReset.js.map +0 -1
  208. package/src/CssReset.tsx +0 -270
@@ -4,107 +4,63 @@ import { withTheme } from "@rjsf/core";
4
4
  // src/AddButton/AddButton.tsx
5
5
  import { TranslatableString } from "@rjsf/utils";
6
6
  import { Button } from "@chakra-ui/react";
7
- import { AddIcon } from "@chakra-ui/icons";
8
- import { jsx } from "react/jsx-runtime";
7
+ import { PlusIcon } from "lucide-react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
9
  function AddButton({
10
10
  uiSchema,
11
11
  registry,
12
12
  ...props
13
13
  }) {
14
14
  const { translateString } = registry;
15
- return /* @__PURE__ */ jsx(Button, { leftIcon: /* @__PURE__ */ jsx(AddIcon, {}), ...props, children: translateString(TranslatableString.AddItemButton) });
15
+ return /* @__PURE__ */ jsxs(Button, { ...props, children: [
16
+ /* @__PURE__ */ jsx(PlusIcon, {}),
17
+ translateString(TranslatableString.AddItemButton)
18
+ ] });
16
19
  }
17
20
 
18
21
  // src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx
19
- import { useMemo } from "react";
20
22
  import { Box, ButtonGroup, HStack } from "@chakra-ui/react";
21
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
23
+ import {
24
+ getTemplate,
25
+ getUiOptions
26
+ } from "@rjsf/utils";
27
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
22
28
  function ArrayFieldItemTemplate(props) {
23
- const {
24
- children,
25
- disabled,
26
- hasToolbar,
27
- hasCopy,
28
- hasMoveDown,
29
- hasMoveUp,
30
- hasRemove,
31
- index,
32
- onCopyIndexClick,
33
- onDropIndexClick,
34
- onReorderClick,
35
- readonly,
36
- uiSchema,
37
- registry
38
- } = props;
39
- const { CopyButton: CopyButton2, MoveDownButton: MoveDownButton2, MoveUpButton: MoveUpButton2, RemoveButton: RemoveButton2 } = registry.templates.ButtonTemplates;
40
- const onCopyClick = useMemo(() => onCopyIndexClick(index), [index, onCopyIndexClick]);
41
- const onRemoveClick = useMemo(() => onDropIndexClick(index), [index, onDropIndexClick]);
42
- const onArrowUpClick = useMemo(() => onReorderClick(index, index - 1), [index, onReorderClick]);
43
- const onArrowDownClick = useMemo(() => onReorderClick(index, index + 1), [index, onReorderClick]);
44
- return /* @__PURE__ */ jsxs(HStack, { alignItems: "flex-end", py: 1, children: [
29
+ const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
30
+ const uiOptions = getUiOptions(uiSchema);
31
+ const ArrayFieldItemButtonsTemplate = getTemplate(
32
+ "ArrayFieldItemButtonsTemplate",
33
+ registry,
34
+ uiOptions
35
+ );
36
+ return /* @__PURE__ */ jsxs2(HStack, { alignItems: "flex-end", py: 1, children: [
45
37
  /* @__PURE__ */ jsx2(Box, { w: "100%", children }),
46
- hasToolbar && /* @__PURE__ */ jsx2(Box, { children: /* @__PURE__ */ jsxs(ButtonGroup, { isAttached: true, mb: 1, children: [
47
- (hasMoveUp || hasMoveDown) && /* @__PURE__ */ jsx2(
48
- MoveUpButton2,
49
- {
50
- disabled: disabled || readonly || !hasMoveUp,
51
- onClick: onArrowUpClick,
52
- uiSchema,
53
- registry
54
- }
55
- ),
56
- (hasMoveUp || hasMoveDown) && /* @__PURE__ */ jsx2(
57
- MoveDownButton2,
58
- {
59
- disabled: disabled || readonly || !hasMoveDown,
60
- onClick: onArrowDownClick,
61
- uiSchema,
62
- registry
63
- }
64
- ),
65
- hasCopy && /* @__PURE__ */ jsx2(
66
- CopyButton2,
67
- {
68
- disabled: disabled || readonly,
69
- onClick: onCopyClick,
70
- uiSchema,
71
- registry
72
- }
73
- ),
74
- hasRemove && /* @__PURE__ */ jsx2(
75
- RemoveButton2,
76
- {
77
- disabled: disabled || readonly,
78
- onClick: onRemoveClick,
79
- uiSchema,
80
- registry
81
- }
82
- )
83
- ] }) })
38
+ hasToolbar && /* @__PURE__ */ jsx2(Box, { children: /* @__PURE__ */ jsx2(ButtonGroup, { attached: true, mb: 1, children: /* @__PURE__ */ jsx2(ArrayFieldItemButtonsTemplate, { ...buttonsProps }) }) })
84
39
  ] });
85
40
  }
86
41
 
87
42
  // src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
88
43
  import { Box as Box2, Grid, GridItem } from "@chakra-ui/react";
89
44
  import {
90
- getTemplate,
91
- getUiOptions
45
+ getTemplate as getTemplate2,
46
+ getUiOptions as getUiOptions2,
47
+ buttonId
92
48
  } from "@rjsf/utils";
93
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
49
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
94
50
  function ArrayFieldTemplate(props) {
95
51
  const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
96
- const uiOptions = getUiOptions(uiSchema);
97
- const ArrayFieldDescriptionTemplate = getTemplate(
52
+ const uiOptions = getUiOptions2(uiSchema);
53
+ const ArrayFieldDescriptionTemplate = getTemplate2(
98
54
  "ArrayFieldDescriptionTemplate",
99
55
  registry,
100
56
  uiOptions
101
57
  );
102
- const ArrayFieldItemTemplate2 = getTemplate(
58
+ const ArrayFieldItemTemplate2 = getTemplate2(
103
59
  "ArrayFieldItemTemplate",
104
60
  registry,
105
61
  uiOptions
106
62
  );
107
- const ArrayFieldTitleTemplate = getTemplate(
63
+ const ArrayFieldTitleTemplate = getTemplate2(
108
64
  "ArrayFieldTitleTemplate",
109
65
  registry,
110
66
  uiOptions
@@ -112,7 +68,7 @@ function ArrayFieldTemplate(props) {
112
68
  const {
113
69
  ButtonTemplates: { AddButton: AddButton2 }
114
70
  } = registry.templates;
115
- return /* @__PURE__ */ jsxs2(Box2, { children: [
71
+ return /* @__PURE__ */ jsxs3(Box2, { children: [
116
72
  /* @__PURE__ */ jsx3(
117
73
  ArrayFieldTitleTemplate,
118
74
  {
@@ -134,12 +90,13 @@ function ArrayFieldTemplate(props) {
134
90
  registry
135
91
  }
136
92
  ),
137
- /* @__PURE__ */ jsxs2(Grid, { children: [
93
+ /* @__PURE__ */ jsxs3(Grid, { children: [
138
94
  /* @__PURE__ */ jsx3(GridItem, { children: items.length > 0 && items.map(({ key, ...itemProps }) => /* @__PURE__ */ jsx3(ArrayFieldItemTemplate2, { ...itemProps }, key)) }),
139
95
  canAdd && /* @__PURE__ */ jsx3(GridItem, { justifySelf: "flex-end", children: /* @__PURE__ */ jsx3(Box2, { mt: 2, children: /* @__PURE__ */ jsx3(
140
96
  AddButton2,
141
97
  {
142
- className: "array-item-add",
98
+ id: buttonId(idSchema, "add"),
99
+ className: "rjsf-array-item-add",
143
100
  onClick: onAddClick,
144
101
  disabled: disabled || readonly,
145
102
  uiSchema,
@@ -151,7 +108,7 @@ function ArrayFieldTemplate(props) {
151
108
  }
152
109
 
153
110
  // src/BaseInputTemplate/BaseInputTemplate.tsx
154
- import { FormControl, FormLabel, Input } from "@chakra-ui/react";
111
+ import { Input } from "@chakra-ui/react";
155
112
  import {
156
113
  ariaDescribedByIds,
157
114
  examplesId,
@@ -159,20 +116,25 @@ import {
159
116
  getInputProps
160
117
  } from "@rjsf/utils";
161
118
 
162
- // src/utils.ts
163
- import { shouldForwardProp } from "@chakra-ui/react";
164
- function getChakra({ uiSchema = {} }) {
165
- const chakraProps = uiSchema["ui:options"] && uiSchema["ui:options"].chakra || {};
166
- Object.keys(chakraProps).forEach((key) => {
167
- if (shouldForwardProp(key)) {
168
- delete chakraProps[key];
169
- }
170
- });
171
- return chakraProps;
172
- }
119
+ // src/components/ui/field.tsx
120
+ import { forwardRef } from "react";
121
+ import { Field as ChakraField } from "@chakra-ui/react";
122
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
123
+ var Field = forwardRef(function Field2(props, ref) {
124
+ const { label, children, helperText, errorText, optionalText, ...rest } = props;
125
+ return /* @__PURE__ */ jsxs4(ChakraField.Root, { ref, ...rest, children: [
126
+ label && /* @__PURE__ */ jsxs4(ChakraField.Label, { children: [
127
+ label,
128
+ /* @__PURE__ */ jsx4(ChakraField.RequiredIndicator, { fallback: optionalText })
129
+ ] }),
130
+ children,
131
+ helperText && /* @__PURE__ */ jsx4(ChakraField.HelperText, { children: helperText }),
132
+ errorText && /* @__PURE__ */ jsx4(ChakraField.ErrorText, { children: errorText })
133
+ ] });
134
+ });
173
135
 
174
136
  // src/BaseInputTemplate/BaseInputTemplate.tsx
175
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
137
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
176
138
  function BaseInputTemplate(props) {
177
139
  const {
178
140
  id,
@@ -181,7 +143,6 @@ function BaseInputTemplate(props) {
181
143
  label,
182
144
  hideLabel,
183
145
  schema,
184
- uiSchema,
185
146
  onChange,
186
147
  onChangeOverride,
187
148
  onBlur,
@@ -195,25 +156,20 @@ function BaseInputTemplate(props) {
195
156
  disabled
196
157
  } = props;
197
158
  const inputProps = getInputProps(schema, type, options);
198
- const chakraProps = getChakra({ uiSchema });
199
159
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
200
160
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
201
161
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
202
- return /* @__PURE__ */ jsxs3(
203
- FormControl,
162
+ return /* @__PURE__ */ jsxs5(
163
+ Field,
204
164
  {
205
165
  mb: 1,
206
- ...chakraProps,
207
- isDisabled: disabled || readonly,
208
- isRequired: required,
209
- isReadOnly: readonly,
210
- isInvalid: rawErrors && rawErrors.length > 0,
166
+ disabled: disabled || readonly,
167
+ required,
168
+ readOnly: readonly,
169
+ invalid: rawErrors && rawErrors.length > 0,
170
+ label: labelValue(label, hideLabel || !label),
211
171
  children: [
212
- labelValue(
213
- /* @__PURE__ */ jsx4(FormLabel, { htmlFor: id, id: `${id}-label`, children: label }),
214
- hideLabel || !label
215
- ),
216
- /* @__PURE__ */ jsx4(
172
+ /* @__PURE__ */ jsx5(
217
173
  Input,
218
174
  {
219
175
  id,
@@ -229,8 +185,8 @@ function BaseInputTemplate(props) {
229
185
  "aria-describedby": ariaDescribedByIds(id, !!schema.examples)
230
186
  }
231
187
  ),
232
- Array.isArray(schema.examples) ? /* @__PURE__ */ jsx4("datalist", { id: examplesId(id), children: schema.examples.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : []).map((example) => {
233
- return /* @__PURE__ */ jsx4("option", { value: example }, example);
188
+ Array.isArray(schema.examples) ? /* @__PURE__ */ jsx5("datalist", { id: examplesId(id), children: schema.examples.concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : []).map((example) => {
189
+ return /* @__PURE__ */ jsx5("option", { value: example }, example);
234
190
  }) }) : null
235
191
  ]
236
192
  }
@@ -238,68 +194,103 @@ function BaseInputTemplate(props) {
238
194
  }
239
195
 
240
196
  // src/DescriptionField/DescriptionField.tsx
197
+ import { RichDescription } from "@rjsf/core";
241
198
  import { Text } from "@chakra-ui/react";
242
- import { Fragment, jsx as jsx5 } from "react/jsx-runtime";
243
- function DescriptionField({ description, id }) {
199
+ import { jsx as jsx6 } from "react/jsx-runtime";
200
+ function DescriptionField({ description, id, registry, uiSchema }) {
244
201
  if (!description) {
245
202
  return null;
246
203
  }
247
- if (typeof description === "string") {
248
- return /* @__PURE__ */ jsx5(Text, { as: "sup", fontSize: "md", id, children: description });
249
- }
250
- return /* @__PURE__ */ jsx5(Fragment, { children: description });
204
+ return /* @__PURE__ */ jsx6(Text, { as: "sup", fontSize: "md", id, children: /* @__PURE__ */ jsx6(RichDescription, { description, registry, uiSchema }) });
251
205
  }
252
206
 
253
207
  // src/ErrorList/ErrorList.tsx
254
208
  import { TranslatableString as TranslatableString2 } from "@rjsf/utils";
255
- import { List, ListIcon, ListItem, Alert, AlertTitle } from "@chakra-ui/react";
256
- import { WarningIcon } from "@chakra-ui/icons";
257
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
209
+ import { ListIndicator, ListItem, ListRoot } from "@chakra-ui/react";
210
+ import { TriangleAlert } from "lucide-react";
211
+
212
+ // src/components/ui/alert.tsx
213
+ import { forwardRef as forwardRef3 } from "react";
214
+ import { Alert as ChakraAlert } from "@chakra-ui/react";
215
+
216
+ // src/components/ui/close-button.tsx
217
+ import { forwardRef as forwardRef2 } from "react";
218
+ import { IconButton as ChakraIconButton } from "@chakra-ui/react";
219
+ import { LuX } from "react-icons/lu";
220
+ import { jsx as jsx7 } from "react/jsx-runtime";
221
+ var CloseButton = forwardRef2(function CloseButton2(props, ref) {
222
+ return /* @__PURE__ */ jsx7(ChakraIconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: props.children ?? /* @__PURE__ */ jsx7(LuX, {}) });
223
+ });
224
+
225
+ // src/components/ui/alert.tsx
226
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
227
+ var Alert = forwardRef3(function Alert2(props, ref) {
228
+ const { title, children, icon, closable, onClose, startElement, endElement, ...rest } = props;
229
+ return /* @__PURE__ */ jsxs6(ChakraAlert.Root, { ref, ...rest, children: [
230
+ startElement || /* @__PURE__ */ jsx8(ChakraAlert.Indicator, { children: icon }),
231
+ children ? /* @__PURE__ */ jsxs6(ChakraAlert.Content, { children: [
232
+ /* @__PURE__ */ jsx8(ChakraAlert.Title, { children: title }),
233
+ /* @__PURE__ */ jsx8(ChakraAlert.Description, { children })
234
+ ] }) : /* @__PURE__ */ jsx8(ChakraAlert.Title, { flex: "1", children: title }),
235
+ endElement,
236
+ closable && /* @__PURE__ */ jsx8(CloseButton, { size: "sm", pos: "relative", top: "-2", insetEnd: "-2", alignSelf: "flex-start", onClick: onClose })
237
+ ] });
238
+ });
239
+
240
+ // src/ErrorList/ErrorList.tsx
241
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
258
242
  function ErrorList({
259
243
  errors,
260
244
  registry
261
245
  }) {
262
246
  const { translateString } = registry;
263
- return /* @__PURE__ */ jsxs4(Alert, { flexDirection: "column", alignItems: "flex-start", gap: 3, status: "error", children: [
264
- /* @__PURE__ */ jsx6(AlertTitle, { children: translateString(TranslatableString2.ErrorsLabel) }),
265
- /* @__PURE__ */ jsx6(List, { children: errors.map((error, i) => /* @__PURE__ */ jsxs4(ListItem, { children: [
266
- /* @__PURE__ */ jsx6(ListIcon, { as: WarningIcon, color: "red.500" }),
267
- error.stack
268
- ] }, i)) })
269
- ] });
247
+ return /* @__PURE__ */ jsx9(
248
+ Alert,
249
+ {
250
+ flexDirection: "column",
251
+ alignItems: "flex-start",
252
+ gap: 3,
253
+ status: "error",
254
+ title: translateString(TranslatableString2.ErrorsLabel),
255
+ children: /* @__PURE__ */ jsx9(ListRoot, { children: errors.map((error, i) => /* @__PURE__ */ jsxs7(ListItem, { children: [
256
+ /* @__PURE__ */ jsx9(ListIndicator, { asChild: true, color: "red.500", children: /* @__PURE__ */ jsx9(TriangleAlert, {}) }),
257
+ error.stack
258
+ ] }, i)) })
259
+ }
260
+ );
270
261
  }
271
262
 
272
263
  // src/IconButton/ChakraIconButton.tsx
273
264
  import { memo } from "react";
274
265
  import { IconButton } from "@chakra-ui/react";
275
- import { jsx as jsx7 } from "react/jsx-runtime";
276
- function ChakraIconButton(props) {
266
+ import { jsx as jsx10 } from "react/jsx-runtime";
267
+ function ChakraIconButton2(props) {
277
268
  const { icon, iconType, uiSchema, registry, ...otherProps } = props;
278
- return /* @__PURE__ */ jsx7(IconButton, { "aria-label": props.title, ...otherProps, icon });
269
+ return /* @__PURE__ */ jsx10(IconButton, { "aria-label": props.title, ...otherProps, children: icon });
279
270
  }
280
- ChakraIconButton.displayName = "ChakraIconButton";
281
- var ChakraIconButton_default = memo(ChakraIconButton);
271
+ ChakraIconButton2.displayName = "ChakraIconButton";
272
+ var ChakraIconButton_default = memo(ChakraIconButton2);
282
273
 
283
274
  // src/IconButton/IconButton.tsx
284
275
  import { TranslatableString as TranslatableString3 } from "@rjsf/utils";
285
- import { ArrowUpIcon, ArrowDownIcon, CopyIcon, DeleteIcon } from "@chakra-ui/icons";
286
- import { jsx as jsx8 } from "react/jsx-runtime";
276
+ import { ArrowUpIcon, ArrowDownIcon, CopyIcon, DeleteIcon } from "lucide-react";
277
+ import { jsx as jsx11 } from "react/jsx-runtime";
287
278
  function CopyButton(props) {
288
279
  const {
289
280
  registry: { translateString }
290
281
  } = props;
291
- return /* @__PURE__ */ jsx8(ChakraIconButton_default, { title: translateString(TranslatableString3.CopyButton), ...props, icon: /* @__PURE__ */ jsx8(CopyIcon, {}) });
282
+ return /* @__PURE__ */ jsx11(ChakraIconButton_default, { title: translateString(TranslatableString3.CopyButton), ...props, icon: /* @__PURE__ */ jsx11(CopyIcon, {}) });
292
283
  }
293
284
  function MoveDownButton(props) {
294
285
  const {
295
286
  registry: { translateString }
296
287
  } = props;
297
- return /* @__PURE__ */ jsx8(
288
+ return /* @__PURE__ */ jsx11(
298
289
  ChakraIconButton_default,
299
290
  {
300
291
  title: translateString(TranslatableString3.MoveDownButton),
301
292
  ...props,
302
- icon: /* @__PURE__ */ jsx8(ArrowDownIcon, {})
293
+ icon: /* @__PURE__ */ jsx11(ArrowDownIcon, {})
303
294
  }
304
295
  );
305
296
  }
@@ -307,12 +298,12 @@ function MoveUpButton(props) {
307
298
  const {
308
299
  registry: { translateString }
309
300
  } = props;
310
- return /* @__PURE__ */ jsx8(
301
+ return /* @__PURE__ */ jsx11(
311
302
  ChakraIconButton_default,
312
303
  {
313
304
  title: translateString(TranslatableString3.MoveUpButton),
314
305
  ...props,
315
- icon: /* @__PURE__ */ jsx8(ArrowUpIcon, {})
306
+ icon: /* @__PURE__ */ jsx11(ArrowUpIcon, {})
316
307
  }
317
308
  );
318
309
  }
@@ -320,51 +311,51 @@ function RemoveButton(props) {
320
311
  const {
321
312
  registry: { translateString }
322
313
  } = props;
323
- return /* @__PURE__ */ jsx8(
314
+ return /* @__PURE__ */ jsx11(
324
315
  ChakraIconButton_default,
325
316
  {
326
317
  title: translateString(TranslatableString3.RemoveButton),
327
318
  ...props,
328
- icon: /* @__PURE__ */ jsx8(DeleteIcon, {})
319
+ icon: /* @__PURE__ */ jsx11(DeleteIcon, {})
329
320
  }
330
321
  );
331
322
  }
332
323
 
333
324
  // src/FieldErrorTemplate/FieldErrorTemplate.tsx
334
325
  import { errorId } from "@rjsf/utils";
335
- import { FormErrorMessage, List as List2, ListItem as ListItem2 } from "@chakra-ui/react";
336
- import { jsx as jsx9 } from "react/jsx-runtime";
326
+ import { ListItem as ListItem2, ListRoot as ListRoot2, Text as Text2 } from "@chakra-ui/react";
327
+ import { jsx as jsx12 } from "react/jsx-runtime";
337
328
  function FieldErrorTemplate(props) {
338
329
  const { errors = [], idSchema } = props;
339
330
  if (errors.length === 0) {
340
331
  return null;
341
332
  }
342
333
  const id = errorId(idSchema);
343
- return /* @__PURE__ */ jsx9(List2, { children: errors.map((error, i) => {
344
- return /* @__PURE__ */ jsx9(ListItem2, { children: /* @__PURE__ */ jsx9(FormErrorMessage, { id, children: error }) }, i);
334
+ return /* @__PURE__ */ jsx12(ListRoot2, { children: errors.map((error, i) => {
335
+ return /* @__PURE__ */ jsx12(ListItem2, { children: /* @__PURE__ */ jsx12(Text2, { id, children: error }) }, i);
345
336
  }) });
346
337
  }
347
338
 
348
339
  // src/FieldHelpTemplate/FieldHelpTemplate.tsx
340
+ import { Text as Text3 } from "@chakra-ui/react";
349
341
  import { helpId } from "@rjsf/utils";
350
- import { FormHelperText } from "@chakra-ui/react";
351
- import { jsx as jsx10 } from "react/jsx-runtime";
342
+ import { jsx as jsx13 } from "react/jsx-runtime";
352
343
  function FieldHelpTemplate(props) {
353
344
  const { idSchema, help } = props;
354
345
  if (!help) {
355
346
  return null;
356
347
  }
357
348
  const id = helpId(idSchema);
358
- return /* @__PURE__ */ jsx10(FormHelperText, { id, children: help });
349
+ return /* @__PURE__ */ jsx13(Text3, { id, children: help });
359
350
  }
360
351
 
361
352
  // src/FieldTemplate/FieldTemplate.tsx
353
+ import { Fieldset } from "@chakra-ui/react";
362
354
  import {
363
- getTemplate as getTemplate2,
364
- getUiOptions as getUiOptions2
355
+ getTemplate as getTemplate3,
356
+ getUiOptions as getUiOptions3
365
357
  } from "@rjsf/utils";
366
- import { Text as Text2, FormControl as FormControl2 } from "@chakra-ui/react";
367
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
358
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
368
359
  function FieldTemplate(props) {
369
360
  const {
370
361
  id,
@@ -388,16 +379,16 @@ function FieldTemplate(props) {
388
379
  schema,
389
380
  uiSchema
390
381
  } = props;
391
- const uiOptions = getUiOptions2(uiSchema);
392
- const WrapIfAdditionalTemplate2 = getTemplate2(
382
+ const uiOptions = getUiOptions3(uiSchema);
383
+ const WrapIfAdditionalTemplate2 = getTemplate3(
393
384
  "WrapIfAdditionalTemplate",
394
385
  registry,
395
386
  uiOptions
396
387
  );
397
388
  if (hidden) {
398
- return /* @__PURE__ */ jsx11("div", { style: { display: "none" }, children });
389
+ return /* @__PURE__ */ jsx14("div", { style: { display: "none" }, children });
399
390
  }
400
- return /* @__PURE__ */ jsx11(
391
+ return /* @__PURE__ */ jsx14(
401
392
  WrapIfAdditionalTemplate2,
402
393
  {
403
394
  classNames,
@@ -412,26 +403,38 @@ function FieldTemplate(props) {
412
403
  schema,
413
404
  uiSchema,
414
405
  registry,
415
- children: /* @__PURE__ */ jsxs5(FormControl2, { isRequired: required, isInvalid: rawErrors && rawErrors.length > 0, children: [
416
- children,
417
- displayLabel && rawDescription ? /* @__PURE__ */ jsx11(Text2, { mt: 2, children: description }) : null,
418
- errors,
419
- help
406
+ children: /* @__PURE__ */ jsxs8(Fieldset.Root, { disabled, invalid: rawErrors && rawErrors.length > 0, children: [
407
+ displayLabel && rawDescription ? /* @__PURE__ */ jsx14(Fieldset.Legend, { mt: 2, children: description }) : null,
408
+ help,
409
+ /* @__PURE__ */ jsx14(Fieldset.Content, { children }),
410
+ errors && /* @__PURE__ */ jsx14(Fieldset.ErrorText, { children: errors })
420
411
  ] })
421
412
  }
422
413
  );
423
414
  }
424
415
 
425
- // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
416
+ // src/GridTemplate/GridTemplate.tsx
426
417
  import { Grid as Grid2, GridItem as GridItem2 } from "@chakra-ui/react";
418
+ import { jsx as jsx15 } from "react/jsx-runtime";
419
+ function GridTemplate(props) {
420
+ const { children, column, ...rest } = props;
421
+ if (column) {
422
+ return /* @__PURE__ */ jsx15(GridItem2, { ...rest, children });
423
+ }
424
+ return /* @__PURE__ */ jsx15(Grid2, { ...rest, children });
425
+ }
426
+
427
+ // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
428
+ import { Grid as Grid3, GridItem as GridItem3 } from "@chakra-ui/react";
427
429
  import {
430
+ buttonId as buttonId2,
428
431
  canExpand,
429
432
  descriptionId,
430
- getTemplate as getTemplate3,
431
- getUiOptions as getUiOptions3,
433
+ getTemplate as getTemplate4,
434
+ getUiOptions as getUiOptions4,
432
435
  titleId
433
436
  } from "@rjsf/utils";
434
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
437
+ import { Fragment, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
435
438
  function ObjectFieldTemplate(props) {
436
439
  const {
437
440
  description,
@@ -447,9 +450,9 @@ function ObjectFieldTemplate(props) {
447
450
  onAddClick,
448
451
  registry
449
452
  } = props;
450
- const uiOptions = getUiOptions3(uiSchema);
451
- const TitleFieldTemplate = getTemplate3("TitleFieldTemplate", registry, uiOptions);
452
- const DescriptionFieldTemplate = getTemplate3(
453
+ const uiOptions = getUiOptions4(uiSchema);
454
+ const TitleFieldTemplate = getTemplate4("TitleFieldTemplate", registry, uiOptions);
455
+ const DescriptionFieldTemplate = getTemplate4(
453
456
  "DescriptionFieldTemplate",
454
457
  registry,
455
458
  uiOptions
@@ -457,8 +460,8 @@ function ObjectFieldTemplate(props) {
457
460
  const {
458
461
  ButtonTemplates: { AddButton: AddButton2 }
459
462
  } = registry.templates;
460
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
461
- title && /* @__PURE__ */ jsx12(
463
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
464
+ title && /* @__PURE__ */ jsx16(
462
465
  TitleFieldTemplate,
463
466
  {
464
467
  id: titleId(idSchema),
@@ -469,7 +472,7 @@ function ObjectFieldTemplate(props) {
469
472
  registry
470
473
  }
471
474
  ),
472
- description && /* @__PURE__ */ jsx12(
475
+ description && /* @__PURE__ */ jsx16(
473
476
  DescriptionFieldTemplate,
474
477
  {
475
478
  id: descriptionId(idSchema),
@@ -479,14 +482,15 @@ function ObjectFieldTemplate(props) {
479
482
  registry
480
483
  }
481
484
  ),
482
- /* @__PURE__ */ jsxs6(Grid2, { gap: description ? 2 : 6, mb: 4, children: [
485
+ /* @__PURE__ */ jsxs9(Grid3, { gap: description ? 2 : 6, mb: 4, children: [
483
486
  properties.map(
484
- (element, index) => element.hidden ? element.content : /* @__PURE__ */ jsx12(GridItem2, { children: element.content }, `${idSchema.$id}-${element.name}-${index}`)
487
+ (element, index) => element.hidden ? element.content : /* @__PURE__ */ jsx16(GridItem3, { children: element.content }, `${idSchema.$id}-${element.name}-${index}`)
485
488
  ),
486
- canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx12(GridItem2, { justifySelf: "flex-end", children: /* @__PURE__ */ jsx12(
489
+ canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx16(GridItem3, { justifySelf: "flex-end", children: /* @__PURE__ */ jsx16(
487
490
  AddButton2,
488
491
  {
489
- className: "object-property-expand",
492
+ id: buttonId2(idSchema, "add"),
493
+ className: "rjsf-object-property-expand",
490
494
  onClick: onAddClick(schema),
491
495
  disabled: disabled || readonly,
492
496
  uiSchema,
@@ -500,35 +504,36 @@ function ObjectFieldTemplate(props) {
500
504
  // src/SubmitButton/SubmitButton.tsx
501
505
  import { Box as Box3, Button as Button2 } from "@chakra-ui/react";
502
506
  import { getSubmitButtonOptions } from "@rjsf/utils";
503
- import { jsx as jsx13 } from "react/jsx-runtime";
507
+ import { jsx as jsx17 } from "react/jsx-runtime";
504
508
  function SubmitButton({ uiSchema }) {
505
509
  const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(uiSchema);
506
510
  if (norender) {
507
511
  return null;
508
512
  }
509
- return /* @__PURE__ */ jsx13(Box3, { marginTop: 3, children: /* @__PURE__ */ jsx13(Button2, { type: "submit", variant: "solid", ...submitButtonProps, children: submitText }) });
513
+ return /* @__PURE__ */ jsx17(Box3, { marginTop: 3, children: /* @__PURE__ */ jsx17(Button2, { type: "submit", variant: "solid", ...submitButtonProps, children: submitText }) });
510
514
  }
511
515
 
512
516
  // src/TitleField/TitleField.tsx
513
- import { Box as Box4, Divider, Heading } from "@chakra-ui/react";
514
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
517
+ import { Box as Box4, Separator, Heading } from "@chakra-ui/react";
518
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
515
519
  function TitleField({
516
520
  id,
517
521
  title
518
522
  }) {
519
- return /* @__PURE__ */ jsxs7(Box4, { id, mt: 1, mb: 4, children: [
520
- /* @__PURE__ */ jsx14(Heading, { as: "h5", children: title }),
521
- /* @__PURE__ */ jsx14(Divider, {})
523
+ return /* @__PURE__ */ jsxs10(Box4, { id, mt: 1, mb: 4, children: [
524
+ /* @__PURE__ */ jsx18(Heading, { as: "h5", children: title }),
525
+ /* @__PURE__ */ jsx18(Separator, {})
522
526
  ] });
523
527
  }
524
528
 
525
529
  // src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
526
530
  import {
527
531
  ADDITIONAL_PROPERTY_FLAG,
532
+ buttonId as buttonId3,
528
533
  TranslatableString as TranslatableString4
529
534
  } from "@rjsf/utils";
530
- import { FormControl as FormControl3, FormLabel as FormLabel2, Grid as Grid3, GridItem as GridItem3, Input as Input2 } from "@chakra-ui/react";
531
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
535
+ import { Grid as Grid4, GridItem as GridItem4, Input as Input2 } from "@chakra-ui/react";
536
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
532
537
  function WrapIfAdditionalTemplate(props) {
533
538
  const {
534
539
  children,
@@ -550,29 +555,28 @@ function WrapIfAdditionalTemplate(props) {
550
555
  const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
551
556
  const additional = ADDITIONAL_PROPERTY_FLAG in schema;
552
557
  if (!additional) {
553
- return /* @__PURE__ */ jsx15("div", { className: classNames, style, children });
558
+ return /* @__PURE__ */ jsx19("div", { className: classNames, style, children });
554
559
  }
555
560
  const handleBlur = ({ target }) => onKeyChange(target.value);
556
- return /* @__PURE__ */ jsxs8(Grid3, { className: classNames, style, alignItems: "center", gap: 2, children: [
557
- /* @__PURE__ */ jsx15(GridItem3, { children: /* @__PURE__ */ jsxs8(FormControl3, { isRequired: required, children: [
558
- /* @__PURE__ */ jsx15(FormLabel2, { htmlFor: `${id}-key`, id: `${id}-key-label`, children: keyLabel }),
559
- /* @__PURE__ */ jsx15(
560
- Input2,
561
- {
562
- defaultValue: label,
563
- disabled: disabled || readonly,
564
- id: `${id}-key`,
565
- name: `${id}-key`,
566
- onBlur: !readonly ? handleBlur : void 0,
567
- type: "text",
568
- mb: 1
569
- }
570
- )
571
- ] }) }),
572
- /* @__PURE__ */ jsx15(GridItem3, { children }),
573
- /* @__PURE__ */ jsx15(GridItem3, { children: /* @__PURE__ */ jsx15(
561
+ return /* @__PURE__ */ jsxs11(Grid4, { className: classNames, style, alignItems: "center", gap: 2, children: [
562
+ /* @__PURE__ */ jsx19(GridItem4, { children: /* @__PURE__ */ jsx19(Field, { required, label: keyLabel, children: /* @__PURE__ */ jsx19(
563
+ Input2,
564
+ {
565
+ defaultValue: label,
566
+ disabled: disabled || readonly,
567
+ id: `${id}-key`,
568
+ name: `${id}-key`,
569
+ onBlur: !readonly ? handleBlur : void 0,
570
+ type: "text",
571
+ mb: 1
572
+ }
573
+ ) }) }),
574
+ /* @__PURE__ */ jsx19(GridItem4, { children }),
575
+ /* @__PURE__ */ jsx19(GridItem4, { children: /* @__PURE__ */ jsx19(
574
576
  RemoveButton2,
575
577
  {
578
+ id: buttonId3(id, "remove"),
579
+ className: "rjsf-object-property-remove",
576
580
  disabled: disabled || readonly,
577
581
  onClick: onDropPropertyClick(label),
578
582
  uiSchema,
@@ -601,6 +605,7 @@ function generateTemplates() {
601
605
  FieldErrorTemplate,
602
606
  FieldHelpTemplate,
603
607
  FieldTemplate,
608
+ GridTemplate,
604
609
  ObjectFieldTemplate,
605
610
  TitleFieldTemplate: TitleField,
606
611
  WrapIfAdditionalTemplate
@@ -619,11 +624,11 @@ import {
619
624
  TranslatableString as TranslatableString5
620
625
  } from "@rjsf/utils";
621
626
  import { Box as Box5, Button as Button3 } from "@chakra-ui/react";
622
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
627
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
623
628
  function DateElement(props) {
624
629
  const { SelectWidget: SelectWidget2 } = props.registry.widgets;
625
630
  const value = props.value ? props.value : void 0;
626
- return /* @__PURE__ */ jsx16(
631
+ return /* @__PURE__ */ jsx20(
627
632
  SelectWidget2,
628
633
  {
629
634
  ...props,
@@ -676,15 +681,15 @@ function AltDateWidget(props) {
676
681
  }
677
682
  onChange(void 0);
678
683
  };
679
- return /* @__PURE__ */ jsxs9(Box5, { children: [
680
- /* @__PURE__ */ jsx16(Box5, { display: "flex", flexWrap: "wrap", alignItems: "center", children: getDateElementProps(
684
+ return /* @__PURE__ */ jsxs12(Box5, { children: [
685
+ /* @__PURE__ */ jsx20(Box5, { display: "flex", flexWrap: "wrap", alignItems: "center", children: getDateElementProps(
681
686
  state,
682
687
  showTime,
683
688
  options.yearsRange,
684
689
  options.format
685
690
  ).map((elemProps, i) => {
686
691
  const elemId = id + "_" + elemProps.type;
687
- return /* @__PURE__ */ jsx16(Box5, { mr: "2", mb: "2", children: /* @__PURE__ */ jsx16(
692
+ return /* @__PURE__ */ jsx20(Box5, { mr: "2", mb: "2", children: /* @__PURE__ */ jsx20(
688
693
  DateElement,
689
694
  {
690
695
  ...props,
@@ -702,9 +707,9 @@ function AltDateWidget(props) {
702
707
  }
703
708
  ) }, elemId);
704
709
  }) }),
705
- /* @__PURE__ */ jsxs9(Box5, { display: "flex", children: [
706
- !options.hideNowButton && /* @__PURE__ */ jsx16(Button3, { onClick: (e) => handleNow(e), mr: "2", children: translateString(TranslatableString5.NowLabel) }),
707
- !options.hideClearButton && /* @__PURE__ */ jsx16(Button3, { onClick: (e) => handleClear(e), children: translateString(TranslatableString5.ClearLabel) })
710
+ /* @__PURE__ */ jsxs12(Box5, { display: "flex", children: [
711
+ !options.hideNowButton && /* @__PURE__ */ jsx20(Button3, { onClick: (e) => handleNow(e), mr: "2", children: translateString(TranslatableString5.NowLabel) }),
712
+ !options.hideClearButton && /* @__PURE__ */ jsx20(Button3, { onClick: (e) => handleClear(e), children: translateString(TranslatableString5.ClearLabel) })
708
713
  ] })
709
714
  ] });
710
715
  }
@@ -720,10 +725,10 @@ AltDateWidget.defaultProps = {
720
725
  var AltDateWidget_default = AltDateWidget;
721
726
 
722
727
  // src/AltDateTimeWidget/AltDateTimeWidget.tsx
723
- import { jsx as jsx17 } from "react/jsx-runtime";
728
+ import { jsx as jsx21 } from "react/jsx-runtime";
724
729
  function AltDateTimeWidget(props) {
725
730
  const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
726
- return /* @__PURE__ */ jsx17(AltDateWidget2, { ...props, showTime: true });
731
+ return /* @__PURE__ */ jsx21(AltDateWidget2, { ...props, showTime: true });
727
732
  }
728
733
  AltDateTimeWidget.defaultProps = {
729
734
  ...AltDateWidget_default.defaultProps,
@@ -732,15 +737,30 @@ AltDateTimeWidget.defaultProps = {
732
737
  var AltDateTimeWidget_default = AltDateTimeWidget;
733
738
 
734
739
  // src/CheckboxWidget/CheckboxWidget.tsx
735
- import { Checkbox, FormControl as FormControl4, Text as Text3 } from "@chakra-ui/react";
740
+ import { Text as Text4 } from "@chakra-ui/react";
736
741
  import {
737
742
  ariaDescribedByIds as ariaDescribedByIds3,
738
743
  descriptionId as descriptionId2,
739
- getTemplate as getTemplate4,
744
+ getTemplate as getTemplate5,
740
745
  labelValue as labelValue2,
741
746
  schemaRequiresTrueValue
742
747
  } from "@rjsf/utils";
743
- import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
748
+
749
+ // src/components/ui/checkbox.tsx
750
+ import { forwardRef as forwardRef4 } from "react";
751
+ import { Checkbox as ChakraCheckbox } from "@chakra-ui/react";
752
+ import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
753
+ var Checkbox = forwardRef4(function Checkbox2(props, ref) {
754
+ const { icon, children, inputProps, rootRef, ...rest } = props;
755
+ return /* @__PURE__ */ jsxs13(ChakraCheckbox.Root, { ref: rootRef, ...rest, children: [
756
+ /* @__PURE__ */ jsx22(ChakraCheckbox.HiddenInput, { ref, ...inputProps }),
757
+ /* @__PURE__ */ jsx22(ChakraCheckbox.Control, { children: icon || /* @__PURE__ */ jsx22(ChakraCheckbox.Indicator, {}) }),
758
+ children != null && /* @__PURE__ */ jsx22(ChakraCheckbox.Label, { children })
759
+ ] });
760
+ });
761
+
762
+ // src/CheckboxWidget/CheckboxWidget.tsx
763
+ import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
744
764
  function CheckboxWidget(props) {
745
765
  const {
746
766
  id,
@@ -757,19 +777,18 @@ function CheckboxWidget(props) {
757
777
  uiSchema,
758
778
  schema
759
779
  } = props;
760
- const chakraProps = getChakra({ uiSchema });
761
780
  const required = schemaRequiresTrueValue(schema);
762
- const DescriptionFieldTemplate = getTemplate4(
781
+ const DescriptionFieldTemplate = getTemplate5(
763
782
  "DescriptionFieldTemplate",
764
783
  registry,
765
784
  options
766
785
  );
767
786
  const description = options.description || schema.description;
768
- const _onChange = ({ target: { checked } }) => onChange(checked);
787
+ const _onChange = ({ checked }) => onChange(checked);
769
788
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
770
789
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
771
- return /* @__PURE__ */ jsxs10(FormControl4, { mb: 1, ...chakraProps, isRequired: required, children: [
772
- !hideLabel && !!description && /* @__PURE__ */ jsx18(
790
+ return /* @__PURE__ */ jsxs14(Field, { mb: 1, required, children: [
791
+ !hideLabel && description && /* @__PURE__ */ jsx23(
773
792
  DescriptionFieldTemplate,
774
793
  {
775
794
  id: descriptionId2(id),
@@ -779,34 +798,33 @@ function CheckboxWidget(props) {
779
798
  registry
780
799
  }
781
800
  ),
782
- /* @__PURE__ */ jsx18(
801
+ /* @__PURE__ */ jsx23(
783
802
  Checkbox,
784
803
  {
785
804
  id,
786
805
  name: id,
787
- isChecked: typeof value === "undefined" ? false : value,
788
- isDisabled: disabled || readonly,
789
- onChange: _onChange,
806
+ checked: typeof value === "undefined" ? false : value,
807
+ disabled: disabled || readonly,
808
+ onCheckedChange: _onChange,
790
809
  onBlur: _onBlur,
791
810
  onFocus: _onFocus,
792
811
  "aria-describedby": ariaDescribedByIds3(id),
793
- children: labelValue2(/* @__PURE__ */ jsx18(Text3, { children: label }), hideLabel || !label)
812
+ children: labelValue2(/* @__PURE__ */ jsx23(Text4, { children: label }), hideLabel || !label)
794
813
  }
795
814
  )
796
815
  ] });
797
816
  }
798
817
 
799
818
  // src/CheckboxesWidget/CheckboxesWidget.tsx
800
- import { CheckboxGroup, Checkbox as Checkbox2, FormLabel as FormLabel3, FormControl as FormControl5, Text as Text4, Stack } from "@chakra-ui/react";
819
+ import { CheckboxGroup, FieldsetRoot, Stack, Text as Text5 } from "@chakra-ui/react";
801
820
  import {
802
821
  ariaDescribedByIds as ariaDescribedByIds4,
803
822
  enumOptionsIndexForValue,
804
- enumOptionsIsSelected,
805
823
  enumOptionsValueForIndex,
806
824
  labelValue as labelValue3,
807
825
  optionId
808
826
  } from "@rjsf/utils";
809
- import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
827
+ import { jsx as jsx24 } from "react/jsx-runtime";
810
828
  function CheckboxesWidget(props) {
811
829
  const {
812
830
  id,
@@ -820,63 +838,44 @@ function CheckboxesWidget(props) {
820
838
  required,
821
839
  label,
822
840
  hideLabel,
823
- uiSchema,
824
841
  rawErrors = []
825
842
  } = props;
826
843
  const { enumOptions, enumDisabled, emptyValue } = options;
827
- const chakraProps = getChakra({ uiSchema });
828
- const checkboxesValues = Array.isArray(value) ? value : [value];
829
844
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
830
845
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
831
846
  const row = options ? options.inline : false;
832
847
  const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, true);
833
- return /* @__PURE__ */ jsxs11(
834
- FormControl5,
848
+ return /* @__PURE__ */ jsx24(FieldsetRoot, { mb: 1, disabled: disabled || readonly, invalid: rawErrors && rawErrors.length > 0, children: /* @__PURE__ */ jsx24(
849
+ CheckboxGroup,
835
850
  {
836
- mb: 1,
837
- ...chakraProps,
838
- isDisabled: disabled || readonly,
839
- isRequired: required,
840
- isReadOnly: readonly,
841
- isInvalid: rawErrors && rawErrors.length > 0,
842
- children: [
843
- labelValue3(
844
- /* @__PURE__ */ jsx19(FormLabel3, { htmlFor: id, id: `${id}-label`, children: label }),
845
- hideLabel || !label
846
- ),
847
- /* @__PURE__ */ jsx19(
848
- CheckboxGroup,
851
+ onValueChange: (option) => onChange(enumOptionsValueForIndex(option, enumOptions, emptyValue)),
852
+ value: selectedIndexes,
853
+ "aria-describedby": ariaDescribedByIds4(id),
854
+ readOnly: readonly,
855
+ required,
856
+ label: labelValue3(label, hideLabel || !label),
857
+ children: /* @__PURE__ */ jsx24(Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
858
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
859
+ return /* @__PURE__ */ jsx24(
860
+ Checkbox,
849
861
  {
850
- onChange: (option) => onChange(enumOptionsValueForIndex(option, enumOptions, emptyValue)),
851
- defaultValue: selectedIndexes,
852
- "aria-describedby": ariaDescribedByIds4(id),
853
- children: /* @__PURE__ */ jsx19(Stack, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
854
- const checked = enumOptionsIsSelected(option.value, checkboxesValues);
855
- const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
856
- return /* @__PURE__ */ jsx19(
857
- Checkbox2,
858
- {
859
- id: optionId(id, index),
860
- name: id,
861
- value: String(index),
862
- isChecked: checked,
863
- isDisabled: disabled || itemDisabled || readonly,
864
- onBlur: _onBlur,
865
- onFocus: _onFocus,
866
- children: option.label && /* @__PURE__ */ jsx19(Text4, { children: option.label })
867
- },
868
- index
869
- );
870
- }) })
871
- }
872
- )
873
- ]
862
+ id: optionId(id, index),
863
+ name: id,
864
+ value: String(index),
865
+ disabled: disabled || itemDisabled || readonly,
866
+ onBlur: _onBlur,
867
+ onFocus: _onFocus,
868
+ children: option.label && /* @__PURE__ */ jsx24(Text5, { children: option.label })
869
+ },
870
+ index
871
+ );
872
+ }) })
874
873
  }
875
- );
874
+ ) });
876
875
  }
877
876
 
878
877
  // src/RadioWidget/RadioWidget.tsx
879
- import { FormControl as FormControl6, FormLabel as FormLabel4, Radio, RadioGroup, Stack as Stack2 } from "@chakra-ui/react";
878
+ import { Stack as Stack2 } from "@chakra-ui/react";
880
879
  import {
881
880
  ariaDescribedByIds as ariaDescribedByIds5,
882
881
  enumOptionsIndexForValue as enumOptionsIndexForValue2,
@@ -884,7 +883,23 @@ import {
884
883
  labelValue as labelValue4,
885
884
  optionId as optionId2
886
885
  } from "@rjsf/utils";
887
- import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
886
+
887
+ // src/components/ui/radio.tsx
888
+ import { forwardRef as forwardRef5 } from "react";
889
+ import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
890
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
891
+ var Radio = forwardRef5(function Radio2(props, ref) {
892
+ const { children, inputProps, rootRef, ...rest } = props;
893
+ return /* @__PURE__ */ jsxs15(ChakraRadioGroup.Item, { ref: rootRef, ...rest, children: [
894
+ /* @__PURE__ */ jsx25(ChakraRadioGroup.ItemHiddenInput, { ref, ...inputProps }),
895
+ /* @__PURE__ */ jsx25(ChakraRadioGroup.ItemIndicator, {}),
896
+ children && /* @__PURE__ */ jsx25(ChakraRadioGroup.ItemText, { children })
897
+ ] });
898
+ });
899
+ var RadioGroup = ChakraRadioGroup.Root;
900
+
901
+ // src/RadioWidget/RadioWidget.tsx
902
+ import { jsx as jsx26 } from "react/jsx-runtime";
888
903
  function RadioWidget({
889
904
  id,
890
905
  options,
@@ -896,56 +911,101 @@ function RadioWidget({
896
911
  hideLabel,
897
912
  onChange,
898
913
  onBlur,
899
- onFocus,
900
- uiSchema
914
+ onFocus
901
915
  }) {
902
916
  const { enumOptions, enumDisabled, emptyValue } = options;
903
- const chakraProps = getChakra({ uiSchema });
904
- const _onChange = (nextValue) => onChange(enumOptionsValueForIndex2(nextValue, enumOptions, emptyValue));
917
+ const _onChange = ({ target: { value: value2 } }) => onChange(enumOptionsValueForIndex2(value2, enumOptions, emptyValue));
905
918
  const _onBlur = ({ target: { value: value2 } }) => onBlur(id, enumOptionsValueForIndex2(value2, enumOptions, emptyValue));
906
919
  const _onFocus = ({ target: { value: value2 } }) => onFocus(id, enumOptionsValueForIndex2(value2, enumOptions, emptyValue));
907
920
  const row = options ? options.inline : false;
908
921
  const selectedIndex = enumOptionsIndexForValue2(value, enumOptions) ?? null;
909
- return /* @__PURE__ */ jsxs12(FormControl6, { mb: 1, ...chakraProps, isDisabled: disabled || readonly, isRequired: required, isReadOnly: readonly, children: [
910
- labelValue4(
911
- /* @__PURE__ */ jsx20(FormLabel4, { htmlFor: id, id: `${id}-label`, children: label }),
912
- hideLabel || !label
913
- ),
914
- /* @__PURE__ */ jsx20(
915
- RadioGroup,
916
- {
917
- onChange: _onChange,
918
- onBlur: _onBlur,
919
- onFocus: _onFocus,
920
- value: selectedIndex,
921
- name: id,
922
- "aria-describedby": ariaDescribedByIds5(id),
923
- children: /* @__PURE__ */ jsx20(Stack2, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
924
- const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
925
- return /* @__PURE__ */ jsx20(
926
- Radio,
927
- {
928
- value: String(index),
929
- id: optionId2(id, index),
930
- disabled: disabled || itemDisabled || readonly,
931
- children: option.label
932
- },
933
- index
934
- );
935
- }) })
936
- }
937
- )
938
- ] });
922
+ return /* @__PURE__ */ jsx26(
923
+ Field,
924
+ {
925
+ mb: 1,
926
+ disabled: disabled || readonly,
927
+ required,
928
+ readOnly: readonly,
929
+ label: labelValue4(label, hideLabel || !label),
930
+ children: /* @__PURE__ */ jsx26(
931
+ RadioGroup,
932
+ {
933
+ onChange: _onChange,
934
+ onBlur: _onBlur,
935
+ onFocus: _onFocus,
936
+ value: selectedIndex,
937
+ name: id,
938
+ "aria-describedby": ariaDescribedByIds5(id),
939
+ children: /* @__PURE__ */ jsx26(Stack2, { direction: row ? "row" : "column", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
940
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
941
+ return /* @__PURE__ */ jsx26(
942
+ Radio,
943
+ {
944
+ value: String(index),
945
+ id: optionId2(id, index),
946
+ disabled: disabled || itemDisabled || readonly,
947
+ children: option.label
948
+ },
949
+ index
950
+ );
951
+ }) })
952
+ }
953
+ )
954
+ }
955
+ );
939
956
  }
940
957
 
941
958
  // src/RangeWidget/RangeWidget.tsx
942
- import { FormControl as FormControl7, FormLabel as FormLabel5, Slider, SliderFilledTrack, SliderThumb, SliderTrack } from "@chakra-ui/react";
943
959
  import {
944
960
  ariaDescribedByIds as ariaDescribedByIds6,
945
961
  labelValue as labelValue5,
946
962
  rangeSpec
947
963
  } from "@rjsf/utils";
948
- import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
964
+
965
+ // src/components/ui/slider.tsx
966
+ import { forwardRef as forwardRef6 } from "react";
967
+ import { Slider as ChakraSlider, HStack as HStack2 } from "@chakra-ui/react";
968
+ import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
969
+ var Slider = forwardRef6(function Slider2(props, ref) {
970
+ const { marks: marksProp, showValue, ...rest } = props;
971
+ const value = props.defaultValue ?? props.value;
972
+ const marks = marksProp?.map((mark) => {
973
+ if (typeof mark === "number") {
974
+ return { value: mark, label: void 0 };
975
+ }
976
+ return mark;
977
+ });
978
+ const hasMarkLabel = !!marks?.some((mark) => mark.label);
979
+ return /* @__PURE__ */ jsxs16(ChakraSlider.Root, { ref, width: "200px", thumbAlignment: "center", ...rest, children: [
980
+ showValue && /* @__PURE__ */ jsx27(HStack2, { justify: "space-between", children: /* @__PURE__ */ jsx27(ChakraSlider.ValueText, {}) }),
981
+ /* @__PURE__ */ jsxs16(ChakraSlider.Control, { "data-has-mark-label": hasMarkLabel || void 0, children: [
982
+ /* @__PURE__ */ jsx27(ChakraSlider.Track, { children: /* @__PURE__ */ jsx27(ChakraSlider.Range, {}) }),
983
+ /* @__PURE__ */ jsx27(SliderThumbs, { value }),
984
+ /* @__PURE__ */ jsx27(SliderMarks, { marks })
985
+ ] })
986
+ ] });
987
+ });
988
+ function SliderThumbs(props) {
989
+ const { value } = props;
990
+ return /* @__PURE__ */ jsx27(Fragment2, { children: value?.map((_, index) => /* @__PURE__ */ jsx27(ChakraSlider.Thumb, { index, children: /* @__PURE__ */ jsx27(ChakraSlider.HiddenInput, {}) }, index)) });
991
+ }
992
+ var SliderMarks = forwardRef6(function SliderMarks2(props, ref) {
993
+ const { marks } = props;
994
+ if (!marks?.length) {
995
+ return null;
996
+ }
997
+ return /* @__PURE__ */ jsx27(ChakraSlider.MarkerGroup, { ref, children: marks.map((mark, index) => {
998
+ const value = typeof mark === "number" ? mark : mark.value;
999
+ const label = typeof mark === "number" ? void 0 : mark.label;
1000
+ return /* @__PURE__ */ jsxs16(ChakraSlider.Marker, { value, children: [
1001
+ /* @__PURE__ */ jsx27(ChakraSlider.MarkerIndicator, {}),
1002
+ label
1003
+ ] }, index);
1004
+ }) });
1005
+ });
1006
+
1007
+ // src/RangeWidget/RangeWidget.tsx
1008
+ import { jsx as jsx28 } from "react/jsx-runtime";
949
1009
  function RangeWidget({
950
1010
  value,
951
1011
  readonly,
@@ -954,50 +1014,104 @@ function RangeWidget({
954
1014
  onFocus,
955
1015
  options,
956
1016
  schema,
957
- uiSchema,
958
1017
  onChange,
959
1018
  label,
960
1019
  hideLabel,
961
1020
  id
962
1021
  }) {
963
- const chakraProps = getChakra({ uiSchema });
964
- const sliderWidgetProps = { value, label, id, ...rangeSpec(schema) };
965
- const _onChange = (value2) => onChange(value2 === void 0 ? options.emptyValue : value2);
1022
+ const _onChange = ({ value: value2 }) => onChange(value2 === void 0 ? options.emptyValue : value2[0]);
966
1023
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
967
1024
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
968
- return /* @__PURE__ */ jsxs13(FormControl7, { mb: 1, ...chakraProps, children: [
969
- labelValue5(/* @__PURE__ */ jsx21(FormLabel5, { htmlFor: id, children: label }), hideLabel || !label),
970
- /* @__PURE__ */ jsxs13(
971
- Slider,
972
- {
973
- ...sliderWidgetProps,
974
- id,
975
- name: id,
976
- isDisabled: disabled || readonly,
977
- onChange: _onChange,
978
- onBlur: _onBlur,
979
- onFocus: _onFocus,
980
- "aria-describedby": ariaDescribedByIds6(id),
981
- children: [
982
- /* @__PURE__ */ jsx21(SliderTrack, { children: /* @__PURE__ */ jsx21(SliderFilledTrack, {}) }),
983
- /* @__PURE__ */ jsx21(SliderThumb, {})
984
- ]
985
- }
986
- )
987
- ] });
1025
+ return /* @__PURE__ */ jsx28(Field, { mb: 1, label: labelValue5(label, hideLabel || !label), children: /* @__PURE__ */ jsx28(
1026
+ Slider,
1027
+ {
1028
+ ...rangeSpec(schema),
1029
+ id,
1030
+ name: id,
1031
+ disabled: disabled || readonly,
1032
+ value: [value],
1033
+ onValueChange: _onChange,
1034
+ onBlur: _onBlur,
1035
+ onFocus: _onFocus,
1036
+ "aria-describedby": ariaDescribedByIds6(id)
1037
+ }
1038
+ ) });
988
1039
  }
989
1040
 
990
1041
  // src/SelectWidget/SelectWidget.tsx
991
- import { useMemo as useMemo2 } from "react";
992
- import { FormControl as FormControl8, FormLabel as FormLabel6 } from "@chakra-ui/react";
1042
+ import { useMemo, useRef } from "react";
993
1043
  import {
994
1044
  ariaDescribedByIds as ariaDescribedByIds7,
995
1045
  enumOptionsIndexForValue as enumOptionsIndexForValue3,
996
1046
  enumOptionsValueForIndex as enumOptionsValueForIndex3,
997
1047
  labelValue as labelValue6
998
1048
  } from "@rjsf/utils";
999
- import { Select } from "chakra-react-select";
1000
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
1049
+ import { createListCollection, Select as ChakraSelect2 } from "@chakra-ui/react";
1050
+
1051
+ // src/components/ui/select.tsx
1052
+ import { forwardRef as forwardRef7 } from "react";
1053
+ import { Select as ChakraSelect, Portal } from "@chakra-ui/react";
1054
+ import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1055
+ var SelectTrigger = forwardRef7(function SelectTrigger2(props, ref) {
1056
+ const { children, clearable, ...rest } = props;
1057
+ return /* @__PURE__ */ jsxs17(ChakraSelect.Control, { ...rest, children: [
1058
+ /* @__PURE__ */ jsx29(ChakraSelect.Trigger, { ref, children }),
1059
+ /* @__PURE__ */ jsxs17(ChakraSelect.IndicatorGroup, { children: [
1060
+ clearable && /* @__PURE__ */ jsx29(SelectClearTrigger, {}),
1061
+ /* @__PURE__ */ jsx29(ChakraSelect.Indicator, {})
1062
+ ] })
1063
+ ] });
1064
+ });
1065
+ var SelectClearTrigger = forwardRef7(
1066
+ function SelectClearTrigger2(props, ref) {
1067
+ return /* @__PURE__ */ jsx29(ChakraSelect.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx29(CloseButton, { size: "xs", variant: "plain", focusVisibleRing: "inside", focusRingWidth: "2px", pointerEvents: "auto" }) });
1068
+ }
1069
+ );
1070
+ var SelectContent = forwardRef7(function SelectContent2(props, ref) {
1071
+ const { portalled = true, portalRef, ...rest } = props;
1072
+ return /* @__PURE__ */ jsx29(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx29(ChakraSelect.Positioner, { children: /* @__PURE__ */ jsx29(ChakraSelect.Content, { ...rest, ref }) }) });
1073
+ });
1074
+ var SelectItem = forwardRef7(function SelectItem2(props, ref) {
1075
+ const { item, children, ...rest } = props;
1076
+ return /* @__PURE__ */ jsxs17(ChakraSelect.Item, { item, ...rest, ref, children: [
1077
+ children,
1078
+ /* @__PURE__ */ jsx29(ChakraSelect.ItemIndicator, {})
1079
+ ] }, item.value);
1080
+ });
1081
+ var SelectValueText = forwardRef7(function SelectValueText2(props, ref) {
1082
+ const { children, ...rest } = props;
1083
+ return /* @__PURE__ */ jsx29(ChakraSelect.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx29(ChakraSelect.Context, { children: (select) => {
1084
+ const items = select.selectedItems;
1085
+ if (items.length === 0) {
1086
+ return props.placeholder;
1087
+ }
1088
+ if (children) {
1089
+ return children(items);
1090
+ }
1091
+ if (items.length === 1) {
1092
+ return select.collection.stringifyItem(items[0]);
1093
+ }
1094
+ return `${items.length} selected`;
1095
+ } }) });
1096
+ });
1097
+ var SelectRoot = forwardRef7(function SelectRoot2(props, ref) {
1098
+ return /* @__PURE__ */ jsx29(ChakraSelect.Root, { ...props, ref, positioning: { sameWidth: true, ...props.positioning }, children: props.asChild ? props.children : /* @__PURE__ */ jsxs17(Fragment3, { children: [
1099
+ /* @__PURE__ */ jsx29(ChakraSelect.HiddenSelect, {}),
1100
+ props.children
1101
+ ] }) });
1102
+ });
1103
+ var SelectItemGroup = forwardRef7(function SelectItemGroup2(props, ref) {
1104
+ const { children, label, ...rest } = props;
1105
+ return /* @__PURE__ */ jsxs17(ChakraSelect.ItemGroup, { ...rest, ref, children: [
1106
+ /* @__PURE__ */ jsx29(ChakraSelect.ItemGroupLabel, { children: label }),
1107
+ children
1108
+ ] });
1109
+ });
1110
+ var SelectLabel = ChakraSelect.Label;
1111
+ var SelectItemText = ChakraSelect.ItemText;
1112
+
1113
+ // src/SelectWidget/SelectWidget.tsx
1114
+ import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1001
1115
  function SelectWidget(props) {
1002
1116
  const {
1003
1117
  id,
@@ -1015,29 +1129,27 @@ function SelectWidget(props) {
1015
1129
  onBlur,
1016
1130
  onFocus,
1017
1131
  rawErrors = [],
1018
- uiSchema,
1019
1132
  schema
1020
1133
  } = props;
1021
1134
  const { enumOptions, enumDisabled, emptyValue } = options;
1022
- const chakraProps = getChakra({ uiSchema });
1023
- const _onMultiChange = (e) => {
1135
+ const _onMultiChange = ({ value: value2 }) => {
1024
1136
  return onChange(
1025
1137
  enumOptionsValueForIndex3(
1026
- e.map((v) => {
1027
- return v.value;
1138
+ value2.map((item) => {
1139
+ return item;
1028
1140
  }),
1029
1141
  enumOptions,
1030
1142
  emptyValue
1031
1143
  )
1032
1144
  );
1033
1145
  };
1034
- const _onChange = (e) => {
1035
- return onChange(enumOptionsValueForIndex3(e.value, enumOptions, emptyValue));
1146
+ const _onChange = ({ value: value2 }) => {
1147
+ return onChange(enumOptionsValueForIndex3(value2, enumOptions, emptyValue));
1036
1148
  };
1037
1149
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex3(target && target.value, enumOptions, emptyValue));
1038
1150
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex3(target && target.value, enumOptions, emptyValue));
1039
1151
  const showPlaceholderOption = !multiple && schema.default === void 0;
1040
- const { valueLabelMap, displayEnumOptions } = useMemo2(() => {
1152
+ const { valueLabelMap, displayEnumOptions } = useMemo(() => {
1041
1153
  const valueLabelMap2 = {};
1042
1154
  let displayEnumOptions2 = [];
1043
1155
  if (Array.isArray(enumOptions)) {
@@ -1047,7 +1159,7 @@ function SelectWidget(props) {
1047
1159
  return {
1048
1160
  label: label2,
1049
1161
  value: String(index),
1050
- isDisabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1162
+ disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1051
1163
  };
1052
1164
  });
1053
1165
  if (showPlaceholderOption) {
@@ -1058,58 +1170,164 @@ function SelectWidget(props) {
1058
1170
  }, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
1059
1171
  const isMultiple = typeof multiple !== "undefined" && multiple !== false && Boolean(enumOptions);
1060
1172
  const selectedIndex = enumOptionsIndexForValue3(value, enumOptions, isMultiple);
1061
- const formValue = isMultiple ? (selectedIndex || []).map((i) => {
1173
+ const getMultiValue = () => (selectedIndex || []).map((i) => {
1062
1174
  return {
1063
1175
  label: valueLabelMap[i],
1064
- value: i
1176
+ value: i.toString()
1065
1177
  };
1066
- }) : {
1067
- label: valueLabelMap[selectedIndex] || "",
1068
- selectedIndex
1178
+ });
1179
+ const getSingleValue = () => typeof selectedIndex !== "undefined" ? [
1180
+ {
1181
+ label: valueLabelMap[selectedIndex] || "",
1182
+ value: selectedIndex.toString()
1183
+ }
1184
+ ] : [];
1185
+ const formValue = (isMultiple ? getMultiValue() : getSingleValue()).map((item) => item.value);
1186
+ const selectOptions = createListCollection({
1187
+ items: displayEnumOptions.filter((item) => item.value)
1188
+ });
1189
+ const containerRef = useRef(null);
1190
+ return /* @__PURE__ */ jsx30(
1191
+ Field,
1192
+ {
1193
+ ref: containerRef,
1194
+ mb: 1,
1195
+ disabled: disabled || readonly,
1196
+ required,
1197
+ readOnly: readonly,
1198
+ invalid: rawErrors && rawErrors.length > 0,
1199
+ label: labelValue6(label, hideLabel || !label),
1200
+ position: "relative",
1201
+ children: /* @__PURE__ */ jsxs18(
1202
+ SelectRoot,
1203
+ {
1204
+ collection: selectOptions,
1205
+ id,
1206
+ name: id,
1207
+ multiple: isMultiple,
1208
+ closeOnSelect: !isMultiple,
1209
+ onBlur: _onBlur,
1210
+ onValueChange: isMultiple ? _onMultiChange : _onChange,
1211
+ onFocus: _onFocus,
1212
+ autoFocus: autofocus,
1213
+ value: formValue,
1214
+ "aria-describedby": ariaDescribedByIds7(id),
1215
+ positioning: { placement: "bottom" },
1216
+ children: [
1217
+ /* @__PURE__ */ jsx30(ChakraSelect2.Control, { children: /* @__PURE__ */ jsx30(SelectTrigger, { children: /* @__PURE__ */ jsx30(SelectValueText, { placeholder }) }) }),
1218
+ /* @__PURE__ */ jsx30(ChakraSelect2.Positioner, { minWidth: "100% !important", zIndex: "2 !important", top: "calc(100% + 5px) !important", children: /* @__PURE__ */ jsx30(ChakraSelect2.Content, { children: selectOptions.items.map((item) => /* @__PURE__ */ jsxs18(ChakraSelect2.Item, { item, children: [
1219
+ item.label,
1220
+ /* @__PURE__ */ jsx30(ChakraSelect2.ItemIndicator, {})
1221
+ ] }, item.value)) }) })
1222
+ ]
1223
+ }
1224
+ )
1225
+ }
1226
+ );
1227
+ }
1228
+
1229
+ // src/SelectNativeWidget/NativeSelectWidget.tsx
1230
+ import { useMemo as useMemo2 } from "react";
1231
+ import {
1232
+ ariaDescribedByIds as ariaDescribedByIds8,
1233
+ enumOptionsIndexForValue as enumOptionsIndexForValue4,
1234
+ enumOptionsValueForIndex as enumOptionsValueForIndex4,
1235
+ labelValue as labelValue7
1236
+ } from "@rjsf/utils";
1237
+ import { createListCollection as createListCollection2, NativeSelect as ChakraSelect3 } from "@chakra-ui/react";
1238
+ import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
1239
+ function NativeSelectWidget(props) {
1240
+ const {
1241
+ id,
1242
+ options,
1243
+ label,
1244
+ hideLabel,
1245
+ placeholder,
1246
+ multiple,
1247
+ required,
1248
+ disabled,
1249
+ readonly,
1250
+ value,
1251
+ autofocus,
1252
+ onChange,
1253
+ onBlur,
1254
+ onFocus,
1255
+ rawErrors = [],
1256
+ schema
1257
+ } = props;
1258
+ const { enumOptions, enumDisabled, emptyValue } = options;
1259
+ const _onChange = ({ target }) => {
1260
+ return onChange(enumOptionsValueForIndex4(target && target.value, enumOptions, emptyValue));
1069
1261
  };
1070
- return /* @__PURE__ */ jsxs14(
1071
- FormControl8,
1262
+ const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex4(target && target.value, enumOptions, emptyValue));
1263
+ const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex4(target && target.value, enumOptions, emptyValue));
1264
+ const showPlaceholderOption = !multiple && schema.default === void 0;
1265
+ const { valueLabelMap, displayEnumOptions } = useMemo2(() => {
1266
+ const valueLabelMap2 = {};
1267
+ let displayEnumOptions2 = [];
1268
+ if (Array.isArray(enumOptions)) {
1269
+ displayEnumOptions2 = enumOptions.map((option, index) => {
1270
+ const { value: value2, label: label2 } = option;
1271
+ valueLabelMap2[index] = label2 || String(value2);
1272
+ return {
1273
+ label: label2,
1274
+ value: String(index),
1275
+ disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1276
+ };
1277
+ });
1278
+ if (showPlaceholderOption) {
1279
+ displayEnumOptions2.unshift({ value: "", label: placeholder || "" });
1280
+ }
1281
+ }
1282
+ return { valueLabelMap: valueLabelMap2, displayEnumOptions: displayEnumOptions2 };
1283
+ }, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
1284
+ const selectedIndex = enumOptionsIndexForValue4(value, enumOptions, false);
1285
+ const getSingleValue = () => typeof selectedIndex !== "undefined" ? [
1286
+ {
1287
+ label: valueLabelMap[selectedIndex] || "",
1288
+ value: selectedIndex.toString()
1289
+ }
1290
+ ] : [];
1291
+ const formValue = getSingleValue()[0]?.value || "";
1292
+ const selectOptions = createListCollection2({
1293
+ items: displayEnumOptions.filter((item) => item.value)
1294
+ });
1295
+ return /* @__PURE__ */ jsx31(
1296
+ Field,
1072
1297
  {
1073
1298
  mb: 1,
1074
- ...chakraProps,
1075
- isDisabled: disabled || readonly,
1076
- isRequired: required,
1077
- isReadOnly: readonly,
1078
- isInvalid: rawErrors && rawErrors.length > 0,
1079
- children: [
1080
- labelValue6(
1081
- /* @__PURE__ */ jsx22(FormLabel6, { htmlFor: id, id: `${id}-label`, children: label }),
1082
- hideLabel || !label
1083
- ),
1084
- /* @__PURE__ */ jsx22(
1085
- Select,
1299
+ disabled: disabled || readonly,
1300
+ required,
1301
+ readOnly: readonly,
1302
+ invalid: rawErrors && rawErrors.length > 0,
1303
+ label: labelValue7(label, hideLabel || !label),
1304
+ children: /* @__PURE__ */ jsxs19(ChakraSelect3.Root, { children: [
1305
+ /* @__PURE__ */ jsx31(
1306
+ ChakraSelect3.Field,
1086
1307
  {
1087
- inputId: id,
1088
- name: id,
1089
- isMulti: isMultiple,
1090
- options: displayEnumOptions,
1091
- placeholder,
1092
- closeMenuOnSelect: !isMultiple,
1308
+ id,
1093
1309
  onBlur: _onBlur,
1094
- onChange: isMultiple ? _onMultiChange : _onChange,
1310
+ onChange: _onChange,
1095
1311
  onFocus: _onFocus,
1096
1312
  autoFocus: autofocus,
1097
1313
  value: formValue,
1098
- "aria-describedby": ariaDescribedByIds7(id)
1314
+ "aria-describedby": ariaDescribedByIds8(id),
1315
+ children: selectOptions.items.map((item) => /* @__PURE__ */ jsx31("option", { value: item.value, children: item.label }, item.value))
1099
1316
  }
1100
- )
1101
- ]
1317
+ ),
1318
+ /* @__PURE__ */ jsx31(ChakraSelect3.Indicator, {})
1319
+ ] })
1102
1320
  }
1103
1321
  );
1104
1322
  }
1105
1323
 
1106
1324
  // src/TextareaWidget/TextareaWidget.tsx
1107
- import { FormControl as FormControl9, FormLabel as FormLabel7, Textarea } from "@chakra-ui/react";
1325
+ import { Textarea } from "@chakra-ui/react";
1108
1326
  import {
1109
- ariaDescribedByIds as ariaDescribedByIds8,
1110
- labelValue as labelValue7
1327
+ ariaDescribedByIds as ariaDescribedByIds9,
1328
+ labelValue as labelValue8
1111
1329
  } from "@rjsf/utils";
1112
- import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
1330
+ import { jsx as jsx32 } from "react/jsx-runtime";
1113
1331
  function TextareaWidget({
1114
1332
  id,
1115
1333
  placeholder,
@@ -1123,95 +1341,94 @@ function TextareaWidget({
1123
1341
  onFocus,
1124
1342
  onChange,
1125
1343
  options,
1126
- uiSchema,
1127
1344
  required,
1128
1345
  rawErrors
1129
1346
  }) {
1130
- const chakraProps = getChakra({ uiSchema });
1131
1347
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
1132
1348
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
1133
1349
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
1134
- return /* @__PURE__ */ jsxs15(
1135
- FormControl9,
1350
+ return /* @__PURE__ */ jsx32(
1351
+ Field,
1136
1352
  {
1137
1353
  mb: 1,
1138
- ...chakraProps,
1139
- isDisabled: disabled || readonly,
1140
- isRequired: required,
1141
- isReadOnly: readonly,
1142
- isInvalid: rawErrors && rawErrors.length > 0,
1143
- children: [
1144
- labelValue7(/* @__PURE__ */ jsx23(FormLabel7, { htmlFor: id, children: label }), hideLabel || !label),
1145
- /* @__PURE__ */ jsx23(
1146
- Textarea,
1147
- {
1148
- id,
1149
- name: id,
1150
- value: value ?? "",
1151
- placeholder,
1152
- autoFocus: autofocus,
1153
- onChange: _onChange,
1154
- onBlur: _onBlur,
1155
- onFocus: _onFocus,
1156
- rows: options.rows,
1157
- "aria-describedby": ariaDescribedByIds8(id)
1158
- }
1159
- )
1160
- ]
1354
+ disabled: disabled || readonly,
1355
+ required,
1356
+ readOnly: readonly,
1357
+ invalid: rawErrors && rawErrors.length > 0,
1358
+ label: labelValue8(label, hideLabel || !label),
1359
+ children: /* @__PURE__ */ jsx32(
1360
+ Textarea,
1361
+ {
1362
+ id,
1363
+ name: id,
1364
+ value: value ?? "",
1365
+ placeholder,
1366
+ autoFocus: autofocus,
1367
+ onChange: _onChange,
1368
+ onBlur: _onBlur,
1369
+ onFocus: _onFocus,
1370
+ rows: options.rows,
1371
+ "aria-describedby": ariaDescribedByIds9(id)
1372
+ }
1373
+ )
1161
1374
  }
1162
1375
  );
1163
1376
  }
1164
1377
 
1165
1378
  // src/UpDownWidget/UpDownWidget.tsx
1166
1379
  import {
1167
- NumberInput,
1168
- NumberDecrementStepper,
1169
- NumberIncrementStepper,
1170
- NumberInputField,
1171
- NumberInputStepper,
1172
- FormControl as FormControl10,
1173
- FormLabel as FormLabel8
1174
- } from "@chakra-ui/react";
1175
- import {
1176
- ariaDescribedByIds as ariaDescribedByIds9,
1177
- labelValue as labelValue8
1380
+ ariaDescribedByIds as ariaDescribedByIds10,
1381
+ labelValue as labelValue9
1178
1382
  } from "@rjsf/utils";
1179
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
1383
+
1384
+ // src/components/ui/number-input.tsx
1385
+ import { forwardRef as forwardRef8, useEffect as useEffect2, useRef as useRef2 } from "react";
1386
+ import { NumberInput as ChakraNumberInput } from "@chakra-ui/react";
1387
+ import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1388
+ var NumberInputRoot = forwardRef8(function NumberInput(props, ref) {
1389
+ const inputRef = useRef2(null);
1390
+ useEffect2(() => {
1391
+ if (inputRef.current) {
1392
+ inputRef.current.value = props.value || "";
1393
+ }
1394
+ }, [props.value]);
1395
+ return /* @__PURE__ */ jsxs20(ChakraNumberInput.Root, { ref, variant: "outline", ...props, children: [
1396
+ /* @__PURE__ */ jsxs20(ChakraNumberInput.Control, { children: [
1397
+ /* @__PURE__ */ jsx33(ChakraNumberInput.IncrementTrigger, {}),
1398
+ /* @__PURE__ */ jsx33(ChakraNumberInput.DecrementTrigger, {})
1399
+ ] }),
1400
+ /* @__PURE__ */ jsx33(ChakraNumberInput.Input, { ref: inputRef })
1401
+ ] });
1402
+ });
1403
+
1404
+ // src/UpDownWidget/UpDownWidget.tsx
1405
+ import { jsx as jsx34 } from "react/jsx-runtime";
1180
1406
  function UpDownWidget(props) {
1181
- const { id, uiSchema, readonly, disabled, label, hideLabel, value, onChange, onBlur, onFocus, rawErrors, required } = props;
1182
- const chakraProps = getChakra({ uiSchema });
1183
- const _onChange = (value2) => onChange(value2);
1407
+ const { id, readonly, disabled, label, hideLabel, value, onChange, onBlur, onFocus, rawErrors, required } = props;
1408
+ const _onChange = ({ value: value2 }) => onChange(value2);
1184
1409
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
1185
1410
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
1186
- return /* @__PURE__ */ jsxs16(
1187
- FormControl10,
1411
+ return /* @__PURE__ */ jsx34(
1412
+ Field,
1188
1413
  {
1189
1414
  mb: 1,
1190
- ...chakraProps,
1191
- isDisabled: disabled || readonly,
1192
- isRequired: required,
1193
- isReadOnly: readonly,
1194
- isInvalid: rawErrors && rawErrors.length > 0,
1195
- children: [
1196
- labelValue8(/* @__PURE__ */ jsx24(FormLabel8, { htmlFor: id, children: label }), hideLabel || !label),
1197
- /* @__PURE__ */ jsxs16(
1198
- NumberInput,
1199
- {
1200
- value: value ?? "",
1201
- onChange: _onChange,
1202
- onBlur: _onBlur,
1203
- onFocus: _onFocus,
1204
- "aria-describedby": ariaDescribedByIds9(id),
1205
- children: [
1206
- /* @__PURE__ */ jsx24(NumberInputField, { id, name: id }),
1207
- /* @__PURE__ */ jsxs16(NumberInputStepper, { children: [
1208
- /* @__PURE__ */ jsx24(NumberIncrementStepper, {}),
1209
- /* @__PURE__ */ jsx24(NumberDecrementStepper, {})
1210
- ] })
1211
- ]
1212
- }
1213
- )
1214
- ]
1415
+ disabled: disabled || readonly,
1416
+ required,
1417
+ readOnly: readonly,
1418
+ invalid: rawErrors && rawErrors.length > 0,
1419
+ label: labelValue9(label, hideLabel || !label),
1420
+ children: /* @__PURE__ */ jsx34(
1421
+ NumberInputRoot,
1422
+ {
1423
+ value,
1424
+ onValueChange: _onChange,
1425
+ onBlur: _onBlur,
1426
+ onFocus: _onFocus,
1427
+ "aria-describedby": ariaDescribedByIds10(id),
1428
+ id,
1429
+ name: id
1430
+ }
1431
+ )
1215
1432
  }
1216
1433
  );
1217
1434
  }
@@ -1226,6 +1443,7 @@ function generateWidgets() {
1226
1443
  RadioWidget,
1227
1444
  RangeWidget,
1228
1445
  SelectWidget,
1446
+ NativeSelectWidget,
1229
1447
  TextareaWidget,
1230
1448
  UpDownWidget
1231
1449
  };
@@ -1251,281 +1469,25 @@ var Form_default = generateForm();
1251
1469
  import { CacheProvider } from "@emotion/react";
1252
1470
  import createCache from "@emotion/cache";
1253
1471
  import weakMemoize from "@emotion/weak-memoize";
1254
- import { ChakraProvider } from "@chakra-ui/react";
1255
-
1256
- // src/CssReset.tsx
1257
- import { Global } from "@emotion/react";
1258
- import { jsx as jsx25 } from "react/jsx-runtime";
1259
- var CSSReset = () => /* @__PURE__ */ jsx25(
1260
- Global,
1261
- {
1262
- styles: `
1263
- html {
1264
- line-height: 1.5;
1265
- -webkit-text-size-adjust: 100%;
1266
- font-family: system-ui, sans-serif;
1267
- -webkit-font-smoothing: antialiased;
1268
- text-rendering: optimizeLegibility;
1269
- -moz-osx-font-smoothing: grayscale;
1270
- touch-action: manipulation;
1271
- }
1272
- body {
1273
- position: relative;
1274
- min-height: 100%;
1275
- font-feature-settings: 'kern';
1276
- }
1277
- *,
1278
- *::before,
1279
- *::after {
1280
- border-width: 0;
1281
- border-style: solid;
1282
- box-sizing: border-box;
1283
- }
1284
- main {
1285
- display: block;
1286
- }
1287
- hr {
1288
- border-top-width: 1px;
1289
- box-sizing: content-box;
1290
- height: 0;
1291
- overflow: visible;
1292
- }
1293
- pre,
1294
- code,
1295
- kbd,
1296
- samp {
1297
- font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1298
- font-size: 1em;
1299
- }
1300
- a {
1301
- background-color: transparent;
1302
- color: inherit;
1303
- text-decoration: inherit;
1304
- }
1305
- abbr[title] {
1306
- border-bottom: none;
1307
- text-decoration: underline;
1308
- -webkit-text-decoration: underline dotted;
1309
- text-decoration: underline dotted;
1310
- }
1311
- b,
1312
- strong {
1313
- font-weight: bold;
1314
- }
1315
- small {
1316
- font-size: 80%;
1317
- }
1318
- sub,
1319
- sup {
1320
- font-size: 75%;
1321
- line-height: 0;
1322
- position: relative;
1323
- vertical-align: baseline;
1324
- }
1325
- sub {
1326
- bottom: -0.25em;
1327
- }
1328
- sup {
1329
- top: -0.5em;
1330
- }
1331
- img {
1332
- border-style: none;
1333
- }
1334
- button,
1335
- input,
1336
- optgroup,
1337
- select,
1338
- textarea {
1339
- font-family: inherit;
1340
- font-size: 100%;
1341
- line-height: 1.15;
1342
- margin: 0;
1343
- }
1344
- button,
1345
- input {
1346
- overflow: visible;
1347
- }
1348
- button,
1349
- select {
1350
- text-transform: none;
1351
- }
1352
- button::-moz-focus-inner,
1353
- [type="button"]::-moz-focus-inner,
1354
- [type="reset"]::-moz-focus-inner,
1355
- [type="submit"]::-moz-focus-inner {
1356
- border-style: none;
1357
- padding: 0;
1358
- }
1359
- fieldset {
1360
- padding: 0.35em 0.75em 0.625em;
1361
- }
1362
- legend {
1363
- box-sizing: border-box;
1364
- color: inherit;
1365
- display: table;
1366
- max-width: 100%;
1367
- padding: 0;
1368
- white-space: normal;
1369
- }
1370
- progress {
1371
- vertical-align: baseline;
1372
- }
1373
- textarea {
1374
- overflow: auto;
1375
- }
1376
- [type="checkbox"],
1377
- [type="radio"] {
1378
- box-sizing: border-box;
1379
- padding: 0;
1380
- }
1381
- [type="number"]::-webkit-inner-spin-button,
1382
- [type="number"]::-webkit-outer-spin-button {
1383
- -webkit-appearance: none !important;
1384
- }
1385
- input[type="number"] {
1386
- -moz-appearance: textfield;
1387
- }
1388
- [type="search"] {
1389
- -webkit-appearance: textfield;
1390
- outline-offset: -2px;
1391
- }
1392
- [type="search"]::-webkit-search-decoration {
1393
- -webkit-appearance: none !important;
1394
- }
1395
- ::-webkit-file-upload-button {
1396
- -webkit-appearance: button;
1397
- font: inherit;
1398
- }
1399
- details {
1400
- display: block;
1401
- }
1402
- summary {
1403
- display: list-item;
1404
- }
1405
- template {
1406
- display: none;
1407
- }
1408
- [hidden] {
1409
- display: none !important;
1410
- }
1411
- body,
1412
- blockquote,
1413
- dl,
1414
- dd,
1415
- h1,
1416
- h2,
1417
- h3,
1418
- h4,
1419
- h5,
1420
- h6,
1421
- hr,
1422
- figure,
1423
- p,
1424
- pre {
1425
- margin: 0;
1426
- }
1427
- button {
1428
- background: transparent;
1429
- padding: 0;
1430
- }
1431
- fieldset {
1432
- margin: 0;
1433
- padding: 0;
1434
- }
1435
- ol,
1436
- ul {
1437
- margin: 0;
1438
- padding: 0;
1439
- }
1440
- textarea {
1441
- resize: vertical;
1442
- }
1443
- button,
1444
- [role="button"] {
1445
- cursor: pointer;
1446
- }
1447
- button::-moz-focus-inner {
1448
- border: 0 !important;
1449
- }
1450
- table {
1451
- border-collapse: collapse;
1452
- }
1453
- h1,
1454
- h2,
1455
- h3,
1456
- h4,
1457
- h5,
1458
- h6 {
1459
- font-size: inherit;
1460
- font-weight: inherit;
1461
- }
1462
- button,
1463
- input,
1464
- optgroup,
1465
- select,
1466
- textarea {
1467
- padding: 0;
1468
- line-height: inherit;
1469
- color: inherit;
1470
- }
1471
- img,
1472
- svg,
1473
- video,
1474
- canvas,
1475
- audio,
1476
- iframe,
1477
- embed,
1478
- object {
1479
- display: block;
1480
- }
1481
- img,
1482
- video {
1483
- max-width: 100%;
1484
- height: auto;
1485
- }
1486
- [data-js-focus-visible] :focus:not([data-focus-visible-added]) {
1487
- outline: none;
1488
- box-shadow: none;
1489
- }
1490
- select::-ms-expand {
1491
- display: none;
1492
- }
1493
- input {
1494
- border-width: revert;
1495
- border-color: revert;
1496
- border-style: revert;
1497
- }
1498
- .array-item > hr {
1499
- margin-top: 16px;
1500
- margin-bottom: 16px;
1501
- }
1502
- `
1503
- }
1504
- );
1505
- var CssReset_default = CSSReset;
1506
-
1507
- // src/ChakraFrameProvider.tsx
1508
- import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
1472
+ import { ChakraProvider, defaultSystem } from "@chakra-ui/react";
1473
+ import { jsx as jsx35 } from "react/jsx-runtime";
1509
1474
  var memoizedCreateCacheWithContainer = weakMemoize((container) => {
1510
1475
  const newCache = createCache({ container, key: "rjsf" });
1511
1476
  return newCache;
1512
1477
  });
1513
1478
  var __createChakraFrameProvider = (props) => ({ document }) => {
1514
- return /* @__PURE__ */ jsx26("div", { style: { margin: 2 }, children: /* @__PURE__ */ jsx26(CacheProvider, { value: memoizedCreateCacheWithContainer(document.head), children: /* @__PURE__ */ jsxs17(ChakraProvider, { resetCSS: false, children: [
1515
- /* @__PURE__ */ jsx26(CssReset_default, {}),
1516
- props.children
1517
- ] }) }) });
1479
+ return /* @__PURE__ */ jsx35("div", { style: { margin: 2 }, children: /* @__PURE__ */ jsx35(CacheProvider, { value: memoizedCreateCacheWithContainer(document.head), children: /* @__PURE__ */ jsx35(ChakraProvider, { value: defaultSystem, children: props.children }) }) });
1518
1480
  };
1519
1481
 
1520
1482
  // src/index.ts
1521
- var src_default = Form_default;
1483
+ var index_default = Form_default;
1522
1484
  export {
1523
1485
  Form_default as Form,
1524
1486
  Templates_default as Templates,
1525
1487
  Theme_default as Theme,
1526
1488
  Widgets_default as Widgets,
1527
1489
  __createChakraFrameProvider,
1528
- src_default as default,
1490
+ index_default as default,
1529
1491
  generateForm,
1530
1492
  generateTemplates,
1531
1493
  generateTheme,