@mamrp/components 1.7.43 → 1.7.44
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.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +86 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -853,7 +853,8 @@ function CustomTimePicker({
|
|
|
853
853
|
size = "small",
|
|
854
854
|
fullwidth = false,
|
|
855
855
|
autoRefresh = false,
|
|
856
|
-
disabled = false
|
|
856
|
+
disabled = false,
|
|
857
|
+
variant = "outlined"
|
|
857
858
|
}) {
|
|
858
859
|
return /* @__PURE__ */ React.createElement(
|
|
859
860
|
Controller3,
|
|
@@ -869,7 +870,8 @@ function CustomTimePicker({
|
|
|
869
870
|
error,
|
|
870
871
|
fullwidth,
|
|
871
872
|
autoRefresh,
|
|
872
|
-
disabled
|
|
873
|
+
disabled,
|
|
874
|
+
variant
|
|
873
875
|
}
|
|
874
876
|
)
|
|
875
877
|
}
|
|
@@ -884,7 +886,8 @@ var TimePickerComponent = ({
|
|
|
884
886
|
error,
|
|
885
887
|
fullwidth,
|
|
886
888
|
autoRefresh,
|
|
887
|
-
disabled = false
|
|
889
|
+
disabled = false,
|
|
890
|
+
variant = "outlined"
|
|
888
891
|
}) => {
|
|
889
892
|
const theme3 = useTheme3();
|
|
890
893
|
const initialHour = value ? parseInt(value.split(":")[0]) : null;
|
|
@@ -969,12 +972,17 @@ var TimePickerComponent = ({
|
|
|
969
972
|
TextField2,
|
|
970
973
|
{
|
|
971
974
|
disabled,
|
|
972
|
-
label,
|
|
975
|
+
label: variant === "standard" ? "" : label,
|
|
973
976
|
value,
|
|
974
977
|
onChange: handleInputChange,
|
|
975
978
|
onBlur: handleBlur,
|
|
976
|
-
InputLabelProps: {
|
|
977
|
-
|
|
979
|
+
InputLabelProps: {
|
|
980
|
+
shrink: true,
|
|
981
|
+
style: {
|
|
982
|
+
...variant === "standard" && { display: "none" }
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
variant,
|
|
978
986
|
size,
|
|
979
987
|
inputProps: {
|
|
980
988
|
maxLength: 5,
|
|
@@ -986,7 +994,40 @@ var TimePickerComponent = ({
|
|
|
986
994
|
endAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React.createElement(Tooltip, { title: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0632\u0645\u0627\u0646" }, /* @__PURE__ */ React.createElement(IconButton3, { onClick: () => setIsModalOpen(true) }, /* @__PURE__ */ React.createElement(Clock, { size: 22, color: theme3.palette.text.primary }))))
|
|
987
995
|
}
|
|
988
996
|
},
|
|
989
|
-
sx: {
|
|
997
|
+
sx: {
|
|
998
|
+
width: fullwidth ? "100%" : "8rem",
|
|
999
|
+
...variant === "outlined" && {
|
|
1000
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
1001
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4"
|
|
1002
|
+
},
|
|
1003
|
+
"& .MuiOutlinedInput-root": {
|
|
1004
|
+
borderRadius: "12px",
|
|
1005
|
+
"&:hover fieldset": {
|
|
1006
|
+
borderColor: error ? "#D32F2F" : "#085938"
|
|
1007
|
+
},
|
|
1008
|
+
"&.Mui-focused fieldset": {
|
|
1009
|
+
borderColor: error ? "#D32F2F" : "#085938"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
1013
|
+
color: "#085938"
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
...variant === "standard" && {
|
|
1017
|
+
"& .MuiInput-underline:before": {
|
|
1018
|
+
borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.42)"
|
|
1019
|
+
},
|
|
1020
|
+
"& .MuiInput-underline:hover:not(.Mui-disabled):before": {
|
|
1021
|
+
borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.87)"
|
|
1022
|
+
},
|
|
1023
|
+
"& .MuiInput-underline:after": {
|
|
1024
|
+
borderBottomColor: error ? "#D32F2F" : "#085938"
|
|
1025
|
+
},
|
|
1026
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
1027
|
+
color: "#085938"
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
990
1031
|
fullWidth: true
|
|
991
1032
|
}
|
|
992
1033
|
), /* @__PURE__ */ React.createElement(
|
|
@@ -1744,7 +1785,8 @@ var JalaliDatePicker2 = ({
|
|
|
1744
1785
|
disabled,
|
|
1745
1786
|
minDateTime,
|
|
1746
1787
|
// Add the new optional prop
|
|
1747
|
-
centeredTime = false
|
|
1788
|
+
centeredTime = false,
|
|
1789
|
+
variant = "outlined"
|
|
1748
1790
|
}) => {
|
|
1749
1791
|
const today = moment4();
|
|
1750
1792
|
const isMobile = useMediaQuery4("(max-width:700px)");
|
|
@@ -1797,7 +1839,7 @@ var JalaliDatePicker2 = ({
|
|
|
1797
1839
|
disabled: isLoading || disabled,
|
|
1798
1840
|
openTo: "day",
|
|
1799
1841
|
views: ["year", "month", "day", "hours", "minutes"],
|
|
1800
|
-
label,
|
|
1842
|
+
label: variant === "standard" ? "" : label,
|
|
1801
1843
|
value: field.value ? moment4.utc(field.value).utcOffset(210) : null,
|
|
1802
1844
|
onChange: (newValue) => {
|
|
1803
1845
|
if (newValue) {
|
|
@@ -1912,9 +1954,36 @@ var JalaliDatePicker2 = ({
|
|
|
1912
1954
|
},
|
|
1913
1955
|
sx: {
|
|
1914
1956
|
width: "100%",
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1957
|
+
...variant === "outlined" && {
|
|
1958
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
1959
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4"
|
|
1960
|
+
},
|
|
1961
|
+
"& .MuiOutlinedInput-root": {
|
|
1962
|
+
borderRadius: "12px",
|
|
1963
|
+
"&:hover fieldset": {
|
|
1964
|
+
borderColor: error ? "#D32F2F" : "#085938"
|
|
1965
|
+
},
|
|
1966
|
+
"&.Mui-focused fieldset": {
|
|
1967
|
+
borderColor: error ? "#D32F2F" : "#085938"
|
|
1968
|
+
}
|
|
1969
|
+
},
|
|
1970
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
1971
|
+
color: "#085938"
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
...variant === "standard" && {
|
|
1975
|
+
"& .MuiInput-underline:before": {
|
|
1976
|
+
borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.42)"
|
|
1977
|
+
},
|
|
1978
|
+
"& .MuiInput-underline:hover:not(.Mui-disabled):before": {
|
|
1979
|
+
borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.87)"
|
|
1980
|
+
},
|
|
1981
|
+
"& .MuiInput-underline:after": {
|
|
1982
|
+
borderBottomColor: error ? "#D32F2F" : "#085938"
|
|
1983
|
+
},
|
|
1984
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
1985
|
+
color: "#085938"
|
|
1986
|
+
}
|
|
1918
1987
|
}
|
|
1919
1988
|
},
|
|
1920
1989
|
maxDate: today,
|
|
@@ -1954,12 +2023,16 @@ var JalaliDatePicker2 = ({
|
|
|
1954
2023
|
textField: {
|
|
1955
2024
|
size,
|
|
1956
2025
|
placeholder: "",
|
|
2026
|
+
variant,
|
|
1957
2027
|
onClick: () => {
|
|
1958
2028
|
if (!open) setOpen(true);
|
|
1959
2029
|
},
|
|
1960
2030
|
InputLabelProps: {
|
|
1961
2031
|
shrink: true,
|
|
1962
|
-
style: {
|
|
2032
|
+
style: {
|
|
2033
|
+
color: error ? "#D32F2F" : "inherit",
|
|
2034
|
+
...variant === "standard" && { display: "none" }
|
|
2035
|
+
}
|
|
1963
2036
|
},
|
|
1964
2037
|
InputProps: {
|
|
1965
2038
|
...disabled && { endAdornment: false },
|