@momo-kits/foundation 0.75.1-beta.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/Assets/header-background.png +0 -0
- package/Assets/icon.json +3947 -0
- package/Button/index.tsx +247 -0
- package/Button/styles.ts +41 -0
- package/CheckBox/index.tsx +61 -0
- package/CheckBox/styles.ts +15 -0
- package/CheckBox/types.ts +10 -0
- package/Consts/colors+spacing+radius.ts +214 -0
- package/Consts/index.ts +3 -0
- package/Consts/styles.ts +78 -0
- package/Consts/theme.ts +121 -0
- package/Divider/index.tsx +19 -0
- package/Icon/index.tsx +37 -0
- package/Icon/types.ts +8 -0
- package/IconButton/index.tsx +128 -0
- package/IconButton/styles.ts +19 -0
- package/Image/index.tsx +80 -0
- package/Image/styles.ts +13 -0
- package/Image/types.ts +3 -0
- package/Input/Input.tsx +142 -0
- package/Input/InputMoney.tsx +132 -0
- package/Input/InputSearch.tsx +161 -0
- package/Input/InputTextArea.tsx +152 -0
- package/Input/common.tsx +125 -0
- package/Input/index.tsx +41 -0
- package/Input/styles.ts +122 -0
- package/Input/utils.ts +63 -0
- package/Layout/Card.tsx +87 -0
- package/Layout/GridSystem.tsx +124 -0
- package/Layout/ScreenContainer.tsx +122 -0
- package/Layout/Section.tsx +143 -0
- package/Layout/index.ts +16 -0
- package/Layout/types.ts +21 -0
- package/Layout/utils.ts +50 -0
- package/Navigation/BottomTab.tsx +39 -0
- package/Navigation/Components.tsx +329 -0
- package/Navigation/ModalScreen.tsx +207 -0
- package/Navigation/Navigation.ts +38 -0
- package/Navigation/NavigationButton.tsx +54 -0
- package/Navigation/NavigationContainer.tsx +82 -0
- package/Navigation/Navigator.ts +66 -0
- package/Navigation/Observer.ts +79 -0
- package/Navigation/StackScreen.tsx +40 -0
- package/Navigation/index.ts +14 -0
- package/Navigation/types.ts +149 -0
- package/Navigation/utils.tsx +167 -0
- package/Pagination/Dot.tsx +16 -0
- package/Pagination/PaginationDot.tsx +33 -0
- package/Pagination/PaginationNumber.tsx +23 -0
- package/Pagination/PaginationScroll.tsx +88 -0
- package/Pagination/PaginationWhiteDot.tsx +32 -0
- package/Pagination/index.tsx +25 -0
- package/Pagination/styles.ts +47 -0
- package/Pagination/types.ts +19 -0
- package/Popup/PopupNotify.tsx +215 -0
- package/Popup/PopupPromotion.tsx +77 -0
- package/Popup/index.tsx +4 -0
- package/Popup/types.ts +22 -0
- package/Radio/index.tsx +65 -0
- package/Radio/styles.ts +11 -0
- package/Radio/types.ts +10 -0
- package/Skeleton/index.tsx +72 -0
- package/Skeleton/styles.ts +5 -0
- package/Skeleton/types.ts +3 -0
- package/Switch/index.tsx +40 -0
- package/Switch/styles.ts +23 -0
- package/Switch/types.ts +8 -0
- package/Tag/index.tsx +79 -0
- package/Tag/styles.ts +24 -0
- package/Tag/types.ts +10 -0
- package/Text/index.tsx +110 -0
- package/Text/styles.ts +35 -0
- package/Text/types.ts +40 -0
- package/index.ts +38 -0
- package/package.json +41 -0
- package/publish.sh +26 -0
package/Button/index.tsx
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import React, {FC, useContext} from 'react';
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
TouchableOpacity,
|
|
5
|
+
TouchableOpacityProps,
|
|
6
|
+
View,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import {ApplicationContext} from '../Navigation';
|
|
9
|
+
import {Text} from '../Text';
|
|
10
|
+
import {Typography} from '../Text/types';
|
|
11
|
+
import {Colors} from '../Consts';
|
|
12
|
+
import styles from './styles';
|
|
13
|
+
import {Icon} from '../Icon';
|
|
14
|
+
|
|
15
|
+
export interface ButtonProps extends TouchableOpacityProps {
|
|
16
|
+
type?:
|
|
17
|
+
| 'primary'
|
|
18
|
+
| 'secondary'
|
|
19
|
+
| 'tonal'
|
|
20
|
+
| 'outline'
|
|
21
|
+
| 'danger'
|
|
22
|
+
| 'text'
|
|
23
|
+
| 'disabled';
|
|
24
|
+
size?: 'large' | 'medium' | 'small';
|
|
25
|
+
full?: boolean;
|
|
26
|
+
iconRight?: string;
|
|
27
|
+
iconLeft?: string;
|
|
28
|
+
title: string;
|
|
29
|
+
useTintColor?: boolean;
|
|
30
|
+
onPress: () => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const Button: FC<ButtonProps> = ({
|
|
34
|
+
type,
|
|
35
|
+
size,
|
|
36
|
+
useTintColor,
|
|
37
|
+
full,
|
|
38
|
+
iconRight,
|
|
39
|
+
iconLeft,
|
|
40
|
+
title,
|
|
41
|
+
onPress,
|
|
42
|
+
...rest
|
|
43
|
+
}) => {
|
|
44
|
+
const {theme} = useContext(ApplicationContext);
|
|
45
|
+
const getSizeStyle = () => {
|
|
46
|
+
const styleSheet: {[key: string]: any} = styles;
|
|
47
|
+
return styleSheet[size ?? 'small'];
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const getTypeStyle = () => {
|
|
51
|
+
switch (type) {
|
|
52
|
+
case 'disabled':
|
|
53
|
+
return {
|
|
54
|
+
backgroundColor: theme.colors.background.disable,
|
|
55
|
+
};
|
|
56
|
+
case 'primary':
|
|
57
|
+
return {backgroundColor: theme.colors.primary};
|
|
58
|
+
case 'secondary':
|
|
59
|
+
return {
|
|
60
|
+
backgroundColor: theme.colors.background.surface,
|
|
61
|
+
borderWidth: 1,
|
|
62
|
+
borderColor: theme.colors.border.default,
|
|
63
|
+
};
|
|
64
|
+
case 'outline':
|
|
65
|
+
return {
|
|
66
|
+
backgroundColor: theme.colors.background.surface,
|
|
67
|
+
borderWidth: 1,
|
|
68
|
+
borderColor: theme.colors.primary,
|
|
69
|
+
};
|
|
70
|
+
case 'tonal':
|
|
71
|
+
return {
|
|
72
|
+
backgroundColor: theme.colors.background.tonal,
|
|
73
|
+
};
|
|
74
|
+
case 'danger':
|
|
75
|
+
return {
|
|
76
|
+
backgroundColor: theme.colors.error.primary,
|
|
77
|
+
};
|
|
78
|
+
case 'text':
|
|
79
|
+
return {};
|
|
80
|
+
default:
|
|
81
|
+
return {backgroundColor: theme.colors.primary};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* export icon size
|
|
87
|
+
*/
|
|
88
|
+
const getIconSize = () => {
|
|
89
|
+
switch (size) {
|
|
90
|
+
case 'large':
|
|
91
|
+
return 24;
|
|
92
|
+
case 'medium':
|
|
93
|
+
case 'small':
|
|
94
|
+
return 16;
|
|
95
|
+
|
|
96
|
+
default:
|
|
97
|
+
return 24;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* export icon size
|
|
103
|
+
*/
|
|
104
|
+
const getIconSpace = () => {
|
|
105
|
+
switch (size) {
|
|
106
|
+
case 'large':
|
|
107
|
+
case 'medium':
|
|
108
|
+
return 8;
|
|
109
|
+
case 'small':
|
|
110
|
+
return 4;
|
|
111
|
+
|
|
112
|
+
default:
|
|
113
|
+
return 8;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* export typography style
|
|
119
|
+
*/
|
|
120
|
+
const getTypography = (): Typography => {
|
|
121
|
+
switch (size) {
|
|
122
|
+
case 'large':
|
|
123
|
+
return 'action_default';
|
|
124
|
+
case 'medium':
|
|
125
|
+
return 'action_s';
|
|
126
|
+
case 'small':
|
|
127
|
+
return 'action_xs';
|
|
128
|
+
|
|
129
|
+
default:
|
|
130
|
+
return 'action_default';
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const getTextColor = (): string => {
|
|
135
|
+
switch (type) {
|
|
136
|
+
case 'disabled':
|
|
137
|
+
return theme.colors.text.disable;
|
|
138
|
+
case 'primary':
|
|
139
|
+
return Colors.black_01;
|
|
140
|
+
case 'secondary':
|
|
141
|
+
return theme.colors.text.default;
|
|
142
|
+
case 'outline':
|
|
143
|
+
return theme.colors.primary;
|
|
144
|
+
case 'tonal':
|
|
145
|
+
return theme.colors.primary;
|
|
146
|
+
case 'danger':
|
|
147
|
+
return Colors.black_01;
|
|
148
|
+
case 'text':
|
|
149
|
+
return theme.colors.primary;
|
|
150
|
+
default:
|
|
151
|
+
return Colors.black_01;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* render title
|
|
157
|
+
*/
|
|
158
|
+
const renderTitle = () => {
|
|
159
|
+
const typography = getTypography();
|
|
160
|
+
const color = getTextColor();
|
|
161
|
+
return (
|
|
162
|
+
<Text typography={typography} color={color} numberOfLines={1}>
|
|
163
|
+
{title}
|
|
164
|
+
</Text>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* render leading
|
|
170
|
+
*/
|
|
171
|
+
const renderLeading = () => {
|
|
172
|
+
if (iconLeft) {
|
|
173
|
+
const iconSize = getIconSize();
|
|
174
|
+
const marginRight = getIconSpace();
|
|
175
|
+
const color = useTintColor ? getTextColor() : undefined;
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<View
|
|
179
|
+
style={[
|
|
180
|
+
styles.leading,
|
|
181
|
+
{width: iconSize, height: iconSize, marginRight},
|
|
182
|
+
]}>
|
|
183
|
+
<Icon color={color} source={iconLeft} size={iconSize} />
|
|
184
|
+
</View>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* render trailing
|
|
191
|
+
*/
|
|
192
|
+
const renderTrailing = () => {
|
|
193
|
+
const marginLeft = getIconSpace();
|
|
194
|
+
const color = useTintColor ? getTextColor() : undefined;
|
|
195
|
+
if (iconRight) {
|
|
196
|
+
const iconSize = getIconSize();
|
|
197
|
+
return (
|
|
198
|
+
<View
|
|
199
|
+
style={[
|
|
200
|
+
styles.trailing,
|
|
201
|
+
{width: iconSize, height: iconSize, marginLeft},
|
|
202
|
+
]}>
|
|
203
|
+
<Icon color={color} source={iconRight} size={iconSize} />
|
|
204
|
+
</View>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const buttonStyle = StyleSheet.flatten([
|
|
210
|
+
getSizeStyle(),
|
|
211
|
+
getTypeStyle(),
|
|
212
|
+
full && {width: '100%'},
|
|
213
|
+
]);
|
|
214
|
+
|
|
215
|
+
const onPressButton = () => {
|
|
216
|
+
if (type === 'disabled') {
|
|
217
|
+
return () => {};
|
|
218
|
+
}
|
|
219
|
+
onPress?.();
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const activeOpacity = type === 'disabled' ? 0.75 : 0.5;
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<TouchableOpacity
|
|
226
|
+
{...rest}
|
|
227
|
+
accessibilityLabel={`Button/${title}`}
|
|
228
|
+
activeOpacity={activeOpacity}
|
|
229
|
+
onPress={onPressButton}
|
|
230
|
+
style={buttonStyle}>
|
|
231
|
+
{renderLeading()}
|
|
232
|
+
{renderTitle()}
|
|
233
|
+
{renderTrailing()}
|
|
234
|
+
</TouchableOpacity>
|
|
235
|
+
);
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
Button.defaultProps = {
|
|
239
|
+
type: 'primary',
|
|
240
|
+
size: 'large',
|
|
241
|
+
full: true,
|
|
242
|
+
disabled: false,
|
|
243
|
+
title: 'Button',
|
|
244
|
+
useTintColor: true,
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export {Button};
|
package/Button/styles.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
large: {
|
|
5
|
+
height: 48,
|
|
6
|
+
borderRadius: 8,
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
justifyContent: 'center',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
paddingHorizontal: 16,
|
|
11
|
+
minWidth: 128,
|
|
12
|
+
},
|
|
13
|
+
medium: {
|
|
14
|
+
height: 36,
|
|
15
|
+
borderRadius: 8,
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
paddingHorizontal: 12,
|
|
20
|
+
minWidth: 80,
|
|
21
|
+
},
|
|
22
|
+
small: {
|
|
23
|
+
height: 28,
|
|
24
|
+
borderRadius: 6,
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
paddingHorizontal: 8,
|
|
29
|
+
minWidth: 60,
|
|
30
|
+
},
|
|
31
|
+
leading: {
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
},
|
|
36
|
+
trailing: {
|
|
37
|
+
overflow: 'hidden',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, {FC, useContext} from 'react';
|
|
2
|
+
import {TouchableOpacity, View} from 'react-native';
|
|
3
|
+
import {CheckBoxProps} from './types';
|
|
4
|
+
import styles from './styles';
|
|
5
|
+
import {ApplicationContext} from '../Navigation';
|
|
6
|
+
import {Text} from '../Text';
|
|
7
|
+
import {Icon} from '../Icon';
|
|
8
|
+
|
|
9
|
+
const CheckBox: FC<CheckBoxProps> = props => {
|
|
10
|
+
const {theme} = useContext(ApplicationContext);
|
|
11
|
+
const {value, disabled, onChange, style, label, indeterminated} = props;
|
|
12
|
+
|
|
13
|
+
const haveValue = value || indeterminated;
|
|
14
|
+
let borderColor = haveValue
|
|
15
|
+
? theme.colors.primary
|
|
16
|
+
: theme.colors.text.default;
|
|
17
|
+
let backgroundColor = haveValue
|
|
18
|
+
? theme.colors.primary
|
|
19
|
+
: theme.colors.background.surface;
|
|
20
|
+
|
|
21
|
+
let iconSource = indeterminated ? 'ic_minus' : 'ic_checked';
|
|
22
|
+
|
|
23
|
+
if (disabled) {
|
|
24
|
+
borderColor = haveValue
|
|
25
|
+
? theme.colors.background.tonal
|
|
26
|
+
: theme.colors.border.disable;
|
|
27
|
+
backgroundColor = haveValue
|
|
28
|
+
? theme.colors.background.tonal
|
|
29
|
+
: theme.colors.background.surface;
|
|
30
|
+
}
|
|
31
|
+
const checkboxStyle = {borderColor, backgroundColor, borderWidth: 1};
|
|
32
|
+
|
|
33
|
+
const onChangeValue = () => {
|
|
34
|
+
onChange?.(!value);
|
|
35
|
+
};
|
|
36
|
+
return (
|
|
37
|
+
<TouchableOpacity
|
|
38
|
+
accessibilityLabel={`CheckBox/${label}`}
|
|
39
|
+
activeOpacity={0.8}
|
|
40
|
+
onPress={onChangeValue}
|
|
41
|
+
disabled={disabled}
|
|
42
|
+
style={[style, styles.container]}>
|
|
43
|
+
<View style={[checkboxStyle, styles.checkbox]}>
|
|
44
|
+
{haveValue && (
|
|
45
|
+
<Icon
|
|
46
|
+
color={theme.colors.background.surface}
|
|
47
|
+
size={20}
|
|
48
|
+
source={iconSource}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
51
|
+
</View>
|
|
52
|
+
{!!label && <Text typography={'description_default'}>{label}</Text>}
|
|
53
|
+
</TouchableOpacity>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
CheckBox.defaultProps = {
|
|
58
|
+
disabled: false,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export {CheckBox};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Radius, Spacing} from '../Consts';
|
|
3
|
+
|
|
4
|
+
export default StyleSheet.create({
|
|
5
|
+
checkbox: {
|
|
6
|
+
width: 20,
|
|
7
|
+
height: 20,
|
|
8
|
+
borderRadius: Radius.XS,
|
|
9
|
+
borderWidth: 2,
|
|
10
|
+
marginRight: Spacing.S,
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
},
|
|
14
|
+
container: {flexDirection: 'row'},
|
|
15
|
+
});
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import {Platform} from 'react-native';
|
|
2
|
+
|
|
3
|
+
const Colors = {
|
|
4
|
+
black_01: '#ffffff',
|
|
5
|
+
black_02: '#f9f9f9',
|
|
6
|
+
black_03: '#f0f0f0',
|
|
7
|
+
black_04: '#e8e8e8',
|
|
8
|
+
black_05: '#e5e5e5',
|
|
9
|
+
black_06: '#d8d8d8',
|
|
10
|
+
black_07: '#cccccc',
|
|
11
|
+
black_08: '#c6c6c6',
|
|
12
|
+
black_09: '#b9b9b9',
|
|
13
|
+
black_10: '#a0a0a0',
|
|
14
|
+
black_11: '#878787',
|
|
15
|
+
black_12: '#727272',
|
|
16
|
+
black_13: '#646464',
|
|
17
|
+
black_14: '#565656',
|
|
18
|
+
black_15: '#484848',
|
|
19
|
+
black_16: '#404040',
|
|
20
|
+
black_17: '#303233',
|
|
21
|
+
black_18: '#242424',
|
|
22
|
+
black_19: '#18191a',
|
|
23
|
+
black_20: '#000000',
|
|
24
|
+
pink_01: '#bc2678',
|
|
25
|
+
pink_02: '#d42a87',
|
|
26
|
+
pink_03: '#eb2f96',
|
|
27
|
+
pink_04: '#ed43a0',
|
|
28
|
+
pink_05: '#ef59ab',
|
|
29
|
+
pink_06: '#f382c0',
|
|
30
|
+
pink_07: '#f7acd5',
|
|
31
|
+
pink_08: '#fbd5ea',
|
|
32
|
+
pink_09: '#fdeaf4',
|
|
33
|
+
pink_10: '#fef4fa',
|
|
34
|
+
pink_11: '#fef8fc',
|
|
35
|
+
pink_MoMo_Branding: '#a50064',
|
|
36
|
+
violet_01: '#7822c0',
|
|
37
|
+
violet_02: '#8726d8',
|
|
38
|
+
violet_03: '#962af0',
|
|
39
|
+
violet_04: '#a03ff1',
|
|
40
|
+
violet_05: '#ab55f3',
|
|
41
|
+
violet_06: '#c07ff6',
|
|
42
|
+
violet_07: '#d5aaf9',
|
|
43
|
+
violet_08: '#ead4fc',
|
|
44
|
+
violet_09: '#f4e9fd',
|
|
45
|
+
violet_10: '#faf4fe',
|
|
46
|
+
violet_11: '#fcf8fe',
|
|
47
|
+
violet_11_stroke: '#dfe1e5',
|
|
48
|
+
indigo_01: '#3e3ccc',
|
|
49
|
+
indigo_02: '#4644e6',
|
|
50
|
+
indigo_03: '#4e4bff',
|
|
51
|
+
indigo_04: '#5f5dff',
|
|
52
|
+
indigo_05: '#716fff',
|
|
53
|
+
indigo_06: '#9593ff',
|
|
54
|
+
indigo_07: '#b8b7ff',
|
|
55
|
+
indigo_08: '#dcdbff',
|
|
56
|
+
indigo_09: '#ededff',
|
|
57
|
+
indigo_10: '#f6f6ff',
|
|
58
|
+
indigo_11: '#f9f9ff',
|
|
59
|
+
blue_01: '#0062cc',
|
|
60
|
+
blue_02: '#006ee6',
|
|
61
|
+
blue_03: '#007aff',
|
|
62
|
+
blue_04: '#1987ff',
|
|
63
|
+
blue_05: '#3395ff',
|
|
64
|
+
blue_06: '#66afff',
|
|
65
|
+
blue_07: '#99caff',
|
|
66
|
+
blue_08: '#cce4ff',
|
|
67
|
+
blue_09: '#e5f1ff',
|
|
68
|
+
blue_10: '#f2f8ff',
|
|
69
|
+
blue_11: '#f7fbff',
|
|
70
|
+
mint_01: '#0f9b9b',
|
|
71
|
+
mint_02: '#11afaf',
|
|
72
|
+
mint_03: '#13c2c2',
|
|
73
|
+
mint_04: '#2ac8c8',
|
|
74
|
+
mint_05: '#42cece',
|
|
75
|
+
mint_06: '#71dada',
|
|
76
|
+
mint_07: '#a1e7e7',
|
|
77
|
+
mint_08: '#d0f3f3',
|
|
78
|
+
mint_09: '#e7f8f8',
|
|
79
|
+
mint_10: '#f3fcfc',
|
|
80
|
+
mint_11: '#f8fdfd',
|
|
81
|
+
green_01: '#2a9f47',
|
|
82
|
+
green_02: '#2fb350',
|
|
83
|
+
green_03: '#34c759',
|
|
84
|
+
green_04: '#48cc69',
|
|
85
|
+
green_05: '#5dd27a',
|
|
86
|
+
green_06: '#85dd9b',
|
|
87
|
+
green_07: '#aee9bd',
|
|
88
|
+
green_08: '#d6f4de',
|
|
89
|
+
green_09: '#eaf9ee',
|
|
90
|
+
green_10: '#f5fcf6',
|
|
91
|
+
green_11: '#f9fdfa',
|
|
92
|
+
lime_01: '#80ae0e',
|
|
93
|
+
lime_02: '#90c30f',
|
|
94
|
+
lime_03: '#a0d911',
|
|
95
|
+
lime_04: '#a9dc28',
|
|
96
|
+
lime_05: '#b3e141',
|
|
97
|
+
lime_06: '#c6e870',
|
|
98
|
+
lime_07: '#d9f0a0',
|
|
99
|
+
lime_08: '#ecf7cf',
|
|
100
|
+
lime_09: '#f5fbe7',
|
|
101
|
+
lime_10: '#fafdf3',
|
|
102
|
+
lime_11: '#fcfef8',
|
|
103
|
+
yellow_01: '#cca300',
|
|
104
|
+
yellow_02: '#e6b800',
|
|
105
|
+
yellow_03: '#ffcc00',
|
|
106
|
+
yellow_04: '#ffd119',
|
|
107
|
+
yellow_05: '#ffd633',
|
|
108
|
+
yellow_06: '#ffe066',
|
|
109
|
+
yellow_07: '#ffeb99',
|
|
110
|
+
yellow_08: '#fff5cc',
|
|
111
|
+
yellow_09: '#fff9e5',
|
|
112
|
+
yellow_10: '#fffcf2',
|
|
113
|
+
yellow_11: '#fffdf7',
|
|
114
|
+
gold_01: '#c87012',
|
|
115
|
+
gold_02: '#e17e14',
|
|
116
|
+
gold_03: '#fa8c16',
|
|
117
|
+
gold_04: '#fa972d',
|
|
118
|
+
gold_05: '#fba345',
|
|
119
|
+
gold_06: '#fcba73',
|
|
120
|
+
gold_07: '#fdd1a2',
|
|
121
|
+
gold_08: '#fee8d0',
|
|
122
|
+
gold_09: '#fef3e7',
|
|
123
|
+
gold_10: '#fff9f3',
|
|
124
|
+
gold_11: '#fefbf8',
|
|
125
|
+
orange_01: '#c84316',
|
|
126
|
+
orange_02: '#e14c19',
|
|
127
|
+
orange_03: '#fa541c',
|
|
128
|
+
orange_04: '#fa6532',
|
|
129
|
+
orange_05: '#fb7649',
|
|
130
|
+
orange_06: '#fc9877',
|
|
131
|
+
orange_07: '#fdbba4',
|
|
132
|
+
orange_08: '#feddd2',
|
|
133
|
+
orange_09: '#feede8',
|
|
134
|
+
orange_10: '#fff6f3',
|
|
135
|
+
orange_11: '#fefaf8',
|
|
136
|
+
red_01: '#c41b24',
|
|
137
|
+
red_02: '#dd1f29',
|
|
138
|
+
red_03: '#f5222d',
|
|
139
|
+
red_04: '#f63842',
|
|
140
|
+
red_05: '#f74e57',
|
|
141
|
+
red_06: '#f97a81',
|
|
142
|
+
red_07: '#fba7ab',
|
|
143
|
+
red_08: '#fdd3d5',
|
|
144
|
+
red_09: '#fee8ea',
|
|
145
|
+
red_10: '#fef4f4',
|
|
146
|
+
red_11: '#fef8f8',
|
|
147
|
+
};
|
|
148
|
+
const Spacing = {
|
|
149
|
+
XXS: 2,
|
|
150
|
+
XS: 4,
|
|
151
|
+
S: 8,
|
|
152
|
+
M: 12,
|
|
153
|
+
L: 16,
|
|
154
|
+
XL: 24,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const Radius = {
|
|
158
|
+
XXS: 2,
|
|
159
|
+
XS: 4,
|
|
160
|
+
S: 8,
|
|
161
|
+
M: 12,
|
|
162
|
+
L: 16,
|
|
163
|
+
XL: 24,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const Shadow = {
|
|
167
|
+
Dark: Platform.select({
|
|
168
|
+
ios: {
|
|
169
|
+
shadowColor: Colors.black_17,
|
|
170
|
+
shadowOffset: {
|
|
171
|
+
width: 2,
|
|
172
|
+
height: 2,
|
|
173
|
+
},
|
|
174
|
+
shadowOpacity: 0.25,
|
|
175
|
+
shadowRadius: 10,
|
|
176
|
+
},
|
|
177
|
+
android: {
|
|
178
|
+
shadowColor: Colors.black_20,
|
|
179
|
+
shadowOffset: {
|
|
180
|
+
width: 0,
|
|
181
|
+
height: 3,
|
|
182
|
+
},
|
|
183
|
+
shadowOpacity: 0.29,
|
|
184
|
+
shadowRadius: 4.65,
|
|
185
|
+
|
|
186
|
+
elevation: 7,
|
|
187
|
+
},
|
|
188
|
+
}),
|
|
189
|
+
|
|
190
|
+
Light: Platform.select({
|
|
191
|
+
ios: {
|
|
192
|
+
shadowColor: Colors.black_17,
|
|
193
|
+
shadowOffset: {
|
|
194
|
+
width: 2,
|
|
195
|
+
height: 2,
|
|
196
|
+
},
|
|
197
|
+
shadowOpacity: 0.07,
|
|
198
|
+
shadowRadius: 10,
|
|
199
|
+
},
|
|
200
|
+
android: {
|
|
201
|
+
shadowColor: Colors.black_10,
|
|
202
|
+
shadowOffset: {
|
|
203
|
+
width: 1,
|
|
204
|
+
height: 3,
|
|
205
|
+
},
|
|
206
|
+
shadowOpacity: 0.29,
|
|
207
|
+
shadowRadius: 4.65,
|
|
208
|
+
|
|
209
|
+
elevation: 6,
|
|
210
|
+
},
|
|
211
|
+
}),
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export {Colors, Spacing, Radius, Shadow};
|
package/Consts/index.ts
ADDED
package/Consts/styles.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
|
|
3
|
+
const Styles = StyleSheet.create({
|
|
4
|
+
flex: {
|
|
5
|
+
flex: 1,
|
|
6
|
+
},
|
|
7
|
+
flexCenter: {
|
|
8
|
+
flex: 1,
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
},
|
|
12
|
+
row: {
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
},
|
|
16
|
+
rowSpace: {
|
|
17
|
+
flexDirection: 'row',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'space-between',
|
|
20
|
+
},
|
|
21
|
+
rowCenter: {
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
},
|
|
26
|
+
rowWrap: {
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
flexWrap: 'wrap',
|
|
29
|
+
},
|
|
30
|
+
columnSpace: {
|
|
31
|
+
flexDirection: 'column',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
justifyContent: 'space-between',
|
|
34
|
+
},
|
|
35
|
+
columnSpaceRight: {
|
|
36
|
+
flexDirection: 'column',
|
|
37
|
+
alignItems: 'flex-end',
|
|
38
|
+
justifyContent: 'space-between',
|
|
39
|
+
},
|
|
40
|
+
columnCenter: {
|
|
41
|
+
flexDirection: 'column',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
},
|
|
45
|
+
columnCenterRight: {
|
|
46
|
+
flexDirection: 'column',
|
|
47
|
+
alignItems: 'flex-end',
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
},
|
|
50
|
+
//paddingHorizontal
|
|
51
|
+
paddingHorizontal4: {
|
|
52
|
+
paddingHorizontal: 4,
|
|
53
|
+
},
|
|
54
|
+
paddingHorizontal8: {
|
|
55
|
+
paddingHorizontal: 8,
|
|
56
|
+
},
|
|
57
|
+
paddingHorizontal16: {
|
|
58
|
+
paddingHorizontal: 16,
|
|
59
|
+
},
|
|
60
|
+
paddingHorizontal24: {
|
|
61
|
+
paddingHorizontal: 24,
|
|
62
|
+
},
|
|
63
|
+
//paddingVertical
|
|
64
|
+
paddingVertical4: {
|
|
65
|
+
paddingVertical: 4,
|
|
66
|
+
},
|
|
67
|
+
paddingVertical8: {
|
|
68
|
+
paddingVertical: 8,
|
|
69
|
+
},
|
|
70
|
+
paddingVertical16: {
|
|
71
|
+
paddingVertical: 16,
|
|
72
|
+
},
|
|
73
|
+
paddingVertical24: {
|
|
74
|
+
paddingVertical: 24,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export {Styles};
|