@rjsf/daisyui 6.5.2 → 6.6.0

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 (42) hide show
  1. package/dist/chakra-ui.esm.js +122 -122
  2. package/dist/chakra-ui.esm.js.map +4 -4
  3. package/dist/chakra-ui.umd.js +94 -94
  4. package/dist/index.cjs +129 -129
  5. package/dist/index.cjs.map +4 -4
  6. package/lib/DaisyUIForm.js.map +1 -1
  7. package/lib/templates/BaseInputTemplate/BaseInputTemplate.js +1 -1
  8. package/lib/templates/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  9. package/lib/templates/ButtonTemplates/AddButton.js +1 -1
  10. package/lib/templates/ButtonTemplates/AddButton.js.map +1 -1
  11. package/lib/templates/ButtonTemplates/DaisyUIButton.d.ts +1 -1
  12. package/lib/templates/ButtonTemplates/IconButton.js +1 -1
  13. package/lib/templates/ButtonTemplates/IconButton.js.map +1 -1
  14. package/lib/templates/ButtonTemplates/index.d.ts +1 -1
  15. package/lib/templates/ButtonTemplates/index.js +1 -1
  16. package/lib/templates/ButtonTemplates/index.js.map +1 -1
  17. package/lib/templates/DescriptionField/DescriptionField.js.map +1 -1
  18. package/lib/templates/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
  19. package/lib/templates/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  20. package/lib/templates/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
  21. package/lib/tsconfig.tsbuildinfo +1 -1
  22. package/lib/widgets/DateTimeWidget/DateTimeWidget.js +1 -1
  23. package/lib/widgets/DateTimeWidget/DateTimeWidget.js.map +1 -1
  24. package/lib/widgets/DateWidget/DateWidget.js +1 -1
  25. package/lib/widgets/DateWidget/DateWidget.js.map +1 -1
  26. package/lib/widgets/Widgets.d.ts +1 -1
  27. package/lib/widgets/Widgets.js +1 -1
  28. package/lib/widgets/Widgets.js.map +1 -1
  29. package/package.json +19 -19
  30. package/src/DaisyUIForm.tsx +1 -0
  31. package/src/templates/BaseInputTemplate/BaseInputTemplate.tsx +1 -1
  32. package/src/templates/ButtonTemplates/AddButton.tsx +2 -2
  33. package/src/templates/ButtonTemplates/DaisyUIButton.tsx +2 -2
  34. package/src/templates/ButtonTemplates/IconButton.tsx +2 -2
  35. package/src/templates/ButtonTemplates/index.ts +1 -1
  36. package/src/templates/DescriptionField/DescriptionField.tsx +1 -1
  37. package/src/templates/FieldHelpTemplate/FieldHelpTemplate.tsx +1 -1
  38. package/src/templates/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +1 -1
  39. package/src/tsconfig.json +0 -2
  40. package/src/widgets/DateTimeWidget/DateTimeWidget.tsx +3 -2
  41. package/src/widgets/DateWidget/DateWidget.tsx +3 -2
  42. package/src/widgets/Widgets.tsx +1 -1
@@ -291,21 +291,6 @@
291
291
  }
292
292
  ) }) });
293
293
  }
294
- function SubmitButton({ uiSchema }) {
295
- const { submitText, norender, props: submitButtonProps = {} } = utils.getSubmitButtonOptions(uiSchema);
296
- if (norender) {
297
- return null;
298
- }
299
- return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
300
- "button",
301
- {
302
- type: "submit",
303
- ...submitButtonProps,
304
- className: `btn btn-primary btn-primary-content ${submitButtonProps.className || ""}`,
305
- children: submitText
306
- }
307
- ) });
308
- }
309
294
  function CopyButton(props) {
310
295
  const {
311
296
  registry: { translateString }
@@ -366,6 +351,21 @@
366
351
  }
367
352
  );
368
353
  }
