expo-router 6.0.0-beta.5 → 6.0.0-beta.6

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.
Files changed (38) hide show
  1. package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts +7 -2
  2. package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.d.ts.map +1 -1
  3. package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.js +123 -50
  4. package/build/native-tabs/NativeBottomTabs/NativeTabTrigger.js.map +1 -1
  5. package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts +3 -2
  6. package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts.map +1 -1
  7. package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.d.ts +24 -0
  8. package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.d.ts.map +1 -0
  9. package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.js +28 -0
  10. package/build/native-tabs/NativeBottomTabs/NativeTabsTriggerTabBar.js.map +1 -0
  11. package/build/native-tabs/NativeBottomTabs/NativeTabsView.d.ts.map +1 -1
  12. package/build/native-tabs/NativeBottomTabs/NativeTabsView.js +78 -18
  13. package/build/native-tabs/NativeBottomTabs/NativeTabsView.js.map +1 -1
  14. package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.d.ts.map +1 -1
  15. package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js +57 -27
  16. package/build/native-tabs/NativeBottomTabs/NativeTabsView.web.js.map +1 -1
  17. package/build/native-tabs/NativeBottomTabs/appearance.d.ts +20 -0
  18. package/build/native-tabs/NativeBottomTabs/appearance.d.ts.map +1 -0
  19. package/build/native-tabs/NativeBottomTabs/appearance.js +131 -0
  20. package/build/native-tabs/NativeBottomTabs/appearance.js.map +1 -0
  21. package/build/native-tabs/NativeBottomTabs/types.d.ts +238 -77
  22. package/build/native-tabs/NativeBottomTabs/types.d.ts.map +1 -1
  23. package/build/native-tabs/NativeBottomTabs/types.js +14 -0
  24. package/build/native-tabs/NativeBottomTabs/types.js.map +1 -1
  25. package/build/native-tabs/NativeBottomTabs/utils.d.ts +2 -1
  26. package/build/native-tabs/NativeBottomTabs/utils.d.ts.map +1 -1
  27. package/build/native-tabs/NativeBottomTabs/utils.js +7 -0
  28. package/build/native-tabs/NativeBottomTabs/utils.js.map +1 -1
  29. package/build/native-tabs/common/elements.d.ts +41 -21
  30. package/build/native-tabs/common/elements.d.ts.map +1 -1
  31. package/build/native-tabs/common/elements.js.map +1 -1
  32. package/build/native-tabs/index.d.ts +2 -1
  33. package/build/native-tabs/index.d.ts.map +1 -1
  34. package/build/native-tabs/index.js +3 -1
  35. package/build/native-tabs/index.js.map +1 -1
  36. package/ios/ExpoHead.podspec +2 -0
  37. package/package.json +5 -5
  38. package/plugin/tsconfig.tsbuildinfo +0 -1
