@towsila/expo-ui-library 3.3.11 → 3.3.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towsila/expo-ui-library",
3
- "version": "3.3.11",
3
+ "version": "3.3.13",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,4 +1,4 @@
1
- import { View, ScrollView } from "react-native";
1
+ import { View, ScrollView, KeyboardAvoidingView, Platform } from "react-native";
2
2
  import PageTopBar from "../ui/PageTopBar";
3
3
  import { useAppTheme } from "../../context/ThemeContext";
4
4
  import ErrorMessage from "../ui/error";
@@ -29,6 +29,11 @@ export default function TemplateSubPage({
29
29
  const { colors } = useAppTheme();
30
30
 
31
31
  return (
32
+ <KeyboardAvoidingView
33
+ style={{ flex: 1 }}
34
+ behavior={Platform.OS === "ios" ? "padding" : "height"}
35
+ keyboardVerticalOffset={Platform.OS === "ios" ? 0 : 20}
36
+ >
32
37
  <View style={{
33
38
  flex: 1,
34
39
  paddingBottom: 60,
@@ -40,6 +45,7 @@ export default function TemplateSubPage({
40
45
  style={{ flex: 1 }}
41
46
  showsVerticalScrollIndicator={false}
42
47
  contentContainerStyle={{ flexGrow: 1 }}
48
+ keyboardShouldPersistTaps="handled"
43
49
  >
44
50
  <View style={{ flex: 1, gap: 20, marginTop: 20 }}>
45
51
  {error && (
@@ -47,7 +53,7 @@ export default function TemplateSubPage({
47
53
  )}
48
54
  {children}
49
55
  </View>
50
-
56
+ </ScrollView>
51
57
  {buttonText && (
52
58
  <View style={{ marginTop: 32 }}>
53
59
  <SharpButton
@@ -59,7 +65,8 @@ export default function TemplateSubPage({
59
65
  />
60
66
  </View>
61
67
  )}
62
- </ScrollView>
68
+
63
69
  </View>
70
+ </KeyboardAvoidingView>
64
71
  );
65
72
  }
@@ -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
- <SharpInput
59
+ <Input
59
60
  label={oldPasswordLabel}
60
61
  value={form.oldPassword}
61
62
  onChangeText={form.setOldPassword}
62
63
  placeholder={oldPasswordPlaceholder}
63
- iconLeft={(color) => <LockClosed width={18} height={18} color={color} />}
64
+ iconLeft={"lock-closed-outline"}
64
65
  iconRight={form.showOldPassword
65
- ? (color) => <EyeOff width={18} height={18} color={color} />
66
- : (color) => <Eye width={18} height={18} color={color} />
66
+ ? "eye-off-outline"
67
+ : "eye-outline"
67
68
  }
68
69
  onPressIconRight={() => form.setShowOldPassword(!form.showOldPassword)}
69
70
  secureTextEntry={!form.showOldPassword}
@@ -73,13 +74,13 @@ export default function ResetPasswordScreen({
73
74
  onClearError={() => form.clearError("oldPassword")}
74
75
  />
75
76
  )}
76
- <SharpInput
77
+ <Input
77
78
  label={passwordLabel}
78
79
  value={form.password}
79
80
  onChangeText={form.setPassword}
80
81
  placeholder={passwordPlaceholder}
81
- iconLeft={(color) => <LockClosed width={18} height={18} color={color}/>}
82
- iconRight={form.showPassword ? (color)=><EyeOff width={18} height={18} color={color}/> : (color)=><Eye width={18} height={18} color={color}/>}
82
+ iconLeft={"lock-closed-outline"}
83
+ iconRight={form.showPassword ? "eye-off-outline" : "eye-outline"}
83
84
  onPressIconRight={() => form.setShowPassword(!form.showPassword)}
84
85
  secureTextEntry={!form.showPassword}
85
86
  textContentType="password"
@@ -95,13 +96,13 @@ export default function ResetPasswordScreen({
95
96
  />
96
97
  )}
97
98
 
98
- <SharpInput
99
+ <Input
99
100
  label={confirmPasswordLabel}
100
101
  value={form.confirmPassword}
101
102
  onChangeText={form.setConfirmPassword}
102
103
  placeholder={confirmPasswordPlaceholder}
103
- iconLeft={(color) => <LockClosed width={18} height={18} color={color}/>}
104
- iconRight={form.showConfirmPassword ? (color)=><EyeOff width={18} height={18} color={color}/> : (color)=><Eye width={18} height={18} color={color}/>}
104
+ iconLeft={"lock-closed-outline"}
105
+ iconRight={form.showConfirmPassword ? "eye-off-outline" : "eye-outline"}
105
106
  onPressIconRight={() => form.setShowConfirmPassword(!form.showConfirmPassword)}
106
107
  secureTextEntry={!form.showConfirmPassword}
107
108
  textContentType="password"
@@ -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 && (
@@ -29,13 +31,14 @@ export default function PasswordRequirementsCard({
29
31
  fontFamily: Fonts.montserrat.semiBold,
30
32
  color: colors.text.primary,
31
33
  marginBottom: 4,
34
+ textAlign: isRTL?"left":"right"
32
35
  }}>
33
36
  {cardTitle}
34
37
  </Text>
35
38
  )}
36
39
 
37
40
  {cardItems.map((item, index) => (
38
- <View key={index} style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
41
+ <View key={index} style={{ flexDirection:isRTL ?"row": "row-reverse", alignItems: "center", gap: 8 }}>
39
42
  <Ionicons
40
43
  name={checks[index] ? "checkmark-circle" : "ellipse-outline"}
41
44
  size={16}