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