expo-router 6.0.0-beta.0 → 6.0.0-beta.10
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/assets/modal.module.css +15 -14
- package/assets/native-tabs.module.css +109 -0
- package/build/ExpoRoot.d.ts.map +1 -1
- package/build/ExpoRoot.js +0 -2
- package/build/ExpoRoot.js.map +1 -1
- package/build/fork/NavigationContainer.d.ts.map +1 -1
- package/build/fork/NavigationContainer.js +2 -0
- package/build/fork/NavigationContainer.js.map +1 -1
- package/build/fork/extractPathFromURL.d.ts.map +1 -1
- package/build/fork/extractPathFromURL.js +4 -0
- package/build/fork/extractPathFromURL.js.map +1 -1
- package/build/fork/getPathFromState.d.ts.map +1 -1
- package/build/fork/getPathFromState.js +2 -0
- package/build/fork/getPathFromState.js.map +1 -1
- package/build/global-state/routing.d.ts +6 -5
- package/build/global-state/routing.d.ts.map +1 -1
- package/build/global-state/routing.js +20 -14
- package/build/global-state/routing.js.map +1 -1
- package/build/head/ExpoHead.android.d.ts +1 -3
- package/build/imperative-api.d.ts +3 -1
- package/build/imperative-api.d.ts.map +1 -1
- package/build/imperative-api.js +4 -4
- package/build/imperative-api.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +2 -12
- package/build/layouts/DrawerClient.d.ts.map +1 -1
- package/build/layouts/StackClient.d.ts +14 -19
- package/build/layouts/StackClient.d.ts.map +1 -1
- package/build/layouts/StackClient.js +27 -25
- package/build/layouts/StackClient.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +3 -18
- package/build/layouts/TabsClient.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.d.ts +5 -1
- package/build/layouts/withLayoutContext.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.js +19 -6
- package/build/layouts/withLayoutContext.js.map +1 -1
- package/build/link/ExpoLink.d.ts.map +1 -1
- package/build/link/ExpoLink.js +4 -1
- package/build/link/ExpoLink.js.map +1 -1
- package/build/link/LinkWithPreview.d.ts.map +1 -1
- package/build/link/LinkWithPreview.js +19 -24
- package/build/link/LinkWithPreview.js.map +1 -1
- package/build/link/elements.d.ts +2 -10
- package/build/link/elements.d.ts.map +1 -1
- package/build/link/elements.js +1 -1
- package/build/link/elements.js.map +1 -1
- package/build/link/preview/native.d.ts +0 -2
- package/build/link/preview/native.d.ts.map +1 -1
- package/build/link/preview/native.js +1 -11
- package/build/link/preview/native.js.map +1 -1
- package/build/link/preview/utils.d.ts.map +1 -1
- package/build/link/preview/utils.js +5 -2
- package/build/link/preview/utils.js.map +1 -1
- package/build/modal/web/ModalStackRouteDrawer.js +9 -10
- package/build/modal/web/ModalStackRouteDrawer.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.d.ts +1 -0
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.js +61 -9
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.js +6 -27
- package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts +11 -3
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.js +154 -62
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts +3 -2
- package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.d.ts +24 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.d.ts.map +1 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.js +28 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.js.map +1 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.d.ts +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.js +114 -38
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.d.ts +4 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.d.ts.map +1 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js +158 -0
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js.map +1 -0
- package/build/native-tabs/NativeBottomTabs/appearance.d.ts +20 -0
- package/build/native-tabs/NativeBottomTabs/appearance.d.ts.map +1 -0
- package/build/native-tabs/NativeBottomTabs/appearance.js +119 -0
- package/build/native-tabs/NativeBottomTabs/appearance.js.map +1 -0
- package/build/native-tabs/NativeBottomTabs/types.d.ts +312 -46
- package/build/native-tabs/NativeBottomTabs/types.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/types.js +51 -0
- package/build/native-tabs/NativeBottomTabs/types.js.map +1 -1
- package/build/native-tabs/common/elements.d.ts +84 -21
- package/build/native-tabs/common/elements.d.ts.map +1 -1
- package/build/native-tabs/common/elements.js +23 -0
- package/build/native-tabs/common/elements.js.map +1 -1
- package/build/native-tabs/index.d.ts +2 -1
- package/build/native-tabs/index.d.ts.map +1 -1
- package/build/native-tabs/index.js +3 -1
- package/build/native-tabs/index.js.map +1 -1
- package/build/navigationParams.d.ts +9 -0
- package/build/navigationParams.d.ts.map +1 -0
- package/build/navigationParams.js +67 -0
- package/build/navigationParams.js.map +1 -0
- package/build/rsc/router/client.d.ts +1 -3
- package/build/rsc/router/client.d.ts.map +1 -1
- package/build/testing-library/index.d.ts +15 -4
- package/build/testing-library/index.d.ts.map +1 -1
- package/build/testing-library/index.js +31 -28
- package/build/testing-library/index.js.map +1 -1
- package/build/testing-library/mocks.js +0 -7
- package/build/testing-library/mocks.js.map +1 -1
- package/build/typed-routes/generate.d.ts +2 -1
- package/build/typed-routes/generate.d.ts.map +1 -1
- package/build/typed-routes/generate.js +3 -1
- package/build/typed-routes/generate.js.map +1 -1
- package/build/ui/Slot.d.ts +5 -1
- package/build/ui/Slot.d.ts.map +1 -1
- package/build/ui/Slot.js.map +1 -1
- package/build/ui/TabContext.d.ts +11 -21
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabRouter.d.ts +7 -0
- package/build/ui/TabRouter.d.ts.map +1 -1
- package/build/ui/Tabs.d.ts +14 -23
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +1 -1
- package/build/ui/Tabs.js.map +1 -1
- package/build/ui/common.d.ts +2 -3
- package/build/ui/common.d.ts.map +1 -1
- package/build/ui/common.js +1 -3
- package/build/ui/common.js.map +1 -1
- package/build/useFocusEffect.js +1 -1
- package/build/useFocusEffect.js.map +1 -1
- package/build/useScreens.d.ts +1 -1
- package/build/useScreens.d.ts.map +1 -1
- package/build/useScreens.js +6 -4
- package/build/useScreens.js.map +1 -1
- package/ios/ExpoHead.podspec +2 -0
- package/ios/LinkPreview/LinkPreviewNativeModule.swift +7 -9
- package/ios/LinkPreview/LinkPreviewNativeView.swift +13 -28
- package/package.json +22 -24
- package/plugin/build/index.js +1 -1
- package/plugin/src/index.ts +1 -1
- package/ios/LinkPreview/LinkPreviewNativeTriggerView.swift +0 -9
- package/plugin/tsconfig.tsbuildinfo +0 -1
|
@@ -1,39 +1,144 @@
|
|
|
1
1
|
import type { DefaultRouterOptions, ParamListBase, TabNavigationState, TabRouterOptions, useNavigationBuilder } from '@react-navigation/native';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
3
|
import type { ColorValue, ImageSourcePropType, TextStyle } from 'react-native';
|
|
4
|
-
import type {
|
|
4
|
+
import type { BottomTabsScreenProps } from 'react-native-screens';
|
|
5
5
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
6
|
-
export
|
|
6
|
+
export interface NativeTabOptions extends DefaultRouterOptions {
|
|
7
7
|
/**
|
|
8
8
|
* The icon to display in the tab bar.
|
|
9
9
|
* @platform android
|
|
10
10
|
* @platform iOS
|
|
11
11
|
*/
|
|
12
|
-
icon?:
|
|
13
|
-
/**
|
|
14
|
-
* The name of the drawable resource to use as an icon.
|
|
15
|
-
* @platform android
|
|
16
|
-
*/
|
|
17
|
-
drawable?: string;
|
|
18
|
-
};
|
|
12
|
+
icon?: SymbolOrImageSource;
|
|
19
13
|
/**
|
|
20
14
|
* The icon to display when the tab is selected.
|
|
21
15
|
* @platform iOS
|
|
22
16
|
*/
|
|
23
|
-
selectedIcon?:
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
selectedIcon?: SymbolOrImageSource;
|
|
18
|
+
/**
|
|
19
|
+
* Title of the tab screen, displayed in the tab bar item.
|
|
20
|
+
*
|
|
21
|
+
* @platform android
|
|
22
|
+
* @platform iOS
|
|
23
|
+
*/
|
|
24
|
+
title?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies content of tab bar item badge.
|
|
27
|
+
*
|
|
28
|
+
* On Android, the value is interpreted in the following order:
|
|
29
|
+
* - If the string can be parsed to integer, displays the value as a number
|
|
30
|
+
* - Otherwise if the string is empty, displays "small dot" badge
|
|
31
|
+
* - Otherwise, displays the value as a text
|
|
32
|
+
*
|
|
33
|
+
* On iOS, badge is displayed as regular string.
|
|
34
|
+
*
|
|
35
|
+
* @platform android
|
|
36
|
+
* @platform ios
|
|
37
|
+
*/
|
|
38
|
+
badgeValue?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The style of the tab label when the tab is selected.
|
|
41
|
+
*/
|
|
42
|
+
selectedLabelStyle?: NativeTabsLabelStyle;
|
|
43
|
+
/**
|
|
44
|
+
* The style of all the tab labels, when the tab is selected
|
|
45
|
+
*/
|
|
46
|
+
labelStyle?: NativeTabsLabelStyle;
|
|
47
|
+
/**
|
|
48
|
+
* System-provided tab bar item with predefined icon and title
|
|
49
|
+
*
|
|
50
|
+
* Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with
|
|
51
|
+
* standard iOS styling and localized titles. Custom `icon` or `selectedIcon`
|
|
52
|
+
* properties will override the system icon, but the system-defined title cannot
|
|
53
|
+
* be customized.
|
|
54
|
+
*
|
|
55
|
+
* @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}
|
|
56
|
+
* @platform ios
|
|
57
|
+
*/
|
|
58
|
+
role?: NativeTabsTabBarItemRole;
|
|
59
|
+
/**
|
|
60
|
+
* The color of the icon when the tab is selected.
|
|
61
|
+
*/
|
|
62
|
+
selectedIconColor?: ColorValue;
|
|
63
|
+
/**
|
|
64
|
+
* The color of the badge when the tab is selected.
|
|
65
|
+
*/
|
|
66
|
+
selectedBadgeBackgroundColor?: ColorValue;
|
|
67
|
+
/**
|
|
68
|
+
* The color of all the badges when the tab is selected.
|
|
69
|
+
*/
|
|
70
|
+
badgeBackgroundColor?: ColorValue;
|
|
71
|
+
/**
|
|
72
|
+
* The color of the badge text.
|
|
73
|
+
*
|
|
74
|
+
* @platform android
|
|
75
|
+
* @platform web
|
|
76
|
+
*/
|
|
77
|
+
badgeTextColor?: ColorValue;
|
|
78
|
+
/**
|
|
79
|
+
* The color of the background when the tab is selected.
|
|
80
|
+
*/
|
|
81
|
+
backgroundColor?: ColorValue;
|
|
82
|
+
/**
|
|
83
|
+
* The blur effect to apply when the tab is selected.
|
|
84
|
+
*
|
|
85
|
+
* @platform iOS
|
|
86
|
+
*/
|
|
87
|
+
blurEffect?: NativeTabsBlurEffect;
|
|
88
|
+
/**
|
|
89
|
+
* The color of the icon when the tab is selected.
|
|
90
|
+
*
|
|
91
|
+
* On iOS 26+ you can change the icon color in the scroll edge state.
|
|
92
|
+
*/
|
|
93
|
+
iconColor?: ColorValue;
|
|
94
|
+
/**
|
|
95
|
+
* When set to `true`, the tab bar will not become transparent when scrolled to the edge.
|
|
96
|
+
*
|
|
97
|
+
* @platform iOS
|
|
98
|
+
*/
|
|
99
|
+
disableTransparentOnScrollEdge?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The position adjustment for all the labels when the tab is selected.
|
|
102
|
+
*
|
|
103
|
+
* @platform iOS
|
|
104
|
+
*/
|
|
105
|
+
titlePositionAdjustment?: {
|
|
106
|
+
horizontal?: number;
|
|
107
|
+
vertical?: number;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The position adjustment for the label when the tab is selected.
|
|
111
|
+
*
|
|
112
|
+
* @platform iOS
|
|
113
|
+
*/
|
|
114
|
+
selectedTitlePositionAdjustment?: {
|
|
115
|
+
horizontal?: number;
|
|
116
|
+
vertical?: number;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* The color of the tab indicator.
|
|
120
|
+
*
|
|
121
|
+
* @platform android
|
|
122
|
+
* @platform web
|
|
123
|
+
*/
|
|
124
|
+
indicatorColor?: ColorValue;
|
|
125
|
+
}
|
|
126
|
+
export type SymbolOrImageSource = {
|
|
26
127
|
/**
|
|
27
128
|
* The name of the SF Symbol to use as an icon.
|
|
28
129
|
* @platform iOS
|
|
29
130
|
*/
|
|
30
131
|
sf?: SFSymbol;
|
|
132
|
+
/**
|
|
133
|
+
* The name of the drawable resource to use as an icon.
|
|
134
|
+
* @platform android
|
|
135
|
+
*/
|
|
136
|
+
drawable?: string;
|
|
31
137
|
} | {
|
|
32
138
|
/**
|
|
33
139
|
* The image source to use as an icon.
|
|
34
|
-
* @platform iOS
|
|
35
140
|
*/
|
|
36
|
-
src?: ImageSourcePropType
|
|
141
|
+
src?: ImageSourcePropType | Promise<ImageSourcePropType>;
|
|
37
142
|
};
|
|
38
143
|
export interface ExtendedNativeTabOptions extends NativeTabOptions {
|
|
39
144
|
/**
|
|
@@ -42,44 +147,47 @@ export interface ExtendedNativeTabOptions extends NativeTabOptions {
|
|
|
42
147
|
hidden?: boolean;
|
|
43
148
|
specialEffects?: BottomTabsScreenProps['specialEffects'];
|
|
44
149
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fontSize?: TextStyle['fontSize'];
|
|
48
|
-
fontWeight?: TextStyle['fontWeight'];
|
|
49
|
-
fontStyle?: TextStyle['fontStyle'];
|
|
50
|
-
color?: TextStyle['color'];
|
|
150
|
+
type NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
151
|
+
export interface NativeTabsLabelStyle {
|
|
51
152
|
/**
|
|
52
|
-
*
|
|
53
|
-
* @platform iOS
|
|
153
|
+
* The font family of the tab label.
|
|
54
154
|
*/
|
|
55
|
-
|
|
56
|
-
backgroundColor?: ColorValue;
|
|
155
|
+
fontFamily?: TextStyle['fontFamily'];
|
|
57
156
|
/**
|
|
58
|
-
*
|
|
157
|
+
* The font size of the tab label.
|
|
59
158
|
*/
|
|
60
|
-
|
|
61
|
-
tintColor?: ColorValue;
|
|
62
|
-
badgeBackgroundColor?: ColorValue;
|
|
159
|
+
fontSize?: TextStyle['fontSize'];
|
|
63
160
|
/**
|
|
64
|
-
*
|
|
161
|
+
* The font weight of the tab label.
|
|
65
162
|
*/
|
|
66
|
-
|
|
163
|
+
fontWeight?: NumericFontWeight | `${NumericFontWeight}`;
|
|
67
164
|
/**
|
|
68
|
-
*
|
|
165
|
+
* The font style of the tab label.
|
|
69
166
|
*/
|
|
70
|
-
|
|
167
|
+
fontStyle?: TextStyle['fontStyle'];
|
|
71
168
|
/**
|
|
72
|
-
*
|
|
169
|
+
* The color of the tab label.
|
|
73
170
|
*/
|
|
74
|
-
'
|
|
171
|
+
color?: TextStyle['color'];
|
|
75
172
|
}
|
|
173
|
+
export declare const SUPPORTED_BLUR_EFFECTS: readonly ["none", "systemDefault", "extraLight", "light", "dark", "regular", "prominent", "systemUltraThinMaterial", "systemThinMaterial", "systemMaterial", "systemThickMaterial", "systemChromeMaterial", "systemUltraThinMaterialLight", "systemThinMaterialLight", "systemMaterialLight", "systemThickMaterialLight", "systemChromeMaterialLight", "systemUltraThinMaterialDark", "systemThinMaterialDark", "systemMaterialDark", "systemThickMaterialDark", "systemChromeMaterialDark"];
|
|
174
|
+
/**
|
|
175
|
+
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)
|
|
176
|
+
*/
|
|
177
|
+
export type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];
|
|
178
|
+
/**
|
|
179
|
+
* @platform android
|
|
180
|
+
* @platform web
|
|
181
|
+
*/
|
|
76
182
|
export interface NativeTabsActiveStyleType {
|
|
77
183
|
/**
|
|
78
184
|
* @platform android
|
|
185
|
+
* @platform web
|
|
79
186
|
*/
|
|
80
187
|
color?: ColorValue;
|
|
81
188
|
/**
|
|
82
189
|
* @platform android
|
|
190
|
+
* @platform web
|
|
83
191
|
*/
|
|
84
192
|
fontSize?: TextStyle['fontSize'];
|
|
85
193
|
/**
|
|
@@ -88,25 +196,75 @@ export interface NativeTabsActiveStyleType {
|
|
|
88
196
|
iconColor?: ColorValue;
|
|
89
197
|
/**
|
|
90
198
|
* @platform android
|
|
199
|
+
* @platform web
|
|
91
200
|
*/
|
|
92
201
|
indicatorColor?: ColorValue;
|
|
93
202
|
}
|
|
94
203
|
export interface NativeTabsProps extends PropsWithChildren {
|
|
95
|
-
style?: NativeTabsStyleType;
|
|
96
204
|
/**
|
|
97
|
-
*
|
|
205
|
+
* The style of the every tab label in the tab bar.
|
|
206
|
+
*/
|
|
207
|
+
labelStyle?: NativeTabsLabelStyle;
|
|
208
|
+
/**
|
|
209
|
+
* The color of every tab icon in the tab bar.
|
|
210
|
+
*/
|
|
211
|
+
iconColor?: ColorValue;
|
|
212
|
+
/**
|
|
213
|
+
* The tint color of the tab icon.
|
|
214
|
+
*
|
|
215
|
+
* Can be overridden by icon color and label color for each tab individually.
|
|
216
|
+
*/
|
|
217
|
+
tintColor?: ColorValue;
|
|
218
|
+
/**
|
|
219
|
+
* The background color of the tab bar.
|
|
220
|
+
*/
|
|
221
|
+
backgroundColor?: ColorValue | null;
|
|
222
|
+
/**
|
|
223
|
+
* The background color of every badge in the tab bar.
|
|
224
|
+
*/
|
|
225
|
+
badgeBackgroundColor?: ColorValue;
|
|
226
|
+
/**
|
|
227
|
+
* Specifies the minimize behavior for the tab bar.
|
|
228
|
+
*
|
|
229
|
+
* Available starting from iOS 26.
|
|
98
230
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* - `
|
|
102
|
-
* - `
|
|
103
|
-
* - `
|
|
231
|
+
* The following values are currently supported:
|
|
232
|
+
*
|
|
233
|
+
* - `automatic` - resolves to the system default minimize behavior
|
|
234
|
+
* - `never` - the tab bar does not minimize
|
|
235
|
+
* - `onScrollDown` - the tab bar minimizes when scrolling down and
|
|
236
|
+
* expands when scrolling back up
|
|
237
|
+
* - `onScrollUp` - the tab bar minimizes when scrolling up and expands
|
|
238
|
+
* when scrolling back down
|
|
239
|
+
*
|
|
240
|
+
* @see The supported values correspond to the official [UIKit documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).
|
|
104
241
|
*
|
|
105
242
|
* @default automatic
|
|
106
243
|
*
|
|
107
|
-
* @platform iOS 26
|
|
244
|
+
* @platform iOS 26+
|
|
245
|
+
*/
|
|
246
|
+
minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;
|
|
247
|
+
/**
|
|
248
|
+
* The blur effect applied to the tab bar.
|
|
249
|
+
*
|
|
250
|
+
* @platform iOS
|
|
108
251
|
*/
|
|
109
|
-
|
|
252
|
+
blurEffect?: NativeTabsBlurEffect;
|
|
253
|
+
/**
|
|
254
|
+
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)
|
|
255
|
+
*
|
|
256
|
+
* @platform iOS
|
|
257
|
+
*/
|
|
258
|
+
titlePositionAdjustment?: {
|
|
259
|
+
horizontal?: number;
|
|
260
|
+
vertical?: number;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* When set to `true`, the tab bar will not become transparent when scrolled to the edge.
|
|
264
|
+
*
|
|
265
|
+
* @platform iOS
|
|
266
|
+
*/
|
|
267
|
+
disableTransparentOnScrollEdge?: boolean;
|
|
110
268
|
/**
|
|
111
269
|
* Disables the active indicator for the tab bar.
|
|
112
270
|
*
|
|
@@ -119,10 +277,53 @@ export interface NativeTabsProps extends PropsWithChildren {
|
|
|
119
277
|
* @platform android
|
|
120
278
|
*/
|
|
121
279
|
backBehavior?: 'none' | 'initialRoute' | 'history';
|
|
280
|
+
/**
|
|
281
|
+
* The visibility mode of the tab item label.
|
|
282
|
+
*
|
|
283
|
+
* @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)
|
|
284
|
+
*
|
|
285
|
+
* @platform android
|
|
286
|
+
*/
|
|
287
|
+
labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;
|
|
288
|
+
/**
|
|
289
|
+
* The color of the ripple effect when the tab is pressed.
|
|
290
|
+
*
|
|
291
|
+
* @platform android
|
|
292
|
+
*/
|
|
293
|
+
rippleColor?: ColorValue;
|
|
294
|
+
/**
|
|
295
|
+
* The color of the tab indicator.
|
|
296
|
+
*
|
|
297
|
+
* @platform android
|
|
298
|
+
* @platform web
|
|
299
|
+
*/
|
|
300
|
+
indicatorColor?: ColorValue;
|
|
301
|
+
/**
|
|
302
|
+
* The color of the badge text.
|
|
303
|
+
*
|
|
304
|
+
* @platform android
|
|
305
|
+
* @platform web
|
|
306
|
+
*/
|
|
307
|
+
badgeTextColor?: ColorValue;
|
|
122
308
|
}
|
|
123
309
|
export interface NativeTabsViewProps extends NativeTabsProps {
|
|
310
|
+
focusedIndex: number;
|
|
124
311
|
builder: ReturnType<typeof useNavigationBuilder<TabNavigationState<ParamListBase>, TabRouterOptions, Record<string, (...args: any) => void>, NativeTabOptions, Record<string, any>>>;
|
|
125
312
|
}
|
|
313
|
+
export declare const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES: readonly ["auto", "selected", "labeled", "unlabeled"];
|
|
314
|
+
/**
|
|
315
|
+
* @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)
|
|
316
|
+
*
|
|
317
|
+
* @platform android
|
|
318
|
+
*/
|
|
319
|
+
export type NativeTabsTabBarItemLabelVisibilityMode = (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];
|
|
320
|
+
export declare const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS: readonly ["automatic", "never", "onScrollDown", "onScrollUp"];
|
|
321
|
+
/**
|
|
322
|
+
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)
|
|
323
|
+
*
|
|
324
|
+
* @platform iOS 26
|
|
325
|
+
*/
|
|
326
|
+
export type NativeTabsTabBarMinimizeBehavior = (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];
|
|
126
327
|
export interface NativeTabTriggerProps {
|
|
127
328
|
/**
|
|
128
329
|
* The name of the route.
|
|
@@ -144,16 +345,16 @@ export interface NativeTabTriggerProps {
|
|
|
144
345
|
options?: NativeTabOptions;
|
|
145
346
|
/**
|
|
146
347
|
* If true, the tab will not pop stack to the root when selected again.
|
|
147
|
-
* @default false
|
|
148
348
|
*
|
|
149
|
-
* @
|
|
349
|
+
* @default false
|
|
350
|
+
* @platform iOS
|
|
150
351
|
*/
|
|
151
352
|
disablePopToTop?: boolean;
|
|
152
353
|
/**
|
|
153
354
|
* If true, the tab will not scroll to the top when selected again.
|
|
154
355
|
* @default false
|
|
155
356
|
*
|
|
156
|
-
* @platform
|
|
357
|
+
* @platform iOS
|
|
157
358
|
*/
|
|
158
359
|
disableScrollToTop?: boolean;
|
|
159
360
|
/**
|
|
@@ -162,5 +363,70 @@ export interface NativeTabTriggerProps {
|
|
|
162
363
|
* Use `Icon`, `Label`, and `Badge` components to customize the tab.
|
|
163
364
|
*/
|
|
164
365
|
children?: React.ReactNode;
|
|
366
|
+
/**
|
|
367
|
+
* System-provided tab bar item with predefined icon and title
|
|
368
|
+
*
|
|
369
|
+
* Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with
|
|
370
|
+
* standard iOS styling and localized titles. Custom `icon` or `selectedIcon`
|
|
371
|
+
* properties will override the system icon, but the system-defined title cannot
|
|
372
|
+
* be customized.
|
|
373
|
+
*
|
|
374
|
+
* @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}
|
|
375
|
+
* @platform ios
|
|
376
|
+
*/
|
|
377
|
+
role?: NativeTabsTabBarItemRole;
|
|
378
|
+
}
|
|
379
|
+
declare const SUPPORTED_TAB_BAR_ITEM_ROLES: readonly ["bookmarks", "contacts", "downloads", "favorites", "featured", "history", "more", "mostRecent", "mostViewed", "recents", "search", "topRated"];
|
|
380
|
+
export type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];
|
|
381
|
+
export interface NativeTabsTriggerTabBarProps {
|
|
382
|
+
/**
|
|
383
|
+
* The style of the every tab label in the tab bar.
|
|
384
|
+
*
|
|
385
|
+
* @platform iOS
|
|
386
|
+
* @platform web
|
|
387
|
+
*/
|
|
388
|
+
labelStyle?: NativeTabsLabelStyle;
|
|
389
|
+
/**
|
|
390
|
+
* The background color of the tab bar, when the tab is selected
|
|
391
|
+
*/
|
|
392
|
+
backgroundColor?: ColorValue;
|
|
393
|
+
/**
|
|
394
|
+
* The color of every tab icon, when the tab is selected
|
|
395
|
+
*
|
|
396
|
+
* @platform iOS
|
|
397
|
+
*/
|
|
398
|
+
iconColor?: ColorValue;
|
|
399
|
+
/**
|
|
400
|
+
* The background color of every badge in the tab bar.
|
|
401
|
+
*
|
|
402
|
+
* @platform iOS
|
|
403
|
+
* @platform web
|
|
404
|
+
*/
|
|
405
|
+
badgeBackgroundColor?: ColorValue;
|
|
406
|
+
/**
|
|
407
|
+
* The blur effect applied to the tab bar, when the tab is selected
|
|
408
|
+
*
|
|
409
|
+
* @platform iOS
|
|
410
|
+
*/
|
|
411
|
+
blurEffect?: NativeTabsBlurEffect;
|
|
412
|
+
/**
|
|
413
|
+
* When set to `true`, the tab bar will not become transparent when scrolled to the edge.
|
|
414
|
+
*
|
|
415
|
+
* @platform iOS
|
|
416
|
+
*/
|
|
417
|
+
disableTransparentOnScrollEdge?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* The color of the badge text.
|
|
420
|
+
*
|
|
421
|
+
* @platform web
|
|
422
|
+
*/
|
|
423
|
+
badgeTextColor?: ColorValue;
|
|
424
|
+
/**
|
|
425
|
+
* The color of the tab indicator.
|
|
426
|
+
*
|
|
427
|
+
* @platform web
|
|
428
|
+
*/
|
|
429
|
+
indicatorColor?: ColorValue;
|
|
165
430
|
}
|
|
431
|
+
export {};
|
|
166
432
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EA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G;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC;;;;OAIG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;;;OAIG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B"}
|
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = exports.SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = exports.SUPPORTED_BLUR_EFFECTS = void 0;
|
|
4
|
+
exports.SUPPORTED_BLUR_EFFECTS = [
|
|
5
|
+
'none',
|
|
6
|
+
'systemDefault',
|
|
7
|
+
'extraLight',
|
|
8
|
+
'light',
|
|
9
|
+
'dark',
|
|
10
|
+
'regular',
|
|
11
|
+
'prominent',
|
|
12
|
+
'systemUltraThinMaterial',
|
|
13
|
+
'systemThinMaterial',
|
|
14
|
+
'systemMaterial',
|
|
15
|
+
'systemThickMaterial',
|
|
16
|
+
'systemChromeMaterial',
|
|
17
|
+
'systemUltraThinMaterialLight',
|
|
18
|
+
'systemThinMaterialLight',
|
|
19
|
+
'systemMaterialLight',
|
|
20
|
+
'systemThickMaterialLight',
|
|
21
|
+
'systemChromeMaterialLight',
|
|
22
|
+
'systemUltraThinMaterialDark',
|
|
23
|
+
'systemThinMaterialDark',
|
|
24
|
+
'systemMaterialDark',
|
|
25
|
+
'systemThickMaterialDark',
|
|
26
|
+
'systemChromeMaterialDark',
|
|
27
|
+
];
|
|
28
|
+
exports.SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [
|
|
29
|
+
'auto',
|
|
30
|
+
'selected',
|
|
31
|
+
'labeled',
|
|
32
|
+
'unlabeled',
|
|
33
|
+
];
|
|
34
|
+
exports.SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [
|
|
35
|
+
'automatic',
|
|
36
|
+
'never',
|
|
37
|
+
'onScrollDown',
|
|
38
|
+
'onScrollUp',
|
|
39
|
+
];
|
|
40
|
+
const SUPPORTED_TAB_BAR_ITEM_ROLES = [
|
|
41
|
+
'bookmarks',
|
|
42
|
+
'contacts',
|
|
43
|
+
'downloads',
|
|
44
|
+
'favorites',
|
|
45
|
+
'featured',
|
|
46
|
+
'history',
|
|
47
|
+
'more',
|
|
48
|
+
'mostRecent',
|
|
49
|
+
'mostViewed',
|
|
50
|
+
'recents',
|
|
51
|
+
'search',
|
|
52
|
+
'topRated',
|
|
53
|
+
];
|
|
3
54
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DefaultRouterOptions,\n ParamListBase,\n TabNavigationState,\n TabRouterOptions,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type { ColorValue, ImageSourcePropType, TextStyle } from 'react-native';\nimport type {\n BottomTabsProps,\n BottomTabsScreenProps,\n TabBarItemLabelVisibilityMode,\n} from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeTabOptions = Omit<\n BottomTabsScreenProps,\n | 'children'\n | 'placeholder'\n | 'onWillAppear'\n | 'onDidAppear'\n | 'onWillDisappear'\n | 'onDidDisappear'\n | 'isFocused'\n | 'tabKey'\n | 'icon'\n | 'selectedIcon'\n | 'iconResourceName'\n | 'specialEffects'\n> &\n DefaultRouterOptions & {\n /**\n * The icon to display in the tab bar.\n * @platform android\n * @platform iOS\n */\n icon?: SfSymbolOrImageSource & {\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n };\n /**\n * The icon to display when the tab is selected.\n * @platform iOS\n */\n selectedIcon?: SfSymbolOrImageSource;\n };\n\nexport type SfSymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n }\n | {\n /**\n * The image source to use as an icon.\n * @platform iOS\n */\n src?: ImageSourcePropType;\n };\n\nexport interface ExtendedNativeTabOptions extends NativeTabOptions {\n /**\n * If true, the tab will be hidden from the tab bar.\n */\n hidden?: boolean;\n specialEffects?: BottomTabsScreenProps['specialEffects'];\n}\n\nexport interface NativeTabsStyleType {\n fontFamily?: TextStyle['fontFamily'];\n fontSize?: TextStyle['fontSize'];\n fontWeight?: TextStyle['fontWeight'];\n fontStyle?: TextStyle['fontStyle'];\n color?: TextStyle['color'];\n /**\n * @platform android\n * @platform iOS\n */\n iconColor?: ColorValue;\n backgroundColor?: ColorValue;\n /**\n * @platform iOS\n */\n blurEffect?: BottomTabsScreenProps['tabBarBlurEffect'];\n tintColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * @platform android\n */\n labelVisibilityMode?: TabBarItemLabelVisibilityMode;\n /**\n * @platform android\n */\n '&:active'?: NativeTabsActiveStyleType;\n}\n\nexport interface NativeTabsActiveStyleType {\n /**\n * @platform android\n */\n color?: ColorValue;\n /**\n * @platform android\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * @platform android\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n */\n indicatorColor?: ColorValue;\n}\n\nexport interface NativeTabsProps extends PropsWithChildren {\n style?: NativeTabsStyleType;\n /**\n * https://developer.apple.com/documentation/uikit/uitabbarcontroller/tabbarminimizebehavior\n *\n * Supported values:\n * - `none` - The tab bar does not minimize.\n * - `onScrollUp` - The tab bar minimizes when scrolling up, and expands when scrolling back down. Recommended if the scroll view content is aligned to the bottom.\n * - `onScrollDown` - The tab bar minimizes when scrolling down, and expands when scrolling back up.\n * - `automatic` - Resolves to the system default minimize behavior.\n *\n * @default automatic\n *\n * @platform iOS 26\n */\n minimizeBehavior?: BottomTabsProps['tabBarMinimizeBehavior'];\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n}\n\nexport interface NativeTabsViewProps extends NativeTabsProps {\n builder: ReturnType<\n typeof useNavigationBuilder<\n TabNavigationState<ParamListBase>,\n TabRouterOptions,\n Record<string, (...args: any) => void>,\n NativeTabOptions,\n Record<string, any>\n >\n >;\n}\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n */\n hidden?: boolean;\n /**\n * The options for the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components as children to customize the tab, rather then raw options.\n */\n options?: NativeTabOptions;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n * @default false\n *\n * @platform ios\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform ios\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/types.ts"],"names":[],"mappings":";;;AA0La,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AA+JE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AA+DX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type {\n DefaultRouterOptions,\n ParamListBase,\n TabNavigationState,\n TabRouterOptions,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type { ColorValue, ImageSourcePropType, TextStyle } from 'react-native';\nimport type { BottomTabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n /**\n * The icon to display in the tab bar.\n * @platform android\n * @platform iOS\n */\n icon?: SymbolOrImageSource;\n /**\n * The icon to display when the tab is selected.\n * @platform iOS\n */\n selectedIcon?: SymbolOrImageSource;\n /**\n * Title of the tab screen, displayed in the tab bar item.\n *\n * @platform android\n * @platform iOS\n */\n title?: string;\n /**\n * Specifies content of tab bar item badge.\n *\n * On Android, the value is interpreted in the following order:\n * - If the string can be parsed to integer, displays the value as a number\n * - Otherwise if the string is empty, displays \"small dot\" badge\n * - Otherwise, displays the value as a text\n *\n * On iOS, badge is displayed as regular string.\n *\n * @platform android\n * @platform ios\n */\n badgeValue?: string;\n /**\n * The style of the tab label when the tab is selected.\n */\n selectedLabelStyle?: NativeTabsLabelStyle;\n /**\n * The style of all the tab labels, when the tab is selected\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The color of the icon when the tab is selected.\n */\n selectedIconColor?: ColorValue;\n /**\n * The color of the badge when the tab is selected.\n */\n selectedBadgeBackgroundColor?: ColorValue;\n /**\n * The color of all the badges when the tab is selected.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * The color of the background when the tab is selected.\n */\n backgroundColor?: ColorValue;\n /**\n * The blur effect to apply when the tab is selected.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the icon when the tab is selected.\n *\n * On iOS 26+ you can change the icon color in the scroll edge state.\n */\n iconColor?: ColorValue;\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The position adjustment for all the labels when the tab is selected.\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * The position adjustment for the label when the tab is selected.\n *\n * @platform iOS\n */\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType>;\n };\n\nexport interface ExtendedNativeTabOptions extends NativeTabOptions {\n /**\n * If true, the tab will be hidden from the tab bar.\n */\n hidden?: boolean;\n specialEffects?: BottomTabsScreenProps['specialEffects'];\n}\n\ntype NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n\nexport interface NativeTabsLabelStyle {\n /**\n * The font family of the tab label.\n */\n fontFamily?: TextStyle['fontFamily'];\n /**\n * The font size of the tab label.\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * The font weight of the tab label.\n */\n fontWeight?: NumericFontWeight | `${NumericFontWeight}`;\n /**\n * The font style of the tab label.\n */\n fontStyle?: TextStyle['fontStyle'];\n /**\n * The color of the tab label.\n */\n color?: TextStyle['color'];\n}\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\n/**\n * @platform android\n * @platform web\n */\nexport interface NativeTabsActiveStyleType {\n /**\n * @platform android\n * @platform web\n */\n color?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * @platform android\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?: NativeTabsLabelStyle;\n // disabledLabelStyle?: NativeTabsLabelStyle;\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue;\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue | null;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [UIKit documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n}\nexport interface NativeTabsViewProps extends NativeTabsProps {\n focusedIndex: number;\n builder: ReturnType<\n typeof useNavigationBuilder<\n TabNavigationState<ParamListBase>,\n TabRouterOptions,\n Record<string, (...args: any) => void>,\n NativeTabOptions,\n Record<string, any>\n >\n >;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n */\n hidden?: boolean;\n /**\n * The options for the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components as children to customize the tab, rather then raw options.\n */\n options?: NativeTabOptions;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n\nexport interface NativeTabsTriggerTabBarProps {\n /**\n * The style of the every tab label in the tab bar.\n *\n * @platform iOS\n * @platform web\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * The background color of the tab bar, when the tab is selected\n */\n backgroundColor?: ColorValue;\n /**\n * The color of every tab icon, when the tab is selected\n *\n * @platform iOS\n */\n iconColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n *\n * @platform iOS\n * @platform web\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * The blur effect applied to the tab bar, when the tab is selected\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The color of the badge text.\n *\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n"]}
|