@rjsf/mantine 6.2.4 → 6.3.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.
- package/dist/index.cjs +80 -81
- package/dist/index.cjs.map +2 -2
- package/dist/mantine.esm.js +2 -3
- package/dist/mantine.esm.js.map +2 -2
- package/dist/mantine.umd.js +1 -3
- package/lib/templates/BaseInputTemplate.js +2 -5
- package/lib/templates/BaseInputTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/templates/BaseInputTemplate.tsx +2 -9
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
module.exports = __toCommonJS(index_exports);
|
|
44
44
|
|
|
45
45
|
// src/Form/index.ts
|
|
46
|
-
var
|
|
46
|
+
var import_core30 = require("@rjsf/core");
|
|
47
47
|
|
|
48
48
|
// src/templates/ArrayFieldItemTemplate.tsx
|
|
49
49
|
var import_utils = require("@rjsf/utils");
|
|
@@ -165,6 +165,7 @@ function ArrayFieldTitleTemplate(props) {
|
|
|
165
165
|
var import_react = require("react");
|
|
166
166
|
var import_utils4 = require("@rjsf/utils");
|
|
167
167
|
var import_core4 = require("@mantine/core");
|
|
168
|
+
var import_core5 = require("@rjsf/core");
|
|
168
169
|
|
|
169
170
|
// src/utils.ts
|
|
170
171
|
var uiOptionsKeys = [
|
|
@@ -305,27 +306,25 @@ function BaseInputTemplate(props) {
|
|
|
305
306
|
input,
|
|
306
307
|
options.allowClearTextInputs && !readonly && !disabled && value && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ClearButton2, { registry, onClick: handleClear }),
|
|
307
308
|
children,
|
|
308
|
-
|
|
309
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("option", { value: example }, example);
|
|
310
|
-
}) })
|
|
309
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core5.SchemaExamples, { id, schema })
|
|
311
310
|
] });
|
|
312
311
|
}
|
|
313
312
|
|
|
314
313
|
// src/templates/DescriptionField.tsx
|
|
315
|
-
var
|
|
316
|
-
var
|
|
314
|
+
var import_core6 = require("@rjsf/core");
|
|
315
|
+
var import_core7 = require("@mantine/core");
|
|
317
316
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
318
317
|
function DescriptionField(props) {
|
|
319
318
|
const { id, description, registry, uiSchema } = props;
|
|
320
319
|
if (description) {
|
|
321
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core7.Text, { id, mt: 3, mb: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core6.RichDescription, { description, registry, uiSchema }) });
|
|
322
321
|
}
|
|
323
322
|
return null;
|
|
324
323
|
}
|
|
325
324
|
|
|
326
325
|
// src/templates/ErrorList.tsx
|
|
327
326
|
var import_utils6 = require("@rjsf/utils");
|
|
328
|
-
var
|
|
327
|
+
var import_core8 = require("@mantine/core");
|
|
329
328
|
|
|
330
329
|
// src/templates/icons.tsx
|
|
331
330
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -480,19 +479,19 @@ function ErrorList({
|
|
|
480
479
|
}) {
|
|
481
480
|
const { translateString } = registry;
|
|
482
481
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
483
|
-
|
|
482
|
+
import_core8.Alert,
|
|
484
483
|
{
|
|
485
484
|
color: "red",
|
|
486
485
|
variant: "transparent",
|
|
487
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
486
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core8.Title, { order: 5, fw: "normal", children: translateString(import_utils6.TranslatableString.ErrorsLabel) }),
|
|
488
487
|
icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ExclamationCircle, {}),
|
|
489
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core8.List, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core8.List.Item, { c: "red", children: error.stack }, `error-${index}`)) })
|
|
490
489
|
}
|
|
491
490
|
);
|
|
492
491
|
}
|
|
493
492
|
|
|
494
493
|
// src/templates/ButtonTemplates/SubmitButton.tsx
|
|
495
|
-
var
|
|
494
|
+
var import_core9 = require("@mantine/core");
|
|
496
495
|
var import_utils7 = require("@rjsf/utils");
|
|
497
496
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
498
497
|
function SubmitButton({ uiSchema }) {
|
|
@@ -500,20 +499,20 @@ function SubmitButton({ uiSchema }) {
|
|
|
500
499
|
if (norender) {
|
|
501
500
|
return null;
|
|
502
501
|
}
|
|
503
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core9.Button, { type: "submit", variant: "filled", ...submitButtonProps, children: submitText });
|
|
504
503
|
}
|
|
505
504
|
|
|
506
505
|
// src/templates/ButtonTemplates/AddButton.tsx
|
|
507
506
|
var import_utils9 = require("@rjsf/utils");
|
|
508
507
|
|
|
509
508
|
// src/templates/ButtonTemplates/IconButton.tsx
|
|
510
|
-
var
|
|
509
|
+
var import_core10 = require("@mantine/core");
|
|
511
510
|
var import_utils8 = require("@rjsf/utils");
|
|
512
511
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
513
512
|
function IconButton(props) {
|
|
514
513
|
const { icon, iconType = "sm", color, onClick, uiSchema, registry, ...otherProps } = props;
|
|
515
514
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
516
|
-
|
|
515
|
+
import_core10.ActionIcon,
|
|
517
516
|
{
|
|
518
517
|
size: iconType,
|
|
519
518
|
color,
|
|
@@ -604,18 +603,18 @@ var ButtonTemplates_default = buttonTemplates;
|
|
|
604
603
|
|
|
605
604
|
// src/templates/FieldErrorTemplate.tsx
|
|
606
605
|
var import_utils10 = require("@rjsf/utils");
|
|
607
|
-
var
|
|
606
|
+
var import_core11 = require("@mantine/core");
|
|
608
607
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
609
608
|
function FieldErrorTemplate({ errors, fieldPathId }) {
|
|
610
609
|
if (!errors || !errors.length) {
|
|
611
610
|
return null;
|
|
612
611
|
}
|
|
613
612
|
const id = (0, import_utils10.errorId)(fieldPathId);
|
|
614
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core11.Box, { id, c: "red", display: "none", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core11.List, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core11.List.Item, { children: error }, `field-error-${index}`)) }) });
|
|
615
614
|
}
|
|
616
615
|
|
|
617
616
|
// src/templates/FieldTemplate.tsx
|
|
618
|
-
var
|
|
617
|
+
var import_core12 = require("@mantine/core");
|
|
619
618
|
var import_utils11 = require("@rjsf/utils");
|
|
620
619
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
621
620
|
function FieldTemplate(props) {
|
|
@@ -643,7 +642,7 @@ function FieldTemplate(props) {
|
|
|
643
642
|
uiOptions
|
|
644
643
|
);
|
|
645
644
|
if (hidden) {
|
|
646
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_core12.Box, { display: "none", children });
|
|
647
646
|
}
|
|
648
647
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
649
648
|
WrapIfAdditionalTemplate2,
|
|
@@ -669,33 +668,33 @@ function FieldTemplate(props) {
|
|
|
669
668
|
|
|
670
669
|
// src/templates/FieldHelpTemplate.tsx
|
|
671
670
|
var import_utils12 = require("@rjsf/utils");
|
|
672
|
-
var
|
|
673
|
-
var
|
|
671
|
+
var import_core13 = require("@mantine/core");
|
|
672
|
+
var import_core14 = require("@rjsf/core");
|
|
674
673
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
675
674
|
function FieldHelpTemplate(props) {
|
|
676
675
|
const { fieldPathId, help, uiSchema, registry } = props;
|
|
677
676
|
if (!help) {
|
|
678
677
|
return null;
|
|
679
678
|
}
|
|
680
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core13.Text, { id: (0, import_utils12.helpId)(fieldPathId), size: "sm", my: "xs", c: "dimmed", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core14.RichHelp, { help, registry, uiSchema }) });
|
|
681
680
|
}
|
|
682
681
|
|
|
683
682
|
// src/templates/GridTemplate.tsx
|
|
684
|
-
var
|
|
683
|
+
var import_core15 = require("@mantine/core");
|
|
685
684
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
686
685
|
function GridTemplate(props) {
|
|
687
686
|
const { children, column, fluid = true, ...rest } = props;
|
|
688
687
|
if (column) {
|
|
689
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core15.Grid.Col, { ...rest, children });
|
|
690
689
|
}
|
|
691
690
|
if (fluid) {
|
|
692
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core15.Container, { p: "4", mx: 0, w: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core15.Grid, { ...rest, children }) });
|
|
693
692
|
}
|
|
694
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core15.Grid, { grow: true, ...rest, children });
|
|
695
694
|
}
|
|
696
695
|
|
|
697
696
|
// src/templates/ObjectFieldTemplate.tsx
|
|
698
|
-
var
|
|
697
|
+
var import_core16 = require("@mantine/core");
|
|
699
698
|
var import_utils13 = require("@rjsf/utils");
|
|
700
699
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
701
700
|
function ObjectFieldTemplate(props) {
|
|
@@ -728,7 +727,7 @@ function ObjectFieldTemplate(props) {
|
|
|
728
727
|
const gridCols = typeof uiOptions?.gridCols === "number" && uiOptions?.gridCols || void 0;
|
|
729
728
|
const gridSpacing = uiOptions?.gridSpacing;
|
|
730
729
|
const gridVerticalSpacing = uiOptions?.gridVerticalSpacing;
|
|
731
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core16.Container, { id: fieldPathId.$id, p: 0, children: [
|
|
732
731
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
733
732
|
TitleFieldTemplate,
|
|
734
733
|
{
|
|
@@ -752,7 +751,7 @@ function ObjectFieldTemplate(props) {
|
|
|
752
751
|
}
|
|
753
752
|
),
|
|
754
753
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
755
|
-
|
|
754
|
+
import_core16.SimpleGrid,
|
|
756
755
|
{
|
|
757
756
|
cols: gridCols,
|
|
758
757
|
spacing: gridSpacing,
|
|
@@ -760,11 +759,11 @@ function ObjectFieldTemplate(props) {
|
|
|
760
759
|
mb: "sm",
|
|
761
760
|
children: [
|
|
762
761
|
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
763
|
-
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
762
|
+
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core16.Box, { children: element.content }, element.name))
|
|
764
763
|
]
|
|
765
764
|
}
|
|
766
765
|
),
|
|
767
|
-
(0, import_utils13.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
766
|
+
(0, import_utils13.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core16.Group, { mt: "xs", justify: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
768
767
|
AddButton2,
|
|
769
768
|
{
|
|
770
769
|
id: (0, import_utils13.buttonId)(fieldPathId, "add"),
|
|
@@ -811,15 +810,15 @@ function OptionalDataControlsTemplate(props) {
|
|
|
811
810
|
}
|
|
812
811
|
|
|
813
812
|
// src/templates/TitleField.tsx
|
|
814
|
-
var
|
|
813
|
+
var import_core17 = require("@mantine/core");
|
|
815
814
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
816
815
|
function TitleField(props) {
|
|
817
816
|
const { id, title, optionalDataControl } = props;
|
|
818
|
-
let heading = title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
817
|
+
let heading = title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core17.Title, { id, order: 3, fw: "normal", children: title }) : null;
|
|
819
818
|
if (optionalDataControl) {
|
|
820
|
-
heading = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
821
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
822
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
819
|
+
heading = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core17.Grid, { children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core17.Grid.Col, { span: "auto", children: heading }),
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core17.Grid.Col, { span: "content", children: optionalDataControl })
|
|
823
822
|
] });
|
|
824
823
|
}
|
|
825
824
|
return heading;
|
|
@@ -827,7 +826,7 @@ function TitleField(props) {
|
|
|
827
826
|
|
|
828
827
|
// src/templates/WrapIfAdditionalTemplate.tsx
|
|
829
828
|
var import_utils14 = require("@rjsf/utils");
|
|
830
|
-
var
|
|
829
|
+
var import_core18 = require("@mantine/core");
|
|
831
830
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
832
831
|
function WrapIfAdditionalTemplate(props) {
|
|
833
832
|
const {
|
|
@@ -859,10 +858,10 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
859
858
|
...uiSchema,
|
|
860
859
|
[import_utils14.UI_OPTIONS_KEY]: { ...uiOptions, block: true }
|
|
861
860
|
};
|
|
862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
863
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
865
|
-
|
|
861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core18.Flex, { gap: "xs", align: "end", justify: "center", children: [
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core18.Grid, { w: "100%", align: "center", children: [
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core18.Grid.Col, { span: 6, className: "form-additional", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
864
|
+
import_core18.TextInput,
|
|
866
865
|
{
|
|
867
866
|
className: "form-group",
|
|
868
867
|
label: displayLabel ? keyLabel : void 0,
|
|
@@ -875,7 +874,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
875
874
|
onBlur: !readonly ? onKeyRenameBlur : void 0
|
|
876
875
|
}
|
|
877
876
|
) }),
|
|
878
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core18.Grid.Col, { span: 6, className: "form-additional", children })
|
|
879
878
|
] }),
|
|
880
879
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
881
880
|
RemoveButton2,
|
|
@@ -893,10 +892,10 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
893
892
|
}
|
|
894
893
|
|
|
895
894
|
// src/templates/MultiSchemaFieldTemplate.tsx
|
|
896
|
-
var
|
|
895
|
+
var import_core19 = require("@mantine/core");
|
|
897
896
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
898
897
|
function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
|
|
899
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core19.Stack, { style: { marginBottom: "1rem" }, children: [
|
|
900
899
|
selector,
|
|
901
900
|
optionSchemaField
|
|
902
901
|
] });
|
|
@@ -938,19 +937,19 @@ function AltDateTimeWidget(props) {
|
|
|
938
937
|
|
|
939
938
|
// src/widgets/DateTime/AltDateWidget.tsx
|
|
940
939
|
var import_utils15 = require("@rjsf/utils");
|
|
941
|
-
var
|
|
940
|
+
var import_core20 = require("@mantine/core");
|
|
942
941
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
943
942
|
function AltDateWidget(props) {
|
|
944
943
|
const { id, required, disabled, readonly, label, hideLabel, rawErrors, options, registry } = props;
|
|
945
944
|
const { translateString } = registry;
|
|
946
945
|
const { elements, handleChange, handleClear, handleSetNow } = (0, import_utils15.useAltDateWidgetProps)(props);
|
|
947
946
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
948
|
-
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
949
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
947
|
+
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Input.Label, { id: (0, import_utils15.titleId)(id), required, children: label }),
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Flex, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
950
949
|
elements.map((elemProps, i) => {
|
|
951
950
|
const elemId = `${id}_${elemProps.type}`;
|
|
952
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
953
|
-
|
|
951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
952
|
+
import_core20.Select,
|
|
954
953
|
{
|
|
955
954
|
id: elemId,
|
|
956
955
|
name: elemId,
|
|
@@ -966,12 +965,12 @@ function AltDateWidget(props) {
|
|
|
966
965
|
}
|
|
967
966
|
) }, i);
|
|
968
967
|
}),
|
|
969
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
970
|
-
(options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
971
|
-
(options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
968
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core20.Group, { wrap: "nowrap", gap: 3, children: [
|
|
969
|
+
(options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Button, { variant: "subtle", size: "xs", onClick: handleSetNow, children: translateString(import_utils15.TranslatableString.NowLabel) }),
|
|
970
|
+
(options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Button, { variant: "subtle", size: "xs", onClick: handleClear, children: translateString(import_utils15.TranslatableString.ClearLabel) })
|
|
972
971
|
] })
|
|
973
972
|
] }),
|
|
974
|
-
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
973
|
+
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core20.Input.Error, { children: error }, `alt-date-widget-input-errors-${index}`))
|
|
975
974
|
] });
|
|
976
975
|
}
|
|
977
976
|
|
|
@@ -1156,7 +1155,7 @@ function TimeWidget(props) {
|
|
|
1156
1155
|
// src/widgets/CheckboxesWidget.tsx
|
|
1157
1156
|
var import_react4 = require("react");
|
|
1158
1157
|
var import_utils18 = require("@rjsf/utils");
|
|
1159
|
-
var
|
|
1158
|
+
var import_core21 = require("@mantine/core");
|
|
1160
1159
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1161
1160
|
function CheckboxesWidget(props) {
|
|
1162
1161
|
const {
|
|
@@ -1203,9 +1202,9 @@ function CheckboxesWidget(props) {
|
|
|
1203
1202
|
);
|
|
1204
1203
|
const selectedIndexes = (0, import_utils18.enumOptionsIndexForValue)(value, enumOptions, true);
|
|
1205
1204
|
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1206
|
-
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1205
|
+
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core21.Input.Label, { id: (0, import_utils18.titleId)(id), required, children: label }),
|
|
1207
1206
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1208
|
-
|
|
1207
|
+
import_core21.Checkbox.Group,
|
|
1209
1208
|
{
|
|
1210
1209
|
id,
|
|
1211
1210
|
value: selectedIndexes,
|
|
@@ -1215,8 +1214,8 @@ function CheckboxesWidget(props) {
|
|
|
1215
1214
|
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
1216
1215
|
"aria-describedby": (0, import_utils18.ariaDescribedByIds)(id),
|
|
1217
1216
|
...themeProps,
|
|
1218
|
-
children: Array.isArray(enumOptions) ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1219
|
-
|
|
1217
|
+
children: Array.isArray(enumOptions) ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core21.Flex, { mt: "xs", direction: inline ? "row" : "column", gap: "xs", wrap: "wrap", children: enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1218
|
+
import_core21.Checkbox,
|
|
1220
1219
|
{
|
|
1221
1220
|
id: (0, import_utils18.optionId)(id, i),
|
|
1222
1221
|
name: htmlName || id,
|
|
@@ -1237,7 +1236,7 @@ function CheckboxesWidget(props) {
|
|
|
1237
1236
|
// src/widgets/CheckboxWidget.tsx
|
|
1238
1237
|
var import_react5 = require("react");
|
|
1239
1238
|
var import_utils20 = require("@rjsf/utils");
|
|
1240
|
-
var
|
|
1239
|
+
var import_core22 = require("@mantine/core");
|
|
1241
1240
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1242
1241
|
function CheckboxWidget(props) {
|
|
1243
1242
|
const {
|
|
@@ -1302,7 +1301,7 @@ function CheckboxWidget(props) {
|
|
|
1302
1301
|
}
|
|
1303
1302
|
),
|
|
1304
1303
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1305
|
-
|
|
1304
|
+
import_core22.Checkbox,
|
|
1306
1305
|
{
|
|
1307
1306
|
id,
|
|
1308
1307
|
name: htmlName || name,
|
|
@@ -1324,7 +1323,7 @@ function CheckboxWidget(props) {
|
|
|
1324
1323
|
// src/widgets/ColorWidget.tsx
|
|
1325
1324
|
var import_react6 = require("react");
|
|
1326
1325
|
var import_utils21 = require("@rjsf/utils");
|
|
1327
|
-
var
|
|
1326
|
+
var import_core23 = require("@mantine/core");
|
|
1328
1327
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1329
1328
|
function ColorWidget(props) {
|
|
1330
1329
|
const {
|
|
@@ -1368,7 +1367,7 @@ function ColorWidget(props) {
|
|
|
1368
1367
|
[onFocus, id]
|
|
1369
1368
|
);
|
|
1370
1369
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1371
|
-
|
|
1370
|
+
import_core23.ColorInput,
|
|
1372
1371
|
{
|
|
1373
1372
|
id,
|
|
1374
1373
|
name,
|
|
@@ -1392,7 +1391,7 @@ function ColorWidget(props) {
|
|
|
1392
1391
|
// src/widgets/FileWidget.tsx
|
|
1393
1392
|
var import_react7 = require("react");
|
|
1394
1393
|
var import_utils23 = require("@rjsf/utils");
|
|
1395
|
-
var
|
|
1394
|
+
var import_core24 = require("@mantine/core");
|
|
1396
1395
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1397
1396
|
function FileWidget(props) {
|
|
1398
1397
|
const {
|
|
@@ -1423,12 +1422,12 @@ function FileWidget(props) {
|
|
|
1423
1422
|
);
|
|
1424
1423
|
const ValueComponent = (0, import_react7.useCallback)(() => {
|
|
1425
1424
|
if (Array.isArray(filesInfo) && filesInfo.length > 0) {
|
|
1426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core24.Pill.Group, { children: filesInfo.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_core24.Pill, { withRemoveButton: true, onRemove: () => handleRemove(index), children: file.name }, index)) });
|
|
1427
1426
|
}
|
|
1428
1427
|
return null;
|
|
1429
1428
|
}, [handleRemove, filesInfo]);
|
|
1430
1429
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1431
|
-
|
|
1430
|
+
import_core24.FileInput,
|
|
1432
1431
|
{
|
|
1433
1432
|
id,
|
|
1434
1433
|
name,
|
|
@@ -1451,7 +1450,7 @@ function FileWidget(props) {
|
|
|
1451
1450
|
// src/widgets/PasswordWidget.tsx
|
|
1452
1451
|
var import_react8 = require("react");
|
|
1453
1452
|
var import_utils25 = require("@rjsf/utils");
|
|
1454
|
-
var
|
|
1453
|
+
var import_core25 = require("@mantine/core");
|
|
1455
1454
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1456
1455
|
function PasswordWidget(props) {
|
|
1457
1456
|
const {
|
|
@@ -1496,7 +1495,7 @@ function PasswordWidget(props) {
|
|
|
1496
1495
|
[onFocus, id]
|
|
1497
1496
|
);
|
|
1498
1497
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1499
|
-
|
|
1498
|
+
import_core25.PasswordInput,
|
|
1500
1499
|
{
|
|
1501
1500
|
id,
|
|
1502
1501
|
name,
|
|
@@ -1519,7 +1518,7 @@ function PasswordWidget(props) {
|
|
|
1519
1518
|
// src/widgets/RadioWidget.tsx
|
|
1520
1519
|
var import_react9 = require("react");
|
|
1521
1520
|
var import_utils27 = require("@rjsf/utils");
|
|
1522
|
-
var
|
|
1521
|
+
var import_core26 = require("@mantine/core");
|
|
1523
1522
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1524
1523
|
function RadioWidget(props) {
|
|
1525
1524
|
const {
|
|
@@ -1566,7 +1565,7 @@ function RadioWidget(props) {
|
|
|
1566
1565
|
);
|
|
1567
1566
|
const selected = (0, import_utils27.enumOptionsIndexForValue)(value, enumOptions);
|
|
1568
1567
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1569
|
-
|
|
1568
|
+
import_core26.Radio.Group,
|
|
1570
1569
|
{
|
|
1571
1570
|
id,
|
|
1572
1571
|
name: htmlName || id,
|
|
@@ -1578,8 +1577,8 @@ function RadioWidget(props) {
|
|
|
1578
1577
|
error: rawErrors && rawErrors.length > 0 ? rawErrors.join("\n") : void 0,
|
|
1579
1578
|
"aria-describedby": (0, import_utils27.ariaDescribedByIds)(id),
|
|
1580
1579
|
...themeProps,
|
|
1581
|
-
children: Array.isArray(enumOptions) ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1582
|
-
|
|
1580
|
+
children: Array.isArray(enumOptions) ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_core26.Flex, { mt: "xs", direction: inline ? "row" : "column", gap: "xs", wrap: "wrap", children: enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1581
|
+
import_core26.Radio,
|
|
1583
1582
|
{
|
|
1584
1583
|
id: (0, import_utils27.optionId)(id, i),
|
|
1585
1584
|
value: String(i),
|
|
@@ -1598,7 +1597,7 @@ function RadioWidget(props) {
|
|
|
1598
1597
|
// src/widgets/RangeWidget.tsx
|
|
1599
1598
|
var import_react10 = require("react");
|
|
1600
1599
|
var import_utils29 = require("@rjsf/utils");
|
|
1601
|
-
var
|
|
1600
|
+
var import_core27 = require("@mantine/core");
|
|
1602
1601
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1603
1602
|
function RangeWidget(props) {
|
|
1604
1603
|
const {
|
|
@@ -1639,10 +1638,10 @@ function RangeWidget(props) {
|
|
|
1639
1638
|
}
|
|
1640
1639
|
}, [onFocus, id, value]);
|
|
1641
1640
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
1642
|
-
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1643
|
-
options?.description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1641
|
+
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core27.Input.Label, { id: (0, import_utils29.titleId)(id), required, children: label }),
|
|
1642
|
+
options?.description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core27.Input.Description, { children: options.description }),
|
|
1644
1643
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1645
|
-
|
|
1644
|
+
import_core27.Slider,
|
|
1646
1645
|
{
|
|
1647
1646
|
id,
|
|
1648
1647
|
name,
|
|
@@ -1659,14 +1658,14 @@ function RangeWidget(props) {
|
|
|
1659
1658
|
"aria-describedby": (0, import_utils29.ariaDescribedByIds)(id)
|
|
1660
1659
|
}
|
|
1661
1660
|
),
|
|
1662
|
-
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1661
|
+
rawErrors && rawErrors?.length > 0 && rawErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core27.Input.Error, { children: error }, `range-widget-input-errors-${index}`))
|
|
1663
1662
|
] });
|
|
1664
1663
|
}
|
|
1665
1664
|
|
|
1666
1665
|
// src/widgets/SelectWidget.tsx
|
|
1667
1666
|
var import_react11 = require("react");
|
|
1668
1667
|
var import_utils31 = require("@rjsf/utils");
|
|
1669
|
-
var
|
|
1668
|
+
var import_core28 = require("@mantine/core");
|
|
1670
1669
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1671
1670
|
function SelectWidget(props) {
|
|
1672
1671
|
const {
|
|
@@ -1725,7 +1724,7 @@ function SelectWidget(props) {
|
|
|
1725
1724
|
}
|
|
1726
1725
|
return [];
|
|
1727
1726
|
}, [enumDisabled, enumOptions]);
|
|
1728
|
-
const Component = multiple ?
|
|
1727
|
+
const Component = multiple ? import_core28.MultiSelect : import_core28.Select;
|
|
1729
1728
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1730
1729
|
Component,
|
|
1731
1730
|
{
|
|
@@ -1753,7 +1752,7 @@ function SelectWidget(props) {
|
|
|
1753
1752
|
// src/widgets/TextareaWidget.tsx
|
|
1754
1753
|
var import_react12 = require("react");
|
|
1755
1754
|
var import_utils33 = require("@rjsf/utils");
|
|
1756
|
-
var
|
|
1755
|
+
var import_core29 = require("@mantine/core");
|
|
1757
1756
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1758
1757
|
function TextareaWidget(props) {
|
|
1759
1758
|
const {
|
|
@@ -1799,7 +1798,7 @@ function TextareaWidget(props) {
|
|
|
1799
1798
|
[onFocus, id]
|
|
1800
1799
|
);
|
|
1801
1800
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1802
|
-
|
|
1801
|
+
import_core29.Textarea,
|
|
1803
1802
|
{
|
|
1804
1803
|
id,
|
|
1805
1804
|
name: htmlName || name,
|
|
@@ -1852,7 +1851,7 @@ var Theme_default = generateTheme();
|
|
|
1852
1851
|
|
|
1853
1852
|
// src/Form/index.ts
|
|
1854
1853
|
function generateForm() {
|
|
1855
|
-
return (0,
|
|
1854
|
+
return (0, import_core30.withTheme)(generateTheme());
|
|
1856
1855
|
}
|
|
1857
1856
|
var Form_default = generateForm();
|
|
1858
1857
|
|