@varunindiit/create-rn-starter 1.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 (243) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/bin/index.js +270 -0
  4. package/lib/prompt.js +63 -0
  5. package/lib/rename.js +239 -0
  6. package/lib/scaffold.js +110 -0
  7. package/lib/utils.js +122 -0
  8. package/package.json +38 -0
  9. package/template/.eslintrc.js +4 -0
  10. package/template/.prettierrc.js +5 -0
  11. package/template/.watchmanconfig +1 -0
  12. package/template/App.tsx +100 -0
  13. package/template/Gemfile +17 -0
  14. package/template/README.md +97 -0
  15. package/template/__tests__/App.test.tsx +13 -0
  16. package/template/_gitignore +75 -0
  17. package/template/android/app/build.gradle +119 -0
  18. package/template/android/app/debug.keystore +0 -0
  19. package/template/android/app/proguard-rules.pro +10 -0
  20. package/template/android/app/src/main/AndroidManifest.xml +45 -0
  21. package/template/android/app/src/main/assets/fonts/MonaSans-Black.ttf +0 -0
  22. package/template/android/app/src/main/assets/fonts/MonaSans-BlackItalic.ttf +0 -0
  23. package/template/android/app/src/main/assets/fonts/MonaSans-Bold.ttf +0 -0
  24. package/template/android/app/src/main/assets/fonts/MonaSans-BoldItalic.ttf +0 -0
  25. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraBold.ttf +0 -0
  26. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraBoldItalic.ttf +0 -0
  27. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraLight.ttf +0 -0
  28. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraLightItalic.ttf +0 -0
  29. package/template/android/app/src/main/assets/fonts/MonaSans-Italic.ttf +0 -0
  30. package/template/android/app/src/main/assets/fonts/MonaSans-Light.ttf +0 -0
  31. package/template/android/app/src/main/assets/fonts/MonaSans-LightItalic.ttf +0 -0
  32. package/template/android/app/src/main/assets/fonts/MonaSans-Medium.ttf +0 -0
  33. package/template/android/app/src/main/assets/fonts/MonaSans-MediumItalic.ttf +0 -0
  34. package/template/android/app/src/main/assets/fonts/MonaSans-Regular.ttf +0 -0
  35. package/template/android/app/src/main/assets/fonts/MonaSans-SemiBold.ttf +0 -0
  36. package/template/android/app/src/main/assets/fonts/MonaSans-SemiBoldItalic.ttf +0 -0
  37. package/template/android/app/src/main/java/com/awesomeproject/MainActivity.kt +22 -0
  38. package/template/android/app/src/main/java/com/awesomeproject/MainApplication.kt +27 -0
  39. package/template/android/app/src/main/res/drawable/launch_screen.png +0 -0
  40. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  41. package/template/android/app/src/main/res/layout/launch_screen.xml +12 -0
  42. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  43. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  44. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  45. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  46. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  47. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  48. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  49. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  50. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  51. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  52. package/template/android/app/src/main/res/values/colors.xml +3 -0
  53. package/template/android/app/src/main/res/values/strings.xml +3 -0
  54. package/template/android/app/src/main/res/values/styles.xml +11 -0
  55. package/template/android/build.gradle +21 -0
  56. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  57. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  58. package/template/android/gradle.properties +44 -0
  59. package/template/android/gradlew +248 -0
  60. package/template/android/gradlew.bat +98 -0
  61. package/template/android/link-assets-manifest.json +69 -0
  62. package/template/android/settings.gradle +6 -0
  63. package/template/app.json +4 -0
  64. package/template/babel.config.js +4 -0
  65. package/template/declarations.d.ts +6 -0
  66. package/template/env.example +20 -0
  67. package/template/index.js +10 -0
  68. package/template/ios/.xcode.env +11 -0
  69. package/template/ios/.xcode.env.local +1 -0
  70. package/template/ios/AwesomeProject/AppDelegate.swift +60 -0
  71. package/template/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  72. package/template/ios/AwesomeProject/Images.xcassets/Contents.json +6 -0
  73. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Contents.json +23 -0
  74. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@1x.png +0 -0
  75. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@2x.png +0 -0
  76. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@3x.png +0 -0
  77. package/template/ios/AwesomeProject/Info.plist +89 -0
  78. package/template/ios/AwesomeProject/LaunchScreen.storyboard +40 -0
  79. package/template/ios/AwesomeProject/PrivacyInfo.xcprivacy +38 -0
  80. package/template/ios/AwesomeProject.xcodeproj/project.pbxproj +576 -0
  81. package/template/ios/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject.xcscheme +88 -0
  82. package/template/ios/AwesomeProject.xcworkspace/contents.xcworkspacedata +10 -0
  83. package/template/ios/Podfile +68 -0
  84. package/template/ios/link-assets-manifest.json +69 -0
  85. package/template/jest.config.js +3 -0
  86. package/template/metro.config.js +24 -0
  87. package/template/package.json +68 -0
  88. package/template/react-native.config.js +7 -0
  89. package/template/src/assets/fonts/MonaSans-Black.ttf +0 -0
  90. package/template/src/assets/fonts/MonaSans-BlackItalic.ttf +0 -0
  91. package/template/src/assets/fonts/MonaSans-Bold.ttf +0 -0
  92. package/template/src/assets/fonts/MonaSans-BoldItalic.ttf +0 -0
  93. package/template/src/assets/fonts/MonaSans-ExtraBold.ttf +0 -0
  94. package/template/src/assets/fonts/MonaSans-ExtraBoldItalic.ttf +0 -0
  95. package/template/src/assets/fonts/MonaSans-ExtraLight.ttf +0 -0
  96. package/template/src/assets/fonts/MonaSans-ExtraLightItalic.ttf +0 -0
  97. package/template/src/assets/fonts/MonaSans-Italic.ttf +0 -0
  98. package/template/src/assets/fonts/MonaSans-Light.ttf +0 -0
  99. package/template/src/assets/fonts/MonaSans-LightItalic.ttf +0 -0
  100. package/template/src/assets/fonts/MonaSans-Medium.ttf +0 -0
  101. package/template/src/assets/fonts/MonaSans-MediumItalic.ttf +0 -0
  102. package/template/src/assets/fonts/MonaSans-Regular.ttf +0 -0
  103. package/template/src/assets/fonts/MonaSans-SemiBold.ttf +0 -0
  104. package/template/src/assets/fonts/MonaSans-SemiBoldItalic.ttf +0 -0
  105. package/template/src/assets/image/BackGroundAuth.png +0 -0
  106. package/template/src/assets/image/BackgroundVerification.png +0 -0
  107. package/template/src/assets/image/logo.png +0 -0
  108. package/template/src/assets/svg/add-circle.svg +5 -0
  109. package/template/src/assets/svg/airConditioning.svg +12 -0
  110. package/template/src/assets/svg/apple.svg +3 -0
  111. package/template/src/assets/svg/arrowDown.svg +3 -0
  112. package/template/src/assets/svg/back.svg +10 -0
  113. package/template/src/assets/svg/bag.svg +11 -0
  114. package/template/src/assets/svg/calender.svg +5 -0
  115. package/template/src/assets/svg/car.svg +10 -0
  116. package/template/src/assets/svg/carConfirm.svg +60 -0
  117. package/template/src/assets/svg/chatActive.svg +3 -0
  118. package/template/src/assets/svg/chatUnActive.svg +3 -0
  119. package/template/src/assets/svg/document-text.svg +6 -0
  120. package/template/src/assets/svg/gender.svg +11 -0
  121. package/template/src/assets/svg/google.svg +6 -0
  122. package/template/src/assets/svg/headphone.svg +3 -0
  123. package/template/src/assets/svg/homeActive.svg +3 -0
  124. package/template/src/assets/svg/homeUnActive.svg +3 -0
  125. package/template/src/assets/svg/logo.svg +18 -0
  126. package/template/src/assets/svg/logout.svg +5 -0
  127. package/template/src/assets/svg/maxBack.svg +4 -0
  128. package/template/src/assets/svg/message-text.svg +7 -0
  129. package/template/src/assets/svg/music.svg +5 -0
  130. package/template/src/assets/svg/noSmoking.svg +10 -0
  131. package/template/src/assets/svg/notification.svg +5 -0
  132. package/template/src/assets/svg/passenger.svg +4 -0
  133. package/template/src/assets/svg/phone.svg +3 -0
  134. package/template/src/assets/svg/rightArrow.svg +3 -0
  135. package/template/src/assets/svg/security-user.svg +5 -0
  136. package/template/src/assets/svg/star.svg +3 -0
  137. package/template/src/assets/svg/tick-circle.svg +4 -0
  138. package/template/src/assets/svg/trafficLight.svg +41 -0
  139. package/template/src/assets/svg/tripActive.svg +10 -0
  140. package/template/src/assets/svg/tripUnActive.svg +10 -0
  141. package/template/src/assets/svg/usbChargers.svg +3 -0
  142. package/template/src/assets/svg/user.svg +4 -0
  143. package/template/src/assets/svg/userActive.svg +3 -0
  144. package/template/src/assets/svg/userPlaceholder.svg +3 -0
  145. package/template/src/assets/svg/userUnActive.svg +3 -0
  146. package/template/src/components/AuthLayout/AuthLayout.tsx +170 -0
  147. package/template/src/components/AuthLayout/index.ts +1 -0
  148. package/template/src/components/BottomSheet/BottomSheet.tsx +73 -0
  149. package/template/src/components/BottomSheet/BottomSheetAlert.tsx +100 -0
  150. package/template/src/components/BottomSheet/CenterAlert.tsx +153 -0
  151. package/template/src/components/BottomSheet/index.ts +2 -0
  152. package/template/src/components/BottomTabBar/index.tsx +145 -0
  153. package/template/src/components/Button/RNButton.tsx +152 -0
  154. package/template/src/components/Button/index.ts +2 -0
  155. package/template/src/components/Common/Avatar.tsx +80 -0
  156. package/template/src/components/Common/Card.tsx +49 -0
  157. package/template/src/components/Common/CardBrandLogo.tsx +66 -0
  158. package/template/src/components/Common/Checkbox.tsx +65 -0
  159. package/template/src/components/Common/Chip.tsx +79 -0
  160. package/template/src/components/Common/CommonStyles.tsx +594 -0
  161. package/template/src/components/Common/Divider.tsx +33 -0
  162. package/template/src/components/Common/DriverTripCard.tsx +308 -0
  163. package/template/src/components/Common/Dropdown.tsx +161 -0
  164. package/template/src/components/Common/EmptyState.tsx +52 -0
  165. package/template/src/components/Common/FAB.tsx +68 -0
  166. package/template/src/components/Common/HeaderLocation.tsx +108 -0
  167. package/template/src/components/Common/Loader.tsx +23 -0
  168. package/template/src/components/Common/RatingStars.tsx +103 -0
  169. package/template/src/components/Common/RouteDots.tsx +98 -0
  170. package/template/src/components/Common/SegmentedControl.tsx +126 -0
  171. package/template/src/components/Common/SosButton.tsx +80 -0
  172. package/template/src/components/Common/SosSheet.tsx +344 -0
  173. package/template/src/components/Common/StarRating.tsx +58 -0
  174. package/template/src/components/Common/StatusBadge.tsx +56 -0
  175. package/template/src/components/Common/Toggle.tsx +66 -0
  176. package/template/src/components/Common/TripCard.tsx +247 -0
  177. package/template/src/components/Common/UploadBox.tsx +106 -0
  178. package/template/src/components/Container/MainContainer.tsx +76 -0
  179. package/template/src/components/Container/index.ts +1 -0
  180. package/template/src/components/Header/index.tsx +143 -0
  181. package/template/src/components/Icon/SvgIcons.tsx +1991 -0
  182. package/template/src/components/ImagePickerSheet/ImagePickerSheet.tsx +233 -0
  183. package/template/src/components/ImagePickerSheet/index.ts +2 -0
  184. package/template/src/components/Input/CountryDropdown.tsx +71 -0
  185. package/template/src/components/Input/OtpInput.tsx +117 -0
  186. package/template/src/components/Input/RNInput.tsx +138 -0
  187. package/template/src/components/Input/index.ts +4 -0
  188. package/template/src/components/Picker/DatePickerSheet.tsx +393 -0
  189. package/template/src/components/Picker/PassengerPickerSheet.tsx +237 -0
  190. package/template/src/components/Text/RNText.tsx +62 -0
  191. package/template/src/components/Text/index.ts +1 -0
  192. package/template/src/components/index.ts +44 -0
  193. package/template/src/hooks/useCurrentLocation.ts +72 -0
  194. package/template/src/localization/i18n.ts +29 -0
  195. package/template/src/localization/i18next.d.ts +11 -0
  196. package/template/src/localization/index.ts +4 -0
  197. package/template/src/localization/languageStorage.ts +27 -0
  198. package/template/src/localization/languages.ts +62 -0
  199. package/template/src/localization/resources/en.ts +703 -0
  200. package/template/src/localization/resources/fr.ts +703 -0
  201. package/template/src/localization/useLanguage.ts +42 -0
  202. package/template/src/navigation/AuthNavigation.tsx +23 -0
  203. package/template/src/navigation/BottomTabs.tsx +24 -0
  204. package/template/src/navigation/RootNavigation.tsx +27 -0
  205. package/template/src/navigation/RouteKey.ts +22 -0
  206. package/template/src/navigation/StackNavigation.tsx +52 -0
  207. package/template/src/navigation/paramLists.ts +25 -0
  208. package/template/src/redux/slice/app.ts +66 -0
  209. package/template/src/redux/slice/auth.ts +40 -0
  210. package/template/src/redux/slice/userProfile.ts +124 -0
  211. package/template/src/redux/store.ts +17 -0
  212. package/template/src/screen/auth/Login.tsx +69 -0
  213. package/template/src/screen/onboarding/LanguageSelection.tsx +231 -0
  214. package/template/src/screen/root/home/index.tsx +36 -0
  215. package/template/src/screen/root/profile/index.tsx +69 -0
  216. package/template/src/screen/shared/Chat.tsx +308 -0
  217. package/template/src/screen/shared/EditProfile.tsx +407 -0
  218. package/template/src/screen/shared/HelpSupport.tsx +678 -0
  219. package/template/src/screen/shared/LocationSearch.tsx +362 -0
  220. package/template/src/screen/shared/Messages.tsx +115 -0
  221. package/template/src/screen/shared/Notifications.tsx +86 -0
  222. package/template/src/screen/shared/PrivacyPolicy.tsx +297 -0
  223. package/template/src/screen/shared/Profile.tsx +118 -0
  224. package/template/src/screen/shared/Ratings.tsx +170 -0
  225. package/template/src/screen/shared/TermsConditions.tsx +315 -0
  226. package/template/src/screen/shared/profile/DriverProfile.tsx +262 -0
  227. package/template/src/screen/shared/profile/PassengerProfile.tsx +123 -0
  228. package/template/src/screen/shared/profile/ProfileParts.tsx +219 -0
  229. package/template/src/services/Config.ts +37 -0
  230. package/template/src/services/api.ts +37 -0
  231. package/template/src/services/index.ts +4 -0
  232. package/template/src/services/places.ts +320 -0
  233. package/template/src/services/storage.ts +33 -0
  234. package/template/src/theme/fonts.ts +30 -0
  235. package/template/src/theme/index.ts +3 -0
  236. package/template/src/theme/spacing.ts +66 -0
  237. package/template/src/theme/theme.ts +58 -0
  238. package/template/src/types/env.d.ts +8 -0
  239. package/template/src/types/index.ts +3 -0
  240. package/template/src/utils/card.ts +101 -0
  241. package/template/src/utils/constants.ts +39 -0
  242. package/template/src/utils/functions.ts +24 -0
  243. package/template/tsconfig.json +8 -0
