@react-navigation/bottom-tabs 7.9.0 → 8.0.0-alpha.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 (139) hide show
  1. package/lib/module/index.js +3 -2
  2. package/lib/module/index.js.map +1 -1
  3. package/lib/module/navigators/createBottomTabNavigator.js +27 -9
  4. package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
  5. package/lib/module/utils/BottomTabAnimationContext.js +5 -0
  6. package/lib/module/utils/BottomTabAnimationContext.js.map +1 -0
  7. package/lib/module/utils/useBottomTabAnimation.js +12 -0
  8. package/lib/module/utils/useBottomTabAnimation.js.map +1 -0
  9. package/lib/module/utils/useTabBarPosition.js +34 -0
  10. package/lib/module/utils/useTabBarPosition.js.map +1 -0
  11. package/lib/module/views/BottomTabBar.js +46 -49
  12. package/lib/module/views/BottomTabBar.js.map +1 -1
  13. package/lib/module/views/BottomTabItem.js +17 -15
  14. package/lib/module/views/BottomTabItem.js.map +1 -1
  15. package/lib/module/views/BottomTabViewCommon.js +16 -0
  16. package/lib/module/views/BottomTabViewCommon.js.map +1 -0
  17. package/lib/module/views/{BottomTabView.js → BottomTabViewCustom.js} +107 -106
  18. package/lib/module/views/BottomTabViewCustom.js.map +1 -0
  19. package/lib/module/views/BottomTabViewNative.android.js +4 -0
  20. package/lib/module/views/BottomTabViewNative.android.js.map +1 -0
  21. package/lib/module/views/BottomTabViewNative.ios.js +4 -0
  22. package/lib/module/views/BottomTabViewNative.ios.js.map +1 -0
  23. package/lib/module/views/BottomTabViewNative.js +5 -0
  24. package/lib/module/views/BottomTabViewNative.js.map +1 -0
  25. package/lib/module/{unstable/NativeBottomTabView.native.js → views/BottomTabViewNativeImpl.js} +95 -77
  26. package/lib/module/views/BottomTabViewNativeImpl.js.map +1 -0
  27. package/lib/module/views/ScreenContent.js +39 -0
  28. package/lib/module/views/ScreenContent.js.map +1 -0
  29. package/lib/module/views/TabBarIcon.js +40 -4
  30. package/lib/module/views/TabBarIcon.js.map +1 -1
  31. package/lib/typescript/src/index.d.ts +4 -3
  32. package/lib/typescript/src/index.d.ts.map +1 -1
  33. package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts +10 -6
  34. package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map +1 -1
  35. package/lib/typescript/src/types.d.ts +383 -115
  36. package/lib/typescript/src/types.d.ts.map +1 -1
  37. package/lib/typescript/src/utils/BottomTabAnimationContext.d.ts +4 -0
  38. package/lib/typescript/src/utils/BottomTabAnimationContext.d.ts.map +1 -0
  39. package/lib/typescript/src/utils/useBottomTabAnimation.d.ts +2 -0
  40. package/lib/typescript/src/utils/useBottomTabAnimation.d.ts.map +1 -0
  41. package/lib/typescript/src/utils/useTabBarPosition.d.ts +3 -0
  42. package/lib/typescript/src/utils/useTabBarPosition.d.ts.map +1 -0
  43. package/lib/typescript/src/views/BottomTabBar.d.ts +4 -4
  44. package/lib/typescript/src/views/BottomTabBar.d.ts.map +1 -1
  45. package/lib/typescript/src/views/BottomTabItem.d.ts +16 -14
  46. package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -1
  47. package/lib/typescript/src/views/{BottomTabView.d.ts → BottomTabViewCommon.d.ts} +2 -2
  48. package/lib/typescript/src/views/BottomTabViewCommon.d.ts.map +1 -0
  49. package/lib/typescript/src/views/BottomTabViewCustom.d.ts +10 -0
  50. package/lib/typescript/src/views/BottomTabViewCustom.d.ts.map +1 -0
  51. package/lib/typescript/src/views/BottomTabViewNative.android.d.ts +2 -0
  52. package/lib/typescript/src/views/BottomTabViewNative.android.d.ts.map +1 -0
  53. package/lib/typescript/src/views/BottomTabViewNative.d.ts +3 -0
  54. package/lib/typescript/src/views/BottomTabViewNative.d.ts.map +1 -0
  55. package/lib/typescript/src/views/BottomTabViewNative.ios.d.ts +2 -0
  56. package/lib/typescript/src/views/BottomTabViewNative.ios.d.ts.map +1 -0
  57. package/lib/typescript/src/views/BottomTabViewNativeImpl.d.ts +10 -0
  58. package/lib/typescript/src/views/BottomTabViewNativeImpl.d.ts.map +1 -0
  59. package/lib/typescript/src/views/ScreenContent.d.ts +13 -0
  60. package/lib/typescript/src/views/ScreenContent.d.ts.map +1 -0
  61. package/lib/typescript/src/views/TabBarIcon.d.ts +9 -9
  62. package/lib/typescript/src/views/TabBarIcon.d.ts.map +1 -1
  63. package/package.json +11 -16
  64. package/src/index.tsx +7 -2
  65. package/src/navigators/createBottomTabNavigator.tsx +78 -27
  66. package/src/types.tsx +417 -122
  67. package/src/utils/BottomTabAnimationContext.tsx +7 -0
  68. package/src/utils/useBottomTabAnimation.tsx +15 -0
  69. package/src/utils/useTabBarPosition.tsx +41 -0
  70. package/src/views/BottomTabBar.tsx +68 -67
  71. package/src/views/BottomTabItem.tsx +39 -34
  72. package/src/views/BottomTabViewCommon.tsx +26 -0
  73. package/src/views/{BottomTabView.tsx → BottomTabViewCustom.tsx} +142 -129
  74. package/src/views/BottomTabViewNative.android.tsx +1 -0
  75. package/src/views/BottomTabViewNative.ios.tsx +1 -0
  76. package/src/views/BottomTabViewNative.tsx +3 -0
  77. package/src/{unstable/NativeBottomTabView.native.tsx → views/BottomTabViewNativeImpl.tsx} +139 -116
  78. package/src/views/ScreenContent.tsx +58 -0
  79. package/src/views/TabBarIcon.tsx +63 -10
  80. package/lib/module/unstable/NativeBottomTabView.js +0 -6
  81. package/lib/module/unstable/NativeBottomTabView.js.map +0 -1
  82. package/lib/module/unstable/NativeBottomTabView.native.js.map +0 -1
  83. package/lib/module/unstable/NativeScreen/NativeScreen.js +0 -152
  84. package/lib/module/unstable/NativeScreen/NativeScreen.js.map +0 -1
  85. package/lib/module/unstable/NativeScreen/debounce.js +0 -12
  86. package/lib/module/unstable/NativeScreen/debounce.js.map +0 -1
  87. package/lib/module/unstable/NativeScreen/types.js +0 -4
  88. package/lib/module/unstable/NativeScreen/types.js.map +0 -1
  89. package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js +0 -12
  90. package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js.map +0 -1
  91. package/lib/module/unstable/NativeScreen/useHeaderConfig.js +0 -304
  92. package/lib/module/unstable/NativeScreen/useHeaderConfig.js.map +0 -1
  93. package/lib/module/unstable/createNativeBottomTabNavigator.js +0 -6
  94. package/lib/module/unstable/createNativeBottomTabNavigator.js.map +0 -1
  95. package/lib/module/unstable/createNativeBottomTabNavigator.native.js +0 -65
  96. package/lib/module/unstable/createNativeBottomTabNavigator.native.js.map +0 -1
  97. package/lib/module/unstable/index.js +0 -16
  98. package/lib/module/unstable/index.js.map +0 -1
  99. package/lib/module/unstable/types.js +0 -4
  100. package/lib/module/unstable/types.js.map +0 -1
  101. package/lib/module/views/BottomTabView.js.map +0 -1
  102. package/lib/module/views/ScreenFallback.js +0 -42
  103. package/lib/module/views/ScreenFallback.js.map +0 -1
  104. package/lib/typescript/src/unstable/NativeBottomTabView.d.ts +0 -10
  105. package/lib/typescript/src/unstable/NativeBottomTabView.d.ts.map +0 -1
  106. package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts +0 -10
  107. package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts.map +0 -1
  108. package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts +0 -8
  109. package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts.map +0 -1
  110. package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts +0 -2
  111. package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts.map +0 -1
  112. package/lib/typescript/src/unstable/NativeScreen/types.d.ts +0 -523
  113. package/lib/typescript/src/unstable/NativeScreen/types.d.ts.map +0 -1
  114. package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts +0 -5
  115. package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts.map +0 -1
  116. package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts +0 -11
  117. package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts.map +0 -1
  118. package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts +0 -2
  119. package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts.map +0 -1
  120. package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts +0 -16
  121. package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts.map +0 -1
  122. package/lib/typescript/src/unstable/index.d.ts +0 -13
  123. package/lib/typescript/src/unstable/index.d.ts.map +0 -1
  124. package/lib/typescript/src/unstable/types.d.ts +0 -319
  125. package/lib/typescript/src/unstable/types.d.ts.map +0 -1
  126. package/lib/typescript/src/views/BottomTabView.d.ts.map +0 -1
  127. package/lib/typescript/src/views/ScreenFallback.d.ts +0 -18
  128. package/lib/typescript/src/views/ScreenFallback.d.ts.map +0 -1
  129. package/src/unstable/NativeBottomTabView.tsx +0 -20
  130. package/src/unstable/NativeScreen/NativeScreen.tsx +0 -212
  131. package/src/unstable/NativeScreen/debounce.tsx +0 -14
  132. package/src/unstable/NativeScreen/types.ts +0 -573
  133. package/src/unstable/NativeScreen/useAnimatedHeaderHeight.tsx +0 -18
  134. package/src/unstable/NativeScreen/useHeaderConfig.tsx +0 -434
  135. package/src/unstable/createNativeBottomTabNavigator.native.tsx +0 -116
  136. package/src/unstable/createNativeBottomTabNavigator.tsx +0 -4
  137. package/src/unstable/index.tsx +0 -23
  138. package/src/unstable/types.tsx +0 -405
  139. package/src/views/ScreenFallback.tsx +0 -50
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
 
