@fadyshawky/react-native-magic 1.0.7 → 1.0.9

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 (66) hide show
  1. package/.vscode/settings.json +7 -0
  2. package/CHANGELOG.md +9 -0
  3. package/package.json +1 -1
  4. package/template/App.tsx +30 -9
  5. package/template/package-lock.json +170 -123
  6. package/template/package.json +1 -0
  7. package/template/src/common/ImageResources.g.ts +3 -5
  8. package/template/src/common/components/Background.tsx +66 -28
  9. package/template/src/common/components/Cards.tsx +116 -0
  10. package/template/src/common/components/Container.tsx +145 -0
  11. package/template/src/common/components/FlatListWrapper.tsx +1 -0
  12. package/template/src/common/components/ImageCropPickerButton.tsx +1 -1
  13. package/template/src/common/components/OTPInput.tsx +107 -0
  14. package/template/src/common/components/PhotoTakingButton.tsx +1 -4
  15. package/template/src/common/components/PrimaryButton.tsx +171 -157
  16. package/template/src/common/components/RTLAwareText.tsx +42 -0
  17. package/template/src/common/components/RTLAwareView.tsx +179 -0
  18. package/template/src/common/components/RadioButton.tsx +1 -3
  19. package/template/src/common/components/RadioIcon.tsx +1 -2
  20. package/template/src/common/components/SearchBar.tsx +179 -0
  21. package/template/src/common/components/Separator.tsx +7 -4
  22. package/template/src/common/components/TouchablePlatform.tsx +1 -3
  23. package/template/src/common/components/TryAgain.tsx +3 -3
  24. package/template/src/common/helpers/inAppReviewHelper.ts +0 -1
  25. package/template/src/common/helpers/stringsHelpers.ts +10 -0
  26. package/template/src/common/hooks/useFlatListActions.ts +1 -1
  27. package/template/src/common/localization/LocalizationProvider.tsx +152 -0
  28. package/template/src/common/localization/README.md +488 -0
  29. package/template/src/common/localization/localization.ts +12 -0
  30. package/template/src/common/localization/translations/homeLocalization.ts +1 -0
  31. package/template/src/common/localization/translations/profileLocalization.ts +24 -0
  32. package/template/src/common/validations/errorValidations.ts +1 -6
  33. package/template/src/common/validations/examples/TextInputWithValidation.tsx +229 -0
  34. package/template/src/common/validations/index.ts +28 -0
  35. package/template/src/common/validations/regex.js +83 -0
  36. package/template/src/common/validations/regexValidator.ts +240 -0
  37. package/template/src/common/validations/validationConstants.ts +2 -2
  38. package/template/src/core/api/errorHandler.ts +39 -0
  39. package/template/src/core/api/responseHandlers.ts +1 -26
  40. package/template/src/core/api/serverHeaders.ts +13 -23
  41. package/template/src/core/store/app/appSlice.ts +1 -2
  42. package/template/src/core/store/user/userSlice.ts +1 -0
  43. package/template/src/core/theme/ThemeProvider.tsx +63 -0
  44. package/template/src/core/theme/colors.ts +31 -42
  45. package/template/src/core/theme/commonConsts.ts +1 -1
  46. package/template/src/core/theme/commonStyles.ts +267 -210
  47. package/template/src/core/theme/fonts.ts +17 -1
  48. package/template/src/core/theme/scaling.ts +101 -0
  49. package/template/src/core/theme/themes.ts +214 -0
  50. package/template/src/core/theme/types.ts +51 -0
  51. package/template/src/navigation/AuthStack.tsx +25 -30
  52. package/template/src/navigation/HeaderComponents.tsx +18 -58
  53. package/template/src/navigation/MainNavigation.tsx +5 -6
  54. package/template/src/navigation/MainStack.tsx +6 -27
  55. package/template/src/navigation/RootNavigation.tsx +1 -7
  56. package/template/src/navigation/TabBar.tsx +2 -2
  57. package/template/src/navigation/TopTabBar.tsx +1 -1
  58. package/template/src/screens/Login/Login.tsx +3 -3
  59. package/template/src/screens/home/HomeScreen.tsx +107 -0
  60. package/template/src/screens/home/components/CarouselSection.tsx +79 -0
  61. package/template/src/screens/home/components/FeaturedCarousel.tsx +128 -0
  62. package/template/src/screens/home/hooks/useHomeData.ts +60 -0
  63. package/template/src/screens/home/types.ts +7 -0
  64. package/template/src/screens/registration/RegistrationScreen.tsx +2 -2
  65. package/template/src/screens/resetPassword/ForgotPasswordScreen.tsx +2 -2
  66. package/template/src/utils/stringBuilder.js +25 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "workbench.colorCustomizations": {
3
+ "activityBar.background": "#342D0C",
4
+ "titleBar.activeBackground": "#493F10",
5
+ "titleBar.activeForeground": "#FCFAF0"
6
+ }
7
+ }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.0.8] - 2024-01-24
6
+
7
+ ### Changed
8
+ - Improved FeaturedCarousel component:
9
+ - Centered carousel items on screen
10
+ - Adjusted item width to 85% of screen width
11
+ - Added proper item layout calculations
12
+ - Enhanced snapping behavior
13
+
5
14
  ## [1.0.7] - 2024-12-27
