@react-navigation/native-stack 8.0.0-alpha.4 → 8.0.0-alpha.41
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 +113 -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 +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 +145 -148
- 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 +1 -1
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts.map +1 -1
- package/package.json +18 -19
- package/src/index.tsx +1 -0
- package/src/navigators/createNativeStackNavigator.tsx +11 -47
- package/src/types.tsx +206 -186
- 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 +168 -89
- package/src/views/NativeStackView.tsx +70 -41
- 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`.
|
|
@@ -691,7 +713,7 @@ export type NativeStackNavigationOptions = {
|
|
|
691
713
|
*
|
|
692
714
|
* Defaults to `none`, indicating that the dimming view should be always present.
|
|
693
715
|
*/
|
|
694
|
-
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last';
|
|
716
|
+
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last' | undefined;
|
|
695
717
|
/**
|
|
696
718
|
* Whether the sheet content should be rendered behind the Status Bar or display cutouts.
|
|
697
719
|
*
|
|
@@ -707,7 +729,7 @@ export type NativeStackNavigationOptions = {
|
|
|
707
729
|
*
|
|
708
730
|
* @platform android
|
|
709
731
|
*/
|
|
710
|
-
sheetShouldOverflowTopInset?: boolean;
|
|
732
|
+
sheetShouldOverflowTopInset?: boolean | undefined;
|
|
711
733
|
/**
|
|
712
734
|
* Whether the default native animation should be used when the sheet's with
|
|
713
735
|
* `fitToContents` content size changes.
|
|
@@ -724,7 +746,7 @@ export type NativeStackNavigationOptions = {
|
|
|
724
746
|
*
|
|
725
747
|
* @platform android
|
|
726
748
|
*/
|
|
727
|
-
sheetResizeAnimationEnabled?: boolean;
|
|
749
|
+
sheetResizeAnimationEnabled?: boolean | undefined;
|
|
728
750
|
/**
|
|
729
751
|
* The display orientation to use for the screen.
|
|
730
752
|
*
|
|
@@ -740,15 +762,7 @@ export type NativeStackNavigationOptions = {
|
|
|
740
762
|
*
|
|
741
763
|
* Only supported on iOS and Android.
|
|
742
764
|
*/
|
|
743
|
-
orientation?: ScreenProps['screenOrientation'];
|
|
744
|
-
/**
|
|
745
|
-
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
746
|
-
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
747
|
-
* Requires `react-native-screens` version >=3.16.0.
|
|
748
|
-
*
|
|
749
|
-
* Only supported on iOS and Android.
|
|
750
|
-
*/
|
|
751
|
-
freezeOnBlur?: boolean;
|
|
765
|
+
orientation?: ScreenProps['screenOrientation'] | undefined;
|
|
752
766
|
/**
|
|
753
767
|
* Configures the scroll edge effect for the _content ScrollView_ (the ScrollView that is present in first descendants chain of the Screen).
|
|
754
768
|
* Depending on values set, it will blur the scrolling content below certain UI elements (header items, search bar)
|
|
@@ -772,12 +786,14 @@ export type NativeStackNavigationOptions = {
|
|
|
772
786
|
*
|
|
773
787
|
* @supported iOS 26 or higher
|
|
774
788
|
*/
|
|
775
|
-
scrollEdgeEffects?:
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
789
|
+
scrollEdgeEffects?:
|
|
790
|
+
| {
|
|
791
|
+
bottom?: ScrollEdgeEffect | undefined;
|
|
792
|
+
left?: ScrollEdgeEffect | undefined;
|
|
793
|
+
right?: ScrollEdgeEffect | undefined;
|
|
794
|
+
top?: ScrollEdgeEffect | undefined;
|
|
795
|
+
}
|
|
796
|
+
| undefined;
|
|
781
797
|
/**
|
|
782
798
|
* Footer component that can be used alongside formSheet stack presentation style.
|
|
783
799
|
*
|
|
@@ -790,27 +806,25 @@ export type NativeStackNavigationOptions = {
|
|
|
790
806
|
*
|
|
791
807
|
* @platform android
|
|
792
808
|
*/
|
|
793
|
-
unstable_sheetFooter?: () => React.ReactNode;
|
|
794
|
-
};
|
|
809
|
+
unstable_sheetFooter?: (() => React.ReactNode) | undefined;
|
|
795
810
|
|
|
796
|
-
type PlatformIconShared = {
|
|
797
|
-
type: 'image';
|
|
798
|
-
source: ImageSourcePropType;
|
|
799
811
|
/**
|
|
800
|
-
*
|
|
801
|
-
*
|
|
812
|
+
* What should happen when screens become inactive.
|
|
813
|
+
* - `pause`: Effects are cleaned up.
|
|
814
|
+
* - `unmount`: Screen is unmounted
|
|
815
|
+
* - `none`: Screen renders normally
|
|
802
816
|
*
|
|
803
|
-
*
|
|
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.
|
|
804
823
|
*/
|
|
805
|
-
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
type PlatformIconIOSSfSymbol = {
|
|
809
|
-
type: 'sfSymbol';
|
|
810
|
-
name: SFSymbol;
|
|
824
|
+
inactiveBehavior?: 'pause' | 'unmount' | 'none' | undefined;
|
|
811
825
|
};
|
|
812
826
|
|
|
813
|
-
type
|
|
827
|
+
type IconIOS = Extract<Icon, { type: 'image' | 'sfSymbol' }>;
|
|
814
828
|
|
|
815
829
|
type SharedHeaderItem = {
|
|
816
830
|
/**
|
|
@@ -820,90 +834,96 @@ type SharedHeaderItem = {
|
|
|
820
834
|
/**
|
|
821
835
|
* Style for the item label.
|
|
822
836
|
*/
|
|
823
|
-
labelStyle?:
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
837
|
+
labelStyle?:
|
|
838
|
+
| {
|
|
839
|
+
fontFamily?: string | undefined;
|
|
840
|
+
fontSize?: number | undefined;
|
|
841
|
+
fontWeight?: string | undefined;
|
|
842
|
+
color?: ColorValue | undefined;
|
|
843
|
+
}
|
|
844
|
+
| undefined;
|
|
829
845
|
/**
|
|
830
846
|
* Icon for the item
|
|
831
847
|
*/
|
|
832
|
-
icon?:
|
|
848
|
+
icon?: IconIOS | undefined;
|
|
833
849
|
/**
|
|
834
850
|
* The variant of the item.
|
|
835
851
|
* "prominent" only available from iOS 26.0 and later.
|
|
836
852
|
*
|
|
837
853
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
|
838
854
|
*/
|
|
839
|
-
variant?: 'plain' | 'done' | 'prominent';
|
|
855
|
+
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
|
840
856
|
/**
|
|
841
857
|
* The tint color to apply to the item.
|
|
842
858
|
*
|
|
843
859
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/tintcolor
|
|
844
860
|
*/
|
|
845
|
-
tintColor?: ColorValue;
|
|
861
|
+
tintColor?: ColorValue | undefined;
|
|
846
862
|
/**
|
|
847
863
|
* Whether the item is in a disabled state.
|
|
848
864
|
*/
|
|
849
|
-
disabled?: boolean;
|
|
865
|
+
disabled?: boolean | undefined;
|
|
850
866
|
/**
|
|
851
867
|
* The width of the item.
|
|
852
868
|
*
|
|
853
869
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/width
|
|
854
870
|
*/
|
|
855
|
-
width?: number;
|
|
871
|
+
width?: number | undefined;
|
|
856
872
|
/**
|
|
857
873
|
* Whether the background this item may share with other items in the bar should be hidden.
|
|
858
874
|
* Only available from iOS 26.0 and later.
|
|
859
875
|
*
|
|
860
876
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
861
877
|
*/
|
|
862
|
-
hidesSharedBackground?: boolean;
|
|
878
|
+
hidesSharedBackground?: boolean | undefined;
|
|
863
879
|
/**
|
|
864
880
|
* Whether this item can share a background with other items.
|
|
865
881
|
* Only available from iOS 26.0 and later.
|
|
866
882
|
*
|
|
867
883
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground
|
|
868
884
|
*/
|
|
869
|
-
sharesBackground?: boolean;
|
|
885
|
+
sharesBackground?: boolean | undefined;
|
|
870
886
|
/**
|
|
871
887
|
* An identifier used to match items across transitions.
|
|
872
888
|
* Only available from iOS 26.0 and later.
|
|
873
889
|
*
|
|
874
890
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/identifier
|
|
875
891
|
*/
|
|
876
|
-
identifier?: string;
|
|
892
|
+
identifier?: string | undefined;
|
|
877
893
|
/**
|
|
878
894
|
* A badge to display on a item.
|
|
879
895
|
* Only available from iOS 26.0 and later.
|
|
880
896
|
*
|
|
881
897
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitembadge
|
|
882
898
|
*/
|
|
883
|
-
badge?:
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
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;
|
|
899
919
|
/**
|
|
900
920
|
* Accessibility label for the item.
|
|
901
921
|
*/
|
|
902
|
-
accessibilityLabel?: string;
|
|
922
|
+
accessibilityLabel?: string | undefined;
|
|
903
923
|
/**
|
|
904
924
|
* Accessibility hint for the item.
|
|
905
925
|
*/
|
|
906
|
-
accessibilityHint?: string;
|
|
926
|
+
accessibilityHint?: string | undefined;
|
|
907
927
|
};
|
|
908
928
|
|
|
909
929
|
/**
|
|
@@ -923,7 +943,7 @@ export type NativeStackHeaderItemButton = SharedHeaderItem & {
|
|
|
923
943
|
*
|
|
924
944
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected
|
|
925
945
|
*/
|
|
926
|
-
selected?: boolean;
|
|
946
|
+
selected?: boolean | undefined;
|
|
927
947
|
};
|
|
928
948
|
|
|
929
949
|
/**
|
|
@@ -938,11 +958,11 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
938
958
|
/**
|
|
939
959
|
* The secondary text displayed alongside the label of the menu item.
|
|
940
960
|
*/
|
|
941
|
-
description?: string;
|
|
961
|
+
description?: string | undefined;
|
|
942
962
|
/**
|
|
943
963
|
* Icon for the menu item.
|
|
944
964
|
*/
|
|
945
|
-
icon?:
|
|
965
|
+
icon?: IconIOS | undefined;
|
|
946
966
|
/**
|
|
947
967
|
* Function to call when the menu item is pressed.
|
|
948
968
|
*/
|
|
@@ -952,31 +972,31 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
952
972
|
*
|
|
953
973
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/state
|
|
954
974
|
*/
|
|
955
|
-
state?: 'on' | 'off' | 'mixed';
|
|
975
|
+
state?: 'on' | 'off' | 'mixed' | undefined;
|
|
956
976
|
/**
|
|
957
977
|
* Whether to apply disabled style to the item.
|
|
958
978
|
*
|
|
959
979
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled
|
|
960
980
|
*/
|
|
961
|
-
disabled?: boolean;
|
|
981
|
+
disabled?: boolean | undefined;
|
|
962
982
|
/**
|
|
963
983
|
* Whether to apply destructive style to the item.
|
|
964
984
|
*
|
|
965
985
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
966
986
|
*/
|
|
967
|
-
destructive?: boolean;
|
|
987
|
+
destructive?: boolean | undefined;
|
|
968
988
|
/**
|
|
969
989
|
* Whether to apply hidden style to the item.
|
|
970
990
|
*
|
|
971
991
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden
|
|
972
992
|
*/
|
|
973
|
-
hidden?: boolean;
|
|
993
|
+
hidden?: boolean | undefined;
|
|
974
994
|
/**
|
|
975
|
-
* Whether to keep the menu presented after firing the element
|
|
995
|
+
* Whether to keep the menu presented after firing the element's action.
|
|
976
996
|
*
|
|
977
997
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented
|
|
978
998
|
*/
|
|
979
|
-
keepsMenuPresented?: boolean;
|
|
999
|
+
keepsMenuPresented?: boolean | undefined;
|
|
980
1000
|
/**
|
|
981
1001
|
* An elaborated title that explains the purpose of the action.
|
|
982
1002
|
*
|
|
@@ -985,7 +1005,7 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
985
1005
|
*
|
|
986
1006
|
* Read more: https://developer.apple.com/documentation/uikit/uiaction/discoverabilitytitle
|
|
987
1007
|
*/
|
|
988
|
-
discoverabilityLabel?: string;
|
|
1008
|
+
discoverabilityLabel?: string | undefined;
|
|
989
1009
|
};
|
|
990
1010
|
|
|
991
1011
|
/**
|
|
@@ -1000,7 +1020,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
1000
1020
|
/**
|
|
1001
1021
|
* Icon for the submenu item.
|
|
1002
1022
|
*/
|
|
1003
|
-
icon?:
|
|
1023
|
+
icon?: IconIOS | undefined;
|
|
1004
1024
|
/**
|
|
1005
1025
|
* Whether the menu is displayed inline with the parent menu.
|
|
1006
1026
|
* By default, submenus are displayed after expanding the parent menu item.
|
|
@@ -1010,7 +1030,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
1010
1030
|
*
|
|
1011
1031
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline
|
|
1012
1032
|
*/
|
|
1013
|
-
inline?: boolean;
|
|
1033
|
+
inline?: boolean | undefined;
|
|
1014
1034
|
/**
|
|
1015
1035
|
* How the submenu items are displayed.
|
|
1016
1036
|
* - `default`: menu items are displayed normally.
|
|
@@ -1020,13 +1040,13 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
1020
1040
|
*
|
|
1021
1041
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
1022
1042
|
*/
|
|
1023
|
-
layout?: 'default' | 'palette';
|
|
1043
|
+
layout?: 'default' | 'palette' | undefined;
|
|
1024
1044
|
/**
|
|
1025
1045
|
* Whether to apply destructive style to the menu item.
|
|
1026
1046
|
*
|
|
1027
1047
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
1028
1048
|
*/
|
|
1029
|
-
destructive?: boolean;
|
|
1049
|
+
destructive?: boolean | undefined;
|
|
1030
1050
|
/**
|
|
1031
1051
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
1032
1052
|
*
|
|
@@ -1034,7 +1054,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
1034
1054
|
*
|
|
1035
1055
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
1036
1056
|
*/
|
|
1037
|
-
multiselectable?: boolean;
|
|
1057
|
+
multiselectable?: boolean | undefined;
|
|
1038
1058
|
/**
|
|
1039
1059
|
* Array of menu items (actions or submenus).
|
|
1040
1060
|
*/
|
|
@@ -1052,7 +1072,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1052
1072
|
*
|
|
1053
1073
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/changesselectionasprimaryaction
|
|
1054
1074
|
*/
|
|
1055
|
-
changesSelectionAsPrimaryAction?: boolean;
|
|
1075
|
+
changesSelectionAsPrimaryAction?: boolean | undefined;
|
|
1056
1076
|
/**
|
|
1057
1077
|
* Menu for the item.
|
|
1058
1078
|
*/
|
|
@@ -1060,7 +1080,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1060
1080
|
/**
|
|
1061
1081
|
* Optional title to show on top of the menu.
|
|
1062
1082
|
*/
|
|
1063
|
-
title?: string;
|
|
1083
|
+
title?: string | undefined;
|
|
1064
1084
|
/**
|
|
1065
1085
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
1066
1086
|
*
|
|
@@ -1068,7 +1088,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1068
1088
|
*
|
|
1069
1089
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
1070
1090
|
*/
|
|
1071
|
-
multiselectable?: boolean;
|
|
1091
|
+
multiselectable?: boolean | undefined;
|
|
1072
1092
|
/**
|
|
1073
1093
|
* How the submenu items are displayed.
|
|
1074
1094
|
* - `default`: menu items are displayed normally.
|
|
@@ -1078,7 +1098,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1078
1098
|
*
|
|
1079
1099
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
1080
1100
|
*/
|
|
1081
|
-
layout?: 'default' | 'palette';
|
|
1101
|
+
layout?: 'default' | 'palette' | undefined;
|
|
1082
1102
|
/**
|
|
1083
1103
|
* Array of menu items (actions or submenus).
|
|
1084
1104
|
*/
|
|
@@ -1115,7 +1135,7 @@ export type NativeStackHeaderItemCustom = {
|
|
|
1115
1135
|
*
|
|
1116
1136
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
1117
1137
|
*/
|
|
1118
|
-
hidesSharedBackground?: boolean;
|
|
1138
|
+
hidesSharedBackground?: boolean | undefined;
|
|
1119
1139
|
};
|
|
1120
1140
|
|
|
1121
1141
|
/**
|