@react-navigation/native-stack 8.0.0-alpha.5 → 8.0.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createNativeStackNavigator.js +4 -8
- package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/utils/useAnimatedHeaderHeight.js +1 -1
- package/lib/module/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/module/utils/useInvalidPreventRemoveError.js +1 -1
- package/lib/module/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/module/views/FooterComponent.js +1 -1
- package/lib/module/views/FooterComponent.js.map +1 -1
- package/lib/module/views/NativeStackView.js +42 -25
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +115 -71
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/module/views/useHeaderConfigProps.js +76 -23
- package/lib/module/views/useHeaderConfigProps.js.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts +10 -15
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +164 -156
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +1 -1
- package/lib/typescript/src/utils/useInvalidPreventRemoveError.d.ts +1 -1
- package/lib/typescript/src/utils/useInvalidPreventRemoveError.d.ts.map +1 -1
- package/lib/typescript/src/views/FooterComponent.d.ts +2 -2
- package/lib/typescript/src/views/FooterComponent.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.native.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts +2 -3
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts.map +1 -1
- package/package.json +22 -19
- package/src/index.tsx +1 -2
- package/src/navigators/createNativeStackNavigator.tsx +11 -47
- package/src/types.tsx +225 -196
- package/src/utils/useAnimatedHeaderHeight.tsx +1 -1
- package/src/utils/useInvalidPreventRemoveError.tsx +2 -1
- package/src/views/FooterComponent.tsx +1 -1
- package/src/views/NativeStackView.native.tsx +171 -92
- package/src/views/NativeStackView.tsx +70 -41
- package/src/views/useHeaderConfigProps.tsx +109 -39
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Icon } from '@react-navigation/elements';
|
|
1
2
|
import type { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions, Theme } from '@react-navigation/native';
|
|
2
|
-
import
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
5
|
import type { ScreenProps, ScreenStackHeaderConfigProps, ScrollEdgeEffect, SearchBarProps } from 'react-native-screens';
|
|
4
|
-
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
5
6
|
export type NativeStackNavigationEventMap = {
|
|
6
7
|
/**
|
|
7
8
|
* Event which fires when a transition animation starts.
|
|
@@ -63,7 +64,7 @@ export type NativeStackHeaderProps = {
|
|
|
63
64
|
* The `href` to use for the anchor tag on web
|
|
64
65
|
*/
|
|
65
66
|
href: string | undefined;
|
|
66
|
-
};
|
|
67
|
+
} | undefined;
|
|
67
68
|
/**
|
|
68
69
|
* Options for the current screen.
|
|
69
70
|
*/
|
|
@@ -81,47 +82,39 @@ export type NativeStackHeaderItemProps = {
|
|
|
81
82
|
/**
|
|
82
83
|
* Tint color for the header.
|
|
83
84
|
*/
|
|
84
|
-
tintColor?: ColorValue;
|
|
85
|
+
tintColor?: ColorValue | undefined;
|
|
85
86
|
/**
|
|
86
87
|
* Whether it's possible to navigate back in stack.
|
|
87
88
|
*/
|
|
88
|
-
canGoBack?: boolean;
|
|
89
|
+
canGoBack?: boolean | undefined;
|
|
89
90
|
};
|
|
90
91
|
export type NativeStackHeaderBackProps = NativeStackHeaderItemProps & {
|
|
91
92
|
/**
|
|
92
93
|
* Label text for the button. Usually the title of the previous screen.
|
|
93
94
|
* By default, this is only shown on iOS 18.
|
|
94
95
|
*/
|
|
95
|
-
label?: string;
|
|
96
|
+
label?: string | undefined;
|
|
96
97
|
/**
|
|
97
98
|
* The `href` to use for the anchor tag on web
|
|
98
99
|
*/
|
|
99
|
-
href?: string;
|
|
100
|
+
href?: string | undefined;
|
|
100
101
|
};
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated Use `NativeStackHeaderBackProps` instead.
|
|
103
|
-
*/
|
|
104
|
-
export type NativeStackHeaderLeftProps = NativeStackHeaderBackProps;
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated Use `NativeStackHeaderItemProps` instead.
|
|
107
|
-
*/
|
|
108
|
-
export type NativeStackHeaderRightProps = NativeStackHeaderItemProps;
|
|
109
102
|
export type NativeStackNavigationOptions = {
|
|
110
103
|
/**
|
|
111
104
|
* String that can be displayed in the header as a fallback for `headerTitle`.
|
|
112
105
|
*/
|
|
113
|
-
title?: string;
|
|
106
|
+
title?: string | undefined;
|
|
114
107
|
/**
|
|
115
108
|
* Function that given `HeaderProps` returns a React Element to display as a header.
|
|
116
109
|
*/
|
|
117
|
-
header?: (props: NativeStackHeaderProps) => React.ReactNode;
|
|
110
|
+
header?: ((props: NativeStackHeaderProps) => React.ReactNode) | undefined;
|
|
118
111
|
/**
|
|
119
112
|
* Whether the back button is visible in the header.
|
|
120
113
|
* You can use it to show a back button alongside `headerLeft` if you have specified it.
|
|
121
114
|
*
|
|
122
115
|
* This will have no effect on the first screen in the stack.
|
|
123
116
|
*/
|
|
124
|
-
headerBackVisible?: boolean;
|
|
117
|
+
headerBackVisible?: boolean | undefined;
|
|
125
118
|
/**
|
|
126
119
|
* Title string used by the back button on iOS.
|
|
127
120
|
* Defaults to the previous scene's title.
|
|
@@ -133,7 +126,7 @@ export type NativeStackNavigationOptions = {
|
|
|
133
126
|
*
|
|
134
127
|
* @platform ios, web
|
|
135
128
|
*/
|
|
136
|
-
headerBackTitle?: string;
|
|
129
|
+
headerBackTitle?: string | undefined;
|
|
137
130
|
/**
|
|
138
131
|
* Style object for header back title. Supported properties:
|
|
139
132
|
* - fontFamily
|
|
@@ -144,11 +137,17 @@ export type NativeStackNavigationOptions = {
|
|
|
144
137
|
* @platform ios, web
|
|
145
138
|
*/
|
|
146
139
|
headerBackTitleStyle?: StyleProp<{
|
|
147
|
-
fontFamily?: string;
|
|
148
|
-
fontSize?: number;
|
|
149
|
-
}
|
|
140
|
+
fontFamily?: string | undefined;
|
|
141
|
+
fontSize?: number | undefined;
|
|
142
|
+
}> | undefined;
|
|
150
143
|
/**
|
|
151
|
-
* Icon to display in the header
|
|
144
|
+
* Icon to display in the header in the back button.
|
|
145
|
+
*
|
|
146
|
+
* Supported types:
|
|
147
|
+
* - image: custom image source
|
|
148
|
+
* - sfSymbol: SF Symbol icon (iOS only - when using custom header)
|
|
149
|
+
* - materialSymbol: material symbol icon (Android only)
|
|
150
|
+
*
|
|
152
151
|
* Defaults to back icon image for the platform
|
|
153
152
|
* - A chevron on iOS
|
|
154
153
|
* - An arrow on Android
|
|
@@ -161,10 +160,7 @@ export type NativeStackNavigationOptions = {
|
|
|
161
160
|
* }
|
|
162
161
|
* ```
|
|
163
162
|
*/
|
|
164
|
-
headerBackIcon?:
|
|
165
|
-
type: 'image';
|
|
166
|
-
source: ImageSourcePropType;
|
|
167
|
-
};
|
|
163
|
+
headerBackIcon?: Icon | undefined;
|
|
168
164
|
/**
|
|
169
165
|
* Style of the header when a large title is shown.
|
|
170
166
|
* The large title is shown if `headerLargeTitleEnabled` is `true` and
|
|
@@ -178,8 +174,8 @@ export type NativeStackNavigationOptions = {
|
|
|
178
174
|
* @platform ios
|
|
179
175
|
*/
|
|
180
176
|
headerLargeStyle?: StyleProp<{
|
|
181
|
-
backgroundColor?: ColorValue;
|
|
182
|
-
}
|
|
177
|
+
backgroundColor?: ColorValue | undefined;
|
|
178
|
+
}> | undefined;
|
|
183
179
|
/**
|
|
184
180
|
* Whether to enable header with large title which collapses to regular header on scroll.
|
|
185
181
|
*
|
|
@@ -191,7 +187,7 @@ export type NativeStackNavigationOptions = {
|
|
|
191
187
|
*
|
|
192
188
|
* @platform ios
|
|
193
189
|
*/
|
|
194
|
-
headerLargeTitleEnabled?: boolean;
|
|
190
|
+
headerLargeTitleEnabled?: boolean | undefined;
|
|
195
191
|
/**
|
|
196
192
|
* Whether drop shadow of header is visible when a large title is shown.
|
|
197
193
|
*
|
|
@@ -199,7 +195,7 @@ export type NativeStackNavigationOptions = {
|
|
|
199
195
|
*
|
|
200
196
|
* @platform ios
|
|
201
197
|
*/
|
|
202
|
-
headerLargeTitleShadowVisible?: boolean;
|
|
198
|
+
headerLargeTitleShadowVisible?: boolean | undefined;
|
|
203
199
|
/**
|
|
204
200
|
* Style object for large title in header. Supported properties:
|
|
205
201
|
* - fontFamily
|
|
@@ -212,33 +208,33 @@ export type NativeStackNavigationOptions = {
|
|
|
212
208
|
* @platform ios
|
|
213
209
|
*/
|
|
214
210
|
headerLargeTitleStyle?: StyleProp<{
|
|
215
|
-
fontFamily?: string;
|
|
216
|
-
fontSize?: number;
|
|
217
|
-
fontWeight?: string;
|
|
218
|
-
color?: ColorValue;
|
|
219
|
-
}
|
|
211
|
+
fontFamily?: string | undefined;
|
|
212
|
+
fontSize?: number | undefined;
|
|
213
|
+
fontWeight?: string | undefined;
|
|
214
|
+
color?: ColorValue | undefined;
|
|
215
|
+
}> | undefined;
|
|
220
216
|
/**
|
|
221
217
|
* Whether to show the header. The header is shown by default.
|
|
222
218
|
* Setting this to `false` hides the header.
|
|
223
219
|
*/
|
|
224
|
-
headerShown?: boolean;
|
|
220
|
+
headerShown?: boolean | undefined;
|
|
225
221
|
/**
|
|
226
222
|
* Style object for header. Supported properties:
|
|
227
223
|
* - backgroundColor
|
|
228
224
|
*/
|
|
229
225
|
headerStyle?: StyleProp<{
|
|
230
|
-
backgroundColor?: ColorValue;
|
|
231
|
-
}
|
|
226
|
+
backgroundColor?: ColorValue | undefined;
|
|
227
|
+
}> | undefined;
|
|
232
228
|
/**
|
|
233
229
|
* Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
|
|
234
230
|
*/
|
|
235
|
-
headerShadowVisible?: boolean;
|
|
231
|
+
headerShadowVisible?: boolean | undefined;
|
|
236
232
|
/**
|
|
237
233
|
* Boolean indicating whether the navigation bar is translucent.
|
|
238
234
|
* Setting this to `true` makes the header absolutely positioned,
|
|
239
235
|
* and changes the background color to `transparent` unless specified in `headerStyle`.
|
|
240
236
|
*/
|
|
241
|
-
headerTransparent?: boolean;
|
|
237
|
+
headerTransparent?: boolean | undefined;
|
|
242
238
|
/**
|
|
243
239
|
* Blur effect for the translucent header.
|
|
244
240
|
* The `headerTransparent` option needs to be set to `true` for this to work.
|
|
@@ -249,23 +245,23 @@ export type NativeStackNavigationOptions = {
|
|
|
249
245
|
*
|
|
250
246
|
* @platform ios
|
|
251
247
|
*/
|
|
252
|
-
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
|
|
248
|
+
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'] | undefined;
|
|
253
249
|
/**
|
|
254
250
|
* Tint color for the header. Changes the color of back button and title.
|
|
255
251
|
*/
|
|
256
|
-
headerTintColor?: ColorValue;
|
|
252
|
+
headerTintColor?: ColorValue | undefined;
|
|
257
253
|
/**
|
|
258
254
|
* Function which returns a React Element to render as the background of the header.
|
|
259
255
|
* This is useful for using backgrounds such as an image, a gradient, blur effect etc.
|
|
260
256
|
* You can use this with `headerTransparent` to render content underneath a translucent header.
|
|
261
257
|
*/
|
|
262
|
-
headerBackground?: () => React.ReactNode;
|
|
258
|
+
headerBackground?: (() => React.ReactNode) | undefined;
|
|
263
259
|
/**
|
|
264
260
|
* Function which returns a React Element to display on the left side of the header.
|
|
265
261
|
* This replaces the back button. See `headerBackVisible` to show the back button along side left element.
|
|
266
262
|
* Will be overriden by `headerLeftItems` on iOS.
|
|
267
263
|
*/
|
|
268
|
-
headerLeft?: (props: NativeStackHeaderBackProps) => React.ReactNode;
|
|
264
|
+
headerLeft?: ((props: NativeStackHeaderBackProps) => React.ReactNode) | undefined;
|
|
269
265
|
/**
|
|
270
266
|
* Whether the liquid glass background is visible for the item.
|
|
271
267
|
*
|
|
@@ -274,12 +270,12 @@ export type NativeStackNavigationOptions = {
|
|
|
274
270
|
*
|
|
275
271
|
* Defaults to `true`.
|
|
276
272
|
*/
|
|
277
|
-
headerLeftBackgroundVisible?: boolean;
|
|
273
|
+
headerLeftBackgroundVisible?: boolean | undefined;
|
|
278
274
|
/**
|
|
279
275
|
* Function which returns a React Element to display on the right side of the header.
|
|
280
276
|
* Will be overriden by `headerRightItems` on iOS.
|
|
281
277
|
*/
|
|
282
|
-
headerRight?: (props: NativeStackHeaderItemProps) => React.ReactNode;
|
|
278
|
+
headerRight?: ((props: NativeStackHeaderItemProps) => React.ReactNode) | undefined;
|
|
283
279
|
/**
|
|
284
280
|
* Whether the liquid glass background is visible for the item.
|
|
285
281
|
*
|
|
@@ -288,7 +284,7 @@ export type NativeStackNavigationOptions = {
|
|
|
288
284
|
*
|
|
289
285
|
* Defaults to `true`.
|
|
290
286
|
*/
|
|
291
|
-
headerRightBackgroundVisible?: boolean;
|
|
287
|
+
headerRightBackgroundVisible?: boolean | undefined;
|
|
292
288
|
/**
|
|
293
289
|
* Function which returns an array of items to display as on the left side of the header.
|
|
294
290
|
* Overrides `headerLeft`.
|
|
@@ -297,7 +293,7 @@ export type NativeStackNavigationOptions = {
|
|
|
297
293
|
*
|
|
298
294
|
* @platform ios
|
|
299
295
|
*/
|
|
300
|
-
unstable_headerLeftItems?: (props: NativeStackHeaderItemProps) => NativeStackHeaderItem[];
|
|
296
|
+
unstable_headerLeftItems?: ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[]) | undefined;
|
|
301
297
|
/**
|
|
302
298
|
* Function which returns an array of items to display as on the right side of the header.
|
|
303
299
|
* Overrides `headerRight`.
|
|
@@ -306,7 +302,7 @@ export type NativeStackNavigationOptions = {
|
|
|
306
302
|
*
|
|
307
303
|
* @platform ios
|
|
308
304
|
*/
|
|
309
|
-
unstable_headerRightItems?: (props: NativeStackHeaderItemProps) => NativeStackHeaderItem[];
|
|
305
|
+
unstable_headerRightItems?: ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[]) | undefined;
|
|
310
306
|
/**
|
|
311
307
|
* String or a function that returns a React Element to be used by the header.
|
|
312
308
|
* Defaults to screen `title` or route name.
|
|
@@ -324,15 +320,15 @@ export type NativeStackNavigationOptions = {
|
|
|
324
320
|
/**
|
|
325
321
|
* Tint color for the header.
|
|
326
322
|
*/
|
|
327
|
-
tintColor?: ColorValue;
|
|
328
|
-
}) => React.ReactNode);
|
|
323
|
+
tintColor?: ColorValue | undefined;
|
|
324
|
+
}) => React.ReactNode) | undefined;
|
|
329
325
|
/**
|
|
330
326
|
* How to align the the header title.
|
|
331
327
|
* Defaults to `left` on platforms other than iOS.
|
|
332
328
|
*
|
|
333
329
|
* Not supported on iOS. It's always `center` on iOS and cannot be changed.
|
|
334
330
|
*/
|
|
335
|
-
headerTitleAlign?: 'left' | 'center';
|
|
331
|
+
headerTitleAlign?: 'left' | 'center' | undefined;
|
|
336
332
|
/**
|
|
337
333
|
* Style object for header title. Supported properties:
|
|
338
334
|
* - fontFamily
|
|
@@ -341,16 +337,16 @@ export type NativeStackNavigationOptions = {
|
|
|
341
337
|
* - color
|
|
342
338
|
*/
|
|
343
339
|
headerTitleStyle?: StyleProp<Pick<TextStyle, 'fontFamily' | 'fontSize' | 'fontWeight'> & {
|
|
344
|
-
color?: ColorValue;
|
|
345
|
-
}
|
|
340
|
+
color?: ColorValue | undefined;
|
|
341
|
+
}> | undefined;
|
|
346
342
|
/**
|
|
347
343
|
* Options to render a native search bar.
|
|
348
344
|
* You also need to specify `contentInsetAdjustmentBehavior="automatic"` in your `ScrollView`, `FlatList` etc.
|
|
349
345
|
* If you don't have a `ScrollView`, specify `headerTransparent: false`.
|
|
350
346
|
*/
|
|
351
|
-
headerSearchBarOptions?: Omit<SearchBarProps, 'onChangeText'> & {
|
|
352
|
-
onChange?: SearchBarProps['onChangeText'];
|
|
353
|
-
};
|
|
347
|
+
headerSearchBarOptions?: (Omit<SearchBarProps, 'onChangeText'> & {
|
|
348
|
+
onChange?: SearchBarProps['onChangeText'] | undefined;
|
|
349
|
+
}) | undefined;
|
|
354
350
|
/**
|
|
355
351
|
* Boolean indicating whether to show the menu on longPress of iOS >= 14 back button. Defaults to `true`.
|
|
356
352
|
* Requires `react-native-screens` version >=3.3.0.
|
|
@@ -359,7 +355,7 @@ export type NativeStackNavigationOptions = {
|
|
|
359
355
|
*
|
|
360
356
|
* @platform ios
|
|
361
357
|
*/
|
|
362
|
-
headerBackButtonMenuEnabled?: boolean;
|
|
358
|
+
headerBackButtonMenuEnabled?: boolean | undefined;
|
|
363
359
|
/**
|
|
364
360
|
* How the back button displays icon and title.
|
|
365
361
|
*
|
|
@@ -381,25 +377,44 @@ export type NativeStackNavigationOptions = {
|
|
|
381
377
|
*
|
|
382
378
|
* @platform ios, web
|
|
383
379
|
*/
|
|
384
|
-
headerBackButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'];
|
|
380
|
+
headerBackButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'] | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Option to control which edges of the native header should apply window insets.
|
|
383
|
+
*
|
|
384
|
+
* By default, the native header applies window insets to all edges.
|
|
385
|
+
* Setting an edge to `false` disables its inset for this header and any nested headers.
|
|
386
|
+
*
|
|
387
|
+
* A nested header cannot re-enable an inset disabled by a parent,
|
|
388
|
+
* even by setting the edge to `true`.
|
|
389
|
+
*
|
|
390
|
+
* This is an unstable API and might change in the future.
|
|
391
|
+
*
|
|
392
|
+
* @platform android
|
|
393
|
+
*/
|
|
394
|
+
unstable_headerInsets?: {
|
|
395
|
+
top?: boolean;
|
|
396
|
+
left?: boolean;
|
|
397
|
+
right?: boolean;
|
|
398
|
+
bottom?: boolean;
|
|
399
|
+
};
|
|
385
400
|
/**
|
|
386
401
|
* Whether the home indicator should prefer to stay hidden on this screen. Defaults to `false`.
|
|
387
402
|
*
|
|
388
403
|
* @platform ios
|
|
389
404
|
*/
|
|
390
|
-
autoHideHomeIndicator?: boolean;
|
|
405
|
+
autoHideHomeIndicator?: boolean | undefined;
|
|
391
406
|
/**
|
|
392
407
|
* Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
|
|
393
408
|
*
|
|
394
409
|
* @platform ios
|
|
395
410
|
*/
|
|
396
|
-
keyboardHandlingEnabled?: boolean;
|
|
411
|
+
keyboardHandlingEnabled?: boolean | undefined;
|
|
397
412
|
/**
|
|
398
413
|
* Sets the visibility of the navigation bar. Defaults to `false`.
|
|
399
414
|
*
|
|
400
415
|
* @platform android
|
|
401
416
|
*/
|
|
402
|
-
navigationBarHidden?: boolean;
|
|
417
|
+
navigationBarHidden?: boolean | undefined;
|
|
403
418
|
/**
|
|
404
419
|
* Sets the status bar animation (similar to the `StatusBar` component).
|
|
405
420
|
* On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar.
|
|
@@ -411,7 +426,7 @@ export type NativeStackNavigationOptions = {
|
|
|
411
426
|
*
|
|
412
427
|
* @platform android, ios
|
|
413
428
|
*/
|
|
414
|
-
statusBarAnimation?: ScreenProps['statusBarAnimation'];
|
|
429
|
+
statusBarAnimation?: ScreenProps['statusBarAnimation'] | undefined;
|
|
415
430
|
/**
|
|
416
431
|
* Whether the status bar should be hidden on this screen.
|
|
417
432
|
* Requires setting `View controller-based status bar appearance -> YES` in your Info.plist file.
|
|
@@ -420,7 +435,7 @@ export type NativeStackNavigationOptions = {
|
|
|
420
435
|
*
|
|
421
436
|
* @platform android, ios
|
|
422
437
|
*/
|
|
423
|
-
statusBarHidden?: boolean;
|
|
438
|
+
statusBarHidden?: boolean | undefined;
|
|
424
439
|
/**
|
|
425
440
|
* Sets the status bar color (similar to the `StatusBar` component).
|
|
426
441
|
* Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
|
|
@@ -432,7 +447,7 @@ export type NativeStackNavigationOptions = {
|
|
|
432
447
|
*
|
|
433
448
|
* @platform android, ios
|
|
434
449
|
*/
|
|
435
|
-
statusBarStyle?: ScreenProps['statusBarStyle'];
|
|
450
|
+
statusBarStyle?: ScreenProps['statusBarStyle'] | undefined;
|
|
436
451
|
/**
|
|
437
452
|
* Sets the direction in which you should swipe to dismiss the screen.
|
|
438
453
|
* When using `vertical` option, options `fullScreenGestureEnabled: true`, `animationMatchesGesture: true` and `animation: 'slide_from_bottom'` are set by default.
|
|
@@ -443,11 +458,11 @@ export type NativeStackNavigationOptions = {
|
|
|
443
458
|
*
|
|
444
459
|
* @platform ios
|
|
445
460
|
*/
|
|
446
|
-
gestureDirection?: ScreenProps['swipeDirection'];
|
|
461
|
+
gestureDirection?: ScreenProps['swipeDirection'] | undefined;
|
|
447
462
|
/**
|
|
448
463
|
* Style object for the scene content.
|
|
449
464
|
*/
|
|
450
|
-
contentStyle?: StyleProp<ViewStyle
|
|
465
|
+
contentStyle?: StyleProp<ViewStyle> | undefined;
|
|
451
466
|
/**
|
|
452
467
|
* Whether the gesture to dismiss should use animation provided to `animation` prop. Defaults to `false`.
|
|
453
468
|
*
|
|
@@ -455,7 +470,7 @@ export type NativeStackNavigationOptions = {
|
|
|
455
470
|
*
|
|
456
471
|
* @platform ios
|
|
457
472
|
*/
|
|
458
|
-
animationMatchesGesture?: boolean;
|
|
473
|
+
animationMatchesGesture?: boolean | undefined;
|
|
459
474
|
/**
|
|
460
475
|
* Whether the gesture to dismiss should work on the whole screen. The behavior depends on iOS version.
|
|
461
476
|
*
|
|
@@ -470,7 +485,7 @@ export type NativeStackNavigationOptions = {
|
|
|
470
485
|
*
|
|
471
486
|
* @platform ios
|
|
472
487
|
*/
|
|
473
|
-
fullScreenGestureEnabled?: boolean;
|
|
488
|
+
fullScreenGestureEnabled?: boolean | undefined;
|
|
474
489
|
/**
|
|
475
490
|
* iOS 18 and below. Controls whether the full screen dismiss gesture has shadow under view during transition.
|
|
476
491
|
* The gesture uses custom transition and thus doesn't have a shadow by default. When enabled, a custom shadow view
|
|
@@ -482,7 +497,7 @@ export type NativeStackNavigationOptions = {
|
|
|
482
497
|
*
|
|
483
498
|
* @platform ios
|
|
484
499
|
*/
|
|
485
|
-
fullScreenGestureShadowEnabled?: boolean;
|
|
500
|
+
fullScreenGestureShadowEnabled?: boolean | undefined;
|
|
486
501
|
/**
|
|
487
502
|
* Whether you can use gestures to dismiss this screen. Defaults to `true`.
|
|
488
503
|
*
|
|
@@ -490,13 +505,13 @@ export type NativeStackNavigationOptions = {
|
|
|
490
505
|
*
|
|
491
506
|
* @platform ios
|
|
492
507
|
*/
|
|
493
|
-
gestureEnabled?: boolean;
|
|
508
|
+
gestureEnabled?: boolean | undefined;
|
|
494
509
|
/**
|
|
495
510
|
* Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenGestureEnabled`.
|
|
496
511
|
*
|
|
497
512
|
* @platform ios
|
|
498
513
|
*/
|
|
499
|
-
gestureResponseDistance?: ScreenProps['gestureResponseDistance'];
|
|
514
|
+
gestureResponseDistance?: ScreenProps['gestureResponseDistance'] | undefined;
|
|
500
515
|
/**
|
|
501
516
|
* The type of animation to use when this screen replaces another screen. Defaults to `pop`.
|
|
502
517
|
*
|
|
@@ -506,7 +521,7 @@ export type NativeStackNavigationOptions = {
|
|
|
506
521
|
*
|
|
507
522
|
* Only supported on iOS and Android.
|
|
508
523
|
*/
|
|
509
|
-
animationTypeForReplace?: ScreenProps['replaceAnimation'];
|
|
524
|
+
animationTypeForReplace?: ScreenProps['replaceAnimation'] | undefined;
|
|
510
525
|
/**
|
|
511
526
|
* How the screen should animate when pushed or popped.
|
|
512
527
|
*
|
|
@@ -525,7 +540,7 @@ export type NativeStackNavigationOptions = {
|
|
|
525
540
|
*
|
|
526
541
|
* Only supported on iOS and Android.
|
|
527
542
|
*/
|
|
528
|
-
animation?: ScreenProps['stackAnimation'];
|
|
543
|
+
animation?: ScreenProps['stackAnimation'] | undefined;
|
|
529
544
|
/**
|
|
530
545
|
* Duration (in milliseconds) for the following transition animations on iOS:
|
|
531
546
|
* - `slide_from_bottom`
|
|
@@ -541,7 +556,7 @@ export type NativeStackNavigationOptions = {
|
|
|
541
556
|
*
|
|
542
557
|
* @platform ios
|
|
543
558
|
*/
|
|
544
|
-
animationDuration?: number;
|
|
559
|
+
animationDuration?: number | undefined;
|
|
545
560
|
/**
|
|
546
561
|
* How should the screen be presented.
|
|
547
562
|
*
|
|
@@ -557,7 +572,7 @@ export type NativeStackNavigationOptions = {
|
|
|
557
572
|
*
|
|
558
573
|
* Only supported on iOS and Android.
|
|
559
574
|
*/
|
|
560
|
-
presentation?: Exclude<ScreenProps['stackPresentation'], 'push'> | 'card';
|
|
575
|
+
presentation?: Exclude<ScreenProps['stackPresentation'], 'push'> | 'card' | undefined;
|
|
561
576
|
/**
|
|
562
577
|
* Describes heights where a sheet can rest.
|
|
563
578
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -576,7 +591,7 @@ export type NativeStackNavigationOptions = {
|
|
|
576
591
|
*
|
|
577
592
|
* Defaults to `[1.0]`.
|
|
578
593
|
*/
|
|
579
|
-
sheetAllowedDetents?: number[] | 'fitToContents';
|
|
594
|
+
sheetAllowedDetents?: number[] | 'fitToContents' | undefined;
|
|
580
595
|
/**
|
|
581
596
|
* Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
|
|
582
597
|
*
|
|
@@ -586,7 +601,7 @@ export type NativeStackNavigationOptions = {
|
|
|
586
601
|
*
|
|
587
602
|
* @platform Android
|
|
588
603
|
*/
|
|
589
|
-
sheetElevation?: number;
|
|
604
|
+
sheetElevation?: number | undefined;
|
|
590
605
|
/**
|
|
591
606
|
* Whether the sheet should expand to larger detent when scrolling.
|
|
592
607
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -594,7 +609,7 @@ export type NativeStackNavigationOptions = {
|
|
|
594
609
|
*
|
|
595
610
|
* @platform ios
|
|
596
611
|
*/
|
|
597
|
-
sheetExpandsWhenScrolledToEdge?: boolean;
|
|
612
|
+
sheetExpandsWhenScrolledToEdge?: boolean | undefined;
|
|
598
613
|
/**
|
|
599
614
|
* The corner radius that the sheet will try to render with.
|
|
600
615
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -603,7 +618,7 @@ export type NativeStackNavigationOptions = {
|
|
|
603
618
|
*
|
|
604
619
|
* If left unset system default is used.
|
|
605
620
|
*/
|
|
606
|
-
sheetCornerRadius?: number;
|
|
621
|
+
sheetCornerRadius?: number | undefined;
|
|
607
622
|
/**
|
|
608
623
|
* Index of the detent the sheet should expand to after being opened.
|
|
609
624
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -615,7 +630,7 @@ export type NativeStackNavigationOptions = {
|
|
|
615
630
|
*
|
|
616
631
|
* Defaults to `0` - which represents first detent in the detents array.
|
|
617
632
|
*/
|
|
618
|
-
sheetInitialDetentIndex?: number | 'last';
|
|
633
|
+
sheetInitialDetentIndex?: number | 'last' | undefined;
|
|
619
634
|
/**
|
|
620
635
|
* Boolean indicating whether the sheet shows a grabber at the top.
|
|
621
636
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -623,7 +638,7 @@ export type NativeStackNavigationOptions = {
|
|
|
623
638
|
*
|
|
624
639
|
* @platform ios
|
|
625
640
|
*/
|
|
626
|
-
sheetGrabberVisible?: boolean;
|
|
641
|
+
sheetGrabberVisible?: boolean | undefined;
|
|
627
642
|
/**
|
|
628
643
|
* The largest sheet detent for which a view underneath won't be dimmed.
|
|
629
644
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -643,7 +658,7 @@ export type NativeStackNavigationOptions = {
|
|
|
643
658
|
*
|
|
644
659
|
* Defaults to `none`, indicating that the dimming view should be always present.
|
|
645
660
|
*/
|
|
646
|
-
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last';
|
|
661
|
+
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last' | undefined;
|
|
647
662
|
/**
|
|
648
663
|
* Whether the sheet content should be rendered behind the Status Bar or display cutouts.
|
|
649
664
|
*
|
|
@@ -659,7 +674,7 @@ export type NativeStackNavigationOptions = {
|
|
|
659
674
|
*
|
|
660
675
|
* @platform android
|
|
661
676
|
*/
|
|
662
|
-
sheetShouldOverflowTopInset?: boolean;
|
|
677
|
+
sheetShouldOverflowTopInset?: boolean | undefined;
|
|
663
678
|
/**
|
|
664
679
|
* Whether the default native animation should be used when the sheet's with
|
|
665
680
|
* `fitToContents` content size changes.
|
|
@@ -676,7 +691,7 @@ export type NativeStackNavigationOptions = {
|
|
|
676
691
|
*
|
|
677
692
|
* @platform android
|
|
678
693
|
*/
|
|
679
|
-
sheetResizeAnimationEnabled?: boolean;
|
|
694
|
+
sheetResizeAnimationEnabled?: boolean | undefined;
|
|
680
695
|
/**
|
|
681
696
|
* The display orientation to use for the screen.
|
|
682
697
|
*
|
|
@@ -692,15 +707,7 @@ export type NativeStackNavigationOptions = {
|
|
|
692
707
|
*
|
|
693
708
|
* Only supported on iOS and Android.
|
|
694
709
|
*/
|
|
695
|
-
orientation?: ScreenProps['screenOrientation'];
|
|
696
|
-
/**
|
|
697
|
-
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
698
|
-
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
699
|
-
* Requires `react-native-screens` version >=3.16.0.
|
|
700
|
-
*
|
|
701
|
-
* Only supported on iOS and Android.
|
|
702
|
-
*/
|
|
703
|
-
freezeOnBlur?: boolean;
|
|
710
|
+
orientation?: ScreenProps['screenOrientation'] | undefined;
|
|
704
711
|
/**
|
|
705
712
|
* Configures the scroll edge effect for the _content ScrollView_ (the ScrollView that is present in first descendants chain of the Screen).
|
|
706
713
|
* Depending on values set, it will blur the scrolling content below certain UI elements (header items, search bar)
|
|
@@ -725,11 +732,11 @@ export type NativeStackNavigationOptions = {
|
|
|
725
732
|
* @supported iOS 26 or higher
|
|
726
733
|
*/
|
|
727
734
|
scrollEdgeEffects?: {
|
|
728
|
-
bottom?: ScrollEdgeEffect;
|
|
729
|
-
left?: ScrollEdgeEffect;
|
|
730
|
-
right?: ScrollEdgeEffect;
|
|
731
|
-
top?: ScrollEdgeEffect;
|
|
732
|
-
};
|
|
735
|
+
bottom?: ScrollEdgeEffect | undefined;
|
|
736
|
+
left?: ScrollEdgeEffect | undefined;
|
|
737
|
+
right?: ScrollEdgeEffect | undefined;
|
|
738
|
+
top?: ScrollEdgeEffect | undefined;
|
|
739
|
+
} | undefined;
|
|
733
740
|
/**
|
|
734
741
|
* Footer component that can be used alongside formSheet stack presentation style.
|
|
735
742
|
*
|
|
@@ -742,24 +749,25 @@ export type NativeStackNavigationOptions = {
|
|
|
742
749
|
*
|
|
743
750
|
* @platform android
|
|
744
751
|
*/
|
|
745
|
-
unstable_sheetFooter?: () => React.ReactNode;
|
|
746
|
-
};
|
|
747
|
-
type PlatformIconShared = {
|
|
748
|
-
type: 'image';
|
|
749
|
-
source: ImageSourcePropType;
|
|
752
|
+
unstable_sheetFooter?: (() => React.ReactNode) | undefined;
|
|
750
753
|
/**
|
|
751
|
-
*
|
|
752
|
-
*
|
|
754
|
+
* What should happen when screens become inactive.
|
|
755
|
+
* - `pause`: Effects are cleaned up.
|
|
756
|
+
* - `unmount`: Screen is unmounted
|
|
757
|
+
* - `none`: Screen renders normally
|
|
753
758
|
*
|
|
754
|
-
*
|
|
759
|
+
* Defaults to `pause`.
|
|
760
|
+
*
|
|
761
|
+
* Preloaded screens won't be paused until after navigated to.
|
|
762
|
+
* This makes sure that effects are run to initialize the screen.
|
|
763
|
+
*
|
|
764
|
+
* Screens with nested navigators and last 2 screens won't be unmounted.
|
|
755
765
|
*/
|
|
756
|
-
|
|
766
|
+
inactiveBehavior?: 'pause' | 'unmount' | 'none' | undefined;
|
|
757
767
|
};
|
|
758
|
-
type
|
|
759
|
-
type: 'sfSymbol';
|
|
760
|
-
|
|
761
|
-
};
|
|
762
|
-
type PlatformIconIOS = PlatformIconIOSSfSymbol | PlatformIconShared;
|
|
768
|
+
type IconIOS = Extract<Icon, {
|
|
769
|
+
type: 'image' | 'sfSymbol';
|
|
770
|
+
}>;
|
|
763
771
|
type SharedHeaderItem = {
|
|
764
772
|
/**
|
|
765
773
|
* Label of the item.
|
|
@@ -769,59 +777,59 @@ type SharedHeaderItem = {
|
|
|
769
777
|
* Style for the item label.
|
|
770
778
|
*/
|
|
771
779
|
labelStyle?: {
|
|
772
|
-
fontFamily?: string;
|
|
773
|
-
fontSize?: number;
|
|
774
|
-
fontWeight?: string;
|
|
775
|
-
color?: ColorValue;
|
|
776
|
-
};
|
|
780
|
+
fontFamily?: string | undefined;
|
|
781
|
+
fontSize?: number | undefined;
|
|
782
|
+
fontWeight?: string | undefined;
|
|
783
|
+
color?: ColorValue | undefined;
|
|
784
|
+
} | undefined;
|
|
777
785
|
/**
|
|
778
786
|
* Icon for the item
|
|
779
787
|
*/
|
|
780
|
-
icon?:
|
|
788
|
+
icon?: IconIOS | undefined;
|
|
781
789
|
/**
|
|
782
790
|
* The variant of the item.
|
|
783
791
|
* "prominent" only available from iOS 26.0 and later.
|
|
784
792
|
*
|
|
785
793
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
|
786
794
|
*/
|
|
787
|
-
variant?: 'plain' | 'done' | 'prominent';
|
|
795
|
+
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
|
788
796
|
/**
|
|
789
797
|
* The tint color to apply to the item.
|
|
790
798
|
*
|
|
791
799
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/tintcolor
|
|
792
800
|
*/
|
|
793
|
-
tintColor?: ColorValue;
|
|
801
|
+
tintColor?: ColorValue | undefined;
|
|
794
802
|
/**
|
|
795
803
|
* Whether the item is in a disabled state.
|
|
796
804
|
*/
|
|
797
|
-
disabled?: boolean;
|
|
805
|
+
disabled?: boolean | undefined;
|
|
798
806
|
/**
|
|
799
807
|
* The width of the item.
|
|
800
808
|
*
|
|
801
809
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/width
|
|
802
810
|
*/
|
|
803
|
-
width?: number;
|
|
811
|
+
width?: number | undefined;
|
|
804
812
|
/**
|
|
805
813
|
* Whether the background this item may share with other items in the bar should be hidden.
|
|
806
814
|
* Only available from iOS 26.0 and later.
|
|
807
815
|
*
|
|
808
816
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
809
817
|
*/
|
|
810
|
-
hidesSharedBackground?: boolean;
|
|
818
|
+
hidesSharedBackground?: boolean | undefined;
|
|
811
819
|
/**
|
|
812
820
|
* Whether this item can share a background with other items.
|
|
813
821
|
* Only available from iOS 26.0 and later.
|
|
814
822
|
*
|
|
815
823
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground
|
|
816
824
|
*/
|
|
817
|
-
sharesBackground?: boolean;
|
|
825
|
+
sharesBackground?: boolean | undefined;
|
|
818
826
|
/**
|
|
819
827
|
* An identifier used to match items across transitions.
|
|
820
828
|
* Only available from iOS 26.0 and later.
|
|
821
829
|
*
|
|
822
830
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/identifier
|
|
823
831
|
*/
|
|
824
|
-
identifier?: string;
|
|
832
|
+
identifier?: string | undefined;
|
|
825
833
|
/**
|
|
826
834
|
* A badge to display on a item.
|
|
827
835
|
* Only available from iOS 26.0 and later.
|
|
@@ -837,21 +845,21 @@ type SharedHeaderItem = {
|
|
|
837
845
|
* Style of the badge.
|
|
838
846
|
*/
|
|
839
847
|
style?: {
|
|
840
|
-
color?: ColorValue;
|
|
841
|
-
backgroundColor?: ColorValue;
|
|
842
|
-
fontFamily?: string;
|
|
843
|
-
fontSize?: number;
|
|
844
|
-
fontWeight?: string;
|
|
845
|
-
};
|
|
846
|
-
};
|
|
848
|
+
color?: ColorValue | undefined;
|
|
849
|
+
backgroundColor?: ColorValue | undefined;
|
|
850
|
+
fontFamily?: string | undefined;
|
|
851
|
+
fontSize?: number | undefined;
|
|
852
|
+
fontWeight?: string | undefined;
|
|
853
|
+
} | undefined;
|
|
854
|
+
} | undefined;
|
|
847
855
|
/**
|
|
848
856
|
* Accessibility label for the item.
|
|
849
857
|
*/
|
|
850
|
-
accessibilityLabel?: string;
|
|
858
|
+
accessibilityLabel?: string | undefined;
|
|
851
859
|
/**
|
|
852
860
|
* Accessibility hint for the item.
|
|
853
861
|
*/
|
|
854
|
-
accessibilityHint?: string;
|
|
862
|
+
accessibilityHint?: string | undefined;
|
|
855
863
|
};
|
|
856
864
|
/**
|
|
857
865
|
* A button item in the header.
|
|
@@ -870,7 +878,7 @@ export type NativeStackHeaderItemButton = SharedHeaderItem & {
|
|
|
870
878
|
*
|
|
871
879
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected
|
|
872
880
|
*/
|
|
873
|
-
selected?: boolean;
|
|
881
|
+
selected?: boolean | undefined;
|
|
874
882
|
};
|
|
875
883
|
/**
|
|
876
884
|
* An action item in a menu.
|
|
@@ -884,11 +892,11 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
884
892
|
/**
|
|
885
893
|
* The secondary text displayed alongside the label of the menu item.
|
|
886
894
|
*/
|
|
887
|
-
description?: string;
|
|
895
|
+
description?: string | undefined;
|
|
888
896
|
/**
|
|
889
897
|
* Icon for the menu item.
|
|
890
898
|
*/
|
|
891
|
-
icon?:
|
|
899
|
+
icon?: IconIOS | undefined;
|
|
892
900
|
/**
|
|
893
901
|
* Function to call when the menu item is pressed.
|
|
894
902
|
*/
|
|
@@ -898,31 +906,31 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
898
906
|
*
|
|
899
907
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/state
|
|
900
908
|
*/
|
|
901
|
-
state?: 'on' | 'off' | 'mixed';
|
|
909
|
+
state?: 'on' | 'off' | 'mixed' | undefined;
|
|
902
910
|
/**
|
|
903
911
|
* Whether to apply disabled style to the item.
|
|
904
912
|
*
|
|
905
913
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled
|
|
906
914
|
*/
|
|
907
|
-
disabled?: boolean;
|
|
915
|
+
disabled?: boolean | undefined;
|
|
908
916
|
/**
|
|
909
917
|
* Whether to apply destructive style to the item.
|
|
910
918
|
*
|
|
911
919
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
912
920
|
*/
|
|
913
|
-
destructive?: boolean;
|
|
921
|
+
destructive?: boolean | undefined;
|
|
914
922
|
/**
|
|
915
923
|
* Whether to apply hidden style to the item.
|
|
916
924
|
*
|
|
917
925
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden
|
|
918
926
|
*/
|
|
919
|
-
hidden?: boolean;
|
|
927
|
+
hidden?: boolean | undefined;
|
|
920
928
|
/**
|
|
921
|
-
* Whether to keep the menu presented after firing the element
|
|
929
|
+
* Whether to keep the menu presented after firing the element's action.
|
|
922
930
|
*
|
|
923
931
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented
|
|
924
932
|
*/
|
|
925
|
-
keepsMenuPresented?: boolean;
|
|
933
|
+
keepsMenuPresented?: boolean | undefined;
|
|
926
934
|
/**
|
|
927
935
|
* An elaborated title that explains the purpose of the action.
|
|
928
936
|
*
|
|
@@ -931,7 +939,7 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
931
939
|
*
|
|
932
940
|
* Read more: https://developer.apple.com/documentation/uikit/uiaction/discoverabilitytitle
|
|
933
941
|
*/
|
|
934
|
-
discoverabilityLabel?: string;
|
|
942
|
+
discoverabilityLabel?: string | undefined;
|
|
935
943
|
};
|
|
936
944
|
/**
|
|
937
945
|
* A submenu item that contains other menu items.
|
|
@@ -945,7 +953,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
945
953
|
/**
|
|
946
954
|
* Icon for the submenu item.
|
|
947
955
|
*/
|
|
948
|
-
icon?:
|
|
956
|
+
icon?: IconIOS | undefined;
|
|
949
957
|
/**
|
|
950
958
|
* Whether the menu is displayed inline with the parent menu.
|
|
951
959
|
* By default, submenus are displayed after expanding the parent menu item.
|
|
@@ -955,7 +963,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
955
963
|
*
|
|
956
964
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline
|
|
957
965
|
*/
|
|
958
|
-
inline?: boolean;
|
|
966
|
+
inline?: boolean | undefined;
|
|
959
967
|
/**
|
|
960
968
|
* How the submenu items are displayed.
|
|
961
969
|
* - `default`: menu items are displayed normally.
|
|
@@ -965,13 +973,13 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
965
973
|
*
|
|
966
974
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
967
975
|
*/
|
|
968
|
-
layout?: 'default' | 'palette';
|
|
976
|
+
layout?: 'default' | 'palette' | undefined;
|
|
969
977
|
/**
|
|
970
978
|
* Whether to apply destructive style to the menu item.
|
|
971
979
|
*
|
|
972
980
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
973
981
|
*/
|
|
974
|
-
destructive?: boolean;
|
|
982
|
+
destructive?: boolean | undefined;
|
|
975
983
|
/**
|
|
976
984
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
977
985
|
*
|
|
@@ -979,7 +987,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
979
987
|
*
|
|
980
988
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
981
989
|
*/
|
|
982
|
-
multiselectable?: boolean;
|
|
990
|
+
multiselectable?: boolean | undefined;
|
|
983
991
|
/**
|
|
984
992
|
* Array of menu items (actions or submenus).
|
|
985
993
|
*/
|
|
@@ -996,7 +1004,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
996
1004
|
*
|
|
997
1005
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/changesselectionasprimaryaction
|
|
998
1006
|
*/
|
|
999
|
-
changesSelectionAsPrimaryAction?: boolean;
|
|
1007
|
+
changesSelectionAsPrimaryAction?: boolean | undefined;
|
|
1000
1008
|
/**
|
|
1001
1009
|
* Menu for the item.
|
|
1002
1010
|
*/
|
|
@@ -1004,7 +1012,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1004
1012
|
/**
|
|
1005
1013
|
* Optional title to show on top of the menu.
|
|
1006
1014
|
*/
|
|
1007
|
-
title?: string;
|
|
1015
|
+
title?: string | undefined;
|
|
1008
1016
|
/**
|
|
1009
1017
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
1010
1018
|
*
|
|
@@ -1012,7 +1020,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1012
1020
|
*
|
|
1013
1021
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
1014
1022
|
*/
|
|
1015
|
-
multiselectable?: boolean;
|
|
1023
|
+
multiselectable?: boolean | undefined;
|
|
1016
1024
|
/**
|
|
1017
1025
|
* How the submenu items are displayed.
|
|
1018
1026
|
* - `default`: menu items are displayed normally.
|
|
@@ -1022,7 +1030,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1022
1030
|
*
|
|
1023
1031
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
1024
1032
|
*/
|
|
1025
|
-
layout?: 'default' | 'palette';
|
|
1033
|
+
layout?: 'default' | 'palette' | undefined;
|
|
1026
1034
|
/**
|
|
1027
1035
|
* Array of menu items (actions or submenus).
|
|
1028
1036
|
*/
|
|
@@ -1054,7 +1062,7 @@ export type NativeStackHeaderItemCustom = {
|
|
|
1054
1062
|
*
|
|
1055
1063
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
1056
1064
|
*/
|
|
1057
|
-
hidesSharedBackground?: boolean;
|
|
1065
|
+
hidesSharedBackground?: boolean | undefined;
|
|
1058
1066
|
};
|
|
1059
1067
|
/**
|
|
1060
1068
|
* An item that can be displayed in the header.
|