power-focusable 3.0.1 → 3.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 +14 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -201,7 +201,7 @@ function isDisabledDeep(element) {
|
|
|
201
201
|
if (current === element && isFormControl(current) && isDisabled(current)) {
|
|
202
202
|
return true;
|
|
203
203
|
}
|
|
204
|
-
if (current
|
|
204
|
+
if (isInert(current)) {
|
|
205
205
|
return true;
|
|
206
206
|
}
|
|
207
207
|
if (isFormControl(element) && current.tagName === "FIELDSET" && isDisabled(current)) {
|
|
@@ -308,9 +308,18 @@ function getComposedParent(node) {
|
|
|
308
308
|
}
|
|
309
309
|
function getComposedSiblings(node) {
|
|
310
310
|
if (node.assignedSlot) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
)
|
|
311
|
+
const siblings = node.assignedSlot.children;
|
|
312
|
+
const filtered = [];
|
|
313
|
+
for (let i = 0, l = siblings.length; i < l; i++) {
|
|
314
|
+
const sibling = siblings[i];
|
|
315
|
+
if (sibling !== node) {
|
|
316
|
+
if (!(sibling instanceof Element)) {
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
filtered[filtered.length] = sibling;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return filtered;
|
|
314
323
|
}
|
|
315
324
|
const parent = getComposedParent(node);
|
|
316
325
|
if (!parent) {
|
|
@@ -403,7 +412,7 @@ function setInert(element, boolean) {
|
|
|
403
412
|
* Handles complex focus rules including tabindex ordering, radio groups, inert,
|
|
404
413
|
* and shadow DOM.
|
|
405
414
|
*
|
|
406
|
-
* @version 3.0.
|
|
415
|
+
* @version 3.0.2
|
|
407
416
|
* @author Yusuke Kamiyamane
|
|
408
417
|
* @license MIT
|
|
409
418
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -199,7 +199,7 @@ function isDisabledDeep(element) {
|
|
|
199
199
|
if (current === element && isFormControl(current) && isDisabled(current)) {
|
|
200
200
|
return true;
|
|
201
201
|
}
|
|
202
|
-
if (current
|
|
202
|
+
if (isInert(current)) {
|
|
203
203
|
return true;
|
|
204
204
|
}
|
|
205
205
|
if (isFormControl(element) && current.tagName === "FIELDSET" && isDisabled(current)) {
|
|
@@ -306,9 +306,18 @@ function getComposedParent(node) {
|
|
|
306
306
|
}
|
|
307
307
|
function getComposedSiblings(node) {
|
|
308
308
|
if (node.assignedSlot) {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
)
|
|
309
|
+
const siblings = node.assignedSlot.children;
|
|
310
|
+
const filtered = [];
|
|
311
|
+
for (let i = 0, l = siblings.length; i < l; i++) {
|
|
312
|
+
const sibling = siblings[i];
|
|
313
|
+
if (sibling !== node) {
|
|
314
|
+
if (!(sibling instanceof Element)) {
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
filtered[filtered.length] = sibling;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return filtered;
|
|
312
321
|
}
|
|
313
322
|
const parent = getComposedParent(node);
|
|
314
323
|
if (!parent) {
|
|
@@ -401,7 +410,7 @@ function setInert(element, boolean) {
|
|
|
401
410
|
* Handles complex focus rules including tabindex ordering, radio groups, inert,
|
|
402
411
|
* and shadow DOM.
|
|
403
412
|
*
|
|
404
|
-
* @version 3.0.
|
|
413
|
+
* @version 3.0.2
|
|
405
414
|
* @author Yusuke Kamiyamane
|
|
406
415
|
* @license MIT
|
|
407
416
|
* @copyright Copyright (c) Yusuke Kamiyamane
|