@react-navigation/native-stack 8.0.0-alpha.3 → 8.0.0-alpha.30
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/views/NativeStackView.js +34 -24
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +92 -68
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/module/views/useHeaderConfigProps.js +71 -21
- package/lib/module/views/useHeaderConfigProps.js.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts +8 -14
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +181 -146
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts.map +1 -1
- package/package.json +17 -18
- package/src/index.tsx +1 -0
- package/src/navigators/createNativeStackNavigator.tsx +11 -47
- package/src/types.tsx +242 -184
- package/src/utils/useAnimatedHeaderHeight.tsx +1 -1
- package/src/views/NativeStackView.native.tsx +135 -89
- package/src/views/NativeStackView.tsx +52 -40
- package/src/views/useHeaderConfigProps.tsx +100 -36
package/src/types.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Icon } from '@react-navigation/elements';
|
|
1
2
|
import type {
|
|
2
3
|
DefaultNavigatorOptions,
|
|
3
4
|
Descriptor,
|
|
@@ -11,20 +12,14 @@ import type {
|
|
|
11
12
|
StackRouterOptions,
|
|
12
13
|
Theme,
|
|
13
14
|
} from '@react-navigation/native';
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
ImageSourcePropType,
|
|
17
|
-
StyleProp,
|
|
18
|
-
TextStyle,
|
|
19
|
-
ViewStyle,
|
|
20
|
-
} from 'react-native';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
21
17
|
import type {
|
|
22
18
|
ScreenProps,
|
|
23
19
|
ScreenStackHeaderConfigProps,
|
|
24
20
|
ScrollEdgeEffect,
|
|
25
21
|
SearchBarProps,
|
|
26
22
|
} from 'react-native-screens';
|
|
27
|
-
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
28
23
|
|
|
29
24
|
export type NativeStackNavigationEventMap = {
|
|
30
25
|
/**
|
|
@@ -89,16 +84,18 @@ export type NativeStackHeaderProps = {
|
|
|
89
84
|
/**
|
|
90
85
|
* Options for the back button.
|
|
91
86
|
*/
|
|
92
|
-
back?:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
87
|
+
back?:
|
|
88
|
+
| {
|
|
89
|
+
/**
|
|
90
|
+
* Title of the previous screen.
|
|
91
|
+
*/
|
|
92
|
+
title: string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The `href` to use for the anchor tag on web
|
|
95
|
+
*/
|
|
96
|
+
href: string | undefined;
|
|
97
|
+
}
|
|
98
|
+
| undefined;
|
|
102
99
|
/**
|
|
103
100
|
* Options for the current screen.
|
|
104
101
|
*/
|
|
@@ -117,11 +114,11 @@ export type NativeStackHeaderItemProps = {
|
|
|
117
114
|
/**
|
|
118
115
|
* Tint color for the header.
|
|
119
116
|
*/
|
|
120
|
-
tintColor?: ColorValue;
|
|
117
|
+
tintColor?: ColorValue | undefined;
|
|
121
118
|
/**
|
|
122
119
|
* Whether it's possible to navigate back in stack.
|
|
123
120
|
*/
|
|
124
|
-
canGoBack?: boolean;
|
|
121
|
+
canGoBack?: boolean | undefined;
|
|
125
122
|
};
|
|
126
123
|
|
|
127
124
|
export type NativeStackHeaderBackProps = NativeStackHeaderItemProps & {
|
|
@@ -129,11 +126,11 @@ export type NativeStackHeaderBackProps = NativeStackHeaderItemProps & {
|
|
|
129
126
|
* Label text for the button. Usually the title of the previous screen.
|
|
130
127
|
* By default, this is only shown on iOS 18.
|
|
131
128
|
*/
|
|
132
|
-
label?: string;
|
|
129
|
+
label?: string | undefined;
|
|
133
130
|
/**
|
|
134
131
|
* The `href` to use for the anchor tag on web
|
|
135
132
|
*/
|
|
136
|
-
href?: string;
|
|
133
|
+
href?: string | undefined;
|
|
137
134
|
};
|
|
138
135
|
|
|
139
136
|
/**
|
|
@@ -150,18 +147,18 @@ export type NativeStackNavigationOptions = {
|
|
|
150
147
|
/**
|
|
151
148
|
* String that can be displayed in the header as a fallback for `headerTitle`.
|
|
152
149
|
*/
|
|
153
|
-
title?: string;
|
|
150
|
+
title?: string | undefined;
|
|
154
151
|
/**
|
|
155
152
|
* Function that given `HeaderProps` returns a React Element to display as a header.
|
|
156
153
|
*/
|
|
157
|
-
header?: (props: NativeStackHeaderProps) => React.ReactNode;
|
|
154
|
+
header?: ((props: NativeStackHeaderProps) => React.ReactNode) | undefined;
|
|
158
155
|
/**
|
|
159
156
|
* Whether the back button is visible in the header.
|
|
160
157
|
* You can use it to show a back button alongside `headerLeft` if you have specified it.
|
|
161
158
|
*
|
|
162
159
|
* This will have no effect on the first screen in the stack.
|
|
163
160
|
*/
|
|
164
|
-
headerBackVisible?: boolean;
|
|
161
|
+
headerBackVisible?: boolean | undefined;
|
|
165
162
|
/**
|
|
166
163
|
* Title string used by the back button on iOS.
|
|
167
164
|
* Defaults to the previous scene's title.
|
|
@@ -173,7 +170,7 @@ export type NativeStackNavigationOptions = {
|
|
|
173
170
|
*
|
|
174
171
|
* @platform ios, web
|
|
175
172
|
*/
|
|
176
|
-
headerBackTitle?: string;
|
|
173
|
+
headerBackTitle?: string | undefined;
|
|
177
174
|
/**
|
|
178
175
|
* Style object for header back title. Supported properties:
|
|
179
176
|
* - fontFamily
|
|
@@ -183,12 +180,20 @@ export type NativeStackNavigationOptions = {
|
|
|
183
180
|
*
|
|
184
181
|
* @platform ios, web
|
|
185
182
|
*/
|
|
186
|
-
headerBackTitleStyle?:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
headerBackTitleStyle?:
|
|
184
|
+
| StyleProp<{
|
|
185
|
+
fontFamily?: string | undefined;
|
|
186
|
+
fontSize?: number | undefined;
|
|
187
|
+
}>
|
|
188
|
+
| undefined;
|
|
190
189
|
/**
|
|
191
|
-
* Icon to display in the header
|
|
190
|
+
* Icon to display in the header in the back button.
|
|
191
|
+
*
|
|
192
|
+
* Supported types:
|
|
193
|
+
* - image: custom image source
|
|
194
|
+
* - sfSymbol: SF Symbol icon (iOS only - when using custom header)
|
|
195
|
+
* - materialSymbol: material symbol icon (Android only)
|
|
196
|
+
*
|
|
192
197
|
* Defaults to back icon image for the platform
|
|
193
198
|
* - A chevron on iOS
|
|
194
199
|
* - An arrow on Android
|
|
@@ -201,10 +206,7 @@ export type NativeStackNavigationOptions = {
|
|
|
201
206
|
* }
|
|
202
207
|
* ```
|
|
203
208
|
*/
|
|
204
|
-
headerBackIcon?:
|
|
205
|
-
type: 'image';
|
|
206
|
-
source: ImageSourcePropType;
|
|
207
|
-
};
|
|
209
|
+
headerBackIcon?: Icon | undefined;
|
|
208
210
|
/**
|
|
209
211
|
* Style of the header when a large title is shown.
|
|
210
212
|
* The large title is shown if `headerLargeTitleEnabled` is `true` and
|
|
@@ -217,9 +219,11 @@ export type NativeStackNavigationOptions = {
|
|
|
217
219
|
*
|
|
218
220
|
* @platform ios
|
|
219
221
|
*/
|
|
220
|
-
headerLargeStyle?:
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
headerLargeStyle?:
|
|
223
|
+
| StyleProp<{
|
|
224
|
+
backgroundColor?: ColorValue | undefined;
|
|
225
|
+
}>
|
|
226
|
+
| undefined;
|
|
223
227
|
/**
|
|
224
228
|
* Whether to enable header with large title which collapses to regular header on scroll.
|
|
225
229
|
*
|
|
@@ -231,7 +235,7 @@ export type NativeStackNavigationOptions = {
|
|
|
231
235
|
*
|
|
232
236
|
* @platform ios
|
|
233
237
|
*/
|
|
234
|
-
headerLargeTitleEnabled?: boolean;
|
|
238
|
+
headerLargeTitleEnabled?: boolean | undefined;
|
|
235
239
|
/**
|
|
236
240
|
* Whether drop shadow of header is visible when a large title is shown.
|
|
237
241
|
*
|
|
@@ -239,7 +243,7 @@ export type NativeStackNavigationOptions = {
|
|
|
239
243
|
*
|
|
240
244
|
* @platform ios
|
|
241
245
|
*/
|
|
242
|
-
headerLargeTitleShadowVisible?: boolean;
|
|
246
|
+
headerLargeTitleShadowVisible?: boolean | undefined;
|
|
243
247
|
/**
|
|
244
248
|
* Style object for large title in header. Supported properties:
|
|
245
249
|
* - fontFamily
|
|
@@ -251,34 +255,38 @@ export type NativeStackNavigationOptions = {
|
|
|
251
255
|
*
|
|
252
256
|
* @platform ios
|
|
253
257
|
*/
|
|
254
|
-
headerLargeTitleStyle?:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
headerLargeTitleStyle?:
|
|
259
|
+
| StyleProp<{
|
|
260
|
+
fontFamily?: string | undefined;
|
|
261
|
+
fontSize?: number | undefined;
|
|
262
|
+
fontWeight?: string | undefined;
|
|
263
|
+
color?: ColorValue | undefined;
|
|
264
|
+
}>
|
|
265
|
+
| undefined;
|
|
260
266
|
/**
|
|
261
267
|
* Whether to show the header. The header is shown by default.
|
|
262
268
|
* Setting this to `false` hides the header.
|
|
263
269
|
*/
|
|
264
|
-
headerShown?: boolean;
|
|
270
|
+
headerShown?: boolean | undefined;
|
|
265
271
|
/**
|
|
266
272
|
* Style object for header. Supported properties:
|
|
267
273
|
* - backgroundColor
|
|
268
274
|
*/
|
|
269
|
-
headerStyle?:
|
|
270
|
-
|
|
271
|
-
|
|
275
|
+
headerStyle?:
|
|
276
|
+
| StyleProp<{
|
|
277
|
+
backgroundColor?: ColorValue | undefined;
|
|
278
|
+
}>
|
|
279
|
+
| undefined;
|
|
272
280
|
/**
|
|
273
281
|
* Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
|
|
274
282
|
*/
|
|
275
|
-
headerShadowVisible?: boolean;
|
|
283
|
+
headerShadowVisible?: boolean | undefined;
|
|
276
284
|
/**
|
|
277
285
|
* Boolean indicating whether the navigation bar is translucent.
|
|
278
286
|
* Setting this to `true` makes the header absolutely positioned,
|
|
279
287
|
* and changes the background color to `transparent` unless specified in `headerStyle`.
|
|
280
288
|
*/
|
|
281
|
-
headerTransparent?: boolean;
|
|
289
|
+
headerTransparent?: boolean | undefined;
|
|
282
290
|
/**
|
|
283
291
|
* Blur effect for the translucent header.
|
|
284
292
|
* The `headerTransparent` option needs to be set to `true` for this to work.
|
|
@@ -289,23 +297,25 @@ export type NativeStackNavigationOptions = {
|
|
|
289
297
|
*
|
|
290
298
|
* @platform ios
|
|
291
299
|
*/
|
|
292
|
-
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
|
|
300
|
+
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'] | undefined;
|
|
293
301
|
/**
|
|
294
302
|
* Tint color for the header. Changes the color of back button and title.
|
|
295
303
|
*/
|
|
296
|
-
headerTintColor?: ColorValue;
|
|
304
|
+
headerTintColor?: ColorValue | undefined;
|
|
297
305
|
/**
|
|
298
306
|
* Function which returns a React Element to render as the background of the header.
|
|
299
307
|
* This is useful for using backgrounds such as an image, a gradient, blur effect etc.
|
|
300
308
|
* You can use this with `headerTransparent` to render content underneath a translucent header.
|
|
301
309
|
*/
|
|
302
|
-
headerBackground?: () => React.ReactNode;
|
|
310
|
+
headerBackground?: (() => React.ReactNode) | undefined;
|
|
303
311
|
/**
|
|
304
312
|
* Function which returns a React Element to display on the left side of the header.
|
|
305
313
|
* This replaces the back button. See `headerBackVisible` to show the back button along side left element.
|
|
306
314
|
* Will be overriden by `headerLeftItems` on iOS.
|
|
307
315
|
*/
|
|
308
|
-
headerLeft?:
|
|
316
|
+
headerLeft?:
|
|
317
|
+
| ((props: NativeStackHeaderBackProps) => React.ReactNode)
|
|
318
|
+
| undefined;
|
|
309
319
|
/**
|
|
310
320
|
* Whether the liquid glass background is visible for the item.
|
|
311
321
|
*
|
|
@@ -314,12 +324,14 @@ export type NativeStackNavigationOptions = {
|
|
|
314
324
|
*
|
|
315
325
|
* Defaults to `true`.
|
|
316
326
|
*/
|
|
317
|
-
headerLeftBackgroundVisible?: boolean;
|
|
327
|
+
headerLeftBackgroundVisible?: boolean | undefined;
|
|
318
328
|
/**
|
|
319
329
|
* Function which returns a React Element to display on the right side of the header.
|
|
320
330
|
* Will be overriden by `headerRightItems` on iOS.
|
|
321
331
|
*/
|
|
322
|
-
headerRight?:
|
|
332
|
+
headerRight?:
|
|
333
|
+
| ((props: NativeStackHeaderItemProps) => React.ReactNode)
|
|
334
|
+
| undefined;
|
|
323
335
|
/**
|
|
324
336
|
* Whether the liquid glass background is visible for the item.
|
|
325
337
|
*
|
|
@@ -328,7 +340,7 @@ export type NativeStackNavigationOptions = {
|
|
|
328
340
|
*
|
|
329
341
|
* Defaults to `true`.
|
|
330
342
|
*/
|
|
331
|
-
headerRightBackgroundVisible?: boolean;
|
|
343
|
+
headerRightBackgroundVisible?: boolean | undefined;
|
|
332
344
|
/**
|
|
333
345
|
* Function which returns an array of items to display as on the left side of the header.
|
|
334
346
|
* Overrides `headerLeft`.
|
|
@@ -337,9 +349,9 @@ export type NativeStackNavigationOptions = {
|
|
|
337
349
|
*
|
|
338
350
|
* @platform ios
|
|
339
351
|
*/
|
|
340
|
-
unstable_headerLeftItems?:
|
|
341
|
-
props: NativeStackHeaderItemProps
|
|
342
|
-
|
|
352
|
+
unstable_headerLeftItems?:
|
|
353
|
+
| ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[])
|
|
354
|
+
| undefined;
|
|
343
355
|
/**
|
|
344
356
|
* Function which returns an array of items to display as on the right side of the header.
|
|
345
357
|
* Overrides `headerRight`.
|
|
@@ -348,9 +360,9 @@ export type NativeStackNavigationOptions = {
|
|
|
348
360
|
*
|
|
349
361
|
* @platform ios
|
|
350
362
|
*/
|
|
351
|
-
unstable_headerRightItems?:
|
|
352
|
-
props: NativeStackHeaderItemProps
|
|
353
|
-
|
|
363
|
+
unstable_headerRightItems?:
|
|
364
|
+
| ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[])
|
|
365
|
+
| undefined;
|
|
354
366
|
/**
|
|
355
367
|
* String or a function that returns a React Element to be used by the header.
|
|
356
368
|
* Defaults to screen `title` or route name.
|
|
@@ -370,15 +382,16 @@ export type NativeStackNavigationOptions = {
|
|
|
370
382
|
/**
|
|
371
383
|
* Tint color for the header.
|
|
372
384
|
*/
|
|
373
|
-
tintColor?: ColorValue;
|
|
374
|
-
}) => React.ReactNode)
|
|
385
|
+
tintColor?: ColorValue | undefined;
|
|
386
|
+
}) => React.ReactNode)
|
|
387
|
+
| undefined;
|
|
375
388
|
/**
|
|
376
389
|
* How to align the the header title.
|
|
377
390
|
* Defaults to `left` on platforms other than iOS.
|
|
378
391
|
*
|
|
379
392
|
* Not supported on iOS. It's always `center` on iOS and cannot be changed.
|
|
380
393
|
*/
|
|
381
|
-
headerTitleAlign?: 'left' | 'center';
|
|
394
|
+
headerTitleAlign?: 'left' | 'center' | undefined;
|
|
382
395
|
/**
|
|
383
396
|
* Style object for header title. Supported properties:
|
|
384
397
|
* - fontFamily
|
|
@@ -386,19 +399,23 @@ export type NativeStackNavigationOptions = {
|
|
|
386
399
|
* - fontWeight
|
|
387
400
|
* - color
|
|
388
401
|
*/
|
|
389
|
-
headerTitleStyle?:
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
402
|
+
headerTitleStyle?:
|
|
403
|
+
| StyleProp<
|
|
404
|
+
Pick<TextStyle, 'fontFamily' | 'fontSize' | 'fontWeight'> & {
|
|
405
|
+
color?: ColorValue | undefined;
|
|
406
|
+
}
|
|
407
|
+
>
|
|
408
|
+
| undefined;
|
|
394
409
|
/**
|
|
395
410
|
* Options to render a native search bar.
|
|
396
411
|
* You also need to specify `contentInsetAdjustmentBehavior="automatic"` in your `ScrollView`, `FlatList` etc.
|
|
397
412
|
* If you don't have a `ScrollView`, specify `headerTransparent: false`.
|
|
398
413
|
*/
|
|
399
|
-
headerSearchBarOptions?:
|
|
400
|
-
|
|
401
|
-
|
|
414
|
+
headerSearchBarOptions?:
|
|
415
|
+
| (Omit<SearchBarProps, 'onChangeText'> & {
|
|
416
|
+
onChange?: SearchBarProps['onChangeText'] | undefined;
|
|
417
|
+
})
|
|
418
|
+
| undefined;
|
|
402
419
|
/**
|
|
403
420
|
* Boolean indicating whether to show the menu on longPress of iOS >= 14 back button. Defaults to `true`.
|
|
404
421
|
* Requires `react-native-screens` version >=3.3.0.
|
|
@@ -407,7 +424,7 @@ export type NativeStackNavigationOptions = {
|
|
|
407
424
|
*
|
|
408
425
|
* @platform ios
|
|
409
426
|
*/
|
|
410
|
-
headerBackButtonMenuEnabled?: boolean;
|
|
427
|
+
headerBackButtonMenuEnabled?: boolean | undefined;
|
|
411
428
|
/**
|
|
412
429
|
* How the back button displays icon and title.
|
|
413
430
|
*
|
|
@@ -429,25 +446,27 @@ export type NativeStackNavigationOptions = {
|
|
|
429
446
|
*
|
|
430
447
|
* @platform ios, web
|
|
431
448
|
*/
|
|
432
|
-
headerBackButtonDisplayMode?:
|
|
449
|
+
headerBackButtonDisplayMode?:
|
|
450
|
+
| ScreenStackHeaderConfigProps['backButtonDisplayMode']
|
|
451
|
+
| undefined;
|
|
433
452
|
/**
|
|
434
453
|
* Whether the home indicator should prefer to stay hidden on this screen. Defaults to `false`.
|
|
435
454
|
*
|
|
436
455
|
* @platform ios
|
|
437
456
|
*/
|
|
438
|
-
autoHideHomeIndicator?: boolean;
|
|
457
|
+
autoHideHomeIndicator?: boolean | undefined;
|
|
439
458
|
/**
|
|
440
459
|
* Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
|
|
441
460
|
*
|
|
442
461
|
* @platform ios
|
|
443
462
|
*/
|
|
444
|
-
keyboardHandlingEnabled?: boolean;
|
|
463
|
+
keyboardHandlingEnabled?: boolean | undefined;
|
|
445
464
|
/**
|
|
446
465
|
* Sets the visibility of the navigation bar. Defaults to `false`.
|
|
447
466
|
*
|
|
448
467
|
* @platform android
|
|
449
468
|
*/
|
|
450
|
-
navigationBarHidden?: boolean;
|
|
469
|
+
navigationBarHidden?: boolean | undefined;
|
|
451
470
|
/**
|
|
452
471
|
* Sets the status bar animation (similar to the `StatusBar` component).
|
|
453
472
|
* 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.
|
|
@@ -459,7 +478,7 @@ export type NativeStackNavigationOptions = {
|
|
|
459
478
|
*
|
|
460
479
|
* @platform android, ios
|
|
461
480
|
*/
|
|
462
|
-
statusBarAnimation?: ScreenProps['statusBarAnimation'];
|
|
481
|
+
statusBarAnimation?: ScreenProps['statusBarAnimation'] | undefined;
|
|
463
482
|
/**
|
|
464
483
|
* Whether the status bar should be hidden on this screen.
|
|
465
484
|
* Requires setting `View controller-based status bar appearance -> YES` in your Info.plist file.
|
|
@@ -468,7 +487,7 @@ export type NativeStackNavigationOptions = {
|
|
|
468
487
|
*
|
|
469
488
|
* @platform android, ios
|
|
470
489
|
*/
|
|
471
|
-
statusBarHidden?: boolean;
|
|
490
|
+
statusBarHidden?: boolean | undefined;
|
|
472
491
|
/**
|
|
473
492
|
* Sets the status bar color (similar to the `StatusBar` component).
|
|
474
493
|
* Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
|
|
@@ -480,7 +499,7 @@ export type NativeStackNavigationOptions = {
|
|
|
480
499
|
*
|
|
481
500
|
* @platform android, ios
|
|
482
501
|
*/
|
|
483
|
-
statusBarStyle?: ScreenProps['statusBarStyle'];
|
|
502
|
+
statusBarStyle?: ScreenProps['statusBarStyle'] | undefined;
|
|
484
503
|
/**
|
|
485
504
|
* Sets the direction in which you should swipe to dismiss the screen.
|
|
486
505
|
* When using `vertical` option, options `fullScreenGestureEnabled: true`, `animationMatchesGesture: true` and `animation: 'slide_from_bottom'` are set by default.
|
|
@@ -491,11 +510,11 @@ export type NativeStackNavigationOptions = {
|
|
|
491
510
|
*
|
|
492
511
|
* @platform ios
|
|
493
512
|
*/
|
|
494
|
-
gestureDirection?: ScreenProps['swipeDirection'];
|
|
513
|
+
gestureDirection?: ScreenProps['swipeDirection'] | undefined;
|
|
495
514
|
/**
|
|
496
515
|
* Style object for the scene content.
|
|
497
516
|
*/
|
|
498
|
-
contentStyle?: StyleProp<ViewStyle
|
|
517
|
+
contentStyle?: StyleProp<ViewStyle> | undefined;
|
|
499
518
|
/**
|
|
500
519
|
* Whether the gesture to dismiss should use animation provided to `animation` prop. Defaults to `false`.
|
|
501
520
|
*
|
|
@@ -503,7 +522,7 @@ export type NativeStackNavigationOptions = {
|
|
|
503
522
|
*
|
|
504
523
|
* @platform ios
|
|
505
524
|
*/
|
|
506
|
-
animationMatchesGesture?: boolean;
|
|
525
|
+
animationMatchesGesture?: boolean | undefined;
|
|
507
526
|
/**
|
|
508
527
|
* Whether the gesture to dismiss should work on the whole screen. The behavior depends on iOS version.
|
|
509
528
|
*
|
|
@@ -518,7 +537,7 @@ export type NativeStackNavigationOptions = {
|
|
|
518
537
|
*
|
|
519
538
|
* @platform ios
|
|
520
539
|
*/
|
|
521
|
-
fullScreenGestureEnabled?: boolean;
|
|
540
|
+
fullScreenGestureEnabled?: boolean | undefined;
|
|
522
541
|
/**
|
|
523
542
|
* iOS 18 and below. Controls whether the full screen dismiss gesture has shadow under view during transition.
|
|
524
543
|
* The gesture uses custom transition and thus doesn't have a shadow by default. When enabled, a custom shadow view
|
|
@@ -530,7 +549,7 @@ export type NativeStackNavigationOptions = {
|
|
|
530
549
|
*
|
|
531
550
|
* @platform ios
|
|
532
551
|
*/
|
|
533
|
-
fullScreenGestureShadowEnabled?: boolean;
|
|
552
|
+
fullScreenGestureShadowEnabled?: boolean | undefined;
|
|
534
553
|
/**
|
|
535
554
|
* Whether you can use gestures to dismiss this screen. Defaults to `true`.
|
|
536
555
|
*
|
|
@@ -538,13 +557,13 @@ export type NativeStackNavigationOptions = {
|
|
|
538
557
|
*
|
|
539
558
|
* @platform ios
|
|
540
559
|
*/
|
|
541
|
-
gestureEnabled?: boolean;
|
|
560
|
+
gestureEnabled?: boolean | undefined;
|
|
542
561
|
/**
|
|
543
562
|
* Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenGestureEnabled`.
|
|
544
563
|
*
|
|
545
564
|
* @platform ios
|
|
546
565
|
*/
|
|
547
|
-
gestureResponseDistance?: ScreenProps['gestureResponseDistance'];
|
|
566
|
+
gestureResponseDistance?: ScreenProps['gestureResponseDistance'] | undefined;
|
|
548
567
|
/**
|
|
549
568
|
* The type of animation to use when this screen replaces another screen. Defaults to `pop`.
|
|
550
569
|
*
|
|
@@ -554,7 +573,7 @@ export type NativeStackNavigationOptions = {
|
|
|
554
573
|
*
|
|
555
574
|
* Only supported on iOS and Android.
|
|
556
575
|
*/
|
|
557
|
-
animationTypeForReplace?: ScreenProps['replaceAnimation'];
|
|
576
|
+
animationTypeForReplace?: ScreenProps['replaceAnimation'] | undefined;
|
|
558
577
|
/**
|
|
559
578
|
* How the screen should animate when pushed or popped.
|
|
560
579
|
*
|
|
@@ -573,7 +592,7 @@ export type NativeStackNavigationOptions = {
|
|
|
573
592
|
*
|
|
574
593
|
* Only supported on iOS and Android.
|
|
575
594
|
*/
|
|
576
|
-
animation?: ScreenProps['stackAnimation'];
|
|
595
|
+
animation?: ScreenProps['stackAnimation'] | undefined;
|
|
577
596
|
/**
|
|
578
597
|
* Duration (in milliseconds) for the following transition animations on iOS:
|
|
579
598
|
* - `slide_from_bottom`
|
|
@@ -589,7 +608,7 @@ export type NativeStackNavigationOptions = {
|
|
|
589
608
|
*
|
|
590
609
|
* @platform ios
|
|
591
610
|
*/
|
|
592
|
-
animationDuration?: number;
|
|
611
|
+
animationDuration?: number | undefined;
|
|
593
612
|
/**
|
|
594
613
|
* How should the screen be presented.
|
|
595
614
|
*
|
|
@@ -605,7 +624,10 @@ export type NativeStackNavigationOptions = {
|
|
|
605
624
|
*
|
|
606
625
|
* Only supported on iOS and Android.
|
|
607
626
|
*/
|
|
608
|
-
presentation?:
|
|
627
|
+
presentation?:
|
|
628
|
+
| Exclude<ScreenProps['stackPresentation'], 'push'>
|
|
629
|
+
| 'card'
|
|
630
|
+
| undefined;
|
|
609
631
|
/**
|
|
610
632
|
* Describes heights where a sheet can rest.
|
|
611
633
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -624,7 +646,7 @@ export type NativeStackNavigationOptions = {
|
|
|
624
646
|
*
|
|
625
647
|
* Defaults to `[1.0]`.
|
|
626
648
|
*/
|
|
627
|
-
sheetAllowedDetents?: number[] | 'fitToContents';
|
|
649
|
+
sheetAllowedDetents?: number[] | 'fitToContents' | undefined;
|
|
628
650
|
/**
|
|
629
651
|
* Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
|
|
630
652
|
*
|
|
@@ -634,7 +656,7 @@ export type NativeStackNavigationOptions = {
|
|
|
634
656
|
*
|
|
635
657
|
* @platform Android
|
|
636
658
|
*/
|
|
637
|
-
sheetElevation?: number;
|
|
659
|
+
sheetElevation?: number | undefined;
|
|
638
660
|
/**
|
|
639
661
|
* Whether the sheet should expand to larger detent when scrolling.
|
|
640
662
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -642,7 +664,7 @@ export type NativeStackNavigationOptions = {
|
|
|
642
664
|
*
|
|
643
665
|
* @platform ios
|
|
644
666
|
*/
|
|
645
|
-
sheetExpandsWhenScrolledToEdge?: boolean;
|
|
667
|
+
sheetExpandsWhenScrolledToEdge?: boolean | undefined;
|
|
646
668
|
/**
|
|
647
669
|
* The corner radius that the sheet will try to render with.
|
|
648
670
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -651,7 +673,7 @@ export type NativeStackNavigationOptions = {
|
|
|
651
673
|
*
|
|
652
674
|
* If left unset system default is used.
|
|
653
675
|
*/
|
|
654
|
-
sheetCornerRadius?: number;
|
|
676
|
+
sheetCornerRadius?: number | undefined;
|
|
655
677
|
/**
|
|
656
678
|
* Index of the detent the sheet should expand to after being opened.
|
|
657
679
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -663,7 +685,7 @@ export type NativeStackNavigationOptions = {
|
|
|
663
685
|
*
|
|
664
686
|
* Defaults to `0` - which represents first detent in the detents array.
|
|
665
687
|
*/
|
|
666
|
-
sheetInitialDetentIndex?: number | 'last';
|
|
688
|
+
sheetInitialDetentIndex?: number | 'last' | undefined;
|
|
667
689
|
/**
|
|
668
690
|
* Boolean indicating whether the sheet shows a grabber at the top.
|
|
669
691
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -671,7 +693,7 @@ export type NativeStackNavigationOptions = {
|
|
|
671
693
|
*
|
|
672
694
|
* @platform ios
|
|
673
695
|
*/
|
|
674
|
-
sheetGrabberVisible?: boolean;
|
|
696
|
+
sheetGrabberVisible?: boolean | undefined;
|
|
675
697
|
/**
|
|
676
698
|
* The largest sheet detent for which a view underneath won't be dimmed.
|
|
677
699
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -684,9 +706,47 @@ export type NativeStackNavigationOptions = {
|
|
|
684
706
|
* * `none` - there will be dimming view for all detents levels,
|
|
685
707
|
* * `last` - there won't be a dimming view for any detent level.
|
|
686
708
|
*
|
|
709
|
+
* @remark
|
|
710
|
+
* On iOS, the native implementation might resize the the sheet w/o explicitly changing the detent level, e.g. in case of keyboard appearance.
|
|
711
|
+
* In case after such resize the sheet exceeds height for which in regular scenario a dimming view would be applied - it will be applied,
|
|
712
|
+
* even if the detent has not effectively been changed.
|
|
713
|
+
*
|
|
687
714
|
* Defaults to `none`, indicating that the dimming view should be always present.
|
|
688
715
|
*/
|
|
689
|
-
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last';
|
|
716
|
+
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last' | undefined;
|
|
717
|
+
/**
|
|
718
|
+
* Whether the sheet content should be rendered behind the Status Bar or display cutouts.
|
|
719
|
+
*
|
|
720
|
+
* When set to `true`, the sheet will extend to the physical edges of the stack,
|
|
721
|
+
* allowing content to be visible behind the status bar or display cutouts.
|
|
722
|
+
* Detent ratios in sheetAllowedDetents will be measured relative to the full stack height.
|
|
723
|
+
*
|
|
724
|
+
* When set to `false`, the sheet's layout will be constrained by the inset from the top
|
|
725
|
+
* and the detent ratios will then be measured relative to the adjusted height (excluding the top inset).
|
|
726
|
+
* This means that sheetAllowedDetents will result in different sheet heights depending on this prop.
|
|
727
|
+
*
|
|
728
|
+
* Defaults to `false`.
|
|
729
|
+
*
|
|
730
|
+
* @platform android
|
|
731
|
+
*/
|
|
732
|
+
sheetShouldOverflowTopInset?: boolean | undefined;
|
|
733
|
+
/**
|
|
734
|
+
* Whether the default native animation should be used when the sheet's with
|
|
735
|
+
* `fitToContents` content size changes.
|
|
736
|
+
*
|
|
737
|
+
* When set to `true`, the sheet uses internal logic to synchronize size updates and
|
|
738
|
+
* translation animations during entry, exit, or content updates. This ensures a smooth
|
|
739
|
+
* transition for standard, static content mounting/unmounting.
|
|
740
|
+
*
|
|
741
|
+
* When set to `false`, the internal animation and translation logic is ignored. This
|
|
742
|
+
* allows the sheet to adjust its size dynamically based on the current dimensions of
|
|
743
|
+
* the content provided by the developer, allowing implementing custom resizing animations.
|
|
744
|
+
*
|
|
745
|
+
* Defaults to `true`.
|
|
746
|
+
*
|
|
747
|
+
* @platform android
|
|
748
|
+
*/
|
|
749
|
+
sheetResizeAnimationEnabled?: boolean | undefined;
|
|
690
750
|
/**
|
|
691
751
|
* The display orientation to use for the screen.
|
|
692
752
|
*
|
|
@@ -702,15 +762,7 @@ export type NativeStackNavigationOptions = {
|
|
|
702
762
|
*
|
|
703
763
|
* Only supported on iOS and Android.
|
|
704
764
|
*/
|
|
705
|
-
orientation?: ScreenProps['screenOrientation'];
|
|
706
|
-
/**
|
|
707
|
-
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
708
|
-
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
709
|
-
* Requires `react-native-screens` version >=3.16.0.
|
|
710
|
-
*
|
|
711
|
-
* Only supported on iOS and Android.
|
|
712
|
-
*/
|
|
713
|
-
freezeOnBlur?: boolean;
|
|
765
|
+
orientation?: ScreenProps['screenOrientation'] | undefined;
|
|
714
766
|
/**
|
|
715
767
|
* Configures the scroll edge effect for the _content ScrollView_ (the ScrollView that is present in first descendants chain of the Screen).
|
|
716
768
|
* Depending on values set, it will blur the scrolling content below certain UI elements (header items, search bar)
|
|
@@ -734,12 +786,14 @@ export type NativeStackNavigationOptions = {
|
|
|
734
786
|
*
|
|
735
787
|
* @supported iOS 26 or higher
|
|
736
788
|
*/
|
|
737
|
-
scrollEdgeEffects?:
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
789
|
+
scrollEdgeEffects?:
|
|
790
|
+
| {
|
|
791
|
+
bottom?: ScrollEdgeEffect | undefined;
|
|
792
|
+
left?: ScrollEdgeEffect | undefined;
|
|
793
|
+
right?: ScrollEdgeEffect | undefined;
|
|
794
|
+
top?: ScrollEdgeEffect | undefined;
|
|
795
|
+
}
|
|
796
|
+
| undefined;
|
|
743
797
|
/**
|
|
744
798
|
* Footer component that can be used alongside formSheet stack presentation style.
|
|
745
799
|
*
|
|
@@ -752,27 +806,25 @@ export type NativeStackNavigationOptions = {
|
|
|
752
806
|
*
|
|
753
807
|
* @platform android
|
|
754
808
|
*/
|
|
755
|
-
unstable_sheetFooter?: () => React.ReactNode;
|
|
756
|
-
};
|
|
809
|
+
unstable_sheetFooter?: (() => React.ReactNode) | undefined;
|
|
757
810
|
|
|
758
|
-
type PlatformIconShared = {
|
|
759
|
-
type: 'image';
|
|
760
|
-
source: ImageSourcePropType;
|
|
761
811
|
/**
|
|
762
|
-
*
|
|
763
|
-
*
|
|
812
|
+
* What should happen when screens become inactive.
|
|
813
|
+
* - `pause`: Effects are cleaned up.
|
|
814
|
+
* - `unmount`: Screen is unmounted
|
|
815
|
+
* - `none`: Screen renders normally
|
|
764
816
|
*
|
|
765
|
-
*
|
|
817
|
+
* Defaults to `pause`.
|
|
818
|
+
*
|
|
819
|
+
* Preloaded screens won't be paused until after navigated to.
|
|
820
|
+
* This makes sure that effects are run to initialize the screen.
|
|
821
|
+
*
|
|
822
|
+
* Screens with nested navigators and last 2 screens won't be unmounted.
|
|
766
823
|
*/
|
|
767
|
-
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
type PlatformIconIOSSfSymbol = {
|
|
771
|
-
type: 'sfSymbol';
|
|
772
|
-
name: SFSymbol;
|
|
824
|
+
inactiveBehavior?: 'pause' | 'unmount' | 'none' | undefined;
|
|
773
825
|
};
|
|
774
826
|
|
|
775
|
-
type
|
|
827
|
+
type IconIOS = Extract<Icon, { type: 'image' | 'sfSymbol' }>;
|
|
776
828
|
|
|
777
829
|
type SharedHeaderItem = {
|
|
778
830
|
/**
|
|
@@ -782,90 +834,96 @@ type SharedHeaderItem = {
|
|
|
782
834
|
/**
|
|
783
835
|
* Style for the item label.
|
|
784
836
|
*/
|
|
785
|
-
labelStyle?:
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
837
|
+
labelStyle?:
|
|
838
|
+
| {
|
|
839
|
+
fontFamily?: string | undefined;
|
|
840
|
+
fontSize?: number | undefined;
|
|
841
|
+
fontWeight?: string | undefined;
|
|
842
|
+
color?: ColorValue | undefined;
|
|
843
|
+
}
|
|
844
|
+
| undefined;
|
|
791
845
|
/**
|
|
792
846
|
* Icon for the item
|
|
793
847
|
*/
|
|
794
|
-
icon?:
|
|
848
|
+
icon?: IconIOS | undefined;
|
|
795
849
|
/**
|
|
796
850
|
* The variant of the item.
|
|
797
851
|
* "prominent" only available from iOS 26.0 and later.
|
|
798
852
|
*
|
|
799
853
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
|
800
854
|
*/
|
|
801
|
-
variant?: 'plain' | 'done' | 'prominent';
|
|
855
|
+
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
|
802
856
|
/**
|
|
803
857
|
* The tint color to apply to the item.
|
|
804
858
|
*
|
|
805
859
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/tintcolor
|
|
806
860
|
*/
|
|
807
|
-
tintColor?: ColorValue;
|
|
861
|
+
tintColor?: ColorValue | undefined;
|
|
808
862
|
/**
|
|
809
863
|
* Whether the item is in a disabled state.
|
|
810
864
|
*/
|
|
811
|
-
disabled?: boolean;
|
|
865
|
+
disabled?: boolean | undefined;
|
|
812
866
|
/**
|
|
813
867
|
* The width of the item.
|
|
814
868
|
*
|
|
815
869
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/width
|
|
816
870
|
*/
|
|
817
|
-
width?: number;
|
|
871
|
+
width?: number | undefined;
|
|
818
872
|
/**
|
|
819
873
|
* Whether the background this item may share with other items in the bar should be hidden.
|
|
820
874
|
* Only available from iOS 26.0 and later.
|
|
821
875
|
*
|
|
822
876
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
823
877
|
*/
|
|
824
|
-
hidesSharedBackground?: boolean;
|
|
878
|
+
hidesSharedBackground?: boolean | undefined;
|
|
825
879
|
/**
|
|
826
880
|
* Whether this item can share a background with other items.
|
|
827
881
|
* Only available from iOS 26.0 and later.
|
|
828
882
|
*
|
|
829
883
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground
|
|
830
884
|
*/
|
|
831
|
-
sharesBackground?: boolean;
|
|
885
|
+
sharesBackground?: boolean | undefined;
|
|
832
886
|
/**
|
|
833
887
|
* An identifier used to match items across transitions.
|
|
834
888
|
* Only available from iOS 26.0 and later.
|
|
835
889
|
*
|
|
836
890
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/identifier
|
|
837
891
|
*/
|
|
838
|
-
identifier?: string;
|
|
892
|
+
identifier?: string | undefined;
|
|
839
893
|
/**
|
|
840
894
|
* A badge to display on a item.
|
|
841
895
|
* Only available from iOS 26.0 and later.
|
|
842
896
|
*
|
|
843
897
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitembadge
|
|
844
898
|
*/
|
|
845
|
-
badge?:
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
899
|
+
badge?:
|
|
900
|
+
| {
|
|
901
|
+
/**
|
|
902
|
+
* The text to display in the badge.
|
|
903
|
+
*/
|
|
904
|
+
value: number | string;
|
|
905
|
+
/**
|
|
906
|
+
* Style of the badge.
|
|
907
|
+
*/
|
|
908
|
+
style?:
|
|
909
|
+
| {
|
|
910
|
+
color?: ColorValue | undefined;
|
|
911
|
+
backgroundColor?: ColorValue | undefined;
|
|
912
|
+
fontFamily?: string | undefined;
|
|
913
|
+
fontSize?: number | undefined;
|
|
914
|
+
fontWeight?: string | undefined;
|
|
915
|
+
}
|
|
916
|
+
| undefined;
|
|
917
|
+
}
|
|
918
|
+
| undefined;
|
|
861
919
|
/**
|
|
862
920
|
* Accessibility label for the item.
|
|
863
921
|
*/
|
|
864
|
-
accessibilityLabel?: string;
|
|
922
|
+
accessibilityLabel?: string | undefined;
|
|
865
923
|
/**
|
|
866
924
|
* Accessibility hint for the item.
|
|
867
925
|
*/
|
|
868
|
-
accessibilityHint?: string;
|
|
926
|
+
accessibilityHint?: string | undefined;
|
|
869
927
|
};
|
|
870
928
|
|
|
871
929
|
/**
|
|
@@ -885,7 +943,7 @@ export type NativeStackHeaderItemButton = SharedHeaderItem & {
|
|
|
885
943
|
*
|
|
886
944
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected
|
|
887
945
|
*/
|
|
888
|
-
selected?: boolean;
|
|
946
|
+
selected?: boolean | undefined;
|
|
889
947
|
};
|
|
890
948
|
|
|
891
949
|
/**
|
|
@@ -900,11 +958,11 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
900
958
|
/**
|
|
901
959
|
* The secondary text displayed alongside the label of the menu item.
|
|
902
960
|
*/
|
|
903
|
-
description?: string;
|
|
961
|
+
description?: string | undefined;
|
|
904
962
|
/**
|
|
905
963
|
* Icon for the menu item.
|
|
906
964
|
*/
|
|
907
|
-
icon?:
|
|
965
|
+
icon?: IconIOS | undefined;
|
|
908
966
|
/**
|
|
909
967
|
* Function to call when the menu item is pressed.
|
|
910
968
|
*/
|
|
@@ -914,31 +972,31 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
914
972
|
*
|
|
915
973
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/state
|
|
916
974
|
*/
|
|
917
|
-
state?: 'on' | 'off' | 'mixed';
|
|
975
|
+
state?: 'on' | 'off' | 'mixed' | undefined;
|
|
918
976
|
/**
|
|
919
977
|
* Whether to apply disabled style to the item.
|
|
920
978
|
*
|
|
921
979
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled
|
|
922
980
|
*/
|
|
923
|
-
disabled?: boolean;
|
|
981
|
+
disabled?: boolean | undefined;
|
|
924
982
|
/**
|
|
925
983
|
* Whether to apply destructive style to the item.
|
|
926
984
|
*
|
|
927
985
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
928
986
|
*/
|
|
929
|
-
destructive?: boolean;
|
|
987
|
+
destructive?: boolean | undefined;
|
|
930
988
|
/**
|
|
931
989
|
* Whether to apply hidden style to the item.
|
|
932
990
|
*
|
|
933
991
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden
|
|
934
992
|
*/
|
|
935
|
-
hidden?: boolean;
|
|
993
|
+
hidden?: boolean | undefined;
|
|
936
994
|
/**
|
|
937
|
-
* Whether to keep the menu presented after firing the element
|
|
995
|
+
* Whether to keep the menu presented after firing the element's action.
|
|
938
996
|
*
|
|
939
997
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented
|
|
940
998
|
*/
|
|
941
|
-
keepsMenuPresented?: boolean;
|
|
999
|
+
keepsMenuPresented?: boolean | undefined;
|
|
942
1000
|
/**
|
|
943
1001
|
* An elaborated title that explains the purpose of the action.
|
|
944
1002
|
*
|
|
@@ -947,7 +1005,7 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
947
1005
|
*
|
|
948
1006
|
* Read more: https://developer.apple.com/documentation/uikit/uiaction/discoverabilitytitle
|
|
949
1007
|
*/
|
|
950
|
-
discoverabilityLabel?: string;
|
|
1008
|
+
discoverabilityLabel?: string | undefined;
|
|
951
1009
|
};
|
|
952
1010
|
|
|
953
1011
|
/**
|
|
@@ -962,7 +1020,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
962
1020
|
/**
|
|
963
1021
|
* Icon for the submenu item.
|
|
964
1022
|
*/
|
|
965
|
-
icon?:
|
|
1023
|
+
icon?: IconIOS | undefined;
|
|
966
1024
|
/**
|
|
967
1025
|
* Whether the menu is displayed inline with the parent menu.
|
|
968
1026
|
* By default, submenus are displayed after expanding the parent menu item.
|
|
@@ -972,7 +1030,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
972
1030
|
*
|
|
973
1031
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline
|
|
974
1032
|
*/
|
|
975
|
-
inline?: boolean;
|
|
1033
|
+
inline?: boolean | undefined;
|
|
976
1034
|
/**
|
|
977
1035
|
* How the submenu items are displayed.
|
|
978
1036
|
* - `default`: menu items are displayed normally.
|
|
@@ -982,13 +1040,13 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
982
1040
|
*
|
|
983
1041
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
984
1042
|
*/
|
|
985
|
-
layout?: 'default' | 'palette';
|
|
1043
|
+
layout?: 'default' | 'palette' | undefined;
|
|
986
1044
|
/**
|
|
987
1045
|
* Whether to apply destructive style to the menu item.
|
|
988
1046
|
*
|
|
989
1047
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
990
1048
|
*/
|
|
991
|
-
destructive?: boolean;
|
|
1049
|
+
destructive?: boolean | undefined;
|
|
992
1050
|
/**
|
|
993
1051
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
994
1052
|
*
|
|
@@ -996,7 +1054,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
996
1054
|
*
|
|
997
1055
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
998
1056
|
*/
|
|
999
|
-
multiselectable?: boolean;
|
|
1057
|
+
multiselectable?: boolean | undefined;
|
|
1000
1058
|
/**
|
|
1001
1059
|
* Array of menu items (actions or submenus).
|
|
1002
1060
|
*/
|
|
@@ -1014,7 +1072,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1014
1072
|
*
|
|
1015
1073
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/changesselectionasprimaryaction
|
|
1016
1074
|
*/
|
|
1017
|
-
changesSelectionAsPrimaryAction?: boolean;
|
|
1075
|
+
changesSelectionAsPrimaryAction?: boolean | undefined;
|
|
1018
1076
|
/**
|
|
1019
1077
|
* Menu for the item.
|
|
1020
1078
|
*/
|
|
@@ -1022,7 +1080,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1022
1080
|
/**
|
|
1023
1081
|
* Optional title to show on top of the menu.
|
|
1024
1082
|
*/
|
|
1025
|
-
title?: string;
|
|
1083
|
+
title?: string | undefined;
|
|
1026
1084
|
/**
|
|
1027
1085
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
1028
1086
|
*
|
|
@@ -1030,7 +1088,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1030
1088
|
*
|
|
1031
1089
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
1032
1090
|
*/
|
|
1033
|
-
multiselectable?: boolean;
|
|
1091
|
+
multiselectable?: boolean | undefined;
|
|
1034
1092
|
/**
|
|
1035
1093
|
* How the submenu items are displayed.
|
|
1036
1094
|
* - `default`: menu items are displayed normally.
|
|
@@ -1040,7 +1098,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1040
1098
|
*
|
|
1041
1099
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
1042
1100
|
*/
|
|
1043
|
-
layout?: 'default' | 'palette';
|
|
1101
|
+
layout?: 'default' | 'palette' | undefined;
|
|
1044
1102
|
/**
|
|
1045
1103
|
* Array of menu items (actions or submenus).
|
|
1046
1104
|
*/
|
|
@@ -1077,7 +1135,7 @@ export type NativeStackHeaderItemCustom = {
|
|
|
1077
1135
|
*
|
|
1078
1136
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
1079
1137
|
*/
|
|
1080
|
-
hidesSharedBackground?: boolean;
|
|
1138
|
+
hidesSharedBackground?: boolean | undefined;
|
|
1081
1139
|
};
|
|
1082
1140
|
|
|
1083
1141
|
/**
|