@react-navigation/drawer 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/createDrawerNavigator.js +3 -7
- package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
- package/lib/module/utils/useDrawerStatus.js +1 -1
- package/lib/module/utils/useDrawerStatus.js.map +1 -1
- package/lib/module/views/DrawerContent.js +4 -2
- package/lib/module/views/DrawerContent.js.map +1 -1
- package/lib/module/views/DrawerContentScrollView.js +30 -13
- package/lib/module/views/DrawerContentScrollView.js.map +1 -1
- package/lib/module/views/DrawerItem.js +25 -7
- package/lib/module/views/DrawerItem.js.map +1 -1
- package/lib/module/views/DrawerItemList.js +17 -7
- package/lib/module/views/DrawerItemList.js.map +1 -1
- package/lib/module/views/DrawerToggleButton.js +27 -10
- package/lib/module/views/DrawerToggleButton.js.map +1 -1
- package/lib/module/views/DrawerView.js +24 -17
- package/lib/module/views/DrawerView.js.map +1 -1
- package/lib/typescript/src/index.d.ts +11 -11
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts +9 -15
- package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +24 -25
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerContent.d.ts +2 -2
- package/lib/typescript/src/views/DrawerContent.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerContentScrollView.d.ts +5 -2
- package/lib/typescript/src/views/DrawerContentScrollView.d.ts.map +1 -1
- package/lib/typescript/src/views/DrawerItem.d.ts +18 -17
- 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 +12 -7
- 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/package.json +26 -26
- package/src/index.tsx +1 -0
- package/src/navigators/createDrawerNavigator.tsx +9 -40
- package/src/types.tsx +30 -25
- package/src/utils/useDrawerStatus.tsx +1 -1
- package/src/views/DrawerContent.tsx +6 -2
- package/src/views/DrawerContentScrollView.tsx +31 -15
- package/src/views/DrawerItem.tsx +56 -22
- package/src/views/DrawerItemList.tsx +22 -8
- package/src/views/DrawerToggleButton.tsx +48 -22
- package/src/views/DrawerView.tsx +37 -20
- package/lib/module/views/assets/toggle-drawer-icon@1x.android.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@1x.ios.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@2x.android.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@2x.ios.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@3x.android.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@3x.ios.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@4x.android.png +0 -0
- package/lib/module/views/assets/toggle-drawer-icon@4x.ios.png +0 -0
- package/src/views/assets/toggle-drawer-icon@1x.android.png +0 -0
- package/src/views/assets/toggle-drawer-icon@1x.ios.png +0 -0
- package/src/views/assets/toggle-drawer-icon@2x.android.png +0 -0
- package/src/views/assets/toggle-drawer-icon@2x.ios.png +0 -0
- package/src/views/assets/toggle-drawer-icon@3x.android.png +0 -0
- package/src/views/assets/toggle-drawer-icon@3x.ios.png +0 -0
- package/src/views/assets/toggle-drawer-icon@4x.android.png +0 -0
- package/src/views/assets/toggle-drawer-icon@4x.ios.png +0 -0
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { DrawerNavigationEventMap, DrawerNavigationOptions,
|
|
3
|
-
declare function DrawerNavigator({ initialRouteName, defaultStatus, backBehavior, routeNamesChangeBehavior, children, layout, screenListeners, screenOptions, screenLayout, router, ...rest }: DrawerNavigatorProps): import("react
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
State: DrawerNavigationState<ParamList>;
|
|
1
|
+
import { type DrawerActionHelpers, type DrawerNavigationState, type NavigatorTypeBagBase, type ParamListBase } from '@react-navigation/native';
|
|
2
|
+
import type { DrawerNavigationEventMap, DrawerNavigationOptions, DrawerNavigatorProps } from '../types.js';
|
|
3
|
+
declare function DrawerNavigator({ initialRouteName, defaultStatus, backBehavior, routeNamesChangeBehavior, children, layout, screenListeners, screenOptions, screenLayout, router, ...rest }: DrawerNavigatorProps): import("react").JSX.Element;
|
|
4
|
+
export interface DrawerTypeBag extends NavigatorTypeBagBase {
|
|
5
|
+
State: DrawerNavigationState<this['ParamList']>;
|
|
7
6
|
ScreenOptions: DrawerNavigationOptions;
|
|
8
7
|
EventMap: DrawerNavigationEventMap;
|
|
9
|
-
|
|
10
|
-
[RouteName in keyof ParamList]: DrawerNavigationProp<ParamList, RouteName>;
|
|
11
|
-
};
|
|
8
|
+
ActionHelpers: DrawerActionHelpers<this['ParamList']>;
|
|
12
9
|
Navigator: typeof DrawerNavigator;
|
|
13
|
-
}
|
|
14
|
-
export declare
|
|
15
|
-
export declare
|
|
16
|
-
config: Config;
|
|
17
|
-
}>>, Config>;
|
|
18
|
-
export declare function createDrawerScreen<const Linking extends StaticScreenConfigLinking, const Screen extends StaticScreenConfigScreen>(config: StaticScreenConfig<Linking, Screen, DrawerNavigationState<ParamListBase>, DrawerNavigationOptions, DrawerNavigationEventMap, DrawerNavigationProp<ParamListBase>>): StaticScreenConfig<Linking, Screen, DrawerNavigationState<ParamListBase>, DrawerNavigationOptions, DrawerNavigationEventMap, DrawerNavigationProp<ParamListBase>>;
|
|
10
|
+
}
|
|
11
|
+
export declare const createDrawerNavigator: import("@react-navigation/core").TypedNavigatorFactory<DrawerTypeBag>;
|
|
12
|
+
export declare const createDrawerScreen: import("@react-navigation/core").StaticScreenFactory<import("@react-navigation/core").NavigatorTypeBagFor<DrawerTypeBag, ParamListBase>>;
|
|
19
13
|
export {};
|
|
20
14
|
//# sourceMappingURL=createDrawerNavigator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDrawerNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createDrawerNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,
|
|
1
|
+
{"version":3,"file":"createDrawerNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigators/createDrawerNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAG1B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,aAAU,CAAC;AAGlB,iBAAS,eAAe,CAAC,EACvB,gBAAgB,EAChB,aAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,QAAQ,EACR,MAAM,EACN,eAAe,EACf,aAAa,EACb,YAAY,EACZ,MAAM,EACN,GAAG,IAAI,EACR,EAAE,oBAAoB,+BAgCtB;AAED,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,KAAK,EAAE,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAChD,aAAa,EAAE,uBAAuB,CAAC;IACvC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,aAAa,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACtD,SAAS,EAAE,OAAO,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,qBAAqB,uEACsB,CAAC;AAEzD,eAAO,MAAM,kBAAkB,0IAAuC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { HeaderOptions } from '@react-navigation/elements';
|
|
1
|
+
import type { HeaderOptions, Icon } from '@react-navigation/elements';
|
|
2
|
+
import type { Screen } from '@react-navigation/elements/internal';
|
|
2
3
|
import type { DefaultNavigatorOptions, Descriptor, DrawerActionHelpers, DrawerNavigationState, DrawerRouterOptions, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, Theme } from '@react-navigation/native';
|
|
3
4
|
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
|
-
import type {
|
|
5
|
+
import type { PanGestureConfig } from 'react-native-gesture-handler';
|
|
5
6
|
export type Scene = {
|
|
6
7
|
route: Route<string>;
|
|
7
8
|
focused: boolean;
|
|
@@ -17,12 +18,6 @@ export type DrawerNavigationConfig = {
|
|
|
17
18
|
* Defaults to `DrawerContent`.
|
|
18
19
|
*/
|
|
19
20
|
drawerContent?: (props: DrawerContentComponentProps) => React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Whether inactive screens should be detached from the view hierarchy to save memory.
|
|
22
|
-
* Make sure to call `enableScreens` from `react-native-screens` to make it work.
|
|
23
|
-
* Defaults to `true`.
|
|
24
|
-
*/
|
|
25
|
-
detachInactiveScreens?: boolean;
|
|
26
21
|
};
|
|
27
22
|
export type DrawerNavigationOptions = HeaderOptions & {
|
|
28
23
|
/**
|
|
@@ -53,13 +48,13 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
53
48
|
focused: boolean;
|
|
54
49
|
}) => React.ReactNode);
|
|
55
50
|
/**
|
|
56
|
-
*
|
|
51
|
+
* Icon to display for the drawer item.
|
|
57
52
|
*/
|
|
58
|
-
drawerIcon?: (props: {
|
|
53
|
+
drawerIcon?: Icon | ((props: {
|
|
59
54
|
color: ColorValue;
|
|
60
55
|
size: number;
|
|
61
56
|
focused: boolean;
|
|
62
|
-
}) => React.ReactNode;
|
|
57
|
+
}) => Icon | React.ReactNode);
|
|
63
58
|
/**
|
|
64
59
|
* Color for the icon and label in the active item in the drawer.
|
|
65
60
|
*/
|
|
@@ -84,6 +79,10 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
84
79
|
* Style object for the single item, which can contain an icon and/or a label.
|
|
85
80
|
*/
|
|
86
81
|
drawerItemStyle?: StyleProp<ViewStyle>;
|
|
82
|
+
/**
|
|
83
|
+
* ID to locate this drawer item in tests.
|
|
84
|
+
*/
|
|
85
|
+
drawerItemTestID?: string;
|
|
87
86
|
/**
|
|
88
87
|
* Style object to apply to the `Text` inside content section which renders a label.
|
|
89
88
|
*/
|
|
@@ -114,7 +113,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
114
113
|
*
|
|
115
114
|
* Defaults to `slide` on iOS and `front` on other platforms.
|
|
116
115
|
*/
|
|
117
|
-
drawerType?: 'front' | 'back' | 'slide' | 'permanent';
|
|
116
|
+
drawerType?: 'front' | 'back' | 'slide' | 'permanent' | undefined;
|
|
118
117
|
/**
|
|
119
118
|
* Whether the statusbar should be hidden when the drawer is pulled or opens,
|
|
120
119
|
*/
|
|
@@ -136,11 +135,11 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
136
135
|
/**
|
|
137
136
|
* Style object for the component wrapping the screen content.
|
|
138
137
|
*/
|
|
139
|
-
sceneStyle?:
|
|
138
|
+
sceneStyle?: React.ComponentProps<typeof Screen>['style'];
|
|
140
139
|
/**
|
|
141
|
-
* Function to modify the pan gesture
|
|
140
|
+
* Function to modify the pan gesture config.
|
|
142
141
|
*/
|
|
143
|
-
configureGestureHandler?: (gesture:
|
|
142
|
+
configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
|
|
144
143
|
/**
|
|
145
144
|
* Whether you can use swipe gestures to open or close the drawer.
|
|
146
145
|
* Defaults to `true`.
|
|
@@ -167,13 +166,17 @@ export type DrawerNavigationOptions = HeaderOptions & {
|
|
|
167
166
|
*/
|
|
168
167
|
popToTopOnBlur?: boolean;
|
|
169
168
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
169
|
+
* What should happen when screens become inactive.
|
|
170
|
+
* - `pause`: Effects are cleaned up.
|
|
171
|
+
* - `none`: Screen renders normally
|
|
172
|
+
*
|
|
173
|
+
* Defaults to `pause`.
|
|
173
174
|
*
|
|
174
|
-
*
|
|
175
|
+
* If you set `lazy: false` or preload a screen,
|
|
176
|
+
* It won't be paused until after the first time it becomes focused.
|
|
177
|
+
* This makes sure that effects are run to initialize the screen.
|
|
175
178
|
*/
|
|
176
|
-
|
|
179
|
+
inactiveBehavior?: 'pause' | 'none';
|
|
177
180
|
};
|
|
178
181
|
export type DrawerContentComponentProps = {
|
|
179
182
|
state: DrawerNavigationState<ParamListBase>;
|
|
@@ -249,14 +252,10 @@ export type DrawerOptionsArgs<ParamList extends ParamListBase, RouteName extends
|
|
|
249
252
|
export type DrawerDescriptor = Descriptor<DrawerNavigationOptions, DrawerNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
|
|
250
253
|
export type DrawerDescriptorMap = Record<string, DrawerDescriptor>;
|
|
251
254
|
export type DrawerProps = {
|
|
252
|
-
dimensions: {
|
|
253
|
-
width: number;
|
|
254
|
-
height: number;
|
|
255
|
-
};
|
|
256
255
|
drawerPosition: 'left' | 'right';
|
|
257
256
|
drawerStyle?: StyleProp<ViewStyle>;
|
|
258
257
|
drawerType: 'front' | 'back' | 'slide' | 'permanent';
|
|
259
|
-
configureGestureHandler?: (gesture:
|
|
258
|
+
configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
|
|
260
259
|
hideStatusBarOnOpen: boolean;
|
|
261
260
|
keyboardDismissMode: 'none' | 'on-drag';
|
|
262
261
|
onClose: () => void;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,a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erContent({ descriptors, state, ...rest }: DrawerContentComponentProps): import("react
|
|
1
|
+
import type { DrawerContentComponentProps } from '../types.js';
|
|
2
|
+
export declare function DrawerContent({ descriptors, state, ...rest }: DrawerContentComponentProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=DrawerContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAU,CAAC;AAI5D,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAoB7B"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ScrollView, type ScrollViewProps } from 'react-native';
|
|
3
|
-
|
|
3
|
+
type Props = ScrollViewProps & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
|
|
5
|
+
ref?: React.Ref<ScrollView>;
|
|
6
|
+
};
|
|
7
|
+
export declare function DrawerContentScrollView({ contentInsetAdjustmentBehavior, contentContainerStyle, style, children, ref, ...rest }: Props): React.JSX.Element;
|
|
8
|
+
export {};
|
|
6
9
|
//# sourceMappingURL=DrawerContentScrollView.d.ts.map
|
|
@@ -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,
|
|
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,EAEL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAKtB,KAAK,KAAK,GAAG,eAAe,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B,CAAC;AAIF,wBAAgB,uBAAuB,CAAC,EACtC,8BAA4C,EAC5C,qBAAqB,EACrB,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACR,EAAE,KAAK,qBAsCP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Icon } from '@react-navigation/elements';
|
|
1
2
|
import { type Route } from '@react-navigation/native';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { type ColorValue, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
@@ -5,11 +6,11 @@ type Props = {
|
|
|
5
6
|
/**
|
|
6
7
|
* The route object which should be specified by the drawer item.
|
|
7
8
|
*/
|
|
8
|
-
route?: Route<string
|
|
9
|
+
route?: Route<string> | undefined;
|
|
9
10
|
/**
|
|
10
11
|
* The `href` to use for the anchor tag on web
|
|
11
12
|
*/
|
|
12
|
-
href?: string;
|
|
13
|
+
href?: string | undefined;
|
|
13
14
|
/**
|
|
14
15
|
* The label text of the item.
|
|
15
16
|
*/
|
|
@@ -20,15 +21,15 @@ type Props = {
|
|
|
20
21
|
/**
|
|
21
22
|
* Icon to display for the `DrawerItem`.
|
|
22
23
|
*/
|
|
23
|
-
icon?: (props: {
|
|
24
|
+
icon?: Icon | ((props: {
|
|
24
25
|
focused: boolean;
|
|
25
26
|
size: number;
|
|
26
27
|
color: ColorValue;
|
|
27
|
-
}) => React.ReactNode;
|
|
28
|
+
}) => Icon | React.ReactNode) | undefined;
|
|
28
29
|
/**
|
|
29
30
|
* Whether to highlight the drawer item as active.
|
|
30
31
|
*/
|
|
31
|
-
focused?: boolean;
|
|
32
|
+
focused?: boolean | undefined;
|
|
32
33
|
/**
|
|
33
34
|
* Function to execute on press.
|
|
34
35
|
*/
|
|
@@ -36,57 +37,57 @@ type Props = {
|
|
|
36
37
|
/**
|
|
37
38
|
* Color for the icon and label when the item is active.
|
|
38
39
|
*/
|
|
39
|
-
activeTintColor?: ColorValue;
|
|
40
|
+
activeTintColor?: ColorValue | undefined;
|
|
40
41
|
/**
|
|
41
42
|
* Color for the icon and label when the item is inactive.
|
|
42
43
|
*/
|
|
43
|
-
inactiveTintColor?: ColorValue;
|
|
44
|
+
inactiveTintColor?: ColorValue | undefined;
|
|
44
45
|
/**
|
|
45
46
|
* Background color for item when its active.
|
|
46
47
|
*/
|
|
47
|
-
activeBackgroundColor?: ColorValue;
|
|
48
|
+
activeBackgroundColor?: ColorValue | undefined;
|
|
48
49
|
/**
|
|
49
50
|
* Background color for item when its inactive.
|
|
50
51
|
*/
|
|
51
|
-
inactiveBackgroundColor?: ColorValue;
|
|
52
|
+
inactiveBackgroundColor?: ColorValue | undefined;
|
|
52
53
|
/**
|
|
53
54
|
* Color of the touchable effect on press.
|
|
54
55
|
* Only supported on Android.
|
|
55
56
|
*
|
|
56
57
|
* @platform android
|
|
57
58
|
*/
|
|
58
|
-
pressColor?: ColorValue;
|
|
59
|
+
pressColor?: ColorValue | undefined;
|
|
59
60
|
/**
|
|
60
61
|
* Opacity of the touchable effect on press.
|
|
61
62
|
* Only supported on iOS.
|
|
62
63
|
*
|
|
63
64
|
* @platform ios
|
|
64
65
|
*/
|
|
65
|
-
pressOpacity?: number;
|
|
66
|
+
pressOpacity?: number | undefined;
|
|
66
67
|
/**
|
|
67
68
|
* Style object for the label element.
|
|
68
69
|
*/
|
|
69
|
-
labelStyle?: StyleProp<TextStyle
|
|
70
|
+
labelStyle?: StyleProp<TextStyle> | undefined;
|
|
70
71
|
/**
|
|
71
72
|
* Style object for the wrapper element.
|
|
72
73
|
*/
|
|
73
|
-
style?: StyleProp<ViewStyle
|
|
74
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
74
75
|
/**
|
|
75
76
|
* Whether label font should scale to respect Text Size accessibility settings.
|
|
76
77
|
*/
|
|
77
|
-
allowFontScaling?: boolean;
|
|
78
|
+
allowFontScaling?: boolean | undefined;
|
|
78
79
|
/**
|
|
79
80
|
* Accessibility label for drawer item.
|
|
80
81
|
*/
|
|
81
|
-
accessibilityLabel?: string;
|
|
82
|
+
accessibilityLabel?: string | undefined;
|
|
82
83
|
/**
|
|
83
84
|
* ID to locate this drawer item in tests.
|
|
84
85
|
*/
|
|
85
|
-
testID?: string;
|
|
86
|
+
testID?: string | undefined;
|
|
86
87
|
};
|
|
87
88
|
/**
|
|
88
89
|
* A component used to show an action item with an icon and a label in a navigation drawer.
|
|
89
90
|
*/
|
|
90
|
-
export declare function DrawerItem(props: Props):
|
|
91
|
+
export declare function DrawerItem(props: Props): React.JSX.Element;
|
|
91
92
|
export {};
|
|
92
93
|
//# sourceMappingURL=DrawerItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerItem.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAIV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS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IACxC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,qBAoGtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DrawerNavigationState, type ParamListBase } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types';
|
|
3
|
+
import type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types.js';
|
|
4
4
|
type Props = {
|
|
5
5
|
state: DrawerNavigationState<ParamListBase>;
|
|
6
6
|
navigation: DrawerNavigationHelpers;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,aAAU,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,GAiF7C,KAAK,CAAC,YAAY,CAC5C"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Icon } from '@react-navigation/elements';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type ColorValue } from 'react-native';
|
|
2
4
|
type Props = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
icon?: Icon | ((props: {
|
|
6
|
+
tintColor: ColorValue | undefined;
|
|
7
|
+
}) => React.ReactNode) | undefined;
|
|
8
|
+
accessibilityLabel?: string | undefined;
|
|
9
|
+
pressColor?: ColorValue | undefined;
|
|
10
|
+
pressOpacity?: number | undefined;
|
|
11
|
+
tintColor?: ColorValue | undefined;
|
|
12
|
+
testID?: string | undefined;
|
|
8
13
|
};
|
|
9
|
-
export declare function DrawerToggleButton({ tintColor, accessibilityLabel,
|
|
14
|
+
export declare function DrawerToggleButton({ icon, tintColor, accessibilityLabel, ...rest }: Props): React.JSX.Element;
|
|
10
15
|
export {};
|
|
11
16
|
//# 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":"AAAA,OAAO,EAEL,KAAK,IAAI,EAEV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,cAAc,CAAC;AAIrE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EACD,IAAI,GACJ,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,GACnE,SAAS,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,kBAA2C,EAC3C,GAAG,IAAI,EACR,EAAE,KAAK,qBAsCP"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type DrawerNavigationState, type DrawerStatus, type ParamListBase } from '@react-navigation/native';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { DrawerDescriptorMap, DrawerNavigationConfig, DrawerNavigationHelpers } from '../types.js';
|
|
3
4
|
type Props = DrawerNavigationConfig & {
|
|
4
5
|
defaultStatus: DrawerStatus;
|
|
5
6
|
state: DrawerNavigationState<ParamListBase>;
|
|
6
7
|
navigation: DrawerNavigationHelpers;
|
|
7
8
|
descriptors: DrawerDescriptorMap;
|
|
8
9
|
};
|
|
9
|
-
export declare function DrawerView({ navigation, ...rest }: Props):
|
|
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":"
|
|
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,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAEV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAGxB,MAAM,aAAU,CAAC;AAQlB,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;AAqUF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMxD"}
|
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.41",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"types": "./lib/typescript/src/index.d.ts",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"source": "./src/index.tsx",
|
|
29
|
+
"@react-navigation/source": "./src/index.tsx",
|
|
30
30
|
"types": "./lib/typescript/src/index.d.ts",
|
|
31
31
|
"default": "./lib/module/index.js"
|
|
32
32
|
},
|
|
@@ -46,36 +46,36 @@
|
|
|
46
46
|
"clean": "del lib"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@react-navigation/elements": "^3.0.0-alpha.
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"use-latest-callback": "^0.3.2"
|
|
49
|
+
"@react-navigation/elements": "^3.0.0-alpha.38",
|
|
50
|
+
"react-native-drawer-layout": "^5.0.0-alpha.13",
|
|
51
|
+
"use-latest-callback": "^0.3.4"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@jest/globals": "^
|
|
56
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
57
|
-
"@testing-library/react-native": "^
|
|
58
|
-
"@types/react": "~19.
|
|
59
|
-
"del-cli": "^
|
|
60
|
-
"react": "19.
|
|
61
|
-
"react-native": "0.
|
|
62
|
-
"react-native-builder-bob": "^0.
|
|
63
|
-
"react-native-gesture-handler": "
|
|
64
|
-
"react-native-reanimated": "4.1
|
|
65
|
-
"react-native-safe-area-context": "~5.6.
|
|
66
|
-
"react-native-screens": "^4.
|
|
67
|
-
"react-native-worklets": "0.
|
|
68
|
-
"
|
|
69
|
-
"typescript": "^
|
|
54
|
+
"@jest/globals": "^29.7.0",
|
|
55
|
+
"@react-navigation/native": "^8.0.0-alpha.34",
|
|
56
|
+
"@testing-library/react-native": "^14.0.0",
|
|
57
|
+
"@types/react": "~19.2.17",
|
|
58
|
+
"del-cli": "^7.0.0",
|
|
59
|
+
"react": "19.2.0",
|
|
60
|
+
"react-native": "0.83.6",
|
|
61
|
+
"react-native-builder-bob": "^0.43.0",
|
|
62
|
+
"react-native-gesture-handler": "^3.0.0",
|
|
63
|
+
"react-native-reanimated": "~4.2.1",
|
|
64
|
+
"react-native-safe-area-context": "~5.6.2",
|
|
65
|
+
"react-native-screens": "^4.25.2",
|
|
66
|
+
"react-native-worklets": "0.7.4",
|
|
67
|
+
"test-renderer": "1.2.0",
|
|
68
|
+
"typescript": "^6.0.3"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
72
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
73
|
-
"react": ">= 19.
|
|
71
|
+
"@react-navigation/native": "^8.0.0-alpha.34",
|
|
72
|
+
"react": ">= 19.2.0",
|
|
74
73
|
"react-native": "*",
|
|
75
|
-
"react-native-gesture-handler": ">=
|
|
74
|
+
"react-native-gesture-handler": ">= 3.0.0",
|
|
76
75
|
"react-native-reanimated": ">= 4.0.0",
|
|
77
76
|
"react-native-safe-area-context": ">= 5.5.0",
|
|
78
|
-
"react-native-screens": ">= 4.
|
|
77
|
+
"react-native-screens": ">= 4.25.0",
|
|
78
|
+
"react-native-worklets": ">= 0.4.0"
|
|
79
79
|
},
|
|
80
80
|
"react-native-builder-bob": {
|
|
81
81
|
"source": "src",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
]
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "7e0376c860594b1c33543a6fab508165919f15a7"
|
|
99
99
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
|
+
createScreenFactory,
|
|
3
4
|
type DrawerActionHelpers,
|
|
4
5
|
type DrawerNavigationState,
|
|
5
6
|
DrawerRouter,
|
|
6
7
|
type DrawerRouterOptions,
|
|
8
|
+
type NavigatorTypeBagBase,
|
|
7
9
|
type ParamListBase,
|
|
8
|
-
type StaticConfig,
|
|
9
|
-
type StaticParamList,
|
|
10
|
-
type StaticScreenConfig,
|
|
11
|
-
type StaticScreenConfigLinking,
|
|
12
|
-
type StaticScreenConfigScreen,
|
|
13
|
-
type TypedNavigator,
|
|
14
10
|
useNavigationBuilder,
|
|
15
11
|
} from '@react-navigation/native';
|
|
16
12
|
|
|
17
13
|
import type {
|
|
18
14
|
DrawerNavigationEventMap,
|
|
19
15
|
DrawerNavigationOptions,
|
|
20
|
-
DrawerNavigationProp,
|
|
21
16
|
DrawerNavigatorProps,
|
|
22
17
|
} from '../types';
|
|
23
18
|
import { DrawerView } from '../views/DrawerView';
|
|
@@ -68,41 +63,15 @@ function DrawerNavigator({
|
|
|
68
63
|
);
|
|
69
64
|
}
|
|
70
65
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
State: DrawerNavigationState<ParamList>;
|
|
66
|
+
export interface DrawerTypeBag extends NavigatorTypeBagBase {
|
|
67
|
+
State: DrawerNavigationState<this['ParamList']>;
|
|
74
68
|
ScreenOptions: DrawerNavigationOptions;
|
|
75
69
|
EventMap: DrawerNavigationEventMap;
|
|
76
|
-
|
|
77
|
-
[RouteName in keyof ParamList]: DrawerNavigationProp<ParamList, RouteName>;
|
|
78
|
-
};
|
|
70
|
+
ActionHelpers: DrawerActionHelpers<this['ParamList']>;
|
|
79
71
|
Navigator: typeof DrawerNavigator;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export function createDrawerNavigator<
|
|
83
|
-
const ParamList extends ParamListBase,
|
|
84
|
-
>(): TypedNavigator<DrawerTypeBag<ParamList>, undefined>;
|
|
85
|
-
export function createDrawerNavigator<
|
|
86
|
-
const Config extends StaticConfig<DrawerTypeBag<ParamListBase>>,
|
|
87
|
-
>(
|
|
88
|
-
config: Config
|
|
89
|
-
): TypedNavigator<DrawerTypeBag<StaticParamList<{ config: Config }>>, Config>;
|
|
90
|
-
export function createDrawerNavigator(config?: unknown) {
|
|
91
|
-
return createNavigatorFactory(DrawerNavigator)(config);
|
|
92
72
|
}
|
|
93
73
|
|
|
94
|
-
export
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
>(
|
|
98
|
-
config: StaticScreenConfig<
|
|
99
|
-
Linking,
|
|
100
|
-
Screen,
|
|
101
|
-
DrawerNavigationState<ParamListBase>,
|
|
102
|
-
DrawerNavigationOptions,
|
|
103
|
-
DrawerNavigationEventMap,
|
|
104
|
-
DrawerNavigationProp<ParamListBase>
|
|
105
|
-
>
|
|
106
|
-
) {
|
|
107
|
-
return config;
|
|
108
|
-
}
|
|
74
|
+
export const createDrawerNavigator =
|
|
75
|
+
createNavigatorFactory<DrawerTypeBag>(DrawerNavigator);
|
|
76
|
+
|
|
77
|
+
export const createDrawerScreen = createScreenFactory<DrawerTypeBag>();
|