@zezosoft/zezo-ott-react-native-ui-kit 1.0.3 → 1.0.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.
Files changed (265) hide show
  1. package/README.md +1 -1
  2. package/lib/module/assets/animations/Failed.json +2103 -0
  3. package/lib/module/assets/animations/Pending.json +522 -0
  4. package/lib/module/assets/animations/Successful.json +2289 -0
  5. package/lib/module/assets/animations/heart.json +788 -0
  6. package/lib/module/components/Alert/AlertDialog.js +208 -0
  7. package/lib/module/components/Alert/AlertDialog.js.map +1 -0
  8. package/lib/module/components/Alert/index.js +1 -0
  9. package/lib/module/components/Alert/index.js.map +1 -1
  10. package/lib/module/components/Auth/AuthProvider/AuthProvider.js +270 -0
  11. package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -0
  12. package/lib/module/components/Auth/QrLogin/QrLogin.js +267 -0
  13. package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -0
  14. package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +178 -0
  15. package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -0
  16. package/lib/module/components/Auth/SplashScreen/SplashScreen.js +63 -65
  17. package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
  18. package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +82 -41
  19. package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
  20. package/lib/module/components/Auth/index.js +5 -1
  21. package/lib/module/components/Auth/index.js.map +1 -1
  22. package/lib/module/components/BackgroundLayout/BackgroundLayout.js +3 -3
  23. package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
  24. package/lib/module/components/Button/SecondaryBtn.js +91 -0
  25. package/lib/module/components/Button/SecondaryBtn.js.map +1 -0
  26. package/lib/module/components/Button/index.js +2 -0
  27. package/lib/module/components/Button/index.js.map +1 -1
  28. package/lib/module/components/Content/Card/NowWatching/NowWatching.js +6 -3
  29. package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
  30. package/lib/module/components/Content/Card/Sliders/Styles/One.js +4 -1
  31. package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
  32. package/lib/module/components/Content/Card/Sliders/Styles/Two.js +4 -1
  33. package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
  34. package/lib/module/components/Content/Card/Styles/Five.js +1 -0
  35. package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
  36. package/lib/module/components/Content/Card/Styles/Four.js +1 -0
  37. package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
  38. package/lib/module/components/Content/Card/Styles/One.js +7 -3
  39. package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
  40. package/lib/module/components/Content/Card/Styles/RotateInOut.js +1 -0
  41. package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
  42. package/lib/module/components/Content/Card/Styles/Six.js +4 -1
  43. package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
  44. package/lib/module/components/Content/Card/Styles/Three.js +1 -0
  45. package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
  46. package/lib/module/components/Content/Card/Styles/TopTen.js +1 -0
  47. package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
  48. package/lib/module/components/Content/Card/Styles/Two.js +1 -0
  49. package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
  50. package/lib/module/components/Content/Card/components/CardPoster.js +12 -28
  51. package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
  52. package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +116 -0
  53. package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -0
  54. package/lib/module/components/Content/Card/components/ThumbnailCard.js +1 -2
  55. package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
  56. package/lib/module/components/ContentView/ContentView.js +1 -0
  57. package/lib/module/components/ContentView/ContentView.js.map +1 -1
  58. package/lib/module/components/ContentView/MoreContentList.js +1 -0
  59. package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
  60. package/lib/module/components/ContentView/components/EpisodeCard.js +6 -10
  61. package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
  62. package/lib/module/components/ContentView/components/HeroBanner.js +17 -5
  63. package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
  64. package/lib/module/components/Headers/AppHeader.js +1 -1
  65. package/lib/module/components/Headers/AppHeader.js.map +1 -1
  66. package/lib/module/components/Headers/One.js +1 -1
  67. package/lib/module/components/Headers/One.js.map +1 -1
  68. package/lib/module/components/Headers/Two.js +1 -1
  69. package/lib/module/components/Headers/Two.js.map +1 -1
  70. package/lib/module/components/Logo/Logo.js +5 -5
  71. package/lib/module/components/Logo/Logo.js.map +1 -1
  72. package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js +110 -0
  73. package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js.map +1 -0
  74. package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +212 -0
  75. package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +1 -0
  76. package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js +182 -0
  77. package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js.map +1 -0
  78. package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js +203 -0
  79. package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js.map +1 -0
  80. package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +121 -0
  81. package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -0
  82. package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +290 -0
  83. package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -0
  84. package/lib/module/components/Reels/ReelsSeries/types.js +2 -0
  85. package/lib/module/components/Reels/ReelsSeries/types.js.map +1 -0
  86. package/lib/module/components/Reels/index.js +11 -0
  87. package/lib/module/components/Reels/index.js.map +1 -0
  88. package/lib/module/components/Subscription/SubOne.js +2 -2
  89. package/lib/module/components/Subscription/SubOne.js.map +1 -1
  90. package/lib/module/components/User/DeviceSessions/DeviceSessions.js +8 -0
  91. package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
  92. package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +255 -0
  93. package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -0
  94. package/lib/module/components/User/WatchHistory/WatchHistory.js +1 -0
  95. package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
  96. package/lib/module/components/User/WatchLater/WatchLater.js +1 -0
  97. package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
  98. package/lib/module/components/User/components/UserAvatar.js +35 -8
  99. package/lib/module/components/User/components/UserAvatar.js.map +1 -1
  100. package/lib/module/components/User/components/UserSection.js +8 -13
  101. package/lib/module/components/User/components/UserSection.js.map +1 -1
  102. package/lib/module/components/User/index.js +2 -1
  103. package/lib/module/components/User/index.js.map +1 -1
  104. package/lib/module/components/index.js +1 -0
  105. package/lib/module/components/index.js.map +1 -1
  106. package/lib/module/hooks/useSplashCache.js +117 -0
  107. package/lib/module/hooks/useSplashCache.js.map +1 -0
  108. package/lib/module/store/RecentSearchesStore.js +0 -1
  109. package/lib/module/store/RecentSearchesStore.js.map +1 -1
  110. package/lib/module/theme/ThemeProvider.js +13 -10
  111. package/lib/module/theme/ThemeProvider.js.map +1 -1
  112. package/lib/module/theme/themes.js +2 -0
  113. package/lib/module/theme/themes.js.map +1 -1
  114. package/lib/module/utils/Formater.js +17 -0
  115. package/lib/module/utils/Formater.js.map +1 -0
  116. package/lib/typescript/src/components/Alert/AlertDialog.d.ts +18 -0
  117. package/lib/typescript/src/components/Alert/AlertDialog.d.ts.map +1 -0
  118. package/lib/typescript/src/components/Alert/index.d.ts +1 -0
  119. package/lib/typescript/src/components/Alert/index.d.ts.map +1 -1
  120. package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +35 -0
  121. package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -0
  122. package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +32 -0
  123. package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -0
  124. package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +15 -0
  125. package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -0
  126. package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +4 -3
  127. package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
  128. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts +1 -1
  129. package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
  130. package/lib/typescript/src/components/Auth/index.d.ts +3 -0
  131. package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
  132. package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
  133. package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +21 -0
  134. package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -0
  135. package/lib/typescript/src/components/Button/index.d.ts +11 -0
  136. package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
  137. package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
  138. package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
  139. package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
  140. package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
  141. package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
  142. package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
  143. package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
  144. package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
  145. package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
  146. package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
  147. package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
  148. package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -2
  149. package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
  150. package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +14 -0
  151. package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -0
  152. package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
  153. package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
  154. package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
  155. package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +1 -1
  156. package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
  157. package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
  158. package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts +12 -0
  159. package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts.map +1 -0
  160. package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts +9 -0
  161. package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +1 -0
  162. package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts +13 -0
  163. package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts.map +1 -0
  164. package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts +18 -0
  165. package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts.map +1 -0
  166. package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +15 -0
  167. package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -0
  168. package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +18 -0
  169. package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -0
  170. package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +24 -0
  171. package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -0
  172. package/lib/typescript/src/components/Reels/index.d.ts +8 -0
  173. package/lib/typescript/src/components/Reels/index.d.ts.map +1 -0
  174. package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
  175. package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -0
  176. package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
  177. package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +27 -0
  178. package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -0
  179. package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
  180. package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
  181. package/lib/typescript/src/components/User/components/UserAvatar.d.ts +4 -0
  182. package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
  183. package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
  184. package/lib/typescript/src/components/User/index.d.ts +2 -1
  185. package/lib/typescript/src/components/User/index.d.ts.map +1 -1
  186. package/lib/typescript/src/components/index.d.ts +1 -0
  187. package/lib/typescript/src/components/index.d.ts.map +1 -1
  188. package/lib/typescript/src/hooks/useSplashCache.d.ts +22 -0
  189. package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -0
  190. package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -1
  191. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
  192. package/lib/typescript/src/theme/themes.d.ts +1 -0
  193. package/lib/typescript/src/theme/themes.d.ts.map +1 -1
  194. package/lib/typescript/src/types/content/content-view.types.d.ts +1 -0
  195. package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
  196. package/lib/typescript/src/utils/Formater.d.ts +2 -0
  197. package/lib/typescript/src/utils/Formater.d.ts.map +1 -0
  198. package/package.json +13 -5
  199. package/src/assets/animations/Failed.json +2103 -0
  200. package/src/assets/animations/Pending.json +522 -0
  201. package/src/assets/animations/Successful.json +2289 -0
  202. package/src/assets/animations/heart.json +788 -0
  203. package/src/components/Alert/AlertDialog.tsx +247 -0
  204. package/src/components/Alert/index.ts +1 -0
  205. package/src/components/Auth/AuthProvider/AuthProvider.tsx +344 -0
  206. package/src/components/Auth/QrLogin/QrLogin.tsx +306 -0
  207. package/src/components/Auth/QrLogin/components/QrViewArea.tsx +213 -0
  208. package/src/components/Auth/SplashScreen/SplashScreen.tsx +89 -80
  209. package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +90 -40
  210. package/src/components/Auth/index.ts +4 -0
  211. package/src/components/BackgroundLayout/BackgroundLayout.tsx +3 -3
  212. package/src/components/Button/SecondaryBtn.tsx +116 -0
  213. package/src/components/Button/index.ts +2 -0
  214. package/src/components/Content/Card/NowWatching/NowWatching.tsx +4 -0
  215. package/src/components/Content/Card/Sliders/Styles/One.tsx +2 -0
  216. package/src/components/Content/Card/Sliders/Styles/Two.tsx +2 -0
  217. package/src/components/Content/Card/Styles/Five.tsx +1 -0
  218. package/src/components/Content/Card/Styles/Four.tsx +1 -0
  219. package/src/components/Content/Card/Styles/One.tsx +7 -1
  220. package/src/components/Content/Card/Styles/RotateInOut.tsx +1 -0
  221. package/src/components/Content/Card/Styles/Six.tsx +2 -0
  222. package/src/components/Content/Card/Styles/Three.tsx +1 -0
  223. package/src/components/Content/Card/Styles/TopTen.tsx +1 -0
  224. package/src/components/Content/Card/Styles/Two.tsx +1 -0
  225. package/src/components/Content/Card/components/CardPoster.tsx +23 -51
  226. package/src/components/Content/Card/components/RentOrBuyIcon.tsx +109 -0
  227. package/src/components/Content/Card/components/ThumbnailCard.tsx +1 -2
  228. package/src/components/ContentView/ContentView.tsx +1 -0
  229. package/src/components/ContentView/MoreContentList.tsx +1 -0
  230. package/src/components/ContentView/components/EpisodeCard.tsx +4 -9
  231. package/src/components/ContentView/components/HeroBanner.tsx +16 -0
  232. package/src/components/Headers/AppHeader.tsx +1 -1
  233. package/src/components/Headers/One.tsx +1 -1
  234. package/src/components/Headers/Two.tsx +1 -1
  235. package/src/components/Logo/Logo.tsx +5 -7
  236. package/src/components/Reels/ReelsSeries/Model/Episodes.tsx +133 -0
  237. package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +242 -0
  238. package/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.tsx +209 -0
  239. package/src/components/Reels/ReelsSeries/ReelSeriesOverlay.tsx +185 -0
  240. package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +163 -0
  241. package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +333 -0
  242. package/src/components/Reels/ReelsSeries/types.ts +27 -0
  243. package/src/components/Reels/index.ts +8 -0
  244. package/src/components/Subscription/SubOne.tsx +4 -2
  245. package/src/components/User/DeviceSessions/DeviceSessions.tsx +11 -0
  246. package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +263 -0
  247. package/src/components/User/WatchHistory/WatchHistory.tsx +1 -0
  248. package/src/components/User/WatchLater/WatchLater.tsx +1 -0
  249. package/src/components/User/components/UserAvatar.tsx +36 -3
  250. package/src/components/User/components/UserSection.tsx +10 -13
  251. package/src/components/User/index.ts +3 -1
  252. package/src/components/index.ts +1 -0
  253. package/src/hooks/useSplashCache.ts +166 -0
  254. package/src/store/RecentSearchesStore.ts +0 -1
  255. package/src/theme/ThemeProvider.tsx +12 -9
  256. package/src/theme/themes.ts +3 -0
  257. package/src/types/content/content-view.types.ts +1 -0
  258. package/src/utils/Formater.ts +14 -0
  259. package/lib/module/hooks/useInitSplashCacheSync.js +0 -116
  260. package/lib/module/hooks/useInitSplashCacheSync.js.map +0 -1
  261. package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +0 -22
  262. package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +0 -1
  263. package/src/hooks/useInitSplashCacheSync.ts +0 -174
  264. /package/lib/module/assets/{img → svg}/h.svg +0 -0
  265. /package/src/assets/{img → svg}/h.svg +0 -0
