@react-aria/interactions 3.27.0 → 3.28.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/dist/import.mjs +21 -15
- package/dist/main.js +45 -39
- package/dist/main.js.map +1 -1
- package/dist/module.js +21 -15
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +31 -0
- package/package.json +16 -15
- package/src/index.ts +31 -35
- package/dist/PressResponder.main.js +0 -61
- package/dist/PressResponder.main.js.map +0 -1
- package/dist/PressResponder.mjs +0 -51
- package/dist/PressResponder.module.js +0 -51
- package/dist/PressResponder.module.js.map +0 -1
- package/dist/Pressable.main.js +0 -69
- package/dist/Pressable.main.js.map +0 -1
- package/dist/Pressable.mjs +0 -60
- package/dist/Pressable.module.js +0 -60
- package/dist/Pressable.module.js.map +0 -1
- package/dist/context.main.js +0 -30
- package/dist/context.main.js.map +0 -1
- package/dist/context.mjs +0 -21
- package/dist/context.module.js +0 -21
- package/dist/context.module.js.map +0 -1
- package/dist/createEventHandler.main.js +0 -46
- package/dist/createEventHandler.main.js.map +0 -1
- package/dist/createEventHandler.mjs +0 -41
- package/dist/createEventHandler.module.js +0 -41
- package/dist/createEventHandler.module.js.map +0 -1
- package/dist/focusSafely.main.js +0 -40
- package/dist/focusSafely.main.js.map +0 -1
- package/dist/focusSafely.mjs +0 -35
- package/dist/focusSafely.module.js +0 -35
- package/dist/focusSafely.module.js.map +0 -1
- package/dist/textSelection.main.js +0 -77
- package/dist/textSelection.main.js.map +0 -1
- package/dist/textSelection.mjs +0 -71
- package/dist/textSelection.module.js +0 -71
- package/dist/textSelection.module.js.map +0 -1
- package/dist/types.d.ts +0 -255
- package/dist/types.d.ts.map +0 -1
- package/dist/useFocus.main.js +0 -65
- package/dist/useFocus.main.js.map +0 -1
- package/dist/useFocus.mjs +0 -60
- package/dist/useFocus.module.js +0 -60
- package/dist/useFocus.module.js.map +0 -1
- package/dist/useFocusVisible.main.js +0 -265
- package/dist/useFocusVisible.main.js.map +0 -1
- package/dist/useFocusVisible.mjs +0 -253
- package/dist/useFocusVisible.module.js +0 -253
- package/dist/useFocusVisible.module.js.map +0 -1
- package/dist/useFocusWithin.main.js +0 -105
- package/dist/useFocusWithin.main.js.map +0 -1
- package/dist/useFocusWithin.mjs +0 -100
- package/dist/useFocusWithin.module.js +0 -100
- package/dist/useFocusWithin.module.js.map +0 -1
- package/dist/useFocusable.main.js +0 -113
- package/dist/useFocusable.main.js.map +0 -1
- package/dist/useFocusable.mjs +0 -101
- package/dist/useFocusable.module.js +0 -101
- package/dist/useFocusable.module.js.map +0 -1
- package/dist/useHover.main.js +0 -159
- package/dist/useHover.main.js.map +0 -1
- package/dist/useHover.mjs +0 -154
- package/dist/useHover.module.js +0 -154
- package/dist/useHover.module.js.map +0 -1
- package/dist/useInteractOutside.main.js +0 -106
- package/dist/useInteractOutside.main.js.map +0 -1
- package/dist/useInteractOutside.mjs +0 -101
- package/dist/useInteractOutside.module.js +0 -101
- package/dist/useInteractOutside.module.js.map +0 -1
- package/dist/useKeyboard.main.js +0 -30
- package/dist/useKeyboard.main.js.map +0 -1
- package/dist/useKeyboard.mjs +0 -25
- package/dist/useKeyboard.module.js +0 -25
- package/dist/useKeyboard.module.js.map +0 -1
- package/dist/useLongPress.main.js +0 -86
- package/dist/useLongPress.main.js.map +0 -1
- package/dist/useLongPress.mjs +0 -81
- package/dist/useLongPress.module.js +0 -81
- package/dist/useLongPress.module.js.map +0 -1
- package/dist/useMove.main.js +0 -272
- package/dist/useMove.main.js.map +0 -1
- package/dist/useMove.mjs +0 -267
- package/dist/useMove.module.js +0 -267
- package/dist/useMove.module.js.map +0 -1
- package/dist/usePress.main.js +0 -763
- package/dist/usePress.main.js.map +0 -1
- package/dist/usePress.mjs +0 -758
- package/dist/usePress.module.js +0 -758
- package/dist/usePress.module.js.map +0 -1
- package/dist/useScrollWheel.main.js +0 -41
- package/dist/useScrollWheel.main.js.map +0 -1
- package/dist/useScrollWheel.mjs +0 -36
- package/dist/useScrollWheel.module.js +0 -36
- package/dist/useScrollWheel.module.js.map +0 -1
- package/dist/utils.main.js +0 -163
- package/dist/utils.main.js.map +0 -1
- package/dist/utils.mjs +0 -154
- package/dist/utils.module.js +0 -154
- package/dist/utils.module.js.map +0 -1
- package/src/PressResponder.tsx +0 -67
- package/src/Pressable.tsx +0 -97
- package/src/context.ts +0 -23
- package/src/createEventHandler.ts +0 -55
- package/src/focusSafely.ts +0 -45
- package/src/textSelection.ts +0 -101
- package/src/useFocus.ts +0 -87
- package/src/useFocusVisible.ts +0 -357
- package/src/useFocusWithin.ts +0 -132
- package/src/useFocusable.tsx +0 -191
- package/src/useHover.ts +0 -222
- package/src/useInteractOutside.ts +0 -142
- package/src/useKeyboard.ts +0 -36
- package/src/useLongPress.ts +0 -135
- package/src/useMove.ts +0 -259
- package/src/usePress.ts +0 -1093
- package/src/useScrollWheel.ts +0 -41
- package/src/utils.ts +0 -174
package/dist/import.mjs
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {Pressable as $
|
|
2
|
-
import {
|
|
3
|
-
import {useFocus as $
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import {Pressable as $d832e8b343f38b53$re_export$Pressable} from "react-aria/Pressable";
|
|
2
|
+
import {PressResponder as $d832e8b343f38b53$re_export$PressResponder, ClearPressResponder as $d832e8b343f38b53$re_export$ClearPressResponder} from "react-aria/private/interactions/PressResponder";
|
|
3
|
+
import {useFocus as $d832e8b343f38b53$re_export$useFocus} from "react-aria/useFocus";
|
|
4
|
+
import {isFocusVisible as $d832e8b343f38b53$re_export$isFocusVisible, getInteractionModality as $d832e8b343f38b53$re_export$getInteractionModality, setInteractionModality as $d832e8b343f38b53$re_export$setInteractionModality, getPointerType as $d832e8b343f38b53$re_export$getPointerType, addWindowFocusTracking as $d832e8b343f38b53$re_export$addWindowFocusTracking, useInteractionModality as $d832e8b343f38b53$re_export$useInteractionModality, useFocusVisibleListener as $d832e8b343f38b53$re_export$useFocusVisibleListener} from "react-aria/private/interactions/useFocusVisible";
|
|
5
|
+
import {useFocusVisible as $d832e8b343f38b53$re_export$useFocusVisible} from "react-aria/useFocusVisible";
|
|
6
|
+
import {useFocusWithin as $d832e8b343f38b53$re_export$useFocusWithin} from "react-aria/useFocusWithin";
|
|
7
|
+
import {useHover as $d832e8b343f38b53$re_export$useHover} from "react-aria/useHover";
|
|
8
|
+
import {useInteractOutside as $d832e8b343f38b53$re_export$useInteractOutside} from "react-aria/useInteractOutside";
|
|
9
|
+
import {useKeyboard as $d832e8b343f38b53$re_export$useKeyboard} from "react-aria/useKeyboard";
|
|
10
|
+
import {useMove as $d832e8b343f38b53$re_export$useMove} from "react-aria/useMove";
|
|
11
|
+
import {usePress as $d832e8b343f38b53$re_export$usePress} from "react-aria/usePress";
|
|
12
|
+
import {useScrollWheel as $d832e8b343f38b53$re_export$useScrollWheel} from "react-aria/private/interactions/useScrollWheel";
|
|
13
|
+
import {useLongPress as $d832e8b343f38b53$re_export$useLongPress} from "react-aria/useLongPress";
|
|
14
|
+
import {FocusableProvider as $d832e8b343f38b53$re_export$FocusableProvider, FocusableContext as $d832e8b343f38b53$re_export$FocusableContext} from "react-aria/private/interactions/useFocusable";
|
|
15
|
+
import {useFocusable as $d832e8b343f38b53$re_export$useFocusable} from "react-aria/useFocusable";
|
|
16
|
+
import {Focusable as $d832e8b343f38b53$re_export$Focusable} from "react-aria/Focusable";
|
|
17
|
+
import {focusSafely as $d832e8b343f38b53$re_export$focusSafely} from "react-aria/private/interactions/focusSafely";
|
|
15
18
|
|
|
16
19
|
/*
|
|
17
20
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -39,5 +42,8 @@ import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from "./focusS
|
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export {$d832e8b343f38b53$re_export$Pressable as Pressable, $d832e8b343f38b53$re_export$PressResponder as PressResponder, $d832e8b343f38b53$re_export$ClearPressResponder as ClearPressResponder, $d832e8b343f38b53$re_export$useFocus as useFocus, $d832e8b343f38b53$re_export$isFocusVisible as isFocusVisible, $d832e8b343f38b53$re_export$getInteractionModality as getInteractionModality, $d832e8b343f38b53$re_export$setInteractionModality as setInteractionModality, $d832e8b343f38b53$re_export$getPointerType as getPointerType, $d832e8b343f38b53$re_export$addWindowFocusTracking as addWindowFocusTracking, $d832e8b343f38b53$re_export$useInteractionModality as useInteractionModality, $d832e8b343f38b53$re_export$useFocusVisibleListener as useFocusVisibleListener, $d832e8b343f38b53$re_export$useFocusVisible as useFocusVisible, $d832e8b343f38b53$re_export$useFocusWithin as useFocusWithin, $d832e8b343f38b53$re_export$useHover as useHover, $d832e8b343f38b53$re_export$useInteractOutside as useInteractOutside, $d832e8b343f38b53$re_export$useKeyboard as useKeyboard, $d832e8b343f38b53$re_export$useMove as useMove, $d832e8b343f38b53$re_export$usePress as usePress, $d832e8b343f38b53$re_export$useScrollWheel as useScrollWheel, $d832e8b343f38b53$re_export$useLongPress as useLongPress, $d832e8b343f38b53$re_export$FocusableProvider as FocusableProvider, $d832e8b343f38b53$re_export$FocusableContext as FocusableContext, $d832e8b343f38b53$re_export$useFocusable as useFocusable, $d832e8b343f38b53$re_export$Focusable as Focusable, $d832e8b343f38b53$re_export$focusSafely as focusSafely};
|
|
43
49
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $
|
|
10
|
-
var $
|
|
11
|
-
var $
|
|
12
|
-
var $
|
|
13
|
-
var $
|
|
14
|
-
var $
|
|
1
|
+
var $2Bo0u$reactariaPressable = require("react-aria/Pressable");
|
|
2
|
+
var $2Bo0u$reactariaprivateinteractionsPressResponder = require("react-aria/private/interactions/PressResponder");
|
|
3
|
+
var $2Bo0u$reactariauseFocus = require("react-aria/useFocus");
|
|
4
|
+
var $2Bo0u$reactariaprivateinteractionsuseFocusVisible = require("react-aria/private/interactions/useFocusVisible");
|
|
5
|
+
var $2Bo0u$reactariauseFocusVisible = require("react-aria/useFocusVisible");
|
|
6
|
+
var $2Bo0u$reactariauseFocusWithin = require("react-aria/useFocusWithin");
|
|
7
|
+
var $2Bo0u$reactariauseHover = require("react-aria/useHover");
|
|
8
|
+
var $2Bo0u$reactariauseInteractOutside = require("react-aria/useInteractOutside");
|
|
9
|
+
var $2Bo0u$reactariauseKeyboard = require("react-aria/useKeyboard");
|
|
10
|
+
var $2Bo0u$reactariauseMove = require("react-aria/useMove");
|
|
11
|
+
var $2Bo0u$reactariausePress = require("react-aria/usePress");
|
|
12
|
+
var $2Bo0u$reactariaprivateinteractionsuseScrollWheel = require("react-aria/private/interactions/useScrollWheel");
|
|
13
|
+
var $2Bo0u$reactariauseLongPress = require("react-aria/useLongPress");
|
|
14
|
+
var $2Bo0u$reactariaprivateinteractionsuseFocusable = require("react-aria/private/interactions/useFocusable");
|
|
15
|
+
var $2Bo0u$reactariauseFocusable = require("react-aria/useFocusable");
|
|
16
|
+
var $2Bo0u$reactariaFocusable = require("react-aria/Focusable");
|
|
17
|
+
var $2Bo0u$reactariaprivateinteractionsfocusSafely = require("react-aria/private/interactions/focusSafely");
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
function $parcel$export(e, n, v, s) {
|
|
18
21
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
$parcel$export(module.exports, "Pressable", ()
|
|
22
|
-
$parcel$export(module.exports, "PressResponder", ()
|
|
23
|
-
$parcel$export(module.exports, "ClearPressResponder", ()
|
|
24
|
-
$parcel$export(module.exports, "useFocus", ()
|
|
25
|
-
$parcel$export(module.exports, "isFocusVisible", ()
|
|
26
|
-
$parcel$export(module.exports, "getInteractionModality", ()
|
|
27
|
-
$parcel$export(module.exports, "setInteractionModality", ()
|
|
28
|
-
$parcel$export(module.exports, "getPointerType", ()
|
|
29
|
-
$parcel$export(module.exports, "addWindowFocusTracking", ()
|
|
30
|
-
$parcel$export(module.exports, "useInteractionModality", ()
|
|
31
|
-
$parcel$export(module.exports, "
|
|
32
|
-
$parcel$export(module.exports, "
|
|
33
|
-
$parcel$export(module.exports, "useFocusWithin", ()
|
|
34
|
-
$parcel$export(module.exports, "useHover", ()
|
|
35
|
-
$parcel$export(module.exports, "useInteractOutside", ()
|
|
36
|
-
$parcel$export(module.exports, "useKeyboard", ()
|
|
37
|
-
$parcel$export(module.exports, "useMove", ()
|
|
38
|
-
$parcel$export(module.exports, "usePress", ()
|
|
39
|
-
$parcel$export(module.exports, "useScrollWheel", ()
|
|
40
|
-
$parcel$export(module.exports, "useLongPress", ()
|
|
41
|
-
$parcel$export(module.exports, "
|
|
42
|
-
$parcel$export(module.exports, "
|
|
43
|
-
$parcel$export(module.exports, "
|
|
44
|
-
$parcel$export(module.exports, "
|
|
45
|
-
$parcel$export(module.exports, "focusSafely", ()
|
|
24
|
+
$parcel$export(module.exports, "Pressable", function () { return $2Bo0u$reactariaPressable.Pressable; });
|
|
25
|
+
$parcel$export(module.exports, "PressResponder", function () { return $2Bo0u$reactariaprivateinteractionsPressResponder.PressResponder; });
|
|
26
|
+
$parcel$export(module.exports, "ClearPressResponder", function () { return $2Bo0u$reactariaprivateinteractionsPressResponder.ClearPressResponder; });
|
|
27
|
+
$parcel$export(module.exports, "useFocus", function () { return $2Bo0u$reactariauseFocus.useFocus; });
|
|
28
|
+
$parcel$export(module.exports, "isFocusVisible", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.isFocusVisible; });
|
|
29
|
+
$parcel$export(module.exports, "getInteractionModality", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.getInteractionModality; });
|
|
30
|
+
$parcel$export(module.exports, "setInteractionModality", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.setInteractionModality; });
|
|
31
|
+
$parcel$export(module.exports, "getPointerType", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.getPointerType; });
|
|
32
|
+
$parcel$export(module.exports, "addWindowFocusTracking", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.addWindowFocusTracking; });
|
|
33
|
+
$parcel$export(module.exports, "useInteractionModality", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.useInteractionModality; });
|
|
34
|
+
$parcel$export(module.exports, "useFocusVisibleListener", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusVisible.useFocusVisibleListener; });
|
|
35
|
+
$parcel$export(module.exports, "useFocusVisible", function () { return $2Bo0u$reactariauseFocusVisible.useFocusVisible; });
|
|
36
|
+
$parcel$export(module.exports, "useFocusWithin", function () { return $2Bo0u$reactariauseFocusWithin.useFocusWithin; });
|
|
37
|
+
$parcel$export(module.exports, "useHover", function () { return $2Bo0u$reactariauseHover.useHover; });
|
|
38
|
+
$parcel$export(module.exports, "useInteractOutside", function () { return $2Bo0u$reactariauseInteractOutside.useInteractOutside; });
|
|
39
|
+
$parcel$export(module.exports, "useKeyboard", function () { return $2Bo0u$reactariauseKeyboard.useKeyboard; });
|
|
40
|
+
$parcel$export(module.exports, "useMove", function () { return $2Bo0u$reactariauseMove.useMove; });
|
|
41
|
+
$parcel$export(module.exports, "usePress", function () { return $2Bo0u$reactariausePress.usePress; });
|
|
42
|
+
$parcel$export(module.exports, "useScrollWheel", function () { return $2Bo0u$reactariaprivateinteractionsuseScrollWheel.useScrollWheel; });
|
|
43
|
+
$parcel$export(module.exports, "useLongPress", function () { return $2Bo0u$reactariauseLongPress.useLongPress; });
|
|
44
|
+
$parcel$export(module.exports, "FocusableProvider", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusable.FocusableProvider; });
|
|
45
|
+
$parcel$export(module.exports, "FocusableContext", function () { return $2Bo0u$reactariaprivateinteractionsuseFocusable.FocusableContext; });
|
|
46
|
+
$parcel$export(module.exports, "useFocusable", function () { return $2Bo0u$reactariauseFocusable.useFocusable; });
|
|
47
|
+
$parcel$export(module.exports, "Focusable", function () { return $2Bo0u$reactariaFocusable.Focusable; });
|
|
48
|
+
$parcel$export(module.exports, "focusSafely", function () { return $2Bo0u$reactariaprivateinteractionsfocusSafely.focusSafely; });
|
|
46
49
|
/*
|
|
47
50
|
* Copyright 2020 Adobe. All rights reserved.
|
|
48
51
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -69,4 +72,7 @@ $parcel$export(module.exports, "focusSafely", () => $2833058fcd3993f5$exports.fo
|
|
|
69
72
|
|
|
70
73
|
|
|
71
74
|
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
72
78
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/interactions/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {Pressable} from 'react-aria/Pressable';\n\nexport {PressResponder, ClearPressResponder} from 'react-aria/private/interactions/PressResponder';\nexport {useFocus} from 'react-aria/useFocus';\nexport {isFocusVisible, getInteractionModality, setInteractionModality, getPointerType, addWindowFocusTracking, useInteractionModality, useFocusVisibleListener} from 'react-aria/private/interactions/useFocusVisible';\nexport {useFocusVisible} from 'react-aria/useFocusVisible';\nexport {useFocusWithin} from 'react-aria/useFocusWithin';\nexport {useHover} from 'react-aria/useHover';\nexport {useInteractOutside} from 'react-aria/useInteractOutside';\nexport {useKeyboard} from 'react-aria/useKeyboard';\nexport {useMove} from 'react-aria/useMove';\nexport {usePress} from 'react-aria/usePress';\nexport {useScrollWheel} from 'react-aria/private/interactions/useScrollWheel';\nexport {useLongPress} from 'react-aria/useLongPress';\nexport {FocusableProvider, FocusableContext} from 'react-aria/private/interactions/useFocusable';\nexport {useFocusable} from 'react-aria/useFocusable';\nexport {Focusable} from 'react-aria/Focusable';\nexport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nexport type {FocusProps, FocusResult} from 'react-aria/useFocus';\nexport type {FocusVisibleHandler, Modality} from 'react-aria/private/interactions/useFocusVisible';\nexport type {FocusVisibleProps, FocusVisibleResult} from 'react-aria/useFocusVisible';\nexport type {FocusWithinProps, FocusWithinResult} from 'react-aria/useFocusWithin';\nexport type {HoverProps, HoverResult} from 'react-aria/useHover';\nexport type {InteractOutsideProps} from 'react-aria/useInteractOutside';\nexport type {KeyboardProps, KeyboardResult} from 'react-aria/useKeyboard';\nexport type {PressProps, PressHookProps, PressResult} from 'react-aria/usePress';\nexport type {MoveResult} from 'react-aria/useMove';\nexport type {LongPressProps, LongPressResult} from 'react-aria/useLongPress';\nexport type {ScrollWheelProps} from 'react-aria/private/interactions/useScrollWheel';\nexport type {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';\nexport type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';\nexport type {PressEvent, PressEvents, LongPressEvent, MoveStartEvent, MoveMoveEvent, MoveEndEvent, MoveEvent, MoveEvents, HoverEvent, HoverEvents, FocusEvents, KeyboardEvents} from '@react-types/shared';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {Pressable as $
|
|
2
|
-
import {
|
|
3
|
-
import {useFocus as $
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import {Pressable as $d832e8b343f38b53$re_export$Pressable} from "react-aria/Pressable";
|
|
2
|
+
import {PressResponder as $d832e8b343f38b53$re_export$PressResponder, ClearPressResponder as $d832e8b343f38b53$re_export$ClearPressResponder} from "react-aria/private/interactions/PressResponder";
|
|
3
|
+
import {useFocus as $d832e8b343f38b53$re_export$useFocus} from "react-aria/useFocus";
|
|
4
|
+
import {isFocusVisible as $d832e8b343f38b53$re_export$isFocusVisible, getInteractionModality as $d832e8b343f38b53$re_export$getInteractionModality, setInteractionModality as $d832e8b343f38b53$re_export$setInteractionModality, getPointerType as $d832e8b343f38b53$re_export$getPointerType, addWindowFocusTracking as $d832e8b343f38b53$re_export$addWindowFocusTracking, useInteractionModality as $d832e8b343f38b53$re_export$useInteractionModality, useFocusVisibleListener as $d832e8b343f38b53$re_export$useFocusVisibleListener} from "react-aria/private/interactions/useFocusVisible";
|
|
5
|
+
import {useFocusVisible as $d832e8b343f38b53$re_export$useFocusVisible} from "react-aria/useFocusVisible";
|
|
6
|
+
import {useFocusWithin as $d832e8b343f38b53$re_export$useFocusWithin} from "react-aria/useFocusWithin";
|
|
7
|
+
import {useHover as $d832e8b343f38b53$re_export$useHover} from "react-aria/useHover";
|
|
8
|
+
import {useInteractOutside as $d832e8b343f38b53$re_export$useInteractOutside} from "react-aria/useInteractOutside";
|
|
9
|
+
import {useKeyboard as $d832e8b343f38b53$re_export$useKeyboard} from "react-aria/useKeyboard";
|
|
10
|
+
import {useMove as $d832e8b343f38b53$re_export$useMove} from "react-aria/useMove";
|
|
11
|
+
import {usePress as $d832e8b343f38b53$re_export$usePress} from "react-aria/usePress";
|
|
12
|
+
import {useScrollWheel as $d832e8b343f38b53$re_export$useScrollWheel} from "react-aria/private/interactions/useScrollWheel";
|
|
13
|
+
import {useLongPress as $d832e8b343f38b53$re_export$useLongPress} from "react-aria/useLongPress";
|
|
14
|
+
import {FocusableProvider as $d832e8b343f38b53$re_export$FocusableProvider, FocusableContext as $d832e8b343f38b53$re_export$FocusableContext} from "react-aria/private/interactions/useFocusable";
|
|
15
|
+
import {useFocusable as $d832e8b343f38b53$re_export$useFocusable} from "react-aria/useFocusable";
|
|
16
|
+
import {Focusable as $d832e8b343f38b53$re_export$Focusable} from "react-aria/Focusable";
|
|
17
|
+
import {focusSafely as $d832e8b343f38b53$re_export$focusSafely} from "react-aria/private/interactions/focusSafely";
|
|
15
18
|
|
|
16
19
|
/*
|
|
17
20
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -39,5 +42,8 @@ import {focusSafely as $3ad3f6e1647bc98d$export$80f3e147d781571c} from "./focusS
|
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export {$d832e8b343f38b53$re_export$Pressable as Pressable, $d832e8b343f38b53$re_export$PressResponder as PressResponder, $d832e8b343f38b53$re_export$ClearPressResponder as ClearPressResponder, $d832e8b343f38b53$re_export$useFocus as useFocus, $d832e8b343f38b53$re_export$isFocusVisible as isFocusVisible, $d832e8b343f38b53$re_export$getInteractionModality as getInteractionModality, $d832e8b343f38b53$re_export$setInteractionModality as setInteractionModality, $d832e8b343f38b53$re_export$getPointerType as getPointerType, $d832e8b343f38b53$re_export$addWindowFocusTracking as addWindowFocusTracking, $d832e8b343f38b53$re_export$useInteractionModality as useInteractionModality, $d832e8b343f38b53$re_export$useFocusVisibleListener as useFocusVisibleListener, $d832e8b343f38b53$re_export$useFocusVisible as useFocusVisible, $d832e8b343f38b53$re_export$useFocusWithin as useFocusWithin, $d832e8b343f38b53$re_export$useHover as useHover, $d832e8b343f38b53$re_export$useInteractOutside as useInteractOutside, $d832e8b343f38b53$re_export$useKeyboard as useKeyboard, $d832e8b343f38b53$re_export$useMove as useMove, $d832e8b343f38b53$re_export$usePress as usePress, $d832e8b343f38b53$re_export$useScrollWheel as useScrollWheel, $d832e8b343f38b53$re_export$useLongPress as useLongPress, $d832e8b343f38b53$re_export$FocusableProvider as FocusableProvider, $d832e8b343f38b53$re_export$FocusableContext as FocusableContext, $d832e8b343f38b53$re_export$useFocusable as useFocusable, $d832e8b343f38b53$re_export$Focusable as Focusable, $d832e8b343f38b53$re_export$focusSafely as focusSafely};
|
|
43
49
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/interactions/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {Pressable} from 'react-aria/Pressable';\n\nexport {PressResponder, ClearPressResponder} from 'react-aria/private/interactions/PressResponder';\nexport {useFocus} from 'react-aria/useFocus';\nexport {isFocusVisible, getInteractionModality, setInteractionModality, getPointerType, addWindowFocusTracking, useInteractionModality, useFocusVisibleListener} from 'react-aria/private/interactions/useFocusVisible';\nexport {useFocusVisible} from 'react-aria/useFocusVisible';\nexport {useFocusWithin} from 'react-aria/useFocusWithin';\nexport {useHover} from 'react-aria/useHover';\nexport {useInteractOutside} from 'react-aria/useInteractOutside';\nexport {useKeyboard} from 'react-aria/useKeyboard';\nexport {useMove} from 'react-aria/useMove';\nexport {usePress} from 'react-aria/usePress';\nexport {useScrollWheel} from 'react-aria/private/interactions/useScrollWheel';\nexport {useLongPress} from 'react-aria/useLongPress';\nexport {FocusableProvider, FocusableContext} from 'react-aria/private/interactions/useFocusable';\nexport {useFocusable} from 'react-aria/useFocusable';\nexport {Focusable} from 'react-aria/Focusable';\nexport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nexport type {FocusProps, FocusResult} from 'react-aria/useFocus';\nexport type {FocusVisibleHandler, Modality} from 'react-aria/private/interactions/useFocusVisible';\nexport type {FocusVisibleProps, FocusVisibleResult} from 'react-aria/useFocusVisible';\nexport type {FocusWithinProps, FocusWithinResult} from 'react-aria/useFocusWithin';\nexport type {HoverProps, HoverResult} from 'react-aria/useHover';\nexport type {InteractOutsideProps} from 'react-aria/useInteractOutside';\nexport type {KeyboardProps, KeyboardResult} from 'react-aria/useKeyboard';\nexport type {PressProps, PressHookProps, PressResult} from 'react-aria/usePress';\nexport type {MoveResult} from 'react-aria/useMove';\nexport type {LongPressProps, LongPressResult} from 'react-aria/useLongPress';\nexport type {ScrollWheelProps} from 'react-aria/private/interactions/useScrollWheel';\nexport type {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';\nexport type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';\nexport type {PressEvent, PressEvents, LongPressEvent, MoveStartEvent, MoveMoveEvent, MoveEndEvent, MoveEvent, MoveEvents, HoverEvent, HoverEvents, FocusEvents, KeyboardEvents} from '@react-types/shared';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { Pressable } from 'react-aria/Pressable';
|
|
2
|
+
export { PressResponder, ClearPressResponder } from 'react-aria/private/interactions/PressResponder';
|
|
3
|
+
export { useFocus } from 'react-aria/useFocus';
|
|
4
|
+
export { isFocusVisible, getInteractionModality, setInteractionModality, getPointerType, addWindowFocusTracking, useInteractionModality, useFocusVisibleListener } from 'react-aria/private/interactions/useFocusVisible';
|
|
5
|
+
export { useFocusVisible } from 'react-aria/useFocusVisible';
|
|
6
|
+
export { useFocusWithin } from 'react-aria/useFocusWithin';
|
|
7
|
+
export { useHover } from 'react-aria/useHover';
|
|
8
|
+
export { useInteractOutside } from 'react-aria/useInteractOutside';
|
|
9
|
+
export { useKeyboard } from 'react-aria/useKeyboard';
|
|
10
|
+
export { useMove } from 'react-aria/useMove';
|
|
11
|
+
export { usePress } from 'react-aria/usePress';
|
|
12
|
+
export { useScrollWheel } from 'react-aria/private/interactions/useScrollWheel';
|
|
13
|
+
export { useLongPress } from 'react-aria/useLongPress';
|
|
14
|
+
export { FocusableProvider, FocusableContext } from 'react-aria/private/interactions/useFocusable';
|
|
15
|
+
export { useFocusable } from 'react-aria/useFocusable';
|
|
16
|
+
export { Focusable } from 'react-aria/Focusable';
|
|
17
|
+
export { focusSafely } from 'react-aria/private/interactions/focusSafely';
|
|
18
|
+
export type { FocusProps, FocusResult } from 'react-aria/useFocus';
|
|
19
|
+
export type { FocusVisibleHandler, Modality } from 'react-aria/private/interactions/useFocusVisible';
|
|
20
|
+
export type { FocusVisibleProps, FocusVisibleResult } from 'react-aria/useFocusVisible';
|
|
21
|
+
export type { FocusWithinProps, FocusWithinResult } from 'react-aria/useFocusWithin';
|
|
22
|
+
export type { HoverProps, HoverResult } from 'react-aria/useHover';
|
|
23
|
+
export type { InteractOutsideProps } from 'react-aria/useInteractOutside';
|
|
24
|
+
export type { KeyboardProps, KeyboardResult } from 'react-aria/useKeyboard';
|
|
25
|
+
export type { PressProps, PressHookProps, PressResult } from 'react-aria/usePress';
|
|
26
|
+
export type { MoveResult } from 'react-aria/useMove';
|
|
27
|
+
export type { LongPressProps, LongPressResult } from 'react-aria/useLongPress';
|
|
28
|
+
export type { ScrollWheelProps } from 'react-aria/private/interactions/useScrollWheel';
|
|
29
|
+
export type { FocusableProviderProps } from 'react-aria/private/interactions/useFocusable';
|
|
30
|
+
export type { FocusableAria, FocusableOptions } from 'react-aria/useFocusable';
|
|
31
|
+
export type { PressEvent, PressEvents, LongPressEvent, MoveStartEvent, MoveMoveEvent, MoveEndEvent, MoveEvent, MoveEvents, HoverEvent, HoverEvents, FocusEvents, KeyboardEvents } from '@react-types/shared';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/interactions",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.28.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -26,11 +26,9 @@
|
|
|
26
26
|
"url": "https://github.com/adobe/react-spectrum"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"@react-types/shared": "^3.33.0",
|
|
33
|
-
"@swc/helpers": "^0.5.0"
|
|
29
|
+
"@react-types/shared": "^3.34.0",
|
|
30
|
+
"@swc/helpers": "^0.5.0",
|
|
31
|
+
"react-aria": "3.48.0"
|
|
34
32
|
},
|
|
35
33
|
"peerDependencies": {
|
|
36
34
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
@@ -39,5 +37,8 @@
|
|
|
39
37
|
"publishConfig": {
|
|
40
38
|
"access": "public"
|
|
41
39
|
},
|
|
42
|
-
"
|
|
40
|
+
"targets": {
|
|
41
|
+
"types": false
|
|
42
|
+
},
|
|
43
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
43
44
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,39 +10,35 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export {Pressable} from '
|
|
14
|
-
export {PressResponder, ClearPressResponder} from './PressResponder';
|
|
15
|
-
export {useFocus} from './useFocus';
|
|
16
|
-
export {
|
|
17
|
-
isFocusVisible,
|
|
18
|
-
getInteractionModality,
|
|
19
|
-
setInteractionModality,
|
|
20
|
-
getPointerType,
|
|
21
|
-
addWindowFocusTracking,
|
|
22
|
-
useInteractionModality,
|
|
23
|
-
useFocusVisible,
|
|
24
|
-
useFocusVisibleListener
|
|
25
|
-
} from './useFocusVisible';
|
|
26
|
-
export {useFocusWithin} from './useFocusWithin';
|
|
27
|
-
export {useHover} from './useHover';
|
|
28
|
-
export {useInteractOutside} from './useInteractOutside';
|
|
29
|
-
export {useKeyboard} from './useKeyboard';
|
|
30
|
-
export {useMove} from './useMove';
|
|
31
|
-
export {usePress} from './usePress';
|
|
32
|
-
export {useScrollWheel} from './useScrollWheel';
|
|
33
|
-
export {useLongPress} from './useLongPress';
|
|
34
|
-
export {useFocusable, FocusableProvider, Focusable, FocusableContext} from './useFocusable';
|
|
35
|
-
export {focusSafely} from './focusSafely';
|
|
13
|
+
export {Pressable} from 'react-aria/Pressable';
|
|
36
14
|
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
15
|
+
export {PressResponder, ClearPressResponder} from 'react-aria/private/interactions/PressResponder';
|
|
16
|
+
export {useFocus} from 'react-aria/useFocus';
|
|
17
|
+
export {isFocusVisible, getInteractionModality, setInteractionModality, getPointerType, addWindowFocusTracking, useInteractionModality, useFocusVisibleListener} from 'react-aria/private/interactions/useFocusVisible';
|
|
18
|
+
export {useFocusVisible} from 'react-aria/useFocusVisible';
|
|
19
|
+
export {useFocusWithin} from 'react-aria/useFocusWithin';
|
|
20
|
+
export {useHover} from 'react-aria/useHover';
|
|
21
|
+
export {useInteractOutside} from 'react-aria/useInteractOutside';
|
|
22
|
+
export {useKeyboard} from 'react-aria/useKeyboard';
|
|
23
|
+
export {useMove} from 'react-aria/useMove';
|
|
24
|
+
export {usePress} from 'react-aria/usePress';
|
|
25
|
+
export {useScrollWheel} from 'react-aria/private/interactions/useScrollWheel';
|
|
26
|
+
export {useLongPress} from 'react-aria/useLongPress';
|
|
27
|
+
export {FocusableProvider, FocusableContext} from 'react-aria/private/interactions/useFocusable';
|
|
28
|
+
export {useFocusable} from 'react-aria/useFocusable';
|
|
29
|
+
export {Focusable} from 'react-aria/Focusable';
|
|
30
|
+
export {focusSafely} from 'react-aria/private/interactions/focusSafely';
|
|
31
|
+
export type {FocusProps, FocusResult} from 'react-aria/useFocus';
|
|
32
|
+
export type {FocusVisibleHandler, Modality} from 'react-aria/private/interactions/useFocusVisible';
|
|
33
|
+
export type {FocusVisibleProps, FocusVisibleResult} from 'react-aria/useFocusVisible';
|
|
34
|
+
export type {FocusWithinProps, FocusWithinResult} from 'react-aria/useFocusWithin';
|
|
35
|
+
export type {HoverProps, HoverResult} from 'react-aria/useHover';
|
|
36
|
+
export type {InteractOutsideProps} from 'react-aria/useInteractOutside';
|
|
37
|
+
export type {KeyboardProps, KeyboardResult} from 'react-aria/useKeyboard';
|
|
38
|
+
export type {PressProps, PressHookProps, PressResult} from 'react-aria/usePress';
|
|
39
|
+
export type {MoveResult} from 'react-aria/useMove';
|
|
40
|
+
export type {LongPressProps, LongPressResult} from 'react-aria/useLongPress';
|
|
41
|
+
export type {ScrollWheelProps} from 'react-aria/private/interactions/useScrollWheel';
|
|
42
|
+
export type {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';
|
|
43
|
+
export type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';
|
|
44
|
+
export type {PressEvent, PressEvents, LongPressEvent, MoveStartEvent, MoveMoveEvent, MoveEndEvent, MoveEvent, MoveEvents, HoverEvent, HoverEvents, FocusEvents, KeyboardEvents} from '@react-types/shared';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var $01d3f539e91688c8$exports = require("./context.main.js");
|
|
2
|
-
var $3maub$reactariautils = require("@react-aria/utils");
|
|
3
|
-
var $3maub$react = require("react");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function $parcel$interopDefault(a) {
|
|
7
|
-
return a && a.__esModule ? a.default : a;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function $parcel$export(e, n, v, s) {
|
|
11
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
$parcel$export(module.exports, "PressResponder", () => $3596bae48579386f$export$3351871ee4b288b8);
|
|
15
|
-
$parcel$export(module.exports, "ClearPressResponder", () => $3596bae48579386f$export$cf75428e0b9ed1ea);
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const $3596bae48579386f$export$3351871ee4b288b8 = /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).forwardRef(({ children: children, ...props }, ref)=>{
|
|
30
|
-
let isRegistered = (0, $3maub$react.useRef)(false);
|
|
31
|
-
let prevContext = (0, $3maub$react.useContext)((0, $01d3f539e91688c8$exports.PressResponderContext));
|
|
32
|
-
let context = (0, $3maub$reactariautils.mergeProps)(prevContext || {}, {
|
|
33
|
-
...props,
|
|
34
|
-
register () {
|
|
35
|
-
isRegistered.current = true;
|
|
36
|
-
if (prevContext) prevContext.register();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
context.ref = (0, $3maub$reactariautils.useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
40
|
-
(0, $3maub$reactariautils.useSyncRef)(prevContext, context.ref);
|
|
41
|
-
(0, $3maub$react.useEffect)(()=>{
|
|
42
|
-
if (!isRegistered.current) {
|
|
43
|
-
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
|
|
44
|
-
isRegistered.current = true; // only warn once in strict mode.
|
|
45
|
-
}
|
|
46
|
-
}, []);
|
|
47
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
|
|
48
|
-
value: context
|
|
49
|
-
}, children);
|
|
50
|
-
});
|
|
51
|
-
function $3596bae48579386f$export$cf75428e0b9ed1ea({ children: children }) {
|
|
52
|
-
let context = (0, $3maub$react.useMemo)(()=>({
|
|
53
|
-
register: ()=>{}
|
|
54
|
-
}), []);
|
|
55
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
|
|
56
|
-
value: context
|
|
57
|
-
}, children);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=PressResponder.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAYM,MAAM,0DAEb,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,CAAC,YAAC,QAAQ,EAAE,GAAG,OAA2B,EAAE;IAC3D,IAAI,eAAe,CAAA,GAAA,mBAAK,EAAE;IAC1B,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,+CAAoB;IACjD,IAAI,UAAe,CAAA,GAAA,gCAAS,EAAE,eAAe,CAAC,GAAG;QAC/C,GAAG,KAAK;QACR;YACE,aAAa,OAAO,GAAG;YACvB,IAAI,aACF,YAAY,QAAQ;QAExB;IACF;IAEA,QAAQ,GAAG,GAAG,CAAA,GAAA,kCAAW,EAAE,QAAO,wBAAA,kCAAA,YAAa,GAAG;IAClD,CAAA,GAAA,gCAAS,EAAE,aAAa,QAAQ,GAAG;IAEnC,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,CAAC,aAAa,OAAO,EAAE;YACzB,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC3B,QAAQ,IAAI,CACV;YAIJ,aAAa,OAAO,GAAG,MAAM,iCAAiC;QAChE;IACF,GAAG,EAAE;IAEL,qBACE,0DAAC,CAAA,GAAA,+CAAoB,EAAE,QAAQ;QAAC,OAAO;OACpC;AAGP;AAEO,SAAS,0CAAoB,YAAC,QAAQ,EAAwB;IACnE,IAAI,UAAU,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;YAAC,UAAU,KAAO;QAAC,CAAA,GAAI,EAAE;IACtD,qBACE,0DAAC,CAAA,GAAA,+CAAoB,EAAE,QAAQ;QAAC,OAAO;OACpC;AAGP","sources":["packages/@react-aria/interactions/src/PressResponder.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {mergeProps, useObjectRef, useSyncRef} from '@react-aria/utils';\nimport {PressProps} from './usePress';\nimport {PressResponderContext} from './context';\nimport React, {ForwardedRef, JSX, ReactNode, useContext, useEffect, useMemo, useRef} from 'react';\n\ninterface PressResponderProps extends PressProps {\n children: ReactNode\n}\n\nexport const PressResponder:\n React.ForwardRefExoticComponent<PressResponderProps & React.RefAttributes<FocusableElement>> =\nReact.forwardRef(({children, ...props}: PressResponderProps, ref: ForwardedRef<FocusableElement>) => {\n let isRegistered = useRef(false);\n let prevContext = useContext(PressResponderContext);\n let context: any = mergeProps(prevContext || {}, {\n ...props,\n register() {\n isRegistered.current = true;\n if (prevContext) {\n prevContext.register();\n }\n }\n });\n\n context.ref = useObjectRef(ref || prevContext?.ref);\n useSyncRef(prevContext, context.ref);\n\n useEffect(() => {\n if (!isRegistered.current) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A PressResponder was rendered without a pressable child. ' +\n 'Either call the usePress hook, or wrap your DOM node with <Pressable> component.'\n );\n }\n isRegistered.current = true; // only warn once in strict mode.\n }\n }, []);\n\n return (\n <PressResponderContext.Provider value={context}>\n {children}\n </PressResponderContext.Provider>\n );\n});\n\nexport function ClearPressResponder({children}: {children: ReactNode}): JSX.Element {\n let context = useMemo(() => ({register: () => {}}), []);\n return (\n <PressResponderContext.Provider value={context}>\n {children}\n </PressResponderContext.Provider>\n );\n}\n"],"names":[],"version":3,"file":"PressResponder.main.js.map"}
|
package/dist/PressResponder.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {PressResponderContext as $ae1eeba8b9eafd08$export$5165eccb35aaadb5} from "./context.mjs";
|
|
2
|
-
import {mergeProps as $87RPk$mergeProps, useObjectRef as $87RPk$useObjectRef, useSyncRef as $87RPk$useSyncRef} from "@react-aria/utils";
|
|
3
|
-
import $87RPk$react, {useRef as $87RPk$useRef, useContext as $87RPk$useContext, useEffect as $87RPk$useEffect, useMemo as $87RPk$useMemo} from "react";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
* governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ (0, $87RPk$react).forwardRef(({ children: children, ...props }, ref)=>{
|
|
19
|
-
let isRegistered = (0, $87RPk$useRef)(false);
|
|
20
|
-
let prevContext = (0, $87RPk$useContext)((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
21
|
-
let context = (0, $87RPk$mergeProps)(prevContext || {}, {
|
|
22
|
-
...props,
|
|
23
|
-
register () {
|
|
24
|
-
isRegistered.current = true;
|
|
25
|
-
if (prevContext) prevContext.register();
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
context.ref = (0, $87RPk$useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
29
|
-
(0, $87RPk$useSyncRef)(prevContext, context.ref);
|
|
30
|
-
(0, $87RPk$useEffect)(()=>{
|
|
31
|
-
if (!isRegistered.current) {
|
|
32
|
-
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
|
|
33
|
-
isRegistered.current = true; // only warn once in strict mode.
|
|
34
|
-
}
|
|
35
|
-
}, []);
|
|
36
|
-
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
|
|
37
|
-
value: context
|
|
38
|
-
}, children);
|
|
39
|
-
});
|
|
40
|
-
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children: children }) {
|
|
41
|
-
let context = (0, $87RPk$useMemo)(()=>({
|
|
42
|
-
register: ()=>{}
|
|
43
|
-
}), []);
|
|
44
|
-
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
|
|
45
|
-
value: context
|
|
46
|
-
}, children);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export {$f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder};
|
|
51
|
-
//# sourceMappingURL=PressResponder.module.js.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {PressResponderContext as $ae1eeba8b9eafd08$export$5165eccb35aaadb5} from "./context.module.js";
|
|
2
|
-
import {mergeProps as $87RPk$mergeProps, useObjectRef as $87RPk$useObjectRef, useSyncRef as $87RPk$useSyncRef} from "@react-aria/utils";
|
|
3
|
-
import $87RPk$react, {useRef as $87RPk$useRef, useContext as $87RPk$useContext, useEffect as $87RPk$useEffect, useMemo as $87RPk$useMemo} from "react";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
* governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ (0, $87RPk$react).forwardRef(({ children: children, ...props }, ref)=>{
|
|
19
|
-
let isRegistered = (0, $87RPk$useRef)(false);
|
|
20
|
-
let prevContext = (0, $87RPk$useContext)((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
21
|
-
let context = (0, $87RPk$mergeProps)(prevContext || {}, {
|
|
22
|
-
...props,
|
|
23
|
-
register () {
|
|
24
|
-
isRegistered.current = true;
|
|
25
|
-
if (prevContext) prevContext.register();
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
context.ref = (0, $87RPk$useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
29
|
-
(0, $87RPk$useSyncRef)(prevContext, context.ref);
|
|
30
|
-
(0, $87RPk$useEffect)(()=>{
|
|
31
|
-
if (!isRegistered.current) {
|
|
32
|
-
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
|
|
33
|
-
isRegistered.current = true; // only warn once in strict mode.
|
|
34
|
-
}
|
|
35
|
-
}, []);
|
|
36
|
-
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
|
|
37
|
-
value: context
|
|
38
|
-
}, children);
|
|
39
|
-
});
|
|
40
|
-
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children: children }) {
|
|
41
|
-
let context = (0, $87RPk$useMemo)(()=>({
|
|
42
|
-
register: ()=>{}
|
|
43
|
-
}), []);
|
|
44
|
-
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
|
|
45
|
-
value: context
|
|
46
|
-
}, children);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export {$f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder};
|
|
51
|
-
//# sourceMappingURL=PressResponder.module.js.map
|