power-focusable 4.3.13 → 4.3.14
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 +18 -18
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -18
- 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.14';
|
|
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.14/+esm';
|
|
30
30
|
// or
|
|
31
|
-
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.
|
|
31
|
+
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.14';
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## 🪄 Options
|
package/dist/index.cjs
CHANGED
|
@@ -323,31 +323,31 @@ function normalizeRadioGroup(elements) {
|
|
|
323
323
|
map = /* @__PURE__ */ new Map();
|
|
324
324
|
}
|
|
325
325
|
const root = element.getRootNode();
|
|
326
|
-
let
|
|
327
|
-
if (!
|
|
328
|
-
|
|
329
|
-
map.set(root,
|
|
326
|
+
let m = map.get(root);
|
|
327
|
+
if (!m) {
|
|
328
|
+
m = /* @__PURE__ */ new Map();
|
|
329
|
+
map.set(root, m);
|
|
330
330
|
}
|
|
331
|
-
let
|
|
332
|
-
if (!
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
let n = m.get(element.form);
|
|
332
|
+
if (!n) {
|
|
333
|
+
n = /* @__PURE__ */ new Map();
|
|
334
|
+
m.set(element.form, n);
|
|
335
335
|
}
|
|
336
|
-
let
|
|
337
|
-
if (!
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
let o = n.get(element.name);
|
|
337
|
+
if (!o) {
|
|
338
|
+
o = [];
|
|
339
|
+
n.set(element.name, o);
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
o[o.length] = element;
|
|
342
342
|
}
|
|
343
343
|
if (!map) {
|
|
344
344
|
return elements;
|
|
345
345
|
}
|
|
346
346
|
const placeholder = /* @__PURE__ */ new Set();
|
|
347
|
-
for (const
|
|
348
|
-
for (const
|
|
349
|
-
for (const
|
|
350
|
-
const radio =
|
|
347
|
+
for (const m of map.values()) {
|
|
348
|
+
for (const n of m.values()) {
|
|
349
|
+
for (const o of n.values()) {
|
|
350
|
+
const radio = o.find((element) => element.checked) ?? o[0];
|
|
351
351
|
radio && placeholder.add(radio);
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -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.14
|
|
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.14
|
|
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.14
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -321,31 +321,31 @@ function normalizeRadioGroup(elements) {
|
|
|
321
321
|
map = /* @__PURE__ */ new Map();
|
|
322
322
|
}
|
|
323
323
|
const root = element.getRootNode();
|
|
324
|
-
let
|
|
325
|
-
if (!
|
|
326
|
-
|
|
327
|
-
map.set(root,
|
|
324
|
+
let m = map.get(root);
|
|
325
|
+
if (!m) {
|
|
326
|
+
m = /* @__PURE__ */ new Map();
|
|
327
|
+
map.set(root, m);
|
|
328
328
|
}
|
|
329
|
-
let
|
|
330
|
-
if (!
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
let n = m.get(element.form);
|
|
330
|
+
if (!n) {
|
|
331
|
+
n = /* @__PURE__ */ new Map();
|
|
332
|
+
m.set(element.form, n);
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
if (!
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
let o = n.get(element.name);
|
|
335
|
+
if (!o) {
|
|
336
|
+
o = [];
|
|
337
|
+
n.set(element.name, o);
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
o[o.length] = element;
|
|
340
340
|
}
|
|
341
341
|
if (!map) {
|
|
342
342
|
return elements;
|
|
343
343
|
}
|
|
344
344
|
const placeholder = /* @__PURE__ */ new Set();
|
|
345
|
-
for (const
|
|
346
|
-
for (const
|
|
347
|
-
for (const
|
|
348
|
-
const radio =
|
|
345
|
+
for (const m of map.values()) {
|
|
346
|
+
for (const n of m.values()) {
|
|
347
|
+
for (const o of n.values()) {
|
|
348
|
+
const radio = o.find((element) => element.checked) ?? o[0];
|
|
349
349
|
radio && placeholder.add(radio);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -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.14
|
|
495
495
|
* @author Yusuke Kamiyamane
|
|
496
496
|
* @license MIT
|
|
497
497
|
* @copyright Copyright (c) Yusuke Kamiyamane
|