@y14e/portal 1.2.29 → 1.2.30
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.bundle.cjs +2 -2
- package/dist/index.bundle.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm i @y14e/portal
|
|
|
13
13
|
import { createPortal } from '@y14e/portal';
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import { createPortal } from 'https://esm.sh/@y14e/portal@1.2.
|
|
16
|
+
import { createPortal } from 'https://esm.sh/@y14e/portal@1.2.30';
|
|
17
17
|
// or
|
|
18
|
-
import { createPortal } from 'https://cdn.jsdelivr.net/npm/@y14e/portal@1.2.
|
|
18
|
+
import { createPortal } from 'https://cdn.jsdelivr.net/npm/@y14e/portal@1.2.30/+esm';
|
|
19
19
|
// or
|
|
20
|
-
import { createPortal } from 'https://esm.unpkg.com/@y14e/portal@1.2.
|
|
20
|
+
import { createPortal } from 'https://esm.unpkg.com/@y14e/portal@1.2.30';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## 📦 APIs
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -467,7 +467,7 @@ var Portal = class {
|
|
|
467
467
|
const focusables = this.#getFocusables();
|
|
468
468
|
if (focusables.length) {
|
|
469
469
|
const index = focusables.indexOf(active);
|
|
470
|
-
if (index
|
|
470
|
+
if (index >= 0) {
|
|
471
471
|
event.preventDefault();
|
|
472
472
|
const focusable = focusables[index + (shiftKey ? -1 : 1)];
|
|
473
473
|
focusable ? focusElement(focusable) : this.#focusSentinel(shiftKey);
|
|
@@ -537,7 +537,7 @@ function containsComposed2(container, element) {
|
|
|
537
537
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
538
538
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
539
539
|
*
|
|
540
|
-
* @version 1.2.
|
|
540
|
+
* @version 1.2.30
|
|
541
541
|
* @author Yusuke Kamiyamane
|
|
542
542
|
* @license MIT
|
|
543
543
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -465,7 +465,7 @@ var Portal = class {
|
|
|
465
465
|
const focusables = this.#getFocusables();
|
|
466
466
|
if (focusables.length) {
|
|
467
467
|
const index = focusables.indexOf(active);
|
|
468
|
-
if (index
|
|
468
|
+
if (index >= 0) {
|
|
469
469
|
event.preventDefault();
|
|
470
470
|
const focusable = focusables[index + (shiftKey ? -1 : 1)];
|
|
471
471
|
focusable ? focusElement(focusable) : this.#focusSentinel(shiftKey);
|
|
@@ -535,7 +535,7 @@ function containsComposed2(container, element) {
|
|
|
535
535
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
536
536
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
537
537
|
*
|
|
538
|
-
* @version 1.2.
|
|
538
|
+
* @version 1.2.30
|
|
539
539
|
* @author Yusuke Kamiyamane
|
|
540
540
|
* @license MIT
|
|
541
541
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -110,7 +110,7 @@ var Portal = class {
|
|
|
110
110
|
const focusables = this.#getFocusables();
|
|
111
111
|
if (focusables.length) {
|
|
112
112
|
const index = focusables.indexOf(active);
|
|
113
|
-
if (index
|
|
113
|
+
if (index >= 0) {
|
|
114
114
|
event.preventDefault();
|
|
115
115
|
const focusable = focusables[index + (shiftKey ? -1 : 1)];
|
|
116
116
|
focusable ? powerFocusable.focusElement(focusable) : this.#focusSentinel(shiftKey);
|
|
@@ -180,7 +180,7 @@ function containsComposed(container, element) {
|
|
|
180
180
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
181
181
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
182
182
|
*
|
|
183
|
-
* @version 1.2.
|
|
183
|
+
* @version 1.2.30
|
|
184
184
|
* @author Yusuke Kamiyamane
|
|
185
185
|
* @license MIT
|
|
186
186
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
4
4
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
5
5
|
*
|
|
6
|
-
* @version 1.2.
|
|
6
|
+
* @version 1.2.30
|
|
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
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
4
4
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
5
5
|
*
|
|
6
|
-
* @version 1.2.
|
|
6
|
+
* @version 1.2.30
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -108,7 +108,7 @@ var Portal = class {
|
|
|
108
108
|
const focusables = this.#getFocusables();
|
|
109
109
|
if (focusables.length) {
|
|
110
110
|
const index = focusables.indexOf(active);
|
|
111
|
-
if (index
|
|
111
|
+
if (index >= 0) {
|
|
112
112
|
event.preventDefault();
|
|
113
113
|
const focusable = focusables[index + (shiftKey ? -1 : 1)];
|
|
114
114
|
focusable ? focusElement(focusable) : this.#focusSentinel(shiftKey);
|
|
@@ -178,7 +178,7 @@ function containsComposed(container, element) {
|
|
|
178
178
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
179
179
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
180
180
|
*
|
|
181
|
-
* @version 1.2.
|
|
181
|
+
* @version 1.2.30
|
|
182
182
|
* @author Yusuke Kamiyamane
|
|
183
183
|
* @license MIT
|
|
184
184
|
* @copyright Copyright (c) Yusuke Kamiyamane
|