@hero-design/rn 7.17.1 → 7.18.1

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 (79) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +3680 -3449
  3. package/lib/index.js +3684 -3451
  4. package/package.json +2 -2
  5. package/src/components/BottomNavigation/index.tsx +1 -1
  6. package/src/components/Button/Button.tsx +1 -0
  7. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
  8. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  9. package/src/components/Button/UtilityButton/{styled.tsx → StyledUtilityButton.tsx} +2 -2
  10. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  11. package/src/components/Button/UtilityButton/index.tsx +5 -1
  12. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +14 -14
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
  15. package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +99 -0
  16. package/src/components/Drawer/DragableDrawer/__tests__/helpers.spec.ts +39 -0
  17. package/src/components/Drawer/DragableDrawer/__tests__/index.spec.tsx +24 -0
  18. package/src/components/Drawer/DragableDrawer/helpers.ts +43 -0
  19. package/src/components/Drawer/DragableDrawer/index.tsx +205 -0
  20. package/src/components/Drawer/StyledDrawer.tsx +70 -26
  21. package/src/components/Drawer/index.tsx +4 -1
  22. package/src/components/Empty/StyledEmpty.tsx +4 -3
  23. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  24. package/src/components/Empty/index.tsx +2 -2
  25. package/src/components/FAB/ActionGroup/index.tsx +1 -1
  26. package/src/components/List/ListItem.tsx +1 -1
  27. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -0
  28. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  29. package/src/components/Select/MultiSelect/index.tsx +1 -4
  30. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  31. package/src/components/Select/SingleSelect/index.tsx +2 -6
  32. package/src/components/Tabs/ScrollableTabs.tsx +1 -1
  33. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +8 -0
  34. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +79 -0
  35. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +79 -0
  36. package/src/components/Tabs/__tests__/index.spec.tsx +8 -0
  37. package/src/components/Tabs/index.tsx +8 -3
  38. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
  39. package/src/components/TextInput/StyledTextInput.tsx +1 -0
  40. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
  41. package/src/components/TextInput/index.tsx +2 -2
  42. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
  43. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  44. package/src/index.ts +9 -1
  45. package/src/theme/ThemeProvider.ts +19 -0
  46. package/src/theme/ThemeSwitcher.tsx +27 -0
  47. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +25 -12
  48. package/src/theme/components/button.ts +9 -8
  49. package/src/theme/components/drawer.ts +14 -2
  50. package/src/theme/components/empty.ts +3 -2
  51. package/src/theme/getTheme.ts +129 -0
  52. package/src/theme/global/{colors.ts → colors/swag.ts} +8 -5
  53. package/src/theme/global/colors/types.ts +45 -0
  54. package/src/theme/global/colors/work.ts +14 -0
  55. package/src/theme/global/index.ts +6 -2
  56. package/src/theme/index.ts +16 -143
  57. package/src/utils/scale.ts +4 -1
  58. package/types/components/Button/Button.d.ts +1 -0
  59. package/types/components/Button/UtilityButton/{styled.d.ts → StyledUtilityButton.d.ts} +0 -0
  60. package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +1 -0
  61. package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +1 -0
  62. package/types/components/Drawer/DragableDrawer/helpers.d.ts +8 -0
  63. package/types/components/Drawer/DragableDrawer/index.d.ts +33 -0
  64. package/types/components/Drawer/StyledDrawer.d.ts +34 -4
  65. package/types/components/Drawer/index.d.ts +4 -2
  66. package/types/components/Empty/index.d.ts +1 -1
  67. package/types/components/Icon/utils.d.ts +1 -1
  68. package/types/index.d.ts +2 -2
  69. package/types/theme/ThemeProvider.d.ts +12 -0
  70. package/types/theme/ThemeSwitcher.d.ts +7 -0
  71. package/types/theme/components/button.d.ts +1 -1
  72. package/types/theme/components/drawer.d.ts +9 -0
  73. package/types/theme/components/empty.d.ts +3 -2
  74. package/types/theme/getTheme.d.ts +74 -0
  75. package/types/theme/global/colors/swag.d.ts +3 -0
  76. package/types/theme/global/{colors.d.ts → colors/types.d.ts} +4 -3
  77. package/types/theme/global/colors/work.d.ts +3 -0
  78. package/types/theme/global/index.d.ts +7 -2
  79. package/types/theme/index.d.ts +7 -84
