@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.
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createBottomTabNavigator.js +27 -9
- package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
- package/lib/module/utils/BottomTabAnimationContext.js +5 -0
- package/lib/module/utils/BottomTabAnimationContext.js.map +1 -0
- package/lib/module/utils/useBottomTabAnimation.js +12 -0
- package/lib/module/utils/useBottomTabAnimation.js.map +1 -0
- package/lib/module/utils/useTabBarPosition.js +34 -0
- package/lib/module/utils/useTabBarPosition.js.map +1 -0
- package/lib/module/views/BottomTabBar.js +46 -49
- package/lib/module/views/BottomTabBar.js.map +1 -1
- package/lib/module/views/BottomTabItem.js +17 -15
- package/lib/module/views/BottomTabItem.js.map +1 -1
- package/lib/module/views/BottomTabViewCommon.js +16 -0
- package/lib/module/views/BottomTabViewCommon.js.map +1 -0
- package/lib/module/views/{BottomTabView.js → BottomTabViewCustom.js} +107 -106
- package/lib/module/views/BottomTabViewCustom.js.map +1 -0
- package/lib/module/views/BottomTabViewNative.android.js +4 -0
- package/lib/module/views/BottomTabViewNative.android.js.map +1 -0
- package/lib/module/views/BottomTabViewNative.ios.js +4 -0
- package/lib/module/views/BottomTabViewNative.ios.js.map +1 -0
- package/lib/module/views/BottomTabViewNative.js +5 -0
- package/lib/module/views/BottomTabViewNative.js.map +1 -0
- package/lib/module/{unstable/NativeBottomTabView.native.js → views/BottomTabViewNativeImpl.js} +95 -77
- package/lib/module/views/BottomTabViewNativeImpl.js.map +1 -0
- package/lib/module/views/ScreenContent.js +39 -0
- package/lib/module/views/ScreenContent.js.map +1 -0
- package/lib/module/views/TabBarIcon.js +40 -4
- package/lib/module/views/TabBarIcon.js.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts +10 -6
- package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +383 -115
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/BottomTabAnimationContext.d.ts +4 -0
- package/lib/typescript/src/utils/BottomTabAnimationContext.d.ts.map +1 -0
- package/lib/typescript/src/utils/useBottomTabAnimation.d.ts +2 -0
- package/lib/typescript/src/utils/useBottomTabAnimation.d.ts.map +1 -0
- package/lib/typescript/src/utils/useTabBarPosition.d.ts +3 -0
- package/lib/typescript/src/utils/useTabBarPosition.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabBar.d.ts +4 -4
- package/lib/typescript/src/views/BottomTabBar.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabItem.d.ts +16 -14
- package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -1
- package/lib/typescript/src/views/{BottomTabView.d.ts → BottomTabViewCommon.d.ts} +2 -2
- package/lib/typescript/src/views/BottomTabViewCommon.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabViewCustom.d.ts +10 -0
- package/lib/typescript/src/views/BottomTabViewCustom.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabViewNative.android.d.ts +2 -0
- package/lib/typescript/src/views/BottomTabViewNative.android.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabViewNative.d.ts +3 -0
- package/lib/typescript/src/views/BottomTabViewNative.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabViewNative.ios.d.ts +2 -0
- package/lib/typescript/src/views/BottomTabViewNative.ios.d.ts.map +1 -0
- package/lib/typescript/src/views/BottomTabViewNativeImpl.d.ts +10 -0
- package/lib/typescript/src/views/BottomTabViewNativeImpl.d.ts.map +1 -0
- package/lib/typescript/src/views/ScreenContent.d.ts +13 -0
- package/lib/typescript/src/views/ScreenContent.d.ts.map +1 -0
- package/lib/typescript/src/views/TabBarIcon.d.ts +9 -9
- package/lib/typescript/src/views/TabBarIcon.d.ts.map +1 -1
- package/package.json +11 -16
- package/src/index.tsx +7 -2
- package/src/navigators/createBottomTabNavigator.tsx +78 -27
- package/src/types.tsx +417 -122
- package/src/utils/BottomTabAnimationContext.tsx +7 -0
- package/src/utils/useBottomTabAnimation.tsx +15 -0
- package/src/utils/useTabBarPosition.tsx +41 -0
- package/src/views/BottomTabBar.tsx +68 -67
- package/src/views/BottomTabItem.tsx +39 -34
- package/src/views/BottomTabViewCommon.tsx +26 -0
- package/src/views/{BottomTabView.tsx → BottomTabViewCustom.tsx} +142 -129
- package/src/views/BottomTabViewNative.android.tsx +1 -0
- package/src/views/BottomTabViewNative.ios.tsx +1 -0
- package/src/views/BottomTabViewNative.tsx +3 -0
- package/src/{unstable/NativeBottomTabView.native.tsx → views/BottomTabViewNativeImpl.tsx} +139 -116
- package/src/views/ScreenContent.tsx +58 -0
- package/src/views/TabBarIcon.tsx +63 -10
- package/lib/module/unstable/NativeBottomTabView.js +0 -6
- package/lib/module/unstable/NativeBottomTabView.js.map +0 -1
- package/lib/module/unstable/NativeBottomTabView.native.js.map +0 -1
- package/lib/module/unstable/NativeScreen/NativeScreen.js +0 -152
- package/lib/module/unstable/NativeScreen/NativeScreen.js.map +0 -1
- package/lib/module/unstable/NativeScreen/debounce.js +0 -12
- package/lib/module/unstable/NativeScreen/debounce.js.map +0 -1
- package/lib/module/unstable/NativeScreen/types.js +0 -4
- package/lib/module/unstable/NativeScreen/types.js.map +0 -1
- package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js +0 -12
- package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js.map +0 -1
- package/lib/module/unstable/NativeScreen/useHeaderConfig.js +0 -304
- package/lib/module/unstable/NativeScreen/useHeaderConfig.js.map +0 -1
- package/lib/module/unstable/createNativeBottomTabNavigator.js +0 -6
- package/lib/module/unstable/createNativeBottomTabNavigator.js.map +0 -1
- package/lib/module/unstable/createNativeBottomTabNavigator.native.js +0 -65
- package/lib/module/unstable/createNativeBottomTabNavigator.native.js.map +0 -1
- package/lib/module/unstable/index.js +0 -16
- package/lib/module/unstable/index.js.map +0 -1
- package/lib/module/unstable/types.js +0 -4
- package/lib/module/unstable/types.js.map +0 -1
- package/lib/module/views/BottomTabView.js.map +0 -1
- package/lib/module/views/ScreenFallback.js +0 -42
- package/lib/module/views/ScreenFallback.js.map +0 -1
- package/lib/typescript/src/unstable/NativeBottomTabView.d.ts +0 -10
- package/lib/typescript/src/unstable/NativeBottomTabView.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts +0 -10
- package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts +0 -8
- package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts +0 -2
- package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeScreen/types.d.ts +0 -523
- package/lib/typescript/src/unstable/NativeScreen/types.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts +0 -5
- package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts.map +0 -1
- package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts +0 -11
- package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts.map +0 -1
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts +0 -2
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts.map +0 -1
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts +0 -16
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts.map +0 -1
- package/lib/typescript/src/unstable/index.d.ts +0 -13
- package/lib/typescript/src/unstable/index.d.ts.map +0 -1
- package/lib/typescript/src/unstable/types.d.ts +0 -319
- package/lib/typescript/src/unstable/types.d.ts.map +0 -1
- package/lib/typescript/src/views/BottomTabView.d.ts.map +0 -1
- package/lib/typescript/src/views/ScreenFallback.d.ts +0 -18
- package/lib/typescript/src/views/ScreenFallback.d.ts.map +0 -1
- package/src/unstable/NativeBottomTabView.tsx +0 -20
- package/src/unstable/NativeScreen/NativeScreen.tsx +0 -212
- package/src/unstable/NativeScreen/debounce.tsx +0 -14
- package/src/unstable/NativeScreen/types.ts +0 -573
- package/src/unstable/NativeScreen/useAnimatedHeaderHeight.tsx +0 -18
- package/src/unstable/NativeScreen/useHeaderConfig.tsx +0 -434
- package/src/unstable/createNativeBottomTabNavigator.native.tsx +0 -116
- package/src/unstable/createNativeBottomTabNavigator.tsx +0 -4
- package/src/unstable/index.tsx +0 -23
- package/src/unstable/types.tsx +0 -405
- package/src/views/ScreenFallback.tsx +0 -50
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { getLabel } from '@react-navigation/elements';
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
+
Color,
|
|
3
4
|
Lazy,
|
|
4
5
|
SafeAreaProviderCompat,
|
|
5
|
-
|
|
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 {
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} from '
|
|
34
|
-
|
|
35
|
-
|
|
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:
|
|
38
|
-
descriptors:
|
|
37
|
+
navigation: BottomTabNavigationHelpers;
|
|
38
|
+
descriptors: BottomTabDescriptorMap;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
|
|
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,50 +97,53 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
87
97
|
|
|
88
98
|
const inactiveTintColor =
|
|
89
99
|
currentOptions.tabBarInactiveTintColor ??
|
|
90
|
-
Platform.select
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
+
|
|
129
131
|
const bottomAccessory = currentOptions.bottomAccessory;
|
|
130
132
|
|
|
131
133
|
return (
|
|
132
|
-
<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}
|
|
133
145
|
<BottomTabs
|
|
146
|
+
tabBarHidden={hasCustomTabBar}
|
|
134
147
|
bottomAccessory={
|
|
135
148
|
bottomAccessory
|
|
136
149
|
? (environment) => bottomAccessory({ placement: environment })
|
|
@@ -166,11 +179,18 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
166
179
|
);
|
|
167
180
|
|
|
168
181
|
if (route) {
|
|
169
|
-
navigation.emit({
|
|
182
|
+
const event = navigation.emit({
|
|
170
183
|
type: 'tabPress',
|
|
171
184
|
target: route.key,
|
|
185
|
+
canPreventDefault: true,
|
|
172
186
|
});
|
|
173
187
|
|
|
188
|
+
if (event.defaultPrevented) {
|
|
189
|
+
throw new Error(
|
|
190
|
+
"Preventing default for 'tabPress' is not supported with native tab bar."
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
174
194
|
const isFocused =
|
|
175
195
|
state.index ===
|
|
176
196
|
state.routes.findIndex((r) => r.key === route.key);
|
|
@@ -199,6 +219,8 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
199
219
|
tabBarSystemItem,
|
|
200
220
|
tabBarBlurEffect = dark ? 'systemMaterialDark' : 'systemMaterial',
|
|
201
221
|
tabBarStyle,
|
|
222
|
+
sceneStyle,
|
|
223
|
+
scrollEdgeEffects,
|
|
202
224
|
} = options;
|
|
203
225
|
|
|
204
226
|
const {
|
|
@@ -224,32 +246,45 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
224
246
|
tabBarBadgeStyle?.backgroundColor ?? colors.notification;
|
|
225
247
|
const badgeTextColor =
|
|
226
248
|
tabBarBadgeStyle?.color ??
|
|
227
|
-
(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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);
|
|
244
283
|
|
|
245
284
|
return (
|
|
246
285
|
<BottomTabsScreen
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
onWillAppear={() => onTransitionStart({ closing: false, route })}
|
|
251
|
-
onDidAppear={() => onTransitionEnd({ closing: false, route })}
|
|
252
|
-
onDidDisappear={() => onTransitionEnd({ closing: true, route })}
|
|
286
|
+
onWillAppear={() => onTransitionStart({ route })}
|
|
287
|
+
onDidAppear={() => onTransitionEnd({ route })}
|
|
253
288
|
key={route.key}
|
|
254
289
|
tabKey={route.key}
|
|
255
290
|
icon={icon}
|
|
@@ -260,6 +295,10 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
260
295
|
systemItem={tabBarSystemItem}
|
|
261
296
|
isFocused={isFocused}
|
|
262
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={{}}
|
|
263
302
|
standardAppearance={{
|
|
264
303
|
tabBarBackgroundColor,
|
|
265
304
|
tabBarShadowColor,
|
|
@@ -277,81 +316,65 @@ export function NativeBottomTabView({ state, navigation, descriptors }: Props) {
|
|
|
277
316
|
experimental_userInterfaceStyle={dark ? 'dark' : 'light'}
|
|
278
317
|
>
|
|
279
318
|
<Lazy enabled={lazy} visible={isFocused || isPreloaded}>
|
|
280
|
-
<
|
|
319
|
+
<ScreenContent
|
|
281
320
|
isFocused={isFocused}
|
|
282
321
|
route={route}
|
|
283
322
|
navigation={navigation}
|
|
284
323
|
options={options}
|
|
324
|
+
style={sceneStyle}
|
|
285
325
|
>
|
|
286
|
-
{
|
|
287
|
-
|
|
326
|
+
<AnimatedScreenContent isFocused={isFocused}>
|
|
327
|
+
<BottomTabBarHeightContext.Provider value={0}>
|
|
328
|
+
{render()}
|
|
329
|
+
</BottomTabBarHeightContext.Provider>
|
|
330
|
+
</AnimatedScreenContent>
|
|
331
|
+
</ScreenContent>
|
|
288
332
|
</Lazy>
|
|
289
333
|
</BottomTabsScreen>
|
|
290
334
|
);
|
|
291
335
|
})}
|
|
292
336
|
</BottomTabs>
|
|
337
|
+
{tabBarPosition === 'bottom' || tabBarPosition === 'right'
|
|
338
|
+
? tabBarElement
|
|
339
|
+
: null}
|
|
293
340
|
</SafeAreaProviderCompat>
|
|
294
341
|
);
|
|
295
342
|
}
|
|
296
343
|
|
|
297
|
-
function
|
|
344
|
+
function AnimatedScreenContent({
|
|
298
345
|
isFocused,
|
|
299
|
-
route,
|
|
300
|
-
navigation,
|
|
301
|
-
options,
|
|
302
346
|
children,
|
|
303
347
|
}: {
|
|
304
348
|
isFocused: boolean;
|
|
305
|
-
route: Route<string>;
|
|
306
|
-
navigation: NativeBottomTabNavigationProp<ParamListBase>;
|
|
307
|
-
options: NativeBottomTabNavigationOptions;
|
|
308
349
|
children: React.ReactNode;
|
|
309
350
|
}) {
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
headerShown = renderCustomHeader != null,
|
|
314
|
-
} = options;
|
|
315
|
-
|
|
316
|
-
const hasNativeHeader = headerShown && renderCustomHeader == null;
|
|
317
|
-
|
|
318
|
-
const [wasNativeHeaderShown] = React.useState(hasNativeHeader);
|
|
319
|
-
|
|
320
|
-
React.useEffect(() => {
|
|
321
|
-
if (wasNativeHeaderShown !== hasNativeHeader) {
|
|
322
|
-
throw new Error(
|
|
323
|
-
`Changing 'headerShown' or 'header' options dynamically is not supported when using native header.`
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
}, [wasNativeHeaderShown, hasNativeHeader]);
|
|
351
|
+
const [progress] = React.useState(
|
|
352
|
+
() => new Animated.Value(isFocused ? 1 : 0)
|
|
353
|
+
);
|
|
327
354
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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]);
|
|
335
369
|
|
|
336
370
|
return (
|
|
337
|
-
<
|
|
338
|
-
focused={isFocused}
|
|
339
|
-
route={route}
|
|
340
|
-
navigation={navigation}
|
|
341
|
-
headerShown={headerShown}
|
|
342
|
-
headerTransparent={headerTransparent}
|
|
343
|
-
header={renderCustomHeader?.({
|
|
344
|
-
route,
|
|
345
|
-
navigation,
|
|
346
|
-
options,
|
|
347
|
-
})}
|
|
348
|
-
>
|
|
371
|
+
<BottomTabAnimationContext.Provider value={interpolationProps}>
|
|
349
372
|
{children}
|
|
350
|
-
</
|
|
373
|
+
</BottomTabAnimationContext.Provider>
|
|
351
374
|
);
|
|
352
375
|
}
|
|
353
376
|
|
|
354
|
-
function getPlatformIcon(icon:
|
|
377
|
+
function getPlatformIcon(icon: BottomTabIcon): PlatformIcon {
|
|
355
378
|
return {
|
|
356
379
|
ios:
|
|
357
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
|
+
}
|
package/src/views/TabBarIcon.tsx
CHANGED
|
@@ -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
|
|
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:
|
|
21
|
-
inactiveTintColor:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
60
|
+
icon,
|
|
54
61
|
allowFontScaling,
|
|
55
62
|
style,
|
|
56
|
-
}:
|
|
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 +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","bottomAccessory","children","environment","placement","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","experimental_userInterfaceStyle","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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