@oxyhq/services 5.11.9 → 5.11.11

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 (305) hide show
  1. package/lib/commonjs/ui/components/AnimationExample.js +213 -0
  2. package/lib/commonjs/ui/components/AnimationExample.js.map +1 -0
  3. package/lib/commonjs/ui/components/FollowButton.js +58 -47
  4. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  5. package/lib/commonjs/ui/components/GroupedItem.js +2 -1
  6. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedSection.js +3 -0
  8. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  9. package/lib/commonjs/ui/components/Header.js +26 -12
  10. package/lib/commonjs/ui/components/Header.js.map +1 -1
  11. package/lib/commonjs/ui/components/OxyProvider.js +69 -33
  12. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  13. package/lib/commonjs/ui/components/ProfileCard.js +5 -1
  14. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  15. package/lib/commonjs/ui/components/StepBasedScreen.README.md +337 -0
  16. package/lib/commonjs/ui/components/StepBasedScreen.js +361 -0
  17. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -0
  18. package/lib/commonjs/ui/components/icon/OxyIcon.js +3 -3
  19. package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +0 -7
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/PinInput.js +1 -1
  23. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.js +8 -4
  25. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  26. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +161 -0
  27. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  28. package/lib/commonjs/ui/context/OxyContext.js +103 -44
  29. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  30. package/lib/commonjs/ui/hooks/useFollow.types.js +2 -0
  31. package/lib/commonjs/ui/hooks/useFollow.types.js.map +1 -0
  32. package/lib/commonjs/ui/navigation/OxyRouter.js +10 -0
  33. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js +26 -14
  35. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  36. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +3 -3
  37. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  38. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +64 -15
  39. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +4 -4
  41. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/FeedbackScreen.js +72 -75
  43. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/FileManagementScreen.js +286 -126
  45. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +322 -0
  47. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -0
  48. package/lib/commonjs/ui/screens/ProfileScreen.js +56 -56
  49. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +87 -219
  51. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/SessionManagementScreen.js +176 -174
  53. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/SignInScreen.js +138 -244
  55. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  56. package/lib/commonjs/ui/screens/SignUpScreen.js +143 -744
  57. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +386 -0
  59. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  60. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +25 -15
  61. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  62. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +16 -9
  63. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  64. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
  65. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +110 -0
  67. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -0
  68. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +138 -0
  69. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
  70. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +141 -0
  71. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
  72. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +165 -0
  73. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -0
  74. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +150 -0
  75. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -0
  76. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +171 -0
  77. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
  78. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +163 -0
  79. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
  80. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +170 -0
  81. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
  82. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +72 -0
  83. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
  84. package/lib/commonjs/ui/styles/authStyles.js +1 -1
  85. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  86. package/lib/module/ui/components/AnimationExample.js +209 -0
  87. package/lib/module/ui/components/AnimationExample.js.map +1 -0
  88. package/lib/module/ui/components/FollowButton.js +58 -47
  89. package/lib/module/ui/components/FollowButton.js.map +1 -1
  90. package/lib/module/ui/components/GroupedItem.js +2 -1
  91. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  92. package/lib/module/ui/components/GroupedSection.js +3 -0
  93. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  94. package/lib/module/ui/components/Header.js +26 -12
  95. package/lib/module/ui/components/Header.js.map +1 -1
  96. package/lib/module/ui/components/OxyProvider.js +70 -34
  97. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  98. package/lib/module/ui/components/ProfileCard.js +5 -1
  99. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  100. package/lib/module/ui/components/Section.js.map +1 -1
  101. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  102. package/lib/module/ui/components/StepBasedScreen.README.md +337 -0
  103. package/lib/module/ui/components/StepBasedScreen.js +356 -0
  104. package/lib/module/ui/components/StepBasedScreen.js.map +1 -0
  105. package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -1
  106. package/lib/module/ui/components/icon/OxyIcon.js +3 -3
  107. package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
  108. package/lib/module/ui/components/index.js +0 -1
  109. package/lib/module/ui/components/index.js.map +1 -1
  110. package/lib/module/ui/components/internal/PinInput.js +1 -1
  111. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  112. package/lib/module/ui/components/internal/TextField.js +8 -4
  113. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  114. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +156 -0
  115. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
  116. package/lib/module/ui/context/OxyContext.js +103 -45
  117. package/lib/module/ui/context/OxyContext.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.types.js +2 -0
  119. package/lib/module/ui/hooks/useFollow.types.js.map +1 -0
  120. package/lib/module/ui/navigation/OxyRouter.js +10 -0
  121. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  122. package/lib/module/ui/screens/AccountCenterScreen.js +12 -1
  123. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  124. package/lib/module/ui/screens/AccountOverviewScreen.js +3 -3
  125. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  126. package/lib/module/ui/screens/AccountSettingsScreen.js +64 -15
  127. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountSwitcherScreen.js +4 -4
  129. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  130. package/lib/module/ui/screens/FeedbackScreen.js +72 -75
  131. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  132. package/lib/module/ui/screens/FileManagementScreen.js +285 -125
  133. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  134. package/lib/module/ui/screens/LanguageSelectorScreen.js +319 -0
  135. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -0
  136. package/lib/module/ui/screens/ProfileScreen.js +56 -56
  137. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  138. package/lib/module/ui/screens/RecoverAccountScreen.js +91 -222
  139. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  140. package/lib/module/ui/screens/SessionManagementScreen.js +177 -175
  141. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  142. package/lib/module/ui/screens/SignInScreen.js +140 -246
  143. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  144. package/lib/module/ui/screens/SignUpScreen.js +145 -745
  145. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  146. package/lib/module/ui/screens/WelcomeNewUserScreen.js +382 -0
  147. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -0
  148. package/lib/module/ui/screens/internal/SignInPasswordStep.js +23 -14
  149. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  150. package/lib/module/ui/screens/internal/SignInUsernameStep.js +15 -9
  151. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  152. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
  153. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  154. package/lib/module/ui/screens/steps/RecoverRequestStep.js +105 -0
  155. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -0
  156. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +133 -0
  157. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
  158. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +136 -0
  159. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
  160. package/lib/module/ui/screens/steps/SignInPasswordStep.js +160 -0
  161. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -0
  162. package/lib/module/ui/screens/steps/SignInUsernameStep.js +145 -0
  163. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -0
  164. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +166 -0
  165. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
  166. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +158 -0
  167. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
  168. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +165 -0
  169. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
  170. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +67 -0
  171. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
  172. package/lib/module/ui/styles/authStyles.js +1 -1
  173. package/lib/module/ui/styles/authStyles.js.map +1 -1
  174. package/lib/typescript/models/interfaces.d.ts +5 -8
  175. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  176. package/lib/typescript/models/session.d.ts +1 -4
  177. package/lib/typescript/models/session.d.ts.map +1 -1
  178. package/lib/typescript/ui/components/AnimationExample.d.ts +4 -0
  179. package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -0
  180. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  181. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  182. package/lib/typescript/ui/components/Header.d.ts +9 -0
  183. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/OxyPayButton.d.ts +2 -2
  185. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
  186. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/ProfileCard.d.ts +1 -3
  188. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  189. package/lib/typescript/ui/components/Section.d.ts +2 -1
  190. package/lib/typescript/ui/components/Section.d.ts.map +1 -1
  191. package/lib/typescript/ui/components/SectionTitle.d.ts +2 -1
  192. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
  193. package/lib/typescript/ui/components/StepBasedScreen.d.ts +24 -0
  194. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -0
  195. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +2 -1
  196. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -1
  197. package/lib/typescript/ui/components/icon/OxyIcon.d.ts +1 -1
  198. package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -1
  199. package/lib/typescript/ui/components/index.d.ts +0 -1
  200. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  201. package/lib/typescript/ui/components/internal/PinInput.d.ts +9 -1
  202. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
  203. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  204. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +27 -0
  205. package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -0
  206. package/lib/typescript/ui/context/OxyContext.d.ts +8 -3
  207. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  208. package/lib/typescript/ui/hooks/useFollow.types.d.ts +33 -0
  209. package/lib/typescript/ui/hooks/useFollow.types.d.ts.map +1 -0
  210. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  211. package/lib/typescript/ui/navigation/types.d.ts +5 -0
  212. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  215. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +18 -1
  217. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +7 -0
  219. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -0
  220. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +2 -2
  221. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  223. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +2 -9
  224. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/SignUpScreen.d.ts +1 -1
  228. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +13 -0
  230. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -0
  231. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +5 -5
  232. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  233. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +4 -4
  234. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  235. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +21 -0
  236. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -0
  237. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +18 -0
  238. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -0
  239. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +24 -0
  240. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -0
  241. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +27 -0
  242. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -0
  243. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +27 -0
  244. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -0
  245. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +25 -0
  246. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -0
  247. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +26 -0
  248. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -0
  249. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +16 -0
  250. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -0
  251. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +13 -0
  252. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -0
  253. package/lib/typescript/ui/styles/authStyles.d.ts +1 -1
  254. package/package.json +10 -3
  255. package/src/models/interfaces.ts +7 -8
  256. package/src/models/session.ts +1 -4
  257. package/src/ui/components/AnimationExample.tsx +195 -0
  258. package/src/ui/components/FollowButton.tsx +65 -45
  259. package/src/ui/components/GroupedItem.tsx +1 -0
  260. package/src/ui/components/GroupedSection.tsx +1 -1
  261. package/src/ui/components/Header.tsx +37 -13
  262. package/src/ui/components/OxyPayButton.tsx +2 -2
  263. package/src/ui/components/OxyProvider.tsx +67 -33
  264. package/src/ui/components/ProfileCard.tsx +6 -8
  265. package/src/ui/components/Section.tsx +7 -7
  266. package/src/ui/components/SectionTitle.tsx +2 -2
  267. package/src/ui/components/StepBasedScreen.README.md +337 -0
  268. package/src/ui/components/StepBasedScreen.tsx +417 -0
  269. package/src/ui/components/icon/FAIRWalletIcon.tsx +2 -2
  270. package/src/ui/components/icon/OxyIcon.tsx +10 -11
  271. package/src/ui/components/index.ts +0 -1
  272. package/src/ui/components/internal/PinInput.tsx +13 -4
  273. package/src/ui/components/internal/TextField.tsx +12 -6
  274. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -0
  275. package/src/ui/context/OxyContext.tsx +90 -59
  276. package/src/ui/hooks/useFollow.types.ts +33 -0
  277. package/src/ui/navigation/OxyRouter.tsx +10 -0
  278. package/src/ui/navigation/types.ts +6 -0
  279. package/src/ui/screens/AccountCenterScreen.tsx +13 -7
  280. package/src/ui/screens/AccountOverviewScreen.tsx +3 -3
  281. package/src/ui/screens/AccountSettingsScreen.tsx +65 -13
  282. package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
  283. package/src/ui/screens/FeedbackScreen.tsx +57 -80
  284. package/src/ui/screens/FileManagementScreen.tsx +278 -175
  285. package/src/ui/screens/LanguageSelectorScreen.tsx +322 -0
  286. package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
  287. package/src/ui/screens/ProfileScreen.tsx +60 -55
  288. package/src/ui/screens/RecoverAccountScreen.tsx +98 -211
  289. package/src/ui/screens/SessionManagementScreen.tsx +148 -151
  290. package/src/ui/screens/SignInScreen.tsx +148 -290
  291. package/src/ui/screens/SignUpScreen.tsx +147 -751
  292. package/src/ui/screens/WelcomeNewUserScreen.tsx +272 -0
  293. package/src/ui/screens/internal/SignInPasswordStep.tsx +28 -13
  294. package/src/ui/screens/internal/SignInUsernameStep.tsx +21 -11
  295. package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
  296. package/src/ui/screens/steps/RecoverRequestStep.tsx +130 -0
  297. package/src/ui/screens/steps/RecoverSuccessStep.tsx +131 -0
  298. package/src/ui/screens/steps/RecoverVerifyStep.tsx +153 -0
  299. package/src/ui/screens/steps/SignInPasswordStep.tsx +172 -0
  300. package/src/ui/screens/steps/SignInUsernameStep.tsx +176 -0
  301. package/src/ui/screens/steps/SignUpIdentityStep.tsx +204 -0
  302. package/src/ui/screens/steps/SignUpSecurityStep.tsx +191 -0
  303. package/src/ui/screens/steps/SignUpSummaryStep.tsx +130 -0
  304. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +65 -0
  305. package/src/ui/styles/authStyles.ts +1 -1
