@hero-design/rn 8.98.1 → 8.99.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.
Files changed (65) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +12 -0
  3. package/babel.config.js +4 -1
  4. package/es/index.js +45 -66
  5. package/lib/index.js +45 -66
  6. package/package.json +39 -19
  7. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +0 -3
  8. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +52 -52
  9. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +87 -87
  10. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  11. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -4
  12. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
  13. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  14. package/src/components/Radio/Radio.tsx +7 -1
  15. package/src/components/Radio/RadioGroup.tsx +1 -0
  16. package/src/components/Radio/__tests__/Radio.spec.tsx +15 -0
  17. package/src/components/Radio/__tests__/RadioGroup.spec.tsx +27 -0
  18. package/src/components/Radio/types.ts +3 -1
  19. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1472 -1496
  20. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +2992 -3040
  21. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1644 -1672
  22. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2512 -2554
  23. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +6 -6
  24. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +24 -24
  25. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  26. package/src/components/StatusScreens/Empty/__tests__/__snapshots__/index.spec.tsx.snap +120 -0
  27. package/src/components/StatusScreens/Empty/__tests__/index.spec.tsx +21 -1
  28. package/src/components/StatusScreens/Empty/index.tsx +1 -1
  29. package/src/components/StatusScreens/Error/__tests__/__snapshots__/index.spec.tsx.snap +134 -0
  30. package/src/components/StatusScreens/Error/__tests__/index.spec.tsx +14 -0
  31. package/src/components/StatusScreens/Error/index.tsx +1 -1
  32. package/src/components/StatusScreens/Success/__tests__/__snapshots__/index.spec.tsx.snap +134 -0
  33. package/src/components/StatusScreens/Success/__tests__/index.spec.tsx +13 -0
  34. package/src/components/StatusScreens/Success/index.tsx +1 -1
  35. package/src/components/Tabs/ScrollableTabs.tsx +0 -1
  36. package/src/components/Tabs/index.tsx +0 -1
  37. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +2 -2
  38. package/stats/8.98.1/rn-stats.html +3 -1
  39. package/stats/8.99.0/rn-stats.html +4842 -0
  40. package/stats/8.99.1/rn-stats.html +4842 -0
  41. package/testUtils/setup.tsx +0 -1
  42. package/types/components/Accordion/StyledAccordion.d.ts +3 -5
  43. package/types/components/Alert/StyledAlert.d.ts +3 -5
  44. package/types/components/Attachment/StyledAttachment.d.ts +3 -5
  45. package/types/components/Avatar/StyledAvatar.d.ts +3 -5
  46. package/types/components/BottomSheet/StyledBottomSheet.d.ts +3 -5
  47. package/types/components/Button/StyledButton.d.ts +3 -5
  48. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +3 -5
  49. package/types/components/Calendar/StyledCalendar.d.ts +3 -5
  50. package/types/components/Checkbox/StyledCheckbox.d.ts +3 -5
  51. package/types/components/Chip/StyledChip.d.ts +2 -5
  52. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +2 -5
  53. package/types/components/FAB/StyledFAB.d.ts +2 -2
  54. package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +2 -2
  55. package/types/components/List/StyledBasicListItem.d.ts +3 -5
  56. package/types/components/List/StyledListItem.d.ts +3 -5
  57. package/types/components/Radio/Radio.d.ts +6 -1
  58. package/types/components/Radio/types.d.ts +3 -1
  59. package/types/components/RichTextEditor/StyledToolbar.d.ts +3 -5
  60. package/types/components/StatusScreens/Empty/index.d.ts +1 -1
  61. package/types/components/StatusScreens/Error/index.d.ts +1 -1
  62. package/types/components/StatusScreens/Success/index.d.ts +1 -1
  63. package/types/components/Swipeable/StyledSwipeable.d.ts +2 -5
  64. package/types/components/Toast/StyledToast.d.ts +3 -5
  65. package/types/components/Toolbar/StyledToolbar.d.ts +3 -5
@@ -896,6 +896,140 @@ exports[`Success renders title and description as ReactElement correctly 1`] = `
896
896
  </View>
897
897
  `;
898
898
 
