@hero-design/rn 8.98.0 → 8.99.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.
Files changed (53) 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 +50 -69
  5. package/lib/index.js +50 -69
  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/Tabs/ScrollableTabs.tsx +0 -1
  27. package/src/components/Tabs/StyledScrollableTabs.tsx +8 -2
  28. package/src/components/Tabs/index.tsx +0 -1
  29. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +2 -2
  30. package/stats/8.98.1/rn-stats.html +4844 -0
  31. package/stats/8.99.0/rn-stats.html +4842 -0
  32. package/testUtils/setup.tsx +0 -1
  33. package/types/components/Accordion/StyledAccordion.d.ts +3 -5
  34. package/types/components/Alert/StyledAlert.d.ts +3 -5
  35. package/types/components/Attachment/StyledAttachment.d.ts +3 -5
  36. package/types/components/Avatar/StyledAvatar.d.ts +3 -5
  37. package/types/components/BottomSheet/StyledBottomSheet.d.ts +3 -5
  38. package/types/components/Button/StyledButton.d.ts +3 -5
  39. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +3 -5
  40. package/types/components/Calendar/StyledCalendar.d.ts +3 -5
  41. package/types/components/Checkbox/StyledCheckbox.d.ts +3 -5
  42. package/types/components/Chip/StyledChip.d.ts +2 -5
  43. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +2 -5
  44. package/types/components/FAB/StyledFAB.d.ts +2 -2
  45. package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +2 -2
  46. package/types/components/List/StyledBasicListItem.d.ts +3 -5
  47. package/types/components/List/StyledListItem.d.ts +3 -5
  48. package/types/components/Radio/Radio.d.ts +6 -1
  49. package/types/components/Radio/types.d.ts +3 -1
  50. package/types/components/RichTextEditor/StyledToolbar.d.ts +3 -5
  51. package/types/components/Swipeable/StyledSwipeable.d.ts +2 -5
  52. package/types/components/Toast/StyledToast.d.ts +3 -5
  53. package/types/components/Toolbar/StyledToolbar.d.ts +3 -5
@@ -28,7 +28,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
28
28
  "flexDirection": "row",
29
29
  "marginBottom": 8,
30
30
  },
31
- {},
31
+ undefined,
32
32
  ]
33
33
  }
34
34
  themePosition="top"
@@ -45,7 +45,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
45
45
  "opacity": 0.9,
46
46
  "width": 16,
47
47
  },
48
- {},
48
+ undefined,
49
49
  ]
50
50
  }
51
51
  themeIntent="primary"
@@ -64,7 +64,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
64
64
  "opacity": 0.675,
65
65
  "width": 16,
66
66
  },
67
- {},
67
+ undefined,
68
68
  ]
69
69
  }
70
70
  themeIntent="primary"
@@ -80,7 +80,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
80
80
  "flexDirection": "row",
81
81
  "marginBottom": 0,
82
82
  },
83
- {},
83
+ undefined,
84
84
  ]
85
85
  }
86
86
  themePosition="bottom"
@@ -97,7 +97,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
97
97
  "opacity": 0.45,
98
98
  "width": 16,
99
99
  },
100
- {},
100
+ undefined,
101
101
  ]
102
102
  }
103
103
  themeIntent="primary"
@@ -116,7 +116,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
116
116
  "opacity": 0.225,
117
117
  "width": 16,
118
118
  },
119
- {},
119
+ undefined,
120
120
  ]
121
121
  }
122
122
  themeIntent="primary"
@@ -40,7 +40,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
40
40
  "flexDirection": "row",
41
41
  "marginBottom": 4,
42
42
  },
43
- {},
43
+ undefined,
44
44
  ]
45
45
  }
46
46
  themePosition="top"
@@ -57,7 +57,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
57
57
  "opacity": 0.9,
58
58
  "width": 8,
59
59
  },
60
- {},
60
+ undefined,
61
61
  ]
62
62
  }
63
63
  themeIntent="primary"
