@hero-design/rn 7.2.2 → 7.3.0
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/.expo/packager-info.json +1 -1
- package/.expo/prebuild/cached-packages.json +4 -0
- package/.expo/xcodebuild-error.log +2 -0
- package/.expo/xcodebuild.log +11199 -0
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-build:types.log +2 -0
- package/.turbo/turbo-test.log +131 -0
- package/.turbo/turbo-type-check.log +7 -0
- package/es/index.js +2409 -468
- package/jest.config.js +1 -1
- package/lib/index.js +2430 -484
- package/package.json +4 -2
- package/playground/components/Avatar.tsx +102 -0
- package/playground/components/Badge.tsx +146 -9
- package/playground/components/Button.tsx +138 -35
- package/playground/components/Card.tsx +36 -1
- package/playground/components/Collapse.tsx +99 -0
- package/playground/components/Drawer.tsx +32 -0
- package/playground/components/FAB.tsx +15 -0
- package/playground/components/IconButton.tsx +67 -0
- package/playground/components/Progress.tsx +95 -0
- package/playground/components/Tabs.tsx +106 -14
- package/playground/components/Tag.tsx +45 -0
- package/playground/index.tsx +18 -0
- package/src/components/Avatar/StyledAvatar.tsx +61 -0
- package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +48 -0
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +87 -0
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +88 -0
- package/src/components/Avatar/__tests__/index.spec.tsx +26 -0
- package/src/components/Avatar/index.tsx +71 -0
- package/src/components/Badge/Status.tsx +77 -0
- package/src/components/Badge/StyledBadge.tsx +38 -26
- package/src/components/Badge/__tests__/Badge.spec.tsx +16 -0
- package/src/components/Badge/__tests__/Status.spec.tsx +27 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +133 -52
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +89 -0
- package/src/components/Badge/index.tsx +77 -19
- package/src/components/Button/Button.tsx +163 -0
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +58 -0
- package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +20 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +101 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +606 -0
- package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +24 -0
- package/src/components/Button/LoadingIndicator/index.tsx +140 -0
- package/src/components/Button/StyledButton.tsx +254 -0
- package/src/components/Button/__tests__/Button.spec.tsx +86 -0
- package/src/components/Button/__tests__/{index.spec.tsx → IconButton.spec.tsx} +0 -0
- package/src/components/Button/__tests__/StyledButton.spec.tsx +154 -0
- package/src/components/Button/__tests__/__snapshots__/{index.spec.tsx.snap → IconButton.spec.tsx.snap} +0 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +895 -0
- package/src/components/Button/index.tsx +10 -2
- package/src/components/Card/StyledCard.tsx +27 -4
- package/src/components/Card/__tests__/StyledCard.spec.tsx +15 -3
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +34 -1
- package/src/components/Card/__tests__/index.spec.tsx +16 -21
- package/src/components/Card/index.tsx +15 -2
- package/src/components/Collapse/StyledCollapse.tsx +15 -0
- package/src/components/Collapse/__tests__/StyledCollapse.spec.tsx +26 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +37 -0
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +84 -0
- package/src/components/Collapse/__tests__/index.spec.tsx +42 -0
- package/src/components/Collapse/index.tsx +109 -0
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/Drawer/StyledDrawer.tsx +39 -0
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +244 -0
- package/src/components/Drawer/__tests__/index.spec.tsx +37 -0
- package/src/components/Drawer/index.tsx +93 -0
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +78 -62
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +2 -0
- package/src/components/FAB/ActionGroup/index.tsx +13 -0
- package/src/components/FAB/FAB.tsx +63 -13
- package/src/components/FAB/StyledFAB.tsx +25 -6
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +6 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +7 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +88 -6
- package/src/components/FAB/__tests__/index.spec.tsx +16 -0
- package/src/components/Progress/ProgressBar.tsx +73 -0
- package/src/components/Progress/ProgressCircle.tsx +165 -0
- package/src/components/Progress/StyledProgressBar.tsx +21 -0
- package/src/components/Progress/StyledProgressCircle.tsx +66 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +641 -0
- package/src/components/Progress/__tests__/index.spec.js +46 -0
- package/src/components/Progress/index.tsx +6 -0
- package/src/components/Progress/types.ts +1 -0
- package/src/components/Tabs/ActiveTabIndicator.tsx +37 -0
- package/src/components/Tabs/ScrollableTabs.tsx +216 -0
- package/src/components/Tabs/StyledScrollableTabs.tsx +60 -0
- package/src/components/Tabs/StyledTabs.tsx +30 -44
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +84 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +591 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +317 -224
- package/src/components/Tabs/__tests__/index.spec.tsx +22 -21
- package/src/components/Tabs/index.tsx +155 -114
- package/src/components/Tabs/utils.ts +13 -0
- package/src/components/Tag/StyledTag.tsx +35 -0
- package/src/components/Tag/__tests__/Tag.spec.tsx +41 -0
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +153 -0
- package/src/components/Tag/index.tsx +41 -0
- package/src/components/Typography/Text/index.tsx +1 -1
- package/src/index.ts +10 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +182 -20
- package/src/theme/components/avatar.ts +40 -0
- package/src/theme/components/badge.ts +14 -16
- package/src/theme/components/button.ts +57 -0
- package/src/theme/components/card.ts +8 -2
- package/src/theme/components/drawer.ts +24 -0
- package/src/theme/components/fab.ts +9 -2
- package/src/theme/components/progress.ts +27 -0
- package/src/theme/components/tabs.ts +22 -7
- package/src/theme/components/tag.ts +39 -0
- package/src/theme/global/borders.ts +13 -1
- package/src/theme/global/colors.ts +6 -1
- package/src/theme/global/index.ts +3 -1
- package/src/theme/global/scale.ts +3 -0
- package/src/theme/index.ts +16 -1
- package/src/utils/hooks.ts +10 -0
- package/testUtils/setup.tsx +43 -0
- package/types/playground/components/Avatar.d.ts +2 -0
- package/types/playground/components/Badge.d.ts +0 -0
- package/types/playground/components/BottomNavigation.d.ts +0 -0
- package/types/playground/components/Button.d.ts +0 -0
- package/types/playground/components/Card.d.ts +0 -0
- package/types/playground/components/Collapse.d.ts +2 -0
- package/types/playground/components/Divider.d.ts +0 -0
- package/types/playground/components/Drawer.d.ts +2 -0
- package/types/playground/components/FAB.d.ts +0 -0
- package/types/playground/components/Icon.d.ts +0 -0
- package/types/playground/components/IconButton.d.ts +2 -0
- package/types/playground/components/Progress.d.ts +2 -0
- package/types/playground/components/Tabs.d.ts +0 -0
- package/types/playground/components/Tag.d.ts +2 -0
- package/types/playground/components/Typography.d.ts +0 -0
- package/types/playground/index.d.ts +0 -0
- package/types/src/components/Avatar/StyledAvatar.d.ts +46 -0
- package/types/src/components/{BottomNavigation/__tests__/BottomNavigation.spec.d.ts → Avatar/__tests__/StyledAvatar.spec.d.ts} +0 -0
- package/types/src/components/{Card/__tests__/Card.spec.d.ts → Avatar/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Avatar/index.d.ts +25 -0
- package/types/src/components/Badge/Status.d.ts +24 -0
- package/types/src/components/Badge/StyledBadge.d.ts +17 -9
- package/types/src/components/Badge/__tests__/Badge.spec.d.ts +0 -0
- package/types/src/components/{FAB/__tests__/StyledFABContainer.spec.d.ts → Badge/__tests__/Status.spec.d.ts} +0 -0
- package/types/src/components/Badge/index.d.ts +17 -7
- package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/src/components/BottomNavigation/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/BottomNavigation/index.d.ts +0 -0
- package/types/src/components/Button/Button.d.ts +57 -0
- package/types/src/components/Button/IconButton.d.ts +0 -0
- package/types/src/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +20 -0
- package/types/src/components/{FAB/__tests__/StyledFABIcon.spec.d.ts → Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts} +0 -0
- package/types/src/components/{Icon/__tests__/Icon.spec.d.ts → Button/LoadingIndicator/__tests__/index.spec.d.ts} +0 -0
- package/types/src/components/Button/LoadingIndicator/index.d.ts +26 -0
- package/types/src/components/Button/StyledButton.d.ts +40 -0
- package/types/src/components/{Tabs/__tests__/Tabs.spec.d.ts → Button/__tests__/Button.spec.d.ts} +0 -0
- package/types/src/components/Button/__tests__/IconButton.spec.d.ts +1 -0
- package/types/src/components/Button/__tests__/StyledButton.spec.d.ts +1 -0
- package/types/src/components/Button/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Button/index.d.ts +8 -4
- package/types/src/components/Card/StyledCard.d.ts +9 -1
- package/types/src/components/Card/__tests__/StyledCard.spec.d.ts +0 -0
- package/types/src/components/Card/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Card/index.d.ts +5 -1
- package/types/src/components/Collapse/StyledCollapse.d.ts +15 -0
- package/types/src/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/types/src/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/types/src/components/Collapse/index.d.ts +23 -0
- package/types/src/components/Divider/StyledDivider.d.ts +0 -0
- package/types/src/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -0
- package/types/src/components/Divider/index.d.ts +0 -0
- package/types/src/components/Drawer/StyledDrawer.d.ts +25 -0
- package/types/src/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/types/src/components/Drawer/index.d.ts +25 -0
- package/types/src/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/src/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/FAB/ActionGroup/index.d.ts +5 -1
- package/types/src/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/src/components/FAB/FAB.d.ts +5 -1
- package/types/src/components/FAB/StyledFAB.d.ts +8 -2
- package/types/src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -0
- package/types/src/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -0
- package/types/src/components/FAB/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/FAB/index.d.ts +2 -2
- package/types/src/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/src/components/Icon/IconList.d.ts +0 -0
- package/types/src/components/Icon/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Icon/index.d.ts +0 -0
- package/types/src/components/Icon/utils.d.ts +1 -1
- package/types/src/components/Progress/ProgressBar.d.ts +18 -0
- package/types/src/components/Progress/ProgressCircle.d.ts +18 -0
- package/types/src/components/Progress/StyledProgressBar.d.ts +18 -0
- package/types/src/components/Progress/StyledProgressCircle.d.ts +38 -0
- package/types/src/components/Progress/__tests__/index.spec.d.ts +1 -0
- package/types/src/components/Progress/index.d.ts +5 -0
- package/types/src/components/Progress/types.d.ts +1 -0
- package/types/src/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/types/src/components/Tabs/ScrollableTabs.d.ts +3 -0
- package/types/src/components/Tabs/StyledScrollableTabs.d.ts +61 -0
- package/types/src/components/Tabs/StyledTabs.d.ts +22 -22
- package/types/src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/types/src/components/Tabs/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Tabs/index.d.ts +28 -19
- package/types/src/components/Tabs/utils.d.ts +2 -0
- package/types/src/components/Tag/StyledTag.d.ts +20 -0
- package/types/src/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/types/src/components/Tag/index.d.ts +21 -0
- package/types/src/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/src/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -0
- package/types/src/components/Typography/Text/__tests__/index.spec.d.ts +0 -0
- package/types/src/components/Typography/Text/index.d.ts +0 -0
- package/types/src/components/Typography/index.d.ts +0 -0
- package/types/src/index.d.ts +6 -1
- package/types/src/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/src/theme/__tests__/index.spec.d.ts +0 -0
- package/types/src/theme/components/avatar.d.ts +32 -0
- package/types/src/theme/components/badge.d.ts +12 -13
- package/types/src/theme/components/bottomNavigation.d.ts +0 -0
- package/types/src/theme/components/button.d.ts +37 -0
- package/types/src/theme/components/card.d.ts +5 -1
- package/types/src/theme/components/divider.d.ts +0 -0
- package/types/src/theme/components/drawer.d.ts +21 -0
- package/types/src/theme/components/fab.d.ts +8 -1
- package/types/src/theme/components/icon.d.ts +0 -0
- package/types/src/theme/components/progress.d.ts +21 -0
- package/types/src/theme/components/tabs.d.ts +14 -2
- package/types/src/theme/components/tag.d.ts +30 -0
- package/types/src/theme/components/typography.d.ts +0 -0
- package/types/src/theme/global/borders.d.ts +7 -1
- package/types/src/theme/global/colors.d.ts +6 -1
- package/types/src/theme/global/index.d.ts +7 -1
- package/types/src/theme/global/scale.d.ts +1 -0
- package/types/src/theme/global/space.d.ts +0 -0
- package/types/src/theme/global/typography.d.ts +0 -0
- package/types/src/theme/index.d.ts +10 -0
- package/types/src/types.d.ts +0 -0
- package/types/src/utils/__tests__/scale.spec.d.ts +0 -0
- package/types/src/utils/helpers.d.ts +0 -0
- package/types/src/utils/hooks.d.ts +1 -0
- package/types/src/utils/scale.d.ts +0 -0
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -33
- package/testUtils/setup.ts +0 -18
- package/types/src/components/FAB/StyledFABContainer.d.ts +0 -3
- package/types/src/components/FAB/StyledFABIcon.d.ts +0 -3
- package/types/src/styled-components.d.ts +0 -6
|
@@ -3,32 +3,61 @@
|
|
|
3
3
|
exports[`theme returns correct theme object 1`] = `
|
|
4
4
|
Object {
|
|
5
5
|
"__hd__": Object {
|
|
6
|
-
"
|
|
6
|
+
"avatar": Object {
|
|
7
7
|
"borderWidths": Object {
|
|
8
8
|
"default": 1,
|
|
9
9
|
},
|
|
10
10
|
"colors": Object {
|
|
11
11
|
"danger": "#de350b",
|
|
12
|
-
"dangerBackground": "#fcebe7",
|
|
13
12
|
"info": "#4568fb",
|
|
14
|
-
"
|
|
13
|
+
"primary": "#7622d7",
|
|
14
|
+
"success": "#01b39c",
|
|
15
|
+
"warning": "#ffa234",
|
|
16
|
+
},
|
|
17
|
+
"fontSizes": Object {
|
|
18
|
+
"large": 20,
|
|
19
|
+
"medium": 18,
|
|
20
|
+
"small": 16,
|
|
21
|
+
"xlarge": 24,
|
|
22
|
+
},
|
|
23
|
+
"radii": Object {
|
|
24
|
+
"large": 24,
|
|
25
|
+
"medium": 20,
|
|
26
|
+
"small": 16,
|
|
27
|
+
"xlarge": 28,
|
|
28
|
+
},
|
|
29
|
+
"sizes": Object {
|
|
30
|
+
"large": 48,
|
|
31
|
+
"medium": 40,
|
|
32
|
+
"small": 32,
|
|
33
|
+
"xlarge": 56,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
"badge": Object {
|
|
37
|
+
"colors": Object {
|
|
38
|
+
"archived": "#ccced1",
|
|
39
|
+
"danger": "#de350b",
|
|
40
|
+
"info": "#4568fb",
|
|
15
41
|
"success": "#017d6d",
|
|
16
|
-
"
|
|
42
|
+
"text": "#ffffff",
|
|
17
43
|
"warning": "#d98a2c",
|
|
18
|
-
"warningBackground": "#fff6eb",
|
|
19
|
-
},
|
|
20
|
-
"font": Object {
|
|
21
|
-
"default": "BeVietnamPro-SemiBold",
|
|
22
44
|
},
|
|
23
|
-
"
|
|
45
|
+
"fontSizes": Object {
|
|
24
46
|
"default": 12,
|
|
25
47
|
},
|
|
26
|
-
"
|
|
27
|
-
"default":
|
|
48
|
+
"fonts": Object {
|
|
49
|
+
"default": "BeVietnamPro-SemiBold",
|
|
50
|
+
},
|
|
51
|
+
"sizes": Object {
|
|
52
|
+
"height": 20,
|
|
53
|
+
"minWidth": 20,
|
|
54
|
+
"statusHeight": 8,
|
|
55
|
+
"statusWidth": 8,
|
|
28
56
|
},
|
|
29
57
|
"space": Object {
|
|
30
58
|
"horizontalPadding": 8,
|
|
31
|
-
"
|
|
59
|
+
"statusPositionRight": -2,
|
|
60
|
+
"statusPositionTop": -2,
|
|
32
61
|
},
|
|
33
62
|
},
|
|
34
63
|
"bottomNavigation": Object {
|
|
@@ -52,7 +81,45 @@ Object {
|
|
|
52
81
|
"titleMarginTop": 4,
|
|
53
82
|
},
|
|
54
83
|
},
|
|
84
|
+
"button": Object {
|
|
85
|
+
"borderWidth": Object {
|
|
86
|
+
"default": 2,
|
|
87
|
+
},
|
|
88
|
+
"colors": Object {
|
|
89
|
+
"defaultText": "#292a2b",
|
|
90
|
+
"disabledBackground": "#ccced1",
|
|
91
|
+
"disabledBorder": "#ccced1",
|
|
92
|
+
"disabledText": "#ccced1",
|
|
93
|
+
"invertedText": "#ffffff",
|
|
94
|
+
"pressedPrimary": "#c8a7ef",
|
|
95
|
+
"pressedSecondary": "#d1d9fe",
|
|
96
|
+
"primary": "#7622d7",
|
|
97
|
+
"secondary": "#4568fb",
|
|
98
|
+
},
|
|
99
|
+
"fontSize": Object {
|
|
100
|
+
"default": 18,
|
|
101
|
+
},
|
|
102
|
+
"fonts": Object {
|
|
103
|
+
"default": "BeVietnamPro-SemiBold",
|
|
104
|
+
},
|
|
105
|
+
"lineHeight": Object {
|
|
106
|
+
"default": 24,
|
|
107
|
+
},
|
|
108
|
+
"radii": Object {
|
|
109
|
+
"default": 32,
|
|
110
|
+
},
|
|
111
|
+
"sizes": Object {
|
|
112
|
+
"iconSize": 20,
|
|
113
|
+
},
|
|
114
|
+
"space": Object {
|
|
115
|
+
"buttonPadding": 16,
|
|
116
|
+
"iconPadding": 8,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
55
119
|
"card": Object {
|
|
120
|
+
"colors": Object {
|
|
121
|
+
"dataCardIndicator": "#a26fb0",
|
|
122
|
+
},
|
|
56
123
|
"radii": Object {
|
|
57
124
|
"default": 12,
|
|
58
125
|
},
|
|
@@ -72,6 +139,25 @@ Object {
|
|
|
72
139
|
"xsmall": 4,
|
|
73
140
|
},
|
|
74
141
|
},
|
|
142
|
+
"drawer": Object {
|
|
143
|
+
"colors": Object {
|
|
144
|
+
"backdrop": "#292a2b",
|
|
145
|
+
"background": "#ffffff",
|
|
146
|
+
"shadow": "#292a2b",
|
|
147
|
+
},
|
|
148
|
+
"radii": Object {
|
|
149
|
+
"default": 16,
|
|
150
|
+
},
|
|
151
|
+
"shadows": Object {
|
|
152
|
+
"elevation": 10,
|
|
153
|
+
"offset": Object {
|
|
154
|
+
"height": 3,
|
|
155
|
+
"width": 0,
|
|
156
|
+
},
|
|
157
|
+
"opacity": 0.27,
|
|
158
|
+
"radius": 4.65,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
75
161
|
"fab": Object {
|
|
76
162
|
"colors": Object {
|
|
77
163
|
"actionItemBackground": "#d1d9fe",
|
|
@@ -79,19 +165,23 @@ Object {
|
|
|
79
165
|
"buttonBackground": "#292a2b",
|
|
80
166
|
"headerText": "#292a2b",
|
|
81
167
|
"icon": "#ffffff",
|
|
168
|
+
"titleText": "#ffffff",
|
|
82
169
|
},
|
|
83
170
|
"fontSizes": Object {
|
|
84
171
|
"actionItemText": 14,
|
|
85
|
-
"buttonIcon": 24,
|
|
86
172
|
"header": 24,
|
|
173
|
+
"title": 16,
|
|
87
174
|
},
|
|
88
175
|
"fonts": Object {
|
|
89
176
|
"actionItemText": "BeVietnamPro-Regular",
|
|
90
177
|
"header": "BeVietnamPro-SemiBold",
|
|
178
|
+
"title": "BeVietnamPro-SemiBold",
|
|
91
179
|
},
|
|
92
180
|
"lineHeights": Object {
|
|
93
181
|
"actionItemText": 22,
|
|
94
182
|
"header": 32,
|
|
183
|
+
"icon": 24,
|
|
184
|
+
"title": 24,
|
|
95
185
|
},
|
|
96
186
|
"radii": Object {
|
|
97
187
|
"actionItem": 999,
|
|
@@ -110,8 +200,11 @@ Object {
|
|
|
110
200
|
"actionItemTextPaddingLeft": 8,
|
|
111
201
|
"buttonMarginRight": 24,
|
|
112
202
|
"buttonMarginTop": 24,
|
|
203
|
+
"containerPaddingHorizontal": 16,
|
|
204
|
+
"containerPaddingVertical": 16,
|
|
113
205
|
"headerTextMarginBottom": 24,
|
|
114
206
|
"headerTextMarginRight": 24,
|
|
207
|
+
"titleMarginHorizontal": 8,
|
|
115
208
|
},
|
|
116
209
|
},
|
|
117
210
|
"icon": Object {
|
|
@@ -131,17 +224,76 @@ Object {
|
|
|
131
224
|
"xsmall": 16,
|
|
132
225
|
},
|
|
133
226
|
},
|
|
227
|
+
"progress": Object {
|
|
228
|
+
"colors": Object {
|
|
229
|
+
"background": "#dadbde",
|
|
230
|
+
"danger": "#de350b",
|
|
231
|
+
"info": "#4568fb",
|
|
232
|
+
"innerBackground": "#ffffff",
|
|
233
|
+
"primary": "#7622d7",
|
|
234
|
+
"success": "#01b39c",
|
|
235
|
+
"warning": "#ffa234",
|
|
236
|
+
},
|
|
237
|
+
"radii": Object {
|
|
238
|
+
"default": 999,
|
|
239
|
+
},
|
|
240
|
+
"sizes": Object {
|
|
241
|
+
"barHeight": 4,
|
|
242
|
+
"radius": 48,
|
|
243
|
+
"strokeWidth": 8,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
134
246
|
"tabs": Object {
|
|
247
|
+
"borderWidths": Object {
|
|
248
|
+
"headerBottom": 1,
|
|
249
|
+
},
|
|
135
250
|
"colors": Object {
|
|
136
|
-
"active": "#
|
|
137
|
-
"
|
|
138
|
-
"
|
|
251
|
+
"active": "#7622d7",
|
|
252
|
+
"activeBackground": "#f1e9fb",
|
|
253
|
+
"headerBottom": "#dadbde",
|
|
254
|
+
"inactive": "#292a2b",
|
|
255
|
+
"text": "#292a2b",
|
|
256
|
+
},
|
|
257
|
+
"radii": Object {
|
|
258
|
+
"outline": 8,
|
|
259
|
+
},
|
|
260
|
+
"sizes": Object {
|
|
261
|
+
"indicator": 2,
|
|
139
262
|
},
|
|
140
263
|
"space": Object {
|
|
141
264
|
"flatListHorizontalPadding": 8,
|
|
142
|
-
"itemHorizontalPadding":
|
|
143
|
-
"itemVerticalPadding":
|
|
144
|
-
"
|
|
265
|
+
"itemHorizontalPadding": 8,
|
|
266
|
+
"itemVerticalPadding": 8,
|
|
267
|
+
"outlineHorizontalPadding": 8,
|
|
268
|
+
"outlineVerticalPadding": 4,
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
"tag": Object {
|
|
272
|
+
"borderWidths": Object {
|
|
273
|
+
"default": 1,
|
|
274
|
+
},
|
|
275
|
+
"colors": Object {
|
|
276
|
+
"danger": "#de350b",
|
|
277
|
+
"dangerBackground": "#fcebe7",
|
|
278
|
+
"info": "#4568fb",
|
|
279
|
+
"infoBackground": "#ecf0ff",
|
|
280
|
+
"success": "#017d6d",
|
|
281
|
+
"successBackground": "#f0fef4",
|
|
282
|
+
"warning": "#d98a2c",
|
|
283
|
+
"warningBackground": "#fff6eb",
|
|
284
|
+
},
|
|
285
|
+
"fontSizes": Object {
|
|
286
|
+
"default": 12,
|
|
287
|
+
},
|
|
288
|
+
"fonts": Object {
|
|
289
|
+
"default": "BeVietnamPro-SemiBold",
|
|
290
|
+
},
|
|
291
|
+
"radii": Object {
|
|
292
|
+
"default": 4,
|
|
293
|
+
},
|
|
294
|
+
"space": Object {
|
|
295
|
+
"horizontalPadding": 8,
|
|
296
|
+
"verticalPadding": 2,
|
|
145
297
|
},
|
|
146
298
|
},
|
|
147
299
|
"typography": Object {
|
|
@@ -173,11 +325,13 @@ Object {
|
|
|
173
325
|
"base": 1,
|
|
174
326
|
},
|
|
175
327
|
"colors": Object {
|
|
328
|
+
"archived": "#ccced1",
|
|
176
329
|
"backgroundDark": "#292a2b",
|
|
177
330
|
"backgroundLight": "#fafbfb",
|
|
178
331
|
"danger": "#de350b",
|
|
179
332
|
"dangerBackground": "#fcebe7",
|
|
180
333
|
"dangerLight": "#f2ae9d",
|
|
334
|
+
"disabledLightText": "#ccced1",
|
|
181
335
|
"disabledText": "#8b8d92",
|
|
182
336
|
"info": "#4568fb",
|
|
183
337
|
"infoBackground": "#ecf0ff",
|
|
@@ -186,11 +340,14 @@ Object {
|
|
|
186
340
|
"outline": "#dadbde",
|
|
187
341
|
"platformBackground": "#ffffff",
|
|
188
342
|
"primary": "#7622d7",
|
|
343
|
+
"primaryBackground": "#f1e9fb",
|
|
344
|
+
"primaryDark": "#a26fb0",
|
|
189
345
|
"primaryLight": "#c8a7ef",
|
|
346
|
+
"secondary": "#4568fb",
|
|
347
|
+
"secondaryLight": "#d1d9fe",
|
|
190
348
|
"success": "#01b39c",
|
|
191
349
|
"successBackground": "#f0fef4",
|
|
192
350
|
"successDark": "#017d6d",
|
|
193
|
-
"successLight": "#002d27",
|
|
194
351
|
"text": "#292a2b",
|
|
195
352
|
"warning": "#ffa234",
|
|
196
353
|
"warningBackground": "#fff6eb",
|
|
@@ -223,6 +380,11 @@ Object {
|
|
|
223
380
|
"xxxxlarge": 36,
|
|
224
381
|
"xxxxxlarge": 40,
|
|
225
382
|
},
|
|
383
|
+
"radii": Object {
|
|
384
|
+
"base": 4,
|
|
385
|
+
"medium": 8,
|
|
386
|
+
"rounded": 999,
|
|
387
|
+
},
|
|
226
388
|
"space": Object {
|
|
227
389
|
"large": 24,
|
|
228
390
|
"medium": 16,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getAvatarTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
primary: theme.colors.primary,
|
|
6
|
+
info: theme.colors.info,
|
|
7
|
+
danger: theme.colors.danger,
|
|
8
|
+
success: theme.colors.success,
|
|
9
|
+
warning: theme.colors.warning,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const sizes = {
|
|
13
|
+
small: theme.space.xlarge,
|
|
14
|
+
medium: theme.space.xxlarge,
|
|
15
|
+
large: theme.space.xxxlarge,
|
|
16
|
+
xlarge: theme.space.xxxxlarge,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const fontSizes = {
|
|
20
|
+
small: theme.fontSizes.large,
|
|
21
|
+
medium: theme.fontSizes.xlarge,
|
|
22
|
+
large: theme.fontSizes.xxlarge,
|
|
23
|
+
xlarge: theme.fontSizes.xxxlarge,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const radii = {
|
|
27
|
+
small: theme.space.xlarge / 2,
|
|
28
|
+
medium: theme.space.xxlarge / 2,
|
|
29
|
+
large: theme.space.xxxlarge / 2,
|
|
30
|
+
xlarge: theme.space.xxxxlarge / 2,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const borderWidths = {
|
|
34
|
+
default: theme.borderWidths.base,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return { colors, sizes, radii, borderWidths, fontSizes };
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default getAvatarTheme;
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { GlobalTheme } from '../global';
|
|
2
2
|
|
|
3
3
|
const getBadgeTheme = (theme: GlobalTheme) => {
|
|
4
|
-
const borderWidths = {
|
|
5
|
-
default: theme.borderWidths.base,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
4
|
const colors = {
|
|
9
5
|
danger: theme.colors.danger,
|
|
10
|
-
dangerBackground: theme.colors.dangerBackground,
|
|
11
6
|
info: theme.colors.info,
|
|
12
|
-
infoBackground: theme.colors.infoBackground,
|
|
13
7
|
success: theme.colors.successDark,
|
|
14
|
-
successBackground: theme.colors.successBackground,
|
|
15
8
|
warning: theme.colors.warningDark,
|
|
16
|
-
|
|
9
|
+
archived: theme.colors.archived,
|
|
10
|
+
text: theme.colors.invertedText,
|
|
17
11
|
};
|
|
18
12
|
|
|
19
|
-
const
|
|
13
|
+
const fonts = {
|
|
20
14
|
default: theme.fonts.semiBold,
|
|
21
15
|
};
|
|
22
16
|
|
|
23
|
-
const
|
|
17
|
+
const fontSizes = {
|
|
24
18
|
default: theme.fontSizes.small,
|
|
25
19
|
};
|
|
26
20
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
const sizes = {
|
|
22
|
+
height: theme.fontSizes.small + theme.space.small,
|
|
23
|
+
minWidth: theme.fontSizes.small + theme.space.small,
|
|
24
|
+
statusHeight: theme.space.small,
|
|
25
|
+
statusWidth: theme.space.small,
|
|
30
26
|
};
|
|
31
27
|
|
|
32
|
-
const
|
|
33
|
-
|
|
28
|
+
const space = {
|
|
29
|
+
horizontalPadding: theme.space.small,
|
|
30
|
+
statusPositionTop: -theme.space.xxsmall,
|
|
31
|
+
statusPositionRight: -theme.space.xxsmall,
|
|
34
32
|
};
|
|
35
33
|
|
|
36
|
-
return {
|
|
34
|
+
return { colors, fonts, fontSizes, sizes, space };
|
|
37
35
|
};
|
|
38
36
|
|
|
39
37
|
export default getBadgeTheme;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getButtonTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const fonts = {
|
|
5
|
+
default: theme.fonts.semiBold,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const fontSize = {
|
|
9
|
+
default: theme.fontSizes.xlarge,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const lineHeight = {
|
|
13
|
+
default: theme.lineHeights.large,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const borderWidth = {
|
|
17
|
+
default: theme.space.xxsmall,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const space = {
|
|
21
|
+
buttonPadding: theme.space.medium,
|
|
22
|
+
iconPadding: theme.space.small,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const sizes = {
|
|
26
|
+
iconSize: theme.fontSizes.xxlarge,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const radii = {
|
|
30
|
+
default: theme.space.xlarge,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const colors = {
|
|
34
|
+
primary: theme.colors.primary,
|
|
35
|
+
pressedPrimary: theme.colors.primaryLight,
|
|
36
|
+
secondary: theme.colors.secondary,
|
|
37
|
+
pressedSecondary: theme.colors.secondaryLight,
|
|
38
|
+
defaultText: theme.colors.text,
|
|
39
|
+
disabledText: theme.colors.disabledLightText,
|
|
40
|
+
disabledBorder: theme.colors.disabledLightText,
|
|
41
|
+
disabledBackground: theme.colors.disabledLightText,
|
|
42
|
+
invertedText: theme.colors.invertedText,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
borderWidth,
|
|
47
|
+
fonts,
|
|
48
|
+
fontSize,
|
|
49
|
+
sizes,
|
|
50
|
+
radii,
|
|
51
|
+
colors,
|
|
52
|
+
lineHeight,
|
|
53
|
+
space,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default getButtonTheme;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getCardTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
dataCardIndicator: theme.colors.primaryDark,
|
|
6
|
+
};
|
|
7
|
+
|
|
2
8
|
const radii = {
|
|
3
9
|
default: 12,
|
|
4
10
|
};
|
|
5
11
|
|
|
6
|
-
return { radii };
|
|
12
|
+
return { colors, radii };
|
|
7
13
|
};
|
|
8
14
|
|
|
9
15
|
export default getCardTheme;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getDrawerTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
shadow: theme.colors.backgroundDark,
|
|
6
|
+
background: theme.colors.platformBackground,
|
|
7
|
+
backdrop: theme.colors.backgroundDark,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const radii = {
|
|
11
|
+
default: 16,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const shadows = {
|
|
15
|
+
offset: { width: 0, height: 3 },
|
|
16
|
+
opacity: 0.27,
|
|
17
|
+
radius: 4.65,
|
|
18
|
+
elevation: 10,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return { colors, radii, shadows };
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default getDrawerTheme;
|
|
@@ -7,6 +7,7 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
headerText: theme.colors.text,
|
|
8
8
|
actionItemBackground: theme.colors.infoLight,
|
|
9
9
|
backdropBackground: theme.colors.platformBackground,
|
|
10
|
+
titleText: theme.colors.invertedText,
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const sizes = {
|
|
@@ -17,17 +18,20 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
17
18
|
const fonts = {
|
|
18
19
|
header: theme.fonts.semiBold,
|
|
19
20
|
actionItemText: theme.fonts.regular,
|
|
21
|
+
title: theme.fonts.semiBold,
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
const fontSizes = {
|
|
23
25
|
header: theme.fontSizes.xxxlarge,
|
|
24
|
-
buttonIcon: theme.fontSizes.xxxlarge,
|
|
25
26
|
actionItemText: theme.fontSizes.medium,
|
|
27
|
+
title: theme.fontSizes.large,
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
const lineHeights = {
|
|
29
31
|
header: theme.lineHeights.xxxlarge,
|
|
30
32
|
actionItemText: theme.lineHeights.medium,
|
|
33
|
+
title: theme.lineHeights.large,
|
|
34
|
+
icon: theme.lineHeights.large,
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
const space = {
|
|
@@ -42,10 +46,13 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
42
46
|
buttonMarginRight: theme.space.large,
|
|
43
47
|
headerTextMarginRight: theme.space.large,
|
|
44
48
|
headerTextMarginBottom: theme.space.large,
|
|
49
|
+
containerPaddingHorizontal: theme.space.medium,
|
|
50
|
+
containerPaddingVertical: theme.space.medium,
|
|
51
|
+
titleMarginHorizontal: theme.space.small,
|
|
45
52
|
};
|
|
46
53
|
|
|
47
54
|
const radii = {
|
|
48
|
-
actionItem:
|
|
55
|
+
actionItem: theme.radii.rounded,
|
|
49
56
|
};
|
|
50
57
|
|
|
51
58
|
return { radii, fonts, fontSizes, colors, sizes, lineHeights, space };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getProgressTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
primary: theme.colors.primary,
|
|
6
|
+
success: theme.colors.success,
|
|
7
|
+
warning: theme.colors.warning,
|
|
8
|
+
danger: theme.colors.danger,
|
|
9
|
+
info: theme.colors.info,
|
|
10
|
+
background: theme.colors.outline,
|
|
11
|
+
innerBackground: theme.colors.platformBackground,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const sizes = {
|
|
15
|
+
radius: theme.space.xxxlarge,
|
|
16
|
+
strokeWidth: theme.space.small,
|
|
17
|
+
barHeight: theme.space.xsmall,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const radii = {
|
|
21
|
+
default: theme.radii.rounded,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return { colors, sizes, radii };
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default getProgressTheme;
|
|
@@ -2,19 +2,34 @@ import { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getTabsTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
active: theme.colors.primary,
|
|
6
|
+
inactive: theme.colors.text,
|
|
7
|
+
activeBackground: theme.colors.primaryBackground,
|
|
8
|
+
headerBottom: theme.colors.outline,
|
|
9
|
+
text: theme.colors.text,
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
const space = {
|
|
11
13
|
flatListHorizontalPadding: theme.space.small,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
itemHorizontalPadding: theme.space.small,
|
|
15
|
+
itemVerticalPadding: theme.space.small,
|
|
16
|
+
outlineHorizontalPadding: theme.space.small,
|
|
17
|
+
outlineVerticalPadding: theme.space.xsmall,
|
|
15
18
|
};
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
const radii = {
|
|
21
|
+
outline: theme.radii.medium,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const borderWidths = {
|
|
25
|
+
headerBottom: theme.borderWidths.base,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const sizes = {
|
|
29
|
+
indicator: theme.space.xxsmall,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return { borderWidths, colors, space, radii, sizes };
|
|
18
33
|
};
|
|
19
34
|
|
|
20
35
|
export default getTabsTheme;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getTagTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const borderWidths = {
|
|
5
|
+
default: theme.borderWidths.base,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const colors = {
|
|
9
|
+
danger: theme.colors.danger,
|
|
10
|
+
dangerBackground: theme.colors.dangerBackground,
|
|
11
|
+
info: theme.colors.info,
|
|
12
|
+
infoBackground: theme.colors.infoBackground,
|
|
13
|
+
success: theme.colors.successDark,
|
|
14
|
+
successBackground: theme.colors.successBackground,
|
|
15
|
+
warning: theme.colors.warningDark,
|
|
16
|
+
warningBackground: theme.colors.warningBackground,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const fonts = {
|
|
20
|
+
default: theme.fonts.semiBold,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const fontSizes = {
|
|
24
|
+
default: theme.fontSizes.small,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const space = {
|
|
28
|
+
horizontalPadding: theme.space.small,
|
|
29
|
+
verticalPadding: theme.space.xxsmall,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const radii = {
|
|
33
|
+
default: theme.radii.base,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return { borderWidths, colors, fonts, fontSizes, space, radii };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default getTagTheme;
|
|
@@ -2,8 +2,20 @@ interface BorderWidths {
|
|
|
2
2
|
base: number;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
interface Radii {
|
|
6
|
+
rounded: number;
|
|
7
|
+
base: number;
|
|
8
|
+
medium: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
const getBorderWidths = (baseBorderWidth: number): BorderWidths => ({
|
|
6
12
|
base: baseBorderWidth,
|
|
7
13
|
});
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
const getRadii = (baseRadius: number): Radii => ({
|
|
16
|
+
rounded: 999,
|
|
17
|
+
base: baseRadius,
|
|
18
|
+
medium: baseRadius * 2,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { BorderWidths, getBorderWidths, Radii, getRadii };
|