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 +2 -0
- package/lib/index.js +30 -15
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +30 -15
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -3237,7 +3237,7 @@ const CommonTextInput = (props) => {
|
|
|
3237
3237
|
mode: "outlined",
|
|
3238
3238
|
outlineStyle: {
|
|
3239
3239
|
...styles$8.outlineStyle,
|
|
3240
|
-
borderColor: errorMessage?.length ? DHRE_DEFAULT.
|
|
3240
|
+
borderColor: errorMessage?.length ? DHRE_DEFAULT.DH_SEMENTIC_ERROR : value?.length ? activeBorderColor : inactiveBorderColor
|
|
3241
3241
|
},
|
|
3242
3242
|
label,
|
|
3243
3243
|
value,
|
|
@@ -3760,6 +3760,10 @@ const styles$4 = StyleSheet.create({
|
|
|
3760
3760
|
},
|
|
3761
3761
|
resendOtpTextEnable: {
|
|
3762
3762
|
textDecorationLine: "underline"
|
|
3763
|
+
},
|
|
3764
|
+
resendOTPStyle: {
|
|
3765
|
+
alignSelf: "flex-end",
|
|
3766
|
+
marginTop: verticalScale(8)
|
|
3763
3767
|
}
|
|
3764
3768
|
});
|
|
3765
3769
|
|
|
@@ -3775,6 +3779,8 @@ const OTPInput = React.forwardRef(
|
|
|
3775
3779
|
textInputStyle,
|
|
3776
3780
|
resendTextStyle,
|
|
3777
3781
|
resendOtpColor,
|
|
3782
|
+
label = "OTP",
|
|
3783
|
+
resendText = "Resend OTP",
|
|
3778
3784
|
mode
|
|
3779
3785
|
}, ref) => {
|
|
3780
3786
|
const [otp, setOTP] = useState("");
|
|
@@ -3838,7 +3844,7 @@ const OTPInput = React.forwardRef(
|
|
|
3838
3844
|
return /* @__PURE__ */ React.createElement(View, { style: { ...otpContainerStyle }, "data-testid": testId }, /* @__PURE__ */ React.createElement(
|
|
3839
3845
|
CustomTypography,
|
|
3840
3846
|
{
|
|
3841
|
-
text:
|
|
3847
|
+
text: label,
|
|
3842
3848
|
variant: FontStyle.B4_REGULAR,
|
|
3843
3849
|
style: {
|
|
3844
3850
|
color: otp?.length ? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_SECONDRY,
|
|
@@ -3867,27 +3873,36 @@ const OTPInput = React.forwardRef(
|
|
|
3867
3873
|
returnKeyType: otp.length === length ? "done" : "next",
|
|
3868
3874
|
selectionColor: theme$1.CONTENT_PRIMARY
|
|
3869
3875
|
}
|
|
3870
|
-
))), /* @__PURE__ */ React.createElement(
|
|
3871
|
-
|
|
3876
|
+
))), /* @__PURE__ */ React.createElement(
|
|
3877
|
+
Pressable,
|
|
3872
3878
|
{
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3879
|
+
onPress: onClickResendOTP,
|
|
3880
|
+
style: styles$4.resendOTPStyle,
|
|
3881
|
+
disabled: !isResendOtpEnable
|
|
3882
|
+
},
|
|
3883
|
+
/* @__PURE__ */ React.createElement(
|
|
3884
|
+
CustomTypography,
|
|
3885
|
+
{
|
|
3886
|
+
text: resendText,
|
|
3887
|
+
variant: FontStyle.L2_REGULAR,
|
|
3888
|
+
style: {
|
|
3889
|
+
textDecorationLine: "underline",
|
|
3890
|
+
color: isResendOtpEnable ? resendOtpColor ?? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_DISABLE,
|
|
3891
|
+
...resendTextStyle
|
|
3892
|
+
}
|
|
3877
3893
|
}
|
|
3878
|
-
|
|
3879
|
-
)
|
|
3894
|
+
)
|
|
3895
|
+
), /* @__PURE__ */ React.createElement(View, { style: styles$4.resendOtpContainer }, errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3880
3896
|
CustomTypography,
|
|
3881
3897
|
{
|
|
3882
|
-
text:
|
|
3898
|
+
text: errorMessage,
|
|
3883
3899
|
variant: FontStyle.L2_REGULAR,
|
|
3884
3900
|
style: {
|
|
3885
|
-
|
|
3886
|
-
color:
|
|
3887
|
-
...resendTextStyle
|
|
3901
|
+
alignSelf: "flex-start",
|
|
3902
|
+
color: theme$1.ERROR
|
|
3888
3903
|
}
|
|
3889
3904
|
}
|
|
3890
|
-
))));
|
|
3905
|
+
) : /* @__PURE__ */ React.createElement(View, null)));
|
|
3891
3906
|
}
|
|
3892
3907
|
);
|
|
3893
3908
|
var index$4 = withThemeProvider(OTPInput);
|