@@ -12,6 +12,85 @@ exports[`Tabs renders correctly 1`] = `
12
12
  ]
13
13
  }
14
14
  >
15
+ <View
16
+ accessible={true}
17
+ collapsable={false}
18
+ focusable={true}
19
+ nativeID="animatedComponent"
20
+ onClick={[Function]}
21
+ onResponderGrant={[Function]}
22
+ onResponderMove={[Function]}
23
+ onResponderRelease={[Function]}
24
+ onResponderTerminate={[Function]}
25
+ onResponderTerminationRequest={[Function]}
26
+ onStartShouldSetResponder={[Function]}
27
+ style={
28
+ Object {
29
+ "alignItems": "center",
30
+ "backgroundColor": "#f6f6f7",
31
+ "borderRadius": 8,
32
+ "flexDirection": "row",
33
+ "justifyContent": "center",
34
+ "opacity": 1,
35
+ "padding": 8,
36
+ "width": "100%",
37
+ }
38
+ }
39
+ >
40
+ <View
41
+ style={
42
+ Array [
43
+ Object {
44
+ "paddingRight": 12,
45
+ },
46
+ undefined,
47
+ ]
48
+ }
49
+ >
50
+ <HeroIcon
51
+ name="sync"
52
+ style={
53
+ Array [
54
+ Object {
55
+ "color": "#001f23",
56
+ "fontSize": 24,
57
+ },
58
+ undefined,
59
+ ]
60
+ }
61
+ testID="undefined-icon"
62
+ themeIntent="text"
63
+ themeSize="medium"
64
+ />
65
+ </View>
66
+ <Text
67
+ style={
68
+ Array [
69
+ Object {
70
+ "color": "#001f23",
71
+ "fontFamily": "BeVietnamPro-Regular",
72
+ "fontSize": 14,
73
+ "letterSpacing": 0.42,
74
+ "lineHeight": 22,
75
+ },
76
+ Array [
77
+ Object {
78
+ "flexShrink": 1,
79
+ "fontFamily": "BeVietnamPro-Regular",
80
+ "fontSize": 16,
81
+ "textAlign": "center",
82
+ },
83
+ undefined,
84
+ ],
85
+ ]
86
+ }
87
+ themeFontSize="medium"
88
+ themeFontWeight="regular"
89
+ themeIntent="body"
90
+ >
91
+ Move to Work
92
+ </Text>
93
+ </View>
15
94
  <View
16
95
  style={
17
96
  Array [
@@ -4,6 +4,7 @@ import { fireEvent } from '@testing-library/react-native';
4
4
  import { SafeAreaProvider } from 'react-native-safe-area-context';
5
5
  import renderWithTheme from '../../../testHelpers/renderWithTheme';
6
6
  import Tabs, { TabType } from '..';
7
+ import Button from '../../Button';
7
8
 
8
9
  const TestTabsComponent = (
9
10
  props: Omit<
@@ -38,6 +39,11 @@ const TestTabsComponent = (
38
39
  insets: { top: 0, left: 0, right: 0, bottom: 0 },
39
40
  }}
40
41
  >
42
+ <Button.Utility
43
+ text="Move to Work"
44
+ onPress={() => setSelectedTabKey('work')}
45
+ icon="sync"
46
+ />
41
47
  <Tabs
42
48
  {...props}
43
49
  tabs={tabs}
@@ -61,6 +67,8 @@ describe('Tabs', () => {
61
67
  expect(getByText('Personal Screen')).toBeDefined();
62
68
  fireEvent.press(getByText('Home'));
63
69
  expect(getByText('Home Screen')).toBeDefined();
70
+ fireEvent.press(getByText('Move to Work'));
71
+ expect(getByText('Work Screen')).toBeDefined();
64
72
  });
65
73
 
66
74
  it('renders correctly with lazy preloaded', () => {
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ReactNode, useEffect } from 'react';
2
2
  import {
3
3
  Animated,
4
4
  TouchableWithoutFeedback,
@@ -118,6 +118,12 @@ const Tabs = ({
118
118
  const positionAnimatedValue = React.useRef(new Animated.Value(0)).current;
119
119
  const [tabsWidth, setTabsWidth] = React.useState<number>(0);
120
120
 
121
+ useEffect(() => {
122
+ if (selectedTabIndex !== -1) {
123
+ pagerViewRef.current?.setPage(selectedTabIndex);
124
+ }
125
+ }, [selectedTabIndex]);
126
+
121
127
  return (
122
128
  <TabContainer style={containerStyle}>
123
129
  <HeaderTabWrapper themeInsets={insets} style={barStyle}>
@@ -130,7 +136,7 @@ const Tabs = ({
130
136
  }
131
137
  }}
132
138
  >
133
- {tabs.map((tab, index) => {
139
+ {tabs.map(tab => {
134
140
  const {
135
141
  key,
136
142
  testID,
@@ -152,7 +158,6 @@ const Tabs = ({
152
158
  key={key}
153
159
  onPress={() => {
154
160
  onTabPress(key);
155
- pagerViewRef.current?.setPage(index);
156
161
  }}
157
162
  testID={testID}
158
163
  >
@@ -5,7 +5,7 @@ exports[`Tag has archived style when intent is archived 1`] = `
5
5
  style={
6
6
  Array [
7
7
  Object {
8
- "backgroundColor": "#f1f2f3",
8
+ "backgroundColor": "#f6f6f7",
9
9
  "borderColor": "#737479",
10
10
  "borderRadius": 4,
11
11
  "borderWidth": 1,
@@ -122,6 +122,7 @@ const StyledTextInputAndLabelContainer = styled(View)(() => ({
122
122
  alignItems: 'center',
123
123
  alignSelf: 'stretch',
124
124
  flexGrow: 2,
125
+ flexShrink: 1,
125
126
  }));
126
127
 
127
128
  const StyledErrorAndHelpTextContainer = styled(View)(({ theme }) => ({
@@ -135,6 +135,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
135
135
  "alignSelf": "stretch",
136
136
  "flexDirection": "row",
137
137
  "flexGrow": 2,
138
+ "flexShrink": 1,
138
139
  },
139
140
  undefined,
140
141
  ]
@@ -388,6 +389,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
388
389
  "alignSelf": "stretch",
389
390
  "flexDirection": "row",
390
391
  "flexGrow": 2,
392
+ "flexShrink": 1,
391
393
  },
392
394
  undefined,
393
395
  ]
@@ -628,6 +630,7 @@ exports[`TextInput disabled renders correctly 1`] = `
628
630
  "alignSelf": "stretch",
629
631
  "flexDirection": "row",
630
632
  "flexGrow": 2,
633
+ "flexShrink": 1,
631
634
  },
632
635
  undefined,
633
636
  ]
@@ -753,6 +756,7 @@ exports[`TextInput error renders correctly 1`] = `
753
756
  "alignSelf": "stretch",
754
757
  "flexDirection": "row",
755
758
  "flexGrow": 2,
759
+ "flexShrink": 1,
756
760
  },
757
761
  undefined,
758
762
  ]
