@towsila/expo-ui-library 3.3.10 → 3.3.12
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/package.json
CHANGED
|
@@ -40,6 +40,7 @@ export default function TemplateSubPage({
|
|
|
40
40
|
style={{ flex: 1 }}
|
|
41
41
|
showsVerticalScrollIndicator={false}
|
|
42
42
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
43
|
+
keyboardShouldPersistTaps="handled"
|
|
43
44
|
>
|
|
44
45
|
<View style={{ flex: 1, gap: 20, marginTop: 20 }}>
|
|
45
46
|
{error && (
|
|
@@ -47,7 +48,7 @@ export default function TemplateSubPage({
|
|
|
47
48
|
)}
|
|
48
49
|
{children}
|
|
49
50
|
</View>
|
|
50
|
-
|
|
51
|
+
</ScrollView>
|
|
51
52
|
{buttonText && (
|
|
52
53
|
<View style={{ marginTop: 32 }}>
|
|
53
54
|
<SharpButton
|
|
@@ -59,7 +60,7 @@ export default function TemplateSubPage({
|
|
|
59
60
|
/>
|
|
60
61
|
</View>
|
|
61
62
|
)}
|
|
62
|
-
|
|
63
|
+
|
|
63
64
|
</View>
|
|
64
65
|
);
|
|
65
66
|
}
|
|
@@ -3,6 +3,7 @@ import { useResetPasswordForm } from "../../hooks/useResetPasswordForm";
|
|
|
3
3
|
import PasswordRequirementsCard from "../ui/passwordRequirmentCard";
|
|
4
4
|
import SharpInput from "../ui/sharpInput";
|
|
5
5
|
import {LockClosed, EyeOff, Eye} from "@towsila/icons";
|
|
6
|
+
import Input from "../ui/input";
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
interface ResetPasswordScreenProps {
|
|
@@ -55,15 +56,15 @@ export default function ResetPasswordScreen({
|
|
|
55
56
|
loading={form.loading}
|
|
56
57
|
>
|
|
57
58
|
{includeOldPassword && (
|
|
58
|
-
<
|
|
59
|
+
<Input
|
|
59
60
|
label={oldPasswordLabel}
|
|
60
61
|
value={form.oldPassword}
|
|
61
62
|
onChangeText={form.setOldPassword}
|
|
62
63
|
placeholder={oldPasswordPlaceholder}
|
|
63
|
-
iconLeft={
|
|
64
|
+
iconLeft={"lock-closed-outline"}
|
|
64
65
|
iconRight={form.showOldPassword
|
|
65
|
-
?
|
|
66
|
-
:
|
|
66
|
+
? "eye-off-outline"
|
|
67
|
+
: "eye-outline"
|
|
67
68
|
}
|
|
68
69
|
onPressIconRight={() => form.setShowOldPassword(!form.showOldPassword)}
|
|
69
70
|
secureTextEntry={!form.showOldPassword}
|
|
@@ -28,10 +28,12 @@ export default function OtpInput({ length = 6, onComplete, onChange, style, size
|
|
|
28
28
|
const code = newDigits.join("");
|
|
29
29
|
onChange?.(code);
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
if (text.length > 0 && index < length - 1) {
|
|
32
|
+
const nextIndex = index + 1;
|
|
33
|
+
|
|
34
|
+
requestAnimationFrame(() => {
|
|
35
|
+
refs.current[nextIndex]?.focus();
|
|
36
|
+
});
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
if (code.length === length && newDigits.every((d) => d !== "")) {
|
|
@@ -40,14 +42,14 @@ export default function OtpInput({ length = 6, onComplete, onChange, style, size
|
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
return (
|
|
43
|
-
<View style={{ flexDirection: "row", justifyContent: "center", gap: 12, marginHorizontal: 20 }}>
|
|
45
|
+
<View style={{ flexDirection: "row", justifyContent: "center", gap: 12, marginHorizontal: 20, direction: "ltr",}}>
|
|
44
46
|
{digits.map((digit, index) => (
|
|
45
47
|
<TextInput
|
|
46
48
|
key={index}
|
|
47
49
|
ref={(r) => { if (r) refs.current[index] = r; }}
|
|
48
50
|
style={[
|
|
49
51
|
styles.otpInput,
|
|
50
|
-
{ borderColor: focusedIndex === index ? colors.primary : colors.
|
|
52
|
+
{ borderColor: focusedIndex === index ? colors.primary : colors.text.primary, width: size, height: size, borderRadius: borderRadius, fontFamily:fontFamily },
|
|
51
53
|
style
|
|
52
54
|
]}
|
|
53
55
|
keyboardType="number-pad"
|
|
@@ -2,6 +2,7 @@ import { View, Text } from "react-native";
|
|
|
2
2
|
import { Ionicons } from "@expo/vector-icons";
|
|
3
3
|
import { useAppTheme } from "../../context/ThemeContext";
|
|
4
4
|
import { textSize, Fonts } from "../../tokens/typography";
|
|
5
|
+
import { useLanguage } from "../../context/LanguageContext";
|
|
5
6
|
|
|
6
7
|
interface PasswordRequirementsCardProps {
|
|
7
8
|
checks: boolean[]; // ← array of booleans instead of named object
|
|
@@ -15,12 +16,13 @@ export default function PasswordRequirementsCard({
|
|
|
15
16
|
cardTitle,
|
|
16
17
|
}: PasswordRequirementsCardProps) {
|
|
17
18
|
const { colors } = useAppTheme();
|
|
18
|
-
|
|
19
|
+
const {isRTL} = useLanguage();
|
|
19
20
|
return (
|
|
20
21
|
<View style={{
|
|
21
22
|
backgroundColor: colors.background.card,
|
|
22
23
|
borderRadius: 14,
|
|
23
24
|
padding: 16,
|
|
25
|
+
justifyContent:isRTL? "flex-start":"flex-end",
|
|
24
26
|
gap: 10,
|
|
25
27
|
}}>
|
|
26
28
|
{cardTitle && (
|
|
@@ -35,7 +37,7 @@ export default function PasswordRequirementsCard({
|
|
|
35
37
|
)}
|
|
36
38
|
|
|
37
39
|
{cardItems.map((item, index) => (
|
|
38
|
-
<View key={index} style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
40
|
+
<View key={index} style={{ flexDirection:isRTL ?"row": "row-reverse", alignItems: "center", gap: 8 }}>
|
|
39
41
|
<Ionicons
|
|
40
42
|
name={checks[index] ? "checkmark-circle" : "ellipse-outline"}
|
|
41
43
|
size={16}
|