@hero-design/rn 8.33.1 → 8.33.2

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 (172) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/es/index.js +187 -208
  3. package/lib/index.js +187 -208
  4. package/package.json +7 -7
  5. package/src/components/Accordion/AccordionItem.tsx +1 -3
  6. package/src/components/Accordion/__tests__/AccordionItem.spec.tsx +5 -5
  7. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +26 -34
  8. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +36 -48
  9. package/src/components/Accordion/__tests__/index.spec.tsx +2 -2
  10. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +26 -39
  11. package/src/components/Alert/__tests__/index.spec.tsx +8 -2
  12. package/src/components/Alert/index.tsx +2 -2
  13. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
  14. package/src/components/Attachment/index.tsx +3 -1
  15. package/src/components/Badge/StyledBadge.tsx +1 -4
  16. package/src/components/Badge/__tests__/Status.spec.tsx +1 -1
  17. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +18 -48
  18. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -3
  19. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +1 -1
  20. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -12
  21. package/src/components/BottomNavigation/index.tsx +0 -1
  22. package/src/components/BottomSheet/Header.tsx +1 -3
  23. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
  24. package/src/components/Button/Button.tsx +34 -11
  25. package/src/components/Button/StyledButton.tsx +45 -38
  26. package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +2 -4
  27. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +8 -14
  28. package/src/components/Button/__tests__/StyledButton.spec.tsx +12 -6
  29. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +66 -90
  30. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +56 -86
  31. package/src/components/Calendar/CalendarRowItem.tsx +5 -2
  32. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +10 -15
  33. package/src/components/Calendar/index.tsx +1 -1
  34. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +12 -18
  35. package/src/components/Card/__tests__/index.spec.tsx +1 -1
  36. package/src/components/Carousel/CarouselItem.tsx +4 -4
  37. package/src/components/Carousel/StyledCarousel.tsx +1 -4
  38. package/src/components/Carousel/__tests__/CardCarousel.spec.tsx +18 -18
  39. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +24 -20
  40. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +99 -165
  41. package/src/components/Checkbox/StyledCheckbox.tsx +1 -1
  42. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +8 -12
  43. package/src/components/Checkbox/index.tsx +1 -1
  44. package/src/components/ContentNavigator/StyledContentNavigator.tsx +1 -6
  45. package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +1 -9
  46. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -29
  47. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +124 -17
  48. package/src/components/ContentNavigator/__tests__/index.spec.tsx +16 -0
  49. package/src/components/ContentNavigator/index.tsx +30 -9
  50. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +12 -18
  51. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -6
  52. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +4 -6
  53. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +13 -18
  54. package/src/components/Empty/StyledEmpty.tsx +2 -6
  55. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +22 -36
  56. package/src/components/Empty/index.tsx +4 -2
  57. package/src/components/Error/StyledError.tsx +2 -8
  58. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +44 -76
  59. package/src/components/Error/index.tsx +6 -2
  60. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -4
  61. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -5
  62. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +54 -116
  63. package/src/components/FAB/ActionGroup/index.tsx +1 -1
  64. package/src/components/FAB/StyledFAB.tsx +1 -4
  65. package/src/components/FAB/__tests__/StyledFAB.spec.tsx +1 -1
  66. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -3
  67. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +4 -8
  68. package/src/components/List/BasicListItem.tsx +2 -6
  69. package/src/components/List/ListItem.tsx +3 -5
  70. package/src/components/List/__tests__/ListItem.spec.tsx +4 -4
  71. package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +3 -1
  72. package/src/components/List/__tests__/StyledListItem.spec.tsx +3 -1
  73. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -10
  74. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +23 -37
  75. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +8 -12
  76. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +8 -12
  77. package/src/components/PageControl/index.tsx +0 -1
  78. package/src/components/PinInput/PinCell.tsx +3 -1
  79. package/src/components/PinInput/StyledPinInput.tsx +2 -7
  80. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +25 -45
  81. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +18 -34
  82. package/src/components/Progress/ProgressCircle.tsx +1 -3
  83. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -6
  84. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -4
  85. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -6
  86. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -9
  87. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +16 -24
  88. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
  89. package/src/components/SectionHeading/__tests__/index.spec.tsx +3 -1
  90. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
  91. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
  92. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +86 -130
  93. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +6 -10
  94. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
  95. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
  96. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +49 -79
  97. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +5 -9
  98. package/src/components/Success/StyledSuccess.tsx +2 -6
  99. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +40 -64
  100. package/src/components/Success/index.tsx +3 -1
  101. package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +2 -2
  102. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +6 -9
  103. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
  104. package/src/components/Swipeable/__tests__/index.spec.tsx +6 -4
  105. package/src/components/Switch/SelectorSwitch/Option.tsx +1 -1
  106. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
  107. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -2
  108. package/src/components/Tabs/ScrollableTabsHeader.tsx +3 -3
  109. package/src/components/Tabs/__tests__/SceneView.spec.tsx +4 -4
  110. package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +6 -9
  111. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +33 -60
  112. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +7 -13
  113. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -8
  114. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +45 -81
  115. package/src/components/Tabs/index.tsx +3 -3
  116. package/src/components/Tag/StyledTag.tsx +1 -4
  117. package/src/components/Tag/__tests__/Tag.spec.tsx +5 -1
  118. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +47 -93
  119. package/src/components/Tag/index.tsx +5 -1
  120. package/src/components/TextInput/StyledTextInput.tsx +8 -16
  121. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +72 -134
  122. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +145 -257
  123. package/src/components/TextInput/index.tsx +2 -3
  124. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +12 -23
  125. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +21 -35
  126. package/src/components/Toast/Toast.tsx +6 -5
  127. package/src/components/Toast/__tests__/Toast.spec.tsx +5 -1
  128. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +26 -39
  129. package/src/components/Toolbar/StyledToolbar.tsx +1 -1
  130. package/src/components/Toolbar/ToolbarItem.tsx +4 -6
  131. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -18
  132. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +14 -21
  133. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -0
  134. package/src/theme/components/badge.ts +15 -0
  135. package/src/theme/components/button.ts +16 -0
  136. package/src/theme/components/carousel.ts +15 -0
  137. package/src/theme/components/empty.ts +12 -0
  138. package/src/theme/components/error.ts +16 -0
  139. package/src/theme/components/fab.ts +11 -0
  140. package/src/theme/components/pinInput.ts +15 -0
  141. package/src/theme/components/success.ts +12 -0
  142. package/src/theme/components/tag.ts +16 -0
  143. package/src/theme/components/textInput.ts +1 -0
  144. package/src/theme/getTheme.ts +18 -18
  145. package/types/components/Badge/StyledBadge.d.ts +1 -1
  146. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
  147. package/types/components/Button/StyledButton.d.ts +12 -5
  148. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
  149. package/types/components/Carousel/StyledCarousel.d.ts +1 -1
  150. package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
  151. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +1 -5
  152. package/types/components/Empty/StyledEmpty.d.ts +2 -2
  153. package/types/components/Error/StyledError.d.ts +2 -2
  154. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +2 -2
  155. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +1 -1
  156. package/types/components/FAB/StyledFAB.d.ts +1 -1
  157. package/types/components/PinInput/StyledPinInput.d.ts +2 -2
  158. package/types/components/Success/StyledSuccess.d.ts +2 -2
  159. package/types/components/Tag/StyledTag.d.ts +1 -1
  160. package/types/components/TextInput/StyledTextInput.d.ts +7 -10
  161. package/types/components/Toolbar/StyledToolbar.d.ts +1 -1
  162. package/types/theme/components/badge.d.ts +15 -0
  163. package/types/theme/components/button.d.ts +14 -0
  164. package/types/theme/components/carousel.d.ts +15 -0
  165. package/types/theme/components/empty.d.ts +11 -0
  166. package/types/theme/components/error.d.ts +15 -0
  167. package/types/theme/components/fab.d.ts +11 -0
  168. package/types/theme/components/pinInput.d.ts +15 -0
  169. package/types/theme/components/success.d.ts +11 -0
  170. package/types/theme/components/tag.d.ts +15 -0
  171. package/types/theme/components/textInput.d.ts +1 -0
  172. package/types/theme/getTheme.d.ts +18 -18
