@mamrp/components 1.7.42 → 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 +91 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -14
- 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(
|
|
@@ -1222,9 +1263,13 @@ var JalaliDatePicker = ({
|
|
|
1222
1263
|
placeholder: field.value || isLoading ? "" : "\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E ",
|
|
1223
1264
|
onClick: () => !disabled && !isLoading && setOpen(true),
|
|
1224
1265
|
variant,
|
|
1266
|
+
...variant === "standard" && { label: void 0 },
|
|
1225
1267
|
InputLabelProps: {
|
|
1226
1268
|
shrink: true,
|
|
1227
|
-
style: {
|
|
1269
|
+
style: {
|
|
1270
|
+
color: error ? "#D32F2F" : "inherit",
|
|
1271
|
+
...variant === "standard" && { display: "none" }
|
|
1272
|
+
}
|
|
1228
1273
|
},
|
|
1229
1274
|
inputProps: {
|
|
1230
1275
|
readOnly: true,
|
|
@@ -1740,7 +1785,8 @@ var JalaliDatePicker2 = ({
|
|
|
1740
1785
|
disabled,
|
|
1741
1786
|
minDateTime,
|
|
1742
1787
|
// Add the new optional prop
|
|
1743
|
-
centeredTime = false
|
|
1788
|
+
centeredTime = false,
|
|
1789
|
+
variant = "outlined"
|
|
1744
1790
|
}) => {
|
|
1745
1791
|
const today = moment4();
|
|
1746
1792
|
const isMobile = useMediaQuery4("(max-width:700px)");
|
|
@@ -1793,7 +1839,7 @@ var JalaliDatePicker2 = ({
|
|
|
1793
1839
|
disabled: isLoading || disabled,
|
|
1794
1840
|
openTo: "day",
|
|
1795
1841
|
views: ["year", "month", "day", "hours", "minutes"],
|
|
1796
|
-
label,
|
|
1842
|
+
label: variant === "standard" ? "" : label,
|
|
1797
1843
|
value: field.value ? moment4.utc(field.value).utcOffset(210) : null,
|
|
1798
1844
|
onChange: (newValue) => {
|
|
1799
1845
|
if (newValue) {
|
|
@@ -1908,9 +1954,36 @@ var JalaliDatePicker2 = ({
|
|
|
1908
1954
|
},
|
|
1909
1955
|
sx: {
|
|
1910
1956
|
width: "100%",
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
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
|
+
}
|
|
1914
1987
|
}
|
|
1915
1988
|
},
|
|
1916
1989
|
maxDate: today,
|
|
@@ -1950,12 +2023,16 @@ var JalaliDatePicker2 = ({
|
|
|
1950
2023
|
textField: {
|
|
1951
2024
|
size,
|
|
1952
2025
|
placeholder: "",
|
|
2026
|
+
variant,
|
|
1953
2027
|
onClick: () => {
|
|
1954
2028
|
if (!open) setOpen(true);
|
|
1955
2029
|
},
|
|
1956
2030
|
InputLabelProps: {
|
|
1957
2031
|
shrink: true,
|
|
1958
|
-
style: {
|
|
2032
|
+
style: {
|
|
2033
|
+
color: error ? "#D32F2F" : "inherit",
|
|
2034
|
+
...variant === "standard" && { display: "none" }
|
|
2035
|
+
}
|
|
1959
2036
|
},
|
|
1960
2037
|
InputProps: {
|
|
1961
2038
|
...disabled && { endAdornment: false },
|