@fadyshawky/react-native-magic 1.0.8 → 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.
- package/.vscode/settings.json +7 -0
- package/package.json +1 -1
- package/template/App.tsx +30 -9
- package/template/package-lock.json +170 -123
- package/template/package.json +1 -0
- package/template/src/common/ImageResources.g.ts +3 -5
- package/template/src/common/components/Background.tsx +66 -28
- package/template/src/common/components/Cards.tsx +116 -0
- package/template/src/common/components/Container.tsx +145 -0
- package/template/src/common/components/FlatListWrapper.tsx +1 -0
- package/template/src/common/components/ImageCropPickerButton.tsx +1 -1
- package/template/src/common/components/OTPInput.tsx +107 -0
- package/template/src/common/components/PhotoTakingButton.tsx +1 -4
- package/template/src/common/components/PrimaryButton.tsx +171 -157
- package/template/src/common/components/RTLAwareText.tsx +42 -0
- package/template/src/common/components/RTLAwareView.tsx +179 -0
- package/template/src/common/components/RadioButton.tsx +1 -3
- package/template/src/common/components/RadioIcon.tsx +1 -2
- package/template/src/common/components/SearchBar.tsx +179 -0
- package/template/src/common/components/Separator.tsx +7 -4
- package/template/src/common/components/TouchablePlatform.tsx +1 -3
- package/template/src/common/components/TryAgain.tsx +3 -3
- package/template/src/common/helpers/inAppReviewHelper.ts +0 -1
- package/template/src/common/helpers/stringsHelpers.ts +10 -0
- package/template/src/common/hooks/useFlatListActions.ts +1 -1
- package/template/src/common/localization/LocalizationProvider.tsx +152 -0
- package/template/src/common/localization/README.md +488 -0
- package/template/src/common/localization/localization.ts +12 -0
- package/template/src/common/localization/translations/profileLocalization.ts +24 -0
- package/template/src/common/validations/errorValidations.ts +1 -6
- package/template/src/common/validations/examples/TextInputWithValidation.tsx +229 -0
- package/template/src/common/validations/index.ts +28 -0
- package/template/src/common/validations/regex.js +83 -0
- package/template/src/common/validations/regexValidator.ts +240 -0
- package/template/src/common/validations/validationConstants.ts +2 -2
- package/template/src/core/api/errorHandler.ts +39 -0
- package/template/src/core/api/responseHandlers.ts +1 -26
- package/template/src/core/api/serverHeaders.ts +13 -23
- package/template/src/core/store/app/appSlice.ts +1 -2
- package/template/src/core/theme/ThemeProvider.tsx +63 -0
- package/template/src/core/theme/colors.ts +31 -42
- package/template/src/core/theme/commonConsts.ts +1 -1
- package/template/src/core/theme/commonStyles.ts +267 -210
- package/template/src/core/theme/fonts.ts +17 -1
- package/template/src/core/theme/scaling.ts +101 -0
- package/template/src/core/theme/themes.ts +214 -0
- package/template/src/core/theme/types.ts +51 -0
- package/template/src/navigation/AuthStack.tsx +25 -30
- package/template/src/navigation/HeaderComponents.tsx +18 -58
- package/template/src/navigation/MainNavigation.tsx +5 -6
- package/template/src/navigation/MainStack.tsx +3 -28
- package/template/src/navigation/RootNavigation.tsx +1 -7
- package/template/src/navigation/TabBar.tsx +2 -2
- package/template/src/navigation/TopTabBar.tsx +1 -1
- package/template/src/screens/Login/Login.tsx +3 -3
- package/template/src/screens/home/components/CarouselSection.tsx +7 -8
- package/template/src/screens/home/components/FeaturedCarousel.tsx +5 -6
- package/template/src/screens/registration/RegistrationScreen.tsx +2 -2
- package/template/src/screens/resetPassword/ForgotPasswordScreen.tsx +2 -2
- package/template/src/utils/stringBuilder.js +25 -0
package/package.json
CHANGED
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
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
);
|