@@ -1,230 +1,117 @@
1
1
  import type React from 'react';
2
2
  import { useState, useRef, useCallback } from 'react';
3
- import { View, Text, Animated, KeyboardAvoidingView, Platform, ScrollView, StyleSheet, StatusBar, type TextInput } from 'react-native';
4
- import { Ionicons } from '@expo/vector-icons';
5
- import TextField from '../components/internal/TextField';
6
- import GroupedPillButtons from '../components/internal/GroupedPillButtons';
7
- import HighFive from '../../assets/illustrations/HighFive';
8
- import { useThemeColors, createAuthStyles } from '../styles';
9
- import PinInput from '../components/internal/PinInput';
10
-
11
- interface RecoverAccountScreenProps {
12
- navigate: (screen: string, props?: Record<string, any>) => void;
13
- goBack: () => void;
14
- theme: string;
15
- returnTo?: string;
16
- returnStep?: number;
17
- returnData?: Record<string, any>;
18
- }
3
+ import type { BaseScreenProps } from '../navigation/types';
4
+ import { useThemeColors } from '../styles';
5
+ import StepBasedScreen, { type StepConfig } from '../components/StepBasedScreen';
6
+ import RecoverRequestStep from './steps/RecoverRequestStep';
7
+ import RecoverVerifyStep from './steps/RecoverVerifyStep';
8
+ import RecoverSuccessStep from './steps/RecoverSuccessStep';
19
9
 
