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