@react-aria/interactions 3.0.0-nightly.1299 → 3.0.0-nightly.1320
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/dist/main.js +5 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +6 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +9 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/useLongPress.ts +12 -3
package/dist/main.js
CHANGED
|
@@ -1877,6 +1877,10 @@ function useScrollWheel(props, ref) {
|
|
|
1877
1877
|
|
|
1878
1878
|
exports.useScrollWheel = useScrollWheel;
|
|
1879
1879
|
const $c770c63e4e3d986910ca483d5a$var$DEFAULT_THRESHOLD = 500;
|
|
1880
|
+
/**
|
|
1881
|
+
* Handles long press interactions across mouse and touch devices. Supports a customizable time threshold,
|
|
1882
|
+
* accessibility description, and normalizes behavior across browsers and devices.
|
|
1883
|
+
*/
|
|
1880
1884
|
|
|
1881
1885
|
function useLongPress(props) {
|
|
1882
1886
|
let {
|
|
@@ -1946,7 +1950,7 @@ function useLongPress(props) {
|
|
|
1946
1950
|
clearTimeout(timeRef.current);
|
|
1947
1951
|
}
|
|
1948
1952
|
|
|
1949
|
-
if (onLongPressEnd) {
|
|
1953
|
+
if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {
|
|
1950
1954
|
onLongPressEnd(_babelRuntimeHelpersExtends({}, e, {
|
|
1951
1955
|
type: 'longpressend'
|
|
1952
1956
|
}));
|