@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.
- package/.turbo/turbo-build.log +1 -1
- package/es/index.js +187 -208
- package/lib/index.js +187 -208
- package/package.json +7 -7
- package/src/components/Accordion/AccordionItem.tsx +1 -3
- package/src/components/Accordion/__tests__/AccordionItem.spec.tsx +5 -5
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +26 -34
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +36 -48
- package/src/components/Accordion/__tests__/index.spec.tsx +2 -2
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +26 -39
- package/src/components/Alert/__tests__/index.spec.tsx +8 -2
- package/src/components/Alert/index.tsx +2 -2
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Attachment/index.tsx +3 -1
- package/src/components/Badge/StyledBadge.tsx +1 -4
- package/src/components/Badge/__tests__/Status.spec.tsx +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +18 -48
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -3
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -12
- package/src/components/BottomNavigation/index.tsx +0 -1
- package/src/components/BottomSheet/Header.tsx +1 -3
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Button/Button.tsx +34 -11
- package/src/components/Button/StyledButton.tsx +45 -38
- package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +2 -4
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +8 -14
- package/src/components/Button/__tests__/StyledButton.spec.tsx +12 -6
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +66 -90
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +56 -86
- package/src/components/Calendar/CalendarRowItem.tsx +5 -2
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +10 -15
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +12 -18
- package/src/components/Card/__tests__/index.spec.tsx +1 -1
- package/src/components/Carousel/CarouselItem.tsx +4 -4
- package/src/components/Carousel/StyledCarousel.tsx +1 -4
- package/src/components/Carousel/__tests__/CardCarousel.spec.tsx +18 -18
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +24 -20
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +99 -165
- package/src/components/Checkbox/StyledCheckbox.tsx +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +8 -12
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/ContentNavigator/StyledContentNavigator.tsx +1 -6
- package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +1 -9
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -29
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +124 -17
- package/src/components/ContentNavigator/__tests__/index.spec.tsx +16 -0
- package/src/components/ContentNavigator/index.tsx +30 -9
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +12 -18
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +4 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +13 -18
- package/src/components/Empty/StyledEmpty.tsx +2 -6
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +22 -36
- package/src/components/Empty/index.tsx +4 -2
- package/src/components/Error/StyledError.tsx +2 -8
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +44 -76
- package/src/components/Error/index.tsx +6 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -4
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -5
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +54 -116
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/FAB/StyledFAB.tsx +1 -4
- package/src/components/FAB/__tests__/StyledFAB.spec.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +4 -8
- package/src/components/List/BasicListItem.tsx +2 -6
- package/src/components/List/ListItem.tsx +3 -5
- package/src/components/List/__tests__/ListItem.spec.tsx +4 -4
- package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +3 -1
- package/src/components/List/__tests__/StyledListItem.spec.tsx +3 -1
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -10
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +23 -37
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +8 -12
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +8 -12
- package/src/components/PageControl/index.tsx +0 -1
- package/src/components/PinInput/PinCell.tsx +3 -1
- package/src/components/PinInput/StyledPinInput.tsx +2 -7
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +25 -45
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +18 -34
- package/src/components/Progress/ProgressCircle.tsx +1 -3
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -6
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -4
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -6
- package/src/components/RichTextEditor/RichTextEditor.tsx +2 -9
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +16 -24
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/SectionHeading/__tests__/index.spec.tsx +3 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +86 -130
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +6 -10
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -24
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +49 -79
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +5 -9
- package/src/components/Success/StyledSuccess.tsx +2 -6
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +40 -64
- package/src/components/Success/index.tsx +3 -1
- package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +2 -2
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +6 -9
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +2 -3
- package/src/components/Swipeable/__tests__/index.spec.tsx +6 -4
- package/src/components/Switch/SelectorSwitch/Option.tsx +1 -1
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -2
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -2
- package/src/components/Tabs/ScrollableTabsHeader.tsx +3 -3
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +4 -4
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +6 -9
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +33 -60
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +7 -13
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +3 -8
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +45 -81
- package/src/components/Tabs/index.tsx +3 -3
- package/src/components/Tag/StyledTag.tsx +1 -4
- package/src/components/Tag/__tests__/Tag.spec.tsx +5 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +47 -93
- package/src/components/Tag/index.tsx +5 -1
- package/src/components/TextInput/StyledTextInput.tsx +8 -16
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +72 -134
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +145 -257
- package/src/components/TextInput/index.tsx +2 -3
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +12 -23
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +21 -35
- package/src/components/Toast/Toast.tsx +6 -5
- package/src/components/Toast/__tests__/Toast.spec.tsx +5 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +26 -39
- package/src/components/Toolbar/StyledToolbar.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +4 -6
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -18
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +14 -21
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -0
- package/src/theme/components/badge.ts +15 -0
- package/src/theme/components/button.ts +16 -0
- package/src/theme/components/carousel.ts +15 -0
- package/src/theme/components/empty.ts +12 -0
- package/src/theme/components/error.ts +16 -0
- package/src/theme/components/fab.ts +11 -0
- package/src/theme/components/pinInput.ts +15 -0
- package/src/theme/components/success.ts +12 -0
- package/src/theme/components/tag.ts +16 -0
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/getTheme.ts +18 -18
- package/types/components/Badge/StyledBadge.d.ts +1 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +12 -5
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -1
- package/types/components/Carousel/StyledCarousel.d.ts +1 -1
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +1 -5
- package/types/components/Empty/StyledEmpty.d.ts +2 -2
- package/types/components/Error/StyledError.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +1 -1
- package/types/components/FAB/StyledFAB.d.ts +1 -1
- package/types/components/PinInput/StyledPinInput.d.ts +2 -2
- package/types/components/Success/StyledSuccess.d.ts +2 -2
- package/types/components/Tag/StyledTag.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +7 -10
- package/types/components/Toolbar/StyledToolbar.d.ts +1 -1
- package/types/theme/components/badge.d.ts +15 -0
- package/types/theme/components/button.d.ts +14 -0
- package/types/theme/components/carousel.d.ts +15 -0
- package/types/theme/components/empty.d.ts +11 -0
- package/types/theme/components/error.d.ts +15 -0
- package/types/theme/components/fab.d.ts +11 -0
- package/types/theme/components/pinInput.d.ts +15 -0
- package/types/theme/components/success.d.ts +11 -0
- package/types/theme/components/tag.d.ts +15 -0
- package/types/theme/components/textInput.d.ts +1 -0
- package/types/theme/getTheme.d.ts +18 -18
|
@@ -60,12 +60,8 @@ const renderSingleOption = ({
|
|
|
60
60
|
onPress={onPress}
|
|
61
61
|
title={
|
|
62
62
|
<>
|
|
63
|
-
<Typography.
|
|
64
|
-
|
|
65
|
-
</Typography.Text>
|
|
66
|
-
<Typography.Text fontSize="large" intent="subdued">
|
|
67
|
-
{item.role}
|
|
68
|
-
</Typography.Text>
|
|
63
|
+
<Typography.Body variant="regular-bold">{item.text}</Typography.Body>
|
|
64
|
+
<Typography.Body intent="subdued">{item.role}</Typography.Body>
|
|
69
65
|
</>
|
|
70
66
|
}
|
|
71
67
|
/>
|
|
@@ -176,7 +172,7 @@ describe('rendering', () => {
|
|
|
176
172
|
value="daniel"
|
|
177
173
|
onConfirm={jest.fn()}
|
|
178
174
|
renderSelectedValue={(selectedValue, _inputProps) => (
|
|
179
|
-
<Typography.
|
|
175
|
+
<Typography.Body>Custom {selectedValue}</Typography.Body>
|
|
180
176
|
)}
|
|
181
177
|
/>
|
|
182
178
|
);
|
|
@@ -191,7 +187,7 @@ describe('rendering', () => {
|
|
|
191
187
|
value=""
|
|
192
188
|
onConfirm={jest.fn()}
|
|
193
189
|
renderSelectedValue={() => (
|
|
194
|
-
<Typography.
|
|
190
|
+
<Typography.Body>Custom value</Typography.Body>
|
|
195
191
|
)}
|
|
196
192
|
/>
|
|
197
193
|
);
|
|
@@ -206,7 +202,7 @@ describe('rendering', () => {
|
|
|
206
202
|
value="Jack"
|
|
207
203
|
onConfirm={jest.fn()}
|
|
208
204
|
renderSelectedValue={(selectedValue) => (
|
|
209
|
-
<Typography.
|
|
205
|
+
<Typography.Body>{`Selected: ${selectedValue}`}</Typography.Body>
|
|
210
206
|
)}
|
|
211
207
|
/>
|
|
212
208
|
);
|
|
@@ -40,17 +40,13 @@ const StyledSuccessImageContainer = styled(View)(({ theme }) => ({
|
|
|
40
40
|
height: theme.__hd__.success.sizes.image,
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
const StyledSuccessTitle = styled(Typography.
|
|
44
|
-
fontFamily: theme.__hd__.success.fonts.title,
|
|
45
|
-
fontSize: theme.__hd__.success.fontSizes.title,
|
|
43
|
+
const StyledSuccessTitle = styled(Typography.Title)(({ theme }) => ({
|
|
46
44
|
textAlign: 'center',
|
|
47
45
|
marginBottom: theme.__hd__.success.space.titleMarginBottom,
|
|
48
46
|
color: theme.__hd__.success.colors.title,
|
|
49
47
|
}));
|
|
50
48
|
|
|
51
|
-
const StyledSuccessDescription = styled(Typography.
|
|
52
|
-
fontFamily: theme.__hd__.success.fonts.description,
|
|
53
|
-
fontSize: theme.__hd__.success.fontSizes.description,
|
|
49
|
+
const StyledSuccessDescription = styled(Typography.Body)(({ theme }) => ({
|
|
54
50
|
textAlign: 'center',
|
|
55
51
|
color: theme.__hd__.success.colors.description,
|
|
56
52
|
}));
|
|
@@ -89,16 +89,14 @@ exports[`Success renders full screen success page correctly 1`] = `
|
|
|
89
89
|
Array [
|
|
90
90
|
Object {
|
|
91
91
|
"color": "#001f23",
|
|
92
|
-
"fontFamily": "
|
|
93
|
-
"fontSize":
|
|
94
|
-
"letterSpacing": 0.
|
|
95
|
-
"lineHeight":
|
|
92
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
93
|
+
"fontSize": 24,
|
|
94
|
+
"letterSpacing": 0.24,
|
|
95
|
+
"lineHeight": 32,
|
|
96
96
|
},
|
|
97
97
|
Array [
|
|
98
98
|
Object {
|
|
99
99
|
"color": "#001f23",
|
|
100
|
-
"fontFamily": "RebondGrotesque-SemiBold",
|
|
101
|
-
"fontSize": 24,
|
|
102
100
|
"marginBottom": 8,
|
|
103
101
|
"textAlign": "center",
|
|
104
102
|
},
|
|
@@ -106,10 +104,9 @@ exports[`Success renders full screen success page correctly 1`] = `
|
|
|
106
104
|
],
|
|
107
105
|
]
|
|
108
106
|
}
|
|
109
|
-
themeFontSize="medium"
|
|
110
|
-
themeFontWeight="regular"
|
|
111
107
|
themeIntent="body"
|
|
112
|
-
|
|
108
|
+
themeLevel="h4"
|
|
109
|
+
themeTypeface="playful"
|
|
113
110
|
>
|
|
114
111
|
We’re sorry, something went wrong
|
|
115
112
|
</Text>
|
|
@@ -120,25 +117,22 @@ exports[`Success renders full screen success page correctly 1`] = `
|
|
|
120
117
|
Object {
|
|
121
118
|
"color": "#001f23",
|
|
122
119
|
"fontFamily": "BeVietnamPro-Regular",
|
|
123
|
-
"fontSize":
|
|
124
|
-
"letterSpacing": 0.
|
|
125
|
-
"lineHeight":
|
|
120
|
+
"fontSize": 16,
|
|
121
|
+
"letterSpacing": 0.48,
|
|
122
|
+
"lineHeight": 24,
|
|
126
123
|
},
|
|
127
124
|
Array [
|
|
128
125
|
Object {
|
|
129
126
|
"color": "#4d6265",
|
|
130
|
-
"fontFamily": "RebondGrotesque",
|
|
131
|
-
"fontSize": 18,
|
|
132
127
|
"textAlign": "center",
|
|
133
128
|
},
|
|
134
129
|
undefined,
|
|
135
130
|
],
|
|
136
131
|
]
|
|
137
132
|
}
|
|
138
|
-
themeFontSize="medium"
|
|
139
|
-
themeFontWeight="regular"
|
|
140
133
|
themeIntent="body"
|
|
141
134
|
themeTypeface="neutral"
|
|
135
|
+
themeVariant="regular"
|
|
142
136
|
>
|
|
143
137
|
Please try again later
|
|
144
138
|
</Text>
|
|
@@ -214,16 +208,14 @@ exports[`Success renders succe screen with custom image element correctly 1`] =
|
|
|
214
208
|
Array [
|
|
215
209
|
Object {
|
|
216
210
|
"color": "#001f23",
|
|
217
|
-
"fontFamily": "
|
|
218
|
-
"fontSize":
|
|
219
|
-
"letterSpacing": 0.
|
|
220
|
-
"lineHeight":
|
|
211
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
212
|
+
"fontSize": 24,
|
|
213
|
+
"letterSpacing": 0.24,
|
|
214
|
+
"lineHeight": 32,
|
|
221
215
|
},
|
|
222
216
|
Array [
|
|
223
217
|
Object {
|
|
224
218
|
"color": "#001f23",
|
|
225
|
-
"fontFamily": "RebondGrotesque-SemiBold",
|
|
226
|
-
"fontSize": 24,
|
|
227
219
|
"marginBottom": 8,
|
|
228
220
|
"textAlign": "center",
|
|
229
221
|
},
|
|
@@ -231,10 +223,9 @@ exports[`Success renders succe screen with custom image element correctly 1`] =
|
|
|
231
223
|
],
|
|
232
224
|
]
|
|
233
225
|
}
|
|
234
|
-
themeFontSize="medium"
|
|
235
|
-
themeFontWeight="regular"
|
|
236
226
|
themeIntent="body"
|
|
237
|
-
|
|
227
|
+
themeLevel="h4"
|
|
228
|
+
themeTypeface="playful"
|
|
238
229
|
>
|
|
239
230
|
We’re sorry, something went wrong
|
|
240
231
|
</Text>
|
|
@@ -245,25 +236,22 @@ exports[`Success renders succe screen with custom image element correctly 1`] =
|
|
|
245
236
|
Object {
|
|
246
237
|
"color": "#001f23",
|
|
247
238
|
"fontFamily": "BeVietnamPro-Regular",
|
|
248
|
-
"fontSize":
|
|
249
|
-
"letterSpacing": 0.
|
|
250
|
-
"lineHeight":
|
|
239
|
+
"fontSize": 16,
|
|
240
|
+
"letterSpacing": 0.48,
|
|
241
|
+
"lineHeight": 24,
|
|
251
242
|
},
|
|
252
243
|
Array [
|
|
253
244
|
Object {
|
|
254
245
|
"color": "#4d6265",
|
|
255
|
-
"fontFamily": "RebondGrotesque",
|
|
256
|
-
"fontSize": 18,
|
|
257
246
|
"textAlign": "center",
|
|
258
247
|
},
|
|
259
248
|
undefined,
|
|
260
249
|
],
|
|
261
250
|
]
|
|
262
251
|
}
|
|
263
|
-
themeFontSize="medium"
|
|
264
|
-
themeFontWeight="regular"
|
|
265
252
|
themeIntent="body"
|
|
266
253
|
themeTypeface="neutral"
|
|
254
|
+
themeVariant="regular"
|
|
267
255
|
>
|
|
268
256
|
Please try again later
|
|
269
257
|
</Text>
|
|
@@ -346,16 +334,14 @@ exports[`Success renders success screen with image correctly 1`] = `
|
|
|
346
334
|
Array [
|
|
347
335
|
Object {
|
|
348
336
|
"color": "#001f23",
|
|
349
|
-
"fontFamily": "
|
|
350
|
-
"fontSize":
|
|
351
|
-
"letterSpacing": 0.
|
|
352
|
-
"lineHeight":
|
|
337
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
338
|
+
"fontSize": 24,
|
|
339
|
+
"letterSpacing": 0.24,
|
|
340
|
+
"lineHeight": 32,
|
|
353
341
|
},
|
|
354
342
|
Array [
|
|
355
343
|
Object {
|
|
356
344
|
"color": "#001f23",
|
|
357
|
-
"fontFamily": "RebondGrotesque-SemiBold",
|
|
358
|
-
"fontSize": 24,
|
|
359
345
|
"marginBottom": 8,
|
|
360
346
|
"textAlign": "center",
|
|
361
347
|
},
|
|
@@ -363,10 +349,9 @@ exports[`Success renders success screen with image correctly 1`] = `
|
|
|
363
349
|
],
|
|
364
350
|
]
|
|
365
351
|
}
|
|
366
|
-
themeFontSize="medium"
|
|
367
|
-
themeFontWeight="regular"
|
|
368
352
|
themeIntent="body"
|
|
369
|
-
|
|
353
|
+
themeLevel="h4"
|
|
354
|
+
themeTypeface="playful"
|
|
370
355
|
>
|
|
371
356
|
We’re sorry, something went wrong
|
|
372
357
|
</Text>
|
|
@@ -377,25 +362,22 @@ exports[`Success renders success screen with image correctly 1`] = `
|
|
|
377
362
|
Object {
|
|
378
363
|
"color": "#001f23",
|
|
379
364
|
"fontFamily": "BeVietnamPro-Regular",
|
|
380
|
-
"fontSize":
|
|
381
|
-
"letterSpacing": 0.
|
|
382
|
-
"lineHeight":
|
|
365
|
+
"fontSize": 16,
|
|
366
|
+
"letterSpacing": 0.48,
|
|
367
|
+
"lineHeight": 24,
|
|
383
368
|
},
|
|
384
369
|
Array [
|
|
385
370
|
Object {
|
|
386
371
|
"color": "#4d6265",
|
|
387
|
-
"fontFamily": "RebondGrotesque",
|
|
388
|
-
"fontSize": 18,
|
|
389
372
|
"textAlign": "center",
|
|
390
373
|
},
|
|
391
374
|
undefined,
|
|
392
375
|
],
|
|
393
376
|
]
|
|
394
377
|
}
|
|
395
|
-
themeFontSize="medium"
|
|
396
|
-
themeFontWeight="regular"
|
|
397
378
|
themeIntent="body"
|
|
398
379
|
themeTypeface="neutral"
|
|
380
|
+
themeVariant="regular"
|
|
399
381
|
>
|
|
400
382
|
Please try again later
|
|
401
383
|
</Text>
|
|
@@ -439,16 +421,14 @@ exports[`Success renders title only correctly 1`] = `
|
|
|
439
421
|
Array [
|
|
440
422
|
Object {
|
|
441
423
|
"color": "#001f23",
|
|
442
|
-
"fontFamily": "
|
|
443
|
-
"fontSize":
|
|
444
|
-
"letterSpacing": 0.
|
|
445
|
-
"lineHeight":
|
|
424
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
425
|
+
"fontSize": 24,
|
|
426
|
+
"letterSpacing": 0.24,
|
|
427
|
+
"lineHeight": 32,
|
|
446
428
|
},
|
|
447
429
|
Array [
|
|
448
430
|
Object {
|
|
449
431
|
"color": "#001f23",
|
|
450
|
-
"fontFamily": "RebondGrotesque-SemiBold",
|
|
451
|
-
"fontSize": 24,
|
|
452
432
|
"marginBottom": 8,
|
|
453
433
|
"textAlign": "center",
|
|
454
434
|
},
|
|
@@ -456,10 +436,9 @@ exports[`Success renders title only correctly 1`] = `
|
|
|
456
436
|
],
|
|
457
437
|
]
|
|
458
438
|
}
|
|
459
|
-
themeFontSize="medium"
|
|
460
|
-
themeFontWeight="regular"
|
|
461
439
|
themeIntent="body"
|
|
462
|
-
|
|
440
|
+
themeLevel="h4"
|
|
441
|
+
themeTypeface="playful"
|
|
463
442
|
>
|
|
464
443
|
We’re sorry, something went wrong
|
|
465
444
|
</Text>
|
|
@@ -470,25 +449,22 @@ exports[`Success renders title only correctly 1`] = `
|
|
|
470
449
|
Object {
|
|
471
450
|
"color": "#001f23",
|
|
472
451
|
"fontFamily": "BeVietnamPro-Regular",
|
|
473
|
-
"fontSize":
|
|
474
|
-
"letterSpacing": 0.
|
|
475
|
-
"lineHeight":
|
|
452
|
+
"fontSize": 16,
|
|
453
|
+
"letterSpacing": 0.48,
|
|
454
|
+
"lineHeight": 24,
|
|
476
455
|
},
|
|
477
456
|
Array [
|
|
478
457
|
Object {
|
|
479
458
|
"color": "#4d6265",
|
|
480
|
-
"fontFamily": "RebondGrotesque",
|
|
481
|
-
"fontSize": 18,
|
|
482
459
|
"textAlign": "center",
|
|
483
460
|
},
|
|
484
461
|
undefined,
|
|
485
462
|
],
|
|
486
463
|
]
|
|
487
464
|
}
|
|
488
|
-
themeFontSize="medium"
|
|
489
|
-
themeFontWeight="regular"
|
|
490
465
|
themeIntent="body"
|
|
491
466
|
themeTypeface="neutral"
|
|
467
|
+
themeVariant="regular"
|
|
492
468
|
>
|
|
493
469
|
Please try again later
|
|
494
470
|
</Text>
|
|
@@ -104,7 +104,9 @@ const SuccessPage = ({
|
|
|
104
104
|
{renderImage(image)}
|
|
105
105
|
</StyledSuccessImageContainer>
|
|
106
106
|
)}
|
|
107
|
-
<StyledSuccessTitle>
|
|
107
|
+
<StyledSuccessTitle level="h4" typeface="playful">
|
|
108
|
+
{title}
|
|
109
|
+
</StyledSuccessTitle>
|
|
108
110
|
|
|
109
111
|
{!!description && (
|
|
110
112
|
<StyledSuccessDescription>{description}</StyledSuccessDescription>
|
|
@@ -13,7 +13,7 @@ describe('rendering', () => {
|
|
|
13
13
|
`('renders correctly when intent is $intent', ({ intent }) => {
|
|
14
14
|
const { toJSON, getByText } = renderWithTheme(
|
|
15
15
|
<SwipeableAction intent={intent}>
|
|
16
|
-
<Typography.
|
|
16
|
+
<Typography.Body variant="small">Action title</Typography.Body>
|
|
17
17
|
</SwipeableAction>
|
|
18
18
|
);
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ describe('behavior', () => {
|
|
|
27
27
|
const onPress = jest.fn();
|
|
28
28
|
const { getByText } = renderWithTheme(
|
|
29
29
|
<SwipeableAction onPress={onPress}>
|
|
30
|
-
<Typography.
|
|
30
|
+
<Typography.Body variant="small">Action title</Typography.Body>
|
|
31
31
|
</SwipeableAction>
|
|
32
32
|
);
|
|
33
33
|
|
|
@@ -28,16 +28,15 @@ exports[`rendering renders correctly when intent is danger 1`] = `
|
|
|
28
28
|
"color": "#001f23",
|
|
29
29
|
"fontFamily": "BeVietnamPro-Regular",
|
|
30
30
|
"fontSize": 14,
|
|
31
|
-
"letterSpacing": 0.
|
|
31
|
+
"letterSpacing": 0.48,
|
|
32
32
|
"lineHeight": 22,
|
|
33
33
|
},
|
|
34
34
|
undefined,
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
|
-
themeFontSize="medium"
|
|
38
|
-
themeFontWeight="regular"
|
|
39
37
|
themeIntent="body"
|
|
40
38
|
themeTypeface="neutral"
|
|
39
|
+
themeVariant="small"
|
|
41
40
|
>
|
|
42
41
|
Action title
|
|
43
42
|
</Text>
|
|
@@ -72,16 +71,15 @@ exports[`rendering renders correctly when intent is primary 1`] = `
|
|
|
72
71
|
"color": "#001f23",
|
|
73
72
|
"fontFamily": "BeVietnamPro-Regular",
|
|
74
73
|
"fontSize": 14,
|
|
75
|
-
"letterSpacing": 0.
|
|
74
|
+
"letterSpacing": 0.48,
|
|
76
75
|
"lineHeight": 22,
|
|
77
76
|
},
|
|
78
77
|
undefined,
|
|
79
78
|
]
|
|
80
79
|
}
|
|
81
|
-
themeFontSize="medium"
|
|
82
|
-
themeFontWeight="regular"
|
|
83
80
|
themeIntent="body"
|
|
84
81
|
themeTypeface="neutral"
|
|
82
|
+
themeVariant="small"
|
|
85
83
|
>
|
|
86
84
|
Action title
|
|
87
85
|
</Text>
|
|
@@ -116,16 +114,15 @@ exports[`rendering renders correctly when intent is success 1`] = `
|
|
|
116
114
|
"color": "#001f23",
|
|
117
115
|
"fontFamily": "BeVietnamPro-Regular",
|
|
118
116
|
"fontSize": 14,
|
|
119
|
-
"letterSpacing": 0.
|
|
117
|
+
"letterSpacing": 0.48,
|
|
120
118
|
"lineHeight": 22,
|
|
121
119
|
},
|
|
122
120
|
undefined,
|
|
123
121
|
]
|
|
124
122
|
}
|
|
125
|
-
themeFontSize="medium"
|
|
126
|
-
themeFontWeight="regular"
|
|
127
123
|
themeIntent="body"
|
|
128
124
|
themeTypeface="neutral"
|
|
125
|
+
themeVariant="small"
|
|
129
126
|
>
|
|
130
127
|
Action title
|
|
131
128
|
</Text>
|
|
@@ -17,16 +17,15 @@ exports[`Swipeable renders correctly 1`] = `
|
|
|
17
17
|
"color": "#001f23",
|
|
18
18
|
"fontFamily": "BeVietnamPro-Regular",
|
|
19
19
|
"fontSize": 14,
|
|
20
|
-
"letterSpacing": 0.
|
|
20
|
+
"letterSpacing": 0.48,
|
|
21
21
|
"lineHeight": 22,
|
|
22
22
|
},
|
|
23
23
|
undefined,
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
|
-
themeFontSize="medium"
|
|
27
|
-
themeFontWeight="regular"
|
|
28
26
|
themeIntent="body"
|
|
29
27
|
themeTypeface="neutral"
|
|
28
|
+
themeVariant="small"
|
|
30
29
|
>
|
|
31
30
|
Swipeable Item
|
|
32
31
|
</Text>
|
|
@@ -9,22 +9,24 @@ describe('Swipeable', () => {
|
|
|
9
9
|
<Swipeable
|
|
10
10
|
leftActions={
|
|
11
11
|
<Swipeable.Action intent="primary">
|
|
12
|
-
<Typography.
|
|
12
|
+
<Typography.Body variant="small" intent="inverted">
|
|
13
|
+
Archived
|
|
14
|
+
</Typography.Body>
|
|
13
15
|
</Swipeable.Action>
|
|
14
16
|
}
|
|
15
17
|
rightActions={
|
|
16
18
|
<>
|
|
17
19
|
<Swipeable.Action intent="success">
|
|
18
|
-
<Typography.
|
|
20
|
+
<Typography.Body variant="small">Approve</Typography.Body>
|
|
19
21
|
</Swipeable.Action>
|
|
20
22
|
<Swipeable.Action intent="danger">
|
|
21
|
-
<Typography.
|
|
23
|
+
<Typography.Body variant="small">Decline</Typography.Body>
|
|
22
24
|
</Swipeable.Action>
|
|
23
25
|
</>
|
|
24
26
|
}
|
|
25
27
|
rightActionsWidth={168}
|
|
26
28
|
>
|
|
27
|
-
<Typography.
|
|
29
|
+
<Typography.Body variant="small">Swipeable Item</Typography.Body>
|
|
28
30
|
</Swipeable>
|
|
29
31
|
);
|
|
30
32
|
|
|
@@ -104,10 +104,9 @@ exports[`Option renders correctly when selected 1`] = `
|
|
|
104
104
|
undefined,
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
|
-
themeFontSize="large"
|
|
108
|
-
themeFontWeight="regular"
|
|
109
107
|
themeIntent="body"
|
|
110
108
|
themeTypeface="neutral"
|
|
109
|
+
themeVariant="regular"
|
|
111
110
|
>
|
|
112
111
|
My Dashboard
|
|
113
112
|
</Text>
|
|
@@ -44,13 +44,13 @@ const getTabItem = ({
|
|
|
44
44
|
|
|
45
45
|
if (typeof item === 'string') {
|
|
46
46
|
return (
|
|
47
|
-
<Typography.
|
|
48
|
-
|
|
47
|
+
<Typography.Body
|
|
48
|
+
variant={active ? 'regular-bold' : 'regular'}
|
|
49
49
|
numberOfLines={1}
|
|
50
50
|
style={{ color }}
|
|
51
51
|
>
|
|
52
52
|
{item}
|
|
53
|
-
</Typography.
|
|
53
|
+
</Typography.Body>
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -16,7 +16,7 @@ describe('ScenceView', () => {
|
|
|
16
16
|
lazy
|
|
17
17
|
lazyPreloadDistance={1}
|
|
18
18
|
>
|
|
19
|
-
<Typography.
|
|
19
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
20
20
|
</ScenceView>
|
|
21
21
|
);
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ describe('ScenceView', () => {
|
|
|
32
32
|
lazy
|
|
33
33
|
lazyPreloadDistance={1}
|
|
34
34
|
>
|
|
35
|
-
<Typography.
|
|
35
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
36
36
|
</ScenceView>
|
|
37
37
|
</ThemeProvider>
|
|
38
38
|
);
|
|
@@ -49,7 +49,7 @@ describe('ScenceView', () => {
|
|
|
49
49
|
lazy
|
|
50
50
|
lazyPreloadDistance={1}
|
|
51
51
|
>
|
|
52
|
-
<Typography.
|
|
52
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
53
53
|
</ScenceView>
|
|
54
54
|
);
|
|
55
55
|
|
|
@@ -65,7 +65,7 @@ describe('ScenceView', () => {
|
|
|
65
65
|
lazy
|
|
66
66
|
lazyPreloadDistance={1}
|
|
67
67
|
>
|
|
68
|
-
<Typography.
|
|
68
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
69
69
|
</ScenceView>
|
|
70
70
|
</ThemeProvider>
|
|
71
71
|
);
|
|
@@ -50,16 +50,15 @@ exports[`ScenceView lazy not renders child correctly when the scence is lazy and
|
|
|
50
50
|
"color": "#001f23",
|
|
51
51
|
"fontFamily": "BeVietnamPro-Regular",
|
|
52
52
|
"fontSize": 14,
|
|
53
|
-
"letterSpacing": 0.
|
|
53
|
+
"letterSpacing": 0.48,
|
|
54
54
|
"lineHeight": 22,
|
|
55
55
|
},
|
|
56
56
|
undefined,
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
themeFontSize="medium"
|
|
60
|
-
themeFontWeight="regular"
|
|
61
59
|
themeIntent="body"
|
|
62
60
|
themeTypeface="neutral"
|
|
61
|
+
themeVariant="small"
|
|
63
62
|
>
|
|
64
63
|
Scene 1
|
|
65
64
|
</Text>
|
|
@@ -100,16 +99,15 @@ exports[`ScenceView lazy renders child correctly when the scence is focused and
|
|
|
100
99
|
"color": "#001f23",
|
|
101
100
|
"fontFamily": "BeVietnamPro-Regular",
|
|
102
101
|
"fontSize": 14,
|
|
103
|
-
"letterSpacing": 0.
|
|
102
|
+
"letterSpacing": 0.48,
|
|
104
103
|
"lineHeight": 22,
|
|
105
104
|
},
|
|
106
105
|
undefined,
|
|
107
106
|
]
|
|
108
107
|
}
|
|
109
|
-
themeFontSize="medium"
|
|
110
|
-
themeFontWeight="regular"
|
|
111
108
|
themeIntent="body"
|
|
112
109
|
themeTypeface="neutral"
|
|
110
|
+
themeVariant="small"
|
|
113
111
|
>
|
|
114
112
|
Scene 1
|
|
115
113
|
</Text>
|
|
@@ -144,16 +142,15 @@ exports[`ScenceView lazy renders child correctly when the scence is focused and
|
|
|
144
142
|
"color": "#001f23",
|
|
145
143
|
"fontFamily": "BeVietnamPro-Regular",
|
|
146
144
|
"fontSize": 14,
|
|
147
|
-
"letterSpacing": 0.
|
|
145
|
+
"letterSpacing": 0.48,
|
|
148
146
|
"lineHeight": 22,
|
|
149
147
|
},
|
|
150
148
|
undefined,
|
|
151
149
|
]
|
|
152
150
|
}
|
|
153
|
-
themeFontSize="medium"
|
|
154
|
-
themeFontWeight="regular"
|
|
155
151
|
themeIntent="body"
|
|
156
152
|
themeTypeface="neutral"
|
|
153
|
+
themeVariant="small"
|
|
157
154
|
>
|
|
158
155
|
Scene 1
|
|
159
156
|
</Text>
|