react-native-macos 0.64.16 → 0.64.17
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/Libraries/Components/Pressable/Pressable.js +33 -8
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -25,10 +25,9 @@ import type {
|
|
|
25
25
|
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
|
|
26
26
|
import usePressability from '../../Pressability/usePressability';
|
|
27
27
|
import {normalizeRect, type RectOrSize} from '../../StyleSheet/Rect';
|
|
28
|
-
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
|
29
28
|
import type {
|
|
30
29
|
LayoutEvent,
|
|
31
|
-
MouseEvent,
|
|
30
|
+
MouseEvent,
|
|
32
31
|
PressEvent,
|
|
33
32
|
} from '../../Types/CoreEventTypes';
|
|
34
33
|
import type {DraggedTypesType} from '../View/DraggedType'; // TODO(macOS GH#774)
|
|
@@ -65,6 +64,16 @@ type Props = $ReadOnly<{|
|
|
|
65
64
|
*/
|
|
66
65
|
children: React.Node | ((state: StateCallbackType) => React.Node),
|
|
67
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Duration to wait after hover in before calling `onHoverIn`.
|
|
69
|
+
*/
|
|
70
|
+
delayHoverIn?: ?number,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Duration to wait after hover out before calling `onHoverOut`.
|
|
74
|
+
*/
|
|
75
|
+
delayHoverOut?: ?number,
|
|
76
|
+
|
|
68
77
|
/**
|
|
69
78
|
* Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.
|
|
70
79
|
*/
|
|
@@ -91,6 +100,16 @@ type Props = $ReadOnly<{|
|
|
|
91
100
|
*/
|
|
92
101
|
onLayout?: ?(event: LayoutEvent) => void,
|
|
93
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Called when the hover is activated to provide visual feedback.
|
|
105
|
+
*/
|
|
106
|
+
onHoverIn?: ?(event: MouseEvent) => mixed,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Called when the hover is deactivated to undo visual feedback.
|
|
110
|
+
*/
|
|
111
|
+
onHoverOut?: ?(event: MouseEvent) => mixed,
|
|
112
|
+
|
|
94
113
|
/**
|
|
95
114
|
* Called when a long-tap gesture is detected.
|
|
96
115
|
*/
|
|
@@ -167,11 +186,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
167
186
|
android_disableSound,
|
|
168
187
|
android_ripple,
|
|
169
188
|
children,
|
|
189
|
+
delayHoverIn,
|
|
190
|
+
delayHoverOut,
|
|
170
191
|
delayLongPress,
|
|
171
192
|
disabled,
|
|
172
193
|
focusable,
|
|
173
|
-
|
|
174
|
-
|
|
194
|
+
onHoverIn,
|
|
195
|
+
onHoverOut,
|
|
175
196
|
onLongPress,
|
|
176
197
|
onPress,
|
|
177
198
|
onPressIn,
|
|
@@ -208,10 +229,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
208
229
|
hitSlop,
|
|
209
230
|
pressRectOffset: pressRetentionOffset,
|
|
210
231
|
android_disableSound,
|
|
232
|
+
delayHoverIn,
|
|
233
|
+
delayHoverOut,
|
|
211
234
|
delayLongPress,
|
|
212
235
|
delayPressIn: unstable_pressDelay,
|
|
213
|
-
onHoverIn
|
|
214
|
-
onHoverOut
|
|
236
|
+
onHoverIn,
|
|
237
|
+
onHoverOut,
|
|
215
238
|
onLongPress,
|
|
216
239
|
onPress,
|
|
217
240
|
onPressIn(event: PressEvent): void {
|
|
@@ -237,11 +260,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
237
260
|
[
|
|
238
261
|
android_disableSound,
|
|
239
262
|
android_rippleConfig,
|
|
263
|
+
delayHoverIn,
|
|
264
|
+
delayHoverOut,
|
|
240
265
|
delayLongPress,
|
|
241
266
|
disabled,
|
|
242
267
|
hitSlop,
|
|
243
|
-
|
|
244
|
-
|
|
268
|
+
onHoverIn,
|
|
269
|
+
onHoverOut,
|
|
245
270
|
onLongPress,
|
|
246
271
|
onPress,
|
|
247
272
|
onPressIn,
|
package/React/Base/RCTVersion.m
CHANGED
package/package.json
CHANGED