@yamada-ui/menu 0.3.25 → 0.3.27
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/dist/{chunk-6SM4RQW7.mjs → chunk-24W2CY4C.mjs} +1 -1
- package/dist/{chunk-GRQXVFCA.mjs → chunk-6GKORNJH.mjs} +2 -2
- package/dist/{chunk-5Z2EB7TV.mjs → chunk-OMC6OCNU.mjs} +1 -1
- package/dist/{chunk-ODNTILJT.mjs → chunk-UFMHWKIJ.mjs} +3 -3
- package/dist/{chunk-2LCKA3H7.mjs → chunk-V62YZTKO.mjs} +1 -1
- package/dist/{chunk-OSDFT3UO.mjs → chunk-W5VK56XL.mjs} +2 -2
- package/dist/{chunk-VXUAK4GR.mjs → chunk-XPNC6U52.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +7 -7
- package/dist/menu-button.mjs +2 -2
- package/dist/menu-divider.mjs +2 -2
- package/dist/menu-group.mjs +2 -2
- package/dist/menu-item.mjs +2 -2
- package/dist/menu-list.js +2 -2
- package/dist/menu-list.mjs +2 -2
- package/dist/menu-option-group.mjs +4 -4
- package/dist/menu.d.mts +4 -4
- package/dist/menu.d.ts +4 -4
- package/dist/menu.js +2 -2
- package/dist/menu.mjs +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
MenuGroup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V62YZTKO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
MenuOptionItem
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OMC6OCNU.mjs";
|
|
8
8
|
|
|
9
9
|
// src/menu-option-group.tsx
|
|
10
10
|
import { useControllableState } from "@yamada-ui/use-controllable-state";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
useMenu,
|
|
4
4
|
useMenuDescendantsContext
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W5VK56XL.mjs";
|
|
6
6
|
|
|
7
7
|
// src/menu-list.tsx
|
|
8
8
|
import { forwardRef } from "@yamada-ui/core";
|
|
@@ -25,12 +25,12 @@ var MenuList = forwardRef(
|
|
|
25
25
|
setFocusedIndex(prev.index);
|
|
26
26
|
}, [descendants, focusedIndex, setFocusedIndex]);
|
|
27
27
|
const onFirst = useCallback(() => {
|
|
28
|
-
const first = descendants.
|
|
28
|
+
const first = descendants.enabledFirstValue();
|
|
29
29
|
if (first)
|
|
30
30
|
setFocusedIndex(first.index);
|
|
31
31
|
}, [descendants, setFocusedIndex]);
|
|
32
32
|
const onLast = useCallback(() => {
|
|
33
|
-
const last = descendants.
|
|
33
|
+
const last = descendants.enabledLastValue();
|
|
34
34
|
if (last)
|
|
35
35
|
setFocusedIndex(last.index);
|
|
36
36
|
}, [descendants, setFocusedIndex]);
|
|
@@ -47,7 +47,7 @@ var Menu = (props) => {
|
|
|
47
47
|
const id = setTimeout(() => {
|
|
48
48
|
if (initialFocusRef)
|
|
49
49
|
return;
|
|
50
|
-
const first = descendants.
|
|
50
|
+
const first = descendants.enabledFirstValue();
|
|
51
51
|
if (first)
|
|
52
52
|
setFocusedIndex(first.index);
|
|
53
53
|
});
|
|
@@ -57,7 +57,7 @@ var Menu = (props) => {
|
|
|
57
57
|
const id = setTimeout(() => {
|
|
58
58
|
if (initialFocusRef)
|
|
59
59
|
return;
|
|
60
|
-
const last = descendants.
|
|
60
|
+
const last = descendants.enabledLastValue();
|
|
61
61
|
if (last)
|
|
62
62
|
setFocusedIndex(last.index);
|
|
63
63
|
});
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var Menu = (props) => {
|
|
|
75
75
|
const id = setTimeout(() => {
|
|
76
76
|
if (initialFocusRef)
|
|
77
77
|
return;
|
|
78
|
-
const first = descendants.
|
|
78
|
+
const first = descendants.enabledFirstValue();
|
|
79
79
|
if (first)
|
|
80
80
|
setFocusedIndex(first.index);
|
|
81
81
|
});
|
|
@@ -85,7 +85,7 @@ var Menu = (props) => {
|
|
|
85
85
|
const id = setTimeout(() => {
|
|
86
86
|
if (initialFocusRef)
|
|
87
87
|
return;
|
|
88
|
-
const last = descendants.
|
|
88
|
+
const last = descendants.enabledLastValue();
|
|
89
89
|
if (last)
|
|
90
90
|
setFocusedIndex(last.index);
|
|
91
91
|
});
|
|
@@ -215,12 +215,12 @@ var MenuList = (0, import_core3.forwardRef)(
|
|
|
215
215
|
setFocusedIndex(prev.index);
|
|
216
216
|
}, [descendants, focusedIndex, setFocusedIndex]);
|
|
217
217
|
const onFirst = (0, import_react3.useCallback)(() => {
|
|
218
|
-
const first = descendants.
|
|
218
|
+
const first = descendants.enabledFirstValue();
|
|
219
219
|
if (first)
|
|
220
220
|
setFocusedIndex(first.index);
|
|
221
221
|
}, [descendants, setFocusedIndex]);
|
|
222
222
|
const onLast = (0, import_react3.useCallback)(() => {
|
|
223
|
-
const last = descendants.
|
|
223
|
+
const last = descendants.enabledLastValue();
|
|
224
224
|
if (last)
|
|
225
225
|
setFocusedIndex(last.index);
|
|
226
226
|
}, [descendants, setFocusedIndex]);
|
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
MenuButton
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XPNC6U52.mjs";
|
|
5
5
|
import {
|
|
6
6
|
MenuDivider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-24W2CY4C.mjs";
|
|
8
8
|
import {
|
|
9
9
|
MenuList
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UFMHWKIJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
MenuOptionGroup
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6GKORNJH.mjs";
|
|
14
14
|
import {
|
|
15
15
|
MenuGroup
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-V62YZTKO.mjs";
|
|
17
17
|
import {
|
|
18
18
|
MenuItem,
|
|
19
19
|
MenuOptionItem
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OMC6OCNU.mjs";
|
|
21
21
|
import {
|
|
22
22
|
Menu
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-W5VK56XL.mjs";
|
|
24
24
|
export {
|
|
25
25
|
Menu,
|
|
26
26
|
MenuButton,
|
package/dist/menu-button.mjs
CHANGED
package/dist/menu-divider.mjs
CHANGED
package/dist/menu-group.mjs
CHANGED
package/dist/menu-item.mjs
CHANGED
package/dist/menu-list.js
CHANGED
|
@@ -65,12 +65,12 @@ var MenuList = (0, import_core2.forwardRef)(
|
|
|
65
65
|
setFocusedIndex(prev.index);
|
|
66
66
|
}, [descendants, focusedIndex, setFocusedIndex]);
|
|
67
67
|
const onFirst = (0, import_react2.useCallback)(() => {
|
|
68
|
-
const first = descendants.
|
|
68
|
+
const first = descendants.enabledFirstValue();
|
|
69
69
|
if (first)
|
|
70
70
|
setFocusedIndex(first.index);
|
|
71
71
|
}, [descendants, setFocusedIndex]);
|
|
72
72
|
const onLast = (0, import_react2.useCallback)(() => {
|
|
73
|
-
const last = descendants.
|
|
73
|
+
const last = descendants.enabledLastValue();
|
|
74
74
|
if (last)
|
|
75
75
|
setFocusedIndex(last.index);
|
|
76
76
|
}, [descendants, setFocusedIndex]);
|
package/dist/menu-list.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
MenuOptionGroup
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-6GKORNJH.mjs";
|
|
5
|
+
import "./chunk-V62YZTKO.mjs";
|
|
6
|
+
import "./chunk-OMC6OCNU.mjs";
|
|
7
|
+
import "./chunk-W5VK56XL.mjs";
|
|
8
8
|
export {
|
|
9
9
|
MenuOptionGroup
|
|
10
10
|
};
|
package/dist/menu.d.mts
CHANGED
|
@@ -438,7 +438,7 @@ declare const useMenuDescendantsContext: () => {
|
|
|
438
438
|
node: HTMLElement;
|
|
439
439
|
index: number;
|
|
440
440
|
})[]) => boolean) | undefined) => number;
|
|
441
|
-
|
|
441
|
+
enabledFirstValue: (filter?: ((value: {
|
|
442
442
|
disabled?: boolean | undefined;
|
|
443
443
|
id?: string | undefined;
|
|
444
444
|
filter?: ((value: any & {
|
|
@@ -478,7 +478,7 @@ declare const useMenuDescendantsContext: () => {
|
|
|
478
478
|
node: HTMLElement;
|
|
479
479
|
index: number;
|
|
480
480
|
}) | undefined;
|
|
481
|
-
|
|
481
|
+
enabledLastValue: (filter?: ((value: {
|
|
482
482
|
disabled?: boolean | undefined;
|
|
483
483
|
id?: string | undefined;
|
|
484
484
|
filter?: ((value: any & {
|
|
@@ -1706,7 +1706,7 @@ declare const useMenuDescendant: (options?: {
|
|
|
1706
1706
|
node: HTMLElement;
|
|
1707
1707
|
index: number;
|
|
1708
1708
|
})[]) => boolean) | undefined) => number;
|
|
1709
|
-
|
|
1709
|
+
enabledFirstValue: (filter?: ((value: {
|
|
1710
1710
|
disabled?: boolean | undefined;
|
|
1711
1711
|
id?: string | undefined;
|
|
1712
1712
|
filter?: ((value: {
|
|
@@ -1806,7 +1806,7 @@ declare const useMenuDescendant: (options?: {
|
|
|
1806
1806
|
node: HTMLElement;
|
|
1807
1807
|
index: number;
|
|
1808
1808
|
}) | undefined;
|
|
1809
|
-
|
|
1809
|
+
enabledLastValue: (filter?: ((value: {
|
|
1810
1810
|
disabled?: boolean | undefined;
|
|
1811
1811
|
id?: string | undefined;
|
|
1812
1812
|
filter?: ((value: {
|
package/dist/menu.d.ts
CHANGED
|
@@ -438,7 +438,7 @@ declare const useMenuDescendantsContext: () => {
|
|
|
438
438
|
node: HTMLElement;
|
|
439
439
|
index: number;
|
|
440
440
|
})[]) => boolean) | undefined) => number;
|
|
441
|
-
|
|
441
|
+
enabledFirstValue: (filter?: ((value: {
|
|
442
442
|
disabled?: boolean | undefined;
|
|
443
443
|
id?: string | undefined;
|
|
444
444
|
filter?: ((value: any & {
|
|
@@ -478,7 +478,7 @@ declare const useMenuDescendantsContext: () => {
|
|
|
478
478
|
node: HTMLElement;
|
|
479
479
|
index: number;
|
|
480
480
|
}) | undefined;
|
|
481
|
-
|
|
481
|
+
enabledLastValue: (filter?: ((value: {
|
|
482
482
|
disabled?: boolean | undefined;
|
|
483
483
|
id?: string | undefined;
|
|
484
484
|
filter?: ((value: any & {
|
|
@@ -1706,7 +1706,7 @@ declare const useMenuDescendant: (options?: {
|
|
|
1706
1706
|
node: HTMLElement;
|
|
1707
1707
|
index: number;
|
|
1708
1708
|
})[]) => boolean) | undefined) => number;
|
|
1709
|
-
|
|
1709
|
+
enabledFirstValue: (filter?: ((value: {
|
|
1710
1710
|
disabled?: boolean | undefined;
|
|
1711
1711
|
id?: string | undefined;
|
|
1712
1712
|
filter?: ((value: {
|
|
@@ -1806,7 +1806,7 @@ declare const useMenuDescendant: (options?: {
|
|
|
1806
1806
|
node: HTMLElement;
|
|
1807
1807
|
index: number;
|
|
1808
1808
|
}) | undefined;
|
|
1809
|
-
|
|
1809
|
+
enabledLastValue: (filter?: ((value: {
|
|
1810
1810
|
disabled?: boolean | undefined;
|
|
1811
1811
|
id?: string | undefined;
|
|
1812
1812
|
filter?: ((value: {
|
package/dist/menu.js
CHANGED
|
@@ -69,7 +69,7 @@ var Menu = (props) => {
|
|
|
69
69
|
const id = setTimeout(() => {
|
|
70
70
|
if (initialFocusRef)
|
|
71
71
|
return;
|
|
72
|
-
const first = descendants.
|
|
72
|
+
const first = descendants.enabledFirstValue();
|
|
73
73
|
if (first)
|
|
74
74
|
setFocusedIndex(first.index);
|
|
75
75
|
});
|
|
@@ -79,7 +79,7 @@ var Menu = (props) => {
|
|
|
79
79
|
const id = setTimeout(() => {
|
|
80
80
|
if (initialFocusRef)
|
|
81
81
|
return;
|
|
82
|
-
const last = descendants.
|
|
82
|
+
const last = descendants.enabledLastValue();
|
|
83
83
|
if (last)
|
|
84
84
|
setFocusedIndex(last.index);
|
|
85
85
|
});
|
package/dist/menu.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/menu",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
4
4
|
"description": "Yamada UI menu component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.12.
|
|
38
|
+
"@yamada-ui/core": "0.12.8",
|
|
39
39
|
"@yamada-ui/utils": "0.3.3",
|
|
40
|
-
"@yamada-ui/popover": "0.3.
|
|
41
|
-
"@yamada-ui/transitions": "0.3.
|
|
40
|
+
"@yamada-ui/popover": "0.3.25",
|
|
41
|
+
"@yamada-ui/transitions": "0.3.20",
|
|
42
42
|
"@yamada-ui/use-disclosure": "0.4.3",
|
|
43
|
-
"@yamada-ui/use-descendant": "0.2.
|
|
43
|
+
"@yamada-ui/use-descendant": "0.2.7",
|
|
44
44
|
"@yamada-ui/use-clickable": "0.3.6",
|
|
45
|
-
"@yamada-ui/use-controllable-state": "0.
|
|
45
|
+
"@yamada-ui/use-controllable-state": "0.4.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"react": "^18.0.0",
|