@@ -0,0 +1,247 @@
1
+ /**
2
+ * @author Naresh Dhamu
3
+ * @lastModified Sat 18 Oct 2025 at 06:45 PM
4
+ */
5
+ import React, { useEffect, useRef } from 'react';
6
+ import {
7
+ View,
8
+ TouchableOpacity,
9
+ StyleSheet,
10
+ Dimensions,
11
+ Modal,
12
+ Animated,
13
+ TouchableWithoutFeedback,
14
+ } from 'react-native';
15
+ import { Text } from '../Text';
16
+ import { X } from 'lucide-react-native';
17
+ import LottieView from 'lottie-react-native';
18
+ import { useTheme } from '../../theme/hook/useTheme';
19
+ import type { AppTheme } from '../../theme/themes';
20
+ import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
21
+ import { RFValue } from 'react-native-responsive-fontsize';
22
+ import { Button } from '../Button';
23
+
24
+ const { width } = Dimensions.get('window');
25
+
26
+ export interface AlertDialogProps {
27
+ visible: boolean;
28
+ type: 'success' | 'pending' | 'failed';
29
+ title: string;
30
+ buttonText?: string;
31
+ onPressButton?: () => void;
32
+ onClose?: () => void;
33
+ theme?: AppTheme;
34
+ }
35
+
36
+ export const AlertDialog: React.FC<AlertDialogProps> = ({
37
+ visible,
38
+ type = 'success',
39
+ title,
40
+ buttonText,
41
+ onPressButton,
42
+ onClose,
43
+ theme,
44
+ }) => {
45
+ const { theme: appliedTheme } = useTheme(theme);
46
+
47
+ const fadeAnim = useRef(new Animated.Value(0)).current;
48
+ const scaleAnim = useRef(new Animated.Value(0.85)).current;
49
+
50
+ useEffect(() => {
51
+ if (visible) {
52
+ Animated.parallel([
53
+ Animated.timing(fadeAnim, {
54
+ toValue: 1,
55
+ duration: 220,
56
+ useNativeDriver: true,
57
+ }),
58
+ Animated.spring(scaleAnim, {
59
+ toValue: 1,
60
+ friction: 7,
61
+ tension: 90,
62
+ useNativeDriver: true,
63
+ }),
64
+ ]).start();
65
+ } else {
66
+ Animated.parallel([
67
+ Animated.timing(fadeAnim, {
68
+ toValue: 0,
69
+ duration: 180,
70
+ useNativeDriver: true,
71
+ }),
72
+ Animated.timing(scaleAnim, {
73
+ toValue: 0.85,
74
+ duration: 180,
75
+ useNativeDriver: true,
76
+ }),
77
+ ]).start();
78
+ }
79
+ }, [fadeAnim, scaleAnim, visible]);
80
+
81
+ const animationMap = {
82
+ success: require('../../assets/animations/Successful.json'),
83
+ pending: require('../../assets/animations/Pending.json'),
84
+ failed: require('../../assets/animations/Failed.json'),
85
+ };
86
+
87
+ const defaultTitles = {
88
+ success: 'Account successfully created!',
89
+ pending: 'Please wait... Processing',
90
+ failed: 'Something went wrong!',
91
+ };
92
+
93
+ const defaultButtonText = {
94
+ success: 'Go to Home',
95
+ pending: 'Please Wait...',
96
+ failed: 'Try Again',
97
+ };
98
+
99
+ return (
100
+ <Modal
101
+ transparent
102
+ visible={visible}
103
+ animationType="none"
104
+ onRequestClose={onClose}
105
+ >
106
+ <Animated.View
107
+ style={[
108
+ styles.backdrop,
109
+ { backgroundColor: appliedTheme.colors.shadow },
110
+ ]}
111
+ >
112
+ <TouchableWithoutFeedback onPress={onClose}>
113
+ <View style={StyleSheet.absoluteFillObject} />
114
+ </TouchableWithoutFeedback>
115
+
116
+ <Animated.View
117
+ style={[
118
+ styles.centerContainer,
119
+ { opacity: fadeAnim, transform: [{ scale: scaleAnim }] },
120
+ ]}
121
+ >
122
+ <View
123
+ style={[
124
+ styles.dialogBox,
125
+ {
126
+ backgroundColor: appliedTheme.colors.surface,
127
+ shadowColor: appliedTheme.colors.shadow,
128
+ },
129
+ ]}
130
+ >
131
+ {/* Close Button */}
132
+ <TouchableOpacity
133
+ style={[
134
+ styles.closeButton,
135
+ { backgroundColor: appliedTheme.colors.background },
136
+ ]}
137
+ onPress={onClose}
138
+ activeOpacity={0.7}
139
+ >
140
+ <X
141
+ color={appliedTheme.colors.textPrimary}
142
+ size={scale(18)}
143
+ strokeWidth={2}
144
+ />
145
+ </TouchableOpacity>
146
+
147
+ {/* Content Wrapper */}
148
+ <View style={styles.contentWrapper}>
149
+ {/* Animation */}
150
+ <View style={styles.lottieStyle}>
151
+ <LottieView
152
+ source={animationMap[type]}
153
+ autoPlay
154
+ loop={type === 'pending'}
155
+ style={{ width: 500, height: 500, padding: 0 }}
156
+ />
157
+ </View>
158
+
159
+ {/* Title */}
160
+ <Text
161
+ style={[
162
+ styles.titleText,
163
+ { color: appliedTheme.colors.textPrimary },
164
+ ]}
165
+ >
166
+ {title || defaultTitles[type]}
167
+ </Text>
168
+ </View>
169
+
170
+ {/* Button fixed at bottom */}
171
+ <Button.Primary
172
+ title={buttonText || defaultButtonText[type]}
173
+ onPress={onPressButton}
174
+ disabled={type === 'pending'}
175
+ containerStyle={styles.bottomButton}
176
+ />
177
+ </View>
178
+ </Animated.View>
179
+ </Animated.View>
180
+ </Modal>
181
+ );
182
+ };
183
+
184
+ export default AlertDialog;
185
+ const styles = StyleSheet.create({
186
+ backdrop: {
187
+ flex: 1,
188
+ zIndex: 10,
189
+ backgroundColor: 'rgba(0,0,0,0.5)',
190
+ justifyContent: 'center',
191
+ alignItems: 'center',
192
+ overflow: 'hidden',
193
+ paddingHorizontal: scale(15),
194
+ },
195
+ centerContainer: {
196
+ justifyContent: 'center',
197
+ alignItems: 'center',
198
+ },
199
+ dialogBox: {
200
+ width: width * 0.85,
201
+ borderRadius: moderateScale(16),
202
+ paddingTop: verticalScale(20),
203
+ paddingBottom: verticalScale(15),
204
+ paddingHorizontal: scale(20),
205
+ shadowOpacity: 0.25,
206
+ shadowRadius: moderateScale(8),
207
+ shadowOffset: { width: 0, height: 3 },
208
+ elevation: 8,
209
+ minHeight: verticalScale(250),
210
+ justifyContent: 'flex-start',
211
+ },
212
+ closeButton: {
213
+ position: 'absolute',
214
+ top: verticalScale(8),
215
+ right: scale(8),
216
+ width: scale(28),
217
+ height: scale(28),
218
+ borderRadius: scale(14),
219
+ justifyContent: 'center',
220
+ alignItems: 'center',
221
+ zIndex: 10,
222
+ elevation: 6,
223
+ },
224
+ contentWrapper: {
225
+ alignItems: 'center',
226
+ marginBottom: verticalScale(50),
227
+ },
228
+ lottieStyle: {
229
+ width: scale(150),
230
+ height: scale(150),
231
+ justifyContent: 'center',
232
+ alignItems: 'center',
233
+ marginBottom: verticalScale(10),
234
+ },
235
+ titleText: {
236
+ fontSize: RFValue(15),
237
+ fontWeight: '600',
238
+ textAlign: 'center',
239
+ lineHeight: RFValue(20),
240
+ },
241
+ bottomButton: {
242
+ position: 'absolute',
243
+ bottom: verticalScale(15),
244
+ left: scale(15),
245
+ right: scale(15),
246
+ },
247
+ });
@@ -1 +1,2 @@
1
1
  export * from './UAAlert';
