@hero-design/rn 8.30.3 → 8.31.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.
Files changed (92) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/es/index.js +116 -176
  3. package/lib/index.js +116 -176
  4. package/package.json +5 -5
  5. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +3 -33
  6. package/src/components/Carousel/index.tsx +18 -5
  7. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +818 -981
  8. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +11 -4
  9. package/src/components/FAB/ActionGroup/index.tsx +98 -142
  10. package/src/components/FAB/AnimatedFABIcon.tsx +5 -3
  11. package/src/components/FAB/FAB.tsx +28 -112
  12. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +9 -27
  13. package/src/components/FAB/__tests__/index.spec.tsx +2 -22
  14. package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +14 -14
  15. package/src/components/Skeleton/index.tsx +3 -7
  16. package/src/components/Typography/Caption/StyledCaption.tsx +19 -0
  17. package/src/components/Typography/Caption/__tests__/StyledCaption.spec.tsx +39 -0
  18. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +211 -0
  19. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +287 -0
  20. package/src/components/Typography/Caption/__tests__/index.spec.tsx +46 -0
  21. package/src/components/Typography/Caption/index.tsx +61 -0
  22. package/src/components/Typography/index.tsx +3 -0
  23. package/src/components/Typography/types.ts +18 -0
  24. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -0
  25. package/src/theme/components/typography.ts +2 -0
  26. package/src/types.ts +0 -4
  27. package/src/utils/helpers.ts +4 -1
  28. package/testUtils/setup.tsx +0 -2
  29. package/types/components/Accordion/AccordionItem.d.ts +1 -1
  30. package/types/components/Accordion/StyledAccordion.d.ts +1 -1
  31. package/types/components/Avatar/StyledAvatar.d.ts +2 -2
  32. package/types/components/Badge/StyledBadge.d.ts +2 -2
  33. package/types/components/BottomNavigation/index.d.ts +1 -1
  34. package/types/components/BottomSheet/BottomSheetContext.d.ts +1 -1
  35. package/types/components/Box/config.d.ts +2 -2
  36. package/types/components/Box/types.d.ts +3 -3
  37. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
  38. package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
  39. package/types/components/Button/StyledButton.d.ts +2 -2
  40. package/types/components/Carousel/CardCarousel.d.ts +1 -1
  41. package/types/components/Carousel/types.d.ts +2 -2
  42. package/types/components/Divider/StyledDivider.d.ts +1 -1
  43. package/types/components/Drawer/DragableDrawer/helpers.d.ts +1 -1
  44. package/types/components/Empty/StyledEmpty.d.ts +1 -1
  45. package/types/components/Error/StyledError.d.ts +1 -1
  46. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +1 -1
  47. package/types/components/FAB/ActionGroup/index.d.ts +1 -7
  48. package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
  49. package/types/components/FAB/FAB.d.ts +2 -8
  50. package/types/components/FAB/index.d.ts +2 -3
  51. package/types/components/Icon/AnimatedIcon.d.ts +1 -1
  52. package/types/components/Icon/HeroIcon/index.d.ts +2 -2
  53. package/types/components/Icon/index.d.ts +1 -1
  54. package/types/components/List/StyledListItem.d.ts +2 -2
  55. package/types/components/PinInput/StyledPinInput.d.ts +1 -1
  56. package/types/components/Progress/types.d.ts +1 -1
  57. package/types/components/Radio/types.d.ts +1 -1
  58. package/types/components/RefreshControl/index.d.ts +1 -1
  59. package/types/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  60. package/types/components/RichTextEditor/types.d.ts +1 -1
  61. package/types/components/Select/BaseOptionList.d.ts +1 -1
  62. package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
  63. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  64. package/types/components/Select/helpers.d.ts +1 -1
  65. package/types/components/Select/types.d.ts +6 -6
  66. package/types/components/Skeleton/StyledSkeleton.d.ts +2 -2
  67. package/types/components/Success/StyledSuccess.d.ts +1 -1
  68. package/types/components/Swipeable/StyledSwipeable.d.ts +1 -1
  69. package/types/components/Swipeable/index.d.ts +2 -2
  70. package/types/components/Switch/SelectorSwitch/index.d.ts +3 -3
  71. package/types/components/Switch/StyledSwitch.d.ts +1 -1
  72. package/types/components/Tabs/TabWithBadge.d.ts +3 -3
  73. package/types/components/Tabs/index.d.ts +2 -2
  74. package/types/components/Tag/StyledTag.d.ts +2 -2
  75. package/types/components/TextInput/StyledTextInput.d.ts +2 -2
  76. package/types/components/TextInput/index.d.ts +1 -1
  77. package/types/components/Toast/ToastContext.d.ts +2 -2
  78. package/types/components/Toast/ToastProvider.d.ts +1 -1
  79. package/types/components/Toast/types.d.ts +2 -2
  80. package/types/components/Typography/Caption/StyledCaption.d.ts +13 -0
  81. package/types/components/Typography/Caption/index.d.ts +26 -0
  82. package/types/components/Typography/index.d.ts +2 -0
  83. package/types/components/Typography/types.d.ts +6 -0
  84. package/types/theme/ThemeSwitcher.d.ts +1 -1
  85. package/types/theme/components/typography.d.ts +2 -0
  86. package/types/theme/getTheme.d.ts +1 -1
  87. package/types/theme/global/colors/types.d.ts +3 -3
  88. package/types/theme/global/index.d.ts +1 -1
  89. package/types/theme/global/scale.d.ts +1 -1
  90. package/types/theme/global/typography.d.ts +1 -1
  91. package/types/types.d.ts +1 -3
  92. package/types/utils/helpers.d.ts +1 -1
