@hero-design/rn 8.20.0 → 8.21.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 +9 -9
- package/es/index.js +190 -60
- package/lib/index.js +190 -60
- package/package.json +5 -5
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/StyledButton.tsx +0 -3
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -10
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -16
- package/src/components/Calendar/index.tsx +7 -2
- package/src/components/Carousel/StyledCarousel.tsx +11 -3
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +791 -6
- package/src/components/Carousel/__tests__/index.spec.tsx +41 -31
- package/src/components/Carousel/index.tsx +39 -7
- package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
- package/src/components/DatePicker/DatePickerCalendar.tsx +110 -0
- package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
- package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +27 -8
- package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +61 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +670 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +220 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +0 -1
- package/src/components/DatePicker/index.tsx +5 -1
- package/src/components/DatePicker/types.ts +7 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +0 -1
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/Toast.tsx +3 -1
- package/src/components/Toast/types.ts +4 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -3
- package/src/theme/components/button.ts +0 -5
- package/src/theme/components/carousel.ts +3 -0
- package/types/components/Calendar/index.d.ts +6 -2
- package/types/components/Carousel/StyledCarousel.d.ts +7 -1
- package/types/components/Carousel/index.d.ts +7 -1
- package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
- package/types/components/DatePicker/DatePickerCalendar.d.ts +3 -0
- package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
- package/types/components/DatePicker/index.d.ts +1 -1
- package/types/components/DatePicker/types.d.ts +7 -1
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/Toast.d.ts +1 -1
- package/types/components/Toast/types.d.ts +4 -0
- package/types/theme/components/button.d.ts +0 -3
- package/types/theme/components/carousel.d.ts +2 -0
|
@@ -51,7 +51,6 @@ exports[`Button renders correctly 1`] = `
|
|
|
51
51
|
"flexShrink": 1,
|
|
52
52
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
53
53
|
"fontSize": 18,
|
|
54
|
-
"lineHeight": 24,
|
|
55
54
|
"textAlign": "center",
|
|
56
55
|
},
|
|
57
56
|
undefined,
|
|
@@ -266,7 +265,6 @@ exports[`Button renders correctly 3`] = `
|
|
|
266
265
|
"flexShrink": 1,
|
|
267
266
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
268
267
|
"fontSize": 18,
|
|
269
|
-
"lineHeight": 24,
|
|
270
268
|
"textAlign": "center",
|
|
271
269
|
},
|
|
272
270
|
undefined,
|
|
@@ -337,7 +335,6 @@ exports[`Button renders correctly 4`] = `
|
|
|
337
335
|
"flexShrink": 1,
|
|
338
336
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
339
337
|
"fontSize": 18,
|
|
340
|
-
"lineHeight": 24,
|
|
341
338
|
"textAlign": "center",
|
|
342
339
|
},
|
|
343
340
|
undefined,
|
|
@@ -556,7 +553,6 @@ exports[`Button renders correctly 6`] = `
|
|
|
556
553
|
"flexShrink": 1,
|
|
557
554
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
558
555
|
"fontSize": 18,
|
|
559
|
-
"lineHeight": 24,
|
|
560
556
|
"textAlign": "center",
|
|
561
557
|
},
|
|
562
558
|
undefined,
|
|
@@ -625,7 +621,6 @@ exports[`Button renders correctly 7`] = `
|
|
|
625
621
|
"flexShrink": 1,
|
|
626
622
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
627
623
|
"fontSize": 16,
|
|
628
|
-
"lineHeight": 24,
|
|
629
624
|
"textAlign": "center",
|
|
630
625
|
},
|
|
631
626
|
undefined,
|
|
@@ -840,7 +835,6 @@ exports[`Button renders correctly 9`] = `
|
|
|
840
835
|
"flexShrink": 1,
|
|
841
836
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
842
837
|
"fontSize": 16,
|
|
843
|
-
"lineHeight": 24,
|
|
844
838
|
"textAlign": "center",
|
|
845
839
|
},
|
|
846
840
|
undefined,
|
|
@@ -909,7 +903,6 @@ exports[`Button renders correctly 10`] = `
|
|
|
909
903
|
"flexShrink": 1,
|
|
910
904
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
911
905
|
"fontSize": 16,
|
|
912
|
-
"lineHeight": 24,
|
|
913
906
|
"textAlign": "center",
|
|
914
907
|
},
|
|
915
908
|
undefined,
|
|
@@ -1124,7 +1117,6 @@ exports[`Button renders correctly 12`] = `
|
|
|
1124
1117
|
"flexShrink": 1,
|
|
1125
1118
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
1126
1119
|
"fontSize": 16,
|
|
1127
|
-
"lineHeight": 24,
|
|
1128
1120
|
"textAlign": "center",
|
|
1129
1121
|
},
|
|
1130
1122
|
undefined,
|
|
@@ -1193,7 +1185,6 @@ exports[`Button renders correctly 13`] = `
|
|
|
1193
1185
|
"flexShrink": 1,
|
|
1194
1186
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
1195
1187
|
"fontSize": 16,
|
|
1196
|
-
"lineHeight": 24,
|
|
1197
1188
|
"textAlign": "center",
|
|
1198
1189
|
},
|
|
1199
1190
|
undefined,
|
|
@@ -1408,7 +1399,6 @@ exports[`Button renders correctly 15`] = `
|
|
|
1408
1399
|
"flexShrink": 1,
|
|
1409
1400
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
1410
1401
|
"fontSize": 16,
|
|
1411
|
-
"lineHeight": 24,
|
|
1412
1402
|
"textAlign": "center",
|
|
1413
1403
|
},
|
|
1414
1404
|
undefined,
|
|
@@ -413,7 +413,6 @@ exports[`StyledButtonIcon has outlined-danger style 1`] = `
|
|
|
413
413
|
Object {
|
|
414
414
|
"color": "#de350b",
|
|
415
415
|
"fontSize": 18,
|
|
416
|
-
"lineHeight": 24,
|
|
417
416
|
},
|
|
418
417
|
undefined,
|
|
419
418
|
],
|
|
@@ -437,7 +436,6 @@ exports[`StyledButtonIcon has outlined-primary style 1`] = `
|
|
|
437
436
|
Object {
|
|
438
437
|
"color": "#401960",
|
|
439
438
|
"fontSize": 18,
|
|
440
|
-
"lineHeight": 24,
|
|
441
439
|
},
|
|
442
440
|
undefined,
|
|
443
441
|
],
|
|
@@ -461,7 +459,6 @@ exports[`StyledButtonIcon has outlined-secondary style 1`] = `
|
|
|
461
459
|
Object {
|
|
462
460
|
"color": "#795e90",
|
|
463
461
|
"fontSize": 18,
|
|
464
|
-
"lineHeight": 24,
|
|
465
462
|
},
|
|
466
463
|
undefined,
|
|
467
464
|
],
|
|
@@ -485,7 +482,6 @@ exports[`StyledButtonIcon has text-danger style 1`] = `
|
|
|
485
482
|
Object {
|
|
486
483
|
"color": "#de350b",
|
|
487
484
|
"fontSize": 16,
|
|
488
|
-
"lineHeight": 24,
|
|
489
485
|
},
|
|
490
486
|
undefined,
|
|
491
487
|
],
|
|
@@ -509,7 +505,6 @@ exports[`StyledButtonIcon has text-primary style 1`] = `
|
|
|
509
505
|
Object {
|
|
510
506
|
"color": "#401960",
|
|
511
507
|
"fontSize": 16,
|
|
512
|
-
"lineHeight": 24,
|
|
513
508
|
},
|
|
514
509
|
undefined,
|
|
515
510
|
],
|
|
@@ -533,7 +528,6 @@ exports[`StyledButtonIcon has text-secondary style 1`] = `
|
|
|
533
528
|
Object {
|
|
534
529
|
"color": "#795e90",
|
|
535
530
|
"fontSize": 16,
|
|
536
|
-
"lineHeight": 24,
|
|
537
531
|
},
|
|
538
532
|
undefined,
|
|
539
533
|
],
|
|
@@ -613,7 +607,6 @@ exports[`StyledButtonText has filled-danger style 1`] = `
|
|
|
613
607
|
"flexShrink": 1,
|
|
614
608
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
615
609
|
"fontSize": 18,
|
|
616
|
-
"lineHeight": 24,
|
|
617
610
|
"textAlign": "center",
|
|
618
611
|
},
|
|
619
612
|
undefined,
|
|
@@ -648,7 +641,6 @@ exports[`StyledButtonText has filled-primary style 1`] = `
|
|
|
648
641
|
"flexShrink": 1,
|
|
649
642
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
650
643
|
"fontSize": 18,
|
|
651
|
-
"lineHeight": 24,
|
|
652
644
|
"textAlign": "center",
|
|
653
645
|
},
|
|
654
646
|
undefined,
|
|
@@ -683,7 +675,6 @@ exports[`StyledButtonText has filled-secondary style 1`] = `
|
|
|
683
675
|
"flexShrink": 1,
|
|
684
676
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
685
677
|
"fontSize": 18,
|
|
686
|
-
"lineHeight": 24,
|
|
687
678
|
"textAlign": "center",
|
|
688
679
|
},
|
|
689
680
|
undefined,
|
|
@@ -718,7 +709,6 @@ exports[`StyledButtonText has outlined-danger style 1`] = `
|
|
|
718
709
|
"flexShrink": 1,
|
|
719
710
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
720
711
|
"fontSize": 18,
|
|
721
|
-
"lineHeight": 24,
|
|
722
712
|
"textAlign": "center",
|
|
723
713
|
},
|
|
724
714
|
undefined,
|
|
@@ -753,7 +743,6 @@ exports[`StyledButtonText has outlined-primary style 1`] = `
|
|
|
753
743
|
"flexShrink": 1,
|
|
754
744
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
755
745
|
"fontSize": 18,
|
|
756
|
-
"lineHeight": 24,
|
|
757
746
|
"textAlign": "center",
|
|
758
747
|
},
|
|
759
748
|
undefined,
|
|
@@ -788,7 +777,6 @@ exports[`StyledButtonText has outlined-secondary style 1`] = `
|
|
|
788
777
|
"flexShrink": 1,
|
|
789
778
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
790
779
|
"fontSize": 18,
|
|
791
|
-
"lineHeight": 24,
|
|
792
780
|
"textAlign": "center",
|
|
793
781
|
},
|
|
794
782
|
undefined,
|
|
@@ -823,7 +811,6 @@ exports[`StyledButtonText has text-danger style 1`] = `
|
|
|
823
811
|
"flexShrink": 1,
|
|
824
812
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
825
813
|
"fontSize": 16,
|
|
826
|
-
"lineHeight": 24,
|
|
827
814
|
"textAlign": "center",
|
|
828
815
|
},
|
|
829
816
|
undefined,
|
|
@@ -858,7 +845,6 @@ exports[`StyledButtonText has text-primary style 1`] = `
|
|
|
858
845
|
"flexShrink": 1,
|
|
859
846
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
860
847
|
"fontSize": 16,
|
|
861
|
-
"lineHeight": 24,
|
|
862
848
|
"textAlign": "center",
|
|
863
849
|
},
|
|
864
850
|
undefined,
|
|
@@ -893,7 +879,6 @@ exports[`StyledButtonText has text-secondary style 1`] = `
|
|
|
893
879
|
"flexShrink": 1,
|
|
894
880
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
895
881
|
"fontSize": 16,
|
|
896
|
-
"lineHeight": 24,
|
|
897
882
|
"textAlign": "center",
|
|
898
883
|
},
|
|
899
884
|
undefined,
|
|
@@ -929,7 +914,6 @@ exports[`StyledButtonText renders disabled correctly 1`] = `
|
|
|
929
914
|
"flexShrink": 1,
|
|
930
915
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
931
916
|
"fontSize": 18,
|
|
932
|
-
"lineHeight": 24,
|
|
933
917
|
"textAlign": "center",
|
|
934
918
|
},
|
|
935
919
|
undefined,
|
|
@@ -61,9 +61,13 @@ export interface CalendarProps {
|
|
|
61
61
|
*/
|
|
62
62
|
onTitlePress?: () => void;
|
|
63
63
|
/**
|
|
64
|
-
* Mark dates to display on calendar
|
|
64
|
+
* Mark dates to display on calendar.
|
|
65
65
|
*/
|
|
66
66
|
markedDates?: Date[];
|
|
67
|
+
/**
|
|
68
|
+
* Testing id of the component.
|
|
69
|
+
*/
|
|
70
|
+
testID?: string;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
const Calendar = ({
|
|
@@ -76,6 +80,7 @@ const Calendar = ({
|
|
|
76
80
|
minDate,
|
|
77
81
|
maxDate,
|
|
78
82
|
markedDates = [],
|
|
83
|
+
testID,
|
|
79
84
|
}: CalendarProps) => {
|
|
80
85
|
const currentMonth = visibleDate.getMonth();
|
|
81
86
|
const currentYear = visibleDate.getFullYear();
|
|
@@ -144,7 +149,7 @@ const Calendar = ({
|
|
|
144
149
|
maxDate <= lastDateOfMonth;
|
|
145
150
|
|
|
146
151
|
return (
|
|
147
|
-
<StyledContainer>
|
|
152
|
+
<StyledContainer testID={testID}>
|
|
148
153
|
<StyledCalendarHeader>
|
|
149
154
|
<ContentNavigator
|
|
150
155
|
value={format('MMMM yyyy', visibleDate)}
|
|
@@ -62,9 +62,16 @@ const StyledCarouselFooterWrapper = styled(View)(({ theme }) => ({
|
|
|
62
62
|
marginBottom: theme.__hd__.carousel.space.footerMarginBottom,
|
|
63
63
|
}));
|
|
64
64
|
|
|
65
|
-
const StyledPageControl = styled(PageControl)({
|
|
66
|
-
|
|
67
|
-
});
|
|
65
|
+
const StyledPageControl = styled(PageControl)(({ theme }) => ({
|
|
66
|
+
paddingVertical: theme.__hd__.carousel.space.pageControlPaddingVertical,
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
const StyledPageControlWrapper = styled(View)(({ theme }) => ({
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
height: theme.__hd__.carousel.space.pageControlWrapperHeight,
|
|
73
|
+
}));
|
|
74
|
+
|
|
68
75
|
export {
|
|
69
76
|
StyledBackDrop,
|
|
70
77
|
StyledCarouselView,
|
|
@@ -74,4 +81,5 @@ export {
|
|
|
74
81
|
StyledCarouselFooterWrapper,
|
|
75
82
|
StyledCustomSizeCarouselImage,
|
|
76
83
|
StyledPageControl,
|
|
84
|
+
StyledPageControlWrapper,
|
|
77
85
|
};
|