@y14e/menu 1.4.7 → 1.4.8
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 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- 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.4.
|
|
13
|
+
import Menu from '@y14e/menu@1.4.8';
|
|
14
14
|
// with middleware
|
|
15
|
-
import Menu, { flip, offset, shift } from '@y14e/menu@1.4.
|
|
15
|
+
import Menu, { flip, offset, shift } from '@y14e/menu@1.4.8';
|
|
16
16
|
|
|
17
17
|
// CDNs
|
|
18
|
-
import Menu from 'https://esm.sh/@y14e/menu@1.4.
|
|
18
|
+
import Menu from 'https://esm.sh/@y14e/menu@1.4.8';
|
|
19
19
|
// or
|
|
20
|
-
import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.4.
|
|
20
|
+
import Menu from 'https://cdn.jsdelivr.net/npm/@y14e/menu@1.4.8/+esm';
|
|
21
21
|
// or
|
|
22
|
-
import Menu from 'https://esm.unpkg.com/@y14e/menu@1.4.
|
|
22
|
+
import Menu from 'https://esm.unpkg.com/@y14e/menu@1.4.8';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Usage
|
package/dist/index.cjs
CHANGED
|
@@ -3085,8 +3085,7 @@ var Menu = class _Menu {
|
|
|
3085
3085
|
if (!(active instanceof HTMLElement)) {
|
|
3086
3086
|
return;
|
|
3087
3087
|
}
|
|
3088
|
-
|
|
3089
|
-
this.#containsRoot(active) && trigger && trigger.tabIndex >= 0 && trigger.focus();
|
|
3088
|
+
this.#containsRoot(active) && (this.#externalTrigger ?? this.#triggerElement)?.focus();
|
|
3090
3089
|
}
|
|
3091
3090
|
#includesRoot(event) {
|
|
3092
3091
|
const path = event.composedPath();
|
|
@@ -3242,7 +3241,7 @@ function isFocusable3(element) {
|
|
|
3242
3241
|
* WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
|
|
3243
3242
|
* Supports checkbox item, radio item, and infinitely nested menus.
|
|
3244
3243
|
*
|
|
3245
|
-
* @version 1.4.
|
|
3244
|
+
* @version 1.4.8
|
|
3246
3245
|
* @author Yusuke Kamiyamane
|
|
3247
3246
|
* @license MIT
|
|
3248
3247
|
* @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.4.
|
|
9
|
+
* @version 1.4.8
|
|
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.4.
|
|
9
|
+
* @version 1.4.8
|
|
10
10
|
* @author Yusuke Kamiyamane
|
|
11
11
|
* @license MIT
|
|
12
12
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -3081,8 +3081,7 @@ var Menu = class _Menu {
|
|
|
3081
3081
|
if (!(active instanceof HTMLElement)) {
|
|
3082
3082
|
return;
|
|
3083
3083
|
}
|
|
3084
|
-
|
|
3085
|
-
this.#containsRoot(active) && trigger && trigger.tabIndex >= 0 && trigger.focus();
|
|
3084
|
+
this.#containsRoot(active) && (this.#externalTrigger ?? this.#triggerElement)?.focus();
|
|
3086
3085
|
}
|
|
3087
3086
|
#includesRoot(event) {
|
|
3088
3087
|
const path = event.composedPath();
|
|
@@ -3238,7 +3237,7 @@ function isFocusable3(element) {
|
|
|
3238
3237
|
* WAI-ARIA compliant menu (menu button) pattern implementation in TypeScript.
|
|
3239
3238
|
* Supports checkbox item, radio item, and infinitely nested menus.
|
|
3240
3239
|
*
|
|
3241
|
-
* @version 1.4.
|
|
3240
|
+
* @version 1.4.8
|
|
3242
3241
|
* @author Yusuke Kamiyamane
|
|
3243
3242
|
* @license MIT
|
|
3244
3243
|
* @copyright Copyright (c) Yusuke Kamiyamane
|