@@ -9,18 +9,12 @@ export interface NativeTabOptions extends DefaultRouterOptions {
9
9
  * @platform android
10
10
  * @platform iOS
11
11
  */
12
- icon?: SfSymbolOrImageSource & {
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?: SfSymbolOrImageSource;
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 name of the SF Symbol to use as an icon.
49
- * @platform iOS
40
+ * The style of the tab label when the tab is selected.
50
41
  */
51
- sf?: SFSymbol;
52
- } | {
42
+ selectedLabelStyle?: NativeTabsLabelStyle;
53
43
  /**
54
- * The image source to use as an icon.
55
- * @platform iOS
44
+ * The style of all the tab labels, when the tab is selected
56
45
  */
57
- src?: ImageSourcePropType;
58
- };
59
- export interface ExtendedNativeTabOptions extends NativeTabOptions {
46
+ labelStyle?: NativeTabsLabelStyle;
60
47
  /**
61
- * If true, the tab will be hidden from the tab bar.
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
- hidden?: boolean;
64
- specialEffects?: BottomTabsScreenProps['specialEffects'];
65
- }
66
- type NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
67
- export interface NativeTabsStyleType {
68
- fontFamily?: TextStyle['fontFamily'];
69
- fontSize?: TextStyle['fontSize'];
70
- fontWeight?: NumericFontWeight | `${NumericFontWeight}`;
71
- fontStyle?: TextStyle['fontStyle'];
72
- color?: TextStyle['color'];
58
+ role?: NativeTabsTabBarItemRole;
59
+ /**
60
+ * The color of the icon when the tab is selected.
61
+ */
62
+ selectedIconColor?: ColorValue;
73
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
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
- * @platform tvOS
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
- * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)
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
- * Specifies the blur effect applied to the tab bar.
91
- *
92
- * Works with backgroundColor's alpha < 1.
93
- *
94
- * This property does not affect the tab bar starting from iOS 26.
110
+ * The position adjustment for the label when the tab is selected.
95
111
  *
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
- blurEffect?: NativeTabsBlurEffect;
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
- tintColor?: ColorValue;
116
- badgeBackgroundColor?: ColorValue;
124
+ indicatorColor?: ColorValue;
125
+ }
126
+ export type SymbolOrImageSource = {
117
127
  /**
118
- * @platform android
119
- * @platform web
128
+ * The name of the SF Symbol to use as an icon.
129
+ * @platform iOS
120
130
  */
121
- badgeTextColor?: ColorValue;
131
+ sf?: SFSymbol;
122
132
  /**
133
+ * The name of the drawable resource to use as an icon.
123
134
  * @platform android
124
135
  */
125
- rippleColor?: ColorValue;
136
+ drawable?: string;
137
+ } | {
126
138
  /**
127
- * Specifies the label visibility mode.
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
- labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;
141
+ src?: ImageSourcePropType;
142
+ };
143
+ export interface ExtendedNativeTabOptions extends NativeTabOptions {
143
144
  /**
144
- * @platform android
145
- * @platform web
145
+ * If true, the tab will be hidden from the tab bar.
146
+ */
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.
146
166
  */
147
- '&:active'?: NativeTabsActiveStyleType;
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
  /**
@@ -176,8 +200,32 @@ export interface NativeTabsActiveStyleType {
176
200
  */
177
201
  indicatorColor?: ColorValue;
178
202
  }
203
+ export type TypeOrRecord<T, K extends string> = T | {
204
+ [key in K]?: T;
205
+ };
179
206
  export interface NativeTabsProps extends PropsWithChildren {
180
- style?: NativeTabsStyleType;
207
+ /**
208
+ * The style of the every tab label in the tab bar.
209
+ */
210
+ labelStyle?: NativeTabsLabelStyle;
211
+ /**
212
+ * The color of every tab icon in the tab bar.
213
+ */
214
+ iconColor?: ColorValue;
215
+ /**
216
+ * The tint color of the tab icon.
217
+ *
218
+ * Can be overridden by icon color and label color for each tab individually.
219
+ */
220
+ tintColor?: ColorValue;
221
+ /**
222
+ * The background color of the tab bar.
223
+ */
224
+ backgroundColor?: ColorValue | null;
225
+ /**
226
+ * The background color of every badge in the tab bar.
227
+ */
228
+ badgeBackgroundColor?: ColorValue;
181
229
  /**
182
230
  * Specifies the minimize behavior for the tab bar.
183
231
  *
@@ -199,6 +247,27 @@ export interface NativeTabsProps extends PropsWithChildren {
199
247
  * @platform iOS 26+
200
248
  */
201
249
  minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;
250
+ /**
251
+ * The blur effect applied to the tab bar.
252
+ *
253
+ * @platform iOS
254
+ */
255
+ blurEffect?: NativeTabsBlurEffect;
256
+ /**
257
+ * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)
258
+ *
259
+ * @platform iOS
260
+ */
261
+ titlePositionAdjustment?: {
262
+ horizontal?: number;
263
+ vertical?: number;
264
+ };
265
+ /**
266
+ * When set to `true`, the tab bar will not become transparent when scrolled to the edge.
267
+ *
268
+ * @platform iOS
269
+ */
270
+ disableTransparentOnScrollEdge?: boolean;
202
271
  /**
203
272
  * Disables the active indicator for the tab bar.
204
273
  *
@@ -211,6 +280,34 @@ export interface NativeTabsProps extends PropsWithChildren {
211
280
  * @platform android
212
281
  */
213
282
  backBehavior?: 'none' | 'initialRoute' | 'history';
283
+ /**
284
+ * The visibility mode of the tab item label.
285
+ *
286
+ * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)
287
+ *
288
+ * @platform android
289
+ */
290
+ labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;
291
+ /**
292
+ * The color of the ripple effect when the tab is pressed.
293
+ *
294
+ * @platform android
295
+ */
296
+ rippleColor?: ColorValue;
297
+ /**
298
+ * The color of the tab indicator.
299
+ *
300
+ * @platform android
301
+ * @platform web
302
+ */
303
+ indicatorColor?: ColorValue;
304
+ /**
305
+ * The color of the badge text.
306
+ *
307
+ * @platform android
308
+ * @platform web
309
+ */
310
+ badgeTextColor?: ColorValue;
214
311
  }