@@ -0,0 +1,594 @@
1
+ import { Appearance, Dimensions, Platform, StyleSheet } from "react-native";
2
+ import { moderateScale } from "react-native-size-matters";
3
+
4
+ const { width, height } = Dimensions.get("window");
5
+ const colorScheme = Appearance.getColorScheme();
6
+ const shadowColor = colorScheme === "dark" ? "#fff" : "#000";
7
+
8
+ export const CommonStyles = StyleSheet.create({
9
+ flex1: {
10
+ flex: 1,
11
+ },
12
+ flexGrow1: {
13
+ flexGrow: 1,
14
+ },
15
+ flexWrap: {
16
+ flexWrap: "wrap",
17
+ },
18
+
19
+ flexDirectionRow: {
20
+ flexDirection: "row",
21
+ },
22
+ flexDirectionColumn: {
23
+ flexDirection: "column",
24
+ },
25
+
26
+ alignCenter: {
27
+ alignItems: "center",
28
+ },
29
+ alignStart: {
30
+ alignItems: "flex-start",
31
+ },
32
+ alignEnd: {
33
+ alignItems: "flex-end",
34
+ },
35
+
36
+ /** Justification **/
37
+ justifyCenter: {
38
+ justifyContent: "center",
39
+ },
40
+ justifyBetween: {
41
+ justifyContent: "space-between",
42
+ },
43
+ justifyAround: {
44
+ justifyContent: "space-around",
45
+ },
46
+ justifyEvenly: {
47
+ justifyContent: "space-evenly",
48
+ },
49
+ justifyStart: {
50
+ justifyContent: "flex-start",
51
+ },
52
+ justifyEnd: {
53
+ justifyContent: "flex-end",
54
+ },
55
+
56
+ centerAll: {
57
+ flex: 1,
58
+ justifyContent: "center",
59
+ alignItems: "center",
60
+ },
61
+ centerX: {
62
+ justifyContent: "center",
63
+ },
64
+ centerXY: {
65
+ justifyContent: "center",
66
+ alignItems: "center",
67
+ },
68
+ centerY: {
69
+ alignItems: "center",
70
+ },
71
+
72
+ flexStartAll: {
73
+ flex: 1,
74
+ justifyContent: "flex-start",
75
+ alignItems: "flex-start",
76
+ },
77
+ flexStartX: {
78
+ justifyContent: "flex-start",
79
+ },
80
+ flexStartY: {
81
+ alignItems: "flex-start",
82
+ },
83
+
84
+ flexEndAll: {
85
+ flex: 1,
86
+ justifyContent: "flex-end",
87
+ alignItems: "flex-end",
88
+ },
89
+ flexEndX: {
90
+ justifyContent: "flex-end",
91
+ },
92
+ flexEndY: {
93
+ alignItems: "flex-end",
94
+ },
95
+
96
+ spaceBetweenAll: {
97
+ flex: 1,
98
+ justifyContent: "space-between",
99
+ alignItems: "center",
100
+ },
101
+ spaceAroundAll: {
102
+ flex: 1,
103
+ justifyContent: "space-around",
104
+ alignItems: "center",
105
+ },
106
+ spaceEvenlyAll: {
107
+ flex: 1,
108
+ justifyContent: "space-evenly",
109
+ alignItems: "center",
110
+ },
111
+ spaceCenterAll: {
112
+ flex: 1,
113
+ justifyContent: "center",
114
+ alignItems: "center",
115
+ },
116
+ flexBetweenCenter: {
117
+ flexDirection: "row",
118
+ justifyContent: "space-between",
119
+ alignItems: "center",
120
+ },
121
+ flexCenter: {
122
+ flexDirection: "row",
123
+ alignItems: "center",
124
+ gap: moderateScale(10),
125
+ },
126
+ flexCenterAll: {
127
+ flexDirection: "row",
128
+ alignItems: "center",
129
+ justifyContent: "center",
130
+ gap: moderateScale(5),
131
+ },
132
+ flexAroundCenter: {
133
+ flexDirection: "row",
134
+ justifyContent: "space-around",
135
+ alignItems: "center",
136
+ },
137
+ /** MARGINS */
138
+ m5: { margin: moderateScale(5) },
139
+ m10: { margin: moderateScale(10) },
140
+ m15: { margin: moderateScale(15) },
141
+
142
+ mt5: { marginTop: moderateScale(5) },
143
+ mt10: { marginTop: moderateScale(10) },
144
+ mt15: { marginTop: moderateScale(15) },
145
+
146
+ mb5: { marginBottom: moderateScale(5) },
147
+ mb10: { marginBottom: moderateScale(10) },
148
+ mb15: { marginBottom: moderateScale(15) },
149
+
150
+ ml5: { marginLeft: moderateScale(5) },
151
+ ml10: { marginLeft: moderateScale(10) },
152
+ ml15: { marginLeft: moderateScale(15) },
153
+
154
+ mr5: { marginRight: moderateScale(5) },
155
+ mr10: { marginRight: moderateScale(10) },
156
+ mr15: { marginRight: moderateScale(15) },
157
+
158
+ /** MARGIN VERTICAL & HORIZONTAL **/
159
+ mv5: { marginVertical: moderateScale(5) },
160
+ mv10: { marginVertical: moderateScale(10) },
161
+ mv15: { marginVertical: moderateScale(15) },
162
+ mv20: { marginVertical: moderateScale(20) },
163
+
164
+ mh5: { marginHorizontal: moderateScale(5) },
165
+ mh10: { marginHorizontal: moderateScale(10) },
166
+ mh15: { marginHorizontal: moderateScale(15) },
167
+ mh20: { marginHorizontal: moderateScale(20) },
168
+
169
+ /** PADDINGS **/
170
+ p5: { padding: moderateScale(5) },
171
+ p10: { padding: moderateScale(10) },
172
+ p15: { padding: moderateScale(15) },
173
+
174
+ pt5: { paddingTop: moderateScale(5) },
175
+ pt10: { paddingTop: moderateScale(10) },
176
+ pt15: { paddingTop: moderateScale(15) },
177
+
178
+ pb5: { paddingBottom: moderateScale(5) },
179
+ pb10: { paddingBottom: moderateScale(10) },
180
+ pb15: { paddingBottom: moderateScale(15) },
181
+
182
+ pl5: { paddingLeft: moderateScale(5) },
183
+ pl10: { paddingLeft: moderateScale(10) },
184
+ pl15: { paddingLeft: moderateScale(15) },
185
+
186
+ pr5: { paddingRight: moderateScale(5) },
187
+ pr10: { paddingRight: moderateScale(10) },
188
+ pr15: { paddingRight: moderateScale(15) },
189
+
190
+ /** PADDING VERTICAL & HORIZONTAL **/
191
+ pv5: { paddingVertical: moderateScale(5) },
192
+ pv10: { paddingVertical: moderateScale(10) },
193
+ pv15: { paddingVertical: moderateScale(15) },
194
+
195
+ ph5: { paddingHorizontal: moderateScale(5) },
196
+ ph10: { paddingHorizontal: moderateScale(10) },
197
+ ph15: { paddingHorizontal: moderateScale(15) },
198
+
199
+ /** MARGINS (Percentage-based) **/
200
+ m1p: { margin: height * 0.01 },
201
+ m2p: { margin: height * 0.02 },
202
+ m3p: { margin: height * 0.03 },
203
+ m4p: { margin: height * 0.04 },
204
+ m5p: { margin: height * 0.05 },
205
+ m6p: { margin: height * 0.06 },
206
+ m7p: { margin: height * 0.07 },
207
+ m8p: { margin: height * 0.08 },
208
+ m9p: { margin: height * 0.09 },
209
+ m10p: { margin: height * 0.1 },
210
+
211
+ mt1p: { marginTop: height * 0.01 },
212
+ mt2p: { marginTop: height * 0.02 },
213
+ mt3p: { marginTop: height * 0.03 },
214
+ mt4p: { marginTop: height * 0.04 },
215
+ mt5p: { marginTop: height * 0.05 },
216
+ mt6p: { marginTop: height * 0.06 },
217
+ mt7p: { marginTop: height * 0.07 },
218
+ mt8p: { marginTop: height * 0.08 },
219
+ mt9p: { marginTop: height * 0.09 },
220
+ mt10p: { marginTop: height * 0.1 },
221
+
222
+ mb1p: { marginBottom: height * 0.01 },
223
+ mb2p: { marginBottom: height * 0.02 },
224
+ mb3p: { marginBottom: height * 0.03 },
225
+ mb4p: { marginBottom: height * 0.04 },
226
+ mb5p: { marginBottom: height * 0.05 },
227
+ mb6p: { marginBottom: height * 0.06 },
228
+ mb7p: { marginBottom: height * 0.07 },
229
+ mb8p: { marginBottom: height * 0.08 },
230
+ mb9p: { marginBottom: height * 0.09 },
231
+ mb10p: { marginBottom: height * 0.1 },
232
+ mb11p: { marginBottom: height * 0.11 },
233
+ mb12p: { marginBottom: height * 0.12 },
234
+ mb13p: { marginBottom: height * 0.13 },
235
+ mb14p: { marginBottom: height * 0.14 },
236
+ mb15p: { marginBottom: height * 0.15 },
237
+ mb16p: { marginBottom: height * 0.16 },
238
+ mb17p: { marginBottom: height * 0.17 },
239
+ mb18p: { marginBottom: height * 0.18 },
240
+ mb19p: { marginBottom: height * 0.19 },
241
+ mb20p: { marginBottom: height * 0.2 },
242
+
243
+ ml1p: { marginLeft: width * 0.01 },
244
+ ml2p: { marginLeft: width * 0.02 },
245
+ ml3p: { marginLeft: width * 0.03 },
246
+ ml4p: { marginLeft: width * 0.04 },
247
+ ml5p: { marginLeft: width * 0.05 },
248
+ ml6p: { marginLeft: width * 0.06 },
249
+ ml7p: { marginLeft: width * 0.07 },
250
+ ml8p: { marginLeft: width * 0.08 },
251
+ ml9p: { marginLeft: width * 0.09 },
252
+ ml10p: { marginLeft: width * 0.1 },
253
+
254
+ mr1p: { marginRight: width * 0.01 },
255
+ mr2p: { marginRight: width * 0.02 },
256
+ mr3p: { marginRight: width * 0.03 },
257
+ mr4p: { marginRight: width * 0.04 },
258
+ mr5p: { marginRight: width * 0.05 },
259
+ mr6p: { marginRight: width * 0.06 },
260
+ mr7p: { marginRight: width * 0.07 },
261
+ mr8p: { marginRight: width * 0.08 },
262
+ mr9p: { marginRight: width * 0.09 },
263
+ mr10p: { marginRight: width * 0.1 },
264
+
265
+ mh1p: { marginHorizontal: width * 0.01 },
266
+ mh2p: { marginHorizontal: width * 0.02 },
267
+ mh3p: { marginHorizontal: width * 0.03 },
268
+ mh4p: { marginHorizontal: width * 0.04 },
269
+ mh5p: { marginHorizontal: width * 0.05 },
270
+ mh6p: { marginHorizontal: width * 0.06 },
271
+ mh7p: { marginHorizontal: width * 0.07 },
272
+ mh8p: { marginHorizontal: width * 0.08 },
273
+ mh9p: { marginHorizontal: width * 0.09 },
274
+ mh10p: { marginHorizontal: width * 0.1 },
275
+
276
+ mv1p: { marginVertical: height * 0.01 },
277
+ mv2p: { marginVertical: height * 0.02 },
278
+ mv3p: { marginVertical: height * 0.03 },
279
+ mv4p: { marginVertical: height * 0.04 },
280
+ mv5p: { marginVertical: height * 0.05 },
281
+ mv6p: { marginVertical: height * 0.06 },
282
+ mv7p: { marginVertical: height * 0.07 },
283
+ mv8p: { marginVertical: height * 0.08 },
284
+ mv9p: { marginVertical: height * 0.09 },
285
+ mv10p: { marginVertical: height * 0.1 },
286
+
287
+ /** PADDING (Percentage-based) **/
288
+ p1p: { padding: height * 0.01 },
289
+ p2p: { padding: height * 0.02 },
290
+ p3p: { padding: height * 0.03 },
291
+ p4p: { padding: height * 0.04 },
292
+ p5p: { padding: height * 0.05 },
293
+ p6p: { padding: height * 0.06 },
294
+ p7p: { padding: height * 0.07 },
295
+ p8p: { padding: height * 0.08 },
296
+ p9p: { padding: height * 0.09 },
297
+ p10p: { padding: height * 0.1 },
298
+
299
+ pt1p: { paddingTop: height * 0.01 },
300
+ pt2p: { paddingTop: height * 0.02 },
301
+ pt3p: { paddingTop: height * 0.03 },
302
+ pt4p: { paddingTop: height * 0.04 },
303
+ pt5p: { paddingTop: height * 0.05 },
304
+ pt6p: { paddingTop: height * 0.06 },
305
+ pt7p: { paddingTop: height * 0.07 },
306
+ pt8p: { paddingTop: height * 0.08 },
307
+ pt9p: { paddingTop: height * 0.09 },
308
+ pt10p: { paddingTop: height * 0.1 },
309
+
310
+ pb1p: { paddingBottom: height * 0.01 },
311
+ pb2p: { paddingBottom: height * 0.02 },
312
+ pb3p: { paddingBottom: height * 0.03 },
313
+ pb4p: { paddingBottom: height * 0.04 },
314
+ pb5p: { paddingBottom: height * 0.05 },
315
+ pb6p: { paddingBottom: height * 0.06 },
316
+ pb7p: { paddingBottom: height * 0.07 },
317
+ pb8p: { paddingBottom: height * 0.08 },
318
+ pb9p: { paddingBottom: height * 0.09 },
319
+ pb10p: { paddingBottom: height * 0.1 },
320
+
321
+ pl1p: { paddingLeft: width * 0.01 },
322
+ pl2p: { paddingLeft: width * 0.02 },
323
+ pl3p: { paddingLeft: width * 0.03 },
324
+ pl4p: { paddingLeft: width * 0.04 },
325
+ pl5p: { paddingLeft: width * 0.05 },
326
+ pl6p: { paddingLeft: width * 0.06 },
327
+ pl7p: { paddingLeft: width * 0.07 },
328
+ pl8p: { paddingLeft: width * 0.08 },
329
+ pl9p: { paddingLeft: width * 0.09 },
330
+ pl10p: { paddingLeft: width * 0.1 },
331
+
332
+ pr1p: { paddingRight: width * 0.01 },
333
+ pr2p: { paddingRight: width * 0.02 },
334
+ pr3p: { paddingRight: width * 0.03 },
335
+ pr4p: { paddingRight: width * 0.04 },
336
+ pr5p: { paddingRight: width * 0.05 },
337
+ pr6p: { paddingRight: width * 0.06 },
338
+ pr7p: { paddingRight: width * 0.07 },
339
+ pr8p: { paddingRight: width * 0.08 },
340
+ pr9p: { paddingRight: width * 0.09 },
341
+ pr10p: { paddingRight: width * 0.1 },
342
+
343
+ ph1p: { paddingHorizontal: width * 0.01 },
344
+ ph2p: { paddingHorizontal: width * 0.02 },
345
+ ph3p: { paddingHorizontal: width * 0.03 },
346
+ ph4p: { paddingHorizontal: width * 0.04 },
347
+ ph5p: { paddingHorizontal: width * 0.05 },
348
+ ph6p: { paddingHorizontal: width * 0.06 },
349
+ ph7p: { paddingHorizontal: width * 0.07 },
350
+ ph8p: { paddingHorizontal: width * 0.08 },
351
+ ph9p: { paddingHorizontal: width * 0.09 },
352
+ ph10p: { paddingHorizontal: width * 0.1 },
353
+
354
+ pv1p: { paddingVertical: height * 0.01 },
355
+ pv2p: { paddingVertical: height * 0.02 },
356
+ pv3p: { paddingVertical: height * 0.03 },
357
+ pv4p: { paddingVertical: height * 0.04 },
358
+ pv5p: { paddingVertical: height * 0.05 },
359
+ pv6p: { paddingVertical: height * 0.06 },
360
+ pv7p: { paddingVertical: height * 0.07 },
361
+ pv8p: { paddingVertical: height * 0.08 },
362
+ pv9p: { paddingVertical: height * 0.09 },
363
+ pv10p: { paddingVertical: height * 0.1 },
364
+
365
+ w1p: { width: width * 0.01 },
366
+ w2p: { width: width * 0.02 },
367
+ w3p: { width: width * 0.03 },
368
+ w4p: { width: width * 0.04 },
369
+ w5p: { width: width * 0.05 },
370
+ w6p: { width: width * 0.06 },
371
+ w7p: { width: width * 0.07 },
372
+ w8p: { width: width * 0.08 },
373
+ w9p: { width: width * 0.09 },
374
+ w10p: { width: width * 0.1 },
375
+ w11p: { width: width * 0.11 },
376
+ w12p: { width: width * 0.12 },
377
+ w13p: { width: width * 0.13 },
378
+ w14p: { width: width * 0.14 },
379
+ w15p: { width: width * 0.15 },
380
+ w16p: { width: width * 0.16 },
381
+ w17p: { width: width * 0.17 },
382
+ w18p: { width: width * 0.18 },
383
+ w19p: { width: width * 0.19 },
384
+ w20p: { width: width * 0.2 },
385
+ w21p: { width: width * 0.21 },
386
+ w22p: { width: width * 0.22 },
387
+ w23p: { width: width * 0.23 },
388
+ w24p: { width: width * 0.24 },
389
+ w25p: { width: width * 0.25 },
390
+ w26p: { width: width * 0.26 },
391
+ w27p: { width: width * 0.27 },
392
+ w28p: { width: width * 0.28 },
393
+ w29p: { width: width * 0.29 },
394
+ w30p: { width: width * 0.3 },
395
+ w31p: { width: width * 0.31 },
396
+ w32p: { width: width * 0.32 },
397
+ w33p: { width: width * 0.33 },
398
+ w34p: { width: width * 0.34 },
399
+ w35p: { width: width * 0.35 },
400
+ w36p: { width: width * 0.36 },
401
+ w37p: { width: width * 0.37 },
402
+ w38p: { width: width * 0.38 },
403
+ w39p: { width: width * 0.39 },
404
+ w40p: { width: width * 0.4 },
405
+ w41p: { width: width * 0.41 },
406
+ w42p: { width: width * 0.42 },
407
+ w43p: { width: width * 0.43 },
408
+ w44p: { width: width * 0.44 },
409
+ w45p: { width: width * 0.45 },
410
+ w46p: { width: width * 0.46 },
411
+ w47p: { width: width * 0.47 },
412
+ w48p: { width: width * 0.48 },
413
+ w49p: { width: width * 0.49 },
414
+ w50p: { width: width * 0.5 },
415
+ w51p: { width: width * 0.51 },
416
+ w52p: { width: width * 0.52 },
417
+ w53p: { width: width * 0.53 },
418
+ w54p: { width: width * 0.54 },
419
+ w55p: { width: width * 0.55 },
420
+ w56p: { width: width * 0.56 },
421
+ w57p: { width: width * 0.57 },
422
+ w58p: { width: width * 0.58 },
423
+ w59p: { width: width * 0.59 },
424
+ w60p: { width: width * 0.6 },
425
+ w61p: { width: width * 0.61 },
426
+ w62p: { width: width * 0.62 },
427
+ w63p: { width: width * 0.63 },
428
+ w64p: { width: width * 0.64 },
429
+ w65p: { width: width * 0.65 },
430
+ w66p: { width: width * 0.66 },
431
+ w67p: { width: width * 0.67 },
432
+ w68p: { width: width * 0.68 },
433
+ w69p: { width: width * 0.69 },
434
+ w70p: { width: width * 0.7 },
435
+ w71p: { width: width * 0.71 },
436
+ w72p: { width: width * 0.72 },
437
+ w73p: { width: width * 0.73 },
438
+ w74p: { width: width * 0.74 },
439
+ w75p: { width: width * 0.75 },
440
+ w76p: { width: width * 0.76 },
441
+ w77p: { width: width * 0.77 },
442
+ w78p: { width: width * 0.78 },
443
+ w79p: { width: width * 0.79 },
444
+ w80p: { width: width * 0.8 },
445
+ w81p: { width: width * 0.81 },
446
+ w82p: { width: width * 0.82 },
447
+ w83p: { width: width * 0.83 },
448
+ w84p: { width: width * 0.84 },
449
+ w85p: { width: width * 0.85 },
450
+ w86p: { width: width * 0.86 },
451
+ w87p: { width: width * 0.87 },
452
+ w88p: { width: width * 0.88 },
453
+ w89p: { width: width * 0.89 },
454
+ w90p: { width: width * 0.9 },
455
+ w91p: { width: width * 0.91 },
456
+ w92p: { width: width * 0.92 },
457
+ w93p: { width: width * 0.93 },
458
+ w94p: { width: width * 0.94 },
459
+ w95p: { width: width * 0.95 },
460
+ w96p: { width: width * 0.96 },
461
+ w97p: { width: width * 0.97 },
462
+ w98p: { width: width * 0.98 },
463
+ w99p: { width: width * 0.99 },
464
+ w100p: { width: width },
465
+
466
+ /** TEXT STYLES */
467
+ textBold: { fontWeight: "bold" },
468
+ textSemiBold: { fontWeight: "600" },
469
+ textMedium: { fontWeight: "500" },
470
+ textRegular: { fontWeight: "400" },
471
+ textLight: { fontWeight: "300" },
472
+ textThin: { fontWeight: "200" },
473
+ textExtraBold: { fontWeight: "800" },
474
+ textExtraLight: { fontWeight: "100" },
475
+
476
+ textCenter: { textAlign: "center" },
477
+ textLeft: { textAlign: "left" },
478
+ textRight: { textAlign: "right" },
479
+
480
+ text10: { fontSize: moderateScale(10) },
481
+ text12: { fontSize: moderateScale(12) },
482
+ text14: { fontSize: moderateScale(14) },
483
+ text16: { fontSize: moderateScale(16) },
484
+ text18: { fontSize: moderateScale(18) },
485
+ text20: { fontSize: moderateScale(20) },
486
+ text22: { fontSize: moderateScale(22) },
487
+ text24: { fontSize: moderateScale(24) },
488
+ text26: { fontSize: moderateScale(26) },
489
+ text28: { fontSize: moderateScale(28) },
490
+ text30: { fontSize: moderateScale(30) },
491
+
492
+ textWhite: {
493
+ color: "#fff",
494
+ },
495
+ textBlack: {
496
+ color: "#000",
497
+ },
498
+ textGray: {
499
+ color: "gray",
500
+ },
501
+
502
+ /** BORDERS */
503
+ borderRadius5: {
504
+ borderRadius: moderateScale(5),
505
+ },
506
+ borderRadius10: {
507
+ borderRadius: moderateScale(10),
508
+ },
509
+ borderRadius15: {
510
+ borderRadius: moderateScale(15),
511
+ },
512
+ borderRadius20: {
513
+ borderRadius: moderateScale(20),
514
+ },
515
+ borderRadius25: {
516
+ borderRadius: moderateScale(25),
517
+ },
518
+ borderRadius30: {
519
+ borderRadius: moderateScale(30),
520
+ },
521
+ borderWidth1: {
522
+ borderWidth: moderateScale(1),
523
+ borderColor: "#ccc",
524
+ },
525
+ borderWidth2: {
526
+ borderWidth: moderateScale(2),
527
+ borderColor: "#888",
528
+ },
529
+ shadow1: {
530
+ ...Platform.select({
531
+ ios: {
532
+ shadowColor: shadowColor,
533
+ shadowOffset: { width: 0, height: 1 },
534
+ shadowOpacity: 0.1,
535
+ shadowRadius: 1,
536
+ },
537
+ android: {
538
+ elevation: 1,
539
+ },
540
+ }),
541
+ },
542
+ shadow2: {
543
+ ...Platform.select({
544
+ ios: {
545
+ shadowColor: shadowColor,
546
+ shadowOffset: { width: 0, height: 2 },
547
+ shadowOpacity: 0.15,
548
+ shadowRadius: 2,
549
+ },
550
+ android: {
551
+ elevation: 2,
552
+ },
553
+ }),
554
+ },
555
+ shadow3: {
556
+ ...Platform.select({
557
+ ios: {
558
+ shadowColor: shadowColor,
559
+ shadowOffset: { width: 0, height: 3 },
560
+ shadowOpacity: 0.2,
561
+ shadowRadius: 3,
562
+ },
563
+ android: {
564
+ elevation: 3,
565
+ },
566
+ }),
567
+ },
568
+ shadow4: {
569
+ ...Platform.select({
570
+ ios: {
571
+ shadowColor: shadowColor,
572
+ shadowOffset: { width: 0, height: 4 },
573
+ shadowOpacity: 0.25,
574
+ shadowRadius: 4,
575
+ },
576
+ android: {
577
+ elevation: 4,
578
+ },
579
+ }),
580
+ },
581
+ shadow5: {
582
+ ...Platform.select({
583
+ ios: {
584
+ shadowColor: shadowColor,
585
+ shadowOffset: { width: 0, height: 5 },
586
+ shadowOpacity: 0.3,
587
+ shadowRadius: 5,
588
+ },
589
+ android: {
590
+ elevation: 5,
591
+ },
592
+ }),
593
+ },
594
+ });
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { StyleProp, StyleSheet, View, ViewStyle } from "react-native";
3
+ import { THEME } from "../../theme";
4
+
5
+ interface DividerProps {
6
+ color?: string;
7
+ thickness?: number;
8
+ style?: StyleProp<ViewStyle>;
9
+ vertical?: boolean;
10
+ }
11
+
12
+ const Divider: React.FC<DividerProps> = ({
13
+ color = THEME.divider,
14
+ thickness = 1,
15
+ style,
16
+ vertical,
17
+ }) => (
18
+ <View
19
+ style={[
20
+ vertical ? styles.vertical : styles.horizontal,
21
+ vertical ? { width: thickness } : { height: thickness },
22
+ { backgroundColor: color },
23
+ style,
24
+ ]}
25
+ />
26
+ );
27
+
28
+ export default Divider;
29
+
30
+ const styles = StyleSheet.create({
31
+ vertical: { height: "100%" },
32
+ horizontal: { width: "100%" },
33
+ });