899
+ exports[`Success renders title is a React Element correctly 1`] = `
900
+ <View
901
+ style={
902
+ {
903
+ "flex": 1,
904
+ }
905
+ }
906
+ >
907
+ <View
908
+ style={
909
+ [
910
+ {
911
+ "backgroundColor": "#f6f6f7",
912
+ "display": "flex",
913
+ "flex": 1,
914
+ "flexDirection": "column",
915
+ },
916
+ undefined,
917
+ ]
918
+ }
919
+ themeVariant="in-page"
920
+ >
921
+ <View
922
+ style={
923
+ [
924
+ {
925
+ "alignItems": "center",
926
+ "display": "flex",
927
+ "flex": 1,
928
+ "flexDirection": "column",
929
+ "justifyContent": "center",
930
+ "padding": 24,
931
+ },
932
+ undefined,
933
+ ]
934
+ }
935
+ >
936
+ <Text
937
+ allowFontScaling={false}
938
+ style={
939
+ [
940
+ {
941
+ "color": "#001f23",
942
+ "fontFamily": "Saiga-Medium",
943
+ "fontSize": 24,
944
+ "letterSpacing": 0.24,
945
+ "lineHeight": 32,
946
+ },
947
+ [
948
+ {
949
+ "color": "#001f23",
950
+ "marginBottom": 8,
951
+ "textAlign": "center",
952
+ },
953
+ undefined,
954
+ ],
955
+ ]
956
+ }
957
+ themeIntent="body"
958
+ themeLevel="h4"
959
+ themeTypeface="playful"
960
+ >
961
+ <Text
962
+ allowFontScaling={false}
963
+ style={
964
+ [
965
+ {
966
+ "color": "#001f23",
967
+ "fontFamily": "BeVietnamPro-Regular",
968
+ "fontSize": 42,
969
+ "letterSpacing": 0,
970
+ "lineHeight": 50,
971
+ },
972
+ undefined,
973
+ ]
974
+ }
975
+ themeIntent="body"
976
+ themeLevel="h1"
977
+ themeTypeface="neutral"
978
+ >
979
+ Two-Factor Authentication
980
+ </Text>
981
+ </Text>
982
+ <Text
983
+ allowFontScaling={false}
984
+ style={
985
+ [
986
+ {
987
+ "color": "#001f23",
988
+ "fontFamily": "BeVietnamPro-Regular",
989
+ "fontSize": 16,
990
+ "letterSpacing": 0.48,
991
+ "lineHeight": 24,
992
+ },
993
+ [
994
+ {
995
+ "color": "#4d6265",
996
+ "textAlign": "center",
997
+ },
998
+ undefined,
999
+ ],
1000
+ ]
1001
+ }
1002
+ themeIntent="body"
1003
+ themeTypeface="neutral"
1004
+ themeVariant="regular"
1005
+ >
1006
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
1007
+ </Text>
1008
+ </View>
1009
+ </View>
1010
+ <View
1011
+ pointerEvents="box-none"
1012
+ position="bottom"
1013
+ style={
1014
+ [
1015
+ {
1016
+ "bottom": 0,
1017
+ "elevation": 9999,
1018
+ "flexDirection": "column-reverse",
1019
+ "left": 0,
1020
+ "paddingHorizontal": 24,
1021
+ "paddingVertical": 16,
1022
+ "position": "absolute",
1023
+ "right": 0,
1024
+ "top": 0,
1025
+ },
1026
+ undefined,
1027
+ ]
1028
+ }
1029
+ />
1030
+ </View>
1031
+ `;
1032
+
899
1033
  exports[`Success renders title only correctly 1`] = `
900
1034
  <View
901
1035
  style={
@@ -20,6 +20,19 @@ describe('Success', () => {
20
20
  expect(getByText(description)).toBeTruthy();
21
21
  });
22
22
 
23
+ it('renders title is a React Element correctly', () => {
24
+ const { toJSON, getByText } = renderWithTheme(
25
+ <Success
26
+ title={<Typography.Title>{title}</Typography.Title>}
27
+ description={description}
28
+ />
29
+ );
30
+
31
+ expect(toJSON()).toMatchSnapshot();
32
+ expect(getByText(title)).toBeTruthy();
33
+ expect(getByText(description)).toBeTruthy();
34
+ });
35
+
23
36
  it('renders title and description as ReactElement correctly', () => {
24
37
  const clickHereSpy = jest.fn();
25
38
  const { toJSON, getByText } = renderWithTheme(
@@ -31,7 +31,7 @@ export interface SuccessProps extends ViewProps {
31
31
  /**
32
32
  * Success's title.
33
33
  */
34
- title: string;
34
+ title: string | ReactElement;
35
35
  /**
36
36
  * Success's description.
37
37
  */
@@ -70,7 +70,6 @@ const ScrollableTab = ({
70
70
  variant={variant}
71
71
  />
72
72
  <PagerView
73
- useNext
74
73
  initialPage={selectedTabIndex}
75
74
  ref={pagerViewRef}
76
75
  onPageScrollStateChanged={onPageScrollStateChanged}
@@ -198,7 +198,6 @@ const Tabs = ({
198
198
  </View>
199
199
  </HeaderTabWrapper>
200
200
  <AnimatedPagerView
201
- useNext
202
201
  initialPage={selectedTabIndex}
203
202
  ref={pagerViewRef}
204
203
  onPageSelected={(e) => {
@@ -28,7 +28,7 @@ exports[`ToolbarItems renders correctly when disabled 1`] = `
28
28
  }
29
29
  accessible={true}
30
30
  collapsable={false}
31
- focusable={true}
31
+ focusable={false}
32
32
  onClick={[Function]}
33
33
  onResponderGrant={[Function]}
34
34
  onResponderMove={[Function]}
@@ -478,7 +478,7 @@ exports[`ToolbarItems renders correctly when intent is primary, icon is ai-outli
478
478
  }
479
479
  accessible={true}
480
480
  collapsable={false}
481
- focusable={true}
481
+ focusable={false}
482
482
  onClick={[Function]}
483
483
  onResponderGrant={[Function]}
484
484
  onResponderMove={[Function]}