@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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getHeaderTitle, Header } from '@react-navigation/elements';
|
|
4
|
+
import { Screen } from '@react-navigation/elements/internal';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function ScreenContent({
|
|
8
|
+
isFocused,
|
|
9
|
+
route,
|
|
10
|
+
navigation,
|
|
11
|
+
options,
|
|
12
|
+
style,
|
|
13
|
+
children
|
|
14
|
+
}) {
|
|
15
|
+
const {
|
|
16
|
+
headerTransparent,
|
|
17
|
+
header: renderCustomHeader,
|
|
18
|
+
headerShown = renderCustomHeader != null
|
|
19
|
+
} = options;
|
|
20
|
+
const hasDefaultHeader = headerShown && renderCustomHeader == null;
|
|
21
|
+
return /*#__PURE__*/_jsx(Screen, {
|
|
22
|
+
focused: isFocused,
|
|
23
|
+
route: route,
|
|
24
|
+
navigation: navigation,
|
|
25
|
+
headerShown: headerShown,
|
|
26
|
+
headerTransparent: headerTransparent,
|
|
27
|
+
header: hasDefaultHeader ? /*#__PURE__*/_jsx(Header, {
|
|
28
|
+
...options,
|
|
29
|
+
title: getHeaderTitle(options, route.name)
|
|
30
|
+
}) : renderCustomHeader?.({
|
|
31
|
+
route,
|
|
32
|
+
navigation,
|
|
33
|
+
options
|
|
34
|
+
}),
|
|
35
|
+
style: style,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ScreenContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getHeaderTitle","Header","Screen","React","jsx","_jsx","ScreenContent","isFocused","route","navigation","options","style","children","headerTransparent","header","renderCustomHeader","headerShown","hasDefaultHeader","focused","title","name"],"sourceRoot":"../../../src","sources":["views/ScreenContent.tsx"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,MAAM,QAAQ,4BAA4B;AACnE,SAASC,MAAM,QAAQ,qCAAqC;AAE5D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ/B,OAAO,SAASC,aAAaA,CAAC;EAC5BC,SAAS;EACTC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPC,KAAK;EACLC;AAQF,CAAC,EAAE;EACD,MAAM;IACJC,iBAAiB;IACjBC,MAAM,EAAEC,kBAAkB;IAC1BC,WAAW,GAAGD,kBAAkB,IAAI;EACtC,CAAC,GAAGL,OAAO;EAEX,MAAMO,gBAAgB,GAAGD,WAAW,IAAID,kBAAkB,IAAI,IAAI;EAElE,oBACEV,IAAA,CAACH,MAAM;IACLgB,OAAO,EAAEX,SAAU;IACnBC,KAAK,EAAEA,KAAM;IACbC,UAAU,EAAEA,UAAW;IACvBO,WAAW,EAAEA,WAAY;IACzBH,iBAAiB,EAAEA,iBAAkB;IACrCC,MAAM,EACJG,gBAAgB,gBACdZ,IAAA,CAACJ,MAAM;MAAA,GAAKS,OAAO;MAAES,KAAK,EAAEnB,cAAc,CAACU,OAAO,EAAEF,KAAK,CAACY,IAAI;IAAE,CAAE,CAAC,GAEnEL,kBAAkB,GAAG;MACnBP,KAAK;MACLC,UAAU;MACVC;IACF,CAAC,CAEJ;IACDC,KAAK,EAAEA,KAAM;IAAAC,QAAA,EAEZA;EAAQ,CACH,CAAC;AAEb","ignoreList":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Badge } from '@react-navigation/elements';
|
|
4
|
+
import { MissingIcon } from '@react-navigation/elements/internal';
|
|
4
5
|
import React from 'react';
|
|
5
|
-
import { StyleSheet, View } from 'react-native';
|
|
6
|
+
import { Image, StyleSheet, View } from 'react-native';
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
/**
|
|
8
9
|
* Icon sizes taken from Apple HIG
|
|
@@ -25,7 +26,7 @@ export function TabBarIcon({
|
|
|
25
26
|
inactiveOpacity,
|
|
26
27
|
activeTintColor,
|
|
27
28
|
inactiveTintColor,
|
|
28
|
-
|
|
29
|
+
icon,
|
|
29
30
|
allowFontScaling,
|
|
30
31
|
style
|
|
31
32
|
}) {
|
|
@@ -44,7 +45,8 @@ export function TabBarIcon({
|
|
|
44
45
|
children: renderIcon({
|
|
45
46
|
focused: true,
|
|
46
47
|
size: iconSize,
|
|
47
|
-
color: activeTintColor
|
|
48
|
+
color: activeTintColor,
|
|
49
|
+
icon
|
|
48
50
|
})
|
|
49
51
|
}), /*#__PURE__*/_jsx(View, {
|
|
50
52
|
style: [styles.icon, {
|
|
@@ -53,7 +55,8 @@ export function TabBarIcon({
|
|
|
53
55
|
children: renderIcon({
|
|
54
56
|
focused: false,
|
|
55
57
|
size: iconSize,
|
|
56
|
-
color: inactiveTintColor
|
|
58
|
+
color: inactiveTintColor,
|
|
59
|
+
icon
|
|
57
60
|
})
|
|
58
61
|
}), /*#__PURE__*/_jsx(Badge, {
|
|
59
62
|
visible: badge != null,
|
|
@@ -64,6 +67,39 @@ export function TabBarIcon({
|
|
|
64
67
|
})]
|
|
65
68
|
});
|
|
66
69
|
}
|
|
70
|
+
function renderIcon({
|
|
71
|
+
focused,
|
|
72
|
+
size,
|
|
73
|
+
color,
|
|
74
|
+
icon
|
|
75
|
+
}) {
|
|
76
|
+
const iconValue = typeof icon === 'function' ? icon({
|
|
77
|
+
focused,
|
|
78
|
+
size,
|
|
79
|
+
color
|
|
80
|
+
}) : icon;
|
|
81
|
+
if (/*#__PURE__*/React.isValidElement(iconValue)) {
|
|
82
|
+
return iconValue;
|
|
83
|
+
}
|
|
84
|
+
if (typeof iconValue === 'object' && iconValue != null && 'type' in iconValue) {
|
|
85
|
+
if (iconValue?.type === 'image') {
|
|
86
|
+
return /*#__PURE__*/_jsx(Image, {
|
|
87
|
+
source: iconValue.source,
|
|
88
|
+
style: {
|
|
89
|
+
width: size,
|
|
90
|
+
height: size,
|
|
91
|
+
tintColor: iconValue.tinted === false ? undefined : color
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
throw new Error(`Icon type '${iconValue.type}' is only supported with native tab bar.`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return /*#__PURE__*/_jsx(MissingIcon, {
|
|
99
|
+
color: color,
|
|
100
|
+
size: size
|
|
101
|
+
});
|
|
102
|
+
}
|
|
67
103
|
const styles = StyleSheet.create({
|
|
68
104
|
icon: {
|
|
69
105
|
// We render the icon twice at the same position on top of each other:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Badge","React","StyleSheet","View","jsx","_jsx","jsxs","_jsxs","ICON_SIZE_WIDE","ICON_SIZE_WIDE_COMPACT","ICON_SIZE_TALL","ICON_SIZE_TALL_COMPACT","ICON_SIZE_ROUND","ICON_SIZE_ROUND_COMPACT","ICON_SIZE_MATERIAL","TabBarIcon","route","_","variant","size","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","
|
|
1
|
+
{"version":3,"names":["Badge","MissingIcon","React","Image","StyleSheet","View","jsx","_jsx","jsxs","_jsxs","ICON_SIZE_WIDE","ICON_SIZE_WIDE_COMPACT","ICON_SIZE_TALL","ICON_SIZE_TALL_COMPACT","ICON_SIZE_ROUND","ICON_SIZE_ROUND_COMPACT","ICON_SIZE_MATERIAL","TabBarIcon","route","_","variant","size","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","icon","allowFontScaling","style","iconSize","styles","wrapperMaterial","wrapperUikitCompact","wrapperUikit","children","opacity","minWidth","renderIcon","focused","color","visible","iconValue","isValidElement","type","source","width","height","tintColor","tinted","undefined","Error","create","position","alignSelf","alignItems","justifyContent","end","top"],"sourceRoot":"../../../src","sources":["views/TabBarIcon.tsx"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,4BAA4B;AAClD,SAASC,WAAW,QAAQ,qCAAqC;AAEjE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAEEC,KAAK,EAELC,UAAU,EAEVC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyBtB;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,EAAE;AACzB,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,cAAc,GAAG,EAAE;AACzB,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,uBAAuB,GAAG,EAAE;AAClC,MAAMC,kBAAkB,GAAG,EAAE;AAE7B,OAAO,SAASC,UAAUA,CAAC;EACzBC,KAAK,EAAEC,CAAC;EACRC,OAAO;EACPC,IAAI;EACJC,KAAK;EACLC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC,eAAe;EACfC,iBAAiB;EACjBC,IAAI;EACJC,gBAAgB;EAChBC;AACe,CAAC,EAAE;EAClB,MAAMC,QAAQ,GACZX,OAAO,KAAK,UAAU,GAClBJ,kBAAkB,GAClBK,IAAI,KAAK,SAAS,GAChBN,uBAAuB,GACvBD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ACLgC,QAAQ,EAAE,UAAU;IACpBI,GAAG,EAAE,CAAC,CAAC;IACPC,GAAG,EAAE,CAAC;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,20 +8,21 @@ export { SceneStyleInterpolators, TransitionPresets, TransitionSpecs };
|
|
|
8
8
|
/**
|
|
9
9
|
* Navigators
|
|
10
10
|
*/
|
|
11
|
-
export { createBottomTabNavigator } from './navigators/createBottomTabNavigator';
|
|
11
|
+
export { createBottomTabNavigator, createBottomTabScreen, } from './navigators/createBottomTabNavigator';
|
|
12
12
|
/**
|
|
13
13
|
* Views
|
|
14
14
|
*/
|
|
15
15
|
export { BottomTabBar } from './views/BottomTabBar';
|
|
16
|
-
export { BottomTabView } from './views/
|
|
16
|
+
export { BottomTabView } from './views/BottomTabViewCommon';
|
|
17
17
|
/**
|
|
18
18
|
* Utilities
|
|
19
19
|
*/
|
|
20
20
|
export { BottomTabBarHeightCallbackContext } from './utils/BottomTabBarHeightCallbackContext';
|
|
21
21
|
export { BottomTabBarHeightContext } from './utils/BottomTabBarHeightContext';
|
|
22
|
+
export { useBottomTabAnimation } from './utils/useBottomTabAnimation';
|
|
22
23
|
export { useBottomTabBarHeight } from './utils/useBottomTabBarHeight';
|
|
23
24
|
/**
|
|
24
25
|
* Types
|
|
25
26
|
*/
|
|
26
|
-
export type { BottomTabBarButtonProps, BottomTabBarProps, BottomTabHeaderProps, BottomTabNavigationEventMap, BottomTabNavigationOptions, BottomTabNavigationProp, BottomTabNavigatorProps, BottomTabOptionsArgs, BottomTabScreenProps, } from './types';
|
|
27
|
+
export type { BottomTabBarButtonProps, BottomTabBarProps, BottomTabHeaderProps, BottomTabIcon, BottomTabNavigationEventMap, BottomTabNavigationOptions, BottomTabNavigationProp, BottomTabNavigatorProps, BottomTabOptionsArgs, BottomTabScreenProps, } from './types';
|
|
27
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,iBAAiB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAEvE;;GAEG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC;AAEvE;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,iBAAiB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAEvE;;GAEG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC;AAEvE;;GAEG;AACH,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAE/C;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;GAEG;AACH,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;GAEG;AACH,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ParamListBase, type StaticConfig, type StaticParamList, type StaticScreenConfig, type StaticScreenConfigLinking, type StaticScreenConfigScreen, type TabNavigationState, type TypedNavigator } from '@react-navigation/native';
|
|
2
2
|
import type { BottomTabNavigationEventMap, BottomTabNavigationOptions, BottomTabNavigationProp, BottomTabNavigatorProps } from '../types';
|
|
3
|
-
declare function BottomTabNavigator({
|
|
4
|
-
|
|
3
|
+
declare function BottomTabNavigator({ initialRouteName, backBehavior, routeNamesChangeBehavior, children, layout, screenListeners, screenOptions, screenLayout, router, ...rest }: BottomTabNavigatorProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type BottomTabTypeBag<ParamList extends {}> = {
|
|
5
5
|
ParamList: ParamList;
|
|
6
|
-
NavigatorID: NavigatorID;
|
|
7
6
|
State: TabNavigationState<ParamList>;
|
|
8
7
|
ScreenOptions: BottomTabNavigationOptions;
|
|
9
8
|
EventMap: BottomTabNavigationEventMap;
|
|
10
9
|
NavigationList: {
|
|
11
|
-
[RouteName in keyof ParamList]: BottomTabNavigationProp<ParamList, RouteName
|
|
10
|
+
[RouteName in keyof ParamList]: BottomTabNavigationProp<ParamList, RouteName>;
|
|
12
11
|
};
|
|
13
12
|
Navigator: typeof BottomTabNavigator;
|
|
14
|
-
}
|
|
13
|
+
};
|
|
14
|
+
export declare function createBottomTabNavigator<const ParamList extends ParamListBase>(): TypedNavigator<BottomTabTypeBag<ParamList>, undefined>;
|
|
15
|
+
export declare function createBottomTabNavigator<const Config extends StaticConfig<BottomTabTypeBag<ParamListBase>>>(config: Config): TypedNavigator<BottomTabTypeBag<StaticParamList<{
|
|
16
|
+
config: Config;
|
|
17
|
+
}>>, Config>;
|
|
18
|
+
export declare function createBottomTabScreen<const Linking extends StaticScreenConfigLinking, const Screen extends StaticScreenConfigScreen>(config: StaticScreenConfig<Linking, Screen, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, BottomTabNavigationProp<ParamListBase>>): StaticScreenConfig<Linking, Screen, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, BottomTabNavigationProp<ParamListBase>>;
|
|
15
19
|
export {};
|
|
16
20
|
//# sourceMappingURL=createBottomTabNavigator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBottomTabNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createBottomTabNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"createBottomTabNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createBottomTabNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAE7B,KAAK,kBAAkB,EAGvB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAGlB,iBAAS,kBAAkB,CAAC,EAC1B,gBAAgB,EAChB,YAAY,EACZ,wBAAwB,EACxB,QAAQ,EACR,MAAM,EACN,eAAe,EACf,aAAa,EACb,YAAY,EACZ,MAAM,EACN,GAAG,IAAI,EACR,EAAE,uBAAuB,2CAwDzB;AAED,KAAK,gBAAgB,CAAC,SAAS,SAAS,EAAE,IAAI;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACrC,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,cAAc,EAAE;SACb,SAAS,IAAI,MAAM,SAAS,GAAG,uBAAuB,CACrD,SAAS,EACT,SAAS,CACV;KACF,CAAC;IACF,SAAS,EAAE,OAAO,kBAAkB,CAAC;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