@y14e/menu 1.4.4 → 1.4.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,14 +10,14 @@ npm i @y14e/menu
10
10
 
11
11
  ```ts
12
12
  // npm
13
- import Menu from '@y14e/menu@1.4.4';
13
+ import Menu from '@y14e/menu@1.4.5';
14
14
 
15
15
  // CDNs
16
- import Menu from 'https://esm.sh/@y14e/menu@1.4.4';
16
+ import Menu from 'https://esm.sh/@y14e/menu@1.4.5';
17
17
  // or
18
- import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.4.4/+esm';
18
+ import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.4.5/+esm';
19
19
  // or
20
- import Menu from 'https://esm.unpkg.com/@y14e/menu@1.4.4';
20
+ import Menu from 'https://esm.unpkg.com/@y14e/menu@1.4.5';
21
21
  ```
22
22
 
23
23
  ## Usage
package/dist/index.cjs CHANGED
@@ -2859,8 +2859,6 @@ var Menu = class _Menu {
2859
2859
  item2.addEventListener("click", this.#onRadioItemClick, { signal });
2860
2860
  });
2861
2861
  this.#resetTabIndex();
2862
- !this.#isSubmenu && this.#rootElement.setAttribute("data-menu-initialized", "");
2863
- _Menu.#menus.push(this);
2864
2862
  const { item, list } = this.#settings.selector;
2865
2863
  this.#cleanupRovingTabIndex = createRovingTabIndex(this.#listElement, {
2866
2864
  direction: "vertical",
@@ -2868,6 +2866,8 @@ var Menu = class _Menu {
2868
2866
  typeahead: true,
2869
2867
  wrap: true
2870
2868
  });
2869
+ _Menu.#menus.push(this);
2870
+ !this.#isSubmenu && this.#rootElement.setAttribute("data-menu-initialized", "");
2871
2871
  }
2872
2872
  #onOutsidePointerDown = (event) => {
2873
2873
  if (!this.#triggerElement || this.#includesRoot(event)) {
@@ -3229,7 +3229,7 @@ function isFocusable3(element) {
3229
3229
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
3230
3230
  * Supports checkbox item, radio item, and infinitely nested menus.
3231
3231
  *
3232
- * @version 1.4.4
3232
+ * @version 1.4.5
3233
3233
  * @author Yusuke Kamiyamane
3234
3234
  * @license MIT
3235
3235
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -5,7 +5,7 @@ import { Middleware, Placement } from '@floating-ui/dom';
5
5
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
6
6
  * Supports checkbox item, radio item, and infinitely nested menus.
7
7
  *
8
- * @version 1.4.4
8
+ * @version 1.4.5
9
9
  * @author Yusuke Kamiyamane
10
10
  * @license MIT
11
11
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Middleware, Placement } from '@floating-ui/dom';
5
5
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
6
6
  * Supports checkbox item, radio item, and infinitely nested menus.
7
7
  *
8
- * @version 1.4.4
8
+ * @version 1.4.5
9
9
  * @author Yusuke Kamiyamane
10
10
  * @license MIT
11
11
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -2857,8 +2857,6 @@ var Menu = class _Menu {
2857
2857
  item2.addEventListener("click", this.#onRadioItemClick, { signal });
2858
2858
  });
2859
2859
  this.#resetTabIndex();
2860
- !this.#isSubmenu && this.#rootElement.setAttribute("data-menu-initialized", "");
2861
- _Menu.#menus.push(this);
2862
2860
  const { item, list } = this.#settings.selector;
2863
2861
  this.#cleanupRovingTabIndex = createRovingTabIndex(this.#listElement, {
2864
2862
  direction: "vertical",
@@ -2866,6 +2864,8 @@ var Menu = class _Menu {
2866
2864
  typeahead: true,
2867
2865
  wrap: true
2868
2866
  });
2867
+ _Menu.#menus.push(this);
2868
+ !this.#isSubmenu && this.#rootElement.setAttribute("data-menu-initialized", "");
2869
2869
  }
2870
2870
  #onOutsidePointerDown = (event) => {
2871
2871
  if (!this.#triggerElement || this.#includesRoot(event)) {
@@ -3227,7 +3227,7 @@ function isFocusable3(element) {
3227
3227
  * WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
3228
3228
  * Supports checkbox item, radio item, and infinitely nested menus.
3229
3229
  *
3230
- * @version 1.4.4
3230
+ * @version 1.4.5
3231
3231
  * @author Yusuke Kamiyamane
3232
3232
  * @license MIT
3233
3233
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/menu",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",