6
15
 
7
16
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fadyshawky/react-native-magic",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "react native template with ready components, hooks, react navigation, redux, typescript, etc.",
5
5
  "keywords": [
6
6
  "react-native-magic",
package/template/App.tsx CHANGED
@@ -4,27 +4,48 @@
4
4
  *
5
5
  * @format
6
6
  */
7
- import React from 'react';
8
- import {LogBox, SafeAreaView, StatusBar} from 'react-native';
7
+ import React, {useEffect} from 'react';
8
+ import {ImageBackground, LogBox, SafeAreaView, StatusBar} from 'react-native';
9
9
  import {SheetProvider} from 'react-native-actions-sheet';
10
10
  import {SafeAreaProvider} from 'react-native-safe-area-context';
11
11
  import {Provider} from 'react-redux';
12
12
  import {PersistGate} from 'redux-persist/integration/react';
13
+ import {LocalizationProvider} from './src/common/localization/LocalizationProvider';
14
+ import {
15
+ Languages,
16
+ DEFAULT_LANGUAGE,
17
+ } from './src/common/localization/localization';
13
18
  import {persistor, store} from './src/core/store/store';
14
19
  import AppNavigator from './src/navigation/MainNavigation';
20
+ import {ThemeProvider, useTheme} from './src/core/theme/ThemeProvider';
15
21
 
16
22
  LogBox.ignoreAllLogs();
23
+
24
+ const ThemedApp = () => {
25
+ const {theme} = useTheme();
26
+ return (
27
+ <SafeAreaProvider>
28
+ <SafeAreaView style={{position: 'absolute'}} />
29
+ <StatusBar
30
+ barStyle={theme.mode === 'dark' ? 'light-content' : 'dark-content'}
31
+ backgroundColor={theme.colors.background}
32
+ />
33
+ <SheetProvider>
34
+ <AppNavigator />
35
+ </SheetProvider>
36
+ </SafeAreaProvider>
37
+ );
38
+ };
39
+
17
40
  function App(): React.JSX.Element {
18
41
  return (
19
42
  <Provider store={store}>
20
43
  <PersistGate loading={null} persistor={persistor}>
21
- <SafeAreaProvider>
22
- <SafeAreaView style={{position: 'absolute'}} />
23
- <StatusBar barStyle={'dark-content'} backgroundColor={'white'} />
24
- <SheetProvider>
25
- <AppNavigator />
26
- </SheetProvider>
27
- </SafeAreaProvider>
44
+ <LocalizationProvider initialLanguage={DEFAULT_LANGUAGE}>
45
+ <ThemeProvider initialTheme="dark">
46
+ <ThemedApp />
47
+ </ThemeProvider>
48
+ </LocalizationProvider>
28
49
  </PersistGate>
29
50
  </Provider>
30
51
  );