dhre-ui-kit 0.0.164 → 0.0.166

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/lib/index.d.ts CHANGED
@@ -696,6 +696,8 @@ interface IProps$1 {
696
696
  textInputStyle?: TextStyle;
697
697
  resendTextStyle?: TextStyle;
698
698
  resendOtpColor?: string;
699
+ label?: string;
700
+ resendText?: string;
699
701
  mode?: 'light' | 'dark';
700
702
  }
701
703
  type OTPInputHandle = {
package/lib/index.js CHANGED
@@ -3270,7 +3270,7 @@ const CommonTextInput = (props) => {
3270
3270
  mode: "outlined",
3271
3271
  outlineStyle: {
3272
3272
  ...styles$8.outlineStyle,
3273
- borderColor: errorMessage?.length ? DHRE_DEFAULT.DH_ERROR : value?.length ? activeBorderColor : inactiveBorderColor
3273
+ borderColor: errorMessage?.length ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : value?.length ? activeBorderColor : inactiveBorderColor
3274
3274
  },
3275
3275
  label,
3276
3276
  value,
@@ -3793,6 +3793,10 @@ const styles$4 = reactNative.StyleSheet.create({
3793
3793
  },
3794
3794
  resendOtpTextEnable: {
3795
3795
  textDecorationLine: "underline"
3796
+ },
3797
+ resendOTPStyle: {
3798
+ alignSelf: "flex-end",
3799
+ marginTop: verticalScale(8)
3796
3800
  }
3797
3801
  });
3798
3802
 
@@ -3808,6 +3812,8 @@ const OTPInput = React__default["default"].forwardRef(
3808
3812
  textInputStyle,
3809
3813
  resendTextStyle,
3810
3814
  resendOtpColor,
3815
+ label = "OTP",
3816
+ resendText = "Resend OTP",
3811
3817
  mode
3812
3818
  }, ref) => {
3813
3819
  const [otp, setOTP] = React.useState("");
@@ -3871,7 +3877,7 @@ const OTPInput = React__default["default"].forwardRef(
3871
3877
  return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: { ...otpContainerStyle }, "data-testid": testId }, /* @__PURE__ */ React__default["default"].createElement(
3872
3878
  CustomTypography,
3873
3879
  {
3874
- text: "OTP",
3880
+ text: label,
3875
3881
  variant: FontStyle.B4_REGULAR,
3876
3882
  style: {
3877
3883
  color: otp?.length ? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_SECONDRY,
@@ -3900,27 +3906,36 @@ const OTPInput = React__default["default"].forwardRef(
3900
3906
  returnKeyType: otp.length === length ? "done" : "next",
3901
3907
  selectionColor: theme$1.CONTENT_PRIMARY
3902
3908
  }
3903
- ))), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$4.resendOtpContainer }, errorMessage ? /* @__PURE__ */ React__default["default"].createElement(
3904
- CustomTypography,
3909
+ ))), /* @__PURE__ */ React__default["default"].createElement(
3910
+ reactNative.Pressable,
3905
3911
  {
3906
- text: errorMessage,
3907
- variant: FontStyle.L2_REGULAR,
3908
- style: {
3909
- color: theme$1.ERROR
3912
+ onPress: onClickResendOTP,
3913
+ style: styles$4.resendOTPStyle,
3914
+ disabled: !isResendOtpEnable
3915
+ },
3916
+ /* @__PURE__ */ React__default["default"].createElement(
3917
+ CustomTypography,
3918
+ {
3919
+ text: resendText,
3920
+ variant: FontStyle.L2_REGULAR,
3921
+ style: {
3922
+ textDecorationLine: "underline",
3923
+ color: isResendOtpEnable ? resendOtpColor ?? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_DISABLE,
3924
+ ...resendTextStyle
3925
+ }
3910
3926
  }
3911
- }
3912
- ) : /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null), /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: onClickResendOTP, disabled: !isResendOtpEnable }, /* @__PURE__ */ React__default["default"].createElement(
3927
+ )
3928
+ ), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$4.resendOtpContainer }, errorMessage ? /* @__PURE__ */ React__default["default"].createElement(
3913
3929
  CustomTypography,
3914
3930
  {
3915
- text: "Resend OTP",
3931
+ text: errorMessage,
3916
3932
  variant: FontStyle.L2_REGULAR,
3917
3933
  style: {
3918
- textDecorationLine: "underline",
3919
- color: isResendOtpEnable ? resendOtpColor ?? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_DISABLE,
3920
- ...resendTextStyle
3934
+ alignSelf: "flex-start",
3935
+ color: theme$1.ERROR
3921
3936
  }
3922
3937
  }
3923
- ))));
3938
+ ) : /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null)));
3924
3939
  }
3925
3940
  );
3926
3941
  var index$4 = withThemeProvider(OTPInput);