@fluentui/react-menu 0.0.0-nightlycbf184efa720211222.1 → 0.0.0-nightlyecca467a8920220110.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +50 -26
- package/CHANGELOG.md +20 -16
- package/Spec.md +21 -16
- package/dist/react-menu.d.ts +50 -1
- package/lib/MenuSplitGroup.d.ts +1 -0
- package/lib/MenuSplitGroup.js +2 -0
- package/lib/MenuSplitGroup.js.map +1 -0
- package/lib/components/MenuDivider/useMenuDividerStyles.js +1 -0
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -0
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/lib/components/MenuItem/useMenuItem.js +8 -4
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +10 -18
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +1 -0
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +15 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +2 -0
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib/components/MenuSplitGroup/index.js +6 -0
- package/lib/components/MenuSplitGroup/index.js.map +1 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +16 -0
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +16 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +72 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +34 -0
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib/index.d.ts +11 -10
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib-commonjs/MenuSplitGroup.d.ts +1 -0
- package/lib-commonjs/MenuSplitGroup.js +10 -0
- package/lib-commonjs/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +2 -0
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +2 -0
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js +7 -3
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +11 -18
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +2 -0
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +26 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +13 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +6 -0
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/index.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js +18 -0
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +5 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +28 -0
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +16 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +86 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +6 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +45 -0
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -0
- package/lib-commonjs/index.d.ts +11 -10
- package/lib-commonjs/index.js +16 -14
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.json
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
"name": "@fluentui/react-menu",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-menu_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Mon, 10 Jan 2022 04:15:28 GMT",
|
6
|
+
"tag": "@fluentui/react-menu_v0.0.0-nightlyecca467a8920220110.1",
|
7
|
+
"version": "0.0.0-nightlyecca467a8920220110.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-menu",
|
13
|
-
"commit": "
|
13
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
16
|
{
|
@@ -25,6 +25,12 @@
|
|
25
25
|
"commit": "6ca0355f6740f836ff4df009687718a380085247",
|
26
26
|
"comment": "fix: Focus on first menu item on click"
|
27
27
|
},
|
28
|
+
{
|
29
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
30
|
+
"package": "@fluentui/react-menu",
|
31
|
+
"commit": "38c8bed2c707014688ae2ae689033fa36ef23075",
|
32
|
+
"comment": "Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster."
|
33
|
+
},
|
28
34
|
{
|
29
35
|
"author": "olfedias@microsoft.com",
|
30
36
|
"package": "@fluentui/react-menu",
|
@@ -37,6 +43,24 @@
|
|
37
43
|
"commit": "4121754498bba5137f769295e2b7a2899f557278",
|
38
44
|
"comment": "fix: Call `useCheckmarkStyles` in `useMenuItemStyles`"
|
39
45
|
},
|
46
|
+
{
|
47
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
48
|
+
"package": "@fluentui/react-menu",
|
49
|
+
"commit": "227e09f59026e2bd243422427d9e230d6aa892ca",
|
50
|
+
"comment": "Replacing use of functions in makeStyles with direct use of tokens."
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"author": "ololubek@microsoft.com",
|
54
|
+
"package": "@fluentui/react-menu",
|
55
|
+
"commit": "63cbefe55e5db10eedbde19392aa8b6376d6a7f7",
|
56
|
+
"comment": "Update react-icons usage to resizable icons"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"author": "lingfangao@hotmail.com",
|
60
|
+
"package": "@fluentui/react-menu",
|
61
|
+
"commit": "95a6a32cbffa9d86d6017cf8e0204d4b459ef370",
|
62
|
+
"comment": "feat: implement `MenuSplitGroup` component for split menu items"
|
63
|
+
},
|
40
64
|
{
|
41
65
|
"author": "ololubek@microsoft.com",
|
42
66
|
"package": "@fluentui/react-menu",
|
@@ -52,68 +76,68 @@
|
|
52
76
|
{
|
53
77
|
"author": "beachball",
|
54
78
|
"package": "@fluentui/react-menu",
|
55
|
-
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-
|
56
|
-
"commit": "
|
79
|
+
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightlyecca467a8920220110.1",
|
80
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
57
81
|
},
|
58
82
|
{
|
59
83
|
"author": "beachball",
|
60
84
|
"package": "@fluentui/react-menu",
|
61
|
-
"comment": "Bump @fluentui/react-context-selector to v0.0.0-
|
62
|
-
"commit": "
|
85
|
+
"comment": "Bump @fluentui/react-context-selector to v0.0.0-nightlyecca467a8920220110.1",
|
86
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
63
87
|
},
|
64
88
|
{
|
65
89
|
"author": "beachball",
|
66
90
|
"package": "@fluentui/react-menu",
|
67
|
-
"comment": "Bump @fluentui/react-make-styles to v0.0.0-
|
68
|
-
"commit": "
|
91
|
+
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyecca467a8920220110.1",
|
92
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
69
93
|
},
|
70
94
|
{
|
71
95
|
"author": "beachball",
|
72
96
|
"package": "@fluentui/react-menu",
|
73
|
-
"comment": "Bump @fluentui/react-portal to v0.0.0-
|
74
|
-
"commit": "
|
97
|
+
"comment": "Bump @fluentui/react-portal to v0.0.0-nightlyecca467a8920220110.1",
|
98
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
75
99
|
},
|
76
100
|
{
|
77
101
|
"author": "beachball",
|
78
102
|
"package": "@fluentui/react-menu",
|
79
|
-
"comment": "Bump @fluentui/react-positioning to v0.0.0-
|
80
|
-
"commit": "
|
103
|
+
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightlyecca467a8920220110.1",
|
104
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
81
105
|
},
|
82
106
|
{
|
83
107
|
"author": "beachball",
|
84
108
|
"package": "@fluentui/react-menu",
|
85
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-
|
86
|
-
"commit": "
|
109
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlyecca467a8920220110.1",
|
110
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
87
111
|
},
|
88
112
|
{
|
89
113
|
"author": "beachball",
|
90
114
|
"package": "@fluentui/react-menu",
|
91
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-
|
92
|
-
"commit": "
|
115
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightlyecca467a8920220110.1",
|
116
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
93
117
|
},
|
94
118
|
{
|
95
119
|
"author": "beachball",
|
96
120
|
"package": "@fluentui/react-menu",
|
97
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-
|
98
|
-
"commit": "
|
121
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyecca467a8920220110.1",
|
122
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
99
123
|
},
|
100
124
|
{
|
101
125
|
"author": "beachball",
|
102
126
|
"package": "@fluentui/react-menu",
|
103
|
-
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-
|
104
|
-
"commit": "
|
127
|
+
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyecca467a8920220110.1",
|
128
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
105
129
|
},
|
106
130
|
{
|
107
131
|
"author": "beachball",
|
108
132
|
"package": "@fluentui/react-menu",
|
109
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-
|
110
|
-
"commit": "
|
133
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyecca467a8920220110.1",
|
134
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
111
135
|
},
|
112
136
|
{
|
113
137
|
"author": "beachball",
|
114
138
|
"package": "@fluentui/react-menu",
|
115
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-
|
116
|
-
"commit": "
|
139
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyecca467a8920220110.1",
|
140
|
+
"commit": "0e3456c586480a46e3664c6acc9d28cbef8bd814"
|
117
141
|
}
|
118
142
|
],
|
119
143
|
"none": [
|
package/CHANGELOG.md
CHANGED
@@ -1,34 +1,38 @@
|
|
1
1
|
# Change Log - @fluentui/react-menu
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 10 Jan 2022 04:15:28 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyecca467a8920220110.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v0.0.0-nightlyecca467a8920220110.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-beta.5..@fluentui/react-menu_v0.0.0-
|
9
|
+
Mon, 10 Jan 2022 04:15:28 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-beta.5..@fluentui/react-menu_v0.0.0-nightlyecca467a8920220110.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by email not defined)
|
15
15
|
- fix: set `aria-expanded` and `aria-haspopup` values correctly ([PR #20957](https://github.com/microsoft/fluentui/pull/20957) by lingfangao@hotmail.com)
|
16
16
|
- fix: Focus on first menu item on click ([PR #20955](https://github.com/microsoft/fluentui/pull/20955) by lingfangao@hotmail.com)
|
17
|
+
- Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster. ([PR #21035](https://github.com/microsoft/fluentui/pull/21035) by Humberto.Morimoto@microsoft.com)
|
17
18
|
- update styles to not use CSS shorthands ([PR #20820](https://github.com/microsoft/fluentui/pull/20820) by olfedias@microsoft.com)
|
18
19
|
- fix: Call `useCheckmarkStyles` in `useMenuItemStyles` ([PR #20956](https://github.com/microsoft/fluentui/pull/20956) by lingfangao@hotmail.com)
|
20
|
+
- Replacing use of functions in makeStyles with direct use of tokens. ([PR #21048](https://github.com/microsoft/fluentui/pull/21048) by Humberto.Morimoto@microsoft.com)
|
21
|
+
- Update react-icons usage to resizable icons ([PR #21074](https://github.com/microsoft/fluentui/pull/21074) by ololubek@microsoft.com)
|
22
|
+
- feat: implement `MenuSplitGroup` component for split menu items ([PR #21095](https://github.com/microsoft/fluentui/pull/21095) by lingfangao@hotmail.com)
|
19
23
|
- (fix): Update react-icons dependency to latest version ([PR #20943](https://github.com/microsoft/fluentui/pull/20943) by ololubek@microsoft.com)
|
20
24
|
- breaking: MenuTrigger must be the first child of the `Menu` ([PR #21096](https://github.com/microsoft/fluentui/pull/21096) by lingfangao@hotmail.com)
|
21
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-
|
22
|
-
- Bump @fluentui/react-context-selector to v0.0.0-
|
23
|
-
- Bump @fluentui/react-make-styles to v0.0.0-
|
24
|
-
- Bump @fluentui/react-portal to v0.0.0-
|
25
|
-
- Bump @fluentui/react-positioning to v0.0.0-
|
26
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-
|
27
|
-
- Bump @fluentui/react-tabster to v0.0.0-
|
28
|
-
- Bump @fluentui/react-utilities to v0.0.0-
|
29
|
-
- Bump @fluentui/babel-make-styles to v0.0.0-
|
30
|
-
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-
|
31
|
-
- Bump @fluentui/react-conformance-make-styles to v0.0.0-
|
25
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
26
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
27
|
+
- Bump @fluentui/react-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
28
|
+
- Bump @fluentui/react-portal to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
29
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
30
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
31
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
32
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
33
|
+
- Bump @fluentui/babel-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
34
|
+
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
35
|
+
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyecca467a8920220110.1 ([commit](https://github.com/microsoft/fluentui/commit/0e3456c586480a46e3664c6acc9d28cbef8bd814) by beachball)
|
32
36
|
|
33
37
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-beta.5)
|
34
38
|
|
package/Spec.md
CHANGED
@@ -619,7 +619,7 @@ const menu = (
|
|
619
619
|
|
620
620
|
```html
|
621
621
|
<!-- expected DOM output -->
|
622
|
-
<button aria-haspopup="
|
622
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
623
623
|
<div role="menu" aria-labelledby="trigger">
|
624
624
|
<div role="menuitem" tabindex="0">Option 1</div>
|
625
625
|
<div role="menuitem" tabindex="-1">Option 2</div>
|
@@ -644,7 +644,7 @@ const menu = (
|
|
644
644
|
|
645
645
|
```html
|
646
646
|
<!-- expected DOM output -->
|
647
|
-
<button aria-haspopup="
|
647
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
648
648
|
<div role="menu" aria-labelledby="trigger">
|
649
649
|
<div role="menuitem" tabindex="0">
|
650
650
|
<span role="presentation"><svg>FileIcon</svg></span>
|
@@ -682,7 +682,7 @@ const menu = (
|
|
682
682
|
|
683
683
|
```html
|
684
684
|
<!-- expected DOM output -->
|
685
|
-
<button aria-haspopup="
|
685
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
686
686
|
<div role="menu" aria-labelledby="trigger">
|
687
687
|
<div role="menuitem" tabindex="0">Option 1</div>
|
688
688
|
<div role="separator" aria-hidden="true"></div>
|
@@ -719,7 +719,7 @@ const menu = (
|
|
719
719
|
|
720
720
|
```html
|
721
721
|
<!-- expected DOM output -->
|
722
|
-
<button aria-haspopup="
|
722
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
723
723
|
<div role="menu" aria-labelledby="trigger">
|
724
724
|
<div role="menuitem" tabindex="0">Option 1</div>
|
725
725
|
<div role="separator" aria-hidden="true"></div>
|
@@ -758,10 +758,10 @@ const menu = (
|
|
758
758
|
|
759
759
|
```html
|
760
760
|
<!-- expected DOM output -->
|
761
|
-
<button aria-haspopup="
|
761
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
762
762
|
<div role="menu" aria-labelledby="trigger">
|
763
763
|
<div role="menuitem" tabindex="0">Option 1</div>
|
764
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
764
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
|
765
765
|
</div>
|
766
766
|
|
767
767
|
<!-- expected DOM output for submenu -->
|
@@ -843,7 +843,7 @@ const menuSelectableSections = (
|
|
843
843
|
```
|
844
844
|
|
845
845
|
```html
|
846
|
-
<button aria-haspopup="
|
846
|
+
<button aria-haspopup="menu" aria-expanded="true" id="trigger">Open menu</button>
|
847
847
|
|
848
848
|
<!-- expected DOM output for basic checkbox -->
|
849
849
|
<div role="menu" aria-labelledby="trigger">
|
@@ -882,9 +882,12 @@ const menuSplitbutton= (
|
|
882
882
|
<MenuList>
|
883
883
|
<MenuItem>Option 1</MenuItem>
|
884
884
|
<Menu>
|
885
|
-
<
|
886
|
-
<
|
887
|
-
|
885
|
+
<MenuSplitGroup>
|
886
|
+
<MenuItem>Main action</MenuItem>
|
887
|
+
<MenuTrigger>
|
888
|
+
<MenuItem />
|
889
|
+
</MenuTrigger>
|
890
|
+
</MenuSplitGroup>
|
888
891
|
<MenuItem>Option 1</MenuItem>
|
889
892
|
<MenuItem>Option 2</MenuItem>
|
890
893
|
<MenuItem>Option 3</MenuItem>
|
@@ -897,7 +900,7 @@ const menuSplitbutton= (
|
|
897
900
|
```html
|
898
901
|
<div role="menu" aria-labelledby="trigger">
|
899
902
|
<div role="menuitem" tabindex="0">Option 1</div>
|
900
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
903
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trigger">Open submenu</div>
|
901
904
|
</div>
|
902
905
|
|
903
906
|
<!-- expected DOM output -->
|
@@ -905,7 +908,7 @@ const menuSplitbutton= (
|
|
905
908
|
<div role="menuitem" tabindex="0">Option 1</div>
|
906
909
|
<div role="group">
|
907
910
|
<div role="menuitem" tabindex="-1">content slot</div>
|
908
|
-
<div role="menuitem" tabindex="-1" aria-haspopup="
|
911
|
+
<div role="menuitem" tabindex="-1" aria-haspopup="menu" aria-expanded="false" id="submenu-trgger">
|
909
912
|
<svg>indicator icon</svg>
|
910
913
|
</div>
|
911
914
|
</div>
|
@@ -958,11 +961,13 @@ Below is a set of diagrams that tries to illustrates all the interactions menus
|
|
958
961
|
|
959
962
|
All of the above Mouse events seen previously should apply to the part of the split button that is intended to open a submenu.
|
960
963
|
|
961
|
-
|
962
|
-
|
963
|
-
![Using up/down arrow key](./etc/images/splitbutton-up-down.jpg)
|
964
|
+
> TODO convert these diagrams to excalidraw or smth that is text format
|
965
|
+
> TODO add extra descriptions to diagrams
|
964
966
|
|
965
|
-
|
967
|
+
<img src="./etc/images/menu-interactions/Slide19.PNG" width="700" />
|
968
|
+
<img src="./etc/images/menu-interactions/Slide20.PNG" width="700" />
|
969
|
+
<img src="./etc/images/menu-interactions/Slide21.PNG" width="700" />
|
970
|
+
<img src="./etc/images/menu-interactions/Slide22.PNG" width="700" />
|
966
971
|
|
967
972
|
### MenuItem selection
|
968
973
|
|
package/dist/react-menu.d.ts
CHANGED
@@ -238,7 +238,7 @@ export declare type MenuItemSlots = {
|
|
238
238
|
* Component children are placed in this slot
|
239
239
|
* Avoid using the `children` property in this slot in favour of Component children whenever possible
|
240
240
|
*/
|
241
|
-
content
|
241
|
+
content?: IntrinsicShorthandProps<'span'>;
|
242
242
|
/**
|
243
243
|
* Secondary content rendered opposite the primary content (e.g Shortcut text)
|
244
244
|
*/
|
@@ -386,6 +386,34 @@ export declare const MenuProvider: React_2.Provider<MenuContextValue> & React_2.
|
|
386
386
|
|
387
387
|
export declare type MenuSlots = {};
|
388
388
|
|
389
|
+
/**
|
390
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
391
|
+
*/
|
392
|
+
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|
393
|
+
|
394
|
+
export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
|
395
|
+
|
396
|
+
export declare type MenuSplitGroupCommons = {};
|
397
|
+
|
398
|
+
/**
|
399
|
+
* MenuSplitGroup Props
|
400
|
+
*/
|
401
|
+
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
402
|
+
|
403
|
+
/**
|
404
|
+
* Array of all shorthand properties listed in MenuSplitGroupSlots
|
405
|
+
*/
|
406
|
+
export declare const menuSplitGroupShorthandProps: (keyof MenuSplitGroupSlots)[];
|
407
|
+
|
408
|
+
export declare type MenuSplitGroupSlots = {
|
409
|
+
root: IntrinsicShorthandProps<'div'>;
|
410
|
+
};
|
411
|
+
|
412
|
+
/**
|
413
|
+
* State used in rendering MenuSplitGroup
|
414
|
+
*/
|
415
|
+
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots> & MenuSplitGroupCommons;
|
416
|
+
|
389
417
|
export declare type MenuState = MenuCommons & ComponentState<MenuSlots> & {
|
390
418
|
/**
|
391
419
|
* Callback to open/close the popup
|
@@ -499,6 +527,11 @@ export declare const renderMenuList: (state: MenuListState, contextValues: MenuL
|
|
499
527
|
*/
|
500
528
|
export declare const renderMenuPopover: (state: MenuPopoverState) => JSX.Element;
|
501
529
|
|
530
|
+
/**
|
531
|
+
* Render the final JSX of MenuSplitGroup
|
532
|
+
*/
|
533
|
+
export declare const renderMenuSplitGroup: (state: MenuSplitGroupState) => JSX.Element;
|
534
|
+
|
502
535
|
/**
|
503
536
|
* Render the final JSX of MenuTrigger
|
504
537
|
*
|
@@ -606,6 +639,22 @@ export declare const useMenuPopover: (props: MenuPopoverProps, ref: React_2.Ref<
|
|
606
639
|
*/
|
607
640
|
export declare const useMenuPopoverStyles: (state: MenuPopoverState) => MenuPopoverState;
|
608
641
|
|
642
|
+
/**
|
643
|
+
* Create the state required to render MenuSplitGroup.
|
644
|
+
*
|
645
|
+
* The returned state can be modified with hooks such as useMenuSplitGroupStyles,
|
646
|
+
* before being passed to renderMenuSplitGroup.
|
647
|
+
*
|
648
|
+
* @param props - props from this instance of MenuSplitGroup
|
649
|
+
* @param ref - reference to root HTMLElement of MenuSplitGroup
|
650
|
+
*/
|
651
|
+
export declare const useMenuSplitGroup: (props: MenuSplitGroupProps, ref: React_2.Ref<HTMLElement>) => MenuSplitGroupState;
|
652
|
+
|
653
|
+
/**
|
654
|
+
* Apply styling to the MenuSplitGroup slots based on the state
|
655
|
+
*/
|
656
|
+
export declare const useMenuSplitGroupStyles: (state: MenuSplitGroupState) => MenuSplitGroupState;
|
657
|
+
|
609
658
|
/**
|
610
659
|
* Create the state required to render MenuTrigger.
|
611
660
|
* Clones the only child component and adds necessary event handling behaviours to open a popup menu
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './components/MenuSplitGroup/index';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MenuSplitGroup.js","sourceRoot":"","sources":["../src/MenuSplitGroup.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AASA,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA4B;AAC9D,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AASA,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA4B;AAC9D,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AACA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAAgC;AACtE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,wBAAD,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourceRoot":""}
|
@@ -18,7 +18,7 @@ export declare type MenuItemSlots = {
|
|
18
18
|
* Component children are placed in this slot
|
19
19
|
* Avoid using the `children` property in this slot in favour of Component children whenever possible
|
20
20
|
*/
|
21
|
-
content
|
21
|
+
content?: IntrinsicShorthandProps<'span'>;
|
22
22
|
/**
|
23
23
|
* Secondary content rendered opposite the primary content (e.g Shortcut text)
|
24
24
|
*/
|
@@ -3,7 +3,7 @@ import { useEventCallback, shouldPreventDefaultOnKeyDown, resolveShorthand, useM
|
|
3
3
|
import { useFluent } from '@fluentui/react-shared-contexts';
|
4
4
|
import { useCharacterSearch } from './useCharacterSearch';
|
5
5
|
import { useMenuTriggerContext } from '../../contexts/menuTriggerContext';
|
6
|
-
import {
|
6
|
+
import { ChevronRightRegular as ChevronRightIcon, ChevronLeftRegular as ChevronLeftIcon } from '@fluentui/react-icons';
|
7
7
|
import { useMenuListContext } from '../../contexts/menuListContext';
|
8
8
|
import { useMenuContext } from '../../contexts/menuContext';
|
9
9
|
/**
|
@@ -16,7 +16,7 @@ export const menuItemSlots = ['root', 'icon', 'submenuIndicator', 'content', 'se
|
|
16
16
|
*/
|
17
17
|
|
18
18
|
export const useMenuItem = (props, ref) => {
|
19
|
-
const hasSubmenu = useMenuTriggerContext();
|
19
|
+
const hasSubmenu = useMenuTriggerContext() || props.hasSubmenu;
|
20
20
|
const hasIcons = useMenuListContext(context => context.hasIcons);
|
21
21
|
const hasCheckmarks = useMenuListContext(context => context.hasCheckmarks);
|
22
22
|
const setOpen = useMenuContext(context => context.setOpen);
|
@@ -53,11 +53,15 @@ export const useMenuItem = (props, ref) => {
|
|
53
53
|
submenuIndicator: resolveShorthand(props.submenuIndicator, {
|
54
54
|
required: hasSubmenu,
|
55
55
|
defaultProps: {
|
56
|
-
children: dir === 'ltr' ? /*#__PURE__*/React.createElement(ChevronRightIcon,
|
56
|
+
children: dir === 'ltr' ? /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
57
|
+
fontSize: 20
|
58
|
+
}) : /*#__PURE__*/React.createElement(ChevronLeftIcon, {
|
59
|
+
fontSize: 20
|
60
|
+
})
|
57
61
|
}
|
58
62
|
}),
|
59
63
|
content: resolveShorthand(props.content, {
|
60
|
-
required:
|
64
|
+
required: !!props.children,
|
61
65
|
defaultProps: {
|
62
66
|
children: props.children
|
63
67
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,gBADF,EAEE,6BAFF,EAGE,gBAHF,EAIE,aAJF,EAKE,qBALF,QAMO,2BANP;AAOA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,qBAAT,QAAsC,mCAAtC;AACA,
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,gBADF,EAEE,6BAFF,EAGE,gBAHF,EAIE,aAJF,EAKE,qBALF,QAMO,2BANP;AAOA,SAAS,SAAT,QAA0B,iCAA1B;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,qBAAT,QAAsC,mCAAtC;AACA,SAAS,mBAAmB,IAAI,gBAAhC,EAAkD,kBAAkB,IAAI,eAAxE,QAA+F,uBAA/F;AACA,SAAS,kBAAT,QAAmC,gCAAnC;AACA,SAAS,cAAT,QAA+B,4BAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,aAAa,GAA+B,CACvD,MADuD,EAEvD,MAFuD,EAGvD,kBAHuD,EAIvD,SAJuD,EAKvD,kBALuD,EAMvD,WANuD,CAAlD;AASP;;AAEG;;AACH,OAAO,MAAM,WAAW,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oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;AACD,GAJyC,CAA1C;AAMA,EAAA,kBAAkB,CAAC,KAAD,EAAQ,QAAR,CAAlB;AACA,SAAO,KAAP;AACD,CA3FM","sourceRoot":""}
|
@@ -1,33 +1,22 @@
|
|
1
1
|
import { mergeClasses, __styles, shorthands } from '@fluentui/react-make-styles';
|
2
2
|
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
3
|
+
import { tokens } from '@fluentui/react-theme';
|
3
4
|
import { useCheckmarkStyles } from '../../selectable/index';
|
4
5
|
export const menuItemClassName = 'fui-MenuItem';
|
5
6
|
|
6
7
|
const useStyles = /*#__PURE__*/__styles({
|
7
8
|
"focusIndicator": {
|
8
9
|
"B486eqv": "f2hkw1w",
|
9
|
-
"
|
10
|
-
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
11
|
-
"hhrs2v": "f50u1b5",
|
12
|
-
"B7jbng7": ["flvaaa9", "f1781m5e"],
|
10
|
+
"B1bra5l": "fc85khu",
|
13
11
|
"e8izhr": "f1pxpxw8",
|
14
12
|
"in3gf6": "f1149fnl",
|
15
13
|
"B1i23sz": "fd1orka",
|
16
14
|
"ln9as": "fgtqheg",
|
17
15
|
"Bfgg0yq": "fq7mjg8",
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"fo1iai": "f1nbyjd2",
|
21
|
-
"Bh81ga8": ["famjx04", "f1lv6wi8"],
|
22
|
-
"qztvpn": "f5n18is",
|
23
|
-
"ge3ubn": ["f13az7yk", "f14kwzu1"],
|
24
|
-
"F41yt0": "fneogx5",
|
25
|
-
"Bxrdl85": ["f14kwzu1", "f13az7yk"],
|
16
|
+
"i16j1i": "fq9bj62",
|
17
|
+
"yxydaw": "fy07e8r",
|
26
18
|
"B9sa02e": "f1ha6shg",
|
27
|
-
"
|
28
|
-
"Ba9tnbb": ["f1ib27sc", "f14s7j5v"],
|
29
|
-
"Fpkomr": "f13oqbgc",
|
30
|
-
"Bttdqvk": ["f14s7j5v", "f1ib27sc"],
|
19
|
+
"yaquy9": "f4ltwxu",
|
31
20
|
"Bl8qd6i": "f1284xzw",
|
32
21
|
"Byzgy54": "f14dru39",
|
33
22
|
"mq8cyt": ["fvabyfg", "f12y1wz2"],
|
@@ -82,7 +71,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
82
71
|
}
|
83
72
|
}, {
|
84
73
|
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
85
|
-
"d": ["[data-keyboard-nav] .
|
74
|
+
"d": ["[data-keyboard-nav] .fc85khu:focus{border-color:transparent;}", "[data-keyboard-nav] .f1pxpxw8:focus:after{content:\"\";}", "[data-keyboard-nav] .f1149fnl:focus:after{position:absolute;}", "[data-keyboard-nav] .fd1orka:focus:after{pointer-events:none;}", "[data-keyboard-nav] .fgtqheg:focus:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fq7mjg8:focus:after{z-index:1;}", "[data-keyboard-nav] .fq9bj62:focus:after{border-style:solid;}", "[data-keyboard-nav] .fy07e8r:focus:after{border-width:2px;}", "[data-keyboard-nav] .f1ha6shg:focus:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f4ltwxu:focus:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1284xzw:focus:after{top:-2px;}", "[data-keyboard-nav] .f14dru39:focus:after{bottom:-2px;}", "[data-keyboard-nav] .fvabyfg:focus:after{left:-2px;}", "[data-keyboard-nav] .f12y1wz2:focus:after{right:-2px;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1k6fduh{cursor:pointer;}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f161knb0{padding-left:2px;}", ".f12huiiw{padding-right:2px;}", ".f3rmtva{background-color:transparent;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"],
|
86
75
|
"h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1jp5ecu:hover{color:var(--colorNeutralForeground3Hover);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
|
87
76
|
"f": [".fc1cou1:focus{color:var(--colorNeutralForeground3Hover);}", ".ft33916:focus{color:var(--colorNeutralForegroundDisabled);}"]
|
88
77
|
});
|
@@ -92,7 +81,10 @@ const useStyles = /*#__PURE__*/__styles({
|
|
92
81
|
export const useMenuItemStyles = state => {
|
93
82
|
const styles = useStyles();
|
94
83
|
state.root.className = mergeClasses(menuItemClassName, styles.root, styles.focusIndicator, state.disabled && styles.disabled, state.root.className);
|
95
|
-
|
84
|
+
|
85
|
+
if (state.content) {
|
86
|
+
state.content.className = mergeClasses(styles.content, state.content.className);
|
87
|
+
}
|
96
88
|
|
97
89
|
if (state.secondaryContent) {
|
98
90
|
state.secondaryContent.className = mergeClasses(!state.disabled && styles.secondaryContent, state.secondaryContent.className);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAIA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,kBAAT,QAAmC,wBAAnC;AAIA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,EAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD,CA7BM","sourceRoot":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuPopover/useMenuPopoverStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAaA;;AAEG;;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA8C;AAChF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACA,SAAO,KAAP;AACD,CAJM","sourceRoot":""}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { MenuSplitGroupProps } from './MenuSplitGroup.types';
|
2
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
|
+
/**
|
4
|
+
* Layout wrapper that provides extra keyboard navigation behavior for two `MenuItem` components.
|
5
|
+
*/
|
6
|
+
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|