@y14e/portal 1.2.23 → 1.2.24
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.bundle.cjs +3 -9
- package/dist/index.bundle.js +3 -9
- package/dist/index.cjs +3 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,14 +10,14 @@ npm i @y14e/portal
|
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
// npm
|
|
13
|
-
import { createPortal } from '@y14e/portal@1.2.
|
|
13
|
+
import { createPortal } from '@y14e/portal@1.2.24';
|
|
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.24';
|
|
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.24/+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.24';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## 📦 APIs
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -426,14 +426,8 @@ var Portal = class {
|
|
|
426
426
|
this.#update();
|
|
427
427
|
this.#controller = new AbortController();
|
|
428
428
|
const { signal } = this.#controller;
|
|
429
|
-
document.addEventListener("focusin", this.#onFocusIn, {
|
|
430
|
-
|
|
431
|
-
signal
|
|
432
|
-
});
|
|
433
|
-
document.addEventListener("keydown", this.#onKeyDown, {
|
|
434
|
-
capture: true,
|
|
435
|
-
signal
|
|
436
|
-
});
|
|
429
|
+
document.addEventListener("focusin", this.#onFocusIn, { signal });
|
|
430
|
+
document.addEventListener("keydown", this.#onKeyDown, { signal });
|
|
437
431
|
this.#host.setAttribute("data-portaled", "");
|
|
438
432
|
}
|
|
439
433
|
#onFocusIn = (event) => {
|
|
@@ -565,7 +559,7 @@ function containsComposed2(container, element) {
|
|
|
565
559
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
566
560
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
567
561
|
*
|
|
568
|
-
* @version 1.2.
|
|
562
|
+
* @version 1.2.24
|
|
569
563
|
* @author Yusuke Kamiyamane
|
|
570
564
|
* @license MIT
|
|
571
565
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -424,14 +424,8 @@ var Portal = class {
|
|
|
424
424
|
this.#update();
|
|
425
425
|
this.#controller = new AbortController();
|
|
426
426
|
const { signal } = this.#controller;
|
|
427
|
-
document.addEventListener("focusin", this.#onFocusIn, {
|
|
428
|
-
|
|
429
|
-
signal
|
|
430
|
-
});
|
|
431
|
-
document.addEventListener("keydown", this.#onKeyDown, {
|
|
432
|
-
capture: true,
|
|
433
|
-
signal
|
|
434
|
-
});
|
|
427
|
+
document.addEventListener("focusin", this.#onFocusIn, { signal });
|
|
428
|
+
document.addEventListener("keydown", this.#onKeyDown, { signal });
|
|
435
429
|
this.#host.setAttribute("data-portaled", "");
|
|
436
430
|
}
|
|
437
431
|
#onFocusIn = (event) => {
|
|
@@ -563,7 +557,7 @@ function containsComposed2(container, element) {
|
|
|
563
557
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
564
558
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
565
559
|
*
|
|
566
|
-
* @version 1.2.
|
|
560
|
+
* @version 1.2.24
|
|
567
561
|
* @author Yusuke Kamiyamane
|
|
568
562
|
* @license MIT
|
|
569
563
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -69,14 +69,8 @@ var Portal = class {
|
|
|
69
69
|
this.#update();
|
|
70
70
|
this.#controller = new AbortController();
|
|
71
71
|
const { signal } = this.#controller;
|
|
72
|
-
document.addEventListener("focusin", this.#onFocusIn, {
|
|
73
|
-
|
|
74
|
-
signal
|
|
75
|
-
});
|
|
76
|
-
document.addEventListener("keydown", this.#onKeyDown, {
|
|
77
|
-
capture: true,
|
|
78
|
-
signal
|
|
79
|
-
});
|
|
72
|
+
document.addEventListener("focusin", this.#onFocusIn, { signal });
|
|
73
|
+
document.addEventListener("keydown", this.#onKeyDown, { signal });
|
|
80
74
|
this.#host.setAttribute("data-portaled", "");
|
|
81
75
|
}
|
|
82
76
|
#onFocusIn = (event) => {
|
|
@@ -208,7 +202,7 @@ function containsComposed(container, element) {
|
|
|
208
202
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
209
203
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
210
204
|
*
|
|
211
|
-
* @version 1.2.
|
|
205
|
+
* @version 1.2.24
|
|
212
206
|
* @author Yusuke Kamiyamane
|
|
213
207
|
* @license MIT
|
|
214
208
|
* @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.24
|
|
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.24
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -67,14 +67,8 @@ var Portal = class {
|
|
|
67
67
|
this.#update();
|
|
68
68
|
this.#controller = new AbortController();
|
|
69
69
|
const { signal } = this.#controller;
|
|
70
|
-
document.addEventListener("focusin", this.#onFocusIn, {
|
|
71
|
-
|
|
72
|
-
signal
|
|
73
|
-
});
|
|
74
|
-
document.addEventListener("keydown", this.#onKeyDown, {
|
|
75
|
-
capture: true,
|
|
76
|
-
signal
|
|
77
|
-
});
|
|
70
|
+
document.addEventListener("focusin", this.#onFocusIn, { signal });
|
|
71
|
+
document.addEventListener("keydown", this.#onKeyDown, { signal });
|
|
78
72
|
this.#host.setAttribute("data-portaled", "");
|
|
79
73
|
}
|
|
80
74
|
#onFocusIn = (event) => {
|
|
@@ -206,7 +200,7 @@ function containsComposed(container, element) {
|
|
|
206
200
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
207
201
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
208
202
|
*
|
|
209
|
-
* @version 1.2.
|
|
203
|
+
* @version 1.2.24
|
|
210
204
|
* @author Yusuke Kamiyamane
|
|
211
205
|
* @license MIT
|
|
212
206
|
* @copyright Copyright (c) Yusuke Kamiyamane
|