@y14e/menu 1.5.4 → 1.5.5

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 CHANGED
@@ -10,16 +10,16 @@ npm i @y14e/menu
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Menu from '@y14e/menu@1.5.4';
13
+ import Menu from '@y14e/menu@1.5.5';
14
14
  // with middleware
15
- import Menu, { flip, offset, shift } from '@y14e/menu@1.5.4';
15
+ import Menu, { flip, offset, shift } from '@y14e/menu@1.5.5';
16
16
 
17
17
  // CDNs
18
- import Menu from 'https://esm.sh/@y14e/menu@1.5.4';
18
+ import Menu from 'https://esm.sh/@y14e/menu@1.5.5';
19
19
  // or
20
- import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.5.4/+esm';
20
+ import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.5.5/+esm';
21
21
  // or
22
- import Menu from 'https://esm.unpkg.com/@y14e/menu@1.5.4';
22
+ import Menu from 'https://esm.unpkg.com/@y14e/menu@1.5.5';
23
23
  ```
24
24
 
25
25
  ## Usage
package/dist/index.cjs CHANGED
@@ -3012,7 +3012,9 @@ var Menu = class _Menu {
3012
3012
  if (!this.#isPortal || !this.#isSubmenu && this.#triggerElement) {
3013
3013
  const style2 = this.#listElement.style;
3014
3014
  style2.setProperty("position", "fixed");
3015
- this.#cleanupPortal = createPortal(this.#listElement);
3015
+ if (!this.#cleanupPortal) {
3016
+ this.#cleanupPortal = createPortal(this.#listElement);
3017
+ }
3016
3018
  requestAnimationFrame(() => style2.removeProperty("position"));
3017
3019
  }
3018
3020
  requestAnimationFrame(
@@ -3264,7 +3266,7 @@ function isFocusable3(element) {
3264
3266
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
3265
3267
  * Supports checkbox item, radio item, and infinitely nested menus.
3266
3268
  *
3267
- * @version 1.5.4
3269
+ * @version 1.5.5
3268
3270
  * @author Yusuke Kamiyamane
3269
3271
  * @license MIT
3270
3272
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ export { flip, offset, shift } from '@floating-ui/dom';
6
6
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
7
7
  * Supports checkbox item, radio item, and infinitely nested menus.
8
8
  *
9
- * @version 1.5.4
9
+ * @version 1.5.5
10
10
  * @author Yusuke Kamiyamane
11
11
  * @license MIT
12
12
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { flip, offset, shift } from '@floating-ui/dom';
6
6
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
7
7
  * Supports checkbox item, radio item, and infinitely nested menus.
8
8
  *
9
- * @version 1.5.4
9
+ * @version 1.5.5
10
10
  * @author Yusuke Kamiyamane
11
11
  * @license MIT
12
12
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -3008,7 +3008,9 @@ var Menu = class _Menu {
3008
3008
  if (!this.#isPortal || !this.#isSubmenu && this.#triggerElement) {
3009
3009
  const style2 = this.#listElement.style;
3010
3010
  style2.setProperty("position", "fixed");
3011
- this.#cleanupPortal = createPortal(this.#listElement);
3011
+ if (!this.#cleanupPortal) {
3012
+ this.#cleanupPortal = createPortal(this.#listElement);
3013
+ }
3012
3014
  requestAnimationFrame(() => style2.removeProperty("position"));
3013
3015
  }
3014
3016
  requestAnimationFrame(
@@ -3260,7 +3262,7 @@ function isFocusable3(element) {
3260
3262
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
3261
3263
  * Supports checkbox item, radio item, and infinitely nested menus.
3262
3264
  *
3263
- * @version 1.5.4
3265
+ * @version 1.5.5
3264
3266
  * @author Yusuke Kamiyamane
3265
3267
  * @license MIT
3266
3268
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/menu",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",