@@ -1054,6 +1058,7 @@ exports[`TextInput filled renders correctly 1`] = `
1054
1058
  "alignSelf": "stretch",
1055
1059
  "flexDirection": "row",
1056
1060
  "flexGrow": 2,
1061
+ "flexShrink": 1,
1057
1062
  },
1058
1063
  undefined,
1059
1064
  ]
@@ -1194,6 +1199,7 @@ exports[`TextInput helper text renders correctly 1`] = `
1194
1199
  "alignSelf": "stretch",
1195
1200
  "flexDirection": "row",
1196
1201
  "flexGrow": 2,
1202
+ "flexShrink": 1,
1197
1203
  },
1198
1204
  undefined,
1199
1205
  ]
@@ -1418,6 +1424,7 @@ exports[`TextInput idle renders correctly 1`] = `
1418
1424
  "alignSelf": "stretch",
1419
1425
  "flexDirection": "row",
1420
1426
  "flexGrow": 2,
1427
+ "flexShrink": 1,
1421
1428
  },
1422
1429
  undefined,
1423
1430
  ]
@@ -1606,6 +1613,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
1606
1613
  "alignSelf": "stretch",
1607
1614
  "flexDirection": "row",
1608
1615
  "flexGrow": 2,
1616
+ "flexShrink": 1,
1609
1617
  },
1610
1618
  undefined,
1611
1619
  ]
@@ -1805,6 +1813,7 @@ exports[`TextInput loading renders correctly 1`] = `
1805
1813
  "alignSelf": "stretch",
