@hero-design/rn 8.0.0-4 → 8.0.0-5

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 (76) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +378 -552
  4. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  5. package/lib/index.js +378 -552
  6. package/package.json +5 -5
  7. package/src/components/Alert/StyledAlert.tsx +2 -3
  8. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +6 -12
  9. package/src/components/Alert/index.tsx +3 -23
  10. package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +4 -26
  11. package/src/components/Button/Button.tsx +7 -16
  12. package/src/components/Button/StyledButton.tsx +0 -46
  13. package/src/components/Button/__tests__/Button.spec.tsx +10 -11
  14. package/src/components/Button/__tests__/StyledButton.spec.tsx +0 -3
  15. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -91
  16. package/src/components/Card/StyledCard.tsx +2 -11
  17. package/src/components/Card/__tests__/StyledCard.spec.tsx +2 -14
  18. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -32
  19. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  20. package/src/components/Card/__tests__/index.spec.tsx +1 -13
  21. package/src/components/Card/index.tsx +5 -26
  22. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  23. package/src/components/Icon/IconList.ts +0 -8
  24. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +5 -7
  25. package/src/components/Select/MultiSelect/index.tsx +1 -20
  26. package/src/components/Select/SingleSelect/index.tsx +5 -24
  27. package/src/components/Select/types.ts +1 -11
  28. package/src/components/Switch/StyledSwitch.tsx +7 -12
  29. package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +2 -2
  30. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +10 -15
  31. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +8 -12
  32. package/src/components/Switch/index.tsx +6 -22
  33. package/src/components/Tabs/ScrollableTabs.tsx +1 -6
  34. package/src/components/Tabs/TabWithBadge.tsx +1 -15
  35. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +3 -1
  36. package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +4 -1
  37. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +4 -3
  38. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +2 -32
  39. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1 -2
  40. package/src/components/Tabs/__tests__/index.spec.tsx +3 -1
  41. package/src/components/Tabs/index.tsx +12 -24
  42. package/src/components/Tag/StyledTag.tsx +0 -1
  43. package/src/components/Tag/__tests__/Tag.spec.tsx +0 -9
  44. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +0 -40
  45. package/src/components/Tag/index.tsx +3 -16
  46. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -63
  47. package/src/theme/components/switch.ts +4 -14
  48. package/src/theme/components/tag.ts +0 -2
  49. package/src/theme/global/colors/swag.ts +1 -20
  50. package/src/theme/global/colors/types.ts +1 -58
  51. package/src/utils/hooks.ts +1 -1
  52. package/types/components/Alert/StyledAlert.d.ts +0 -1
  53. package/types/components/Alert/index.d.ts +1 -6
  54. package/types/components/Button/Button.d.ts +2 -3
  55. package/types/components/Button/StyledButton.d.ts +1 -1
  56. package/types/components/Card/StyledCard.d.ts +1 -8
  57. package/types/components/Card/index.d.ts +2 -8
  58. package/types/components/Icon/IconList.d.ts +1 -1
  59. package/types/components/Icon/index.d.ts +1 -1
  60. package/types/components/Icon/utils.d.ts +1 -1
  61. package/types/components/Select/MultiSelect/index.d.ts +1 -1
  62. package/types/components/Select/SingleSelect/index.d.ts +1 -1
  63. package/types/components/Select/index.d.ts +1 -1
  64. package/types/components/Select/types.d.ts +1 -11
  65. package/types/components/Switch/StyledSwitch.d.ts +0 -4
  66. package/types/components/Switch/index.d.ts +1 -6
  67. package/types/components/Tabs/TabWithBadge.d.ts +1 -2
  68. package/types/components/Tabs/index.d.ts +2 -3
  69. package/types/components/Tag/StyledTag.d.ts +1 -1
  70. package/types/components/Tag/index.d.ts +2 -2
  71. package/types/theme/components/switch.d.ts +4 -14
  72. package/types/theme/components/tag.d.ts +0 -2
  73. package/types/theme/global/colors/types.d.ts +1 -52
  74. package/types/theme/global/index.d.ts +0 -47
  75. package/src/theme/__tests__/ensureCompatibleWithV7.spec.tsx +0 -13
  76. package/src/theme/global/colors/legacySystemPalette.ts +0 -53
