@rjsf/mantine 6.0.0-beta.21 → 6.0.0-beta.22

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 (39) hide show
  1. package/dist/index.cjs +71 -75
  2. package/dist/index.cjs.map +3 -3
  3. package/dist/mantine.esm.js +68 -72
  4. package/dist/mantine.esm.js.map +3 -3
  5. package/dist/mantine.umd.js +20 -23
  6. package/lib/templates/ArrayFieldItemTemplate.d.ts +3 -3
  7. package/lib/templates/ArrayFieldItemTemplate.js +1 -1
  8. package/lib/templates/ArrayFieldItemTemplate.js.map +1 -1
  9. package/lib/templates/ArrayFieldTemplate.d.ts +1 -1
  10. package/lib/templates/ArrayFieldTemplate.js +2 -3
  11. package/lib/templates/ArrayFieldTemplate.js.map +1 -1
  12. package/lib/templates/BaseInputTemplate.js +2 -2
  13. package/lib/templates/BaseInputTemplate.js.map +1 -1
  14. package/lib/templates/ObjectFieldTemplate.js +2 -2
  15. package/lib/templates/ObjectFieldTemplate.js.map +1 -1
  16. package/lib/templates/WrapIfAdditionalTemplate.js +2 -4
  17. package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -1
  18. package/lib/tsconfig.tsbuildinfo +1 -1
  19. package/lib/widgets/CheckboxWidget.js +2 -2
  20. package/lib/widgets/CheckboxWidget.js.map +1 -1
  21. package/lib/widgets/CheckboxesWidget.js +2 -2
  22. package/lib/widgets/CheckboxesWidget.js.map +1 -1
  23. package/lib/widgets/RadioWidget.js +2 -2
  24. package/lib/widgets/RadioWidget.js.map +1 -1
  25. package/lib/widgets/SelectWidget.js +2 -2
  26. package/lib/widgets/SelectWidget.js.map +1 -1
  27. package/lib/widgets/TextareaWidget.js +2 -2
  28. package/lib/widgets/TextareaWidget.js.map +1 -1
  29. package/package.json +7 -7
  30. package/src/templates/ArrayFieldItemTemplate.tsx +3 -3
  31. package/src/templates/ArrayFieldTemplate.tsx +2 -10
  32. package/src/templates/BaseInputTemplate.tsx +3 -2
  33. package/src/templates/ObjectFieldTemplate.tsx +2 -2
  34. package/src/templates/WrapIfAdditionalTemplate.tsx +4 -10
  35. package/src/widgets/CheckboxWidget.tsx +2 -1
  36. package/src/widgets/CheckboxesWidget.tsx +2 -1
  37. package/src/widgets/RadioWidget.tsx +2 -1
  38. package/src/widgets/SelectWidget.tsx +2 -1
  39. package/src/widgets/TextareaWidget.tsx +2 -1
@@ -52,11 +52,6 @@ function ArrayFieldTemplate(props) {
52
52
  registry,
53
53
  uiOptions
54
54
  );
