@oxyhq/services 5.13.0 → 5.13.1

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.
Files changed (204) hide show
  1. package/lib/commonjs/core/OxyServices.js +7 -7
  2. package/lib/commonjs/core/OxyServices.js.map +1 -1
  3. package/lib/commonjs/i18n/index.js +37 -1
  4. package/lib/commonjs/i18n/index.js.map +1 -1
  5. package/lib/commonjs/i18n/locales/ar-SA.json +128 -0
  6. package/lib/commonjs/i18n/locales/ca-ES.json +128 -0
  7. package/lib/commonjs/i18n/locales/de-DE.json +128 -0
  8. package/lib/commonjs/i18n/locales/en-US.json +85 -12
  9. package/lib/commonjs/i18n/locales/es-ES.json +58 -6
  10. package/lib/commonjs/i18n/locales/fr-FR.json +128 -0
  11. package/lib/commonjs/i18n/locales/it-IT.json +128 -0
  12. package/lib/commonjs/i18n/locales/ja-JP.json +127 -0
  13. package/lib/commonjs/i18n/locales/ko-KR.json +128 -0
  14. package/lib/commonjs/i18n/locales/pt-PT.json +128 -0
  15. package/lib/commonjs/i18n/locales/zh-CN.json +128 -0
  16. package/lib/commonjs/ui/components/FontLoader.js +22 -42
  17. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxyProvider.js +5 -8
  19. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  20. package/lib/commonjs/ui/components/StepBasedScreen.js +64 -44
  21. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -35
  23. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/PinInput.js +2 -2
  25. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  26. package/lib/commonjs/ui/context/OxyContext.js +434 -321
  27. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  28. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/SignInScreen.js +43 -39
  30. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +139 -125
  32. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +2 -4
  34. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  35. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +45 -25
  36. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  37. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +88 -53
  38. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -1
  39. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +79 -58
  40. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  41. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +61 -52
  42. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  43. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +220 -31
  44. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  45. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +77 -50
  46. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -1
  47. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +527 -66
  48. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  49. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +55 -30
  50. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  51. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +64 -46
  52. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  53. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +84 -146
  54. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  55. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +113 -34
  56. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  57. package/lib/commonjs/ui/stores/authStore.js +16 -20
  58. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  59. package/lib/commonjs/ui/styles/authStyles.js +2 -1
  60. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  61. package/lib/commonjs/ui/styles/index.js +11 -0
  62. package/lib/commonjs/ui/styles/index.js.map +1 -1
  63. package/lib/commonjs/ui/styles/spacing.js +51 -0
  64. package/lib/commonjs/ui/styles/spacing.js.map +1 -0
  65. package/lib/commonjs/utils/validationUtils.js +1 -1
  66. package/lib/module/core/OxyServices.js +7 -7
  67. package/lib/module/core/OxyServices.js.map +1 -1
  68. package/lib/module/i18n/index.js +37 -1
  69. package/lib/module/i18n/index.js.map +1 -1
  70. package/lib/module/i18n/locales/ar-SA.json +128 -0
  71. package/lib/module/i18n/locales/ca-ES.json +128 -0
  72. package/lib/module/i18n/locales/de-DE.json +128 -0
  73. package/lib/module/i18n/locales/en-US.json +85 -12
  74. package/lib/module/i18n/locales/es-ES.json +58 -6
  75. package/lib/module/i18n/locales/fr-FR.json +128 -0
  76. package/lib/module/i18n/locales/it-IT.json +128 -0
  77. package/lib/module/i18n/locales/ja-JP.json +127 -0
  78. package/lib/module/i18n/locales/ko-KR.json +128 -0
  79. package/lib/module/i18n/locales/pt-PT.json +128 -0
  80. package/lib/module/i18n/locales/zh-CN.json +128 -0
  81. package/lib/module/ui/components/FontLoader.js +23 -43
  82. package/lib/module/ui/components/FontLoader.js.map +1 -1
  83. package/lib/module/ui/components/OxyProvider.js +6 -8
  84. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  85. package/lib/module/ui/components/StepBasedScreen.js +65 -45
  86. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  87. package/lib/module/ui/components/internal/GroupedPillButtons.js +14 -35
  88. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  89. package/lib/module/ui/components/internal/PinInput.js +2 -2
  90. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  91. package/lib/module/ui/context/OxyContext.js +434 -321
  92. package/lib/module/ui/context/OxyContext.js.map +1 -1
  93. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  94. package/lib/module/ui/screens/SignInScreen.js +44 -40
  95. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  96. package/lib/module/ui/screens/WelcomeNewUserScreen.js +138 -126
  97. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  98. package/lib/module/ui/screens/internal/SignInUsernameStep.js +2 -4
  99. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  100. package/lib/module/ui/screens/steps/RecoverRequestStep.js +45 -25
  101. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  102. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +89 -54
  103. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -1
  104. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +80 -59
  105. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  106. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +62 -53
  107. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  108. package/lib/module/ui/screens/steps/SignInPasswordStep.js +221 -32
  109. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  110. package/lib/module/ui/screens/steps/SignInTotpStep.js +78 -51
  111. package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -1
  112. package/lib/module/ui/screens/steps/SignInUsernameStep.js +530 -68
  113. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  114. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +55 -30
  115. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  116. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +65 -47
  117. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  118. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +84 -146
  119. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  120. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +114 -35
  121. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  122. package/lib/module/ui/stores/authStore.js +16 -20
  123. package/lib/module/ui/stores/authStore.js.map +1 -1
  124. package/lib/module/ui/styles/authStyles.js +2 -1
  125. package/lib/module/ui/styles/authStyles.js.map +1 -1
  126. package/lib/module/ui/styles/index.js +1 -0
  127. package/lib/module/ui/styles/index.js.map +1 -1
  128. package/lib/module/ui/styles/spacing.js +48 -0
  129. package/lib/module/ui/styles/spacing.js.map +1 -0
  130. package/lib/module/utils/validationUtils.js +1 -1
  131. package/lib/typescript/core/OxyServices.d.ts +4 -2
  132. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  133. package/lib/typescript/i18n/index.d.ts.map +1 -1
  134. package/lib/typescript/ui/components/FontLoader.d.ts +3 -3
  135. package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -1
  136. package/lib/typescript/ui/components/OxyProvider.d.ts +2 -2
  137. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  138. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
  139. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  140. package/lib/typescript/ui/context/OxyContext.d.ts +1 -0
  141. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  142. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  143. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  144. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
  145. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -1
  146. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
  147. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
  148. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +2 -0
  149. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
  150. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -1
  151. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
  152. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
  153. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
  154. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
  155. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
  156. package/lib/typescript/ui/stores/authStore.d.ts +7 -3
  157. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  158. package/lib/typescript/ui/styles/authStyles.d.ts +1 -0
  159. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
  160. package/lib/typescript/ui/styles/index.d.ts +1 -0
  161. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  162. package/lib/typescript/ui/styles/spacing.d.ts +43 -0
  163. package/lib/typescript/ui/styles/spacing.d.ts.map +1 -0
  164. package/lib/typescript/utils/validationUtils.d.ts +1 -1
  165. package/package.json +1 -1
  166. package/src/core/OxyServices.ts +10 -8
  167. package/src/i18n/index.ts +36 -0
  168. package/src/i18n/locales/ar-SA.json +128 -0
  169. package/src/i18n/locales/ca-ES.json +128 -0
  170. package/src/i18n/locales/de-DE.json +128 -0
  171. package/src/i18n/locales/en-US.json +85 -12
  172. package/src/i18n/locales/es-ES.json +58 -6
  173. package/src/i18n/locales/fr-FR.json +128 -0
  174. package/src/i18n/locales/it-IT.json +128 -0
  175. package/src/i18n/locales/ja-JP.json +127 -0
  176. package/src/i18n/locales/ko-KR.json +128 -0
  177. package/src/i18n/locales/pt-PT.json +128 -0
  178. package/src/i18n/locales/zh-CN.json +128 -0
  179. package/src/ui/components/FontLoader.tsx +17 -37
  180. package/src/ui/components/OxyProvider.tsx +14 -13
  181. package/src/ui/components/StepBasedScreen.tsx +66 -43
  182. package/src/ui/components/internal/GroupedPillButtons.tsx +15 -31
  183. package/src/ui/components/internal/PinInput.tsx +2 -2
  184. package/src/ui/context/OxyContext.tsx +404 -285
  185. package/src/ui/screens/FileManagementScreen.tsx +15 -15
  186. package/src/ui/screens/SignInScreen.tsx +59 -36
  187. package/src/ui/screens/WelcomeNewUserScreen.tsx +102 -91
  188. package/src/ui/screens/internal/SignInUsernameStep.tsx +1 -1
  189. package/src/ui/screens/steps/RecoverRequestStep.tsx +34 -24
  190. package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +65 -36
  191. package/src/ui/screens/steps/RecoverSuccessStep.tsx +71 -47
  192. package/src/ui/screens/steps/RecoverVerifyStep.tsx +60 -50
  193. package/src/ui/screens/steps/SignInPasswordStep.tsx +191 -29
  194. package/src/ui/screens/steps/SignInTotpStep.tsx +68 -34
  195. package/src/ui/screens/steps/SignInUsernameStep.tsx +586 -57
  196. package/src/ui/screens/steps/SignUpIdentityStep.tsx +49 -35
  197. package/src/ui/screens/steps/SignUpSecurityStep.tsx +56 -39
  198. package/src/ui/screens/steps/SignUpSummaryStep.tsx +99 -89
  199. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +88 -20
  200. package/src/ui/stores/authStore.ts +15 -19
  201. package/src/ui/styles/authStyles.ts +2 -1
  202. package/src/ui/styles/index.ts +1 -0
  203. package/src/ui/styles/spacing.ts +46 -0
  204. package/src/utils/validationUtils.ts +1 -1