@@ -1,13 +1,12 @@
1
1
  import { useTheme } from '@emotion/react';
2
- import React, { useState, useEffect } from 'react';
2
+ import React, { useEffect, useState } from 'react';
3
3
 
4
4
  import { Animated, Easing, TouchableWithoutFeedback } from 'react-native';
5
5
 
6
6
  import type { ReactElement } from 'react';
7
7
  import type { StyleProp, ViewStyle } from 'react-native';
8
- import { StyledKnot, StyledWrapper, Variant } from './StyledSwitch';
9
8
  import SelectorSwitch from './SelectorSwitch';
10
- import { useDeprecation } from '../../utils/hooks';
9
+ import { StyledKnot, StyledWrapper, Variant } from './StyledSwitch';
11
10
 
12
11
  export interface SwitchProps {
13
12
  /**
@@ -22,11 +21,6 @@ export interface SwitchProps {
22
21
  * Event handler.
23
22
  */
24
23
  onPress?: () => void;
25
- /**
26
- * Size of the switch
27
- * size is deprecated and will be removed in the next major release.
28
- */
29
- size?: 'small' | 'medium';
30
24
  /**
31
25
  * Additional style.
32
26
  */
@@ -51,28 +45,18 @@ const getVariant = ({
51
45
  };
52
46
 
53
47
  const Switch = ({
54
- size: _size,
55
48
  disabled = false,
56
49
  checked = false,
57
50
  onPress,
58
51
  style,
59
52
  testID,
60
53
  }: SwitchProps): ReactElement => {
61
- const size: SwitchProps['size'] = _size === undefined ? 'medium' : _size;
62
-
63
54
  const theme = useTheme();
64
55
  const variant = getVariant({ disabled, checked });
65
56
 
66
- useDeprecation(
67
- "Switch's size prop will be removed in the next major release.",
68
- _size !== undefined
69
- );
70
-
71
57
  const offset = checked
72
- ? (theme.__hd__.switch.sizes.widths[size] -
73
- theme.__hd__.switch.sizes.thumbs[size]) /
74
- 2 +
75
- theme.__hd__.switch.sizes.thumbs[size] / 2
58
+ ? (theme.__hd__.switch.sizes.width - theme.__hd__.switch.sizes.thumb) / 2 +
59
+ theme.__hd__.switch.sizes.thumb / 2
76
60
  : 0;
77
61
 
78
62
  const [animatedOffset] = useState(() => new Animated.Value(offset));
@@ -90,8 +74,8 @@ const Switch = ({
90
74
  onPress={onPress}
91
75
  disabled={disabled}
92
76
  >
93
- <StyledWrapper themeVariant={variant} themeSize={size} style={style}>
94
- <StyledKnot themeSize={size} style={{ left: animatedOffset }} />
77
+ <StyledWrapper themeVariant={variant} style={style}>
78
+ <StyledKnot style={{ left: animatedOffset }} />
95
79
  </StyledWrapper>
96
80
  </TouchableWithoutFeedback>
97
81
  );
@@ -130,7 +130,6 @@ const ScrollableTab = ({
130
130
  testID,
131
131
  activeItem,
132
132
  inactiveItem: originalInactiveItem,
133
- showBadge,
134
133
  badge,
135
134
  } = tab;
136
135
  const active = selectedTabKey === key;
@@ -174,11 +173,7 @@ const ScrollableTab = ({
174
173
  />
175
174
  </HeaderTabItemOutlineWrapper>
176
175
  <HeaderTabItemWrapper>
177
- <TabWithBadge
178
- showBadge={showBadge}
179
- config={badge}
180
- tabItem={tabItem}
181
- />
176
+ <TabWithBadge config={badge} tabItem={tabItem} />
182
177
  </HeaderTabItemWrapper>
183
178
  </HeaderTabItem>
184
179
  </TouchableWithoutFeedback>
@@ -17,27 +17,13 @@ export type CounterBadgeType = {
17
17
  export type BadgeConfigType = StatusBadgeType | CounterBadgeType;
18
18
 
19
19
  interface TabWithBadgeProps {
20
- showBadge?: boolean;
21
20
  config?: BadgeConfigType;
22
21
  tabItem: ReactNode;
23
22
  }
24
23
 
25
- const TabWithBadge = ({ showBadge, config, tabItem }: TabWithBadgeProps) => {
24
+ const TabWithBadge = ({ config, tabItem }: TabWithBadgeProps) => {
26
25
  const theme = useTheme();
27
26
 
28
- // Deprecated. To be removed.
29
- if (showBadge !== undefined) {
30
- return (
31
- <Badge.Status
32
- testID="deprecated-badge"
33
- visible={showBadge}
34
- style={{ paddingHorizontal: theme.space.small }}
35
- >
36
- {tabItem}
37
- </Badge.Status>
38
- );
39
- }
40
-
41
27
  if (!config) return <View>{tabItem}</View>;
42
28
 
43
29
  if (config.type === 'status') {
@@ -32,7 +32,9 @@ const TestTabsComponent = (
32
32
  activeItem: 'home',
33
33
  inactiveItem: 'home-outlined',
34
34
  component: <Text>Home Screen</Text>,
35
- showBadge: true,
35
+ badge: {
36
+ type: 'status',
37
+ },
36
38
  },
37
39
  {
38
40
  key: 'calendar',
@@ -18,7 +18,10 @@ describe('TabWithBadge', () => {
18
18
  ${false}
19
19
  `('renders correctly when showBadge prop is available', ({ showBadge }) => {
20
20
  const { toJSON } = renderWithTheme(
21
- <TabWithBadge showBadge={showBadge} tabItem="Tab Item" />
21
+ <TabWithBadge
22
+ config={showBadge ? { type: 'status' } : undefined}
23
+ tabItem="Tab Item"
24
+ />
22
25
  );
23
26
 
24
27
  expect(toJSON()).toMatchSnapshot();
@@ -148,12 +148,14 @@ exports[`Tabs.Scroll renders correctly 1`] = `
148
148
  },
149
149
  Object {
150
150
  "activeItem": "home",
151
+ "badge": Object {
152
+ "type": "status",
153
+ },
151
154
  "component": <Text>
152
155
  Home Screen
153
156
  </Text>,
154
157
  "inactiveItem": "home-outlined",
155
158
  "key": "home",
156
- "showBadge": true,
157
159
  },
158
160
  Object {
159
161
  "activeItem": "calendar",
@@ -467,10 +469,9 @@ exports[`Tabs.Scroll renders correctly 1`] = `
467
469
  <View
468
470
  style={
469
471
  Object {
470
- "paddingHorizontal": 8,
472
+ "paddingHorizontal": 4,
471
473
  }
472
474
  }
473
- testID="deprecated-badge"
474
475
  >
475
476
  <HeroIcon
476
477
  name="home-outlined"
@@ -4,10 +4,9 @@ exports[`TabWithBadge renders correctly when showBadge prop is available 1`] = `
4
4
  <View
5
5
  style={
6
6
  Object {
7
- "paddingHorizontal": 8,
7
+ "paddingHorizontal": 4,
8
8
  }
9
9
  }
10
- testID="deprecated-badge"
11
10
  >
12
11
  Tab Item
13
12
  <View
@@ -36,37 +35,8 @@ exports[`TabWithBadge renders correctly when showBadge prop is available 1`] = `
36
35
  `;
37
36
 
38
37
  exports[`TabWithBadge renders correctly when showBadge prop is available 2`] = `
39
- <View
40
- style={
41
- Object {
42
- "paddingHorizontal": 8,
43
- }
44
- }
45
- testID="deprecated-badge"
46
- >
38
+ <View>
47
39
  Tab Item
48
- <View
49
- collapsable={false}
50
- nativeID="animatedComponent"
51
- style={
52
- Object {
53
- "backgroundColor": "#de350b",
54
- "borderRadius": 999,
55
- "height": 8,
56
- "opacity": 0,
57
- "position": "absolute",
58
- "right": -2,
59
- "top": -2,
60
- "transform": Array [
61
- Object {
62
- "scale": 0.5,
63
- },
64
- ],
65
- "width": 8,
66
- }
67
- }
68
- themeIntent="danger"
69
- />
70
40
  </View>
71
41
  `;
72
42
 
@@ -253,10 +253,9 @@ exports[`Tabs renders correctly 1`] = `
253
253
  <View
254
254
  style={
255
255
  Object {
256
- "paddingHorizontal": 8,
256
+ "paddingHorizontal": 4,
257
257
  }
258
258
  }
259
- testID="deprecated-badge"
260
259
  >
261
260
  <Text
262
261
  numberOfLines={1}
@@ -30,7 +30,9 @@ const TestTabsComponent = (
30
30
  key: 'home',
31
31
  activeItem: 'Home',
32
32
  component: <Text>Home Screen</Text>,
33
- showBadge: true,
33
+ badge: {
34
+ type: 'status',
35
+ },
34
36
  },
35
37
  {
36
38
  key: 'wallet',
@@ -1,26 +1,25 @@
1
- import React, { useEffect } from 'react';
2
- import { Animated, TouchableWithoutFeedback, View } from 'react-native';
3
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
1
  import { useTheme } from '@emotion/react';
5
- import PagerView from 'react-native-pager-view';
6
2
  import type { ReactNode } from 'react';
7
- import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
3
+ import React, { useEffect } from 'react';
4
+ import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
5
+ import { Animated, TouchableWithoutFeedback, View } from 'react-native';
8
6
  import type { PagerViewOnPageScrollEventData } from 'react-native-pager-view';
7
+ import PagerView from 'react-native-pager-view';
8
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
9
+ import { IconName } from '../Icon';
9
10
  import Typography from '../Typography';
11
+ import ActiveTabIndicator from './ActiveTabIndicator';
12
+ import ScrollableTabs from './ScrollableTabs';
10
13
  import {
11
14
  ContentWrapper,
12
- HeaderTabWrapper,
15
+ HeaderTab,
13
16
  HeaderTabItem,
17
+ HeaderTabWrapper,
14
18
  TabContainer,
15
19
  TabScreen,
16
- HeaderTab,
17
20
  } from './StyledTabs';
18
- import ActiveTabIndicator from './ActiveTabIndicator';
19
- import ScrollableTabs from './ScrollableTabs';
20
- import TabWithBadge from './TabWithBadge';
21
21
  import type { BadgeConfigType } from './TabWithBadge';
22
- import { IconName } from '../Icon';
23
- import { useDeprecation } from '../../utils/hooks';
22
+ import TabWithBadge from './TabWithBadge';
24
23
 
25
24
  export type ItemType =
26
25
  | string
@@ -33,7 +32,6 @@ export type TabType = {
33
32
  inactiveItem?: ItemType;
34
33
  component: ReactNode;
35
34
  testID?: string;
36
- showBadge?: boolean;
37
35
  badge?: BadgeConfigType;
38
36
  };
39
37
 
@@ -114,11 +112,6 @@ const Tabs = ({
114
112
  swipeEnabled = true,
115
113
  testID: componentTestID,
116
114
  }: TabsProps): JSX.Element => {
117
- useDeprecation(
118
- "Tabs' showBadge will be removed in the next major release. Please use badge prop instead.",
119
- tabs.some((item) => item.showBadge !== undefined)
120
- );
121
-
122
115
  const theme = useTheme();
123
116
  const insets = useSafeAreaInsets();
124
117
  const pagerViewRef = React.useRef<PagerView>(null);
@@ -157,7 +150,6 @@ const Tabs = ({
157
150
  testID,
158
151
  activeItem,
159
152
  inactiveItem: originalInactiveItem,
160
- showBadge,
161
153
  badge,
162
154
  } = tab;
163
155
 
@@ -178,11 +170,7 @@ const Tabs = ({
178
170
  testID={testID}
179
171
  >
180
172
  <HeaderTabItem>
181
- <TabWithBadge
182
- showBadge={showBadge}
183
- config={badge}
184
- tabItem={tabItem}
185
- />
173
+ <TabWithBadge config={badge} tabItem={tabItem} />
186
174
  </HeaderTabItem>
187
175
  </TouchableWithoutFeedback>
188
176
  );
@@ -3,7 +3,6 @@ import styled from '@emotion/native';
3
3
  import { Theme } from '../../theme';
4
4
 
5
5
  type ThemeIntent =
6
- | 'default'
7
6
  | 'primary'
8
7
  | 'info'
9
8
  | 'success'
@@ -40,15 +40,6 @@ describe('Tag', () => {
40
40
  expect(getByText('INFO')).toBeDefined();
41
41
  });
42
42
 
43
- it('has default style when intent is default', () => {
44
- const { getByText, toJSON } = renderWithTheme(
45
- <Tag content="DEFAULT" intent="default" />
46
- );
47
-
48
- expect(toJSON()).toMatchSnapshot();
49
- expect(getByText('DEFAULT')).toBeDefined();
50
- });
51
-
52
43
  it('has archived style when intent is archived', () => {
53
44
  const { getByText, toJSON } = renderWithTheme(
54
45
  <Tag content="ARCHIVED" intent="archived" />
@@ -120,46 +120,6 @@ exports[`Tag has danger style when intent is danger 1`] = `
120
120
  </View>
121
121
  `;
122
122
 
123
- exports[`Tag has default style when intent is default 1`] = `
124
- <View
125
- style={
126
- Array [
127
- Object {
128
- "backgroundColor": undefined,
129
- "borderColor": "#001f23",
130
- "borderRadius": 4,
131
- "borderWidth": 1,
132
- "paddingHorizontal": 8,
133
- "paddingVertical": 2,
134
- },
135
- undefined,
136
- ]
137
- }
138
- themeIntent="default"
139
- themeVariant="outlined"
140
- >
141
- <Text
142
- style={
143
- Array [
144
- Object {
145
- "color": "#001f23",
146
- "fontFamily": "BeVietnamPro-SemiBold",
147
- "fontSize": 12,
148
- "includeFontPadding": false,
149
- "textAlign": "center",
150
- "textAlignVertical": "center",
151
- },
152
- undefined,
153
- ]
154
- }
155
- themeIntent="default"
156
- themeVariant="outlined"
157
- >
158
- DEFAULT
159
- </Text>
160
- </View>
161
- `;
162
-
163
123
  exports[`Tag has info style when intent is info 1`] = `
164
124
  <View
165
125
  style={
@@ -1,7 +1,6 @@
1
1
  import React, { ReactElement } from 'react';
2
- import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
3
- import { useDeprecation } from '../../utils/hooks';
4
- import { StyledView, StyledText } from './StyledTag';
2
+ import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import { StyledText, StyledView } from './StyledTag';
5
4
 
6
5
  interface TagProps extends ViewProps {
7
6
  /**
@@ -11,14 +10,7 @@ interface TagProps extends ViewProps {
11
10
  /**
12
11
  * Visual intent color to apply to Tag.
13
12
  */
14
- intent?:
15
- | 'primary'
16
- | 'default' // Will be deprecated in the future
17
- | 'info'
18
- | 'success'
19
- | 'warning'
20
- | 'danger'
21
- | 'archived';
13
+ intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
22
14
  /**
23
15
  * Tag variant.
24
16
  */
@@ -41,11 +33,6 @@ const Tag = ({
41
33
  testID,
42
34
  ...nativeProps
43
35
  }: TagProps): JSX.Element => {
44
- useDeprecation(
45
- "Tag's default intent is deprecated and will be removed in the next major release.\nPlease use primary intent instead.",
46
- intent === 'default'
47
- );
48
-
49
36
  return (
50
37
  <StyledView
51
38
  {...nativeProps}
@@ -674,29 +674,19 @@ Object {
674
674
  },
675
675
  },
676
676
  "sizes": Object {
677
- "heights": Object {
678
- "medium": 32,
679
- "small": 24,
680
- },
677
+ "height": 24,
681
678
  "selector": Object {
682
679
  "height": 56,
683
680
  },
684
- "thumbs": Object {
685
- "medium": 24,
686
- "small": 16,
687
- },
688
- "widths": Object {
689
- "medium": 64,
690
- "small": 48,
691
- },
681
+ "thumb": 16,
682
+ "width": 48,
692
683
  },
693
684
  "spaces": Object {
694
- "medium": 4,
685
+ "paddingHorizontal": 4,
695
686
  "selector": Object {
696
687
  "iconPadding": 16,
697
688
  "wrapperPadding": 4,
698
689
  },
699
- "small": 4,
700
690
  },
701
691
  },
702
692
  "tabs": Object {
@@ -735,8 +725,6 @@ Object {
735
725
  "archivedBackground": "#f1f2f3",
736
726
  "danger": "#de350b",
737
727
  "dangerBackground": "#fcebe7",
738
- "default": "#001f23",
739
- "defaultBackground": undefined,
740
728
  "info": "#4568fb",
741
729
  "infoBackground": "#ecf0ff",
742
730
  "primary": "#401960",
@@ -945,54 +933,25 @@ Object {
945
933
  },
946
934
  "colors": Object {
947
935
  "archived": "#abacaf",
948
- "archivedBackground": "#f6f6f7",
949
- "archivedDark": "#737479",
950
- "archivedLight": "#bfc1c5",
951
936
  "archivedSurface": "#f1f2f3",
952
- "backgroundDark": "#001f23",
953
- "backgroundLight": "#f6f6f7",
954
- "black": "#000000",
955
- "danger": "#de350b",
956
- "dangerBackground": "#fcebe7",
957
- "dangerLight": "#f46363",
958
- "dangerMediumLight": "#e3602a",
959
937
  "darkGlobalSurface": "#001f23",
960
938
  "decorativePrimary": "#ffffff",
961
939
  "decorativePrimarySurface": "#ccd2d3",
962
940
  "defaultGlobalSurface": "#ffffff",
963
941
  "defaultSurface": "#f6f6f7",
964
- "disabledLightText": "#bfc1c5",
965
942
  "disabledOnDefaultGlobalSurface": "#bfc1c5",
966
943
  "disabledOutline": "#bfc1c5",
967
- "disabledSecondary": "#a08cb0",
968
- "disabledText": "#808f91",
969
944
  "error": "#f46363",
970
945
  "errorSurface": "#fcebe7",
971
- "globalPrimary": "#001f23",
972
- "globalPrimaryBackground": "#e6e9e9",
973
- "globalPrimaryLight": "#808f91",
974
- "globalPrimaryOutline": "#001f23",
975
- "globalSecondary": "#4d6265",
976
- "globalSecondaryOutline": "#e8e9ea",
977
- "highlightedSecondarySurface": "#ecf0ff",
978
946
  "highlightedSurface": "#ece8ef",
979
- "inactiveBackground": "#808f91",
980
947
  "inactiveOnDefaultGlobalSurface": "#808f91",
981
948
  "inactiveOutline": "#808f91",
982
949
  "info": "#b5c3fd",
983
- "infoBackground": "#ecf0ff",
984
- "infoLight": "#b5c3fd",
985
- "infoMediumLight": "#b5c3fd",
986
950
  "infoSurface": "#ecf0ff",
987
- "invertedText": "#ffffff",
988
- "lightHighlightedSurface": "#ece8ef",
989
951
  "mutedArchived": "#bcbdbf",
990
952
  "mutedError": "#f68282",
991
- "mutedGlobalPrimary": "#4d6265",
992
953
  "mutedInfo": "#c4cffd",
993
954
  "mutedOnDefaultGlobalSurface": "#4d6265",
994
- "mutedPrimary": "#e6e9e9",
995
- "mutedSecondary": "#808f91",
996
955
  "mutedSuccess": "#7bd897",
997
956
  "mutedWarning": "#ffcb8d",
998
957
  "neutralGlobalSurface": "#f6f6f7",
@@ -1000,38 +959,20 @@ Object {
1000
959
  "onDarkGlobalSurface": "#ffffff",
1001
960
  "onDefaultGlobalSurface": "#001f23",
1002
961
  "onErrorSurface": "#de350b",
1003
- "onGlobalPrimary": "#ffffff",
1004
962
  "onInfoSurface": "#4568fb",
1005
963
  "onPrimary": "#ffffff",
1006
964
  "onSecondary": "#ffffff",
1007
965
  "onSuccessSurface": "#017d6d",
1008
966
  "onWarningSurface": "#ffa234",
1009
- "outline": "#e8e9ea",
1010
967
  "overlayGlobalSurface": "#000000",
1011
- "platformBackground": "#ffffff",
1012
968
  "pressedSurface": "#664780",
1013
969
  "primary": "#401960",
1014
- "primaryBackground": "#f3e6f6",
1015
- "primaryBackgroundDark": "#4d6265",
1016
- "primaryDark": "#795e90",
1017
- "primaryLight": "#c282d1",
1018
970
  "primaryOutline": "#001f23",
1019
971
  "secondary": "#795e90",
1020
- "secondaryBackground": "#ecf0ff",
1021
- "secondaryLight": "#b5c3fd",
1022
972
  "secondaryOutline": "#e8e9ea",
1023
- "shadow": "#ccced1",
1024
- "subduedText": "#4d6265",
1025
973
  "success": "#5ace7d",
1026
- "successBackground": "#f0fef4",
1027
- "successDark": "#017d6d",
1028
- "successLight": "#5ace7d",
1029
974
  "successSurface": "#f0fef4",
1030
- "text": "#001f23",
1031
975
  "warning": "#ffbe71",
1032
- "warningBackground": "#fff6eb",
1033
- "warningDark": "#ffa234",
1034
- "warningLight": "#ffbe71",
1035
976
  "warningSurface": "#fff6eb",
1036
977
  },
1037
978
  "fontSizes": Object {
@@ -16,26 +16,16 @@ const getSwitchTheme = (theme: GlobalTheme) => {
16
16
  };
17
17
 
18
18
  const sizes = {
19
- thumbs: {
20
- small: theme.sizes.medium,
21
- medium: theme.sizes.large,
22
- },
23
- widths: {
24
- small: theme.sizes.xxxlarge,
25
- medium: theme.sizes.xxxxxlarge,
26
- },
27
- heights: {
28
- small: theme.sizes.large,
29
- medium: theme.sizes.xlarge,
30
- },
19
+ thumb: theme.sizes.medium,
20
+ width: theme.sizes.xxxlarge,
21
+ height: theme.sizes.large,
31
22
  selector: {
32
23
  height: theme.sizes.xxxxlarge,
33
24
  },
34
25
  };
35
26
 
36
27
  const spaces = {
37
- small: theme.space.xsmall,
38
- medium: theme.space.xsmall,
28
+ paddingHorizontal: theme.space.xsmall,
39
29
  selector: {
40
30
  iconPadding: theme.space.medium,
41
31
  wrapperPadding: theme.space.xsmall,
@@ -6,8 +6,6 @@ const getTagTheme = (theme: GlobalTheme) => {
6
6
  };
7
7
 
8
8
  const colors = {
9
- default: theme.colors.onDefaultGlobalSurface,
10
- defaultBackground: undefined,
11
9
  primary: theme.colors.primary,
12
10
  primaryBackground: undefined,
13
11
  info: theme.colors.onInfoSurface,
@@ -1,11 +1,6 @@
1
1
  import { swagPalette as palette } from '@hero-design/colors';
2
- import type {
3
- SystemPalette,
4
- BrandSystemPalette,
5
- LegacyBrandSystemPalette,
6
- } from './types';
2
+ import type { SystemPalette, BrandSystemPalette } from './types';
7
3
  import globalPalette from './global';
8
- import legacySystemPalette from './legacySystemPalette';
9
4
 
10
5
  const swagBrandSystemPallete: BrandSystemPalette = {
11
6
  primary: palette.scarletGum,
@@ -20,21 +15,7 @@ const swagBrandSystemPallete: BrandSystemPalette = {
20
15
  decorativePrimarySurface: palette.maasstrichtBlueLight80,
21
16
  };
22
17
 
23
- const swagLegacyBrandSystemPalette: LegacyBrandSystemPalette = {
24
- mutedPrimary: palette.maasstrichtBlueLight90,
25
- highlightedSecondarySurface: palette.aliceBlue,
26
- mutedSecondary: palette.maasstrichtBlueLight50,
27
- disabledSecondary: palette.scarletGumLight50,
28
- lightHighlightedSurface: palette.scarletGumLight90,
29
- };
30
-
31
18
  const swagSystemPalette: SystemPalette = {
32
- // TODO: Remove legacy in V8
33
- // Legacy system
34
- ...legacySystemPalette,
35
- // Legacy brand
36
- ...swagLegacyBrandSystemPalette,
37
-
38
19
  // Global
39
20
  ...globalPalette,
40
21
  // Brand