@@ -57,13 +57,13 @@ exports[`Skeleton renders correctly by default 1`] = `
57
57
  }
58
58
  style={
59
59
  Object {
60
- "height": 0,
60
+ "height": "100%",
61
61
  "transform": Array [
62
62
  Object {
63
63
  "translateX": -0,
64
64
  },
65
65
  ],
66
- "width": 0,
66
+ "width": "100%",
67
67
  }
68
68
  }
69
69
  />
@@ -128,13 +128,13 @@ exports[`Skeleton renders correctly when intent is dark and variant is circular
128
128
  }
129
129
  style={
130
130
  Object {
131
- "height": 0,
131
+ "height": "100%",
132
132
  "transform": Array [
133
133
  Object {
134
134
  "translateX": -0,
135
135
  },
136
136
  ],
137
- "width": 0,
137
+ "width": "100%",
138
138
  }
139
139
  }
140
140
  />
@@ -199,13 +199,13 @@ exports[`Skeleton renders correctly when intent is dark and variant is rectangul
199
199
  }
200
200
  style={
201
201
  Object {
202
- "height": 0,
202
+ "height": "100%",
203
203
  "transform": Array [
204
204
  Object {
205
205
  "translateX": -0,
206
206
  },
207
207
  ],
208
- "width": 0,
208
+ "width": "100%",
209
209
  }
210
210
  }
211
211
  />
@@ -270,13 +270,13 @@ exports[`Skeleton renders correctly when intent is dark and variant is rounded 1
270
270
  }
271
271
  style={
272
272
  Object {
273
- "height": 0,
273
+ "height": "100%",
274
274
  "transform": Array [
275
275
  Object {
276
276
  "translateX": -0,
277
277
  },
278
278
  ],
279
- "width": 0,
279
+ "width": "100%",
280
280
  }
281
281
  }
282
282
  />
@@ -341,13 +341,13 @@ exports[`Skeleton renders correctly when intent is light and variant is circular
341
341
  }
342
342
  style={
343
343
  Object {
344
- "height": 0,
344
+ "height": "100%",
345
345
  "transform": Array [
346
346
  Object {
347
347
  "translateX": -0,
348
348
  },
349
349
  ],
350
- "width": 0,
350
+ "width": "100%",
351
351
  }
352
352
  }
353
353
  />
@@ -412,13 +412,13 @@ exports[`Skeleton renders correctly when intent is light and variant is rectangu
412
412
  }
413
413
  style={
414
414
  Object {
415
- "height": 0,
415
+ "height": "100%",
416
416
  "transform": Array [
417
417
  Object {
418
418
  "translateX": -0,
419
419
  },
420
420
  ],
421
- "width": 0,
421
+ "width": "100%",
422
422
  }
423
423
  }
424
424
  />
