@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
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
StyledContainer,
|
|
18
18
|
StyledMaxLengthMessage,
|
|
19
19
|
StyledErrorContainer,
|
|
20
|
-
StyledHelperText,
|
|
21
20
|
StyledAsteriskLabelInsideTextInput,
|
|
22
21
|
StyledTextInputAndLabelContainer,
|
|
23
22
|
StyledLabelContainerInsideTextInput,
|
|
24
23
|
StyledErrorAndHelpTextContainer,
|
|
25
24
|
StyledBorderBackDrop,
|
|
26
25
|
StyledErrorAndMaxLengthContainer,
|
|
26
|
+
StyledHelperText,
|
|
27
27
|
} from './StyledTextInput';
|
|
28
28
|
import Icon from '../Icon';
|
|
29
29
|
import { useTheme } from '../../theme';
|
|
@@ -346,7 +346,6 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
|
|
|
346
346
|
<StyledLabelInsideTextInput
|
|
347
347
|
nativeID={accessibilityLabelledBy}
|
|
348
348
|
testID="input-label"
|
|
349
|
-
fontSize="medium"
|
|
350
349
|
themeState={state}
|
|
351
350
|
>
|
|
352
351
|
{label}
|
|
@@ -396,7 +395,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
|
|
|
396
395
|
!!helpText && <StyledHelperText>{helpText}</StyledHelperText>
|
|
397
396
|
)}
|
|
398
397
|
{shouldShowMaxLength && (
|
|
399
|
-
<StyledMaxLengthMessage themeState={state}
|
|
398
|
+
<StyledMaxLengthMessage themeState={state}>
|
|
400
399
|
{displayText.length}/{maxLength}
|
|
401
400
|
</StyledMaxLengthMessage>
|
|
402
401
|
)}
|
|
@@ -105,14 +105,13 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
105
105
|
Object {
|
|
106
106
|
"color": "#001f23",
|
|
107
107
|
"fontFamily": "BeVietnamPro-Regular",
|
|
108
|
-
"fontSize":
|
|
109
|
-
"letterSpacing": 0.
|
|
110
|
-
"lineHeight":
|
|
108
|
+
"fontSize": 12,
|
|
109
|
+
"letterSpacing": 0.48,
|
|
110
|
+
"lineHeight": 16,
|
|
111
111
|
},
|
|
112
112
|
Array [
|
|
113
113
|
Object {
|
|
114
114
|
"color": "#001f23",
|
|
115
|
-
"fontSize": 12,
|
|
116
115
|
"lineHeight": 12,
|
|
117
116
|
},
|
|
118
117
|
Object {
|
|
@@ -122,11 +121,9 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
122
121
|
]
|
|
123
122
|
}
|
|
124
123
|
testID="input-label"
|
|
125
|
-
themeFontSize="medium"
|
|
126
124
|
themeFontWeight="regular"
|
|
127
125
|
themeIntent="body"
|
|
128
126
|
themeState="filled"
|
|
129
|
-
themeTypeface="neutral"
|
|
130
127
|
>
|
|
131
128
|
Break time
|
|
132
129
|
</Text>
|
|
@@ -188,6 +185,7 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
188
185
|
Object {
|
|
189
186
|
"minHeight": 16,
|
|
190
187
|
"paddingLeft": 16,
|
|
188
|
+
"paddingTop": 2,
|
|
191
189
|
},
|
|
192
190
|
undefined,
|
|
193
191
|
]
|
|
@@ -211,22 +209,15 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
211
209
|
Object {
|
|
212
210
|
"color": "#001f23",
|
|
213
211
|
"fontFamily": "BeVietnamPro-Regular",
|
|
214
|
-
"fontSize":
|
|
215
|
-
"letterSpacing": 0.
|
|
216
|
-
"lineHeight":
|
|
212
|
+
"fontSize": 12,
|
|
213
|
+
"letterSpacing": 0.48,
|
|
214
|
+
"lineHeight": 16,
|
|
217
215
|
},
|
|
218
|
-
|
|
219
|
-
Object {
|
|
220
|
-
"fontSize": 12,
|
|
221
|
-
},
|
|
222
|
-
undefined,
|
|
223
|
-
],
|
|
216
|
+
undefined,
|
|
224
217
|
]
|
|
225
218
|
}
|
|
226
|
-
themeFontSize="medium"
|
|
227
219
|
themeFontWeight="regular"
|
|
228
220
|
themeIntent="body"
|
|
229
|
-
themeTypeface="neutral"
|
|
230
221
|
>
|
|
231
222
|
This is help text
|
|
232
223
|
</Text>
|
|
@@ -342,14 +333,13 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
342
333
|
Object {
|
|
343
334
|
"color": "#001f23",
|
|
344
335
|
"fontFamily": "BeVietnamPro-Regular",
|
|
345
|
-
"fontSize":
|
|
346
|
-
"letterSpacing": 0.
|
|
347
|
-
"lineHeight":
|
|
336
|
+
"fontSize": 12,
|
|
337
|
+
"letterSpacing": 0.48,
|
|
338
|
+
"lineHeight": 16,
|
|
348
339
|
},
|
|
349
340
|
Array [
|
|
350
341
|
Object {
|
|
351
342
|
"color": "#001f23",
|
|
352
|
-
"fontSize": 12,
|
|
353
343
|
"lineHeight": 12,
|
|
354
344
|
},
|
|
355
345
|
Object {
|
|
@@ -359,11 +349,9 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
359
349
|
]
|
|
360
350
|
}
|
|
361
351
|
testID="input-label"
|
|
362
|
-
themeFontSize="medium"
|
|
363
352
|
themeFontWeight="regular"
|
|
364
353
|
themeIntent="body"
|
|
365
354
|
themeState="filled"
|
|
366
|
-
themeTypeface="neutral"
|
|
367
355
|
>
|
|
368
356
|
Break time
|
|
369
357
|
</Text>
|
|
@@ -440,6 +428,7 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
440
428
|
Object {
|
|
441
429
|
"minHeight": 16,
|
|
442
430
|
"paddingLeft": 16,
|
|
431
|
+
"paddingTop": 2,
|
|
443
432
|
},
|
|
444
433
|
undefined,
|
|
445
434
|
]
|
|
@@ -105,14 +105,13 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
105
105
|
Object {
|
|
106
106
|
"color": "#001f23",
|
|
107
107
|
"fontFamily": "BeVietnamPro-Regular",
|
|
108
|
-
"fontSize":
|
|
109
|
-
"letterSpacing": 0.
|
|
110
|
-
"lineHeight":
|
|
108
|
+
"fontSize": 12,
|
|
109
|
+
"letterSpacing": 0.48,
|
|
110
|
+
"lineHeight": 16,
|
|
111
111
|
},
|
|
112
112
|
Array [
|
|
113
113
|
Object {
|
|
114
114
|
"color": "#001f23",
|
|
115
|
-
"fontSize": 12,
|
|
116
115
|
"lineHeight": 12,
|
|
117
116
|
},
|
|
118
117
|
Object {
|
|
@@ -122,11 +121,9 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
122
121
|
]
|
|
123
122
|
}
|
|
124
123
|
testID="input-label"
|
|
125
|
-
themeFontSize="medium"
|
|
126
124
|
themeFontWeight="regular"
|
|
127
125
|
themeIntent="body"
|
|
128
126
|
themeState="filled"
|
|
129
|
-
themeTypeface="neutral"
|
|
130
127
|
>
|
|
131
128
|
Break time
|
|
132
129
|
</Text>
|
|
@@ -188,6 +185,7 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
188
185
|
Object {
|
|
189
186
|
"minHeight": 16,
|
|
190
187
|
"paddingLeft": 16,
|
|
188
|
+
"paddingTop": 2,
|
|
191
189
|
},
|
|
192
190
|
undefined,
|
|
193
191
|
]
|
|
@@ -211,22 +209,15 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
211
209
|
Object {
|
|
212
210
|
"color": "#001f23",
|
|
213
211
|
"fontFamily": "BeVietnamPro-Regular",
|
|
214
|
-
"fontSize":
|
|
215
|
-
"letterSpacing": 0.
|
|
216
|
-
"lineHeight":
|
|
212
|
+
"fontSize": 12,
|
|
213
|
+
"letterSpacing": 0.48,
|
|
214
|
+
"lineHeight": 16,
|
|
217
215
|
},
|
|
218
|
-
|
|
219
|
-
Object {
|
|
220
|
-
"fontSize": 12,
|
|
221
|
-
},
|
|
222
|
-
undefined,
|
|
223
|
-
],
|
|
216
|
+
undefined,
|
|
224
217
|
]
|
|
225
218
|
}
|
|
226
|
-
themeFontSize="medium"
|
|
227
219
|
themeFontWeight="regular"
|
|
228
220
|
themeIntent="body"
|
|
229
|
-
themeTypeface="neutral"
|
|
230
221
|
>
|
|
231
222
|
This is help text
|
|
232
223
|
</Text>
|
|
@@ -342,14 +333,13 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
342
333
|
Object {
|
|
343
334
|
"color": "#001f23",
|
|
344
335
|
"fontFamily": "BeVietnamPro-Regular",
|
|
345
|
-
"fontSize":
|
|
346
|
-
"letterSpacing": 0.
|
|
347
|
-
"lineHeight":
|
|
336
|
+
"fontSize": 12,
|
|
337
|
+
"letterSpacing": 0.48,
|
|
338
|
+
"lineHeight": 16,
|
|
348
339
|
},
|
|
349
340
|
Array [
|
|
350
341
|
Object {
|
|
351
342
|
"color": "#001f23",
|
|
352
|
-
"fontSize": 12,
|
|
353
343
|
"lineHeight": 12,
|
|
354
344
|
},
|
|
355
345
|
Object {
|
|
@@ -359,11 +349,9 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
359
349
|
]
|
|
360
350
|
}
|
|
361
351
|
testID="input-label"
|
|
362
|
-
themeFontSize="medium"
|
|
363
352
|
themeFontWeight="regular"
|
|
364
353
|
themeIntent="body"
|
|
365
354
|
themeState="filled"
|
|
366
|
-
themeTypeface="neutral"
|
|
367
355
|
>
|
|
368
356
|
Break time
|
|
369
357
|
</Text>
|
|
@@ -440,6 +428,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
440
428
|
Object {
|
|
441
429
|
"minHeight": 16,
|
|
442
430
|
"paddingLeft": 16,
|
|
431
|
+
"paddingTop": 2,
|
|
443
432
|
},
|
|
444
433
|
undefined,
|
|
445
434
|
]
|
|
@@ -625,16 +614,15 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
625
614
|
"color": "#001f23",
|
|
626
615
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
627
616
|
"fontSize": 16,
|
|
628
|
-
"letterSpacing": 0.
|
|
617
|
+
"letterSpacing": 0.24,
|
|
629
618
|
"lineHeight": 24,
|
|
630
619
|
},
|
|
631
620
|
undefined,
|
|
632
621
|
]
|
|
633
622
|
}
|
|
634
|
-
themeFontSize="large"
|
|
635
|
-
themeFontWeight="semi-bold"
|
|
636
623
|
themeIntent="body"
|
|
637
624
|
themeTypeface="neutral"
|
|
625
|
+
themeVariant="regular-bold"
|
|
638
626
|
>
|
|
639
627
|
Break time
|
|
640
628
|
</Text>
|
|
@@ -766,28 +754,26 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
766
754
|
Array [
|
|
767
755
|
Object {
|
|
768
756
|
"color": "#001f23",
|
|
769
|
-
"fontFamily": "BeVietnamPro-
|
|
770
|
-
"fontSize":
|
|
771
|
-
"letterSpacing": 0.
|
|
772
|
-
"lineHeight":
|
|
757
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
758
|
+
"fontSize": 16,
|
|
759
|
+
"letterSpacing": 0.24,
|
|
760
|
+
"lineHeight": 24,
|
|
773
761
|
},
|
|
774
762
|
Array [
|
|
775
763
|
Object {
|
|
776
764
|
"color": "#401960",
|
|
777
765
|
"flexShrink": 1,
|
|
778
|
-
"
|
|
779
|
-
"fontSize": 16,
|
|
766
|
+
"lineHeight": 22,
|
|
780
767
|
"textAlign": "center",
|
|
781
768
|
},
|
|
782
769
|
undefined,
|
|
783
770
|
],
|
|
784
771
|
]
|
|
785
772
|
}
|
|
786
|
-
|
|
787
|
-
themeFontWeight="regular"
|
|
773
|
+
themeButtonVariant="text-primary"
|
|
788
774
|
themeIntent="body"
|
|
789
775
|
themeTypeface="neutral"
|
|
790
|
-
themeVariant="
|
|
776
|
+
themeVariant="regular-bold"
|
|
791
777
|
>
|
|
792
778
|
Confirm
|
|
793
779
|
</Text>
|
|
@@ -111,11 +111,12 @@ const Toast = ({
|
|
|
111
111
|
) : null}
|
|
112
112
|
<TextContainer>
|
|
113
113
|
{typeof content === 'string' ? (
|
|
114
|
-
<Typography.
|
|
114
|
+
<Typography.Body
|
|
115
|
+
variant="small"
|
|
115
116
|
intent={intent === 'snackbar' ? 'inverted' : 'body'}
|
|
116
117
|
>
|
|
117
118
|
{content}
|
|
118
|
-
</Typography.
|
|
119
|
+
</Typography.Body>
|
|
119
120
|
) : (
|
|
120
121
|
content
|
|
121
122
|
)}
|
|
@@ -130,12 +131,12 @@ const Toast = ({
|
|
|
130
131
|
}}
|
|
131
132
|
>
|
|
132
133
|
{typeof actionLabel === 'string' ? (
|
|
133
|
-
<Typography.
|
|
134
|
-
|
|
134
|
+
<Typography.Body
|
|
135
|
+
variant="small-bold"
|
|
135
136
|
intent={intent === 'snackbar' ? 'inverted' : 'body'}
|
|
136
137
|
>
|
|
137
138
|
{actionLabel}
|
|
138
|
-
</Typography.
|
|
139
|
+
</Typography.Body>
|
|
139
140
|
) : (
|
|
140
141
|
actionLabel
|
|
141
142
|
)}
|
|
@@ -64,7 +64,11 @@ describe('Toast', () => {
|
|
|
64
64
|
describe('Content', () => {
|
|
65
65
|
it('renders custom content correctly', () => {
|
|
66
66
|
const { getByText } = renderWithTheme(
|
|
67
|
-
<Toast
|
|
67
|
+
<Toast
|
|
68
|
+
content={
|
|
69
|
+
<Typography.Body variant="small">Custom Content</Typography.Body>
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
68
72
|
);
|
|
69
73
|
|
|
70
74
|
expect(getByText('Custom Content')).toBeDefined();
|
|
@@ -89,16 +89,15 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
89
89
|
"color": "#001f23",
|
|
90
90
|
"fontFamily": "BeVietnamPro-Regular",
|
|
91
91
|
"fontSize": 14,
|
|
92
|
-
"letterSpacing": 0.
|
|
92
|
+
"letterSpacing": 0.48,
|
|
93
93
|
"lineHeight": 22,
|
|
94
94
|
},
|
|
95
95
|
undefined,
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
|
-
themeFontSize="medium"
|
|
99
|
-
themeFontWeight="regular"
|
|
100
98
|
themeIntent="body"
|
|
101
99
|
themeTypeface="neutral"
|
|
100
|
+
themeVariant="small"
|
|
102
101
|
>
|
|
103
102
|
Content
|
|
104
103
|
</Text>
|
|
@@ -196,16 +195,15 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
196
195
|
"color": "#001f23",
|
|
197
196
|
"fontFamily": "BeVietnamPro-Regular",
|
|
198
197
|
"fontSize": 14,
|
|
199
|
-
"letterSpacing": 0.
|
|
198
|
+
"letterSpacing": 0.48,
|
|
200
199
|
"lineHeight": 22,
|
|
201
200
|
},
|
|
202
201
|
undefined,
|
|
203
202
|
]
|
|
204
203
|
}
|
|
205
|
-
themeFontSize="medium"
|
|
206
|
-
themeFontWeight="regular"
|
|
207
204
|
themeIntent="body"
|
|
208
205
|
themeTypeface="neutral"
|
|
206
|
+
themeVariant="small"
|
|
209
207
|
>
|
|
210
208
|
Toast Content
|
|
211
209
|
</Text>
|
|
@@ -239,16 +237,15 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
239
237
|
"color": "#001f23",
|
|
240
238
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
241
239
|
"fontSize": 14,
|
|
242
|
-
"letterSpacing": 0.
|
|
240
|
+
"letterSpacing": 0.24,
|
|
243
241
|
"lineHeight": 22,
|
|
244
242
|
},
|
|
245
243
|
undefined,
|
|
246
244
|
]
|
|
247
245
|
}
|
|
248
|
-
themeFontSize="medium"
|
|
249
|
-
themeFontWeight="semi-bold"
|
|
250
246
|
themeIntent="body"
|
|
251
247
|
themeTypeface="neutral"
|
|
248
|
+
themeVariant="small-bold"
|
|
252
249
|
>
|
|
253
250
|
Action
|
|
254
251
|
</Text>
|
|
@@ -345,16 +342,15 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
345
342
|
"color": "#001f23",
|
|
346
343
|
"fontFamily": "BeVietnamPro-Regular",
|
|
347
344
|
"fontSize": 14,
|
|
348
|
-
"letterSpacing": 0.
|
|
345
|
+
"letterSpacing": 0.48,
|
|
349
346
|
"lineHeight": 22,
|
|
350
347
|
},
|
|
351
348
|
undefined,
|
|
352
349
|
]
|
|
353
350
|
}
|
|
354
|
-
themeFontSize="medium"
|
|
355
|
-
themeFontWeight="regular"
|
|
356
351
|
themeIntent="body"
|
|
357
352
|
themeTypeface="neutral"
|
|
353
|
+
themeVariant="small"
|
|
358
354
|
>
|
|
359
355
|
Toast Content
|
|
360
356
|
</Text>
|
|
@@ -388,16 +384,15 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
388
384
|
"color": "#001f23",
|
|
389
385
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
390
386
|
"fontSize": 14,
|
|
391
|
-
"letterSpacing": 0.
|
|
387
|
+
"letterSpacing": 0.24,
|
|
392
388
|
"lineHeight": 22,
|
|
393
389
|
},
|
|
394
390
|
undefined,
|
|
395
391
|
]
|
|
396
392
|
}
|
|
397
|
-
themeFontSize="medium"
|
|
398
|
-
themeFontWeight="semi-bold"
|
|
399
393
|
themeIntent="body"
|
|
400
394
|
themeTypeface="neutral"
|
|
395
|
+
themeVariant="small-bold"
|
|
401
396
|
>
|
|
402
397
|
Action
|
|
403
398
|
</Text>
|
|
@@ -467,16 +462,15 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
467
462
|
"color": "#001f23",
|
|
468
463
|
"fontFamily": "BeVietnamPro-Regular",
|
|
469
464
|
"fontSize": 14,
|
|
470
|
-
"letterSpacing": 0.
|
|
465
|
+
"letterSpacing": 0.48,
|
|
471
466
|
"lineHeight": 22,
|
|
472
467
|
},
|
|
473
468
|
undefined,
|
|
474
469
|
]
|
|
475
470
|
}
|
|
476
|
-
themeFontSize="medium"
|
|
477
|
-
themeFontWeight="regular"
|
|
478
471
|
themeIntent="body"
|
|
479
472
|
themeTypeface="neutral"
|
|
473
|
+
themeVariant="small"
|
|
480
474
|
>
|
|
481
475
|
Toast Content
|
|
482
476
|
</Text>
|
|
@@ -510,16 +504,15 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
510
504
|
"color": "#001f23",
|
|
511
505
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
512
506
|
"fontSize": 14,
|
|
513
|
-
"letterSpacing": 0.
|
|
507
|
+
"letterSpacing": 0.24,
|
|
514
508
|
"lineHeight": 22,
|
|
515
509
|
},
|
|
516
510
|
undefined,
|
|
517
511
|
]
|
|
518
512
|
}
|
|
519
|
-
themeFontSize="medium"
|
|
520
|
-
themeFontWeight="semi-bold"
|
|
521
513
|
themeIntent="body"
|
|
522
514
|
themeTypeface="neutral"
|
|
515
|
+
themeVariant="small-bold"
|
|
523
516
|
>
|
|
524
517
|
Action
|
|
525
518
|
</Text>
|
|
@@ -589,16 +582,15 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
589
582
|
"color": "#ffffff",
|
|
590
583
|
"fontFamily": "BeVietnamPro-Regular",
|
|
591
584
|
"fontSize": 14,
|
|
592
|
-
"letterSpacing": 0.
|
|
585
|
+
"letterSpacing": 0.48,
|
|
593
586
|
"lineHeight": 22,
|
|
594
587
|
},
|
|
595
588
|
undefined,
|
|
596
589
|
]
|
|
597
590
|
}
|
|
598
|
-
themeFontSize="medium"
|
|
599
|
-
themeFontWeight="regular"
|
|
600
591
|
themeIntent="inverted"
|
|
601
592
|
themeTypeface="neutral"
|
|
593
|
+
themeVariant="small"
|
|
602
594
|
>
|
|
603
595
|
Toast Content
|
|
604
596
|
</Text>
|
|
@@ -632,16 +624,15 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
632
624
|
"color": "#ffffff",
|
|
633
625
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
634
626
|
"fontSize": 14,
|
|
635
|
-
"letterSpacing": 0.
|
|
627
|
+
"letterSpacing": 0.24,
|
|
636
628
|
"lineHeight": 22,
|
|
637
629
|
},
|
|
638
630
|
undefined,
|
|
639
631
|
]
|
|
640
632
|
}
|
|
641
|
-
themeFontSize="medium"
|
|
642
|
-
themeFontWeight="semi-bold"
|
|
643
633
|
themeIntent="inverted"
|
|
644
634
|
themeTypeface="neutral"
|
|
635
|
+
themeVariant="small-bold"
|
|
645
636
|
>
|
|
646
637
|
Action
|
|
647
638
|
</Text>
|
|
@@ -738,16 +729,15 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
738
729
|
"color": "#001f23",
|
|
739
730
|
"fontFamily": "BeVietnamPro-Regular",
|
|
740
731
|
"fontSize": 14,
|
|
741
|
-
"letterSpacing": 0.
|
|
732
|
+
"letterSpacing": 0.48,
|
|
742
733
|
"lineHeight": 22,
|
|
743
734
|
},
|
|
744
735
|
undefined,
|
|
745
736
|
]
|
|
746
737
|
}
|
|
747
|
-
themeFontSize="medium"
|
|
748
|
-
themeFontWeight="regular"
|
|
749
738
|
themeIntent="body"
|
|
750
739
|
themeTypeface="neutral"
|
|
740
|
+
themeVariant="small"
|
|
751
741
|
>
|
|
752
742
|
Toast Content
|
|
753
743
|
</Text>
|
|
@@ -781,16 +771,15 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
781
771
|
"color": "#001f23",
|
|
782
772
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
783
773
|
"fontSize": 14,
|
|
784
|
-
"letterSpacing": 0.
|
|
774
|
+
"letterSpacing": 0.24,
|
|
785
775
|
"lineHeight": 22,
|
|
786
776
|
},
|
|
787
777
|
undefined,
|
|
788
778
|
]
|
|
789
779
|
}
|
|
790
|
-
themeFontSize="medium"
|
|
791
|
-
themeFontWeight="semi-bold"
|
|
792
780
|
themeIntent="body"
|
|
793
781
|
themeTypeface="neutral"
|
|
782
|
+
themeVariant="small-bold"
|
|
794
783
|
>
|
|
795
784
|
Action
|
|
796
785
|
</Text>
|
|
@@ -887,16 +876,15 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
887
876
|
"color": "#001f23",
|
|
888
877
|
"fontFamily": "BeVietnamPro-Regular",
|
|
889
878
|
"fontSize": 14,
|
|
890
|
-
"letterSpacing": 0.
|
|
879
|
+
"letterSpacing": 0.48,
|
|
891
880
|
"lineHeight": 22,
|
|
892
881
|
},
|
|
893
882
|
undefined,
|
|
894
883
|
]
|
|
895
884
|
}
|
|
896
|
-
themeFontSize="medium"
|
|
897
|
-
themeFontWeight="regular"
|
|
898
885
|
themeIntent="body"
|
|
899
886
|
themeTypeface="neutral"
|
|
887
|
+
themeVariant="small"
|
|
900
888
|
>
|
|
901
889
|
Toast Content
|
|
902
890
|
</Text>
|
|
@@ -930,16 +918,15 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
930
918
|
"color": "#001f23",
|
|
931
919
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
932
920
|
"fontSize": 14,
|
|
933
|
-
"letterSpacing": 0.
|
|
921
|
+
"letterSpacing": 0.24,
|
|
934
922
|
"lineHeight": 22,
|
|
935
923
|
},
|
|
936
924
|
undefined,
|
|
937
925
|
]
|
|
938
926
|
}
|
|
939
|
-
themeFontSize="medium"
|
|
940
|
-
themeFontWeight="semi-bold"
|
|
941
927
|
themeIntent="body"
|
|
942
928
|
themeTypeface="neutral"
|
|
929
|
+
themeVariant="small-bold"
|
|
943
930
|
>
|
|
944
931
|
Action
|
|
945
932
|
</Text>
|
|
@@ -51,7 +51,7 @@ const IconButtonWrapper = styled(View)(({ theme }) => ({
|
|
|
51
51
|
padding: theme.__hd__.toolbar.space.iconButtonWrapperPadding,
|
|
52
52
|
}));
|
|
53
53
|
|
|
54
|
-
const IconButtonLabel = styled(Typography.
|
|
54
|
+
const IconButtonLabel = styled(Typography.Body)(({ theme }) => ({
|
|
55
55
|
marginLeft: theme.__hd__.toolbar.space.iconButtonLabelMarginLeft,
|
|
56
56
|
}));
|
|
57
57
|
|
|
@@ -55,8 +55,7 @@ const IconItem = ({ icon, intent, disabled, label }: IconItemProps) => {
|
|
|
55
55
|
/>
|
|
56
56
|
{label ? (
|
|
57
57
|
<IconButtonLabel
|
|
58
|
-
|
|
59
|
-
fontWeight="semi-bold"
|
|
58
|
+
variant="regular-bold"
|
|
60
59
|
intent={disabled ? 'subdued' : intent}
|
|
61
60
|
allowFontScaling={false}
|
|
62
61
|
numberOfLines={1}
|
|
@@ -87,15 +86,14 @@ const ToolbarItemContent = ({
|
|
|
87
86
|
}
|
|
88
87
|
if (label) {
|
|
89
88
|
return (
|
|
90
|
-
<Typography.
|
|
91
|
-
|
|
92
|
-
fontWeight="semi-bold"
|
|
89
|
+
<Typography.Body
|
|
90
|
+
variant="regular-bold"
|
|
93
91
|
intent={disabled ? 'disabled' : intent}
|
|
94
92
|
allowFontScaling={false}
|
|
95
93
|
numberOfLines={1}
|
|
96
94
|
>
|
|
97
95
|
{label}
|
|
98
|
-
</Typography.
|
|
96
|
+
</Typography.Body>
|
|
99
97
|
);
|
|
100
98
|
}
|
|
101
99
|
return null;
|