@react-navigation/drawer 7.0.0-alpha.5 → 7.0.0-alpha.7
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/index.js.map +1 -1
- package/lib/commonjs/navigators/createDrawerNavigator.js +5 -4
- package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/DrawerPositionContext.js +3 -4
- package/lib/commonjs/utils/DrawerPositionContext.js.map +1 -1
- package/lib/commonjs/utils/DrawerStatusContext.js +3 -4
- package/lib/commonjs/utils/DrawerStatusContext.js.map +1 -1
- package/lib/commonjs/utils/addCancelListener.js +2 -4
- package/lib/commonjs/utils/addCancelListener.js.map +1 -1
- package/lib/commonjs/utils/addCancelListener.native.js.map +1 -1
- package/lib/commonjs/utils/getDrawerStatusFromState.js +1 -1
- package/lib/commonjs/utils/getDrawerStatusFromState.js.map +1 -1
- package/lib/commonjs/utils/useDrawerStatus.js +2 -2
- package/lib/commonjs/utils/useDrawerStatus.js.map +1 -1
- package/lib/commonjs/views/DrawerContent.js +2 -2
- package/lib/commonjs/views/DrawerContent.js.map +1 -1
- package/lib/commonjs/views/DrawerContentScrollView.js +3 -4
- package/lib/commonjs/views/DrawerContentScrollView.js.map +1 -1
- package/lib/commonjs/views/DrawerItem.js +9 -59
- package/lib/commonjs/views/DrawerItem.js.map +1 -1
- package/lib/commonjs/views/DrawerItemList.js +2 -2
- package/lib/commonjs/views/DrawerItemList.js.map +1 -1
- package/lib/commonjs/views/DrawerToggleButton.js +4 -6
- package/lib/commonjs/views/DrawerToggleButton.js.map +1 -1
- package/lib/commonjs/views/DrawerView.js +2 -2
- package/lib/commonjs/views/DrawerView.js.map +1 -1
- package/lib/commonjs/views/ScreenFallback.js +4 -6
- package/lib/commonjs/views/ScreenFallback.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createDrawerNavigator.js +2 -0
- package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/DrawerPositionContext.js.map +1 -1
- package/lib/module/utils/DrawerStatusContext.js.map +1 -1
- package/lib/module/utils/addCancelListener.js +2 -4
- package/lib/module/utils/addCancelListener.js.map +1 -1
- package/lib/module/utils/addCancelListener.native.js.map +1 -1
- package/lib/module/utils/getDrawerStatusFromState.js +1 -1
- package/lib/module/utils/getDrawerStatusFromState.js.map +1 -1
- package/lib/module/utils/useDrawerStatus.js.map +1 -1
- package/lib/module/views/DrawerContent.js.map +1 -1
- package/lib/module/views/DrawerContentScrollView.js.map +1 -1
- package/lib/module/views/DrawerItem.js +9 -59
- package/lib/module/views/DrawerItem.js.map +1 -1
- package/lib/module/views/DrawerItemList.js.map +1 -1
- package/lib/module/views/DrawerToggleButton.js +2 -4
- package/lib/module/views/DrawerToggleButton.js.map +1 -1
- package/lib/module/views/DrawerView.js.map +1 -1
- package/lib/module/views/ScreenFallback.js +2 -4
- package/lib/module/views/ScreenFallback.js.map +1 -1
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts +4 -3
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +0 -10
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerContent.d.ts +2 -1
- package/lib/typescript/src/views/DrawerContent.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerContentScrollView.d.ts +1 -1
- package/lib/typescript/src/views/DrawerContentScrollView.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerItem.d.ts +3 -3
- package/lib/typescript/src/views/DrawerItem.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerItemList.d.ts +1 -1
- package/lib/typescript/src/views/DrawerItemList.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerToggleButton.d.ts +2 -1
- package/lib/typescript/src/views/DrawerToggleButton.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerView.d.ts +3 -2
- package/lib/typescript/src/views/DrawerView.d.ts.map +1 -1
- package/lib/typescript/src/views/ScreenFallback.d.ts +3 -3
- package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -1
- package/package.json +22 -23
- package/src/navigators/createDrawerNavigator.tsx +7 -5
- package/src/types.tsx +2 -12
- package/src/views/DrawerContentScrollView.tsx +1 -1
- package/src/views/DrawerItem.tsx +9 -76
- package/src/views/DrawerItemList.tsx +2 -2
- package/src/views/DrawerToggleButton.tsx +2 -4
- package/src/views/DrawerView.tsx +3 -3
- package/src/views/ScreenFallback.tsx +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,KAAK,CAAC,SAAS,CAAC;IACxE;;;;OAIG;IACH,qBAAqB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U,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;IACrD,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC;IACrE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,mBAAmB,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC3C,kBAAkB,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC1C,kBAAkB,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { DrawerContentComponentProps } from '../types';
|
|
2
|
-
export declare function DrawerContent({ descriptors, state, ...rest }: DrawerContentComponentProps): JSX.Element;
|
|
3
|
+
export declare function DrawerContent({ descriptors, state, ...rest }: DrawerContentComponentProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=DrawerContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAgB7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ScrollView, ScrollViewProps } from 'react-native';
|
|
2
|
+
import { ScrollView, type ScrollViewProps } from 'react-native';
|
|
3
3
|
export declare const DrawerContentScrollView: React.ForwardRefExoticComponent<ScrollViewProps & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
} & React.RefAttributes<ScrollView>>;
|
|
@@ -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,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;AAyC5E,eAAO,MAAM,uBAAuB;cAnCxB,MAAM,SAAS;oCAqC1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Route } from '@react-navigation/native';
|
|
1
|
+
import { type Route } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
4
4
|
type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* The route object which should be specified by the drawer item.
|
|
@@ -87,6 +87,6 @@ type Props = {
|
|
|
87
87
|
/**
|
|
88
88
|
* A component used to show an action item with an icon and a label in a navigation drawer.
|
|
89
89
|
*/
|
|
90
|
-
export declare function DrawerItem(props: Props): JSX.Element;
|
|
90
|
+
export declare function DrawerItem(props: Props): React.JSX.Element;
|
|
91
91
|
export {};
|
|
92
92
|
//# sourceMappingURL=DrawerItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EACD,MAAM,GACN,CAAC,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IACtE;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,qBAuEtC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DrawerNavigationState, ParamListBase } from '@react-navigation/native';
|
|
1
|
+
import { type DrawerNavigationState, type ParamListBase } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types';
|
|
4
4
|
type Props = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerItemList.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItemList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DrawerItemList.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItemList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAG7E,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,KAAK,sEAoEvE"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
type Props = {
|
|
2
3
|
accessibilityLabel?: string;
|
|
3
4
|
pressColor?: string;
|
|
4
5
|
pressOpacity?: number;
|
|
5
6
|
tintColor?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare function DrawerToggleButton({ tintColor, ...rest }: Props): JSX.Element;
|
|
8
|
+
export declare function DrawerToggleButton({ tintColor, ...rest }: Props): React.JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=DrawerToggleButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,KAAK,GAAG;IACX,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAsB/D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DrawerNavigationState, DrawerStatus, ParamListBase } from '@react-navigation/native';
|
|
1
|
+
import { type DrawerNavigationState, type DrawerStatus, type ParamListBase } from '@react-navigation/native';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import type { DrawerDescriptorMap, DrawerNavigationConfig, DrawerNavigationHelpers } from '../types';
|
|
3
4
|
type Props = DrawerNavigationConfig & {
|
|
4
5
|
defaultStatus: DrawerStatus;
|
|
@@ -6,6 +7,6 @@ type Props = DrawerNavigationConfig & {
|
|
|
6
7
|
navigation: DrawerNavigationHelpers;
|
|
7
8
|
descriptors: DrawerDescriptorMap;
|
|
8
9
|
};
|
|
9
|
-
export declare function DrawerView({ navigation, ...rest }: Props): JSX.Element;
|
|
10
|
+
export declare function DrawerView({ navigation, ...rest }: Props): React.JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=DrawerView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAEV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,UAAU,CAAC;AASlB,KAAK,KAAK,GAAG,sBAAsB,GAAG;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAwQF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
|
|
3
3
|
type Props = {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -11,7 +11,7 @@ export declare const MaybeScreenContainer: ({ enabled, ...rest }: ViewProps & {
|
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
hasTwoStates: boolean;
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
-
}) => JSX.Element;
|
|
15
|
-
export declare function MaybeScreen({ visible, children, ...rest }: Props): JSX.Element;
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
|
+
export declare function MaybeScreen({ visible, children, ...rest }: Props): React.JSX.Element;
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=ScreenFallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ScreenFallback.d.ts","sourceRoot":"","sources":["../../../../src/views/ScreenFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAUF,eAAO,MAAM,oBAAoB;aAItB,OAAO;kBACF,OAAO;cACX,MAAM,SAAS;uBAO1B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAchE"}
|
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": "7.0.0-alpha.
|
|
4
|
+
"version": "7.0.0-alpha.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -41,34 +41,33 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@react-navigation/elements": "^2.0.0-alpha.
|
|
44
|
+
"@react-navigation/elements": "^2.0.0-alpha.4",
|
|
45
45
|
"color": "^4.2.3",
|
|
46
|
-
"react-native-drawer-layout": "^4.0.0-alpha.
|
|
47
|
-
"use-latest-callback": "^0.1.
|
|
46
|
+
"react-native-drawer-layout": "^4.0.0-alpha.3",
|
|
47
|
+
"use-latest-callback": "^0.1.9"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@react-navigation/native": "^7.0.0-alpha.
|
|
51
|
-
"@testing-library/react-native": "^
|
|
52
|
-
"@types/react": "~18.
|
|
53
|
-
"
|
|
54
|
-
"del-cli": "^5.0.0",
|
|
50
|
+
"@react-navigation/native": "^7.0.0-alpha.6",
|
|
51
|
+
"@testing-library/react-native": "^12.3.1",
|
|
52
|
+
"@types/react": "~18.2.33",
|
|
53
|
+
"del-cli": "^5.1.0",
|
|
55
54
|
"react": "18.2.0",
|
|
56
|
-
"react-native": "0.
|
|
57
|
-
"react-native-builder-bob": "^0.
|
|
58
|
-
"react-native-gesture-handler": "~2.
|
|
59
|
-
"react-native-reanimated": "~
|
|
60
|
-
"react-native-safe-area-context": "4.
|
|
61
|
-
"react-native-screens": "~3.
|
|
62
|
-
"typescript": "^
|
|
55
|
+
"react-native": "0.72.6",
|
|
56
|
+
"react-native-builder-bob": "^0.23.1",
|
|
57
|
+
"react-native-gesture-handler": "~2.12.0",
|
|
58
|
+
"react-native-reanimated": "~3.3.0",
|
|
59
|
+
"react-native-safe-area-context": "4.6.3",
|
|
60
|
+
"react-native-screens": "~3.22.0",
|
|
61
|
+
"typescript": "^5.2.2"
|
|
63
62
|
},
|
|
64
63
|
"peerDependencies": {
|
|
65
|
-
"@react-navigation/native": "^
|
|
64
|
+
"@react-navigation/native": "^7.0.0-alpha.6",
|
|
66
65
|
"react": "*",
|
|
67
|
-
"react-native": "
|
|
68
|
-
"react-native-gesture-handler": "
|
|
69
|
-
"react-native-reanimated": "
|
|
70
|
-
"react-native-safe-area-context": "
|
|
71
|
-
"react-native-screens": "
|
|
66
|
+
"react-native": "0.72.6",
|
|
67
|
+
"react-native-gesture-handler": "~2.12.0",
|
|
68
|
+
"react-native-reanimated": "~3.3.0",
|
|
69
|
+
"react-native-safe-area-context": "4.6.3",
|
|
70
|
+
"react-native-screens": "~3.22.0"
|
|
72
71
|
},
|
|
73
72
|
"react-native-builder-bob": {
|
|
74
73
|
"source": "src",
|
|
@@ -84,5 +83,5 @@
|
|
|
84
83
|
]
|
|
85
84
|
]
|
|
86
85
|
},
|
|
87
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "d718b717320d41c90051c2a5f849b8d74f518a18"
|
|
88
87
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
|
-
DefaultNavigatorOptions,
|
|
4
|
-
DrawerActionHelpers,
|
|
5
|
-
DrawerNavigationState,
|
|
3
|
+
type DefaultNavigatorOptions,
|
|
4
|
+
type DrawerActionHelpers,
|
|
5
|
+
type DrawerNavigationState,
|
|
6
6
|
DrawerRouter,
|
|
7
|
-
DrawerRouterOptions,
|
|
8
|
-
ParamListBase,
|
|
7
|
+
type DrawerRouterOptions,
|
|
8
|
+
type ParamListBase,
|
|
9
9
|
useNavigationBuilder,
|
|
10
10
|
} from '@react-navigation/native';
|
|
11
11
|
import * as React from 'react';
|
|
@@ -32,6 +32,7 @@ function DrawerNavigator({
|
|
|
32
32
|
defaultStatus = 'closed',
|
|
33
33
|
backBehavior,
|
|
34
34
|
children,
|
|
35
|
+
layout,
|
|
35
36
|
screenListeners,
|
|
36
37
|
screenOptions,
|
|
37
38
|
...rest
|
|
@@ -49,6 +50,7 @@ function DrawerNavigator({
|
|
|
49
50
|
defaultStatus,
|
|
50
51
|
backBehavior,
|
|
51
52
|
children,
|
|
53
|
+
layout,
|
|
52
54
|
screenListeners,
|
|
53
55
|
screenOptions,
|
|
54
56
|
});
|
package/src/types.tsx
CHANGED
|
@@ -35,16 +35,6 @@ export type DrawerNavigationConfig = {
|
|
|
35
35
|
* Defaults to `true`.
|
|
36
36
|
*/
|
|
37
37
|
detachInactiveScreens?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Whether to use the legacy implementation based on Reanimated 1.
|
|
40
|
-
* The new implementation based on Reanimated 2 will perform better,
|
|
41
|
-
* but it's not possible to use Chrome remote debugger.
|
|
42
|
-
*
|
|
43
|
-
* This defaults to `true` if Reanimated 2 is not configured.
|
|
44
|
-
*
|
|
45
|
-
* Otherwise, it defaults to `false`
|
|
46
|
-
*/
|
|
47
|
-
useLegacyImplementation?: boolean;
|
|
48
38
|
};
|
|
49
39
|
|
|
50
40
|
export type DrawerNavigationOptions = HeaderOptions & {
|
|
@@ -289,7 +279,7 @@ export type DrawerNavigationHelpers = NavigationHelpers<
|
|
|
289
279
|
export type DrawerNavigationProp<
|
|
290
280
|
ParamList extends ParamListBase,
|
|
291
281
|
RouteName extends keyof ParamList = keyof ParamList,
|
|
292
|
-
NavigatorID extends string | undefined = undefined
|
|
282
|
+
NavigatorID extends string | undefined = undefined,
|
|
293
283
|
> = NavigationProp<
|
|
294
284
|
ParamList,
|
|
295
285
|
RouteName,
|
|
@@ -303,7 +293,7 @@ export type DrawerNavigationProp<
|
|
|
303
293
|
export type DrawerScreenProps<
|
|
304
294
|
ParamList extends ParamListBase,
|
|
305
295
|
RouteName extends keyof ParamList = keyof ParamList,
|
|
306
|
-
NavigatorID extends string | undefined = undefined
|
|
296
|
+
NavigatorID extends string | undefined = undefined,
|
|
307
297
|
> = {
|
|
308
298
|
navigation: DrawerNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
309
299
|
route: RouteProp<ParamList, RouteName>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLocale } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ScrollView, ScrollViewProps, StyleSheet } from 'react-native';
|
|
3
|
+
import { ScrollView, type ScrollViewProps, StyleSheet } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
|
|
6
6
|
import { DrawerPositionContext } from '../utils/DrawerPositionContext';
|
package/src/views/DrawerItem.tsx
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
|
-
import {
|
|
1
|
+
import { PlatformPressable, Text } from '@react-navigation/elements';
|
|
2
|
+
import { type Route, useTheme } from '@react-navigation/native';
|
|
3
3
|
import Color from 'color';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
StyleProp,
|
|
6
|
+
type StyleProp,
|
|
8
7
|
StyleSheet,
|
|
9
|
-
|
|
10
|
-
TextStyle,
|
|
8
|
+
type TextStyle,
|
|
11
9
|
View,
|
|
12
|
-
ViewStyle,
|
|
10
|
+
type ViewStyle,
|
|
13
11
|
} from 'react-native';
|
|
14
12
|
|
|
15
13
|
type Props = {
|
|
@@ -96,65 +94,6 @@ type Props = {
|
|
|
96
94
|
testID?: string;
|
|
97
95
|
};
|
|
98
96
|
|
|
99
|
-
const LinkPressable = ({
|
|
100
|
-
route,
|
|
101
|
-
href,
|
|
102
|
-
children,
|
|
103
|
-
style,
|
|
104
|
-
onPress,
|
|
105
|
-
onLongPress,
|
|
106
|
-
onPressIn,
|
|
107
|
-
onPressOut,
|
|
108
|
-
accessibilityRole,
|
|
109
|
-
...rest
|
|
110
|
-
}: Omit<React.ComponentProps<typeof PlatformPressable>, 'style'> & {
|
|
111
|
-
style: StyleProp<ViewStyle>;
|
|
112
|
-
} & {
|
|
113
|
-
route: Route<string>;
|
|
114
|
-
href?: string;
|
|
115
|
-
children: React.ReactNode;
|
|
116
|
-
onPress?: () => void;
|
|
117
|
-
}) => {
|
|
118
|
-
if (Platform.OS === 'web') {
|
|
119
|
-
// React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
|
|
120
|
-
// We need to use `onClick` to be able to prevent default browser handling of links.
|
|
121
|
-
return (
|
|
122
|
-
<Link
|
|
123
|
-
{...rest}
|
|
124
|
-
href={href}
|
|
125
|
-
action={CommonActions.navigate(route.name, route.params)}
|
|
126
|
-
style={[styles.button, style]}
|
|
127
|
-
onPress={(e: any) => {
|
|
128
|
-
if (
|
|
129
|
-
!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys
|
|
130
|
-
(e.button == null || e.button === 0) // ignore everything but left clicks
|
|
131
|
-
) {
|
|
132
|
-
e.preventDefault();
|
|
133
|
-
onPress?.(e);
|
|
134
|
-
}
|
|
135
|
-
}}
|
|
136
|
-
// types for PressableProps and TextProps are incompatible with each other by `null` so we
|
|
137
|
-
// can't use {...rest} for these 3 props
|
|
138
|
-
onLongPress={onLongPress ?? undefined}
|
|
139
|
-
onPressIn={onPressIn ?? undefined}
|
|
140
|
-
onPressOut={onPressOut ?? undefined}
|
|
141
|
-
>
|
|
142
|
-
{children}
|
|
143
|
-
</Link>
|
|
144
|
-
);
|
|
145
|
-
} else {
|
|
146
|
-
return (
|
|
147
|
-
<PlatformPressable
|
|
148
|
-
{...rest}
|
|
149
|
-
accessibilityRole={accessibilityRole}
|
|
150
|
-
onPress={onPress}
|
|
151
|
-
>
|
|
152
|
-
<View style={style}>{children}</View>
|
|
153
|
-
</PlatformPressable>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
97
|
/**
|
|
159
98
|
* A component used to show an action item with an icon and a label in a navigation drawer.
|
|
160
99
|
*/
|
|
@@ -162,7 +101,6 @@ export function DrawerItem(props: Props) {
|
|
|
162
101
|
const { colors, fonts } = useTheme();
|
|
163
102
|
|
|
164
103
|
const {
|
|
165
|
-
route,
|
|
166
104
|
href,
|
|
167
105
|
icon,
|
|
168
106
|
label,
|
|
@@ -196,19 +134,17 @@ export function DrawerItem(props: Props) {
|
|
|
196
134
|
{...rest}
|
|
197
135
|
style={[styles.container, { borderRadius, backgroundColor }, style]}
|
|
198
136
|
>
|
|
199
|
-
<
|
|
137
|
+
<PlatformPressable
|
|
200
138
|
testID={testID}
|
|
201
139
|
onPress={onPress}
|
|
202
|
-
style={[styles.wrapper, { borderRadius }]}
|
|
203
140
|
accessibilityLabel={accessibilityLabel}
|
|
204
141
|
accessibilityRole="button"
|
|
205
142
|
accessibilityState={{ selected: focused }}
|
|
206
143
|
pressColor={pressColor}
|
|
207
144
|
pressOpacity={pressOpacity}
|
|
208
|
-
route={route}
|
|
209
145
|
href={href}
|
|
210
146
|
>
|
|
211
|
-
<
|
|
147
|
+
<View style={[styles.wrapper, { borderRadius }]}>
|
|
212
148
|
{iconNode}
|
|
213
149
|
<View
|
|
214
150
|
style={[
|
|
@@ -228,8 +164,8 @@ export function DrawerItem(props: Props) {
|
|
|
228
164
|
label({ color, focused })
|
|
229
165
|
)}
|
|
230
166
|
</View>
|
|
231
|
-
</
|
|
232
|
-
</
|
|
167
|
+
</View>
|
|
168
|
+
</PlatformPressable>
|
|
233
169
|
</View>
|
|
234
170
|
);
|
|
235
171
|
}
|
|
@@ -249,7 +185,4 @@ const styles = StyleSheet.create({
|
|
|
249
185
|
marginRight: 32,
|
|
250
186
|
flex: 1,
|
|
251
187
|
},
|
|
252
|
-
button: {
|
|
253
|
-
display: 'flex',
|
|
254
|
-
},
|
|
255
188
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import {
|
|
3
3
|
DrawerActions,
|
|
4
|
-
ParamListBase,
|
|
4
|
+
type ParamListBase,
|
|
5
5
|
useNavigation,
|
|
6
6
|
} from '@react-navigation/native';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -22,8 +22,6 @@ export function DrawerToggleButton({ tintColor, ...rest }: Props) {
|
|
|
22
22
|
return (
|
|
23
23
|
<PlatformPressable
|
|
24
24
|
{...rest}
|
|
25
|
-
accessible
|
|
26
|
-
accessibilityRole="button"
|
|
27
25
|
android_ripple={{ borderless: true }}
|
|
28
26
|
onPress={() => navigation.dispatch(DrawerActions.toggleDrawer())}
|
|
29
27
|
style={styles.touchable}
|
|
@@ -34,6 +32,7 @@ export function DrawerToggleButton({ tintColor, ...rest }: Props) {
|
|
|
34
32
|
>
|
|
35
33
|
<Image
|
|
36
34
|
style={[styles.icon, tintColor ? { tintColor } : null]}
|
|
35
|
+
resizeMode="contain"
|
|
37
36
|
source={require('./assets/toggle-drawer-icon.png')}
|
|
38
37
|
fadeDuration={0}
|
|
39
38
|
/>
|
|
@@ -46,7 +45,6 @@ const styles = StyleSheet.create({
|
|
|
46
45
|
height: 24,
|
|
47
46
|
width: 24,
|
|
48
47
|
margin: 3,
|
|
49
|
-
resizeMode: 'contain',
|
|
50
48
|
},
|
|
51
49
|
touchable: {
|
|
52
50
|
marginHorizontal: 11,
|
package/src/views/DrawerView.tsx
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
} from '@react-navigation/elements';
|
|
8
8
|
import {
|
|
9
9
|
DrawerActions,
|
|
10
|
-
DrawerNavigationState,
|
|
11
|
-
DrawerStatus,
|
|
12
|
-
ParamListBase,
|
|
10
|
+
type DrawerNavigationState,
|
|
11
|
+
type DrawerStatus,
|
|
12
|
+
type ParamListBase,
|
|
13
13
|
useLocale,
|
|
14
14
|
useTheme,
|
|
15
15
|
} from '@react-navigation/native';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ResourceSavingView } from '@react-navigation/elements';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
type StyleProp,
|
|
5
|
+
View,
|
|
6
|
+
type ViewProps,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
4
9
|
|
|
5
10
|
type Props = {
|
|
6
11
|
visible: boolean;
|