sag_components 2.0.0-beta185 → 2.0.0-beta186

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.esm.js CHANGED
@@ -35610,7 +35610,7 @@ const Input$2 = _ref => {
35610
35610
  disabled,
35611
35611
  isDarkerBackground = false,
35612
35612
  width,
35613
- height = '50px',
35613
+ height = "50px",
35614
35614
  error,
35615
35615
  errorMessage,
35616
35616
  labelColor,
@@ -35624,7 +35624,7 @@ const Input$2 = _ref => {
35624
35624
  maxLength
35625
35625
  } = _ref;
35626
35626
  const [isFocused, setIsFocused] = useState(false);
35627
- const [inputValue, setInputValue] = useState('');
35627
+ const [inputValue, setInputValue] = useState("");
35628
35628
  const [showPassword, setShowPassword] = useState(false);
35629
35629
  const inputRef = useRef(null);
35630
35630
  const containerRef = useRef(null);
@@ -35645,7 +35645,7 @@ const Input$2 = _ref => {
35645
35645
  inputRef?.current?.focus();
35646
35646
  }
35647
35647
  onChange({
35648
- newValue: e.target.value || ''
35648
+ newValue: e.target.value || ""
35649
35649
  });
35650
35650
  };
35651
35651
  const handleFocus = () => {
@@ -35671,18 +35671,18 @@ const Input$2 = _ref => {
35671
35671
  });
35672
35672
  };
