@react-aria/focus 3.21.4 → 3.22.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 +16 -8
- package/dist/main.js +32 -24
- package/dist/main.js.map +1 -1
- package/dist/module.js +16 -8
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +16 -0
- package/package.json +14 -14
- package/src/index.ts +16 -13
- package/dist/FocusRing.main.js +0 -44
- package/dist/FocusRing.main.js.map +0 -1
- package/dist/FocusRing.mjs +0 -35
- package/dist/FocusRing.module.js +0 -35
- package/dist/FocusRing.module.js.map +0 -1
- package/dist/FocusScope.main.js +0 -759
- package/dist/FocusScope.main.js.map +0 -1
- package/dist/FocusScope.mjs +0 -746
- package/dist/FocusScope.module.js +0 -746
- package/dist/FocusScope.module.js.map +0 -1
- package/dist/types.d.ts +0 -133
- package/dist/types.d.ts.map +0 -1
- package/dist/useFocusRing.main.js +0 -55
- package/dist/useFocusRing.main.js.map +0 -1
- package/dist/useFocusRing.mjs +0 -50
- package/dist/useFocusRing.module.js +0 -50
- package/dist/useFocusRing.module.js.map +0 -1
- package/dist/useHasTabbableChild.main.js +0 -62
- package/dist/useHasTabbableChild.main.js.map +0 -1
- package/dist/useHasTabbableChild.mjs +0 -57
- package/dist/useHasTabbableChild.module.js +0 -57
- package/dist/useHasTabbableChild.module.js.map +0 -1
- package/dist/virtualFocus.main.js +0 -46
- package/dist/virtualFocus.main.js.map +0 -1
- package/dist/virtualFocus.mjs +0 -38
- package/dist/virtualFocus.module.js +0 -38
- package/dist/virtualFocus.module.js.map +0 -1
- package/src/FocusRing.tsx +0 -55
- package/src/FocusScope.tsx +0 -1024
- package/src/useFocusRing.ts +0 -79
- package/src/useHasTabbableChild.ts +0 -66
- package/src/virtualFocus.ts +0 -33
package/dist/import.mjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import {FocusScope as $32daac5f69beb98a$re_export$FocusScope, useFocusManager as $32daac5f69beb98a$re_export$useFocusManager} from "react-aria/FocusScope";
|
|
2
|
+
import {getFocusableTreeWalker as $32daac5f69beb98a$re_export$getFocusableTreeWalker, createFocusManager as $32daac5f69beb98a$re_export$createFocusManager, isElementInChildOfActiveScope as $32daac5f69beb98a$re_export$isElementInChildOfActiveScope} from "react-aria/private/focus/FocusScope";
|
|
3
|
+
import {FocusRing as $32daac5f69beb98a$re_export$FocusRing} from "react-aria/FocusRing";
|
|
4
|
+
import {useFocusRing as $32daac5f69beb98a$re_export$useFocusRing} from "react-aria/useFocusRing";
|
|
5
|
+
import {useHasTabbableChild as $32daac5f69beb98a$re_export$useHasTabbableChild} from "react-aria/private/focus/useHasTabbableChild";
|
|
6
|
+
import {moveVirtualFocus as $32daac5f69beb98a$re_export$moveVirtualFocus, dispatchVirtualBlur as $32daac5f69beb98a$re_export$dispatchVirtualBlur, dispatchVirtualFocus as $32daac5f69beb98a$re_export$dispatchVirtualFocus, getVirtuallyFocusedElement as $32daac5f69beb98a$re_export$getVirtuallyFocusedElement} from "react-aria/private/focus/virtualFocus";
|
|
7
|
+
import {isFocusable as $32daac5f69beb98a$re_export$isFocusable} from "react-aria/private/utils/isFocusable";
|
|
8
|
+
import {FocusableProvider as $32daac5f69beb98a$re_export$FocusableProvider} from "react-aria/private/interactions/useFocusable";
|
|
9
|
+
import {useFocusable as $32daac5f69beb98a$re_export$useFocusable} from "react-aria/useFocusable";
|
|
10
|
+
import {Focusable as $32daac5f69beb98a$re_export$Focusable} from "react-aria/Focusable";
|
|
11
|
+
import {focusSafely as $32daac5f69beb98a$re_export$focusSafely} from "react-aria/private/interactions/focusSafely";
|
|
8
12
|
|
|
9
13
|
/*
|
|
10
14
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -25,5 +29,9 @@ import {FocusableProvider as $d48f97c9d1a8e323$re_export$FocusableProvider, Focu
|
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export {$32daac5f69beb98a$re_export$FocusScope as FocusScope, $32daac5f69beb98a$re_export$useFocusManager as useFocusManager, $32daac5f69beb98a$re_export$getFocusableTreeWalker as getFocusableTreeWalker, $32daac5f69beb98a$re_export$createFocusManager as createFocusManager, $32daac5f69beb98a$re_export$isElementInChildOfActiveScope as isElementInChildOfActiveScope, $32daac5f69beb98a$re_export$FocusRing as FocusRing, $32daac5f69beb98a$re_export$useFocusRing as useFocusRing, $32daac5f69beb98a$re_export$useHasTabbableChild as useHasTabbableChild, $32daac5f69beb98a$re_export$moveVirtualFocus as moveVirtualFocus, $32daac5f69beb98a$re_export$dispatchVirtualBlur as dispatchVirtualBlur, $32daac5f69beb98a$re_export$dispatchVirtualFocus as dispatchVirtualFocus, $32daac5f69beb98a$re_export$getVirtuallyFocusedElement as getVirtuallyFocusedElement, $32daac5f69beb98a$re_export$isFocusable as isFocusable, $32daac5f69beb98a$re_export$FocusableProvider as FocusableProvider, $32daac5f69beb98a$re_export$useFocusable as useFocusable, $32daac5f69beb98a$re_export$Focusable as Focusable, $32daac5f69beb98a$re_export$focusSafely as focusSafely};
|
|
29
37
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
1
|
+
var $l7E0u$reactariaFocusScope = require("react-aria/FocusScope");
|
|
2
|
+
var $l7E0u$reactariaprivatefocusFocusScope = require("react-aria/private/focus/FocusScope");
|
|
3
|
+
var $l7E0u$reactariaFocusRing = require("react-aria/FocusRing");
|
|
4
|
+
var $l7E0u$reactariauseFocusRing = require("react-aria/useFocusRing");
|
|
5
|
+
var $l7E0u$reactariaprivatefocususeHasTabbableChild = require("react-aria/private/focus/useHasTabbableChild");
|
|
6
|
+
var $l7E0u$reactariaprivatefocusvirtualFocus = require("react-aria/private/focus/virtualFocus");
|
|
7
|
+
var $l7E0u$reactariaprivateutilsisFocusable = require("react-aria/private/utils/isFocusable");
|
|
8
|
+
var $l7E0u$reactariaprivateinteractionsuseFocusable = require("react-aria/private/interactions/useFocusable");
|
|
9
|
+
var $l7E0u$reactariauseFocusable = require("react-aria/useFocusable");
|
|
10
|
+
var $l7E0u$reactariaFocusable = require("react-aria/Focusable");
|
|
11
|
+
var $l7E0u$reactariaprivateinteractionsfocusSafely = require("react-aria/private/interactions/focusSafely");
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
function $parcel$export(e, n, v, s) {
|
|
11
15
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
$parcel$export(module.exports, "FocusScope", ()
|
|
15
|
-
$parcel$export(module.exports, "useFocusManager", ()
|
|
16
|
-
$parcel$export(module.exports, "getFocusableTreeWalker", ()
|
|
17
|
-
$parcel$export(module.exports, "createFocusManager", ()
|
|
18
|
-
$parcel$export(module.exports, "isElementInChildOfActiveScope", ()
|
|
19
|
-
$parcel$export(module.exports, "FocusRing", ()
|
|
20
|
-
$parcel$export(module.exports, "useFocusRing", ()
|
|
21
|
-
$parcel$export(module.exports, "useHasTabbableChild", ()
|
|
22
|
-
$parcel$export(module.exports, "moveVirtualFocus", ()
|
|
23
|
-
$parcel$export(module.exports, "dispatchVirtualBlur", ()
|
|
24
|
-
$parcel$export(module.exports, "dispatchVirtualFocus", ()
|
|
25
|
-
$parcel$export(module.exports, "getVirtuallyFocusedElement", ()
|
|
26
|
-
$parcel$export(module.exports, "isFocusable", ()
|
|
27
|
-
$parcel$export(module.exports, "FocusableProvider", ()
|
|
28
|
-
$parcel$export(module.exports, "
|
|
29
|
-
$parcel$export(module.exports, "
|
|
30
|
-
$parcel$export(module.exports, "focusSafely", ()
|
|
18
|
+
$parcel$export(module.exports, "FocusScope", function () { return $l7E0u$reactariaFocusScope.FocusScope; });
|
|
19
|
+
$parcel$export(module.exports, "useFocusManager", function () { return $l7E0u$reactariaFocusScope.useFocusManager; });
|
|
20
|
+
$parcel$export(module.exports, "getFocusableTreeWalker", function () { return $l7E0u$reactariaprivatefocusFocusScope.getFocusableTreeWalker; });
|
|
21
|
+
$parcel$export(module.exports, "createFocusManager", function () { return $l7E0u$reactariaprivatefocusFocusScope.createFocusManager; });
|
|
22
|
+
$parcel$export(module.exports, "isElementInChildOfActiveScope", function () { return $l7E0u$reactariaprivatefocusFocusScope.isElementInChildOfActiveScope; });
|
|
23
|
+
$parcel$export(module.exports, "FocusRing", function () { return $l7E0u$reactariaFocusRing.FocusRing; });
|
|
24
|
+
$parcel$export(module.exports, "useFocusRing", function () { return $l7E0u$reactariauseFocusRing.useFocusRing; });
|
|
25
|
+
$parcel$export(module.exports, "useHasTabbableChild", function () { return $l7E0u$reactariaprivatefocususeHasTabbableChild.useHasTabbableChild; });
|
|
26
|
+
$parcel$export(module.exports, "moveVirtualFocus", function () { return $l7E0u$reactariaprivatefocusvirtualFocus.moveVirtualFocus; });
|
|
27
|
+
$parcel$export(module.exports, "dispatchVirtualBlur", function () { return $l7E0u$reactariaprivatefocusvirtualFocus.dispatchVirtualBlur; });
|
|
28
|
+
$parcel$export(module.exports, "dispatchVirtualFocus", function () { return $l7E0u$reactariaprivatefocusvirtualFocus.dispatchVirtualFocus; });
|
|
29
|
+
$parcel$export(module.exports, "getVirtuallyFocusedElement", function () { return $l7E0u$reactariaprivatefocusvirtualFocus.getVirtuallyFocusedElement; });
|
|
30
|
+
$parcel$export(module.exports, "isFocusable", function () { return $l7E0u$reactariaprivateutilsisFocusable.isFocusable; });
|
|
31
|
+
$parcel$export(module.exports, "FocusableProvider", function () { return $l7E0u$reactariaprivateinteractionsuseFocusable.FocusableProvider; });
|
|
32
|
+
$parcel$export(module.exports, "useFocusable", function () { return $l7E0u$reactariauseFocusable.useFocusable; });
|
|
33
|
+
$parcel$export(module.exports, "Focusable", function () { return $l7E0u$reactariaFocusable.Focusable; });
|
|
34
|
+
$parcel$export(module.exports, "focusSafely", function () { return $l7E0u$reactariaprivateinteractionsfocusSafely.focusSafely; });
|
|
31
35
|
/*
|
|
32
36
|
* Copyright 2020 Adobe. All rights reserved.
|
|
33
37
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -47,4 +51,8 @@ $parcel$export(module.exports, "focusSafely", () => $aB6Cp$reactariainteractions
|
|
|
47
51
|
|
|
48
52
|
|
|
49
53
|
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
50
58
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/focus/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 {FocusScope, useFocusManager} from 'react-aria/FocusScope';\nexport {getFocusableTreeWalker, createFocusManager, isElementInChildOfActiveScope} from 'react-aria/private/focus/FocusScope';\nexport {FocusRing} from 'react-aria/FocusRing';\nexport {useFocusRing} from 'react-aria/useFocusRing';\nexport {useHasTabbableChild} from 'react-aria/private/focus/useHasTabbableChild';\nexport {moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement} from 'react-aria/private/focus/virtualFocus';\nexport type {FocusScopeProps, FocusManager, FocusManagerOptions} from 'react-aria/FocusScope';\nexport type {FocusRingProps} from 'react-aria/FocusRing';\nexport type {AriaFocusRingProps, FocusRingAria} from 'react-aria/useFocusRing';\nexport {isFocusable} from 'react-aria/private/utils/isFocusable';\nexport {FocusableProvider} 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 {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';\nexport type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import {FocusScope as $32daac5f69beb98a$re_export$FocusScope, useFocusManager as $32daac5f69beb98a$re_export$useFocusManager} from "react-aria/FocusScope";
|
|
2
|
+
import {getFocusableTreeWalker as $32daac5f69beb98a$re_export$getFocusableTreeWalker, createFocusManager as $32daac5f69beb98a$re_export$createFocusManager, isElementInChildOfActiveScope as $32daac5f69beb98a$re_export$isElementInChildOfActiveScope} from "react-aria/private/focus/FocusScope";
|
|
3
|
+
import {FocusRing as $32daac5f69beb98a$re_export$FocusRing} from "react-aria/FocusRing";
|
|
4
|
+
import {useFocusRing as $32daac5f69beb98a$re_export$useFocusRing} from "react-aria/useFocusRing";
|
|
5
|
+
import {useHasTabbableChild as $32daac5f69beb98a$re_export$useHasTabbableChild} from "react-aria/private/focus/useHasTabbableChild";
|
|
6
|
+
import {moveVirtualFocus as $32daac5f69beb98a$re_export$moveVirtualFocus, dispatchVirtualBlur as $32daac5f69beb98a$re_export$dispatchVirtualBlur, dispatchVirtualFocus as $32daac5f69beb98a$re_export$dispatchVirtualFocus, getVirtuallyFocusedElement as $32daac5f69beb98a$re_export$getVirtuallyFocusedElement} from "react-aria/private/focus/virtualFocus";
|
|
7
|
+
import {isFocusable as $32daac5f69beb98a$re_export$isFocusable} from "react-aria/private/utils/isFocusable";
|
|
8
|
+
import {FocusableProvider as $32daac5f69beb98a$re_export$FocusableProvider} from "react-aria/private/interactions/useFocusable";
|
|
9
|
+
import {useFocusable as $32daac5f69beb98a$re_export$useFocusable} from "react-aria/useFocusable";
|
|
10
|
+
import {Focusable as $32daac5f69beb98a$re_export$Focusable} from "react-aria/Focusable";
|
|
11
|
+
import {focusSafely as $32daac5f69beb98a$re_export$focusSafely} from "react-aria/private/interactions/focusSafely";
|
|
8
12
|
|
|
9
13
|
/*
|
|
10
14
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -25,5 +29,9 @@ import {FocusableProvider as $d48f97c9d1a8e323$re_export$FocusableProvider, Focu
|
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export {$32daac5f69beb98a$re_export$FocusScope as FocusScope, $32daac5f69beb98a$re_export$useFocusManager as useFocusManager, $32daac5f69beb98a$re_export$getFocusableTreeWalker as getFocusableTreeWalker, $32daac5f69beb98a$re_export$createFocusManager as createFocusManager, $32daac5f69beb98a$re_export$isElementInChildOfActiveScope as isElementInChildOfActiveScope, $32daac5f69beb98a$re_export$FocusRing as FocusRing, $32daac5f69beb98a$re_export$useFocusRing as useFocusRing, $32daac5f69beb98a$re_export$useHasTabbableChild as useHasTabbableChild, $32daac5f69beb98a$re_export$moveVirtualFocus as moveVirtualFocus, $32daac5f69beb98a$re_export$dispatchVirtualBlur as dispatchVirtualBlur, $32daac5f69beb98a$re_export$dispatchVirtualFocus as dispatchVirtualFocus, $32daac5f69beb98a$re_export$getVirtuallyFocusedElement as getVirtuallyFocusedElement, $32daac5f69beb98a$re_export$isFocusable as isFocusable, $32daac5f69beb98a$re_export$FocusableProvider as FocusableProvider, $32daac5f69beb98a$re_export$useFocusable as useFocusable, $32daac5f69beb98a$re_export$Focusable as Focusable, $32daac5f69beb98a$re_export$focusSafely as focusSafely};
|
|
29
37
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/focus/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 {FocusScope, useFocusManager} from 'react-aria/FocusScope';\nexport {getFocusableTreeWalker, createFocusManager, isElementInChildOfActiveScope} from 'react-aria/private/focus/FocusScope';\nexport {FocusRing} from 'react-aria/FocusRing';\nexport {useFocusRing} from 'react-aria/useFocusRing';\nexport {useHasTabbableChild} from 'react-aria/private/focus/useHasTabbableChild';\nexport {moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement} from 'react-aria/private/focus/virtualFocus';\nexport type {FocusScopeProps, FocusManager, FocusManagerOptions} from 'react-aria/FocusScope';\nexport type {FocusRingProps} from 'react-aria/FocusRing';\nexport type {AriaFocusRingProps, FocusRingAria} from 'react-aria/useFocusRing';\nexport {isFocusable} from 'react-aria/private/utils/isFocusable';\nexport {FocusableProvider} 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 {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';\nexport type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { FocusScope, useFocusManager } from 'react-aria/FocusScope';
|
|
2
|
+
export { getFocusableTreeWalker, createFocusManager, isElementInChildOfActiveScope } from 'react-aria/private/focus/FocusScope';
|
|
3
|
+
export { FocusRing } from 'react-aria/FocusRing';
|
|
4
|
+
export { useFocusRing } from 'react-aria/useFocusRing';
|
|
5
|
+
export { useHasTabbableChild } from 'react-aria/private/focus/useHasTabbableChild';
|
|
6
|
+
export { moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement } from 'react-aria/private/focus/virtualFocus';
|
|
7
|
+
export type { FocusScopeProps, FocusManager, FocusManagerOptions } from 'react-aria/FocusScope';
|
|
8
|
+
export type { FocusRingProps } from 'react-aria/FocusRing';
|
|
9
|
+
export type { AriaFocusRingProps, FocusRingAria } from 'react-aria/useFocusRing';
|
|
10
|
+
export { isFocusable } from 'react-aria/private/utils/isFocusable';
|
|
11
|
+
export { FocusableProvider } from 'react-aria/private/interactions/useFocusable';
|
|
12
|
+
export { useFocusable } from 'react-aria/useFocusable';
|
|
13
|
+
export { Focusable } from 'react-aria/Focusable';
|
|
14
|
+
export { focusSafely } from 'react-aria/private/interactions/focusSafely';
|
|
15
|
+
export type { FocusableProviderProps } from 'react-aria/private/interactions/useFocusable';
|
|
16
|
+
export type { FocusableAria, FocusableOptions } from 'react-aria/useFocusable';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/focus",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.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,8 @@
|
|
|
26
26
|
"url": "https://github.com/adobe/react-spectrum"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-aria/interactions": "^3.27.0",
|
|
30
|
-
"@react-aria/utils": "^3.33.0",
|
|
31
|
-
"@react-types/shared": "^3.33.0",
|
|
32
29
|
"@swc/helpers": "^0.5.0",
|
|
33
|
-
"
|
|
30
|
+
"react-aria": "3.48.0"
|
|
34
31
|
},
|
|
35
32
|
"peerDependencies": {
|
|
36
33
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
@@ -39,5 +36,8 @@
|
|
|
39
36
|
"publishConfig": {
|
|
40
37
|
"access": "public"
|
|
41
38
|
},
|
|
42
|
-
"
|
|
39
|
+
"targets": {
|
|
40
|
+
"types": false
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
43
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,16 +10,19 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export {FocusScope, useFocusManager
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
13
|
+
export {FocusScope, useFocusManager} from 'react-aria/FocusScope';
|
|
14
|
+
export {getFocusableTreeWalker, createFocusManager, isElementInChildOfActiveScope} from 'react-aria/private/focus/FocusScope';
|
|
15
|
+
export {FocusRing} from 'react-aria/FocusRing';
|
|
16
|
+
export {useFocusRing} from 'react-aria/useFocusRing';
|
|
17
|
+
export {useHasTabbableChild} from 'react-aria/private/focus/useHasTabbableChild';
|
|
18
|
+
export {moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement} from 'react-aria/private/focus/virtualFocus';
|
|
19
|
+
export type {FocusScopeProps, FocusManager, FocusManagerOptions} from 'react-aria/FocusScope';
|
|
20
|
+
export type {FocusRingProps} from 'react-aria/FocusRing';
|
|
21
|
+
export type {AriaFocusRingProps, FocusRingAria} from 'react-aria/useFocusRing';
|
|
22
|
+
export {isFocusable} from 'react-aria/private/utils/isFocusable';
|
|
23
|
+
export {FocusableProvider} from 'react-aria/private/interactions/useFocusable';
|
|
24
|
+
export {useFocusable} from 'react-aria/useFocusable';
|
|
25
|
+
export {Focusable} from 'react-aria/Focusable';
|
|
26
|
+
export {focusSafely} from 'react-aria/private/interactions/focusSafely';
|
|
27
|
+
export type {FocusableProviderProps} from 'react-aria/private/interactions/useFocusable';
|
|
28
|
+
export type {FocusableAria, FocusableOptions} from 'react-aria/useFocusable';
|
package/dist/FocusRing.main.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var $581a96d6eb128c1b$exports = require("./useFocusRing.main.js");
|
|
2
|
-
var $hE1Ku$clsx = require("clsx");
|
|
3
|
-
var $hE1Ku$reactariautils = require("@react-aria/utils");
|
|
4
|
-
var $hE1Ku$react = require("react");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function $parcel$interopDefault(a) {
|
|
8
|
-
return a && a.__esModule ? a.default : a;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function $parcel$export(e, n, v, s) {
|
|
12
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
$parcel$export(module.exports, "FocusRing", () => $dfd8c70b928eb1b3$export$1a38b4ad7f578e1d);
|
|
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
|
-
|
|
30
|
-
function $dfd8c70b928eb1b3$export$1a38b4ad7f578e1d(props) {
|
|
31
|
-
let { children: children, focusClass: focusClass, focusRingClass: focusRingClass } = props;
|
|
32
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $581a96d6eb128c1b$exports.useFocusRing)(props);
|
|
33
|
-
let child = (0, ($parcel$interopDefault($hE1Ku$react))).Children.only(children);
|
|
34
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($hE1Ku$react))).cloneElement(child, (0, $hE1Ku$reactariautils.mergeProps)(child.props, {
|
|
35
|
-
...focusProps,
|
|
36
|
-
className: (0, ($parcel$interopDefault($hE1Ku$clsx)))({
|
|
37
|
-
[focusClass || '']: isFocused,
|
|
38
|
-
[focusRingClass || '']: isFocusVisible
|
|
39
|
-
})
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=FocusRing.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAgCM,SAAS,0CAAU,KAAqB;IAC7C,IAAI,YAAC,QAAQ,cAAE,UAAU,kBAAE,cAAc,EAAC,GAAG;IAC7C,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,sCAAW,EAAE;IAC3D,IAAI,QAAQ,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEhC,qBAAO,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,OAAO,CAAA,GAAA,gCAAS,EAAE,MAAM,KAAK,EAAS;QAC9D,GAAG,UAAU;QACb,WAAW,CAAA,GAAA,qCAAG,EAAE;YACd,CAAC,cAAc,GAAG,EAAE;YACpB,CAAC,kBAAkB,GAAG,EAAE;QAC1B;IACF;AACF","sources":["packages/@react-aria/focus/src/FocusRing.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 clsx from 'clsx';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useFocusRing} from './useFocusRing';\n\nexport interface FocusRingProps {\n /** Child element to apply CSS classes to. */\n children: ReactElement,\n /** CSS class to apply when the element is focused. */\n focusClass?: string,\n /** CSS class to apply when the element has keyboard focus. */\n focusRingClass?: string,\n /**\n * Whether to show the focus ring when something\n * inside the container element has focus (true), or\n * only if the container itself has focus (false).\n * @default false\n */\n within?: boolean,\n /** Whether the element is a text input. */\n isTextInput?: boolean,\n /** Whether the element will be auto focused. */\n autoFocus?: boolean\n}\n\n/**\n * A utility component that applies a CSS class when an element has keyboard focus.\n * Focus rings are visible only when the user is interacting with a keyboard,\n * not with a mouse, touch, or other input methods.\n */\nexport function FocusRing(props: FocusRingProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> {\n let {children, focusClass, focusRingClass} = props;\n let {isFocused, isFocusVisible, focusProps} = useFocusRing(props);\n let child = React.Children.only(children);\n\n return React.cloneElement(child, mergeProps(child.props as any, {\n ...focusProps,\n className: clsx({\n [focusClass || '']: isFocused,\n [focusRingClass || '']: isFocusVisible\n })\n }));\n}\n"],"names":[],"version":3,"file":"FocusRing.main.js.map"}
|
package/dist/FocusRing.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {useFocusRing as $f7dceffc5ad7768b$export$4e328f61c538687f} from "./useFocusRing.mjs";
|
|
2
|
-
import $hAmeg$clsx from "clsx";
|
|
3
|
-
import {mergeProps as $hAmeg$mergeProps} from "@react-aria/utils";
|
|
4
|
-
import $hAmeg$react from "react";
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
8
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
* governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function $907718708eab68af$export$1a38b4ad7f578e1d(props) {
|
|
21
|
-
let { children: children, focusClass: focusClass, focusRingClass: focusRingClass } = props;
|
|
22
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
23
|
-
let child = (0, $hAmeg$react).Children.only(children);
|
|
24
|
-
return /*#__PURE__*/ (0, $hAmeg$react).cloneElement(child, (0, $hAmeg$mergeProps)(child.props, {
|
|
25
|
-
...focusProps,
|
|
26
|
-
className: (0, $hAmeg$clsx)({
|
|
27
|
-
[focusClass || '']: isFocused,
|
|
28
|
-
[focusRingClass || '']: isFocusVisible
|
|
29
|
-
})
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export {$907718708eab68af$export$1a38b4ad7f578e1d as FocusRing};
|
|
35
|
-
//# sourceMappingURL=FocusRing.module.js.map
|
package/dist/FocusRing.module.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {useFocusRing as $f7dceffc5ad7768b$export$4e328f61c538687f} from "./useFocusRing.module.js";
|
|
2
|
-
import $hAmeg$clsx from "clsx";
|
|
3
|
-
import {mergeProps as $hAmeg$mergeProps} from "@react-aria/utils";
|
|
4
|
-
import $hAmeg$react from "react";
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
8
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
* governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function $907718708eab68af$export$1a38b4ad7f578e1d(props) {
|
|
21
|
-
let { children: children, focusClass: focusClass, focusRingClass: focusRingClass } = props;
|
|
22
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
23
|
-
let child = (0, $hAmeg$react).Children.only(children);
|
|
24
|
-
return /*#__PURE__*/ (0, $hAmeg$react).cloneElement(child, (0, $hAmeg$mergeProps)(child.props, {
|
|
25
|
-
...focusProps,
|
|
26
|
-
className: (0, $hAmeg$clsx)({
|
|
27
|
-
[focusClass || '']: isFocused,
|
|
28
|
-
[focusRingClass || '']: isFocusVisible
|
|
29
|
-
})
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export {$907718708eab68af$export$1a38b4ad7f578e1d as FocusRing};
|
|
35
|
-
//# sourceMappingURL=FocusRing.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAgCM,SAAS,0CAAU,KAAqB;IAC7C,IAAI,YAAC,QAAQ,cAAE,UAAU,kBAAE,cAAc,EAAC,GAAG;IAC7C,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE;IAC3D,IAAI,QAAQ,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IAEhC,qBAAO,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,OAAO,CAAA,GAAA,iBAAS,EAAE,MAAM,KAAK,EAAS;QAC9D,GAAG,UAAU;QACb,WAAW,CAAA,GAAA,WAAG,EAAE;YACd,CAAC,cAAc,GAAG,EAAE;YACpB,CAAC,kBAAkB,GAAG,EAAE;QAC1B;IACF;AACF","sources":["packages/@react-aria/focus/src/FocusRing.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 clsx from 'clsx';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement} from 'react';\nimport {useFocusRing} from './useFocusRing';\n\nexport interface FocusRingProps {\n /** Child element to apply CSS classes to. */\n children: ReactElement,\n /** CSS class to apply when the element is focused. */\n focusClass?: string,\n /** CSS class to apply when the element has keyboard focus. */\n focusRingClass?: string,\n /**\n * Whether to show the focus ring when something\n * inside the container element has focus (true), or\n * only if the container itself has focus (false).\n * @default false\n */\n within?: boolean,\n /** Whether the element is a text input. */\n isTextInput?: boolean,\n /** Whether the element will be auto focused. */\n autoFocus?: boolean\n}\n\n/**\n * A utility component that applies a CSS class when an element has keyboard focus.\n * Focus rings are visible only when the user is interacting with a keyboard,\n * not with a mouse, touch, or other input methods.\n */\nexport function FocusRing(props: FocusRingProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> {\n let {children, focusClass, focusRingClass} = props;\n let {isFocused, isFocusVisible, focusProps} = useFocusRing(props);\n let child = React.Children.only(children);\n\n return React.cloneElement(child, mergeProps(child.props as any, {\n ...focusProps,\n className: clsx({\n [focusClass || '']: isFocused,\n [focusRingClass || '']: isFocusVisible\n })\n }));\n}\n"],"names":[],"version":3,"file":"FocusRing.module.js.map"}
|