dhre-ui-kit 0.0.235 → 0.0.237
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 +1 -0
- package/lib/index.js +16 -13
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +16 -13
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -4026,7 +4026,8 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4026
4026
|
resendText = "Resend OTP",
|
|
4027
4027
|
mode,
|
|
4028
4028
|
disabled,
|
|
4029
|
-
maxResendCount = 4
|
|
4029
|
+
maxResendCount = 4,
|
|
4030
|
+
timerToResend = 6e4
|
|
4030
4031
|
}, ref) => {
|
|
4031
4032
|
const [otp, setOTP] = React.useState("");
|
|
4032
4033
|
const [isResendOtpEnable, setIsResendOtpEnable] = React.useState(false);
|
|
@@ -4049,9 +4050,8 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4049
4050
|
const onClickResendOTP = () => {
|
|
4050
4051
|
if (resendOTPCount >= maxResendCount - 1) {
|
|
4051
4052
|
setErrorMessageMaxReachCount("You have exceeded the maximum number of attempts.");
|
|
4052
|
-
return;
|
|
4053
4053
|
}
|
|
4054
|
-
if (resendOTPCount
|
|
4054
|
+
if (resendOTPCount <= maxResendCount) {
|
|
4055
4055
|
setIsResendOtpEnable(false);
|
|
4056
4056
|
setResendOTPCount(resendOTPCount + 1);
|
|
4057
4057
|
enableResendOtp();
|
|
@@ -4069,7 +4069,7 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4069
4069
|
const enableResendOtp = () => {
|
|
4070
4070
|
setTimeout(() => {
|
|
4071
4071
|
setIsResendOtpEnable(true);
|
|
4072
|
-
},
|
|
4072
|
+
}, timerToResend);
|
|
4073
4073
|
};
|
|
4074
4074
|
React.useEffect(() => {
|
|
4075
4075
|
if (reactNative.Platform.OS === "android") {
|
|
@@ -4452,23 +4452,26 @@ const CustomSlideButton = React__default["default"].forwardRef(
|
|
|
4452
4452
|
};
|
|
4453
4453
|
const panResponder = reactNative.PanResponder.create({
|
|
4454
4454
|
onMoveShouldSetPanResponder: (e, gestureState) => {
|
|
4455
|
-
return
|
|
4455
|
+
return gestureState.dx !== 0;
|
|
4456
4456
|
},
|
|
4457
4457
|
onPanResponderMove: (evt, gestureState) => {
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4458
|
+
if (gestureState.dx > 0) {
|
|
4459
|
+
translateX.setValue(gestureState.dx);
|
|
4460
|
+
slideTailCardRef?.current?.setNativeProps({
|
|
4461
|
+
style: { width: gestureState.dx + BUTTON_WIDTH / 2 }
|
|
4462
|
+
});
|
|
4463
|
+
}
|
|
4462
4464
|
},
|
|
4463
4465
|
onPanResponderRelease: (e, gestureState) => {
|
|
4464
|
-
if (gestureState.dx >= value.current * 0.
|
|
4465
|
-
onComplete?.();
|
|
4466
|
+
if (gestureState.dx >= value.current * 0.7) {
|
|
4466
4467
|
reactNative.Animated.timing(translateX, {
|
|
4467
|
-
toValue: value.current - BUTTON_WIDTH,
|
|
4468
|
+
toValue: value.current - BUTTON_WIDTH - 12,
|
|
4468
4469
|
// Slide to the end
|
|
4469
4470
|
duration: 300,
|
|
4470
4471
|
useNativeDriver: false
|
|
4471
|
-
}).start()
|
|
4472
|
+
}).start(() => {
|
|
4473
|
+
onComplete?.();
|
|
4474
|
+
});
|
|
4472
4475
|
slideTailCardRef?.current?.setNativeProps({
|
|
4473
4476
|
style: { width: value.current + BUTTON_WIDTH }
|
|
4474
4477
|
// Change the width here
|