@fadyshawky/react-native-magic 2.0.0 → 2.0.2
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/App.tsx +4 -7
- package/template/src/common/components/PrimaryButton.tsx +23 -23
- package/template/src/common/components/PrimaryTextInput.tsx +195 -129
- package/template/src/common/components/RadioIcon.tsx +4 -4
- package/template/src/common/components/Stepper.tsx +153 -0
- package/template/src/common/validations/errorValidations.ts +2 -3
- package/template/src/core/theme/colors.ts +94 -72
- package/template/src/core/theme/commonConsts.ts +1 -1
- package/template/src/core/theme/commonSizes.ts +117 -60
- package/template/src/core/theme/commonStyles.ts +22 -22
- package/template/src/core/theme/fonts.ts +13 -14
- package/template/src/core/theme/shadows.ts +135 -0
- package/template/src/core/theme/themes.ts +386 -75
- package/template/src/core/theme/types.ts +201 -15
- package/template/src/navigation/AuthStack.tsx +0 -8
- package/template/src/navigation/MainNavigation.tsx +1 -2
- package/template/src/screens/Login/Login.tsx +3 -17
- package/template/install-dev.sh +0 -1
- package/template/install.sh +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {View, Text, StyleSheet, Image, Pressable} from 'react-native';
|
|
3
|
+
import {useTheme} from '../../core/theme/ThemeProvider';
|
|
4
|
+
import {Theme} from '../../core/theme/types';
|
|
5
|
+
import {PrimaryColors} from '../../core/theme/colors';
|
|
6
|
+
import {ImageResources} from '../ImageResources.g';
|
|
7
|
+
|
|
8
|
+
interface Step {
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface StepperProps {
|
|
13
|
+
steps: Step[];
|
|
14
|
+
currentStep: number;
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
onStepPress?: (index: number) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const STEP_SIZE = 64;
|
|
20
|
+
|
|
21
|
+
const Stepper: React.FC<StepperProps> = ({
|
|
22
|
+
steps,
|
|
23
|
+
currentStep,
|
|
24
|
+
orientation = 'horizontal',
|
|
25
|
+
onStepPress,
|
|
26
|
+
}) => {
|
|
27
|
+
const {theme} = useTheme();
|
|
28
|
+
const isDarkMode = theme.mode === 'dark';
|
|
29
|
+
const styles = createStyles(theme, orientation, isDarkMode);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View style={styles.container}>
|
|
33
|
+
{steps.map((step, index) => {
|
|
34
|
+
const isCompleted = index < currentStep;
|
|
35
|
+
const isActive = index === currentStep;
|
|
36
|
+
const isLastStep = index === steps.length - 1;
|
|
37
|
+
|
|
38
|
+
const connectorStyle = [
|
|
39
|
+
styles.connector,
|
|
40
|
+
(isCompleted || isActive) && styles.connectorCompleted,
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<React.Fragment key={index}>
|
|
45
|
+
<Pressable
|
|
46
|
+
style={styles.stepContainer}
|
|
47
|
+
onPress={() => onStepPress?.(index)}>
|
|
48
|
+
<View
|
|
49
|
+
style={[
|
|
50
|
+
styles.circle,
|
|
51
|
+
isCompleted && styles.circleCompleted,
|
|
52
|
+
isActive && styles.circleActive,
|
|
53
|
+
]}>
|
|
54
|
+
{isCompleted ? (
|
|
55
|
+
<Image source={ImageResources.complete} style={styles.icon} />
|
|
56
|
+
) : (
|
|
57
|
+
<Text style={styles.stepNumber}>{index + 1}</Text>
|
|
58
|
+
)}
|
|
59
|
+
</View>
|
|
60
|
+
<Text
|
|
61
|
+
style={[
|
|
62
|
+
styles.title,
|
|
63
|
+
(isCompleted || isActive) && styles.titleActive,
|
|
64
|
+
]}>
|
|
65
|
+
{step.title}
|
|
66
|
+
</Text>
|
|
67
|
+
</Pressable>
|
|
68
|
+
{!isLastStep && <View style={connectorStyle} />}
|
|
69
|
+
</React.Fragment>
|
|
70
|
+
);
|
|
71
|
+
})}
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const createStyles = (
|
|
77
|
+
theme: Theme,
|
|
78
|
+
orientation: 'horizontal' | 'vertical',
|
|
79
|
+
isDarkMode: boolean,
|
|
80
|
+
) =>
|
|
81
|
+
StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
flexDirection: orientation === 'horizontal' ? 'row' : 'column',
|
|
84
|
+
alignItems: orientation === 'horizontal' ? 'flex-start' : 'stretch',
|
|
85
|
+
},
|
|
86
|
+
stepContainer: {
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
flex: orientation === 'horizontal' ? 1 : undefined,
|
|
89
|
+
},
|
|
90
|
+
circle: {
|
|
91
|
+
width: STEP_SIZE,
|
|
92
|
+
height: STEP_SIZE,
|
|
93
|
+
borderRadius: STEP_SIZE / 2,
|
|
94
|
+
borderWidth: 1,
|
|
95
|
+
borderColor: isDarkMode
|
|
96
|
+
? theme.colors.grayScale_400
|
|
97
|
+
: theme.colors.grayScale_50,
|
|
98
|
+
justifyContent: 'center',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
backgroundColor: 'transparent',
|
|
101
|
+
},
|
|
102
|
+
circleCompleted: {
|
|
103
|
+
backgroundColor: PrimaryColors.PlatinateBlue_400,
|
|
104
|
+
borderColor: PrimaryColors.PlatinateBlue_400,
|
|
105
|
+
},
|
|
106
|
+
circleActive: {
|
|
107
|
+
borderColor: PrimaryColors.PlatinateBlue_400,
|
|
108
|
+
},
|
|
109
|
+
icon: {
|
|
110
|
+
width: STEP_SIZE / 2,
|
|
111
|
+
height: STEP_SIZE / 2,
|
|
112
|
+
tintColor: theme.colors.grayScale_0,
|
|
113
|
+
},
|
|
114
|
+
stepNumber: {
|
|
115
|
+
...theme.text.bodyXLargeRegular,
|
|
116
|
+
color: isDarkMode
|
|
117
|
+
? theme.colors.grayScale_400
|
|
118
|
+
: theme.colors.grayScale_50,
|
|
119
|
+
},
|
|
120
|
+
title: {
|
|
121
|
+
...theme.text.bodyMediumRegular,
|
|
122
|
+
marginTop: theme.spacing.small,
|
|
123
|
+
color: isDarkMode
|
|
124
|
+
? theme.colors.grayScale_400
|
|
125
|
+
: theme.colors.grayScale_50,
|
|
126
|
+
},
|
|
127
|
+
titleActive: {
|
|
128
|
+
color: theme.colors.cetaceanBlue_700,
|
|
129
|
+
},
|
|
130
|
+
connector: {
|
|
131
|
+
backgroundColor: isDarkMode
|
|
132
|
+
? theme.colors.grayScale_400
|
|
133
|
+
: theme.colors.grayScale_50,
|
|
134
|
+
...(orientation === 'horizontal'
|
|
135
|
+
? {
|
|
136
|
+
height: 1,
|
|
137
|
+
flex: 1,
|
|
138
|
+
marginHorizontal: -STEP_SIZE / 4,
|
|
139
|
+
top: STEP_SIZE / 2,
|
|
140
|
+
}
|
|
141
|
+
: {
|
|
142
|
+
width: 1,
|
|
143
|
+
flex: 1,
|
|
144
|
+
marginVertical: -STEP_SIZE / 4,
|
|
145
|
+
left: '50%',
|
|
146
|
+
}),
|
|
147
|
+
},
|
|
148
|
+
connectorCompleted: {
|
|
149
|
+
backgroundColor: PrimaryColors.PlatinateBlue_400,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
export default Stepper;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {localization} from '../localization/localization';
|
|
2
1
|
import {unwrapResult} from '@reduxjs/toolkit';
|
|
3
2
|
import {Alert} from 'react-native';
|
|
4
|
-
import {IErrorResult, ErrorRepresentationType} from '../../../types';
|
|
5
3
|
import Snackbar from 'react-native-snackbar';
|
|
6
|
-
import {
|
|
4
|
+
import {ErrorRepresentationType, IErrorResult} from '../../../types';
|
|
5
|
+
import {localization} from '../localization/localization';
|
|
7
6
|
export function handlePromiseResult(
|
|
8
7
|
promiseAction: Promise<any>,
|
|
9
8
|
successMessage?: string,
|
|
@@ -1,77 +1,99 @@
|
|
|
1
|
-
export enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export enum PrimaryColors {
|
|
2
|
+
PlatinateBlue_0 = '#E9EDFF',
|
|
3
|
+
PlatinateBlue_25 = '#D3DAFF',
|
|
4
|
+
PlatinateBlue_50 = '#BDC8FF',
|
|
5
|
+
PlatinateBlue_100 = '#A7B5FF',
|
|
6
|
+
PlatinateBlue_200 = '#7C91FF',
|
|
7
|
+
PlatinateBlue_300 = '#506CFF',
|
|
8
|
+
PlatinateBlue_400 = '#2447FF',
|
|
9
|
+
PlatinateBlue_500 = '#1D39CC',
|
|
10
|
+
PlatinateBlue_600 = '#1D39CC',
|
|
11
|
+
PlatinateBlue_700 = '#0E1C66',
|
|
12
|
+
cetaceanBlue_0 = '#4C7CEA',
|
|
13
|
+
cetaceanBlue_25 = '#436FD5',
|
|
14
|
+
cetaceanBlue_50 = '#3B63BF',
|
|
15
|
+
cetaceanBlue_100 = '#3257AA',
|
|
16
|
+
cetaceanBlue_200 = '#223E80',
|
|
17
|
+
cetaceanBlue_300 = '#112655',
|
|
18
|
+
cetaceanBlue_400 = '#000D2B',
|
|
19
|
+
cetaceanBlue_500 = '#000A22',
|
|
20
|
+
cetaceanBlue_600 = '#00081A',
|
|
21
|
+
cetaceanBlue_700 = '#000511',
|
|
22
|
+
strokeDeactive = '#D3DAFF',
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
export enum
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
export enum NaturalColors {
|
|
26
|
+
grayScale_0 = '#FAFAFA',
|
|
27
|
+
grayScale_25 = '#A3AAAD',
|
|
28
|
+
grayScale_50 = '#949C9E',
|
|
29
|
+
grayScale_100 = '#858D8F',
|
|
30
|
+
grayScale_200 = '#686F72',
|
|
31
|
+
grayScale_300 = '#4A5254',
|
|
32
|
+
grayScale_400 = '#2D3436',
|
|
33
|
+
grayScale_500 = '#242A2B',
|
|
34
|
+
grayScale_600 = '#1B1F20',
|
|
35
|
+
grayScale_700 = '#121516',
|
|
36
|
+
naturalColor_0 = '#9C97B3',
|
|
37
|
+
naturalColor_25 = '#8E89A4',
|
|
38
|
+
naturalColor_50 = '#7F7B94',
|
|
39
|
+
naturalColor_100 = '#716D85',
|
|
40
|
+
naturalColor_200 = '#555265',
|
|
41
|
+
naturalColor_300 = '#383646',
|
|
42
|
+
naturalColor_400 = '#1C1A27',
|
|
43
|
+
naturalColor_500 = '#16151F',
|
|
44
|
+
naturalColor_600 = '#111017',
|
|
45
|
+
naturalColor_700 = '#0B0A10',
|
|
31
46
|
}
|
|
32
47
|
|
|
33
|
-
export enum
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
48
|
+
export enum AlertColors {
|
|
49
|
+
links_0 = '#E8F2FF',
|
|
50
|
+
links_25 = '#D2E4FE',
|
|
51
|
+
links_50 = '#BBD7FE',
|
|
52
|
+
links_100 = '#A5CAFE',
|
|
53
|
+
links_200 = '#77AFFD',
|
|
54
|
+
links_300 = '#4A95FD',
|
|
55
|
+
links_400 = '#1D7AFC',
|
|
56
|
+
links_500 = '#1762CA',
|
|
57
|
+
links_600 = '#114997',
|
|
58
|
+
links_700 = '#0C3165',
|
|
59
|
+
success_0 = '#C6FFE5',
|
|
60
|
+
success_25 = '#8FE6BE',
|
|
61
|
+
success_50 = '#7DDAB0',
|
|
62
|
+
success_100 = '#6CCEA1',
|
|
63
|
+
success_200 = '#48B684',
|
|
64
|
+
success_300 = '#259E67',
|
|
65
|
+
success_400 = '#02864A',
|
|
66
|
+
success_500 = '#026B3B',
|
|
67
|
+
success_600 = '#01502C',
|
|
68
|
+
success_700 = '#01361E',
|
|
69
|
+
warning_0 = '#FFF4E8',
|
|
70
|
+
warning_25 = '#FEE8D1',
|
|
71
|
+
warning_50 = '#FEDDBA',
|
|
72
|
+
warning_100 = '#FDD1A3',
|
|
73
|
+
warning_200 = '#FDBB76',
|
|
74
|
+
warning_300 = '#FCA448',
|
|
75
|
+
warning_400 = '#FB8D1A',
|
|
76
|
+
warning_500 = '#C97115',
|
|
77
|
+
warning_600 = '#975510',
|
|
78
|
+
warning_700 = '#64380A',
|
|
79
|
+
error_0 = '#FDE6EC',
|
|
80
|
+
error_25 = '#FACED8',
|
|
81
|
+
error_50 = '#F8B5C5',
|
|
82
|
+
error_100 = '#F69CB2',
|
|
83
|
+
error_200 = '#F16B8B',
|
|
84
|
+
error_300 = '#ED3965',
|
|
85
|
+
error_400 = '#E8083E',
|
|
86
|
+
error_500 = '#BA0632',
|
|
87
|
+
error_600 = '#8B0525',
|
|
88
|
+
error_700 = '#5D0319',
|
|
89
|
+
discover_0 = '#F1ECF6',
|
|
90
|
+
discover_25 = '#E4D9EC',
|
|
91
|
+
discover_50 = '#D6C5E3',
|
|
92
|
+
discover_100 = '#C8B2D9',
|
|
93
|
+
discover_200 = '#AD8CC7',
|
|
94
|
+
discover_300 = '#9165B4',
|
|
95
|
+
discover_400 = '#763FA1',
|
|
96
|
+
discover_500 = '#5E3281',
|
|
97
|
+
discover_600 = '#472661',
|
|
98
|
+
discover_700 = '#2F1940',
|
|
77
99
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
StyleSheet,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import DeviceInfo from 'react-native-device-info';
|
|
12
|
-
import {createPerfectSize} from '../../common/utils';
|
|
12
|
+
import {createPerfectSize} from '../../common/utils/createPerfectSize';
|
|
13
13
|
|
|
14
14
|
const windowDimensions = Dimensions.get('window');
|
|
15
15
|
export const isIos = Platform.OS == 'ios';
|
|
@@ -1,70 +1,127 @@
|
|
|
1
|
-
import {ISize} from '
|
|
1
|
+
import {ISize} from './types';
|
|
2
2
|
|
|
3
3
|
export const CommonSizes = {
|
|
4
4
|
font: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
// Body Text Sizes
|
|
6
|
+
bodySmall: 12, // Body Small
|
|
7
|
+
bodyMedium: 14, // Body Medium
|
|
8
|
+
bodyLarge: 16, // Body Large
|
|
9
|
+
bodyXLarge: 18, // Body XLarge
|
|
10
|
+
|
|
11
|
+
// Heading Sizes
|
|
12
|
+
heading6: 18, // Heading 6 / Bold / 18px
|
|
13
|
+
heading4: 24, // Heading 4 / Bold / 24px
|
|
14
|
+
heading3: 32, // Heading 3 / Bold / 32px
|
|
15
|
+
heading2: 48, // Heading 2 / Bold / 48px
|
|
16
|
+
heading1: 64, // Heading 1 / Bold / 64px
|
|
17
|
+
|
|
18
|
+
// Legacy support - keeping these for backward compatibility
|
|
19
|
+
extraSmall: 12, // Maps to bodySmall
|
|
20
|
+
extraSmallPlus: 14, // Maps to bodyMedium
|
|
21
|
+
small: 14, // Maps to bodyMedium
|
|
22
|
+
smallPlus: 16, // Maps to bodyLarge
|
|
23
|
+
medium: 16, // Maps to bodyLarge
|
|
24
|
+
mediumPlus: 18, // Maps to bodyXLarge
|
|
25
|
+
extraMedium: 24, // Maps to heading4
|
|
26
|
+
large: 32, // Maps to heading3
|
|
27
|
+
largePlus: 48, // Maps to heading2
|
|
28
|
+
extraLarge: 64, // Maps to heading1
|
|
29
|
+
extraLargePlus: 64, // Maps to heading1
|
|
30
|
+
} as Readonly<ISize['font']>,
|
|
17
31
|
letterSpacing: {
|
|
18
|
-
|
|
32
|
+
// Default letter spacing for Almarai
|
|
33
|
+
bodySmall: 0,
|
|
34
|
+
bodyMedium: 0,
|
|
35
|
+
bodyLarge: 0,
|
|
36
|
+
bodyXLarge: 0,
|
|
37
|
+
heading6: 0,
|
|
38
|
+
heading4: 0,
|
|
39
|
+
heading3: 0,
|
|
40
|
+
heading2: 0,
|
|
41
|
+
heading1: 0,
|
|
42
|
+
|
|
43
|
+
// Legacy support
|
|
44
|
+
extraSmall: 0,
|
|
19
45
|
extraSmallPlus: 0,
|
|
20
|
-
small:
|
|
21
|
-
smallPlus:
|
|
22
|
-
medium:
|
|
23
|
-
mediumPlus: 0
|
|
24
|
-
large: 0
|
|
25
|
-
largePlus: 0
|
|
26
|
-
extraLarge: 0
|
|
27
|
-
extraLargePlus: 0
|
|
28
|
-
} as Readonly<ISize>,
|
|
46
|
+
small: 0,
|
|
47
|
+
smallPlus: 0,
|
|
48
|
+
medium: 0,
|
|
49
|
+
mediumPlus: 0,
|
|
50
|
+
large: 0,
|
|
51
|
+
largePlus: 0,
|
|
52
|
+
extraLarge: 0,
|
|
53
|
+
extraLargePlus: 0,
|
|
54
|
+
} as Readonly<ISize['letterSpacing']>,
|
|
29
55
|
lineHeight: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
// Line heights optimized for Almarai's large x-height
|
|
57
|
+
bodySmall: 16, // ~1.33 line height
|
|
58
|
+
bodyMedium: 20, // ~1.43 line height
|
|
59
|
+
bodyLarge: 24, // ~1.5 line height
|
|
60
|
+
bodyXLarge: 26, // ~1.44 line height
|
|
61
|
+
heading6: 24, // ~1.33 line height
|
|
62
|
+
heading4: 32, // ~1.33 line height
|
|
63
|
+
heading3: 40, // ~1.25 line height
|
|
64
|
+
heading2: 56, // ~1.17 line height
|
|
65
|
+
heading1: 72, // ~1.125 line height
|
|
66
|
+
|
|
67
|
+
// Legacy support
|
|
68
|
+
extraSmall: 16,
|
|
69
|
+
extraSmallPlus: 20,
|
|
70
|
+
small: 20,
|
|
71
|
+
smallPlus: 24,
|
|
72
|
+
medium: 24,
|
|
73
|
+
mediumPlus: 26,
|
|
74
|
+
large: 40,
|
|
75
|
+
largePlus: 56,
|
|
76
|
+
extraLarge: 72,
|
|
77
|
+
extraLargePlus: 72,
|
|
78
|
+
} as Readonly<ISize['lineHeight']>,
|
|
41
79
|
spacing: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
small:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
80
|
+
none: 0, // space / 0
|
|
81
|
+
xSmall: 2, // space / 2
|
|
82
|
+
small: 4, // space / 4
|
|
83
|
+
medium: 8, // space / 8
|
|
84
|
+
large: 12, // space / 12
|
|
85
|
+
xLarge: 16, // space / 16
|
|
86
|
+
xxLarge: 24, // space / 24 (2X-Large)
|
|
87
|
+
xxxLarge: 32, // space / 32 (3X-Large)
|
|
88
|
+
xxxxLarge: 48, // space / 48 (4X-Large)
|
|
89
|
+
xxxxxLarge: 64, // space / 64 (5X-Large)
|
|
90
|
+
xxxxxxLarge: 80, // space / 80 (6X-Large)
|
|
91
|
+
full: 100, // space / 100 (Full)
|
|
92
|
+
|
|
93
|
+
// Legacy support - keeping these for backward compatibility
|
|
94
|
+
xs: 4, // Maps to small
|
|
95
|
+
sm: 8, // Maps to medium
|
|
96
|
+
md: 16, // Maps to xLarge
|
|
97
|
+
lg: 24, // Maps to xxLarge
|
|
98
|
+
xl: 32, // Maps to xxxLarge
|
|
99
|
+
} as Readonly<ISize['spacing']>,
|
|
53
100
|
borderRadius: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
small:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
101
|
+
none: 0, // Border / 0
|
|
102
|
+
xSmall: 2, // Border / 2
|
|
103
|
+
small: 4, // Border / 4
|
|
104
|
+
medium: 8, // Border / 8
|
|
105
|
+
large: 12, // Border / 12
|
|
106
|
+
xLarge: 16, // Border / 16
|
|
107
|
+
xxLarge: 24, // Border / 24 (2X-Large)
|
|
108
|
+
full: 1000, // Border / 1000 (Full)
|
|
109
|
+
|
|
110
|
+
// Legacy support - keeping these for backward compatibility
|
|
111
|
+
xs: 4, // Maps to small
|
|
112
|
+
sm: 8, // Maps to medium
|
|
113
|
+
md: 12, // Maps to large
|
|
114
|
+
lg: 16, // Maps to xLarge
|
|
115
|
+
xl: 24, // Maps to xxLarge
|
|
116
|
+
} as Readonly<ISize['borderRadius']>,
|
|
65
117
|
borderWidth: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
118
|
+
none: 0, // Stroke / 0
|
|
119
|
+
xSmall: 0.5, // Stroke / 0.5
|
|
120
|
+
small: 1, // Stroke / 1
|
|
121
|
+
medium: 1.5, // Stroke / 1.5
|
|
122
|
+
large: 2, // Stroke / 2
|
|
123
|
+
|
|
124
|
+
// Legacy support - keeping these for backward compatibility
|
|
125
|
+
extraSmall: 0.5, // Maps to xSmall
|
|
126
|
+
} as Readonly<ISize['borderWidth']>,
|
|
70
127
|
};
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
ViewStyle,
|
|
7
7
|
} from 'react-native';
|
|
8
8
|
import {Theme} from './types';
|
|
9
|
-
import {FontSizes, LineHeight, Spacing} from './commonSizes';
|
|
10
9
|
import {Fonts} from './fonts';
|
|
10
|
+
import {CommonSizes} from './commonSizes';
|
|
11
11
|
|
|
12
12
|
export const screenComponentWidth = Dimensions.get('screen').width - 60;
|
|
13
13
|
export const screenWidth = Dimensions.get('screen').width;
|
|
@@ -131,34 +131,34 @@ export const createThemedStyles = (theme: Theme) =>
|
|
|
131
131
|
} as TextStyle,
|
|
132
132
|
h4_semiBold: {
|
|
133
133
|
fontFamily: Fonts.semiBold,
|
|
134
|
-
fontSize:
|
|
135
|
-
lineHeight:
|
|
134
|
+
fontSize: CommonSizes.font.medium,
|
|
135
|
+
lineHeight: CommonSizes.lineHeight.medium,
|
|
136
136
|
} as TextStyle,
|
|
137
137
|
h4_regular: {
|
|
138
138
|
fontFamily: Fonts.regular,
|
|
139
|
-
fontSize:
|
|
140
|
-
lineHeight:
|
|
139
|
+
fontSize: CommonSizes.font.medium,
|
|
140
|
+
lineHeight: CommonSizes.lineHeight.medium,
|
|
141
141
|
} as TextStyle,
|
|
142
142
|
body_bold: {
|
|
143
143
|
fontFamily: Fonts.bold,
|
|
144
|
-
fontSize:
|
|
145
|
-
lineHeight:
|
|
144
|
+
fontSize: CommonSizes.font.small,
|
|
145
|
+
lineHeight: CommonSizes.lineHeight.small,
|
|
146
146
|
} as TextStyle,
|
|
147
147
|
body_bold_underlined: {
|
|
148
148
|
fontFamily: Fonts.bold,
|
|
149
|
-
fontSize:
|
|
150
|
-
lineHeight:
|
|
149
|
+
fontSize: CommonSizes.font.small,
|
|
150
|
+
lineHeight: CommonSizes.lineHeight.small,
|
|
151
151
|
textDecorationLine: 'underline',
|
|
152
152
|
} as TextStyle,
|
|
153
153
|
body_semiBold: {
|
|
154
154
|
fontFamily: Fonts.semiBold,
|
|
155
|
-
fontSize:
|
|
156
|
-
lineHeight:
|
|
155
|
+
fontSize: CommonSizes.font.small,
|
|
156
|
+
lineHeight: CommonSizes.lineHeight.small,
|
|
157
157
|
} as TextStyle,
|
|
158
158
|
body_regular: {
|
|
159
159
|
fontFamily: Fonts.regular,
|
|
160
|
-
fontSize:
|
|
161
|
-
lineHeight:
|
|
160
|
+
fontSize: CommonSizes.font.small,
|
|
161
|
+
lineHeight: CommonSizes.lineHeight.small,
|
|
162
162
|
} as TextStyle,
|
|
163
163
|
tabBar_bold: {
|
|
164
164
|
fontFamily: Fonts.bold,
|
|
@@ -204,47 +204,47 @@ export const CommonStyles = createThemedStyles({
|
|
|
204
204
|
text: {
|
|
205
205
|
header1: {
|
|
206
206
|
fontFamily: Fonts.medium,
|
|
207
|
-
fontSize:
|
|
207
|
+
fontSize: CommonSizes.font.large,
|
|
208
208
|
color: '#000000',
|
|
209
209
|
},
|
|
210
210
|
header2: {
|
|
211
211
|
fontFamily: Fonts.normal,
|
|
212
|
-
fontSize:
|
|
212
|
+
fontSize: CommonSizes.font.largePlus,
|
|
213
213
|
color: '#000000',
|
|
214
214
|
},
|
|
215
215
|
body1: {
|
|
216
216
|
fontFamily: Fonts.light,
|
|
217
|
-
fontSize:
|
|
217
|
+
fontSize: CommonSizes.font.medium,
|
|
218
218
|
color: '#000000',
|
|
219
219
|
},
|
|
220
220
|
body2: {
|
|
221
221
|
fontFamily: Fonts.regular,
|
|
222
|
-
fontSize:
|
|
222
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
223
223
|
color: '#000000',
|
|
224
224
|
},
|
|
225
225
|
button: {
|
|
226
226
|
fontFamily: Fonts.regular,
|
|
227
|
-
fontSize:
|
|
227
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
228
228
|
color: '#FFFFFF',
|
|
229
229
|
},
|
|
230
230
|
cards: {
|
|
231
231
|
fontFamily: Fonts.semiBold,
|
|
232
|
-
fontSize:
|
|
232
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
233
233
|
color: '#000000',
|
|
234
234
|
},
|
|
235
235
|
SearchBar: {
|
|
236
236
|
fontFamily: Fonts.light,
|
|
237
|
-
fontSize:
|
|
237
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
238
238
|
color: '#000000',
|
|
239
239
|
},
|
|
240
240
|
label: {
|
|
241
241
|
fontFamily: Fonts.light,
|
|
242
|
-
fontSize:
|
|
242
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
243
243
|
color: '#000000',
|
|
244
244
|
},
|
|
245
245
|
hyperlink: {
|
|
246
246
|
fontFamily: Fonts.light,
|
|
247
|
-
fontSize:
|
|
247
|
+
fontSize: CommonSizes.font.mediumPlus,
|
|
248
248
|
color: '#000000',
|
|
249
249
|
textDecorationLine: 'underline',
|
|
250
250
|
},
|