35673
35673
  const getLeftIcon = () => {
35674
- if (!leftIcon || leftIcon === 'none') return '';
35675
- return getIcon(leftIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', leftIconOnClickHandler);
35674
+ if (!leftIcon || leftIcon === "none") return "";
35675
+ return getIcon(leftIcon, "14px", "14px", error ? "red" : labelColor, disabled, "pointer", leftIconOnClickHandler);
35676
35676
  };
35677
35677
  const getRightIcon = () => {
35678
- if (!rightIcon || rightIcon === 'none') return '';
35679
- return getIcon(rightIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', rightIconOnClickHandler);
35678
+ if (!rightIcon || rightIcon === "none") return "";
35679
+ return getIcon(rightIcon, "14px", "14px", error ? "red" : labelColor, disabled, "pointer", rightIconOnClickHandler);
35680
35680
  };
35681
35681
  const toggleShowPassword = () => {
35682
35682
  setShowPassword(!showPassword);
35683
35683
  };
35684
35684
  const getPasswordIcon = () => {
35685
- if (!password) return '';
35685
+ if (!password) return "";
35686
35686
  if (showPassword) {
35687
35687
  return /*#__PURE__*/React$1.createElement(IconWrapper$1, {
35688
35688
  className: "passwordEyeSlash",
@@ -35690,16 +35690,16 @@ const Input$2 = _ref => {
35690
35690
  onClick: toggleShowPassword
35691
35691
  }, /*#__PURE__*/React$1.createElement(FaEyeSlash, {
35692
35692
  onClick: toggleShowPassword,
35693
- color: error ? 'red' : labelColor
35693
+ color: error ? "red" : labelColor
35694
35694
  }));
35695
35695
  }
35696
- return getIcon('eye', '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer', toggleShowPassword);
35696
+ return getIcon("eye", "14px", "14px", error ? "red" : labelColor, disabled, "pointer", toggleShowPassword);
35697
35697
  };
35698
35698
 
35699
35699
  // Calculate dynamic height for multiline inputs
35700
35700
  const calculateHeight = () => {
35701
35701
  if (!multiline) return height;
35702
- const baseHeight = size === 'small' ? 32 : 52;
35702
+ const baseHeight = size === "small" ? 32 : 52;
35703
35703
  const lineHeight = 20;
35704
35704
  const padding = 10;
35705
35705
  return `${baseHeight + (rows - 1) * lineHeight + padding}px`;
@@ -35712,7 +35712,8 @@ const Input$2 = _ref => {
35712
35712
  size: size,
35713
35713
  disabled: disabled,
35714
35714
  isDarkerBackground: isDarkerBackground,
35715
- multiline: multiline
35715
+ multiline: multiline,
35716
+ onClick: onClick
35716
35717
  }, /*#__PURE__*/React$1.createElement(InputContainer, {
35717
35718
  className: "InputContainer",
35718
35719
  labelColor: labelColor,
@@ -35738,7 +35739,7 @@ const Input$2 = _ref => {
35738
35739
  isFocused: isFocused,
35739
35740
  labelColor: labelColor,
35740
35741
  hasValue: inputValue,
35741
- leftIcon: !multiline ? leftIcon : 'none',
35742
+ leftIcon: !multiline ? leftIcon : "none",
35742
35743
  disabled: disabled,
35743
35744
  isDarkerBackground: isDarkerBackground,
35744
35745
  error: error,
@@ -35748,13 +35749,13 @@ const Input$2 = _ref => {
35748
35749
  multiline: multiline
35749
35750
  }, inputValue ? label : labelEmptyValue || label, required && /*#__PURE__*/React$1.createElement("span", {
35750
35751
  style: {
35751
- color: disabled ? '#D0D0D0' : 'red',
35752
- height: '16px'
35752
+ color: disabled ? "#D0D0D0" : "red",
35753
+ height: "16px"
35753
35754
  }
35754
35755
  }, "*")), /*#__PURE__*/React$1.createElement(InputElement, {
35755
35756
  className: multiline ? "StyledTextarea" : "StyledInput",
35756
35757
  ref: inputRef,
35757
- type: password && !showPassword ? 'password' : 'text',
35758
+ type: password && !showPassword ? "password" : "text",
35758
35759
  value: inputValue,
35759
35760
  onChange: handleInputChange,
35760
35761
  onClick: handleLabelClick,
@@ -35762,7 +35763,7 @@ const Input$2 = _ref => {
35762
35763
  onBlur: handleBlur,
35763
35764
  disabled: disabled,
35764
35765
  isDarkerBackground: isDarkerBackground,
35765
- placeholder: isFocused ? placeHolder : '',
35766
+ placeholder: isFocused ? placeHolder : "",
35766
35767
  error: error,
35767
35768
  height: calculateHeight(),
35768
35769
  isFocused: isFocused,
@@ -35774,10 +35775,10 @@ const Input$2 = _ref => {
35774
35775
  width: width
35775
35776
  }, errorMessage), multiline && maxLength && /*#__PURE__*/React$1.createElement("div", {
35776
35777
  style: {
35777
- fontSize: '12px',
35778
- color: inputValue.length > maxLength * 0.9 ? 'orange' : '#666',
35779
- textAlign: 'right',
35780
- marginTop: '4px'
35778
+ fontSize: "12px",
35779
+ color: inputValue.length > maxLength * 0.9 ? "orange" : "#666",
35780
+ textAlign: "right",
35781
+ marginTop: "4px"
35781
35782
  }
35782
35783
  }, inputValue.length, "/", maxLength));
35783
35784
  };
@@ -35806,19 +35807,19 @@ Input$2.propTypes = {
35806
35807
  maxLength: PropTypes.number
35807
35808
  };
35808
35809
  Input$2.defaultProps = {
35809
- placeHolder: 'Type...',
35810
- label: '',
35811
- labelEmptyValue: '',
35812
- size: 'medium',
35813
- labelColor: '#066768',
35810
+ placeHolder: "Type...",
35811
+ label: "",
35812
+ labelEmptyValue: "",
35813
+ size: "medium",
35814
+ labelColor: "#066768",
35814
35815
  required: true,
35815
- width: '300px',
35816
+ width: "300px",
35816
35817
  disabled: false,
35817
35818
  error: false,
35818
- errorMessage: '',
35819
- selectedValue: '',
35820
- leftIcon: 'none',
35821
- rightIcon: 'none',
35819
+ errorMessage: "",
35820
+ selectedValue: "",
35821
+ leftIcon: "none",
35822
+ rightIcon: "none",
35822
35823
  leftIconOnClick: () => {},
35823
35824
  rightIconOnClick: () => {},
35824
35825
  onBlur: () => {},