215
312
  export interface NativeTabsViewProps extends NativeTabsProps {
216
313
  focusedIndex: number;
@@ -269,6 +366,70 @@ export interface NativeTabTriggerProps {
269
366
  * Use `Icon`, `Label`, and `Badge` components to customize the tab.
270
367
  */
271
368
  children?: React.ReactNode;
369
+ /**
370
+ * System-provided tab bar item with predefined icon and title
371
+ *
372
+ * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with
373
+ * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`
374
+ * properties will override the system icon, but the system-defined title cannot
375
+ * be customized.
376
+ *
377
+ * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}
378
+ * @platform ios
379
+ */
380
+ role?: NativeTabsTabBarItemRole;
381
+ }
382
+ declare const SUPPORTED_TAB_BAR_ITEM_ROLES: readonly ["bookmarks", "contacts", "downloads", "favorites", "featured", "history", "more", "mostRecent", "mostViewed", "recents", "search", "topRated"];
383
+ export type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];
384
+ export interface NativeTabsTriggerTabBarProps {
385
+ /**
386
+ * The style of the every tab label in the tab bar.
387
+ *
388
+ * @platform iOS
389
+ * @platform web
390
+ */
391
+ labelStyle?: NativeTabsLabelStyle;
392
+ /**
393
+ * The background color of the tab bar, when the tab is selected
394
+ */
395
+ backgroundColor?: ColorValue;
396
+ /**
397
+ * The color of every tab icon, when the tab is selected
398
+ *
399
+ * @platform iOS
400
+ */
401
+ iconColor?: ColorValue;
402
+ /**
403
+ * The background color of every badge in the tab bar.
404
+ *
405
+ * @platform iOS
406
+ * @platform web
407
+ */
408
+ badgeBackgroundColor?: ColorValue;
409
+ /**
410
+ * The blur effect applied to the tab bar, when the tab is selected
411
+ *
412
+ * @platform iOS
413
+ */
414
+ blurEffect?: NativeTabsBlurEffect;
415
+ /**
416
+ * When set to `true`, the tab bar will not become transparent when scrolled to the edge.
417
+ *
418
+ * @platform iOS
419
+ */
420
+ disableTransparentOnScrollEdge?: boolean;
421
+ /**
422
+ * The color of the badge text.
423
+ *
424
+ * @platform web
425
+ */
426
+ badgeTextColor?: ColorValue;
427
+ /**
428
+ * The color of the tab indicator.
429
+ *
430
+ * @platform web
431
+ */
432
+ indicatorColor?: ColorValue;
272
433
  }
273
434
  export {};
274
435
  //# 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,mB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AC3C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;;;OAIG;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"}