@@ -1,10 +1,11 @@
1
1
  import type React from 'react';
2
2
  import type { RouteName } from '../../navigation/routes';
3
- import { View, Text } from 'react-native';
3
+ import { View, Text, StyleSheet, Platform } from 'react-native';
4
4
  import { Ionicons } from '@expo/vector-icons';
5
5
  import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
6
6
  import TextField from '../../components/internal/TextField';
7
7
  import { useI18n } from '../../hooks/useI18n';
8
+ import { STEP_INNER_GAP, stepStyles } from '../../styles/spacing';
8
9
 
9
10
  interface RecoverResetPasswordStepProps {
10
11
  // Common props
@@ -53,6 +54,8 @@ const RecoverResetPasswordStep: React.FC<RecoverResetPasswordStepProps> = ({
53
54
  oxyServices,
54
55
  }) => {
55
56
  const { t } = useI18n();
57
+ const baseStyles = stepStyles;
58
+ const webShadowReset = Platform.OS === 'web' ? ({ boxShadow: 'none' } as any) : null;
56
59
  const handleReset = async () => {
57
60
  if (!password || password.length < 8) {
58
61
  setErrorMessage(t('recover.password.minLength') || 'Password must be at least 8 characters long');
@@ -86,48 +89,74 @@ const RecoverResetPasswordStep: React.FC<RecoverResetPasswordStepProps> = ({
86
89
 
87
90
  return (
88
91
  <>
89
- <View style={styles.modernHeader}>
90
- <Text style={[styles.modernTitle, { color: colors.text }]}>{t('recover.newPassword')}</Text>
91
- <Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>{t('recover.title')} @{identifier}</Text>
92
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.header]}>
93
+ <Text style={[styles.modernTitle, baseStyles.title, { color: colors.text, marginBottom: 0, marginTop: 0 }]}>{t('recover.newPassword')}</Text>
94
+ <Text style={[styles.modernSubtitle, baseStyles.subtitle, { color: colors.secondaryText, marginBottom: 0, marginTop: 0 }]}>{t('recover.title')} @{identifier}</Text>
92
95
  </View>
93
96
 
94
- <View style={styles.modernInputContainer}>
95
- <TextField
96
- label={t('common.labels.password')}
97
- leading={<Ionicons name="lock-closed-outline" size={24} color={colors.secondaryText} />}
98
- value={password}
99
- onChangeText={setPassword}
100
- secureTextEntry
101
- autoCapitalize="none"
102
- autoCorrect={false}
103
- variant="filled"
104
- error={errorMessage || undefined}
105
- onSubmitEditing={handleReset}
106
- autoFocus
107
- />
97
+ <View style={[baseStyles.container, baseStyles.sectionSpacing]}>
98
+ <View style={[stylesheet.formCard, { backgroundColor: colors.inputBackground || colors.card || 'rgba(0,0,0,0.04)' }, webShadowReset]}>
99
+ <TextField
100
+ label={t('common.labels.password')}
101
+ leading={<Ionicons name="lock-closed-outline" size={24} color={colors.secondaryText} />}
102
+ value={password}
103
+ onChangeText={setPassword}
104
+ secureTextEntry
105
+ autoCapitalize="none"
106
+ autoCorrect={false}
107
+ variant="filled"
108
+ error={errorMessage || undefined}
109
+ onSubmitEditing={handleReset}
110
+ autoFocus
111
+ style={{ marginBottom: 0 }}
112
+ />
108
113
 
109
- <TextField
110
- label={t('common.labels.confirmPassword')}
111
- leading={<Ionicons name="lock-closed-outline" size={24} color={colors.secondaryText} />}
112
- value={confirmPassword}
113
- onChangeText={setConfirmPassword}
114
- secureTextEntry
115
- autoCapitalize="none"
116
- autoCorrect={false}
117
- variant="filled"
118
- onSubmitEditing={handleReset}
119
- />
114
+ <TextField
115
+ label={t('common.labels.confirmPassword')}
116
+ leading={<Ionicons name="lock-closed-outline" size={24} color={colors.secondaryText} />}
117
+ value={confirmPassword}
118
+ onChangeText={setConfirmPassword}
119
+ secureTextEntry
120
+ autoCapitalize="none"
121
+ autoCorrect={false}
122
+ variant="filled"
123
+ onSubmitEditing={handleReset}
124
+ style={{ marginBottom: 0 }}
125
+ />
126
+ </View>
120
127
  </View>
121
128
 
122
- <GroupedPillButtons
123
- buttons={[
124
- { text: t('common.actions.back'), onPress: prevStep, icon: 'arrow-back', variant: 'transparent' },
125
- { text: t('common.actions.resetPassword'), onPress: handleReset, icon: 'key-outline', variant: 'primary', loading: isLoading, disabled: isLoading },
126
- ]}
127
- colors={colors}
128
- />
129
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.buttonContainer]}>
130
+ <GroupedPillButtons
131
+ buttons={[
132
+ { text: t('common.actions.back'), onPress: prevStep, icon: 'arrow-back', variant: 'transparent' },
133
+ {
134
+ text: t('common.actions.resetPassword'),
135
+ onPress: handleReset,
136
+ icon: 'key-outline',
137
+ variant: 'primary',
138
+ loading: isLoading,
139
+ disabled: isLoading || !password || password.length < 8 || password !== confirmPassword
140
+ },
141
+ ]}
142
+ colors={colors}
143
+ />
144
+ </View>
129
145
  </>
130
146
  );
131
147
  };
132
148
 
133
149
  export default RecoverResetPasswordStep;
150
+
151
+ const stylesheet = StyleSheet.create({
152
+ formCard: {
153
+ width: '100%',
154
+ maxWidth: 420,
155
+ borderRadius: 28,
156
+ paddingHorizontal: 20,
157
+ paddingVertical: 18,
158
+ gap: STEP_INNER_GAP,
159
+ alignItems: 'stretch',
160
+ shadowColor: 'transparent',
161
+ },
162
+ });
@@ -1,9 +1,10 @@
1
1
  import type React from 'react';
2
2
  import type { RouteName } from '../../navigation/routes';
3
- import { View, Text } from 'react-native';
3
+ import { View, Text, StyleSheet } from 'react-native';
4
4
  import { Ionicons } from '@expo/vector-icons';
5
5
  import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
6
6
  import { useI18n } from '../../hooks/useI18n';
7
+ import { STEP_INNER_GAP, stepStyles } from '../../styles/spacing';
7
8
 
8
9
  interface RecoverSuccessStepProps {
9
10
  // Common props from StepBasedScreen
@@ -35,6 +36,7 @@ const RecoverSuccessStep: React.FC<RecoverSuccessStepProps> = ({
35
36
  successMessage,
36
37
  }) => {
37
38
  const { t } = useI18n();
39
+ const baseStyles = stepStyles;
38
40
  // Extract identifier from previous steps
39
41
  const requestData = allStepData[0] || {};
40
42
  const { identifier } = requestData;
@@ -50,75 +52,97 @@ const RecoverSuccessStep: React.FC<RecoverSuccessStepProps> = ({
50
52
 
51
53
  return (
52
54
  <>
53
- <View style={{
54
- alignItems: 'center',
55
- justifyContent: 'center',
56
- marginBottom: 32,
57
- }}>
58
- <View style={{
59
- width: 80,
60
- height: 80,
61
- borderRadius: 40,
62
- backgroundColor: colors.success + '20',
63
- alignItems: 'center',
64
- justifyContent: 'center',
65
- marginBottom: 24,
66
- }}>
55
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, stylesheet.iconContainer]}>
56
+ <View style={[stylesheet.successIcon, { backgroundColor: colors.success + '20' }]}>
67
57
  <Ionicons name="checkmark-circle" size={40} color={colors.success} />
68
58
  </View>
69
59
  </View>
70
60
 
71
- <View style={styles.modernHeader}>
72
- <Text style={[styles.modernTitle, { color: colors.text }]}>{t('recover.title')}</Text>
73
- <Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>{successMessage || t('recover.resetSuccess')}</Text>
61
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.header]}>
62
+ <Text style={[styles.modernTitle, baseStyles.title, { color: colors.text, marginBottom: 0, marginTop: 0 }]}>{t('recover.title')}</Text>
63
+ <Text style={[styles.modernSubtitle, baseStyles.subtitle, { color: colors.secondaryText, marginBottom: 0, marginTop: 0 }]}>{successMessage || t('recover.resetSuccess')}</Text>
74
64
  </View>
75
65
 
76
- <View style={styles.modernInputContainer}>
77
- <View style={{
78
- padding: 20,
66
+ <View style={[baseStyles.container, baseStyles.sectionSpacing]}>
67
+ <View style={[stylesheet.infoCard, {
79
68
  backgroundColor: colors.inputBackground,
80
- borderRadius: 16,
81
- borderWidth: 1,
82
69
  borderColor: colors.border,
83
- marginBottom: 24,
84
- }}>
85
- <Text style={[styles.footerText, { color: colors.text, fontSize: 16, marginBottom: 8 }]}>
70
+ }]}>
71
+ <Text style={[styles.footerText, stylesheet.infoTitle, { color: colors.text }]}>
86
72
  {t('recover.whatsNextTitle') || "What's next?"}
87
73
  </Text>
88
- <Text style={[styles.footerText, { color: colors.secondaryText, fontSize: 14, lineHeight: 20 }]}>
74
+ <Text style={[styles.footerText, stylesheet.infoBody, { color: colors.secondaryText }]}>
89
75
  {t('recover.whatsNextBody') || 'You can now reset your password or return to sign in with your existing credentials.'}
90
76
  </Text>
91
77
  </View>
92
78
 
93
- <View style={{
94
- flexDirection: 'row',
95
- alignItems: 'center',
96
- padding: 12,
79
+ <View style={[stylesheet.successBanner, {
97
80
  backgroundColor: colors.success + '10',
98
- borderRadius: 8,
99
- borderWidth: 1,
100
81
  borderColor: colors.success + '30',
101
- }}>
102
- <Ionicons name="shield-checkmark" size={20} color={colors.success} style={{ marginRight: 8 }} />
103
- <Text style={[styles.footerText, { color: colors.success, fontSize: 14, flex: 1 }]}>
82
+ }]}>
83
+ <Ionicons name="shield-checkmark" size={20} color={colors.success} />
84
+ <Text style={[styles.footerText, stylesheet.bannerText, { color: colors.success }]}>
104
85
  {successMessage || t('recover.completeSecure') || 'Your account recovery is complete and secure.'}
105
86
  </Text>
106
87
  </View>
107
88
  </View>
108
89
 
109
- <GroupedPillButtons
110
- buttons={[
111
- {
112
- text: t('common.actions.signIn'),
113
- onPress: handleBackToSignIn,
114
- icon: 'arrow-back',
115
- variant: 'transparent',
116
- },
117
- ]}
118
- colors={colors}
119
- />
90
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.buttonContainer]}>
91
+ <GroupedPillButtons
92
+ buttons={[
93
+ {
94
+ text: t('common.actions.signIn'),
95
+ onPress: handleBackToSignIn,
96
+ icon: 'arrow-back',
97
+ variant: 'transparent',
98
+ },
99
+ ]}
100
+ colors={colors}
101
+ />
102
+ </View>
120
103
  </>
