power-focusable 2.0.1 → 2.0.2
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/index.cjs +5 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -74,13 +74,11 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
74
74
|
return elements2;
|
|
75
75
|
}
|
|
76
76
|
const placeholder = /* @__PURE__ */ new Set();
|
|
77
|
-
for (const
|
|
78
|
-
if (
|
|
79
|
-
const enabled =
|
|
77
|
+
for (const radios of map.values()) {
|
|
78
|
+
if (radios.length > 0) {
|
|
79
|
+
const enabled = radios.filter((radio) => isFocusable(radio));
|
|
80
80
|
if (enabled.length > 0) {
|
|
81
|
-
placeholder.add(
|
|
82
|
-
enabled.find((radio) => radio.checked) ?? enabled[0]
|
|
83
|
-
);
|
|
81
|
+
placeholder.add(enabled.find((radio) => radio.checked) ?? enabled[0]);
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
}
|
|
@@ -192,7 +190,7 @@ function getRelativeFocusable(container, offset = 0, options) {
|
|
|
192
190
|
* High-precision focus management utility with shadow DOM support.
|
|
193
191
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
194
192
|
*
|
|
195
|
-
* @version 2.0.
|
|
193
|
+
* @version 2.0.2
|
|
196
194
|
* @author Yusuke Kamiyamane
|
|
197
195
|
* @license MIT
|
|
198
196
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with shadow DOM support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
5
5
|
*
|
|
6
|
-
* @version 2.0.
|
|
6
|
+
* @version 2.0.2
|
|
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 shadow DOM support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
5
5
|
*
|
|
6
|
-
* @version 2.0.
|
|
6
|
+
* @version 2.0.2
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -72,13 +72,11 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
72
72
|
return elements2;
|
|
73
73
|
}
|
|
74
74
|
const placeholder = /* @__PURE__ */ new Set();
|
|
75
|
-
for (const
|
|
76
|
-
if (
|
|
77
|
-
const enabled =
|
|
75
|
+
for (const radios of map.values()) {
|
|
76
|
+
if (radios.length > 0) {
|
|
77
|
+
const enabled = radios.filter((radio) => isFocusable(radio));
|
|
78
78
|
if (enabled.length > 0) {
|
|
79
|
-
placeholder.add(
|
|
80
|
-
enabled.find((radio) => radio.checked) ?? enabled[0]
|
|
81
|
-
);
|
|
79
|
+
placeholder.add(enabled.find((radio) => radio.checked) ?? enabled[0]);
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
}
|
|
@@ -190,7 +188,7 @@ function getRelativeFocusable(container, offset = 0, options) {
|
|
|
190
188
|
* High-precision focus management utility with shadow DOM support.
|
|
191
189
|
* Handles complex focus rules including tabindex ordering, radio groups, etc.
|
|
192
190
|
*
|
|
193
|
-
* @version 2.0.
|
|
191
|
+
* @version 2.0.2
|
|
194
192
|
* @author Yusuke Kamiyamane
|
|
195
193
|
* @license MIT
|
|
196
194
|
* @copyright Copyright (c) Yusuke Kamiyamane
|