354
+ function SubmitButton({ uiSchema }) {
355
+ const { submitText, norender, props: submitButtonProps = {} } = utils.getSubmitButtonOptions(uiSchema);
356
+ if (norender) {
357
+ return null;
358
+ }
359
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
360
+ "button",
361
+ {
362
+ type: "submit",
363
+ ...submitButtonProps,
364
+ className: `btn btn-primary btn-primary-content ${submitButtonProps.className || ""}`,
365
+ children: submitText
366
+ }
367
+ ) });
368
+ }
369
369
  function DescriptionField(props) {
370
370
  const { id, description, registry, uiSchema } = props;
371
371
  if (!description) {
@@ -745,81 +745,6 @@
745
745
  ] })
746
746
  ] });
747
747
  }
748
- function CheckboxWidget(props) {
749
- const {
750
- id,
751
- htmlName,
752
- value,
753
- required,
754
- disabled,
755
- hideLabel,
756
- label,
757
- readonly,
758
- registry,
759
- options,
760
- schema,
761
- uiSchema,
762
- onChange,
763
- onFocus,
764
- onBlur
765
- } = props;
766
- const DescriptionFieldTemplate = utils.getTemplate(
767
- "DescriptionFieldTemplate",
768
- registry,
769
- options
770
- );
771
- const description = options.description || schema.description;
772
- const handleFocus = react.useCallback(() => {
773
- if (onFocus) {
774
- onFocus(id, value);
775
- }
776
- }, [onFocus, id, value]);
777
- const handleBlur = react.useCallback(() => {
778
- if (onBlur) {
779
- onBlur(id, value);
780
- }
781
- }, [onBlur, id, value]);
782
- const handleChange = react.useCallback(
783
- (event) => {
784
- onChange(event.target.checked);
785
- },
786
- [onChange]
787
- );
788
- const input = /* @__PURE__ */ jsxRuntime.jsx(
789
- "input",
790
- {
791
- type: "checkbox",
792
- id,
793
- name: htmlName || id,
794
- checked: value,
795
- required,
796
- disabled: disabled || readonly,
797
- onChange: handleChange,
798
- onFocus: handleFocus,
799
- onBlur: handleBlur,
800
- className: "checkbox"
801
- }
802
- );
803
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "form-control", children: [
804
- !hideLabel && description && /* @__PURE__ */ jsxRuntime.jsx(
805
- DescriptionFieldTemplate,
806
- {
807
- id: utils.descriptionId(id),
808
- description,
809
- schema,
810
- uiSchema,
811
- registry
812
- }
813
- ),
814
- hideLabel || !label ? input : /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "label cursor-pointer justify-start", children: [
815
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-2", children: input }),
816
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "label-text", children: [
817
- label,
818
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error ml-1", children: "*" })
819
- ] })
820
- ] })
821
- ] });
822
- }
823
748
  function CheckboxesWidget({
824
749
  id,
825
750
  htmlName,
@@ -901,6 +826,81 @@
901
826
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "label-text", children: option.label })
902
827
  ] }, option.value)) }) });
903
828
  }
