@hero-design/rn 7.1.3-alpha5 → 7.1.3-alpha8
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/.eslintrc.json +0 -6
- package/.expo/packager-info.json +1 -1
- package/babel.config.js +0 -14
- package/es/index.js +2787 -8941
- package/jest-setup.ts +0 -1
- package/jest.config.js +2 -4
- package/lib/index.js +2822 -8956
- package/package.json +5 -7
- package/playground/components/BottomNavigation.tsx +14 -11
- package/playground/components/Button.tsx +67 -0
- package/playground/components/Card.tsx +141 -107
- package/playground/components/Tabs.tsx +44 -0
- package/playground/index.tsx +13 -7
- package/src/components/Badge/StyledBadge.tsx +19 -21
- package/src/components/Badge/__tests__/Badge.spec.tsx +9 -18
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +76 -96
- package/src/components/Badge/index.tsx +1 -1
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +44 -42
- package/src/components/BottomNavigation/__tests__/__snapshots__/{BottomNavigation.spec.tsx.snap → index.spec.tsx.snap} +130 -96
- package/src/components/BottomNavigation/__tests__/{BottomNavigation.spec.tsx → index.spec.tsx} +4 -4
- package/src/components/BottomNavigation/index.tsx +28 -32
- package/src/components/Button/IconButton.tsx +62 -0
- package/src/components/Button/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
- package/src/components/Button/__tests__/index.spec.tsx +23 -0
- package/src/components/Button/index.tsx +5 -0
- package/src/components/Card/StyledCard.tsx +6 -6
- package/src/components/Card/__tests__/StyledCard.spec.tsx +2 -7
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +8 -11
- package/src/components/Card/__tests__/__snapshots__/{Card.spec.tsx.snap → index.spec.tsx.snap} +2 -8
- package/src/components/Card/__tests__/index.spec.tsx +35 -0
- package/src/components/Divider/StyledDivider.tsx +18 -60
- package/src/components/Divider/__tests__/StyledDivider.spec.tsx +5 -10
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +106 -70
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/FAB/ActionGroup/ActionItem.tsx +2 -4
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +36 -37
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +26 -24
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +271 -245
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +29 -33
- package/src/components/FAB/ActionGroup/index.tsx +1 -5
- package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
- package/src/components/FAB/FAB.tsx +5 -9
- package/src/components/FAB/StyledFAB.tsx +22 -0
- package/src/components/FAB/__tests__/AnimatedFABIcon.spec.tsx +3 -6
- package/src/components/FAB/__tests__/StyledFAB.spec.tsx +24 -0
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +14 -10
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +72 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +16 -17
- package/src/components/FAB/__tests__/index.spec.tsx +21 -26
- package/src/components/Icon/HeroIcon/index.tsx +5 -7
- package/src/components/Icon/__tests__/__snapshots__/{Icon.spec.tsx.snap → index.spec.tsx.snap} +21 -12
- package/src/components/Icon/__tests__/index.spec.tsx +25 -0
- package/src/components/Icon/index.tsx +1 -1
- package/src/components/Tabs/StyledTabs.tsx +70 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +321 -0
- package/src/components/Tabs/__tests__/index.spec.tsx +79 -0
- package/src/components/Tabs/index.tsx +185 -0
- package/src/components/Typography/Text/StyledText.tsx +19 -64
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +90 -63
- package/src/emotion.d.ts +6 -0
- package/src/index.ts +9 -3
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +70 -48
- package/src/theme/components/badge.ts +10 -9
- package/src/theme/components/bottomNavigation.ts +7 -3
- package/src/theme/components/card.ts +2 -2
- package/src/theme/components/divider.ts +6 -6
- package/src/theme/components/fab.ts +19 -17
- package/src/theme/components/tabs.ts +20 -0
- package/src/theme/components/typography.ts +4 -4
- package/src/theme/global/borders.ts +8 -2
- package/src/theme/global/colors.ts +3 -1
- package/src/theme/global/index.ts +31 -17
- package/src/theme/global/scale.ts +18 -0
- package/src/theme/global/space.ts +23 -13
- package/src/theme/global/typography.ts +71 -27
- package/src/theme/index.ts +29 -13
- package/src/types.ts +7 -0
- package/src/utils/__tests__/scale.spec.ts +3 -3
- package/testUtils/setup.ts +11 -0
- package/tsconfig.json +1 -5
- package/types/playground/components/BottomNavigation.d.ts +2 -2
- package/types/playground/components/Button.d.ts +2 -0
- package/types/playground/components/Tabs.d.ts +2 -0
- package/types/src/components/Badge/StyledBadge.d.ts +16 -5
- package/types/src/components/Badge/index.d.ts +1 -1
- package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +44 -9
- package/types/src/components/{Typography/Text/__test__ → BottomNavigation/__tests__}/index.spec.d.ts +0 -0
- package/types/src/components/BottomNavigation/index.d.ts +19 -14
- package/types/src/components/Button/IconButton.d.ts +34 -0
- package/types/{theme → src/components/Button}/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Button/index.d.ts +4 -0
- package/types/src/components/Card/StyledCard.d.ts +7 -1
- package/types/{components/Card/__tests__/Card.spec.d.ts → src/components/Card/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Divider/StyledDivider.d.ts +8 -2
- package/types/src/components/Divider/index.d.ts +1 -1
- package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +25 -7
- package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +11 -2
- package/types/src/components/FAB/ActionGroup/index.d.ts +1 -1
- package/types/src/components/FAB/FAB.d.ts +4 -4
- package/types/src/components/FAB/StyledFAB.d.ts +14 -0
- package/types/{components/Card/__tests__/StyledCard.spec.d.ts → src/components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
- package/types/src/components/Icon/HeroIcon/index.d.ts +8 -2
- package/types/{components/Divider/__tests__/StyledDivider.spec.d.ts → src/components/Icon/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Icon/index.d.ts +1 -1
- package/types/src/components/Icon/utils.d.ts +1 -1
- package/types/src/components/Tabs/StyledTabs.d.ts +55 -0
- package/types/{components/ExampleComponent/__tests__/StyledView.spec.d.ts → src/components/Tabs/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Tabs/index.d.ts +45 -0
- package/types/src/components/Typography/Text/StyledText.d.ts +8 -2
- package/types/src/index.d.ts +6 -3
- package/types/src/theme/components/badge.d.ts +8 -7
- package/types/src/theme/components/bottomNavigation.d.ts +8 -2
- package/types/src/theme/components/card.d.ts +2 -2
- package/types/src/theme/components/divider.d.ts +6 -6
- package/types/src/theme/components/fab.d.ts +19 -17
- package/types/src/theme/components/tabs.d.ts +15 -0
- package/types/src/theme/components/typography.d.ts +4 -4
- package/types/src/theme/global/borders.d.ts +4 -3
- package/types/src/theme/global/colors.d.ts +2 -2
- package/types/src/theme/global/index.d.ts +10 -45
- package/types/src/theme/global/scale.d.ts +8 -0
- package/types/src/theme/global/space.d.ts +8 -7
- package/types/src/theme/global/typography.d.ts +9 -16
- package/types/src/theme/index.d.ts +4 -2
- package/types/src/types.d.ts +5 -0
- package/lib/assets/fonts/be-vietnam-pro-light.ttf +0 -0
- package/lib/assets/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/lib/assets/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/src/components/Card/__tests__/Card.spec.tsx +0 -36
- package/src/components/FAB/StyledFABContainer.tsx +0 -14
- package/src/components/FAB/StyledFABIcon.tsx +0 -9
- package/src/components/FAB/__tests__/StyledFABContainer.spec.tsx +0 -18
- package/src/components/FAB/__tests__/StyledFABIcon.spec.tsx +0 -16
- package/src/components/FAB/__tests__/__snapshots__/StyledFABContainer.spec.tsx.snap +0 -46
- package/src/components/FAB/__tests__/__snapshots__/StyledFABIcon.spec.tsx.snap +0 -21
- package/src/components/Icon/__tests__/Icon.spec.tsx +0 -36
- package/src/styled-components.ts +0 -14
- package/src/styled.d.ts +0 -7
- package/types/components/Card/StyledCard.d.ts +0 -3
- package/types/components/Card/index.d.ts +0 -5
- package/types/components/Divider/StyledDivider.d.ts +0 -7
- package/types/components/Divider/index.d.ts +0 -12
- package/types/components/ExampleComponent/StyledView.d.ts +0 -7
- package/types/components/ExampleComponent/index.d.ts +0 -16
- package/types/index.d.ts +0 -5
- package/types/src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts +0 -1
- package/types/src/components/Card/__tests__/Card.spec.d.ts +0 -1
- package/types/src/components/FAB/StyledFABContainer.d.ts +0 -3
- package/types/src/components/FAB/StyledFABIcon.d.ts +0 -3
- package/types/src/components/FAB/__tests__/StyledFABContainer.spec.d.ts +0 -1
- package/types/src/components/FAB/__tests__/StyledFABIcon.spec.d.ts +0 -1
- package/types/src/components/Icon/__tests__/Icon.spec.d.ts +0 -1
- package/types/src/components/Typography/Text/__test__/StyledText.spec.d.ts +0 -1
- package/types/src/styled-components.d.ts +0 -6
- package/types/styled-components.d.ts +0 -6
- package/types/theme/components/card.d.ts +0 -10
- package/types/theme/components/divider.d.ts +0 -17
- package/types/theme/components/exampleComponent.d.ts +0 -14
- package/types/theme/global/borders.d.ts +0 -4
- package/types/theme/global/colors.d.ts +0 -26
- package/types/theme/global/index.d.ts +0 -63
- package/types/theme/global/space.d.ts +0 -12
- package/types/theme/global/typography.d.ts +0 -21
- package/types/theme/index.d.ts +0 -13
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
exports[`StyledText has body intent style 1`] = `
|
|
4
4
|
<Text
|
|
5
5
|
style={
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"color": "#292a2b",
|
|
9
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
10
|
+
"fontSize": 14,
|
|
11
|
+
"letterSpacing": 0.42,
|
|
12
|
+
"lineHeight": 22,
|
|
13
|
+
},
|
|
14
|
+
undefined,
|
|
15
|
+
]
|
|
13
16
|
}
|
|
14
17
|
themeFontSize="medium"
|
|
15
18
|
themeFontWeight="regular"
|
|
@@ -22,13 +25,16 @@ exports[`StyledText has body intent style 1`] = `
|
|
|
22
25
|
exports[`StyledText has large fontSize style 1`] = `
|
|
23
26
|
<Text
|
|
24
27
|
style={
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
Array [
|
|
29
|
+
Object {
|
|
30
|
+
"color": "#292a2b",
|
|
31
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
32
|
+
"fontSize": 16,
|
|
33
|
+
"letterSpacing": 0.48,
|
|
34
|
+
"lineHeight": 24,
|
|
35
|
+
},
|
|
36
|
+
undefined,
|
|
37
|
+
]
|
|
32
38
|
}
|
|
33
39
|
themeFontSize="large"
|
|
34
40
|
themeFontWeight="regular"
|
|
@@ -41,13 +47,16 @@ exports[`StyledText has large fontSize style 1`] = `
|
|
|
41
47
|
exports[`StyledText has light fontWeight style 1`] = `
|
|
42
48
|
<Text
|
|
43
49
|
style={
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
Array [
|
|
51
|
+
Object {
|
|
52
|
+
"color": "#292a2b",
|
|
53
|
+
"fontFamily": "BeVietnamPro-Light",
|
|
54
|
+
"fontSize": 14,
|
|
55
|
+
"letterSpacing": 0.42,
|
|
56
|
+
"lineHeight": 22,
|
|
57
|
+
},
|
|
58
|
+
undefined,
|
|
59
|
+
]
|
|
51
60
|
}
|
|
52
61
|
themeFontSize="medium"
|
|
53
62
|
themeFontWeight="light"
|
|
@@ -60,13 +69,16 @@ exports[`StyledText has light fontWeight style 1`] = `
|
|
|
60
69
|
exports[`StyledText has medium fontSize style 1`] = `
|
|
61
70
|
<Text
|
|
62
71
|
style={
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
Array [
|
|
73
|
+
Object {
|
|
74
|
+
"color": "#292a2b",
|
|
75
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
76
|
+
"fontSize": 14,
|
|
77
|
+
"letterSpacing": 0.42,
|
|
78
|
+
"lineHeight": 22,
|
|
79
|
+
},
|
|
80
|
+
undefined,
|
|
81
|
+
]
|
|
70
82
|
}
|
|
71
83
|
themeFontSize="medium"
|
|
72
84
|
themeFontWeight="regular"
|
|
@@ -79,13 +91,16 @@ exports[`StyledText has medium fontSize style 1`] = `
|
|
|
79
91
|
exports[`StyledText has regular fontWeight style 1`] = `
|
|
80
92
|
<Text
|
|
81
93
|
style={
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
Array [
|
|
95
|
+
Object {
|
|
96
|
+
"color": "#292a2b",
|
|
97
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
98
|
+
"fontSize": 14,
|
|
99
|
+
"letterSpacing": 0.42,
|
|
100
|
+
"lineHeight": 22,
|
|
101
|
+
},
|
|
102
|
+
undefined,
|
|
103
|
+
]
|
|
89
104
|
}
|
|
90
105
|
themeFontSize="medium"
|
|
91
106
|
themeFontWeight="regular"
|
|
@@ -98,13 +113,16 @@ exports[`StyledText has regular fontWeight style 1`] = `
|
|
|
98
113
|
exports[`StyledText has semi-bold fontWeight style 1`] = `
|
|
99
114
|
<Text
|
|
100
115
|
style={
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
Array [
|
|
117
|
+
Object {
|
|
118
|
+
"color": "#292a2b",
|
|
119
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
120
|
+
"fontSize": 14,
|
|
121
|
+
"letterSpacing": 0.42,
|
|
122
|
+
"lineHeight": 22,
|
|
123
|
+
},
|
|
124
|
+
undefined,
|
|
125
|
+
]
|
|
108
126
|
}
|
|
109
127
|
themeFontSize="medium"
|
|
110
128
|
themeFontWeight="semi-bold"
|
|
@@ -117,13 +135,16 @@ exports[`StyledText has semi-bold fontWeight style 1`] = `
|
|
|
117
135
|
exports[`StyledText has small fontSize style 1`] = `
|
|
118
136
|
<Text
|
|
119
137
|
style={
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
Array [
|
|
139
|
+
Object {
|
|
140
|
+
"color": "#292a2b",
|
|
141
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
142
|
+
"fontSize": 12,
|
|
143
|
+
"letterSpacing": 0.36,
|
|
144
|
+
"lineHeight": 20,
|
|
145
|
+
},
|
|
146
|
+
undefined,
|
|
147
|
+
]
|
|
127
148
|
}
|
|
128
149
|
themeFontSize="small"
|
|
129
150
|
themeFontWeight="regular"
|
|
@@ -136,13 +157,16 @@ exports[`StyledText has small fontSize style 1`] = `
|
|
|
136
157
|
exports[`StyledText has subdued intent style 1`] = `
|
|
137
158
|
<Text
|
|
138
159
|
style={
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
160
|
+
Array [
|
|
161
|
+
Object {
|
|
162
|
+
"color": "#8b8d92",
|
|
163
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
164
|
+
"fontSize": 14,
|
|
165
|
+
"letterSpacing": 0.42,
|
|
166
|
+
"lineHeight": 22,
|
|
167
|
+
},
|
|
168
|
+
undefined,
|
|
169
|
+
]
|
|
146
170
|
}
|
|
147
171
|
themeFontSize="medium"
|
|
148
172
|
themeFontWeight="regular"
|
|
@@ -155,13 +179,16 @@ exports[`StyledText has subdued intent style 1`] = `
|
|
|
155
179
|
exports[`StyledText has xlarge fontSize style 1`] = `
|
|
156
180
|
<Text
|
|
157
181
|
style={
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
182
|
+
Array [
|
|
183
|
+
Object {
|
|
184
|
+
"color": "#292a2b",
|
|
185
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
186
|
+
"fontSize": 18,
|
|
187
|
+
"letterSpacing": 0.54,
|
|
188
|
+
"lineHeight": 26,
|
|
189
|
+
},
|
|
190
|
+
undefined,
|
|
191
|
+
]
|
|
165
192
|
}
|
|
166
193
|
themeFontSize="xlarge"
|
|
167
194
|
themeFontWeight="regular"
|
package/src/emotion.d.ts
ADDED
package/src/index.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { ThemeProvider, useTheme } from '
|
|
1
|
+
import { ThemeProvider, useTheme } from '@emotion/react';
|
|
2
2
|
import theme, { getTheme } from './theme';
|
|
3
3
|
import { scale } from './utils/scale';
|
|
4
4
|
|
|
5
5
|
import Badge from './components/Badge';
|
|
6
6
|
import BottomNavigation from './components/BottomNavigation';
|
|
7
|
+
import Button from './components/Button';
|
|
7
8
|
import Card from './components/Card';
|
|
8
9
|
import Divider from './components/Divider';
|
|
10
|
+
import FAB from './components/FAB';
|
|
9
11
|
import Icon from './components/Icon';
|
|
12
|
+
import Tabs from './components/Tabs';
|
|
10
13
|
import Typography from './components/Typography';
|
|
11
|
-
import FAB from './components/FAB';
|
|
12
14
|
|
|
13
15
|
export {
|
|
14
16
|
theme,
|
|
@@ -18,9 +20,13 @@ export {
|
|
|
18
20
|
ThemeProvider,
|
|
19
21
|
Badge,
|
|
20
22
|
BottomNavigation,
|
|
23
|
+
Button,
|
|
21
24
|
Card,
|
|
22
25
|
Divider,
|
|
26
|
+
FAB,
|
|
23
27
|
Icon,
|
|
28
|
+
Tabs,
|
|
24
29
|
Typography,
|
|
25
|
-
FAB,
|
|
26
30
|
};
|
|
31
|
+
|
|
32
|
+
export * from './types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, RenderOptions } from '@testing-library/react-native'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
|
-
import { ThemeProvider
|
|
3
|
+
import { ThemeProvider } from '@emotion/react';
|
|
4
|
+
import { theme } from '../index';
|
|
4
5
|
|
|
5
6
|
const renderWithTheme = (ui: JSX.Element, options?: RenderOptions) =>
|
|
6
7
|
render(<ThemeProvider theme={theme}>{ui}</ThemeProvider>, options);
|
|
@@ -5,7 +5,7 @@ Object {
|
|
|
5
5
|
"__hd__": Object {
|
|
6
6
|
"badge": Object {
|
|
7
7
|
"borderWidths": Object {
|
|
8
|
-
"default":
|
|
8
|
+
"default": 1,
|
|
9
9
|
},
|
|
10
10
|
"colors": Object {
|
|
11
11
|
"danger": "#de350b",
|
|
@@ -17,17 +17,18 @@ Object {
|
|
|
17
17
|
"warning": "#d98a2c",
|
|
18
18
|
"warningBackground": "#fff6eb",
|
|
19
19
|
},
|
|
20
|
-
"
|
|
21
|
-
"default": "
|
|
22
|
-
},
|
|
23
|
-
"fonts": Object {
|
|
24
|
-
"default": "Be Vietnam Pro SemiBold",
|
|
20
|
+
"font": Object {
|
|
21
|
+
"default": "BeVietnamPro-SemiBold",
|
|
25
22
|
},
|
|
26
|
-
"
|
|
27
|
-
"default":
|
|
23
|
+
"fontSize": Object {
|
|
24
|
+
"default": 12,
|
|
28
25
|
},
|
|
29
26
|
"radii": Object {
|
|
30
|
-
"default":
|
|
27
|
+
"default": 4,
|
|
28
|
+
},
|
|
29
|
+
"space": Object {
|
|
30
|
+
"horizontalPadding": 8,
|
|
31
|
+
"verticalPadding": 2,
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
"bottomNavigation": Object {
|
|
@@ -37,35 +38,41 @@ Object {
|
|
|
37
38
|
},
|
|
38
39
|
"shadows": Object {
|
|
39
40
|
"elevation": 10,
|
|
40
|
-
"offset":
|
|
41
|
+
"offset": Object {
|
|
42
|
+
"height": 3,
|
|
43
|
+
"width": 0,
|
|
44
|
+
},
|
|
41
45
|
"opacity": 0.27,
|
|
42
|
-
"radius":
|
|
46
|
+
"radius": 4.65,
|
|
43
47
|
},
|
|
44
48
|
"sizes": Object {
|
|
45
49
|
"height": 72,
|
|
46
50
|
},
|
|
51
|
+
"space": Object {
|
|
52
|
+
"titleMarginTop": 4,
|
|
53
|
+
},
|
|
47
54
|
},
|
|
48
55
|
"card": Object {
|
|
49
56
|
"padding": Object {
|
|
50
|
-
"default":
|
|
57
|
+
"default": 8,
|
|
51
58
|
},
|
|
52
59
|
"radii": Object {
|
|
53
|
-
"default":
|
|
60
|
+
"default": 12,
|
|
54
61
|
},
|
|
55
62
|
},
|
|
56
63
|
"divider": Object {
|
|
57
64
|
"borderWidths": Object {
|
|
58
|
-
"default":
|
|
65
|
+
"default": 1,
|
|
59
66
|
},
|
|
60
67
|
"colors": Object {
|
|
61
68
|
"default": "#dadbde",
|
|
62
69
|
},
|
|
63
70
|
"space": Object {
|
|
64
|
-
"large":
|
|
65
|
-
"medium":
|
|
66
|
-
"small":
|
|
67
|
-
"xlarge":
|
|
68
|
-
"xsmall":
|
|
71
|
+
"large": 24,
|
|
72
|
+
"medium": 16,
|
|
73
|
+
"small": 8,
|
|
74
|
+
"xlarge": 32,
|
|
75
|
+
"xsmall": 4,
|
|
69
76
|
},
|
|
70
77
|
},
|
|
71
78
|
"fab": Object {
|
|
@@ -77,35 +84,37 @@ Object {
|
|
|
77
84
|
"icon": "#ffffff",
|
|
78
85
|
},
|
|
79
86
|
"fontSizes": Object {
|
|
80
|
-
"actionItemText":
|
|
81
|
-
"buttonIcon":
|
|
82
|
-
"header":
|
|
87
|
+
"actionItemText": 14,
|
|
88
|
+
"buttonIcon": 24,
|
|
89
|
+
"header": 24,
|
|
83
90
|
},
|
|
84
91
|
"fonts": Object {
|
|
85
|
-
"actionItemText": "
|
|
86
|
-
"header": "
|
|
92
|
+
"actionItemText": "BeVietnamPro-Regular",
|
|
93
|
+
"header": "BeVietnamPro-SemiBold",
|
|
87
94
|
},
|
|
88
95
|
"lineHeights": Object {
|
|
89
|
-
"actionItemText":
|
|
90
|
-
"header":
|
|
96
|
+
"actionItemText": 22,
|
|
97
|
+
"header": 32,
|
|
91
98
|
},
|
|
92
99
|
"radii": Object {
|
|
93
|
-
"actionItem":
|
|
100
|
+
"actionItem": 999,
|
|
94
101
|
},
|
|
95
102
|
"sizes": Object {
|
|
96
|
-
"height":
|
|
97
|
-
"width":
|
|
103
|
+
"height": 64,
|
|
104
|
+
"width": 64,
|
|
98
105
|
},
|
|
99
106
|
"space": Object {
|
|
100
|
-
"actionItemMargin":
|
|
101
|
-
"actionItemMarginRight":
|
|
102
|
-
"actionItemPaddingBottom":
|
|
103
|
-
"actionItemPaddingLeft":
|
|
104
|
-
"actionItemPaddingRight":
|
|
105
|
-
"actionItemPaddingTop":
|
|
106
|
-
"actionItemTextPaddingLeft":
|
|
107
|
-
"
|
|
108
|
-
"
|
|
107
|
+
"actionItemMargin": 8,
|
|
108
|
+
"actionItemMarginRight": 24,
|
|
109
|
+
"actionItemPaddingBottom": 8,
|
|
110
|
+
"actionItemPaddingLeft": 16,
|
|
111
|
+
"actionItemPaddingRight": 16,
|
|
112
|
+
"actionItemPaddingTop": 8,
|
|
113
|
+
"actionItemTextPaddingLeft": 8,
|
|
114
|
+
"buttonMarginRight": 24,
|
|
115
|
+
"buttonMarginTop": 24,
|
|
116
|
+
"headerTextMarginBottom": 24,
|
|
117
|
+
"headerTextMarginRight": 24,
|
|
109
118
|
},
|
|
110
119
|
},
|
|
111
120
|
"icon": Object {
|
|
@@ -125,6 +134,19 @@ Object {
|
|
|
125
134
|
"xsmall": 16,
|
|
126
135
|
},
|
|
127
136
|
},
|
|
137
|
+
"tabs": Object {
|
|
138
|
+
"colors": Object {
|
|
139
|
+
"active": "#ffffff",
|
|
140
|
+
"background": "#7622d7",
|
|
141
|
+
"inactive": "#ffffff50",
|
|
142
|
+
},
|
|
143
|
+
"space": Object {
|
|
144
|
+
"flatListHorizontalPadding": 8,
|
|
145
|
+
"itemHorizontalPadding": 16,
|
|
146
|
+
"itemVerticalPadding": 24,
|
|
147
|
+
"titleMarginLeft": 8,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
128
150
|
"typography": Object {
|
|
129
151
|
"colors": Object {
|
|
130
152
|
"body": "#292a2b",
|
|
@@ -138,15 +160,15 @@ Object {
|
|
|
138
160
|
"xlarge": 18,
|
|
139
161
|
},
|
|
140
162
|
"fonts": Object {
|
|
141
|
-
"light": "
|
|
142
|
-
"regular": "
|
|
143
|
-
"semiBold": "
|
|
163
|
+
"light": "BeVietnamPro-Light",
|
|
164
|
+
"regular": "BeVietnamPro-Regular",
|
|
165
|
+
"semiBold": "BeVietnamPro-SemiBold",
|
|
144
166
|
},
|
|
145
167
|
"lineHeights": Object {
|
|
146
|
-
"large":
|
|
147
|
-
"medium":
|
|
148
|
-
"small":
|
|
149
|
-
"xlarge":
|
|
168
|
+
"large": 24,
|
|
169
|
+
"medium": 22,
|
|
170
|
+
"small": 20,
|
|
171
|
+
"xlarge": 26,
|
|
150
172
|
},
|
|
151
173
|
},
|
|
152
174
|
},
|
|
@@ -189,9 +211,9 @@ Object {
|
|
|
189
211
|
"xxxxxlarge": 32,
|
|
190
212
|
},
|
|
191
213
|
"fonts": Object {
|
|
192
|
-
"light": "
|
|
193
|
-
"regular": "
|
|
194
|
-
"semiBold": "
|
|
214
|
+
"light": "BeVietnamPro-Light",
|
|
215
|
+
"regular": "BeVietnamPro-Regular",
|
|
216
|
+
"semiBold": "BeVietnamPro-SemiBold",
|
|
195
217
|
},
|
|
196
218
|
"lineHeights": Object {
|
|
197
219
|
"large": 24,
|
|
@@ -2,7 +2,7 @@ import { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getBadgeTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const borderWidths = {
|
|
5
|
-
default:
|
|
5
|
+
default: theme.borderWidths.base,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const colors = {
|
|
@@ -16,23 +16,24 @@ const getBadgeTheme = (theme: GlobalTheme) => {
|
|
|
16
16
|
warningBackground: theme.colors.warningBackground,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
default:
|
|
19
|
+
const font = {
|
|
20
|
+
default: theme.fonts.semiBold,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
default: theme.
|
|
23
|
+
const fontSize = {
|
|
24
|
+
default: theme.fontSizes.small,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const space = {
|
|
28
|
+
horizontalPadding: theme.space.small,
|
|
29
|
+
verticalPadding: theme.space.xxsmall,
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
const radii = {
|
|
32
|
-
default:
|
|
33
|
+
default: 4,
|
|
33
34
|
};
|
|
34
35
|
|
|
35
|
-
return { borderWidths, colors,
|
|
36
|
+
return { borderWidths, colors, font, fontSize, space, radii };
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export default getBadgeTheme;
|
|
@@ -11,13 +11,17 @@ const getBottomNavigationTheme = (theme: GlobalTheme) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const shadows = {
|
|
14
|
-
offset:
|
|
14
|
+
offset: { width: 0, height: 3 },
|
|
15
15
|
opacity: 0.27,
|
|
16
|
-
radius:
|
|
16
|
+
radius: 4.65,
|
|
17
17
|
elevation: 10,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const space = {
|
|
21
|
+
titleMarginTop: theme.space.xsmall,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return { colors, shadows, sizes, space };
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
export default getBottomNavigationTheme;
|
|
@@ -2,11 +2,11 @@ import { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getCardTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const radii = {
|
|
5
|
-
default:
|
|
5
|
+
default: 12,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const padding = {
|
|
9
|
-
default:
|
|
9
|
+
default: theme.space.small,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
return { radii, padding };
|
|
@@ -6,15 +6,15 @@ const getDividerTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const space = {
|
|
9
|
-
xsmall:
|
|
10
|
-
small:
|
|
11
|
-
medium:
|
|
12
|
-
large:
|
|
13
|
-
xlarge:
|
|
9
|
+
xsmall: theme.space.xsmall,
|
|
10
|
+
small: theme.space.small,
|
|
11
|
+
medium: theme.space.medium,
|
|
12
|
+
large: theme.space.large,
|
|
13
|
+
xlarge: theme.space.xlarge,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const borderWidths = {
|
|
17
|
-
default:
|
|
17
|
+
default: theme.borderWidths.base,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
return { colors, space, borderWidths };
|
|
@@ -10,8 +10,8 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const sizes = {
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
13
|
+
width: 64,
|
|
14
|
+
height: 64,
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const fonts = {
|
|
@@ -20,30 +20,32 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const fontSizes = {
|
|
23
|
-
header:
|
|
24
|
-
buttonIcon:
|
|
25
|
-
actionItemText:
|
|
23
|
+
header: theme.fontSizes.xxxlarge,
|
|
24
|
+
buttonIcon: theme.fontSizes.xxxlarge,
|
|
25
|
+
actionItemText: theme.fontSizes.medium,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const lineHeights = {
|
|
29
|
-
header:
|
|
30
|
-
actionItemText:
|
|
29
|
+
header: theme.lineHeights.xxxlarge,
|
|
30
|
+
actionItemText: theme.lineHeights.medium,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const space = {
|
|
34
|
-
actionItemPaddingLeft:
|
|
35
|
-
actionItemPaddingRight:
|
|
36
|
-
actionItemPaddingTop:
|
|
37
|
-
actionItemPaddingBottom:
|
|
38
|
-
actionItemMargin:
|
|
39
|
-
actionItemMarginRight:
|
|
40
|
-
actionItemTextPaddingLeft:
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
actionItemPaddingLeft: theme.space.medium,
|
|
35
|
+
actionItemPaddingRight: theme.space.medium,
|
|
36
|
+
actionItemPaddingTop: theme.space.small,
|
|
37
|
+
actionItemPaddingBottom: theme.space.small,
|
|
38
|
+
actionItemMargin: theme.space.small,
|
|
39
|
+
actionItemMarginRight: theme.space.large,
|
|
40
|
+
actionItemTextPaddingLeft: theme.space.small,
|
|
41
|
+
buttonMarginTop: theme.space.large,
|
|
42
|
+
buttonMarginRight: theme.space.large,
|
|
43
|
+
headerTextMarginRight: theme.space.large,
|
|
44
|
+
headerTextMarginBottom: theme.space.large,
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
const radii = {
|
|
46
|
-
actionItem:
|
|
48
|
+
actionItem: 999,
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
return { radii, fonts, fontSizes, colors, sizes, lineHeights, space };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getTabsTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
background: theme.colors.primary,
|
|
6
|
+
active: theme.colors.invertedText,
|
|
7
|
+
inactive: `${theme.colors.invertedText}50`,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const space = {
|
|
11
|
+
flatListHorizontalPadding: theme.space.small,
|
|
12
|
+
titleMarginLeft: theme.space.small,
|
|
13
|
+
itemHorizontalPadding: theme.space.medium,
|
|
14
|
+
itemVerticalPadding: theme.space.large,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return { colors, space };
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default getTabsTheme;
|
|
@@ -21,10 +21,10 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const lineHeights = {
|
|
24
|
-
small:
|
|
25
|
-
medium:
|
|
26
|
-
large:
|
|
27
|
-
xlarge:
|
|
24
|
+
small: theme.lineHeights.small,
|
|
25
|
+
medium: theme.lineHeights.medium,
|
|
26
|
+
large: theme.lineHeights.large,
|
|
27
|
+
xlarge: theme.lineHeights.xlarge,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return { colors, fonts, fontSizes, lineHeights };
|