@y14e/portal 1.2.15 → 1.2.16
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 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -5
- 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.16';
|
|
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.16';
|
|
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.16/+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.16';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## 📦 APIs
|
package/dist/index.cjs
CHANGED
|
@@ -455,9 +455,7 @@ var Portal = class {
|
|
|
455
455
|
});
|
|
456
456
|
next && focusElement(next);
|
|
457
457
|
}
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
if (current === this.#exitSentinel) {
|
|
458
|
+
} else if (current === this.#exitSentinel) {
|
|
461
459
|
if (this.#host.contains(before)) {
|
|
462
460
|
this.#moveFocus("next");
|
|
463
461
|
return;
|
|
@@ -473,7 +471,6 @@ var Portal = class {
|
|
|
473
471
|
});
|
|
474
472
|
previous && focusElement(previous);
|
|
475
473
|
}
|
|
476
|
-
return;
|
|
477
474
|
}
|
|
478
475
|
};
|
|
479
476
|
#onKeyDown = (event) => {
|
|
@@ -575,7 +572,7 @@ function getActiveElement2() {
|
|
|
575
572
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
576
573
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
577
574
|
*
|
|
578
|
-
* @version 1.2.
|
|
575
|
+
* @version 1.2.16
|
|
579
576
|
* @author Yusuke Kamiyamane
|
|
580
577
|
* @license MIT
|
|
581
578
|
* @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.16
|
|
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.16
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -453,9 +453,7 @@ var Portal = class {
|
|
|
453
453
|
});
|
|
454
454
|
next && focusElement(next);
|
|
455
455
|
}
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
if (current === this.#exitSentinel) {
|
|
456
|
+
} else if (current === this.#exitSentinel) {
|
|
459
457
|
if (this.#host.contains(before)) {
|
|
460
458
|
this.#moveFocus("next");
|
|
461
459
|
return;
|
|
@@ -471,7 +469,6 @@ var Portal = class {
|
|
|
471
469
|
});
|
|
472
470
|
previous && focusElement(previous);
|
|
473
471
|
}
|
|
474
|
-
return;
|
|
475
472
|
}
|
|
476
473
|
};
|
|
477
474
|
#onKeyDown = (event) => {
|
|
@@ -573,7 +570,7 @@ function getActiveElement2() {
|
|
|
573
570
|
* Lightweight DOM portal (teleport) utility with fully focus management.
|
|
574
571
|
* Designed for accessible dialogs, menus, overlays, popovers.
|
|
575
572
|
*
|
|
576
|
-
* @version 1.2.
|
|
573
|
+
* @version 1.2.16
|
|
577
574
|
* @author Yusuke Kamiyamane
|
|
578
575
|
* @license MIT
|
|
579
576
|
* @copyright Copyright (c) Yusuke Kamiyamane
|