829
+ function CheckboxWidget(props) {
830
+ const {
831
+ id,
832
+ htmlName,
833
+ value,
834
+ required,
835
+ disabled,
836
+ hideLabel,
837
+ label,
838
+ readonly,
839
+ registry,
840
+ options,
841
+ schema,
842
+ uiSchema,
843
+ onChange,
844
+ onFocus,
845
+ onBlur
846
+ } = props;
847
+ const DescriptionFieldTemplate = utils.getTemplate(
848
+ "DescriptionFieldTemplate",
849
+ registry,
850
+ options
851
+ );
852
+ const description = options.description || schema.description;
853
+ const handleFocus = react.useCallback(() => {
854
+ if (onFocus) {
855
+ onFocus(id, value);
856
+ }
857
+ }, [onFocus, id, value]);
858
+ const handleBlur = react.useCallback(() => {
859
+ if (onBlur) {
860
+ onBlur(id, value);
861
+ }
862
+ }, [onBlur, id, value]);
863
+ const handleChange = react.useCallback(
864
+ (event) => {
865
+ onChange(event.target.checked);
866
+ },
867
+ [onChange]
868
+ );
869
+ const input = /* @__PURE__ */ jsxRuntime.jsx(
870
+ "input",
871
+ {
872
+ type: "checkbox",
873
+ id,
874
+ name: htmlName || id,
875
+ checked: value,
876
+ required,
877
+ disabled: disabled || readonly,
878
+ onChange: handleChange,
879
+ onFocus: handleFocus,
880
+ onBlur: handleBlur,
881
+ className: "checkbox"
882
+ }
883
+ );
884
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "form-control", children: [
885
+ !hideLabel && description && /* @__PURE__ */ jsxRuntime.jsx(
886
+ DescriptionFieldTemplate,
887
+ {
888
+ id: utils.descriptionId(id),
889
+ description,
890
+ schema,
891
+ uiSchema,
892
+ registry
893
+ }
894
+ ),
895
+ hideLabel || !label ? input : /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "label cursor-pointer justify-start", children: [
896
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-2", children: input }),
897
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "label-text", children: [
898
+ label,
899
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error ml-1", children: "*" })
900
+ ] })
901
+ ] })
902
+ ] });
903
+ }
904
904
  function useDatePickerState(initialDate) {
905
905
  const [isOpen, setIsOpen] = react.useState(false);
906
906
  const [month, setMonth] = react.useState(initialDate ?? /* @__PURE__ */ new Date());
@@ -965,8 +965,8 @@
965
965
  onMonthChange,
966
966
  onSelect,
967
967
  captionLayout: "dropdown",
968
- fromYear: 1900,
969
- toYear: (/* @__PURE__ */ new Date()).getFullYear() + 10,
968
+ startMonth: new Date(1900, 0),
969
+ endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11),
970
970
  showOutsideDays: true,
971
971
  classNames: dayPickerStyles.classNames,
972
972
  modifiers: customDayModifiers,
@@ -1198,8 +1198,8 @@
1198
1198
  onMonthChange,
1199
1199
  onSelect,
1200
1200
  captionLayout: "dropdown",
1201
- fromYear: 1900,
1202
- toYear: (/* @__PURE__ */ new Date()).getFullYear() + 10,
1201
+ startMonth: new Date(1900, 0),
1202
+ endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11),
1203
1203
  showOutsideDays: true,
1204
1204
  classNames: dayPickerStyles2.classNames,
1205
1205
  modifiers: customDayModifiers,
package/dist/index.cjs CHANGED
@@ -228,8 +228,8 @@ function ArrayFieldTemplate(props) {
228
228
 
229
229
  // src/templates/BaseInputTemplate/BaseInputTemplate.tsx
230
230
  var import_react2 = require("react");
231
- var import_utils4 = require("@rjsf/utils");
232
231
  var import_core = require("@rjsf/core");
232
+ var import_utils4 = require("@rjsf/utils");
233
233
  var import_jsx_runtime4 = require("react/jsx-runtime");
234
234
  function BaseInputTemplate(props) {
235
235
  const {
@@ -314,9 +314,9 @@ function BaseInputTemplate(props) {
314
314
  }
315
315
 
316
316
  // src/templates/ButtonTemplates/AddButton.tsx
317
- var import_utils5 = require("@rjsf/utils");
318
317
  var import_fontawesome_svg_core = require("@fortawesome/fontawesome-svg-core");
319
318
  var import_free_solid_svg_icons = require("@fortawesome/free-solid-svg-icons");
319
+ var import_utils5 = require("@rjsf/utils");
320
320
 
321
321
  // src/templates/ButtonTemplates/DaisyUIButton.tsx
322
322
  var import_react3 = require("react");
@@ -355,43 +355,24 @@ function AddButton({
355
355
  ) }) });
356
356
  }
357
357
 
