@zezosoft/zezo-ott-react-native-ui-kit 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/module/components/Account/Account.js +7 -6
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +39 -27
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +39 -25
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +34 -25
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +61 -42
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +41 -26
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +132 -0
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +61 -0
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -0
- package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.js +8 -17
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -0
- package/lib/module/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.js +25 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -0
- package/lib/module/components/Auth/index.js +3 -1
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +77 -57
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +28 -9
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/Button/BackBtn.js +1 -1
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/MenuBtn.js +5 -3
- package/lib/module/components/Button/MenuBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +3 -2
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +3 -2
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +3 -2
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +10 -7
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +6 -4
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +3 -2
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +7 -6
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +9 -7
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +33 -70
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +6 -5
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +7 -5
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +6 -5
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +10 -12
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +8 -6
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +17 -9
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/NavigateToMore.js +4 -3
- package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -1
- package/lib/module/components/Content/Card/components/NoContentFallback.js +5 -4
- package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +2 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Content.js +21 -7
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +1 -1
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +8 -6
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +211 -0
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -0
- package/lib/module/components/ContentView/components/AboutSection.js +5 -4
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +5 -4
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +23 -3
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +2 -1
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +14 -5
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +4 -3
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/index.js +1 -0
- package/lib/module/components/ContentView/index.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +20 -25
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/One.js +1 -1
- package/lib/module/components/Headers/Three.js +5 -3
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +5 -3
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +6 -4
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Input/InputTwo.js +5 -4
- package/lib/module/components/Input/InputTwo.js.map +1 -1
- package/lib/module/components/Input/PhoneNumberInput.js +12 -11
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
- package/lib/module/components/Keyboard/HideKeyboard.js +40 -12
- package/lib/module/components/Keyboard/HideKeyboard.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +2 -1
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Search/One.js +6 -4
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/RecentSearchesSection.js +10 -9
- package/lib/module/components/Search/components/RecentSearchesSection.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +6 -5
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +5 -4
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +16 -15
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/TabBar/One.js +5 -3
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +18 -14
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +4 -2
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/Text/Text.js +4 -4
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +7 -6
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +6 -7
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +12 -9
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +1 -1
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +5 -4
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/SafeAreaWrapper.js +12 -11
- package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -1
- package/lib/module/hooks/useInitSplashCacheSync.js +67 -63
- package/lib/module/hooks/useInitSplashCacheSync.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -9
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +10 -3
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +55 -52
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useTheme.js +45 -0
- package/lib/module/theme/hook/useTheme.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/themes.js +1 -1
- package/lib/typescript/src/components/Account/Account.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts +9 -6
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts +6 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts +6 -2
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts +7 -3
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts +6 -2
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +34 -0
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashImage/SplashImage.d.ts +2 -3
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.d.ts +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -0
- package/lib/typescript/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.d.ts +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/index.d.ts +49 -11
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +5 -4
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +1 -0
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/MenuBtn.d.ts +1 -8
- package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/index.d.ts +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +1 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts +27 -0
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/index.d.ts +1 -0
- package/lib/typescript/src/components/ContentView/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +1 -0
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +1 -0
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts +1 -1
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/RecentSearchesSection.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Three.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +0 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts +2 -4
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +1 -0
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/theme/ThemeProvider.d.ts +8 -4
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useTheme.d.ts +9 -0
- package/lib/typescript/src/theme/hook/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +1 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +7 -3
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/Account/Account.tsx +7 -6
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +51 -32
- package/src/components/Auth/Login/LoginWithEmail.tsx +45 -26
- package/src/components/Auth/Login/LoginWithPhone.tsx +38 -24
- package/src/components/Auth/OTP/OTP.tsx +96 -61
- package/src/components/Auth/SignUp/SignUp.tsx +49 -31
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +166 -0
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +66 -0
- package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashLottie/SplashLottie.tsx +7 -19
- package/src/components/{SplashScreen → Auth/SplashScreen}/components/SplashVideo/SplashVideo.tsx +23 -14
- package/src/components/Auth/index.ts +3 -1
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +72 -50
- package/src/components/BlogView/BlogView.tsx +29 -9
- package/src/components/Button/BackBtn.tsx +1 -1
- package/src/components/Button/MenuBtn.tsx +6 -9
- package/src/components/Button/PrimaryBtn.tsx +3 -2
- package/src/components/Button/TextButton.tsx +3 -2
- package/src/components/Content/Card/Category/Category.tsx +3 -2
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +15 -8
- package/src/components/Content/Card/Sliders/Styles/One.tsx +4 -3
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +3 -2
- package/src/components/Content/Card/Sliders/index.ts +1 -1
- package/src/components/Content/Card/Styles/Five.tsx +7 -6
- package/src/components/Content/Card/Styles/Four.tsx +7 -6
- package/src/components/Content/Card/Styles/One.tsx +44 -111
- package/src/components/Content/Card/Styles/RotateInOut.tsx +5 -5
- package/src/components/Content/Card/Styles/Six.tsx +7 -5
- package/src/components/Content/Card/Styles/Three.tsx +5 -5
- package/src/components/Content/Card/Styles/TopTen.tsx +10 -14
- package/src/components/Content/Card/Styles/Two.tsx +9 -7
- package/src/components/Content/Card/components/CardPoster.tsx +24 -11
- package/src/components/Content/Card/components/NavigateToMore.tsx +4 -3
- package/src/components/Content/Card/components/NoContentFallback.tsx +5 -4
- package/src/components/Content/Card/components/ThumbnailCard.tsx +2 -1
- package/src/components/Content/Content.tsx +38 -7
- package/src/components/Content/Sections.tsx +1 -1
- package/src/components/ContentView/ContentView.tsx +6 -6
- package/src/components/ContentView/MoreContentList.tsx +238 -0
- package/src/components/ContentView/components/AboutSection.tsx +5 -4
- package/src/components/ContentView/components/CastCard.tsx +5 -4
- package/src/components/ContentView/components/EpisodeCard.tsx +30 -4
- package/src/components/ContentView/components/GenreTags.tsx +2 -1
- package/src/components/ContentView/components/HeroBanner.tsx +10 -6
- package/src/components/ContentView/components/Title.tsx +4 -3
- package/src/components/ContentView/index.ts +1 -0
- package/src/components/Headers/AppHeader.tsx +20 -34
- package/src/components/Headers/One.tsx +1 -1
- package/src/components/Headers/Three.tsx +4 -3
- package/src/components/Headers/Two.tsx +4 -3
- package/src/components/Input/InputOne.tsx +6 -4
- package/src/components/Input/InputTwo.tsx +5 -4
- package/src/components/Input/PhoneNumberInput.tsx +12 -11
- package/src/components/Keyboard/HideKeyboard.tsx +41 -15
- package/src/components/Logo/Logo.tsx +2 -1
- package/src/components/Search/One.tsx +6 -5
- package/src/components/Search/components/RecentSearchesSection.tsx +10 -9
- package/src/components/Search/components/SearchCard.tsx +6 -5
- package/src/components/Settings/AppSettings.tsx +14 -13
- package/src/components/Subscription/SubOne.tsx +16 -15
- package/src/components/TabBar/One.tsx +6 -3
- package/src/components/TabBar/Three.tsx +28 -14
- package/src/components/TabBar/Two.tsx +4 -2
- package/src/components/Text/Text.tsx +4 -4
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +7 -6
- package/src/components/User/WatchHistory/WatchHistory.tsx +5 -7
- package/src/components/User/WatchLater/WatchLater.tsx +12 -9
- package/src/components/User/components/UserAvatar.tsx +1 -1
- package/src/components/User/components/UserSection.tsx +5 -4
- package/src/components/index.ts +0 -1
- package/src/components/layout/SafeAreaWrapper.tsx +16 -9
- package/src/hooks/useInitSplashCacheSync.ts +74 -87
- package/src/hooks/useKeyboard.ts +9 -8
- package/src/hooks/usePaginatedSection.ts +7 -3
- package/src/theme/ThemeProvider.tsx +59 -55
- package/src/theme/hook/useTheme.ts +41 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/themes.ts +1 -1
- package/src/types/content/content-view.types.ts +4 -2
- package/lib/module/components/SplashScreen/SplashScreen.js +0 -109
- package/lib/module/components/SplashScreen/SplashScreen.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js +0 -68
- package/lib/module/components/SplashScreen/components/SplashImage/SplashImage.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashLottie/SplashLottie.js.map +0 -1
- package/lib/module/components/SplashScreen/components/SplashVideo/SplashVideo.js.map +0 -1
- package/lib/module/components/SplashScreen/index.js +0 -9
- package/lib/module/components/SplashScreen/index.js.map +0 -1
- package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts +0 -32
- package/lib/typescript/src/components/SplashScreen/SplashScreen.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashImage/SplashImage.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +0 -1
- package/lib/typescript/src/components/SplashScreen/index.d.ts +0 -6
- package/lib/typescript/src/components/SplashScreen/index.d.ts.map +0 -1
- package/src/components/SplashScreen/SplashScreen.tsx +0 -131
- package/src/components/SplashScreen/components/SplashImage/SplashImage.tsx +0 -84
- package/src/components/SplashScreen/index.ts +0 -6
|
@@ -7,26 +7,31 @@ import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
|
|
|
7
7
|
import HideKeyboard from '../../Keyboard/HideKeyboard';
|
|
8
8
|
import { useKeyboard } from '../../../hooks/useKeyboard';
|
|
9
9
|
import BackBtn from '../../Button/BackBtn';
|
|
10
|
-
import { useTheme } from '../../../theme';
|
|
10
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
11
11
|
import { Logo } from '../../Logo/Logo';
|
|
12
12
|
import { Button } from '../../Button';
|
|
13
13
|
import Display from '../../../utils/Display';
|
|
14
14
|
import { Text } from '../../Text';
|
|
15
15
|
import type { AppTheme } from '../../../theme/themes';
|
|
16
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
16
17
|
|
|
17
18
|
type OTPProps = {
|
|
18
19
|
title?: string;
|
|
19
20
|
onSubmit?: (values: { otp: string }) => Promise<void> | void;
|
|
20
|
-
|
|
21
|
+
onTopBackBtnPress?: () => void;
|
|
21
22
|
containerStyle?: ViewStyle;
|
|
22
23
|
titleStyle?: TextStyle;
|
|
23
24
|
formStyle?: ViewStyle;
|
|
24
25
|
backBtnStyle?: ViewStyle;
|
|
25
|
-
backgroundImage?:
|
|
26
|
+
backgroundImage?: {
|
|
27
|
+
source?: string | null;
|
|
28
|
+
onImageError?: (error: Error) => void;
|
|
29
|
+
gradientSplitBackground?: number;
|
|
30
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
|
|
31
|
+
};
|
|
26
32
|
loading?: boolean;
|
|
27
33
|
logoUri?: string;
|
|
28
34
|
theme?: AppTheme;
|
|
29
|
-
gradientEnabled?: boolean;
|
|
30
35
|
otpDigitCount?: number;
|
|
31
36
|
keyboardType?: KeyboardTypeOptions;
|
|
32
37
|
phoneNumber?: string;
|
|
@@ -74,7 +79,7 @@ const DEFAULT_TEXT = {
|
|
|
74
79
|
const OTP: React.FC<OTPProps> = ({
|
|
75
80
|
title,
|
|
76
81
|
onSubmit,
|
|
77
|
-
|
|
82
|
+
onTopBackBtnPress,
|
|
78
83
|
containerStyle,
|
|
79
84
|
titleStyle,
|
|
80
85
|
formStyle,
|
|
@@ -82,8 +87,7 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
82
87
|
backgroundImage,
|
|
83
88
|
loading = false,
|
|
84
89
|
logoUri,
|
|
85
|
-
theme,
|
|
86
|
-
gradientEnabled = true,
|
|
90
|
+
theme: overrideTheme,
|
|
87
91
|
otpDigitCount = 4,
|
|
88
92
|
keyboardType = 'number-pad',
|
|
89
93
|
phoneNumber,
|
|
@@ -100,7 +104,7 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
100
104
|
cellStyle,
|
|
101
105
|
focusCellStyle
|
|
102
106
|
}) => {
|
|
103
|
-
const { theme:
|
|
107
|
+
const { theme: resolvedTheme } = useTheme(overrideTheme);
|
|
104
108
|
const { isKeyboardOpen } = useKeyboard();
|
|
105
109
|
const [otp, setOtp] = useState('');
|
|
106
110
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
@@ -122,22 +126,31 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
122
126
|
justifyContent: 'center',
|
|
123
127
|
alignItems: 'center'
|
|
124
128
|
},
|
|
125
|
-
|
|
129
|
+
topBackBtnWrapper: {
|
|
130
|
+
position: 'absolute',
|
|
131
|
+
top: verticalScale(6),
|
|
132
|
+
left: 0,
|
|
133
|
+
zIndex: 10
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
centerContent: {
|
|
137
|
+
flex: 1,
|
|
126
138
|
width: '100%',
|
|
127
139
|
maxWidth: scale(400),
|
|
128
140
|
alignItems: 'center',
|
|
129
|
-
|
|
141
|
+
justifyContent: 'center',
|
|
142
|
+
gap: verticalScale(4)
|
|
130
143
|
},
|
|
131
144
|
title: {
|
|
132
|
-
fontSize:
|
|
145
|
+
fontSize: RFValue(21),
|
|
133
146
|
fontWeight: '700',
|
|
134
147
|
marginTop: verticalScale(8),
|
|
135
|
-
color:
|
|
148
|
+
color: resolvedTheme.colors.textPrimary,
|
|
136
149
|
textAlign: 'center'
|
|
137
150
|
},
|
|
138
151
|
sentText: {
|
|
139
|
-
fontSize:
|
|
140
|
-
color:
|
|
152
|
+
fontSize: RFValue(12),
|
|
153
|
+
color: resolvedTheme.colors.onSurfaceVariant,
|
|
141
154
|
textAlign: 'center',
|
|
142
155
|
lineHeight: scale(18)
|
|
143
156
|
},
|
|
@@ -149,7 +162,8 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
149
162
|
width: '100%',
|
|
150
163
|
gap: verticalScale(20),
|
|
151
164
|
alignItems: 'center',
|
|
152
|
-
marginTop: verticalScale(24)
|
|
165
|
+
marginTop: verticalScale(24),
|
|
166
|
+
marginBottom: isKeyboardOpen ? verticalScale(20) : 0
|
|
153
167
|
},
|
|
154
168
|
codeFieldRoot: {
|
|
155
169
|
width: Display.setWidth(80),
|
|
@@ -158,21 +172,32 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
158
172
|
cell: {
|
|
159
173
|
width: scale(55),
|
|
160
174
|
height: scale(55),
|
|
161
|
-
fontSize:
|
|
175
|
+
fontSize: RFValue(26),
|
|
162
176
|
fontWeight: '500',
|
|
163
|
-
paddingTop: Platform.OS === 'ios' ? scale(
|
|
177
|
+
paddingTop: Platform.OS === 'ios' ? scale(9) : scale(7),
|
|
164
178
|
borderWidth: scale(1),
|
|
165
179
|
borderRadius: scale(8),
|
|
180
|
+
justifyContent: 'center',
|
|
181
|
+
alignItems: 'center',
|
|
166
182
|
textAlign: 'center',
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
alignSelf: 'center',
|
|
184
|
+
overflow: 'hidden',
|
|
185
|
+
color: resolvedTheme.colors.textPrimary,
|
|
186
|
+
borderColor: resolvedTheme.colors.outline
|
|
169
187
|
},
|
|
170
188
|
focusCell: {
|
|
171
|
-
borderColor:
|
|
172
|
-
backgroundColor:
|
|
189
|
+
borderColor: resolvedTheme.colors.primary,
|
|
190
|
+
backgroundColor: resolvedTheme.colors.surfaceVariant
|
|
173
191
|
}
|
|
174
192
|
}),
|
|
175
|
-
[
|
|
193
|
+
[
|
|
194
|
+
isKeyboardOpen,
|
|
195
|
+
resolvedTheme.colors.onSurfaceVariant,
|
|
196
|
+
resolvedTheme.colors.outline,
|
|
197
|
+
resolvedTheme.colors.primary,
|
|
198
|
+
resolvedTheme.colors.surfaceVariant,
|
|
199
|
+
resolvedTheme.colors.textPrimary
|
|
200
|
+
]
|
|
176
201
|
);
|
|
177
202
|
|
|
178
203
|
useEffect(() => {
|
|
@@ -204,22 +229,28 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
204
229
|
|
|
205
230
|
const isLoading = loading || isSubmitting;
|
|
206
231
|
const isSubmitDisabled = otp.length !== otpDigitCount || isLoading;
|
|
207
|
-
|
|
232
|
+
const shouldRender = (condition?: boolean | unknown): boolean => typeof condition === 'function' || !!condition;
|
|
208
233
|
return (
|
|
209
234
|
<BackgroundLayout
|
|
210
|
-
|
|
211
|
-
backgroundImage={backgroundImage}
|
|
212
|
-
|
|
235
|
+
theme={resolvedTheme}
|
|
236
|
+
backgroundImage={backgroundImage?.source}
|
|
237
|
+
gradientSplitBackground={isKeyboardOpen ? 0.3 : 0.4}
|
|
213
238
|
>
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
239
|
+
<View style={[styles.container, containerStyle]}>
|
|
240
|
+
{/* Top Back Button */}
|
|
241
|
+
{shouldRender(renderBackButton || onTopBackBtnPress) && (
|
|
242
|
+
<View style={styles.topBackBtnWrapper}>
|
|
243
|
+
{renderBackButton ? (
|
|
244
|
+
renderBackButton({
|
|
245
|
+
onPress: onTopBackBtnPress ?? (() => {})
|
|
246
|
+
})
|
|
247
|
+
) : (
|
|
248
|
+
<BackBtn theme={resolvedTheme} style={backBtnStyle} onPress={onTopBackBtnPress} />
|
|
249
|
+
)}
|
|
250
|
+
</View>
|
|
251
|
+
)}
|
|
252
|
+
<HideKeyboard>
|
|
253
|
+
<View style={styles.centerContent}>
|
|
223
254
|
{renderLogo ? renderLogo() : logoUri ? <Logo logoUri={logoUri} /> : null}
|
|
224
255
|
|
|
225
256
|
{renderOtpHeader ? renderOtpHeader() : <Text style={[styles.title, titleStyle]}>{title}</Text>}
|
|
@@ -233,9 +264,9 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
233
264
|
<Text
|
|
234
265
|
style={{
|
|
235
266
|
fontWeight: '700',
|
|
236
|
-
fontSize:
|
|
267
|
+
fontSize: RFValue(13),
|
|
237
268
|
marginTop: verticalScale(4),
|
|
238
|
-
color:
|
|
269
|
+
color: resolvedTheme.colors.primary
|
|
239
270
|
}}
|
|
240
271
|
>
|
|
241
272
|
{phoneNumber}
|
|
@@ -281,40 +312,44 @@ const OTP: React.FC<OTPProps> = ({
|
|
|
281
312
|
) : (
|
|
282
313
|
<Button.Primary
|
|
283
314
|
title={text.submitButton || DEFAULT_TEXT.submitButton}
|
|
284
|
-
theme={
|
|
315
|
+
theme={resolvedTheme}
|
|
285
316
|
onPress={handleSubmit}
|
|
286
317
|
loadingText={text.loadingSubmitBtnText}
|
|
318
|
+
titleStyle={{ fontSize: RFValue(13) }}
|
|
287
319
|
disabled={isSubmitDisabled}
|
|
288
320
|
loading={isLoading}
|
|
289
321
|
/>
|
|
290
322
|
)}
|
|
291
323
|
|
|
292
324
|
{/* Resend OTP Section */}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
325
|
+
|
|
326
|
+
{!isKeyboardOpen && (
|
|
327
|
+
<View style={{ alignItems: 'center', marginTop: verticalScale(10) }}>
|
|
328
|
+
{renderResendButton ? (
|
|
329
|
+
renderResendButton({
|
|
330
|
+
onPress: handleResendOtp,
|
|
331
|
+
disabled: resendTimer > 0
|
|
332
|
+
})
|
|
333
|
+
) : (
|
|
334
|
+
<Text
|
|
335
|
+
onPress={resendTimer <= 0 ? handleResendOtp : undefined}
|
|
336
|
+
style={{
|
|
337
|
+
fontSize: RFValue(12),
|
|
338
|
+
color: resendTimer > 0 ? resolvedTheme.colors.onSurfaceVariant : resolvedTheme.colors.primary,
|
|
339
|
+
textAlign: 'center'
|
|
340
|
+
}}
|
|
341
|
+
>
|
|
342
|
+
{resendTimer > 0
|
|
343
|
+
? `${text?.resendOtpCountdownText || DEFAULT_TEXT.resendOtpCountdownText} ${resendTimer}s`
|
|
344
|
+
: text?.resendOtpText || DEFAULT_TEXT.resendOtpText}
|
|
345
|
+
</Text>
|
|
346
|
+
)}
|
|
347
|
+
</View>
|
|
348
|
+
)}
|
|
314
349
|
</View>
|
|
315
350
|
</View>
|
|
316
|
-
</
|
|
317
|
-
</
|
|
351
|
+
</HideKeyboard>
|
|
352
|
+
</View>
|
|
318
353
|
</BackgroundLayout>
|
|
319
354
|
);
|
|
320
355
|
};
|
|
@@ -11,12 +11,13 @@ import { Button } from '../../Button';
|
|
|
11
11
|
import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
|
|
12
12
|
import { Logo } from '../../Logo/Logo';
|
|
13
13
|
import TextButton from '../../Button/TextButton';
|
|
14
|
-
import { useTheme } from '../../../theme';
|
|
14
|
+
import { useTheme } from '../../../theme/hook/useTheme';
|
|
15
15
|
import { useKeyboard } from '../../../hooks/useKeyboard';
|
|
16
16
|
import HideKeyboard from '../../Keyboard/HideKeyboard';
|
|
17
17
|
import BackBtn from '../../Button/BackBtn';
|
|
18
18
|
import { Text } from '../../Text';
|
|
19
19
|
import type { AppTheme } from '../../../theme/themes';
|
|
20
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
20
21
|
|
|
21
22
|
type FormValues = {
|
|
22
23
|
username: string;
|
|
@@ -37,11 +38,15 @@ export interface SignupProps {
|
|
|
37
38
|
inputContainerStyle?: ViewStyle;
|
|
38
39
|
topBackBtnStyle?: ViewStyle;
|
|
39
40
|
minPasswordLength?: number;
|
|
40
|
-
backgroundImage?:
|
|
41
|
+
backgroundImage?: {
|
|
42
|
+
source?: string | null;
|
|
43
|
+
onImageError?: (error: Error) => void;
|
|
44
|
+
gradientSplitBackground?: number;
|
|
45
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
|
|
46
|
+
};
|
|
41
47
|
logoUri?: string;
|
|
42
48
|
theme?: AppTheme;
|
|
43
49
|
loadingSubmitBtn?: boolean;
|
|
44
|
-
gradientEnabled?: boolean;
|
|
45
50
|
text?: {
|
|
46
51
|
usernameLabel?: string;
|
|
47
52
|
usernamePlaceholder?: string;
|
|
@@ -80,8 +85,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
80
85
|
loadingSubmitBtn,
|
|
81
86
|
backgroundImage,
|
|
82
87
|
logoUri,
|
|
83
|
-
theme,
|
|
84
|
-
gradientEnabled,
|
|
88
|
+
theme: overrideTheme,
|
|
85
89
|
text,
|
|
86
90
|
loginTextProps,
|
|
87
91
|
loginLinkTextProps,
|
|
@@ -105,8 +109,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
105
109
|
},
|
|
106
110
|
mode: 'onChange'
|
|
107
111
|
});
|
|
108
|
-
|
|
109
|
-
const { theme: appliedTheme } = useTheme(theme);
|
|
112
|
+
const { theme: resolvedTheme } = useTheme(overrideTheme);
|
|
110
113
|
const { isKeyboardOpen } = useKeyboard();
|
|
111
114
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
112
115
|
|
|
@@ -129,20 +132,24 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
129
132
|
|
|
130
133
|
return (
|
|
131
134
|
<BackgroundLayout
|
|
132
|
-
|
|
133
|
-
backgroundImage={backgroundImage}
|
|
134
|
-
|
|
135
|
+
theme={resolvedTheme}
|
|
136
|
+
backgroundImage={backgroundImage?.source}
|
|
137
|
+
gradientSplitBackground={isKeyboardOpen ? (Platform.OS === 'ios' ? 0.19 : 0.14) : 0.3}
|
|
135
138
|
>
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
-
renderTopBackBtn({
|
|
139
|
+
<View style={[styles.container, containerStyle]}>
|
|
140
|
+
{/* Top Back Button */}
|
|
141
|
+
{shouldRender(renderTopBackBtn || onTopBackBtnPress) && (
|
|
142
|
+
<View style={styles.topBackBtnWrapper}>
|
|
143
|
+
{renderTopBackBtn ? (
|
|
144
|
+
renderTopBackBtn({
|
|
145
|
+
onPress: onTopBackBtnPress ?? (() => {})
|
|
146
|
+
})
|
|
142
147
|
) : (
|
|
143
|
-
<BackBtn theme={
|
|
144
|
-
)
|
|
145
|
-
|
|
148
|
+
<BackBtn theme={resolvedTheme} style={topBackBtnStyle} onPress={onTopBackBtnPress} />
|
|
149
|
+
)}
|
|
150
|
+
</View>
|
|
151
|
+
)}
|
|
152
|
+
<HideKeyboard keyboardVerticalOffset={scale(-50)}>
|
|
146
153
|
<View style={styles.centerContent}>
|
|
147
154
|
{/* Logo */}
|
|
148
155
|
{renderLogo ? renderLogo() : logoUri ? <Logo logoUri={logoUri} /> : null}
|
|
@@ -172,7 +179,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
172
179
|
errorMessage={errors.username?.message}
|
|
173
180
|
inputStyle={inputStyle}
|
|
174
181
|
containerStyle={inputContainerStyle}
|
|
175
|
-
theme={
|
|
182
|
+
theme={resolvedTheme}
|
|
176
183
|
/>
|
|
177
184
|
)}
|
|
178
185
|
/>
|
|
@@ -203,7 +210,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
203
210
|
errorMessage={errors.email?.message}
|
|
204
211
|
inputStyle={inputStyle}
|
|
205
212
|
containerStyle={inputContainerStyle}
|
|
206
|
-
theme={
|
|
213
|
+
theme={resolvedTheme}
|
|
207
214
|
textContentType="emailAddress"
|
|
208
215
|
autoCapitalize="none"
|
|
209
216
|
keyboardType="email-address"
|
|
@@ -239,10 +246,12 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
239
246
|
error={!!touchedFields.password && !!errors.password}
|
|
240
247
|
errorMessage={errors.password?.message}
|
|
241
248
|
containerStyle={inputContainerStyle}
|
|
242
|
-
textContentType="
|
|
249
|
+
textContentType="none"
|
|
243
250
|
autoCapitalize="none"
|
|
251
|
+
spellCheck={false}
|
|
244
252
|
autoCorrect={false}
|
|
245
|
-
|
|
253
|
+
autoComplete="off"
|
|
254
|
+
theme={resolvedTheme}
|
|
246
255
|
/>
|
|
247
256
|
)}
|
|
248
257
|
/>
|
|
@@ -271,10 +280,12 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
271
280
|
errorMessage={errors.confirmPassword?.message}
|
|
272
281
|
inputStyle={inputStyle}
|
|
273
282
|
containerStyle={inputContainerStyle}
|
|
274
|
-
theme={
|
|
275
|
-
textContentType="
|
|
283
|
+
theme={resolvedTheme}
|
|
284
|
+
textContentType="none"
|
|
276
285
|
autoCapitalize="none"
|
|
286
|
+
spellCheck={false}
|
|
277
287
|
autoCorrect={false}
|
|
288
|
+
autoComplete="off"
|
|
278
289
|
/>
|
|
279
290
|
)}
|
|
280
291
|
/>
|
|
@@ -291,7 +302,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
291
302
|
<Button.Primary
|
|
292
303
|
title={text?.signupButton || 'Sign up'}
|
|
293
304
|
disabled={!isValid}
|
|
294
|
-
theme={
|
|
305
|
+
theme={resolvedTheme}
|
|
295
306
|
loading={loadingSubmitBtn || isLoading}
|
|
296
307
|
loadingText={text?.loadingSubmitBtnText || 'Signing up...'}
|
|
297
308
|
onPress={handleSubmit(handleFormSubmit)}
|
|
@@ -309,7 +320,7 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
309
320
|
<View style={styles.loginContainerWrapper}>
|
|
310
321
|
<View style={styles.loginContainer}>
|
|
311
322
|
<View style={styles.loginRow}>
|
|
312
|
-
<Text style={[styles.loginPrompt, loginTextProps]} color={
|
|
323
|
+
<Text style={[styles.loginPrompt, loginTextProps]} color={resolvedTheme?.colors?.textPrimary}>
|
|
313
324
|
{text?.loginPrompt || `Already have an account?`}
|
|
314
325
|
</Text>
|
|
315
326
|
<TextButton
|
|
@@ -322,15 +333,15 @@ const Signup: React.FC<SignupProps> = ({
|
|
|
322
333
|
}}
|
|
323
334
|
bold
|
|
324
335
|
underline
|
|
325
|
-
color={
|
|
336
|
+
color={resolvedTheme?.colors?.button}
|
|
326
337
|
style={loginLinkTextProps}
|
|
327
338
|
/>
|
|
328
339
|
</View>
|
|
329
340
|
</View>
|
|
330
341
|
</View>
|
|
331
342
|
))}
|
|
332
|
-
</
|
|
333
|
-
</
|
|
343
|
+
</HideKeyboard>
|
|
344
|
+
</View>
|
|
334
345
|
</BackgroundLayout>
|
|
335
346
|
);
|
|
336
347
|
};
|
|
@@ -345,13 +356,20 @@ const styles = StyleSheet.create({
|
|
|
345
356
|
justifyContent: 'center',
|
|
346
357
|
alignItems: 'center'
|
|
347
358
|
},
|
|
359
|
+
topBackBtnWrapper: {
|
|
360
|
+
position: 'absolute',
|
|
361
|
+
top: verticalScale(6),
|
|
362
|
+
left: 0,
|
|
363
|
+
zIndex: 10
|
|
364
|
+
},
|
|
348
365
|
centerContent: {
|
|
366
|
+
flex: 1,
|
|
349
367
|
width: '100%',
|
|
350
368
|
alignItems: 'center',
|
|
351
369
|
justifyContent: 'center'
|
|
352
370
|
},
|
|
353
371
|
title: {
|
|
354
|
-
fontSize:
|
|
372
|
+
fontSize: RFValue(21),
|
|
355
373
|
fontWeight: '700',
|
|
356
374
|
marginTop: verticalScale(5),
|
|
357
375
|
marginBottom: verticalScale(20)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Wed 30 Jul 2025 at 03:21 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { useEffect, useMemo, useCallback } from 'react';
|
|
7
|
+
import SplashImage from './components/SplashImage/SplashImage';
|
|
8
|
+
import SplashVideo from './components/SplashVideo/SplashVideo';
|
|
9
|
+
import SplashLottie from './components/SplashLottie/SplashLottie';
|
|
10
|
+
import { StatusBar, type ViewStyle } from 'react-native';
|
|
11
|
+
import type { AppTheme } from '../../../theme/themes';
|
|
12
|
+
import { useTheme } from '../../../theme';
|
|
13
|
+
import { useInitSplashCacheSync } from '../../../hooks/useInitSplashCacheSync';
|
|
14
|
+
import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
|
|
15
|
+
import Color from 'color';
|
|
16
|
+
type SplashSourceType = 'image' | 'video' | 'lottie-animation';
|
|
17
|
+
|
|
18
|
+
type SplashScreenConfig = {
|
|
19
|
+
source: string;
|
|
20
|
+
type?: SplashSourceType;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
isStatic?: boolean;
|
|
24
|
+
screenTime?: number;
|
|
25
|
+
fullscreen?: boolean;
|
|
26
|
+
resizeMode?: 'contain' | 'cover' | 'stretch' | 'repeat' | 'center';
|
|
27
|
+
backgroundColor?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type SplashScreenProps = {
|
|
31
|
+
splashScreenConfig: SplashScreenConfig;
|
|
32
|
+
innerContainerStyle?: ViewStyle;
|
|
33
|
+
onRedirect: () => void;
|
|
34
|
+
theme?: AppTheme;
|
|
35
|
+
backgroundImage?: {
|
|
36
|
+
source?: string | null;
|
|
37
|
+
onImageError?: (error: Error) => void;
|
|
38
|
+
gradientSplitBackground?: number;
|
|
39
|
+
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat';
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const DEFAULT_IMAGE_TIMEOUT_SECONDS = 5;
|
|
44
|
+
|
|
45
|
+
export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
46
|
+
splashScreenConfig: {
|
|
47
|
+
source: splashSource,
|
|
48
|
+
type: splashType = 'image',
|
|
49
|
+
width,
|
|
50
|
+
height,
|
|
51
|
+
isStatic = false,
|
|
52
|
+
screenTime,
|
|
53
|
+
fullscreen = false,
|
|
54
|
+
resizeMode = 'contain',
|
|
55
|
+
backgroundColor: splashBackgroundColor
|
|
56
|
+
},
|
|
57
|
+
innerContainerStyle,
|
|
58
|
+
backgroundImage = {
|
|
59
|
+
gradientSplitBackground: 0.4,
|
|
60
|
+
resizeMode: 'cover'
|
|
61
|
+
},
|
|
62
|
+
onRedirect,
|
|
63
|
+
theme: overrideTheme
|
|
64
|
+
}) => {
|
|
65
|
+
const isRemoteSource = useMemo(() => splashSource.startsWith('http'), [splashSource]);
|
|
66
|
+
const { theme: resolvedTheme } = useTheme(overrideTheme);
|
|
67
|
+
|
|
68
|
+
const isImageSplash = splashType === 'image';
|
|
69
|
+
const backgroundImageUri =
|
|
70
|
+
isImageSplash && backgroundImage.source?.startsWith('http') ? backgroundImage.source : undefined;
|
|
71
|
+
|
|
72
|
+
const {
|
|
73
|
+
data: { localPathLogo }
|
|
74
|
+
} = useInitSplashCacheSync({
|
|
75
|
+
logoUrl: isRemoteSource ? splashSource : undefined,
|
|
76
|
+
backgroundUrl: backgroundImageUri
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const resolvedSplashUri = isRemoteSource && localPathLogo ? localPathLogo : splashSource;
|
|
80
|
+
const effectiveTimeout = useMemo(() => {
|
|
81
|
+
const timeout = screenTime ?? (isImageSplash || isStatic ? DEFAULT_IMAGE_TIMEOUT_SECONDS : 0);
|
|
82
|
+
return Number.isFinite(timeout) ? Number(timeout) : 0;
|
|
83
|
+
}, [screenTime, isImageSplash, isStatic]);
|
|
84
|
+
|
|
85
|
+
const handleRedirect = useCallback(() => {
|
|
86
|
+
try {
|
|
87
|
+
onRedirect();
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.error('[SplashScreen] Redirect error:', err);
|
|
90
|
+
}
|
|
91
|
+
}, [onRedirect]);
|
|
92
|
+
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const fallbackTimeout = 0.5; // fallback to 0.5s even if 0
|
|
95
|
+
const timeout = effectiveTimeout > 0 ? effectiveTimeout : fallbackTimeout;
|
|
96
|
+
const timer = setTimeout(() => {
|
|
97
|
+
handleRedirect();
|
|
98
|
+
}, timeout * 1000);
|
|
99
|
+
return () => {
|
|
100
|
+
clearTimeout(timer);
|
|
101
|
+
};
|
|
102
|
+
}, [effectiveTimeout, handleRedirect]);
|
|
103
|
+
|
|
104
|
+
const splashComponentProps = useMemo(
|
|
105
|
+
() => ({
|
|
106
|
+
source: resolvedSplashUri,
|
|
107
|
+
width,
|
|
108
|
+
height,
|
|
109
|
+
fullscreen,
|
|
110
|
+
resizeMode: resizeMode as any
|
|
111
|
+
}),
|
|
112
|
+
[resolvedSplashUri, width, height, fullscreen, resizeMode]
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const renderSplashContent = useCallback(() => {
|
|
116
|
+
switch (splashType) {
|
|
117
|
+
case 'video':
|
|
118
|
+
return <SplashVideo {...splashComponentProps} onEnd={effectiveTimeout ? undefined : handleRedirect} />;
|
|
119
|
+
case 'lottie-animation':
|
|
120
|
+
return (
|
|
121
|
+
<SplashLottie {...splashComponentProps} onAnimationFinish={effectiveTimeout ? undefined : handleRedirect} />
|
|
122
|
+
);
|
|
123
|
+
case 'image':
|
|
124
|
+
default:
|
|
125
|
+
return <SplashImage {...splashComponentProps} />;
|
|
126
|
+
}
|
|
127
|
+
}, [splashType, splashComponentProps, effectiveTimeout, handleRedirect]);
|
|
128
|
+
const getSafeBackgroundColor = (inputColor: string | undefined, fallbackColor: string): string => {
|
|
129
|
+
try {
|
|
130
|
+
if (!inputColor) return fallbackColor;
|
|
131
|
+
|
|
132
|
+
const parsedColor = Color(inputColor);
|
|
133
|
+
const alpha = parsedColor.alpha(); // 0 to 1
|
|
134
|
+
|
|
135
|
+
if (alpha < 0.8) return fallbackColor; // ✅ your condition
|
|
136
|
+
|
|
137
|
+
return parsedColor.hex(); // Always convert to solid hex
|
|
138
|
+
} catch (e) {
|
|
139
|
+
return fallbackColor;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const colorToUse = getSafeBackgroundColor(splashBackgroundColor, resolvedTheme.colors.background);
|
|
143
|
+
const isDark = Color(colorToUse).isDark();
|
|
144
|
+
const statusBarStyle: 'light-content' | 'dark-content' = isDark ? 'light-content' : 'dark-content';
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<BackgroundLayout
|
|
148
|
+
backgroundImage={isImageSplash ? backgroundImage.source : undefined}
|
|
149
|
+
backgroundColor={splashBackgroundColor}
|
|
150
|
+
resizeMode={backgroundImage.resizeMode ?? 'cover'}
|
|
151
|
+
innerContainerStyle={innerContainerStyle}
|
|
152
|
+
onImageError={backgroundImage.onImageError}
|
|
153
|
+
theme={resolvedTheme}
|
|
154
|
+
gradientSplitBackground={backgroundImage.gradientSplitBackground ?? 0.4}
|
|
155
|
+
>
|
|
156
|
+
<StatusBar translucent backgroundColor="transparent" barStyle={statusBarStyle} />
|
|
157
|
+
|
|
158
|
+
{renderSplashContent()}
|
|
159
|
+
</BackgroundLayout>
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
namespace SplashScreen {
|
|
164
|
+
export type Config = SplashScreenConfig;
|
|
165
|
+
export type Props = SplashScreenProps;
|
|
166
|
+
}
|