@react-navigation/drawer 6.1.8 → 6.2.0
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 +14 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigators/createDrawerNavigator.js +10 -9
- package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
- package/lib/commonjs/utils/DrawerStatusContext.js.map +1 -1
- package/lib/commonjs/utils/useDrawerStatus.js.map +1 -1
- package/lib/commonjs/views/DrawerContent.js +6 -5
- package/lib/commonjs/views/DrawerContent.js.map +1 -1
- package/lib/commonjs/views/DrawerContentScrollView.js +7 -6
- package/lib/commonjs/views/DrawerContentScrollView.js.map +1 -1
- package/lib/commonjs/views/DrawerItem.js +13 -10
- package/lib/commonjs/views/DrawerItem.js.map +1 -1
- package/lib/commonjs/views/DrawerItemList.js +6 -5
- package/lib/commonjs/views/DrawerItemList.js.map +1 -1
- package/lib/commonjs/views/DrawerToggleButton.js +5 -4
- package/lib/commonjs/views/DrawerToggleButton.js.map +1 -1
- package/lib/commonjs/views/DrawerView.js +32 -29
- package/lib/commonjs/views/DrawerView.js.map +1 -1
- package/lib/commonjs/views/GestureHandler.js +7 -4
- package/lib/commonjs/views/GestureHandler.js.map +1 -1
- package/lib/commonjs/views/GestureHandlerNative.js +1 -1
- package/lib/commonjs/views/ScreenFallback.js +13 -9
- package/lib/commonjs/views/ScreenFallback.js.map +1 -1
- package/lib/commonjs/views/legacy/Drawer.js +17 -12
- package/lib/commonjs/views/legacy/Drawer.js.map +1 -1
- package/lib/commonjs/views/legacy/Overlay.js +8 -6
- package/lib/commonjs/views/legacy/Overlay.js.map +1 -1
- package/lib/commonjs/views/modern/Drawer.js +28 -30
- package/lib/commonjs/views/modern/Drawer.js.map +1 -1
- package/lib/commonjs/views/modern/Overlay.js +7 -6
- package/lib/commonjs/views/modern/Overlay.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createDrawerNavigator.js +10 -9
- package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
- package/lib/module/utils/DrawerStatusContext.js.map +1 -1
- package/lib/module/utils/useDrawerStatus.js.map +1 -1
- package/lib/module/views/DrawerContent.js +6 -5
- package/lib/module/views/DrawerContent.js.map +1 -1
- package/lib/module/views/DrawerContentScrollView.js +7 -6
- package/lib/module/views/DrawerContentScrollView.js.map +1 -1
- package/lib/module/views/DrawerItem.js +13 -10
- package/lib/module/views/DrawerItem.js.map +1 -1
- package/lib/module/views/DrawerItemList.js +6 -5
- package/lib/module/views/DrawerItemList.js.map +1 -1
- package/lib/module/views/DrawerToggleButton.js +5 -4
- package/lib/module/views/DrawerToggleButton.js.map +1 -1
- package/lib/module/views/DrawerView.js +31 -28
- package/lib/module/views/DrawerView.js.map +1 -1
- package/lib/module/views/GestureHandler.js +6 -3
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/ScreenFallback.js +13 -9
- package/lib/module/views/ScreenFallback.js.map +1 -1
- package/lib/module/views/legacy/Drawer.js +17 -12
- package/lib/module/views/legacy/Drawer.js.map +1 -1
- package/lib/module/views/legacy/Overlay.js +8 -6
- package/lib/module/views/legacy/Overlay.js.map +1 -1
- package/lib/module/views/modern/Drawer.js +28 -30
- package/lib/module/views/modern/Drawer.js.map +1 -1
- package/lib/module/views/modern/Overlay.js +7 -6
- package/lib/module/views/modern/Overlay.js.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/utils/useDrawerStatus.d.ts +2 -1
- package/lib/typescript/src/views/legacy/Overlay.d.ts +4 -0
- package/lib/typescript/src/views/modern/Overlay.d.ts +4 -0
- package/package.json +10 -10
- package/src/index.tsx +1 -0
- package/src/utils/DrawerStatusContext.tsx +3 -2
- package/src/utils/useDrawerStatus.tsx +2 -1
- package/src/views/legacy/Drawer.tsx +17 -9
- package/src/views/legacy/Overlay.tsx +1 -0
- package/src/views/modern/Drawer.tsx +25 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Overlay.tsx"],"names":["React","Platform","Pressable","StyleSheet","Animated","useAnimatedProps","useAnimatedStyle","PROGRESS_EPSILON","Overlay","forwardRef","progress","onPress","style","props","
|
|
1
|
+
{"version":3,"sources":["Overlay.tsx"],"names":["React","Platform","Pressable","StyleSheet","Animated","useAnimatedProps","useAnimatedStyle","PROGRESS_EPSILON","Overlay","forwardRef","ref","progress","onPress","style","props","animatedStyle","opacity","value","zIndex","animatedProps","active","pointerEvents","accessibilityElementsHidden","importantForAccessibility","styles","overlay","overlayStyle","pressable","select","web","WebkitTapHighlightColor","default","create","absoluteFillObject","backgroundColor","flex"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,SAAnB,EAA8BC,UAA9B,QAAgD,cAAhD;AACA,OAAOC,QAAP,IACEC,gBADF,EAEEC,gBAFF,QAGO,yBAHP;AAKA,MAAMC,gBAAgB,GAAG,IAAzB;AAOA,MAAMC,OAAO,gBAAGR,KAAK,CAACS,UAAN,CAAiB,SAASD,OAAT,OAE/BE,GAF+B,EAG/B;AAAA,MAFA;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,OAAZ;AAAqBC,IAAAA,KAArB;AAA4B,OAAGC;AAA/B,GAEA;AACA,QAAMC,aAAa,GAAGT,gBAAgB,CAAC,MAAM;AAC3C,WAAO;AACLU,MAAAA,OAAO,EAAEL,QAAQ,CAACM,KADb;AAEL;AACA;AACAC,MAAAA,MAAM,EAAEP,QAAQ,CAACM,KAAT,GAAiBV,gBAAjB,GAAoC,CAApC,GAAwC,CAAC;AAJ5C,KAAP;AAMD,GAPqC,CAAtC;AASA,QAAMY,aAAa,GAAGd,gBAAgB,CAAC,MAAM;AAC3C,UAAMe,MAAM,GAAGT,QAAQ,CAACM,KAAT,GAAiBV,gBAAhC;AAEA,WAAO;AACLc,MAAAA,aAAa,EAAED,MAAM,GAAG,MAAH,GAAY,MAD5B;AAELE,MAAAA,2BAA2B,EAAE,CAACF,MAFzB;AAGLG,MAAAA,yBAAyB,EAAEH,MAAM,GAAG,MAAH,GAAY;AAHxC,KAAP;AAKD,GARqC,CAAtC;AAUA,sBACE,oBAAC,QAAD,CAAU,IAAV,eACMN,KADN;AAEE,IAAA,GAAG,EAAEJ,GAFP;AAGE,IAAA,KAAK,EAAE,CAACc,MAAM,CAACC,OAAR,EAAiBC,YAAjB,EAA+BX,aAA/B,EAA8CF,KAA9C,CAHT;AAIE,IAAA,aAAa,EAAEM;AAJjB,mBAME,oBAAC,SAAD;AAAW,IAAA,OAAO,EAAEP,OAApB;AAA6B,IAAA,KAAK,EAAEY,MAAM,CAACG;AAA3C,IANF,CADF;AAUD,CAjCe,CAAhB;AAmCA,MAAMD,YAAY,GAAGzB,QAAQ,CAAC2B,MAAT,CAAwC;AAC3DC,EAAAA,GAAG,EAAE;AACH;AACA;AACAC,IAAAA,uBAAuB,EAAE;AAHtB,GADsD;AAM3DC,EAAAA,OAAO,EAAE;AANkD,CAAxC,CAArB;AASA,MAAMP,MAAM,GAAGrB,UAAU,CAAC6B,MAAX,CAAkB;AAC/BP,EAAAA,OAAO,EAAE,EACP,GAAGtB,UAAU,CAAC8B,kBADP;AAEPC,IAAAA,eAAe,EAAE;AAFV,GADsB;AAK/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,IAAI,EAAE;AADG;AALoB,CAAlB,CAAf;AAUA,eAAe3B,OAAf","sourcesContent":["import * as React from 'react';\nimport { Platform, Pressable, StyleSheet } from 'react-native';\nimport Animated, {\n useAnimatedProps,\n useAnimatedStyle,\n} from 'react-native-reanimated';\n\nconst PROGRESS_EPSILON = 0.05;\n\ntype Props = React.ComponentProps<typeof Animated.View> & {\n progress: Animated.SharedValue<number>;\n onPress: () => void;\n};\n\nconst Overlay = React.forwardRef(function Overlay(\n { progress, onPress, style, ...props }: Props,\n ref: React.Ref<Animated.View>\n) {\n const animatedStyle = useAnimatedStyle(() => {\n return {\n opacity: progress.value,\n // We don't want the user to be able to press through the overlay when drawer is open\n // We can send the overlay behind the screen to avoid it\n zIndex: progress.value > PROGRESS_EPSILON ? 0 : -1,\n };\n });\n\n const animatedProps = useAnimatedProps(() => {\n const active = progress.value > PROGRESS_EPSILON;\n\n return {\n pointerEvents: active ? 'auto' : 'none',\n accessibilityElementsHidden: !active,\n importantForAccessibility: active ? 'auto' : 'no-hide-descendants',\n } as const;\n });\n\n return (\n <Animated.View\n {...props}\n ref={ref}\n style={[styles.overlay, overlayStyle, animatedStyle, style]}\n animatedProps={animatedProps}\n >\n <Pressable onPress={onPress} style={styles.pressable} />\n </Animated.View>\n );\n});\n\nconst overlayStyle = Platform.select<Record<string, string>>({\n web: {\n // Disable touch highlight on mobile Safari.\n // WebkitTapHighlightColor must be used outside of StyleSheet.create because react-native-web will omit the property.\n WebkitTapHighlightColor: 'transparent',\n },\n default: {},\n});\n\nconst styles = StyleSheet.create({\n overlay: {\n ...StyleSheet.absoluteFillObject,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n pressable: {\n flex: 1,\n },\n});\n\nexport default Overlay;\n"]}
|
|
@@ -22,4 +22,4 @@ export { default as useDrawerStatus } from './utils/useDrawerStatus';
|
|
|
22
22
|
/**
|
|
23
23
|
* Types
|
|
24
24
|
*/
|
|
25
|
-
export type { DrawerContentComponentProps, DrawerHeaderProps, DrawerNavigationOptions, DrawerNavigationProp, DrawerScreenProps, } from './types';
|
|
25
|
+
export type { DrawerContentComponentProps, DrawerHeaderProps, DrawerNavigationEventMap, DrawerNavigationOptions, DrawerNavigationProp, DrawerScreenProps, } from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { DrawerStatus } from '@react-navigation/native';
|
|
1
2
|
/**
|
|
2
3
|
* Hook to detect if the drawer's status in a parent navigator.
|
|
3
4
|
* Returns 'open' if the drawer is open, 'closed' if the drawer is closed.
|
|
4
5
|
*/
|
|
5
|
-
export default function useDrawerStatus():
|
|
6
|
+
export default function useDrawerStatus(): DrawerStatus;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Animated from 'react-native-reanimated';
|
|
3
3
|
declare const Overlay: React.ForwardRefExoticComponent<{
|
|
4
|
+
children?: React.ReactNode | Animated.Node<React.ReactNode>;
|
|
4
5
|
hitSlop?: import("react-native").Insets | Animated.Node<import("react-native").Insets | undefined> | undefined;
|
|
5
6
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.Node<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
6
7
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | Animated.Node<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
@@ -61,6 +62,9 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
61
62
|
accessibilityIgnoresInvertColors?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
62
63
|
} & {
|
|
63
64
|
animatedProps?: Partial<Animated.AnimateProps<import("react-native").ViewProps>> | undefined;
|
|
65
|
+
layout?: import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").LayoutAnimationFunction | typeof import("react-native-reanimated").BaseAnimationBuilder | undefined;
|
|
66
|
+
entering?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
|
|
67
|
+
exiting?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
|
|
64
68
|
} & {
|
|
65
69
|
progress: Animated.Node<number>;
|
|
66
70
|
onPress: () => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Animated from 'react-native-reanimated';
|
|
3
3
|
declare const Overlay: React.ForwardRefExoticComponent<{
|
|
4
|
+
children?: React.ReactNode | Animated.Node<React.ReactNode>;
|
|
4
5
|
hitSlop?: import("react-native").Insets | Animated.Node<import("react-native").Insets | undefined> | undefined;
|
|
5
6
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.Node<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
6
7
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | Animated.Node<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
@@ -61,6 +62,9 @@ declare const Overlay: React.ForwardRefExoticComponent<{
|
|
|
61
62
|
accessibilityIgnoresInvertColors?: boolean | Animated.Node<boolean | undefined> | undefined;
|
|
62
63
|
} & {
|
|
63
64
|
animatedProps?: Partial<Animated.AnimateProps<import("react-native").ViewProps>> | undefined;
|
|
65
|
+
layout?: import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").LayoutAnimationFunction | typeof import("react-native-reanimated").BaseAnimationBuilder | undefined;
|
|
66
|
+
entering?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
|
|
67
|
+
exiting?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
|
|
64
68
|
} & {
|
|
65
69
|
progress: Animated.SharedValue<number>;
|
|
66
70
|
onPress: () => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/drawer",
|
|
3
3
|
"description": "Drawer navigator component with animated transitions and gesturess",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.2.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -41,23 +41,23 @@
|
|
|
41
41
|
"clean": "del lib"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@react-navigation/elements": "^1.
|
|
44
|
+
"@react-navigation/elements": "^1.3.0",
|
|
45
45
|
"color": "^3.1.3",
|
|
46
46
|
"warn-once": "^0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@react-navigation/native": "^6.0.
|
|
49
|
+
"@react-navigation/native": "^6.0.7",
|
|
50
50
|
"@testing-library/react-native": "^7.2.0",
|
|
51
51
|
"@types/react": "^17.0.9",
|
|
52
52
|
"@types/react-native": "~0.64.9",
|
|
53
53
|
"del-cli": "^3.0.1",
|
|
54
|
-
"react": "
|
|
55
|
-
"react-native": "~0.
|
|
54
|
+
"react": "17.0.1",
|
|
55
|
+
"react-native": "~0.64.3",
|
|
56
56
|
"react-native-builder-bob": "^0.18.1",
|
|
57
|
-
"react-native-gesture-handler": "~1.
|
|
58
|
-
"react-native-reanimated": "~2.
|
|
59
|
-
"react-native-safe-area-context": "
|
|
60
|
-
"react-native-screens": "~3.
|
|
57
|
+
"react-native-gesture-handler": "~2.1.0",
|
|
58
|
+
"react-native-reanimated": "~2.3.1",
|
|
59
|
+
"react-native-safe-area-context": "3.3.2",
|
|
60
|
+
"react-native-screens": "~3.10.1",
|
|
61
61
|
"typescript": "^4.3.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
]
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "4c5805867ce946d99ba17f71b4d6086bb8751262"
|
|
87
87
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DrawerStatus } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
const DrawerStatusContext =
|
|
5
|
-
|
|
4
|
+
const DrawerStatusContext = React.createContext<DrawerStatus | undefined>(
|
|
5
|
+
undefined
|
|
6
|
+
);
|
|
6
7
|
|
|
7
8
|
export default DrawerStatusContext;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DrawerStatus } from '@react-navigation/native';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
4
|
import DrawerStatusContext from './DrawerStatusContext';
|
|
@@ -6,7 +7,7 @@ import DrawerStatusContext from './DrawerStatusContext';
|
|
|
6
7
|
* Hook to detect if the drawer's status in a parent navigator.
|
|
7
8
|
* Returns 'open' if the drawer is open, 'closed' if the drawer is closed.
|
|
8
9
|
*/
|
|
9
|
-
export default function useDrawerStatus() {
|
|
10
|
+
export default function useDrawerStatus(): DrawerStatus {
|
|
10
11
|
const drawerStatus = React.useContext(DrawerStatusContext);
|
|
11
12
|
|
|
12
13
|
if (drawerStatus === undefined) {
|
|
@@ -553,9 +553,14 @@ export default class DrawerView extends React.Component<DrawerProps> {
|
|
|
553
553
|
<Animated.View
|
|
554
554
|
style={[
|
|
555
555
|
styles.content,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
556
|
+
{
|
|
557
|
+
transform:
|
|
558
|
+
drawerType === 'permanent'
|
|
559
|
+
? // Reanimated needs the property to be present, but it results in Browser bug
|
|
560
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
561
|
+
undefined
|
|
562
|
+
: [{ translateX: contentTranslateX }],
|
|
563
|
+
},
|
|
559
564
|
]}
|
|
560
565
|
>
|
|
561
566
|
<View
|
|
@@ -609,12 +614,15 @@ export default class DrawerView extends React.Component<DrawerProps> {
|
|
|
609
614
|
onLayout={this.handleDrawerLayout}
|
|
610
615
|
style={[
|
|
611
616
|
styles.container,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
617
|
+
{
|
|
618
|
+
transform:
|
|
619
|
+
drawerType === 'permanent'
|
|
620
|
+
? // Reanimated needs the property to be present, but it results in Browser bug
|
|
621
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
622
|
+
undefined
|
|
623
|
+
: [{ translateX: drawerTranslateX }],
|
|
624
|
+
opacity: this.drawerOpacity,
|
|
625
|
+
},
|
|
618
626
|
drawerType === 'permanent'
|
|
619
627
|
? // Without this, the `left`/`right` values don't get reset
|
|
620
628
|
isRight
|
|
@@ -260,35 +260,37 @@ export default function Drawer({
|
|
|
260
260
|
});
|
|
261
261
|
|
|
262
262
|
const drawerAnimatedStyle = useAnimatedStyle(() => {
|
|
263
|
-
if (drawerType === 'permanent') {
|
|
264
|
-
return {};
|
|
265
|
-
}
|
|
266
|
-
|
|
267
263
|
return {
|
|
268
|
-
transform:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
264
|
+
transform:
|
|
265
|
+
drawerType === 'permanent'
|
|
266
|
+
? // Reanimated needs the property to be present, but it results in Browser bug
|
|
267
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
268
|
+
undefined
|
|
269
|
+
: [
|
|
270
|
+
{
|
|
271
|
+
translateX: drawerType === 'back' ? 0 : translateX.value,
|
|
272
|
+
},
|
|
273
|
+
],
|
|
273
274
|
};
|
|
274
275
|
});
|
|
275
276
|
|
|
276
277
|
const contentAnimatedStyle = useAnimatedStyle(() => {
|
|
277
|
-
if (drawerType === 'permanent') {
|
|
278
|
-
return {};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
278
|
return {
|
|
282
|
-
transform:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
279
|
+
transform:
|
|
280
|
+
drawerType === 'permanent'
|
|
281
|
+
? // Reanimated needs the property to be present, but it results in Browser bug
|
|
282
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
283
|
+
undefined
|
|
284
|
+
: [
|
|
285
|
+
{
|
|
286
|
+
translateX:
|
|
287
|
+
drawerType === 'front'
|
|
288
|
+
? 0
|
|
289
|
+
: drawerPosition === 'left'
|
|
290
|
+
? drawerWidth + translateX.value
|
|
291
|
+
: translateX.value - drawerWidth,
|
|
292
|
+
},
|
|
293
|
+
],
|
|
292
294
|
};
|
|
293
295
|
});
|
|
294
296
|
|