358
- // src/templates/ButtonTemplates/SubmitButton.tsx
359
- var import_utils6 = require("@rjsf/utils");
360
- var import_jsx_runtime7 = require("react/jsx-runtime");
361
- function SubmitButton({ uiSchema }) {
362
- const { submitText, norender, props: submitButtonProps = {} } = (0, import_utils6.getSubmitButtonOptions)(uiSchema);
363
- if (norender) {
364
- return null;
365
- }
366
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
367
- "button",
368
- {
369
- type: "submit",
370
- ...submitButtonProps,
371
- className: `btn btn-primary btn-primary-content ${submitButtonProps.className || ""}`,
372
- children: submitText
373
- }
374
- ) });
375
- }
376
-
377
358
  // src/templates/ButtonTemplates/IconButton.tsx
378
- var import_utils7 = require("@rjsf/utils");
379
359
  var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
380
- var import_jsx_runtime8 = require("react/jsx-runtime");
360
+ var import_utils6 = require("@rjsf/utils");
361
+ var import_jsx_runtime7 = require("react/jsx-runtime");
381
362
  function CopyButton(props) {
382
363
  const {
383
364
  registry: { translateString }
384
365
  } = props;
385
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DaisyUIButton_default, { title: translateString(import_utils7.TranslatableString.CopyButton), ...props, icon: import_free_solid_svg_icons2.faCopy });
366
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DaisyUIButton_default, { title: translateString(import_utils6.TranslatableString.CopyButton), ...props, icon: import_free_solid_svg_icons2.faCopy });
386
367
  }
387
368
  function MoveDownButton(props) {
388
369
  const {
389
370
  registry: { translateString }
390
371
  } = props;
391
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
372
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
392
373
  DaisyUIButton_default,
393
374
  {
394
- title: translateString(import_utils7.TranslatableString.MoveDownButton),
375
+ title: translateString(import_utils6.TranslatableString.MoveDownButton),
395
376
  ...props,
396
377
  icon: import_free_solid_svg_icons2.faArrowDown
397
378
  }
@@ -401,10 +382,10 @@ function MoveUpButton(props) {
401
382
  const {
402
383
  registry: { translateString }
403
384
  } = props;
404
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
385
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
405
386
  DaisyUIButton_default,
406
387
  {
407
- title: translateString(import_utils7.TranslatableString.MoveUpButton),
388
+ title: translateString(import_utils6.TranslatableString.MoveUpButton),
408
389
  ...props,
409
390
  icon: import_free_solid_svg_icons2.faArrowUp
410
391
  }
@@ -414,10 +395,10 @@ function RemoveButton(props) {
414
395
  const {
415
396
  registry: { translateString }
416
397
  } = props;
417
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
398
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
418
399
  DaisyUIButton_default,
419
400
  {
420
- title: translateString(import_utils7.TranslatableString.RemoveButton),
401
+ title: translateString(import_utils6.TranslatableString.RemoveButton),
421
402
  ...props,
422
403
  iconType: "danger",
423
404
  icon: import_free_solid_svg_icons2.faTrash
@@ -428,10 +409,10 @@ function ClearButton(props) {
428
409
  const {
429
410
  registry: { translateString }
430
411
  } = props;
431
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
412
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
432
413
  DaisyUIButton_default,
433
414
  {
434
- title: translateString(import_utils7.TranslatableString.ClearButton),
415
+ title: translateString(import_utils6.TranslatableString.ClearButton),
435
416
  ...props,
436
417
  iconType: "default",
437
418
  icon: import_free_solid_svg_icons2.faXmark
@@ -439,6 +420,25 @@ function ClearButton(props) {
439
420
  );
440
421
  }
441
422
 
423
+ // src/templates/ButtonTemplates/SubmitButton.tsx
424
+ var import_utils7 = require("@rjsf/utils");
425
+ var import_jsx_runtime8 = require("react/jsx-runtime");
426
+ function SubmitButton({ uiSchema }) {
427
+ const { submitText, norender, props: submitButtonProps = {} } = (0, import_utils7.getSubmitButtonOptions)(uiSchema);
428
+ if (norender) {
429
+ return null;
430
+ }
431
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
432
+ "button",
433
+ {
434
+ type: "submit",
435
+ ...submitButtonProps,
436
+ className: `btn btn-primary btn-primary-content ${submitButtonProps.className || ""}`,
437
+ children: submitText
438
+ }
439
+ ) });
440
+ }
441
+
442
442
  // src/templates/DescriptionField/DescriptionField.tsx
443
443
  var import_core2 = require("@rjsf/core");
444
444
  var import_jsx_runtime9 = require("react/jsx-runtime");
@@ -465,8 +465,8 @@ function FieldErrorTemplate(props) {
465
465
  }
466
466
 
467
467
  // src/templates/FieldHelpTemplate/FieldHelpTemplate.tsx
468
- var import_utils8 = require("@rjsf/utils");
469
468
  var import_core3 = require("@rjsf/core");
469
+ var import_utils8 = require("@rjsf/utils");
470
470
  var import_jsx_runtime12 = require("react/jsx-runtime");
471
471
  function FieldHelpTemplate(props) {
472
472
  const { help, uiSchema, registry, fieldPathId } = props;
@@ -866,90 +866,10 @@ function AltDateWidget(props) {
866
866
  ] });
867
867
  }
