create-gufran-expo-app 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/lib/createApp.js +7 -2
  2. package/package.json +1 -1
  3. package/template/App.tsx +118 -0
  4. package/template/ReactotronConfig.js +5 -0
  5. package/template/android/app/build.gradle +184 -0
  6. package/template/android/app/debug.keystore +0 -0
  7. package/template/android/app/google-services.json +29 -0
  8. package/template/android/app/proguard-rules.pro +14 -0
  9. package/template/android/app/src/debug/AndroidManifest.xml +7 -0
  10. package/template/android/app/src/debugOptimized/AndroidManifest.xml +7 -0
  11. package/template/android/app/src/main/AndroidManifest.xml +28 -0
  12. package/template/android/app/src/main/assets/fonts/Outfit-Bold.ttf +0 -0
  13. package/template/android/app/src/main/assets/fonts/Outfit-Light.ttf +0 -0
  14. package/template/android/app/src/main/assets/fonts/Outfit-Medium.ttf +0 -0
  15. package/template/android/app/src/main/assets/fonts/Outfit-Regular.ttf +0 -0
  16. package/template/android/app/src/main/assets/fonts/Outfit-SemiBold.ttf +0 -0
  17. package/template/android/app/src/main/java/com/club/yakka/MainActivity.kt +61 -0
  18. package/template/android/app/src/main/java/com/club/yakka/MainApplication.kt +60 -0
  19. package/template/android/app/src/main/res/drawable/ic_launcher_background.xml +6 -0
  20. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  21. package/template/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
  22. package/template/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
  23. package/template/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
  24. package/template/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
  25. package/template/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
  26. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  27. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  28. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  29. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
  30. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  31. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  32. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
  33. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  34. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  35. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
  36. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  37. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  38. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
  39. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  40. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  41. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
  42. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  43. package/template/android/app/src/main/res/values/colors.xml +6 -0
  44. package/template/android/app/src/main/res/values/strings.xml +5 -0
  45. package/template/android/app/src/main/res/values/styles.xml +14 -0
  46. package/template/android/app/src/main/res/values-night/colors.xml +1 -0
  47. package/template/android/build.gradle +33 -0
  48. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  50. package/template/android/gradle.properties +65 -0
  51. package/template/android/gradlew +251 -0
  52. package/template/android/gradlew.bat +94 -0
  53. package/template/android/settings.gradle +39 -0
  54. package/template/app.json +69 -0
  55. package/template/assets/adaptive-icon.png +0 -0
  56. package/template/assets/adaptive-icon1.png +0 -0
  57. package/template/assets/app_icon.png +0 -0
  58. package/template/assets/favicon.png +0 -0
  59. package/template/assets/icon.png +0 -0
  60. package/template/assets/splash-icon.png +0 -0
  61. package/template/babel-plugin-disable-font-scaling.js +41 -0
  62. package/template/babel.config.js +28 -0
  63. package/template/firebase.json +5 -0
  64. package/template/index.ts +24 -0
  65. package/template/ios/.xcode.env +11 -0
  66. package/template/ios/ClubYakka/AppDelegate.swift +74 -0
  67. package/template/ios/ClubYakka/ClubYakka-Bridging-Header.h +3 -0
  68. package/template/ios/ClubYakka/ClubYakka.entitlements +8 -0
  69. package/template/ios/ClubYakka/GoogleService-Info.plist +30 -0
  70. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
  71. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/Contents.json +14 -0
  72. package/template/ios/ClubYakka/Images.xcassets/Contents.json +6 -0
  73. package/template/ios/ClubYakka/Images.xcassets/SplashScreenBackground.colorset/Contents.json +20 -0
  74. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/Contents.json +23 -0
  75. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image.png +0 -0
  76. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@2x.png +0 -0
  77. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@3x.png +0 -0
  78. package/template/ios/ClubYakka/Info.plist +101 -0
  79. package/template/ios/ClubYakka/PrivacyInfo.xcprivacy +50 -0
  80. package/template/ios/ClubYakka/SplashScreen.storyboard +48 -0
  81. package/template/ios/ClubYakka/Supporting/Expo.plist +12 -0
  82. package/template/ios/ClubYakka.xcodeproj/project.pbxproj +669 -0
  83. package/template/ios/ClubYakka.xcodeproj/xcshareddata/xcschemes/ClubYakka.xcscheme +88 -0
  84. package/template/ios/ClubYakka.xcworkspace/contents.xcworkspacedata +10 -0
  85. package/template/ios/ClubYakka.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
  86. package/template/ios/Podfile +84 -0
  87. package/template/ios/Podfile.lock +2698 -0
  88. package/template/ios/Podfile.properties.json +8 -0
  89. package/template/metro.config.js +17 -0
  90. package/template/package.json +70 -0
  91. package/template/patches/react-native-background-upload+6.6.0.patch +704 -0
  92. package/template/react-native.config.js +7 -0
  93. package/template/src/assets/fonts/Outfit-Bold.ttf +0 -0
  94. package/template/src/assets/fonts/Outfit-Light.ttf +0 -0
  95. package/template/src/assets/fonts/Outfit-Medium.ttf +0 -0
  96. package/template/src/assets/fonts/Outfit-Regular.ttf +0 -0
  97. package/template/src/assets/fonts/Outfit-SemiBold.ttf +0 -0
  98. package/template/src/assets/icons/BG.svg +33 -0
  99. package/template/src/assets/icons/Ic_Users.svg +6 -0
  100. package/template/src/assets/icons/arrow-left-white.svg +4 -0
  101. package/template/src/assets/icons/arrow-left.svg +4 -0
  102. package/template/src/assets/icons/bell.svg +4 -0
  103. package/template/src/assets/icons/bottomSheetIcone.svg +3 -0
  104. package/template/src/assets/icons/call.svg +4 -0
  105. package/template/src/assets/icons/camera.svg +0 -0
  106. package/template/src/assets/icons/chatAppleGreenBG.svg +22 -0
  107. package/template/src/assets/icons/check.svg +4 -0
  108. package/template/src/assets/icons/check_Radio.svg +4 -0
  109. package/template/src/assets/icons/chevron-right.svg +3 -0
  110. package/template/src/assets/icons/clubDefauldImage.png +0 -0
  111. package/template/src/assets/icons/curvBackgroundView.svg +3 -0
  112. package/template/src/assets/icons/defaultClub.png +0 -0
  113. package/template/src/assets/icons/email.svg +3 -0
  114. package/template/src/assets/icons/emptyUser.svg +5 -0
  115. package/template/src/assets/icons/eye-Hide.svg +8 -0
  116. package/template/src/assets/icons/eye.svg +4 -0
  117. package/template/src/assets/icons/gallery.svg +4 -0
  118. package/template/src/assets/icons/home.svg +4 -0
  119. package/template/src/assets/icons/ic_Calendar.svg +14 -0
  120. package/template/src/assets/icons/ic_Calendar_blue.svg +12 -0
  121. package/template/src/assets/icons/ic_Calendar_white.svg +12 -0
  122. package/template/src/assets/icons/ic_Chat.svg +14 -0
  123. package/template/src/assets/icons/ic_ChatAppleGreen.svg +21 -0
  124. package/template/src/assets/icons/ic_ChatAppleWhite.svg +21 -0
  125. package/template/src/assets/icons/ic_Download.svg +6 -0
  126. package/template/src/assets/icons/ic_Events.svg +6 -0
  127. package/template/src/assets/icons/ic_HeadCoachIcon.svg +3 -0
  128. package/template/src/assets/icons/ic_Membership.svg +10 -0
  129. package/template/src/assets/icons/ic_Notification.svg +6 -0
  130. package/template/src/assets/icons/ic_Raffles.svg +14 -0
  131. package/template/src/assets/icons/ic_Referral_Members.svg +12 -0
  132. package/template/src/assets/icons/ic_Shop.svg +13 -0
  133. package/template/src/assets/icons/ic_Teams.svg +8 -0
  134. package/template/src/assets/icons/ic_Volunteer.svg +9 -0
  135. package/template/src/assets/icons/ic_add.svg +3 -0
  136. package/template/src/assets/icons/ic_addCircle.svg +5 -0
  137. package/template/src/assets/icons/ic_chatSend.svg +4 -0
  138. package/template/src/assets/icons/ic_chat_blue_bg.svg +22 -0
  139. package/template/src/assets/icons/ic_clock_blue.svg +4 -0
  140. package/template/src/assets/icons/ic_delete.svg +8 -0
  141. package/template/src/assets/icons/ic_more.svg +5 -0
  142. package/template/src/assets/icons/ic_mute.svg +10 -0
  143. package/template/src/assets/icons/ic_pdf.svg +3 -0
  144. package/template/src/assets/icons/ic_pending_AppleGreen.svg +11 -0
  145. package/template/src/assets/icons/ic_right_appleGreen.svg +11 -0
  146. package/template/src/assets/icons/ic_unread_chat_blue_bg.svg +23 -0
  147. package/template/src/assets/icons/ic_volunteer_Member.svg +8 -0
  148. package/template/src/assets/icons/index.ts +144 -0
  149. package/template/src/assets/icons/location-blue.svg +4 -0
  150. package/template/src/assets/icons/location-white.svg +4 -0
  151. package/template/src/assets/icons/location.svg +4 -0
  152. package/template/src/assets/icons/lock.svg +5 -0
  153. package/template/src/assets/icons/log-out.svg +5 -0
  154. package/template/src/assets/icons/login_logo.svg +9 -0
  155. package/template/src/assets/icons/mail.svg +4 -0
  156. package/template/src/assets/icons/or_saprater.svg +5 -0
  157. package/template/src/assets/icons/password.svg +4 -0
  158. package/template/src/assets/icons/profile-appleGreen.svg +6 -0
  159. package/template/src/assets/icons/search.svg +3 -0
  160. package/template/src/assets/icons/settings.svg +4 -0
  161. package/template/src/assets/icons/success.svg +4 -0
  162. package/template/src/assets/icons/unCheck_Radio.svg +3 -0
  163. package/template/src/assets/icons/uncheck.svg +3 -0
  164. package/template/src/assets/icons/upload_Image.svg +6 -0
  165. package/template/src/assets/icons/upload_Image_Member.svg +6 -0
  166. package/template/src/assets/icons/user.svg +4 -0
  167. package/template/src/assets/icons/wifi.svg +1 -0
  168. package/template/src/assets/images/Splash.png +0 -0
  169. package/template/src/assets/images/SplashLogo.png +0 -0
  170. package/template/src/assets/images/background.png +0 -0
  171. package/template/src/assets/images/clubDefauldImage.png +0 -0
  172. package/template/src/assets/images/index.tsx +9 -0
  173. package/template/src/assets/index.ts +1 -0
  174. package/template/src/components/common/AddMemberModal.tsx +543 -0
  175. package/template/src/components/common/AppLoader.tsx +91 -0
  176. package/template/src/components/common/Button.tsx +173 -0
  177. package/template/src/components/common/ClubCard.tsx +248 -0
  178. package/template/src/components/common/Icon.tsx +93 -0
  179. package/template/src/components/common/IconAlt.tsx +65 -0
  180. package/template/src/components/common/IconButton.tsx +92 -0
  181. package/template/src/components/common/ImagePicker.tsx +451 -0
  182. package/template/src/components/common/LoadingSpinner.tsx +30 -0
  183. package/template/src/components/common/OTPInput.tsx +128 -0
  184. package/template/src/components/common/ReminderCalendar.tsx +129 -0
  185. package/template/src/components/common/ReminderCardItem.tsx +91 -0
  186. package/template/src/components/common/SafeAreaWrapper.tsx +27 -0
  187. package/template/src/components/common/SetReminderModal.tsx +308 -0
  188. package/template/src/components/common/SlowInternet.js +57 -0
  189. package/template/src/components/common/TeamCard.tsx +297 -0
  190. package/template/src/components/common/TextInput.tsx +227 -0
  191. package/template/src/components/common/ToastConfig.tsx +103 -0
  192. package/template/src/components/common/ToastManager.ts +86 -0
  193. package/template/src/components/common/UploadProgressModal.tsx +284 -0
  194. package/template/src/components/common/WrapperContainer.tsx +39 -0
  195. package/template/src/components/common/index.ts +19 -0
  196. package/template/src/constants/Constants.tsx +7 -0
  197. package/template/src/constants/Fonts.tsx +30 -0
  198. package/template/src/constants/index.ts +45 -0
  199. package/template/src/constants/strings.ts +211 -0
  200. package/template/src/constants/theme.ts +72 -0
  201. package/template/src/contexts/AuthContext.tsx +268 -0
  202. package/template/src/contexts/index.ts +2 -0
  203. package/template/src/hooks/index.ts +3 -0
  204. package/template/src/hooks/useImageUpload.ts +199 -0
  205. package/template/src/index.ts +8 -0
  206. package/template/src/navigation/AuthStack.tsx +67 -0
  207. package/template/src/navigation/MainStack.tsx +183 -0
  208. package/template/src/navigation/MiddleStack.tsx +35 -0
  209. package/template/src/navigation/RootNavigator.tsx +101 -0
  210. package/template/src/navigation/index.ts +5 -0
  211. package/template/src/navigation/navigationRef.ts +5 -0
  212. package/template/src/providers/QueryProvider.tsx +30 -0
  213. package/template/src/screens/DetailsScreen.tsx +271 -0
  214. package/template/src/screens/HomeScreen.tsx +736 -0
  215. package/template/src/screens/ProfileScreen.tsx +202 -0
  216. package/template/src/screens/SettingsScreen.tsx +253 -0
  217. package/template/src/screens/SportHubScreen.tsx +280 -0
  218. package/template/src/screens/auth/AddMamber.tsx +428 -0
  219. package/template/src/screens/auth/ForgotPasswordScreen.tsx +176 -0
  220. package/template/src/screens/auth/LoginScreen.tsx +286 -0
  221. package/template/src/screens/auth/OTPVerifyScreen.tsx +359 -0
  222. package/template/src/screens/auth/RegisterScreen.tsx +430 -0
  223. package/template/src/screens/auth/SuccessScreen.tsx +201 -0
  224. package/template/src/screens/auth/WalcomeScreen.tsx +274 -0
  225. package/template/src/screens/auth/index.ts +8 -0
  226. package/template/src/screens/chat/ChatScreen.tsx +1819 -0
  227. package/template/src/screens/chat/ChatThreadsScreen.tsx +360 -0
  228. package/template/src/screens/chat/ReportMessageScreen.tsx +238 -0
  229. package/template/src/screens/clubs/Announcements.tsx +426 -0
  230. package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +568 -0
  231. package/template/src/screens/clubs/ClubDeteils.tsx +497 -0
  232. package/template/src/screens/clubs/JoinClub.tsx +841 -0
  233. package/template/src/screens/events/EventScreen.tsx +460 -0
  234. package/template/src/screens/index.ts +42 -0
  235. package/template/src/screens/raffles/MyReferralMembersScreen.tsx +758 -0
  236. package/template/src/screens/raffles/RaffleDetailsScreen.tsx +762 -0
  237. package/template/src/screens/raffles/RafflesScreen.tsx +495 -0
  238. package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +390 -0
  239. package/template/src/screens/teams/JoinTeamScreen.tsx +464 -0
  240. package/template/src/screens/teams/MyTeamDetailsScreen.tsx +979 -0
  241. package/template/src/screens/teams/MyTeamScreen.tsx +568 -0
  242. package/template/src/screens/teams/PendingRequestsScreen.tsx +426 -0
  243. package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +631 -0
  244. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +1049 -0
  245. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +608 -0
  246. package/template/src/services/api.ts +167 -0
  247. package/template/src/services/authService.ts +422 -0
  248. package/template/src/services/index.ts +5 -0
  249. package/template/src/services/mainServices.ts +1963 -0
  250. package/template/src/stores/authStore.ts +159 -0
  251. package/template/src/stores/index.ts +2 -0
  252. package/template/src/types/index.ts +85 -0
  253. package/template/src/types/navigation.ts +206 -0
  254. package/template/src/utils/AzureUploaderService.ts +371 -0
  255. package/template/src/utils/ClubSearchManager.ts +222 -0
  256. package/template/src/utils/NotificationManager.ts +503 -0
  257. package/template/src/utils/UploadDebugUtil.ts +107 -0
  258. package/template/src/utils/imagePicker.ts +321 -0
  259. package/template/src/utils/index.ts +111 -0
  260. package/template/src/utils/permissions.ts +277 -0
  261. package/template/src/utils/scaling.ts +14 -0
  262. package/template/src/utils/storage.ts +247 -0
  263. package/template/src/utils/usePermissions.ts +275 -0
  264. package/template/src/utils/validation.ts +340 -0
  265. package/template/tsconfig.json +50 -0
  266. package/template/types/svg.d.ts +6 -0
