@react-navigation/bottom-tabs 7.8.12 → 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} +100 -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 +16 -21
  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} +147 -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 -169
  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 -283
  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 -467
  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 -302
  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 -244
  131. package/src/unstable/NativeScreen/debounce.tsx +0 -14
  132. package/src/unstable/NativeScreen/types.ts +0 -517
  133. package/src/unstable/NativeScreen/useAnimatedHeaderHeight.tsx +0 -18
  134. package/src/unstable/NativeScreen/useHeaderConfig.tsx +0 -423
  135. package/src/unstable/createNativeBottomTabNavigator.native.tsx +0 -116
  136. package/src/unstable/createNativeBottomTabNavigator.tsx +0 -4
  137. package/src/unstable/index.tsx +0 -22
  138. package/src/unstable/types.tsx +0 -385
  139. package/src/views/ScreenFallback.tsx +0 -50
@@ -1,9 +1,9 @@
1
+ import { getLabel } from '@react-navigation/elements';
1
2
  import {
2
- getLabel,
3
+ Color,
3
4
  Lazy,
4
5
  SafeAreaProviderCompat,
5
- Screen as ScreenContent,
6
- } from '@react-navigation/elements';
6
+ } from '@react-navigation/elements/internal';
7
7
  import {
8
8
  CommonActions,
9
9
  type ParamListBase,
@@ -12,9 +12,8 @@ import {
12
12
  type TabNavigationState,
13
13
  useTheme,
14
14
  } from '@react-navigation/native';
15
- import Color from 'color';
16
15
  import * as React from 'react';
17
- import { type ColorValue, Platform, PlatformColor } from 'react-native';
16
+ import { Animated, Platform, PlatformColor } from 'react-native';
18
17
  import {
19
18
  BottomTabs,
20
19
  BottomTabsScreen,
@@ -22,23 +21,34 @@ import {
22
21
  type PlatformIcon,
23
22
  } from 'react-native-screens';
24
23
 
25
- import { NativeScreen } from './NativeScreen/NativeScreen';
26
24
  import type {
27
- Icon,
28
- NativeBottomTabDescriptorMap,
29
- NativeBottomTabNavigationConfig,
30
- NativeBottomTabNavigationHelpers,
31
- NativeBottomTabNavigationOptions,
32
- NativeBottomTabNavigationProp,
33
- } from './types';
34
-
35
- type Props = NativeBottomTabNavigationConfig & {
25
+ BottomTabDescriptorMap,
26
+ BottomTabIcon,
27
+ BottomTabNavigationConfig,
28
+ BottomTabNavigationHelpers,
29
+ } from '../types';
30
+ import { BottomTabAnimationContext } from '../utils/BottomTabAnimationContext';
31
+ import { BottomTabBarHeightContext } from '../utils/BottomTabBarHeightContext';
32
+ import { useTabBarPosition } from '../utils/useTabBarPosition';
33
+ import { ScreenContent } from './ScreenContent';
34
+
35
+ type Props = BottomTabNavigationConfig & {
36
36
  state: TabNavigationState<ParamListBase>;
37
- navigation: NativeBottomTabNavigationHelpers;
38
- descriptors: NativeBottomTabDescriptorMap;
37
+ navigation: BottomTabNavigationHelpers;
38
+ descriptors: BottomTabDescriptorMap;
39
39
  };
40
40
 
41
- export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
41
+ const ICON_SIZE = Platform.select({
42
+ ios: 25,
43
+ default: 24,
44
+ });
45
+
46
+ export function BottomTabViewNative({
47
+ state,
48
+ navigation,
49
+ descriptors,
50
+ tabBar,
51
+ }: Props) {
42
52
  const { dark, colors, fonts } = useTheme();
43
53
 
44
54
  const focusedRouteKey = state.routes[state.index].key;
@@ -87,48 +97,58 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
87
97
 
88
98
  const inactiveTintColor =
89
99
  currentOptions.tabBarInactiveTintColor ??
90
- Platform.select<ColorValue | string>({
91
- ios: PlatformColor('label'),
92
- default: colors.text,
93
- });
100
+ Platform.select({ ios: PlatformColor('label'), default: colors.text });
94
101
 
95
102
  const activeIndicatorColor =
96
- (currentOptions?.tabBarActiveIndicatorColor ??
97
- typeof activeTintColor === 'string')
98
- ? Color(activeTintColor)?.alpha(0.1).string()
99
- : undefined;
100
-
101
- const onTransitionStart = ({
102
- closing,
103
- route,
104
- }: {
105
- closing: boolean;
106
- route: Route<string>;
107
- }) => {
103
+ currentOptions?.tabBarActiveIndicatorColor ??
104
+ Color(activeTintColor)?.alpha(0.1).string();
105
+
106
+ const onTransitionStart = ({ route }: { route: Route<string> }) => {
108
107
  navigation.emit({
109
108
  type: 'transitionStart',
110
- data: { closing },
111
109
  target: route.key,
112
110
  });
113
111
  };
114
112
 
115
- const onTransitionEnd = ({
116
- closing,
117
- route,
118
- }: {
119
- closing: boolean;
120
- route: Route<string>;
121
- }) => {
113
+ const onTransitionEnd = ({ route }: { route: Route<string> }) => {
122
114
  navigation.emit({
123
115
  type: 'transitionEnd',
124
- data: { closing },
125
116
  target: route.key,
126
117
  });
127
118
  };
128
119
 
120
+ const tabBarPosition = useTabBarPosition(currentOptions);
121
+
122
+ const hasCustomTabBar = tabBar != null;
123
+ const tabBarElement = tabBar
124
+ ? tabBar({
125
+ state,
126
+ descriptors,
127
+ navigation,
128
+ })
129
+ : null;
130
+
131
+ const bottomAccessory = currentOptions.bottomAccessory;
132
+
129
133
  return (
130
- <SafeAreaProviderCompat>
134
+ <SafeAreaProviderCompat
135
+ style={{
136
+ flexDirection:
137
+ tabBarPosition === 'left' || tabBarPosition === 'right'
138
+ ? 'row'
139
+ : 'column',
140
+ }}
141
+ >
142
+ {tabBarPosition === 'top' || tabBarPosition === 'left'
143
+ ? tabBarElement
144
+ : null}
131
145
  <BottomTabs
146
+ tabBarHidden={hasCustomTabBar}
147
+ bottomAccessory={
148
+ bottomAccessory
149
+ ? (environment) => bottomAccessory({ placement: environment })
150
+ : undefined
151
+ }
132
152
  tabBarItemLabelVisibilityMode={
133
153
  currentOptions?.tabBarLabelVisibilityMode
134
154
  }
@@ -159,11 +179,18 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
159
179
  );
160
180
 
161
181
  if (route) {
162
- navigation.emit({
182
+ const event = navigation.emit({
163
183
  type: 'tabPress',
164
184
  target: route.key,
185
+ canPreventDefault: true,
165
186
  });
166
187
 
188
+ if (event.defaultPrevented) {
189
+ throw new Error(
190
+ "Preventing default for 'tabPress' is not supported with native tab bar."
191
+ );
192
+ }
193
+
167
194
  const isFocused =
168
195
  state.index ===
169
196
  state.routes.findIndex((r) => r.key === route.key);
@@ -192,6 +219,8 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
192
219
  tabBarSystemItem,
193
220
  tabBarBlurEffect = dark ? 'systemMaterialDark' : 'systemMaterial',
194
221
  tabBarStyle,
222
+ sceneStyle,
223
+ scrollEdgeEffects,
195
224
  } = options;
196
225
 
197
226
  const {
@@ -217,32 +246,45 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
217
246
  tabBarBadgeStyle?.backgroundColor ?? colors.notification;
218
247
  const badgeTextColor =
219
248
  tabBarBadgeStyle?.color ??
220
- (typeof badgeBackgroundColor === 'string'
221
- ? Color(badgeBackgroundColor).isLight()
222
- ? 'black'
223
- : 'white'
224
- : undefined);
225
-
226
- const icon =
227
- typeof tabBarIcon === 'function'
228
- ? getPlatformIcon(tabBarIcon({ focused: false }))
229
- : tabBarIcon != null
230
- ? getPlatformIcon(tabBarIcon)
231
- : undefined;
232
-
233
- const selectedIcon =
234
- typeof tabBarIcon === 'function'
235
- ? getPlatformIcon(tabBarIcon({ focused: true }))
236
- : undefined;
249
+ (Color(badgeBackgroundColor)?.isLight() ? 'black' : 'white');
250
+
251
+ const getIcon = (selected: boolean) => {
252
+ if (typeof tabBarIcon === 'function') {
253
+ const result = tabBarIcon({
254
+ focused: selected,
255
+ size: ICON_SIZE!,
256
+ color: selected ? activeTintColor : inactiveTintColor,
257
+ });
258
+
259
+ if (React.isValidElement(result)) {
260
+ throw new Error(
261
+ `Returning a React element from 'tabBarIcon' is not supported with native tab bar.`
262
+ );
263
+ } else if (
264
+ result &&
265
+ typeof result === 'object' &&
266
+ 'type' in result
267
+ ) {
268
+ return getPlatformIcon(result);
269
+ } else {
270
+ throw new Error(
271
+ `The 'tabBarIcon' function must return an icon object (got ${typeof result}).`
272
+ );
273
+ }
274
+ } else if (tabBarIcon != null) {
275
+ return getPlatformIcon(tabBarIcon);
276
+ }
277
+
278
+ return undefined;
279
+ };
280
+
281
+ const icon = getIcon(false);
282
+ const selectedIcon = getIcon(true);
237
283
 
238
284
  return (
239
285
  <BottomTabsScreen
240
- onWillDisappear={() =>
241
- onTransitionStart({ closing: true, route })
242
- }
243
- onWillAppear={() => onTransitionStart({ closing: false, route })}
244
- onDidAppear={() => onTransitionEnd({ closing: false, route })}
245
- onDidDisappear={() => onTransitionEnd({ closing: true, route })}
286
+ onWillAppear={() => onTransitionStart({ route })}
287
+ onDidAppear={() => onTransitionEnd({ route })}
246
288
  key={route.key}
247
289
  tabKey={route.key}
248
290
  icon={icon}
@@ -253,6 +295,10 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
253
295
  systemItem={tabBarSystemItem}
254
296
  isFocused={isFocused}
255
297
  title={tabTitle}
298
+ scrollEdgeEffects={scrollEdgeEffects}
299
+ // FIXME: if this is not provided, ScrollView on lazy tabs glitches on iOS 18
300
+ // For now we provide an empty object before adding proper support
301
+ scrollEdgeAppearance={{}}
256
302
  standardAppearance={{
257
303
  tabBarBackgroundColor,
258
304
  tabBarShadowColor,
@@ -267,83 +313,68 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
267
313
  normal: tabItemAppearance,
268
314
  },
269
315
  }}
316
+ experimental_userInterfaceStyle={dark ? 'dark' : 'light'}
270
317
  >
271
318
  <Lazy enabled={lazy} visible={isFocused || isPreloaded}>
272
- <ScreenWithHeader
319
+ <ScreenContent
273
320
  isFocused={isFocused}
274
321
  route={route}
275
322
  navigation={navigation}
276
323
  options={options}
324
+ style={sceneStyle}
277
325
  >
278
- {render()}
279
- </ScreenWithHeader>
326
+ <AnimatedScreenContent isFocused={isFocused}>
327
+ <BottomTabBarHeightContext.Provider value={0}>
328
+ {render()}
329
+ </BottomTabBarHeightContext.Provider>
330
+ </AnimatedScreenContent>
331
+ </ScreenContent>
280
332
  </Lazy>
281
333
  </BottomTabsScreen>
282
334
  );
283
335
  })}
284
336
  </BottomTabs>
337
+ {tabBarPosition === 'bottom' || tabBarPosition === 'right'
338
+ ? tabBarElement
339
+ : null}
285
340
  </SafeAreaProviderCompat>
286
341
  );
287
342
  }
288
343
 
289
- function ScreenWithHeader({
344
+ function AnimatedScreenContent({
290
345
  isFocused,
291
- route,
292
- navigation,
293
- options,
294
346
  children,
295
347
  }: {
296
348
  isFocused: boolean;
297
- route: Route<string>;
298
- navigation: NativeBottomTabNavigationProp<ParamListBase>;
299
- options: NativeBottomTabNavigationOptions;
300
349
  children: React.ReactNode;
301
350
  }) {
302
- const {
303
- headerTransparent,
304
- header: renderCustomHeader,
305
- headerShown = renderCustomHeader != null,
306
- } = options;
307
-
308
- const hasNativeHeader = headerShown && renderCustomHeader == null;
309
-
310
- const [wasNativeHeaderShown] = React.useState(hasNativeHeader);
311
-
312
- React.useEffect(() => {
313
- if (wasNativeHeaderShown !== hasNativeHeader) {
314
- throw new Error(
315
- `Changing 'headerShown' or 'header' options dynamically is not supported when using native header.`
316
- );
317
- }
318
- }, [wasNativeHeaderShown, hasNativeHeader]);
351
+ const [progress] = React.useState(
352
+ () => new Animated.Value(isFocused ? 1 : 0)
353
+ );
319
354
 
320
- if (hasNativeHeader) {
321
- return (
322
- <NativeScreen route={route} navigation={navigation} options={options}>
323
- {children}
324
- </NativeScreen>
325
- );
326
- }
355
+ React.useLayoutEffect(() => {
356
+ /**
357
+ * We don't have animation progress from native,
358
+ * So we expose a static value (0 or 1) based on focus state.
359
+ * Otherwise code using the `useTabAnimation` hook will crash
360
+ */
361
+ progress.setValue(isFocused ? 1 : 0);
362
+ }, [isFocused, progress]);
363
+
364
+ const interpolationProps = React.useMemo(() => {
365
+ return {
366
+ current: { progress },
367
+ };
368
+ }, [progress]);
327
369
 
328
370
  return (
329
- <ScreenContent
330
- focused={isFocused}
331
- route={route}
332
- navigation={navigation}
333
- headerShown={headerShown}
334
- headerTransparent={headerTransparent}
335
- header={renderCustomHeader?.({
336
- route,
337
- navigation,
338
- options,
339
- })}
340
- >
371
+ <BottomTabAnimationContext.Provider value={interpolationProps}>
341
372
  {children}
342
- </ScreenContent>
373
+ </BottomTabAnimationContext.Provider>
343
374
  );
344
375
  }
345
376
 
346
- function getPlatformIcon(icon: Icon): PlatformIcon {
377
+ function getPlatformIcon(icon: BottomTabIcon): PlatformIcon {
347
378
  return {
348
379
  ios:
349
380
  icon?.type === 'sfSymbol'
@@ -0,0 +1,58 @@
1
+ import { getHeaderTitle, Header } from '@react-navigation/elements';
2
+ import { Screen } from '@react-navigation/elements/internal';
3
+ import type { ParamListBase, Route } from '@react-navigation/native';
4
+ import * as React from 'react';
5
+ import { type StyleProp, type ViewStyle } from 'react-native';
6
+
7
+ import type {
8
+ BottomTabNavigationOptions,
9
+ BottomTabNavigationProp,
10
+ } from '../types';
11
+
12
+ export function ScreenContent({
13
+ isFocused,
14
+ route,
15
+ navigation,
16
+ options,
17
+ style,
18
+ children,
19
+ }: {
20
+ isFocused: boolean;
21
+ route: Route<string>;
22
+ navigation: BottomTabNavigationProp<ParamListBase>;
23
+ options: BottomTabNavigationOptions;
24
+ style?: StyleProp<ViewStyle>;
25
+ children: React.ReactNode;
26
+ }) {
27
+ const {
28
+ headerTransparent,
29
+ header: renderCustomHeader,
30
+ headerShown = renderCustomHeader != null,
31
+ } = options;
32
+
33
+ const hasDefaultHeader = headerShown && renderCustomHeader == null;
34
+
35
+ return (
36
+ <Screen
37
+ focused={isFocused}
38
+ route={route}
39
+ navigation={navigation}
40
+ headerShown={headerShown}
41
+ headerTransparent={headerTransparent}
42
+ header={
43
+ hasDefaultHeader ? (
44
+ <Header {...options} title={getHeaderTitle(options, route.name)} />
45
+ ) : (
46
+ renderCustomHeader?.({
47
+ route,
48
+ navigation,
49
+ options,
50
+ })
51
+ )
52
+ }
53
+ style={style}
54
+ >
55
+ {children}
56
+ </Screen>
57
+ );
58
+ }
@@ -1,7 +1,10 @@
1
1
  import { Badge } from '@react-navigation/elements';
2
+ import { MissingIcon } from '@react-navigation/elements/internal';
2
3
  import type { Route } from '@react-navigation/native';
3
4
  import React from 'react';
4
5
  import {
6
+ type ColorValue,
7
+ Image,
5
8
  type StyleProp,
6
9
  StyleSheet,
7
10
  type TextStyle,
@@ -9,7 +12,9 @@ import {
9
12
  type ViewStyle,
10
13
  } from 'react-native';
11
14
 
12
- type Props = {
15
+ import type { BottomTabIcon } from '../types';
16
+
17
+ export type TabBarIconProps = {
13
18
  route: Route<string>;
14
19
  variant: 'uikit' | 'material';
15
20
  size: 'compact' | 'regular';
@@ -17,13 +22,15 @@ type Props = {
17
22
  badgeStyle?: StyleProp<TextStyle>;
18
23
  activeOpacity: number;
19
24
  inactiveOpacity: number;
20
- activeTintColor: string;
21
- inactiveTintColor: string;
22
- renderIcon: (props: {
23
- focused: boolean;
24
- color: string;
25
- size: number;
26
- }) => React.ReactNode;
25
+ activeTintColor: ColorValue;
26
+ inactiveTintColor: ColorValue;
27
+ icon:
28
+ | BottomTabIcon
29
+ | ((props: {
30
+ focused: boolean;
31
+ color: ColorValue;
32
+ size: number;
33
+ }) => BottomTabIcon | React.ReactNode);
27
34
  allowFontScaling?: boolean;
28
35
  style: StyleProp<ViewStyle>;
29
36
  };
@@ -50,10 +57,10 @@ export function TabBarIcon({
50
57
  inactiveOpacity,
51
58
  activeTintColor,
52
59
  inactiveTintColor,
53
- renderIcon,
60
+ icon,
54
61
  allowFontScaling,
55
62
  style,
56
- }: Props) {
63
+ }: TabBarIconProps) {
57
64
  const iconSize =
58
65
  variant === 'material'
59
66
  ? ICON_SIZE_MATERIAL
@@ -88,6 +95,7 @@ export function TabBarIcon({
88
95
  focused: true,
89
96
  size: iconSize,
90
97
  color: activeTintColor,
98
+ icon,
91
99
  })}
92
100
  </View>
93
101
  <View style={[styles.icon, { opacity: inactiveOpacity }]}>
@@ -95,6 +103,7 @@ export function TabBarIcon({
95
103
  focused: false,
96
104
  size: iconSize,
97
105
  color: inactiveTintColor,
106
+ icon,
98
107
  })}
99
108
  </View>
100
109
  <Badge
@@ -109,6 +118,50 @@ export function TabBarIcon({
109
118
  );
110
119
  }
111
120
 
121
+ function renderIcon({
122
+ focused,
123
+ size,
124
+ color,
125
+ icon,
126
+ }: {
127
+ focused: boolean;
128
+ size: number;
129
+ color: ColorValue;
130
+ icon: TabBarIconProps['icon'];
131
+ }) {
132
+ const iconValue =
133
+ typeof icon === 'function' ? icon({ focused, size, color }) : icon;
134
+
135
+ if (React.isValidElement(iconValue)) {
136
+ return iconValue;
137
+ }
138
+
139
+ if (
140
+ typeof iconValue === 'object' &&
141
+ iconValue != null &&
142
+ 'type' in iconValue
143
+ ) {
144
+ if (iconValue?.type === 'image') {
145
+ return (
146
+ <Image
147
+ source={iconValue.source}
148
+ style={{
149
+ width: size,
150
+ height: size,
151
+ tintColor: iconValue.tinted === false ? undefined : color,
152
+ }}
153
+ />
154
+ );
155
+ } else {
156
+ throw new Error(
157
+ `Icon type '${iconValue.type}' is only supported with native tab bar.`
158
+ );
159
+ }
160
+ }
161
+
162
+ return <MissingIcon color={color} size={size} />;
163
+ }
164
+
112
165
  const styles = StyleSheet.create({
113
166
  icon: {
114
167
  // We render the icon twice at the same position on top of each other:
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- export function NativeBottomTabView(_) {
4
- throw new Error('Native Bottom Tabs are not supported on this platform.');
5
- }
6
- //# sourceMappingURL=NativeBottomTabView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["NativeBottomTabView","_","Error"],"sourceRoot":"../../../src","sources":["unstable/NativeBottomTabView.tsx"],"mappings":";;AAiBA,OAAO,SAASA,mBAAmBA,CAACC,CAAQ,EAAE;EAC5C,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;AAC3E","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["getLabel","Lazy","SafeAreaProviderCompat","Screen","ScreenContent","CommonActions","StackActions","useTheme","Color","React","Platform","PlatformColor","BottomTabs","BottomTabsScreen","NativeScreen","jsx","_jsx","NativeBottomTabView","state","navigation","descriptors","dark","colors","fonts","focusedRouteKey","routes","index","key","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","options","popToTopOnBlur","prevRoute","find","route","type","popToTopAction","popToTop","target","dispatch","currentOptions","fontFamily","select","ios","medium","default","regular","fontWeight","fontSize","fontStyle","tabBarLabelStyle","activeTintColor","tabBarActiveTintColor","primary","inactiveTintColor","tabBarInactiveTintColor","text","activeIndicatorColor","tabBarActiveIndicatorColor","alpha","string","undefined","onTransitionStart","closing","emit","data","onTransitionEnd","children","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","isFocused","findIndex","r","navigate","name","params","map","render","isPreloaded","preloadedRouteKeys","includes","title","lazy","tabBarLabel","tabBarBadgeStyle","tabBarIcon","tabBarBadge","tabBarSystemItem","tabBarBlurEffect","shadowColor","tabBarShadowColor","tabTitle","OS","label","tabItemAppearance","badgeBackgroundColor","notification","badgeTextColor","color","isLight","icon","getPlatformIcon","focused","selectedIcon","onWillDisappear","onWillAppear","onDidAppear","onDidDisappear","shared","tabBarItemBadgeBackgroundColor","tabBarItemBadgeTextColor","badgeValue","toString","systemItem","standardAppearance","stacked","normal","inline","compactInline","enabled","visible","ScreenWithHeader","headerTransparent","header","renderCustomHeader","headerShown","hasNativeHeader","wasNativeHeaderShown","useState","Error","tinted","templateSource","source","android","imageSource"],"sourceRoot":"../../../src","sources":["unstable/NativeBottomTabView.native.tsx"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,IAAI,EACJC,sBAAsB,EACtBC,MAAM,IAAIC,aAAa,QAClB,4BAA4B;AACnC,SACEC,aAAa,EAGbC,YAAY,EAEZC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAA0BC,QAAQ,EAAEC,aAAa,QAAQ,cAAc;AACvE,SACEC,UAAU,EACVC,gBAAgB,QAGX,sBAAsB;AAE7B,SAASC,YAAY,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgB3D,OAAO,SAASC,mBAAmBA,CAAC;EAAEC,KAAK;EAAEC,UAAU;EAAEC;AAAmB,CAAC,EAAE;EAC7E,MAAM;IAAEC,IAAI;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGhB,QAAQ,CAAC,CAAC;EAE1C,MAAMiB,eAAe,GAAGN,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG;EACrD,MAAMC,mBAAmB,GAAGnB,KAAK,CAACoB,MAAM,CAACL,eAAe,CAAC;EAEzDf,KAAK,CAACqB,SAAS,CAAC,MAAM;IACpB,MAAMC,gBAAgB,GAAGH,mBAAmB,CAACI,OAAO;IAEpD,IACED,gBAAgB,KAAKP,eAAe,IACpCJ,WAAW,CAACW,gBAAgB,CAAC,EAAEE,OAAO,CAACC,cAAc,EACrD;MACA,MAAMC,SAAS,GAAGjB,KAAK,CA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