@@ -76,7 +76,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
76
76
  "opacity": 0.675,
77
77
  "width": 8,
78
78
  },
79
- {},
79
+ undefined,
80
80
  ]
81
81
  }
82
82
  themeIntent="primary"
@@ -92,7 +92,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
92
92
  "flexDirection": "row",
93
93
  "marginBottom": 0,
94
94
  },
95
- {},
95
+ undefined,
96
96
  ]
97
97
  }
98
98
  themePosition="bottom"
@@ -109,7 +109,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
109
109
  "opacity": 0.45,
110
110
  "width": 8,
111
111
  },
112
- {},
112
+ undefined,
113
113
  ]
114
114
  }
115
115
  themeIntent="primary"
@@ -128,7 +128,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
128
128
  "opacity": 0.225,
129
129
  "width": 8,
130
130
  },
131
- {},
131
+ undefined,
132
132
  ]
133
133
  }
134
134
  themeIntent="primary"
@@ -201,7 +201,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
201
201
  "flexDirection": "row",
202
202
  "marginBottom": 4,
203
203
  },
204
- {},
204
+ undefined,
205
205
  ]
206
206
  }
207
207
  themePosition="top"
@@ -218,7 +218,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
218
218
  "opacity": 0.9,
219
219
  "width": 8,
220
220
  },
221
- {},
221
+ undefined,
222
222
  ]
223
223
  }
224
224
  themeIntent="inverted"
@@ -237,7 +237,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
237
237
  "opacity": 0.675,
238
238
  "width": 8,
239
239
  },
240
- {},
240
+ undefined,
241
241
  ]
242
242
  }
243
243
  themeIntent="inverted"
@@ -253,7 +253,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
253
253
  "flexDirection": "row",
254
254
  "marginBottom": 0,
255
255
  },
256
- {},
256
+ undefined,
257
257
  ]
258
258
  }
259
259
  themePosition="bottom"
@@ -270,7 +270,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
270
270
  "opacity": 0.45,
271
271
  "width": 8,
272
272
  },
273
- {},
273
+ undefined,
274
274
  ]
275
275
  }
276
276
  themeIntent="inverted"
@@ -289,7 +289,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
289
289
  "opacity": 0.225,
290
290
  "width": 8,
291
291
  },
292
- {},
292
+ undefined,
293
293
  ]
294
294
  }
295
295
  themeIntent="inverted"
@@ -362,7 +362,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
362
362
  "flexDirection": "row",
363
363
  "marginBottom": 8,
364
364
  },
365
- {},
365
+ undefined,
366
366
  ]
367
367
  }
368
368
  themePosition="top"
@@ -379,7 +379,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
379
379
  "opacity": 0.9,
380
380
  "width": 16,
381
381
  },
382
- {},
382
+ undefined,
383
383
  ]
384
384
  }
385
385
  themeIntent="primary"
@@ -398,7 +398,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
398
398
  "opacity": 0.675,
399
399
  "width": 16,
400
400
  },
401
- {},
401
+ undefined,
402
402
  ]
403
403
  }
404
404
  themeIntent="primary"
@@ -414,7 +414,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
414
414
  "flexDirection": "row",
415
415
  "marginBottom": 0,
416
416
  },
417
- {},
417
+ undefined,
418
418
  ]
419
419
  }
420
420
  themePosition="bottom"
@@ -431,7 +431,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
431
431
  "opacity": 0.45,
432
432
  "width": 16,
433
433
  },
434
- {},
434
+ undefined,
435
435
  ]
436
436
  }
437
437
  themeIntent="primary"
@@ -450,7 +450,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
450
450
  "opacity": 0.225,
451
451
  "width": 16,
452
452
  },
453
- {},
453
+ undefined,
454
454
  ]
455
455
  }
456
456
  themeIntent="primary"
@@ -523,7 +523,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
523
523
  "flexDirection": "row",
524
524
  "marginBottom": 8,
525
525
  },
526
- {},
526
+ undefined,
527
527
  ]
528
528
  }
529
529
  themePosition="top"
