@momo-kits/foundation 0.75.1-beta.10
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 +278 -0
- package/Button/styles.ts +41 -0
- package/CheckBox/index.tsx +61 -0
- package/CheckBox/styles.ts +15 -0
- package/CheckBox/types.ts +38 -0
- package/Consts/colors+spacing+radius.ts +214 -0
- package/Consts/index.ts +4 -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 +27 -0
- package/IconButton/index.tsx +140 -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 +136 -0
- package/Input/InputMoney.tsx +132 -0
- package/Input/InputSearch.tsx +161 -0
- package/Input/InputTextArea.tsx +152 -0
- package/Input/common.tsx +118 -0
- package/Input/index.tsx +96 -0
- package/Input/styles.ts +122 -0
- package/Input/utils.ts +69 -0
- package/Layout/Card.tsx +141 -0
- package/Layout/GridSystem.tsx +124 -0
- package/Layout/Item.tsx +60 -0
- package/Layout/ScreenContainer.tsx +121 -0
- package/Layout/Section.tsx +141 -0
- package/Layout/index.ts +17 -0
- package/Layout/types.ts +59 -0
- package/Layout/utils.ts +60 -0
- package/Navigation/BottomTab.tsx +39 -0
- package/Navigation/Components.tsx +365 -0
- package/Navigation/ModalScreen.tsx +226 -0
- package/Navigation/Navigation.ts +44 -0
- package/Navigation/NavigationButton.tsx +54 -0
- package/Navigation/NavigationContainer.tsx +77 -0
- package/Navigation/Navigator.ts +82 -0
- package/Navigation/StackScreen.tsx +27 -0
- package/Navigation/index.ts +14 -0
- package/Navigation/types.ts +158 -0
- package/Navigation/utils.tsx +138 -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 +38 -0
- package/Popup/PopupNotify.tsx +215 -0
- package/Popup/PopupPromotion.tsx +77 -0
- package/Popup/index.tsx +4 -0
- package/Popup/types.ts +70 -0
- package/Radio/index.tsx +65 -0
- package/Radio/styles.ts +11 -0
- package/Radio/types.ts +38 -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 +26 -0
- package/Tag/index.tsx +79 -0
- package/Tag/styles.ts +24 -0
- package/Tag/types.ts +36 -0
- package/Text/index.tsx +123 -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,278 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Defines the visual style of the button.
|
|
18
|
+
*/
|
|
19
|
+
type?:
|
|
20
|
+
| 'primary'
|
|
21
|
+
| 'secondary'
|
|
22
|
+
| 'tonal'
|
|
23
|
+
| 'outline'
|
|
24
|
+
| 'danger'
|
|
25
|
+
| 'text'
|
|
26
|
+
| 'disabled';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Defines the size of the button.
|
|
30
|
+
*/
|
|
31
|
+
size?: 'large' | 'medium' | 'small';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* If true, the button will take the full width of its container.
|
|
35
|
+
*/
|
|
36
|
+
full?: boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Specifies the name of the icon that should be placed on the right side of the button.
|
|
40
|
+
*/
|
|
41
|
+
iconRight?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the name of the icon that should be placed on the left side of the button.
|
|
45
|
+
*/
|
|
46
|
+
iconLeft?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Represents the text that will be displayed on the button.
|
|
50
|
+
*/
|
|
51
|
+
title: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* If true, the icon of button will use the tint color provided by its container.
|
|
55
|
+
*/
|
|
56
|
+
useTintColor?: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A callback function that is called when the button is pressed.
|
|
60
|
+
*/
|
|
61
|
+
onPress: () => void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const Button: FC<ButtonProps> = ({
|
|
65
|
+
type,
|
|
66
|
+
size,
|
|
67
|
+
useTintColor,
|
|
68
|
+
full,
|
|
69
|
+
iconRight,
|
|
70
|
+
iconLeft,
|
|
71
|
+
title,
|
|
72
|
+
onPress,
|
|
73
|
+
...rest
|
|
74
|
+
}) => {
|
|
75
|
+
const {theme} = useContext(ApplicationContext);
|
|
76
|
+
const getSizeStyle = () => {
|
|
77
|
+
const styleSheet: {[key: string]: any} = styles;
|
|
78
|
+
return styleSheet[size ?? 'small'];
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const getTypeStyle = () => {
|
|
82
|
+
switch (type) {
|
|
83
|
+
case 'disabled':
|
|
84
|
+
return {
|
|
85
|
+
backgroundColor: theme.colors.background.disable,
|
|
86
|
+
};
|
|
87
|
+
case 'primary':
|
|
88
|
+
return {backgroundColor: theme.colors.primary};
|
|
89
|
+
case 'secondary':
|
|
90
|
+
return {
|
|
91
|
+
backgroundColor: theme.colors.background.surface,
|
|
92
|
+
borderWidth: 1,
|
|
93
|
+
borderColor: theme.colors.border.default,
|
|
94
|
+
};
|
|
95
|
+
case 'outline':
|
|
96
|
+
return {
|
|
97
|
+
backgroundColor: theme.colors.background.surface,
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
borderColor: theme.colors.primary,
|
|
100
|
+
};
|
|
101
|
+
case 'tonal':
|
|
102
|
+
return {
|
|
103
|
+
backgroundColor: theme.colors.background.tonal,
|
|
104
|
+
};
|
|
105
|
+
case 'danger':
|
|
106
|
+
return {
|
|
107
|
+
backgroundColor: theme.colors.error.primary,
|
|
108
|
+
};
|
|
109
|
+
case 'text':
|
|
110
|
+
return {};
|
|
111
|
+
default:
|
|
112
|
+
return {backgroundColor: theme.colors.primary};
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* export icon size
|
|
118
|
+
*/
|
|
119
|
+
const getIconSize = () => {
|
|
120
|
+
switch (size) {
|
|
121
|
+
case 'large':
|
|
122
|
+
return 24;
|
|
123
|
+
case 'medium':
|
|
124
|
+
case 'small':
|
|
125
|
+
return 16;
|
|
126
|
+
|
|
127
|
+
default:
|
|
128
|
+
return 24;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* export icon size
|
|
134
|
+
*/
|
|
135
|
+
const getIconSpace = () => {
|
|
136
|
+
switch (size) {
|
|
137
|
+
case 'large':
|
|
138
|
+
case 'medium':
|
|
139
|
+
return 8;
|
|
140
|
+
case 'small':
|
|
141
|
+
return 4;
|
|
142
|
+
|
|
143
|
+
default:
|
|
144
|
+
return 8;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* export typography style
|
|
150
|
+
*/
|
|
151
|
+
const getTypography = (): Typography => {
|
|
152
|
+
switch (size) {
|
|
153
|
+
case 'large':
|
|
154
|
+
return 'action_default';
|
|
155
|
+
case 'medium':
|
|
156
|
+
return 'action_s';
|
|
157
|
+
case 'small':
|
|
158
|
+
return 'action_xs';
|
|
159
|
+
|
|
160
|
+
default:
|
|
161
|
+
return 'action_default';
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const getTextColor = (): string => {
|
|
166
|
+
switch (type) {
|
|
167
|
+
case 'disabled':
|
|
168
|
+
return theme.colors.text.disable;
|
|
169
|
+
case 'primary':
|
|
170
|
+
return Colors.black_01;
|
|
171
|
+
case 'secondary':
|
|
172
|
+
return theme.colors.text.default;
|
|
173
|
+
case 'outline':
|
|
174
|
+
return theme.colors.primary;
|
|
175
|
+
case 'tonal':
|
|
176
|
+
return theme.colors.primary;
|
|
177
|
+
case 'danger':
|
|
178
|
+
return Colors.black_01;
|
|
179
|
+
case 'text':
|
|
180
|
+
return theme.colors.primary;
|
|
181
|
+
default:
|
|
182
|
+
return Colors.black_01;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* render title
|
|
188
|
+
*/
|
|
189
|
+
const renderTitle = () => {
|
|
190
|
+
const typography = getTypography();
|
|
191
|
+
const color = getTextColor();
|
|
192
|
+
return (
|
|
193
|
+
<Text typography={typography} color={color} numberOfLines={1}>
|
|
194
|
+
{title}
|
|
195
|
+
</Text>
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* render leading
|
|
201
|
+
*/
|
|
202
|
+
const renderLeading = () => {
|
|
203
|
+
if (iconLeft) {
|
|
204
|
+
const iconSize = getIconSize();
|
|
205
|
+
const marginRight = getIconSpace();
|
|
206
|
+
const color = useTintColor ? getTextColor() : undefined;
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<View
|
|
210
|
+
style={[
|
|
211
|
+
styles.leading,
|
|
212
|
+
{width: iconSize, height: iconSize, marginRight},
|
|
213
|
+
]}>
|
|
214
|
+
<Icon color={color} source={iconLeft} size={iconSize} />
|
|
215
|
+
</View>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* render trailing
|
|
222
|
+
*/
|
|
223
|
+
const renderTrailing = () => {
|
|
224
|
+
const marginLeft = getIconSpace();
|
|
225
|
+
const color = useTintColor ? getTextColor() : undefined;
|
|
226
|
+
if (iconRight) {
|
|
227
|
+
const iconSize = getIconSize();
|
|
228
|
+
return (
|
|
229
|
+
<View
|
|
230
|
+
style={[
|
|
231
|
+
styles.trailing,
|
|
232
|
+
{width: iconSize, height: iconSize, marginLeft},
|
|
233
|
+
]}>
|
|
234
|
+
<Icon color={color} source={iconRight} size={iconSize} />
|
|
235
|
+
</View>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const buttonStyle = StyleSheet.flatten([
|
|
241
|
+
getSizeStyle(),
|
|
242
|
+
getTypeStyle(),
|
|
243
|
+
full && {width: '100%'},
|
|
244
|
+
]);
|
|
245
|
+
|
|
246
|
+
const onPressButton = () => {
|
|
247
|
+
if (type === 'disabled') {
|
|
248
|
+
return () => {};
|
|
249
|
+
}
|
|
250
|
+
onPress?.();
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
const activeOpacity = type === 'disabled' ? 0.75 : 0.5;
|
|
254
|
+
|
|
255
|
+
return (
|
|
256
|
+
<TouchableOpacity
|
|
257
|
+
{...rest}
|
|
258
|
+
accessibilityLabel={`Button/${title}`}
|
|
259
|
+
activeOpacity={activeOpacity}
|
|
260
|
+
onPress={onPressButton}
|
|
261
|
+
style={buttonStyle}>
|
|
262
|
+
{renderLeading()}
|
|
263
|
+
{renderTitle()}
|
|
264
|
+
{renderTrailing()}
|
|
265
|
+
</TouchableOpacity>
|
|
266
|
+
);
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
Button.defaultProps = {
|
|
270
|
+
type: 'primary',
|
|
271
|
+
size: 'large',
|
|
272
|
+
full: true,
|
|
273
|
+
disabled: false,
|
|
274
|
+
title: 'Button',
|
|
275
|
+
useTintColor: true,
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
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,38 @@
|
|
|
1
|
+
import {ViewStyle} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export type CheckBoxProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Represents whether the CheckBox is currently checked (`true`) or unchecked (`false`).
|
|
6
|
+
*/
|
|
7
|
+
value: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Optional. If `true`, the user won't be able to interact with the CheckBox.
|
|
11
|
+
* Defaults to `false` if not provided.
|
|
12
|
+
*/
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Optional. Represents the text label displayed next to the CheckBox.
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A callback function that is called when the value of the CheckBox changes.
|
|
22
|
+
* Receives the new value of the CheckBox as a parameter.
|
|
23
|
+
*/
|
|
24
|
+
onChange: (value: boolean) => void;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Optional. If `true`, the CheckBox will be in an indeterminate state,
|
|
28
|
+
* which is typically used to represent a "mixed" or "partial" selection state.
|
|
29
|
+
* Defaults to `false` if not provided.
|
|
30
|
+
*/
|
|
31
|
+
indeterminated?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional. Used to apply custom styling to the CheckBox component.
|
|
35
|
+
* Accepts an object of style properties.
|
|
36
|
+
*/
|
|
37
|
+
style?: ViewStyle;
|
|
38
|
+
};
|
|
@@ -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