@mamrp/components 1.7.43 → 1.7.45

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.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;
@@ -973,8 +976,10 @@ var TimePickerComponent = ({
973
976
  value,
974
977
  onChange: handleInputChange,
975
978
  onBlur: handleBlur,
976
- InputLabelProps: { shrink: true },
977
- variant: "outlined",
979
+ InputLabelProps: {
980
+ shrink: true
981
+ },
982
+ variant,
978
983
  size,
979
984
  inputProps: {
980
985
  maxLength: 5,
@@ -986,7 +991,40 @@ var TimePickerComponent = ({
986
991
  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
992
  }
988
993
  },
989
- sx: { width: fullwidth ? "100%" : "8rem" },
994
+ sx: {
995
+ width: fullwidth ? "100%" : "8rem",
996
+ ...variant === "outlined" && {
997
+ "& .MuiOutlinedInput-notchedOutline": {
998
+ borderColor: error ? "#D32F2F" : "#C4C4C4"
999
+ },
1000
+ "& .MuiOutlinedInput-root": {
1001
+ borderRadius: "12px",
1002
+ "&:hover fieldset": {
1003
+ borderColor: error ? "#D32F2F" : "#085938"
1004
+ },
1005
+ "&.Mui-focused fieldset": {
1006
+ borderColor: error ? "#D32F2F" : "#085938"
1007
+ }
1008
+ },
1009
+ "& .MuiInputLabel-root.Mui-focused": {
1010
+ color: "#085938"
1011
+ }
1012
+ },
1013
+ ...variant === "standard" && {
1014
+ "& .MuiInput-underline:before": {
1015
+ borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.42)"
1016
+ },
1017
+ "& .MuiInput-underline:hover:not(.Mui-disabled):before": {
1018
+ borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.87)"
1019
+ },
1020
+ "& .MuiInput-underline:after": {
1021
+ borderBottomColor: error ? "#D32F2F" : "#085938"
1022
+ },
1023
+ "& .MuiInputLabel-root.Mui-focused": {
1024
+ color: "#085938"
1025
+ }
1026
+ }
1027
+ },
990
1028
  fullWidth: true
991
1029
  }
992
1030
  ), /* @__PURE__ */ React.createElement(
@@ -1222,7 +1260,7 @@ var JalaliDatePicker = ({
1222
1260
  placeholder: field.value || isLoading ? "" : "\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E ",
1223
1261
  onClick: () => !disabled && !isLoading && setOpen(true),
1224
1262
  variant,
1225
- ...variant === "standard" && { label: void 0 },
1263
+ ...variant === "standard" && { label: "" },
1226
1264
  InputLabelProps: {
1227
1265
  shrink: true,
1228
1266
  style: {
@@ -1744,7 +1782,8 @@ var JalaliDatePicker2 = ({
1744
1782
  disabled,
1745
1783
  minDateTime,
1746
1784
  // Add the new optional prop
1747
- centeredTime = false
1785
+ centeredTime = false,
1786
+ variant = "outlined"
1748
1787
  }) => {
1749
1788
  const today = moment4();
1750
1789
  const isMobile = useMediaQuery4("(max-width:700px)");
@@ -1912,9 +1951,36 @@ var JalaliDatePicker2 = ({
1912
1951
  },
1913
1952
  sx: {
1914
1953
  width: "100%",
1915
- borderColor: error ? "#D32F2F" : "#C4C4C4",
1916
- "& .MuiOutlinedInput-notchedOutline": {
1917
- borderColor: error ? "#D32F2F" : "#C4C4C4"
1954
+ ...variant === "outlined" && {
1955
+ "& .MuiOutlinedInput-notchedOutline": {
1956
+ borderColor: error ? "#D32F2F" : "#C4C4C4"
1957
+ },
1958
+ "& .MuiOutlinedInput-root": {
1959
+ borderRadius: "12px",
1960
+ "&:hover fieldset": {
1961
+ borderColor: error ? "#D32F2F" : "#085938"
1962
+ },
1963
+ "&.Mui-focused fieldset": {
1964
+ borderColor: error ? "#D32F2F" : "#085938"
1965
+ }
1966
+ },
1967
+ "& .MuiInputLabel-root.Mui-focused": {
1968
+ color: "#085938"
1969
+ }
1970
+ },
1971
+ ...variant === "standard" && {
1972
+ "& .MuiInput-underline:before": {
1973
+ borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.42)"
1974
+ },
1975
+ "& .MuiInput-underline:hover:not(.Mui-disabled):before": {
1976
+ borderBottomColor: error ? "#D32F2F" : "rgba(0, 0, 0, 0.87)"
1977
+ },
1978
+ "& .MuiInput-underline:after": {
1979
+ borderBottomColor: error ? "#D32F2F" : "#085938"
1980
+ },
1981
+ "& .MuiInputLabel-root.Mui-focused": {
1982
+ color: "#085938"
1983
+ }
1918
1984
  }
1919
1985
  },
1920
1986
  maxDate: today,
@@ -1954,12 +2020,15 @@ var JalaliDatePicker2 = ({
1954
2020
  textField: {
1955
2021
  size,
1956
2022
  placeholder: "",
2023
+ variant,
1957
2024
  onClick: () => {
1958
2025
  if (!open) setOpen(true);
1959
2026
  },
1960
2027
  InputLabelProps: {
1961
2028
  shrink: true,
1962
- style: { color: error ? "#D32F2F" : "inherit" }
2029
+ style: {
2030
+ color: error ? "#D32F2F" : "inherit"
2031
+ }
1963
2032
  },
1964
2033
  InputProps: {
1965
2034
  ...disabled && { endAdornment: false },