@fluentui/react-menu 9.0.0-rc.8 → 9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +527 -1
- package/CHANGELOG.md +142 -2
- package/dist/index.d.ts +125 -155
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.js +21 -7
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.js +20 -20
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +4 -8
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js +0 -5
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +0 -5
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.js +4 -2
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +33 -35
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +0 -5
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +0 -5
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/MenuList.types.js.map +1 -1
- package/lib/components/MenuList/index.js +1 -0
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js +2 -2
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js +8 -8
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.js +0 -5
- package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +0 -5
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +5 -10
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/index.js +16 -16
- package/lib/index.js.map +1 -1
- package/lib/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib/utils/useIsSubmenu.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.js +19 -5
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js +20 -20
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +5 -9
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +1 -6
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +1 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js +5 -3
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +35 -36
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +1 -6
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +1 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js +2 -0
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +2 -2
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js +8 -8
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js +1 -6
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +1 -6
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +6 -11
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/index.js +411 -17
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,152 @@
|
|
1
1
|
# Change Log - @fluentui/react-menu
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 28 Jun 2022 17:37:50 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.1)
|
8
|
+
|
9
|
+
Tue, 28 Jun 2022 17:37:50 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0..@fluentui/react-menu_v9.0.1)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: Use caret dependency range for Griffel ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by lingfangao@hotmail.com)
|
15
|
+
- Bump @fluentui/react-portal to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
16
|
+
- Bump @fluentui/react-positioning to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
17
|
+
- Bump @fluentui/react-tabster to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
19
|
+
|
20
|
+
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0)
|
21
|
+
|
22
|
+
Tue, 28 Jun 2022 15:13:41 GMT
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.14..@fluentui/react-menu_v9.0.0)
|
24
|
+
|
25
|
+
### Patches
|
26
|
+
|
27
|
+
- feat: Initial 9.0.0 release ([PR #23733](https://github.com/microsoft/fluentui/pull/23733) by lingfangao@hotmail.com)
|
28
|
+
- Bump @fluentui/keyboard-keys to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
29
|
+
- Bump @fluentui/react-context-selector to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
30
|
+
- Bump @fluentui/react-portal to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
31
|
+
- Bump @fluentui/react-positioning to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
32
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
33
|
+
- Bump @fluentui/react-tabster to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
34
|
+
- Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
35
|
+
- Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
36
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
37
|
+
|
38
|
+
### Changes
|
39
|
+
|
40
|
+
- chore: Update @fluentui/react-icons to latest version ([PR #23459](https://github.com/microsoft/fluentui/pull/23459) by olfedias@microsoft.com)
|
41
|
+
- fix: improve internal typings ([PR #23574](https://github.com/microsoft/fluentui/pull/23574) by bernardo.sunderhus@gmail.com)
|
42
|
+
- chore: Adding scheduler as a peer dependency since this package has a dependency on @fluentui/react-context-selector. ([PR #23681](https://github.com/microsoft/fluentui/pull/23681) by Humberto.Morimoto@microsoft.com)
|
43
|
+
- fix: submenu indicator should be filled on hover ([PR #23331](https://github.com/microsoft/fluentui/pull/23331) by yuanboxue@microsoft.com)
|
44
|
+
- Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
|
45
|
+
- fix: Use modern `::before` pseudoelement ([PR #23357](https://github.com/microsoft/fluentui/pull/23357) by lingfangao@hotmail.com)
|
46
|
+
- Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
|
47
|
+
- feat: Close context menu on scroll, new closeOnScroll prop ([PR #23351](https://github.com/microsoft/fluentui/pull/23351) by lingfangao@hotmail.com)
|
48
|
+
|
49
|
+
## [9.0.0-rc.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.14)
|
50
|
+
|
51
|
+
Thu, 23 Jun 2022 14:25:31 GMT
|
52
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.13..@fluentui/react-menu_v9.0.0-rc.14)
|
53
|
+
|
54
|
+
### Changes
|
55
|
+
|
56
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
57
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.12 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
58
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.11 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
59
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
60
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
61
|
+
|
62
|
+
## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.13)
|
63
|
+
|
64
|
+
Tue, 31 May 2022 21:28:40 GMT
|
65
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.12..@fluentui/react-menu_v9.0.0-rc.13)
|
66
|
+
|
67
|
+
### Changes
|
68
|
+
|
69
|
+
- updates import to react-shared-components ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by bernardo.sunderhus@gmail.com)
|
70
|
+
- chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
|
71
|
+
- Bump @fluentui/react-context-selector to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
72
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
73
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.11 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
74
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
75
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
76
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
77
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
78
|
+
|
79
|
+
## [9.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.12)
|
80
|
+
|
81
|
+
Thu, 26 May 2022 21:01:26 GMT
|
82
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.11..@fluentui/react-menu_v9.0.0-rc.12)
|
83
|
+
|
84
|
+
### Changes
|
85
|
+
|
86
|
+
- fix: MenuDivider should be visible in Windows high contrast mode ([PR #23238](https://github.com/microsoft/fluentui/pull/23238) by lingfangao@hotmail.com)
|
87
|
+
- fix: use neutral foreground 2 as text color for menu item ([PR #22540](https://github.com/microsoft/fluentui/pull/22540) by lingfangao@hotmail.com)
|
88
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
|
89
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
|
90
|
+
|
91
|
+
## [9.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.11)
|
92
|
+
|
93
|
+
Mon, 23 May 2022 18:56:46 GMT
|
94
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.10..@fluentui/react-menu_v9.0.0-rc.11)
|
95
|
+
|
96
|
+
### Changes
|
97
|
+
|
98
|
+
- BREAKING: changes to positioning prop ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by lingfangao@hotmail.com)
|
99
|
+
- BREAKING: Stop exporting MenuContext and MenuListContext ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by lingfangao@hotmail.com)
|
100
|
+
- Removing <componentName>ClassName exports. ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by esteban.230@hotmail.com)
|
101
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
102
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.10 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
103
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
104
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
105
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
106
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
|
107
|
+
|
108
|
+
## [9.0.0-rc.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.10)
|
109
|
+
|
110
|
+
Mon, 23 May 2022 12:14:22 GMT
|
111
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.9..@fluentui/react-menu_v9.0.0-rc.10)
|
112
|
+
|
113
|
+
### Changes
|
114
|
+
|
115
|
+
- chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
|
116
|
+
- feat: Fill icon on hover ([PR #23084](https://github.com/microsoft/fluentui/pull/23084) by yuanboxue@microsoft.com)
|
117
|
+
- fix: Context menu closes when its trigger is left clicked ([PR #23089](https://github.com/microsoft/fluentui/pull/23089) by lingfangao@hotmail.com)
|
118
|
+
- chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
|
119
|
+
- Removing Common types from all Menu components. ([PR #22958](https://github.com/microsoft/fluentui/pull/22958) by Humberto.Morimoto@microsoft.com)
|
120
|
+
- Bump @fluentui/react-context-selector to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
121
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
122
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
123
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
124
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
125
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
126
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
127
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
128
|
+
|
129
|
+
## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.9)
|
130
|
+
|
131
|
+
Thu, 05 May 2022 18:26:24 GMT
|
132
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.8..@fluentui/react-menu_v9.0.0-rc.9)
|
133
|
+
|
134
|
+
### Changes
|
135
|
+
|
136
|
+
- Removing star exports. ([PR #22804](https://github.com/microsoft/fluentui/pull/22804) by humberto_makoto@hotmail.com)
|
137
|
+
- Bump @fluentui/keyboard-keys to v9.0.0-rc.6 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
138
|
+
- Bump @fluentui/react-context-selector to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
139
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
140
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
141
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
142
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
143
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
144
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
145
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
146
|
+
|
7
147
|
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.0.0-rc.8)
|
8
148
|
|
9
|
-
Wed, 04 May 2022 13:
|
149
|
+
Wed, 04 May 2022 13:26:44 GMT
|
10
150
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.0.0-rc.7..@fluentui/react-menu_v9.0.0-rc.8)
|
11
151
|
|
12
152
|
### Changes
|
package/dist/index.d.ts
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import type {
|
1
|
+
/// <reference types="react" />
|
2
|
+
|
3
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
4
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
4
5
|
import type { ContextSelector } from '@fluentui/react-context-selector';
|
5
6
|
import type { FluentTriggerComponent } from '@fluentui/react-utilities';
|
6
7
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
7
|
-
import { PositioningShorthand } from '@fluentui/react-positioning';
|
8
|
+
import type { PositioningShorthand } from '@fluentui/react-positioning';
|
8
9
|
import * as React_2 from 'react';
|
9
10
|
import type { Slot } from '@fluentui/react-utilities';
|
10
11
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
11
|
-
import {
|
12
|
+
import { usePositioningMouseTarget } from '@fluentui/react-positioning';
|
12
13
|
|
13
14
|
/**
|
14
15
|
* Wrapper component that manages state for a popup MenuList and a MenuTrigger
|
@@ -16,50 +17,14 @@ import { usePopperMouseTarget } from '@fluentui/react-positioning';
|
|
16
17
|
export declare const Menu: React_2.FC<MenuProps>;
|
17
18
|
|
18
19
|
export declare type MenuCheckedValueChangeData = {
|
19
|
-
/** The name of the value */
|
20
|
-
name: string;
|
21
20
|
/** The items for this value that are checked */
|
22
21
|
checkedItems: string[];
|
22
|
+
/** The name of the value */
|
23
|
+
name: string;
|
23
24
|
};
|
24
25
|
|
25
26
|
export declare type MenuCheckedValueChangeEvent = React_2.MouseEvent | React_2.KeyboardEvent;
|
26
27
|
|
27
|
-
declare type MenuCommons = MenuListCommons & {
|
28
|
-
/**
|
29
|
-
* Whether the popup is open
|
30
|
-
*/
|
31
|
-
open: boolean;
|
32
|
-
/**
|
33
|
-
* Call back when the component requests to change value
|
34
|
-
* The `open` value is used as a hint when directly controlling the component
|
35
|
-
*/
|
36
|
-
onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
37
|
-
/**
|
38
|
-
* Whether the popup is open by default
|
39
|
-
*/
|
40
|
-
defaultOpen?: boolean;
|
41
|
-
openOnHover: boolean;
|
42
|
-
/**
|
43
|
-
* Opens the menu on right click (context menu), removes all other menu open interactions
|
44
|
-
*/
|
45
|
-
openOnContext?: boolean;
|
46
|
-
/**
|
47
|
-
* Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
|
48
|
-
* This option is disregarded for submenus
|
49
|
-
*/
|
50
|
-
inline?: boolean;
|
51
|
-
/**
|
52
|
-
* Do not dismiss the menu when a menu item is clicked
|
53
|
-
*/
|
54
|
-
persistOnItemClick?: boolean;
|
55
|
-
/**
|
56
|
-
* Sets the delay for mouse open/close for the popover one mouse enter/leave
|
57
|
-
*/
|
58
|
-
hoverDelay?: number;
|
59
|
-
};
|
60
|
-
|
61
|
-
export declare const MenuContext: Context<MenuContextValue>;
|
62
|
-
|
63
28
|
/**
|
64
29
|
* Context shared between Menu and its children components
|
65
30
|
*
|
@@ -79,11 +44,6 @@ export declare type MenuContextValues = {
|
|
79
44
|
*/
|
80
45
|
export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
|
81
46
|
|
82
|
-
/**
|
83
|
-
* @deprecated Use `menuDividerClassNames.root` instead.
|
84
|
-
*/
|
85
|
-
export declare const menuDividerClassName = "fui-MenuDivider";
|
86
|
-
|
87
47
|
export declare const menuDividerClassNames: SlotClassNames<MenuDividerSlots>;
|
88
48
|
|
89
49
|
export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
|
@@ -99,11 +59,6 @@ export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
|
|
99
59
|
*/
|
100
60
|
export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
|
101
61
|
|
102
|
-
/**
|
103
|
-
* @deprecated Use `menuGroupClassNames.root` instead.
|
104
|
-
*/
|
105
|
-
export declare const menuGroupClassName = "fui-MenuGroup";
|
106
|
-
|
107
62
|
export declare const menuGroupClassNames: SlotClassNames<MenuGroupSlots>;
|
108
63
|
|
109
64
|
export declare const MenuGroupContextProvider: React_2.Provider<MenuGroupContextValue>;
|
@@ -128,11 +83,6 @@ export declare type MenuGroupContextValues = {
|
|
128
83
|
*/
|
129
84
|
export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
|
130
85
|
|
131
|
-
/**
|
132
|
-
* @deprecated Use `menuGroupHeaderClassNames.root` instead.
|
133
|
-
*/
|
134
|
-
export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
|
135
|
-
|
136
86
|
export declare const menuGroupHeaderClassNames: SlotClassNames<MenuGroupHeaderSlots>;
|
137
87
|
|
138
88
|
export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
|
@@ -166,51 +116,40 @@ export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
|
|
166
116
|
*/
|
167
117
|
export declare const MenuItemCheckbox: ForwardRefComponent<MenuItemCheckboxProps>;
|
168
118
|
|
169
|
-
/**
|
170
|
-
* @deprecated Use `menuItemCheckboxClassNames.root` instead.
|
171
|
-
*/
|
172
|
-
export declare const menuItemCheckboxClassName = "fui-MenuItemCheckbox";
|
173
|
-
|
174
119
|
export declare const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
|
175
120
|
|
176
121
|
export declare type MenuItemCheckboxProps = MenuItemProps & MenuItemSelectableProps;
|
177
122
|
|
178
123
|
export declare type MenuItemCheckboxState = MenuItemState & MenuItemSelectableState;
|
179
124
|
|
180
|
-
/**
|
181
|
-
* @deprecated Use `menuItemClassNames.root` instead.
|
182
|
-
*/
|
183
|
-
export declare const menuItemClassName = "fui-MenuItem";
|
184
|
-
|
185
125
|
export declare const menuItemClassNames: SlotClassNames<MenuItemSlots>;
|
186
126
|
|
187
|
-
declare type
|
188
|
-
/**
|
189
|
-
* If the menu item is a trigger for a submenu
|
190
|
-
*/
|
191
|
-
hasSubmenu?: boolean;
|
127
|
+
export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & {
|
192
128
|
/**
|
193
129
|
* Applies disabled styles to menu item but remains focusable
|
130
|
+
*
|
131
|
+
* @default false
|
194
132
|
*/
|
195
133
|
disabled?: boolean;
|
134
|
+
/**
|
135
|
+
* If the menu item is a trigger for a submenu
|
136
|
+
*
|
137
|
+
* @default false
|
138
|
+
*/
|
139
|
+
hasSubmenu?: boolean;
|
196
140
|
/**
|
197
141
|
* Clicking on the menu item will not dismiss an open menu
|
142
|
+
*
|
143
|
+
* @default false
|
198
144
|
*/
|
199
145
|
persistOnClick?: boolean;
|
200
146
|
};
|
201
147
|
|
202
|
-
export declare type MenuItemProps = ComponentProps<Partial<MenuItemSlots>> & MenuItemCommons;
|
203
|
-
|
204
148
|
/**
|
205
149
|
* Define a styled MenuItemRadio, using the `useMenuItemRadio_unstable` hook.
|
206
150
|
*/
|
207
151
|
export declare const MenuItemRadio: ForwardRefComponent<MenuItemRadioProps>;
|
208
152
|
|
209
|
-
/**
|
210
|
-
* @deprecated Use `menuItemRadioClassNames.root` instead.
|
211
|
-
*/
|
212
|
-
export declare const menuItemRadioClassName = "fui-MenuItemRadio";
|
213
|
-
|
214
153
|
export declare const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>>;
|
215
154
|
|
216
155
|
export declare type MenuItemRadioProps = MenuItemProps & MenuItemSelectableProps;
|
@@ -277,111 +216,97 @@ export declare type MenuItemSlots = {
|
|
277
216
|
secondaryContent?: Slot<'span'>;
|
278
217
|
};
|
279
218
|
|
280
|
-
export declare type MenuItemState = ComponentState<MenuItemSlots> &
|
219
|
+
export declare type MenuItemState = ComponentState<MenuItemSlots> & Pick<MenuItemProps, 'disabled' | 'hasSubmenu' | 'persistOnClick'>;
|
281
220
|
|
282
221
|
/**
|
283
222
|
* Define a styled MenuList, using the `useMenuList_unstable` hook.
|
284
223
|
*/
|
285
224
|
export declare const MenuList: ForwardRefComponent<MenuListProps>;
|
286
225
|
|
226
|
+
export declare const menuListClassNames: SlotClassNames<MenuListSlots>;
|
227
|
+
|
287
228
|
/**
|
288
|
-
*
|
229
|
+
* Context shared between MenuList and its children components
|
289
230
|
*/
|
290
|
-
export declare
|
231
|
+
export declare type MenuListContextValue = Pick<MenuListProps, 'checkedValues' | 'onCheckedValueChange' | 'hasIcons' | 'hasCheckmarks'> & {
|
232
|
+
setFocusByFirstCharacter?: (e: React_2.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;
|
233
|
+
toggleCheckbox?: SelectableHandler;
|
234
|
+
selectRadio?: SelectableHandler;
|
235
|
+
};
|
291
236
|
|
292
|
-
export declare
|
237
|
+
export declare type MenuListContextValues = {
|
238
|
+
menuList: MenuListContextValue;
|
239
|
+
};
|
293
240
|
|
294
|
-
declare type
|
295
|
-
/**
|
296
|
-
* Callback when checked items change for value with a name
|
297
|
-
*
|
298
|
-
* @param event - React's original SyntheticEvent
|
299
|
-
* @param data - A data object with relevant information
|
300
|
-
*/
|
301
|
-
onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
|
241
|
+
export declare type MenuListProps = ComponentProps<MenuListSlots> & {
|
302
242
|
/**
|
303
243
|
* Map of all checked values
|
304
244
|
*/
|
305
|
-
checkedValues
|
245
|
+
checkedValues?: Record<string, string[]>;
|
306
246
|
/**
|
307
247
|
* Default values to be checked on mount
|
308
248
|
*/
|
309
249
|
defaultCheckedValues?: Record<string, string[]>;
|
250
|
+
/**
|
251
|
+
* States that menu items can contain selectable items and reserve slots for item alignment
|
252
|
+
*/
|
253
|
+
hasCheckmarks?: boolean;
|
310
254
|
/**
|
311
255
|
* States that menu items can contain icons and reserve slots for item alignment
|
312
256
|
*/
|
313
257
|
hasIcons?: boolean;
|
314
258
|
/**
|
315
|
-
*
|
259
|
+
* Callback when checked items change for value with a name
|
260
|
+
*
|
261
|
+
* @param event - React's original SyntheticEvent
|
262
|
+
* @param data - A data object with relevant information
|
316
263
|
*/
|
317
|
-
|
318
|
-
};
|
319
|
-
|
320
|
-
export declare const MenuListContext: Context<MenuListContextValue>;
|
321
|
-
|
322
|
-
/**
|
323
|
-
* Context shared between MenuList and its children components
|
324
|
-
*/
|
325
|
-
export declare type MenuListContextValue = Pick<MenuListProps, 'checkedValues' | 'onCheckedValueChange' | 'hasIcons' | 'hasCheckmarks'> & {
|
326
|
-
setFocusByFirstCharacter?: (e: React_2.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;
|
327
|
-
toggleCheckbox?: SelectableHandler;
|
328
|
-
selectRadio?: SelectableHandler;
|
329
|
-
};
|
330
|
-
|
331
|
-
export declare type MenuListContextValues = {
|
332
|
-
menuList: MenuListContextValue;
|
264
|
+
onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;
|
333
265
|
};
|
334
266
|
|
335
|
-
export declare type MenuListProps = ComponentProps<MenuListSlots> & Partial<MenuListCommons>;
|
336
|
-
|
337
267
|
export declare const MenuListProvider: React_2.Provider<MenuListContextValue> & React_2.FC<React_2.ProviderProps<MenuListContextValue>>;
|
338
268
|
|
339
269
|
export declare type MenuListSlots = {
|
340
270
|
root: Slot<'div'>;
|
341
271
|
};
|
342
272
|
|
343
|
-
export declare type MenuListState = ComponentState<MenuListSlots> &
|
273
|
+
export declare type MenuListState = ComponentState<MenuListSlots> & Pick<MenuListProps, 'defaultCheckedValues' | 'onCheckedValueChange'> & Required<Pick<MenuListProps, 'checkedValues' | 'hasCheckmarks' | 'hasIcons'>> & {
|
274
|
+
/**
|
275
|
+
* Selects a radio item, will de-select the currently selected ratio item
|
276
|
+
*/
|
277
|
+
selectRadio: SelectableHandler;
|
344
278
|
/**
|
345
279
|
* Callback to set focus on the next menu item by first character
|
346
280
|
*/
|
347
281
|
setFocusByFirstCharacter: NonNullable<MenuListContextValue['setFocusByFirstCharacter']>;
|
348
282
|
toggleCheckbox: SelectableHandler;
|
349
|
-
/**
|
350
|
-
* Selects a radio item, will de-select the currently selected ratio item
|
351
|
-
*/
|
352
|
-
selectRadio: SelectableHandler;
|
353
283
|
};
|
354
284
|
|
355
285
|
/**
|
356
286
|
* Data attached to open/close events
|
357
287
|
*/
|
358
288
|
export declare type MenuOpenChangeData = {
|
359
|
-
open: boolean;
|
360
|
-
/**
|
361
|
-
* Indicates whether the change of state was a keyboard interaction
|
362
|
-
*/
|
363
|
-
keyboard?: boolean;
|
364
289
|
/**
|
365
290
|
* indicates whether the request for the open state was bubbled from a nested menu
|
366
291
|
*/
|
367
292
|
bubble?: boolean;
|
293
|
+
/**
|
294
|
+
* Indicates whether the change of state was a keyboard interaction
|
295
|
+
*/
|
296
|
+
keyboard?: boolean;
|
297
|
+
open: boolean;
|
368
298
|
};
|
369
299
|
|
370
300
|
/**
|
371
301
|
* The supported events that will trigger open/close of the menu
|
372
302
|
*/
|
373
|
-
export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.
|
303
|
+
export declare type MenuOpenEvents = MouseEvent | TouchEvent | React_2.FocusEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement> | React_2.MouseEvent<HTMLElement>;
|
374
304
|
|
375
305
|
/**
|
376
306
|
* Popover intended to wrap `MenuList` and adds styling and interaction support specific to menus
|
377
307
|
*/
|
378
308
|
export declare const MenuPopover: ForwardRefComponent<MenuPopoverProps>;
|
379
309
|
|
380
|
-
/**
|
381
|
-
* @deprecated Use `menuPopoverClassNames.root` instead.
|
382
|
-
*/
|
383
|
-
export declare const menuPopoverClassName = "fui-MenuPopover";
|
384
|
-
|
385
310
|
export declare const menuPopoverClassNames: SlotClassNames<MenuPopoverSlots>;
|
386
311
|
|
387
312
|
/**
|
@@ -407,16 +332,68 @@ export declare type MenuPopoverState = ComponentState<MenuPopoverSlots> & {
|
|
407
332
|
/**
|
408
333
|
* Extends and drills down Menulist props to simplify API
|
409
334
|
*/
|
410
|
-
export declare type MenuProps =
|
335
|
+
export declare type MenuProps = ComponentProps<MenuSlots> & Pick<MenuListProps, 'checkedValues' | 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'onCheckedValueChange'> & {
|
411
336
|
/**
|
412
337
|
* Can contain two children including {@link MenuTrigger} and {@link MenuPopover}.
|
413
338
|
* Alternatively can only contain {@link MenuPopover} if using a custom `target`.
|
414
339
|
*/
|
415
340
|
children: [JSX.Element, JSX.Element] | JSX.Element;
|
341
|
+
/**
|
342
|
+
* Whether the popup is open by default
|
343
|
+
*
|
344
|
+
* @default false
|
345
|
+
*/
|
346
|
+
defaultOpen?: boolean;
|
347
|
+
/**
|
348
|
+
* Sets the delay for mouse open/close for the popover one mouse enter/leave
|
349
|
+
*/
|
350
|
+
hoverDelay?: number;
|
351
|
+
/**
|
352
|
+
* Root menus are rendered out of DOM order on `document.body`, use this to render the menu in DOM order
|
353
|
+
* This option is disregarded for submenus
|
354
|
+
*
|
355
|
+
* @default false
|
356
|
+
*/
|
357
|
+
inline?: boolean;
|
358
|
+
/**
|
359
|
+
* Call back when the component requests to change value
|
360
|
+
* The `open` value is used as a hint when directly controlling the component
|
361
|
+
*/
|
362
|
+
onOpenChange?: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
363
|
+
/**
|
364
|
+
* Whether the popup is open
|
365
|
+
*
|
366
|
+
* @default false
|
367
|
+
*/
|
368
|
+
open?: boolean;
|
369
|
+
/**
|
370
|
+
* Opens the menu on right click (context menu), removes all other menu open interactions
|
371
|
+
*
|
372
|
+
* @default false
|
373
|
+
*/
|
374
|
+
openOnContext?: boolean;
|
375
|
+
/**
|
376
|
+
* Opens the menu on hover
|
377
|
+
*
|
378
|
+
* @default false
|
379
|
+
*/
|
380
|
+
openOnHover?: boolean;
|
381
|
+
/**
|
382
|
+
* Do not dismiss the menu when a menu item is clicked
|
383
|
+
*
|
384
|
+
* @default false
|
385
|
+
*/
|
386
|
+
persistOnItemClick?: boolean;
|
416
387
|
/**
|
417
388
|
* Configures the positioned menu
|
418
389
|
*/
|
419
390
|
positioning?: PositioningShorthand;
|
391
|
+
/**
|
392
|
+
* Close when scroll outside of it
|
393
|
+
*
|
394
|
+
* @default false
|
395
|
+
*/
|
396
|
+
closeOnScroll?: boolean;
|
420
397
|
};
|
421
398
|
|
422
399
|
export declare const MenuProvider: React_2.Provider<MenuContextValue> & React_2.FC<React_2.ProviderProps<MenuContextValue>>;
|
@@ -428,19 +405,12 @@ export declare type MenuSlots = {};
|
|
428
405
|
*/
|
429
406
|
export declare const MenuSplitGroup: ForwardRefComponent<MenuSplitGroupProps>;
|
430
407
|
|
431
|
-
/**
|
432
|
-
* @deprecated Use `menuSplitGroupClassNames.root` instead.
|
433
|
-
*/
|
434
|
-
export declare const menuSplitGroupClassName = "fui-MenuSplitGroup";
|
435
|
-
|
436
408
|
export declare const menuSplitGroupClassNames: SlotClassNames<MenuSplitGroupSlots>;
|
437
409
|
|
438
|
-
declare type MenuSplitGroupCommons = {};
|
439
|
-
|
440
410
|
/**
|
441
411
|
* MenuSplitGroup Props
|
442
412
|
*/
|
443
|
-
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots
|
413
|
+
export declare type MenuSplitGroupProps = ComponentProps<MenuSplitGroupSlots>;
|
444
414
|
|
445
415
|
export declare type MenuSplitGroupSlots = {
|
446
416
|
root: Slot<'div'>;
|
@@ -449,45 +419,45 @@ export declare type MenuSplitGroupSlots = {
|
|
449
419
|
/**
|
450
420
|
* State used in rendering MenuSplitGroup
|
451
421
|
*/
|
452
|
-
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots
|
422
|
+
export declare type MenuSplitGroupState = ComponentState<MenuSplitGroupSlots>;
|
453
423
|
|
454
|
-
export declare type MenuState =
|
424
|
+
export declare type MenuState = ComponentState<MenuSlots> & Pick<MenuProps, 'defaultCheckedValues' | 'hasCheckmarks' | 'hasIcons' | 'inline' | 'onOpenChange' | 'openOnContext' | 'persistOnItemClick'> & Required<Pick<MenuProps, 'checkedValues' | 'onCheckedValueChange' | 'open' | 'openOnHover' | 'closeOnScroll'>> & {
|
455
425
|
/**
|
456
|
-
*
|
426
|
+
* Anchors the popper to the mouse click for context events
|
457
427
|
*/
|
458
|
-
|
428
|
+
contextTarget: ReturnType<typeof usePositioningMouseTarget>[0];
|
459
429
|
/**
|
460
|
-
*
|
430
|
+
* Whether this menu is a submenu
|
461
431
|
*/
|
462
|
-
|
432
|
+
isSubmenu: boolean;
|
463
433
|
/**
|
464
434
|
* Internal react node that just simplifies handling children
|
465
435
|
*/
|
466
|
-
|
436
|
+
menuPopover: React_2.ReactNode;
|
467
437
|
/**
|
468
438
|
* The ref for the popup
|
469
439
|
*/
|
470
440
|
menuPopoverRef: React_2.MutableRefObject<HTMLElement>;
|
471
441
|
/**
|
472
|
-
*
|
442
|
+
* Internal react node that just simplifies handling children
|
473
443
|
*/
|
474
|
-
|
444
|
+
menuTrigger: React_2.ReactNode;
|
475
445
|
/**
|
476
|
-
*
|
446
|
+
* A callback to set the target of the popper to the mouse click for context events
|
477
447
|
*/
|
478
|
-
|
448
|
+
setContextTarget: ReturnType<typeof usePositioningMouseTarget>[1];
|
479
449
|
/**
|
480
|
-
*
|
450
|
+
* Callback to open/close the popup
|
481
451
|
*/
|
482
|
-
|
452
|
+
setOpen: (e: MenuOpenEvents, data: MenuOpenChangeData) => void;
|
483
453
|
/**
|
484
|
-
*
|
454
|
+
* Id for the MenuTrigger element for aria relationship
|
485
455
|
*/
|
486
|
-
|
456
|
+
triggerId: string;
|
487
457
|
/**
|
488
|
-
*
|
458
|
+
* The ref for the MenuTrigger, used for popup positioning
|
489
459
|
*/
|
490
|
-
|
460
|
+
triggerRef: React_2.MutableRefObject<HTMLElement>;
|
491
461
|
};
|
492
462
|
|
493
463
|
/**
|
@@ -581,7 +551,7 @@ export declare const renderMenuTrigger_unstable: (state: MenuTriggerState) => JS
|
|
581
551
|
|
582
552
|
export declare type SelectableHandler = (e: React_2.MouseEvent | React_2.KeyboardEvent, name: string, value: string, checked: boolean) => void;
|
583
553
|
|
584
|
-
export declare type UninitializedMenuListState = Omit<MenuListState, '
|
554
|
+
export declare type UninitializedMenuListState = Omit<MenuListState, 'checkedValues' | 'selectRadio' | 'setFocusByFirstCharacter' | 'toggleCheckbox'> & Partial<Pick<MenuListState, 'checkedValues'>>;
|
585
555
|
|
586
556
|
/**
|
587
557
|
* Applies styles to a checkmark slot for selectable menu items
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,mBAAT,QAAoC,cAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,IAAI,GAAwB,KAAK,IAAG;
|
1
|
+
{"version":3,"sources":["components/Menu/Menu.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,mBAAT,QAAoC,cAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,IAAI,GAAwB,KAAK,IAAG;EAC/C,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,CAA9B;EACA,MAAM,aAAa,GAAG,6BAA6B,CAAC,KAAD,CAAnD;EAEA,OAAO,mBAAmB,CAAC,KAAD,EAAQ,aAAR,CAA1B;AACD,CALM;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourcesContent":["import * as React from 'react';\nimport { useMenu_unstable } from './useMenu';\nimport { useMenuContextValues_unstable } from './useMenuContextValues';\nimport { renderMenu_unstable } from './renderMenu';\nimport type { MenuProps } from './Menu.types';\n\n/**\n * Wrapper component that manages state for a popup MenuList and a MenuTrigger\n */\nexport const Menu: React.FC<MenuProps> = props => {\n const state = useMenu_unstable(props);\n const contextValues = useMenuContextValues_unstable(state);\n\n return renderMenu_unstable(state, contextValues);\n};\n\nMenu.displayName = 'Menu';\n"],"sourceRoot":"../src/"}
|