@amazon-devices/react-navigation__react-native-tab-view 7.0.1759135970 → 8.0.9000000000-rn-83
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/README.md +2 -646
- package/SystemBundles/adbcd18d13758315355457809fdb5587894f9f3c2c9838769a5a47bf860685c8.bundle +8564 -0
- package/SystemBundles/adbcd18d13758315355457809fdb5587894f9f3c2c9838769a5a47bf860685c8.map +3217 -0
- package/SystemModules/amzn__react-navigation__react-native-tab-view-8.modules.txt +12 -0
- package/SystemModules/amzn__react-navigation__react-native-tab-view-8.private.modules.txt +63 -0
- package/SystemModules/keplerscript-system-bundle-config.json +4 -4
- package/kepler-compatibility.json +2 -2
- package/lib/module/Pager.android.js +3 -1
- package/lib/module/Pager.android.js.map +1 -1
- package/lib/module/Pager.ios.js +3 -1
- package/lib/module/Pager.ios.js.map +1 -1
- package/lib/module/Pager.js +3 -1
- package/lib/module/Pager.js.map +1 -1
- package/lib/module/PagerViewAdapter.js +29 -22
- package/lib/module/PagerViewAdapter.js.map +1 -1
- package/lib/module/PanResponderAdapter.js +46 -32
- package/lib/module/PanResponderAdapter.js.map +1 -1
- package/lib/module/PlatformPressable.js +38 -12
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/SceneMap.js +7 -4
- package/lib/module/SceneMap.js.map +1 -1
- package/lib/module/SceneView.js +16 -14
- package/lib/module/SceneView.js.map +1 -1
- package/lib/module/TabBar.js +232 -156
- package/lib/module/TabBar.js.map +1 -1
- package/lib/module/TabBarIndicator.js +47 -26
- package/lib/module/TabBarIndicator.js.map +1 -1
- package/lib/module/TabBarItem.js +106 -107
- package/lib/module/TabBarItem.js.map +1 -1
- package/lib/module/TabBarItemLabel.js +33 -0
- package/lib/module/TabBarItemLabel.js.map +1 -0
- package/lib/module/TabView.js +91 -63
- package/lib/module/TabView.js.map +1 -1
- package/lib/module/index.js +7 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/useAnimatedValue.js +4 -2
- package/lib/module/useAnimatedValue.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/Pager.android.d.ts +1 -1
- package/lib/typescript/src/Pager.android.d.ts.map +1 -1
- package/lib/typescript/src/Pager.d.ts +1 -1
- package/lib/typescript/src/Pager.d.ts.map +1 -1
- package/lib/typescript/src/Pager.ios.d.ts +1 -1
- package/lib/typescript/src/Pager.ios.d.ts.map +1 -1
- package/lib/typescript/src/PagerViewAdapter.d.ts +4 -1
- package/lib/typescript/src/PagerViewAdapter.d.ts.map +1 -1
- package/lib/typescript/src/PanResponderAdapter.d.ts +4 -1
- package/lib/typescript/src/PanResponderAdapter.d.ts.map +1 -1
- package/lib/typescript/src/PlatformPressable.d.ts +6 -8
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -1
- package/lib/typescript/src/SceneMap.d.ts +2 -2
- package/lib/typescript/src/SceneMap.d.ts.map +1 -1
- package/lib/typescript/src/SceneView.d.ts +2 -2
- package/lib/typescript/src/SceneView.d.ts.map +1 -1
- package/lib/typescript/src/TabBar.d.ts +7 -19
- package/lib/typescript/src/TabBar.d.ts.map +1 -1
- package/lib/typescript/src/TabBarIndicator.d.ts +8 -6
- package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItem.d.ts +4 -22
- package/lib/typescript/src/TabBarItem.d.ts.map +1 -1
- package/lib/typescript/src/TabBarItemLabel.d.ts +11 -0
- package/lib/typescript/src/TabBarItemLabel.d.ts.map +1 -0
- package/lib/typescript/src/TabView.d.ts +14 -8
- package/lib/typescript/src/TabView.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +29 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useAnimatedValue.d.ts +1 -1
- package/lib/typescript/src/useAnimatedValue.d.ts.map +1 -1
- package/oss-attribution/attribution.txt +0 -0
- package/oss-attribution/licenseInfos.json +1 -0
- package/package.json +93 -1
- package/src/Pager.android.tsx +1 -1
- package/src/Pager.ios.tsx +1 -1
- package/src/Pager.tsx +1 -1
- package/src/PagerViewAdapter.tsx +26 -21
- package/src/PanResponderAdapter.tsx +32 -28
- package/src/PlatformPressable.tsx +59 -10
- package/src/SceneMap.tsx +3 -3
- package/src/SceneView.tsx +6 -7
- package/src/TabBar.tsx +282 -193
- package/src/TabBarIndicator.tsx +65 -28
- package/src/TabBarItem.tsx +119 -130
- package/src/TabBarItemLabel.tsx +42 -0
- package/src/TabView.tsx +59 -16
- package/src/index.tsx +11 -6
- package/src/types.tsx +29 -1
- package/src/useAnimatedValue.tsx +2 -2
- package/SystemBundles/0c296a88d0023a3995e190db70259767d1ef39c9da6cd47f3d76cd128687f1f6.bundle +0 -14497
- package/SystemBundles/0c296a88d0023a3995e190db70259767d1ef39c9da6cd47f3d76cd128687f1f6.map +0 -1
- package/SystemModules/amzn__react-navigation__react-native-tab-view-7.modules.txt +0 -41
- package/SystemModules/amzn__react-navigation__react-native-tab-view-7.private.modules.txt +0 -98
- package/THIRD_PARTY_NOTICES.txt +0 -24
- package/lib/commonjs/Pager.android.js +0 -14
- package/lib/commonjs/Pager.android.js.map +0 -1
- package/lib/commonjs/Pager.ios.js +0 -14
- package/lib/commonjs/Pager.ios.js.map +0 -1
- package/lib/commonjs/Pager.js +0 -14
- package/lib/commonjs/Pager.js.map +0 -1
- package/lib/commonjs/PagerViewAdapter.js +0 -132
- package/lib/commonjs/PagerViewAdapter.js.map +0 -1
- package/lib/commonjs/PanResponderAdapter.js +0 -204
- package/lib/commonjs/PanResponderAdapter.js.map +0 -1
- package/lib/commonjs/PlatformPressable.js +0 -43
- package/lib/commonjs/PlatformPressable.js.map +0 -1
- package/lib/commonjs/SceneMap.js +0 -29
- package/lib/commonjs/SceneMap.js.map +0 -1
- package/lib/commonjs/SceneView.js +0 -78
- package/lib/commonjs/SceneView.js.map +0 -1
- package/lib/commonjs/TabBar.js +0 -405
- package/lib/commonjs/TabBar.js.map +0 -1
- package/lib/commonjs/TabBarIndicator.js +0 -110
- package/lib/commonjs/TabBarIndicator.js.map +0 -1
- package/lib/commonjs/TabBarItem.js +0 -227
- package/lib/commonjs/TabBarItem.js.map +0 -1
- package/lib/commonjs/TabView.js +0 -122
- package/lib/commonjs/TabView.js.map +0 -1
- package/lib/commonjs/index.js +0 -42
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/types.js +0 -6
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/useAnimatedValue.js +0 -18
- package/lib/commonjs/useAnimatedValue.js.map +0 -1
package/src/SceneView.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, StyleSheet, View, type ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
5
|
EventEmitterProps,
|
|
@@ -18,7 +18,7 @@ type Props<T extends Route> = SceneRendererProps &
|
|
|
18
18
|
style?: StyleProp<ViewStyle>;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export
|
|
21
|
+
export function SceneView<T extends Route>({
|
|
22
22
|
children,
|
|
23
23
|
navigationState,
|
|
24
24
|
lazy,
|
|
@@ -54,7 +54,7 @@ export default function SceneView<T extends Route>({
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
let unsubscribe: (() => void) | undefined;
|
|
57
|
-
let timer:
|
|
57
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
58
58
|
|
|
59
59
|
if (lazy && isLoading) {
|
|
60
60
|
// If lazy mode is enabled, listen to when we enter screens
|
|
@@ -75,8 +75,7 @@ export default function SceneView<T extends Route>({
|
|
|
75
75
|
|
|
76
76
|
return (
|
|
77
77
|
<View
|
|
78
|
-
|
|
79
|
-
importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'}
|
|
78
|
+
aria-hidden={!focused}
|
|
80
79
|
style={[
|
|
81
80
|
styles.route,
|
|
82
81
|
// If we don't have the layout yet, make the focused screen fill the container
|
|
@@ -84,8 +83,8 @@ export default function SceneView<T extends Route>({
|
|
|
84
83
|
layout.width
|
|
85
84
|
? { width: layout.width }
|
|
86
85
|
: focused
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
? StyleSheet.absoluteFill
|
|
87
|
+
: null,
|
|
89
88
|
style,
|
|
90
89
|
]}
|
|
91
90
|
>
|