react-native-drawer-layout 4.0.0-alpha.5 → 4.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/utils/getDrawerWidth.js +42 -0
- package/lib/commonjs/utils/getDrawerWidth.js.map +1 -0
- package/lib/commonjs/utils/useDrawerProgress.js.map +1 -1
- package/lib/commonjs/utils/useFakeSharedValue.js +46 -0
- package/lib/commonjs/utils/useFakeSharedValue.js.map +1 -0
- package/lib/commonjs/views/Drawer.js +59 -269
- package/lib/commonjs/views/Drawer.js.map +1 -1
- package/lib/commonjs/views/Drawer.native.js +324 -0
- package/lib/commonjs/views/Drawer.native.js.map +1 -0
- package/lib/commonjs/views/Overlay.js +22 -39
- package/lib/commonjs/views/Overlay.js.map +1 -1
- package/lib/commonjs/views/Overlay.native.js +58 -0
- package/lib/commonjs/views/Overlay.native.js.map +1 -0
- package/lib/module/utils/getDrawerWidth.js +36 -0
- package/lib/module/utils/getDrawerWidth.js.map +1 -0
- package/lib/module/utils/useDrawerProgress.js.map +1 -1
- package/lib/module/utils/useFakeSharedValue.js +38 -0
- package/lib/module/utils/useFakeSharedValue.js.map +1 -0
- package/lib/module/views/Drawer.js +60 -270
- package/lib/module/views/Drawer.js.map +1 -1
- package/lib/module/views/Drawer.native.js +315 -0
- package/lib/module/views/Drawer.native.js.map +1 -0
- package/lib/module/views/Overlay.js +22 -39
- package/lib/module/views/Overlay.js.map +1 -1
- package/lib/module/views/Overlay.native.js +50 -0
- package/lib/module/views/Overlay.native.js.map +1 -0
- package/lib/typescript/src/types.d.ts +9 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/DrawerProgressContext.d.ts +2 -2
- package/lib/typescript/src/utils/DrawerProgressContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDrawerWidth.d.ts +9 -0
- package/lib/typescript/src/utils/getDrawerWidth.d.ts.map +1 -0
- package/lib/typescript/src/utils/useDrawerProgress.d.ts +2 -2
- package/lib/typescript/src/utils/useDrawerProgress.d.ts.map +1 -1
- package/lib/typescript/src/utils/useFakeSharedValue.d.ts +17 -0
- package/lib/typescript/src/utils/useFakeSharedValue.d.ts.map +1 -0
- package/lib/typescript/src/views/Drawer.d.ts +1 -1
- package/lib/typescript/src/views/Drawer.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.native.d.ts +4 -0
- package/lib/typescript/src/views/Drawer.native.d.ts.map +1 -0
- package/lib/typescript/src/views/Overlay.d.ts +2 -204
- package/lib/typescript/src/views/Overlay.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.native.d.ts +4 -0
- package/lib/typescript/src/views/Overlay.native.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/types.tsx +10 -1
- package/src/utils/DrawerProgressContext.tsx +2 -2
- package/src/utils/getDrawerWidth.tsx +49 -0
- package/src/utils/useDrawerProgress.tsx +2 -2
- package/src/utils/useFakeSharedValue.tsx +49 -0
- package/src/views/Drawer.native.tsx +466 -0
- package/src/views/Drawer.tsx +117 -418
- package/src/views/Overlay.native.tsx +63 -0
- package/src/views/Overlay.tsx +26 -59
- package/lib/commonjs/constants.js +0 -11
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/module/constants.js +0 -5
- package/lib/module/constants.js.map +0 -1
- package/lib/typescript/src/constants.d.ts +0 -5
- package/lib/typescript/src/constants.d.ts.map +0 -1
- package/src/constants.tsx +0 -4
|
@@ -1,305 +1,103 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import Animated, { interpolate, runOnJS, useAnimatedGestureHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring } from 'react-native-reanimated';
|
|
2
|
+
import { StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
5
3
|
import useLatestCallback from 'use-latest-callback';
|
|
6
|
-
import { SWIPE_EDGE_WIDTH, SWIPE_MIN_DISTANCE, SWIPE_MIN_OFFSET, SWIPE_MIN_VELOCITY } from '../constants';
|
|
7
4
|
import { DrawerProgressContext } from '../utils/DrawerProgressContext';
|
|
8
|
-
import {
|
|
5
|
+
import { getDrawerWidth } from '../utils/getDrawerWidth';
|
|
6
|
+
import { useFakeSharedValue } from '../utils/useFakeSharedValue';
|
|
9
7
|
import { Overlay } from './Overlay';
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return Math.min(Math.max(value, start), end);
|
|
14
|
-
};
|
|
15
|
-
const getDefaultDrawerWidth = _ref => {
|
|
16
|
-
let {
|
|
17
|
-
height,
|
|
18
|
-
width
|
|
19
|
-
} = _ref;
|
|
20
|
-
/*
|
|
21
|
-
* Default drawer width is screen width - header height
|
|
22
|
-
* with a max width of 280 on mobile and 320 on tablet
|
|
23
|
-
* https://material.io/components/navigation-drawer
|
|
24
|
-
*/
|
|
25
|
-
const smallerAxisSize = Math.min(height, width);
|
|
26
|
-
const isLandscape = width > height;
|
|
27
|
-
const isTablet = smallerAxisSize >= 600;
|
|
28
|
-
const appBarHeight = Platform.OS === 'ios' ? isLandscape ? 32 : 44 : 56;
|
|
29
|
-
const maxWidth = isTablet ? 320 : 280;
|
|
30
|
-
return Math.min(smallerAxisSize - appBarHeight, maxWidth);
|
|
31
|
-
};
|
|
32
|
-
export function Drawer(_ref2) {
|
|
8
|
+
const DRAWER_BORDER_RADIUS = 16;
|
|
9
|
+
export function Drawer(_ref) {
|
|
33
10
|
let {
|
|
34
11
|
layout: customLayout,
|
|
35
|
-
drawerPosition =
|
|
12
|
+
drawerPosition = 'left',
|
|
36
13
|
drawerStyle,
|
|
37
|
-
drawerType =
|
|
38
|
-
ios: 'slide',
|
|
39
|
-
default: 'front'
|
|
40
|
-
}),
|
|
41
|
-
gestureHandlerProps,
|
|
42
|
-
hideStatusBarOnOpen = false,
|
|
43
|
-
keyboardDismissMode = 'on-drag',
|
|
14
|
+
drawerType = 'front',
|
|
44
15
|
onClose,
|
|
45
|
-
onOpen,
|
|
46
|
-
onGestureStart,
|
|
47
|
-
onGestureCancel,
|
|
48
|
-
onGestureEnd,
|
|
49
16
|
onTransitionStart,
|
|
50
17
|
onTransitionEnd,
|
|
51
18
|
open,
|
|
52
19
|
overlayStyle,
|
|
53
20
|
overlayAccessibilityLabel,
|
|
54
|
-
statusBarAnimation = 'slide',
|
|
55
|
-
swipeEnabled = Platform.OS !== 'web' && Platform.OS !== 'windows' && Platform.OS !== 'macos',
|
|
56
|
-
swipeEdgeWidth = SWIPE_EDGE_WIDTH,
|
|
57
|
-
swipeMinDistance = SWIPE_MIN_DISTANCE,
|
|
58
|
-
swipeMinVelocity = SWIPE_MIN_VELOCITY,
|
|
59
21
|
renderDrawerContent,
|
|
60
22
|
children,
|
|
61
23
|
style
|
|
62
|
-
} =
|
|
63
|
-
// FIXME: temporary workaround for useSafeAreaFrame not updating on Web
|
|
24
|
+
} = _ref;
|
|
64
25
|
const windowDimensions = useWindowDimensions();
|
|
65
26
|
const layout = customLayout ?? windowDimensions;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// Try to calculate width if a percentage is given
|
|
72
|
-
const percentage = Number(width.replace(/%$/, ''));
|
|
73
|
-
if (Number.isFinite(percentage)) {
|
|
74
|
-
return layout.width * (percentage / 100);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return typeof width === 'number' ? width : 0;
|
|
78
|
-
};
|
|
79
|
-
const drawerWidth = getDrawerWidth();
|
|
80
|
-
const isOpen = drawerType === 'permanent' ? true : open;
|
|
81
|
-
const isRight = drawerPosition === 'right';
|
|
82
|
-
const getDrawerTranslationX = React.useCallback(open => {
|
|
83
|
-
'worklet';
|
|
84
|
-
|
|
85
|
-
if (drawerPosition === 'left') {
|
|
86
|
-
return open ? 0 : -drawerWidth;
|
|
87
|
-
}
|
|
88
|
-
return open ? 0 : drawerWidth;
|
|
89
|
-
}, [drawerPosition, drawerWidth]);
|
|
90
|
-
const hideStatusBar = React.useCallback(hide => {
|
|
91
|
-
if (hideStatusBarOnOpen) {
|
|
92
|
-
StatusBar.setHidden(hide, statusBarAnimation);
|
|
93
|
-
}
|
|
94
|
-
}, [hideStatusBarOnOpen, statusBarAnimation]);
|
|
27
|
+
const drawerWidth = getDrawerWidth({
|
|
28
|
+
layout,
|
|
29
|
+
drawerStyle
|
|
30
|
+
});
|
|
31
|
+
const progress = useFakeSharedValue(open ? 1 : 0);
|
|
95
32
|
React.useEffect(() => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
interactionHandleRef.current = InteractionManager.createInteractionHandle();
|
|
102
|
-
};
|
|
103
|
-
const endInteraction = () => {
|
|
104
|
-
if (interactionHandleRef.current != null) {
|
|
105
|
-
InteractionManager.clearInteractionHandle(interactionHandleRef.current);
|
|
106
|
-
interactionHandleRef.current = null;
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
const hideKeyboard = () => {
|
|
110
|
-
if (keyboardDismissMode === 'on-drag') {
|
|
111
|
-
Keyboard.dismiss();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
const onGestureBegin = () => {
|
|
115
|
-
onGestureStart?.();
|
|
116
|
-
startInteraction();
|
|
117
|
-
hideKeyboard();
|
|
118
|
-
hideStatusBar(true);
|
|
119
|
-
};
|
|
120
|
-
const onGestureFinish = () => {
|
|
121
|
-
onGestureEnd?.();
|
|
122
|
-
endInteraction();
|
|
123
|
-
};
|
|
124
|
-
const onGestureAbort = () => {
|
|
125
|
-
onGestureCancel?.();
|
|
126
|
-
endInteraction();
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
// FIXME: Currently hitSlop is broken when on Android when drawer is on right
|
|
130
|
-
// https://github.com/software-mansion/react-native-gesture-handler/issues/569
|
|
131
|
-
const hitSlop = isRight ?
|
|
132
|
-
// Extend hitSlop to the side of the screen when drawer is closed
|
|
133
|
-
// This lets the user drag the drawer from the side of the screen
|
|
134
|
-
{
|
|
135
|
-
right: 0,
|
|
136
|
-
width: isOpen ? undefined : swipeEdgeWidth
|
|
137
|
-
} : {
|
|
138
|
-
left: 0,
|
|
139
|
-
width: isOpen ? undefined : swipeEdgeWidth
|
|
140
|
-
};
|
|
141
|
-
const touchStartX = useSharedValue(0);
|
|
142
|
-
const touchX = useSharedValue(0);
|
|
143
|
-
const translationX = useSharedValue(getDrawerTranslationX(open));
|
|
144
|
-
const gestureState = useSharedValue(GestureState.UNDETERMINED);
|
|
145
|
-
const handleAnimationStart = useLatestCallback(open => {
|
|
146
|
-
onTransitionStart?.(!open);
|
|
33
|
+
progress.value = open ? 1 : 0;
|
|
34
|
+
}, [open, progress]);
|
|
35
|
+
const drawerRef = React.useRef(null);
|
|
36
|
+
const onTransitionStartLatest = useLatestCallback(() => {
|
|
37
|
+
onTransitionStart?.(open === false);
|
|
147
38
|
});
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
onTransitionEnd?.(!open);
|
|
39
|
+
const onTransitionEndLatest = useLatestCallback(() => {
|
|
40
|
+
onTransitionEnd?.(open === false);
|
|
151
41
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
runOnJS(handleAnimationStart)(open);
|
|
158
|
-
}
|
|
159
|
-
touchStartX.value = 0;
|
|
160
|
-
touchX.value = 0;
|
|
161
|
-
translationX.value = withSpring(translateX, {
|
|
162
|
-
velocity,
|
|
163
|
-
stiffness: 1000,
|
|
164
|
-
damping: 500,
|
|
165
|
-
mass: 3,
|
|
166
|
-
overshootClamping: true,
|
|
167
|
-
restDisplacementThreshold: 0.01,
|
|
168
|
-
restSpeedThreshold: 0.01
|
|
169
|
-
}, finished => runOnJS(handleAnimationEnd)(open, finished));
|
|
170
|
-
if (open) {
|
|
171
|
-
runOnJS(onOpen)();
|
|
172
|
-
} else {
|
|
173
|
-
runOnJS(onClose)();
|
|
174
|
-
}
|
|
175
|
-
}, [getDrawerTranslationX, handleAnimationEnd, handleAnimationStart, onClose, onOpen, touchStartX, touchX, translationX]);
|
|
176
|
-
React.useEffect(() => toggleDrawer(open), [open, toggleDrawer]);
|
|
177
|
-
const onGestureEvent = useAnimatedGestureHandler({
|
|
178
|
-
onStart: (event, ctx) => {
|
|
179
|
-
ctx.hasCalledOnStart = false;
|
|
180
|
-
ctx.startX = translationX.value;
|
|
181
|
-
gestureState.value = event.state;
|
|
182
|
-
touchStartX.value = event.x;
|
|
183
|
-
},
|
|
184
|
-
onCancel: () => {
|
|
185
|
-
runOnJS(onGestureAbort)();
|
|
186
|
-
},
|
|
187
|
-
onActive: (event, ctx) => {
|
|
188
|
-
touchX.value = event.x;
|
|
189
|
-
translationX.value = ctx.startX + event.translationX;
|
|
190
|
-
gestureState.value = event.state;
|
|
191
|
-
|
|
192
|
-
// onStart will _always_ be called, even when the activation
|
|
193
|
-
// criteria isn't met yet. This makes sure onGestureBegin is only
|
|
194
|
-
// called when the criteria is really met.
|
|
195
|
-
if (!ctx.hasCalledOnStart) {
|
|
196
|
-
ctx.hasCalledOnStart = true;
|
|
197
|
-
runOnJS(onGestureBegin)();
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
onEnd: event => {
|
|
201
|
-
gestureState.value = event.state;
|
|
202
|
-
const nextOpen = Math.abs(event.translationX) > SWIPE_MIN_OFFSET && Math.abs(event.translationX) > swipeMinVelocity || Math.abs(event.translationX) > swipeMinDistance ? drawerPosition === 'left' ?
|
|
203
|
-
// If swiped to right, open the drawer, otherwise close it
|
|
204
|
-
(event.velocityX === 0 ? event.translationX : event.velocityX) > 0 :
|
|
205
|
-
// If swiped to left, open the drawer, otherwise close it
|
|
206
|
-
(event.velocityX === 0 ? event.translationX : event.velocityX) < 0 : open;
|
|
207
|
-
toggleDrawer(nextOpen, event.velocityX);
|
|
208
|
-
},
|
|
209
|
-
onFinish: () => {
|
|
210
|
-
runOnJS(onGestureFinish)();
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
const element = drawerRef.current;
|
|
44
|
+
if (element) {
|
|
45
|
+
element.addEventListener('transitionstart', onTransitionStartLatest);
|
|
46
|
+
element.addEventListener('transitionend', onTransitionEndLatest);
|
|
211
47
|
}
|
|
212
|
-
});
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
// This is used only when drawerType is "front"
|
|
239
|
-
const touchDistance = drawerType === 'front' && gestureState.value === GestureState.ACTIVE ? minmax(drawerPosition === 'left' ? touchStartX.value - drawerWidth : layout.width - drawerWidth - touchStartX.value, 0, layout.width) : 0;
|
|
240
|
-
const translateX = drawerPosition === 'left' ? minmax(translationX.value + touchDistance, -drawerWidth, 0) : minmax(translationX.value - touchDistance, 0, drawerWidth);
|
|
241
|
-
return translateX;
|
|
242
|
-
});
|
|
243
|
-
const drawerAnimatedStyle = useAnimatedStyle(() => {
|
|
244
|
-
return {
|
|
245
|
-
transform: drawerType === 'permanent' ?
|
|
246
|
-
// Reanimated needs the property to be present, but it results in Browser bug
|
|
247
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
248
|
-
[] : [{
|
|
249
|
-
translateX:
|
|
250
|
-
// The drawer stays in place when `drawerType` is `back`
|
|
251
|
-
drawerType === 'back' ? 0 : translateX.value
|
|
252
|
-
}]
|
|
253
|
-
};
|
|
254
|
-
});
|
|
255
|
-
const contentAnimatedStyle = useAnimatedStyle(() => {
|
|
256
|
-
return {
|
|
257
|
-
transform: drawerType === 'permanent' ?
|
|
258
|
-
// Reanimated needs the property to be present, but it results in Browser bug
|
|
259
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=20574
|
|
260
|
-
[] : [{
|
|
261
|
-
translateX:
|
|
262
|
-
// The screen content stays in place when `drawerType` is `front`
|
|
263
|
-
drawerType === 'front' ? 0 : translateX.value + drawerWidth * (drawerPosition === 'left' ? 1 : -1)
|
|
264
|
-
}]
|
|
265
|
-
};
|
|
266
|
-
});
|
|
267
|
-
const progress = useDerivedValue(() => {
|
|
268
|
-
return drawerType === 'permanent' ? 1 : interpolate(translateX.value, [getDrawerTranslationX(false), getDrawerTranslationX(true)], [0, 1]);
|
|
269
|
-
});
|
|
270
|
-
return /*#__PURE__*/React.createElement(GestureHandlerRootView, {
|
|
48
|
+
}, [onTransitionEndLatest, onTransitionStartLatest]);
|
|
49
|
+
const isOpen = drawerType === 'permanent' ? true : open;
|
|
50
|
+
const isRight = drawerPosition === 'right';
|
|
51
|
+
const borderRadiiStyle = drawerType !== 'permanent' ? isRight ? {
|
|
52
|
+
borderTopLeftRadius: DRAWER_BORDER_RADIUS,
|
|
53
|
+
borderBottomLeftRadius: DRAWER_BORDER_RADIUS
|
|
54
|
+
} : {
|
|
55
|
+
borderTopRightRadius: DRAWER_BORDER_RADIUS,
|
|
56
|
+
borderBottomRightRadius: DRAWER_BORDER_RADIUS
|
|
57
|
+
} : null;
|
|
58
|
+
const drawerAnimatedStyle = drawerType !== 'permanent' ? {
|
|
59
|
+
transition: 'transform 0.3s',
|
|
60
|
+
transform: [{
|
|
61
|
+
// The drawer stays in place at open position when `drawerType` is `back`
|
|
62
|
+
translateX: open || drawerType === 'back' ? drawerPosition === 'left' ? 0 : layout.width - drawerWidth : drawerPosition === 'left' ? -drawerWidth : layout.width
|
|
63
|
+
}]
|
|
64
|
+
} : null;
|
|
65
|
+
const contentAnimatedStyle = drawerType !== 'permanent' ? {
|
|
66
|
+
transition: 'transform 0.3s',
|
|
67
|
+
transform: [{
|
|
68
|
+
translateX: open ?
|
|
69
|
+
// The screen content stays in place when `drawerType` is `front`
|
|
70
|
+
drawerType === 'front' ? 0 : drawerWidth * (drawerPosition === 'left' ? 1 : -1) : 0
|
|
71
|
+
}]
|
|
72
|
+
} : null;
|
|
73
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
271
74
|
style: [styles.container, style]
|
|
272
75
|
}, /*#__PURE__*/React.createElement(DrawerProgressContext.Provider, {
|
|
273
76
|
value: progress
|
|
274
|
-
}, /*#__PURE__*/React.createElement(
|
|
275
|
-
activeOffsetX: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
276
|
-
failOffsetY: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
277
|
-
hitSlop: hitSlop,
|
|
278
|
-
enabled: drawerType !== 'permanent' && swipeEnabled,
|
|
279
|
-
onGestureEvent: onGestureEvent
|
|
280
|
-
}, gestureHandlerProps), /*#__PURE__*/React.createElement(Animated.View, {
|
|
77
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
281
78
|
style: [styles.main, {
|
|
282
79
|
flexDirection: drawerType === 'permanent' && !isRight ? 'row-reverse' : 'row'
|
|
283
80
|
}]
|
|
284
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
285
82
|
style: [styles.content, contentAnimatedStyle]
|
|
286
83
|
}, /*#__PURE__*/React.createElement(View, {
|
|
287
84
|
accessibilityElementsHidden: isOpen && drawerType !== 'permanent',
|
|
288
85
|
importantForAccessibility: isOpen && drawerType !== 'permanent' ? 'no-hide-descendants' : 'auto',
|
|
289
86
|
style: styles.content
|
|
290
87
|
}, children), drawerType !== 'permanent' ? /*#__PURE__*/React.createElement(Overlay, {
|
|
88
|
+
open: open,
|
|
291
89
|
progress: progress,
|
|
292
|
-
onPress: () =>
|
|
90
|
+
onPress: () => onClose(),
|
|
293
91
|
style: overlayStyle,
|
|
294
92
|
accessibilityLabel: overlayAccessibilityLabel
|
|
295
|
-
}) : null), /*#__PURE__*/React.createElement(
|
|
296
|
-
|
|
93
|
+
}) : null), /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
ref: drawerRef,
|
|
297
95
|
style: [styles.drawer, {
|
|
298
96
|
width: drawerWidth,
|
|
299
97
|
position: drawerType === 'permanent' ? 'relative' : 'absolute',
|
|
300
98
|
zIndex: drawerType === 'back' ? -1 : 0
|
|
301
|
-
}, drawerAnimatedStyle, drawerStyle]
|
|
302
|
-
}, renderDrawerContent()))))
|
|
99
|
+
}, borderRadiiStyle, drawerAnimatedStyle, drawerStyle]
|
|
100
|
+
}, renderDrawerContent()))));
|
|
303
101
|
}
|
|
304
102
|
const styles = StyleSheet.create({
|
|
305
103
|
container: {
|
|
@@ -315,15 +113,7 @@ const styles = StyleSheet.create({
|
|
|
315
113
|
flex: 1
|
|
316
114
|
},
|
|
317
115
|
main: {
|
|
318
|
-
flex: 1
|
|
319
|
-
...Platform.select({
|
|
320
|
-
// FIXME: We need to hide `overflowX` on Web so the translated content doesn't show offscreen.
|
|
321
|
-
// But adding `overflowX: 'hidden'` prevents content from collapsing the URL bar.
|
|
322
|
-
web: null,
|
|
323
|
-
default: {
|
|
324
|
-
overflow: 'hidden'
|
|
325
|
-
}
|
|
326
|
-
})
|
|
116
|
+
flex: 1
|
|
327
117
|
}
|
|
328
118
|
});
|
|
329
119
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","I18nManager","InteractionManager","Keyboard","Platform","StatusBar","StyleSheet","useWindowDimensions","View","Animated","interpolate","runOnJS","useAnimatedGestureHandler","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","useLatestCallback","SWIPE_EDGE_WIDTH","SWIPE_MIN_DISTANCE","SWIPE_MIN_OFFSET","SWIPE_MIN_VELOCITY","DrawerProgressContext","GestureHandlerRootView","GestureState","PanGestureHandler","Overlay","minmax","value","start","end","Math","min","max","getDefaultDrawerWidth","_ref","height","width","smallerAxisSize","isLandscape","isTablet","appBarHeight","OS","maxWidth","Drawer","_ref2","layout","customLayout","drawerPosition","getConstants","isRTL","drawerStyle","drawerType","select","ios","default","gestureHandlerProps","hideStatusBarOnOpen","keyboardDismissMode","onClose","onOpen","onGestureStart","onGestureCancel","onGestureEnd","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","statusBarAnimation","swipeEnabled","swipeEdgeWidth","swipeMinDistance","swipeMinVelocity","renderDrawerContent","children","style","windowDimensions","getDrawerWidth","flatten","endsWith","percentage","Number","replace","isFinite","drawerWidth","isOpen","isRight","getDrawerTranslationX","useCallback","hideStatusBar","hide","setHidden","useEffect","interactionHandleRef","useRef","startInteraction","current","createInteractionHandle","endInteraction","clearInteractionHandle","hideKeyboard","dismiss","onGestureBegin","onGestureFinish","onGestureAbort","hitSlop","right","undefined","left","touchStartX","touchX","translationX","gestureState","UNDETERMINED","handleAnimationStart","handleAnimationEnd","finished","toggleDrawer","velocity","translateX","stiffness","damping","mass","overshootClamping","restDisplacementThreshold","restSpeedThreshold","onGestureEvent","onStart","event","ctx","hasCalledOnStart","startX","state","x","onCancel","onActive","onEnd","nextOpen","abs","velocityX","onFinish","touchDistance","ACTIVE","drawerAnimatedStyle","transform","contentAnimatedStyle","progress","createElement","styles","container","Provider","_extends","activeOffsetX","failOffsetY","enabled","main","flexDirection","content","accessibilityElementsHidden","importantForAccessibility","onPress","accessibilityLabel","removeClippedSubviews","drawer","position","zIndex","create","flex","top","bottom","backgroundColor","web","overflow"],"sourceRoot":"../../../src","sources":["views/Drawer.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,WAAW,EACXC,kBAAkB,EAClBC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,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ACtDkH,MAAM,EAAElH,UAAU,KAAK,MAAM,GAAG,CAAC,CAAC,GAAG;IACvC,CAAC,EACD4F,mBAAmB,EACnB7F,WAAW;EACX,GAEDuB,mBAAmB,CAAC,CACR,CACF,CACE,CACW,CACV,CAAC;AAE7B;AAEA,MAAM2E,MAAM,GAAG/I,UAAU,CAACiK,MAAM,CAAC;EAC/BjB,SAAS,EAAE;IACTkB,IAAI,EAAE;EACR,CAAC;EACDJ,MAAM,EAAE;IACNK,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACT/H,QAAQ,EAAE,MAAM;IAChBgI,eAAe,EAAE;EACnB,CAAC;EACDb,OAAO,EAAE;IACPU,IAAI,EAAE;EACR,CAAC;EACDZ,IAAI,EAAE;IACJY,IAAI,EAAE,CAAC;IACP,GAAGpK,QAAQ,CAACiD,MAAM,CAAC;MACjB;MACA;MACAuH,GAAG,EAAE,IAAI;MACTrH,OAAO,EAAE;QAAEsH,QAAQ,EAAE;MAAS;IAChC,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useWindowDimensions","View","useLatestCallback","DrawerProgressContext","getDrawerWidth","useFakeSharedValue","Overlay","DRAWER_BORDER_RADIUS","Drawer","_ref","layout","customLayout","drawerPosition","drawerStyle","drawerType","onClose","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","renderDrawerContent","children","style","windowDimensions","drawerWidth","progress","useEffect","value","drawerRef","useRef","onTransitionStartLatest","onTransitionEndLatest","element","current","addEventListener","isOpen","isRight","borderRadiiStyle","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","drawerAnimatedStyle","transition","transform","translateX","width","contentAnimatedStyle","createElement","styles","container","Provider","main","flexDirection","content","accessibilityElementsHidden","importantForAccessibility","onPress","accessibilityLabel","ref","drawer","position","zIndex","create","flex","top","bottom","maxWidth","backgroundColor"],"sourceRoot":"../../../src","sources":["views/Drawer.tsx"],"m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