@fadyshawky/react-native-magic 2.0.2 → 2.0.3
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/package.json +1 -1
- package/template/src/common/components/RadioIcon.tsx +4 -4
- package/template/src/common/components/SearchBar.tsx +6 -6
- package/template/src/common/components/Stepper.tsx +1 -1
- package/template/src/common/components/TryAgain.tsx +3 -3
- package/template/src/navigation/MainStack.tsx +1 -1
- package/template/src/navigation/TabBar.tsx +3 -3
- package/template/src/navigation/TopTabBar.tsx +5 -3
- package/template/src/screens/home/HomeScreen.tsx +6 -6
- package/template/src/screens/home/components/CarouselSection.tsx +3 -3
- package/template/src/screens/home/components/FeaturedCarousel.tsx +5 -5
- package/template/src/screens/registration/RegistrationScreen.tsx +3 -3
- package/template/src/screens/resetPassword/ForgotPasswordScreen.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {FC, memo, useMemo} from 'react';
|
|
2
2
|
import {StyleSheet, View, ViewStyle} from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {PrimaryColors} from '../../core/theme/colors';
|
|
4
4
|
|
|
5
5
|
interface IProps {
|
|
6
6
|
isSelected: boolean;
|
|
@@ -41,14 +41,14 @@ const commonInnerCircle: ViewStyle = {
|
|
|
41
41
|
const styles = StyleSheet.create({
|
|
42
42
|
outerCircle: {
|
|
43
43
|
...commonOuterCircle,
|
|
44
|
-
borderColor:
|
|
44
|
+
borderColor: PrimaryColors.PlatinateBlue_700,
|
|
45
45
|
} as ViewStyle,
|
|
46
46
|
outerCircleSelected: {
|
|
47
47
|
...commonOuterCircle,
|
|
48
|
-
borderColor:
|
|
48
|
+
borderColor: PrimaryColors.PlatinateBlue_700,
|
|
49
49
|
} as ViewStyle,
|
|
50
50
|
innerCircle: {
|
|
51
51
|
...commonInnerCircle,
|
|
52
|
-
backgroundColor:
|
|
52
|
+
backgroundColor: PrimaryColors.PlatinateBlue_700,
|
|
53
53
|
} as ViewStyle,
|
|
54
54
|
});
|
|
@@ -59,8 +59,8 @@ export const SearchBar: React.FC<SearchBarProps> = ({
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
const containerStyle: ViewStyle = {
|
|
62
|
-
backgroundColor: `${theme.colors.
|
|
63
|
-
borderColor: theme.colors.
|
|
62
|
+
backgroundColor: `${theme.colors.grayScale_0}20`,
|
|
63
|
+
borderColor: theme.colors.grayScale_25,
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
// Set keyboard language specific properties
|
|
@@ -111,14 +111,14 @@ export const SearchBar: React.FC<SearchBarProps> = ({
|
|
|
111
111
|
containerStyle,
|
|
112
112
|
style as ViewStyle,
|
|
113
113
|
{
|
|
114
|
-
backgroundColor: theme.colors.
|
|
114
|
+
backgroundColor: theme.colors.grayScale_0,
|
|
115
115
|
...createThemedStyles(theme).dropShadow,
|
|
116
116
|
},
|
|
117
117
|
]}>
|
|
118
118
|
<Icon
|
|
119
119
|
name="search"
|
|
120
120
|
size={20}
|
|
121
|
-
color={theme.colors.
|
|
121
|
+
color={theme.colors.grayScale_50}
|
|
122
122
|
style={styles.searchIcon}
|
|
123
123
|
/>
|
|
124
124
|
<TextInput
|
|
@@ -133,7 +133,7 @@ export const SearchBar: React.FC<SearchBarProps> = ({
|
|
|
133
133
|
inputStyle as TextStyle,
|
|
134
134
|
]}
|
|
135
135
|
placeholder={placeholder || t('search', 'common')}
|
|
136
|
-
placeholderTextColor={`${theme.colors.
|
|
136
|
+
placeholderTextColor={`${theme.colors.grayScale_50}80`}
|
|
137
137
|
value={value}
|
|
138
138
|
onChangeText={onChangeText}
|
|
139
139
|
autoCapitalize="none"
|
|
@@ -146,7 +146,7 @@ export const SearchBar: React.FC<SearchBarProps> = ({
|
|
|
146
146
|
<Icon
|
|
147
147
|
name="close-circle"
|
|
148
148
|
size={20}
|
|
149
|
-
color={theme.colors.
|
|
149
|
+
color={theme.colors.grayScale_50}
|
|
150
150
|
/>
|
|
151
151
|
</TouchableOpacity>
|
|
152
152
|
)}
|
|
@@ -52,7 +52,7 @@ const Stepper: React.FC<StepperProps> = ({
|
|
|
52
52
|
isActive && styles.circleActive,
|
|
53
53
|
]}>
|
|
54
54
|
{isCompleted ? (
|
|
55
|
-
<Image source={
|
|
55
|
+
<Image source={0} style={styles.icon} />
|
|
56
56
|
) : (
|
|
57
57
|
<Text style={styles.stepNumber}>{index + 1}</Text>
|
|
58
58
|
)}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TouchableOpacity,
|
|
7
7
|
View,
|
|
8
8
|
} from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import {PrimaryColors} from '../../core/theme/colors';
|
|
10
10
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
11
11
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
12
12
|
import {localization} from '../localization/localization';
|
|
@@ -38,11 +38,11 @@ const styles = StyleSheet.create({
|
|
|
38
38
|
title: {
|
|
39
39
|
...CommonStyles.normalText,
|
|
40
40
|
textAlign: 'center',
|
|
41
|
-
marginBottom: CommonSizes.spacing.
|
|
41
|
+
marginBottom: CommonSizes.spacing.xSmall,
|
|
42
42
|
} as TextStyle,
|
|
43
43
|
description: {
|
|
44
44
|
...CommonStyles.normalText,
|
|
45
|
-
color:
|
|
45
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
46
46
|
textAlign: 'center',
|
|
47
47
|
textDecorationLine: 'underline',
|
|
48
48
|
} as TextStyle,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
|
|
3
3
|
import {CommonStyles} from '../core/theme/commonStyles';
|
|
4
|
-
import {Colors} from '../core/theme/colors';
|
|
5
4
|
import {
|
|
6
5
|
BottomTabBarProps,
|
|
7
6
|
BottomTabNavigationOptions,
|
|
8
7
|
} from '@react-navigation/bottom-tabs';
|
|
9
8
|
import {ImageSourcePropType} from 'react-native';
|
|
10
9
|
import {toString} from 'lodash';
|
|
10
|
+
import {NaturalColors, PrimaryColors} from '../core/theme/colors';
|
|
11
11
|
|
|
12
12
|
interface TabBarOptions extends BottomTabNavigationOptions {
|
|
13
13
|
selectedIcon: ImageSourcePropType;
|
|
@@ -86,9 +86,9 @@ const styles = StyleSheet.create({
|
|
|
86
86
|
alignItems: 'center',
|
|
87
87
|
},
|
|
88
88
|
label: {
|
|
89
|
-
color:
|
|
89
|
+
color: NaturalColors.grayScale_50,
|
|
90
90
|
},
|
|
91
91
|
labelFocused: {
|
|
92
|
-
color:
|
|
92
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
93
93
|
},
|
|
94
94
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {Animated, View, TouchableOpacity} from 'react-native';
|
|
2
|
-
import {Colors} from '../core/theme/colors';
|
|
3
2
|
import {CommonStyles, screenWidth} from '../core/theme/commonStyles';
|
|
3
|
+
import {NaturalColors} from '../core/theme/colors';
|
|
4
4
|
|
|
5
5
|
export function TopBar({state, descriptors, navigation, position}: any) {
|
|
6
6
|
return (
|
|
7
7
|
<View
|
|
8
8
|
style={{
|
|
9
9
|
flexDirection: 'row',
|
|
10
|
-
backgroundColor:
|
|
10
|
+
backgroundColor: NaturalColors.grayScale_50,
|
|
11
11
|
width: screenWidth - 60,
|
|
12
12
|
alignSelf: 'center',
|
|
13
13
|
height: 40,
|
|
@@ -56,7 +56,9 @@ export function TopBar({state, descriptors, navigation, position}: any) {
|
|
|
56
56
|
flex: 1,
|
|
57
57
|
alignItems: 'center',
|
|
58
58
|
justifyContent: 'center',
|
|
59
|
-
backgroundColor: isFocused
|
|
59
|
+
backgroundColor: isFocused
|
|
60
|
+
? NaturalColors.grayScale_0
|
|
61
|
+
: NaturalColors.grayScale_50,
|
|
60
62
|
borderRadius: 20,
|
|
61
63
|
}}>
|
|
62
64
|
<Animated.Text
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
View,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
ScrollView,
|
|
6
|
-
RefreshControl,
|
|
7
3
|
Dimensions,
|
|
4
|
+
RefreshControl,
|
|
5
|
+
ScrollView,
|
|
6
|
+
StyleSheet,
|
|
8
7
|
Text,
|
|
8
|
+
View,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import {
|
|
10
|
+
import {NaturalColors} from '../../core/theme/colors';
|
|
11
11
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
12
12
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
13
13
|
import {CarouselSection} from './components/CarouselSection';
|
|
@@ -73,7 +73,7 @@ export function HomeScreen(): JSX.Element {
|
|
|
73
73
|
const styles = StyleSheet.create({
|
|
74
74
|
container: {
|
|
75
75
|
flex: 1,
|
|
76
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: NaturalColors.grayScale_0,
|
|
77
77
|
},
|
|
78
78
|
content: {
|
|
79
79
|
paddingVertical: CommonSizes.spacing.medium,
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
TouchableOpacity,
|
|
9
9
|
View,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import {Colors} from '../../../core/theme/colors';
|
|
12
11
|
import {CommonSizes} from '../../../core/theme/commonSizes';
|
|
13
12
|
import {CarouselItem} from '../types';
|
|
13
|
+
import {PrimaryColors} from '../../../core/theme/colors';
|
|
14
14
|
|
|
15
15
|
interface CarouselSectionProps {
|
|
16
16
|
items: CarouselItem[];
|
|
@@ -69,11 +69,11 @@ const styles = StyleSheet.create({
|
|
|
69
69
|
title: {
|
|
70
70
|
fontSize: 16,
|
|
71
71
|
fontWeight: '600',
|
|
72
|
-
color:
|
|
72
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
73
73
|
},
|
|
74
74
|
subtitle: {
|
|
75
75
|
fontSize: 14,
|
|
76
|
-
color:
|
|
76
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
77
77
|
marginTop: 2,
|
|
78
78
|
},
|
|
79
79
|
});
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
TouchableOpacity,
|
|
9
9
|
View,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import {Colors} from '../../../core/theme/colors';
|
|
12
11
|
import {CommonSizes} from '../../../core/theme/commonSizes';
|
|
13
12
|
import {CarouselItem} from '../types';
|
|
13
|
+
import {NaturalColors, PrimaryColors} from '../../../core/theme/colors';
|
|
14
14
|
|
|
15
15
|
const {width} = Dimensions.get('window');
|
|
16
16
|
const ITEM_WIDTH = width * 0.85;
|
|
@@ -99,11 +99,11 @@ const styles = StyleSheet.create({
|
|
|
99
99
|
title: {
|
|
100
100
|
fontSize: 20,
|
|
101
101
|
fontWeight: '600',
|
|
102
|
-
color:
|
|
102
|
+
color: NaturalColors.grayScale_0,
|
|
103
103
|
},
|
|
104
104
|
subtitle: {
|
|
105
105
|
fontSize: 16,
|
|
106
|
-
color:
|
|
106
|
+
color: NaturalColors.grayScale_0,
|
|
107
107
|
marginTop: CommonSizes.spacing.small,
|
|
108
108
|
},
|
|
109
109
|
pagination: {
|
|
@@ -116,11 +116,11 @@ const styles = StyleSheet.create({
|
|
|
116
116
|
width: 8,
|
|
117
117
|
height: 8,
|
|
118
118
|
borderRadius: 4,
|
|
119
|
-
backgroundColor:
|
|
119
|
+
backgroundColor: NaturalColors.grayScale_50,
|
|
120
120
|
marginHorizontal: 4,
|
|
121
121
|
},
|
|
122
122
|
activeDot: {
|
|
123
|
-
backgroundColor:
|
|
123
|
+
backgroundColor: PrimaryColors.PlatinateBlue_700,
|
|
124
124
|
width: 12,
|
|
125
125
|
height: 12,
|
|
126
126
|
borderRadius: 6,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
} from '../../common/validations/profileValidations';
|
|
22
22
|
import {useAppDispatch} from '../../core/store/reduxHelpers';
|
|
23
23
|
import {userRegister} from '../../core/store/user/userActions';
|
|
24
|
-
import {Colors} from '../../core/theme/colors';
|
|
25
24
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
26
25
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
27
26
|
import type {RootStackParamList} from '../../navigation/types';
|
|
27
|
+
import {NaturalColors, PrimaryColors} from '../../core/theme/colors';
|
|
28
28
|
|
|
29
29
|
export default function RegistrationScreen(): JSX.Element {
|
|
30
30
|
const dispatch = useAppDispatch();
|
|
@@ -178,7 +178,7 @@ export default function RegistrationScreen(): JSX.Element {
|
|
|
178
178
|
const styles = StyleSheet.create({
|
|
179
179
|
container: {
|
|
180
180
|
flexGrow: 1,
|
|
181
|
-
backgroundColor:
|
|
181
|
+
backgroundColor: NaturalColors.grayScale_0,
|
|
182
182
|
borderTopRightRadius: CommonSizes.spacing.large,
|
|
183
183
|
borderTopLeftRadius: CommonSizes.spacing.large,
|
|
184
184
|
},
|
|
@@ -191,7 +191,7 @@ const styles = StyleSheet.create({
|
|
|
191
191
|
},
|
|
192
192
|
loginLink: {
|
|
193
193
|
...CommonStyles.normalText,
|
|
194
|
-
color:
|
|
194
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
195
195
|
textAlign: 'center',
|
|
196
196
|
marginTop: 16,
|
|
197
197
|
},
|
|
@@ -17,10 +17,10 @@ import {useInputError} from '../../common/validations/hooks/useInputError';
|
|
|
17
17
|
import {emailValidations} from '../../common/validations/profileValidations';
|
|
18
18
|
import {useAppDispatch} from '../../core/store/reduxHelpers';
|
|
19
19
|
import {resetPassword} from '../../core/store/user/userActions';
|
|
20
|
-
import {Colors} from '../../core/theme/colors';
|
|
21
20
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
22
21
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
23
22
|
import type {RootStackParamList} from '../../navigation/types';
|
|
23
|
+
import {NaturalColors, PrimaryColors} from '../../core/theme/colors';
|
|
24
24
|
|
|
25
25
|
export default function ForgotPasswordScreen(): JSX.Element {
|
|
26
26
|
const dispatch = useAppDispatch();
|
|
@@ -104,7 +104,7 @@ export default function ForgotPasswordScreen(): JSX.Element {
|
|
|
104
104
|
const styles = StyleSheet.create({
|
|
105
105
|
container: {
|
|
106
106
|
flexGrow: 1,
|
|
107
|
-
backgroundColor:
|
|
107
|
+
backgroundColor: NaturalColors.grayScale_0,
|
|
108
108
|
borderTopRightRadius: CommonSizes.spacing.large,
|
|
109
109
|
borderTopLeftRadius: CommonSizes.spacing.large,
|
|
110
110
|
},
|
|
@@ -122,7 +122,7 @@ const styles = StyleSheet.create({
|
|
|
122
122
|
},
|
|
123
123
|
loginLink: {
|
|
124
124
|
...CommonStyles.normalText,
|
|
125
|
-
color:
|
|
125
|
+
color: PrimaryColors.PlatinateBlue_700,
|
|
126
126
|
textAlign: 'center',
|
|
127
127
|
marginTop: 16,
|
|
128
128
|
},
|