2
+ export * from './AlertDialog';
@@ -0,0 +1,344 @@
1
+ /**
2
+ * @author Naresh Dhamu
3
+ * @lastModified Sat 18 Oct 2025 at 06:23 PM
4
+ */
5
+ import React, { useEffect, useRef, useState } from 'react';
6
+ import {
7
+ View,
8
+ StyleSheet,
9
+ SafeAreaView,
10
+ TouchableOpacity,
11
+ Animated,
12
+ Platform,
13
+ } from 'react-native';
14
+ import { moderateScale, scale, verticalScale } from 'react-native-size-matters';
15
+ import { useTheme } from '../../../theme/hook/useTheme';
16
+ import { type AppTheme } from '../../../theme/themes';
17
+ import { Logo } from '../../Logo/Logo';
18
+ import { Text } from '../../Text';
19
+ import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
20
+ import { Phone, Mail } from 'lucide-react-native';
21
+ import { Button } from '../../Button';
22
+
23
+ export interface AuthProviderProps {
24
+ title?: string;
25
+ description?: string;
26
+ backgroundImage?: {
27
+ source?: string | null;
28
+ gradientSplitBackground?: number;
29
+ resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
30
+ };
31
+ logoUri?: string;
32
+ text?: {
33
+ loginWithPhone?: string;
34
+ loginWithEmail?: string;
35
+ };
36
+ variant?: 'one' | 'two';
37
+ theme?: AppTheme;
38
+ authProvider?: {
39
+ phone?: {
40
+ enabled?: boolean;
41
+ onPress?: () => void;
42
+ };
43
+ email?: {
44
+ enabled?: boolean;
45
+ onPress?: () => void;
46
+ };
47
+ };
48
+ }
49
+
50
+ const AuthProvider: React.FC<AuthProviderProps> = ({
51
+ title = 'Your Favourite OTT Platform',
52
+ description,
53
+ backgroundImage,
54
+ logoUri,
55
+ text,
56
+ variant = 'one',
57
+ theme: overrideTheme,
58
+ authProvider = {
59
+ phone: { enabled: true },
60
+ email: { enabled: true },
61
+ },
62
+ }) => {
63
+ const { theme: resolvedTheme } = useTheme(overrideTheme);
64
+ const { colors } = resolvedTheme;
65
+
66
+ const phoneEnabled = !!authProvider.phone?.enabled;
67
+ const emailEnabled = !!authProvider.email?.enabled;
68
+
69
+ const [activeTab, setActiveTab] = useState<'phone' | 'email'>(
70
+ phoneEnabled ? 'phone' : 'email'
71
+ );
72
+
73
+ const slideAnim = useRef(new Animated.Value(80)).current;
74
+ const opacityAnim = useRef(new Animated.Value(0)).current;
75
+
76
+ useEffect(() => {
77
+ Animated.parallel([
78
+ Animated.timing(slideAnim, {
79
+ toValue: 0,
80
+ duration: 600,
81
+ useNativeDriver: true,
82
+ }),
83
+ Animated.timing(opacityAnim, {
84
+ toValue: 1,
85
+ duration: 600,
86
+ useNativeDriver: true,
87
+ }),
88
+ ]).start();
89
+ }, [opacityAnim, slideAnim]);
90
+
91
+ useEffect(() => {
92
+ setActiveTab(phoneEnabled ? 'phone' : 'email');
93
+ }, [phoneEnabled, emailEnabled]);
94
+
95
+ const triggerEvent = (type: 'phone' | 'email') => {
96
+ if (type === 'phone') authProvider.phone?.onPress?.();
97
+ else authProvider.email?.onPress?.();
98
+ };
99
+
100
+ const handlePress = (type: 'phone' | 'email') => {
101
+ if (phoneEnabled && !emailEnabled) return triggerEvent('phone');
102
+ if (emailEnabled && !phoneEnabled) return triggerEvent('email');
103
+
104
+ if (activeTab !== type) {
105
+ setActiveTab(type);
106
+ setTimeout(() => triggerEvent(type), 150);
107
+ } else {
108
+ triggerEvent(type);
109
+ }
110
+ };
111
+
112
+ const renderButtons = () => (
113
+ <View style={styles.buttonContainer}>
114
+ {phoneEnabled && (
115
+ <Button.Secondary
116
+ containerStyle={{
117
+ backgroundColor:
118
+ activeTab === 'phone' ? colors.button : 'transparent',
119
+ borderWidth: 1.2,
120
+ borderColor: colors.button,
121
+ }}
122
+ titleStyle={{
123
+ color:
124
+ activeTab === 'phone' ? colors.buttonText : colors.textPrimary,
125
+ }}
126
+ title={text?.loginWithPhone || 'Continue with Phone'}
127
+ onPress={() => handlePress('phone')}
128
+ leftIcon={
129
+ <Phone
130
+ size={moderateScale(18)}
131
+ color={
132
+ activeTab === 'phone' ? colors.buttonText : colors.textPrimary
133
+ }
134
+ />
135
+ }
136
+ />
137
+ )}
138
+ {emailEnabled && (
139
+ <Button.Secondary
140
+ title={text?.loginWithEmail || 'Continue with Email'}
141
+ onPress={() => handlePress('email')}
142
+ containerStyle={{
143
+ backgroundColor:
144
+ activeTab === 'email' ? colors.button : 'transparent',
145
+ borderWidth: 1.2,
146
+ borderColor: colors.button,
147
+ }}
148
+ titleStyle={{
149
+ color:
150
+ activeTab === 'email' ? colors.buttonText : colors.textPrimary,
151
+ }}
152
+ leftIcon={
153
+ <Mail
154
+ size={moderateScale(18)}
155
+ color={
156
+ activeTab === 'email' ? colors.buttonText : colors.textPrimary
157
+ }
158
+ />
159
+ }
160
+ />
161
+ )}
162
+ </View>
163
+ );
164
+
165
+ const renderToggle = () => (
166
+ <View
167
+ style={[styles.toggleWrapper, { backgroundColor: colors.surfaceVariant }]}
168
+ >
169
+ <Animated.View
170
+ style={[
171
+ styles.activeHighlight,
172
+ {
173
+ backgroundColor: colors.primary,
174
+ width: phoneEnabled && emailEnabled ? '50%' : '96%',
175
+ left:
176
+ phoneEnabled && emailEnabled
177
+ ? activeTab === 'phone'
178
+ ? '2%'
179
+ : '48%'
180
+ : '2%',
181
+ },
182
+ ]}
183
+ />
184
+ {phoneEnabled && (
185
+ <ToggleButton
186
+ active={activeTab === 'phone'}
187
+ icon={<Phone size={moderateScale(16)} />}
188
+ text={text?.loginWithPhone || 'Phone'}
189
+ onPress={() => handlePress('phone')}
190
+ colors={colors}
191
+ />
192
+ )}
193
+ {emailEnabled && (
194
+ <ToggleButton
195
+ active={activeTab === 'email'}
196
+ icon={<Mail size={moderateScale(16)} />}
197
+ text={text?.loginWithEmail || 'Email'}
198
+ onPress={() => handlePress('email')}
199
+ colors={colors}
200
+ />
201
+ )}
202
+ </View>
203
+ );
204
+
205
+ return (
206
+ <BackgroundLayout
207
+ backgroundImage={backgroundImage?.source}
208
+ theme={resolvedTheme}
209
+ gradientSplitBackground={backgroundImage?.gradientSplitBackground ?? 0.35}
210
+ resizeMode={backgroundImage?.resizeMode ?? 'cover'}
211
+ >
212
+ <SafeAreaView style={styles.safeArea}>
213
+ <View style={styles.container}>
214
+ <View style={styles.logoWrapper}>
215
+ <Logo
216
+ logoUri={
217
+ logoUri ||
218
+ 'https://res.cloudinary.com/dcxtwwtl0/image/upload/v1759578007/Logo_y4uzsd.png'
219
+ }
220
+ />
221
+ </View>
222
+
223
+ <View style={styles.bottomSection}>
224
+ <Text style={[styles.title, { color: colors.textPrimary }]}>
225
+ {title}
226
+ </Text>
227
+ <Text
228
+ style={[styles.description, { color: colors.textSecondary }]}
229
+ numberOfLines={2}
230
+ adjustsFontSizeToFit
231
+ >
232
+ {description}
233
+ </Text>
234
+
235
+ <Animated.View
236
+ style={{
237
+ transform: [{ translateY: slideAnim }],
238
+ opacity: opacityAnim,
239
+ width: '100%',
240
+ }}
241
+ >
242
+ {variant === 'one' ? renderButtons() : renderToggle()}
243
+ </Animated.View>
244
+ </View>
245
+ </View>
246
+ </SafeAreaView>
247
+ </BackgroundLayout>
248
+ );
249
+ };
250
+
251
+ const ToggleButton = ({
252
+ active,
253
+ icon,
254
+ text,
255
+ onPress,
256
+ colors,
257
+ }: {
258
+ active: boolean;
259
+ icon: React.ReactNode;
260
+ text: string;
261
+ onPress: () => void;
262
+ colors: any;
263
+ }) => (
264
+ <TouchableOpacity
265
+ style={styles.toggleHalf}
266
+ onPress={onPress}
267
+ activeOpacity={0.8}
268
+ >
269
+ <View style={styles.iconTextRow}>
270
+ {React.cloneElement(icon as any, {
271
+ color: active ? colors.buttonText : colors.textPrimary,
272
+ })}
273
+ <Text
274
+ style={[
275
+ styles.toggleText,
276
+ { color: active ? colors.buttonText : colors.textPrimary },
277
+ ]}
278
+ >
279
+ {text}
280
+ </Text>
281
+ </View>
282
+ </TouchableOpacity>
283
+ );
284
+
285
+ export default AuthProvider;
286
+
287
+ const styles = StyleSheet.create({
288
+ safeArea: { flex: 1, width: '100%' },
289
+ container: {
290
+ flex: 1,
291
+ justifyContent: 'space-between',
292
+ alignItems: 'center',
293
+ width: '100%',
294
+ paddingHorizontal: scale(18),
295
+
296
+ paddingVertical: verticalScale(20),
297
+ },
298
+ logoWrapper: {
299
+ flex: 1,
300
+ justifyContent: 'center',
301
+ alignItems: 'center',
302
+ },
303
+ bottomSection: {
304
+ width: '100%',
305
+ alignItems: 'center',
306
+ paddingBottom: verticalScale(Platform.OS === 'ios' ? 40 : 30),
307
+ },
308
+ title: {
309
+ fontSize: moderateScale(18),
310
+ fontWeight: '700',
311
+ textAlign: 'center',
312
+ },
313
+ description: {
314
+ fontSize: moderateScale(14),
315
+ textAlign: 'center',
316
+ width: '90%',
317
+ marginBottom: verticalScale(30),
318
+ },
319
+ buttonContainer: { width: '100%', gap: verticalScale(10) },
320
+ toggleWrapper: {
321
+ flexDirection: 'row',
322
+ height: verticalScale(48),
323
+ borderRadius: 50,
324
+ overflow: 'hidden',
325
+ alignItems: 'center',
326
+ width: '100%',
327
+ position: 'relative',
328
+ },
329
+ toggleHalf: {
330
+ flex: 1,
331
+ justifyContent: 'center',
332
+ alignItems: 'center',
333
+ zIndex: 2,
334
+ },
335
+ toggleText: { fontSize: moderateScale(14), fontWeight: '600' },
336
+ activeHighlight: {
337
+ position: 'absolute',
338
+ top: '7%',
339
+ height: '86%',
340
+ borderRadius: 50,
341
+ zIndex: 1,
342
+ },
343
+ iconTextRow: { flexDirection: 'row', alignItems: 'center', gap: scale(6) },
344
+ });