1806
1814
  "flexDirection": "row",
1807
1815
  "flexGrow": 2,
1816
+ "flexShrink": 1,
1808
1817
  },
1809
1818
  undefined,
1810
1819
  ]
@@ -2030,6 +2039,7 @@ exports[`TextInput max length renders correctly 1`] = `
2030
2039
  "alignSelf": "stretch",
2031
2040
  "flexDirection": "row",
2032
2041
  "flexGrow": 2,
2042
+ "flexShrink": 1,
2033
2043
  },
2034
2044
  undefined,
2035
2045
  ]
@@ -2248,6 +2258,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
2248
2258
  "alignSelf": "stretch",
2249
2259
  "flexDirection": "row",
2250
2260
  "flexGrow": 2,
2261
+ "flexShrink": 1,
2251
2262
  },
2252
2263
  undefined,
2253
2264
  ]
@@ -2540,6 +2551,7 @@ exports[`TextInput readonly renders correctly 1`] = `
2540
2551
  "alignSelf": "stretch",
2541
2552
  "flexDirection": "row",
2542
2553
  "flexGrow": 2,
2554
+ "flexShrink": 1,
2543
2555
  },
2544
2556
  undefined,
2545
2557
  ]
@@ -2680,6 +2692,7 @@ exports[`TextInput required renders correctly 1`] = `
2680
2692
  "alignSelf": "stretch",
2681
2693
  "flexDirection": "row",
2682
2694
  "flexGrow": 2,
2695
+ "flexShrink": 1,
2683
2696
  },
2684
2697
  undefined,
2685
2698
  ]
@@ -273,7 +273,7 @@ const TextInput = ({
273
273
  </StyledTextInputContainer>
274
274
  <StyledErrorAndHelpTextContainer>
275
275
  <StyledErrorAndMaxLengthContainer>
276
- {error && (
276
+ {!!error && (
277
277
  <StyledErrorContainer>
278
278
  <Icon
279
279
  testID="input-error-icon"
@@ -291,7 +291,7 @@ const TextInput = ({
291
291
  </StyledMaxLengthMessage>
292
292
  )}
293
293
  </StyledErrorAndMaxLengthContainer>
294
- {helpText && <StyledHelperText>{helpText}</StyledHelperText>}
294
+ {!!helpText && <StyledHelperText>{helpText}</StyledHelperText>}
295
295
  </StyledErrorAndHelpTextContainer>
296
296
  </StyledContainer>
297
297
  );
@@ -115,6 +115,7 @@ exports[`TimePickerAndroid renders correctly 1`] = `
115
115
  "alignSelf": "stretch",
116
116
  "flexDirection": "row",