@@ -483,13 +483,13 @@ exports[`Skeleton renders correctly when intent is light and variant is rounded
483
483
  }
484
484
  style={
485
485
  Object {
486
- "height": 0,
486
+ "height": "100%",
487
487
  "transform": Array [
488
488
  Object {
489
489
  "translateX": -0,
490
490
  },
491
491
  ],
492
- "width": 0,
492
+ "width": "100%",
493
493
  }
494
494
  }
495
495
  />
@@ -69,9 +69,6 @@ const Skeleton = ({
69
69
  const [containerWidth, setContainerWidth] = useState(
70
70
  Number(StyleSheet.flatten(style)?.width) || 0
71
71
  );
72
- const [containerHeight, setContainerHeight] = useState(
73
- Number(StyleSheet.flatten(style)?.height) || 0
74
- );
75
72
 
76
73
  const [shouldStartAnimation, setShouldStartAnimation] = useState(false);
77
74
 
@@ -96,8 +93,7 @@ const Skeleton = ({
96
93
  });
97
94
 
98
95
  const onContainerLayout = useCallback((e: LayoutChangeEvent) => {
99
- const { width, height } = e.nativeEvent.layout;
100
- setContainerHeight(height);
96
+ const { width } = e.nativeEvent.layout;
101
97
  setContainerWidth(width);
102
98
 
103
99
  if (!shouldStartAnimation) {
@@ -120,8 +116,8 @@ const Skeleton = ({
120
116
  start={gradientPositions.start}
121
117
  end={gradientPositions.end}
122
118
  style={{
123
- width: containerWidth,
124
- height: containerHeight,
119
+ width: '100%',
120
+ height: '100%',
125
121
  transform: [{ translateX }],
126
122
  }}
127
123
  colors={colors}
@@ -0,0 +1,19 @@
1
+ import { Text } from 'react-native';
2
+ import styled from '@emotion/native';
3
+ import { FONTWEIGHT_MAP, ThemeIntent } from '../types';
4
+
5
+ const StyledCaption = styled(Text)<{
6
+ themeFontWeight: 'regular' | 'semi-bold';
7
+ themeIntent: ThemeIntent;
8
+ }>(({ themeFontWeight, themeIntent, theme }) => ({
9
+ fontSize: theme.__hd__.typography.fontSizes.caption,
10
+ lineHeight: theme.__hd__.typography.lineHeights.caption,
11
+ letterSpacing:
12
+ theme.__hd__.typography.fontSizes.caption *
13
+ (themeFontWeight === 'regular' ? 0.04 : 0.02),
14
+ color: theme.__hd__.typography.colors[themeIntent],
15
+ fontFamily:
16
+ theme.__hd__.typography.fonts.neutral[FONTWEIGHT_MAP[themeFontWeight]],
17
+ }));
18
+
19
+ export { StyledCaption };
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import renderWithTheme from '../../../../testHelpers/renderWithTheme';
3
+ import { StyledCaption } from '../StyledCaption';
4
+
5
+ describe('StyledCaption', () => {
6
+ it.each`
7
+ fontWeight
8
+ ${'regular'}
9
+ ${'semi-bold'}
10
+ `('has $fontWeight fontWeight style', ({ fontWeight }) => {
11
+ const { toJSON } = renderWithTheme(
12
+ <StyledCaption themeFontWeight={fontWeight} themeIntent="body">
13
+ This is a test
14
+ </StyledCaption>
15
+ );
16
+
17
+ expect(toJSON()).toMatchSnapshot();
18
+ });
19
+
20
+ it.each`
21
+ intent
22
+ ${'body'}
23
+ ${'subdued'}
24
+ ${'primary'}
25
+ ${'success'}
26
+ ${'info'}
27
+ ${'warning'}
28
+ ${'danger'}
29
+ ${'inverted'}
30
+ `('has $intent intent style', ({ intent }) => {
31
+ const { toJSON } = renderWithTheme(
32
+ <StyledCaption themeFontWeight="regular" themeIntent={intent}>
33
+ This is a test
34
+ </StyledCaption>
35
+ );
36
+
37
+ expect(toJSON()).toMatchSnapshot();
38
+ });
39
+ });
@@ -0,0 +1,211 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`StyledCaption has body intent style 1`] = `
4
+ <Text
5
+ style={
6
+ Array [
7
+ Object {
8
+ "color": "#001f23",
9
+ "fontFamily": "BeVietnamPro-Regular",
10
+ "fontSize": 12,
11
+ "letterSpacing": 0.48,
12
+ "lineHeight": 16,
13
+ },
14
+ undefined,
15
+ ]
16
+ }
17
+ themeFontWeight="regular"
18
+ themeIntent="body"
19
+ >
20
+ This is a test
21
+ </Text>
22
+ `;
23
+
24
+ exports[`StyledCaption has danger intent style 1`] = `
25
+ <Text
26
+ style={
27
+ Array [
28
+ Object {
29
+ "color": "#f46363",
30
+ "fontFamily": "BeVietnamPro-Regular",
31
+ "fontSize": 12,
32
+ "letterSpacing": 0.48,
33
+ "lineHeight": 16,
34
+ },
35
+ undefined,
36
+ ]
37
+ }
38
+ themeFontWeight="regular"
39
+ themeIntent="danger"
40
+ >
41
+ This is a test
42
+ </Text>
43
+ `;
44
+
45
+ exports[`StyledCaption has info intent style 1`] = `
46
+ <Text
47
+ style={
48
+ Array [
49
+ Object {
50
+ "color": "#4568fb",
51
+ "fontFamily": "BeVietnamPro-Regular",
52
+ "fontSize": 12,
53
+ "letterSpacing": 0.48,
54
+ "lineHeight": 16,
55
+ },
56
+ undefined,
57
+ ]
58
+ }
59
+ themeFontWeight="regular"
60
+ themeIntent="info"
61
+ >
62
+ This is a test
63
+ </Text>
64
+ `;
65
+
66
+ exports[`StyledCaption has inverted intent style 1`] = `
67
+ <Text
68
+ style={
69
+ Array [
70
+ Object {
71
+ "color": "#ffffff",
72
+ "fontFamily": "BeVietnamPro-Regular",
73
+ "fontSize": 12,
74
+ "letterSpacing": 0.48,
75
+ "lineHeight": 16,
76
+ },
77
+ undefined,
78
+ ]
79
+ }
80
+ themeFontWeight="regular"
81
+ themeIntent="inverted"
82
+ >
83
+ This is a test
84
+ </Text>
85
+ `;
86
+
87
+ exports[`StyledCaption has primary intent style 1`] = `
88
+ <Text
89
+ style={
90
+ Array [
91
+ Object {
92
+ "color": "#401960",
93
+ "fontFamily": "BeVietnamPro-Regular",
94
+ "fontSize": 12,
95
+ "letterSpacing": 0.48,
96
+ "lineHeight": 16,
97
+ },
98
+ undefined,
99
+ ]
100
+ }
101
+ themeFontWeight="regular"
102
+ themeIntent="primary"
103
+ >
104
+ This is a test
105
+ </Text>
106
+ `;
107
+
108
+ exports[`StyledCaption has regular fontWeight style 1`] = `
109
+ <Text
110
+ style={
111
+ Array [
112
+ Object {
113
+ "color": "#001f23",
114
+ "fontFamily": "BeVietnamPro-Regular",
115
+ "fontSize": 12,
116
+ "letterSpacing": 0.48,
117
+ "lineHeight": 16,
118
+ },
119
+ undefined,
120
+ ]
121
+ }
122
+ themeFontWeight="regular"
123
+ themeIntent="body"
124
+ >
125
+ This is a test
126
+ </Text>
127
+ `;
128
+
129
+ exports[`StyledCaption has semi-bold fontWeight style 1`] = `
130
+ <Text
131
+ style={
132
+ Array [
133
+ Object {
134
+ "color": "#001f23",
135
+ "fontFamily": "BeVietnamPro-SemiBold",
136
+ "fontSize": 12,
137
+ "letterSpacing": 0.24,
138
+ "lineHeight": 16,
139
+ },
140
+ undefined,
141
+ ]
142
+ }
143
+ themeFontWeight="semi-bold"
144
+ themeIntent="body"
145
+ >
146
+ This is a test
147
+ </Text>
148
+ `;
149
+
150
+ exports[`StyledCaption has subdued intent style 1`] = `
151
+ <Text
152
+ style={
153
+ Array [
154
+ Object {
155
+ "color": "#4d6265",
156
+ "fontFamily": "BeVietnamPro-Regular",
157
+ "fontSize": 12,
158
+ "letterSpacing": 0.48,
159
+ "lineHeight": 16,
160
+ },
161
+ undefined,
162
+ ]
163
+ }
164
+ themeFontWeight="regular"
165
+ themeIntent="subdued"
166
+ >
167
+ This is a test
168
+ </Text>
169
+ `;
170
+
171
+ exports[`StyledCaption has success intent style 1`] = `
172
+ <Text
173
+ style={
174
+ Array [
175
+ Object {
176
+ "color": "#5ace7d",
177
+ "fontFamily": "BeVietnamPro-Regular",
178
+ "fontSize": 12,
179
+ "letterSpacing": 0.48,
180
+ "lineHeight": 16,
181
+ },
182
+ undefined,
183
+ ]
184
+ }
185
+ themeFontWeight="regular"
186
+ themeIntent="success"
187
+ >
188
+ This is a test
189
+ </Text>
190
+ `;
191
+
192
+ exports[`StyledCaption has warning intent style 1`] = `
193
+ <Text
194
+ style={
195
+ Array [
196
+ Object {
197
+ "color": "#ffbe71",
198
+ "fontFamily": "BeVietnamPro-Regular",
199
+ "fontSize": 12,
200
+ "letterSpacing": 0.48,
201
+ "lineHeight": 16,
202
+ },
203
+ undefined,
204
+ ]
205
+ }
206
+ themeFontWeight="regular"
207
+ themeIntent="warning"
208
+ >
209
+ This is a test
210
+ </Text>
211
+ `;
@@ -0,0 +1,287 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Caption has archived intent style 1`] = `
4
+ <Text
5
+ allowFontScaling={false}
6
+ style={
7
+ Array [
8
+ Object {
9
+ "color": "#737479",
10
+ "fontFamily": "BeVietnamPro-Regular",
11
+ "fontSize": 12,
12
+ "letterSpacing": 0.48,
13
+ "lineHeight": 16,
14
+ },
15
+ undefined,
16
+ ]
17
+ }
18
+ themeFontWeight="regular"
19
+ themeIntent="archived"
20
+ >
21
+ This is a test
22
+ </Text>
23
+ `;
24
+
25
+ exports[`Caption has body intent style 1`] = `
26
+ <Text
27
+ allowFontScaling={false}
28
+ style={
29
+ Array [
30
+ Object {
31
+ "color": "#001f23",
32
+ "fontFamily": "BeVietnamPro-Regular",
33
+ "fontSize": 12,
34
+ "letterSpacing": 0.48,
35
+ "lineHeight": 16,
36
+ },
37
+ undefined,
38
+ ]
39
+ }
40
+ themeFontWeight="regular"
41
+ themeIntent="body"
42
+ >
43
+ This is a test
44
+ </Text>
45
+ `;
46
+
47
+ exports[`Caption has danger intent style 1`] = `
48
+ <Text
49
+ allowFontScaling={false}
50
+ style={
51
+ Array [
52
+ Object {
53
+ "color": "#f46363",
54
+ "fontFamily": "BeVietnamPro-Regular",
55
+ "fontSize": 12,
56
+ "letterSpacing": 0.48,
57
+ "lineHeight": 16,
58
+ },
59
+ undefined,
60
+ ]
61
+ }
62
+ themeFontWeight="regular"
63
+ themeIntent="danger"
64
+ >
65
+ This is a test
66
+ </Text>
67
+ `;
68
+
69
+ exports[`Caption has disabled intent style 1`] = `
70
+ <Text
71
+ allowFontScaling={false}
72
+ style={
73
+ Array [
74
+ Object {
75
+ "color": "#bfc1c5",
76
+ "fontFamily": "BeVietnamPro-Regular",
77
+ "fontSize": 12,
78
+ "letterSpacing": 0.48,
79
+ "lineHeight": 16,
80
+ },
81
+ undefined,
82
+ ]
83
+ }
84
+ themeFontWeight="regular"
85
+ themeIntent="disabled"
86
+ >
87
+ This is a test
88
+ </Text>
89
+ `;
90
+
91
+ exports[`Caption has info intent style 1`] = `
92
+ <Text
93
+ allowFontScaling={false}
94
+ style={
95
+ Array [
96
+ Object {
97
+ "color": "#4568fb",
98
+ "fontFamily": "BeVietnamPro-Regular",
99
+ "fontSize": 12,
100
+ "letterSpacing": 0.48,
101
+ "lineHeight": 16,
102
+ },
103
+ undefined,
104
+ ]
105
+ }
106
+ themeFontWeight="regular"
107
+ themeIntent="info"
108
+ >
109
+ This is a test
110
+ </Text>
111
+ `;
112
+
113
+ exports[`Caption has inverted intent style 1`] = `
114
+ <Text
115
+ allowFontScaling={false}
116
+ style={
117
+ Array [
118
+ Object {
119
+ "color": "#ffffff",
120
+ "fontFamily": "BeVietnamPro-Regular",
121
+ "fontSize": 12,
122
+ "letterSpacing": 0.48,
123
+ "lineHeight": 16,
124
+ },
125
+ undefined,
126
+ ]
127
+ }
128
+ themeFontWeight="regular"
129
+ themeIntent="inverted"
130
+ >
131
+ This is a test
132
+ </Text>
133
+ `;
134
+
135
+ exports[`Caption has primary intent style 1`] = `
136
+ <Text
137
+ allowFontScaling={false}
138
+ style={
139
+ Array [
140
+ Object {
141
+ "color": "#401960",
142
+ "fontFamily": "BeVietnamPro-Regular",
143
+ "fontSize": 12,
144
+ "letterSpacing": 0.48,
145
+ "lineHeight": 16,
146
+ },
147
+ undefined,
148
+ ]
149
+ }
150
+ themeFontWeight="regular"
151
+ themeIntent="primary"
152
+ >
153
+ This is a test
154
+ </Text>
155
+ `;
156
+
157
+ exports[`Caption has regular fontWeight style 1`] = `
158
+ <Text
159
+ allowFontScaling={false}
160
+ style={
161
+ Array [
162
+ Object {
163
+ "color": "#001f23",
164
+ "fontFamily": "BeVietnamPro-Regular",
165
+ "fontSize": 12,
166
+ "letterSpacing": 0.48,
167
+ "lineHeight": 16,
168
+ },
169
+ undefined,
170
+ ]
171
+ }
172
+ themeFontWeight="regular"
173
+ themeIntent="body"
174
+ >
175
+ This is a test
176
+ </Text>
177
+ `;
178
+
179
+ exports[`Caption has secondary intent style 1`] = `
180
+ <Text
181
+ allowFontScaling={false}
182
+ style={
183
+ Array [
184
+ Object {
185
+ "color": "#795e90",
186
+ "fontFamily": "BeVietnamPro-Regular",
187
+ "fontSize": 12,
188
+ "letterSpacing": 0.48,
189
+ "lineHeight": 16,
190
+ },
191
+ undefined,
192
+ ]
193
+ }
194
+ themeFontWeight="regular"
195
+ themeIntent="secondary"
196
+ >
197
+ This is a test
198
+ </Text>
199
+ `;
200
+
201
+ exports[`Caption has semi-bold fontWeight style 1`] = `
202
+ <Text
203
+ allowFontScaling={false}
204
+ style={
205
+ Array [
206
+ Object {
207
+ "color": "#001f23",
208
+ "fontFamily": "BeVietnamPro-SemiBold",
209
+ "fontSize": 12,
210
+ "letterSpacing": 0.24,
211
+ "lineHeight": 16,
212
+ },
213
+ undefined,
214
+ ]
215
+ }
216
+ themeFontWeight="semi-bold"
217
+ themeIntent="body"
218
+ >
219
+ This is a test
220
+ </Text>
221
+ `;
222
+
223
+ exports[`Caption has subdued intent style 1`] = `
224
+ <Text
225
+ allowFontScaling={false}
226
+ style={
227
+ Array [
228
+ Object {
229
+ "color": "#4d6265",
230
+ "fontFamily": "BeVietnamPro-Regular",
231
+ "fontSize": 12,
232
+ "letterSpacing": 0.48,
233
+ "lineHeight": 16,
234
+ },
235
+ undefined,
236
+ ]
237
+ }
238
+ themeFontWeight="regular"
239
+ themeIntent="subdued"
240
+ >
241
+ This is a test
242
+ </Text>
243
+ `;
244
+
245
+ exports[`Caption has success intent style 1`] = `
246
+ <Text
247
+ allowFontScaling={false}
248
+ style={
249
+ Array [
250
+ Object {
251
+ "color": "#5ace7d",
252
+ "fontFamily": "BeVietnamPro-Regular",
253
+ "fontSize": 12,
254
+ "letterSpacing": 0.48,
255
+ "lineHeight": 16,
256
+ },
257
+ undefined,
258
+ ]
259
+ }
260
+ themeFontWeight="regular"
261
+ themeIntent="success"
262
+ >
263
+ This is a test
264
+ </Text>
265
+ `;
266
+
267
+ exports[`Caption has warning intent style 1`] = `
268
+ <Text
269
+ allowFontScaling={false}
270
+ style={
271
+ Array [
272
+ Object {
273
+ "color": "#ffbe71",
274
+ "fontFamily": "BeVietnamPro-Regular",
275
+ "fontSize": 12,
276
+ "letterSpacing": 0.48,
277
+ "lineHeight": 16,
278
+ },
279
+ undefined,
280
+ ]
281
+ }
282
+ themeFontWeight="regular"
283
+ themeIntent="warning"
284
+ >
285
+ This is a test
286
+ </Text>
287
+ `;