@zezosoft/zezo-ott-react-native-ui-kit 1.3.6 → 1.3.7
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 +40 -36
- package/package.json +1 -3
- package/src/assets/animations/135037-payment-processing-error.json +0 -1347
- package/src/assets/animations/7227-vui-animation.json +0 -3377
- package/src/assets/animations/Failed.json +0 -2103
- package/src/assets/animations/Pending.json +0 -522
- package/src/assets/animations/Successful.json +0 -2289
- package/src/assets/animations/heart.json +0 -788
- package/src/assets/animations/succesfull-payment.json +0 -2379
- package/src/assets/animations/voice-icon.json +0 -542
- package/src/assets/img/back.png +0 -0
- package/src/assets/img/bottom-panel.png +0 -0
- package/src/assets/img/camera.png +0 -0
- package/src/assets/img/camera2.png +0 -0
- package/src/assets/img/home.png +0 -0
- package/src/assets/img/lock.png +0 -0
- package/src/assets/img/play.png +0 -0
- package/src/assets/img/profile.jpg +0 -0
- package/src/assets/img/qr-code.png +0 -0
- package/src/assets/img/shadow.png +0 -0
- package/src/assets/img/shadow2.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/svg/Account.svg +0 -4
- package/src/assets/svg/Favourite.svg +0 -14
- package/src/assets/svg/Upcoming.svg +0 -4
- package/src/assets/svg/content-error.svg +0 -28
- package/src/assets/svg/download.svg +0 -3
- package/src/assets/svg/eye-off.svg +0 -10
- package/src/assets/svg/favorites.svg +0 -3
- package/src/assets/svg/h.svg +0 -4
- package/src/assets/svg/home.svg +0 -5
- package/src/assets/svg/home1.svg +0 -3
- package/src/assets/svg/menu-bar.svg +0 -4
- package/src/assets/svg/my-space.svg +0 -14
- package/src/assets/svg/play-icon-with-bg.svg +0 -5
- package/src/assets/svg/profile.svg +0 -4
- package/src/assets/svg/search.svg +0 -5
- package/src/assets/svg/search1.svg +0 -4
- package/src/assets/svg/server-error.svg +0 -139
- package/src/components/Account/Account.tsx +0 -354
- package/src/components/Account/index.ts +0 -6
- package/src/components/Alert/AlertDialog.tsx +0 -253
- package/src/components/Alert/UAAlert.tsx +0 -176
- package/src/components/Alert/index.ts +0 -7
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +0 -412
- package/src/components/Auth/One/ForgotPassword/ForgotPassword.tsx +0 -333
- package/src/components/Auth/One/Login/LoginWithEmail.tsx +0 -449
- package/src/components/Auth/One/Login/LoginWithPhone.tsx +0 -309
- package/src/components/Auth/One/OTP/OTP.tsx +0 -539
- package/src/components/Auth/One/QrLogin/QrLogin.tsx +0 -329
- package/src/components/Auth/One/QrLogin/components/index.ts +0 -8
- package/src/components/Auth/One/QrLogin/components/qr-scanner-fallback.tsx +0 -158
- package/src/components/Auth/One/QrLogin/components/qr-scanner-frame.tsx +0 -207
- package/src/components/Auth/One/QrLogin/components/qr-scanner-header.tsx +0 -65
- package/src/components/Auth/One/QrLogin/components/qr-scanner-intro.tsx +0 -255
- package/src/components/Auth/One/QrLogin/components/qr-scanner-overlay.tsx +0 -291
- package/src/components/Auth/One/SignUp/SignUp.tsx +0 -470
- package/src/components/Auth/One/SplashScreen/SplashScreen.tsx +0 -229
- package/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.tsx +0 -92
- package/src/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -129
- package/src/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -172
- package/src/components/Auth/One/SplashScreen/utils/splashUtils.ts +0 -23
- package/src/components/Auth/One/index.ts +0 -24
- package/src/components/Auth/Two/AuthHeader/AuthHeader.tsx +0 -130
- package/src/components/Auth/Two/ForgotPassword/ForgotPassword.tsx +0 -331
- package/src/components/Auth/Two/Login/EmailOrPhoneLogin.tsx +0 -612
- package/src/components/Auth/Two/OTP/OTP.tsx +0 -504
- package/src/components/Auth/Two/SignUp/SignUp.tsx +0 -439
- package/src/components/Auth/Two/index.ts +0 -20
- package/src/components/Auth/index.ts +0 -16
- package/src/components/BackgroundLayout/One/One.tsx +0 -184
- package/src/components/BackgroundLayout/Two/Two.tsx +0 -65
- package/src/components/BackgroundLayout/index.ts +0 -14
- package/src/components/BlogView/BlogView.tsx +0 -282
- package/src/components/BlogView/index.ts +0 -8
- package/src/components/BlurView/BlurView.tsx +0 -199
- package/src/components/BlurView/index.ts +0 -7
- package/src/components/BottomSheet/BottomSheet.tsx +0 -204
- package/src/components/BottomSheet/BottomSheetOne.tsx +0 -223
- package/src/components/BottomSheet/index.ts +0 -9
- package/src/components/Button/BackBtn.tsx +0 -149
- package/src/components/Button/MenuBtn.tsx +0 -220
- package/src/components/Button/PrimaryBtn.tsx +0 -123
- package/src/components/Button/SecondaryBtn.tsx +0 -123
- package/src/components/Button/TextButton.tsx +0 -150
- package/src/components/Button/index.ts +0 -18
- package/src/components/Button/types.ts +0 -33
- package/src/components/Content/Card/Category/Category.tsx +0 -436
- package/src/components/Content/Card/Category/CategroyTwo.tsx +0 -429
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +0 -607
- package/src/components/Content/Card/Sliders/Styles/One.tsx +0 -490
- package/src/components/Content/Card/Sliders/Styles/Three.tsx +0 -1017
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +0 -395
- package/src/components/Content/Card/Sliders/index.ts +0 -18
- package/src/components/Content/Card/Styles/Five.tsx +0 -367
- package/src/components/Content/Card/Styles/Four.tsx +0 -366
- package/src/components/Content/Card/Styles/One.tsx +0 -372
- package/src/components/Content/Card/Styles/RotateInOut.tsx +0 -413
- package/src/components/Content/Card/Styles/Six.tsx +0 -378
- package/src/components/Content/Card/Styles/Three.tsx +0 -312
- package/src/components/Content/Card/Styles/TopTen.tsx +0 -402
- package/src/components/Content/Card/Styles/Two.tsx +0 -404
- package/src/components/Content/Card/components/AdsPoster.tsx +0 -207
- package/src/components/Content/Card/components/CardPoster.tsx +0 -377
- package/src/components/Content/Card/components/LiveBadge.tsx +0 -125
- package/src/components/Content/Card/components/NavigateToMore.tsx +0 -97
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +0 -134
- package/src/components/Content/Card/components/ShowAllButton.tsx +0 -92
- package/src/components/Content/Card/components/ThumbnailCard.tsx +0 -219
- package/src/components/Content/Card/components/index.ts +0 -12
- package/src/components/Content/Card/index.ts +0 -31
- package/src/components/Content/Content.tsx +0 -338
- package/src/components/Content/Sections.tsx +0 -239
- package/src/components/Content/types.ts +0 -180
- package/src/components/ContentView/MoreContentList.tsx +0 -330
- package/src/components/ContentView/One/ContentViewOne.tsx +0 -251
- package/src/components/ContentView/One/components/CastCard.tsx +0 -266
- package/src/components/ContentView/One/components/HeroBanner.tsx +0 -413
- package/src/components/ContentView/One/components/MiniInfo.tsx +0 -343
- package/src/components/ContentView/One/components/Title.tsx +0 -149
- package/src/components/ContentView/Two/ContentViewTwo.tsx +0 -332
- package/src/components/ContentView/Two/components/Details.tsx +0 -196
- package/src/components/ContentView/Two/components/HeroBanner.tsx +0 -267
- package/src/components/ContentView/Two/components/LikeShareActions.tsx +0 -125
- package/src/components/ContentView/Two/components/MoreLikeThisContentList .tsx +0 -308
- package/src/components/ContentView/Two/components/PlayOrTrailer.tsx +0 -162
- package/src/components/ContentView/Two/components/SectionTabs.tsx +0 -181
- package/src/components/ContentView/Two/components/Title.tsx +0 -229
- package/src/components/ContentView/Two/components/index.ts +0 -12
- package/src/components/ContentView/index.ts +0 -13
- package/src/components/ContentView/shared/AboutSection.tsx +0 -226
- package/src/components/ContentView/shared/EpisodeCard.tsx +0 -600
- package/src/components/ContentView/shared/GenreTags.tsx +0 -189
- package/src/components/ContentView/shared/PlayButton.tsx +0 -52
- package/src/components/ContentView/shared/TrailerButton.tsx +0 -76
- package/src/components/Fallbacks/NoContentFallback.tsx +0 -175
- package/src/components/Fallbacks/NotFoundFallback.tsx +0 -94
- package/src/components/Fallbacks/index.ts +0 -7
- package/src/components/Headers/AppHeader.tsx +0 -151
- package/src/components/Headers/Four.tsx +0 -84
- package/src/components/Headers/One.tsx +0 -115
- package/src/components/Headers/Three.tsx +0 -137
- package/src/components/Headers/Two.tsx +0 -101
- package/src/components/Headers/index.ts +0 -34
- package/src/components/Input/Input.ts +0 -18
- package/src/components/Input/InputOne.tsx +0 -265
- package/src/components/Input/InputThree.tsx +0 -205
- package/src/components/Input/InputTwo.tsx +0 -217
- package/src/components/Input/PhoneInput/One/One.tsx +0 -415
- package/src/components/Input/PhoneInput/Two/Two.tsx +0 -406
- package/src/components/Input/PhoneInput/index.ts +0 -14
- package/src/components/Keyboard/HideKeyboard.tsx +0 -91
- package/src/components/Loader/Loader.tsx +0 -49
- package/src/components/Logo/Logo.tsx +0 -150
- package/src/components/NewRelease/NewReleaseSheet.tsx +0 -260
- package/src/components/NewRelease/index.ts +0 -6
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +0 -226
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +0 -324
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +0 -201
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +0 -100
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +0 -168
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +0 -207
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +0 -151
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +0 -159
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +0 -278
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +0 -569
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +0 -189
- package/src/components/Reels/ReelsSeries/components/Episodes.tsx +0 -159
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +0 -46
- package/src/components/Reels/ReelsSeries/components/Like.tsx +0 -45
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +0 -84
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +0 -338
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +0 -185
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +0 -77
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +0 -7
- package/src/components/Reels/ReelsSeries/types.ts +0 -78
- package/src/components/Reels/ReelsSeries/useReelsWatchProgress.ts +0 -90
- package/src/components/Reels/ReelsSeries/utils/quality.ts +0 -72
- package/src/components/Reels/index.ts +0 -9
- package/src/components/Reels/utils/Controls/gestureUtils.ts +0 -46
- package/src/components/Reels/utils/Controls/index.ts +0 -9
- package/src/components/Reels/utils/Controls/overlayUtils.ts +0 -40
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +0 -30
- package/src/components/Reels/utils/Controls/videoRef.ts +0 -9
- package/src/components/Reels/utils/index.ts +0 -6
- package/src/components/Reels/utils/timeoutUtils.ts +0 -34
- package/src/components/Search/One.tsx +0 -262
- package/src/components/Search/components/RecentSearchesSection.tsx +0 -181
- package/src/components/Search/components/SearchCard.tsx +0 -285
- package/src/components/Search/index.ts +0 -16
- package/src/components/Settings/AppSettings.tsx +0 -442
- package/src/components/Settings/index.ts +0 -6
- package/src/components/Subscription/SubOne.tsx +0 -423
- package/src/components/Subscription/components/SubsDetailsModal.tsx +0 -347
- package/src/components/Subscription/components/SubscriptionCard.tsx +0 -342
- package/src/components/Subscription/index.ts +0 -12
- package/src/components/TabBar/One.tsx +0 -145
- package/src/components/TabBar/Three.tsx +0 -162
- package/src/components/TabBar/Two.tsx +0 -179
- package/src/components/TabBar/index.ts +0 -20
- package/src/components/Text/Text.tsx +0 -90
- package/src/components/Text/index.ts +0 -6
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +0 -468
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +0 -293
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +0 -504
- package/src/components/User/WatchHistory/WatchHistory.tsx +0 -214
- package/src/components/User/WatchLater/WatchLater.tsx +0 -400
- package/src/components/User/components/UserAvatar.tsx +0 -121
- package/src/components/User/components/UserSection.tsx +0 -218
- package/src/components/User/index.ts +0 -18
- package/src/components/View/View.tsx +0 -38
- package/src/components/View/index.ts +0 -6
- package/src/components/common/AppStatusBar.tsx +0 -57
- package/src/components/common/index.ts +0 -1
- package/src/components/index.ts +0 -30
- package/src/components/layout/SafeAreaWrapper.tsx +0 -50
- package/src/components/layout/index.ts +0 -6
- package/src/constants/dummySections.ts +0 -103
- package/src/hooks/Images/index.ts +0 -6
- package/src/hooks/Images/useImageLoader.ts +0 -209
- package/src/hooks/index.ts +0 -16
- package/src/hooks/useAdTracking.ts +0 -354
- package/src/hooks/useCards.ts +0 -247
- package/src/hooks/useDebounce.ts +0 -40
- package/src/hooks/useKeyboard.ts +0 -43
- package/src/hooks/useNavigationMode.ts +0 -48
- package/src/hooks/usePaginatedSection.ts +0 -108
- package/src/hooks/usePrevious.ts +0 -28
- package/src/hooks/useSafeCallback.ts +0 -29
- package/src/hooks/useSkeletonItems.ts +0 -30
- package/src/hooks/useSplashCache.ts +0 -245
- package/src/index.tsx +0 -9
- package/src/store/RecentSearchesStore.ts +0 -72
- package/src/store/splashStore.ts +0 -86
- package/src/store/storage.ts +0 -29
- package/src/theme/ThemeContext.ts +0 -19
- package/src/theme/ThemeProvider.tsx +0 -87
- package/src/theme/hooks/index.ts +0 -6
- package/src/theme/hooks/useTheme.ts +0 -118
- package/src/theme/index.ts +0 -8
- package/src/theme/store/theme.ts +0 -50
- package/src/theme/themes.ts +0 -262
- package/src/theme/utils/cleanColors.ts +0 -71
- package/src/theme/utils/toRgba.ts +0 -150
- package/src/types/content/content-view.types.ts +0 -209
- package/src/types/hook/index.ts +0 -6
- package/src/types/hook/usePaginatedSection.ts +0 -20
- package/src/types/index.ts +0 -10
- package/src/types/navigation.ts +0 -17
- package/src/types/sections/index.ts +0 -87
- package/src/types/user.ts +0 -18
- package/src/utils/Display.ts +0 -15
- package/src/utils/Formater.ts +0 -33
- package/src/utils/SizeMatters.ts +0 -8
- package/src/utils/Spacing.ts +0 -27
- package/src/utils/colorUtils.ts +0 -70
- package/src/utils/imageValidation.ts +0 -36
- package/src/utils/interaction.ts +0 -19
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @LastModified Mon 13 Jul 2026 at 10:13 AM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useCallback, useMemo } from 'react';
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
|
-
import {
|
|
9
|
-
TouchableOpacity,
|
|
10
|
-
StyleSheet,
|
|
11
|
-
View,
|
|
12
|
-
ScrollView,
|
|
13
|
-
Dimensions,
|
|
14
|
-
} from 'react-native';
|
|
15
|
-
import type { ViewStyle, StyleProp } from 'react-native';
|
|
16
|
-
import Modal from 'react-native-modal';
|
|
17
|
-
import { X } from 'lucide-react-native';
|
|
18
|
-
import { moderateScale, verticalScale } from 'react-native-size-matters';
|
|
19
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
20
|
-
import type { ITheme } from '../../theme';
|
|
21
|
-
import { Text } from '../Text';
|
|
22
|
-
|
|
23
|
-
const { height: SCREEN_HEIGHT } = Dimensions.get('window');
|
|
24
|
-
|
|
25
|
-
export interface BottomSheetProps {
|
|
26
|
-
theme: ITheme;
|
|
27
|
-
children: ReactNode;
|
|
28
|
-
title?: string;
|
|
29
|
-
height?: string | number;
|
|
30
|
-
showCloseButton?: boolean;
|
|
31
|
-
visible?: boolean;
|
|
32
|
-
onClose?: () => void;
|
|
33
|
-
handleIndicatorStyle?: StyleProp<ViewStyle>;
|
|
34
|
-
scrollable?: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const BottomSheet: React.FC<BottomSheetProps> = ({
|
|
38
|
-
theme,
|
|
39
|
-
children,
|
|
40
|
-
title,
|
|
41
|
-
height,
|
|
42
|
-
showCloseButton = true,
|
|
43
|
-
visible = false,
|
|
44
|
-
onClose,
|
|
45
|
-
handleIndicatorStyle,
|
|
46
|
-
scrollable = true,
|
|
47
|
-
}) => {
|
|
48
|
-
const calculatedHeight = useMemo(() => {
|
|
49
|
-
if (!height) return SCREEN_HEIGHT * 0.75;
|
|
50
|
-
|
|
51
|
-
if (typeof height === 'number') return height;
|
|
52
|
-
|
|
53
|
-
if (typeof height === 'string' && height.includes('%')) {
|
|
54
|
-
const num = parseFloat(height);
|
|
55
|
-
if (!isNaN(num)) {
|
|
56
|
-
return (num / 100) * SCREEN_HEIGHT;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return SCREEN_HEIGHT * 0.75;
|
|
61
|
-
}, [height]);
|
|
62
|
-
|
|
63
|
-
const handleClosePress = useCallback(() => {
|
|
64
|
-
onClose?.();
|
|
65
|
-
}, [onClose]);
|
|
66
|
-
|
|
67
|
-
const renderHeader = useMemo(() => {
|
|
68
|
-
if (title) {
|
|
69
|
-
return (
|
|
70
|
-
<Text style={[styles.title, { color: theme.colors.textPrimary }]}>
|
|
71
|
-
{title}
|
|
72
|
-
</Text>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
return null;
|
|
76
|
-
}, [title, theme.colors.textPrimary]);
|
|
77
|
-
|
|
78
|
-
const renderCloseButton = useMemo(() => {
|
|
79
|
-
if (!showCloseButton) return null;
|
|
80
|
-
return (
|
|
81
|
-
<TouchableOpacity
|
|
82
|
-
onPress={handleClosePress}
|
|
83
|
-
style={[
|
|
84
|
-
styles.closeButtonWrapper,
|
|
85
|
-
{ backgroundColor: theme.colors.button },
|
|
86
|
-
]}
|
|
87
|
-
activeOpacity={0.8}
|
|
88
|
-
>
|
|
89
|
-
<X size={moderateScale(16)} color={theme.colors.buttonText} />
|
|
90
|
-
</TouchableOpacity>
|
|
91
|
-
);
|
|
92
|
-
}, [showCloseButton, handleClosePress, theme.colors]);
|
|
93
|
-
|
|
94
|
-
return (
|
|
95
|
-
<Modal
|
|
96
|
-
isVisible={visible}
|
|
97
|
-
onBackdropPress={handleClosePress}
|
|
98
|
-
onBackButtonPress={handleClosePress}
|
|
99
|
-
onSwipeComplete={handleClosePress}
|
|
100
|
-
style={styles.modal}
|
|
101
|
-
backdropOpacity={0.45}
|
|
102
|
-
animationIn="slideInUp"
|
|
103
|
-
animationOut="slideOutDown"
|
|
104
|
-
animationInTiming={260}
|
|
105
|
-
animationOutTiming={220}
|
|
106
|
-
backdropTransitionInTiming={200}
|
|
107
|
-
backdropTransitionOutTiming={180}
|
|
108
|
-
useNativeDriver
|
|
109
|
-
useNativeDriverForBackdrop
|
|
110
|
-
propagateSwipe
|
|
111
|
-
avoidKeyboard
|
|
112
|
-
statusBarTranslucent={false}
|
|
113
|
-
hardwareAccelerated
|
|
114
|
-
hideModalContentWhileAnimating={false}
|
|
115
|
-
deviceHeight={SCREEN_HEIGHT}
|
|
116
|
-
>
|
|
117
|
-
<View
|
|
118
|
-
style={[
|
|
119
|
-
styles.bottomSheetContainer,
|
|
120
|
-
{
|
|
121
|
-
backgroundColor: theme.colors.background,
|
|
122
|
-
maxHeight: calculatedHeight,
|
|
123
|
-
},
|
|
124
|
-
]}
|
|
125
|
-
>
|
|
126
|
-
{renderCloseButton}
|
|
127
|
-
<View
|
|
128
|
-
style={[
|
|
129
|
-
styles.handleIndicator,
|
|
130
|
-
{ backgroundColor: theme.colors.button },
|
|
131
|
-
handleIndicatorStyle,
|
|
132
|
-
]}
|
|
133
|
-
/>
|
|
134
|
-
|
|
135
|
-
{scrollable ? (
|
|
136
|
-
<ScrollView
|
|
137
|
-
showsVerticalScrollIndicator={false}
|
|
138
|
-
bounces={false}
|
|
139
|
-
nestedScrollEnabled
|
|
140
|
-
keyboardShouldPersistTaps="handled"
|
|
141
|
-
contentContainerStyle={styles.scrollContent}
|
|
142
|
-
>
|
|
143
|
-
{renderHeader}
|
|
144
|
-
{children}
|
|
145
|
-
</ScrollView>
|
|
146
|
-
) : (
|
|
147
|
-
<View style={styles.viewContent}>
|
|
148
|
-
{renderHeader}
|
|
149
|
-
{children}
|
|
150
|
-
</View>
|
|
151
|
-
)}
|
|
152
|
-
</View>
|
|
153
|
-
</Modal>
|
|
154
|
-
);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export default BottomSheet;
|
|
158
|
-
|
|
159
|
-
const styles = StyleSheet.create({
|
|
160
|
-
modal: {
|
|
161
|
-
justifyContent: 'flex-end',
|
|
162
|
-
margin: 0,
|
|
163
|
-
},
|
|
164
|
-
bottomSheetContainer: {
|
|
165
|
-
borderTopLeftRadius: moderateScale(22),
|
|
166
|
-
borderTopRightRadius: moderateScale(22),
|
|
167
|
-
overflow: 'hidden',
|
|
168
|
-
position: 'relative',
|
|
169
|
-
flex: 1,
|
|
170
|
-
minHeight: 0,
|
|
171
|
-
},
|
|
172
|
-
handleIndicator: {
|
|
173
|
-
width: moderateScale(45),
|
|
174
|
-
height: verticalScale(4),
|
|
175
|
-
borderRadius: moderateScale(3),
|
|
176
|
-
alignSelf: 'center',
|
|
177
|
-
marginVertical: verticalScale(10),
|
|
178
|
-
},
|
|
179
|
-
scrollContent: {
|
|
180
|
-
flexGrow: 1,
|
|
181
|
-
paddingBottom: verticalScale(30),
|
|
182
|
-
paddingHorizontal: moderateScale(12),
|
|
183
|
-
},
|
|
184
|
-
viewContent: {
|
|
185
|
-
paddingBottom: verticalScale(10),
|
|
186
|
-
paddingHorizontal: moderateScale(12),
|
|
187
|
-
flex: 1,
|
|
188
|
-
},
|
|
189
|
-
closeButtonWrapper: {
|
|
190
|
-
position: 'absolute',
|
|
191
|
-
top: verticalScale(10),
|
|
192
|
-
right: moderateScale(14),
|
|
193
|
-
borderRadius: moderateScale(18),
|
|
194
|
-
padding: moderateScale(6),
|
|
195
|
-
zIndex: 1000,
|
|
196
|
-
elevation: 10,
|
|
197
|
-
},
|
|
198
|
-
title: {
|
|
199
|
-
fontSize: RFValue(16),
|
|
200
|
-
fontWeight: '700',
|
|
201
|
-
textAlign: 'center',
|
|
202
|
-
marginBottom: verticalScale(15),
|
|
203
|
-
},
|
|
204
|
-
});
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @LastModified Mon 13 Jul 2026 at 10:13 AM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useCallback, useMemo } from 'react';
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
|
-
import {
|
|
9
|
-
TouchableOpacity,
|
|
10
|
-
StyleSheet,
|
|
11
|
-
View,
|
|
12
|
-
ScrollView,
|
|
13
|
-
Dimensions,
|
|
14
|
-
ImageBackground,
|
|
15
|
-
Platform,
|
|
16
|
-
} from 'react-native';
|
|
17
|
-
import type { ViewStyle, StyleProp } from 'react-native';
|
|
18
|
-
import Modal from 'react-native-modal';
|
|
19
|
-
import { X } from 'lucide-react-native';
|
|
20
|
-
import { moderateScale, verticalScale } from 'react-native-size-matters';
|
|
21
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
22
|
-
import type { ITheme } from '../../theme';
|
|
23
|
-
import { Text } from '../Text';
|
|
24
|
-
import FastImage from 'react-native-fast-image';
|
|
25
|
-
|
|
26
|
-
const { height: SCREEN_HEIGHT } = Dimensions.get('window');
|
|
27
|
-
|
|
28
|
-
export interface BottomSheetOneProps {
|
|
29
|
-
theme: ITheme;
|
|
30
|
-
children: ReactNode;
|
|
31
|
-
backgroundImage?: string;
|
|
32
|
-
title?: string;
|
|
33
|
-
height?: string | number;
|
|
34
|
-
showCloseButton?: boolean;
|
|
35
|
-
visible?: boolean;
|
|
36
|
-
onClose?: () => void;
|
|
37
|
-
handleIndicatorStyle?: StyleProp<ViewStyle>;
|
|
38
|
-
scrollable?: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const BottomSheetOne: React.FC<BottomSheetOneProps> = ({
|
|
42
|
-
theme,
|
|
43
|
-
children,
|
|
44
|
-
title,
|
|
45
|
-
height,
|
|
46
|
-
backgroundImage,
|
|
47
|
-
showCloseButton = true,
|
|
48
|
-
visible = false,
|
|
49
|
-
onClose,
|
|
50
|
-
handleIndicatorStyle,
|
|
51
|
-
scrollable = true,
|
|
52
|
-
}) => {
|
|
53
|
-
const calculatedHeight = useMemo(() => {
|
|
54
|
-
if (!height) return SCREEN_HEIGHT * 0.75;
|
|
55
|
-
|
|
56
|
-
if (typeof height === 'number') return height;
|
|
57
|
-
|
|
58
|
-
if (typeof height === 'string' && height.includes('%')) {
|
|
59
|
-
const num = parseFloat(height);
|
|
60
|
-
if (!isNaN(num)) {
|
|
61
|
-
return (num / 100) * SCREEN_HEIGHT;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return SCREEN_HEIGHT * 0.75;
|
|
66
|
-
}, [height]);
|
|
67
|
-
|
|
68
|
-
const handleClosePress = useCallback(() => {
|
|
69
|
-
onClose?.();
|
|
70
|
-
}, [onClose]);
|
|
71
|
-
|
|
72
|
-
const renderHeader = useMemo(() => {
|
|
73
|
-
if (title) {
|
|
74
|
-
return (
|
|
75
|
-
<Text style={[styles.title, { color: theme.colors.textPrimary }]}>
|
|
76
|
-
{title}
|
|
77
|
-
</Text>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}, [title, theme.colors.textPrimary]);
|
|
82
|
-
|
|
83
|
-
const renderCloseButton = useMemo(() => {
|
|
84
|
-
if (!showCloseButton) return null;
|
|
85
|
-
return (
|
|
86
|
-
<TouchableOpacity
|
|
87
|
-
onPress={handleClosePress}
|
|
88
|
-
style={[
|
|
89
|
-
styles.closeButtonWrapper,
|
|
90
|
-
{ backgroundColor: theme.colors.black },
|
|
91
|
-
]}
|
|
92
|
-
activeOpacity={0.8}
|
|
93
|
-
>
|
|
94
|
-
<X size={moderateScale(22)} color={theme.colors.white} />
|
|
95
|
-
</TouchableOpacity>
|
|
96
|
-
);
|
|
97
|
-
}, [showCloseButton, handleClosePress, theme.colors]);
|
|
98
|
-
|
|
99
|
-
return (
|
|
100
|
-
<Modal
|
|
101
|
-
isVisible={visible}
|
|
102
|
-
onBackdropPress={handleClosePress}
|
|
103
|
-
onSwipeComplete={handleClosePress}
|
|
104
|
-
style={styles.modal}
|
|
105
|
-
backdropOpacity={0.45}
|
|
106
|
-
animationIn="slideInUp"
|
|
107
|
-
animationOut="slideOutDown"
|
|
108
|
-
animationInTiming={260}
|
|
109
|
-
animationOutTiming={220}
|
|
110
|
-
useNativeDriver
|
|
111
|
-
useNativeDriverForBackdrop
|
|
112
|
-
propagateSwipe
|
|
113
|
-
avoidKeyboard
|
|
114
|
-
statusBarTranslucent={false}
|
|
115
|
-
hardwareAccelerated
|
|
116
|
-
>
|
|
117
|
-
<View
|
|
118
|
-
style={[
|
|
119
|
-
styles.bottomSheetContainer,
|
|
120
|
-
{
|
|
121
|
-
backgroundColor: theme.colors.background,
|
|
122
|
-
height: calculatedHeight,
|
|
123
|
-
},
|
|
124
|
-
]}
|
|
125
|
-
>
|
|
126
|
-
{backgroundImage && (
|
|
127
|
-
<>
|
|
128
|
-
<ImageBackground
|
|
129
|
-
source={{ uri: backgroundImage }}
|
|
130
|
-
style={[
|
|
131
|
-
StyleSheet.absoluteFill,
|
|
132
|
-
{ backgroundColor: theme.colors.background },
|
|
133
|
-
]}
|
|
134
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
135
|
-
blurRadius={Platform.OS === 'ios' ? 15 : 25}
|
|
136
|
-
/>
|
|
137
|
-
<View style={styles.backgroundOverlay} />
|
|
138
|
-
</>
|
|
139
|
-
)}
|
|
140
|
-
|
|
141
|
-
{renderCloseButton}
|
|
142
|
-
|
|
143
|
-
<View
|
|
144
|
-
style={[
|
|
145
|
-
styles.handleIndicator,
|
|
146
|
-
{ backgroundColor: theme.colors.textSecondary },
|
|
147
|
-
handleIndicatorStyle,
|
|
148
|
-
]}
|
|
149
|
-
/>
|
|
150
|
-
|
|
151
|
-
{scrollable ? (
|
|
152
|
-
<ScrollView
|
|
153
|
-
showsVerticalScrollIndicator={false}
|
|
154
|
-
bounces={false}
|
|
155
|
-
nestedScrollEnabled
|
|
156
|
-
keyboardShouldPersistTaps="handled"
|
|
157
|
-
contentContainerStyle={styles.scrollContent}
|
|
158
|
-
>
|
|
159
|
-
{renderHeader}
|
|
160
|
-
{children}
|
|
161
|
-
</ScrollView>
|
|
162
|
-
) : (
|
|
163
|
-
<View style={styles.viewContent}>
|
|
164
|
-
{renderHeader}
|
|
165
|
-
{children}
|
|
166
|
-
</View>
|
|
167
|
-
)}
|
|
168
|
-
</View>
|
|
169
|
-
</Modal>
|
|
170
|
-
);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
export default BottomSheetOne;
|
|
174
|
-
|
|
175
|
-
const styles = StyleSheet.create({
|
|
176
|
-
modal: {
|
|
177
|
-
justifyContent: 'flex-end',
|
|
178
|
-
margin: 0,
|
|
179
|
-
},
|
|
180
|
-
bottomSheetContainer: {
|
|
181
|
-
borderTopLeftRadius: moderateScale(22),
|
|
182
|
-
borderTopRightRadius: moderateScale(22),
|
|
183
|
-
overflow: 'hidden',
|
|
184
|
-
position: 'relative',
|
|
185
|
-
},
|
|
186
|
-
backgroundOverlay: {
|
|
187
|
-
...StyleSheet.absoluteFill,
|
|
188
|
-
backgroundColor: 'rgba(0,0,0,0.55)',
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
handleIndicator: {
|
|
192
|
-
width: moderateScale(60),
|
|
193
|
-
height: verticalScale(4),
|
|
194
|
-
borderRadius: moderateScale(30),
|
|
195
|
-
alignSelf: 'center',
|
|
196
|
-
marginVertical: verticalScale(10),
|
|
197
|
-
},
|
|
198
|
-
scrollContent: {
|
|
199
|
-
flexGrow: 1,
|
|
200
|
-
paddingBottom: verticalScale(30),
|
|
201
|
-
paddingHorizontal: moderateScale(12),
|
|
202
|
-
},
|
|
203
|
-
viewContent: {
|
|
204
|
-
paddingBottom: verticalScale(10),
|
|
205
|
-
paddingHorizontal: moderateScale(12),
|
|
206
|
-
flex: 1,
|
|
207
|
-
},
|
|
208
|
-
closeButtonWrapper: {
|
|
209
|
-
position: 'absolute',
|
|
210
|
-
top: verticalScale(10),
|
|
211
|
-
right: moderateScale(14),
|
|
212
|
-
borderRadius: moderateScale(30),
|
|
213
|
-
padding: moderateScale(10),
|
|
214
|
-
zIndex: 1000,
|
|
215
|
-
elevation: 10,
|
|
216
|
-
},
|
|
217
|
-
title: {
|
|
218
|
-
fontSize: RFValue(16),
|
|
219
|
-
fontWeight: '700',
|
|
220
|
-
textAlign: 'center',
|
|
221
|
-
marginBottom: verticalScale(15),
|
|
222
|
-
},
|
|
223
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @LastModified Mon 13 Jul 2026 at 10:13 AM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export { default as BottomSheet } from './BottomSheet';
|
|
7
|
-
export { default as BottomSheetOne } from './BottomSheetOne';
|
|
8
|
-
export type { BottomSheetProps } from './BottomSheet';
|
|
9
|
-
export type { BottomSheetOneProps } from './BottomSheetOne';
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @LastModified Tue 14 Jul 2026 at 3:45 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useCallback } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
Alert,
|
|
11
|
-
Platform,
|
|
12
|
-
type ViewStyle,
|
|
13
|
-
type TextStyle,
|
|
14
|
-
type StyleProp,
|
|
15
|
-
} from 'react-native';
|
|
16
|
-
import { ArrowLeft } from 'lucide-react-native';
|
|
17
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
18
|
-
import { BlurView } from '@react-native-community/blur';
|
|
19
|
-
import { scale, verticalScale } from 'react-native-size-matters';
|
|
20
|
-
|
|
21
|
-
import { useTheme } from '../../theme';
|
|
22
|
-
import type { ThemeOverride } from '../../theme/themes';
|
|
23
|
-
import { Text } from '../Text';
|
|
24
|
-
|
|
25
|
-
type BackBtnProps = {
|
|
26
|
-
size?: number;
|
|
27
|
-
color?: string;
|
|
28
|
-
onPress?: () => void;
|
|
29
|
-
style?: StyleProp<ViewStyle>;
|
|
30
|
-
theme?: ThemeOverride;
|
|
31
|
-
enableBlur?: boolean;
|
|
32
|
-
label?: string;
|
|
33
|
-
textStyle?: StyleProp<TextStyle>;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const BackBtn: React.FC<BackBtnProps> = ({
|
|
37
|
-
size = scale(30),
|
|
38
|
-
color,
|
|
39
|
-
onPress,
|
|
40
|
-
style,
|
|
41
|
-
theme,
|
|
42
|
-
enableBlur = false,
|
|
43
|
-
label,
|
|
44
|
-
textStyle,
|
|
45
|
-
}) => {
|
|
46
|
-
const insets = useSafeAreaInsets();
|
|
47
|
-
const { theme: appliedTheme } = useTheme(theme);
|
|
48
|
-
|
|
49
|
-
const handlePress = useCallback(() => {
|
|
50
|
-
if (onPress) {
|
|
51
|
-
onPress();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
Alert.alert(
|
|
56
|
-
'Back Action Not Provided',
|
|
57
|
-
'Please define the back action using onPress prop.'
|
|
58
|
-
);
|
|
59
|
-
}, [onPress]);
|
|
60
|
-
|
|
61
|
-
const flattenedStyle = StyleSheet.flatten(style) || {};
|
|
62
|
-
|
|
63
|
-
const hasTopStyle = flattenedStyle.top !== undefined;
|
|
64
|
-
|
|
65
|
-
const top = Platform.select({
|
|
66
|
-
ios: insets.top > 20 ? insets.top - verticalScale(5) : insets.top,
|
|
67
|
-
android: insets.top + verticalScale(5),
|
|
68
|
-
default: insets.top,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
const iconColor = color || appliedTheme.colors.textPrimary;
|
|
72
|
-
|
|
73
|
-
const shouldRenderBlur = enableBlur && !!flattenedStyle.backgroundColor;
|
|
74
|
-
|
|
75
|
-
const blurFallbackColor =
|
|
76
|
-
typeof flattenedStyle.backgroundColor === 'string'
|
|
77
|
-
? flattenedStyle.backgroundColor
|
|
78
|
-
: String(appliedTheme.colors.backdrop);
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<TouchableOpacity
|
|
82
|
-
activeOpacity={0.8}
|
|
83
|
-
onPress={handlePress}
|
|
84
|
-
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
85
|
-
style={[
|
|
86
|
-
styles.container,
|
|
87
|
-
{
|
|
88
|
-
width: size,
|
|
89
|
-
height: size,
|
|
90
|
-
},
|
|
91
|
-
label && styles.containerWithLabel,
|
|
92
|
-
!hasTopStyle && { top },
|
|
93
|
-
style,
|
|
94
|
-
]}
|
|
95
|
-
>
|
|
96
|
-
{shouldRenderBlur && (
|
|
97
|
-
<BlurView
|
|
98
|
-
style={StyleSheet.absoluteFill}
|
|
99
|
-
blurType="light"
|
|
100
|
-
blurAmount={10}
|
|
101
|
-
reducedTransparencyFallbackColor={blurFallbackColor}
|
|
102
|
-
/>
|
|
103
|
-
)}
|
|
104
|
-
|
|
105
|
-
<ArrowLeft size={size * 0.65} color={iconColor} />
|
|
106
|
-
|
|
107
|
-
{!!label && (
|
|
108
|
-
<Text
|
|
109
|
-
color={iconColor}
|
|
110
|
-
style={[styles.label, { color: iconColor }, textStyle]}
|
|
111
|
-
>
|
|
112
|
-
{label}
|
|
113
|
-
</Text>
|
|
114
|
-
)}
|
|
115
|
-
</TouchableOpacity>
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export default React.memo(BackBtn);
|
|
120
|
-
|
|
121
|
-
const styles = StyleSheet.create({
|
|
122
|
-
container: {
|
|
123
|
-
position: 'absolute',
|
|
124
|
-
left: scale(13),
|
|
125
|
-
justifyContent: 'center',
|
|
126
|
-
alignItems: 'center',
|
|
127
|
-
borderRadius: scale(100),
|
|
128
|
-
overflow: 'hidden',
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
containerWithLabel: {
|
|
132
|
-
width: undefined,
|
|
133
|
-
paddingHorizontal: scale(12),
|
|
134
|
-
flexDirection: 'row',
|
|
135
|
-
borderRadius: scale(20),
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
label: {
|
|
139
|
-
marginLeft: scale(8),
|
|
140
|
-
fontSize: scale(14),
|
|
141
|
-
fontWeight: '600',
|
|
142
|
-
textShadowColor: 'rgba(0,0,0,0.75)',
|
|
143
|
-
textShadowOffset: {
|
|
144
|
-
width: 0,
|
|
145
|
-
height: 1,
|
|
146
|
-
},
|
|
147
|
-
textShadowRadius: 3,
|
|
148
|
-
},
|
|
149
|
-
});
|