formik-form-components 0.2.25 → 0.2.27
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.d.ts +6 -6
- package/dist/index.js +92 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -64,14 +64,16 @@ var AppDatePicker = forwardRef(
|
|
|
64
64
|
onChange: handleChange,
|
|
65
65
|
format,
|
|
66
66
|
disabled,
|
|
67
|
+
slots: {
|
|
68
|
+
openPickerIcon: CalendarMonthIcon
|
|
69
|
+
},
|
|
67
70
|
slotProps: {
|
|
68
71
|
textField: {
|
|
69
72
|
variant: "outlined",
|
|
70
73
|
fullWidth: true,
|
|
71
74
|
error: isTouched && Boolean(fieldError),
|
|
72
75
|
helperText: isTouched && fieldError ? fieldError : void 0,
|
|
73
|
-
sx: textFieldSx
|
|
74
|
-
openPickerIcon: CalendarMonthIcon
|
|
76
|
+
sx: textFieldSx
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
79
|
...otherProps
|
|
@@ -649,25 +651,30 @@ function AppSwitchInput({
|
|
|
649
651
|
Box,
|
|
650
652
|
{
|
|
651
653
|
className,
|
|
652
|
-
sx: [
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
654
|
+
sx: [
|
|
655
|
+
{
|
|
656
|
+
display: "flex",
|
|
657
|
+
flexDirection: labelPlacement === "start" || labelPlacement === "end" ? "row" : "column",
|
|
658
|
+
alignItems: labelPlacement === "start" || labelPlacement === "end" ? "center" : "flex-start",
|
|
659
|
+
justifyContent: labelPlacement === "start" || labelPlacement === "end" ? "space-between" : "center",
|
|
660
|
+
gap: 1,
|
|
661
|
+
my: 1,
|
|
662
|
+
...containerSx
|
|
663
|
+
},
|
|
664
|
+
sx
|
|
665
|
+
],
|
|
661
666
|
children: [
|
|
662
667
|
label && /* @__PURE__ */ jsx(
|
|
663
668
|
Typography,
|
|
664
669
|
{
|
|
665
670
|
variant: "body2",
|
|
666
|
-
sx: [
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
+
sx: [
|
|
672
|
+
{
|
|
673
|
+
color: "text.primary",
|
|
674
|
+
order: labelPlacement === "start" ? 0 : 1,
|
|
675
|
+
...labelSx
|
|
676
|
+
}
|
|
677
|
+
],
|
|
671
678
|
children: label
|
|
672
679
|
}
|
|
673
680
|
),
|
|
@@ -680,25 +687,27 @@ function AppSwitchInput({
|
|
|
680
687
|
onChange: () => {
|
|
681
688
|
setFieldValue(name, !values[name], true);
|
|
682
689
|
},
|
|
683
|
-
sx: [
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
690
|
+
sx: [
|
|
691
|
+
{
|
|
692
|
+
"& .MuiSwitch-switchBase": {
|
|
693
|
+
color: "text.secondary",
|
|
694
|
+
"&.Mui-checked": {
|
|
695
|
+
color: "primary.main",
|
|
696
|
+
"& + .MuiSwitch-track": {
|
|
697
|
+
backgroundColor: "primary.main",
|
|
698
|
+
opacity: 0.5
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"&.Mui-disabled": {
|
|
702
|
+
color: "action.disabled",
|
|
703
|
+
"& + .MuiSwitch-track": {
|
|
704
|
+
backgroundColor: "action.disabledBackground"
|
|
705
|
+
}
|
|
691
706
|
}
|
|
692
707
|
},
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
backgroundColor: "action.disabledBackground"
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
...switchSx
|
|
701
|
-
}],
|
|
708
|
+
...switchSx
|
|
709
|
+
}
|
|
710
|
+
],
|
|
702
711
|
...otherProps
|
|
703
712
|
}
|
|
704
713
|
),
|
|
@@ -706,12 +715,14 @@ function AppSwitchInput({
|
|
|
706
715
|
Typography,
|
|
707
716
|
{
|
|
708
717
|
variant: "caption",
|
|
709
|
-
sx: [
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
718
|
+
sx: [
|
|
719
|
+
{
|
|
720
|
+
color: "error.main",
|
|
721
|
+
display: "block",
|
|
722
|
+
mt: 0.5,
|
|
723
|
+
...errorSx
|
|
724
|
+
}
|
|
725
|
+
],
|
|
715
726
|
gutterBottom: true,
|
|
716
727
|
children: fieldError
|
|
717
728
|
}
|
|
@@ -743,21 +754,26 @@ function AppSwitch({
|
|
|
743
754
|
alignItems: labelPlacement === "start" || labelPlacement === "end" ? "center" : "flex-start",
|
|
744
755
|
justifyContent: labelPlacement === "start" || labelPlacement === "end" ? "space-between" : "center",
|
|
745
756
|
spacing: 1,
|
|
746
|
-
sx: [
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
757
|
+
sx: [
|
|
758
|
+
{
|
|
759
|
+
width: "100%",
|
|
760
|
+
...labelPlacement === "top" || labelPlacement === "bottom" ? { alignItems: "flex-start" } : {},
|
|
761
|
+
...containerSx
|
|
762
|
+
},
|
|
763
|
+
sx
|
|
764
|
+
],
|
|
751
765
|
children: [
|
|
752
766
|
/* @__PURE__ */ jsx(
|
|
753
767
|
Typography,
|
|
754
768
|
{
|
|
755
769
|
variant: "body2",
|
|
756
|
-
sx: [
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
770
|
+
sx: [
|
|
771
|
+
{
|
|
772
|
+
color: "text.primary",
|
|
773
|
+
order: labelPlacement === "start" ? 0 : 1,
|
|
774
|
+
...labelSx
|
|
775
|
+
}
|
|
776
|
+
],
|
|
761
777
|
children: label
|
|
762
778
|
}
|
|
763
779
|
),
|
|
@@ -769,25 +785,27 @@ function AppSwitch({
|
|
|
769
785
|
onChange: () => {
|
|
770
786
|
setFieldValue(name, !fieldValue, true);
|
|
771
787
|
},
|
|
772
|
-
sx: [
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
788
|
+
sx: [
|
|
789
|
+
{
|
|
790
|
+
"& .MuiSwitch-switchBase": {
|
|
791
|
+
color: "text.secondary",
|
|
792
|
+
"&.Mui-checked": {
|
|
793
|
+
color: "primary.main",
|
|
794
|
+
"& + .MuiSwitch-track": {
|
|
795
|
+
backgroundColor: "primary.main",
|
|
796
|
+
opacity: 0.5
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"&.Mui-disabled": {
|
|
800
|
+
color: "action.disabled",
|
|
801
|
+
"& + .MuiSwitch-track": {
|
|
802
|
+
backgroundColor: "action.disabledBackground"
|
|
803
|
+
}
|
|
780
804
|
}
|
|
781
805
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
backgroundColor: "action.disabledBackground"
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
...switchSx
|
|
790
|
-
}],
|
|
806
|
+
...switchSx
|
|
807
|
+
}
|
|
808
|
+
],
|
|
791
809
|
...otherProps
|
|
792
810
|
}
|
|
793
811
|
),
|
|
@@ -795,12 +813,14 @@ function AppSwitch({
|
|
|
795
813
|
Typography,
|
|
796
814
|
{
|
|
797
815
|
variant: "caption",
|
|
798
|
-
sx: [
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
816
|
+
sx: [
|
|
817
|
+
{
|
|
818
|
+
color: "error.main",
|
|
819
|
+
display: "block",
|
|
820
|
+
mt: 0.5,
|
|
821
|
+
...errorSx
|
|
822
|
+
}
|
|
823
|
+
],
|
|
804
824
|
gutterBottom: true,
|
|
805
825
|
children: fieldError
|
|
806
826
|
}
|