@react-navigation/stack 7.0.0-rc.21 → 7.0.0-rc.23
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/commonjs/views/Stack/CardContainer.js +14 -11
- package/lib/commonjs/views/Stack/CardContainer.js.map +1 -1
- package/lib/module/views/Stack/CardContainer.js +14 -11
- package/lib/module/views/Stack/CardContainer.js.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +1 -5
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/Stack/CardContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -1
- package/lib/typescript/module/src/types.d.ts +1 -5
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/views/Stack/CardContainer.d.ts.map +1 -1
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/types.tsx +1 -5
- package/src/views/Stack/CardContainer.tsx +14 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/stack",
|
|
3
3
|
"description": "Stack navigator component for iOS and Android with animated transitions and gestures",
|
|
4
|
-
"version": "7.0.0-rc.
|
|
4
|
+
"version": "7.0.0-rc.23",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"clean": "del lib"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@react-navigation/elements": "^2.0.0-rc.
|
|
54
|
+
"@react-navigation/elements": "^2.0.0-rc.21",
|
|
55
55
|
"color": "^4.2.3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@jest/globals": "^29.7.0",
|
|
59
|
-
"@react-navigation/native": "^7.0.0-rc.
|
|
59
|
+
"@react-navigation/native": "^7.0.0-rc.18",
|
|
60
60
|
"@testing-library/react-native": "^12.4.3",
|
|
61
61
|
"@types/color": "^3.0.6",
|
|
62
62
|
"@types/react": "~18.2.79",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript": "^5.5.2"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@react-navigation/native": "^7.0.0-rc.
|
|
73
|
+
"@react-navigation/native": "^7.0.0-rc.18",
|
|
74
74
|
"react": ">= 18.2.0",
|
|
75
75
|
"react-native": ">= 0.72.0",
|
|
76
76
|
"react-native-gesture-handler": ">= 2.0.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
]
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "f1b77a90eee4444e990aa86d7feecffff85d020b"
|
|
106
106
|
}
|
package/src/types.tsx
CHANGED
|
@@ -199,7 +199,7 @@ export type StackHeaderOptions = Omit<
|
|
|
199
199
|
* - "generic" – Displays one of the following depending on the available space: truncated title (e.g. 'Back') or no title (only icon).
|
|
200
200
|
* - "minimal" – Always displays only the icon without a title.
|
|
201
201
|
*
|
|
202
|
-
* Defaults to "default" on iOS, and "minimal" on
|
|
202
|
+
* Defaults to "default" on iOS, and "minimal" on other platforms.
|
|
203
203
|
*/
|
|
204
204
|
headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode;
|
|
205
205
|
/**
|
|
@@ -274,10 +274,6 @@ export type StackHeaderRightProps = {
|
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
export type StackHeaderLeftProps = HeaderBackButtonProps & {
|
|
277
|
-
/**
|
|
278
|
-
* The `href` to use for the anchor tag on web
|
|
279
|
-
*/
|
|
280
|
-
href?: string;
|
|
281
277
|
/**
|
|
282
278
|
* Whether it's possible to navigate back in stack.
|
|
283
279
|
*/
|
|
@@ -287,6 +287,17 @@ function CardContainerInner({
|
|
|
287
287
|
>
|
|
288
288
|
<View style={styles.container}>
|
|
289
289
|
<ModalPresentationContext.Provider value={modal}>
|
|
290
|
+
{headerMode !== 'float'
|
|
291
|
+
? renderHeader({
|
|
292
|
+
mode: 'screen',
|
|
293
|
+
layout,
|
|
294
|
+
scenes: [previousScene, scene],
|
|
295
|
+
getPreviousScene,
|
|
296
|
+
getFocusedRoute,
|
|
297
|
+
onContentHeightChange: onHeaderHeightChange,
|
|
298
|
+
style: styles.header,
|
|
299
|
+
})
|
|
300
|
+
: null}
|
|
290
301
|
<View style={styles.scene}>
|
|
291
302
|
<HeaderBackContext.Provider value={headerBack}>
|
|
292
303
|
<HeaderShownContext.Provider
|
|
@@ -304,16 +315,6 @@ function CardContainerInner({
|
|
|
304
315
|
</HeaderShownContext.Provider>
|
|
305
316
|
</HeaderBackContext.Provider>
|
|
306
317
|
</View>
|
|
307
|
-
{headerMode !== 'float'
|
|
308
|
-
? renderHeader({
|
|
309
|
-
mode: 'screen',
|
|
310
|
-
layout,
|
|
311
|
-
scenes: [previousScene, scene],
|
|
312
|
-
getPreviousScene,
|
|
313
|
-
getFocusedRoute,
|
|
314
|
-
onContentHeightChange: onHeaderHeightChange,
|
|
315
|
-
})
|
|
316
|
-
: null}
|
|
317
318
|
</ModalPresentationContext.Provider>
|
|
318
319
|
</View>
|
|
319
320
|
</Card>
|
|
@@ -325,7 +326,9 @@ export const CardContainer = React.memo(CardContainerInner);
|
|
|
325
326
|
const styles = StyleSheet.create({
|
|
326
327
|
container: {
|
|
327
328
|
flex: 1,
|
|
328
|
-
|
|
329
|
+
},
|
|
330
|
+
header: {
|
|
331
|
+
zIndex: 1,
|
|
329
332
|
},
|
|
330
333
|
scene: {
|
|
331
334
|
flex: 1,
|