868
868
 
869
- // src/widgets/CheckboxWidget/CheckboxWidget.tsx
869
+ // src/widgets/CheckboxesWidget/CheckboxesWidget.tsx
870
870
  var import_react4 = require("react");
871
871
  var import_utils14 = require("@rjsf/utils");
872
872
  var import_jsx_runtime22 = require("react/jsx-runtime");
873
- function CheckboxWidget(props) {
874
- const {
875
- id,
876
- htmlName,
877
- value,
878
- required,
879
- disabled,
880
- hideLabel,
881
- label,
882
- readonly,
883
- registry,
884
- options,
885
- schema,
886
- uiSchema,
887
- onChange,
888
- onFocus,
889
- onBlur
890
- } = props;
891
- const DescriptionFieldTemplate = (0, import_utils14.getTemplate)(
892
- "DescriptionFieldTemplate",
893
- registry,
894
- options
895
- );
896
- const description = options.description || schema.description;
897
- const handleFocus = (0, import_react4.useCallback)(() => {
898
- if (onFocus) {
899
- onFocus(id, value);
900
- }
901
- }, [onFocus, id, value]);
902
- const handleBlur = (0, import_react4.useCallback)(() => {
903
- if (onBlur) {
904
- onBlur(id, value);
905
- }
906
- }, [onBlur, id, value]);
907
- const handleChange = (0, import_react4.useCallback)(
908
- (event) => {
909
- onChange(event.target.checked);
910
- },
911
- [onChange]
912
- );
913
- const input = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
914
- "input",
915
- {
916
- type: "checkbox",
917
- id,
918
- name: htmlName || id,
919
- checked: value,
920
- required,
921
- disabled: disabled || readonly,
922
- onChange: handleChange,
923
- onFocus: handleFocus,
924
- onBlur: handleBlur,
925
- className: "checkbox"
926
- }
927
- );
928
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "form-control", children: [
929
- !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
930
- DescriptionFieldTemplate,
931
- {
932
- id: (0, import_utils14.descriptionId)(id),
933
- description,
934
- schema,
935
- uiSchema,
936
- registry
937
- }
938
- ),
939
- hideLabel || !label ? input : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "label cursor-pointer justify-start", children: [
940
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mr-2", children: input }),
941
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "label-text", children: [
942
- label,
943
- required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-error ml-1", children: "*" })
944
- ] })
945
- ] })
946
- ] });
947
- }
948
-
949
- // src/widgets/CheckboxesWidget/CheckboxesWidget.tsx
950
- var import_react5 = require("react");
951
- var import_utils15 = require("@rjsf/utils");
952
- var import_jsx_runtime23 = require("react/jsx-runtime");
953
873
  function CheckboxesWidget({
954
874
  id,
955
875
  htmlName,
@@ -963,9 +883,9 @@ function CheckboxesWidget({
963
883
  onBlur
964
884
  }) {
965
885
  const { enumOptions, emptyValue } = options;
966
- const optionValueFormat = (0, import_utils15.getOptionValueFormat)(options);
886
+ const optionValueFormat = (0, import_utils14.getOptionValueFormat)(options);
967
887
  const isEnumeratedObject = enumOptions && enumOptions[0]?.value && typeof enumOptions[0].value === "object";
968
- const isChecked = (0, import_react5.useCallback)(
888
+ const isChecked = (0, import_react4.useCallback)(
969
889
  (option) => {
970
890
  if (!Array.isArray(value)) {
971
891
  return false;
@@ -977,7 +897,7 @@ function CheckboxesWidget({
977
897
  },
978
898
  [value, isEnumeratedObject]
979
899
  );
980
- const handleChange = (0, import_react5.useCallback)(
900
+ const handleChange = (0, import_react4.useCallback)(
981
901
  (event) => {
982
902
  const index = Number(event.target.dataset.index);
983
903
  const option = enumOptions?.[index];
@@ -994,31 +914,31 @@ function CheckboxesWidget({
994
914
  },
995
915
  [onChange, value, isChecked, isEnumeratedObject, enumOptions]
996
916
  );
997
- const handleFocus = (0, import_react5.useCallback)(
917
+ const handleFocus = (0, import_react4.useCallback)(
998
918
  (event) => {
999
919
  if (onFocus) {
1000
- onFocus(id, (0, import_utils15.enumOptionValueDecoder)(event.target.value, enumOptions, optionValueFormat, emptyValue));
920
+ onFocus(id, (0, import_utils14.enumOptionValueDecoder)(event.target.value, enumOptions, optionValueFormat, emptyValue));
1001
921
  }
1002
922
  },
1003
923
  [onFocus, id, enumOptions, optionValueFormat, emptyValue]
1004
924
  );
1005
- const handleBlur = (0, import_react5.useCallback)(
925
+ const handleBlur = (0, import_react4.useCallback)(
1006
926
  (event) => {
1007
927
  if (onBlur) {
1008
- onBlur(id, (0, import_utils15.enumOptionValueDecoder)(event.target.value, enumOptions, optionValueFormat, emptyValue));
928
+ onBlur(id, (0, import_utils14.enumOptionValueDecoder)(event.target.value, enumOptions, optionValueFormat, emptyValue));
1009
929
  }
1010
930
  },
1011
931
  [onBlur, id, enumOptions, optionValueFormat, emptyValue]
1012
932
  );
1013
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "form-control", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col gap-2 mt-1", children: enumOptions?.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "flex items-center cursor-pointer gap-2", children: [
1014
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
933
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "form-control", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex flex-col gap-2 mt-1", children: enumOptions?.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "flex items-center cursor-pointer gap-2", children: [
934
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1015
935
  "input",
1016
936
  {
1017
937
  type: "checkbox",
1018
938
  id: `${id}-${option.value}`,
1019
939
  className: "checkbox",
1020
940
  name: htmlName || id,
1021
- value: (0, import_utils15.enumOptionValueEncoder)(option.value, index, optionValueFormat),
941
+ value: (0, import_utils14.enumOptionValueEncoder)(option.value, index, optionValueFormat),
1022
942
  checked: isChecked(option),
1023
943
  required,
1024
944
  disabled: disabled || readonly,
@@ -1028,10 +948,90 @@ function CheckboxesWidget({
1028
948
  onBlur: handleBlur
1029
949
  }
1030
950
  ),
1031
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "label-text", children: option.label })
951
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "label-text", children: option.label })
1032
952
  ] }, option.value)) }) });
1033
953
  }