@@ -9,6 +9,7 @@ import {
9
9
  StyledButtonIcon,
10
10
  StyledButtonIconWrapper,
11
11
  StyledButtonText,
12
+ StyledButtonTitleOfVariantText,
12
13
  } from './StyledButton';
13
14
  import { useDeprecation } from '../../utils/hooks';
14
15
 
@@ -123,6 +124,15 @@ const deprecatedVariants: ThemeVariant[] = [
123
124
  'outlined-secondary',
124
125
  'outlined-danger',
125
126
  ];
127
+
128
+ function isTextVariant(
129
+ themeVariant: ThemeVariant
130
+ ): themeVariant is 'text-primary' | 'text-secondary' | 'text-danger' {
131
+ return ['text-primary', 'text-secondary', 'text-danger'].includes(
132
+ themeVariant
133
+ );
134
+ }
135
+
126
136
  const Button = ({
127
137
  accessibilityHint,
128
138
  accessibilityLabel,
@@ -156,7 +166,7 @@ const Button = ({
156
166
  loading={loading}
157
167
  onPress={onPress}
158
168
  testID={testID}
159
- themeVariant={themeVariant}
169
+ themeButtonVariant={themeVariant}
160
170
  style={style}
161
171
  underlayColor={underlayColor}
162
172
  >
@@ -173,25 +183,38 @@ const Button = ({
173
183
  disabled={disabled}
174
184
  icon={icon}
175
185
  testID={`${testID}-left-icon`}
176
- themeVariant={themeVariant}
186
+ themeButtonVariant={themeVariant}
177
187
  />
178
188
  </StyledButtonIconWrapper>
179
189
  )}
180
- <StyledButtonText
181
- ellipsizeMode="tail"
182
- numberOfLines={1}
183
- disabled={disabled}
184
- themeVariant={themeVariant}
185
- >
186
- {text}
187
- </StyledButtonText>
190
+ {isTextVariant(themeVariant) ? (
191
+ <StyledButtonTitleOfVariantText
192
+ variant="regular-bold"
193
+ ellipsizeMode="tail"
194
+ numberOfLines={1}
195
+ disabled={disabled}
196
+ themeButtonVariant={themeVariant}
197
+ >
198
+ {text}
199
+ </StyledButtonTitleOfVariantText>
200
+ ) : (
201
+ <StyledButtonText
202
+ level="h5"
203
+ ellipsizeMode="tail"
204
+ numberOfLines={1}
205
+ disabled={disabled}
206
+ themeButtonVariant={themeVariant}
207
+ >
208
+ {text}
209
+ </StyledButtonText>
210
+ )}
188
211
  {rightIcon !== undefined && (
189
212
  <StyledButtonIconWrapper themePosition="right">
190
213
  <StyledButtonIcon
191
214
  disabled={disabled}
192
215
  icon={rightIcon}
193
216
  testID={`${testID}-right-icon`}
194
- themeVariant={themeVariant}
217
+ themeButtonVariant={themeVariant}
195
218
  />
196
219
  </StyledButtonIconWrapper>
197
220
  )}
@@ -81,20 +81,13 @@ const genOutlineTextStyles = (
81
81
  intent: Intent,
82
82
  disabled?: boolean
83
83
  ): ReactNativeStyle => {
84
- const textColorStyling = () => {
85
- if (disabled) {
86
- return {
87
- color: theme.__hd__.button.colors.disabledText,
88
- };
89
- }
90
-
91
- return { color: theme.__hd__.button.colors[intent] };
92
- };
84
+ if (disabled) {
85
+ return {
86
+ color: theme.__hd__.button.colors.disabledText,
87
+ };
88
+ }
93
89
 
94
- return {
95
- fontSize: theme.__hd__.button.fontSize.default,
96
- ...textColorStyling(),
97
- };
90
+ return { color: theme.__hd__.button.colors[intent] };
98
91
  };
99
92
 
100
93
  const genTextVariantTextStyles = (
@@ -102,28 +95,21 @@ const genTextVariantTextStyles = (
102
95
  intent: Intent,
103
96
  disabled?: boolean
104
97
  ): ReactNativeStyle => {
105
- const textColorStyling = () => {
106
- if (disabled) {
107
- return {
108
- color: theme.__hd__.button.colors.disabledText,
109
- };
110
- }
111
-
112
- return { color: theme.__hd__.button.colors[intent] };
113
- };
98
+ if (disabled) {
99
+ return {
100
+ color: theme.__hd__.button.colors.disabledText,
101
+ };
102
+ }
114
103
 
115
- return {
116
- fontSize: theme.__hd__.button.fontSize.textVariant,
117
- ...textColorStyling(),
118
- };
104
+ return { color: theme.__hd__.button.colors[intent] };
119
105
  };
120
106
 
121
107
  const StyledButtonContainer = styled(TouchableHighlight)<{
122
108
  disabled?: boolean;
123
- themeVariant: ThemeVariant;
109
+ themeButtonVariant: ThemeVariant;
124
110
  loading?: boolean;
125
- }>(({ disabled = false, loading = false, themeVariant, theme }) => {
126
- switch (themeVariant) {
111
+ }>(({ disabled = false, loading = false, themeButtonVariant, theme }) => {
112
+ switch (themeButtonVariant) {
127
113
  case 'filled-primary':
128
114
  return genFilledContainerStyles(theme, 'primary', disabled, loading);
129
115
  case 'filled-secondary':
@@ -153,17 +139,16 @@ const StyledButtonContainer = styled(TouchableHighlight)<{
153
139
  }
154
140
  });
155
141
 
156
- const StyledButtonText = styled(Typography.Text)<{
142
+ const StyledButtonText = styled(Typography.Title)<{
157
143
  disabled?: boolean;
158
- themeVariant: ThemeVariant;
159
- }>(({ disabled, themeVariant, theme }) => {
144
+ themeButtonVariant: ThemeVariant;
145
+ }>(({ disabled, themeButtonVariant, theme }) => {
160
146
  const themeStyling = () => {
161
- switch (themeVariant) {
147
+ switch (themeButtonVariant) {
162
148
  case 'filled-primary':
163
149
  case 'filled-secondary':
164
150
  case 'filled-danger':
165
151
  return {
166
- fontSize: theme.__hd__.button.fontSize.default,
167
152
  color: theme.__hd__.button.colors.invertedText,
168
153
  };
169
154
  case 'outlined-primary':
@@ -183,7 +168,28 @@ const StyledButtonText = styled(Typography.Text)<{
183
168
  return {
184
169
  flexShrink: 1,
185
170
  textAlign: 'center',
186
- fontFamily: theme.__hd__.button.fonts.default,
171
+ ...themeStyling(),
172
+ };
173
+ });
174
+
175
+ const StyledButtonTitleOfVariantText = styled(Typography.Body)<{
176
+ disabled?: boolean;
177
+ themeButtonVariant: 'text-primary' | 'text-secondary' | 'text-danger';
178
+ }>(({ disabled, themeButtonVariant, theme }) => {
179
+ const themeStyling = () => {
180
+ switch (themeButtonVariant) {
181
+ case 'text-primary':
182
+ return genTextVariantTextStyles(theme, 'primary', disabled);
183
+ case 'text-secondary':
184
+ return genTextVariantTextStyles(theme, 'secondary', disabled);
185
+ case 'text-danger':
186
+ return genTextVariantTextStyles(theme, 'danger', disabled);
187
+ }
188
+ };
189
+ return {
190
+ flexShrink: 1,
191
+ lineHeight: theme.__hd__.button.lineHeights.titleOfTextVariant, // align text on Android
192
+ textAlign: 'center',
187
193
  ...themeStyling(),
188
194
  };
189
195
  });
@@ -201,10 +207,10 @@ const StyledButtonIconWrapper = styled(View)<{
201
207
 
202
208
  const StyledButtonIcon = styled(Icon)<{
203
209
  disabled?: boolean;
204
- themeVariant: ThemeVariant;
205
- }>(({ disabled, themeVariant, theme }) => {
210
+ themeButtonVariant: ThemeVariant;
211
+ }>(({ disabled, themeButtonVariant, theme }) => {
206
212
  const themeStyling = () => {
207
- switch (themeVariant) {
213
+ switch (themeButtonVariant) {
208
214
  case 'filled-primary':
209
215
  case 'filled-secondary':
210
216
  case 'filled-danger':
@@ -235,5 +241,6 @@ export {
235
241
  StyledButtonText,
236
242
  StyledButtonIconWrapper,
237
243
  StyledButtonIcon,
244
+ StyledButtonTitleOfVariantText,
238
245
  };
239
246
  export type { Intent, ThemeVariant };
@@ -17,9 +17,7 @@ export const IconWrapper = styled(View)(({ theme }) => ({
17
17
  paddingRight: theme.__hd__.button.space.iconPadding,
18
18
  }));
19
19
 
20
- export const ButtonText = styled(Typography.Text)(({ theme }) => ({
20
+ export const ButtonText = styled(Typography.Body)({
21
21
  flexShrink: 1,
22
22
  textAlign: 'center',
23
- fontSize: theme.__hd__.button.fontSize.utility,
24
- fontFamily: theme.__hd__.button.fonts.utility,
25
- }));
23
+ });
@@ -59,25 +59,22 @@ exports[`UtilityButton snapshot has intent primary style 1`] = `
59
59
  Object {
60
60
  "color": "#001f23",
61
61
  "fontFamily": "BeVietnamPro-Regular",
62
- "fontSize": 14,
63
- "letterSpacing": 0.42,
64
- "lineHeight": 22,
62
+ "fontSize": 16,
63
+ "letterSpacing": 0.48,
64
+ "lineHeight": 24,
65
65
  },
66
66
  Array [
67
67
  Object {
68
68
  "flexShrink": 1,
69
- "fontFamily": "BeVietnamPro-Regular",
70
- "fontSize": 16,
71
69
  "textAlign": "center",
72
70
  },
73
71
  undefined,
74
72
  ],
75
73
  ]
76
74
  }
77
- themeFontSize="medium"
78
- themeFontWeight="regular"
79
75
  themeIntent="body"
80
76
  themeTypeface="neutral"
77
+ themeVariant="regular"
81
78
  >
82
79
  Settings
83
80
  </Text>
@@ -143,25 +140,22 @@ exports[`UtilityButton snapshot has intent text style 1`] = `
143
140
  Object {
144
141
  "color": "#001f23",
145
142
  "fontFamily": "BeVietnamPro-Regular",
146
- "fontSize": 14,
147
- "letterSpacing": 0.42,
148
- "lineHeight": 22,
143
+ "fontSize": 16,
144
+ "letterSpacing": 0.48,
145
+ "lineHeight": 24,
149
146
  },
150
147
  Array [
151
148
  Object {
152
149
  "flexShrink": 1,
153
- "fontFamily": "BeVietnamPro-Regular",
154
- "fontSize": 16,
155
150
  "textAlign": "center",
156
151
  },
157
152
  undefined,
158
153
  ],
159
154
  ]
160
155
  }
161
- themeFontSize="medium"
162
- themeFontWeight="regular"
163
156
  themeIntent="body"
164
157
  themeTypeface="neutral"
158
+ themeVariant="regular"
165
159
  >
166
160
  Settings
167
161
  </Text>
@@ -24,7 +24,7 @@ describe('StyledButtonContainer', () => {
24
24
  ${'text-danger'}
25
25
  `('has $themeVariant style', ({ themeVariant }): void => {
26
26
  const { toJSON } = renderWithTheme(
27
- <StyledButtonContainer themeVariant={themeVariant}>
27
+ <StyledButtonContainer themeButtonVariant={themeVariant}>
28
28
  <Text>Title</Text>
29
29
  </StyledButtonContainer>
30
30
  );
@@ -34,7 +34,7 @@ describe('StyledButtonContainer', () => {
34
34
 
35
35
  it('renders disabled correctly', () => {
36
36
  const { toJSON } = renderWithTheme(
37
- <StyledButtonContainer themeVariant="filled-primary" disabled>
37
+ <StyledButtonContainer themeButtonVariant="filled-primary" disabled>
38
38
  <Text>Title</Text>
39
39
  </StyledButtonContainer>
40
40
  );
@@ -57,7 +57,9 @@ describe('StyledButtonText', () => {
57
57
  ${'text-danger'}
58
58
  `('has $themeVariant style', ({ themeVariant }) => {
59
59
  const { toJSON } = renderWithTheme(
60
- <StyledButtonText themeVariant={themeVariant}>Example</StyledButtonText>
60
+ <StyledButtonText themeButtonVariant={themeVariant}>
61
+ Example
62
+ </StyledButtonText>
61
63
  );
62
64
 
63
65
  expect(toJSON()).toMatchSnapshot();
@@ -65,7 +67,7 @@ describe('StyledButtonText', () => {
65
67
 
66
68
  it('renders disabled correctly', () => {
67
69
  const { toJSON } = renderWithTheme(
68
- <StyledButtonText themeVariant="filled-primary" disabled>
70
+ <StyledButtonText themeButtonVariant="filled-primary" disabled>
69
71
  Example
70
72
  </StyledButtonText>
71
73
  );
@@ -102,7 +104,7 @@ describe('StyledButtonIcon', () => {
102
104
  ${'text-danger'}
103
105
  `('has $themeVariant style', ({ themeVariant }) => {
104
106
  const { toJSON } = renderWithTheme(
105
- <StyledButtonIcon icon="bell" themeVariant={themeVariant} />
107
+ <StyledButtonIcon icon="bell" themeButtonVariant={themeVariant} />
106
108
  );
107
109
 
108
110
  expect(toJSON()).toMatchSnapshot();
@@ -110,7 +112,11 @@ describe('StyledButtonIcon', () => {
110
112
 
111
113
  it('renders disabled correctly', () => {
112
114
  const { toJSON } = renderWithTheme(
113
- <StyledButtonIcon icon="bell" themeVariant="filled-primary" disabled />
115
+ <StyledButtonIcon
116
+ icon="bell"
117
+ themeButtonVariant="filled-primary"
118
+ disabled
119
+ />
114
120
  );
115
121
 
116
122
  expect(toJSON()).toMatchSnapshot();