@@ -540,7 +540,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
540
540
  "opacity": 0.9,
541
541
  "width": 16,
542
542
  },
543
- {},
543
+ undefined,
544
544
  ]
545
545
  }
546
546
  themeIntent="inverted"
@@ -559,7 +559,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
559
559
  "opacity": 0.675,
560
560
  "width": 16,
561
561
  },
562
- {},
562
+ undefined,
563
563
  ]
564
564
  }
565
565
  themeIntent="inverted"
@@ -575,7 +575,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
575
575
  "flexDirection": "row",
576
576
  "marginBottom": 0,
577
577
  },
578
- {},
578
+ undefined,
579
579
  ]
580
580
  }
581
581
  themePosition="bottom"
@@ -592,7 +592,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
592
592
  "opacity": 0.45,
593
593
  "width": 16,
594
594
  },
595
- {},
595
+ undefined,
596
596
  ]
597
597
  }
598
598
  themeIntent="inverted"
@@ -611,7 +611,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
611
611
  "opacity": 0.225,
612
612
  "width": 16,
613
613
  },
614
- {},
614
+ undefined,
615
615
  ]
616
616
  }
617
617
  themeIntent="inverted"
@@ -49,7 +49,7 @@ exports[`Spinner renders correctly 1`] = `
49
49
  "flexDirection": "row",
50
50
  "marginBottom": 8,
51
51
  },
52
- {},
52
+ undefined,
53
53
  ]
54
54
  }
55
55
  themePosition="top"
@@ -66,7 +66,7 @@ exports[`Spinner renders correctly 1`] = `
66
66
  "opacity": 0.9,
67
67
  "width": 16,
68
68
  },
69
- {},
69
+ undefined,
70
70
  ]
71
71
  }
72
72
  themeIntent="primary"
@@ -85,7 +85,7 @@ exports[`Spinner renders correctly 1`] = `
85
85
  "opacity": 0.675,
86
86
  "width": 16,
87
87
  },
88
- {},
88
+ undefined,
89
89
  ]
90
90
  }
91
91
  themeIntent="primary"
@@ -101,7 +101,7 @@ exports[`Spinner renders correctly 1`] = `
101
101
  "flexDirection": "row",
102
102
  "marginBottom": 0,
103
103
  },
104
- {},
104
+ undefined,
105
105
  ]
106
106
  }
107
107
  themePosition="bottom"
@@ -118,7 +118,7 @@ exports[`Spinner renders correctly 1`] = `
118
118
  "opacity": 0.45,
119
119
  "width": 16,
120
120
  },
121
- {},
121
+ undefined,
122
122
  ]
123
123
  }
124
124
  themeIntent="primary"
@@ -137,7 +137,7 @@ exports[`Spinner renders correctly 1`] = `
137
137
  "opacity": 0.225,
138
138
  "width": 16,
139
139
  },
140
- {},
140
+ undefined,
141
141
  ]
142
142
  }
143
143
  themeIntent="primary"
@@ -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}
@@ -1,6 +1,10 @@
1
- import { Animated, StyleSheet, View } from 'react-native';
1
+ import { Animated, Platform, StyleSheet, View } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
 
4
+ const isAndroid8 =
5
+ Platform.OS === 'android' &&
6
+ (Platform.Version === 26 || Platform.Version === 27);
7
+
4
8
  const TabScreen = styled(View)({
5
9
  flex: 1,
6
10
  });
@@ -43,7 +47,9 @@ const HeaderTabItemWrapper = styled(View)(({ theme }) => ({
43
47
  paddingVertical: theme.__hd__.tabs.space.outlineVerticalPadding,
44
48
  position: 'relative',
45
49
  justifyContent: 'center',
46
- alignItems: 'center',
50
+ ...(!isAndroid8 && {
51
+ alignItems: 'center',
52
+ }),
47
53
  }));
48
54
 
49
55
  const HeaderTabItemIndicator = styled(Animated.View)(({ theme }) => ({
@@ -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]}