@towsila/expo-ui-library 4.10.3 → 4.10.5

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": "4.10.3",
3
+ "version": "4.10.5",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,5 +1,5 @@
1
1
  import { useState } from "react";
2
- import { I18nManager, Text, TouchableOpacity } from "react-native";
2
+ import { Text, TouchableOpacity } from "react-native";
3
3
  import { useAppTheme } from "../../context/ThemeContext";
4
4
  import { textSize, Fonts} from "../../tokens/typography";
5
5
  import TemplateSubPage from "../reusable/templateSubPage";
@@ -44,6 +44,7 @@ export default function VerificationCodeScreen({
44
44
  reset();
45
45
  };
46
46
  const {isRTL} = useLanguage();
47
+ const align = isRTL?"right":"left";
47
48
  return (
48
49
  <TemplateSubPage
49
50
  title={title}
@@ -56,12 +57,12 @@ export default function VerificationCodeScreen({
56
57
  >
57
58
  <OtpInput length={4} onChange={setCode} size={70}/>
58
59
  {count !== 0 ? (
59
- <Text style={{ textAlign: isRTL ? "left" : "right", color: colors.text.placeholder, fontSize: textSize.xs, fontFamily: Fonts.montserrat.regular}}>
60
+ <Text style={{ textAlign:align, color: colors.text.placeholder, fontSize: textSize.xs, fontFamily: Fonts.montserrat.regular}}>
60
61
  {resendText}: {count} {unit}
61
62
  </Text>
62
63
  ) : (
63
64
  <TouchableOpacity onPress={handleResend}>
64
- <Text style={{textAlign: isRTL ? "left" : "right", color: colors.primary, fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular }}>
65
+ <Text style={{textAlign:align, color: colors.primary, fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular }}>
65
66
  {resendBtn}
66
67
  </Text>
67
68
  </TouchableOpacity>
@@ -27,6 +27,7 @@ export default function AboutScreen({
27
27
  const { colors } = useAppTheme();
28
28
  const styles = createStyles(colors);
29
29
  const {isRTL} = useLanguage();
30
+ const align = isRTL?"right":"left";
30
31
  return (
31
32
  <TemplateSubPage
32
33
  title={title}
@@ -36,7 +37,7 @@ export default function AboutScreen({
36
37
  <View style={styles.container}>
37
38
  {/* Header */}
38
39
  <View style={styles.header}>
39
- <View style={{marginBottom:20, flexDirection:isRTL?"row":"row-reverse", justifyContent:"space-between", alignItems:"center"}}>
40
+ <View style={{marginBottom:20, flexDirection:isRTL?"row-reverse":"row", justifyContent:"space-between", alignItems:"center"}}>
40
41
  {logo}
41
42
  <Badge
42
43
  text="v1.0.0"
@@ -45,9 +46,9 @@ export default function AboutScreen({
45
46
  />
46
47
  </View>
47
48
 
48
- <Text style={[styles.appName , {textAlign:isRTL ? "left":"right"}]}>{appName}</Text>
49
+ <Text style={[styles.appName , {textAlign:align}]}>{appName}</Text>
49
50
 
50
- <Text style={[styles.slogan , {textAlign:isRTL ? "left":"right"}]}>
51
+ <Text style={[styles.slogan , {textAlign:align}]}>
51
52
  {slogan}
52
53
  </Text>
53
54
  </View>
@@ -56,11 +57,11 @@ export default function AboutScreen({
56
57
  <View style={styles.sections}>
57
58
  {sections.map((section, index) => (
58
59
  <View key={index} style={styles.card}>
59
- <Text style={[styles.sectionTitle, {textAlign:isRTL ? "left":"right"}]}>
60
+ <Text style={[styles.sectionTitle, {textAlign:align}]}>
60
61
  {section.title}
61
62
  </Text>
62
63
 
63
- <Text style={[styles.sectionText, {textAlign:isRTL ? "left":"right"}]}>
64
+ <Text style={[styles.sectionText, {textAlign:align}]}>
64
65
  {section.text}
65
66
  </Text>
66
67
  </View>
@@ -56,6 +56,7 @@ export default function LoginScreen({
56
56
  const { colors } = useAppTheme();
57
57
  const form = useLoginForm({ onLogin });
58
58
  const {isRTL} = useLanguage();
59
+ const align = isRTL ? "row-reverse":"row";
59
60
  return (
60
61
  <View style={{ flex: 1, paddingHorizontal: 20, paddingTop: 60 ,}}>
61
62
  <ScreenHeader title={title} description={subtitle} />
@@ -90,7 +91,7 @@ export default function LoginScreen({
90
91
  />
91
92
  <View style={{gap:10}}>
92
93
  <SharpButton text={loginButtonLabel} bgColor={colors.primary} onPress={form.handleSubmit} height={50} loading={form.loading} />
93
- <TouchableOpacity onPress={onForgotPassword} activeOpacity={0.7} style={{ alignSelf: isRTL ?"flex-start" :"flex-end" }}>
94
+ <TouchableOpacity onPress={onForgotPassword} activeOpacity={0.7} style={{ alignSelf: isRTL ?"flex-end" :"flex-start" }}>
94
95
  <Text style={{ fontSize: textSize.xs, color: colors.primary, fontFamily: Fonts.montserrat.semiBold }}>
95
96
  {forgotPasswordLabel}
96
97
  </Text>
@@ -101,7 +102,7 @@ export default function LoginScreen({
101
102
  <View style={{ flex: 1, justifyContent: "space-between" }}>
102
103
  {(onGoogleLogin) && (
103
104
  <View>
104
- <View style={{ flexDirection: isRTL? "row-reverse": "row", alignItems: "center", gap: 12, marginVertical: 20, marginHorizontal: 20 }}>
105
+ <View style={{ flexDirection:align, alignItems: "center", gap: 12, marginVertical: 20, marginHorizontal: 20 }}>
105
106
  <View style={{ flex: 1, height: 1, backgroundColor: colors.text.secondary, opacity: 0.5 }} />
106
107
  <Text style={{ fontSize: textSize.xs, color: colors.text.secondary, fontFamily: Fonts.montserrat.regular }}>
107
108
  {dividerLabel}
@@ -114,7 +115,7 @@ export default function LoginScreen({
114
115
  borderColor={colors.text.primary}
115
116
  height={50}
116
117
  >
117
- <TouchableOpacity style={{ flexDirection:isRTL ? "row":"row-reverse", alignItems: "center", justifyContent: "center", gap: 10 }} onPress={onGoogleLogin}>
118
+ <TouchableOpacity style={{ flexDirection:align, alignItems: "center", justifyContent: "center", gap: 10 }} onPress={onGoogleLogin}>
118
119
  <Google width={20} height={20} />
119
120
  <Text style={{
120
121
  fontSize: textSize.sm,
@@ -129,7 +130,7 @@ export default function LoginScreen({
129
130
  </View>
130
131
  )}
131
132
 
132
- <View style={{ flexDirection: "row", justifyContent: "center", gap: 4, marginBottom: 70 }}>
133
+ <View style={{ flexDirection:align, justifyContent: "center", gap: 4, marginBottom: 70 }}>
133
134
  <Text style={{ fontSize: textSize.xs, color: colors.text.secondary, fontFamily: Fonts.montserrat.regular }}>
134
135
  {noAccountLabel}
135
136
  </Text>
@@ -45,7 +45,7 @@ export default function OnBoarding({
45
45
  >
46
46
  {/* ---------- Header ---------- */}
47
47
  <View style={{minHeight: 40,}}>
48
- <View style={{ height: 44, flexDirection: isRTL? "row": "row-reverse", alignItems: "center", gap: 15, justifyContent: "flex-start",}}>
48
+ <View style={{ height: 44, flexDirection: isRTL? "row-reverse": "row", alignItems: "center", gap: 15, justifyContent: "flex-start",}}>
49
49
  <BackIcon onBack={onBack}/>
50
50
  <Text
51
51
  style={{
@@ -61,7 +61,7 @@ export default function OnBoarding({
61
61
  <Text
62
62
  style={[
63
63
  styles.skipLabel,
64
- { color: colors.text.primary, textAlign: isRTL ? "right" : "left" },
64
+ { color: colors.text.primary, textAlign: isRTL ? "left" : "right" },
65
65
  ]}
66
66
  >
67
67
  {skipLabel}
@@ -90,7 +90,7 @@ export default function OnBoarding({
90
90
  <Text
91
91
  style={[
92
92
  styles.description,
93
- { color: colors.text.secondary,textAlign: isRTL ? "left" : "right", },
93
+ { color: colors.text.secondary,textAlign: isRTL ? "right" : "left", },
94
94
  ]}
95
95
  >
96
96
  {description}
@@ -69,12 +69,12 @@ export default function ProfileLayout({
69
69
  <TemplateSubPage title={title} text={""} onBack={onBack}>
70
70
 
71
71
  <View style={{ gap: 20 }}>
72
- <Text style={{ fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular, color: colors.text.placeholder, textAlign: isRTL ? "left" : "right" }}>
72
+ <Text style={{ fontSize: textSize.sm, fontFamily: Fonts.montserrat.regular, color: colors.text.placeholder, textAlign: isRTL ? "right" : "left" }}>
73
73
  {email}
74
74
  </Text>
75
75
 
76
76
  <View style={cardStyle(colors)}>
77
- <View style={{ flexDirection: isRTL ? "row" : "row-reverse", gap: 10 }}>
77
+ <View style={{ flexDirection: isRTL ? "row-reverse" : "row", gap: 10 }}>
78
78
  <View style={{ flex: 1 }}>{renderInput(byName("firstname"))}</View>
79
79
  <View style={{ flex: 1 }}>{renderInput(byName("lastname"))}</View>
80
80
  </View>
@@ -62,7 +62,7 @@ export default function SignUpScreen({
62
62
  formState,
63
63
  onSubmit,
64
64
  });
65
-
65
+ const align = isRTL?"row-reverse":"row";
66
66
  return (
67
67
  <View style={{ flex: 1, paddingHorizontal: 25, paddingTop: 50, paddingBottom: 20 }}>
68
68
  {/* Fixed: header */}
@@ -90,8 +90,8 @@ export default function SignUpScreen({
90
90
  {/* Terms notice */}
91
91
  <Text
92
92
  style={{
93
- flexDirection: isRTL ? "row" : "row-reverse",
94
- textAlign: isRTL? "left" : "right",
93
+ flexDirection:align,
94
+ textAlign: isRTL? "right" : "left",
95
95
  fontSize: textSize.xs,
96
96
  color: colors.text.secondary,
97
97
  fontFamily: Fonts.montserrat.regular,
@@ -117,7 +117,7 @@ export default function SignUpScreen({
117
117
 
118
118
  <View
119
119
  style={{
120
- flexDirection: isRTL ? "row" : "row-reverse",
120
+ flexDirection:align,
121
121
  justifyContent: "center",
122
122
  alignItems: "center",
123
123
  gap: 4,
@@ -27,21 +27,22 @@ export default function SuccessScreen({
27
27
  }: SuccessScreenProps) {
28
28
  const { colors } = useAppTheme();
29
29
  const {isRTL} = useLanguage();
30
+ const align = isRTL?"right":"left";
30
31
  return (
31
32
  <View style={{ flex: 1, paddingHorizontal: 32, paddingVertical: 60 }}>
32
- <Text style={{color: colors.text.primary, textAlign: isRTL ? "left" : "right", fontFamily: Fonts.montserrat.semiBold, fontSize: textSize.xxl}}>{title}</Text>
33
+ <Text style={{color: colors.text.primary, textAlign:align, fontFamily: Fonts.montserrat.semiBold, fontSize: textSize.xxl}}>{title}</Text>
33
34
  {subtitle && (
34
35
  <Text
35
- style={{fontSize: textSize.md, fontFamily: Fonts.montserrat.regular, color: colors.text.secondary, textAlign: isRTL ? "left" : "right"}}
36
+ style={{fontSize: textSize.md, fontFamily: Fonts.montserrat.regular, color: colors.text.secondary, textAlign: align}}
36
37
  >
37
38
  {subtitle}
38
39
  </Text>
39
40
  )}
40
- <View style={{ flex: 1, marginTop: 70, alignItems: isRTL ? "flex-start" : "flex-end", gap: 20 }}>
41
+ <View style={{ flex: 1, marginTop: 70, alignItems: isRTL ? "flex-end" : "flex-start", gap: 20 }}>
41
42
  <View style={{ backgroundColor: colors.primary + "30", padding: 25, borderRadius: 30 }}>
42
43
  <AnimatedSuccessIcon color={colors.primary} size={37} strokeWidth={2} />
43
44
  </View>
44
- <Text style={{ color: colors.text.secondary, textAlign: isRTL ? "left" : "right", fontFamily: Fonts.montserrat.regular, fontSize: textSize.md }}>
45
+ <Text style={{ color: colors.text.secondary, textAlign: align, fontFamily: Fonts.montserrat.regular, fontSize: textSize.md }}>
45
46
  {description}
46
47
  </Text>
47
48
  {children}
@@ -16,7 +16,7 @@ export default function ScreenHeader({title, description, onBack}:PageProps){
16
16
  const {isRTL} = useLanguage();
17
17
  return (
18
18
  <View style={{minHeight: 40, gap: 10}}>
19
- <View style={{ height: 44, flexDirection: isRTL? "row": "row-reverse", alignItems: "center", gap: 15}}>
19
+ <View style={{ height: 44, flexDirection: isRTL? "row-reverse": "row", alignItems: "center", gap: 15}}>
20
20
  <BackIcon onBack={onBack}/>
21
21
  <Text
22
22
  style={{
@@ -29,7 +29,7 @@ export default function ScreenHeader({title, description, onBack}:PageProps){
29
29
  </Text>
30
30
  </View>
31
31
  <Text
32
- style={{fontSize: textSize.md, fontFamily: Fonts.montserrat.regular, color: colors.text.secondary, textAlign: isRTL ? "left" : "right" , marginTop: 10}}
32
+ style={{fontSize: textSize.md, fontFamily: Fonts.montserrat.regular, color: colors.text.secondary, textAlign: isRTL ? "right" : "left" , marginTop: 10}}
33
33
  >
34
34
  {description}
35
35
  </Text>
@@ -1,4 +1,4 @@
1
- import { TouchableOpacity, View, Text, Modal, Pressable, Animated, I18nManager } from "react-native";
1
+ import { TouchableOpacity, View, Text, Modal, Pressable, Animated } from "react-native";
2
2
  import React, { useState, useEffect, useRef } from "react";
3
3
  import { Dimensions } from "react-native";
4
4
  import {Logout} from "@towsila/icons";
@@ -28,7 +28,7 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
28
28
  const [activeIndex, setActiveIndex] = useState<number | null>(0);
29
29
  const slideAnim = useRef(new Animated.Value(-SIDEBAR_WIDTH)).current;
30
30
  const fadeAnim = useRef(new Animated.Value(0)).current;
31
-
31
+ const {isRTL} = useLanguage();
32
32
  useEffect(() => {
33
33
  if (visible) {
34
34
  Animated.parallel([
@@ -58,15 +58,15 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
58
58
  ]).start();
59
59
  }
60
60
  }, [visible]);
61
-
61
+ const align = isRTL ? "row-reverse":"row";
62
62
  return(
63
63
  <Modal visible={visible} transparent animationType="none" onRequestClose={onClose}>
64
- <View style={{ flex: 1, flexDirection: "row" }}>
64
+ <View style={{ flex: 1, flexDirection:align}}>
65
65
  {/* Animated sidebar panel sliding from left */}
66
66
  <Animated.View style={{
67
67
  justifyContent: "space-between",
68
68
  height: "100%",
69
- width: SIDEBAR_WIDTH,
69
+ width: isRTL ? SIDEBAR_WIDTH : -SIDEBAR_WIDTH,
70
70
  backgroundColor: colors.background.main,
71
71
  paddingHorizontal: 20,
72
72
  paddingVertical:50,
@@ -75,8 +75,8 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
75
75
  {/* top container */}
76
76
  <View style={{flex: 1, gap: 30}}>
77
77
  {/* logo, name and language row */}
78
- <View style={{flexDirection: "row", alignItems:"center", justifyContent:"space-between"}}>
79
- <View style={{flexDirection: "row", alignItems: "center", gap: 6}}>
78
+ <View style={{flexDirection:align, alignItems:"center", justifyContent:"space-between"}}>
79
+ <View style={{flexDirection: align, alignItems: "center", gap: 6}}>
80
80
  {logo}
81
81
  </View>
82
82
  <View>
@@ -92,7 +92,7 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
92
92
  <TouchableOpacity
93
93
  key={index}
94
94
  style={{
95
- flexDirection: "row",
95
+ flexDirection:align,
96
96
  alignItems: "center",
97
97
  gap: 12,
98
98
  paddingVertical: 14,
@@ -107,7 +107,7 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
107
107
  }}
108
108
  >
109
109
  {item.iconSvg && (
110
- <View style={[I18nManager.isRTL && {transform: [{ scaleX: -1 }]} ]}>
110
+ <View style={[isRTL && {transform: [{ scaleX: -1 }]} ]}>
111
111
  {item.iconSvg(isActive ? colors.primary : "transparent")}
112
112
  </View>
113
113
  )}
@@ -127,8 +127,8 @@ export default function AsideBar({logo, menu, onLogout, logoutLabel, onNavigate,
127
127
 
128
128
  {/* bottom container */}
129
129
  <View style={{ gap: 16, paddingHorizontal: 16, }}>
130
- <TouchableOpacity onPress={onLogout} style={{ flexDirection: "row", alignItems: "center", gap: 10 }}>
131
- <Logout width={22} height={22} color={colors.semantic.error} style={[I18nManager.isRTL && {transform: [{scale:-1}]}]}/>
130
+ <TouchableOpacity onPress={onLogout} style={{ flexDirection:align, alignItems: "center", gap: 10 }}>
131
+ <Logout width={22} height={22} color={colors.semantic.error} style={[isRTL && {transform: [{scale:-1}]}]}/>
132
132
  <Text style={{
133
133
  fontFamily: Fonts.montserrat.regular,
134
134
  fontSize: textSize.md,
@@ -1,6 +1,5 @@
1
1
  import { TouchableOpacity } from "react-native";
2
2
  import { useAppTheme } from "../../context/ThemeContext";
3
- import { ArrowBack } from "@towsila/icons";
4
3
  import { useLanguage } from "../..";
5
4
  import { Ionicons } from "@expo/vector-icons";
6
5
 
@@ -120,7 +120,7 @@ const {isRTL} = useLanguage();
120
120
  fontSize: textSize.xxl,
121
121
  color: colors.text.primary,
122
122
  marginBottom: 10,
123
- textAlign:isRTL ? "left" :"right"
123
+ textAlign:isRTL ? "right" :"left"
124
124
  }}>
125
125
  {title}
126
126
  </Text>
@@ -45,6 +45,7 @@ export default function Input({
45
45
  const [focused, setFocused] = useState(false);
46
46
  const {isRTL} = useLanguage();
47
47
  const [prefixW, setPrefixW] = useState(0);
48
+ const align = isRTL ? "right" :"left"
48
49
  return (
49
50
  <View style={[style, {marginBottom: 4}]}>
50
51
  {label && (
@@ -53,7 +54,7 @@ export default function Input({
53
54
  fontSize: textSize.xs,
54
55
  fontFamily: labelFontFamily,
55
56
  marginBottom: 6,
56
- textAlign: isRTL ? "left" :"right"
57
+ textAlign: align
57
58
  }}>
58
59
  {label}
59
60
  </Text>
@@ -67,7 +68,7 @@ export default function Input({
67
68
  color={error ? colors.semantic.error : focused ? colors.primary : colors.text.secondary}
68
69
  style={{
69
70
  position: "absolute",
70
- [isRTL ? "left" : "right"]: 14,
71
+ [align]: 14,
71
72
  top: "50%",
72
73
  transform: [{ translateY: -9 }],
73
74
  zIndex: 1,
@@ -79,7 +80,7 @@ export default function Input({
79
80
  onLayout={(e) => setPrefixW(e.nativeEvent.layout.width)}
80
81
  style={[
81
82
  styles.prefix,
82
- { [isRTL ? "left" : "right"]: 0, flexDirection: isRTL?"row":"row-reverse", },
83
+ { [align]: 0, flexDirection: isRTL?"row-reverse":"row", },
83
84
  ]}
84
85
  >
85
86
  {prefix}
@@ -108,7 +109,7 @@ export default function Input({
108
109
  fontFamily: textFontFamily,
109
110
 
110
111
  direction: isRTL ? "rtl" : "ltr",
111
- textAlign: isRTL ? "right" : "left",
112
+ textAlign: align,
112
113
 
113
114
  paddingStart: prefix ? prefixW + 10 : iconLeft ? 42 : 16,
114
115
  paddingEnd: iconRight ? 42 : 16,
@@ -131,7 +132,7 @@ export default function Input({
131
132
  onPress={onPressIconRight}
132
133
  style={{
133
134
  position: "absolute",
134
- [isRTL ? "right" : "left"]: 14,
135
+ [isRTL ? "left" : "right"]: 14,
135
136
  top: "50%",
136
137
  transform: [{ translateY: -9 }],
137
138
  zIndex: 1,
@@ -140,7 +141,7 @@ export default function Input({
140
141
  )}
141
142
  </View>
142
143
  {error && (
143
- <ErrorMessage message={error} position={isRTL ? "left" : "right"}/>
144
+ <ErrorMessage message={error} position={align}/>
144
145
  )}
145
146
  </View>
146
147
  );
@@ -16,16 +16,17 @@ export default function NavigationRow({icon: Icon, label, onNavigate}:Props){
16
16
  const arrow: keyof typeof Ionicons.glyphMap = isRTL
17
17
  ? "chevron-back-outline"
18
18
  : "chevron-forward-outline";
19
+ const align = isRTL ? "row-reverse":"row";
19
20
  return(
20
21
  <TouchableOpacity
21
22
  onPress={onNavigate}
22
23
  style={{
23
- flexDirection: isRTL ? "row":"row-reverse",
24
+ flexDirection:align,
24
25
  justifyContent:"space-between",
25
26
  alignItems:"center"
26
27
  }}>
27
28
  <View style={{
28
- flexDirection: isRTL ? "row":"row-reverse",
29
+ flexDirection:align,
29
30
  gap: 20,
30
31
  alignItems:"center"
31
32
  }}>
@@ -22,12 +22,12 @@ export default function PageIndicator({
22
22
  }: Props) {
23
23
  const {isRTL} = useLanguage();
24
24
  return (
25
- <View style={{ alignItems: isRTL ? "flex-start" : "flex-end", gap: 15, width: "100%" }}>
25
+ <View style={{ alignItems: isRTL ? "flex-end" : "flex-start", gap: 15, width: "100%" }}>
26
26
  <Text style={{ color: textColor, fontSize: textSize.md, fontFamily: Fonts.montserrat.semiBold }}>
27
27
  {stepsLabel}
28
28
  </Text>
29
29
 
30
- <View style={{ flexDirection: isRTL ? "row" : "row-reverse", gap: 8, width: "100%" }}>
30
+ <View style={{ flexDirection: isRTL ? "row-reverse" : "row", gap: 8, width: "100%" }}>
31
31
  {Array.from({ length: total }).map((_, index) => (
32
32
  <View
33
33
  key={index}
@@ -22,7 +22,7 @@ const {isRTL} = useLanguage();
22
22
  backgroundColor: colors.background.card,
23
23
  borderRadius: 14,
24
24
  padding: 16,
25
- justifyContent:isRTL? "flex-start":"flex-end",
25
+ justifyContent:isRTL? "flex-end":"flex-start",
26
26
  gap: 10,
27
27
  }}>
28
28
  {cardTitle && (
@@ -31,14 +31,14 @@ const {isRTL} = useLanguage();
31
31
  fontFamily: Fonts.montserrat.semiBold,
32
32
  color: colors.text.primary,
33
33
  marginBottom: 4,
34
- textAlign: isRTL?"left":"right"
34
+ textAlign: isRTL?"right":"left"
35
35
  }}>
36
36
  {cardTitle}
37
37
  </Text>
38
38
  )}
39
39
 
40
40
  {cardItems.map((item, index) => (
41
- <View key={index} style={{ flexDirection:isRTL ?"row": "row-reverse", alignItems: "center", gap: 8 }}>
41
+ <View key={index} style={{ flexDirection:isRTL ?"row-reverse": "row", alignItems: "center", gap: 8 }}>
42
42
  <Ionicons
43
43
  name={checks[index] ? "checkmark-circle" : "ellipse-outline"}
44
44
  size={16}
@@ -9,13 +9,13 @@ export default function PhonePrefix() {
9
9
  return (
10
10
  <View
11
11
  style={{
12
- flexDirection: isRTL ? "row" : "row-reverse",
12
+ flexDirection: isRTL ? "row-reverse" : "row",
13
13
  alignItems: "center",
14
14
  gap: 4,
15
15
  height: 50,
16
16
  paddingHorizontal: 14,
17
- [isRTL ? "borderRightWidth" : "borderLeftWidth"]: 1,
18
- [isRTL ? "borderRightColor" : "borderLeftColor"]: colors.semantic.border,
17
+ [isRTL ? "borderLeftWidth" : "borderRightWidth"]: 1,
18
+ [isRTL ? "borderLeftColor" : "borderRightColor"]: colors.semantic.border,
19
19
  }}
20
20
  >
21
21
  <DzFlag width={23} height={15} />
@@ -53,7 +53,7 @@ const carStateText = request.carState
53
53
 
54
54
 
55
55
  const deadline = new Date(request.time).getTime() + 2 * 60 * 1000;
56
-
56
+ const align = isRTL ?"row-reverse":"row";
57
57
  return (
58
58
  <View
59
59
  style={{
@@ -68,7 +68,7 @@ const carStateText = request.carState
68
68
  >
69
69
  <View style={{gap: 5}}>
70
70
  <View style={{
71
- flexDirection: isRTL ?"row":"row-reverse",
71
+ flexDirection:align,
72
72
  justifyContent: "space-between",
73
73
  }}>
74
74
  <Text
@@ -101,7 +101,7 @@ const carStateText = request.carState
101
101
  </View>
102
102
  {addRow && (
103
103
  <View style={{
104
- flexDirection: isRTL ?"row":"row-reverse",
104
+ flexDirection: align,
105
105
  justifyContent: "space-between",
106
106
  alignItems: "center",
107
107
  }}>
@@ -115,7 +115,7 @@ const carStateText = request.carState
115
115
  {request.status === "PENDING" ? (
116
116
  <CircularCountdown deadline={deadline} onExpire={() => onExpire?.(request.id)}/>
117
117
  ):(
118
- <View style={{flexDirection: isRTL ?"row":"row-reverse", alignItems: "center", gap: 4}}>
118
+ <View style={{flexDirection: align, alignItems: "center", gap: 4}}>
119
119
  <View style={[isRTL && {transform :[{scaleX:-1}]}]}>
120
120
  <Clock width={13} height={13} color={colors.text.placeholder} />
121
121
  </View>
@@ -140,7 +140,7 @@ const carStateText = request.carState
140
140
  <View style={{borderWidth:0.5, borderColor: colors.semantic.border}}/>
141
141
  <View
142
142
  style={{
143
- flexDirection: isRTL ? "row" : "row-reverse",
143
+ flexDirection: align,
144
144
  justifyContent: "space-between",
145
145
  gap: 10,
146
146
  }}
@@ -173,10 +173,12 @@ const carStateText = request.carState
173
173
  function CardRow({ icon: Icon, label, value }: { icon: React.ComponentType<SvgProps>; label: string; value: string }) {
174
174
  const { isRTL } = useLanguage();
175
175
  const { colors } = useAppTheme();
176
+ const align = isRTL? "row-reverse":"row";
177
+ const text = isRTL?"right":"left";
176
178
  return (
177
179
  <View
178
180
  style={{
179
- flexDirection: isRTL ? "row" : "row-reverse",
181
+ flexDirection:align,
180
182
  alignItems: "center",
181
183
  gap: 10,
182
184
  }}
@@ -190,7 +192,7 @@ function CardRow({ icon: Icon, label, value }: { icon: React.ComponentType<SvgPr
190
192
  fontSize: textSize.sm,
191
193
  fontFamily: Fonts.montserrat.semiBold,
192
194
  color: colors.text.secondary,
193
- textAlign: isRTL ? "left" : "right",
195
+ textAlign: text,
194
196
  }}
195
197
  >
196
198
  {label}
@@ -201,7 +203,7 @@ function CardRow({ icon: Icon, label, value }: { icon: React.ComponentType<SvgPr
201
203
  fontSize: textSize.sm,
202
204
  fontFamily: Fonts.montserrat.regular,
203
205
  color: colors.text.primary,
204
- textAlign: isRTL ? "left" : "right",
206
+ textAlign:text,
205
207
  }}
206
208
  >
207
209
  {value}
@@ -71,7 +71,7 @@ export const ScrollWithIndicator: React.FC<Props> = ({
71
71
  }, []);
72
72
 
73
73
  return (
74
- <View style={[{ flex: 1, flexDirection: isRTL ? "row" : "row-reverse" }, style]}>
74
+ <View style={[{ flex: 1, flexDirection: isRTL ? "row-reverse" : "row" }, style]}>
75
75
  <Animated.ScrollView
76
76
  {...rest}
77
77
  style={{ flex: 1 }}
@@ -98,7 +98,7 @@ export const ScrollWithIndicator: React.FC<Props> = ({
98
98
  alignSelf: "center",
99
99
  opacity: fade,
100
100
  },
101
- isRTL ? { marginLeft: 15 } : { marginRight: 15 },
101
+ isRTL ? { marginRight: 15 } : { marginLeft: 15 },
102
102
  ]}
103
103
  >
104
104
  {/* soft track */}
@@ -68,7 +68,8 @@ export default function Select({
68
68
 
69
69
  onClearError?.();
70
70
  };
71
-
71
+ const align = isRTL ? "right":"left";
72
+ const layout = isRTL?"row-reverse":"row";
72
73
  return (
73
74
  <View style={{ marginBottom: 4 }}>
74
75
  {label && (
@@ -78,7 +79,7 @@ export default function Select({
78
79
  fontSize: textSize.xs,
79
80
  fontFamily: Fonts.montserrat.semiBold,
80
81
  marginBottom: 6,
81
- textAlign: isRTL?"left":"right"
82
+ textAlign: align
82
83
  }}
83
84
  >
84
85
  {label}
@@ -102,7 +103,7 @@ export default function Select({
102
103
  : colors.text.primary,
103
104
  borderRadius: 12,
104
105
  paddingHorizontal: 14,
105
- flexDirection: isRTL?"row":"row-reverse",
106
+ flexDirection:layout,
106
107
  alignItems: "center",
107
108
  justifyContent: "space-between",
108
109
  }}
@@ -114,7 +115,7 @@ export default function Select({
114
115
  fontSize: textSize.sm,
115
116
  fontFamily: Fonts.montserrat.regular,
116
117
  color: colors.text.primary,
117
- textAlign: isRTL?"left":"right"
118
+ textAlign: align
118
119
  }}
119
120
  >
120
121
  {selectedLabel ?? placeholder}
@@ -129,7 +130,7 @@ export default function Select({
129
130
  </View>
130
131
  </TouchableOpacity>
131
132
 
132
- {error && <ErrorMessage message={error} position={isRTL ? "left":"right"}/>}
133
+ {error && <ErrorMessage message={error} position={align}/>}
133
134
 
134
135
  <Modal
135
136
  visible={open}
@@ -181,7 +182,7 @@ export default function Select({
181
182
  minHeight: 48,
182
183
  paddingVertical: 12,
183
184
  paddingHorizontal: 14,
184
- flexDirection: isRTL ? "row":"row-reverse",
185
+ flexDirection: layout,
185
186
  alignItems: "center",
186
187
  justifyContent: "space-between",
187
188
  backgroundColor: isSelected
@@ -199,7 +200,7 @@ export default function Select({
199
200
  color: isSelected
200
201
  ? colors.primary
201
202
  : colors.text.primary,
202
- textAlign: isRTL?"left":"right"
203
+ textAlign: align
203
204
  }}
204
205
  >
205
206
  {option.label}
@@ -15,6 +15,7 @@ interface TermsPopupProps{
15
15
  export default function TermsPopup({showTerms, generalTerms, onAgree, title, description, buttonText}: TermsPopupProps){
16
16
  const {colors} = useAppTheme();
17
17
  const {isRTL} = useLanguage();
18
+ const align = isRTL?"right":"left";
18
19
  return (
19
20
  <CustomPopUp
20
21
  visible={showTerms}
@@ -25,7 +26,7 @@ export default function TermsPopup({showTerms, generalTerms, onAgree, title, des
25
26
  fontSize: textSize.sm,
26
27
  color: colors.text.secondary,
27
28
  marginBottom: 4,
28
- textAlign:isRTL ? "left" :"right"
29
+ textAlign:align
29
30
  }}>
30
31
  {description}
31
32
  </Text>
@@ -37,7 +38,7 @@ export default function TermsPopup({showTerms, generalTerms, onAgree, title, des
37
38
  showsVerticalScrollIndicator={false}
38
39
  >
39
40
  {generalTerms.map((term: string, i: number) => (
40
- <View key={i} style={{ flexDirection: isRTL ? "row" : "row-reverse", gap: 8, marginBottom: 8 }}>
41
+ <View key={i} style={{ flexDirection: isRTL ? "row-reverse" : "row", gap: 8, marginBottom: 8 }}>
41
42
  <Text style={{ color: colors.primary }}>•</Text>
42
43
  <Text style={{
43
44
  fontFamily: Fonts.montserrat.regular,
@@ -45,7 +46,7 @@ export default function TermsPopup({showTerms, generalTerms, onAgree, title, des
45
46
  color: colors.text.secondary,
46
47
  flex: 1,
47
48
  lineHeight: 20,
48
- textAlign:isRTL ? "left" :"right"
49
+ textAlign:align
49
50
  }}>
50
51
  {term}
51
52
  </Text>
@@ -35,7 +35,7 @@ export default function TextArea({
35
35
  onChangeText(text);
36
36
  onClearError?.();
37
37
  };
38
-
38
+ const align = isRTL?"right":"left";
39
39
  return (
40
40
  <View style={{ marginBottom: 16 }}>
41
41
  {label && (
@@ -45,7 +45,7 @@ export default function TextArea({
45
45
  fontFamily: Fonts.montserrat.semiBold,
46
46
  color: colors.text.primary,
47
47
  marginBottom: 6,
48
- textAlign: isRTL ? "left":"right"
48
+ textAlign:align
49
49
  }}
50
50
  >
51
51
  {label}
@@ -74,7 +74,7 @@ export default function TextArea({
74
74
  color: colors.text.primary,
75
75
 
76
76
  // Text and cursor direction
77
- textAlign: isRTL ? "right" : "left",
77
+ textAlign: isRTL ? "left" : "right",
78
78
  writingDirection: isRTL ? "rtl" : "ltr",
79
79
  }}
80
80
  />
@@ -88,7 +88,7 @@ export default function TextArea({
88
88
  value.length >= maxLength
89
89
  ? colors.semantic.error
90
90
  : colors.text.placeholder,
91
- textAlign: isRTL ? "right" : "left",
91
+ textAlign: isRTL ? "left" : "right",
92
92
  marginTop: 4,
93
93
  }}
94
94
  >
@@ -34,11 +34,11 @@ export default function ThemeToggle({ label }: TextTheme) {
34
34
  inputRange: [0, 1],
35
35
  outputRange: isRTL ? [0, TRAVEL] : [0, -TRAVEL],
36
36
  });
37
-
37
+ const align = isRTL?"row-reverse":"row";
38
38
 
39
39
  return (
40
- <View style={{ flexDirection: isRTL ? "row" : "row-reverse", alignItems: "center",justifyContent:"space-between"}}>
41
- <View style={{flexDirection: isRTL ? "row" : "row-reverse", gap: isDark ? 20:17}}>
40
+ <View style={{ flexDirection: align, alignItems: "center",justifyContent:"space-between"}}>
41
+ <View style={{flexDirection:align, gap: isDark ? 20:17}}>
42
42
  {isDark ? (
43
43
  <DarkMode width={22} height={22} color={colors.text.primary} />
44
44
  ) : (
@@ -72,7 +72,7 @@ export default function ThemeToggle({ label }: TextTheme) {
72
72
  style={{
73
73
  position: "absolute",
74
74
  top: (TRACK_H - THUMB) / 2 - 1,
75
- ...(isRTL ? { right: MARGIN - 1 } : { left: MARGIN - 1 }),
75
+ ...(isRTL ? { left: MARGIN - 1 } : { right: MARGIN - 1 }),
76
76
  width: THUMB,
77
77
  height: THUMB,
78
78
  borderRadius: THUMB / 2,
@@ -109,7 +109,7 @@ export default function Toast({
109
109
  backgroundColor: toastStyle.background,
110
110
  opacity,
111
111
  transform: [{ translateY }],
112
- flexDirection: isRTL ? "row" : "row-reverse",
112
+ flexDirection: isRTL ? "row-reverse" : "row",
113
113
  },
114
114
  ]}
115
115
  >
@@ -119,7 +119,7 @@ export default function Toast({
119
119
  styles.text,
120
120
  {
121
121
  color: toastStyle.text,
122
- textAlign: isRTL ? "left" :"right"
122
+ textAlign: isRTL ? "right" :"left"
123
123
  },
124
124
  ]}
125
125
  >
@@ -48,7 +48,7 @@ const {isRTL} = useLanguage();
48
48
  onPress={() => !disabled && onValueChange(!value)}
49
49
  disabled={disabled}
50
50
  hitSlop={8}
51
- style={[isRTL && {transform:[{scale: -1}]} ]}
51
+ style={[isRTL && {transform:[{scaleX: -1}]} ]}
52
52
  >
53
53
  <Animated.View
54
54
  style={[