@react-navigation/bottom-tabs 8.0.0-alpha.12 → 8.0.0-alpha.14
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/navigators/createBottomTabNavigator.js +1 -18
- package/lib/module/navigators/createBottomTabNavigator.js.map +1 -1
- package/lib/module/views/BottomTabViewCustom.js +66 -62
- package/lib/module/views/BottomTabViewCustom.js.map +1 -1
- package/lib/module/views/BottomTabViewNativeImpl.js +54 -12
- package/lib/module/views/BottomTabViewNativeImpl.js.map +1 -1
- package/lib/typescript/src/navigators/createBottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +21 -12
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabItem.d.ts +16 -16
- package/lib/typescript/src/views/BottomTabItem.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabViewCustom.d.ts +1 -1
- package/lib/typescript/src/views/BottomTabViewCustom.d.ts.map +1 -1
- package/lib/typescript/src/views/BottomTabViewNativeImpl.d.ts.map +1 -1
- package/lib/typescript/src/views/TabBarIcon.d.ts +3 -3
- package/lib/typescript/src/views/TabBarIcon.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/navigators/createBottomTabNavigator.tsx +0 -28
- package/src/types.tsx +22 -13
- package/src/views/BottomTabItem.tsx +16 -16
- package/src/views/BottomTabViewCustom.tsx +127 -114
- package/src/views/BottomTabViewNativeImpl.tsx +92 -21
- package/src/views/TabBarIcon.tsx +3 -3
|
@@ -129,7 +129,7 @@ type BottomTabCustomOptions = {
|
|
|
129
129
|
*
|
|
130
130
|
* Only supported with `custom` implementation.
|
|
131
131
|
*/
|
|
132
|
-
tabBarLabelPosition?: LabelPosition;
|
|
132
|
+
tabBarLabelPosition?: LabelPosition | undefined;
|
|
133
133
|
/**
|
|
134
134
|
* Whether label font should scale to respect Text Size accessibility settings.
|
|
135
135
|
*
|
|
@@ -412,7 +412,7 @@ export type BottomTabNavigationOptions = {
|
|
|
412
412
|
/**
|
|
413
413
|
* Text to show in a badge on the tab icon.
|
|
414
414
|
*/
|
|
415
|
-
tabBarBadge?: number | string;
|
|
415
|
+
tabBarBadge?: number | string | undefined;
|
|
416
416
|
/**
|
|
417
417
|
* Custom style for the tab bar badge.
|
|
418
418
|
* You can specify a background color or text color here.
|
|
@@ -428,7 +428,7 @@ export type BottomTabNavigationOptions = {
|
|
|
428
428
|
/**
|
|
429
429
|
* Color for the icon and label in the active tab.
|
|
430
430
|
*/
|
|
431
|
-
tabBarActiveTintColor?: ColorValue;
|
|
431
|
+
tabBarActiveTintColor?: ColorValue | undefined;
|
|
432
432
|
/**
|
|
433
433
|
* Color for the icon and label in the inactive tabs.
|
|
434
434
|
*/
|
|
@@ -482,6 +482,11 @@ export type BottomTabNavigationOptions = {
|
|
|
482
482
|
* Only supported on iOS 18 and below.
|
|
483
483
|
*/
|
|
484
484
|
shadowColor?: ColorValue;
|
|
485
|
+
/**
|
|
486
|
+
* Whether the tab bar is visible.
|
|
487
|
+
* Setting this to `'none'` hides the tab bar.
|
|
488
|
+
*/
|
|
489
|
+
display?: 'flex' | 'none';
|
|
485
490
|
};
|
|
486
491
|
/**
|
|
487
492
|
* Whether this screens should render the first time it's accessed. Defaults to `true`.
|
|
@@ -507,6 +512,18 @@ export type BottomTabNavigationOptions = {
|
|
|
507
512
|
* Defaults to `false` unless a header is provided.
|
|
508
513
|
*/
|
|
509
514
|
headerShown?: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* What should happen when screens become inactive.
|
|
517
|
+
* - `pause`: Effects are cleaned up.
|
|
518
|
+
* - `none`: Screen renders normally
|
|
519
|
+
*
|
|
520
|
+
* Defaults to `pause`.
|
|
521
|
+
*
|
|
522
|
+
* If you set `lazy: false` or preload a screen,
|
|
523
|
+
* It won't be paused until after the first time it becomes focused.
|
|
524
|
+
* This makes sure that effects are run to initialize the screen.
|
|
525
|
+
*/
|
|
526
|
+
inactiveBehavior?: 'pause' | 'none';
|
|
510
527
|
} & HeaderOptions & BottomTabNativeOptions & BottomTabCustomOptions;
|
|
511
528
|
export type BottomTabDescriptor = Descriptor<BottomTabNavigationOptions, BottomTabNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
|
|
512
529
|
export type BottomTabDescriptorMap = Record<string, BottomTabDescriptor>;
|
|
@@ -570,14 +587,6 @@ export type BottomTabNavigationConfig = {
|
|
|
570
587
|
* Function that returns a React element to display as the tab bar.
|
|
571
588
|
*/
|
|
572
589
|
tabBar?: (props: BottomTabBarProps) => React.ReactNode;
|
|
573
|
-
/**
|
|
574
|
-
* Whether inactive screens should be detached from the view hierarchy to save memory.
|
|
575
|
-
*
|
|
576
|
-
* Defaults to `true`.
|
|
577
|
-
*
|
|
578
|
-
* Only supported with `custom` implementation.
|
|
579
|
-
*/
|
|
580
|
-
detachInactiveScreens?: boolean;
|
|
581
590
|
};
|
|
582
591
|
export type BottomTabHeaderProps = {
|
|
583
592
|
/**
|
|
@@ -599,7 +608,7 @@ export type BottomTabBarProps = {
|
|
|
599
608
|
navigation: NavigationHelpers<ParamListBase, BottomTabNavigationEventMap>;
|
|
600
609
|
};
|
|
601
610
|
export type BottomTabBarButtonProps = Omit<React.ComponentProps<typeof PlatformPressable>, 'style'> & {
|
|
602
|
-
href?: string;
|
|
611
|
+
href?: string | undefined;
|
|
603
612
|
children: React.ReactNode;
|
|
604
613
|
style?: StyleProp<ViewStyle>;
|
|
605
614
|
onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,mBA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` to use for the anchor tag on web
|
|
14
14
|
*/
|
|
15
|
-
href?: string;
|
|
15
|
+
href?: string | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Whether the tab is focused.
|
|
18
18
|
*/
|
|
@@ -37,23 +37,23 @@ type Props = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Text to show in a badge on the tab icon.
|
|
39
39
|
*/
|
|
40
|
-
badge?: number | string;
|
|
40
|
+
badge?: number | string | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Custom style for the badge.
|
|
43
43
|
*/
|
|
44
|
-
badgeStyle?: StyleProp<TextStyle
|
|
44
|
+
badgeStyle?: StyleProp<TextStyle> | undefined;
|
|
45
45
|
/**
|
|
46
46
|
* The button for the tab. Uses a `Pressable` by default.
|
|
47
47
|
*/
|
|
48
|
-
button?: (props: BottomTabBarButtonProps) => React.ReactNode;
|
|
48
|
+
button?: ((props: BottomTabBarButtonProps) => React.ReactNode) | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* The accessibility label for the tab.
|
|
51
51
|
*/
|
|
52
|
-
accessibilityLabel?: string;
|
|
52
|
+
accessibilityLabel?: string | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* An unique ID for testing for the tab.
|
|
55
55
|
*/
|
|
56
|
-
testID?: string;
|
|
56
|
+
testID?: string | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* Function to execute on press in React Native.
|
|
59
59
|
* On the web, this will use onClick.
|
|
@@ -84,44 +84,44 @@ type Props = {
|
|
|
84
84
|
/**
|
|
85
85
|
* Color for the icon and label when the item is active.
|
|
86
86
|
*/
|
|
87
|
-
activeTintColor?: ColorValue;
|
|
87
|
+
activeTintColor?: ColorValue | undefined;
|
|
88
88
|
/**
|
|
89
89
|
* Color for the icon and label when the item is inactive.
|
|
90
90
|
*/
|
|
91
|
-
inactiveTintColor?: ColorValue;
|
|
91
|
+
inactiveTintColor?: ColorValue | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* Background color for item when its active.
|
|
94
94
|
*/
|
|
95
|
-
activeBackgroundColor?: ColorValue;
|
|
95
|
+
activeBackgroundColor?: ColorValue | undefined;
|
|
96
96
|
/**
|
|
97
97
|
* Background color for item when its inactive.
|
|
98
98
|
*/
|
|
99
|
-
inactiveBackgroundColor?: ColorValue;
|
|
99
|
+
inactiveBackgroundColor?: ColorValue | undefined;
|
|
100
100
|
/**
|
|
101
101
|
* Color of tab bar item's ripple effect.
|
|
102
102
|
*/
|
|
103
|
-
rippleColor?: ColorValue;
|
|
103
|
+
rippleColor?: ColorValue | undefined;
|
|
104
104
|
/**
|
|
105
105
|
* Label visibility mode for the tab bar item.
|
|
106
106
|
*/
|
|
107
|
-
labelVisibilityMode?: TabBarItemLabelVisibilityMode;
|
|
107
|
+
labelVisibilityMode?: TabBarItemLabelVisibilityMode | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* Whether to allow scaling the font for the label for accessibility purposes.
|
|
110
110
|
* Defaults to `false` on iOS 13+ where it uses `largeContentTitle`.
|
|
111
111
|
*/
|
|
112
|
-
allowFontScaling?: boolean;
|
|
112
|
+
allowFontScaling?: boolean | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* Style object for the label element.
|
|
115
115
|
*/
|
|
116
|
-
labelStyle?: StyleProp<TextStyle
|
|
116
|
+
labelStyle?: StyleProp<TextStyle> | undefined;
|
|
117
117
|
/**
|
|
118
118
|
* Style object for the icon element.
|
|
119
119
|
*/
|
|
120
|
-
iconStyle?: StyleProp<ViewStyle
|
|
120
|
+
iconStyle?: StyleProp<ViewStyle> | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Style object for the wrapper element.
|
|
123
123
|
*/
|
|
124
|
-
style?: StyleProp<ViewStyle
|
|
124
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
125
125
|
};
|
|
126
126
|
export declare function BottomTabItem({ route, href, focused, descriptor, label, icon, badge, badgeStyle, button, accessibilityLabel, testID, onPress, onLongPress, horizontal, compact, sidebar, variant, activeTintColor: customActiveTintColor, inactiveTintColor: customInactiveTintColor, activeBackgroundColor: customActiveBackgroundColor, inactiveBackgroundColor, rippleColor, labelVisibilityMode, allowFontScaling, labelStyle, iconStyle, style, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
127
127
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomTabItem.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAE1B,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomTabItem.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,qBAAqB,EAE1B,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EACV,uBAAuB,EACvB,mBA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AAU,EACV,SAAS,EACT,KAAK,GACN,EAAE,KAAK,2CAgMP"}
|
|
@@ -5,6 +5,6 @@ type Props = BottomTabNavigationConfig & {
|
|
|
5
5
|
navigation: BottomTabNavigationHelpers;
|
|
6
6
|
descriptors: BottomTabDescriptorMap;
|
|
7
7
|
};
|
|
8
|
-
export declare function BottomTabViewCustom({ tabBar, state, navigation, descriptors,
|
|
8
|
+
export declare function BottomTabViewCustom({ tabBar, state, navigation, descriptors, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=BottomTabViewCustom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomTabViewCustom.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabViewCustom.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomTabViewCustom.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabViewCustom.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAclC,OAAO,KAAK,EAEV,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAG3B,MAAM,UAAU,CAAC;AASlB,KAAK,KAAK,GAAG,yBAAyB,GAAG;IACvC,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AA8BF,wBAAgB,mBAAmB,CAAC,EAClC,MAA4B,EAC5B,KAAK,EACL,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,2CAwQP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomTabViewNativeImpl.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabViewNativeImpl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,aAAa,EAGlB,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomTabViewNativeImpl.d.ts","sourceRoot":"","sources":["../../../../src/views/BottomTabViewNativeImpl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,aAAa,EAGlB,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;AAelC,OAAO,KAAK,EACV,sBAAsB,EAEtB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAMlB,KAAK,KAAK,GAAG,yBAAyB,GAAG;IACvC,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AAWF,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,UAAU,EACV,WAAW,EACX,MAAM,GACP,EAAE,KAAK,2CAqcP"}
|
|
@@ -6,8 +6,8 @@ export type TabBarIconProps = {
|
|
|
6
6
|
route: Route<string>;
|
|
7
7
|
variant: 'uikit' | 'material';
|
|
8
8
|
size: 'compact' | 'regular';
|
|
9
|
-
badge?: string | number;
|
|
10
|
-
badgeStyle?: StyleProp<TextStyle
|
|
9
|
+
badge?: string | number | undefined;
|
|
10
|
+
badgeStyle?: StyleProp<TextStyle> | undefined;
|
|
11
11
|
activeOpacity: number;
|
|
12
12
|
inactiveOpacity: number;
|
|
13
13
|
activeTintColor: ColorValue;
|
|
@@ -17,7 +17,7 @@ export type TabBarIconProps = {
|
|
|
17
17
|
color: ColorValue;
|
|
18
18
|
size: number;
|
|
19
19
|
}) => BottomTabIcon | React.ReactNode);
|
|
20
|
-
allowFontScaling?: boolean;
|
|
20
|
+
allowFontScaling?: boolean | undefined;
|
|
21
21
|
style: StyleProp<ViewStyle>;
|
|
22
22
|
};
|
|
23
23
|
export declare function TabBarIcon({ route: _, variant, size, badge, badgeStyle, activeOpacity, inactiveOpacity, activeTintColor, inactiveTintColor, icon, allowFontScaling, style, }: TabBarIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarIcon.d.ts","sourceRoot":"","sources":["../../../../src/views/TabBarIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;IAC9B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TabBarIcon.d.ts","sourceRoot":"","sources":["../../../../src/views/TabBarIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;IAC9B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,UAAU,CAAC;IAC5B,iBAAiB,EAAE,UAAU,CAAC;IAC9B,IAAI,EACA,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,EAAE,UAAU,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AAcF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EAAE,CAAC,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,IAAI,EACJ,gBAAgB,EAChB,KAAK,GACN,EAAE,eAAe,2CAwDjB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/bottom-tabs",
|
|
3
3
|
"description": "Bottom tab navigator following iOS design guidelines",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.14",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -41,27 +41,27 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@react-navigation/elements": "^3.0.0-alpha.
|
|
44
|
+
"@react-navigation/elements": "^3.0.0-alpha.13",
|
|
45
45
|
"color": "^4.2.3",
|
|
46
46
|
"sf-symbols-typescript": "^2.2.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@jest/globals": "^30.0.0",
|
|
50
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
51
|
-
"@testing-library/react-native": "^13.
|
|
50
|
+
"@react-navigation/native": "^8.0.0-alpha.12",
|
|
51
|
+
"@testing-library/react-native": "^13.3.3",
|
|
52
52
|
"@types/color": "^4.2.0",
|
|
53
|
-
"@types/react": "~19.
|
|
53
|
+
"@types/react": "~19.2.2",
|
|
54
54
|
"del-cli": "^6.0.0",
|
|
55
|
-
"react": "19.
|
|
56
|
-
"react-native": "0.
|
|
55
|
+
"react": "19.2.0",
|
|
56
|
+
"react-native": "0.83.2",
|
|
57
57
|
"react-native-builder-bob": "^0.40.12",
|
|
58
|
-
"react-native-safe-area-context": "~5.6.
|
|
59
|
-
"react-native-screens": "^4.
|
|
60
|
-
"react-test-renderer": "19.
|
|
58
|
+
"react-native-safe-area-context": "~5.6.2",
|
|
59
|
+
"react-native-screens": "^4.24.0",
|
|
60
|
+
"react-test-renderer": "19.2.0",
|
|
61
61
|
"typescript": "^5.9.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
64
|
+
"@react-navigation/native": "^8.0.0-alpha.12",
|
|
65
65
|
"react": ">= 19.0.0",
|
|
66
66
|
"react-native": "*",
|
|
67
67
|
"react-native-safe-area-context": ">= 5.5.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
]
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "4ac6c41c1f751fba9dd82db050865bc71f3310f5"
|
|
89
89
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
3
|
type ParamListBase,
|
|
4
|
-
StackActions,
|
|
5
4
|
type StaticConfig,
|
|
6
5
|
type StaticParamList,
|
|
7
6
|
type StaticScreenConfig,
|
|
@@ -14,7 +13,6 @@ import {
|
|
|
14
13
|
type TypedNavigator,
|
|
15
14
|
useNavigationBuilder,
|
|
16
15
|
} from '@react-navigation/native';
|
|
17
|
-
import * as React from 'react';
|
|
18
16
|
|
|
19
17
|
import type {
|
|
20
18
|
BottomTabNavigationEventMap,
|
|
@@ -55,32 +53,6 @@ function BottomTabNavigator({
|
|
|
55
53
|
router,
|
|
56
54
|
});
|
|
57
55
|
|
|
58
|
-
const focusedRouteKey = state.routes[state.index].key;
|
|
59
|
-
const previousRouteKeyRef = React.useRef(focusedRouteKey);
|
|
60
|
-
|
|
61
|
-
React.useEffect(() => {
|
|
62
|
-
const previousRouteKey = previousRouteKeyRef.current;
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
previousRouteKey !== focusedRouteKey &&
|
|
66
|
-
descriptors[previousRouteKey]?.options.popToTopOnBlur
|
|
67
|
-
) {
|
|
68
|
-
const prevRoute = state.routes.find(
|
|
69
|
-
(route) => route.key === previousRouteKey
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
if (prevRoute?.state?.type === 'stack' && prevRoute.state.key) {
|
|
73
|
-
const popToTopAction = {
|
|
74
|
-
...StackActions.popToTop(),
|
|
75
|
-
target: prevRoute.state.key,
|
|
76
|
-
};
|
|
77
|
-
navigation.dispatch(popToTopAction);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
previousRouteKeyRef.current = focusedRouteKey;
|
|
82
|
-
}, [descriptors, focusedRouteKey, navigation, state.index, state.routes]);
|
|
83
|
-
|
|
84
56
|
return (
|
|
85
57
|
<NavigationContent>
|
|
86
58
|
<BottomTabView
|
package/src/types.tsx
CHANGED
|
@@ -194,7 +194,7 @@ type BottomTabCustomOptions = {
|
|
|
194
194
|
*
|
|
195
195
|
* Only supported with `custom` implementation.
|
|
196
196
|
*/
|
|
197
|
-
tabBarLabelPosition?: LabelPosition;
|
|
197
|
+
tabBarLabelPosition?: LabelPosition | undefined;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Whether label font should scale to respect Text Size accessibility settings.
|
|
@@ -509,7 +509,7 @@ export type BottomTabNavigationOptions = {
|
|
|
509
509
|
/**
|
|
510
510
|
* Text to show in a badge on the tab icon.
|
|
511
511
|
*/
|
|
512
|
-
tabBarBadge?: number | string;
|
|
512
|
+
tabBarBadge?: number | string | undefined;
|
|
513
513
|
|
|
514
514
|
/**
|
|
515
515
|
* Custom style for the tab bar badge.
|
|
@@ -527,7 +527,7 @@ export type BottomTabNavigationOptions = {
|
|
|
527
527
|
/**
|
|
528
528
|
* Color for the icon and label in the active tab.
|
|
529
529
|
*/
|
|
530
|
-
tabBarActiveTintColor?: ColorValue;
|
|
530
|
+
tabBarActiveTintColor?: ColorValue | undefined;
|
|
531
531
|
|
|
532
532
|
/**
|
|
533
533
|
* Color for the icon and label in the inactive tabs.
|
|
@@ -587,6 +587,11 @@ export type BottomTabNavigationOptions = {
|
|
|
587
587
|
* Only supported on iOS 18 and below.
|
|
588
588
|
*/
|
|
589
589
|
shadowColor?: ColorValue;
|
|
590
|
+
/**
|
|
591
|
+
* Whether the tab bar is visible.
|
|
592
|
+
* Setting this to `'none'` hides the tab bar.
|
|
593
|
+
*/
|
|
594
|
+
display?: 'flex' | 'none';
|
|
590
595
|
};
|
|
591
596
|
|
|
592
597
|
/**
|
|
@@ -617,6 +622,19 @@ export type BottomTabNavigationOptions = {
|
|
|
617
622
|
* Defaults to `false` unless a header is provided.
|
|
618
623
|
*/
|
|
619
624
|
headerShown?: boolean;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* What should happen when screens become inactive.
|
|
628
|
+
* - `pause`: Effects are cleaned up.
|
|
629
|
+
* - `none`: Screen renders normally
|
|
630
|
+
*
|
|
631
|
+
* Defaults to `pause`.
|
|
632
|
+
*
|
|
633
|
+
* If you set `lazy: false` or preload a screen,
|
|
634
|
+
* It won't be paused until after the first time it becomes focused.
|
|
635
|
+
* This makes sure that effects are run to initialize the screen.
|
|
636
|
+
*/
|
|
637
|
+
inactiveBehavior?: 'pause' | 'none';
|
|
620
638
|
} & HeaderOptions &
|
|
621
639
|
BottomTabNativeOptions &
|
|
622
640
|
BottomTabCustomOptions;
|
|
@@ -707,15 +725,6 @@ export type BottomTabNavigationConfig = {
|
|
|
707
725
|
* Function that returns a React element to display as the tab bar.
|
|
708
726
|
*/
|
|
709
727
|
tabBar?: (props: BottomTabBarProps) => React.ReactNode;
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* Whether inactive screens should be detached from the view hierarchy to save memory.
|
|
713
|
-
*
|
|
714
|
-
* Defaults to `true`.
|
|
715
|
-
*
|
|
716
|
-
* Only supported with `custom` implementation.
|
|
717
|
-
*/
|
|
718
|
-
detachInactiveScreens?: boolean;
|
|
719
728
|
};
|
|
720
729
|
|
|
721
730
|
export type BottomTabHeaderProps = {
|
|
@@ -743,7 +752,7 @@ export type BottomTabBarButtonProps = Omit<
|
|
|
743
752
|
React.ComponentProps<typeof PlatformPressable>,
|
|
744
753
|
'style'
|
|
745
754
|
> & {
|
|
746
|
-
href?: string;
|
|
755
|
+
href?: string | undefined;
|
|
747
756
|
children: React.ReactNode;
|
|
748
757
|
style?: StyleProp<ViewStyle>;
|
|
749
758
|
onPress?: (
|
|
@@ -29,7 +29,7 @@ type Props = {
|
|
|
29
29
|
/**
|
|
30
30
|
* The `href` to use for the anchor tag on web
|
|
31
31
|
*/
|
|
32
|
-
href?: string;
|
|
32
|
+
href?: string | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Whether the tab is focused.
|
|
35
35
|
*/
|
|
@@ -56,23 +56,23 @@ type Props = {
|
|
|
56
56
|
/**
|
|
57
57
|
* Text to show in a badge on the tab icon.
|
|
58
58
|
*/
|
|
59
|
-
badge?: number | string;
|
|
59
|
+
badge?: number | string | undefined;
|
|
60
60
|
/**
|
|
61
61
|
* Custom style for the badge.
|
|
62
62
|
*/
|
|
63
|
-
badgeStyle?: StyleProp<TextStyle
|
|
63
|
+
badgeStyle?: StyleProp<TextStyle> | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* The button for the tab. Uses a `Pressable` by default.
|
|
66
66
|
*/
|
|
67
|
-
button?: (props: BottomTabBarButtonProps) => React.ReactNode;
|
|
67
|
+
button?: ((props: BottomTabBarButtonProps) => React.ReactNode) | undefined;
|
|
68
68
|
/**
|
|
69
69
|
* The accessibility label for the tab.
|
|
70
70
|
*/
|
|
71
|
-
accessibilityLabel?: string;
|
|
71
|
+
accessibilityLabel?: string | undefined;
|
|
72
72
|
/**
|
|
73
73
|
* An unique ID for testing for the tab.
|
|
74
74
|
*/
|
|
75
|
-
testID?: string;
|
|
75
|
+
testID?: string | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Function to execute on press in React Native.
|
|
78
78
|
* On the web, this will use onClick.
|
|
@@ -105,44 +105,44 @@ type Props = {
|
|
|
105
105
|
/**
|
|
106
106
|
* Color for the icon and label when the item is active.
|
|
107
107
|
*/
|
|
108
|
-
activeTintColor?: ColorValue;
|
|
108
|
+
activeTintColor?: ColorValue | undefined;
|
|
109
109
|
/**
|
|
110
110
|
* Color for the icon and label when the item is inactive.
|
|
111
111
|
*/
|
|
112
|
-
inactiveTintColor?: ColorValue;
|
|
112
|
+
inactiveTintColor?: ColorValue | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* Background color for item when its active.
|
|
115
115
|
*/
|
|
116
|
-
activeBackgroundColor?: ColorValue;
|
|
116
|
+
activeBackgroundColor?: ColorValue | undefined;
|
|
117
117
|
/**
|
|
118
118
|
* Background color for item when its inactive.
|
|
119
119
|
*/
|
|
120
|
-
inactiveBackgroundColor?: ColorValue;
|
|
120
|
+
inactiveBackgroundColor?: ColorValue | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Color of tab bar item's ripple effect.
|
|
123
123
|
*/
|
|
124
|
-
rippleColor?: ColorValue;
|
|
124
|
+
rippleColor?: ColorValue | undefined;
|
|
125
125
|
/**
|
|
126
126
|
* Label visibility mode for the tab bar item.
|
|
127
127
|
*/
|
|
128
|
-
labelVisibilityMode?: TabBarItemLabelVisibilityMode;
|
|
128
|
+
labelVisibilityMode?: TabBarItemLabelVisibilityMode | undefined;
|
|
129
129
|
/**
|
|
130
130
|
* Whether to allow scaling the font for the label for accessibility purposes.
|
|
131
131
|
* Defaults to `false` on iOS 13+ where it uses `largeContentTitle`.
|
|
132
132
|
*/
|
|
133
|
-
allowFontScaling?: boolean;
|
|
133
|
+
allowFontScaling?: boolean | undefined;
|
|
134
134
|
/**
|
|
135
135
|
* Style object for the label element.
|
|
136
136
|
*/
|
|
137
|
-
labelStyle?: StyleProp<TextStyle
|
|
137
|
+
labelStyle?: StyleProp<TextStyle> | undefined;
|
|
138
138
|
/**
|
|
139
139
|
* Style object for the icon element.
|
|
140
140
|
*/
|
|
141
|
-
iconStyle?: StyleProp<ViewStyle
|
|
141
|
+
iconStyle?: StyleProp<ViewStyle> | undefined;
|
|
142
142
|
/**
|
|
143
143
|
* Style object for the wrapper element.
|
|
144
144
|
*/
|
|
145
|
-
style?: StyleProp<ViewStyle
|
|
145
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
const renderButtonDefault = (props: BottomTabBarButtonProps) => (
|