@hero-design/rn 8.52.2-rc2.0 → 8.53.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +4 -16
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +997 -700
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +996 -698
- package/package.json +7 -7
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -0
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +2 -0
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -0
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -0
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +6 -0
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -0
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +60 -0
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +413 -0
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +97 -0
- package/src/components/BottomNavigation/index.tsx +166 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +21 -32
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +21 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +10 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +10 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +16 -0
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +1 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +32 -0
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +7 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -0
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +2 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +4 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +1 -0
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +803 -1
- package/src/components/Carousel/__tests__/index.spec.tsx +47 -37
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +8 -0
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/Checkbox/index.tsx +13 -1
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +2 -0
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +15 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +329 -309
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +12 -0
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Error/index.tsx +20 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/FAB/ActionGroup/index.tsx +14 -1
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -0
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -0
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +7 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +9 -0
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +5 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -0
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +1 -0
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +1 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +1 -0
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +4 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/SectionHeading/__tests__/index.spec.tsx +1 -0
- package/src/components/SectionHeading/index.tsx +57 -32
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +42 -128
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +4 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +35 -96
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +1 -0
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +24 -0
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +4 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +5 -0
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +4 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +10 -0
- package/src/components/Tag/index.tsx +12 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +21 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +17 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +330 -309
- package/src/components/Toast/StyledToast.tsx +9 -7
- package/src/components/Toast/Toast.tsx +4 -1
- package/src/components/Toast/ToastContainer.tsx +6 -2
- package/src/components/Toast/ToastContext.ts +5 -2
- package/src/components/Toast/ToastProvider.tsx +19 -2
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +15 -12
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -0
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +14 -6
- package/src/components/Toast/types.ts +5 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +3 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +8 -0
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +16 -0
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +19 -0
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +10 -0
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +8 -0
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +11 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +20 -0
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +20 -0
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +23 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +102 -0
- package/src/theme/components/badge.ts +28 -1
- package/src/theme/components/bottomNavigation.ts +27 -0
- package/src/theme/components/button.ts +24 -0
- package/src/theme/components/carousel.ts +28 -1
- package/src/theme/components/empty.ts +23 -1
- package/src/theme/components/error.ts +32 -1
- package/src/theme/components/fab.ts +13 -2
- package/src/theme/components/pinInput.ts +32 -0
- package/src/theme/components/success.ts +23 -1
- package/src/theme/components/tag.ts +28 -1
- package/src/theme/components/textInput.ts +5 -0
- package/src/theme/getTheme.ts +21 -18
- package/src/types.ts +2 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/types/components/BottomNavigation/index.d.ts +45 -0
- package/types/components/Checkbox/index.d.ts +6 -1
- package/types/components/Error/index.d.ts +9 -3
- package/types/components/FAB/ActionGroup/index.d.ts +5 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/SectionHeading/index.d.ts +11 -1
- package/types/components/Tag/index.d.ts +6 -1
- package/types/components/Toast/StyledToast.d.ts +2 -0
- package/types/components/Toast/ToastContext.d.ts +2 -2
- package/types/components/Toast/ToastProvider.d.ts +1 -1
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Toast/types.d.ts +5 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/badge.d.ts +24 -0
- package/types/theme/components/bottomNavigation.d.ts +23 -0
- package/types/theme/components/button.d.ts +20 -0
- package/types/theme/components/carousel.d.ts +24 -0
- package/types/theme/components/empty.d.ts +19 -0
- package/types/theme/components/error.d.ts +27 -0
- package/types/theme/components/fab.d.ts +19 -8
- package/types/theme/components/pinInput.d.ts +27 -0
- package/types/theme/components/success.d.ts +19 -0
- package/types/theme/components/tag.d.ts +24 -0
- package/types/theme/components/textInput.d.ts +5 -0
- package/types/theme/getTheme.d.ts +20 -18
- package/types/types.d.ts +2 -1
|
@@ -45,43 +45,53 @@ const carouselData = [
|
|
|
45
45
|
];
|
|
46
46
|
|
|
47
47
|
describe('Carousel', () => {
|
|
48
|
-
it
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
48
|
+
it.each`
|
|
49
|
+
pageControlPosition
|
|
50
|
+
${'bottom'}
|
|
51
|
+
${'top'}
|
|
52
|
+
`(
|
|
53
|
+
'renders correctly with pageControlPosition $pageControlPosition',
|
|
54
|
+
async ({ pageControlPosition }) => {
|
|
55
|
+
const onPress = jest.fn();
|
|
56
|
+
const { getByTestId, queryByText, toJSON } = renderWithTheme(
|
|
57
|
+
<Carousel
|
|
58
|
+
pageControlPosition={pageControlPosition}
|
|
59
|
+
testID="carousel"
|
|
60
|
+
items={carouselData}
|
|
61
|
+
renderActions={(_) => {
|
|
62
|
+
return <Button text="Skip" onPress={onPress} />;
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
expect(getByTestId('carousel')).toBeTruthy();
|
|
68
|
+
|
|
69
|
+
expect(queryByText('Skip')).toBeTruthy();
|
|
70
|
+
|
|
71
|
+
// Slide 1
|
|
72
|
+
expect(
|
|
73
|
+
queryByText('Welcome to the new Employment Hero app')
|
|
74
|
+
).toBeTruthy();
|
|
75
|
+
|
|
76
|
+
// Slide 2
|
|
77
|
+
expect(queryByText('Same app with a new look!')).toBeTruthy();
|
|
78
|
+
expect(
|
|
79
|
+
queryByText(
|
|
80
|
+
'Our app now has a new bright clean modern look and feel with the same great features.'
|
|
81
|
+
)
|
|
82
|
+
).toBeTruthy();
|
|
83
|
+
|
|
84
|
+
// Slide 3
|
|
85
|
+
expect(queryByText('Easier to get around')).toBeTruthy();
|
|
86
|
+
expect(
|
|
87
|
+
queryByText(
|
|
88
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vitae pulvinar quam, ac facilisis massa. Aliquam facilisis nisi eu justo dignissim, vel tempus justo iaculis.'
|
|
89
|
+
)
|
|
90
|
+
).toBeTruthy();
|
|
91
|
+
|
|
92
|
+
expect(toJSON()).toMatchSnapshot();
|
|
93
|
+
}
|
|
94
|
+
);
|
|
85
95
|
|
|
86
96
|
it('should call skip call back when press skip', () => {
|
|
87
97
|
const onSkip = jest.fn();
|
|
@@ -24,6 +24,7 @@ exports[`StyledCheckbox renders correctly when disabled is false and readonly is
|
|
|
24
24
|
/>
|
|
25
25
|
<View
|
|
26
26
|
pointerEvents="box-none"
|
|
27
|
+
position="bottom"
|
|
27
28
|
style={
|
|
28
29
|
[
|
|
29
30
|
{
|
|
@@ -68,6 +69,7 @@ exports[`StyledCheckbox renders correctly when disabled is false and readonly is
|
|
|
68
69
|
/>
|
|
69
70
|
<View
|
|
70
71
|
pointerEvents="box-none"
|
|
72
|
+
position="bottom"
|
|
71
73
|
style={
|
|
72
74
|
[
|
|
73
75
|
{
|
|
@@ -112,6 +114,7 @@ exports[`StyledCheckbox renders correctly when disabled is true and readonly is
|
|
|
112
114
|
/>
|
|
113
115
|
<View
|
|
114
116
|
pointerEvents="box-none"
|
|
117
|
+
position="bottom"
|
|
115
118
|
style={
|
|
116
119
|
[
|
|
117
120
|
{
|
|
@@ -156,6 +159,7 @@ exports[`StyledCheckbox renders correctly when disabled is true and readonly is
|
|
|
156
159
|
/>
|
|
157
160
|
<View
|
|
158
161
|
pointerEvents="box-none"
|
|
162
|
+
position="bottom"
|
|
159
163
|
style={
|
|
160
164
|
[
|
|
161
165
|
{
|
|
@@ -225,6 +229,7 @@ exports[`StyledWrapper renders correctly when disabled is false, readonly is fal
|
|
|
225
229
|
/>
|
|
226
230
|
<View
|
|
227
231
|
pointerEvents="box-none"
|
|
232
|
+
position="bottom"
|
|
228
233
|
style={
|
|
229
234
|
[
|
|
230
235
|
{
|
|
@@ -294,6 +299,7 @@ exports[`StyledWrapper renders correctly when disabled is false, readonly is tru
|
|
|
294
299
|
/>
|
|
295
300
|
<View
|
|
296
301
|
pointerEvents="box-none"
|
|
302
|
+
position="bottom"
|
|
297
303
|
style={
|
|
298
304
|
[
|
|
299
305
|
{
|
|
@@ -363,6 +369,7 @@ exports[`StyledWrapper renders correctly when disabled is true, readonly is fals
|
|
|
363
369
|
/>
|
|
364
370
|
<View
|
|
365
371
|
pointerEvents="box-none"
|
|
372
|
+
position="bottom"
|
|
366
373
|
style={
|
|
367
374
|
[
|
|
368
375
|
{
|
|
@@ -432,6 +439,7 @@ exports[`StyledWrapper renders correctly when disabled is true, readonly is true
|
|
|
432
439
|
/>
|
|
433
440
|
<View
|
|
434
441
|
pointerEvents="box-none"
|
|
442
|
+
position="bottom"
|
|
435
443
|
style={
|
|
436
444
|
[
|
|
437
445
|
{
|
|
@@ -77,6 +77,7 @@ exports[`Checkbox renders correctly when checked is false and there is no descri
|
|
|
77
77
|
</View>
|
|
78
78
|
<View
|
|
79
79
|
pointerEvents="box-none"
|
|
80
|
+
position="bottom"
|
|
80
81
|
style={
|
|
81
82
|
[
|
|
82
83
|
{
|
|
@@ -196,6 +197,7 @@ exports[`Checkbox renders correctly when checked is true and there is no descrip
|
|
|
196
197
|
</View>
|
|
197
198
|
<View
|
|
198
199
|
pointerEvents="box-none"
|
|
200
|
+
position="bottom"
|
|
199
201
|
style={
|
|
200
202
|
[
|
|
201
203
|
{
|
|
@@ -319,6 +321,7 @@ exports[`Checkbox renders correctly when disabled is false and readonly is false
|
|
|
319
321
|
</View>
|
|
320
322
|
<View
|
|
321
323
|
pointerEvents="box-none"
|
|
324
|
+
position="bottom"
|
|
322
325
|
style={
|
|
323
326
|
[
|
|
324
327
|
{
|
|
@@ -442,6 +445,7 @@ exports[`Checkbox renders correctly when disabled is false and readonly is true
|
|
|
442
445
|
</View>
|
|
443
446
|
<View
|
|
444
447
|
pointerEvents="box-none"
|
|
448
|
+
position="bottom"
|
|
445
449
|
style={
|
|
446
450
|
[
|
|
447
451
|
{
|
|
@@ -565,6 +569,7 @@ exports[`Checkbox renders correctly when disabled is true and readonly is false
|
|
|
565
569
|
</View>
|
|
566
570
|
<View
|
|
567
571
|
pointerEvents="box-none"
|
|
572
|
+
position="bottom"
|
|
568
573
|
style={
|
|
569
574
|
[
|
|
570
575
|
{
|
|
@@ -688,6 +693,7 @@ exports[`Checkbox renders correctly when disabled is true and readonly is true 1
|
|
|
688
693
|
</View>
|
|
689
694
|
<View
|
|
690
695
|
pointerEvents="box-none"
|
|
696
|
+
position="bottom"
|
|
691
697
|
style={
|
|
692
698
|
[
|
|
693
699
|
{
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import {
|
|
4
|
-
StyledCheckMark,
|
|
5
4
|
StyledCheckbox,
|
|
6
5
|
StyledCheckboxContainer,
|
|
6
|
+
StyledCheckMark,
|
|
7
7
|
StyledDescription,
|
|
8
8
|
StyledWrapper,
|
|
9
9
|
} from './StyledCheckbox';
|
|
10
|
+
import { useDeprecation } from '../../utils/hooks';
|
|
10
11
|
|
|
11
12
|
export interface CheckboxProps {
|
|
12
13
|
/**
|
|
@@ -17,6 +18,11 @@ export interface CheckboxProps {
|
|
|
17
18
|
* Checkbox's description.
|
|
18
19
|
*/
|
|
19
20
|
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated This prop will be removed in the next major release. Checkboxes will always have border.
|
|
23
|
+
* Whether the border is shown.
|
|
24
|
+
*/
|
|
25
|
+
withBorder?: boolean;
|
|
20
26
|
/**
|
|
21
27
|
* Whether the switch is disabled
|
|
22
28
|
*/
|
|
@@ -59,12 +65,18 @@ export const getThemeState = ({ disabled, readonly }: getStateType) => {
|
|
|
59
65
|
const Checkbox = ({
|
|
60
66
|
checked,
|
|
61
67
|
description,
|
|
68
|
+
withBorder = false,
|
|
62
69
|
disabled = false,
|
|
63
70
|
onPress,
|
|
64
71
|
style,
|
|
65
72
|
testID,
|
|
66
73
|
readonly = false,
|
|
67
74
|
}: CheckboxProps) => {
|
|
75
|
+
useDeprecation(
|
|
76
|
+
`Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.`,
|
|
77
|
+
withBorder === true
|
|
78
|
+
);
|
|
79
|
+
|
|
68
80
|
const themeState = getThemeState({ disabled, readonly });
|
|
69
81
|
|
|
70
82
|
return (
|
|
@@ -80,6 +80,7 @@ exports[`Chip does not render icon when variant is outlined 1`] = `
|
|
|
80
80
|
</View>
|
|
81
81
|
<View
|
|
82
82
|
pointerEvents="box-none"
|
|
83
|
+
position="bottom"
|
|
83
84
|
style={
|
|
84
85
|
[
|
|
85
86
|
{
|
|
@@ -216,6 +217,7 @@ exports[`Chip does not render icon when variant is outlined 2`] = `
|
|
|
216
217
|
</View>
|
|
217
218
|
<View
|
|
218
219
|
pointerEvents="box-none"
|
|
220
|
+
position="bottom"
|
|
219
221
|
style={
|
|
220
222
|
[
|
|
221
223
|
{
|
|
@@ -315,6 +317,7 @@ exports[`Chip renders correctly when selected is false 1`] = `
|
|
|
315
317
|
</View>
|
|
316
318
|
<View
|
|
317
319
|
pointerEvents="box-none"
|
|
320
|
+
position="bottom"
|
|
318
321
|
style={
|
|
319
322
|
[
|
|
320
323
|
{
|
|
@@ -450,6 +453,7 @@ exports[`Chip renders correctly when selected is true 1`] = `
|
|
|
450
453
|
</View>
|
|
451
454
|
<View
|
|
452
455
|
pointerEvents="box-none"
|
|
456
|
+
position="bottom"
|
|
453
457
|
style={
|
|
454
458
|
[
|
|
455
459
|
{
|
|
@@ -590,6 +594,7 @@ exports[`Chip renders correctly with custom icon 1`] = `
|
|
|
590
594
|
</View>
|
|
591
595
|
<View
|
|
592
596
|
pointerEvents="box-none"
|
|
597
|
+
position="bottom"
|
|
593
598
|
style={
|
|
594
599
|
[
|
|
595
600
|
{
|
|
@@ -730,6 +735,7 @@ exports[`Chip renders correctly with custom icon 2`] = `
|
|
|
730
735
|
</View>
|
|
731
736
|
<View
|
|
732
737
|
pointerEvents="box-none"
|
|
738
|
+
position="bottom"
|
|
733
739
|
style={
|
|
734
740
|
[
|
|
735
741
|
{
|
|
@@ -830,6 +836,7 @@ exports[`Chip renders correctly with default icon 1`] = `
|
|
|
830
836
|
</View>
|
|
831
837
|
<View
|
|
832
838
|
pointerEvents="box-none"
|
|
839
|
+
position="bottom"
|
|
833
840
|
style={
|
|
834
841
|
[
|
|
835
842
|
{
|
|
@@ -966,6 +973,7 @@ exports[`Chip renders correctly with default icon 2`] = `
|
|
|
966
973
|
</View>
|
|
967
974
|
<View
|
|
968
975
|
pointerEvents="box-none"
|
|
976
|
+
position="bottom"
|
|
969
977
|
style={
|
|
970
978
|
[
|
|
971
979
|
{
|
|
@@ -1074,6 +1082,7 @@ exports[`Chip renders correctly with variant filled and selected false 1`] = `
|
|
|
1074
1082
|
</View>
|
|
1075
1083
|
<View
|
|
1076
1084
|
pointerEvents="box-none"
|
|
1085
|
+
position="bottom"
|
|
1077
1086
|
style={
|
|
1078
1087
|
[
|
|
1079
1088
|
{
|
|
@@ -1214,6 +1223,7 @@ exports[`Chip renders correctly with variant filled and selected true 1`] = `
|
|
|
1214
1223
|
</View>
|
|
1215
1224
|
<View
|
|
1216
1225
|
pointerEvents="box-none"
|
|
1226
|
+
position="bottom"
|
|
1217
1227
|
style={
|
|
1218
1228
|
[
|
|
1219
1229
|
{
|
|
@@ -1314,6 +1324,7 @@ exports[`Chip renders correctly with variant outlined and selected false 1`] = `
|
|
|
1314
1324
|
</View>
|
|
1315
1325
|
<View
|
|
1316
1326
|
pointerEvents="box-none"
|
|
1327
|
+
position="bottom"
|
|
1317
1328
|
style={
|
|
1318
1329
|
[
|
|
1319
1330
|
{
|
|
@@ -1450,6 +1461,7 @@ exports[`Chip renders correctly with variant outlined and selected true 1`] = `
|
|
|
1450
1461
|
</View>
|
|
1451
1462
|
<View
|
|
1452
1463
|
pointerEvents="box-none"
|
|
1464
|
+
position="bottom"
|
|
1453
1465
|
style={
|
|
1454
1466
|
[
|
|
1455
1467
|
{
|
|
@@ -25,6 +25,7 @@ exports[`StyledChildWrapper renders correct style 1`] = `
|
|
|
25
25
|
</View>
|
|
26
26
|
<View
|
|
27
27
|
pointerEvents="box-none"
|
|
28
|
+
position="bottom"
|
|
28
29
|
style={
|
|
29
30
|
[
|
|
30
31
|
{
|
|
@@ -69,6 +70,7 @@ exports[`StyledWrapper renders correct style 1`] = `
|
|
|
69
70
|
</View>
|
|
70
71
|
<View
|
|
71
72
|
pointerEvents="box-none"
|
|
73
|
+
position="bottom"
|
|
72
74
|
style={
|
|
73
75
|
[
|
|
74
76
|
{
|
|
@@ -51,6 +51,7 @@ exports[`Collapse renders correctly 1`] = `
|
|
|
51
51
|
</View>
|
|
52
52
|
<View
|
|
53
53
|
pointerEvents="box-none"
|
|
54
|
+
position="bottom"
|
|
54
55
|
style={
|
|
55
56
|
[
|
|
56
57
|
{
|
|
@@ -122,6 +123,7 @@ exports[`Collapse should render Sample Text but not visible 1`] = `
|
|
|
122
123
|
</View>
|
|
123
124
|
<View
|
|
124
125
|
pointerEvents="box-none"
|
|
126
|
+
position="bottom"
|
|
125
127
|
style={
|
|
126
128
|
[
|
|
127
129
|
{
|
|
@@ -146,6 +146,7 @@ exports[`rendering renders correctly 1`] = `
|
|
|
146
146
|
</View>
|
|
147
147
|
<View
|
|
148
148
|
pointerEvents="box-none"
|
|
149
|
+
position="bottom"
|
|
149
150
|
style={
|
|
150
151
|
[
|
|
151
152
|
{
|
|
@@ -312,6 +313,7 @@ exports[`rendering renders correctly when icon buttons are disabled 1`] = `
|
|
|
312
313
|
</View>
|
|
313
314
|
<View
|
|
314
315
|
pointerEvents="box-none"
|
|
316
|
+
position="bottom"
|
|
315
317
|
style={
|
|
316
318
|
[
|
|
317
319
|
{
|
|
@@ -478,6 +480,7 @@ exports[`rendering renders correctly with large 1`] = `
|
|
|
478
480
|
</View>
|
|
479
481
|
<View
|
|
480
482
|
pointerEvents="box-none"
|
|
483
|
+
position="bottom"
|
|
481
484
|
style={
|
|
482
485
|
[
|
|
483
486
|
{
|
|
@@ -260,6 +260,7 @@ exports[`DatePicker renders DatePickerAndroid when OS is android 1`] = `
|
|
|
260
260
|
</View>
|
|
261
261
|
<View
|
|
262
262
|
pointerEvents="box-none"
|
|
263
|
+
position="bottom"
|
|
263
264
|
style={
|
|
264
265
|
[
|
|
265
266
|
{
|
|
@@ -537,9 +538,16 @@ exports[`DatePicker renders DatePickerIOS when OS is iOS 1`] = `
|
|
|
537
538
|
</View>
|
|
538
539
|
</View>
|
|
539
540
|
</View>
|
|
541
|
+
<Modal
|
|
542
|
+
hardwareAccelerated={false}
|
|
543
|
+
onRequestClose={[Function]}
|
|
544
|
+
transparent={true}
|
|
545
|
+
visible={false}
|
|
546
|
+
/>
|
|
540
547
|
</View>
|
|
541
548
|
<View
|
|
542
549
|
pointerEvents="box-none"
|
|
550
|
+
position="bottom"
|
|
543
551
|
style={
|
|
544
552
|
[
|
|
545
553
|
{
|
|
@@ -817,9 +825,16 @@ exports[`DatePicker renders variant Calendar 1`] = `
|
|
|
817
825
|
</View>
|
|
818
826
|
</View>
|
|
819
827
|
</View>
|
|
828
|
+
<Modal
|
|
829
|
+
hardwareAccelerated={false}
|
|
830
|
+
onRequestClose={[Function]}
|
|
831
|
+
transparent={true}
|
|
832
|
+
visible={false}
|
|
833
|
+
/>
|
|
820
834
|
</View>
|
|
821
835
|
<View
|
|
822
836
|
pointerEvents="box-none"
|
|
837
|
+
position="bottom"
|
|
823
838
|
style={
|
|
824
839
|
[
|
|
825
840
|
{
|