power-focusable 4.3.17 → 4.3.18
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/README.md +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
} from 'power-focusable';
|
|
25
25
|
|
|
26
26
|
// CDNs
|
|
27
|
-
import { ... } 'https://esm.sh/power-focusable@4.3.
|
|
27
|
+
import { ... } 'https://esm.sh/power-focusable@4.3.18';
|
|
28
28
|
// or
|
|
29
|
-
import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.
|
|
29
|
+
import { ... } 'https://cdn.jsdelivr.net/npm/power-focusable@4.3.18/+esm';
|
|
30
30
|
// or
|
|
31
|
-
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.
|
|
31
|
+
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.18';
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## 🪄 Options
|
package/dist/index.cjs
CHANGED
|
@@ -270,11 +270,11 @@ function getRelativeFocusable(container, offset, options) {
|
|
|
270
270
|
if (!length) {
|
|
271
271
|
return null;
|
|
272
272
|
}
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
273
|
+
const anchorIndex = candidates.indexOf(anchor);
|
|
274
|
+
if (anchorIndex === -1) {
|
|
275
275
|
return null;
|
|
276
276
|
}
|
|
277
|
-
const offsetIndex =
|
|
277
|
+
const offsetIndex = anchorIndex + offset;
|
|
278
278
|
if ((offsetIndex < 0 || offsetIndex >= length) && !wrap) {
|
|
279
279
|
return null;
|
|
280
280
|
}
|
|
@@ -493,7 +493,7 @@ function isUngroupedRadio(element) {
|
|
|
493
493
|
* High-precision focus management utility with full composed tree support.
|
|
494
494
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
495
495
|
*
|
|
496
|
-
* @version 4.3.
|
|
496
|
+
* @version 4.3.18
|
|
497
497
|
* @author Yusuke Kamiyamane
|
|
498
498
|
* @license MIT
|
|
499
499
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with full composed tree support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
5
5
|
*
|
|
6
|
-
* @version 4.3.
|
|
6
|
+
* @version 4.3.18
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with full composed tree support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
5
5
|
*
|
|
6
|
-
* @version 4.3.
|
|
6
|
+
* @version 4.3.18
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -268,11 +268,11 @@ function getRelativeFocusable(container, offset, options) {
|
|
|
268
268
|
if (!length) {
|
|
269
269
|
return null;
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
271
|
+
const anchorIndex = candidates.indexOf(anchor);
|
|
272
|
+
if (anchorIndex === -1) {
|
|
273
273
|
return null;
|
|
274
274
|
}
|
|
275
|
-
const offsetIndex =
|
|
275
|
+
const offsetIndex = anchorIndex + offset;
|
|
276
276
|
if ((offsetIndex < 0 || offsetIndex >= length) && !wrap) {
|
|
277
277
|
return null;
|
|
278
278
|
}
|
|
@@ -491,7 +491,7 @@ function isUngroupedRadio(element) {
|
|
|
491
491
|
* High-precision focus management utility with full composed tree support.
|
|
492
492
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
493
493
|
*
|
|
494
|
-
* @version 4.3.
|
|
494
|
+
* @version 4.3.18
|
|
495
495
|
* @author Yusuke Kamiyamane
|
|
496
496
|
* @license MIT
|
|
497
497
|
* @copyright Copyright (c) Yusuke Kamiyamane
|