@hero-design/rn 8.112.5 → 8.113.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 +3 -3
- package/CHANGELOG.md +21 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +1593 -2010
- package/jest.config.js +1 -1
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +1592 -2009
- package/package.json +5 -5
- package/src/components/Alert/index.tsx +1 -1
- package/src/components/Badge/Count.tsx +2 -2
- package/src/components/Badge/Status.tsx +2 -2
- package/src/components/Badge/index.tsx +2 -1
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +32 -36
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +17 -8
- package/src/components/BottomNavigation/index.tsx +4 -5
- package/src/components/BottomSheet/ScrollView.tsx +2 -1
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Calendar/CalendarRange.tsx +1 -1
- package/src/components/Calendar/__tests__/index.spec.tsx +3 -8
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/Card/DataCard/index.tsx +2 -2
- package/src/components/Card/index.tsx +2 -2
- package/src/components/Carousel/index.tsx +2 -2
- package/src/components/DatePicker/Dialog/__tests__/IOSDialog.spec.tsx +0 -6
- package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +2 -10
- package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +27 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +176 -728
- package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +5 -7
- package/src/components/DatePicker/hooks/useFormatDate.ts +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/Drawer/DragableDrawer/index.tsx +2 -2
- package/src/components/Drawer/index.tsx +2 -2
- package/src/components/FAB/__tests__/index.spec.tsx +33 -8
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/Image/index.tsx +2 -1
- package/src/components/List/BasicListItem.tsx +2 -1
- package/src/components/List/ListItem.tsx +1 -1
- package/src/components/LocaleProvider/__tests__/utils.specs.ts +2 -1
- package/src/components/LocaleProvider/index.tsx +1 -1
- package/src/components/LocaleProvider/utils.ts +3 -2
- package/src/components/MapPin/Focussed.tsx +2 -1
- package/src/components/MapPin/index.tsx +2 -1
- package/src/components/Modal/__tests__/index.spec.tsx +46 -0
- package/src/components/Modal/index.tsx +121 -149
- package/src/components/Progress/ProgressBar.tsx +2 -1
- package/src/components/Progress/ProgressCircle.tsx +2 -1
- package/src/components/RichTextEditor/MentionList.tsx +2 -1
- package/src/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.tsx +4 -6
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +43 -32
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +105 -129
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +30 -42
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +0 -683
- package/src/components/Tabs/__tests__/index.spec.tsx +37 -25
- package/src/components/Tabs/index.tsx +2 -2
- package/src/components/Tag/index.tsx +1 -1
- package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
- package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +0 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +237 -282
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/Toast.tsx +2 -1
- package/src/components/Toolbar/ToolbarItem.tsx +2 -1
- package/src/components/Typography/Label/index.tsx +1 -1
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/types/components/Alert/index.d.ts +1 -1
- package/types/components/Badge/Count.d.ts +2 -2
- package/types/components/Badge/Status.d.ts +2 -2
- package/types/components/Badge/index.d.ts +4 -3
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +1 -1
- package/types/components/BottomNavigation/index.d.ts +2 -2
- package/types/components/BottomSheet/index.d.ts +1 -1
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Card/DataCard/index.d.ts +2 -2
- package/types/components/Card/index.d.ts +3 -3
- package/types/components/Carousel/index.d.ts +2 -2
- package/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/Drawer/DragableDrawer/index.d.ts +2 -2
- package/types/components/Drawer/index.d.ts +3 -3
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Image/index.d.ts +2 -1
- package/types/components/List/BasicListItem.d.ts +2 -1
- package/types/components/List/ListItem.d.ts +1 -1
- package/types/components/LocaleProvider/utils.d.ts +1 -1
- package/types/components/MapPin/Focussed.d.ts +2 -1
- package/types/components/MapPin/index.d.ts +3 -2
- package/types/components/Modal/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +2 -1
- package/types/components/Progress/ProgressCircle.d.ts +2 -1
- package/types/components/Progress/index.d.ts +2 -2
- package/types/components/RichTextEditor/MentionList.d.ts +2 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/Tag/index.d.ts +1 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/Toast.d.ts +2 -1
- package/types/components/Typography/Label/index.d.ts +1 -1
- package/types/testHelpers/renderWithTheme.d.ts +84 -1
|
@@ -562,19 +562,9 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
562
562
|
</View>
|
|
563
563
|
</View>
|
|
564
564
|
</View>
|
|
565
|
-
<
|
|
566
|
-
animationType="none"
|
|
565
|
+
<Modal
|
|
567
566
|
hardwareAccelerated={false}
|
|
568
|
-
identifier={0}
|
|
569
|
-
onDismiss={[Function]}
|
|
570
567
|
onRequestClose={[Function]}
|
|
571
|
-
onStartShouldSetResponder={[Function]}
|
|
572
|
-
presentationStyle="overFullScreen"
|
|
573
|
-
style={
|
|
574
|
-
{
|
|
575
|
-
"position": "absolute",
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
568
|
supportedOrientations={
|
|
579
569
|
[
|
|
580
570
|
"portrait",
|
|
@@ -584,67 +574,156 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
584
574
|
visible={true}
|
|
585
575
|
>
|
|
586
576
|
<View
|
|
587
|
-
|
|
577
|
+
pointerEvents="box-none"
|
|
588
578
|
style={
|
|
589
579
|
[
|
|
590
580
|
{
|
|
591
|
-
"
|
|
581
|
+
"bottom": 0,
|
|
582
|
+
"flexDirection": "column-reverse",
|
|
592
583
|
"left": 0,
|
|
584
|
+
"position": "absolute",
|
|
585
|
+
"right": 0,
|
|
593
586
|
"top": 0,
|
|
594
587
|
},
|
|
595
|
-
|
|
596
|
-
"backgroundColor": "transparent",
|
|
597
|
-
},
|
|
588
|
+
undefined,
|
|
598
589
|
]
|
|
599
590
|
}
|
|
600
591
|
>
|
|
601
592
|
<View
|
|
602
|
-
|
|
593
|
+
onLayout={[Function]}
|
|
603
594
|
style={
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
595
|
+
[
|
|
596
|
+
[
|
|
597
|
+
{
|
|
598
|
+
"flex": 1,
|
|
599
|
+
"flexDirection": "column-reverse",
|
|
600
|
+
},
|
|
601
|
+
undefined,
|
|
602
|
+
],
|
|
603
|
+
{
|
|
604
|
+
"paddingBottom": 0,
|
|
605
|
+
},
|
|
606
|
+
]
|
|
607
607
|
}
|
|
608
608
|
>
|
|
609
609
|
<View
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
accessibilityState={
|
|
611
|
+
{
|
|
612
|
+
"busy": undefined,
|
|
613
|
+
"checked": undefined,
|
|
614
|
+
"disabled": undefined,
|
|
615
|
+
"expanded": undefined,
|
|
616
|
+
"selected": undefined,
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
accessibilityValue={
|
|
620
|
+
{
|
|
621
|
+
"max": undefined,
|
|
622
|
+
"min": undefined,
|
|
623
|
+
"now": undefined,
|
|
624
|
+
"text": undefined,
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
accessible={true}
|
|
628
|
+
collapsable={false}
|
|
629
|
+
focusable={true}
|
|
630
|
+
onBlur={[Function]}
|
|
631
|
+
onClick={[Function]}
|
|
632
|
+
onFocus={[Function]}
|
|
633
|
+
onResponderGrant={[Function]}
|
|
634
|
+
onResponderMove={[Function]}
|
|
635
|
+
onResponderRelease={[Function]}
|
|
636
|
+
onResponderTerminate={[Function]}
|
|
637
|
+
onResponderTerminationRequest={[Function]}
|
|
638
|
+
onStartShouldSetResponder={[Function]}
|
|
612
639
|
style={
|
|
613
640
|
{
|
|
614
|
-
"
|
|
641
|
+
"backgroundColor": "#000000",
|
|
642
|
+
"bottom": 0,
|
|
643
|
+
"left": 0,
|
|
644
|
+
"opacity": 0.48,
|
|
645
|
+
"position": "absolute",
|
|
646
|
+
"right": 0,
|
|
647
|
+
"top": 0,
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
/>
|
|
651
|
+
<RCTSafeAreaView
|
|
652
|
+
collapsable={false}
|
|
653
|
+
style={
|
|
654
|
+
{
|
|
655
|
+
"backgroundColor": "#ffffff",
|
|
656
|
+
"borderTopLeftRadius": 16,
|
|
657
|
+
"borderTopRightRadius": 16,
|
|
658
|
+
"maxHeight": "94%",
|
|
659
|
+
"transform": [
|
|
660
|
+
{
|
|
661
|
+
"scaleY": 1,
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"translateY": 0,
|
|
665
|
+
},
|
|
666
|
+
],
|
|
667
|
+
"width": "100%",
|
|
615
668
|
}
|
|
616
669
|
}
|
|
617
670
|
>
|
|
618
671
|
<View
|
|
619
|
-
pointerEvents="box-none"
|
|
620
672
|
style={
|
|
621
673
|
[
|
|
622
674
|
{
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
"
|
|
626
|
-
"position": "absolute",
|
|
627
|
-
"right": 0,
|
|
628
|
-
"top": 0,
|
|
675
|
+
"flexDirection": "row",
|
|
676
|
+
"paddingHorizontal": 16,
|
|
677
|
+
"paddingVertical": 8,
|
|
629
678
|
},
|
|
630
679
|
undefined,
|
|
631
680
|
]
|
|
632
681
|
}
|
|
633
682
|
>
|
|
634
683
|
<View
|
|
635
|
-
onLayout={[Function]}
|
|
636
684
|
style={
|
|
637
685
|
[
|
|
686
|
+
{
|
|
687
|
+
"flex": 1,
|
|
688
|
+
"justifyContent": "center",
|
|
689
|
+
},
|
|
690
|
+
undefined,
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
>
|
|
694
|
+
<Text
|
|
695
|
+
allowFontScaling={false}
|
|
696
|
+
style={
|
|
638
697
|
[
|
|
639
698
|
{
|
|
640
|
-
"
|
|
641
|
-
"
|
|
699
|
+
"color": "#001f23",
|
|
700
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
701
|
+
"fontSize": 16,
|
|
702
|
+
"letterSpacing": 0.24,
|
|
703
|
+
"lineHeight": 24,
|
|
642
704
|
},
|
|
643
705
|
undefined,
|
|
644
|
-
]
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
themeIntent="body"
|
|
709
|
+
themeIsItalic={false}
|
|
710
|
+
themeTypeface="neutral"
|
|
711
|
+
themeVariant="regular-bold"
|
|
712
|
+
>
|
|
713
|
+
Break time
|
|
714
|
+
</Text>
|
|
715
|
+
</View>
|
|
716
|
+
<View
|
|
717
|
+
style={
|
|
718
|
+
[
|
|
645
719
|
{
|
|
646
|
-
"
|
|
720
|
+
"alignItems": "flex-end",
|
|
721
|
+
"height": 48,
|
|
722
|
+
"justifyContent": "center",
|
|
723
|
+
"marginLeft": 12,
|
|
724
|
+
"width": 48,
|
|
647
725
|
},
|
|
726
|
+
undefined,
|
|
648
727
|
]
|
|
649
728
|
}
|
|
650
729
|
>
|
|
@@ -669,9 +748,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
669
748
|
accessible={true}
|
|
670
749
|
collapsable={false}
|
|
671
750
|
focusable={true}
|
|
672
|
-
onBlur={[Function]}
|
|
673
751
|
onClick={[Function]}
|
|
674
|
-
onFocus={[Function]}
|
|
675
752
|
onResponderGrant={[Function]}
|
|
676
753
|
onResponderMove={[Function]}
|
|
677
754
|
onResponderRelease={[Function]}
|
|
@@ -680,273 +757,151 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
680
757
|
onStartShouldSetResponder={[Function]}
|
|
681
758
|
style={
|
|
682
759
|
{
|
|
683
|
-
"
|
|
684
|
-
"bottom": 0,
|
|
685
|
-
"left": 0,
|
|
686
|
-
"opacity": 0.48,
|
|
687
|
-
"position": "absolute",
|
|
688
|
-
"right": 0,
|
|
689
|
-
"top": 0,
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
/>
|
|
693
|
-
<RCTSafeAreaView
|
|
694
|
-
collapsable={false}
|
|
695
|
-
style={
|
|
696
|
-
{
|
|
697
|
-
"backgroundColor": "#ffffff",
|
|
698
|
-
"borderTopLeftRadius": 16,
|
|
699
|
-
"borderTopRightRadius": 16,
|
|
700
|
-
"maxHeight": "94%",
|
|
701
|
-
"transform": [
|
|
702
|
-
{
|
|
703
|
-
"scaleY": 1,
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
"translateY": 0,
|
|
707
|
-
},
|
|
708
|
-
],
|
|
709
|
-
"width": "100%",
|
|
760
|
+
"opacity": 1,
|
|
710
761
|
}
|
|
711
762
|
}
|
|
763
|
+
testID="bottom-sheet-close-icon"
|
|
712
764
|
>
|
|
713
|
-
<
|
|
765
|
+
<HeroIcon
|
|
766
|
+
name="cancel"
|
|
714
767
|
style={
|
|
715
768
|
[
|
|
716
769
|
{
|
|
717
|
-
"
|
|
718
|
-
"
|
|
719
|
-
"paddingVertical": 8,
|
|
770
|
+
"color": "#001f23",
|
|
771
|
+
"fontSize": 16,
|
|
720
772
|
},
|
|
721
773
|
undefined,
|
|
722
774
|
]
|
|
723
775
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
undefined,
|
|
816
|
-
]
|
|
817
|
-
}
|
|
818
|
-
themeIntent="text"
|
|
819
|
-
themeSize="xsmall"
|
|
820
|
-
/>
|
|
821
|
-
</View>
|
|
822
|
-
</View>
|
|
823
|
-
</View>
|
|
824
|
-
<View
|
|
776
|
+
themeIntent="text"
|
|
777
|
+
themeSize="xsmall"
|
|
778
|
+
/>
|
|
779
|
+
</View>
|
|
780
|
+
</View>
|
|
781
|
+
</View>
|
|
782
|
+
<View
|
|
783
|
+
style={
|
|
784
|
+
[
|
|
785
|
+
{
|
|
786
|
+
"alignItems": "center",
|
|
787
|
+
"height": 176,
|
|
788
|
+
},
|
|
789
|
+
undefined,
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
>
|
|
793
|
+
<Picker
|
|
794
|
+
display="spinner"
|
|
795
|
+
locale="en-US"
|
|
796
|
+
mode="time"
|
|
797
|
+
onChange={[Function]}
|
|
798
|
+
style={
|
|
799
|
+
{
|
|
800
|
+
"flex": 1,
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
testID="timePickerIOS"
|
|
804
|
+
textColor="#001f23"
|
|
805
|
+
value={1995-12-17T03:24:00.000Z}
|
|
806
|
+
/>
|
|
807
|
+
</View>
|
|
808
|
+
<View>
|
|
809
|
+
<View
|
|
810
|
+
style={
|
|
811
|
+
[
|
|
812
|
+
{
|
|
813
|
+
"alignItems": "center",
|
|
814
|
+
"flexDirection": "row",
|
|
815
|
+
"justifyContent": "flex-end",
|
|
816
|
+
"paddingHorizontal": 12,
|
|
817
|
+
"paddingVertical": 2,
|
|
818
|
+
},
|
|
819
|
+
undefined,
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
>
|
|
823
|
+
<View
|
|
824
|
+
accessibilityState={
|
|
825
|
+
{
|
|
826
|
+
"disabled": false,
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
accessibilityValue={
|
|
830
|
+
{
|
|
831
|
+
"max": undefined,
|
|
832
|
+
"min": undefined,
|
|
833
|
+
"now": undefined,
|
|
834
|
+
"text": undefined,
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
accessible={true}
|
|
838
|
+
focusable={true}
|
|
839
|
+
onClick={[Function]}
|
|
840
|
+
onResponderGrant={[Function]}
|
|
841
|
+
onResponderMove={[Function]}
|
|
842
|
+
onResponderRelease={[Function]}
|
|
843
|
+
onResponderTerminate={[Function]}
|
|
844
|
+
onResponderTerminationRequest={[Function]}
|
|
845
|
+
onStartShouldSetResponder={[Function]}
|
|
846
|
+
style={
|
|
847
|
+
[
|
|
848
|
+
{
|
|
849
|
+
"alignItems": "center",
|
|
850
|
+
"backgroundColor": "transparent",
|
|
851
|
+
"borderRadius": 999,
|
|
852
|
+
"borderWidth": 0,
|
|
853
|
+
"flexDirection": "row",
|
|
854
|
+
"height": 60,
|
|
855
|
+
"justifyContent": "center",
|
|
856
|
+
"padding": 12,
|
|
857
|
+
},
|
|
858
|
+
undefined,
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
>
|
|
862
|
+
<Text
|
|
863
|
+
allowFontScaling={false}
|
|
864
|
+
disabled={false}
|
|
865
|
+
ellipsizeMode="tail"
|
|
866
|
+
numberOfLines={1}
|
|
825
867
|
style={
|
|
826
868
|
[
|
|
827
869
|
{
|
|
828
|
-
"
|
|
829
|
-
"
|
|
870
|
+
"color": "#001f23",
|
|
871
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
872
|
+
"fontSize": 16,
|
|
873
|
+
"letterSpacing": 0.24,
|
|
874
|
+
"lineHeight": 24,
|
|
830
875
|
},
|
|
831
|
-
undefined,
|
|
832
|
-
]
|
|
833
|
-
}
|
|
834
|
-
>
|
|
835
|
-
<Picker
|
|
836
|
-
display="spinner"
|
|
837
|
-
locale="en-US"
|
|
838
|
-
mode="time"
|
|
839
|
-
onChange={[Function]}
|
|
840
|
-
style={
|
|
841
|
-
{
|
|
842
|
-
"flex": 1,
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
testID="timePickerIOS"
|
|
846
|
-
textColor="#001f23"
|
|
847
|
-
value={1995-12-17T03:24:00.000Z}
|
|
848
|
-
/>
|
|
849
|
-
</View>
|
|
850
|
-
<View>
|
|
851
|
-
<View
|
|
852
|
-
style={
|
|
853
876
|
[
|
|
854
877
|
{
|
|
855
|
-
"
|
|
856
|
-
"
|
|
857
|
-
"
|
|
858
|
-
"
|
|
859
|
-
"
|
|
878
|
+
"color": "#401960",
|
|
879
|
+
"flexShrink": 1,
|
|
880
|
+
"lineHeight": 22,
|
|
881
|
+
"textAlign": "center",
|
|
882
|
+
"textAlignVertical": "center",
|
|
860
883
|
},
|
|
861
884
|
undefined,
|
|
862
|
-
]
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
"text": undefined,
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
accessible={true}
|
|
880
|
-
focusable={true}
|
|
881
|
-
onClick={[Function]}
|
|
882
|
-
onResponderGrant={[Function]}
|
|
883
|
-
onResponderMove={[Function]}
|
|
884
|
-
onResponderRelease={[Function]}
|
|
885
|
-
onResponderTerminate={[Function]}
|
|
886
|
-
onResponderTerminationRequest={[Function]}
|
|
887
|
-
onStartShouldSetResponder={[Function]}
|
|
888
|
-
style={
|
|
889
|
-
[
|
|
890
|
-
{
|
|
891
|
-
"alignItems": "center",
|
|
892
|
-
"backgroundColor": "transparent",
|
|
893
|
-
"borderRadius": 999,
|
|
894
|
-
"borderWidth": 0,
|
|
895
|
-
"flexDirection": "row",
|
|
896
|
-
"height": 60,
|
|
897
|
-
"justifyContent": "center",
|
|
898
|
-
"padding": 12,
|
|
899
|
-
},
|
|
900
|
-
undefined,
|
|
901
|
-
]
|
|
902
|
-
}
|
|
903
|
-
>
|
|
904
|
-
<Text
|
|
905
|
-
allowFontScaling={false}
|
|
906
|
-
disabled={false}
|
|
907
|
-
ellipsizeMode="tail"
|
|
908
|
-
numberOfLines={1}
|
|
909
|
-
style={
|
|
910
|
-
[
|
|
911
|
-
{
|
|
912
|
-
"color": "#001f23",
|
|
913
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
914
|
-
"fontSize": 16,
|
|
915
|
-
"letterSpacing": 0.24,
|
|
916
|
-
"lineHeight": 24,
|
|
917
|
-
},
|
|
918
|
-
[
|
|
919
|
-
{
|
|
920
|
-
"color": "#401960",
|
|
921
|
-
"flexShrink": 1,
|
|
922
|
-
"lineHeight": 22,
|
|
923
|
-
"textAlign": "center",
|
|
924
|
-
"textAlignVertical": "center",
|
|
925
|
-
},
|
|
926
|
-
undefined,
|
|
927
|
-
],
|
|
928
|
-
]
|
|
929
|
-
}
|
|
930
|
-
themeButtonVariant="text-primary"
|
|
931
|
-
themeIntent="body"
|
|
932
|
-
themeIsCompact={false}
|
|
933
|
-
themeIsItalic={false}
|
|
934
|
-
themeIsPressed={false}
|
|
935
|
-
themeTypeface="neutral"
|
|
936
|
-
themeVariant="regular-bold"
|
|
937
|
-
>
|
|
938
|
-
Confirm
|
|
939
|
-
</Text>
|
|
940
|
-
</View>
|
|
941
|
-
</View>
|
|
942
|
-
</View>
|
|
943
|
-
</RCTSafeAreaView>
|
|
885
|
+
],
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
themeButtonVariant="text-primary"
|
|
889
|
+
themeIntent="body"
|
|
890
|
+
themeIsCompact={false}
|
|
891
|
+
themeIsItalic={false}
|
|
892
|
+
themeIsPressed={false}
|
|
893
|
+
themeTypeface="neutral"
|
|
894
|
+
themeVariant="regular-bold"
|
|
895
|
+
>
|
|
896
|
+
Confirm
|
|
897
|
+
</Text>
|
|
898
|
+
</View>
|
|
944
899
|
</View>
|
|
945
900
|
</View>
|
|
946
|
-
</
|
|
901
|
+
</RCTSafeAreaView>
|
|
947
902
|
</View>
|
|
948
903
|
</View>
|
|
949
|
-
</
|
|
904
|
+
</Modal>
|
|
950
905
|
</View>
|
|
951
906
|
<View
|
|
952
907
|
pointerEvents="box-none"
|
|
@@ -24,7 +24,7 @@ export interface TimePickerProps {
|
|
|
24
24
|
confirmLabel: string;
|
|
25
25
|
/**
|
|
26
26
|
* Time display format of current value presented on the input. Default format is: HH:mm aa.
|
|
27
|
-
* Following date-fns's format (https://date-fns.org/
|
|
27
|
+
* Following date-fns's format (https://date-fns.org/v2.16.1/docs/format).
|
|
28
28
|
* This also change how the time picker display between 24 hour and 12 hour mode.
|
|
29
29
|
*/
|
|
30
30
|
displayFormat?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import React, { useEffect, useLayoutEffect, useRef } from 'react';
|
|
2
3
|
import { Animated, LayoutAnimation } from 'react-native';
|
|
3
4
|
import {
|
|
@@ -53,7 +54,7 @@ const Toast = ({
|
|
|
53
54
|
actionLabel,
|
|
54
55
|
onDismiss,
|
|
55
56
|
distance = 0,
|
|
56
|
-
}: ToastProps):
|
|
57
|
+
}: ToastProps): ReactElement => {
|
|
57
58
|
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
58
59
|
const toastConfig = useToastConfig();
|
|
59
60
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
import Icon from '../Icon';
|
|
@@ -78,7 +79,7 @@ const ToolbarItemContent = ({
|
|
|
78
79
|
label,
|
|
79
80
|
intent = 'primary',
|
|
80
81
|
disabled = false,
|
|
81
|
-
}: ToolbarItemContentProps):
|
|
82
|
+
}: ToolbarItemContentProps): ReactElement | null => {
|
|
82
83
|
if (icon) {
|
|
83
84
|
return (
|
|
84
85
|
<IconItem icon={icon} intent={intent} disabled={disabled} label={label} />
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { render } from '@testing-library/react-native'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
4
|
import type { RenderOptions } from '@testing-library/react-native';
|
|
@@ -5,7 +6,7 @@ import { theme } from '../index';
|
|
|
5
6
|
import HeroDesignProvider from '../components/HeroDesignProvider';
|
|
6
7
|
import enAU from '../locales/en_AU';
|
|
7
8
|
|
|
8
|
-
const renderWithTheme = (ui:
|
|
9
|
+
const renderWithTheme = (ui: ReactElement, options?: RenderOptions) =>
|
|
9
10
|
render(
|
|
10
11
|
<HeroDesignProvider theme={theme} locale={enAU}>
|
|
11
12
|
{ui}
|