117
117
  "flexGrow": 2,
118
+ "flexShrink": 1,
118
119
  },
119
120
  undefined,
120
121
  ]
@@ -115,6 +115,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
115
115
  "alignSelf": "stretch",
116
116
  "flexDirection": "row",
117
117
  "flexGrow": 2,
118
+ "flexShrink": 1,
118
119
  },
119
120
  undefined,
120
121
  ]
package/src/index.ts CHANGED
@@ -1,4 +1,10 @@
1
- import theme, { getTheme, ThemeProvider, useTheme } from './theme';
1
+ import theme, {
2
+ getTheme,
3
+ ThemeProvider,
4
+ useTheme,
5
+ swagSystemPalette,
6
+ workSystemPalette,
7
+ } from './theme';
2
8
  import { scale } from './utils/scale';
3
9
 
4
10
  import Accordion from './components/Accordion';
@@ -42,6 +48,8 @@ export {
42
48
  useTheme,
43
49
  scale,
44
50
  ThemeProvider,
51
+ swagSystemPalette,
52
+ workSystemPalette,
45
53
  Accordion,
46
54
  Alert,
47
55
  Avatar,
@@ -0,0 +1,19 @@
1
+ import * as Emotion from '@emotion/react';
2
+ import { Theme } from './getTheme';
3
+
4
+ export interface ThemeProviderProps {
5
+ theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
6
+ children: React.ReactNode;
7
+ }
8
+
9
+ interface ThemeProviderType {
10
+ (props: ThemeProviderProps): React.ReactElement;
11
+ }
12
+
13
+ const ThemeProvider = Emotion.ThemeProvider as ThemeProviderType;
14
+
15
+ const useTheme = Emotion.useTheme as () => Theme;
16
+
17
+ export { useTheme };
18
+
19
+ export default ThemeProvider;
@@ -0,0 +1,27 @@
1
+ import React, { useMemo } from 'react';
2
+
3
+ import getTheme from './getTheme';
4
+ import { defaultScale, swagSystemPalette, workSystemPalette } from './global';
5
+ import ThemeProvider from './ThemeProvider';
6
+
7
+ type ThemeName = 'swag' | 'work';
8
+
9
+ const ThemeSwitcher = ({
10
+ name = 'swag',
11
+ children,
12
+ }: {
13
+ name?: ThemeName;
14
+ children: React.ReactNode;
15
+ }) => {
16
+ const theme = useMemo(() => {
17
+ switch (name) {
18
+ case 'swag':
19
+ return getTheme(defaultScale, swagSystemPalette);
20
+ case 'work':
21
+ return getTheme(defaultScale, workSystemPalette);
22
+ }
23
+ }, [name]);
24
+ return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
25
+ };
26
+
27
+ export default ThemeSwitcher;
@@ -158,20 +158,20 @@ Object {
158
158
  "disabledText": "#bfc1c5",
159
159
  "invertedText": "#ffffff",
160
160
  "pressedDanger": "#f46363",
161
- "pressedPrimary": "#c282d1",
161
+ "pressedPrimary": "#808f91",
162
162
  "pressedSecondary": "#b5c3fd",
163
- "primary": "#8505a2",
163
+ "primary": "#001f23",
164
164
  "secondary": "#4568fb",
165
165
  "underlayColors": Object {
166
- "basic-transparent": "#c282d1",
166
+ "basic-transparent": "#808f91",
167
167
  "filled-danger": "#f46363",
168
- "filled-primary": "#c282d1",
168
+ "filled-primary": "#808f91",
169
169
  "filled-secondary": "#b5c3fd",
170
170
  "outlined-danger": "#fcebe7",
171
- "outlined-primary": "#f3e6f6",
171
+ "outlined-primary": "#e6e9e9",
172
172
  "outlined-secondary": "#ecf0ff",
173
173
  "text-danger": "#fcebe7",
174
- "text-primary": "#f3e6f6",
174
+ "text-primary": "#e6e9e9",
175
175
  "text-secondary": "#ecf0ff",
176
176
  },
177
177
  "utilityBackground": "#f6f6f7",
@@ -183,6 +183,7 @@ Object {
183
183
  },
184
184
  "fonts": Object {
185
185
  "default": "BeVietnamPro-SemiBold",
186
+ "utility": "BeVietnamPro-Regular",
186
187
  },
187
188
  "lineHeight": Object {
188
189
  "default": 24,
@@ -196,8 +197,7 @@ Object {
196
197
  },
197
198
  "space": Object {
198
199
  "buttonPadding": 16,
199
- "iconPadding": 8,
200
- "utilityIconPadding": 12,
200
+ "iconPadding": 12,
201
201
  "utilityPadding": 8,
202
202
  },
203
203
  },
@@ -291,10 +291,12 @@ Object {
291
291
  "colors": Object {
292
292
  "backdrop": "#001f23",
293
293
  "background": "#ffffff",
294
+ "handler": "#001f23",
294
295
  "shadow": "#001f23",
295
296
  },
296
297
  "radii": Object {
297
298
  "default": 16,
299
+ "handler": 4,
298
300
  },
299
301
  "shadows": Object {
300
302
  "elevation": 10,
@@ -305,6 +307,13 @@ Object {
305
307
  "opacity": 0.27,
306
308
  "radius": 4.65,
307
309
  },
310
+ "sizes": Object {
311
+ "handlerHeight": 4,
312
+ "handlerWidth": 56,
313
+ },
314
+ "space": Object {
315
+ "handlerPaddingVertical": 8,
316
+ },
308
317
  },
309
318
  "empty": Object {
310
319
  "colors": Object {
@@ -328,8 +337,9 @@ Object {
328
337
  "illustration": 168,
329
338
  },
330
339
  "space": Object {
331
- "large": 24,
332
- "medium": 16,
340
+ "illustrationMargin": 24,
341
+ "titleMargin": 16,
342
+ "wrapperPadding": 16,
333
343
  },
334
344
  },
335
345
  "fab": Object {
@@ -640,7 +650,7 @@ Object {
640
650
  },
641
651
  "colors": Object {
642
652
  "archived": "#737479",
643
- "archivedBackground": "#f1f2f3",
653
+ "archivedBackground": "#f6f6f7",
644
654
  "danger": "#de350b",
645
655
  "dangerBackground": "#fcebe7",
646
656
  "default": "#001f23",
@@ -833,7 +843,7 @@ Object {
833
843
  },
834
844
  "colors": Object {
835
845
  "archived": "#ccced1",
836
- "archivedBackground": "#f1f2f3",
846
+ "archivedBackground": "#f6f6f7",
837
847
  "archivedDark": "#737479",
838
848
  "archivedLight": "#bfc1c5",
839
849
  "backgroundDark": "#001f23",
@@ -845,6 +855,9 @@ Object {
845
855
  "dangerMediumLight": "#e3602a",
846
856
  "disabledLightText": "#bfc1c5",
847
857
  "disabledText": "#808f91",
858
+ "globalPrimary": "#001f23",
859
+ "globalPrimaryBackground": "#e6e9e9",
860
+ "globalPrimaryLight": "#808f91",
848
861
  "inactiveBackground": "#808f91",
849
862
  "info": "#4568fb",
850
863
  "infoBackground": "#ecf0ff",
@@ -3,6 +3,7 @@ import { GlobalTheme } from '../global';
3
3
  const getButtonTheme = (theme: GlobalTheme) => {
4
4
  const fonts = {
5
5
  default: theme.fonts.semiBold,
6
+ utility: theme.fonts.regular,
6
7
  };
7
8
 
8
9
  const fontSize = {
@@ -21,9 +22,8 @@ const getButtonTheme = (theme: GlobalTheme) => {
21
22
 
22
23
  const space = {
23
24
  buttonPadding: theme.space.medium,
24
- iconPadding: theme.space.small,
25
+ iconPadding: theme.space.smallMedium,
25
26
  utilityPadding: theme.space.small,
26
- utilityIconPadding: theme.space.smallMedium,
27
27
  };
28
28
 
29
29
  const sizes = {
@@ -36,8 +36,8 @@ const getButtonTheme = (theme: GlobalTheme) => {
36
36
  };
37
37
 
38
38
  const colors = {
39
- primary: theme.colors.primary,
40
- pressedPrimary: theme.colors.primaryLight,
39
+ primary: theme.colors.globalPrimary,
40
+ pressedPrimary: theme.colors.globalPrimaryLight,
41
41
  secondary: theme.colors.secondary,
42
42
  pressedSecondary: theme.colors.secondaryLight,
43
43
  danger: theme.colors.danger,
@@ -49,16 +49,17 @@ const getButtonTheme = (theme: GlobalTheme) => {
49
49
  invertedText: theme.colors.invertedText,
50
50
  utilityBackground: theme.colors.backgroundLight,
51
51
  underlayColors: {
52
- 'filled-primary': theme.colors.primaryLight,
52
+ 'filled-primary': theme.colors.globalPrimaryLight,
53
53
  'filled-secondary': theme.colors.secondaryLight,
54
54
  'filled-danger': theme.colors.dangerLight,
55
- 'outlined-primary': theme.colors.primaryBackground,
55
+ 'outlined-primary': theme.colors.globalPrimaryBackground,
56
56
  'outlined-secondary': theme.colors.secondaryBackground,
57
+
57
58
  'outlined-danger': theme.colors.dangerBackground,
58
- 'text-primary': theme.colors.primaryBackground,
59
+ 'text-primary': theme.colors.globalPrimaryBackground,
59
60
  'text-secondary': theme.colors.secondaryBackground,
60
61
  'text-danger': theme.colors.dangerBackground,
61
- 'basic-transparent': theme.colors.primaryLight,
62
+ 'basic-transparent': theme.colors.globalPrimaryLight,
62
63
  },
63
64
  };
64
65
 
@@ -1,14 +1,26 @@
1
1
  import { GlobalTheme } from '../global';
2
+ import { scale } from '../../utils/scale';
2
3
 
3
4
  const getDrawerTheme = (theme: GlobalTheme) => {
4
5
  const colors = {
5
6
  shadow: theme.colors.backgroundDark,
6
7
  background: theme.colors.platformBackground,
7
8
  backdrop: theme.colors.backgroundDark,
9
+ handler: theme.colors.backgroundDark,
8
10
  };
9
11
 
10
12
  const radii = {
11
- default: 16,
13
+ default: theme.radii.xlarge,
14
+ handler: theme.radii.base,
15
+ };
16
+
17
+ const space = {
18
+ handlerPaddingVertical: theme.space.small,
19
+ };
20
+
21
+ const sizes = {
22
+ handlerWidth: scale(56),
23
+ handlerHeight: scale(4),
12
24
  };
13
25
 
14
26
  const shadows = {
@@ -18,7 +30,7 @@ const getDrawerTheme = (theme: GlobalTheme) => {
18
30
  elevation: 10,
19
31
  };
20
32
 
21
- return { colors, radii, shadows };
33
+ return { colors, radii, shadows, space, sizes };
22
34
  };
23
35
 
24
36
  export default getDrawerTheme;
@@ -3,8 +3,9 @@ import { GlobalTheme } from '../global';
3
3
 
4
4
  const getEmptyTheme = (theme: GlobalTheme) => {
5
5
  const space = {
6
- medium: theme.space.medium,
7
- large: theme.space.large,
6
+ titleMargin: theme.space.medium,
7
+ illustrationMargin: theme.space.large,
8
+ wrapperPadding: theme.space.medium,
8
9
  };
9
10
 
10
11
  const sizes = {