@@ -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;AAqKE,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;\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 type TypeOrRecord<T, K extends string> =\n | T\n | {\n [key in K]?: T;\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,7 +1,8 @@
1
1
  import type { JSXElementConstructor, ReactNode } from 'react';
2
2
  import React from 'react';
3
- import type { ExtendedNativeTabOptions } from './types';
3
+ import type { ExtendedNativeTabOptions, TypeOrRecord } from './types';
4
4
  export declare function filterAllowedChildrenElements<Components extends JSXElementConstructor<any>[]>(children: ReactNode | ReactNode[], components: Components): React.ReactElement<React.ComponentProps<Components[number]>, Components[number]>[];
5
5
  export declare function isChildOfType<T extends JSXElementConstructor<any>>(child: ReactNode, type: T): child is React.ReactElement<React.ComponentProps<T>, T>;
6
6
  export declare function shouldTabBeVisible(options: ExtendedNativeTabOptions): boolean;
7
+ export declare function getValueFromTypeOrRecord<T, K extends string>(value: TypeOrRecord<T, K> | undefined, key: K): T | undefined;
7
8
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,6BAA6B,CAAC,UAAU,SAAS,qB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C,CAAC,CAAC,EAAE,CAAC,CAAC,CAEzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAI7E;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC1D,KAAK,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,EACrC,GAAG,EAAE,CAAC,GACL,CAAC,GAAG,SAAS,CAKf"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.filterAllowedChildrenElements = filterAllowedChildrenElements;
7
7
  exports.isChildOfType = isChildOfType;
8
8
  exports.shouldTabBeVisible = shouldTabBeVisible;
9
+ exports.getValueFromTypeOrRecord = getValueFromTypeOrRecord;
9
10
  const react_1 = __importDefault(require("react"));
10
11
  function filterAllowedChildrenElements(children, components) {
11
12
  return react_1.default.Children.toArray(children).filter((child) => react_1.default.isValidElement(child) && components.includes(child.type));
@@ -18,4 +19,10 @@ function shouldTabBeVisible(options) {
18
19
  // If it is not defined, then it was not specified, and we should hide the tab.
19
20
  return options.hidden === false;
20
21
  }
22
+ function getValueFromTypeOrRecord(value, key) {
23
+ if (value && typeof value === 'object' && key in value) {
24
+ return value[key];
25
+ }
26
+ return value;
27
+ }
21
28
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/utils.ts"],"names":[],"mappings":";;;;;AAKA,sEAUC;AAED,sCAKC;AAED,gDAIC;AA3BD,kDAA0B;AAI1B,SAAgB,6BAA6B,CAC3C,QAAiC,EACjC,UAAsB;IAEtB,OAAO,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC5C,CACE,KAAK,EACsF,EAAE,CAC7F,eAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAiC,CAAC,CAC9F,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,KAAgB,EAChB,IAAO;IAEP,OAAO,eAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AAC5D,CAAC;AAED,SAAgB,kBAAkB,CAAC,OAAiC;IAClE,yEAAyE;IACzE,+EAA+E;IAC/E,OAAO,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC;AAClC,CAAC","sourcesContent":["import type { JSXElementConstructor, ReactNode } from 'react';\nimport React from 'react';\n\nimport type { ExtendedNativeTabOptions } from './types';\n\nexport function filterAllowedChildrenElements<Components extends JSXElementConstructor<any>[]>(\n children: ReactNode | ReactNode[],\n components: Components\n): React.ReactElement<React.ComponentProps<Components[number]>, Components[number]>[] {\n return React.Children.toArray(children).filter(\n (\n child\n ): child is React.ReactElement<React.ComponentProps<Components[number]>, Components[number]> =>\n React.isValidElement(child) && components.includes(child.type as (props: any) => ReactNode)\n );\n}\n\nexport function isChildOfType<T extends JSXElementConstructor<any>>(\n child: ReactNode,\n type: T\n): child is React.ReactElement<React.ComponentProps<T>, T> {\n return React.isValidElement(child) && child.type === type;\n}\n\nexport function shouldTabBeVisible(options: ExtendedNativeTabOptions): boolean {\n // The <NativeTab.Trigger> always sets `hidden` to defined boolean value.\n // If it is not defined, then it was not specified, and we should hide the tab.\n return options.hidden === false;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/native-tabs/NativeBottomTabs/utils.ts"],"names":[],"mappings":";;;;;AAKA,sEAUC;AAED,sCAKC;AAED,gDAIC;AAED,4DAQC;AArCD,kDAA0B;AAI1B,SAAgB,6BAA6B,CAC3C,QAAiC,EACjC,UAAsB;IAEtB,OAAO,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC5C,CACE,KAAK,EACsF,EAAE,CAC7F,eAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAiC,CAAC,CAC9F,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,KAAgB,EAChB,IAAO;IAEP,OAAO,eAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AAC5D,CAAC;AAED,SAAgB,kBAAkB,CAAC,OAAiC;IAClE,yEAAyE;IACzE,+EAA+E;IAC/E,OAAO,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC;AAClC,CAAC;AAED,SAAgB,wBAAwB,CACtC,KAAqC,EACrC,GAAM;IAEN,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG,IAAI,KAAK,EAAE,CAAC;QACvD,OAAQ,KAAyB,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,KAAsB,CAAC;AAChC,CAAC","sourcesContent":["import type { JSXElementConstructor, ReactNode } from 'react';\nimport React from 'react';\n\nimport type { ExtendedNativeTabOptions, TypeOrRecord } from './types';\n\nexport function filterAllowedChildrenElements<Components extends JSXElementConstructor<any>[]>(\n children: ReactNode | ReactNode[],\n components: Components\n): React.ReactElement<React.ComponentProps<Components[number]>, Components[number]>[] {\n return React.Children.toArray(children).filter(\n (\n child\n ): child is React.ReactElement<React.ComponentProps<Components[number]>, Components[number]> =>\n React.isValidElement(child) && components.includes(child.type as (props: any) => ReactNode)\n );\n}\n\nexport function isChildOfType<T extends JSXElementConstructor<any>>(\n child: ReactNode,\n type: T\n): child is React.ReactElement<React.ComponentProps<T>, T> {\n return React.isValidElement(child) && child.type === type;\n}\n\nexport function shouldTabBeVisible(options: ExtendedNativeTabOptions): boolean {\n // The <NativeTab.Trigger> always sets `hidden` to defined boolean value.\n // If it is not defined, then it was not specified, and we should hide the tab.\n return options.hidden === false;\n}\n\nexport function getValueFromTypeOrRecord<T, K extends string>(\n value: TypeOrRecord<T, K> | undefined,\n key: K\n): T | undefined {\n if (value && typeof value === 'object' && key in value) {\n return (value as { [k in K]: T })[key];\n }\n return value as T | undefined;\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, TypeOrRecord } 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,59 @@ 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
- * The image source to use as an icon when the tab is selected.
23
- * @platform iOS
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?: TypeOrRecord<ImageSourcePropType, 'default' | 'selected'>;
39
+ drawable?: never;
31
40
  sf?: never;
32
- selectedSf?: never;
33
41
  }
34
42
  export interface NamedIconCombination {
35
43
  /**
36
44
  * The name of the SF Symbol to use as an icon.
45
+ *
46
+ * The value can be provided in two ways:
47
+ * - As a string with the SF Symbol name
48
+ * - As an object specifying the default and selected states
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * <Icon sf="magnifyingglass" />
53
+ * ```
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * <Icon sf={{ default: "house", selected: "house.fill" }} />
58
+ * ```
59
+ *
37
60
  * @platform iOS
38
61
  */
39
- sf?: SFSymbol;
40
- /**
41
- * The name of the SF Symbol to use as an icon when the tab is selected.
42
- * @platform iOS
43
- */
44
- selectedSf?: SFSymbol;
62
+ sf?: TypeOrRecord<SFSymbol, 'default' | 'selected'>;
45
63
  /**
46
64
  * The name of the drawable resource to use as an icon.
47
65
  * @platform android
48
66
  */
49
67
  drawable?: string;
50
68
  src?: never;
51
- selectedSrc?: never;
52
69
  }
53
- export type IconProps = NamedIconCombination | SourceIconCombination;
70
+ export type IconProps = {
71
+ selectedColor?: ColorValue;
72
+ } & (NamedIconCombination | SourceIconCombination);
54
73
  /**
55
74
  * Renders an icon for the tab.
56
75
  *
@@ -69,6 +88,7 @@ export interface BadgeProps {
69
88
  * @default false
70
89
  */
71
90
  hidden?: boolean;
91
+ selectedBackgroundColor?: ColorValue;
72
92
  }
73
93
  export declare function Badge(props: BadgeProps): null;
74
94
  //# sourceMappingURL=elements.d.ts.map