@hero-design/rn 8.8.1 → 8.9.1
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 +9 -9
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +400 -618
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +399 -618
- package/package.json +9 -9
- package/src/components/Carousel/CarouselItem.tsx +4 -2
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +288 -22
- package/src/components/Carousel/__tests__/index.spec.tsx +17 -8
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +2 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -1
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +9 -9
- package/src/components/RichTextEditor/RichTextEditor.tsx +3 -2
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +10 -5
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +10 -5
- package/src/components/TextInput/StyledTextInput.tsx +2 -1
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +126 -110
- package/src/components/TextInput/index.tsx +3 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +28 -25
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +28 -25
- package/src/index.ts +0 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +8 -5
- package/src/theme/components/progress.ts +4 -4
- package/src/theme/components/textInput.ts +6 -2
- package/types/components/Accordion/StyledAccordion.d.ts +1 -0
- package/types/components/Alert/StyledAlert.d.ts +1 -0
- package/types/components/Attachment/StyledAttachment.d.ts +1 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +1 -0
- package/types/components/Avatar/StyledAvatar.d.ts +1 -0
- package/types/components/Badge/StyledBadge.d.ts +1 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -0
- package/types/components/BottomSheet/BottomSheetContext.d.ts +1 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +1 -0
- package/types/components/Box/StyledBox.d.ts +1 -0
- package/types/components/Box/types.d.ts +1 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -0
- package/types/components/Button/StyledButton.d.ts +1 -0
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +1 -0
- package/types/components/Calendar/StyledCalendar.d.ts +1 -0
- package/types/components/Card/DataCard/StyledDataCard.d.ts +1 -0
- package/types/components/Card/StyledCard.d.ts +1 -0
- package/types/components/Carousel/StyledCarousel.d.ts +1 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +1 -0
- package/types/components/Collapse/StyledCollapse.d.ts +1 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +1 -0
- package/types/components/DatePicker/StyledDatePicker.d.ts +1 -0
- package/types/components/Divider/StyledDivider.d.ts +1 -0
- package/types/components/Drawer/StyledDrawer.d.ts +1 -0
- package/types/components/Empty/StyledEmpty.d.ts +1 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +1 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +1 -0
- package/types/components/FAB/StyledFAB.d.ts +1 -0
- package/types/components/Icon/HeroIcon/index.d.ts +1 -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/List/StyledBasicListItem.d.ts +1 -0
- package/types/components/List/StyledListItem.d.ts +1 -0
- package/types/components/PageControl/StyledPageControl.d.ts +1 -0
- package/types/components/PinInput/StyledPinInput.d.ts +1 -0
- package/types/components/Progress/StyledProgressBar.d.ts +1 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +1 -0
- package/types/components/Radio/StyledRadio.d.ts +1 -0
- package/types/components/Radio/index.d.ts +1 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +1 -0
- package/types/components/RichTextEditor/StyledToolbar.d.ts +1 -0
- package/types/components/RichTextEditor/index.d.ts +1 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +1 -0
- package/types/components/Select/StyledSelect.d.ts +1 -0
- package/types/components/Select/helpers.d.ts +1 -0
- package/types/components/Spinner/StyledSpinner.d.ts +1 -0
- package/types/components/Swipeable/StyledSwipeable.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +1 -0
- package/types/components/Switch/StyledSwitch.d.ts +1 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +1 -0
- package/types/components/Tabs/StyledTabs.d.ts +1 -0
- package/types/components/Tag/StyledTag.d.ts +1 -0
- package/types/components/TextInput/StyledTextInput.d.ts +1 -0
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/TimePicker/StyledTimePicker.d.ts +1 -0
- package/types/components/Toast/StyledToast.d.ts +1 -0
- package/types/components/Toast/ToastContext.d.ts +1 -0
- package/types/components/Toast/index.d.ts +1 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +1 -0
- package/types/components/Typography/Text/StyledText.d.ts +1 -0
- package/types/index.d.ts +1 -2
- package/types/theme/ThemeProvider.d.ts +1 -0
- package/types/theme/components/textInput.d.ts +4 -1
- package/src/components/SwipeableV2/StyledSwipeable.tsx +0 -14
- package/src/components/SwipeableV2/__tests__/__snapshots__/index.spec.tsx.snap +0 -161
- package/src/components/SwipeableV2/__tests__/index.spec.tsx +0 -48
- package/src/components/SwipeableV2/index.tsx +0 -364
- package/types/components/SwipeableV2/StyledSwipeable.d.ts +0 -15
- package/types/components/SwipeableV2/index.d.ts +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/react": "^11.9.3",
|
|
24
|
-
"@hero-design/colors": "8.
|
|
24
|
+
"@hero-design/colors": "8.9.1",
|
|
25
25
|
"date-fns": "^2.16.1",
|
|
26
26
|
"events": "^3.2.0",
|
|
27
27
|
"hero-editor": "^1.9.21"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"react-native": "0.69.7",
|
|
34
34
|
"react-native-gesture-handler": "^1.10.3 | ~2.1.0",
|
|
35
35
|
"react-native-pager-view": "^5.4.25",
|
|
36
|
-
"react-native-safe-area-context": "^
|
|
36
|
+
"react-native-safe-area-context": "^3.0.2",
|
|
37
37
|
"react-native-vector-icons": "^9.1.0",
|
|
38
|
-
"react-native-webview": "^11.
|
|
38
|
+
"react-native-webview": "^11.2.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.17.5",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.17.12",
|
|
45
45
|
"@babel/runtime": "^7.18.9",
|
|
46
46
|
"@emotion/jest": "^11.9.3",
|
|
47
|
-
"@hero-design/eslint-plugin": "8.
|
|
47
|
+
"@hero-design/eslint-plugin": "8.9.1",
|
|
48
48
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
49
49
|
"@react-native-community/slider": "4.1.12",
|
|
50
50
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"@types/react-native": "^0.67.7",
|
|
61
61
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
62
62
|
"babel-plugin-inline-import": "^3.0.0",
|
|
63
|
-
"eslint-config-hd": "8.
|
|
63
|
+
"eslint-config-hd": "8.9.1",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.
|
|
65
|
+
"prettier-config-hd": "8.9.1",
|
|
66
66
|
"react": "18.0.0",
|
|
67
67
|
"react-native": "0.69.7",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
69
69
|
"react-native-pager-view": "^5.4.25",
|
|
70
|
-
"react-native-safe-area-context": "^
|
|
70
|
+
"react-native-safe-area-context": "^3.0.2",
|
|
71
71
|
"react-native-vector-icons": "^9.1.0",
|
|
72
|
-
"react-native-webview": "^11.
|
|
72
|
+
"react-native-webview": "^11.2.5",
|
|
73
73
|
"react-test-renderer": "18.0.0",
|
|
74
74
|
"rollup": "^2.68.0",
|
|
75
75
|
"rollup-plugin-copy": "^3.4.0",
|
|
@@ -16,7 +16,7 @@ interface CarouselItemProps extends Omit<CarouselData, 'background'> {
|
|
|
16
16
|
function isCarouselImageProps(
|
|
17
17
|
image: CarouselImageProps | string
|
|
18
18
|
): image is CarouselImageProps {
|
|
19
|
-
return typeof image
|
|
19
|
+
return typeof image === 'object';
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const CarouselItem = ({
|
|
@@ -37,7 +37,9 @@ const CarouselItem = ({
|
|
|
37
37
|
resizeMode={image.resizeMode}
|
|
38
38
|
/>
|
|
39
39
|
) : (
|
|
40
|
-
<StyledCarouselImage
|
|
40
|
+
<StyledCarouselImage
|
|
41
|
+
source={typeof image === 'string' ? { uri: image } : image}
|
|
42
|
+
/>
|
|
41
43
|
))}
|
|
42
44
|
|
|
43
45
|
<StyledCarouselContentWrapper
|
|
@@ -39,7 +39,7 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
39
39
|
"background": "#ece8ef",
|
|
40
40
|
"body": "Access your Work, Money and Benefits in the palm of your hand.",
|
|
41
41
|
"heading": "Welcome to the new Employment Hero app",
|
|
42
|
-
"image":
|
|
42
|
+
"image": 1,
|
|
43
43
|
},
|
|
44
44
|
Object {
|
|
45
45
|
"background": "#ccd2d3",
|
|
@@ -58,7 +58,21 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
58
58
|
"background": "#ccd2d3",
|
|
59
59
|
"body": "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.",
|
|
60
60
|
"heading": "Easier to get around",
|
|
61
|
-
"image":
|
|
61
|
+
"image": Object {
|
|
62
|
+
"height": 100,
|
|
63
|
+
"resizeMode": "cover",
|
|
64
|
+
"uri": "https://picsum.photos/1200/800",
|
|
65
|
+
"width": 30,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
Object {
|
|
69
|
+
"background": "#ccd2d3",
|
|
70
|
+
"heading": "Test slide 4",
|
|
71
|
+
"image": Object {
|
|
72
|
+
"height": 100,
|
|
73
|
+
"uri": "https://picsum.photos/1200/800",
|
|
74
|
+
"width": 30,
|
|
75
|
+
},
|
|
62
76
|
},
|
|
63
77
|
]
|
|
64
78
|
}
|
|
@@ -119,11 +133,7 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
119
133
|
}
|
|
120
134
|
>
|
|
121
135
|
<Image
|
|
122
|
-
source={
|
|
123
|
-
Object {
|
|
124
|
-
"uri": "https://picsum.photos/800/1200",
|
|
125
|
-
}
|
|
126
|
-
}
|
|
136
|
+
source={1}
|
|
127
137
|
style={
|
|
128
138
|
Array [
|
|
129
139
|
Object {
|
|
@@ -370,9 +380,14 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
370
380
|
}
|
|
371
381
|
>
|
|
372
382
|
<Image
|
|
383
|
+
height={100}
|
|
384
|
+
resizeMode="cover"
|
|
373
385
|
source={
|
|
374
386
|
Object {
|
|
375
|
-
"
|
|
387
|
+
"height": 100,
|
|
388
|
+
"resizeMode": "cover",
|
|
389
|
+
"uri": "https://picsum.photos/1200/800",
|
|
390
|
+
"width": 30,
|
|
376
391
|
}
|
|
377
392
|
}
|
|
378
393
|
style={
|
|
@@ -384,14 +399,16 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
384
399
|
},
|
|
385
400
|
Array [
|
|
386
401
|
Object {
|
|
387
|
-
"
|
|
388
|
-
"
|
|
389
|
-
"
|
|
402
|
+
"alignSelf": "center",
|
|
403
|
+
"height": 100,
|
|
404
|
+
"resizeMode": "cover",
|
|
405
|
+
"width": 30,
|
|
390
406
|
},
|
|
391
407
|
undefined,
|
|
392
408
|
],
|
|
393
409
|
]
|
|
394
410
|
}
|
|
411
|
+
width={30}
|
|
395
412
|
/>
|
|
396
413
|
<View
|
|
397
414
|
marginTop="large"
|
|
@@ -465,6 +482,108 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
465
482
|
</View>
|
|
466
483
|
</View>
|
|
467
484
|
</View>
|
|
485
|
+
<View
|
|
486
|
+
onLayout={[Function]}
|
|
487
|
+
style={
|
|
488
|
+
Array [
|
|
489
|
+
Object {
|
|
490
|
+
"flexDirection": "row",
|
|
491
|
+
},
|
|
492
|
+
null,
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
>
|
|
496
|
+
<View
|
|
497
|
+
style={
|
|
498
|
+
Array [
|
|
499
|
+
Object {},
|
|
500
|
+
Object {
|
|
501
|
+
"width": 750,
|
|
502
|
+
},
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
>
|
|
506
|
+
<Image
|
|
507
|
+
height={100}
|
|
508
|
+
source={
|
|
509
|
+
Object {
|
|
510
|
+
"height": 100,
|
|
511
|
+
"uri": "https://picsum.photos/1200/800",
|
|
512
|
+
"width": 30,
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
style={
|
|
516
|
+
Array [
|
|
517
|
+
Object {
|
|
518
|
+
"borderRadius": 0,
|
|
519
|
+
"height": 72,
|
|
520
|
+
"width": 72,
|
|
521
|
+
},
|
|
522
|
+
Array [
|
|
523
|
+
Object {
|
|
524
|
+
"alignSelf": "center",
|
|
525
|
+
"height": 100,
|
|
526
|
+
"resizeMode": "contain",
|
|
527
|
+
"width": 30,
|
|
528
|
+
},
|
|
529
|
+
undefined,
|
|
530
|
+
],
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
width={30}
|
|
534
|
+
/>
|
|
535
|
+
<View
|
|
536
|
+
marginTop="large"
|
|
537
|
+
paddingHorizontal="large"
|
|
538
|
+
style={
|
|
539
|
+
Array [
|
|
540
|
+
Object {
|
|
541
|
+
"marginTop": 24,
|
|
542
|
+
"paddingHorizontal": 24,
|
|
543
|
+
},
|
|
544
|
+
Array [
|
|
545
|
+
Object {
|
|
546
|
+
"minHeight": 250,
|
|
547
|
+
"width": 750,
|
|
548
|
+
},
|
|
549
|
+
undefined,
|
|
550
|
+
],
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
width={750}
|
|
554
|
+
>
|
|
555
|
+
<Text
|
|
556
|
+
style={
|
|
557
|
+
Array [
|
|
558
|
+
Object {
|
|
559
|
+
"color": "#001f23",
|
|
560
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
561
|
+
"fontSize": 14,
|
|
562
|
+
"letterSpacing": 0.42,
|
|
563
|
+
"lineHeight": 22,
|
|
564
|
+
},
|
|
565
|
+
Array [
|
|
566
|
+
Object {
|
|
567
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
568
|
+
"fontSize": 32,
|
|
569
|
+
"lineHeight": 44,
|
|
570
|
+
"marginBottom": 16,
|
|
571
|
+
"marginTop": 8,
|
|
572
|
+
},
|
|
573
|
+
undefined,
|
|
574
|
+
],
|
|
575
|
+
]
|
|
576
|
+
}
|
|
577
|
+
themeFontSize="medium"
|
|
578
|
+
themeFontWeight="regular"
|
|
579
|
+
themeIntent="body"
|
|
580
|
+
themeTypeface="neutral"
|
|
581
|
+
>
|
|
582
|
+
Test slide 4
|
|
583
|
+
</Text>
|
|
584
|
+
</View>
|
|
585
|
+
</View>
|
|
586
|
+
</View>
|
|
468
587
|
</View>
|
|
469
588
|
</RCTScrollView>
|
|
470
589
|
<View
|
|
@@ -603,6 +722,20 @@ exports[`Carousel renders basic carousel 1`] = `
|
|
|
603
722
|
}
|
|
604
723
|
testID="page-control-indicator2"
|
|
605
724
|
/>
|
|
725
|
+
<View
|
|
726
|
+
collapsable={false}
|
|
727
|
+
style={
|
|
728
|
+
Object {
|
|
729
|
+
"backgroundColor": "#401960",
|
|
730
|
+
"borderRadius": 999,
|
|
731
|
+
"height": 8,
|
|
732
|
+
"marginHorizontal": 8,
|
|
733
|
+
"opacity": 0.5,
|
|
734
|
+
"width": 8,
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
testID="page-control-indicator3"
|
|
738
|
+
/>
|
|
606
739
|
</View>
|
|
607
740
|
</View>
|
|
608
741
|
</View>
|
|
@@ -648,7 +781,7 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
648
781
|
"background": "#ece8ef",
|
|
649
782
|
"body": "Access your Work, Money and Benefits in the palm of your hand.",
|
|
650
783
|
"heading": "Welcome to the new Employment Hero app",
|
|
651
|
-
"image":
|
|
784
|
+
"image": 1,
|
|
652
785
|
},
|
|
653
786
|
Object {
|
|
654
787
|
"background": "#ccd2d3",
|
|
@@ -667,7 +800,21 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
667
800
|
"background": "#ccd2d3",
|
|
668
801
|
"body": "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.",
|
|
669
802
|
"heading": "Easier to get around",
|
|
670
|
-
"image":
|
|
803
|
+
"image": Object {
|
|
804
|
+
"height": 100,
|
|
805
|
+
"resizeMode": "cover",
|
|
806
|
+
"uri": "https://picsum.photos/1200/800",
|
|
807
|
+
"width": 30,
|
|
808
|
+
},
|
|
809
|
+
},
|
|
810
|
+
Object {
|
|
811
|
+
"background": "#ccd2d3",
|
|
812
|
+
"heading": "Test slide 4",
|
|
813
|
+
"image": Object {
|
|
814
|
+
"height": 100,
|
|
815
|
+
"uri": "https://picsum.photos/1200/800",
|
|
816
|
+
"width": 30,
|
|
817
|
+
},
|
|
671
818
|
},
|
|
672
819
|
]
|
|
673
820
|
}
|
|
@@ -728,11 +875,7 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
728
875
|
}
|
|
729
876
|
>
|
|
730
877
|
<Image
|
|
731
|
-
source={
|
|
732
|
-
Object {
|
|
733
|
-
"uri": "https://picsum.photos/800/1200",
|
|
734
|
-
}
|
|
735
|
-
}
|
|
878
|
+
source={1}
|
|
736
879
|
style={
|
|
737
880
|
Array [
|
|
738
881
|
Object {
|
|
@@ -979,9 +1122,14 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
979
1122
|
}
|
|
980
1123
|
>
|
|
981
1124
|
<Image
|
|
1125
|
+
height={100}
|
|
1126
|
+
resizeMode="cover"
|
|
982
1127
|
source={
|
|
983
1128
|
Object {
|
|
984
|
-
"
|
|
1129
|
+
"height": 100,
|
|
1130
|
+
"resizeMode": "cover",
|
|
1131
|
+
"uri": "https://picsum.photos/1200/800",
|
|
1132
|
+
"width": 30,
|
|
985
1133
|
}
|
|
986
1134
|
}
|
|
987
1135
|
style={
|
|
@@ -993,14 +1141,16 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
993
1141
|
},
|
|
994
1142
|
Array [
|
|
995
1143
|
Object {
|
|
996
|
-
"
|
|
997
|
-
"
|
|
998
|
-
"
|
|
1144
|
+
"alignSelf": "center",
|
|
1145
|
+
"height": 100,
|
|
1146
|
+
"resizeMode": "cover",
|
|
1147
|
+
"width": 30,
|
|
999
1148
|
},
|
|
1000
1149
|
undefined,
|
|
1001
1150
|
],
|
|
1002
1151
|
]
|
|
1003
1152
|
}
|
|
1153
|
+
width={30}
|
|
1004
1154
|
/>
|
|
1005
1155
|
<View
|
|
1006
1156
|
marginTop="large"
|
|
@@ -1074,6 +1224,108 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
1074
1224
|
</View>
|
|
1075
1225
|
</View>
|
|
1076
1226
|
</View>
|
|
1227
|
+
<View
|
|
1228
|
+
onLayout={[Function]}
|
|
1229
|
+
style={
|
|
1230
|
+
Array [
|
|
1231
|
+
Object {
|
|
1232
|
+
"flexDirection": "row",
|
|
1233
|
+
},
|
|
1234
|
+
null,
|
|
1235
|
+
]
|
|
1236
|
+
}
|
|
1237
|
+
>
|
|
1238
|
+
<View
|
|
1239
|
+
style={
|
|
1240
|
+
Array [
|
|
1241
|
+
Object {},
|
|
1242
|
+
Object {
|
|
1243
|
+
"width": 750,
|
|
1244
|
+
},
|
|
1245
|
+
]
|
|
1246
|
+
}
|
|
1247
|
+
>
|
|
1248
|
+
<Image
|
|
1249
|
+
height={100}
|
|
1250
|
+
source={
|
|
1251
|
+
Object {
|
|
1252
|
+
"height": 100,
|
|
1253
|
+
"uri": "https://picsum.photos/1200/800",
|
|
1254
|
+
"width": 30,
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
style={
|
|
1258
|
+
Array [
|
|
1259
|
+
Object {
|
|
1260
|
+
"borderRadius": 0,
|
|
1261
|
+
"height": 72,
|
|
1262
|
+
"width": 72,
|
|
1263
|
+
},
|
|
1264
|
+
Array [
|
|
1265
|
+
Object {
|
|
1266
|
+
"alignSelf": "center",
|
|
1267
|
+
"height": 100,
|
|
1268
|
+
"resizeMode": "contain",
|
|
1269
|
+
"width": 30,
|
|
1270
|
+
},
|
|
1271
|
+
undefined,
|
|
1272
|
+
],
|
|
1273
|
+
]
|
|
1274
|
+
}
|
|
1275
|
+
width={30}
|
|
1276
|
+
/>
|
|
1277
|
+
<View
|
|
1278
|
+
marginTop="large"
|
|
1279
|
+
paddingHorizontal="large"
|
|
1280
|
+
style={
|
|
1281
|
+
Array [
|
|
1282
|
+
Object {
|
|
1283
|
+
"marginTop": 24,
|
|
1284
|
+
"paddingHorizontal": 24,
|
|
1285
|
+
},
|
|
1286
|
+
Array [
|
|
1287
|
+
Object {
|
|
1288
|
+
"minHeight": 250,
|
|
1289
|
+
"width": 750,
|
|
1290
|
+
},
|
|
1291
|
+
undefined,
|
|
1292
|
+
],
|
|
1293
|
+
]
|
|
1294
|
+
}
|
|
1295
|
+
width={750}
|
|
1296
|
+
>
|
|
1297
|
+
<Text
|
|
1298
|
+
style={
|
|
1299
|
+
Array [
|
|
1300
|
+
Object {
|
|
1301
|
+
"color": "#001f23",
|
|
1302
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
1303
|
+
"fontSize": 14,
|
|
1304
|
+
"letterSpacing": 0.42,
|
|
1305
|
+
"lineHeight": 22,
|
|
1306
|
+
},
|
|
1307
|
+
Array [
|
|
1308
|
+
Object {
|
|
1309
|
+
"fontFamily": "RebondGrotesque-SemiBold",
|
|
1310
|
+
"fontSize": 32,
|
|
1311
|
+
"lineHeight": 44,
|
|
1312
|
+
"marginBottom": 16,
|
|
1313
|
+
"marginTop": 8,
|
|
1314
|
+
},
|
|
1315
|
+
undefined,
|
|
1316
|
+
],
|
|
1317
|
+
]
|
|
1318
|
+
}
|
|
1319
|
+
themeFontSize="medium"
|
|
1320
|
+
themeFontWeight="regular"
|
|
1321
|
+
themeIntent="body"
|
|
1322
|
+
themeTypeface="neutral"
|
|
1323
|
+
>
|
|
1324
|
+
Test slide 4
|
|
1325
|
+
</Text>
|
|
1326
|
+
</View>
|
|
1327
|
+
</View>
|
|
1328
|
+
</View>
|
|
1077
1329
|
</View>
|
|
1078
1330
|
</RCTScrollView>
|
|
1079
1331
|
<View
|
|
@@ -1212,6 +1464,20 @@ exports[`Carousel should call skip call back when press skip 1`] = `
|
|
|
1212
1464
|
}
|
|
1213
1465
|
testID="page-control-indicator2"
|
|
1214
1466
|
/>
|
|
1467
|
+
<View
|
|
1468
|
+
collapsable={false}
|
|
1469
|
+
style={
|
|
1470
|
+
Object {
|
|
1471
|
+
"backgroundColor": "#401960",
|
|
1472
|
+
"borderRadius": 999,
|
|
1473
|
+
"height": 8,
|
|
1474
|
+
"marginHorizontal": 8,
|
|
1475
|
+
"opacity": 0.5,
|
|
1476
|
+
"width": 8,
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
testID="page-control-indicator3"
|
|
1480
|
+
/>
|
|
1215
1481
|
</View>
|
|
1216
1482
|
</View>
|
|
1217
1483
|
</View>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { fireEvent } from '@testing-library/react-native';
|
|
3
|
-
|
|
3
|
+
import { ImageResizeMode } from 'react-native';
|
|
4
4
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
5
5
|
import Carousel from '..';
|
|
6
6
|
import Image from '../../Image';
|
|
@@ -9,7 +9,7 @@ import Button from '../../Button/Button';
|
|
|
9
9
|
|
|
10
10
|
const carouselData = [
|
|
11
11
|
{
|
|
12
|
-
image: '
|
|
12
|
+
image: 1, // Test the case when we import .png files as React Native component, it's convert to ImageRequireSource type (which is a number).
|
|
13
13
|
heading: 'Welcome to the new Employment Hero app',
|
|
14
14
|
body: 'Access your Work, Money and Benefits in the palm of your hand.',
|
|
15
15
|
background: theme.colors.highlightedSurface,
|
|
@@ -22,11 +22,25 @@ const carouselData = [
|
|
|
22
22
|
background: theme.colors.decorativePrimarySurface,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
image:
|
|
25
|
+
image: {
|
|
26
|
+
uri: 'https://picsum.photos/1200/800',
|
|
27
|
+
width: 30,
|
|
28
|
+
height: 100,
|
|
29
|
+
resizeMode: 'cover' as ImageResizeMode,
|
|
30
|
+
},
|
|
26
31
|
heading: 'Easier to get around',
|
|
27
32
|
body: '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.',
|
|
28
33
|
background: theme.colors.decorativePrimarySurface,
|
|
29
34
|
},
|
|
35
|
+
{
|
|
36
|
+
image: {
|
|
37
|
+
uri: 'https://picsum.photos/1200/800',
|
|
38
|
+
width: 30,
|
|
39
|
+
height: 100,
|
|
40
|
+
},
|
|
41
|
+
heading: 'Test slide 4',
|
|
42
|
+
background: theme.colors.decorativePrimarySurface,
|
|
43
|
+
},
|
|
30
44
|
];
|
|
31
45
|
|
|
32
46
|
describe('Carousel', () => {
|
|
@@ -48,11 +62,6 @@ describe('Carousel', () => {
|
|
|
48
62
|
|
|
49
63
|
// Slide 1
|
|
50
64
|
expect(queryByText('Welcome to the new Employment Hero app')).toBeTruthy();
|
|
51
|
-
expect(
|
|
52
|
-
queryByText(
|
|
53
|
-
'Access your Work, Money and Benefits in the palm of your hand.'
|
|
54
|
-
)
|
|
55
|
-
).toBeTruthy();
|
|
56
65
|
|
|
57
66
|
// Slide 2
|
|
58
67
|
expect(queryByText('Same app with a new look!')).toBeTruthy();
|
|
@@ -32,7 +32,7 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
32
32
|
style={
|
|
33
33
|
Array [
|
|
34
34
|
Object {
|
|
35
|
-
"
|
|
35
|
+
"marginTop": 8,
|
|
36
36
|
"width": "100%",
|
|
37
37
|
},
|
|
38
38
|
undefined,
|
|
@@ -180,6 +180,7 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
180
180
|
style={
|
|
181
181
|
Array [
|
|
182
182
|
Object {
|
|
183
|
+
"minHeight": 16,
|
|
183
184
|
"paddingLeft": 16,
|
|
184
185
|
},
|
|
185
186
|
undefined,
|
|
@@ -32,7 +32,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
32
32
|
style={
|
|
33
33
|
Array [
|
|
34
34
|
Object {
|
|
35
|
-
"
|
|
35
|
+
"marginTop": 8,
|
|
36
36
|
"width": "100%",
|
|
37
37
|
},
|
|
38
38
|
undefined,
|
|
@@ -180,6 +180,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
180
180
|
style={
|
|
181
181
|
Array [
|
|
182
182
|
Object {
|
|
183
|
+
"minHeight": 16,
|
|
183
184
|
"paddingLeft": 16,
|
|
184
185
|
},
|
|
185
186
|
undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark-added":59011,"bookmark":59012,"box-check":59013,"box":59014,"bpay":59015,"buildings":59016,"cake":59017,"calendar-clock":59018,"calendar":59019,"candy-box-menu":59020,"caret-down-small":59021,"caret-down":59022,"caret-left-small":59023,"caret-left":59024,"caret-right-small":59025,"caret-right":59026,"caret-up-small":59027,"caret-up":59028,"check-radio":59029,"circle-add":59030,"circle-cancel":59031,"circle-check":59032,"circle-down":59033,"circle-info":59034,"circle-left":59035,"circle-ok":59036,"circle-pencil":59037,"circle-question":59038,"circle-remove":59039,"circle-right":59040,"circle-up":59041,"circle-warning":59042,"clock-3":59043,"clock":59044,"cloud-download":59045,"cloud-upload":59046,"cog":59047,"coin":59048,"contacts":59049,"credit-card":59050,"diamond":59051,"direction-arrows":59052,"directory":59053,"document":59054,"dollar-coin-shine":59055,"double-buildings":59056,"edit-template":59057,"envelope":59058,"
|
|
1
|
+
{"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark-added":59011,"bookmark":59012,"box-check":59013,"box":59014,"bpay":59015,"buildings":59016,"cake":59017,"calendar-clock":59018,"calendar":59019,"candy-box-menu":59020,"caret-down-small":59021,"caret-down":59022,"caret-left-small":59023,"caret-left":59024,"caret-right-small":59025,"caret-right":59026,"caret-up-small":59027,"caret-up":59028,"check-radio":59029,"circle-add":59030,"circle-cancel":59031,"circle-check":59032,"circle-down":59033,"circle-info":59034,"circle-left":59035,"circle-ok":59036,"circle-pencil":59037,"circle-question":59038,"circle-remove":59039,"circle-right":59040,"circle-up":59041,"circle-warning":59042,"clock-3":59043,"clock":59044,"cloud-download":59045,"cloud-upload":59046,"cog":59047,"coin":59048,"contacts":59049,"credit-card":59050,"diamond":59051,"direction-arrows":59052,"directory":59053,"document":59054,"dollar-coin-shine":59055,"double-buildings":59056,"edit-template":59057,"envelope":59058,"exclude":59059,"expense":59060,"eye-circle":59061,"eye-invisible":59062,"eye":59063,"face-meh":59064,"face-sad":59065,"face-smiley":59066,"feed":59067,"feedbacks":59068,"file-certified":59069,"file-clone":59070,"file-copy":59071,"file-csv":59072,"file-dispose":59073,"file-doc":59074,"file-excel":59075,"file-export":59076,"file-lock":59077,"file-pdf":59078,"file-powerpoint":59079,"file-search":59080,"file-secured":59081,"file-sheets":59082,"file-slide":59083,"file-verified":59084,"file-word":59085,"file":59086,"filter":59087,"folder-user":59088,"folder":59089,"format-bold":59090,"format-heading1":59091,"format-heading2":59092,"format-italic":59093,"format-list-bulleted":59094,"format-list-numbered":59095,"format-underlined":59096,"funnel-filter":59097,"global-dollar":59098,"globe":59099,"graduation-cap":59100,"graph":59101,"happy-sun":59102,"health-bag":59103,"heart":59104,"home":59105,"image":59106,"import":59107,"incident-siren":59108,"instapay":59109,"list":59110,"loading-2":59111,"loading":59112,"location":59113,"lock":59114,"looks-one":59115,"looks-two":59116,"media-content":59117,"menu":59118,"money-notes":59119,"moneybag":59120,"moon":59121,"multiple-stars":59122,"multiple-users":59123,"node":59124,"open-folder":59125,"paperclip":59126,"payment-summary":59127,"pencil":59128,"phone":59129,"piggy-bank":59130,"plane":59131,"play-circle":59132,"print":59133,"raising-hands":59134,"reply-arrow":59135,"reply":59136,"reschedule":59137,"rostering":59138,"save":59139,"schedule-send":59140,"schedule":59141,"search-person":59142,"send":59143,"speaker-active":59144,"speaker":59145,"star-award":59146,"star-badge":59147,"star-circle":59148,"star-medal":59149,"star":59150,"steps-circle":59151,"stopwatch":59152,"suitcase":59153,"survey":59154,"swag":59155,"switch":59156,"tag":59157,"target":59158,"teams":59159,"timesheet":59160,"touch-id":59161,"trash-bin":59162,"unlock":59163,"user":59164,"video-1":59165,"video-2":59166,"wallet":59167,"warning":59168,"activate-outlined":59169,"add-credit-card-outlined":59170,"add-person-outlined":59171,"add-section-outlined":59172,"add-time-outlined":59173,"add":59174,"adjustment-outlined":59175,"alignment-2-outlined":59176,"alignment-outlined":59177,"all-caps":59178,"arrow-down":59179,"arrow-downwards":59180,"arrow-left":59181,"arrow-leftwards":59182,"arrow-right":59183,"arrow-rightwards":59184,"arrow-up":59185,"arrow-upwards":59186,"article-outlined":59187,"at-sign":59188,"auto-graph-outlined":59189,"bell-active-outlined":59190,"bell-outlined":59191,"bell-slash-outlined":59192,"billing-outlined":59193,"body-outlined":59194,"bold":59195,"bookmark-added-outlined":59196,"bookmark-outlined":59197,"box-check-outlined":59198,"box-outlined":59199,"bullet-points":59200,"cake-outlined":59201,"calendar-dates-outlined":59202,"calendar-star-outlined":59203,"call-split-outlined":59204,"camera-outlined":59205,"cancel":59206,"charging-station-outlined":59207,"chat-bubble-outlined":59208,"chat-unread-outlined":59209,"checkmark":59210,"circle-add-outlined":59211,"circle-cancel-outlined":59212,"circle-down-outlined":59213,"circle-info-outlined":59214,"circle-left-outlined":59215,"circle-ok-outlined":59216,"circle-question-outlined":59217,"circle-remove-outlined":59218,"circle-right-outlined":59219,"circle-up-outlined":59220,"circle-warning-outlined":59221,"clock-2-outlined":59222,"clock-outlined":59223,"cog-outlined":59224,"coin-outlined":59225,"comment-outlined":59226,"contacts-outlined":59227,"contacts-user-outlined":59228,"credit-card-outlined":59229,"cup-outlined":59230,"direction-arrows-outlined":59231,"directory-outlined":59232,"document-outlined":59233,"dollar-box-outlined":59234,"dollar-card-outlined":59235,"dollar-coin-shine-outlined":59236,"dollar-credit-card-outlined":59237,"dollar-sign":59238,"double-buildings-outlined":59239,"double-left-arrows":59240,"double-right-arrows":59241,"download-outlined":59242,"edit-template-outlined":59243,"email-outlined":59244,"enter-arrow":59245,"envelope-outlined":59246,"expense-outlined":59247,"explore-outlined":59248,"external-link":59249,"eye-invisible-outlined":59250,"eye-outlined":59251,"face-id":59252,"face-meh-outlined":59253,"face-open-smiley-outlined":59254,"face-sad-outlined":59255,"face-smiley-outlined":59256,"feed-outlined":59257,"file-certified-outlined":59258,"file-clone-outlined":59259,"file-copy-outlined":59260,"file-dispose-outlined":59261,"file-dollar-certified-outlined":59262,"file-dollar-outlined":59263,"file-download-outlined":59264,"file-export-outlined":59265,"file-lock-outlined":59266,"file-outlined":59267,"file-search-outlined":59268,"file-secured-outlined":59269,"file-statutory-outlined":59270,"file-verified-outlined":59271,"filter-outlined":59272,"folder-outlined":59273,"folder-user-outlined":59274,"funnel-filter-outline":59275,"graph-outlined":59276,"hand-holding-user-outlined":59277,"happy-sun-outlined":59278,"health-bag-outlined":59279,"heart-outlined":59280,"home-active-outlined":59281,"home-outlined":59282,"id-card-outlined":59283,"image-outlined":59284,"import-outlined":59285,"instapay-outlined":59286,"italic":59287,"link-1":59288,"link-2":59289,"list-outlined":59290,"live-help-outlined":59291,"location-on-outlined":59292,"location-outlined":59293,"lock-outlined":59294,"locked-file-outlined":59295,"log-out":59296,"media-content-outlined":59297,"menu-close":59298,"menu-expand":59299,"menu-fold-outlined":59300,"menu-unfold-outlined":59301,"moneybag-outlined":59302,"moon-outlined":59303,"more-horizontal":59304,"more-vertical":59305,"multiple-folders-outlined":59306,"multiple-users-outlined":59307,"near-me-outlined":59308,"node-outlined":59309,"number-points":59310,"number":59311,"overview-outlined":59312,"payment-summary-outlined":59313,"payslip-outlined":59314,"pencil-outlined":59315,"percentage":59316,"phone-outlined":59317,"piggy-bank-outlined":59318,"plane-outlined":59319,"play-circle-outlined":59320,"print-outlined":59321,"qr-code-outlined":59322,"qualification-outlined":59323,"re-assign":59324,"redeem":59325,"refresh":59326,"remove":59327,"reply-outlined":59328,"restart":59329,"return-arrow":59330,"rostering-outlined":59331,"save-outlined":59332,"schedule-outlined":59333,"search-outlined":59334,"search-secured-outlined":59335,"send-outlined":59336,"share-1":59337,"share-2":59338,"share-outlined":59339,"show-chart-outlined":59340,"single-down-arrow":59341,"single-left-arrow":59342,"single-right-arrow":59343,"single-up-arrow":59344,"speaker-active-outlined":59345,"speaker-outlined":59346,"star-circle-outlined":59347,"star-outlined":59348,"stopwatch-outlined":59349,"strikethrough":59350,"suitcase-clock-outlined":59351,"suitcase-outlined":59352,"survey-outlined":59353,"switch-outlined":59354,"sync":59355,"target-outlined":59356,"timesheet-outlined":59357,"today-outlined":59358,"transfer":59359,"trash-bin-outlined":59360,"umbrela-outlined":59361,"unavailable":59362,"underline":59363,"union-outlined":59364,"unlock-outlined":59365,"upload-outlined":59366,"user-circle-outlined":59367,"user-gear-outlined":59368,"user-outlined":59369,"user-rectangle-outlined":59370,"video-1-outlined":59371,"video-2-outlined":59372,"wallet-outlined":59373}
|
|
@@ -59,6 +59,7 @@ const IconList = [
|
|
|
59
59
|
'double-buildings',
|
|
60
60
|
'edit-template',
|
|
61
61
|
'envelope',
|
|
62
|
+
'exclude',
|
|
62
63
|
'expense',
|
|
63
64
|
'eye-circle',
|
|
64
65
|
'eye-invisible',
|
|
@@ -363,6 +364,7 @@ const IconList = [
|
|
|
363
364
|
'umbrela-outlined',
|
|
364
365
|
'unavailable',
|
|
365
366
|
'underline',
|
|
367
|
+
'union-outlined',
|
|
366
368
|
'unlock-outlined',
|
|
367
369
|
'upload-outlined',
|
|
368
370
|
'user-circle-outlined',
|