55
- const ArrayFieldItemTemplate2 = getTemplate2(
56
- "ArrayFieldItemTemplate",
57
- registry,
58
- uiOptions
59
- );
60
55
  const ArrayFieldTitleTemplate2 = getTemplate2(
61
56
  "ArrayFieldTitleTemplate",
62
57
  registry,
@@ -91,7 +86,7 @@ function ArrayFieldTemplate(props) {
91
86
  ),
92
87
  /* @__PURE__ */ jsxs2(Box2, { className: "row rjsf-array-item-list", children: [
93
88
  !showOptionalDataControlInTitle ? optionalDataControl : void 0,
94
- items.map(({ key, ...itemProps }) => /* @__PURE__ */ jsx2(ArrayFieldItemTemplate2, { ...itemProps }, key))
89
+ items
95
90
  ] }),
96
91
  canAdd && /* @__PURE__ */ jsx2(Group2, { justify: "flex-end", children: /* @__PURE__ */ jsx2(
97
92
  AddButton2,
@@ -176,6 +171,7 @@ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
176
171
  function BaseInputTemplate(props) {
177
172
  const {
178
173
  id,
174
+ htmlName,
179
175
  type,
180
176
  schema,
181
177
  value,
@@ -221,7 +217,7 @@ function BaseInputTemplate(props) {
221
217
  NumberInput,
222
218
  {
223
219
  id,
224
- name: id,
220
+ name: htmlName || id,
225
221
  label: labelValue(label || void 0, hideLabel, false),
226
222
  required,
227
223
  autoFocus: autofocus,
@@ -243,7 +239,7 @@ function BaseInputTemplate(props) {
243
239
  TextInput,
244
240
  {
245
241
  id,
246
- name: id,
242
+ name: htmlName || id,
247
243
  label: labelValue(label || void 0, hideLabel, false),
248
244
  required,
249
245
  autoFocus: autofocus,
@@ -661,7 +657,7 @@ function ObjectFieldTemplate(props) {
661
657
  disabled,
662
658
  properties,
663
659
  optionalDataControl,
664
- onAddClick,
660
+ onAddProperty,
665
661
  readonly,
666
662
  required,
667
663
  schema,
@@ -725,7 +721,7 @@ function ObjectFieldTemplate(props) {
725
721
  {
726
722
  id: buttonId2(fieldPathId, "add"),
727
723
  disabled: disabled || readonly,
728
- onClick: onAddClick(schema),
724
+ onClick: onAddProperty,
729
725
  className: "rjsf-object-property-expand",
730
726
  uiSchema,
731
727
  registry
@@ -782,7 +778,6 @@ function TitleField(props) {
782
778
  }
783
779
 
784
780
  // src/templates/WrapIfAdditionalTemplate.tsx
785
- import { useCallback as useCallback2 } from "react";
786
781
  import {
787
782
  ADDITIONAL_PROPERTY_FLAG,
788
783
  UI_OPTIONS_KEY,
@@ -802,8 +797,8 @@ function WrapIfAdditionalTemplate(props) {
802
797
  disabled,
803
798
  schema,
804
799
  uiSchema,
805
- onKeyChange,
806
- onDropPropertyClick,
800
+ onKeyRenameBlur,
801
+ onRemoveProperty,
807
802
  registry,
808
803
  children
809
804
  } = props;
@@ -811,10 +806,6 @@ function WrapIfAdditionalTemplate(props) {
811
806
  const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
812
807
  const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
813
808
  const additional = ADDITIONAL_PROPERTY_FLAG in schema;
814
- const handleBlur = useCallback2(
815
- ({ target }) => onKeyChange(target && target.value),
816
- [onKeyChange]
817
- );
818
809
  if (!additional) {
819
810
  return /* @__PURE__ */ jsx18("div", { className: classNames, style, children });
820
811
  }
@@ -835,7 +826,7 @@ function WrapIfAdditionalTemplate(props) {
835
826
  disabled: disabled || readonly,
836
827
  id: `${id}-key`,
837
828
  name: `${id}-key`,
838
- onBlur: !readonly ? handleBlur : void 0
829
+ onBlur: !readonly ? onKeyRenameBlur : void 0
839
830
  }
840
831
  ) }) }),
841
832
  /* @__PURE__ */ jsx18(Grid3.Col, { span: 6, className: "form-additional", children })
@@ -847,7 +838,7 @@ function WrapIfAdditionalTemplate(props) {
847
838
  iconType: "sm",
848
839
  className: "rjsf-array-item-remove",
849
840
  disabled: disabled || readonly,
850
- onClick: onDropPropertyClick(label),
841
+ onClick: onRemoveProperty,
851
842
  uiSchema: buttonUiOptions,
852
843
  registry
853
844
  }
@@ -893,7 +884,7 @@ import dayjs2 from "dayjs";
893
884
  import customParseFormat from "dayjs/plugin/customParseFormat";
894
885
 
895
886
  // src/widgets/DateTime/AltDateWidget.tsx
896
- import { useCallback as useCallback3, useEffect, useState } from "react";
887
+ import { useCallback as useCallback2, useEffect, useState } from "react";
897
888
  import {
898
889
  ariaDescribedByIds as ariaDescribedByIds2,
899
890
  dateRangeOptions,
@@ -928,7 +919,7 @@ function AltDateWidget(props) {
928
919
  useEffect(() => {
929
920
  setState(parseDateString(value, showTime));
930
921
  }, [showTime, value]);
931
- const handleChange = useCallback3(
922
+ const handleChange = useCallback2(
932
923
  (property, nextValue) => {
933
924
  const nextState = {
934
925
  ...state,
@@ -942,13 +933,13 @@ function AltDateWidget(props) {
942
933
  },
943
934
  [state, onChange, showTime]
944
935
  );
945
- const handleSetNow = useCallback3(() => {
936
+ const handleSetNow = useCallback2(() => {
946
937
  if (!disabled && !readonly) {
947
938
  const nextState = parseDateString((/* @__PURE__ */ new Date()).toJSON(), showTime);
948
939
  onChange(toDateString(nextState, showTime));
949
940
  }
950
941
  }, [disabled, readonly, showTime, onChange]);
951
- const handleClear = useCallback3(() => {
942
+ const handleClear = useCallback2(() => {
952
943
  if (!disabled && !readonly) {
953
944
  onChange("");
954
945
  }
@@ -1004,7 +995,7 @@ AltDateTimeWidget.defaultProps = {
1004
995
  };
1005
996
 
1006
997
  // src/widgets/DateTime/DateTimeInput.tsx
1007
- import { useCallback as useCallback4 } from "react";
998
+ import { useCallback as useCallback3 } from "react";
1008
999
  import {
1009
1000
  ariaDescribedByIds as ariaDescribedByIds3,
1010
1001
  labelValue as labelValue2
@@ -1045,18 +1036,18 @@ function DateTimeInput(props) {
1045
1036
  valueFormat,
1046
1037
  displayFormat
1047
1038
  } = props;
1048
- const handleChange = useCallback4(
1039
+ const handleChange = useCallback3(
1049
1040
  (nextValue) => {
1050
1041
  onChange(dateFormat(nextValue, valueFormat));
1051
1042
  },
1052
1043
  [onChange, valueFormat]
1053
1044
  );
1054
- const handleBlur = useCallback4(() => {
1045
+ const handleBlur = useCallback3(() => {
1055
1046
  if (onBlur) {
1056
1047
  onBlur(id, value);
1057
1048
  }
1058
1049
  }, [onBlur, id, value]);
1059
- const handleFocus = useCallback4(() => {
1050
+ const handleFocus = useCallback3(() => {
1060
1051
  if (onFocus) {
1061
1052
  onFocus(id, value);
1062
1053
  }
@@ -1117,7 +1108,7 @@ function DateTimeWidget(props) {
1117
1108
  }
1118
1109
 
1119
1110
  // src/widgets/DateTime/TimeWidget.tsx
1120
- import { useCallback as useCallback5 } from "react";
1111
+ import { useCallback as useCallback4 } from "react";
1121
1112
  import {
1122
1113
  labelValue as labelValue3,
1123
1114
  ariaDescribedByIds as ariaDescribedByIds4
@@ -1143,13 +1134,13 @@ function TimeWidget(props) {
1143
1134
  onFocus
1144
1135
  } = props;
1145
1136
  const emptyValue = options.emptyValue || "";
1146
- const handleChange = useCallback5(
1137
+ const handleChange = useCallback4(
1147
1138
  (e) => {
1148
1139
  onChange(e.target.value === "" ? emptyValue : e.target.value);
1149
1140
  },
1150
1141
  [onChange, emptyValue]
1151
1142
  );
1152
- const handleBlur = useCallback5(
1143
+ const handleBlur = useCallback4(
1153
1144
  ({ target }) => {
1154
1145
  if (onBlur) {
1155
1146
  onBlur(id, target && target.value);
@@ -1157,7 +1148,7 @@ function TimeWidget(props) {
1157
1148
  },
1158
1149
  [onBlur, id]
1159
1150
  );
1160
- const handleFocus = useCallback5(
1151
+ const handleFocus = useCallback4(
1161
1152
  ({ target }) => {
1162
1153
  if (onFocus) {
1163
1154
  onFocus(id, target && target.value);
@@ -1188,7 +1179,7 @@ function TimeWidget(props) {
1188
1179
  }
1189
1180
 
1190
1181
  // src/widgets/CheckboxesWidget.tsx
1191
- import { useCallback as useCallback6 } from "react";
1182
+ import { useCallback as useCallback5 } from "react";
1192
1183
  import {
1193
1184
  ariaDescribedByIds as ariaDescribedByIds5,
1194
1185
  enumOptionsValueForIndex,
@@ -1201,6 +1192,7 @@ import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-r
1201
1192
  function CheckboxesWidget(props) {
1202
1193
  const {
1203
1194
  id,
1195
+ htmlName,
1204
1196
  value,
1205
1197
  required,
1206
1198
  disabled,
@@ -1216,7 +1208,7 @@ function CheckboxesWidget(props) {
1216
1208
  } = props;
1217
1209
  const { enumOptions, enumDisabled, inline, emptyValue } = options;
1218
1210
  const themeProps = cleanupOptions(options);
1219
- const handleChange = useCallback6(
1211
+ const handleChange = useCallback5(
1220
1212
  (nextValue) => {
1221
1213
  if (!disabled && !readonly && onChange) {
1222
1214
  onChange(enumOptionsValueForIndex(nextValue, enumOptions, emptyValue));
@@ -1224,7 +1216,7 @@ function CheckboxesWidget(props) {
1224
1216
  },
1225
1217
  [onChange, disabled, readonly, enumOptions, emptyValue]
1226
1218
  );
1227
- const handleBlur = useCallback6(
1219
+ const handleBlur = useCallback5(
1228
1220
  ({ target }) => {
1229
1221
  if (onBlur) {
1230
1222
  onBlur(id, enumOptionsValueForIndex(target.value, enumOptions, emptyValue));
@@ -1232,7 +1224,7 @@ function CheckboxesWidget(props) {
1232
1224
  },
1233
1225
  [onBlur, id, enumOptions, emptyValue]
1234
1226
  );
1235
- const handleFocus = useCallback6(
1227
+ const handleFocus = useCallback5(
1236
1228
  ({ target }) => {
1237
1229
  if (onFocus) {
1238
1230
  onFocus(id, enumOptionsValueForIndex(target.value, enumOptions, emptyValue));
@@ -1258,7 +1250,7 @@ function CheckboxesWidget(props) {
1258
1250
  Checkbox,
1259
1251
  {
1260
1252
  id: optionId(id, i),
1261
- name: id,
1253
+ name: htmlName || id,
1262
1254
  value: String(i),
1263
1255
  label: option.label,
1264
1256
  disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
@@ -1274,7 +1266,7 @@ function CheckboxesWidget(props) {
1274
1266
  }
1275
1267
 
1276
1268
  // src/widgets/CheckboxWidget.tsx
1277
- import { useCallback as useCallback7 } from "react";
1269
+ import { useCallback as useCallback6 } from "react";
1278
1270
  import {
1279
1271
  descriptionId as descriptionId2,
1280
1272
  getTemplate as getTemplate5,
@@ -1287,6 +1279,7 @@ function CheckboxWidget(props) {
1287
1279
  const {
1288
1280
  id,
1289
1281
  name,
1282
+ htmlName,
1290
1283
  value = false,
1291
1284
  required,
1292
1285
  disabled,
@@ -1309,7 +1302,7 @@ function CheckboxWidget(props) {
1309
1302
  registry,
1310
1303
  options
1311
1304
  );
1312
- const handleCheckboxChange = useCallback7(
1305
+ const handleCheckboxChange = useCallback6(
1313
1306
  (e) => {
1314
1307
  if (!disabled && !readonly && onChange) {
1315
1308
  onChange(e.currentTarget.checked);
@@ -1317,7 +1310,7 @@ function CheckboxWidget(props) {
1317
1310
  },
1318
1311
  [onChange, disabled, readonly]
1319
1312
  );
1320
- const handleBlur = useCallback7(
1313
+ const handleBlur = useCallback6(
1321
1314
  ({ target }) => {
1322
1315
  if (onBlur) {
1323
1316
  onBlur(id, target.checked);
@@ -1325,7 +1318,7 @@ function CheckboxWidget(props) {
1325
1318
  },
1326
1319
  [onBlur, id]
1327
1320
  );
1328
- const handleFocus = useCallback7(
1321
+ const handleFocus = useCallback6(
1329
1322
  ({ target }) => {
1330
1323
  if (onFocus) {
1331
1324
  onFocus(id, target.checked);
@@ -1349,7 +1342,7 @@ function CheckboxWidget(props) {
1349
1342
  Checkbox2,
1350
1343
  {
1351
1344
  id,
1352
- name,
1345
+ name: htmlName || name,
1353
1346
  label: labelValue4(label || void 0, hideLabel, false),
1354
1347
  disabled: disabled || readonly,
1355
1348
  required,
@@ -1367,7 +1360,7 @@ function CheckboxWidget(props) {
1367
1360
  }
1368
1361
 
1369
1362
  // src/widgets/ColorWidget.tsx
1370
- import { useCallback as useCallback8 } from "react";
1363
+ import { useCallback as useCallback7 } from "react";
1371
1364
  import {
1372
1365
  labelValue as labelValue5,
1373
1366
  ariaDescribedByIds as ariaDescribedByIds7
@@ -1393,13 +1386,13 @@ function ColorWidget(props) {
1393
1386
  onFocus
1394
1387
  } = props;
1395
1388
  const themeProps = cleanupOptions(options);
1396
- const handleChange = useCallback8(
1389
+ const handleChange = useCallback7(
1397
1390
  (nextValue) => {
1398
1391
  onChange(nextValue);
1399
1392
  },
1400
1393
  [onChange]
1401
1394
  );
1402
- const handleBlur = useCallback8(
1395
+ const handleBlur = useCallback7(
1403
1396
  ({ target }) => {
1404
1397
  if (onBlur) {
1405
1398
  onBlur(id, target && target.value);
@@ -1407,7 +1400,7 @@ function ColorWidget(props) {
1407
1400
  },
1408
1401
  [onBlur, id]
1409
1402
  );
1410
- const handleFocus = useCallback8(
1403
+ const handleFocus = useCallback7(
1411
1404
  ({ target }) => {
1412
1405
  if (onFocus) {
1413
1406
  onFocus(id, target && target.value);
@@ -1438,7 +1431,7 @@ function ColorWidget(props) {
1438
1431
  }
1439
1432
 
1440
1433
  // src/widgets/FileWidget.tsx
1441
- import { useCallback as useCallback9 } from "react";
1434
+ import { useCallback as useCallback8 } from "react";
1442
1435
  import {
1443
1436
  dataURItoBlob,
1444
1437
  ariaDescribedByIds as ariaDescribedByIds8,
@@ -1520,7 +1513,7 @@ function FileWidget(props) {
1520
1513
  onChange
1521
1514
  } = props;
1522
1515
  const themeProps = cleanupOptions(options);
1523
- const handleChange = useCallback9(
1516
+ const handleChange = useCallback8(
1524
1517
  (files) => {
1525
1518
  if (typeof files === "object") {
1526
1519
  processFiles(multiple ? files : [files]).then((filesInfoEvent) => {
@@ -1536,7 +1529,7 @@ function FileWidget(props) {
1536
1529
  },
1537
1530
  [multiple, value, onChange]
1538
1531
  );
1539
- const handleRemoveFile = useCallback9(
1532
+ const handleRemoveFile = useCallback8(
1540
1533
  (index) => {
1541
1534
  if (multiple) {
1542
1535
  const newValue = value.filter((_, i) => i !== index);
@@ -1547,7 +1540,7 @@ function FileWidget(props) {
1547
1540
  },
1548
1541
  [multiple, value, onChange]
1549
1542
  );
1550
- const ValueComponent = useCallback9(
1543
+ const ValueComponent = useCallback8(
1551
1544
  (props2) => {
1552
1545
  const filesInfo = props2.value ? extractFileInfo(Array.isArray(props2.value) ? props2.value : [props2.value]) : null;
1553
1546
  if (Array.isArray(filesInfo) && filesInfo.length > 0) {
@@ -1579,7 +1572,7 @@ function FileWidget(props) {
1579
1572
  }
1580
1573
 
1581
1574
  // src/widgets/PasswordWidget.tsx
1582
- import { useCallback as useCallback10 } from "react";
1575
+ import { useCallback as useCallback9 } from "react";
1583
1576
  import {
1584
1577
  ariaDescribedByIds as ariaDescribedByIds9,
1585
1578
  labelValue as labelValue7
@@ -1606,13 +1599,13 @@ function PasswordWidget(props) {
1606
1599
  } = props;
1607
1600
  const emptyValue = options.emptyValue || "";
1608
1601
  const themeProps = cleanupOptions(options);
1609
- const handleChange = useCallback10(
1602
+ const handleChange = useCallback9(
1610
1603
  (e) => {
1611
1604
  onChange(e.target.value === "" ? emptyValue : e.target.value);
1612
1605
  },
1613
1606
  [onChange, emptyValue]
1614
1607
  );
1615
- const handleBlur = useCallback10(
1608
+ const handleBlur = useCallback9(
1616
1609
  ({ target }) => {
1617
1610
  if (onBlur) {
1618
1611
  onBlur(id, target && target.value);
@@ -1620,7 +1613,7 @@ function PasswordWidget(props) {
1620
1613
  },
1621
1614
  [onBlur, id]
1622
1615
  );
1623
- const handleFocus = useCallback10(
1616
+ const handleFocus = useCallback9(
1624
1617
  ({ target }) => {
1625
1618
  if (onFocus) {
1626
1619
  onFocus(id, target && target.value);
@@ -1650,7 +1643,7 @@ function PasswordWidget(props) {
1650
1643
  }
1651
1644
 
1652
1645
  // src/widgets/RadioWidget.tsx
1653
- import { useCallback as useCallback11 } from "react";
1646
+ import { useCallback as useCallback10 } from "react";
1654
1647
  import {
1655
1648
  ariaDescribedByIds as ariaDescribedByIds10,
1656
1649
  enumOptionsIndexForValue as enumOptionsIndexForValue2,
@@ -1662,6 +1655,7 @@ import { jsx as jsx30 } from "react/jsx-runtime";
1662
1655
  function RadioWidget(props) {
1663
1656
  const {
1664
1657
  id,
1658
+ htmlName,
1665
1659
  value,
1666
1660
  required,
1667
1661
  disabled,
@@ -1677,7 +1671,7 @@ function RadioWidget(props) {
1677
1671
  } = props;
1678
1672
  const { enumOptions, enumDisabled, inline, emptyValue } = options;
1679
1673
  const themeProps = cleanupOptions(options);
1680
- const handleChange = useCallback11(
1674
+ const handleChange = useCallback10(
1681
1675
  (nextValue) => {
1682
1676
  if (!disabled && !readonly && onChange) {
1683
1677
  onChange(enumOptionsValueForIndex2(nextValue, enumOptions, emptyValue));
@@ -1685,7 +1679,7 @@ function RadioWidget(props) {
1685
1679
  },
1686
1680
  [onChange, disabled, readonly, enumOptions, emptyValue]
1687
1681
  );
1688
- const handleBlur = useCallback11(
1682
+ const handleBlur = useCallback10(
1689
1683
  ({ target }) => {
1690
1684
  if (onBlur) {
1691
1685
  onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
@@ -1693,7 +1687,7 @@ function RadioWidget(props) {
1693
1687
  },
1694
1688
  [onBlur, id, enumOptions, emptyValue]
1695
1689
  );
1696
- const handleFocus = useCallback11(
1690
+ const handleFocus = useCallback10(
1697
1691
  ({ target }) => {
1698
1692
  if (onFocus) {
1699
1693
  onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
@@ -1706,7 +1700,7 @@ function RadioWidget(props) {
1706
1700
  Radio.Group,
1707
1701
  {
1708
1702
  id,
1709
- name: id,
1703
+ name: htmlName || id,
1710
1704
  value: selected,
1711
1705
  label: !hideLabel ? label : void 0,
1712
1706
  onChange: handleChange,
@@ -1733,7 +1727,7 @@ function RadioWidget(props) {
1733
1727
  }
1734
1728
 
1735
1729
  // src/widgets/RangeWidget.tsx
1736
- import { useCallback as useCallback12 } from "react";
1730
+ import { useCallback as useCallback11 } from "react";
1737
1731
  import {
1738
1732
  ariaDescribedByIds as ariaDescribedByIds11,
1739
1733
  rangeSpec,
@@ -1761,7 +1755,7 @@ function RangeWidget(props) {
1761
1755
  } = props;
1762
1756
  const themeProps = cleanupOptions(options);
1763
1757
  const { min, max, step } = rangeSpec(schema);
1764
- const handleChange = useCallback12(
1758
+ const handleChange = useCallback11(
1765
1759
  (nextValue) => {
1766
1760
  if (!disabled && !readonly && onChange) {
1767
1761
  onChange(nextValue);
@@ -1769,12 +1763,12 @@ function RangeWidget(props) {
1769
1763
  },
1770
1764
  [onChange, disabled, readonly]
1771
1765
  );
1772
- const handleBlur = useCallback12(() => {
1766
+ const handleBlur = useCallback11(() => {
1773
1767
  if (onBlur) {
1774
1768
  onBlur(id, value);
1775
1769
  }
1776
1770
  }, [onBlur, id, value]);
1777
- const handleFocus = useCallback12(() => {
1771
+ const handleFocus = useCallback11(() => {
1778
1772
  if (onFocus) {
1779
1773
  onFocus(id, value);
1780
1774
  }
@@ -1805,7 +1799,7 @@ function RangeWidget(props) {
1805
1799
  }
1806
1800
 
1807
1801
  // src/widgets/SelectWidget.tsx
1808
- import { useCallback as useCallback13, useMemo } from "react";
1802
+ import { useCallback as useCallback12, useMemo } from "react";
1809
1803
  import {
1810
1804
  ariaDescribedByIds as ariaDescribedByIds12,
1811
1805
  enumOptionsIndexForValue as enumOptionsIndexForValue3,
@@ -1817,6 +1811,7 @@ import { jsx as jsx32 } from "react/jsx-runtime";
1817
1811
  function SelectWidget(props) {
1818
1812
  const {
1819
1813
  id,
1814
+ htmlName,
1820
1815
  value,
1821
1816
  placeholder,
1822
1817
  required,
@@ -1834,7 +1829,7 @@ function SelectWidget(props) {
1834
1829
  } = props;
1835
1830
  const { enumOptions, enumDisabled, emptyValue } = options;
1836
1831
  const themeProps = cleanupOptions(options);
1837
- const handleChange = useCallback13(
1832
+ const handleChange = useCallback12(
1838
1833
  (nextValue) => {
1839
1834
  if (!disabled && !readonly && onChange) {
1840
1835
  onChange(enumOptionsValueForIndex3(nextValue, enumOptions, emptyValue));
@@ -1842,7 +1837,7 @@ function SelectWidget(props) {
1842
1837
  },
1843
1838
  [onChange, disabled, readonly, enumOptions, emptyValue]
1844
1839
  );
1845
- const handleBlur = useCallback13(
1840
+ const handleBlur = useCallback12(
1846
1841
  ({ target }) => {
1847
1842
  if (onBlur) {
1848
1843
  onBlur(id, enumOptionsValueForIndex3(target && target.value, enumOptions, emptyValue));
@@ -1850,7 +1845,7 @@ function SelectWidget(props) {
1850
1845
  },
1851
1846
  [onBlur, id, enumOptions, emptyValue]
1852
1847
  );
1853
- const handleFocus = useCallback13(
1848
+ const handleFocus = useCallback12(
1854
1849
  ({ target }) => {
1855
1850
  if (onFocus) {
1856
1851
  onFocus(id, enumOptionsValueForIndex3(target && target.value, enumOptions, emptyValue));
@@ -1875,7 +1870,7 @@ function SelectWidget(props) {
1875
1870
  Component,
1876
1871
  {
1877
1872
  id,
1878
- name: id,
1873
+ name: htmlName || id,
1879
1874
  label: labelValue8(label || void 0, hideLabel, false),
1880
1875
  data: selectOptions,
1881
1876
  value: multiple ? selectedIndexes : selectedIndexes,
@@ -1896,7 +1891,7 @@ function SelectWidget(props) {
1896
1891
  }
1897
1892
 
1898
1893
  // src/widgets/TextareaWidget.tsx
1899
- import { useCallback as useCallback14 } from "react";
1894
+ import { useCallback as useCallback13 } from "react";
1900
1895
  import {
1901
1896
  labelValue as labelValue9,
1902
1897
  ariaDescribedByIds as ariaDescribedByIds13
@@ -1907,6 +1902,7 @@ function TextareaWidget(props) {
1907
1902
  const {
1908
1903
  id,
1909
1904
  name,
1905
+ htmlName,
1910
1906
  value,
1911
1907
  placeholder,
1912
1908
  required,
@@ -1923,13 +1919,13 @@ function TextareaWidget(props) {
1923
1919
  } = props;
1924
1920
  const themeProps = cleanupOptions(options);
1925
1921
  const emptyValue = options?.emptyValue ?? "";
1926
- const handleChange = useCallback14(
1922
+ const handleChange = useCallback13(
1927
1923
  (e) => {
1928
1924
  onChange(e.target.value === "" ? emptyValue : e.target.value);
1929
1925
  },
1930
1926
  [onChange, emptyValue]
1931
1927
  );
1932
- const handleBlur = useCallback14(
1928
+ const handleBlur = useCallback13(
1933
1929
  ({ target }) => {
1934
1930
  if (onBlur) {
1935
1931
  onBlur(id, target && target.value);
@@ -1937,7 +1933,7 @@ function TextareaWidget(props) {
1937
1933
  },
1938
1934
  [onBlur, id]
1939
1935
  );
1940
- const handleFocus = useCallback14(
1936
+ const handleFocus = useCallback13(
1941
1937
  ({ target }) => {
1942
1938
  if (onFocus) {
1943
1939
  onFocus(id, target && target.value);
@@ -1949,7 +1945,7 @@ function TextareaWidget(props) {
1949
1945
  Textarea,
1950
1946
  {
1951
1947
  id,
1952
- name,
1948
+ name: htmlName || name,
1953
1949
  value: value || "",
1954
1950
  placeholder: placeholder || void 0,
1955
1951
  required,