@rjsf/mantine 6.6.0 → 6.6.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 (136) hide show
  1. package/dist/index.cjs +110 -83
  2. package/dist/index.cjs.map +3 -3
  3. package/dist/mantine.esm.js +82 -119
  4. package/dist/mantine.esm.js.map +3 -3
  5. package/dist/mantine.umd.js +127 -101
  6. package/lib/Form/index.d.ts +3 -3
  7. package/lib/Form/index.js.map +1 -1
  8. package/lib/Theme/index.d.ts +2 -2
  9. package/lib/templates/ArrayFieldItemTemplate.d.ts +1 -1
  10. package/lib/templates/ArrayFieldItemTemplate.js +1 -1
  11. package/lib/templates/ArrayFieldItemTemplate.js.map +1 -1
  12. package/lib/templates/ArrayFieldTemplate.d.ts +1 -1
  13. package/lib/templates/ArrayFieldTemplate.js +1 -1
  14. package/lib/templates/ArrayFieldTemplate.js.map +1 -1
  15. package/lib/templates/ArrayFieldTitleTemplate.d.ts +1 -1
  16. package/lib/templates/ArrayFieldTitleTemplate.js +1 -1
  17. package/lib/templates/ArrayFieldTitleTemplate.js.map +1 -1
  18. package/lib/templates/BaseInputTemplate.d.ts +1 -1
  19. package/lib/templates/BaseInputTemplate.js +5 -5
  20. package/lib/templates/BaseInputTemplate.js.map +1 -1
  21. package/lib/templates/ButtonTemplates/AddButton.d.ts +1 -1
  22. package/lib/templates/ButtonTemplates/AddButton.js.map +1 -1
  23. package/lib/templates/ButtonTemplates/IconButton.d.ts +15 -8
  24. package/lib/templates/ButtonTemplates/IconButton.js +14 -6
  25. package/lib/templates/ButtonTemplates/IconButton.js.map +1 -1
  26. package/lib/templates/ButtonTemplates/SubmitButton.d.ts +1 -1
  27. package/lib/templates/ButtonTemplates/SubmitButton.js.map +1 -1
  28. package/lib/templates/ButtonTemplates/index.d.ts +1 -1
  29. package/lib/templates/DescriptionField.d.ts +1 -1
  30. package/lib/templates/ErrorList.d.ts +1 -1
  31. package/lib/templates/ErrorList.js.map +1 -1
  32. package/lib/templates/FieldErrorTemplate.d.ts +1 -1
  33. package/lib/templates/FieldErrorTemplate.js.map +1 -1
  34. package/lib/templates/FieldHelpTemplate.d.ts +1 -1
  35. package/lib/templates/FieldHelpTemplate.js.map +1 -1
  36. package/lib/templates/FieldTemplate.d.ts +1 -1
  37. package/lib/templates/FieldTemplate.js +1 -1
  38. package/lib/templates/FieldTemplate.js.map +1 -1
  39. package/lib/templates/GridTemplate.d.ts +1 -1
  40. package/lib/templates/MultiSchemaFieldTemplate.d.ts +1 -1
  41. package/lib/templates/ObjectFieldTemplate.d.ts +1 -1
  42. package/lib/templates/ObjectFieldTemplate.js +1 -1
  43. package/lib/templates/ObjectFieldTemplate.js.map +1 -1
  44. package/lib/templates/OptionalDataControlsTemplate.d.ts +1 -1
  45. package/lib/templates/OptionalDataControlsTemplate.js +1 -1
  46. package/lib/templates/OptionalDataControlsTemplate.js.map +1 -1
  47. package/lib/templates/TitleField.d.ts +1 -1
  48. package/lib/templates/WrapIfAdditionalTemplate.d.ts +1 -1
  49. package/lib/templates/WrapIfAdditionalTemplate.js +1 -1
  50. package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -1
  51. package/lib/templates/icons.d.ts +1 -1
  52. package/lib/templates/index.d.ts +1 -1
  53. package/lib/tsconfig.tsbuildinfo +1 -1
  54. package/lib/utils.d.ts +1 -1
  55. package/lib/utils.js.map +1 -1
  56. package/lib/widgets/CheckboxWidget.d.ts +2 -2
  57. package/lib/widgets/CheckboxWidget.js +1 -1
  58. package/lib/widgets/CheckboxWidget.js.map +1 -1
  59. package/lib/widgets/CheckboxesWidget.d.ts +1 -1
  60. package/lib/widgets/CheckboxesWidget.js +1 -1
  61. package/lib/widgets/CheckboxesWidget.js.map +1 -1
  62. package/lib/widgets/ColorWidget.d.ts +1 -1
  63. package/lib/widgets/ColorWidget.js +1 -1
  64. package/lib/widgets/ColorWidget.js.map +1 -1
  65. package/lib/widgets/DateTime/AltDateTimeWidget.d.ts +1 -1
  66. package/lib/widgets/DateTime/AltDateWidget.d.ts +1 -1
  67. package/lib/widgets/DateTime/AltDateWidget.js +1 -1
  68. package/lib/widgets/DateTime/AltDateWidget.js.map +1 -1
  69. package/lib/widgets/DateTime/DateTimeInput.d.ts +1 -1
  70. package/lib/widgets/DateTime/DateTimeInput.js +1 -1
  71. package/lib/widgets/DateTime/DateTimeInput.js.map +1 -1
  72. package/lib/widgets/DateTime/DateTimeWidget.d.ts +1 -1
  73. package/lib/widgets/DateTime/DateWidget.d.ts +1 -1
  74. package/lib/widgets/DateTime/TimeWidget.d.ts +1 -1
  75. package/lib/widgets/DateTime/TimeWidget.js +1 -1
  76. package/lib/widgets/DateTime/TimeWidget.js.map +1 -1
  77. package/lib/widgets/FileWidget.d.ts +1 -1
  78. package/lib/widgets/FileWidget.js +2 -1
  79. package/lib/widgets/FileWidget.js.map +1 -1
  80. package/lib/widgets/PasswordWidget.d.ts +1 -1
  81. package/lib/widgets/PasswordWidget.js +2 -2
  82. package/lib/widgets/PasswordWidget.js.map +1 -1
  83. package/lib/widgets/RadioWidget.d.ts +1 -1
  84. package/lib/widgets/RadioWidget.js +1 -1
  85. package/lib/widgets/RadioWidget.js.map +1 -1
  86. package/lib/widgets/RangeWidget.d.ts +1 -1
  87. package/lib/widgets/RangeWidget.js +1 -1
  88. package/lib/widgets/RangeWidget.js.map +1 -1
  89. package/lib/widgets/SelectWidget.d.ts +1 -1
  90. package/lib/widgets/SelectWidget.js +1 -1
  91. package/lib/widgets/SelectWidget.js.map +1 -1
  92. package/lib/widgets/TextareaWidget.d.ts +2 -2
  93. package/lib/widgets/TextareaWidget.js +1 -1
  94. package/lib/widgets/TextareaWidget.js.map +1 -1
  95. package/lib/widgets/index.d.ts +1 -1
  96. package/package.json +8 -8
  97. package/src/Form/index.ts +4 -3
  98. package/src/Theme/index.ts +2 -2
  99. package/src/templates/ArrayFieldItemTemplate.tsx +2 -8
  100. package/src/templates/ArrayFieldTemplate.tsx +2 -9
  101. package/src/templates/ArrayFieldTitleTemplate.tsx +2 -8
  102. package/src/templates/BaseInputTemplate.tsx +8 -15
  103. package/src/templates/ButtonTemplates/AddButton.tsx +2 -1
  104. package/src/templates/ButtonTemplates/IconButton.tsx +19 -10
  105. package/src/templates/ButtonTemplates/SubmitButton.tsx +2 -1
  106. package/src/templates/ButtonTemplates/index.ts +1 -1
  107. package/src/templates/DescriptionField.tsx +1 -1
  108. package/src/templates/ErrorList.tsx +3 -1
  109. package/src/templates/FieldErrorTemplate.tsx +3 -1
  110. package/src/templates/FieldHelpTemplate.tsx +2 -1
  111. package/src/templates/FieldTemplate.tsx +2 -8
  112. package/src/templates/GridTemplate.tsx +1 -1
  113. package/src/templates/MultiSchemaFieldTemplate.tsx +1 -1
  114. package/src/templates/ObjectFieldTemplate.tsx +4 -8
  115. package/src/templates/OptionalDataControlsTemplate.tsx +3 -2
  116. package/src/templates/TitleField.tsx +1 -1
  117. package/src/templates/WrapIfAdditionalTemplate.tsx +2 -10
  118. package/src/templates/icons.tsx +1 -1
  119. package/src/templates/index.ts +1 -1
  120. package/src/utils.ts +2 -2
  121. package/src/widgets/CheckboxWidget.tsx +4 -11
  122. package/src/widgets/CheckboxesWidget.tsx +5 -7
  123. package/src/widgets/ColorWidget.tsx +4 -9
  124. package/src/widgets/DateTime/AltDateTimeWidget.tsx +1 -1
  125. package/src/widgets/DateTime/AltDateWidget.tsx +4 -12
  126. package/src/widgets/DateTime/DateTimeInput.tsx +2 -8
  127. package/src/widgets/DateTime/DateTimeWidget.tsx +1 -1
  128. package/src/widgets/DateTime/DateWidget.tsx +1 -1
  129. package/src/widgets/DateTime/TimeWidget.tsx +4 -9
  130. package/src/widgets/FileWidget.tsx +4 -9
  131. package/src/widgets/PasswordWidget.tsx +5 -10
  132. package/src/widgets/RadioWidget.tsx +5 -7
  133. package/src/widgets/RangeWidget.tsx +3 -9
  134. package/src/widgets/SelectWidget.tsx +4 -6
  135. package/src/widgets/TextareaWidget.tsx +4 -9
  136. package/src/widgets/index.ts +1 -1