121
104
  );
122
105
  };
123
106
 
124
107
  export default RecoverSuccessStep;
108
+
109
+ const stylesheet = StyleSheet.create({
110
+ iconContainer: {
111
+ alignItems: 'center',
112
+ justifyContent: 'center',
113
+ },
114
+ successIcon: {
115
+ width: 80,
116
+ height: 80,
117
+ borderRadius: 40,
118
+ alignItems: 'center',
119
+ justifyContent: 'center',
120
+ },
121
+ infoCard: {
122
+ padding: STEP_INNER_GAP * 2,
123
+ borderRadius: 16,
124
+ borderWidth: 1,
125
+ marginBottom: STEP_INNER_GAP,
126
+ gap: STEP_INNER_GAP,
127
+ },
128
+ infoTitle: {
129
+ fontSize: 16,
130
+ marginBottom: 0,
131
+ },
132
+ infoBody: {
133
+ fontSize: 14,
134
+ lineHeight: 20,
135
+ },
136
+ successBanner: {
137
+ flexDirection: 'row',
138
+ alignItems: 'center',
139
+ padding: STEP_INNER_GAP,
140
+ borderRadius: 8,
141
+ borderWidth: 1,
142
+ gap: STEP_INNER_GAP,
143
+ },
144
+ bannerText: {
145
+ flex: 1,
146
+ fontSize: 14,
147
+ },
148
+ });
@@ -1,11 +1,12 @@
1
1
  import type React from 'react';
