expo-router 6.0.0-beta.5 → 6.0.0-beta.7
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/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts +9 -2
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.js +136 -49
- 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.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.js +115 -18
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.js.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js +57 -27
- package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js.map +1 -1
- 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 +131 -0
- package/build/native-tabs/NativeBottomTabs/appearance.js.map +1 -0
- package/build/native-tabs/NativeBottomTabs/types.d.ts +235 -77
- package/build/native-tabs/NativeBottomTabs/types.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabs/types.js +14 -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/ios/ExpoHead.podspec +2 -0
- package/package.json +5 -5
|
@@ -9,18 +9,12 @@ export interface NativeTabOptions extends DefaultRouterOptions {
|
|
|
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?:
|
|
17
|
+
selectedIcon?: SymbolOrImageSource;
|
|
24
18
|
/**
|
|
25
19
|
* Title of the tab screen, displayed in the tab bar item.
|
|
26
20
|
*
|
|
@@ -42,43 +36,69 @@ export interface NativeTabOptions extends DefaultRouterOptions {
|
|
|
42
36
|
* @platform ios
|
|
43
37
|
*/
|
|
44
38
|
badgeValue?: string;
|
|
45
|
-
}
|
|
46
|
-
export type SfSymbolOrImageSource = {
|
|
47
39
|
/**
|
|
48
|
-
* The
|
|
49
|
-
* @platform iOS
|
|
40
|
+
* The style of the tab label when the tab is selected.
|
|
50
41
|
*/
|
|
51
|
-
|
|
52
|
-
} | {
|
|
42
|
+
selectedLabelStyle?: NativeTabsLabelStyle;
|
|
53
43
|
/**
|
|
54
|
-
* The
|
|
55
|
-
* @platform iOS
|
|
44
|
+
* The style of all the tab labels, when the tab is selected
|
|
56
45
|
*/
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
export interface ExtendedNativeTabOptions extends NativeTabOptions {
|
|
46
|
+
labelStyle?: NativeTabsLabelStyle;
|
|
60
47
|
/**
|
|
61
|
-
*
|
|
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
|
|
62
57
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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;
|
|
73
71
|
/**
|
|
72
|
+
* The color of the badge text.
|
|
73
|
+
*
|
|
74
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
|
+
*
|
|
75
85
|
* @platform iOS
|
|
76
|
-
|
|
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.
|
|
77
92
|
*/
|
|
78
93
|
iconColor?: ColorValue;
|
|
79
|
-
backgroundColor?: ColorValue;
|
|
80
94
|
/**
|
|
81
|
-
*
|
|
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.
|
|
82
102
|
*
|
|
83
103
|
* @platform iOS
|
|
84
104
|
*/
|
|
@@ -87,64 +107,68 @@ export interface NativeTabsStyleType {
|
|
|
87
107
|
vertical?: number;
|
|
88
108
|
};
|
|
89
109
|
/**
|
|
90
|
-
*
|
|
110
|
+
* The position adjustment for the label when the tab is selected.
|
|
91
111
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* This property does not affect the tab bar starting from iOS 26.
|
|
95
|
-
*
|
|
96
|
-
* The following values are currently supported:
|
|
97
|
-
*
|
|
98
|
-
* - `none`: disables blur effect
|
|
99
|
-
* - `systemDefault`: uses UIKit's default tab bar blur effect
|
|
100
|
-
* - one of styles mapped from UIKit's UIBlurEffectStyle. For example, `systemUltraThinMaterial`
|
|
101
|
-
*
|
|
102
|
-
* Complete list of possible blur effect styles is available in the official UIKit documentation:
|
|
103
|
-
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)
|
|
104
|
-
*
|
|
105
|
-
* @default systemDefault
|
|
106
|
-
*
|
|
107
|
-
* @platform iOS ≤ 18
|
|
112
|
+
* @platform iOS
|
|
108
113
|
*/
|
|
109
|
-
|
|
114
|
+
selectedTitlePositionAdjustment?: {
|
|
115
|
+
horizontal?: number;
|
|
116
|
+
vertical?: number;
|
|
117
|
+
};
|
|
110
118
|
/**
|
|
119
|
+
* The color of the tab indicator.
|
|
120
|
+
*
|
|
111
121
|
* @platform android
|
|
112
|
-
* @platform iOS
|
|
113
122
|
* @platform web
|
|
114
123
|
*/
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
indicatorColor?: ColorValue;
|
|
125
|
+
}
|
|
126
|
+
export type SymbolOrImageSource = {
|
|
117
127
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @platform
|
|
128
|
+
* The name of the SF Symbol to use as an icon.
|
|
129
|
+
* @platform iOS
|
|
120
130
|
*/
|
|
121
|
-
|
|
131
|
+
sf?: SFSymbol;
|
|
122
132
|
/**
|
|
133
|
+
* The name of the drawable resource to use as an icon.
|
|
123
134
|
* @platform android
|
|
124
135
|
*/
|
|
125
|
-
|
|
136
|
+
drawable?: string;
|
|
137
|
+
} | {
|
|
126
138
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* The label visibility mode defines when the labels of each item bar should be displayed.
|
|
130
|
-
*
|
|
131
|
-
* The following values are available:
|
|
132
|
-
* - `auto`: the label behaves as in "labeled" mode when there are 3 items or less, or as in "selected" mode when there are 4 items or more
|
|
133
|
-
* - `selected`: the label is only shown on the selected navigation item
|
|
134
|
-
* - `labeled`: the label is shown on all navigation items
|
|
135
|
-
* - `unlabeled`: the label is hidden for all navigation items
|
|
136
|
-
*
|
|
137
|
-
* @see The supported values correspond to the official [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible).
|
|
138
|
-
*
|
|
139
|
-
* @default auto
|
|
140
|
-
* @platform android
|
|
139
|
+
* The image source to use as an icon.
|
|
141
140
|
*/
|
|
142
|
-
|
|
141
|
+
src?: ImageSourcePropType | Promise<ImageSourcePropType>;
|
|
142
|
+
};
|
|
143
|
+
export interface ExtendedNativeTabOptions extends NativeTabOptions {
|
|
143
144
|
/**
|
|
144
|
-
*
|
|
145
|
-
* @platform web
|
|
145
|
+
* If true, the tab will be hidden from the tab bar.
|
|
146
146
|
*/
|
|
147
|
-
|
|
147
|
+
hidden?: boolean;
|
|
148
|
+
specialEffects?: BottomTabsScreenProps['specialEffects'];
|
|
149
|
+
}
|
|
150
|
+
type NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
151
|
+
export interface NativeTabsLabelStyle {
|
|
152
|
+
/**
|
|
153
|
+
* The font family of the tab label.
|
|
154
|
+
*/
|
|
155
|
+
fontFamily?: TextStyle['fontFamily'];
|
|
156
|
+
/**
|
|
157
|
+
* The font size of the tab label.
|
|
158
|
+
*/
|
|
159
|
+
fontSize?: TextStyle['fontSize'];
|
|
160
|
+
/**
|
|
161
|
+
* The font weight of the tab label.
|
|
162
|
+
*/
|
|
163
|
+
fontWeight?: NumericFontWeight | `${NumericFontWeight}`;
|
|
164
|
+
/**
|
|
165
|
+
* The font style of the tab label.
|
|
166
|
+
*/
|
|
167
|
+
fontStyle?: TextStyle['fontStyle'];
|
|
168
|
+
/**
|
|
169
|
+
* The color of the tab label.
|
|
170
|
+
*/
|
|
171
|
+
color?: TextStyle['color'];
|
|
148
172
|
}
|
|
149
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"];
|
|
150
174
|
/**
|
|
@@ -177,7 +201,28 @@ export interface NativeTabsActiveStyleType {
|
|
|
177
201
|
indicatorColor?: ColorValue;
|
|
178
202
|
}
|
|
179
203
|
export interface NativeTabsProps extends PropsWithChildren {
|
|
180
|
-
|
|
204
|
+
/**
|
|
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;
|
|
181
226
|
/**
|
|
182
227
|
* Specifies the minimize behavior for the tab bar.
|
|
183
228
|
*
|
|
@@ -199,6 +244,27 @@ export interface NativeTabsProps extends PropsWithChildren {
|
|
|
199
244
|
* @platform iOS 26+
|
|
200
245
|
*/
|
|
201
246
|
minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;
|
|
247
|
+
/**
|
|
248
|
+
* The blur effect applied to the tab bar.
|
|
249
|
+
*
|
|
250
|
+
* @platform iOS
|
|
251
|
+
*/
|
|
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;
|
|
202
268
|
/**
|
|
203
269
|
* Disables the active indicator for the tab bar.
|
|
204
270
|
*
|
|
@@ -211,6 +277,34 @@ export interface NativeTabsProps extends PropsWithChildren {
|
|
|
211
277
|
* @platform android
|
|
212
278
|
*/
|
|
213
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;
|
|
214
308
|
}
|
|
215
309
|
export interface NativeTabsViewProps extends NativeTabsProps {
|
|
216
310
|
focusedIndex: number;
|
|
@@ -269,6 +363,70 @@ export interface NativeTabTriggerProps {
|
|
|
269
363
|
* Use `Icon`, `Label`, and `Badge` components to customize the tab.
|
|
270
364
|
*/
|
|
271
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;
|
|
272
430
|
}
|
|
273
431
|
export {};
|
|
274
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,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D;;;;OAIG;IACH,IAAI,CAAC,EAAE,
|
|
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,E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U,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"}
|
|
@@ -37,4 +37,18 @@ exports.SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [
|
|
|
37
37
|
'onScrollDown',
|
|
38
38
|
'onScrollUp',
|
|
39
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
|
+
];
|
|
40
54
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/types.ts"],"names":[],"mappings":";;;AAkKa,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;AAkFE,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","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?: 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 * 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\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\ntype NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n\nexport interface NativeTabsStyleType {\n fontFamily?: TextStyle['fontFamily'];\n fontSize?: TextStyle['fontSize'];\n fontWeight?: NumericFontWeight | `${NumericFontWeight}`;\n fontStyle?: TextStyle['fontStyle'];\n color?: TextStyle['color'];\n /**\n * @platform android\n * @platform iOS\n * @platform tvOS\n */\n iconColor?: ColorValue;\n backgroundColor?: ColorValue;\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 * Specifies the blur effect applied to the tab bar.\n *\n * Works with backgroundColor's alpha < 1.\n *\n * This property does not affect the tab bar starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `none`: disables blur effect\n * - `systemDefault`: uses UIKit's default tab bar blur effect\n * - one of styles mapped from UIKit's UIBlurEffectStyle. For example, `systemUltraThinMaterial`\n *\n * Complete list of possible blur effect styles is available in the official UIKit documentation:\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n *\n * @default systemDefault\n *\n * @platform iOS ≤ 18\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n tintColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * Specifies the label visibility mode.\n *\n * The label visibility mode defines when the labels of each item bar should be displayed.\n *\n * The following values are available:\n * - `auto`: the label behaves as in \"labeled\" mode when there are 3 items or less, or as in \"selected\" mode when there are 4 items or more\n * - `selected`: the label is only shown on the selected navigation item\n * - `labeled`: the label is shown on all navigation items\n * - `unlabeled`: the label is hidden for all navigation items\n *\n * @see The supported values correspond to the official [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible).\n *\n * @default auto\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * @platform android\n * @platform web\n */\n '&:active'?: NativeTabsActiveStyleType;\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 style?: NativeTabsStyleType;\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 * 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}\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"]}
|
|
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"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { ImageSourcePropType } from 'react-native';
|
|
1
|
+
import type { ColorValue, ImageSourcePropType } from 'react-native';
|
|
2
2
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
3
|
+
import type { NativeTabsLabelStyle } from '../NativeBottomTabs/types';
|
|
3
4
|
export interface LabelProps {
|
|
4
5
|
/**
|
|
5
6
|
* The text to display as the label for the tab.
|
|
6
7
|
*/
|
|
7
8
|
children?: string;
|
|
9
|
+
selectedStyle?: NativeTabsLabelStyle;
|
|
8
10
|
/**
|
|
9
11
|
* If true, the label will be hidden.
|
|
10
12
|
* @default false
|
|
@@ -15,42 +17,65 @@ export declare function Label(props: LabelProps): null;
|
|
|
15
17
|
export interface SourceIconCombination {
|
|
16
18
|
/**
|
|
17
19
|
* The image source to use as an icon.
|
|
20
|
+
*
|
|
21
|
+
* The value can be provided in two ways:
|
|
22
|
+
* - As an image source
|
|
23
|
+
* - As an object specifying the default and selected states
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Icon src={require('./path/to/icon.png')} />
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Icon src={{ default: require('./path/to/icon.png'), selected: require('./path/to/icon-selected.png') }} />
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @platform Android
|
|
18
36
|
* @platform iOS
|
|
19
37
|
*/
|
|
20
|
-
src?: ImageSourcePropType
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
selectedSrc?: ImageSourcePropType;
|
|
26
|
-
/**
|
|
27
|
-
* The name of the drawable resource to use as an icon.
|
|
28
|
-
* @platform android
|
|
29
|
-
*/
|
|
30
|
-
drawable?: string;
|
|
38
|
+
src?: ImageSourcePropType | React.ReactElement | {
|
|
39
|
+
default?: ImageSourcePropType | React.ReactElement;
|
|
40
|
+
selected: ImageSourcePropType | React.ReactElement;
|
|
41
|
+
};
|
|
42
|
+
drawable?: never;
|
|
31
43
|
sf?: never;
|
|
32
|
-
selectedSf?: never;
|
|
33
44
|
}
|
|
34
45
|
export interface NamedIconCombination {
|
|
35
46
|
/**
|
|
36
47
|
* The name of the SF Symbol to use as an icon.
|
|
48
|
+
*
|
|
49
|
+
* The value can be provided in two ways:
|
|
50
|
+
* - As a string with the SF Symbol name
|
|
51
|
+
* - As an object specifying the default and selected states
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Icon sf="magnifyingglass" />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Icon sf={{ default: "house", selected: "house.fill" }} />
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
37
63
|
* @platform iOS
|
|
38
64
|
*/
|
|
39
|
-
sf?: SFSymbol
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
selectedSf?: SFSymbol;
|
|
65
|
+
sf?: SFSymbol | {
|
|
66
|
+
default?: SFSymbol;
|
|
67
|
+
selected: SFSymbol;
|
|
68
|
+
};
|
|
45
69
|
/**
|
|
46
70
|
* The name of the drawable resource to use as an icon.
|
|
47
71
|
* @platform android
|
|
48
72
|
*/
|
|
49
73
|
drawable?: string;
|
|
50
74
|
src?: never;
|
|
51
|
-
selectedSrc?: never;
|
|
52
75
|
}
|
|
53
|
-
export type IconProps =
|
|
76
|
+
export type IconProps = {
|
|
77
|
+
selectedColor?: ColorValue;
|
|
78
|
+
} & (NamedIconCombination | SourceIconCombination);
|
|
54
79
|
/**
|
|
55
80
|
* Renders an icon for the tab.
|
|
56
81
|
*
|
|
@@ -58,6 +83,43 @@ export type IconProps = NamedIconCombination | SourceIconCombination;
|
|
|
58
83
|
* @platform android
|
|
59
84
|
*/
|
|
60
85
|
export declare function Icon(props: IconProps): null;
|
|
86
|
+
export interface VectorIconProps<NameT extends string> {
|
|
87
|
+
/**
|
|
88
|
+
* The family of the vector icon.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
family: {
|
|
96
|
+
getImageSource: (name: NameT, size: number, color: ColorValue) => Promise<ImageSourcePropType>;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The name of the vector icon.
|
|
100
|
+
*/
|
|
101
|
+
name: NameT;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Helper component which can be used to load vector icons for `NativeTabs`.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```tsx
|
|
108
|
+
* import { NativeTabs, VectorIcon } from 'expo-router';
|
|
109
|
+
* import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
110
|
+
*
|
|
111
|
+
* export default Layout(){
|
|
112
|
+
* return (
|
|
113
|
+
* <NativeTabs>
|
|
114
|
+
* <NativeTabs.Trigger name="index">
|
|
115
|
+
* <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
|
|
116
|
+
* </NativeTabs.Trigger>
|
|
117
|
+
* </NativeTabs>
|
|
118
|
+
* );
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare function VectorIcon<NameT extends string>(props: VectorIconProps<NameT>): null;
|
|
61
123
|
export interface BadgeProps {
|
|
62
124
|
/**
|
|
63
125
|
* The text to display as the badge for the tab.
|
|
@@ -69,6 +131,7 @@ export interface BadgeProps {
|
|
|
69
131
|
* @default false
|
|
70
132
|
*/
|
|
71
133
|
hidden?: boolean;
|
|
134
|
+
selectedBackgroundColor?: ColorValue;
|
|
72
135
|
}
|
|
73
136
|
export declare function Badge(props: BadgeProps): null;
|
|
74
137
|
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,QAEtC;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,CAAC,EACA,mBAAmB,GACnB,KAAK,CAAC,YAAY,GAClB;QACE,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,CAAC;QACnD,QAAQ,EAAE,mBAAmB,GAAG,KAAK,CA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