@@ -0,0 +1,297 @@
1
+ import React, { useState } from 'react';
2
+ import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
3
+ import { theme } from '../../constants';
4
+ import { moderateScale } from '../../utils/scaling';
5
+ import { Fonts } from '../../constants/Fonts';
6
+ import SVG from '../../assets/icons';
7
+ import Images from '../../assets/images';
8
+
9
+ interface TeamCardProps {
10
+ team: {
11
+ isPrivate?: boolean;
12
+ id?: string | number;
13
+ name?: string;
14
+ teamName?: string;
15
+ teamImageUrl?: string;
16
+ profileImage?: string;
17
+ logo?: string;
18
+ members?: number;
19
+ address?: string;
20
+ location?: string;
21
+ teamCode?: string;
22
+ color?: string;
23
+ description?: string;
24
+ teamAddress?: string;
25
+ onJoinPress?: () => void;
26
+ onChatPress?: () => void;
27
+ onCancelPress?: () => void;
28
+ onJoin?: boolean;
29
+ onChat?: boolean;
30
+ onCancel?: boolean;
31
+ teamCodeShow?: boolean;
32
+ totalMembers?: number;
33
+ teamProfileImage?: string;
34
+ };
35
+ onPress?: () => void;
36
+ onJoinPress?: () => void;
37
+ onChatPress?: () => void;
38
+ onCancelPress?: () => void;
39
+ onJoin?: boolean;
40
+ onChat?: boolean;
41
+ onCancel?: boolean;
42
+ teamCodeShow?: boolean;
43
+ }
44
+
45
+ export const TeamCard: React.FC<TeamCardProps> = ({
46
+ team,
47
+ onPress,
48
+ onJoinPress,
49
+ onChatPress,
50
+ onCancelPress,
51
+ onCancel,
52
+ onJoin,
53
+ onChat,
54
+ teamCodeShow
55
+
56
+ }) => {
57
+ const [imageError, setImageError] = useState(false);
58
+
59
+ const teamName = team?.teamName || team?.teamName || 'Unnamed Team';
60
+ const teamImage = team?.teamImageUrl || team?.teamProfileImage || team?.profileImage;
61
+ const memberCount = team?.members || team?.totalMembers || 0;
62
+ const address = team?.address || team?.location || '';
63
+ const teamCode = team?.teamCode || '';
64
+ const teamAddress = team?.teamAddress || '';
65
+ const privateTeam = team?.isPrivate || '';
66
+
67
+ return (
68
+ <TouchableOpacity style={styles.card} onPress={onPress} activeOpacity={0.8}>
69
+ <View style={styles.logoContainer}>
70
+ {teamImage && !imageError ? (
71
+ <Image source={{ uri: teamImage }} style={styles.logo}
72
+ onError={() => {
73
+ setImageError(true);
74
+ }}
75
+ />
76
+ ) : (
77
+ <View style={[styles.placeholderLogo]}>
78
+ <Image source={Images.clubDefauldImage} style={styles.logo} />
79
+ </View>
80
+ )}
81
+ {imageError && (
82
+ <View style={styles.placeholderLogo}>
83
+ <Image source={Images.clubDefauldImage} style={styles.logo} />
84
+ </View>
85
+ )}
86
+ </View>
87
+
88
+ {/* Team Information */}
89
+ <View style={styles.infoContainer}>
90
+ {/* Team Name */}
91
+ <Text style={styles.teamName} numberOfLines={1}>
92
+ {teamName}
93
+ </Text>
94
+
95
+ {/* Members Count */}
96
+ <View style={styles.membersRow}>
97
+ <View style={styles.membersIcon}>
98
+ <SVG.UsersIcon width={moderateScale(16)} height={moderateScale(16)} />
99
+ </View>
100
+ <Text style={styles.membersText}>
101
+ {memberCount > 0 ? memberCount : 'No'} {memberCount <= 1 ? 'member' : 'members'}
102
+ </Text>
103
+ </View>
104
+
105
+ {/* Address */}
106
+ {teamAddress != "" && (
107
+ <View style={styles.addressRow}>
108
+ <SVG.locationIcon width={moderateScale(16)} height={moderateScale(16)} />
109
+ <Text style={styles.addressText} numberOfLines={1}>
110
+ {teamAddress}
111
+ </Text>
112
+ </View>
113
+ )}
114
+ </View>
115
+
116
+ {/* Action Buttons - Positioned on the right, vertically centered */}
117
+ {onJoin && (
118
+ <TouchableOpacity hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
119
+ style={styles.actionButtonContainer}
120
+ onPress={onJoinPress}
121
+ activeOpacity={0.8}>
122
+ <View style={[styles.joinButton, { width: !privateTeam ? moderateScale(50) : moderateScale(60), height: moderateScale(25) }]}>
123
+ <Text style={styles.joinButtonText}>{!privateTeam ? 'Join' : 'Request'}</Text>
124
+ </View>
125
+ </TouchableOpacity>
126
+ )}
127
+
128
+ {onCancel && (
129
+ <TouchableOpacity hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
130
+ style={styles.actionButtonContainer}
131
+ onPress={onCancelPress}
132
+ activeOpacity={0.8}>
133
+ <View style={[styles.cancelButton, { width: moderateScale(50), height: moderateScale(25) }]}>
134
+ <Text style={styles.cancelButtonText}>Cancel</Text>
135
+ </View>
136
+ </TouchableOpacity>
137
+ )}
138
+
139
+ {teamCodeShow && (
140
+ <View style={styles.teamCodeContainer}>
141
+ <Text style={styles.teamCodeText}>{teamCode}</Text>
142
+ </View>
143
+ )}
144
+
145
+ {/* Chat Icon - Positioned on the right, vertically centered */}
146
+ {onChat && (
147
+ <TouchableOpacity hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
148
+ style={styles.chatIconContainer}
149
+ onPress={onChatPress}
150
+ activeOpacity={0.8}>
151
+ <SVG.chatAppleGreenBG style= {{marginRight: moderateScale(8)}} width={moderateScale(35)} height={moderateScale(35)} />
152
+ </TouchableOpacity>
153
+ )}
154
+ </TouchableOpacity>
155
+ );
156
+ };
157
+
158
+ const styles = StyleSheet.create({
159
+ card: {
160
+ flexDirection: 'row',
161
+ backgroundColor: theme.colors.lightLavenderGray,
162
+ borderRadius: theme.borderRadius.lg,
163
+ padding: theme.spacing.sm,
164
+ marginBottom: theme.spacing.sm,
165
+ alignItems: 'center',
166
+ },
167
+ logoContainer: {
168
+ width: moderateScale(70),
169
+ height: moderateScale(70),
170
+ borderRadius: theme.borderRadius.md,
171
+ marginRight: theme.spacing.sm,
172
+ overflow: 'hidden',
173
+ },
174
+ logo: {
175
+ width: '100%',
176
+ height: '100%',
177
+ borderRadius: theme.borderRadius.md,
178
+ },
179
+ placeholderLogo: {
180
+ width: '100%',
181
+ height: '100%',
182
+ borderWidth: 1,
183
+ borderColor: theme.colors.imageBorder,
184
+ backgroundColor: theme.colors.background,
185
+ borderRadius: theme.borderRadius.md,
186
+ justifyContent: 'center',
187
+ alignItems: 'center',
188
+ },
189
+ placeholderText: {
190
+ fontSize: moderateScale(24),
191
+ fontFamily: Fonts.outfitBold,
192
+ color: theme.colors.white,
193
+ },
194
+ infoContainer: {
195
+ flex: 1,
196
+ justifyContent: 'center',
197
+ },
198
+ teamName: {
199
+ fontSize: theme.typography.fontSize.md,
200
+ fontFamily: Fonts.outfitSemiBold,
201
+ color: theme.colors.text,
202
+ },
203
+ membersRow: {
204
+ flexDirection: 'row',
205
+ alignItems: 'center',
206
+ marginVertical: moderateScale(6),
207
+ },
208
+ membersIcon: {
209
+ marginRight: moderateScale(6),
210
+ },
211
+ membersIconText: {
212
+ fontSize: moderateScale(14),
213
+ },
214
+ membersText: {
215
+ fontSize: theme.typography.fontSize.xs,
216
+ fontFamily: Fonts.outfitLight,
217
+ color: theme.colors.primary,
218
+ },
219
+ teamCodeText: {
220
+ fontSize: theme.typography.fontSize.xs,
221
+ fontFamily: Fonts.outfitLight,
222
+ color: theme.colors.appleGreen,
223
+ },
224
+ teamCodeContainer: {
225
+ marginLeft: theme.spacing.sm,
226
+ justifyContent: 'center',
227
+ alignItems: 'center',
228
+ },
229
+ actionButtonContainer: {
230
+ marginLeft: theme.spacing.sm,
231
+ justifyContent: 'center',
232
+ alignItems: 'center',
233
+ },
234
+ joinButton: {
235
+ alignItems: 'center',
236
+ justifyContent: 'center',
237
+ borderWidth: 1,
238
+ borderColor: theme.colors.appleGreen,
239
+ borderRadius: theme.borderRadius.xl,
240
+ backgroundColor: theme.colors.background,
241
+ },
242
+ joinButtonText: {
243
+ fontFamily: Fonts.outfitSemiBold,
244
+ fontSize: theme.typography.fontSize.xs,
245
+ color: theme.colors.appleGreen,
246
+ },
247
+ cancelButton: {
248
+ alignItems: 'center',
249
+ justifyContent: 'center',
250
+ borderWidth: 1,
251
+ borderColor: theme.colors.cancelButton,
252
+ borderRadius: theme.borderRadius.xl,
253
+ backgroundColor: theme.colors.background,
254
+ },
255
+ cancelButtonText: {
256
+ fontFamily: Fonts.outfitSemiBold,
257
+ fontSize: theme.typography.fontSize.xs,
258
+ color: theme.colors.cancelButton,
259
+ },
260
+ chatIconContainer: {
261
+ marginLeft: theme.spacing.sm,
262
+ justifyContent: 'center',
263
+ alignItems: 'center',
264
+ },
265
+ colorIndicator: {
266
+ width: moderateScale(12),
267
+ height: moderateScale(12),
268
+ borderRadius: moderateScale(6),
269
+ marginLeft: moderateScale(8),
270
+ },
271
+ addressRow: {
272
+ flexDirection: 'row',
273
+ alignItems: 'center',
274
+ },
275
+ locationIcon: {
276
+ fontSize: moderateScale(12),
277
+ marginRight: moderateScale(6),
278
+ },
279
+ addressText: {
280
+ fontSize: theme.typography.fontSize.xs,
281
+ fontFamily: Fonts.outfitLight,
282
+ color: theme.colors.text,
283
+ flex: 1,
284
+ marginLeft: moderateScale(8),
285
+ },
286
+ arrowContainer: {
287
+ marginLeft: theme.spacing.sm,
288
+ justifyContent: 'center',
289
+ },
290
+ arrowText: {
291
+ fontSize: moderateScale(20),
292
+ fontFamily: Fonts.outfitBold,
293
+ color: theme.colors.textSecondary,
294
+ },
295
+ });
296
+
297
+ export default TeamCard;
@@ -0,0 +1,227 @@
1
+ import React, { useState, forwardRef, useImperativeHandle, useRef } from 'react';
2
+ import {
3
+ TextInput as RNTextInput,
4
+ View,
5
+ Text,
6
+ StyleSheet,
7
+ TextInputProps as RNTextInputProps,
8
+ ViewStyle,
9
+ TextStyle,
10
+ TouchableOpacity,
11
+ } from 'react-native';
12
+ import { IconAlt } from './IconAlt';
13
+ import { theme } from '../../constants';
14
+ import { SvgProps } from "react-native-svg";
15
+ import SVG from '../../assets/icons';
16
+ import { moderateScale } from '../../utils/scaling';
17
+ import { Fonts } from '../../constants/Fonts';
18
+
19
+ interface TextInputProps extends RNTextInputProps {
20
+ label?: string;
21
+ error?: string;
22
+ leftIcon?: React.FC<SvgProps> | string;
23
+ rightIcon?: string;
24
+ onRightIconPress?: () => void;
25
+ style?: ViewStyle;
26
+ inputStyle?: TextStyle;
27
+ showPasswordToggle?: boolean;
28
+ variant?: 'default' | 'filled' | 'outlined';
29
+ leftIconStyle?: ViewStyle;
30
+ leftIconSizeWidth?: number;
31
+ leftIconSizeHeight?: number;
32
+ }
33
+
34
+ export const TextInput = forwardRef<any, TextInputProps>(({
35
+ label,
36
+ error,
37
+ leftIcon,
38
+ rightIcon,
39
+ onRightIconPress,
40
+ style,
41
+ inputStyle,
42
+ showPasswordToggle = false,
43
+ variant = 'outlined',
44
+ secureTextEntry,
45
+ leftIconStyle,
46
+ leftIconSizeWidth = moderateScale(20),
47
+ leftIconSizeHeight = moderateScale(20),
48
+ ...props
49
+ }, ref) => {
50
+ const [isPasswordVisible, setIsPasswordVisible] = useState(!secureTextEntry);
51
+ const inputRef = useRef<RNTextInput>(null);
52
+ // const [isFocused, setIsFocused] = useState(false);
53
+
54
+ useImperativeHandle(ref, () => ({
55
+ focus: () => {
56
+ inputRef.current?.focus();
57
+ },
58
+ blur: () => {
59
+ inputRef.current?.blur();
60
+ },
61
+ }));
62
+
63
+ const togglePasswordVisibility = () => {
64
+ setIsPasswordVisible(!isPasswordVisible);
65
+ };
66
+
67
+ const containerStyle = [
68
+ styles.container,
69
+ styles[variant],
70
+ // isFocused && styles.focusedContainer,
71
+ error && styles.errorContainer,
72
+ style,
73
+ ];
74
+
75
+ const textInputStyle = [
76
+ styles.input,
77
+ leftIcon && styles.inputWithLeftIcon,
78
+ (rightIcon || showPasswordToggle) && styles.inputWithRightIcon,
79
+ inputStyle,
80
+ ];
81
+
82
+ return (
83
+ <View style={styles.wrapper}>
84
+ {label && <Text style={styles.label}>{label}</Text>}
85
+
86
+ <View style={containerStyle}>
87
+ {leftIcon && (
88
+ <View style={[styles.leftIconContainer, leftIconStyle]}>
89
+ {typeof leftIcon === 'string' ? (
90
+ <IconAlt
91
+ name={leftIcon as any}
92
+ color={theme.colors.textSecondary}
93
+ size={moderateScale(30)}
94
+ />
95
+ ) : (
96
+ React.createElement(leftIcon, {
97
+ width: leftIconSizeWidth,
98
+ height: leftIconSizeHeight,
99
+ color: theme.colors.textSecondary,
100
+ })
101
+ )}
102
+ </View>
103
+ )}
104
+
105
+ <RNTextInput
106
+ ref={inputRef}
107
+ style={textInputStyle}
108
+ placeholderTextColor={theme.colors.textSecondary}
109
+ secureTextEntry={showPasswordToggle ? !isPasswordVisible : secureTextEntry}
110
+ underlineColorAndroid="transparent"
111
+ {...props}
112
+ />
113
+
114
+ {(rightIcon || showPasswordToggle) && (
115
+ <View style={styles.rightIconContainer}>
116
+ {showPasswordToggle ? (
117
+ <TouchableOpacity
118
+ onPress={togglePasswordVisibility}
119
+ style={styles.eyeButton}
120
+ hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
121
+ >
122
+ {React.createElement(isPasswordVisible ? SVG.eye : SVG.eyeOff, {
123
+ width: leftIconSizeWidth,
124
+ height: leftIconSizeHeight,
125
+ color: theme.colors.textSecondary,
126
+ })}
127
+ </TouchableOpacity>
128
+ ) : rightIcon ? (
129
+ <IconAlt
130
+ name={rightIcon as any}
131
+ size={20}
132
+ color={theme.colors.textSecondary}
133
+ />
134
+ ) : null}
135
+ </View>
136
+ )}
137
+ </View>
138
+
139
+ {error && <Text style={styles.errorText}>{error}</Text>}
140
+ </View>
141
+ );
142
+ });
143
+
144
+ TextInput.displayName = 'TextInput';
145
+
146
+ const styles = StyleSheet.create({
147
+ wrapper: {
148
+ },
149
+ label: {
150
+ fontFamily: Fonts.outfitRegular,
151
+ fontSize: theme.typography.fontSize.sm,
152
+ color: theme.colors.text,
153
+ marginBottom: theme.spacing.xs,
154
+ },
155
+ container: {
156
+ flexDirection: 'row',
157
+ alignItems: 'center',
158
+ minHeight: moderateScale(50),
159
+ borderRadius: moderateScale(30),
160
+ paddingHorizontal: moderateScale(10),
161
+ },
162
+ default: {
163
+ borderWidth: 1,
164
+ borderColor: theme.colors.border,
165
+ backgroundColor: theme.colors.background,
166
+ },
167
+ filled: {
168
+ backgroundColor: '#F8F9FA',
169
+ borderWidth: 0,
170
+ },
171
+ outlined: {
172
+ borderWidth: 1.5,
173
+ borderColor: '#E5E7EB',
174
+ backgroundColor: theme.colors.background,
175
+ },
176
+ focusedContainer: {
177
+ borderColor: '#3B82F6',
178
+ borderWidth: 2,
179
+ shadowColor: '#3B82F6',
180
+ shadowOffset: {
181
+ width: 0,
182
+ height: 0,
183
+ },
184
+ shadowOpacity: 0.2,
185
+ shadowRadius: 4,
186
+ elevation: 4,
187
+ },
188
+ errorContainer: {
189
+ borderColor: theme.colors.error,
190
+ borderWidth: 2,
191
+ },
192
+ input: {
193
+ flex: 1,
194
+ fontFamily: Fonts.outfitRegular,
195
+ marginLeft: theme.spacing.sm,
196
+ paddingVertical: theme.spacing.xs,
197
+ fontSize: theme.typography.fontSize.md,
198
+ color: theme.colors.text,
199
+
200
+ },
201
+ inputWithLeftIcon: {
202
+ paddingLeft: theme.spacing.xs,
203
+ },
204
+ inputWithRightIcon: {
205
+ paddingRight: theme.spacing.xs,
206
+ },
207
+ leftIconContainer: {
208
+ justifyContent: 'center',
209
+ alignItems: 'center',
210
+ },
211
+ rightIconContainer: {
212
+ paddingRight: theme.spacing.md,
213
+ justifyContent: 'center',
214
+ alignItems: 'center',
215
+ },
216
+ eyeButton: {
217
+ justifyContent: 'center',
218
+ alignItems: 'center',
219
+ },
220
+ errorText: {
221
+ fontFamily: Fonts.outfitRegular,
222
+ fontSize: theme.typography.fontSize.sm,
223
+ color: theme.colors.error,
224
+ marginTop: theme.spacing.xs,
225
+ marginLeft: theme.spacing.xs,
226
+ },
227
+ });
@@ -0,0 +1,103 @@
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet, Dimensions, StatusBar, Platform } from 'react-native';
3
+ import { moderateScale } from '../../utils/scaling';
4
+ import { Fonts } from '../../constants/Fonts';
5
+ import { theme } from '../../constants';
6
+
7
+ const { width } = Dimensions.get('window');
8
+
9
+ // Custom Toast Configuration
10
+ export const toastConfig = {
11
+ success: ({ text1, text2, ...rest }) => (
12
+ <View style={[styles.toastContainer, styles.successToast]}>
13
+ <View style={styles.toastContent}>
14
+ <View style={styles.textContainer}>
15
+ <Text style={styles.toastTitle}>{text1}</Text>
16
+ {text2 && <Text style={styles.toastMessage}>{text2}</Text>}
17
+ </View>
18
+ </View>
19
+ </View>
20
+ ),
21
+ error: ({ text1, text2, ...rest }) => (
22
+ <View style={[styles.toastContainer, styles.errorToast]}>
23
+ <View style={styles.toastContent}>
24
+ <View style={styles.textContainer}>
25
+ <Text style={styles.toastTitle}>{text1}</Text>
26
+ {text2 && <Text style={styles.toastMessage}>{text2}</Text>}
27
+ </View>
28
+ </View>
29
+ </View>
30
+ ),
31
+ info: ({ text1, text2, ...rest }) => (
32
+ <View style={[styles.toastContainer, styles.infoToast]}>
33
+ <View style={styles.toastContent}>
34
+ <View style={styles.textContainer}>
35
+ <Text style={styles.toastTitle}>{text1}</Text>
36
+ {text2 && <Text style={styles.toastMessage}>{text2}</Text>}
37
+ </View>
38
+ </View>
39
+ </View>
40
+ ),
41
+ warning: ({ text1, text2, ...rest }) => (
42
+ <View style={[styles.toastContainer, styles.warningToast]}>
43
+ <View style={styles.toastContent}>
44
+ <View style={styles.textContainer}>
45
+ <Text style={styles.toastTitle}>{text1}</Text>
46
+ {text2 && <Text style={styles.toastMessage}>{text2}</Text>}
47
+ </View>
48
+ </View>
49
+ </View>
50
+ ),
51
+ };
52
+
53
+ const styles = StyleSheet.create({
54
+ toastContainer: {
55
+ minHeight: moderateScale(40),
56
+ width: width * 0.9,
57
+ marginHorizontal: width * 0.05,
58
+ borderRadius: moderateScale(16),
59
+ marginTop: Platform.OS === 'ios' ? StatusBar.currentHeight + moderateScale(15) : moderateScale(20),
60
+ },
61
+ toastContent: {
62
+ flexDirection: 'row',
63
+ alignItems: 'center',
64
+ paddingHorizontal: moderateScale(20),
65
+ paddingVertical: moderateScale(16),
66
+ flex: 1,
67
+ },
68
+ textContainer: {
69
+ flex: 1,
70
+ justifyContent: 'center',
71
+ paddingRight: moderateScale(12),
72
+ },
73
+ successToast: {
74
+ backgroundColor: theme.colors.success,
75
+ borderColor: '#45A049',
76
+ },
77
+ errorToast: {
78
+ backgroundColor: '#F44336',
79
+ borderColor: '#D32F2F',
80
+ },
81
+ infoToast: {
82
+ backgroundColor: '#2196F3',
83
+ borderColor: '#1976D2',
84
+ },
85
+ warningToast: {
86
+ backgroundColor: '#FF9800',
87
+ borderColor: '#F57C00',
88
+ },
89
+ toastTitle: {
90
+ fontSize: moderateScale(16),
91
+ fontFamily: Fonts.outfitSemiBold,
92
+ color: theme.colors.white,
93
+ marginBottom: moderateScale(2),
94
+ letterSpacing: 0.2,
95
+ },
96
+ toastMessage: {
97
+ fontSize: moderateScale(14),
98
+ color: theme.colors.white,
99
+ lineHeight: moderateScale(18),
100
+ flexWrap: 'wrap',
101
+ fontFamily: Fonts.outfitRegular,
102
+ },
103
+ });
@@ -0,0 +1,86 @@
1
+ import Toast from 'react-native-toast-message';
2
+
3
+ export interface ToastConfig {
4
+ type: 'success' | 'error' | 'info' | 'warning';
5
+ title: string;
6
+ message?: string;
7
+ duration?: number;
8
+ position?: 'top' | 'bottom';
9
+ }
10
+
11
+ class ToastManager {
12
+ /**
13
+ * Show a success toast message
14
+ */
15
+ static success(title: string, message?: string, duration?: number) {
16
+ Toast.show({
17
+ type: 'success',
18
+ text1: title,
19
+ text2: message,
20
+ visibilityTime: duration || 3000,
21
+ position: 'top',
22
+
23
+ });
24
+ }
25
+
26
+ /**
27
+ * Show an error toast message
28
+ */
29
+ static error(title: string, message?: string, duration?: number) {
30
+ Toast.show({
31
+ type: 'error',
32
+ text1: title,
33
+ text2: message,
34
+ visibilityTime: duration || 4000,
35
+ position: 'top',
36
+ });
37
+ }
38
+
39
+ /**
40
+ * Show an info toast message
41
+ */
42
+ static info(title: string, message?: string, duration?: number) {
43
+ Toast.show({
44
+ type: 'info',
45
+ text1: title,
46
+ text2: message,
47
+ visibilityTime: duration || 3000,
48
+ position: 'top',
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Show a warning toast message
54
+ */
55
+ static warning(title: string, message?: string, duration?: number) {
56
+ Toast.show({
57
+ type: 'warning',
58
+ text1: title,
59
+ text2: message,
60
+ visibilityTime: duration || 3500,
61
+ position: 'top',
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Show a custom toast message
67
+ */
68
+ static show(config: ToastConfig) {
69
+ Toast.show({
70
+ type: config.type,
71
+ text1: config.title,
72
+ text2: config.message,
73
+ visibilityTime: config.duration || 3000,
74
+ position: config.position || 'top',
75
+ });
76
+ }
77
+
78
+ /**
79
+ * Hide the current toast
80
+ */
81
+ static hide() {
82
+ Toast.hide();
83
+ }
84
+ }
85
+
86
+ export default ToastManager;