2
2
  import type { RouteName } from '../../navigation/routes';
3
- import { View, Text } from 'react-native';
3
+ import { View, Text, StyleSheet } from 'react-native';
4
4
  import { Ionicons } from '@expo/vector-icons';
5
5
  import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
6
6
  import PinInput from '../../components/internal/PinInput';
7
7
  import { toast } from '../../../lib/sonner';
8
8
  import { useI18n } from '../../hooks/useI18n';
9
+ import { STEP_INNER_GAP, stepStyles } from '../../styles/spacing';
9
10
 
10
11
  interface RecoverVerifyStepProps {
11
12
  // Common props from StepBasedScreen
@@ -52,6 +53,7 @@ const RecoverVerifyStep: React.FC<RecoverVerifyStepProps> = ({
52
53
  identifier,
53
54
  }) => {
54
55
  const { t } = useI18n();
56
+ const baseStyles = stepStyles;
55
57
  const handleVerifyCode = async () => {
56
58
  setErrorMessage('');
57
59
  setSuccessMessage('');
@@ -66,33 +68,29 @@ const RecoverVerifyStep: React.FC<RecoverVerifyStepProps> = ({
66
68
 
67
69
  return (
68
70
  <>
69
- <View style={styles.modernHeader}>
70
- <Text style={[styles.modernTitle, { color: colors.text }]}>{t('recover.verify.title')}</Text>
71
- <Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>{t('recover.enterCode')}</Text>
71
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.header]}>
72
+ <Text style={[styles.modernTitle, baseStyles.title, { color: colors.text, marginBottom: 0, marginTop: 0 }]}>{t('recover.verify.title')}</Text>
73
+ <Text style={[styles.modernSubtitle, baseStyles.subtitle, { color: colors.secondaryText, marginBottom: 0, marginTop: 0 }]}>{t('recover.enterCode')}</Text>
72
74
  </View>
73
75
 
74
- <View style={styles.modernInputContainer}>
75
- <PinInput
76
- value={verificationCode}
77
- onChange={setVerificationCode}
78
- length={6}
79
- disabled={isLoading}
80
- autoFocus
81
- colors={colors}
82
- />
76
+ <View style={[baseStyles.container, baseStyles.sectionSpacing]}>
77
+ <View style={stylesheet.pinInputWrapper}>
78
+ <PinInput
79
+ value={verificationCode}
80
+ onChange={setVerificationCode}
81
+ length={6}
82
+ disabled={isLoading}
83
+ autoFocus
84
+ colors={colors}
85
+ />
86
+ </View>
83
87
 
84
88
  {successMessage && (
85
- <View style={{
86
- flexDirection: 'row',
87
- alignItems: 'center',
88
- marginTop: 16,
89
- padding: 12,
89
+ <View style={[stylesheet.messageContainer, {
90
90
  backgroundColor: colors.success + '10',
91
- borderRadius: 8,
92
- borderWidth: 1,
93
91
  borderColor: colors.success + '30',
94
- }}>
95
- <Ionicons name="checkmark-circle" size={20} color={colors.success} style={{ marginRight: 8 }} />
92
+ }]}>
93
+ <Ionicons name="checkmark-circle" size={20} color={colors.success} />
96
94
  <Text style={[styles.footerText, { color: colors.success, fontSize: 14 }]}>
97
95
  {successMessage}
98
96
  </Text>
@@ -100,17 +98,11 @@ const RecoverVerifyStep: React.FC<RecoverVerifyStepProps> = ({
100
98
  )}
101
99
 
102
100
  {errorMessage && (
103
- <View style={{
104
- flexDirection: 'row',
105
- alignItems: 'center',
106
- marginTop: 16,
107
- padding: 12,
101
+ <View style={[stylesheet.messageContainer, {
108
102
  backgroundColor: colors.error + '10',
109
- borderRadius: 8,
110
- borderWidth: 1,
111
103
  borderColor: colors.error + '30',
112
- }}>
113
- <Ionicons name="alert-circle" size={20} color={colors.error} style={{ marginRight: 8 }} />
104
+ }]}>
105
+ <Ionicons name="alert-circle" size={20} color={colors.error} />
114
106
  <Text style={[styles.footerText, { color: colors.error, fontSize: 14 }]}>
115
107
  {errorMessage}
116
108
  </Text>
@@ -118,27 +110,45 @@ const RecoverVerifyStep: React.FC<RecoverVerifyStepProps> = ({
118
110
  )}
119
111
  </View>
120
112
 
121
- <GroupedPillButtons
122
- buttons={[
123
- {
124
- text: t('common.actions.back'),
125
- onPress: prevStep,
126
- icon: 'arrow-back',
127
- variant: 'transparent',
128
- },
129
- {
130
- text: t('recover.verify.action'),
131
- onPress: handleVerifyCode,
132
- icon: 'checkmark-circle-outline',
133
- variant: 'primary',
134
- loading: isLoading,
135
- disabled: isLoading || verificationCode.length !== 6,
136
- },
137
- ]}
138
- colors={colors}
139
- />
113
+ <View style={[baseStyles.container, baseStyles.sectionSpacing, baseStyles.buttonContainer]}>
114
+ <GroupedPillButtons
115
+ buttons={[
116
+ {
117
+ text: t('common.actions.back'),
118
+ onPress: prevStep,
119
+ icon: 'arrow-back',
120
+ variant: 'transparent',
121
+ },
122
+ {
123
+ text: t('recover.verify.action'),
124
+ onPress: handleVerifyCode,
125
+ icon: 'checkmark-circle-outline',
126
+ variant: 'primary',
127
+ loading: isLoading,
128
+ disabled: isLoading || verificationCode.length !== 6,
129
+ },
130
+ ]}
131
+ colors={colors}
132
+ />
133
+ </View>
140
134
  </>
141
135
  );
142
136
  };
143
137
 
144
138
  export default RecoverVerifyStep;
139
+
140
+ const stylesheet = StyleSheet.create({
141
+ pinInputWrapper: {
142
+ marginBottom: 0,
143
+ marginTop: 0,
144
+ },
145
+ messageContainer: {
146
+ flexDirection: 'row',
147
+ alignItems: 'center',
148
+ marginTop: STEP_INNER_GAP,
149
+ padding: STEP_INNER_GAP,
150
+ borderRadius: 8,
151
+ borderWidth: 1,
152
+ gap: STEP_INNER_GAP,
153
+ },
154
+ });