1034
954
 
955
+ // src/widgets/CheckboxWidget/CheckboxWidget.tsx
956
+ var import_react5 = require("react");
957
+ var import_utils15 = require("@rjsf/utils");
958
+ var import_jsx_runtime23 = require("react/jsx-runtime");
959
+ function CheckboxWidget(props) {
960
+ const {
961
+ id,
962
+ htmlName,
963
+ value,
964
+ required,
965
+ disabled,
966
+ hideLabel,
967
+ label,
968
+ readonly,
969
+ registry,
970
+ options,
971
+ schema,
972
+ uiSchema,
973
+ onChange,
974
+ onFocus,
975
+ onBlur
976
+ } = props;
977
+ const DescriptionFieldTemplate = (0, import_utils15.getTemplate)(
978
+ "DescriptionFieldTemplate",
979
+ registry,
980
+ options
981
+ );
982
+ const description = options.description || schema.description;
983
+ const handleFocus = (0, import_react5.useCallback)(() => {
984
+ if (onFocus) {
985
+ onFocus(id, value);
986
+ }
987
+ }, [onFocus, id, value]);
988
+ const handleBlur = (0, import_react5.useCallback)(() => {
989
+ if (onBlur) {
990
+ onBlur(id, value);
991
+ }
992
+ }, [onBlur, id, value]);
993
+ const handleChange = (0, import_react5.useCallback)(
994
+ (event) => {
995
+ onChange(event.target.checked);
996
+ },
997
+ [onChange]
998
+ );
999
+ const input = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1000
+ "input",
1001
+ {
1002
+ type: "checkbox",
1003
+ id,
1004
+ name: htmlName || id,
1005
+ checked: value,
1006
+ required,
1007
+ disabled: disabled || readonly,
1008
+ onChange: handleChange,
1009
+ onFocus: handleFocus,
1010
+ onBlur: handleBlur,
1011
+ className: "checkbox"
1012
+ }
1013
+ );
1014
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "form-control", children: [
1015
+ !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1016
+ DescriptionFieldTemplate,
1017
+ {
1018
+ id: (0, import_utils15.descriptionId)(id),
1019
+ description,
1020
+ schema,
1021
+ uiSchema,
1022
+ registry
1023
+ }
1024
+ ),
1025
+ hideLabel || !label ? input : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "label cursor-pointer justify-start", children: [
1026
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mr-2", children: input }),
1027
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "label-text", children: [
1028
+ label,
1029
+ required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-error ml-1", children: "*" })
1030
+ ] })
1031
+ ] })
1032
+ ] });
1033
+ }
1034
+
1035
1035
  // src/widgets/DateTimeWidget/DateTimeWidget.tsx
