@react-navigation/drawer 8.0.0-alpha.14 → 8.0.0-alpha.16
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.
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ScrollView, StyleSheet } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { DrawerPositionContext } from "../utils/DrawerPositionContext.js";
|
|
8
|
-
import { jsx as _jsx,
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
9
|
const SPACING = 12;
|
|
10
10
|
function DrawerContentScrollViewInner({
|
|
11
11
|
contentContainerStyle,
|
|
@@ -19,22 +19,26 @@ function DrawerContentScrollViewInner({
|
|
|
19
19
|
direction
|
|
20
20
|
} = useLocale();
|
|
21
21
|
const isRight = direction === 'rtl' ? drawerPosition === 'left' : drawerPosition === 'right';
|
|
22
|
-
return /*#__PURE__*/
|
|
23
|
-
children:
|
|
24
|
-
direction: "vertical",
|
|
25
|
-
edge: "top"
|
|
26
|
-
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
22
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
23
|
+
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
27
24
|
...rest,
|
|
28
25
|
ref: ref,
|
|
29
26
|
contentContainerStyle: [{
|
|
30
|
-
paddingTop: SPACING + insets.top,
|
|
31
27
|
paddingBottom: SPACING + insets.bottom,
|
|
32
28
|
paddingStart: SPACING + (!isRight ? insets.left : 0),
|
|
33
29
|
paddingEnd: SPACING + (isRight ? insets.right : 0)
|
|
34
30
|
}, contentContainerStyle],
|
|
35
31
|
style: [styles.container, style],
|
|
36
|
-
children:
|
|
37
|
-
|
|
32
|
+
children: [/*#__PURE__*/_jsx(UNSTABLE_CornerInset, {
|
|
33
|
+
direction: "vertical",
|
|
34
|
+
edge: "top",
|
|
35
|
+
style: {
|
|
36
|
+
// We don't want to apply both safe area and corner insets
|
|
37
|
+
minHeight: insets.top,
|
|
38
|
+
marginBottom: SPACING
|
|
39
|
+
}
|
|
40
|
+
}), children]
|
|
41
|
+
})
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
export const DrawerContentScrollView = /*#__PURE__*/React.forwardRef(DrawerContentScrollViewInner);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UNSTABLE_CornerInset","useLocale","React","ScrollView","StyleSheet","useSafeAreaInsets","DrawerPositionContext","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["UNSTABLE_CornerInset","useLocale","React","ScrollView","StyleSheet","useSafeAreaInsets","DrawerPositionContext","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SPACING","DrawerContentScrollViewInner","contentContainerStyle","style","children","rest","ref","drawerPosition","useContext","insets","direction","isRight","paddingBottom","bottom","paddingStart","left","paddingEnd","right","styles","container","edge","minHeight","top","marginBottom","DrawerContentScrollView","forwardRef","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerContentScrollView.tsx"],"mappings":";;AAAA,SAASA,oBAAoB,EAAEC,SAAS,QAAQ,0BAA0B;AAC1E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAwBC,UAAU,QAAQ,cAAc;AAC3E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,qBAAqB,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAMvE,MAAMC,OAAO,GAAG,EAAE;AAElB,SAASC,4BAA4BA,CACnC;EAAEC,qBAAqB;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAY,CAAC,EAC1DC,GAA2B,EAC3B;EACA,MAAMC,cAAc,GAAGlB,KAAK,CAACmB,UAAU,CAACf,qBAAqB,CAAC;EAC9D,MAAMgB,MAAM,GAAGjB,iBAAiB,CAAC,CAAC;EAClC,MAAM;IAAEkB;EAAU,CAAC,GAAGtB,SAAS,CAAC,CAAC;EAEjC,MAAMuB,OAAO,GACXD,SAAS,KAAK,KAAK,GACfH,cAAc,KAAK,MAAM,GACzBA,cAAc,KAAK,OAAO;EAEhC,oBACEZ,IAAA,CAAAI,SAAA;IAAAK,QAAA,eACEP,KAAA,CAACP,UAAU;MAAA,GACLe,IAAI;MACRC,GAAG,EAAEA,GAAI;MACTJ,qBAAqB,EAAE,CACrB;QACEU,aAAa,EAAEZ,OAAO,GAAGS,MAAM,CAACI,MAAM;QACtCC,YAAY,EAAEd,OAAO,IAAI,CAACW,OAAO,GAAGF,MAAM,CAACM,IAAI,GAAG,CAAC,CAAC;QACpDC,UAAU,EAAEhB,OAAO,IAAIW,OAAO,GAAGF,MAAM,CAACQ,KAAK,GAAG,CAAC;MACnD,CAAC,EACDf,qBAAqB,CACrB;MACFC,KAAK,EAAE,CAACe,MAAM,CAACC,SAAS,EAAEhB,KAAK,CAAE;MAAAC,QAAA,gBAEjCT,IAAA,CAACR,oBAAoB;QACnBuB,SAAS,EAAC,UAAU;QACpBU,IAAI,EAAC,KAAK;QACVjB,KAAK,EAAE;UACL;UACAkB,SAAS,EAAEZ,MAAM,CAACa,GAAG;UACrBC,YAAY,EAAEvB;QAChB;MAAE,CACH,CAAC,EACDI,QAAQ;IAAA,CACC;EAAC,CACb,CAAC;AAEP;AAEA,OAAO,MAAMoB,uBAAuB,gBAAGnC,KAAK,CAACoC,UAAU,CACrDxB,4BACF,CAAC;AAED,MAAMiB,MAAM,GAAG3B,UAAU,CAACmC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContentScrollView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContentScrollView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAc,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawerContentScrollView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContentScrollView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAc,MAAM,cAAc,CAAC;AAsD5E,eAAO,MAAM,uBAAuB;cAhDxB,KAAK,CAAC,SAAS;oCAkD1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/drawer",
|
|
3
3
|
"description": "Integration for the drawer component from react-native-drawer-layout",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.16",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"clean": "del lib"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@react-navigation/elements": "^3.0.0-alpha.
|
|
49
|
+
"@react-navigation/elements": "^3.0.0-alpha.15",
|
|
50
50
|
"color": "^4.2.3",
|
|
51
51
|
"react-native-drawer-layout": "^5.0.0-alpha.2",
|
|
52
52
|
"use-latest-callback": "^0.3.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@jest/globals": "^30.0.0",
|
|
56
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
56
|
+
"@react-navigation/native": "^8.0.0-alpha.14",
|
|
57
57
|
"@testing-library/react-native": "^13.3.3",
|
|
58
58
|
"@types/react": "~19.2.2",
|
|
59
59
|
"del-cli": "^6.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"typescript": "^5.9.2"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
72
|
+
"@react-navigation/native": "^8.0.0-alpha.14",
|
|
73
73
|
"react": ">= 19.0.0",
|
|
74
74
|
"react-native": "*",
|
|
75
75
|
"react-native-gesture-handler": ">= 2.0.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
]
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "20476fe1fdc272f4d3c4ffc90a95d7adab98ff3c"
|
|
99
99
|
}
|
|
@@ -26,13 +26,11 @@ function DrawerContentScrollViewInner(
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<>
|
|
29
|
-
<UNSTABLE_CornerInset direction="vertical" edge="top" />
|
|
30
29
|
<ScrollView
|
|
31
30
|
{...rest}
|
|
32
31
|
ref={ref}
|
|
33
32
|
contentContainerStyle={[
|
|
34
33
|
{
|
|
35
|
-
paddingTop: SPACING + insets.top,
|
|
36
34
|
paddingBottom: SPACING + insets.bottom,
|
|
37
35
|
paddingStart: SPACING + (!isRight ? insets.left : 0),
|
|
38
36
|
paddingEnd: SPACING + (isRight ? insets.right : 0),
|
|
@@ -41,6 +39,15 @@ function DrawerContentScrollViewInner(
|
|
|
41
39
|
]}
|
|
42
40
|
style={[styles.container, style]}
|
|
43
41
|
>
|
|
42
|
+
<UNSTABLE_CornerInset
|
|
43
|
+
direction="vertical"
|
|
44
|
+
edge="top"
|
|
45
|
+
style={{
|
|
46
|
+
// We don't want to apply both safe area and corner insets
|
|
47
|
+
minHeight: insets.top,
|
|
48
|
+
marginBottom: SPACING,
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
44
51
|
{children}
|
|
45
52
|
</ScrollView>
|
|
46
53
|
</>
|