@hero-design/rn 7.1.3-alpha → 7.1.3-alpha2
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/fonts/be-vietnam-pro-light.ttf +0 -0
- package/assets/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/assets/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/package.json +1 -1
- package/playground/components/Card.tsx +1 -1
- package/playground/components/Typography.tsx +2 -2
- package/playground/index.tsx +13 -6
- package/src/components/Badge/StyledBadge.tsx +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +4 -4
- package/src/components/BottomNavigation/__tests__/__snapshots__/BottomNavigation.spec.tsx.snap +4 -4
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -1
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +24 -24
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/StyledFABContainer.spec.tsx.snap +1 -1
- package/src/components/Typography/Text/StyledText.tsx +3 -3
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +9 -9
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +13 -14
- package/src/theme/components/badge.ts +5 -5
- package/src/theme/components/fab.ts +6 -6
- package/src/theme/components/typography.ts +7 -7
- package/src/theme/global/index.ts +2 -2
- package/src/theme/global/typography.ts +7 -8
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -245,7 +245,7 @@ const MyLeaveCard = (props: ViewProps) => {
|
|
|
245
245
|
};
|
|
246
246
|
|
|
247
247
|
const CardPlayground = () => (
|
|
248
|
-
<ScrollView
|
|
248
|
+
<ScrollView contentContainerStyle={{ padding: theme.space.medium }}>
|
|
249
249
|
<View style={{ flexDirection: 'row', height: scale(216) }}>
|
|
250
250
|
<View style={{ flex: 1, marginRight: theme.space.medium }}>
|
|
251
251
|
<InductionCard
|
|
@@ -12,9 +12,9 @@ const TypographyPlayground = () => {
|
|
|
12
12
|
</Typography.Text>
|
|
13
13
|
<Typography.Text fontSize="large">This is a subtitle</Typography.Text>
|
|
14
14
|
<Typography.Text>This is a 2nd subtitle</Typography.Text>
|
|
15
|
-
<Typography.Text>This is body text</Typography.Text>
|
|
15
|
+
<Typography.Text fontWeight="light">This is body text</Typography.Text>
|
|
16
16
|
<Typography.Text intent="subdued" fontWeight="light">
|
|
17
|
-
This is
|
|
17
|
+
This is subdued text
|
|
18
18
|
</Typography.Text>
|
|
19
19
|
</View>
|
|
20
20
|
);
|
package/playground/index.tsx
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
NativeStackScreenProps,
|
|
7
7
|
} from '@react-navigation/native-stack';
|
|
8
8
|
import { useFonts } from 'expo-font';
|
|
9
|
-
import { SafeAreaView, FlatList
|
|
10
|
-
import { ThemeProvider, theme, useTheme } from '../src/index';
|
|
9
|
+
import { SafeAreaView, FlatList } from 'react-native';
|
|
10
|
+
import { ThemeProvider, theme, useTheme, Typography } from '../src/index';
|
|
11
11
|
import BadgePlayground from './components/Badge';
|
|
12
12
|
import BottomNavigation from './components/BottomNavigation';
|
|
13
13
|
import CardPlayground from './components/Card';
|
|
@@ -17,6 +17,9 @@ import TypographyPlayground from './components/Typography';
|
|
|
17
17
|
import FABPlayground from './components/FAB';
|
|
18
18
|
|
|
19
19
|
const heroIconFontPath = require('../assets/fonts/hero-icons.ttf');
|
|
20
|
+
const beVietnamProLightFont = require('../assets/fonts/be-vietnam-pro-light.ttf');
|
|
21
|
+
const beVietnamProRegularFont = require('../assets/fonts/be-vietnam-pro-regular.ttf');
|
|
22
|
+
const beVietnamProSemiBoldFont = require('../assets/fonts/be-vietnam-pro-semibold.ttf');
|
|
20
23
|
|
|
21
24
|
type RootStackParamList = {
|
|
22
25
|
Home: undefined;
|
|
@@ -52,15 +55,15 @@ const ComponentItem = ({
|
|
|
52
55
|
}) => {
|
|
53
56
|
const hdTheme = useTheme();
|
|
54
57
|
return (
|
|
55
|
-
<Text
|
|
58
|
+
<Typography.Text
|
|
59
|
+
fontSize="large"
|
|
56
60
|
onPress={onPress}
|
|
57
61
|
style={{
|
|
58
|
-
marginTop: hdTheme.space.
|
|
59
|
-
fontSize: hdTheme.fontSizes.large,
|
|
62
|
+
marginTop: hdTheme.space.medium,
|
|
60
63
|
}}
|
|
61
64
|
>
|
|
62
65
|
{name}
|
|
63
|
-
</Text>
|
|
66
|
+
</Typography.Text>
|
|
64
67
|
);
|
|
65
68
|
};
|
|
66
69
|
|
|
@@ -93,7 +96,11 @@ const App = () => {
|
|
|
93
96
|
|
|
94
97
|
const [fontsLoaded] = useFonts({
|
|
95
98
|
'hero-icons': heroIconFontPath,
|
|
99
|
+
'Be Vietnam Pro Light': beVietnamProLightFont,
|
|
100
|
+
'Be Vietnam Pro Regular': beVietnamProRegularFont,
|
|
101
|
+
'Be Vietnam Pro SemiBold': beVietnamProSemiBoldFont,
|
|
96
102
|
});
|
|
103
|
+
|
|
97
104
|
if (!fontsLoaded) {
|
|
98
105
|
return null;
|
|
99
106
|
}
|
|
@@ -23,7 +23,7 @@ const StyledView = styled(View)<{ themeIntent: ThemeIntent }>`
|
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
25
|
const StyledText = styled(Text)<{ themeIntent: ThemeIntent }>`
|
|
26
|
-
font-
|
|
26
|
+
font-family: ${({ theme }) => theme.__hd__.badge.fonts.default};
|
|
27
27
|
font-size: ${({ theme }) => theme.__hd__.badge.fontSizes.default};
|
|
28
28
|
|
|
29
29
|
${({ themeIntent }) => css`
|
|
@@ -29,8 +29,8 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
29
29
|
style={
|
|
30
30
|
Object {
|
|
31
31
|
"color": "#de350b",
|
|
32
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
32
33
|
"fontSize": 12,
|
|
33
|
-
"fontWeight": "600",
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
themeIntent="danger"
|
|
@@ -69,8 +69,8 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
69
69
|
style={
|
|
70
70
|
Object {
|
|
71
71
|
"color": "#4568fb",
|
|
72
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
72
73
|
"fontSize": 12,
|
|
73
|
-
"fontWeight": "600",
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
themeIntent="info"
|
|
@@ -109,8 +109,8 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
109
109
|
style={
|
|
110
110
|
Object {
|
|
111
111
|
"color": "#017d6d",
|
|
112
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
112
113
|
"fontSize": 12,
|
|
113
|
-
"fontWeight": "600",
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
themeIntent="success"
|
|
@@ -149,8 +149,8 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
149
149
|
style={
|
|
150
150
|
Object {
|
|
151
151
|
"color": "#d98a2c",
|
|
152
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
152
153
|
"fontSize": 12,
|
|
153
|
-
"fontWeight": "600",
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
themeIntent="warning"
|
package/src/components/BottomNavigation/__tests__/__snapshots__/BottomNavigation.spec.tsx.snap
CHANGED
|
@@ -129,8 +129,8 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
129
129
|
Array [
|
|
130
130
|
Object {
|
|
131
131
|
"color": "#7622d7",
|
|
132
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
132
133
|
"fontSize": 12,
|
|
133
|
-
"fontWeight": "600",
|
|
134
134
|
"letterSpacing": 0.36,
|
|
135
135
|
"lineHeight": 20,
|
|
136
136
|
},
|
|
@@ -183,8 +183,8 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
183
183
|
Array [
|
|
184
184
|
Object {
|
|
185
185
|
"color": "#292a2b",
|
|
186
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
186
187
|
"fontSize": 12,
|
|
187
|
-
"fontWeight": "600",
|
|
188
188
|
"letterSpacing": 0.36,
|
|
189
189
|
"lineHeight": 20,
|
|
190
190
|
},
|
|
@@ -237,8 +237,8 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
237
237
|
Array [
|
|
238
238
|
Object {
|
|
239
239
|
"color": "#292a2b",
|
|
240
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
240
241
|
"fontSize": 12,
|
|
241
|
-
"fontWeight": "600",
|
|
242
242
|
"letterSpacing": 0.36,
|
|
243
243
|
"lineHeight": 20,
|
|
244
244
|
},
|
|
@@ -291,8 +291,8 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
291
291
|
Array [
|
|
292
292
|
Object {
|
|
293
293
|
"color": "#292a2b",
|
|
294
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
294
295
|
"fontSize": 12,
|
|
295
|
-
"fontWeight": "600",
|
|
296
296
|
"letterSpacing": 0.36,
|
|
297
297
|
"lineHeight": 20,
|
|
298
298
|
},
|
|
@@ -43,7 +43,7 @@ const StyledBackdrop = styled(Animated.View)<
|
|
|
43
43
|
const StyledHeaderText = styled(Typography.Text)<TextProps>`
|
|
44
44
|
font-size: ${({ theme }) => theme.__hd__.fab.fontSizes.header};
|
|
45
45
|
line-height: ${({ theme }) => theme.__hd__.fab.lineHeights.header};
|
|
46
|
-
font-
|
|
46
|
+
font-family: ${({ theme }) => theme.__hd__.fab.fonts.header};
|
|
47
47
|
margin-right: ${({ theme }) => theme.__hd__.fab.space.headerTextMarginRight};
|
|
48
48
|
margin-bottom: ${({ theme }) =>
|
|
49
49
|
theme.__hd__.fab.space.headerTextMarginBottom};
|
|
@@ -24,6 +24,6 @@ const StyledActionItemText = styled(Typography.Text)<TouchableOpacityProps>`
|
|
|
24
24
|
theme.__hd__.fab.space.actionItemTextPaddingLeft};
|
|
25
25
|
font-size: ${({ theme }) => theme.__hd__.fab.fontSizes.actionItemText};
|
|
26
26
|
line-height: ${({ theme }) => theme.__hd__.fab.lineHeights.actionItemText};
|
|
27
|
-
font-
|
|
27
|
+
font-family: ${({ theme }) => theme.__hd__.fab.fonts.actionItemText};
|
|
28
28
|
`;
|
|
29
29
|
export { StyledActionItem, StyledActionItemText };
|
|
@@ -54,14 +54,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
54
54
|
Array [
|
|
55
55
|
Object {
|
|
56
56
|
"color": "#292a2b",
|
|
57
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
57
58
|
"fontSize": 14,
|
|
58
|
-
"fontWeight": "400",
|
|
59
59
|
"letterSpacing": 0.42,
|
|
60
60
|
"lineHeight": 22,
|
|
61
61
|
},
|
|
62
62
|
Object {
|
|
63
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
63
64
|
"fontSize": 24,
|
|
64
|
-
"fontWeight": "600",
|
|
65
65
|
"lineHeight": 32,
|
|
66
66
|
"marginBottom": 24,
|
|
67
67
|
"marginRight": 24,
|
|
@@ -129,14 +129,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
129
129
|
Array [
|
|
130
130
|
Object {
|
|
131
131
|
"color": "#292a2b",
|
|
132
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
132
133
|
"fontSize": 14,
|
|
133
|
-
"fontWeight": "400",
|
|
134
134
|
"letterSpacing": 0.42,
|
|
135
135
|
"lineHeight": 22,
|
|
136
136
|
},
|
|
137
137
|
Object {
|
|
138
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
138
139
|
"fontSize": 14,
|
|
139
|
-
"fontWeight": "400",
|
|
140
140
|
"lineHeight": 22,
|
|
141
141
|
"paddingLeft": 8,
|
|
142
142
|
},
|
|
@@ -201,14 +201,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
201
201
|
Array [
|
|
202
202
|
Object {
|
|
203
203
|
"color": "#292a2b",
|
|
204
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
204
205
|
"fontSize": 14,
|
|
205
|
-
"fontWeight": "400",
|
|
206
206
|
"letterSpacing": 0.42,
|
|
207
207
|
"lineHeight": 22,
|
|
208
208
|
},
|
|
209
209
|
Object {
|
|
210
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
210
211
|
"fontSize": 14,
|
|
211
|
-
"fontWeight": "400",
|
|
212
212
|
"lineHeight": 22,
|
|
213
213
|
"paddingLeft": 8,
|
|
214
214
|
},
|
|
@@ -273,14 +273,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
273
273
|
Array [
|
|
274
274
|
Object {
|
|
275
275
|
"color": "#292a2b",
|
|
276
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
276
277
|
"fontSize": 14,
|
|
277
|
-
"fontWeight": "400",
|
|
278
278
|
"letterSpacing": 0.42,
|
|
279
279
|
"lineHeight": 22,
|
|
280
280
|
},
|
|
281
281
|
Object {
|
|
282
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
282
283
|
"fontSize": 14,
|
|
283
|
-
"fontWeight": "400",
|
|
284
284
|
"lineHeight": 22,
|
|
285
285
|
"paddingLeft": 8,
|
|
286
286
|
},
|
|
@@ -345,14 +345,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
345
345
|
Array [
|
|
346
346
|
Object {
|
|
347
347
|
"color": "#292a2b",
|
|
348
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
348
349
|
"fontSize": 14,
|
|
349
|
-
"fontWeight": "400",
|
|
350
350
|
"letterSpacing": 0.42,
|
|
351
351
|
"lineHeight": 22,
|
|
352
352
|
},
|
|
353
353
|
Object {
|
|
354
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
354
355
|
"fontSize": 14,
|
|
355
|
-
"fontWeight": "400",
|
|
356
356
|
"lineHeight": 22,
|
|
357
357
|
"paddingLeft": 8,
|
|
358
358
|
},
|
|
@@ -417,14 +417,14 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
417
417
|
Array [
|
|
418
418
|
Object {
|
|
419
419
|
"color": "#292a2b",
|
|
420
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
420
421
|
"fontSize": 14,
|
|
421
|
-
"fontWeight": "400",
|
|
422
422
|
"letterSpacing": 0.42,
|
|
423
423
|
"lineHeight": 22,
|
|
424
424
|
},
|
|
425
425
|
Object {
|
|
426
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
426
427
|
"fontSize": 14,
|
|
427
|
-
"fontWeight": "400",
|
|
428
428
|
"lineHeight": 22,
|
|
429
429
|
"paddingLeft": 8,
|
|
430
430
|
},
|
|
@@ -563,14 +563,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
563
563
|
Array [
|
|
564
564
|
Object {
|
|
565
565
|
"color": "#292a2b",
|
|
566
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
566
567
|
"fontSize": 14,
|
|
567
|
-
"fontWeight": "400",
|
|
568
568
|
"letterSpacing": 0.42,
|
|
569
569
|
"lineHeight": 22,
|
|
570
570
|
},
|
|
571
571
|
Object {
|
|
572
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
572
573
|
"fontSize": 24,
|
|
573
|
-
"fontWeight": "600",
|
|
574
574
|
"lineHeight": 32,
|
|
575
575
|
"marginBottom": 24,
|
|
576
576
|
"marginRight": 24,
|
|
@@ -638,14 +638,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
638
638
|
Array [
|
|
639
639
|
Object {
|
|
640
640
|
"color": "#292a2b",
|
|
641
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
641
642
|
"fontSize": 14,
|
|
642
|
-
"fontWeight": "400",
|
|
643
643
|
"letterSpacing": 0.42,
|
|
644
644
|
"lineHeight": 22,
|
|
645
645
|
},
|
|
646
646
|
Object {
|
|
647
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
647
648
|
"fontSize": 14,
|
|
648
|
-
"fontWeight": "400",
|
|
649
649
|
"lineHeight": 22,
|
|
650
650
|
"paddingLeft": 8,
|
|
651
651
|
},
|
|
@@ -710,14 +710,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
710
710
|
Array [
|
|
711
711
|
Object {
|
|
712
712
|
"color": "#292a2b",
|
|
713
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
713
714
|
"fontSize": 14,
|
|
714
|
-
"fontWeight": "400",
|
|
715
715
|
"letterSpacing": 0.42,
|
|
716
716
|
"lineHeight": 22,
|
|
717
717
|
},
|
|
718
718
|
Object {
|
|
719
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
719
720
|
"fontSize": 14,
|
|
720
|
-
"fontWeight": "400",
|
|
721
721
|
"lineHeight": 22,
|
|
722
722
|
"paddingLeft": 8,
|
|
723
723
|
},
|
|
@@ -782,14 +782,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
782
782
|
Array [
|
|
783
783
|
Object {
|
|
784
784
|
"color": "#292a2b",
|
|
785
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
785
786
|
"fontSize": 14,
|
|
786
|
-
"fontWeight": "400",
|
|
787
787
|
"letterSpacing": 0.42,
|
|
788
788
|
"lineHeight": 22,
|
|
789
789
|
},
|
|
790
790
|
Object {
|
|
791
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
791
792
|
"fontSize": 14,
|
|
792
|
-
"fontWeight": "400",
|
|
793
793
|
"lineHeight": 22,
|
|
794
794
|
"paddingLeft": 8,
|
|
795
795
|
},
|
|
@@ -854,14 +854,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
854
854
|
Array [
|
|
855
855
|
Object {
|
|
856
856
|
"color": "#292a2b",
|
|
857
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
857
858
|
"fontSize": 14,
|
|
858
|
-
"fontWeight": "400",
|
|
859
859
|
"letterSpacing": 0.42,
|
|
860
860
|
"lineHeight": 22,
|
|
861
861
|
},
|
|
862
862
|
Object {
|
|
863
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
863
864
|
"fontSize": 14,
|
|
864
|
-
"fontWeight": "400",
|
|
865
865
|
"lineHeight": 22,
|
|
866
866
|
"paddingLeft": 8,
|
|
867
867
|
},
|
|
@@ -926,14 +926,14 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
926
926
|
Array [
|
|
927
927
|
Object {
|
|
928
928
|
"color": "#292a2b",
|
|
929
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
929
930
|
"fontSize": 14,
|
|
930
|
-
"fontWeight": "400",
|
|
931
931
|
"letterSpacing": 0.42,
|
|
932
932
|
"lineHeight": 22,
|
|
933
933
|
},
|
|
934
934
|
Object {
|
|
935
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
935
936
|
"fontSize": 14,
|
|
936
|
-
"fontWeight": "400",
|
|
937
937
|
"lineHeight": 22,
|
|
938
938
|
"paddingLeft": 8,
|
|
939
939
|
},
|
|
@@ -39,15 +39,15 @@ const StyledText = styled(Text)<{
|
|
|
39
39
|
switch (themeFontWeight) {
|
|
40
40
|
case 'light':
|
|
41
41
|
return css`
|
|
42
|
-
font-
|
|
42
|
+
font-family: ${theme.__hd__.typography.fonts.light};
|
|
43
43
|
`;
|
|
44
44
|
case 'regular':
|
|
45
45
|
return css`
|
|
46
|
-
font-
|
|
46
|
+
font-family: ${theme.__hd__.typography.fonts.regular};
|
|
47
47
|
`;
|
|
48
48
|
case 'semi-bold':
|
|
49
49
|
return css`
|
|
50
|
-
font-
|
|
50
|
+
font-family: ${theme.__hd__.typography.fonts.semiBold};
|
|
51
51
|
`;
|
|
52
52
|
}
|
|
53
53
|
}}
|
|
@@ -5,8 +5,8 @@ exports[`StyledText has body intent style 1`] = `
|
|
|
5
5
|
style={
|
|
6
6
|
Object {
|
|
7
7
|
"color": "#292a2b",
|
|
8
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
8
9
|
"fontSize": 14,
|
|
9
|
-
"fontWeight": "400",
|
|
10
10
|
"letterSpacing": 0.42,
|
|
11
11
|
"lineHeight": 22,
|
|
12
12
|
}
|
|
@@ -24,8 +24,8 @@ exports[`StyledText has large fontSize style 1`] = `
|
|
|
24
24
|
style={
|
|
25
25
|
Object {
|
|
26
26
|
"color": "#292a2b",
|
|
27
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
27
28
|
"fontSize": 16,
|
|
28
|
-
"fontWeight": "400",
|
|
29
29
|
"letterSpacing": 0.48,
|
|
30
30
|
"lineHeight": 24,
|
|
31
31
|
}
|
|
@@ -43,8 +43,8 @@ exports[`StyledText has light fontWeight style 1`] = `
|
|
|
43
43
|
style={
|
|
44
44
|
Object {
|
|
45
45
|
"color": "#292a2b",
|
|
46
|
+
"fontFamily": "Be Vietnam Pro Light",
|
|
46
47
|
"fontSize": 14,
|
|
47
|
-
"fontWeight": "200",
|
|
48
48
|
"letterSpacing": 0.42,
|
|
49
49
|
"lineHeight": 22,
|
|
50
50
|
}
|
|
@@ -62,8 +62,8 @@ exports[`StyledText has medium fontSize style 1`] = `
|
|
|
62
62
|
style={
|
|
63
63
|
Object {
|
|
64
64
|
"color": "#292a2b",
|
|
65
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
65
66
|
"fontSize": 14,
|
|
66
|
-
"fontWeight": "400",
|
|
67
67
|
"letterSpacing": 0.42,
|
|
68
68
|
"lineHeight": 22,
|
|
69
69
|
}
|
|
@@ -81,8 +81,8 @@ exports[`StyledText has regular fontWeight style 1`] = `
|
|
|
81
81
|
style={
|
|
82
82
|
Object {
|
|
83
83
|
"color": "#292a2b",
|
|
84
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
84
85
|
"fontSize": 14,
|
|
85
|
-
"fontWeight": "400",
|
|
86
86
|
"letterSpacing": 0.42,
|
|
87
87
|
"lineHeight": 22,
|
|
88
88
|
}
|
|
@@ -100,8 +100,8 @@ exports[`StyledText has semi-bold fontWeight style 1`] = `
|
|
|
100
100
|
style={
|
|
101
101
|
Object {
|
|
102
102
|
"color": "#292a2b",
|
|
103
|
+
"fontFamily": "Be Vietnam Pro SemiBold",
|
|
103
104
|
"fontSize": 14,
|
|
104
|
-
"fontWeight": "600",
|
|
105
105
|
"letterSpacing": 0.42,
|
|
106
106
|
"lineHeight": 22,
|
|
107
107
|
}
|
|
@@ -119,8 +119,8 @@ exports[`StyledText has small fontSize style 1`] = `
|
|
|
119
119
|
style={
|
|
120
120
|
Object {
|
|
121
121
|
"color": "#292a2b",
|
|
122
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
122
123
|
"fontSize": 12,
|
|
123
|
-
"fontWeight": "400",
|
|
124
124
|
"letterSpacing": 0.36,
|
|
125
125
|
"lineHeight": 20,
|
|
126
126
|
}
|
|
@@ -138,8 +138,8 @@ exports[`StyledText has subdued intent style 1`] = `
|
|
|
138
138
|
style={
|
|
139
139
|
Object {
|
|
140
140
|
"color": "#8b8d92",
|
|
141
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
141
142
|
"fontSize": 14,
|
|
142
|
-
"fontWeight": "400",
|
|
143
143
|
"letterSpacing": 0.42,
|
|
144
144
|
"lineHeight": 22,
|
|
145
145
|
}
|
|
@@ -157,8 +157,8 @@ exports[`StyledText has xlarge fontSize style 1`] = `
|
|
|
157
157
|
style={
|
|
158
158
|
Object {
|
|
159
159
|
"color": "#292a2b",
|
|
160
|
+
"fontFamily": "Be Vietnam Pro Regular",
|
|
160
161
|
"fontSize": 18,
|
|
161
|
-
"fontWeight": "400",
|
|
162
162
|
"letterSpacing": 0.54,
|
|
163
163
|
"lineHeight": 26,
|
|
164
164
|
}
|
|
@@ -20,8 +20,8 @@ Object {
|
|
|
20
20
|
"fontSizes": Object {
|
|
21
21
|
"default": "12px",
|
|
22
22
|
},
|
|
23
|
-
"
|
|
24
|
-
"default":
|
|
23
|
+
"fonts": Object {
|
|
24
|
+
"default": "Be Vietnam Pro SemiBold",
|
|
25
25
|
},
|
|
26
26
|
"padding": Object {
|
|
27
27
|
"default": "4px 8px",
|
|
@@ -81,9 +81,9 @@ Object {
|
|
|
81
81
|
"buttonIcon": "24px",
|
|
82
82
|
"header": "24px",
|
|
83
83
|
},
|
|
84
|
-
"
|
|
85
|
-
"actionItemText": "
|
|
86
|
-
"header": "
|
|
84
|
+
"fonts": Object {
|
|
85
|
+
"actionItemText": "Be Vietnam Pro Regular",
|
|
86
|
+
"header": "Be Vietnam Pro SemiBold",
|
|
87
87
|
},
|
|
88
88
|
"lineHeights": Object {
|
|
89
89
|
"actionItemText": "22px",
|
|
@@ -137,10 +137,10 @@ Object {
|
|
|
137
137
|
"small": 12,
|
|
138
138
|
"xlarge": 18,
|
|
139
139
|
},
|
|
140
|
-
"
|
|
141
|
-
"light":
|
|
142
|
-
"regular":
|
|
143
|
-
"semiBold":
|
|
140
|
+
"fonts": Object {
|
|
141
|
+
"light": "Be Vietnam Pro Light",
|
|
142
|
+
"regular": "Be Vietnam Pro Regular",
|
|
143
|
+
"semiBold": "Be Vietnam Pro SemiBold",
|
|
144
144
|
},
|
|
145
145
|
"lineHeights": Object {
|
|
146
146
|
"large": "24px",
|
|
@@ -188,11 +188,10 @@ Object {
|
|
|
188
188
|
"xxxxlarge": 28,
|
|
189
189
|
"xxxxxlarge": 32,
|
|
190
190
|
},
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"semiBold": 600,
|
|
191
|
+
"fonts": Object {
|
|
192
|
+
"light": "Be Vietnam Pro Light",
|
|
193
|
+
"regular": "Be Vietnam Pro Regular",
|
|
194
|
+
"semiBold": "Be Vietnam Pro SemiBold",
|
|
196
195
|
},
|
|
197
196
|
"lineHeights": Object {
|
|
198
197
|
"large": 24,
|
|
@@ -20,19 +20,19 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
20
20
|
default: `${theme.space.xsmall}px ${theme.space.small}px`,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
default:
|
|
23
|
+
const fonts = {
|
|
24
|
+
default: theme.fonts.semiBold,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
default: theme.
|
|
27
|
+
const fontSizes = {
|
|
28
|
+
default: `${theme.fontSizes.small}px`,
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const radii = {
|
|
32
32
|
default: `4px`,
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
return { borderWidths, colors, padding,
|
|
35
|
+
return { borderWidths, colors, padding, fonts, fontSizes, radii };
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export default getBadgeTheme;
|
|
@@ -14,17 +14,17 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
14
14
|
height: '64px',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
const fonts = {
|
|
18
|
+
header: theme.fonts.semiBold,
|
|
19
|
+
actionItemText: theme.fonts.regular,
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
const fontSizes = {
|
|
18
23
|
header: `${theme.fontSizes.xxxlarge}px`,
|
|
19
24
|
buttonIcon: `${theme.fontSizes.xxxlarge}px`,
|
|
20
25
|
actionItemText: `${theme.fontSizes.medium}px`,
|
|
21
26
|
};
|
|
22
27
|
|
|
23
|
-
const fontWeights = {
|
|
24
|
-
header: `${theme.fontWeights.semiBold}`,
|
|
25
|
-
actionItemText: `${theme.fontWeights.regular}`,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
28
|
const lineHeights = {
|
|
29
29
|
header: `${theme.lineHeights.xxxlarge}px`,
|
|
30
30
|
actionItemText: `${theme.lineHeights.medium}px`,
|
|
@@ -46,7 +46,7 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
46
46
|
actionItem: `999px`,
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
return { radii, fontSizes, colors, sizes, lineHeights,
|
|
49
|
+
return { radii, fonts, fontSizes, colors, sizes, lineHeights, space };
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export default getFABTheme;
|
|
@@ -7,6 +7,12 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
+
const fonts = {
|
|
11
|
+
light: theme.fonts.light,
|
|
12
|
+
regular: theme.fonts.regular,
|
|
13
|
+
semiBold: theme.fonts.semiBold,
|
|
14
|
+
};
|
|
15
|
+
|
|
10
16
|
const fontSizes = {
|
|
11
17
|
small: theme.fontSizes.small,
|
|
12
18
|
medium: theme.fontSizes.medium,
|
|
@@ -14,12 +20,6 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
14
20
|
xlarge: theme.fontSizes.xlarge,
|
|
15
21
|
};
|
|
16
22
|
|
|
17
|
-
const fontWeights = {
|
|
18
|
-
light: theme.fontWeights.light,
|
|
19
|
-
regular: theme.fontWeights.regular,
|
|
20
|
-
semiBold: theme.fontWeights.semiBold,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
23
|
const lineHeights = {
|
|
24
24
|
small: `${theme.lineHeights.small}px`,
|
|
25
25
|
medium: `${theme.lineHeights.medium}px`,
|
|
@@ -27,7 +27,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
27
27
|
xlarge: `${theme.lineHeights.xlarge}px`,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
return { colors,
|
|
30
|
+
return { colors, fonts, fontSizes, lineHeights };
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export default getTypographyTheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { systemPalette } from './colors';
|
|
2
2
|
import { space } from './space';
|
|
3
|
-
import {
|
|
3
|
+
import { fonts, fontSizes, lineHeights } from './typography';
|
|
4
4
|
import { borderWidths } from './borders';
|
|
5
5
|
|
|
6
6
|
const globalTheme = {
|
|
@@ -8,8 +8,8 @@ const globalTheme = {
|
|
|
8
8
|
...systemPalette,
|
|
9
9
|
},
|
|
10
10
|
space,
|
|
11
|
+
fonts,
|
|
11
12
|
fontSizes,
|
|
12
|
-
fontWeights,
|
|
13
13
|
lineHeights,
|
|
14
14
|
borderWidths,
|
|
15
15
|
};
|
|
@@ -2,6 +2,12 @@ import { scale } from '../../utils/scale';
|
|
|
2
2
|
|
|
3
3
|
const BASE = 16;
|
|
4
4
|
|
|
5
|
+
const fonts = {
|
|
6
|
+
light: 'Be Vietnam Pro Light',
|
|
7
|
+
regular: 'Be Vietnam Pro Regular',
|
|
8
|
+
semiBold: 'Be Vietnam Pro SemiBold',
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
const fontSizes = {
|
|
6
12
|
xxxxxlarge: scale(BASE * 2), // 32
|
|
7
13
|
xxxxlarge: scale(BASE * 1.75), // 28
|
|
@@ -14,13 +20,6 @@ const fontSizes = {
|
|
|
14
20
|
xsmall: scale(BASE * 0.625), // 10
|
|
15
21
|
};
|
|
16
22
|
|
|
17
|
-
const fontWeights = {
|
|
18
|
-
light: 200,
|
|
19
|
-
regular: 400,
|
|
20
|
-
semiBold: 600,
|
|
21
|
-
bold: 700,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
23
|
const lineHeights = {
|
|
25
24
|
xxxxxlarge: fontSizes.xxxxxlarge + 8,
|
|
26
25
|
xxxxlarge: fontSizes.xxxxlarge + 8,
|
|
@@ -33,4 +32,4 @@ const lineHeights = {
|
|
|
33
32
|
xsmall: fontSizes.xsmall + 8,
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
export {
|
|
35
|
+
export { fonts, fontSizes, lineHeights };
|