1036
1036
  var import_react6 = require("react");
1037
1037
  var import_free_solid_svg_icons4 = require("@fortawesome/free-solid-svg-icons");
@@ -1104,8 +1104,8 @@ function DateTimePickerPopup({ selectedDate, month, onMonthChange, onSelect, onT
1104
1104
  onMonthChange,
1105
1105
  onSelect,
1106
1106
  captionLayout: "dropdown",
1107
- fromYear: 1900,
1108
- toYear: (/* @__PURE__ */ new Date()).getFullYear() + 10,
1107
+ startMonth: new Date(1900, 0),
1108
+ endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11),
1109
1109
  showOutsideDays: true,
1110
1110
  classNames: dayPickerStyles.classNames,
1111
1111
  modifiers: customDayModifiers,
@@ -1346,8 +1346,8 @@ function DatePickerPopup({ selectedDate, month, onMonthChange, onSelect }) {
1346
1346
  onMonthChange,
1347
1347
  onSelect,
1348
1348
  captionLayout: "dropdown",
1349
- fromYear: 1900,
1350
- toYear: (/* @__PURE__ */ new Date()).getFullYear() + 10,
1349
+ startMonth: new Date(1900, 0),
1350
+ endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11),
1351
1351
  showOutsideDays: true,
1352
1352
  classNames: dayPickerStyles2.classNames,
1353
1353
  modifiers: customDayModifiers,