@y14e/menu 1.5.9 → 1.5.10
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 +5 -5
- 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
|
@@ -10,16 +10,16 @@ npm i @y14e/menu
|
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
// npm
|
|
13
|
-
import Menu from '@y14e/menu@1.5.
|
|
13
|
+
import Menu from '@y14e/menu@1.5.10';
|
|
14
14
|
// with middleware
|
|
15
|
-
import Menu, { flip, offset, shift } from '@y14e/menu@1.5.
|
|
15
|
+
import Menu, { flip, offset, shift } from '@y14e/menu@1.5.10';
|
|
16
16
|
|
|
17
17
|
// CDNs
|
|
18
|
-
import Menu from 'https://esm.sh/@y14e/menu@1.5.
|
|
18
|
+
import Menu from 'https://esm.sh/@y14e/menu@1.5.10';
|
|
19
19
|
// or
|
|
20
|
-
import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.5.
|
|
20
|
+
import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.5.10/+esm';
|
|
21
21
|
// or
|
|
22
|
-
import Menu from 'https://esm.unpkg.com/@y14e/menu@1.5.
|
|
22
|
+
import Menu from 'https://esm.unpkg.com/@y14e/menu@1.5.10';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Usage
|
package/dist/index.cjs
CHANGED
|
@@ -2938,7 +2938,7 @@ var Menu = class _Menu {
|
|
|
2938
2938
|
}
|
|
2939
2939
|
event.preventDefault();
|
|
2940
2940
|
event.stopPropagation();
|
|
2941
|
-
if (
|
|
2941
|
+
if (key === "Escape" || this.#isSubmenu && key === "ArrowLeft") {
|
|
2942
2942
|
this.close();
|
|
2943
2943
|
return;
|
|
2944
2944
|
}
|
|
@@ -3258,7 +3258,7 @@ function isFocusable3(element) {
|
|
|
3258
3258
|
* WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
|
|
3259
3259
|
* Supports checkbox item, radio item, and infinitely nested menus.
|
|
3260
3260
|
*
|
|
3261
|
-
* @version 1.5.
|
|
3261
|
+
* @version 1.5.10
|
|
3262
3262
|
* @author Yusuke Kamiyamane
|
|
3263
3263
|
* @license MIT
|
|
3264
3264
|
* @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.
|
|
9
|
+
* @version 1.5.10
|
|
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.
|
|
9
|
+
* @version 1.5.10
|
|
10
10
|
* @author Yusuke Kamiyamane
|
|
11
11
|
* @license MIT
|
|
12
12
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -2934,7 +2934,7 @@ var Menu = class _Menu {
|
|
|
2934
2934
|
}
|
|
2935
2935
|
event.preventDefault();
|
|
2936
2936
|
event.stopPropagation();
|
|
2937
|
-
if (
|
|
2937
|
+
if (key === "Escape" || this.#isSubmenu && key === "ArrowLeft") {
|
|
2938
2938
|
this.close();
|
|
2939
2939
|
return;
|
|
2940
2940
|
}
|
|
@@ -3254,7 +3254,7 @@ function isFocusable3(element) {
|
|
|
3254
3254
|
* WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
|
|
3255
3255
|
* Supports checkbox item, radio item, and infinitely nested menus.
|
|
3256
3256
|
*
|
|
3257
|
-
* @version 1.5.
|
|
3257
|
+
* @version 1.5.10
|
|
3258
3258
|
* @author Yusuke Kamiyamane
|
|
3259
3259
|
* @license MIT
|
|
3260
3260
|
* @copyright Copyright (c) Yusuke Kamiyamane
|