10
+ // Constants
20
11
  const PIN_LENGTH = 6;
21
12
 
22
- const RecoverAccountScreen: React.FC<RecoverAccountScreenProps> = ({ navigate, goBack, theme, returnTo, returnStep, returnData }) => {
13
+ // Main component
14
+ const RecoverAccountScreen: React.FC<BaseScreenProps> = ({
15
+ navigate,
16
+ goBack,
17
+ theme,
18
+ oxyServices,
19
+ }) => {
20
+ const colors = useThemeColors(theme);
21
+
22
+ // Form state
23
23
  const [identifier, setIdentifier] = useState('');
24
+ const [verificationCode, setVerificationCode] = useState('');
24
25
  const [isLoading, setIsLoading] = useState(false);
25
26
  const [errorMessage, setErrorMessage] = useState('');
26
27
  const [successMessage, setSuccessMessage] = useState('');
27
- const [step, setStep] = useState<'request' | 'code' | 'done'>('request');
28
- const [code, setCode] = useState('');
29
- const fadeAnim = useRef(new Animated.Value(1)).current;
30
- const slideAnim = useRef(new Animated.Value(0)).current;
31
- const colors = useThemeColors(theme as 'light' | 'dark');
32
- const styles = createAuthStyles(colors, theme);
33
- const identifierRef = useRef<TextInput>(null);
34
- const handleRequestWithFocus = () => {
35
- if (!identifier) {
36
- setTimeout(() => {
37
- identifierRef.current?.focus();
38
- }, 0);
39
- }
40
- handleRequest();
41
- };
42
28
 
43
- const handleRequest = async () => {
44
- setErrorMessage('');
45
- setSuccessMessage('');
46
- if (!identifier || identifier.length < 3) {
47
- setErrorMessage('Please enter your email or username.');
48
- return;
49
- }
50
- setIsLoading(true);
51
- setTimeout(() => {
52
- setIsLoading(false);
53
- setStep('code');
54
- setSuccessMessage('A 6-digit code has been sent to your email or phone.');
55
- }, 1200);
56
- };
29
+ // Handle back navigation
30
+ const handleBack = useCallback(() => {
31
+ navigate('SignIn');
32
+ }, [navigate]);
57
33
 
58
- const handleVerifyCode = async () => {
59
- setErrorMessage('');
60
- setSuccessMessage('');
61
- if (code.length !== PIN_LENGTH) {
62
- setErrorMessage('Please enter the 6-digit code.');
63
- return;
64
- }
65
- setIsLoading(true);
66
- setTimeout(() => {
67
- setIsLoading(false);
68
- if (code === '123456') { // Simulate correct code
69
- setStep('done');
34
+ // Step configurations
35
+ const steps: StepConfig[] = [
36
+ {
37
+ id: 'request',
38
+ component: RecoverRequestStep,
39
+ canProceed: () => identifier.trim().length >= 3,
40
+ onEnter: () => {
41
+ // Reset messages when entering request step
42
+ setErrorMessage('');
43
+ setSuccessMessage('');
44
+ },
45
+ },
46
+ {
47
+ id: 'verify',
48
+ component: RecoverVerifyStep,
49
+ canProceed: () => verificationCode.length === PIN_LENGTH,
50
+ onEnter: () => {
51
+ // Simulate sending verification code
52
+ setIsLoading(true);
53
+ setTimeout(() => {
54
+ setIsLoading(false);
55
+ setSuccessMessage('A 6-digit code has been sent to your email or phone.');
56
+ }, 1000);
57
+ },
58
+ },
59
+ {
60
+ id: 'success',
61
+ component: RecoverSuccessStep,
62
+ canProceed: () => true,
63
+ onEnter: () => {
70
64
  setSuccessMessage('Your account has been verified! You can now reset your password.');
71
- } else {
72
- setErrorMessage('Invalid code. Please try again.');
73
- }
74
- }, 1200);
75
- };
65
+ },
66
+ },
67
+ ];
76
68
 
77
- // Helper function to determine back action based on current step
78
- const handleBack = () => {
79
- console.log('RecoverAccount handleBack:', { step, returnTo, returnStep, returnData });
69
+ // Handle completion
70
+ const handleComplete = useCallback((stepData: any[]) => {
71
+ // Final step completed - could navigate to password reset
72
+ console.log('Account recovery completed');
73
+ }, []);
80
74
 
81
- if (step === 'code') {
82
- setStep('request');
83
- } else if (step === 'done') {
84
- // If we have return information, use it; otherwise go to SignIn
85
- if (returnTo && returnStep !== undefined) {
86
- console.log('Navigating back to', returnTo, 'with step', returnStep, 'and data', returnData);
87
- navigate(returnTo, {
88
- initialStep: returnStep,
89
- ...returnData
90
- });
91
- } else {
92
- navigate('SignIn');
93
- }
94
- } else {
95
- // For 'request' step, if we have return information, use it; otherwise go back
96
- if (returnTo && returnStep !== undefined) {
97
- console.log('Navigating back to', returnTo, 'with step', returnStep, 'and data', returnData);
98
- navigate(returnTo, {
99
- initialStep: returnStep,
100
- ...returnData
101
- });
102
- } else {
103
- goBack();
104
- }
105
- }
106
- };
75
+ // Step data for the reusable component
76
+ const stepData = [
77
+ // Request step
78
+ {
79
+ identifier,
80
+ setIdentifier,
81
+ errorMessage,
82
+ setErrorMessage,
83
+ isLoading,
84
+ setIsLoading,
85
+ },
86
+ // Verify step
87
+ {
88
+ verificationCode,
89
+ setVerificationCode,
90
+ errorMessage,
91
+ setErrorMessage,
92
+ successMessage,
93
+ setSuccessMessage,
94
+ isLoading,
95
+ setIsLoading,
96
+ },
97
+ // Success step
98
+ {
99
+ successMessage,
100
+ },
101
+ ];
107
102
 
108
103
  return (
109
- <KeyboardAvoidingView
110
- style={[styles.container, { backgroundColor: colors.background }]}
111
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
112
- >
113
- <StatusBar
114
- barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
115
- backgroundColor={colors.background}
116
- />
117
- <ScrollView
118
- contentContainerStyle={styles.scrollContent}
119
- showsVerticalScrollIndicator={false}
120
- keyboardShouldPersistTaps="handled"
121
- >
122
- <Animated.View style={[
123
- styles.stepContainer,
124
- { opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
125
- ]}>
126
- <HighFive width={100} height={100} />
127
- <View style={styles.modernHeader}>
128
- <Text style={[styles.modernTitle, { color: colors.text }]}>Recover Account</Text>
129
- <Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>Enter your email or username to receive a 6-digit code.</Text>
130
- </View>
131
- {step === 'request' && (
132
- <>
133
- <TextField
134
- ref={identifierRef}
135
- label="Email or Username"
136
- leading={<Ionicons name="mail-outline" size={24} color={colors.secondaryText} />}
137
- value={identifier}
138
- onChangeText={setIdentifier}
139
- autoCapitalize="none"
140
- autoCorrect={false}
141
- variant="filled"
142
- error={errorMessage || undefined}
143
- editable={!isLoading}
144
- autoFocus
145
- testID="recover-identifier-input"
146
- onSubmitEditing={handleRequestWithFocus}
147
- />
148
- <GroupedPillButtons
149
- buttons={[
150
- {
151
- text: 'Back',
152
- onPress: handleBack,
153
- icon: 'arrow-back',
154
- variant: 'transparent',
155
- },
156
- {
157
- text: 'Send Code',
158
- onPress: handleRequest,
159
- icon: 'mail-open-outline',
160
- variant: 'primary',
161
- loading: isLoading,
162
- disabled: isLoading,
163
- },
164
- ]}
165
- colors={colors}
166
- />
167
- </>
168
- )}
169
- {step === 'code' && (
170
- <>
171
- <PinInput
172
- value={code}
173
- onChange={setCode}
174
- length={PIN_LENGTH}
175
- disabled={isLoading}
176
- autoFocus
177
- colors={colors}
178
- />
179
- {successMessage && (
180
- <View style={styles.belowInputMessage}>
181
- <Ionicons name="checkmark-circle" size={16} color={colors.success} />
182
- <Text style={[styles.belowInputText, { color: colors.success }]}>{successMessage}</Text>
183
- </View>
184
- )}
185
- {errorMessage ? (
186
- <Text style={[styles.successText, { color: colors.error, marginBottom: 12 }]}>{errorMessage}</Text>
187
- ) : null}
188
- <GroupedPillButtons
189
- buttons={[
190
- {
191
- text: 'Back',
192
- onPress: handleBack,
193
- icon: 'arrow-back',
194
- variant: 'transparent',
195
- },
196
- {
197
- text: 'Verify Code',
198
- onPress: handleVerifyCode,
199
- icon: 'checkmark-circle-outline',
200
- variant: 'primary',
201
- loading: isLoading,
202
- disabled: isLoading,
203
- },
204
- ]}
205
- colors={colors}
206
- />
207
- </>
208
- )}
209
- {step === 'done' && (
210
- <>
211
- <Text style={[styles.successText, { color: colors.success, marginBottom: 24 }]}>{successMessage}</Text>
212
- <GroupedPillButtons
213
- buttons={[
214
- {
215
- text: 'Back',
216
- onPress: handleBack,
217
- icon: 'arrow-back',
218
- variant: 'primary',
219
- },
220
- ]}
221
- colors={colors}
222
- />
223
- </>
224
- )}
225
- </Animated.View>
226
- </ScrollView>
227
- </KeyboardAvoidingView>
104
+ <StepBasedScreen
105
+ steps={steps}
106
+ stepData={stepData}
107
+ onComplete={handleComplete}
108
+ navigate={navigate}
109
+ goBack={handleBack}
110
+ theme={theme}
111
+ oxyServices={oxyServices}
112
+ showProgressIndicator={true}
113
+ enableAnimations={true}
114
+ />
228
115
  );
229
116
  };
230
117