@@ -3,10 +3,7 @@ import { withTheme } from "@rjsf/core";
3
3
 
4
4
  // src/templates/ArrayFieldItemTemplate.tsx
5
5
  import { Box, Flex, Group } from "@mantine/core";
6
- import {
7
- getTemplate,
8
- getUiOptions
9
- } from "@rjsf/utils";
6
+ import { getTemplate, getUiOptions } from "@rjsf/utils";
10
7
  import { jsx, jsxs } from "react/jsx-runtime";
11
8
  function ArrayFieldItemTemplate(props) {
12
9
  const { buttonsProps, className, hasToolbar, index, uiSchema, registry, children } = props;
@@ -24,11 +21,7 @@ function ArrayFieldItemTemplate(props) {
24
21
 
25
22
  // src/templates/ArrayFieldTemplate.tsx
26
23
  import { Fieldset, Box as Box2, Group as Group2 } from "@mantine/core";
27
- import {
28
- getTemplate as getTemplate2,
29
- getUiOptions as getUiOptions2,
30
- buttonId
31
- } from "@rjsf/utils";
24
+ import { getTemplate as getTemplate2, getUiOptions as getUiOptions2, buttonId } from "@rjsf/utils";
32
25
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
33
26
  function ArrayFieldTemplate(props) {
34
27
  const {
@@ -105,10 +98,7 @@ function ArrayFieldTemplate(props) {
105
98
 
106
99
  // src/templates/ArrayFieldTitleTemplate.tsx
107
100
  import { Grid, Title } from "@mantine/core";
108
- import {
109
- getUiOptions as getUiOptions3,
110
- titleId
111
- } from "@rjsf/utils";
101
+ import { getUiOptions as getUiOptions3, titleId } from "@rjsf/utils";
112
102
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
113
103
  function ArrayFieldTitleTemplate(props) {
114
104
  const { fieldPathId, title, uiSchema, registry, optionalDataControl } = props;
@@ -131,12 +121,7 @@ function ArrayFieldTitleTemplate(props) {
131
121
  import { useCallback } from "react";
132
122
  import { TextInput, NumberInput } from "@mantine/core";
133
123
  import { SchemaExamples } from "@rjsf/core";
134
- import {
135
- ariaDescribedByIds,
136
- examplesId,
137
- getInputProps,
138
- labelValue
139
- } from "@rjsf/utils";
124
+ import { ariaDescribedByIds, examplesId, getInputProps, labelValue } from "@rjsf/utils";
140
125
 
141
126
  // src/utils.ts
142
127
  var uiOptionsKeys = [
@@ -206,12 +191,12 @@ function BaseInputTemplate(props) {
206
191
  const inputProps = getInputProps(schema, type, options, false);
207
192
  const description = hideLabel ? void 0 : options.description || schema.description;
208
193
  const themeProps = cleanupOptions(options);
209
- const handleNumberChange = useCallback((value2) => onChange(value2), [onChange]);
194
+ const handleNumberChange = useCallback((newValue) => onChange(newValue), [onChange]);
210
195
  const handleChange = useCallback(
211
196
  (e) => {
212
- const handler = onChangeOverride ? onChangeOverride : onChange;
213
- const value2 = e.target.value === "" ? options.emptyValue : e.target.value;
214
- handler(value2);
197
+ const handler = onChangeOverride || onChange;
198
+ const newValue = e.target.value === "" ? options.emptyValue : e.target.value;
199
+ handler(newValue);
215
200
  },
216
201
  [onChange, onChangeOverride, options]
217
202
  );
@@ -433,10 +418,11 @@ function ExclamationCircle({ size, style, ...others }) {
433
418
  }
434
419
 
435
420
  // src/templates/ButtonTemplates/IconButton.tsx
421
+ import { memo } from "react";
436
422
  import { ActionIcon } from "@mantine/core";
437
423
  import { TranslatableString } from "@rjsf/utils";
438
424
  import { jsx as jsx6 } from "react/jsx-runtime";
439
- function IconButton(props) {
425
+ function IconButtonFn(props) {
440
426
  const { icon, iconType = "sm", color, onClick, uiSchema, registry, ...otherProps } = props;
441
427
  return /* @__PURE__ */ jsx6(
442
428
  ActionIcon,
@@ -449,13 +435,16 @@ function IconButton(props) {
449
435
  }
450
436
  );
451
437
  }
452
- function CopyButton(props) {
438
+ var IconButton = memo(IconButtonFn);
439
+ var IconButton_default = IconButton;
440
+ function CopyButtonFn(props) {
453
441
  const {
454
442
  registry: { translateString }
455
443
  } = props;
456
444
  return /* @__PURE__ */ jsx6(IconButton, { title: translateString(TranslatableString.CopyButton), variant: "subtle", ...props, icon: /* @__PURE__ */ jsx6(Copy, {}) });
457
445
  }
458
- function MoveDownButton(props) {
446
+ var CopyButton = memo(CopyButtonFn);
447
+ function MoveDownButtonFn(props) {
459
448
  const {
460
449
  registry: { translateString }
461
450
  } = props;
@@ -469,7 +458,8 @@ function MoveDownButton(props) {
469
458
  }
470
459
  );
471
460
  }
472
- function MoveUpButton(props) {
461
+ var MoveDownButton = memo(MoveDownButtonFn);
462
+ function MoveUpButtonFn(props) {
473
463
  const {
474
464
  registry: { translateString }
475
465
  } = props;
@@ -483,7 +473,8 @@ function MoveUpButton(props) {
483
473
  }
484
474
  );
485
475
  }
486
- function RemoveButton(props) {
476
+ var MoveUpButton = memo(MoveUpButtonFn);
477
+ function RemoveButtonFn(props) {
487
478
  const {
488
479
  registry: { translateString }
489
480
  } = props;
@@ -498,12 +489,14 @@ function RemoveButton(props) {
498
489
  }
499
490
  );
500
491
  }
501
- function ClearButton(props) {
492
+ var RemoveButton = memo(RemoveButtonFn);
493
+ function ClearButtonFn(props) {
502
494
  const {
503
495
  registry: { translateString }
504
496
  } = props;
505
497
  return /* @__PURE__ */ jsx6(IconButton, { title: translateString(TranslatableString.ClearButton), variant: "subtle", ...props, icon: /* @__PURE__ */ jsx6(X, {}) });
506
498
  }
499
+ var ClearButton = memo(ClearButtonFn);
507
500
 
508
501
  // src/templates/ButtonTemplates/AddButton.tsx
509
502
  import { jsx as jsx7 } from "react/jsx-runtime";
@@ -511,7 +504,7 @@ function AddButton(props) {
511
504
  const {
512
505
  registry: { translateString }
513
506
  } = props;
514
- return /* @__PURE__ */ jsx7(IconButton, { title: translateString(TranslatableString2.AddItemButton), variant: "subtle", ...props, icon: /* @__PURE__ */ jsx7(Plus, {}) });
507
+ return /* @__PURE__ */ jsx7(IconButton_default, { title: translateString(TranslatableString2.AddItemButton), variant: "subtle", ...props, icon: /* @__PURE__ */ jsx7(Plus, {}) });
515
508
  }
516
509
 
517
510
  // src/templates/ButtonTemplates/SubmitButton.tsx
@@ -568,7 +561,10 @@ function ErrorList({
568
561
  variant: "transparent",
569
562
  title: /* @__PURE__ */ jsx10(Title2, { order: 5, fw: "normal", children: translateString(TranslatableString3.ErrorsLabel) }),
570
563
  icon: /* @__PURE__ */ jsx10(ExclamationCircle, {}),
571
- children: /* @__PURE__ */ jsx10(List, { children: errors.map((error, index) => /* @__PURE__ */ jsx10(List.Item, { c: "red", children: error.stack }, `error-${index}`)) })
564
+ children: /* @__PURE__ */ jsx10(List, { children: errors.map((error, index) => (
565
+ // oxlint-disable-next-line react/no-array-index-key
566
+ /* @__PURE__ */ jsx10(List.Item, { c: "red", children: error.stack }, `error-${index}`)
567
+ )) })
572
568
  }
573
569
  );
574
570
  }
@@ -582,7 +578,10 @@ function FieldErrorTemplate({ errors, fieldPathId }) {
582
578
  return null;
583
579
  }
584
580
  const id = errorId(fieldPathId);
585
- return /* @__PURE__ */ jsx11(Box3, { id, c: "red", display: "none", children: /* @__PURE__ */ jsx11(List2, { children: errors.map((error, index) => /* @__PURE__ */ jsx11(List2.Item, { children: error }, `field-error-${index}`)) }) });
581
+ return /* @__PURE__ */ jsx11(Box3, { id, c: "red", display: "none", children: /* @__PURE__ */ jsx11(List2, { children: errors.map((error, index) => (
582
+ // oxlint-disable-next-line react/no-array-index-key
583
+ /* @__PURE__ */ jsx11(List2.Item, { children: error }, `field-error-${index}`)
584
+ )) }) });
586
585
  }
587
586
 
588
587
  // src/templates/FieldHelpTemplate.tsx
@@ -600,10 +599,7 @@ function FieldHelpTemplate(props) {
600
599
 
601
600
  // src/templates/FieldTemplate.tsx
602
601
  import { Box as Box4 } from "@mantine/core";
603
- import {
604
- getTemplate as getTemplate3,
605
- getUiOptions as getUiOptions4
606
- } from "@rjsf/utils";
602
+ import { getTemplate as getTemplate3, getUiOptions as getUiOptions4 } from "@rjsf/utils";
607
603
  import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
608
604
  function FieldTemplate(props) {
609
605
  const {
@@ -680,14 +676,7 @@ function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
680
676
 
681
677
  // src/templates/ObjectFieldTemplate.tsx
682
678
  import { Box as Box5, Container as Container2, Group as Group3, SimpleGrid } from "@mantine/core";
683
- import {
684
- buttonId as buttonId2,
685
- canExpand,
686
- descriptionId,
687
- getTemplate as getTemplate4,
688
- getUiOptions as getUiOptions5,
689
- titleId as titleId2
690
- } from "@rjsf/utils";
679
+ import { buttonId as buttonId2, canExpand, descriptionId, getTemplate as getTemplate4, getUiOptions as getUiOptions5, titleId as titleId2 } from "@rjsf/utils";
691
680
  import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
692
681
  function ObjectFieldTemplate(props) {
693
682
  const {
@@ -785,7 +774,8 @@ function OptionalDataControlsTemplate(props) {
785
774
  title: label
786
775
  }
787
776
  );
788
- } else if (onRemoveClick) {
777
+ }
778
+ if (onRemoveClick) {
789
779
  return /* @__PURE__ */ jsx16(
790
780
  RemoveButton,
791
781
  {
@@ -818,12 +808,7 @@ function TitleField(props) {
818
808
 
819
809
  // src/templates/WrapIfAdditionalTemplate.tsx
820
810
  import { Flex as Flex2, Grid as Grid4, TextInput as TextInput2 } from "@mantine/core";
821
- import {
822
- ADDITIONAL_PROPERTY_FLAG,
823
- UI_OPTIONS_KEY,
824
- buttonId as buttonId3,
825
- TranslatableString as TranslatableString4
826
- } from "@rjsf/utils";
811
+ import { ADDITIONAL_PROPERTY_FLAG, UI_OPTIONS_KEY, buttonId as buttonId3, TranslatableString as TranslatableString4 } from "@rjsf/utils";
827
812
  import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
828
813
  function WrapIfAdditionalTemplate(props) {
829
814
  const {
@@ -994,12 +979,12 @@ function CheckboxesWidget(props) {
994
979
  name: htmlName || id,
995
980
  value: enumOptionValueEncoder(option.value, i, optionValueFormat),
996
981
  label: option.label,
997
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
982
+ disabled: Array.isArray(enumDisabled) && enumDisabled.includes(option.value),
998
983
  autoFocus: i === 0 && autofocus,
999
984
  onBlur: handleBlur,
1000
985
  onFocus: handleFocus
1001
986
  },
1002
- i
987
+ String(option.value)
1003
988
  )) }) : null
1004
989
  }
1005
990
  )
@@ -1009,12 +994,7 @@ function CheckboxesWidget(props) {
1009
994
  // src/widgets/CheckboxWidget.tsx
1010
995
  import { useCallback as useCallback3 } from "react";
1011
996
  import { Checkbox as Checkbox2 } from "@mantine/core";
1012
- import {
1013
- descriptionId as descriptionId2,
1014
- getTemplate as getTemplate5,
1015
- labelValue as labelValue2,
1016
- ariaDescribedByIds as ariaDescribedByIds3
1017
- } from "@rjsf/utils";
997
+ import { descriptionId as descriptionId2, getTemplate as getTemplate5, labelValue as labelValue2, ariaDescribedByIds as ariaDescribedByIds3 } from "@rjsf/utils";
1018
998
  import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
1019
999
  function CheckboxWidget(props) {
1020
1000
  const {
@@ -1101,10 +1081,7 @@ function CheckboxWidget(props) {
1101
1081
  // src/widgets/ColorWidget.tsx
1102
1082
  import { useCallback as useCallback4 } from "react";
1103
1083
  import { ColorInput } from "@mantine/core";
1104
- import {
1105
- labelValue as labelValue3,
1106
- ariaDescribedByIds as ariaDescribedByIds4
1107
- } from "@rjsf/utils";
1084
+ import { labelValue as labelValue3, ariaDescribedByIds as ariaDescribedByIds4 } from "@rjsf/utils";
1108
1085
  import { jsx as jsx21 } from "react/jsx-runtime";
1109
1086
  function ColorWidget(props) {
1110
1087
  const {
@@ -1178,13 +1155,7 @@ function AltDateTimeWidget(props) {
1178
1155
 
1179
1156
  // src/widgets/DateTime/AltDateWidget.tsx
1180
1157
  import { Flex as Flex4, Box as Box6, Group as Group4, Button as Button2, Select, Input as Input2 } from "@mantine/core";
1181
- import {
1182
- ariaDescribedByIds as ariaDescribedByIds5,
1183
- dateRangeOptions,
1184
- titleId as titleId4,
1185
- TranslatableString as TranslatableString5,
1186
- useAltDateWidgetProps
1187
- } from "@rjsf/utils";
1158
+ import { ariaDescribedByIds as ariaDescribedByIds5, dateRangeOptions, titleId as titleId4, TranslatableString as TranslatableString5, useAltDateWidgetProps } from "@rjsf/utils";
1188
1159
  import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
1189
1160
  function AltDateWidget(props) {
1190
1161
  const { id, required, disabled, readonly, label, hideLabel, rawErrors, options, registry } = props;
@@ -1195,39 +1166,42 @@ function AltDateWidget(props) {
1195
1166
  /* @__PURE__ */ jsxs13(Flex4, { gap: "xs", align: "center", wrap: "nowrap", children: [
1196
1167
  elements.map((elemProps, i) => {
1197
1168
  const elemId = `${id}_${elemProps.type}`;
1198
- return /* @__PURE__ */ jsx23(Box6, { children: /* @__PURE__ */ jsx23(
1199
- Select,
1200
- {
1201
- id: elemId,
1202
- name: elemId,
1203
- placeholder: elemProps.type,
1204
- disabled: disabled || readonly,
1205
- data: dateRangeOptions(elemProps.range[0], elemProps.range[1]).map((item) => item.value.toString()),
1206
- value: !elemProps.value || elemProps.value < 0 ? null : elemProps.value.toString(),
1207
- onChange: (v) => handleChange(elemProps.type, v || void 0),
1208
- searchable: false,
1209
- allowDeselect: false,
1210
- comboboxProps: { withinPortal: false },
1211
- "aria-describedby": ariaDescribedByIds5(elemId)
1212
- }
1213
- ) }, i);
1169
+ return (
1170
+ // oxlint-disable-next-line react/no-array-index-key
1171
+ /* @__PURE__ */ jsx23(Box6, { children: /* @__PURE__ */ jsx23(
1172
+ Select,
1173
+ {
1174
+ id: elemId,
1175
+ name: elemId,
1176
+ placeholder: elemProps.type,
1177
+ disabled: disabled || readonly,
1178
+ data: dateRangeOptions(elemProps.range[0], elemProps.range[1]).map((item) => item.value.toString()),
1179
+ value: !elemProps.value || elemProps.value < 0 ? null : elemProps.value.toString(),
1180
+ onChange: (v) => handleChange(elemProps.type, v || void 0),
1181
+ searchable: false,
1182
+ allowDeselect: false,
1183
+ comboboxProps: { withinPortal: false },
1184
+ "aria-describedby": ariaDescribedByIds5(elemId)
1185
+ }
1186
+ ) }, i)
1187
+ );
1214
1188
  }),
1215
1189
  /* @__PURE__ */ jsxs13(Group4, { wrap: "nowrap", gap: 3, children: [
1216
1190
  (options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ jsx23(Button2, { variant: "subtle", size: "xs", onClick: handleSetNow, children: translateString(TranslatableString5.NowLabel) }),
1217
1191
  (options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ jsx23(Button2, { variant: "subtle", size: "xs", onClick: handleClear, children: translateString(TranslatableString5.ClearLabel) })
1218
1192
  ] })
1219
1193
  ] }),
1220
- rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ jsx23(Input2.Error, { children: error }, `alt-date-widget-input-errors-${index}`))
1194
+ rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => (
1195
+ // oxlint-disable-next-line react/no-array-index-key
1196
+ /* @__PURE__ */ jsx23(Input2.Error, { children: error }, `alt-date-widget-input-errors-${index}`)
1197
+ ))
1221
1198
  ] });
1222
1199
  }
1223
1200
 
1224
1201
  // src/widgets/DateTime/DateTimeInput.tsx
1225
1202
  import { useCallback as useCallback5 } from "react";
1226
1203
  import { DateInput } from "@mantine/dates";
1227
- import {
1228
- ariaDescribedByIds as ariaDescribedByIds6,
1229
- labelValue as labelValue4
1230
- } from "@rjsf/utils";
1204
+ import { ariaDescribedByIds as ariaDescribedByIds6, labelValue as labelValue4 } from "@rjsf/utils";
1231
1205
  import dayjs from "dayjs";
1232
1206
  import { jsx as jsx24 } from "react/jsx-runtime";
1233
1207
  var dateParser = (input, format) => {
@@ -1337,10 +1311,7 @@ function DateTimeWidget(props) {
1337
1311
  // src/widgets/DateTime/TimeWidget.tsx
1338
1312
  import { useCallback as useCallback6 } from "react";
1339
1313
  import { TimeInput } from "@mantine/dates";
1340
- import {
1341
- labelValue as labelValue5,
1342
- ariaDescribedByIds as ariaDescribedByIds7
1343
- } from "@rjsf/utils";
1314
+ import { labelValue as labelValue5, ariaDescribedByIds as ariaDescribedByIds7 } from "@rjsf/utils";
1344
1315
  import { jsx as jsx27 } from "react/jsx-runtime";
1345
1316
  function TimeWidget(props) {
1346
1317
  const {
@@ -1408,11 +1379,7 @@ function TimeWidget(props) {
1408
1379
  // src/widgets/FileWidget.tsx
1409
1380
  import { useCallback as useCallback7 } from "react";
1410
1381
  import { FileInput, Pill } from "@mantine/core";
1411
- import {
1412
- ariaDescribedByIds as ariaDescribedByIds8,
1413
- labelValue as labelValue6,
1414
- useFileWidgetProps
1415
- } from "@rjsf/utils";
1382
+ import { ariaDescribedByIds as ariaDescribedByIds8, labelValue as labelValue6, useFileWidgetProps } from "@rjsf/utils";
1416
1383
  import { jsx as jsx28 } from "react/jsx-runtime";
1417
1384
  function FileWidget(props) {
1418
1385
  const {
@@ -1443,7 +1410,10 @@ function FileWidget(props) {
1443
1410
  );
1444
1411
  const ValueComponent = useCallback7(() => {
1445
1412
  if (Array.isArray(filesInfo) && filesInfo.length > 0) {
1446
- return /* @__PURE__ */ jsx28(Pill.Group, { children: filesInfo.map((file, index) => /* @__PURE__ */ jsx28(Pill, { withRemoveButton: true, onRemove: () => handleRemove(index), children: file.name }, index)) });
1413
+ return /* @__PURE__ */ jsx28(Pill.Group, { children: filesInfo.map((file, index) => (
1414
+ // oxlint-disable-next-line react/no-array-index-key
1415
+ /* @__PURE__ */ jsx28(Pill, { withRemoveButton: true, onRemove: () => handleRemove(index), children: file.name }, index)
1416
+ )) });
1447
1417
  }
1448
1418
  return null;
1449
1419
  }, [handleRemove, filesInfo]);
@@ -1471,10 +1441,7 @@ function FileWidget(props) {
1471
1441
  // src/widgets/PasswordWidget.tsx
1472
1442
  import { useCallback as useCallback8 } from "react";
1473
1443
  import { PasswordInput } from "@mantine/core";
1474
- import {
1475
- ariaDescribedByIds as ariaDescribedByIds9,
1476
- labelValue as labelValue7
1477
- } from "@rjsf/utils";
1444
+ import { ariaDescribedByIds as ariaDescribedByIds9, labelValue as labelValue7 } from "@rjsf/utils";
1478
1445
  import { jsx as jsx29 } from "react/jsx-runtime";
1479
1446
  function PasswordWidget(props) {
1480
1447
  const {
@@ -1494,7 +1461,7 @@ function PasswordWidget(props) {
1494
1461
  onBlur,
1495
1462
  onFocus
1496
1463
  } = props;
1497
- const emptyValue = options.emptyValue;
1464
+ const { emptyValue } = options;
1498
1465
  const themeProps = cleanupOptions(options);
1499
1466
  const handleChange = useCallback8(
1500
1467
  (e) => {
@@ -1615,12 +1582,12 @@ function RadioWidget(props) {
1615
1582
  id: optionId2(id, i),
1616
1583
  value: enumOptionValueEncoder2(option.value, i, optionValueFormat),
1617
1584
  label: option.label,
1618
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1,
1585
+ disabled: Array.isArray(enumDisabled) && enumDisabled.includes(option.value),
1619
1586
  autoFocus: i === 0 && autofocus,
1620
1587
  onBlur: handleBlur,
1621
1588
  onFocus: handleFocus
1622
1589
  },
1623
- i
1590
+ String(option.value)
1624
1591
  )) }) : null
1625
1592
  }
1626
1593
  );
@@ -1629,11 +1596,7 @@ function RadioWidget(props) {
1629
1596
  // src/widgets/RangeWidget.tsx
1630
1597
  import { useCallback as useCallback10 } from "react";
1631
1598
  import { Slider, Input as Input3 } from "@mantine/core";
1632
- import {
1633
- ariaDescribedByIds as ariaDescribedByIds11,
1634
- rangeSpec,
1635
- titleId as titleId5
1636
- } from "@rjsf/utils";
1599
+ import { ariaDescribedByIds as ariaDescribedByIds11, rangeSpec, titleId as titleId5 } from "@rjsf/utils";
1637
1600
  import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
1638
1601
  function RangeWidget(props) {
1639
1602
  const {
@@ -1694,7 +1657,10 @@ function RangeWidget(props) {
1694
1657
  "aria-describedby": ariaDescribedByIds11(id)
1695
1658
  }
1696
1659
  ),
1697
- rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ jsx31(Input3.Error, { children: error }, `range-widget-input-errors-${index}`))
1660
+ rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => (
1661
+ // oxlint-disable-next-line react/no-array-index-key
1662
+ /* @__PURE__ */ jsx31(Input3.Error, { children: error }, `range-widget-input-errors-${index}`)
1663
+ ))
1698
1664
  ] });
1699
1665
  }
1700
1666
 
@@ -1762,7 +1728,7 @@ function SelectWidget(props) {
1762
1728
  key: String(index),
1763
1729
  value: enumOptionValueEncoder3(option.value, index, optionValueFormat),
1764
1730
  label: option.label,
1765
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1
1731
+ disabled: Array.isArray(enumDisabled) && enumDisabled.includes(option.value)
1766
1732
  }));
1767
1733
  }
1768
1734
  return [];
@@ -1803,10 +1769,7 @@ function SelectWidget(props) {
1803
1769
  // src/widgets/TextareaWidget.tsx
1804
1770
  import { useCallback as useCallback12 } from "react";
1805
1771
  import { Textarea } from "@mantine/core";
1806
- import {
1807
- labelValue as labelValue9,
1808
- ariaDescribedByIds as ariaDescribedByIds13
1809
- } from "@rjsf/utils";
1772
+ import { labelValue as labelValue9, ariaDescribedByIds as ariaDescribedByIds13 } from "@rjsf/utils";
1810
1773
  import { jsx as jsx33 } from "react/jsx-runtime";
1811
1774
  function TextareaWidget(props) {
1812
1775
  const {