3
- import { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
3
+ import { Container, Lazy, SafeAreaProviderCompat } from '@react-navigation/elements/internal';
4
4
  import { StackActions } from '@react-navigation/native';
5
5
  import * as React from 'react';
6
6
  import { Animated, Platform, StyleSheet } from 'react-native';
7
- import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
7
+ import { Screen, ScreenContainer } from 'react-native-screens';
8
8
  import { FadeTransition, ShiftTransition } from "../TransitionConfigs/TransitionPresets.js";
9
+ import { BottomTabAnimationContext } from "../utils/BottomTabAnimationContext.js";
9
10
  import { BottomTabBarHeightCallbackContext } from "../utils/BottomTabBarHeightCallbackContext.js";
10
11
  import { BottomTabBarHeightContext } from "../utils/BottomTabBarHeightContext.js";
11
12
  import { useAnimatedHashMap } from "../utils/useAnimatedHashMap.js";
13
+ import { useTabBarPosition } from "../utils/useTabBarPosition.js";
12
14
  import { BottomTabBar, getTabBarHeight } from "./BottomTabBar.js";
13
- import { MaybeScreen, MaybeScreenContainer } from "./ScreenFallback.js";
15
+ import { ScreenContent } from "./ScreenContent.js";
14
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
17
  const EPSILON = 1e-5;
16
18
  const STATE_INACTIVE = 0;
@@ -43,25 +45,17 @@ const hasAnimation = options => {
43
45
  const renderTabBarDefault = props => /*#__PURE__*/_jsx(BottomTabBar, {
44
46
  ...props
45
47
  });
46
- export function BottomTabView(props) {
48
+ export function BottomTabViewCustom({
49
+ tabBar = renderTabBarDefault,
50
+ state,
51
+ navigation,
52
+ descriptors,
53
+ detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios'
54
+ }) {
47
55
  const {
48
- tabBar = renderTabBarDefault,
49
- state,
50
- navigation,
51
- descriptors,
52
- safeAreaInsets,
53
- detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios'
54
- } = props;
55
- const focusedRouteKey = state.routes[state.index].key;
56
-
57
- /**
58
- * List of loaded tabs, tabs will be loaded when navigated to.
59
- */
60
- const [loaded, setLoaded] = React.useState([focusedRouteKey]);
61
- if (!loaded.includes(focusedRouteKey)) {
62
- // Set the current tab to be loaded if it was not loaded before
63
- setLoaded([...loaded, focusedRouteKey]);
64
- }
56
+ routes
57
+ } = state;
58
+ const focusedRouteKey = routes[state.index].key;
65
59
  const previousRouteKeyRef = React.useRef(focusedRouteKey);
66
60
  const tabAnims = useAnimatedHashMap(state);
67
61
  React.useEffect(() => {
@@ -121,89 +115,85 @@ export function BottomTabView(props) {
121
115
  animateToIndex();
122
116
  previousRouteKeyRef.current = focusedRouteKey;
123
117
  }, [descriptors, focusedRouteKey, navigation, state.index, state.routes, tabAnims]);
124
- const dimensions = SafeAreaProviderCompat.initialMetrics.frame;
125
118
  const [tabBarHeight, setTabBarHeight] = React.useState(() => getTabBarHeight({
126
119
  state,
127
120
  descriptors,
128
- dimensions,
129
- insets: {
130
- ...SafeAreaProviderCompat.initialMetrics.insets,
131
- ...props.safeAreaInsets
132
- },
133
- style: descriptors[state.routes[state.index].key].options.tabBarStyle
121
+ dimensions: SafeAreaProviderCompat.initialMetrics.frame,
122
+ insets: SafeAreaProviderCompat.initialMetrics.insets,
123
+ style: descriptors[focusedRouteKey].options.tabBarStyle
134
124
  }));
135
- const renderTabBar = () => {
136
- return /*#__PURE__*/_jsx(SafeAreaInsetsContext.Consumer, {
137
- children: insets => tabBar({
138
- state: state,
139
- descriptors: descriptors,
140
- navigation: navigation,
141
- insets: {
142
- top: safeAreaInsets?.top ?? insets?.top ?? 0,
143
- right: safeAreaInsets?.right ?? insets?.right ?? 0,
144
- bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,
145
- left: safeAreaInsets?.left ?? insets?.left ?? 0
146
- }
147
- })
148
- });
149
- };
150
- const {
151
- routes
152
- } = state;
153
-
154
- // If there is no animation, we only have 2 states: visible and invisible
155
- const hasTwoStates = !routes.some(route => hasAnimation(descriptors[route.key].options));
156
- const {
157
- tabBarPosition = 'bottom'
158
- } = descriptors[focusedRouteKey].options;
159
125
  const tabBarElement = /*#__PURE__*/_jsx(BottomTabBarHeightCallbackContext.Provider, {
160
126
  value: setTabBarHeight,
161
- children: renderTabBar()
127
+ children: tabBar({
128
+ state: state,
129
+ descriptors: descriptors,
130
+ navigation: navigation
131
+ })
162
132
  }, "tabbar");
133
+
134
+ // If there is no animation, we only have 2 states: visible and invisible
135
+ const hasTwoStates = !routes.some(route => hasAnimation(descriptors[route.key].options));
136
+ const tabBarPosition = useTabBarPosition(descriptors[focusedRouteKey].options);
163
137
  return /*#__PURE__*/_jsxs(SafeAreaProviderCompat, {
164
138
  style: {
165
139
  flexDirection: tabBarPosition === 'left' || tabBarPosition === 'right' ? 'row' : 'column'
166
140
  },
167
- children: [tabBarPosition === 'top' || tabBarPosition === 'left' ? tabBarElement : null, /*#__PURE__*/_jsx(MaybeScreenContainer, {
141
+ children: [tabBarPosition === 'top' || tabBarPosition === 'left' ? tabBarElement : null, /*#__PURE__*/_jsx(ScreenContainer, {
168
142
  enabled: detachInactiveScreens,
169
143
  hasTwoStates: hasTwoStates,
170
144
  style: styles.screens,
171
145
  children: routes.map((route, index) => {
172
146
  const descriptor = descriptors[route.key];
147
+ const {
148
+ navigation,
149
+ options,
150
+ render
151
+ } = descriptor;
173
152
  const {
174
153
  lazy = true,
175
154
  animation = 'none',
176
- sceneStyleInterpolator = NAMED_TRANSITIONS_PRESETS[animation].sceneStyleInterpolator
177
- } = descriptor.options;
155
+ sceneStyleInterpolator = NAMED_TRANSITIONS_PRESETS[animation].sceneStyleInterpolator,
156
+ sceneStyle: customSceneStyle
157
+ } = options;
178
158
  const isFocused = state.index === index;
179
159
  const isPreloaded = state.preloadedRouteKeys.includes(route.key);
180
- if (lazy && !loaded.includes(route.key) && !isFocused && !isPreloaded) {
181
- // Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
182
- return null;
183
- }
184
- const {
185
- freezeOnBlur,
186
- header = ({
187
- layout,
188
- options
189
- }) => /*#__PURE__*/_jsx(Header, {
190
- ...options,
191
- layout: layout,
192
- title: getHeaderTitle(options, route.name)
193
- }),
194
- headerShown,
195
- headerStatusBarHeight,
196
- headerTransparent,
197
- sceneStyle: customSceneStyle
198
- } = descriptor.options;
199
- const {
200
- sceneStyle
201
- } = sceneStyleInterpolator?.({
202
- current: {
203
- progress: tabAnims[route.key]
204
- }
205
- }) ?? {};
206
160
  const animationEnabled = hasAnimation(descriptor.options);
161
+ const content = /*#__PURE__*/_jsx(AnimatedScreenContent, {
162
+ progress: tabAnims[route.key],
163
+ animationEnabled: animationEnabled,
164
+ sceneStyleInterpolator: sceneStyleInterpolator,
165
+ style: customSceneStyle,
166
+ children: /*#__PURE__*/_jsx(Lazy, {
167
+ enabled: lazy,
168
+ visible: isFocused || isPreloaded,
169
+ children: /*#__PURE__*/_jsx(ScreenContent, {
170
+ isFocused: isFocused,
171
+ route: route,
172
+ navigation: navigation,
173
+ options: options,
174
+ children: /*#__PURE__*/_jsx(BottomTabBarHeightContext.Provider, {
175
+ value: tabBarPosition === 'bottom' ? tabBarHeight : 0,
176
+ children: render()
177
+ })
178
+ })
179
+ })
180
+ });
181
+ if (Platform.OS === 'web') {
182
+ /**
183
+ * Don't use react-native-screens on web:
184
+ * - It applies display: none as fallback, which triggers `onLayout` events
185
+ * - We still need to hide the view when screens is not enabled
186
+ * - We can use `inert` to handle a11y better for unfocused screens
187
+ */
188
+ return /*#__PURE__*/_jsx(Container, {
189
+ inert: !isFocused,
190
+ style: {
191
+ ...StyleSheet.absoluteFillObject,
192
+ visibility: isFocused ? 'visible' : 'hidden'
193
+ },
194
+ children: content
195
+ }, route.key);
196
+ }
207
197
  const activityState = isFocused ? STATE_ON_TOP // the screen is on top after the transition
208
198
  : animationEnabled // is animation is not enabled, immediately move to inactive state
209
199
  ? tabAnims[route.key].interpolate({
@@ -214,42 +204,53 @@ export function BottomTabView(props) {
214
204
  ],
215
205
  extrapolate: 'extend'
216
206
  }) : STATE_INACTIVE;
217
- return /*#__PURE__*/_jsx(MaybeScreen, {
207
+ return /*#__PURE__*/_jsx(Screen, {
218
208
  style: [StyleSheet.absoluteFill, {
219
- zIndex: isFocused ? 0 : -1
209
+ zIndex: isFocused ? 0 : -1,
210
+ pointerEvents: isFocused ? 'auto' : 'none'
220
211
  }],
221
- active: activityState,
212
+ activityState: activityState,
222
213
  enabled: detachInactiveScreens,
223
- freezeOnBlur: freezeOnBlur,
224
214
  shouldFreeze: activityState === STATE_INACTIVE && !isPreloaded,
225
- children: /*#__PURE__*/_jsx(BottomTabBarHeightContext.Provider, {
226
- value: tabBarPosition === 'bottom' ? tabBarHeight : 0,
227
- children: /*#__PURE__*/_jsx(Screen, {
228
- focused: isFocused,
229
- route: descriptor.route,
230
- navigation: descriptor.navigation,
231
- headerShown: headerShown,
232
- headerStatusBarHeight: headerStatusBarHeight,
233
- headerTransparent: headerTransparent,
234
- header: header({
235
- layout: dimensions,
236
- route: descriptor.route,
237
- navigation: descriptor.navigation,
238
- options: descriptor.options
239
- }),
240
- style: [customSceneStyle, animationEnabled && sceneStyle],
241
- children: descriptor.render()
242
- })
243
- })
215
+ children: content
244
216
  }, route.key);
245
217
  })
246
218
  }, "screens"), tabBarPosition === 'bottom' || tabBarPosition === 'right' ? tabBarElement : null]
247
219
  });
248
220
  }
221
+ function AnimatedScreenContent({
222
+ progress,
223
+ animationEnabled,
224
+ sceneStyleInterpolator,
225
+ children,
226
+ style
227
+ }) {
228
+ const interpolationProps = React.useMemo(() => {
229
+ return {
230
+ current: {
231
+ progress
232
+ }
233
+ };
234
+ }, [progress]);
235
+ const {
236
+ sceneStyle
237
+ } = sceneStyleInterpolator?.(interpolationProps) ?? {};
238
+ return /*#__PURE__*/_jsx(Animated.View, {
239
+ style: [styles.scene, style, animationEnabled && sceneStyle],
240
+ children: /*#__PURE__*/_jsx(BottomTabAnimationContext.Provider, {
241
+ value: interpolationProps,
242
+ children: children
243
+ })
244
+ });
245
+ }
249
246
  const styles = StyleSheet.create({
250
247
  screens: {
251
248
  flex: 1,
252
249
  overflow: 'hidden'
250
+ },
251
+ scene: {
252
+ flex: 1,
253
+ pointerEvents: 'box-none'
253
254
  }
254
255
  });
255
- //# sourceMappingURL=BottomTabView.js.map
256
+ //# sourceMappingURL=BottomTabViewCustom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Container","Lazy","SafeAreaProviderCompat","StackActions","React","Animated","Platform","StyleSheet","Screen","ScreenContainer","FadeTransition","ShiftTransition","BottomTabAnimationContext","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","useAnimatedHashMap","useTabBarPosition","BottomTabBar","getTabBarHeight","ScreenContent","jsx","_jsx","jsxs","_jsxs","EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","NAMED_TRANSITIONS_PRESETS","fade","shift","none","sceneStyleInterpolator","undefined","transitionSpec","animation","config","duration","useNativeDriver","OS","hasAnimation","options","Boolean","renderTabBarDefault","props","BottomTabViewCustom","tabBar","state","navigation","descriptors","detachInactiveScreens","routes","focusedRouteKey","index","key","previousRouteKeyRef","useRef","tabAnims","useEffect","previousRouteKey","current","popToTopAction","popToTopOnBlur","prevRoute","find","route","type","popToTop","target","animateToIndex","emit","parallel","map","spec","toValue","filter","start","finished","dispatch","tabBarHeight","setTabBarHeight","useState","dimensions","initialMetrics","frame","insets","style","tabBarStyle","tabBarElement","Provider","value","children","hasTwoStates","some","tabBarPosition","flexDirection","enabled","styles","screens","descriptor","render","lazy","sceneStyle","customSceneStyle","isFocused","isPreloaded","preloadedRouteKeys","includes","animationEnabled","content","AnimatedScreenContent","progress","visible","inert","absoluteFillObject","visibility","activityState","interpolate","inputRange","outputRange","extrapolate","absoluteFill","zIndex","pointerEvents","shouldFreeze","interpolationProps","useMemo","View","scene","create","flex","overflow"],"sourceRoot":"../../../src","sources":["views/BottomTabViewCustom.tsx"],"mappings":";;AAAA,SACEA,SAAS,EACTC,IAAI,EACJC,sBAAsB,QACjB,qCAAqC;AAC5C,SAGEC,YAAY,QAEP,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EAERC,UAAU,QAEL,cAAc;AACrB,SAASC,MAAM,EAAEC,eAAe,QAAQ,sBAAsB;AAE9D,SACEC,cAAc,EACdC,eAAe,QACV,2CAAwC;AAS/C,SAASC,yBAAyB,QAAQ,uCAAoC;AAC9E,SAASC,iCAAiC,QAAQ,+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;EAAA,CACc,CAAC;AAE7B;AAEA,SAASsB,qBAAqBA,CAAC;EAC7BC,QAAQ;EACRH,gBAAgB;EAChB5E,sBAAsB;EACtB2D,QAAQ;EACRL;AAOF,CAAC,EAAE;EACD,MAAMuC,kBAAkB,GAAGzH,KAAK,CAAC0H,OAAO,CAAC,MAAM;IAC7C,OAAO;MACLlE,OAAO,EAAE;QAAEmD;MAAS;IACtB,CAAC;EACH,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,MAAM;IAAET;EAAW,CAAC,GAAGtE,sBAAsB,GAAG6F,kBAAkB,CAAC,IAAI,CAAC,CAAC;EAEzE,oBACExG,IAAA,CAAChB,QAAQ,CAAC0H,IAAI;IACZzC,KAAK,EAAE,CAACW,MAAM,CAAC+B,KAAK,EAAE1C,KAAK,EAAEsB,gBAAgB,IAAIN,UAAU,CAAE;IAAAX,QAAA,eAE7DtE,IAAA,CAACT,yBAAyB,CAAC6E,QAAQ;MAACC,KAAK,EAAEmC,kBAAmB;MAAAlC,QAAA,EAC3DA;IAAQ,CACyB;EAAC,CACxB,CAAC;AAEpB;AAEA,MAAMM,MAAM,GAAG1F,UAAU,CAAC0H,MAAM,CAAC;EAC/B/B,OAAO,EAAE;IACPgC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDH,KAAK,EAAE;IACLE,IAAI,EAAE,CAAC;IACPP,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export * from "./BottomTabViewNativeImpl.js";
4
+ //# sourceMappingURL=BottomTabViewNative.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["views/BottomTabViewNative.android.tsx"],"mappings":";;AAAA,cAAc,8BAA2B","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export * from "./BottomTabViewNativeImpl.js";
4
+ //# sourceMappingURL=BottomTabViewNative.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["views/BottomTabViewNative.ios.tsx"],"mappings":";;AAAA,cAAc,8BAA2B","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { BottomTabViewCustom } from "./BottomTabViewCustom.js";
4
+ export { BottomTabViewCustom as BottomTabViewNative };
5
+ //# sourceMappingURL=BottomTabViewNative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BottomTabViewCustom","BottomTabViewNative"],"sourceRoot":"../../../src","sources":["views/BottomTabViewNative.tsx"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,0BAAuB;AAE3D,SAASA,mBAAmB,IAAIC,mBAAmB","ignoreList":[]}
@@ -1,17 +1,25 @@
1
1
  "use strict";
2
2
 
3
- import { getLabel, Lazy, SafeAreaProviderCompat, Screen as ScreenContent } from '@react-navigation/elements';
3
+ import { getLabel } from '@react-navigation/elements';
4
+ import { Color, Lazy, SafeAreaProviderCompat } from '@react-navigation/elements/internal';
4
5
  import { CommonActions, StackActions, useTheme } from '@react-navigation/native';
5
- import Color from 'color';
6
6
  import * as React from 'react';
7
- import { Platform, PlatformColor } from 'react-native';
7
+ import { Animated, Platform, PlatformColor } from 'react-native';
8
8
  import { BottomTabs, BottomTabsScreen } from 'react-native-screens';
9
- import { NativeScreen } from "./NativeScreen/NativeScreen.js";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- export function NativeBottomTabView({
9
+ import { BottomTabAnimationContext } from "../utils/BottomTabAnimationContext.js";
10
+ import { BottomTabBarHeightContext } from "../utils/BottomTabBarHeightContext.js";
11
+ import { useTabBarPosition } from "../utils/useTabBarPosition.js";
12
+ import { ScreenContent } from "./ScreenContent.js";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ const ICON_SIZE = Platform.select({
15
+ ios: 25,
16
+ default: 24
17
+ });
18
+ export function BottomTabViewNative({
12
19
  state,
13
20
  navigation,
14
- descriptors
21
+ descriptors,
22
+ tabBar
15
23
  }) {
16
24
  const {
17
25
  dark,
@@ -52,34 +60,37 @@ export function NativeBottomTabView({
52
60
  ios: PlatformColor('label'),
53
61
  default: colors.text
54
62
  });
55
- const activeIndicatorColor = currentOptions?.tabBarActiveIndicatorColor ?? typeof activeTintColor === 'string' ? Color(activeTintColor)?.alpha(0.1).string() : undefined;
63
+ const activeIndicatorColor = currentOptions?.tabBarActiveIndicatorColor ?? Color(activeTintColor)?.alpha(0.1).string();
56
64
  const onTransitionStart = ({
57
- closing,
58
65
  route
59
66
  }) => {
60
67
  navigation.emit({
61
68
  type: 'transitionStart',
62
- data: {
63
- closing
64
- },
65
69
  target: route.key
66
70
  });
67
71
  };
68
72
  const onTransitionEnd = ({
69
- closing,
70
73
  route
71
74
  }) => {
72
75
  navigation.emit({
73
76
  type: 'transitionEnd',
74
- data: {
75
- closing
76
- },
77
77
  target: route.key
78
78
  });
79
79
  };
80
+ const tabBarPosition = useTabBarPosition(currentOptions);
81
+ const hasCustomTabBar = tabBar != null;
82
+ const tabBarElement = tabBar ? tabBar({
83
+ state,
84
+ descriptors,
85
+ navigation
86
+ }) : null;
80
87
  const bottomAccessory = currentOptions.bottomAccessory;
81
- return /*#__PURE__*/_jsx(SafeAreaProviderCompat, {
82
- children: /*#__PURE__*/_jsx(BottomTabs, {
88
+ return /*#__PURE__*/_jsxs(SafeAreaProviderCompat, {
89
+ style: {
90
+ flexDirection: tabBarPosition === 'left' || tabBarPosition === 'right' ? 'row' : 'column'
91
+ },
92
+ children: [tabBarPosition === 'top' || tabBarPosition === 'left' ? tabBarElement : null, /*#__PURE__*/_jsx(BottomTabs, {
93
+ tabBarHidden: hasCustomTabBar,
83
94
  bottomAccessory: bottomAccessory ? environment => bottomAccessory({
84
95
  placement: environment
85
96
  }) : undefined,
@@ -104,10 +115,14 @@ export function NativeBottomTabView({
104
115
  onNativeFocusChange: e => {
105
116
  const route = state.routes.find(route => route.key === e.nativeEvent.tabKey);
106
117
  if (route) {
107
- navigation.emit({
118
+ const event = navigation.emit({
108
119
  type: 'tabPress',
109
- target: route.key
120
+ target: route.key,
121
+ canPreventDefault: true
110
122
  });
123
+ if (event.defaultPrevented) {
124
+ throw new Error("Preventing default for 'tabPress' is not supported with native tab bar.");
125
+ }
111
126
  const isFocused = state.index === state.routes.findIndex(r => r.key === route.key);
112
127
  if (!isFocused) {
113
128
  navigation.dispatch({
@@ -134,7 +149,9 @@ export function NativeBottomTabView({
134
149
  tabBarBadge,
135
150
  tabBarSystemItem,
136
151
  tabBarBlurEffect = dark ? 'systemMaterialDark' : 'systemMaterial',
137
- tabBarStyle
152
+ tabBarStyle,
153
+ sceneStyle,
154
+ scrollEdgeEffects
138
155
  } = options;
139
156
  const {
140
157
  backgroundColor: tabBarBackgroundColor,
@@ -154,28 +171,33 @@ export function NativeBottomTabView({
154
171
  tabBarItemTitleFontStyle: fontStyle
155
172
  };
156
173
  const badgeBackgroundColor = tabBarBadgeStyle?.backgroundColor ?? colors.notification;
157
- const badgeTextColor = tabBarBadgeStyle?.color ?? (typeof badgeBackgroundColor === 'string' ? Color(badgeBackgroundColor).isLight() ? 'black' : 'white' : undefined);
158
- const icon = typeof tabBarIcon === 'function' ? getPlatformIcon(tabBarIcon({
159
- focused: false
160
- })) : tabBarIcon != null ? getPlatformIcon(tabBarIcon) : undefined;
161
- const selectedIcon = typeof tabBarIcon === 'function' ? getPlatformIcon(tabBarIcon({
162
- focused: true
163
- })) : undefined;
174
+ const badgeTextColor = tabBarBadgeStyle?.color ?? (Color(badgeBackgroundColor)?.isLight() ? 'black' : 'white');
175
+ const getIcon = selected => {
176
+ if (typeof tabBarIcon === 'function') {
177
+ const result = tabBarIcon({
178
+ focused: selected,
179
+ size: ICON_SIZE,
180
+ color: selected ? activeTintColor : inactiveTintColor
181
+ });
182
+ if (/*#__PURE__*/React.isValidElement(result)) {
183
+ throw new Error(`Returning a React element from 'tabBarIcon' is not supported with native tab bar.`);
184
+ } else if (result && typeof result === 'object' && 'type' in result) {
185
+ return getPlatformIcon(result);
186
+ } else {
187
+ throw new Error(`The 'tabBarIcon' function must return an icon object (got ${typeof result}).`);
188
+ }
189
+ } else if (tabBarIcon != null) {
190
+ return getPlatformIcon(tabBarIcon);
191
+ }
192
+ return undefined;
193
+ };
194
+ const icon = getIcon(false);
195
+ const selectedIcon = getIcon(true);
164
196
  return /*#__PURE__*/_jsx(BottomTabsScreen, {
165
- onWillDisappear: () => onTransitionStart({
166
- closing: true,
167
- route
168
- }),
169
197
  onWillAppear: () => onTransitionStart({
170
- closing: false,
171
198
  route
172
199
  }),
173
200
  onDidAppear: () => onTransitionEnd({
174
- closing: false,
175
- route
176
- }),
177
- onDidDisappear: () => onTransitionEnd({
178
- closing: true,
179
201
  route
180
202
  }),
181
203
  tabKey: route.key,
@@ -187,6 +209,11 @@ export function NativeBottomTabView({
187
209
  systemItem: tabBarSystemItem,
188
210
  isFocused: isFocused,
189
211
  title: tabTitle,
212
+ scrollEdgeEffects: scrollEdgeEffects
213
+ // FIXME: if this is not provided, ScrollView on lazy tabs glitches on iOS 18
214
+ // For now we provide an empty object before adding proper support
215
+ ,
216
+ scrollEdgeAppearance: {},
190
217
  standardAppearance: {
191
218
  tabBarBackgroundColor,
192
219
  tabBarShadowColor,
@@ -205,57 +232,48 @@ export function NativeBottomTabView({
205
232
  children: /*#__PURE__*/_jsx(Lazy, {
206
233
  enabled: lazy,
207
234
  visible: isFocused || isPreloaded,
208
- children: /*#__PURE__*/_jsx(ScreenWithHeader, {
235
+ children: /*#__PURE__*/_jsx(ScreenContent, {
209
236
  isFocused: isFocused,
210
237
  route: route,
211
238
  navigation: navigation,
212
239
  options: options,
213
- children: render()
240
+ style: sceneStyle,
241
+ children: /*#__PURE__*/_jsx(AnimatedScreenContent, {
242
+ isFocused: isFocused,
243
+ children: /*#__PURE__*/_jsx(BottomTabBarHeightContext.Provider, {
244
+ value: 0,
245
+ children: render()
246
+ })
247
+ })
214
248
  })
215
249
  })
216
250
  }, route.key);
217
251
  })
218
- })
252
+ }), tabBarPosition === 'bottom' || tabBarPosition === 'right' ? tabBarElement : null]
219
253
  });
220
254
  }
221
- function ScreenWithHeader({
255
+ function AnimatedScreenContent({
222
256
  isFocused,
223
- route,
224
- navigation,
225
- options,
226
257
  children
227
258
  }) {
228
- const {
229
- headerTransparent,
230
- header: renderCustomHeader,
231
- headerShown = renderCustomHeader != null
232
- } = options;
233
- const hasNativeHeader = headerShown && renderCustomHeader == null;
234
- const [wasNativeHeaderShown] = React.useState(hasNativeHeader);
235
- React.useEffect(() => {
236
- if (wasNativeHeaderShown !== hasNativeHeader) {
237
- throw new Error(`Changing 'headerShown' or 'header' options dynamically is not supported when using native header.`);
238
- }
239
- }, [wasNativeHeaderShown, hasNativeHeader]);
240
- if (hasNativeHeader) {
241
- return /*#__PURE__*/_jsx(NativeScreen, {
242
- route: route,
243
- navigation: navigation,
244
- options: options,
245
- children: children
246
- });
247
- }
248
- return /*#__PURE__*/_jsx(ScreenContent, {
249
- focused: isFocused,
250
- route: route,
251
- navigation: navigation,
252
- headerShown: headerShown,
253
- headerTransparent: headerTransparent,
254
- header: renderCustomHeader?.({
255
- route,
256
- navigation,
257
- options
258
- }),
259
+ const [progress] = React.useState(() => new Animated.Value(isFocused ? 1 : 0));
260
+ React.useLayoutEffect(() => {
261
+ /**
262
+ * We don't have animation progress from native,
263
+ * So we expose a static value (0 or 1) based on focus state.
264
+ * Otherwise code using the `useTabAnimation` hook will crash
265
+ */
266
+ progress.setValue(isFocused ? 1 : 0);
267
+ }, [isFocused, progress]);
268
+ const interpolationProps = React.useMemo(() => {
269
+ return {
270
+ current: {
271
+ progress
272
+ }
273
+ };
274
+ }, [progress]);
275
+ return /*#__PURE__*/_jsx(BottomTabAnimationContext.Provider, {
276
+ value: interpolationProps,
259
277
  children: children
260
278
  });
261
279
  }
@@ -272,4 +290,4 @@ function getPlatformIcon(icon) {
272
290
  } : undefined
273
291
  };
274
292
  }
275
- //# sourceMappingURL=NativeBottomTabView.native.js.map
293
+ //# sourceMappingURL=BottomTabViewNativeImpl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getLabel","Color","Lazy","SafeAreaProviderCompat","CommonActions","StackActions","useTheme","React","Animated","Platform","PlatformColor","BottomTabs","BottomTabsScreen","BottomTabAnimationContext","BottomTabBarHeightContext","useTabBarPosition","ScreenContent","jsx","_jsx","jsxs","_jsxs","ICON_SIZE","select","ios","default","BottomTabViewNative","state","navigation","descriptors","tabBar","dark","colors","fonts","focusedRouteKey","routes","index","key","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","options","popToTopOnBlur","prevRoute","find","route","type","popToTopAction","popToTop","target","dispatch","currentOptions","fontFamily","medium","regular","fontWeight","fontSize","fontStyle","tabBarLabelStyle","activeTintColor","tabBarActiveTintColor","primary","inactiveTintColor","tabBarInactiveTintColor","text","activeIndicatorColor","tabBarActiveIndicatorColor","alpha","string","onTransitionStart","emit","onTransitionEnd","tabBarPosition","hasCustomTabBar","tabBarElement","bottomAccessory","style","flexDirection","children","tabBarHidden","environment","placement","undefined","tabBarItemLabelVisibilityMode","tabBarLabelVisibilityMode","tabBarControllerMode","tabBarMinimizeBehavior","tabBarTintColor","tabBarItemIconColor","tabBarItemIconColorActive","tabBarItemTitleFontColor","tabBarItemTitleFontColorActive","tabBarItemTitleFontFamily","tabBarItemTitleFontWeight","tabBarItemTitleFontSize","tabBarItemTitleFontSizeActive","tabBarItemTitleFontStyle","tabBarBackgroundColor","tabBarStyle","backgroundColor","card","tabBarItemActiveIndicatorColor","tabBarItemActiveIndicatorEnabled","tabBarActiveIndicatorEnabled","tabBarItemRippleColor","tabBarRippleColor","experimentalControlNavigationStateInJS","onNativeFocusChange","e","nativeEvent","tabKey","event","canPreventDefault","defaultPrevented","Error","isFocused","findIndex","r","navigate","name","params","map","render","isPreloaded","preloadedRouteKeys","includes","title","lazy","tabBarLabel","tabBarBadgeStyle","tabBarIcon","tabBarBadge","tabBarSystemItem","tabBarBlurEffect","sceneStyle","scrollEdgeEffects","shadowColor","tabBarShadowColor","tabTitle","OS","label","tabItemAppearance","badgeBackgroundColor","notification","badgeTextColor","color","isLight","getIcon","selected","result","focused","size","isValidElement","getPlatformIcon","icon","selectedIcon","onWillAppear","onDidAppear","shared","tabBarItemBadgeBackgroundColor","tabBarItemBadgeTextColor","badgeValue","toString","systemItem","scrollEdgeAppearance","standardAppearance","stacked","normal","inline","compactInline","experimental_userInterfaceStyle","enabled","visible","AnimatedScreenContent","Provider","value","progress","useState","Value","useLayoutEffect","setValue","interpolationProps","useMemo","tinted","templateSource","source","android","imageSource"],"sourceRoot":"../../../src","sources":["views/BottomTabViewNativeImpl.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,4BAA4B;AACrD,SACEC,KAAK,EACLC,IAAI,EACJC,sBAAsB,QACjB,qCAAqC;AAC5C,SACEC,aAAa,EAGbC,YAAY,EAEZC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,cAAc;AAChE,SACEC,UAAU,EACVC,gBAAgB,QAGX,sBAAsB;AAQ7B,SAASC,yBAAyB,QAAQ,uCAAoC;AAC9E,SAASC,yBAAyB,QAAQ,uCAAoC;AAC9E,SAASC,iBAAiB,QAAQ,+BAA4B;AAC9D,SAASC,aAAa,QAAQ,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQhD,MAAMC,SAAS,GAAGZ,QAAQ,CAACa,MAAM,CAAC;EAChCC,GAAG,EAAE,EAAE;EACPC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,SAASC,mBAAmBA,CAAC;EAClCC,KAAK;EACLC,UAAU;EACVC,WAAW;EACXC;AACK,CAAC,EAAE;EACR,MAAM;IAAEC,IAAI;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG1B,QAAQ,CAAC,CAA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