@react-navigation/bottom-tabs 7.0.0-rc.2 → 7.0.0-rc.21
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/commonjs/TransitionConfigs/TransitionPresets.js +2 -2
- package/lib/commonjs/index.js +9 -9
- package/lib/commonjs/navigators/createBottomTabNavigator.js +11 -11
- package/lib/commonjs/navigators/createBottomTabNavigator.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/utils/useBottomTabBarHeight.js +1 -1
- package/lib/commonjs/views/Badge.js +6 -4
- package/lib/commonjs/views/Badge.js.map +1 -1
- package/lib/commonjs/views/BottomTabBar.js +148 -118
- package/lib/commonjs/views/BottomTabBar.js.map +1 -1
- package/lib/commonjs/views/BottomTabItem.js +109 -63
- package/lib/commonjs/views/BottomTabItem.js.map +1 -1
- package/lib/commonjs/views/BottomTabView.js +108 -97
- package/lib/commonjs/views/BottomTabView.js.map +1 -1
- package/lib/commonjs/views/ScreenFallback.js +15 -9
- package/lib/commonjs/views/ScreenFallback.js.map +1 -1
- package/lib/commonjs/views/TabBarIcon.js +59 -37
- package/lib/commonjs/views/TabBarIcon.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionPresets.js +2 -2
- package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
- package/lib/module/index.js +9 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createBottomTabNavigator.js +11 -9
- package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/utils/useBottomTabBarHeight.js +1 -1
- package/lib/module/utils/useBottomTabBarHeight.js.map +1 -1
- package/lib/module/views/Badge.js +6 -4
- package/lib/module/views/Badge.js.map +1 -1
- package/lib/module/views/BottomTabBar.js +148 -118
- package/lib/module/views/BottomTabBar.js.map +1 -1
- package/lib/module/views/BottomTabItem.js +110 -64
- package/lib/module/views/BottomTabItem.js.map +1 -1
- package/lib/module/views/BottomTabView.js +108 -97
- package/lib/module/views/BottomTabView.js.map +1 -1
- package/lib/module/views/ScreenFallback.js +15 -9
- package/lib/module/views/ScreenFallback.js.map +1 -1
- package/lib/module/views/TabBarIcon.js +59 -37
- package/lib/module/views/TabBarIcon.js.map +1 -1
- package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts +2 -3
- package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +5 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/views/Badge.d.ts +1 -2
- package/lib/typescript/src/views/Badge.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabBar.d.ts +2 -3
- package/lib/typescript/src/views/BottomTabBar.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabItem.d.ts +9 -1
- package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabView.d.ts +1 -2
- package/lib/typescript/src/views/BottomTabView.d.ts.map +1 -1
- package/lib/typescript/src/views/ScreenFallback.d.ts +2 -2
- package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -1
- package/lib/typescript/src/views/TabBarIcon.d.ts +3 -2
- package/lib/typescript/src/views/TabBarIcon.d.ts.map +1 -1
- package/package.json +30 -14
- package/src/navigators/createBottomTabNavigator.tsx +1 -4
- package/src/types.tsx +7 -0
- package/src/views/BottomTabBar.tsx +90 -60
- package/src/views/BottomTabItem.tsx +156 -63
- package/src/views/TabBarIcon.tsx +55 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
1
|
import { getLabel, Label, PlatformPressable } from '@react-navigation/elements';
|
|
3
2
|
import { useTheme } from '@react-navigation/native';
|
|
4
3
|
import Color from 'color';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import { Platform, StyleSheet } from 'react-native';
|
|
7
|
-
import { TabBarIcon } from
|
|
5
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
6
|
+
import { TabBarIcon } from "./TabBarIcon.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export function BottomTabItem({
|
|
9
9
|
route,
|
|
10
10
|
href,
|
|
@@ -14,34 +14,20 @@ export function BottomTabItem({
|
|
|
14
14
|
icon,
|
|
15
15
|
badge,
|
|
16
16
|
badgeStyle,
|
|
17
|
-
button = ({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
style,
|
|
21
|
-
onPress,
|
|
22
|
-
accessibilityRole,
|
|
23
|
-
...rest
|
|
24
|
-
}) => {
|
|
25
|
-
return /*#__PURE__*/React.createElement(PlatformPressable, _extends({}, rest, {
|
|
26
|
-
android_ripple: {
|
|
27
|
-
borderless: true
|
|
28
|
-
},
|
|
29
|
-
pressOpacity: 1,
|
|
30
|
-
href: href,
|
|
31
|
-
accessibilityRole: accessibilityRole,
|
|
32
|
-
onPress: onPress,
|
|
33
|
-
style: style
|
|
34
|
-
}), children);
|
|
35
|
-
},
|
|
17
|
+
button = props => /*#__PURE__*/_jsx(PlatformPressable, {
|
|
18
|
+
...props
|
|
19
|
+
}),
|
|
36
20
|
accessibilityLabel,
|
|
37
21
|
testID,
|
|
38
22
|
onPress,
|
|
39
23
|
onLongPress,
|
|
40
24
|
horizontal,
|
|
25
|
+
compact,
|
|
26
|
+
sidebar,
|
|
41
27
|
variant,
|
|
42
28
|
activeTintColor: customActiveTintColor,
|
|
43
29
|
inactiveTintColor: customInactiveTintColor,
|
|
44
|
-
activeBackgroundColor
|
|
30
|
+
activeBackgroundColor: customActiveBackgroundColor,
|
|
45
31
|
inactiveBackgroundColor = 'transparent',
|
|
46
32
|
showLabel = true,
|
|
47
33
|
allowFontScaling,
|
|
@@ -53,15 +39,22 @@ export function BottomTabItem({
|
|
|
53
39
|
colors,
|
|
54
40
|
fonts
|
|
55
41
|
} = useTheme();
|
|
56
|
-
const activeTintColor = customActiveTintColor ===
|
|
57
|
-
const inactiveTintColor = customInactiveTintColor === undefined ? Color(colors.text).mix(Color(colors.card), 0.5).hex() : customInactiveTintColor;
|
|
42
|
+
const activeTintColor = customActiveTintColor ?? (variant === 'uikit' && sidebar && horizontal ? Color(colors.primary).isDark() ? 'white' : Color(colors.primary).darken(0.71).string() : colors.primary);
|
|
43
|
+
const inactiveTintColor = customInactiveTintColor === undefined ? variant === 'material' ? Color(colors.text).alpha(0.68).rgb().string() : Color(colors.text).mix(Color(colors.card), 0.5).hex() : customInactiveTintColor;
|
|
44
|
+
const activeBackgroundColor = customActiveBackgroundColor ?? (variant === 'material' ? Color(activeTintColor).alpha(0.12).rgb().string() : sidebar && horizontal ? colors.primary : 'transparent');
|
|
45
|
+
let labelInactiveTintColor = inactiveTintColor;
|
|
46
|
+
let iconInactiveTintColor = inactiveTintColor;
|
|
47
|
+
if (variant === 'uikit' && sidebar && horizontal && customInactiveTintColor === undefined) {
|
|
48
|
+
iconInactiveTintColor = colors.primary;
|
|
49
|
+
labelInactiveTintColor = colors.text;
|
|
50
|
+
}
|
|
58
51
|
const renderLabel = ({
|
|
59
52
|
focused
|
|
60
53
|
}) => {
|
|
61
54
|
if (showLabel === false) {
|
|
62
55
|
return null;
|
|
63
56
|
}
|
|
64
|
-
const color = focused ? activeTintColor :
|
|
57
|
+
const color = focused ? activeTintColor : labelInactiveTintColor;
|
|
65
58
|
if (typeof label !== 'string') {
|
|
66
59
|
const {
|
|
67
60
|
options
|
|
@@ -77,13 +70,14 @@ export function BottomTabItem({
|
|
|
77
70
|
children
|
|
78
71
|
});
|
|
79
72
|
}
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
-
style: [horizontal ? [styles.labelBeside, {
|
|
82
|
-
marginStart:
|
|
83
|
-
}
|
|
73
|
+
return /*#__PURE__*/_jsx(Label, {
|
|
74
|
+
style: [horizontal ? [styles.labelBeside, variant === 'material' ? styles.labelSidebarMaterial : sidebar ? styles.labelSidebarUiKit : compact ? styles.labelBesideUikitCompact : styles.labelBesideUikit, icon == null && {
|
|
75
|
+
marginStart: 0
|
|
76
|
+
}] : styles.labelBeneath, compact || variant === 'uikit' && sidebar && horizontal ? fonts.regular : fonts.medium, labelStyle],
|
|
84
77
|
allowFontScaling: allowFontScaling,
|
|
85
|
-
tintColor: color
|
|
86
|
-
|
|
78
|
+
tintColor: color,
|
|
79
|
+
children: label
|
|
80
|
+
});
|
|
87
81
|
};
|
|
88
82
|
const renderIcon = ({
|
|
89
83
|
focused
|
|
@@ -93,15 +87,16 @@ export function BottomTabItem({
|
|
|
93
87
|
}
|
|
94
88
|
const activeOpacity = focused ? 1 : 0;
|
|
95
89
|
const inactiveOpacity = focused ? 0 : 1;
|
|
96
|
-
return /*#__PURE__*/
|
|
90
|
+
return /*#__PURE__*/_jsx(TabBarIcon, {
|
|
97
91
|
route: route,
|
|
98
|
-
|
|
92
|
+
variant: variant,
|
|
93
|
+
size: compact ? 'compact' : 'regular',
|
|
99
94
|
badge: badge,
|
|
100
95
|
badgeStyle: badgeStyle,
|
|
101
96
|
activeOpacity: activeOpacity,
|
|
102
97
|
inactiveOpacity: inactiveOpacity,
|
|
103
98
|
activeTintColor: activeTintColor,
|
|
104
|
-
inactiveTintColor:
|
|
99
|
+
inactiveTintColor: iconInactiveTintColor,
|
|
105
100
|
renderIcon: icon,
|
|
106
101
|
style: iconStyle
|
|
107
102
|
});
|
|
@@ -111,26 +106,49 @@ export function BottomTabItem({
|
|
|
111
106
|
focused
|
|
112
107
|
};
|
|
113
108
|
const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
//
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
109
|
+
const {
|
|
110
|
+
flex
|
|
111
|
+
} = StyleSheet.flatten(style || {});
|
|
112
|
+
const borderRadius = variant === 'material' ? horizontal ? 56 : 16 : sidebar && horizontal ? 10 : 0;
|
|
113
|
+
return /*#__PURE__*/_jsx(View, {
|
|
114
|
+
style: [
|
|
115
|
+
// Clip ripple effect on Android
|
|
116
|
+
{
|
|
117
|
+
borderRadius,
|
|
118
|
+
overflow: variant === 'material' ? 'hidden' : 'visible'
|
|
119
|
+
}, style],
|
|
120
|
+
children: button({
|
|
121
|
+
href,
|
|
122
|
+
onPress,
|
|
123
|
+
onLongPress,
|
|
124
|
+
testID,
|
|
125
|
+
accessibilityLabel,
|
|
126
|
+
// FIXME: accessibilityRole: 'tab' doesn't seem to work as expected on iOS
|
|
127
|
+
accessibilityRole: Platform.select({
|
|
128
|
+
ios: 'button',
|
|
129
|
+
default: 'tab'
|
|
130
|
+
}),
|
|
131
|
+
accessibilityState: {
|
|
132
|
+
selected: focused
|
|
133
|
+
},
|
|
134
|
+
// @ts-expect-error: keep for compatibility with older React Native versions
|
|
135
|
+
accessibilityStates: focused ? ['selected'] : [],
|
|
136
|
+
android_ripple: {
|
|
137
|
+
borderless: true
|
|
138
|
+
},
|
|
139
|
+
hoverEffect: variant === 'material' || sidebar && horizontal ? {
|
|
140
|
+
color: colors.text
|
|
141
|
+
} : undefined,
|
|
142
|
+
pressOpacity: 1,
|
|
143
|
+
style: [styles.tab, {
|
|
144
|
+
flex,
|
|
145
|
+
backgroundColor,
|
|
146
|
+
borderRadius
|
|
147
|
+
}, sidebar ? variant === 'material' ? horizontal ? styles.tabBarSidebarMaterial : styles.tabVerticalMaterial : horizontal ? styles.tabBarSidebarUiKit : styles.tabVerticalUiKit : variant === 'material' ? styles.tabVerticalMaterial : horizontal ? styles.tabHorizontalUiKit : styles.tabVerticalUiKit],
|
|
148
|
+
children: /*#__PURE__*/_jsxs(React.Fragment, {
|
|
149
|
+
children: [renderIcon(scene), renderLabel(scene)]
|
|
150
|
+
})
|
|
151
|
+
})
|
|
134
152
|
});
|
|
135
153
|
}
|
|
136
154
|
const styles = StyleSheet.create({
|
|
@@ -139,28 +157,56 @@ const styles = StyleSheet.create({
|
|
|
139
157
|
// Roundness for iPad hover effect
|
|
140
158
|
borderRadius: 10
|
|
141
159
|
},
|
|
142
|
-
|
|
143
|
-
justifyContent: 'flex-
|
|
144
|
-
flexDirection: 'column'
|
|
160
|
+
tabVerticalUiKit: {
|
|
161
|
+
justifyContent: 'flex-start',
|
|
162
|
+
flexDirection: 'column',
|
|
163
|
+
padding: 5
|
|
164
|
+
},
|
|
165
|
+
tabVerticalMaterial: {
|
|
166
|
+
padding: 10
|
|
145
167
|
},
|
|
146
|
-
|
|
168
|
+
tabHorizontalUiKit: {
|
|
147
169
|
justifyContent: 'center',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
flexDirection: 'row',
|
|
172
|
+
padding: 5
|
|
173
|
+
},
|
|
174
|
+
tabBarSidebarUiKit: {
|
|
175
|
+
justifyContent: 'flex-start',
|
|
176
|
+
alignItems: 'center',
|
|
148
177
|
flexDirection: 'row',
|
|
149
|
-
paddingVertical:
|
|
178
|
+
paddingVertical: 7,
|
|
179
|
+
paddingHorizontal: 5
|
|
180
|
+
},
|
|
181
|
+
tabBarSidebarMaterial: {
|
|
182
|
+
justifyContent: 'flex-start',
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
flexDirection: 'row',
|
|
185
|
+
paddingVertical: 15,
|
|
150
186
|
paddingStart: 16,
|
|
151
187
|
paddingEnd: 24
|
|
152
188
|
},
|
|
189
|
+
labelSidebarMaterial: {
|
|
190
|
+
marginStart: 12
|
|
191
|
+
},
|
|
192
|
+
labelSidebarUiKit: {
|
|
193
|
+
fontSize: 17,
|
|
194
|
+
marginStart: 10
|
|
195
|
+
},
|
|
153
196
|
labelBeneath: {
|
|
154
197
|
fontSize: 10
|
|
155
198
|
},
|
|
156
199
|
labelBeside: {
|
|
157
200
|
marginEnd: 12,
|
|
158
|
-
|
|
159
|
-
lineHeight: 24,
|
|
160
|
-
marginStart: 20
|
|
201
|
+
lineHeight: 24
|
|
161
202
|
},
|
|
162
203
|
labelBesideUikit: {
|
|
163
|
-
fontSize: 13
|
|
204
|
+
fontSize: 13,
|
|
205
|
+
marginStart: 5
|
|
206
|
+
},
|
|
207
|
+
labelBesideUikitCompact: {
|
|
208
|
+
fontSize: 12,
|
|
209
|
+
marginStart: 5
|
|
164
210
|
}
|
|
165
211
|
});
|
|
166
212
|
//# sourceMappingURL=BottomTabItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getLabel","Label","PlatformPressable","useTheme","Color","React","Platform","StyleSheet","TabBarIcon","BottomTabItem","route","href","focused","descriptor","label","icon","badge","badgeStyle","button","
|
|
1
|
+
{"version":3,"names":["getLabel","Label","PlatformPressable","useTheme","Color","React","Platform","StyleSheet","View","TabBarIcon","jsx","_jsx","jsxs","_jsxs","BottomTabItem","route","href","focused","descriptor","label","icon","badge","badgeStyle","button","props","accessibilityLabel","testID","onPress","onLongPress","horizontal","compact","sidebar","variant","activeTintColor","customActiveTintColor","inactiveTintColor","customInactiveTintColor","activeBackgroundColor","customActiveBackgroundColor","inactiveBackgroundColor","showLabel","allowFontScaling","labelStyle","iconStyle","style","colors","fonts","primary","isDark","darken","string","undefined","text","alpha","rgb","mix","card","hex","labelInactiveTintColor","iconInactiveTintColor","renderLabel","color","options","children","tabBarLabel","title","name","position","styles","labelBeside","labelSidebarMaterial","labelSidebarUiKit","labelBesideUikitCompact","labelBesideUikit","marginStart","labelBeneath","regular","medium","tintColor","renderIcon","activeOpacity","inactiveOpacity","size","scene","backgroundColor","flex","flatten","borderRadius","overflow","accessibilityRole","select","ios","default","accessibilityState","selected","accessibilityStates","android_ripple","borderless","hoverEffect","pressOpacity","tab","tabBarSidebarMaterial","tabVerticalMaterial","tabBarSidebarUiKit","tabVerticalUiKit","tabHorizontalUiKit","Fragment","create","alignItems","justifyContent","flexDirection","padding","paddingVertical","paddingHorizontal","paddingStart","paddingEnd","fontSize","marginEnd","lineHeight"],"sourceRoot":"../../../src","sources":["views/BottomTabItem.tsx"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,KAAK,EAAEC,iBAAiB,QAAQ,4BAA4B;AAC/E,SAAqBC,QAAQ,QAAQ,0BAA0B;AAC/D,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAEEC,QAAQ,EAERC,UAAU,EAEVC,IAAI,QAEC,cAAc;AAOrB,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA6H1C,OAAO,SAASC,aAAaA,CAAC;EAC5BC,KAAK;EACLC,IAAI;EACJC,OAAO;EACPC,UAAU;EACVC,KAAK;EACLC,IAAI;EACJC,KAAK;EACLC,UAAU;EACVC,MAAM,GAAIC,KAA8B,iBAAKb,IAAA,CAACT,iBAAiB;IAAA,GAAKsB;EAAK,CAAG,CAAC;EAC7EC,kBAAkB;EAClBC,MAAM;EACNC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,eAAe,EAAEC,qBAAqB;EACtCC,iBAAiB,EAAEC,uBAAuB;EAC1CC,qBAAqB,EAAEC,2BAA2B;EAClDC,uBAAuB,GAAG,aAAa;EACvCC,SAAS,GAAG,IAAI;EAChBC,gBAAgB;EAChBC,UAAU;EACVC,SAAS;EACTC;AACK,CAAC,EAAE;EACR,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG3C,QAAQ,CAAC,CAAC;EAEpC,MAAM8B,eAAe,GACnBC,qBAAqB,KACpBF,OAAO,KAAK,OAAO,IAAID,OAAO,IAAIF,UAAU,GACzCzB,KAAK,CAACyC,MA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;IAClBI,cAAc,EAAE,QAAQ;IACxBD,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,KAAK;IACpBC,OAAO,EAAE;EACX,CAAC;EACDR,kBAAkB,EAAE;IAClBM,cAAc,EAAE,YAAY;IAC5BD,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,KAAK;IACpBE,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB,CAAC;EACDZ,qBAAqB,EAAE;IACrBQ,cAAc,EAAE,YAAY;IAC5BD,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,KAAK;IACpBE,eAAe,EAAE,EAAE;IACnBE,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC;EACD7C,oBAAoB,EAAE;IACpBI,WAAW,EAAE;EACf,CAAC;EACDH,iBAAiB,EAAE;IACjB6C,QAAQ,EAAE,EAAE;IACZ1C,WAAW,EAAE;EACf,CAAC;EACDC,YAAY,EAAE;IACZyC,QAAQ,EAAE;EACZ,CAAC;EACD/C,WAAW,EAAE;IACXgD,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE;EACd,CAAC;EACD7C,gBAAgB,EAAE;IAChB2C,QAAQ,EAAE,EAAE;IACZ1C,WAAW,EAAE;EACf,CAAC;EACDF,uBAAuB,EAAE;IACvB4C,QAAQ,EAAE,EAAE;IACZ1C,WAAW,EAAE;EACf;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
1
|
import { getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
|
|
3
2
|
import { StackActions, useLocale } from '@react-navigation/native';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { Animated, Platform, StyleSheet } from 'react-native';
|
|
6
5
|
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
7
|
-
import { FadeTransition, ShiftTransition } from
|
|
8
|
-
import { BottomTabBarHeightCallbackContext } from
|
|
9
|
-
import { BottomTabBarHeightContext } from
|
|
10
|
-
import { useAnimatedHashMap } from
|
|
11
|
-
import { BottomTabBar, getTabBarHeight } from
|
|
12
|
-
import { MaybeScreen, MaybeScreenContainer } from
|
|
6
|
+
import { FadeTransition, ShiftTransition } from "../TransitionConfigs/TransitionPresets.js";
|
|
7
|
+
import { BottomTabBarHeightCallbackContext } from "../utils/BottomTabBarHeightCallbackContext.js";
|
|
8
|
+
import { BottomTabBarHeightContext } from "../utils/BottomTabBarHeightContext.js";
|
|
9
|
+
import { useAnimatedHashMap } from "../utils/useAnimatedHashMap.js";
|
|
10
|
+
import { BottomTabBar, getTabBarHeight } from "./BottomTabBar.js";
|
|
11
|
+
import { MaybeScreen, MaybeScreenContainer } from "./ScreenFallback.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const EPSILON = 1e-5;
|
|
14
14
|
const STATE_INACTIVE = 0;
|
|
15
15
|
const STATE_TRANSITIONING_OR_BELOW_TOP = 1;
|
|
@@ -39,7 +39,9 @@ const hasAnimation = options => {
|
|
|
39
39
|
};
|
|
40
40
|
export function BottomTabView(props) {
|
|
41
41
|
const {
|
|
42
|
-
tabBar = props => /*#__PURE__*/
|
|
42
|
+
tabBar = props => /*#__PURE__*/_jsx(BottomTabBar, {
|
|
43
|
+
...props
|
|
44
|
+
}),
|
|
43
45
|
state,
|
|
44
46
|
navigation,
|
|
45
47
|
descriptors,
|
|
@@ -119,17 +121,19 @@ export function BottomTabView(props) {
|
|
|
119
121
|
style: descriptors[state.routes[state.index].key].options.tabBarStyle
|
|
120
122
|
}));
|
|
121
123
|
const renderTabBar = () => {
|
|
122
|
-
return /*#__PURE__*/
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
return /*#__PURE__*/_jsx(SafeAreaInsetsContext.Consumer, {
|
|
125
|
+
children: insets => tabBar({
|
|
126
|
+
state: state,
|
|
127
|
+
descriptors: descriptors,
|
|
128
|
+
navigation: navigation,
|
|
129
|
+
insets: {
|
|
130
|
+
top: safeAreaInsets?.top ?? insets?.top ?? 0,
|
|
131
|
+
right: safeAreaInsets?.right ?? insets?.right ?? 0,
|
|
132
|
+
bottom: safeAreaInsets?.bottom ?? insets?.bottom ?? 0,
|
|
133
|
+
left: safeAreaInsets?.left ?? insets?.left ?? 0
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
});
|
|
133
137
|
};
|
|
134
138
|
const {
|
|
135
139
|
routes
|
|
@@ -140,87 +144,94 @@ export function BottomTabView(props) {
|
|
|
140
144
|
const {
|
|
141
145
|
tabBarPosition = 'bottom'
|
|
142
146
|
} = descriptors[focusedRouteKey].options;
|
|
143
|
-
return /*#__PURE__*/
|
|
147
|
+
return /*#__PURE__*/_jsxs(SafeAreaProviderCompat, {
|
|
144
148
|
style: {
|
|
145
149
|
flexDirection: tabBarPosition === 'left' || tabBarPosition === 'right' ? tabBarPosition === 'left' && direction === 'ltr' || tabBarPosition === 'right' && direction === 'rtl' ? 'row-reverse' : 'row' : 'column'
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
hasTwoStates: hasTwoStates,
|
|
152
|
-
style: styles.screens
|
|
153
|
-
}, routes.map((route, index) => {
|
|
154
|
-
const descriptor = descriptors[route.key];
|
|
155
|
-
const {
|
|
156
|
-
lazy = true,
|
|
157
|
-
animation = 'none',
|
|
158
|
-
sceneStyleInterpolator = NAMED_TRANSITIONS_PRESETS[animation].sceneStyleInterpolator
|
|
159
|
-
} = descriptor.options;
|
|
160
|
-
const isFocused = state.index === index;
|
|
161
|
-
if (lazy && !loaded.includes(route.key) && !isFocused && !state.preloadedRouteKeys.includes(route.key)) {
|
|
162
|
-
// Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
const {
|
|
166
|
-
freezeOnBlur,
|
|
167
|
-
header = ({
|
|
168
|
-
layout,
|
|
169
|
-
options
|
|
170
|
-
}) => /*#__PURE__*/React.createElement(Header, _extends({}, options, {
|
|
171
|
-
layout: layout,
|
|
172
|
-
title: getHeaderTitle(options, route.name)
|
|
173
|
-
})),
|
|
174
|
-
headerShown,
|
|
175
|
-
headerStatusBarHeight,
|
|
176
|
-
headerTransparent
|
|
177
|
-
} = descriptor.options;
|
|
178
|
-
const {
|
|
179
|
-
sceneStyle
|
|
180
|
-
} = sceneStyleInterpolator?.({
|
|
181
|
-
current: {
|
|
182
|
-
progress: tabAnims[route.key]
|
|
183
|
-
}
|
|
184
|
-
}) ?? {};
|
|
185
|
-
const animationEnabled = hasAnimation(descriptor.options);
|
|
186
|
-
const activityState = isFocused ? STATE_ON_TOP // the screen is on top after the transition
|
|
187
|
-
: animationEnabled // is animation is not enabled, immediately move to inactive state
|
|
188
|
-
? tabAnims[route.key].interpolate({
|
|
189
|
-
inputRange: [0, 1 - EPSILON, 1],
|
|
190
|
-
outputRange: [STATE_TRANSITIONING_OR_BELOW_TOP,
|
|
191
|
-
// screen visible during transition
|
|
192
|
-
STATE_TRANSITIONING_OR_BELOW_TOP, STATE_INACTIVE // the screen is detached after transition
|
|
193
|
-
],
|
|
194
|
-
extrapolate: 'extend'
|
|
195
|
-
}) : STATE_INACTIVE;
|
|
196
|
-
return /*#__PURE__*/React.createElement(MaybeScreen, {
|
|
197
|
-
key: route.key,
|
|
198
|
-
style: [StyleSheet.absoluteFill, {
|
|
199
|
-
zIndex: isFocused ? 0 : -1
|
|
200
|
-
}],
|
|
201
|
-
active: activityState,
|
|
150
|
+
},
|
|
151
|
+
children: [tabBarPosition === 'top' ? /*#__PURE__*/_jsx(BottomTabBarHeightCallbackContext.Provider, {
|
|
152
|
+
value: setTabBarHeight,
|
|
153
|
+
children: renderTabBar()
|
|
154
|
+
}) : null, /*#__PURE__*/_jsx(MaybeScreenContainer, {
|
|
202
155
|
enabled: detachInactiveScreens,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
156
|
+
hasTwoStates: hasTwoStates,
|
|
157
|
+
style: styles.screens,
|
|
158
|
+
children: routes.map((route, index) => {
|
|
159
|
+
const descriptor = descriptors[route.key];
|
|
160
|
+
const {
|
|
161
|
+
lazy = true,
|
|
162
|
+
animation = 'none',
|
|
163
|
+
sceneStyleInterpolator = NAMED_TRANSITIONS_PRESETS[animation].sceneStyleInterpolator
|
|
164
|
+
} = descriptor.options;
|
|
165
|
+
const isFocused = state.index === index;
|
|
166
|
+
if (lazy && !loaded.includes(route.key) && !isFocused && !state.preloadedRouteKeys.includes(route.key)) {
|
|
167
|
+
// Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
const {
|
|
171
|
+
freezeOnBlur,
|
|
172
|
+
header = ({
|
|
173
|
+
layout,
|
|
174
|
+
options
|
|
175
|
+
}) => /*#__PURE__*/_jsx(Header, {
|
|
176
|
+
...options,
|
|
177
|
+
layout: layout,
|
|
178
|
+
title: getHeaderTitle(options, route.name)
|
|
179
|
+
}),
|
|
180
|
+
headerShown,
|
|
181
|
+
headerStatusBarHeight,
|
|
182
|
+
headerTransparent
|
|
183
|
+
} = descriptor.options;
|
|
184
|
+
const {
|
|
185
|
+
sceneStyle
|
|
186
|
+
} = sceneStyleInterpolator?.({
|
|
187
|
+
current: {
|
|
188
|
+
progress: tabAnims[route.key]
|
|
189
|
+
}
|
|
190
|
+
}) ?? {};
|
|
191
|
+
const animationEnabled = hasAnimation(descriptor.options);
|
|
192
|
+
const activityState = isFocused ? STATE_ON_TOP // the screen is on top after the transition
|
|
193
|
+
: animationEnabled // is animation is not enabled, immediately move to inactive state
|
|
194
|
+
? tabAnims[route.key].interpolate({
|
|
195
|
+
inputRange: [0, 1 - EPSILON, 1],
|
|
196
|
+
outputRange: [STATE_TRANSITIONING_OR_BELOW_TOP,
|
|
197
|
+
// screen visible during transition
|
|
198
|
+
STATE_TRANSITIONING_OR_BELOW_TOP, STATE_INACTIVE // the screen is detached after transition
|
|
199
|
+
],
|
|
200
|
+
extrapolate: 'extend'
|
|
201
|
+
}) : STATE_INACTIVE;
|
|
202
|
+
return /*#__PURE__*/_jsx(MaybeScreen, {
|
|
203
|
+
style: [StyleSheet.absoluteFill, {
|
|
204
|
+
zIndex: isFocused ? 0 : -1
|
|
205
|
+
}],
|
|
206
|
+
active: activityState,
|
|
207
|
+
enabled: detachInactiveScreens,
|
|
208
|
+
freezeOnBlur: freezeOnBlur,
|
|
209
|
+
children: /*#__PURE__*/_jsx(BottomTabBarHeightContext.Provider, {
|
|
210
|
+
value: tabBarPosition === 'bottom' ? tabBarHeight : 0,
|
|
211
|
+
children: /*#__PURE__*/_jsx(Screen, {
|
|
212
|
+
focused: isFocused,
|
|
213
|
+
route: descriptor.route,
|
|
214
|
+
navigation: descriptor.navigation,
|
|
215
|
+
headerShown: headerShown,
|
|
216
|
+
headerStatusBarHeight: headerStatusBarHeight,
|
|
217
|
+
headerTransparent: headerTransparent,
|
|
218
|
+
header: header({
|
|
219
|
+
layout: dimensions,
|
|
220
|
+
route: descriptor.route,
|
|
221
|
+
navigation: descriptor.navigation,
|
|
222
|
+
options: descriptor.options
|
|
223
|
+
}),
|
|
224
|
+
style: [sceneContainerStyle, animationEnabled && sceneStyle],
|
|
225
|
+
children: descriptor.render()
|
|
226
|
+
})
|
|
227
|
+
})
|
|
228
|
+
}, route.key);
|
|
229
|
+
})
|
|
230
|
+
}), tabBarPosition !== 'top' ? /*#__PURE__*/_jsx(BottomTabBarHeightCallbackContext.Provider, {
|
|
231
|
+
value: setTabBarHeight,
|
|
232
|
+
children: renderTabBar()
|
|
233
|
+
}) : null]
|
|
234
|
+
});
|
|
224
235
|
}
|
|
225
236
|
const styles = StyleSheet.create({
|
|
226
237
|
screens: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","StackActions","useLocale","React","Animated","Platform","StyleSheet","SafeAreaInsetsContext","FadeTransition","ShiftTransition","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","useAnimatedHashMap","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","EPSILON","STATE_INACTIVE","STATE_TRANSITIONING_OR_BELOW_TOP","STATE_ON_TOP","NAMED_TRANSITIONS_PRESETS","fade","shift","none","sceneStyleInterpolator","undefined","transitionSpec","animation","config","duration","hasAnimation","options","BottomTabView","props","tabBar","
|
|
1
|
+
{"version":3,"names":["getHeaderTitle","Header","SafeAreaProviderCompat","Screen","StackActions","useLocale","React","Animated","Platform","StyleSheet","SafeAreaInsetsContext","FadeTransition","ShiftTransition","BottomTabBarHeightCallbackContext","BottomTabBarHeightContext","useAnimatedHashMap","BottomTabBar","getTabBarHeight","MaybeScreen","MaybeScreenContainer","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","hasAnimation","options","BottomTabView","props","tabBar","state","navigation","descriptors","safeAreaInsets","detachInactiveScreens","OS","sceneContainerStyle","focusedRouteKey","routes","index","key","direction","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","tabAnims","useEffect","previousRouteKey","current","popToTopAction","popToTopOnBlur","prevRoute","find","route","type","popToTop","target","animateToIndex","parallel","map","spec","toValue","useNativeDriver","filter","Boolean","start","finished","dispatch","dimensions","initialMetrics","frame","tabBarHeight","setTabBarHeight","insets","style","tabBarStyle","renderTabBar","Consumer","children","top","right","bottom","left","hasTwoStates","some","tabBarPosition","flexDirection","Provider","value","enabled","styles","screens","descriptor","lazy","isFocused","preloadedRouteKeys","freezeOnBlur","header","layout","title","name","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","progress","animationEnabled","activityState","interpolate","inputRange","outputRange","extrapolate","absoluteFill","zIndex","active","focused","render","create","flex","overflow"],"sourceRoot":"../../../src","sources":["views/BottomTabView.tsx"],"mappings":"AAAA,SACEA,cAAc,EACdC,MAAM,EACNC,sBAAsB,EACtBC,MAAM,QACD,4BAA4B;AACnC,SAGEC,YAAY,EAEZC,SAAS,QACJ,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAC7D,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SACEC,cAAc,EACdC,eAAe,QACV,2CAAwC;AAU/C,SAASC,iCAAiC,QAAQ,+CAA4C;AAC9F,SAASC,yBAAyB,QAAQ,uCAAoC;AAC9E,SAASC,kBAAkB,QAAQ,gCAA6B;AAChE,SAASC,YAAY,EAAEC,eAAe,QAAQ,mBAAgB;AAC9D,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQrE,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,gCAAgC,GAAG,CAAC;AAC1C,MAAMC,YAAY,GAAG,CAAC;AAEtB,MAAMC,yBAAyB,GAAG;EAChCC,IAAI,EAAElB,cAAc;EACpBmB,KAAK,EAAEl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