power-focusable 4.3.3 → 4.3.4
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 +4 -4
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
hasFocusable,
|
|
22
22
|
inertOutside,
|
|
23
23
|
isFocusable,
|
|
24
|
-
} from 'power-focusable@4.3.
|
|
24
|
+
} from 'power-focusable@4.3.4';
|
|
25
25
|
|
|
26
26
|
// CDNs
|
|
27
|
-
import { ... } 'https://esm.sh/power-focusable@4.3.
|
|
27
|
+
import { ... } 'https://esm.sh/power-focusable@4.3.4';
|
|
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.4/+esm';
|
|
30
30
|
// or
|
|
31
|
-
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.
|
|
31
|
+
import { ... } 'https://esm.unpkg.com/power-focusable@4.3.4';
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## 🪄 Options
|
package/dist/index.cjs
CHANGED
|
@@ -466,6 +466,8 @@ function isUngroupedRadio(element) {
|
|
|
466
466
|
*/
|
|
467
467
|
|
|
468
468
|
exports.createFocusTrap = createFocusTrap;
|
|
469
|
+
exports.focusElement = focusElement;
|
|
470
|
+
exports.getActiveElement = getActiveElement;
|
|
469
471
|
exports.getFocusables = getFocusables;
|
|
470
472
|
exports.getNextFocusable = getNextFocusable;
|
|
471
473
|
exports.getPreviousFocusable = getPreviousFocusable;
|
package/dist/index.d.cts
CHANGED
|
@@ -28,5 +28,7 @@ declare function isFocusable(element: Element, options?: {
|
|
|
28
28
|
skipNegativeTabIndexCheck?: boolean;
|
|
29
29
|
skipVisibilityCheck?: boolean;
|
|
30
30
|
}): boolean;
|
|
31
|
+
declare function focusElement(element: Element): void;
|
|
32
|
+
declare function getActiveElement(): Element | null;
|
|
31
33
|
|
|
32
|
-
export { type PowerFocusableOptions, createFocusTrap, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|
|
34
|
+
export { type PowerFocusableOptions, createFocusTrap, focusElement, getActiveElement, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|
package/dist/index.d.ts
CHANGED
|
@@ -28,5 +28,7 @@ declare function isFocusable(element: Element, options?: {
|
|
|
28
28
|
skipNegativeTabIndexCheck?: boolean;
|
|
29
29
|
skipVisibilityCheck?: boolean;
|
|
30
30
|
}): boolean;
|
|
31
|
+
declare function focusElement(element: Element): void;
|
|
32
|
+
declare function getActiveElement(): Element | null;
|
|
31
33
|
|
|
32
|
-
export { type PowerFocusableOptions, createFocusTrap, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|
|
34
|
+
export { type PowerFocusableOptions, createFocusTrap, focusElement, getActiveElement, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|
package/dist/index.js
CHANGED
|
@@ -463,4 +463,4 @@ function isUngroupedRadio(element) {
|
|
|
463
463
|
* @see {@link https://github.com/y14e/power-focusable}
|
|
464
464
|
*/
|
|
465
465
|
|
|
466
|
-
export { createFocusTrap, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|
|
466
|
+
export { createFocusTrap, focusElement, getActiveElement, getFocusables, getNextFocusable, getPreviousFocusable, hasFocusable, inertOutside, isFocusable };
|