dhre-ui-kit 0.0.165 → 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 +2 -0
- package/lib/index.js +29 -14
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +29 -14
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -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:
|
|
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(
|
|
3904
|
-
|
|
3909
|
+
))), /* @__PURE__ */ React__default["default"].createElement(
|
|
3910
|
+
reactNative.Pressable,
|
|
3905
3911
|
{
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
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
|
-
)
|
|
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:
|
|
3931
|
+
text: errorMessage,
|
|
3916
3932
|
variant: FontStyle.L2_REGULAR,
|
|
3917
3933
|
style: {
|
|
3918
|
-
|
|
3919
|
-
color:
|
|
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);
|