@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.
Files changed (165) hide show
  1. package/.eslintrc.json +0 -6
  2. package/.expo/packager-info.json +1 -1
  3. package/babel.config.js +0 -14
  4. package/es/index.js +2787 -8941
  5. package/jest-setup.ts +0 -1
  6. package/jest.config.js +2 -4
  7. package/lib/index.js +2822 -8956
  8. package/package.json +5 -7
  9. package/playground/components/BottomNavigation.tsx +14 -11
  10. package/playground/components/Button.tsx +67 -0
  11. package/playground/components/Card.tsx +141 -107
  12. package/playground/components/Tabs.tsx +44 -0
  13. package/playground/index.tsx +13 -7
  14. package/src/components/Badge/StyledBadge.tsx +19 -21
  15. package/src/components/Badge/__tests__/Badge.spec.tsx +9 -18
  16. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +76 -96
  17. package/src/components/Badge/index.tsx +1 -1
  18. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +44 -42
  19. package/src/components/BottomNavigation/__tests__/__snapshots__/{BottomNavigation.spec.tsx.snap → index.spec.tsx.snap} +130 -96
  20. package/src/components/BottomNavigation/__tests__/{BottomNavigation.spec.tsx → index.spec.tsx} +4 -4
  21. package/src/components/BottomNavigation/index.tsx +28 -32
  22. package/src/components/Button/IconButton.tsx +62 -0
  23. package/src/components/Button/__tests__/__snapshots__/index.spec.tsx.snap +46 -0
  24. package/src/components/Button/__tests__/index.spec.tsx +23 -0
  25. package/src/components/Button/index.tsx +5 -0
  26. package/src/components/Card/StyledCard.tsx +6 -6
  27. package/src/components/Card/__tests__/StyledCard.spec.tsx +2 -7
  28. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +8 -11
  29. package/src/components/Card/__tests__/__snapshots__/{Card.spec.tsx.snap → index.spec.tsx.snap} +2 -8
  30. package/src/components/Card/__tests__/index.spec.tsx +35 -0
  31. package/src/components/Divider/StyledDivider.tsx +18 -60
  32. package/src/components/Divider/__tests__/StyledDivider.spec.tsx +5 -10
  33. package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +106 -70
  34. package/src/components/Divider/index.tsx +1 -1
  35. package/src/components/FAB/ActionGroup/ActionItem.tsx +2 -4
  36. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +36 -37
  37. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +26 -24
  38. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +271 -245
  39. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +29 -33
  40. package/src/components/FAB/ActionGroup/index.tsx +1 -5
  41. package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
  42. package/src/components/FAB/FAB.tsx +5 -9
  43. package/src/components/FAB/StyledFAB.tsx +22 -0
  44. package/src/components/FAB/__tests__/AnimatedFABIcon.spec.tsx +3 -6
  45. package/src/components/FAB/__tests__/StyledFAB.spec.tsx +24 -0
  46. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +14 -10
  47. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +72 -0
  48. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +16 -17
  49. package/src/components/FAB/__tests__/index.spec.tsx +21 -26
  50. package/src/components/Icon/HeroIcon/index.tsx +5 -7
  51. package/src/components/Icon/__tests__/__snapshots__/{Icon.spec.tsx.snap → index.spec.tsx.snap} +21 -12
  52. package/src/components/Icon/__tests__/index.spec.tsx +25 -0
  53. package/src/components/Icon/index.tsx +1 -1
  54. package/src/components/Tabs/StyledTabs.tsx +70 -0
  55. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +321 -0
  56. package/src/components/Tabs/__tests__/index.spec.tsx +79 -0
  57. package/src/components/Tabs/index.tsx +185 -0
  58. package/src/components/Typography/Text/StyledText.tsx +19 -64
  59. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +90 -63
  60. package/src/emotion.d.ts +6 -0
  61. package/src/index.ts +9 -3
  62. package/src/testHelpers/renderWithTheme.tsx +2 -1
  63. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +70 -48
  64. package/src/theme/components/badge.ts +10 -9
  65. package/src/theme/components/bottomNavigation.ts +7 -3
  66. package/src/theme/components/card.ts +2 -2
  67. package/src/theme/components/divider.ts +6 -6
  68. package/src/theme/components/fab.ts +19 -17
  69. package/src/theme/components/tabs.ts +20 -0
  70. package/src/theme/components/typography.ts +4 -4
  71. package/src/theme/global/borders.ts +8 -2
  72. package/src/theme/global/colors.ts +3 -1
  73. package/src/theme/global/index.ts +31 -17
  74. package/src/theme/global/scale.ts +18 -0
  75. package/src/theme/global/space.ts +23 -13
  76. package/src/theme/global/typography.ts +71 -27
  77. package/src/theme/index.ts +29 -13
  78. package/src/types.ts +7 -0
  79. package/src/utils/__tests__/scale.spec.ts +3 -3
  80. package/testUtils/setup.ts +11 -0
  81. package/tsconfig.json +1 -5
  82. package/types/playground/components/BottomNavigation.d.ts +2 -2
  83. package/types/playground/components/Button.d.ts +2 -0
  84. package/types/playground/components/Tabs.d.ts +2 -0
  85. package/types/src/components/Badge/StyledBadge.d.ts +16 -5
  86. package/types/src/components/Badge/index.d.ts +1 -1
  87. package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +44 -9
  88. package/types/src/components/{Typography/Text/__test__ → BottomNavigation/__tests__}/index.spec.d.ts +0 -0
  89. package/types/src/components/BottomNavigation/index.d.ts +19 -14
  90. package/types/src/components/Button/IconButton.d.ts +34 -0
  91. package/types/{theme → src/components/Button}/__tests__/index.spec.d.ts +0 -0
  92. package/types/src/components/Button/index.d.ts +4 -0
  93. package/types/src/components/Card/StyledCard.d.ts +7 -1
  94. package/types/{components/Card/__tests__/Card.spec.d.ts → src/components/Card/__tests__/index.spec.d.ts} +0 -0
  95. package/types/src/components/Divider/StyledDivider.d.ts +8 -2
  96. package/types/src/components/Divider/index.d.ts +1 -1
  97. package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +25 -7
  98. package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +11 -2
  99. package/types/src/components/FAB/ActionGroup/index.d.ts +1 -1
  100. package/types/src/components/FAB/FAB.d.ts +4 -4
  101. package/types/src/components/FAB/StyledFAB.d.ts +14 -0
  102. package/types/{components/Card/__tests__/StyledCard.spec.d.ts → src/components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
  103. package/types/src/components/Icon/HeroIcon/index.d.ts +8 -2
  104. package/types/{components/Divider/__tests__/StyledDivider.spec.d.ts → src/components/Icon/__tests__/index.spec.d.ts} +0 -0
  105. package/types/src/components/Icon/index.d.ts +1 -1
  106. package/types/src/components/Icon/utils.d.ts +1 -1
  107. package/types/src/components/Tabs/StyledTabs.d.ts +55 -0
  108. package/types/{components/ExampleComponent/__tests__/StyledView.spec.d.ts → src/components/Tabs/__tests__/index.spec.d.ts} +0 -0
  109. package/types/src/components/Tabs/index.d.ts +45 -0
  110. package/types/src/components/Typography/Text/StyledText.d.ts +8 -2
  111. package/types/src/index.d.ts +6 -3
  112. package/types/src/theme/components/badge.d.ts +8 -7
  113. package/types/src/theme/components/bottomNavigation.d.ts +8 -2
  114. package/types/src/theme/components/card.d.ts +2 -2
  115. package/types/src/theme/components/divider.d.ts +6 -6
  116. package/types/src/theme/components/fab.d.ts +19 -17
  117. package/types/src/theme/components/tabs.d.ts +15 -0
  118. package/types/src/theme/components/typography.d.ts +4 -4
  119. package/types/src/theme/global/borders.d.ts +4 -3
  120. package/types/src/theme/global/colors.d.ts +2 -2
  121. package/types/src/theme/global/index.d.ts +10 -45
  122. package/types/src/theme/global/scale.d.ts +8 -0
  123. package/types/src/theme/global/space.d.ts +8 -7
  124. package/types/src/theme/global/typography.d.ts +9 -16
  125. package/types/src/theme/index.d.ts +4 -2
  126. package/types/src/types.d.ts +5 -0
  127. package/lib/assets/fonts/be-vietnam-pro-light.ttf +0 -0
  128. package/lib/assets/fonts/be-vietnam-pro-regular.ttf +0 -0
  129. package/lib/assets/fonts/be-vietnam-pro-semibold.ttf +0 -0
  130. package/src/components/Card/__tests__/Card.spec.tsx +0 -36
  131. package/src/components/FAB/StyledFABContainer.tsx +0 -14
  132. package/src/components/FAB/StyledFABIcon.tsx +0 -9
  133. package/src/components/FAB/__tests__/StyledFABContainer.spec.tsx +0 -18
  134. package/src/components/FAB/__tests__/StyledFABIcon.spec.tsx +0 -16
  135. package/src/components/FAB/__tests__/__snapshots__/StyledFABContainer.spec.tsx.snap +0 -46
  136. package/src/components/FAB/__tests__/__snapshots__/StyledFABIcon.spec.tsx.snap +0 -21
  137. package/src/components/Icon/__tests__/Icon.spec.tsx +0 -36
  138. package/src/styled-components.ts +0 -14
  139. package/src/styled.d.ts +0 -7
  140. package/types/components/Card/StyledCard.d.ts +0 -3
  141. package/types/components/Card/index.d.ts +0 -5
  142. package/types/components/Divider/StyledDivider.d.ts +0 -7
  143. package/types/components/Divider/index.d.ts +0 -12
  144. package/types/components/ExampleComponent/StyledView.d.ts +0 -7
  145. package/types/components/ExampleComponent/index.d.ts +0 -16
  146. package/types/index.d.ts +0 -5
  147. package/types/src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts +0 -1
  148. package/types/src/components/Card/__tests__/Card.spec.d.ts +0 -1
  149. package/types/src/components/FAB/StyledFABContainer.d.ts +0 -3
  150. package/types/src/components/FAB/StyledFABIcon.d.ts +0 -3
  151. package/types/src/components/FAB/__tests__/StyledFABContainer.spec.d.ts +0 -1
  152. package/types/src/components/FAB/__tests__/StyledFABIcon.spec.d.ts +0 -1
  153. package/types/src/components/Icon/__tests__/Icon.spec.d.ts +0 -1
  154. package/types/src/components/Typography/Text/__test__/StyledText.spec.d.ts +0 -1
  155. package/types/src/styled-components.d.ts +0 -6
  156. package/types/styled-components.d.ts +0 -6
  157. package/types/theme/components/card.d.ts +0 -10
  158. package/types/theme/components/divider.d.ts +0 -17
  159. package/types/theme/components/exampleComponent.d.ts +0 -14
  160. package/types/theme/global/borders.d.ts +0 -4
  161. package/types/theme/global/colors.d.ts +0 -26
  162. package/types/theme/global/index.d.ts +0 -63
  163. package/types/theme/global/space.d.ts +0 -12
  164. package/types/theme/global/typography.d.ts +0 -21
  165. 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
- Object {
7
- "color": "#292a2b",
8
- "fontFamily": "Be Vietnam Pro Regular",
9
- "fontSize": 14,
10
- "letterSpacing": 0.42,
11
- "lineHeight": 22,
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
- Object {
26
- "color": "#292a2b",
27
- "fontFamily": "Be Vietnam Pro Regular",
28
- "fontSize": 16,
29
- "letterSpacing": 0.48,
30
- "lineHeight": 24,
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
- Object {
45
- "color": "#292a2b",
46
- "fontFamily": "Be Vietnam Pro Light",
47
- "fontSize": 14,
48
- "letterSpacing": 0.42,
49
- "lineHeight": 22,
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
- Object {
64
- "color": "#292a2b",
65
- "fontFamily": "Be Vietnam Pro Regular",
66
- "fontSize": 14,
67
- "letterSpacing": 0.42,
68
- "lineHeight": 22,
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
- Object {
83
- "color": "#292a2b",
84
- "fontFamily": "Be Vietnam Pro Regular",
85
- "fontSize": 14,
86
- "letterSpacing": 0.42,
87
- "lineHeight": 22,
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
- Object {
102
- "color": "#292a2b",
103
- "fontFamily": "Be Vietnam Pro SemiBold",
104
- "fontSize": 14,
105
- "letterSpacing": 0.42,
106
- "lineHeight": 22,
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
- Object {
121
- "color": "#292a2b",
122
- "fontFamily": "Be Vietnam Pro Regular",
123
- "fontSize": 12,
124
- "letterSpacing": 0.36,
125
- "lineHeight": 20,
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
- Object {
140
- "color": "#8b8d92",
141
- "fontFamily": "Be Vietnam Pro Regular",
142
- "fontSize": 14,
143
- "letterSpacing": 0.42,
144
- "lineHeight": 22,
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
- Object {
159
- "color": "#292a2b",
160
- "fontFamily": "Be Vietnam Pro Regular",
161
- "fontSize": 18,
162
- "letterSpacing": 0.54,
163
- "lineHeight": 26,
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"
@@ -0,0 +1,6 @@
1
+ import '@emotion/react';
2
+ import { Theme as HeroTheme } from './theme';
3
+
4
+ declare module '@emotion/react' {
5
+ export interface Theme extends HeroTheme {}
6
+ }
package/src/index.ts CHANGED
@@ -1,14 +1,16 @@
1
- import { ThemeProvider, useTheme } from 'styled-components-native';
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, theme } from '../index';
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": "1px",
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
- "fontSizes": Object {
21
- "default": "12px",
22
- },
23
- "fonts": Object {
24
- "default": "Be Vietnam Pro SemiBold",
20
+ "font": Object {
21
+ "default": "BeVietnamPro-SemiBold",
25
22
  },
26
- "padding": Object {
27
- "default": "4px 8px",
23
+ "fontSize": Object {
24
+ "default": 12,
28
25
  },
29
26
  "radii": Object {
30
- "default": "4px",
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": "0px 3px",
41
+ "offset": Object {
42
+ "height": 3,
43
+ "width": 0,
44
+ },
41
45
  "opacity": 0.27,
42
- "radius": "4.65px",
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": "8px",
57
+ "default": 8,
51
58
  },
52
59
  "radii": Object {
53
- "default": "12px",
60
+ "default": 12,
54
61
  },
55
62
  },
56
63
  "divider": Object {
57
64
  "borderWidths": Object {
58
- "default": "1px",
65
+ "default": 1,
59
66
  },
60
67
  "colors": Object {
61
68
  "default": "#dadbde",
62
69
  },
63
70
  "space": Object {
64
- "large": "24px",
65
- "medium": "16px",
66
- "small": "8px",
67
- "xlarge": "32px",
68
- "xsmall": "4px",
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": "14px",
81
- "buttonIcon": "24px",
82
- "header": "24px",
87
+ "actionItemText": 14,
88
+ "buttonIcon": 24,
89
+ "header": 24,
83
90
  },
84
91
  "fonts": Object {
85
- "actionItemText": "Be Vietnam Pro Regular",
86
- "header": "Be Vietnam Pro SemiBold",
92
+ "actionItemText": "BeVietnamPro-Regular",
93
+ "header": "BeVietnamPro-SemiBold",
87
94
  },
88
95
  "lineHeights": Object {
89
- "actionItemText": "22px",
90
- "header": "32px",
96
+ "actionItemText": 22,
97
+ "header": 32,
91
98
  },
92
99
  "radii": Object {
93
- "actionItem": "999px",
100
+ "actionItem": 999,
94
101
  },
95
102
  "sizes": Object {
96
- "height": "64px",
97
- "width": "64px",
103
+ "height": 64,
104
+ "width": 64,
98
105
  },
99
106
  "space": Object {
100
- "actionItemMargin": "8px",
101
- "actionItemMarginRight": "24px",
102
- "actionItemPaddingBottom": "8px",
103
- "actionItemPaddingLeft": "16px",
104
- "actionItemPaddingRight": "16px",
105
- "actionItemPaddingTop": "8px",
106
- "actionItemTextPaddingLeft": "8px",
107
- "headerTextMarginBottom": "24px",
108
- "headerTextMarginRight": "24px",
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": "Be Vietnam Pro Light",
142
- "regular": "Be Vietnam Pro Regular",
143
- "semiBold": "Be Vietnam Pro SemiBold",
163
+ "light": "BeVietnamPro-Light",
164
+ "regular": "BeVietnamPro-Regular",
165
+ "semiBold": "BeVietnamPro-SemiBold",
144
166
  },
145
167
  "lineHeights": Object {
146
- "large": "24px",
147
- "medium": "22px",
148
- "small": "20px",
149
- "xlarge": "26px",
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": "Be Vietnam Pro Light",
193
- "regular": "Be Vietnam Pro Regular",
194
- "semiBold": "Be Vietnam Pro 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: `${theme.borderWidths.base}px`,
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 padding = {
20
- default: `${theme.space.xsmall}px ${theme.space.small}px`,
19
+ const font = {
20
+ default: theme.fonts.semiBold,
21
21
  };
22
22
 
23
- const fonts = {
24
- default: theme.fonts.semiBold,
23
+ const fontSize = {
24
+ default: theme.fontSizes.small,
25
25
  };
26
26
 
27
- const fontSizes = {
28
- default: `${theme.fontSizes.small}px`,
27
+ const space = {
28
+ horizontalPadding: theme.space.small,
29
+ verticalPadding: theme.space.xxsmall,
29
30
  };
30
31
 
31
32
  const radii = {
32
- default: `4px`,
33
+ default: 4,
33
34
  };
34
35
 
35
- return { borderWidths, colors, padding, fonts, fontSizes, radii };
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: `0px 3px`,
14
+ offset: { width: 0, height: 3 },
15
15
  opacity: 0.27,
16
- radius: `4.65px`,
16
+ radius: 4.65,
17
17
  elevation: 10,
18
18
  };
19
19
 
20
- return { colors, shadows, sizes };
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: `12px`,
5
+ default: 12,
6
6
  };
7
7
 
8
8
  const padding = {
9
- default: `${theme.space.small}px`,
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: `${theme.space.xsmall}px`,
10
- small: `${theme.space.small}px`,
11
- medium: `${theme.space.medium}px`,
12
- large: `${theme.space.large}px`,
13
- xlarge: `${theme.space.xlarge}px`,
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: `${theme.borderWidths.base}px`,
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: '64px',
14
- height: '64px',
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: `${theme.fontSizes.xxxlarge}px`,
24
- buttonIcon: `${theme.fontSizes.xxxlarge}px`,
25
- actionItemText: `${theme.fontSizes.medium}px`,
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: `${theme.lineHeights.xxxlarge}px`,
30
- actionItemText: `${theme.lineHeights.medium}px`,
29
+ header: theme.lineHeights.xxxlarge,
30
+ actionItemText: theme.lineHeights.medium,
31
31
  };
32
32
 
33
33
  const space = {
34
- actionItemPaddingLeft: `${theme.space.medium}px`,
35
- actionItemPaddingRight: `${theme.space.medium}px`,
36
- actionItemPaddingTop: `${theme.space.small}px`,
37
- actionItemPaddingBottom: `${theme.space.small}px`,
38
- actionItemMargin: `${theme.space.small}px`,
39
- actionItemMarginRight: `${theme.space.large}px`,
40
- actionItemTextPaddingLeft: `${theme.space.small}px`,
41
- headerTextMarginRight: `${theme.space.large}px`,
42
- headerTextMarginBottom: `${theme.space.large}px`,
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: `999px`,
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: `${theme.lineHeights.small}px`,
25
- medium: `${theme.lineHeights.medium}px`,
26
- large: `${theme.lineHeights.large}px`,
27
- xlarge: `${theme.lineHeights.xlarge}px`,
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 };